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,204 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, model, signal, ViewChild } from '@angular/core';
|
|
2
|
+
import { TableFieldOptions, TableOptions } from './table.options';
|
|
3
|
+
import { Base, DynamicDirective, ScopeDirective } from 'ngx-axis-appforge/core';
|
|
4
|
+
import { NzTableFilterFn, NzTableFilterList, NzTableModule } from 'ng-zorro-antd/table';
|
|
5
|
+
import { FormsModule } from '@angular/forms';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { Select } from './select';
|
|
8
|
+
import { Expand } from './expand';
|
|
9
|
+
import { TableSetter } from './table-setter/table-setter';
|
|
10
|
+
import { NzResizableModule } from 'ng-zorro-antd/resizable';
|
|
11
|
+
import { NzFlexModule } from 'ng-zorro-antd/flex';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: 'axis-table',
|
|
16
|
+
imports: [NzTableModule, ScopeDirective, DynamicDirective, FormsModule, CommonModule, TableSetter, NzResizableModule, NzFlexModule],
|
|
17
|
+
templateUrl: './table.html',
|
|
18
|
+
styleUrl: './table.css',
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
})
|
|
21
|
+
export class Table extends Base<TableOptions> {
|
|
22
|
+
|
|
23
|
+
constructor(private elementRef: ElementRef) {
|
|
24
|
+
super();
|
|
25
|
+
effect(() => {
|
|
26
|
+
this.fields().forEach((f, i) => {
|
|
27
|
+
this.bindWithConfig(this.options.fields()[i], { options: f, tag: `bindField.${i}` });
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
effect(() => {
|
|
31
|
+
clearInterval(this.timer);
|
|
32
|
+
this.refreshScoll();
|
|
33
|
+
if (this.options.heightExpanded()) {
|
|
34
|
+
this.timer = setInterval(() => {
|
|
35
|
+
this.refreshScoll();
|
|
36
|
+
}, 500);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
protected override options: TableOptions = new TableOptions();
|
|
42
|
+
|
|
43
|
+
readonly displayData = computed(() => this.buildDisplayData());
|
|
44
|
+
select = new Select(this.options, this.displayData, this.getScope(), () => this.onSelectedChange());
|
|
45
|
+
expand = new Expand();
|
|
46
|
+
readonly pageSizeOptions = computed(() => this.options.pageSizeOptions().split(",").map(size => +size));
|
|
47
|
+
readonly scroll = signal<{ x: string, y: string }>({ x: "", y: "" });
|
|
48
|
+
readonly fields = computed(() => this.buildFields());
|
|
49
|
+
readonly displayFields = computed(() => this.buildDisplayFields());
|
|
50
|
+
readonly rowtotal = signal<number>(0);
|
|
51
|
+
readonly pageIndex = model<number>(1);
|
|
52
|
+
readonly fieldsControlsMap = computed(() => this.buildFieldControls());
|
|
53
|
+
readonly rowActions = computed(() => this.actionsFieldWidth() > 0 ? this.options.rowActions() : []);
|
|
54
|
+
readonly leaderFieldWidth = computed(() => this.buildLeaderFieldWidth());
|
|
55
|
+
readonly actionsFieldWidth = computed(() => this.buildActionsFieldWidth());
|
|
56
|
+
readonly fixFields = signal<TableFieldOptions[]>([]);
|
|
57
|
+
timer?: number;
|
|
58
|
+
|
|
59
|
+
resizeHandleOffsetX(field: TableFieldOptions): number {
|
|
60
|
+
if (field.sortAble() && field.filterAble()) {
|
|
61
|
+
return 42;
|
|
62
|
+
} else if (field.sortAble()) {
|
|
63
|
+
return 22;
|
|
64
|
+
} else if (field.filterAble()) {
|
|
65
|
+
return 28;
|
|
66
|
+
}
|
|
67
|
+
return 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@ViewChild(TableSetter)
|
|
71
|
+
tableSetter?: TableSetter;
|
|
72
|
+
|
|
73
|
+
trackByKeyField = (i: number, data: any): any => {
|
|
74
|
+
return data[this.options.keyField()];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private buildDisplayData(): any[] | null {
|
|
78
|
+
return this.options.data();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private buildFields(): TableFieldOptions[] {
|
|
82
|
+
return this.options.fields().map(opt => new TableFieldOptions());
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private buildDisplayFields(): TableFieldOptions[] {
|
|
86
|
+
return (this.options.showTableTitleSet() ? this.fixFields() : this.fields()).filter(f => f.inuse());
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private buildFieldControls(): { [field: string]: { sortFn?: any, filterItems?: NzTableFilterList, filterFn?: any } | undefined } {
|
|
90
|
+
const res: { [field: string]: { sortFn?: any, filterItems?: NzTableFilterList, filterFn?: any } } = {};
|
|
91
|
+
for (const field of this.displayFields()) {
|
|
92
|
+
res[field.field()] = {};
|
|
93
|
+
if (field.filterAble()) {
|
|
94
|
+
const valueSet = new Set<any>();
|
|
95
|
+
for (const row of this.displayData() ?? []) {
|
|
96
|
+
valueSet.add(row[field.field()]);
|
|
97
|
+
}
|
|
98
|
+
res[field.field()].filterItems = Array.from(valueSet).map(v => ({ text: v, value: v }));
|
|
99
|
+
res[field.field()].filterFn = (fd: any[] | any, row: any) => {
|
|
100
|
+
if (fd instanceof Array) {
|
|
101
|
+
return fd.includes(row[field.field()]);
|
|
102
|
+
} else {
|
|
103
|
+
return fd == row[field.field()];
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (field.sortAble()) {
|
|
108
|
+
if (this.options.data()?.some((r: any) => r[field.field()] != undefined && typeof (r[field.field()]) == "number")) {
|
|
109
|
+
res[field.field()].sortFn = (a: any, b: any) => a[field.field()] - b[field.field()];
|
|
110
|
+
} else {
|
|
111
|
+
res[field.field()].sortFn = (a: any, b: any) => {
|
|
112
|
+
return ((a[field.field()] || "") + "").localeCompare(b[field.field()])
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return res;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
filterFn: NzTableFilterFn = (fd, row) => {
|
|
121
|
+
console.log(111, fd, row)
|
|
122
|
+
return false;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
private buildLeaderFieldWidth(): number {
|
|
126
|
+
switch (this.options.size()) {
|
|
127
|
+
case "small":
|
|
128
|
+
return 45;
|
|
129
|
+
case "middle":
|
|
130
|
+
return 50;
|
|
131
|
+
default:
|
|
132
|
+
return 65;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private buildActionsFieldWidth(): number {
|
|
137
|
+
if (this.options.actionsFieldWidth() == 0 || this.options.rowActions().length == 0) {
|
|
138
|
+
return 0;
|
|
139
|
+
}
|
|
140
|
+
return this.options.actionsFieldWidth() ?? this.options.rowActions().length * 60;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
private refreshScoll() {
|
|
144
|
+
let x = 0;
|
|
145
|
+
if (this.options.showCheckbox()) {
|
|
146
|
+
x += this.leaderFieldWidth();
|
|
147
|
+
}
|
|
148
|
+
if (this.options.showExpand()) {
|
|
149
|
+
x += this.leaderFieldWidth();
|
|
150
|
+
}
|
|
151
|
+
if (this.options.showOrder()) {
|
|
152
|
+
x += this.leaderFieldWidth();
|
|
153
|
+
}
|
|
154
|
+
this.displayFields().forEach(f => {
|
|
155
|
+
if (f.width()) {
|
|
156
|
+
x += f.width()!;
|
|
157
|
+
} else {
|
|
158
|
+
x += 120;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
x += this.actionsFieldWidth();
|
|
162
|
+
let y = "";
|
|
163
|
+
if (this.options.heightExpanded()) {
|
|
164
|
+
const element = this.elementRef.nativeElement as HTMLElement;
|
|
165
|
+
const table = element.querySelector("nz-table");
|
|
166
|
+
const head = element.querySelector("table[nz-table-content]>thead.ant-table-thead");
|
|
167
|
+
const headRect = head?.getBoundingClientRect();
|
|
168
|
+
const innerTableRect = head?.parentElement?.parentElement?.parentElement?.getBoundingClientRect();
|
|
169
|
+
const outterTableRect = table?.getBoundingClientRect();
|
|
170
|
+
if (headRect) {
|
|
171
|
+
// y = 视口高度(window.innerHeight) - 表头底部位置(headRect.bottom) - 表尾部高度(outterTableRect.bottom - innerTableRect.bottom)
|
|
172
|
+
y = `${window.innerHeight - (headRect?.bottom ?? 0) - (outterTableRect?.bottom ?? 0) + (innerTableRect?.bottom ?? 0)}px`;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
this.scroll.set({ x: x + "px", y: y });
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
currentPageDataChange() { }
|
|
179
|
+
|
|
180
|
+
onPageChange() {
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
filterChange(field: string, event: any) {
|
|
184
|
+
|
|
185
|
+
}
|
|
186
|
+
sortChange(field: string, event: any) {
|
|
187
|
+
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
rowspan(field: string, index: number): number {
|
|
191
|
+
return 1;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
onSelectedChange() {
|
|
195
|
+
if (this.hasEventHandler("onSelectedChange")) {
|
|
196
|
+
this.triggeEvents("onSelectedChange", { selectedRows: this.select.getSelectedData() }).subscribe();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
override ngOnDestroy(): void {
|
|
201
|
+
super.ngOnDestroy();
|
|
202
|
+
clearInterval(this.timer);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { NextInfo, DesignBuildResult, DesignBindElementsResult, DesignConfig, OptionsNode, nameCode, 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: nameCode("文本", nextInfo.currentObject.data),
|
|
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: "file-text"
|
|
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,84 @@
|
|
|
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
|
+
<nz-select formControlName="transfer">
|
|
10
|
+
<nz-option nzLabel="不转换" nzValue="text"></nz-option>
|
|
11
|
+
<nz-option nzLabel="日期/时间" nzValue="date"></nz-option>
|
|
12
|
+
<nz-option nzLabel="数值" nzValue="number"></nz-option>
|
|
13
|
+
<nz-option nzLabel="百分比" nzValue="percent"></nz-option>
|
|
14
|
+
<nz-option nzLabel="深层对象" nzValue="deepObj"></nz-option>
|
|
15
|
+
</nz-select>
|
|
16
|
+
</nz-form-control>
|
|
17
|
+
</nz-form-item>
|
|
18
|
+
@if (formValue().transfer == "date") {
|
|
19
|
+
<nz-form-item>
|
|
20
|
+
<nz-form-label nzSpan="8">
|
|
21
|
+
快捷设置
|
|
22
|
+
</nz-form-label>
|
|
23
|
+
<nz-form-control nzSpan="16">
|
|
24
|
+
<nz-space [nzSplit]="split">
|
|
25
|
+
<ng-template #split>
|
|
26
|
+
<nz-divider nzType="vertical"></nz-divider>
|
|
27
|
+
</ng-template>
|
|
28
|
+
<a *nzSpaceItem (click)="setDefault('datetime')">日期+时间</a>
|
|
29
|
+
<a *nzSpaceItem (click)="setDefault('date')">日期</a>
|
|
30
|
+
<a *nzSpaceItem (click)="setDefault('time')">时间</a>
|
|
31
|
+
</nz-space>
|
|
32
|
+
</nz-form-control>
|
|
33
|
+
</nz-form-item>
|
|
34
|
+
<nz-form-item>
|
|
35
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
36
|
+
输出日期格式
|
|
37
|
+
</nz-form-label>
|
|
38
|
+
<nz-form-control nzSpan="16">
|
|
39
|
+
<input nz-input formControlName="dateFormat" />
|
|
40
|
+
</nz-form-control>
|
|
41
|
+
</nz-form-item>
|
|
42
|
+
}@else if (formValue().transfer == "number"||formValue().transfer == "percent") {
|
|
43
|
+
<nz-form-item>
|
|
44
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
45
|
+
最短整数位数
|
|
46
|
+
</nz-form-label>
|
|
47
|
+
<nz-form-control nzSpan="16">
|
|
48
|
+
<nz-input-number style="width: 100%;" nzMin="1"
|
|
49
|
+
formControlName="integerMinLength"></nz-input-number>
|
|
50
|
+
</nz-form-control>
|
|
51
|
+
</nz-form-item>
|
|
52
|
+
<nz-form-item>
|
|
53
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
54
|
+
小数位数长度
|
|
55
|
+
</nz-form-label>
|
|
56
|
+
<nz-form-control nzSpan="16">
|
|
57
|
+
<nz-slider nzRange formControlName="decimalRange" [nzMax]="10"></nz-slider>
|
|
58
|
+
</nz-form-control>
|
|
59
|
+
</nz-form-item>
|
|
60
|
+
}@else if (formValue().transfer == "deepObj") {
|
|
61
|
+
<nz-form-item>
|
|
62
|
+
<nz-form-label nzSpan="8">
|
|
63
|
+
对象路径
|
|
64
|
+
</nz-form-label>
|
|
65
|
+
<nz-form-control nzSpan="16">
|
|
66
|
+
<input nz-input formControlName="objPath" />
|
|
67
|
+
</nz-form-control>
|
|
68
|
+
</nz-form-item>
|
|
69
|
+
}
|
|
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="data" #dataFunField>
|
|
76
|
+
<ng-container [axisDynamic]="{component:'axis-components/input-json',inuse:true}"
|
|
77
|
+
[standalone]="true" ngModel [ngModelOptions]="{standalone:true}"></ng-container>
|
|
78
|
+
</axis-fun-field>
|
|
79
|
+
</nz-form-control>
|
|
80
|
+
</nz-form-item>
|
|
81
|
+
</nz-collapse-panel>
|
|
82
|
+
<axis-base-design-setting [fg]="fg"></axis-base-design-setting>
|
|
83
|
+
</nz-collapse>
|
|
84
|
+
</form>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
4
|
+
import { NzDividerModule } from 'ng-zorro-antd/divider';
|
|
5
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
6
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
7
|
+
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
8
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
9
|
+
import { NzSpaceModule } from 'ng-zorro-antd/space';
|
|
10
|
+
import { BaseDesignSetting, baseFbConfig, baseFunField, DynamicDirective, FormValidators, FunField, FunFieldOptions, FunFieldValueBase } from 'ngx-axis-appforge/core';
|
|
11
|
+
import { NzSliderModule } from 'ng-zorro-antd/slider';
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'axis-design-text-setting',
|
|
15
|
+
imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, NzSelectModule, NzSpaceModule, NzDividerModule, NzInputNumberModule, NzInputModule, DynamicDirective, FunField, NzSliderModule],
|
|
16
|
+
templateUrl: './setting.html',
|
|
17
|
+
styleUrl: './setting.css',
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
})
|
|
20
|
+
export class Setting extends FunFieldValueBase {
|
|
21
|
+
|
|
22
|
+
override fg: UntypedFormGroup = this.fb.group({
|
|
23
|
+
...baseFbConfig,
|
|
24
|
+
data: [],
|
|
25
|
+
transfer: ["text", FormValidators.required],
|
|
26
|
+
dateFormat: ["yyyy-MM-dd HH:mm:ss", FormValidators.required],
|
|
27
|
+
integerMinLength: [1, FormValidators.required],
|
|
28
|
+
decimalRange: [[0, 0], FormValidators.required],
|
|
29
|
+
objPath: [],
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
protected override funFields: FunFieldOptions = {
|
|
33
|
+
...baseFunField,
|
|
34
|
+
data: {
|
|
35
|
+
defaultValue: undefined
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
setDefault(type: string) {
|
|
40
|
+
let outFormat;
|
|
41
|
+
switch (type) {
|
|
42
|
+
case "datetime":
|
|
43
|
+
outFormat = "yyyy-MM-dd HH:mm:ss";
|
|
44
|
+
break;
|
|
45
|
+
case "date":
|
|
46
|
+
outFormat = "yyyy-MM-dd";
|
|
47
|
+
break;
|
|
48
|
+
case "time":
|
|
49
|
+
outFormat = "HH:mm:ss";
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
this.fg.get("dateFormat")?.setValue(outFormat);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@switch (options.transfer()) {
|
|
2
|
+
@case ("date") {
|
|
3
|
+
{{date() | date:options.dateFormat()}}
|
|
4
|
+
}
|
|
5
|
+
@case ("number") {
|
|
6
|
+
{{options.data() | number:digitsInfo()}}
|
|
7
|
+
}
|
|
8
|
+
@case ("percent") {
|
|
9
|
+
{{options.data() | percent:digitsInfo()}}
|
|
10
|
+
}
|
|
11
|
+
@case ("deepObj") {
|
|
12
|
+
{{deepObjectValue()}}
|
|
13
|
+
}
|
|
14
|
+
@default {
|
|
15
|
+
{{options.data()}}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { signal } from "@angular/core";
|
|
2
|
+
import { DataOptions } from "ngx-axis-appforge/core";
|
|
3
|
+
|
|
4
|
+
export class TextOptions extends DataOptions {
|
|
5
|
+
transfer = signal<"text" | "date" | "number" | "percent" | "deepObj">("text");
|
|
6
|
+
dateFormat = signal<string>("yyyy-MM-dd HH:mm:ss");
|
|
7
|
+
integerMinLength = signal<number>(1);
|
|
8
|
+
decimalRange = signal<[number, number]>([0, 0]);
|
|
9
|
+
objPath = signal<string>("");
|
|
10
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed } from '@angular/core';
|
|
2
|
+
import { TextOptions } from './text.options';
|
|
3
|
+
import { Base } from 'ngx-axis-appforge/core';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'axis-text',
|
|
8
|
+
imports: [CommonModule],
|
|
9
|
+
templateUrl: './text.html',
|
|
10
|
+
styleUrl: './text.css',
|
|
11
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
+
})
|
|
13
|
+
export class Text extends Base<TextOptions> {
|
|
14
|
+
|
|
15
|
+
override options: TextOptions = new TextOptions();
|
|
16
|
+
|
|
17
|
+
readonly date = computed(() => this.buildDate());
|
|
18
|
+
readonly digitsInfo = computed(() => this.buildDigitsInfo());
|
|
19
|
+
readonly deepObjectValue = computed(() => this.buildDeepObjectValue());
|
|
20
|
+
|
|
21
|
+
private buildDate(): Date | undefined {
|
|
22
|
+
if (this.options.transfer() == "date" && this.options.data()) {
|
|
23
|
+
return new Date(this.options.data());
|
|
24
|
+
}
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
private buildDigitsInfo(): string | undefined {
|
|
29
|
+
if (this.options.transfer() == "number" || this.options.transfer() == "percent") {
|
|
30
|
+
return `${this.options.integerMinLength()}.${this.options.decimalRange()[0]}-${this.options.decimalRange()[1]}`;
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private buildDeepObjectValue(): any {
|
|
36
|
+
if (this.options.transfer() == "deepObj" && this.options.data()) {
|
|
37
|
+
if (this.options.objPath()) {
|
|
38
|
+
const patharr = this.options.objPath().split(".").map(p => p.trim());
|
|
39
|
+
let outValue = this.options.data();
|
|
40
|
+
for (let p of patharr) {
|
|
41
|
+
if (Array.isArray(outValue)) {
|
|
42
|
+
outValue = outValue?.[+p];
|
|
43
|
+
} else {
|
|
44
|
+
outValue = outValue?.[p];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return outValue;
|
|
48
|
+
}
|
|
49
|
+
return this.options.data();
|
|
50
|
+
}
|
|
51
|
+
return "";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
}
|
|
@@ -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: "align-left",
|
|
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,76 @@
|
|
|
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">
|
|
6
|
+
最大长度
|
|
7
|
+
</nz-form-label>
|
|
8
|
+
<nz-form-control nzSpan="16">
|
|
9
|
+
<axis-fun-field formControlName="maxlength">
|
|
10
|
+
<nz-input-number style="width: 100%;" ngModel [ngModelOptions]="{standalone:true}" [nzMin]="1">
|
|
11
|
+
</nz-input-number>
|
|
12
|
+
</axis-fun-field>
|
|
13
|
+
</nz-form-control>
|
|
14
|
+
</nz-form-item>
|
|
15
|
+
<nz-form-item>
|
|
16
|
+
<nz-form-label nzSpan="8">
|
|
17
|
+
防抖时间
|
|
18
|
+
</nz-form-label>
|
|
19
|
+
<nz-form-control nzSpan="16">
|
|
20
|
+
<axis-fun-field formControlName="debounceTime">
|
|
21
|
+
<nz-input-number style="width: 100%;" nzPlaceHolder="毫秒" ngModel
|
|
22
|
+
[ngModelOptions]="{standalone:true}" [nzMin]="1">
|
|
23
|
+
</nz-input-number>
|
|
24
|
+
</axis-fun-field>
|
|
25
|
+
</nz-form-control>
|
|
26
|
+
</nz-form-item>
|
|
27
|
+
<nz-form-item>
|
|
28
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
29
|
+
形态变体
|
|
30
|
+
</nz-form-label>
|
|
31
|
+
<nz-form-control nzSpan="16">
|
|
32
|
+
<nz-select formControlName="variant">
|
|
33
|
+
<nz-option nzValue="outlined" nzLabel="外边框"></nz-option>
|
|
34
|
+
<nz-option nzValue="borderless" nzLabel="无边框"></nz-option>
|
|
35
|
+
<nz-option nzValue="filled" nzLabel="填充"></nz-option>
|
|
36
|
+
<nz-option nzValue="underlined" nzLabel="下边线"></nz-option>
|
|
37
|
+
</nz-select>
|
|
38
|
+
</nz-form-control>
|
|
39
|
+
</nz-form-item>
|
|
40
|
+
<nz-form-item>
|
|
41
|
+
<nz-form-label nzSpan="8">
|
|
42
|
+
占位符
|
|
43
|
+
</nz-form-label>
|
|
44
|
+
<nz-form-control nzSpan="16">
|
|
45
|
+
<axis-fun-field formControlName="placeholder">
|
|
46
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
47
|
+
</axis-fun-field>
|
|
48
|
+
</nz-form-control>
|
|
49
|
+
</nz-form-item>
|
|
50
|
+
<nz-form-item>
|
|
51
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
52
|
+
默认行数
|
|
53
|
+
</nz-form-label>
|
|
54
|
+
<nz-form-control nzSpan="16">
|
|
55
|
+
<axis-fun-field formControlName="rows">
|
|
56
|
+
<nz-input-number style="width: 100%;" ngModel [ngModelOptions]="{standalone:true}" [nzMin]="1">
|
|
57
|
+
</nz-input-number>
|
|
58
|
+
</axis-fun-field>
|
|
59
|
+
</nz-form-control>
|
|
60
|
+
</nz-form-item>
|
|
61
|
+
<nz-form-item>
|
|
62
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
63
|
+
高度拖动
|
|
64
|
+
</nz-form-label>
|
|
65
|
+
<nz-form-control nzSpan="16">
|
|
66
|
+
<axis-fun-field formControlName="resize">
|
|
67
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
68
|
+
</axis-fun-field>
|
|
69
|
+
</nz-form-control>
|
|
70
|
+
</nz-form-item>
|
|
71
|
+
</nz-collapse-panel>
|
|
72
|
+
<axis-value-design-setting [fg]="fg"></axis-value-design-setting>
|
|
73
|
+
<axis-base-design-setting [fg]="fg"></axis-base-design-setting>
|
|
74
|
+
<axis-input-trigger formControlName="triggeEvents" [internalTriggers]="['valueChange']"></axis-input-trigger>
|
|
75
|
+
</nz-collapse>
|
|
76
|
+
</form>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } 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 { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
7
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
8
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
9
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
10
|
+
import { BaseDesignSetting, baseFbConfig, baseFunField, FormValidators, FunField, FunFieldOptions, FunFieldValueBase, InputTrigger, ValueDesignSetting, valueFbConfig, valueFunField } from 'ngx-axis-appforge/core';
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'axis-design-input-setting',
|
|
14
|
+
imports: [FormsModule, NzCollapseModule, ReactiveFormsModule, NzInputNumberModule, NzInputModule, NzFormModule, FunField, NzSwitchModule, BaseDesignSetting, InputTrigger, ValueDesignSetting, NzSelectModule],
|
|
15
|
+
templateUrl: './setting.html',
|
|
16
|
+
styleUrl: './setting.css',
|
|
17
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
+
})
|
|
19
|
+
export class Setting extends FunFieldValueBase {
|
|
20
|
+
|
|
21
|
+
override fg: UntypedFormGroup = this.fb.group({
|
|
22
|
+
...baseFbConfig,
|
|
23
|
+
...valueFbConfig,
|
|
24
|
+
placeholder: [],
|
|
25
|
+
variant: ["outlined", FormValidators.required],
|
|
26
|
+
maxlength: [null],
|
|
27
|
+
debounceTime: [],
|
|
28
|
+
rows: [undefined, FormValidators.requiredFun],
|
|
29
|
+
autoResize: [undefined, FormValidators.requiredFun],
|
|
30
|
+
resize: [undefined, FormValidators.requiredFun],
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
protected override funFields: FunFieldOptions = {
|
|
34
|
+
...baseFunField,
|
|
35
|
+
...valueFunField,
|
|
36
|
+
placeholder: {
|
|
37
|
+
defaultValue: ""
|
|
38
|
+
},
|
|
39
|
+
maxlength: {
|
|
40
|
+
defaultValue: null
|
|
41
|
+
},
|
|
42
|
+
debounceTime: {
|
|
43
|
+
defaultValue: null
|
|
44
|
+
},
|
|
45
|
+
rows: {
|
|
46
|
+
defaultValue: 5
|
|
47
|
+
},
|
|
48
|
+
autoResize: {
|
|
49
|
+
defaultValue: false
|
|
50
|
+
},
|
|
51
|
+
resize: {
|
|
52
|
+
defaultValue: true
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|