antd-mobile 5.32.4 → 5.33.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 +2 -0
- package/2x/bundle/antd-mobile.cjs.development.js +1719 -1134
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +1719 -1134
- package/2x/bundle/antd-mobile.es.js +7952 -7508
- package/2x/bundle/antd-mobile.umd.development.js +1717 -1132
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/style.css +676 -45
- package/2x/cjs/components/action-sheet/action-sheet.d.ts +6 -4
- package/2x/cjs/components/action-sheet/action-sheet.js +7 -5
- package/2x/cjs/components/auto-center/auto-center.d.ts +2 -2
- package/2x/cjs/components/auto-center/auto-center.js +5 -7
- package/2x/cjs/components/avatar/avatar.d.ts +1 -1
- package/2x/cjs/components/avatar/fallback.d.ts +1 -1
- package/2x/cjs/components/badge/badge.d.ts +6 -5
- package/2x/cjs/components/badge/badge.js +6 -2
- package/2x/cjs/components/badge/index.d.ts +1 -1
- package/2x/cjs/components/button/button.d.ts +6 -5
- package/2x/cjs/components/button/button.js +2 -1
- package/2x/cjs/components/calendar/calendar.js +7 -0
- package/2x/cjs/components/calendar-picker/calendar-picker.d.ts +123 -0
- package/2x/cjs/components/calendar-picker/calendar-picker.js +89 -0
- package/2x/cjs/components/calendar-picker/index.d.ts +3 -0
- package/2x/cjs/components/calendar-picker/index.js +9 -0
- package/2x/cjs/components/calendar-picker-view/arrow-left-double.d.ts +2 -0
- package/2x/cjs/components/calendar-picker-view/arrow-left-double.js +37 -0
- package/2x/cjs/components/calendar-picker-view/arrow-left.d.ts +2 -0
- package/2x/cjs/components/calendar-picker-view/arrow-left.js +35 -0
- package/2x/cjs/components/calendar-picker-view/calendar-picker-view.css +617 -0
- package/2x/cjs/components/calendar-picker-view/calendar-picker-view.d.ts +36 -0
- package/2x/cjs/components/calendar-picker-view/calendar-picker-view.js +215 -0
- package/2x/cjs/components/calendar-picker-view/convert.d.ts +8 -0
- package/2x/cjs/components/calendar-picker-view/convert.js +19 -0
- package/2x/cjs/components/calendar-picker-view/index.d.ts +4 -0
- package/2x/cjs/components/calendar-picker-view/index.js +10 -0
- package/2x/cjs/components/capsule-tabs/capsule-tabs.d.ts +2 -2
- package/2x/cjs/components/card/card.d.ts +5 -4
- package/2x/cjs/components/cascade-picker-view/cascade-picker-view.d.ts +1 -1
- package/2x/cjs/components/cascader/cascader.d.ts +3 -0
- package/2x/cjs/components/cascader/index.d.ts +1 -0
- package/2x/cjs/components/cascader-view/cascader-view.d.ts +6 -4
- package/2x/cjs/components/cascader-view/cascader-view.js +18 -16
- package/2x/cjs/components/center-popup/center-popup.d.ts +1 -1
- package/2x/cjs/components/check-list/check-list-item.d.ts +1 -1
- package/2x/cjs/components/check-list/check-list.d.ts +2 -2
- package/2x/cjs/components/check-list/context.d.ts +1 -1
- package/2x/cjs/components/checkbox/checkbox.d.ts +5 -4
- package/2x/cjs/components/checkbox/group.d.ts +2 -2
- package/2x/cjs/components/checkbox/native-input.d.ts +1 -1
- package/2x/cjs/components/collapse/collapse.d.ts +7 -6
- package/2x/cjs/components/config-provider/config-provider.d.ts +2 -2
- package/2x/cjs/components/date-picker/date-picker-week-utils.d.ts +1 -1
- package/2x/cjs/components/date-picker/date-picker.d.ts +3 -2
- package/2x/cjs/components/date-picker/index.d.ts +1 -1
- package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +1 -1
- package/2x/cjs/components/dialog/alert.d.ts +1 -1
- package/2x/cjs/components/dialog/confirm.d.ts +1 -1
- package/2x/cjs/components/dialog/dialog-action-button.d.ts +1 -1
- package/2x/cjs/components/dialog/dialog.d.ts +1 -1
- package/2x/cjs/components/divider/divider.d.ts +2 -2
- package/2x/cjs/components/dropdown/dropdown.d.ts +3 -2
- package/2x/cjs/components/dropdown/item.d.ts +5 -4
- package/2x/cjs/components/ellipsis/ellipsis.d.ts +4 -3
- package/2x/cjs/components/empty/empty-icon.d.ts +1 -1
- package/2x/cjs/components/empty/empty.d.ts +3 -3
- package/2x/cjs/components/error-block/create-error-block.d.ts +3 -2
- package/2x/cjs/components/error-block/images/busy.d.ts +2 -1
- package/2x/cjs/components/error-block/images/default.d.ts +2 -1
- package/2x/cjs/components/error-block/images/disconnected.d.ts +2 -1
- package/2x/cjs/components/error-block/images/empty.d.ts +2 -1
- package/2x/cjs/components/error-block/index.d.ts +1 -1
- package/2x/cjs/components/floating-bubble/floating-bubble.d.ts +3 -2
- package/2x/cjs/components/floating-panel/floating-panel.d.ts +2 -1
- package/2x/cjs/components/footer/footer.d.ts +1 -1
- package/2x/cjs/components/form/form-array.d.ts +2 -2
- package/2x/cjs/components/form/form-item.d.ts +7 -6
- package/2x/cjs/components/form/form-subscribe.d.ts +3 -2
- package/2x/cjs/components/form/form.d.ts +2 -1
- package/2x/cjs/components/form/header.d.ts +1 -1
- package/2x/cjs/components/grid/grid.d.ts +4 -3
- package/2x/cjs/components/image/broken-image-icon.d.ts +2 -1
- package/2x/cjs/components/image/image-icon.d.ts +2 -1
- package/2x/cjs/components/image/image.d.ts +2 -1
- package/2x/cjs/components/image/lazy-detector.d.ts +1 -1
- package/2x/cjs/components/image-uploader/image-uploader.d.ts +37 -5
- package/2x/cjs/components/image-uploader/image-uploader.js +9 -2
- package/2x/cjs/components/image-uploader/index.d.ts +1 -1
- package/2x/cjs/components/image-uploader/preview-item.d.ts +2 -2
- package/2x/cjs/components/image-viewer/image-viewer.d.ts +5 -4
- package/2x/cjs/components/image-viewer/image-viewer.js +7 -12
- package/2x/cjs/components/image-viewer/slide.d.ts +2 -2
- package/2x/cjs/components/image-viewer/slide.js +90 -16
- package/2x/cjs/components/image-viewer/slides.d.ts +1 -1
- package/2x/cjs/components/image-viewer/slides.js +4 -6
- package/2x/cjs/components/index-bar/index-bar.d.ts +4 -3
- package/2x/cjs/components/index-bar/panel.d.ts +1 -1
- package/2x/cjs/components/index-bar/sidebar.d.ts +1 -1
- package/2x/cjs/components/infinite-scroll/infinite-scroll.d.ts +2 -2
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.d.ts +3 -3
- package/2x/cjs/components/list/list-item.d.ts +2 -1
- package/2x/cjs/components/list/list.d.ts +2 -1
- package/2x/cjs/components/mask/mask.d.ts +3 -2
- package/2x/cjs/components/modal/alert.d.ts +1 -1
- package/2x/cjs/components/modal/confirm.d.ts +1 -1
- package/2x/cjs/components/modal/modal-action-button.d.ts +1 -1
- package/2x/cjs/components/modal/modal.d.ts +1 -1
- package/2x/cjs/components/nav-bar/nav-bar.d.ts +1 -1
- package/2x/cjs/components/notice-bar/notice-bar.d.ts +4 -3
- package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +2 -2
- package/2x/cjs/components/passcode-input/passcode-input.d.ts +2 -1
- package/2x/cjs/components/picker/picker.d.ts +3 -2
- package/2x/cjs/components/picker-view/picker-view.d.ts +2 -1
- package/2x/cjs/components/picker-view/wheel.d.ts +2 -1
- package/2x/cjs/components/popover/index.d.ts +1 -0
- package/2x/cjs/components/popover/popover-menu.css +16 -0
- package/2x/cjs/components/popover/popover-menu.d.ts +5 -2
- package/2x/cjs/components/popover/popover-menu.js +8 -1
- package/2x/cjs/components/popover/popover.d.ts +4 -3
- package/2x/cjs/components/popover/wrapper.d.ts +2 -1
- package/2x/cjs/components/popup/popup-base-props.d.ts +2 -1
- package/2x/cjs/components/popup/popup.d.ts +1 -1
- package/2x/cjs/components/progress-bar/progress-bar.d.ts +1 -1
- package/2x/cjs/components/progress-circle/progress-circle.d.ts +2 -2
- package/2x/cjs/components/pull-to-refresh/pull-to-refresh.d.ts +2 -2
- package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +11 -11
- package/2x/cjs/components/radio/group.d.ts +2 -2
- package/2x/cjs/components/radio/radio.d.ts +4 -3
- package/2x/cjs/components/rate/rate.d.ts +2 -2
- package/2x/cjs/components/result/result.d.ts +1 -1
- package/2x/cjs/components/result-page/result-page-card.d.ts +1 -1
- package/2x/cjs/components/result-page/result-page.d.ts +3 -2
- package/2x/cjs/components/result-page/result-page.js +2 -2
- package/2x/cjs/components/scroll-mask/scroll-mask.d.ts +1 -1
- package/2x/cjs/components/search-bar/search-bar.d.ts +2 -1
- package/2x/cjs/components/selector/check-mark.d.ts +1 -1
- package/2x/cjs/components/selector/selector.d.ts +8 -5
- package/2x/cjs/components/selector/selector.js +12 -10
- package/2x/cjs/components/side-bar/side-bar.d.ts +2 -2
- package/2x/cjs/components/slider/marks.d.ts +2 -2
- package/2x/cjs/components/slider/slider.d.ts +1 -1
- package/2x/cjs/components/slider/thumb-icon.d.ts +1 -1
- package/2x/cjs/components/slider/thumb.d.ts +2 -2
- package/2x/cjs/components/slider/ticks.d.ts +1 -1
- package/2x/cjs/components/space/space.d.ts +3 -2
- package/2x/cjs/components/steps/step.d.ts +4 -4
- package/2x/cjs/components/steps/steps.d.ts +2 -2
- package/2x/cjs/components/swipe-action/swipe-action.d.ts +2 -1
- package/2x/cjs/components/swipe-action/swipe-action.js +0 -1
- package/2x/cjs/components/swiper/swiper-item.d.ts +3 -2
- package/2x/cjs/components/swiper/swiper.d.ts +2 -1
- package/2x/cjs/components/switch/switch.d.ts +1 -1
- package/2x/cjs/components/tab-bar/tab-bar.d.ts +2 -2
- package/2x/cjs/components/tabs/tabs.d.ts +3 -2
- package/2x/cjs/components/tabs/tabs.js +39 -5
- package/2x/cjs/components/tag/tag.d.ts +3 -2
- package/2x/cjs/components/toast/toast.d.ts +3 -3
- package/2x/cjs/components/tree-select/multiple.d.ts +3 -6
- package/2x/cjs/components/tree-select/multiple.js +2 -3
- package/2x/cjs/components/tree-select/tree-select.d.ts +9 -8
- package/2x/cjs/components/tree-select/tree-select.js +2 -3
- package/2x/cjs/components/virtual-input/virtual-input.d.ts +2 -1
- package/2x/cjs/components/water-mark/water-mark.d.ts +1 -1
- package/2x/cjs/hooks/index.d.ts +5 -0
- package/2x/cjs/hooks/index.js +12 -0
- package/2x/cjs/hooks/useFieldNames.d.ts +7 -0
- package/2x/cjs/hooks/useFieldNames.js +20 -0
- package/2x/cjs/index.d.ts +5 -1
- package/2x/cjs/index.js +14 -0
- package/2x/cjs/locales/base.d.ts +5 -0
- package/2x/cjs/locales/base.js +5 -0
- package/2x/cjs/locales/da-DK.d.ts +5 -0
- package/2x/cjs/locales/en-US.d.ts +5 -0
- package/2x/cjs/locales/es-ES.d.ts +5 -0
- package/2x/cjs/locales/fa-IR.d.ts +5 -0
- package/2x/cjs/locales/fr-FR.d.ts +5 -0
- package/2x/cjs/locales/id-ID.d.ts +5 -0
- package/2x/cjs/locales/it-IT.d.ts +5 -0
- package/2x/cjs/locales/ja-JP.d.ts +5 -0
- package/2x/cjs/locales/kk-KZ.d.ts +5 -0
- package/2x/cjs/locales/ko-KR.d.ts +5 -0
- package/2x/cjs/locales/nb-NO.d.ts +5 -0
- package/2x/cjs/locales/nl-NL.d.ts +5 -0
- package/2x/cjs/locales/ru-RU.d.ts +5 -0
- package/2x/cjs/locales/tr-TR.d.ts +139 -0
- package/2x/cjs/locales/tr-TR.js +144 -0
- package/2x/cjs/locales/zh-CN.d.ts +5 -0
- package/2x/cjs/locales/zh-CN.js +5 -0
- package/2x/cjs/locales/zh-HK.d.ts +5 -0
- package/2x/cjs/locales/zh-TW.d.ts +5 -0
- package/2x/cjs/utils/create-icon-component.d.ts +1 -1
- package/2x/cjs/utils/is-node-with-content.d.ts +1 -1
- package/2x/cjs/utils/render-imperatively.d.ts +1 -1
- package/2x/cjs/utils/render-to-body.d.ts +1 -1
- package/2x/cjs/utils/render-to-container.d.ts +1 -1
- package/2x/cjs/utils/render.d.ts +1 -1
- package/2x/cjs/utils/should-render.d.ts +1 -1
- package/2x/cjs/utils/traverse-react-node.d.ts +1 -1
- package/2x/cjs/utils/with-stop-propagation.d.ts +2 -1
- package/2x/es/components/action-sheet/action-sheet.d.ts +6 -4
- package/2x/es/components/action-sheet/action-sheet.js +7 -5
- package/2x/es/components/auto-center/auto-center.d.ts +2 -2
- package/2x/es/components/auto-center/auto-center.js +5 -7
- package/2x/es/components/avatar/avatar.d.ts +1 -1
- package/2x/es/components/avatar/fallback.d.ts +1 -1
- package/2x/es/components/badge/badge.d.ts +6 -5
- package/2x/es/components/badge/badge.js +6 -2
- package/2x/es/components/badge/index.d.ts +1 -1
- package/2x/es/components/button/button.d.ts +6 -5
- package/2x/es/components/button/button.js +2 -1
- package/2x/es/components/calendar/calendar.js +8 -1
- package/2x/es/components/calendar-picker/calendar-picker.d.ts +123 -0
- package/2x/es/components/calendar-picker/calendar-picker.js +79 -0
- package/2x/es/components/calendar-picker/index.d.ts +3 -0
- package/2x/es/components/calendar-picker/index.js +2 -0
- package/2x/es/components/calendar-picker-view/arrow-left-double.d.ts +2 -0
- package/2x/es/components/calendar-picker-view/arrow-left-double.js +29 -0
- package/2x/es/components/calendar-picker-view/arrow-left.d.ts +2 -0
- package/2x/es/components/calendar-picker-view/arrow-left.js +27 -0
- package/2x/es/components/calendar-picker-view/calendar-picker-view.css +617 -0
- package/2x/es/components/calendar-picker-view/calendar-picker-view.d.ts +36 -0
- package/2x/es/components/calendar-picker-view/calendar-picker-view.js +205 -0
- package/2x/es/components/calendar-picker-view/convert.d.ts +8 -0
- package/2x/es/components/calendar-picker-view/convert.js +11 -0
- package/2x/es/components/calendar-picker-view/index.d.ts +4 -0
- package/2x/es/components/calendar-picker-view/index.js +3 -0
- package/2x/es/components/capsule-tabs/capsule-tabs.d.ts +2 -2
- package/2x/es/components/card/card.d.ts +5 -4
- package/2x/es/components/cascade-picker-view/cascade-picker-view.d.ts +1 -1
- package/2x/es/components/cascader/cascader.d.ts +3 -0
- package/2x/es/components/cascader/index.d.ts +1 -0
- package/2x/es/components/cascader-view/cascader-view.d.ts +6 -4
- package/2x/es/components/cascader-view/cascader-view.js +18 -16
- package/2x/es/components/center-popup/center-popup.d.ts +1 -1
- package/2x/es/components/check-list/check-list-item.d.ts +1 -1
- package/2x/es/components/check-list/check-list.d.ts +2 -2
- package/2x/es/components/check-list/context.d.ts +1 -1
- package/2x/es/components/checkbox/checkbox.d.ts +5 -4
- package/2x/es/components/checkbox/group.d.ts +2 -2
- package/2x/es/components/checkbox/native-input.d.ts +1 -1
- package/2x/es/components/collapse/collapse.d.ts +7 -6
- package/2x/es/components/config-provider/config-provider.d.ts +2 -2
- package/2x/es/components/date-picker/date-picker-week-utils.d.ts +1 -1
- package/2x/es/components/date-picker/date-picker.d.ts +3 -2
- package/2x/es/components/date-picker/index.d.ts +1 -1
- package/2x/es/components/date-picker-view/date-picker-view.d.ts +1 -1
- package/2x/es/components/dialog/alert.d.ts +1 -1
- package/2x/es/components/dialog/confirm.d.ts +1 -1
- package/2x/es/components/dialog/dialog-action-button.d.ts +1 -1
- package/2x/es/components/dialog/dialog.d.ts +1 -1
- package/2x/es/components/divider/divider.d.ts +2 -2
- package/2x/es/components/dropdown/dropdown.d.ts +3 -2
- package/2x/es/components/dropdown/item.d.ts +5 -4
- package/2x/es/components/ellipsis/ellipsis.d.ts +4 -3
- package/2x/es/components/empty/empty-icon.d.ts +1 -1
- package/2x/es/components/empty/empty.d.ts +3 -3
- package/2x/es/components/error-block/create-error-block.d.ts +3 -2
- package/2x/es/components/error-block/images/busy.d.ts +2 -1
- package/2x/es/components/error-block/images/default.d.ts +2 -1
- package/2x/es/components/error-block/images/disconnected.d.ts +2 -1
- package/2x/es/components/error-block/images/empty.d.ts +2 -1
- package/2x/es/components/error-block/index.d.ts +1 -1
- package/2x/es/components/floating-bubble/floating-bubble.d.ts +3 -2
- package/2x/es/components/floating-panel/floating-panel.d.ts +2 -1
- package/2x/es/components/footer/footer.d.ts +1 -1
- package/2x/es/components/form/form-array.d.ts +2 -2
- package/2x/es/components/form/form-item.d.ts +7 -6
- package/2x/es/components/form/form-subscribe.d.ts +3 -2
- package/2x/es/components/form/form.d.ts +2 -1
- package/2x/es/components/form/header.d.ts +1 -1
- package/2x/es/components/grid/grid.d.ts +4 -3
- package/2x/es/components/image/broken-image-icon.d.ts +2 -1
- package/2x/es/components/image/image-icon.d.ts +2 -1
- package/2x/es/components/image/image.d.ts +2 -1
- package/2x/es/components/image/lazy-detector.d.ts +1 -1
- package/2x/es/components/image-uploader/image-uploader.d.ts +37 -5
- package/2x/es/components/image-uploader/image-uploader.js +10 -3
- package/2x/es/components/image-uploader/index.d.ts +1 -1
- package/2x/es/components/image-uploader/preview-item.d.ts +2 -2
- package/2x/es/components/image-viewer/image-viewer.d.ts +5 -4
- package/2x/es/components/image-viewer/image-viewer.js +7 -12
- package/2x/es/components/image-viewer/slide.d.ts +2 -2
- package/2x/es/components/image-viewer/slide.js +90 -16
- package/2x/es/components/image-viewer/slides.d.ts +1 -1
- package/2x/es/components/image-viewer/slides.js +4 -6
- package/2x/es/components/index-bar/index-bar.d.ts +4 -3
- package/2x/es/components/index-bar/panel.d.ts +1 -1
- package/2x/es/components/index-bar/sidebar.d.ts +1 -1
- package/2x/es/components/infinite-scroll/infinite-scroll.d.ts +2 -2
- package/2x/es/components/jumbo-tabs/jumbo-tabs.d.ts +3 -3
- package/2x/es/components/list/list-item.d.ts +2 -1
- package/2x/es/components/list/list.d.ts +2 -1
- package/2x/es/components/mask/mask.d.ts +3 -2
- package/2x/es/components/modal/alert.d.ts +1 -1
- package/2x/es/components/modal/confirm.d.ts +1 -1
- package/2x/es/components/modal/modal-action-button.d.ts +1 -1
- package/2x/es/components/modal/modal.d.ts +1 -1
- package/2x/es/components/nav-bar/nav-bar.d.ts +1 -1
- package/2x/es/components/notice-bar/notice-bar.d.ts +4 -3
- package/2x/es/components/number-keyboard/number-keyboard.d.ts +2 -2
- package/2x/es/components/passcode-input/passcode-input.d.ts +2 -1
- package/2x/es/components/picker/picker.d.ts +3 -2
- package/2x/es/components/picker-view/picker-view.d.ts +2 -1
- package/2x/es/components/picker-view/wheel.d.ts +2 -1
- package/2x/es/components/popover/index.d.ts +1 -0
- package/2x/es/components/popover/popover-menu.css +16 -0
- package/2x/es/components/popover/popover-menu.d.ts +5 -2
- package/2x/es/components/popover/popover-menu.js +8 -1
- package/2x/es/components/popover/popover.d.ts +4 -3
- package/2x/es/components/popover/wrapper.d.ts +2 -1
- package/2x/es/components/popup/popup-base-props.d.ts +2 -1
- package/2x/es/components/popup/popup.d.ts +1 -1
- package/2x/es/components/progress-bar/progress-bar.d.ts +1 -1
- package/2x/es/components/progress-circle/progress-circle.d.ts +2 -2
- package/2x/es/components/pull-to-refresh/pull-to-refresh.d.ts +2 -2
- package/2x/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/2x/es/components/radio/group.d.ts +2 -2
- package/2x/es/components/radio/radio.d.ts +4 -3
- package/2x/es/components/rate/rate.d.ts +2 -2
- package/2x/es/components/result/result.d.ts +1 -1
- package/2x/es/components/result-page/result-page-card.d.ts +1 -1
- package/2x/es/components/result-page/result-page.d.ts +3 -2
- package/2x/es/components/result-page/result-page.js +2 -2
- package/2x/es/components/scroll-mask/scroll-mask.d.ts +1 -1
- package/2x/es/components/search-bar/search-bar.d.ts +2 -1
- package/2x/es/components/selector/check-mark.d.ts +1 -1
- package/2x/es/components/selector/selector.d.ts +8 -5
- package/2x/es/components/selector/selector.js +12 -10
- package/2x/es/components/side-bar/side-bar.d.ts +2 -2
- package/2x/es/components/slider/marks.d.ts +2 -2
- package/2x/es/components/slider/slider.d.ts +1 -1
- package/2x/es/components/slider/thumb-icon.d.ts +1 -1
- package/2x/es/components/slider/thumb.d.ts +2 -2
- package/2x/es/components/slider/ticks.d.ts +1 -1
- package/2x/es/components/space/space.d.ts +3 -2
- package/2x/es/components/steps/step.d.ts +4 -4
- package/2x/es/components/steps/steps.d.ts +2 -2
- package/2x/es/components/swipe-action/swipe-action.d.ts +2 -1
- package/2x/es/components/swipe-action/swipe-action.js +0 -1
- package/2x/es/components/swiper/swiper-item.d.ts +3 -2
- package/2x/es/components/swiper/swiper.d.ts +2 -1
- package/2x/es/components/switch/switch.d.ts +1 -1
- package/2x/es/components/tab-bar/tab-bar.d.ts +2 -2
- package/2x/es/components/tabs/tabs.d.ts +3 -2
- package/2x/es/components/tabs/tabs.js +39 -5
- package/2x/es/components/tag/tag.d.ts +3 -2
- package/2x/es/components/toast/toast.d.ts +3 -3
- package/2x/es/components/tree-select/multiple.d.ts +3 -6
- package/2x/es/components/tree-select/multiple.js +2 -3
- package/2x/es/components/tree-select/tree-select.d.ts +9 -8
- package/2x/es/components/tree-select/tree-select.js +2 -3
- package/2x/es/components/virtual-input/virtual-input.d.ts +2 -1
- package/2x/es/components/water-mark/water-mark.d.ts +1 -1
- package/2x/es/hooks/index.d.ts +5 -0
- package/2x/es/hooks/index.js +1 -0
- package/2x/es/hooks/useFieldNames.d.ts +7 -0
- package/2x/es/hooks/useFieldNames.js +13 -0
- package/2x/es/index.d.ts +5 -1
- package/2x/es/index.js +2 -0
- package/2x/es/locales/base.d.ts +5 -0
- package/2x/es/locales/base.js +5 -0
- package/2x/es/locales/da-DK.d.ts +5 -0
- package/2x/es/locales/en-US.d.ts +5 -0
- package/2x/es/locales/es-ES.d.ts +5 -0
- package/2x/es/locales/fa-IR.d.ts +5 -0
- package/2x/es/locales/fr-FR.d.ts +5 -0
- package/2x/es/locales/id-ID.d.ts +5 -0
- package/2x/es/locales/it-IT.d.ts +5 -0
- package/2x/es/locales/ja-JP.d.ts +5 -0
- package/2x/es/locales/kk-KZ.d.ts +5 -0
- package/2x/es/locales/ko-KR.d.ts +5 -0
- package/2x/es/locales/nb-NO.d.ts +5 -0
- package/2x/es/locales/nl-NL.d.ts +5 -0
- package/2x/es/locales/ru-RU.d.ts +5 -0
- package/2x/es/locales/tr-TR.d.ts +139 -0
- package/2x/es/locales/tr-TR.js +137 -0
- package/2x/es/locales/zh-CN.d.ts +5 -0
- package/2x/es/locales/zh-CN.js +5 -0
- package/2x/es/locales/zh-HK.d.ts +5 -0
- package/2x/es/locales/zh-TW.d.ts +5 -0
- package/2x/es/utils/create-icon-component.d.ts +1 -1
- package/2x/es/utils/is-node-with-content.d.ts +1 -1
- package/2x/es/utils/render-imperatively.d.ts +1 -1
- package/2x/es/utils/render-to-body.d.ts +1 -1
- package/2x/es/utils/render-to-container.d.ts +1 -1
- package/2x/es/utils/render.d.ts +1 -1
- package/2x/es/utils/should-render.d.ts +1 -1
- package/2x/es/utils/traverse-react-node.d.ts +1 -1
- package/2x/es/utils/with-stop-propagation.d.ts +2 -1
- package/2x/package.json +3 -2
- package/README.md +2 -0
- package/bundle/antd-mobile.cjs.development.js +1719 -1134
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +1719 -1134
- package/bundle/antd-mobile.es.js +7952 -7508
- package/bundle/antd-mobile.umd.development.js +1717 -1132
- package/bundle/antd-mobile.umd.js +9 -9
- package/bundle/style.css +1 -1
- package/cjs/components/action-sheet/action-sheet.d.ts +6 -4
- package/cjs/components/action-sheet/action-sheet.js +7 -5
- package/cjs/components/auto-center/auto-center.d.ts +2 -2
- package/cjs/components/auto-center/auto-center.js +5 -7
- package/cjs/components/avatar/avatar.d.ts +1 -1
- package/cjs/components/avatar/fallback.d.ts +1 -1
- package/cjs/components/badge/badge.d.ts +6 -5
- package/cjs/components/badge/badge.js +6 -2
- package/cjs/components/badge/index.d.ts +1 -1
- package/cjs/components/button/button.d.ts +6 -5
- package/cjs/components/button/button.js +2 -1
- package/cjs/components/calendar/calendar.js +7 -0
- package/cjs/components/calendar-picker/calendar-picker.d.ts +123 -0
- package/cjs/components/calendar-picker/calendar-picker.js +89 -0
- package/cjs/components/calendar-picker/index.d.ts +3 -0
- package/cjs/components/calendar-picker/index.js +9 -0
- package/cjs/components/calendar-picker-view/arrow-left-double.d.ts +2 -0
- package/cjs/components/calendar-picker-view/arrow-left-double.js +37 -0
- package/cjs/components/calendar-picker-view/arrow-left.d.ts +2 -0
- package/cjs/components/calendar-picker-view/arrow-left.js +35 -0
- package/cjs/components/calendar-picker-view/calendar-picker-view.css +595 -0
- package/cjs/components/calendar-picker-view/calendar-picker-view.d.ts +36 -0
- package/cjs/components/calendar-picker-view/calendar-picker-view.js +215 -0
- package/cjs/components/calendar-picker-view/convert.d.ts +8 -0
- package/cjs/components/calendar-picker-view/convert.js +19 -0
- package/cjs/components/calendar-picker-view/index.d.ts +4 -0
- package/cjs/components/calendar-picker-view/index.js +10 -0
- package/cjs/components/capsule-tabs/capsule-tabs.d.ts +2 -2
- package/cjs/components/card/card.d.ts +5 -4
- package/cjs/components/cascade-picker-view/cascade-picker-view.d.ts +1 -1
- package/cjs/components/cascader/cascader.d.ts +3 -0
- package/cjs/components/cascader/index.d.ts +1 -0
- package/cjs/components/cascader-view/cascader-view.d.ts +6 -4
- package/cjs/components/cascader-view/cascader-view.js +18 -16
- package/cjs/components/center-popup/center-popup.d.ts +1 -1
- package/cjs/components/check-list/check-list-item.d.ts +1 -1
- package/cjs/components/check-list/check-list.d.ts +2 -2
- package/cjs/components/check-list/context.d.ts +1 -1
- package/cjs/components/checkbox/checkbox.d.ts +5 -4
- package/cjs/components/checkbox/group.d.ts +2 -2
- package/cjs/components/checkbox/native-input.d.ts +1 -1
- package/cjs/components/collapse/collapse.d.ts +7 -6
- package/cjs/components/config-provider/config-provider.d.ts +2 -2
- package/cjs/components/date-picker/date-picker-week-utils.d.ts +1 -1
- package/cjs/components/date-picker/date-picker.d.ts +3 -2
- package/cjs/components/date-picker/index.d.ts +1 -1
- package/cjs/components/date-picker-view/date-picker-view.d.ts +1 -1
- package/cjs/components/dialog/alert.d.ts +1 -1
- package/cjs/components/dialog/confirm.d.ts +1 -1
- package/cjs/components/dialog/dialog-action-button.d.ts +1 -1
- package/cjs/components/dialog/dialog.d.ts +1 -1
- package/cjs/components/divider/divider.d.ts +2 -2
- package/cjs/components/dropdown/dropdown.d.ts +3 -2
- package/cjs/components/dropdown/item.d.ts +5 -4
- package/cjs/components/ellipsis/ellipsis.d.ts +4 -3
- package/cjs/components/empty/empty-icon.d.ts +1 -1
- package/cjs/components/empty/empty.d.ts +3 -3
- package/cjs/components/error-block/create-error-block.d.ts +3 -2
- package/cjs/components/error-block/images/busy.d.ts +2 -1
- package/cjs/components/error-block/images/default.d.ts +2 -1
- package/cjs/components/error-block/images/disconnected.d.ts +2 -1
- package/cjs/components/error-block/images/empty.d.ts +2 -1
- package/cjs/components/error-block/index.d.ts +1 -1
- package/cjs/components/floating-bubble/floating-bubble.d.ts +3 -2
- package/cjs/components/floating-panel/floating-panel.d.ts +2 -1
- package/cjs/components/footer/footer.d.ts +1 -1
- package/cjs/components/form/form-array.d.ts +2 -2
- package/cjs/components/form/form-item.d.ts +7 -6
- package/cjs/components/form/form-subscribe.d.ts +3 -2
- package/cjs/components/form/form.d.ts +2 -1
- package/cjs/components/form/header.d.ts +1 -1
- package/cjs/components/grid/grid.d.ts +4 -3
- package/cjs/components/image/broken-image-icon.d.ts +2 -1
- package/cjs/components/image/image-icon.d.ts +2 -1
- package/cjs/components/image/image.d.ts +2 -1
- package/cjs/components/image/lazy-detector.d.ts +1 -1
- package/cjs/components/image-uploader/image-uploader.d.ts +37 -5
- package/cjs/components/image-uploader/image-uploader.js +9 -2
- package/cjs/components/image-uploader/index.d.ts +1 -1
- package/cjs/components/image-uploader/preview-item.d.ts +2 -2
- package/cjs/components/image-viewer/image-viewer.d.ts +5 -4
- package/cjs/components/image-viewer/image-viewer.js +7 -12
- package/cjs/components/image-viewer/slide.d.ts +2 -2
- package/cjs/components/image-viewer/slide.js +90 -16
- package/cjs/components/image-viewer/slides.d.ts +1 -1
- package/cjs/components/image-viewer/slides.js +4 -6
- package/cjs/components/index-bar/index-bar.d.ts +4 -3
- package/cjs/components/index-bar/panel.d.ts +1 -1
- package/cjs/components/index-bar/sidebar.d.ts +1 -1
- package/cjs/components/infinite-scroll/infinite-scroll.d.ts +2 -2
- package/cjs/components/jumbo-tabs/jumbo-tabs.d.ts +3 -3
- package/cjs/components/list/list-item.d.ts +2 -1
- package/cjs/components/list/list.d.ts +2 -1
- package/cjs/components/mask/mask.d.ts +3 -2
- package/cjs/components/modal/alert.d.ts +1 -1
- package/cjs/components/modal/confirm.d.ts +1 -1
- package/cjs/components/modal/modal-action-button.d.ts +1 -1
- package/cjs/components/modal/modal.d.ts +1 -1
- package/cjs/components/nav-bar/nav-bar.d.ts +1 -1
- package/cjs/components/notice-bar/notice-bar.d.ts +4 -3
- package/cjs/components/number-keyboard/number-keyboard.d.ts +2 -2
- package/cjs/components/passcode-input/passcode-input.d.ts +2 -1
- package/cjs/components/picker/picker.d.ts +3 -2
- package/cjs/components/picker-view/picker-view.d.ts +2 -1
- package/cjs/components/picker-view/wheel.d.ts +2 -1
- package/cjs/components/popover/index.d.ts +1 -0
- package/cjs/components/popover/popover-menu.css +13 -0
- package/cjs/components/popover/popover-menu.d.ts +5 -2
- package/cjs/components/popover/popover-menu.js +8 -1
- package/cjs/components/popover/popover.d.ts +4 -3
- package/cjs/components/popover/wrapper.d.ts +2 -1
- package/cjs/components/popup/popup-base-props.d.ts +2 -1
- package/cjs/components/popup/popup.d.ts +1 -1
- package/cjs/components/progress-bar/progress-bar.d.ts +1 -1
- package/cjs/components/progress-circle/progress-circle.d.ts +2 -2
- package/cjs/components/pull-to-refresh/pull-to-refresh.d.ts +2 -2
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +11 -11
- package/cjs/components/radio/group.d.ts +2 -2
- package/cjs/components/radio/radio.d.ts +4 -3
- package/cjs/components/rate/rate.d.ts +2 -2
- package/cjs/components/result/result.d.ts +1 -1
- package/cjs/components/result-page/result-page-card.d.ts +1 -1
- package/cjs/components/result-page/result-page.d.ts +3 -2
- package/cjs/components/result-page/result-page.js +2 -2
- package/cjs/components/scroll-mask/scroll-mask.d.ts +1 -1
- package/cjs/components/search-bar/search-bar.d.ts +2 -1
- package/cjs/components/selector/check-mark.d.ts +1 -1
- package/cjs/components/selector/selector.d.ts +8 -5
- package/cjs/components/selector/selector.js +12 -10
- package/cjs/components/side-bar/side-bar.d.ts +2 -2
- package/cjs/components/slider/marks.d.ts +2 -2
- package/cjs/components/slider/slider.d.ts +1 -1
- package/cjs/components/slider/thumb-icon.d.ts +1 -1
- package/cjs/components/slider/thumb.d.ts +2 -2
- package/cjs/components/slider/ticks.d.ts +1 -1
- package/cjs/components/space/space.d.ts +3 -2
- package/cjs/components/steps/step.d.ts +4 -4
- package/cjs/components/steps/steps.d.ts +2 -2
- package/cjs/components/swipe-action/swipe-action.d.ts +2 -1
- package/cjs/components/swipe-action/swipe-action.js +0 -1
- package/cjs/components/swiper/swiper-item.d.ts +3 -2
- package/cjs/components/swiper/swiper.d.ts +2 -1
- package/cjs/components/switch/switch.d.ts +1 -1
- package/cjs/components/tab-bar/tab-bar.d.ts +2 -2
- package/cjs/components/tabs/tabs.d.ts +3 -2
- package/cjs/components/tabs/tabs.js +39 -5
- package/cjs/components/tag/tag.d.ts +3 -2
- package/cjs/components/toast/toast.d.ts +3 -3
- package/cjs/components/tree-select/multiple.d.ts +3 -6
- package/cjs/components/tree-select/multiple.js +2 -3
- package/cjs/components/tree-select/tree-select.d.ts +9 -8
- package/cjs/components/tree-select/tree-select.js +2 -3
- package/cjs/components/virtual-input/virtual-input.d.ts +2 -1
- package/cjs/components/water-mark/water-mark.d.ts +1 -1
- package/cjs/hooks/index.d.ts +5 -0
- package/cjs/hooks/index.js +12 -0
- package/cjs/hooks/useFieldNames.d.ts +7 -0
- package/cjs/hooks/useFieldNames.js +20 -0
- package/cjs/index.d.ts +5 -1
- package/cjs/index.js +14 -0
- package/cjs/locales/base.d.ts +5 -0
- package/cjs/locales/base.js +5 -0
- package/cjs/locales/da-DK.d.ts +5 -0
- package/cjs/locales/en-US.d.ts +5 -0
- package/cjs/locales/es-ES.d.ts +5 -0
- package/cjs/locales/fa-IR.d.ts +5 -0
- package/cjs/locales/fr-FR.d.ts +5 -0
- package/cjs/locales/id-ID.d.ts +5 -0
- package/cjs/locales/it-IT.d.ts +5 -0
- package/cjs/locales/ja-JP.d.ts +5 -0
- package/cjs/locales/kk-KZ.d.ts +5 -0
- package/cjs/locales/ko-KR.d.ts +5 -0
- package/cjs/locales/nb-NO.d.ts +5 -0
- package/cjs/locales/nl-NL.d.ts +5 -0
- package/cjs/locales/ru-RU.d.ts +5 -0
- package/cjs/locales/tr-TR.d.ts +139 -0
- package/cjs/locales/tr-TR.js +144 -0
- package/cjs/locales/zh-CN.d.ts +5 -0
- package/cjs/locales/zh-CN.js +5 -0
- package/cjs/locales/zh-HK.d.ts +5 -0
- package/cjs/locales/zh-TW.d.ts +5 -0
- package/cjs/utils/create-icon-component.d.ts +1 -1
- package/cjs/utils/is-node-with-content.d.ts +1 -1
- package/cjs/utils/render-imperatively.d.ts +1 -1
- package/cjs/utils/render-to-body.d.ts +1 -1
- package/cjs/utils/render-to-container.d.ts +1 -1
- package/cjs/utils/render.d.ts +1 -1
- package/cjs/utils/should-render.d.ts +1 -1
- package/cjs/utils/traverse-react-node.d.ts +1 -1
- package/cjs/utils/with-stop-propagation.d.ts +2 -1
- package/es/components/action-sheet/action-sheet.d.ts +6 -4
- package/es/components/action-sheet/action-sheet.js +7 -5
- package/es/components/auto-center/auto-center.d.ts +2 -2
- package/es/components/auto-center/auto-center.js +5 -7
- package/es/components/avatar/avatar.d.ts +1 -1
- package/es/components/avatar/fallback.d.ts +1 -1
- package/es/components/badge/badge.d.ts +6 -5
- package/es/components/badge/badge.js +6 -2
- package/es/components/badge/index.d.ts +1 -1
- package/es/components/button/button.d.ts +6 -5
- package/es/components/button/button.js +2 -1
- package/es/components/calendar/calendar.js +8 -1
- package/es/components/calendar-picker/calendar-picker.d.ts +123 -0
- package/es/components/calendar-picker/calendar-picker.js +79 -0
- package/es/components/calendar-picker/index.d.ts +3 -0
- package/es/components/calendar-picker/index.js +2 -0
- package/es/components/calendar-picker-view/arrow-left-double.d.ts +2 -0
- package/es/components/calendar-picker-view/arrow-left-double.js +29 -0
- package/es/components/calendar-picker-view/arrow-left.d.ts +2 -0
- package/es/components/calendar-picker-view/arrow-left.js +27 -0
- package/es/components/calendar-picker-view/calendar-picker-view.css +595 -0
- package/es/components/calendar-picker-view/calendar-picker-view.d.ts +36 -0
- package/es/components/calendar-picker-view/calendar-picker-view.js +205 -0
- package/es/components/calendar-picker-view/convert.d.ts +8 -0
- package/es/components/calendar-picker-view/convert.js +11 -0
- package/es/components/calendar-picker-view/index.d.ts +4 -0
- package/es/components/calendar-picker-view/index.js +3 -0
- package/es/components/capsule-tabs/capsule-tabs.d.ts +2 -2
- package/es/components/card/card.d.ts +5 -4
- package/es/components/cascade-picker-view/cascade-picker-view.d.ts +1 -1
- package/es/components/cascader/cascader.d.ts +3 -0
- package/es/components/cascader/index.d.ts +1 -0
- package/es/components/cascader-view/cascader-view.d.ts +6 -4
- package/es/components/cascader-view/cascader-view.js +18 -16
- package/es/components/center-popup/center-popup.d.ts +1 -1
- package/es/components/check-list/check-list-item.d.ts +1 -1
- package/es/components/check-list/check-list.d.ts +2 -2
- package/es/components/check-list/context.d.ts +1 -1
- package/es/components/checkbox/checkbox.d.ts +5 -4
- package/es/components/checkbox/group.d.ts +2 -2
- package/es/components/checkbox/native-input.d.ts +1 -1
- package/es/components/collapse/collapse.d.ts +7 -6
- package/es/components/config-provider/config-provider.d.ts +2 -2
- package/es/components/date-picker/date-picker-week-utils.d.ts +1 -1
- package/es/components/date-picker/date-picker.d.ts +3 -2
- package/es/components/date-picker/index.d.ts +1 -1
- package/es/components/date-picker-view/date-picker-view.d.ts +1 -1
- package/es/components/dialog/alert.d.ts +1 -1
- package/es/components/dialog/confirm.d.ts +1 -1
- package/es/components/dialog/dialog-action-button.d.ts +1 -1
- package/es/components/dialog/dialog.d.ts +1 -1
- package/es/components/divider/divider.d.ts +2 -2
- package/es/components/dropdown/dropdown.d.ts +3 -2
- package/es/components/dropdown/item.d.ts +5 -4
- package/es/components/ellipsis/ellipsis.d.ts +4 -3
- package/es/components/empty/empty-icon.d.ts +1 -1
- package/es/components/empty/empty.d.ts +3 -3
- package/es/components/error-block/create-error-block.d.ts +3 -2
- package/es/components/error-block/images/busy.d.ts +2 -1
- package/es/components/error-block/images/default.d.ts +2 -1
- package/es/components/error-block/images/disconnected.d.ts +2 -1
- package/es/components/error-block/images/empty.d.ts +2 -1
- package/es/components/error-block/index.d.ts +1 -1
- package/es/components/floating-bubble/floating-bubble.d.ts +3 -2
- package/es/components/floating-panel/floating-panel.d.ts +2 -1
- package/es/components/footer/footer.d.ts +1 -1
- package/es/components/form/form-array.d.ts +2 -2
- package/es/components/form/form-item.d.ts +7 -6
- package/es/components/form/form-subscribe.d.ts +3 -2
- package/es/components/form/form.d.ts +2 -1
- package/es/components/form/header.d.ts +1 -1
- package/es/components/grid/grid.d.ts +4 -3
- package/es/components/image/broken-image-icon.d.ts +2 -1
- package/es/components/image/image-icon.d.ts +2 -1
- package/es/components/image/image.d.ts +2 -1
- package/es/components/image/lazy-detector.d.ts +1 -1
- package/es/components/image-uploader/image-uploader.d.ts +37 -5
- package/es/components/image-uploader/image-uploader.js +10 -3
- package/es/components/image-uploader/index.d.ts +1 -1
- package/es/components/image-uploader/preview-item.d.ts +2 -2
- package/es/components/image-viewer/image-viewer.d.ts +5 -4
- package/es/components/image-viewer/image-viewer.js +7 -12
- package/es/components/image-viewer/slide.d.ts +2 -2
- package/es/components/image-viewer/slide.js +90 -16
- package/es/components/image-viewer/slides.d.ts +1 -1
- package/es/components/image-viewer/slides.js +4 -6
- package/es/components/index-bar/index-bar.d.ts +4 -3
- package/es/components/index-bar/panel.d.ts +1 -1
- package/es/components/index-bar/sidebar.d.ts +1 -1
- package/es/components/infinite-scroll/infinite-scroll.d.ts +2 -2
- package/es/components/jumbo-tabs/jumbo-tabs.d.ts +3 -3
- package/es/components/list/list-item.d.ts +2 -1
- package/es/components/list/list.d.ts +2 -1
- package/es/components/mask/mask.d.ts +3 -2
- package/es/components/modal/alert.d.ts +1 -1
- package/es/components/modal/confirm.d.ts +1 -1
- package/es/components/modal/modal-action-button.d.ts +1 -1
- package/es/components/modal/modal.d.ts +1 -1
- package/es/components/nav-bar/nav-bar.d.ts +1 -1
- package/es/components/notice-bar/notice-bar.d.ts +4 -3
- package/es/components/number-keyboard/number-keyboard.d.ts +2 -2
- package/es/components/passcode-input/passcode-input.d.ts +2 -1
- package/es/components/picker/picker.d.ts +3 -2
- package/es/components/picker-view/picker-view.d.ts +2 -1
- package/es/components/picker-view/wheel.d.ts +2 -1
- package/es/components/popover/index.d.ts +1 -0
- package/es/components/popover/popover-menu.css +13 -0
- package/es/components/popover/popover-menu.d.ts +5 -2
- package/es/components/popover/popover-menu.js +8 -1
- package/es/components/popover/popover.d.ts +4 -3
- package/es/components/popover/wrapper.d.ts +2 -1
- package/es/components/popup/popup-base-props.d.ts +2 -1
- package/es/components/popup/popup.d.ts +1 -1
- package/es/components/progress-bar/progress-bar.d.ts +1 -1
- package/es/components/progress-circle/progress-circle.d.ts +2 -2
- package/es/components/pull-to-refresh/pull-to-refresh.d.ts +2 -2
- package/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/es/components/radio/group.d.ts +2 -2
- package/es/components/radio/radio.d.ts +4 -3
- package/es/components/rate/rate.d.ts +2 -2
- package/es/components/result/result.d.ts +1 -1
- package/es/components/result-page/result-page-card.d.ts +1 -1
- package/es/components/result-page/result-page.d.ts +3 -2
- package/es/components/result-page/result-page.js +2 -2
- package/es/components/scroll-mask/scroll-mask.d.ts +1 -1
- package/es/components/search-bar/search-bar.d.ts +2 -1
- package/es/components/selector/check-mark.d.ts +1 -1
- package/es/components/selector/selector.d.ts +8 -5
- package/es/components/selector/selector.js +12 -10
- package/es/components/side-bar/side-bar.d.ts +2 -2
- package/es/components/slider/marks.d.ts +2 -2
- package/es/components/slider/slider.d.ts +1 -1
- package/es/components/slider/thumb-icon.d.ts +1 -1
- package/es/components/slider/thumb.d.ts +2 -2
- package/es/components/slider/ticks.d.ts +1 -1
- package/es/components/space/space.d.ts +3 -2
- package/es/components/steps/step.d.ts +4 -4
- package/es/components/steps/steps.d.ts +2 -2
- package/es/components/swipe-action/swipe-action.d.ts +2 -1
- package/es/components/swipe-action/swipe-action.js +0 -1
- package/es/components/swiper/swiper-item.d.ts +3 -2
- package/es/components/swiper/swiper.d.ts +2 -1
- package/es/components/switch/switch.d.ts +1 -1
- package/es/components/tab-bar/tab-bar.d.ts +2 -2
- package/es/components/tabs/tabs.d.ts +3 -2
- package/es/components/tabs/tabs.js +39 -5
- package/es/components/tag/tag.d.ts +3 -2
- package/es/components/toast/toast.d.ts +3 -3
- package/es/components/tree-select/multiple.d.ts +3 -6
- package/es/components/tree-select/multiple.js +2 -3
- package/es/components/tree-select/tree-select.d.ts +9 -8
- package/es/components/tree-select/tree-select.js +2 -3
- package/es/components/virtual-input/virtual-input.d.ts +2 -1
- package/es/components/water-mark/water-mark.d.ts +1 -1
- package/es/hooks/index.d.ts +5 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/useFieldNames.d.ts +7 -0
- package/es/hooks/useFieldNames.js +13 -0
- package/es/index.d.ts +5 -1
- package/es/index.js +2 -0
- package/es/locales/base.d.ts +5 -0
- package/es/locales/base.js +5 -0
- package/es/locales/da-DK.d.ts +5 -0
- package/es/locales/en-US.d.ts +5 -0
- package/es/locales/es-ES.d.ts +5 -0
- package/es/locales/fa-IR.d.ts +5 -0
- package/es/locales/fr-FR.d.ts +5 -0
- package/es/locales/id-ID.d.ts +5 -0
- package/es/locales/it-IT.d.ts +5 -0
- package/es/locales/ja-JP.d.ts +5 -0
- package/es/locales/kk-KZ.d.ts +5 -0
- package/es/locales/ko-KR.d.ts +5 -0
- package/es/locales/nb-NO.d.ts +5 -0
- package/es/locales/nl-NL.d.ts +5 -0
- package/es/locales/ru-RU.d.ts +5 -0
- package/es/locales/tr-TR.d.ts +139 -0
- package/es/locales/tr-TR.js +137 -0
- package/es/locales/zh-CN.d.ts +5 -0
- package/es/locales/zh-CN.js +5 -0
- package/es/locales/zh-HK.d.ts +5 -0
- package/es/locales/zh-TW.d.ts +5 -0
- package/es/utils/create-icon-component.d.ts +1 -1
- package/es/utils/is-node-with-content.d.ts +1 -1
- package/es/utils/render-imperatively.d.ts +1 -1
- package/es/utils/render-to-body.d.ts +1 -1
- package/es/utils/render-to-container.d.ts +1 -1
- package/es/utils/render.d.ts +1 -1
- package/es/utils/should-render.d.ts +1 -1
- package/es/utils/traverse-react-node.d.ts +1 -1
- package/es/utils/with-stop-propagation.d.ts +2 -1
- package/package.json +3 -2
- package/umd/antd-mobile.js +1 -1
|
@@ -181,6 +181,10 @@ function __spreadArray(to2, from, pack) {
|
|
|
181
181
|
}
|
|
182
182
|
return to2.concat(ar || Array.prototype.slice.call(from));
|
|
183
183
|
}
|
|
184
|
+
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
185
|
+
var e2 = new Error(message);
|
|
186
|
+
return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
|
|
187
|
+
};
|
|
184
188
|
function mergeLocale(base2, patch) {
|
|
185
189
|
function merge2(a, b) {
|
|
186
190
|
if (typeof a !== "object" || typeof b !== "object" || Array.isArray(a) || Array.isArray(b)) {
|
|
@@ -206,6 +210,11 @@ const base = {
|
|
|
206
210
|
close: "Close"
|
|
207
211
|
},
|
|
208
212
|
Calendar: {
|
|
213
|
+
title: "Date selection",
|
|
214
|
+
confirm: "Confirm",
|
|
215
|
+
start: "start",
|
|
216
|
+
end: "end",
|
|
217
|
+
today: "today",
|
|
209
218
|
markItems: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
210
219
|
yearAndMonth: "${year}/${month}"
|
|
211
220
|
},
|
|
@@ -340,6 +349,11 @@ const zhCN = mergeLocale(base, {
|
|
|
340
349
|
close: "\u5173\u95ED"
|
|
341
350
|
},
|
|
342
351
|
Calendar: {
|
|
352
|
+
title: "\u65E5\u671F\u9009\u62E9",
|
|
353
|
+
confirm: "\u786E\u8BA4",
|
|
354
|
+
start: "\u5F00\u59CB",
|
|
355
|
+
end: "\u7ED3\u675F",
|
|
356
|
+
today: "\u4ECA\u65E5",
|
|
343
357
|
markItems: ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u65E5"],
|
|
344
358
|
yearAndMonth: "${year}\u5E74${month}\u6708"
|
|
345
359
|
},
|
|
@@ -1386,7 +1400,7 @@ var dayjs_min = { exports: {} };
|
|
|
1386
1400
|
!function(t, e2) {
|
|
1387
1401
|
module.exports = e2();
|
|
1388
1402
|
}(commonjsGlobal, function() {
|
|
1389
|
-
var t = 1e3, e2 = 6e4, n2 = 36e5, r = "millisecond", i2 = "second", s = "minute", u = "hour", a = "day", o = "week",
|
|
1403
|
+
var t = 1e3, e2 = 6e4, n2 = 36e5, r = "millisecond", i2 = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
1390
1404
|
var e3 = ["th", "st", "nd", "rd"], n3 = t2 % 100;
|
|
1391
1405
|
return "[" + t2 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
|
|
1392
1406
|
} }, m = function(t2, e3, n3) {
|
|
@@ -1398,18 +1412,18 @@ var dayjs_min = { exports: {} };
|
|
|
1398
1412
|
}, m: function t2(e3, n3) {
|
|
1399
1413
|
if (e3.date() < n3.date())
|
|
1400
1414
|
return -t2(n3, e3);
|
|
1401
|
-
var r2 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r2,
|
|
1415
|
+
var r2 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r2, c), s2 = n3 - i3 < 0, u2 = e3.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
1402
1416
|
return +(-(r2 + (n3 - i3) / (s2 ? i3 - u2 : u2 - i3)) || 0);
|
|
1403
1417
|
}, a: function(t2) {
|
|
1404
1418
|
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
1405
1419
|
}, p: function(t2) {
|
|
1406
|
-
return { M:
|
|
1420
|
+
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i2, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
1407
1421
|
}, u: function(t2) {
|
|
1408
1422
|
return void 0 === t2;
|
|
1409
1423
|
} }, g = "en", D = {};
|
|
1410
1424
|
D[g] = M;
|
|
1411
1425
|
var p = function(t2) {
|
|
1412
|
-
return t2 instanceof
|
|
1426
|
+
return t2 instanceof b;
|
|
1413
1427
|
}, S = function t2(e3, n3, r2) {
|
|
1414
1428
|
var i3;
|
|
1415
1429
|
if (!e3)
|
|
@@ -1429,12 +1443,12 @@ var dayjs_min = { exports: {} };
|
|
|
1429
1443
|
if (p(t2))
|
|
1430
1444
|
return t2.clone();
|
|
1431
1445
|
var n3 = "object" == typeof e3 ? e3 : {};
|
|
1432
|
-
return n3.date = t2, n3.args = arguments, new
|
|
1446
|
+
return n3.date = t2, n3.args = arguments, new b(n3);
|
|
1433
1447
|
}, O = v;
|
|
1434
1448
|
O.l = S, O.i = p, O.w = function(t2, e3) {
|
|
1435
1449
|
return w(t2, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
|
|
1436
1450
|
};
|
|
1437
|
-
var
|
|
1451
|
+
var b = function() {
|
|
1438
1452
|
function M2(t2) {
|
|
1439
1453
|
this.$L = S(t2.locale, null, true), this.parse(t2);
|
|
1440
1454
|
}
|
|
@@ -1478,16 +1492,16 @@ var dayjs_min = { exports: {} };
|
|
|
1478
1492
|
}, m2.valueOf = function() {
|
|
1479
1493
|
return this.$d.getTime();
|
|
1480
1494
|
}, m2.startOf = function(t2, e3) {
|
|
1481
|
-
var n3 = this, r2 = !!O.u(e3) || e3,
|
|
1495
|
+
var n3 = this, r2 = !!O.u(e3) || e3, f2 = O.p(t2), l2 = function(t3, e4) {
|
|
1482
1496
|
var i3 = O.w(n3.$u ? Date.UTC(n3.$y, e4, t3) : new Date(n3.$y, e4, t3), n3);
|
|
1483
1497
|
return r2 ? i3 : i3.endOf(a);
|
|
1484
1498
|
}, $2 = function(t3, e4) {
|
|
1485
1499
|
return O.w(n3.toDate()[t3].apply(n3.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
|
|
1486
1500
|
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
1487
|
-
switch (
|
|
1488
|
-
case
|
|
1501
|
+
switch (f2) {
|
|
1502
|
+
case h:
|
|
1489
1503
|
return r2 ? l2(1, 0) : l2(31, 11);
|
|
1490
|
-
case
|
|
1504
|
+
case c:
|
|
1491
1505
|
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
1492
1506
|
case o:
|
|
1493
1507
|
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
@@ -1507,8 +1521,8 @@ var dayjs_min = { exports: {} };
|
|
|
1507
1521
|
}, m2.endOf = function(t2) {
|
|
1508
1522
|
return this.startOf(t2, false);
|
|
1509
1523
|
}, m2.$set = function(t2, e3) {
|
|
1510
|
-
var n3, o2 = O.p(t2),
|
|
1511
|
-
if (o2 ===
|
|
1524
|
+
var n3, o2 = O.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a] = f2 + "Date", n3[d] = f2 + "Date", n3[c] = f2 + "Month", n3[h] = f2 + "FullYear", n3[u] = f2 + "Hours", n3[s] = f2 + "Minutes", n3[i2] = f2 + "Seconds", n3[r] = f2 + "Milliseconds", n3)[o2], $2 = o2 === a ? this.$D + (e3 - this.$W) : e3;
|
|
1525
|
+
if (o2 === c || o2 === h) {
|
|
1512
1526
|
var y2 = this.clone().set(d, 1);
|
|
1513
1527
|
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
1514
1528
|
} else
|
|
@@ -1518,17 +1532,17 @@ var dayjs_min = { exports: {} };
|
|
|
1518
1532
|
return this.clone().$set(t2, e3);
|
|
1519
1533
|
}, m2.get = function(t2) {
|
|
1520
1534
|
return this[O.p(t2)]();
|
|
1521
|
-
}, m2.add = function(r2,
|
|
1535
|
+
}, m2.add = function(r2, f2) {
|
|
1522
1536
|
var d2, l2 = this;
|
|
1523
1537
|
r2 = Number(r2);
|
|
1524
|
-
var $2 = O.p(
|
|
1538
|
+
var $2 = O.p(f2), y2 = function(t2) {
|
|
1525
1539
|
var e3 = w(l2);
|
|
1526
1540
|
return O.w(e3.date(e3.date() + Math.round(t2 * r2)), l2);
|
|
1527
1541
|
};
|
|
1528
|
-
if ($2 === f)
|
|
1529
|
-
return this.set(f, this.$M + r2);
|
|
1530
1542
|
if ($2 === c)
|
|
1531
|
-
return this.set(c, this.$
|
|
1543
|
+
return this.set(c, this.$M + r2);
|
|
1544
|
+
if ($2 === h)
|
|
1545
|
+
return this.set(h, this.$y + r2);
|
|
1532
1546
|
if ($2 === a)
|
|
1533
1547
|
return y2(1);
|
|
1534
1548
|
if ($2 === o)
|
|
@@ -1541,24 +1555,106 @@ var dayjs_min = { exports: {} };
|
|
|
1541
1555
|
var e3 = this, n3 = this.$locale();
|
|
1542
1556
|
if (!this.isValid())
|
|
1543
1557
|
return n3.invalidDate || l;
|
|
1544
|
-
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i3 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n3.weekdays,
|
|
1558
|
+
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i3 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n3.weekdays, c6 = n3.months, f2 = n3.meridiem, h2 = function(t3, n4, i4, s3) {
|
|
1545
1559
|
return t3 && (t3[n4] || t3(e3, r2)) || i4[n4].slice(0, s3);
|
|
1546
|
-
},
|
|
1560
|
+
}, d2 = function(t3) {
|
|
1547
1561
|
return O.s(s2 % 12 || 12, t3, "0");
|
|
1548
|
-
},
|
|
1562
|
+
}, $2 = f2 || function(t3, e4, n4) {
|
|
1549
1563
|
var r3 = t3 < 12 ? "AM" : "PM";
|
|
1550
1564
|
return n4 ? r3.toLowerCase() : r3;
|
|
1551
|
-
}
|
|
1552
|
-
return r2.replace(y, function(t3,
|
|
1553
|
-
return
|
|
1565
|
+
};
|
|
1566
|
+
return r2.replace(y, function(t3, r3) {
|
|
1567
|
+
return r3 || function(t4) {
|
|
1568
|
+
switch (t4) {
|
|
1569
|
+
case "YY":
|
|
1570
|
+
return String(e3.$y).slice(-2);
|
|
1571
|
+
case "YYYY":
|
|
1572
|
+
return O.s(e3.$y, 4, "0");
|
|
1573
|
+
case "M":
|
|
1574
|
+
return a2 + 1;
|
|
1575
|
+
case "MM":
|
|
1576
|
+
return O.s(a2 + 1, 2, "0");
|
|
1577
|
+
case "MMM":
|
|
1578
|
+
return h2(n3.monthsShort, a2, c6, 3);
|
|
1579
|
+
case "MMMM":
|
|
1580
|
+
return h2(c6, a2);
|
|
1581
|
+
case "D":
|
|
1582
|
+
return e3.$D;
|
|
1583
|
+
case "DD":
|
|
1584
|
+
return O.s(e3.$D, 2, "0");
|
|
1585
|
+
case "d":
|
|
1586
|
+
return String(e3.$W);
|
|
1587
|
+
case "dd":
|
|
1588
|
+
return h2(n3.weekdaysMin, e3.$W, o2, 2);
|
|
1589
|
+
case "ddd":
|
|
1590
|
+
return h2(n3.weekdaysShort, e3.$W, o2, 3);
|
|
1591
|
+
case "dddd":
|
|
1592
|
+
return o2[e3.$W];
|
|
1593
|
+
case "H":
|
|
1594
|
+
return String(s2);
|
|
1595
|
+
case "HH":
|
|
1596
|
+
return O.s(s2, 2, "0");
|
|
1597
|
+
case "h":
|
|
1598
|
+
return d2(1);
|
|
1599
|
+
case "hh":
|
|
1600
|
+
return d2(2);
|
|
1601
|
+
case "a":
|
|
1602
|
+
return $2(s2, u2, true);
|
|
1603
|
+
case "A":
|
|
1604
|
+
return $2(s2, u2, false);
|
|
1605
|
+
case "m":
|
|
1606
|
+
return String(u2);
|
|
1607
|
+
case "mm":
|
|
1608
|
+
return O.s(u2, 2, "0");
|
|
1609
|
+
case "s":
|
|
1610
|
+
return String(e3.$s);
|
|
1611
|
+
case "ss":
|
|
1612
|
+
return O.s(e3.$s, 2, "0");
|
|
1613
|
+
case "SSS":
|
|
1614
|
+
return O.s(e3.$ms, 3, "0");
|
|
1615
|
+
case "Z":
|
|
1616
|
+
return i3;
|
|
1617
|
+
}
|
|
1618
|
+
return null;
|
|
1619
|
+
}(t3) || i3.replace(":", "");
|
|
1554
1620
|
});
|
|
1555
1621
|
}, m2.utcOffset = function() {
|
|
1556
1622
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1557
1623
|
}, m2.diff = function(r2, d2, l2) {
|
|
1558
|
-
var $2, y2 = O.p(d2),
|
|
1559
|
-
|
|
1624
|
+
var $2, y2 = this, M3 = O.p(d2), m3 = w(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e2, g2 = this - m3, D2 = function() {
|
|
1625
|
+
return O.m(y2, m3);
|
|
1626
|
+
};
|
|
1627
|
+
switch (M3) {
|
|
1628
|
+
case h:
|
|
1629
|
+
$2 = D2() / 12;
|
|
1630
|
+
break;
|
|
1631
|
+
case c:
|
|
1632
|
+
$2 = D2();
|
|
1633
|
+
break;
|
|
1634
|
+
case f:
|
|
1635
|
+
$2 = D2() / 3;
|
|
1636
|
+
break;
|
|
1637
|
+
case o:
|
|
1638
|
+
$2 = (g2 - v2) / 6048e5;
|
|
1639
|
+
break;
|
|
1640
|
+
case a:
|
|
1641
|
+
$2 = (g2 - v2) / 864e5;
|
|
1642
|
+
break;
|
|
1643
|
+
case u:
|
|
1644
|
+
$2 = g2 / n2;
|
|
1645
|
+
break;
|
|
1646
|
+
case s:
|
|
1647
|
+
$2 = g2 / e2;
|
|
1648
|
+
break;
|
|
1649
|
+
case i2:
|
|
1650
|
+
$2 = g2 / t;
|
|
1651
|
+
break;
|
|
1652
|
+
default:
|
|
1653
|
+
$2 = g2;
|
|
1654
|
+
}
|
|
1655
|
+
return l2 ? $2 : O.a($2);
|
|
1560
1656
|
}, m2.daysInMonth = function() {
|
|
1561
|
-
return this.endOf(
|
|
1657
|
+
return this.endOf(c).$D;
|
|
1562
1658
|
}, m2.$locale = function() {
|
|
1563
1659
|
return D[this.$L];
|
|
1564
1660
|
}, m2.locale = function(t2, e3) {
|
|
@@ -1577,13 +1673,13 @@ var dayjs_min = { exports: {} };
|
|
|
1577
1673
|
}, m2.toString = function() {
|
|
1578
1674
|
return this.$d.toUTCString();
|
|
1579
1675
|
}, M2;
|
|
1580
|
-
}(),
|
|
1581
|
-
return w.prototype =
|
|
1582
|
-
|
|
1676
|
+
}(), _ = b.prototype;
|
|
1677
|
+
return w.prototype = _, [["$ms", r], ["$s", i2], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
|
|
1678
|
+
_[t2[1]] = function(e3) {
|
|
1583
1679
|
return this.$g(e3, t2[0], t2[1]);
|
|
1584
1680
|
};
|
|
1585
1681
|
}), w.extend = function(t2, e3) {
|
|
1586
|
-
return t2.$i || (t2(e3,
|
|
1682
|
+
return t2.$i || (t2(e3, b, w), t2.$i = true), w;
|
|
1587
1683
|
}, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
|
|
1588
1684
|
return w(1e3 * t2);
|
|
1589
1685
|
}, w.en = D[g], w.Ls = D, w.p = {}, w;
|
|
@@ -2842,6 +2938,27 @@ function useRafState(initialState) {
|
|
|
2842
2938
|
});
|
|
2843
2939
|
return [state, setRafState];
|
|
2844
2940
|
}
|
|
2941
|
+
var overArg = _overArg;
|
|
2942
|
+
var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
|
|
2943
|
+
var _getPrototype = getPrototype$2;
|
|
2944
|
+
var baseGetTag = _baseGetTag, getPrototype$1 = _getPrototype, isObjectLike$1 = isObjectLike_1;
|
|
2945
|
+
var objectTag = "[object Object]";
|
|
2946
|
+
var funcProto = Function.prototype, objectProto$1 = Object.prototype;
|
|
2947
|
+
var funcToString = funcProto.toString;
|
|
2948
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
2949
|
+
var objectCtorString = funcToString.call(Object);
|
|
2950
|
+
function isPlainObject$1(value) {
|
|
2951
|
+
if (!isObjectLike$1(value) || baseGetTag(value) != objectTag) {
|
|
2952
|
+
return false;
|
|
2953
|
+
}
|
|
2954
|
+
var proto = getPrototype$1(value);
|
|
2955
|
+
if (proto === null) {
|
|
2956
|
+
return true;
|
|
2957
|
+
}
|
|
2958
|
+
var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor;
|
|
2959
|
+
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
2960
|
+
}
|
|
2961
|
+
var isPlainObject_1 = isPlainObject$1;
|
|
2845
2962
|
var useUnmountedRef = function() {
|
|
2846
2963
|
var unmountedRef = useRef(false);
|
|
2847
2964
|
useEffect(function() {
|
|
@@ -3890,7 +4007,7 @@ function findIndex(arr, test) {
|
|
|
3890
4007
|
const index2 = arr.findIndex(test);
|
|
3891
4008
|
return index2 < 0 ? arr.length : index2;
|
|
3892
4009
|
}
|
|
3893
|
-
const clamp$
|
|
4010
|
+
const clamp$2 = (min2, max2, v) => Math.min(Math.max(v, min2), max2);
|
|
3894
4011
|
const colors = {
|
|
3895
4012
|
transparent: 0,
|
|
3896
4013
|
aliceblue: 4042850303,
|
|
@@ -4216,7 +4333,7 @@ const steps$1 = (steps2, direction = "end") => (progress) => {
|
|
|
4216
4333
|
progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 1e-3);
|
|
4217
4334
|
const expanded = progress * steps2;
|
|
4218
4335
|
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
|
|
4219
|
-
return clamp$
|
|
4336
|
+
return clamp$2(0, 1, rounded / steps2);
|
|
4220
4337
|
};
|
|
4221
4338
|
const c1 = 1.70158;
|
|
4222
4339
|
const c2 = c1 * 1.525;
|
|
@@ -6804,7 +6921,7 @@ function withStopPropagation(events, element) {
|
|
|
6804
6921
|
}
|
|
6805
6922
|
return React__default.cloneElement(element, props);
|
|
6806
6923
|
}
|
|
6807
|
-
const classPrefix$
|
|
6924
|
+
const classPrefix$1p = `adm-mask`;
|
|
6808
6925
|
const opacityRecord = {
|
|
6809
6926
|
default: 0.55,
|
|
6810
6927
|
thin: 0.35,
|
|
@@ -6814,7 +6931,7 @@ const colorRecord$4 = {
|
|
|
6814
6931
|
black: "0, 0, 0",
|
|
6815
6932
|
white: "255, 255, 255"
|
|
6816
6933
|
};
|
|
6817
|
-
const defaultProps$
|
|
6934
|
+
const defaultProps$15 = {
|
|
6818
6935
|
visible: true,
|
|
6819
6936
|
destroyOnClose: false,
|
|
6820
6937
|
forceRender: false,
|
|
@@ -6825,7 +6942,7 @@ const defaultProps$13 = {
|
|
|
6825
6942
|
stopPropagation: ["click"]
|
|
6826
6943
|
};
|
|
6827
6944
|
const Mask$1 = (p) => {
|
|
6828
|
-
const props = mergeProps(defaultProps$
|
|
6945
|
+
const props = mergeProps(defaultProps$15, p);
|
|
6829
6946
|
const {
|
|
6830
6947
|
locale
|
|
6831
6948
|
} = useConfig();
|
|
@@ -6866,7 +6983,7 @@ const Mask$1 = (p) => {
|
|
|
6866
6983
|
}
|
|
6867
6984
|
});
|
|
6868
6985
|
const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React__default.createElement(animated.div, {
|
|
6869
|
-
className: classPrefix$
|
|
6986
|
+
className: classPrefix$1p,
|
|
6870
6987
|
ref,
|
|
6871
6988
|
style: Object.assign(Object.assign({}, props.style), {
|
|
6872
6989
|
background,
|
|
@@ -6880,12 +6997,12 @@ const Mask$1 = (p) => {
|
|
|
6880
6997
|
}
|
|
6881
6998
|
}
|
|
6882
6999
|
}, props.onMaskClick && React__default.createElement("div", {
|
|
6883
|
-
className: `${classPrefix$
|
|
7000
|
+
className: `${classPrefix$1p}-aria-button`,
|
|
6884
7001
|
role: "button",
|
|
6885
7002
|
"aria-label": locale.Mask.name,
|
|
6886
7003
|
onClick: props.onMaskClick
|
|
6887
7004
|
}), React__default.createElement("div", {
|
|
6888
|
-
className: `${classPrefix$
|
|
7005
|
+
className: `${classPrefix$1p}-content`
|
|
6889
7006
|
}, props.children))));
|
|
6890
7007
|
return React__default.createElement(ShouldRender, {
|
|
6891
7008
|
active,
|
|
@@ -7503,7 +7620,7 @@ function useInnerVisible(outerVisible) {
|
|
|
7503
7620
|
}, [outerVisible]);
|
|
7504
7621
|
return innerVisible;
|
|
7505
7622
|
}
|
|
7506
|
-
function clamp(v, min2, max2) {
|
|
7623
|
+
function clamp$1(v, min2, max2) {
|
|
7507
7624
|
return Math.max(min2, Math.min(v, max2));
|
|
7508
7625
|
}
|
|
7509
7626
|
const V = {
|
|
@@ -7534,7 +7651,7 @@ function rubberband$1(distance, dimension, constant2) {
|
|
|
7534
7651
|
}
|
|
7535
7652
|
function rubberbandIfOutOfBounds$1(position, min2, max2, constant2 = 0.15) {
|
|
7536
7653
|
if (constant2 === 0)
|
|
7537
|
-
return clamp(position, min2, max2);
|
|
7654
|
+
return clamp$1(position, min2, max2);
|
|
7538
7655
|
if (position < min2)
|
|
7539
7656
|
return -rubberband$1(min2 - position, max2 - min2, constant2) + min2;
|
|
7540
7657
|
if (position > max2)
|
|
@@ -7545,7 +7662,24 @@ function computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {
|
|
|
7545
7662
|
const [[X0, X1], [Y0, Y1]] = bounds;
|
|
7546
7663
|
return [rubberbandIfOutOfBounds$1(Vx, X0, X1, Rx), rubberbandIfOutOfBounds$1(Vy, Y0, Y1, Ry)];
|
|
7547
7664
|
}
|
|
7665
|
+
function _toPrimitive$1(input2, hint) {
|
|
7666
|
+
if (typeof input2 !== "object" || input2 === null)
|
|
7667
|
+
return input2;
|
|
7668
|
+
var prim = input2[Symbol.toPrimitive];
|
|
7669
|
+
if (prim !== void 0) {
|
|
7670
|
+
var res = prim.call(input2, hint || "default");
|
|
7671
|
+
if (typeof res !== "object")
|
|
7672
|
+
return res;
|
|
7673
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7674
|
+
}
|
|
7675
|
+
return (hint === "string" ? String : Number)(input2);
|
|
7676
|
+
}
|
|
7677
|
+
function _toPropertyKey$1(arg) {
|
|
7678
|
+
var key = _toPrimitive$1(arg, "string");
|
|
7679
|
+
return typeof key === "symbol" ? key : String(key);
|
|
7680
|
+
}
|
|
7548
7681
|
function _defineProperty$1(obj, key, value) {
|
|
7682
|
+
key = _toPropertyKey$1(key);
|
|
7549
7683
|
if (key in obj) {
|
|
7550
7684
|
Object.defineProperty(obj, key, {
|
|
7551
7685
|
value,
|
|
@@ -7558,26 +7692,26 @@ function _defineProperty$1(obj, key, value) {
|
|
|
7558
7692
|
}
|
|
7559
7693
|
return obj;
|
|
7560
7694
|
}
|
|
7561
|
-
function ownKeys$1(
|
|
7562
|
-
var
|
|
7695
|
+
function ownKeys$1(e2, r) {
|
|
7696
|
+
var t = Object.keys(e2);
|
|
7563
7697
|
if (Object.getOwnPropertySymbols) {
|
|
7564
|
-
var
|
|
7565
|
-
|
|
7566
|
-
return Object.getOwnPropertyDescriptor(
|
|
7567
|
-
})),
|
|
7568
|
-
}
|
|
7569
|
-
return
|
|
7570
|
-
}
|
|
7571
|
-
function _objectSpread2$1(
|
|
7572
|
-
for (var
|
|
7573
|
-
var
|
|
7574
|
-
|
|
7575
|
-
_defineProperty$1(
|
|
7576
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
7577
|
-
Object.defineProperty(
|
|
7698
|
+
var o = Object.getOwnPropertySymbols(e2);
|
|
7699
|
+
r && (o = o.filter(function(r2) {
|
|
7700
|
+
return Object.getOwnPropertyDescriptor(e2, r2).enumerable;
|
|
7701
|
+
})), t.push.apply(t, o);
|
|
7702
|
+
}
|
|
7703
|
+
return t;
|
|
7704
|
+
}
|
|
7705
|
+
function _objectSpread2$1(e2) {
|
|
7706
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
7707
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
7708
|
+
r % 2 ? ownKeys$1(Object(t), true).forEach(function(r2) {
|
|
7709
|
+
_defineProperty$1(e2, r2, t[r2]);
|
|
7710
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r2) {
|
|
7711
|
+
Object.defineProperty(e2, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
7578
7712
|
});
|
|
7579
7713
|
}
|
|
7580
|
-
return
|
|
7714
|
+
return e2;
|
|
7581
7715
|
}
|
|
7582
7716
|
const EVENT_TYPE_MAP = {
|
|
7583
7717
|
pointer: {
|
|
@@ -7649,7 +7783,7 @@ function getPointerType(event) {
|
|
|
7649
7783
|
function getCurrentTargetTouchList(event) {
|
|
7650
7784
|
return Array.from(event.touches).filter((e2) => {
|
|
7651
7785
|
var _event$currentTarget, _event$currentTarget$;
|
|
7652
|
-
return e2.target === event.currentTarget || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0
|
|
7786
|
+
return e2.target === event.currentTarget || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || (_event$currentTarget$ = _event$currentTarget.contains) === null || _event$currentTarget$ === void 0 ? void 0 : _event$currentTarget$.call(_event$currentTarget, e2.target));
|
|
7653
7787
|
});
|
|
7654
7788
|
}
|
|
7655
7789
|
function getTouchList(event) {
|
|
@@ -7659,18 +7793,22 @@ function getValueEvent(event) {
|
|
|
7659
7793
|
return isTouch(event) ? getTouchList(event)[0] : event;
|
|
7660
7794
|
}
|
|
7661
7795
|
function distanceAngle(P1, P2) {
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7796
|
+
try {
|
|
7797
|
+
const dx = P2.clientX - P1.clientX;
|
|
7798
|
+
const dy = P2.clientY - P1.clientY;
|
|
7799
|
+
const cx = (P2.clientX + P1.clientX) / 2;
|
|
7800
|
+
const cy = (P2.clientY + P1.clientY) / 2;
|
|
7801
|
+
const distance = Math.hypot(dx, dy);
|
|
7802
|
+
const angle = -(Math.atan2(dx, dy) * 180) / Math.PI;
|
|
7803
|
+
const origin = [cx, cy];
|
|
7804
|
+
return {
|
|
7805
|
+
angle,
|
|
7806
|
+
distance,
|
|
7807
|
+
origin
|
|
7808
|
+
};
|
|
7809
|
+
} catch (_unused) {
|
|
7810
|
+
}
|
|
7811
|
+
return null;
|
|
7674
7812
|
}
|
|
7675
7813
|
function touchIds(event) {
|
|
7676
7814
|
return getCurrentTargetTouchList(event).map((touch) => touch.identifier);
|
|
@@ -7806,7 +7944,7 @@ class Engine {
|
|
|
7806
7944
|
state.args = args;
|
|
7807
7945
|
state.axis = void 0;
|
|
7808
7946
|
state.memo = void 0;
|
|
7809
|
-
state.elapsedTime = 0;
|
|
7947
|
+
state.elapsedTime = state.timeDelta = 0;
|
|
7810
7948
|
state.direction = [0, 0];
|
|
7811
7949
|
state.distance = [0, 0];
|
|
7812
7950
|
state.overflow = [0, 0];
|
|
@@ -7827,8 +7965,8 @@ class Engine {
|
|
|
7827
7965
|
state.currentTarget = event.currentTarget;
|
|
7828
7966
|
state.lastOffset = config2.from ? call$2(config2.from, state) : state.offset;
|
|
7829
7967
|
state.offset = state.lastOffset;
|
|
7968
|
+
state.startTime = state.timeStamp = event.timeStamp;
|
|
7830
7969
|
}
|
|
7831
|
-
state.startTime = state.timeStamp = event.timeStamp;
|
|
7832
7970
|
}
|
|
7833
7971
|
computeValues(values) {
|
|
7834
7972
|
const state = this.state;
|
|
@@ -7932,6 +8070,7 @@ class Engine {
|
|
|
7932
8070
|
state._direction = state._delta.map(Math.sign);
|
|
7933
8071
|
if (!state.first && dt > 0) {
|
|
7934
8072
|
state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt];
|
|
8073
|
+
state.timeDelta = dt;
|
|
7935
8074
|
}
|
|
7936
8075
|
}
|
|
7937
8076
|
}
|
|
@@ -8108,12 +8247,11 @@ const coordinatesConfigResolver = _objectSpread2$1(_objectSpread2$1({}, commonCo
|
|
|
8108
8247
|
return [[left, right], [top, bottom]];
|
|
8109
8248
|
}
|
|
8110
8249
|
});
|
|
8111
|
-
const DISPLACEMENT = 10;
|
|
8112
8250
|
const KEYS_DELTA_MAP = {
|
|
8113
|
-
ArrowRight: (factor = 1) => [
|
|
8114
|
-
ArrowLeft: (factor = 1) => [-
|
|
8115
|
-
ArrowUp: (factor = 1) => [0, -
|
|
8116
|
-
ArrowDown: (factor = 1) => [0,
|
|
8251
|
+
ArrowRight: (displacement, factor = 1) => [displacement * factor, 0],
|
|
8252
|
+
ArrowLeft: (displacement, factor = 1) => [-1 * displacement * factor, 0],
|
|
8253
|
+
ArrowUp: (displacement, factor = 1) => [0, -1 * displacement * factor],
|
|
8254
|
+
ArrowDown: (displacement, factor = 1) => [0, displacement * factor]
|
|
8117
8255
|
};
|
|
8118
8256
|
class DragEngine extends CoordinatesEngine {
|
|
8119
8257
|
constructor(...args) {
|
|
@@ -8210,8 +8348,6 @@ class DragEngine extends CoordinatesEngine {
|
|
|
8210
8348
|
const config2 = this.config;
|
|
8211
8349
|
if (!state._pointerActive)
|
|
8212
8350
|
return;
|
|
8213
|
-
if (state.type === event.type && event.timeStamp === state.timeStamp)
|
|
8214
|
-
return;
|
|
8215
8351
|
const id = pointerId(event);
|
|
8216
8352
|
if (state._pointerId !== void 0 && id !== state._pointerId)
|
|
8217
8353
|
return;
|
|
@@ -8276,17 +8412,18 @@ Please upgrade to the latest version.`);
|
|
|
8276
8412
|
if (state.tap && config2.filterTaps) {
|
|
8277
8413
|
state._force = true;
|
|
8278
8414
|
} else {
|
|
8279
|
-
const [
|
|
8280
|
-
const [
|
|
8281
|
-
const [mx, my] = state.movement;
|
|
8415
|
+
const [_dx, _dy] = state._delta;
|
|
8416
|
+
const [_mx, _my] = state._movement;
|
|
8282
8417
|
const [svx, svy] = config2.swipe.velocity;
|
|
8283
8418
|
const [sx, sy] = config2.swipe.distance;
|
|
8284
8419
|
const sdt = config2.swipe.duration;
|
|
8285
8420
|
if (state.elapsedTime < sdt) {
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
if (
|
|
8289
|
-
state.swipe[
|
|
8421
|
+
const _vx = Math.abs(_dx / state.timeDelta);
|
|
8422
|
+
const _vy = Math.abs(_dy / state.timeDelta);
|
|
8423
|
+
if (_vx > svx && Math.abs(_mx) > sx)
|
|
8424
|
+
state.swipe[0] = Math.sign(_dx);
|
|
8425
|
+
if (_vy > svy && Math.abs(_my) > sy)
|
|
8426
|
+
state.swipe[1] = Math.sign(_dy);
|
|
8290
8427
|
}
|
|
8291
8428
|
}
|
|
8292
8429
|
this.emit();
|
|
@@ -8356,7 +8493,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
8356
8493
|
const state = this.state;
|
|
8357
8494
|
const factor = event.shiftKey ? 10 : event.altKey ? 0.1 : 1;
|
|
8358
8495
|
this.start(event);
|
|
8359
|
-
state._delta = deltaFn(factor);
|
|
8496
|
+
state._delta = deltaFn(this.config.keyboardDisplacement, factor);
|
|
8360
8497
|
state._keyboardActive = true;
|
|
8361
8498
|
V.addTo(state._movement, state._delta);
|
|
8362
8499
|
this.compute(event);
|
|
@@ -8418,7 +8555,7 @@ function supportsGestureEvents() {
|
|
|
8418
8555
|
const SUPPORT = {
|
|
8419
8556
|
isBrowser,
|
|
8420
8557
|
gesture: supportsGestureEvents(),
|
|
8421
|
-
touch:
|
|
8558
|
+
touch: supportsTouchEvents(),
|
|
8422
8559
|
touchscreen: isTouchScreen(),
|
|
8423
8560
|
pointer: supportsPointerEvents(),
|
|
8424
8561
|
pointerLock: supportsPointerLock()
|
|
@@ -8428,6 +8565,7 @@ const DEFAULT_DRAG_DELAY = 180;
|
|
|
8428
8565
|
const DEFAULT_SWIPE_VELOCITY = 0.5;
|
|
8429
8566
|
const DEFAULT_SWIPE_DISTANCE = 50;
|
|
8430
8567
|
const DEFAULT_SWIPE_DURATION = 250;
|
|
8568
|
+
const DEFAULT_KEYBOARD_DISPLACEMENT = 10;
|
|
8431
8569
|
const DEFAULT_DRAG_AXIS_THRESHOLD = {
|
|
8432
8570
|
mouse: 0,
|
|
8433
8571
|
touch: 0,
|
|
@@ -8463,15 +8601,14 @@ const dragConfigResolver = _objectSpread2$1(_objectSpread2$1({}, coordinatesConf
|
|
|
8463
8601
|
pointerCapture(_v, _k, {
|
|
8464
8602
|
pointer: {
|
|
8465
8603
|
capture = true,
|
|
8466
|
-
buttons = 1
|
|
8604
|
+
buttons = 1,
|
|
8605
|
+
keys: keys2 = true
|
|
8467
8606
|
} = {}
|
|
8468
8607
|
}) {
|
|
8469
8608
|
this.pointerButtons = buttons;
|
|
8609
|
+
this.keys = keys2;
|
|
8470
8610
|
return !this.pointerLock && this.device === "pointer" && capture;
|
|
8471
8611
|
},
|
|
8472
|
-
keys(value = true) {
|
|
8473
|
-
return value;
|
|
8474
|
-
},
|
|
8475
8612
|
threshold(value, _k, {
|
|
8476
8613
|
filterTaps = false,
|
|
8477
8614
|
tapsThreshold = 3,
|
|
@@ -8507,6 +8644,9 @@ const dragConfigResolver = _objectSpread2$1(_objectSpread2$1({}, coordinatesConf
|
|
|
8507
8644
|
if (!value)
|
|
8508
8645
|
return DEFAULT_DRAG_AXIS_THRESHOLD;
|
|
8509
8646
|
return _objectSpread2$1(_objectSpread2$1({}, DEFAULT_DRAG_AXIS_THRESHOLD), value);
|
|
8647
|
+
},
|
|
8648
|
+
keyboardDisplacement(value = DEFAULT_KEYBOARD_DISPLACEMENT) {
|
|
8649
|
+
return value;
|
|
8510
8650
|
}
|
|
8511
8651
|
});
|
|
8512
8652
|
{
|
|
@@ -8543,6 +8683,17 @@ const dragConfigResolver = _objectSpread2$1(_objectSpread2$1({}, coordinatesConf
|
|
|
8543
8683
|
}
|
|
8544
8684
|
});
|
|
8545
8685
|
}
|
|
8686
|
+
function clampStateInternalMovementToBounds(state) {
|
|
8687
|
+
const [ox, oy] = state.overflow;
|
|
8688
|
+
const [dx, dy] = state._delta;
|
|
8689
|
+
const [dirx, diry] = state._direction;
|
|
8690
|
+
if (ox < 0 && dx > 0 && dirx < 0 || ox > 0 && dx < 0 && dirx > 0) {
|
|
8691
|
+
state._movement[0] = state._movementBound[0];
|
|
8692
|
+
}
|
|
8693
|
+
if (oy < 0 && dy > 0 && diry < 0 || oy > 0 && dy < 0 && diry > 0) {
|
|
8694
|
+
state._movement[1] = state._movementBound[1];
|
|
8695
|
+
}
|
|
8696
|
+
}
|
|
8546
8697
|
const SCALE_ANGLE_RATIO_INTENT_DEG = 30;
|
|
8547
8698
|
const PINCH_WHEEL_RATIO = 100;
|
|
8548
8699
|
class PinchEngine extends Engine {
|
|
@@ -8626,6 +8777,8 @@ class PinchEngine extends Engine {
|
|
|
8626
8777
|
this.start(event);
|
|
8627
8778
|
state._touchIds = Array.from(ctrlTouchIds).slice(0, 2);
|
|
8628
8779
|
const payload = touchDistanceAngle(event, state._touchIds);
|
|
8780
|
+
if (!payload)
|
|
8781
|
+
return;
|
|
8629
8782
|
this.pinchStart(event, payload);
|
|
8630
8783
|
}
|
|
8631
8784
|
pointerStart(event) {
|
|
@@ -8647,6 +8800,8 @@ class PinchEngine extends Engine {
|
|
|
8647
8800
|
return;
|
|
8648
8801
|
this.start(event);
|
|
8649
8802
|
const payload = distanceAngle(...Array.from(_pointerEvents.values()));
|
|
8803
|
+
if (!payload)
|
|
8804
|
+
return;
|
|
8650
8805
|
this.pinchStart(event, payload);
|
|
8651
8806
|
}
|
|
8652
8807
|
pinchStart(event, payload) {
|
|
@@ -8661,6 +8816,8 @@ class PinchEngine extends Engine {
|
|
|
8661
8816
|
if (!this.state._active)
|
|
8662
8817
|
return;
|
|
8663
8818
|
const payload = touchDistanceAngle(event, this.state._touchIds);
|
|
8819
|
+
if (!payload)
|
|
8820
|
+
return;
|
|
8664
8821
|
this.pinchMove(event, payload);
|
|
8665
8822
|
}
|
|
8666
8823
|
pointerMove(event) {
|
|
@@ -8671,6 +8828,8 @@ class PinchEngine extends Engine {
|
|
|
8671
8828
|
if (!this.state._active)
|
|
8672
8829
|
return;
|
|
8673
8830
|
const payload = distanceAngle(...Array.from(_pointerEvents.values()));
|
|
8831
|
+
if (!payload)
|
|
8832
|
+
return;
|
|
8674
8833
|
this.pinchMove(event, payload);
|
|
8675
8834
|
}
|
|
8676
8835
|
pinchMove(event, payload) {
|
|
@@ -8750,7 +8909,7 @@ class PinchEngine extends Engine {
|
|
|
8750
8909
|
}
|
|
8751
8910
|
wheel(event) {
|
|
8752
8911
|
const modifierKey = this.config.modifierKey;
|
|
8753
|
-
if (modifierKey && !event[modifierKey])
|
|
8912
|
+
if (modifierKey && (Array.isArray(modifierKey) ? !modifierKey.find((k) => event[k]) : !event[modifierKey]))
|
|
8754
8913
|
return;
|
|
8755
8914
|
if (!this.state._active)
|
|
8756
8915
|
this.wheelStart(event);
|
|
@@ -8777,6 +8936,7 @@ This message will only appear in development mode.`);
|
|
|
8777
8936
|
const state = this.state;
|
|
8778
8937
|
state._delta = [-wheelValues(event)[1] / PINCH_WHEEL_RATIO * state.offset[0], 0];
|
|
8779
8938
|
V.addTo(state._movement, state._delta);
|
|
8939
|
+
clampStateInternalMovementToBounds(state);
|
|
8780
8940
|
this.state.origin = [event.clientX, event.clientY];
|
|
8781
8941
|
this.compute(event);
|
|
8782
8942
|
this.emit();
|
|
@@ -8795,10 +8955,13 @@ This message will only appear in development mode.`);
|
|
|
8795
8955
|
bindFunction(device, "change", this[device + "Move"].bind(this));
|
|
8796
8956
|
bindFunction(device, "end", this[device + "End"].bind(this));
|
|
8797
8957
|
bindFunction(device, "cancel", this[device + "End"].bind(this));
|
|
8958
|
+
bindFunction("lostPointerCapture", "", this[device + "End"].bind(this));
|
|
8959
|
+
}
|
|
8960
|
+
if (this.config.pinchOnWheel) {
|
|
8961
|
+
bindFunction("wheel", "", this.wheel.bind(this), {
|
|
8962
|
+
passive: false
|
|
8963
|
+
});
|
|
8798
8964
|
}
|
|
8799
|
-
bindFunction("wheel", "", this.wheel.bind(this), {
|
|
8800
|
-
passive: false
|
|
8801
|
-
});
|
|
8802
8965
|
}
|
|
8803
8966
|
}
|
|
8804
8967
|
const pinchConfigResolver = _objectSpread2$1(_objectSpread2$1({}, commonConfigResolver), {}, {
|
|
@@ -8851,6 +9014,9 @@ const pinchConfigResolver = _objectSpread2$1(_objectSpread2$1({}, commonConfigRe
|
|
|
8851
9014
|
if (value === void 0)
|
|
8852
9015
|
return "ctrlKey";
|
|
8853
9016
|
return value;
|
|
9017
|
+
},
|
|
9018
|
+
pinchOnWheel(value = true) {
|
|
9019
|
+
return value;
|
|
8854
9020
|
}
|
|
8855
9021
|
});
|
|
8856
9022
|
_objectSpread2$1(_objectSpread2$1({}, coordinatesConfigResolver), {}, {
|
|
@@ -8871,15 +9037,7 @@ class WheelEngine extends CoordinatesEngine {
|
|
|
8871
9037
|
const state = this.state;
|
|
8872
9038
|
state._delta = wheelValues(event);
|
|
8873
9039
|
V.addTo(state._movement, state._delta);
|
|
8874
|
-
|
|
8875
|
-
const [dx, dy] = state._delta;
|
|
8876
|
-
const [dirx, diry] = state._direction;
|
|
8877
|
-
if (ox < 0 && dx > 0 && dirx < 0 || ox > 0 && dx < 0 && dirx > 0) {
|
|
8878
|
-
state._movement[0] = state._movementBound[0];
|
|
8879
|
-
}
|
|
8880
|
-
if (oy < 0 && dy > 0 && diry < 0 || oy > 0 && dy < 0 && diry > 0) {
|
|
8881
|
-
state._movement[1] = state._movementBound[1];
|
|
8882
|
-
}
|
|
9040
|
+
clampStateInternalMovementToBounds(state);
|
|
8883
9041
|
this.compute(event);
|
|
8884
9042
|
this.emit();
|
|
8885
9043
|
}
|
|
@@ -9297,14 +9455,14 @@ function createUseGesture(actions) {
|
|
|
9297
9455
|
return useRecognizers(handlers, config2, void 0, nativeHandlers);
|
|
9298
9456
|
};
|
|
9299
9457
|
}
|
|
9300
|
-
const classPrefix$
|
|
9301
|
-
const defaultProps$
|
|
9458
|
+
const classPrefix$1o = `adm-popup`;
|
|
9459
|
+
const defaultProps$14 = Object.assign(Object.assign({}, defaultPopupBaseProps), {
|
|
9302
9460
|
closeOnSwipe: false,
|
|
9303
9461
|
position: "bottom"
|
|
9304
9462
|
});
|
|
9305
9463
|
const Popup$1 = (p) => {
|
|
9306
|
-
const props = mergeProps(defaultProps$
|
|
9307
|
-
const bodyCls = classNames(`${classPrefix$
|
|
9464
|
+
const props = mergeProps(defaultProps$14, p);
|
|
9465
|
+
const bodyCls = classNames(`${classPrefix$1o}-body`, props.bodyClassName, `${classPrefix$1o}-body-position-${props.position}`);
|
|
9308
9466
|
const {
|
|
9309
9467
|
locale
|
|
9310
9468
|
} = useConfig();
|
|
@@ -9354,7 +9512,7 @@ const Popup$1 = (p) => {
|
|
|
9354
9512
|
});
|
|
9355
9513
|
const maskVisible = useInnerVisible(active && props.visible);
|
|
9356
9514
|
const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React__default.createElement("div", Object.assign({
|
|
9357
|
-
className: classPrefix$
|
|
9515
|
+
className: classPrefix$1o,
|
|
9358
9516
|
onClick: props.onClick,
|
|
9359
9517
|
style: {
|
|
9360
9518
|
display: active ? void 0 : "none",
|
|
@@ -9396,7 +9554,7 @@ const Popup$1 = (p) => {
|
|
|
9396
9554
|
}),
|
|
9397
9555
|
ref
|
|
9398
9556
|
}, props.showCloseButton && React__default.createElement("a", {
|
|
9399
|
-
className: classNames(`${classPrefix$
|
|
9557
|
+
className: classNames(`${classPrefix$1o}-close-icon`, "adm-plain-anchor"),
|
|
9400
9558
|
onClick: () => {
|
|
9401
9559
|
var _a;
|
|
9402
9560
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
@@ -9412,10 +9570,10 @@ const Popup$1 = (p) => {
|
|
|
9412
9570
|
};
|
|
9413
9571
|
const Popup = Popup$1;
|
|
9414
9572
|
const safeArea = "";
|
|
9415
|
-
const classPrefix$
|
|
9573
|
+
const classPrefix$1n = "adm-safe-area";
|
|
9416
9574
|
const SafeArea$1 = (props) => {
|
|
9417
9575
|
return withNativeProps(props, React__default.createElement("div", {
|
|
9418
|
-
className: classNames(classPrefix$
|
|
9576
|
+
className: classNames(classPrefix$1n, `${classPrefix$1n}-position-${props.position}`)
|
|
9419
9577
|
}));
|
|
9420
9578
|
};
|
|
9421
9579
|
const SafeArea = SafeArea$1;
|
|
@@ -9548,8 +9706,8 @@ function renderImperatively(element) {
|
|
|
9548
9706
|
}
|
|
9549
9707
|
};
|
|
9550
9708
|
}
|
|
9551
|
-
const classPrefix$
|
|
9552
|
-
const defaultProps$
|
|
9709
|
+
const classPrefix$1m = `adm-action-sheet`;
|
|
9710
|
+
const defaultProps$13 = {
|
|
9553
9711
|
visible: false,
|
|
9554
9712
|
actions: [],
|
|
9555
9713
|
cancelText: "",
|
|
@@ -9560,7 +9718,10 @@ const defaultProps$11 = {
|
|
|
9560
9718
|
forceRender: false
|
|
9561
9719
|
};
|
|
9562
9720
|
const ActionSheet = (p) => {
|
|
9563
|
-
const props = mergeProps(defaultProps$
|
|
9721
|
+
const props = mergeProps(defaultProps$13, p);
|
|
9722
|
+
const {
|
|
9723
|
+
styles
|
|
9724
|
+
} = props;
|
|
9564
9725
|
return React__default.createElement(Popup, {
|
|
9565
9726
|
visible: props.visible,
|
|
9566
9727
|
onMaskClick: () => {
|
|
@@ -9571,25 +9732,27 @@ const ActionSheet = (p) => {
|
|
|
9571
9732
|
}
|
|
9572
9733
|
},
|
|
9573
9734
|
afterClose: props.afterClose,
|
|
9574
|
-
className: classNames(`${classPrefix$
|
|
9735
|
+
className: classNames(`${classPrefix$1m}-popup`, props.popupClassName),
|
|
9575
9736
|
style: props.popupStyle,
|
|
9576
9737
|
getContainer: props.getContainer,
|
|
9577
9738
|
destroyOnClose: props.destroyOnClose,
|
|
9578
|
-
forceRender: props.forceRender
|
|
9739
|
+
forceRender: props.forceRender,
|
|
9740
|
+
bodyStyle: styles === null || styles === void 0 ? void 0 : styles.body,
|
|
9741
|
+
maskStyle: styles === null || styles === void 0 ? void 0 : styles.mask
|
|
9579
9742
|
}, withNativeProps(props, React__default.createElement("div", {
|
|
9580
|
-
className: classPrefix$
|
|
9743
|
+
className: classPrefix$1m
|
|
9581
9744
|
}, props.extra && React__default.createElement("div", {
|
|
9582
|
-
className: `${classPrefix$
|
|
9745
|
+
className: `${classPrefix$1m}-extra`
|
|
9583
9746
|
}, props.extra), React__default.createElement("div", {
|
|
9584
|
-
className: `${classPrefix$
|
|
9747
|
+
className: `${classPrefix$1m}-button-list`
|
|
9585
9748
|
}, props.actions.map((action, index2) => React__default.createElement("div", {
|
|
9586
9749
|
key: action.key,
|
|
9587
|
-
className: `${classPrefix$
|
|
9750
|
+
className: `${classPrefix$1m}-button-item-wrapper`
|
|
9588
9751
|
}, React__default.createElement("a", {
|
|
9589
|
-
className: classNames("adm-plain-anchor", `${classPrefix$
|
|
9590
|
-
[`${classPrefix$
|
|
9591
|
-
[`${classPrefix$
|
|
9592
|
-
[`${classPrefix$
|
|
9752
|
+
className: classNames("adm-plain-anchor", `${classPrefix$1m}-button-item`, {
|
|
9753
|
+
[`${classPrefix$1m}-button-item-danger`]: action.danger,
|
|
9754
|
+
[`${classPrefix$1m}-button-item-disabled`]: action.disabled,
|
|
9755
|
+
[`${classPrefix$1m}-button-item-bold`]: action.bold
|
|
9593
9756
|
}),
|
|
9594
9757
|
onClick: () => {
|
|
9595
9758
|
var _a, _b, _c;
|
|
@@ -9602,23 +9765,20 @@ const ActionSheet = (p) => {
|
|
|
9602
9765
|
role: "option",
|
|
9603
9766
|
"aria-disabled": action.disabled
|
|
9604
9767
|
}, React__default.createElement("div", {
|
|
9605
|
-
className: `${classPrefix$
|
|
9768
|
+
className: `${classPrefix$1m}-button-item-name`
|
|
9606
9769
|
}, action.text), action.description && React__default.createElement("div", {
|
|
9607
|
-
className: `${classPrefix$
|
|
9770
|
+
className: `${classPrefix$1m}-button-item-description`
|
|
9608
9771
|
}, action.description))))), props.cancelText && React__default.createElement("div", {
|
|
9609
|
-
className: `${classPrefix$
|
|
9772
|
+
className: `${classPrefix$1m}-cancel`,
|
|
9610
9773
|
role: "option",
|
|
9611
9774
|
"aria-label": props.cancelText
|
|
9612
9775
|
}, React__default.createElement("div", {
|
|
9613
|
-
className: `${classPrefix$
|
|
9776
|
+
className: `${classPrefix$1m}-button-item-wrapper`
|
|
9614
9777
|
}, React__default.createElement("a", {
|
|
9615
|
-
className: classNames("adm-plain-anchor", `${classPrefix$
|
|
9616
|
-
onClick:
|
|
9617
|
-
var _a;
|
|
9618
|
-
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
9619
|
-
}
|
|
9778
|
+
className: classNames("adm-plain-anchor", `${classPrefix$1m}-button-item`),
|
|
9779
|
+
onClick: props.onClose
|
|
9620
9780
|
}, React__default.createElement("div", {
|
|
9621
|
-
className: `${classPrefix$
|
|
9781
|
+
className: `${classPrefix$1m}-button-item-name`
|
|
9622
9782
|
}, props.cancelText)))), props.safeArea && React__default.createElement(SafeArea, {
|
|
9623
9783
|
position: "bottom"
|
|
9624
9784
|
}))));
|
|
@@ -9630,14 +9790,12 @@ const index$j = attachPropertiesToComponent(ActionSheet, {
|
|
|
9630
9790
|
show: showActionSheet
|
|
9631
9791
|
});
|
|
9632
9792
|
const autoCenter = "";
|
|
9633
|
-
const classPrefix$
|
|
9634
|
-
const AutoCenter$1 = (props) => {
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
}, props.children)));
|
|
9640
|
-
};
|
|
9793
|
+
const classPrefix$1l = "adm-auto-center";
|
|
9794
|
+
const AutoCenter$1 = (props) => withNativeProps(props, React__default.createElement("div", {
|
|
9795
|
+
className: classPrefix$1l
|
|
9796
|
+
}, React__default.createElement("div", {
|
|
9797
|
+
className: `${classPrefix$1l}-content`
|
|
9798
|
+
}, props.children)));
|
|
9641
9799
|
const AutoCenter = AutoCenter$1;
|
|
9642
9800
|
const avatar = "";
|
|
9643
9801
|
const Fallback = memo(() => React__default.createElement("svg", {
|
|
@@ -9736,20 +9894,20 @@ const BrokenImageIcon = () => React__default.createElement("svg", {
|
|
|
9736
9894
|
fill: "#DBDBDB",
|
|
9737
9895
|
fillRule: "nonzero"
|
|
9738
9896
|
}));
|
|
9739
|
-
const classPrefix$
|
|
9740
|
-
const defaultProps$
|
|
9897
|
+
const classPrefix$1k = `adm-image`;
|
|
9898
|
+
const defaultProps$12 = {
|
|
9741
9899
|
fit: "fill",
|
|
9742
9900
|
placeholder: React__default.createElement("div", {
|
|
9743
|
-
className: `${classPrefix$
|
|
9901
|
+
className: `${classPrefix$1k}-tip`
|
|
9744
9902
|
}, React__default.createElement(ImageIcon, null)),
|
|
9745
9903
|
fallback: React__default.createElement("div", {
|
|
9746
|
-
className: `${classPrefix$
|
|
9904
|
+
className: `${classPrefix$1k}-tip`
|
|
9747
9905
|
}, React__default.createElement(BrokenImageIcon, null)),
|
|
9748
9906
|
lazy: false,
|
|
9749
9907
|
draggable: false
|
|
9750
9908
|
};
|
|
9751
9909
|
const Image$2 = staged_1((p) => {
|
|
9752
|
-
const props = mergeProps(defaultProps$
|
|
9910
|
+
const props = mergeProps(defaultProps$12, p);
|
|
9753
9911
|
const [loaded, setLoaded] = useState$1(false);
|
|
9754
9912
|
const [failed, setFailed] = useState$1(false);
|
|
9755
9913
|
const ref = useRef(null);
|
|
@@ -9776,7 +9934,7 @@ const Image$2 = staged_1((p) => {
|
|
|
9776
9934
|
const img = React__default.createElement("img", {
|
|
9777
9935
|
ref: imgRef,
|
|
9778
9936
|
id: props.id,
|
|
9779
|
-
className: `${classPrefix$
|
|
9937
|
+
className: `${classPrefix$1k}-img`,
|
|
9780
9938
|
src,
|
|
9781
9939
|
alt: props.alt,
|
|
9782
9940
|
onClick: props.onClick,
|
|
@@ -9816,7 +9974,7 @@ const Image$2 = staged_1((p) => {
|
|
|
9816
9974
|
}
|
|
9817
9975
|
return withNativeProps(props, React__default.createElement("div", {
|
|
9818
9976
|
ref,
|
|
9819
|
-
className: classPrefix$
|
|
9977
|
+
className: classPrefix$1k,
|
|
9820
9978
|
style,
|
|
9821
9979
|
onClick: props.onContainerClick
|
|
9822
9980
|
}, props.lazy && !initialized && React__default.createElement(LazyDetector, {
|
|
@@ -9826,15 +9984,15 @@ const Image$2 = staged_1((p) => {
|
|
|
9826
9984
|
}), renderInner()));
|
|
9827
9985
|
});
|
|
9828
9986
|
const Image$1 = Image$2;
|
|
9829
|
-
const classPrefix$
|
|
9830
|
-
const defaultProps
|
|
9987
|
+
const classPrefix$1j = "adm-avatar";
|
|
9988
|
+
const defaultProps$11 = {
|
|
9831
9989
|
fallback: React__default.createElement(Fallback, null),
|
|
9832
9990
|
fit: "cover"
|
|
9833
9991
|
};
|
|
9834
9992
|
const Avatar$1 = (p) => {
|
|
9835
|
-
const props = mergeProps(defaultProps
|
|
9993
|
+
const props = mergeProps(defaultProps$11, p);
|
|
9836
9994
|
return withNativeProps(props, React__default.createElement(Image$1, {
|
|
9837
|
-
className: classPrefix$
|
|
9995
|
+
className: classPrefix$1j,
|
|
9838
9996
|
src: props.src,
|
|
9839
9997
|
fallback: props.fallback,
|
|
9840
9998
|
placeholder: props.fallback,
|
|
@@ -9848,7 +10006,7 @@ const Avatar$1 = (p) => {
|
|
|
9848
10006
|
};
|
|
9849
10007
|
const Avatar = Avatar$1;
|
|
9850
10008
|
const badge = "";
|
|
9851
|
-
const classPrefix$
|
|
10009
|
+
const classPrefix$1i = `adm-badge`;
|
|
9852
10010
|
const dot = React__default.createElement(React__default.Fragment, null);
|
|
9853
10011
|
const Badge$1 = (props) => {
|
|
9854
10012
|
const {
|
|
@@ -9857,17 +10015,21 @@ const Badge$1 = (props) => {
|
|
|
9857
10015
|
children
|
|
9858
10016
|
} = props;
|
|
9859
10017
|
const isDot = content === dot;
|
|
9860
|
-
const
|
|
10018
|
+
const badgeClass = classNames(classPrefix$1i, {
|
|
10019
|
+
[`${classPrefix$1i}-fixed`]: !!children,
|
|
10020
|
+
[`${classPrefix$1i}-dot`]: isDot,
|
|
10021
|
+
[`${classPrefix$1i}-bordered`]: props.bordered
|
|
10022
|
+
});
|
|
9861
10023
|
const element = content || content === 0 ? withNativeProps(props, React__default.createElement("div", {
|
|
9862
|
-
className:
|
|
10024
|
+
className: badgeClass,
|
|
9863
10025
|
style: {
|
|
9864
10026
|
"--color": color
|
|
9865
10027
|
}
|
|
9866
10028
|
}, !isDot && React__default.createElement("div", {
|
|
9867
|
-
className: `${classPrefix$
|
|
10029
|
+
className: `${classPrefix$1i}-content`
|
|
9868
10030
|
}, content))) : null;
|
|
9869
10031
|
return children ? React__default.createElement("div", {
|
|
9870
|
-
className: classNames(`${classPrefix$
|
|
10032
|
+
className: classNames(`${classPrefix$1i}-wrapper`, props.wrapperClassName),
|
|
9871
10033
|
style: props.wrapperStyle
|
|
9872
10034
|
}, children, element) : element;
|
|
9873
10035
|
};
|
|
@@ -9876,23 +10038,23 @@ const Badge = attachPropertiesToComponent(Badge$1, {
|
|
|
9876
10038
|
});
|
|
9877
10039
|
const button = "";
|
|
9878
10040
|
const dotLoading = "";
|
|
9879
|
-
const classPrefix$
|
|
10041
|
+
const classPrefix$1h = `adm-dot-loading`;
|
|
9880
10042
|
const colorRecord$3 = {
|
|
9881
10043
|
default: "var(--adm-color-weak)",
|
|
9882
10044
|
primary: "var(--adm-color-primary)",
|
|
9883
10045
|
white: "var(--adm-color-white)"
|
|
9884
10046
|
};
|
|
9885
|
-
const defaultProps$
|
|
10047
|
+
const defaultProps$10 = {
|
|
9886
10048
|
color: "default"
|
|
9887
10049
|
};
|
|
9888
10050
|
const DotLoading$2 = memo((p) => {
|
|
9889
10051
|
var _a;
|
|
9890
|
-
const props = mergeProps(defaultProps$
|
|
10052
|
+
const props = mergeProps(defaultProps$10, p);
|
|
9891
10053
|
return withNativeProps(props, React__default.createElement("div", {
|
|
9892
10054
|
style: {
|
|
9893
10055
|
color: (_a = colorRecord$3[props.color]) !== null && _a !== void 0 ? _a : props.color
|
|
9894
10056
|
},
|
|
9895
|
-
className: classNames("adm-loading", classPrefix$
|
|
10057
|
+
className: classNames("adm-loading", classPrefix$1h)
|
|
9896
10058
|
}, React__default.createElement("svg", {
|
|
9897
10059
|
height: "1em",
|
|
9898
10060
|
viewBox: "0 0 100 40",
|
|
@@ -9936,8 +10098,8 @@ function isPromise(obj) {
|
|
|
9936
10098
|
function isIOS() {
|
|
9937
10099
|
return canUseDom$2 ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
|
9938
10100
|
}
|
|
9939
|
-
const classPrefix$
|
|
9940
|
-
const defaultProps
|
|
10101
|
+
const classPrefix$1g = `adm-button`;
|
|
10102
|
+
const defaultProps$$ = {
|
|
9941
10103
|
color: "default",
|
|
9942
10104
|
fill: "solid",
|
|
9943
10105
|
block: false,
|
|
@@ -9950,7 +10112,7 @@ const defaultProps$Z = {
|
|
|
9950
10112
|
size: "middle"
|
|
9951
10113
|
};
|
|
9952
10114
|
const Button$1 = forwardRef((p, ref) => {
|
|
9953
|
-
const props = mergeProps(defaultProps
|
|
10115
|
+
const props = mergeProps(defaultProps$$, p);
|
|
9954
10116
|
const [innerLoading, setInnerLoading] = useState$1(false);
|
|
9955
10117
|
const nativeButtonRef = useRef(null);
|
|
9956
10118
|
const loading = props.loading === "auto" ? innerLoading : props.loading;
|
|
@@ -9979,23 +10141,24 @@ const Button$1 = forwardRef((p, ref) => {
|
|
|
9979
10141
|
ref: nativeButtonRef,
|
|
9980
10142
|
type: props.type,
|
|
9981
10143
|
onClick: handleClick,
|
|
9982
|
-
className: classNames(classPrefix$
|
|
9983
|
-
[`${classPrefix$
|
|
9984
|
-
[`${classPrefix$
|
|
9985
|
-
[`${classPrefix$
|
|
9986
|
-
[`${classPrefix$
|
|
9987
|
-
[`${classPrefix$
|
|
9988
|
-
[`${classPrefix$
|
|
9989
|
-
[`${classPrefix$
|
|
9990
|
-
[`${classPrefix$
|
|
9991
|
-
|
|
10144
|
+
className: classNames(classPrefix$1g, {
|
|
10145
|
+
[`${classPrefix$1g}-${props.color}`]: props.color,
|
|
10146
|
+
[`${classPrefix$1g}-block`]: props.block,
|
|
10147
|
+
[`${classPrefix$1g}-disabled`]: disabled,
|
|
10148
|
+
[`${classPrefix$1g}-fill-outline`]: props.fill === "outline",
|
|
10149
|
+
[`${classPrefix$1g}-fill-none`]: props.fill === "none",
|
|
10150
|
+
[`${classPrefix$1g}-mini`]: props.size === "mini",
|
|
10151
|
+
[`${classPrefix$1g}-small`]: props.size === "small",
|
|
10152
|
+
[`${classPrefix$1g}-large`]: props.size === "large",
|
|
10153
|
+
[`${classPrefix$1g}-loading`]: loading
|
|
10154
|
+
}, `${classPrefix$1g}-shape-${props.shape}`),
|
|
9992
10155
|
disabled,
|
|
9993
10156
|
onMouseDown: props.onMouseDown,
|
|
9994
10157
|
onMouseUp: props.onMouseUp,
|
|
9995
10158
|
onTouchStart: props.onTouchStart,
|
|
9996
10159
|
onTouchEnd: props.onTouchEnd
|
|
9997
10160
|
}, loading ? React__default.createElement("div", {
|
|
9998
|
-
className: `${classPrefix$
|
|
10161
|
+
className: `${classPrefix$1g}-loading-wrapper`
|
|
9999
10162
|
}, props.loadingIcon, props.loadingText) : React__default.createElement("span", null, props.children)));
|
|
10000
10163
|
});
|
|
10001
10164
|
const Button = Button$1;
|
|
@@ -10110,7 +10273,18 @@ function replaceMessage$1(template, kv) {
|
|
|
10110
10273
|
return kv[key];
|
|
10111
10274
|
});
|
|
10112
10275
|
}
|
|
10113
|
-
|
|
10276
|
+
const isDev = true;
|
|
10277
|
+
function devWarning(component, message) {
|
|
10278
|
+
if (isDev) {
|
|
10279
|
+
console.warn(`[antd-mobile: ${component}] ${message}`);
|
|
10280
|
+
}
|
|
10281
|
+
}
|
|
10282
|
+
function devError(component, message) {
|
|
10283
|
+
if (isDev) {
|
|
10284
|
+
console.error(`[antd-mobile: ${component}] ${message}`);
|
|
10285
|
+
}
|
|
10286
|
+
}
|
|
10287
|
+
function convertValueToRange$1(selectionMode, value) {
|
|
10114
10288
|
if (selectionMode === void 0 || value === null)
|
|
10115
10289
|
return null;
|
|
10116
10290
|
if (Array.isArray(value)) {
|
|
@@ -10118,12 +10292,12 @@ function convertValueToRange(selectionMode, value) {
|
|
|
10118
10292
|
}
|
|
10119
10293
|
return [value, value];
|
|
10120
10294
|
}
|
|
10121
|
-
function convertPageToDayjs(page) {
|
|
10295
|
+
function convertPageToDayjs$1(page) {
|
|
10122
10296
|
return dayjs().year(page.year).month(page.month - 1).date(1);
|
|
10123
10297
|
}
|
|
10124
10298
|
dayjs.extend(isoWeek);
|
|
10125
|
-
const classPrefix$
|
|
10126
|
-
const defaultProps$
|
|
10299
|
+
const classPrefix$1f = "adm-calendar";
|
|
10300
|
+
const defaultProps$_ = {
|
|
10127
10301
|
weekStartsOn: "Sunday",
|
|
10128
10302
|
defaultValue: null,
|
|
10129
10303
|
allowClear: true,
|
|
@@ -10134,7 +10308,7 @@ const defaultProps$Y = {
|
|
|
10134
10308
|
};
|
|
10135
10309
|
const Calendar$1 = forwardRef((p, ref) => {
|
|
10136
10310
|
const today = dayjs();
|
|
10137
|
-
const props = mergeProps(defaultProps$
|
|
10311
|
+
const props = mergeProps(defaultProps$_, p);
|
|
10138
10312
|
const {
|
|
10139
10313
|
locale
|
|
10140
10314
|
} = useConfig();
|
|
@@ -10145,8 +10319,8 @@ const Calendar$1 = forwardRef((p, ref) => {
|
|
|
10145
10319
|
markItems.unshift(item);
|
|
10146
10320
|
}
|
|
10147
10321
|
const [dateRange, setDateRange] = usePropsValue({
|
|
10148
|
-
value: props.value === void 0 ? void 0 : convertValueToRange(props.selectionMode, props.value),
|
|
10149
|
-
defaultValue: convertValueToRange(props.selectionMode, props.defaultValue),
|
|
10322
|
+
value: props.value === void 0 ? void 0 : convertValueToRange$1(props.selectionMode, props.value),
|
|
10323
|
+
defaultValue: convertValueToRange$1(props.selectionMode, props.defaultValue),
|
|
10150
10324
|
onChange: (v) => {
|
|
10151
10325
|
var _a, _b;
|
|
10152
10326
|
if (props.selectionMode === "single") {
|
|
@@ -10173,7 +10347,7 @@ const Calendar$1 = forwardRef((p, ref) => {
|
|
|
10173
10347
|
} else {
|
|
10174
10348
|
page = pageOrPageGenerator;
|
|
10175
10349
|
}
|
|
10176
|
-
setCurrent(convertPageToDayjs(page));
|
|
10350
|
+
setCurrent(convertPageToDayjs$1(page));
|
|
10177
10351
|
},
|
|
10178
10352
|
jumpToToday: () => {
|
|
10179
10353
|
setCurrent(dayjs().date(1));
|
|
@@ -10182,13 +10356,13 @@ const Calendar$1 = forwardRef((p, ref) => {
|
|
|
10182
10356
|
const handlePageChange = (action, num, type4) => {
|
|
10183
10357
|
const nxtCurrent = current[action](num, type4);
|
|
10184
10358
|
if (action === "subtract" && props.minPage) {
|
|
10185
|
-
const minPage = convertPageToDayjs(props.minPage);
|
|
10359
|
+
const minPage = convertPageToDayjs$1(props.minPage);
|
|
10186
10360
|
if (nxtCurrent.isBefore(minPage, type4)) {
|
|
10187
10361
|
return;
|
|
10188
10362
|
}
|
|
10189
10363
|
}
|
|
10190
10364
|
if (action === "add" && props.maxPage) {
|
|
10191
|
-
const maxPage = convertPageToDayjs(props.maxPage);
|
|
10365
|
+
const maxPage = convertPageToDayjs$1(props.maxPage);
|
|
10192
10366
|
if (nxtCurrent.isAfter(maxPage, type4)) {
|
|
10193
10367
|
return;
|
|
10194
10368
|
}
|
|
@@ -10196,29 +10370,29 @@ const Calendar$1 = forwardRef((p, ref) => {
|
|
|
10196
10370
|
setCurrent(nxtCurrent);
|
|
10197
10371
|
};
|
|
10198
10372
|
const header = React__default.createElement("div", {
|
|
10199
|
-
className: `${classPrefix$
|
|
10373
|
+
className: `${classPrefix$1f}-header`
|
|
10200
10374
|
}, React__default.createElement("a", {
|
|
10201
|
-
className: `${classPrefix$
|
|
10375
|
+
className: `${classPrefix$1f}-arrow-button ${classPrefix$1f}-arrow-button-year`,
|
|
10202
10376
|
onClick: () => {
|
|
10203
10377
|
handlePageChange("subtract", 1, "year");
|
|
10204
10378
|
}
|
|
10205
10379
|
}, props.prevYearButton), React__default.createElement("a", {
|
|
10206
|
-
className: `${classPrefix$
|
|
10380
|
+
className: `${classPrefix$1f}-arrow-button ${classPrefix$1f}-arrow-button-month`,
|
|
10207
10381
|
onClick: () => {
|
|
10208
10382
|
handlePageChange("subtract", 1, "month");
|
|
10209
10383
|
}
|
|
10210
10384
|
}, props.prevMonthButton), React__default.createElement("div", {
|
|
10211
|
-
className: `${classPrefix$
|
|
10385
|
+
className: `${classPrefix$1f}-title`
|
|
10212
10386
|
}, replaceMessage$1(locale.Calendar.yearAndMonth, {
|
|
10213
10387
|
year: current.year().toString(),
|
|
10214
10388
|
month: (current.month() + 1).toString()
|
|
10215
10389
|
})), React__default.createElement("a", {
|
|
10216
|
-
className: classNames(`${classPrefix$
|
|
10390
|
+
className: classNames(`${classPrefix$1f}-arrow-button`, `${classPrefix$1f}-arrow-button-right`, `${classPrefix$1f}-arrow-button-right-month`),
|
|
10217
10391
|
onClick: () => {
|
|
10218
10392
|
handlePageChange("add", 1, "month");
|
|
10219
10393
|
}
|
|
10220
10394
|
}, props.nextMonthButton), React__default.createElement("a", {
|
|
10221
|
-
className: classNames(`${classPrefix$
|
|
10395
|
+
className: classNames(`${classPrefix$1f}-arrow-button`, `${classPrefix$1f}-arrow-button-right`, `${classPrefix$1f}-arrow-button-right-year`),
|
|
10222
10396
|
onClick: () => {
|
|
10223
10397
|
handlePageChange("add", 1, "year");
|
|
10224
10398
|
}
|
|
@@ -10253,13 +10427,13 @@ const Calendar$1 = forwardRef((p, ref) => {
|
|
|
10253
10427
|
const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
10254
10428
|
cells.push(React__default.createElement("div", {
|
|
10255
10429
|
key: d.valueOf(),
|
|
10256
|
-
className: classNames(`${classPrefix$
|
|
10257
|
-
[`${classPrefix$
|
|
10258
|
-
[`${classPrefix$
|
|
10259
|
-
[`${classPrefix$
|
|
10260
|
-
[`${classPrefix$
|
|
10261
|
-
[`${classPrefix$
|
|
10262
|
-
[`${classPrefix$
|
|
10430
|
+
className: classNames(`${classPrefix$1f}-cell`, (disabled || !inThisMonth) && `${classPrefix$1f}-cell-disabled`, inThisMonth && {
|
|
10431
|
+
[`${classPrefix$1f}-cell-today`]: d.isSame(today, "day"),
|
|
10432
|
+
[`${classPrefix$1f}-cell-selected`]: isSelect,
|
|
10433
|
+
[`${classPrefix$1f}-cell-selected-begin`]: isBegin,
|
|
10434
|
+
[`${classPrefix$1f}-cell-selected-end`]: isEnd,
|
|
10435
|
+
[`${classPrefix$1f}-cell-selected-row-begin`]: isSelectRowBegin,
|
|
10436
|
+
[`${classPrefix$1f}-cell-selected-row-end`]: isSelectRowEnd
|
|
10263
10437
|
}),
|
|
10264
10438
|
onClick: () => {
|
|
10265
10439
|
if (!props.selectionMode)
|
|
@@ -10306,87 +10480,401 @@ const Calendar$1 = forwardRef((p, ref) => {
|
|
|
10306
10480
|
}
|
|
10307
10481
|
}
|
|
10308
10482
|
}, React__default.createElement("div", {
|
|
10309
|
-
className: `${classPrefix$
|
|
10483
|
+
className: `${classPrefix$1f}-cell-top`
|
|
10310
10484
|
}, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React__default.createElement("div", {
|
|
10311
|
-
className: `${classPrefix$
|
|
10485
|
+
className: `${classPrefix$1f}-cell-bottom`
|
|
10312
10486
|
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate()))));
|
|
10313
10487
|
iterator = iterator.add(1, "day");
|
|
10314
10488
|
}
|
|
10315
10489
|
return cells;
|
|
10316
10490
|
}
|
|
10317
10491
|
const body = React__default.createElement("div", {
|
|
10318
|
-
className: `${classPrefix$
|
|
10492
|
+
className: `${classPrefix$1f}-cells`
|
|
10319
10493
|
}, renderCells());
|
|
10320
10494
|
const mark = React__default.createElement("div", {
|
|
10321
|
-
className: `${classPrefix$
|
|
10495
|
+
className: `${classPrefix$1f}-mark`
|
|
10322
10496
|
}, markItems.map((item, index2) => React__default.createElement("div", {
|
|
10323
10497
|
key: index2,
|
|
10324
|
-
className: `${classPrefix$
|
|
10498
|
+
className: `${classPrefix$1f}-mark-cell`
|
|
10325
10499
|
}, item)));
|
|
10500
|
+
{
|
|
10501
|
+
useEffect(() => {
|
|
10502
|
+
devWarning("Calendar", "Calendar will be removed in the future, please use CalendarPickerView instead.");
|
|
10503
|
+
}, []);
|
|
10504
|
+
}
|
|
10326
10505
|
return withNativeProps(props, React__default.createElement("div", {
|
|
10327
|
-
className: classPrefix$
|
|
10506
|
+
className: classPrefix$1f
|
|
10328
10507
|
}, header, mark, body));
|
|
10329
10508
|
});
|
|
10330
10509
|
const Calendar = Calendar$1;
|
|
10331
|
-
const
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10510
|
+
const divider = "";
|
|
10511
|
+
const classPrefix$1e = `adm-divider`;
|
|
10512
|
+
const defaultProps$Z = {
|
|
10513
|
+
contentPosition: "center",
|
|
10514
|
+
direction: "horizontal"
|
|
10515
|
+
};
|
|
10516
|
+
const Divider$1 = (p) => {
|
|
10517
|
+
const props = mergeProps(defaultProps$Z, p);
|
|
10518
|
+
return withNativeProps(props, React__default.createElement("div", {
|
|
10519
|
+
className: classNames(classPrefix$1e, `${classPrefix$1e}-${props.direction}`, `${classPrefix$1e}-${props.contentPosition}`)
|
|
10520
|
+
}, props.children && React__default.createElement("div", {
|
|
10521
|
+
className: `${classPrefix$1e}-content`
|
|
10522
|
+
}, props.children)));
|
|
10523
|
+
};
|
|
10524
|
+
const Divider = Divider$1;
|
|
10525
|
+
const calendarPickerView = "";
|
|
10526
|
+
var isSameOrBefore$1 = { exports: {} };
|
|
10527
|
+
(function(module, exports) {
|
|
10528
|
+
!function(e2, i2) {
|
|
10529
|
+
module.exports = i2();
|
|
10530
|
+
}(commonjsGlobal, function() {
|
|
10531
|
+
return function(e2, i2) {
|
|
10532
|
+
i2.prototype.isSameOrBefore = function(e3, i3) {
|
|
10533
|
+
return this.isSame(e3, i3) || this.isBefore(e3, i3);
|
|
10347
10534
|
};
|
|
10348
|
-
} else {
|
|
10349
|
-
fn(target);
|
|
10350
|
-
}
|
|
10351
|
-
}, [targetRef]);
|
|
10352
|
-
}
|
|
10353
|
-
function useMutationEffect(effect, targetRef, options) {
|
|
10354
|
-
const fn = useMemoizedFn(effect);
|
|
10355
|
-
useEffect(() => {
|
|
10356
|
-
const observer = new MutationObserver(() => {
|
|
10357
|
-
fn();
|
|
10358
|
-
});
|
|
10359
|
-
if (!targetRef.current)
|
|
10360
|
-
return;
|
|
10361
|
-
observer.observe(targetRef.current, options);
|
|
10362
|
-
return () => {
|
|
10363
|
-
observer.disconnect();
|
|
10364
10535
|
};
|
|
10365
|
-
}
|
|
10366
|
-
}
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
if (
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
ret = Math.min(ret, max2);
|
|
10536
|
+
});
|
|
10537
|
+
})(isSameOrBefore$1);
|
|
10538
|
+
const isSameOrBefore = isSameOrBefore$1.exports;
|
|
10539
|
+
function convertValueToRange(selectionMode, value) {
|
|
10540
|
+
if (selectionMode === void 0 || value === null)
|
|
10541
|
+
return null;
|
|
10542
|
+
if (Array.isArray(value)) {
|
|
10543
|
+
return value;
|
|
10374
10544
|
}
|
|
10375
|
-
return
|
|
10545
|
+
return [value, value];
|
|
10376
10546
|
}
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10547
|
+
function convertPageToDayjs(page) {
|
|
10548
|
+
return dayjs().year(page.year).month(page.month - 1).date(1);
|
|
10549
|
+
}
|
|
10550
|
+
dayjs.extend(isoWeek);
|
|
10551
|
+
dayjs.extend(isSameOrBefore);
|
|
10552
|
+
const classPrefix$1d = "adm-calendar-picker-view";
|
|
10553
|
+
const defaultProps$Y = {
|
|
10554
|
+
weekStartsOn: "Sunday",
|
|
10555
|
+
defaultValue: null,
|
|
10556
|
+
allowClear: true,
|
|
10557
|
+
usePopup: true,
|
|
10558
|
+
selectionMode: "single"
|
|
10559
|
+
};
|
|
10560
|
+
const CalendarPickerView$1 = forwardRef((p, ref) => {
|
|
10561
|
+
var _a;
|
|
10562
|
+
const today = dayjs();
|
|
10563
|
+
const props = mergeProps(defaultProps$Y, p);
|
|
10564
|
+
const {
|
|
10565
|
+
locale
|
|
10566
|
+
} = useConfig();
|
|
10567
|
+
const markItems = [...locale.Calendar.markItems];
|
|
10568
|
+
if (props.weekStartsOn === "Sunday") {
|
|
10569
|
+
const item = markItems.pop();
|
|
10570
|
+
if (item)
|
|
10571
|
+
markItems.unshift(item);
|
|
10572
|
+
}
|
|
10573
|
+
const [dateRange, setDateRange] = usePropsValue({
|
|
10574
|
+
value: props.value === void 0 ? void 0 : convertValueToRange(props.selectionMode, props.value),
|
|
10575
|
+
defaultValue: convertValueToRange(props.selectionMode, props.defaultValue),
|
|
10576
|
+
onChange: (v) => {
|
|
10577
|
+
var _a2, _b;
|
|
10578
|
+
if (props.selectionMode === "single") {
|
|
10579
|
+
(_a2 = props.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, v ? v[0] : null);
|
|
10580
|
+
} else if (props.selectionMode === "range") {
|
|
10581
|
+
(_b = props.onChange) === null || _b === void 0 ? void 0 : _b.call(props, v);
|
|
10582
|
+
}
|
|
10385
10583
|
}
|
|
10386
|
-
})
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10584
|
+
});
|
|
10585
|
+
const [intermediate, setIntermediate] = useState$1(false);
|
|
10586
|
+
const [current, setCurrent] = useState$1(() => dayjs(dateRange ? dateRange[0] : today).date(1));
|
|
10587
|
+
useImperativeHandle(ref, () => ({
|
|
10588
|
+
jumpTo: (pageOrPageGenerator) => {
|
|
10589
|
+
let page;
|
|
10590
|
+
if (typeof pageOrPageGenerator === "function") {
|
|
10591
|
+
page = pageOrPageGenerator({
|
|
10592
|
+
year: current.year(),
|
|
10593
|
+
month: current.month() + 1
|
|
10594
|
+
});
|
|
10595
|
+
} else {
|
|
10596
|
+
page = pageOrPageGenerator;
|
|
10597
|
+
}
|
|
10598
|
+
setCurrent(convertPageToDayjs(page));
|
|
10599
|
+
},
|
|
10600
|
+
jumpToToday: () => {
|
|
10601
|
+
setCurrent(dayjs().date(1));
|
|
10602
|
+
},
|
|
10603
|
+
getDateRange: () => dateRange
|
|
10604
|
+
}));
|
|
10605
|
+
const header = React__default.createElement("div", {
|
|
10606
|
+
className: `${classPrefix$1d}-header`
|
|
10607
|
+
}, React__default.createElement("div", {
|
|
10608
|
+
className: `${classPrefix$1d}-title`
|
|
10609
|
+
}, (_a = props.title) !== null && _a !== void 0 ? _a : locale.Calendar.title));
|
|
10610
|
+
const maxDay = useMemo(() => props.max ? dayjs(props.max) : current.add(6, "month"), [props.max, current]);
|
|
10611
|
+
const minDay = useMemo(() => props.min ? dayjs(props.min) : current, [props.min, current]);
|
|
10612
|
+
function renderBody() {
|
|
10613
|
+
var _a2;
|
|
10614
|
+
const cells = [];
|
|
10615
|
+
let monthIterator = minDay;
|
|
10616
|
+
while (monthIterator.isSameOrBefore(maxDay, "month")) {
|
|
10617
|
+
const year = monthIterator.year();
|
|
10618
|
+
const month = monthIterator.month();
|
|
10619
|
+
const renderMap = {
|
|
10620
|
+
year,
|
|
10621
|
+
month: month + 1
|
|
10622
|
+
};
|
|
10623
|
+
cells.push(React__default.createElement("div", {
|
|
10624
|
+
key: `${year}-${month}`
|
|
10625
|
+
}, React__default.createElement("div", {
|
|
10626
|
+
className: `${classPrefix$1d}-title`
|
|
10627
|
+
}, (_a2 = locale.Calendar.yearAndMonth) === null || _a2 === void 0 ? void 0 : _a2.replace(/\${(.*?)}/g, (_, variable) => {
|
|
10628
|
+
var _a3;
|
|
10629
|
+
return (_a3 = renderMap[variable]) === null || _a3 === void 0 ? void 0 : _a3.toString();
|
|
10630
|
+
})), React__default.createElement("div", {
|
|
10631
|
+
className: `${classPrefix$1d}-cells`
|
|
10632
|
+
}, Array(props.weekStartsOn === "Monday" ? monthIterator.date(1).isoWeekday() - 1 : monthIterator.date(1).isoWeekday()).fill(null).map((_, index2) => React__default.createElement("div", {
|
|
10633
|
+
key: index2,
|
|
10634
|
+
className: `${classPrefix$1d}-cell`
|
|
10635
|
+
})), Array(monthIterator.daysInMonth()).fill(null).map((_, index2) => {
|
|
10636
|
+
var _a3;
|
|
10637
|
+
const d = monthIterator.date(index2 + 1);
|
|
10638
|
+
let isSelect = false;
|
|
10639
|
+
let isBegin = false;
|
|
10640
|
+
let isEnd = false;
|
|
10641
|
+
let isSelectRowBegin = false;
|
|
10642
|
+
let isSelectRowEnd = false;
|
|
10643
|
+
if (dateRange) {
|
|
10644
|
+
const [begin, end] = dateRange;
|
|
10645
|
+
isBegin = d.isSame(begin, "day");
|
|
10646
|
+
isEnd = d.isSame(end, "day");
|
|
10647
|
+
isSelect = isBegin || isEnd || d.isAfter(begin, "day") && d.isBefore(end, "day");
|
|
10648
|
+
if (isSelect) {
|
|
10649
|
+
isSelectRowBegin = (cells.length % 7 === 0 || d.isSame(d.startOf("month"), "day")) && !isBegin;
|
|
10650
|
+
isSelectRowEnd = (cells.length % 7 === 6 || d.isSame(d.endOf("month"), "day")) && !isEnd;
|
|
10651
|
+
}
|
|
10652
|
+
}
|
|
10653
|
+
const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
10654
|
+
const renderTop = () => {
|
|
10655
|
+
var _a4;
|
|
10656
|
+
const top = (_a4 = props.renderTop) === null || _a4 === void 0 ? void 0 : _a4.call(props, d.toDate());
|
|
10657
|
+
if (top) {
|
|
10658
|
+
return top;
|
|
10659
|
+
}
|
|
10660
|
+
if (props.selectionMode === "range") {
|
|
10661
|
+
if (isBegin) {
|
|
10662
|
+
return locale.Calendar.start;
|
|
10663
|
+
}
|
|
10664
|
+
if (isEnd) {
|
|
10665
|
+
return locale.Calendar.end;
|
|
10666
|
+
}
|
|
10667
|
+
}
|
|
10668
|
+
if (d.isSame(today, "day") && !isSelect) {
|
|
10669
|
+
return locale.Calendar.today;
|
|
10670
|
+
}
|
|
10671
|
+
};
|
|
10672
|
+
return React__default.createElement("div", {
|
|
10673
|
+
key: d.valueOf(),
|
|
10674
|
+
className: classNames(`${classPrefix$1d}-cell`, {
|
|
10675
|
+
[`${classPrefix$1d}-cell-today`]: d.isSame(today, "day"),
|
|
10676
|
+
[`${classPrefix$1d}-cell-selected`]: isSelect,
|
|
10677
|
+
[`${classPrefix$1d}-cell-selected-begin`]: isBegin,
|
|
10678
|
+
[`${classPrefix$1d}-cell-selected-end`]: isEnd,
|
|
10679
|
+
[`${classPrefix$1d}-cell-selected-row-begin`]: isSelectRowBegin,
|
|
10680
|
+
[`${classPrefix$1d}-cell-selected-row-end`]: isSelectRowEnd,
|
|
10681
|
+
[`${classPrefix$1d}-cell-disabled`]: !!disabled
|
|
10682
|
+
}),
|
|
10683
|
+
onClick: () => {
|
|
10684
|
+
if (!props.selectionMode)
|
|
10685
|
+
return;
|
|
10686
|
+
if (disabled)
|
|
10687
|
+
return;
|
|
10688
|
+
const date4 = d.toDate();
|
|
10689
|
+
function shouldClear() {
|
|
10690
|
+
if (!props.allowClear)
|
|
10691
|
+
return false;
|
|
10692
|
+
if (!dateRange)
|
|
10693
|
+
return false;
|
|
10694
|
+
const [begin, end] = dateRange;
|
|
10695
|
+
return d.isSame(begin, "date") && d.isSame(end, "day");
|
|
10696
|
+
}
|
|
10697
|
+
if (props.selectionMode === "single") {
|
|
10698
|
+
if (props.allowClear && shouldClear()) {
|
|
10699
|
+
setDateRange(null);
|
|
10700
|
+
return;
|
|
10701
|
+
}
|
|
10702
|
+
setDateRange([date4, date4]);
|
|
10703
|
+
} else if (props.selectionMode === "range") {
|
|
10704
|
+
if (!dateRange) {
|
|
10705
|
+
setDateRange([date4, date4]);
|
|
10706
|
+
setIntermediate(true);
|
|
10707
|
+
return;
|
|
10708
|
+
}
|
|
10709
|
+
if (shouldClear()) {
|
|
10710
|
+
setDateRange(null);
|
|
10711
|
+
setIntermediate(false);
|
|
10712
|
+
return;
|
|
10713
|
+
}
|
|
10714
|
+
if (intermediate) {
|
|
10715
|
+
const another = dateRange[0];
|
|
10716
|
+
setDateRange(another > date4 ? [date4, another] : [another, date4]);
|
|
10717
|
+
setIntermediate(false);
|
|
10718
|
+
} else {
|
|
10719
|
+
setDateRange([date4, date4]);
|
|
10720
|
+
setIntermediate(true);
|
|
10721
|
+
}
|
|
10722
|
+
}
|
|
10723
|
+
}
|
|
10724
|
+
}, React__default.createElement("div", {
|
|
10725
|
+
className: `${classPrefix$1d}-cell-top`
|
|
10726
|
+
}, renderTop()), React__default.createElement("div", {
|
|
10727
|
+
className: `${classPrefix$1d}-cell-date`
|
|
10728
|
+
}, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React__default.createElement("div", {
|
|
10729
|
+
className: `${classPrefix$1d}-cell-bottom`
|
|
10730
|
+
}, (_a3 = props.renderBottom) === null || _a3 === void 0 ? void 0 : _a3.call(props, d.toDate())));
|
|
10731
|
+
}))));
|
|
10732
|
+
monthIterator = monthIterator.add(1, "month");
|
|
10733
|
+
}
|
|
10734
|
+
return cells;
|
|
10735
|
+
}
|
|
10736
|
+
const body = React__default.createElement("div", {
|
|
10737
|
+
className: `${classPrefix$1d}-body`
|
|
10738
|
+
}, renderBody());
|
|
10739
|
+
const mark = React__default.createElement("div", {
|
|
10740
|
+
className: `${classPrefix$1d}-mark`
|
|
10741
|
+
}, markItems.map((item, index2) => React__default.createElement("div", {
|
|
10742
|
+
key: index2,
|
|
10743
|
+
className: `${classPrefix$1d}-mark-cell`
|
|
10744
|
+
}, item)));
|
|
10745
|
+
return withNativeProps(props, React__default.createElement("div", {
|
|
10746
|
+
className: classPrefix$1d
|
|
10747
|
+
}, header, mark, body));
|
|
10748
|
+
});
|
|
10749
|
+
const CalendarPickerView = CalendarPickerView$1;
|
|
10750
|
+
const classPrefix$1c = "adm-calendar-picker";
|
|
10751
|
+
const defaultProps$X = {
|
|
10752
|
+
weekStartsOn: "Sunday",
|
|
10753
|
+
defaultValue: null,
|
|
10754
|
+
allowClear: true,
|
|
10755
|
+
usePopup: true,
|
|
10756
|
+
selectionMode: "single"
|
|
10757
|
+
};
|
|
10758
|
+
const CalendarPicker$1 = forwardRef((p, ref) => {
|
|
10759
|
+
const props = mergeProps(defaultProps$X, p);
|
|
10760
|
+
const {
|
|
10761
|
+
locale
|
|
10762
|
+
} = useConfig();
|
|
10763
|
+
const calendarRef = ref !== null && ref !== void 0 ? ref : useRef(null);
|
|
10764
|
+
const {
|
|
10765
|
+
visible,
|
|
10766
|
+
confirmText,
|
|
10767
|
+
popupClassName,
|
|
10768
|
+
popupStyle,
|
|
10769
|
+
popupBodyStyle,
|
|
10770
|
+
forceRender,
|
|
10771
|
+
closeOnMaskClick,
|
|
10772
|
+
onClose,
|
|
10773
|
+
onConfirm,
|
|
10774
|
+
onMaskClick
|
|
10775
|
+
} = props, calendarViewProps = __rest(props, ["visible", "confirmText", "popupClassName", "popupStyle", "popupBodyStyle", "forceRender", "closeOnMaskClick", "onClose", "onConfirm", "onMaskClick"]);
|
|
10776
|
+
const footer2 = React__default.createElement("div", {
|
|
10777
|
+
className: `${classPrefix$1c}-footer`
|
|
10778
|
+
}, React__default.createElement(Divider, null), React__default.createElement("div", {
|
|
10779
|
+
className: `${classPrefix$1c}-footer-bottom`
|
|
10780
|
+
}, React__default.createElement(Button, {
|
|
10781
|
+
color: "primary",
|
|
10782
|
+
onClick: () => {
|
|
10783
|
+
var _a, _b, _c, _d;
|
|
10784
|
+
const dateRange = (_b = (_a = calendarRef.current) === null || _a === void 0 ? void 0 : _a.getDateRange()) !== null && _b !== void 0 ? _b : null;
|
|
10785
|
+
if (props.selectionMode === "single") {
|
|
10786
|
+
(_c = props.onConfirm) === null || _c === void 0 ? void 0 : _c.call(props, dateRange ? dateRange[0] : null);
|
|
10787
|
+
} else if (props.selectionMode === "range") {
|
|
10788
|
+
(_d = props.onConfirm) === null || _d === void 0 ? void 0 : _d.call(props, dateRange);
|
|
10789
|
+
}
|
|
10790
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
10791
|
+
}
|
|
10792
|
+
}, confirmText !== null && confirmText !== void 0 ? confirmText : locale.Calendar.confirm)));
|
|
10793
|
+
return withNativeProps(props, React__default.createElement("div", {
|
|
10794
|
+
className: classPrefix$1c
|
|
10795
|
+
}, React__default.createElement(Popup, {
|
|
10796
|
+
visible,
|
|
10797
|
+
className: classNames(`${classPrefix$1c}-popup`, popupClassName),
|
|
10798
|
+
showCloseButton: true,
|
|
10799
|
+
forceRender: ref ? true : forceRender,
|
|
10800
|
+
style: popupStyle,
|
|
10801
|
+
bodyStyle: Object.assign({
|
|
10802
|
+
borderTopLeftRadius: "8px",
|
|
10803
|
+
borderTopRightRadius: "8px",
|
|
10804
|
+
minHeight: "80vh",
|
|
10805
|
+
overflow: "auto"
|
|
10806
|
+
}, popupBodyStyle),
|
|
10807
|
+
onClose,
|
|
10808
|
+
onMaskClick: () => {
|
|
10809
|
+
onMaskClick === null || onMaskClick === void 0 ? void 0 : onMaskClick();
|
|
10810
|
+
if (closeOnMaskClick) {
|
|
10811
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
10812
|
+
}
|
|
10813
|
+
}
|
|
10814
|
+
}, React__default.createElement(CalendarPickerView, Object.assign({
|
|
10815
|
+
ref: calendarRef
|
|
10816
|
+
}, calendarViewProps)), footer2)));
|
|
10817
|
+
});
|
|
10818
|
+
const CalendarPicker = CalendarPicker$1;
|
|
10819
|
+
const capsuleTabs = "";
|
|
10820
|
+
function useResizeEffect(effect, targetRef) {
|
|
10821
|
+
const fn = useMemoizedFn(effect);
|
|
10822
|
+
useIsomorphicLayoutEffect$2(() => {
|
|
10823
|
+
const target = targetRef.current;
|
|
10824
|
+
if (!target)
|
|
10825
|
+
return;
|
|
10826
|
+
if (window.ResizeObserver) {
|
|
10827
|
+
let animationFrame;
|
|
10828
|
+
const observer = new ResizeObserver(() => {
|
|
10829
|
+
animationFrame = window.requestAnimationFrame(() => fn(target));
|
|
10830
|
+
});
|
|
10831
|
+
observer.observe(target);
|
|
10832
|
+
return () => {
|
|
10833
|
+
window.cancelAnimationFrame(animationFrame);
|
|
10834
|
+
observer.disconnect();
|
|
10835
|
+
};
|
|
10836
|
+
} else {
|
|
10837
|
+
fn(target);
|
|
10838
|
+
}
|
|
10839
|
+
}, [targetRef]);
|
|
10840
|
+
}
|
|
10841
|
+
function useMutationEffect(effect, targetRef, options) {
|
|
10842
|
+
const fn = useMemoizedFn(effect);
|
|
10843
|
+
useEffect(() => {
|
|
10844
|
+
const observer = new MutationObserver(() => {
|
|
10845
|
+
fn();
|
|
10846
|
+
});
|
|
10847
|
+
if (!targetRef.current)
|
|
10848
|
+
return;
|
|
10849
|
+
observer.observe(targetRef.current, options);
|
|
10850
|
+
return () => {
|
|
10851
|
+
observer.disconnect();
|
|
10852
|
+
};
|
|
10853
|
+
}, [targetRef]);
|
|
10854
|
+
}
|
|
10855
|
+
function bound(position, min2, max2) {
|
|
10856
|
+
let ret = position;
|
|
10857
|
+
if (min2 !== void 0) {
|
|
10858
|
+
ret = Math.max(position, min2);
|
|
10859
|
+
}
|
|
10860
|
+
if (max2 !== void 0) {
|
|
10861
|
+
ret = Math.min(ret, max2);
|
|
10862
|
+
}
|
|
10863
|
+
return ret;
|
|
10864
|
+
}
|
|
10865
|
+
const useTabListScroll = (targetRef, activeIndex) => {
|
|
10866
|
+
const [{
|
|
10867
|
+
scrollLeft
|
|
10868
|
+
}, api] = useSpring(() => ({
|
|
10869
|
+
scrollLeft: 0,
|
|
10870
|
+
config: {
|
|
10871
|
+
tension: 300,
|
|
10872
|
+
clamp: true
|
|
10873
|
+
}
|
|
10874
|
+
}));
|
|
10875
|
+
function animate(immediate = false) {
|
|
10876
|
+
const container = targetRef.current;
|
|
10877
|
+
if (!container)
|
|
10390
10878
|
return;
|
|
10391
10879
|
if (activeIndex === void 0)
|
|
10392
10880
|
return;
|
|
@@ -10428,7 +10916,7 @@ const useTabListScroll = (targetRef, activeIndex) => {
|
|
|
10428
10916
|
};
|
|
10429
10917
|
};
|
|
10430
10918
|
const scrollMask = "";
|
|
10431
|
-
const classPrefix$
|
|
10919
|
+
const classPrefix$1b = `adm-scroll-mask`;
|
|
10432
10920
|
const ScrollMask$1 = (props) => {
|
|
10433
10921
|
const maskRef = useRef(null);
|
|
10434
10922
|
const [{
|
|
@@ -10475,12 +10963,12 @@ const ScrollMask$1 = (props) => {
|
|
|
10475
10963
|
}, []);
|
|
10476
10964
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(animated.div, {
|
|
10477
10965
|
ref: maskRef,
|
|
10478
|
-
className: classNames(classPrefix$
|
|
10966
|
+
className: classNames(classPrefix$1b, `${classPrefix$1b}-left`),
|
|
10479
10967
|
style: {
|
|
10480
10968
|
opacity: leftMaskOpacity
|
|
10481
10969
|
}
|
|
10482
10970
|
}), React__default.createElement(animated.div, {
|
|
10483
|
-
className: classNames(classPrefix$
|
|
10971
|
+
className: classNames(classPrefix$1b, `${classPrefix$1b}-right`),
|
|
10484
10972
|
style: {
|
|
10485
10973
|
opacity: rightMaskOpacity
|
|
10486
10974
|
}
|
|
@@ -10687,7 +11175,7 @@ function traverseReactNode(children, fn) {
|
|
|
10687
11175
|
}
|
|
10688
11176
|
handle(children);
|
|
10689
11177
|
}
|
|
10690
|
-
const classPrefix$
|
|
11178
|
+
const classPrefix$1a = `adm-capsule-tabs`;
|
|
10691
11179
|
const CapsuleTab = () => null;
|
|
10692
11180
|
const CapsuleTabs = (props) => {
|
|
10693
11181
|
var _a;
|
|
@@ -10726,19 +11214,19 @@ const CapsuleTabs = (props) => {
|
|
|
10726
11214
|
animate(true);
|
|
10727
11215
|
}, rootRef);
|
|
10728
11216
|
return withNativeProps(props, React__default.createElement("div", {
|
|
10729
|
-
className: classPrefix$
|
|
11217
|
+
className: classPrefix$1a,
|
|
10730
11218
|
ref: rootRef
|
|
10731
11219
|
}, React__default.createElement("div", {
|
|
10732
|
-
className: `${classPrefix$
|
|
11220
|
+
className: `${classPrefix$1a}-header`
|
|
10733
11221
|
}, React__default.createElement(ScrollMask, {
|
|
10734
11222
|
scrollTrackRef: tabListContainerRef
|
|
10735
11223
|
}), React__default.createElement(animated.div, {
|
|
10736
|
-
className: `${classPrefix$
|
|
11224
|
+
className: `${classPrefix$1a}-tab-list`,
|
|
10737
11225
|
ref: tabListContainerRef,
|
|
10738
11226
|
scrollLeft
|
|
10739
11227
|
}, panes.map((pane) => withNativeProps(pane.props, React__default.createElement("div", {
|
|
10740
11228
|
key: pane.key,
|
|
10741
|
-
className: `${classPrefix$
|
|
11229
|
+
className: `${classPrefix$1a}-tab-wrapper`
|
|
10742
11230
|
}, React__default.createElement("div", {
|
|
10743
11231
|
onClick: () => {
|
|
10744
11232
|
const {
|
|
@@ -10751,9 +11239,9 @@ const CapsuleTabs = (props) => {
|
|
|
10751
11239
|
}
|
|
10752
11240
|
setActiveKey(key.toString());
|
|
10753
11241
|
},
|
|
10754
|
-
className: classNames(`${classPrefix$
|
|
10755
|
-
[`${classPrefix$
|
|
10756
|
-
[`${classPrefix$
|
|
11242
|
+
className: classNames(`${classPrefix$1a}-tab`, {
|
|
11243
|
+
[`${classPrefix$1a}-tab-active`]: pane.key === activeKey,
|
|
11244
|
+
[`${classPrefix$1a}-tab-disabled`]: pane.props.disabled
|
|
10757
11245
|
})
|
|
10758
11246
|
}, pane.props.title)))))), panes.map((pane) => {
|
|
10759
11247
|
if (pane.props.children === void 0) {
|
|
@@ -10766,7 +11254,7 @@ const CapsuleTabs = (props) => {
|
|
|
10766
11254
|
forceRender: pane.props.forceRender,
|
|
10767
11255
|
destroyOnClose: pane.props.destroyOnClose
|
|
10768
11256
|
}, React__default.createElement("div", {
|
|
10769
|
-
className: `${classPrefix$
|
|
11257
|
+
className: `${classPrefix$1a}-content`,
|
|
10770
11258
|
style: {
|
|
10771
11259
|
display: active ? "block" : "none"
|
|
10772
11260
|
}
|
|
@@ -10777,18 +11265,18 @@ const index$i = attachPropertiesToComponent(CapsuleTabs, {
|
|
|
10777
11265
|
Tab: CapsuleTab
|
|
10778
11266
|
});
|
|
10779
11267
|
const card = "";
|
|
10780
|
-
const classPrefix$
|
|
11268
|
+
const classPrefix$19 = `adm-card`;
|
|
10781
11269
|
const Card$1 = (props) => {
|
|
10782
11270
|
const renderHeader = () => {
|
|
10783
11271
|
if (!(props.title || props.extra)) {
|
|
10784
11272
|
return null;
|
|
10785
11273
|
}
|
|
10786
11274
|
return React__default.createElement("div", {
|
|
10787
|
-
className: classNames(`${classPrefix$
|
|
11275
|
+
className: classNames(`${classPrefix$19}-header`, props.headerClassName),
|
|
10788
11276
|
style: props.headerStyle,
|
|
10789
11277
|
onClick: props.onHeaderClick
|
|
10790
11278
|
}, React__default.createElement("div", {
|
|
10791
|
-
className: `${classPrefix$
|
|
11279
|
+
className: `${classPrefix$19}-header-title`
|
|
10792
11280
|
}, props.title), props.extra);
|
|
10793
11281
|
};
|
|
10794
11282
|
const renderBody = () => {
|
|
@@ -10796,13 +11284,13 @@ const Card$1 = (props) => {
|
|
|
10796
11284
|
return null;
|
|
10797
11285
|
}
|
|
10798
11286
|
return React__default.createElement("div", {
|
|
10799
|
-
className: classNames(`${classPrefix$
|
|
11287
|
+
className: classNames(`${classPrefix$19}-body`, props.bodyClassName),
|
|
10800
11288
|
style: props.bodyStyle,
|
|
10801
11289
|
onClick: props.onBodyClick
|
|
10802
11290
|
}, props.children);
|
|
10803
11291
|
};
|
|
10804
11292
|
return withNativeProps(props, React__default.createElement("div", {
|
|
10805
|
-
className: classPrefix$
|
|
11293
|
+
className: classPrefix$19,
|
|
10806
11294
|
onClick: props.onClick
|
|
10807
11295
|
}, renderHeader(), renderBody()));
|
|
10808
11296
|
};
|
|
@@ -10820,17 +11308,6 @@ function rubberbandIfOutOfBounds(position, min2, max2, dimension, constant2 = 0.
|
|
|
10820
11308
|
return +rubberband(position - max2, dimension, constant2) + max2;
|
|
10821
11309
|
return position;
|
|
10822
11310
|
}
|
|
10823
|
-
const isDev = true;
|
|
10824
|
-
function devWarning(component, message) {
|
|
10825
|
-
if (isDev) {
|
|
10826
|
-
console.warn(`[antd-mobile: ${component}] ${message}`);
|
|
10827
|
-
}
|
|
10828
|
-
}
|
|
10829
|
-
function devError(component, message) {
|
|
10830
|
-
if (isDev) {
|
|
10831
|
-
console.error(`[antd-mobile: ${component}] ${message}`);
|
|
10832
|
-
}
|
|
10833
|
-
}
|
|
10834
11311
|
function measureCSSLength(raw) {
|
|
10835
11312
|
if (raw === null || raw === void 0 || raw === "") {
|
|
10836
11313
|
{
|
|
@@ -10852,7 +11329,7 @@ function measureCSSLength(raw) {
|
|
|
10852
11329
|
return 0;
|
|
10853
11330
|
}
|
|
10854
11331
|
}
|
|
10855
|
-
const classPrefix$
|
|
11332
|
+
const classPrefix$18 = `adm-picker-view`;
|
|
10856
11333
|
const Wheel = memo((props) => {
|
|
10857
11334
|
const {
|
|
10858
11335
|
value,
|
|
@@ -11019,13 +11496,13 @@ const Wheel = memo((props) => {
|
|
|
11019
11496
|
const previous = column[previousIndex];
|
|
11020
11497
|
const next = column[nextIndex];
|
|
11021
11498
|
return React__default.createElement("div", {
|
|
11022
|
-
className: `${classPrefix$
|
|
11499
|
+
className: `${classPrefix$18}-column-accessible`
|
|
11023
11500
|
}, React__default.createElement("div", {
|
|
11024
|
-
className: `${classPrefix$
|
|
11501
|
+
className: `${classPrefix$18}-column-accessible-current`,
|
|
11025
11502
|
role: "button",
|
|
11026
11503
|
"aria-label": current ? `\u5F53\u524D\u9009\u62E9\u7684\u662F\uFF1A${current.label}` : "\u5F53\u524D\u672A\u9009\u62E9"
|
|
11027
11504
|
}, "-"), React__default.createElement("div", {
|
|
11028
|
-
className: `${classPrefix$
|
|
11505
|
+
className: `${classPrefix$18}-column-accessible-button`,
|
|
11029
11506
|
onClick: () => {
|
|
11030
11507
|
if (!previous)
|
|
11031
11508
|
return;
|
|
@@ -11034,7 +11511,7 @@ const Wheel = memo((props) => {
|
|
|
11034
11511
|
role: previous ? "button" : "text",
|
|
11035
11512
|
"aria-label": !previous ? "\u6CA1\u6709\u4E0A\u4E00\u9879" : `\u9009\u62E9\u4E0A\u4E00\u9879\uFF1A${previous.label}`
|
|
11036
11513
|
}, "-"), React__default.createElement("div", {
|
|
11037
|
-
className: `${classPrefix$
|
|
11514
|
+
className: `${classPrefix$18}-column-accessible-button`,
|
|
11038
11515
|
onClick: () => {
|
|
11039
11516
|
if (!next)
|
|
11040
11517
|
return;
|
|
@@ -11045,16 +11522,16 @@ const Wheel = memo((props) => {
|
|
|
11045
11522
|
}, "-"));
|
|
11046
11523
|
}
|
|
11047
11524
|
return React__default.createElement("div", {
|
|
11048
|
-
className: `${classPrefix$
|
|
11525
|
+
className: `${classPrefix$18}-column`
|
|
11049
11526
|
}, React__default.createElement("div", {
|
|
11050
|
-
className: `${classPrefix$
|
|
11527
|
+
className: `${classPrefix$18}-item-height-measure`,
|
|
11051
11528
|
ref: itemHeightMeasureRef
|
|
11052
11529
|
}), React__default.createElement(animated.div, {
|
|
11053
11530
|
ref: rootRef,
|
|
11054
11531
|
style: {
|
|
11055
11532
|
translateY: y
|
|
11056
11533
|
},
|
|
11057
|
-
className: `${classPrefix$
|
|
11534
|
+
className: `${classPrefix$18}-column-wheel`,
|
|
11058
11535
|
"aria-hidden": true
|
|
11059
11536
|
}, column.map((item, index2) => {
|
|
11060
11537
|
var _a;
|
|
@@ -11068,12 +11545,12 @@ const Wheel = memo((props) => {
|
|
|
11068
11545
|
return React__default.createElement("div", {
|
|
11069
11546
|
key: (_a = item.key) !== null && _a !== void 0 ? _a : item.value,
|
|
11070
11547
|
"data-selected": item.value === value,
|
|
11071
|
-
className: `${classPrefix$
|
|
11548
|
+
className: `${classPrefix$18}-column-item`,
|
|
11072
11549
|
onClick: handleClick,
|
|
11073
11550
|
"aria-hidden": !selected,
|
|
11074
11551
|
"aria-label": selected ? "active" : ""
|
|
11075
11552
|
}, React__default.createElement("div", {
|
|
11076
|
-
className: `${classPrefix$
|
|
11553
|
+
className: `${classPrefix$18}-column-item-label`
|
|
11077
11554
|
}, renderLabel(item)));
|
|
11078
11555
|
})), renderAccessible());
|
|
11079
11556
|
}, (prev, next) => {
|
|
@@ -11180,7 +11657,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
11180
11657
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
11181
11658
|
}
|
|
11182
11659
|
var objectIs = typeof Object.is === "function" ? Object.is : is2;
|
|
11183
|
-
var useState2 = React2.useState, useEffect2 = React2.useEffect,
|
|
11660
|
+
var useState2 = React2.useState, useEffect2 = React2.useEffect, useLayoutEffect3 = React2.useLayoutEffect, useDebugValue = React2.useDebugValue;
|
|
11184
11661
|
var didWarnOld18Alpha = false;
|
|
11185
11662
|
var didWarnUncachedGetSnapshot = false;
|
|
11186
11663
|
function useSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot) {
|
|
@@ -11208,7 +11685,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
11208
11685
|
getSnapshot
|
|
11209
11686
|
}
|
|
11210
11687
|
}), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
11211
|
-
|
|
11688
|
+
useLayoutEffect3(function() {
|
|
11212
11689
|
inst.value = value;
|
|
11213
11690
|
inst.getSnapshot = getSnapshot;
|
|
11214
11691
|
if (checkIfSnapshotChanged(inst)) {
|
|
@@ -11296,19 +11773,19 @@ function subscribe(onStoreChange) {
|
|
|
11296
11773
|
function useMotionReduced() {
|
|
11297
11774
|
return shim.exports.useSyncExternalStore(subscribe, isMotionReduced, isMotionReduced);
|
|
11298
11775
|
}
|
|
11299
|
-
const classPrefix$
|
|
11776
|
+
const classPrefix$17 = "adm-spin-loading";
|
|
11300
11777
|
const colorRecord$2 = {
|
|
11301
11778
|
default: "var(--adm-color-weak)",
|
|
11302
11779
|
primary: "var(--adm-color-primary)",
|
|
11303
11780
|
white: "var(--adm-color-white)"
|
|
11304
11781
|
};
|
|
11305
|
-
const defaultProps$
|
|
11782
|
+
const defaultProps$W = {
|
|
11306
11783
|
color: "default"
|
|
11307
11784
|
};
|
|
11308
11785
|
const circumference = 15 * 3.14159265358979 * 2;
|
|
11309
11786
|
const SpinLoading$1 = memo((p) => {
|
|
11310
11787
|
var _a;
|
|
11311
|
-
const props = mergeProps(defaultProps$
|
|
11788
|
+
const props = mergeProps(defaultProps$W, p);
|
|
11312
11789
|
const motionReduced = useMotionReduced();
|
|
11313
11790
|
const {
|
|
11314
11791
|
percent
|
|
@@ -11328,16 +11805,16 @@ const SpinLoading$1 = memo((p) => {
|
|
|
11328
11805
|
}
|
|
11329
11806
|
});
|
|
11330
11807
|
return withNativeProps(props, React__default.createElement(animated.div, {
|
|
11331
|
-
className: classPrefix$
|
|
11808
|
+
className: classPrefix$17,
|
|
11332
11809
|
style: {
|
|
11333
11810
|
"--color": (_a = colorRecord$2[props.color]) !== null && _a !== void 0 ? _a : props.color,
|
|
11334
11811
|
"--percent": percent
|
|
11335
11812
|
}
|
|
11336
11813
|
}, React__default.createElement("svg", {
|
|
11337
|
-
className: `${classPrefix$
|
|
11814
|
+
className: `${classPrefix$17}-svg`,
|
|
11338
11815
|
viewBox: "0 0 32 32"
|
|
11339
11816
|
}, React__default.createElement(animated.circle, {
|
|
11340
|
-
className: `${classPrefix$
|
|
11817
|
+
className: `${classPrefix$17}-fill`,
|
|
11341
11818
|
fill: "transparent",
|
|
11342
11819
|
strokeWidth: "2",
|
|
11343
11820
|
strokeDasharray: circumference,
|
|
@@ -11349,17 +11826,17 @@ const SpinLoading$1 = memo((p) => {
|
|
|
11349
11826
|
}))));
|
|
11350
11827
|
});
|
|
11351
11828
|
const SpinLoading = SpinLoading$1;
|
|
11352
|
-
const classPrefix$
|
|
11353
|
-
const defaultProps$
|
|
11829
|
+
const classPrefix$16 = `adm-picker-view`;
|
|
11830
|
+
const defaultProps$V = {
|
|
11354
11831
|
defaultValue: [],
|
|
11355
11832
|
renderLabel: defaultRenderLabel,
|
|
11356
11833
|
mouseWheel: false,
|
|
11357
11834
|
loadingContent: React__default.createElement("div", {
|
|
11358
|
-
className: `${classPrefix$
|
|
11835
|
+
className: `${classPrefix$16}-loading-content`
|
|
11359
11836
|
}, React__default.createElement(SpinLoading, null))
|
|
11360
11837
|
};
|
|
11361
11838
|
const PickerView$1 = memo((p) => {
|
|
11362
|
-
const props = mergeProps(defaultProps$
|
|
11839
|
+
const props = mergeProps(defaultProps$V, p);
|
|
11363
11840
|
const [innerValue, setInnerValue] = useState$1(props.value === void 0 ? props.defaultValue : props.value);
|
|
11364
11841
|
useEffect(() => {
|
|
11365
11842
|
if (props.value === void 0)
|
|
@@ -11400,7 +11877,7 @@ const PickerView$1 = memo((p) => {
|
|
|
11400
11877
|
});
|
|
11401
11878
|
}, []);
|
|
11402
11879
|
return withNativeProps(props, React__default.createElement("div", {
|
|
11403
|
-
className: `${classPrefix$
|
|
11880
|
+
className: `${classPrefix$16}`
|
|
11404
11881
|
}, props.loading ? props.loadingContent : React__default.createElement(React__default.Fragment, null, columns.map((column, index2) => React__default.createElement(Wheel, {
|
|
11405
11882
|
key: index2,
|
|
11406
11883
|
index: index2,
|
|
@@ -11410,20 +11887,20 @@ const PickerView$1 = memo((p) => {
|
|
|
11410
11887
|
renderLabel: props.renderLabel,
|
|
11411
11888
|
mouseWheel: props.mouseWheel
|
|
11412
11889
|
})), React__default.createElement("div", {
|
|
11413
|
-
className: `${classPrefix$
|
|
11890
|
+
className: `${classPrefix$16}-mask`
|
|
11414
11891
|
}, React__default.createElement("div", {
|
|
11415
|
-
className: `${classPrefix$
|
|
11892
|
+
className: `${classPrefix$16}-mask-top`
|
|
11416
11893
|
}), React__default.createElement("div", {
|
|
11417
|
-
className: `${classPrefix$
|
|
11894
|
+
className: `${classPrefix$16}-mask-middle`
|
|
11418
11895
|
}), React__default.createElement("div", {
|
|
11419
|
-
className: `${classPrefix$
|
|
11896
|
+
className: `${classPrefix$16}-mask-bottom`
|
|
11420
11897
|
})))));
|
|
11421
11898
|
});
|
|
11422
11899
|
PickerView$1.displayName = "PickerView";
|
|
11423
11900
|
const pickerView = "";
|
|
11424
11901
|
const PickerView = PickerView$1;
|
|
11425
|
-
const classPrefix$
|
|
11426
|
-
const defaultProps$
|
|
11902
|
+
const classPrefix$15 = `adm-picker`;
|
|
11903
|
+
const defaultProps$U = {
|
|
11427
11904
|
defaultValue: [],
|
|
11428
11905
|
closeOnMaskClick: true,
|
|
11429
11906
|
renderLabel: defaultRenderLabel,
|
|
@@ -11435,7 +11912,7 @@ const Picker$1 = memo(forwardRef((p, ref) => {
|
|
|
11435
11912
|
const {
|
|
11436
11913
|
locale
|
|
11437
11914
|
} = useConfig();
|
|
11438
|
-
const props = mergeProps(defaultProps$
|
|
11915
|
+
const props = mergeProps(defaultProps$U, {
|
|
11439
11916
|
confirmText: locale.common.confirm,
|
|
11440
11917
|
cancelText: locale.common.cancel
|
|
11441
11918
|
}, p);
|
|
@@ -11488,22 +11965,22 @@ const Picker$1 = memo(forwardRef((p, ref) => {
|
|
|
11488
11965
|
}
|
|
11489
11966
|
});
|
|
11490
11967
|
const pickerElement = withNativeProps(props, React__default.createElement("div", {
|
|
11491
|
-
className: classPrefix$
|
|
11968
|
+
className: classPrefix$15
|
|
11492
11969
|
}, React__default.createElement("div", {
|
|
11493
|
-
className: `${classPrefix$
|
|
11970
|
+
className: `${classPrefix$15}-header`
|
|
11494
11971
|
}, React__default.createElement("a", {
|
|
11495
11972
|
role: "button",
|
|
11496
|
-
className: `${classPrefix$
|
|
11973
|
+
className: `${classPrefix$15}-header-button`,
|
|
11497
11974
|
onClick: () => {
|
|
11498
11975
|
var _a2;
|
|
11499
11976
|
(_a2 = props.onCancel) === null || _a2 === void 0 ? void 0 : _a2.call(props);
|
|
11500
11977
|
setVisible(false);
|
|
11501
11978
|
}
|
|
11502
11979
|
}, props.cancelText), React__default.createElement("div", {
|
|
11503
|
-
className: `${classPrefix$
|
|
11980
|
+
className: `${classPrefix$15}-header-title`
|
|
11504
11981
|
}, props.title), React__default.createElement("a", {
|
|
11505
11982
|
role: "button",
|
|
11506
|
-
className: classNames(`${classPrefix$
|
|
11983
|
+
className: classNames(`${classPrefix$15}-header-button`, props.loading && `${classPrefix$15}-header-button-disabled`),
|
|
11507
11984
|
onClick: () => {
|
|
11508
11985
|
if (props.loading)
|
|
11509
11986
|
return;
|
|
@@ -11512,7 +11989,7 @@ const Picker$1 = memo(forwardRef((p, ref) => {
|
|
|
11512
11989
|
},
|
|
11513
11990
|
"aria-disabled": props.loading
|
|
11514
11991
|
}, props.confirmText)), React__default.createElement("div", {
|
|
11515
|
-
className: `${classPrefix$
|
|
11992
|
+
className: `${classPrefix$15}-body`
|
|
11516
11993
|
}, React__default.createElement(PickerView, {
|
|
11517
11994
|
loading: props.loading,
|
|
11518
11995
|
loadingContent: props.loadingContent,
|
|
@@ -11524,7 +12001,7 @@ const Picker$1 = memo(forwardRef((p, ref) => {
|
|
|
11524
12001
|
}))));
|
|
11525
12002
|
const popupElement = React__default.createElement(Popup, {
|
|
11526
12003
|
style: props.popupStyle,
|
|
11527
|
-
className: classNames(`${classPrefix$
|
|
12004
|
+
className: classNames(`${classPrefix$15}-popup`, props.popupClassName),
|
|
11528
12005
|
visible,
|
|
11529
12006
|
position: "bottom",
|
|
11530
12007
|
onMaskClick: () => {
|
|
@@ -11674,22 +12151,24 @@ const CascadePickerView$1 = (props) => {
|
|
|
11674
12151
|
const CascadePickerView = CascadePickerView$1;
|
|
11675
12152
|
const cascaderView = "";
|
|
11676
12153
|
const tabs = "";
|
|
11677
|
-
const classPrefix$
|
|
12154
|
+
const classPrefix$14 = `adm-tabs`;
|
|
11678
12155
|
const Tab = () => {
|
|
11679
12156
|
return null;
|
|
11680
12157
|
};
|
|
11681
|
-
const defaultProps$
|
|
12158
|
+
const defaultProps$T = {
|
|
11682
12159
|
activeLineMode: "auto",
|
|
11683
|
-
stretch: true
|
|
12160
|
+
stretch: true,
|
|
12161
|
+
direction: "ltr"
|
|
11684
12162
|
};
|
|
11685
12163
|
const Tabs$1 = (p) => {
|
|
11686
12164
|
var _a;
|
|
11687
|
-
const props = mergeProps(defaultProps$
|
|
12165
|
+
const props = mergeProps(defaultProps$T, p);
|
|
11688
12166
|
const tabListContainerRef = useRef(null);
|
|
11689
12167
|
const activeLineRef = useRef(null);
|
|
11690
12168
|
const keyToIndexRecord = {};
|
|
11691
12169
|
let firstActiveKey = null;
|
|
11692
12170
|
const panes = [];
|
|
12171
|
+
const isRTL2 = props.direction === "rtl";
|
|
11693
12172
|
traverseReactNode(props.children, (child, index2) => {
|
|
11694
12173
|
if (!isValidElement(child))
|
|
11695
12174
|
return;
|
|
@@ -11779,6 +12258,10 @@ const Tabs$1 = (p) => {
|
|
|
11779
12258
|
} else {
|
|
11780
12259
|
x2 = activeTabLeft + (activeTabWidth - activeLineWidth) / 2;
|
|
11781
12260
|
}
|
|
12261
|
+
if (isRTL2) {
|
|
12262
|
+
const w = ["auto", "full"].includes(props.activeLineMode) ? width2 : activeLineWidth;
|
|
12263
|
+
x2 = -(containerWidth - x2 - w);
|
|
12264
|
+
}
|
|
11782
12265
|
api.start({
|
|
11783
12266
|
x: x2,
|
|
11784
12267
|
width: width2,
|
|
@@ -11787,7 +12270,12 @@ const Tabs$1 = (p) => {
|
|
|
11787
12270
|
const maxScrollDistance = containerScrollWidth - containerWidth;
|
|
11788
12271
|
if (maxScrollDistance <= 0)
|
|
11789
12272
|
return;
|
|
11790
|
-
|
|
12273
|
+
let nextScrollLeft = 0;
|
|
12274
|
+
if (isRTL2) {
|
|
12275
|
+
nextScrollLeft = -bound(containerWidth / 2 - activeTabLeft + activeTabWidth / 2 - activeLineWidth, 0, maxScrollDistance);
|
|
12276
|
+
} else {
|
|
12277
|
+
nextScrollLeft = bound(activeTabLeft - (containerWidth - activeTabWidth) / 2, 0, maxScrollDistance);
|
|
12278
|
+
}
|
|
11791
12279
|
scrollApi.start({
|
|
11792
12280
|
scrollLeft: nextScrollLeft,
|
|
11793
12281
|
from: {
|
|
@@ -11819,8 +12307,15 @@ const Tabs$1 = (p) => {
|
|
|
11819
12307
|
if (!container)
|
|
11820
12308
|
return;
|
|
11821
12309
|
const scrollLeft2 = container.scrollLeft;
|
|
11822
|
-
|
|
11823
|
-
|
|
12310
|
+
let showLeftMask = false;
|
|
12311
|
+
let showRightMask = false;
|
|
12312
|
+
if (isRTL2) {
|
|
12313
|
+
showLeftMask = Math.round(-scrollLeft2) + container.offsetWidth < container.scrollWidth;
|
|
12314
|
+
showRightMask = scrollLeft2 < 0;
|
|
12315
|
+
} else {
|
|
12316
|
+
showLeftMask = scrollLeft2 > 0;
|
|
12317
|
+
showRightMask = scrollLeft2 + container.offsetWidth < container.scrollWidth;
|
|
12318
|
+
}
|
|
11824
12319
|
maskApi.start({
|
|
11825
12320
|
leftMaskOpacity: showLeftMask ? 1 : 0,
|
|
11826
12321
|
rightMaskOpacity: showRightMask ? 1 : 0,
|
|
@@ -11835,36 +12330,39 @@ const Tabs$1 = (p) => {
|
|
|
11835
12330
|
updateMask(true);
|
|
11836
12331
|
}, []);
|
|
11837
12332
|
return withNativeProps(props, React__default.createElement("div", {
|
|
11838
|
-
className: classPrefix$
|
|
12333
|
+
className: classPrefix$14,
|
|
12334
|
+
style: {
|
|
12335
|
+
direction: props.direction
|
|
12336
|
+
}
|
|
11839
12337
|
}, React__default.createElement("div", {
|
|
11840
|
-
className: `${classPrefix$
|
|
12338
|
+
className: `${classPrefix$14}-header`
|
|
11841
12339
|
}, React__default.createElement(animated.div, {
|
|
11842
|
-
className: classNames(`${classPrefix$
|
|
12340
|
+
className: classNames(`${classPrefix$14}-header-mask`, `${classPrefix$14}-header-mask-left`),
|
|
11843
12341
|
style: {
|
|
11844
12342
|
opacity: leftMaskOpacity
|
|
11845
12343
|
}
|
|
11846
12344
|
}), React__default.createElement(animated.div, {
|
|
11847
|
-
className: classNames(`${classPrefix$
|
|
12345
|
+
className: classNames(`${classPrefix$14}-header-mask`, `${classPrefix$14}-header-mask-right`),
|
|
11848
12346
|
style: {
|
|
11849
12347
|
opacity: rightMaskOpacity
|
|
11850
12348
|
}
|
|
11851
12349
|
}), React__default.createElement(animated.div, {
|
|
11852
|
-
className: `${classPrefix$
|
|
12350
|
+
className: `${classPrefix$14}-tab-list`,
|
|
11853
12351
|
ref: tabListContainerRef,
|
|
11854
12352
|
scrollLeft,
|
|
11855
12353
|
onScroll: updateMask,
|
|
11856
12354
|
role: "tablist"
|
|
11857
12355
|
}, React__default.createElement(animated.div, {
|
|
11858
12356
|
ref: activeLineRef,
|
|
11859
|
-
className: `${classPrefix$
|
|
12357
|
+
className: `${classPrefix$14}-tab-line`,
|
|
11860
12358
|
style: {
|
|
11861
12359
|
width: props.activeLineMode === "fixed" ? "var(--fixed-active-line-width, 30px)" : width,
|
|
11862
12360
|
x
|
|
11863
12361
|
}
|
|
11864
12362
|
}), panes.map((pane) => withNativeProps(pane.props, React__default.createElement("div", {
|
|
11865
12363
|
key: pane.key,
|
|
11866
|
-
className: classNames(`${classPrefix$
|
|
11867
|
-
[`${classPrefix$
|
|
12364
|
+
className: classNames(`${classPrefix$14}-tab-wrapper`, {
|
|
12365
|
+
[`${classPrefix$14}-tab-wrapper-stretch`]: props.stretch
|
|
11868
12366
|
})
|
|
11869
12367
|
}, React__default.createElement("div", {
|
|
11870
12368
|
onClick: () => {
|
|
@@ -11878,9 +12376,9 @@ const Tabs$1 = (p) => {
|
|
|
11878
12376
|
}
|
|
11879
12377
|
setActiveKey(key.toString());
|
|
11880
12378
|
},
|
|
11881
|
-
className: classNames(`${classPrefix$
|
|
11882
|
-
[`${classPrefix$
|
|
11883
|
-
[`${classPrefix$
|
|
12379
|
+
className: classNames(`${classPrefix$14}-tab`, {
|
|
12380
|
+
[`${classPrefix$14}-tab-active`]: pane.key === activeKey,
|
|
12381
|
+
[`${classPrefix$14}-tab-disabled`]: pane.props.disabled
|
|
11884
12382
|
}),
|
|
11885
12383
|
role: "tab",
|
|
11886
12384
|
"aria-selected": pane.key === activeKey
|
|
@@ -11895,7 +12393,7 @@ const Tabs$1 = (p) => {
|
|
|
11895
12393
|
forceRender: pane.props.forceRender,
|
|
11896
12394
|
destroyOnClose: pane.props.destroyOnClose
|
|
11897
12395
|
}, React__default.createElement("div", {
|
|
11898
|
-
className: `${classPrefix$
|
|
12396
|
+
className: `${classPrefix$14}-content`,
|
|
11899
12397
|
style: {
|
|
11900
12398
|
display: active ? "block" : "none"
|
|
11901
12399
|
}
|
|
@@ -11907,12 +12405,12 @@ const Tabs = attachPropertiesToComponent(Tabs$1, {
|
|
|
11907
12405
|
});
|
|
11908
12406
|
const checkList = "";
|
|
11909
12407
|
const list = "";
|
|
11910
|
-
const classPrefix$
|
|
11911
|
-
const defaultProps$
|
|
12408
|
+
const classPrefix$13 = `adm-list`;
|
|
12409
|
+
const defaultProps$S = {
|
|
11912
12410
|
mode: "default"
|
|
11913
12411
|
};
|
|
11914
12412
|
const List$2 = forwardRef((p, ref) => {
|
|
11915
|
-
const props = mergeProps(defaultProps$
|
|
12413
|
+
const props = mergeProps(defaultProps$S, p);
|
|
11916
12414
|
const nativeElementRef = useRef(null);
|
|
11917
12415
|
useImperativeHandle(ref, () => ({
|
|
11918
12416
|
get nativeElement() {
|
|
@@ -11920,41 +12418,41 @@ const List$2 = forwardRef((p, ref) => {
|
|
|
11920
12418
|
}
|
|
11921
12419
|
}));
|
|
11922
12420
|
return withNativeProps(props, React__default.createElement("div", {
|
|
11923
|
-
className: classNames(classPrefix$
|
|
12421
|
+
className: classNames(classPrefix$13, `${classPrefix$13}-${props.mode}`),
|
|
11924
12422
|
ref: nativeElementRef
|
|
11925
12423
|
}, props.header && React__default.createElement("div", {
|
|
11926
|
-
className: `${classPrefix$
|
|
12424
|
+
className: `${classPrefix$13}-header`
|
|
11927
12425
|
}, props.header), React__default.createElement("div", {
|
|
11928
|
-
className: `${classPrefix$
|
|
12426
|
+
className: `${classPrefix$13}-body`
|
|
11929
12427
|
}, React__default.createElement("div", {
|
|
11930
|
-
className: `${classPrefix$
|
|
12428
|
+
className: `${classPrefix$13}-body-inner`
|
|
11931
12429
|
}, props.children))));
|
|
11932
12430
|
});
|
|
11933
12431
|
function isNodeWithContent(node) {
|
|
11934
12432
|
return node !== void 0 && node !== null && node !== false;
|
|
11935
12433
|
}
|
|
11936
|
-
const classPrefix$
|
|
12434
|
+
const classPrefix$12 = `adm-list-item`;
|
|
11937
12435
|
const ListItem = (props) => {
|
|
11938
12436
|
var _a;
|
|
11939
12437
|
const clickable = (_a = props.clickable) !== null && _a !== void 0 ? _a : !!props.onClick;
|
|
11940
12438
|
const arrow2 = props.arrow === void 0 ? clickable : props.arrow;
|
|
11941
12439
|
const content = React__default.createElement("div", {
|
|
11942
|
-
className: `${classPrefix$
|
|
12440
|
+
className: `${classPrefix$12}-content`
|
|
11943
12441
|
}, isNodeWithContent(props.prefix) && React__default.createElement("div", {
|
|
11944
|
-
className: `${classPrefix$
|
|
12442
|
+
className: `${classPrefix$12}-content-prefix`
|
|
11945
12443
|
}, props.prefix), React__default.createElement("div", {
|
|
11946
|
-
className: `${classPrefix$
|
|
12444
|
+
className: `${classPrefix$12}-content-main`
|
|
11947
12445
|
}, isNodeWithContent(props.title) && React__default.createElement("div", {
|
|
11948
|
-
className: `${classPrefix$
|
|
12446
|
+
className: `${classPrefix$12}-title`
|
|
11949
12447
|
}, props.title), props.children, isNodeWithContent(props.description) && React__default.createElement("div", {
|
|
11950
|
-
className: `${classPrefix$
|
|
12448
|
+
className: `${classPrefix$12}-description`
|
|
11951
12449
|
}, props.description)), isNodeWithContent(props.extra) && React__default.createElement("div", {
|
|
11952
|
-
className: `${classPrefix$
|
|
12450
|
+
className: `${classPrefix$12}-content-extra`
|
|
11953
12451
|
}, props.extra), isNodeWithContent(arrow2) && React__default.createElement("div", {
|
|
11954
|
-
className: `${classPrefix$
|
|
12452
|
+
className: `${classPrefix$12}-content-arrow`
|
|
11955
12453
|
}, arrow2 === true ? React__default.createElement(RightOutline, null) : arrow2));
|
|
11956
12454
|
return withNativeProps(props, React__default.createElement(clickable ? "a" : "div", {
|
|
11957
|
-
className: classNames(`${classPrefix$
|
|
12455
|
+
className: classNames(`${classPrefix$12}`, clickable ? ["adm-plain-anchor"] : [], props.disabled && `${classPrefix$12}-disabled`),
|
|
11958
12456
|
onClick: props.disabled ? void 0 : props.onClick
|
|
11959
12457
|
}, content));
|
|
11960
12458
|
};
|
|
@@ -11962,14 +12460,14 @@ const List$1 = attachPropertiesToComponent(List$2, {
|
|
|
11962
12460
|
Item: ListItem
|
|
11963
12461
|
});
|
|
11964
12462
|
const CheckListContext = createContext(null);
|
|
11965
|
-
const classPrefix$
|
|
11966
|
-
const defaultProps$
|
|
12463
|
+
const classPrefix$11 = "adm-check-list";
|
|
12464
|
+
const defaultProps$R = {
|
|
11967
12465
|
multiple: false,
|
|
11968
12466
|
defaultValue: [],
|
|
11969
12467
|
activeIcon: React__default.createElement(CheckOutline, null)
|
|
11970
12468
|
};
|
|
11971
12469
|
const CheckList$1 = (p) => {
|
|
11972
|
-
const props = mergeProps(defaultProps$
|
|
12470
|
+
const props = mergeProps(defaultProps$R, p);
|
|
11973
12471
|
const [value, setValue2] = usePropsValue(props);
|
|
11974
12472
|
function check(val) {
|
|
11975
12473
|
if (props.multiple) {
|
|
@@ -11999,10 +12497,10 @@ const CheckList$1 = (p) => {
|
|
|
11999
12497
|
}
|
|
12000
12498
|
}, withNativeProps(props, React__default.createElement(List$1, {
|
|
12001
12499
|
mode: props.mode,
|
|
12002
|
-
className: classPrefix$
|
|
12500
|
+
className: classPrefix$11
|
|
12003
12501
|
}, props.children)));
|
|
12004
12502
|
};
|
|
12005
|
-
const classPrefix$
|
|
12503
|
+
const classPrefix$10 = `adm-check-list-item`;
|
|
12006
12504
|
const CheckListItem = (props) => {
|
|
12007
12505
|
const context = useContext(CheckListContext);
|
|
12008
12506
|
if (context === null) {
|
|
@@ -12014,11 +12512,11 @@ const CheckListItem = (props) => {
|
|
|
12014
12512
|
const defaultExtra = active ? context.activeIcon : null;
|
|
12015
12513
|
const renderExtra = context.extra ? context.extra(active) : defaultExtra;
|
|
12016
12514
|
const extra = React__default.createElement("div", {
|
|
12017
|
-
className: `${classPrefix$
|
|
12515
|
+
className: `${classPrefix$10}-extra`
|
|
12018
12516
|
}, renderExtra);
|
|
12019
12517
|
return withNativeProps(props, React__default.createElement(List$1.Item, {
|
|
12020
12518
|
title: props.title,
|
|
12021
|
-
className: classNames(classPrefix$
|
|
12519
|
+
className: classNames(classPrefix$10, readOnly && `${classPrefix$10}-readonly`, active && `${classPrefix$10}-active`),
|
|
12022
12520
|
description: props.description,
|
|
12023
12521
|
prefix: props.prefix,
|
|
12024
12522
|
onClick: (e2) => {
|
|
@@ -12109,18 +12607,18 @@ function generateIntArray(from, to2) {
|
|
|
12109
12607
|
}
|
|
12110
12608
|
return array4;
|
|
12111
12609
|
}
|
|
12112
|
-
const classPrefix
|
|
12610
|
+
const classPrefix$$ = "adm-skeleton";
|
|
12113
12611
|
const Skeleton$1 = (props) => {
|
|
12114
12612
|
return withNativeProps(props, React__default.createElement("div", {
|
|
12115
|
-
className: classNames(classPrefix
|
|
12116
|
-
[`${classPrefix
|
|
12613
|
+
className: classNames(classPrefix$$, {
|
|
12614
|
+
[`${classPrefix$$}-animated`]: props.animated
|
|
12117
12615
|
})
|
|
12118
12616
|
}));
|
|
12119
12617
|
};
|
|
12120
12618
|
const SkeletonTitle = (props) => {
|
|
12121
12619
|
return withNativeProps(props, React__default.createElement(Skeleton$1, {
|
|
12122
12620
|
animated: props.animated,
|
|
12123
|
-
className: `${classPrefix
|
|
12621
|
+
className: `${classPrefix$$}-title`
|
|
12124
12622
|
}));
|
|
12125
12623
|
};
|
|
12126
12624
|
const defaultSkeletonParagraphProps = {
|
|
@@ -12130,11 +12628,11 @@ const SkeletonParagraph = (p) => {
|
|
|
12130
12628
|
const props = mergeProps(defaultSkeletonParagraphProps, p);
|
|
12131
12629
|
const keys2 = generateIntArray(1, props.lineCount);
|
|
12132
12630
|
const node = React__default.createElement("div", {
|
|
12133
|
-
className: `${classPrefix
|
|
12631
|
+
className: `${classPrefix$$}-paragraph`
|
|
12134
12632
|
}, keys2.map((key) => React__default.createElement(Skeleton$1, {
|
|
12135
12633
|
key,
|
|
12136
12634
|
animated: props.animated,
|
|
12137
|
-
className: `${classPrefix
|
|
12635
|
+
className: `${classPrefix$$}-paragraph-line`
|
|
12138
12636
|
})));
|
|
12139
12637
|
return withNativeProps(props, node);
|
|
12140
12638
|
};
|
|
@@ -12142,16 +12640,29 @@ const Skeleton = attachPropertiesToComponent(Skeleton$1, {
|
|
|
12142
12640
|
Title: SkeletonTitle,
|
|
12143
12641
|
Paragraph: SkeletonParagraph
|
|
12144
12642
|
});
|
|
12145
|
-
const
|
|
12146
|
-
const
|
|
12643
|
+
const useFieldNames = (fieldNames = {}) => {
|
|
12644
|
+
const fields = useMemo(() => {
|
|
12645
|
+
const {
|
|
12646
|
+
label = "label",
|
|
12647
|
+
value = "value",
|
|
12648
|
+
disabled = "disabled",
|
|
12649
|
+
children = "children"
|
|
12650
|
+
} = fieldNames;
|
|
12651
|
+
return [label, value, children, disabled];
|
|
12652
|
+
}, [JSON.stringify(fieldNames)]);
|
|
12653
|
+
return fields;
|
|
12654
|
+
};
|
|
12655
|
+
const classPrefix$_ = `adm-cascader-view`;
|
|
12656
|
+
const defaultProps$Q = {
|
|
12147
12657
|
defaultValue: []
|
|
12148
12658
|
};
|
|
12149
12659
|
const CascaderView$1 = (p) => {
|
|
12660
|
+
const props = mergeProps(defaultProps$Q, p);
|
|
12150
12661
|
const {
|
|
12151
12662
|
locale
|
|
12152
12663
|
} = useConfig();
|
|
12153
|
-
const
|
|
12154
|
-
const
|
|
12664
|
+
const generateValueExtend = useCascaderValueExtend(props.options);
|
|
12665
|
+
const [labelName, valueName, childrenName, disabledName] = useFieldNames(props.fieldNames);
|
|
12155
12666
|
const [value, setValue2] = usePropsValue(Object.assign(Object.assign({}, props), {
|
|
12156
12667
|
onChange: (val) => {
|
|
12157
12668
|
var _a;
|
|
@@ -12159,26 +12670,21 @@ const CascaderView$1 = (p) => {
|
|
|
12159
12670
|
}
|
|
12160
12671
|
}));
|
|
12161
12672
|
const [tabActiveIndex, setTabActiveIndex] = useState$1(0);
|
|
12162
|
-
useUpdateEffect(() => {
|
|
12163
|
-
var _a;
|
|
12164
|
-
(_a = props.onTabsChange) === null || _a === void 0 ? void 0 : _a.call(props, tabActiveIndex);
|
|
12165
|
-
}, [tabActiveIndex]);
|
|
12166
|
-
const generateValueExtend = useCascaderValueExtend(props.options);
|
|
12167
12673
|
const levels = useMemo(() => {
|
|
12168
12674
|
const ret = [];
|
|
12169
12675
|
let currentOptions = props.options;
|
|
12170
12676
|
let reachedEnd = false;
|
|
12171
12677
|
for (const v of value) {
|
|
12172
|
-
const target = currentOptions.find((option) => option
|
|
12678
|
+
const target = currentOptions.find((option) => option[valueName] === v);
|
|
12173
12679
|
ret.push({
|
|
12174
12680
|
selected: target,
|
|
12175
12681
|
options: currentOptions
|
|
12176
12682
|
});
|
|
12177
|
-
if (!target || !target
|
|
12683
|
+
if (!target || !target[childrenName]) {
|
|
12178
12684
|
reachedEnd = true;
|
|
12179
12685
|
break;
|
|
12180
12686
|
}
|
|
12181
|
-
currentOptions = target
|
|
12687
|
+
currentOptions = target[childrenName];
|
|
12182
12688
|
}
|
|
12183
12689
|
if (!reachedEnd) {
|
|
12184
12690
|
ret.push({
|
|
@@ -12188,6 +12694,10 @@ const CascaderView$1 = (p) => {
|
|
|
12188
12694
|
}
|
|
12189
12695
|
return ret;
|
|
12190
12696
|
}, [value, props.options]);
|
|
12697
|
+
useUpdateEffect(() => {
|
|
12698
|
+
var _a;
|
|
12699
|
+
(_a = props.onTabsChange) === null || _a === void 0 ? void 0 : _a.call(props, tabActiveIndex);
|
|
12700
|
+
}, [tabActiveIndex]);
|
|
12191
12701
|
useEffect(() => {
|
|
12192
12702
|
setTabActiveIndex(levels.length - 1);
|
|
12193
12703
|
}, [value]);
|
|
@@ -12205,8 +12715,9 @@ const CascaderView$1 = (p) => {
|
|
|
12205
12715
|
setValue2(next);
|
|
12206
12716
|
};
|
|
12207
12717
|
const whetherLoading = (options) => props.loading || options === optionSkeleton;
|
|
12718
|
+
const placeholder = props.placeholder || locale.Cascader.placeholder;
|
|
12208
12719
|
return withNativeProps(props, React__default.createElement("div", {
|
|
12209
|
-
className: classPrefix
|
|
12720
|
+
className: classPrefix$_
|
|
12210
12721
|
}, React__default.createElement(Tabs, {
|
|
12211
12722
|
activeKey: tabActiveIndex.toString(),
|
|
12212
12723
|
onChange: (key) => {
|
|
@@ -12214,53 +12725,53 @@ const CascaderView$1 = (p) => {
|
|
|
12214
12725
|
setTabActiveIndex(activeIndex);
|
|
12215
12726
|
},
|
|
12216
12727
|
stretch: false,
|
|
12217
|
-
className: `${classPrefix
|
|
12728
|
+
className: `${classPrefix$_}-tabs`
|
|
12218
12729
|
}, levels.map((level, index2) => {
|
|
12219
12730
|
const selected = level.selected;
|
|
12220
12731
|
return React__default.createElement(Tabs.Tab, {
|
|
12221
12732
|
key: index2.toString(),
|
|
12222
12733
|
title: React__default.createElement("div", {
|
|
12223
|
-
className: `${classPrefix
|
|
12224
|
-
}, selected ? selected
|
|
12734
|
+
className: `${classPrefix$_}-header-title`
|
|
12735
|
+
}, selected ? selected[labelName] : typeof placeholder === "function" ? placeholder(index2) : placeholder),
|
|
12225
12736
|
forceRender: true
|
|
12226
12737
|
}, React__default.createElement("div", {
|
|
12227
|
-
className: `${classPrefix
|
|
12738
|
+
className: `${classPrefix$_}-content`
|
|
12228
12739
|
}, whetherLoading(level.options) ? React__default.createElement("div", {
|
|
12229
|
-
className: `${classPrefix
|
|
12740
|
+
className: `${classPrefix$_}-skeleton`
|
|
12230
12741
|
}, React__default.createElement(Skeleton, {
|
|
12231
|
-
className: `${classPrefix
|
|
12742
|
+
className: `${classPrefix$_}-skeleton-line-1`,
|
|
12232
12743
|
animated: true
|
|
12233
12744
|
}), React__default.createElement(Skeleton, {
|
|
12234
|
-
className: `${classPrefix
|
|
12745
|
+
className: `${classPrefix$_}-skeleton-line-2`,
|
|
12235
12746
|
animated: true
|
|
12236
12747
|
}), React__default.createElement(Skeleton, {
|
|
12237
|
-
className: `${classPrefix
|
|
12748
|
+
className: `${classPrefix$_}-skeleton-line-3`,
|
|
12238
12749
|
animated: true
|
|
12239
12750
|
}), React__default.createElement(Skeleton, {
|
|
12240
|
-
className: `${classPrefix
|
|
12751
|
+
className: `${classPrefix$_}-skeleton-line-4`,
|
|
12241
12752
|
animated: true
|
|
12242
12753
|
})) : React__default.createElement(CheckList, {
|
|
12243
12754
|
value: [value[index2]],
|
|
12244
12755
|
onChange: (selectValue) => onItemSelect(selectValue[0], index2),
|
|
12245
12756
|
activeIcon: props.activeIcon
|
|
12246
12757
|
}, level.options.map((option) => {
|
|
12247
|
-
const active = value[index2] === option
|
|
12758
|
+
const active = value[index2] === option[valueName];
|
|
12248
12759
|
return React__default.createElement(CheckList.Item, {
|
|
12249
|
-
value: option
|
|
12250
|
-
key: option
|
|
12251
|
-
disabled: option
|
|
12252
|
-
className: classNames(`${classPrefix
|
|
12253
|
-
[`${classPrefix
|
|
12760
|
+
value: option[valueName],
|
|
12761
|
+
key: option[valueName],
|
|
12762
|
+
disabled: option[disabledName],
|
|
12763
|
+
className: classNames(`${classPrefix$_}-item`, {
|
|
12764
|
+
[`${classPrefix$_}-item-active`]: active
|
|
12254
12765
|
})
|
|
12255
|
-
}, option
|
|
12766
|
+
}, option[labelName]);
|
|
12256
12767
|
}))));
|
|
12257
12768
|
}))));
|
|
12258
12769
|
};
|
|
12259
12770
|
const CascaderView = attachPropertiesToComponent(CascaderView$1, {
|
|
12260
12771
|
optionSkeleton
|
|
12261
12772
|
});
|
|
12262
|
-
const classPrefix$
|
|
12263
|
-
const defaultProps$
|
|
12773
|
+
const classPrefix$Z = `adm-cascader`;
|
|
12774
|
+
const defaultProps$P = {
|
|
12264
12775
|
defaultValue: [],
|
|
12265
12776
|
destroyOnClose: true,
|
|
12266
12777
|
forceRender: false
|
|
@@ -12270,7 +12781,7 @@ const Cascader = forwardRef((p, ref) => {
|
|
|
12270
12781
|
const {
|
|
12271
12782
|
locale
|
|
12272
12783
|
} = useConfig();
|
|
12273
|
-
const props = mergeProps(defaultProps$
|
|
12784
|
+
const props = mergeProps(defaultProps$P, {
|
|
12274
12785
|
confirmText: locale.common.confirm,
|
|
12275
12786
|
cancelText: locale.common.cancel,
|
|
12276
12787
|
placeholder: locale.Cascader.placeholder
|
|
@@ -12311,26 +12822,26 @@ const Cascader = forwardRef((p, ref) => {
|
|
|
12311
12822
|
}
|
|
12312
12823
|
}, [visible, value]);
|
|
12313
12824
|
const cascaderElement = withNativeProps(props, React__default.createElement("div", {
|
|
12314
|
-
className: classPrefix$
|
|
12825
|
+
className: classPrefix$Z
|
|
12315
12826
|
}, React__default.createElement("div", {
|
|
12316
|
-
className: `${classPrefix$
|
|
12827
|
+
className: `${classPrefix$Z}-header`
|
|
12317
12828
|
}, React__default.createElement("a", {
|
|
12318
|
-
className: `${classPrefix$
|
|
12829
|
+
className: `${classPrefix$Z}-header-button`,
|
|
12319
12830
|
onClick: () => {
|
|
12320
12831
|
var _a2;
|
|
12321
12832
|
(_a2 = props.onCancel) === null || _a2 === void 0 ? void 0 : _a2.call(props);
|
|
12322
12833
|
setVisible(false);
|
|
12323
12834
|
}
|
|
12324
12835
|
}, props.cancelText), React__default.createElement("div", {
|
|
12325
|
-
className: `${classPrefix$
|
|
12836
|
+
className: `${classPrefix$Z}-header-title`
|
|
12326
12837
|
}, props.title), React__default.createElement("a", {
|
|
12327
|
-
className: `${classPrefix$
|
|
12838
|
+
className: `${classPrefix$Z}-header-button`,
|
|
12328
12839
|
onClick: () => {
|
|
12329
12840
|
setValue2(innerValue, true);
|
|
12330
12841
|
setVisible(false);
|
|
12331
12842
|
}
|
|
12332
12843
|
}, props.confirmText)), React__default.createElement("div", {
|
|
12333
|
-
className: `${classPrefix$
|
|
12844
|
+
className: `${classPrefix$Z}-body`
|
|
12334
12845
|
}, React__default.createElement(CascaderView, Object.assign({}, props, {
|
|
12335
12846
|
value: innerValue,
|
|
12336
12847
|
onChange: (val, ext) => {
|
|
@@ -12395,12 +12906,12 @@ const index$g = attachPropertiesToComponent(Cascader, {
|
|
|
12395
12906
|
optionSkeleton
|
|
12396
12907
|
});
|
|
12397
12908
|
const centerPopup = "";
|
|
12398
|
-
const classPrefix$
|
|
12399
|
-
const defaultProps$
|
|
12909
|
+
const classPrefix$Y = "adm-center-popup";
|
|
12910
|
+
const defaultProps$O = Object.assign(Object.assign({}, defaultPopupBaseProps), {
|
|
12400
12911
|
getContainer: null
|
|
12401
12912
|
});
|
|
12402
12913
|
const CenterPopup$1 = (p) => {
|
|
12403
|
-
const props = mergeProps(defaultProps$
|
|
12914
|
+
const props = mergeProps(defaultProps$O, p);
|
|
12404
12915
|
const unmountedRef = useUnmountedRef$1();
|
|
12405
12916
|
const style = useSpring({
|
|
12406
12917
|
scale: props.visible ? 1 : 0.8,
|
|
@@ -12433,11 +12944,11 @@ const CenterPopup$1 = (p) => {
|
|
|
12433
12944
|
useLockScroll(ref, props.disableBodyScroll && active);
|
|
12434
12945
|
const maskVisible = useInnerVisible(active && props.visible);
|
|
12435
12946
|
const body = React__default.createElement("div", {
|
|
12436
|
-
className: classNames(`${classPrefix$
|
|
12947
|
+
className: classNames(`${classPrefix$Y}-body`, props.bodyClassName),
|
|
12437
12948
|
style: props.bodyStyle
|
|
12438
12949
|
}, props.children);
|
|
12439
12950
|
const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React__default.createElement("div", {
|
|
12440
|
-
className: classPrefix$
|
|
12951
|
+
className: classPrefix$Y,
|
|
12441
12952
|
style: {
|
|
12442
12953
|
display: active ? void 0 : "none",
|
|
12443
12954
|
pointerEvents: active ? void 0 : "none"
|
|
@@ -12454,11 +12965,11 @@ const CenterPopup$1 = (p) => {
|
|
|
12454
12965
|
}
|
|
12455
12966
|
},
|
|
12456
12967
|
style: props.maskStyle,
|
|
12457
|
-
className: classNames(`${classPrefix$
|
|
12968
|
+
className: classNames(`${classPrefix$Y}-mask`, props.maskClassName),
|
|
12458
12969
|
disableBodyScroll: false,
|
|
12459
12970
|
stopPropagation: props.stopPropagation
|
|
12460
12971
|
}), React__default.createElement("div", {
|
|
12461
|
-
className: `${classPrefix$
|
|
12972
|
+
className: `${classPrefix$Y}-wrap`,
|
|
12462
12973
|
role: props.role,
|
|
12463
12974
|
"aria-label": props["aria-label"]
|
|
12464
12975
|
}, React__default.createElement(animated.div, {
|
|
@@ -12467,7 +12978,7 @@ const CenterPopup$1 = (p) => {
|
|
|
12467
12978
|
}),
|
|
12468
12979
|
ref
|
|
12469
12980
|
}, props.showCloseButton && React__default.createElement("a", {
|
|
12470
|
-
className: classNames(`${classPrefix$
|
|
12981
|
+
className: classNames(`${classPrefix$Y}-close`, "adm-plain-anchor"),
|
|
12471
12982
|
onClick: () => {
|
|
12472
12983
|
var _a;
|
|
12473
12984
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
@@ -12482,12 +12993,12 @@ const CenterPopup$1 = (p) => {
|
|
|
12482
12993
|
const CenterPopup = CenterPopup$1;
|
|
12483
12994
|
const checkbox = "";
|
|
12484
12995
|
const CheckboxGroupContext = createContext(null);
|
|
12485
|
-
const defaultProps$
|
|
12996
|
+
const defaultProps$N = {
|
|
12486
12997
|
disabled: false,
|
|
12487
12998
|
defaultValue: []
|
|
12488
12999
|
};
|
|
12489
13000
|
const Group$1 = (p) => {
|
|
12490
|
-
const props = mergeProps(defaultProps$
|
|
13001
|
+
const props = mergeProps(defaultProps$N, p);
|
|
12491
13002
|
const [value, setValue2] = usePropsValue(props);
|
|
12492
13003
|
return React__default.createElement(
|
|
12493
13004
|
CheckboxGroupContext.Provider,
|
|
@@ -12553,14 +13064,14 @@ const NativeInput = (props) => {
|
|
|
12553
13064
|
id: props.id
|
|
12554
13065
|
});
|
|
12555
13066
|
};
|
|
12556
|
-
const classPrefix$
|
|
12557
|
-
const defaultProps$
|
|
13067
|
+
const classPrefix$X = `adm-checkbox`;
|
|
13068
|
+
const defaultProps$M = {
|
|
12558
13069
|
defaultChecked: false,
|
|
12559
13070
|
indeterminate: false
|
|
12560
13071
|
};
|
|
12561
13072
|
const Checkbox$1 = forwardRef((p, ref) => {
|
|
12562
13073
|
const groupContext = useContext(CheckboxGroupContext);
|
|
12563
|
-
const props = mergeProps(defaultProps$
|
|
13074
|
+
const props = mergeProps(defaultProps$M, p);
|
|
12564
13075
|
let [checked, setChecked] = usePropsValue({
|
|
12565
13076
|
value: props.checked,
|
|
12566
13077
|
defaultValue: props.defaultChecked,
|
|
@@ -12605,20 +13116,20 @@ const Checkbox$1 = forwardRef((p, ref) => {
|
|
|
12605
13116
|
const renderIcon = () => {
|
|
12606
13117
|
if (props.icon) {
|
|
12607
13118
|
return React__default.createElement("div", {
|
|
12608
|
-
className: `${classPrefix$
|
|
13119
|
+
className: `${classPrefix$X}-custom-icon`
|
|
12609
13120
|
}, props.icon(checked, props.indeterminate));
|
|
12610
13121
|
}
|
|
12611
13122
|
return React__default.createElement("div", {
|
|
12612
|
-
className: `${classPrefix$
|
|
13123
|
+
className: `${classPrefix$X}-icon`
|
|
12613
13124
|
}, props.indeterminate ? React__default.createElement(IndeterminateIcon, null) : checked && React__default.createElement(CheckIcon, null));
|
|
12614
13125
|
};
|
|
12615
13126
|
return withNativeProps(props, React__default.createElement("label", {
|
|
12616
13127
|
onClick: props.onClick,
|
|
12617
|
-
className: classNames(classPrefix$
|
|
12618
|
-
[`${classPrefix$
|
|
12619
|
-
[`${classPrefix$
|
|
12620
|
-
[`${classPrefix$
|
|
12621
|
-
[`${classPrefix$
|
|
13128
|
+
className: classNames(classPrefix$X, {
|
|
13129
|
+
[`${classPrefix$X}-checked`]: checked && !props.indeterminate,
|
|
13130
|
+
[`${classPrefix$X}-indeterminate`]: props.indeterminate,
|
|
13131
|
+
[`${classPrefix$X}-disabled`]: disabled,
|
|
13132
|
+
[`${classPrefix$X}-block`]: props.block
|
|
12622
13133
|
})
|
|
12623
13134
|
}, React__default.createElement(NativeInput, {
|
|
12624
13135
|
type: "checkbox",
|
|
@@ -12627,14 +13138,14 @@ const Checkbox$1 = forwardRef((p, ref) => {
|
|
|
12627
13138
|
disabled,
|
|
12628
13139
|
id: props.id
|
|
12629
13140
|
}), renderIcon(), props.children && React__default.createElement("div", {
|
|
12630
|
-
className: `${classPrefix$
|
|
13141
|
+
className: `${classPrefix$X}-content`
|
|
12631
13142
|
}, props.children)));
|
|
12632
13143
|
});
|
|
12633
13144
|
const Checkbox = attachPropertiesToComponent(Checkbox$1, {
|
|
12634
13145
|
Group: Group$1
|
|
12635
13146
|
});
|
|
12636
13147
|
const collapse = "";
|
|
12637
|
-
const classPrefix$
|
|
13148
|
+
const classPrefix$W = `adm-collapse`;
|
|
12638
13149
|
const CollapsePanel = () => {
|
|
12639
13150
|
return null;
|
|
12640
13151
|
};
|
|
@@ -12688,8 +13199,8 @@ const CollapsePanelContent = (props) => {
|
|
|
12688
13199
|
}
|
|
12689
13200
|
}, [visible]);
|
|
12690
13201
|
return React__default.createElement(animated.div, {
|
|
12691
|
-
className: classNames(`${classPrefix$
|
|
12692
|
-
[`${classPrefix$
|
|
13202
|
+
className: classNames(`${classPrefix$W}-panel-content`, {
|
|
13203
|
+
[`${classPrefix$W}-panel-content-active`]: visible
|
|
12693
13204
|
}),
|
|
12694
13205
|
style: {
|
|
12695
13206
|
height: height.to((v) => {
|
|
@@ -12701,7 +13212,7 @@ const CollapsePanelContent = (props) => {
|
|
|
12701
13212
|
})
|
|
12702
13213
|
}
|
|
12703
13214
|
}, React__default.createElement("div", {
|
|
12704
|
-
className: `${classPrefix$
|
|
13215
|
+
className: `${classPrefix$W}-panel-content-inner`,
|
|
12705
13216
|
ref: innerRef
|
|
12706
13217
|
}, React__default.createElement(List$1.Item, null, shouldRender && props.children)));
|
|
12707
13218
|
};
|
|
@@ -12745,7 +13256,7 @@ const Collapse = (props) => {
|
|
|
12745
13256
|
const [activeKey, setActiveKey] = usePropsValue(handlePropsValue());
|
|
12746
13257
|
const activeKeyList = activeKey === null ? [] : Array.isArray(activeKey) ? activeKey : [activeKey];
|
|
12747
13258
|
return withNativeProps(props, React__default.createElement("div", {
|
|
12748
|
-
className: classPrefix$
|
|
13259
|
+
className: classPrefix$W
|
|
12749
13260
|
}, React__default.createElement(List$1, null, panels.map((panel) => {
|
|
12750
13261
|
const key = panel.key;
|
|
12751
13262
|
const active = activeKeyList.includes(key);
|
|
@@ -12775,15 +13286,15 @@ const Collapse = (props) => {
|
|
|
12775
13286
|
arrow2 = panel.props.arrow;
|
|
12776
13287
|
}
|
|
12777
13288
|
return typeof arrow2 === "function" ? arrow2(active) : React__default.createElement("div", {
|
|
12778
|
-
className: classNames(`${classPrefix$
|
|
12779
|
-
[`${classPrefix$
|
|
13289
|
+
className: classNames(`${classPrefix$W}-arrow`, {
|
|
13290
|
+
[`${classPrefix$W}-arrow-active`]: active
|
|
12780
13291
|
})
|
|
12781
13292
|
}, arrow2);
|
|
12782
13293
|
};
|
|
12783
13294
|
return React__default.createElement(React__default.Fragment, {
|
|
12784
13295
|
key
|
|
12785
13296
|
}, withNativeProps(panel.props, React__default.createElement(List$1.Item, {
|
|
12786
|
-
className: `${classPrefix$
|
|
13297
|
+
className: `${classPrefix$W}-panel-header`,
|
|
12787
13298
|
onClick: handleClick,
|
|
12788
13299
|
disabled: panel.props.disabled,
|
|
12789
13300
|
arrow: renderArrow()
|
|
@@ -13110,14 +13621,14 @@ function useRenderLabel(renderLabel) {
|
|
|
13110
13621
|
}, [renderLabel]);
|
|
13111
13622
|
}
|
|
13112
13623
|
const thisYear$1 = new Date().getFullYear();
|
|
13113
|
-
const defaultProps$
|
|
13624
|
+
const defaultProps$L = {
|
|
13114
13625
|
min: new Date(new Date().setFullYear(thisYear$1 - 10)),
|
|
13115
13626
|
max: new Date(new Date().setFullYear(thisYear$1 + 10)),
|
|
13116
13627
|
precision: "day",
|
|
13117
13628
|
defaultValue: null
|
|
13118
13629
|
};
|
|
13119
13630
|
const DatePicker = forwardRef((p, ref) => {
|
|
13120
|
-
const props = mergeProps(defaultProps$
|
|
13631
|
+
const props = mergeProps(defaultProps$L, p);
|
|
13121
13632
|
const {
|
|
13122
13633
|
renderLabel
|
|
13123
13634
|
} = props;
|
|
@@ -13214,14 +13725,14 @@ const index$e = attachPropertiesToComponent(DatePicker, {
|
|
|
13214
13725
|
DATE_NOW: TILL_NOW
|
|
13215
13726
|
});
|
|
13216
13727
|
const thisYear = new Date().getFullYear();
|
|
13217
|
-
const defaultProps$
|
|
13728
|
+
const defaultProps$K = {
|
|
13218
13729
|
min: new Date(new Date().setFullYear(thisYear - 10)),
|
|
13219
13730
|
max: new Date(new Date().setFullYear(thisYear + 10)),
|
|
13220
13731
|
precision: "day"
|
|
13221
13732
|
};
|
|
13222
13733
|
const DatePickerView$1 = (p) => {
|
|
13223
13734
|
var _a;
|
|
13224
|
-
const props = mergeProps(defaultProps$
|
|
13735
|
+
const props = mergeProps(defaultProps$K, p);
|
|
13225
13736
|
const {
|
|
13226
13737
|
renderLabel
|
|
13227
13738
|
} = props;
|
|
@@ -13273,14 +13784,14 @@ const DialogActionButton = (props) => {
|
|
|
13273
13784
|
disabled: action.disabled
|
|
13274
13785
|
}, action.text));
|
|
13275
13786
|
};
|
|
13276
|
-
const defaultProps$
|
|
13787
|
+
const defaultProps$J = {
|
|
13277
13788
|
actions: [],
|
|
13278
13789
|
closeOnAction: false,
|
|
13279
13790
|
closeOnMaskClick: false,
|
|
13280
13791
|
getContainer: null
|
|
13281
13792
|
};
|
|
13282
13793
|
const Dialog = (p) => {
|
|
13283
|
-
const props = mergeProps(defaultProps$
|
|
13794
|
+
const props = mergeProps(defaultProps$J, p);
|
|
13284
13795
|
const element = React__default.createElement(React__default.Fragment, null, !!props.image && React__default.createElement("div", {
|
|
13285
13796
|
className: cls$1("image-container")
|
|
13286
13797
|
}, React__default.createElement(Image$1, {
|
|
@@ -13371,7 +13882,7 @@ function alert$1(p) {
|
|
|
13371
13882
|
}));
|
|
13372
13883
|
});
|
|
13373
13884
|
}
|
|
13374
|
-
const defaultProps$
|
|
13885
|
+
const defaultProps$I = {
|
|
13375
13886
|
confirmText: "\u786E\u8BA4",
|
|
13376
13887
|
cancelText: "\u53D6\u6D88"
|
|
13377
13888
|
};
|
|
@@ -13379,7 +13890,7 @@ function confirm$1(p) {
|
|
|
13379
13890
|
const {
|
|
13380
13891
|
locale
|
|
13381
13892
|
} = getDefaultConfig();
|
|
13382
|
-
const props = mergeProps(defaultProps$
|
|
13893
|
+
const props = mergeProps(defaultProps$I, {
|
|
13383
13894
|
confirmText: locale.common.confirm,
|
|
13384
13895
|
cancelText: locale.common.cancel
|
|
13385
13896
|
}, p);
|
|
@@ -13423,21 +13934,6 @@ const index$d = attachPropertiesToComponent(Dialog, {
|
|
|
13423
13934
|
confirm: confirm$1,
|
|
13424
13935
|
clear: clear$2
|
|
13425
13936
|
});
|
|
13426
|
-
const divider = "";
|
|
13427
|
-
const classPrefix$W = `adm-divider`;
|
|
13428
|
-
const defaultProps$I = {
|
|
13429
|
-
contentPosition: "center",
|
|
13430
|
-
direction: "horizontal"
|
|
13431
|
-
};
|
|
13432
|
-
const Divider$1 = (p) => {
|
|
13433
|
-
const props = mergeProps(defaultProps$I, p);
|
|
13434
|
-
return withNativeProps(props, React__default.createElement("div", {
|
|
13435
|
-
className: classNames(classPrefix$W, `${classPrefix$W}-${props.direction}`, `${classPrefix$W}-${props.contentPosition}`)
|
|
13436
|
-
}, props.children && React__default.createElement("div", {
|
|
13437
|
-
className: `${classPrefix$W}-content`
|
|
13438
|
-
}, props.children)));
|
|
13439
|
-
};
|
|
13440
|
-
const Divider = Divider$1;
|
|
13441
13937
|
const dropdown = "";
|
|
13442
13938
|
const classPrefix$V = `adm-dropdown-item`;
|
|
13443
13939
|
const Item = (props) => {
|
|
@@ -14654,13 +15150,13 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
14654
15150
|
}
|
|
14655
15151
|
return target;
|
|
14656
15152
|
}
|
|
14657
|
-
function _typeof$1(
|
|
15153
|
+
function _typeof$1(o) {
|
|
14658
15154
|
"@babel/helpers - typeof";
|
|
14659
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(
|
|
14660
|
-
return typeof
|
|
14661
|
-
} : function(
|
|
14662
|
-
return
|
|
14663
|
-
}, _typeof$1(
|
|
15155
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
15156
|
+
return typeof o2;
|
|
15157
|
+
} : function(o2) {
|
|
15158
|
+
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
15159
|
+
}, _typeof$1(o);
|
|
14664
15160
|
}
|
|
14665
15161
|
function _toPrimitive(input2, hint) {
|
|
14666
15162
|
if (_typeof$1(input2) !== "object" || input2 === null)
|
|
@@ -14692,26 +15188,26 @@ function _defineProperty(obj, key, value) {
|
|
|
14692
15188
|
}
|
|
14693
15189
|
return obj;
|
|
14694
15190
|
}
|
|
14695
|
-
function ownKeys(
|
|
14696
|
-
var
|
|
15191
|
+
function ownKeys(e2, r) {
|
|
15192
|
+
var t = Object.keys(e2);
|
|
14697
15193
|
if (Object.getOwnPropertySymbols) {
|
|
14698
|
-
var
|
|
14699
|
-
|
|
14700
|
-
return Object.getOwnPropertyDescriptor(
|
|
14701
|
-
})),
|
|
14702
|
-
}
|
|
14703
|
-
return
|
|
14704
|
-
}
|
|
14705
|
-
function _objectSpread2(
|
|
14706
|
-
for (var
|
|
14707
|
-
var
|
|
14708
|
-
|
|
14709
|
-
_defineProperty(
|
|
14710
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
14711
|
-
Object.defineProperty(
|
|
15194
|
+
var o = Object.getOwnPropertySymbols(e2);
|
|
15195
|
+
r && (o = o.filter(function(r2) {
|
|
15196
|
+
return Object.getOwnPropertyDescriptor(e2, r2).enumerable;
|
|
15197
|
+
})), t.push.apply(t, o);
|
|
15198
|
+
}
|
|
15199
|
+
return t;
|
|
15200
|
+
}
|
|
15201
|
+
function _objectSpread2(e2) {
|
|
15202
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
15203
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
15204
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
15205
|
+
_defineProperty(e2, r2, t[r2]);
|
|
15206
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
15207
|
+
Object.defineProperty(e2, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
14712
15208
|
});
|
|
14713
15209
|
}
|
|
14714
|
-
return
|
|
15210
|
+
return e2;
|
|
14715
15211
|
}
|
|
14716
15212
|
function _arrayLikeToArray(arr, len) {
|
|
14717
15213
|
if (len == null || len > arr.length)
|
|
@@ -15111,319 +15607,314 @@ function toArray$1(value) {
|
|
|
15111
15607
|
}
|
|
15112
15608
|
function _regeneratorRuntime() {
|
|
15113
15609
|
_regeneratorRuntime = function _regeneratorRuntime2() {
|
|
15114
|
-
return
|
|
15610
|
+
return e2;
|
|
15115
15611
|
};
|
|
15116
|
-
var
|
|
15117
|
-
|
|
15118
|
-
},
|
|
15119
|
-
function define(
|
|
15120
|
-
return Object.defineProperty(
|
|
15121
|
-
value,
|
|
15612
|
+
var t, e2 = {}, r = Object.prototype, n2 = r.hasOwnProperty, o = Object.defineProperty || function(t2, e3, r2) {
|
|
15613
|
+
t2[e3] = r2.value;
|
|
15614
|
+
}, i2 = "function" == typeof Symbol ? Symbol : {}, a = i2.iterator || "@@iterator", c = i2.asyncIterator || "@@asyncIterator", u = i2.toStringTag || "@@toStringTag";
|
|
15615
|
+
function define(t2, e3, r2) {
|
|
15616
|
+
return Object.defineProperty(t2, e3, {
|
|
15617
|
+
value: r2,
|
|
15122
15618
|
enumerable: true,
|
|
15123
15619
|
configurable: true,
|
|
15124
15620
|
writable: true
|
|
15125
|
-
}),
|
|
15621
|
+
}), t2[e3];
|
|
15126
15622
|
}
|
|
15127
15623
|
try {
|
|
15128
15624
|
define({}, "");
|
|
15129
|
-
} catch (
|
|
15130
|
-
define = function define2(
|
|
15131
|
-
return
|
|
15625
|
+
} catch (t2) {
|
|
15626
|
+
define = function define2(t3, e3, r2) {
|
|
15627
|
+
return t3[e3] = r2;
|
|
15132
15628
|
};
|
|
15133
15629
|
}
|
|
15134
|
-
function wrap(
|
|
15135
|
-
var
|
|
15136
|
-
return
|
|
15137
|
-
value: makeInvokeMethod(
|
|
15138
|
-
}),
|
|
15630
|
+
function wrap(t2, e3, r2, n3) {
|
|
15631
|
+
var i3 = e3 && e3.prototype instanceof Generator ? e3 : Generator, a2 = Object.create(i3.prototype), c6 = new Context2(n3 || []);
|
|
15632
|
+
return o(a2, "_invoke", {
|
|
15633
|
+
value: makeInvokeMethod(t2, r2, c6)
|
|
15634
|
+
}), a2;
|
|
15139
15635
|
}
|
|
15140
|
-
function tryCatch(
|
|
15636
|
+
function tryCatch(t2, e3, r2) {
|
|
15141
15637
|
try {
|
|
15142
15638
|
return {
|
|
15143
15639
|
type: "normal",
|
|
15144
|
-
arg:
|
|
15640
|
+
arg: t2.call(e3, r2)
|
|
15145
15641
|
};
|
|
15146
|
-
} catch (
|
|
15642
|
+
} catch (t3) {
|
|
15147
15643
|
return {
|
|
15148
15644
|
type: "throw",
|
|
15149
|
-
arg:
|
|
15645
|
+
arg: t3
|
|
15150
15646
|
};
|
|
15151
15647
|
}
|
|
15152
15648
|
}
|
|
15153
|
-
|
|
15154
|
-
var
|
|
15649
|
+
e2.wrap = wrap;
|
|
15650
|
+
var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {};
|
|
15155
15651
|
function Generator() {
|
|
15156
15652
|
}
|
|
15157
15653
|
function GeneratorFunction() {
|
|
15158
15654
|
}
|
|
15159
15655
|
function GeneratorFunctionPrototype() {
|
|
15160
15656
|
}
|
|
15161
|
-
var
|
|
15162
|
-
define(
|
|
15657
|
+
var p = {};
|
|
15658
|
+
define(p, a, function() {
|
|
15163
15659
|
return this;
|
|
15164
15660
|
});
|
|
15165
|
-
var
|
|
15166
|
-
|
|
15167
|
-
var
|
|
15168
|
-
function defineIteratorMethods(
|
|
15169
|
-
["next", "throw", "return"].forEach(function(
|
|
15170
|
-
define(
|
|
15171
|
-
return this._invoke(
|
|
15661
|
+
var d = Object.getPrototypeOf, v = d && d(d(values([])));
|
|
15662
|
+
v && v !== r && n2.call(v, a) && (p = v);
|
|
15663
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
15664
|
+
function defineIteratorMethods(t2) {
|
|
15665
|
+
["next", "throw", "return"].forEach(function(e3) {
|
|
15666
|
+
define(t2, e3, function(t3) {
|
|
15667
|
+
return this._invoke(e3, t3);
|
|
15172
15668
|
});
|
|
15173
15669
|
});
|
|
15174
15670
|
}
|
|
15175
|
-
function AsyncIterator(
|
|
15176
|
-
function invoke(
|
|
15177
|
-
var
|
|
15178
|
-
if ("throw" !==
|
|
15179
|
-
var
|
|
15180
|
-
return
|
|
15181
|
-
invoke("next",
|
|
15182
|
-
}, function(
|
|
15183
|
-
invoke("throw",
|
|
15184
|
-
}) :
|
|
15185
|
-
|
|
15186
|
-
}, function(
|
|
15187
|
-
return invoke("throw",
|
|
15671
|
+
function AsyncIterator(t2, e3) {
|
|
15672
|
+
function invoke(r3, o2, i3, a2) {
|
|
15673
|
+
var c6 = tryCatch(t2[r3], t2, o2);
|
|
15674
|
+
if ("throw" !== c6.type) {
|
|
15675
|
+
var u2 = c6.arg, h2 = u2.value;
|
|
15676
|
+
return h2 && "object" == _typeof$1(h2) && n2.call(h2, "__await") ? e3.resolve(h2.__await).then(function(t3) {
|
|
15677
|
+
invoke("next", t3, i3, a2);
|
|
15678
|
+
}, function(t3) {
|
|
15679
|
+
invoke("throw", t3, i3, a2);
|
|
15680
|
+
}) : e3.resolve(h2).then(function(t3) {
|
|
15681
|
+
u2.value = t3, i3(u2);
|
|
15682
|
+
}, function(t3) {
|
|
15683
|
+
return invoke("throw", t3, i3, a2);
|
|
15188
15684
|
});
|
|
15189
15685
|
}
|
|
15190
|
-
|
|
15686
|
+
a2(c6.arg);
|
|
15191
15687
|
}
|
|
15192
|
-
var
|
|
15193
|
-
|
|
15194
|
-
value: function value(
|
|
15688
|
+
var r2;
|
|
15689
|
+
o(this, "_invoke", {
|
|
15690
|
+
value: function value(t3, n3) {
|
|
15195
15691
|
function callInvokeWithMethodAndArg() {
|
|
15196
|
-
return new
|
|
15197
|
-
invoke(
|
|
15692
|
+
return new e3(function(e4, r3) {
|
|
15693
|
+
invoke(t3, n3, e4, r3);
|
|
15198
15694
|
});
|
|
15199
15695
|
}
|
|
15200
|
-
return
|
|
15696
|
+
return r2 = r2 ? r2.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
15201
15697
|
}
|
|
15202
15698
|
});
|
|
15203
15699
|
}
|
|
15204
|
-
function makeInvokeMethod(
|
|
15205
|
-
var
|
|
15206
|
-
return function(
|
|
15207
|
-
if (
|
|
15700
|
+
function makeInvokeMethod(e3, r2, n3) {
|
|
15701
|
+
var o2 = h;
|
|
15702
|
+
return function(i3, a2) {
|
|
15703
|
+
if (o2 === f)
|
|
15208
15704
|
throw new Error("Generator is already running");
|
|
15209
|
-
if (
|
|
15210
|
-
if ("throw" ===
|
|
15211
|
-
throw
|
|
15212
|
-
return
|
|
15213
|
-
|
|
15214
|
-
|
|
15215
|
-
|
|
15216
|
-
|
|
15217
|
-
|
|
15218
|
-
|
|
15219
|
-
|
|
15705
|
+
if (o2 === s) {
|
|
15706
|
+
if ("throw" === i3)
|
|
15707
|
+
throw a2;
|
|
15708
|
+
return {
|
|
15709
|
+
value: t,
|
|
15710
|
+
done: true
|
|
15711
|
+
};
|
|
15712
|
+
}
|
|
15713
|
+
for (n3.method = i3, n3.arg = a2; ; ) {
|
|
15714
|
+
var c6 = n3.delegate;
|
|
15715
|
+
if (c6) {
|
|
15716
|
+
var u2 = maybeInvokeDelegate(c6, n3);
|
|
15717
|
+
if (u2) {
|
|
15718
|
+
if (u2 === y)
|
|
15220
15719
|
continue;
|
|
15221
|
-
return
|
|
15720
|
+
return u2;
|
|
15222
15721
|
}
|
|
15223
15722
|
}
|
|
15224
|
-
if ("next" ===
|
|
15225
|
-
|
|
15226
|
-
else if ("throw" ===
|
|
15227
|
-
if (
|
|
15228
|
-
throw
|
|
15229
|
-
|
|
15723
|
+
if ("next" === n3.method)
|
|
15724
|
+
n3.sent = n3._sent = n3.arg;
|
|
15725
|
+
else if ("throw" === n3.method) {
|
|
15726
|
+
if (o2 === h)
|
|
15727
|
+
throw o2 = s, n3.arg;
|
|
15728
|
+
n3.dispatchException(n3.arg);
|
|
15230
15729
|
} else
|
|
15231
|
-
"return" ===
|
|
15232
|
-
|
|
15233
|
-
var
|
|
15234
|
-
if ("normal" ===
|
|
15235
|
-
if (
|
|
15730
|
+
"return" === n3.method && n3.abrupt("return", n3.arg);
|
|
15731
|
+
o2 = f;
|
|
15732
|
+
var p2 = tryCatch(e3, r2, n3);
|
|
15733
|
+
if ("normal" === p2.type) {
|
|
15734
|
+
if (o2 = n3.done ? s : l, p2.arg === y)
|
|
15236
15735
|
continue;
|
|
15237
15736
|
return {
|
|
15238
|
-
value:
|
|
15239
|
-
done:
|
|
15737
|
+
value: p2.arg,
|
|
15738
|
+
done: n3.done
|
|
15240
15739
|
};
|
|
15241
15740
|
}
|
|
15242
|
-
"throw" ===
|
|
15741
|
+
"throw" === p2.type && (o2 = s, n3.method = "throw", n3.arg = p2.arg);
|
|
15243
15742
|
}
|
|
15244
15743
|
};
|
|
15245
15744
|
}
|
|
15246
|
-
function maybeInvokeDelegate(
|
|
15247
|
-
var
|
|
15248
|
-
if (
|
|
15249
|
-
return
|
|
15250
|
-
var
|
|
15251
|
-
if ("throw" ===
|
|
15252
|
-
return
|
|
15253
|
-
var
|
|
15254
|
-
return
|
|
15255
|
-
}
|
|
15256
|
-
function pushTryEntry(
|
|
15257
|
-
var
|
|
15258
|
-
tryLoc:
|
|
15745
|
+
function maybeInvokeDelegate(e3, r2) {
|
|
15746
|
+
var n3 = r2.method, o2 = e3.iterator[n3];
|
|
15747
|
+
if (o2 === t)
|
|
15748
|
+
return r2.delegate = null, "throw" === n3 && e3.iterator["return"] && (r2.method = "return", r2.arg = t, maybeInvokeDelegate(e3, r2), "throw" === r2.method) || "return" !== n3 && (r2.method = "throw", r2.arg = new TypeError("The iterator does not provide a '" + n3 + "' method")), y;
|
|
15749
|
+
var i3 = tryCatch(o2, e3.iterator, r2.arg);
|
|
15750
|
+
if ("throw" === i3.type)
|
|
15751
|
+
return r2.method = "throw", r2.arg = i3.arg, r2.delegate = null, y;
|
|
15752
|
+
var a2 = i3.arg;
|
|
15753
|
+
return a2 ? a2.done ? (r2[e3.resultName] = a2.value, r2.next = e3.nextLoc, "return" !== r2.method && (r2.method = "next", r2.arg = t), r2.delegate = null, y) : a2 : (r2.method = "throw", r2.arg = new TypeError("iterator result is not an object"), r2.delegate = null, y);
|
|
15754
|
+
}
|
|
15755
|
+
function pushTryEntry(t2) {
|
|
15756
|
+
var e3 = {
|
|
15757
|
+
tryLoc: t2[0]
|
|
15259
15758
|
};
|
|
15260
|
-
1 in
|
|
15759
|
+
1 in t2 && (e3.catchLoc = t2[1]), 2 in t2 && (e3.finallyLoc = t2[2], e3.afterLoc = t2[3]), this.tryEntries.push(e3);
|
|
15261
15760
|
}
|
|
15262
|
-
function resetTryEntry(
|
|
15263
|
-
var
|
|
15264
|
-
|
|
15761
|
+
function resetTryEntry(t2) {
|
|
15762
|
+
var e3 = t2.completion || {};
|
|
15763
|
+
e3.type = "normal", delete e3.arg, t2.completion = e3;
|
|
15265
15764
|
}
|
|
15266
|
-
function Context2(
|
|
15765
|
+
function Context2(t2) {
|
|
15267
15766
|
this.tryEntries = [{
|
|
15268
15767
|
tryLoc: "root"
|
|
15269
|
-
}],
|
|
15270
|
-
}
|
|
15271
|
-
function values(
|
|
15272
|
-
if (
|
|
15273
|
-
var
|
|
15274
|
-
if (
|
|
15275
|
-
return
|
|
15276
|
-
if ("function" == typeof
|
|
15277
|
-
return
|
|
15278
|
-
if (!isNaN(
|
|
15279
|
-
var
|
|
15280
|
-
for (; ++
|
|
15281
|
-
if (
|
|
15282
|
-
return
|
|
15283
|
-
return
|
|
15768
|
+
}], t2.forEach(pushTryEntry, this), this.reset(true);
|
|
15769
|
+
}
|
|
15770
|
+
function values(e3) {
|
|
15771
|
+
if (e3 || "" === e3) {
|
|
15772
|
+
var r2 = e3[a];
|
|
15773
|
+
if (r2)
|
|
15774
|
+
return r2.call(e3);
|
|
15775
|
+
if ("function" == typeof e3.next)
|
|
15776
|
+
return e3;
|
|
15777
|
+
if (!isNaN(e3.length)) {
|
|
15778
|
+
var o2 = -1, i3 = function next() {
|
|
15779
|
+
for (; ++o2 < e3.length; )
|
|
15780
|
+
if (n2.call(e3, o2))
|
|
15781
|
+
return next.value = e3[o2], next.done = false, next;
|
|
15782
|
+
return next.value = t, next.done = true, next;
|
|
15284
15783
|
};
|
|
15285
|
-
return
|
|
15784
|
+
return i3.next = i3;
|
|
15286
15785
|
}
|
|
15287
15786
|
}
|
|
15288
|
-
|
|
15289
|
-
next: doneResult
|
|
15290
|
-
};
|
|
15291
|
-
}
|
|
15292
|
-
function doneResult() {
|
|
15293
|
-
return {
|
|
15294
|
-
value: void 0,
|
|
15295
|
-
done: true
|
|
15296
|
-
};
|
|
15787
|
+
throw new TypeError(_typeof$1(e3) + " is not iterable");
|
|
15297
15788
|
}
|
|
15298
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
15789
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
15299
15790
|
value: GeneratorFunctionPrototype,
|
|
15300
15791
|
configurable: true
|
|
15301
|
-
}),
|
|
15792
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
15302
15793
|
value: GeneratorFunction,
|
|
15303
15794
|
configurable: true
|
|
15304
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
15305
|
-
var
|
|
15306
|
-
return !!
|
|
15307
|
-
},
|
|
15308
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
15309
|
-
},
|
|
15795
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e2.isGeneratorFunction = function(t2) {
|
|
15796
|
+
var e3 = "function" == typeof t2 && t2.constructor;
|
|
15797
|
+
return !!e3 && (e3 === GeneratorFunction || "GeneratorFunction" === (e3.displayName || e3.name));
|
|
15798
|
+
}, e2.mark = function(t2) {
|
|
15799
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t2, GeneratorFunctionPrototype) : (t2.__proto__ = GeneratorFunctionPrototype, define(t2, u, "GeneratorFunction")), t2.prototype = Object.create(g), t2;
|
|
15800
|
+
}, e2.awrap = function(t2) {
|
|
15310
15801
|
return {
|
|
15311
|
-
__await:
|
|
15802
|
+
__await: t2
|
|
15312
15803
|
};
|
|
15313
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
15804
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function() {
|
|
15314
15805
|
return this;
|
|
15315
|
-
}),
|
|
15316
|
-
void 0 ===
|
|
15317
|
-
var
|
|
15318
|
-
return
|
|
15319
|
-
return
|
|
15806
|
+
}), e2.AsyncIterator = AsyncIterator, e2.async = function(t2, r2, n3, o2, i3) {
|
|
15807
|
+
void 0 === i3 && (i3 = Promise);
|
|
15808
|
+
var a2 = new AsyncIterator(wrap(t2, r2, n3, o2), i3);
|
|
15809
|
+
return e2.isGeneratorFunction(r2) ? a2 : a2.next().then(function(t3) {
|
|
15810
|
+
return t3.done ? t3.value : a2.next();
|
|
15320
15811
|
});
|
|
15321
|
-
}, defineIteratorMethods(
|
|
15812
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function() {
|
|
15322
15813
|
return this;
|
|
15323
|
-
}), define(
|
|
15814
|
+
}), define(g, "toString", function() {
|
|
15324
15815
|
return "[object Generator]";
|
|
15325
|
-
}),
|
|
15326
|
-
var
|
|
15327
|
-
for (var
|
|
15328
|
-
|
|
15329
|
-
return
|
|
15330
|
-
for (;
|
|
15331
|
-
var
|
|
15332
|
-
if (
|
|
15333
|
-
return next.value =
|
|
15816
|
+
}), e2.keys = function(t2) {
|
|
15817
|
+
var e3 = Object(t2), r2 = [];
|
|
15818
|
+
for (var n3 in e3)
|
|
15819
|
+
r2.push(n3);
|
|
15820
|
+
return r2.reverse(), function next() {
|
|
15821
|
+
for (; r2.length; ) {
|
|
15822
|
+
var t3 = r2.pop();
|
|
15823
|
+
if (t3 in e3)
|
|
15824
|
+
return next.value = t3, next.done = false, next;
|
|
15334
15825
|
}
|
|
15335
15826
|
return next.done = true, next;
|
|
15336
15827
|
};
|
|
15337
|
-
},
|
|
15828
|
+
}, e2.values = values, Context2.prototype = {
|
|
15338
15829
|
constructor: Context2,
|
|
15339
|
-
reset: function reset(
|
|
15340
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
15341
|
-
for (var
|
|
15342
|
-
"t" ===
|
|
15830
|
+
reset: function reset(e3) {
|
|
15831
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e3)
|
|
15832
|
+
for (var r2 in this)
|
|
15833
|
+
"t" === r2.charAt(0) && n2.call(this, r2) && !isNaN(+r2.slice(1)) && (this[r2] = t);
|
|
15343
15834
|
},
|
|
15344
15835
|
stop: function stop2() {
|
|
15345
15836
|
this.done = true;
|
|
15346
|
-
var
|
|
15347
|
-
if ("throw" ===
|
|
15348
|
-
throw
|
|
15837
|
+
var t2 = this.tryEntries[0].completion;
|
|
15838
|
+
if ("throw" === t2.type)
|
|
15839
|
+
throw t2.arg;
|
|
15349
15840
|
return this.rval;
|
|
15350
15841
|
},
|
|
15351
|
-
dispatchException: function dispatchException(
|
|
15842
|
+
dispatchException: function dispatchException(e3) {
|
|
15352
15843
|
if (this.done)
|
|
15353
|
-
throw
|
|
15354
|
-
var
|
|
15355
|
-
function handle(
|
|
15356
|
-
return
|
|
15357
|
-
}
|
|
15358
|
-
for (var
|
|
15359
|
-
var
|
|
15360
|
-
if ("root" ===
|
|
15844
|
+
throw e3;
|
|
15845
|
+
var r2 = this;
|
|
15846
|
+
function handle(n3, o3) {
|
|
15847
|
+
return a2.type = "throw", a2.arg = e3, r2.next = n3, o3 && (r2.method = "next", r2.arg = t), !!o3;
|
|
15848
|
+
}
|
|
15849
|
+
for (var o2 = this.tryEntries.length - 1; o2 >= 0; --o2) {
|
|
15850
|
+
var i3 = this.tryEntries[o2], a2 = i3.completion;
|
|
15851
|
+
if ("root" === i3.tryLoc)
|
|
15361
15852
|
return handle("end");
|
|
15362
|
-
if (
|
|
15363
|
-
var
|
|
15364
|
-
if (
|
|
15365
|
-
if (this.prev <
|
|
15366
|
-
return handle(
|
|
15367
|
-
if (this.prev <
|
|
15368
|
-
return handle(
|
|
15369
|
-
} else if (
|
|
15370
|
-
if (this.prev <
|
|
15371
|
-
return handle(
|
|
15853
|
+
if (i3.tryLoc <= this.prev) {
|
|
15854
|
+
var c6 = n2.call(i3, "catchLoc"), u2 = n2.call(i3, "finallyLoc");
|
|
15855
|
+
if (c6 && u2) {
|
|
15856
|
+
if (this.prev < i3.catchLoc)
|
|
15857
|
+
return handle(i3.catchLoc, true);
|
|
15858
|
+
if (this.prev < i3.finallyLoc)
|
|
15859
|
+
return handle(i3.finallyLoc);
|
|
15860
|
+
} else if (c6) {
|
|
15861
|
+
if (this.prev < i3.catchLoc)
|
|
15862
|
+
return handle(i3.catchLoc, true);
|
|
15372
15863
|
} else {
|
|
15373
|
-
if (!
|
|
15864
|
+
if (!u2)
|
|
15374
15865
|
throw new Error("try statement without catch or finally");
|
|
15375
|
-
if (this.prev <
|
|
15376
|
-
return handle(
|
|
15866
|
+
if (this.prev < i3.finallyLoc)
|
|
15867
|
+
return handle(i3.finallyLoc);
|
|
15377
15868
|
}
|
|
15378
15869
|
}
|
|
15379
15870
|
}
|
|
15380
15871
|
},
|
|
15381
|
-
abrupt: function abrupt(
|
|
15382
|
-
for (var
|
|
15383
|
-
var
|
|
15384
|
-
if (
|
|
15385
|
-
var
|
|
15872
|
+
abrupt: function abrupt(t2, e3) {
|
|
15873
|
+
for (var r2 = this.tryEntries.length - 1; r2 >= 0; --r2) {
|
|
15874
|
+
var o2 = this.tryEntries[r2];
|
|
15875
|
+
if (o2.tryLoc <= this.prev && n2.call(o2, "finallyLoc") && this.prev < o2.finallyLoc) {
|
|
15876
|
+
var i3 = o2;
|
|
15386
15877
|
break;
|
|
15387
15878
|
}
|
|
15388
15879
|
}
|
|
15389
|
-
|
|
15390
|
-
var
|
|
15391
|
-
return
|
|
15880
|
+
i3 && ("break" === t2 || "continue" === t2) && i3.tryLoc <= e3 && e3 <= i3.finallyLoc && (i3 = null);
|
|
15881
|
+
var a2 = i3 ? i3.completion : {};
|
|
15882
|
+
return a2.type = t2, a2.arg = e3, i3 ? (this.method = "next", this.next = i3.finallyLoc, y) : this.complete(a2);
|
|
15392
15883
|
},
|
|
15393
|
-
complete: function complete(
|
|
15394
|
-
if ("throw" ===
|
|
15395
|
-
throw
|
|
15396
|
-
return "break" ===
|
|
15884
|
+
complete: function complete(t2, e3) {
|
|
15885
|
+
if ("throw" === t2.type)
|
|
15886
|
+
throw t2.arg;
|
|
15887
|
+
return "break" === t2.type || "continue" === t2.type ? this.next = t2.arg : "return" === t2.type ? (this.rval = this.arg = t2.arg, this.method = "return", this.next = "end") : "normal" === t2.type && e3 && (this.next = e3), y;
|
|
15397
15888
|
},
|
|
15398
|
-
finish: function finish(
|
|
15399
|
-
for (var
|
|
15400
|
-
var
|
|
15401
|
-
if (
|
|
15402
|
-
return this.complete(
|
|
15889
|
+
finish: function finish(t2) {
|
|
15890
|
+
for (var e3 = this.tryEntries.length - 1; e3 >= 0; --e3) {
|
|
15891
|
+
var r2 = this.tryEntries[e3];
|
|
15892
|
+
if (r2.finallyLoc === t2)
|
|
15893
|
+
return this.complete(r2.completion, r2.afterLoc), resetTryEntry(r2), y;
|
|
15403
15894
|
}
|
|
15404
15895
|
},
|
|
15405
|
-
"catch": function _catch(
|
|
15406
|
-
for (var
|
|
15407
|
-
var
|
|
15408
|
-
if (
|
|
15409
|
-
var
|
|
15410
|
-
if ("throw" ===
|
|
15411
|
-
var
|
|
15412
|
-
resetTryEntry(
|
|
15896
|
+
"catch": function _catch(t2) {
|
|
15897
|
+
for (var e3 = this.tryEntries.length - 1; e3 >= 0; --e3) {
|
|
15898
|
+
var r2 = this.tryEntries[e3];
|
|
15899
|
+
if (r2.tryLoc === t2) {
|
|
15900
|
+
var n3 = r2.completion;
|
|
15901
|
+
if ("throw" === n3.type) {
|
|
15902
|
+
var o2 = n3.arg;
|
|
15903
|
+
resetTryEntry(r2);
|
|
15413
15904
|
}
|
|
15414
|
-
return
|
|
15905
|
+
return o2;
|
|
15415
15906
|
}
|
|
15416
15907
|
}
|
|
15417
15908
|
throw new Error("illegal catch attempt");
|
|
15418
15909
|
},
|
|
15419
|
-
delegateYield: function delegateYield(
|
|
15910
|
+
delegateYield: function delegateYield(e3, r2, n3) {
|
|
15420
15911
|
return this.delegate = {
|
|
15421
|
-
iterator: values(
|
|
15422
|
-
resultName,
|
|
15423
|
-
nextLoc
|
|
15424
|
-
}, "next" === this.method && (this.arg =
|
|
15912
|
+
iterator: values(e3),
|
|
15913
|
+
resultName: r2,
|
|
15914
|
+
nextLoc: n3
|
|
15915
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
15425
15916
|
}
|
|
15426
|
-
},
|
|
15917
|
+
}, e2;
|
|
15427
15918
|
}
|
|
15428
15919
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
15429
15920
|
try {
|
|
@@ -17501,30 +17992,30 @@ var List = function List2(_ref) {
|
|
|
17501
17992
|
}), operations, meta);
|
|
17502
17993
|
})));
|
|
17503
17994
|
};
|
|
17504
|
-
function _iterableToArrayLimit(
|
|
17505
|
-
var
|
|
17506
|
-
if (null !=
|
|
17507
|
-
var
|
|
17995
|
+
function _iterableToArrayLimit(r, l) {
|
|
17996
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
17997
|
+
if (null != t) {
|
|
17998
|
+
var e2, n2, i2, u, a = [], f = true, o = false;
|
|
17508
17999
|
try {
|
|
17509
|
-
if (
|
|
17510
|
-
if (Object(
|
|
18000
|
+
if (i2 = (t = t.call(r)).next, 0 === l) {
|
|
18001
|
+
if (Object(t) !== t)
|
|
17511
18002
|
return;
|
|
17512
|
-
|
|
18003
|
+
f = false;
|
|
17513
18004
|
} else
|
|
17514
|
-
for (; !(
|
|
18005
|
+
for (; !(f = (e2 = i2.call(t)).done) && (a.push(e2.value), a.length !== l); f = true)
|
|
17515
18006
|
;
|
|
17516
|
-
} catch (
|
|
17517
|
-
|
|
18007
|
+
} catch (r2) {
|
|
18008
|
+
o = true, n2 = r2;
|
|
17518
18009
|
} finally {
|
|
17519
18010
|
try {
|
|
17520
|
-
if (!
|
|
18011
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u))
|
|
17521
18012
|
return;
|
|
17522
18013
|
} finally {
|
|
17523
|
-
if (
|
|
17524
|
-
throw
|
|
18014
|
+
if (o)
|
|
18015
|
+
throw n2;
|
|
17525
18016
|
}
|
|
17526
18017
|
}
|
|
17527
|
-
return
|
|
18018
|
+
return a;
|
|
17528
18019
|
}
|
|
17529
18020
|
}
|
|
17530
18021
|
function _slicedToArray(arr, i2) {
|
|
@@ -18630,37 +19121,16 @@ var baseCreate$1 = function() {
|
|
|
18630
19121
|
};
|
|
18631
19122
|
}();
|
|
18632
19123
|
var _baseCreate = baseCreate$1;
|
|
18633
|
-
var
|
|
18634
|
-
var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
|
|
18635
|
-
var _getPrototype = getPrototype$2;
|
|
18636
|
-
var baseCreate = _baseCreate, getPrototype$1 = _getPrototype, isPrototype$1 = _isPrototype;
|
|
19124
|
+
var baseCreate = _baseCreate, getPrototype = _getPrototype, isPrototype$1 = _isPrototype;
|
|
18637
19125
|
function initCloneObject$1(object4) {
|
|
18638
|
-
return typeof object4.constructor == "function" && !isPrototype$1(object4) ? baseCreate(getPrototype
|
|
19126
|
+
return typeof object4.constructor == "function" && !isPrototype$1(object4) ? baseCreate(getPrototype(object4)) : {};
|
|
18639
19127
|
}
|
|
18640
19128
|
var _initCloneObject = initCloneObject$1;
|
|
18641
|
-
var isArrayLike$1 = isArrayLike_1, isObjectLike
|
|
19129
|
+
var isArrayLike$1 = isArrayLike_1, isObjectLike = isObjectLike_1;
|
|
18642
19130
|
function isArrayLikeObject$1(value) {
|
|
18643
|
-
return isObjectLike
|
|
19131
|
+
return isObjectLike(value) && isArrayLike$1(value);
|
|
18644
19132
|
}
|
|
18645
19133
|
var isArrayLikeObject_1 = isArrayLikeObject$1;
|
|
18646
|
-
var baseGetTag = _baseGetTag, getPrototype = _getPrototype, isObjectLike = isObjectLike_1;
|
|
18647
|
-
var objectTag = "[object Object]";
|
|
18648
|
-
var funcProto = Function.prototype, objectProto$1 = Object.prototype;
|
|
18649
|
-
var funcToString = funcProto.toString;
|
|
18650
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
18651
|
-
var objectCtorString = funcToString.call(Object);
|
|
18652
|
-
function isPlainObject$1(value) {
|
|
18653
|
-
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
|
18654
|
-
return false;
|
|
18655
|
-
}
|
|
18656
|
-
var proto = getPrototype(value);
|
|
18657
|
-
if (proto === null) {
|
|
18658
|
-
return true;
|
|
18659
|
-
}
|
|
18660
|
-
var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor;
|
|
18661
|
-
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
18662
|
-
}
|
|
18663
|
-
var isPlainObject_1 = isPlainObject$1;
|
|
18664
19134
|
function safeGet$2(object4, key) {
|
|
18665
19135
|
if (key === "constructor" && typeof object4[key] === "function") {
|
|
18666
19136
|
return;
|
|
@@ -18880,13 +19350,13 @@ var FieldContext = {};
|
|
|
18880
19350
|
var interopRequireWildcard = { exports: {} };
|
|
18881
19351
|
var _typeof = { exports: {} };
|
|
18882
19352
|
(function(module) {
|
|
18883
|
-
function _typeof2(
|
|
19353
|
+
function _typeof2(o) {
|
|
18884
19354
|
"@babel/helpers - typeof";
|
|
18885
|
-
return module.exports = _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(
|
|
18886
|
-
return typeof
|
|
18887
|
-
} : function(
|
|
18888
|
-
return
|
|
18889
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof2(
|
|
19355
|
+
return module.exports = _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
19356
|
+
return typeof o2;
|
|
19357
|
+
} : function(o2) {
|
|
19358
|
+
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
19359
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof2(o);
|
|
18890
19360
|
}
|
|
18891
19361
|
module.exports = _typeof2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
18892
19362
|
})(_typeof);
|
|
@@ -19080,30 +19550,140 @@ const Arrow = memo((props) => {
|
|
|
19080
19550
|
d: "M0,0 L30,0 L18.07289,14.312538 C16.65863,16.009645 14.13637,16.238942 12.43926,14.824685 C12.25341,14.669808 12.08199,14.49839 11.92711,14.312538 L0,0 L0,0 Z"
|
|
19081
19551
|
}))));
|
|
19082
19552
|
});
|
|
19553
|
+
const sides = ["top", "right", "bottom", "left"];
|
|
19554
|
+
const min = Math.min;
|
|
19555
|
+
const max = Math.max;
|
|
19556
|
+
const round = Math.round;
|
|
19557
|
+
const floor = Math.floor;
|
|
19558
|
+
const createCoords = (v) => ({
|
|
19559
|
+
x: v,
|
|
19560
|
+
y: v
|
|
19561
|
+
});
|
|
19562
|
+
const oppositeSideMap = {
|
|
19563
|
+
left: "right",
|
|
19564
|
+
right: "left",
|
|
19565
|
+
bottom: "top",
|
|
19566
|
+
top: "bottom"
|
|
19567
|
+
};
|
|
19568
|
+
const oppositeAlignmentMap = {
|
|
19569
|
+
start: "end",
|
|
19570
|
+
end: "start"
|
|
19571
|
+
};
|
|
19572
|
+
function clamp(start2, value, end) {
|
|
19573
|
+
return max(start2, min(value, end));
|
|
19574
|
+
}
|
|
19575
|
+
function evaluate(value, param) {
|
|
19576
|
+
return typeof value === "function" ? value(param) : value;
|
|
19577
|
+
}
|
|
19578
|
+
function getSide(placement) {
|
|
19579
|
+
return placement.split("-")[0];
|
|
19580
|
+
}
|
|
19083
19581
|
function getAlignment(placement) {
|
|
19084
19582
|
return placement.split("-")[1];
|
|
19085
19583
|
}
|
|
19086
|
-
function
|
|
19584
|
+
function getOppositeAxis(axis) {
|
|
19585
|
+
return axis === "x" ? "y" : "x";
|
|
19586
|
+
}
|
|
19587
|
+
function getAxisLength(axis) {
|
|
19087
19588
|
return axis === "y" ? "height" : "width";
|
|
19088
19589
|
}
|
|
19089
|
-
function
|
|
19090
|
-
return
|
|
19590
|
+
function getSideAxis(placement) {
|
|
19591
|
+
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
19592
|
+
}
|
|
19593
|
+
function getAlignmentAxis(placement) {
|
|
19594
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
19595
|
+
}
|
|
19596
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
19597
|
+
if (rtl === void 0) {
|
|
19598
|
+
rtl = false;
|
|
19599
|
+
}
|
|
19600
|
+
const alignment = getAlignment(placement);
|
|
19601
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
19602
|
+
const length = getAxisLength(alignmentAxis);
|
|
19603
|
+
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
19604
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
19605
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
19606
|
+
}
|
|
19607
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
19608
|
+
}
|
|
19609
|
+
function getExpandedPlacements(placement) {
|
|
19610
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
19611
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
19612
|
+
}
|
|
19613
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
19614
|
+
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
19615
|
+
}
|
|
19616
|
+
function getSideList(side, isStart, rtl) {
|
|
19617
|
+
const lr = ["left", "right"];
|
|
19618
|
+
const rl = ["right", "left"];
|
|
19619
|
+
const tb = ["top", "bottom"];
|
|
19620
|
+
const bt = ["bottom", "top"];
|
|
19621
|
+
switch (side) {
|
|
19622
|
+
case "top":
|
|
19623
|
+
case "bottom":
|
|
19624
|
+
if (rtl)
|
|
19625
|
+
return isStart ? rl : lr;
|
|
19626
|
+
return isStart ? lr : rl;
|
|
19627
|
+
case "left":
|
|
19628
|
+
case "right":
|
|
19629
|
+
return isStart ? tb : bt;
|
|
19630
|
+
default:
|
|
19631
|
+
return [];
|
|
19632
|
+
}
|
|
19633
|
+
}
|
|
19634
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
19635
|
+
const alignment = getAlignment(placement);
|
|
19636
|
+
let list2 = getSideList(getSide(placement), direction === "start", rtl);
|
|
19637
|
+
if (alignment) {
|
|
19638
|
+
list2 = list2.map((side) => side + "-" + alignment);
|
|
19639
|
+
if (flipAlignment) {
|
|
19640
|
+
list2 = list2.concat(list2.map(getOppositeAlignmentPlacement));
|
|
19641
|
+
}
|
|
19642
|
+
}
|
|
19643
|
+
return list2;
|
|
19644
|
+
}
|
|
19645
|
+
function getOppositePlacement(placement) {
|
|
19646
|
+
return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
|
|
19091
19647
|
}
|
|
19092
|
-
function
|
|
19093
|
-
return
|
|
19648
|
+
function expandPaddingObject(padding) {
|
|
19649
|
+
return {
|
|
19650
|
+
top: 0,
|
|
19651
|
+
right: 0,
|
|
19652
|
+
bottom: 0,
|
|
19653
|
+
left: 0,
|
|
19654
|
+
...padding
|
|
19655
|
+
};
|
|
19656
|
+
}
|
|
19657
|
+
function getPaddingObject(padding) {
|
|
19658
|
+
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
19659
|
+
top: padding,
|
|
19660
|
+
right: padding,
|
|
19661
|
+
bottom: padding,
|
|
19662
|
+
left: padding
|
|
19663
|
+
};
|
|
19664
|
+
}
|
|
19665
|
+
function rectToClientRect(rect) {
|
|
19666
|
+
return {
|
|
19667
|
+
...rect,
|
|
19668
|
+
top: rect.y,
|
|
19669
|
+
left: rect.x,
|
|
19670
|
+
right: rect.x + rect.width,
|
|
19671
|
+
bottom: rect.y + rect.height
|
|
19672
|
+
};
|
|
19094
19673
|
}
|
|
19095
19674
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
19096
19675
|
let {
|
|
19097
19676
|
reference,
|
|
19098
19677
|
floating
|
|
19099
19678
|
} = _ref;
|
|
19679
|
+
const sideAxis = getSideAxis(placement);
|
|
19680
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
19681
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
19682
|
+
const side = getSide(placement);
|
|
19683
|
+
const isVertical = sideAxis === "y";
|
|
19100
19684
|
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
19101
19685
|
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
19102
|
-
const
|
|
19103
|
-
const length = getLengthFromAxis(mainAxis);
|
|
19104
|
-
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
|
19105
|
-
const side = getSide(placement);
|
|
19106
|
-
const isVertical = mainAxis === "x";
|
|
19686
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
19107
19687
|
let coords;
|
|
19108
19688
|
switch (side) {
|
|
19109
19689
|
case "top":
|
|
@@ -19138,10 +19718,10 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
19138
19718
|
}
|
|
19139
19719
|
switch (getAlignment(placement)) {
|
|
19140
19720
|
case "start":
|
|
19141
|
-
coords[
|
|
19721
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
19142
19722
|
break;
|
|
19143
19723
|
case "end":
|
|
19144
|
-
coords[
|
|
19724
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
19145
19725
|
break;
|
|
19146
19726
|
}
|
|
19147
19727
|
return coords;
|
|
@@ -19230,35 +19810,6 @@ const computePosition$1 = async (reference, floating, config2) => {
|
|
|
19230
19810
|
middlewareData
|
|
19231
19811
|
};
|
|
19232
19812
|
};
|
|
19233
|
-
function evaluate(value, param) {
|
|
19234
|
-
return typeof value === "function" ? value(param) : value;
|
|
19235
|
-
}
|
|
19236
|
-
function expandPaddingObject(padding) {
|
|
19237
|
-
return {
|
|
19238
|
-
top: 0,
|
|
19239
|
-
right: 0,
|
|
19240
|
-
bottom: 0,
|
|
19241
|
-
left: 0,
|
|
19242
|
-
...padding
|
|
19243
|
-
};
|
|
19244
|
-
}
|
|
19245
|
-
function getSideObjectFromPadding(padding) {
|
|
19246
|
-
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
19247
|
-
top: padding,
|
|
19248
|
-
right: padding,
|
|
19249
|
-
bottom: padding,
|
|
19250
|
-
left: padding
|
|
19251
|
-
};
|
|
19252
|
-
}
|
|
19253
|
-
function rectToClientRect(rect) {
|
|
19254
|
-
return {
|
|
19255
|
-
...rect,
|
|
19256
|
-
top: rect.y,
|
|
19257
|
-
left: rect.x,
|
|
19258
|
-
right: rect.x + rect.width,
|
|
19259
|
-
bottom: rect.y + rect.height
|
|
19260
|
-
};
|
|
19261
|
-
}
|
|
19262
19813
|
async function detectOverflow(state, options) {
|
|
19263
19814
|
var _await$platform$isEle;
|
|
19264
19815
|
if (options === void 0) {
|
|
@@ -19279,7 +19830,7 @@ async function detectOverflow(state, options) {
|
|
|
19279
19830
|
altBoundary = false,
|
|
19280
19831
|
padding = 0
|
|
19281
19832
|
} = evaluate(options, state);
|
|
19282
|
-
const paddingObject =
|
|
19833
|
+
const paddingObject = getPaddingObject(padding);
|
|
19283
19834
|
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
19284
19835
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
19285
19836
|
const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
|
|
@@ -19313,11 +19864,6 @@ async function detectOverflow(state, options) {
|
|
|
19313
19864
|
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
19314
19865
|
};
|
|
19315
19866
|
}
|
|
19316
|
-
const min$1 = Math.min;
|
|
19317
|
-
const max$1 = Math.max;
|
|
19318
|
-
function within(min$1$1, value, max$1$1) {
|
|
19319
|
-
return max$1(min$1$1, min$1(value, max$1$1));
|
|
19320
|
-
}
|
|
19321
19867
|
const arrow = (options) => ({
|
|
19322
19868
|
name: "arrow",
|
|
19323
19869
|
options,
|
|
@@ -19328,7 +19874,8 @@ const arrow = (options) => ({
|
|
|
19328
19874
|
placement,
|
|
19329
19875
|
rects,
|
|
19330
19876
|
platform: platform2,
|
|
19331
|
-
elements
|
|
19877
|
+
elements,
|
|
19878
|
+
middlewareData
|
|
19332
19879
|
} = state;
|
|
19333
19880
|
const {
|
|
19334
19881
|
element,
|
|
@@ -19337,13 +19884,13 @@ const arrow = (options) => ({
|
|
|
19337
19884
|
if (element == null) {
|
|
19338
19885
|
return {};
|
|
19339
19886
|
}
|
|
19340
|
-
const paddingObject =
|
|
19887
|
+
const paddingObject = getPaddingObject(padding);
|
|
19341
19888
|
const coords = {
|
|
19342
19889
|
x,
|
|
19343
19890
|
y
|
|
19344
19891
|
};
|
|
19345
|
-
const axis =
|
|
19346
|
-
const length =
|
|
19892
|
+
const axis = getAlignmentAxis(placement);
|
|
19893
|
+
const length = getAxisLength(axis);
|
|
19347
19894
|
const arrowDimensions = await platform2.getDimensions(element);
|
|
19348
19895
|
const isYAxis = axis === "y";
|
|
19349
19896
|
const minProp = isYAxis ? "top" : "left";
|
|
@@ -19358,89 +19905,27 @@ const arrow = (options) => ({
|
|
|
19358
19905
|
}
|
|
19359
19906
|
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
19360
19907
|
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
19361
|
-
const minPadding = min
|
|
19362
|
-
const maxPadding = min
|
|
19363
|
-
const min$1
|
|
19908
|
+
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
19909
|
+
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
19910
|
+
const min$1 = minPadding;
|
|
19364
19911
|
const max2 = clientSize - arrowDimensions[length] - maxPadding;
|
|
19365
19912
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
19366
|
-
const offset2 =
|
|
19367
|
-
const shouldAddOffset = getAlignment(placement) != null && center != offset2 && rects.reference[length] / 2 - (center < min$1
|
|
19368
|
-
const alignmentOffset = shouldAddOffset ? center < min$1
|
|
19913
|
+
const offset2 = clamp(min$1, center, max2);
|
|
19914
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center != offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
19915
|
+
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
|
|
19369
19916
|
return {
|
|
19370
|
-
[axis]: coords[axis]
|
|
19917
|
+
[axis]: coords[axis] + alignmentOffset,
|
|
19371
19918
|
data: {
|
|
19372
19919
|
[axis]: offset2,
|
|
19373
|
-
centerOffset: center - offset2
|
|
19374
|
-
|
|
19920
|
+
centerOffset: center - offset2 - alignmentOffset,
|
|
19921
|
+
...shouldAddOffset && {
|
|
19922
|
+
alignmentOffset
|
|
19923
|
+
}
|
|
19924
|
+
},
|
|
19925
|
+
reset: shouldAddOffset
|
|
19375
19926
|
};
|
|
19376
19927
|
}
|
|
19377
19928
|
});
|
|
19378
|
-
const sides = ["top", "right", "bottom", "left"];
|
|
19379
|
-
const oppositeSideMap = {
|
|
19380
|
-
left: "right",
|
|
19381
|
-
right: "left",
|
|
19382
|
-
bottom: "top",
|
|
19383
|
-
top: "bottom"
|
|
19384
|
-
};
|
|
19385
|
-
function getOppositePlacement(placement) {
|
|
19386
|
-
return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
|
|
19387
|
-
}
|
|
19388
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
19389
|
-
if (rtl === void 0) {
|
|
19390
|
-
rtl = false;
|
|
19391
|
-
}
|
|
19392
|
-
const alignment = getAlignment(placement);
|
|
19393
|
-
const mainAxis = getMainAxisFromPlacement(placement);
|
|
19394
|
-
const length = getLengthFromAxis(mainAxis);
|
|
19395
|
-
let mainAlignmentSide = mainAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
19396
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
19397
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
19398
|
-
}
|
|
19399
|
-
return {
|
|
19400
|
-
main: mainAlignmentSide,
|
|
19401
|
-
cross: getOppositePlacement(mainAlignmentSide)
|
|
19402
|
-
};
|
|
19403
|
-
}
|
|
19404
|
-
const oppositeAlignmentMap = {
|
|
19405
|
-
start: "end",
|
|
19406
|
-
end: "start"
|
|
19407
|
-
};
|
|
19408
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
19409
|
-
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
19410
|
-
}
|
|
19411
|
-
function getExpandedPlacements(placement) {
|
|
19412
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
19413
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
19414
|
-
}
|
|
19415
|
-
function getSideList(side, isStart, rtl) {
|
|
19416
|
-
const lr = ["left", "right"];
|
|
19417
|
-
const rl = ["right", "left"];
|
|
19418
|
-
const tb = ["top", "bottom"];
|
|
19419
|
-
const bt = ["bottom", "top"];
|
|
19420
|
-
switch (side) {
|
|
19421
|
-
case "top":
|
|
19422
|
-
case "bottom":
|
|
19423
|
-
if (rtl)
|
|
19424
|
-
return isStart ? rl : lr;
|
|
19425
|
-
return isStart ? lr : rl;
|
|
19426
|
-
case "left":
|
|
19427
|
-
case "right":
|
|
19428
|
-
return isStart ? tb : bt;
|
|
19429
|
-
default:
|
|
19430
|
-
return [];
|
|
19431
|
-
}
|
|
19432
|
-
}
|
|
19433
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
19434
|
-
const alignment = getAlignment(placement);
|
|
19435
|
-
let list2 = getSideList(getSide(placement), direction === "start", rtl);
|
|
19436
|
-
if (alignment) {
|
|
19437
|
-
list2 = list2.map((side) => side + "-" + alignment);
|
|
19438
|
-
if (flipAlignment) {
|
|
19439
|
-
list2 = list2.concat(list2.map(getOppositeAlignmentPlacement));
|
|
19440
|
-
}
|
|
19441
|
-
}
|
|
19442
|
-
return list2;
|
|
19443
|
-
}
|
|
19444
19929
|
const flip = function(options) {
|
|
19445
19930
|
if (options === void 0) {
|
|
19446
19931
|
options = {};
|
|
@@ -19449,7 +19934,7 @@ const flip = function(options) {
|
|
|
19449
19934
|
name: "flip",
|
|
19450
19935
|
options,
|
|
19451
19936
|
async fn(state) {
|
|
19452
|
-
var _middlewareData$flip;
|
|
19937
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
19453
19938
|
const {
|
|
19454
19939
|
placement,
|
|
19455
19940
|
middlewareData,
|
|
@@ -19467,6 +19952,9 @@ const flip = function(options) {
|
|
|
19467
19952
|
flipAlignment = true,
|
|
19468
19953
|
...detectOverflowOptions
|
|
19469
19954
|
} = evaluate(options, state);
|
|
19955
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
19956
|
+
return {};
|
|
19957
|
+
}
|
|
19470
19958
|
const side = getSide(placement);
|
|
19471
19959
|
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
19472
19960
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
@@ -19482,11 +19970,8 @@ const flip = function(options) {
|
|
|
19482
19970
|
overflows.push(overflow[side]);
|
|
19483
19971
|
}
|
|
19484
19972
|
if (checkCrossAxis) {
|
|
19485
|
-
const
|
|
19486
|
-
|
|
19487
|
-
cross
|
|
19488
|
-
} = getAlignmentSides(placement, rects, rtl);
|
|
19489
|
-
overflows.push(overflow[main], overflow[cross]);
|
|
19973
|
+
const sides2 = getAlignmentSides(placement, rects, rtl);
|
|
19974
|
+
overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
|
|
19490
19975
|
}
|
|
19491
19976
|
overflowsData = [...overflowsData, {
|
|
19492
19977
|
placement,
|
|
@@ -19604,7 +20089,7 @@ async function convertValueToCoords(state, options) {
|
|
|
19604
20089
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
19605
20090
|
const side = getSide(placement);
|
|
19606
20091
|
const alignment = getAlignment(placement);
|
|
19607
|
-
const isVertical =
|
|
20092
|
+
const isVertical = getSideAxis(placement) === "y";
|
|
19608
20093
|
const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
19609
20094
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
19610
20095
|
const rawValue = evaluate(options, state);
|
|
@@ -19654,9 +20139,6 @@ const offset = function(options) {
|
|
|
19654
20139
|
}
|
|
19655
20140
|
};
|
|
19656
20141
|
};
|
|
19657
|
-
function getCrossAxis(axis) {
|
|
19658
|
-
return axis === "x" ? "y" : "x";
|
|
19659
|
-
}
|
|
19660
20142
|
const shift = function(options) {
|
|
19661
20143
|
if (options === void 0) {
|
|
19662
20144
|
options = {};
|
|
@@ -19692,8 +20174,8 @@ const shift = function(options) {
|
|
|
19692
20174
|
y
|
|
19693
20175
|
};
|
|
19694
20176
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
19695
|
-
const
|
|
19696
|
-
const
|
|
20177
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
20178
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
19697
20179
|
let mainAxisCoord = coords[mainAxis];
|
|
19698
20180
|
let crossAxisCoord = coords[crossAxis];
|
|
19699
20181
|
if (checkMainAxis) {
|
|
@@ -19701,14 +20183,14 @@ const shift = function(options) {
|
|
|
19701
20183
|
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
19702
20184
|
const min2 = mainAxisCoord + overflow[minSide];
|
|
19703
20185
|
const max2 = mainAxisCoord - overflow[maxSide];
|
|
19704
|
-
mainAxisCoord =
|
|
20186
|
+
mainAxisCoord = clamp(min2, mainAxisCoord, max2);
|
|
19705
20187
|
}
|
|
19706
20188
|
if (checkCrossAxis) {
|
|
19707
20189
|
const minSide = crossAxis === "y" ? "top" : "left";
|
|
19708
20190
|
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
19709
20191
|
const min2 = crossAxisCoord + overflow[minSide];
|
|
19710
20192
|
const max2 = crossAxisCoord - overflow[maxSide];
|
|
19711
|
-
crossAxisCoord =
|
|
20193
|
+
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
19712
20194
|
}
|
|
19713
20195
|
const limitedCoords = limiter.fn({
|
|
19714
20196
|
...state,
|
|
@@ -19748,8 +20230,8 @@ const limitShift = function(options) {
|
|
|
19748
20230
|
x,
|
|
19749
20231
|
y
|
|
19750
20232
|
};
|
|
19751
|
-
const
|
|
19752
|
-
const
|
|
20233
|
+
const crossAxis = getSideAxis(placement);
|
|
20234
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
19753
20235
|
let mainAxisCoord = coords[mainAxis];
|
|
19754
20236
|
let crossAxisCoord = coords[crossAxis];
|
|
19755
20237
|
const rawOffset = evaluate(offset2, state);
|
|
@@ -19790,33 +20272,34 @@ const limitShift = function(options) {
|
|
|
19790
20272
|
}
|
|
19791
20273
|
};
|
|
19792
20274
|
};
|
|
19793
|
-
function getWindow(node) {
|
|
19794
|
-
var _node$ownerDocument;
|
|
19795
|
-
return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
19796
|
-
}
|
|
19797
|
-
function getComputedStyle$1(element) {
|
|
19798
|
-
return getWindow(element).getComputedStyle(element);
|
|
19799
|
-
}
|
|
19800
|
-
function isNode(value) {
|
|
19801
|
-
return value instanceof getWindow(value).Node;
|
|
19802
|
-
}
|
|
19803
20275
|
function getNodeName(node) {
|
|
19804
20276
|
if (isNode(node)) {
|
|
19805
20277
|
return (node.nodeName || "").toLowerCase();
|
|
19806
20278
|
}
|
|
19807
20279
|
return "#document";
|
|
19808
20280
|
}
|
|
19809
|
-
function
|
|
19810
|
-
|
|
20281
|
+
function getWindow(node) {
|
|
20282
|
+
var _node$ownerDocument;
|
|
20283
|
+
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
20284
|
+
}
|
|
20285
|
+
function getDocumentElement(node) {
|
|
20286
|
+
var _ref;
|
|
20287
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
20288
|
+
}
|
|
20289
|
+
function isNode(value) {
|
|
20290
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
19811
20291
|
}
|
|
19812
20292
|
function isElement(value) {
|
|
19813
|
-
return value instanceof getWindow(value).Element;
|
|
20293
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
19814
20294
|
}
|
|
19815
|
-
function
|
|
20295
|
+
function isHTMLElement(value) {
|
|
20296
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
20297
|
+
}
|
|
20298
|
+
function isShadowRoot(value) {
|
|
19816
20299
|
if (typeof ShadowRoot === "undefined") {
|
|
19817
20300
|
return false;
|
|
19818
20301
|
}
|
|
19819
|
-
return
|
|
20302
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
19820
20303
|
}
|
|
19821
20304
|
function isOverflowElement(element) {
|
|
19822
20305
|
const {
|
|
@@ -19824,35 +20307,86 @@ function isOverflowElement(element) {
|
|
|
19824
20307
|
overflowX,
|
|
19825
20308
|
overflowY,
|
|
19826
20309
|
display
|
|
19827
|
-
} = getComputedStyle
|
|
20310
|
+
} = getComputedStyle(element);
|
|
19828
20311
|
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
|
|
19829
20312
|
}
|
|
19830
20313
|
function isTableElement(element) {
|
|
19831
20314
|
return ["table", "td", "th"].includes(getNodeName(element));
|
|
19832
20315
|
}
|
|
19833
|
-
function isContainingBlock(element) {
|
|
19834
|
-
const
|
|
19835
|
-
const css = getComputedStyle
|
|
19836
|
-
return css.transform !== "none" || css.perspective !== "none" || !
|
|
20316
|
+
function isContainingBlock(element) {
|
|
20317
|
+
const webkit = isWebKit();
|
|
20318
|
+
const css = getComputedStyle(element);
|
|
20319
|
+
return css.transform !== "none" || css.perspective !== "none" || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
|
|
20320
|
+
}
|
|
20321
|
+
function getContainingBlock(element) {
|
|
20322
|
+
let currentNode = getParentNode(element);
|
|
20323
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
20324
|
+
if (isContainingBlock(currentNode)) {
|
|
20325
|
+
return currentNode;
|
|
20326
|
+
} else {
|
|
20327
|
+
currentNode = getParentNode(currentNode);
|
|
20328
|
+
}
|
|
20329
|
+
}
|
|
20330
|
+
return null;
|
|
20331
|
+
}
|
|
20332
|
+
function isWebKit() {
|
|
20333
|
+
if (typeof CSS === "undefined" || !CSS.supports)
|
|
20334
|
+
return false;
|
|
20335
|
+
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
20336
|
+
}
|
|
20337
|
+
function isLastTraversableNode(node) {
|
|
20338
|
+
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
20339
|
+
}
|
|
20340
|
+
function getComputedStyle(element) {
|
|
20341
|
+
return getWindow(element).getComputedStyle(element);
|
|
20342
|
+
}
|
|
20343
|
+
function getNodeScroll(element) {
|
|
20344
|
+
if (isElement(element)) {
|
|
20345
|
+
return {
|
|
20346
|
+
scrollLeft: element.scrollLeft,
|
|
20347
|
+
scrollTop: element.scrollTop
|
|
20348
|
+
};
|
|
20349
|
+
}
|
|
20350
|
+
return {
|
|
20351
|
+
scrollLeft: element.pageXOffset,
|
|
20352
|
+
scrollTop: element.pageYOffset
|
|
20353
|
+
};
|
|
20354
|
+
}
|
|
20355
|
+
function getParentNode(node) {
|
|
20356
|
+
if (getNodeName(node) === "html") {
|
|
20357
|
+
return node;
|
|
20358
|
+
}
|
|
20359
|
+
const result2 = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
20360
|
+
return isShadowRoot(result2) ? result2.host : result2;
|
|
19837
20361
|
}
|
|
19838
|
-
function
|
|
19839
|
-
|
|
19840
|
-
|
|
19841
|
-
|
|
20362
|
+
function getNearestOverflowAncestor(node) {
|
|
20363
|
+
const parentNode = getParentNode(node);
|
|
20364
|
+
if (isLastTraversableNode(parentNode)) {
|
|
20365
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
20366
|
+
}
|
|
20367
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
20368
|
+
return parentNode;
|
|
20369
|
+
}
|
|
20370
|
+
return getNearestOverflowAncestor(parentNode);
|
|
19842
20371
|
}
|
|
19843
|
-
function
|
|
19844
|
-
|
|
20372
|
+
function getOverflowAncestors(node, list2, traverseIframes) {
|
|
20373
|
+
var _node$ownerDocument2;
|
|
20374
|
+
if (list2 === void 0) {
|
|
20375
|
+
list2 = [];
|
|
20376
|
+
}
|
|
20377
|
+
if (traverseIframes === void 0) {
|
|
20378
|
+
traverseIframes = true;
|
|
20379
|
+
}
|
|
20380
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
20381
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
20382
|
+
const win = getWindow(scrollableAncestor);
|
|
20383
|
+
if (isBody) {
|
|
20384
|
+
return list2.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
|
|
20385
|
+
}
|
|
20386
|
+
return list2.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
19845
20387
|
}
|
|
19846
|
-
const min = Math.min;
|
|
19847
|
-
const max = Math.max;
|
|
19848
|
-
const round = Math.round;
|
|
19849
|
-
const floor = Math.floor;
|
|
19850
|
-
const createEmptyCoords = (v) => ({
|
|
19851
|
-
x: v,
|
|
19852
|
-
y: v
|
|
19853
|
-
});
|
|
19854
20388
|
function getCssDimensions(element) {
|
|
19855
|
-
const css = getComputedStyle
|
|
20389
|
+
const css = getComputedStyle(element);
|
|
19856
20390
|
let width = parseFloat(css.width) || 0;
|
|
19857
20391
|
let height = parseFloat(css.height) || 0;
|
|
19858
20392
|
const hasOffset = isHTMLElement(element);
|
|
@@ -19875,7 +20409,7 @@ function unwrapElement(element) {
|
|
|
19875
20409
|
function getScale(element) {
|
|
19876
20410
|
const domElement = unwrapElement(element);
|
|
19877
20411
|
if (!isHTMLElement(domElement)) {
|
|
19878
|
-
return
|
|
20412
|
+
return createCoords(1);
|
|
19879
20413
|
}
|
|
19880
20414
|
const rect = domElement.getBoundingClientRect();
|
|
19881
20415
|
const {
|
|
@@ -19896,24 +20430,26 @@ function getScale(element) {
|
|
|
19896
20430
|
y
|
|
19897
20431
|
};
|
|
19898
20432
|
}
|
|
19899
|
-
const noOffsets = /* @__PURE__ */
|
|
19900
|
-
function getVisualOffsets(element
|
|
19901
|
-
|
|
19902
|
-
if (
|
|
19903
|
-
isFixed = true;
|
|
19904
|
-
}
|
|
19905
|
-
if (!isSafari()) {
|
|
19906
|
-
return noOffsets;
|
|
19907
|
-
}
|
|
19908
|
-
const win = element ? getWindow(element) : window;
|
|
19909
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== win) {
|
|
20433
|
+
const noOffsets = /* @__PURE__ */ createCoords(0);
|
|
20434
|
+
function getVisualOffsets(element) {
|
|
20435
|
+
const win = getWindow(element);
|
|
20436
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
19910
20437
|
return noOffsets;
|
|
19911
20438
|
}
|
|
19912
20439
|
return {
|
|
19913
|
-
x:
|
|
19914
|
-
y:
|
|
20440
|
+
x: win.visualViewport.offsetLeft,
|
|
20441
|
+
y: win.visualViewport.offsetTop
|
|
19915
20442
|
};
|
|
19916
20443
|
}
|
|
20444
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
20445
|
+
if (isFixed === void 0) {
|
|
20446
|
+
isFixed = false;
|
|
20447
|
+
}
|
|
20448
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
20449
|
+
return false;
|
|
20450
|
+
}
|
|
20451
|
+
return isFixed;
|
|
20452
|
+
}
|
|
19917
20453
|
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
19918
20454
|
if (includeScale === void 0) {
|
|
19919
20455
|
includeScale = false;
|
|
@@ -19923,7 +20459,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
19923
20459
|
}
|
|
19924
20460
|
const clientRect = element.getBoundingClientRect();
|
|
19925
20461
|
const domElement = unwrapElement(element);
|
|
19926
|
-
let scale2 =
|
|
20462
|
+
let scale2 = createCoords(1);
|
|
19927
20463
|
if (includeScale) {
|
|
19928
20464
|
if (offsetParent) {
|
|
19929
20465
|
if (isElement(offsetParent)) {
|
|
@@ -19933,7 +20469,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
19933
20469
|
scale2 = getScale(element);
|
|
19934
20470
|
}
|
|
19935
20471
|
}
|
|
19936
|
-
const visualOffsets =
|
|
20472
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
19937
20473
|
let x = (clientRect.left + visualOffsets.x) / scale2.x;
|
|
19938
20474
|
let y = (clientRect.top + visualOffsets.y) / scale2.y;
|
|
19939
20475
|
let width = clientRect.width / scale2.x;
|
|
@@ -19964,21 +20500,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
19964
20500
|
y
|
|
19965
20501
|
});
|
|
19966
20502
|
}
|
|
19967
|
-
function getDocumentElement(node) {
|
|
19968
|
-
return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
|
|
19969
|
-
}
|
|
19970
|
-
function getNodeScroll(element) {
|
|
19971
|
-
if (isElement(element)) {
|
|
19972
|
-
return {
|
|
19973
|
-
scrollLeft: element.scrollLeft,
|
|
19974
|
-
scrollTop: element.scrollTop
|
|
19975
|
-
};
|
|
19976
|
-
}
|
|
19977
|
-
return {
|
|
19978
|
-
scrollLeft: element.pageXOffset,
|
|
19979
|
-
scrollTop: element.pageYOffset
|
|
19980
|
-
};
|
|
19981
|
-
}
|
|
19982
20503
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
19983
20504
|
let {
|
|
19984
20505
|
rect,
|
|
@@ -19994,8 +20515,8 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
19994
20515
|
scrollLeft: 0,
|
|
19995
20516
|
scrollTop: 0
|
|
19996
20517
|
};
|
|
19997
|
-
let scale2 =
|
|
19998
|
-
const offsets =
|
|
20518
|
+
let scale2 = createCoords(1);
|
|
20519
|
+
const offsets = createCoords(0);
|
|
19999
20520
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
|
|
20000
20521
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
20001
20522
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -20014,6 +20535,9 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
20014
20535
|
y: rect.y * scale2.y - scroll.scrollTop * scale2.y + offsets.y
|
|
20015
20536
|
};
|
|
20016
20537
|
}
|
|
20538
|
+
function getClientRects(element) {
|
|
20539
|
+
return Array.from(element.getClientRects());
|
|
20540
|
+
}
|
|
20017
20541
|
function getWindowScrollBarX(element) {
|
|
20018
20542
|
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
20019
20543
|
}
|
|
@@ -20025,7 +20549,7 @@ function getDocumentRect(element) {
|
|
|
20025
20549
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
20026
20550
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
20027
20551
|
const y = -scroll.scrollTop;
|
|
20028
|
-
if (getComputedStyle
|
|
20552
|
+
if (getComputedStyle(body).direction === "rtl") {
|
|
20029
20553
|
x += max(html.clientWidth, body.clientWidth) - width;
|
|
20030
20554
|
}
|
|
20031
20555
|
return {
|
|
@@ -20035,36 +20559,6 @@ function getDocumentRect(element) {
|
|
|
20035
20559
|
y
|
|
20036
20560
|
};
|
|
20037
20561
|
}
|
|
20038
|
-
function getParentNode(node) {
|
|
20039
|
-
if (getNodeName(node) === "html") {
|
|
20040
|
-
return node;
|
|
20041
|
-
}
|
|
20042
|
-
const result2 = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
20043
|
-
return isShadowRoot(result2) ? result2.host : result2;
|
|
20044
|
-
}
|
|
20045
|
-
function getNearestOverflowAncestor(node) {
|
|
20046
|
-
const parentNode = getParentNode(node);
|
|
20047
|
-
if (isLastTraversableNode(parentNode)) {
|
|
20048
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
20049
|
-
}
|
|
20050
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
20051
|
-
return parentNode;
|
|
20052
|
-
}
|
|
20053
|
-
return getNearestOverflowAncestor(parentNode);
|
|
20054
|
-
}
|
|
20055
|
-
function getOverflowAncestors(node, list2) {
|
|
20056
|
-
var _node$ownerDocument;
|
|
20057
|
-
if (list2 === void 0) {
|
|
20058
|
-
list2 = [];
|
|
20059
|
-
}
|
|
20060
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
20061
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
|
20062
|
-
const win = getWindow(scrollableAncestor);
|
|
20063
|
-
if (isBody) {
|
|
20064
|
-
return list2.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
|
|
20065
|
-
}
|
|
20066
|
-
return list2.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
20067
|
-
}
|
|
20068
20562
|
function getViewportRect(element, strategy) {
|
|
20069
20563
|
const win = getWindow(element);
|
|
20070
20564
|
const html = getDocumentElement(element);
|
|
@@ -20076,7 +20570,7 @@ function getViewportRect(element, strategy) {
|
|
|
20076
20570
|
if (visualViewport) {
|
|
20077
20571
|
width = visualViewport.width;
|
|
20078
20572
|
height = visualViewport.height;
|
|
20079
|
-
const visualViewportBased =
|
|
20573
|
+
const visualViewportBased = isWebKit();
|
|
20080
20574
|
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
20081
20575
|
x = visualViewport.offsetLeft;
|
|
20082
20576
|
y = visualViewport.offsetTop;
|
|
@@ -20093,7 +20587,7 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
20093
20587
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
20094
20588
|
const top = clientRect.top + element.clientTop;
|
|
20095
20589
|
const left = clientRect.left + element.clientLeft;
|
|
20096
|
-
const scale2 = isHTMLElement(element) ? getScale(element) :
|
|
20590
|
+
const scale2 = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
20097
20591
|
const width = element.clientWidth * scale2.x;
|
|
20098
20592
|
const height = element.clientHeight * scale2.y;
|
|
20099
20593
|
const x = left * scale2.x;
|
|
@@ -20128,19 +20622,19 @@ function hasFixedPositionAncestor(element, stopNode) {
|
|
|
20128
20622
|
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
20129
20623
|
return false;
|
|
20130
20624
|
}
|
|
20131
|
-
return getComputedStyle
|
|
20625
|
+
return getComputedStyle(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
20132
20626
|
}
|
|
20133
20627
|
function getClippingElementAncestors(element, cache) {
|
|
20134
20628
|
const cachedResult = cache.get(element);
|
|
20135
20629
|
if (cachedResult) {
|
|
20136
20630
|
return cachedResult;
|
|
20137
20631
|
}
|
|
20138
|
-
let result2 = getOverflowAncestors(element).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
20632
|
+
let result2 = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
20139
20633
|
let currentContainingBlockComputedStyle = null;
|
|
20140
|
-
const elementIsFixed = getComputedStyle
|
|
20634
|
+
const elementIsFixed = getComputedStyle(element).position === "fixed";
|
|
20141
20635
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
20142
20636
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
20143
|
-
const computedStyle = getComputedStyle
|
|
20637
|
+
const computedStyle = getComputedStyle(currentNode);
|
|
20144
20638
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
20145
20639
|
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
20146
20640
|
currentContainingBlockComputedStyle = null;
|
|
@@ -20184,40 +20678,6 @@ function getClippingRect(_ref) {
|
|
|
20184
20678
|
function getDimensions(element) {
|
|
20185
20679
|
return getCssDimensions(element);
|
|
20186
20680
|
}
|
|
20187
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
20188
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
20189
|
-
return null;
|
|
20190
|
-
}
|
|
20191
|
-
if (polyfill) {
|
|
20192
|
-
return polyfill(element);
|
|
20193
|
-
}
|
|
20194
|
-
return element.offsetParent;
|
|
20195
|
-
}
|
|
20196
|
-
function getContainingBlock(element) {
|
|
20197
|
-
let currentNode = getParentNode(element);
|
|
20198
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
20199
|
-
if (isContainingBlock(currentNode)) {
|
|
20200
|
-
return currentNode;
|
|
20201
|
-
} else {
|
|
20202
|
-
currentNode = getParentNode(currentNode);
|
|
20203
|
-
}
|
|
20204
|
-
}
|
|
20205
|
-
return null;
|
|
20206
|
-
}
|
|
20207
|
-
function getOffsetParent(element, polyfill) {
|
|
20208
|
-
const window2 = getWindow(element);
|
|
20209
|
-
if (!isHTMLElement(element)) {
|
|
20210
|
-
return window2;
|
|
20211
|
-
}
|
|
20212
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
20213
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
|
|
20214
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
20215
|
-
}
|
|
20216
|
-
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
20217
|
-
return window2;
|
|
20218
|
-
}
|
|
20219
|
-
return offsetParent || getContainingBlock(element) || window2;
|
|
20220
|
-
}
|
|
20221
20681
|
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
20222
20682
|
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
20223
20683
|
const documentElement = getDocumentElement(offsetParent);
|
|
@@ -20227,12 +20687,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
20227
20687
|
scrollLeft: 0,
|
|
20228
20688
|
scrollTop: 0
|
|
20229
20689
|
};
|
|
20230
|
-
const offsets =
|
|
20690
|
+
const offsets = createCoords(0);
|
|
20231
20691
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
20232
20692
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
20233
20693
|
scroll = getNodeScroll(offsetParent);
|
|
20234
20694
|
}
|
|
20235
|
-
if (
|
|
20695
|
+
if (isOffsetParentAnElement) {
|
|
20236
20696
|
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
20237
20697
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
20238
20698
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
@@ -20247,33 +20707,60 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
20247
20707
|
height: rect.height
|
|
20248
20708
|
};
|
|
20249
20709
|
}
|
|
20710
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
20711
|
+
if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
|
|
20712
|
+
return null;
|
|
20713
|
+
}
|
|
20714
|
+
if (polyfill) {
|
|
20715
|
+
return polyfill(element);
|
|
20716
|
+
}
|
|
20717
|
+
return element.offsetParent;
|
|
20718
|
+
}
|
|
20719
|
+
function getOffsetParent(element, polyfill) {
|
|
20720
|
+
const window2 = getWindow(element);
|
|
20721
|
+
if (!isHTMLElement(element)) {
|
|
20722
|
+
return window2;
|
|
20723
|
+
}
|
|
20724
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
20725
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
|
|
20726
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
20727
|
+
}
|
|
20728
|
+
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
20729
|
+
return window2;
|
|
20730
|
+
}
|
|
20731
|
+
return offsetParent || getContainingBlock(element) || window2;
|
|
20732
|
+
}
|
|
20733
|
+
const getElementRects = async function(_ref) {
|
|
20734
|
+
let {
|
|
20735
|
+
reference,
|
|
20736
|
+
floating,
|
|
20737
|
+
strategy
|
|
20738
|
+
} = _ref;
|
|
20739
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
20740
|
+
const getDimensionsFn = this.getDimensions;
|
|
20741
|
+
return {
|
|
20742
|
+
reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
|
|
20743
|
+
floating: {
|
|
20744
|
+
x: 0,
|
|
20745
|
+
y: 0,
|
|
20746
|
+
...await getDimensionsFn(floating)
|
|
20747
|
+
}
|
|
20748
|
+
};
|
|
20749
|
+
};
|
|
20750
|
+
function isRTL(element) {
|
|
20751
|
+
return getComputedStyle(element).direction === "rtl";
|
|
20752
|
+
}
|
|
20250
20753
|
const platform = {
|
|
20251
|
-
getClippingRect,
|
|
20252
20754
|
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
20253
|
-
isElement,
|
|
20254
|
-
getDimensions,
|
|
20255
|
-
getOffsetParent,
|
|
20256
20755
|
getDocumentElement,
|
|
20756
|
+
getClippingRect,
|
|
20757
|
+
getOffsetParent,
|
|
20758
|
+
getElementRects,
|
|
20759
|
+
getClientRects,
|
|
20760
|
+
getDimensions,
|
|
20257
20761
|
getScale,
|
|
20258
|
-
|
|
20259
|
-
|
|
20260
|
-
reference,
|
|
20261
|
-
floating,
|
|
20262
|
-
strategy
|
|
20263
|
-
} = _ref;
|
|
20264
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
20265
|
-
const getDimensionsFn = this.getDimensions;
|
|
20266
|
-
return {
|
|
20267
|
-
reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
|
|
20268
|
-
floating: {
|
|
20269
|
-
x: 0,
|
|
20270
|
-
y: 0,
|
|
20271
|
-
...await getDimensionsFn(floating)
|
|
20272
|
-
}
|
|
20273
|
-
};
|
|
20274
|
-
},
|
|
20275
|
-
getClientRects: (element) => Array.from(element.getClientRects()),
|
|
20276
|
-
isRTL: (element) => getComputedStyle$1(element).direction === "rtl"
|
|
20762
|
+
isElement,
|
|
20763
|
+
isRTL
|
|
20277
20764
|
};
|
|
20278
20765
|
function observeMove(element, onMove) {
|
|
20279
20766
|
let io = null;
|
|
@@ -20309,8 +20796,12 @@ function observeMove(element, onMove) {
|
|
|
20309
20796
|
const insetBottom = floor(root2.clientHeight - (top + height));
|
|
20310
20797
|
const insetLeft = floor(left);
|
|
20311
20798
|
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
20799
|
+
const options = {
|
|
20800
|
+
rootMargin,
|
|
20801
|
+
threshold: max(0, min(1, threshold)) || 1
|
|
20802
|
+
};
|
|
20312
20803
|
let isFirstUpdate = true;
|
|
20313
|
-
|
|
20804
|
+
function handleObserve(entries) {
|
|
20314
20805
|
const ratio = entries[0].intersectionRatio;
|
|
20315
20806
|
if (ratio !== threshold) {
|
|
20316
20807
|
if (!isFirstUpdate) {
|
|
@@ -20325,10 +20816,15 @@ function observeMove(element, onMove) {
|
|
|
20325
20816
|
}
|
|
20326
20817
|
}
|
|
20327
20818
|
isFirstUpdate = false;
|
|
20328
|
-
}
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
|
|
20819
|
+
}
|
|
20820
|
+
try {
|
|
20821
|
+
io = new IntersectionObserver(handleObserve, {
|
|
20822
|
+
...options,
|
|
20823
|
+
root: root2.ownerDocument
|
|
20824
|
+
});
|
|
20825
|
+
} catch (e2) {
|
|
20826
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
20827
|
+
}
|
|
20332
20828
|
io.observe(element);
|
|
20333
20829
|
}
|
|
20334
20830
|
refresh(true);
|
|
@@ -20341,7 +20837,7 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
20341
20837
|
const {
|
|
20342
20838
|
ancestorScroll = true,
|
|
20343
20839
|
ancestorResize = true,
|
|
20344
|
-
elementResize =
|
|
20840
|
+
elementResize = typeof ResizeObserver === "function",
|
|
20345
20841
|
layoutShift = typeof IntersectionObserver === "function",
|
|
20346
20842
|
animationFrame = false
|
|
20347
20843
|
} = options;
|
|
@@ -20354,9 +20850,20 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
20354
20850
|
ancestorResize && ancestor.addEventListener("resize", update2);
|
|
20355
20851
|
});
|
|
20356
20852
|
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2) : null;
|
|
20853
|
+
let reobserveFrame = -1;
|
|
20357
20854
|
let resizeObserver = null;
|
|
20358
20855
|
if (elementResize) {
|
|
20359
|
-
resizeObserver = new ResizeObserver(
|
|
20856
|
+
resizeObserver = new ResizeObserver((_ref) => {
|
|
20857
|
+
let [firstEntry] = _ref;
|
|
20858
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
20859
|
+
resizeObserver.unobserve(floating);
|
|
20860
|
+
cancelAnimationFrame(reobserveFrame);
|
|
20861
|
+
reobserveFrame = requestAnimationFrame(() => {
|
|
20862
|
+
resizeObserver && resizeObserver.observe(floating);
|
|
20863
|
+
});
|
|
20864
|
+
}
|
|
20865
|
+
update2();
|
|
20866
|
+
});
|
|
20360
20867
|
if (referenceEl && !animationFrame) {
|
|
20361
20868
|
resizeObserver.observe(referenceEl);
|
|
20362
20869
|
}
|
|
@@ -20611,10 +21118,17 @@ const PopoverMenu = forwardRef((props, ref) => {
|
|
|
20611
21118
|
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.hide();
|
|
20612
21119
|
}, [props.onAction]);
|
|
20613
21120
|
const overlay = useMemo(() => {
|
|
21121
|
+
const whetherScroll = (props === null || props === void 0 ? void 0 : props.maxCount) && props.actions.length > (props === null || props === void 0 ? void 0 : props.maxCount);
|
|
21122
|
+
const innerHeight = (props === null || props === void 0 ? void 0 : props.maxCount) && (props === null || props === void 0 ? void 0 : props.maxCount) * 48;
|
|
20614
21123
|
return React__default.createElement("div", {
|
|
20615
21124
|
className: `${classPrefix$M}-list`
|
|
20616
21125
|
}, React__default.createElement("div", {
|
|
20617
|
-
className: `${classPrefix$M}-list-inner
|
|
21126
|
+
className: classNames(`${classPrefix$M}-list-inner`, {
|
|
21127
|
+
[`${classPrefix$M}-list-scroll`]: whetherScroll
|
|
21128
|
+
}),
|
|
21129
|
+
style: {
|
|
21130
|
+
height: innerHeight
|
|
21131
|
+
}
|
|
20618
21132
|
}, props.actions.map((action, index2) => {
|
|
20619
21133
|
var _a;
|
|
20620
21134
|
return React__default.createElement("a", {
|
|
@@ -21021,6 +21535,7 @@ const Slide = (props) => {
|
|
|
21021
21535
|
dragLockRef,
|
|
21022
21536
|
maxZoom
|
|
21023
21537
|
} = props;
|
|
21538
|
+
const initialMartix = useRef([]);
|
|
21024
21539
|
const controlRef = useRef(null);
|
|
21025
21540
|
const imgRef = useRef(null);
|
|
21026
21541
|
const [{
|
|
@@ -21034,9 +21549,20 @@ const Slide = (props) => {
|
|
|
21034
21549
|
const controlSize = useSize(controlRef);
|
|
21035
21550
|
const imgSize = useSize(imgRef);
|
|
21036
21551
|
const pinchLockRef = useRef(false);
|
|
21037
|
-
const
|
|
21552
|
+
const getMinAndMax = (nextMatrix) => {
|
|
21038
21553
|
if (!controlSize || !imgSize)
|
|
21039
|
-
return
|
|
21554
|
+
return {
|
|
21555
|
+
x: {
|
|
21556
|
+
position: 0,
|
|
21557
|
+
minX: 0,
|
|
21558
|
+
maxX: 0
|
|
21559
|
+
},
|
|
21560
|
+
y: {
|
|
21561
|
+
position: 0,
|
|
21562
|
+
minY: 0,
|
|
21563
|
+
maxY: 0
|
|
21564
|
+
}
|
|
21565
|
+
};
|
|
21040
21566
|
const controlLeft = -controlSize.width / 2;
|
|
21041
21567
|
const controlTop = -controlSize.height / 2;
|
|
21042
21568
|
const imgLeft = -imgSize.width / 2;
|
|
@@ -21044,20 +21570,54 @@ const Slide = (props) => {
|
|
|
21044
21570
|
const zoom = getScaleX(nextMatrix);
|
|
21045
21571
|
const scaledImgWidth = zoom * imgSize.width;
|
|
21046
21572
|
const scaledImgHeight = zoom * imgSize.height;
|
|
21573
|
+
const minX = controlLeft - (scaledImgWidth - controlSize.width);
|
|
21574
|
+
const maxX = controlLeft;
|
|
21575
|
+
const minY = controlTop - (scaledImgHeight - controlSize.height);
|
|
21576
|
+
const maxY = controlTop;
|
|
21047
21577
|
const [x, y] = apply(nextMatrix, [imgLeft, imgTop]);
|
|
21578
|
+
return {
|
|
21579
|
+
x: {
|
|
21580
|
+
position: x,
|
|
21581
|
+
minX,
|
|
21582
|
+
maxX
|
|
21583
|
+
},
|
|
21584
|
+
y: {
|
|
21585
|
+
position: y,
|
|
21586
|
+
minY,
|
|
21587
|
+
maxY
|
|
21588
|
+
}
|
|
21589
|
+
};
|
|
21590
|
+
};
|
|
21591
|
+
const getReachBound = (position, min2, max2, buffer = 0) => {
|
|
21592
|
+
return [position <= min2 - buffer, position >= max2 + buffer];
|
|
21593
|
+
};
|
|
21594
|
+
const boundMatrix = (nextMatrix, type4, last = false) => {
|
|
21595
|
+
if (!controlSize || !imgSize)
|
|
21596
|
+
return nextMatrix;
|
|
21597
|
+
const zoom = getScaleX(nextMatrix);
|
|
21598
|
+
const scaledImgWidth = zoom * imgSize.width;
|
|
21599
|
+
const scaledImgHeight = zoom * imgSize.height;
|
|
21600
|
+
const {
|
|
21601
|
+
x: {
|
|
21602
|
+
position: x,
|
|
21603
|
+
minX,
|
|
21604
|
+
maxX
|
|
21605
|
+
},
|
|
21606
|
+
y: {
|
|
21607
|
+
position: y,
|
|
21608
|
+
minY,
|
|
21609
|
+
maxY
|
|
21610
|
+
}
|
|
21611
|
+
} = getMinAndMax(nextMatrix);
|
|
21048
21612
|
if (type4 === "translate") {
|
|
21049
21613
|
let boundedX = x;
|
|
21050
21614
|
let boundedY = y;
|
|
21051
21615
|
if (scaledImgWidth > controlSize.width) {
|
|
21052
|
-
const minX = controlLeft - (scaledImgWidth - controlSize.width);
|
|
21053
|
-
const maxX = controlLeft;
|
|
21054
21616
|
boundedX = last ? bound(x, minX, maxX) : rubberbandIfOutOfBounds(x, minX, maxX, zoom * 50);
|
|
21055
21617
|
} else {
|
|
21056
21618
|
boundedX = -scaledImgWidth / 2;
|
|
21057
21619
|
}
|
|
21058
21620
|
if (scaledImgHeight > controlSize.height) {
|
|
21059
|
-
const minY = controlTop - (scaledImgHeight - controlSize.height);
|
|
21060
|
-
const maxY = controlTop;
|
|
21061
21621
|
boundedY = last ? bound(y, minY, maxY) : rubberbandIfOutOfBounds(y, minY, maxY, zoom * 50);
|
|
21062
21622
|
} else {
|
|
21063
21623
|
boundedY = -scaledImgHeight / 2;
|
|
@@ -21065,19 +21625,29 @@ const Slide = (props) => {
|
|
|
21065
21625
|
return translate(nextMatrix, boundedX - x, boundedY - y);
|
|
21066
21626
|
}
|
|
21067
21627
|
if (type4 === "scale" && last) {
|
|
21068
|
-
const [boundedX, boundedY] = [scaledImgWidth > controlSize.width ? bound(x,
|
|
21628
|
+
const [boundedX, boundedY] = [scaledImgWidth > controlSize.width ? bound(x, minX, maxX) : -scaledImgWidth / 2, scaledImgHeight > controlSize.height ? bound(y, minY, maxY) : -scaledImgHeight / 2];
|
|
21069
21629
|
return translate(nextMatrix, boundedX - x, boundedY - y);
|
|
21070
21630
|
}
|
|
21071
21631
|
return nextMatrix;
|
|
21072
21632
|
};
|
|
21073
21633
|
useDragAndPinch({
|
|
21074
21634
|
onDrag: (state) => {
|
|
21075
|
-
|
|
21635
|
+
var _a;
|
|
21636
|
+
if (state.first) {
|
|
21637
|
+
const {
|
|
21638
|
+
x: {
|
|
21639
|
+
position: x,
|
|
21640
|
+
minX,
|
|
21641
|
+
maxX
|
|
21642
|
+
}
|
|
21643
|
+
} = getMinAndMax(matrix.get());
|
|
21644
|
+
initialMartix.current = getReachBound(x, minX, maxX);
|
|
21076
21645
|
return;
|
|
21646
|
+
}
|
|
21077
21647
|
if (state.pinching)
|
|
21078
21648
|
return state.cancel();
|
|
21079
21649
|
if (state.tap && state.elapsedTime > 0 && state.elapsedTime < 1e3) {
|
|
21080
|
-
props.onTap();
|
|
21650
|
+
(_a = props.onTap) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
21081
21651
|
return;
|
|
21082
21652
|
}
|
|
21083
21653
|
const currentZoom = getScaleX(matrix.get());
|
|
@@ -21096,6 +21666,21 @@ const Slide = (props) => {
|
|
|
21096
21666
|
matrix: boundMatrix(nextMatrix, "translate", state.last),
|
|
21097
21667
|
immediate: !state.last
|
|
21098
21668
|
});
|
|
21669
|
+
const {
|
|
21670
|
+
x: {
|
|
21671
|
+
position: x,
|
|
21672
|
+
minX,
|
|
21673
|
+
maxX
|
|
21674
|
+
}
|
|
21675
|
+
} = getMinAndMax(nextMatrix);
|
|
21676
|
+
if (state.last && initialMartix.current.some((i2) => i2) && getReachBound(x, minX, maxX).some((i2) => i2)) {
|
|
21677
|
+
if (dragLockRef) {
|
|
21678
|
+
dragLockRef.current = false;
|
|
21679
|
+
}
|
|
21680
|
+
api.start({
|
|
21681
|
+
matrix: create()
|
|
21682
|
+
});
|
|
21683
|
+
}
|
|
21099
21684
|
}
|
|
21100
21685
|
},
|
|
21101
21686
|
onPinch: (state) => {
|
|
@@ -21154,12 +21739,7 @@ const Slide = (props) => {
|
|
|
21154
21739
|
}
|
|
21155
21740
|
});
|
|
21156
21741
|
return React__default.createElement("div", {
|
|
21157
|
-
className: `${classPrefix$J}-slide
|
|
21158
|
-
onPointerMove: (e2) => {
|
|
21159
|
-
if (getScaleX(matrix.get()) !== 1) {
|
|
21160
|
-
e2.stopPropagation();
|
|
21161
|
-
}
|
|
21162
|
-
}
|
|
21742
|
+
className: `${classPrefix$J}-slide`
|
|
21163
21743
|
}, React__default.createElement("div", {
|
|
21164
21744
|
className: `${classPrefix$J}-control`,
|
|
21165
21745
|
ref: controlRef
|
|
@@ -21219,12 +21799,10 @@ const Slides = forwardRef((props, ref) => {
|
|
|
21219
21799
|
}, {
|
|
21220
21800
|
transform: ([x2, y]) => [-x2, y],
|
|
21221
21801
|
from: () => [x.get(), 0],
|
|
21222
|
-
bounds: () => {
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
};
|
|
21227
|
-
},
|
|
21802
|
+
bounds: () => ({
|
|
21803
|
+
left: 0,
|
|
21804
|
+
right: (count - 1) * slideWidth
|
|
21805
|
+
}),
|
|
21228
21806
|
rubberband: true,
|
|
21229
21807
|
axis: "x",
|
|
21230
21808
|
pointer: {
|
|
@@ -21278,10 +21856,7 @@ const ImageViewer$1 = (p) => {
|
|
|
21278
21856
|
className: `${classPrefix$H}-content`
|
|
21279
21857
|
}, props.image && React__default.createElement(Slide, {
|
|
21280
21858
|
image: props.image,
|
|
21281
|
-
onTap:
|
|
21282
|
-
var _a2;
|
|
21283
|
-
(_a2 = props.onClose) === null || _a2 === void 0 ? void 0 : _a2.call(props);
|
|
21284
|
-
},
|
|
21859
|
+
onTap: props.onClose,
|
|
21285
21860
|
maxZoom: props.maxZoom
|
|
21286
21861
|
})), props.image && React__default.createElement("div", {
|
|
21287
21862
|
className: `${classPrefix$H}-footer`
|
|
@@ -21305,11 +21880,13 @@ const MultiImageViewer = forwardRef((p, ref) => {
|
|
|
21305
21880
|
(_a2 = slidesRef.current) === null || _a2 === void 0 ? void 0 : _a2.swipeTo(index3, immediate);
|
|
21306
21881
|
}
|
|
21307
21882
|
}));
|
|
21308
|
-
const onSlideChange = useCallback((
|
|
21883
|
+
const onSlideChange = useCallback((newIndex) => {
|
|
21309
21884
|
var _a2;
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21885
|
+
if (newIndex === index2)
|
|
21886
|
+
return;
|
|
21887
|
+
setIndex(newIndex);
|
|
21888
|
+
(_a2 = props.onIndexChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, newIndex);
|
|
21889
|
+
}, [props.onIndexChange, index2]);
|
|
21313
21890
|
const node = React__default.createElement(Mask, {
|
|
21314
21891
|
visible: props.visible,
|
|
21315
21892
|
disableBodyScroll: false,
|
|
@@ -21323,10 +21900,7 @@ const MultiImageViewer = forwardRef((p, ref) => {
|
|
|
21323
21900
|
defaultIndex: index2,
|
|
21324
21901
|
onIndexChange: onSlideChange,
|
|
21325
21902
|
images: props.images,
|
|
21326
|
-
onTap:
|
|
21327
|
-
var _a2;
|
|
21328
|
-
(_a2 = props.onClose) === null || _a2 === void 0 ? void 0 : _a2.call(props);
|
|
21329
|
-
},
|
|
21903
|
+
onTap: props.onClose,
|
|
21330
21904
|
maxZoom: props.maxZoom
|
|
21331
21905
|
})), props.images && React__default.createElement("div", {
|
|
21332
21906
|
className: `${classPrefix$H}-footer`
|
|
@@ -21472,7 +22046,7 @@ const defaultProps$y = {
|
|
|
21472
22046
|
showFailed: true,
|
|
21473
22047
|
imageFit: "cover"
|
|
21474
22048
|
};
|
|
21475
|
-
const ImageUploader$1 = (p) => {
|
|
22049
|
+
const ImageUploader$1 = forwardRef((p, ref) => {
|
|
21476
22050
|
const {
|
|
21477
22051
|
locale
|
|
21478
22052
|
} = useConfig();
|
|
@@ -21486,6 +22060,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21486
22060
|
const containerSize = useSize(containerRef);
|
|
21487
22061
|
const gapMeasureRef = useRef(null);
|
|
21488
22062
|
const [cellSize, setCellSize] = useState$1(80);
|
|
22063
|
+
const inputRef = useRef(null);
|
|
21489
22064
|
useIsomorphicLayoutEffect$2(() => {
|
|
21490
22065
|
const gapMeasure = gapMeasureRef.current;
|
|
21491
22066
|
if (columns && containerSize && gapMeasure) {
|
|
@@ -21665,6 +22240,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21665
22240
|
}, React__default.createElement("span", {
|
|
21666
22241
|
className: `${classPrefix$E}-upload-button-icon`
|
|
21667
22242
|
}, React__default.createElement(AddOutline, null))), !props.disableUpload && React__default.createElement("input", {
|
|
22243
|
+
ref: inputRef,
|
|
21668
22244
|
capture: props.capture,
|
|
21669
22245
|
accept: props.accept,
|
|
21670
22246
|
multiple: props.multiple,
|
|
@@ -21673,6 +22249,11 @@ const ImageUploader$1 = (p) => {
|
|
|
21673
22249
|
onChange,
|
|
21674
22250
|
"aria-hidden": true
|
|
21675
22251
|
})));
|
|
22252
|
+
useImperativeHandle(ref, () => ({
|
|
22253
|
+
get nativeElement() {
|
|
22254
|
+
return inputRef.current;
|
|
22255
|
+
}
|
|
22256
|
+
}));
|
|
21676
22257
|
return withNativeProps(props, React__default.createElement("div", {
|
|
21677
22258
|
className: classPrefix$E,
|
|
21678
22259
|
ref: containerRef
|
|
@@ -21688,7 +22269,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21688
22269
|
wrap: true,
|
|
21689
22270
|
block: true
|
|
21690
22271
|
}, contentNode.props.children)));
|
|
21691
|
-
};
|
|
22272
|
+
});
|
|
21692
22273
|
const imageUploader = "";
|
|
21693
22274
|
const ImageUploader = ImageUploader$1;
|
|
21694
22275
|
const indexBar = "";
|
|
@@ -23304,7 +23885,7 @@ const ResultPage = (p) => {
|
|
|
23304
23885
|
className: `${classPrefix$n}-title`
|
|
23305
23886
|
}, title), isNodeWithContent(description) ? React__default.createElement("div", {
|
|
23306
23887
|
className: `${classPrefix$n}-description`
|
|
23307
|
-
}, description) : null, details.length ? React__default.createElement("div", {
|
|
23888
|
+
}, description) : null, (details === null || details === void 0 ? void 0 : details.length) ? React__default.createElement("div", {
|
|
23308
23889
|
className: `${classPrefix$n}-details`
|
|
23309
23890
|
}, (collapse2 ? details.slice(0, 3) : details).map((detail, index2) => {
|
|
23310
23891
|
return React__default.createElement("div", {
|
|
@@ -23321,7 +23902,7 @@ const ResultPage = (p) => {
|
|
|
23321
23902
|
className: `${classPrefix$n}-bg`
|
|
23322
23903
|
}))), React__default.createElement("div", {
|
|
23323
23904
|
className: `${classPrefix$n}-content`
|
|
23324
|
-
}, props.children), React__default.createElement("div", {
|
|
23905
|
+
}, props.children), (showPrimaryButton || showSecondaryButton) && React__default.createElement("div", {
|
|
23325
23906
|
className: `${classPrefix$n}-footer`
|
|
23326
23907
|
}, showSecondaryButton && React__default.createElement(Button, {
|
|
23327
23908
|
block: true,
|
|
@@ -23504,6 +24085,7 @@ const defaultProps$f = {
|
|
|
23504
24085
|
};
|
|
23505
24086
|
const Selector$1 = (p) => {
|
|
23506
24087
|
const props = mergeProps(defaultProps$f, p);
|
|
24088
|
+
const [labelName, valueName, , disabledName] = useFieldNames(props.fieldNames);
|
|
23507
24089
|
const [value, setValue2] = usePropsValue({
|
|
23508
24090
|
value: props.value,
|
|
23509
24091
|
defaultValue: props.defaultValue,
|
|
@@ -23511,7 +24093,7 @@ const Selector$1 = (p) => {
|
|
|
23511
24093
|
var _a;
|
|
23512
24094
|
const extend = {
|
|
23513
24095
|
get items() {
|
|
23514
|
-
return props.options.filter((option) => val.includes(option
|
|
24096
|
+
return props.options.filter((option) => val.includes(option[valueName]));
|
|
23515
24097
|
}
|
|
23516
24098
|
};
|
|
23517
24099
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, val, extend);
|
|
@@ -23521,31 +24103,31 @@ const Selector$1 = (p) => {
|
|
|
23521
24103
|
locale
|
|
23522
24104
|
} = useConfig();
|
|
23523
24105
|
const items = props.options.map((option) => {
|
|
23524
|
-
const active = (value || []).includes(option
|
|
23525
|
-
const disabled = option
|
|
24106
|
+
const active = (value || []).includes(option[valueName]);
|
|
24107
|
+
const disabled = option[disabledName] || props.disabled;
|
|
23526
24108
|
const itemCls = classNames(`${classPrefix$k}-item`, {
|
|
23527
24109
|
[`${classPrefix$k}-item-active`]: active && !props.multiple,
|
|
23528
24110
|
[`${classPrefix$k}-item-multiple-active`]: active && props.multiple,
|
|
23529
24111
|
[`${classPrefix$k}-item-disabled`]: disabled
|
|
23530
24112
|
});
|
|
23531
24113
|
return React__default.createElement("div", {
|
|
23532
|
-
key: option
|
|
24114
|
+
key: option[valueName],
|
|
23533
24115
|
className: itemCls,
|
|
23534
24116
|
onClick: () => {
|
|
23535
24117
|
if (disabled) {
|
|
23536
24118
|
return;
|
|
23537
24119
|
}
|
|
23538
24120
|
if (props.multiple) {
|
|
23539
|
-
const val = active ? value.filter((v) => v !== option
|
|
24121
|
+
const val = active ? value.filter((v) => v !== option[valueName]) : [...value, option[valueName]];
|
|
23540
24122
|
setValue2(val);
|
|
23541
24123
|
} else {
|
|
23542
|
-
const val = active ? [] : [option
|
|
24124
|
+
const val = active ? [] : [option[valueName]];
|
|
23543
24125
|
setValue2(val);
|
|
23544
24126
|
}
|
|
23545
24127
|
},
|
|
23546
24128
|
role: "option",
|
|
23547
24129
|
"aria-selected": active && !props.multiple || active && props.multiple
|
|
23548
|
-
}, option
|
|
24130
|
+
}, option[labelName], option.description && React__default.createElement("div", {
|
|
23549
24131
|
className: `${classPrefix$k}-item-description`
|
|
23550
24132
|
}, option.description), active && props.showCheckMark && React__default.createElement("div", {
|
|
23551
24133
|
className: `${classPrefix$k}-check-mark-wrapper`
|
|
@@ -23555,10 +24137,10 @@ const Selector$1 = (p) => {
|
|
|
23555
24137
|
className: classPrefix$k,
|
|
23556
24138
|
role: "listbox",
|
|
23557
24139
|
"aria-label": locale.Selector.name
|
|
23558
|
-
},
|
|
23559
|
-
wrap: true
|
|
23560
|
-
}, items), props.columns && React__default.createElement(Grid, {
|
|
24140
|
+
}, props.columns ? React__default.createElement(Grid, {
|
|
23561
24141
|
columns: props.columns
|
|
24142
|
+
}, items) : React__default.createElement(Space, {
|
|
24143
|
+
wrap: true
|
|
23562
24144
|
}, items)));
|
|
23563
24145
|
};
|
|
23564
24146
|
const Selector = Selector$1;
|
|
@@ -24355,30 +24937,30 @@ var arrayWithHoles = { exports: {} };
|
|
|
24355
24937
|
})(arrayWithHoles);
|
|
24356
24938
|
var iterableToArrayLimit = { exports: {} };
|
|
24357
24939
|
(function(module) {
|
|
24358
|
-
function _iterableToArrayLimit2(
|
|
24359
|
-
var
|
|
24360
|
-
if (null !=
|
|
24361
|
-
var
|
|
24940
|
+
function _iterableToArrayLimit2(r, l) {
|
|
24941
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
24942
|
+
if (null != t) {
|
|
24943
|
+
var e2, n2, i2, u, a = [], f = true, o = false;
|
|
24362
24944
|
try {
|
|
24363
|
-
if (
|
|
24364
|
-
if (Object(
|
|
24945
|
+
if (i2 = (t = t.call(r)).next, 0 === l) {
|
|
24946
|
+
if (Object(t) !== t)
|
|
24365
24947
|
return;
|
|
24366
|
-
|
|
24948
|
+
f = false;
|
|
24367
24949
|
} else
|
|
24368
|
-
for (; !(
|
|
24950
|
+
for (; !(f = (e2 = i2.call(t)).done) && (a.push(e2.value), a.length !== l); f = true)
|
|
24369
24951
|
;
|
|
24370
|
-
} catch (
|
|
24371
|
-
|
|
24952
|
+
} catch (r2) {
|
|
24953
|
+
o = true, n2 = r2;
|
|
24372
24954
|
} finally {
|
|
24373
24955
|
try {
|
|
24374
|
-
if (!
|
|
24956
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u))
|
|
24375
24957
|
return;
|
|
24376
24958
|
} finally {
|
|
24377
|
-
if (
|
|
24378
|
-
throw
|
|
24959
|
+
if (o)
|
|
24960
|
+
throw n2;
|
|
24379
24961
|
}
|
|
24380
24962
|
}
|
|
24381
|
-
return
|
|
24963
|
+
return a;
|
|
24382
24964
|
}
|
|
24383
24965
|
}
|
|
24384
24966
|
module.exports = _iterableToArrayLimit2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
@@ -24465,24 +25047,29 @@ Object.defineProperty(useLayoutEffect$1, "__esModule", {
|
|
|
24465
25047
|
useLayoutEffect$1.useLayoutUpdateEffect = useLayoutEffect$1.default = void 0;
|
|
24466
25048
|
var React$1 = _interopRequireWildcard$1(React__default);
|
|
24467
25049
|
var _canUseDom = _interopRequireDefault$2(canUseDom$1);
|
|
24468
|
-
var
|
|
24469
|
-
var
|
|
24470
|
-
useLayoutEffect$1.default = _default$1;
|
|
24471
|
-
var useLayoutUpdateEffect = function useLayoutUpdateEffect2(callback, deps) {
|
|
25050
|
+
var useInternalLayoutEffect = (0, _canUseDom.default)() ? React$1.useLayoutEffect : React$1.useEffect;
|
|
25051
|
+
var useLayoutEffect = function useLayoutEffect2(callback, deps) {
|
|
24472
25052
|
var firstMountRef = React$1.useRef(true);
|
|
24473
|
-
|
|
24474
|
-
|
|
24475
|
-
return callback();
|
|
24476
|
-
}
|
|
25053
|
+
useInternalLayoutEffect(function() {
|
|
25054
|
+
return callback(firstMountRef.current);
|
|
24477
25055
|
}, deps);
|
|
24478
|
-
|
|
25056
|
+
useInternalLayoutEffect(function() {
|
|
24479
25057
|
firstMountRef.current = false;
|
|
24480
25058
|
return function() {
|
|
24481
25059
|
firstMountRef.current = true;
|
|
24482
25060
|
};
|
|
24483
25061
|
}, []);
|
|
24484
25062
|
};
|
|
25063
|
+
var useLayoutUpdateEffect = function useLayoutUpdateEffect2(callback, deps) {
|
|
25064
|
+
useLayoutEffect(function(firstMount) {
|
|
25065
|
+
if (!firstMount) {
|
|
25066
|
+
return callback();
|
|
25067
|
+
}
|
|
25068
|
+
}, deps);
|
|
25069
|
+
};
|
|
24485
25070
|
useLayoutEffect$1.useLayoutUpdateEffect = useLayoutUpdateEffect;
|
|
25071
|
+
var _default$1 = useLayoutEffect;
|
|
25072
|
+
useLayoutEffect$1.default = _default$1;
|
|
24486
25073
|
var useState = {};
|
|
24487
25074
|
var _interopRequireWildcard = interopRequireWildcard.exports.default;
|
|
24488
25075
|
var _interopRequireDefault$1 = interopRequireDefault.exports.default;
|
|
@@ -25821,9 +26408,7 @@ const defaultProps$3 = {
|
|
|
25821
26408
|
};
|
|
25822
26409
|
const TreeSelect = (p) => {
|
|
25823
26410
|
const props = mergeProps(defaultProps$3, p);
|
|
25824
|
-
const labelName = props.fieldNames
|
|
25825
|
-
const valueName = props.fieldNames.value || "value";
|
|
25826
|
-
const childrenName = props.fieldNames.children || "children";
|
|
26411
|
+
const [labelName, valueName, childrenName] = useFieldNames(props.fieldNames);
|
|
25827
26412
|
const [value, setValue2] = usePropsValue({
|
|
25828
26413
|
value: props.value,
|
|
25829
26414
|
defaultValue: props.defaultValue
|
|
@@ -25913,9 +26498,7 @@ const Multiple = (p) => {
|
|
|
25913
26498
|
useEffect(() => {
|
|
25914
26499
|
devWarning("TreeSelect", "TreeSelect.Multiple has been deprecated.");
|
|
25915
26500
|
}, []);
|
|
25916
|
-
const labelName = props.fieldNames
|
|
25917
|
-
const valueName = props.fieldNames.value || "value";
|
|
25918
|
-
const childrenName = props.fieldNames.children || "children";
|
|
26501
|
+
const [labelName, valueName, childrenName] = useFieldNames(props.fieldNames);
|
|
25919
26502
|
const [expandKeys, setExpandKeys] = usePropsValue({
|
|
25920
26503
|
value: props.expandKeys,
|
|
25921
26504
|
defaultValue: props.defaultExpandKeys
|
|
@@ -26391,6 +26974,8 @@ export {
|
|
|
26391
26974
|
Badge,
|
|
26392
26975
|
Button,
|
|
26393
26976
|
Calendar,
|
|
26977
|
+
CalendarPicker,
|
|
26978
|
+
CalendarPickerView,
|
|
26394
26979
|
index$i as CapsuleTabs,
|
|
26395
26980
|
Card,
|
|
26396
26981
|
index$h as CascadePicker,
|