ngx-axis-appforge 0.0.2 → 0.0.3
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/axis-components/badge/design/index.d.ts +5 -0
- package/axis-components/badge/index.d.ts +27 -0
- package/axis-components/button/design/index.d.ts +5 -0
- package/axis-components/button/index.d.ts +32 -0
- package/axis-components/desc/design/index.d.ts +5 -0
- package/axis-components/desc/index.d.ts +30 -0
- package/axis-components/design/design/index.d.ts +5 -0
- package/axis-components/design/index.d.ts +246 -0
- package/axis-components/dynamic-container/design/index.d.ts +5 -0
- package/axis-components/dynamic-container/index.d.ts +14 -0
- package/axis-components/editor/index.d.ts +33 -0
- package/axis-components/flex/design/index.d.ts +5 -0
- package/axis-components/flex/index.d.ts +20 -0
- package/axis-components/form/design/index.d.ts +5 -0
- package/axis-components/form/index.d.ts +30 -0
- package/axis-components/form-item/design/index.d.ts +5 -0
- package/axis-components/form-item/index.d.ts +34 -0
- package/axis-components/icon/design/index.d.ts +5 -0
- package/axis-components/icon/index.d.ts +16 -0
- package/axis-components/image/design/index.d.ts +5 -0
- package/axis-components/image/index.d.ts +16 -0
- package/axis-components/index.d.ts +5 -0
- package/axis-components/input/design/index.d.ts +5 -0
- package/axis-components/input/index.d.ts +27 -0
- package/axis-components/input-component/design/index.d.ts +5 -0
- package/axis-components/input-component/index.d.ts +33 -0
- package/axis-components/input-icon/design/index.d.ts +5 -0
- package/axis-components/input-icon/index.d.ts +24 -0
- package/axis-components/input-json/design/index.d.ts +5 -0
- package/axis-components/input-json/index.d.ts +24 -0
- package/axis-components/input-number/design/index.d.ts +5 -0
- package/axis-components/input-number/index.d.ts +25 -0
- package/axis-components/modal/design/index.d.ts +5 -0
- package/axis-components/modal/index.d.ts +33 -0
- package/axis-components/scope/design/index.d.ts +5 -0
- package/axis-components/scope/index.d.ts +24 -0
- package/axis-components/single-selector/design/index.d.ts +5 -0
- package/axis-components/single-selector/index.d.ts +37 -0
- package/axis-components/splitter/design/index.d.ts +5 -0
- package/axis-components/splitter/index.d.ts +28 -0
- package/axis-components/table/design/index.d.ts +5 -0
- package/axis-components/table/index.d.ts +183 -0
- package/axis-components/text/design/index.d.ts +5 -0
- package/axis-components/text/index.d.ts +24 -0
- package/axis-components/textarea/design/index.d.ts +5 -0
- package/axis-components/textarea/index.d.ts +25 -0
- package/axis-components/tree-selector/design/index.d.ts +5 -0
- package/axis-components/tree-selector/index.d.ts +76 -0
- package/axis-components/upload/design/index.d.ts +5 -0
- package/axis-components/upload/index.d.ts +51 -0
- package/core/index.d.ts +773 -0
- package/fesm2022/ngx-axis-appforge-axis-components-badge-design.mjs +191 -0
- package/fesm2022/ngx-axis-appforge-axis-components-badge-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-badge.mjs +39 -0
- package/fesm2022/ngx-axis-appforge-axis-components-badge.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs +116 -0
- package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs +78 -0
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs +224 -0
- package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-desc.mjs +51 -0
- package/fesm2022/ngx-axis-appforge-axis-components-desc.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs +69 -0
- package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +1746 -0
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs +65 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs +26 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-editor.mjs +99 -0
- package/fesm2022/ngx-axis-appforge-axis-components-editor.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs +98 -0
- package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs +31 -0
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form-design.mjs +108 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs +242 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs +144 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +132 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-icon-design.mjs +88 -0
- package/fesm2022/ngx-axis-appforge-axis-components-icon-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-icon.mjs +28 -0
- package/fesm2022/ngx-axis-appforge-axis-components-icon.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-image-design.mjs +75 -0
- package/fesm2022/ngx-axis-appforge-axis-components-image-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-image.mjs +43 -0
- package/fesm2022/ngx-axis-appforge-axis-components-image.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs +70 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs +61 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-design.mjs +142 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon-design.mjs +71 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon.mjs +64 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-icon.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-json-design.mjs +60 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-json-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs +70 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-number-design.mjs +107 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-number-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-number.mjs +48 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-number.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input.mjs +68 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-modal-design.mjs +181 -0
- package/fesm2022/ngx-axis-appforge-axis-components-modal-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-modal.mjs +74 -0
- package/fesm2022/ngx-axis-appforge-axis-components-modal.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs +330 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs +55 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs +120 -0
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs +102 -0
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs +178 -0
- package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs +49 -0
- package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +442 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +452 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-text-design.mjs +95 -0
- package/fesm2022/ngx-axis-appforge-axis-components-text-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-text.mjs +64 -0
- package/fesm2022/ngx-axis-appforge-axis-components-text.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-textarea-design.mjs +94 -0
- package/fesm2022/ngx-axis-appforge-axis-components-textarea-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-textarea.mjs +64 -0
- package/fesm2022/ngx-axis-appforge-axis-components-textarea.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs +222 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs +295 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-upload-design.mjs +146 -0
- package/fesm2022/ngx-axis-appforge-axis-components-upload-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs +156 -0
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +988 -0
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-core.mjs +3169 -0
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -0
- package/{providers/providers.ts → fesm2022/ngx-axis-appforge-providers.mjs} +16 -8
- package/fesm2022/ngx-axis-appforge-providers.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge.mjs +6 -0
- package/fesm2022/ngx-axis-appforge.mjs.map +1 -0
- package/index.d.ts +2 -0
- package/package.json +217 -16
- package/providers/index.d.ts +13 -0
- package/.editorconfig +0 -17
- package/angular.json +0 -40
- package/axis-components/badge/badge.css +0 -3
- package/axis-components/badge/badge.html +0 -20
- package/axis-components/badge/badge.options.ts +0 -23
- package/axis-components/badge/badge.ts +0 -17
- package/axis-components/badge/design/config.ts +0 -52
- package/axis-components/badge/design/ng-package.json +0 -5
- package/axis-components/badge/design/setting/setting.css +0 -0
- package/axis-components/badge/design/setting/setting.html +0 -181
- package/axis-components/badge/design/setting/setting.ts +0 -126
- package/axis-components/badge/ng-package.json +0 -5
- package/axis-components/button/button.css +0 -3
- package/axis-components/button/button.html +0 -13
- package/axis-components/button/button.options.ts +0 -17
- package/axis-components/button/button.ts +0 -56
- package/axis-components/button/design/config.ts +0 -30
- package/axis-components/button/design/ng-package.json +0 -5
- package/axis-components/button/design/setting/setting.css +0 -0
- package/axis-components/button/design/setting/setting.html +0 -151
- package/axis-components/button/design/setting/setting.ts +0 -76
- package/axis-components/button/ng-package.json +0 -5
- package/axis-components/cmp-map.ts +0 -52
- package/axis-components/cmplib.ts +0 -9
- package/axis-components/desc/desc.css +0 -8
- package/axis-components/desc/desc.html +0 -19
- package/axis-components/desc/desc.options.ts +0 -24
- package/axis-components/desc/desc.ts +0 -29
- package/axis-components/desc/design/config.ts +0 -113
- 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 +0 -47
- package/axis-components/desc/design/desc-item-setting/desc-item-setting.ts +0 -40
- 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 +0 -9
- package/axis-components/desc/design/desc-items-menu/desc-items-menu.ts +0 -23
- package/axis-components/desc/design/desc-setting/desc-setting.css +0 -0
- package/axis-components/desc/design/desc-setting/desc-setting.html +0 -76
- package/axis-components/desc/design/desc-setting/desc-setting.ts +0 -51
- package/axis-components/desc/design/ng-package.json +0 -5
- package/axis-components/desc/ng-package.json +0 -5
- package/axis-components/design/cmplib/cmplib.css +0 -5
- package/axis-components/design/cmplib/cmplib.html +0 -52
- package/axis-components/design/cmplib/cmplib.ts +0 -96
- package/axis-components/design/design/config.ts +0 -29
- package/axis-components/design/design/ng-package.json +0 -5
- package/axis-components/design/design/setting/setting.css +0 -0
- package/axis-components/design/design/setting/setting.html +0 -33
- package/axis-components/design/design/setting/setting.ts +0 -33
- package/axis-components/design/design.css +0 -15
- package/axis-components/design/design.html +0 -51
- package/axis-components/design/design.options.ts +0 -9
- package/axis-components/design/design.ts +0 -509
- package/axis-components/design/ng-package.json +0 -5
- package/axis-components/design/preview/drag.service.ts +0 -148
- package/axis-components/design/preview/drop-handler.ts +0 -56
- package/axis-components/design/preview/preview.css +0 -3
- package/axis-components/design/preview/preview.html +0 -1
- package/axis-components/design/preview/preview.ts +0 -250
- package/axis-components/design/preview/select.service.ts +0 -140
- package/axis-components/design/shortcut-key.ts +0 -160
- package/axis-components/design/toolbar/toolbar.css +0 -24
- package/axis-components/design/toolbar/toolbar.html +0 -96
- package/axis-components/design/toolbar/toolbar.ts +0 -65
- package/axis-components/design/tree/drag-drop.ts +0 -125
- package/axis-components/design/tree/tree.css +0 -30
- package/axis-components/design/tree/tree.html +0 -49
- package/axis-components/design/tree/tree.ts +0 -292
- package/axis-components/dynamic-container/design/config.ts +0 -30
- package/axis-components/dynamic-container/design/ng-package.json +0 -5
- package/axis-components/dynamic-container/design/setting/setting.css +0 -0
- package/axis-components/dynamic-container/design/setting/setting.html +0 -20
- package/axis-components/dynamic-container/design/setting/setting.ts +0 -30
- package/axis-components/dynamic-container/dynamic-container.css +0 -3
- package/axis-components/dynamic-container/dynamic-container.html +0 -2
- package/axis-components/dynamic-container/dynamic-container.options.ts +0 -6
- package/axis-components/dynamic-container/dynamic-container.ts +0 -17
- package/axis-components/dynamic-container/ng-package.json +0 -5
- package/axis-components/editor/editor.css +0 -47
- package/axis-components/editor/editor.html +0 -10
- package/axis-components/editor/editor.options.ts +0 -10
- package/axis-components/editor/editor.ts +0 -86
- package/axis-components/editor/ng-package.json +0 -5
- package/axis-components/examples/examples/badge.ts +0 -17
- package/axis-components/examples/examples/button.ts +0 -38
- package/axis-components/examples/examples/desc.ts +0 -31
- package/axis-components/examples/examples/design.ts +0 -15
- package/axis-components/examples/examples/dynamic-container.ts +0 -21
- package/axis-components/examples/examples/flex.ts +0 -18
- package/axis-components/examples/examples/form-item.ts +0 -39
- package/axis-components/examples/examples/form.ts +0 -315
- package/axis-components/examples/examples/icon.ts +0 -16
- package/axis-components/examples/examples/image.ts +0 -15
- package/axis-components/examples/examples/input-component.ts +0 -15
- package/axis-components/examples/examples/input-icon.ts +0 -15
- package/axis-components/examples/examples/input-json.ts +0 -15
- package/axis-components/examples/examples/input-number.ts +0 -15
- package/axis-components/examples/examples/input.ts +0 -15
- package/axis-components/examples/examples/modal.ts +0 -15
- package/axis-components/examples/examples/scope.ts +0 -17
- package/axis-components/examples/examples/single-selector.ts +0 -25
- package/axis-components/examples/examples/splitter.ts +0 -36
- package/axis-components/examples/examples/table.ts +0 -126
- package/axis-components/examples/examples/text.ts +0 -15
- package/axis-components/examples/examples/textarea.ts +0 -15
- package/axis-components/examples/examples/tree-selector.ts +0 -35
- package/axis-components/examples/examples/upload.ts +0 -15
- package/axis-components/examples/examples.ts +0 -73
- package/axis-components/flex/design/config.ts +0 -49
- package/axis-components/flex/design/ng-package.json +0 -5
- package/axis-components/flex/design/setting/setting.css +0 -0
- package/axis-components/flex/design/setting/setting.html +0 -72
- package/axis-components/flex/design/setting/setting.ts +0 -43
- package/axis-components/flex/flex.css +0 -5
- package/axis-components/flex/flex.html +0 -6
- package/axis-components/flex/flex.options.ts +0 -12
- package/axis-components/flex/flex.ts +0 -15
- package/axis-components/flex/ng-package.json +0 -5
- package/axis-components/form/design/config.ts +0 -71
- package/axis-components/form/design/ng-package.json +0 -5
- package/axis-components/form/design/setting/setting.css +0 -0
- package/axis-components/form/design/setting/setting.html +0 -21
- package/axis-components/form/design/setting/setting.ts +0 -31
- package/axis-components/form/form.css +0 -3
- package/axis-components/form/form.html +0 -3
- package/axis-components/form/form.options.ts +0 -9
- package/axis-components/form/form.ts +0 -121
- package/axis-components/form/ng-package.json +0 -5
- package/axis-components/form-item/design/config.ts +0 -43
- package/axis-components/form-item/design/ng-package.json +0 -5
- package/axis-components/form-item/design/setting/input-validator/input-validator.css +0 -8
- package/axis-components/form-item/design/setting/input-validator/input-validator.html +0 -140
- package/axis-components/form-item/design/setting/input-validator/input-validator.ts +0 -158
- package/axis-components/form-item/design/setting/setting.css +0 -0
- package/axis-components/form-item/design/setting/setting.html +0 -39
- package/axis-components/form-item/design/setting/setting.ts +0 -40
- package/axis-components/form-item/form-item.css +0 -4
- package/axis-components/form-item/form-item.html +0 -16
- package/axis-components/form-item/form-item.options.ts +0 -12
- package/axis-components/form-item/form-item.ts +0 -128
- package/axis-components/form-item/ng-package.json +0 -5
- package/axis-components/icon/design/config.ts +0 -29
- package/axis-components/icon/design/ng-package.json +0 -5
- package/axis-components/icon/design/setting/setting.css +0 -0
- package/axis-components/icon/design/setting/setting.html +0 -67
- package/axis-components/icon/design/setting/setting.ts +0 -48
- package/axis-components/icon/icon.css +0 -0
- package/axis-components/icon/icon.html +0 -7
- package/axis-components/icon/icon.options.ts +0 -10
- package/axis-components/icon/icon.ts +0 -17
- package/axis-components/icon/ng-package.json +0 -5
- package/axis-components/image/design/config.ts +0 -30
- package/axis-components/image/design/ng-package.json +0 -5
- package/axis-components/image/design/setting/setting.css +0 -0
- package/axis-components/image/design/setting/setting.html +0 -42
- package/axis-components/image/design/setting/setting.ts +0 -37
- package/axis-components/image/image.css +0 -58
- package/axis-components/image/image.html +0 -14
- package/axis-components/image/image.options.ts +0 -8
- package/axis-components/image/image.ts +0 -29
- package/axis-components/image/ng-package.json +0 -5
- package/axis-components/input/design/config.ts +0 -80
- package/axis-components/input/design/ng-package.json +0 -5
- package/axis-components/input/design/setting/setting.css +0 -0
- package/axis-components/input/design/setting/setting.html +0 -79
- package/axis-components/input/design/setting/setting.ts +0 -51
- package/axis-components/input/input.css +0 -4
- package/axis-components/input/input.html +0 -32
- package/axis-components/input/input.options.ts +0 -14
- package/axis-components/input/input.ts +0 -53
- package/axis-components/input/ng-package.json +0 -5
- package/axis-components/input-component/design/config.ts +0 -30
- package/axis-components/input-component/design/ng-package.json +0 -5
- package/axis-components/input-component/design/setting/setting.css +0 -0
- package/axis-components/input-component/design/setting/setting.html +0 -33
- package/axis-components/input-component/design/setting/setting.ts +0 -33
- package/axis-components/input-component/input-component.css +0 -4
- package/axis-components/input-component/input-component.html +0 -25
- package/axis-components/input-component/input-component.options.ts +0 -7
- package/axis-components/input-component/input-component.ts +0 -50
- package/axis-components/input-component/ng-package.json +0 -5
- package/axis-components/input-icon/design/config.ts +0 -30
- package/axis-components/input-icon/design/ng-package.json +0 -5
- package/axis-components/input-icon/design/setting/setting.css +0 -0
- package/axis-components/input-icon/design/setting/setting.html +0 -29
- package/axis-components/input-icon/design/setting/setting.ts +0 -33
- package/axis-components/input-icon/input-icon.css +0 -4
- package/axis-components/input-icon/input-icon.html +0 -70
- package/axis-components/input-icon/input-icon.options.ts +0 -7
- package/axis-components/input-icon/input-icon.ts +0 -51
- package/axis-components/input-icon/ng-package.json +0 -5
- package/axis-components/input-json/design/config.ts +0 -29
- package/axis-components/input-json/design/ng-package.json +0 -5
- package/axis-components/input-json/design/setting/setting.css +0 -0
- package/axis-components/input-json/design/setting/setting.html +0 -7
- package/axis-components/input-json/design/setting/setting.ts +0 -26
- package/axis-components/input-json/input-json.css +0 -4
- package/axis-components/input-json/input-json.html +0 -19
- package/axis-components/input-json/input-json.ts +0 -67
- package/axis-components/input-json/ng-package.json +0 -5
- package/axis-components/input-number/design/config.ts +0 -30
- package/axis-components/input-number/design/ng-package.json +0 -5
- package/axis-components/input-number/design/setting/setting.css +0 -0
- package/axis-components/input-number/design/setting/setting.html +0 -118
- package/axis-components/input-number/design/setting/setting.ts +0 -66
- package/axis-components/input-number/input-number.css +0 -22
- package/axis-components/input-number/input-number.html +0 -11
- package/axis-components/input-number/input-number.options.ts +0 -17
- package/axis-components/input-number/input-number.ts +0 -30
- package/axis-components/input-number/ng-package.json +0 -5
- package/axis-components/modal/design/config.ts +0 -50
- package/axis-components/modal/design/ng-package.json +0 -5
- 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 +0 -15
- package/axis-components/modal/design/set-modal-visible-handler/set-modal-visible-handler.ts +0 -34
- package/axis-components/modal/design/setting/setting.css +0 -0
- package/axis-components/modal/design/setting/setting.html +0 -139
- package/axis-components/modal/design/setting/setting.ts +0 -92
- package/axis-components/modal/modal.css +0 -0
- package/axis-components/modal/modal.html +0 -7
- package/axis-components/modal/modal.options.ts +0 -20
- package/axis-components/modal/modal.ts +0 -57
- package/axis-components/modal/ng-package.json +0 -5
- package/axis-components/ng-package.json +0 -5
- package/axis-components/scope/design/config.ts +0 -59
- package/axis-components/scope/design/ng-package.json +0 -5
- package/axis-components/scope/design/setting/datasource-editor/datasource-editor.css +0 -28
- package/axis-components/scope/design/setting/datasource-editor/datasource-editor.html +0 -188
- package/axis-components/scope/design/setting/datasource-editor/datasource-editor.ts +0 -245
- package/axis-components/scope/design/setting/setting.css +0 -0
- package/axis-components/scope/design/setting/setting.html +0 -19
- package/axis-components/scope/design/setting/setting.ts +0 -30
- package/axis-components/scope/ng-package.json +0 -5
- package/axis-components/scope/scope.css +0 -6
- package/axis-components/scope/scope.html +0 -4
- package/axis-components/scope/scope.options.ts +0 -8
- package/axis-components/scope/scope.ts +0 -48
- package/axis-components/single-selector/design/config.ts +0 -30
- package/axis-components/single-selector/design/ng-package.json +0 -5
- package/axis-components/single-selector/design/setting/setting.css +0 -0
- package/axis-components/single-selector/design/setting/setting.html +0 -164
- package/axis-components/single-selector/design/setting/setting.ts +0 -80
- package/axis-components/single-selector/ng-package.json +0 -5
- package/axis-components/single-selector/single-selector.css +0 -8
- package/axis-components/single-selector/single-selector.html +0 -51
- package/axis-components/single-selector/single-selector.options.ts +0 -22
- package/axis-components/single-selector/single-selector.ts +0 -80
- package/axis-components/splitter/design/config.ts +0 -84
- package/axis-components/splitter/design/ng-package.json +0 -5
- package/axis-components/splitter/design/splitter-menu/splitter-menu.css +0 -0
- package/axis-components/splitter/design/splitter-menu/splitter-menu.html +0 -10
- package/axis-components/splitter/design/splitter-menu/splitter-menu.ts +0 -22
- 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 +0 -66
- package/axis-components/splitter/design/splitter-panel-setting/splitter-panel-setting.ts +0 -47
- package/axis-components/splitter/design/splitter-setting/splitter-setting.css +0 -0
- package/axis-components/splitter/design/splitter-setting/splitter-setting.html +0 -28
- package/axis-components/splitter/design/splitter-setting/splitter-setting.ts +0 -30
- package/axis-components/splitter/ng-package.json +0 -5
- package/axis-components/splitter/splitter.css +0 -7
- package/axis-components/splitter/splitter.html +0 -12
- package/axis-components/splitter/splitter.options.ts +0 -18
- package/axis-components/splitter/splitter.ts +0 -29
- package/axis-components/table/design/config.ts +0 -147
- package/axis-components/table/design/ng-package.json +0 -5
- 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 +0 -259
- package/axis-components/table/design/table-field-setting/table-field-setting.ts +0 -105
- 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 +0 -9
- package/axis-components/table/design/table-fields-menu/table-fields-menu.ts +0 -24
- package/axis-components/table/design/table-setting/table-setting.css +0 -0
- package/axis-components/table/design/table-setting/table-setting.html +0 -417
- package/axis-components/table/design/table-setting/table-setting.ts +0 -173
- package/axis-components/table/expand.ts +0 -12
- package/axis-components/table/ng-package.json +0 -5
- package/axis-components/table/select.ts +0 -66
- package/axis-components/table/table-setter/table-setter.css +0 -55
- package/axis-components/table/table-setter/table-setter.html +0 -38
- package/axis-components/table/table-setter/table-setter.ts +0 -121
- package/axis-components/table/table.css +0 -5
- package/axis-components/table/table.html +0 -191
- package/axis-components/table/table.options.ts +0 -72
- package/axis-components/table/table.ts +0 -204
- package/axis-components/text/design/config.ts +0 -30
- package/axis-components/text/design/ng-package.json +0 -5
- package/axis-components/text/design/setting/setting.css +0 -0
- package/axis-components/text/design/setting/setting.html +0 -84
- package/axis-components/text/design/setting/setting.ts +0 -54
- package/axis-components/text/ng-package.json +0 -5
- package/axis-components/text/text.css +0 -3
- package/axis-components/text/text.html +0 -17
- package/axis-components/text/text.options.ts +0 -10
- package/axis-components/text/text.ts +0 -54
- package/axis-components/textarea/design/config.ts +0 -30
- package/axis-components/textarea/design/ng-package.json +0 -5
- package/axis-components/textarea/design/setting/setting.css +0 -0
- package/axis-components/textarea/design/setting/setting.html +0 -76
- package/axis-components/textarea/design/setting/setting.ts +0 -55
- package/axis-components/textarea/ng-package.json +0 -5
- package/axis-components/textarea/textarea.css +0 -4
- package/axis-components/textarea/textarea.html +0 -11
- package/axis-components/textarea/textarea.options.ts +0 -13
- package/axis-components/textarea/textarea.ts +0 -49
- package/axis-components/tree-selector/design/config.ts +0 -55
- package/axis-components/tree-selector/design/ng-package.json +0 -5
- 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 +0 -9
- package/axis-components/tree-selector/design/tree-selector-menu/tree-selector-menu.ts +0 -26
- 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 +0 -80
- package/axis-components/tree-selector/design/tree-selector-menu-setting/tree-selector-menu-setting.ts +0 -58
- 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 +0 -235
- package/axis-components/tree-selector/design/tree-selector-setting/tree-selector-setting.ts +0 -87
- package/axis-components/tree-selector/ng-package.json +0 -5
- package/axis-components/tree-selector/tree-selector.css +0 -43
- package/axis-components/tree-selector/tree-selector.html +0 -65
- package/axis-components/tree-selector/tree-selector.options.ts +0 -50
- package/axis-components/tree-selector/tree-selector.ts +0 -252
- package/axis-components/upload/design/config.ts +0 -37
- package/axis-components/upload/design/ng-package.json +0 -5
- package/axis-components/upload/design/setting/setting.css +0 -0
- package/axis-components/upload/design/setting/setting.html +0 -288
- package/axis-components/upload/design/setting/setting.ts +0 -96
- package/axis-components/upload/ng-package.json +0 -5
- package/axis-components/upload/upload.css +0 -3
- package/axis-components/upload/upload.html +0 -36
- package/axis-components/upload/upload.options.ts +0 -29
- package/axis-components/upload/upload.ts +0 -130
- package/core/base/base-menu.ts +0 -22
- package/core/base/base.ts +0 -143
- package/core/base/design-builder.ts +0 -8
- package/core/base/funfield-base.ts +0 -106
- package/core/base/funfield-value-base.ts +0 -53
- package/core/base/value-access.ts +0 -70
- package/core/directives/dynamic.ts +0 -216
- package/core/directives/scope.ts +0 -432
- package/core/models/api.options.ts +0 -5
- package/core/models/base.options.ts +0 -11
- package/core/models/cmplib.ts +0 -7
- package/core/models/data-source.options.ts +0 -11
- package/core/models/data.options.ts +0 -6
- package/core/models/design-build.ts +0 -26
- package/core/models/design-config.ts +0 -14
- package/core/models/design-tree-node.ts +0 -16
- package/core/models/event-desc.ts +0 -28
- package/core/models/event-handler.ts +0 -6
- package/core/models/event.options.ts +0 -14
- package/core/models/examples.ts +0 -21
- package/core/models/form-registe.options.ts +0 -12
- package/core/models/fun-field.options.ts +0 -6
- package/core/models/initobs.ts +0 -8
- package/core/models/options-node.ts +0 -149
- package/core/models/static-data-source.options.ts +0 -4
- package/core/models/trigge-events.options.ts +0 -3
- package/core/models/value-access.options.ts +0 -10
- package/core/ng-package.json +0 -5
- package/core/pipes/how-long.pipe.ts +0 -69
- package/core/public-api.ts +0 -39
- package/core/share/api-handler/api-handler.css +0 -0
- package/core/share/api-handler/api-handler.html +0 -38
- package/core/share/api-handler/api-handler.ts +0 -51
- package/core/share/array-filter-handler/array-filter-handler.css +0 -0
- package/core/share/array-filter-handler/array-filter-handler.html +0 -26
- package/core/share/array-filter-handler/array-filter-handler.ts +0 -65
- package/core/share/array-filter-handler/input-filter-options/filter-options.css +0 -19
- package/core/share/array-filter-handler/input-filter-options/filter-options.html +0 -57
- package/core/share/array-filter-handler/input-filter-options/filter-options.ts +0 -100
- package/core/share/base-design-setting/base-design-setting.css +0 -0
- package/core/share/base-design-setting/base-design-setting.html +0 -50
- package/core/share/base-design-setting/base-design-setting.ts +0 -55
- package/core/share/base-event-handler-descs.ts +0 -100
- package/core/share/common-menu/common-menu.css +0 -0
- package/core/share/common-menu/common-menu.html +0 -21
- package/core/share/common-menu/common-menu.ts +0 -73
- package/core/share/data-handler/data-handler.css +0 -0
- package/core/share/data-handler/data-handler.html +0 -13
- package/core/share/data-handler/data-handler.ts +0 -39
- package/core/share/events-handler.service.ts +0 -185
- package/core/share/fun-field/fun-field.css +0 -55
- package/core/share/fun-field/fun-field.html +0 -175
- package/core/share/fun-field/fun-field.ts +0 -363
- package/core/share/input-trigger/input-trigger.css +0 -16
- package/core/share/input-trigger/input-trigger.html +0 -114
- package/core/share/input-trigger/input-trigger.ts +0 -394
- package/core/share/msg-tip-handler/msg-tip-handler.css +0 -0
- package/core/share/msg-tip-handler/msg-tip-handler.html +0 -40
- package/core/share/msg-tip-handler/msg-tip-handler.ts +0 -46
- 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 +0 -29
- package/core/share/refresh-data-source-handler/refresh-data-source-handler.ts +0 -55
- package/core/share/route-handler/route-handler.css +0 -0
- package/core/share/route-handler/route-handler.html +0 -49
- package/core/share/route-handler/route-handler.ts +0 -51
- 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 +0 -23
- package/core/share/set-data-source-handler/set-data-source-handler.ts +0 -44
- package/core/share/simple-menu/simple-menu.css +0 -0
- package/core/share/simple-menu/simple-menu.html +0 -5
- package/core/share/simple-menu/simple-menu.ts +0 -17
- package/core/share/tokens.ts +0 -29
- package/core/share/value-design-setting/value-design-setting.css +0 -0
- package/core/share/value-design-setting/value-design-setting.html +0 -48
- package/core/share/value-design-setting/value-design-setting.ts +0 -54
- package/core/utils/code-name.utils.ts +0 -19
- package/core/utils/components-loader.ts +0 -29
- package/core/utils/declaration.utils.ts +0 -38
- package/core/utils/dynamic.util.ts +0 -57
- package/core/utils/form-validators.ts +0 -160
- package/core/utils/form.util.ts +0 -25
- package/core/utils/http.utils.ts +0 -8
- package/core/utils/object.utils.ts +0 -182
- package/core/utils/scripts-loader.ts +0 -25
- package/ng-package.json +0 -13
- package/providers/ng-package.json +0 -5
- package/providers/public-api.ts +0 -1
- package/public-api.ts +0 -1
- package/tsconfig.json +0 -35
- package/tsconfig.lib.json +0 -19
- package/tsconfig.lib.prod.json +0 -11
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<div class="tools" nz-flex nzGap="4px">
|
|
2
|
-
<button nz-button nzSize="small" nzType="text" nzShape="circle" nz-tooltip="快捷键说明"
|
|
3
|
-
(click)="shortcutKeysModal.set(true)">
|
|
4
|
-
<nz-icon nzType="exclamation-circle" nzTheme="outline" />
|
|
5
|
-
</button>
|
|
6
|
-
<button nz-button nzSize="small" nzType="text" nzShape="circle" nz-tooltip="编辑历史" nz-popover
|
|
7
|
-
[nzPopoverTitle]="historyTitle" nzPopoverTrigger="click" [nzPopoverContent]="historyTemp"
|
|
8
|
-
nzPopoverPlacement="bottom" nzPopoverOverlayClassName="history-popover">
|
|
9
|
-
<nz-icon nzType="history" nzTheme="outline" />
|
|
10
|
-
</button>
|
|
11
|
-
<button nz-button nzSize="small" nzType="text" nzShape="circle" [nz-tooltip]="onlyPreview()?'恢复':'放大'"
|
|
12
|
-
(click)="onlyPreview.set(!onlyPreview())">
|
|
13
|
-
<nz-icon [nzType]="onlyPreview()?'fullscreen-exit':'fullscreen'" />
|
|
14
|
-
</button>
|
|
15
|
-
<button nz-button nzSize="small" nzType="text" nzShape="circle" nz-tooltip="重新载入"
|
|
16
|
-
(click)="design.preview.forceRender()">
|
|
17
|
-
<nz-icon nzType="reload" />
|
|
18
|
-
</button>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<ng-template #historyTitle>
|
|
22
|
-
<div nz-flex>
|
|
23
|
-
<div style="flex:1">编辑历史</div>
|
|
24
|
-
<button nz-button nzSize="small" nzType="link" nzShape="circle" nz-tooltip="撤销" (click)="undo()"
|
|
25
|
-
[disabled]="historyIndex==history.length-1">
|
|
26
|
-
<nz-icon nzType="undo" nzTheme="outline" />
|
|
27
|
-
</button>
|
|
28
|
-
<button nz-button nzSize="small" nzType="link" nzShape="circle" nz-tooltip="重做" (click)="redo()"
|
|
29
|
-
[disabled]="historyIndex==0">
|
|
30
|
-
<nz-icon nzType="redo" nzTheme="outline" />
|
|
31
|
-
</button>
|
|
32
|
-
</div>
|
|
33
|
-
</ng-template>
|
|
34
|
-
|
|
35
|
-
<ng-template #historyTemp>
|
|
36
|
-
<div nz-flex nzVertical>
|
|
37
|
-
@for (item of history; track item.time;let i=$index) {
|
|
38
|
-
<div nz-flex [class.active]="i == historyIndex" class="history-item" (click)="switchHistory(i)">
|
|
39
|
-
<div style="width: 20px;">
|
|
40
|
-
@if (i == historyIndex) {
|
|
41
|
-
<nz-icon nzType="aim" nzTheme="outline" />
|
|
42
|
-
}
|
|
43
|
-
</div>
|
|
44
|
-
<div>#{{history.length-i}} {{item.time | axisHowLong}}</div>
|
|
45
|
-
</div>
|
|
46
|
-
}
|
|
47
|
-
</div>
|
|
48
|
-
</ng-template>
|
|
49
|
-
|
|
50
|
-
<nz-modal [(nzVisible)]="shortcutKeysModal" nzTitle="快捷键说明" nzDraggable [nzOkText]="null" nzCancelText="关闭"
|
|
51
|
-
(nzOnCancel)="shortcutKeysModal.set(false)">
|
|
52
|
-
<ng-container *nzModalContent>
|
|
53
|
-
<nz-table nzTemplateMode nzSize="small">
|
|
54
|
-
<thead>
|
|
55
|
-
<tr>
|
|
56
|
-
<th>功能</th>
|
|
57
|
-
<th>快捷键</th>
|
|
58
|
-
</tr>
|
|
59
|
-
</thead>
|
|
60
|
-
<tbody>
|
|
61
|
-
<tr>
|
|
62
|
-
<td>查看快捷键说明</td>
|
|
63
|
-
<td>Ctrl Meta H</td>
|
|
64
|
-
</tr>
|
|
65
|
-
<tr>
|
|
66
|
-
<td>复制</td>
|
|
67
|
-
<td>Ctrl C</td>
|
|
68
|
-
</tr>
|
|
69
|
-
<tr>
|
|
70
|
-
<td>剪切</td>
|
|
71
|
-
<td>Ctrl X</td>
|
|
72
|
-
</tr>
|
|
73
|
-
<tr>
|
|
74
|
-
<td>粘贴</td>
|
|
75
|
-
<td>Ctrl V</td>
|
|
76
|
-
</tr>
|
|
77
|
-
<tr>
|
|
78
|
-
<td>撤销</td>
|
|
79
|
-
<td>Ctrl Z</td>
|
|
80
|
-
</tr>
|
|
81
|
-
<tr>
|
|
82
|
-
<td>重做</td>
|
|
83
|
-
<td>Ctrl Shift Z</td>
|
|
84
|
-
</tr>
|
|
85
|
-
<tr>
|
|
86
|
-
<td>预览放大/恢复</td>
|
|
87
|
-
<td>Ctrl Meta C</td>
|
|
88
|
-
</tr>
|
|
89
|
-
<tr>
|
|
90
|
-
<td>重新载入</td>
|
|
91
|
-
<td>Ctrl Meta R</td>
|
|
92
|
-
</tr>
|
|
93
|
-
</tbody>
|
|
94
|
-
</nz-table>
|
|
95
|
-
</ng-container>
|
|
96
|
-
</nz-modal>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, model, signal } from '@angular/core';
|
|
2
|
-
import { Design } from '../design';
|
|
3
|
-
import { NzFlexModule } from 'ng-zorro-antd/flex';
|
|
4
|
-
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
5
|
-
import { NzModalModule } from 'ng-zorro-antd/modal';
|
|
6
|
-
import { NzTableModule } from 'ng-zorro-antd/table';
|
|
7
|
-
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
8
|
-
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
9
|
-
import { NzPopoverModule } from 'ng-zorro-antd/popover';
|
|
10
|
-
import { copy, HowLongPipe } from 'ngx-axis-appforge/core';
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'axis-toolbar',
|
|
14
|
-
imports: [NzModalModule, NzTableModule, NzFlexModule, NzIconModule, NzToolTipModule, NzButtonModule, NzPopoverModule, HowLongPipe],
|
|
15
|
-
templateUrl: './toolbar.html',
|
|
16
|
-
styleUrl: './toolbar.css',
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
})
|
|
19
|
-
export class Toolbar {
|
|
20
|
-
|
|
21
|
-
readonly design = inject(Design);
|
|
22
|
-
readonly cdr = inject(ChangeDetectorRef);
|
|
23
|
-
readonly onlyPreview = signal(false);
|
|
24
|
-
readonly shortcutKeysModal = model(false);
|
|
25
|
-
|
|
26
|
-
readonly history: { options: any, time: Date }[] = [];
|
|
27
|
-
historyIndex = 0;
|
|
28
|
-
|
|
29
|
-
putHistory(options: any) {
|
|
30
|
-
if (this.historyIndex > 0) {
|
|
31
|
-
this.history.splice(0, this.historyIndex);
|
|
32
|
-
this.historyIndex = 0;
|
|
33
|
-
}
|
|
34
|
-
this.history.unshift({ options: copy(options, true), time: new Date() });
|
|
35
|
-
if (this.history.length > 50) {
|
|
36
|
-
this.history.pop();
|
|
37
|
-
}
|
|
38
|
-
this.cdr.markForCheck();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
undo() {
|
|
42
|
-
if (this.historyIndex < this.history.length - 1) {
|
|
43
|
-
this.historyIndex++;
|
|
44
|
-
this.design.onChangeOptionsConfig(copy(this.history[this.historyIndex].options, true), false);
|
|
45
|
-
this.cdr.markForCheck();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
redo() {
|
|
50
|
-
if (this.historyIndex > 0) {
|
|
51
|
-
this.historyIndex--;
|
|
52
|
-
this.design.onChangeOptionsConfig(copy(this.history[this.historyIndex].options, true), false);
|
|
53
|
-
this.cdr.markForCheck();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
switchHistory(index: number) {
|
|
58
|
-
if (index != this.historyIndex && index > -1 && index < this.history.length) {
|
|
59
|
-
this.historyIndex = index;
|
|
60
|
-
this.design.onChangeOptionsConfig(copy(this.history[this.historyIndex].options, true), false);
|
|
61
|
-
this.cdr.markForCheck();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
2
|
-
import { FlatNode, OptionsNode } from 'ngx-axis-appforge/core';
|
|
3
|
-
|
|
4
|
-
export class DragDrop {
|
|
5
|
-
|
|
6
|
-
constructor(private optionsNodes: Map<string, OptionsNode>, private optionIdflatNodes: Map<string, FlatNode>, private treeControl: FlatTreeControl<FlatNode, string>, private onChange: () => void) { }
|
|
7
|
-
|
|
8
|
-
dragNode?: OptionsNode;
|
|
9
|
-
dropNode?: OptionsNode;
|
|
10
|
-
targetIndex?: number | string;
|
|
11
|
-
element?: HTMLElement;
|
|
12
|
-
pos?: number;
|
|
13
|
-
|
|
14
|
-
canDrag(nodeId: string): boolean {
|
|
15
|
-
const node = this.optionsNodes.get(nodeId);
|
|
16
|
-
return !!node && !node?.isRoot && node?.canDrag;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
onDragStart(e: DragEvent, nodeId: string) {
|
|
20
|
-
this.dragNode = this.optionsNodes.get(nodeId);
|
|
21
|
-
if (this.dragNode?.children?.length) {
|
|
22
|
-
this.treeControl.collapse(this.optionIdflatNodes.get(nodeId)!);
|
|
23
|
-
}
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
(e.target as HTMLElement).style.display = 'none';
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
onDragOver(e: DragEvent, nodeId: string) {
|
|
30
|
-
const node = this.optionsNodes.get(nodeId)!;
|
|
31
|
-
const parent = node.parentId ? this.optionsNodes.get(node.parentId) : undefined;
|
|
32
|
-
let canDropIn = this.canDrop(node);
|
|
33
|
-
let canDropSide = !!parent && this.canDrop(parent);
|
|
34
|
-
if (!canDropIn && !canDropSide) {
|
|
35
|
-
e.preventDefault();
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const pos = this.getPos(e, canDropIn, canDropSide);
|
|
39
|
-
const element = (e.currentTarget as HTMLElement);
|
|
40
|
-
this.updateElementStyle(element, pos);
|
|
41
|
-
if (pos == 0) {
|
|
42
|
-
this.targetIndex = node?.defaultDropIndex;
|
|
43
|
-
this.dropNode = node;
|
|
44
|
-
this.treeControl.expand(this.optionIdflatNodes.get(node.id!)!)
|
|
45
|
-
} else if (pos == -1) {
|
|
46
|
-
this.targetIndex = node.indexOfParentObj;
|
|
47
|
-
this.dropNode = parent;
|
|
48
|
-
} else {
|
|
49
|
-
this.targetIndex = (node.indexOfParentObj as number) + 1;
|
|
50
|
-
this.dropNode = parent;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
private updateElementStyle(element?: HTMLElement, pos?: number) {
|
|
55
|
-
if (element != this.element || pos != this.pos) {
|
|
56
|
-
this.element?.classList.remove("drop_in", "drop_up", "drop_down");
|
|
57
|
-
if (element) {
|
|
58
|
-
switch (pos) {
|
|
59
|
-
case -1:
|
|
60
|
-
element.classList.add("drop_up");
|
|
61
|
-
break;
|
|
62
|
-
case 0:
|
|
63
|
-
element.classList.add("drop_in");
|
|
64
|
-
break;
|
|
65
|
-
default:
|
|
66
|
-
element.classList.add("drop_down");
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
this.element = element;
|
|
71
|
-
this.pos = pos;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
onDragEnd(e: DragEvent, nodeId: string) {
|
|
76
|
-
(e.target as HTMLElement).style.display = 'flex';
|
|
77
|
-
if (this.dropNode) {
|
|
78
|
-
if (this.dropNode.dropObj == this.dragNode!.parentObj && this.dragNode!.indexOfParentObj == this.targetIndex) {
|
|
79
|
-
this.updateElementStyle();
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
82
|
-
if (this.dropNode.dropObj instanceof Array && this.dropNode.dropObj == this.dragNode!.parentObj && this.dragNode!.indexOfParentObj! < this.targetIndex!) {
|
|
83
|
-
(this.targetIndex as number)!--;
|
|
84
|
-
}
|
|
85
|
-
const dragObj = this.dragNode!.options;
|
|
86
|
-
if (!this.dragNode!.isRoot) {
|
|
87
|
-
if (this.dragNode?.parentObj instanceof Array) {
|
|
88
|
-
this.dragNode!.parentObj.splice(this.dragNode!.indexOfParentObj as number, 1);
|
|
89
|
-
} else {
|
|
90
|
-
this.dragNode!.parentObj[this.dragNode!.indexOfParentObj as number] = null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (this.dropNode.dropObj instanceof Array) {
|
|
94
|
-
this.dropNode.dropObj.splice(this.targetIndex as number, 0, dragObj);
|
|
95
|
-
} else {
|
|
96
|
-
this.dropNode.dropObj[this.targetIndex!] = dragObj;
|
|
97
|
-
}
|
|
98
|
-
this.onChange();
|
|
99
|
-
}
|
|
100
|
-
this.dragNode = undefined;
|
|
101
|
-
this.updateElementStyle();
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
private canDrop(node: OptionsNode | undefined): boolean {
|
|
105
|
-
if (node && node.canDrop && node.dropType == this.dragNode!.dragType) {
|
|
106
|
-
return !node.dropObj[node.defaultDropIndex!];
|
|
107
|
-
}
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
private getPos(e: DragEvent, canDropIn: boolean, canDropSide: boolean): number {
|
|
112
|
-
const element = e.target as HTMLElement;
|
|
113
|
-
const rect = element.getBoundingClientRect();
|
|
114
|
-
const clientY = e.clientY - rect.top;
|
|
115
|
-
const height = rect.height;
|
|
116
|
-
if (canDropIn && canDropSide) {
|
|
117
|
-
return 1 - Math.floor(clientY / height * 3);
|
|
118
|
-
} else if (canDropSide) {
|
|
119
|
-
return clientY < height / 2 ? -1 : 1;
|
|
120
|
-
} else {
|
|
121
|
-
return 0;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
::ng-deep .highlight {
|
|
2
|
-
color: #f50;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
nz-tree-view {
|
|
6
|
-
overflow: auto;
|
|
7
|
-
flex: 1;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.drop_in {
|
|
11
|
-
outline: 1px solid blue;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.drop_up::after {
|
|
15
|
-
content: "";
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: -1px;
|
|
18
|
-
width: 100%;
|
|
19
|
-
height: 2px;
|
|
20
|
-
background-color: blue;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.drop_down::after {
|
|
24
|
-
content: "";
|
|
25
|
-
position: absolute;
|
|
26
|
-
bottom: -1px;
|
|
27
|
-
width: 100%;
|
|
28
|
-
height: 2px;
|
|
29
|
-
background-color: blue;
|
|
30
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<div nz-flex [nzVertical]="true" style="height: 100%;">
|
|
2
|
-
<div nz-flex style="padding-right: 8px;" nzGap="4px" nzAlign="center">
|
|
3
|
-
<input style="flex:1;" type="text" nz-input placeholder="搜索" nzBorderless ngModel
|
|
4
|
-
(ngModelChange)="searchValue$.next($event)" />
|
|
5
|
-
<button nz-button nzSize="small" nzType="text" nzShape="circle" (click)="toggleExpanded()">
|
|
6
|
-
<nz-icon [nzType]="hasExpanded?'shrink':'arrows-alt'" nzTheme="outline" />
|
|
7
|
-
</button>
|
|
8
|
-
</div>
|
|
9
|
-
@if (node() === null) {
|
|
10
|
-
<nz-empty [nzNotFoundContent]="contentTpl" [nzNotFoundFooter]="footerTpl">
|
|
11
|
-
<ng-template #contentTpl>
|
|
12
|
-
没有组件
|
|
13
|
-
</ng-template>
|
|
14
|
-
<ng-template #footerTpl>
|
|
15
|
-
<button nz-button nzType="dashed" (click)="addRootComponent()">
|
|
16
|
-
<nz-icon nzType="plus"></nz-icon>
|
|
17
|
-
添加组件
|
|
18
|
-
</button>
|
|
19
|
-
</ng-template>
|
|
20
|
-
</nz-empty>
|
|
21
|
-
}@else {
|
|
22
|
-
<nz-tree-view nzDirectoryTree [nzTreeControl]="treeControl" [nzDataSource]="dataSource">
|
|
23
|
-
<nz-tree-node *nzTreeNodeDef="let node" nzTreeNodePadding [nzTreeNodePaddingIndent]="8"
|
|
24
|
-
(contextmenu)="contextMenu($event, node.id)" [draggable]="dragdrop().canDrag(node.id)"
|
|
25
|
-
(dragstart)="dragdrop().onDragStart($event, node.id)" (dragover)="dragdrop().onDragOver($event, node.id)"
|
|
26
|
-
(dragend)="dragdrop().onDragEnd($event,node.id)">
|
|
27
|
-
<nz-tree-node-toggle nzTreeNodeNoopToggle></nz-tree-node-toggle>
|
|
28
|
-
<nz-tree-node-option [nzDisabled]="node.disabled" [nzSelected]="selectListSelection.isSelected(node.id)"
|
|
29
|
-
(nzClick)="onNodeClick($event,node)" [nz-tooltip]="node.id" [nzTooltipMouseEnterDelay]="0.6">
|
|
30
|
-
<i nz-icon [nzType]="node.icon" style="margin: 4px;"></i>
|
|
31
|
-
<span [innerHTML]="node.title | nzHighlight: searchValue() : 'i' : 'highlight'"></span>
|
|
32
|
-
</nz-tree-node-option>
|
|
33
|
-
</nz-tree-node>
|
|
34
|
-
<nz-tree-node *nzTreeNodeDef="let node; when: hasChild" nzTreeNodePadding [nzTreeNodePaddingIndent]="8"
|
|
35
|
-
(contextmenu)="contextMenu($event, node.id)" [draggable]="dragdrop().canDrag(node.id)"
|
|
36
|
-
(dragstart)="dragdrop().onDragStart($event, node.id)" (dragover)="dragdrop().onDragOver($event, node.id)"
|
|
37
|
-
(dragend)="dragdrop().onDragEnd($event,node.id)">
|
|
38
|
-
<nz-tree-node-toggle>
|
|
39
|
-
<nz-icon nzType="caret-down" nzTreeNodeToggleRotateIcon />
|
|
40
|
-
</nz-tree-node-toggle>
|
|
41
|
-
<nz-tree-node-option [nzDisabled]="node.disabled" [nzSelected]="selectListSelection.isSelected(node.id)"
|
|
42
|
-
(nzClick)="onNodeClick($event,node)" [nz-tooltip]="node.id" [nzTooltipMouseEnterDelay]="0.6">
|
|
43
|
-
<i nz-icon [nzType]="node.icon" style="margin: 4px;"></i>
|
|
44
|
-
<span [innerHTML]="node.title | nzHighlight: searchValue() : 'i' : 'highlight'"></span>
|
|
45
|
-
</nz-tree-node-option>
|
|
46
|
-
</nz-tree-node>
|
|
47
|
-
</nz-tree-view>
|
|
48
|
-
}
|
|
49
|
-
</div>
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
2
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, effect, inject, input, OnDestroy, OnInit, output, signal } from '@angular/core';
|
|
3
|
-
import { FormsModule } from '@angular/forms';
|
|
4
|
-
import { NzHighlightPipe } from 'ng-zorro-antd/core/highlight';
|
|
5
|
-
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
6
|
-
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
7
|
-
import { NzTreeFlatDataSource, NzTreeFlattener, NzTreeViewModule } from 'ng-zorro-antd/tree-view';
|
|
8
|
-
import { auditTime, BehaviorSubject, combineLatest, filter, map, Subscription, take, tap } from 'rxjs';
|
|
9
|
-
import { NzFlexModule } from 'ng-zorro-antd/flex';
|
|
10
|
-
import { SelectionModel } from '@angular/cdk/collections';
|
|
11
|
-
import { DragDrop } from './drag-drop';
|
|
12
|
-
import { FlatNode, FilteredTreeResult, OptionsNode } from 'ngx-axis-appforge/core';
|
|
13
|
-
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
14
|
-
import { NzTooltipModule } from 'ng-zorro-antd/tooltip';
|
|
15
|
-
import { Design } from '../design';
|
|
16
|
-
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
17
|
-
|
|
18
|
-
@Component({
|
|
19
|
-
selector: 'axis-design-tree',
|
|
20
|
-
imports: [FormsModule, NzInputModule, NzIconModule, NzTreeViewModule, NzFlexModule, NzHighlightPipe, NzButtonModule, NzTooltipModule, NzEmptyModule],
|
|
21
|
-
templateUrl: './tree.html',
|
|
22
|
-
styleUrl: './tree.css',
|
|
23
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
|
-
})
|
|
25
|
-
export class Tree implements OnDestroy {
|
|
26
|
-
|
|
27
|
-
readonly node = input.required<OptionsNode | undefined | null>()
|
|
28
|
-
readonly optionsNodes = input.required<Map<string, OptionsNode>>();
|
|
29
|
-
onChange = output<any>();
|
|
30
|
-
readonly onSelect = output<string[]>()
|
|
31
|
-
readonly onContextMenu = output<{ nodeId: string, event: MouseEvent }>()
|
|
32
|
-
readonly dragdrop = computed(() => new DragDrop(this.optionsNodes(), this.optionIdflatNodes, this.treeControl, () => this.onChange.emit(undefined)));
|
|
33
|
-
readonly optionIdflatNodes = new Map<string, FlatNode>();
|
|
34
|
-
readonly flatNodeMap = new Map<string, OptionsNode>();
|
|
35
|
-
readonly nestedNodeMap = new Map<string, FlatNode>();
|
|
36
|
-
searchValue = signal<string>('');
|
|
37
|
-
readonly originData$ = new BehaviorSubject<OptionsNode[]>([]);
|
|
38
|
-
readonly searchValue$ = new BehaviorSubject<string>('');
|
|
39
|
-
readonly selectListSelection = new SelectionModel<string>(true);
|
|
40
|
-
readonly design = inject(Design);
|
|
41
|
-
private readonly subs: Subscription[] = [];
|
|
42
|
-
|
|
43
|
-
readonly transformer = (node: OptionsNode, level: number): FlatNode => {
|
|
44
|
-
const existingNode = this.nestedNodeMap.get(node.id);
|
|
45
|
-
const currentNode = {
|
|
46
|
-
expandable: !!node.children && node.children.length > 0,
|
|
47
|
-
id: node.id!,
|
|
48
|
-
title: node.name ?? "",
|
|
49
|
-
icon: node.icon,
|
|
50
|
-
level
|
|
51
|
-
};
|
|
52
|
-
let flatNode: FlatNode;
|
|
53
|
-
if (existingNode?.id == currentNode.id && existingNode.expandable == currentNode.expandable && existingNode.level == currentNode.level) {
|
|
54
|
-
flatNode = Object.assign(existingNode, currentNode);
|
|
55
|
-
} else {
|
|
56
|
-
flatNode = currentNode;
|
|
57
|
-
}
|
|
58
|
-
this.optionIdflatNodes.set(flatNode.id, flatNode);
|
|
59
|
-
this.flatNodeMap.set(flatNode.id, node);
|
|
60
|
-
this.nestedNodeMap.set(node.id, flatNode);
|
|
61
|
-
return flatNode;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
readonly treeControl = new FlatTreeControl<FlatNode, string>(
|
|
65
|
-
node => node.level,
|
|
66
|
-
node => node.expandable,
|
|
67
|
-
{
|
|
68
|
-
trackBy: flatNode => flatNode.id
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
readonly treeFlattener = new NzTreeFlattener<OptionsNode, FlatNode, string>(
|
|
73
|
-
this.transformer,
|
|
74
|
-
node => node.level,
|
|
75
|
-
node => node.expandable,
|
|
76
|
-
node => node.children
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
readonly dataSource = new NzTreeFlatDataSource(this.treeControl, this.treeFlattener);
|
|
80
|
-
|
|
81
|
-
readonly filteredData$ = combineLatest([
|
|
82
|
-
this.originData$,
|
|
83
|
-
this.searchValue$.pipe(
|
|
84
|
-
auditTime(300),
|
|
85
|
-
tap(value => this.searchValue.set(value))
|
|
86
|
-
)
|
|
87
|
-
]).pipe(map(([data, value]) => (value ? filterTreeData(data, value) : new FilteredTreeResult(data, this.treeControl.expansionModel.selected.filter(id => this.optionsNodes().has(id))))));
|
|
88
|
-
|
|
89
|
-
constructor(private cdRef: ChangeDetectorRef) {
|
|
90
|
-
effect(() => {
|
|
91
|
-
if (this.node()) {
|
|
92
|
-
this.originData$.next([this.node()!]);
|
|
93
|
-
}
|
|
94
|
-
const oldlength = this.selectListSelection.selected.length;
|
|
95
|
-
this.selectListSelection.deselect(...this.selectListSelection.selected.filter(nodeid => !this.optionsNodes().has(nodeid)))
|
|
96
|
-
this.treeControl.expansionModel.deselect(...this.treeControl.expansionModel.selected.filter(id => !this.optionsNodes().has(id)));
|
|
97
|
-
if (oldlength != this.selectListSelection.selected.length) {
|
|
98
|
-
this.sendSelectEvent();
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
this.subs.push(this.filteredData$.subscribe(result => {
|
|
102
|
-
this.dataSource.setData(result.treeData);
|
|
103
|
-
this.treeControl.expansionModel.setSelection(...result.needsToExpanded);
|
|
104
|
-
}));
|
|
105
|
-
this.subs.push(this.filteredData$.pipe(filter(r => r.treeData.length > 0), take(1)).subscribe(result => {
|
|
106
|
-
this.selectOne(result.treeData[0].id, { sendEvent: true });
|
|
107
|
-
}));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
hasChild = (_: number, node: FlatNode): boolean => node.expandable;
|
|
111
|
-
|
|
112
|
-
get hasExpanded(): boolean {
|
|
113
|
-
return this.treeControl.expansionModel.selected.length > 0;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
onNodeClick(e: MouseEvent, node: FlatNode) {
|
|
117
|
-
if (e.metaKey) {
|
|
118
|
-
this.toggleSelect(node.id, { sendEvent: true });
|
|
119
|
-
} else {
|
|
120
|
-
this.selectOne(node.id, { sendEvent: true });
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
select(nodeId: string, opt?: { sendEvent: boolean }) {
|
|
125
|
-
this.selectListSelection.select(nodeId);
|
|
126
|
-
if (opt?.sendEvent) {
|
|
127
|
-
this.sendSelectEvent();
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
selectOne(nodeId: string, opt?: { sendEvent: boolean }) {
|
|
132
|
-
this.unSelectAll();
|
|
133
|
-
this.selectListSelection.select(nodeId);
|
|
134
|
-
if (opt?.sendEvent) {
|
|
135
|
-
this.sendSelectEvent();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
toggleSelect(nodeId: string, opt?: { sendEvent: boolean }) {
|
|
140
|
-
this.selectListSelection.toggle(nodeId);
|
|
141
|
-
if (opt?.sendEvent) {
|
|
142
|
-
this.sendSelectEvent();
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
unSelect(nodeId: string, opt?: { sendEvent: boolean }) {
|
|
147
|
-
this.selectListSelection.deselect(nodeId);
|
|
148
|
-
if (opt?.sendEvent) {
|
|
149
|
-
this.sendSelectEvent();
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
unSelectAll(opt?: { sendEvent: boolean }) {
|
|
154
|
-
this.selectListSelection.clear();
|
|
155
|
-
if (opt?.sendEvent) {
|
|
156
|
-
this.sendSelectEvent();
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
private sendSelectEvent() {
|
|
161
|
-
this.onSelect.emit(this.selectListSelection.selected);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
selectByNodeIds(nodeIds: string[]) {
|
|
165
|
-
this.unSelectAll();
|
|
166
|
-
for (const nodeId of nodeIds) {
|
|
167
|
-
this.select(nodeId);
|
|
168
|
-
const node = this.optionIdflatNodes.get(nodeId);
|
|
169
|
-
if (node) {
|
|
170
|
-
this.treeControl.expand(node);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
this.cdRef.markForCheck();
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
expandByNodeIds(nodeIds: string[]) {
|
|
177
|
-
for (const nodeId of nodeIds) {
|
|
178
|
-
const node = this.optionIdflatNodes.get(nodeId);
|
|
179
|
-
if (node) {
|
|
180
|
-
this.treeControl.expand(node);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
toggleExpanded() {
|
|
186
|
-
if (this.hasExpanded) {
|
|
187
|
-
this.treeControl.collapseAll();
|
|
188
|
-
} else {
|
|
189
|
-
this.treeControl.expandAll();
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
reset() {
|
|
194
|
-
this.optionIdflatNodes.clear();
|
|
195
|
-
this.flatNodeMap.clear();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
contextMenu(e: MouseEvent, nodeId: string) {
|
|
199
|
-
this.onContextMenu.emit({ event: e, nodeId });
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
removeSelected() {
|
|
203
|
-
let changed = false;
|
|
204
|
-
let next = undefined;
|
|
205
|
-
for (const nodeId of this.selectListSelection.selected) {
|
|
206
|
-
const node = this.optionsNodes().get(nodeId);
|
|
207
|
-
if (node) {
|
|
208
|
-
changed = true;
|
|
209
|
-
if (node.isRoot) {
|
|
210
|
-
next = null;
|
|
211
|
-
} else {
|
|
212
|
-
if (Array.isArray(node.parentObj)) {
|
|
213
|
-
node.parentObj.splice(node.parentObj.indexOf(node.options), 1);
|
|
214
|
-
} else {
|
|
215
|
-
node.parentObj[node.indexOfParentObj!] = null;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
if (changed) {
|
|
221
|
-
this.onChange.emit(next);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
addNodeForSelected(nodes: OptionsNode[], deleteSuccess = false) {
|
|
226
|
-
if (nodes.length && this.selectListSelection.selected) {
|
|
227
|
-
for (const nodeId of this.selectListSelection.selected) {
|
|
228
|
-
const parentNode = this.optionsNodes().get(nodeId);
|
|
229
|
-
if (parentNode && parentNode.canDrop && parentNode.dropType == "component") {
|
|
230
|
-
if (Array.isArray(parentNode.dropObj)) {
|
|
231
|
-
parentNode.dropObj.splice(parentNode.dropObj.length, 0, ...nodes.map(n => n.options));
|
|
232
|
-
nodes.forEach(n => this.deleteNode(n));
|
|
233
|
-
} else if (!parentNode.dropObj[parentNode.defaultDropIndex!]) {
|
|
234
|
-
const n = nodes[nodes.length - 1];
|
|
235
|
-
parentNode.dropObj[parentNode.defaultDropIndex!] = n.options;
|
|
236
|
-
if (deleteSuccess) {
|
|
237
|
-
this.deleteNode(n);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
this.onChange.emit(undefined);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
private deleteNode(node: OptionsNode) {
|
|
247
|
-
if (node.parentObj) {
|
|
248
|
-
if (Array.isArray(node.parentObj)) {
|
|
249
|
-
node.parentObj.splice(node.indexOfParentObj as number, 1);
|
|
250
|
-
} else {
|
|
251
|
-
delete node.parentObj[node.indexOfParentObj!];
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
addRootComponent() {
|
|
257
|
-
this.design.chooseComponent().subscribe(res => {
|
|
258
|
-
const { options, config } = res;
|
|
259
|
-
if (options && config) {
|
|
260
|
-
this.onChange.emit(options);
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
ngOnDestroy(): void {
|
|
266
|
-
for (let sub of this.subs) {
|
|
267
|
-
sub.unsubscribe();
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
function filterTreeData(data: OptionsNode[], value: string): FilteredTreeResult {
|
|
274
|
-
const needsToExpanded = new Set<string>();
|
|
275
|
-
const _filter = (node: OptionsNode, result: OptionsNode[]): OptionsNode[] => {
|
|
276
|
-
if (node.name?.search(value) !== -1 || node.id?.search(value) !== -1) {
|
|
277
|
-
result.push(node);
|
|
278
|
-
return result;
|
|
279
|
-
}
|
|
280
|
-
if (Array.isArray(node.children)) {
|
|
281
|
-
const nodes = node.children.reduce((a, b) => _filter(b, a), [] as OptionsNode[]);
|
|
282
|
-
if (nodes.length) {
|
|
283
|
-
const parentNode = node.copyWith({ children: nodes })
|
|
284
|
-
needsToExpanded.add(parentNode.id);
|
|
285
|
-
result.push(parentNode);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
return result;
|
|
289
|
-
};
|
|
290
|
-
const treeData = data.reduce((a, b) => _filter(b, a), [] as OptionsNode[]);
|
|
291
|
-
return new FilteredTreeResult(treeData, [...needsToExpanded]);
|
|
292
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
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: "动态容器",
|
|
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: "container"
|
|
22
|
-
})
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
bindElementsOptionsNode(element: HTMLElement, options: any): DesignBindElementsResult {
|
|
26
|
-
return {
|
|
27
|
-
[options.id]: { element }
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
};
|