@rxap/schematic-angular 16.2.0-dev.6 → 16.2.0-dev.61
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 +417 -0
- package/README.md +1 -1
- package/collection.json +20 -0
- package/package.json +19 -18
- package/src/lib/accordion-header.d.ts +5 -0
- package/src/lib/accordion-header.js +14 -5
- package/src/lib/accordion-header.js.map +1 -1
- package/src/lib/accordion-identifier.d.ts +8 -4
- package/src/lib/accordion-identifier.js +4 -3
- package/src/lib/accordion-identifier.js.map +1 -1
- package/src/lib/accordion-item.d.ts +25 -17
- package/src/lib/accordion-item.js +81 -42
- 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/angular-options.d.ts +2 -2
- package/src/lib/angular-options.js.map +1 -1
- package/src/lib/coerce-accordion-component.js +6 -4
- 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 +18 -2
- package/src/lib/coerce-form-component.js.map +1 -1
- package/src/lib/coerce-minimum-table-component.js +21 -7
- package/src/lib/coerce-minimum-table-component.js.map +1 -1
- package/src/lib/coerce-tree-table-component.js +1 -3
- package/src/lib/coerce-tree-table-component.js.map +1 -1
- package/src/lib/component-options.d.ts +10 -0
- package/src/lib/component-options.js +14 -0
- package/src/lib/component-options.js.map +1 -0
- package/src/lib/css-class.d.ts +9 -0
- package/src/lib/css-class.js +52 -0
- package/src/lib/css-class.js.map +1 -0
- package/src/lib/data-grid-item.d.ts +46 -11
- package/src/lib/data-grid-item.js +102 -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 +44 -13
- package/src/lib/data-grid-options.js.map +1 -1
- package/src/lib/form/abstract-control.d.ts +31 -0
- package/src/lib/form/abstract-control.js +48 -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 +41 -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/autocomplete-table-select-form-control.d.ts +9 -0
- package/src/lib/form/control/autocomplete-table-select-form-control.js +58 -0
- package/src/lib/form/control/autocomplete-table-select-form-control.js.map +1 -0
- package/src/lib/form/control/base-form-control.d.ts +15 -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 +10 -0
- package/src/lib/form/control/form-control-kind.js +15 -0
- package/src/lib/form/control/form-control-kind.js.map +1 -0
- package/src/lib/form/control/form-control.d.ts +20 -0
- package/src/lib/form/control/form-control.js +46 -0
- package/src/lib/form/control/form-control.js.map +1 -0
- package/src/lib/form/control/form-field-form-control.d.ts +39 -0
- package/src/lib/form/control/form-field-form-control.js +87 -0
- package/src/lib/form/control/form-field-form-control.js.map +1 -0
- package/src/lib/form/control/input-form-control.d.ts +15 -0
- package/src/lib/form/control/input-form-control.js +75 -0
- package/src/lib/form/control/input-form-control.js.map +1 -0
- package/src/lib/form/control/select-form-control.d.ts +22 -0
- package/src/lib/form/control/select-form-control.js +47 -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 +46 -0
- package/src/lib/form/control/table-select-form-control.js +82 -0
- package/src/lib/form/control/table-select-form-control.js.map +1 -0
- package/src/lib/form/control/textarea-form-control.d.ts +22 -0
- package/src/lib/form/control/textarea-form-control.js +52 -0
- package/src/lib/form/control/textarea-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 +6 -0
- package/src/lib/load-handlebars-template.js +36 -0
- package/src/lib/load-handlebars-template.js.map +1 -0
- package/src/lib/minimum-table-component-options.d.ts +2 -2
- package/src/lib/minimum-table-component-options.js +22 -15
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/minimum-table-options.d.ts +22 -4
- package/src/lib/minimum-table-options.js +40 -6
- 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/route-component.d.ts +16 -0
- package/src/lib/route-component.js +15 -0
- package/src/lib/route-component.js.map +1 -0
- package/src/lib/table/column/base-table-column.d.ts +61 -0
- package/src/lib/table/column/base-table-column.js +309 -0
- package/src/lib/table/column/base-table-column.js.map +1 -0
- package/src/lib/table/column/boolean-table-column.d.ts +8 -0
- package/src/lib/table/column/boolean-table-column.js +10 -0
- package/src/lib/table/column/boolean-table-column.js.map +1 -0
- package/src/lib/table/column/custom-table-column.d.ts +11 -0
- package/src/lib/table/column/custom-table-column.js +11 -0
- package/src/lib/table/column/custom-table-column.js.map +1 -0
- package/src/lib/table/column/date-table-column.d.ts +11 -0
- package/src/lib/table/column/date-table-column.js +11 -0
- package/src/lib/table/column/date-table-column.js.map +1 -0
- package/src/lib/table/sortable.d.ts +16 -0
- package/src/lib/table/sortable.js +27 -0
- package/src/lib/table/sortable.js.map +1 -0
- package/src/lib/table/table-column-kind.d.ts +13 -0
- package/src/lib/table/table-column-kind.js +21 -0
- package/src/lib/table/table-column-kind.js.map +1 -0
- package/src/lib/table/table-column-modifier.d.ts +12 -0
- package/src/lib/table/table-column-modifier.js +20 -0
- package/src/lib/table/table-column-modifier.js.map +1 -0
- package/src/lib/table/table-column-pipe.d.ts +4 -0
- package/src/lib/table/table-column-pipe.js +3 -0
- package/src/lib/table/table-column-pipe.js.map +1 -0
- package/src/lib/table/table-column-sticky.d.ts +5 -0
- package/src/lib/table/table-column-sticky.js +13 -0
- package/src/lib/table/table-column-sticky.js.map +1 -0
- package/src/lib/table/table-column.d.ts +6 -0
- package/src/lib/table/table-column.js +36 -0
- package/src/lib/table/table-column.js.map +1 -0
- package/src/lib/table/table-filter-column-rule.js +5 -4
- package/src/lib/table/table-filter-column-rule.js.map +1 -1
- package/src/lib/table-action.js.map +1 -1
- package/src/lib/table-options.d.ts +4 -3
- package/src/lib/table-options.js +23 -3
- package/src/lib/table-options.js.map +1 -1
- package/src/lib/table-row-action.d.ts +4 -2
- package/src/lib/table-row-action.js +8 -7
- package/src/lib/table-row-action.js.map +1 -1
- package/src/lib/tree-table-options.d.ts +4 -3
- package/src/lib/tree-table-options.js +40 -3
- package/src/lib/tree-table-options.js.map +1 -1
- package/src/lib/use-pick-from-table-interface-as-form-type.d.ts +1 -1
- 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 +3320 -0
- package/src/schematic-input.schema.json +579 -0
- package/src/schematics/abstract-control.schema.json +78 -0
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.hbs +34 -0
- package/src/schematics/accordion/accordion-component/index.d.ts +6 -2
- package/src/schematics/accordion/accordion-component/index.js +77 -139
- 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 +2007 -122
- 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 +115 -87
- 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 +1976 -61
- 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 +32 -62
- 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 +1190 -71
- package/src/schematics/accordion/item/accordion-item-data-grid-component/template.schema.json +20 -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 +1947 -178
- package/src/schematics/accordion/item/accordion-item-switch-component/template.schema.json +20 -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 +9 -56
- 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 +1497 -291
- package/src/schematics/accordion/item/accordion-item-table-component/template.schema.json +20 -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 +25 -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 +1450 -256
- package/src/schematics/accordion/item/accordion-item-tree-table-component/template.schema.json +20 -0
- package/src/schematics/accordion/templates/accordion-header.hbs +10 -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 +29 -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 +24 -0
- package/src/schematics/accordion-item.schema.json +52 -0
- package/src/schematics/angular.schema.json +11 -11
- package/src/schematics/autocomplete-table-select-form-control.schema.json +97 -0
- package/src/schematics/backend.schema.json +13 -0
- package/src/schematics/base-accordion-item.schema.json +52 -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/base-table-column.schema.json +81 -0
- package/src/schematics/boolean-table-column.schema.json +24 -0
- package/src/schematics/button.schema.json +30 -0
- package/src/schematics/checkbox-form-control.schema.json +31 -0
- package/src/schematics/component-table-column.schema.json +24 -0
- package/src/schematics/component.schema.json +16 -0
- package/src/schematics/control.schema.json +26 -0
- package/src/schematics/copy-to-clipboard-table-column.schema.json +24 -0
- package/src/schematics/css-class.schema.json +34 -0
- package/src/schematics/custom-table-column.schema.json +27 -0
- package/src/schematics/data-grid-accordion-item.schema.json +35 -0
- package/src/schematics/data-grid-component/files/component/__componentName__.component.html.hbs +41 -0
- package/src/schematics/data-grid-component/index.d.ts +2 -4
- package/src/schematics/data-grid-component/index.js +105 -68
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/schema.json +1135 -127
- 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/date-table-column.schema.json +27 -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/autocomplete-table-select-form-control/index.d.ts +10 -0
- package/src/schematics/form/control/autocomplete-table-select-form-control/index.js +286 -0
- package/src/schematics/form/control/autocomplete-table-select-form-control/index.js.map +1 -0
- package/src/schematics/form/control/autocomplete-table-select-form-control/schema.d.ts +4 -0
- package/src/schematics/form/control/autocomplete-table-select-form-control/schema.json +542 -0
- package/src/schematics/form/control/autocomplete-table-select-form-control/template.schema.json +39 -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 +387 -93
- 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 +141 -98
- 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 +497 -79
- 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 +210 -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 +539 -83
- 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 +1056 -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 +23 -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 +1054 -134
- 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 +25 -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 +877 -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 +1035 -115
- 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 +1056 -0
- package/src/schematics/form/form-group/template.schema.json +33 -0
- package/src/schematics/form/templates/autocomplete-table-select-form-control.hbs +34 -0
- package/src/schematics/form/templates/checkbox-form-control.hbs +11 -0
- package/src/schematics/form/templates/default-form-array.hbs +29 -0
- package/src/schematics/form/templates/default-form-control.hbs +2 -0
- package/src/schematics/form/templates/default-form-group.hbs +15 -0
- package/src/schematics/form/templates/input-form-control.hbs +16 -0
- package/src/schematics/form/templates/mat-form-field.hbs +31 -0
- package/src/schematics/form/templates/select-form-control.hbs +18 -0
- package/src/schematics/form/templates/slide-toggle-form-control.hbs +10 -0
- package/src/schematics/form/templates/table-select-form-control.hbs +25 -0
- package/src/schematics/form/templates/textarea-form-control.hbs +25 -0
- package/src/schematics/form-array.schema.json +42 -0
- package/src/schematics/form-component.schema.json +45 -0
- package/src/schematics/form-control.schema.json +84 -0
- package/src/schematics/form-definition.schema.json +22 -0
- package/src/schematics/form-field.schema.json +30 -0
- package/src/schematics/form-group.schema.json +42 -0
- package/src/schematics/general.schema.json +1 -4
- package/src/schematics/header-button.schema.json +42 -0
- package/src/schematics/icon-table-column.schema.json +24 -0
- package/src/schematics/input-form-control.schema.json +60 -0
- package/src/schematics/link-table-column.schema.json +24 -0
- package/src/schematics/minimum-table.schema.json +109 -0
- package/src/schematics/pipe.schema.json +38 -0
- package/src/schematics/property.schema.json +38 -0
- package/src/schematics/route-component/files/component/__componentName__.component.html.hbs +1 -0
- package/src/schematics/route-component/index.d.ts +8 -0
- package/src/schematics/route-component/index.js +109 -0
- package/src/schematics/route-component/index.js.map +1 -0
- package/src/schematics/route-component/schema.d.ts +5 -0
- package/src/schematics/route-component/schema.json +154 -0
- package/src/schematics/route-component/template.schema.json +20 -0
- package/src/schematics/route-component.schema.json +35 -0
- package/src/schematics/select-form-control.schema.json +75 -0
- package/src/schematics/slide-toggle-form-control.schema.json +31 -0
- package/src/schematics/spinner-table-column.schema.json +24 -0
- package/src/schematics/switch-accordion-item.schema.json +83 -0
- package/src/schematics/table/action/dialog-table-action/index.js +1 -0
- package/src/schematics/table/action/dialog-table-action/index.js.map +1 -1
- package/src/schematics/table/action/dialog-table-action/schema.json +234 -119
- 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 +6 -5
- 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 +1162 -138
- package/src/schematics/table/action/form-table-action/template.schema.json +75 -0
- package/src/schematics/table/action/navigation-table-action/schema.json +218 -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 +232 -92
- package/src/schematics/table/action/open-api-table-action/template.schema.json +56 -0
- package/src/schematics/table/action/operation-table-action/index.js +2 -1
- package/src/schematics/table/action/operation-table-action/index.js.map +1 -1
- package/src/schematics/table/action/operation-table-action/schema.json +205 -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 +1126 -99
- 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 +195 -77
- package/src/schematics/table/table-action/template.schema.json +30 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.hbs +292 -0
- package/src/schematics/table/table-component/index.d.ts +0 -5
- package/src/schematics/table/table-component/index.js +21 -33
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-component/schema.json +1416 -291
- 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 +23 -0
- package/src/schematics/table/templates/component-table-column.hbs +25 -0
- package/src/schematics/table/templates/copy-to-clipboard-table-column.hbs +23 -0
- package/src/schematics/table/templates/custom-table-column.hbs +23 -0
- package/src/schematics/table/templates/date-table-column.hbs +24 -0
- package/src/schematics/table/templates/default-table-column.hbs +23 -0
- package/src/schematics/table/templates/icon-table-column.hbs +23 -0
- package/src/schematics/table/templates/link-table-column.hbs +23 -0
- package/src/schematics/table/templates/mat-column-def.hbs +3 -0
- package/src/schematics/table/templates/spinner-table-column.hbs +27 -0
- package/src/schematics/table/templates/tree-table-column.hbs +21 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +292 -0
- package/src/schematics/table/tree-table-component/index.d.ts +3 -0
- package/src/schematics/table/tree-table-component/index.js +30 -9
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/schema.json +1399 -262
- package/src/schematics/table/tree-table-component/template.schema.json +20 -0
- package/src/schematics/table-accordion-item.schema.json +42 -0
- package/src/schematics/table-action.schema.json +65 -0
- package/src/schematics/table-column.schema.json +83 -0
- package/src/schematics/table-select-form-control.schema.json +103 -0
- package/src/schematics/table.schema.json +58 -0
- package/src/schematics/templates/css-class.hbs +1 -0
- package/src/schematics/templates/pipe.hbs +4 -0
- package/src/schematics/textarea-form-control.schema.json +44 -0
- package/src/schematics/tree-component/index.js +2 -1
- package/src/schematics/tree-component/index.js.map +1 -1
- package/src/schematics/tree-component/schema.json +115 -70
- package/src/schematics/tree-component/template.schema.json +36 -0
- package/src/schematics/tree-table-accordion-item.schema.json +42 -0
- package/src/schematics/tree-table-column.schema.json +24 -0
- package/src/schematics/tree-table.schema.json +41 -0
- package/src/schematics/type.schema.json +35 -0
- package/src/schematics/upstream.schema.json +95 -0
- package/src/schematics/value.schema.json +26 -0
- package/src/template.schema.json +275 -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/lib/merge-with-column-list.d.ts +0 -3
- package/src/lib/merge-with-column-list.js +0 -18
- package/src/lib/merge-with-column-list.js.map +0 -1
- package/src/lib/table-column.d.ts +0 -56
- package/src/lib/table-column.js +0 -294
- package/src/lib/table-column.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 -259
|
@@ -4,10 +4,13 @@ exports.CoerceMinimumTableComponentRule = void 0;
|
|
|
4
4
|
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
5
5
|
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
6
|
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const load_handlebars_template_1 = require("./load-handlebars-template");
|
|
7
8
|
const table_options_1 = require("./table-options");
|
|
8
9
|
function CoerceMinimumTableComponentRule(options) {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const { tsMorphTransform = utilities_1.noop, table: { columnList, actionList, headerButton, modifiers, sortable, hasPaginator, }, handlebars: { partials = {} } = {}, } = options;
|
|
12
|
+
(_a = partials['matFormField']) !== null && _a !== void 0 ? _a : (partials['matFormField'] = (0, load_handlebars_template_1.LoadMatFormFieldHandlebarsTemplate)());
|
|
13
|
+
return (0, schematics_ts_morph_1.CoerceComponentRule)(Object.assign(Object.assign({}, options), { handlebars: Object.assign(Object.assign({}, (_b = options.handlebars) !== null && _b !== void 0 ? _b : {}), { partials }), tsMorphTransform: (project, [sourceFile], [classDeclaration]) => {
|
|
11
14
|
(0, schematics_ts_morph_1.AddComponentAnimations)(sourceFile, 'RowAnimation', '@rxap/material-table-system');
|
|
12
15
|
(0, ts_morph_1.CoerceImports)(sourceFile, [
|
|
13
16
|
{
|
|
@@ -24,8 +27,18 @@ function CoerceMinimumTableComponentRule(options) {
|
|
|
24
27
|
// endregion
|
|
25
28
|
// region angular component imports
|
|
26
29
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TableColumnMenuModule', moduleSpecifier: '@rxap/material-table-system' });
|
|
27
|
-
(
|
|
28
|
-
|
|
30
|
+
if (hasPaginator) {
|
|
31
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
32
|
+
name: 'MatPaginatorModule',
|
|
33
|
+
moduleSpecifier: '@angular/material/paginator'
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if (sortable === null || sortable === void 0 ? void 0 : sortable.enabled) {
|
|
37
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
38
|
+
name: 'MatSortModule',
|
|
39
|
+
moduleSpecifier: '@angular/material/sort'
|
|
40
|
+
});
|
|
41
|
+
}
|
|
29
42
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'PersistentPaginatorDirective', moduleSpecifier: '@rxap/material-table-system' });
|
|
30
43
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'DataSourceErrorComponent', moduleSpecifier: '@rxap/data-source' });
|
|
31
44
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatDividerModule', moduleSpecifier: '@angular/material/divider' });
|
|
@@ -35,6 +48,7 @@ function CoerceMinimumTableComponentRule(options) {
|
|
|
35
48
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatProgressBarModule', moduleSpecifier: '@angular/material/progress-bar' });
|
|
36
49
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatCardModule', moduleSpecifier: '@angular/material/card' });
|
|
37
50
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'AsyncPipe', moduleSpecifier: '@angular/common' });
|
|
51
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'NgIf', moduleSpecifier: '@angular/common' });
|
|
38
52
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'NgClass', moduleSpecifier: '@angular/common' });
|
|
39
53
|
// region from column
|
|
40
54
|
for (const column of columnList) {
|
|
@@ -48,7 +62,7 @@ function CoerceMinimumTableComponentRule(options) {
|
|
|
48
62
|
if (columnList.some(column => column.hasFilter)) {
|
|
49
63
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TableFilterModule', moduleSpecifier: '@rxap/material-table-system' });
|
|
50
64
|
}
|
|
51
|
-
if (columnList.some(column => column.
|
|
65
|
+
if (columnList.some(column => { var _a; return (_a = column.source) === null || _a === void 0 ? void 0 : _a.includes('.'); })) {
|
|
52
66
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'GetFromObjectPipe', moduleSpecifier: '@rxap/pipes' });
|
|
53
67
|
}
|
|
54
68
|
// endregion
|
|
@@ -88,8 +102,8 @@ function CoerceMinimumTableComponentRule(options) {
|
|
|
88
102
|
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'NavigateBackButtonComponent', moduleSpecifier: '@rxap/components' });
|
|
89
103
|
}
|
|
90
104
|
// endregion
|
|
91
|
-
if (!!options.feature && !options.directory) {
|
|
92
|
-
(0, ts_morph_1.CoerceDefaultClassExport)(classDeclaration
|
|
105
|
+
if (!!options.feature && (!options.directory || !options.directory.includes('/'))) {
|
|
106
|
+
(0, ts_morph_1.CoerceDefaultClassExport)(classDeclaration);
|
|
93
107
|
}
|
|
94
108
|
tsMorphTransform(project, [sourceFile], [classDeclaration], options);
|
|
95
109
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-minimum-table-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-minimum-table-component.ts"],"names":[],"mappings":";;;AAAA,mEAImC;AACnC,6CAKwB;AACxB,+CAAuC;
|
|
1
|
+
{"version":3,"file":"coerce-minimum-table-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-minimum-table-component.ts"],"names":[],"mappings":";;;AAAA,mEAImC;AACnC,6CAKwB;AACxB,+CAAuC;AACvC,yEAAgF;AAEhF,mDAAiD;AAMjD,SAAgB,+BAA+B,CAAC,OAAqD;;IAEnG,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,KAAK,EAAE,EACL,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,YAAY,GACb,EACD,UAAU,EAAE,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,EAAE,GACnC,GAAG,OAAO,CAAC;IAEZ,MAAA,QAAQ,CAAC,cAAc,qCAAvB,QAAQ,CAAC,cAAc,IAAM,IAAA,6DAAkC,GAAE,EAAC;IAElE,OAAO,IAAA,yCAAmB,kCACrB,OAAO,KACV,UAAU,kCAAO,MAAA,OAAO,CAAC,UAAU,mCAAI,EAAE,KAAE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gBAAgB,CAAC,CAAC;aAC5C;YAED,gBAAgB,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,CAAC;QACvE,CAAC,IACD,CAAC;AAEL,CAAC;AA7HD,0EA6HC"}
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceTreeTableComponentRule = void 0;
|
|
4
4
|
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
5
|
-
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
5
|
const coerce_minimum_table_component_1 = require("./coerce-minimum-table-component");
|
|
7
6
|
function CoerceTreeTableComponentRule(options) {
|
|
8
|
-
return (0, coerce_minimum_table_component_1.CoerceMinimumTableComponentRule)(Object.assign(Object.assign({}, options), { tsMorphTransform: (project, [sourceFile]
|
|
9
|
-
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TreeControlCellComponent', moduleSpecifier: '@rxap/material-table-system' });
|
|
7
|
+
return (0, coerce_minimum_table_component_1.CoerceMinimumTableComponentRule)(Object.assign(Object.assign({}, options), { tsMorphTransform: (project, [sourceFile]) => {
|
|
10
8
|
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
11
9
|
provide: 'TABLE_DATA_SOURCE',
|
|
12
10
|
useClass: 'TreeTableDataSource',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-tree-table-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-tree-table-component.ts"],"names":[],"mappings":";;;AAAA,mEAGmC;AACnC,
|
|
1
|
+
{"version":3,"file":"coerce-tree-table-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-tree-table-component.ts"],"names":[],"mappings":";;;AAAA,mEAGmC;AACnC,qFAAmF;AAOnF,SAAgB,4BAA4B,CAAC,OAAkD;IAE7F,OAAO,IAAA,gEAA+B,kCACjC,OAAO,KACV,gBAAgB,EAAE,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE;YAC1C,IAAA,0CAAoB,EAAC,UAAU,EAAE;gBAC/B,OAAO,EAAE,mBAAmB;gBAC5B,QAAQ,EAAE,qBAAqB;aAChC,EAAE;gBACD;oBACE,YAAY,EAAE,CAAE,qBAAqB,CAAE;oBACvC,eAAe,EAAE,8BAA8B;iBAChD;gBACD;oBACE,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,eAAe,EAAE,6BAA6B;iBAC/C;aACF,CAAC,CAAC;QACL,CAAC,IACD,CAAC;AAEL,CAAC;AArBD,oEAqBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NormalizedTypeImport, TypeImport } from '@rxap/ts-morph';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
export interface ComponentOptions extends TypeImport {
|
|
4
|
+
selector?: string | false;
|
|
5
|
+
}
|
|
6
|
+
export interface NormalizedComponentOptions extends Readonly<Normalized<Omit<ComponentOptions, keyof TypeImport>> & NormalizedTypeImport> {
|
|
7
|
+
selector: string | false;
|
|
8
|
+
namedImport: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function NormalizeComponentOptions(options: ComponentOptions): NormalizedComponentOptions;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeComponentOptions = void 0;
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
6
|
+
function NormalizeComponentOptions(options) {
|
|
7
|
+
var _a;
|
|
8
|
+
const name = (0, utilities_1.dasherize)(options.name).replace(/-component$/, '');
|
|
9
|
+
const namedImport = (0, utilities_1.classify)(name + '-component');
|
|
10
|
+
return Object.assign(Object.assign({}, (0, ts_morph_1.NormalizeTypeImport)(Object.assign(Object.assign({}, options), { name,
|
|
11
|
+
namedImport }))), { namedImport, selector: (_a = options.selector) !== null && _a !== void 0 ? _a : false });
|
|
12
|
+
}
|
|
13
|
+
exports.NormalizeComponentOptions = NormalizeComponentOptions;
|
|
14
|
+
//# sourceMappingURL=component-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/component-options.ts"],"names":[],"mappings":";;;AAAA,6CAIwB;AACxB,+CAIyB;AAWzB,SAAgB,yBAAyB,CAAC,OAAyB;;IACjE,MAAM,IAAI,GAAG,IAAA,qBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAChE,MAAM,WAAW,GAAG,IAAA,oBAAQ,EAAC,IAAI,GAAG,YAAY,CAAC,CAAC;IAClD,uCACK,IAAA,8BAAmB,kCACjB,OAAO,KACV,IAAI;QACJ,WAAW,IACX,KACF,WAAW,EACX,QAAQ,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,KAAK,IACnC;AACJ,CAAC;AAZD,8DAYC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Normalized } from '@rxap/utilities';
|
|
2
|
+
export type CssClass = string | CssClassOptions | Array<string | CssClassOptions>;
|
|
3
|
+
export declare function CoerceCssClass(cssClass: CssClass | null | undefined, addCssClass: string | CssClassOptions, compareTo?: (a: CssClassOptions, b: CssClassOptions) => boolean): CssClass;
|
|
4
|
+
export type NormalizedCssClass = NormalizedCssClassOptions[] | null;
|
|
5
|
+
export interface CssClassOptions {
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export type NormalizedCssClassOptions = Readonly<Normalized<CssClassOptions>>;
|
|
9
|
+
export declare function NormalizeCssClass(cssClass?: CssClass | null): NormalizedCssClass;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeCssClass = exports.CoerceCssClass = void 0;
|
|
4
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
|
+
function CoerceCssClass(cssClass, addCssClass, compareTo = (a, b) => a.name === b.name) {
|
|
6
|
+
cssClass !== null && cssClass !== void 0 ? cssClass : (cssClass = []);
|
|
7
|
+
if (typeof cssClass === 'string') {
|
|
8
|
+
cssClass = cssClass.split(' ');
|
|
9
|
+
}
|
|
10
|
+
if (typeof cssClass === 'object' && !Array.isArray(cssClass)) {
|
|
11
|
+
cssClass = [cssClass];
|
|
12
|
+
}
|
|
13
|
+
if (!Array.isArray(cssClass)) {
|
|
14
|
+
throw new Error('FATAL ERROR: this state should not be possible');
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
cssClass = cssClass.map(item => {
|
|
18
|
+
if (typeof item === 'string') {
|
|
19
|
+
return { name: item };
|
|
20
|
+
}
|
|
21
|
+
return item;
|
|
22
|
+
});
|
|
23
|
+
(0, utilities_1.CoerceArrayItems)(cssClass, [typeof addCssClass === 'string' ? { name: addCssClass } : addCssClass], compareTo);
|
|
24
|
+
}
|
|
25
|
+
return cssClass;
|
|
26
|
+
}
|
|
27
|
+
exports.CoerceCssClass = CoerceCssClass;
|
|
28
|
+
function NormalizeCssClass(cssClass) {
|
|
29
|
+
let options = [];
|
|
30
|
+
if (cssClass) {
|
|
31
|
+
if (typeof cssClass === 'string') {
|
|
32
|
+
options = cssClass.split(' ').map(name => ({ name }));
|
|
33
|
+
}
|
|
34
|
+
else if (Array.isArray(cssClass)) {
|
|
35
|
+
for (const item of cssClass) {
|
|
36
|
+
const result = NormalizeCssClass(item);
|
|
37
|
+
if (result) {
|
|
38
|
+
options = options.concat(result);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (typeof cssClass === 'object') {
|
|
43
|
+
options = [cssClass];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (options.length === 0) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return options.map(option => Object.freeze(option));
|
|
50
|
+
}
|
|
51
|
+
exports.NormalizeCssClass = NormalizeCssClass;
|
|
52
|
+
//# sourceMappingURL=css-class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-class.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/css-class.ts"],"names":[],"mappings":";;;AAAA,+CAGyB;AAIzB,SAAgB,cAAc,CAC5B,QAAqC,EACrC,WAAqC,EACrC,YAAiE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;IAE5F,QAAQ,aAAR,QAAQ,cAAR,QAAQ,IAAR,QAAQ,GAAK,EAAE,EAAC;IAEhB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KAChC;IAED,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC5D,QAAQ,GAAG,CAAE,QAAQ,CAAE,CAAC;KACzB;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;SAAM;QACL,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC7B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBAC5B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;aACvB;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACH,IAAA,4BAAgB,EACd,QAA6B,EAAE,CAAE,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW,CAAE,EACxG,SAAS,CACV,CAAC;KACH;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AA9BD,wCA8BC;AAUD,SAAgB,iBAAiB,CAAC,QAA0B;IAC1D,IAAI,OAAO,GAAsB,EAAE,CAAC;IACpC,IAAI,QAAQ,EAAE;QACZ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAChC,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACxC,EAAE,IAAI,EAAE,CACT,CAAC,CAAC;SACJ;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAClC,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;gBAC3B,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBACvC,IAAI,MAAM,EAAE;oBACV,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAClC;aACF;SACF;aAAM,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YACvC,OAAO,GAAG,CAAE,QAAQ,CAAE,CAAC;SACxB;KACF;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AACtD,CAAC;AAtBD,8CAsBC"}
|
|
@@ -1,15 +1,50 @@
|
|
|
1
|
-
import { NormalizedTypeImport, TypeImport } from '@rxap/ts-morph';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { DataProperty, NormalizedDataProperty, NormalizedTypeImport, TypeImport } from '@rxap/ts-morph';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import { Control, NormalizedControl } from './form/control';
|
|
4
|
+
import { NormalizedPipeOption } from './pipe-option';
|
|
5
|
+
export declare enum DataGridKinds {
|
|
6
|
+
DEFAULT = "default",
|
|
7
|
+
LINK = "link"
|
|
8
|
+
}
|
|
9
|
+
export type DataGridItem = BaseDataGridItem | LinkDataGridItem;
|
|
10
|
+
export type NormalizedDataGridItem = NormalizedBaseDataGridItem | NormalizedLinkDataGridItem;
|
|
11
|
+
export interface BaseDataGridItem extends DataProperty {
|
|
7
12
|
header?: string;
|
|
13
|
+
pipeList?: Array<string | TypeImport>;
|
|
14
|
+
formControl?: Omit<Control, 'name'> & {
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
importList?: TypeImport[];
|
|
18
|
+
hasCellDef?: boolean;
|
|
19
|
+
hasHeaderCellDef?: boolean;
|
|
20
|
+
hasEditCellDef?: boolean;
|
|
21
|
+
kind?: DataGridKinds;
|
|
22
|
+
template?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface NormalizedBaseDataGridItem extends Readonly<Normalized<Omit<BaseDataGridItem, 'importList' | 'pipeList'>> & NormalizedDataProperty> {
|
|
25
|
+
hasCellDef: boolean;
|
|
26
|
+
hasHeaderCellDef: boolean;
|
|
27
|
+
hasEditCellDef: boolean;
|
|
28
|
+
kind: DataGridKinds;
|
|
29
|
+
formControl: NormalizedControl | null;
|
|
30
|
+
importList: ReadonlyArray<NormalizedTypeImport>;
|
|
31
|
+
pipeList: ReadonlyArray<NormalizedPipeOption>;
|
|
32
|
+
template: string;
|
|
33
|
+
handlebars: Handlebars.TemplateDelegate<{
|
|
34
|
+
item: NormalizedBaseDataGridItem;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
export declare function NormalizeBaseDataGridItem(item: Readonly<BaseDataGridItem>): NormalizedBaseDataGridItem;
|
|
38
|
+
export interface LinkDataGridItem extends BaseDataGridItem {
|
|
39
|
+
kind: DataGridKinds.LINK;
|
|
40
|
+
target?: string;
|
|
8
41
|
}
|
|
9
|
-
export interface
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
importList: NormalizedTypeImport[];
|
|
42
|
+
export interface NormalizedLinkDataGridItem extends NormalizedBaseDataGridItem {
|
|
43
|
+
kind: DataGridKinds.LINK;
|
|
44
|
+
target: string;
|
|
13
45
|
}
|
|
14
|
-
export declare function
|
|
46
|
+
export declare function IsLinkDataGridItem(item: Readonly<DataGridItem>): item is Readonly<LinkDataGridItem>;
|
|
47
|
+
export declare function IsNormalLinkDataGridItem(item: Readonly<NormalizedDataGridItem>): item is Readonly<NormalizedLinkDataGridItem>;
|
|
48
|
+
export declare function NormalizeLinkDataGridItem(item: Readonly<LinkDataGridItem>): Readonly<NormalizedLinkDataGridItem>;
|
|
49
|
+
export declare function NormalizeDataGridItem(item: Readonly<DataGridItem>): Readonly<NormalizedDataGridItem>;
|
|
15
50
|
export declare function NormalizeDataGridItemList(itemList?: Array<Readonly<DataGridItem>>): ReadonlyArray<NormalizedDataGridItem>;
|
|
@@ -1,12 +1,108 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NormalizeDataGridItemList = exports.NormalizeDataGridItem = void 0;
|
|
4
|
-
const
|
|
3
|
+
exports.NormalizeDataGridItemList = exports.NormalizeDataGridItem = exports.NormalizeLinkDataGridItem = exports.IsNormalLinkDataGridItem = exports.IsLinkDataGridItem = exports.NormalizeBaseDataGridItem = exports.DataGridKinds = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const control_1 = require("./form/control");
|
|
9
|
+
const load_handlebars_template_1 = require("./load-handlebars-template");
|
|
10
|
+
const pipe_option_1 = require("./pipe-option");
|
|
11
|
+
var DataGridKinds;
|
|
12
|
+
(function (DataGridKinds) {
|
|
13
|
+
DataGridKinds["DEFAULT"] = "default";
|
|
14
|
+
DataGridKinds["LINK"] = "link";
|
|
15
|
+
})(DataGridKinds || (exports.DataGridKinds = DataGridKinds = {}));
|
|
16
|
+
function guessDataGridItemKind(item) {
|
|
17
|
+
switch (item.name) {
|
|
18
|
+
case 'link':
|
|
19
|
+
return DataGridKinds.LINK;
|
|
20
|
+
}
|
|
21
|
+
return DataGridKinds.DEFAULT;
|
|
22
|
+
}
|
|
23
|
+
function NormalizeBaseDataGridItem(item) {
|
|
24
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
25
|
+
if (!item.name) {
|
|
26
|
+
throw new schematics_1.SchematicsException('The data grid item is required');
|
|
27
|
+
}
|
|
28
|
+
const formControl = item.formControl && Object.keys(item.formControl).length ? (0, control_1.NormalizeControl)(Object.assign({ name: item.name, type: item.type }, item.formControl)) : null;
|
|
29
|
+
let hasCellDef = (_a = item.hasCellDef) !== null && _a !== void 0 ? _a : false;
|
|
30
|
+
let hasHeaderCellDef = (_b = item.hasHeaderCellDef) !== null && _b !== void 0 ? _b : false;
|
|
31
|
+
let hasEditCellDef = (_c = item.hasEditCellDef) !== null && _c !== void 0 ? _c : false;
|
|
32
|
+
// if the hasHeaderCellDef is explicitly set to false then don't try to set it to true
|
|
33
|
+
if (item.header && item.hasHeaderCellDef !== false) {
|
|
34
|
+
hasHeaderCellDef = true;
|
|
35
|
+
}
|
|
36
|
+
// if the hasCellDef is explicitly set to false then don't try to set it to true
|
|
37
|
+
if (((_d = item.pipeList) === null || _d === void 0 ? void 0 : _d.length) && item.hasCellDef !== false) {
|
|
38
|
+
hasCellDef = true;
|
|
39
|
+
}
|
|
40
|
+
// if the hasEditCellDef is explicitly set to false then don't try to set it to true
|
|
41
|
+
if (formControl && item.hasEditCellDef !== false) {
|
|
42
|
+
hasEditCellDef = true;
|
|
43
|
+
}
|
|
44
|
+
// if the hasCellDef is explicitly set to false then don't try to set it to true
|
|
45
|
+
if (!hasCellDef && !hasEditCellDef && item.hasCellDef !== false) {
|
|
46
|
+
hasCellDef = true;
|
|
47
|
+
}
|
|
48
|
+
const importList = (_e = item.importList) !== null && _e !== void 0 ? _e : [];
|
|
49
|
+
const pipeList = (0, pipe_option_1.NormalizePipeOptionList)(item.pipeList);
|
|
50
|
+
(0, utilities_1.CoerceArrayItems)(importList, pipeList.map(pipe_option_1.PipeOptionToTypeImport), (a, b) => a.name === b.name && a.namedImport === b.namedImport);
|
|
51
|
+
if (formControl) {
|
|
52
|
+
(0, utilities_1.CoerceArrayItems)(importList, formControl.importList, (a, b) => a.name === b.name && a.namedImport === b.namedImport);
|
|
53
|
+
}
|
|
54
|
+
const kind = (_f = item.kind) !== null && _f !== void 0 ? _f : guessDataGridItemKind(item);
|
|
55
|
+
const template = (_g = item.template) !== null && _g !== void 0 ? _g : kind + '-data-grid-item.hbs';
|
|
56
|
+
const type = (_h = formControl === null || formControl === void 0 ? void 0 : formControl.type) !== null && _h !== void 0 ? _h : item.type;
|
|
57
|
+
const memberList = (_j = formControl === null || formControl === void 0 ? void 0 : formControl.memberList) !== null && _j !== void 0 ? _j : item.memberList;
|
|
58
|
+
switch (kind) {
|
|
59
|
+
case DataGridKinds.LINK:
|
|
60
|
+
(0, utilities_1.CoerceArrayItems)(importList, [{
|
|
61
|
+
name: 'MatTooltipModule',
|
|
62
|
+
moduleSpecifier: '@angular/material/tooltip'
|
|
63
|
+
}], (a, b) => a.name === b.name);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return Object.freeze(Object.assign(Object.assign({}, (0, ts_morph_1.NormalizeDataProperty)(Object.assign(Object.assign({}, item), { type,
|
|
67
|
+
memberList }))), { template,
|
|
68
|
+
kind, handlebars: (0, load_handlebars_template_1.LoadHandlebarsTemplate)(template, (0, path_1.join)(__dirname, '..', 'schematics', 'data-grid-component', 'templates')), formControl, header: (_k = item.header) !== null && _k !== void 0 ? _k : (0, utilities_1.dasherize)(item.name).split('-').map(utilities_1.capitalize).join(' '), pipeList,
|
|
69
|
+
hasCellDef,
|
|
70
|
+
hasHeaderCellDef,
|
|
71
|
+
hasEditCellDef, importList: (0, ts_morph_1.NormalizeTypeImportList)(importList) }));
|
|
72
|
+
}
|
|
73
|
+
exports.NormalizeBaseDataGridItem = NormalizeBaseDataGridItem;
|
|
74
|
+
function IsLinkDataGridItem(item) {
|
|
75
|
+
return item.kind === DataGridKinds.LINK;
|
|
76
|
+
}
|
|
77
|
+
exports.IsLinkDataGridItem = IsLinkDataGridItem;
|
|
78
|
+
function IsNormalLinkDataGridItem(item) {
|
|
79
|
+
return item.kind === DataGridKinds.LINK;
|
|
80
|
+
}
|
|
81
|
+
exports.IsNormalLinkDataGridItem = IsNormalLinkDataGridItem;
|
|
82
|
+
function NormalizeLinkDataGridItem(item) {
|
|
83
|
+
var _a, _b;
|
|
84
|
+
const importList = (_a = item.importList) !== null && _a !== void 0 ? _a : [];
|
|
85
|
+
(0, utilities_1.CoerceArrayItems)(importList, [
|
|
86
|
+
{
|
|
87
|
+
name: 'MatButtonModule',
|
|
88
|
+
moduleSpecifier: '@angular/material/button',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'MatIconModule',
|
|
92
|
+
moduleSpecifier: '@angular/material/icon',
|
|
93
|
+
},
|
|
94
|
+
], (a, b) => a.name === b.name);
|
|
95
|
+
return Object.assign(Object.assign({}, NormalizeBaseDataGridItem(Object.assign(Object.assign({}, item), { hasCellDef: true, importList }))), { kind: DataGridKinds.LINK, target: (_b = item.target) !== null && _b !== void 0 ? _b : '_self' });
|
|
96
|
+
}
|
|
97
|
+
exports.NormalizeLinkDataGridItem = NormalizeLinkDataGridItem;
|
|
5
98
|
function NormalizeDataGridItem(item) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
99
|
+
switch (item.kind) {
|
|
100
|
+
case DataGridKinds.LINK:
|
|
101
|
+
return NormalizeLinkDataGridItem(item);
|
|
102
|
+
default:
|
|
103
|
+
case DataGridKinds.DEFAULT:
|
|
104
|
+
return NormalizeBaseDataGridItem(item);
|
|
105
|
+
}
|
|
10
106
|
}
|
|
11
107
|
exports.NormalizeDataGridItem = NormalizeDataGridItem;
|
|
12
108
|
function NormalizeDataGridItemList(itemList) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-grid-item.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-item.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"data-grid-item.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-item.ts"],"names":[],"mappings":";;;AAAA,2DAAiE;AACjE,6CAOwB;AACxB,+CAKyB;AACzB,+BAA4B;AAC5B,4CAIwB;AACxB,yEAAoE;AACpE,+CAIuB;AAEvB,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;AACf,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AA+BD,SAAS,qBAAqB,CAAC,IAAsB;IACnD,QAAQ,IAAI,CAAC,IAAI,EAAE;QACjB,KAAK,MAAM;YACT,OAAO,aAAa,CAAC,IAAI,CAAC;KAC7B;IAED,OAAO,aAAa,CAAC,OAAO,CAAC;AAC/B,CAAC;AAED,SAAgB,yBAAyB,CAAC,IAAgC;;IACxE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACd,MAAM,IAAI,gCAAmB,CAAC,gCAAgC,CAAC,CAAC;KACjE;IACD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,0BAAgB,kBAC7F,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,IACZ,IAAI,CAAC,WAAW,EACnB,CAAC,CAAC,CAAC,IAAI,CAAC;IAEV,IAAI,UAAU,GAAG,MAAA,IAA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,CAAC,MAAM,CAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,CAAC,qBAAqB,CAAC,mCAAI,EAAE,CAAC,CAAC;AACnE,CAAC;AAJD,8DAIC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataGridMode = void 0;
|
|
4
|
+
var DataGridMode;
|
|
5
|
+
(function (DataGridMode) {
|
|
6
|
+
DataGridMode["Form"] = "form";
|
|
7
|
+
DataGridMode["Plain"] = "plain";
|
|
8
|
+
})(DataGridMode || (exports.DataGridMode = DataGridMode = {}));
|
|
9
|
+
//# sourceMappingURL=data-grid-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-mode.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-mode.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
+
import { DataProperty, NormalizedDataProperty, NormalizedUpstreamOptions, UpstreamOptions } from '@rxap/ts-morph';
|
|
1
2
|
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import { AccordionIdentifier, NormalizedAccordionIdentifier } from './accordion-identifier';
|
|
2
4
|
import { DataGridItem, NormalizedDataGridItem } from './data-grid-item';
|
|
3
|
-
|
|
4
|
-
Form = "form",
|
|
5
|
-
Plain = "plain"
|
|
6
|
-
}
|
|
5
|
+
import { DataGridMode } from './data-grid-mode';
|
|
7
6
|
export interface DataGridOptions {
|
|
8
7
|
itemList?: Array<DataGridItem>;
|
|
9
8
|
mode?: DataGridMode;
|
|
10
9
|
collection?: boolean;
|
|
11
10
|
title?: string;
|
|
12
11
|
subtitle?: string;
|
|
12
|
+
inCard?: boolean;
|
|
13
|
+
upstream?: UpstreamOptions;
|
|
14
|
+
propertyList?: DataProperty[];
|
|
15
|
+
identifier?: AccordionIdentifier;
|
|
13
16
|
}
|
|
14
|
-
export interface NormalizedDataGridOptions extends Omit<Readonly<Normalized<DataGridOptions>>, 'itemList'> {
|
|
17
|
+
export interface NormalizedDataGridOptions extends Omit<Readonly<Normalized<DataGridOptions>>, 'itemList' | 'propertyList'> {
|
|
15
18
|
mode: DataGridMode;
|
|
16
19
|
itemList: ReadonlyArray<NormalizedDataGridItem>;
|
|
20
|
+
isForm: boolean;
|
|
21
|
+
upstream: NormalizedUpstreamOptions | null;
|
|
22
|
+
propertyList: Array<NormalizedDataProperty>;
|
|
23
|
+
identifier: NormalizedAccordionIdentifier | null;
|
|
17
24
|
}
|
|
18
25
|
export declare function NormalizeDataGridOptions(options: Readonly<DataGridOptions>): Readonly<NormalizedDataGridOptions>;
|
|
@@ -1,24 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NormalizeDataGridOptions =
|
|
3
|
+
exports.NormalizeDataGridOptions = void 0;
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
6
|
+
const accordion_identifier_1 = require("./accordion-identifier");
|
|
4
7
|
const data_grid_item_1 = require("./data-grid-item");
|
|
5
|
-
|
|
6
|
-
(function (DataGridMode) {
|
|
7
|
-
DataGridMode["Form"] = "form";
|
|
8
|
-
DataGridMode["Plain"] = "plain";
|
|
9
|
-
})(DataGridMode || (exports.DataGridMode = DataGridMode = {}));
|
|
8
|
+
const data_grid_mode_1 = require("./data-grid-mode");
|
|
10
9
|
function IsDataGridMode(value) {
|
|
11
|
-
return Object.values(DataGridMode).includes(value);
|
|
10
|
+
return Object.values(data_grid_mode_1.DataGridMode).includes(value);
|
|
12
11
|
}
|
|
13
12
|
function NormalizeDataGridOptions(options) {
|
|
14
|
-
var _a, _b;
|
|
15
|
-
const {
|
|
13
|
+
var _a, _b, _c, _d;
|
|
14
|
+
const { collection, } = options;
|
|
15
|
+
let { mode } = options;
|
|
16
|
+
mode = IsDataGridMode(mode) ? mode : data_grid_mode_1.DataGridMode.Plain;
|
|
17
|
+
const itemList = (0, data_grid_item_1.NormalizeDataGridItemList)(options.itemList);
|
|
18
|
+
const propertyList = (_a = options.propertyList) !== null && _a !== void 0 ? _a : [];
|
|
19
|
+
(0, utilities_1.CoerceArrayItems)(propertyList,
|
|
20
|
+
// call the DeleteEmptyProperties function to remove any property that is empty (null, undefined, empty string)
|
|
21
|
+
// so that if this property is already defined in the propertyList it will not overwrite a value with an empty value
|
|
22
|
+
itemList.map(item => (0, utilities_1.DeleteEmptyProperties)({
|
|
23
|
+
name: item.name,
|
|
24
|
+
type: item.type,
|
|
25
|
+
isOptional: item.isOptional,
|
|
26
|
+
isArray: item.isArray,
|
|
27
|
+
source: item.source,
|
|
28
|
+
memberList: item.memberList,
|
|
29
|
+
})), { compareTo: (a, b) => a.name === b.name });
|
|
30
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, itemList
|
|
31
|
+
.filter(item => item.formControl)
|
|
32
|
+
.map(item => item.formControl)
|
|
33
|
+
// call the DeleteEmptyProperties function to remove any property that is empty (null, undefined, empty string)
|
|
34
|
+
// so that if this property is already defined in the propertyList it will not overwrite a value with an empty value
|
|
35
|
+
.map(control => (0, utilities_1.DeleteEmptyProperties)({
|
|
36
|
+
name: control.name,
|
|
37
|
+
type: control.type,
|
|
38
|
+
isArray: control.isArray,
|
|
39
|
+
isOptional: control.isOptional,
|
|
40
|
+
source: control.source,
|
|
41
|
+
})), { compareTo: (a, b) => a.name === b.name, merge: true });
|
|
16
42
|
return Object.freeze({
|
|
17
|
-
itemList
|
|
18
|
-
mode
|
|
43
|
+
itemList,
|
|
44
|
+
mode,
|
|
19
45
|
collection: collection !== null && collection !== void 0 ? collection : false,
|
|
20
|
-
title: (
|
|
21
|
-
subtitle: (
|
|
46
|
+
title: (_b = options.title) !== null && _b !== void 0 ? _b : null,
|
|
47
|
+
subtitle: (_c = options.subtitle) !== null && _c !== void 0 ? _c : null,
|
|
48
|
+
inCard: (_d = options.inCard) !== null && _d !== void 0 ? _d : true,
|
|
49
|
+
isForm: mode === data_grid_mode_1.DataGridMode.Form || itemList.some(item => item.formControl),
|
|
50
|
+
upstream: (0, ts_morph_1.NormalizeUpstreamOptions)(options.upstream),
|
|
51
|
+
propertyList: (0, ts_morph_1.NormalizeDataPropertyList)(propertyList),
|
|
52
|
+
identifier: (0, accordion_identifier_1.NormalizeAccordionIdentifier)(options.identifier),
|
|
22
53
|
});
|
|
23
54
|
}
|
|
24
55
|
exports.NormalizeDataGridOptions = NormalizeDataGridOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-grid-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-options.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"data-grid-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-options.ts"],"names":[],"mappings":";;;AAAA,6CAOwB;AACxB,+CAIyB;AACzB,iEAIgC;AAChC,qDAI0B;AAC1B,qDAAgD;AAEhD,SAAS,cAAc,CAAC,KAAU;IAChC,OAAO,MAAM,CAAC,MAAM,CAAC,6BAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAuBD,SAAgB,wBAAwB,CAAC,OAAkC;;IACzE,MAAM,EACJ,UAAU,GACX,GAAG,OAAO,CAAC;IACZ,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACvB,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,6BAAY,CAAC,KAAK,CAAC;IACxD,MAAM,QAAQ,GAAG,IAAA,0CAAyB,EAAC,OAAO,CAAC,QAAQ,CAA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,QAAQ;QACR,IAAI;QACJ,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,KAAK;QAC/B,KAAK,EAAE,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI;QAC5B,QAAQ,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI;QAClC,MAAM,EAAE,MAAA,OAAO,CAAC,MAAM,mCAAI,IAAI;QAC9B,MAAM,EAAE,IAAI,KAAK,6BAAY,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;QAC7E,QAAQ,EAAE,IAAA,mCAAwB,EAAC,OAAO,CAAC,QAAQ,CAAC;QACpD,YAAY,EAAE,IAAA,oCAAyB,EAAC,YAAY,CAAC;QACrD,UAAU,EAAE,IAAA,mDAA4B,EAAC,OAAO,CAAC,UAAU,CAAC;KAC7D,CAAC,CAAC;AACL,CAAC;AAlDD,4DAkDC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DataProperty, NormalizedDataProperty, NormalizedTypeImport, TypeImport } from '@rxap/ts-morph';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import Handlebars from 'handlebars';
|
|
4
|
+
export declare enum AbstractControlRolls {
|
|
5
|
+
CONTROL = "control",
|
|
6
|
+
GROUP = "group",
|
|
7
|
+
ARRAY = "array"
|
|
8
|
+
}
|
|
9
|
+
export interface AbstractControl extends DataProperty {
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
validatorList?: string[];
|
|
12
|
+
importList?: TypeImport[];
|
|
13
|
+
state?: string;
|
|
14
|
+
isRequired?: boolean;
|
|
15
|
+
role?: AbstractControlRolls;
|
|
16
|
+
isReadonly?: boolean;
|
|
17
|
+
kind?: string;
|
|
18
|
+
template?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface NormalizedAbstractControl extends Readonly<Normalized<Omit<AbstractControl, keyof NormalizedDataProperty>>>, NormalizedDataProperty {
|
|
21
|
+
importList: NormalizedTypeImport[];
|
|
22
|
+
handlebars: Handlebars.TemplateDelegate<{
|
|
23
|
+
control: NormalizedAbstractControl;
|
|
24
|
+
}>;
|
|
25
|
+
role: AbstractControlRolls;
|
|
26
|
+
}
|
|
27
|
+
export declare function AbstractControlToDataProperty(control: NormalizedAbstractControl): NormalizedDataProperty;
|
|
28
|
+
export declare function AbstractControlToDataProperty(control: AbstractControl): DataProperty;
|
|
29
|
+
export declare function NormalizeAbstractControl<Kind extends string>(control: AbstractControl, kind: Kind, importList?: TypeImport[], validatorList?: string[], defaultType?: TypeImport | string, defaultIsArray?: boolean): NormalizedAbstractControl & {
|
|
30
|
+
kind: Kind;
|
|
31
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeAbstractControl = exports.AbstractControlToDataProperty = exports.AbstractControlRolls = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const load_handlebars_template_1 = require("../load-handlebars-template");
|
|
9
|
+
var AbstractControlRolls;
|
|
10
|
+
(function (AbstractControlRolls) {
|
|
11
|
+
AbstractControlRolls["CONTROL"] = "control";
|
|
12
|
+
AbstractControlRolls["GROUP"] = "group";
|
|
13
|
+
AbstractControlRolls["ARRAY"] = "array";
|
|
14
|
+
})(AbstractControlRolls || (exports.AbstractControlRolls = AbstractControlRolls = {}));
|
|
15
|
+
function AbstractControlToDataProperty(control) {
|
|
16
|
+
return {
|
|
17
|
+
name: control.name,
|
|
18
|
+
type: control.type,
|
|
19
|
+
isArray: control.isArray,
|
|
20
|
+
isOptional: control.isOptional,
|
|
21
|
+
source: control.source,
|
|
22
|
+
memberList: control.memberList,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.AbstractControlToDataProperty = AbstractControlToDataProperty;
|
|
26
|
+
function NormalizeAbstractControl(control, kind, importList = [], validatorList = [], defaultType = 'unknown', defaultIsArray = false) {
|
|
27
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
28
|
+
if (!control.name) {
|
|
29
|
+
throw new schematics_1.SchematicsException('The control name is required');
|
|
30
|
+
}
|
|
31
|
+
const role = (_a = control.role) !== null && _a !== void 0 ? _a : AbstractControlRolls.CONTROL;
|
|
32
|
+
const isReadonly = (_b = control.isReadonly) !== null && _b !== void 0 ? _b : false;
|
|
33
|
+
const isDisabled = (_c = control.isDisabled) !== null && _c !== void 0 ? _c : false;
|
|
34
|
+
(0, utilities_1.CoerceArrayItems)(validatorList, (_d = control.validatorList) !== null && _d !== void 0 ? _d : []);
|
|
35
|
+
const template = (_e = control.template) !== null && _e !== void 0 ? _e : `${kind}-form-${role}.hbs`;
|
|
36
|
+
(0, utilities_1.CoerceArrayItems)(importList, (_f = control.importList) !== null && _f !== void 0 ? _f : [], (a, b) => a === b);
|
|
37
|
+
const state = (_g = control.state) !== null && _g !== void 0 ? _g : null;
|
|
38
|
+
const isRequired = (_h = control.isRequired) !== null && _h !== void 0 ? _h : false;
|
|
39
|
+
return Object.freeze(Object.assign(Object.assign({}, (0, ts_morph_1.NormalizeDataProperty)(control, defaultType, defaultIsArray)), { isRequired,
|
|
40
|
+
state,
|
|
41
|
+
kind,
|
|
42
|
+
template,
|
|
43
|
+
isReadonly,
|
|
44
|
+
isDisabled,
|
|
45
|
+
validatorList, importList: (0, ts_morph_1.NormalizeTypeImportList)(importList), handlebars: (0, load_handlebars_template_1.LoadHandlebarsTemplate)(template, (0, path_1.join)(__dirname, '..', '..', 'schematics', 'form', 'templates')), role }));
|
|
46
|
+
}
|
|
47
|
+
exports.NormalizeAbstractControl = NormalizeAbstractControl;
|
|
48
|
+
//# sourceMappingURL=abstract-control.js.map
|