ngx-axis-appforge 0.0.3 → 0.0.4
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/.editorconfig +17 -0
- package/angular.json +40 -0
- package/axis-components/badge/badge.css +3 -0
- package/axis-components/badge/badge.html +20 -0
- package/axis-components/badge/badge.options.ts +23 -0
- package/axis-components/badge/badge.ts +17 -0
- package/axis-components/badge/design/config.ts +52 -0
- package/axis-components/badge/design/ng-package.json +5 -0
- package/axis-components/badge/design/setting/setting.css +0 -0
- package/axis-components/badge/design/setting/setting.html +181 -0
- package/axis-components/badge/design/setting/setting.ts +126 -0
- package/axis-components/badge/ng-package.json +5 -0
- package/axis-components/button/button.css +3 -0
- package/axis-components/button/button.html +13 -0
- package/axis-components/button/button.options.ts +17 -0
- package/axis-components/button/button.ts +56 -0
- package/axis-components/button/design/config.ts +30 -0
- package/axis-components/button/design/ng-package.json +5 -0
- package/axis-components/button/design/setting/setting.css +0 -0
- package/axis-components/button/design/setting/setting.html +151 -0
- package/axis-components/button/design/setting/setting.ts +76 -0
- package/axis-components/button/ng-package.json +5 -0
- package/axis-components/cmp-map.ts +52 -0
- package/axis-components/cmplib.ts +9 -0
- package/axis-components/desc/desc.css +8 -0
- package/axis-components/desc/desc.html +19 -0
- package/axis-components/desc/desc.options.ts +24 -0
- package/axis-components/desc/desc.ts +29 -0
- package/axis-components/desc/design/config.ts +113 -0
- package/axis-components/desc/design/desc-item-setting/desc-item-setting.css +0 -0
- package/axis-components/desc/design/desc-item-setting/desc-item-setting.html +47 -0
- package/axis-components/desc/design/desc-item-setting/desc-item-setting.ts +40 -0
- package/axis-components/desc/design/desc-items-menu/desc-items-menu.css +0 -0
- package/axis-components/desc/design/desc-items-menu/desc-items-menu.html +9 -0
- package/axis-components/desc/design/desc-items-menu/desc-items-menu.ts +23 -0
- package/axis-components/desc/design/desc-setting/desc-setting.css +0 -0
- package/axis-components/desc/design/desc-setting/desc-setting.html +76 -0
- package/axis-components/desc/design/desc-setting/desc-setting.ts +51 -0
- package/axis-components/desc/design/ng-package.json +5 -0
- package/axis-components/desc/ng-package.json +5 -0
- package/axis-components/design/cmplib/cmplib.css +5 -0
- package/axis-components/design/cmplib/cmplib.html +52 -0
- package/axis-components/design/cmplib/cmplib.ts +96 -0
- package/axis-components/design/design/config.ts +29 -0
- package/axis-components/design/design/ng-package.json +5 -0
- package/axis-components/design/design/setting/setting.css +0 -0
- package/axis-components/design/design/setting/setting.html +33 -0
- package/axis-components/design/design/setting/setting.ts +33 -0
- package/axis-components/design/design.css +15 -0
- package/axis-components/design/design.html +51 -0
- package/axis-components/design/design.options.ts +9 -0
- package/axis-components/design/design.ts +509 -0
- package/axis-components/design/ng-package.json +5 -0
- package/axis-components/design/preview/drag.service.ts +148 -0
- package/axis-components/design/preview/drop-handler.ts +56 -0
- package/axis-components/design/preview/preview.css +3 -0
- package/axis-components/design/preview/preview.html +1 -0
- package/axis-components/design/preview/preview.ts +250 -0
- package/axis-components/design/preview/select.service.ts +140 -0
- package/axis-components/design/shortcut-key.ts +160 -0
- package/axis-components/design/toolbar/toolbar.css +24 -0
- package/axis-components/design/toolbar/toolbar.html +96 -0
- package/axis-components/design/toolbar/toolbar.ts +65 -0
- package/axis-components/design/tree/drag-drop.ts +125 -0
- package/axis-components/design/tree/tree.css +30 -0
- package/axis-components/design/tree/tree.html +49 -0
- package/axis-components/design/tree/tree.ts +292 -0
- package/axis-components/dynamic-container/design/config.ts +30 -0
- package/axis-components/dynamic-container/design/ng-package.json +5 -0
- package/axis-components/dynamic-container/design/setting/setting.css +0 -0
- package/axis-components/dynamic-container/design/setting/setting.html +20 -0
- package/axis-components/dynamic-container/design/setting/setting.ts +30 -0
- package/axis-components/dynamic-container/dynamic-container.css +3 -0
- package/axis-components/dynamic-container/dynamic-container.html +2 -0
- package/axis-components/dynamic-container/dynamic-container.options.ts +6 -0
- package/axis-components/dynamic-container/dynamic-container.ts +17 -0
- package/axis-components/dynamic-container/ng-package.json +5 -0
- package/axis-components/editor/editor.css +47 -0
- package/axis-components/editor/editor.html +10 -0
- package/axis-components/editor/editor.options.ts +10 -0
- package/axis-components/editor/editor.ts +86 -0
- package/axis-components/editor/ng-package.json +5 -0
- package/axis-components/examples/examples/badge.ts +17 -0
- package/axis-components/examples/examples/button.ts +38 -0
- package/axis-components/examples/examples/desc.ts +31 -0
- package/axis-components/examples/examples/design.ts +15 -0
- package/axis-components/examples/examples/dynamic-container.ts +21 -0
- package/axis-components/examples/examples/flex.ts +18 -0
- package/axis-components/examples/examples/form-item.ts +39 -0
- package/axis-components/examples/examples/form.ts +315 -0
- package/axis-components/examples/examples/icon.ts +16 -0
- package/axis-components/examples/examples/image.ts +15 -0
- package/axis-components/examples/examples/input-component.ts +15 -0
- package/axis-components/examples/examples/input-icon.ts +15 -0
- package/axis-components/examples/examples/input-json.ts +15 -0
- package/axis-components/examples/examples/input-number.ts +15 -0
- package/axis-components/examples/examples/input.ts +15 -0
- package/axis-components/examples/examples/modal.ts +15 -0
- package/axis-components/examples/examples/scope.ts +17 -0
- package/axis-components/examples/examples/single-selector.ts +25 -0
- package/axis-components/examples/examples/splitter.ts +36 -0
- package/axis-components/examples/examples/table.ts +126 -0
- package/axis-components/examples/examples/text.ts +15 -0
- package/axis-components/examples/examples/textarea.ts +15 -0
- package/axis-components/examples/examples/tree-selector.ts +35 -0
- package/axis-components/examples/examples/upload.ts +15 -0
- package/axis-components/examples/examples.ts +73 -0
- package/axis-components/flex/design/config.ts +49 -0
- package/axis-components/flex/design/ng-package.json +5 -0
- package/axis-components/flex/design/setting/setting.css +0 -0
- package/axis-components/flex/design/setting/setting.html +72 -0
- package/axis-components/flex/design/setting/setting.ts +43 -0
- package/axis-components/flex/flex.css +5 -0
- package/axis-components/flex/flex.html +6 -0
- package/axis-components/flex/flex.options.ts +12 -0
- package/axis-components/flex/flex.ts +15 -0
- package/axis-components/flex/ng-package.json +5 -0
- package/axis-components/form/design/config.ts +71 -0
- package/axis-components/form/design/ng-package.json +5 -0
- package/axis-components/form/design/setting/setting.css +0 -0
- package/axis-components/form/design/setting/setting.html +21 -0
- package/axis-components/form/design/setting/setting.ts +31 -0
- package/axis-components/form/form.css +3 -0
- package/axis-components/form/form.html +3 -0
- package/axis-components/form/form.options.ts +9 -0
- package/axis-components/form/form.ts +121 -0
- package/axis-components/form/ng-package.json +5 -0
- package/axis-components/form-item/design/config.ts +43 -0
- package/axis-components/form-item/design/ng-package.json +5 -0
- package/axis-components/form-item/design/setting/input-validator/input-validator.css +8 -0
- package/axis-components/form-item/design/setting/input-validator/input-validator.html +140 -0
- package/axis-components/form-item/design/setting/input-validator/input-validator.ts +158 -0
- package/axis-components/form-item/design/setting/setting.css +0 -0
- package/axis-components/form-item/design/setting/setting.html +39 -0
- package/axis-components/form-item/design/setting/setting.ts +40 -0
- package/axis-components/form-item/form-item.css +4 -0
- package/axis-components/form-item/form-item.html +16 -0
- package/axis-components/form-item/form-item.options.ts +12 -0
- package/axis-components/form-item/form-item.ts +128 -0
- package/axis-components/form-item/ng-package.json +5 -0
- package/axis-components/icon/design/config.ts +29 -0
- package/axis-components/icon/design/ng-package.json +5 -0
- package/axis-components/icon/design/setting/setting.css +0 -0
- package/axis-components/icon/design/setting/setting.html +67 -0
- package/axis-components/icon/design/setting/setting.ts +48 -0
- package/axis-components/icon/icon.css +0 -0
- package/axis-components/icon/icon.html +7 -0
- package/axis-components/icon/icon.options.ts +10 -0
- package/axis-components/icon/icon.ts +17 -0
- package/axis-components/icon/ng-package.json +5 -0
- package/axis-components/image/design/config.ts +30 -0
- package/axis-components/image/design/ng-package.json +5 -0
- package/axis-components/image/design/setting/setting.css +0 -0
- package/axis-components/image/design/setting/setting.html +42 -0
- package/axis-components/image/design/setting/setting.ts +37 -0
- package/axis-components/image/image.css +58 -0
- package/axis-components/image/image.html +14 -0
- package/axis-components/image/image.options.ts +8 -0
- package/axis-components/image/image.ts +29 -0
- package/axis-components/image/ng-package.json +5 -0
- package/axis-components/input/design/config.ts +80 -0
- package/axis-components/input/design/ng-package.json +5 -0
- package/axis-components/input/design/setting/setting.css +0 -0
- package/axis-components/input/design/setting/setting.html +79 -0
- package/axis-components/input/design/setting/setting.ts +51 -0
- package/axis-components/input/input.css +4 -0
- package/axis-components/input/input.html +32 -0
- package/axis-components/input/input.options.ts +14 -0
- package/axis-components/input/input.ts +53 -0
- package/axis-components/input/ng-package.json +5 -0
- package/axis-components/input-component/design/config.ts +30 -0
- package/axis-components/input-component/design/ng-package.json +5 -0
- package/axis-components/input-component/design/setting/setting.css +0 -0
- package/axis-components/input-component/design/setting/setting.html +33 -0
- package/axis-components/input-component/design/setting/setting.ts +33 -0
- package/axis-components/input-component/input-component.css +4 -0
- package/axis-components/input-component/input-component.html +25 -0
- package/axis-components/input-component/input-component.options.ts +7 -0
- package/axis-components/input-component/input-component.ts +50 -0
- package/axis-components/input-component/ng-package.json +5 -0
- package/axis-components/input-icon/design/config.ts +30 -0
- package/axis-components/input-icon/design/ng-package.json +5 -0
- package/axis-components/input-icon/design/setting/setting.css +0 -0
- package/axis-components/input-icon/design/setting/setting.html +29 -0
- package/axis-components/input-icon/design/setting/setting.ts +33 -0
- package/axis-components/input-icon/input-icon.css +4 -0
- package/axis-components/input-icon/input-icon.html +70 -0
- package/axis-components/input-icon/input-icon.options.ts +7 -0
- package/axis-components/input-icon/input-icon.ts +51 -0
- package/axis-components/input-icon/ng-package.json +5 -0
- package/axis-components/input-json/design/config.ts +29 -0
- package/axis-components/input-json/design/ng-package.json +5 -0
- package/axis-components/input-json/design/setting/setting.css +0 -0
- package/axis-components/input-json/design/setting/setting.html +7 -0
- package/axis-components/input-json/design/setting/setting.ts +26 -0
- package/axis-components/input-json/input-json.css +4 -0
- package/axis-components/input-json/input-json.html +19 -0
- package/axis-components/input-json/input-json.ts +67 -0
- package/axis-components/input-json/ng-package.json +5 -0
- package/axis-components/input-number/design/config.ts +30 -0
- package/axis-components/input-number/design/ng-package.json +5 -0
- package/axis-components/input-number/design/setting/setting.css +0 -0
- package/axis-components/input-number/design/setting/setting.html +118 -0
- package/axis-components/input-number/design/setting/setting.ts +66 -0
- package/axis-components/input-number/input-number.css +22 -0
- package/axis-components/input-number/input-number.html +11 -0
- package/axis-components/input-number/input-number.options.ts +17 -0
- package/axis-components/input-number/input-number.ts +30 -0
- package/axis-components/input-number/ng-package.json +5 -0
- package/axis-components/modal/design/config.ts +50 -0
- package/axis-components/modal/design/ng-package.json +5 -0
- package/axis-components/modal/design/set-modal-visible-handler/set-modal-visible-handler.css +0 -0
- package/axis-components/modal/design/set-modal-visible-handler/set-modal-visible-handler.html +15 -0
- package/axis-components/modal/design/set-modal-visible-handler/set-modal-visible-handler.ts +34 -0
- package/axis-components/modal/design/setting/setting.css +0 -0
- package/axis-components/modal/design/setting/setting.html +139 -0
- package/axis-components/modal/design/setting/setting.ts +92 -0
- package/axis-components/modal/modal.css +0 -0
- package/axis-components/modal/modal.html +7 -0
- package/axis-components/modal/modal.options.ts +20 -0
- package/axis-components/modal/modal.ts +57 -0
- package/axis-components/modal/ng-package.json +5 -0
- package/axis-components/ng-package.json +5 -0
- package/axis-components/scope/design/config.ts +59 -0
- package/axis-components/scope/design/ng-package.json +5 -0
- package/axis-components/scope/design/setting/datasource-editor/datasource-editor.css +28 -0
- package/axis-components/scope/design/setting/datasource-editor/datasource-editor.html +188 -0
- package/axis-components/scope/design/setting/datasource-editor/datasource-editor.ts +245 -0
- package/axis-components/scope/design/setting/setting.css +0 -0
- package/axis-components/scope/design/setting/setting.html +19 -0
- package/axis-components/scope/design/setting/setting.ts +30 -0
- package/axis-components/scope/ng-package.json +5 -0
- package/axis-components/scope/scope.css +6 -0
- package/axis-components/scope/scope.html +4 -0
- package/axis-components/scope/scope.options.ts +8 -0
- package/axis-components/scope/scope.ts +48 -0
- package/axis-components/single-selector/design/config.ts +30 -0
- package/axis-components/single-selector/design/ng-package.json +5 -0
- package/axis-components/single-selector/design/setting/setting.css +0 -0
- package/axis-components/single-selector/design/setting/setting.html +164 -0
- package/axis-components/single-selector/design/setting/setting.ts +80 -0
- package/axis-components/single-selector/ng-package.json +5 -0
- package/axis-components/single-selector/single-selector.css +8 -0
- package/axis-components/single-selector/single-selector.html +51 -0
- package/axis-components/single-selector/single-selector.options.ts +22 -0
- package/axis-components/single-selector/single-selector.ts +80 -0
- package/axis-components/splitter/design/config.ts +84 -0
- package/axis-components/splitter/design/ng-package.json +5 -0
- package/axis-components/splitter/design/splitter-menu/splitter-menu.css +0 -0
- package/axis-components/splitter/design/splitter-menu/splitter-menu.html +10 -0
- package/axis-components/splitter/design/splitter-menu/splitter-menu.ts +22 -0
- package/axis-components/splitter/design/splitter-panel-setting/splitter-panel-setting.css +0 -0
- package/axis-components/splitter/design/splitter-panel-setting/splitter-panel-setting.html +66 -0
- package/axis-components/splitter/design/splitter-panel-setting/splitter-panel-setting.ts +47 -0
- package/axis-components/splitter/design/splitter-setting/splitter-setting.css +0 -0
- package/axis-components/splitter/design/splitter-setting/splitter-setting.html +28 -0
- package/axis-components/splitter/design/splitter-setting/splitter-setting.ts +30 -0
- package/axis-components/splitter/ng-package.json +5 -0
- package/axis-components/splitter/splitter.css +7 -0
- package/axis-components/splitter/splitter.html +12 -0
- package/axis-components/splitter/splitter.options.ts +18 -0
- package/axis-components/splitter/splitter.ts +40 -0
- package/axis-components/table/design/config.ts +147 -0
- package/axis-components/table/design/ng-package.json +5 -0
- package/axis-components/table/design/table-field-setting/table-field-setting.css +0 -0
- package/axis-components/table/design/table-field-setting/table-field-setting.html +259 -0
- package/axis-components/table/design/table-field-setting/table-field-setting.ts +105 -0
- package/axis-components/table/design/table-fields-menu/table-fields-menu.css +0 -0
- package/axis-components/table/design/table-fields-menu/table-fields-menu.html +9 -0
- package/axis-components/table/design/table-fields-menu/table-fields-menu.ts +24 -0
- package/axis-components/table/design/table-setting/table-setting.css +0 -0
- package/axis-components/table/design/table-setting/table-setting.html +417 -0
- package/axis-components/table/design/table-setting/table-setting.ts +173 -0
- package/axis-components/table/expand.ts +12 -0
- package/axis-components/table/ng-package.json +5 -0
- package/axis-components/table/select.ts +66 -0
- package/axis-components/table/table-setter/table-setter.css +55 -0
- package/axis-components/table/table-setter/table-setter.html +38 -0
- package/axis-components/table/table-setter/table-setter.ts +121 -0
- package/axis-components/table/table.css +5 -0
- package/axis-components/table/table.html +191 -0
- package/axis-components/table/table.options.ts +72 -0
- package/axis-components/table/table.ts +204 -0
- package/axis-components/text/design/config.ts +30 -0
- package/axis-components/text/design/ng-package.json +5 -0
- package/axis-components/text/design/setting/setting.css +0 -0
- package/axis-components/text/design/setting/setting.html +84 -0
- package/axis-components/text/design/setting/setting.ts +54 -0
- package/axis-components/text/ng-package.json +5 -0
- package/axis-components/text/text.css +3 -0
- package/axis-components/text/text.html +17 -0
- package/axis-components/text/text.options.ts +10 -0
- package/axis-components/text/text.ts +54 -0
- package/axis-components/textarea/design/config.ts +30 -0
- package/axis-components/textarea/design/ng-package.json +5 -0
- package/axis-components/textarea/design/setting/setting.css +0 -0
- package/axis-components/textarea/design/setting/setting.html +76 -0
- package/axis-components/textarea/design/setting/setting.ts +55 -0
- package/axis-components/textarea/ng-package.json +5 -0
- package/axis-components/textarea/textarea.css +4 -0
- package/axis-components/textarea/textarea.html +11 -0
- package/axis-components/textarea/textarea.options.ts +13 -0
- package/axis-components/textarea/textarea.ts +49 -0
- package/axis-components/tree-selector/design/config.ts +55 -0
- package/axis-components/tree-selector/design/ng-package.json +5 -0
- package/axis-components/tree-selector/design/tree-selector-menu/tree-selector-menu.css +0 -0
- package/axis-components/tree-selector/design/tree-selector-menu/tree-selector-menu.html +9 -0
- package/axis-components/tree-selector/design/tree-selector-menu/tree-selector-menu.ts +26 -0
- package/axis-components/tree-selector/design/tree-selector-menu-setting/tree-selector-menu-setting.css +0 -0
- package/axis-components/tree-selector/design/tree-selector-menu-setting/tree-selector-menu-setting.html +80 -0
- package/axis-components/tree-selector/design/tree-selector-menu-setting/tree-selector-menu-setting.ts +58 -0
- package/axis-components/tree-selector/design/tree-selector-setting/tree-selector-setting.css +0 -0
- package/axis-components/tree-selector/design/tree-selector-setting/tree-selector-setting.html +235 -0
- package/axis-components/tree-selector/design/tree-selector-setting/tree-selector-setting.ts +87 -0
- package/axis-components/tree-selector/ng-package.json +5 -0
- package/axis-components/tree-selector/tree-selector.css +43 -0
- package/axis-components/tree-selector/tree-selector.html +65 -0
- package/axis-components/tree-selector/tree-selector.options.ts +50 -0
- package/axis-components/tree-selector/tree-selector.ts +252 -0
- package/axis-components/upload/design/config.ts +37 -0
- package/axis-components/upload/design/ng-package.json +5 -0
- package/axis-components/upload/design/setting/setting.css +0 -0
- package/axis-components/upload/design/setting/setting.html +288 -0
- package/axis-components/upload/design/setting/setting.ts +96 -0
- package/axis-components/upload/ng-package.json +5 -0
- package/axis-components/upload/upload.css +3 -0
- package/axis-components/upload/upload.html +36 -0
- package/axis-components/upload/upload.options.ts +29 -0
- package/axis-components/upload/upload.ts +130 -0
- package/core/base/base-menu.ts +22 -0
- package/core/base/base.ts +143 -0
- package/core/base/design-builder.ts +8 -0
- package/core/base/funfield-base.ts +106 -0
- package/core/base/funfield-value-base.ts +53 -0
- package/core/base/value-access.ts +70 -0
- package/core/directives/dynamic.ts +216 -0
- package/core/directives/scope.ts +432 -0
- package/core/models/api.options.ts +5 -0
- package/core/models/base.options.ts +11 -0
- package/core/models/cmplib.ts +7 -0
- package/core/models/data-source.options.ts +11 -0
- package/core/models/data.options.ts +6 -0
- package/core/models/design-build.ts +26 -0
- package/core/models/design-config.ts +14 -0
- package/core/models/design-tree-node.ts +16 -0
- package/core/models/event-desc.ts +28 -0
- package/core/models/event-handler.ts +6 -0
- package/core/models/event.options.ts +14 -0
- package/core/models/examples.ts +21 -0
- package/core/models/form-registe.options.ts +12 -0
- package/core/models/fun-field.options.ts +6 -0
- package/core/models/initobs.ts +8 -0
- package/core/models/options-node.ts +149 -0
- package/core/models/static-data-source.options.ts +4 -0
- package/core/models/trigge-events.options.ts +3 -0
- package/core/models/value-access.options.ts +10 -0
- package/core/ng-package.json +5 -0
- package/core/pipes/how-long.pipe.ts +69 -0
- package/core/public-api.ts +39 -0
- package/core/share/api-handler/api-handler.css +0 -0
- package/core/share/api-handler/api-handler.html +38 -0
- package/core/share/api-handler/api-handler.ts +51 -0
- package/core/share/array-filter-handler/array-filter-handler.css +0 -0
- package/core/share/array-filter-handler/array-filter-handler.html +26 -0
- package/core/share/array-filter-handler/array-filter-handler.ts +65 -0
- package/core/share/array-filter-handler/input-filter-options/filter-options.css +19 -0
- package/core/share/array-filter-handler/input-filter-options/filter-options.html +57 -0
- package/core/share/array-filter-handler/input-filter-options/filter-options.ts +100 -0
- package/core/share/base-design-setting/base-design-setting.css +0 -0
- package/core/share/base-design-setting/base-design-setting.html +50 -0
- package/core/share/base-design-setting/base-design-setting.ts +55 -0
- package/core/share/base-event-handler-descs.ts +100 -0
- package/core/share/common-menu/common-menu.css +0 -0
- package/core/share/common-menu/common-menu.html +21 -0
- package/core/share/common-menu/common-menu.ts +73 -0
- package/core/share/data-handler/data-handler.css +0 -0
- package/core/share/data-handler/data-handler.html +13 -0
- package/core/share/data-handler/data-handler.ts +39 -0
- package/core/share/events-handler.service.ts +185 -0
- package/core/share/fun-field/fun-field.css +55 -0
- package/core/share/fun-field/fun-field.html +175 -0
- package/core/share/fun-field/fun-field.ts +363 -0
- package/core/share/input-trigger/input-trigger.css +16 -0
- package/core/share/input-trigger/input-trigger.html +114 -0
- package/core/share/input-trigger/input-trigger.ts +394 -0
- package/core/share/msg-tip-handler/msg-tip-handler.css +0 -0
- package/core/share/msg-tip-handler/msg-tip-handler.html +40 -0
- package/core/share/msg-tip-handler/msg-tip-handler.ts +46 -0
- package/core/share/refresh-data-source-handler/refresh-data-source-handler.css +0 -0
- package/core/share/refresh-data-source-handler/refresh-data-source-handler.html +29 -0
- package/core/share/refresh-data-source-handler/refresh-data-source-handler.ts +55 -0
- package/core/share/route-handler/route-handler.css +0 -0
- package/core/share/route-handler/route-handler.html +49 -0
- package/core/share/route-handler/route-handler.ts +51 -0
- package/core/share/set-data-source-handler/set-data-source-handler.css +0 -0
- package/core/share/set-data-source-handler/set-data-source-handler.html +23 -0
- package/core/share/set-data-source-handler/set-data-source-handler.ts +44 -0
- package/core/share/simple-menu/simple-menu.css +0 -0
- package/core/share/simple-menu/simple-menu.html +5 -0
- package/core/share/simple-menu/simple-menu.ts +17 -0
- package/core/share/tokens.ts +29 -0
- package/core/share/value-design-setting/value-design-setting.css +0 -0
- package/core/share/value-design-setting/value-design-setting.html +48 -0
- package/core/share/value-design-setting/value-design-setting.ts +54 -0
- package/core/utils/code-name.utils.ts +19 -0
- package/core/utils/components-loader.ts +29 -0
- package/core/utils/declaration.utils.ts +38 -0
- package/core/utils/dynamic.util.ts +57 -0
- package/core/utils/form-validators.ts +160 -0
- package/core/utils/form.util.ts +25 -0
- package/core/utils/http.utils.ts +8 -0
- package/core/utils/object.utils.ts +182 -0
- package/core/utils/scripts-loader.ts +25 -0
- package/ng-package.json +12 -0
- package/package.json +16 -217
- package/providers/ng-package.json +5 -0
- package/{fesm2022/ngx-axis-appforge-providers.mjs → providers/providers.ts} +8 -16
- package/providers/public-api.ts +1 -0
- package/public-api.ts +1 -0
- package/tsconfig.json +35 -0
- package/tsconfig.lib.json +19 -0
- package/tsconfig.lib.prod.json +11 -0
- package/axis-components/badge/design/index.d.ts +0 -5
- package/axis-components/badge/index.d.ts +0 -27
- package/axis-components/button/design/index.d.ts +0 -5
- package/axis-components/button/index.d.ts +0 -32
- package/axis-components/desc/design/index.d.ts +0 -5
- package/axis-components/desc/index.d.ts +0 -30
- package/axis-components/design/design/index.d.ts +0 -5
- package/axis-components/design/index.d.ts +0 -246
- package/axis-components/dynamic-container/design/index.d.ts +0 -5
- package/axis-components/dynamic-container/index.d.ts +0 -14
- package/axis-components/editor/index.d.ts +0 -33
- package/axis-components/flex/design/index.d.ts +0 -5
- package/axis-components/flex/index.d.ts +0 -20
- package/axis-components/form/design/index.d.ts +0 -5
- package/axis-components/form/index.d.ts +0 -30
- package/axis-components/form-item/design/index.d.ts +0 -5
- package/axis-components/form-item/index.d.ts +0 -34
- package/axis-components/icon/design/index.d.ts +0 -5
- package/axis-components/icon/index.d.ts +0 -16
- package/axis-components/image/design/index.d.ts +0 -5
- package/axis-components/image/index.d.ts +0 -16
- package/axis-components/index.d.ts +0 -5
- package/axis-components/input/design/index.d.ts +0 -5
- package/axis-components/input/index.d.ts +0 -27
- package/axis-components/input-component/design/index.d.ts +0 -5
- package/axis-components/input-component/index.d.ts +0 -33
- package/axis-components/input-icon/design/index.d.ts +0 -5
- package/axis-components/input-icon/index.d.ts +0 -24
- package/axis-components/input-json/design/index.d.ts +0 -5
- package/axis-components/input-json/index.d.ts +0 -24
- package/axis-components/input-number/design/index.d.ts +0 -5
- package/axis-components/input-number/index.d.ts +0 -25
- package/axis-components/modal/design/index.d.ts +0 -5
- package/axis-components/modal/index.d.ts +0 -33
- package/axis-components/scope/design/index.d.ts +0 -5
- package/axis-components/scope/index.d.ts +0 -24
- package/axis-components/single-selector/design/index.d.ts +0 -5
- package/axis-components/single-selector/index.d.ts +0 -37
- package/axis-components/splitter/design/index.d.ts +0 -5
- package/axis-components/splitter/index.d.ts +0 -28
- package/axis-components/table/design/index.d.ts +0 -5
- package/axis-components/table/index.d.ts +0 -183
- package/axis-components/text/design/index.d.ts +0 -5
- package/axis-components/text/index.d.ts +0 -24
- package/axis-components/textarea/design/index.d.ts +0 -5
- package/axis-components/textarea/index.d.ts +0 -25
- package/axis-components/tree-selector/design/index.d.ts +0 -5
- package/axis-components/tree-selector/index.d.ts +0 -76
- package/axis-components/upload/design/index.d.ts +0 -5
- package/axis-components/upload/index.d.ts +0 -51
- package/core/index.d.ts +0 -773
- package/fesm2022/ngx-axis-appforge-axis-components-badge-design.mjs +0 -191
- package/fesm2022/ngx-axis-appforge-axis-components-badge-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-badge.mjs +0 -39
- package/fesm2022/ngx-axis-appforge-axis-components-badge.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs +0 -116
- package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs +0 -78
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs +0 -224
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-desc.mjs +0 -51
- package/fesm2022/ngx-axis-appforge-axis-components-desc.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs +0 -69
- package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +0 -1746
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs +0 -65
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs +0 -26
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-editor.mjs +0 -99
- package/fesm2022/ngx-axis-appforge-axis-components-editor.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs +0 -98
- package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs +0 -31
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-design.mjs +0 -108
- package/fesm2022/ngx-axis-appforge-axis-components-form-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs +0 -242
- package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs +0 -144
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +0 -132
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-icon-design.mjs +0 -88
- package/fesm2022/ngx-axis-appforge-axis-components-icon-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-icon.mjs +0 -28
- package/fesm2022/ngx-axis-appforge-axis-components-icon.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-image-design.mjs +0 -75
- package/fesm2022/ngx-axis-appforge-axis-components-image-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-image.mjs +0 -43
- package/fesm2022/ngx-axis-appforge-axis-components-image.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs +0 -70
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs +0 -61
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-design.mjs +0 -142
- package/fesm2022/ngx-axis-appforge-axis-components-input-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon-design.mjs +0 -71
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon.mjs +0 -64
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-json-design.mjs +0 -60
- package/fesm2022/ngx-axis-appforge-axis-components-input-json-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs +0 -70
- package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-number-design.mjs +0 -107
- package/fesm2022/ngx-axis-appforge-axis-components-input-number-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input-number.mjs +0 -48
- package/fesm2022/ngx-axis-appforge-axis-components-input-number.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-input.mjs +0 -68
- package/fesm2022/ngx-axis-appforge-axis-components-input.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-modal-design.mjs +0 -181
- package/fesm2022/ngx-axis-appforge-axis-components-modal-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-modal.mjs +0 -74
- package/fesm2022/ngx-axis-appforge-axis-components-modal.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs +0 -330
- package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs +0 -55
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs +0 -120
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs +0 -102
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs +0 -178
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs +0 -49
- package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +0 -442
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +0 -452
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-text-design.mjs +0 -95
- package/fesm2022/ngx-axis-appforge-axis-components-text-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-text.mjs +0 -64
- package/fesm2022/ngx-axis-appforge-axis-components-text.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-textarea-design.mjs +0 -94
- package/fesm2022/ngx-axis-appforge-axis-components-textarea-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-textarea.mjs +0 -64
- package/fesm2022/ngx-axis-appforge-axis-components-textarea.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs +0 -222
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs +0 -295
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-upload-design.mjs +0 -146
- package/fesm2022/ngx-axis-appforge-axis-components-upload-design.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs +0 -156
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +0 -988
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +0 -3169
- package/fesm2022/ngx-axis-appforge-core.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge-providers.mjs.map +0 -1
- package/fesm2022/ngx-axis-appforge.mjs +0 -6
- package/fesm2022/ngx-axis-appforge.mjs.map +0 -1
- package/index.d.ts +0 -2
- package/providers/index.d.ts +0 -13
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { FunFieldBase, FormValidators, updateAndValidAll, copy, FunField, FunFieldValueBase, baseFbConfig, baseFunField, BaseDesignSetting, OptionsNode, SimpleMenu, nameCode } from 'ngx-axis-appforge/core';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { model, signal, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
import * as i8 from '@angular/forms';
|
|
5
|
-
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
-
import * as i9 from 'ng-zorro-antd/collapse';
|
|
7
|
-
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
8
|
-
import * as i10 from 'ng-zorro-antd/form';
|
|
9
|
-
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
10
|
-
import * as i13 from 'ng-zorro-antd/switch';
|
|
11
|
-
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
12
|
-
import * as i12 from 'ng-zorro-antd/input';
|
|
13
|
-
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
14
|
-
import * as i2 from 'ng-zorro-antd/grid';
|
|
15
|
-
import { NzGridModule } from 'ng-zorro-antd/grid';
|
|
16
|
-
import * as i3 from 'ng-zorro-antd/icon';
|
|
17
|
-
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
18
|
-
import { NzListModule } from 'ng-zorro-antd/list';
|
|
19
|
-
import { NzSpaceModule } from 'ng-zorro-antd/space';
|
|
20
|
-
import * as i1 from 'ng-zorro-antd/tag';
|
|
21
|
-
import { NzTagModule } from 'ng-zorro-antd/tag';
|
|
22
|
-
import * as i4 from 'ng-zorro-antd/empty';
|
|
23
|
-
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
24
|
-
import * as i5 from 'ng-zorro-antd/button';
|
|
25
|
-
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
26
|
-
import * as i7 from 'ng-zorro-antd/modal';
|
|
27
|
-
import { NzModalModule } from 'ng-zorro-antd/modal';
|
|
28
|
-
import * as i11 from 'ng-zorro-antd/select';
|
|
29
|
-
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
30
|
-
import { CommonModule } from '@angular/common';
|
|
31
|
-
import * as i14 from 'ng-zorro-antd/flex';
|
|
32
|
-
import { NzFlexModule } from 'ng-zorro-antd/flex';
|
|
33
|
-
import * as i15 from 'ng-zorro-antd/input-number';
|
|
34
|
-
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
35
|
-
import * as i6 from 'ng-zorro-antd/core/transition-patch';
|
|
36
|
-
|
|
37
|
-
class InputValidator extends FunFieldBase {
|
|
38
|
-
element;
|
|
39
|
-
constructor(element) {
|
|
40
|
-
super();
|
|
41
|
-
this.element = element;
|
|
42
|
-
}
|
|
43
|
-
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
44
|
-
showLine = signal(false, ...(ngDevMode ? [{ debugName: "showLine" }] : []));
|
|
45
|
-
onChange;
|
|
46
|
-
editIndex = -1;
|
|
47
|
-
showModal = model(false, ...(ngDevMode ? [{ debugName: "showModal" }] : []));
|
|
48
|
-
validatorDesc = computed(() => this.buildValidatorsDesc(), ...(ngDevMode ? [{ debugName: "validatorDesc" }] : []));
|
|
49
|
-
fg = this.fb.group({
|
|
50
|
-
type: ["required", FormValidators.required],
|
|
51
|
-
disabled: [undefined, FormValidators.requiredFun],
|
|
52
|
-
minLength: [],
|
|
53
|
-
maxLength: [],
|
|
54
|
-
minValue: [],
|
|
55
|
-
maxValue: [],
|
|
56
|
-
pattern: [],
|
|
57
|
-
});
|
|
58
|
-
funFields = {
|
|
59
|
-
disabled: {
|
|
60
|
-
defaultValue: false
|
|
61
|
-
},
|
|
62
|
-
minLength: {
|
|
63
|
-
defaultValue: null
|
|
64
|
-
},
|
|
65
|
-
maxLength: {
|
|
66
|
-
defaultValue: null
|
|
67
|
-
},
|
|
68
|
-
minValue: {
|
|
69
|
-
defaultValue: null
|
|
70
|
-
},
|
|
71
|
-
maxValue: {
|
|
72
|
-
defaultValue: null
|
|
73
|
-
},
|
|
74
|
-
pattern: {
|
|
75
|
-
defaultValue: ""
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
writeValue(v) {
|
|
79
|
-
this.value.set(v);
|
|
80
|
-
}
|
|
81
|
-
registerOnChange(fn) {
|
|
82
|
-
this.onChange = fn;
|
|
83
|
-
}
|
|
84
|
-
registerOnTouched(fn) { }
|
|
85
|
-
ngAfterViewInit() {
|
|
86
|
-
if (this.element.nativeElement.nextElementSibling) {
|
|
87
|
-
this.showLine.set(true);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
buildValidatorsDesc() {
|
|
91
|
-
return this.value()?.map(v => {
|
|
92
|
-
switch (v.type) {
|
|
93
|
-
case "required":
|
|
94
|
-
return "此项必填";
|
|
95
|
-
case "length":
|
|
96
|
-
return `长度范围:${this.wrapNumberField(v, "minLength")} ~ ${this.wrapNumberField(v, "maxLength")}`;
|
|
97
|
-
case "value":
|
|
98
|
-
return `值范围:${this.wrapNumberField(v, "minValue")} ~ ${this.wrapNumberField(v, "maxValue")}`;
|
|
99
|
-
case "regex":
|
|
100
|
-
return `表达式:${this.wrapFunField(v, "pattern")}`;
|
|
101
|
-
default:
|
|
102
|
-
return "";
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
wrapFunField(obj, field) {
|
|
107
|
-
if (obj.hasOwnProperty(`$${field}`)) {
|
|
108
|
-
return "[动态值]";
|
|
109
|
-
}
|
|
110
|
-
return obj[field];
|
|
111
|
-
}
|
|
112
|
-
wrapNumberField(obj, field) {
|
|
113
|
-
const value = this.wrapFunField(obj, field);
|
|
114
|
-
if (typeof value != "number" && !value) {
|
|
115
|
-
return "[不限制]";
|
|
116
|
-
}
|
|
117
|
-
return value;
|
|
118
|
-
}
|
|
119
|
-
openWithCreate() {
|
|
120
|
-
this.editIndex = -1;
|
|
121
|
-
this.reset();
|
|
122
|
-
this.showModal.set(true);
|
|
123
|
-
}
|
|
124
|
-
openWithUpdate(index) {
|
|
125
|
-
this.editIndex = index;
|
|
126
|
-
this.reset(this.value()[this.editIndex]);
|
|
127
|
-
this.showModal.set(true);
|
|
128
|
-
}
|
|
129
|
-
save() {
|
|
130
|
-
if (updateAndValidAll(this.fg)) {
|
|
131
|
-
const nextValue = copy(this.value() ?? [], true);
|
|
132
|
-
const validator = this.recoverFunField(this.fg.value);
|
|
133
|
-
if (this.editIndex == -1) {
|
|
134
|
-
nextValue.push(validator);
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
nextValue[this.editIndex] = validator;
|
|
138
|
-
}
|
|
139
|
-
this.showModal.set(false);
|
|
140
|
-
this.value.set(nextValue);
|
|
141
|
-
this.onChange(this.value());
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
deleteValidator(index) {
|
|
145
|
-
this.value().splice(index, 1);
|
|
146
|
-
this.value.set([...this.value()]);
|
|
147
|
-
this.onChange(this.value());
|
|
148
|
-
}
|
|
149
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: InputValidator, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
150
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: InputValidator, isStandalone: true, selector: "axis-design-form-item-setting-input-validator", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, showModal: { classPropertyName: "showModal", publicName: "showModal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", showModal: "showModalChange" }, providers: [
|
|
151
|
-
{
|
|
152
|
-
provide: NG_VALUE_ACCESSOR,
|
|
153
|
-
useExisting: forwardRef(() => InputValidator),
|
|
154
|
-
multi: true
|
|
155
|
-
},
|
|
156
|
-
], usesInheritance: true, ngImport: i0, template: "<nz-collapse [nzBordered]=\"false\">\n <ng-template #addButton>\n <a nz-button nzType=\"link\" style=\"float: right;\" (click)=\"$event.stopPropagation();openWithCreate()\">\n <nz-icon nzType=\"plus\"></nz-icon>\n \u6DFB\u52A0\n </a>\n </ng-template>\n <nz-collapse-panel nzHeader=\"\u8868\u5355\u9879\u9A8C\u8BC1\" nzActive [nzExtra]=\"addButton\">\n @if (!value()?.length) {\n <nz-empty nzNotFoundContent=\"\u6682\u65E0\u9A8C\u8BC1\u5668\"></nz-empty>\n }@else{\n <div nz-flex nzVertical nzGap=\"8px\" style=\"padding: 6px;\">\n @for (item of value()??[]; track item;let i=$index) {\n <div nz-flex nzGap=\"8px\" nzAlign=\"center\">\n <div style=\"width: 64px;\">\n @switch (item.type) {\n @case (\"required\") {\n <nz-tag nzColor=\"magenta\">\u5FC5\u586B\u9A8C\u8BC1</nz-tag>\n }\n @case (\"length\") {\n <nz-tag nzColor=\"blue\">\u957F\u5EA6\u9A8C\u8BC1</nz-tag>\n }\n @case (\"value\") {\n <nz-tag nzColor=\"purple\">\u503C\u9A8C\u8BC1</nz-tag>\n }\n @case (\"regex\") {\n <nz-tag nzColor=\"cyan\">\u6B63\u5219\u9A8C\u8BC1</nz-tag>\n }\n }\n </div>\n <div class=\"validator-desc\">{{validatorDesc()?.[i]}}</div>\n <div>\n <a nz-button nzType=\"link\" nzSize=\"small\" (click)=\"openWithUpdate(i)\">\n <i nz-icon nzType=\"edit\" nzTheme=\"outline\"></i>\n </a>\n <a nz-button nzType=\"link\" nzSize=\"small\" nzDanger (click)=\"deleteValidator(i)\">\n <i nz-icon nzType=\"delete\" nzTheme=\"outline\"></i>\n </a>\n </div>\n </div>\n }\n </div>\n }\n </nz-collapse-panel>\n @if (showLine()) {\n <div></div>\n }\n</nz-collapse>\n\n<nz-modal [(nzVisible)]=\"showModal\" nzTitle=\"\u9A8C\u8BC1\u5668\" nzWidth=\"450px\" (nzOnCancel)=\"showModal.set(false)\" (nzOnOk)=\"save()\">\n <ng-container *nzModalContent>\n <form [formGroup]=\"fg\" nz-form>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u9A8C\u8BC1\u7C7B\u578B\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <nz-select formControlName=\"type\">\n <nz-option nzValue=\"required\" nzLabel=\"\u5FC5\u586B\u9A8C\u8BC1\"></nz-option>\n <nz-option nzValue=\"length\" nzLabel=\"\u957F\u5EA6\u9A8C\u8BC1\"></nz-option>\n <nz-option nzValue=\"value\" nzLabel=\"\u503C\u9A8C\u8BC1\"></nz-option>\n <nz-option nzValue=\"regex\" nzLabel=\"\u6B63\u5219\u9A8C\u8BC1\"></nz-option>\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u7981\u7528\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"disabled\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @switch (fg.value.type) {\n @case (\"length\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6700\u5C0F\u957F\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"minLength\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"\u4E0D\u9650\u5236\" nzMin=\"0\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6700\u5927\u957F\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"maxLength\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"\u4E0D\u9650\u5236\" nzMin=\"0\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n @case (\"value\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6700\u5C0F\u503C\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"minValue\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"\u4E0D\u9650\u5236\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6700\u5927\u503C\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"maxValue\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"\u4E0D\u9650\u5236\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n @case (\"regex\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6B63\u5219\u8868\u8FBE\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"pattern\">\n <input nz-input nzPlaceHolder=\"\u8F93\u5165\u6B63\u5219\u8868\u8FBE\u5F0F\" ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n }\n </form>\n </ng-container>\n</nz-modal>", styles: [".validator-desc{flex:1;font-size:12px;color:#00000073;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: NzListModule }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i1.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzSpaceModule }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i4.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i5.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i6.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i7.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i7.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i9.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i9.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition"], exportAs: ["nzCollapse"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i10.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i10.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i10.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i10.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i8.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FunField, selector: "axis-fun-field", inputs: ["scopes", "exclude", "scopeId", "onlyFun", "noListen", "disabled", "editTip", "value", "open", "showCreateListenModal", "createListenDataSourceName"], outputs: ["valueChange", "openChange", "showCreateListenModalChange", "createListenDataSourceNameChange"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i11.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i11.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i13.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i14.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i15.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzVariant", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls"], outputs: ["nzBlur", "nzFocus", "nzOnStep"], exportAs: ["nzInputNumber"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
157
|
-
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: InputValidator, decorators: [{
|
|
159
|
-
type: Component,
|
|
160
|
-
args: [{ selector: 'axis-design-form-item-setting-input-validator', imports: [NzListModule, NzTagModule, NzSpaceModule, NzGridModule, NzIconModule, NzEmptyModule, NzButtonModule, NzModalModule, FormsModule, NzCollapseModule, NzFormModule, ReactiveFormsModule, FunField, NzSelectModule, NzInputModule, NzSwitchModule, CommonModule, NzFlexModule, NzInputNumberModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
161
|
-
{
|
|
162
|
-
provide: NG_VALUE_ACCESSOR,
|
|
163
|
-
useExisting: forwardRef(() => InputValidator),
|
|
164
|
-
multi: true
|
|
165
|
-
},
|
|
166
|
-
], template: "<nz-collapse [nzBordered]=\"false\">\n <ng-template #addButton>\n <a nz-button nzType=\"link\" style=\"float: right;\" (click)=\"$event.stopPropagation();openWithCreate()\">\n <nz-icon nzType=\"plus\"></nz-icon>\n \u6DFB\u52A0\n </a>\n </ng-template>\n <nz-collapse-panel nzHeader=\"\u8868\u5355\u9879\u9A8C\u8BC1\" nzActive [nzExtra]=\"addButton\">\n @if (!value()?.length) {\n <nz-empty nzNotFoundContent=\"\u6682\u65E0\u9A8C\u8BC1\u5668\"></nz-empty>\n }@else{\n <div nz-flex nzVertical nzGap=\"8px\" style=\"padding: 6px;\">\n @for (item of value()??[]; track item;let i=$index) {\n <div nz-flex nzGap=\"8px\" nzAlign=\"center\">\n <div style=\"width: 64px;\">\n @switch (item.type) {\n @case (\"required\") {\n <nz-tag nzColor=\"magenta\">\u5FC5\u586B\u9A8C\u8BC1</nz-tag>\n }\n @case (\"length\") {\n <nz-tag nzColor=\"blue\">\u957F\u5EA6\u9A8C\u8BC1</nz-tag>\n }\n @case (\"value\") {\n <nz-tag nzColor=\"purple\">\u503C\u9A8C\u8BC1</nz-tag>\n }\n @case (\"regex\") {\n <nz-tag nzColor=\"cyan\">\u6B63\u5219\u9A8C\u8BC1</nz-tag>\n }\n }\n </div>\n <div class=\"validator-desc\">{{validatorDesc()?.[i]}}</div>\n <div>\n <a nz-button nzType=\"link\" nzSize=\"small\" (click)=\"openWithUpdate(i)\">\n <i nz-icon nzType=\"edit\" nzTheme=\"outline\"></i>\n </a>\n <a nz-button nzType=\"link\" nzSize=\"small\" nzDanger (click)=\"deleteValidator(i)\">\n <i nz-icon nzType=\"delete\" nzTheme=\"outline\"></i>\n </a>\n </div>\n </div>\n }\n </div>\n }\n </nz-collapse-panel>\n @if (showLine()) {\n <div></div>\n }\n</nz-collapse>\n\n<nz-modal [(nzVisible)]=\"showModal\" nzTitle=\"\u9A8C\u8BC1\u5668\" nzWidth=\"450px\" (nzOnCancel)=\"showModal.set(false)\" (nzOnOk)=\"save()\">\n <ng-container *nzModalContent>\n <form [formGroup]=\"fg\" nz-form>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u9A8C\u8BC1\u7C7B\u578B\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <nz-select formControlName=\"type\">\n <nz-option nzValue=\"required\" nzLabel=\"\u5FC5\u586B\u9A8C\u8BC1\"></nz-option>\n <nz-option nzValue=\"length\" nzLabel=\"\u957F\u5EA6\u9A8C\u8BC1\"></nz-option>\n <nz-option nzValue=\"value\" nzLabel=\"\u503C\u9A8C\u8BC1\"></nz-option>\n <nz-option nzValue=\"regex\" nzLabel=\"\u6B63\u5219\u9A8C\u8BC1\"></nz-option>\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u7981\u7528\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"disabled\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @switch (fg.value.type) {\n @case (\"length\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6700\u5C0F\u957F\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"minLength\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"\u4E0D\u9650\u5236\" nzMin=\"0\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6700\u5927\u957F\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"maxLength\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"\u4E0D\u9650\u5236\" nzMin=\"0\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n @case (\"value\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6700\u5C0F\u503C\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"minValue\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"\u4E0D\u9650\u5236\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6700\u5927\u503C\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"maxValue\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"\u4E0D\u9650\u5236\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n @case (\"regex\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6B63\u5219\u8868\u8FBE\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"pattern\">\n <input nz-input nzPlaceHolder=\"\u8F93\u5165\u6B63\u5219\u8868\u8FBE\u5F0F\" ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n }\n </form>\n </ng-container>\n</nz-modal>", styles: [".validator-desc{flex:1;font-size:12px;color:#00000073;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
167
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
168
|
-
|
|
169
|
-
class Setting extends FunFieldValueBase {
|
|
170
|
-
fg = this.fb.group({
|
|
171
|
-
...baseFbConfig,
|
|
172
|
-
name: [],
|
|
173
|
-
label: [],
|
|
174
|
-
labelWidth: [undefined, FormValidators.requiredFun],
|
|
175
|
-
validators: [],
|
|
176
|
-
});
|
|
177
|
-
funFields = {
|
|
178
|
-
...baseFunField,
|
|
179
|
-
name: {
|
|
180
|
-
defaultValue: "unknown",
|
|
181
|
-
},
|
|
182
|
-
label: {
|
|
183
|
-
defaultValue: "未命名",
|
|
184
|
-
},
|
|
185
|
-
labelWidth: {
|
|
186
|
-
defaultValue: "120px",
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Setting, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
190
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: Setting, isStandalone: true, selector: "axis-design-form-item-setting", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u8868\u5355\u9879\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"name\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u8868\u5355\u9879\u6807\u7B7E\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"label\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u6807\u7B7E\u5BBD\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"labelWidth\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-design-form-item-setting-input-validator\n formControlName=\"validators\"></axis-design-form-item-setting-input-validator>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n </nz-collapse>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i10.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i10.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i10.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i10.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i8.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i9.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i9.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition"], exportAs: ["nzCollapse"] }, { kind: "component", type: BaseDesignSetting, selector: "axis-base-design-setting", inputs: ["scopeId", "exclude", "fg"] }, { kind: "component", type: FunField, selector: "axis-fun-field", inputs: ["scopes", "exclude", "scopeId", "onlyFun", "noListen", "disabled", "editTip", "value", "open", "showCreateListenModal", "createListenDataSourceName"], outputs: ["valueChange", "openChange", "showCreateListenModalChange", "createListenDataSourceNameChange"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: InputValidator, selector: "axis-design-form-item-setting-input-validator", inputs: ["value", "showModal"], outputs: ["valueChange", "showModalChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
191
|
-
}
|
|
192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: Setting, decorators: [{
|
|
193
|
-
type: Component,
|
|
194
|
-
args: [{ selector: 'axis-design-form-item-setting', imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, FunField, NzSwitchModule, NzInputModule, InputValidator], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u8868\u5355\u9879\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"name\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u8868\u5355\u9879\u6807\u7B7E\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"label\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u6807\u7B7E\u5BBD\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"labelWidth\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-design-form-item-setting-input-validator\n formControlName=\"validators\"></axis-design-form-item-setting-input-validator>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n </nz-collapse>\n</form>" }]
|
|
195
|
-
}] });
|
|
196
|
-
|
|
197
|
-
const Config = {
|
|
198
|
-
componentName: "表单项",
|
|
199
|
-
buildOptionsNodes(nextInfo) {
|
|
200
|
-
return {
|
|
201
|
-
treeNode: new OptionsNode({
|
|
202
|
-
parentId: nextInfo.parentId,
|
|
203
|
-
scopeId: nextInfo.scopeId,
|
|
204
|
-
name: nameCode("表单项", nextInfo.currentObject.name),
|
|
205
|
-
canSetting: true,
|
|
206
|
-
canDrag: true,
|
|
207
|
-
dragType: "component",
|
|
208
|
-
canDrop: true,
|
|
209
|
-
dropType: "component",
|
|
210
|
-
dropObj: nextInfo.currentObject,
|
|
211
|
-
defaultDropIndex: "child",
|
|
212
|
-
parentObj: nextInfo.parentObject,
|
|
213
|
-
indexOfParentObj: nextInfo.indexOfParent,
|
|
214
|
-
rootOptions: nextInfo.currentObject,
|
|
215
|
-
children: [],
|
|
216
|
-
settingType: Setting,
|
|
217
|
-
contextMenu: SimpleMenu,
|
|
218
|
-
icon: "form"
|
|
219
|
-
}),
|
|
220
|
-
next: [
|
|
221
|
-
{
|
|
222
|
-
parentObject: nextInfo.currentObject,
|
|
223
|
-
indexOfParent: "child",
|
|
224
|
-
parentId: nextInfo.currentObject.id,
|
|
225
|
-
scopeId: nextInfo.scopeId
|
|
226
|
-
}
|
|
227
|
-
],
|
|
228
|
-
};
|
|
229
|
-
},
|
|
230
|
-
bindElementsOptionsNode(element, options) {
|
|
231
|
-
return {
|
|
232
|
-
[options.id]: { element, dropElement: element.querySelector(".ant-form-item-control-input-content") ?? element }
|
|
233
|
-
};
|
|
234
|
-
},
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Generated bundle index. Do not edit.
|
|
239
|
-
*/
|
|
240
|
-
|
|
241
|
-
export { Config };
|
|
242
|
-
//# sourceMappingURL=ngx-axis-appforge-axis-components-form-item-design.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-axis-appforge-axis-components-form-item-design.mjs","sources":["../../../axis-components/form-item/design/setting/input-validator/input-validator.ts","../../../axis-components/form-item/design/setting/input-validator/input-validator.html","../../../axis-components/form-item/design/setting/setting.ts","../../../axis-components/form-item/design/setting/setting.html","../../../axis-components/form-item/design/config.ts","../../../axis-components/form-item/design/ngx-axis-appforge-axis-components-form-item-design.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, ElementRef, forwardRef, model, signal } from \"@angular/core\";\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule, UntypedFormGroup } from \"@angular/forms\";\nimport { copy, FormValidators, FunField, FunFieldBase, FunFieldOptions, updateAndValidAll } from \"ngx-axis-appforge/core\";\nimport { NzGridModule } from \"ng-zorro-antd/grid\";\nimport { NzIconModule } from \"ng-zorro-antd/icon\";\nimport { NzListModule } from \"ng-zorro-antd/list\";\nimport { NzSpaceModule } from \"ng-zorro-antd/space\";\nimport { NzTagModule } from \"ng-zorro-antd/tag\";\nimport { NzEmptyModule } from \"ng-zorro-antd/empty\";\nimport { NzButtonModule } from \"ng-zorro-antd/button\";\nimport { NzModalModule } from \"ng-zorro-antd/modal\";\nimport { NzCollapseModule } from \"ng-zorro-antd/collapse\";\nimport { NzFormModule } from \"ng-zorro-antd/form\";\nimport { NzSelectModule } from \"ng-zorro-antd/select\";\nimport { NzInputModule } from \"ng-zorro-antd/input\";\nimport { NzSwitchModule } from \"ng-zorro-antd/switch\";\nimport { CommonModule } from \"@angular/common\";\nimport { NzFlexModule } from \"ng-zorro-antd/flex\";\nimport { NzInputNumberModule } from \"ng-zorro-antd/input-number\";\n\n@Component({\n selector: 'axis-design-form-item-setting-input-validator',\n imports: [NzListModule, NzTagModule, NzSpaceModule, NzGridModule, NzIconModule, NzEmptyModule, NzButtonModule, NzModalModule, FormsModule, NzCollapseModule, NzFormModule, ReactiveFormsModule, FunField, NzSelectModule, NzInputModule, NzSwitchModule, CommonModule, NzFlexModule, NzInputNumberModule],\n templateUrl: './input-validator.html',\n styleUrl: './input-validator.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputValidator),\n multi: true\n },\n ]\n})\nexport class InputValidator extends FunFieldBase implements ControlValueAccessor {\n\n constructor(private element: ElementRef) {\n super();\n }\n\n readonly value = model<any[]>();\n readonly showLine = signal(false);\n onChange: any;\n editIndex = -1;\n readonly showModal = model(false);\n readonly validatorDesc = computed(() => this.buildValidatorsDesc());\n\n override fg: UntypedFormGroup = this.fb.group({\n type: [\"required\", FormValidators.required],\n disabled: [undefined, FormValidators.requiredFun],\n minLength: [],\n maxLength: [],\n minValue: [],\n maxValue: [],\n pattern: [],\n });\n\n protected override funFields: FunFieldOptions = {\n disabled: {\n defaultValue: false\n },\n minLength: {\n defaultValue: null\n },\n maxLength: {\n defaultValue: null\n },\n minValue: {\n defaultValue: null\n },\n maxValue: {\n defaultValue: null\n },\n pattern: {\n defaultValue: \"\"\n }\n };\n\n writeValue(v: any): void {\n this.value.set(v);\n }\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: any): void { }\n\n ngAfterViewInit(): void {\n if (this.element.nativeElement.nextElementSibling) {\n this.showLine.set(true);\n }\n }\n\n private buildValidatorsDesc(): string[] | undefined {\n return this.value()?.map(v => {\n switch (v.type) {\n case \"required\":\n return \"此项必填\";\n case \"length\":\n return `长度范围:${this.wrapNumberField(v, \"minLength\")} ~ ${this.wrapNumberField(v, \"maxLength\")}`;\n case \"value\":\n return `值范围:${this.wrapNumberField(v, \"minValue\")} ~ ${this.wrapNumberField(v, \"maxValue\")}`;\n case \"regex\":\n return `表达式:${this.wrapFunField(v, \"pattern\")}`;\n default:\n return \"\";\n }\n })\n }\n\n private wrapFunField(obj: any, field: string): any {\n if (obj.hasOwnProperty(`$${field}`)) {\n return \"[动态值]\";\n }\n return obj[field];\n }\n\n private wrapNumberField(obj: any, field: string): any {\n const value = this.wrapFunField(obj, field);\n if (typeof value != \"number\" && !value) {\n return \"[不限制]\";\n }\n return value;\n }\n\n openWithCreate() {\n this.editIndex = -1;\n this.reset();\n this.showModal.set(true);\n }\n\n openWithUpdate(index: number) {\n this.editIndex = index;\n this.reset(this.value()![this.editIndex]);\n this.showModal.set(true);\n }\n\n save() {\n if (updateAndValidAll(this.fg)) {\n const nextValue = copy(this.value() ?? [], true);\n const validator = this.recoverFunField(this.fg.value)\n if (this.editIndex == -1) {\n nextValue.push(validator);\n } else {\n nextValue[this.editIndex] = validator;\n }\n this.showModal.set(false);\n this.value.set(nextValue);\n this.onChange(this.value());\n }\n }\n\n deleteValidator(index: number) {\n this.value()!.splice(index, 1);\n this.value.set([...this.value()!]);\n this.onChange(this.value());\n }\n\n}","<nz-collapse [nzBordered]=\"false\">\n <ng-template #addButton>\n <a nz-button nzType=\"link\" style=\"float: right;\" (click)=\"$event.stopPropagation();openWithCreate()\">\n <nz-icon nzType=\"plus\"></nz-icon>\n 添加\n </a>\n </ng-template>\n <nz-collapse-panel nzHeader=\"表单项验证\" nzActive [nzExtra]=\"addButton\">\n @if (!value()?.length) {\n <nz-empty nzNotFoundContent=\"暂无验证器\"></nz-empty>\n }@else{\n <div nz-flex nzVertical nzGap=\"8px\" style=\"padding: 6px;\">\n @for (item of value()??[]; track item;let i=$index) {\n <div nz-flex nzGap=\"8px\" nzAlign=\"center\">\n <div style=\"width: 64px;\">\n @switch (item.type) {\n @case (\"required\") {\n <nz-tag nzColor=\"magenta\">必填验证</nz-tag>\n }\n @case (\"length\") {\n <nz-tag nzColor=\"blue\">长度验证</nz-tag>\n }\n @case (\"value\") {\n <nz-tag nzColor=\"purple\">值验证</nz-tag>\n }\n @case (\"regex\") {\n <nz-tag nzColor=\"cyan\">正则验证</nz-tag>\n }\n }\n </div>\n <div class=\"validator-desc\">{{validatorDesc()?.[i]}}</div>\n <div>\n <a nz-button nzType=\"link\" nzSize=\"small\" (click)=\"openWithUpdate(i)\">\n <i nz-icon nzType=\"edit\" nzTheme=\"outline\"></i>\n </a>\n <a nz-button nzType=\"link\" nzSize=\"small\" nzDanger (click)=\"deleteValidator(i)\">\n <i nz-icon nzType=\"delete\" nzTheme=\"outline\"></i>\n </a>\n </div>\n </div>\n }\n </div>\n }\n </nz-collapse-panel>\n @if (showLine()) {\n <div></div>\n }\n</nz-collapse>\n\n<nz-modal [(nzVisible)]=\"showModal\" nzTitle=\"验证器\" nzWidth=\"450px\" (nzOnCancel)=\"showModal.set(false)\" (nzOnOk)=\"save()\">\n <ng-container *nzModalContent>\n <form [formGroup]=\"fg\" nz-form>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n 验证类型\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <nz-select formControlName=\"type\">\n <nz-option nzValue=\"required\" nzLabel=\"必填验证\"></nz-option>\n <nz-option nzValue=\"length\" nzLabel=\"长度验证\"></nz-option>\n <nz-option nzValue=\"value\" nzLabel=\"值验证\"></nz-option>\n <nz-option nzValue=\"regex\" nzLabel=\"正则验证\"></nz-option>\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n 禁用\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"disabled\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @switch (fg.value.type) {\n @case (\"length\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n 最小长度\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"minLength\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"不限制\" nzMin=\"0\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n 最大长度\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"maxLength\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"不限制\" nzMin=\"0\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n @case (\"value\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n 最小值\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"minValue\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"不限制\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n 最大值\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"maxValue\">\n <nz-input-number style=\"width: 100%\" nzPlaceHolder=\"不限制\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n @case (\"regex\") {\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n 正则表达式\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"pattern\">\n <input nz-input nzPlaceHolder=\"输入正则表达式\" ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n }\n </form>\n </ng-container>\n</nz-modal>","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { NzCollapseModule } from 'ng-zorro-antd/collapse';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { BaseDesignSetting, baseFbConfig, baseFunField, FunFieldValueBase, FunFieldOptions, FormValidators, FunField } from 'ngx-axis-appforge/core';\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { InputValidator } from \"./input-validator/input-validator\";\n\n@Component({\n selector: 'axis-design-form-item-setting',\n imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, FunField, NzSwitchModule, NzInputModule, InputValidator],\n templateUrl: './setting.html',\n styleUrl: './setting.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Setting extends FunFieldValueBase {\n\n override fg: UntypedFormGroup = this.fb.group({\n ...baseFbConfig,\n name: [],\n label: [],\n labelWidth: [undefined, FormValidators.requiredFun],\n validators: [],\n });\n\n protected override funFields: FunFieldOptions = {\n ...baseFunField,\n name: {\n defaultValue: \"unknown\",\n },\n label: {\n defaultValue: \"未命名\",\n },\n labelWidth: {\n defaultValue: \"120px\",\n },\n };\n\n}\n","<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"基本设置\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n 表单项名\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"name\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n 表单项标签\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"label\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 标签宽度\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"labelWidth\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-design-form-item-setting-input-validator\n formControlName=\"validators\"></axis-design-form-item-setting-input-validator>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n </nz-collapse>\n</form>","import { NextInfo, DesignBuildResult, DesignBindElementsResult, DesignConfig, OptionsNode, nameCode, SimpleMenu } from \"ngx-axis-appforge/core\";\nimport { Setting } from \"./setting/setting\";\n\nexport const Config: DesignConfig = {\n\n componentName: \"表单项\",\n buildOptionsNodes(nextInfo: NextInfo): DesignBuildResult {\n return {\n treeNode: new OptionsNode({\n parentId: nextInfo.parentId,\n scopeId: nextInfo.scopeId,\n name: nameCode(\"表单项\", nextInfo.currentObject.name),\n canSetting: true,\n canDrag: true,\n dragType: \"component\",\n canDrop: true,\n dropType: \"component\",\n dropObj: nextInfo.currentObject,\n defaultDropIndex: \"child\",\n parentObj: nextInfo.parentObject,\n indexOfParentObj: nextInfo.indexOfParent,\n rootOptions: nextInfo.currentObject,\n children: [],\n settingType: Setting,\n contextMenu: SimpleMenu,\n icon: \"form\"\n }),\n next: [\n {\n parentObject: nextInfo.currentObject,\n indexOfParent: \"child\",\n parentId: nextInfo.currentObject.id,\n scopeId: nextInfo.scopeId\n }\n ],\n };\n },\n bindElementsOptionsNode(element: HTMLElement, options: any): DesignBindElementsResult {\n return {\n [options.id]: { element, dropElement: element.querySelector(\".ant-form-item-control-input-content\") as HTMLElement ?? element }\n }\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './config';\n"],"names":["i1","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCM,MAAO,cAAe,SAAQ,YAAY,CAAA;AAExB,IAAA,OAAA;AAApB,IAAA,WAAA,CAAoB,OAAmB,EAAA;AACnC,QAAA,KAAK,EAAE;QADS,IAAA,CAAA,OAAO,GAAP,OAAO;;IAIlB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAS;AACtB,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,oDAAC;AACjC,IAAA,QAAQ;IACR,SAAS,GAAG,CAAC,CAAC;AACL,IAAA,SAAS,GAAG,KAAK,CAAC,KAAK,qDAAC;IACxB,aAAa,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,mBA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ChC,gBAAgB,EAAE,QAAQ,CAAC,aAAa;gBACxC,WAAW,EAAE,QAAQ,CAAC,aAAa;AACnC,gBAAA,QAAQ,EAAE,EAAE;AACZ,gBAAA,WAAW,EAAE,OAAO;AACpB,gBAAA,WAAW,EAAE,UAAU;AACvB,gBAAA,IAAI,EAAE;aACT,CAAC;AACF,YAAA,IAAI,EAAE;AACF,gBAAA;oBACI,YAAY,EAAE,QAAQ,CAAC,aAAa;AACpC,oBAAA,aAAa,EAAE,OAAO;AACtB,oBAAA,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE;oBACnC,OAAO,EAAE,QAAQ,CAAC;AACrB;AACJ,aAAA;SACJ;KACJ;IACD,uBAAuB,CAAC,OAAoB,EAAE,OAAY,EAAA;QACtD,OAAO;AACH,YAAA,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,aAAa,CAAC,sCAAsC,CAAgB,IAAI,OAAO;SAChI;KACJ;;;ACzCL;;AAEG;;;;"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, effect, inject, model, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { BaseOptions, Base, AXIS_FORM_REGISTE_CONTROL_TOKEN, FormValidators, DynamicDirective, AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN } from 'ngx-axis-appforge/core';
|
|
4
|
-
import * as i2 from 'ng-zorro-antd/form';
|
|
5
|
-
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
6
|
-
import * as i3 from '@angular/forms';
|
|
7
|
-
import { FormBuilder, FormsModule } from '@angular/forms';
|
|
8
|
-
import { merge, NEVER, debounceTime } from 'rxjs';
|
|
9
|
-
import * as i1 from 'ng-zorro-antd/grid';
|
|
10
|
-
|
|
11
|
-
class FormItemOptions extends BaseOptions {
|
|
12
|
-
name = "";
|
|
13
|
-
label = signal("", ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
14
|
-
labelWidth = signal("120px", ...(ngDevMode ? [{ debugName: "labelWidth" }] : []));
|
|
15
|
-
validators = signal([], ...(ngDevMode ? [{ debugName: "validators" }] : []));
|
|
16
|
-
child = signal(undefined, ...(ngDevMode ? [{ debugName: "child" }] : []));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
class FormItem extends Base {
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
if (this.getScope()) {
|
|
23
|
-
effect(() => {
|
|
24
|
-
this.control.setValidators(this.validatorSignal() ?? null);
|
|
25
|
-
});
|
|
26
|
-
effect(() => {
|
|
27
|
-
this.validatorSignal.set(this.buildSnapshotValidators());
|
|
28
|
-
this.unsubscribe(["validatorsChange"]);
|
|
29
|
-
this.addSubscribe(merge(...this.options.validators().map(v => this.getScope().dynamicOptions(v)?.obs ?? NEVER))
|
|
30
|
-
.pipe(debounceTime(50))
|
|
31
|
-
.subscribe(_ => {
|
|
32
|
-
this.validatorSignal.set(this.buildSnapshotValidators());
|
|
33
|
-
}), "validatorsChange");
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
options = new FormItemOptions();
|
|
38
|
-
registe = inject(AXIS_FORM_REGISTE_CONTROL_TOKEN, { optional: true });
|
|
39
|
-
fb = inject(FormBuilder);
|
|
40
|
-
control = this.fb.control([]);
|
|
41
|
-
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
42
|
-
validatorSignal = signal([], ...(ngDevMode ? [{ debugName: "validatorSignal" }] : []));
|
|
43
|
-
isRequired = computed(() => this.validatorSignal().includes(FormValidators.required), ...(ngDevMode ? [{ debugName: "isRequired" }] : []));
|
|
44
|
-
valueAccessValidFn;
|
|
45
|
-
ngOnInit() {
|
|
46
|
-
if (this.options.name) {
|
|
47
|
-
this.control.registerOnChange((v) => {
|
|
48
|
-
this.value.set(v);
|
|
49
|
-
});
|
|
50
|
-
this.registe?.({
|
|
51
|
-
name: this.options.name,
|
|
52
|
-
control: this.control,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
onModelChange(value) {
|
|
57
|
-
if (this.options.name) {
|
|
58
|
-
this.control.markAsDirty();
|
|
59
|
-
this.control.setValue(value);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
buildSnapshotValidators() {
|
|
63
|
-
return this.buildValidators(this.options.validators().map(v => this.getScope().snapshotOptions(v)));
|
|
64
|
-
}
|
|
65
|
-
buildValidators(validators) {
|
|
66
|
-
const output = [];
|
|
67
|
-
if (this.valueAccessValidFn) {
|
|
68
|
-
output.push(this.valueAccessValidFn);
|
|
69
|
-
}
|
|
70
|
-
for (const v of validators) {
|
|
71
|
-
if (v.disabled) {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
switch (v.type) {
|
|
75
|
-
case "required":
|
|
76
|
-
output.push(FormValidators.required);
|
|
77
|
-
break;
|
|
78
|
-
case "length":
|
|
79
|
-
if (v.minLength || v.minLength == 0) {
|
|
80
|
-
output.push(FormValidators.minLength(v.minLength));
|
|
81
|
-
}
|
|
82
|
-
if (v.maxLength || v.maxLength == 0) {
|
|
83
|
-
output.push(FormValidators.maxLength(v.maxLength));
|
|
84
|
-
}
|
|
85
|
-
break;
|
|
86
|
-
case "value":
|
|
87
|
-
if (v.minValue || v.minValue == 0) {
|
|
88
|
-
output.push(FormValidators.min(v.minValue));
|
|
89
|
-
}
|
|
90
|
-
if (v.maxValue || v.maxValue == 0) {
|
|
91
|
-
output.push(FormValidators.max(v.maxValue));
|
|
92
|
-
}
|
|
93
|
-
break;
|
|
94
|
-
case "regex":
|
|
95
|
-
if (v.pattern) {
|
|
96
|
-
output.push(FormValidators.pattern(v.pattern));
|
|
97
|
-
}
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return output;
|
|
102
|
-
}
|
|
103
|
-
registeValueAccess(opt) {
|
|
104
|
-
if (opt.initValue !== undefined) {
|
|
105
|
-
this.registe?.({
|
|
106
|
-
name: this.options.name,
|
|
107
|
-
initValue: opt.initValue
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
if (opt.validFn) {
|
|
111
|
-
this.valueAccessValidFn = (c) => opt.validFn(c) ? null : { error: true };
|
|
112
|
-
this.validatorSignal.set(this.buildSnapshotValidators());
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: FormItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
116
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: FormItem, isStandalone: true, selector: "axis-form-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
117
|
-
{
|
|
118
|
-
provide: AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN,
|
|
119
|
-
useFactory: (formItem) => {
|
|
120
|
-
return formItem.registeValueAccess.bind(formItem);
|
|
121
|
-
},
|
|
122
|
-
deps: [FormItem]
|
|
123
|
-
}
|
|
124
|
-
], usesInheritance: true, ngImport: i0, template: "@if (options.label()) {\n<nz-form-item style=\"width: 100%;\">\n <nz-form-label [style.width]=\"options.labelWidth()\" [nzRequired]=\"isRequired()\">\n {{options.label()}}\n </nz-form-label>\n <nz-form-control style=\"flex:1\" [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" [(ngModel)]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}@else {\n<div>\n <ng-container [axisDynamic]=\"options.child()\" [(ngModel)]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"></ng-container>\n</div>\n}", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i2.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i2.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i2.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
125
|
-
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: FormItem, decorators: [{
|
|
127
|
-
type: Component,
|
|
128
|
-
args: [{ selector: 'axis-form-item', imports: [NzFormModule, DynamicDirective, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
129
|
-
{
|
|
130
|
-
provide: AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN,
|
|
131
|
-
useFactory: (formItem) => {
|
|
132
|
-
return formItem.registeValueAccess.bind(formItem);
|
|
133
|
-
},
|
|
134
|
-
deps: [FormItem]
|
|
135
|
-
}
|
|
136
|
-
], template: "@if (options.label()) {\n<nz-form-item style=\"width: 100%;\">\n <nz-form-label [style.width]=\"options.labelWidth()\" [nzRequired]=\"isRequired()\">\n {{options.label()}}\n </nz-form-label>\n <nz-form-control style=\"flex:1\" [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" [(ngModel)]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}@else {\n<div>\n <ng-container [axisDynamic]=\"options.child()\" [(ngModel)]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"></ng-container>\n</div>\n}", styles: [":host{display:block;width:100%}\n"] }]
|
|
137
|
-
}], ctorParameters: () => [] });
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Generated bundle index. Do not edit.
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
export { FormItem };
|
|
144
|
-
//# sourceMappingURL=ngx-axis-appforge-axis-components-form-item.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-axis-appforge-axis-components-form-item.mjs","sources":["../../../axis-components/form-item/form-item.options.ts","../../../axis-components/form-item/form-item.ts","../../../axis-components/form-item/form-item.html","../../../axis-components/form-item/ngx-axis-appforge-axis-components-form-item.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { BaseOptions } from \"ngx-axis-appforge/core\";\n\nexport class FormItemOptions extends BaseOptions {\n\n readonly name = \"\";\n readonly label = signal(\"\");\n readonly labelWidth = signal(\"120px\");\n readonly validators = signal<any[]>([]);\n readonly child = signal<any>(undefined);\n\n}","import { ChangeDetectionStrategy, Component, computed, effect, inject, model, OnInit, signal } from '@angular/core';\nimport { FormItemOptions } from './form-item.options';\nimport { AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN, Base, DynamicDirective, FormValidators, RegisteValueAccessOptions } from 'ngx-axis-appforge/core';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { FormBuilder, FormsModule, ValidatorFn } from '@angular/forms';\nimport { debounceTime, merge, NEVER } from 'rxjs';\n\n@Component({\n selector: 'axis-form-item',\n imports: [NzFormModule, DynamicDirective, FormsModule],\n templateUrl: './form-item.html',\n styleUrl: './form-item.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN,\n useFactory: (formItem: FormItem) => {\n return formItem.registeValueAccess.bind(formItem);\n },\n deps: [FormItem]\n }\n ]\n})\nexport class FormItem extends Base<FormItemOptions> implements OnInit {\n\n constructor() {\n super();\n if (this.getScope()) {\n effect(() => {\n this.control.setValidators(this.validatorSignal() ?? null);\n });\n effect(() => {\n this.validatorSignal.set(this.buildSnapshotValidators());\n this.unsubscribe([\"validatorsChange\"]);\n this.addSubscribe(merge(...this.options.validators().map(v => this.getScope()!.dynamicOptions(v)?.obs ?? NEVER))\n .pipe(debounceTime(50))\n .subscribe(_ => {\n this.validatorSignal.set(this.buildSnapshotValidators());\n }), \"validatorsChange\");\n });\n }\n }\n\n protected override options: FormItemOptions = new FormItemOptions();\n private readonly registe = inject(AXIS_FORM_REGISTE_CONTROL_TOKEN, { optional: true });\n private readonly fb = inject(FormBuilder);\n readonly control = this.fb.control([]);\n readonly value = model<any>();\n readonly validatorSignal = signal<ValidatorFn[]>([]);\n readonly isRequired = computed(() => this.validatorSignal().includes(FormValidators.required));\n private valueAccessValidFn?: ValidatorFn;\n\n ngOnInit(): void {\n if (this.options.name) {\n this.control.registerOnChange((v: any) => {\n this.value.set(v);\n });\n this.registe?.({\n name: this.options.name,\n control: this.control,\n });\n }\n }\n\n onModelChange(value: any) {\n if (this.options.name) {\n this.control.markAsDirty();\n this.control.setValue(value);\n }\n }\n\n private buildSnapshotValidators(): ValidatorFn[] {\n return this.buildValidators(this.options.validators().map(v => this.getScope()!.snapshotOptions(v)));\n }\n\n private buildValidators(validators: any[]): ValidatorFn[] {\n const output: ValidatorFn[] = [];\n if (this.valueAccessValidFn) {\n output.push(this.valueAccessValidFn);\n }\n for (const v of validators) {\n if (v.disabled) {\n continue;\n }\n switch (v.type) {\n case \"required\":\n output.push(FormValidators.required);\n break;\n case \"length\":\n if (v.minLength || v.minLength == 0) {\n output.push(FormValidators.minLength(v.minLength));\n }\n if (v.maxLength || v.maxLength == 0) {\n output.push(FormValidators.maxLength(v.maxLength));\n }\n break;\n case \"value\":\n if (v.minValue || v.minValue == 0) {\n output.push(FormValidators.min(v.minValue));\n }\n if (v.maxValue || v.maxValue == 0) {\n output.push(FormValidators.max(v.maxValue));\n }\n break;\n case \"regex\":\n if (v.pattern) {\n output.push(FormValidators.pattern(v.pattern));\n }\n break;\n }\n }\n return output;\n }\n\n registeValueAccess(opt: RegisteValueAccessOptions) {\n if (opt.initValue !== undefined) {\n this.registe?.({\n name: this.options.name,\n initValue: opt.initValue\n });\n }\n if (opt.validFn) {\n this.valueAccessValidFn = (c) => opt.validFn!(c) ? null : { error: true };\n this.validatorSignal.set(this.buildSnapshotValidators());\n }\n }\n\n}","@if (options.label()) {\n<nz-form-item style=\"width: 100%;\">\n <nz-form-label [style.width]=\"options.labelWidth()\" [nzRequired]=\"isRequired()\">\n {{options.label()}}\n </nz-form-label>\n <nz-form-control style=\"flex:1\" [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" [(ngModel)]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}@else {\n<div>\n <ng-container [axisDynamic]=\"options.child()\" [(ngModel)]=\"value\"\n (ngModelChange)=\"onModelChange($event)\"></ng-container>\n</div>\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './form-item';\n"],"names":[],"mappings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