@sdata/web-vue 4.4.3 → 4.5.1
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/dist/sd.css +74 -9
- package/dist/sd.min.css +2 -2
- package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/client-only.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/feedback-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/icon-hover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-observer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/select-view/select-view.vue.d.ts +1 -1
- package/es/_components/select-view/select-view.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/_components/transition/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/_hooks/use-component-ref.d.ts +1 -1
- package/es/_hooks/use-responsive.js +6 -1
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/color.js +1 -1
- package/es/_utils/date.d.ts +1 -1
- package/es/_utils/date.js +6 -3
- package/es/_utils/debounce.d.ts +4 -1
- package/es/_utils/debounce.js +8 -1
- package/es/_utils/get-value-by-path.d.ts +1 -0
- package/es/_utils/get-value-by-path.js +9 -9
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +1 -1
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +8 -4
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +18 -5
- package/es/anchor/utils.d.ts +1 -1
- package/es/anchor/utils.js +4 -2
- package/es/auto-complete/auto-complete.vue.d.ts +4 -4
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +22 -9
- package/es/avatar/avatar-group.vue_vue_type_script_setup_true_lang.js +16 -23
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +36 -20
- package/es/avatar/style/index.css +4 -0
- package/es/avatar/style/index.scss +5 -0
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +24 -13
- package/es/badge/badge.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/basic-crud-table/basic-crud-modal.vue.d.ts +1 -1
- package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +24 -15
- package/es/basic-crud-table/basic-crud-table.vue.d.ts +4 -4
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +58 -37
- package/es/basic-crud-table/index.d.ts +12 -12
- package/es/bloom-menu/bloom-menu.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +64 -22
- package/es/border-beam/styles.js +20 -7
- package/es/breadcrumb/breadcrumb-item.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/breadcrumb/breadcrumb.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/button/button-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +19 -13
- package/es/button/index.d.ts +3 -3
- package/es/calendar/__test__/real-transitions.js +10 -0
- package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/components/header.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/calendar/core/config.js +17 -20
- package/es/calendar/core/events.js +59 -41
- package/es/calendar/core/i18n.d.ts +1 -1
- package/es/calendar/core/i18n.js +2 -2
- package/es/calendar/core/index.d.ts +6 -6
- package/es/calendar/core/index.js +1 -1
- package/es/calendar/core/view.js +10 -7
- package/es/calendar/modules/drag-and-drop.js +80 -30
- package/es/calendar/utils/date.d.ts +4 -4
- package/es/calendar/utils/date.js +20 -11
- package/es/card/card-actions.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/card/card-grid.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/card/card-meta.vue_vue_type_script_setup_true_lang.js +13 -10
- package/es/card/card.vue_vue_type_script_setup_true_lang.js +17 -11
- package/es/card/context.d.ts +2 -0
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel.vue_vue_type_script_setup_true_lang.js +13 -10
- package/es/cascader/base-cascader-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-column.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +8 -21
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +27 -12
- package/es/cascader/cascader-search-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader.vue.d.ts +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +37 -17
- package/es/cascader/context.d.ts +2 -2
- package/es/cascader/hooks/use-lazy-load.d.ts +6 -0
- package/es/cascader/hooks/use-lazy-load.js +35 -0
- package/es/cascader/interface.d.ts +4 -0
- package/es/cascader/utils.d.ts +2 -2
- package/es/cascader/utils.js +10 -8
- package/es/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/checkbox/icon-check.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/collapse/collapse-item.vue_vue_type_script_setup_true_lang.js +17 -2
- package/es/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/color-picker/control-bar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/gradient-thumb.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/color-picker/hooks/use-control-block.js +5 -1
- package/es/color-picker/palette.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/panel.vue_vue_type_script_setup_true_lang.js +31 -12
- package/es/color-picker/utils.js +1 -1
- package/es/comment/comment.vue_vue_type_script_setup_true_lang.js +7 -15
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/context.d.ts +5 -1
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/global-theme.d.ts +3 -0
- package/es/config-provider/global-theme.js +49 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +39 -37
- package/es/config-provider/theme.d.ts +1 -0
- package/es/config-provider/theme.js +5 -3
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +33 -25
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/date-picker/hooks/use-is-disabled-date.d.ts +2 -2
- package/es/date-picker/hooks/use-is-disabled-date.js +4 -5
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/index.d.ts +28 -0
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/month/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/quarter/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/shortcuts.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/year/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/pickers/date-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/month-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/quarter-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/week-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/year-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker.vue.d.ts +28 -0
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +24 -3
- package/es/descriptions/descriptions-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/descriptions/descriptions.vue_vue_type_script_setup_true_lang.js +10 -9
- package/es/descriptions/interface.d.ts +1 -0
- package/es/divider/divider.vue_vue_type_script_setup_true_lang.js +5 -3
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +28 -24
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +3 -6
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +15 -13
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +17 -13
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/ellipsis/ellipsis.vue.d.ts +2 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +23 -8
- package/es/ellipsis/index.d.ts +3 -0
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +24 -9
- package/es/empty/empty.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +34 -18
- package/es/file-previewer/pdfjs-worker.min.mjs +4 -4
- package/es/file-previewer/use-pdf-js.js +57 -38
- package/es/form/form-item-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item-message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +54 -15
- package/es/form/form.vue_vue_type_script_setup_true_lang.js +11 -8
- package/es/grid/context.d.ts +2 -2
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +11 -12
- package/es/grid/style/col.scss +2 -2
- package/es/grid/style/index.css +42 -0
- package/es/grid/utils/index.js +5 -2
- package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-calendar/icon-calendar.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-down/icon-caret-down.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-left/icon-caret-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-right/icon-caret-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-up/icon-caret-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-check/icon-check.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-check-circle-fill/icon-check-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-clock-circle/icon-clock-circle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-close/icon-close.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-close-circle-fill/icon-close-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-copy/icon-copy.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-delete/icon-delete.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-double-left/icon-double-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-double-right/icon-double-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-down/icon-down.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-drag-dot/icon-drag-dot.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-edit/icon-edit.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-empty/icon-empty.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-exclamation/icon-exclamation.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-eye/icon-eye.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-eye-invisible/icon-eye-invisible.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-frown-fill/icon-face-frown-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-meh-fill/icon-face-meh-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-smile-fill/icon-face-smile-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file/icon-file.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-audio/icon-file-audio.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-image/icon-file-image.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-pdf/icon-file-pdf.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-video/icon-file-video.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-filter/icon-filter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-fullscreen/icon-fullscreen.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-image-close/icon-image-close.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-info/icon-info.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-info-circle-fill/icon-info-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-left/icon-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-link/icon-link.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-loading/icon-loading.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu-fold/icon-menu-fold.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu-unfold/icon-menu-unfold.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-minus/icon-minus.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-more/icon-more.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-oblique-line/icon-oblique-line.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-original-size/icon-original-size.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-pause/icon-pause.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-plus/icon-plus.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-question-circle/icon-question-circle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-right/icon-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-rotate-left/icon-rotate-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-rotate-right/icon-rotate-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-search/icon-search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-star-fill/icon-star-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-to-top/icon-to-top.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-up/icon-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-upload/icon-upload.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-zoom-in/icon-zoom-in.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-zoom-out/icon-zoom-out.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon-component/add-from-icon-font-cn.js +5 -1
- package/es/icon-component/icon-font.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon-component/icon.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/icon.js +292 -292
- package/es/image/hooks/use-image-drag.js +4 -2
- package/es/image/image-footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +14 -10
- package/es/image/preview-action.vue.d.ts +6 -2
- package/es/image/preview-action.vue_vue_type_script_setup_true_lang.js +12 -3
- package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_setup_true_lang.js +7 -9
- package/es/image/preview-toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +17 -22
- package/es/index.css +74 -9
- package/es/index.d.ts +6 -6
- package/es/input/index.d.ts +3 -3
- package/es/input/input-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-search.vue.d.ts +1 -1
- package/es/input/input-search.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/input/input.vue_vue_type_script_setup_true_lang.js +7 -8
- package/es/input-mask/input-mask.vue_vue_type_script_setup_true_lang.js +14 -7
- package/es/input-mask/mask-engine.js +1 -1
- package/es/input-number/decimal.d.ts +3 -0
- package/es/input-number/decimal.js +49 -0
- package/es/input-number/input-number.vue_vue_type_script_setup_true_lang.js +60 -27
- package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +34 -16
- package/es/input-tag/utils.js +1 -1
- package/es/json-form/json-form-component.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/utils.js +4 -2
- package/es/kv-list/kv-list-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/layout/content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/index.d.ts +3 -3
- package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list.vue.d.ts +1 -1
- package/es/list/list.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/locale/interface.d.ts +4 -0
- package/es/locale/lang/en-us.js +4 -0
- package/es/locale/lang/zh-cn.js +4 -0
- package/es/mention/mention.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/indent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +13 -3
- package/es/menu/sub-menu-inline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu-pop.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/index.js +2 -1
- package/es/message/message-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/modal/hooks/use-draggable.js +3 -1
- package/es/modal/index.js +2 -2
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/model-selector/model-selector-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-name.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-separator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-shortcut.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/index.js +5 -2
- package/es/notification/notification-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/notification.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/number-flow/number-flow-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/number-flow/number-flow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/pagination/interface.d.ts +1 -0
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-jumper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/pagination.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/circle.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/progress/line.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/progress/progress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/steps.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +23 -12
- package/es/radio/radio-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/radio/radio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +9 -7
- package/es/regex-vis/layout.js +1 -1
- package/es/regex-vis/parser/parser.js +1 -1
- package/es/regex-vis/regex-vis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/result/403.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/404.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/500.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/index.d.ts +7 -6
- package/es/result/result.vue.d.ts +2 -2
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rich-text-editor/nodes/inline-component-node.js +1 -1
- package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/scrollbar/scrollbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sd-vue.js +1 -1
- package/es/secret/index.d.ts +4 -15
- package/es/secret/interface.d.ts +6 -0
- package/es/secret/secret.vue.d.ts +1 -5
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/index.d.ts +3 -3
- package/es/select/interface.d.ts +5 -0
- package/es/select/select-dropdown.vue.d.ts +3 -1
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +9 -5
- package/es/select/select.vue.d.ts +1 -1
- package/es/select/select.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/select/utils.js +1 -1
- package/es/selectable-card/index.d.ts +4 -52
- package/es/selectable-card/selectable-card.vue.d.ts +3 -20
- package/es/selectable-card/selectable-card.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/selectable-card/types.d.ts +17 -0
- package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-recording-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-skill-tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-stop-loading-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/index.d.ts +1 -0
- package/es/skeleton/interface.d.ts +14 -0
- package/es/skeleton/line.vue_vue_type_script_setup_true_lang.js +6 -8
- package/es/skeleton/shape.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +9 -4
- package/es/slider/slider-dots.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-marks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-ticks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/space/space.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/dot-loading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/spin.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/split/index.d.ts +1 -0
- package/es/split/interface.d.ts +7 -7
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +8 -4
- package/es/statistic/countdown.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/steps/index.d.ts +2 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/switch/index.d.ts +4 -3
- package/es/switch/switch.vue.d.ts +1 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/table/index.d.ts +3 -3
- package/es/table/table-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-th.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tbody.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-th.vue_vue_type_script_setup_true_lang.js +14 -3
- package/es/table/table-thead.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tr.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table.vue.d.ts +1 -1
- package/es/table/table.vue_vue_type_script_setup_true_lang.js +14 -5
- package/es/table/utils.js +1 -1
- package/es/tabs/index.d.ts +19 -57
- package/es/tabs/style/index.css +17 -1
- package/es/tabs/style/index.scss +17 -1
- package/es/tabs/tab-pane.vue.d.ts +1 -13
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +26 -5
- package/es/tabs/tabs-button.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/tabs/tabs-nav-ink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-nav.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/tabs/tabs.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/tag/index.d.ts +10 -10
- package/es/tag/tag.vue.d.ts +4 -4
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/textarea/index.d.ts +1 -0
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/style/index.scss +3 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/theme-provider/index.d.ts +1 -0
- package/es/thinking-orb/engine/profiles.js +1 -1
- package/es/thinking-orb/presets.js +1 -1
- package/es/thinking-orb/thinking-orb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/index.d.ts +1 -0
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/range-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/index.d.ts +2 -0
- package/es/timeline/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/timeline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/transfer/index.d.ts +1 -0
- package/es/transfer/transfer-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +3 -5
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/transition-node-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-filter-tree-node.js +2 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree-select/tree-select.vue.d.ts +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/trigger/interface.d.ts +4 -1
- package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +11 -5
- package/es/typography/base.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/typography/paragraph.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/text.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/title.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-operations.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/utils/inner-text-renderer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/style/index.css +9 -6
- package/es/upload/style/index.scss +12 -6
- package/es/upload/upload-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-picture-item.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/upload/upload-progress.vue_vue_type_script_setup_true_lang.js +42 -11
- package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/verification-code/index.d.ts +1 -0
- package/es/verification-code/verification-code.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/index.d.ts +5 -3
- package/es/watermark/watermark.vue_vue_type_script_setup_true_lang.js +4 -1
- package/json/vetur-attributes.json +4 -0
- package/json/vetur-tags.json +2 -1
- package/json/web-types.json +9 -1
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive } from 'vue';
|
|
1
|
+
import { onBeforeUnmount, reactive } from 'vue';
|
|
2
2
|
|
|
3
3
|
import { pxToPercentage, percentageToMinutes } from '../utils/conversions';
|
|
4
4
|
import { eventRangeViolatesAllowEvents } from '../utils/special-hours-allow-events';
|
|
@@ -13,16 +13,39 @@ let pressPrevOrNextInterval = null;
|
|
|
13
13
|
const viewBeforeDrag = reactive({ id: null, date: null }); // To go back if cancelling.
|
|
14
14
|
let viewChanged = false;
|
|
15
15
|
let cancelViewChange = true;
|
|
16
|
-
const dragOverCell = reactive({ el: null, cell: null, timeout: null });
|
|
16
|
+
const dragOverCell = reactive({ el: null, cell: null, timeout: null, calendarUid: null });
|
|
17
|
+
function clearDragHover() {
|
|
18
|
+
clearTimeout(dragOverCell.timeout);
|
|
19
|
+
if (dragOverCell.cell) {
|
|
20
|
+
dragOverCell.cell.highlighted = false;
|
|
21
|
+
dragOverCell.cell.highlightedSchedule = null;
|
|
22
|
+
}
|
|
23
|
+
Object.assign(dragOverCell, { el: null, cell: null, timeout: null, calendarUid: null });
|
|
24
|
+
}
|
|
17
25
|
const dragging = reactive({
|
|
18
26
|
eventId: null,
|
|
19
27
|
fromCalendar: null,
|
|
20
28
|
toCalendar: null,
|
|
29
|
+
removeSource: null,
|
|
21
30
|
});
|
|
22
31
|
|
|
23
32
|
export function useDragAndDrop(calendar) {
|
|
24
33
|
const { config, view, eventsManager, emit, uid: calendarUid, dateUtils } = calendar;
|
|
25
34
|
const prefixCls = calendar.prefixCls;
|
|
35
|
+
let disposed = false;
|
|
36
|
+
onBeforeUnmount(() => {
|
|
37
|
+
disposed = true;
|
|
38
|
+
if (dragOverCell.calendarUid === calendarUid || dragging.fromCalendar === calendarUid)
|
|
39
|
+
clearDragHover();
|
|
40
|
+
if (dragging.fromCalendar === calendarUid) {
|
|
41
|
+
Object.assign(dragging, {
|
|
42
|
+
eventId: null,
|
|
43
|
+
fromCalendar: null,
|
|
44
|
+
toCalendar: null,
|
|
45
|
+
removeSource: null,
|
|
46
|
+
});
|
|
47
|
+
} else if (dragging.toCalendar === calendarUid) dragging.toCalendar = null;
|
|
48
|
+
});
|
|
26
49
|
|
|
27
50
|
/**
|
|
28
51
|
* Calculate event start time based on cursor position.
|
|
@@ -129,6 +152,15 @@ export function useDragAndDrop(calendar) {
|
|
|
129
152
|
|
|
130
153
|
dragging.eventId = event._.id;
|
|
131
154
|
dragging.fromCalendar = calendarUid;
|
|
155
|
+
dragging.removeSource = () => {
|
|
156
|
+
if (disposed) return;
|
|
157
|
+
// Moving is governed by drag eligibility, independently of the delete control.
|
|
158
|
+
const index = config.events.findIndex((item) => item._.id === event._.id);
|
|
159
|
+
if (index === -1) return;
|
|
160
|
+
config.events.splice(index, 1);
|
|
161
|
+
emit('update:events', config.events);
|
|
162
|
+
emit('event-delete', event);
|
|
163
|
+
};
|
|
132
164
|
|
|
133
165
|
// Emit `event-drag-start` and return the updated event.
|
|
134
166
|
// `external` is when the event is not coming from this Calendar instance.
|
|
@@ -160,24 +192,16 @@ export function useDragAndDrop(calendar) {
|
|
|
160
192
|
* @param {Object} event The event being dragged.
|
|
161
193
|
*/
|
|
162
194
|
const eventDragEnd = (e, event) => {
|
|
195
|
+
clearDragHover();
|
|
163
196
|
dragging.eventId = null;
|
|
164
197
|
|
|
165
198
|
e.target
|
|
166
199
|
.closest(`.${prefixCls}__event`)
|
|
167
200
|
.classList.remove(`${prefixCls}__event--dragging-original`);
|
|
168
201
|
|
|
169
|
-
// If an event is dragged from a Calendar instance and dropped in a different one, remove the
|
|
170
|
-
// event from the first one.
|
|
171
|
-
const { fromCalendar, toCalendar } = dragging;
|
|
172
|
-
// First check if the destination is a Calendar (toCalendar), then the event can be deleted from
|
|
173
|
-
// the source.
|
|
174
|
-
// This is to prevent the event from being deleted when dragging and dropping to nowhere.
|
|
175
|
-
// When dropping the event to an external source, the event has to be deleted manually.
|
|
176
|
-
if (toCalendar && fromCalendar !== toCalendar) eventsManager.deleteEvent(event._.id, 3);
|
|
177
|
-
|
|
178
202
|
// When dropping the event, cancel view change if no cell received the event (in cellDragDrop).
|
|
179
203
|
if (viewChanged && cancelViewChange && viewBeforeDrag.id) {
|
|
180
|
-
view.
|
|
204
|
+
view.switch(viewBeforeDrag.id, viewBeforeDrag.date);
|
|
181
205
|
}
|
|
182
206
|
|
|
183
207
|
// Emit `event-drag-end` and return the updated event.
|
|
@@ -190,6 +214,7 @@ export function useDragAndDrop(calendar) {
|
|
|
190
214
|
|
|
191
215
|
dragging.fromCalendar = null;
|
|
192
216
|
dragging.toCalendar = null;
|
|
217
|
+
dragging.removeSource = null;
|
|
193
218
|
calendar.touch.isDraggingEvent = false; // For the global dragging class and cursor.
|
|
194
219
|
};
|
|
195
220
|
|
|
@@ -208,18 +233,28 @@ export function useDragAndDrop(calendar) {
|
|
|
208
233
|
|
|
209
234
|
// Cancel dragEnter event if hovering a child.
|
|
210
235
|
if (e.currentTarget.contains(e.relatedTarget)) return;
|
|
211
|
-
if (target === dragOverCell.el || !target.
|
|
236
|
+
if (target === dragOverCell.el || !target.classList.contains(`${prefixCls}__cell`))
|
|
212
237
|
return false;
|
|
213
238
|
|
|
214
239
|
// Un-highlight the previous cell.
|
|
215
240
|
if (dragOverCell.el) dragOverCell.cell.highlighted = false;
|
|
216
241
|
|
|
217
|
-
Object.assign(dragOverCell, {
|
|
242
|
+
Object.assign(dragOverCell, {
|
|
243
|
+
el: target,
|
|
244
|
+
cell,
|
|
245
|
+
calendarUid,
|
|
246
|
+
timeout: clearTimeout(dragOverCell.timeout),
|
|
247
|
+
});
|
|
218
248
|
cell.highlighted = true;
|
|
219
249
|
|
|
220
250
|
// On `years`, `year` & `month` views, go to narrower view on drag and hold.
|
|
221
251
|
if (['years', 'year', 'month'].includes(view.id)) {
|
|
222
|
-
dragOverCell.timeout = setTimeout(() =>
|
|
252
|
+
dragOverCell.timeout = setTimeout(() => {
|
|
253
|
+
if (view.narrowerView) {
|
|
254
|
+
viewChanged = true;
|
|
255
|
+
view.switch(view.narrowerView, cellDate);
|
|
256
|
+
}
|
|
257
|
+
}, 2000);
|
|
223
258
|
}
|
|
224
259
|
};
|
|
225
260
|
|
|
@@ -275,6 +310,10 @@ export function useDragAndDrop(calendar) {
|
|
|
275
310
|
* @param {Boolean} allDay Whether the event is dropped as all-day.
|
|
276
311
|
*/
|
|
277
312
|
const cellDragDrop = async (e, cell, allDay = false) => {
|
|
313
|
+
const sourceCalendar = dragging.fromCalendar;
|
|
314
|
+
const sourceEventId = dragging.eventId;
|
|
315
|
+
const removeSource = dragging.removeSource;
|
|
316
|
+
const external = sourceCalendar !== calendarUid;
|
|
278
317
|
// Needed to prevent navigation to the text set in dataTransfer from eventDragStart().
|
|
279
318
|
e.preventDefault();
|
|
280
319
|
|
|
@@ -396,29 +435,40 @@ export function useDragAndDrop(calendar) {
|
|
|
396
435
|
acceptDrop = false;
|
|
397
436
|
} else if (dropEventHandler) {
|
|
398
437
|
// acceptDrop may be false, true or a modified event object.
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
438
|
+
try {
|
|
439
|
+
acceptDrop = await dropEventHandler({
|
|
440
|
+
e,
|
|
441
|
+
event: { ...event, start: newStart, end: newEnd, schedule: newSchedule },
|
|
442
|
+
overlaps: event.getOverlappingEvents({
|
|
443
|
+
start: newStart,
|
|
444
|
+
end: newEnd,
|
|
445
|
+
schedule: newSchedule,
|
|
446
|
+
}),
|
|
447
|
+
cell,
|
|
448
|
+
external,
|
|
449
|
+
});
|
|
450
|
+
} catch (error) {
|
|
451
|
+
console.warn('Calendar: Event drop handler rejected the drop.', error);
|
|
452
|
+
acceptDrop = false;
|
|
453
|
+
}
|
|
410
454
|
// Can externally use event.isOverlapping() to check if the event overlaps with other events.
|
|
411
455
|
}
|
|
412
456
|
// If the event drop is accepted, add the event to the events array (source of truth).
|
|
413
|
-
if (
|
|
457
|
+
if (disposed) return;
|
|
458
|
+
if (acceptDrop !== false) {
|
|
459
|
+
onAcceptedDrop(acceptDrop);
|
|
460
|
+
if (event && external) removeSource?.();
|
|
461
|
+
}
|
|
414
462
|
|
|
415
463
|
// Refresh event metadata so the index and display reflect the new position.
|
|
416
464
|
if (event && acceptDrop !== false) eventsManager.refreshEventMeta(event);
|
|
417
465
|
|
|
418
466
|
cell.highlighted = false;
|
|
419
467
|
cell.highlightedSchedule = null;
|
|
420
|
-
|
|
421
|
-
|
|
468
|
+
if (dragging.fromCalendar === sourceCalendar && dragging.eventId === sourceEventId) {
|
|
469
|
+
cancelViewChange = acceptDrop === false;
|
|
470
|
+
dragging.toCalendar = acceptDrop === false ? null : calendarUid;
|
|
471
|
+
}
|
|
422
472
|
|
|
423
473
|
// Emit `event-dropped` and return the updated event.
|
|
424
474
|
// `external` is when the event is not coming from this Calendar instance.
|
|
@@ -427,7 +477,7 @@ export function useDragAndDrop(calendar) {
|
|
|
427
477
|
cell,
|
|
428
478
|
event,
|
|
429
479
|
originalEvent: incomingEvent,
|
|
430
|
-
external
|
|
480
|
+
external,
|
|
431
481
|
});
|
|
432
482
|
};
|
|
433
483
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function createDateUtils(): {
|
|
1
|
+
export function createDateUtils(getLocale?: () => undefined): {
|
|
2
2
|
addDays: (date: any, days: any) => Date;
|
|
3
3
|
subtractDays: (date: any, days: any) => Date;
|
|
4
4
|
addHours: (date: any, hours: any) => Date;
|
|
@@ -11,15 +11,15 @@ export function createDateUtils(): {
|
|
|
11
11
|
isSameDate: (date1: any, date2: any) => boolean;
|
|
12
12
|
isInRange: (date: any, rangeStart: any, rangeEnd: any) => boolean;
|
|
13
13
|
isLeapYear: (date: any) => boolean | 0;
|
|
14
|
-
getPreviousFirstDayOfWeek: (date: any) => Date;
|
|
14
|
+
getPreviousFirstDayOfWeek: (date: any, startWeekOnSunday?: boolean) => Date;
|
|
15
15
|
stringToDate: (date: any) => Date;
|
|
16
16
|
dateToMinutes: (date: any) => any;
|
|
17
17
|
countDays: (start: any, end: any) => number;
|
|
18
18
|
datesInSameTimeStep: (date1: any, date2: any, timeStep: any) => boolean;
|
|
19
19
|
isValid: (date: any) => any;
|
|
20
|
-
formatDate: (date:
|
|
20
|
+
formatDate: (date: any, format?: string, texts?: null) => string;
|
|
21
21
|
formatDateLite: (date: any) => string;
|
|
22
|
-
formatTime: (date:
|
|
22
|
+
formatTime: (date: any, format?: string, texts?: null, round?: boolean) => string;
|
|
23
23
|
formatTimeLite: (date: any) => string;
|
|
24
24
|
formatMinutes: (minutes: any) => string;
|
|
25
25
|
updateTexts: () => void;
|
|
@@ -43,11 +43,12 @@ const formatTimeLite = (date) => {
|
|
|
43
43
|
* @param {Object} _txts deprecated — kept for API compatibility, no longer used.
|
|
44
44
|
* @return {String} the formatted date.
|
|
45
45
|
*/
|
|
46
|
-
const formatDate = (date, format = 'YYYY-MM-DD', _txts = null) => {
|
|
46
|
+
const formatDate = (date, format = 'YYYY-MM-DD', _txts = null, locale) => {
|
|
47
47
|
if (!format) format = 'YYYY-MM-DD';
|
|
48
48
|
// Fast path for the most common format.
|
|
49
49
|
if (format === 'YYYY-MM-DD') return formatDateLite(date);
|
|
50
|
-
|
|
50
|
+
const value = dayjs(date);
|
|
51
|
+
return (locale ? value.locale(locale) : value).format(mapTokens(format));
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
/**
|
|
@@ -59,7 +60,7 @@ const formatDate = (date, format = 'YYYY-MM-DD', _txts = null) => {
|
|
|
59
60
|
* @param {Boolean} round if time is 23:59:59, rounds up to 24:00 for formatting only.
|
|
60
61
|
* @return {String} the formatted time.
|
|
61
62
|
*/
|
|
62
|
-
const formatTime = (date, format = 'HH:mm', _txts = null, round = false) => {
|
|
63
|
+
const formatTime = (date, format = 'HH:mm', _txts = null, round = false, locale) => {
|
|
63
64
|
let shouldRound = false;
|
|
64
65
|
if (round && date instanceof Date) {
|
|
65
66
|
const [h, m, s] = [date.getHours(), date.getMinutes(), date.getSeconds()];
|
|
@@ -80,6 +81,7 @@ const formatTime = (date, format = 'HH:mm', _txts = null, round = false) => {
|
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
const dayjsFormat = mapTokens(format);
|
|
84
|
+
if (locale) d = d.locale(locale);
|
|
83
85
|
let formatted = d.format(dayjsFormat);
|
|
84
86
|
|
|
85
87
|
// Round 23:59:59 to 24:00 for display.
|
|
@@ -146,16 +148,21 @@ const isLeapYear = (date) => {
|
|
|
146
148
|
|
|
147
149
|
/**
|
|
148
150
|
* Returns the ISO week number for the given date.
|
|
149
|
-
*
|
|
150
|
-
* so that `dayjs.week()` returns the correct value.
|
|
151
|
+
* ISO numbering is independent of the display locale and first visible weekday.
|
|
151
152
|
*/
|
|
152
|
-
const getWeek = (date) => dayjs(date).
|
|
153
|
+
const getWeek = (date) => dayjs(date).isoWeek();
|
|
153
154
|
|
|
154
155
|
/**
|
|
155
156
|
* Returns the first day of the week containing `date`.
|
|
156
|
-
*
|
|
157
|
+
* Uses this calendar's week-start setting independently of the global date locale.
|
|
157
158
|
*/
|
|
158
|
-
const getPreviousFirstDayOfWeek = (date) =>
|
|
159
|
+
const getPreviousFirstDayOfWeek = (date, startWeekOnSunday = false) => {
|
|
160
|
+
const start = new Date(date);
|
|
161
|
+
const firstWeekday = startWeekOnSunday ? 0 : 1;
|
|
162
|
+
start.setDate(start.getDate() - ((start.getDay() - firstWeekday + 7) % 7));
|
|
163
|
+
start.setHours(0, 0, 0, 0);
|
|
164
|
+
return start;
|
|
165
|
+
};
|
|
159
166
|
|
|
160
167
|
/**
|
|
161
168
|
* Converts a string or Date to a JavaScript Date object.
|
|
@@ -224,7 +231,7 @@ const snapToInterval = (input, interval) => {
|
|
|
224
231
|
* The returned method signatures are kept stable so that component files
|
|
225
232
|
* need no changes.
|
|
226
233
|
*/
|
|
227
|
-
export const createDateUtils = () => ({
|
|
234
|
+
export const createDateUtils = (getLocale = () => undefined) => ({
|
|
228
235
|
addDays,
|
|
229
236
|
subtractDays,
|
|
230
237
|
addHours,
|
|
@@ -243,9 +250,11 @@ export const createDateUtils = () => ({
|
|
|
243
250
|
countDays,
|
|
244
251
|
datesInSameTimeStep,
|
|
245
252
|
isValid,
|
|
246
|
-
formatDate,
|
|
253
|
+
formatDate: (date, format = 'YYYY-MM-DD', texts = null) =>
|
|
254
|
+
formatDate(date, format, texts, getLocale()),
|
|
247
255
|
formatDateLite,
|
|
248
|
-
formatTime,
|
|
256
|
+
formatTime: (date, format = 'HH:mm', texts = null, round = false) =>
|
|
257
|
+
formatTime(date, format, texts, round, getLocale()),
|
|
249
258
|
formatTimeLite,
|
|
250
259
|
formatMinutes,
|
|
251
260
|
// Kept as no-op for backward compat (config.js calls it).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { getAllElements } from "../_utils/vue-utils.js";
|
|
4
4
|
import { Fragment, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, unref } from "vue";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { cardInjectionKey } from "./context.js";
|
|
4
|
-
import { computed, createElementBlock, defineComponent, inject, normalizeClass, onMounted, openBlock, renderSlot } from "vue";
|
|
4
|
+
import { computed, createElementBlock, defineComponent, inject, normalizeClass, onBeforeUnmount, onMounted, openBlock, renderSlot } from "vue";
|
|
5
5
|
//#region components/card/card-grid.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var card_grid_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "CardGrid" }), {}, {
|
|
7
7
|
__name: "card-grid",
|
|
@@ -19,7 +19,10 @@ hoverable: {
|
|
|
19
19
|
const prefixCls = getPrefixCls("card-grid");
|
|
20
20
|
const context = inject(cardInjectionKey);
|
|
21
21
|
onMounted(() => {
|
|
22
|
-
if (context) context.
|
|
22
|
+
if (context) context.gridCount++;
|
|
23
|
+
});
|
|
24
|
+
onBeforeUnmount(() => {
|
|
25
|
+
if (context) context.gridCount--;
|
|
23
26
|
});
|
|
24
27
|
const cls = computed(() => {
|
|
25
28
|
return [prefixCls, { [`${prefixCls}-hoverable`]: props.hoverable }];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { cardInjectionKey } from "./context.js";
|
|
4
4
|
import card_actions_default from "./card-actions.js";
|
|
5
|
-
import { Fragment,
|
|
5
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createTextVNode, defineComponent, inject, normalizeClass, onBeforeUnmount, onMounted, openBlock, renderSlot, toDisplayString, unref, useSlots } from "vue";
|
|
6
6
|
//#region components/card/card-meta.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var card_meta_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "CardMeta" }), {}, {
|
|
8
8
|
__name: "card-meta",
|
|
@@ -15,26 +15,29 @@ var card_meta_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
15
15
|
const slots = useSlots();
|
|
16
16
|
const prefixCls = getPrefixCls("card-meta");
|
|
17
17
|
const context = inject(cardInjectionKey, void 0);
|
|
18
|
-
const hasTitle =
|
|
18
|
+
const hasTitle = () => {
|
|
19
19
|
var _slots$title;
|
|
20
20
|
return Boolean((_slots$title = slots.title) !== null && _slots$title !== void 0 ? _slots$title : props.title);
|
|
21
|
-
}
|
|
22
|
-
const hasDescription =
|
|
21
|
+
};
|
|
22
|
+
const hasDescription = () => {
|
|
23
23
|
var _slots$description;
|
|
24
24
|
return Boolean((_slots$description = slots.description) !== null && _slots$description !== void 0 ? _slots$description : props.description);
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
onMounted(() => {
|
|
27
|
-
if (context) context.
|
|
27
|
+
if (context) context.metaCount++;
|
|
28
|
+
});
|
|
29
|
+
onBeforeUnmount(() => {
|
|
30
|
+
if (context) context.metaCount--;
|
|
28
31
|
});
|
|
29
32
|
return (_ctx, _cache) => {
|
|
30
33
|
var _unref2, _unref3;
|
|
31
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(prefixCls)) }, [hasTitle
|
|
34
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(prefixCls)) }, [hasTitle() || hasDescription() ? (openBlock(), createElementBlock("div", {
|
|
32
35
|
key: 0,
|
|
33
36
|
class: normalizeClass(`${unref(prefixCls)}-content`)
|
|
34
|
-
}, [hasTitle
|
|
37
|
+
}, [hasTitle() ? (openBlock(), createElementBlock("div", {
|
|
35
38
|
key: 0,
|
|
36
39
|
class: normalizeClass(`${unref(prefixCls)}-title`)
|
|
37
|
-
}, [_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.title), 1)], 64))], 2)) : createCommentVNode("", true), hasDescription
|
|
40
|
+
}, [_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.title), 1)], 64))], 2)) : createCommentVNode("", true), hasDescription() ? (openBlock(), createElementBlock("div", {
|
|
38
41
|
key: 1,
|
|
39
42
|
class: normalizeClass(`${unref(prefixCls)}-description`)
|
|
40
43
|
}, [_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.description), 1)], 64))], 2)) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), _ctx.$slots.avatar || ((_unref2 = unref(context)) === null || _unref2 === void 0 ? void 0 : _unref2.slots.actions) ? (openBlock(), createElementBlock("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { useSize } from "../_hooks/use-size.js";
|
|
5
5
|
import { useScrollbar } from "../_hooks/use-scrollbar.js";
|
|
@@ -53,19 +53,25 @@ var card_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
53
53
|
const { scrollbarProps } = useScrollbar(toRef(props, "scrollbar"));
|
|
54
54
|
const scrollEnabled = computed(() => props.fullHeight && props.scrollbar !== false);
|
|
55
55
|
const cardContext = reactive({
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
metaCount: 0,
|
|
57
|
+
gridCount: 0,
|
|
58
|
+
get hasMeta() {
|
|
59
|
+
return this.metaCount > 0;
|
|
60
|
+
},
|
|
61
|
+
get hasGrid() {
|
|
62
|
+
return this.gridCount > 0;
|
|
63
|
+
},
|
|
58
64
|
slots
|
|
59
65
|
});
|
|
60
66
|
provide(cardInjectionKey, cardContext);
|
|
61
|
-
const hasTitle =
|
|
67
|
+
const hasTitle = () => {
|
|
62
68
|
var _slots$title;
|
|
63
69
|
return Boolean((_slots$title = slots.title) !== null && _slots$title !== void 0 ? _slots$title : props.title);
|
|
64
|
-
}
|
|
65
|
-
const hasExtra =
|
|
70
|
+
};
|
|
71
|
+
const hasExtra = () => {
|
|
66
72
|
var _slots$extra;
|
|
67
73
|
return Boolean((_slots$extra = slots.extra) !== null && _slots$extra !== void 0 ? _slots$extra : props.extra);
|
|
68
|
-
}
|
|
74
|
+
};
|
|
69
75
|
const cls = computed(() => [
|
|
70
76
|
prefixCls,
|
|
71
77
|
`${prefixCls}-size-${mergedSize.value}`,
|
|
@@ -83,14 +89,14 @@ var card_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
83
89
|
}]);
|
|
84
90
|
return (_ctx, _cache) => {
|
|
85
91
|
return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, { class: cls.value }), [
|
|
86
|
-
hasTitle
|
|
92
|
+
hasTitle() || hasExtra() ? (openBlock(), createElementBlock("div", {
|
|
87
93
|
key: 0,
|
|
88
|
-
class: normalizeClass([`${unref(prefixCls)}-header`, { [`${unref(prefixCls)}-header-no-title`]: !hasTitle
|
|
94
|
+
class: normalizeClass([`${unref(prefixCls)}-header`, { [`${unref(prefixCls)}-header-no-title`]: !hasTitle() }]),
|
|
89
95
|
style: normalizeStyle(__props.headerStyle)
|
|
90
|
-
}, [hasTitle
|
|
96
|
+
}, [hasTitle() ? (openBlock(), createElementBlock("div", {
|
|
91
97
|
key: 0,
|
|
92
98
|
class: normalizeClass(`${unref(prefixCls)}-header-title`)
|
|
93
|
-
}, [_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.title), 1)], 64))], 2)) : createCommentVNode("", true), hasExtra
|
|
99
|
+
}, [_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.title), 1)], 64))], 2)) : createCommentVNode("", true), hasExtra() ? (openBlock(), createElementBlock("div", {
|
|
94
100
|
key: 1,
|
|
95
101
|
class: normalizeClass(`${unref(prefixCls)}-header-extra`)
|
|
96
102
|
}, [_ctx.$slots.extra ? renderSlot(_ctx.$slots, "extra", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.extra), 1)], 64))], 2)) : createCommentVNode("", true)], 6)) : createCommentVNode("", true),
|
package/es/card/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isActivationKey } from "../_utils/keyboard.js";
|
|
4
4
|
import { useI18n } from "../locale/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isActivationKey } from "../_utils/keyboard.js";
|
|
4
4
|
import { useI18n } from "../locale/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useI18n } from "../locale/index.js";
|
|
4
4
|
import { carouselInjectionKey } from "./context.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNumber, isObject } from "../_utils/is.js";
|
|
4
4
|
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
@@ -89,8 +89,8 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
89
89
|
let animationTimer = 0;
|
|
90
90
|
const { children, components } = useChildrenComponents("CarouselItem");
|
|
91
91
|
const innerIndex = ref(props.defaultCurrent - 1);
|
|
92
|
-
watch(() => props.current, (val) => {
|
|
93
|
-
if (
|
|
92
|
+
watch([() => props.current, () => components.value.length], ([val, count]) => {
|
|
93
|
+
if (count > 0) innerIndex.value = getValidIndex(isNumber(val) ? val - 1 : innerIndex.value, count);
|
|
94
94
|
});
|
|
95
95
|
const mergedIndexes = computed(() => {
|
|
96
96
|
const childrenLength = components.value.length;
|
|
@@ -127,7 +127,8 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
127
127
|
watchEffect(() => {
|
|
128
128
|
const { interval } = computedAutoPlay.value || {};
|
|
129
129
|
const { mergedNextIndex } = mergedIndexes.value;
|
|
130
|
-
const
|
|
130
|
+
const paused = computedAutoPlay.value.hoverToPause && isPause.value;
|
|
131
|
+
const shouldInterval = components.value.length > 1 && !paused && Boolean(interval);
|
|
131
132
|
clearIntervalTimer();
|
|
132
133
|
if (shouldInterval) intervalTimer = window.setInterval(() => slideTo({ targetIndex: mergedNextIndex }), interval);
|
|
133
134
|
});
|
|
@@ -137,11 +138,11 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
137
138
|
});
|
|
138
139
|
function getValidIndex(index, length) {
|
|
139
140
|
const indexNumber = +index;
|
|
140
|
-
return
|
|
141
|
+
return length > 0 && Number.isFinite(indexNumber) ? (Math.trunc(indexNumber) % length + length) % length : 0;
|
|
141
142
|
}
|
|
142
143
|
function slideTo({ targetIndex, isNegative = false, isManual = false }) {
|
|
143
|
-
if (!animationTimer && targetIndex !== innerIndex.value) {
|
|
144
|
-
previousIndex.value =
|
|
144
|
+
if (components.value.length > 1 && !animationTimer && targetIndex !== innerIndex.value) {
|
|
145
|
+
previousIndex.value = mergedIndexes.value.mergedIndex;
|
|
145
146
|
innerIndex.value = targetIndex;
|
|
146
147
|
slideDirection.value = isNegative ? "negative" : "positive";
|
|
147
148
|
animationTimer = window.setTimeout(() => {
|
|
@@ -170,6 +171,8 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
170
171
|
});
|
|
171
172
|
};
|
|
172
173
|
const onKeydown = (event) => {
|
|
174
|
+
const target = event.target;
|
|
175
|
+
if (target === null || target === void 0 ? void 0 : target.closest("input, textarea, select, [contenteditable=\"true\"]")) return;
|
|
173
176
|
if (event.key === KEYBOARD_KEY.ARROW_RIGHT || event.key === KEYBOARD_KEY.ARROW_DOWN) {
|
|
174
177
|
event.preventDefault();
|
|
175
178
|
onNextClick();
|
|
@@ -178,14 +181,14 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
178
181
|
onPreviousClick();
|
|
179
182
|
}
|
|
180
183
|
};
|
|
181
|
-
const eventListeners =
|
|
184
|
+
const eventListeners = {
|
|
182
185
|
mouseenter: () => {
|
|
183
186
|
isPause.value = true;
|
|
184
187
|
},
|
|
185
188
|
mouseleave: () => {
|
|
186
189
|
isPause.value = false;
|
|
187
190
|
}
|
|
188
|
-
}
|
|
191
|
+
};
|
|
189
192
|
const hasIndicator = computed(() => props.indicatorType !== "never" && components.value.length > 1);
|
|
190
193
|
const hasArrow = computed(() => props.showArrow !== "never" && components.value.length > 1);
|
|
191
194
|
const cls = computed(() => [prefixCls, `${prefixCls}-indicator-position-${props.indicatorPosition}`]);
|
|
@@ -231,7 +234,7 @@ var carousel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
231
234
|
"aria-roledescription": "carousel",
|
|
232
235
|
"aria-label": unref(t)("a11y.carousel"),
|
|
233
236
|
tabindex: "0"
|
|
234
|
-
}, toHandlers(eventListeners
|
|
237
|
+
}, toHandlers(eventListeners, true), { onKeydown }), [
|
|
235
238
|
createElementVNode("div", { class: normalizeClass(contentCls.value) }, [createVNode(VNodeRenderer, { content: getChildren() }, null, 8, ["content"])], 2),
|
|
236
239
|
hasIndicator.value ? (openBlock(), createElementBlock("div", {
|
|
237
240
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import Empty from "../empty/index.js";
|
|
5
5
|
import Spin from "../spin/index.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import virtual_list_default from "../_components/virtual-list/index.js";
|
|
5
5
|
import Empty from "../empty/index.js";
|
|
6
6
|
import Scrollbar from "../scrollbar/index.js";
|
|
7
7
|
import cascader_option_default from "./cascader-option.js";
|
|
8
|
-
import { Fragment, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, inject, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
|
|
8
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, inject, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
|
|
9
9
|
import { createReusableTemplate } from "@vueuse/core";
|
|
10
10
|
//#region components/cascader/cascader-column.vue?vue&type=script&setup=true&lang.ts
|
|
11
11
|
var cascader_column_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
@@ -40,7 +40,7 @@ var cascader_column_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
40
40
|
const prefixCls = getPrefixCls("cascader");
|
|
41
41
|
const configCtx = inject(configProviderInjectionKey, void 0);
|
|
42
42
|
const virtualListRef = ref();
|
|
43
|
-
const isVirtual =
|
|
43
|
+
const isVirtual = computed(() => Boolean(props.virtualListProps));
|
|
44
44
|
const [DefineOption, ReuseOption] = createReusableTemplate();
|
|
45
45
|
return (_ctx, _cache) => {
|
|
46
46
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
|
-
import { isFunction } from "../_utils/is.js";
|
|
4
3
|
import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
|
|
5
4
|
import IconLoading from "../icon/icon-loading/index.js";
|
|
6
5
|
import Checkbox from "../checkbox/index.js";
|
|
@@ -8,7 +7,7 @@ import Radio from "../radio/index.js";
|
|
|
8
7
|
import IconRight from "../icon/icon-right/index.js";
|
|
9
8
|
import { cascaderInjectionKey } from "./context.js";
|
|
10
9
|
import { getCheckedStatus, getOptionLabel } from "./utils.js";
|
|
11
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, openBlock,
|
|
10
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, openBlock, resolveDynamicComponent, toDisplayString, toRef, unref, withCtx, withModifiers } from "vue";
|
|
12
11
|
import { createReusableTemplate } from "@vueuse/core";
|
|
13
12
|
//#region components/cascader/cascader-option.vue?vue&type=script&setup=true&lang.ts
|
|
14
13
|
var _hoisted_1 = [
|
|
@@ -38,7 +37,10 @@ var cascader_option_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
38
37
|
const option = toRef(props, "option");
|
|
39
38
|
const prefixCls = getPrefixCls("cascader-option");
|
|
40
39
|
const cascaderCtx = inject(cascaderInjectionKey, {});
|
|
41
|
-
const isLoading =
|
|
40
|
+
const isLoading = computed(() => {
|
|
41
|
+
var _cascaderCtx$isLoadin, _cascaderCtx$isLoadin2;
|
|
42
|
+
return (_cascaderCtx$isLoadin = (_cascaderCtx$isLoadin2 = cascaderCtx.isLoading) === null || _cascaderCtx$isLoadin2 === void 0 ? void 0 : _cascaderCtx$isLoadin2.call(cascaderCtx, option.value)) !== null && _cascaderCtx$isLoadin !== void 0 ? _cascaderCtx$isLoadin : false;
|
|
43
|
+
});
|
|
42
44
|
const [DefineEllipsis, ReuseEllipsis] = createReusableTemplate();
|
|
43
45
|
const cls = computed(() => [prefixCls, {
|
|
44
46
|
[`${prefixCls}-active`]: props.active,
|
|
@@ -59,23 +61,8 @@ var cascader_option_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
59
61
|
return (_cascaderCtx$formatLa = (_cascaderCtx$formatLa2 = cascaderCtx.formatLabel) === null || _cascaderCtx$formatLa2 === void 0 ? void 0 : _cascaderCtx$formatLa2.call(cascaderCtx, option.value.path.map((item) => item.raw))) !== null && _cascaderCtx$formatLa !== void 0 ? _cascaderCtx$formatLa : getOptionLabel(option.value, { separator: cascaderCtx.separator });
|
|
60
62
|
});
|
|
61
63
|
function handlePathChange() {
|
|
62
|
-
var _cascaderCtx$setSelec;
|
|
63
|
-
|
|
64
|
-
const { isLeaf, children, key } = option.value;
|
|
65
|
-
if (!isLeaf && !children) {
|
|
66
|
-
isLoading.value = true;
|
|
67
|
-
new Promise((resolve) => {
|
|
68
|
-
var _cascaderCtx$loadMore;
|
|
69
|
-
(_cascaderCtx$loadMore = cascaderCtx.loadMore) === null || _cascaderCtx$loadMore === void 0 || _cascaderCtx$loadMore.call(cascaderCtx, option.value.raw, resolve);
|
|
70
|
-
}).then((children) => {
|
|
71
|
-
isLoading.value = false;
|
|
72
|
-
if (children) {
|
|
73
|
-
var _cascaderCtx$addLazyL;
|
|
74
|
-
(_cascaderCtx$addLazyL = cascaderCtx.addLazyLoadOptions) === null || _cascaderCtx$addLazyL === void 0 || _cascaderCtx$addLazyL.call(cascaderCtx, children, key);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
64
|
+
var _cascaderCtx$loadOpti, _cascaderCtx$setSelec;
|
|
65
|
+
(_cascaderCtx$loadOpti = cascaderCtx.loadOption) === null || _cascaderCtx$loadOpti === void 0 || _cascaderCtx$loadOpti.call(cascaderCtx, option.value);
|
|
79
66
|
(_cascaderCtx$setSelec = cascaderCtx.setSelectedPath) === null || _cascaderCtx$setSelec === void 0 || _cascaderCtx$setSelec.call(cascaderCtx, option.value.key);
|
|
80
67
|
}
|
|
81
68
|
function handleMouseenter() {
|