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
package/.editorconfig
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.ts]
|
|
12
|
+
quote_type = single
|
|
13
|
+
ij_typescript_use_double_quotes = false
|
|
14
|
+
|
|
15
|
+
[*.md]
|
|
16
|
+
max_line_length = off
|
|
17
|
+
trim_trailing_whitespace = false
|
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Ngx-Axis-Appforge
|
|
2
|
+
|
|
3
|
+
基于 Angular 20 和 Ant Design 开发的 JSON 驱动动态页面生成库,完整覆盖 Ant Design 组件,并提供低代码配置组件的设计工具(本身也是动态组件之一)。本库旨在帮助开发者快速构建复杂的管理界面,通过可视化配置即可实现组件布局和属性设置。
|
|
4
|
+
|
|
5
|
+
## 特性
|
|
6
|
+
|
|
7
|
+
- **基于最新技术**:采用 Angular 20 和 ng-zorro-antd(Ant Design 的 Angular 实现)
|
|
8
|
+
- **全面的组件覆盖**:封装并优化了大部分 Ant Design 组件,提供统一的配置接口
|
|
9
|
+
- **JSON 驱动开发**:通过 JSON 配置文件动态生成页面结构和组件
|
|
10
|
+
- **低代码设计工具**:内置可视化设计器,支持拖拽式组件配置,该设计工具本身也是动态组件之一
|
|
11
|
+
- **灵活的数据绑定**:支持双向数据绑定和事件处理,轻松集成业务逻辑
|
|
12
|
+
- **可扩展性强**:提供清晰的接口和工具,方便开发者扩展自定义组件
|
|
13
|
+
|
|
14
|
+
## 安装
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install ngx-axis-appforge
|
|
18
|
+
npm install ng-zorro-antd
|
|
19
|
+
npm install ngx-clipboard
|
|
20
|
+
npm install monaco-editor
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 配置
|
|
24
|
+
|
|
25
|
+
在 `angular.json` 中进行以下配置:
|
|
26
|
+
|
|
27
|
+
1. 在 assets 中添加:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"glob": "**/*",
|
|
32
|
+
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
|
|
33
|
+
"output": "/assets/"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"glob": "**/*",
|
|
37
|
+
"input": "./node_modules/monaco-editor/min/vs",
|
|
38
|
+
"output": "/assets/vs/"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"glob": "**/*",
|
|
42
|
+
"input": "./node_modules/ngx-axis-appforge/components-covers",
|
|
43
|
+
"output": "/assets/components-covers/"
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
2. 在 styles 中添加:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
"node_modules/ng-zorro-antd/ng-zorro-antd.min.css"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
3. 在 app.config.ts 中添加:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
provideHttpClient(),
|
|
57
|
+
provideAxisComponents(),
|
|
58
|
+
provideAnimationsAsync(),
|
|
59
|
+
provideNzConfig({
|
|
60
|
+
codeEditor: {
|
|
61
|
+
assetsRoot: `http://localhost:4200/assets`
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 使用
|
|
67
|
+
|
|
68
|
+
### HTML 模板
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<ng-container [axisDynamic]="options()" [ngModel]="designValue"></ng-container>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### TypeScript 示例
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
options = signal({
|
|
78
|
+
component: "design",
|
|
79
|
+
inuse: true
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
designValue = {
|
|
83
|
+
component: "text",
|
|
84
|
+
id: "text",
|
|
85
|
+
inuse: true,
|
|
86
|
+
data: "hello axis appforge"
|
|
87
|
+
};
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 使用说明
|
|
91
|
+
|
|
92
|
+
1. **axisDynamic 指令**:这是本库的核心功能之一,接受一个 JSON 格式的数据作为输入,自动根据 JSON 内容动态生成相应的组件。JSON 数据的格式描述了组件类型、属性、布局等信息。
|
|
93
|
+
|
|
94
|
+
2. **双向数据绑定**:对于有值的组件(如 input 输入框),可以通过 ngModel 进行双向数据绑定。当组件内容发生变化时,绑定的数据会自动更新;反之,数据变化也会反映在组件上。
|
|
95
|
+
|
|
96
|
+
3. **design 组件**:这个组件是本库提供的可视化设计工具,允许开发者通过拖拽等方式搭建复杂页面。它会输出一个 JSON 数据,这个数据可以直接作为 axisDynamic 指令的输入,实现页面的动态生成。这意味着开发者无需手动编写 JSON 数据,而是通过可视化操作来创建页面结构。
|
|
97
|
+
|
|
98
|
+
## 功能概述
|
|
99
|
+
|
|
100
|
+
本库主要提供两个核心功能:
|
|
101
|
+
|
|
102
|
+
1. **JSON 驱动的动态页面生成功能**:通过解析 JSON 配置,动态创建包含各种 Ant Design 组件的复杂页面。开发者只需提供一个描述页面结构和组件属性的 JSON 对象,即可在指定位置渲染出完整的 UI 界面。
|
|
103
|
+
|
|
104
|
+
2. **低代码配置组件的设计工具**:提供可视化的设计器,支持拖拽式组件布局和属性配置。这个设计工具本身也是通过本库的动态组件功能实现的,展示了库的强大灵活性和可扩展性。
|
|
105
|
+
|
|
106
|
+
## 技术栈
|
|
107
|
+
|
|
108
|
+
- **框架**: Angular v20.0.0
|
|
109
|
+
- **UI 库**: ng-zorro-antd (Ant Design 的 Angular 实现)
|
|
110
|
+
- **构建工具**: Angular CLI v20.0.0
|
|
111
|
+
- **语言**: TypeScript (~5.8.2)
|
package/angular.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"ngx-axis-appforge": {
|
|
7
|
+
"projectType": "library",
|
|
8
|
+
"root": "./",
|
|
9
|
+
"sourceRoot": "./",
|
|
10
|
+
"prefix": "axis",
|
|
11
|
+
"architect": {
|
|
12
|
+
"build": {
|
|
13
|
+
"builder": "@angular/build:ng-packagr",
|
|
14
|
+
"options": {
|
|
15
|
+
"project": "./ng-package.json"
|
|
16
|
+
},
|
|
17
|
+
"configurations": {
|
|
18
|
+
"production": {
|
|
19
|
+
"tsConfig": "./tsconfig.lib.prod.json"
|
|
20
|
+
},
|
|
21
|
+
"development": {
|
|
22
|
+
"tsConfig": "./tsconfig.lib.json"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"defaultConfiguration": "development"
|
|
26
|
+
},
|
|
27
|
+
"test": {
|
|
28
|
+
"builder": "@angular/build:karma",
|
|
29
|
+
"options": {
|
|
30
|
+
"tsConfig": "./tsconfig.spec.json",
|
|
31
|
+
"polyfills": [
|
|
32
|
+
"zone.js",
|
|
33
|
+
"zone.js/testing"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@switch (options.type()) {
|
|
2
|
+
@case ("badge") {
|
|
3
|
+
<nz-badge [nzStandalone]="!options.child()" [nzCount]="options.dot()?0:options.count()"
|
|
4
|
+
[nzDot]="options.dot() && options.count()!=null && (options.showZero() || options.count()! > 0)"
|
|
5
|
+
[nzOverflowCount]="options.overflowCount()" [nzShowZero]="options.showZero()" [nzSize]="options.size()"
|
|
6
|
+
[nzOffset]="options.offset()" [nzStyle]="{backgroundColor:options.color()??''}" [nzTitle]="options.title()">
|
|
7
|
+
<ng-container [axisDynamic]="options.child()"></ng-container>
|
|
8
|
+
</nz-badge>
|
|
9
|
+
}
|
|
10
|
+
@case ("status") {
|
|
11
|
+
<nz-badge [nzColor]="options.status() == 'default'?options.color():undefined"
|
|
12
|
+
[nzStatus]="options.status()=='default'?undefined:options.status()" [nzText]="options.text()">
|
|
13
|
+
</nz-badge>
|
|
14
|
+
}
|
|
15
|
+
@case ("ribbon") {
|
|
16
|
+
<nz-ribbon [nzColor]="options.color()" [nzPlacement]="options.placement()" [nzText]="options.text()">
|
|
17
|
+
<ng-container [axisDynamic]="options.child()"></ng-container>
|
|
18
|
+
</nz-ribbon>
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { signal } from "@angular/core";
|
|
2
|
+
import { DataOptions } from "ngx-axis-appforge/core";
|
|
3
|
+
|
|
4
|
+
export class BadgeOptions extends DataOptions {
|
|
5
|
+
|
|
6
|
+
readonly type = signal<"badge" | "status" | "ribbon">("badge");
|
|
7
|
+
|
|
8
|
+
readonly showDot = signal(true);
|
|
9
|
+
readonly dot = signal(false);
|
|
10
|
+
readonly overflowCount = signal(Number.MAX_VALUE);
|
|
11
|
+
readonly showZero = signal(false);
|
|
12
|
+
readonly count = signal<number | undefined>(undefined);
|
|
13
|
+
readonly child = signal<any>(undefined);
|
|
14
|
+
readonly size = signal<"default" | "small">("default");
|
|
15
|
+
readonly offset = signal<[number, number] | undefined>(undefined);
|
|
16
|
+
readonly title = signal("");
|
|
17
|
+
|
|
18
|
+
readonly color = signal<string | undefined>(undefined);
|
|
19
|
+
readonly status = signal<'success' | 'processing' | 'default' | 'error' | 'warning'>("default");
|
|
20
|
+
readonly text = signal("");
|
|
21
|
+
|
|
22
|
+
readonly placement = signal<"start" | "end">("end");
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { BadgeOptions } from './badge.options';
|
|
3
|
+
import { Base, DynamicDirective } from 'ngx-axis-appforge/core';
|
|
4
|
+
import { NzBadgeModule } from 'ng-zorro-antd/badge';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'axis-badge',
|
|
8
|
+
imports: [NzBadgeModule, DynamicDirective],
|
|
9
|
+
templateUrl: './badge.html',
|
|
10
|
+
styleUrl: './badge.css',
|
|
11
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
+
})
|
|
13
|
+
export class Text extends Base<BadgeOptions> {
|
|
14
|
+
|
|
15
|
+
override options: BadgeOptions = new BadgeOptions();
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
let name;
|
|
9
|
+
switch (nextInfo.currentObject.type) {
|
|
10
|
+
case "status":
|
|
11
|
+
name = "状态";
|
|
12
|
+
break;
|
|
13
|
+
case "ribbon":
|
|
14
|
+
name = "缎带";
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
name = "徽标";
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
treeNode: new OptionsNode({
|
|
21
|
+
parentId: nextInfo.parentId,
|
|
22
|
+
scopeId: nextInfo.scopeId,
|
|
23
|
+
name: name,
|
|
24
|
+
canSetting: true,
|
|
25
|
+
canDrag: true,
|
|
26
|
+
dragType: "component",
|
|
27
|
+
canDrop: true,
|
|
28
|
+
dropType: "component",
|
|
29
|
+
dropObj: nextInfo.currentObject,
|
|
30
|
+
defaultDropIndex: "child",
|
|
31
|
+
parentObj: nextInfo.parentObject,
|
|
32
|
+
indexOfParentObj: nextInfo.indexOfParent,
|
|
33
|
+
rootOptions: nextInfo.currentObject,
|
|
34
|
+
settingType: Setting,
|
|
35
|
+
contextMenu: SimpleMenu,
|
|
36
|
+
icon: "heart",
|
|
37
|
+
children: []
|
|
38
|
+
}),
|
|
39
|
+
next: [{
|
|
40
|
+
parentId: nextInfo.currentObject.id,
|
|
41
|
+
parentObject: nextInfo.currentObject,
|
|
42
|
+
indexOfParent: "child",
|
|
43
|
+
scopeId: nextInfo.scopeId
|
|
44
|
+
}]
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
bindElementsOptionsNode(element: HTMLElement, options: any): DesignBindElementsResult {
|
|
48
|
+
return {
|
|
49
|
+
[options.id]: { element }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
<axis-fun-field formControlName="type">
|
|
10
|
+
<nz-select ngModel [ngModelOptions]="{standalone:true}">
|
|
11
|
+
<nz-option nzValue="badge" nzLabel="徽标"></nz-option>
|
|
12
|
+
<nz-option nzValue="status" nzLabel="状态"></nz-option>
|
|
13
|
+
<nz-option nzValue="ribbon" nzLabel="缎带"></nz-option>
|
|
14
|
+
</nz-select>
|
|
15
|
+
</axis-fun-field>
|
|
16
|
+
</nz-form-control>
|
|
17
|
+
</nz-form-item>
|
|
18
|
+
<nz-form-item>
|
|
19
|
+
<nz-form-label nzSpan="8">
|
|
20
|
+
颜色
|
|
21
|
+
</nz-form-label>
|
|
22
|
+
<nz-form-control nzSpan="16">
|
|
23
|
+
<axis-fun-field [(ngModel)]="color" [ngModelOptions]="{standalone:true}"
|
|
24
|
+
(ngModelChange)="setColorFormValue()">
|
|
25
|
+
<nz-color-picker nzDefaultValue="#00000000" ngModel [ngModelOptions]="{standalone:true}"
|
|
26
|
+
nzAllowClear></nz-color-picker>
|
|
27
|
+
</axis-fun-field>
|
|
28
|
+
</nz-form-control>
|
|
29
|
+
</nz-form-item>
|
|
30
|
+
</nz-collapse-panel>
|
|
31
|
+
@if (formValue()?.type.funMode || formValue()?.type.originValue === 'badge') {
|
|
32
|
+
<nz-collapse-panel nzHeader="徽标">
|
|
33
|
+
<nz-form-item>
|
|
34
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
35
|
+
小红点
|
|
36
|
+
</nz-form-label>
|
|
37
|
+
<nz-form-control nzSpan="16">
|
|
38
|
+
<axis-fun-field formControlName="dot">
|
|
39
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
40
|
+
</axis-fun-field>
|
|
41
|
+
</nz-form-control>
|
|
42
|
+
</nz-form-item>
|
|
43
|
+
@if (formValue()?.dot.funMode || !formValue()?.dot.originValue) {
|
|
44
|
+
<nz-form-item>
|
|
45
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
46
|
+
大小
|
|
47
|
+
</nz-form-label>
|
|
48
|
+
<nz-form-control nzSpan="16">
|
|
49
|
+
<axis-fun-field formControlName="size">
|
|
50
|
+
<nz-radio-group ngModel [ngModelOptions]="{standalone:true}">
|
|
51
|
+
<label nz-radio-button nzValue="small">小</label>
|
|
52
|
+
<label nz-radio-button nzValue="default">大</label>
|
|
53
|
+
</nz-radio-group>
|
|
54
|
+
</axis-fun-field>
|
|
55
|
+
</nz-form-control>
|
|
56
|
+
</nz-form-item>
|
|
57
|
+
}
|
|
58
|
+
<nz-form-item>
|
|
59
|
+
<nz-form-label nzSpan="8">
|
|
60
|
+
数值
|
|
61
|
+
</nz-form-label>
|
|
62
|
+
<nz-form-control nzSpan="16">
|
|
63
|
+
<axis-fun-field formControlName="count">
|
|
64
|
+
<nz-input-number style="width: 100%;" [nzMin]="0" ngModel
|
|
65
|
+
[ngModelOptions]="{standalone:true}"></nz-input-number>
|
|
66
|
+
</axis-fun-field>
|
|
67
|
+
</nz-form-control>
|
|
68
|
+
</nz-form-item>
|
|
69
|
+
@if (formValue()?.dot.funMode || !formValue()?.dot.originValue) {
|
|
70
|
+
<nz-form-item>
|
|
71
|
+
<nz-form-label nzSpan="8">
|
|
72
|
+
最大数值
|
|
73
|
+
</nz-form-label>
|
|
74
|
+
<nz-form-control nzSpan="16">
|
|
75
|
+
<axis-fun-field formControlName="overflowCount">
|
|
76
|
+
<nz-input-number style="width: 100%;" [nzMin]="0" ngModel
|
|
77
|
+
[ngModelOptions]="{standalone:true}"></nz-input-number>
|
|
78
|
+
</axis-fun-field>
|
|
79
|
+
</nz-form-control>
|
|
80
|
+
</nz-form-item>
|
|
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="showZero">
|
|
87
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
88
|
+
</axis-fun-field>
|
|
89
|
+
</nz-form-control>
|
|
90
|
+
</nz-form-item>
|
|
91
|
+
}
|
|
92
|
+
<nz-form-item>
|
|
93
|
+
<nz-form-label nzSpan="8">
|
|
94
|
+
位置偏移
|
|
95
|
+
</nz-form-label>
|
|
96
|
+
<nz-form-control nzSpan="16">
|
|
97
|
+
<nz-space-compact nzBlock>
|
|
98
|
+
<nz-input-number [(ngModel)]="offsetX" [ngModelOptions]="{standalone:true}"
|
|
99
|
+
(ngModelChange)="setOffsetFormValue()">
|
|
100
|
+
<span nzInputPrefix>x:</span>
|
|
101
|
+
</nz-input-number>
|
|
102
|
+
<nz-input-number [(ngModel)]="offsetY" [ngModelOptions]="{standalone:true}"
|
|
103
|
+
(ngModelChange)="setOffsetFormValue()">
|
|
104
|
+
<span nzInputPrefix>y:</span>
|
|
105
|
+
</nz-input-number>
|
|
106
|
+
<button nz-button nzSize="small" nzType="link" nzDanger (click)="resetOffset()">
|
|
107
|
+
<nz-icon nzType="delete"></nz-icon>
|
|
108
|
+
</button>
|
|
109
|
+
</nz-space-compact>
|
|
110
|
+
</nz-form-control>
|
|
111
|
+
</nz-form-item>
|
|
112
|
+
<nz-form-item>
|
|
113
|
+
<nz-form-label nzSpan="8">
|
|
114
|
+
提示
|
|
115
|
+
</nz-form-label>
|
|
116
|
+
<nz-form-control nzSpan="16">
|
|
117
|
+
<axis-fun-field formControlName="title">
|
|
118
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
119
|
+
</axis-fun-field>
|
|
120
|
+
</nz-form-control>
|
|
121
|
+
</nz-form-item>
|
|
122
|
+
</nz-collapse-panel>
|
|
123
|
+
}@else if (formValue()?.type.funMode || formValue()?.type.originValue === "status") {
|
|
124
|
+
<nz-collapse-panel nzHeader="状态">
|
|
125
|
+
<nz-form-item>
|
|
126
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
127
|
+
状态
|
|
128
|
+
</nz-form-label>
|
|
129
|
+
<nz-form-control nzSpan="16">
|
|
130
|
+
<axis-fun-field formControlName="status">
|
|
131
|
+
<nz-select ngModel [ngModelOptions]="{standalone:true}">
|
|
132
|
+
<nz-option nzValue="success" nzLabel="成功"></nz-option>
|
|
133
|
+
<nz-option nzValue="processing" nzLabel="处理中"></nz-option>
|
|
134
|
+
<nz-option nzValue="default" nzLabel="默认"></nz-option>
|
|
135
|
+
<nz-option nzValue="error" nzLabel="错误"></nz-option>
|
|
136
|
+
<nz-option nzValue="warning" nzLabel="警告"></nz-option>
|
|
137
|
+
</nz-select>
|
|
138
|
+
</axis-fun-field>
|
|
139
|
+
</nz-form-control>
|
|
140
|
+
</nz-form-item>
|
|
141
|
+
<nz-form-item>
|
|
142
|
+
<nz-form-label nzSpan="8">
|
|
143
|
+
文本
|
|
144
|
+
</nz-form-label>
|
|
145
|
+
<nz-form-control nzSpan="16">
|
|
146
|
+
<axis-fun-field formControlName="text">
|
|
147
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
148
|
+
</axis-fun-field>
|
|
149
|
+
</nz-form-control>
|
|
150
|
+
</nz-form-item>
|
|
151
|
+
</nz-collapse-panel>
|
|
152
|
+
}@else if (formValue()?.type.funMode || formValue()?.type.originValue === "ribbon") {
|
|
153
|
+
<nz-collapse-panel nzHeader="缎带">
|
|
154
|
+
<nz-form-item>
|
|
155
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
156
|
+
位置
|
|
157
|
+
</nz-form-label>
|
|
158
|
+
<nz-form-control nzSpan="16">
|
|
159
|
+
<axis-fun-field formControlName="placement">
|
|
160
|
+
<nz-radio-group ngModel [ngModelOptions]="{standalone:true}">
|
|
161
|
+
<label nz-radio-button nzValue="start">头部</label>
|
|
162
|
+
<label nz-radio-button nzValue="end">尾部</label>
|
|
163
|
+
</nz-radio-group>
|
|
164
|
+
</axis-fun-field>
|
|
165
|
+
</nz-form-control>
|
|
166
|
+
</nz-form-item>
|
|
167
|
+
<nz-form-item>
|
|
168
|
+
<nz-form-label nzSpan="8">
|
|
169
|
+
文本
|
|
170
|
+
</nz-form-label>
|
|
171
|
+
<nz-form-control nzSpan="16">
|
|
172
|
+
<axis-fun-field formControlName="text">
|
|
173
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
174
|
+
</axis-fun-field>
|
|
175
|
+
</nz-form-control>
|
|
176
|
+
</nz-form-item>
|
|
177
|
+
</nz-collapse-panel>
|
|
178
|
+
}
|
|
179
|
+
<axis-base-design-setting [fg]="fg"></axis-base-design-setting>
|
|
180
|
+
</nz-collapse>
|
|
181
|
+
</form>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, model } from '@angular/core';
|
|
2
|
+
import { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
4
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
5
|
+
import { NzColorPickerModule } from 'ng-zorro-antd/color-picker';
|
|
6
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
7
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
8
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
9
|
+
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
10
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
11
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
12
|
+
import { NzSpaceModule } from 'ng-zorro-antd/space';
|
|
13
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
14
|
+
import { BaseDesignSetting, baseFbConfig, baseFunField, FormValidators, FunField, FunFieldOptions, FunFieldValueBase } from 'ngx-axis-appforge/core';
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'axis-design-text-setting',
|
|
18
|
+
imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, FunField, NzSwitchModule, NzInputModule, NzInputNumberModule, NzColorPickerModule, NzRadioModule, NzSelectModule, NzSpaceModule, NzButtonModule, NzIconModule],
|
|
19
|
+
templateUrl: './setting.html',
|
|
20
|
+
styleUrl: './setting.css',
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
})
|
|
23
|
+
export class Setting extends FunFieldValueBase {
|
|
24
|
+
|
|
25
|
+
override fg: UntypedFormGroup = this.fb.group({
|
|
26
|
+
...baseFbConfig,
|
|
27
|
+
type: [undefined, FormValidators.requiredFun],
|
|
28
|
+
color: [],
|
|
29
|
+
count: [],
|
|
30
|
+
showDot: [undefined, FormValidators.requiredFun],
|
|
31
|
+
dot: [undefined, FormValidators.requiredFun],
|
|
32
|
+
overflowCount: [],
|
|
33
|
+
showZero: [undefined, FormValidators.requiredFun],
|
|
34
|
+
size: [undefined, FormValidators.requiredFun],
|
|
35
|
+
status: [undefined, FormValidators.requiredFun],
|
|
36
|
+
text: [],
|
|
37
|
+
title: [],
|
|
38
|
+
offset: [],
|
|
39
|
+
placement: [undefined, FormValidators.requiredFun],
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
protected override funFields: FunFieldOptions = {
|
|
43
|
+
...baseFunField,
|
|
44
|
+
type: {
|
|
45
|
+
defaultValue: "badge"
|
|
46
|
+
},
|
|
47
|
+
color: {
|
|
48
|
+
defaultValue: undefined
|
|
49
|
+
},
|
|
50
|
+
count: {
|
|
51
|
+
defaultValue: null
|
|
52
|
+
},
|
|
53
|
+
showDot: {
|
|
54
|
+
defaultValue: true
|
|
55
|
+
},
|
|
56
|
+
dot: {
|
|
57
|
+
defaultValue: false
|
|
58
|
+
},
|
|
59
|
+
overflowCount: {
|
|
60
|
+
defaultValue: undefined
|
|
61
|
+
},
|
|
62
|
+
showZero: {
|
|
63
|
+
defaultValue: false
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
defaultValue: "default"
|
|
67
|
+
},
|
|
68
|
+
status: {
|
|
69
|
+
defaultValue: "default"
|
|
70
|
+
},
|
|
71
|
+
text: {
|
|
72
|
+
defaultValue: ""
|
|
73
|
+
},
|
|
74
|
+
title: {
|
|
75
|
+
defaultValue: ""
|
|
76
|
+
},
|
|
77
|
+
placement: {
|
|
78
|
+
defaultValue: "end"
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
override reset(value?: any): void {
|
|
83
|
+
super.reset(value);
|
|
84
|
+
if (this.formValue()?.color) {
|
|
85
|
+
this.color.set(this.formValue().color);
|
|
86
|
+
}
|
|
87
|
+
if (this.formValue()?.offset) {
|
|
88
|
+
this.offsetX.set(this.formValue().offset[0]);
|
|
89
|
+
this.offsetY.set(this.formValue().offset[1]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
readonly offsetX = model<number | null>(null);
|
|
94
|
+
readonly offsetY = model<number | null>(null);
|
|
95
|
+
readonly color = model<any>({ funMode: false });
|
|
96
|
+
|
|
97
|
+
setColorFormValue() {
|
|
98
|
+
if (!this.color().funMode && this.color().originValue?.endsWith("00")) {
|
|
99
|
+
this.fg.patchValue({
|
|
100
|
+
color: { ...this.color(), originValue: null }
|
|
101
|
+
});
|
|
102
|
+
} else {
|
|
103
|
+
this.fg.patchValue({
|
|
104
|
+
color: this.color()
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
resetOffset() {
|
|
110
|
+
this.offsetX.set(null);
|
|
111
|
+
this.offsetY.set(null);
|
|
112
|
+
this.setOffsetFormValue();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
setOffsetFormValue() {
|
|
116
|
+
if (this.offsetX() != null || this.offsetY() != null) {
|
|
117
|
+
this.fg.patchValue({
|
|
118
|
+
offset: [this.offsetX() ?? 0, this.offsetY() ?? 0]
|
|
119
|
+
});
|
|
120
|
+
} else {
|
|
121
|
+
this.fg.patchValue({
|
|
122
|
+
offset: null
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<button [nzLoading]="loading()" nz-button [nzSize]="options.size()" [nzType]="options.styleType()" nz-popconfirm
|
|
2
|
+
[nzPopconfirmTitle]="options.confirmText()"
|
|
3
|
+
[nzCondition]="!(options.confirm() && options.confirmType() == 'pop' && !loading())" (nzOnConfirm)="popConfirm()"
|
|
4
|
+
(click)="buttonClick()" [disabled]="options.disabledBtn()" [nzGhost]="options.ghost()" [nzBlock]="options.block()"
|
|
5
|
+
[nzDanger]="options.danger()" [nzShape]="options.shape()">
|
|
6
|
+
@if (options.icon()) {
|
|
7
|
+
<ng-container [axisDynamic]="options.icon()"></ng-container>
|
|
8
|
+
@if (options.title()) {
|
|
9
|
+
<span style="margin-right: 10px;"></span>
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
{{options.title()}}
|
|
13
|
+
</button>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { signal } from "@angular/core";
|
|
2
|
+
import { BaseOptions } from "ngx-axis-appforge/core";
|
|
3
|
+
|
|
4
|
+
export class ButtonOptions extends BaseOptions {
|
|
5
|
+
readonly title = signal<string>("");
|
|
6
|
+
readonly icon = signal<any>(undefined);
|
|
7
|
+
readonly confirm = signal<boolean>(false);
|
|
8
|
+
readonly confirmType = signal<"modal" | "pop">("modal");
|
|
9
|
+
readonly confirmText = signal<string>("是否确认?");
|
|
10
|
+
readonly disabledBtn = signal<boolean>(false);
|
|
11
|
+
readonly styleType = signal<"default" | "primary" | "dashed" | "link" | "text">("default");
|
|
12
|
+
readonly ghost = signal<boolean>(false);
|
|
13
|
+
readonly size = signal<"large" | "small" | "default">("default");
|
|
14
|
+
readonly block = signal<boolean>(false);
|
|
15
|
+
readonly danger = signal<boolean>(false);
|
|
16
|
+
readonly shape = signal<null | "circle" | "round">(null);
|
|
17
|
+
}
|