@nickeylin/antd-mobile-pro 2.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/dist/cjs/assets/file/excel.png +0 -0
- package/dist/cjs/assets/file/fileLoading.png +0 -0
- package/dist/cjs/assets/file/jpg.png +0 -0
- package/dist/cjs/assets/file/music.png +0 -0
- package/dist/cjs/assets/file/pdf.png +0 -0
- package/dist/cjs/assets/file/ppt.png +0 -0
- package/dist/cjs/assets/file/txt.png +0 -0
- package/dist/cjs/assets/file/video.png +0 -0
- package/dist/cjs/assets/file/weizhi.png +0 -0
- package/dist/cjs/assets/file/wenjiajia.png +0 -0
- package/dist/cjs/assets/file/word.png +0 -0
- package/dist/cjs/assets/file/yasuo.png +0 -0
- package/dist/cjs/components/action-sheet/index.d.ts +12 -0
- package/dist/cjs/components/action-sheet/index.js +41 -0
- package/dist/cjs/components/action-sheet/promt.d.ts +25 -0
- package/dist/cjs/components/action-sheet/promt.js +75 -0
- package/dist/cjs/components/action-sheet-picker/index.d.ts +3 -0
- package/dist/cjs/components/action-sheet-picker/index.js +37 -0
- package/dist/cjs/components/action-sheet-picker/picker.d.ts +30 -0
- package/dist/cjs/components/action-sheet-picker/picker.js +106 -0
- package/dist/cjs/components/bar-code/bar-code.d.ts +26 -0
- package/dist/cjs/components/bar-code/bar-code.js +138 -0
- package/dist/cjs/components/bar-code/index.d.ts +3 -0
- package/dist/cjs/components/bar-code/index.js +46 -0
- package/dist/cjs/components/card/card.d.ts +9 -0
- package/dist/cjs/components/card/card.js +66 -0
- package/dist/cjs/components/card/card.less +32 -0
- package/dist/cjs/components/card/index.d.ts +4 -0
- package/dist/cjs/components/card/index.js +37 -0
- package/dist/cjs/components/card-tabs/index.d.ts +4 -0
- package/dist/cjs/components/card-tabs/index.js +38 -0
- package/dist/cjs/components/card-tabs/style.less +54 -0
- package/dist/cjs/components/card-tabs/tabs.d.ts +22 -0
- package/dist/cjs/components/card-tabs/tabs.js +89 -0
- package/dist/cjs/components/checkbox/checkbox-group.d.ts +15 -0
- package/dist/cjs/components/checkbox/checkbox-group.js +73 -0
- package/dist/cjs/components/checkbox/checkbox.d.ts +26 -0
- package/dist/cjs/components/checkbox/checkbox.js +67 -0
- package/dist/cjs/components/checkbox/indeterminate-square-icon.d.ts +3 -0
- package/dist/cjs/components/checkbox/indeterminate-square-icon.js +36 -0
- package/dist/cjs/components/checkbox/index.d.ts +26 -0
- package/dist/cjs/components/checkbox/index.js +40 -0
- package/dist/cjs/components/checkbox/style.less +39 -0
- package/dist/cjs/components/config-provider/elements-holder.d.ts +7 -0
- package/dist/cjs/components/config-provider/elements-holder.js +51 -0
- package/dist/cjs/components/config-provider/index.d.ts +9 -0
- package/dist/cjs/components/config-provider/index.js +50 -0
- package/dist/cjs/components/config-provider/provider.d.ts +35 -0
- package/dist/cjs/components/config-provider/provider.js +64 -0
- package/dist/cjs/components/config-provider/use-imperatively-renderer.d.ts +11 -0
- package/dist/cjs/components/config-provider/use-imperatively-renderer.js +106 -0
- package/dist/cjs/components/config-provider/use-prompt.d.ts +12 -0
- package/dist/cjs/components/config-provider/use-prompt.js +82 -0
- package/dist/cjs/components/container/Container.d.ts +7 -0
- package/dist/cjs/components/container/Container.js +44 -0
- package/dist/cjs/components/container/index.d.ts +3 -0
- package/dist/cjs/components/container/index.js +37 -0
- package/dist/cjs/components/date-picker/date-picker.d.ts +26 -0
- package/dist/cjs/components/date-picker/date-picker.js +126 -0
- package/dist/cjs/components/date-picker/date-range-picker.d.ts +11 -0
- package/dist/cjs/components/date-picker/date-range-picker.js +162 -0
- package/dist/cjs/components/date-picker/helper.d.ts +6 -0
- package/dist/cjs/components/date-picker/helper.js +75 -0
- package/dist/cjs/components/date-picker/index.d.ts +8 -0
- package/dist/cjs/components/date-picker/index.js +43 -0
- package/dist/cjs/components/date-picker/style.less +24 -0
- package/dist/cjs/components/descriptions/descriptions.d.ts +17 -0
- package/dist/cjs/components/descriptions/descriptions.js +83 -0
- package/dist/cjs/components/descriptions/index.d.ts +4 -0
- package/dist/cjs/components/descriptions/index.js +38 -0
- package/dist/cjs/components/descriptions/style.less +49 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu.d.ts +29 -0
- package/dist/cjs/components/dropdown-menu/dropdown-menu.js +105 -0
- package/dist/cjs/components/dropdown-menu/index.d.ts +4 -0
- package/dist/cjs/components/dropdown-menu/index.js +37 -0
- package/dist/cjs/components/dropdown-menu/style.less +18 -0
- package/dist/cjs/components/error-block/error-block.d.ts +7 -0
- package/dist/cjs/components/error-block/error-block.js +41 -0
- package/dist/cjs/components/error-block/images/index.d.ts +1 -0
- package/dist/cjs/components/error-block/images/index.js +23 -0
- package/dist/cjs/components/error-block/index.d.ts +4 -0
- package/dist/cjs/components/error-block/index.js +43 -0
- package/dist/cjs/components/grid-menu/grid-menu-item.d.ts +10 -0
- package/dist/cjs/components/grid-menu/grid-menu-item.js +64 -0
- package/dist/cjs/components/grid-menu/grid-menu.d.ts +15 -0
- package/dist/cjs/components/grid-menu/grid-menu.js +79 -0
- package/dist/cjs/components/grid-menu/index.d.ts +8 -0
- package/dist/cjs/components/grid-menu/index.js +41 -0
- package/dist/cjs/components/grid-menu/style.less +63 -0
- package/dist/cjs/components/index.d.ts +33 -0
- package/dist/cjs/components/index.js +141 -0
- package/dist/cjs/components/input-captcha/index.d.ts +4 -0
- package/dist/cjs/components/input-captcha/index.js +38 -0
- package/dist/cjs/components/input-captcha/input-captcha.d.ts +40 -0
- package/dist/cjs/components/input-captcha/input-captcha.js +125 -0
- package/dist/cjs/components/input-captcha/style.less +12 -0
- package/dist/cjs/components/input-number/index.d.ts +8 -0
- package/dist/cjs/components/input-number/index.js +41 -0
- package/dist/cjs/components/input-number/input-money.d.ts +7 -0
- package/dist/cjs/components/input-number/input-money.js +85 -0
- package/dist/cjs/components/input-number/input-number.d.ts +38 -0
- package/dist/cjs/components/input-number/input-number.js +264 -0
- package/dist/cjs/components/input-number/input-number.less +62 -0
- package/dist/cjs/components/input-password/index.d.ts +4 -0
- package/dist/cjs/components/input-password/index.js +38 -0
- package/dist/cjs/components/input-password/input-password.d.ts +12 -0
- package/dist/cjs/components/input-password/input-password.js +86 -0
- package/dist/cjs/components/input-password/style.less +13 -0
- package/dist/cjs/components/money/index.d.ts +4 -0
- package/dist/cjs/components/money/index.js +28 -0
- package/dist/cjs/components/money/money.d.ts +18 -0
- package/dist/cjs/components/money/money.js +120 -0
- package/dist/cjs/components/money/money.less +64 -0
- package/dist/cjs/components/page/body.d.ts +19 -0
- package/dist/cjs/components/page/body.js +93 -0
- package/dist/cjs/components/page/footer.d.ts +16 -0
- package/dist/cjs/components/page/footer.js +68 -0
- package/dist/cjs/components/page/index.d.ts +27 -0
- package/dist/cjs/components/page/index.js +51 -0
- package/dist/cjs/components/page/page-context.d.ts +20 -0
- package/dist/cjs/components/page/page-context.js +82 -0
- package/dist/cjs/components/page/page.d.ts +19 -0
- package/dist/cjs/components/page/page.js +156 -0
- package/dist/cjs/components/page/page.less +79 -0
- package/dist/cjs/components/page/toolbar.d.ts +7 -0
- package/dist/cjs/components/page/toolbar.js +45 -0
- package/dist/cjs/components/picker-toolbar/index.d.ts +4 -0
- package/dist/cjs/components/picker-toolbar/index.js +37 -0
- package/dist/cjs/components/picker-toolbar/picker-toolbar.d.ts +15 -0
- package/dist/cjs/components/picker-toolbar/picker-toolbar.js +126 -0
- package/dist/cjs/components/picker-toolbar/style.less +57 -0
- package/dist/cjs/components/popup-page/default-action-footer.d.ts +10 -0
- package/dist/cjs/components/popup-page/default-action-footer.js +70 -0
- package/dist/cjs/components/popup-page/index.d.ts +8 -0
- package/dist/cjs/components/popup-page/index.js +41 -0
- package/dist/cjs/components/popup-page/popup-page.d.ts +10 -0
- package/dist/cjs/components/popup-page/popup-page.js +90 -0
- package/dist/cjs/components/popup-page/style.less +21 -0
- package/dist/cjs/components/popup-picker-base/index.d.ts +6 -0
- package/dist/cjs/components/popup-picker-base/index.js +46 -0
- package/dist/cjs/components/popup-picker-base/popup-picker-base.d.ts +36 -0
- package/dist/cjs/components/popup-picker-base/popup-picker-base.js +151 -0
- package/dist/cjs/components/popup-picker-base/prompt.d.ts +4 -0
- package/dist/cjs/components/popup-picker-base/prompt.js +66 -0
- package/dist/cjs/components/popup-picker-base/style.less +11 -0
- package/dist/cjs/components/popup-picker-base/use-popup-picker-mixin.d.ts +73 -0
- package/dist/cjs/components/popup-picker-base/use-popup-picker-mixin.js +140 -0
- package/dist/cjs/components/pro-calendar-picker/index.d.ts +3 -0
- package/dist/cjs/components/pro-calendar-picker/index.js +36 -0
- package/dist/cjs/components/pro-calendar-picker/picker.d.ts +25 -0
- package/dist/cjs/components/pro-calendar-picker/picker.js +154 -0
- package/dist/cjs/components/pro-form/default-submitter.d.ts +13 -0
- package/dist/cjs/components/pro-form/default-submitter.js +72 -0
- package/dist/cjs/components/pro-form/index.d.ts +24 -0
- package/dist/cjs/components/pro-form/index.js +101 -0
- package/dist/cjs/components/pro-form/pro-field-context.d.ts +8 -0
- package/dist/cjs/components/pro-form/pro-field-context.js +27 -0
- package/dist/cjs/components/pro-form/pro-form-context.d.ts +8 -0
- package/dist/cjs/components/pro-form/pro-form-context.js +27 -0
- package/dist/cjs/components/pro-form/pro-form-item-action-sheet.d.ts +7 -0
- package/dist/cjs/components/pro-form/pro-form-item-action-sheet.js +84 -0
- package/dist/cjs/components/pro-form/pro-form-item-calendar-picker.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-calendar-picker.js +77 -0
- package/dist/cjs/components/pro-form/pro-form-item-cascader.d.ts +7 -0
- package/dist/cjs/components/pro-form/pro-form-item-cascader.js +78 -0
- package/dist/cjs/components/pro-form/pro-form-item-checkbox.d.ts +11 -0
- package/dist/cjs/components/pro-form/pro-form-item-checkbox.js +83 -0
- package/dist/cjs/components/pro-form/pro-form-item-date-picker.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-date-picker.js +83 -0
- package/dist/cjs/components/pro-form/pro-form-item-date-range-picker.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-date-range-picker.js +65 -0
- package/dist/cjs/components/pro-form/pro-form-item-dependency.d.ts +11 -0
- package/dist/cjs/components/pro-form/pro-form-item-dependency.js +68 -0
- package/dist/cjs/components/pro-form/pro-form-item-input-captcha.d.ts +12 -0
- package/dist/cjs/components/pro-form/pro-form-item-input-captcha.js +72 -0
- package/dist/cjs/components/pro-form/pro-form-item-input-money.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-input-money.js +77 -0
- package/dist/cjs/components/pro-form/pro-form-item-input-number.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-input-number.js +78 -0
- package/dist/cjs/components/pro-form/pro-form-item-input-password.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-input-password.js +70 -0
- package/dist/cjs/components/pro-form/pro-form-item-input.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-input.js +74 -0
- package/dist/cjs/components/pro-form/pro-form-item-list-picker.d.ts +15 -0
- package/dist/cjs/components/pro-form/pro-form-item-list-picker.js +120 -0
- package/dist/cjs/components/pro-form/pro-form-item-picker.d.ts +10 -0
- package/dist/cjs/components/pro-form/pro-form-item-picker.js +79 -0
- package/dist/cjs/components/pro-form/pro-form-item-radio.d.ts +9 -0
- package/dist/cjs/components/pro-form/pro-form-item-radio.js +55 -0
- package/dist/cjs/components/pro-form/pro-form-item-selector.d.ts +7 -0
- package/dist/cjs/components/pro-form/pro-form-item-selector.js +53 -0
- package/dist/cjs/components/pro-form/pro-form-item-slider.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-slider.js +55 -0
- package/dist/cjs/components/pro-form/pro-form-item-stepper.d.ts +12 -0
- package/dist/cjs/components/pro-form/pro-form-item-stepper.js +97 -0
- package/dist/cjs/components/pro-form/pro-form-item-switch.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-switch.js +42 -0
- package/dist/cjs/components/pro-form/pro-form-item-textarea.d.ts +6 -0
- package/dist/cjs/components/pro-form/pro-form-item-textarea.js +78 -0
- package/dist/cjs/components/pro-form/pro-form-item-tree-picker.d.ts +7 -0
- package/dist/cjs/components/pro-form/pro-form-item-tree-picker.js +83 -0
- package/dist/cjs/components/pro-form/pro-form-item.d.ts +47 -0
- package/dist/cjs/components/pro-form/pro-form-item.js +101 -0
- package/dist/cjs/components/pro-form/pro-form.d.ts +29 -0
- package/dist/cjs/components/pro-form/pro-form.js +201 -0
- package/dist/cjs/components/pro-form/style.less +26 -0
- package/dist/cjs/components/pro-form/types.d.ts +87 -0
- package/dist/cjs/components/pro-form/types.js +17 -0
- package/dist/cjs/components/pro-form/use-form-instance.d.ts +2 -0
- package/dist/cjs/components/pro-form/use-form-instance.js +33 -0
- package/dist/cjs/components/pro-form/utils.d.ts +22 -0
- package/dist/cjs/components/pro-form/utils.js +145 -0
- package/dist/cjs/components/pro-list/helper.d.ts +3 -0
- package/dist/cjs/components/pro-list/helper.js +31 -0
- package/dist/cjs/components/pro-list/index.d.ts +4 -0
- package/dist/cjs/components/pro-list/index.js +38 -0
- package/dist/cjs/components/pro-list/pagination-toolbar.d.ts +13 -0
- package/dist/cjs/components/pro-list/pagination-toolbar.js +82 -0
- package/dist/cjs/components/pro-list/pro-list.d.ts +155 -0
- package/dist/cjs/components/pro-list/pro-list.js +559 -0
- package/dist/cjs/components/pro-list/pro-list.less +80 -0
- package/dist/cjs/components/pro-list/selected-rows-summary.d.ts +14 -0
- package/dist/cjs/components/pro-list/selected-rows-summary.js +125 -0
- package/dist/cjs/components/pro-list-picker/index.d.ts +8 -0
- package/dist/cjs/components/pro-list-picker/index.js +29 -0
- package/dist/cjs/components/pro-list-picker/list-picker-utils.d.ts +1 -0
- package/dist/cjs/components/pro-list-picker/list-picker-utils.js +29 -0
- package/dist/cjs/components/pro-list-picker/list-picker.d.ts +30 -0
- package/dist/cjs/components/pro-list-picker/list-picker.js +143 -0
- package/dist/cjs/components/pro-list-picker/list-picker.less +27 -0
- package/dist/cjs/components/pro-list-picker/prompt.d.ts +3 -0
- package/dist/cjs/components/pro-list-picker/prompt.js +33 -0
- package/dist/cjs/components/qr-code/index.d.ts +3 -0
- package/dist/cjs/components/qr-code/index.js +36 -0
- package/dist/cjs/components/qr-code/qr-code.d.ts +32 -0
- package/dist/cjs/components/qr-code/qr-code.js +56 -0
- package/dist/cjs/components/segment-control/index.d.ts +4 -0
- package/dist/cjs/components/segment-control/index.js +37 -0
- package/dist/cjs/components/segment-control/segment.d.ts +25 -0
- package/dist/cjs/components/segment-control/segment.js +108 -0
- package/dist/cjs/components/segment-control/style.less +154 -0
- package/dist/cjs/components/stepper-range/index.d.ts +1 -0
- package/dist/cjs/components/stepper-range/index.js +35 -0
- package/dist/cjs/components/stepper-range/stepper-range.d.ts +19 -0
- package/dist/cjs/components/stepper-range/stepper-range.js +103 -0
- package/dist/cjs/components/styles/global.less +3 -0
- package/dist/cjs/components/styles/variable.less +2 -0
- package/dist/cjs/components/tabbar-layout/context.d.ts +10 -0
- package/dist/cjs/components/tabbar-layout/context.js +35 -0
- package/dist/cjs/components/tabbar-layout/index.d.ts +5 -0
- package/dist/cjs/components/tabbar-layout/index.js +39 -0
- package/dist/cjs/components/tabbar-layout/style.less +21 -0
- package/dist/cjs/components/tabbar-layout/tabbar-layout.d.ts +17 -0
- package/dist/cjs/components/tabbar-layout/tabbar-layout.js +101 -0
- package/dist/cjs/components/table/index.d.ts +4 -0
- package/dist/cjs/components/table/index.js +27 -0
- package/dist/cjs/components/table/table.d.ts +4 -0
- package/dist/cjs/components/table/table.js +154 -0
- package/dist/cjs/components/table/table.less +101 -0
- package/dist/cjs/components/table/types.d.ts +20 -0
- package/dist/cjs/components/table/types.js +17 -0
- package/dist/cjs/components/toast/index.d.ts +2 -0
- package/dist/cjs/components/toast/index.js +36 -0
- package/dist/cjs/components/toast/toast.d.ts +13 -0
- package/dist/cjs/components/toast/toast.js +36 -0
- package/dist/cjs/components/tree/DirectoryTree.d.ts +21 -0
- package/dist/cjs/components/tree/DirectoryTree.js +176 -0
- package/dist/cjs/components/tree/demo/data.d.ts +6 -0
- package/dist/cjs/components/tree/demo/data.js +53 -0
- package/dist/cjs/components/tree/demo/demo.d.ts +3 -0
- package/dist/cjs/components/tree/demo/demo.js +47 -0
- package/dist/cjs/components/tree/demo/demo1.d.ts +3 -0
- package/dist/cjs/components/tree/demo/demo1.js +64 -0
- package/dist/cjs/components/tree/demo/demo2.d.ts +3 -0
- package/dist/cjs/components/tree/demo/demo2.js +49 -0
- package/dist/cjs/components/tree/demo/demo3.d.ts +3 -0
- package/dist/cjs/components/tree/demo/demo3.js +99 -0
- package/dist/cjs/components/tree/index.d.ts +5 -0
- package/dist/cjs/components/tree/index.js +37 -0
- package/dist/cjs/components/tree/style/checkbox/index.d.ts +2 -0
- package/dist/cjs/components/tree/style/checkbox/index.js +3 -0
- package/dist/cjs/components/tree/style/checkbox/index.less +6 -0
- package/dist/cjs/components/tree/style/checkbox/mixin.less +272 -0
- package/dist/cjs/components/tree/style/checkbox/rtl.less +29 -0
- package/dist/cjs/components/tree/style/common/mixins.less +11 -0
- package/dist/cjs/components/tree/style/index.less +354 -0
- package/dist/cjs/components/tree/style/rtl.less +70 -0
- package/dist/cjs/components/tree/tree.d.ts +93 -0
- package/dist/cjs/components/tree/tree.js +198 -0
- package/dist/cjs/components/tree/utils/dictUtil.d.ts +9 -0
- package/dist/cjs/components/tree/utils/dictUtil.js +91 -0
- package/dist/cjs/components/tree/utils/dropIndicator.d.ts +9 -0
- package/dist/cjs/components/tree/utils/dropIndicator.js +69 -0
- package/dist/cjs/components/tree/utils/iconUtil.d.ts +6 -0
- package/dist/cjs/components/tree/utils/iconUtil.js +75 -0
- package/dist/cjs/components/tree/utils/motion.d.ts +8 -0
- package/dist/cjs/components/tree/utils/motion.js +76 -0
- package/dist/cjs/components/tree/utils/reactNode.d.ts +8 -0
- package/dist/cjs/components/tree/utils/reactNode.js +61 -0
- package/dist/cjs/components/tree/utils/type.d.ts +9 -0
- package/dist/cjs/components/tree/utils/type.js +32 -0
- package/dist/cjs/components/tree-picker/index.d.ts +15 -0
- package/dist/cjs/components/tree-picker/index.js +41 -0
- package/dist/cjs/components/tree-picker/prompt.d.ts +3 -0
- package/dist/cjs/components/tree-picker/prompt.js +39 -0
- package/dist/cjs/components/tree-picker/tree-picker.d.ts +23 -0
- package/dist/cjs/components/tree-picker/tree-picker.js +136 -0
- package/dist/cjs/components/tree-picker/tree-picker.less +14 -0
- package/dist/cjs/components/utils/format-url.d.ts +2 -0
- package/dist/cjs/components/utils/format-url.js +34 -0
- package/dist/cjs/components/utils/object-assign-append.d.ts +1 -0
- package/dist/cjs/components/utils/object-assign-append.js +39 -0
- package/dist/cjs/hooks/index.d.ts +1 -0
- package/dist/cjs/hooks/index.js +39 -0
- package/dist/cjs/hooks/use-render-imperatively/index.d.ts +4 -0
- package/dist/cjs/hooks/use-render-imperatively/index.js +48 -0
- package/dist/cjs/index.d.ts +5 -0
- package/dist/cjs/index.js +29 -0
- package/dist/cjs/locales/base.d.ts +281 -0
- package/dist/cjs/locales/base.js +174 -0
- package/dist/cjs/locales/en-US.d.ts +279 -0
- package/dist/cjs/locales/en-US.js +38 -0
- package/dist/cjs/locales/zh-CN.d.ts +3 -0
- package/dist/cjs/locales/zh-CN.js +178 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/service/approve-outline.d.ts +89 -0
- package/dist/cjs/types/service/bpm.d.ts +241 -0
- package/dist/cjs/types/service/common.d.ts +90 -0
- package/dist/cjs/utils/attachment-utils.d.ts +15 -0
- package/dist/cjs/utils/attachment-utils.js +103 -0
- package/dist/cjs/utils/bem.d.ts +16 -0
- package/dist/cjs/utils/bem.js +30 -0
- package/dist/cjs/utils/dev-log.d.ts +3 -0
- package/dist/cjs/utils/dev-log.js +65 -0
- package/dist/cjs/utils/forward-ref-with-generics.d.ts +2 -0
- package/dist/cjs/utils/forward-ref-with-generics.js +28 -0
- package/dist/cjs/utils/is-dev.d.ts +1 -0
- package/dist/cjs/utils/is-dev.js +29 -0
- package/dist/cjs/utils/remote-data-props.d.ts +53 -0
- package/dist/cjs/utils/remote-data-props.js +67 -0
- package/dist/cjs/utils/worker.d.ts +2 -0
- package/dist/cjs/utils/worker.js +58 -0
- package/dist/es/assets/file/excel.png +0 -0
- package/dist/es/assets/file/fileLoading.png +0 -0
- package/dist/es/assets/file/jpg.png +0 -0
- package/dist/es/assets/file/music.png +0 -0
- package/dist/es/assets/file/pdf.png +0 -0
- package/dist/es/assets/file/ppt.png +0 -0
- package/dist/es/assets/file/txt.png +0 -0
- package/dist/es/assets/file/video.png +0 -0
- package/dist/es/assets/file/weizhi.png +0 -0
- package/dist/es/assets/file/wenjiajia.png +0 -0
- package/dist/es/assets/file/word.png +0 -0
- package/dist/es/assets/file/yasuo.png +0 -0
- package/dist/es/components/action-sheet/index.d.ts +12 -0
- package/dist/es/components/action-sheet/index.js +7 -0
- package/dist/es/components/action-sheet/promt.d.ts +25 -0
- package/dist/es/components/action-sheet/promt.js +60 -0
- package/dist/es/components/action-sheet-picker/index.d.ts +3 -0
- package/dist/es/components/action-sheet-picker/index.js +2 -0
- package/dist/es/components/action-sheet-picker/picker.d.ts +30 -0
- package/dist/es/components/action-sheet-picker/picker.js +107 -0
- package/dist/es/components/bar-code/bar-code.d.ts +26 -0
- package/dist/es/components/bar-code/bar-code.js +97 -0
- package/dist/es/components/bar-code/index.d.ts +3 -0
- package/dist/es/components/bar-code/index.js +3 -0
- package/dist/es/components/card/card.d.ts +9 -0
- package/dist/es/components/card/card.js +40 -0
- package/dist/es/components/card/card.less +32 -0
- package/dist/es/components/card/index.d.ts +4 -0
- package/dist/es/components/card/index.js +3 -0
- package/dist/es/components/card-tabs/index.d.ts +4 -0
- package/dist/es/components/card-tabs/index.js +3 -0
- package/dist/es/components/card-tabs/style.less +54 -0
- package/dist/es/components/card-tabs/tabs.d.ts +22 -0
- package/dist/es/components/card-tabs/tabs.js +56 -0
- package/dist/es/components/checkbox/checkbox-group.d.ts +15 -0
- package/dist/es/components/checkbox/checkbox-group.js +45 -0
- package/dist/es/components/checkbox/checkbox.d.ts +26 -0
- package/dist/es/components/checkbox/checkbox.js +38 -0
- package/dist/es/components/checkbox/indeterminate-square-icon.d.ts +3 -0
- package/dist/es/components/checkbox/indeterminate-square-icon.js +22 -0
- package/dist/es/components/checkbox/index.d.ts +26 -0
- package/dist/es/components/checkbox/index.js +7 -0
- package/dist/es/components/checkbox/style.less +39 -0
- package/dist/es/components/config-provider/elements-holder.d.ts +7 -0
- package/dist/es/components/config-provider/elements-holder.js +44 -0
- package/dist/es/components/config-provider/index.d.ts +9 -0
- package/dist/es/components/config-provider/index.js +8 -0
- package/dist/es/components/config-provider/provider.d.ts +35 -0
- package/dist/es/components/config-provider/provider.js +38 -0
- package/dist/es/components/config-provider/use-imperatively-renderer.d.ts +11 -0
- package/dist/es/components/config-provider/use-imperatively-renderer.js +85 -0
- package/dist/es/components/config-provider/use-prompt.d.ts +12 -0
- package/dist/es/components/config-provider/use-prompt.js +58 -0
- package/dist/es/components/container/Container.d.ts +7 -0
- package/dist/es/components/container/Container.js +21 -0
- package/dist/es/components/container/index.d.ts +3 -0
- package/dist/es/components/container/index.js +2 -0
- package/dist/es/components/date-picker/date-picker.d.ts +26 -0
- package/dist/es/components/date-picker/date-picker.js +115 -0
- package/dist/es/components/date-picker/date-range-picker.d.ts +11 -0
- package/dist/es/components/date-picker/date-range-picker.js +139 -0
- package/dist/es/components/date-picker/helper.d.ts +6 -0
- package/dist/es/components/date-picker/helper.js +41 -0
- package/dist/es/components/date-picker/index.d.ts +8 -0
- package/dist/es/components/date-picker/index.js +7 -0
- package/dist/es/components/date-picker/style.less +24 -0
- package/dist/es/components/descriptions/descriptions.d.ts +17 -0
- package/dist/es/components/descriptions/descriptions.js +75 -0
- package/dist/es/components/descriptions/index.d.ts +4 -0
- package/dist/es/components/descriptions/index.js +3 -0
- package/dist/es/components/descriptions/style.less +49 -0
- package/dist/es/components/dropdown-menu/dropdown-menu.d.ts +29 -0
- package/dist/es/components/dropdown-menu/dropdown-menu.js +85 -0
- package/dist/es/components/dropdown-menu/index.d.ts +4 -0
- package/dist/es/components/dropdown-menu/index.js +3 -0
- package/dist/es/components/dropdown-menu/style.less +18 -0
- package/dist/es/components/error-block/error-block.d.ts +7 -0
- package/dist/es/components/error-block/error-block.js +20 -0
- package/dist/es/components/error-block/images/index.d.ts +1 -0
- package/dist/es/components/error-block/images/index.js +1 -0
- package/dist/es/components/error-block/index.d.ts +4 -0
- package/dist/es/components/error-block/index.js +4 -0
- package/dist/es/components/grid-menu/grid-menu-item.d.ts +10 -0
- package/dist/es/components/grid-menu/grid-menu-item.js +71 -0
- package/dist/es/components/grid-menu/grid-menu.d.ts +15 -0
- package/dist/es/components/grid-menu/grid-menu.js +45 -0
- package/dist/es/components/grid-menu/index.d.ts +8 -0
- package/dist/es/components/grid-menu/index.js +7 -0
- package/dist/es/components/grid-menu/style.less +63 -0
- package/dist/es/components/index.d.ts +33 -0
- package/dist/es/components/index.js +33 -0
- package/dist/es/components/input-captcha/index.d.ts +4 -0
- package/dist/es/components/input-captcha/index.js +3 -0
- package/dist/es/components/input-captcha/input-captcha.d.ts +40 -0
- package/dist/es/components/input-captcha/input-captcha.js +123 -0
- package/dist/es/components/input-captcha/style.less +12 -0
- package/dist/es/components/input-number/index.d.ts +8 -0
- package/dist/es/components/input-number/index.js +7 -0
- package/dist/es/components/input-number/input-money.d.ts +7 -0
- package/dist/es/components/input-number/input-money.js +52 -0
- package/dist/es/components/input-number/input-number.d.ts +38 -0
- package/dist/es/components/input-number/input-number.js +261 -0
- package/dist/es/components/input-number/input-number.less +62 -0
- package/dist/es/components/input-password/index.d.ts +4 -0
- package/dist/es/components/input-password/index.js +3 -0
- package/dist/es/components/input-password/input-password.d.ts +12 -0
- package/dist/es/components/input-password/input-password.js +66 -0
- package/dist/es/components/input-password/style.less +13 -0
- package/dist/es/components/money/index.d.ts +4 -0
- package/dist/es/components/money/index.js +3 -0
- package/dist/es/components/money/money.d.ts +18 -0
- package/dist/es/components/money/money.js +90 -0
- package/dist/es/components/money/money.less +64 -0
- package/dist/es/components/page/body.d.ts +19 -0
- package/dist/es/components/page/body.js +64 -0
- package/dist/es/components/page/footer.d.ts +16 -0
- package/dist/es/components/page/footer.js +45 -0
- package/dist/es/components/page/index.d.ts +27 -0
- package/dist/es/components/page/index.js +26 -0
- package/dist/es/components/page/page-context.d.ts +20 -0
- package/dist/es/components/page/page-context.js +53 -0
- package/dist/es/components/page/page.d.ts +19 -0
- package/dist/es/components/page/page.js +149 -0
- package/dist/es/components/page/page.less +79 -0
- package/dist/es/components/page/toolbar.d.ts +7 -0
- package/dist/es/components/page/toolbar.js +20 -0
- package/dist/es/components/picker-toolbar/index.d.ts +4 -0
- package/dist/es/components/picker-toolbar/index.js +3 -0
- package/dist/es/components/picker-toolbar/picker-toolbar.d.ts +15 -0
- package/dist/es/components/picker-toolbar/picker-toolbar.js +120 -0
- package/dist/es/components/picker-toolbar/style.less +57 -0
- package/dist/es/components/popup-page/default-action-footer.d.ts +10 -0
- package/dist/es/components/popup-page/default-action-footer.js +50 -0
- package/dist/es/components/popup-page/index.d.ts +8 -0
- package/dist/es/components/popup-page/index.js +7 -0
- package/dist/es/components/popup-page/popup-page.d.ts +10 -0
- package/dist/es/components/popup-page/popup-page.js +61 -0
- package/dist/es/components/popup-page/style.less +21 -0
- package/dist/es/components/popup-picker-base/index.d.ts +6 -0
- package/dist/es/components/popup-picker-base/index.js +5 -0
- package/dist/es/components/popup-picker-base/popup-picker-base.d.ts +36 -0
- package/dist/es/components/popup-picker-base/popup-picker-base.js +136 -0
- package/dist/es/components/popup-picker-base/prompt.d.ts +4 -0
- package/dist/es/components/popup-picker-base/prompt.js +48 -0
- package/dist/es/components/popup-picker-base/style.less +11 -0
- package/dist/es/components/popup-picker-base/use-popup-picker-mixin.d.ts +73 -0
- package/dist/es/components/popup-picker-base/use-popup-picker-mixin.js +152 -0
- package/dist/es/components/pro-calendar-picker/index.d.ts +3 -0
- package/dist/es/components/pro-calendar-picker/index.js +2 -0
- package/dist/es/components/pro-calendar-picker/picker.d.ts +25 -0
- package/dist/es/components/pro-calendar-picker/picker.js +168 -0
- package/dist/es/components/pro-form/default-submitter.d.ts +13 -0
- package/dist/es/components/pro-form/default-submitter.js +60 -0
- package/dist/es/components/pro-form/index.d.ts +24 -0
- package/dist/es/components/pro-form/index.js +22 -0
- package/dist/es/components/pro-form/pro-field-context.d.ts +8 -0
- package/dist/es/components/pro-form/pro-field-context.js +3 -0
- package/dist/es/components/pro-form/pro-form-context.d.ts +8 -0
- package/dist/es/components/pro-form/pro-form-context.js +3 -0
- package/dist/es/components/pro-form/pro-form-item-action-sheet.d.ts +7 -0
- package/dist/es/components/pro-form/pro-form-item-action-sheet.js +51 -0
- package/dist/es/components/pro-form/pro-form-item-calendar-picker.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-calendar-picker.js +49 -0
- package/dist/es/components/pro-form/pro-form-item-cascader.d.ts +7 -0
- package/dist/es/components/pro-form/pro-form-item-cascader.js +57 -0
- package/dist/es/components/pro-form/pro-form-item-checkbox.d.ts +11 -0
- package/dist/es/components/pro-form/pro-form-item-checkbox.js +77 -0
- package/dist/es/components/pro-form/pro-form-item-date-picker.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-date-picker.js +45 -0
- package/dist/es/components/pro-form/pro-form-item-date-range-picker.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-date-range-picker.js +34 -0
- package/dist/es/components/pro-form/pro-form-item-dependency.d.ts +11 -0
- package/dist/es/components/pro-form/pro-form-item-dependency.js +35 -0
- package/dist/es/components/pro-form/pro-form-item-input-captcha.d.ts +12 -0
- package/dist/es/components/pro-form/pro-form-item-input-captcha.js +53 -0
- package/dist/es/components/pro-form/pro-form-item-input-money.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-input-money.js +43 -0
- package/dist/es/components/pro-form/pro-form-item-input-number.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-input-number.js +44 -0
- package/dist/es/components/pro-form/pro-form-item-input-password.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-input-password.js +36 -0
- package/dist/es/components/pro-form/pro-form-item-input.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-input.js +38 -0
- package/dist/es/components/pro-form/pro-form-item-list-picker.d.ts +15 -0
- package/dist/es/components/pro-form/pro-form-item-list-picker.js +89 -0
- package/dist/es/components/pro-form/pro-form-item-picker.d.ts +10 -0
- package/dist/es/components/pro-form/pro-form-item-picker.js +57 -0
- package/dist/es/components/pro-form/pro-form-item-radio.d.ts +9 -0
- package/dist/es/components/pro-form/pro-form-item-radio.js +56 -0
- package/dist/es/components/pro-form/pro-form-item-selector.d.ts +7 -0
- package/dist/es/components/pro-form/pro-form-item-selector.js +40 -0
- package/dist/es/components/pro-form/pro-form-item-slider.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-slider.js +30 -0
- package/dist/es/components/pro-form/pro-form-item-stepper.d.ts +12 -0
- package/dist/es/components/pro-form/pro-form-item-stepper.js +69 -0
- package/dist/es/components/pro-form/pro-form-item-switch.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-switch.js +21 -0
- package/dist/es/components/pro-form/pro-form-item-textarea.d.ts +6 -0
- package/dist/es/components/pro-form/pro-form-item-textarea.js +42 -0
- package/dist/es/components/pro-form/pro-form-item-tree-picker.d.ts +7 -0
- package/dist/es/components/pro-form/pro-form-item-tree-picker.js +49 -0
- package/dist/es/components/pro-form/pro-form-item.d.ts +47 -0
- package/dist/es/components/pro-form/pro-form-item.js +74 -0
- package/dist/es/components/pro-form/pro-form.d.ts +29 -0
- package/dist/es/components/pro-form/pro-form.js +234 -0
- package/dist/es/components/pro-form/style.less +26 -0
- package/dist/es/components/pro-form/types.d.ts +87 -0
- package/dist/es/components/pro-form/types.js +1 -0
- package/dist/es/components/pro-form/use-form-instance.d.ts +2 -0
- package/dist/es/components/pro-form/use-form-instance.js +5 -0
- package/dist/es/components/pro-form/utils.d.ts +22 -0
- package/dist/es/components/pro-form/utils.js +127 -0
- package/dist/es/components/pro-list/helper.d.ts +3 -0
- package/dist/es/components/pro-list/helper.js +4 -0
- package/dist/es/components/pro-list/index.d.ts +4 -0
- package/dist/es/components/pro-list/index.js +3 -0
- package/dist/es/components/pro-list/pagination-toolbar.d.ts +13 -0
- package/dist/es/components/pro-list/pagination-toolbar.js +48 -0
- package/dist/es/components/pro-list/pro-list.d.ts +155 -0
- package/dist/es/components/pro-list/pro-list.js +825 -0
- package/dist/es/components/pro-list/pro-list.less +80 -0
- package/dist/es/components/pro-list/selected-rows-summary.d.ts +14 -0
- package/dist/es/components/pro-list/selected-rows-summary.js +142 -0
- package/dist/es/components/pro-list-picker/index.d.ts +8 -0
- package/dist/es/components/pro-list-picker/index.js +7 -0
- package/dist/es/components/pro-list-picker/list-picker-utils.d.ts +1 -0
- package/dist/es/components/pro-list-picker/list-picker-utils.js +3 -0
- package/dist/es/components/pro-list-picker/list-picker.d.ts +30 -0
- package/dist/es/components/pro-list-picker/list-picker.js +126 -0
- package/dist/es/components/pro-list-picker/list-picker.less +27 -0
- package/dist/es/components/pro-list-picker/prompt.d.ts +3 -0
- package/dist/es/components/pro-list-picker/prompt.js +5 -0
- package/dist/es/components/qr-code/index.d.ts +3 -0
- package/dist/es/components/qr-code/index.js +2 -0
- package/dist/es/components/qr-code/qr-code.d.ts +32 -0
- package/dist/es/components/qr-code/qr-code.js +30 -0
- package/dist/es/components/segment-control/index.d.ts +4 -0
- package/dist/es/components/segment-control/index.js +3 -0
- package/dist/es/components/segment-control/segment.d.ts +25 -0
- package/dist/es/components/segment-control/segment.js +87 -0
- package/dist/es/components/segment-control/style.less +154 -0
- package/dist/es/components/stepper-range/index.d.ts +1 -0
- package/dist/es/components/stepper-range/index.js +1 -0
- package/dist/es/components/stepper-range/stepper-range.d.ts +19 -0
- package/dist/es/components/stepper-range/stepper-range.js +97 -0
- package/dist/es/components/styles/global.less +3 -0
- package/dist/es/components/styles/variable.less +2 -0
- package/dist/es/components/tabbar-layout/context.d.ts +10 -0
- package/dist/es/components/tabbar-layout/context.js +7 -0
- package/dist/es/components/tabbar-layout/index.d.ts +5 -0
- package/dist/es/components/tabbar-layout/index.js +3 -0
- package/dist/es/components/tabbar-layout/style.less +21 -0
- package/dist/es/components/tabbar-layout/tabbar-layout.d.ts +17 -0
- package/dist/es/components/tabbar-layout/tabbar-layout.js +81 -0
- package/dist/es/components/table/index.d.ts +4 -0
- package/dist/es/components/table/index.js +3 -0
- package/dist/es/components/table/table.d.ts +4 -0
- package/dist/es/components/table/table.js +131 -0
- package/dist/es/components/table/table.less +101 -0
- package/dist/es/components/table/types.d.ts +20 -0
- package/dist/es/components/table/types.js +1 -0
- package/dist/es/components/toast/index.d.ts +2 -0
- package/dist/es/components/toast/index.js +2 -0
- package/dist/es/components/toast/toast.d.ts +13 -0
- package/dist/es/components/toast/toast.js +18 -0
- package/dist/es/components/tree/DirectoryTree.d.ts +21 -0
- package/dist/es/components/tree/DirectoryTree.js +159 -0
- package/dist/es/components/tree/demo/data.d.ts +6 -0
- package/dist/es/components/tree/demo/data.js +29 -0
- package/dist/es/components/tree/demo/demo.d.ts +3 -0
- package/dist/es/components/tree/demo/demo.js +22 -0
- package/dist/es/components/tree/demo/demo1.d.ts +3 -0
- package/dist/es/components/tree/demo/demo1.js +49 -0
- package/dist/es/components/tree/demo/demo2.d.ts +3 -0
- package/dist/es/components/tree/demo/demo2.js +27 -0
- package/dist/es/components/tree/demo/demo3.d.ts +3 -0
- package/dist/es/components/tree/demo/demo3.js +79 -0
- package/dist/es/components/tree/index.d.ts +5 -0
- package/dist/es/components/tree/index.js +3 -0
- package/dist/es/components/tree/style/checkbox/index.d.ts +2 -0
- package/dist/es/components/tree/style/checkbox/index.js +3 -0
- package/dist/es/components/tree/style/checkbox/index.less +6 -0
- package/dist/es/components/tree/style/checkbox/mixin.less +272 -0
- package/dist/es/components/tree/style/checkbox/rtl.less +29 -0
- package/dist/es/components/tree/style/common/mixins.less +11 -0
- package/dist/es/components/tree/style/index.less +354 -0
- package/dist/es/components/tree/style/rtl.less +70 -0
- package/dist/es/components/tree/tree.d.ts +93 -0
- package/dist/es/components/tree/tree.js +197 -0
- package/dist/es/components/tree/utils/dictUtil.d.ts +9 -0
- package/dist/es/components/tree/utils/dictUtil.js +77 -0
- package/dist/es/components/tree/utils/dropIndicator.d.ts +9 -0
- package/dist/es/components/tree/utils/dropIndicator.js +32 -0
- package/dist/es/components/tree/utils/iconUtil.d.ts +6 -0
- package/dist/es/components/tree/utils/iconUtil.js +59 -0
- package/dist/es/components/tree/utils/motion.d.ts +8 -0
- package/dist/es/components/tree/utils/motion.js +52 -0
- package/dist/es/components/tree/utils/reactNode.d.ts +8 -0
- package/dist/es/components/tree/utils/reactNode.js +15 -0
- package/dist/es/components/tree/utils/type.d.ts +9 -0
- package/dist/es/components/tree/utils/type.js +20 -0
- package/dist/es/components/tree-picker/index.d.ts +15 -0
- package/dist/es/components/tree-picker/index.js +7 -0
- package/dist/es/components/tree-picker/prompt.d.ts +3 -0
- package/dist/es/components/tree-picker/prompt.js +5 -0
- package/dist/es/components/tree-picker/tree-picker.d.ts +23 -0
- package/dist/es/components/tree-picker/tree-picker.js +110 -0
- package/dist/es/components/tree-picker/tree-picker.less +14 -0
- package/dist/es/components/utils/format-url.d.ts +2 -0
- package/dist/es/components/utils/format-url.js +10 -0
- package/dist/es/components/utils/object-assign-append.d.ts +1 -0
- package/dist/es/components/utils/object-assign-append.js +12 -0
- package/dist/es/hooks/index.d.ts +1 -0
- package/dist/es/hooks/index.js +1 -0
- package/dist/es/hooks/use-render-imperatively/index.d.ts +4 -0
- package/dist/es/hooks/use-render-imperatively/index.js +21 -0
- package/dist/es/index.d.ts +5 -0
- package/dist/es/index.js +6 -0
- package/dist/es/locales/base.d.ts +281 -0
- package/dist/es/locales/base.js +145 -0
- package/dist/es/locales/en-US.d.ts +279 -0
- package/dist/es/locales/en-US.js +4 -0
- package/dist/es/locales/zh-CN.d.ts +3 -0
- package/dist/es/locales/zh-CN.js +144 -0
- package/dist/es/types/index.d.ts +2 -0
- package/dist/es/types/service/approve-outline.d.ts +89 -0
- package/dist/es/types/service/bpm.d.ts +241 -0
- package/dist/es/types/service/common.d.ts +90 -0
- package/dist/es/utils/attachment-utils.d.ts +15 -0
- package/dist/es/utils/attachment-utils.js +75 -0
- package/dist/es/utils/bem.d.ts +16 -0
- package/dist/es/utils/bem.js +22 -0
- package/dist/es/utils/dev-log.d.ts +3 -0
- package/dist/es/utils/dev-log.js +36 -0
- package/dist/es/utils/forward-ref-with-generics.d.ts +2 -0
- package/dist/es/utils/forward-ref-with-generics.js +6 -0
- package/dist/es/utils/is-dev.d.ts +1 -0
- package/dist/es/utils/is-dev.js +1 -0
- package/dist/es/utils/remote-data-props.d.ts +53 -0
- package/dist/es/utils/remote-data-props.js +88 -0
- package/dist/es/utils/worker.d.ts +2 -0
- package/dist/es/utils/worker.js +1 -0
- package/dist/umd/antd-mobile-pro.min.css +1 -0
- package/dist/umd/antd-mobile-pro.min.js +1 -0
- package/package.json +107 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pro-form/pro-form.tsx
|
|
30
|
+
var pro_form_exports = {};
|
|
31
|
+
__export(pro_form_exports, {
|
|
32
|
+
default: () => pro_form_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pro_form_exports);
|
|
35
|
+
var import_antd_mobile = require("antd-mobile");
|
|
36
|
+
var import_ahooks = require("ahooks");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_rc_util = require("rc-util");
|
|
39
|
+
var import_react = require("react");
|
|
40
|
+
var import_bem = require("../../utils/bem");
|
|
41
|
+
var import_default_submitter = __toESM(require("./default-submitter"));
|
|
42
|
+
var import_pro_field_context = __toESM(require("./pro-field-context"));
|
|
43
|
+
var import_pro_form_context = __toESM(require("./pro-form-context"));
|
|
44
|
+
var import_pro_form_item = __toESM(require("./pro-form-item"));
|
|
45
|
+
var import_use_form_instance = require("./use-form-instance");
|
|
46
|
+
var import_utils = require("./utils");
|
|
47
|
+
var covertFormName = (name) => {
|
|
48
|
+
if (!name)
|
|
49
|
+
return name;
|
|
50
|
+
if (Array.isArray(name))
|
|
51
|
+
return name;
|
|
52
|
+
return [name];
|
|
53
|
+
};
|
|
54
|
+
var bem = (0, import_bem.cn)("pro-form");
|
|
55
|
+
function ProForm({
|
|
56
|
+
onFinish,
|
|
57
|
+
params,
|
|
58
|
+
request,
|
|
59
|
+
initialValues,
|
|
60
|
+
disabled,
|
|
61
|
+
form: formProp,
|
|
62
|
+
formRef,
|
|
63
|
+
submitter,
|
|
64
|
+
// antd form props
|
|
65
|
+
layout,
|
|
66
|
+
className,
|
|
67
|
+
// pro-form-context
|
|
68
|
+
childElementPosition,
|
|
69
|
+
readonly,
|
|
70
|
+
// others
|
|
71
|
+
...props
|
|
72
|
+
}) {
|
|
73
|
+
const [submitting, setSubmitting] = (0, import_react.useState)(false);
|
|
74
|
+
const { data: initialData } = (0, import_ahooks.useRequest)(
|
|
75
|
+
async () => {
|
|
76
|
+
return await (request == null ? void 0 : request(params)) ?? {};
|
|
77
|
+
},
|
|
78
|
+
{ refreshDeps: [] }
|
|
79
|
+
);
|
|
80
|
+
const [form] = import_antd_mobile.Form.useForm(formProp);
|
|
81
|
+
const transformRefs = (0, import_react.useRef)({});
|
|
82
|
+
const formValues = (0, import_react.useMemo)(
|
|
83
|
+
() => ({
|
|
84
|
+
getFieldsFormatValue(nameList, omitNil) {
|
|
85
|
+
return (0, import_utils.transformKey)(
|
|
86
|
+
!nameList ? form.getFieldsValue() : form.getFieldsValue(nameList),
|
|
87
|
+
transformRefs.current,
|
|
88
|
+
{ omitNil }
|
|
89
|
+
);
|
|
90
|
+
},
|
|
91
|
+
getFieldFormatValue(paramsNameList, omitNil) {
|
|
92
|
+
const nameList = covertFormName(paramsNameList);
|
|
93
|
+
if (!nameList)
|
|
94
|
+
throw new Error("nameList is require");
|
|
95
|
+
const value = form.getFieldValue(nameList);
|
|
96
|
+
const obj = nameList ? (0, import_rc_util.set)({}, nameList, value) : value;
|
|
97
|
+
return (0, import_utils.transformKey)(obj, transformRefs.current, {
|
|
98
|
+
omitNil,
|
|
99
|
+
keyPath: nameList
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
getFieldFormatValueObject(paramsNameList, omitNil) {
|
|
103
|
+
const nameList = covertFormName(paramsNameList);
|
|
104
|
+
if (!nameList)
|
|
105
|
+
throw new Error("nameList is require");
|
|
106
|
+
const value = form.getFieldValue(nameList);
|
|
107
|
+
const obj = nameList ? (0, import_rc_util.set)({}, nameList, value) : value;
|
|
108
|
+
return (0, import_utils.transformKey)(obj, transformRefs.current, {
|
|
109
|
+
keyPath: nameList,
|
|
110
|
+
omitNil
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
async validateFieldsReturnFormatValue(nameList) {
|
|
114
|
+
if (!Array.isArray(nameList) && nameList)
|
|
115
|
+
throw new Error("nameList must be array");
|
|
116
|
+
const values = await form.validateFields(nameList);
|
|
117
|
+
const transformedKey = (0, import_utils.transformKey)(values, transformRefs.current);
|
|
118
|
+
return transformedKey ? transformedKey : {};
|
|
119
|
+
}
|
|
120
|
+
}),
|
|
121
|
+
[form]
|
|
122
|
+
);
|
|
123
|
+
const childElementPositionValue = (0, import_react.useMemo)(
|
|
124
|
+
() => childElementPosition || (layout === "horizontal" ? "right" : void 0),
|
|
125
|
+
[childElementPosition, layout]
|
|
126
|
+
);
|
|
127
|
+
(0, import_react.useImperativeHandle)(formRef, () => ({
|
|
128
|
+
...form,
|
|
129
|
+
...formValues
|
|
130
|
+
}));
|
|
131
|
+
return !initialData && request ? /* @__PURE__ */ React.createElement("div", { style: { paddingTop: 50, paddingBottom: 50, textAlign: "center" } }, /* @__PURE__ */ React.createElement(import_antd_mobile.SpinLoading, { style: { margin: "auto" } })) : /* @__PURE__ */ React.createElement(
|
|
132
|
+
import_pro_field_context.default.Provider,
|
|
133
|
+
{
|
|
134
|
+
value: {
|
|
135
|
+
setFieldValueType(name, transform) {
|
|
136
|
+
const nameStr = Array.isArray(name) ? name.join(".") : name;
|
|
137
|
+
if (!nameStr)
|
|
138
|
+
return;
|
|
139
|
+
if (!transform)
|
|
140
|
+
delete transformRefs.current[nameStr];
|
|
141
|
+
else
|
|
142
|
+
transformRefs.current[nameStr] = transform;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
/* @__PURE__ */ React.createElement(
|
|
147
|
+
import_pro_form_context.default.Provider,
|
|
148
|
+
{
|
|
149
|
+
value: {
|
|
150
|
+
childElementPosition: childElementPositionValue,
|
|
151
|
+
readonly
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
/* @__PURE__ */ React.createElement(
|
|
155
|
+
import_antd_mobile.Form,
|
|
156
|
+
{
|
|
157
|
+
initialValues: { ...initialValues, ...initialData },
|
|
158
|
+
disabled,
|
|
159
|
+
form,
|
|
160
|
+
layout,
|
|
161
|
+
className: (0, import_classnames.default)(
|
|
162
|
+
bem({
|
|
163
|
+
child: childElementPositionValue
|
|
164
|
+
}),
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
onFinish: async (values) => {
|
|
168
|
+
if (!onFinish)
|
|
169
|
+
return;
|
|
170
|
+
if (submitting)
|
|
171
|
+
return;
|
|
172
|
+
setSubmitting(true);
|
|
173
|
+
try {
|
|
174
|
+
const nextValues = (0, import_utils.transformKey)(values, transformRefs.current);
|
|
175
|
+
await (onFinish == null ? void 0 : onFinish(nextValues));
|
|
176
|
+
} catch (e) {
|
|
177
|
+
console.log(e);
|
|
178
|
+
}
|
|
179
|
+
setSubmitting(false);
|
|
180
|
+
},
|
|
181
|
+
footer: submitter !== false && !readonly && /* @__PURE__ */ React.createElement(
|
|
182
|
+
import_default_submitter.default,
|
|
183
|
+
{
|
|
184
|
+
...submitter,
|
|
185
|
+
loading: submitting,
|
|
186
|
+
disabled
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
...props
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
)
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
ProForm.useForm = import_antd_mobile.Form.useForm;
|
|
196
|
+
ProForm.useWatch = import_antd_mobile.Form.useWatch;
|
|
197
|
+
ProForm.Header = import_antd_mobile.Form.Header;
|
|
198
|
+
ProForm.Item = import_pro_form_item.default;
|
|
199
|
+
ProForm.Subscribe = import_antd_mobile.Form.Subscribe;
|
|
200
|
+
ProForm.useFormInstance = import_use_form_instance.useFormInstace;
|
|
201
|
+
var pro_form_default = ProForm;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@class-prefix-form: ~'suid-pro-form';
|
|
2
|
+
|
|
3
|
+
.@{class-prefix-form} {
|
|
4
|
+
&--child--right {
|
|
5
|
+
.adm-form-item-feedback-error {
|
|
6
|
+
text-align: right;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
&-value {
|
|
10
|
+
--placeholder-color: var(--adm-color-light);
|
|
11
|
+
|
|
12
|
+
&--placeholder {
|
|
13
|
+
color: var(--placeholder-color);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.adm-list-item-content-main {
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
.adm-form-item-child.adm-form-item-child-position-right {
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
& > .adm-form-item-child-inner {
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
word-break: break-all;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormInstance as RcFormInstance } from 'rc-field-form';
|
|
3
|
+
import { NamePath } from 'rc-field-form/lib/interface';
|
|
4
|
+
export type RequestOptionsType = {
|
|
5
|
+
/**
|
|
6
|
+
* 选项的文本内容,可以是一个 React 组件。
|
|
7
|
+
*/
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* 选项的值,可以是一个字符串或数字类型。
|
|
11
|
+
*/
|
|
12
|
+
value?: string | number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* load remote data props
|
|
16
|
+
*/
|
|
17
|
+
export interface ProFormFieldRemoteProps<U = any, T = RequestOptionsType> {
|
|
18
|
+
options?: T[];
|
|
19
|
+
/**
|
|
20
|
+
* 从服务器请求枚举
|
|
21
|
+
*/
|
|
22
|
+
request?: (params: U, props: any) => Promise<T[]>;
|
|
23
|
+
/**
|
|
24
|
+
* request防抖动时间 默认10 单位ms
|
|
25
|
+
*/
|
|
26
|
+
debounceTime?: number;
|
|
27
|
+
/**
|
|
28
|
+
* 从服务器请求的参数,改变了会触发 reload
|
|
29
|
+
*/
|
|
30
|
+
params?: U;
|
|
31
|
+
swrOption?: {
|
|
32
|
+
/**
|
|
33
|
+
* 请求的唯一标识。相同 cacheKey 的数据全局同步(cacheTime、staleTime 参数会使该机制失效,见示例:数据共享)。
|
|
34
|
+
*/
|
|
35
|
+
cacheKey?: string;
|
|
36
|
+
/**
|
|
37
|
+
* - 设置缓存数据回收时间。默认缓存数据 5 分钟后回收
|
|
38
|
+
* - 如果设置为 -1, 则表示缓存数据永不过期
|
|
39
|
+
*
|
|
40
|
+
* 默认值:300000
|
|
41
|
+
*/
|
|
42
|
+
cacheTime?: number;
|
|
43
|
+
/**
|
|
44
|
+
* - 缓存数据保持新鲜时间。在该时间间隔内,认为数据是新鲜的,不会重新发请求
|
|
45
|
+
* - 如果设置为 -1,则表示数据永远新鲜
|
|
46
|
+
*
|
|
47
|
+
* 默认值:0
|
|
48
|
+
*/
|
|
49
|
+
staleTime?: number;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export type ProFormInstanceType<T> = {
|
|
53
|
+
/**
|
|
54
|
+
* 获取被 ProForm 格式化后的所有数据
|
|
55
|
+
* @param nameList boolean
|
|
56
|
+
* @returns T
|
|
57
|
+
*
|
|
58
|
+
* @example getFieldsFormatValue() ->返回所有数据
|
|
59
|
+
* @example getFieldsFormatValue(true) ->返回所有数据,即使没有被 form 托管的
|
|
60
|
+
*/
|
|
61
|
+
getFieldsFormatValue: (nameList?: true | NamePath[], omitNil?: boolean) => T;
|
|
62
|
+
/**
|
|
63
|
+
* 获取被 ProForm 格式化后的单个数据
|
|
64
|
+
* @param nameList (string|number)[]
|
|
65
|
+
* @returns T
|
|
66
|
+
*
|
|
67
|
+
* @example {a:{b:value}} -> getFieldFormatValue(['a', 'b']) -> value
|
|
68
|
+
*/
|
|
69
|
+
getFieldFormatValue: (nameList?: NamePath, omitNil?: boolean) => T;
|
|
70
|
+
/**
|
|
71
|
+
* 获取被 ProForm 格式化后的单个数据, 包含他的 name
|
|
72
|
+
* @param nameList (string|number)[]
|
|
73
|
+
* @returns T
|
|
74
|
+
*
|
|
75
|
+
* @example {a:{b:value}}->getFieldFormatValueObject(['a','b'])->{a:{b:value}}
|
|
76
|
+
*/
|
|
77
|
+
getFieldFormatValueObject: (nameList?: NamePath, omitNil?: boolean) => T;
|
|
78
|
+
/**
|
|
79
|
+
*验字段后返回格式化之后的所有数据
|
|
80
|
+
* @param nameList (string|number)[]
|
|
81
|
+
* @returns T
|
|
82
|
+
*
|
|
83
|
+
* @example validateFieldsReturnFormatValue -> {a:{b:value}}
|
|
84
|
+
*/
|
|
85
|
+
validateFieldsReturnFormatValue: (nameList?: NamePath[]) => Promise<T>;
|
|
86
|
+
};
|
|
87
|
+
export type ProFormInstance<Values> = RcFormInstance<Values> & ProFormInstanceType<Values>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/pro-form/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pro-form/use-form-instance.ts
|
|
20
|
+
var use_form_instance_exports = {};
|
|
21
|
+
__export(use_form_instance_exports, {
|
|
22
|
+
useFormInstace: () => useFormInstace
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(use_form_instance_exports);
|
|
25
|
+
var import_rc_field_form = require("rc-field-form");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
function useFormInstace() {
|
|
28
|
+
return (0, import_react.useContext)(import_rc_field_form.FieldContext);
|
|
29
|
+
}
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
useFormInstace
|
|
33
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProFormItemProps } from './pro-form-item';
|
|
2
|
+
import { ProFormFieldRemoteProps, RequestOptionsType } from './types';
|
|
3
|
+
export type TransformKeyFn = (value: any, namePath: string, allValues: any) => any;
|
|
4
|
+
export declare function transformKey(target: object, transformers: Record<string, TransformKeyFn>, option?: {
|
|
5
|
+
omitNil?: boolean;
|
|
6
|
+
keyPath?: (string | number)[];
|
|
7
|
+
}): any;
|
|
8
|
+
export declare function useFieldOptionsRequest<U = any, T = RequestOptionsType>(props: ProFormFieldRemoteProps<U, T>): readonly [T[] | undefined, {
|
|
9
|
+
readonly error?: Error | undefined;
|
|
10
|
+
readonly params: [];
|
|
11
|
+
readonly cancel: () => void;
|
|
12
|
+
readonly refresh: () => void;
|
|
13
|
+
readonly refreshAsync: () => Promise<T[]>;
|
|
14
|
+
readonly run: () => void;
|
|
15
|
+
readonly runAsync: () => Promise<T[]>;
|
|
16
|
+
readonly mutate: (data?: T[] | ((oldData?: T[] | undefined) => T[] | undefined) | undefined) => void;
|
|
17
|
+
readonly loading: boolean;
|
|
18
|
+
}];
|
|
19
|
+
export declare function useChildElementPosition(props: Pick<ProFormItemProps, 'childElementPosition'>): "normal" | "right" | undefined;
|
|
20
|
+
export declare function useReadonly(props: {
|
|
21
|
+
readonly?: boolean;
|
|
22
|
+
}): boolean | undefined;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pro-form/utils.ts
|
|
30
|
+
var utils_exports = {};
|
|
31
|
+
__export(utils_exports, {
|
|
32
|
+
transformKey: () => transformKey,
|
|
33
|
+
useChildElementPosition: () => useChildElementPosition,
|
|
34
|
+
useFieldOptionsRequest: () => useFieldOptionsRequest,
|
|
35
|
+
useReadonly: () => useReadonly
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(utils_exports);
|
|
38
|
+
var import_rc_utils = require("@nickeylin/rc-utils");
|
|
39
|
+
var import_ahooks = require("ahooks");
|
|
40
|
+
var import_lodash = require("lodash");
|
|
41
|
+
var import_react = require("react");
|
|
42
|
+
var import_pro_form_context = __toESM(require("./pro-form-context"));
|
|
43
|
+
function traverse(target, callback, parentKeyPath) {
|
|
44
|
+
if (typeof target !== "object" || (0, import_lodash.isNil)(target) || target instanceof Blob) {
|
|
45
|
+
return target;
|
|
46
|
+
}
|
|
47
|
+
const keys = Object.keys(target);
|
|
48
|
+
for (const k of keys) {
|
|
49
|
+
const value = target[k];
|
|
50
|
+
const keyPath = parentKeyPath ? [parentKeyPath, k].flat(1) : [k].flat(1);
|
|
51
|
+
const stop = callback == null ? void 0 : callback(value, keyPath);
|
|
52
|
+
if (stop)
|
|
53
|
+
continue;
|
|
54
|
+
traverse(value, callback, keyPath);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function transformKey(target, transformers, option = {}) {
|
|
58
|
+
const dataFormatMap = Object.keys(transformers).reduce((ret, key) => {
|
|
59
|
+
const value = transformers[key];
|
|
60
|
+
if (!(0, import_lodash.isNil)(value)) {
|
|
61
|
+
ret[key] = value;
|
|
62
|
+
}
|
|
63
|
+
return ret;
|
|
64
|
+
}, {});
|
|
65
|
+
if (Object.keys(dataFormatMap).length < 1) {
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
if (typeof window === "undefined")
|
|
69
|
+
return target;
|
|
70
|
+
if (typeof target !== "object" || (0, import_lodash.isNil)(target) || target instanceof Blob) {
|
|
71
|
+
return target;
|
|
72
|
+
}
|
|
73
|
+
const { omitNil, keyPath } = option;
|
|
74
|
+
if (keyPath) {
|
|
75
|
+
const keyStr = keyPath.join(".");
|
|
76
|
+
const transform = transformers[keyStr];
|
|
77
|
+
const value = (0, import_lodash.get)(target, keyPath);
|
|
78
|
+
return transform ? transform(value, keyStr, target) : value;
|
|
79
|
+
}
|
|
80
|
+
const nextObj = {};
|
|
81
|
+
traverse(target, (value, keyPath2) => {
|
|
82
|
+
if (omitNil && !value)
|
|
83
|
+
return false;
|
|
84
|
+
const keyStr = keyPath2.join(".");
|
|
85
|
+
const oldValue = (0, import_lodash.get)(target, keyPath2);
|
|
86
|
+
const transform = transformers[keyStr];
|
|
87
|
+
if (transform) {
|
|
88
|
+
const newValue = transform(oldValue, keyStr, target);
|
|
89
|
+
(0, import_lodash.set)(nextObj, keyPath2, newValue);
|
|
90
|
+
return true;
|
|
91
|
+
} else {
|
|
92
|
+
(0, import_lodash.set)(nextObj, keyPath2, oldValue);
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return nextObj;
|
|
97
|
+
}
|
|
98
|
+
function useFieldOptionsRequest(props) {
|
|
99
|
+
const {
|
|
100
|
+
options,
|
|
101
|
+
request,
|
|
102
|
+
debounceTime = 10,
|
|
103
|
+
params: paramsProp,
|
|
104
|
+
swrOption
|
|
105
|
+
} = props;
|
|
106
|
+
const params = (0, import_rc_utils.useDeepCompareMemoize)(paramsProp);
|
|
107
|
+
const {
|
|
108
|
+
data: optionData,
|
|
109
|
+
loading,
|
|
110
|
+
...state
|
|
111
|
+
} = (0, import_ahooks.useRequest)(
|
|
112
|
+
async () => {
|
|
113
|
+
if (options)
|
|
114
|
+
return options;
|
|
115
|
+
if (request) {
|
|
116
|
+
return await request(params, props);
|
|
117
|
+
}
|
|
118
|
+
return [];
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
refreshDeps: [params],
|
|
122
|
+
debounceWait: debounceTime,
|
|
123
|
+
...!options && request ? swrOption : {}
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
return [
|
|
127
|
+
options ?? optionData,
|
|
128
|
+
{ loading: !options && loading, ...state }
|
|
129
|
+
];
|
|
130
|
+
}
|
|
131
|
+
function useChildElementPosition(props) {
|
|
132
|
+
const ctx = (0, import_react.useContext)(import_pro_form_context.default);
|
|
133
|
+
return props.childElementPosition ?? ctx.childElementPosition;
|
|
134
|
+
}
|
|
135
|
+
function useReadonly(props) {
|
|
136
|
+
const { readonly } = (0, import_react.useContext)(import_pro_form_context.default);
|
|
137
|
+
return props.readonly ?? readonly;
|
|
138
|
+
}
|
|
139
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
140
|
+
0 && (module.exports = {
|
|
141
|
+
transformKey,
|
|
142
|
+
useChildElementPosition,
|
|
143
|
+
useFieldOptionsRequest,
|
|
144
|
+
useReadonly
|
|
145
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pro-list/helper.ts
|
|
20
|
+
var helper_exports = {};
|
|
21
|
+
__export(helper_exports, {
|
|
22
|
+
getRowKey: () => getRowKey
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(helper_exports);
|
|
25
|
+
function getRowKey(rowKey, item, index = 0) {
|
|
26
|
+
return typeof rowKey == "function" ? rowKey(item, index) : item[rowKey || "key"];
|
|
27
|
+
}
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
getRowKey
|
|
31
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pro-list/index.tsx
|
|
30
|
+
var pro_list_exports = {};
|
|
31
|
+
__export(pro_list_exports, {
|
|
32
|
+
default: () => pro_list_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pro_list_exports);
|
|
35
|
+
var import_pro_list = __toESM(require("./pro-list"));
|
|
36
|
+
var import_pro_list2 = require("./pro-list.less");
|
|
37
|
+
var import_pro_list3 = require("./pro-list");
|
|
38
|
+
var pro_list_default = import_pro_list.default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const PaginationToolBar: React.FC<{
|
|
3
|
+
pagination: {
|
|
4
|
+
/** begin with 1 */
|
|
5
|
+
current: number;
|
|
6
|
+
total: number;
|
|
7
|
+
pageSize: number;
|
|
8
|
+
} | null;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onPrev?(): void;
|
|
11
|
+
onNext?(): void;
|
|
12
|
+
}>;
|
|
13
|
+
export default PaginationToolBar;
|