@sdata/web-vue 4.5.0 → 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 +73 -8
- 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 +73 -8
- 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 +2 -0
- package/es/tabs/style/index.css +16 -0
- package/es/tabs/style/index.scss +15 -0
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +1 -1
- 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 +1 -1
- 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,13 +1,13 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
2
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
3
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
4
4
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
5
5
|
import { isString } from "../_utils/is.js";
|
|
6
6
|
import Tooltip from "../tooltip/index.js";
|
|
7
7
|
import IconLoading from "../icon/icon-loading/index.js";
|
|
8
8
|
import { useSize } from "../_hooks/use-size.js";
|
|
9
9
|
import { buttonGroupInjectionKey } from "./context.js";
|
|
10
|
-
import { cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, onMounted, onUpdated, openBlock, ref, renderSlot, resolveDynamicComponent, toRefs, unref, useSlots, withCtx } from "vue";
|
|
10
|
+
import { cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, guardReactiveProps, inject, mergeProps, normalizeClass, normalizeProps, onBeforeUpdate, onMounted, onUpdated, openBlock, ref, renderSlot, resolveDynamicComponent, toRefs, unref, useSlots, watchEffect, withCtx } from "vue";
|
|
11
11
|
//#region components/button/button.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var _hoisted_1 = ["href"];
|
|
13
13
|
var _hoisted_2 = { key: 2 };
|
|
@@ -17,7 +17,10 @@ var _hoisted_3 = [
|
|
|
17
17
|
"autofocus"
|
|
18
18
|
];
|
|
19
19
|
var _hoisted_4 = { key: 2 };
|
|
20
|
-
var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
20
|
+
var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
21
|
+
name: "Button",
|
|
22
|
+
inheritAttrs: false
|
|
23
|
+
}), {}, {
|
|
21
24
|
__name: "button",
|
|
22
25
|
props: {
|
|
23
26
|
/**
|
|
@@ -129,7 +132,12 @@ var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
129
132
|
}
|
|
130
133
|
});
|
|
131
134
|
const slots = useSlots();
|
|
132
|
-
const hasTooltip =
|
|
135
|
+
const hasTooltip = ref(false);
|
|
136
|
+
const syncTooltip = () => {
|
|
137
|
+
hasTooltip.value = props.tooltip != null || Boolean(slots.tooltip);
|
|
138
|
+
};
|
|
139
|
+
watchEffect(syncTooltip);
|
|
140
|
+
onBeforeUpdate(syncTooltip);
|
|
133
141
|
const tooltipWrapper = computed(() => hasTooltip.value ? Tooltip : PassThrough);
|
|
134
142
|
const tooltipBindings = computed(() => {
|
|
135
143
|
if (!hasTooltip.value) return;
|
|
@@ -191,14 +199,13 @@ var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
191
199
|
};
|
|
192
200
|
return (_ctx, _cache) => {
|
|
193
201
|
return openBlock(), createBlock(resolveDynamicComponent(tooltipWrapper.value), normalizeProps(guardReactiveProps(tooltipBindings.value)), createSlots({
|
|
194
|
-
default: withCtx(() => [__props.href ? (openBlock(), createElementBlock("a", {
|
|
195
|
-
key: 0,
|
|
202
|
+
default: withCtx(() => [__props.href ? (openBlock(), createElementBlock("a", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
196
203
|
ref_key: "buttonRef",
|
|
197
204
|
ref: buttonRef,
|
|
198
|
-
class:
|
|
205
|
+
class: [cls.value, { [`${unref(prefixCls)}-only-icon`]: _ctx.$slots.icon && !_ctx.$slots.default }],
|
|
199
206
|
href: unref(mergedDisabled) || __props.loading ? void 0 : __props.href,
|
|
200
207
|
onClick: handleClick
|
|
201
|
-
}, [
|
|
208
|
+
}), [
|
|
202
209
|
__props.loading || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", {
|
|
203
210
|
key: 0,
|
|
204
211
|
class: normalizeClass(`${unref(prefixCls)}-icon`)
|
|
@@ -211,16 +218,15 @@ var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
211
218
|
key: 3,
|
|
212
219
|
class: normalizeClass(`${unref(prefixCls)}-sr-only`)
|
|
213
220
|
}, [renderSlot(_ctx.$slots, "sr-only")], 2)) : createCommentVNode("", true)
|
|
214
|
-
],
|
|
215
|
-
key: 1,
|
|
221
|
+
], 16, _hoisted_1)) : (openBlock(), createElementBlock("button", mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
216
222
|
ref_key: "buttonRef",
|
|
217
223
|
ref: buttonRef,
|
|
218
|
-
class:
|
|
224
|
+
class: [cls.value, { [`${unref(prefixCls)}-only-icon`]: _ctx.$slots.icon && !_ctx.$slots.default }],
|
|
219
225
|
type: __props.htmlType,
|
|
220
226
|
disabled: unref(mergedDisabled),
|
|
221
227
|
autofocus: __props.autofocus,
|
|
222
228
|
onClick: handleClick
|
|
223
|
-
}, [
|
|
229
|
+
}), [
|
|
224
230
|
__props.loading || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", {
|
|
225
231
|
key: 0,
|
|
226
232
|
class: normalizeClass(`${unref(prefixCls)}-icon`)
|
|
@@ -233,7 +239,7 @@ var button_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
233
239
|
key: 3,
|
|
234
240
|
class: normalizeClass(`${unref(prefixCls)}-sr-only`)
|
|
235
241
|
}, [renderSlot(_ctx.$slots, "sr-only")], 2)) : createCommentVNode("", true)
|
|
236
|
-
],
|
|
242
|
+
], 16, _hoisted_3))]),
|
|
237
243
|
_: 2
|
|
238
244
|
}, [_ctx.$slots.tooltip ? {
|
|
239
245
|
name: "content",
|
package/es/button/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ declare const Button: {
|
|
|
41
41
|
};
|
|
42
42
|
href: StringConstructor;
|
|
43
43
|
tooltip: {
|
|
44
|
-
type: import("vue").PropType<string | import("../
|
|
44
|
+
type: import("vue").PropType<string | import("../index.ts").TooltipProps>;
|
|
45
45
|
};
|
|
46
46
|
}>> & Readonly<{
|
|
47
47
|
onClick?: ((_ev: MouseEvent) => any) | undefined;
|
|
@@ -99,7 +99,7 @@ declare const Button: {
|
|
|
99
99
|
};
|
|
100
100
|
href: StringConstructor;
|
|
101
101
|
tooltip: {
|
|
102
|
-
type: import("vue").PropType<string | import("../
|
|
102
|
+
type: import("vue").PropType<string | import("../index.ts").TooltipProps>;
|
|
103
103
|
};
|
|
104
104
|
}>> & Readonly<{
|
|
105
105
|
onClick?: ((_ev: MouseEvent) => any) | undefined;
|
|
@@ -152,7 +152,7 @@ declare const Button: {
|
|
|
152
152
|
};
|
|
153
153
|
href: StringConstructor;
|
|
154
154
|
tooltip: {
|
|
155
|
-
type: import("vue").PropType<string | import("../
|
|
155
|
+
type: import("vue").PropType<string | import("../index.ts").TooltipProps>;
|
|
156
156
|
};
|
|
157
157
|
}>> & Readonly<{
|
|
158
158
|
onClick?: ((_ev: MouseEvent) => any) | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Transition stubs create extra grid items and invalidate Calendar pointer geometry.
|
|
2
|
+
Cypress.Commands.overwrite('mount', (mount, component, options = {}) =>
|
|
3
|
+
mount(component, {
|
|
4
|
+
...options,
|
|
5
|
+
global: {
|
|
6
|
+
...options.global,
|
|
7
|
+
stubs: { ...options.global?.stubs, 'transition': false, 'transition-group': false },
|
|
8
|
+
},
|
|
9
|
+
}),
|
|
10
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
|
+
import _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/asyncToGenerator.js";
|
|
3
3
|
import { calendarInjectionKey } from "../context.js";
|
|
4
4
|
import { minutesToPercentage, percentageToMinutes, pxToPercentage } from "../utils/conversions.js";
|
|
5
5
|
import { months, weekdays } from "../core/config.js";
|
|
@@ -280,7 +280,11 @@ var cell_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
280
280
|
return isBeforeMinDate.value || isAfterMaxDate.value;
|
|
281
281
|
});
|
|
282
282
|
const cellEventListeners = shallowRef({});
|
|
283
|
-
watch(() => [
|
|
283
|
+
watch(() => [
|
|
284
|
+
isDisabled.value,
|
|
285
|
+
config.eventListeners.cell,
|
|
286
|
+
config.editableEvents.drag
|
|
287
|
+
], () => {
|
|
284
288
|
if (isDisabled.value) {
|
|
285
289
|
cellEventListeners.value = {};
|
|
286
290
|
return;
|
|
@@ -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 { PerformantEllipsis } from "../../ellipsis/index.js";
|
|
3
3
|
import { calendarInjectionKey } from "../context.js";
|
|
4
4
|
import { minutesToPercentage } from "../utils/conversions.js";
|
|
@@ -42,13 +42,19 @@ var header_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
42
42
|
type: "button"
|
|
43
43
|
}, [renderSlot(_ctx.$slots, "previous-button")], 2),
|
|
44
44
|
createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}__transition-wrap`) }, [createVNode(Transition, { name: `${unref(prefixCls)}-slide-fade--${unref(view).transitionDirection}` }, {
|
|
45
|
-
default: withCtx(() => [(openBlock(), createElementBlock("div", { key: unref(view).id + unref(view).start.getTime() }, [_ctx.$slots.title || _ctx.$slots[`title.${unref(view).id}`] ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).clickToNavigate && unref(view).broaderView ? "button" : "div"), mergeProps({
|
|
45
|
+
default: withCtx(() => [(openBlock(), createElementBlock("div", { key: unref(view).id + unref(view).start.getTime() }, [_ctx.$slots.title || _ctx.$slots[`title.${unref(view).id}`] ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).clickToNavigate && unref(view).broaderView ? "button" : "div"), mergeProps({
|
|
46
|
+
key: 0,
|
|
47
|
+
type: unref(config).clickToNavigate && unref(view).broaderView ? "button" : void 0
|
|
48
|
+
}, toHandlers(titleEventHandlers.value), { class: `${unref(prefixCls)}__title` }), {
|
|
46
49
|
default: withCtx(() => [_ctx.$slots[`title.${unref(view).id}`] ? renderSlot(_ctx.$slots, `title.${unref(view).id}`, normalizeProps(guardReactiveProps(unref(view))), void 0, void 0, 0) : renderSlot(_ctx.$slots, "title", normalizeProps(guardReactiveProps(unref(view))), void 0, void 0, 1)]),
|
|
47
50
|
_: 3
|
|
48
|
-
}, 16, ["class"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(config).clickToNavigate && unref(view).broaderView ? "button" : "div"), mergeProps({
|
|
51
|
+
}, 16, ["type", "class"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(config).clickToNavigate && unref(view).broaderView ? "button" : "div"), mergeProps({
|
|
52
|
+
key: 1,
|
|
53
|
+
type: unref(config).clickToNavigate && unref(view).broaderView ? "button" : void 0
|
|
54
|
+
}, toHandlers(titleEventHandlers.value), { class: `${unref(prefixCls)}__title` }), {
|
|
49
55
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(view).title), 1), unref(view).titleWeekInfo ? (openBlock(), createElementBlock("small", _hoisted_2, "\xA0" + toDisplayString(unref(view).titleWeekInfo.text) + " " + toDisplayString(unref(view).titleWeekInfo.number), 1)) : createCommentVNode("", true)]),
|
|
50
56
|
_: 1
|
|
51
|
-
}, 16, ["class"]))]))]),
|
|
57
|
+
}, 16, ["type", "class"]))]))]),
|
|
52
58
|
_: 3
|
|
53
59
|
}, 8, ["name"])], 2),
|
|
54
60
|
unref(config).todayButton ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.$slots["today-button"] ? renderSlot(_ctx.$slots, "today-button", {
|
|
@@ -1,6 +1,6 @@
|
|
|
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 _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/asyncToGenerator.js";
|
|
4
4
|
import Scrollbar from "../../scrollbar/index.js";
|
|
5
5
|
import { useThemeMode } from "../../_hooks/use-theme-mode.js";
|
|
6
6
|
import { calendarElInjectionKey, calendarInjectionKey } from "../context.js";
|
|
@@ -2,6 +2,8 @@ import { computed, reactive, toRefs, watch } from 'vue';
|
|
|
2
2
|
|
|
3
3
|
import { initializeDateLocale } from '../../_utils/date';
|
|
4
4
|
import { useI18n } from '../../locale';
|
|
5
|
+
import enUS from '../../locale/lang/en-us';
|
|
6
|
+
import zhCN from '../../locale/lang/zh-cn';
|
|
5
7
|
import { createCalendarTexts } from './i18n';
|
|
6
8
|
|
|
7
9
|
export const defaults = {
|
|
@@ -141,7 +143,7 @@ const buildSpecialHoursDisallowed = (normalizedByWeekday) => {
|
|
|
141
143
|
for (const scheduleId in schedSrc) {
|
|
142
144
|
if (!Object.prototype.hasOwnProperty.call(schedSrc, scheduleId)) continue;
|
|
143
145
|
const ranges = schedSrc[scheduleId];
|
|
144
|
-
if (!ranges
|
|
146
|
+
if (!ranges) continue;
|
|
145
147
|
const arr = [];
|
|
146
148
|
for (let ri = 0; ri < ranges.length; ri++) {
|
|
147
149
|
const r = ranges[ri];
|
|
@@ -155,10 +157,9 @@ const buildSpecialHoursDisallowed = (normalizedByWeekday) => {
|
|
|
155
157
|
hasAny = true;
|
|
156
158
|
}
|
|
157
159
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
160
|
+
// Preserve empty overrides so this schedule does not inherit default restrictions.
|
|
161
|
+
if (!schedulesOut) schedulesOut = {};
|
|
162
|
+
schedulesOut[scheduleId] = arr;
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
|
|
@@ -445,30 +446,26 @@ export const useConfig = (calendar, props, attrs) => {
|
|
|
445
446
|
const weekStart = props.startWeekOnSunday ? 0 : 1;
|
|
446
447
|
|
|
447
448
|
// 1. Initialize dayjs locale (loads locale data, sets weekStart).
|
|
448
|
-
await initializeDateLocale(effectiveLocale, weekStart);
|
|
449
|
+
const dateLocale = await initializeDateLocale(effectiveLocale, weekStart);
|
|
449
450
|
|
|
450
451
|
// 2. Get calendar section from the library's locale messages.
|
|
451
|
-
const calendarLang =
|
|
452
|
+
const calendarLang = props.locale
|
|
453
|
+
? (dateLocale === 'en' ? enUS : zhCN).calendar
|
|
454
|
+
: i18nMessage.value?.calendar;
|
|
452
455
|
|
|
453
456
|
// 3. Build texts from dayjs locale data + library UI text.
|
|
454
|
-
const translations = createCalendarTexts(calendarLang);
|
|
455
|
-
Object.assign(calendar.texts, defaults.texts, translations);
|
|
457
|
+
const translations = createCalendarTexts(calendarLang, dateLocale);
|
|
458
|
+
Object.assign(calendar.texts, defaults.texts, translations, { dateLocale });
|
|
456
459
|
};
|
|
457
460
|
|
|
458
461
|
// Keep a local copy of the events so the prop is not mandatory.
|
|
459
462
|
const events = reactive(props.events || []);
|
|
460
|
-
//
|
|
461
|
-
// Avoids deep watching which would traverse every event property on each mutation.
|
|
462
|
-
watch(
|
|
463
|
-
() => props.events,
|
|
464
|
-
(evts) => events.splice(0, events.length, ...(evts || [])),
|
|
465
|
-
);
|
|
466
|
-
// Watch events length to catch push/pop/splice mutations.
|
|
463
|
+
// Track array membership after prop replacement without watching nested event edits.
|
|
467
464
|
watch(
|
|
468
|
-
() => props.events?.
|
|
469
|
-
() => {
|
|
470
|
-
|
|
471
|
-
|
|
465
|
+
() => props.events?.slice() || [],
|
|
466
|
+
(evts) => {
|
|
467
|
+
if (events.length !== evts.length || events.some((event, i) => event !== evts[i]))
|
|
468
|
+
events.splice(0, events.length, ...evts);
|
|
472
469
|
},
|
|
473
470
|
);
|
|
474
471
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, reactive, shallowReactive, watch } from 'vue';
|
|
1
|
+
import { computed, onBeforeUnmount, reactive, shallowReactive, watch } from 'vue';
|
|
2
2
|
|
|
3
3
|
import { percentageToMinutes } from '../utils/conversions';
|
|
4
4
|
import {
|
|
@@ -17,6 +17,8 @@ export const useEvents = (calendar) => {
|
|
|
17
17
|
const { dateUtils, config } = calendar;
|
|
18
18
|
const prefixCls = calendar.prefixCls;
|
|
19
19
|
let uid = 0; // Internal unique ID events counter.
|
|
20
|
+
let disposed = false;
|
|
21
|
+
let resizeRevision = 0;
|
|
20
22
|
|
|
21
23
|
// Use shallowReactive for the events index so that mutations to individual event
|
|
22
24
|
// properties (start/end during drag/resize) do NOT trigger a full re-index cascade.
|
|
@@ -239,25 +241,18 @@ export const useEvents = (calendar) => {
|
|
|
239
241
|
}
|
|
240
242
|
};
|
|
241
243
|
|
|
242
|
-
// Rebuild
|
|
244
|
+
// Rebuild on additions, removals and replacements, including same-length array edits.
|
|
243
245
|
// Individual event property mutations (start/end during drag/resize) do NOT trigger a rebuild —
|
|
244
246
|
// the event references in the index remain valid and the event component's own reactivity
|
|
245
247
|
// handles re-rendering at the individual event level.
|
|
246
248
|
// NOTE: watches must be placed AFTER normalizeEventDates/injectMetaData definitions
|
|
247
249
|
// to avoid temporal dead zone errors when immediate:true fires synchronously.
|
|
248
250
|
watch(
|
|
249
|
-
() => config.events.
|
|
251
|
+
() => config.events.slice(),
|
|
250
252
|
() => buildEventsIndex(),
|
|
251
253
|
{ immediate: true },
|
|
252
254
|
);
|
|
253
255
|
|
|
254
|
-
// Also handle full array reference replacement (e.g., props.events replaced entirely).
|
|
255
|
-
watch(
|
|
256
|
-
() => config.events,
|
|
257
|
-
() => buildEventsIndex(),
|
|
258
|
-
{ deep: false },
|
|
259
|
-
);
|
|
260
|
-
|
|
261
256
|
// Retrieve an event by its ID.
|
|
262
257
|
const getEvent = (id) => eventsIndex.byId[id];
|
|
263
258
|
|
|
@@ -279,14 +274,7 @@ export const useEvents = (calendar) => {
|
|
|
279
274
|
return;
|
|
280
275
|
}
|
|
281
276
|
|
|
282
|
-
//
|
|
283
|
-
// nearest interval specified by `config.snapToInterval`.
|
|
284
|
-
if (config.snapToInterval) {
|
|
285
|
-
dateUtils.snapToInterval(newEvent.start, config.snapToInterval);
|
|
286
|
-
dateUtils.snapToInterval(newEvent.end, config.snapToInterval);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
// Create a clean deep copy of the event to prevent reference issues.
|
|
277
|
+
// Copy the event and its dates before applying interval snapping.
|
|
290
278
|
newEvent = { ...newEvent };
|
|
291
279
|
|
|
292
280
|
const start =
|
|
@@ -297,6 +285,10 @@ export const useEvents = (calendar) => {
|
|
|
297
285
|
typeof newEvent.end === 'string'
|
|
298
286
|
? dateUtils.stringToDate(newEvent.end)
|
|
299
287
|
: new Date(newEvent.end);
|
|
288
|
+
if (config.snapToInterval) {
|
|
289
|
+
dateUtils.snapToInterval(start, config.snapToInterval);
|
|
290
|
+
dateUtils.snapToInterval(end, config.snapToInterval);
|
|
291
|
+
}
|
|
300
292
|
if (
|
|
301
293
|
!newEvent.allDay &&
|
|
302
294
|
config.time &&
|
|
@@ -733,6 +725,7 @@ export const useEvents = (calendar) => {
|
|
|
733
725
|
|
|
734
726
|
// Document event handlers for event resizing.
|
|
735
727
|
const onDocumentMousemove = async (e) => {
|
|
728
|
+
const revision = ++resizeRevision;
|
|
736
729
|
const { clientX, clientY } = e.touches?.[0] || e; // Handle click or touch event.
|
|
737
730
|
|
|
738
731
|
const adx = clientX - resizeState.resizeAnchorClientX;
|
|
@@ -767,15 +760,21 @@ export const useEvents = (calendar) => {
|
|
|
767
760
|
const { resize: resizeEventHandler } = config.eventListeners?.event || {};
|
|
768
761
|
// Call external validation of event resizing. If successful, update the event details.
|
|
769
762
|
if (internalOk && resizeEventHandler) {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
763
|
+
try {
|
|
764
|
+
acceptResize = await resizeEventHandler({
|
|
765
|
+
e,
|
|
766
|
+
event: { ...resizeState.resizingEvent, start: newStart, end: newEnd },
|
|
767
|
+
overlaps: resizeState.resizingEvent.getOverlappingEvents({
|
|
768
|
+
start: newStart,
|
|
769
|
+
end: newEnd,
|
|
770
|
+
}),
|
|
771
|
+
});
|
|
772
|
+
} catch (error) {
|
|
773
|
+
console.warn('Calendar: Event resize handler rejected the resize.', error);
|
|
774
|
+
acceptResize = false;
|
|
775
|
+
}
|
|
778
776
|
}
|
|
777
|
+
if (disposed || revision !== resizeRevision) return;
|
|
779
778
|
// If the event resizing is accepted, apply to new time range to the event.
|
|
780
779
|
if (acceptResize !== false) {
|
|
781
780
|
resizeState.resizingEvent.start = newStart;
|
|
@@ -801,6 +800,9 @@ export const useEvents = (calendar) => {
|
|
|
801
800
|
};
|
|
802
801
|
|
|
803
802
|
const onDocumentMouseup = async (e) => {
|
|
803
|
+
const revision = ++resizeRevision;
|
|
804
|
+
document.removeEventListener('mousemove', onDocumentMousemove);
|
|
805
|
+
document.removeEventListener('touchmove', onDocumentMousemove);
|
|
804
806
|
if (calendar.touch?.isResizingEvent && resizeState.resizingEvent) {
|
|
805
807
|
const { clientX, clientY } = e.changedTouches?.[0] || e;
|
|
806
808
|
if (!resizeState.resizeSlopExceeded) {
|
|
@@ -820,17 +822,23 @@ export const useEvents = (calendar) => {
|
|
|
820
822
|
const resizeEndHandler = eventListeners['resize-end'];
|
|
821
823
|
// Call external validation of event resize-end. If successful, update the event details.
|
|
822
824
|
if (internalOk && resizeEndHandler) {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
825
|
+
try {
|
|
826
|
+
acceptResize = await resizeEndHandler({
|
|
827
|
+
e,
|
|
828
|
+
event: resizeState.resizingEvent,
|
|
829
|
+
original: resizeState.resizingOriginalEvent, // Original event details before resizing.
|
|
830
|
+
overlaps: resizeState.resizingEvent.getOverlappingEvents({
|
|
831
|
+
start: newStart,
|
|
832
|
+
end: newEnd,
|
|
833
|
+
}),
|
|
834
|
+
});
|
|
835
|
+
} catch (error) {
|
|
836
|
+
console.warn('Calendar: Event resize-end handler rejected the resize.', error);
|
|
837
|
+
acceptResize = false;
|
|
838
|
+
}
|
|
832
839
|
}
|
|
833
840
|
|
|
841
|
+
if (disposed || revision !== resizeRevision) return;
|
|
834
842
|
// If the event resize is accepted apply new range, if refused (SPECIFICALLY FALSE) revert to original.
|
|
835
843
|
resizeState.resizingEvent.start =
|
|
836
844
|
acceptResize === false
|
|
@@ -852,15 +860,19 @@ export const useEvents = (calendar) => {
|
|
|
852
860
|
calendar.touch.currentHoveredCell = null; // Reset current hovered cell.
|
|
853
861
|
}
|
|
854
862
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
);
|
|
863
|
+
cleanupResize();
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
const cleanupResize = () => {
|
|
867
|
+
resizeRevision++;
|
|
868
|
+
document.removeEventListener('mousemove', onDocumentMousemove);
|
|
869
|
+
document.removeEventListener('touchmove', onDocumentMousemove);
|
|
870
|
+
document.removeEventListener('mouseup', onDocumentMouseup);
|
|
871
|
+
document.removeEventListener('touchend', onDocumentMouseup);
|
|
861
872
|
|
|
862
873
|
// Reset resizing state.
|
|
863
874
|
calendar.touch.isResizingEvent = false;
|
|
875
|
+
calendar.touch.currentHoveredCell = null;
|
|
864
876
|
resizeState.fromResizer = false;
|
|
865
877
|
resizeState.resizingEvent = null;
|
|
866
878
|
resizeState.resizingOriginalEvent = null;
|
|
@@ -884,6 +896,11 @@ export const useEvents = (calendar) => {
|
|
|
884
896
|
resizeState.resizeSlopExceeded = false;
|
|
885
897
|
};
|
|
886
898
|
|
|
899
|
+
onBeforeUnmount(() => {
|
|
900
|
+
disposed = true;
|
|
901
|
+
cleanupResize();
|
|
902
|
+
});
|
|
903
|
+
|
|
887
904
|
// Handle mousedown/touchstart on event elements
|
|
888
905
|
const handleEventResize = (e, event, eventEl) => {
|
|
889
906
|
const domEvent = e.touches?.[0] || e; // Handle click or touch event.
|
|
@@ -891,6 +908,7 @@ export const useEvents = (calendar) => {
|
|
|
891
908
|
resizeState.fromResizer = !!domEvent.target.closest(`.${prefixCls}__event-resizer`);
|
|
892
909
|
|
|
893
910
|
if (resizeState.fromResizer) {
|
|
911
|
+
resizeRevision++;
|
|
894
912
|
// Set the resizing flag immediately to prevent drag from starting.
|
|
895
913
|
calendar.touch.isResizingEvent = true;
|
|
896
914
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function createCalendarTexts(calendarLang?: object): object;
|
|
1
|
+
export function createCalendarTexts(calendarLang?: object, locale?: string): object;
|
package/es/calendar/core/i18n.js
CHANGED
|
@@ -25,8 +25,8 @@ const reorderSunToMon = (arr) => [arr[1], arr[2], arr[3], arr[4], arr[5], arr[6]
|
|
|
25
25
|
* @param {object} [calendarLang] — The `calendar` section from SdLang (from `useI18n().i18nMessage.value.calendar`).
|
|
26
26
|
* @returns {object} Calendar texts ready to merge into `calendar.texts`.
|
|
27
27
|
*/
|
|
28
|
-
export const createCalendarTexts = (calendarLang) => {
|
|
29
|
-
const localeData = dayjs.Ls[
|
|
28
|
+
export const createCalendarTexts = (calendarLang, locale = dayjs.locale()) => {
|
|
29
|
+
const localeData = dayjs.Ls[locale] || dayjs.Ls.en;
|
|
30
30
|
|
|
31
31
|
// Weekday names — reordered from dayjs Sun-first to calendar Mon-first.
|
|
32
32
|
const weekDays = reorderSunToMon(localeData.weekdays || []);
|
|
@@ -33,15 +33,15 @@ export const globalState: {
|
|
|
33
33
|
isSameDate: (date1: any, date2: any) => boolean;
|
|
34
34
|
isInRange: (date: any, rangeStart: any, rangeEnd: any) => boolean;
|
|
35
35
|
isLeapYear: (date: any) => boolean | 0;
|
|
36
|
-
getPreviousFirstDayOfWeek: (date: any) => Date;
|
|
36
|
+
getPreviousFirstDayOfWeek: (date: any, startWeekOnSunday?: boolean) => Date;
|
|
37
37
|
stringToDate: (date: any) => Date;
|
|
38
38
|
dateToMinutes: (date: any) => any;
|
|
39
39
|
countDays: (start: any, end: any) => number;
|
|
40
40
|
datesInSameTimeStep: (date1: any, date2: any, timeStep: any) => boolean;
|
|
41
41
|
isValid: (date: any) => any;
|
|
42
|
-
formatDate: (date:
|
|
42
|
+
formatDate: (date: any, format?: string, texts?: null) => string;
|
|
43
43
|
formatDateLite: (date: any) => string;
|
|
44
|
-
formatTime: (date:
|
|
44
|
+
formatTime: (date: any, format?: string, texts?: null, round?: boolean) => string;
|
|
45
45
|
formatTimeLite: (date: any) => string;
|
|
46
46
|
formatMinutes: (minutes: any) => string;
|
|
47
47
|
updateTexts: () => void;
|
|
@@ -85,15 +85,15 @@ export function useCalendar({ props, emit, attrs, calendarEl, scrollbarRef, uid,
|
|
|
85
85
|
isSameDate: (date1: any, date2: any) => boolean;
|
|
86
86
|
isInRange: (date: any, rangeStart: any, rangeEnd: any) => boolean;
|
|
87
87
|
isLeapYear: (date: any) => boolean | 0;
|
|
88
|
-
getPreviousFirstDayOfWeek: (date: any) => Date;
|
|
88
|
+
getPreviousFirstDayOfWeek: (date: any, startWeekOnSunday?: boolean) => Date;
|
|
89
89
|
stringToDate: (date: any) => Date;
|
|
90
90
|
dateToMinutes: (date: any) => any;
|
|
91
91
|
countDays: (start: any, end: any) => number;
|
|
92
92
|
datesInSameTimeStep: (date1: any, date2: any, timeStep: any) => boolean;
|
|
93
93
|
isValid: (date: any) => any;
|
|
94
|
-
formatDate: (date:
|
|
94
|
+
formatDate: (date: any, format?: string, texts?: null) => string;
|
|
95
95
|
formatDateLite: (date: any) => string;
|
|
96
|
-
formatTime: (date:
|
|
96
|
+
formatTime: (date: any, format?: string, texts?: null, round?: boolean) => string;
|
|
97
97
|
formatTimeLite: (date: any) => string;
|
|
98
98
|
formatMinutes: (minutes: any) => string;
|
|
99
99
|
updateTexts: () => void;
|
|
@@ -56,7 +56,7 @@ export const useCalendar = ({ props, emit, attrs, calendarEl, scrollbarRef, uid,
|
|
|
56
56
|
},
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
state.dateUtils = createDateUtils();
|
|
59
|
+
state.dateUtils = createDateUtils(() => state.texts.dateLocale);
|
|
60
60
|
state.config = useConfig(state, props, attrs);
|
|
61
61
|
state.eventsManager = useEvents(state);
|
|
62
62
|
state.view = useView(state, calendarEl, scrollbarRef);
|
package/es/calendar/core/view.js
CHANGED
|
@@ -28,7 +28,7 @@ export const useView = (
|
|
|
28
28
|
// [firstCellDate-endCellDate]: the full visible range including out-of-scope days in month view.
|
|
29
29
|
const startTheoretical = ref(new Date(viewDate));
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// One pending timeout: align to the next minute, then update every minute.
|
|
32
32
|
let timeTickerId = null;
|
|
33
33
|
|
|
34
34
|
const start = computed(() => {
|
|
@@ -108,11 +108,14 @@ export const useView = (
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
function initTimeTicker() {
|
|
111
|
+
clearTimeout(timeTickerId);
|
|
112
|
+
now.value = new Date();
|
|
111
113
|
// Snap the time ticker on round minutes (when seconds = 0), so that we can set
|
|
112
114
|
// the time ticker interval to 60 seconds and spare some function calls.
|
|
113
|
-
timeTickerId = setTimeout(
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
timeTickerId = setTimeout(
|
|
116
|
+
timeTick,
|
|
117
|
+
60000 - (now.value.getSeconds() * 1000 + now.value.getMilliseconds()),
|
|
118
|
+
);
|
|
116
119
|
}
|
|
117
120
|
// ------------------------------------------------------
|
|
118
121
|
|
|
@@ -682,9 +685,9 @@ export const useView = (
|
|
|
682
685
|
},
|
|
683
686
|
);
|
|
684
687
|
watch(
|
|
685
|
-
() => config.watchRealTime,
|
|
686
|
-
(
|
|
687
|
-
if (
|
|
688
|
+
() => config.watchRealTime && config.time,
|
|
689
|
+
(enabled) => {
|
|
690
|
+
if (enabled) initTimeTicker();
|
|
688
691
|
else timeTickerId = clearTimeout(timeTickerId);
|
|
689
692
|
},
|
|
690
693
|
);
|