ngx-axis-appforge 0.0.0
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/README.md +111 -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 +29 -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/axis-components-covers/badge.svg +1 -0
- package/axis-components-covers/button.svg +14 -0
- package/axis-components-covers/desc.svg +39 -0
- package/axis-components-covers/design.jpg +0 -0
- package/axis-components-covers/dynamic-container.svg +9 -0
- package/axis-components-covers/flex.svg +33 -0
- package/axis-components-covers/form-item.svg +22 -0
- package/axis-components-covers/form.svg +38 -0
- package/axis-components-covers/icon.svg +22 -0
- package/axis-components-covers/image.svg +13 -0
- package/axis-components-covers/input-component.svg +27 -0
- package/axis-components-covers/input-icon.svg +29 -0
- package/axis-components-covers/input-json.svg +29 -0
- package/axis-components-covers/input-number.svg +35 -0
- package/axis-components-covers/input.svg +21 -0
- package/axis-components-covers/modal.svg +23 -0
- package/axis-components-covers/scope.svg +9 -0
- package/axis-components-covers/single-selector.svg +20 -0
- package/axis-components-covers/splitter.svg +8 -0
- package/axis-components-covers/table.svg +27 -0
- package/axis-components-covers/text.svg +22 -0
- package/axis-components-covers/textarea.svg +9 -0
- package/axis-components-covers/tree-selector.svg +77 -0
- package/axis-components-covers/upload.svg +26 -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 +13 -0
- package/package.json +37 -0
- package/providers/ng-package.json +5 -0
- package/providers/providers.ts +44 -0
- package/providers/public-api.ts +1 -0
- package/public-api.ts +1 -0
- package/tsconfig.json +38 -0
- package/tsconfig.lib.json +19 -0
- package/tsconfig.lib.prod.json +11 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, forwardRef, inject, input, model, signal } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule, UntypedFormGroup } from "@angular/forms";
|
|
3
|
+
import { AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, copy, DataSourceOptions, DynamicDirective, FormValidators, FunField, FunFieldBase, FunFieldOptions, ScopeInfo, updateAndValidAll } from "ngx-axis-appforge/core";
|
|
4
|
+
import { NzGridModule } from "ng-zorro-antd/grid";
|
|
5
|
+
import { NzIconModule } from "ng-zorro-antd/icon";
|
|
6
|
+
import { NzListModule } from "ng-zorro-antd/list";
|
|
7
|
+
import { NzSpaceModule } from "ng-zorro-antd/space";
|
|
8
|
+
import { NzTagModule } from "ng-zorro-antd/tag";
|
|
9
|
+
import { NzEmptyModule } from "ng-zorro-antd/empty";
|
|
10
|
+
import { NzMessageService } from "ng-zorro-antd/message";
|
|
11
|
+
import { NzButtonModule } from "ng-zorro-antd/button";
|
|
12
|
+
import { NzModalModule } from "ng-zorro-antd/modal";
|
|
13
|
+
import { NzCollapseModule } from "ng-zorro-antd/collapse";
|
|
14
|
+
import { NzFormModule } from "ng-zorro-antd/form";
|
|
15
|
+
import { NzRadioModule } from "ng-zorro-antd/radio";
|
|
16
|
+
import { NzSelectModule } from "ng-zorro-antd/select";
|
|
17
|
+
import { NzInputModule } from "ng-zorro-antd/input";
|
|
18
|
+
import { NzSwitchModule } from "ng-zorro-antd/switch";
|
|
19
|
+
import { CommonModule } from "@angular/common";
|
|
20
|
+
import { BehaviorSubject, map, Subscription, tap } from "rxjs";
|
|
21
|
+
import { CdkDragDrop, CdkDropList, CdkDrag, moveItemInArray, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
22
|
+
import { NzFlexModule } from "ng-zorro-antd/flex";
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@Component({
|
|
26
|
+
selector: 'axis-design-scope-setting-datasource-editor',
|
|
27
|
+
imports: [NzListModule, NzTagModule, NzSpaceModule, NzGridModule, NzIconModule, NzEmptyModule, NzButtonModule, NzModalModule, DynamicDirective, FormsModule, NzCollapseModule, NzFormModule, ReactiveFormsModule, NzRadioModule, FunField, NzSelectModule, NzInputModule, NzSwitchModule, CommonModule, CdkDropList, CdkDrag, CdkDragHandle, NzFlexModule],
|
|
28
|
+
templateUrl: './datasource-editor.html',
|
|
29
|
+
styleUrl: './datasource-editor.css',
|
|
30
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
|
+
providers: [
|
|
32
|
+
{
|
|
33
|
+
provide: NG_VALUE_ACCESSOR,
|
|
34
|
+
useExisting: forwardRef(() => DataSourceEditor),
|
|
35
|
+
multi: true
|
|
36
|
+
},
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
export class DataSourceEditor extends FunFieldBase implements ControlValueAccessor {
|
|
40
|
+
|
|
41
|
+
constructor(private element: ElementRef) {
|
|
42
|
+
super();
|
|
43
|
+
effect(() => this.refreshCurrentScopeInfo());
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
readonly scopeId = input<string>();
|
|
47
|
+
private readonly msg = inject(NzMessageService);
|
|
48
|
+
readonly getScopeInfos = inject(AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN);
|
|
49
|
+
readonly currentScopeInfo = signal<ScopeInfo | undefined>(undefined);
|
|
50
|
+
readonly value = model<DataSourceOptions[]>();
|
|
51
|
+
readonly ds = computed(() => this.buildDs());
|
|
52
|
+
readonly internalDataSources = computed(() => this.buildInternalDataSources());
|
|
53
|
+
readonly showDataSource = signal<any>(undefined);
|
|
54
|
+
readonly showLine = signal(false);
|
|
55
|
+
onChange: any;
|
|
56
|
+
sub?: Subscription;
|
|
57
|
+
|
|
58
|
+
override fg: UntypedFormGroup = this.fb.group({
|
|
59
|
+
name: [undefined, [FormValidators.required, FormValidators.pattern(/^[a-zA-Z_][a-zA-Z_0-9@\$]*$/)]],
|
|
60
|
+
skipOnExists: [false, FormValidators.required],
|
|
61
|
+
type: ['local', FormValidators.required],
|
|
62
|
+
api: this.fb.group({
|
|
63
|
+
url: [],
|
|
64
|
+
method: ["get", FormValidators.required],
|
|
65
|
+
body: [],
|
|
66
|
+
}),
|
|
67
|
+
data: [],
|
|
68
|
+
injectField: [],
|
|
69
|
+
cacheKey: [],
|
|
70
|
+
});
|
|
71
|
+
protected override funFields: FunFieldOptions = {
|
|
72
|
+
api: {
|
|
73
|
+
child: {
|
|
74
|
+
url: {
|
|
75
|
+
defaultValue: "",
|
|
76
|
+
},
|
|
77
|
+
method: {
|
|
78
|
+
defaultValue: "get",
|
|
79
|
+
},
|
|
80
|
+
body: {
|
|
81
|
+
defaultValue: null,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
data: {
|
|
86
|
+
defaultValue: undefined
|
|
87
|
+
},
|
|
88
|
+
cacheKey: {
|
|
89
|
+
defaultValue: "",
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
readonly showModal = model(false);
|
|
94
|
+
editIndex = -1;
|
|
95
|
+
oldDataSourceName?: string;
|
|
96
|
+
dataSourceNameRepeat = signal(false);
|
|
97
|
+
|
|
98
|
+
writeValue(v: any): void {
|
|
99
|
+
this.value.set(v);
|
|
100
|
+
}
|
|
101
|
+
registerOnChange(fn: any): void {
|
|
102
|
+
this.onChange = fn;
|
|
103
|
+
}
|
|
104
|
+
registerOnTouched(fn: any): void { }
|
|
105
|
+
|
|
106
|
+
copySuccess() {
|
|
107
|
+
this.msg.info("已复制");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
ngAfterViewInit(): void {
|
|
111
|
+
if (this.element.nativeElement.nextElementSibling) {
|
|
112
|
+
this.showLine.set(true);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
refreshCurrentScopeInfo() {
|
|
117
|
+
this.sub?.unsubscribe();
|
|
118
|
+
this.sub = this.getScopeInfos(this.scopeId()).pipe(map(sis => sis.find(scope => scope.scopeId == this.scopeId())))
|
|
119
|
+
.subscribe(si => {
|
|
120
|
+
this.currentScopeInfo.set(si);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private buildDs(): any {
|
|
125
|
+
const ds = this.currentScopeInfo() ? copy(this.currentScopeInfo()!.ds, true) : {};
|
|
126
|
+
for (const d of this.value() ?? []) {
|
|
127
|
+
if (!ds.hasOwnProperty(d.name)) {
|
|
128
|
+
ds[d.name] = "示例数据";
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return ds;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
private buildInternalDataSources(): DataSourceOptions[] {
|
|
135
|
+
const list: DataSourceOptions[] = [];
|
|
136
|
+
for (const name in this.currentScopeInfo()?.ds ?? {}) {
|
|
137
|
+
if (!this.value()?.some(d => d.name == name)) {
|
|
138
|
+
list.push({
|
|
139
|
+
name: name,
|
|
140
|
+
skipOnExists: false,
|
|
141
|
+
type: "local",
|
|
142
|
+
data: this.currentScopeInfo()!.ds[name]
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return list;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
openWithCreate() {
|
|
150
|
+
this.editIndex = -1;
|
|
151
|
+
this.oldDataSourceName = "";
|
|
152
|
+
this.reset({
|
|
153
|
+
name: "",
|
|
154
|
+
skipOnExists: false,
|
|
155
|
+
type: 'local'
|
|
156
|
+
});
|
|
157
|
+
this.changeType();
|
|
158
|
+
this.showModal.set(true);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
changeType() {
|
|
162
|
+
const apiCtrl = this.fg.get("api") as UntypedFormGroup;
|
|
163
|
+
switch (this.fg.value.type) {
|
|
164
|
+
case "local":
|
|
165
|
+
apiCtrl.get("url")?.setValidators([]);
|
|
166
|
+
this.fg.get("injectField")?.setValidators([]);
|
|
167
|
+
this.fg.get("cacheKey")?.setValidators([]);
|
|
168
|
+
break;
|
|
169
|
+
case "api":
|
|
170
|
+
apiCtrl.get("url")?.setValidators(FormValidators.requiredFun);
|
|
171
|
+
this.fg.get("injectField")?.setValidators([]);
|
|
172
|
+
this.fg.get("cacheKey")?.setValidators([]);
|
|
173
|
+
break;
|
|
174
|
+
case "inject":
|
|
175
|
+
apiCtrl.get("url")?.setValidators([]);
|
|
176
|
+
this.fg.get("injectField")?.setValidators([FormValidators.required]);
|
|
177
|
+
this.fg.get("cacheKey")?.setValidators([]);
|
|
178
|
+
break;
|
|
179
|
+
case "cache":
|
|
180
|
+
apiCtrl.get("url")?.setValidators([]);
|
|
181
|
+
this.fg.get("injectField")?.setValidators([]);
|
|
182
|
+
this.fg.get("cacheKey")?.setValidators([FormValidators.required]);
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
doShowDataSource(name: string) {
|
|
188
|
+
this.showDataSource.set({
|
|
189
|
+
name: name,
|
|
190
|
+
data: JSON.stringify(this.ds()[name], undefined, '\t')
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
updateDataSource(name: string) {
|
|
195
|
+
this.editIndex = this.value()!.findIndex((e: any) => e.name == name);
|
|
196
|
+
this.oldDataSourceName = name;
|
|
197
|
+
this.reset(this.value()![this.editIndex]);
|
|
198
|
+
this.changeType();
|
|
199
|
+
this.showModal.set(true);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
dataSourceValid(name: string) {
|
|
203
|
+
const allDataSourceNames = new Set<string>();
|
|
204
|
+
for (const ds of this.internalDataSources()) {
|
|
205
|
+
allDataSourceNames.add(ds.name);
|
|
206
|
+
}
|
|
207
|
+
for (const ds of this.value() ?? []) {
|
|
208
|
+
allDataSourceNames.add(ds.name);
|
|
209
|
+
}
|
|
210
|
+
this.dataSourceNameRepeat.set(!!name && name != this.oldDataSourceName && allDataSourceNames.has(name));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
save() {
|
|
214
|
+
if (updateAndValidAll(this.fg)) {
|
|
215
|
+
const nextValue = copy(this.value() ?? [], true);
|
|
216
|
+
const dataSource = this.recoverFunField(this.fg.value)
|
|
217
|
+
if (this.editIndex == -1) {
|
|
218
|
+
nextValue.push(dataSource);
|
|
219
|
+
} else {
|
|
220
|
+
nextValue[this.editIndex] = dataSource;
|
|
221
|
+
}
|
|
222
|
+
this.showModal.set(false);
|
|
223
|
+
this.value.set(nextValue);
|
|
224
|
+
this.onChange(this.value());
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
deleteDataSource(name: string) {
|
|
229
|
+
const index = this.value()!.findIndex((e: any) => e.name == name);
|
|
230
|
+
if (index != -1) {
|
|
231
|
+
this.value()!.splice(index, 1);
|
|
232
|
+
this.value.set([...this.value()!]);
|
|
233
|
+
this.onChange(this.value());
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
onDsDrop(e: CdkDragDrop<string[]>) {
|
|
238
|
+
if (e.previousIndex != e.currentIndex) {
|
|
239
|
+
moveItemInArray(this.value()!, e.previousIndex, e.currentIndex);
|
|
240
|
+
this.value.set([...this.value()!]);
|
|
241
|
+
this.onChange(this.value());
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<form [formGroup]="fg" nz-form>
|
|
2
|
+
<nz-collapse [nzBordered]="false">
|
|
3
|
+
<nz-collapse-panel nzHeader="基本设置" nzActive>
|
|
4
|
+
<nz-form-item>
|
|
5
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
6
|
+
域名称
|
|
7
|
+
</nz-form-label>
|
|
8
|
+
<nz-form-control nzSpan="16">
|
|
9
|
+
<input nz-input formControlName="scopeName" />
|
|
10
|
+
</nz-form-control>
|
|
11
|
+
</nz-form-item>
|
|
12
|
+
</nz-collapse-panel>
|
|
13
|
+
<axis-design-scope-setting-datasource-editor [scopeId]="value().id"
|
|
14
|
+
formControlName="dataSources"></axis-design-scope-setting-datasource-editor>
|
|
15
|
+
<axis-base-design-setting [fg]="fg" [exclude]="excludeDs()" [scopeId]="value().id"></axis-base-design-setting>
|
|
16
|
+
<axis-input-trigger formControlName="triggeEvents"
|
|
17
|
+
[eventDesc]="[{name:'dataChange',title:'数据变化',noListen:false}]"></axis-input-trigger>
|
|
18
|
+
</nz-collapse>
|
|
19
|
+
</form>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed } from '@angular/core';
|
|
2
|
+
import { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
4
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
5
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
6
|
+
import { BaseDesignSetting, baseFbConfig, baseFunField, FormValidators, FunFieldValueBase, FunFieldOptions, DataSourceOptions, InputTrigger } from 'ngx-axis-appforge/core';
|
|
7
|
+
import { DataSourceEditor } from './datasource-editor/datasource-editor';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'axis-design-scope-setting',
|
|
11
|
+
imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, NzInputModule, DataSourceEditor, InputTrigger],
|
|
12
|
+
templateUrl: './setting.html',
|
|
13
|
+
styleUrl: './setting.css',
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
})
|
|
16
|
+
export class Setting extends FunFieldValueBase {
|
|
17
|
+
|
|
18
|
+
override fg: UntypedFormGroup = this.fb.group({
|
|
19
|
+
...baseFbConfig,
|
|
20
|
+
scopeName: ["未命名", FormValidators.required],
|
|
21
|
+
dataSources: []
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
protected override funFields: FunFieldOptions = {
|
|
25
|
+
...baseFunField,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
excludeDs = computed(() => this.value().dataSources?.map((e: DataSourceOptions) => e.name))
|
|
29
|
+
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { signal } from "@angular/core";
|
|
2
|
+
import { BaseOptions, DataSourceOptions } from "ngx-axis-appforge/core";
|
|
3
|
+
|
|
4
|
+
export class ScopeOptions extends BaseOptions {
|
|
5
|
+
readonly scopeName = signal("未命名");
|
|
6
|
+
readonly dataSources = signal<DataSourceOptions[]>([]);
|
|
7
|
+
readonly child = signal<any>(undefined);
|
|
8
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Component, effect, OnInit, ViewChild } from '@angular/core';
|
|
2
|
+
import { ScopeOptions } from './scope.options';
|
|
3
|
+
import { ScopeDirective, DynamicDirective, Base, EventHandlerOptions } from 'ngx-axis-appforge/core';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'axis-scope',
|
|
8
|
+
imports: [ScopeDirective, DynamicDirective],
|
|
9
|
+
templateUrl: './scope.html',
|
|
10
|
+
styleUrl: './scope.css',
|
|
11
|
+
})
|
|
12
|
+
export class Scope extends Base<ScopeOptions> {
|
|
13
|
+
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
effect(() => this.listenDataChange());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
protected override options: ScopeOptions = new ScopeOptions();
|
|
20
|
+
|
|
21
|
+
@ViewChild(ScopeDirective, { static: true })
|
|
22
|
+
childScope!: ScopeDirective;
|
|
23
|
+
|
|
24
|
+
override triggeEvents(trigger: string, tempDataSource?: any, triggeEvents?: { [trigger: string]: EventHandlerOptions<any>[]; }, scope?: ScopeDirective): Observable<boolean> {
|
|
25
|
+
return super.triggeEvents(trigger, tempDataSource, triggeEvents, scope ?? this.childScope);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
override triggeEvent(e: EventHandlerOptions<unknown>, scope?: ScopeDirective): Observable<boolean> {
|
|
29
|
+
return super.triggeEvent(e, scope ?? this.childScope);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
listenDataChange(): void {
|
|
33
|
+
this.unsubscribe(["dataChange"]);
|
|
34
|
+
const dataChangeHandlers = this.options.triggeEvents()?.["dataChange"];
|
|
35
|
+
if (dataChangeHandlers) {
|
|
36
|
+
for (const handler of dataChangeHandlers) {
|
|
37
|
+
const io = this.childScope.dynamicOptions(handler, true);
|
|
38
|
+
if (io.init) {
|
|
39
|
+
this.triggeEvents("dataChange", undefined, { dataChange: [handler] }).subscribe();
|
|
40
|
+
}
|
|
41
|
+
if (io.obs) {
|
|
42
|
+
this.addSubscribe(io.obs.subscribe(_ => this.triggeEvents("dataChange", undefined, { dataChange: [handler] }).subscribe()), "dataChange");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { NextInfo, DesignBuildResult, DesignBindElementsResult, DesignConfig, OptionsNode, SimpleMenu } from "ngx-axis-appforge/core";
|
|
2
|
+
import { Setting } from "./setting/setting";
|
|
3
|
+
|
|
4
|
+
export const Config: DesignConfig = {
|
|
5
|
+
|
|
6
|
+
componentName: "单选器",
|
|
7
|
+
buildOptionsNodes(nextInfo: NextInfo): DesignBuildResult {
|
|
8
|
+
return {
|
|
9
|
+
treeNode: new OptionsNode({
|
|
10
|
+
parentId: nextInfo.parentId,
|
|
11
|
+
scopeId: nextInfo.scopeId,
|
|
12
|
+
name: "单选器",
|
|
13
|
+
canSetting: true,
|
|
14
|
+
canDrag: true,
|
|
15
|
+
dragType: "component",
|
|
16
|
+
parentObj: nextInfo.parentObject,
|
|
17
|
+
indexOfParentObj: nextInfo.indexOfParent,
|
|
18
|
+
rootOptions: nextInfo.currentObject,
|
|
19
|
+
settingType: Setting,
|
|
20
|
+
contextMenu: SimpleMenu,
|
|
21
|
+
icon: "select",
|
|
22
|
+
}),
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
bindElementsOptionsNode(element: HTMLElement, options: any): DesignBindElementsResult {
|
|
26
|
+
return {
|
|
27
|
+
[options.id]: { element },
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<form [formGroup]="fg" nz-form>
|
|
2
|
+
<nz-collapse [nzBordered]="false">
|
|
3
|
+
<nz-collapse-panel nzHeader="基本设置" nzActive>
|
|
4
|
+
<nz-form-item>
|
|
5
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
6
|
+
值字段
|
|
7
|
+
</nz-form-label>
|
|
8
|
+
<nz-form-control nzSpan="16">
|
|
9
|
+
<input nz-input formControlName="valueField" [nzAutocomplete]="fieldAuto" />
|
|
10
|
+
</nz-form-control>
|
|
11
|
+
</nz-form-item>
|
|
12
|
+
<nz-form-item>
|
|
13
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
14
|
+
名称字段
|
|
15
|
+
</nz-form-label>
|
|
16
|
+
<nz-form-control nzSpan="16">
|
|
17
|
+
<input nz-input formControlName="labelField" [nzAutocomplete]="fieldAuto" />
|
|
18
|
+
</nz-form-control>
|
|
19
|
+
</nz-form-item>
|
|
20
|
+
<nz-autocomplete #fieldAuto nzBackfill>
|
|
21
|
+
@for (f of fields(); track f) {
|
|
22
|
+
<nz-auto-option [nzLabel]="f" [nzValue]="f">
|
|
23
|
+
{{f}}
|
|
24
|
+
</nz-auto-option>
|
|
25
|
+
}
|
|
26
|
+
</nz-autocomplete>
|
|
27
|
+
<nz-form-item>
|
|
28
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
29
|
+
全部选项
|
|
30
|
+
</nz-form-label>
|
|
31
|
+
<nz-form-control nzSpan="16">
|
|
32
|
+
<axis-fun-field formControlName="showAll">
|
|
33
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
34
|
+
</axis-fun-field>
|
|
35
|
+
</nz-form-control>
|
|
36
|
+
</nz-form-item>
|
|
37
|
+
<nz-form-item>
|
|
38
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
39
|
+
默认第一项
|
|
40
|
+
</nz-form-label>
|
|
41
|
+
<nz-form-control nzSpan="16">
|
|
42
|
+
<nz-switch formControlName="defaultFirst"></nz-switch>
|
|
43
|
+
</nz-form-control>
|
|
44
|
+
</nz-form-item>
|
|
45
|
+
<nz-form-item>
|
|
46
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
47
|
+
完整对象值
|
|
48
|
+
</nz-form-label>
|
|
49
|
+
<nz-form-control nzSpan="16">
|
|
50
|
+
<nz-switch formControlName="fullValue"></nz-switch>
|
|
51
|
+
</nz-form-control>
|
|
52
|
+
</nz-form-item>
|
|
53
|
+
<nz-form-item>
|
|
54
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
55
|
+
选项数据
|
|
56
|
+
</nz-form-label>
|
|
57
|
+
<nz-form-control nzSpan="16">
|
|
58
|
+
<axis-fun-field #data formControlName="data">
|
|
59
|
+
<ng-container [axisDynamic]="{component:'axis-components/input-json',inuse:true}"
|
|
60
|
+
[standalone]="true" ngModel [ngModelOptions]="{standalone:true}"></ng-container>
|
|
61
|
+
</axis-fun-field>
|
|
62
|
+
</nz-form-control>
|
|
63
|
+
</nz-form-item>
|
|
64
|
+
</nz-collapse-panel>
|
|
65
|
+
<nz-collapse-panel nzHeader="外观设置">
|
|
66
|
+
<nz-form-item>
|
|
67
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
68
|
+
选择器类型
|
|
69
|
+
</nz-form-label>
|
|
70
|
+
<nz-form-control nzSpan="16">
|
|
71
|
+
<axis-fun-field formControlName="type">
|
|
72
|
+
<nz-select ngModel [ngModelOptions]="{standalone:true}">
|
|
73
|
+
<nz-option nzLabel="下拉选择" nzValue="selector"></nz-option>
|
|
74
|
+
<nz-option nzLabel="Radio" nzValue="radio"></nz-option>
|
|
75
|
+
<nz-option nzLabel="按钮选择" nzValue="button"></nz-option>
|
|
76
|
+
</nz-select>
|
|
77
|
+
</axis-fun-field>
|
|
78
|
+
</nz-form-control>
|
|
79
|
+
</nz-form-item>
|
|
80
|
+
@if (formValue().type?.funMode || formValue()?.type?.originValue == 'selector') {
|
|
81
|
+
<nz-form-item>
|
|
82
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
83
|
+
允许清空
|
|
84
|
+
</nz-form-label>
|
|
85
|
+
<nz-form-control nzSpan="16">
|
|
86
|
+
<axis-fun-field formControlName="allowClear">
|
|
87
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
88
|
+
</axis-fun-field>
|
|
89
|
+
</nz-form-control>
|
|
90
|
+
</nz-form-item>
|
|
91
|
+
<nz-form-item>
|
|
92
|
+
<nz-form-label nzSpan="8">
|
|
93
|
+
占位符
|
|
94
|
+
</nz-form-label>
|
|
95
|
+
<nz-form-control nzSpan="16">
|
|
96
|
+
<axis-fun-field formControlName="placeholder">
|
|
97
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
98
|
+
</axis-fun-field>
|
|
99
|
+
</nz-form-control>
|
|
100
|
+
</nz-form-item>
|
|
101
|
+
<nz-form-item>
|
|
102
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
103
|
+
自动获取焦点
|
|
104
|
+
</nz-form-label>
|
|
105
|
+
<nz-form-control nzSpan="16">
|
|
106
|
+
<nz-switch formControlName="autofocus"></nz-switch>
|
|
107
|
+
</nz-form-control>
|
|
108
|
+
</nz-form-item>
|
|
109
|
+
}
|
|
110
|
+
</nz-collapse-panel>
|
|
111
|
+
@if (formValue().type?.funMode || formValue()?.type?.originValue == 'selector') {
|
|
112
|
+
<nz-collapse-panel nzHeader="选项搜索">
|
|
113
|
+
<nz-form-item>
|
|
114
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
115
|
+
搜索选项
|
|
116
|
+
</nz-form-label>
|
|
117
|
+
<nz-form-control nzSpan="16">
|
|
118
|
+
<axis-fun-field formControlName="showSearch">
|
|
119
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
120
|
+
</axis-fun-field>
|
|
121
|
+
</nz-form-control>
|
|
122
|
+
</nz-form-item>
|
|
123
|
+
@if (formValue().showSearch?.funMode || formValue()?.showSearch?.originValue) {
|
|
124
|
+
<nz-form-item>
|
|
125
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
126
|
+
仅搜索后选择
|
|
127
|
+
</nz-form-label>
|
|
128
|
+
<nz-form-control nzSpan="16">
|
|
129
|
+
<axis-fun-field formControlName="selectOnSearch">
|
|
130
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
131
|
+
</axis-fun-field>
|
|
132
|
+
</nz-form-control>
|
|
133
|
+
</nz-form-item>
|
|
134
|
+
<nz-form-item>
|
|
135
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
136
|
+
后端搜索
|
|
137
|
+
</nz-form-label>
|
|
138
|
+
<nz-form-control nzSpan="16">
|
|
139
|
+
<axis-fun-field formControlName="backendSearch">
|
|
140
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
141
|
+
</axis-fun-field>
|
|
142
|
+
</nz-form-control>
|
|
143
|
+
</nz-form-item>
|
|
144
|
+
@if (formValue().backendSearch?.funMode || formValue()?.backendSearch?.originValue) {
|
|
145
|
+
<nz-form-item>
|
|
146
|
+
<nz-form-label nzSpan="8">
|
|
147
|
+
搜索最少字数
|
|
148
|
+
</nz-form-label>
|
|
149
|
+
<nz-form-control nzSpan="16">
|
|
150
|
+
<axis-fun-field formControlName="searchLimitLength">
|
|
151
|
+
<nz-input-number style="width: 100%;" nzPlaceHolder="默认1位" ngModel
|
|
152
|
+
[ngModelOptions]="{standalone:true}"></nz-input-number>
|
|
153
|
+
</axis-fun-field>
|
|
154
|
+
</nz-form-control>
|
|
155
|
+
</nz-form-item>
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
</nz-collapse-panel>
|
|
159
|
+
}
|
|
160
|
+
<axis-value-design-setting [fg]="fg"></axis-value-design-setting>
|
|
161
|
+
<axis-base-design-setting [fg]="fg"></axis-base-design-setting>
|
|
162
|
+
<axis-input-trigger formControlName="triggeEvents" [internalTriggers]="['valueChange']"></axis-input-trigger>
|
|
163
|
+
</nz-collapse>
|
|
164
|
+
</form>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, ViewChild } from '@angular/core';
|
|
2
|
+
import { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
|
|
4
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
5
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
6
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
7
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
8
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
9
|
+
import { BaseDesignSetting, baseFbConfig, baseFunField, DynamicDirective, FormValidators, FunField, FunFieldOptions, FunFieldValueBase, InputTrigger, ValueDesignSetting, valueFbConfig, valueFunField } from 'ngx-axis-appforge/core';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'axis-design-single-selector-setting',
|
|
13
|
+
imports: [FormsModule, NzCollapseModule, ReactiveFormsModule, NzFormModule, BaseDesignSetting, ValueDesignSetting, NzAutocompleteModule, NzInputModule, NzSelectModule, FunField, DynamicDirective, NzSwitchModule, InputTrigger],
|
|
14
|
+
templateUrl: './setting.html',
|
|
15
|
+
styleUrl: './setting.css',
|
|
16
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
|
+
})
|
|
18
|
+
export class Setting extends FunFieldValueBase {
|
|
19
|
+
|
|
20
|
+
override fg: UntypedFormGroup = this.fb.group({
|
|
21
|
+
...baseFbConfig,
|
|
22
|
+
...valueFbConfig,
|
|
23
|
+
labelField: ["title", FormValidators.required],
|
|
24
|
+
valueField: ["key", FormValidators.required],
|
|
25
|
+
fullValue: [false, FormValidators.required],
|
|
26
|
+
defaultFirst: [false, FormValidators.required],
|
|
27
|
+
data: [],
|
|
28
|
+
autofocus: [false, FormValidators.required],
|
|
29
|
+
type: [undefined, FormValidators.requiredFun],
|
|
30
|
+
showAll: [undefined, FormValidators.requiredFun],
|
|
31
|
+
allowClear: [undefined, FormValidators.requiredFun],
|
|
32
|
+
placeholder: [],
|
|
33
|
+
showSearch: [undefined, FormValidators.requiredFun],
|
|
34
|
+
selectOnSearch: [undefined, FormValidators.requiredFun],
|
|
35
|
+
backendSearch: [undefined, FormValidators.requiredFun],
|
|
36
|
+
searchLimitLength: [],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
protected override funFields: FunFieldOptions = {
|
|
40
|
+
...baseFunField,
|
|
41
|
+
...valueFunField,
|
|
42
|
+
data: {
|
|
43
|
+
defaultValue: undefined
|
|
44
|
+
},
|
|
45
|
+
type: {
|
|
46
|
+
defaultValue: "selector"
|
|
47
|
+
},
|
|
48
|
+
showAll: {
|
|
49
|
+
defaultValue: false
|
|
50
|
+
},
|
|
51
|
+
allowClear: {
|
|
52
|
+
defaultValue: true
|
|
53
|
+
},
|
|
54
|
+
placeholder: {
|
|
55
|
+
defaultValue: ""
|
|
56
|
+
},
|
|
57
|
+
showSearch: {
|
|
58
|
+
defaultValue: true
|
|
59
|
+
},
|
|
60
|
+
selectOnSearch: {
|
|
61
|
+
defaultValue: false
|
|
62
|
+
},
|
|
63
|
+
backendSearch: {
|
|
64
|
+
defaultValue: false
|
|
65
|
+
},
|
|
66
|
+
searchLimitLength: {
|
|
67
|
+
defaultValue: null
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
@ViewChild("data", { static: true })
|
|
72
|
+
dataFunField!: FunField;
|
|
73
|
+
|
|
74
|
+
fields = computed(() => {
|
|
75
|
+
if (this.dataFunField.computeResult()?.length) {
|
|
76
|
+
return Object.keys(this.dataFunField.computeResult()[0]);
|
|
77
|
+
}
|
|
78
|
+
return [];
|
|
79
|
+
})
|
|
80
|
+
}
|