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,288 @@
|
|
|
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="url">
|
|
10
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
11
|
+
</axis-fun-field>
|
|
12
|
+
</nz-form-control>
|
|
13
|
+
</nz-form-item>
|
|
14
|
+
<nz-form-item>
|
|
15
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
16
|
+
表单名
|
|
17
|
+
</nz-form-label>
|
|
18
|
+
<nz-form-control nzSpan="16">
|
|
19
|
+
<axis-fun-field formControlName="formName">
|
|
20
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
21
|
+
</axis-fun-field>
|
|
22
|
+
</nz-form-control>
|
|
23
|
+
</nz-form-item>
|
|
24
|
+
<nz-form-item>
|
|
25
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
26
|
+
多文件
|
|
27
|
+
</nz-form-label>
|
|
28
|
+
<nz-form-control nzSpan="16">
|
|
29
|
+
<nz-switch formControlName="multiple"></nz-switch>
|
|
30
|
+
</nz-form-control>
|
|
31
|
+
</nz-form-item>
|
|
32
|
+
<nz-form-item>
|
|
33
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
34
|
+
完整对象值
|
|
35
|
+
</nz-form-label>
|
|
36
|
+
<nz-form-control nzSpan="16">
|
|
37
|
+
<nz-switch formControlName="fullValue"></nz-switch>
|
|
38
|
+
</nz-form-control>
|
|
39
|
+
</nz-form-item>
|
|
40
|
+
<nz-form-item>
|
|
41
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
42
|
+
地址字段
|
|
43
|
+
</nz-form-label>
|
|
44
|
+
<nz-form-control nzSpan="16">
|
|
45
|
+
<input nz-input formControlName="urlField" />
|
|
46
|
+
</nz-form-control>
|
|
47
|
+
</nz-form-item>
|
|
48
|
+
<nz-form-item>
|
|
49
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
50
|
+
文件名字段
|
|
51
|
+
</nz-form-label>
|
|
52
|
+
<nz-form-control nzSpan="16">
|
|
53
|
+
<input nz-input formControlName="filenameField" />
|
|
54
|
+
</nz-form-control>
|
|
55
|
+
</nz-form-item>
|
|
56
|
+
<nz-form-item>
|
|
57
|
+
<nz-form-label nzSpan="8">
|
|
58
|
+
响应函数
|
|
59
|
+
</nz-form-label>
|
|
60
|
+
<nz-form-control nzSpan="16">
|
|
61
|
+
<axis-fun-field formControlName="responseFn"
|
|
62
|
+
[scopes]="[{scopeId:'__uploadResponse',scopeName:'上传接口响应',ds:{apiResponse:{tip:'示例数据'}}}]"
|
|
63
|
+
[noListen]="true" [onlyFun]="true"
|
|
64
|
+
editTip="请返回一个对象,类型:{success:boolean,errmsg?:string,[地址字段]?:string,[文件名字段]?:string}"></axis-fun-field>
|
|
65
|
+
</nz-form-control>
|
|
66
|
+
</nz-form-item>
|
|
67
|
+
</nz-collapse-panel>
|
|
68
|
+
<nz-collapse-panel nzHeader="上传控制">
|
|
69
|
+
@if (formValue()?.multiple) {
|
|
70
|
+
<nz-form-item>
|
|
71
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
72
|
+
选择文件夹
|
|
73
|
+
</nz-form-label>
|
|
74
|
+
<nz-form-control nzSpan="16">
|
|
75
|
+
<axis-fun-field formControlName="directory">
|
|
76
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
77
|
+
</axis-fun-field>
|
|
78
|
+
</nz-form-control>
|
|
79
|
+
</nz-form-item>
|
|
80
|
+
}
|
|
81
|
+
@if (formValue()?.directory.funMode || !formValue()?.directory.originValue) {
|
|
82
|
+
<nz-form-item>
|
|
83
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
84
|
+
文件类型
|
|
85
|
+
</nz-form-label>
|
|
86
|
+
<nz-form-control nzSpan="16">
|
|
87
|
+
<axis-fun-field formControlName="fileType">
|
|
88
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" [nzAutocomplete]="idAuto" />
|
|
89
|
+
<nz-autocomplete #idAuto nzBackfill>
|
|
90
|
+
<nz-auto-option nzValue="*/*">
|
|
91
|
+
全部类型
|
|
92
|
+
</nz-auto-option>
|
|
93
|
+
<nz-auto-option nzValue="image/*">
|
|
94
|
+
图片
|
|
95
|
+
</nz-auto-option>
|
|
96
|
+
<nz-auto-option nzValue="video/*">
|
|
97
|
+
视频
|
|
98
|
+
</nz-auto-option>
|
|
99
|
+
<nz-auto-option nzValue="application/vnd.android.package-archive">
|
|
100
|
+
*.apk
|
|
101
|
+
</nz-auto-option>
|
|
102
|
+
<nz-auto-option nzValue="application/vnd.ms-excel">
|
|
103
|
+
Excel
|
|
104
|
+
</nz-auto-option>
|
|
105
|
+
<nz-auto-option nzValue="application/json">
|
|
106
|
+
*.json
|
|
107
|
+
</nz-auto-option>
|
|
108
|
+
<nz-auto-option nzValue="application/pdf">
|
|
109
|
+
*.pdf
|
|
110
|
+
</nz-auto-option>
|
|
111
|
+
<nz-auto-option nzValue="text/javascript">
|
|
112
|
+
*.js
|
|
113
|
+
</nz-auto-option>
|
|
114
|
+
</nz-autocomplete>
|
|
115
|
+
</axis-fun-field>
|
|
116
|
+
</nz-form-control>
|
|
117
|
+
</nz-form-item>
|
|
118
|
+
}
|
|
119
|
+
@if (formValue()?.multiple) {
|
|
120
|
+
<nz-form-item>
|
|
121
|
+
<nz-form-label nzSpan="8">
|
|
122
|
+
数量限制
|
|
123
|
+
</nz-form-label>
|
|
124
|
+
<nz-form-control nzSpan="16">
|
|
125
|
+
<axis-fun-field formControlName="limitLength">
|
|
126
|
+
<nz-input-number style="width: 100%;" ngModel [ngModelOptions]="{standalone:true}"
|
|
127
|
+
[nzMin]="0"></nz-input-number>
|
|
128
|
+
</axis-fun-field>
|
|
129
|
+
</nz-form-control>
|
|
130
|
+
</nz-form-item>
|
|
131
|
+
}
|
|
132
|
+
<nz-form-item>
|
|
133
|
+
<nz-form-label nzSpan="8">
|
|
134
|
+
大小限制
|
|
135
|
+
</nz-form-label>
|
|
136
|
+
<nz-form-control nzSpan="16">
|
|
137
|
+
<axis-fun-field formControlName="limitSize">
|
|
138
|
+
<nz-input-number style="width: 100%;" ngModel [ngModelOptions]="{standalone:true}" [nzMin]="0">
|
|
139
|
+
<span nzInputAddonAfter>KB</span>
|
|
140
|
+
</nz-input-number>
|
|
141
|
+
</axis-fun-field>
|
|
142
|
+
</nz-form-control>
|
|
143
|
+
</nz-form-item>
|
|
144
|
+
</nz-collapse-panel>
|
|
145
|
+
<nz-collapse-panel nzHeader="外观设置">
|
|
146
|
+
<nz-form-item>
|
|
147
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
148
|
+
文件风格
|
|
149
|
+
</nz-form-label>
|
|
150
|
+
<nz-form-control nzSpan="16">
|
|
151
|
+
<axis-fun-field formControlName="listType">
|
|
152
|
+
<nz-select ngModel [ngModelOptions]="{standalone:true}">
|
|
153
|
+
<nz-option nzValue="text" nzLabel="文件名"></nz-option>
|
|
154
|
+
<nz-option nzValue="picture" nzLabel="预览图"></nz-option>
|
|
155
|
+
<nz-option nzValue="picture-card" nzLabel="照片墙"></nz-option>
|
|
156
|
+
</nz-select>
|
|
157
|
+
</axis-fun-field>
|
|
158
|
+
</nz-form-control>
|
|
159
|
+
</nz-form-item>
|
|
160
|
+
@if (formValue()?.listType.funMode || formValue()?.listType.originValue == "picture-card") {
|
|
161
|
+
<nz-form-item>
|
|
162
|
+
<nz-form-label nzSpan="8">
|
|
163
|
+
按钮文本
|
|
164
|
+
</nz-form-label>
|
|
165
|
+
<nz-form-control nzSpan="16">
|
|
166
|
+
<axis-fun-field formControlName="buttonTitle">
|
|
167
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
168
|
+
</axis-fun-field>
|
|
169
|
+
</nz-form-control>
|
|
170
|
+
</nz-form-item>
|
|
171
|
+
}@else{
|
|
172
|
+
<nz-form-item>
|
|
173
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
174
|
+
上传按钮
|
|
175
|
+
</nz-form-label>
|
|
176
|
+
<nz-form-control nzSpan="16">
|
|
177
|
+
<axis-fun-field formControlName="buttonType">
|
|
178
|
+
<nz-select ngModel [ngModelOptions]="{standalone:true}">
|
|
179
|
+
<nz-option nzValue="custom" nzLabel="自定义"></nz-option>
|
|
180
|
+
<nz-option nzValue="drag-file" nzLabel="文件拖拽"></nz-option>
|
|
181
|
+
</nz-select>
|
|
182
|
+
</axis-fun-field>
|
|
183
|
+
</nz-form-control>
|
|
184
|
+
</nz-form-item>
|
|
185
|
+
@if (formValue()?.buttonType.funMode || formValue()?.buttonType.originValue === "custom") {
|
|
186
|
+
<nz-form-item>
|
|
187
|
+
<nz-form-label nzSpan="8">
|
|
188
|
+
按钮文本
|
|
189
|
+
</nz-form-label>
|
|
190
|
+
<nz-form-control nzSpan="16">
|
|
191
|
+
<axis-fun-field formControlName="buttonTitle">
|
|
192
|
+
<input nz-input ngModel [ngModelOptions]="{standalone:true}" />
|
|
193
|
+
</axis-fun-field>
|
|
194
|
+
</nz-form-control>
|
|
195
|
+
</nz-form-item>
|
|
196
|
+
<nz-form-item>
|
|
197
|
+
<nz-form-label nzSpan="8">
|
|
198
|
+
按钮图标
|
|
199
|
+
</nz-form-label>
|
|
200
|
+
<nz-form-control nzSpan="16">
|
|
201
|
+
<axis-fun-field formControlName="buttonIcon">
|
|
202
|
+
<ng-container [axisDynamic]="{component:'axis-components/input-icon',inuse:true}"
|
|
203
|
+
[standalone]="true" ngModel [ngModelOptions]="{standalone:true}"></ng-container>
|
|
204
|
+
</axis-fun-field>
|
|
205
|
+
</nz-form-control>
|
|
206
|
+
</nz-form-item>
|
|
207
|
+
<nz-form-item>
|
|
208
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
209
|
+
按钮类型
|
|
210
|
+
</nz-form-label>
|
|
211
|
+
<nz-form-control nzSpan="16">
|
|
212
|
+
<axis-fun-field formControlName="buttonStyle">
|
|
213
|
+
<nz-select ngModel [ngModelOptions]="{standalone:true}">
|
|
214
|
+
<nz-option nzLabel="默认" nzValue="default"></nz-option>
|
|
215
|
+
<nz-option nzLabel="主要" nzValue="primary"></nz-option>
|
|
216
|
+
<nz-option nzLabel="虚线" nzValue="dashed"></nz-option>
|
|
217
|
+
<nz-option nzLabel="链接" nzValue="link"></nz-option>
|
|
218
|
+
<nz-option nzLabel="文本" nzValue="text"></nz-option>
|
|
219
|
+
</nz-select>
|
|
220
|
+
</axis-fun-field>
|
|
221
|
+
</nz-form-control>
|
|
222
|
+
</nz-form-item>
|
|
223
|
+
<nz-form-item>
|
|
224
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
225
|
+
按钮大小
|
|
226
|
+
</nz-form-label>
|
|
227
|
+
<nz-form-control nzSpan="16">
|
|
228
|
+
<axis-fun-field formControlName="buttonSize">
|
|
229
|
+
<nz-radio-group ngModel [ngModelOptions]="{standalone:true}">
|
|
230
|
+
<label nz-radio-button nzValue="large">大</label>
|
|
231
|
+
<label nz-radio-button nzValue="default">中</label>
|
|
232
|
+
<label nz-radio-button nzValue="small">小</label>
|
|
233
|
+
</nz-radio-group>
|
|
234
|
+
</axis-fun-field>
|
|
235
|
+
</nz-form-control>
|
|
236
|
+
</nz-form-item>
|
|
237
|
+
<nz-form-item>
|
|
238
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
239
|
+
宽度尽量大
|
|
240
|
+
</nz-form-label>
|
|
241
|
+
<nz-form-control nzSpan="16">
|
|
242
|
+
<axis-fun-field formControlName="buttonBlock">
|
|
243
|
+
<nz-switch ngModel [ngModelOptions]="{standalone:true}"></nz-switch>
|
|
244
|
+
</axis-fun-field>
|
|
245
|
+
</nz-form-control>
|
|
246
|
+
</nz-form-item>
|
|
247
|
+
<nz-form-item>
|
|
248
|
+
<nz-form-label nzSpan="8" nzRequired>
|
|
249
|
+
按钮形状
|
|
250
|
+
</nz-form-label>
|
|
251
|
+
<nz-form-control nzSpan="16">
|
|
252
|
+
<axis-fun-field formControlName="buttonShape">
|
|
253
|
+
<nz-select ngModel [ngModelOptions]="{standalone:true}">
|
|
254
|
+
<nz-option nzLabel="默认" nzValue=""></nz-option>
|
|
255
|
+
<nz-option nzLabel="圆形" nzValue="circle"></nz-option>
|
|
256
|
+
<nz-option nzLabel="胶囊" nzValue="round"></nz-option>
|
|
257
|
+
</nz-select>
|
|
258
|
+
</axis-fun-field>
|
|
259
|
+
</nz-form-control>
|
|
260
|
+
</nz-form-item>
|
|
261
|
+
}@else {
|
|
262
|
+
<nz-form-item>
|
|
263
|
+
<nz-form-label nzSpan="8">
|
|
264
|
+
拖拽标题
|
|
265
|
+
</nz-form-label>
|
|
266
|
+
<nz-form-control nzSpan="16">
|
|
267
|
+
<axis-fun-field formControlName="dropTitle">
|
|
268
|
+
<textarea nz-input ngModel [ngModelOptions]="{standalone:true}"></textarea>
|
|
269
|
+
</axis-fun-field>
|
|
270
|
+
</nz-form-control>
|
|
271
|
+
</nz-form-item>
|
|
272
|
+
<nz-form-item>
|
|
273
|
+
<nz-form-label nzSpan="8">
|
|
274
|
+
拖拽提示
|
|
275
|
+
</nz-form-label>
|
|
276
|
+
<nz-form-control nzSpan="16">
|
|
277
|
+
<axis-fun-field formControlName="dropTip">
|
|
278
|
+
<textarea nz-input ngModel [ngModelOptions]="{standalone:true}"></textarea>
|
|
279
|
+
</axis-fun-field>
|
|
280
|
+
</nz-form-control>
|
|
281
|
+
</nz-form-item>
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
</nz-collapse-panel>
|
|
285
|
+
<axis-value-design-setting [fg]="fg"></axis-value-design-setting>
|
|
286
|
+
<axis-base-design-setting [fg]="fg"></axis-base-design-setting>
|
|
287
|
+
</nz-collapse>
|
|
288
|
+
</form>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';
|
|
3
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
4
|
+
import { BaseDesignSetting, baseFbConfig, baseFunField, DynamicDirective, FormValidators, FunField, FunFieldOptions, FunFieldValueBase, ValueDesignSetting, valueFbConfig, valueFunField } from 'ngx-axis-appforge/core';
|
|
5
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
6
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
7
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
8
|
+
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
9
|
+
import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
|
|
10
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
11
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'axis-design-input-icon-setting',
|
|
15
|
+
imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, FunField, ValueDesignSetting, NzInputModule, NzSwitchModule, NzInputNumberModule, NzAutocompleteModule, NzSelectModule, DynamicDirective, NzRadioModule],
|
|
16
|
+
templateUrl: './setting.html',
|
|
17
|
+
styleUrl: './setting.css',
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
})
|
|
20
|
+
export class Setting extends FunFieldValueBase {
|
|
21
|
+
override fg: UntypedFormGroup = this.fb.group(({
|
|
22
|
+
...baseFbConfig,
|
|
23
|
+
...valueFbConfig,
|
|
24
|
+
url: [undefined, FormValidators.requiredFun],
|
|
25
|
+
formName: [undefined, FormValidators.requiredFun],
|
|
26
|
+
fullValue: [undefined, FormValidators.required],
|
|
27
|
+
multiple: [false, FormValidators.required],
|
|
28
|
+
urlField: ["url", FormValidators.required],
|
|
29
|
+
filenameField: ["filename", FormValidators.required],
|
|
30
|
+
responseFn: [],
|
|
31
|
+
fileType: [undefined, FormValidators.requiredFun],
|
|
32
|
+
directory: [undefined, FormValidators.requiredFun],
|
|
33
|
+
limitLength: [],
|
|
34
|
+
limitSize: [],
|
|
35
|
+
listType: [undefined, FormValidators.requiredFun],
|
|
36
|
+
buttonType: [undefined, FormValidators.requiredFun],
|
|
37
|
+
buttonTitle: [],
|
|
38
|
+
buttonIcon: [{ component: 'axis-components/icon', inuse: true, icon: 'upload' }],
|
|
39
|
+
buttonStyle: [undefined, FormValidators.requiredFun],
|
|
40
|
+
buttonSize: [undefined, FormValidators.requiredFun],
|
|
41
|
+
buttonBlock: [undefined, FormValidators.requiredFun],
|
|
42
|
+
buttonShape: [],
|
|
43
|
+
dropTitle: [],
|
|
44
|
+
dropTip: [],
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
protected override funFields: FunFieldOptions = {
|
|
48
|
+
...baseFunField,
|
|
49
|
+
...valueFunField,
|
|
50
|
+
url: {
|
|
51
|
+
defaultValue: ""
|
|
52
|
+
},
|
|
53
|
+
formName: {
|
|
54
|
+
defaultValue: "file"
|
|
55
|
+
},
|
|
56
|
+
fileType: {
|
|
57
|
+
defaultValue: "*/*"
|
|
58
|
+
},
|
|
59
|
+
directory: {
|
|
60
|
+
defaultValue: false
|
|
61
|
+
},
|
|
62
|
+
limitLength: {
|
|
63
|
+
defaultValue: null
|
|
64
|
+
},
|
|
65
|
+
limitSize: {
|
|
66
|
+
defaultValue: null
|
|
67
|
+
},
|
|
68
|
+
listType: {
|
|
69
|
+
defaultValue: "text"
|
|
70
|
+
},
|
|
71
|
+
buttonType: {
|
|
72
|
+
defaultValue: "custom"
|
|
73
|
+
},
|
|
74
|
+
buttonTitle: {
|
|
75
|
+
defaultValue: "上传"
|
|
76
|
+
},
|
|
77
|
+
buttonStyle: {
|
|
78
|
+
defaultValue: "default"
|
|
79
|
+
},
|
|
80
|
+
buttonSize: {
|
|
81
|
+
defaultValue: "default"
|
|
82
|
+
},
|
|
83
|
+
buttonBlock: {
|
|
84
|
+
defaultValue: false
|
|
85
|
+
},
|
|
86
|
+
buttonShape: {
|
|
87
|
+
defaultValue: ""
|
|
88
|
+
},
|
|
89
|
+
dropTitle: {
|
|
90
|
+
defaultValue: "点击或拖拽上传"
|
|
91
|
+
},
|
|
92
|
+
dropTip: {
|
|
93
|
+
defaultValue: ""
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<nz-upload [(nzFileList)]="fileList"
|
|
2
|
+
[nzType]="options.listType()!='picture-card'&& options.buttonType()=='drag-file'?'drag':'select'"
|
|
3
|
+
[nzDirectory]="directory()" [nzAccept]="options.fileType()" [nzMultiple]="options.multiple()"
|
|
4
|
+
[nzLimit]="limitLength()" [nzSize]="options.limitSize()" [nzListType]="options.listType()"
|
|
5
|
+
[nzDisabled]="options.disabled()" [nzCustomRequest]="upload" (nzChange)="fileChange($event)"
|
|
6
|
+
[nzShowButton]="!options.readonly() && ( limitLength() == null || fileList().length<limitLength()!)"
|
|
7
|
+
[nzPreview]="handlePreview"
|
|
8
|
+
[nzShowUploadList]="{showRemoveIcon:!this.options.readonly() && !this.options.disabled(),showPreviewIcon:true,showDownloadIcon:true}">
|
|
9
|
+
@if (options.listType() == "picture-card") {
|
|
10
|
+
<div>
|
|
11
|
+
<nz-icon nzType="plus" />
|
|
12
|
+
<div style="margin-top: 8px">{{options.buttonTitle()}}</div>
|
|
13
|
+
</div>
|
|
14
|
+
}@else if (options.buttonType() == "drag-file") {
|
|
15
|
+
<p class="ant-upload-drag-icon">
|
|
16
|
+
<nz-icon nzType="inbox" />
|
|
17
|
+
</p>
|
|
18
|
+
<p class="ant-upload-text">{{options.dropTitle()}}</p>
|
|
19
|
+
@if (options.dropTip()) {
|
|
20
|
+
<p class="ant-upload-hint">
|
|
21
|
+
{{options.dropTip()}}
|
|
22
|
+
</p>
|
|
23
|
+
}
|
|
24
|
+
}@else {
|
|
25
|
+
<button nz-button [nzSize]="options.buttonSize()" [nzType]="options.buttonStyle()" [nzBlock]="options.buttonBlock()"
|
|
26
|
+
[nzShape]="options.buttonShape()">
|
|
27
|
+
@if (options.buttonIcon()) {
|
|
28
|
+
<ng-container [axisDynamic]="options.buttonIcon()" [standalone]="true"></ng-container>
|
|
29
|
+
@if (options.buttonTitle()) {
|
|
30
|
+
<span style="margin-right: 10px;"></span>
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
{{options.buttonTitle()}}
|
|
34
|
+
</button>
|
|
35
|
+
}
|
|
36
|
+
</nz-upload>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { signal, WritableSignal } from "@angular/core";
|
|
2
|
+
import { ValueAccessOptions } from "ngx-axis-appforge/core";
|
|
3
|
+
|
|
4
|
+
export class UploadOptions extends ValueAccessOptions {
|
|
5
|
+
|
|
6
|
+
readonly url = signal("");
|
|
7
|
+
readonly formName = signal("file");
|
|
8
|
+
readonly fullValue = signal(false);
|
|
9
|
+
readonly urlField = signal("url");
|
|
10
|
+
readonly filenameField = signal("filename");
|
|
11
|
+
readonly responseFn = signal("");
|
|
12
|
+
|
|
13
|
+
readonly fileType = signal("*/*");
|
|
14
|
+
readonly multiple = signal(true);
|
|
15
|
+
readonly directory = signal(false);
|
|
16
|
+
readonly limitLength = signal<number | null>(null);
|
|
17
|
+
readonly limitSize = signal<number | null>(null);
|
|
18
|
+
|
|
19
|
+
readonly listType = signal<"text" | "picture" | "picture-card">("text");
|
|
20
|
+
readonly buttonType = signal<"drag-file" | "custom">("custom");
|
|
21
|
+
readonly buttonTitle = signal<string>("上传");
|
|
22
|
+
readonly buttonIcon = signal<any>({ component: 'axis-components/icon', inuse: true, icon: 'upload' });
|
|
23
|
+
readonly buttonStyle = signal<"default" | "primary" | "dashed" | "link" | "text">("default");
|
|
24
|
+
readonly buttonSize = signal<"large" | "small" | "default">("default");
|
|
25
|
+
readonly buttonBlock = signal<boolean>(false);
|
|
26
|
+
readonly buttonShape = signal<null | "circle" | "round">(null);
|
|
27
|
+
readonly dropTitle = signal<string>("点击或拖拽上传");
|
|
28
|
+
readonly dropTip = signal<string>("");
|
|
29
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, effect, inject, model, untracked } from '@angular/core';
|
|
2
|
+
import { UploadOptions } from './upload.options';
|
|
3
|
+
import { DynamicDirective, fn, ValueAccess } from 'ngx-axis-appforge/core';
|
|
4
|
+
import { NzUploadChangeParam, NzUploadFile, NzUploadModule, NzUploadXHRArgs } from 'ng-zorro-antd/upload';
|
|
5
|
+
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
6
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
7
|
+
import { NzFlexModule } from 'ng-zorro-antd/flex';
|
|
8
|
+
import { Subscription } from 'rxjs';
|
|
9
|
+
import { HttpClient } from '@angular/common/http';
|
|
10
|
+
import { NzImageModule, NzImageService } from 'ng-zorro-antd/image';
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'axis-upload',
|
|
14
|
+
imports: [NzUploadModule, NzButtonModule, NzIconModule, DynamicDirective, NzFlexModule, NzImageModule],
|
|
15
|
+
templateUrl: './upload.html',
|
|
16
|
+
styleUrl: './upload.css',
|
|
17
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
+
})
|
|
19
|
+
export class Upload extends ValueAccess<UploadOptions> {
|
|
20
|
+
|
|
21
|
+
protected override options: UploadOptions = new UploadOptions();
|
|
22
|
+
private readonly http = inject(HttpClient);
|
|
23
|
+
private readonly imageService = inject(NzImageService);
|
|
24
|
+
readonly fileList = model<NzUploadFile[]>([]);
|
|
25
|
+
readonly limitLength = computed(() => this.options.multiple() ? this.options.limitLength() : 1);
|
|
26
|
+
readonly directory = computed(() => this.options.multiple() && this.options.directory());
|
|
27
|
+
|
|
28
|
+
override setInitValue(value: any): void {
|
|
29
|
+
super.setInitValue(value);
|
|
30
|
+
if (value !== undefined) {
|
|
31
|
+
this.updateFileList(value);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
override writeValue(value: any): void {
|
|
36
|
+
super.writeValue(value);
|
|
37
|
+
this.updateFileList(value);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private updateFileList(value: any) {
|
|
41
|
+
if (value) {
|
|
42
|
+
if (!this.options.multiple()) {
|
|
43
|
+
value = [value];
|
|
44
|
+
}
|
|
45
|
+
this.fileList.set((value as any[]).map(r => this.options.fullValue() ? r : {
|
|
46
|
+
[this.options.urlField()]: r,
|
|
47
|
+
[this.options.filenameField()]: this.getFileNameByUrl(r),
|
|
48
|
+
}).map((resp, i) => ({
|
|
49
|
+
uid: i.toString(),
|
|
50
|
+
url: resp[this.options.urlField()],
|
|
51
|
+
name: resp[this.options.filenameField()],
|
|
52
|
+
status: 'done',
|
|
53
|
+
response: resp
|
|
54
|
+
})));
|
|
55
|
+
} else {
|
|
56
|
+
this.fileList.set([]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private getFileNameByUrl(url: string | undefined): string {
|
|
61
|
+
if (!url) {
|
|
62
|
+
return "";
|
|
63
|
+
}
|
|
64
|
+
const i = url.lastIndexOf("/");
|
|
65
|
+
if (i > -1) {
|
|
66
|
+
return url.substring(i + 1);
|
|
67
|
+
}
|
|
68
|
+
return url;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private updateValue(fileList: NzUploadFile[]) {
|
|
72
|
+
let value: any = fileList.map(f => this.options.fullValue() ? f.response : f.response[this.options.urlField()]);
|
|
73
|
+
if (!this.options.multiple()) {
|
|
74
|
+
value = value[0] ?? null;
|
|
75
|
+
}
|
|
76
|
+
this.value.set(value);
|
|
77
|
+
this.onChange?.(this.value());
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
upload = (item: NzUploadXHRArgs): Subscription => {
|
|
81
|
+
const formData = new FormData();
|
|
82
|
+
formData.append(this.options.formName(), item.file as any);
|
|
83
|
+
return this.http.post(this.options.url(), formData).subscribe((res: any) => {
|
|
84
|
+
if (this.options.responseFn()) {
|
|
85
|
+
res = fn(this.options.responseFn(), { apiResponse: res })
|
|
86
|
+
}
|
|
87
|
+
const { success, errmsg } = res;
|
|
88
|
+
if (success) {
|
|
89
|
+
item.file.url = res[this.options.urlField()];
|
|
90
|
+
res[this.options.filenameField()] ??= this.getFileNameByUrl(item.file.url!);
|
|
91
|
+
item.file.filename = res[this.options.filenameField()];
|
|
92
|
+
item.onSuccess?.(res, item.file, null);
|
|
93
|
+
} else {
|
|
94
|
+
item.onError?.(errmsg || "上传失败", item.file);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
fileChange(e: NzUploadChangeParam) {
|
|
100
|
+
switch (e.type) {
|
|
101
|
+
case "success":
|
|
102
|
+
this.refreshFileListUrl();
|
|
103
|
+
this.updateValue(e.fileList);
|
|
104
|
+
break;
|
|
105
|
+
case "removed":
|
|
106
|
+
this.updateValue(e.fileList);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
handlePreview = async (file: NzUploadFile) => {
|
|
112
|
+
const fileUrl = file.response[this.options.urlField()];
|
|
113
|
+
if (fileUrl) {
|
|
114
|
+
if (file['isImageUrl']) {
|
|
115
|
+
const imgList = this.fileList().map(e => ({ src: e.response[this.options.urlField()] }));
|
|
116
|
+
const index = imgList.findIndex(e => e.src == fileUrl);
|
|
117
|
+
this.imageService.preview(imgList).switchTo(index);
|
|
118
|
+
} else {
|
|
119
|
+
open(fileUrl);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
refreshFileListUrl() {
|
|
125
|
+
this.fileList().forEach(f => {
|
|
126
|
+
f.url = f.response?.[this.options.urlField()];
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="191" height="55" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g transform="translate(0 -1)"><rect fill="#EEE" y="10" width="46" height="46" rx="4"/><g transform="translate(36)"><circle stroke="#FFF" fill="#F5222D" cx="10" cy="11" r="9.5"/><path d="M10.384 15.132c.536 0 .986-.09 1.35-.27.364-.18.656-.408.876-.684a2.61 2.61 0 0 0 .474-.918c.096-.336.144-.66.144-.972 0-.392-.06-.756-.18-1.092a2.644 2.644 0 0 0-.51-.876 2.285 2.285 0 0 0-.816-.582c-.324-.14-.69-.21-1.098-.21a2.74 2.74 0 0 0-1.23.264c-.356.176-.654.46-.894.852l-.024-.024c.008-.328.04-.68.096-1.056s.158-.726.306-1.05c.148-.324.354-.592.618-.804.264-.212.612-.318 1.044-.318.408 0 .736.116.984.348.248.232.396.54.444.924h1.02c-.064-.704-.304-1.242-.72-1.614-.416-.372-.976-.558-1.68-.558-.608 0-1.112.128-1.512.384-.4.256-.72.596-.96 1.02-.24.424-.41.91-.51 1.458-.1.548-.15 1.114-.15 1.698 0 .448.034.912.102 1.392.068.48.206.92.414 1.32s.504.728.888.984.892.384 1.524.384zm.048-.888c-.28 0-.53-.05-.75-.15-.22-.1-.404-.234-.552-.402a1.768 1.768 0 0 1-.342-.6c-.08-.232-.12-.48-.12-.744s.038-.514.114-.75c.076-.236.19-.44.342-.612a1.655 1.655 0 0 1 1.308-.558c.288 0 .54.052.756.156.216.104.396.242.54.414.144.172.25.376.318.612s.102.486.102.75c0 .248-.038.486-.114.714-.076.228-.186.43-.33.606a1.515 1.515 0 0 1-.534.414c-.212.1-.458.15-.738.15z" fill="#FFF" fill-rule="nonzero"/></g></g><g transform="translate(68 -1)"><rect fill="#EEE" y="10" width="46" height="46" rx="4"/><g transform="translate(36)"><circle stroke="#FFF" fill="#F5222D" cx="10" cy="11" r="9.5"/><path d="M10.336 15.132c.448 0 .828-.062 1.14-.186.312-.124.572-.294.78-.51a2.44 2.44 0 0 0 .492-.75c.12-.284.212-.586.276-.906.064-.32.104-.648.12-.984a20.454 20.454 0 0 0 0-1.944 6.615 6.615 0 0 0-.12-.984 4.825 4.825 0 0 0-.276-.912 2.42 2.42 0 0 0-.492-.756 2.24 2.24 0 0 0-.786-.516c-.316-.128-.694-.192-1.134-.192-.44 0-.818.064-1.134.192a2.24 2.24 0 0 0-.786.516 2.42 2.42 0 0 0-.492.756c-.12.288-.212.592-.276.912-.064.32-.104.648-.12.984a20.454 20.454 0 0 0 0 1.944c.016.336.056.664.12.984.064.32.156.622.276.906.12.284.284.534.492.75.208.216.47.386.786.51.316.124.694.186 1.134.186zm0-.888c-.432 0-.768-.12-1.008-.36a2.108 2.108 0 0 1-.522-.882 4.522 4.522 0 0 1-.192-1.116c-.02-.396-.03-.754-.03-1.074 0-.208.002-.438.006-.69a6.016 6.016 0 0 1 .216-1.494c.068-.24.168-.45.3-.63.132-.18.298-.326.498-.438.2-.112.444-.168.732-.168s.532.056.732.168c.2.112.366.258.498.438s.232.39.3.63a6.016 6.016 0 0 1 .216 1.494c.004.252.006.482.006.69 0 .32-.01.678-.03 1.074-.02.396-.084.768-.192 1.116a2.108 2.108 0 0 1-.522.882c-.24.24-.576.36-1.008.36z" fill="#FFF" fill-rule="nonzero"/></g></g><g transform="translate(136)"><rect fill="#EEE" y="9" width="46" height="46" rx="4"/><circle stroke="#F5232D" cx="46.5" cy="8.5" r="8"/><path stroke="#F5232D" stroke-linecap="round" d="M46.5 9V4m2.121 7.349L46.5 9.228"/></g></g></svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="81px" height="80px" viewBox="0 0 81 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>Button</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="Ant-Design-组件缩略图" transform="translate(-1100.000000, -792.000000)">
|
|
6
|
+
<g id="Button" transform="translate(1100.000000, 792.000000)">
|
|
7
|
+
<rect id="矩形" stroke="#1890FF" fill="#0091FF" x="0" y="0" width="79" height="31" rx="2"></rect>
|
|
8
|
+
<text id="||||||||||||||||||" fill="#FFFFFF" font-family="PingFangSC-Regular, PingFang SC" font-size="14" font-weight="normal">
|
|
9
|
+
<tspan x="16" y="20">||||||||||||||||||</tspan>
|
|
10
|
+
</text>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="187px" height="74px" viewBox="0 0 187 74" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>Descriptions</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="Ant-Design-组件缩略图" transform="translate(-90.000000, -577.000000)">
|
|
6
|
+
<g id="Descriptions" transform="translate(90.000000, 577.000000)">
|
|
7
|
+
<rect id="矩形复制-57" fill="#EBEBEB" x="0" y="0" width="65" height="10"></rect>
|
|
8
|
+
<g id="编组-33" transform="translate(0.000000, 26.000000)">
|
|
9
|
+
<rect id="矩形复制-61" fill="#EBEBEB" x="0" y="6" width="28" height="10"></rect>
|
|
10
|
+
<rect id="矩形复制-60" fill="#F5F5F5" x="44" y="6" width="43" height="10"></rect>
|
|
11
|
+
<text id=":" font-family="PingFangSC-Regular, PingFang SC" font-size="16" font-weight="normal" fill="#000000" fill-opacity="0.85">
|
|
12
|
+
<tspan x="30" y="17">:</tspan>
|
|
13
|
+
</text>
|
|
14
|
+
</g>
|
|
15
|
+
<g id="编组-33复制-2" transform="translate(112.000000, 26.000000)">
|
|
16
|
+
<rect id="矩形复制-61" fill="#EBEBEB" x="0" y="6" width="28" height="10"></rect>
|
|
17
|
+
<rect id="矩形复制-60" fill="#F5F5F5" x="44" y="6" width="31" height="10"></rect>
|
|
18
|
+
<text id=":" font-family="PingFangSC-Regular, PingFang SC" font-size="16" font-weight="normal" fill="#000000" fill-opacity="0.85">
|
|
19
|
+
<tspan x="30" y="17">:</tspan>
|
|
20
|
+
</text>
|
|
21
|
+
</g>
|
|
22
|
+
<g id="编组-33复制" transform="translate(0.000000, 52.000000)">
|
|
23
|
+
<rect id="矩形复制-61" fill="#EBEBEB" x="0" y="6" width="19" height="10"></rect>
|
|
24
|
+
<rect id="矩形复制-60" fill="#F5F5F5" x="35" y="6" width="40" height="10"></rect>
|
|
25
|
+
<text id=":" font-family="PingFangSC-Regular, PingFang SC" font-size="16" font-weight="normal" fill="#000000" fill-opacity="0.85">
|
|
26
|
+
<tspan x="21" y="17">:</tspan>
|
|
27
|
+
</text>
|
|
28
|
+
</g>
|
|
29
|
+
<g id="编组-33复制-3" transform="translate(112.000000, 52.000000)">
|
|
30
|
+
<rect id="矩形复制-61" fill="#EBEBEB" x="0" y="6" width="19" height="10"></rect>
|
|
31
|
+
<rect id="矩形复制-60" fill="#F5F5F5" x="35" y="6" width="40" height="10"></rect>
|
|
32
|
+
<text id=":" font-family="PingFangSC-Regular, PingFang SC" font-size="16" font-weight="normal" fill="#000000" fill-opacity="0.85">
|
|
33
|
+
<tspan x="21" y="17">:</tspan>
|
|
34
|
+
</text>
|
|
35
|
+
</g>
|
|
36
|
+
</g>
|
|
37
|
+
</g>
|
|
38
|
+
</g>
|
|
39
|
+
</svg>
|
|
Binary file
|