@rxap/schematic-angular 16.2.0-dev.2 → 16.2.0-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +159 -0
- package/README.md +1 -1
- package/collection.json +10 -0
- package/package.json +11 -9
- package/src/lib/accordion-header.d.ts +5 -0
- package/src/lib/accordion-header.js +9 -3
- package/src/lib/accordion-header.js.map +1 -1
- package/src/lib/accordion-identifier.d.ts +4 -0
- package/src/lib/accordion-identifier.js.map +1 -1
- package/src/lib/accordion-item.d.ts +25 -17
- package/src/lib/accordion-item.js +72 -33
- package/src/lib/accordion-item.js.map +1 -1
- package/src/lib/accordion-itme-kinds.d.ts +8 -0
- package/src/lib/accordion-itme-kinds.js +16 -0
- package/src/lib/accordion-itme-kinds.js.map +1 -0
- package/src/lib/coerce-accordion-component.js +7 -3
- package/src/lib/coerce-accordion-component.js.map +1 -1
- package/src/lib/coerce-accordion-item-table-component.js +1 -1
- package/src/lib/coerce-accordion-item-table-component.js.map +1 -1
- package/src/lib/coerce-form-component.js +17 -2
- package/src/lib/coerce-form-component.js.map +1 -1
- package/src/lib/coerce-minimum-table-component.js +9 -3
- package/src/lib/coerce-minimum-table-component.js.map +1 -1
- package/src/lib/coerce-tree-table-component.js +16 -0
- package/src/lib/coerce-tree-table-component.js.map +1 -1
- package/src/lib/data-grid-item.d.ts +46 -11
- package/src/lib/data-grid-item.js +81 -6
- package/src/lib/data-grid-item.js.map +1 -1
- package/src/lib/data-grid-mode.d.ts +4 -0
- package/src/lib/data-grid-mode.js +9 -0
- package/src/lib/data-grid-mode.js.map +1 -0
- package/src/lib/data-grid-options.d.ts +12 -5
- package/src/lib/data-grid-options.js +43 -13
- package/src/lib/data-grid-options.js.map +1 -1
- package/src/lib/form/abstract-control.d.ts +29 -0
- package/src/lib/form/abstract-control.js +37 -0
- package/src/lib/form/abstract-control.js.map +1 -0
- package/src/lib/form/array/base-form-array.d.ts +18 -0
- package/src/lib/form/array/base-form-array.js +40 -0
- package/src/lib/form/array/base-form-array.js.map +1 -0
- package/src/lib/form/array/form-array-kind.d.ts +3 -0
- package/src/lib/form/array/form-array-kind.js +8 -0
- package/src/lib/form/array/form-array-kind.js.map +1 -0
- package/src/lib/form/array/form-array.d.ts +12 -0
- package/src/lib/form/array/form-array.js +18 -0
- package/src/lib/form/array/form-array.js.map +1 -0
- package/src/lib/form/coerce-control-component-imports.d.ts +3 -0
- package/src/lib/form/coerce-control-component-imports.js +18 -0
- package/src/lib/form/coerce-control-component-imports.js.map +1 -0
- package/src/lib/form/control/base-form-control.d.ts +14 -0
- package/src/lib/form/control/base-form-control.js +19 -0
- package/src/lib/form/control/base-form-control.js.map +1 -0
- package/src/lib/form/control/checkbox-form-control.d.ts +11 -0
- package/src/lib/form/control/checkbox-form-control.js +23 -0
- package/src/lib/form/control/checkbox-form-control.js.map +1 -0
- package/src/lib/form/control/form-control-kind.d.ts +8 -0
- package/src/lib/form/control/form-control-kind.js +13 -0
- package/src/lib/form/control/form-control-kind.js.map +1 -0
- package/src/lib/form/control/form-control.d.ts +18 -0
- package/src/lib/form/control/form-control.js +40 -0
- package/src/lib/form/control/form-control.js.map +1 -0
- package/src/lib/form/control/form-field-form-control.d.ts +33 -0
- package/src/lib/form/control/form-field-form-control.js +76 -0
- package/src/lib/form/control/form-field-form-control.js.map +1 -0
- package/src/lib/form/control/input-form-control.d.ts +14 -0
- package/src/lib/form/control/input-form-control.js +71 -0
- package/src/lib/form/control/input-form-control.js.map +1 -0
- package/src/lib/form/control/select-form-control.d.ts +18 -0
- package/src/lib/form/control/select-form-control.js +29 -0
- package/src/lib/form/control/select-form-control.js.map +1 -0
- package/src/lib/form/control/slide-toggle-form-control.d.ts +11 -0
- package/src/lib/form/control/slide-toggle-form-control.js +23 -0
- package/src/lib/form/control/slide-toggle-form-control.js.map +1 -0
- package/src/lib/form/control/table-select-form-control.d.ts +43 -0
- package/src/lib/form/control/table-select-form-control.js +69 -0
- package/src/lib/form/control/table-select-form-control.js.map +1 -0
- package/src/lib/form/control.d.ts +8 -0
- package/src/lib/form/control.js +38 -0
- package/src/lib/form/control.js.map +1 -0
- package/src/lib/form/generate-form-template.d.ts +5 -0
- package/src/lib/form/generate-form-template.js +12 -0
- package/src/lib/form/generate-form-template.js.map +1 -0
- package/src/lib/form/group/base-form-group.d.ts +17 -0
- package/src/lib/form/group/base-form-group.js +20 -0
- package/src/lib/form/group/base-form-group.js.map +1 -0
- package/src/lib/form/group/form-group-kind.d.ts +3 -0
- package/src/lib/form/group/form-group-kind.js +8 -0
- package/src/lib/form/group/form-group-kind.js.map +1 -0
- package/src/lib/form/group/form-group.d.ts +12 -0
- package/src/lib/form/group/form-group.js +18 -0
- package/src/lib/form/group/form-group.js.map +1 -0
- package/src/lib/load-handlebars-template.d.ts +4 -0
- package/src/lib/load-handlebars-template.js +28 -0
- package/src/lib/load-handlebars-template.js.map +1 -0
- package/src/lib/merge-with-column-list.js +3 -1
- package/src/lib/merge-with-column-list.js.map +1 -1
- package/src/lib/minimum-table-component-options.d.ts +12 -2
- package/src/lib/minimum-table-component-options.js +14 -17
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/minimum-table-options.d.ts +1 -1
- package/src/lib/minimum-table-options.js +2 -2
- package/src/lib/minimum-table-options.js.map +1 -1
- package/src/lib/pipe-option.d.ts +11 -0
- package/src/lib/pipe-option.js +75 -0
- package/src/lib/pipe-option.js.map +1 -0
- package/src/lib/table/table-filter-column-rule.d.ts +13 -0
- package/src/lib/table/table-filter-column-rule.js +88 -0
- package/src/lib/table/table-filter-column-rule.js.map +1 -0
- package/src/lib/table-column.d.ts +20 -9
- package/src/lib/table-column.js +133 -113
- package/src/lib/table-column.js.map +1 -1
- package/src/lib/table-options.d.ts +1 -1
- package/src/lib/tree-table-options.d.ts +1 -1
- package/src/lib/use-pick-from-table-interface-as-form-type.d.ts +10 -0
- package/src/lib/use-pick-from-table-interface-as-form-type.js +32 -0
- package/src/lib/use-pick-from-table-interface-as-form-type.js.map +1 -0
- package/src/lib/value-option.d.ts +12 -0
- package/src/lib/value-option.js +66 -0
- package/src/lib/value-option.js.map +1 -0
- package/src/schema.json +2626 -0
- package/src/schematic-input.schema.json +541 -0
- package/src/schematics/abstract-control.schema.json +78 -0
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.hbs +25 -0
- package/src/schematics/accordion/accordion-component/index.d.ts +5 -2
- package/src/schematics/accordion/accordion-component/index.js +56 -122
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-component/schema.d.ts +6 -0
- package/src/schematics/accordion/accordion-component/schema.json +321 -139
- package/src/schematics/accordion/accordion-component/template.schema.json +105 -0
- package/src/schematics/accordion/accordion-item-component/index.d.ts +9 -4
- package/src/schematics/accordion/accordion-item-component/index.js +112 -86
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-item-component/schema.d.ts +2 -2
- package/src/schematics/accordion/accordion-item-component/schema.json +282 -70
- package/src/schematics/accordion/accordion-item-component/template.schema.json +32 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.d.ts +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +35 -51
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.d.ts +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +963 -73
- package/src/schematics/accordion/item/accordion-item-data-grid-component/template.schema.json +31 -0
- package/src/schematics/accordion/item/accordion-item-switch-component/index.d.ts +1 -1
- package/src/schematics/accordion/item/accordion-item-switch-component/index.js +16 -8
- package/src/schematics/accordion/item/accordion-item-switch-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-switch-component/schema.d.ts +1 -1
- package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +321 -189
- package/src/schematics/accordion/item/accordion-item-switch-component/template.schema.json +81 -0
- package/src/schematics/accordion/item/accordion-item-table-component/index.d.ts +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +16 -19
- package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/schema.d.ts +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +1005 -293
- package/src/schematics/accordion/item/accordion-item-table-component/template.schema.json +43 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.d.ts +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +48 -84
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.d.ts +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +968 -273
- package/src/schematics/accordion/item/accordion-item-tree-table-component/template.schema.json +43 -0
- package/src/schematics/accordion/templates/accordion-header.hbs +6 -0
- package/src/schematics/accordion/templates/data-grid-accordion-item.hbs +15 -0
- package/src/schematics/accordion/templates/default-accordion-item.hbs +15 -0
- package/src/schematics/accordion/templates/switch-accordion-item.hbs +21 -0
- package/src/schematics/accordion/templates/table-accordion-item.hbs +15 -0
- package/src/schematics/accordion/templates/tree-table-accordion-item.hbs +15 -0
- package/src/schematics/accordion-identifier.schema.json +25 -0
- package/src/schematics/accordion-item.schema.json +59 -0
- package/src/schematics/angular.schema.json +11 -11
- package/src/schematics/backend.schema.json +13 -0
- package/src/schematics/base-form-array.schema.json +45 -0
- package/src/schematics/base-form-control.schema.json +27 -0
- package/src/schematics/base-form-group.schema.json +42 -0
- package/src/schematics/button.schema.json +30 -0
- package/src/schematics/checkbox-form-control.schema.json +30 -0
- package/src/schematics/control.schema.json +26 -0
- package/src/schematics/data-grid-component/files/component/__componentName__.component.html.hbs +35 -0
- package/src/schematics/data-grid-component/index.d.ts +2 -4
- package/src/schematics/data-grid-component/index.js +87 -52
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/schema.json +924 -131
- package/src/schematics/data-grid-component/template.schema.json +20 -0
- package/src/schematics/data-grid-component/templates/default-data-grid-item.hbs +3 -0
- package/src/schematics/data-grid-component/templates/link-data-grid-item.hbs +8 -0
- package/src/schematics/data-grid-item.schema.json +50 -0
- package/src/schematics/data-grid.schema.json +66 -0
- package/src/schematics/dialog-component/schema.json +141 -65
- package/src/schematics/dialog-component/template.schema.json +62 -0
- package/src/schematics/form/control/input-form-control/index.d.ts +2 -2
- package/src/schematics/form/control/input-form-control/index.js +4 -27
- package/src/schematics/form/control/input-form-control/index.js.map +1 -1
- package/src/schematics/form/control/input-form-control/schema.d.ts +2 -3
- package/src/schematics/form/control/input-form-control/schema.json +341 -94
- package/src/schematics/form/control/input-form-control/template.schema.json +33 -0
- package/src/schematics/form/control/select-form-control/index.d.ts +4 -2
- package/src/schematics/form/control/select-form-control/index.js +140 -97
- package/src/schematics/form/control/select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/select-form-control/schema.d.ts +2 -4
- package/src/schematics/form/control/select-form-control/schema.json +348 -81
- package/src/schematics/form/control/select-form-control/template.schema.json +33 -0
- package/src/schematics/form/control/table-select-form-control/index.d.ts +5 -7
- package/src/schematics/form/control/table-select-form-control/index.js +205 -143
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/schema.d.ts +2 -5
- package/src/schematics/form/control/table-select-form-control/schema.json +431 -84
- package/src/schematics/form/control/table-select-form-control/template.schema.json +39 -0
- package/src/schematics/form/form-array/index.d.ts +9 -0
- package/src/schematics/form/form-array/index.js +54 -0
- package/src/schematics/form/form-array/index.js.map +1 -0
- package/src/schematics/form/form-array/schema.d.ts +4 -0
- package/src/schematics/form/form-array/schema.json +823 -0
- package/src/schematics/form/form-array/template.schema.json +33 -0
- package/src/schematics/form/form-component/files/component/{__componentName__.component.html.template → __componentName__.component.html.hbs} +7 -4
- package/src/schematics/form/form-component/index.d.ts +4 -4
- package/src/schematics/form/form-component/index.js +22 -23
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-component/schema.d.ts +4 -2
- package/src/schematics/form/form-component/schema.json +841 -136
- package/src/schematics/form/form-component/template.schema.json +20 -0
- package/src/schematics/form/form-control/index.d.ts +6 -6
- package/src/schematics/form/form-control/index.js +23 -24
- package/src/schematics/form/form-control/index.js.map +1 -1
- package/src/schematics/form/form-control/schema.d.ts +2 -4
- package/src/schematics/form/form-control/schema.json +652 -67
- package/src/schematics/form/form-control/template.schema.json +33 -0
- package/src/schematics/form/form-definition/index.d.ts +2 -2
- package/src/schematics/form/form-definition/index.js +30 -4
- package/src/schematics/form/form-definition/index.js.map +1 -1
- package/src/schematics/form/form-definition/schema.d.ts +2 -2
- package/src/schematics/form/form-definition/schema.json +805 -118
- package/src/schematics/form/form-definition/template.schema.json +30 -0
- package/src/schematics/form/form-group/index.d.ts +9 -0
- package/src/schematics/form/form-group/index.js +54 -0
- package/src/schematics/form/form-group/index.js.map +1 -0
- package/src/schematics/form/form-group/schema.d.ts +4 -0
- package/src/schematics/form/form-group/schema.json +823 -0
- package/src/schematics/form/form-group/template.schema.json +33 -0
- package/src/schematics/form/templates/checkbox-form-control.hbs +9 -0
- package/src/schematics/form/templates/default-form-array.hbs +27 -0
- package/src/schematics/form/templates/default-form-control.hbs +2 -0
- package/src/schematics/form/templates/default-form-group.hbs +13 -0
- package/src/schematics/form/templates/input-form-control.hbs +9 -0
- package/src/schematics/form/templates/mat-form-field.hbs +31 -0
- package/src/schematics/form/templates/select-form-control.hbs +5 -0
- package/src/schematics/form/templates/slide-toggle-form-control.hbs +8 -0
- package/src/schematics/form/templates/table-select-form-control.hbs +18 -0
- package/src/schematics/form-array.schema.json +40 -0
- package/src/schematics/form-component.schema.json +45 -0
- package/src/schematics/form-control.schema.json +77 -0
- package/src/schematics/form-definition.schema.json +22 -0
- package/src/schematics/form-field.schema.json +24 -0
- package/src/schematics/form-group.schema.json +40 -0
- package/src/schematics/general.schema.json +1 -4
- package/src/schematics/header-button.schema.json +42 -0
- package/src/schematics/input-form-control.schema.json +59 -0
- package/src/schematics/minimum-table.schema.json +60 -0
- package/src/schematics/pipe.schema.json +38 -0
- package/src/schematics/property.schema.json +31 -0
- package/src/schematics/select-form-control.schema.json +68 -0
- package/src/schematics/slide-toggle-form-control.schema.json +30 -0
- package/src/schematics/table/action/dialog-table-action/schema.json +207 -123
- package/src/schematics/table/action/dialog-table-action/template.schema.json +58 -0
- package/src/schematics/table/action/form-table-action/index.d.ts +2 -2
- package/src/schematics/table/action/form-table-action/index.js +3 -4
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/schema.d.ts +2 -2
- package/src/schematics/table/action/form-table-action/schema.json +949 -139
- package/src/schematics/table/action/form-table-action/template.schema.json +75 -0
- package/src/schematics/table/action/navigation-table-action/schema.json +187 -80
- package/src/schematics/table/action/navigation-table-action/template.schema.json +28 -0
- package/src/schematics/table/action/open-api-table-action/schema.json +203 -94
- package/src/schematics/table/action/open-api-table-action/template.schema.json +56 -0
- package/src/schematics/table/action/operation-table-action/schema.json +174 -84
- package/src/schematics/table/action/operation-table-action/template.schema.json +14 -0
- package/src/schematics/table/header-button/form-table-header-button/index.d.ts +2 -2
- package/src/schematics/table/header-button/form-table-header-button/index.js +2 -2
- package/src/schematics/table/header-button/form-table-header-button/index.js.map +1 -1
- package/src/schematics/table/header-button/form-table-header-button/schema.d.ts +2 -2
- package/src/schematics/table/header-button/form-table-header-button/schema.json +910 -98
- package/src/schematics/table/header-button/form-table-header-button/template.schema.json +33 -0
- package/src/schematics/table/header-button/navigation-table-header-button/schema.json +167 -71
- package/src/schematics/table/header-button/navigation-table-header-button/template.schema.json +28 -0
- package/src/schematics/table/table-action/schema.json +165 -78
- package/src/schematics/table/table-action/template.schema.json +30 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.hbs +241 -0
- package/src/schematics/table/table-component/index.d.ts +2 -4
- package/src/schematics/table/table-component/index.js +14 -120
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-component/schema.json +898 -276
- package/src/schematics/table/table-component/template.schema.json +20 -0
- package/src/schematics/table/table-header-button/schema.json +145 -63
- package/src/schematics/table/table-header-button/template.schema.json +30 -0
- package/src/schematics/table/templates/boolean-table-column.hbs +10 -0
- package/src/schematics/table/templates/component-table-column.hbs +12 -0
- package/src/schematics/table/templates/copy-to-clipboard-table-column.hbs +10 -0
- package/src/schematics/table/templates/date-table-column.hbs +11 -0
- package/src/schematics/table/templates/default-table-column.hbs +8 -0
- package/src/schematics/table/templates/icon-table-column.hbs +10 -0
- package/src/schematics/table/templates/link-table-column.hbs +10 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +255 -0
- package/src/schematics/table/tree-table-component/index.d.ts +3 -0
- package/src/schematics/table/tree-table-component/index.js +28 -7
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/schema.json +889 -260
- package/src/schematics/table/tree-table-component/template.schema.json +20 -0
- package/src/schematics/table-action.schema.json +61 -0
- package/src/schematics/table-column.schema.json +75 -0
- package/src/schematics/table-select-form-control.schema.json +96 -0
- package/src/schematics/table.schema.json +57 -0
- package/src/schematics/templates/pipe.hbs +4 -0
- package/src/schematics/textarea-form-control.schema.json +32 -0
- package/src/schematics/tree-component/schema.json +115 -70
- package/src/schematics/tree-component/template.schema.json +36 -0
- package/src/schematics/tree-table.schema.json +40 -0
- package/src/schematics/type.schema.json +35 -0
- package/src/schematics/upstream.schema.json +56 -0
- package/src/schematics/value.schema.json +26 -0
- package/src/template.schema.json +212 -0
- package/src/lib/accordion-itme-types.d.ts +0 -8
- package/src/lib/accordion-itme-types.js +0 -16
- package/src/lib/accordion-itme-types.js.map +0 -1
- package/src/lib/form-component-control.d.ts +0 -12
- package/src/lib/form-component-control.js +0 -15
- package/src/lib/form-component-control.js.map +0 -1
- package/src/lib/form-definition-control.d.ts +0 -59
- package/src/lib/form-definition-control.js +0 -156
- package/src/lib/form-definition-control.js.map +0 -1
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.template +0 -94
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.html.template +0 -10
- package/src/schematics/data-grid-component/files/form/__componentName__.component.html.template +0 -42
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.html.template +0 -25
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +0 -299
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +0 -213
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "upstream",
|
|
4
|
+
"oneOf": [
|
|
5
|
+
{
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties":{
|
|
8
|
+
"kind": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": ["open-api"]
|
|
11
|
+
},
|
|
12
|
+
"operationId": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"scope": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"mapper": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"pageIndex": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"pageSize": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"sortBy": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"sortDirection": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"list": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"total": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"filter": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"eq": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"join": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": ["kind", "operationId"]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "value",
|
|
4
|
+
"oneOf": [
|
|
5
|
+
{
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"type": {
|
|
12
|
+
"$ref": "#/definitions/type"
|
|
13
|
+
},
|
|
14
|
+
"value": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["value"]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"definitions": {
|
|
22
|
+
"type": {
|
|
23
|
+
"$ref": "./type.schema.json"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "schematic-angular",
|
|
4
|
+
"oneOf": [
|
|
5
|
+
{
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"$ref": "#/definitions/schematicInput"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"$ref": "#/definitions/schematicInput"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"definitions": {
|
|
16
|
+
"tableComponentSchematic": {
|
|
17
|
+
"$ref": "schematics/table/table-component/template.schema.json"
|
|
18
|
+
},
|
|
19
|
+
"treeTableComponentSchematic": {
|
|
20
|
+
"$ref": "schematics/table/tree-table-component/template.schema.json"
|
|
21
|
+
},
|
|
22
|
+
"formComponentSchematic": {
|
|
23
|
+
"$ref": "schematics/form/form-component/template.schema.json"
|
|
24
|
+
},
|
|
25
|
+
"formDefinitionSchematic": {
|
|
26
|
+
"$ref": "schematics/form/form-definition/template.schema.json"
|
|
27
|
+
},
|
|
28
|
+
"tableActionSchematic": {
|
|
29
|
+
"$ref": "schematics/table/table-action/template.schema.json"
|
|
30
|
+
},
|
|
31
|
+
"tableHeaderButtonSchematic": {
|
|
32
|
+
"$ref": "schematics/table/table-header-button/template.schema.json"
|
|
33
|
+
},
|
|
34
|
+
"formTableHeaderButtonSchematic": {
|
|
35
|
+
"$ref": "schematics/table/header-button/form-table-header-button/template.schema.json"
|
|
36
|
+
},
|
|
37
|
+
"navigationTableHeaderButtonSchematic": {
|
|
38
|
+
"$ref": "schematics/table/header-button/navigation-table-header-button/template.schema.json"
|
|
39
|
+
},
|
|
40
|
+
"accordionComponentSchematic": {
|
|
41
|
+
"$ref": "schematics/accordion/accordion-component/template.schema.json"
|
|
42
|
+
},
|
|
43
|
+
"accordionItemComponentSchematic": {
|
|
44
|
+
"$ref": "schematics/accordion/accordion-item-component/template.schema.json"
|
|
45
|
+
},
|
|
46
|
+
"accordionItemTableComponentSchematic": {
|
|
47
|
+
"$ref": "schematics/accordion/item/accordion-item-table-component/template.schema.json"
|
|
48
|
+
},
|
|
49
|
+
"accordionItemSwitchComponentSchematic": {
|
|
50
|
+
"$ref": "schematics/accordion/item/accordion-item-switch-component/template.schema.json"
|
|
51
|
+
},
|
|
52
|
+
"dataGridComponentSchematic": {
|
|
53
|
+
"$ref": "schematics/data-grid-component/template.schema.json"
|
|
54
|
+
},
|
|
55
|
+
"dialogComponentSchematic": {
|
|
56
|
+
"$ref": "schematics/dialog-component/template.schema.json"
|
|
57
|
+
},
|
|
58
|
+
"inputFormControlSchematic": {
|
|
59
|
+
"$ref": "schematics/form/control/input-form-control/template.schema.json"
|
|
60
|
+
},
|
|
61
|
+
"selectFormControlSchematic": {
|
|
62
|
+
"$ref": "schematics/form/control/select-form-control/template.schema.json"
|
|
63
|
+
},
|
|
64
|
+
"tableSelectFormControlSchematic": {
|
|
65
|
+
"$ref": "schematics/form/control/table-select-form-control/template.schema.json"
|
|
66
|
+
},
|
|
67
|
+
"formControlSchematic": {
|
|
68
|
+
"$ref": "schematics/form/form-control/template.schema.json"
|
|
69
|
+
},
|
|
70
|
+
"formGroupSchematic": {
|
|
71
|
+
"$ref": "schematics/form/form-group/template.schema.json"
|
|
72
|
+
},
|
|
73
|
+
"formArraySchematic": {
|
|
74
|
+
"$ref": "schematics/form/form-array/template.schema.json"
|
|
75
|
+
},
|
|
76
|
+
"dialogTableActionSchematic": {
|
|
77
|
+
"$ref": "schematics/table/action/dialog-table-action/template.schema.json"
|
|
78
|
+
},
|
|
79
|
+
"formTableActionSchematic": {
|
|
80
|
+
"$ref": "schematics/table/action/form-table-action/template.schema.json"
|
|
81
|
+
},
|
|
82
|
+
"navigationTableActionSchematic": {
|
|
83
|
+
"$ref": "schematics/table/action/navigation-table-action/template.schema.json"
|
|
84
|
+
},
|
|
85
|
+
"operationTableActionSchematic": {
|
|
86
|
+
"$ref": "schematics/table/action/operation-table-action/template.schema.json"
|
|
87
|
+
},
|
|
88
|
+
"openApiTableActionSchematic": {
|
|
89
|
+
"$ref": "schematics/table/action/open-api-table-action/template.schema.json"
|
|
90
|
+
},
|
|
91
|
+
"treeComponentSchematic": {
|
|
92
|
+
"$ref": "schematics/tree-component/template.schema.json"
|
|
93
|
+
},
|
|
94
|
+
"accordionItemDataGridComponentSchematic": {
|
|
95
|
+
"$ref": "schematics/accordion/item/accordion-item-data-grid-component/template.schema.json"
|
|
96
|
+
},
|
|
97
|
+
"accordionItemTreeTableComponentSchematic": {
|
|
98
|
+
"$ref": "schematics/accordion/item/accordion-item-tree-table-component/template.schema.json"
|
|
99
|
+
},
|
|
100
|
+
"abstractControl": {
|
|
101
|
+
"$ref": "schematics/abstract-control.schema.json"
|
|
102
|
+
},
|
|
103
|
+
"accordionIdentifier": {
|
|
104
|
+
"$ref": "schematics/accordion-identifier.schema.json"
|
|
105
|
+
},
|
|
106
|
+
"accordionItem": {
|
|
107
|
+
"$ref": "schematics/accordion-item.schema.json"
|
|
108
|
+
},
|
|
109
|
+
"angular": {
|
|
110
|
+
"$ref": "schematics/angular.schema.json"
|
|
111
|
+
},
|
|
112
|
+
"backend": {
|
|
113
|
+
"$ref": "schematics/backend.schema.json"
|
|
114
|
+
},
|
|
115
|
+
"baseFormArray": {
|
|
116
|
+
"$ref": "schematics/base-form-array.schema.json"
|
|
117
|
+
},
|
|
118
|
+
"baseFormControl": {
|
|
119
|
+
"$ref": "schematics/base-form-control.schema.json"
|
|
120
|
+
},
|
|
121
|
+
"baseFormGroup": {
|
|
122
|
+
"$ref": "schematics/base-form-group.schema.json"
|
|
123
|
+
},
|
|
124
|
+
"button": {
|
|
125
|
+
"$ref": "schematics/button.schema.json"
|
|
126
|
+
},
|
|
127
|
+
"checkboxFormControl": {
|
|
128
|
+
"$ref": "schematics/checkbox-form-control.schema.json"
|
|
129
|
+
},
|
|
130
|
+
"control": {
|
|
131
|
+
"$ref": "schematics/control.schema.json"
|
|
132
|
+
},
|
|
133
|
+
"dataGridItem": {
|
|
134
|
+
"$ref": "schematics/data-grid-item.schema.json"
|
|
135
|
+
},
|
|
136
|
+
"dataGrid": {
|
|
137
|
+
"$ref": "schematics/data-grid.schema.json"
|
|
138
|
+
},
|
|
139
|
+
"formArray": {
|
|
140
|
+
"$ref": "schematics/form-array.schema.json"
|
|
141
|
+
},
|
|
142
|
+
"formComponent": {
|
|
143
|
+
"$ref": "schematics/form-component.schema.json"
|
|
144
|
+
},
|
|
145
|
+
"formControl": {
|
|
146
|
+
"$ref": "schematics/form-control.schema.json"
|
|
147
|
+
},
|
|
148
|
+
"formDefinition": {
|
|
149
|
+
"$ref": "schematics/form-definition.schema.json"
|
|
150
|
+
},
|
|
151
|
+
"formField": {
|
|
152
|
+
"$ref": "schematics/form-field.schema.json"
|
|
153
|
+
},
|
|
154
|
+
"formGroup": {
|
|
155
|
+
"$ref": "schematics/form-group.schema.json"
|
|
156
|
+
},
|
|
157
|
+
"general": {
|
|
158
|
+
"$ref": "schematics/general.schema.json"
|
|
159
|
+
},
|
|
160
|
+
"headerButton": {
|
|
161
|
+
"$ref": "schematics/header-button.schema.json"
|
|
162
|
+
},
|
|
163
|
+
"inputFormControl": {
|
|
164
|
+
"$ref": "schematics/input-form-control.schema.json"
|
|
165
|
+
},
|
|
166
|
+
"minimumTable": {
|
|
167
|
+
"$ref": "schematics/minimum-table.schema.json"
|
|
168
|
+
},
|
|
169
|
+
"pipe": {
|
|
170
|
+
"$ref": "schematics/pipe.schema.json"
|
|
171
|
+
},
|
|
172
|
+
"property": {
|
|
173
|
+
"$ref": "schematics/property.schema.json"
|
|
174
|
+
},
|
|
175
|
+
"selectFormControl": {
|
|
176
|
+
"$ref": "schematics/select-form-control.schema.json"
|
|
177
|
+
},
|
|
178
|
+
"slideToggleFormControl": {
|
|
179
|
+
"$ref": "schematics/slide-toggle-form-control.schema.json"
|
|
180
|
+
},
|
|
181
|
+
"tableAction": {
|
|
182
|
+
"$ref": "schematics/table-action.schema.json"
|
|
183
|
+
},
|
|
184
|
+
"tableColumn": {
|
|
185
|
+
"$ref": "schematics/table-column.schema.json"
|
|
186
|
+
},
|
|
187
|
+
"tableSelectFormControl": {
|
|
188
|
+
"$ref": "schematics/table-select-form-control.schema.json"
|
|
189
|
+
},
|
|
190
|
+
"table": {
|
|
191
|
+
"$ref": "schematics/table.schema.json"
|
|
192
|
+
},
|
|
193
|
+
"textareaFormControl": {
|
|
194
|
+
"$ref": "schematics/textarea-form-control.schema.json"
|
|
195
|
+
},
|
|
196
|
+
"treeTable": {
|
|
197
|
+
"$ref": "schematics/tree-table.schema.json"
|
|
198
|
+
},
|
|
199
|
+
"type": {
|
|
200
|
+
"$ref": "schematics/type.schema.json"
|
|
201
|
+
},
|
|
202
|
+
"upstream": {
|
|
203
|
+
"$ref": "schematics/upstream.schema.json"
|
|
204
|
+
},
|
|
205
|
+
"value": {
|
|
206
|
+
"$ref": "schematics/value.schema.json"
|
|
207
|
+
},
|
|
208
|
+
"schematicInput": {
|
|
209
|
+
"$ref": "./schematic-input.schema.json"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IsAccordionItemType = exports.AccordionItemTypes = void 0;
|
|
4
|
-
var AccordionItemTypes;
|
|
5
|
-
(function (AccordionItemTypes) {
|
|
6
|
-
AccordionItemTypes["Panel"] = "panel";
|
|
7
|
-
AccordionItemTypes["Table"] = "table";
|
|
8
|
-
AccordionItemTypes["DataGrid"] = "data-grid";
|
|
9
|
-
AccordionItemTypes["TreeTable"] = "tree-table";
|
|
10
|
-
AccordionItemTypes["Switch"] = "switch";
|
|
11
|
-
})(AccordionItemTypes || (exports.AccordionItemTypes = AccordionItemTypes = {}));
|
|
12
|
-
function IsAccordionItemType(type) {
|
|
13
|
-
return Object.values(AccordionItemTypes).includes(type);
|
|
14
|
-
}
|
|
15
|
-
exports.IsAccordionItemType = IsAccordionItemType;
|
|
16
|
-
//# sourceMappingURL=accordion-itme-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-itme-types.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/accordion-itme-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,qCAAe,CAAA;IACf,4CAAsB,CAAA;IACtB,8CAAwB,CAAA;IACxB,uCAAiB,CAAA;AACnB,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAQ,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC;AAFD,kDAEC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Normalized } from '@rxap/utilities';
|
|
2
|
-
import { BaseFormControlTemplate, FormDefinitionControl, NormalizedFormDefinitionControl } from './form-definition-control';
|
|
3
|
-
import { NormalizedTypeImport } from '@rxap/ts-morph';
|
|
4
|
-
export interface FormComponentControl extends FormDefinitionControl {
|
|
5
|
-
}
|
|
6
|
-
export interface NormalizedFormComponentControl extends Readonly<Normalized<FormComponentControl>>, NormalizedFormDefinitionControl {
|
|
7
|
-
type: NormalizedTypeImport;
|
|
8
|
-
template: BaseFormControlTemplate;
|
|
9
|
-
importList: NormalizedTypeImport[];
|
|
10
|
-
}
|
|
11
|
-
export declare function NormalizeFormComponentControl(control: FormComponentControl): NormalizedFormComponentControl;
|
|
12
|
-
export declare function NormalizeFormComponentControlList(controlList?: Array<FormComponentControl>): ReadonlyArray<NormalizedFormComponentControl>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NormalizeFormComponentControlList = exports.NormalizeFormComponentControl = void 0;
|
|
4
|
-
const form_definition_control_1 = require("./form-definition-control");
|
|
5
|
-
function NormalizeFormComponentControl(control) {
|
|
6
|
-
const normalizedControl = (0, form_definition_control_1.NormalizeFormDefinitionControl)(control);
|
|
7
|
-
return Object.freeze(Object.assign({}, normalizedControl));
|
|
8
|
-
}
|
|
9
|
-
exports.NormalizeFormComponentControl = NormalizeFormComponentControl;
|
|
10
|
-
function NormalizeFormComponentControlList(controlList) {
|
|
11
|
-
var _a;
|
|
12
|
-
return Object.freeze((_a = controlList === null || controlList === void 0 ? void 0 : controlList.map(NormalizeFormComponentControl)) !== null && _a !== void 0 ? _a : []);
|
|
13
|
-
}
|
|
14
|
-
exports.NormalizeFormComponentControlList = NormalizeFormComponentControlList;
|
|
15
|
-
//# sourceMappingURL=form-component-control.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-component-control.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/form-component-control.ts"],"names":[],"mappings":";;;AACA,uEAKmC;AAgBnC,SAAgB,6BAA6B,CAC3C,OAA6B;IAE7B,MAAM,iBAAiB,GAAG,IAAA,wDAA8B,EAAC,OAAO,CAAC,CAAC;IAClE,OAAO,MAAM,CAAC,MAAM,mBACf,iBAAiB,EACpB,CAAC;AACL,CAAC;AAPD,sEAOC;AAED,SAAgB,iCAAiC,CAC/C,WAAyC;;IAEzC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,GAAG,CAAC,6BAA6B,CAAC,mCAAI,EAAE,CAAC,CAAC;AAC9E,CAAC;AAJD,8EAIC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { TypeImport } from '@rxap/ts-morph';
|
|
2
|
-
import { ControlOption, Normalized } from '@rxap/utilities';
|
|
3
|
-
import { BackendTypes } from './backend-types';
|
|
4
|
-
import { NormalizedTypeImport } from '@rxap/ts-morph';
|
|
5
|
-
export declare enum FormControlTemplateType {
|
|
6
|
-
DEFAULT = "default",
|
|
7
|
-
INPUT = "input",
|
|
8
|
-
SELECT = "select"
|
|
9
|
-
}
|
|
10
|
-
export interface BaseFormControlTemplate {
|
|
11
|
-
name: FormControlTemplateType;
|
|
12
|
-
}
|
|
13
|
-
export interface MinimalNormalizedFormDefinitionControl {
|
|
14
|
-
type: TypeImport;
|
|
15
|
-
validatorList: string[];
|
|
16
|
-
importList: TypeImport[];
|
|
17
|
-
}
|
|
18
|
-
export interface InputFormControlTemplate extends BaseFormControlTemplate {
|
|
19
|
-
type?: string;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
label?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface NormalizedInputFormControlTemplate extends Readonly<Normalized<InputFormControlTemplate>>, BaseFormControlTemplate {
|
|
24
|
-
name: FormControlTemplateType.INPUT;
|
|
25
|
-
}
|
|
26
|
-
export declare function IsNormalizedInputFormControlTemplate(template: BaseFormControlTemplate): template is NormalizedInputFormControlTemplate;
|
|
27
|
-
export declare function NormalizeInputFormControlTemplate(template: InputFormControlTemplate, normalizedControl: MinimalNormalizedFormDefinitionControl): NormalizedInputFormControlTemplate;
|
|
28
|
-
export interface SelectFormControlTemplate extends BaseFormControlTemplate {
|
|
29
|
-
label?: string;
|
|
30
|
-
options?: ControlOption[];
|
|
31
|
-
backend?: BackendTypes;
|
|
32
|
-
}
|
|
33
|
-
export interface NormalizedSelectFormControlTemplate extends Readonly<Normalized<Omit<SelectFormControlTemplate, 'options'>>>, BaseFormControlTemplate {
|
|
34
|
-
name: FormControlTemplateType.SELECT;
|
|
35
|
-
options: ReadonlyArray<ControlOption> | null;
|
|
36
|
-
backend: BackendTypes;
|
|
37
|
-
}
|
|
38
|
-
export declare function IsNormalizedSelectFormControlTemplate(template: BaseFormControlTemplate): template is NormalizedSelectFormControlTemplate;
|
|
39
|
-
export declare function NormalizeSelectFormControlTemplate(template: SelectFormControlTemplate, normalizedControl: MinimalNormalizedFormDefinitionControl): NormalizedSelectFormControlTemplate;
|
|
40
|
-
export interface FormDefinitionControl {
|
|
41
|
-
name: string;
|
|
42
|
-
type?: string | TypeImport;
|
|
43
|
-
isArray?: boolean;
|
|
44
|
-
state?: string;
|
|
45
|
-
isRequired?: boolean;
|
|
46
|
-
isReadonly?: boolean;
|
|
47
|
-
isDisabled?: boolean;
|
|
48
|
-
validatorList?: string[];
|
|
49
|
-
importList?: TypeImport[];
|
|
50
|
-
template?: BaseFormControlTemplate;
|
|
51
|
-
}
|
|
52
|
-
export interface NormalizedFormDefinitionControl extends Readonly<Normalized<FormDefinitionControl>> {
|
|
53
|
-
type: NormalizedTypeImport;
|
|
54
|
-
template: BaseFormControlTemplate;
|
|
55
|
-
importList: NormalizedTypeImport[];
|
|
56
|
-
}
|
|
57
|
-
export declare function NormalizeFormControlTemplate(minimalNormalizedControl: MinimalNormalizedFormDefinitionControl, template?: BaseFormControlTemplate): BaseFormControlTemplate;
|
|
58
|
-
export declare function NormalizeFormDefinitionControl(control: FormDefinitionControl): NormalizedFormDefinitionControl;
|
|
59
|
-
export declare function NormalizeFormDefinitionControlList(controlList?: Array<FormDefinitionControl>): ReadonlyArray<NormalizedFormDefinitionControl>;
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NormalizeFormDefinitionControlList = exports.NormalizeFormDefinitionControl = exports.NormalizeFormControlTemplate = exports.NormalizeSelectFormControlTemplate = exports.IsNormalizedSelectFormControlTemplate = exports.NormalizeInputFormControlTemplate = exports.IsNormalizedInputFormControlTemplate = exports.FormControlTemplateType = void 0;
|
|
4
|
-
const utilities_1 = require("@rxap/utilities");
|
|
5
|
-
const backend_types_1 = require("./backend-types");
|
|
6
|
-
const ts_morph_1 = require("@rxap/ts-morph");
|
|
7
|
-
var FormControlTemplateType;
|
|
8
|
-
(function (FormControlTemplateType) {
|
|
9
|
-
FormControlTemplateType["DEFAULT"] = "default";
|
|
10
|
-
FormControlTemplateType["INPUT"] = "input";
|
|
11
|
-
FormControlTemplateType["SELECT"] = "select";
|
|
12
|
-
})(FormControlTemplateType || (exports.FormControlTemplateType = FormControlTemplateType = {}));
|
|
13
|
-
function IsNormalizedInputFormControlTemplate(template) {
|
|
14
|
-
return template.name === FormControlTemplateType.INPUT;
|
|
15
|
-
}
|
|
16
|
-
exports.IsNormalizedInputFormControlTemplate = IsNormalizedInputFormControlTemplate;
|
|
17
|
-
function NormalizeInputFormControlTemplate(template, normalizedControl) {
|
|
18
|
-
var _a, _b, _c;
|
|
19
|
-
normalizedControl.importList.push({
|
|
20
|
-
name: 'MatInputModule',
|
|
21
|
-
moduleSpecifier: '@angular/material/input',
|
|
22
|
-
});
|
|
23
|
-
const type = (_a = template.type) !== null && _a !== void 0 ? _a : 'text';
|
|
24
|
-
switch (type) {
|
|
25
|
-
case 'checkbox':
|
|
26
|
-
normalizedControl.type.name = 'boolean';
|
|
27
|
-
break;
|
|
28
|
-
case 'text':
|
|
29
|
-
case 'password':
|
|
30
|
-
case 'color':
|
|
31
|
-
normalizedControl.type.name = 'string';
|
|
32
|
-
break;
|
|
33
|
-
case 'email':
|
|
34
|
-
normalizedControl.type.name = 'string';
|
|
35
|
-
(0, utilities_1.CoerceArrayItems)(normalizedControl.validatorList, ['IsEmail()']);
|
|
36
|
-
break;
|
|
37
|
-
case 'tel':
|
|
38
|
-
normalizedControl.type.name = 'string';
|
|
39
|
-
(0, utilities_1.CoerceArrayItems)(normalizedControl.validatorList, ['IsTel()']);
|
|
40
|
-
break;
|
|
41
|
-
case 'url':
|
|
42
|
-
normalizedControl.type.name = 'string';
|
|
43
|
-
(0, utilities_1.CoerceArrayItems)(normalizedControl.validatorList, ['IsUrl()']);
|
|
44
|
-
break;
|
|
45
|
-
case 'number':
|
|
46
|
-
normalizedControl.type.name = 'number';
|
|
47
|
-
break;
|
|
48
|
-
case 'date':
|
|
49
|
-
case 'time':
|
|
50
|
-
case 'datetime-local':
|
|
51
|
-
normalizedControl.type.name = 'Date';
|
|
52
|
-
(0, utilities_1.CoerceArrayItems)(normalizedControl.validatorList, ['IsDate()']);
|
|
53
|
-
break;
|
|
54
|
-
case 'file':
|
|
55
|
-
case 'hidden':
|
|
56
|
-
case 'image':
|
|
57
|
-
case 'month':
|
|
58
|
-
case 'radio':
|
|
59
|
-
case 'reset':
|
|
60
|
-
case 'button':
|
|
61
|
-
case 'search':
|
|
62
|
-
case 'submit':
|
|
63
|
-
case 'week':
|
|
64
|
-
case 'range':
|
|
65
|
-
throw new Error(`The input type "${type}" is not yet supported`);
|
|
66
|
-
}
|
|
67
|
-
// TODO : auto add validators
|
|
68
|
-
return Object.freeze({
|
|
69
|
-
name: FormControlTemplateType.INPUT,
|
|
70
|
-
type,
|
|
71
|
-
placeholder: (_b = template.placeholder) !== null && _b !== void 0 ? _b : null,
|
|
72
|
-
label: (_c = template.label) !== null && _c !== void 0 ? _c : null,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
exports.NormalizeInputFormControlTemplate = NormalizeInputFormControlTemplate;
|
|
76
|
-
function IsNormalizedSelectFormControlTemplate(template) {
|
|
77
|
-
return template.name === FormControlTemplateType.SELECT;
|
|
78
|
-
}
|
|
79
|
-
exports.IsNormalizedSelectFormControlTemplate = IsNormalizedSelectFormControlTemplate;
|
|
80
|
-
function NormalizeSelectFormControlTemplate(template, normalizedControl) {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
normalizedControl.importList.push({
|
|
83
|
-
name: 'MatSelectModule',
|
|
84
|
-
moduleSpecifier: '@angular/material/select',
|
|
85
|
-
});
|
|
86
|
-
return Object.freeze({
|
|
87
|
-
name: FormControlTemplateType.SELECT,
|
|
88
|
-
label: (_a = template.label) !== null && _a !== void 0 ? _a : null,
|
|
89
|
-
options: template.options ? Object.freeze(template.options) : null,
|
|
90
|
-
backend: (_b = template.backend) !== null && _b !== void 0 ? _b : backend_types_1.BackendTypes.LOCAL,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
exports.NormalizeSelectFormControlTemplate = NormalizeSelectFormControlTemplate;
|
|
94
|
-
function NormalizeFormControlTemplate(minimalNormalizedControl, template) {
|
|
95
|
-
if (!template) {
|
|
96
|
-
return Object.freeze({
|
|
97
|
-
name: FormControlTemplateType.DEFAULT,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
switch (template.name) {
|
|
101
|
-
case FormControlTemplateType.INPUT:
|
|
102
|
-
return NormalizeInputFormControlTemplate(template, minimalNormalizedControl);
|
|
103
|
-
case FormControlTemplateType.SELECT:
|
|
104
|
-
return NormalizeSelectFormControlTemplate(template, minimalNormalizedControl);
|
|
105
|
-
case FormControlTemplateType.DEFAULT:
|
|
106
|
-
default:
|
|
107
|
-
return Object.freeze({
|
|
108
|
-
name: FormControlTemplateType.DEFAULT,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
exports.NormalizeFormControlTemplate = NormalizeFormControlTemplate;
|
|
113
|
-
function NormalizeFormDefinitionControl(control) {
|
|
114
|
-
var _a, _b, _c, _d, _e, _f;
|
|
115
|
-
const name = control.name;
|
|
116
|
-
const type = (0, ts_morph_1.NormalizeTypeImport)(control.type);
|
|
117
|
-
const state = (_a = control.state) !== null && _a !== void 0 ? _a : null;
|
|
118
|
-
const isRequired = (_b = control.isRequired) !== null && _b !== void 0 ? _b : false;
|
|
119
|
-
const validatorList = (_c = control.validatorList) !== null && _c !== void 0 ? _c : [];
|
|
120
|
-
const importList = ((_d = control.importList) !== null && _d !== void 0 ? _d : []);
|
|
121
|
-
const isReadonly = (_e = control.isReadonly) !== null && _e !== void 0 ? _e : false;
|
|
122
|
-
const isDisabled = (_f = control.isDisabled) !== null && _f !== void 0 ? _f : false;
|
|
123
|
-
let isArray = false;
|
|
124
|
-
if (type.name.endsWith('[]')) {
|
|
125
|
-
isArray = true;
|
|
126
|
-
type.name = type.name.slice(0, -2);
|
|
127
|
-
}
|
|
128
|
-
if (type.name.startsWith('Array<') && type.name.endsWith('>')) {
|
|
129
|
-
isArray = true;
|
|
130
|
-
type.name = type.name.slice(6, -1);
|
|
131
|
-
}
|
|
132
|
-
const template = NormalizeFormControlTemplate({
|
|
133
|
-
validatorList,
|
|
134
|
-
importList,
|
|
135
|
-
type,
|
|
136
|
-
}, control.template);
|
|
137
|
-
return Object.freeze({
|
|
138
|
-
name,
|
|
139
|
-
type,
|
|
140
|
-
isArray,
|
|
141
|
-
isRequired,
|
|
142
|
-
state,
|
|
143
|
-
isReadonly,
|
|
144
|
-
isDisabled,
|
|
145
|
-
validatorList,
|
|
146
|
-
importList: importList.map(ts_morph_1.NormalizeTypeImport),
|
|
147
|
-
template,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
exports.NormalizeFormDefinitionControl = NormalizeFormDefinitionControl;
|
|
151
|
-
function NormalizeFormDefinitionControlList(controlList) {
|
|
152
|
-
var _a;
|
|
153
|
-
return Object.freeze((_a = controlList === null || controlList === void 0 ? void 0 : controlList.map(NormalizeFormDefinitionControl)) !== null && _a !== void 0 ? _a : []);
|
|
154
|
-
}
|
|
155
|
-
exports.NormalizeFormDefinitionControlList = NormalizeFormDefinitionControlList;
|
|
156
|
-
//# sourceMappingURL=form-definition-control.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-definition-control.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/form-definition-control.ts"],"names":[],"mappings":";;;AACA,+CAIyB;AACzB,mDAA+C;AAC/C,6CAGwB;AAExB,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,0CAAe,CAAA;IACf,4CAAiB,CAAA;AACnB,CAAC,EAJW,uBAAuB,uCAAvB,uBAAuB,QAIlC;AAyBD,SAAgB,oCAAoC,CAAC,QAAiC;IACpF,OAAO,QAAQ,CAAC,IAAI,KAAK,uBAAuB,CAAC,KAAK,CAAC;AACzD,CAAC;AAFD,oFAEC;AAED,SAAgB,iCAAiC,CAC/C,QAAkC,EAClC,iBAAyD;;IAEzD,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC;QAChC,IAAI,EAAE,gBAAgB;QACtB,eAAe,EAAE,yBAAyB;KAC3C,CAAC,CAAC;IACH,MAAM,IAAI,GAAW,MAAA,QAAQ,CAAC,IAAI,mCAAI,MAAM,CAAC;IAC7C,QAAQ,IAAI,EAAE;QACZ,KAAK,UAAU;YACb,iBAAiB,CAAC,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;YACxC,MAAM;QACR,KAAK,MAAM,CAAC;QACZ,KAAK,UAAU,CAAC;QAChB,KAAK,OAAO;YACV,iBAAiB,CAAC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;YACvC,MAAM;QACR,KAAK,OAAO;YACV,iBAAiB,CAAC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;YACvC,IAAA,4BAAgB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