antd-mobile 5.25.1 → 5.27.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/2x/README.md +6 -22
- package/2x/bundle/antd-mobile.cjs.development.js +1342 -1142
- package/2x/bundle/antd-mobile.cjs.js +9 -8
- package/2x/bundle/antd-mobile.es.development.js +1186 -986
- package/2x/bundle/antd-mobile.es.js +8576 -8366
- package/2x/bundle/antd-mobile.umd.development.js +1342 -1142
- package/2x/bundle/antd-mobile.umd.js +9 -8
- package/2x/bundle/style.css +29 -5
- package/2x/cjs/components/action-sheet/index.d.ts +0 -1
- package/2x/cjs/components/badge/index.d.ts +0 -1
- package/2x/cjs/components/calendar/calendar.js +9 -1
- package/2x/cjs/components/capsule-tabs/index.d.ts +0 -1
- package/2x/cjs/components/cascade-picker/index.d.ts +0 -1
- package/2x/cjs/components/cascader/index.d.ts +0 -1
- package/2x/cjs/components/cascader-view/index.d.ts +0 -1
- package/2x/cjs/components/check-list/index.d.ts +0 -1
- package/2x/cjs/components/checkbox/group-context.d.ts +0 -1
- package/2x/cjs/components/checkbox/index.d.ts +0 -1
- package/2x/cjs/components/collapse/index.d.ts +0 -1
- package/2x/cjs/components/date-picker/date-picker-date-utils.d.ts +2 -3
- package/2x/cjs/components/date-picker/date-picker-date-utils.js +14 -12
- package/2x/cjs/components/date-picker/date-picker-utils.d.ts +2 -3
- package/2x/cjs/components/date-picker/date-picker-utils.js +11 -12
- package/2x/cjs/components/date-picker/date-picker-week-utils.d.ts +0 -1
- package/2x/cjs/components/date-picker/date-picker-week-utils.js +0 -4
- package/2x/cjs/components/date-picker/date-picker.d.ts +20 -16
- package/2x/cjs/components/date-picker/date-picker.js +12 -3
- package/2x/cjs/components/date-picker/index.d.ts +10 -9
- package/2x/cjs/components/date-picker/index.js +3 -1
- package/2x/cjs/components/date-picker/prompt.d.ts +2 -1
- package/2x/cjs/components/date-picker/util.d.ts +4 -0
- package/2x/cjs/components/date-picker/util.js +8 -0
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +2 -1
- package/2x/cjs/components/date-picker-view/date-picker-view.js +7 -3
- package/2x/cjs/components/date-picker-view/useRenderLabel.d.ts +2 -0
- package/2x/cjs/components/date-picker-view/useRenderLabel.js +29 -0
- package/2x/cjs/components/dialog/index.d.ts +0 -1
- package/2x/cjs/components/dropdown/index.d.ts +0 -1
- package/2x/cjs/components/error-block/error-block.d.ts +0 -1
- package/2x/cjs/components/error-block/images/busy.d.ts +0 -1
- package/2x/cjs/components/error-block/images/default.d.ts +0 -1
- package/2x/cjs/components/error-block/images/disconnected.d.ts +0 -1
- package/2x/cjs/components/error-block/images/empty.d.ts +0 -1
- package/2x/cjs/components/floating-bubble/floating-bubble.d.ts +8 -0
- package/2x/cjs/components/floating-bubble/floating-bubble.js +25 -5
- package/2x/cjs/components/form/form.d.ts +1 -1
- package/2x/cjs/components/form/index.d.ts +0 -1
- package/2x/cjs/components/grid/index.d.ts +0 -1
- package/2x/cjs/components/image-uploader/image-uploader.css +16 -1
- package/2x/cjs/components/image-uploader/image-uploader.d.ts +4 -1
- package/2x/cjs/components/image-uploader/image-uploader.js +52 -12
- package/2x/cjs/components/image-uploader/preview-item.d.ts +2 -1
- package/2x/cjs/components/image-uploader/preview-item.js +5 -7
- package/2x/cjs/components/image-viewer/index.d.ts +0 -1
- package/2x/cjs/components/index-bar/index.d.ts +0 -1
- package/2x/cjs/components/jumbo-tabs/index.d.ts +0 -1
- package/2x/cjs/components/list/index.d.ts +0 -1
- package/2x/cjs/components/mask/mask.d.ts +1 -1
- package/2x/cjs/components/mask/mask.js +6 -2
- package/2x/cjs/components/modal/index.d.ts +0 -1
- package/2x/cjs/components/notice-bar/notice-bar.css +13 -4
- package/2x/cjs/components/notice-bar/notice-bar.d.ts +10 -8
- package/2x/cjs/components/notice-bar/notice-bar.js +5 -2
- package/2x/cjs/components/popover/index.d.ts +0 -1
- package/2x/cjs/components/radio/group-context.d.ts +0 -1
- package/2x/cjs/components/radio/index.d.ts +0 -1
- package/2x/cjs/components/result-page/index.d.ts +0 -1
- package/2x/cjs/components/side-bar/index.d.ts +0 -1
- package/2x/cjs/components/skeleton/index.d.ts +0 -1
- package/2x/cjs/components/slider/slider.js +8 -3
- package/2x/cjs/components/stepper/stepper.d.ts +23 -14
- package/2x/cjs/components/stepper/stepper.js +111 -54
- package/2x/cjs/components/steps/index.d.ts +0 -1
- package/2x/cjs/components/swiper/index.d.ts +0 -1
- package/2x/cjs/components/tab-bar/index.d.ts +0 -1
- package/2x/cjs/components/tabs/index.d.ts +0 -1
- package/2x/cjs/components/tree-select/index.d.ts +0 -1
- package/2x/cjs/components/water-mark/water-mark.d.ts +1 -1
- package/2x/cjs/components/water-mark/water-mark.js +5 -1
- package/2x/cjs/locales/base.d.ts +3 -0
- package/2x/cjs/locales/base.js +3 -0
- package/2x/cjs/locales/en-US.d.ts +3 -0
- package/2x/cjs/locales/es-ES.d.ts +3 -0
- package/2x/cjs/locales/fa-IR.d.ts +3 -0
- package/2x/cjs/locales/fr-FR.d.ts +3 -0
- package/2x/cjs/locales/id-ID.d.ts +3 -0
- package/2x/cjs/locales/ja-JP.d.ts +3 -0
- package/2x/cjs/locales/kk-KZ.d.ts +3 -0
- package/2x/cjs/locales/ko-KR.d.ts +3 -0
- package/2x/cjs/locales/zh-CN.d.ts +3 -0
- package/2x/cjs/locales/zh-CN.js +3 -0
- package/2x/cjs/locales/zh-HK.d.ts +3 -0
- package/2x/cjs/locales/zh-TW.d.ts +3 -0
- package/2x/cjs/utils/use-isomorphic-update-layout-effect.d.ts +0 -1
- package/2x/cjs/utils/use-ref-state.d.ts +0 -1
- package/2x/es/components/action-sheet/index.d.ts +0 -1
- package/2x/es/components/badge/index.d.ts +0 -1
- package/2x/es/components/calendar/calendar.js +9 -1
- package/2x/es/components/capsule-tabs/index.d.ts +0 -1
- package/2x/es/components/cascade-picker/index.d.ts +0 -1
- package/2x/es/components/cascader/index.d.ts +0 -1
- package/2x/es/components/cascader-view/index.d.ts +0 -1
- package/2x/es/components/check-list/index.d.ts +0 -1
- package/2x/es/components/checkbox/group-context.d.ts +0 -1
- package/2x/es/components/checkbox/index.d.ts +0 -1
- package/2x/es/components/collapse/index.d.ts +0 -1
- package/2x/es/components/date-picker/date-picker-date-utils.d.ts +2 -3
- package/2x/es/components/date-picker/date-picker-date-utils.js +14 -11
- package/2x/es/components/date-picker/date-picker-utils.d.ts +2 -3
- package/2x/es/components/date-picker/date-picker-utils.js +9 -9
- package/2x/es/components/date-picker/date-picker-week-utils.d.ts +0 -1
- package/2x/es/components/date-picker/date-picker-week-utils.js +0 -3
- package/2x/es/components/date-picker/date-picker.d.ts +20 -16
- package/2x/es/components/date-picker/date-picker.js +13 -4
- package/2x/es/components/date-picker/index.d.ts +10 -9
- package/2x/es/components/date-picker/index.js +3 -1
- package/2x/es/components/date-picker/prompt.d.ts +2 -1
- package/2x/es/components/date-picker/util.d.ts +4 -0
- package/2x/es/components/date-picker/util.js +1 -0
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +2 -1
- package/2x/es/components/date-picker-view/date-picker-view.js +8 -4
- package/2x/es/components/date-picker-view/useRenderLabel.d.ts +2 -0
- package/2x/es/components/date-picker-view/useRenderLabel.js +23 -0
- package/2x/es/components/dialog/index.d.ts +0 -1
- package/2x/es/components/dropdown/index.d.ts +0 -1
- package/2x/es/components/error-block/error-block.d.ts +0 -1
- package/2x/es/components/error-block/images/busy.d.ts +0 -1
- package/2x/es/components/error-block/images/default.d.ts +0 -1
- package/2x/es/components/error-block/images/disconnected.d.ts +0 -1
- package/2x/es/components/error-block/images/empty.d.ts +0 -1
- package/2x/es/components/floating-bubble/floating-bubble.d.ts +8 -0
- package/2x/es/components/floating-bubble/floating-bubble.js +26 -6
- package/2x/es/components/form/form.d.ts +1 -1
- package/2x/es/components/form/index.d.ts +0 -1
- package/2x/es/components/grid/index.d.ts +0 -1
- package/2x/es/components/image-uploader/image-uploader.css +16 -1
- package/2x/es/components/image-uploader/image-uploader.d.ts +4 -1
- package/2x/es/components/image-uploader/image-uploader.js +54 -14
- package/2x/es/components/image-uploader/preview-item.d.ts +2 -1
- package/2x/es/components/image-uploader/preview-item.js +6 -8
- package/2x/es/components/image-viewer/index.d.ts +0 -1
- package/2x/es/components/index-bar/index.d.ts +0 -1
- package/2x/es/components/jumbo-tabs/index.d.ts +0 -1
- package/2x/es/components/list/index.d.ts +0 -1
- package/2x/es/components/mask/mask.d.ts +1 -1
- package/2x/es/components/mask/mask.js +6 -2
- package/2x/es/components/modal/index.d.ts +0 -1
- package/2x/es/components/notice-bar/notice-bar.css +13 -4
- package/2x/es/components/notice-bar/notice-bar.d.ts +10 -8
- package/2x/es/components/notice-bar/notice-bar.js +5 -2
- package/2x/es/components/popover/index.d.ts +0 -1
- package/2x/es/components/radio/group-context.d.ts +0 -1
- package/2x/es/components/radio/index.d.ts +0 -1
- package/2x/es/components/result-page/index.d.ts +0 -1
- package/2x/es/components/side-bar/index.d.ts +0 -1
- package/2x/es/components/skeleton/index.d.ts +0 -1
- package/2x/es/components/slider/slider.js +8 -3
- package/2x/es/components/stepper/stepper.d.ts +23 -14
- package/2x/es/components/stepper/stepper.js +110 -52
- package/2x/es/components/steps/index.d.ts +0 -1
- package/2x/es/components/swiper/index.d.ts +0 -1
- package/2x/es/components/tab-bar/index.d.ts +0 -1
- package/2x/es/components/tabs/index.d.ts +0 -1
- package/2x/es/components/tree-select/index.d.ts +0 -1
- package/2x/es/components/water-mark/water-mark.d.ts +1 -1
- package/2x/es/components/water-mark/water-mark.js +5 -1
- package/2x/es/locales/base.d.ts +3 -0
- package/2x/es/locales/base.js +3 -0
- package/2x/es/locales/en-US.d.ts +3 -0
- package/2x/es/locales/es-ES.d.ts +3 -0
- package/2x/es/locales/fa-IR.d.ts +3 -0
- package/2x/es/locales/fr-FR.d.ts +3 -0
- package/2x/es/locales/id-ID.d.ts +3 -0
- package/2x/es/locales/ja-JP.d.ts +3 -0
- package/2x/es/locales/kk-KZ.d.ts +3 -0
- package/2x/es/locales/ko-KR.d.ts +3 -0
- package/2x/es/locales/zh-CN.d.ts +3 -0
- package/2x/es/locales/zh-CN.js +3 -0
- package/2x/es/locales/zh-HK.d.ts +3 -0
- package/2x/es/locales/zh-TW.d.ts +3 -0
- package/2x/es/utils/use-isomorphic-update-layout-effect.d.ts +0 -1
- package/2x/es/utils/use-ref-state.d.ts +0 -1
- package/2x/package.json +11 -10
- package/README.md +6 -22
- package/bundle/antd-mobile.cjs.development.js +1342 -1142
- package/bundle/antd-mobile.cjs.js +9 -8
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +1186 -986
- package/bundle/antd-mobile.es.js +8576 -8366
- package/bundle/antd-mobile.umd.development.js +1342 -1142
- package/bundle/antd-mobile.umd.js +9 -8
- package/bundle/style.css +1 -1
- package/cjs/components/action-sheet/index.d.ts +0 -1
- package/cjs/components/badge/index.d.ts +0 -1
- package/cjs/components/calendar/calendar.js +9 -1
- package/cjs/components/capsule-tabs/index.d.ts +0 -1
- package/cjs/components/cascade-picker/index.d.ts +0 -1
- package/cjs/components/cascader/index.d.ts +0 -1
- package/cjs/components/cascader-view/index.d.ts +0 -1
- package/cjs/components/check-list/index.d.ts +0 -1
- package/cjs/components/checkbox/group-context.d.ts +0 -1
- package/cjs/components/checkbox/index.d.ts +0 -1
- package/cjs/components/collapse/index.d.ts +0 -1
- package/cjs/components/date-picker/date-picker-date-utils.d.ts +2 -3
- package/cjs/components/date-picker/date-picker-date-utils.js +14 -12
- package/cjs/components/date-picker/date-picker-utils.d.ts +2 -3
- package/cjs/components/date-picker/date-picker-utils.js +11 -12
- package/cjs/components/date-picker/date-picker-week-utils.d.ts +0 -1
- package/cjs/components/date-picker/date-picker-week-utils.js +0 -4
- package/cjs/components/date-picker/date-picker.d.ts +20 -16
- package/cjs/components/date-picker/date-picker.js +12 -3
- package/cjs/components/date-picker/index.d.ts +10 -9
- package/cjs/components/date-picker/index.js +3 -1
- package/cjs/components/date-picker/prompt.d.ts +2 -1
- package/cjs/components/date-picker/util.d.ts +4 -0
- package/cjs/components/date-picker/util.js +8 -0
- package/cjs/components/date-picker-view/date-picker-view.d.ts +2 -1
- package/cjs/components/date-picker-view/date-picker-view.js +7 -3
- package/cjs/components/date-picker-view/useRenderLabel.d.ts +2 -0
- package/cjs/components/date-picker-view/useRenderLabel.js +29 -0
- package/cjs/components/dialog/index.d.ts +0 -1
- package/cjs/components/dropdown/index.d.ts +0 -1
- package/cjs/components/error-block/error-block.d.ts +0 -1
- package/cjs/components/error-block/images/busy.d.ts +0 -1
- package/cjs/components/error-block/images/default.d.ts +0 -1
- package/cjs/components/error-block/images/disconnected.d.ts +0 -1
- package/cjs/components/error-block/images/empty.d.ts +0 -1
- package/cjs/components/floating-bubble/floating-bubble.d.ts +8 -0
- package/cjs/components/floating-bubble/floating-bubble.js +25 -5
- package/cjs/components/form/form.d.ts +1 -1
- package/cjs/components/form/index.d.ts +0 -1
- package/cjs/components/grid/index.d.ts +0 -1
- package/cjs/components/image-uploader/image-uploader.css +15 -1
- package/cjs/components/image-uploader/image-uploader.d.ts +4 -1
- package/cjs/components/image-uploader/image-uploader.js +52 -12
- package/cjs/components/image-uploader/preview-item.d.ts +2 -1
- package/cjs/components/image-uploader/preview-item.js +5 -7
- package/cjs/components/image-viewer/index.d.ts +0 -1
- package/cjs/components/index-bar/index.d.ts +0 -1
- package/cjs/components/jumbo-tabs/index.d.ts +0 -1
- package/cjs/components/list/index.d.ts +0 -1
- package/cjs/components/mask/mask.d.ts +1 -1
- package/cjs/components/mask/mask.js +6 -2
- package/cjs/components/modal/index.d.ts +0 -1
- package/cjs/components/notice-bar/notice-bar.css +11 -4
- package/cjs/components/notice-bar/notice-bar.d.ts +10 -8
- package/cjs/components/notice-bar/notice-bar.js +5 -2
- package/cjs/components/popover/index.d.ts +0 -1
- package/cjs/components/radio/group-context.d.ts +0 -1
- package/cjs/components/radio/index.d.ts +0 -1
- package/cjs/components/result-page/index.d.ts +0 -1
- package/cjs/components/side-bar/index.d.ts +0 -1
- package/cjs/components/skeleton/index.d.ts +0 -1
- package/cjs/components/slider/slider.js +8 -3
- package/cjs/components/stepper/stepper.d.ts +23 -14
- package/cjs/components/stepper/stepper.js +111 -54
- package/cjs/components/steps/index.d.ts +0 -1
- package/cjs/components/swiper/index.d.ts +0 -1
- package/cjs/components/tab-bar/index.d.ts +0 -1
- package/cjs/components/tabs/index.d.ts +0 -1
- package/cjs/components/tree-select/index.d.ts +0 -1
- package/cjs/components/water-mark/water-mark.d.ts +1 -1
- package/cjs/components/water-mark/water-mark.js +5 -1
- package/cjs/locales/base.d.ts +3 -0
- package/cjs/locales/base.js +3 -0
- package/cjs/locales/en-US.d.ts +3 -0
- package/cjs/locales/es-ES.d.ts +3 -0
- package/cjs/locales/fa-IR.d.ts +3 -0
- package/cjs/locales/fr-FR.d.ts +3 -0
- package/cjs/locales/id-ID.d.ts +3 -0
- package/cjs/locales/ja-JP.d.ts +3 -0
- package/cjs/locales/kk-KZ.d.ts +3 -0
- package/cjs/locales/ko-KR.d.ts +3 -0
- package/cjs/locales/zh-CN.d.ts +3 -0
- package/cjs/locales/zh-CN.js +3 -0
- package/cjs/locales/zh-HK.d.ts +3 -0
- package/cjs/locales/zh-TW.d.ts +3 -0
- package/cjs/utils/use-isomorphic-update-layout-effect.d.ts +0 -1
- package/cjs/utils/use-ref-state.d.ts +0 -1
- package/es/components/action-sheet/index.d.ts +0 -1
- package/es/components/badge/index.d.ts +0 -1
- package/es/components/calendar/calendar.js +9 -1
- package/es/components/capsule-tabs/index.d.ts +0 -1
- package/es/components/cascade-picker/index.d.ts +0 -1
- package/es/components/cascader/index.d.ts +0 -1
- package/es/components/cascader-view/index.d.ts +0 -1
- package/es/components/check-list/index.d.ts +0 -1
- package/es/components/checkbox/group-context.d.ts +0 -1
- package/es/components/checkbox/index.d.ts +0 -1
- package/es/components/collapse/index.d.ts +0 -1
- package/es/components/date-picker/date-picker-date-utils.d.ts +2 -3
- package/es/components/date-picker/date-picker-date-utils.js +14 -11
- package/es/components/date-picker/date-picker-utils.d.ts +2 -3
- package/es/components/date-picker/date-picker-utils.js +9 -9
- package/es/components/date-picker/date-picker-week-utils.d.ts +0 -1
- package/es/components/date-picker/date-picker-week-utils.js +0 -3
- package/es/components/date-picker/date-picker.d.ts +20 -16
- package/es/components/date-picker/date-picker.js +13 -4
- package/es/components/date-picker/index.d.ts +10 -9
- package/es/components/date-picker/index.js +3 -1
- package/es/components/date-picker/prompt.d.ts +2 -1
- package/es/components/date-picker/util.d.ts +4 -0
- package/es/components/date-picker/util.js +1 -0
- package/es/components/date-picker-view/date-picker-view.d.ts +2 -1
- package/es/components/date-picker-view/date-picker-view.js +8 -4
- package/es/components/date-picker-view/useRenderLabel.d.ts +2 -0
- package/es/components/date-picker-view/useRenderLabel.js +23 -0
- package/es/components/dialog/index.d.ts +0 -1
- package/es/components/dropdown/index.d.ts +0 -1
- package/es/components/error-block/error-block.d.ts +0 -1
- package/es/components/error-block/images/busy.d.ts +0 -1
- package/es/components/error-block/images/default.d.ts +0 -1
- package/es/components/error-block/images/disconnected.d.ts +0 -1
- package/es/components/error-block/images/empty.d.ts +0 -1
- package/es/components/floating-bubble/floating-bubble.d.ts +8 -0
- package/es/components/floating-bubble/floating-bubble.js +26 -6
- package/es/components/form/form.d.ts +1 -1
- package/es/components/form/index.d.ts +0 -1
- package/es/components/grid/index.d.ts +0 -1
- package/es/components/image-uploader/image-uploader.css +15 -1
- package/es/components/image-uploader/image-uploader.d.ts +4 -1
- package/es/components/image-uploader/image-uploader.js +54 -14
- package/es/components/image-uploader/preview-item.d.ts +2 -1
- package/es/components/image-uploader/preview-item.js +6 -8
- package/es/components/image-viewer/index.d.ts +0 -1
- package/es/components/index-bar/index.d.ts +0 -1
- package/es/components/jumbo-tabs/index.d.ts +0 -1
- package/es/components/list/index.d.ts +0 -1
- package/es/components/mask/mask.d.ts +1 -1
- package/es/components/mask/mask.js +6 -2
- package/es/components/modal/index.d.ts +0 -1
- package/es/components/notice-bar/notice-bar.css +11 -4
- package/es/components/notice-bar/notice-bar.d.ts +10 -8
- package/es/components/notice-bar/notice-bar.js +5 -2
- package/es/components/popover/index.d.ts +0 -1
- package/es/components/radio/group-context.d.ts +0 -1
- package/es/components/radio/index.d.ts +0 -1
- package/es/components/result-page/index.d.ts +0 -1
- package/es/components/side-bar/index.d.ts +0 -1
- package/es/components/skeleton/index.d.ts +0 -1
- package/es/components/slider/slider.js +8 -3
- package/es/components/stepper/stepper.d.ts +23 -14
- package/es/components/stepper/stepper.js +110 -52
- package/es/components/steps/index.d.ts +0 -1
- package/es/components/swiper/index.d.ts +0 -1
- package/es/components/tab-bar/index.d.ts +0 -1
- package/es/components/tabs/index.d.ts +0 -1
- package/es/components/tree-select/index.d.ts +0 -1
- package/es/components/water-mark/water-mark.d.ts +1 -1
- package/es/components/water-mark/water-mark.js +5 -1
- package/es/locales/base.d.ts +3 -0
- package/es/locales/base.js +3 -0
- package/es/locales/en-US.d.ts +3 -0
- package/es/locales/es-ES.d.ts +3 -0
- package/es/locales/fa-IR.d.ts +3 -0
- package/es/locales/fr-FR.d.ts +3 -0
- package/es/locales/id-ID.d.ts +3 -0
- package/es/locales/ja-JP.d.ts +3 -0
- package/es/locales/kk-KZ.d.ts +3 -0
- package/es/locales/ko-KR.d.ts +3 -0
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +3 -0
- package/es/locales/zh-HK.d.ts +3 -0
- package/es/locales/zh-TW.d.ts +3 -0
- package/es/utils/use-isomorphic-update-layout-effect.d.ts +0 -1
- package/es/utils/use-ref-state.d.ts +0 -1
- package/package.json +11 -10
- package/umd/antd-mobile.js +1 -1
- package/2x/cjs/components/image/test/image.test.d.ts +0 -1
- package/2x/cjs/components/image/test/image.test.js +0 -73
- package/2x/es/components/image/test/image.test.d.ts +0 -1
- package/2x/es/components/image/test/image.test.js +0 -70
- package/cjs/components/image/test/image.test.d.ts +0 -1
- package/cjs/components/image/test/image.test.js +0 -73
- package/es/components/image/test/image.test.d.ts +0 -1
- package/es/components/image/test/image.test.js +0 -70
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const React$
|
|
3
|
+
const React$4 = require("react");
|
|
4
4
|
const ReactDOM = require("react-dom");
|
|
5
5
|
const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
6
6
|
function _interopNamespace(e) {
|
|
@@ -21,12 +21,12 @@ function _interopNamespace(e) {
|
|
|
21
21
|
n.default = e;
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
|
-
const React__default = /* @__PURE__ */ _interopDefaultLegacy(React$
|
|
25
|
-
const React__namespace = /* @__PURE__ */ _interopNamespace(React$
|
|
24
|
+
const React__default = /* @__PURE__ */ _interopDefaultLegacy(React$4);
|
|
25
|
+
const React__namespace = /* @__PURE__ */ _interopNamespace(React$4);
|
|
26
26
|
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespace(ReactDOM);
|
|
27
27
|
const global$2 = "";
|
|
28
|
-
const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
29
|
-
if (canUseDom) {
|
|
28
|
+
const canUseDom$2 = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
29
|
+
if (canUseDom$2) {
|
|
30
30
|
document.addEventListener("touchstart", () => {
|
|
31
31
|
}, true);
|
|
32
32
|
}
|
|
@@ -42,13 +42,13 @@ function __rest(s, e) {
|
|
|
42
42
|
}
|
|
43
43
|
return t;
|
|
44
44
|
}
|
|
45
|
-
function __awaiter$1(thisArg, _arguments,
|
|
45
|
+
function __awaiter$1(thisArg, _arguments, P, generator) {
|
|
46
46
|
function adopt(value) {
|
|
47
|
-
return value instanceof
|
|
47
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
48
48
|
resolve(value);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
return new (
|
|
51
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
52
52
|
function fulfilled(value) {
|
|
53
53
|
try {
|
|
54
54
|
step(generator.next(value));
|
|
@@ -102,6 +102,9 @@ const base = {
|
|
|
102
102
|
Dialog: {
|
|
103
103
|
ok: "OK"
|
|
104
104
|
},
|
|
105
|
+
DatePicker: {
|
|
106
|
+
tillNow: "Till Now"
|
|
107
|
+
},
|
|
105
108
|
ErrorBlock: {
|
|
106
109
|
default: {
|
|
107
110
|
title: "Oops, something went wrong",
|
|
@@ -229,6 +232,9 @@ const zhCN = mergeLocale(base, {
|
|
|
229
232
|
Dialog: {
|
|
230
233
|
ok: "\u6211\u77E5\u9053\u4E86"
|
|
231
234
|
},
|
|
235
|
+
DatePicker: {
|
|
236
|
+
tillNow: "\u81F3\u4ECA"
|
|
237
|
+
},
|
|
232
238
|
ErrorBlock: {
|
|
233
239
|
default: {
|
|
234
240
|
title: "\u9875\u9762\u9047\u5230\u4E00\u4E9B\u5C0F\u95EE\u9898",
|
|
@@ -362,7 +368,7 @@ const ConfigProvider$1 = (props) => {
|
|
|
362
368
|
};
|
|
363
369
|
function useConfig() {
|
|
364
370
|
var _a;
|
|
365
|
-
return (_a = React$
|
|
371
|
+
return (_a = React$4.useContext(ConfigContext)) !== null && _a !== void 0 ? _a : getDefaultConfig();
|
|
366
372
|
}
|
|
367
373
|
const ConfigProvider = ConfigProvider$1;
|
|
368
374
|
const actionSheet = "";
|
|
@@ -900,7 +906,7 @@ function mergeProps(...items) {
|
|
|
900
906
|
const popup = "";
|
|
901
907
|
var createUpdateEffect = function createUpdateEffect2(hook) {
|
|
902
908
|
return function(effect, deps) {
|
|
903
|
-
var isMounted = React$
|
|
909
|
+
var isMounted = React$4.useRef(false);
|
|
904
910
|
hook(function() {
|
|
905
911
|
return function() {
|
|
906
912
|
isMounted.current = false;
|
|
@@ -929,11 +935,11 @@ function useMemoizedFn(fn) {
|
|
|
929
935
|
console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof fn));
|
|
930
936
|
}
|
|
931
937
|
}
|
|
932
|
-
var fnRef = React$
|
|
933
|
-
fnRef.current = React$
|
|
938
|
+
var fnRef = React$4.useRef(fn);
|
|
939
|
+
fnRef.current = React$4.useMemo(function() {
|
|
934
940
|
return fn;
|
|
935
941
|
}, [fn]);
|
|
936
|
-
var memoizedFn = React$
|
|
942
|
+
var memoizedFn = React$4.useRef();
|
|
937
943
|
if (!memoizedFn.current) {
|
|
938
944
|
memoizedFn.current = function() {
|
|
939
945
|
var args = [];
|
|
@@ -945,7 +951,7 @@ function useMemoizedFn(fn) {
|
|
|
945
951
|
}
|
|
946
952
|
return memoizedFn.current;
|
|
947
953
|
}
|
|
948
|
-
const useUpdateEffect = createUpdateEffect(React$
|
|
954
|
+
const useUpdateEffect = createUpdateEffect(React$4.useEffect);
|
|
949
955
|
function depsAreSame(oldDeps, deps) {
|
|
950
956
|
if (oldDeps === deps)
|
|
951
957
|
return true;
|
|
@@ -956,7 +962,7 @@ function depsAreSame(oldDeps, deps) {
|
|
|
956
962
|
return true;
|
|
957
963
|
}
|
|
958
964
|
function useLatest(value) {
|
|
959
|
-
var ref = React$
|
|
965
|
+
var ref = React$4.useRef(value);
|
|
960
966
|
ref.current = value;
|
|
961
967
|
return ref;
|
|
962
968
|
}
|
|
@@ -967,7 +973,7 @@ var useUnmount = function useUnmount2(fn) {
|
|
|
967
973
|
}
|
|
968
974
|
}
|
|
969
975
|
var fnRef = useLatest(fn);
|
|
970
|
-
React$
|
|
976
|
+
React$4.useEffect(function() {
|
|
971
977
|
return function() {
|
|
972
978
|
fnRef.current();
|
|
973
979
|
};
|
|
@@ -1135,7 +1141,7 @@ var useMount = function useMount2(fn) {
|
|
|
1135
1141
|
console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof fn, '".'));
|
|
1136
1142
|
}
|
|
1137
1143
|
}
|
|
1138
|
-
React$
|
|
1144
|
+
React$4.useEffect(function() {
|
|
1139
1145
|
fn === null || fn === void 0 ? void 0 : fn();
|
|
1140
1146
|
}, []);
|
|
1141
1147
|
};
|
|
@@ -1165,8 +1171,8 @@ var __read$7 = globalThis && globalThis.__read || function(o, n) {
|
|
|
1165
1171
|
return ar;
|
|
1166
1172
|
};
|
|
1167
1173
|
var useUpdate = function useUpdate2() {
|
|
1168
|
-
var _a = __read$7(React$
|
|
1169
|
-
return React$
|
|
1174
|
+
var _a = __read$7(React$4.useState({}), 2), setState = _a[1];
|
|
1175
|
+
return React$4.useCallback(function() {
|
|
1170
1176
|
return setState({});
|
|
1171
1177
|
}, []);
|
|
1172
1178
|
};
|
|
@@ -1216,10 +1222,10 @@ var getDocumentOrShadow = function getDocumentOrShadow2(target) {
|
|
|
1216
1222
|
const getDocumentOrShadow$1 = getDocumentOrShadow;
|
|
1217
1223
|
var createEffectWithTarget = function createEffectWithTarget2(useEffectType) {
|
|
1218
1224
|
var useEffectWithTarget2 = function useEffectWithTarget3(effect, deps, target) {
|
|
1219
|
-
var hasInitRef = React$
|
|
1220
|
-
var lastElementRef = React$
|
|
1221
|
-
var lastDepsRef = React$
|
|
1222
|
-
var unLoadRef = React$
|
|
1225
|
+
var hasInitRef = React$4.useRef(false);
|
|
1226
|
+
var lastElementRef = React$4.useRef([]);
|
|
1227
|
+
var lastDepsRef = React$4.useRef([]);
|
|
1228
|
+
var unLoadRef = React$4.useRef();
|
|
1223
1229
|
useEffectType(function() {
|
|
1224
1230
|
var _a;
|
|
1225
1231
|
var targets = Array.isArray(target) ? target : [target];
|
|
@@ -1249,7 +1255,7 @@ var createEffectWithTarget = function createEffectWithTarget2(useEffectType) {
|
|
|
1249
1255
|
return useEffectWithTarget2;
|
|
1250
1256
|
};
|
|
1251
1257
|
const createEffectWithTarget$1 = createEffectWithTarget;
|
|
1252
|
-
var useEffectWithTarget$1 = createEffectWithTarget$1(React$
|
|
1258
|
+
var useEffectWithTarget$1 = createEffectWithTarget$1(React$4.useEffect);
|
|
1253
1259
|
const useEffectWithTarget$2 = useEffectWithTarget$1;
|
|
1254
1260
|
function useClickAway(onClickAway, target, eventName) {
|
|
1255
1261
|
if (eventName === void 0) {
|
|
@@ -1532,7 +1538,7 @@ function useDebounceFn(fn, options) {
|
|
|
1532
1538
|
}
|
|
1533
1539
|
var fnRef = useLatest(fn);
|
|
1534
1540
|
var wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
|
|
1535
|
-
var debounced = React$
|
|
1541
|
+
var debounced = React$4.useMemo(function() {
|
|
1536
1542
|
return debounce_1(function() {
|
|
1537
1543
|
var args = [];
|
|
1538
1544
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -1575,11 +1581,11 @@ var __read$5 = globalThis && globalThis.__read || function(o, n) {
|
|
|
1575
1581
|
return ar;
|
|
1576
1582
|
};
|
|
1577
1583
|
function useDebounceEffect(effect, deps, options) {
|
|
1578
|
-
var _a = __read$5(React$
|
|
1584
|
+
var _a = __read$5(React$4.useState({}), 2), flag = _a[0], setFlag = _a[1];
|
|
1579
1585
|
var run = useDebounceFn(function() {
|
|
1580
1586
|
setFlag({});
|
|
1581
1587
|
}, options).run;
|
|
1582
|
-
React$
|
|
1588
|
+
React$4.useEffect(function() {
|
|
1583
1589
|
return run();
|
|
1584
1590
|
}, deps);
|
|
1585
1591
|
useUpdateEffect(effect, [flag]);
|
|
@@ -2755,8 +2761,8 @@ var __values = globalThis && globalThis.__values || function(o) {
|
|
|
2755
2761
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2756
2762
|
};
|
|
2757
2763
|
function useInViewport(target, options) {
|
|
2758
|
-
var _a = __read$4(React$
|
|
2759
|
-
var _b = __read$4(React$
|
|
2764
|
+
var _a = __read$4(React$4.useState(), 2), state = _a[0], setState = _a[1];
|
|
2765
|
+
var _b = __read$4(React$4.useState(), 2), ratio = _b[0], setRatio = _b[1];
|
|
2760
2766
|
useEffectWithTarget$2(function() {
|
|
2761
2767
|
var el = getTargetElement(target);
|
|
2762
2768
|
if (!el) {
|
|
@@ -2793,15 +2799,15 @@ function useInViewport(target, options) {
|
|
|
2793
2799
|
}, [], target);
|
|
2794
2800
|
return [state, ratio];
|
|
2795
2801
|
}
|
|
2796
|
-
var useIsomorphicLayoutEffect$1 = isBrowser$3 ? React$
|
|
2802
|
+
var useIsomorphicLayoutEffect$1 = isBrowser$3 ? React$4.useLayoutEffect : React$4.useEffect;
|
|
2797
2803
|
const useIsomorphicLayoutEffect$2 = useIsomorphicLayoutEffect$1;
|
|
2798
|
-
var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments,
|
|
2804
|
+
var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
2799
2805
|
function adopt(value) {
|
|
2800
|
-
return value instanceof
|
|
2806
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
2801
2807
|
resolve(value);
|
|
2802
2808
|
});
|
|
2803
2809
|
}
|
|
2804
|
-
return new (
|
|
2810
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
2805
2811
|
function fulfilled(value) {
|
|
2806
2812
|
try {
|
|
2807
2813
|
step(generator.next(value));
|
|
@@ -2951,8 +2957,8 @@ var __spreadArray$1 = globalThis && globalThis.__spreadArray || function(to2, fr
|
|
|
2951
2957
|
};
|
|
2952
2958
|
function useLockFn(fn) {
|
|
2953
2959
|
var _this = this;
|
|
2954
|
-
var lockRef = React$
|
|
2955
|
-
return React$
|
|
2960
|
+
var lockRef = React$4.useRef(false);
|
|
2961
|
+
return React$4.useCallback(function() {
|
|
2956
2962
|
var args = [];
|
|
2957
2963
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2958
2964
|
args[_i] = arguments[_i];
|
|
@@ -3009,9 +3015,9 @@ var __read$2 = globalThis && globalThis.__read || function(o, n) {
|
|
|
3009
3015
|
return ar;
|
|
3010
3016
|
};
|
|
3011
3017
|
function useRafState(initialState) {
|
|
3012
|
-
var ref = React$
|
|
3013
|
-
var _a = __read$2(React$
|
|
3014
|
-
var setRafState = React$
|
|
3018
|
+
var ref = React$4.useRef(0);
|
|
3019
|
+
var _a = __read$2(React$4.useState(initialState), 2), state = _a[0], setState = _a[1];
|
|
3020
|
+
var setRafState = React$4.useCallback(function(value) {
|
|
3015
3021
|
cancelAnimationFrame(ref.current);
|
|
3016
3022
|
ref.current = requestAnimationFrame(function() {
|
|
3017
3023
|
setState(value);
|
|
@@ -3023,8 +3029,8 @@ function useRafState(initialState) {
|
|
|
3023
3029
|
return [state, setRafState];
|
|
3024
3030
|
}
|
|
3025
3031
|
var useUnmountedRef = function useUnmountedRef2() {
|
|
3026
|
-
var unmountedRef = React$
|
|
3027
|
-
React$
|
|
3032
|
+
var unmountedRef = React$4.useRef(false);
|
|
3033
|
+
React$4.useEffect(function() {
|
|
3028
3034
|
unmountedRef.current = false;
|
|
3029
3035
|
return function() {
|
|
3030
3036
|
unmountedRef.current = true;
|
|
@@ -3504,7 +3510,7 @@ var index$k = function() {
|
|
|
3504
3510
|
}
|
|
3505
3511
|
return ResizeObserver$1;
|
|
3506
3512
|
}();
|
|
3507
|
-
var useEffectWithTarget = createEffectWithTarget$1(React$
|
|
3513
|
+
var useEffectWithTarget = createEffectWithTarget$1(React$4.useLayoutEffect);
|
|
3508
3514
|
const useLayoutEffectWithTarget = useEffectWithTarget;
|
|
3509
3515
|
var useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
|
|
3510
3516
|
const useIsomorphicLayoutEffectWithTarget$1 = useIsomorphicLayoutEffectWithTarget;
|
|
@@ -3599,7 +3605,7 @@ function useThrottleFn(fn, options) {
|
|
|
3599
3605
|
}
|
|
3600
3606
|
var fnRef = useLatest(fn);
|
|
3601
3607
|
var wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
|
|
3602
|
-
var throttled = React$
|
|
3608
|
+
var throttled = React$4.useMemo(function() {
|
|
3603
3609
|
return throttle_1(function() {
|
|
3604
3610
|
var args = [];
|
|
3605
3611
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -3619,8 +3625,8 @@ function useThrottleFn(fn, options) {
|
|
|
3619
3625
|
}
|
|
3620
3626
|
function useTimeout(fn, delay) {
|
|
3621
3627
|
var fnRef = useLatest(fn);
|
|
3622
|
-
var timerRef = React$
|
|
3623
|
-
React$
|
|
3628
|
+
var timerRef = React$4.useRef(null);
|
|
3629
|
+
React$4.useEffect(function() {
|
|
3624
3630
|
if (!isNumber(delay) || delay < 0) {
|
|
3625
3631
|
return;
|
|
3626
3632
|
}
|
|
@@ -3633,7 +3639,7 @@ function useTimeout(fn, delay) {
|
|
|
3633
3639
|
}
|
|
3634
3640
|
};
|
|
3635
3641
|
}, [delay]);
|
|
3636
|
-
var clear2 = React$
|
|
3642
|
+
var clear2 = React$4.useCallback(function() {
|
|
3637
3643
|
if (timerRef.current) {
|
|
3638
3644
|
clearTimeout(timerRef.current);
|
|
3639
3645
|
}
|
|
@@ -3652,13 +3658,13 @@ function getDirection(x, y) {
|
|
|
3652
3658
|
return "";
|
|
3653
3659
|
}
|
|
3654
3660
|
function useTouch() {
|
|
3655
|
-
const startX = React$
|
|
3656
|
-
const startY = React$
|
|
3657
|
-
const deltaX = React$
|
|
3658
|
-
const deltaY = React$
|
|
3659
|
-
const offsetX = React$
|
|
3660
|
-
const offsetY = React$
|
|
3661
|
-
const direction = React$
|
|
3661
|
+
const startX = React$4.useRef(0);
|
|
3662
|
+
const startY = React$4.useRef(0);
|
|
3663
|
+
const deltaX = React$4.useRef(0);
|
|
3664
|
+
const deltaY = React$4.useRef(0);
|
|
3665
|
+
const offsetX = React$4.useRef(0);
|
|
3666
|
+
const offsetY = React$4.useRef(0);
|
|
3667
|
+
const direction = React$4.useRef("");
|
|
3662
3668
|
const isVertical = () => direction.current === "vertical";
|
|
3663
3669
|
const isHorizontal = () => direction.current === "horizontal";
|
|
3664
3670
|
const reset = () => {
|
|
@@ -3698,7 +3704,7 @@ function useTouch() {
|
|
|
3698
3704
|
isHorizontal
|
|
3699
3705
|
};
|
|
3700
3706
|
}
|
|
3701
|
-
const defaultRoot = canUseDom ? window : void 0;
|
|
3707
|
+
const defaultRoot = canUseDom$2 ? window : void 0;
|
|
3702
3708
|
const overflowStylePatterns = ["scroll", "auto", "overlay"];
|
|
3703
3709
|
function isElement$1(node) {
|
|
3704
3710
|
const ELEMENT_NODE_TYPE = 1;
|
|
@@ -3721,7 +3727,7 @@ function getScrollParent(el, root2 = defaultRoot) {
|
|
|
3721
3727
|
return root2;
|
|
3722
3728
|
}
|
|
3723
3729
|
let supportsPassive = false;
|
|
3724
|
-
if (canUseDom) {
|
|
3730
|
+
if (canUseDom$2) {
|
|
3725
3731
|
try {
|
|
3726
3732
|
const opts = {};
|
|
3727
3733
|
Object.defineProperty(opts, "passive", {
|
|
@@ -3797,7 +3803,7 @@ function useLockScroll(rootRef, shouldLock) {
|
|
|
3797
3803
|
}
|
|
3798
3804
|
}
|
|
3799
3805
|
};
|
|
3800
|
-
React$
|
|
3806
|
+
React$4.useEffect(() => {
|
|
3801
3807
|
if (shouldLock) {
|
|
3802
3808
|
lock();
|
|
3803
3809
|
return () => {
|
|
@@ -4609,9 +4615,9 @@ function deprecateDirectCall() {
|
|
|
4609
4615
|
function isAnimatedString(value) {
|
|
4610
4616
|
return is.str(value) && (value[0] == "#" || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
|
|
4611
4617
|
}
|
|
4612
|
-
const useIsomorphicLayoutEffect = isSSR() ? React$
|
|
4618
|
+
const useIsomorphicLayoutEffect = isSSR() ? React$4.useEffect : React$4.useLayoutEffect;
|
|
4613
4619
|
const useIsMounted = () => {
|
|
4614
|
-
const isMounted = React$
|
|
4620
|
+
const isMounted = React$4.useRef(false);
|
|
4615
4621
|
useIsomorphicLayoutEffect(() => {
|
|
4616
4622
|
isMounted.current = true;
|
|
4617
4623
|
return () => {
|
|
@@ -4621,7 +4627,7 @@ const useIsMounted = () => {
|
|
|
4621
4627
|
return isMounted;
|
|
4622
4628
|
};
|
|
4623
4629
|
function useForceUpdate() {
|
|
4624
|
-
const update2 = React$
|
|
4630
|
+
const update2 = React$4.useState()[1];
|
|
4625
4631
|
const isMounted = useIsMounted();
|
|
4626
4632
|
return () => {
|
|
4627
4633
|
if (isMounted.current) {
|
|
@@ -4630,11 +4636,11 @@ function useForceUpdate() {
|
|
|
4630
4636
|
};
|
|
4631
4637
|
}
|
|
4632
4638
|
function useMemoOne(getResult, inputs) {
|
|
4633
|
-
const [initial] = React$
|
|
4639
|
+
const [initial] = React$4.useState(() => ({
|
|
4634
4640
|
inputs,
|
|
4635
4641
|
result: getResult()
|
|
4636
4642
|
}));
|
|
4637
|
-
const committed = React$
|
|
4643
|
+
const committed = React$4.useRef();
|
|
4638
4644
|
const prevCache = committed.current;
|
|
4639
4645
|
let cache = prevCache;
|
|
4640
4646
|
if (cache) {
|
|
@@ -4648,7 +4654,7 @@ function useMemoOne(getResult, inputs) {
|
|
|
4648
4654
|
} else {
|
|
4649
4655
|
cache = initial;
|
|
4650
4656
|
}
|
|
4651
|
-
React$
|
|
4657
|
+
React$4.useEffect(() => {
|
|
4652
4658
|
committed.current = cache;
|
|
4653
4659
|
if (prevCache == initial) {
|
|
4654
4660
|
initial.inputs = initial.result = void 0;
|
|
@@ -4667,11 +4673,11 @@ function areInputsEqual(next, prev) {
|
|
|
4667
4673
|
}
|
|
4668
4674
|
return true;
|
|
4669
4675
|
}
|
|
4670
|
-
const useOnce = (effect) => React$
|
|
4676
|
+
const useOnce = (effect) => React$4.useEffect(effect, emptyDeps);
|
|
4671
4677
|
const emptyDeps = [];
|
|
4672
4678
|
function usePrev(value) {
|
|
4673
|
-
const prevRef = React$
|
|
4674
|
-
React$
|
|
4679
|
+
const prevRef = React$4.useRef();
|
|
4680
|
+
React$4.useEffect(() => {
|
|
4675
4681
|
prevRef.current = value;
|
|
4676
4682
|
});
|
|
4677
4683
|
return prevRef.current;
|
|
@@ -4875,9 +4881,9 @@ function _extends$3() {
|
|
|
4875
4881
|
}
|
|
4876
4882
|
const withAnimated = (Component, host2) => {
|
|
4877
4883
|
const hasInstance = !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent;
|
|
4878
|
-
return React$
|
|
4879
|
-
const instanceRef = React$
|
|
4880
|
-
const ref = hasInstance && React$
|
|
4884
|
+
return React$4.forwardRef((givenProps, givenRef) => {
|
|
4885
|
+
const instanceRef = React$4.useRef(null);
|
|
4886
|
+
const ref = hasInstance && React$4.useCallback((value) => {
|
|
4881
4887
|
instanceRef.current = updateRef(givenRef, value);
|
|
4882
4888
|
}, [givenRef]);
|
|
4883
4889
|
const [props, deps] = getAnimatedState(givenProps, host2);
|
|
@@ -4893,7 +4899,7 @@ const withAnimated = (Component, host2) => {
|
|
|
4893
4899
|
}
|
|
4894
4900
|
};
|
|
4895
4901
|
const observer = new PropsObserver(callback, deps);
|
|
4896
|
-
const observerRef = React$
|
|
4902
|
+
const observerRef = React$4.useRef();
|
|
4897
4903
|
useIsomorphicLayoutEffect(() => {
|
|
4898
4904
|
observerRef.current = observer;
|
|
4899
4905
|
each(deps, (dep) => addFluidObserver(dep, observer));
|
|
@@ -4904,7 +4910,7 @@ const withAnimated = (Component, host2) => {
|
|
|
4904
4910
|
}
|
|
4905
4911
|
};
|
|
4906
4912
|
});
|
|
4907
|
-
React$
|
|
4913
|
+
React$4.useEffect(callback, []);
|
|
4908
4914
|
useOnce(() => () => {
|
|
4909
4915
|
const observer2 = observerRef.current;
|
|
4910
4916
|
each(observer2.deps, (dep) => removeFluidObserver(dep, observer2));
|
|
@@ -6492,7 +6498,7 @@ const SpringContext = (_ref) => {
|
|
|
6492
6498
|
let {
|
|
6493
6499
|
children
|
|
6494
6500
|
} = _ref, props = _objectWithoutPropertiesLoose$3(_ref, _excluded$3$1);
|
|
6495
|
-
const inherited = React$
|
|
6501
|
+
const inherited = React$4.useContext(ctx);
|
|
6496
6502
|
const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
|
|
6497
6503
|
props = useMemoOne(() => ({
|
|
6498
6504
|
pause,
|
|
@@ -6585,10 +6591,10 @@ function useSprings(length, props, deps) {
|
|
|
6585
6591
|
const propsFn = is.fun(props) && props;
|
|
6586
6592
|
if (propsFn && !deps)
|
|
6587
6593
|
deps = [];
|
|
6588
|
-
const ref = React$
|
|
6589
|
-
const layoutId = React$
|
|
6594
|
+
const ref = React$4.useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);
|
|
6595
|
+
const layoutId = React$4.useRef(0);
|
|
6590
6596
|
const forceUpdate = useForceUpdate();
|
|
6591
|
-
const state = React$
|
|
6597
|
+
const state = React$4.useMemo(() => ({
|
|
6592
6598
|
ctrls: [],
|
|
6593
6599
|
queue: [],
|
|
6594
6600
|
flush(ctrl, updates2) {
|
|
@@ -6603,10 +6609,10 @@ function useSprings(length, props, deps) {
|
|
|
6603
6609
|
});
|
|
6604
6610
|
}
|
|
6605
6611
|
}), []);
|
|
6606
|
-
const ctrls = React$
|
|
6612
|
+
const ctrls = React$4.useRef([...state.ctrls]);
|
|
6607
6613
|
const updates = [];
|
|
6608
6614
|
const prevLength = usePrev(length) || 0;
|
|
6609
|
-
React$
|
|
6615
|
+
React$4.useMemo(() => {
|
|
6610
6616
|
each(ctrls.current.slice(length, prevLength), (ctrl) => {
|
|
6611
6617
|
detachRefs(ctrl, ref);
|
|
6612
6618
|
ctrl.stop(true);
|
|
@@ -6614,7 +6620,7 @@ function useSprings(length, props, deps) {
|
|
|
6614
6620
|
ctrls.current.length = length;
|
|
6615
6621
|
declareUpdates(prevLength, length);
|
|
6616
6622
|
}, [length]);
|
|
6617
|
-
React$
|
|
6623
|
+
React$4.useMemo(() => {
|
|
6618
6624
|
declareUpdates(0, Math.min(prevLength, length));
|
|
6619
6625
|
}, deps);
|
|
6620
6626
|
function declareUpdates(startIndex, endIndex) {
|
|
@@ -6627,7 +6633,7 @@ function useSprings(length, props, deps) {
|
|
|
6627
6633
|
}
|
|
6628
6634
|
}
|
|
6629
6635
|
const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]));
|
|
6630
|
-
const context = React$
|
|
6636
|
+
const context = React$4.useContext(SpringContext);
|
|
6631
6637
|
const prevContext = usePrev(context);
|
|
6632
6638
|
const hasContext = context !== prevContext && hasProps(context);
|
|
6633
6639
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -6985,14 +6991,14 @@ function resolveContainer(getContainer) {
|
|
|
6985
6991
|
return container || document.body;
|
|
6986
6992
|
}
|
|
6987
6993
|
function renderToContainer(getContainer, node) {
|
|
6988
|
-
if (canUseDom && getContainer) {
|
|
6994
|
+
if (canUseDom$2 && getContainer) {
|
|
6989
6995
|
const container = resolveContainer(getContainer);
|
|
6990
6996
|
return ReactDOM.createPortal(node, container);
|
|
6991
6997
|
}
|
|
6992
6998
|
return node;
|
|
6993
6999
|
}
|
|
6994
7000
|
function useInitialized(check) {
|
|
6995
|
-
const initializedRef = React$
|
|
7001
|
+
const initializedRef = React$4.useRef(check);
|
|
6996
7002
|
if (check) {
|
|
6997
7003
|
initializedRef.current = true;
|
|
6998
7004
|
}
|
|
@@ -7033,6 +7039,10 @@ const opacityRecord = {
|
|
|
7033
7039
|
thin: 0.35,
|
|
7034
7040
|
thick: 0.75
|
|
7035
7041
|
};
|
|
7042
|
+
const colorRecord$4 = {
|
|
7043
|
+
black: "0, 0, 0",
|
|
7044
|
+
white: "255, 255, 255"
|
|
7045
|
+
};
|
|
7036
7046
|
const defaultProps$13 = {
|
|
7037
7047
|
visible: true,
|
|
7038
7048
|
destroyOnClose: false,
|
|
@@ -7048,15 +7058,15 @@ const Mask$1 = (p) => {
|
|
|
7048
7058
|
const {
|
|
7049
7059
|
locale
|
|
7050
7060
|
} = useConfig();
|
|
7051
|
-
const ref = React$
|
|
7061
|
+
const ref = React$4.useRef(null);
|
|
7052
7062
|
useLockScroll(ref, props.visible && props.disableBodyScroll);
|
|
7053
|
-
const background = React$
|
|
7063
|
+
const background = React$4.useMemo(() => {
|
|
7054
7064
|
var _a;
|
|
7055
7065
|
const opacity2 = (_a = opacityRecord[props.opacity]) !== null && _a !== void 0 ? _a : props.opacity;
|
|
7056
|
-
const rgb2 = props.color
|
|
7057
|
-
return `rgba(${rgb2}, ${opacity2})
|
|
7066
|
+
const rgb2 = colorRecord$4[props.color];
|
|
7067
|
+
return rgb2 ? `rgba(${rgb2}, ${opacity2})` : props.color;
|
|
7058
7068
|
}, [props.color, props.opacity]);
|
|
7059
|
-
const [active, setActive] = React$
|
|
7069
|
+
const [active, setActive] = React$4.useState(props.visible);
|
|
7060
7070
|
const unmountedRef = useUnmountedRef$1();
|
|
7061
7071
|
const {
|
|
7062
7072
|
opacity
|
|
@@ -7716,7 +7726,7 @@ const defaultPopupBaseProps = {
|
|
|
7716
7726
|
visible: false
|
|
7717
7727
|
};
|
|
7718
7728
|
function useInnerVisible(outerVisible) {
|
|
7719
|
-
const [innerVisible, setInnerVisible] = React$
|
|
7729
|
+
const [innerVisible, setInnerVisible] = React$4.useState(outerVisible);
|
|
7720
7730
|
useIsomorphicLayoutEffect$2(() => {
|
|
7721
7731
|
setInnerVisible(outerVisible);
|
|
7722
7732
|
}, [outerVisible]);
|
|
@@ -7729,13 +7739,13 @@ const defaultProps$12 = Object.assign(Object.assign({}, defaultPopupBaseProps),
|
|
|
7729
7739
|
const Popup$1 = (p) => {
|
|
7730
7740
|
const props = mergeProps(defaultProps$12, p);
|
|
7731
7741
|
const bodyCls = classNames(`${classPrefix$1k}-body`, props.bodyClassName, `${classPrefix$1k}-body-position-${props.position}`);
|
|
7732
|
-
const [active, setActive] = React$
|
|
7742
|
+
const [active, setActive] = React$4.useState(props.visible);
|
|
7733
7743
|
useIsomorphicLayoutEffect$2(() => {
|
|
7734
7744
|
if (props.visible) {
|
|
7735
7745
|
setActive(true);
|
|
7736
7746
|
}
|
|
7737
7747
|
}, [props.visible]);
|
|
7738
|
-
const ref = React$
|
|
7748
|
+
const ref = React$4.useRef(null);
|
|
7739
7749
|
useLockScroll(ref, props.disableBodyScroll && active ? "strict" : false);
|
|
7740
7750
|
const unmountedRef = useUnmountedRef$1();
|
|
7741
7751
|
const {
|
|
@@ -7896,11 +7906,11 @@ function renderToBody(element) {
|
|
|
7896
7906
|
}
|
|
7897
7907
|
function renderImperatively(element) {
|
|
7898
7908
|
const Wrapper2 = React__default.default.forwardRef((_, ref) => {
|
|
7899
|
-
const [visible, setVisible] = React$
|
|
7900
|
-
const closedRef = React$
|
|
7901
|
-
const [elementToRender, setElementToRender] = React$
|
|
7902
|
-
const keyRef = React$
|
|
7903
|
-
React$
|
|
7909
|
+
const [visible, setVisible] = React$4.useState(false);
|
|
7910
|
+
const closedRef = React$4.useRef(false);
|
|
7911
|
+
const [elementToRender, setElementToRender] = React$4.useState(element);
|
|
7912
|
+
const keyRef = React$4.useRef(0);
|
|
7913
|
+
React$4.useEffect(() => {
|
|
7904
7914
|
if (!closedRef.current) {
|
|
7905
7915
|
setVisible(true);
|
|
7906
7916
|
} else {
|
|
@@ -7918,7 +7928,7 @@ function renderImperatively(element) {
|
|
|
7918
7928
|
unmount2();
|
|
7919
7929
|
(_b = (_a = elementToRender.props).afterClose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
7920
7930
|
}
|
|
7921
|
-
React$
|
|
7931
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
7922
7932
|
close: onClose,
|
|
7923
7933
|
replace: (element2) => {
|
|
7924
7934
|
var _a, _b;
|
|
@@ -8067,9 +8077,9 @@ function toCSSLength(val) {
|
|
|
8067
8077
|
return typeof val === "number" ? `${val}px` : val;
|
|
8068
8078
|
}
|
|
8069
8079
|
const LazyDetector = (props) => {
|
|
8070
|
-
const ref = React$
|
|
8080
|
+
const ref = React$4.useRef(null);
|
|
8071
8081
|
const [inViewport] = useInViewport(ref);
|
|
8072
|
-
React$
|
|
8082
|
+
React$4.useEffect(() => {
|
|
8073
8083
|
if (inViewport) {
|
|
8074
8084
|
props.onActive();
|
|
8075
8085
|
}
|
|
@@ -8109,12 +8119,12 @@ const defaultProps$10 = {
|
|
|
8109
8119
|
};
|
|
8110
8120
|
const Image$2 = staged_1((p) => {
|
|
8111
8121
|
const props = mergeProps(defaultProps$10, p);
|
|
8112
|
-
const [loaded, setLoaded] = React$
|
|
8113
|
-
const [failed, setFailed] = React$
|
|
8114
|
-
const ref = React$
|
|
8122
|
+
const [loaded, setLoaded] = React$4.useState(false);
|
|
8123
|
+
const [failed, setFailed] = React$4.useState(false);
|
|
8124
|
+
const ref = React$4.useRef(null);
|
|
8115
8125
|
let src = props.src;
|
|
8116
8126
|
let srcSet = props.srcSet;
|
|
8117
|
-
const [initialized, setInitialized] = React$
|
|
8127
|
+
const [initialized, setInitialized] = React$4.useState(!props.lazy);
|
|
8118
8128
|
src = initialized ? props.src : void 0;
|
|
8119
8129
|
srcSet = initialized ? props.srcSet : void 0;
|
|
8120
8130
|
useIsomorphicUpdateLayoutEffect(() => {
|
|
@@ -8176,7 +8186,7 @@ const Image$2 = staged_1((p) => {
|
|
|
8176
8186
|
}), renderInner()));
|
|
8177
8187
|
});
|
|
8178
8188
|
const Image$1 = Image$2;
|
|
8179
|
-
const Fallback = React$
|
|
8189
|
+
const Fallback = React$4.memo(() => React__default.default.createElement("svg", {
|
|
8180
8190
|
className: "adm-avatar-fallback",
|
|
8181
8191
|
width: "88px",
|
|
8182
8192
|
height: "88px",
|
|
@@ -8272,7 +8282,7 @@ const colorRecord$3 = {
|
|
|
8272
8282
|
const defaultProps$_ = {
|
|
8273
8283
|
color: "default"
|
|
8274
8284
|
};
|
|
8275
|
-
const DotLoading$2 = React$
|
|
8285
|
+
const DotLoading$2 = React$4.memo((p) => {
|
|
8276
8286
|
var _a;
|
|
8277
8287
|
const props = mergeProps(defaultProps$_, p);
|
|
8278
8288
|
return withNativeProps(props, React__default.default.createElement("div", {
|
|
@@ -8321,7 +8331,7 @@ function isPromise(obj) {
|
|
|
8321
8331
|
return !!obj && typeof obj === "object" && typeof obj.then === "function";
|
|
8322
8332
|
}
|
|
8323
8333
|
function isIOS() {
|
|
8324
|
-
return canUseDom ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
|
8334
|
+
return canUseDom$2 ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
|
8325
8335
|
}
|
|
8326
8336
|
const classPrefix$1c = `adm-button`;
|
|
8327
8337
|
const defaultProps$Z = {
|
|
@@ -8336,13 +8346,13 @@ const defaultProps$Z = {
|
|
|
8336
8346
|
shape: "default",
|
|
8337
8347
|
size: "middle"
|
|
8338
8348
|
};
|
|
8339
|
-
const Button$1 = React$
|
|
8349
|
+
const Button$1 = React$4.forwardRef((p, ref) => {
|
|
8340
8350
|
const props = mergeProps(defaultProps$Z, p);
|
|
8341
|
-
const [innerLoading, setInnerLoading] = React$
|
|
8342
|
-
const nativeButtonRef = React$
|
|
8351
|
+
const [innerLoading, setInnerLoading] = React$4.useState(false);
|
|
8352
|
+
const nativeButtonRef = React$4.useRef(null);
|
|
8343
8353
|
const loading = props.loading === "auto" ? innerLoading : props.loading;
|
|
8344
8354
|
const disabled = props.disabled || loading;
|
|
8345
|
-
React$
|
|
8355
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
8346
8356
|
get nativeElement() {
|
|
8347
8357
|
return nativeButtonRef.current;
|
|
8348
8358
|
}
|
|
@@ -8477,7 +8487,7 @@ function usePropsValue(options) {
|
|
|
8477
8487
|
onChange
|
|
8478
8488
|
} = options;
|
|
8479
8489
|
const update2 = useUpdate$1();
|
|
8480
|
-
const stateRef = React$
|
|
8490
|
+
const stateRef = React$4.useRef(value !== void 0 ? value : defaultValue);
|
|
8481
8491
|
if (value !== void 0) {
|
|
8482
8492
|
stateRef.current = value;
|
|
8483
8493
|
}
|
|
@@ -8517,7 +8527,7 @@ const defaultProps$Y = {
|
|
|
8517
8527
|
nextMonthButton: React__default.default.createElement(ArrowLeft, null),
|
|
8518
8528
|
nextYearButton: React__default.default.createElement(ArrowLeftDouble, null)
|
|
8519
8529
|
};
|
|
8520
|
-
const Calendar$1 = React$
|
|
8530
|
+
const Calendar$1 = React$4.forwardRef((p, ref) => {
|
|
8521
8531
|
const today = dayjs();
|
|
8522
8532
|
const props = mergeProps(defaultProps$Y, p);
|
|
8523
8533
|
const {
|
|
@@ -8541,13 +8551,13 @@ const Calendar$1 = React$1.forwardRef((p, ref) => {
|
|
|
8541
8551
|
}
|
|
8542
8552
|
}
|
|
8543
8553
|
});
|
|
8544
|
-
const [intermediate, setIntermediate] = React$
|
|
8545
|
-
const [current, setCurrent] = React$
|
|
8554
|
+
const [intermediate, setIntermediate] = React$4.useState(false);
|
|
8555
|
+
const [current, setCurrent] = React$4.useState(() => dayjs(dateRange ? dateRange[0] : today).date(1));
|
|
8546
8556
|
useUpdateEffect(() => {
|
|
8547
8557
|
var _a;
|
|
8548
8558
|
(_a = props.onPageChange) === null || _a === void 0 ? void 0 : _a.call(props, current.year(), current.month() + 1);
|
|
8549
8559
|
}, [current]);
|
|
8550
|
-
React$
|
|
8560
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
8551
8561
|
jumpTo: (pageOrPageGenerator) => {
|
|
8552
8562
|
let page;
|
|
8553
8563
|
if (typeof pageOrPageGenerator === "function") {
|
|
@@ -8605,8 +8615,8 @@ const Calendar$1 = React$1.forwardRef((p, ref) => {
|
|
|
8605
8615
|
handlePageChange("add", 1, "year");
|
|
8606
8616
|
}
|
|
8607
8617
|
}, props.nextYearButton));
|
|
8608
|
-
const maxDay = React$
|
|
8609
|
-
const minDay = React$
|
|
8618
|
+
const maxDay = React$4.useMemo(() => props.max && dayjs(props.max), [props.max]);
|
|
8619
|
+
const minDay = React$4.useMemo(() => props.min && dayjs(props.min), [props.min]);
|
|
8610
8620
|
function renderCells() {
|
|
8611
8621
|
var _a;
|
|
8612
8622
|
const cells = [];
|
|
@@ -8619,11 +8629,17 @@ const Calendar$1 = React$1.forwardRef((p, ref) => {
|
|
|
8619
8629
|
let isSelect = false;
|
|
8620
8630
|
let isBegin = false;
|
|
8621
8631
|
let isEnd = false;
|
|
8632
|
+
let isSelectRowBegin = false;
|
|
8633
|
+
let isSelectRowEnd = false;
|
|
8622
8634
|
if (dateRange) {
|
|
8623
8635
|
const [begin, end] = dateRange;
|
|
8624
8636
|
isBegin = d.isSame(begin, "day");
|
|
8625
8637
|
isEnd = d.isSame(end, "day");
|
|
8626
8638
|
isSelect = isBegin || isEnd || d.isAfter(begin, "day") && d.isBefore(end, "day");
|
|
8639
|
+
if (isSelect) {
|
|
8640
|
+
isSelectRowBegin = (cells.length % 7 === 0 || d.isSame(d.startOf("month"), "day")) && !isBegin;
|
|
8641
|
+
isSelectRowEnd = (cells.length % 7 === 6 || d.isSame(d.endOf("month"), "day")) && !isEnd;
|
|
8642
|
+
}
|
|
8627
8643
|
}
|
|
8628
8644
|
const inThisMonth = d.month() === current.month();
|
|
8629
8645
|
const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
@@ -8633,7 +8649,9 @@ const Calendar$1 = React$1.forwardRef((p, ref) => {
|
|
|
8633
8649
|
[`${classPrefix$1b}-cell-today`]: d.isSame(today, "day"),
|
|
8634
8650
|
[`${classPrefix$1b}-cell-selected`]: isSelect,
|
|
8635
8651
|
[`${classPrefix$1b}-cell-selected-begin`]: isBegin,
|
|
8636
|
-
[`${classPrefix$1b}-cell-selected-end`]: isEnd
|
|
8652
|
+
[`${classPrefix$1b}-cell-selected-end`]: isEnd,
|
|
8653
|
+
[`${classPrefix$1b}-cell-selected-row-begin`]: isSelectRowBegin,
|
|
8654
|
+
[`${classPrefix$1b}-cell-selected-row-end`]: isSelectRowEnd
|
|
8637
8655
|
}),
|
|
8638
8656
|
onClick: () => {
|
|
8639
8657
|
if (!props.selectionMode)
|
|
@@ -8726,7 +8744,7 @@ function useResizeEffect(effect, targetRef) {
|
|
|
8726
8744
|
}
|
|
8727
8745
|
function useMutationEffect(effect, targetRef, options) {
|
|
8728
8746
|
const fn = useMemoizedFn(effect);
|
|
8729
|
-
React$
|
|
8747
|
+
React$4.useEffect(() => {
|
|
8730
8748
|
const observer = new MutationObserver(() => {
|
|
8731
8749
|
fn();
|
|
8732
8750
|
});
|
|
@@ -8804,7 +8822,7 @@ const useTabListScroll = (targetRef, activeIndex) => {
|
|
|
8804
8822
|
const scrollMask = "";
|
|
8805
8823
|
const classPrefix$1a = `adm-scroll-mask`;
|
|
8806
8824
|
const ScrollMask$1 = (props) => {
|
|
8807
|
-
const maskRef = React$
|
|
8825
|
+
const maskRef = React$4.useRef(null);
|
|
8808
8826
|
const [{
|
|
8809
8827
|
leftMaskOpacity,
|
|
8810
8828
|
rightMaskOpacity
|
|
@@ -8837,10 +8855,10 @@ const ScrollMask$1 = (props) => {
|
|
|
8837
8855
|
trailing: true,
|
|
8838
8856
|
leading: true
|
|
8839
8857
|
});
|
|
8840
|
-
React$
|
|
8858
|
+
React$4.useEffect(() => {
|
|
8841
8859
|
updateMask(true);
|
|
8842
8860
|
}, []);
|
|
8843
|
-
React$
|
|
8861
|
+
React$4.useEffect(() => {
|
|
8844
8862
|
const scrollEl = props.scrollTrackRef.current;
|
|
8845
8863
|
if (!scrollEl)
|
|
8846
8864
|
return;
|
|
@@ -9077,8 +9095,8 @@ const CapsuleTab = () => {
|
|
|
9077
9095
|
};
|
|
9078
9096
|
const CapsuleTabs = (props) => {
|
|
9079
9097
|
var _a;
|
|
9080
|
-
const tabListContainerRef = React$
|
|
9081
|
-
const rootRef = React$
|
|
9098
|
+
const tabListContainerRef = React$4.useRef(null);
|
|
9099
|
+
const rootRef = React$4.useRef(null);
|
|
9082
9100
|
const keyToIndexRecord = {};
|
|
9083
9101
|
let firstActiveKey = null;
|
|
9084
9102
|
const panes = [];
|
|
@@ -10691,7 +10709,7 @@ function resolveWith(config2 = {}, resolvers) {
|
|
|
10691
10709
|
}
|
|
10692
10710
|
return result2;
|
|
10693
10711
|
}
|
|
10694
|
-
function parse
|
|
10712
|
+
function parse(newConfig, gestureKey, _config = {}) {
|
|
10695
10713
|
const _ref = newConfig, {
|
|
10696
10714
|
target,
|
|
10697
10715
|
eventOptions,
|
|
@@ -10809,7 +10827,7 @@ class Controller {
|
|
|
10809
10827
|
this.nativeHandlers = nativeHandlers;
|
|
10810
10828
|
}
|
|
10811
10829
|
applyConfig(config2, gestureKey) {
|
|
10812
|
-
this.config = parse
|
|
10830
|
+
this.config = parse(config2, gestureKey, this.config);
|
|
10813
10831
|
}
|
|
10814
10832
|
clean() {
|
|
10815
10833
|
this._targetEventStore.clean();
|
|
@@ -11033,7 +11051,7 @@ function measureCSSLength(raw) {
|
|
|
11033
11051
|
}
|
|
11034
11052
|
}
|
|
11035
11053
|
const classPrefix$17 = `adm-picker-view`;
|
|
11036
|
-
const Wheel = React$
|
|
11054
|
+
const Wheel = React$4.memo((props) => {
|
|
11037
11055
|
const {
|
|
11038
11056
|
value,
|
|
11039
11057
|
column,
|
|
@@ -11053,10 +11071,10 @@ const Wheel = React$1.memo((props) => {
|
|
|
11053
11071
|
mass: 0.8
|
|
11054
11072
|
}
|
|
11055
11073
|
}));
|
|
11056
|
-
const draggingRef = React$
|
|
11057
|
-
const rootRef = React$
|
|
11058
|
-
const itemHeightMeasureRef = React$
|
|
11059
|
-
const itemHeight = React$
|
|
11074
|
+
const draggingRef = React$4.useRef(false);
|
|
11075
|
+
const rootRef = React$4.useRef(null);
|
|
11076
|
+
const itemHeightMeasureRef = React$4.useRef(null);
|
|
11077
|
+
const itemHeight = React$4.useRef(34);
|
|
11060
11078
|
useIsomorphicLayoutEffect$2(() => {
|
|
11061
11079
|
const itemHeightMeasure = itemHeightMeasureRef.current;
|
|
11062
11080
|
if (!itemHeightMeasure)
|
|
@@ -11261,9 +11279,9 @@ function generateColumnsExtend(rawColumns, val) {
|
|
|
11261
11279
|
return extend;
|
|
11262
11280
|
}
|
|
11263
11281
|
function useColumnsExtend(rawColumns, value) {
|
|
11264
|
-
return React$
|
|
11282
|
+
return React$4.useMemo(() => generateColumnsExtend(rawColumns, value), [rawColumns, value]);
|
|
11265
11283
|
}
|
|
11266
|
-
const defaultRenderLabel
|
|
11284
|
+
const defaultRenderLabel = (item) => item.label;
|
|
11267
11285
|
const spinLoading = "";
|
|
11268
11286
|
var shim = { exports: {} };
|
|
11269
11287
|
var useSyncExternalStoreShim_development = {};
|
|
@@ -11312,7 +11330,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
11312
11330
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
11313
11331
|
}
|
|
11314
11332
|
var objectIs = typeof Object.is === "function" ? Object.is : is2;
|
|
11315
|
-
var
|
|
11333
|
+
var useState2 = React2.useState, useEffect = React2.useEffect, useLayoutEffect2 = React2.useLayoutEffect, useDebugValue = React2.useDebugValue;
|
|
11316
11334
|
var didWarnOld18Alpha = false;
|
|
11317
11335
|
var didWarnUncachedGetSnapshot = false;
|
|
11318
11336
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
@@ -11334,13 +11352,13 @@ var useSyncExternalStoreShim_development = {};
|
|
|
11334
11352
|
}
|
|
11335
11353
|
}
|
|
11336
11354
|
}
|
|
11337
|
-
var _useState =
|
|
11355
|
+
var _useState = useState2({
|
|
11338
11356
|
inst: {
|
|
11339
11357
|
value,
|
|
11340
11358
|
getSnapshot
|
|
11341
11359
|
}
|
|
11342
11360
|
}), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
11343
|
-
|
|
11361
|
+
useLayoutEffect2(function() {
|
|
11344
11362
|
inst.value = value;
|
|
11345
11363
|
inst.getSnapshot = getSnapshot;
|
|
11346
11364
|
if (checkIfSnapshotChanged(inst)) {
|
|
@@ -11437,7 +11455,7 @@ const defaultProps$X = {
|
|
|
11437
11455
|
color: "default"
|
|
11438
11456
|
};
|
|
11439
11457
|
const circumference = 15 * 3.14159265358979 * 2;
|
|
11440
|
-
const SpinLoading$1 = React$
|
|
11458
|
+
const SpinLoading$1 = React$4.memo((p) => {
|
|
11441
11459
|
var _a;
|
|
11442
11460
|
const props = mergeProps(defaultProps$X, p);
|
|
11443
11461
|
const motionReduced = useMotionReduced();
|
|
@@ -11483,23 +11501,23 @@ const SpinLoading = SpinLoading$1;
|
|
|
11483
11501
|
const classPrefix$15 = `adm-picker-view`;
|
|
11484
11502
|
const defaultProps$W = {
|
|
11485
11503
|
defaultValue: [],
|
|
11486
|
-
renderLabel: defaultRenderLabel
|
|
11504
|
+
renderLabel: defaultRenderLabel,
|
|
11487
11505
|
mouseWheel: false,
|
|
11488
11506
|
loadingContent: React__default.default.createElement("div", {
|
|
11489
11507
|
className: `${classPrefix$15}-loading-content`
|
|
11490
11508
|
}, React__default.default.createElement(SpinLoading, null))
|
|
11491
11509
|
};
|
|
11492
|
-
const PickerView$1 = React$
|
|
11510
|
+
const PickerView$1 = React$4.memo((p) => {
|
|
11493
11511
|
const props = mergeProps(defaultProps$W, p);
|
|
11494
|
-
const [innerValue, setInnerValue] = React$
|
|
11495
|
-
React$
|
|
11512
|
+
const [innerValue, setInnerValue] = React$4.useState(props.value === void 0 ? props.defaultValue : props.value);
|
|
11513
|
+
React$4.useEffect(() => {
|
|
11496
11514
|
if (props.value === void 0)
|
|
11497
11515
|
return;
|
|
11498
11516
|
if (props.value === innerValue)
|
|
11499
11517
|
return;
|
|
11500
11518
|
setInnerValue(props.value);
|
|
11501
11519
|
}, [props.value]);
|
|
11502
|
-
React$
|
|
11520
|
+
React$4.useEffect(() => {
|
|
11503
11521
|
if (props.value === innerValue)
|
|
11504
11522
|
return;
|
|
11505
11523
|
const timeout = window.setTimeout(() => {
|
|
@@ -11523,7 +11541,7 @@ const PickerView$1 = React$1.memo((p) => {
|
|
|
11523
11541
|
leading: false,
|
|
11524
11542
|
trailing: true
|
|
11525
11543
|
});
|
|
11526
|
-
const handleSelect = React$
|
|
11544
|
+
const handleSelect = React$4.useCallback((val, index2) => {
|
|
11527
11545
|
setInnerValue((prev) => {
|
|
11528
11546
|
const next = [...prev];
|
|
11529
11547
|
next[index2] = val;
|
|
@@ -11557,11 +11575,11 @@ const classPrefix$14 = `adm-picker`;
|
|
|
11557
11575
|
const defaultProps$V = {
|
|
11558
11576
|
defaultValue: [],
|
|
11559
11577
|
closeOnMaskClick: true,
|
|
11560
|
-
renderLabel: defaultRenderLabel
|
|
11578
|
+
renderLabel: defaultRenderLabel,
|
|
11561
11579
|
destroyOnClose: false,
|
|
11562
11580
|
forceRender: false
|
|
11563
11581
|
};
|
|
11564
|
-
const Picker$1 = React$
|
|
11582
|
+
const Picker$1 = React$4.memo(React$4.forwardRef((p, ref) => {
|
|
11565
11583
|
var _a;
|
|
11566
11584
|
const {
|
|
11567
11585
|
locale
|
|
@@ -11591,7 +11609,7 @@ const Picker$1 = React$1.memo(React$1.forwardRef((p, ref) => {
|
|
|
11591
11609
|
setVisible(false);
|
|
11592
11610
|
}
|
|
11593
11611
|
};
|
|
11594
|
-
React$
|
|
11612
|
+
React$4.useImperativeHandle(ref, () => actions);
|
|
11595
11613
|
const [value, setValue2] = usePropsValue(Object.assign(Object.assign({}, props), {
|
|
11596
11614
|
onChange: (val) => {
|
|
11597
11615
|
var _a2;
|
|
@@ -11600,13 +11618,13 @@ const Picker$1 = React$1.memo(React$1.forwardRef((p, ref) => {
|
|
|
11600
11618
|
}
|
|
11601
11619
|
}));
|
|
11602
11620
|
const extend = useColumnsExtend(props.columns, value);
|
|
11603
|
-
const [innerValue, setInnerValue] = React$
|
|
11604
|
-
React$
|
|
11621
|
+
const [innerValue, setInnerValue] = React$4.useState(value);
|
|
11622
|
+
React$4.useEffect(() => {
|
|
11605
11623
|
if (innerValue !== value) {
|
|
11606
11624
|
setInnerValue(value);
|
|
11607
11625
|
}
|
|
11608
11626
|
}, [visible]);
|
|
11609
|
-
React$
|
|
11627
|
+
React$4.useEffect(() => {
|
|
11610
11628
|
if (!visible) {
|
|
11611
11629
|
setInnerValue(value);
|
|
11612
11630
|
}
|
|
@@ -11681,8 +11699,8 @@ Picker$1.displayName = "Picker";
|
|
|
11681
11699
|
function prompt$3(props) {
|
|
11682
11700
|
return new Promise((resolve) => {
|
|
11683
11701
|
const Wrapper2 = () => {
|
|
11684
|
-
const [visible, setVisible] = React$
|
|
11685
|
-
React$
|
|
11702
|
+
const [visible, setVisible] = React$4.useState(false);
|
|
11703
|
+
React$4.useEffect(() => {
|
|
11686
11704
|
setVisible(true);
|
|
11687
11705
|
}, []);
|
|
11688
11706
|
return React__default.default.createElement(Picker$1, Object.assign({}, props, {
|
|
@@ -11712,7 +11730,7 @@ const Picker = attachPropertiesToComponent(Picker$1, {
|
|
|
11712
11730
|
prompt: prompt$3
|
|
11713
11731
|
});
|
|
11714
11732
|
function useColumnsFn(options) {
|
|
11715
|
-
const depth = React$
|
|
11733
|
+
const depth = React$4.useMemo(() => {
|
|
11716
11734
|
let depth2 = 0;
|
|
11717
11735
|
function traverse(options2, currentDepth) {
|
|
11718
11736
|
if (currentDepth > depth2)
|
|
@@ -11750,7 +11768,7 @@ function useColumnsFn(options) {
|
|
|
11750
11768
|
return columns;
|
|
11751
11769
|
};
|
|
11752
11770
|
}
|
|
11753
|
-
const CascadePicker = React$
|
|
11771
|
+
const CascadePicker = React$4.forwardRef((props, ref) => {
|
|
11754
11772
|
const {
|
|
11755
11773
|
options
|
|
11756
11774
|
} = props, pickerProps = __rest(props, ["options"]);
|
|
@@ -11763,8 +11781,8 @@ const CascadePicker = React$1.forwardRef((props, ref) => {
|
|
|
11763
11781
|
function prompt$2(props) {
|
|
11764
11782
|
return new Promise((resolve) => {
|
|
11765
11783
|
const Wrapper2 = () => {
|
|
11766
|
-
const [visible, setVisible] = React$
|
|
11767
|
-
React$
|
|
11784
|
+
const [visible, setVisible] = React$4.useState(false);
|
|
11785
|
+
React$4.useEffect(() => {
|
|
11768
11786
|
setVisible(true);
|
|
11769
11787
|
}, []);
|
|
11770
11788
|
return React__default.default.createElement(CascadePicker, Object.assign({}, props, {
|
|
@@ -11816,8 +11834,8 @@ const defaultProps$U = {
|
|
|
11816
11834
|
const Tabs$1 = (p) => {
|
|
11817
11835
|
var _a;
|
|
11818
11836
|
const props = mergeProps(defaultProps$U, p);
|
|
11819
|
-
const tabListContainerRef = React$
|
|
11820
|
-
const activeLineRef = React$
|
|
11837
|
+
const tabListContainerRef = React$4.useRef(null);
|
|
11838
|
+
const activeLineRef = React$4.useRef(null);
|
|
11821
11839
|
const keyToIndexRecord = {};
|
|
11822
11840
|
let firstActiveKey = null;
|
|
11823
11841
|
const panes = [];
|
|
@@ -12039,10 +12057,10 @@ const classPrefix$12 = `adm-list`;
|
|
|
12039
12057
|
const defaultProps$T = {
|
|
12040
12058
|
mode: "default"
|
|
12041
12059
|
};
|
|
12042
|
-
const List$2 = React$
|
|
12060
|
+
const List$2 = React$4.forwardRef((p, ref) => {
|
|
12043
12061
|
const props = mergeProps(defaultProps$T, p);
|
|
12044
|
-
const nativeElementRef = React$
|
|
12045
|
-
React$
|
|
12062
|
+
const nativeElementRef = React$4.useRef(null);
|
|
12063
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
12046
12064
|
get nativeElement() {
|
|
12047
12065
|
return nativeElementRef.current;
|
|
12048
12066
|
}
|
|
@@ -12089,7 +12107,7 @@ const ListItem = (props) => {
|
|
|
12089
12107
|
const List$1 = attachPropertiesToComponent(List$2, {
|
|
12090
12108
|
Item: ListItem
|
|
12091
12109
|
});
|
|
12092
|
-
const CheckListContext = React$
|
|
12110
|
+
const CheckListContext = React$4.createContext(null);
|
|
12093
12111
|
const classPrefix$10 = "adm-check-list";
|
|
12094
12112
|
const defaultProps$S = {
|
|
12095
12113
|
multiple: false,
|
|
@@ -12130,7 +12148,7 @@ const CheckList$1 = (p) => {
|
|
|
12130
12148
|
};
|
|
12131
12149
|
const classPrefix$$ = `adm-check-list-item`;
|
|
12132
12150
|
const CheckListItem = (props) => {
|
|
12133
|
-
const context = React$
|
|
12151
|
+
const context = React$4.useContext(CheckListContext);
|
|
12134
12152
|
if (context === null) {
|
|
12135
12153
|
devWarning("CheckList.Item", "CheckList.Item can only be used inside CheckList.");
|
|
12136
12154
|
return null;
|
|
@@ -12186,7 +12204,7 @@ function memoize(func, resolver) {
|
|
|
12186
12204
|
memoize.Cache = MapCache;
|
|
12187
12205
|
var memoize_1 = memoize;
|
|
12188
12206
|
function useCascaderValueExtend(options) {
|
|
12189
|
-
const generateItems = React$
|
|
12207
|
+
const generateItems = React$4.useMemo(() => {
|
|
12190
12208
|
return memoize_1((val) => {
|
|
12191
12209
|
const ret = [];
|
|
12192
12210
|
let currentOptions = options;
|
|
@@ -12203,7 +12221,7 @@ function useCascaderValueExtend(options) {
|
|
|
12203
12221
|
return ret;
|
|
12204
12222
|
}, (val) => JSON.stringify(val));
|
|
12205
12223
|
}, [options]);
|
|
12206
|
-
const generateIsLeaf = React$
|
|
12224
|
+
const generateIsLeaf = React$4.useMemo(() => {
|
|
12207
12225
|
return memoize_1((val) => {
|
|
12208
12226
|
const children = val.reduce((currentOptions, v) => {
|
|
12209
12227
|
var _a;
|
|
@@ -12282,13 +12300,13 @@ const CascaderView$1 = (p) => {
|
|
|
12282
12300
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, val, generateValueExtend(val));
|
|
12283
12301
|
}
|
|
12284
12302
|
}));
|
|
12285
|
-
const [tabActiveIndex, setTabActiveIndex] = React$
|
|
12303
|
+
const [tabActiveIndex, setTabActiveIndex] = React$4.useState(0);
|
|
12286
12304
|
useUpdateEffect(() => {
|
|
12287
12305
|
var _a;
|
|
12288
12306
|
(_a = props.onTabsChange) === null || _a === void 0 ? void 0 : _a.call(props, tabActiveIndex);
|
|
12289
12307
|
}, [tabActiveIndex]);
|
|
12290
12308
|
const generateValueExtend = useCascaderValueExtend(props.options);
|
|
12291
|
-
const levels = React$
|
|
12309
|
+
const levels = React$4.useMemo(() => {
|
|
12292
12310
|
const ret = [];
|
|
12293
12311
|
let currentOptions = props.options;
|
|
12294
12312
|
let reachedEnd = false;
|
|
@@ -12312,10 +12330,10 @@ const CascaderView$1 = (p) => {
|
|
|
12312
12330
|
}
|
|
12313
12331
|
return ret;
|
|
12314
12332
|
}, [value, props.options]);
|
|
12315
|
-
React$
|
|
12333
|
+
React$4.useEffect(() => {
|
|
12316
12334
|
setTabActiveIndex(levels.length - 1);
|
|
12317
12335
|
}, [value]);
|
|
12318
|
-
React$
|
|
12336
|
+
React$4.useEffect(() => {
|
|
12319
12337
|
const max2 = levels.length - 1;
|
|
12320
12338
|
if (tabActiveIndex > max2) {
|
|
12321
12339
|
setTabActiveIndex(max2);
|
|
@@ -12388,7 +12406,7 @@ const defaultProps$Q = {
|
|
|
12388
12406
|
destroyOnClose: true,
|
|
12389
12407
|
forceRender: false
|
|
12390
12408
|
};
|
|
12391
|
-
const Cascader = React$
|
|
12409
|
+
const Cascader = React$4.forwardRef((p, ref) => {
|
|
12392
12410
|
var _a;
|
|
12393
12411
|
const {
|
|
12394
12412
|
locale
|
|
@@ -12419,7 +12437,7 @@ const Cascader = React$1.forwardRef((p, ref) => {
|
|
|
12419
12437
|
setVisible(false);
|
|
12420
12438
|
}
|
|
12421
12439
|
};
|
|
12422
|
-
React$
|
|
12440
|
+
React$4.useImperativeHandle(ref, () => actions);
|
|
12423
12441
|
const [value, setValue2] = usePropsValue(Object.assign(Object.assign({}, props), {
|
|
12424
12442
|
onChange: (val) => {
|
|
12425
12443
|
var _a2;
|
|
@@ -12427,13 +12445,13 @@ const Cascader = React$1.forwardRef((p, ref) => {
|
|
|
12427
12445
|
}
|
|
12428
12446
|
}));
|
|
12429
12447
|
const generateValueExtend = useCascaderValueExtend(props.options);
|
|
12430
|
-
const [innerValue, setInnerValue] = React$
|
|
12431
|
-
React$
|
|
12448
|
+
const [innerValue, setInnerValue] = React$4.useState(value);
|
|
12449
|
+
React$4.useEffect(() => {
|
|
12432
12450
|
if (!visible) {
|
|
12433
12451
|
setInnerValue(value);
|
|
12434
12452
|
}
|
|
12435
12453
|
}, [visible]);
|
|
12436
|
-
React$
|
|
12454
|
+
React$4.useEffect(() => {
|
|
12437
12455
|
if (!visible) {
|
|
12438
12456
|
setInnerValue(value);
|
|
12439
12457
|
}
|
|
@@ -12490,8 +12508,8 @@ const Cascader = React$1.forwardRef((p, ref) => {
|
|
|
12490
12508
|
function prompt$1(props) {
|
|
12491
12509
|
return new Promise((resolve) => {
|
|
12492
12510
|
const Wrapper2 = () => {
|
|
12493
|
-
const [visible, setVisible] = React$
|
|
12494
|
-
React$
|
|
12511
|
+
const [visible, setVisible] = React$4.useState(false);
|
|
12512
|
+
React$4.useEffect(() => {
|
|
12495
12513
|
setVisible(true);
|
|
12496
12514
|
}, []);
|
|
12497
12515
|
return React__default.default.createElement(Cascader, Object.assign({}, props, {
|
|
@@ -12550,13 +12568,13 @@ const CenterPopup$1 = (p) => {
|
|
|
12550
12568
|
}
|
|
12551
12569
|
}
|
|
12552
12570
|
});
|
|
12553
|
-
const [active, setActive] = React$
|
|
12571
|
+
const [active, setActive] = React$4.useState(props.visible);
|
|
12554
12572
|
useIsomorphicLayoutEffect$2(() => {
|
|
12555
12573
|
if (props.visible) {
|
|
12556
12574
|
setActive(true);
|
|
12557
12575
|
}
|
|
12558
12576
|
}, [props.visible]);
|
|
12559
|
-
const ref = React$
|
|
12577
|
+
const ref = React$4.useRef(null);
|
|
12560
12578
|
useLockScroll(ref, props.disableBodyScroll && active);
|
|
12561
12579
|
const maskVisible = useInnerVisible(active && props.visible);
|
|
12562
12580
|
const body = React__default.default.createElement("div", {
|
|
@@ -12606,7 +12624,7 @@ const CenterPopup$1 = (p) => {
|
|
|
12606
12624
|
};
|
|
12607
12625
|
const CenterPopup = CenterPopup$1;
|
|
12608
12626
|
const checkbox = "";
|
|
12609
|
-
const CheckboxGroupContext = React$
|
|
12627
|
+
const CheckboxGroupContext = React$4.createContext(null);
|
|
12610
12628
|
const defaultProps$O = {
|
|
12611
12629
|
disabled: false,
|
|
12612
12630
|
defaultValue: []
|
|
@@ -12631,7 +12649,7 @@ const Group$1 = (p) => {
|
|
|
12631
12649
|
props.children
|
|
12632
12650
|
);
|
|
12633
12651
|
};
|
|
12634
|
-
const CheckIcon = React$
|
|
12652
|
+
const CheckIcon = React$4.memo((props) => {
|
|
12635
12653
|
return withNativeProps(props, React__default.default.createElement("svg", {
|
|
12636
12654
|
viewBox: "0 0 40 40"
|
|
12637
12655
|
}, React__default.default.createElement("path", {
|
|
@@ -12639,7 +12657,7 @@ const CheckIcon = React$1.memo((props) => {
|
|
|
12639
12657
|
fill: "currentColor"
|
|
12640
12658
|
})));
|
|
12641
12659
|
});
|
|
12642
|
-
const IndeterminateIcon = React$
|
|
12660
|
+
const IndeterminateIcon = React$4.memo((props) => {
|
|
12643
12661
|
return withNativeProps(props, React__default.default.createElement("svg", {
|
|
12644
12662
|
viewBox: "0 0 40 40"
|
|
12645
12663
|
}, React__default.default.createElement("path", {
|
|
@@ -12648,7 +12666,7 @@ const IndeterminateIcon = React$1.memo((props) => {
|
|
|
12648
12666
|
})));
|
|
12649
12667
|
});
|
|
12650
12668
|
const NativeInput = (props) => {
|
|
12651
|
-
const inputRef = React$
|
|
12669
|
+
const inputRef = React$4.useRef(null);
|
|
12652
12670
|
const handleClick = useMemoizedFn((e) => {
|
|
12653
12671
|
e.stopPropagation();
|
|
12654
12672
|
e.stopImmediatePropagation();
|
|
@@ -12657,7 +12675,7 @@ const NativeInput = (props) => {
|
|
|
12657
12675
|
return;
|
|
12658
12676
|
props.onChange(latestChecked);
|
|
12659
12677
|
});
|
|
12660
|
-
React$
|
|
12678
|
+
React$4.useEffect(() => {
|
|
12661
12679
|
if (props.disabled)
|
|
12662
12680
|
return;
|
|
12663
12681
|
if (!inputRef.current)
|
|
@@ -12683,8 +12701,8 @@ const defaultProps$N = {
|
|
|
12683
12701
|
defaultChecked: false,
|
|
12684
12702
|
indeterminate: false
|
|
12685
12703
|
};
|
|
12686
|
-
const Checkbox$1 = React$
|
|
12687
|
-
const groupContext = React$
|
|
12704
|
+
const Checkbox$1 = React$4.forwardRef((p, ref) => {
|
|
12705
|
+
const groupContext = React$4.useContext(CheckboxGroupContext);
|
|
12688
12706
|
const props = mergeProps(defaultProps$N, p);
|
|
12689
12707
|
let [checked, setChecked] = usePropsValue({
|
|
12690
12708
|
value: props.checked,
|
|
@@ -12716,7 +12734,7 @@ const Checkbox$1 = React$1.forwardRef((p, ref) => {
|
|
|
12716
12734
|
};
|
|
12717
12735
|
disabled = disabled || groupContext.disabled;
|
|
12718
12736
|
}
|
|
12719
|
-
React$
|
|
12737
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
12720
12738
|
check: () => {
|
|
12721
12739
|
setChecked(true);
|
|
12722
12740
|
},
|
|
@@ -12766,7 +12784,7 @@ const CollapsePanelContent = (props) => {
|
|
|
12766
12784
|
const {
|
|
12767
12785
|
visible
|
|
12768
12786
|
} = props;
|
|
12769
|
-
const innerRef = React$
|
|
12787
|
+
const innerRef = React$4.useRef(null);
|
|
12770
12788
|
const shouldRender = useShouldRender(visible, props.forceRender, props.destroyOnClose);
|
|
12771
12789
|
const [{
|
|
12772
12790
|
height
|
|
@@ -12932,6 +12950,7 @@ var isLeapYear$1 = { exports: {} };
|
|
|
12932
12950
|
});
|
|
12933
12951
|
})(isLeapYear$1);
|
|
12934
12952
|
const isLeapYear = isLeapYear$1.exports;
|
|
12953
|
+
const TILL_NOW = "TILL_NOW";
|
|
12935
12954
|
dayjs.extend(isoWeek);
|
|
12936
12955
|
dayjs.extend(isoWeeksInYear);
|
|
12937
12956
|
dayjs.extend(isLeapYear);
|
|
@@ -12943,17 +12962,7 @@ const precisionRankRecord$1 = {
|
|
|
12943
12962
|
minute: 4,
|
|
12944
12963
|
second: 5
|
|
12945
12964
|
};
|
|
12946
|
-
function
|
|
12947
|
-
switch (type4) {
|
|
12948
|
-
case "minute":
|
|
12949
|
-
case "second":
|
|
12950
|
-
case "hour":
|
|
12951
|
-
return ("0" + data.toString()).slice(-2);
|
|
12952
|
-
default:
|
|
12953
|
-
return data.toString();
|
|
12954
|
-
}
|
|
12955
|
-
}
|
|
12956
|
-
function generateDatePickerColumns$2(selected, min2, max2, precision, renderLabel, filter) {
|
|
12965
|
+
function generateDatePickerColumns$2(selected, min2, max2, precision, renderLabel, filter, tillNow) {
|
|
12957
12966
|
const ret = [];
|
|
12958
12967
|
const minYear = min2.getFullYear();
|
|
12959
12968
|
const minMonth = min2.getMonth() + 1;
|
|
@@ -13067,6 +13076,17 @@ function generateDatePickerColumns$2(selected, min2, max2, precision, renderLabe
|
|
|
13067
13076
|
};
|
|
13068
13077
|
}));
|
|
13069
13078
|
}
|
|
13079
|
+
if (tillNow) {
|
|
13080
|
+
ret[0].push({
|
|
13081
|
+
label: renderLabel("now", null),
|
|
13082
|
+
value: TILL_NOW
|
|
13083
|
+
});
|
|
13084
|
+
if (TILL_NOW === (selected === null || selected === void 0 ? void 0 : selected[0])) {
|
|
13085
|
+
for (let i = 1; i < ret.length; i += 1) {
|
|
13086
|
+
ret[i] = [];
|
|
13087
|
+
}
|
|
13088
|
+
}
|
|
13089
|
+
}
|
|
13070
13090
|
return ret;
|
|
13071
13091
|
}
|
|
13072
13092
|
function convertDateToStringArray$2(date4) {
|
|
@@ -13092,9 +13112,6 @@ const precisionRankRecord = {
|
|
|
13092
13112
|
week: 1,
|
|
13093
13113
|
"week-day": 2
|
|
13094
13114
|
};
|
|
13095
|
-
function defaultRenderLabel$1(type4, data) {
|
|
13096
|
-
return data.toString();
|
|
13097
|
-
}
|
|
13098
13115
|
function generateDatePickerColumns$1(selected, min2, max2, precision, renderLabel, filter) {
|
|
13099
13116
|
const ret = [];
|
|
13100
13117
|
const minYear = min2.getFullYear();
|
|
@@ -13197,36 +13214,56 @@ const convertDateToStringArray = (date4, precision) => {
|
|
|
13197
13214
|
}
|
|
13198
13215
|
};
|
|
13199
13216
|
const convertStringArrayToDate = (value, precision) => {
|
|
13217
|
+
if ((value === null || value === void 0 ? void 0 : value[0]) === TILL_NOW) {
|
|
13218
|
+
const now2 = new Date();
|
|
13219
|
+
now2.tillNow = true;
|
|
13220
|
+
return now2;
|
|
13221
|
+
}
|
|
13200
13222
|
if (precision.includes("week")) {
|
|
13201
13223
|
return convertStringArrayToDate$1(value);
|
|
13202
13224
|
} else {
|
|
13203
13225
|
return convertStringArrayToDate$2(value);
|
|
13204
13226
|
}
|
|
13205
13227
|
};
|
|
13206
|
-
const generateDatePickerColumns = (selected, min2, max2, precision, renderLabel, filter) => {
|
|
13228
|
+
const generateDatePickerColumns = (selected, min2, max2, precision, renderLabel, filter, tillNow) => {
|
|
13207
13229
|
if (precision.startsWith("week")) {
|
|
13208
13230
|
return generateDatePickerColumns$1(selected, min2, max2, precision, renderLabel, filter);
|
|
13209
13231
|
} else {
|
|
13210
|
-
return generateDatePickerColumns$2(selected, min2, max2, precision, renderLabel, filter);
|
|
13211
|
-
}
|
|
13212
|
-
};
|
|
13213
|
-
const defaultRenderLabel = (precision, data) => {
|
|
13214
|
-
if (precision.includes("week")) {
|
|
13215
|
-
return defaultRenderLabel$1(precision, data);
|
|
13216
|
-
} else {
|
|
13217
|
-
return defaultRenderLabel$2(precision, data);
|
|
13232
|
+
return generateDatePickerColumns$2(selected, min2, max2, precision, renderLabel, filter, tillNow);
|
|
13218
13233
|
}
|
|
13219
13234
|
};
|
|
13235
|
+
function useRenderLabel(renderLabel) {
|
|
13236
|
+
const {
|
|
13237
|
+
locale
|
|
13238
|
+
} = useConfig();
|
|
13239
|
+
return React$4.useCallback((type4, data) => {
|
|
13240
|
+
if (renderLabel) {
|
|
13241
|
+
return renderLabel(type4, data);
|
|
13242
|
+
}
|
|
13243
|
+
switch (type4) {
|
|
13244
|
+
case "minute":
|
|
13245
|
+
case "second":
|
|
13246
|
+
case "hour":
|
|
13247
|
+
return ("0" + data.toString()).slice(-2);
|
|
13248
|
+
case "now":
|
|
13249
|
+
return locale.DatePicker.tillNow;
|
|
13250
|
+
default:
|
|
13251
|
+
return data.toString();
|
|
13252
|
+
}
|
|
13253
|
+
}, [renderLabel]);
|
|
13254
|
+
}
|
|
13220
13255
|
const thisYear$1 = new Date().getFullYear();
|
|
13221
13256
|
const defaultProps$M = {
|
|
13222
13257
|
min: new Date(new Date().setFullYear(thisYear$1 - 10)),
|
|
13223
13258
|
max: new Date(new Date().setFullYear(thisYear$1 + 10)),
|
|
13224
13259
|
precision: "day",
|
|
13225
|
-
renderLabel: defaultRenderLabel,
|
|
13226
13260
|
defaultValue: null
|
|
13227
13261
|
};
|
|
13228
|
-
const DatePicker = React$
|
|
13262
|
+
const DatePicker = React$4.forwardRef((p, ref) => {
|
|
13229
13263
|
const props = mergeProps(defaultProps$M, p);
|
|
13264
|
+
const {
|
|
13265
|
+
renderLabel
|
|
13266
|
+
} = props;
|
|
13230
13267
|
const [value, setValue2] = usePropsValue({
|
|
13231
13268
|
value: props.value,
|
|
13232
13269
|
defaultValue: props.defaultValue,
|
|
@@ -13237,21 +13274,26 @@ const DatePicker = React$1.forwardRef((p, ref) => {
|
|
|
13237
13274
|
(_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props, v);
|
|
13238
13275
|
}
|
|
13239
13276
|
});
|
|
13240
|
-
const now2 = React$
|
|
13241
|
-
const
|
|
13277
|
+
const now2 = React$4.useMemo(() => new Date(), []);
|
|
13278
|
+
const mergedRenderLabel = useRenderLabel(renderLabel);
|
|
13279
|
+
const pickerValue = React$4.useMemo(() => {
|
|
13242
13280
|
let date4 = value !== null && value !== void 0 ? value : now2;
|
|
13281
|
+
if (date4.tillNow) {
|
|
13282
|
+
return [TILL_NOW];
|
|
13283
|
+
}
|
|
13243
13284
|
date4 = new Date(bound(date4.getTime(), props.min.getTime(), props.max.getTime()));
|
|
13244
13285
|
return convertDateToStringArray(date4, props.precision);
|
|
13245
13286
|
}, [value, props.precision, props.min, props.max]);
|
|
13246
|
-
const onConfirm = React$
|
|
13247
|
-
|
|
13287
|
+
const onConfirm = React$4.useCallback((val) => {
|
|
13288
|
+
const date4 = convertStringArrayToDate(val, props.precision);
|
|
13289
|
+
setValue2(date4, true);
|
|
13248
13290
|
}, [setValue2, props.precision]);
|
|
13249
13291
|
const onSelect = useMemoizedFn((val) => {
|
|
13250
13292
|
var _a;
|
|
13251
13293
|
const date4 = convertStringArrayToDate(val, props.precision);
|
|
13252
13294
|
(_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, date4);
|
|
13253
13295
|
});
|
|
13254
|
-
const columns = React$
|
|
13296
|
+
const columns = React$4.useCallback((selected) => generateDatePickerColumns(selected, props.min, props.max, props.precision, mergedRenderLabel, props.filter, props.tillNow), [props.min, props.max, props.precision, mergedRenderLabel, props.tillNow]);
|
|
13255
13297
|
return withNativeProps(props, React__default.default.createElement(Picker, {
|
|
13256
13298
|
ref,
|
|
13257
13299
|
columns,
|
|
@@ -13283,8 +13325,8 @@ const DatePicker = React$1.forwardRef((p, ref) => {
|
|
|
13283
13325
|
function prompt(props) {
|
|
13284
13326
|
return new Promise((resolve) => {
|
|
13285
13327
|
const Wrapper2 = () => {
|
|
13286
|
-
const [visible, setVisible] = React$
|
|
13287
|
-
React$
|
|
13328
|
+
const [visible, setVisible] = React$4.useState(false);
|
|
13329
|
+
React$4.useEffect(() => {
|
|
13288
13330
|
setVisible(true);
|
|
13289
13331
|
}, []);
|
|
13290
13332
|
return React__default.default.createElement(DatePicker, Object.assign({}, props, {
|
|
@@ -13311,24 +13353,28 @@ function prompt(props) {
|
|
|
13311
13353
|
});
|
|
13312
13354
|
}
|
|
13313
13355
|
const index$e = attachPropertiesToComponent(DatePicker, {
|
|
13314
|
-
prompt
|
|
13356
|
+
prompt,
|
|
13357
|
+
DATE_NOW: TILL_NOW
|
|
13315
13358
|
});
|
|
13316
13359
|
const thisYear = new Date().getFullYear();
|
|
13317
13360
|
const defaultProps$L = {
|
|
13318
13361
|
min: new Date(new Date().setFullYear(thisYear - 10)),
|
|
13319
13362
|
max: new Date(new Date().setFullYear(thisYear + 10)),
|
|
13320
|
-
precision: "day"
|
|
13321
|
-
renderLabel: defaultRenderLabel
|
|
13363
|
+
precision: "day"
|
|
13322
13364
|
};
|
|
13323
13365
|
const DatePickerView$1 = (p) => {
|
|
13324
13366
|
var _a;
|
|
13325
13367
|
const props = mergeProps(defaultProps$L, p);
|
|
13368
|
+
const {
|
|
13369
|
+
renderLabel
|
|
13370
|
+
} = props;
|
|
13326
13371
|
const [value, setValue2] = usePropsValue({
|
|
13327
13372
|
value: props.value,
|
|
13328
13373
|
defaultValue: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : null
|
|
13329
13374
|
});
|
|
13330
|
-
const
|
|
13331
|
-
const
|
|
13375
|
+
const mergedRenderLabel = useRenderLabel(renderLabel);
|
|
13376
|
+
const pickerValue = React$4.useMemo(() => convertDateToStringArray(value, props.precision), [value, props.precision]);
|
|
13377
|
+
const onChange = React$4.useCallback((val) => {
|
|
13332
13378
|
var _a2;
|
|
13333
13379
|
const date4 = convertStringArrayToDate(val, props.precision);
|
|
13334
13380
|
if (date4) {
|
|
@@ -13337,7 +13383,7 @@ const DatePickerView$1 = (p) => {
|
|
|
13337
13383
|
}
|
|
13338
13384
|
}, [props.onChange, props.precision]);
|
|
13339
13385
|
return withNativeProps(props, React__default.default.createElement(PickerView, {
|
|
13340
|
-
columns: (selected) => generateDatePickerColumns(selected, props.min, props.max, props.precision,
|
|
13386
|
+
columns: (selected) => generateDatePickerColumns(selected, props.min, props.max, props.precision, mergedRenderLabel, props.filter),
|
|
13341
13387
|
loading: props.loading,
|
|
13342
13388
|
loadingContent: props.loadingContent,
|
|
13343
13389
|
value: pickerValue,
|
|
@@ -13571,23 +13617,23 @@ const defaultProps$H = {
|
|
|
13571
13617
|
closeOnMaskClick: true,
|
|
13572
13618
|
closeOnClickAway: false
|
|
13573
13619
|
};
|
|
13574
|
-
const Dropdown = React$
|
|
13620
|
+
const Dropdown = React$4.forwardRef((p, ref) => {
|
|
13575
13621
|
const props = mergeProps(defaultProps$H, p);
|
|
13576
13622
|
const [value, setValue2] = usePropsValue({
|
|
13577
13623
|
value: props.activeKey,
|
|
13578
13624
|
defaultValue: props.defaultActiveKey,
|
|
13579
13625
|
onChange: props.onChange
|
|
13580
13626
|
});
|
|
13581
|
-
const navRef = React$
|
|
13582
|
-
const contentRef = React$
|
|
13627
|
+
const navRef = React$4.useRef(null);
|
|
13628
|
+
const contentRef = React$4.useRef(null);
|
|
13583
13629
|
useClickAway(() => {
|
|
13584
13630
|
if (!props.closeOnClickAway)
|
|
13585
13631
|
return;
|
|
13586
13632
|
setValue2(null);
|
|
13587
13633
|
}, [navRef, contentRef]);
|
|
13588
|
-
const [top, setTop] = React$
|
|
13589
|
-
const containerRef = React$
|
|
13590
|
-
React$
|
|
13634
|
+
const [top, setTop] = React$4.useState();
|
|
13635
|
+
const containerRef = React$4.useRef(null);
|
|
13636
|
+
React$4.useEffect(() => {
|
|
13591
13637
|
const container = containerRef.current;
|
|
13592
13638
|
if (!container)
|
|
13593
13639
|
return;
|
|
@@ -13617,12 +13663,12 @@ const Dropdown = React$1.forwardRef((p, ref) => {
|
|
|
13617
13663
|
items.push(child);
|
|
13618
13664
|
if (child.props.forceRender)
|
|
13619
13665
|
popupForceRender = true;
|
|
13620
|
-
return React$
|
|
13666
|
+
return React$4.cloneElement(child, childProps);
|
|
13621
13667
|
} else {
|
|
13622
13668
|
return child;
|
|
13623
13669
|
}
|
|
13624
13670
|
});
|
|
13625
|
-
React$
|
|
13671
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
13626
13672
|
close: () => {
|
|
13627
13673
|
setValue2(null);
|
|
13628
13674
|
}
|
|
@@ -13798,11 +13844,11 @@ const defaultProps$G = {
|
|
|
13798
13844
|
};
|
|
13799
13845
|
const Ellipsis$1 = (p) => {
|
|
13800
13846
|
const props = mergeProps(defaultProps$G, p);
|
|
13801
|
-
const rootRef = React$
|
|
13802
|
-
const [ellipsised, setEllipsised] = React$
|
|
13803
|
-
const [expanded, setExpanded] = React$
|
|
13804
|
-
const [exceeded, setExceeded] = React$
|
|
13805
|
-
const chars = React$
|
|
13847
|
+
const rootRef = React$4.useRef(null);
|
|
13848
|
+
const [ellipsised, setEllipsised] = React$4.useState({});
|
|
13849
|
+
const [expanded, setExpanded] = React$4.useState(false);
|
|
13850
|
+
const [exceeded, setExceeded] = React$4.useState(false);
|
|
13851
|
+
const chars = React$4.useMemo(() => _runes_0_4_3_runes.exports(props.content), [props.content]);
|
|
13806
13852
|
function getSubString(start2, end) {
|
|
13807
13853
|
return chars.slice(start2, end).join("");
|
|
13808
13854
|
}
|
|
@@ -14530,22 +14576,36 @@ const ErrorBlock = ErrorBlock$1;
|
|
|
14530
14576
|
const floatingBubble = "";
|
|
14531
14577
|
const classPrefix$P = `adm-floating-bubble`;
|
|
14532
14578
|
const defaultProps$E = {
|
|
14533
|
-
axis: "y"
|
|
14579
|
+
axis: "y",
|
|
14580
|
+
defaultOffset: {
|
|
14581
|
+
x: 0,
|
|
14582
|
+
y: 0
|
|
14583
|
+
}
|
|
14534
14584
|
};
|
|
14535
14585
|
const FloatingBubble$1 = (p) => {
|
|
14536
14586
|
const props = mergeProps(defaultProps$E, p);
|
|
14537
|
-
const boundaryRef = React$
|
|
14538
|
-
const buttonRef = React$
|
|
14587
|
+
const boundaryRef = React$4.useRef(null);
|
|
14588
|
+
const buttonRef = React$4.useRef(null);
|
|
14589
|
+
const [innerValue, setInnerValue] = React$4.useState(props.offset === void 0 ? props.defaultOffset : props.offset);
|
|
14590
|
+
React$4.useEffect(() => {
|
|
14591
|
+
if (props.offset === void 0)
|
|
14592
|
+
return;
|
|
14593
|
+
api.start({
|
|
14594
|
+
x: props.offset.x,
|
|
14595
|
+
y: props.offset.y
|
|
14596
|
+
});
|
|
14597
|
+
}, [props.offset]);
|
|
14539
14598
|
const [{
|
|
14540
14599
|
x,
|
|
14541
14600
|
y,
|
|
14542
14601
|
opacity
|
|
14543
14602
|
}, api] = useSpring(() => ({
|
|
14544
|
-
x:
|
|
14545
|
-
y:
|
|
14603
|
+
x: innerValue.x,
|
|
14604
|
+
y: innerValue.y,
|
|
14546
14605
|
opacity: 1
|
|
14547
14606
|
}));
|
|
14548
14607
|
const bind = useDrag((state) => {
|
|
14608
|
+
var _a;
|
|
14549
14609
|
let nextX = state.offset[0];
|
|
14550
14610
|
let nextY = state.offset[1];
|
|
14551
14611
|
if (state.last && props.magnetic) {
|
|
@@ -14575,10 +14635,16 @@ const FloatingBubble$1 = (p) => {
|
|
|
14575
14635
|
}
|
|
14576
14636
|
}
|
|
14577
14637
|
}
|
|
14578
|
-
|
|
14638
|
+
const nextOffest = {
|
|
14579
14639
|
x: nextX,
|
|
14580
14640
|
y: nextY
|
|
14581
|
-
}
|
|
14641
|
+
};
|
|
14642
|
+
if (props.offset === void 0) {
|
|
14643
|
+
api.start(nextOffest);
|
|
14644
|
+
} else {
|
|
14645
|
+
setInnerValue(nextOffest);
|
|
14646
|
+
}
|
|
14647
|
+
(_a = props.onOffsetChange) === null || _a === void 0 ? void 0 : _a.call(props, nextOffest);
|
|
14582
14648
|
api.start({
|
|
14583
14649
|
opacity: state.active ? 0.8 : 1
|
|
14584
14650
|
});
|
|
@@ -14618,7 +14684,7 @@ function nearest(arr, target) {
|
|
|
14618
14684
|
const defaultProps$D = {
|
|
14619
14685
|
handleDraggingOfContent: true
|
|
14620
14686
|
};
|
|
14621
|
-
const FloatingPanel$1 = React$
|
|
14687
|
+
const FloatingPanel$1 = React$4.forwardRef((p, ref) => {
|
|
14622
14688
|
var _a, _b;
|
|
14623
14689
|
const props = mergeProps(defaultProps$D, p);
|
|
14624
14690
|
const {
|
|
@@ -14626,11 +14692,11 @@ const FloatingPanel$1 = React$1.forwardRef((p, ref) => {
|
|
|
14626
14692
|
} = props;
|
|
14627
14693
|
const maxHeight = (_a = anchors[anchors.length - 1]) !== null && _a !== void 0 ? _a : window.innerHeight;
|
|
14628
14694
|
const possibles = anchors.map((x) => -x);
|
|
14629
|
-
const elementRef = React$
|
|
14630
|
-
const headerRef = React$
|
|
14631
|
-
const contentRef = React$
|
|
14632
|
-
const [pulling, setPulling] = React$
|
|
14633
|
-
const pullingRef = React$
|
|
14695
|
+
const elementRef = React$4.useRef(null);
|
|
14696
|
+
const headerRef = React$4.useRef(null);
|
|
14697
|
+
const contentRef = React$4.useRef(null);
|
|
14698
|
+
const [pulling, setPulling] = React$4.useState(false);
|
|
14699
|
+
const pullingRef = React$4.useRef(false);
|
|
14634
14700
|
const bounds = {
|
|
14635
14701
|
top: possibles[possibles.length - 1],
|
|
14636
14702
|
bottom: possibles[0]
|
|
@@ -14703,7 +14769,7 @@ const FloatingPanel$1 = React$1.forwardRef((p, ref) => {
|
|
|
14703
14769
|
passive: false
|
|
14704
14770
|
} : false
|
|
14705
14771
|
});
|
|
14706
|
-
React$
|
|
14772
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
14707
14773
|
setHeight: (height, options) => {
|
|
14708
14774
|
api.start({
|
|
14709
14775
|
y: -height,
|
|
@@ -14782,7 +14848,32 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
14782
14848
|
}
|
|
14783
14849
|
return target;
|
|
14784
14850
|
}
|
|
14851
|
+
function _typeof$1(obj) {
|
|
14852
|
+
"@babel/helpers - typeof";
|
|
14853
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
14854
|
+
return typeof obj2;
|
|
14855
|
+
} : function(obj2) {
|
|
14856
|
+
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
14857
|
+
}, _typeof$1(obj);
|
|
14858
|
+
}
|
|
14859
|
+
function _toPrimitive(input2, hint) {
|
|
14860
|
+
if (_typeof$1(input2) !== "object" || input2 === null)
|
|
14861
|
+
return input2;
|
|
14862
|
+
var prim = input2[Symbol.toPrimitive];
|
|
14863
|
+
if (prim !== void 0) {
|
|
14864
|
+
var res = prim.call(input2, hint || "default");
|
|
14865
|
+
if (_typeof$1(res) !== "object")
|
|
14866
|
+
return res;
|
|
14867
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
14868
|
+
}
|
|
14869
|
+
return (hint === "string" ? String : Number)(input2);
|
|
14870
|
+
}
|
|
14871
|
+
function _toPropertyKey(arg) {
|
|
14872
|
+
var key = _toPrimitive(arg, "string");
|
|
14873
|
+
return _typeof$1(key) === "symbol" ? key : String(key);
|
|
14874
|
+
}
|
|
14785
14875
|
function _defineProperty(obj, key, value) {
|
|
14876
|
+
key = _toPropertyKey(key);
|
|
14786
14877
|
if (key in obj) {
|
|
14787
14878
|
Object.defineProperty(obj, key, {
|
|
14788
14879
|
value,
|
|
@@ -14863,7 +14954,7 @@ function _defineProperties(target, props) {
|
|
|
14863
14954
|
descriptor.configurable = true;
|
|
14864
14955
|
if ("value" in descriptor)
|
|
14865
14956
|
descriptor.writable = true;
|
|
14866
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14957
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
14867
14958
|
}
|
|
14868
14959
|
}
|
|
14869
14960
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -14927,14 +15018,6 @@ function _isNativeReflectConstruct$1() {
|
|
|
14927
15018
|
return false;
|
|
14928
15019
|
}
|
|
14929
15020
|
}
|
|
14930
|
-
function _typeof$1(obj) {
|
|
14931
|
-
"@babel/helpers - typeof";
|
|
14932
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
14933
|
-
return typeof obj2;
|
|
14934
|
-
} : function(obj2) {
|
|
14935
|
-
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
14936
|
-
}, _typeof$1(obj);
|
|
14937
|
-
}
|
|
14938
15021
|
function _possibleConstructorReturn(self2, call2) {
|
|
14939
15022
|
if (call2 && (_typeof$1(call2) === "object" || typeof call2 === "function")) {
|
|
14940
15023
|
return call2;
|
|
@@ -15328,15 +15411,9 @@ function _regeneratorRuntime() {
|
|
|
15328
15411
|
};
|
|
15329
15412
|
}
|
|
15330
15413
|
function maybeInvokeDelegate(delegate, context) {
|
|
15331
|
-
var method4 = delegate.iterator[
|
|
15332
|
-
if (void 0 === method4)
|
|
15333
|
-
|
|
15334
|
-
if (delegate.iterator["return"] && (context.method = "return", context.arg = void 0, maybeInvokeDelegate(delegate, context), "throw" === context.method))
|
|
15335
|
-
return ContinueSentinel;
|
|
15336
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
15337
|
-
}
|
|
15338
|
-
return ContinueSentinel;
|
|
15339
|
-
}
|
|
15414
|
+
var methodName = context.method, method4 = delegate.iterator[methodName];
|
|
15415
|
+
if (void 0 === method4)
|
|
15416
|
+
return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = void 0, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
15340
15417
|
var record2 = tryCatch(method4, delegate.iterator, context.arg);
|
|
15341
15418
|
if ("throw" === record2.type)
|
|
15342
15419
|
return context.method = "throw", context.arg = record2.arg, context.delegate = null, ContinueSentinel;
|
|
@@ -17599,32 +17676,31 @@ var List = function List2(_ref) {
|
|
|
17599
17676
|
})));
|
|
17600
17677
|
};
|
|
17601
17678
|
function _iterableToArrayLimit(arr, i) {
|
|
17602
|
-
var _i =
|
|
17603
|
-
if (
|
|
17604
|
-
|
|
17605
|
-
var _arr = [];
|
|
17606
|
-
var _n = true;
|
|
17607
|
-
var _d = false;
|
|
17608
|
-
var _s, _e;
|
|
17609
|
-
try {
|
|
17610
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
17611
|
-
_arr.push(_s.value);
|
|
17612
|
-
if (i && _arr.length === i)
|
|
17613
|
-
break;
|
|
17614
|
-
}
|
|
17615
|
-
} catch (err) {
|
|
17616
|
-
_d = true;
|
|
17617
|
-
_e = err;
|
|
17618
|
-
} finally {
|
|
17679
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
17680
|
+
if (null != _i) {
|
|
17681
|
+
var _s, _e, _x, _r, _arr = [], _n = true, _d = false;
|
|
17619
17682
|
try {
|
|
17620
|
-
if (
|
|
17621
|
-
_i
|
|
17683
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
17684
|
+
if (Object(_i) !== _i)
|
|
17685
|
+
return;
|
|
17686
|
+
_n = false;
|
|
17687
|
+
} else
|
|
17688
|
+
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true) {
|
|
17689
|
+
;
|
|
17690
|
+
}
|
|
17691
|
+
} catch (err) {
|
|
17692
|
+
_d = true, _e = err;
|
|
17622
17693
|
} finally {
|
|
17623
|
-
|
|
17624
|
-
|
|
17694
|
+
try {
|
|
17695
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r))
|
|
17696
|
+
return;
|
|
17697
|
+
} finally {
|
|
17698
|
+
if (_d)
|
|
17699
|
+
throw _e;
|
|
17700
|
+
}
|
|
17625
17701
|
}
|
|
17702
|
+
return _arr;
|
|
17626
17703
|
}
|
|
17627
|
-
return _arr;
|
|
17628
17704
|
}
|
|
17629
17705
|
function _slicedToArray(arr, i) {
|
|
17630
17706
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
@@ -18575,7 +18651,7 @@ var Form$1 = function Form(_ref, ref) {
|
|
|
18575
18651
|
}
|
|
18576
18652
|
}), wrapperNode);
|
|
18577
18653
|
};
|
|
18578
|
-
function stringify
|
|
18654
|
+
function stringify(value) {
|
|
18579
18655
|
try {
|
|
18580
18656
|
return JSON.stringify(value);
|
|
18581
18657
|
} catch (err) {
|
|
@@ -18587,22 +18663,22 @@ function useWatch() {
|
|
|
18587
18663
|
args[_key] = arguments[_key];
|
|
18588
18664
|
}
|
|
18589
18665
|
var _args$ = args[0], dependencies = _args$ === void 0 ? [] : _args$, form = args[1];
|
|
18590
|
-
var _useState = React$
|
|
18591
|
-
var valueStr = React$
|
|
18592
|
-
return stringify
|
|
18666
|
+
var _useState = React$4.useState(), _useState2 = _slicedToArray(_useState, 2), value = _useState2[0], setValue2 = _useState2[1];
|
|
18667
|
+
var valueStr = React$4.useMemo(function() {
|
|
18668
|
+
return stringify(value);
|
|
18593
18669
|
}, [value]);
|
|
18594
|
-
var valueStrRef = React$
|
|
18670
|
+
var valueStrRef = React$4.useRef(valueStr);
|
|
18595
18671
|
valueStrRef.current = valueStr;
|
|
18596
|
-
var fieldContext = React$
|
|
18672
|
+
var fieldContext = React$4.useContext(Context$1);
|
|
18597
18673
|
var formInstance = form || fieldContext;
|
|
18598
18674
|
var isValidForm = formInstance && formInstance._init;
|
|
18599
18675
|
{
|
|
18600
18676
|
warningOnce$1(args.length === 2 ? form ? isValidForm : true : isValidForm, "useWatch requires a form instance since it can not auto detect from context.");
|
|
18601
18677
|
}
|
|
18602
18678
|
var namePath = getNamePath(dependencies);
|
|
18603
|
-
var namePathRef = React$
|
|
18679
|
+
var namePathRef = React$4.useRef(namePath);
|
|
18604
18680
|
namePathRef.current = namePath;
|
|
18605
|
-
React$
|
|
18681
|
+
React$4.useEffect(
|
|
18606
18682
|
function() {
|
|
18607
18683
|
if (!isValidForm) {
|
|
18608
18684
|
return;
|
|
@@ -18611,7 +18687,7 @@ function useWatch() {
|
|
|
18611
18687
|
var _getInternalHooks = getInternalHooks3(HOOK_MARK$1), registerWatch = _getInternalHooks.registerWatch;
|
|
18612
18688
|
var cancelRegister = registerWatch(function(store) {
|
|
18613
18689
|
var newValue = getValue(store, namePathRef.current);
|
|
18614
|
-
var nextValueStr = stringify
|
|
18690
|
+
var nextValueStr = stringify(newValue);
|
|
18615
18691
|
if (valueStrRef.current !== nextValueStr) {
|
|
18616
18692
|
valueStrRef.current = nextValueStr;
|
|
18617
18693
|
setValue2(newValue);
|
|
@@ -18903,7 +18979,7 @@ const FormArray = (props) => {
|
|
|
18903
18979
|
};
|
|
18904
18980
|
const classPrefix$O = "adm-form";
|
|
18905
18981
|
const defaultProps$C = defaultFormContext;
|
|
18906
|
-
const Form2 = React$
|
|
18982
|
+
const Form2 = React$4.forwardRef((p, ref) => {
|
|
18907
18983
|
const props = mergeProps(defaultProps$C, p);
|
|
18908
18984
|
const {
|
|
18909
18985
|
className,
|
|
@@ -18919,7 +18995,7 @@ const Form2 = React$1.forwardRef((p, ref) => {
|
|
|
18919
18995
|
const {
|
|
18920
18996
|
locale
|
|
18921
18997
|
} = useConfig();
|
|
18922
|
-
const validateMessages = React$
|
|
18998
|
+
const validateMessages = React$4.useMemo(() => merge_1({}, locale.Form.defaultValidateMessages, formProps.validateMessages), [locale.Form.defaultValidateMessages, formProps.validateMessages]);
|
|
18923
18999
|
const lists = [];
|
|
18924
19000
|
let currentHeader = null;
|
|
18925
19001
|
let items = [];
|
|
@@ -19073,22 +19149,22 @@ function warningOnce(valid, message) {
|
|
|
19073
19149
|
function noteOnce(valid, message) {
|
|
19074
19150
|
call(note, valid, message);
|
|
19075
19151
|
}
|
|
19076
|
-
var _default$
|
|
19077
|
-
warning$1.default = _default$
|
|
19078
|
-
var _interopRequireWildcard = interopRequireWildcard.exports.default;
|
|
19079
|
-
var _interopRequireDefault = interopRequireDefault.exports.default;
|
|
19152
|
+
var _default$3 = warningOnce;
|
|
19153
|
+
warning$1.default = _default$3;
|
|
19154
|
+
var _interopRequireWildcard$3 = interopRequireWildcard.exports.default;
|
|
19155
|
+
var _interopRequireDefault$3 = interopRequireDefault.exports.default;
|
|
19080
19156
|
Object.defineProperty(FieldContext, "__esModule", {
|
|
19081
19157
|
value: true
|
|
19082
19158
|
});
|
|
19083
19159
|
var default_1 = FieldContext.default = FieldContext.HOOK_MARK = void 0;
|
|
19084
|
-
var _warning = _interopRequireDefault(warning$1);
|
|
19085
|
-
var React = _interopRequireWildcard(React__default.default);
|
|
19160
|
+
var _warning = _interopRequireDefault$3(warning$1);
|
|
19161
|
+
var React$3 = _interopRequireWildcard$3(React__default.default);
|
|
19086
19162
|
var HOOK_MARK = "RC_FORM_INTERNAL_HOOKS";
|
|
19087
19163
|
FieldContext.HOOK_MARK = HOOK_MARK;
|
|
19088
19164
|
var warningFunc2 = function warningFunc3() {
|
|
19089
19165
|
(0, _warning.default)(false, "Can not find FormContext. Please make sure you wrap Field under Form.");
|
|
19090
19166
|
};
|
|
19091
|
-
var Context = /* @__PURE__ */ React.createContext({
|
|
19167
|
+
var Context = /* @__PURE__ */ React$3.createContext({
|
|
19092
19168
|
getFieldValue: warningFunc2,
|
|
19093
19169
|
getFieldsValue: warningFunc2,
|
|
19094
19170
|
getFieldError: warningFunc2,
|
|
@@ -19122,8 +19198,8 @@ var Context = /* @__PURE__ */ React.createContext({
|
|
|
19122
19198
|
};
|
|
19123
19199
|
}
|
|
19124
19200
|
});
|
|
19125
|
-
var _default = Context;
|
|
19126
|
-
default_1 = FieldContext.default = _default;
|
|
19201
|
+
var _default$2 = Context;
|
|
19202
|
+
default_1 = FieldContext.default = _default$2;
|
|
19127
19203
|
function toArray(candidate) {
|
|
19128
19204
|
if (candidate === void 0 || candidate === false)
|
|
19129
19205
|
return [];
|
|
@@ -19145,7 +19221,7 @@ function isSafeSetRefComponent(component) {
|
|
|
19145
19221
|
}
|
|
19146
19222
|
const popover = "";
|
|
19147
19223
|
const popoverMenu = "";
|
|
19148
|
-
const Arrow = React$
|
|
19224
|
+
const Arrow = React$4.memo((props) => {
|
|
19149
19225
|
return withNativeProps(props, React__default.default.createElement("svg", {
|
|
19150
19226
|
viewBox: "0 0 30 16"
|
|
19151
19227
|
}, React__default.default.createElement("g", {
|
|
@@ -19227,18 +19303,22 @@ const computePosition$1 = async (reference, floating, config2) => {
|
|
|
19227
19303
|
middleware = [],
|
|
19228
19304
|
platform: platform2
|
|
19229
19305
|
} = config2;
|
|
19306
|
+
const validMiddleware = middleware.filter(Boolean);
|
|
19230
19307
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
|
|
19231
19308
|
{
|
|
19232
19309
|
if (platform2 == null) {
|
|
19233
19310
|
console.error(["Floating UI: `platform` property was not passed to config. If you", "want to use Floating UI on the web, install @floating-ui/dom", "instead of the /core package. Otherwise, you can create your own", "`platform`: https://floating-ui.com/docs/platform"].join(" "));
|
|
19234
19311
|
}
|
|
19235
|
-
if (
|
|
19312
|
+
if (validMiddleware.filter((_ref) => {
|
|
19236
19313
|
let {
|
|
19237
19314
|
name
|
|
19238
19315
|
} = _ref;
|
|
19239
19316
|
return name === "autoPlacement" || name === "flip";
|
|
19240
19317
|
}).length > 1) {
|
|
19241
|
-
throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`", "
|
|
19318
|
+
throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware", "detected. This will lead to an infinite loop. Ensure only one of", "either has been passed to the `middleware` array."].join(" "));
|
|
19319
|
+
}
|
|
19320
|
+
if (!reference || !floating) {
|
|
19321
|
+
console.error(["Floating UI: The reference and/or floating element was not defined", "when `computePosition()` was called. Ensure that both elements have", "been created and can be measured."].join(" "));
|
|
19242
19322
|
}
|
|
19243
19323
|
}
|
|
19244
19324
|
let rects = await platform2.getElementRects({
|
|
@@ -19253,11 +19333,11 @@ const computePosition$1 = async (reference, floating, config2) => {
|
|
|
19253
19333
|
let statefulPlacement = placement;
|
|
19254
19334
|
let middlewareData = {};
|
|
19255
19335
|
let resetCount = 0;
|
|
19256
|
-
for (let i = 0; i <
|
|
19336
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
|
19257
19337
|
const {
|
|
19258
19338
|
name,
|
|
19259
19339
|
fn
|
|
19260
|
-
} =
|
|
19340
|
+
} = validMiddleware[i];
|
|
19261
19341
|
const {
|
|
19262
19342
|
x: nextX,
|
|
19263
19343
|
y: nextY,
|
|
@@ -19376,20 +19456,29 @@ async function detectOverflow(middlewareArguments, options) {
|
|
|
19376
19456
|
rootBoundary,
|
|
19377
19457
|
strategy
|
|
19378
19458
|
}));
|
|
19459
|
+
const rect = elementContext === "floating" ? {
|
|
19460
|
+
...rects.floating,
|
|
19461
|
+
x,
|
|
19462
|
+
y
|
|
19463
|
+
} : rects.reference;
|
|
19464
|
+
const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
|
|
19465
|
+
const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
|
|
19466
|
+
x: 1,
|
|
19467
|
+
y: 1
|
|
19468
|
+
} : {
|
|
19469
|
+
x: 1,
|
|
19470
|
+
y: 1
|
|
19471
|
+
};
|
|
19379
19472
|
const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
19380
|
-
rect
|
|
19381
|
-
|
|
19382
|
-
x,
|
|
19383
|
-
y
|
|
19384
|
-
} : rects.reference,
|
|
19385
|
-
offsetParent: await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating)),
|
|
19473
|
+
rect,
|
|
19474
|
+
offsetParent,
|
|
19386
19475
|
strategy
|
|
19387
|
-
}) :
|
|
19476
|
+
}) : rect);
|
|
19388
19477
|
return {
|
|
19389
|
-
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
|
19390
|
-
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
|
19391
|
-
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
|
19392
|
-
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
|
19478
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
19479
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
19480
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
19481
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
19393
19482
|
};
|
|
19394
19483
|
}
|
|
19395
19484
|
const min$1 = Math.min;
|
|
@@ -19828,28 +19917,29 @@ const limitShift = function(options) {
|
|
|
19828
19917
|
}
|
|
19829
19918
|
};
|
|
19830
19919
|
};
|
|
19831
|
-
|
|
19832
|
-
|
|
19920
|
+
const min = Math.min;
|
|
19921
|
+
const max = Math.max;
|
|
19922
|
+
const round = Math.round;
|
|
19923
|
+
function getScale(element, paramRect) {
|
|
19924
|
+
const rect = paramRect || element.getBoundingClientRect();
|
|
19925
|
+
return {
|
|
19926
|
+
x: element.offsetWidth > 0 ? round(rect.width) / element.offsetWidth || 1 : 1,
|
|
19927
|
+
y: element.offsetHeight > 0 ? round(rect.height) / element.offsetHeight || 1 : 1
|
|
19928
|
+
};
|
|
19833
19929
|
}
|
|
19834
19930
|
function getWindow(node) {
|
|
19835
|
-
|
|
19836
|
-
|
|
19837
|
-
}
|
|
19838
|
-
if (!isWindow$1(node)) {
|
|
19839
|
-
const ownerDocument = node.ownerDocument;
|
|
19840
|
-
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
19841
|
-
}
|
|
19842
|
-
return node;
|
|
19931
|
+
var _node$ownerDocument;
|
|
19932
|
+
return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
19843
19933
|
}
|
|
19844
19934
|
function getComputedStyle(element) {
|
|
19845
19935
|
return getWindow(element).getComputedStyle(element);
|
|
19846
19936
|
}
|
|
19847
19937
|
function getNodeName(node) {
|
|
19848
|
-
return
|
|
19938
|
+
return isNode(node) ? (node.nodeName || "").toLowerCase() : "";
|
|
19849
19939
|
}
|
|
19850
19940
|
function getUAString() {
|
|
19851
19941
|
const uaData = navigator.userAgentData;
|
|
19852
|
-
if (uaData
|
|
19942
|
+
if (uaData && Array.isArray(uaData.brands)) {
|
|
19853
19943
|
return uaData.brands.map((item) => item.brand + "/" + item.version).join(" ");
|
|
19854
19944
|
}
|
|
19855
19945
|
return navigator.userAgent;
|
|
@@ -19885,7 +19975,8 @@ function isTableElement(element) {
|
|
|
19885
19975
|
function isContainingBlock(element) {
|
|
19886
19976
|
const isFirefox = /firefox/i.test(getUAString());
|
|
19887
19977
|
const css = getComputedStyle(element);
|
|
19888
|
-
|
|
19978
|
+
const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
|
|
19979
|
+
return css.transform !== "none" || css.perspective !== "none" || (backdropFilter ? backdropFilter !== "none" : false) || isFirefox && css.willChange === "filter" || isFirefox && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective"].some((value) => css.willChange.includes(value)) || ["paint", "layout", "strict", "content"].some(
|
|
19889
19980
|
(value) => {
|
|
19890
19981
|
const contain = css.contain;
|
|
19891
19982
|
return contain != null ? contain.includes(value) : false;
|
|
@@ -19898,9 +19989,6 @@ function isLayoutViewport() {
|
|
|
19898
19989
|
function isLastTraversableNode(node) {
|
|
19899
19990
|
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
19900
19991
|
}
|
|
19901
|
-
const min = Math.min;
|
|
19902
|
-
const max = Math.max;
|
|
19903
|
-
const round$1 = Math.round;
|
|
19904
19992
|
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
19905
19993
|
var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
|
|
19906
19994
|
if (includeScale === void 0) {
|
|
@@ -19910,18 +19998,25 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
|
19910
19998
|
isFixedStrategy = false;
|
|
19911
19999
|
}
|
|
19912
20000
|
const clientRect = element.getBoundingClientRect();
|
|
19913
|
-
let
|
|
19914
|
-
let
|
|
19915
|
-
|
|
19916
|
-
|
|
19917
|
-
|
|
20001
|
+
let contextRect = clientRect;
|
|
20002
|
+
let elementToCheckForScale = element;
|
|
20003
|
+
let scale2 = {
|
|
20004
|
+
x: 1,
|
|
20005
|
+
y: 1
|
|
20006
|
+
};
|
|
20007
|
+
if (!isElement(element) && element.contextElement) {
|
|
20008
|
+
contextRect = element.contextElement.getBoundingClientRect();
|
|
20009
|
+
elementToCheckForScale = element.contextElement;
|
|
20010
|
+
}
|
|
20011
|
+
if (includeScale && isHTMLElement(elementToCheckForScale)) {
|
|
20012
|
+
scale2 = getScale(elementToCheckForScale, contextRect);
|
|
19918
20013
|
}
|
|
19919
20014
|
const win = isElement(element) ? getWindow(element) : window;
|
|
19920
20015
|
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
19921
|
-
const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) /
|
|
19922
|
-
const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) /
|
|
19923
|
-
const width = clientRect.width /
|
|
19924
|
-
const height = clientRect.height /
|
|
20016
|
+
const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scale2.x;
|
|
20017
|
+
const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scale2.y;
|
|
20018
|
+
const width = clientRect.width / scale2.x;
|
|
20019
|
+
const height = clientRect.height / scale2.y;
|
|
19925
20020
|
return {
|
|
19926
20021
|
width,
|
|
19927
20022
|
height,
|
|
@@ -19953,7 +20048,7 @@ function getWindowScrollBarX(element) {
|
|
|
19953
20048
|
}
|
|
19954
20049
|
function isScaled(element) {
|
|
19955
20050
|
const rect = getBoundingClientRect(element);
|
|
19956
|
-
return round
|
|
20051
|
+
return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
|
|
19957
20052
|
}
|
|
19958
20053
|
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
19959
20054
|
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
@@ -19994,7 +20089,8 @@ function getParentNode(node) {
|
|
|
19994
20089
|
if (getNodeName(node) === "html") {
|
|
19995
20090
|
return node;
|
|
19996
20091
|
}
|
|
19997
|
-
|
|
20092
|
+
const result2 = node.assignedSlot || node.parentNode || (isShadowRoot(node) ? node.host : null) || getDocumentElement(node);
|
|
20093
|
+
return isShadowRoot(result2) ? result2.host : result2;
|
|
19998
20094
|
}
|
|
19999
20095
|
function getTrueOffsetParent(element) {
|
|
20000
20096
|
if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
|
|
@@ -20004,15 +20100,11 @@ function getTrueOffsetParent(element) {
|
|
|
20004
20100
|
}
|
|
20005
20101
|
function getContainingBlock(element) {
|
|
20006
20102
|
let currentNode = getParentNode(element);
|
|
20007
|
-
if (isShadowRoot(currentNode)) {
|
|
20008
|
-
currentNode = currentNode.host;
|
|
20009
|
-
}
|
|
20010
20103
|
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
20011
20104
|
if (isContainingBlock(currentNode)) {
|
|
20012
20105
|
return currentNode;
|
|
20013
20106
|
} else {
|
|
20014
|
-
|
|
20015
|
-
currentNode = isShadowRoot(parent) ? parent.host : parent;
|
|
20107
|
+
currentNode = getParentNode(currentNode);
|
|
20016
20108
|
}
|
|
20017
20109
|
}
|
|
20018
20110
|
return null;
|
|
@@ -20056,6 +20148,10 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
20056
20148
|
scrollLeft: 0,
|
|
20057
20149
|
scrollTop: 0
|
|
20058
20150
|
};
|
|
20151
|
+
let scale2 = {
|
|
20152
|
+
x: 1,
|
|
20153
|
+
y: 1
|
|
20154
|
+
};
|
|
20059
20155
|
const offsets = {
|
|
20060
20156
|
x: 0,
|
|
20061
20157
|
y: 0
|
|
@@ -20065,15 +20161,17 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
20065
20161
|
scroll = getNodeScroll(offsetParent);
|
|
20066
20162
|
}
|
|
20067
20163
|
if (isHTMLElement(offsetParent)) {
|
|
20068
|
-
const offsetRect = getBoundingClientRect(offsetParent
|
|
20164
|
+
const offsetRect = getBoundingClientRect(offsetParent);
|
|
20165
|
+
scale2 = getScale(offsetParent);
|
|
20069
20166
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
20070
20167
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
20071
20168
|
}
|
|
20072
20169
|
}
|
|
20073
20170
|
return {
|
|
20074
|
-
|
|
20075
|
-
|
|
20076
|
-
|
|
20171
|
+
width: rect.width * scale2.x,
|
|
20172
|
+
height: rect.height * scale2.y,
|
|
20173
|
+
x: rect.x * scale2.x - scroll.scrollLeft * scale2.x + offsets.x,
|
|
20174
|
+
y: rect.y * scale2.y - scroll.scrollTop * scale2.y + offsets.y
|
|
20077
20175
|
};
|
|
20078
20176
|
}
|
|
20079
20177
|
function getViewportRect(element, strategy) {
|
|
@@ -20137,76 +20235,60 @@ function getOverflowAncestors(node, list2) {
|
|
|
20137
20235
|
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
20138
20236
|
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
|
20139
20237
|
const win = getWindow(scrollableAncestor);
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
return isBody ? updatedList : updatedList.concat(getOverflowAncestors(target));
|
|
20143
|
-
}
|
|
20144
|
-
function contains(parent, child) {
|
|
20145
|
-
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();
|
|
20146
|
-
if (parent.contains(child)) {
|
|
20147
|
-
return true;
|
|
20148
|
-
} else if (rootNode && isShadowRoot(rootNode)) {
|
|
20149
|
-
let next = child;
|
|
20150
|
-
do {
|
|
20151
|
-
if (next && parent === next) {
|
|
20152
|
-
return true;
|
|
20153
|
-
}
|
|
20154
|
-
next = next.parentNode || next.host;
|
|
20155
|
-
} while (next);
|
|
20156
|
-
}
|
|
20157
|
-
return false;
|
|
20158
|
-
}
|
|
20159
|
-
function getNearestParentCapableOfEscapingClipping(element, clippingAncestors) {
|
|
20160
|
-
let currentNode = element;
|
|
20161
|
-
while (currentNode && !isLastTraversableNode(currentNode) && !clippingAncestors.includes(currentNode)) {
|
|
20162
|
-
if (isElement(currentNode) && ["absolute", "fixed"].includes(getComputedStyle(currentNode).position)) {
|
|
20163
|
-
break;
|
|
20164
|
-
}
|
|
20165
|
-
const parentNode = getParentNode(currentNode);
|
|
20166
|
-
currentNode = isShadowRoot(parentNode) ? parentNode.host : parentNode;
|
|
20238
|
+
if (isBody) {
|
|
20239
|
+
return list2.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
|
|
20167
20240
|
}
|
|
20168
|
-
return
|
|
20241
|
+
return list2.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
20169
20242
|
}
|
|
20170
20243
|
function getInnerBoundingClientRect(element, strategy) {
|
|
20171
|
-
const clientRect = getBoundingClientRect(element,
|
|
20244
|
+
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
20172
20245
|
const top = clientRect.top + element.clientTop;
|
|
20173
20246
|
const left = clientRect.left + element.clientLeft;
|
|
20247
|
+
const scale2 = isHTMLElement(element) ? getScale(element) : {
|
|
20248
|
+
x: 1,
|
|
20249
|
+
y: 1
|
|
20250
|
+
};
|
|
20251
|
+
const width = element.clientWidth * scale2.x;
|
|
20252
|
+
const height = element.clientHeight * scale2.y;
|
|
20253
|
+
const x = left * scale2.x;
|
|
20254
|
+
const y = top * scale2.y;
|
|
20174
20255
|
return {
|
|
20175
|
-
top,
|
|
20176
|
-
left,
|
|
20177
|
-
|
|
20178
|
-
|
|
20179
|
-
|
|
20180
|
-
|
|
20181
|
-
width
|
|
20182
|
-
height
|
|
20183
|
-
};
|
|
20184
|
-
}
|
|
20185
|
-
function getClientRectFromClippingAncestor(element,
|
|
20186
|
-
if (
|
|
20256
|
+
top: y,
|
|
20257
|
+
left: x,
|
|
20258
|
+
right: x + width,
|
|
20259
|
+
bottom: y + height,
|
|
20260
|
+
x,
|
|
20261
|
+
y,
|
|
20262
|
+
width,
|
|
20263
|
+
height
|
|
20264
|
+
};
|
|
20265
|
+
}
|
|
20266
|
+
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
20267
|
+
if (clippingAncestor === "viewport") {
|
|
20187
20268
|
return rectToClientRect(getViewportRect(element, strategy));
|
|
20188
20269
|
}
|
|
20189
|
-
if (isElement(
|
|
20190
|
-
return getInnerBoundingClientRect(
|
|
20270
|
+
if (isElement(clippingAncestor)) {
|
|
20271
|
+
return getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
20191
20272
|
}
|
|
20192
20273
|
return rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
20193
20274
|
}
|
|
20194
|
-
function
|
|
20195
|
-
|
|
20196
|
-
|
|
20197
|
-
|
|
20198
|
-
|
|
20199
|
-
|
|
20200
|
-
|
|
20201
|
-
|
|
20202
|
-
|
|
20203
|
-
|
|
20275
|
+
function getClippingElementAncestors(element) {
|
|
20276
|
+
let result2 = getOverflowAncestors(element).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
20277
|
+
let currentContainingBlockComputedStyle = null;
|
|
20278
|
+
const elementIsFixed = getComputedStyle(element).position === "fixed";
|
|
20279
|
+
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
20280
|
+
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
20281
|
+
const computedStyle = getComputedStyle(currentNode);
|
|
20282
|
+
const containingBlock = isContainingBlock(currentNode);
|
|
20283
|
+
const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
|
|
20284
|
+
if (shouldDropCurrentNode) {
|
|
20285
|
+
result2 = result2.filter((ancestor) => ancestor !== currentNode);
|
|
20286
|
+
} else {
|
|
20287
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
20204
20288
|
}
|
|
20289
|
+
currentNode = getParentNode(currentNode);
|
|
20205
20290
|
}
|
|
20206
|
-
|
|
20207
|
-
return [];
|
|
20208
|
-
}
|
|
20209
|
-
return clippingAncestors.filter((clippingAncestors2) => clipperElement && isElement(clippingAncestors2) && contains(clippingAncestors2, clipperElement) && getNodeName(clippingAncestors2) !== "body");
|
|
20291
|
+
return result2;
|
|
20210
20292
|
}
|
|
20211
20293
|
function getClippingRect(_ref) {
|
|
20212
20294
|
let {
|
|
@@ -20215,8 +20297,8 @@ function getClippingRect(_ref) {
|
|
|
20215
20297
|
rootBoundary,
|
|
20216
20298
|
strategy
|
|
20217
20299
|
} = _ref;
|
|
20218
|
-
const
|
|
20219
|
-
const clippingAncestors = [...
|
|
20300
|
+
const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element) : [].concat(boundary);
|
|
20301
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
20220
20302
|
const firstClippingAncestor = clippingAncestors[0];
|
|
20221
20303
|
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
20222
20304
|
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
@@ -20240,18 +20322,21 @@ const platform = {
|
|
|
20240
20322
|
getDimensions,
|
|
20241
20323
|
getOffsetParent,
|
|
20242
20324
|
getDocumentElement,
|
|
20243
|
-
|
|
20325
|
+
getScale,
|
|
20326
|
+
async getElementRects(_ref) {
|
|
20244
20327
|
let {
|
|
20245
20328
|
reference,
|
|
20246
20329
|
floating,
|
|
20247
20330
|
strategy
|
|
20248
20331
|
} = _ref;
|
|
20332
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
20333
|
+
const getDimensionsFn = this.getDimensions;
|
|
20249
20334
|
return {
|
|
20250
|
-
reference: getRectRelativeToOffsetParent(reference,
|
|
20335
|
+
reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
|
|
20251
20336
|
floating: {
|
|
20252
|
-
...getDimensions(floating),
|
|
20253
20337
|
x: 0,
|
|
20254
|
-
y: 0
|
|
20338
|
+
y: 0,
|
|
20339
|
+
...await getDimensionsFn(floating)
|
|
20255
20340
|
}
|
|
20256
20341
|
};
|
|
20257
20342
|
},
|
|
@@ -20358,7 +20443,7 @@ function normalizePlacement(placement) {
|
|
|
20358
20443
|
}
|
|
20359
20444
|
let tenPxTester = null;
|
|
20360
20445
|
let tester = null;
|
|
20361
|
-
if (canUseDom) {
|
|
20446
|
+
if (canUseDom$2) {
|
|
20362
20447
|
tenPxTester = document.createElement("div");
|
|
20363
20448
|
tenPxTester.className = "adm-px-tester";
|
|
20364
20449
|
tenPxTester.style.setProperty("--size", "10");
|
|
@@ -20388,7 +20473,7 @@ const defaultProps$B = {
|
|
|
20388
20473
|
stopPropagation: ["click"],
|
|
20389
20474
|
getContainer: () => document.body
|
|
20390
20475
|
};
|
|
20391
|
-
const Popover$1 = React$
|
|
20476
|
+
const Popover$1 = React$4.forwardRef((p, ref) => {
|
|
20392
20477
|
const props = mergeProps(defaultProps$B, p);
|
|
20393
20478
|
const {
|
|
20394
20479
|
mode = "light"
|
|
@@ -20399,16 +20484,16 @@ const Popover$1 = React$1.forwardRef((p, ref) => {
|
|
|
20399
20484
|
defaultValue: props.defaultVisible,
|
|
20400
20485
|
onChange: props.onVisibleChange
|
|
20401
20486
|
});
|
|
20402
|
-
React$
|
|
20487
|
+
React$4.useImperativeHandle(ref, () => {
|
|
20403
20488
|
return {
|
|
20404
20489
|
show: () => setVisible(true),
|
|
20405
20490
|
hide: () => setVisible(false),
|
|
20406
20491
|
visible
|
|
20407
20492
|
};
|
|
20408
20493
|
}, [visible]);
|
|
20409
|
-
const targetRef = React$
|
|
20410
|
-
const floatingRef = React$
|
|
20411
|
-
const arrowRef = React$
|
|
20494
|
+
const targetRef = React$4.useRef(null);
|
|
20495
|
+
const floatingRef = React$4.useRef(null);
|
|
20496
|
+
const arrowRef = React$4.useRef(null);
|
|
20412
20497
|
const floating = withStopPropagation(props.stopPropagation, withNativeProps(props, React__default.default.createElement("div", {
|
|
20413
20498
|
className: classNames(classPrefix$N, `${classPrefix$N}-${mode}`, !visible && `${classPrefix$N}-hidden`),
|
|
20414
20499
|
ref: floatingRef
|
|
@@ -20422,7 +20507,7 @@ const Popover$1 = React$1.forwardRef((p, ref) => {
|
|
|
20422
20507
|
}, React__default.default.createElement("div", {
|
|
20423
20508
|
className: `${classPrefix$N}-inner-content`
|
|
20424
20509
|
}, props.content)))));
|
|
20425
|
-
const [targetElement, setTargetElement] = React$
|
|
20510
|
+
const [targetElement, setTargetElement] = React$4.useState(null);
|
|
20426
20511
|
function update2() {
|
|
20427
20512
|
var _a, _b, _c;
|
|
20428
20513
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
@@ -20482,7 +20567,7 @@ const Popover$1 = React$1.forwardRef((p, ref) => {
|
|
|
20482
20567
|
useIsomorphicLayoutEffect$2(() => {
|
|
20483
20568
|
update2();
|
|
20484
20569
|
});
|
|
20485
|
-
React$
|
|
20570
|
+
React$4.useEffect(() => {
|
|
20486
20571
|
if (!targetElement)
|
|
20487
20572
|
return;
|
|
20488
20573
|
if (!props.trigger)
|
|
@@ -20495,7 +20580,7 @@ const Popover$1 = React$1.forwardRef((p, ref) => {
|
|
|
20495
20580
|
targetElement.removeEventListener("click", handleClick);
|
|
20496
20581
|
};
|
|
20497
20582
|
}, [targetElement, props.trigger]);
|
|
20498
|
-
React$
|
|
20583
|
+
React$4.useEffect(() => {
|
|
20499
20584
|
const floatingElement = floatingRef.current;
|
|
20500
20585
|
if (!targetElement || !floatingElement)
|
|
20501
20586
|
return;
|
|
@@ -20517,10 +20602,10 @@ const Popover$1 = React$1.forwardRef((p, ref) => {
|
|
|
20517
20602
|
}, props.children), shouldRender && renderToContainer(props.getContainer, floating));
|
|
20518
20603
|
});
|
|
20519
20604
|
const classPrefix$M = `adm-popover-menu`;
|
|
20520
|
-
const PopoverMenu = React$
|
|
20521
|
-
const innerRef = React$
|
|
20522
|
-
React$
|
|
20523
|
-
const onClick = React$
|
|
20605
|
+
const PopoverMenu = React$4.forwardRef((props, ref) => {
|
|
20606
|
+
const innerRef = React$4.useRef(null);
|
|
20607
|
+
React$4.useImperativeHandle(ref, () => innerRef.current, []);
|
|
20608
|
+
const onClick = React$4.useCallback((e) => {
|
|
20524
20609
|
var _a;
|
|
20525
20610
|
const {
|
|
20526
20611
|
onAction
|
|
@@ -20530,7 +20615,7 @@ const PopoverMenu = React$1.forwardRef((props, ref) => {
|
|
|
20530
20615
|
}
|
|
20531
20616
|
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.hide();
|
|
20532
20617
|
}, [props.onAction]);
|
|
20533
|
-
const overlay = React$
|
|
20618
|
+
const overlay = React$4.useMemo(() => {
|
|
20534
20619
|
return React__default.default.createElement("div", {
|
|
20535
20620
|
className: `${classPrefix$M}-list`
|
|
20536
20621
|
}, React__default.default.createElement("div", {
|
|
@@ -20592,7 +20677,7 @@ const FormItemLayout = (props) => {
|
|
|
20592
20677
|
arrow: arrow2,
|
|
20593
20678
|
childElementPosition = "normal"
|
|
20594
20679
|
} = props;
|
|
20595
|
-
const context = React$
|
|
20680
|
+
const context = React$4.useContext(FormContext);
|
|
20596
20681
|
const {
|
|
20597
20682
|
locale
|
|
20598
20683
|
} = useConfig();
|
|
@@ -20691,16 +20776,16 @@ const FormItem = (props) => {
|
|
|
20691
20776
|
} = props, fieldProps = __rest(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow"]);
|
|
20692
20777
|
const {
|
|
20693
20778
|
name: formName
|
|
20694
|
-
} = React$
|
|
20779
|
+
} = React$4.useContext(FormContext);
|
|
20695
20780
|
const {
|
|
20696
20781
|
validateTrigger: contextValidateTrigger
|
|
20697
|
-
} = React$
|
|
20782
|
+
} = React$4.useContext(default_1);
|
|
20698
20783
|
const mergedValidateTrigger = undefinedFallback(validateTrigger, contextValidateTrigger, trigger);
|
|
20699
|
-
const widgetRef = React$
|
|
20700
|
-
const updateRef2 = React$
|
|
20784
|
+
const widgetRef = React$4.useRef(null);
|
|
20785
|
+
const updateRef2 = React$4.useRef(0);
|
|
20701
20786
|
updateRef2.current += 1;
|
|
20702
|
-
const [subMetas, setSubMetas] = React$
|
|
20703
|
-
const onSubMetaChange = React$
|
|
20787
|
+
const [subMetas, setSubMetas] = React$4.useState({});
|
|
20788
|
+
const onSubMetaChange = React$4.useCallback((subMeta, namePath) => {
|
|
20704
20789
|
setSubMetas((prevSubMetas) => {
|
|
20705
20790
|
const nextSubMetas = Object.assign({}, prevSubMetas);
|
|
20706
20791
|
const nameKey = namePath.join(NAME_SPLIT);
|
|
@@ -20767,7 +20852,7 @@ const FormItem = (props) => {
|
|
|
20767
20852
|
if (messageVariables) {
|
|
20768
20853
|
Variables = Object.assign(Object.assign({}, Variables), messageVariables);
|
|
20769
20854
|
}
|
|
20770
|
-
const notifyParentMetaChange = React$
|
|
20855
|
+
const notifyParentMetaChange = React$4.useContext(NoStyleItemContext);
|
|
20771
20856
|
const onMetaChange = (meta) => {
|
|
20772
20857
|
if (noStyle && notifyParentMetaChange) {
|
|
20773
20858
|
const namePath = meta.name;
|
|
@@ -20849,7 +20934,7 @@ const FormItem = (props) => {
|
|
|
20849
20934
|
};
|
|
20850
20935
|
const FormSubscribe = (props) => {
|
|
20851
20936
|
const update2 = useUpdate$1();
|
|
20852
|
-
const form = React$
|
|
20937
|
+
const form = React$4.useContext(Context$1);
|
|
20853
20938
|
return React__default.default.createElement(React__default.default.Fragment, null, props.children(form.getFieldsValue(props.to), form), props.to.map((namePath) => React__default.default.createElement(Watcher, {
|
|
20854
20939
|
key: namePath.toString(),
|
|
20855
20940
|
form,
|
|
@@ -20857,7 +20942,7 @@ const FormSubscribe = (props) => {
|
|
|
20857
20942
|
onChange: update2
|
|
20858
20943
|
})));
|
|
20859
20944
|
};
|
|
20860
|
-
const Watcher = React$
|
|
20945
|
+
const Watcher = React$4.memo((props) => {
|
|
20861
20946
|
const value = useWatch(props.namePath, props.form);
|
|
20862
20947
|
useIsomorphicUpdateLayoutEffect(() => {
|
|
20863
20948
|
props.onChange();
|
|
@@ -20942,8 +21027,8 @@ const Slide = (props) => {
|
|
|
20942
21027
|
dragLockRef,
|
|
20943
21028
|
maxZoom
|
|
20944
21029
|
} = props;
|
|
20945
|
-
const controlRef = React$
|
|
20946
|
-
const imgRef = React$
|
|
21030
|
+
const controlRef = React$4.useRef(null);
|
|
21031
|
+
const imgRef = React$4.useRef(null);
|
|
20947
21032
|
const [{
|
|
20948
21033
|
matrix
|
|
20949
21034
|
}, api] = useSpring(() => ({
|
|
@@ -20954,7 +21039,7 @@ const Slide = (props) => {
|
|
|
20954
21039
|
}));
|
|
20955
21040
|
const controlSize = useSize(controlRef);
|
|
20956
21041
|
const imgSize = useSize(imgRef);
|
|
20957
|
-
const pinchLockRef = React$
|
|
21042
|
+
const pinchLockRef = React$4.useRef(false);
|
|
20958
21043
|
const boundMatrix = (nextMatrix, type4, last = false) => {
|
|
20959
21044
|
if (!controlSize || !imgSize)
|
|
20960
21045
|
return nextMatrix;
|
|
@@ -21097,7 +21182,7 @@ const Slide = (props) => {
|
|
|
21097
21182
|
}))));
|
|
21098
21183
|
};
|
|
21099
21184
|
const classPrefix$I = `adm-image-viewer`;
|
|
21100
|
-
const Slides = React$
|
|
21185
|
+
const Slides = React$4.forwardRef((props, ref) => {
|
|
21101
21186
|
const slideWidth = window.innerWidth + convertPx(16);
|
|
21102
21187
|
const [{
|
|
21103
21188
|
x
|
|
@@ -21118,10 +21203,10 @@ const Slides = React$1.forwardRef((props, ref) => {
|
|
|
21118
21203
|
immediate
|
|
21119
21204
|
});
|
|
21120
21205
|
}
|
|
21121
|
-
React$
|
|
21206
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
21122
21207
|
swipeTo
|
|
21123
21208
|
}));
|
|
21124
|
-
const dragLockRef = React$
|
|
21209
|
+
const dragLockRef = React$4.useRef(false);
|
|
21125
21210
|
const bind = useDrag((state) => {
|
|
21126
21211
|
if (dragLockRef.current)
|
|
21127
21212
|
return;
|
|
@@ -21214,19 +21299,19 @@ const ImageViewer$1 = (p) => {
|
|
|
21214
21299
|
const multiDefaultProps = Object.assign(Object.assign({}, defaultProps$A), {
|
|
21215
21300
|
defaultIndex: 0
|
|
21216
21301
|
});
|
|
21217
|
-
const MultiImageViewer = React$
|
|
21302
|
+
const MultiImageViewer = React$4.forwardRef((p, ref) => {
|
|
21218
21303
|
var _a;
|
|
21219
21304
|
const props = mergeProps(multiDefaultProps, p);
|
|
21220
|
-
const [index2, setIndex] = React$
|
|
21221
|
-
const slidesRef = React$
|
|
21222
|
-
React$
|
|
21305
|
+
const [index2, setIndex] = React$4.useState(props.defaultIndex);
|
|
21306
|
+
const slidesRef = React$4.useRef(null);
|
|
21307
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
21223
21308
|
swipeTo: (index3, immediate) => {
|
|
21224
21309
|
var _a2;
|
|
21225
21310
|
setIndex(index3);
|
|
21226
21311
|
(_a2 = slidesRef.current) === null || _a2 === void 0 ? void 0 : _a2.swipeTo(index3, immediate);
|
|
21227
21312
|
}
|
|
21228
21313
|
}));
|
|
21229
|
-
const onSlideChange = React$
|
|
21314
|
+
const onSlideChange = React$4.useCallback((index3) => {
|
|
21230
21315
|
var _a2;
|
|
21231
21316
|
setIndex(index3);
|
|
21232
21317
|
(_a2 = props.onIndexChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, index3);
|
|
@@ -21304,10 +21389,11 @@ const PreviewItem = (props) => {
|
|
|
21304
21389
|
url: url2,
|
|
21305
21390
|
file,
|
|
21306
21391
|
deletable,
|
|
21392
|
+
deleteIcon,
|
|
21307
21393
|
onDelete,
|
|
21308
21394
|
imageFit
|
|
21309
21395
|
} = props;
|
|
21310
|
-
const src = React$
|
|
21396
|
+
const src = React$4.useMemo(() => {
|
|
21311
21397
|
if (url2) {
|
|
21312
21398
|
return url2;
|
|
21313
21399
|
}
|
|
@@ -21316,11 +21402,12 @@ const PreviewItem = (props) => {
|
|
|
21316
21402
|
}
|
|
21317
21403
|
return "";
|
|
21318
21404
|
}, [url2, file]);
|
|
21319
|
-
React$
|
|
21405
|
+
React$4.useEffect(() => {
|
|
21320
21406
|
return () => {
|
|
21321
|
-
|
|
21407
|
+
if (file)
|
|
21408
|
+
URL.revokeObjectURL(src);
|
|
21322
21409
|
};
|
|
21323
|
-
}, [src]);
|
|
21410
|
+
}, [src, file]);
|
|
21324
21411
|
function renderLoading() {
|
|
21325
21412
|
return props.status === "pending" && React__default.default.createElement("div", {
|
|
21326
21413
|
className: `${classPrefix$G}-cell-mask`
|
|
@@ -21336,9 +21423,7 @@ const PreviewItem = (props) => {
|
|
|
21336
21423
|
return deletable && React__default.default.createElement("span", {
|
|
21337
21424
|
className: `${classPrefix$G}-cell-delete`,
|
|
21338
21425
|
onClick: onDelete
|
|
21339
|
-
},
|
|
21340
|
-
className: `${classPrefix$G}-cell-delete-icon`
|
|
21341
|
-
}));
|
|
21426
|
+
}, deleteIcon);
|
|
21342
21427
|
}
|
|
21343
21428
|
return React__default.default.createElement("div", {
|
|
21344
21429
|
className: classNames(`${classPrefix$G}-cell`, props.status === "fail" && `${classPrefix$G}-cell-fail`)
|
|
@@ -21381,6 +21466,9 @@ const classPrefix$E = `adm-image-uploader`;
|
|
|
21381
21466
|
const defaultProps$y = {
|
|
21382
21467
|
disableUpload: false,
|
|
21383
21468
|
deletable: true,
|
|
21469
|
+
deleteIcon: React__default.default.createElement(CloseOutline, {
|
|
21470
|
+
className: `${classPrefix$E}-cell-delete-icon`
|
|
21471
|
+
}),
|
|
21384
21472
|
showUpload: true,
|
|
21385
21473
|
multiple: false,
|
|
21386
21474
|
maxCount: 0,
|
|
@@ -21395,8 +21483,26 @@ const ImageUploader$1 = (p) => {
|
|
|
21395
21483
|
locale
|
|
21396
21484
|
} = useConfig();
|
|
21397
21485
|
const props = mergeProps(defaultProps$y, p);
|
|
21486
|
+
const {
|
|
21487
|
+
columns
|
|
21488
|
+
} = props;
|
|
21398
21489
|
const [value, setValue2] = usePropsValue(props);
|
|
21399
|
-
const [tasks, setTasks] = React$
|
|
21490
|
+
const [tasks, setTasks] = React$4.useState([]);
|
|
21491
|
+
const containerRef = React$4.useRef(null);
|
|
21492
|
+
const containerSize = useSize(containerRef);
|
|
21493
|
+
const gapMeasureRef = React$4.useRef(null);
|
|
21494
|
+
const [cellSize, setCellSize] = React$4.useState(80);
|
|
21495
|
+
useIsomorphicLayoutEffect$2(() => {
|
|
21496
|
+
const gapMeasure = gapMeasureRef.current;
|
|
21497
|
+
if (columns && containerSize && gapMeasure) {
|
|
21498
|
+
const width = containerSize.width;
|
|
21499
|
+
const gap = measureCSSLength(window.getComputedStyle(gapMeasure).getPropertyValue("height"));
|
|
21500
|
+
setCellSize((width - gap * (columns - 1)) / columns);
|
|
21501
|
+
}
|
|
21502
|
+
}, [containerSize === null || containerSize === void 0 ? void 0 : containerSize.width]);
|
|
21503
|
+
const style = {
|
|
21504
|
+
"--cell-size": cellSize + "px"
|
|
21505
|
+
};
|
|
21400
21506
|
useIsomorphicLayoutEffect$2(() => {
|
|
21401
21507
|
setTasks((prev) => prev.filter((task) => {
|
|
21402
21508
|
if (task.url === void 0)
|
|
@@ -21411,7 +21517,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21411
21517
|
status: item.status
|
|
21412
21518
|
})));
|
|
21413
21519
|
}, [tasks]);
|
|
21414
|
-
const idCountRef = React$
|
|
21520
|
+
const idCountRef = React$4.useRef(0);
|
|
21415
21521
|
const {
|
|
21416
21522
|
maxCount,
|
|
21417
21523
|
onPreview,
|
|
@@ -21499,7 +21605,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21499
21605
|
}))).catch((error) => console.error(error));
|
|
21500
21606
|
});
|
|
21501
21607
|
}
|
|
21502
|
-
const imageViewerHandlerRef = React$
|
|
21608
|
+
const imageViewerHandlerRef = React$4.useRef(null);
|
|
21503
21609
|
function previewImage(index2) {
|
|
21504
21610
|
imageViewerHandlerRef.current = ImageViewer.Multi.show({
|
|
21505
21611
|
images: value.map((fileItem) => fileItem.url),
|
|
@@ -21522,6 +21628,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21522
21628
|
key: (_a = fileItem.key) !== null && _a !== void 0 ? _a : index2,
|
|
21523
21629
|
url: (_b = fileItem.thumbnailUrl) !== null && _b !== void 0 ? _b : fileItem.url,
|
|
21524
21630
|
deletable: props.deletable,
|
|
21631
|
+
deleteIcon: props.deleteIcon,
|
|
21525
21632
|
imageFit: props.imageFit,
|
|
21526
21633
|
onClick: () => {
|
|
21527
21634
|
if (props.preview) {
|
|
@@ -21540,26 +21647,27 @@ const ImageUploader$1 = (p) => {
|
|
|
21540
21647
|
return renderItem ? renderItem(originNode, fileItem, value) : originNode;
|
|
21541
21648
|
});
|
|
21542
21649
|
};
|
|
21543
|
-
|
|
21544
|
-
|
|
21545
|
-
|
|
21546
|
-
|
|
21547
|
-
wrap: true,
|
|
21548
|
-
block: true
|
|
21549
|
-
}, renderImages(), finalTasks.map((task) => {
|
|
21650
|
+
const contentNode = React__default.default.createElement(React__default.default.Fragment, null, renderImages(), tasks.map((task) => {
|
|
21651
|
+
if (!props.showFailed && task.status === "fail") {
|
|
21652
|
+
return null;
|
|
21653
|
+
}
|
|
21550
21654
|
return React__default.default.createElement(PreviewItem$1, {
|
|
21551
21655
|
key: task.id,
|
|
21552
21656
|
file: task.file,
|
|
21553
21657
|
deletable: task.status !== "pending",
|
|
21658
|
+
deleteIcon: props.deleteIcon,
|
|
21554
21659
|
status: task.status,
|
|
21555
21660
|
imageFit: props.imageFit,
|
|
21556
21661
|
onDelete: () => {
|
|
21557
|
-
setTasks(
|
|
21662
|
+
setTasks(tasks.filter((x) => x.id !== task.id));
|
|
21558
21663
|
}
|
|
21559
21664
|
});
|
|
21560
|
-
}),
|
|
21561
|
-
className: `${classPrefix$E}-upload-button-wrap
|
|
21562
|
-
|
|
21665
|
+
}), React__default.default.createElement("div", {
|
|
21666
|
+
className: `${classPrefix$E}-upload-button-wrap`,
|
|
21667
|
+
style: showUpload ? void 0 : {
|
|
21668
|
+
display: "none"
|
|
21669
|
+
}
|
|
21670
|
+
}, props.children || React__default.default.createElement("span", {
|
|
21563
21671
|
className: `${classPrefix$E}-cell ${classPrefix$E}-upload-button`,
|
|
21564
21672
|
role: "button",
|
|
21565
21673
|
"aria-label": locale.ImageUploader.upload
|
|
@@ -21573,7 +21681,22 @@ const ImageUploader$1 = (p) => {
|
|
|
21573
21681
|
className: `${classPrefix$E}-input`,
|
|
21574
21682
|
onChange,
|
|
21575
21683
|
"aria-hidden": true
|
|
21576
|
-
})))
|
|
21684
|
+
})));
|
|
21685
|
+
return withNativeProps(props, React__default.default.createElement("div", {
|
|
21686
|
+
className: classPrefix$E,
|
|
21687
|
+
ref: containerRef
|
|
21688
|
+
}, columns ? React__default.default.createElement(Grid, {
|
|
21689
|
+
className: `${classPrefix$E}-grid`,
|
|
21690
|
+
columns,
|
|
21691
|
+
style
|
|
21692
|
+
}, React__default.default.createElement("div", {
|
|
21693
|
+
className: `${classPrefix$E}-gap-measure`,
|
|
21694
|
+
ref: gapMeasureRef
|
|
21695
|
+
}), contentNode.props.children) : React__default.default.createElement(Space, {
|
|
21696
|
+
className: `${classPrefix$E}-space`,
|
|
21697
|
+
wrap: true,
|
|
21698
|
+
block: true
|
|
21699
|
+
}, contentNode.props.children)));
|
|
21577
21700
|
};
|
|
21578
21701
|
const imageUploader = "";
|
|
21579
21702
|
const ImageUploader = ImageUploader$1;
|
|
@@ -21581,7 +21704,7 @@ const indexBar = "";
|
|
|
21581
21704
|
const Panel = () => null;
|
|
21582
21705
|
const classPrefix$D = `adm-index-bar`;
|
|
21583
21706
|
const Sidebar = (props) => {
|
|
21584
|
-
const [interacting, setInteracting] = React$
|
|
21707
|
+
const [interacting, setInteracting] = React$4.useState(false);
|
|
21585
21708
|
return React__default.default.createElement("div", {
|
|
21586
21709
|
className: classNames(`${classPrefix$D}-sidebar`, {
|
|
21587
21710
|
[`${classPrefix$D}-sidebar-interacting`]: interacting
|
|
@@ -21647,10 +21770,10 @@ const classPrefix$C = `adm-index-bar`;
|
|
|
21647
21770
|
const defaultProps$x = {
|
|
21648
21771
|
sticky: true
|
|
21649
21772
|
};
|
|
21650
|
-
const IndexBar = React$
|
|
21773
|
+
const IndexBar = React$4.forwardRef((p, ref) => {
|
|
21651
21774
|
const props = mergeProps(defaultProps$x, p);
|
|
21652
21775
|
const titleHeight = convertPx(35);
|
|
21653
|
-
const bodyRef = React$
|
|
21776
|
+
const bodyRef = React$4.useRef(null);
|
|
21654
21777
|
const indexItems = [];
|
|
21655
21778
|
const panels = [];
|
|
21656
21779
|
traverseReactNode(props.children, (child) => {
|
|
@@ -21673,11 +21796,11 @@ const IndexBar = React$1.forwardRef((p, ref) => {
|
|
|
21673
21796
|
className: `${classPrefix$C}-anchor-title`
|
|
21674
21797
|
}, child.props.title || child.props.index), child.props.children)));
|
|
21675
21798
|
});
|
|
21676
|
-
const [activeIndex, setActiveIndex] = React$
|
|
21799
|
+
const [activeIndex, setActiveIndex] = React$4.useState(() => {
|
|
21677
21800
|
const firstItem = indexItems[0];
|
|
21678
21801
|
return firstItem ? firstItem.index : null;
|
|
21679
21802
|
});
|
|
21680
|
-
React$
|
|
21803
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
21681
21804
|
scrollTo
|
|
21682
21805
|
}));
|
|
21683
21806
|
function scrollTo(index2) {
|
|
@@ -21760,7 +21883,7 @@ const defaultProps$w = {
|
|
|
21760
21883
|
};
|
|
21761
21884
|
const InfiniteScroll$1 = (p) => {
|
|
21762
21885
|
const props = mergeProps(defaultProps$w, p);
|
|
21763
|
-
const [failed, setFailed] = React$
|
|
21886
|
+
const [failed, setFailed] = React$4.useState(false);
|
|
21764
21887
|
const doLoadMore = useLockFn((isRetry) => __awaiter$1(void 0, void 0, void 0, function* () {
|
|
21765
21888
|
try {
|
|
21766
21889
|
yield props.loadMore(isRetry);
|
|
@@ -21769,10 +21892,10 @@ const InfiniteScroll$1 = (p) => {
|
|
|
21769
21892
|
throw e;
|
|
21770
21893
|
}
|
|
21771
21894
|
}));
|
|
21772
|
-
const elementRef = React$
|
|
21773
|
-
const [flag, setFlag] = React$
|
|
21774
|
-
const nextFlagRef = React$
|
|
21775
|
-
const [scrollParent, setScrollParent] = React$
|
|
21895
|
+
const elementRef = React$4.useRef(null);
|
|
21896
|
+
const [flag, setFlag] = React$4.useState({});
|
|
21897
|
+
const nextFlagRef = React$4.useRef(flag);
|
|
21898
|
+
const [scrollParent, setScrollParent] = React$4.useState();
|
|
21776
21899
|
const {
|
|
21777
21900
|
run: check
|
|
21778
21901
|
} = useThrottleFn(() => __awaiter$1(void 0, void 0, void 0, function* () {
|
|
@@ -21803,10 +21926,10 @@ const InfiniteScroll$1 = (p) => {
|
|
|
21803
21926
|
leading: true,
|
|
21804
21927
|
trailing: true
|
|
21805
21928
|
});
|
|
21806
|
-
React$
|
|
21929
|
+
React$4.useEffect(() => {
|
|
21807
21930
|
check();
|
|
21808
21931
|
});
|
|
21809
|
-
React$
|
|
21932
|
+
React$4.useEffect(() => {
|
|
21810
21933
|
const element = elementRef.current;
|
|
21811
21934
|
if (!element)
|
|
21812
21935
|
return;
|
|
@@ -21857,16 +21980,16 @@ const defaultProps$v = {
|
|
|
21857
21980
|
defaultValue: "",
|
|
21858
21981
|
onlyShowClearWhenFocus: true
|
|
21859
21982
|
};
|
|
21860
|
-
const Input$1 = React$
|
|
21983
|
+
const Input$1 = React$4.forwardRef((p, ref) => {
|
|
21861
21984
|
const props = mergeProps(defaultProps$v, p);
|
|
21862
21985
|
const [value, setValue2] = usePropsValue(props);
|
|
21863
|
-
const [hasFocus, setHasFocus] = React$
|
|
21864
|
-
const compositionStartRef = React$
|
|
21865
|
-
const nativeInputRef = React$
|
|
21986
|
+
const [hasFocus, setHasFocus] = React$4.useState(false);
|
|
21987
|
+
const compositionStartRef = React$4.useRef(false);
|
|
21988
|
+
const nativeInputRef = React$4.useRef(null);
|
|
21866
21989
|
const {
|
|
21867
21990
|
locale
|
|
21868
21991
|
} = useConfig();
|
|
21869
|
-
React$
|
|
21992
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
21870
21993
|
clear: () => {
|
|
21871
21994
|
setValue2("");
|
|
21872
21995
|
},
|
|
@@ -21996,8 +22119,8 @@ const JumboTab = () => {
|
|
|
21996
22119
|
};
|
|
21997
22120
|
const JumboTabs = (props) => {
|
|
21998
22121
|
var _a;
|
|
21999
|
-
const tabListContainerRef = React$
|
|
22000
|
-
const rootRef = React$
|
|
22122
|
+
const tabListContainerRef = React$4.useRef(null);
|
|
22123
|
+
const rootRef = React$4.useRef(null);
|
|
22001
22124
|
const keyToIndexRecord = {};
|
|
22002
22125
|
let firstActiveKey = null;
|
|
22003
22126
|
const panes = [];
|
|
@@ -22287,18 +22410,19 @@ const defaultProps$r = {
|
|
|
22287
22410
|
color: "default",
|
|
22288
22411
|
delay: 2e3,
|
|
22289
22412
|
speed: 50,
|
|
22413
|
+
wrap: false,
|
|
22290
22414
|
icon: React__default.default.createElement(SoundOutline, null)
|
|
22291
22415
|
};
|
|
22292
|
-
const NoticeBar$1 = React$
|
|
22416
|
+
const NoticeBar$1 = React$4.memo((p) => {
|
|
22293
22417
|
const props = mergeProps(defaultProps$r, p);
|
|
22294
|
-
const containerRef = React$
|
|
22295
|
-
const textRef = React$
|
|
22296
|
-
const [visible, setVisible] = React$
|
|
22418
|
+
const containerRef = React$4.useRef(null);
|
|
22419
|
+
const textRef = React$4.useRef(null);
|
|
22420
|
+
const [visible, setVisible] = React$4.useState(true);
|
|
22297
22421
|
const speed = props.speed;
|
|
22298
|
-
const delayLockRef = React$
|
|
22299
|
-
const animatingRef = React$
|
|
22422
|
+
const delayLockRef = React$4.useRef(true);
|
|
22423
|
+
const animatingRef = React$4.useRef(false);
|
|
22300
22424
|
function start2() {
|
|
22301
|
-
if (delayLockRef.current)
|
|
22425
|
+
if (delayLockRef.current || props.wrap)
|
|
22302
22426
|
return;
|
|
22303
22427
|
const container = containerRef.current;
|
|
22304
22428
|
const text = textRef.current;
|
|
@@ -22341,7 +22465,9 @@ const NoticeBar$1 = React$1.memo((p) => {
|
|
|
22341
22465
|
if (!visible)
|
|
22342
22466
|
return null;
|
|
22343
22467
|
return withNativeProps(props, React__default.default.createElement("div", {
|
|
22344
|
-
className: classNames(classPrefix$x, `${classPrefix$x}-${props.color}
|
|
22468
|
+
className: classNames(classPrefix$x, `${classPrefix$x}-${props.color}`, {
|
|
22469
|
+
[`${classPrefix$x}-wrap`]: props.wrap
|
|
22470
|
+
})
|
|
22345
22471
|
}, props.icon && React__default.default.createElement("span", {
|
|
22346
22472
|
className: `${classPrefix$x}-left`
|
|
22347
22473
|
}, props.icon), React__default.default.createElement("span", {
|
|
@@ -22400,8 +22526,8 @@ const NumberKeyboard$1 = (p) => {
|
|
|
22400
22526
|
showCloseButton,
|
|
22401
22527
|
onInput
|
|
22402
22528
|
} = props;
|
|
22403
|
-
const keyboardRef = React$
|
|
22404
|
-
const keys2 = React$
|
|
22529
|
+
const keyboardRef = React$4.useRef(null);
|
|
22530
|
+
const keys2 = React$4.useMemo(() => {
|
|
22405
22531
|
const defaultKeys = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
22406
22532
|
const keyList = randomOrder ? shuffle(defaultKeys) : defaultKeys;
|
|
22407
22533
|
const customKeys = Array.isArray(customKey) ? customKey : [customKey];
|
|
@@ -22417,8 +22543,8 @@ const NumberKeyboard$1 = (p) => {
|
|
|
22417
22543
|
}
|
|
22418
22544
|
return keyList;
|
|
22419
22545
|
}, [customKey, confirmText, randomOrder, randomOrder && visible]);
|
|
22420
|
-
const timeoutRef = React$
|
|
22421
|
-
const intervalRef = React$
|
|
22546
|
+
const timeoutRef = React$4.useRef(-1);
|
|
22547
|
+
const intervalRef = React$4.useRef(-1);
|
|
22422
22548
|
const onDelete = useMemoizedFn(() => {
|
|
22423
22549
|
var _a;
|
|
22424
22550
|
(_a = props.onDelete) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
@@ -22550,7 +22676,7 @@ const defaultProps$p = {
|
|
|
22550
22676
|
color: "primary",
|
|
22551
22677
|
direction: "horizontal"
|
|
22552
22678
|
};
|
|
22553
|
-
const PageIndicator$1 = React$
|
|
22679
|
+
const PageIndicator$1 = React$4.memo((p) => {
|
|
22554
22680
|
const props = mergeProps(defaultProps$p, p);
|
|
22555
22681
|
const dots = [];
|
|
22556
22682
|
for (let i = 0; i < props.total; i++) {
|
|
@@ -22576,17 +22702,17 @@ const defaultProps$o = {
|
|
|
22576
22702
|
seperated: false,
|
|
22577
22703
|
caret: true
|
|
22578
22704
|
};
|
|
22579
|
-
const PasscodeInput$1 = React$
|
|
22705
|
+
const PasscodeInput$1 = React$4.forwardRef((p, ref) => {
|
|
22580
22706
|
const props = mergeProps(defaultProps$o, p);
|
|
22581
22707
|
const cellLength = props.length > 0 && props.length < Infinity ? Math.floor(props.length) : defaultProps$o.length;
|
|
22582
22708
|
const {
|
|
22583
22709
|
locale
|
|
22584
22710
|
} = useConfig();
|
|
22585
|
-
const [focused, setFocused] = React$
|
|
22711
|
+
const [focused, setFocused] = React$4.useState(false);
|
|
22586
22712
|
const [value, setValue2] = usePropsValue(props);
|
|
22587
|
-
const rootRef = React$
|
|
22588
|
-
const nativeInputRef = React$
|
|
22589
|
-
React$
|
|
22713
|
+
const rootRef = React$4.useRef(null);
|
|
22714
|
+
const nativeInputRef = React$4.useRef(null);
|
|
22715
|
+
React$4.useEffect(() => {
|
|
22590
22716
|
var _a;
|
|
22591
22717
|
if (value.length >= cellLength) {
|
|
22592
22718
|
(_a = props.onFill) === null || _a === void 0 ? void 0 : _a.call(props, value);
|
|
@@ -22600,7 +22726,7 @@ const PasscodeInput$1 = React$1.forwardRef((p, ref) => {
|
|
|
22600
22726
|
setFocused(true);
|
|
22601
22727
|
(_b = props.onFocus) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
22602
22728
|
};
|
|
22603
|
-
React$
|
|
22729
|
+
React$4.useEffect(() => {
|
|
22604
22730
|
if (!focused)
|
|
22605
22731
|
return;
|
|
22606
22732
|
const timeout = window.setTimeout(() => {
|
|
@@ -22620,7 +22746,7 @@ const PasscodeInput$1 = React$1.forwardRef((p, ref) => {
|
|
|
22620
22746
|
setFocused(false);
|
|
22621
22747
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
22622
22748
|
};
|
|
22623
|
-
React$
|
|
22749
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
22624
22750
|
focus: () => {
|
|
22625
22751
|
var _a;
|
|
22626
22752
|
return (_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -22777,7 +22903,7 @@ const PullToRefresh$1 = (p) => {
|
|
|
22777
22903
|
}, p);
|
|
22778
22904
|
const headHeight = (_a = props.headHeight) !== null && _a !== void 0 ? _a : convertPx(40);
|
|
22779
22905
|
const threshold = (_b = props.threshold) !== null && _b !== void 0 ? _b : convertPx(60);
|
|
22780
|
-
const [status, setStatus] = React$
|
|
22906
|
+
const [status, setStatus] = React$4.useState("pulling");
|
|
22781
22907
|
const [springStyles, api] = useSpring(() => ({
|
|
22782
22908
|
from: {
|
|
22783
22909
|
height: 0
|
|
@@ -22788,9 +22914,9 @@ const PullToRefresh$1 = (p) => {
|
|
|
22788
22914
|
clamp: true
|
|
22789
22915
|
}
|
|
22790
22916
|
}));
|
|
22791
|
-
const elementRef = React$
|
|
22792
|
-
const pullingRef = React$
|
|
22793
|
-
React$
|
|
22917
|
+
const elementRef = React$4.useRef(null);
|
|
22918
|
+
const pullingRef = React$4.useRef(false);
|
|
22919
|
+
React$4.useEffect(() => {
|
|
22794
22920
|
var _a2;
|
|
22795
22921
|
(_a2 = elementRef.current) === null || _a2 === void 0 ? void 0 : _a2.addEventListener("touchmove", () => {
|
|
22796
22922
|
});
|
|
@@ -22921,7 +23047,7 @@ const PullToRefresh$1 = (p) => {
|
|
|
22921
23047
|
};
|
|
22922
23048
|
const PullToRefresh = PullToRefresh$1;
|
|
22923
23049
|
const radio = "";
|
|
22924
|
-
const RadioGroupContext = React$
|
|
23050
|
+
const RadioGroupContext = React$4.createContext(null);
|
|
22925
23051
|
const defaultProps$l = {
|
|
22926
23052
|
disabled: false,
|
|
22927
23053
|
defaultValue: null
|
|
@@ -22960,7 +23086,7 @@ const defaultProps$k = {
|
|
|
22960
23086
|
};
|
|
22961
23087
|
const Radio = (p) => {
|
|
22962
23088
|
const props = mergeProps(defaultProps$k, p);
|
|
22963
|
-
const groupContext = React$
|
|
23089
|
+
const groupContext = React$4.useContext(RadioGroupContext);
|
|
22964
23090
|
let [checked, setChecked] = usePropsValue({
|
|
22965
23091
|
value: props.checked,
|
|
22966
23092
|
defaultValue: props.defaultChecked,
|
|
@@ -23047,7 +23173,7 @@ const defaultProps$j = {
|
|
|
23047
23173
|
const Rate$1 = (p) => {
|
|
23048
23174
|
const props = mergeProps(defaultProps$j, p);
|
|
23049
23175
|
const [value, setValue2] = usePropsValue(props);
|
|
23050
|
-
const containerRef = React$
|
|
23176
|
+
const containerRef = React$4.useRef(null);
|
|
23051
23177
|
const starList = Array(props.count).fill(null);
|
|
23052
23178
|
function renderStar(v, half) {
|
|
23053
23179
|
return React__default.default.createElement("div", {
|
|
@@ -23163,7 +23289,7 @@ const ResultPage = (p) => {
|
|
|
23163
23289
|
onSecondaryButtonClick
|
|
23164
23290
|
} = props;
|
|
23165
23291
|
const resultIcon = icon || React__default.default.createElement(iconRecord[status]);
|
|
23166
|
-
const [collapse2, setCollapse] = React$
|
|
23292
|
+
const [collapse2, setCollapse] = React$4.useState(true);
|
|
23167
23293
|
const showSecondaryButton = isNodeWithContent(secondaryButtonText);
|
|
23168
23294
|
const showPrimaryButton = isNodeWithContent(primaryButtonText);
|
|
23169
23295
|
return withNativeProps(props, React__default.default.createElement("div", {
|
|
@@ -23232,7 +23358,7 @@ const defaultProps$g = {
|
|
|
23232
23358
|
clearOnCancel: true,
|
|
23233
23359
|
icon: React__default.default.createElement(SearchOutline, null)
|
|
23234
23360
|
};
|
|
23235
|
-
const SearchBar$1 = React$
|
|
23361
|
+
const SearchBar$1 = React$4.forwardRef((p, ref) => {
|
|
23236
23362
|
const {
|
|
23237
23363
|
locale
|
|
23238
23364
|
} = useConfig();
|
|
@@ -23240,10 +23366,10 @@ const SearchBar$1 = React$1.forwardRef((p, ref) => {
|
|
|
23240
23366
|
cancelText: locale.common.cancel
|
|
23241
23367
|
}, p);
|
|
23242
23368
|
const [value, setValue2] = usePropsValue(props);
|
|
23243
|
-
const [hasFocus, setHasFocus] = React$
|
|
23244
|
-
const inputRef = React$
|
|
23245
|
-
const composingRef = React$
|
|
23246
|
-
React$
|
|
23369
|
+
const [hasFocus, setHasFocus] = React$4.useState(false);
|
|
23370
|
+
const inputRef = React$4.useRef(null);
|
|
23371
|
+
const composingRef = React$4.useRef(false);
|
|
23372
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
23247
23373
|
clear: () => {
|
|
23248
23374
|
var _a;
|
|
23249
23375
|
return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.clear();
|
|
@@ -23336,7 +23462,7 @@ const SearchBar$1 = React$1.forwardRef((p, ref) => {
|
|
|
23336
23462
|
});
|
|
23337
23463
|
const SearchBar = SearchBar$1;
|
|
23338
23464
|
const selector = "";
|
|
23339
|
-
const CheckMark = React$
|
|
23465
|
+
const CheckMark = React$4.memo(() => {
|
|
23340
23466
|
return React__default.default.createElement("svg", {
|
|
23341
23467
|
width: "17px",
|
|
23342
23468
|
height: "13px",
|
|
@@ -23424,7 +23550,7 @@ const Selector$1 = (p) => {
|
|
|
23424
23550
|
};
|
|
23425
23551
|
const Selector = Selector$1;
|
|
23426
23552
|
const sideBar = "";
|
|
23427
|
-
const Corner = React$
|
|
23553
|
+
const Corner = React$4.memo((props) => withNativeProps(props, React__default.default.createElement("svg", {
|
|
23428
23554
|
viewBox: "0 0 30 30"
|
|
23429
23555
|
}, React__default.default.createElement("g", {
|
|
23430
23556
|
stroke: "none",
|
|
@@ -23575,6 +23701,320 @@ const Marks = ({
|
|
|
23575
23701
|
}, elements);
|
|
23576
23702
|
};
|
|
23577
23703
|
const Marks$1 = Marks;
|
|
23704
|
+
function supportBigInt() {
|
|
23705
|
+
return typeof BigInt === "function";
|
|
23706
|
+
}
|
|
23707
|
+
function trimNumber(numStr) {
|
|
23708
|
+
var str = numStr.trim();
|
|
23709
|
+
var negative = str.startsWith("-");
|
|
23710
|
+
if (negative) {
|
|
23711
|
+
str = str.slice(1);
|
|
23712
|
+
}
|
|
23713
|
+
str = str.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, "");
|
|
23714
|
+
if (str.startsWith(".")) {
|
|
23715
|
+
str = "0".concat(str);
|
|
23716
|
+
}
|
|
23717
|
+
var trimStr = str || "0";
|
|
23718
|
+
var splitNumber = trimStr.split(".");
|
|
23719
|
+
var integerStr = splitNumber[0] || "0";
|
|
23720
|
+
var decimalStr = splitNumber[1] || "0";
|
|
23721
|
+
if (integerStr === "0" && decimalStr === "0") {
|
|
23722
|
+
negative = false;
|
|
23723
|
+
}
|
|
23724
|
+
var negativeStr = negative ? "-" : "";
|
|
23725
|
+
return {
|
|
23726
|
+
negative,
|
|
23727
|
+
negativeStr,
|
|
23728
|
+
trimStr,
|
|
23729
|
+
integerStr,
|
|
23730
|
+
decimalStr,
|
|
23731
|
+
fullStr: "".concat(negativeStr).concat(trimStr)
|
|
23732
|
+
};
|
|
23733
|
+
}
|
|
23734
|
+
function isE(number4) {
|
|
23735
|
+
var str = String(number4);
|
|
23736
|
+
return !Number.isNaN(Number(str)) && str.includes("e");
|
|
23737
|
+
}
|
|
23738
|
+
function getNumberPrecision(number4) {
|
|
23739
|
+
var numStr = String(number4);
|
|
23740
|
+
if (isE(number4)) {
|
|
23741
|
+
var precision = Number(numStr.slice(numStr.indexOf("e-") + 2));
|
|
23742
|
+
var decimalMatch = numStr.match(/\.(\d+)/);
|
|
23743
|
+
if (decimalMatch !== null && decimalMatch !== void 0 && decimalMatch[1]) {
|
|
23744
|
+
precision += decimalMatch[1].length;
|
|
23745
|
+
}
|
|
23746
|
+
return precision;
|
|
23747
|
+
}
|
|
23748
|
+
return numStr.includes(".") && validateNumber(numStr) ? numStr.length - numStr.indexOf(".") - 1 : 0;
|
|
23749
|
+
}
|
|
23750
|
+
function num2str(number4) {
|
|
23751
|
+
var numStr = String(number4);
|
|
23752
|
+
if (isE(number4)) {
|
|
23753
|
+
if (number4 > Number.MAX_SAFE_INTEGER) {
|
|
23754
|
+
return String(supportBigInt() ? BigInt(number4).toString() : Number.MAX_SAFE_INTEGER);
|
|
23755
|
+
}
|
|
23756
|
+
if (number4 < Number.MIN_SAFE_INTEGER) {
|
|
23757
|
+
return String(supportBigInt() ? BigInt(number4).toString() : Number.MIN_SAFE_INTEGER);
|
|
23758
|
+
}
|
|
23759
|
+
numStr = number4.toFixed(getNumberPrecision(numStr));
|
|
23760
|
+
}
|
|
23761
|
+
return trimNumber(numStr).fullStr;
|
|
23762
|
+
}
|
|
23763
|
+
function validateNumber(num) {
|
|
23764
|
+
if (typeof num === "number") {
|
|
23765
|
+
return !Number.isNaN(num);
|
|
23766
|
+
}
|
|
23767
|
+
if (!num) {
|
|
23768
|
+
return false;
|
|
23769
|
+
}
|
|
23770
|
+
return /^\s*-?\d+(\.\d+)?\s*$/.test(num) || /^\s*-?\d+\.\s*$/.test(num) || /^\s*-?\.\d+\s*$/.test(num);
|
|
23771
|
+
}
|
|
23772
|
+
function isEmpty(value) {
|
|
23773
|
+
return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();
|
|
23774
|
+
}
|
|
23775
|
+
var NumberDecimal = /* @__PURE__ */ function() {
|
|
23776
|
+
function NumberDecimal2(value) {
|
|
23777
|
+
_classCallCheck(this, NumberDecimal2);
|
|
23778
|
+
_defineProperty(this, "origin", "");
|
|
23779
|
+
_defineProperty(this, "number", void 0);
|
|
23780
|
+
_defineProperty(this, "empty", void 0);
|
|
23781
|
+
if (isEmpty(value)) {
|
|
23782
|
+
this.empty = true;
|
|
23783
|
+
return;
|
|
23784
|
+
}
|
|
23785
|
+
this.origin = String(value);
|
|
23786
|
+
this.number = Number(value);
|
|
23787
|
+
}
|
|
23788
|
+
_createClass(NumberDecimal2, [{
|
|
23789
|
+
key: "negate",
|
|
23790
|
+
value: function negate() {
|
|
23791
|
+
return new NumberDecimal2(-this.toNumber());
|
|
23792
|
+
}
|
|
23793
|
+
}, {
|
|
23794
|
+
key: "add",
|
|
23795
|
+
value: function add(value) {
|
|
23796
|
+
if (this.isInvalidate()) {
|
|
23797
|
+
return new NumberDecimal2(value);
|
|
23798
|
+
}
|
|
23799
|
+
var target = Number(value);
|
|
23800
|
+
if (Number.isNaN(target)) {
|
|
23801
|
+
return this;
|
|
23802
|
+
}
|
|
23803
|
+
var number4 = this.number + target;
|
|
23804
|
+
if (number4 > Number.MAX_SAFE_INTEGER) {
|
|
23805
|
+
return new NumberDecimal2(Number.MAX_SAFE_INTEGER);
|
|
23806
|
+
}
|
|
23807
|
+
if (number4 < Number.MIN_SAFE_INTEGER) {
|
|
23808
|
+
return new NumberDecimal2(Number.MIN_SAFE_INTEGER);
|
|
23809
|
+
}
|
|
23810
|
+
var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
|
|
23811
|
+
return new NumberDecimal2(number4.toFixed(maxPrecision));
|
|
23812
|
+
}
|
|
23813
|
+
}, {
|
|
23814
|
+
key: "isEmpty",
|
|
23815
|
+
value: function isEmpty2() {
|
|
23816
|
+
return this.empty;
|
|
23817
|
+
}
|
|
23818
|
+
}, {
|
|
23819
|
+
key: "isNaN",
|
|
23820
|
+
value: function isNaN2() {
|
|
23821
|
+
return Number.isNaN(this.number);
|
|
23822
|
+
}
|
|
23823
|
+
}, {
|
|
23824
|
+
key: "isInvalidate",
|
|
23825
|
+
value: function isInvalidate() {
|
|
23826
|
+
return this.isEmpty() || this.isNaN();
|
|
23827
|
+
}
|
|
23828
|
+
}, {
|
|
23829
|
+
key: "equals",
|
|
23830
|
+
value: function equals(target) {
|
|
23831
|
+
return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());
|
|
23832
|
+
}
|
|
23833
|
+
}, {
|
|
23834
|
+
key: "lessEquals",
|
|
23835
|
+
value: function lessEquals(target) {
|
|
23836
|
+
return this.add(target.negate().toString()).toNumber() <= 0;
|
|
23837
|
+
}
|
|
23838
|
+
}, {
|
|
23839
|
+
key: "toNumber",
|
|
23840
|
+
value: function toNumber2() {
|
|
23841
|
+
return this.number;
|
|
23842
|
+
}
|
|
23843
|
+
}, {
|
|
23844
|
+
key: "toString",
|
|
23845
|
+
value: function toString() {
|
|
23846
|
+
var safe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
23847
|
+
if (!safe) {
|
|
23848
|
+
return this.origin;
|
|
23849
|
+
}
|
|
23850
|
+
if (this.isInvalidate()) {
|
|
23851
|
+
return "";
|
|
23852
|
+
}
|
|
23853
|
+
return num2str(this.number);
|
|
23854
|
+
}
|
|
23855
|
+
}]);
|
|
23856
|
+
return NumberDecimal2;
|
|
23857
|
+
}();
|
|
23858
|
+
var BigIntDecimal = /* @__PURE__ */ function() {
|
|
23859
|
+
function BigIntDecimal2(value) {
|
|
23860
|
+
_classCallCheck(this, BigIntDecimal2);
|
|
23861
|
+
_defineProperty(this, "origin", "");
|
|
23862
|
+
_defineProperty(this, "negative", void 0);
|
|
23863
|
+
_defineProperty(this, "integer", void 0);
|
|
23864
|
+
_defineProperty(this, "decimal", void 0);
|
|
23865
|
+
_defineProperty(this, "decimalLen", void 0);
|
|
23866
|
+
_defineProperty(this, "empty", void 0);
|
|
23867
|
+
_defineProperty(this, "nan", void 0);
|
|
23868
|
+
if (isEmpty(value)) {
|
|
23869
|
+
this.empty = true;
|
|
23870
|
+
return;
|
|
23871
|
+
}
|
|
23872
|
+
this.origin = String(value);
|
|
23873
|
+
if (value === "-" || Number.isNaN(value)) {
|
|
23874
|
+
this.nan = true;
|
|
23875
|
+
return;
|
|
23876
|
+
}
|
|
23877
|
+
var mergedValue = value;
|
|
23878
|
+
if (isE(mergedValue)) {
|
|
23879
|
+
mergedValue = Number(mergedValue);
|
|
23880
|
+
}
|
|
23881
|
+
mergedValue = typeof mergedValue === "string" ? mergedValue : num2str(mergedValue);
|
|
23882
|
+
if (validateNumber(mergedValue)) {
|
|
23883
|
+
var trimRet = trimNumber(mergedValue);
|
|
23884
|
+
this.negative = trimRet.negative;
|
|
23885
|
+
var numbers = trimRet.trimStr.split(".");
|
|
23886
|
+
this.integer = BigInt(numbers[0]);
|
|
23887
|
+
var decimalStr = numbers[1] || "0";
|
|
23888
|
+
this.decimal = BigInt(decimalStr);
|
|
23889
|
+
this.decimalLen = decimalStr.length;
|
|
23890
|
+
} else {
|
|
23891
|
+
this.nan = true;
|
|
23892
|
+
}
|
|
23893
|
+
}
|
|
23894
|
+
_createClass(BigIntDecimal2, [{
|
|
23895
|
+
key: "getMark",
|
|
23896
|
+
value: function getMark() {
|
|
23897
|
+
return this.negative ? "-" : "";
|
|
23898
|
+
}
|
|
23899
|
+
}, {
|
|
23900
|
+
key: "getIntegerStr",
|
|
23901
|
+
value: function getIntegerStr() {
|
|
23902
|
+
return this.integer.toString();
|
|
23903
|
+
}
|
|
23904
|
+
}, {
|
|
23905
|
+
key: "getDecimalStr",
|
|
23906
|
+
value: function getDecimalStr() {
|
|
23907
|
+
return this.decimal.toString().padStart(this.decimalLen, "0");
|
|
23908
|
+
}
|
|
23909
|
+
}, {
|
|
23910
|
+
key: "alignDecimal",
|
|
23911
|
+
value: function alignDecimal(decimalLength) {
|
|
23912
|
+
var str = "".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(decimalLength, "0"));
|
|
23913
|
+
return BigInt(str);
|
|
23914
|
+
}
|
|
23915
|
+
}, {
|
|
23916
|
+
key: "negate",
|
|
23917
|
+
value: function negate() {
|
|
23918
|
+
var clone = new BigIntDecimal2(this.toString());
|
|
23919
|
+
clone.negative = !clone.negative;
|
|
23920
|
+
return clone;
|
|
23921
|
+
}
|
|
23922
|
+
}, {
|
|
23923
|
+
key: "add",
|
|
23924
|
+
value: function add(value) {
|
|
23925
|
+
if (this.isInvalidate()) {
|
|
23926
|
+
return new BigIntDecimal2(value);
|
|
23927
|
+
}
|
|
23928
|
+
var offset2 = new BigIntDecimal2(value);
|
|
23929
|
+
if (offset2.isInvalidate()) {
|
|
23930
|
+
return this;
|
|
23931
|
+
}
|
|
23932
|
+
var maxDecimalLength = Math.max(this.getDecimalStr().length, offset2.getDecimalStr().length);
|
|
23933
|
+
var myAlignedDecimal = this.alignDecimal(maxDecimalLength);
|
|
23934
|
+
var offsetAlignedDecimal = offset2.alignDecimal(maxDecimalLength);
|
|
23935
|
+
var valueStr = (myAlignedDecimal + offsetAlignedDecimal).toString();
|
|
23936
|
+
var _trimNumber = trimNumber(valueStr), negativeStr = _trimNumber.negativeStr, trimStr = _trimNumber.trimStr;
|
|
23937
|
+
var hydrateValueStr = "".concat(negativeStr).concat(trimStr.padStart(maxDecimalLength + 1, "0"));
|
|
23938
|
+
return new BigIntDecimal2("".concat(hydrateValueStr.slice(0, -maxDecimalLength), ".").concat(hydrateValueStr.slice(-maxDecimalLength)));
|
|
23939
|
+
}
|
|
23940
|
+
}, {
|
|
23941
|
+
key: "isEmpty",
|
|
23942
|
+
value: function isEmpty2() {
|
|
23943
|
+
return this.empty;
|
|
23944
|
+
}
|
|
23945
|
+
}, {
|
|
23946
|
+
key: "isNaN",
|
|
23947
|
+
value: function isNaN2() {
|
|
23948
|
+
return this.nan;
|
|
23949
|
+
}
|
|
23950
|
+
}, {
|
|
23951
|
+
key: "isInvalidate",
|
|
23952
|
+
value: function isInvalidate() {
|
|
23953
|
+
return this.isEmpty() || this.isNaN();
|
|
23954
|
+
}
|
|
23955
|
+
}, {
|
|
23956
|
+
key: "equals",
|
|
23957
|
+
value: function equals(target) {
|
|
23958
|
+
return this.toString() === (target === null || target === void 0 ? void 0 : target.toString());
|
|
23959
|
+
}
|
|
23960
|
+
}, {
|
|
23961
|
+
key: "lessEquals",
|
|
23962
|
+
value: function lessEquals(target) {
|
|
23963
|
+
return this.add(target.negate().toString()).toNumber() <= 0;
|
|
23964
|
+
}
|
|
23965
|
+
}, {
|
|
23966
|
+
key: "toNumber",
|
|
23967
|
+
value: function toNumber2() {
|
|
23968
|
+
if (this.isNaN()) {
|
|
23969
|
+
return NaN;
|
|
23970
|
+
}
|
|
23971
|
+
return Number(this.toString());
|
|
23972
|
+
}
|
|
23973
|
+
}, {
|
|
23974
|
+
key: "toString",
|
|
23975
|
+
value: function toString() {
|
|
23976
|
+
var safe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
23977
|
+
if (!safe) {
|
|
23978
|
+
return this.origin;
|
|
23979
|
+
}
|
|
23980
|
+
if (this.isInvalidate()) {
|
|
23981
|
+
return "";
|
|
23982
|
+
}
|
|
23983
|
+
return trimNumber("".concat(this.getMark()).concat(this.getIntegerStr(), ".").concat(this.getDecimalStr())).fullStr;
|
|
23984
|
+
}
|
|
23985
|
+
}]);
|
|
23986
|
+
return BigIntDecimal2;
|
|
23987
|
+
}();
|
|
23988
|
+
function getMiniDecimal(value) {
|
|
23989
|
+
if (supportBigInt()) {
|
|
23990
|
+
return new BigIntDecimal(value);
|
|
23991
|
+
}
|
|
23992
|
+
return new NumberDecimal(value);
|
|
23993
|
+
}
|
|
23994
|
+
function toFixed(numStr, separatorStr, precision) {
|
|
23995
|
+
var cutOnly = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
23996
|
+
if (numStr === "") {
|
|
23997
|
+
return "";
|
|
23998
|
+
}
|
|
23999
|
+
var _trimNumber2 = trimNumber(numStr), negativeStr = _trimNumber2.negativeStr, integerStr = _trimNumber2.integerStr, decimalStr = _trimNumber2.decimalStr;
|
|
24000
|
+
var precisionDecimalStr = "".concat(separatorStr).concat(decimalStr);
|
|
24001
|
+
var numberWithoutDecimal = "".concat(negativeStr).concat(integerStr);
|
|
24002
|
+
if (precision >= 0) {
|
|
24003
|
+
var advancedNum = Number(decimalStr[precision]);
|
|
24004
|
+
if (advancedNum >= 5 && !cutOnly) {
|
|
24005
|
+
var advancedDecimal = getMiniDecimal(numStr).add("".concat(negativeStr, "0.").concat("0".repeat(precision)).concat(10 - advancedNum));
|
|
24006
|
+
return toFixed(advancedDecimal.toString(), separatorStr, precision, cutOnly);
|
|
24007
|
+
}
|
|
24008
|
+
if (precision === 0) {
|
|
24009
|
+
return numberWithoutDecimal;
|
|
24010
|
+
}
|
|
24011
|
+
return "".concat(numberWithoutDecimal).concat(separatorStr).concat(decimalStr.padEnd(precision, "0").slice(0, precision));
|
|
24012
|
+
}
|
|
24013
|
+
if (precisionDecimalStr === ".0") {
|
|
24014
|
+
return numberWithoutDecimal;
|
|
24015
|
+
}
|
|
24016
|
+
return "".concat(numberWithoutDecimal).concat(precisionDecimalStr);
|
|
24017
|
+
}
|
|
23578
24018
|
const ThumbIcon = (props) => {
|
|
23579
24019
|
return withNativeProps(props, React__default.default.createElement("svg", {
|
|
23580
24020
|
viewBox: "0 0 24 24",
|
|
@@ -23611,7 +24051,7 @@ const Thumb = (props) => {
|
|
|
23611
24051
|
residentPopover,
|
|
23612
24052
|
onDrag
|
|
23613
24053
|
} = props;
|
|
23614
|
-
const prevValue = React$
|
|
24054
|
+
const prevValue = React$4.useRef(value);
|
|
23615
24055
|
const {
|
|
23616
24056
|
locale
|
|
23617
24057
|
} = useConfig();
|
|
@@ -23621,7 +24061,7 @@ const Thumb = (props) => {
|
|
|
23621
24061
|
right: "auto"
|
|
23622
24062
|
};
|
|
23623
24063
|
};
|
|
23624
|
-
const [dragging, setDragging] = React$
|
|
24064
|
+
const [dragging, setDragging] = React$4.useState(false);
|
|
23625
24065
|
const bind = useDrag((state) => {
|
|
23626
24066
|
var _a;
|
|
23627
24067
|
if (disabled)
|
|
@@ -23667,514 +24107,6 @@ const Thumb = (props) => {
|
|
|
23667
24107
|
}, thumbElement) : thumbElement);
|
|
23668
24108
|
};
|
|
23669
24109
|
const Thumb$1 = Thumb;
|
|
23670
|
-
var DP = 20, RM = 1, MAX_DP = 1e6, MAX_POWER = 1e6, NE = -7, PE = 21, STRICT = false, NAME = "[big.js] ", INVALID = NAME + "Invalid ", INVALID_DP = INVALID + "decimal places", INVALID_RM = INVALID + "rounding mode", DIV_BY_ZERO = NAME + "Division by zero", P = {}, UNDEFINED = void 0, NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
|
|
23671
|
-
function _Big_() {
|
|
23672
|
-
function Big2(n) {
|
|
23673
|
-
var x = this;
|
|
23674
|
-
if (!(x instanceof Big2))
|
|
23675
|
-
return n === UNDEFINED ? _Big_() : new Big2(n);
|
|
23676
|
-
if (n instanceof Big2) {
|
|
23677
|
-
x.s = n.s;
|
|
23678
|
-
x.e = n.e;
|
|
23679
|
-
x.c = n.c.slice();
|
|
23680
|
-
} else {
|
|
23681
|
-
if (typeof n !== "string") {
|
|
23682
|
-
if (Big2.strict === true && typeof n !== "bigint") {
|
|
23683
|
-
throw TypeError(INVALID + "value");
|
|
23684
|
-
}
|
|
23685
|
-
n = n === 0 && 1 / n < 0 ? "-0" : String(n);
|
|
23686
|
-
}
|
|
23687
|
-
parse(x, n);
|
|
23688
|
-
}
|
|
23689
|
-
x.constructor = Big2;
|
|
23690
|
-
}
|
|
23691
|
-
Big2.prototype = P;
|
|
23692
|
-
Big2.DP = DP;
|
|
23693
|
-
Big2.RM = RM;
|
|
23694
|
-
Big2.NE = NE;
|
|
23695
|
-
Big2.PE = PE;
|
|
23696
|
-
Big2.strict = STRICT;
|
|
23697
|
-
Big2.roundDown = 0;
|
|
23698
|
-
Big2.roundHalfUp = 1;
|
|
23699
|
-
Big2.roundHalfEven = 2;
|
|
23700
|
-
Big2.roundUp = 3;
|
|
23701
|
-
return Big2;
|
|
23702
|
-
}
|
|
23703
|
-
function parse(x, n) {
|
|
23704
|
-
var e, i, nl;
|
|
23705
|
-
if (!NUMERIC.test(n)) {
|
|
23706
|
-
throw Error(INVALID + "number");
|
|
23707
|
-
}
|
|
23708
|
-
x.s = n.charAt(0) == "-" ? (n = n.slice(1), -1) : 1;
|
|
23709
|
-
if ((e = n.indexOf(".")) > -1)
|
|
23710
|
-
n = n.replace(".", "");
|
|
23711
|
-
if ((i = n.search(/e/i)) > 0) {
|
|
23712
|
-
if (e < 0)
|
|
23713
|
-
e = i;
|
|
23714
|
-
e += +n.slice(i + 1);
|
|
23715
|
-
n = n.substring(0, i);
|
|
23716
|
-
} else if (e < 0) {
|
|
23717
|
-
e = n.length;
|
|
23718
|
-
}
|
|
23719
|
-
nl = n.length;
|
|
23720
|
-
for (i = 0; i < nl && n.charAt(i) == "0"; )
|
|
23721
|
-
++i;
|
|
23722
|
-
if (i == nl) {
|
|
23723
|
-
x.c = [x.e = 0];
|
|
23724
|
-
} else {
|
|
23725
|
-
for (; nl > 0 && n.charAt(--nl) == "0"; )
|
|
23726
|
-
;
|
|
23727
|
-
x.e = e - i - 1;
|
|
23728
|
-
x.c = [];
|
|
23729
|
-
for (e = 0; i <= nl; )
|
|
23730
|
-
x.c[e++] = +n.charAt(i++);
|
|
23731
|
-
}
|
|
23732
|
-
return x;
|
|
23733
|
-
}
|
|
23734
|
-
function round(x, sd, rm, more) {
|
|
23735
|
-
var xc = x.c;
|
|
23736
|
-
if (rm === UNDEFINED)
|
|
23737
|
-
rm = x.constructor.RM;
|
|
23738
|
-
if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {
|
|
23739
|
-
throw Error(INVALID_RM);
|
|
23740
|
-
}
|
|
23741
|
-
if (sd < 1) {
|
|
23742
|
-
more = rm === 3 && (more || !!xc[0]) || sd === 0 && (rm === 1 && xc[0] >= 5 || rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED)));
|
|
23743
|
-
xc.length = 1;
|
|
23744
|
-
if (more) {
|
|
23745
|
-
x.e = x.e - sd + 1;
|
|
23746
|
-
xc[0] = 1;
|
|
23747
|
-
} else {
|
|
23748
|
-
xc[0] = x.e = 0;
|
|
23749
|
-
}
|
|
23750
|
-
} else if (sd < xc.length) {
|
|
23751
|
-
more = rm === 1 && xc[sd] >= 5 || rm === 2 && (xc[sd] > 5 || xc[sd] === 5 && (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) || rm === 3 && (more || !!xc[0]);
|
|
23752
|
-
xc.length = sd;
|
|
23753
|
-
if (more) {
|
|
23754
|
-
for (; ++xc[--sd] > 9; ) {
|
|
23755
|
-
xc[sd] = 0;
|
|
23756
|
-
if (sd === 0) {
|
|
23757
|
-
++x.e;
|
|
23758
|
-
xc.unshift(1);
|
|
23759
|
-
break;
|
|
23760
|
-
}
|
|
23761
|
-
}
|
|
23762
|
-
}
|
|
23763
|
-
for (sd = xc.length; !xc[--sd]; )
|
|
23764
|
-
xc.pop();
|
|
23765
|
-
}
|
|
23766
|
-
return x;
|
|
23767
|
-
}
|
|
23768
|
-
function stringify(x, doExponential, isNonzero) {
|
|
23769
|
-
var e = x.e, s = x.c.join(""), n = s.length;
|
|
23770
|
-
if (doExponential) {
|
|
23771
|
-
s = s.charAt(0) + (n > 1 ? "." + s.slice(1) : "") + (e < 0 ? "e" : "e+") + e;
|
|
23772
|
-
} else if (e < 0) {
|
|
23773
|
-
for (; ++e; )
|
|
23774
|
-
s = "0" + s;
|
|
23775
|
-
s = "0." + s;
|
|
23776
|
-
} else if (e > 0) {
|
|
23777
|
-
if (++e > n) {
|
|
23778
|
-
for (e -= n; e--; )
|
|
23779
|
-
s += "0";
|
|
23780
|
-
} else if (e < n) {
|
|
23781
|
-
s = s.slice(0, e) + "." + s.slice(e);
|
|
23782
|
-
}
|
|
23783
|
-
} else if (n > 1) {
|
|
23784
|
-
s = s.charAt(0) + "." + s.slice(1);
|
|
23785
|
-
}
|
|
23786
|
-
return x.s < 0 && isNonzero ? "-" + s : s;
|
|
23787
|
-
}
|
|
23788
|
-
P.abs = function() {
|
|
23789
|
-
var x = new this.constructor(this);
|
|
23790
|
-
x.s = 1;
|
|
23791
|
-
return x;
|
|
23792
|
-
};
|
|
23793
|
-
P.cmp = function(y) {
|
|
23794
|
-
var isneg, x = this, xc = x.c, yc = (y = new x.constructor(y)).c, i = x.s, j = y.s, k = x.e, l = y.e;
|
|
23795
|
-
if (!xc[0] || !yc[0])
|
|
23796
|
-
return !xc[0] ? !yc[0] ? 0 : -j : i;
|
|
23797
|
-
if (i != j)
|
|
23798
|
-
return i;
|
|
23799
|
-
isneg = i < 0;
|
|
23800
|
-
if (k != l)
|
|
23801
|
-
return k > l ^ isneg ? 1 : -1;
|
|
23802
|
-
j = (k = xc.length) < (l = yc.length) ? k : l;
|
|
23803
|
-
for (i = -1; ++i < j; ) {
|
|
23804
|
-
if (xc[i] != yc[i])
|
|
23805
|
-
return xc[i] > yc[i] ^ isneg ? 1 : -1;
|
|
23806
|
-
}
|
|
23807
|
-
return k == l ? 0 : k > l ^ isneg ? 1 : -1;
|
|
23808
|
-
};
|
|
23809
|
-
P.div = function(y) {
|
|
23810
|
-
var x = this, Big2 = x.constructor, a = x.c, b = (y = new Big2(y)).c, k = x.s == y.s ? 1 : -1, dp = Big2.DP;
|
|
23811
|
-
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
|
|
23812
|
-
throw Error(INVALID_DP);
|
|
23813
|
-
}
|
|
23814
|
-
if (!b[0]) {
|
|
23815
|
-
throw Error(DIV_BY_ZERO);
|
|
23816
|
-
}
|
|
23817
|
-
if (!a[0]) {
|
|
23818
|
-
y.s = k;
|
|
23819
|
-
y.c = [y.e = 0];
|
|
23820
|
-
return y;
|
|
23821
|
-
}
|
|
23822
|
-
var bl, bt, n, cmp, ri, bz = b.slice(), ai = bl = b.length, al = a.length, r = a.slice(0, bl), rl = r.length, q = y, qc = q.c = [], qi = 0, p = dp + (q.e = x.e - y.e) + 1;
|
|
23823
|
-
q.s = k;
|
|
23824
|
-
k = p < 0 ? 0 : p;
|
|
23825
|
-
bz.unshift(0);
|
|
23826
|
-
for (; rl++ < bl; )
|
|
23827
|
-
r.push(0);
|
|
23828
|
-
do {
|
|
23829
|
-
for (n = 0; n < 10; n++) {
|
|
23830
|
-
if (bl != (rl = r.length)) {
|
|
23831
|
-
cmp = bl > rl ? 1 : -1;
|
|
23832
|
-
} else {
|
|
23833
|
-
for (ri = -1, cmp = 0; ++ri < bl; ) {
|
|
23834
|
-
if (b[ri] != r[ri]) {
|
|
23835
|
-
cmp = b[ri] > r[ri] ? 1 : -1;
|
|
23836
|
-
break;
|
|
23837
|
-
}
|
|
23838
|
-
}
|
|
23839
|
-
}
|
|
23840
|
-
if (cmp < 0) {
|
|
23841
|
-
for (bt = rl == bl ? b : bz; rl; ) {
|
|
23842
|
-
if (r[--rl] < bt[rl]) {
|
|
23843
|
-
ri = rl;
|
|
23844
|
-
for (; ri && !r[--ri]; )
|
|
23845
|
-
r[ri] = 9;
|
|
23846
|
-
--r[ri];
|
|
23847
|
-
r[rl] += 10;
|
|
23848
|
-
}
|
|
23849
|
-
r[rl] -= bt[rl];
|
|
23850
|
-
}
|
|
23851
|
-
for (; !r[0]; )
|
|
23852
|
-
r.shift();
|
|
23853
|
-
} else {
|
|
23854
|
-
break;
|
|
23855
|
-
}
|
|
23856
|
-
}
|
|
23857
|
-
qc[qi++] = cmp ? n : ++n;
|
|
23858
|
-
if (r[0] && cmp)
|
|
23859
|
-
r[rl] = a[ai] || 0;
|
|
23860
|
-
else
|
|
23861
|
-
r = [a[ai]];
|
|
23862
|
-
} while ((ai++ < al || r[0] !== UNDEFINED) && k--);
|
|
23863
|
-
if (!qc[0] && qi != 1) {
|
|
23864
|
-
qc.shift();
|
|
23865
|
-
q.e--;
|
|
23866
|
-
p--;
|
|
23867
|
-
}
|
|
23868
|
-
if (qi > p)
|
|
23869
|
-
round(q, p, Big2.RM, r[0] !== UNDEFINED);
|
|
23870
|
-
return q;
|
|
23871
|
-
};
|
|
23872
|
-
P.eq = function(y) {
|
|
23873
|
-
return this.cmp(y) === 0;
|
|
23874
|
-
};
|
|
23875
|
-
P.gt = function(y) {
|
|
23876
|
-
return this.cmp(y) > 0;
|
|
23877
|
-
};
|
|
23878
|
-
P.gte = function(y) {
|
|
23879
|
-
return this.cmp(y) > -1;
|
|
23880
|
-
};
|
|
23881
|
-
P.lt = function(y) {
|
|
23882
|
-
return this.cmp(y) < 0;
|
|
23883
|
-
};
|
|
23884
|
-
P.lte = function(y) {
|
|
23885
|
-
return this.cmp(y) < 1;
|
|
23886
|
-
};
|
|
23887
|
-
P.minus = P.sub = function(y) {
|
|
23888
|
-
var i, j, t, xlty, x = this, Big2 = x.constructor, a = x.s, b = (y = new Big2(y)).s;
|
|
23889
|
-
if (a != b) {
|
|
23890
|
-
y.s = -b;
|
|
23891
|
-
return x.plus(y);
|
|
23892
|
-
}
|
|
23893
|
-
var xc = x.c.slice(), xe = x.e, yc = y.c, ye = y.e;
|
|
23894
|
-
if (!xc[0] || !yc[0]) {
|
|
23895
|
-
if (yc[0]) {
|
|
23896
|
-
y.s = -b;
|
|
23897
|
-
} else if (xc[0]) {
|
|
23898
|
-
y = new Big2(x);
|
|
23899
|
-
} else {
|
|
23900
|
-
y.s = 1;
|
|
23901
|
-
}
|
|
23902
|
-
return y;
|
|
23903
|
-
}
|
|
23904
|
-
if (a = xe - ye) {
|
|
23905
|
-
if (xlty = a < 0) {
|
|
23906
|
-
a = -a;
|
|
23907
|
-
t = xc;
|
|
23908
|
-
} else {
|
|
23909
|
-
ye = xe;
|
|
23910
|
-
t = yc;
|
|
23911
|
-
}
|
|
23912
|
-
t.reverse();
|
|
23913
|
-
for (b = a; b--; )
|
|
23914
|
-
t.push(0);
|
|
23915
|
-
t.reverse();
|
|
23916
|
-
} else {
|
|
23917
|
-
j = ((xlty = xc.length < yc.length) ? xc : yc).length;
|
|
23918
|
-
for (a = b = 0; b < j; b++) {
|
|
23919
|
-
if (xc[b] != yc[b]) {
|
|
23920
|
-
xlty = xc[b] < yc[b];
|
|
23921
|
-
break;
|
|
23922
|
-
}
|
|
23923
|
-
}
|
|
23924
|
-
}
|
|
23925
|
-
if (xlty) {
|
|
23926
|
-
t = xc;
|
|
23927
|
-
xc = yc;
|
|
23928
|
-
yc = t;
|
|
23929
|
-
y.s = -y.s;
|
|
23930
|
-
}
|
|
23931
|
-
if ((b = (j = yc.length) - (i = xc.length)) > 0)
|
|
23932
|
-
for (; b--; )
|
|
23933
|
-
xc[i++] = 0;
|
|
23934
|
-
for (b = i; j > a; ) {
|
|
23935
|
-
if (xc[--j] < yc[j]) {
|
|
23936
|
-
for (i = j; i && !xc[--i]; )
|
|
23937
|
-
xc[i] = 9;
|
|
23938
|
-
--xc[i];
|
|
23939
|
-
xc[j] += 10;
|
|
23940
|
-
}
|
|
23941
|
-
xc[j] -= yc[j];
|
|
23942
|
-
}
|
|
23943
|
-
for (; xc[--b] === 0; )
|
|
23944
|
-
xc.pop();
|
|
23945
|
-
for (; xc[0] === 0; ) {
|
|
23946
|
-
xc.shift();
|
|
23947
|
-
--ye;
|
|
23948
|
-
}
|
|
23949
|
-
if (!xc[0]) {
|
|
23950
|
-
y.s = 1;
|
|
23951
|
-
xc = [ye = 0];
|
|
23952
|
-
}
|
|
23953
|
-
y.c = xc;
|
|
23954
|
-
y.e = ye;
|
|
23955
|
-
return y;
|
|
23956
|
-
};
|
|
23957
|
-
P.mod = function(y) {
|
|
23958
|
-
var ygtx, x = this, Big2 = x.constructor, a = x.s, b = (y = new Big2(y)).s;
|
|
23959
|
-
if (!y.c[0]) {
|
|
23960
|
-
throw Error(DIV_BY_ZERO);
|
|
23961
|
-
}
|
|
23962
|
-
x.s = y.s = 1;
|
|
23963
|
-
ygtx = y.cmp(x) == 1;
|
|
23964
|
-
x.s = a;
|
|
23965
|
-
y.s = b;
|
|
23966
|
-
if (ygtx)
|
|
23967
|
-
return new Big2(x);
|
|
23968
|
-
a = Big2.DP;
|
|
23969
|
-
b = Big2.RM;
|
|
23970
|
-
Big2.DP = Big2.RM = 0;
|
|
23971
|
-
x = x.div(y);
|
|
23972
|
-
Big2.DP = a;
|
|
23973
|
-
Big2.RM = b;
|
|
23974
|
-
return this.minus(x.times(y));
|
|
23975
|
-
};
|
|
23976
|
-
P.neg = function() {
|
|
23977
|
-
var x = new this.constructor(this);
|
|
23978
|
-
x.s = -x.s;
|
|
23979
|
-
return x;
|
|
23980
|
-
};
|
|
23981
|
-
P.plus = P.add = function(y) {
|
|
23982
|
-
var e, k, t, x = this, Big2 = x.constructor;
|
|
23983
|
-
y = new Big2(y);
|
|
23984
|
-
if (x.s != y.s) {
|
|
23985
|
-
y.s = -y.s;
|
|
23986
|
-
return x.minus(y);
|
|
23987
|
-
}
|
|
23988
|
-
var xe = x.e, xc = x.c, ye = y.e, yc = y.c;
|
|
23989
|
-
if (!xc[0] || !yc[0]) {
|
|
23990
|
-
if (!yc[0]) {
|
|
23991
|
-
if (xc[0]) {
|
|
23992
|
-
y = new Big2(x);
|
|
23993
|
-
} else {
|
|
23994
|
-
y.s = x.s;
|
|
23995
|
-
}
|
|
23996
|
-
}
|
|
23997
|
-
return y;
|
|
23998
|
-
}
|
|
23999
|
-
xc = xc.slice();
|
|
24000
|
-
if (e = xe - ye) {
|
|
24001
|
-
if (e > 0) {
|
|
24002
|
-
ye = xe;
|
|
24003
|
-
t = yc;
|
|
24004
|
-
} else {
|
|
24005
|
-
e = -e;
|
|
24006
|
-
t = xc;
|
|
24007
|
-
}
|
|
24008
|
-
t.reverse();
|
|
24009
|
-
for (; e--; )
|
|
24010
|
-
t.push(0);
|
|
24011
|
-
t.reverse();
|
|
24012
|
-
}
|
|
24013
|
-
if (xc.length - yc.length < 0) {
|
|
24014
|
-
t = yc;
|
|
24015
|
-
yc = xc;
|
|
24016
|
-
xc = t;
|
|
24017
|
-
}
|
|
24018
|
-
e = yc.length;
|
|
24019
|
-
for (k = 0; e; xc[e] %= 10)
|
|
24020
|
-
k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;
|
|
24021
|
-
if (k) {
|
|
24022
|
-
xc.unshift(k);
|
|
24023
|
-
++ye;
|
|
24024
|
-
}
|
|
24025
|
-
for (e = xc.length; xc[--e] === 0; )
|
|
24026
|
-
xc.pop();
|
|
24027
|
-
y.c = xc;
|
|
24028
|
-
y.e = ye;
|
|
24029
|
-
return y;
|
|
24030
|
-
};
|
|
24031
|
-
P.pow = function(n) {
|
|
24032
|
-
var x = this, one = new x.constructor("1"), y = one, isneg = n < 0;
|
|
24033
|
-
if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {
|
|
24034
|
-
throw Error(INVALID + "exponent");
|
|
24035
|
-
}
|
|
24036
|
-
if (isneg)
|
|
24037
|
-
n = -n;
|
|
24038
|
-
for (; ; ) {
|
|
24039
|
-
if (n & 1)
|
|
24040
|
-
y = y.times(x);
|
|
24041
|
-
n >>= 1;
|
|
24042
|
-
if (!n)
|
|
24043
|
-
break;
|
|
24044
|
-
x = x.times(x);
|
|
24045
|
-
}
|
|
24046
|
-
return isneg ? one.div(y) : y;
|
|
24047
|
-
};
|
|
24048
|
-
P.prec = function(sd, rm) {
|
|
24049
|
-
if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {
|
|
24050
|
-
throw Error(INVALID + "precision");
|
|
24051
|
-
}
|
|
24052
|
-
return round(new this.constructor(this), sd, rm);
|
|
24053
|
-
};
|
|
24054
|
-
P.round = function(dp, rm) {
|
|
24055
|
-
if (dp === UNDEFINED)
|
|
24056
|
-
dp = 0;
|
|
24057
|
-
else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {
|
|
24058
|
-
throw Error(INVALID_DP);
|
|
24059
|
-
}
|
|
24060
|
-
return round(new this.constructor(this), dp + this.e + 1, rm);
|
|
24061
|
-
};
|
|
24062
|
-
P.sqrt = function() {
|
|
24063
|
-
var r, c, t, x = this, Big2 = x.constructor, s = x.s, e = x.e, half = new Big2("0.5");
|
|
24064
|
-
if (!x.c[0])
|
|
24065
|
-
return new Big2(x);
|
|
24066
|
-
if (s < 0) {
|
|
24067
|
-
throw Error(NAME + "No square root");
|
|
24068
|
-
}
|
|
24069
|
-
s = Math.sqrt(x + "");
|
|
24070
|
-
if (s === 0 || s === 1 / 0) {
|
|
24071
|
-
c = x.c.join("");
|
|
24072
|
-
if (!(c.length + e & 1))
|
|
24073
|
-
c += "0";
|
|
24074
|
-
s = Math.sqrt(c);
|
|
24075
|
-
e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);
|
|
24076
|
-
r = new Big2((s == 1 / 0 ? "5e" : (s = s.toExponential()).slice(0, s.indexOf("e") + 1)) + e);
|
|
24077
|
-
} else {
|
|
24078
|
-
r = new Big2(s + "");
|
|
24079
|
-
}
|
|
24080
|
-
e = r.e + (Big2.DP += 4);
|
|
24081
|
-
do {
|
|
24082
|
-
t = r;
|
|
24083
|
-
r = half.times(t.plus(x.div(t)));
|
|
24084
|
-
} while (t.c.slice(0, e).join("") !== r.c.slice(0, e).join(""));
|
|
24085
|
-
return round(r, (Big2.DP -= 4) + r.e + 1, Big2.RM);
|
|
24086
|
-
};
|
|
24087
|
-
P.times = P.mul = function(y) {
|
|
24088
|
-
var c, x = this, Big2 = x.constructor, xc = x.c, yc = (y = new Big2(y)).c, a = xc.length, b = yc.length, i = x.e, j = y.e;
|
|
24089
|
-
y.s = x.s == y.s ? 1 : -1;
|
|
24090
|
-
if (!xc[0] || !yc[0]) {
|
|
24091
|
-
y.c = [y.e = 0];
|
|
24092
|
-
return y;
|
|
24093
|
-
}
|
|
24094
|
-
y.e = i + j;
|
|
24095
|
-
if (a < b) {
|
|
24096
|
-
c = xc;
|
|
24097
|
-
xc = yc;
|
|
24098
|
-
yc = c;
|
|
24099
|
-
j = a;
|
|
24100
|
-
a = b;
|
|
24101
|
-
b = j;
|
|
24102
|
-
}
|
|
24103
|
-
for (c = new Array(j = a + b); j--; )
|
|
24104
|
-
c[j] = 0;
|
|
24105
|
-
for (i = b; i--; ) {
|
|
24106
|
-
b = 0;
|
|
24107
|
-
for (j = a + i; j > i; ) {
|
|
24108
|
-
b = c[j] + yc[i] * xc[j - i - 1] + b;
|
|
24109
|
-
c[j--] = b % 10;
|
|
24110
|
-
b = b / 10 | 0;
|
|
24111
|
-
}
|
|
24112
|
-
c[j] = b;
|
|
24113
|
-
}
|
|
24114
|
-
if (b)
|
|
24115
|
-
++y.e;
|
|
24116
|
-
else
|
|
24117
|
-
c.shift();
|
|
24118
|
-
for (i = c.length; !c[--i]; )
|
|
24119
|
-
c.pop();
|
|
24120
|
-
y.c = c;
|
|
24121
|
-
return y;
|
|
24122
|
-
};
|
|
24123
|
-
P.toExponential = function(dp, rm) {
|
|
24124
|
-
var x = this, n = x.c[0];
|
|
24125
|
-
if (dp !== UNDEFINED) {
|
|
24126
|
-
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
|
|
24127
|
-
throw Error(INVALID_DP);
|
|
24128
|
-
}
|
|
24129
|
-
x = round(new x.constructor(x), ++dp, rm);
|
|
24130
|
-
for (; x.c.length < dp; )
|
|
24131
|
-
x.c.push(0);
|
|
24132
|
-
}
|
|
24133
|
-
return stringify(x, true, !!n);
|
|
24134
|
-
};
|
|
24135
|
-
P.toFixed = function(dp, rm) {
|
|
24136
|
-
var x = this, n = x.c[0];
|
|
24137
|
-
if (dp !== UNDEFINED) {
|
|
24138
|
-
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
|
|
24139
|
-
throw Error(INVALID_DP);
|
|
24140
|
-
}
|
|
24141
|
-
x = round(new x.constructor(x), dp + x.e + 1, rm);
|
|
24142
|
-
for (dp = dp + x.e + 1; x.c.length < dp; )
|
|
24143
|
-
x.c.push(0);
|
|
24144
|
-
}
|
|
24145
|
-
return stringify(x, false, !!n);
|
|
24146
|
-
};
|
|
24147
|
-
P[Symbol.for("nodejs.util.inspect.custom")] = P.toJSON = P.toString = function() {
|
|
24148
|
-
var x = this, Big2 = x.constructor;
|
|
24149
|
-
return stringify(x, x.e <= Big2.NE || x.e >= Big2.PE, !!x.c[0]);
|
|
24150
|
-
};
|
|
24151
|
-
P.toNumber = function() {
|
|
24152
|
-
var n = Number(stringify(this, true, true));
|
|
24153
|
-
if (this.constructor.strict === true && !this.eq(n.toString())) {
|
|
24154
|
-
throw Error(NAME + "Imprecise conversion");
|
|
24155
|
-
}
|
|
24156
|
-
return n;
|
|
24157
|
-
};
|
|
24158
|
-
P.toPrecision = function(sd, rm) {
|
|
24159
|
-
var x = this, Big2 = x.constructor, n = x.c[0];
|
|
24160
|
-
if (sd !== UNDEFINED) {
|
|
24161
|
-
if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {
|
|
24162
|
-
throw Error(INVALID + "precision");
|
|
24163
|
-
}
|
|
24164
|
-
x = round(new Big2(x), sd, rm);
|
|
24165
|
-
for (; x.c.length < sd; )
|
|
24166
|
-
x.c.push(0);
|
|
24167
|
-
}
|
|
24168
|
-
return stringify(x, sd <= x.e || x.e <= Big2.NE || x.e >= Big2.PE, !!n);
|
|
24169
|
-
};
|
|
24170
|
-
P.valueOf = function() {
|
|
24171
|
-
var x = this, Big2 = x.constructor;
|
|
24172
|
-
if (Big2.strict === true) {
|
|
24173
|
-
throw Error(NAME + "valueOf disallowed");
|
|
24174
|
-
}
|
|
24175
|
-
return stringify(x, x.e <= Big2.NE || x.e >= Big2.PE, true);
|
|
24176
|
-
};
|
|
24177
|
-
var Big = _Big_();
|
|
24178
24110
|
const classPrefix$f = `adm-slider`;
|
|
24179
24111
|
const defaultProps$e = {
|
|
24180
24112
|
min: 0,
|
|
@@ -24204,9 +24136,14 @@ const Slider$1 = (p) => {
|
|
|
24204
24136
|
function convertValue(value) {
|
|
24205
24137
|
return props.range ? value : [props.min, value];
|
|
24206
24138
|
}
|
|
24139
|
+
function alignValue(value, decimalLen) {
|
|
24140
|
+
const decimal = getMiniDecimal(value);
|
|
24141
|
+
const fixedStr = toFixed(decimal.toString(), ".", decimalLen);
|
|
24142
|
+
return getMiniDecimal(fixedStr).toNumber();
|
|
24143
|
+
}
|
|
24207
24144
|
function reverseValue(value) {
|
|
24208
24145
|
const mergedDecimalLen = Math.max(getDecimalLen(step), getDecimalLen(value[0]), getDecimalLen(value[1]));
|
|
24209
|
-
return props.range ? value.map((v) =>
|
|
24146
|
+
return props.range ? value.map((v) => alignValue(v, mergedDecimalLen)) : alignValue(value[1], mergedDecimalLen);
|
|
24210
24147
|
}
|
|
24211
24148
|
function getDecimalLen(n) {
|
|
24212
24149
|
return (`${n}`.split(".")[1] || "").length;
|
|
@@ -24233,15 +24170,15 @@ const Slider$1 = (p) => {
|
|
|
24233
24170
|
return;
|
|
24234
24171
|
setRawValue(reverseValue(next));
|
|
24235
24172
|
}
|
|
24236
|
-
const trackRef = React$
|
|
24173
|
+
const trackRef = React$4.useRef(null);
|
|
24237
24174
|
const fillSize = `${100 * (sliderValue[1] - sliderValue[0]) / (max2 - min2)}%`;
|
|
24238
24175
|
const fillStart = `${100 * (sliderValue[0] - min2) / (max2 - min2)}%`;
|
|
24239
|
-
const pointList = React$
|
|
24176
|
+
const pointList = React$4.useMemo(() => {
|
|
24240
24177
|
if (marks) {
|
|
24241
24178
|
return Object.keys(marks).map(parseFloat).sort((a, b) => a - b);
|
|
24242
24179
|
} else {
|
|
24243
24180
|
const points = [];
|
|
24244
|
-
for (let i =
|
|
24181
|
+
for (let i = getMiniDecimal(min2); i.lessEquals(getMiniDecimal(max2)); i = i.add(step)) {
|
|
24245
24182
|
points.push(i.toNumber());
|
|
24246
24183
|
}
|
|
24247
24184
|
return points;
|
|
@@ -24259,7 +24196,7 @@ const Slider$1 = (p) => {
|
|
|
24259
24196
|
}
|
|
24260
24197
|
return value;
|
|
24261
24198
|
}
|
|
24262
|
-
const dragLockRef = React$
|
|
24199
|
+
const dragLockRef = React$4.useRef(0);
|
|
24263
24200
|
const onTrackClick = (event) => {
|
|
24264
24201
|
if (dragLockRef.current > 0)
|
|
24265
24202
|
return;
|
|
@@ -24285,7 +24222,7 @@ const Slider$1 = (p) => {
|
|
|
24285
24222
|
setSliderValue(nextSliderValue);
|
|
24286
24223
|
onAfterChange(nextSliderValue);
|
|
24287
24224
|
};
|
|
24288
|
-
const valueBeforeDragRef = React$
|
|
24225
|
+
const valueBeforeDragRef = React$4.useRef();
|
|
24289
24226
|
const renderThumb = (index2) => {
|
|
24290
24227
|
return React__default.default.createElement(Thumb$1, {
|
|
24291
24228
|
key: index2,
|
|
@@ -24352,89 +24289,362 @@ const Slider$1 = (p) => {
|
|
|
24352
24289
|
};
|
|
24353
24290
|
const Slider = Slider$1;
|
|
24354
24291
|
const stepper = "";
|
|
24292
|
+
var useMergedState$1 = {};
|
|
24293
|
+
var slicedToArray = { exports: {} };
|
|
24294
|
+
var arrayWithHoles = { exports: {} };
|
|
24295
|
+
(function(module2) {
|
|
24296
|
+
function _arrayWithHoles2(arr) {
|
|
24297
|
+
if (Array.isArray(arr))
|
|
24298
|
+
return arr;
|
|
24299
|
+
}
|
|
24300
|
+
module2.exports = _arrayWithHoles2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
24301
|
+
})(arrayWithHoles);
|
|
24302
|
+
var iterableToArrayLimit = { exports: {} };
|
|
24303
|
+
(function(module2) {
|
|
24304
|
+
function _iterableToArrayLimit2(arr, i) {
|
|
24305
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24306
|
+
if (null != _i) {
|
|
24307
|
+
var _s, _e, _x, _r, _arr = [], _n = true, _d = false;
|
|
24308
|
+
try {
|
|
24309
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
24310
|
+
if (Object(_i) !== _i)
|
|
24311
|
+
return;
|
|
24312
|
+
_n = false;
|
|
24313
|
+
} else
|
|
24314
|
+
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true) {
|
|
24315
|
+
;
|
|
24316
|
+
}
|
|
24317
|
+
} catch (err) {
|
|
24318
|
+
_d = true, _e = err;
|
|
24319
|
+
} finally {
|
|
24320
|
+
try {
|
|
24321
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r))
|
|
24322
|
+
return;
|
|
24323
|
+
} finally {
|
|
24324
|
+
if (_d)
|
|
24325
|
+
throw _e;
|
|
24326
|
+
}
|
|
24327
|
+
}
|
|
24328
|
+
return _arr;
|
|
24329
|
+
}
|
|
24330
|
+
}
|
|
24331
|
+
module2.exports = _iterableToArrayLimit2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
24332
|
+
})(iterableToArrayLimit);
|
|
24333
|
+
var unsupportedIterableToArray = { exports: {} };
|
|
24334
|
+
var arrayLikeToArray = { exports: {} };
|
|
24335
|
+
(function(module2) {
|
|
24336
|
+
function _arrayLikeToArray2(arr, len) {
|
|
24337
|
+
if (len == null || len > arr.length)
|
|
24338
|
+
len = arr.length;
|
|
24339
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
24340
|
+
arr2[i] = arr[i];
|
|
24341
|
+
}
|
|
24342
|
+
return arr2;
|
|
24343
|
+
}
|
|
24344
|
+
module2.exports = _arrayLikeToArray2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
24345
|
+
})(arrayLikeToArray);
|
|
24346
|
+
(function(module2) {
|
|
24347
|
+
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
24348
|
+
function _unsupportedIterableToArray2(o, minLen) {
|
|
24349
|
+
if (!o)
|
|
24350
|
+
return;
|
|
24351
|
+
if (typeof o === "string")
|
|
24352
|
+
return arrayLikeToArray$1(o, minLen);
|
|
24353
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
24354
|
+
if (n === "Object" && o.constructor)
|
|
24355
|
+
n = o.constructor.name;
|
|
24356
|
+
if (n === "Map" || n === "Set")
|
|
24357
|
+
return Array.from(o);
|
|
24358
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
24359
|
+
return arrayLikeToArray$1(o, minLen);
|
|
24360
|
+
}
|
|
24361
|
+
module2.exports = _unsupportedIterableToArray2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
24362
|
+
})(unsupportedIterableToArray);
|
|
24363
|
+
var nonIterableRest = { exports: {} };
|
|
24364
|
+
(function(module2) {
|
|
24365
|
+
function _nonIterableRest2() {
|
|
24366
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24367
|
+
}
|
|
24368
|
+
module2.exports = _nonIterableRest2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
24369
|
+
})(nonIterableRest);
|
|
24370
|
+
(function(module2) {
|
|
24371
|
+
var arrayWithHoles$1 = arrayWithHoles.exports;
|
|
24372
|
+
var iterableToArrayLimit$1 = iterableToArrayLimit.exports;
|
|
24373
|
+
var unsupportedIterableToArray$1 = unsupportedIterableToArray.exports;
|
|
24374
|
+
var nonIterableRest$1 = nonIterableRest.exports;
|
|
24375
|
+
function _slicedToArray3(arr, i) {
|
|
24376
|
+
return arrayWithHoles$1(arr) || iterableToArrayLimit$1(arr, i) || unsupportedIterableToArray$1(arr, i) || nonIterableRest$1();
|
|
24377
|
+
}
|
|
24378
|
+
module2.exports = _slicedToArray3, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
24379
|
+
})(slicedToArray);
|
|
24380
|
+
var useEvent$1 = {};
|
|
24381
|
+
var _interopRequireWildcard$2 = interopRequireWildcard.exports.default;
|
|
24382
|
+
Object.defineProperty(useEvent$1, "__esModule", {
|
|
24383
|
+
value: true
|
|
24384
|
+
});
|
|
24385
|
+
useEvent$1.default = useEvent;
|
|
24386
|
+
var React$2 = _interopRequireWildcard$2(React__default.default);
|
|
24387
|
+
function useEvent(callback) {
|
|
24388
|
+
var fnRef = React$2.useRef();
|
|
24389
|
+
fnRef.current = callback;
|
|
24390
|
+
var memoFn = React$2.useCallback(function() {
|
|
24391
|
+
var _fnRef$current;
|
|
24392
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24393
|
+
args[_key] = arguments[_key];
|
|
24394
|
+
}
|
|
24395
|
+
return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));
|
|
24396
|
+
}, []);
|
|
24397
|
+
return memoFn;
|
|
24398
|
+
}
|
|
24399
|
+
var useLayoutEffect$1 = {};
|
|
24400
|
+
var canUseDom$1 = {};
|
|
24401
|
+
Object.defineProperty(canUseDom$1, "__esModule", {
|
|
24402
|
+
value: true
|
|
24403
|
+
});
|
|
24404
|
+
canUseDom$1.default = canUseDom;
|
|
24405
|
+
function canUseDom() {
|
|
24406
|
+
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
24407
|
+
}
|
|
24408
|
+
var _interopRequireDefault$2 = interopRequireDefault.exports.default;
|
|
24409
|
+
var _interopRequireWildcard$1 = interopRequireWildcard.exports.default;
|
|
24410
|
+
Object.defineProperty(useLayoutEffect$1, "__esModule", {
|
|
24411
|
+
value: true
|
|
24412
|
+
});
|
|
24413
|
+
useLayoutEffect$1.useLayoutUpdateEffect = useLayoutEffect$1.default = void 0;
|
|
24414
|
+
var React$1 = _interopRequireWildcard$1(React__default.default);
|
|
24415
|
+
var _canUseDom = _interopRequireDefault$2(canUseDom$1);
|
|
24416
|
+
var useLayoutEffect = (0, _canUseDom.default)() ? React$1.useLayoutEffect : React$1.useEffect;
|
|
24417
|
+
var _default$1 = useLayoutEffect;
|
|
24418
|
+
useLayoutEffect$1.default = _default$1;
|
|
24419
|
+
var useLayoutUpdateEffect = function useLayoutUpdateEffect2(callback, deps) {
|
|
24420
|
+
var firstMountRef = React$1.useRef(true);
|
|
24421
|
+
useLayoutEffect(function() {
|
|
24422
|
+
if (!firstMountRef.current) {
|
|
24423
|
+
return callback();
|
|
24424
|
+
}
|
|
24425
|
+
}, deps);
|
|
24426
|
+
useLayoutEffect(function() {
|
|
24427
|
+
firstMountRef.current = false;
|
|
24428
|
+
return function() {
|
|
24429
|
+
firstMountRef.current = true;
|
|
24430
|
+
};
|
|
24431
|
+
}, []);
|
|
24432
|
+
};
|
|
24433
|
+
useLayoutEffect$1.useLayoutUpdateEffect = useLayoutUpdateEffect;
|
|
24434
|
+
var useState = {};
|
|
24435
|
+
var _interopRequireWildcard = interopRequireWildcard.exports.default;
|
|
24436
|
+
var _interopRequireDefault$1 = interopRequireDefault.exports.default;
|
|
24437
|
+
Object.defineProperty(useState, "__esModule", {
|
|
24438
|
+
value: true
|
|
24439
|
+
});
|
|
24440
|
+
useState.default = useSafeState;
|
|
24441
|
+
var _slicedToArray2$1 = _interopRequireDefault$1(slicedToArray.exports);
|
|
24442
|
+
var React = _interopRequireWildcard(React__default.default);
|
|
24443
|
+
function useSafeState(defaultValue) {
|
|
24444
|
+
var destroyRef = React.useRef(false);
|
|
24445
|
+
var _React$useState = React.useState(defaultValue), _React$useState2 = (0, _slicedToArray2$1.default)(_React$useState, 2), value = _React$useState2[0], setValue2 = _React$useState2[1];
|
|
24446
|
+
React.useEffect(function() {
|
|
24447
|
+
destroyRef.current = false;
|
|
24448
|
+
return function() {
|
|
24449
|
+
destroyRef.current = true;
|
|
24450
|
+
};
|
|
24451
|
+
}, []);
|
|
24452
|
+
function safeSetState(updater, ignoreDestroy) {
|
|
24453
|
+
if (ignoreDestroy && destroyRef.current) {
|
|
24454
|
+
return;
|
|
24455
|
+
}
|
|
24456
|
+
setValue2(updater);
|
|
24457
|
+
}
|
|
24458
|
+
return [value, safeSetState];
|
|
24459
|
+
}
|
|
24460
|
+
var _interopRequireDefault = interopRequireDefault.exports.default;
|
|
24461
|
+
Object.defineProperty(useMergedState$1, "__esModule", {
|
|
24462
|
+
value: true
|
|
24463
|
+
});
|
|
24464
|
+
var _default = useMergedState$1.default = useMergedState;
|
|
24465
|
+
var _slicedToArray2 = _interopRequireDefault(slicedToArray.exports);
|
|
24466
|
+
var _useEvent = _interopRequireDefault(useEvent$1);
|
|
24467
|
+
var _useLayoutEffect = useLayoutEffect$1;
|
|
24468
|
+
var _useState5 = _interopRequireDefault(useState);
|
|
24469
|
+
function hasValue(value) {
|
|
24470
|
+
return value !== void 0;
|
|
24471
|
+
}
|
|
24472
|
+
function useMergedState(defaultStateValue, option) {
|
|
24473
|
+
var _ref = option || {}, defaultValue = _ref.defaultValue, value = _ref.value, onChange = _ref.onChange, postState = _ref.postState;
|
|
24474
|
+
var _useState = (0, _useState5.default)(function() {
|
|
24475
|
+
if (hasValue(value)) {
|
|
24476
|
+
return value;
|
|
24477
|
+
} else if (hasValue(defaultValue)) {
|
|
24478
|
+
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
24479
|
+
} else {
|
|
24480
|
+
return typeof defaultStateValue === "function" ? defaultStateValue() : defaultStateValue;
|
|
24481
|
+
}
|
|
24482
|
+
}), _useState2 = (0, _slicedToArray2.default)(_useState, 2), innerValue = _useState2[0], setInnerValue = _useState2[1];
|
|
24483
|
+
var mergedValue = value !== void 0 ? value : innerValue;
|
|
24484
|
+
var postMergedValue = postState ? postState(mergedValue) : mergedValue;
|
|
24485
|
+
var onChangeFn = (0, _useEvent.default)(onChange);
|
|
24486
|
+
var _useState3 = (0, _useState5.default)([mergedValue]), _useState4 = (0, _slicedToArray2.default)(_useState3, 2), prevValue = _useState4[0], setPrevValue = _useState4[1];
|
|
24487
|
+
(0, _useLayoutEffect.useLayoutUpdateEffect)(function() {
|
|
24488
|
+
var prev = prevValue[0];
|
|
24489
|
+
if (innerValue !== prev) {
|
|
24490
|
+
onChangeFn(innerValue, prev);
|
|
24491
|
+
}
|
|
24492
|
+
}, [prevValue]);
|
|
24493
|
+
(0, _useLayoutEffect.useLayoutUpdateEffect)(function() {
|
|
24494
|
+
if (!hasValue(value)) {
|
|
24495
|
+
setInnerValue(value);
|
|
24496
|
+
}
|
|
24497
|
+
}, [value]);
|
|
24498
|
+
var triggerChange = (0, _useEvent.default)(function(updater, ignoreDestroy) {
|
|
24499
|
+
setInnerValue(updater, ignoreDestroy);
|
|
24500
|
+
setPrevValue([mergedValue], ignoreDestroy);
|
|
24501
|
+
});
|
|
24502
|
+
return [postMergedValue, triggerChange];
|
|
24503
|
+
}
|
|
24355
24504
|
const classPrefix$e = `adm-stepper`;
|
|
24356
24505
|
const defaultProps$d = {
|
|
24357
|
-
defaultValue: 0,
|
|
24358
24506
|
step: 1,
|
|
24359
24507
|
disabled: false,
|
|
24360
24508
|
allowEmpty: false
|
|
24361
24509
|
};
|
|
24362
|
-
|
|
24510
|
+
function Stepper(p) {
|
|
24363
24511
|
const props = mergeProps(defaultProps$d, p);
|
|
24364
24512
|
const {
|
|
24513
|
+
defaultValue = 0,
|
|
24514
|
+
value,
|
|
24515
|
+
onChange,
|
|
24365
24516
|
disabled,
|
|
24366
24517
|
step,
|
|
24367
24518
|
max: max2,
|
|
24368
24519
|
min: min2,
|
|
24369
|
-
inputReadOnly
|
|
24520
|
+
inputReadOnly,
|
|
24521
|
+
digits,
|
|
24522
|
+
stringMode,
|
|
24523
|
+
formatter,
|
|
24524
|
+
parser
|
|
24370
24525
|
} = props;
|
|
24371
24526
|
const {
|
|
24372
24527
|
locale
|
|
24373
24528
|
} = useConfig();
|
|
24374
|
-
const
|
|
24375
|
-
|
|
24376
|
-
|
|
24377
|
-
|
|
24529
|
+
const fixedValue = (value2) => {
|
|
24530
|
+
const fixedValue2 = digits !== void 0 ? toFixed(value2.toString(), ".", digits) : value2;
|
|
24531
|
+
return fixedValue2.toString();
|
|
24532
|
+
};
|
|
24533
|
+
const getValueAsType = (value2) => stringMode ? value2.toString() : value2.toNumber();
|
|
24534
|
+
const parseValue = (text) => {
|
|
24535
|
+
if (text === "")
|
|
24536
|
+
return null;
|
|
24537
|
+
if (parser) {
|
|
24538
|
+
return String(parser(text));
|
|
24539
|
+
}
|
|
24540
|
+
const decimal = getMiniDecimal(text);
|
|
24541
|
+
return decimal.isInvalidate() ? null : decimal.toString();
|
|
24542
|
+
};
|
|
24543
|
+
const formatValue = (value2) => {
|
|
24544
|
+
if (value2 === null)
|
|
24545
|
+
return "";
|
|
24546
|
+
if (formatter) {
|
|
24547
|
+
return formatter(value2);
|
|
24548
|
+
} else {
|
|
24549
|
+
return fixedValue(value2);
|
|
24550
|
+
}
|
|
24551
|
+
};
|
|
24552
|
+
const [mergedValue, setMergedValue] = _default(defaultValue, {
|
|
24553
|
+
value,
|
|
24554
|
+
onChange: (nextValue) => {
|
|
24555
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
|
|
24556
|
+
}
|
|
24557
|
+
});
|
|
24558
|
+
const [inputValue, setInputValue] = React$4.useState(() => formatValue(mergedValue));
|
|
24559
|
+
function setValueWithCheck(nextValue) {
|
|
24560
|
+
if (nextValue.isNaN())
|
|
24378
24561
|
return;
|
|
24379
|
-
let target =
|
|
24380
|
-
if (
|
|
24381
|
-
|
|
24562
|
+
let target = nextValue;
|
|
24563
|
+
if (min2 !== void 0) {
|
|
24564
|
+
const minDecimal = getMiniDecimal(min2);
|
|
24565
|
+
if (target.lessEquals(minDecimal)) {
|
|
24566
|
+
target = minDecimal;
|
|
24567
|
+
}
|
|
24382
24568
|
}
|
|
24383
|
-
|
|
24384
|
-
|
|
24385
|
-
|
|
24386
|
-
|
|
24387
|
-
|
|
24388
|
-
setInputValue(convertValueToText(value, props.digits));
|
|
24569
|
+
if (max2 !== void 0) {
|
|
24570
|
+
const maxDecimal = getMiniDecimal(max2);
|
|
24571
|
+
if (maxDecimal.lessEquals(target)) {
|
|
24572
|
+
target = maxDecimal;
|
|
24573
|
+
}
|
|
24389
24574
|
}
|
|
24390
|
-
|
|
24391
|
-
|
|
24392
|
-
if (!hasFocus) {
|
|
24393
|
-
setInputValue(convertValueToText(value, props.digits));
|
|
24575
|
+
if (digits !== void 0) {
|
|
24576
|
+
target = getMiniDecimal(fixedValue(getValueAsType(target)));
|
|
24394
24577
|
}
|
|
24395
|
-
|
|
24578
|
+
setMergedValue(getValueAsType(target));
|
|
24579
|
+
}
|
|
24396
24580
|
const handleInputChange = (v) => {
|
|
24397
24581
|
setInputValue(v);
|
|
24398
|
-
const
|
|
24399
|
-
if (
|
|
24582
|
+
const valueStr = parseValue(v);
|
|
24583
|
+
if (valueStr === null) {
|
|
24400
24584
|
if (props.allowEmpty) {
|
|
24401
|
-
|
|
24585
|
+
setMergedValue(null);
|
|
24402
24586
|
} else {
|
|
24403
|
-
|
|
24587
|
+
setMergedValue(defaultValue);
|
|
24404
24588
|
}
|
|
24405
24589
|
} else {
|
|
24406
|
-
setValueWithCheck(
|
|
24590
|
+
setValueWithCheck(getMiniDecimal(valueStr));
|
|
24407
24591
|
}
|
|
24408
24592
|
};
|
|
24593
|
+
const [focused, setFocused] = React$4.useState(false);
|
|
24594
|
+
const inputRef = React__default.default.useRef(null);
|
|
24595
|
+
function triggerFocus(nextFocus) {
|
|
24596
|
+
setFocused(nextFocus);
|
|
24597
|
+
if (nextFocus) {
|
|
24598
|
+
setInputValue(mergedValue !== null && mergedValue !== void 0 ? String(mergedValue) : "");
|
|
24599
|
+
}
|
|
24600
|
+
}
|
|
24601
|
+
React$4.useEffect(() => {
|
|
24602
|
+
var _a, _b, _c;
|
|
24603
|
+
if (focused) {
|
|
24604
|
+
(_c = (_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.select) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
24605
|
+
}
|
|
24606
|
+
}, [focused]);
|
|
24607
|
+
React$4.useEffect(() => {
|
|
24608
|
+
if (!focused) {
|
|
24609
|
+
setInputValue(formatValue(mergedValue));
|
|
24610
|
+
}
|
|
24611
|
+
}, [focused, mergedValue, digits]);
|
|
24612
|
+
const handleOffset = (positive) => {
|
|
24613
|
+
let stepValue = getMiniDecimal(step);
|
|
24614
|
+
if (!positive) {
|
|
24615
|
+
stepValue = stepValue.negate();
|
|
24616
|
+
}
|
|
24617
|
+
setValueWithCheck(getMiniDecimal(mergedValue !== null && mergedValue !== void 0 ? mergedValue : 0).add(stepValue.toString()));
|
|
24618
|
+
};
|
|
24409
24619
|
const handleMinus = () => {
|
|
24410
|
-
|
|
24620
|
+
handleOffset(false);
|
|
24411
24621
|
};
|
|
24412
24622
|
const handlePlus = () => {
|
|
24413
|
-
|
|
24623
|
+
handleOffset(true);
|
|
24414
24624
|
};
|
|
24415
24625
|
const minusDisabled = () => {
|
|
24416
24626
|
if (disabled)
|
|
24417
24627
|
return true;
|
|
24418
|
-
if (
|
|
24628
|
+
if (mergedValue === null)
|
|
24419
24629
|
return false;
|
|
24420
24630
|
if (min2 !== void 0) {
|
|
24421
|
-
return
|
|
24631
|
+
return mergedValue <= min2;
|
|
24422
24632
|
}
|
|
24423
24633
|
return false;
|
|
24424
24634
|
};
|
|
24425
24635
|
const plusDisabled = () => {
|
|
24426
24636
|
if (disabled)
|
|
24427
24637
|
return true;
|
|
24428
|
-
if (
|
|
24638
|
+
if (mergedValue === null)
|
|
24429
24639
|
return false;
|
|
24430
24640
|
if (max2 !== void 0) {
|
|
24431
|
-
return
|
|
24641
|
+
return mergedValue >= max2;
|
|
24432
24642
|
}
|
|
24433
24643
|
return false;
|
|
24434
24644
|
};
|
|
24435
24645
|
return withNativeProps(props, React__default.default.createElement("div", {
|
|
24436
24646
|
className: classNames(classPrefix$e, {
|
|
24437
|
-
[`${classPrefix$e}-active`]:
|
|
24647
|
+
[`${classPrefix$e}-active`]: focused
|
|
24438
24648
|
})
|
|
24439
24649
|
}, React__default.default.createElement(Button, {
|
|
24440
24650
|
className: `${classPrefix$e}-minus`,
|
|
@@ -24447,10 +24657,11 @@ const Stepper$1 = (p) => {
|
|
|
24447
24657
|
}, React__default.default.createElement(MinusOutline, null)), React__default.default.createElement("div", {
|
|
24448
24658
|
className: `${classPrefix$e}-middle`
|
|
24449
24659
|
}, React__default.default.createElement(Input, {
|
|
24660
|
+
ref: inputRef,
|
|
24450
24661
|
className: `${classPrefix$e}-input`,
|
|
24451
24662
|
onFocus: (e) => {
|
|
24452
24663
|
var _a;
|
|
24453
|
-
|
|
24664
|
+
triggerFocus(true);
|
|
24454
24665
|
(_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
24455
24666
|
},
|
|
24456
24667
|
value: inputValue,
|
|
@@ -24460,14 +24671,14 @@ const Stepper$1 = (p) => {
|
|
|
24460
24671
|
disabled,
|
|
24461
24672
|
onBlur: (e) => {
|
|
24462
24673
|
var _a;
|
|
24463
|
-
|
|
24674
|
+
triggerFocus(false);
|
|
24464
24675
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
24465
24676
|
},
|
|
24466
24677
|
readOnly: inputReadOnly,
|
|
24467
24678
|
role: "spinbutton",
|
|
24468
24679
|
"aria-valuenow": Number(inputValue),
|
|
24469
|
-
"aria-valuemax": max2,
|
|
24470
|
-
"aria-valuemin": min2,
|
|
24680
|
+
"aria-valuemax": Number(max2),
|
|
24681
|
+
"aria-valuemin": Number(min2),
|
|
24471
24682
|
inputMode: "decimal"
|
|
24472
24683
|
})), React__default.default.createElement(Button, {
|
|
24473
24684
|
className: `${classPrefix$e}-plus`,
|
|
@@ -24478,22 +24689,7 @@ const Stepper$1 = (p) => {
|
|
|
24478
24689
|
color: "primary",
|
|
24479
24690
|
"aria-label": locale.Stepper.increase
|
|
24480
24691
|
}, React__default.default.createElement(AddOutline, null))));
|
|
24481
|
-
};
|
|
24482
|
-
function convertValueToText(value, digits) {
|
|
24483
|
-
if (value === null)
|
|
24484
|
-
return "";
|
|
24485
|
-
if (digits !== void 0) {
|
|
24486
|
-
return value.toFixed(digits);
|
|
24487
|
-
} else {
|
|
24488
|
-
return value.toString();
|
|
24489
|
-
}
|
|
24490
|
-
}
|
|
24491
|
-
function convertTextToValue(text) {
|
|
24492
|
-
if (text === "")
|
|
24493
|
-
return null;
|
|
24494
|
-
return parseFloat(text);
|
|
24495
24692
|
}
|
|
24496
|
-
const Stepper = Stepper$1;
|
|
24497
24693
|
const steps = "";
|
|
24498
24694
|
const classPrefix$d = `adm-step`;
|
|
24499
24695
|
const Step = (props) => {
|
|
@@ -24566,11 +24762,11 @@ const defaultProps$b = {
|
|
|
24566
24762
|
closeOnAction: true,
|
|
24567
24763
|
stopPropagation: []
|
|
24568
24764
|
};
|
|
24569
|
-
const SwipeAction$1 = React$
|
|
24765
|
+
const SwipeAction$1 = React$4.forwardRef((p, ref) => {
|
|
24570
24766
|
const props = mergeProps(defaultProps$b, p);
|
|
24571
|
-
const rootRef = React$
|
|
24572
|
-
const leftRef = React$
|
|
24573
|
-
const rightRef = React$
|
|
24767
|
+
const rootRef = React$4.useRef(null);
|
|
24768
|
+
const leftRef = React$4.useRef(null);
|
|
24769
|
+
const rightRef = React$4.useRef(null);
|
|
24574
24770
|
function getWidth(ref2) {
|
|
24575
24771
|
const element = ref2.current;
|
|
24576
24772
|
if (!element)
|
|
@@ -24592,8 +24788,8 @@ const SwipeAction$1 = React$1.forwardRef((p, ref) => {
|
|
|
24592
24788
|
friction: 30
|
|
24593
24789
|
}
|
|
24594
24790
|
}), []);
|
|
24595
|
-
const draggingRef = React$
|
|
24596
|
-
const dragCancelRef = React$
|
|
24791
|
+
const draggingRef = React$4.useRef(false);
|
|
24792
|
+
const dragCancelRef = React$4.useRef(null);
|
|
24597
24793
|
function forceCancelDrag() {
|
|
24598
24794
|
var _a;
|
|
24599
24795
|
(_a = dragCancelRef.current) === null || _a === void 0 ? void 0 : _a.call(dragCancelRef);
|
|
@@ -24660,7 +24856,7 @@ const SwipeAction$1 = React$1.forwardRef((p, ref) => {
|
|
|
24660
24856
|
});
|
|
24661
24857
|
forceCancelDrag();
|
|
24662
24858
|
}
|
|
24663
|
-
React$
|
|
24859
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
24664
24860
|
show: (side = "right") => {
|
|
24665
24861
|
var _a;
|
|
24666
24862
|
if (side === "right") {
|
|
@@ -24676,7 +24872,7 @@ const SwipeAction$1 = React$1.forwardRef((p, ref) => {
|
|
|
24676
24872
|
},
|
|
24677
24873
|
close
|
|
24678
24874
|
}));
|
|
24679
|
-
React$
|
|
24875
|
+
React$4.useEffect(() => {
|
|
24680
24876
|
if (!props.closeOnTouchOutside)
|
|
24681
24877
|
return;
|
|
24682
24878
|
function handle(e) {
|
|
@@ -24765,9 +24961,9 @@ const SwiperItem = (props) => {
|
|
|
24765
24961
|
}, props.children));
|
|
24766
24962
|
};
|
|
24767
24963
|
function useRefState(initialState) {
|
|
24768
|
-
const [state, setState] = React$
|
|
24769
|
-
const ref = React$
|
|
24770
|
-
React$
|
|
24964
|
+
const [state, setState] = React$4.useState(initialState);
|
|
24965
|
+
const ref = React$4.useRef(state);
|
|
24966
|
+
React$4.useEffect(() => {
|
|
24771
24967
|
ref.current = state;
|
|
24772
24968
|
}, [state]);
|
|
24773
24969
|
return [state, setState, ref];
|
|
@@ -24786,16 +24982,16 @@ const defaultProps$a = {
|
|
|
24786
24982
|
rubberband: true
|
|
24787
24983
|
};
|
|
24788
24984
|
let currentUid;
|
|
24789
|
-
const Swiper = React$
|
|
24985
|
+
const Swiper = React$4.forwardRef(staged_1((p, ref) => {
|
|
24790
24986
|
const props = mergeProps(defaultProps$a, p);
|
|
24791
|
-
const [uid] = React$
|
|
24987
|
+
const [uid] = React$4.useState({});
|
|
24792
24988
|
const isVertical = props.direction === "vertical";
|
|
24793
24989
|
const slideRatio = props.slideSize / 100;
|
|
24794
24990
|
const offsetRatio = props.trackOffset / 100;
|
|
24795
24991
|
const {
|
|
24796
24992
|
validChildren,
|
|
24797
24993
|
count
|
|
24798
|
-
} = React$
|
|
24994
|
+
} = React$4.useMemo(() => {
|
|
24799
24995
|
let count2 = 0;
|
|
24800
24996
|
const validChildren2 = React__default.default.Children.map(props.children, (child) => {
|
|
24801
24997
|
if (!React__default.default.isValidElement(child))
|
|
@@ -24821,7 +25017,7 @@ const Swiper = React$1.forwardRef(staged_1((p, ref) => {
|
|
|
24821
25017
|
if (slideRatio * (count - 1) < 1) {
|
|
24822
25018
|
loop2 = false;
|
|
24823
25019
|
}
|
|
24824
|
-
const trackRef = React$
|
|
25020
|
+
const trackRef = React$4.useRef(null);
|
|
24825
25021
|
function getSlidePixels() {
|
|
24826
25022
|
const track = trackRef.current;
|
|
24827
25023
|
if (!track)
|
|
@@ -24829,7 +25025,7 @@ const Swiper = React$1.forwardRef(staged_1((p, ref) => {
|
|
|
24829
25025
|
const trackPixels = isVertical ? track.offsetHeight : track.offsetWidth;
|
|
24830
25026
|
return trackPixels * props.slideSize / 100;
|
|
24831
25027
|
}
|
|
24832
|
-
const [current, setCurrent] = React$
|
|
25028
|
+
const [current, setCurrent] = React$4.useState(props.defaultIndex);
|
|
24833
25029
|
useUpdateEffect(() => {
|
|
24834
25030
|
var _a;
|
|
24835
25031
|
(_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, current);
|
|
@@ -24868,7 +25064,7 @@ const Swiper = React$1.forwardRef(staged_1((p, ref) => {
|
|
|
24868
25064
|
});
|
|
24869
25065
|
}
|
|
24870
25066
|
}), [count]);
|
|
24871
|
-
const dragCancelRef = React$
|
|
25067
|
+
const dragCancelRef = React$4.useRef(null);
|
|
24872
25068
|
function forceCancelDrag() {
|
|
24873
25069
|
var _a;
|
|
24874
25070
|
(_a = dragCancelRef.current) === null || _a === void 0 ? void 0 : _a.call(dragCancelRef);
|
|
@@ -24949,7 +25145,7 @@ const Swiper = React$1.forwardRef(staged_1((p, ref) => {
|
|
|
24949
25145
|
function swipePrev() {
|
|
24950
25146
|
swipeTo(Math.round(position.get() / 100) - 1);
|
|
24951
25147
|
}
|
|
24952
|
-
React$
|
|
25148
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
24953
25149
|
swipeTo,
|
|
24954
25150
|
swipeNext,
|
|
24955
25151
|
swipePrev
|
|
@@ -24964,7 +25160,7 @@ const Swiper = React$1.forwardRef(staged_1((p, ref) => {
|
|
|
24964
25160
|
autoplay,
|
|
24965
25161
|
autoplayInterval
|
|
24966
25162
|
} = props;
|
|
24967
|
-
React$
|
|
25163
|
+
React$4.useEffect(() => {
|
|
24968
25164
|
if (!autoplay || dragging)
|
|
24969
25165
|
return;
|
|
24970
25166
|
const interval = window.setInterval(() => {
|
|
@@ -25041,7 +25237,7 @@ const index$2 = attachPropertiesToComponent(Swiper, {
|
|
|
25041
25237
|
Item: SwiperItem
|
|
25042
25238
|
});
|
|
25043
25239
|
const _switch = "";
|
|
25044
|
-
const SpinIcon = React$
|
|
25240
|
+
const SpinIcon = React$4.memo((props) => {
|
|
25045
25241
|
return withNativeProps(props, React__default.default.createElement("svg", {
|
|
25046
25242
|
width: "28px",
|
|
25047
25243
|
height: "28px",
|
|
@@ -25069,7 +25265,7 @@ const defaultProps$9 = {
|
|
|
25069
25265
|
const Switch$1 = (p) => {
|
|
25070
25266
|
const props = mergeProps(defaultProps$9, p);
|
|
25071
25267
|
const disabled = props.disabled || props.loading || false;
|
|
25072
|
-
const [changing, setChanging] = React$
|
|
25268
|
+
const [changing, setChanging] = React$4.useState(false);
|
|
25073
25269
|
const {
|
|
25074
25270
|
locale
|
|
25075
25271
|
} = useConfig();
|
|
@@ -25249,7 +25445,7 @@ const defaultProps$6 = {
|
|
|
25249
25445
|
autoSize: false,
|
|
25250
25446
|
defaultValue: ""
|
|
25251
25447
|
};
|
|
25252
|
-
const TextArea$1 = React$
|
|
25448
|
+
const TextArea$1 = React$4.forwardRef((p, ref) => {
|
|
25253
25449
|
const props = mergeProps(defaultProps$6, p);
|
|
25254
25450
|
const {
|
|
25255
25451
|
autoSize,
|
|
@@ -25262,8 +25458,8 @@ const TextArea$1 = React$1.forwardRef((p, ref) => {
|
|
|
25262
25458
|
if (props.value === null) {
|
|
25263
25459
|
devError("TextArea", "`value` prop on `TextArea` should not be `null`. Consider using an empty string to clear the component.");
|
|
25264
25460
|
}
|
|
25265
|
-
const nativeTextAreaRef = React$
|
|
25266
|
-
React$
|
|
25461
|
+
const nativeTextAreaRef = React$4.useRef(null);
|
|
25462
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
25267
25463
|
clear: () => {
|
|
25268
25464
|
setValue2("");
|
|
25269
25465
|
},
|
|
@@ -25299,7 +25495,7 @@ const TextArea$1 = React$1.forwardRef((p, ref) => {
|
|
|
25299
25495
|
}
|
|
25300
25496
|
textArea2.style.height = `${height}px`;
|
|
25301
25497
|
}, [value, autoSize]);
|
|
25302
|
-
const compositingRef = React$
|
|
25498
|
+
const compositingRef = React$4.useRef(false);
|
|
25303
25499
|
let count;
|
|
25304
25500
|
const valueLength = [...value].length;
|
|
25305
25501
|
if (typeof showCount === "function") {
|
|
@@ -25365,7 +25561,7 @@ const InternalToast = (p) => {
|
|
|
25365
25561
|
icon,
|
|
25366
25562
|
position
|
|
25367
25563
|
} = props;
|
|
25368
|
-
const iconElement = React$
|
|
25564
|
+
const iconElement = React$4.useMemo(() => {
|
|
25369
25565
|
if (icon === null || icon === void 0)
|
|
25370
25566
|
return null;
|
|
25371
25567
|
switch (icon) {
|
|
@@ -25386,7 +25582,7 @@ const InternalToast = (p) => {
|
|
|
25386
25582
|
return icon;
|
|
25387
25583
|
}
|
|
25388
25584
|
}, [icon]);
|
|
25389
|
-
const top = React$
|
|
25585
|
+
const top = React$4.useMemo(() => {
|
|
25390
25586
|
switch (position) {
|
|
25391
25587
|
case "top":
|
|
25392
25588
|
return "20%";
|
|
@@ -25502,7 +25698,7 @@ const TreeSelect = (p) => {
|
|
|
25502
25698
|
value: props.value,
|
|
25503
25699
|
defaultValue: props.defaultValue
|
|
25504
25700
|
});
|
|
25505
|
-
const [deep, optionsMap, optionsParentMap] = React$
|
|
25701
|
+
const [deep, optionsMap, optionsParentMap] = React$4.useMemo(() => {
|
|
25506
25702
|
const deep2 = getTreeDeep(props.options, childrenName);
|
|
25507
25703
|
const optionsMap2 = /* @__PURE__ */ new Map();
|
|
25508
25704
|
const optionsParentMap2 = /* @__PURE__ */ new Map();
|
|
@@ -25584,7 +25780,7 @@ const Multiple = (p) => {
|
|
|
25584
25780
|
defaultExpandKeys: [],
|
|
25585
25781
|
defaultValue: []
|
|
25586
25782
|
}, p);
|
|
25587
|
-
React$
|
|
25783
|
+
React$4.useEffect(() => {
|
|
25588
25784
|
devWarning("TreeSelect", "TreeSelect.Multiple has been deprecated.");
|
|
25589
25785
|
}, []);
|
|
25590
25786
|
const labelName = props.fieldNames.label || "label";
|
|
@@ -25614,7 +25810,7 @@ const Multiple = (p) => {
|
|
|
25614
25810
|
walker(option);
|
|
25615
25811
|
return keys2;
|
|
25616
25812
|
};
|
|
25617
|
-
const [deep, optionsMap, optionsParentMap] = React$
|
|
25813
|
+
const [deep, optionsMap, optionsParentMap] = React$4.useMemo(() => {
|
|
25618
25814
|
const deep2 = getTreeDeep(props.options, childrenName);
|
|
25619
25815
|
const optionsMap2 = /* @__PURE__ */ new Map();
|
|
25620
25816
|
const optionsParentMap2 = /* @__PURE__ */ new Map();
|
|
@@ -25630,7 +25826,7 @@ const Multiple = (p) => {
|
|
|
25630
25826
|
traverse(void 0, props.options);
|
|
25631
25827
|
return [deep2, optionsMap2, optionsParentMap2];
|
|
25632
25828
|
}, [props.options]);
|
|
25633
|
-
const allSelectedLeafKeys = React$
|
|
25829
|
+
const allSelectedLeafKeys = React$4.useMemo(() => {
|
|
25634
25830
|
let leafKeys = [];
|
|
25635
25831
|
value.forEach((v) => {
|
|
25636
25832
|
const option = optionsMap.get(v);
|
|
@@ -25638,7 +25834,7 @@ const Multiple = (p) => {
|
|
|
25638
25834
|
});
|
|
25639
25835
|
return leafKeys;
|
|
25640
25836
|
}, [value, optionsMap]);
|
|
25641
|
-
const dotMap = React$
|
|
25837
|
+
const dotMap = React$4.useMemo(() => {
|
|
25642
25838
|
const map = /* @__PURE__ */ new Map();
|
|
25643
25839
|
const walker = (key) => {
|
|
25644
25840
|
const parentOption = optionsParentMap.get(key);
|
|
@@ -25823,12 +26019,12 @@ const classPrefix$2 = "adm-virtual-input";
|
|
|
25823
26019
|
const defaultProps$2 = {
|
|
25824
26020
|
defaultValue: ""
|
|
25825
26021
|
};
|
|
25826
|
-
const VirtualInput$1 = React$
|
|
26022
|
+
const VirtualInput$1 = React$4.forwardRef((p, ref) => {
|
|
25827
26023
|
const props = mergeProps(defaultProps$2, p);
|
|
25828
26024
|
const [value, setValue2] = usePropsValue(props);
|
|
25829
|
-
const rootRef = React$
|
|
25830
|
-
const contentRef = React$
|
|
25831
|
-
const [hasFocus, setHasFocus] = React$
|
|
26025
|
+
const rootRef = React$4.useRef(null);
|
|
26026
|
+
const contentRef = React$4.useRef(null);
|
|
26027
|
+
const [hasFocus, setHasFocus] = React$4.useState(false);
|
|
25832
26028
|
function scrollToEnd() {
|
|
25833
26029
|
const root2 = rootRef.current;
|
|
25834
26030
|
if (!root2)
|
|
@@ -25844,12 +26040,12 @@ const VirtualInput$1 = React$1.forwardRef((p, ref) => {
|
|
|
25844
26040
|
useIsomorphicLayoutEffect$2(() => {
|
|
25845
26041
|
scrollToEnd();
|
|
25846
26042
|
}, [value]);
|
|
25847
|
-
React$
|
|
26043
|
+
React$4.useEffect(() => {
|
|
25848
26044
|
if (hasFocus) {
|
|
25849
26045
|
scrollToEnd();
|
|
25850
26046
|
}
|
|
25851
26047
|
}, [hasFocus]);
|
|
25852
|
-
React$
|
|
26048
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
25853
26049
|
focus: () => {
|
|
25854
26050
|
var _a;
|
|
25855
26051
|
(_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -25942,8 +26138,8 @@ const WaterMark$1 = (p) => {
|
|
|
25942
26138
|
fontSize = 14,
|
|
25943
26139
|
fontFamily = "sans-serif"
|
|
25944
26140
|
} = props;
|
|
25945
|
-
const [base64Url, setBase64Url] = React$
|
|
25946
|
-
React$
|
|
26141
|
+
const [base64Url, setBase64Url] = React$4.useState("");
|
|
26142
|
+
React$4.useEffect(() => {
|
|
25947
26143
|
const canvas = document.createElement("canvas");
|
|
25948
26144
|
const ratio = window.devicePixelRatio;
|
|
25949
26145
|
const ctx2 = canvas.getContext("2d");
|
|
@@ -25974,7 +26170,11 @@ const WaterMark$1 = (p) => {
|
|
|
25974
26170
|
const markSize = Number(fontSize) * ratio;
|
|
25975
26171
|
ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
25976
26172
|
ctx2.fillStyle = fontColor;
|
|
25977
|
-
|
|
26173
|
+
if (Array.isArray(content)) {
|
|
26174
|
+
content.forEach((item, index2) => ctx2.fillText(item, 0, index2 * markSize));
|
|
26175
|
+
} else {
|
|
26176
|
+
ctx2.fillText(content, 0, 0);
|
|
26177
|
+
}
|
|
25978
26178
|
ctx2.restore();
|
|
25979
26179
|
setBase64Url(canvas.toDataURL());
|
|
25980
26180
|
}
|