ngx-axis-appforge 0.0.0-watch
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/README.md +111 -0
- package/axis-components/badge/design/index.d.ts +5 -0
- package/axis-components/badge/design/index.d.ts.map +1 -0
- package/axis-components/badge/index.d.ts +27 -0
- package/axis-components/badge/index.d.ts.map +1 -0
- package/axis-components/button/design/index.d.ts +5 -0
- package/axis-components/button/index.d.ts +33 -0
- package/axis-components/checkbox/design/index.d.ts +5 -0
- package/axis-components/checkbox/design/index.d.ts.map +1 -0
- package/axis-components/checkbox/index.d.ts +32 -0
- package/axis-components/checkbox/index.d.ts.map +1 -0
- package/axis-components/color-picker/design/index.d.ts +5 -0
- package/axis-components/color-picker/design/index.d.ts.map +1 -0
- package/axis-components/color-picker/index.d.ts +20 -0
- package/axis-components/color-picker/index.d.ts.map +1 -0
- package/axis-components/cytoscape/design/index.d.ts +5 -0
- package/axis-components/cytoscape/design/index.d.ts.map +1 -0
- package/axis-components/cytoscape/index.d.ts +20 -0
- package/axis-components/cytoscape/index.d.ts.map +1 -0
- package/axis-components/date-picker/design/index.d.ts +5 -0
- package/axis-components/date-picker/design/index.d.ts.map +1 -0
- package/axis-components/date-picker/index.d.ts +36 -0
- package/axis-components/date-picker/index.d.ts.map +1 -0
- package/axis-components/desc/design/index.d.ts +5 -0
- package/axis-components/desc/design/index.d.ts.map +1 -0
- package/axis-components/desc/index.d.ts +30 -0
- package/axis-components/desc/index.d.ts.map +1 -0
- package/axis-components/design/design/index.d.ts +5 -0
- package/axis-components/design/index.d.ts +282 -0
- package/axis-components/dropdown/design/index.d.ts +5 -0
- package/axis-components/dropdown/design/index.d.ts.map +1 -0
- package/axis-components/dropdown/index.d.ts +25 -0
- package/axis-components/dropdown/index.d.ts.map +1 -0
- package/axis-components/dynamic-container/design/index.d.ts +5 -0
- package/axis-components/dynamic-container/design/index.d.ts.map +1 -0
- package/axis-components/dynamic-container/index.d.ts +44 -0
- package/axis-components/dynamic-container/index.d.ts.map +1 -0
- package/axis-components/dynamic-value/design/index.d.ts +5 -0
- package/axis-components/dynamic-value/design/index.d.ts.map +1 -0
- package/axis-components/dynamic-value/index.d.ts +16 -0
- package/axis-components/dynamic-value/index.d.ts.map +1 -0
- package/axis-components/edit-table/design/index.d.ts +5 -0
- package/axis-components/edit-table/design/index.d.ts.map +1 -0
- package/axis-components/edit-table/index.d.ts +106 -0
- package/axis-components/edit-table/index.d.ts.map +1 -0
- package/axis-components/editor/design/index.d.ts +5 -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 +31 -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/design/index.d.ts.map +1 -0
- package/axis-components/image/index.d.ts +18 -0
- package/axis-components/image/index.d.ts.map +1 -0
- package/axis-components/index.d.ts +5 -0
- package/axis-components/index.d.ts.map +1 -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/design/index.d.ts.map +1 -0
- package/axis-components/input-component/index.d.ts +43 -0
- package/axis-components/input-component/index.d.ts.map +1 -0
- package/axis-components/input-icon/design/index.d.ts +5 -0
- package/axis-components/input-icon/index.d.ts +25 -0
- package/axis-components/input-json/design/index.d.ts +5 -0
- package/axis-components/input-json/index.d.ts +25 -0
- package/axis-components/input-number/design/index.d.ts +5 -0
- package/axis-components/input-number/design/index.d.ts.map +1 -0
- package/axis-components/input-number/index.d.ts +25 -0
- package/axis-components/input-number/index.d.ts.map +1 -0
- package/axis-components/menu/design/index.d.ts +5 -0
- package/axis-components/menu/design/index.d.ts.map +1 -0
- package/axis-components/menu/index.d.ts +43 -0
- package/axis-components/menu/index.d.ts.map +1 -0
- package/axis-components/modal/design/index.d.ts +5 -0
- package/axis-components/modal/design/index.d.ts.map +1 -0
- package/axis-components/modal/index.d.ts +33 -0
- package/axis-components/modal/index.d.ts.map +1 -0
- package/axis-components/radio/design/index.d.ts +5 -0
- package/axis-components/radio/design/index.d.ts.map +1 -0
- package/axis-components/radio/index.d.ts +31 -0
- package/axis-components/radio/index.d.ts.map +1 -0
- package/axis-components/rate/design/index.d.ts +5 -0
- package/axis-components/rate/design/index.d.ts.map +1 -0
- package/axis-components/rate/index.d.ts +16 -0
- package/axis-components/rate/index.d.ts.map +1 -0
- package/axis-components/rich-text-editor/design/index.d.ts +5 -0
- package/axis-components/rich-text-editor/design/index.d.ts.map +1 -0
- package/axis-components/rich-text-editor/index.d.ts +28 -0
- package/axis-components/rich-text-editor/index.d.ts.map +1 -0
- package/axis-components/scope/design/index.d.ts +5 -0
- package/axis-components/scope/index.d.ts +26 -0
- package/axis-components/select/design/index.d.ts +5 -0
- package/axis-components/select/index.d.ts +48 -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/design/index.d.ts.map +1 -0
- package/axis-components/splitter/index.d.ts +29 -0
- package/axis-components/splitter/index.d.ts.map +1 -0
- package/axis-components/steps/design/index.d.ts +5 -0
- package/axis-components/steps/design/index.d.ts.map +1 -0
- package/axis-components/steps/index.d.ts +38 -0
- package/axis-components/steps/index.d.ts.map +1 -0
- package/axis-components/switch/design/index.d.ts +5 -0
- package/axis-components/switch/design/index.d.ts.map +1 -0
- package/axis-components/switch/index.d.ts +23 -0
- package/axis-components/switch/index.d.ts.map +1 -0
- package/axis-components/table/design/index.d.ts +5 -0
- package/axis-components/table/index.d.ts +144 -0
- package/axis-components/table-helper/index.d.ts +220 -0
- package/axis-components/tabs/design/index.d.ts +5 -0
- package/axis-components/tabs/design/index.d.ts.map +1 -0
- package/axis-components/tabs/index.d.ts +38 -0
- package/axis-components/tabs/index.d.ts.map +1 -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/design/index.d.ts.map +1 -0
- package/axis-components/textarea/index.d.ts +25 -0
- package/axis-components/textarea/index.d.ts.map +1 -0
- package/axis-components/timer/design/index.d.ts +5 -0
- package/axis-components/timer/design/index.d.ts.map +1 -0
- package/axis-components/timer/index.d.ts +22 -0
- package/axis-components/timer/index.d.ts.map +1 -0
- package/axis-components/transfer/design/index.d.ts +5 -0
- package/axis-components/transfer/design/index.d.ts.map +1 -0
- package/axis-components/transfer/index.d.ts +113 -0
- package/axis-components/transfer/index.d.ts.map +1 -0
- package/axis-components/tree-selector/design/index.d.ts +5 -0
- package/axis-components/tree-selector/design/index.d.ts.map +1 -0
- package/axis-components/tree-selector/index.d.ts +80 -0
- package/axis-components/tree-selector/index.d.ts.map +1 -0
- package/axis-components/upload/design/index.d.ts +5 -0
- package/axis-components/upload/design/index.d.ts.map +1 -0
- package/axis-components/upload/index.d.ts +52 -0
- package/axis-components/upload/index.d.ts.map +1 -0
- package/axis-components-covers/badge.svg +1 -0
- package/axis-components-covers/button.svg +14 -0
- package/axis-components-covers/checkbox.svg +24 -0
- package/axis-components-covers/color-picker.svg +98 -0
- package/axis-components-covers/cytoscape.svg +17 -0
- package/axis-components-covers/date-picker.svg +28 -0
- package/axis-components-covers/desc.svg +39 -0
- package/axis-components-covers/design.jpg +0 -0
- package/axis-components-covers/dropdown.svg +39 -0
- package/axis-components-covers/dynamic-container.svg +9 -0
- package/axis-components-covers/dynamic-value.svg +32 -0
- package/axis-components-covers/edit-table.png +0 -0
- package/axis-components-covers/editor.png +0 -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/menu.svg +17 -0
- package/axis-components-covers/modal.svg +23 -0
- package/axis-components-covers/radio.svg +19 -0
- package/axis-components-covers/rate.svg +31 -0
- package/axis-components-covers/rich-text-editor.png +0 -0
- package/axis-components-covers/scope.svg +9 -0
- package/axis-components-covers/select.svg +20 -0
- package/axis-components-covers/splitter.svg +8 -0
- package/axis-components-covers/steps.svg +1 -0
- package/axis-components-covers/switch.svg +14 -0
- package/axis-components-covers/table.svg +27 -0
- package/axis-components-covers/tabs.svg +1 -0
- package/axis-components-covers/text.svg +22 -0
- package/axis-components-covers/textarea.svg +9 -0
- package/axis-components-covers/timer.svg +1 -0
- package/axis-components-covers/transfer.svg +86 -0
- package/axis-components-covers/tree-selector.svg +77 -0
- package/axis-components-covers/upload.svg +26 -0
- package/core/index.d.ts +853 -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 +120 -0
- package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs +80 -0
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox-design.mjs +92 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs +119 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-color-picker-design.mjs +97 -0
- package/fesm2022/ngx-axis-appforge-axis-components-color-picker-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-color-picker.mjs +34 -0
- package/fesm2022/ngx-axis-appforge-axis-components-color-picker.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-cytoscape-design.mjs +63 -0
- package/fesm2022/ngx-axis-appforge-axis-components-cytoscape-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-cytoscape.mjs +54 -0
- package/fesm2022/ngx-axis-appforge-axis-components-cytoscape.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker-design.mjs +115 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.mjs +104 -0
- package/fesm2022/ngx-axis-appforge-axis-components-date-picker.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 +83 -0
- package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +1922 -0
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dropdown-design.mjs +178 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dropdown-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dropdown.mjs +55 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dropdown.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs +83 -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 +149 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-value-design.mjs +77 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-value-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-value.mjs +29 -0
- package/fesm2022/ngx-axis-appforge-axis-components-dynamic-value.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table-design.mjs +344 -0
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs +332 -0
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-editor-design.mjs +75 -0
- package/fesm2022/ngx-axis-appforge-axis-components-editor-design.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 +88 -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 +97 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +151 -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 +56 -0
- package/fesm2022/ngx-axis-appforge-axis-components-image.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs +83 -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 +64 -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 +75 -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 +74 -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-menu-design.mjs +356 -0
- package/fesm2022/ngx-axis-appforge-axis-components-menu-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-menu.mjs +98 -0
- package/fesm2022/ngx-axis-appforge-axis-components-menu.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-radio-design.mjs +104 -0
- package/fesm2022/ngx-axis-appforge-axis-components-radio-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-radio.mjs +100 -0
- package/fesm2022/ngx-axis-appforge-axis-components-radio.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rate-design.mjs +80 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rate-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rate.mjs +30 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rate.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor-design.mjs +76 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor.mjs +141 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs +388 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs +75 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-select-design.mjs +146 -0
- package/fesm2022/ngx-axis-appforge-axis-components-select-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs +202 -0
- package/fesm2022/ngx-axis-appforge-axis-components-select.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs +121 -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 +106 -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 +60 -0
- package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-steps-design.mjs +197 -0
- package/fesm2022/ngx-axis-appforge-axis-components-steps-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-steps.mjs +61 -0
- package/fesm2022/ngx-axis-appforge-axis-components-steps.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-switch-design.mjs +79 -0
- package/fesm2022/ngx-axis-appforge-axis-components-switch-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-switch.mjs +48 -0
- package/fesm2022/ngx-axis-appforge-axis-components-switch.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +497 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs +650 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +374 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tabs-design.mjs +260 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tabs-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tabs.mjs +69 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tabs.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-timer-design.mjs +69 -0
- package/fesm2022/ngx-axis-appforge-axis-components-timer-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-timer.mjs +59 -0
- package/fesm2022/ngx-axis-appforge-axis-components-timer.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-transfer-design.mjs +359 -0
- package/fesm2022/ngx-axis-appforge-axis-components-transfer-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs +278 -0
- package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs +223 -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 +337 -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 +175 -0
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +1643 -0
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-core.mjs +3611 -0
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-providers.mjs +52 -0
- 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 +389 -0
- package/providers/index.d.ts +13 -0
- package/providers/index.d.ts.map +1 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { FunFieldValueBase, FormValidators, valueFbConfig, baseFbConfig, valueFunField, baseFunField, BaseDesignSetting, FunField, InputTrigger, ValueDesignSetting, OptionsNode, SimpleMenu, DataHandler } from 'ngx-axis-appforge/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import * as i4 from 'ng-zorro-antd/collapse';
|
|
7
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
8
|
+
import * as i3 from 'ng-zorro-antd/form';
|
|
9
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
10
|
+
import * as i5 from 'ng-zorro-antd/switch';
|
|
11
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
12
|
+
import * as i2 from 'ng-zorro-antd/grid';
|
|
13
|
+
|
|
14
|
+
class Setting extends FunFieldValueBase {
|
|
15
|
+
fg = this.fb.group({
|
|
16
|
+
...baseFbConfig,
|
|
17
|
+
...valueFbConfig,
|
|
18
|
+
submitConfirm: [undefined, FormValidators.requiredFun],
|
|
19
|
+
});
|
|
20
|
+
funFields = {
|
|
21
|
+
...baseFunField,
|
|
22
|
+
...valueFunField,
|
|
23
|
+
submitConfirm: {
|
|
24
|
+
defaultValue: true,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: Setting, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: Setting, isStandalone: true, selector: "axis-design-form-setting", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u63D0\u4EA4\u786E\u8BA4\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"submitConfirm\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [optionsNodeId]=\"formValue().id\"\n [eventDesc]=\"[{name:'formStatusChange',title:'\u8868\u5355\u72B6\u6001\u6539\u53D8',ds:{status:{dirty:false,valid:true}}}]\"\n [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i3.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i3.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i3.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i3.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i4.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon", "nzCollapsible"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i4.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition", "nzSize"], exportAs: ["nzCollapse"] }, { kind: "component", type: BaseDesignSetting, selector: "axis-base-design-setting", inputs: ["scopeId", "exclude", "fg"] }, { kind: "component", type: FunField, selector: "axis-fun-field", inputs: ["scopes", "exclude", "scopeId", "onlyFun", "noListen", "disabled", "editTip", "value", "open", "showCreateListenModal", "createListenDataSourceName"], outputs: ["valueChange", "openChange", "showCreateListenModalChange", "createListenDataSourceNameChange"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i5.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "component", type: InputTrigger, selector: "axis-input-trigger", inputs: ["internalTriggers", "optionsNodeId", "value", "eventDesc", "isVisibleHandlerModal", "editEventHandler"], outputs: ["valueChange", "isVisibleHandlerModalChange", "editEventHandlerChange"] }, { kind: "component", type: ValueDesignSetting, selector: "axis-value-design-setting", inputs: ["scopeId", "exclude", "fg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29
|
+
}
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: Setting, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{ selector: 'axis-design-form-setting', imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, FunField, NzSwitchModule, InputTrigger, ValueDesignSetting], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u63D0\u4EA4\u786E\u8BA4\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"submitConfirm\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [optionsNodeId]=\"formValue().id\"\n [eventDesc]=\"[{name:'formStatusChange',title:'\u8868\u5355\u72B6\u6001\u6539\u53D8',ds:{status:{dirty:false,valid:true}}}]\"\n [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>" }]
|
|
33
|
+
}] });
|
|
34
|
+
|
|
35
|
+
const Config = {
|
|
36
|
+
componentName: "表单",
|
|
37
|
+
eventHandlerDescs: {
|
|
38
|
+
validForm: {
|
|
39
|
+
name: "validForm",
|
|
40
|
+
title: "验证表单",
|
|
41
|
+
icon: "safety",
|
|
42
|
+
target: "component",
|
|
43
|
+
targetComponent: "axis-components/form",
|
|
44
|
+
events: [
|
|
45
|
+
{
|
|
46
|
+
name: "formValid",
|
|
47
|
+
title: "表单验证成功",
|
|
48
|
+
ds: (ref) => ({
|
|
49
|
+
formValue: ref?.instance?.value() ?? {
|
|
50
|
+
field: "示例数据"
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
resetForm: {
|
|
57
|
+
name: "resetForm",
|
|
58
|
+
title: "重置表单",
|
|
59
|
+
dataComponent: DataHandler,
|
|
60
|
+
icon: "undo",
|
|
61
|
+
target: "component",
|
|
62
|
+
targetComponent: "axis-components/form",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
buildOptionsNodes(nextInfo) {
|
|
66
|
+
return {
|
|
67
|
+
treeNode: new OptionsNode({
|
|
68
|
+
parentId: nextInfo.parentId,
|
|
69
|
+
scopeId: nextInfo.scopeId,
|
|
70
|
+
name: "表单",
|
|
71
|
+
canSetting: true,
|
|
72
|
+
canDrag: true,
|
|
73
|
+
dragType: "component",
|
|
74
|
+
canDrop: true,
|
|
75
|
+
dropType: "component",
|
|
76
|
+
dropObj: nextInfo.currentObject,
|
|
77
|
+
defaultDropIndex: "child",
|
|
78
|
+
parentObj: nextInfo.parentObject,
|
|
79
|
+
indexOfParentObj: nextInfo.indexOfParent,
|
|
80
|
+
rootOptions: nextInfo.currentObject,
|
|
81
|
+
children: [],
|
|
82
|
+
settingType: Setting,
|
|
83
|
+
contextMenu: SimpleMenu,
|
|
84
|
+
icon: "form"
|
|
85
|
+
}),
|
|
86
|
+
next: [
|
|
87
|
+
{
|
|
88
|
+
parentObject: nextInfo.currentObject,
|
|
89
|
+
indexOfParent: "child",
|
|
90
|
+
parentId: nextInfo.currentObject.id,
|
|
91
|
+
scopeId: nextInfo.scopeId
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
bindElementsOptionsNode(element, options) {
|
|
97
|
+
return {
|
|
98
|
+
[options.id]: { element, dropElement: element }
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Generated bundle index. Do not edit.
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
export { Config };
|
|
108
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-form-design.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-form-design.mjs","sources":["../../../axis-components/form/design/setting/setting.ts","../../../axis-components/form/design/setting/setting.html","../../../axis-components/form/design/config.ts","../../../axis-components/form/design/ngx-axis-appforge-axis-components-form-design.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { NzCollapseModule } from 'ng-zorro-antd/collapse';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { BaseDesignSetting, baseFbConfig, baseFunField, FunFieldValueBase, FunFieldOptions, FormValidators, FunField, InputTrigger, ValueDesignSetting, valueFbConfig, valueFunField } from 'ngx-axis-appforge/core';\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\n\n@Component({\n selector: 'axis-design-form-setting',\n imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, FunField, NzSwitchModule, InputTrigger, ValueDesignSetting],\n templateUrl: './setting.html',\n styleUrl: './setting.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Setting extends FunFieldValueBase {\n\n override fg: UntypedFormGroup = this.fb.group({\n ...baseFbConfig,\n ...valueFbConfig,\n submitConfirm: [undefined, FormValidators.requiredFun],\n });\n\n protected override funFields: FunFieldOptions = {\n ...baseFunField,\n ...valueFunField,\n submitConfirm: {\n defaultValue: true,\n },\n };\n\n}\n","<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"基本设置\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 提交确认\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"submitConfirm\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [optionsNodeId]=\"formValue().id\"\n [eventDesc]=\"[{name:'formStatusChange',title:'表单状态改变',ds:{status:{dirty:false,valid:true}}}]\"\n [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>","import { NextInfo, DesignBuildResult, DesignBindElementsResult, DesignConfig, OptionsNode, DataHandler, SimpleMenu, Base, BaseOptions, ValueAccess, ValueAccessOptions } from \"ngx-axis-appforge/core\";\nimport { Setting } from \"./setting/setting\";\nimport { ComponentRef } from \"@angular/core\";\n\nexport const Config: DesignConfig = {\n\n componentName: \"表单\",\n eventHandlerDescs: {\n validForm: {\n name: \"validForm\",\n title: \"验证表单\",\n icon: \"safety\",\n target: \"component\",\n targetComponent: \"axis-components/form\",\n events: [\n {\n name: \"formValid\",\n title: \"表单验证成功\",\n ds: (ref: ComponentRef<Base<BaseOptions>> | undefined) => ({\n formValue: (ref?.instance as ValueAccess<ValueAccessOptions> | undefined)?.value() ?? {\n field: \"示例数据\"\n }\n })\n }\n ],\n },\n resetForm: {\n name: \"resetForm\",\n title: \"重置表单\",\n dataComponent: DataHandler,\n icon: \"undo\",\n target: \"component\",\n targetComponent: \"axis-components/form\",\n },\n },\n buildOptionsNodes(nextInfo: NextInfo): DesignBuildResult {\n return {\n treeNode: new OptionsNode({\n parentId: nextInfo.parentId,\n scopeId: nextInfo.scopeId,\n name: \"表单\",\n canSetting: true,\n canDrag: true,\n dragType: \"component\",\n canDrop: true,\n dropType: \"component\",\n dropObj: nextInfo.currentObject,\n defaultDropIndex: \"child\",\n parentObj: nextInfo.parentObject,\n indexOfParentObj: nextInfo.indexOfParent,\n rootOptions: nextInfo.currentObject,\n children: [],\n settingType: Setting,\n contextMenu: SimpleMenu,\n icon: \"form\"\n }),\n next: [\n {\n parentObject: nextInfo.currentObject,\n indexOfParent: \"child\",\n parentId: nextInfo.currentObject.id,\n scopeId: nextInfo.scopeId\n }\n ],\n };\n },\n bindElementsOptionsNode(element: HTMLElement, options: any): DesignBindElementsResult {\n return {\n [options.id]: { element, dropElement: element }\n }\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './config';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAcM,MAAO,OAAQ,SAAQ,iBAAiB,CAAA;AAEnC,IAAA,EAAE,GAAqB,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;AAC5C,QAAA,GAAG,YAAY;AACf,QAAA,GAAG,aAAa;AAChB,QAAA,aAAa,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC;AACvD,KAAA,CAAC;AAEiB,IAAA,SAAS,GAAoB;AAC9C,QAAA,GAAG,YAAY;AACf,QAAA,GAAG,aAAa;AAChB,QAAA,aAAa,EAAE;AACb,YAAA,YAAY,EAAE,IAAI;AACnB,SAAA;KACF;uGAdU,OAAO,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,2GCdpB,woCAoBO,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDXK,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,8CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,0FAAA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AE,QAAQ,CAAC,aAAa;gBACxC,WAAW,EAAE,QAAQ,CAAC,aAAa;AACnC,gBAAA,QAAQ,EAAE,EAAE;AACZ,gBAAA,WAAW,EAAE,OAAO;AACpB,gBAAA,WAAW,EAAE,UAAU;AACvB,gBAAA,IAAI,EAAE;aACT,CAAC;AACF,YAAA,IAAI,EAAE;AACF,gBAAA;oBACI,YAAY,EAAE,QAAQ,CAAC,aAAa;AACpC,oBAAA,aAAa,EAAE,OAAO;AACtB,oBAAA,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE;oBACnC,OAAO,EAAE,QAAQ,CAAC;AACrB;AACJ,aAAA;SACJ;IACL,CAAC;IACD,uBAAuB,CAAC,OAAoB,EAAE,OAAY,EAAA;QACtD,OAAO;YACH,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO;SAChD;IACL,CAAC;;;ACtEL;;AAEG;;;;"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { FunFieldValueBase, FormValidators, baseFbConfig, baseFunField, BaseDesignSetting, FunField, InputValidator, OptionsNode, SimpleMenu, nameCode } from 'ngx-axis-appforge/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import * as i4 from 'ng-zorro-antd/collapse';
|
|
7
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
8
|
+
import * as i3 from 'ng-zorro-antd/form';
|
|
9
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
10
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
11
|
+
import * as i5 from 'ng-zorro-antd/input';
|
|
12
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
13
|
+
import * as i2 from 'ng-zorro-antd/grid';
|
|
14
|
+
|
|
15
|
+
class Setting extends FunFieldValueBase {
|
|
16
|
+
fg = this.fb.group({
|
|
17
|
+
...baseFbConfig,
|
|
18
|
+
name: [],
|
|
19
|
+
label: [],
|
|
20
|
+
labelWidth: [undefined, FormValidators.requiredFun],
|
|
21
|
+
validators: [],
|
|
22
|
+
});
|
|
23
|
+
funFields = {
|
|
24
|
+
...baseFunField,
|
|
25
|
+
name: {
|
|
26
|
+
defaultValue: "unknown",
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
defaultValue: "未命名",
|
|
30
|
+
},
|
|
31
|
+
labelWidth: {
|
|
32
|
+
defaultValue: "120px",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: Setting, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: Setting, isStandalone: true, selector: "axis-design-form-item-setting", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u8868\u5355\u9879\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"name\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u8868\u5355\u9879\u6807\u7B7E\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"label\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u6807\u7B7E\u5BBD\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"labelWidth\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-input-validator formControlName=\"validators\"></axis-input-validator>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n </nz-collapse>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i2.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i3.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i3.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i3.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i3.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i4.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon", "nzCollapsible"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i4.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition", "nzSize"], exportAs: ["nzCollapse"] }, { kind: "component", type: BaseDesignSetting, selector: "axis-base-design-setting", inputs: ["scopeId", "exclude", "fg"] }, { kind: "component", type: FunField, selector: "axis-fun-field", inputs: ["scopes", "exclude", "scopeId", "onlyFun", "noListen", "disabled", "editTip", "value", "open", "showCreateListenModal", "createListenDataSourceName"], outputs: ["valueChange", "openChange", "showCreateListenModalChange", "createListenDataSourceNameChange"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i5.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: InputValidator, selector: "axis-input-validator", inputs: ["value", "showModal"], outputs: ["valueChange", "showModalChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: Setting, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{ selector: 'axis-design-form-item-setting', imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, FunField, NzSwitchModule, NzInputModule, InputValidator], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u8868\u5355\u9879\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"name\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n \u8868\u5355\u9879\u6807\u7B7E\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"label\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n \u6807\u7B7E\u5BBD\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"labelWidth\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-input-validator formControlName=\"validators\"></axis-input-validator>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n </nz-collapse>\n</form>" }]
|
|
41
|
+
}] });
|
|
42
|
+
|
|
43
|
+
const Config = {
|
|
44
|
+
componentName: "表单项",
|
|
45
|
+
buildOptionsNodes(nextInfo) {
|
|
46
|
+
return {
|
|
47
|
+
treeNode: new OptionsNode({
|
|
48
|
+
parentId: nextInfo.parentId,
|
|
49
|
+
scopeId: nextInfo.scopeId,
|
|
50
|
+
name: nameCode("表单项", nextInfo.currentObject.name),
|
|
51
|
+
canSetting: true,
|
|
52
|
+
canDrag: true,
|
|
53
|
+
dragType: "component",
|
|
54
|
+
canDrop: true,
|
|
55
|
+
dropType: "component",
|
|
56
|
+
dropObj: nextInfo.currentObject,
|
|
57
|
+
defaultDropIndex: "child",
|
|
58
|
+
parentObj: nextInfo.parentObject,
|
|
59
|
+
indexOfParentObj: nextInfo.indexOfParent,
|
|
60
|
+
rootOptions: nextInfo.currentObject,
|
|
61
|
+
children: [],
|
|
62
|
+
settingType: Setting,
|
|
63
|
+
contextMenu: SimpleMenu,
|
|
64
|
+
icon: "form"
|
|
65
|
+
}),
|
|
66
|
+
next: [
|
|
67
|
+
{
|
|
68
|
+
parentObject: nextInfo.currentObject,
|
|
69
|
+
indexOfParent: "child",
|
|
70
|
+
parentId: nextInfo.currentObject.id,
|
|
71
|
+
scopeId: nextInfo.scopeId
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
bindElementsOptionsNode(element, options) {
|
|
77
|
+
return {
|
|
78
|
+
[options.id]: { element, dropElement: element.querySelector(".ant-form-item-control-input-content") ?? element }
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Generated bundle index. Do not edit.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
export { Config };
|
|
88
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-form-item-design.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-form-item-design.mjs","sources":["../../../axis-components/form-item/design/setting/setting.ts","../../../axis-components/form-item/design/setting/setting.html","../../../axis-components/form-item/design/config.ts","../../../axis-components/form-item/design/ngx-axis-appforge-axis-components-form-item-design.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { NzCollapseModule } from 'ng-zorro-antd/collapse';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { BaseDesignSetting, baseFbConfig, baseFunField, FunFieldValueBase, FunFieldOptions, FormValidators, FunField, InputValidator } from 'ngx-axis-appforge/core';\nimport { NzSwitchModule } from 'ng-zorro-antd/switch';\nimport { NzInputModule } from 'ng-zorro-antd/input';\n\n@Component({\n selector: 'axis-design-form-item-setting',\n imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, BaseDesignSetting, FunField, NzSwitchModule, NzInputModule, InputValidator],\n templateUrl: './setting.html',\n styleUrl: './setting.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Setting extends FunFieldValueBase {\n\n override fg: UntypedFormGroup = this.fb.group({\n ...baseFbConfig,\n name: [],\n label: [],\n labelWidth: [undefined, FormValidators.requiredFun],\n validators: [],\n });\n\n protected override funFields: FunFieldOptions = {\n ...baseFunField,\n name: {\n defaultValue: \"unknown\",\n },\n label: {\n defaultValue: \"未命名\",\n },\n labelWidth: {\n defaultValue: \"120px\",\n },\n };\n\n}\n","<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"基本设置\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n 表单项名\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"name\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\">\n 表单项标签\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"label\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"8\" nzRequired>\n 标签宽度\n </nz-form-label>\n <nz-form-control nzSpan=\"16\">\n <axis-fun-field formControlName=\"labelWidth\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <axis-input-validator formControlName=\"validators\"></axis-input-validator>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n </nz-collapse>\n</form>","import { NextInfo, DesignBuildResult, DesignBindElementsResult, DesignConfig, OptionsNode, nameCode, SimpleMenu } from \"ngx-axis-appforge/core\";\nimport { Setting } from \"./setting/setting\";\n\nexport const Config: DesignConfig = {\n\n componentName: \"表单项\",\n buildOptionsNodes(nextInfo: NextInfo): DesignBuildResult {\n return {\n treeNode: new OptionsNode({\n parentId: nextInfo.parentId,\n scopeId: nextInfo.scopeId,\n name: nameCode(\"表单项\", nextInfo.currentObject.name),\n canSetting: true,\n canDrag: true,\n dragType: \"component\",\n canDrop: true,\n dropType: \"component\",\n dropObj: nextInfo.currentObject,\n defaultDropIndex: \"child\",\n parentObj: nextInfo.parentObject,\n indexOfParentObj: nextInfo.indexOfParent,\n rootOptions: nextInfo.currentObject,\n children: [],\n settingType: Setting,\n contextMenu: SimpleMenu,\n icon: \"form\"\n }),\n next: [\n {\n parentObject: nextInfo.currentObject,\n indexOfParent: \"child\",\n parentId: nextInfo.currentObject.id,\n scopeId: nextInfo.scopeId\n }\n ],\n };\n },\n bindElementsOptionsNode(element: HTMLElement, options: any): DesignBindElementsResult {\n return {\n [options.id]: { element, dropElement: element.querySelector(\".ant-form-item-control-input-content\") as HTMLElement ?? element }\n }\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './config';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAeM,MAAO,OAAQ,SAAQ,iBAAiB,CAAA;AAEnC,IAAA,EAAE,GAAqB,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;AAC5C,QAAA,GAAG,YAAY;AACf,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,UAAU,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC;AACnD,QAAA,UAAU,EAAE,EAAE;AACf,KAAA,CAAC;AAEiB,IAAA,SAAS,GAAoB;AAC9C,QAAA,GAAG,YAAY;AACf,QAAA,IAAI,EAAE;AACJ,YAAA,YAAY,EAAE,SAAS;AACxB,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,YAAY,EAAE,KAAK;AACpB,SAAA;AACD,QAAA,UAAU,EAAE;AACV,YAAA,YAAY,EAAE,OAAO;AACtB,SAAA;KACF;uGArBU,OAAO,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,gHCfpB,ovDAqCO,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED3BK,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,8CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,8MAAA,EAAA,EAAA,EAA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from '@angular/core';
|
|
2
|
+
import { signal, effect, inject, model, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { BaseOptions, Base, AXIS_FORM_REGISTE_CONTROL_TOKEN, FormValidators, buildValidators, DynamicDirective } from 'ngx-axis-appforge/core';
|
|
4
|
+
import * as i2 from 'ng-zorro-antd/form';
|
|
5
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
6
|
+
import * as i3 from '@angular/forms';
|
|
7
|
+
import { FormBuilder, FormsModule } from '@angular/forms';
|
|
8
|
+
import { merge, NEVER, debounceTime } from 'rxjs';
|
|
9
|
+
import * as i1 from 'ng-zorro-antd/grid';
|
|
10
|
+
|
|
11
|
+
class FormItemOptions extends BaseOptions {
|
|
12
|
+
name = "";
|
|
13
|
+
label = signal("", ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
14
|
+
labelWidth = signal("120px", ...(ngDevMode ? [{ debugName: "labelWidth" }] : []));
|
|
15
|
+
validators = signal([], ...(ngDevMode ? [{ debugName: "validators" }] : []));
|
|
16
|
+
child = signal(undefined, ...(ngDevMode ? [{ debugName: "child" }] : []));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class FormItem extends Base {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
if (this.getScope()) {
|
|
23
|
+
effect(() => {
|
|
24
|
+
this.control.setValidators(this.validatorSignal() ?? null);
|
|
25
|
+
});
|
|
26
|
+
effect(() => {
|
|
27
|
+
this.validatorSignal.set(this.buildSnapshotValidators());
|
|
28
|
+
this.unsubscribe(["validatorsChange"]);
|
|
29
|
+
this.addSubscribe(merge(...this.options.validators().map(v => this.getScope().dynamicOptions(v)?.obs ?? NEVER))
|
|
30
|
+
.pipe(debounceTime(50))
|
|
31
|
+
.subscribe(_ => {
|
|
32
|
+
this.validatorSignal.set(this.buildSnapshotValidators());
|
|
33
|
+
}), "validatorsChange");
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
options = new FormItemOptions();
|
|
38
|
+
registe = inject(AXIS_FORM_REGISTE_CONTROL_TOKEN, { optional: true });
|
|
39
|
+
fb = inject(FormBuilder);
|
|
40
|
+
control = this.fb.control(undefined);
|
|
41
|
+
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
42
|
+
validatorSignal = signal([], ...(ngDevMode ? [{ debugName: "validatorSignal" }] : []));
|
|
43
|
+
isRequired = computed(() => this.validatorSignal().includes(FormValidators.required), ...(ngDevMode ? [{ debugName: "isRequired" }] : []));
|
|
44
|
+
valueAccessValidFn;
|
|
45
|
+
ngOnInit() {
|
|
46
|
+
if (this.options.name) {
|
|
47
|
+
this.control.registerOnChange((v) => {
|
|
48
|
+
this.value.set(v);
|
|
49
|
+
});
|
|
50
|
+
this.registe?.({
|
|
51
|
+
name: this.options.name,
|
|
52
|
+
control: this.control,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
onModelChange(value) {
|
|
57
|
+
if (this.options.name) {
|
|
58
|
+
this.control.markAsDirty();
|
|
59
|
+
this.control.setValue(value);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
buildSnapshotValidators() {
|
|
63
|
+
return this.buildValidators(this.options.validators().map(v => this.getScope().snapshotOptions(v)));
|
|
64
|
+
}
|
|
65
|
+
buildValidators(validators) {
|
|
66
|
+
let output = [];
|
|
67
|
+
if (this.valueAccessValidFn) {
|
|
68
|
+
output.push(this.valueAccessValidFn);
|
|
69
|
+
}
|
|
70
|
+
return output.concat(buildValidators(validators));
|
|
71
|
+
}
|
|
72
|
+
registeValueAccess(opt) {
|
|
73
|
+
if (opt.initValue !== undefined) {
|
|
74
|
+
this.registe?.({
|
|
75
|
+
name: this.options.name,
|
|
76
|
+
initValue: opt.initValue
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (opt.validFn) {
|
|
80
|
+
this.valueAccessValidFn = (c) => opt.validFn(c) ? null : { error: true };
|
|
81
|
+
this.validatorSignal.set(this.buildSnapshotValidators());
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: FormItem, isStandalone: true, selector: "axis-form-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, usesInheritance: true, ngImport: i0, template: "@if (options.label()) {\n<nz-form-item style=\"width: 100%;display:flex\">\n <nz-form-label [style.width]=\"options.labelWidth()\" [nzRequired]=\"isRequired()\">\n {{options.label()}}\n </nz-form-label>\n <nz-form-control style=\"flex:1;overflow: hidden;\" [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}@else {\n<nz-form-item class=\"nolabel-item\">\n <nz-form-control [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}", styles: [":host{display:block;width:100%}.nolabel-item{margin:0;height:100%}.nolabel-item ::ng-deep .ant-form-item-control-input,.nolabel-item ::ng-deep .ant-form-item-control-input-content{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i2.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i2.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i2.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
86
|
+
}
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormItem, decorators: [{
|
|
88
|
+
type: Component,
|
|
89
|
+
args: [{ selector: 'axis-form-item', imports: [NzFormModule, DynamicDirective, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (options.label()) {\n<nz-form-item style=\"width: 100%;display:flex\">\n <nz-form-label [style.width]=\"options.labelWidth()\" [nzRequired]=\"isRequired()\">\n {{options.label()}}\n </nz-form-label>\n <nz-form-control style=\"flex:1;overflow: hidden;\" [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}@else {\n<nz-form-item class=\"nolabel-item\">\n <nz-form-control [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}", styles: [":host{display:block;width:100%}.nolabel-item{margin:0;height:100%}.nolabel-item ::ng-deep .ant-form-item-control-input,.nolabel-item ::ng-deep .ant-form-item-control-input-content{height:100%}\n"] }]
|
|
90
|
+
}], ctorParameters: () => [] });
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Generated bundle index. Do not edit.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
export { FormItem };
|
|
97
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-form-item.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-form-item.mjs","sources":["../../../axis-components/form-item/form-item.options.ts","../../../axis-components/form-item/form-item.ts","../../../axis-components/form-item/form-item.html","../../../axis-components/form-item/ngx-axis-appforge-axis-components-form-item.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { BaseOptions } from \"ngx-axis-appforge/core\";\n\nexport class FormItemOptions extends BaseOptions {\n\n readonly name = \"\";\n readonly label = signal(\"\");\n readonly labelWidth = signal(\"120px\");\n readonly validators = signal<any[]>([]);\n readonly child = signal<any>(undefined);\n\n}","import { ChangeDetectionStrategy, Component, computed, effect, inject, model, OnInit, signal } from '@angular/core';\nimport { FormItemOptions } from './form-item.options';\nimport { AXIS_FORM_REGISTE_CONTROL_TOKEN, Base, buildValidators, DynamicDirective, FormValidators, RegisteValueAccessOptions } from 'ngx-axis-appforge/core';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { FormBuilder, FormsModule, ValidatorFn } from '@angular/forms';\nimport { debounceTime, merge, NEVER } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'axis-form-item',\n imports: [NzFormModule, DynamicDirective, FormsModule],\n templateUrl: './form-item.html',\n styleUrl: './form-item.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormItem extends Base<FormItemOptions> implements OnInit {\n\n constructor() {\n super();\n if (this.getScope()) {\n effect(() => {\n this.control.setValidators(this.validatorSignal() ?? null);\n });\n effect(() => {\n this.validatorSignal.set(this.buildSnapshotValidators());\n this.unsubscribe([\"validatorsChange\"]);\n this.addSubscribe(merge(...this.options.validators().map(v => this.getScope()!.dynamicOptions(v)?.obs ?? NEVER))\n .pipe(debounceTime(50))\n .subscribe(_ => {\n this.validatorSignal.set(this.buildSnapshotValidators());\n }), \"validatorsChange\");\n });\n }\n }\n\n override options: FormItemOptions = new FormItemOptions();\n private readonly registe = inject(AXIS_FORM_REGISTE_CONTROL_TOKEN, { optional: true });\n private readonly fb = inject(FormBuilder);\n readonly control = this.fb.control(undefined);\n readonly value = model<any>();\n readonly validatorSignal = signal<ValidatorFn[]>([]);\n readonly isRequired = computed(() => this.validatorSignal().includes(FormValidators.required));\n private valueAccessValidFn?: ValidatorFn;\n\n ngOnInit(): void {\n if (this.options.name) {\n this.control.registerOnChange((v: any) => {\n this.value.set(v);\n });\n this.registe?.({\n name: this.options.name,\n control: this.control,\n });\n }\n }\n\n onModelChange(value: any) {\n if (this.options.name) {\n this.control.markAsDirty();\n this.control.setValue(value);\n }\n }\n\n private buildSnapshotValidators(): ValidatorFn[] {\n return this.buildValidators(this.options.validators().map(v => this.getScope()!.snapshotOptions(v)));\n }\n\n private buildValidators(validators: any[]): ValidatorFn[] {\n let output: ValidatorFn[] = [];\n if (this.valueAccessValidFn) {\n output.push(this.valueAccessValidFn);\n }\n return output.concat(buildValidators(validators));\n }\n\n registeValueAccess(opt: RegisteValueAccessOptions) {\n if (opt.initValue !== undefined) {\n this.registe?.({\n name: this.options.name,\n initValue: opt.initValue\n });\n }\n if (opt.validFn) {\n this.valueAccessValidFn = (c) => opt.validFn!(c) ? null : { error: true };\n this.validatorSignal.set(this.buildSnapshotValidators());\n }\n }\n\n}","@if (options.label()) {\n<nz-form-item style=\"width: 100%;display:flex\">\n <nz-form-label [style.width]=\"options.labelWidth()\" [nzRequired]=\"isRequired()\">\n {{options.label()}}\n </nz-form-label>\n <nz-form-control style=\"flex:1;overflow: hidden;\" [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}@else {\n<nz-form-item class=\"nolabel-item\">\n <nz-form-control [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './form-item';\n"],"names":[],"mappings":";;;;;;;;;;AAGM,MAAO,eAAgB,SAAQ,WAAW,CAAA;IAEnC,IAAI,GAAG,EAAE;AACT,IAAA,KAAK,GAAG,MAAM,CAAC,EAAE,iDAAC;AAClB,IAAA,UAAU,GAAG,MAAM,CAAC,OAAO,sDAAC;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAQ,EAAE,sDAAC;AAC9B,IAAA,KAAK,GAAG,MAAM,CAAM,SAAS,iDAAC;AAE1C;;ACIK,MAAO,QAAS,SAAQ,IAAqB,CAAA;AAEjD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB,MAAM,CAAC,MAAK;AACV,gBAAA,IAAI,CAAC,OAAO,CAAC,aAAa,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CAAC,MAAM,EAAA,QAAA,EAAA,s4BAAA,EAAA,MAAA,EAAA,CAAA,oMAAA,CAAA,EAAA;;;AEbjD;;AAEG;;;;"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { ValueAccessOptions, ValueAccess, updateAndValidAll, DynamicDirective, AXIS_FORM_REGISTE_CONTROL_TOKEN } from 'ngx-axis-appforge/core';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import { bufferWhen, debounceTime, map, Subject, of } from 'rxjs';
|
|
7
|
+
import { NzModalService, NzModalModule } from 'ng-zorro-antd/modal';
|
|
8
|
+
|
|
9
|
+
class FormOptions extends ValueAccessOptions {
|
|
10
|
+
submitConfirm = signal(true, ...(ngDevMode ? [{ debugName: "submitConfirm" }] : []));
|
|
11
|
+
child = signal(undefined, ...(ngDevMode ? [{ debugName: "child" }] : []));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class Form extends ValueAccess {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.addSubscribe(this.fg.valueChanges.subscribe(v => {
|
|
18
|
+
this.value.set(v);
|
|
19
|
+
this.onChange?.(v);
|
|
20
|
+
}));
|
|
21
|
+
this.addSubscribe(this.resetSubject.pipe(bufferWhen(() => this.resetSubject.pipe(debounceTime(50))), map(v => v.reduce((a, b) => a || b, false)))
|
|
22
|
+
.subscribe(emitEvent => this.reset(emitEvent)));
|
|
23
|
+
this.addSubscribe(this.fg.statusChanges.subscribe(_ => {
|
|
24
|
+
const { valid, dirty } = this.fg;
|
|
25
|
+
this.triggeEvents("formStatusChange", { status: { valid, dirty } }).subscribe();
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
options = new FormOptions();
|
|
29
|
+
fb = inject(FormBuilder);
|
|
30
|
+
modal = inject(NzModalService);
|
|
31
|
+
fg = this.fb.group({});
|
|
32
|
+
oriFormValue;
|
|
33
|
+
oriValue;
|
|
34
|
+
resetSubject = new Subject();
|
|
35
|
+
writeValue(value) {
|
|
36
|
+
super.writeValue(value);
|
|
37
|
+
this.oriFormValue = value;
|
|
38
|
+
this.oriValue = this.oriFormValue;
|
|
39
|
+
this.resetSubject.next(false);
|
|
40
|
+
}
|
|
41
|
+
setInitValue(value) {
|
|
42
|
+
super.setInitValue(value);
|
|
43
|
+
if (this.options.initValue() !== undefined) {
|
|
44
|
+
this.oriFormValue = this.options.initValue();
|
|
45
|
+
this.oriValue = this.oriFormValue;
|
|
46
|
+
this.resetSubject.next(false);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
ngOnInit() {
|
|
50
|
+
this.registeValueAccess?.({
|
|
51
|
+
validFn: (control) => {
|
|
52
|
+
return updateAndValidAll(this.fg, { markAsDirty: control.dirty });
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
registerControl(opt) {
|
|
57
|
+
if (opt.control) {
|
|
58
|
+
const oldControl = this.fg.get(opt.name);
|
|
59
|
+
if (oldControl?.value != undefined) {
|
|
60
|
+
opt.control.setValue(oldControl.value);
|
|
61
|
+
}
|
|
62
|
+
this.fg.setControl(opt.name, opt.control, { emitEvent: false });
|
|
63
|
+
}
|
|
64
|
+
if (this.fg.dirty) {
|
|
65
|
+
if (opt.initValue !== undefined) {
|
|
66
|
+
this.fg.patchValue({ [opt.name]: opt.initValue });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
if (this.oriFormValue?.[opt.name] === undefined && opt.initValue !== undefined) {
|
|
71
|
+
this.oriValue = Object.assign({}, this.oriValue, { [opt.name]: opt.initValue });
|
|
72
|
+
this.registeValueAccess?.({
|
|
73
|
+
initValue: this.oriValue
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
this.resetSubject.next(false);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
reset(emitEvent = false) {
|
|
80
|
+
this.fg.reset(this.oriValue, { emitEvent: emitEvent, onlySelf: true });
|
|
81
|
+
if (!emitEvent && this.options.emitInitEvent()) {
|
|
82
|
+
this.triggeEvents("valueChange", { value: this.fg.value }).subscribe();
|
|
83
|
+
}
|
|
84
|
+
if (!emitEvent) {
|
|
85
|
+
const { valid, dirty } = this.fg;
|
|
86
|
+
this.triggeEvents("formStatusChange", { status: { valid, dirty } }).subscribe();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
onEvents(e) {
|
|
90
|
+
const obs = super.onEvents(e);
|
|
91
|
+
if (obs) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
switch (e.name) {
|
|
95
|
+
case "validForm":
|
|
96
|
+
if (updateAndValidAll(this.fg)) {
|
|
97
|
+
if (this.options.submitConfirm()) {
|
|
98
|
+
const subject = new Subject();
|
|
99
|
+
this.modal.confirm({
|
|
100
|
+
nzTitle: "确定提交吗?",
|
|
101
|
+
nzOnOk: () => {
|
|
102
|
+
this.triggeEvents("formValid", { formValue: this.fg.value }, e.triggeEvents).subscribe(subject);
|
|
103
|
+
},
|
|
104
|
+
nzOnCancel: () => {
|
|
105
|
+
subject.next(false);
|
|
106
|
+
subject.complete();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return subject.asObservable();
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return this.triggeEvents("formValid", { formValue: this.fg.value }, e.triggeEvents);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return of(false);
|
|
116
|
+
case "resetForm":
|
|
117
|
+
this.reset(true);
|
|
118
|
+
return of(true);
|
|
119
|
+
}
|
|
120
|
+
return undefined;
|
|
121
|
+
}
|
|
122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: Form, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
123
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: Form, isStandalone: true, selector: "axis-form", providers: [
|
|
124
|
+
{
|
|
125
|
+
provide: AXIS_FORM_REGISTE_CONTROL_TOKEN,
|
|
126
|
+
useFactory: (form) => {
|
|
127
|
+
return form.registerControl.bind(form);
|
|
128
|
+
},
|
|
129
|
+
deps: [Form]
|
|
130
|
+
}
|
|
131
|
+
], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" style=\"height: 100%;\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</form>", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzModalModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
132
|
+
}
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: Form, decorators: [{
|
|
134
|
+
type: Component,
|
|
135
|
+
args: [{ selector: 'axis-form', imports: [ReactiveFormsModule, DynamicDirective, NzModalModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
136
|
+
{
|
|
137
|
+
provide: AXIS_FORM_REGISTE_CONTROL_TOKEN,
|
|
138
|
+
useFactory: (form) => {
|
|
139
|
+
return form.registerControl.bind(form);
|
|
140
|
+
},
|
|
141
|
+
deps: [Form]
|
|
142
|
+
}
|
|
143
|
+
], template: "<form [formGroup]=\"fg\" style=\"height: 100%;\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</form>", styles: [":host{display:block}\n"] }]
|
|
144
|
+
}], ctorParameters: () => [] });
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Generated bundle index. Do not edit.
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
export { Form };
|
|
151
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-form.mjs","sources":["../../../axis-components/form/form.options.ts","../../../axis-components/form/form.ts","../../../axis-components/form/form.html","../../../axis-components/form/ngx-axis-appforge-axis-components-form.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class FormOptions extends ValueAccessOptions {\n\n readonly submitConfirm = signal(true);\n readonly child = signal<any>(undefined);\n\n}","import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';\nimport { AXIS_FORM_REGISTE_CONTROL_TOKEN, DynamicDirective, EventHandlerOptions, RegisteFormControlOptions, updateAndValidAll, ValueAccess } from 'ngx-axis-appforge/core';\nimport { FormOptions } from './form.options';\nimport { AbstractControl, FormBuilder, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { bufferWhen, debounceTime, map, Observable, of, Subject } from 'rxjs';\nimport { NzModalModule, NzModalService } from 'ng-zorro-antd/modal';\n\n@Component({\n selector: 'axis-form',\n imports: [ReactiveFormsModule, DynamicDirective, NzModalModule],\n templateUrl: './form.html',\n styleUrl: './form.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXIS_FORM_REGISTE_CONTROL_TOKEN,\n useFactory: (form: Form) => {\n return form.registerControl.bind(form);\n },\n deps: [Form]\n }\n ]\n})\nexport class Form extends ValueAccess<FormOptions> implements OnInit {\n\n constructor() {\n super();\n this.addSubscribe(this.fg.valueChanges.subscribe(v => {\n this.value.set(v);\n this.onChange?.(v);\n }));\n this.addSubscribe(this.resetSubject.pipe(bufferWhen(() => this.resetSubject.pipe(debounceTime(50))), map(v => v.reduce((a, b) => a || b, false)))\n .subscribe(emitEvent => this.reset(emitEvent)));\n this.addSubscribe(this.fg.statusChanges.subscribe(_ => {\n const { valid, dirty } = this.fg\n this.triggeEvents(\"formStatusChange\", { status: { valid, dirty } }).subscribe();\n }))\n }\n\n override options: FormOptions = new FormOptions();\n private readonly fb = inject(FormBuilder);\n private readonly modal = inject(NzModalService);\n readonly fg: UntypedFormGroup = this.fb.group({});\n private oriFormValue: any;\n private oriValue: any;\n private resetSubject = new Subject<boolean>();\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.oriFormValue = value;\n this.oriValue = this.oriFormValue;\n this.resetSubject.next(false);\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n if (this.options.initValue() !== undefined) {\n this.oriFormValue = this.options.initValue();\n this.oriValue = this.oriFormValue;\n this.resetSubject.next(false);\n }\n }\n\n ngOnInit(): void {\n this.registeValueAccess?.({\n validFn: (control: AbstractControl) => {\n return updateAndValidAll(this.fg, { markAsDirty: control.dirty })\n }\n })\n }\n\n registerControl(opt: RegisteFormControlOptions) {\n if (opt.control) {\n const oldControl = this.fg.get(opt.name);\n if (oldControl?.value != undefined) {\n opt.control.setValue(oldControl.value);\n }\n this.fg.setControl(opt.name, opt.control, { emitEvent: false });\n }\n if (this.fg.dirty) {\n if (opt.initValue !== undefined) {\n this.fg.patchValue({ [opt.name]: opt.initValue });\n }\n } else {\n if (this.oriFormValue?.[opt.name] === undefined && opt.initValue !== undefined) {\n this.oriValue = Object.assign({}, this.oriValue, { [opt.name]: opt.initValue });\n this.registeValueAccess?.({\n initValue: this.oriValue\n });\n }\n this.resetSubject.next(false);\n }\n }\n\n reset(emitEvent = false) {\n this.fg.reset(this.oriValue, { emitEvent: emitEvent, onlySelf: true });\n if (!emitEvent && this.options.emitInitEvent()) {\n this.triggeEvents(\"valueChange\", { value: this.fg.value }).subscribe();\n }\n if (!emitEvent) {\n const { valid, dirty } = this.fg\n this.triggeEvents(\"formStatusChange\", { status: { valid, dirty } }).subscribe();\n }\n }\n\n override onEvents(e: EventHandlerOptions<any>): Observable<boolean> | undefined {\n const obs = super.onEvents(e);\n if (obs) {\n return;\n }\n switch (e.name) {\n case \"validForm\":\n if (updateAndValidAll(this.fg)) {\n if (this.options.submitConfirm()) {\n const subject = new Subject<boolean>();\n this.modal.confirm({\n nzTitle: \"确定提交吗?\",\n nzOnOk: () => {\n this.triggeEvents(\"formValid\", { formValue: this.fg.value }, e.triggeEvents).subscribe(subject);\n },\n nzOnCancel: () => {\n subject.next(false);\n subject.complete();\n }\n });\n return subject.asObservable();\n } else {\n return this.triggeEvents(\"formValid\", { formValue: this.fg.value }, e.triggeEvents);\n }\n }\n return of(false);\n case \"resetForm\":\n this.reset(true);\n return of(true);\n }\n return undefined;\n }\n\n}\n","<form [formGroup]=\"fg\" style=\"height: 100%;\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './form';\n"],"names":[],"mappings":";;;;;;;;AAGM,MAAO,WAAY,SAAQ,kBAAkB,CAAA;AAEtC,IAAA,aAAa,GAAG,MAAM,CAAC,IAAI,yDAAC;AAC5B,IAAA,KAAK,GAAG,MAAM,CAAM,SAAS,iDAAC;AAE1C;;ACeK,MAAO,IAAK,SAAQ,WAAwB,CAAA;AAEhD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,IAAG;AACnD,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACjB,YAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QACpB,CAAC,CA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