doui-react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +28 -0
- package/es/api/component/class-name.d.ts +3 -0
- package/es/api/component/class-name.js +15 -0
- package/es/api/component/common.d.ts +22 -0
- package/es/api/component/common.js +144 -0
- package/es/api/component/dom.d.ts +2 -0
- package/es/api/component/dom.js +7 -0
- package/es/api/component/global-style.d.ts +3 -0
- package/es/api/component/global-style.js +16 -0
- package/es/api/component/index.d.ts +9 -0
- package/es/api/component/index.js +9 -0
- package/es/api/component/react-dom.d.ts +3 -0
- package/es/api/component/react-dom.js +72 -0
- package/es/api/component/sort.d.ts +2 -0
- package/es/api/component/sort.js +20 -0
- package/es/api/component/style.d.ts +4 -0
- package/es/api/component/style.js +33 -0
- package/es/api/component/url.d.ts +33 -0
- package/es/api/component/url.js +126 -0
- package/es/api/component/validate-input.d.ts +8 -0
- package/es/api/component/validate-input.js +16 -0
- package/es/api/index.d.ts +2 -0
- package/es/api/index.js +2 -0
- package/es/api/type/common.d.ts +24 -0
- package/es/api/type/common.js +1 -0
- package/es/api/type/index.d.ts +5 -0
- package/es/api/type/index.js +2 -0
- package/es/button/component/index.d.ts +2 -0
- package/es/button/component/index.js +87 -0
- package/es/button/index.d.ts +2 -0
- package/es/button/index.js +2 -0
- package/es/button/type/index.d.ts +31 -0
- package/es/button/type/index.js +1 -0
- package/es/checkbox/component/checkbox-group.d.ts +2 -0
- package/es/checkbox/component/checkbox-group.js +66 -0
- package/es/checkbox/component/checkbox.d.ts +2 -0
- package/es/checkbox/component/checkbox.js +8 -0
- package/es/checkbox/component/index.d.ts +2 -0
- package/es/checkbox/component/index.js +10 -0
- package/es/checkbox/component/use-checkbox.d.ts +12 -0
- package/es/checkbox/component/use-checkbox.js +43 -0
- package/es/checkbox/component/utils.d.ts +13 -0
- package/es/checkbox/component/utils.js +40 -0
- package/es/checkbox/index.d.ts +2 -0
- package/es/checkbox/index.js +2 -0
- package/es/checkbox/style/index.d.ts +5 -0
- package/es/checkbox/style/index.js +11 -0
- package/es/checkbox/type/index.d.ts +18 -0
- package/es/checkbox/type/index.js +1 -0
- package/es/config/index.d.ts +0 -0
- package/es/config/index.js +0 -0
- package/es/date-picker/component/index.d.ts +3 -0
- package/es/date-picker/component/index.js +38 -0
- package/es/date-picker/index.d.ts +2 -0
- package/es/date-picker/index.js +2 -0
- package/es/date-picker/style/index.d.ts +4 -0
- package/es/date-picker/style/index.js +7 -0
- package/es/date-picker/type/index.d.ts +21 -0
- package/es/date-picker/type/index.js +1 -0
- package/es/empty/component/index.d.ts +2 -0
- package/es/empty/component/index.js +17 -0
- package/es/empty/index.d.ts +2 -0
- package/es/empty/index.js +2 -0
- package/es/empty/type/index.d.ts +9 -0
- package/es/empty/type/index.js +1 -0
- package/es/form/component/constant.d.ts +15 -0
- package/es/form/component/constant.js +15 -0
- package/es/form/component/form-content.d.ts +10 -0
- package/es/form/component/form-content.js +280 -0
- package/es/form/component/form-item-map.d.ts +40 -0
- package/es/form/component/form-item-map.js +120 -0
- package/es/form/component/form-item.d.ts +7 -0
- package/es/form/component/form-item.js +219 -0
- package/es/form/component/form-list.d.ts +36 -0
- package/es/form/component/form-list.js +190 -0
- package/es/form/component/form.d.ts +2 -0
- package/es/form/component/form.js +40 -0
- package/es/form/component/index.d.ts +15 -0
- package/es/form/component/index.js +14 -0
- package/es/form/component/submit-button.d.ts +2 -0
- package/es/form/component/submit-button.js +47 -0
- package/es/form/component/use-debug.d.ts +1 -0
- package/es/form/component/use-debug.js +16 -0
- package/es/form/component/utils.d.ts +95 -0
- package/es/form/component/utils.js +435 -0
- package/es/form/component/validator-item.d.ts +7 -0
- package/es/form/component/validator-item.js +53 -0
- package/es/form/hook/index.d.ts +16 -0
- package/es/form/hook/index.js +116 -0
- package/es/form/hook/list-provider.d.ts +6 -0
- package/es/form/hook/list-provider.js +16 -0
- package/es/form/hook/provider.d.ts +23 -0
- package/es/form/hook/provider.js +21 -0
- package/es/form/hook/use-form.d.ts +2 -0
- package/es/form/hook/use-form.js +335 -0
- package/es/form/index.d.ts +3 -0
- package/es/form/index.js +3 -0
- package/es/form/style/form-item.d.ts +3 -0
- package/es/form/style/form-item.js +38 -0
- package/es/form/style/index.d.ts +7 -0
- package/es/form/style/index.js +13 -0
- package/es/form/type/form-item.d.ts +141 -0
- package/es/form/type/form-item.js +1 -0
- package/es/form/type/form-list.d.ts +91 -0
- package/es/form/type/form-list.js +1 -0
- package/es/form/type/index.d.ts +134 -0
- package/es/form/type/index.js +3 -0
- package/es/grid/component/index.d.ts +2 -0
- package/es/grid/component/index.js +76 -0
- package/es/grid/component/pagination.d.ts +50 -0
- package/es/grid/component/pagination.js +54 -0
- package/es/grid/component/utils.d.ts +2 -0
- package/es/grid/component/utils.js +7 -0
- package/es/grid/index.d.ts +2 -0
- package/es/grid/index.js +2 -0
- package/es/grid/style/index.d.ts +11 -0
- package/es/grid/style/index.js +26 -0
- package/es/grid/type/index.d.ts +67 -0
- package/es/grid/type/index.js +1 -0
- package/es/highlight-text/component/index.d.ts +2 -0
- package/es/highlight-text/component/index.js +71 -0
- package/es/highlight-text/index.d.ts +2 -0
- package/es/highlight-text/index.js +2 -0
- package/es/highlight-text/style/index.d.ts +4 -0
- package/es/highlight-text/style/index.js +7 -0
- package/es/highlight-text/type/index.d.ts +18 -0
- package/es/highlight-text/type/index.js +1 -0
- package/es/hooks/hook/common.d.ts +1 -0
- package/es/hooks/hook/common.js +12 -0
- package/es/hooks/hook/index.d.ts +7 -0
- package/es/hooks/hook/index.js +7 -0
- package/es/hooks/hook/use-debounce.d.ts +4 -0
- package/es/hooks/hook/use-debounce.js +23 -0
- package/es/hooks/hook/use-deep.d.ts +9 -0
- package/es/hooks/hook/use-deep.js +64 -0
- package/es/hooks/hook/use-fetch.d.ts +8 -0
- package/es/hooks/hook/use-fetch.js +164 -0
- package/es/hooks/hook/use-list-operation.d.ts +5 -0
- package/es/hooks/hook/use-list-operation.js +70 -0
- package/es/hooks/hook/use-loading.d.ts +7 -0
- package/es/hooks/hook/use-loading.js +59 -0
- package/es/hooks/hook/use-window-resize.d.ts +5 -0
- package/es/hooks/hook/use-window-resize.js +16 -0
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/index.js +2 -0
- package/es/hooks/type/index.d.ts +2 -0
- package/es/hooks/type/index.js +2 -0
- package/es/hooks/type/use-fetch.d.ts +31 -0
- package/es/hooks/type/use-fetch.js +1 -0
- package/es/hooks/type/use-list-operation.d.ts +34 -0
- package/es/hooks/type/use-list-operation.js +1 -0
- package/es/icon/component/down.d.ts +2 -0
- package/es/icon/component/down.js +42 -0
- package/es/icon/component/index.d.ts +2 -0
- package/es/icon/component/index.js +5 -0
- package/es/icon/component/up.d.ts +2 -0
- package/es/icon/component/up.js +41 -0
- package/es/icon/hook/index.d.ts +477 -0
- package/es/icon/hook/index.js +60 -0
- package/es/icon/index.d.ts +2 -0
- package/es/icon/index.js +2 -0
- package/es/icon/style/index.d.ts +4 -0
- package/es/icon/style/index.js +10 -0
- package/es/icon/type/index.d.ts +14 -0
- package/es/icon/type/index.js +1 -0
- package/es/index.d.ts +25 -0
- package/es/index.js +25 -0
- package/es/input/component/index.d.ts +12 -0
- package/es/input/component/index.js +25 -0
- package/es/input/component/input.d.ts +2 -0
- package/es/input/component/input.js +8 -0
- package/es/input/component/number.d.ts +4 -0
- package/es/input/component/number.js +50 -0
- package/es/input/component/password.d.ts +2 -0
- package/es/input/component/password.js +8 -0
- package/es/input/component/text-area.d.ts +2 -0
- package/es/input/component/text-area.js +16 -0
- package/es/input/component/utils.d.ts +15 -0
- package/es/input/component/utils.js +102 -0
- package/es/input/index.d.ts +2 -0
- package/es/input/index.js +2 -0
- package/es/input/style/index.d.ts +6 -0
- package/es/input/style/index.js +11 -0
- package/es/input/type/index.d.ts +41 -0
- package/es/input/type/index.js +1 -0
- package/es/modal-prompt/component/index.d.ts +5 -0
- package/es/modal-prompt/component/index.js +60 -0
- package/es/modal-prompt/component/open-loading.d.ts +2 -0
- package/es/modal-prompt/component/open-loading.js +21 -0
- package/es/modal-prompt/component/utils.d.ts +4 -0
- package/es/modal-prompt/component/utils.js +49 -0
- package/es/modal-prompt/index.d.ts +2 -0
- package/es/modal-prompt/index.js +2 -0
- package/es/modal-prompt/style/index.d.ts +5 -0
- package/es/modal-prompt/style/index.js +9 -0
- package/es/modal-prompt/type/index.d.ts +36 -0
- package/es/modal-prompt/type/index.js +1 -0
- package/es/open-modal/component/constant.d.ts +1 -0
- package/es/open-modal/component/constant.js +3 -0
- package/es/open-modal/component/footer.d.ts +2 -0
- package/es/open-modal/component/footer.js +34 -0
- package/es/open-modal/component/index.d.ts +4 -0
- package/es/open-modal/component/index.js +9 -0
- package/es/open-modal/component/modal.d.ts +10 -0
- package/es/open-modal/component/modal.js +37 -0
- package/es/open-modal/component/title.d.ts +6 -0
- package/es/open-modal/component/title.js +12 -0
- package/es/open-modal/component/use-modal.d.ts +14 -0
- package/es/open-modal/component/use-modal.js +177 -0
- package/es/open-modal/component/utils.d.ts +11 -0
- package/es/open-modal/component/utils.js +109 -0
- package/es/open-modal/hook/index.d.ts +7 -0
- package/es/open-modal/hook/index.js +17 -0
- package/es/open-modal/hook/use-modal.d.ts +6 -0
- package/es/open-modal/hook/use-modal.js +27 -0
- package/es/open-modal/index.d.ts +3 -0
- package/es/open-modal/index.js +3 -0
- package/es/open-modal/style/index.d.ts +5 -0
- package/es/open-modal/style/index.js +18 -0
- package/es/open-modal/style/wrap.d.ts +2 -0
- package/es/open-modal/style/wrap.js +6 -0
- package/es/open-modal/type/index.d.ts +91 -0
- package/es/open-modal/type/index.js +1 -0
- package/es/portal/component/index.d.ts +2 -0
- package/es/portal/component/index.js +40 -0
- package/es/portal/index.d.ts +2 -0
- package/es/portal/index.js +2 -0
- package/es/portal/type/index.d.ts +13 -0
- package/es/portal/type/index.js +1 -0
- package/es/radio/component/abstract-box.d.ts +380 -0
- package/es/radio/component/abstract-box.js +90 -0
- package/es/radio/component/index.d.ts +2 -0
- package/es/radio/component/index.js +10 -0
- package/es/radio/component/radio.d.ts +2 -0
- package/es/radio/component/radio.js +10 -0
- package/es/radio/component/redio-group.d.ts +2 -0
- package/es/radio/component/redio-group.js +50 -0
- package/es/radio/component/use-box-options.d.ts +6 -0
- package/es/radio/component/use-box-options.js +20 -0
- package/es/radio/component/use-radio.d.ts +23 -0
- package/es/radio/component/use-radio.js +21 -0
- package/es/radio/component/utils.d.ts +7 -0
- package/es/radio/component/utils.js +25 -0
- package/es/radio/index.d.ts +2 -0
- package/es/radio/index.js +2 -0
- package/es/radio/style/index.d.ts +7 -0
- package/es/radio/style/index.js +15 -0
- package/es/radio/type/index.d.ts +32 -0
- package/es/radio/type/index.js +1 -0
- package/es/select/component/constant.d.ts +1 -0
- package/es/select/component/constant.js +1 -0
- package/es/select/component/index.d.ts +3 -0
- package/es/select/component/index.js +16 -0
- package/es/select/component/loading.d.ts +1 -0
- package/es/select/component/loading.js +13 -0
- package/es/select/component/use-select-options.d.ts +11 -0
- package/es/select/component/use-select-options.js +80 -0
- package/es/select/component/use-select.d.ts +2 -0
- package/es/select/component/use-select.js +136 -0
- package/es/select/component/utils.d.ts +14 -0
- package/es/select/component/utils.js +142 -0
- package/es/select/index.d.ts +2 -0
- package/es/select/index.js +2 -0
- package/es/select/style/index.d.ts +4 -0
- package/es/select/style/index.js +7 -0
- package/es/select/type/index.d.ts +105 -0
- package/es/select/type/index.js +1 -0
- package/es/stack/component/center-stack.d.ts +2 -0
- package/es/stack/component/center-stack.js +32 -0
- package/es/stack/component/h-stack.d.ts +2 -0
- package/es/stack/component/h-stack.js +39 -0
- package/es/stack/component/index.d.ts +3 -0
- package/es/stack/component/index.js +3 -0
- package/es/stack/component/v-stack.d.ts +2 -0
- package/es/stack/component/v-stack.js +36 -0
- package/es/stack/index.d.ts +2 -0
- package/es/stack/index.js +2 -0
- package/es/stack/style/index.d.ts +21 -0
- package/es/stack/style/index.js +49 -0
- package/es/stack/type/index.d.ts +54 -0
- package/es/stack/type/index.js +1 -0
- package/es/switch/component/index.d.ts +2 -0
- package/es/switch/component/index.js +60 -0
- package/es/switch/index.d.ts +2 -0
- package/es/switch/index.js +2 -0
- package/es/switch/style/index.d.ts +5 -0
- package/es/switch/style/index.js +13 -0
- package/es/switch/type/index.d.ts +27 -0
- package/es/switch/type/index.js +1 -0
- package/es/table/component/action-button.d.ts +2 -0
- package/es/table/component/action-button.js +95 -0
- package/es/table/component/actions.d.ts +2 -0
- package/es/table/component/actions.js +35 -0
- package/es/table/component/constant.d.ts +1 -0
- package/es/table/component/constant.js +5 -0
- package/es/table/component/editor.d.ts +2 -0
- package/es/table/component/editor.js +35 -0
- package/es/table/component/filter.d.ts +3 -0
- package/es/table/component/filter.js +55 -0
- package/es/table/component/index.d.ts +7 -0
- package/es/table/component/index.js +4 -0
- package/es/table/component/link.d.ts +2 -0
- package/es/table/component/link.js +20 -0
- package/es/table/component/sort.d.ts +6 -0
- package/es/table/component/sort.js +17 -0
- package/es/table/component/switch.d.ts +2 -0
- package/es/table/component/switch.js +27 -0
- package/es/table/component/table-body.d.ts +6 -0
- package/es/table/component/table-body.js +88 -0
- package/es/table/component/table.d.ts +10 -0
- package/es/table/component/table.js +235 -0
- package/es/table/component/time.d.ts +2 -0
- package/es/table/component/time.js +12 -0
- package/es/table/component/utils.d.ts +120 -0
- package/es/table/component/utils.js +222 -0
- package/es/table/component/wrapper.d.ts +6 -0
- package/es/table/component/wrapper.js +30 -0
- package/es/table/hook/index.d.ts +7 -0
- package/es/table/hook/index.js +17 -0
- package/es/table/hook/search.d.ts +5 -0
- package/es/table/hook/search.js +131 -0
- package/es/table/index.d.ts +3 -0
- package/es/table/index.js +3 -0
- package/es/table/style/index.d.ts +9 -0
- package/es/table/style/index.js +16 -0
- package/es/table/type/action.d.ts +48 -0
- package/es/table/type/action.js +1 -0
- package/es/table/type/column.d.ts +110 -0
- package/es/table/type/column.js +1 -0
- package/es/table/type/index.d.ts +113 -0
- package/es/table/type/index.js +11 -0
- package/es/tabs/component/constant.d.ts +2 -0
- package/es/tabs/component/constant.js +2 -0
- package/es/tabs/component/index.d.ts +2 -0
- package/es/tabs/component/index.js +18 -0
- package/es/tabs/component/utils.d.ts +24 -0
- package/es/tabs/component/utils.js +55 -0
- package/es/tabs/index.d.ts +2 -0
- package/es/tabs/index.js +2 -0
- package/es/tabs/style/index.d.ts +5 -0
- package/es/tabs/style/index.js +10 -0
- package/es/tabs/type/index.d.ts +20 -0
- package/es/tabs/type/index.js +1 -0
- package/es/text/component/index.d.ts +3 -0
- package/es/text/component/index.js +57 -0
- package/es/text/component/use-text.d.ts +4 -0
- package/es/text/component/use-text.js +24 -0
- package/es/text/component/utils.d.ts +3 -0
- package/es/text/component/utils.js +9 -0
- package/es/text/index.d.ts +2 -0
- package/es/text/index.js +2 -0
- package/es/text/style/index.d.ts +5 -0
- package/es/text/style/index.js +8 -0
- package/es/text/type/index.d.ts +19 -0
- package/es/text/type/index.js +1 -0
- package/es/tooltip/component/index.d.ts +48 -0
- package/es/tooltip/component/index.js +19 -0
- package/es/tooltip/index.d.ts +2 -0
- package/es/tooltip/index.js +2 -0
- package/es/tooltip/type/index.d.ts +8 -0
- package/es/tooltip/type/index.js +1 -0
- package/es/tree/component/index.d.ts +2 -0
- package/es/tree/component/index.js +23 -0
- package/es/tree/component/utils.d.ts +1 -0
- package/es/tree/component/utils.js +3 -0
- package/es/tree/index.d.ts +2 -0
- package/es/tree/index.js +2 -0
- package/es/tree/style/index.d.ts +4 -0
- package/es/tree/style/index.js +7 -0
- package/es/tree/type/index.d.ts +2 -0
- package/es/tree/type/index.js +1 -0
- package/es/tree-select/component/index.d.ts +2 -0
- package/es/tree-select/component/index.js +15 -0
- package/es/tree-select/component/use-tree-select.d.ts +2 -0
- package/es/tree-select/component/use-tree-select.js +59 -0
- package/es/tree-select/index.d.ts +2 -0
- package/es/tree-select/index.js +2 -0
- package/es/tree-select/style/index.d.ts +5 -0
- package/es/tree-select/style/index.js +15 -0
- package/es/tree-select/type/index.d.ts +23 -0
- package/es/tree-select/type/index.js +1 -0
- package/es/virtual-list/component/index.d.ts +2 -0
- package/es/virtual-list/component/index.js +28 -0
- package/es/virtual-list/index.d.ts +2 -0
- package/es/virtual-list/index.js +2 -0
- package/es/virtual-list/type/index.d.ts +17 -0
- package/es/virtual-list/type/index.js +1 -0
- package/lib/api/component/class-name.d.ts +3 -0
- package/lib/api/component/class-name.js +23 -0
- package/lib/api/component/common.d.ts +22 -0
- package/lib/api/component/common.js +163 -0
- package/lib/api/component/dom.d.ts +2 -0
- package/lib/api/component/dom.js +14 -0
- package/lib/api/component/global-style.d.ts +3 -0
- package/lib/api/component/global-style.js +23 -0
- package/lib/api/component/index.d.ts +9 -0
- package/lib/api/component/index.js +104 -0
- package/lib/api/component/react-dom.d.ts +3 -0
- package/lib/api/component/react-dom.js +80 -0
- package/lib/api/component/sort.d.ts +2 -0
- package/lib/api/component/sort.js +28 -0
- package/lib/api/component/style.d.ts +4 -0
- package/lib/api/component/style.js +43 -0
- package/lib/api/component/url.d.ts +33 -0
- package/lib/api/component/url.js +133 -0
- package/lib/api/component/validate-input.d.ts +8 -0
- package/lib/api/component/validate-input.js +24 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +27 -0
- package/lib/api/type/common.d.ts +24 -0
- package/lib/api/type/common.js +5 -0
- package/lib/api/type/index.d.ts +5 -0
- package/lib/api/type/index.js +16 -0
- package/lib/button/component/index.d.ts +2 -0
- package/lib/button/component/index.js +94 -0
- package/lib/button/index.d.ts +2 -0
- package/lib/button/index.js +27 -0
- package/lib/button/type/index.d.ts +31 -0
- package/lib/button/type/index.js +5 -0
- package/lib/checkbox/component/checkbox-group.d.ts +2 -0
- package/lib/checkbox/component/checkbox-group.js +73 -0
- package/lib/checkbox/component/checkbox.d.ts +2 -0
- package/lib/checkbox/component/checkbox.js +15 -0
- package/lib/checkbox/component/index.d.ts +2 -0
- package/lib/checkbox/component/index.js +17 -0
- package/lib/checkbox/component/use-checkbox.d.ts +12 -0
- package/lib/checkbox/component/use-checkbox.js +50 -0
- package/lib/checkbox/component/utils.d.ts +13 -0
- package/lib/checkbox/component/utils.js +47 -0
- package/lib/checkbox/index.d.ts +2 -0
- package/lib/checkbox/index.js +27 -0
- package/lib/checkbox/style/index.d.ts +5 -0
- package/lib/checkbox/style/index.js +18 -0
- package/lib/checkbox/type/index.d.ts +18 -0
- package/lib/checkbox/type/index.js +5 -0
- package/lib/config/index.d.ts +0 -0
- package/lib/config/index.js +1 -0
- package/lib/date-picker/component/index.d.ts +3 -0
- package/lib/date-picker/component/index.js +46 -0
- package/lib/date-picker/index.d.ts +2 -0
- package/lib/date-picker/index.js +27 -0
- package/lib/date-picker/style/index.d.ts +4 -0
- package/lib/date-picker/style/index.js +14 -0
- package/lib/date-picker/type/index.d.ts +21 -0
- package/lib/date-picker/type/index.js +5 -0
- package/lib/empty/component/index.d.ts +2 -0
- package/lib/empty/component/index.js +24 -0
- package/lib/empty/index.d.ts +2 -0
- package/lib/empty/index.js +27 -0
- package/lib/empty/type/index.d.ts +9 -0
- package/lib/empty/type/index.js +5 -0
- package/lib/form/component/constant.d.ts +15 -0
- package/lib/form/component/constant.js +21 -0
- package/lib/form/component/form-content.d.ts +10 -0
- package/lib/form/component/form-content.js +288 -0
- package/lib/form/component/form-item-map.d.ts +40 -0
- package/lib/form/component/form-item-map.js +128 -0
- package/lib/form/component/form-item.d.ts +7 -0
- package/lib/form/component/form-item.js +227 -0
- package/lib/form/component/form-list.d.ts +36 -0
- package/lib/form/component/form-list.js +201 -0
- package/lib/form/component/form.d.ts +2 -0
- package/lib/form/component/form.js +47 -0
- package/lib/form/component/index.d.ts +15 -0
- package/lib/form/component/index.js +20 -0
- package/lib/form/component/submit-button.d.ts +2 -0
- package/lib/form/component/submit-button.js +54 -0
- package/lib/form/component/use-debug.d.ts +1 -0
- package/lib/form/component/use-debug.js +22 -0
- package/lib/form/component/utils.d.ts +95 -0
- package/lib/form/component/utils.js +467 -0
- package/lib/form/component/validator-item.d.ts +7 -0
- package/lib/form/component/validator-item.js +60 -0
- package/lib/form/hook/index.d.ts +16 -0
- package/lib/form/hook/index.js +163 -0
- package/lib/form/hook/list-provider.d.ts +6 -0
- package/lib/form/hook/list-provider.js +24 -0
- package/lib/form/hook/provider.d.ts +23 -0
- package/lib/form/hook/provider.js +30 -0
- package/lib/form/hook/use-form.d.ts +2 -0
- package/lib/form/hook/use-form.js +342 -0
- package/lib/form/index.d.ts +3 -0
- package/lib/form/index.js +38 -0
- package/lib/form/style/form-item.d.ts +3 -0
- package/lib/form/style/form-item.js +46 -0
- package/lib/form/style/index.d.ts +7 -0
- package/lib/form/style/index.js +32 -0
- package/lib/form/type/form-item.d.ts +141 -0
- package/lib/form/type/form-item.js +5 -0
- package/lib/form/type/form-list.d.ts +91 -0
- package/lib/form/type/form-list.js +5 -0
- package/lib/form/type/index.d.ts +134 -0
- package/lib/form/type/index.js +27 -0
- package/lib/grid/component/index.d.ts +2 -0
- package/lib/grid/component/index.js +83 -0
- package/lib/grid/component/pagination.d.ts +50 -0
- package/lib/grid/component/pagination.js +62 -0
- package/lib/grid/component/utils.d.ts +2 -0
- package/lib/grid/component/utils.js +14 -0
- package/lib/grid/index.d.ts +2 -0
- package/lib/grid/index.js +27 -0
- package/lib/grid/style/index.d.ts +11 -0
- package/lib/grid/style/index.js +33 -0
- package/lib/grid/type/index.d.ts +67 -0
- package/lib/grid/type/index.js +5 -0
- package/lib/highlight-text/component/index.d.ts +2 -0
- package/lib/highlight-text/component/index.js +78 -0
- package/lib/highlight-text/index.d.ts +2 -0
- package/lib/highlight-text/index.js +27 -0
- package/lib/highlight-text/style/index.d.ts +4 -0
- package/lib/highlight-text/style/index.js +14 -0
- package/lib/highlight-text/type/index.d.ts +18 -0
- package/lib/highlight-text/type/index.js +5 -0
- package/lib/hooks/hook/common.d.ts +1 -0
- package/lib/hooks/hook/common.js +18 -0
- package/lib/hooks/hook/index.d.ts +7 -0
- package/lib/hooks/hook/index.js +82 -0
- package/lib/hooks/hook/use-debounce.d.ts +4 -0
- package/lib/hooks/hook/use-debounce.js +32 -0
- package/lib/hooks/hook/use-deep.d.ts +9 -0
- package/lib/hooks/hook/use-deep.js +76 -0
- package/lib/hooks/hook/use-fetch.d.ts +8 -0
- package/lib/hooks/hook/use-fetch.js +171 -0
- package/lib/hooks/hook/use-list-operation.d.ts +5 -0
- package/lib/hooks/hook/use-list-operation.js +80 -0
- package/lib/hooks/hook/use-loading.d.ts +7 -0
- package/lib/hooks/hook/use-loading.js +66 -0
- package/lib/hooks/hook/use-window-resize.d.ts +5 -0
- package/lib/hooks/hook/use-window-resize.js +22 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +27 -0
- package/lib/hooks/type/index.d.ts +2 -0
- package/lib/hooks/type/index.js +27 -0
- package/lib/hooks/type/use-fetch.d.ts +31 -0
- package/lib/hooks/type/use-fetch.js +5 -0
- package/lib/hooks/type/use-list-operation.d.ts +34 -0
- package/lib/hooks/type/use-list-operation.js +5 -0
- package/lib/icon/component/down.d.ts +2 -0
- package/lib/icon/component/down.js +50 -0
- package/lib/icon/component/index.d.ts +2 -0
- package/lib/icon/component/index.js +27 -0
- package/lib/icon/component/up.d.ts +2 -0
- package/lib/icon/component/up.js +49 -0
- package/lib/icon/hook/index.d.ts +477 -0
- package/lib/icon/hook/index.js +67 -0
- package/lib/icon/index.d.ts +2 -0
- package/lib/icon/index.js +27 -0
- package/lib/icon/style/index.d.ts +4 -0
- package/lib/icon/style/index.js +17 -0
- package/lib/icon/type/index.d.ts +14 -0
- package/lib/icon/type/index.js +5 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.js +345 -0
- package/lib/input/component/index.d.ts +12 -0
- package/lib/input/component/index.js +33 -0
- package/lib/input/component/input.d.ts +2 -0
- package/lib/input/component/input.js +15 -0
- package/lib/input/component/number.d.ts +4 -0
- package/lib/input/component/number.js +57 -0
- package/lib/input/component/password.d.ts +2 -0
- package/lib/input/component/password.js +15 -0
- package/lib/input/component/text-area.d.ts +2 -0
- package/lib/input/component/text-area.js +23 -0
- package/lib/input/component/utils.d.ts +15 -0
- package/lib/input/component/utils.js +114 -0
- package/lib/input/index.d.ts +2 -0
- package/lib/input/index.js +27 -0
- package/lib/input/style/index.d.ts +6 -0
- package/lib/input/style/index.js +18 -0
- package/lib/input/type/index.d.ts +41 -0
- package/lib/input/type/index.js +5 -0
- package/lib/modal-prompt/component/index.d.ts +5 -0
- package/lib/modal-prompt/component/index.js +85 -0
- package/lib/modal-prompt/component/open-loading.d.ts +2 -0
- package/lib/modal-prompt/component/open-loading.js +28 -0
- package/lib/modal-prompt/component/utils.d.ts +4 -0
- package/lib/modal-prompt/component/utils.js +57 -0
- package/lib/modal-prompt/index.d.ts +2 -0
- package/lib/modal-prompt/index.js +27 -0
- package/lib/modal-prompt/style/index.d.ts +5 -0
- package/lib/modal-prompt/style/index.js +16 -0
- package/lib/modal-prompt/type/index.d.ts +36 -0
- package/lib/modal-prompt/type/index.js +5 -0
- package/lib/open-modal/component/constant.d.ts +1 -0
- package/lib/open-modal/component/constant.js +10 -0
- package/lib/open-modal/component/footer.d.ts +2 -0
- package/lib/open-modal/component/footer.js +41 -0
- package/lib/open-modal/component/index.d.ts +4 -0
- package/lib/open-modal/component/index.js +30 -0
- package/lib/open-modal/component/modal.d.ts +10 -0
- package/lib/open-modal/component/modal.js +44 -0
- package/lib/open-modal/component/title.d.ts +6 -0
- package/lib/open-modal/component/title.js +18 -0
- package/lib/open-modal/component/use-modal.d.ts +14 -0
- package/lib/open-modal/component/use-modal.js +184 -0
- package/lib/open-modal/component/utils.d.ts +11 -0
- package/lib/open-modal/component/utils.js +117 -0
- package/lib/open-modal/hook/index.d.ts +7 -0
- package/lib/open-modal/hook/index.js +40 -0
- package/lib/open-modal/hook/use-modal.d.ts +6 -0
- package/lib/open-modal/hook/use-modal.js +34 -0
- package/lib/open-modal/index.d.ts +3 -0
- package/lib/open-modal/index.js +38 -0
- package/lib/open-modal/style/index.d.ts +5 -0
- package/lib/open-modal/style/index.js +25 -0
- package/lib/open-modal/style/wrap.d.ts +2 -0
- package/lib/open-modal/style/wrap.js +13 -0
- package/lib/open-modal/type/index.d.ts +91 -0
- package/lib/open-modal/type/index.js +5 -0
- package/lib/portal/component/index.d.ts +2 -0
- package/lib/portal/component/index.js +47 -0
- package/lib/portal/index.d.ts +2 -0
- package/lib/portal/index.js +27 -0
- package/lib/portal/type/index.d.ts +13 -0
- package/lib/portal/type/index.js +5 -0
- package/lib/radio/component/abstract-box.d.ts +380 -0
- package/lib/radio/component/abstract-box.js +98 -0
- package/lib/radio/component/index.d.ts +2 -0
- package/lib/radio/component/index.js +17 -0
- package/lib/radio/component/radio.d.ts +2 -0
- package/lib/radio/component/radio.js +17 -0
- package/lib/radio/component/redio-group.d.ts +2 -0
- package/lib/radio/component/redio-group.js +57 -0
- package/lib/radio/component/use-box-options.d.ts +6 -0
- package/lib/radio/component/use-box-options.js +27 -0
- package/lib/radio/component/use-radio.d.ts +23 -0
- package/lib/radio/component/use-radio.js +28 -0
- package/lib/radio/component/utils.d.ts +7 -0
- package/lib/radio/component/utils.js +33 -0
- package/lib/radio/index.d.ts +2 -0
- package/lib/radio/index.js +27 -0
- package/lib/radio/style/index.d.ts +7 -0
- package/lib/radio/style/index.js +22 -0
- package/lib/radio/type/index.d.ts +32 -0
- package/lib/radio/type/index.js +5 -0
- package/lib/select/component/constant.d.ts +1 -0
- package/lib/select/component/constant.js +7 -0
- package/lib/select/component/index.d.ts +3 -0
- package/lib/select/component/index.js +29 -0
- package/lib/select/component/loading.d.ts +1 -0
- package/lib/select/component/loading.js +20 -0
- package/lib/select/component/use-select-options.d.ts +11 -0
- package/lib/select/component/use-select-options.js +88 -0
- package/lib/select/component/use-select.d.ts +2 -0
- package/lib/select/component/use-select.js +143 -0
- package/lib/select/component/utils.d.ts +14 -0
- package/lib/select/component/utils.js +152 -0
- package/lib/select/index.d.ts +2 -0
- package/lib/select/index.js +27 -0
- package/lib/select/style/index.d.ts +4 -0
- package/lib/select/style/index.js +14 -0
- package/lib/select/type/index.d.ts +105 -0
- package/lib/select/type/index.js +5 -0
- package/lib/stack/component/center-stack.d.ts +2 -0
- package/lib/stack/component/center-stack.js +39 -0
- package/lib/stack/component/h-stack.d.ts +2 -0
- package/lib/stack/component/h-stack.js +46 -0
- package/lib/stack/component/index.d.ts +3 -0
- package/lib/stack/component/index.js +38 -0
- package/lib/stack/component/v-stack.d.ts +2 -0
- package/lib/stack/component/v-stack.js +43 -0
- package/lib/stack/index.d.ts +2 -0
- package/lib/stack/index.js +27 -0
- package/lib/stack/style/index.d.ts +21 -0
- package/lib/stack/style/index.js +59 -0
- package/lib/stack/type/index.d.ts +54 -0
- package/lib/stack/type/index.js +5 -0
- package/lib/switch/component/index.d.ts +2 -0
- package/lib/switch/component/index.js +67 -0
- package/lib/switch/index.d.ts +2 -0
- package/lib/switch/index.js +27 -0
- package/lib/switch/style/index.d.ts +5 -0
- package/lib/switch/style/index.js +20 -0
- package/lib/switch/type/index.d.ts +27 -0
- package/lib/switch/type/index.js +5 -0
- package/lib/table/component/action-button.d.ts +2 -0
- package/lib/table/component/action-button.js +102 -0
- package/lib/table/component/actions.d.ts +2 -0
- package/lib/table/component/actions.js +42 -0
- package/lib/table/component/constant.d.ts +1 -0
- package/lib/table/component/constant.js +12 -0
- package/lib/table/component/editor.d.ts +2 -0
- package/lib/table/component/editor.js +42 -0
- package/lib/table/component/filter.d.ts +3 -0
- package/lib/table/component/filter.js +62 -0
- package/lib/table/component/index.d.ts +7 -0
- package/lib/table/component/index.js +10 -0
- package/lib/table/component/link.d.ts +2 -0
- package/lib/table/component/link.js +27 -0
- package/lib/table/component/sort.d.ts +6 -0
- package/lib/table/component/sort.js +24 -0
- package/lib/table/component/switch.d.ts +2 -0
- package/lib/table/component/switch.js +34 -0
- package/lib/table/component/table-body.d.ts +6 -0
- package/lib/table/component/table-body.js +95 -0
- package/lib/table/component/table.d.ts +10 -0
- package/lib/table/component/table.js +243 -0
- package/lib/table/component/time.d.ts +2 -0
- package/lib/table/component/time.js +19 -0
- package/lib/table/component/utils.d.ts +120 -0
- package/lib/table/component/utils.js +235 -0
- package/lib/table/component/wrapper.d.ts +6 -0
- package/lib/table/component/wrapper.js +37 -0
- package/lib/table/hook/index.d.ts +7 -0
- package/lib/table/hook/index.js +40 -0
- package/lib/table/hook/search.d.ts +5 -0
- package/lib/table/hook/search.js +138 -0
- package/lib/table/index.d.ts +3 -0
- package/lib/table/index.js +38 -0
- package/lib/table/style/index.d.ts +9 -0
- package/lib/table/style/index.js +23 -0
- package/lib/table/type/action.d.ts +48 -0
- package/lib/table/type/action.js +5 -0
- package/lib/table/type/column.d.ts +110 -0
- package/lib/table/type/column.js +5 -0
- package/lib/table/type/index.d.ts +113 -0
- package/lib/table/type/index.js +27 -0
- package/lib/tabs/component/constant.d.ts +2 -0
- package/lib/tabs/component/constant.js +8 -0
- package/lib/tabs/component/index.d.ts +2 -0
- package/lib/tabs/component/index.js +25 -0
- package/lib/tabs/component/utils.d.ts +24 -0
- package/lib/tabs/component/utils.js +63 -0
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/index.js +27 -0
- package/lib/tabs/style/index.d.ts +5 -0
- package/lib/tabs/style/index.js +17 -0
- package/lib/tabs/type/index.d.ts +20 -0
- package/lib/tabs/type/index.js +5 -0
- package/lib/text/component/index.d.ts +3 -0
- package/lib/text/component/index.js +78 -0
- package/lib/text/component/use-text.d.ts +4 -0
- package/lib/text/component/use-text.js +31 -0
- package/lib/text/component/utils.d.ts +3 -0
- package/lib/text/component/utils.js +15 -0
- package/lib/text/index.d.ts +2 -0
- package/lib/text/index.js +27 -0
- package/lib/text/style/index.d.ts +5 -0
- package/lib/text/style/index.js +15 -0
- package/lib/text/type/index.d.ts +19 -0
- package/lib/text/type/index.js +5 -0
- package/lib/tooltip/component/index.d.ts +48 -0
- package/lib/tooltip/component/index.js +28 -0
- package/lib/tooltip/index.d.ts +2 -0
- package/lib/tooltip/index.js +27 -0
- package/lib/tooltip/type/index.d.ts +8 -0
- package/lib/tooltip/type/index.js +5 -0
- package/lib/tree/component/index.d.ts +2 -0
- package/lib/tree/component/index.js +30 -0
- package/lib/tree/component/utils.d.ts +1 -0
- package/lib/tree/component/utils.js +9 -0
- package/lib/tree/index.d.ts +2 -0
- package/lib/tree/index.js +27 -0
- package/lib/tree/style/index.d.ts +4 -0
- package/lib/tree/style/index.js +14 -0
- package/lib/tree/type/index.d.ts +2 -0
- package/lib/tree/type/index.js +5 -0
- package/lib/tree-select/component/index.d.ts +2 -0
- package/lib/tree-select/component/index.js +22 -0
- package/lib/tree-select/component/use-tree-select.d.ts +2 -0
- package/lib/tree-select/component/use-tree-select.js +66 -0
- package/lib/tree-select/index.d.ts +2 -0
- package/lib/tree-select/index.js +27 -0
- package/lib/tree-select/style/index.d.ts +5 -0
- package/lib/tree-select/style/index.js +22 -0
- package/lib/tree-select/type/index.d.ts +23 -0
- package/lib/tree-select/type/index.js +5 -0
- package/lib/virtual-list/component/index.d.ts +2 -0
- package/lib/virtual-list/component/index.js +35 -0
- package/lib/virtual-list/index.d.ts +2 -0
- package/lib/virtual-list/index.js +27 -0
- package/lib/virtual-list/type/index.d.ts +17 -0
- package/lib/virtual-list/type/index.js +5 -0
- package/package.json +147 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.sortBy = sortBy;
|
|
8
|
+
exports.sorter = sorter;
|
|
9
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
|
+
function sorter(a, b) {
|
|
11
|
+
if (_lodash.default.isNumber(a)) {
|
|
12
|
+
return a - b;
|
|
13
|
+
}
|
|
14
|
+
if (_lodash.default.isNil(a) && _lodash.default.isNil(b)) {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
17
|
+
if (_lodash.default.isNil(a)) {
|
|
18
|
+
return -1;
|
|
19
|
+
}
|
|
20
|
+
return a.localeCompare(b);
|
|
21
|
+
}
|
|
22
|
+
function sortBy() {
|
|
23
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
24
|
+
var key = arguments.length > 1 ? arguments[1] : undefined;
|
|
25
|
+
return data.sort(function (a, b) {
|
|
26
|
+
return sorter(a[key], b[key]);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function transformValueWithStyleUnit(value?: string | number, defaultValue?: any): any;
|
|
2
|
+
export declare function transformValueToFlex(value?: string | number, defaultValue?: any): any;
|
|
3
|
+
export declare function transformValueToGap(value?: number | [number, number], defaultValue?: any): any;
|
|
4
|
+
export declare function hideBodyScroll(hide?: boolean): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.hideBodyScroll = hideBodyScroll;
|
|
8
|
+
exports.transformValueToFlex = transformValueToFlex;
|
|
9
|
+
exports.transformValueToGap = transformValueToGap;
|
|
10
|
+
exports.transformValueWithStyleUnit = transformValueWithStyleUnit;
|
|
11
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
12
|
+
var regularUnitsRegx = /(auto|unset|inherit|initial|%|px|vh|vw|em)$/i;
|
|
13
|
+
function transformValueWithStyleUnit(value, defaultValue) {
|
|
14
|
+
if (_lodash.default.isNil(value)) {
|
|
15
|
+
return defaultValue;
|
|
16
|
+
}
|
|
17
|
+
if (_lodash.default.isNumber(value)) {
|
|
18
|
+
return "".concat(value, "px");
|
|
19
|
+
}
|
|
20
|
+
if (regularUnitsRegx.test(value)) {
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
return "".concat(value, "px");
|
|
24
|
+
}
|
|
25
|
+
function transformValueToFlex(value, defaultValue) {
|
|
26
|
+
if (_lodash.default.isNil(value)) {
|
|
27
|
+
return defaultValue;
|
|
28
|
+
}
|
|
29
|
+
return _lodash.default.isString(value) ? value : "".concat(value, " 0 0");
|
|
30
|
+
}
|
|
31
|
+
function transformValueToGap(value, defaultValue) {
|
|
32
|
+
if (_lodash.default.isNil(value)) {
|
|
33
|
+
return defaultValue;
|
|
34
|
+
}
|
|
35
|
+
var gap = _lodash.default.isArray(value) ? value : [value, value];
|
|
36
|
+
return gap.reverse().map(function (item) {
|
|
37
|
+
return "".concat(item, "px");
|
|
38
|
+
}).join(' ');
|
|
39
|
+
}
|
|
40
|
+
function hideBodyScroll() {
|
|
41
|
+
var hide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
42
|
+
hide ? document.body.classList.add('do-hide-scroll') : document.body.classList.remove('do-hide-scroll');
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import queryString, { ParseOptions, StringifyOptions } from 'query-string';
|
|
2
|
+
/**
|
|
3
|
+
* Query 相关方法
|
|
4
|
+
*/
|
|
5
|
+
declare class Query {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
constructor(query: Record<string, any>);
|
|
8
|
+
toString(options?: StringifyOptions): string;
|
|
9
|
+
}
|
|
10
|
+
declare function parseQuery(url?: string, options?: ParseOptions): Record<string, any>;
|
|
11
|
+
declare function updateQuery(query?: Record<string, any>, url?: string): Query;
|
|
12
|
+
declare function removeQuery(key?: string | string[], url?: string): Query;
|
|
13
|
+
declare function stringifyQuery(query?: Record<string, any>, options?: StringifyOptions): string;
|
|
14
|
+
declare function parseParams(url?: string): Partial<Record<string, string | string[]>>;
|
|
15
|
+
declare function stringifyUrl(query?: Record<string, any>, url?: string, options?: StringifyOptions & ParseOptions): string;
|
|
16
|
+
declare function replaceUrl(query?: Record<string, any>, url?: string, options?: StringifyOptions & ParseOptions): string;
|
|
17
|
+
declare function parse(url?: string, options?: ParseOptions): {
|
|
18
|
+
params: Partial<Record<string, string | string[]>>;
|
|
19
|
+
url: string;
|
|
20
|
+
query: queryString.ParsedQuery<string>;
|
|
21
|
+
fragmentIdentifier?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare const url: {
|
|
24
|
+
parse: typeof parse;
|
|
25
|
+
parseQuery: typeof parseQuery;
|
|
26
|
+
updateQuery: typeof updateQuery;
|
|
27
|
+
removeQuery: typeof removeQuery;
|
|
28
|
+
stringifyQuery: typeof stringifyQuery;
|
|
29
|
+
parseParams: typeof parseParams;
|
|
30
|
+
stringifyUrl: typeof stringifyUrl;
|
|
31
|
+
replaceUrl: typeof replaceUrl;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.url = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
12
|
+
var _matchPathParser = require("match-path-parser");
|
|
13
|
+
var _queryString = _interopRequireDefault(require("query-string"));
|
|
14
|
+
function getUrl(url) {
|
|
15
|
+
return new URL(url !== null && url !== void 0 ? url : location.href, location.origin);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Query 相关方法
|
|
20
|
+
*/
|
|
21
|
+
var Query = /*#__PURE__*/function () {
|
|
22
|
+
function Query(query) {
|
|
23
|
+
(0, _classCallCheck2.default)(this, Query);
|
|
24
|
+
Object.assign(this, query);
|
|
25
|
+
}
|
|
26
|
+
(0, _createClass2.default)(Query, [{
|
|
27
|
+
key: "toString",
|
|
28
|
+
value: function toString(options) {
|
|
29
|
+
return stringifyQuery(this, options);
|
|
30
|
+
}
|
|
31
|
+
}]);
|
|
32
|
+
return Query;
|
|
33
|
+
}();
|
|
34
|
+
function parseQuery(url, options) {
|
|
35
|
+
var _getUrl = getUrl(url),
|
|
36
|
+
search = _getUrl.search;
|
|
37
|
+
return _queryString.default.parse(search, (0, _objectSpread2.default)({
|
|
38
|
+
parseNumbers: true,
|
|
39
|
+
parseBooleans: true
|
|
40
|
+
}, options));
|
|
41
|
+
}
|
|
42
|
+
function updateQuery(query, url) {
|
|
43
|
+
var parsedQuery = parseQuery(url);
|
|
44
|
+
var mergedQuery = _lodash.default.assign(parsedQuery, query);
|
|
45
|
+
return new Query(mergedQuery);
|
|
46
|
+
}
|
|
47
|
+
function removeQuery() {
|
|
48
|
+
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
49
|
+
var url = arguments.length > 1 ? arguments[1] : undefined;
|
|
50
|
+
var keys = _lodash.default.isArray(key) ? key : [key];
|
|
51
|
+
var query = _lodash.default.omit(parseQuery(url), keys);
|
|
52
|
+
return new Query(query);
|
|
53
|
+
}
|
|
54
|
+
function stringifyQuery() {
|
|
55
|
+
var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
56
|
+
var options = arguments.length > 1 ? arguments[1] : undefined;
|
|
57
|
+
return _queryString.default.stringify(query, (0, _objectSpread2.default)({
|
|
58
|
+
skipEmptyString: true,
|
|
59
|
+
skipNull: true
|
|
60
|
+
}, options));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Url 相关方法
|
|
65
|
+
*/
|
|
66
|
+
function getUrlMatch(pathname) {
|
|
67
|
+
// ESB
|
|
68
|
+
if (_lodash.default.startsWith(pathname, '/project/')) {
|
|
69
|
+
return (0, _matchPathParser.match)('/project/:projectId{/dashboard/:dashboardId}', {
|
|
70
|
+
end: false
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Data Process
|
|
75
|
+
if (_lodash.default.startsWith(pathname, '/dp/') || _lodash.default.startsWith(pathname, '/projects/')) {
|
|
76
|
+
return (0, _matchPathParser.match)('{/dp}/projects/:projectId{/flows/:flowId}', {
|
|
77
|
+
end: false
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// EyeVia
|
|
82
|
+
if (_lodash.default.startsWith(pathname, '/v/')) {
|
|
83
|
+
return (0, _matchPathParser.match)('/v/:projectId{/d/:dashboardId/s/:screenId}', {
|
|
84
|
+
end: false
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if (_lodash.default.startsWith(pathname, '/p/')) {
|
|
88
|
+
return (0, _matchPathParser.match)('/p/:projectId', {
|
|
89
|
+
end: false
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function parseParams(url) {
|
|
94
|
+
var _getUrl2 = getUrl(url),
|
|
95
|
+
pathname = _getUrl2.pathname;
|
|
96
|
+
var fn = getUrlMatch(pathname);
|
|
97
|
+
var res = fn === null || fn === void 0 ? void 0 : fn(pathname);
|
|
98
|
+
return res ? res.params : {};
|
|
99
|
+
}
|
|
100
|
+
function stringifyUrl(query, url, options) {
|
|
101
|
+
var parsedUrl = parse(url, options);
|
|
102
|
+
_lodash.default.assign(parsedUrl.query, query);
|
|
103
|
+
return _queryString.default.stringifyUrl(parsedUrl, (0, _objectSpread2.default)({
|
|
104
|
+
skipEmptyString: true,
|
|
105
|
+
skipNull: true
|
|
106
|
+
}, options));
|
|
107
|
+
}
|
|
108
|
+
function replaceUrl(query, url, options) {
|
|
109
|
+
var newUrl = stringifyUrl(query, url, options);
|
|
110
|
+
history.replaceState({}, '', newUrl);
|
|
111
|
+
return newUrl;
|
|
112
|
+
}
|
|
113
|
+
function parse(url, options) {
|
|
114
|
+
var _getUrl3 = getUrl(url),
|
|
115
|
+
href = _getUrl3.href;
|
|
116
|
+
var parsedUrl = _queryString.default.parseUrl(href, (0, _objectSpread2.default)({
|
|
117
|
+
parseNumbers: true,
|
|
118
|
+
parseBooleans: true
|
|
119
|
+
}, options));
|
|
120
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, parsedUrl), {}, {
|
|
121
|
+
params: parseParams(url)
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
var url = exports.url = {
|
|
125
|
+
parse: parse,
|
|
126
|
+
parseQuery: parseQuery,
|
|
127
|
+
updateQuery: updateQuery,
|
|
128
|
+
removeQuery: removeQuery,
|
|
129
|
+
stringifyQuery: stringifyQuery,
|
|
130
|
+
parseParams: parseParams,
|
|
131
|
+
stringifyUrl: stringifyUrl,
|
|
132
|
+
replaceUrl: replaceUrl
|
|
133
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const inputValueReg: RegExp;
|
|
2
|
+
export declare const scriptReg: RegExp;
|
|
3
|
+
export declare function validateScript(value: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* validate data of general String type
|
|
6
|
+
* letters, numbers, spot, underlines and Spaces
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateString(value: string): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.scriptReg = exports.inputValueReg = void 0;
|
|
7
|
+
exports.validateScript = validateScript;
|
|
8
|
+
exports.validateString = validateString;
|
|
9
|
+
var inputValueReg = exports.inputValueReg = /^[a-zA-Z0-9_\-\s/.:*{}€,()%$|+#@=><']*$/i;
|
|
10
|
+
var scriptReg = exports.scriptReg = /<[/]*[^/<]*\s*script[\s+]*[^/>]*[/]*>/i;
|
|
11
|
+
function validateScript(value) {
|
|
12
|
+
return !value.match(scriptReg);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* validate data of general String type
|
|
17
|
+
* letters, numbers, spot, underlines and Spaces
|
|
18
|
+
*/
|
|
19
|
+
function validateString(value) {
|
|
20
|
+
if (!inputValueReg.test(value)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
return validateScript(value);
|
|
24
|
+
}
|
package/lib/api/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _component = require("./component");
|
|
7
|
+
Object.keys(_component).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _component[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _component[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _type = require("./type");
|
|
18
|
+
Object.keys(_type).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _type[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _type[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CSSProperties, MutableRefObject } from 'react';
|
|
2
|
+
export type Refs = MutableRefObject<any>;
|
|
3
|
+
export interface BaseComponentProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
refs?: Refs;
|
|
7
|
+
}
|
|
8
|
+
export interface BaseFlexProps {
|
|
9
|
+
/**
|
|
10
|
+
* @description 是否垂直排列
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
vertical?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @description 间距,如果是数组,第一个为水平间距,第二个为垂直间距
|
|
16
|
+
* @default 8
|
|
17
|
+
*/
|
|
18
|
+
gap?: number | [number, number];
|
|
19
|
+
/**
|
|
20
|
+
* @description 是否自动换行
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
wrap?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _common = require("./common");
|
|
7
|
+
Object.keys(_common).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _common[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _common[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Button = Button;
|
|
8
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _api = require("../../api");
|
|
12
|
+
var _hooks = require("../../hooks");
|
|
13
|
+
var _portal = require("../../portal");
|
|
14
|
+
var _text = require("../../text");
|
|
15
|
+
var _tooltip = require("../../tooltip");
|
|
16
|
+
var _antd = require("antd");
|
|
17
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
18
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
19
|
+
var _excluded = ["tooltip", "placement", "trigger", "align"],
|
|
20
|
+
_excluded2 = ["show", "confirm", "onClick", "confirmMessage", "okText", "cancelText"],
|
|
21
|
+
_excluded3 = ["portalTo"];
|
|
22
|
+
function useButton(props) {
|
|
23
|
+
var _props$loading;
|
|
24
|
+
var _useLoading = (0, _hooks.useLoading)(props.onClick),
|
|
25
|
+
_useLoading2 = (0, _slicedToArray2.default)(_useLoading, 2),
|
|
26
|
+
loading = _useLoading2[0],
|
|
27
|
+
onClick = _useLoading2[1];
|
|
28
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
29
|
+
loading: (_props$loading = props.loading) !== null && _props$loading !== void 0 ? _props$loading : loading,
|
|
30
|
+
onClick: onClick
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function BaseButton(_ref) {
|
|
34
|
+
var tooltip = _ref.tooltip,
|
|
35
|
+
_ref$placement = _ref.placement,
|
|
36
|
+
placement = _ref$placement === void 0 ? 'top' : _ref$placement,
|
|
37
|
+
trigger = _ref.trigger,
|
|
38
|
+
_ref$align = _ref.align,
|
|
39
|
+
align = _ref$align === void 0 ? {
|
|
40
|
+
offset: [0, 2]
|
|
41
|
+
} : _ref$align,
|
|
42
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
|
+
var params = useButton(props);
|
|
44
|
+
if (_lodash.default.isNil(tooltip)) {
|
|
45
|
+
return (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)({}, params));
|
|
46
|
+
}
|
|
47
|
+
var tooltipProps = (0, _objectSpread2.default)({
|
|
48
|
+
trigger: trigger,
|
|
49
|
+
placement: placement,
|
|
50
|
+
align: align
|
|
51
|
+
}, (0, _text.generateTooltip)(tooltip));
|
|
52
|
+
return (0, _jsxRuntime.jsx)(_tooltip.Tooltip, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, tooltipProps), {}, {
|
|
53
|
+
children: (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)({}, params))
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
function ButtonWrapper(_ref2) {
|
|
57
|
+
var _ref2$show = _ref2.show,
|
|
58
|
+
show = _ref2$show === void 0 ? true : _ref2$show,
|
|
59
|
+
confirm = _ref2.confirm,
|
|
60
|
+
onClick = _ref2.onClick,
|
|
61
|
+
confirmMessage = _ref2.confirmMessage,
|
|
62
|
+
okText = _ref2.okText,
|
|
63
|
+
cancelText = _ref2.cancelText,
|
|
64
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
65
|
+
if (!show) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
if (confirm) {
|
|
69
|
+
return (0, _jsxRuntime.jsx)(_antd.Popconfirm, {
|
|
70
|
+
title: confirmMessage || 'Are you sure?',
|
|
71
|
+
onConfirm: onClick,
|
|
72
|
+
okText: okText || 'OK',
|
|
73
|
+
cancelText: cancelText,
|
|
74
|
+
placement: props.placement,
|
|
75
|
+
arrowPointAtCenter: props.arrowPointAtCenter,
|
|
76
|
+
getPopupContainer: _api.getPopupContainer,
|
|
77
|
+
children: (0, _jsxRuntime.jsx)(BaseButton, (0, _objectSpread2.default)({}, props))
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return (0, _jsxRuntime.jsx)(BaseButton, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
81
|
+
onClick: onClick
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
function Button(_ref3) {
|
|
85
|
+
var portalTo = _ref3.portalTo,
|
|
86
|
+
props = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
|
|
87
|
+
if (portalTo) {
|
|
88
|
+
return (0, _jsxRuntime.jsx)(_portal.Portal, {
|
|
89
|
+
container: portalTo,
|
|
90
|
+
children: (0, _jsxRuntime.jsx)(ButtonWrapper, (0, _objectSpread2.default)({}, props))
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return (0, _jsxRuntime.jsx)(ButtonWrapper, (0, _objectSpread2.default)({}, props));
|
|
94
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _component = require("./component");
|
|
7
|
+
Object.keys(_component).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _component[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _component[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _type = require("./type");
|
|
18
|
+
Object.keys(_type).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _type[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _type[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FunctionReturn } from "../../api";
|
|
2
|
+
import { PortalProps } from "../../portal";
|
|
3
|
+
import { ButtonProps as AntdButtonProps, PopconfirmProps } from 'antd';
|
|
4
|
+
import { EllipsisConfig } from 'antd/lib/typography/Base';
|
|
5
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
6
|
+
export interface ButtonProps extends AntdButtonProps, Omit<PopconfirmProps, 'title'> {
|
|
7
|
+
/**
|
|
8
|
+
* @description 提示信息
|
|
9
|
+
* @link TooltipProps: https://4x.ant.design/components/tooltip-cn/#API
|
|
10
|
+
*/
|
|
11
|
+
tooltip?: EllipsisConfig['tooltip'];
|
|
12
|
+
/**
|
|
13
|
+
* @description 是否需要确认
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
confirm?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @description 确认信息
|
|
19
|
+
*/
|
|
20
|
+
confirmMessage?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* @description 是否显示
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
show?: boolean;
|
|
26
|
+
portalTo?: PortalProps['container'];
|
|
27
|
+
/**
|
|
28
|
+
* @description 点击按钮的回调
|
|
29
|
+
*/
|
|
30
|
+
onClick?(event?: MouseEvent): FunctionReturn<void>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.CheckboxGroup = CheckboxGroup;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _api = require("../../api");
|
|
12
|
+
var _css = require("@emotion/css");
|
|
13
|
+
var _antd = require("antd");
|
|
14
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
15
|
+
var _style = _interopRequireDefault(require("../style"));
|
|
16
|
+
var _checkbox = require("./checkbox");
|
|
17
|
+
var _useCheckbox2 = require("./use-checkbox");
|
|
18
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
19
|
+
var _react = require("@emotion/react");
|
|
20
|
+
var _excluded = ["refs", "vertical", "gap", "wrap", "className", "style"],
|
|
21
|
+
_excluded2 = ["label", "originLabel"];
|
|
22
|
+
var Group = _antd.Checkbox.Group;
|
|
23
|
+
function CheckboxGroup(_ref) {
|
|
24
|
+
var refs = _ref.refs,
|
|
25
|
+
vertical = _ref.vertical,
|
|
26
|
+
gap = _ref.gap,
|
|
27
|
+
wrap = _ref.wrap,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
style = _ref.style,
|
|
30
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
|
+
var _useCheckbox = (0, _useCheckbox2.useCheckbox)(props),
|
|
32
|
+
options = _useCheckbox.options,
|
|
33
|
+
value = _useCheckbox.value,
|
|
34
|
+
indeterminate = _useCheckbox.indeterminate,
|
|
35
|
+
disabled = _useCheckbox.disabled,
|
|
36
|
+
checkAll = _useCheckbox.checkAll,
|
|
37
|
+
showAll = _useCheckbox.showAll,
|
|
38
|
+
_useCheckbox$allProps = _useCheckbox.allProps,
|
|
39
|
+
allProps = _useCheckbox$allProps === void 0 ? {} : _useCheckbox$allProps,
|
|
40
|
+
onChangeAll = _useCheckbox.onChangeAll,
|
|
41
|
+
onChange = _useCheckbox.onChange;
|
|
42
|
+
var classString = (0, _css.cx)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, (0, _api.getClassName)('checkbox-wrapper'), true), (0, _api.getClassName)('checkbox-vertical'), vertical), className);
|
|
43
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
44
|
+
css: _style.default.wrapper({
|
|
45
|
+
vertical: vertical,
|
|
46
|
+
gap: gap,
|
|
47
|
+
wrap: wrap
|
|
48
|
+
}),
|
|
49
|
+
className: classString,
|
|
50
|
+
style: style,
|
|
51
|
+
children: [showAll && (0, _jsxRuntime.jsx)(_checkbox.InternalCheckbox, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, allProps), {}, {
|
|
52
|
+
refs: refs,
|
|
53
|
+
className: (0, _api.getClassName)('checkbox-all'),
|
|
54
|
+
value: checkAll,
|
|
55
|
+
onChange: onChangeAll,
|
|
56
|
+
indeterminate: indeterminate,
|
|
57
|
+
disabled: disabled
|
|
58
|
+
})), (0, _jsxRuntime.jsx)(Group, {
|
|
59
|
+
value: value,
|
|
60
|
+
onChange: onChange,
|
|
61
|
+
disabled: disabled,
|
|
62
|
+
children: _lodash.default.map(options, function (_ref2, index) {
|
|
63
|
+
var label = _ref2.label,
|
|
64
|
+
originLabel = _ref2.originLabel,
|
|
65
|
+
option = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
66
|
+
return (0, _react.createElement)(_checkbox.InternalCheckbox, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, option), {}, {
|
|
67
|
+
inGroup: true,
|
|
68
|
+
key: index
|
|
69
|
+
}), label);
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.InternalCheckbox = InternalCheckbox;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _abstractBox = require("../../radio/component/abstract-box");
|
|
10
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
+
function InternalCheckbox(props) {
|
|
12
|
+
return (0, _jsxRuntime.jsx)(_abstractBox.AbstractBox, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
13
|
+
boxType: "checkbox"
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Checkbox = Checkbox;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _checkbox = require("./checkbox");
|
|
10
|
+
var _checkboxGroup = require("./checkbox-group");
|
|
11
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
12
|
+
function Checkbox(props) {
|
|
13
|
+
if (props.options) {
|
|
14
|
+
return (0, _jsxRuntime.jsx)(_checkboxGroup.CheckboxGroup, (0, _objectSpread2.default)({}, props));
|
|
15
|
+
}
|
|
16
|
+
return (0, _jsxRuntime.jsx)(_checkbox.InternalCheckbox, (0, _objectSpread2.default)({}, props));
|
|
17
|
+
}
|