Infosys / enterprise-angular-seed

Angular CLI based seed application incorporating many best practices typically needed in Enterprise apps.
https://infosys.github.io/enterprise-angular-seed
59 stars 18 forks source link

feature: JSON schema based dynamic forms #1

Open dharapvj opened 6 years ago

dharapvj commented 6 years ago

Add a demo page to showcase JSON schema based dynamic form building using plugin

dharapvj commented 6 years ago

Lets assume following domain model..

Employee -> 
    firstName String required 100chars max, 1 char min
    lastName string required 100 chars max, 1 char min
    doj date required
    hasLeft boolean
    lastWorkingDay date
    title string required 150 characters max
    emailId - email type - required 250 characters max email validation
    cell phone - number/string masked
    ssn no - number - masked
    aadhar no. - number - masked
    addresses - array of type Address
    trainings - array of type Training

Address ->
    line1 string required 100chars max, 1 char min
    line2 string 100 chars max
    city string required
    pincode string min 5 max 9
    state string required
    country string required

Training ->
    title string required 100 chars
    startDate - date required
    endDate - date
    trainingMasterId - required integer
    grade - 1 char
       Feedback - integer (1 to 5) - to be created using star widget 

Masking is a secondary priority

dharapvj commented 6 years ago

Latest version of this plugin (0.7.0-alpha.1) brings breaking changes.. it also brings mandatory peer dependency of Material and CDK.. which is little weird 😞

I am re-evaluating my choice of library at the moment..

dharapvj commented 6 years ago

Also.. in the demos which I tried the page continually refreshes losing all the styles in the process..

Either the version I am using is little unstable at the moment OR I am not configuring it well.. Need to analyse it futher

dharapvj commented 6 years ago

useful editor to edit the json schemas