Skip to content

Commit

Permalink
Merge pull request #8 from zahmo/ang17-patch-17.2.x
Browse files Browse the repository at this point in the history
Ang17 patch 17.2.4
  • Loading branch information
zahmo authored Mar 22, 2024
2 parents 653e991 + 8c694b3 commit 46bd5ed
Show file tree
Hide file tree
Showing 22 changed files with 2,563 additions and 2,120 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


# AJSF (Angular JSON Schema Form)
# ZAJSF (Z Angular JSON Schema Form)


This fork was created for anyone needing to use angular 15+ in their project.
Expand Down
6 changes: 3 additions & 3 deletions demo/app/demo.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ import { Bootstrap4FrameworkModule } from '@zajsf/bootstrap4';
import { JsonSchemaFormModule } from '@zajsf/core';


import { DaisyUIFrameworkModule } from '@zajsf/daisyui';
import { DUIOPTIONS, DaisyUIFrameworkModule } from '@zajsf/daisyui';
import { MaterialDesignFrameworkModule } from '@zajsf/material';

import { Bootstrap5FrameworkModule } from '@zajsf/bootstrap5';
import { CssFrameworkModule } from '@zajsf/cssframework';
import { environment } from '../environments/environment';
import { AceEditorDirective } from './ace-editor.directive';
import { DemoRootComponent } from './demo-root.component';
import { DemoComponent } from './demo.component';
import { routes } from './demo.routes';




@NgModule({
declarations: [AceEditorDirective, DemoComponent, DemoRootComponent],
imports: [
Expand All @@ -46,7 +46,7 @@ import { routes } from './demo.routes';
],
providers:[{ provide: REMOVE_STYLES_ON_COMPONENT_DESTROY, useValue: true }
//uncomment to disable daisyui class name prefixing
// ,{ provide: DUIOPTIONS, useValue: {classPrefix:true} }
,{ provide: DUIOPTIONS, useValue: {classPrefix:environment.cssClassPrefix} }
],
bootstrap: [DemoRootComponent]
})
Expand Down
205 changes: 112 additions & 93 deletions demo/assets/example-schemas/ng-jsf-flex-layout.json
Original file line number Diff line number Diff line change
@@ -1,101 +1,120 @@
{
"schema": {
"type": "object",
"properties": {
"first_name": { "type": "string" },
"last_name": { "type": "string" },
"address": {
"schema": {
"type": "object",
"properties": {
"street_1": { "type": "string" },
"street_2": { "type": "string" },
"city": { "type": "string" },
"state": {
"type": "string",
"enum": [ "AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE",
"DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA",
"KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS",
"MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND",
"MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD",
"TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY" ]
},
"zip_code": { "type": "string" }
}
},
"birthday": { "type": "string" },
"notes": { "type": "string" },
"phone_numbers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": [ "cell", "home", "work" ] },
"number": { "type": "string" }
},
"required": [ "type", "number" ]
}
}
"first_name": { "type": "string" },
"last_name": { "type": "string" },
"address": {
"type": "object",
"properties": {
"street_1": { "type": "string" },
"street_2": { "type": "string" },
"city": { "type": "string" },
"state": {
"type": "string",
"enum": ["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE",
"DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA",
"KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS",
"MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND",
"MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD",
"TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"
]
},
"zip_code": { "type": "string" }
}
},
"birthday": { "type": "string" },
"notes": { "type": "string" },
"phone_numbers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["cell", "home", "work"] },
"number": { "type": "string" }
},
"required": ["type", "number"]
}
}
},
"required": ["last_name"]
},
"required": [ "last_name" ]
},
"layout": [
{ "type": "flex", "flex-flow": "row wrap", "items": [ "first_name", "last_name" ] },
{ "key": "address.street_1", "title": "Address", "placeholder": "Street" },
{ "key": "address.street_2", "notitle": true },
{ "type": "div",
"display": "flex",
"flex-direction": "row",
"items": [
{ "key": "address.city", "flex": "3 3 150px",
"notitle": true, "placeholder": "City"
"layout": [
{ "type": "flex", "flex-flow": "row wrap", "items": ["first_name", "last_name"] },
{ "key": "address.street_1", "title": "Address", "placeholder": "Street" },
{ "key": "address.street_2", "notitle": true },
{
"type": "div",
"display": "flex",
"flex-direction": "row",
"items": [{
"key": "address.city",
"flex": "3 3 150px",
"notitle": true,
"placeholder": "City"
},
{
"key": "address.state",
"flex": "1 1 50px",
"notitle": true,
"placeholder": "State"
},
{
"key": "address.zip_code",
"flex": "2 2 100px",
"notitle": true,
"placeholder": "Zip Code"
}
]
},
{ "key": "address.state", "flex": "1 1 50px",
"notitle": true, "placeholder": "State"
{ "key": "birthday", "type": "date" },
{
"key": "phone_numbers",
"display": "flex",
"flex-flow": "row wrap",
"type": "array",
"listItems": 3,
"items": [{
"type": "div",
"displayFlex": true,
"flex-direction": "row",
"items": [{
"key": "phone_numbers[].type",
"flex": "1 1 90px",
"notitle": true,
"placeholder": "Type"
},
{
"key": "phone_numbers[].number",
"flex": "4 4 200px",
"notitle": true,
"placeholder": "Phone Number"
}
]
}]
},
{ "key": "address.zip_code", "flex": "2 2 100px",
"notitle": true, "placeholder": "Zip Code"
{
"type": "section",
"title": "Notes",
"expandable": true,
"expanded": false,
"items": [{ "key": "notes", "type": "textarea", "notitle": true }]
}
]
},
{ "key": "birthday", "type": "date" },
{ "key": "phone_numbers",
"type": "array",
"listItems": 3,
"items": [ {
"type": "div",
"displayFlex": true,
"flex-direction": "row",
"items": [
{ "key": "phone_numbers[].type", "flex": "1 1 50px",
"notitle": true, "placeholder": "Type"
},
{ "key": "phone_numbers[].number", "flex": "4 4 200px",
"notitle": true, "placeholder": "Phone Number"
}
]
} ]
},
{ "type": "section",
"title": "Notes",
"expandable": true,
"expanded": false,
"items": [ { "key": "notes", "type": "textarea", "notitle": true } ]
}
],
"data": {
"first_name": "Jane",
"last_name": "Doe",
"address": {
"street_1": "123 Main St.",
"city": "Las Vegas",
"state": "NV",
"zip_code": "89123"
},
"birthday": "1999-09-21",
"phone_numbers": [
{ "type": "cell", "number": "702-123-4567" },
{ "type": "work", "number": "702-987-6543" }
],
"notes": "(This is an example of an uninteresting note.)"
}
}
"data": {
"first_name": "Jane",
"last_name": "Doe",
"address": {
"street_1": "123 Main St.",
"city": "Las Vegas",
"state": "NV",
"zip_code": "89123"
},
"birthday": "1999-09-21",
"phone_numbers": [
{ "type": "cell", "number": "702-123-4567" },
{ "type": "work", "number": "702-987-6543" }
],
"notes": "(This is an example of an uninteresting note.)"
}
}
2 changes: 1 addition & 1 deletion demo/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

export const environment ={"production":true,"version":"17.2.0-RC.1","angularVersion":"17.2.3","materialVersion":"17.2.1"}
export const environment ={"production":true,"version":"17.2.4","angularVersion":"17.2.3","materialVersion":"17.2.1","cssClassPrefix":true}

2 changes: 1 addition & 1 deletion demo/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

export const environment ={"production":false,"version":"17.2.0-RC.1","angularVersion":"17.2.3","materialVersion":"17.2.1"}
export const environment ={"production":false,"version":"17.2.4","angularVersion":"17.2.3","materialVersion":"17.2.1","cssClassPrefix":true}

Loading

0 comments on commit 46bd5ed

Please sign in to comment.