@sdata/web-vue 1.18.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -7
- package/dist/sd.css +4083 -2512
- package/dist/sd.min.css +1 -1
- package/es/_components/feedback-icon.js +1 -1
- package/es/_components/icon-hover.js +1 -1
- package/es/_components/icon-hover.vue.d.ts +1 -1
- package/es/_components/input-label/input-label.d.ts +1 -1
- package/es/_components/input-label/style/index.css +27 -27
- package/es/_components/picker/input-range.js +1 -1
- package/es/_components/picker/input-range.vue.d.ts +2 -2
- package/es/_components/picker/input.js +1 -1
- package/es/_components/picker/input.vue.d.ts +2 -2
- package/es/_components/resize-trigger.js +1 -1
- package/es/_components/select-view/select-view.d.ts +3 -3
- package/es/_components/select-view/style/index.css +199 -199
- package/es/_components/transition/expand-transition.js +1 -1
- package/es/_components/virtual-list/virtual-list.js +1 -1
- package/es/_components/virtual-list/virtual-list.vue.d.ts +8 -5
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_lang.js +9 -16
- package/es/_hooks/use-form-item.d.ts +1 -1
- package/es/_hooks/use-scrollbar.d.ts +2 -3
- package/es/_hooks/use-scrollbar.js +4 -8
- package/es/_hooks/use-size.d.ts +1 -1
- package/es/_utils/color.d.ts +9 -0
- package/es/_utils/color.js +38 -2
- package/es/_utils/date.d.ts +1 -2
- package/es/_utils/date.js +74 -25
- package/es/_utils/global-config.d.ts +4 -0
- package/es/_utils/global-config.js +10 -2
- 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.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/typeof.js +1 -1
- package/es/affix/affix.js +1 -1
- package/es/affix/affix.vue_vue_type_script_lang.js +1 -1
- package/es/alert/alert.js +1 -1
- package/es/alert/alert.vue.d.ts +1 -1
- package/es/alert/index.d.ts +2 -2
- package/es/alert/style/index.css +28 -28
- package/es/anchor/anchor-link.js +1 -1
- package/es/anchor/anchor.js +1 -1
- package/es/anchor/style/index.css +9 -9
- package/es/auto-complete/auto-complete.d.ts +3 -3
- package/es/auto-complete/auto-complete.js +23 -9
- package/es/auto-complete/index.d.ts +9 -9
- package/es/auto-complete/style/index.css +3 -3
- package/es/avatar/avatar.js +1 -1
- package/es/avatar/avatar.vue_vue_type_script_lang.js +1 -1
- package/es/avatar/style/index.css +15 -15
- package/es/back-top/back-top.js +1 -1
- package/es/back-top/style/index.css +4 -4
- package/es/badge/badge.d.ts +1 -1
- package/es/badge/badge.js +1 -1
- package/es/badge/index.d.ts +3 -3
- package/es/badge/style/index.css +25 -25
- package/es/breadcrumb/style/index.css +12 -12
- package/es/button/button-group.js +1 -1
- package/es/button/button.js +1 -1
- package/es/button/button.vue.d.ts +2 -2
- package/es/button/index.d.ts +6 -6
- package/es/button/style/index.css +37 -37
- package/es/calendar/components/body.js +5 -0
- package/es/calendar/components/body.vue.d.ts +100 -0
- package/es/calendar/components/body.vue_vue_type_script_setup_true_lang.js +158 -0
- package/es/calendar/components/cell.js +5 -0
- package/es/calendar/components/cell.vue.d.ts +220 -0
- package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +813 -0
- package/es/calendar/components/event.js +5 -0
- package/es/calendar/components/event.vue.d.ts +73 -0
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +290 -0
- package/es/calendar/components/header.js +5 -0
- package/es/calendar/components/header.vue.d.ts +34 -0
- package/es/calendar/components/header.vue_vue_type_script_setup_true_lang.js +84 -0
- package/es/calendar/components/headings-bar.js +5 -0
- package/es/calendar/components/headings-bar.vue.d.ts +40 -0
- package/es/calendar/components/headings-bar.vue_vue_type_script_setup_true_lang.js +201 -0
- package/es/calendar/components/index.js +5 -0
- package/es/calendar/components/index.vue.d.ts +616 -0
- package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +314 -0
- package/es/calendar/components/time-column.js +5 -0
- package/es/calendar/components/time-column.vue.d.ts +27 -0
- package/es/calendar/components/time-column.vue_vue_type_script_setup_true_lang.js +66 -0
- package/es/calendar/context.d.ts +16 -0
- package/es/calendar/context.js +5 -0
- package/es/calendar/core/config.d.ts +126 -0
- package/es/calendar/core/config.js +522 -0
- package/es/calendar/core/events.d.ts +1 -0
- package/es/calendar/core/events.js +921 -0
- package/es/calendar/core/i18n.d.ts +1 -0
- package/es/calendar/core/i18n.js +72 -0
- package/es/calendar/core/index.d.ts +112 -0
- package/es/calendar/core/index.js +66 -0
- package/es/calendar/core/props-definitions.d.ts +263 -0
- package/es/calendar/core/props-definitions.js +70 -0
- package/es/calendar/core/view.d.ts +60 -0
- package/es/calendar/core/view.js +761 -0
- package/es/calendar/default-theme.scss +1012 -0
- package/es/calendar/hooks/use-calendar-theme.d.ts +4 -0
- package/es/calendar/hooks/use-calendar-theme.js +32 -0
- package/es/calendar/index.d.ts +836 -98
- package/es/calendar/index.js +3 -3
- package/es/calendar/index.scss +331 -0
- package/es/calendar/modules/drag-and-drop.d.ts +8 -0
- package/es/calendar/modules/drag-and-drop.js +442 -0
- package/es/calendar/style/body.scss +51 -0
- package/es/calendar/style/cell.scss +153 -0
- package/es/calendar/style/css.js +0 -1
- package/es/calendar/style/event.scss +69 -0
- package/es/calendar/style/header.scss +104 -0
- package/es/calendar/style/headings-bar.scss +94 -0
- package/es/calendar/style/index.css +1514 -264
- package/es/calendar/style/index.d.ts +1 -3
- package/es/calendar/style/index.js +0 -1
- package/es/calendar/style/index.scss +9 -496
- package/es/calendar/style/time-column.scss +109 -0
- package/es/calendar/style/token.scss +64 -60
- package/es/calendar/utils/conversions.d.ts +3 -0
- package/es/calendar/utils/conversions.js +31 -0
- package/es/calendar/utils/date.d.ts +26 -0
- package/es/calendar/utils/date.js +253 -0
- package/es/calendar/utils/special-hours-allow-events.d.ts +28 -0
- package/es/calendar/utils/special-hours-allow-events.js +230 -0
- package/es/card/card-grid.js +1 -1
- package/es/card/style/index.css +16 -16
- package/es/carousel/carousel-arrow.js +1 -1
- package/es/carousel/carousel-indicator.js +1 -1
- package/es/carousel/carousel-indicator.vue.d.ts +1 -1
- package/es/carousel/carousel-item.js +1 -1
- package/es/carousel/carousel.js +1 -1
- package/es/carousel/style/index.css +11 -11
- package/es/cascader/cascader-option.d.ts +1 -1
- package/es/cascader/cascader-option.js +1 -1
- package/es/cascader/cascader-panel.vue.d.ts +1 -1
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/cascader/cascader.vue.d.ts +5 -5
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/cascader/style/index.css +36 -36
- package/es/checkbox/checkbox.d.ts +1 -1
- package/es/checkbox/index.d.ts +2 -2
- package/es/checkbox/style/index.css +18 -18
- package/es/collapse/collapse-item.d.ts +1 -1
- package/es/collapse/collapse.js +1 -1
- package/es/collapse/index.d.ts +1 -1
- package/es/collapse/style/index.css +15 -15
- package/es/color-picker/color-picker.d.ts +1 -1
- package/es/color-picker/color-picker.js +1 -1
- package/es/color-picker/index.d.ts +3 -3
- package/es/color-picker/palette.js +1 -1
- package/es/color-picker/panel.d.ts +1 -1
- package/es/color-picker/panel.js +2 -2
- package/es/color-picker/style/index.css +13 -13
- package/es/color-picker/utils.js +1 -1
- package/es/comment/comment.js +2 -2
- package/es/comment/style/index.css +5 -5
- package/es/components.d.ts +2 -2
- package/es/config-provider/config-provider.js +1 -1
- package/es/config-provider/config-provider.vue.d.ts +1 -1
- package/es/config-provider/context.d.ts +3 -0
- package/es/config-provider/index.d.ts +3 -3
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/config-provider/theme.js +1 -1
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/cropper/style/index.css +3 -3
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/index.d.ts +48 -48
- package/es/date-picker/panels/body.js +1 -1
- package/es/date-picker/panels/date/index.js +2 -2
- package/es/date-picker/panels/date/index.vue.d.ts +6 -6
- package/es/date-picker/panels/date/index.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/panels/footer.js +1 -1
- package/es/date-picker/panels/footer.vue.d.ts +9 -9
- package/es/date-picker/panels/header.js +1 -1
- package/es/date-picker/panels/month/index.js +2 -2
- package/es/date-picker/panels/quarter/index.js +2 -2
- package/es/date-picker/panels/shortcuts.js +1 -1
- package/es/date-picker/panels/shortcuts.vue.d.ts +6 -6
- package/es/date-picker/panels/week/index.js +1 -1
- package/es/date-picker/panels/week/index.vue.d.ts +6 -6
- package/es/date-picker/panels/week-list.js +1 -1
- package/es/date-picker/panels/year/index.js +2 -2
- package/es/date-picker/picker-panel.js +1 -1
- package/es/date-picker/picker-panel.vue.d.ts +28 -28
- package/es/date-picker/picker.js +2 -2
- package/es/date-picker/picker.vue.d.ts +46 -46
- package/es/date-picker/picker.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/range-picker-panel.js +1 -1
- package/es/date-picker/range-picker-panel.vue.d.ts +29 -29
- package/es/date-picker/range-picker-panel.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/range-picker.js +2 -2
- package/es/date-picker/range-picker.vue.d.ts +48 -48
- package/es/date-picker/range-picker.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/style/index.css +72 -72
- package/es/descriptions/descriptions-item.js +1 -1
- package/es/descriptions/descriptions.d.ts +2 -2
- package/es/descriptions/descriptions.js +1 -1
- package/es/descriptions/index.d.ts +6 -6
- package/es/descriptions/style/index.css +10 -10
- package/es/divider/divider.d.ts +1 -1
- package/es/divider/index.d.ts +3 -3
- package/es/divider/style/index.css +4 -4
- package/es/drawer/drawer.js +9 -2
- package/es/drawer/drawer.vue.d.ts +2905 -10
- package/es/drawer/drawer.vue_vue_type_script_lang.js +26 -7
- package/es/drawer/index.d.ts +6550 -764
- package/es/drawer/index.js +2 -2
- package/es/drawer/style/index.css +12 -7
- package/es/drawer/style/index.scss +6 -0
- package/es/dropdown/dropdown-button.js +1 -1
- package/es/dropdown/dropdown-button.vue.d.ts +24 -21
- package/es/dropdown/dropdown-group.js +1 -1
- package/es/dropdown/dropdown-option.js +1 -1
- package/es/dropdown/dropdown-option.vue.d.ts +1 -1
- package/es/dropdown/dropdown-panel.js +1 -1
- package/es/dropdown/dropdown-panel.vue.d.ts +6 -3
- package/es/dropdown/dropdown-submenu.js +1 -1
- package/es/dropdown/dropdown-submenu.vue.d.ts +18 -15
- package/es/dropdown/dropdown.js +1 -1
- package/es/dropdown/dropdown.vue.d.ts +16 -13
- package/es/dropdown/index.d.ts +78 -66
- package/es/dropdown/style/index.css +1 -1
- package/es/ellipsis/ellipsis.js +1 -1
- package/es/ellipsis/ellipsis.vue.d.ts +24 -24
- package/es/ellipsis/ellipsis.vue_vue_type_script_lang.js +2 -2
- package/es/ellipsis/index.d.ts +96 -96
- package/es/ellipsis/performant-ellipsis.js +1 -1
- package/es/ellipsis/performant-ellipsis.vue.d.ts +24 -24
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_lang.js +1 -1
- package/es/empty/style/index.css +2 -2
- package/es/form/form-item-label.js +1 -1
- package/es/form/form-item-label.vue.d.ts +24 -24
- package/es/form/form-item-message.js +1 -1
- package/es/form/form-item.js +1 -1
- package/es/form/form-item.vue.d.ts +29 -29
- package/es/form/form-item.vue_vue_type_script_lang.js +3 -3
- package/es/form/form.js +1 -1
- package/es/form/form.vue.d.ts +1 -1
- package/es/form/index.d.ts +35 -35
- package/es/form/style/index.css +6 -6
- package/es/grid/grid-col.js +1 -1
- package/es/grid/grid-col.vue_vue_type_script_lang.js +1 -1
- package/es/grid/grid-item.js +1 -1
- package/es/grid/grid-item.vue_vue_type_script_lang.js +1 -1
- package/es/grid/grid-row.js +1 -1
- package/es/grid/grid-row.vue.d.ts +4 -4
- package/es/grid/grid.js +1 -1
- package/es/grid/index.d.ts +4 -4
- package/es/icon/icon-calendar/icon-calendar.js +1 -1
- package/es/icon/icon-caret-down/icon-caret-down.js +1 -1
- package/es/icon/icon-caret-left/icon-caret-left.js +1 -1
- package/es/icon/icon-caret-right/icon-caret-right.js +1 -1
- package/es/icon/icon-caret-up/icon-caret-up.js +1 -1
- package/es/icon/icon-check/icon-check.js +1 -1
- package/es/icon/icon-check-circle-fill/icon-check-circle-fill.js +1 -1
- package/es/icon/icon-clock-circle/icon-clock-circle.js +1 -1
- package/es/icon/icon-close/icon-close.js +1 -1
- package/es/icon/icon-close-circle-fill/icon-close-circle-fill.js +1 -1
- package/es/icon/icon-copy/icon-copy.js +1 -1
- package/es/icon/icon-delete/icon-delete.js +1 -1
- package/es/icon/icon-double-left/icon-double-left.js +1 -1
- package/es/icon/icon-double-right/icon-double-right.js +1 -1
- package/es/icon/icon-down/icon-down.js +1 -1
- package/es/icon/icon-drag-dot/icon-drag-dot.js +1 -1
- package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.js +1 -1
- package/es/icon/icon-edit/icon-edit.js +1 -1
- package/es/icon/icon-empty/icon-empty.js +1 -1
- package/es/icon/icon-exclamation/icon-exclamation.js +1 -1
- package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.js +1 -1
- package/es/icon/icon-eye/icon-eye.js +1 -1
- package/es/icon/icon-eye-invisible/icon-eye-invisible.js +1 -1
- package/es/icon/icon-face-frown-fill/icon-face-frown-fill.js +1 -1
- package/es/icon/icon-face-meh-fill/icon-face-meh-fill.js +1 -1
- package/es/icon/icon-face-smile-fill/icon-face-smile-fill.js +1 -1
- package/es/icon/icon-file/icon-file.js +1 -1
- package/es/icon/icon-file-audio/icon-file-audio.js +1 -1
- package/es/icon/icon-file-image/icon-file-image.js +1 -1
- package/es/icon/icon-file-pdf/icon-file-pdf.js +1 -1
- package/es/icon/icon-file-video/icon-file-video.js +1 -1
- package/es/icon/icon-filter/icon-filter.js +1 -1
- package/es/icon/icon-fullscreen/icon-fullscreen.js +1 -1
- package/es/icon/icon-image-close/icon-image-close.js +1 -1
- package/es/icon/icon-info/icon-info.js +1 -1
- package/es/icon/icon-info-circle-fill/icon-info-circle-fill.js +1 -1
- package/es/icon/icon-left/icon-left.js +1 -1
- package/es/icon/icon-link/icon-link.js +1 -1
- package/es/icon/icon-loading/icon-loading.js +1 -1
- package/es/icon/icon-menu-fold/icon-menu-fold.js +1 -1
- package/es/icon/icon-menu-unfold/icon-menu-unfold.js +1 -1
- package/es/icon/icon-minus/icon-minus.js +1 -1
- package/es/icon/icon-more/icon-more.js +1 -1
- package/es/icon/icon-oblique-line/icon-oblique-line.js +1 -1
- package/es/icon/icon-original-size/icon-original-size.js +1 -1
- package/es/icon/icon-pause/icon-pause.js +1 -1
- package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.js +1 -1
- package/es/icon/icon-plus/icon-plus.js +1 -1
- package/es/icon/icon-question-circle/icon-question-circle.js +1 -1
- package/es/icon/icon-right/icon-right.js +1 -1
- package/es/icon/icon-rotate-left/icon-rotate-left.js +1 -1
- package/es/icon/icon-rotate-right/icon-rotate-right.js +1 -1
- package/es/icon/icon-search/icon-search.js +1 -1
- package/es/icon/icon-star-fill/icon-star-fill.js +1 -1
- package/es/icon/icon-to-top/icon-to-top.js +1 -1
- package/es/icon/icon-up/icon-up.js +1 -1
- package/es/icon/icon-upload/icon-upload.js +1 -1
- package/es/icon/icon-zoom-in/icon-zoom-in.js +1 -1
- package/es/icon/icon-zoom-out/icon-zoom-out.js +1 -1
- package/es/icon-component/icon.js +1 -1
- package/es/icon.js +292 -292
- package/es/image/image-footer.js +1 -1
- package/es/image/image.js +2 -2
- package/es/image/image.vue.d.ts +24 -24
- package/es/image/preview-action.d.ts +24 -24
- package/es/image/preview-arrow.js +1 -1
- package/es/image/preview-group.js +2 -2
- package/es/image/preview-group.vue.d.ts +25 -25
- package/es/image/preview-toolbar.js +1 -1
- package/es/image/preview-toolbar.vue.d.ts +24 -24
- package/es/image/preview.js +1 -1
- package/es/image/preview.vue.d.ts +24 -24
- package/es/image/preview.vue_vue_type_script_lang.js +1 -1
- package/es/image/style/index.css +32 -32
- package/es/index.css +4083 -2512
- package/es/index.d.ts +8 -2
- package/es/index.js +11 -10
- package/es/index.scss +3 -1
- package/es/input/index.d.ts +9 -9
- package/es/input/input-group.js +1 -1
- package/es/input/input-password.js +1 -1
- package/es/input/input-password.vue.d.ts +3 -3
- package/es/input/input.d.ts +2 -2
- package/es/input/input.js +1 -1
- package/es/input/style/index.css +50 -50
- package/es/input-number/index.d.ts +6 -6
- package/es/input-number/input-number.d.ts +2 -2
- package/es/input-number/input-number.js +1 -1
- package/es/input-number/style/index.css +16 -16
- package/es/input-tag/index.d.ts +6 -6
- package/es/input-tag/input-tag.d.ts +2 -2
- package/es/input-tag/input-tag.js +1 -1
- package/es/input-tag/style/index.css +172 -172
- 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 +3 -3
- package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/json-form/utils.js +3 -3
- package/es/layout/content.js +1 -1
- package/es/layout/footer.js +1 -1
- package/es/layout/header.vue.d.ts +1 -1
- package/es/layout/header.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/layout/index.d.ts +21 -21
- package/es/layout/layout.js +1 -1
- package/es/layout/sider.js +1 -1
- package/es/layout/sider.vue.d.ts +16 -16
- package/es/layout/sider.vue_vue_type_script_lang.js +1 -1
- package/es/layout/style/index.css +12 -12
- package/es/link/index.d.ts +3 -3
- package/es/link/link.vue.d.ts +1 -1
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/link/style/index.css +23 -23
- package/es/list/index.d.ts +9 -9
- package/es/list/list-item-meta.js +1 -1
- package/es/list/list.d.ts +3 -3
- package/es/list/list.js +4 -4
- package/es/list/style/index.css +9 -9
- package/es/locale/interface.d.ts +6 -0
- package/es/locale/lang/ar-eg.js +7 -1
- package/es/locale/lang/de-de.js +7 -1
- package/es/locale/lang/en-us.js +7 -1
- package/es/locale/lang/es-es.js +7 -1
- package/es/locale/lang/fr-fr.js +7 -1
- package/es/locale/lang/id-id.js +7 -1
- package/es/locale/lang/it-it.js +7 -1
- package/es/locale/lang/ja-jp.js +7 -1
- package/es/locale/lang/km-kh.js +7 -1
- package/es/locale/lang/ko-kr.js +7 -1
- package/es/locale/lang/ms-my.js +7 -1
- package/es/locale/lang/nl-nl.js +7 -1
- package/es/locale/lang/pt-pt.js +7 -1
- package/es/locale/lang/ru-ru.js +7 -1
- package/es/locale/lang/th-th.js +7 -1
- package/es/locale/lang/vi-vn.js +7 -1
- package/es/locale/lang/zh-cn.js +7 -1
- package/es/locale/lang/zh-tw.js +7 -1
- package/es/mention/index.d.ts +9 -9
- package/es/mention/mention.d.ts +3 -3
- package/es/mention/mention.js +24 -10
- package/es/menu/base-menu.js +1 -1
- package/es/menu/indent.js +1 -1
- package/es/menu/item-group.js +1 -1
- package/es/menu/item-group.vue.d.ts +48 -48
- package/es/menu/item.js +1 -1
- package/es/menu/menu.js +1 -1
- package/es/menu/style/index.css +62 -62
- package/es/menu/sub-menu-inline.js +1 -1
- package/es/menu/sub-menu-inline.vue.d.ts +48 -48
- package/es/menu/sub-menu-pop.js +1 -1
- package/es/menu/sub-menu-pop.vue.d.ts +57 -57
- package/es/menu/sub-menu.js +1 -1
- package/es/message/index.js +1 -1
- package/es/message/message-list.d.ts +1 -1
- package/es/message/message.js +1 -1
- package/es/message/message.vue.d.ts +1 -1
- package/es/message/style/index.css +26 -26
- package/es/modal/index.d.ts +6368 -570
- package/es/modal/index.js +2 -2
- package/es/modal/modal.js +15 -4
- package/es/modal/modal.vue.d.ts +2907 -8
- package/es/modal/modal.vue_vue_type_script_lang.js +28 -5
- package/es/modal/style/index.css +28 -12
- package/es/modal/style/index.scss +23 -0
- package/es/notification/index.js +1 -1
- package/es/notification/notification.js +1 -1
- package/es/notification/notification.vue.d.ts +1 -1
- package/es/notification/style/index.css +26 -26
- package/es/page-header/index.d.ts +2 -2
- package/es/page-header/page-header.js +1 -1
- package/es/page-header/page-header.vue.d.ts +1 -1
- package/es/page-header/style/index.css +6 -6
- package/es/pagination/page-item-ellipsis.js +1 -1
- package/es/pagination/page-item-step.js +1 -1
- package/es/pagination/page-item.js +1 -1
- package/es/pagination/page-jumper.js +1 -1
- package/es/pagination/page-jumper.vue.d.ts +6 -6
- package/es/pagination/page-options.js +1 -1
- package/es/pagination/page-options.vue.d.ts +647 -469
- package/es/pagination/style/index.css +21 -21
- package/es/popconfirm/index.d.ts +33 -33
- package/es/popconfirm/popconfirm.js +1 -1
- package/es/popconfirm/popconfirm.vue.d.ts +16 -16
- package/es/popconfirm/popconfirm.vue_vue_type_script_lang.js +1 -1
- package/es/popconfirm/style/index.css +11 -11
- package/es/popover/index.d.ts +899 -21
- package/es/popover/popover.js +7 -3
- package/es/popover/popover.vue.d.ts +451 -10
- package/es/popover/popover.vue_vue_type_script_lang.js +15 -3
- package/es/popover/style/index.css +7 -7
- package/es/popover/style/index.d.ts +1 -0
- package/es/progress/circle.js +1 -1
- package/es/progress/circle.vue.d.ts +1 -1
- package/es/progress/index.d.ts +7 -7
- package/es/progress/line.js +1 -1
- package/es/progress/line.vue.d.ts +1 -1
- package/es/progress/line.vue_vue_type_script_lang.js +1 -1
- package/es/progress/progress.js +1 -1
- package/es/progress/progress.vue.d.ts +3 -3
- package/es/progress/steps.js +1 -1
- package/es/progress/style/index.css +32 -32
- package/es/qr-code/index.d.ts +294 -0
- package/es/qr-code/index.js +10 -0
- package/es/qr-code/qr-code-status.js +5 -0
- package/es/qr-code/qr-code-status.vue.d.ts +8 -0
- package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +30 -0
- package/es/qr-code/qr-code.js +5 -0
- package/es/qr-code/qr-code.vue.d.ts +167 -0
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +313 -0
- package/es/qr-code/style/css.js +2 -0
- package/es/qr-code/style/index.css +106 -0
- package/es/qr-code/style/index.d.ts +2 -0
- package/es/qr-code/style/index.js +2 -0
- package/es/qr-code/style/index.scss +111 -0
- package/es/qr-code/style/token.scss +36 -0
- package/es/qr-code/types.d.ts +19 -0
- package/es/radio/index.d.ts +5 -5
- package/es/radio/radio.d.ts +2 -2
- package/es/radio/style/index.css +33 -33
- package/es/rate/index.d.ts +3 -3
- package/es/rate/rate.d.ts +1 -1
- package/es/rate/style/index.css +3 -3
- package/es/resize-box/index.d.ts +6 -6
- package/es/resize-box/resize-box.js +1 -1
- package/es/resize-box/resize-box.vue.d.ts +2 -2
- package/es/resize-box/resize-box.vue_vue_type_script_lang.js +1 -1
- package/es/resize-box/style/index.css +2 -2
- package/es/result/result.js +1 -1
- package/es/result/style/index.css +2 -2
- package/es/scrollbar/index.d.ts +6 -3
- package/es/scrollbar/scrollbar.js +2 -1
- package/es/scrollbar/scrollbar.vue.d.ts +2 -1
- package/es/scrollbar/scrollbar.vue_vue_type_script_lang.js +52 -2
- package/es/scrollbar/style/index.css +13 -13
- package/es/sd-vue.js +13 -12
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/secret/style/index.css +4 -4
- package/es/select/context.d.ts +1 -4
- package/es/select/hooks/use-options.d.ts +1 -4
- package/es/select/hooks/use-options.js +2 -23
- package/es/select/hooks/use-select.d.ts +1 -3
- package/es/select/hooks/use-select.js +2 -7
- package/es/select/index.d.ts +647 -474
- package/es/select/index.js +5 -13
- package/es/select/interface.d.ts +1 -1
- package/es/select/select-dropdown.js +3 -2
- package/es/select/select-dropdown.vue.d.ts +56 -54
- package/es/select/select-dropdown.vue_vue_type_script_lang.js +2 -3
- package/es/select/select.d.ts +260 -18
- package/es/select/select.js +44 -23
- package/es/select/style/index.css +14 -14
- package/es/select/utils.d.ts +1 -1
- package/es/select/utils.js +1 -1
- package/es/skeleton/line.js +1 -1
- package/es/skeleton/shape.js +1 -1
- package/es/skeleton/skeleton.js +1 -1
- package/es/skeleton/style/index.css +4 -4
- package/es/slider/index.d.ts +67 -67
- package/es/slider/slider-button.js +1 -1
- package/es/slider/slider-button.vue.d.ts +25 -25
- package/es/slider/slider-dots.js +1 -1
- package/es/slider/slider-input.js +1 -1
- package/es/slider/slider-input.vue.d.ts +7 -7
- package/es/slider/slider-marks.js +1 -1
- package/es/slider/slider-ticks.js +1 -1
- package/es/slider/slider.js +1 -1
- package/es/slider/slider.vue.d.ts +33 -33
- package/es/slider/style/index.css +18 -18
- package/es/space/index.d.ts +9 -9
- package/es/space/space.d.ts +2 -2
- package/es/spin/index.d.ts +1 -0
- package/es/spin/style/index.css +9 -9
- package/es/split/split.js +1 -1
- package/es/split/split.vue_vue_type_script_lang.js +1 -1
- package/es/split/style/index.css +2 -2
- package/es/statistic/countdown.js +1 -1
- package/es/statistic/countdown.vue.d.ts +1 -1
- package/es/statistic/countdown.vue_vue_type_script_lang.js +5 -5
- package/es/statistic/index.d.ts +1 -1
- package/es/statistic/statistic.js +1 -1
- package/es/statistic/statistic.vue_vue_type_script_lang.js +2 -2
- package/es/statistic/style/index.css +4 -4
- package/es/steps/index.d.ts +4 -4
- package/es/steps/step.js +1 -1
- package/es/steps/step.vue.d.ts +1 -1
- package/es/steps/steps.js +1 -1
- package/es/steps/steps.vue.d.ts +1 -1
- package/es/steps/style/index.css +79 -79
- package/es/style/color/colors.scss +1 -1
- package/es/style/theme/global.scss +8 -8
- package/es/style/theme/index.scss +4 -12
- package/es/style/theme/z-index.js +1 -2
- package/es/switch/style/index.css +30 -30
- package/es/switch/switch.js +1 -1
- package/es/switch/switch.vue_vue_type_script_lang.js +1 -1
- package/es/table/index.d.ts +14 -14
- package/es/table/style/index.css +65 -65
- package/es/table/table-operation-td.d.ts +7 -7
- package/es/table/table-operation-td.js +1 -1
- package/es/table/table-operation-th.js +1 -1
- package/es/table/table-td.d.ts +1 -1
- package/es/table/table-td.js +1 -1
- package/es/table/table-th.d.ts +1 -1
- package/es/table/table-th.js +2 -2
- package/es/table/table.d.ts +5 -5
- package/es/table/table.js +12 -14
- package/es/table/utils.js +1 -1
- package/es/tabs/index.d.ts +9 -9
- package/es/tabs/style/index.css +56 -56
- package/es/tabs/tab-pane.js +1 -1
- package/es/tabs/tab-pane.vue_vue_type_script_lang.js +1 -1
- package/es/tabs/tabs-nav-ink.js +1 -1
- package/es/tabs/tabs-nav.d.ts +1 -1
- package/es/tabs/tabs-tab.js +1 -1
- package/es/tabs/tabs-tab.vue.d.ts +1 -1
- package/es/tabs/tabs.d.ts +3 -3
- package/es/tag/index.d.ts +66 -29688
- package/es/tag/interface.d.ts +2 -0
- package/es/tag/style/index.css +134 -134
- package/es/tag/style/index.scss +33 -13
- package/es/tag/tag.js +2 -64
- package/es/tag/tag.vue.d.ts +53 -11936
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +368 -0
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/textarea/index.d.ts +8 -8
- package/es/textarea/style/index.css +28 -28
- package/es/textarea/textarea.js +1 -1
- package/es/textarea/textarea.vue.d.ts +3 -3
- package/es/textarea/textarea.vue_vue_type_script_lang.js +1 -1
- package/es/time-picker/hooks/use-time-list.js +1 -1
- package/es/time-picker/index.d.ts +56 -56
- package/es/time-picker/panel.js +1 -1
- package/es/time-picker/panel.vue.d.ts +6 -6
- package/es/time-picker/range-panel.d.ts +6 -6
- package/es/time-picker/range-panel.js +1 -1
- package/es/time-picker/style/index.css +11 -11
- package/es/time-picker/time-column.js +1 -1
- package/es/time-picker/time-picker.js +2 -2
- package/es/time-picker/time-picker.vue.d.ts +27 -27
- package/es/timeline/item.js +1 -1
- package/es/timeline/item.vue_vue_type_script_lang.js +1 -1
- package/es/timeline/style/index.css +11 -11
- package/es/tooltip/index.d.ts +24 -24
- package/es/tooltip/style/index.css +3 -3
- package/es/tooltip/tooltip.js +1 -1
- package/es/tooltip/tooltip.vue.d.ts +11 -11
- package/es/tooltip/tooltip.vue_vue_type_script_lang.js +1 -1
- package/es/tour/index.d.ts +664 -0
- package/es/tour/index.js +10 -0
- package/es/tour/style/css.js +1 -0
- package/es/tour/style/index.css +226 -0
- package/es/tour/style/index.d.ts +1 -0
- package/es/tour/style/index.js +1 -0
- package/es/tour/style/index.scss +218 -0
- package/es/tour/style/token.scss +27 -0
- package/es/tour/tour.js +5 -0
- package/es/tour/tour.vue.d.ts +411 -0
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +1219 -0
- package/es/tour/types.d.ts +143 -0
- package/es/transfer/index.d.ts +51 -45
- package/es/transfer/style/index.css +20 -20
- package/es/transfer/transfer-view.js +2 -3
- package/es/transfer/transfer-view.vue.d.ts +18 -15
- package/es/transfer/transfer-view.vue_vue_type_script_lang.js +1 -1
- package/es/transfer/transfer.js +1 -1
- package/es/transfer/transfer.vue.d.ts +25 -22
- package/es/tree/base-node.js +1 -1
- package/es/tree/base-node.vue.d.ts +2 -2
- package/es/tree/expand-transition.js +1 -1
- package/es/tree/node.js +1 -1
- package/es/tree/style/index.css +25 -25
- package/es/tree/transition-node-list.js +1 -1
- package/es/tree/transition-node-list.vue.d.ts +2 -2
- package/es/tree/tree.js +1 -1
- package/es/tree/tree.vue.d.ts +12 -9
- package/es/tree/tree.vue_vue_type_script_lang.js +2 -2
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.js +4 -7
- package/es/tree-select/style/index.css +5 -5
- package/es/tree-select/tree-select.js +2 -2
- package/es/tree-select/tree-select.vue.d.ts +21 -21
- package/es/tree-select/tree-select.vue_vue_type_script_lang.js +1 -1
- package/es/trigger/index.d.ts +9 -9
- package/es/trigger/style/index.css +5 -5
- package/es/trigger/trigger.d.ts +3 -3
- package/es/trigger/trigger.js +1 -1
- package/es/trigger/utils.js +1 -1
- package/es/typography/base.d.ts +4 -4
- package/es/typography/base.js +1 -1
- package/es/typography/edit-content.js +1 -1
- package/es/typography/edit-content.vue.d.ts +28 -28
- package/es/typography/operations.js +1 -1
- package/es/typography/operations.vue.d.ts +24 -24
- package/es/typography/style/index.css +22 -22
- package/es/typography/typography.js +1 -1
- package/es/upload/index.d.ts +6 -6
- package/es/upload/style/index.css +51 -51
- package/es/upload/upload-button.d.ts +1 -1
- package/es/upload/upload.d.ts +2 -2
- package/es/upload/upload.js +2 -2
- package/es/verification-code/index.d.ts +3 -3
- package/es/verification-code/verification-code.d.ts +1 -1
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/watermark.js +1 -1
- package/json/vetur-attributes.json +125 -107
- package/json/vetur-tags.json +39 -36
- package/json/web-types.json +181 -162
- package/package.json +19 -15
- package/es/calendar/calendar.d.ts +0 -104
- package/es/calendar/calendar.js +0 -207
- package/es/calendar/header.d.ts +0 -104
- package/es/calendar/header.js +0 -131
- package/es/calendar/hooks/useCellClassName.d.ts +0 -19
- package/es/calendar/hooks/useCellClassName.js +0 -43
- package/es/calendar/month.d.ts +0 -83
- package/es/calendar/month.js +0 -149
- package/es/calendar/week.d.ts +0 -61
- package/es/calendar/week.js +0 -45
- package/es/calendar/year.d.ts +0 -69
- package/es/calendar/year.js +0 -101
- package/es/select/optgroup.js +0 -10
- package/es/select/optgroup.vue.d.ts +0 -13
- package/es/select/optgroup.vue_vue_type_script_lang.js +0 -23
- package/es/select/option.js +0 -51
- package/es/select/option.vue.d.ts +0 -299
- package/es/select/option.vue_vue_type_script_lang.js +0 -149
- package/es/tag/tag.vue_vue_type_script_lang.js +0 -264
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { reactive } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { pxToPercentage, percentageToMinutes } from '../utils/conversions';
|
|
4
|
+
import { eventRangeViolatesAllowEvents } from '../utils/special-hours-allow-events';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Events drag and drop composable.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const holdOverTimeout = 800; // How long we should hold over an element before it reacts.
|
|
11
|
+
let changeViewTimeout = null;
|
|
12
|
+
let pressPrevOrNextInterval = null;
|
|
13
|
+
const viewBeforeDrag = reactive({ id: null, date: null }); // To go back if cancelling.
|
|
14
|
+
let viewChanged = false;
|
|
15
|
+
let cancelViewChange = true;
|
|
16
|
+
const dragOverCell = reactive({ el: null, cell: null, timeout: null });
|
|
17
|
+
const dragging = reactive({
|
|
18
|
+
eventId: null,
|
|
19
|
+
fromCalendar: null,
|
|
20
|
+
toCalendar: null,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export function useDragAndDrop(calendar) {
|
|
24
|
+
const { config, view, eventsManager, emit, uid: calendarUid, dateUtils } = calendar;
|
|
25
|
+
const prefixCls = calendar.prefixCls;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Calculate event start time based on cursor position.
|
|
29
|
+
* When click and drag an event the cursor can be anywhere in the event,
|
|
30
|
+
* when dropping the event, we need to subtract the cursor position in the event.
|
|
31
|
+
*
|
|
32
|
+
* @param {Object} e The associated DOM event.
|
|
33
|
+
*/
|
|
34
|
+
const getEventStart = (e) => {
|
|
35
|
+
const isHzl = config.horizontal;
|
|
36
|
+
const { clientX, clientY } = e.touches?.[0] || e;
|
|
37
|
+
// currentTarget is the cell DOM node, whereas target is whatever DOM node we drop the event on.
|
|
38
|
+
const { top, left } = e.currentTarget.getBoundingClientRect();
|
|
39
|
+
const cursorGrabAt = ~~e.dataTransfer.getData('cursor-grab-at');
|
|
40
|
+
|
|
41
|
+
if (isHzl) {
|
|
42
|
+
const x = clientX - left - cursorGrabAt;
|
|
43
|
+
return percentageToMinutes((x * 100) / e.currentTarget.clientWidth, config);
|
|
44
|
+
} else {
|
|
45
|
+
const y = clientY - top - cursorGrabAt;
|
|
46
|
+
return percentageToMinutes(pxToPercentage(y, e.currentTarget), config);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* On drop, update event start and end times in the event.
|
|
52
|
+
* When the event comes from an external source, it may contain a duration in minutes without dates.
|
|
53
|
+
*
|
|
54
|
+
* @param {Object} e The associated DOM event.
|
|
55
|
+
* @param {Object} transferData The transfer data from the HTML5 dragging event.
|
|
56
|
+
* @param {Date} cellDate The hovered cell starting date.
|
|
57
|
+
*/
|
|
58
|
+
const computeNewEventStartEnd = (e, transferData, cellDate) => {
|
|
59
|
+
// If no duration calculate it from event end - event start
|
|
60
|
+
// before we modify the start and end.
|
|
61
|
+
const duration =
|
|
62
|
+
transferData.duration ||
|
|
63
|
+
deltaMinutes(transferData.start, transferData.end) ||
|
|
64
|
+
config.timeStep;
|
|
65
|
+
|
|
66
|
+
// Force the start of the event at previous midnight minimum.
|
|
67
|
+
let startTimeMinutes = Math.max(getEventStart(e), 0);
|
|
68
|
+
|
|
69
|
+
// On drop, snap to time every X minutes if the option is on.
|
|
70
|
+
if (config.snapToInterval) {
|
|
71
|
+
const plusHalfSnapTime = startTimeMinutes + config.snapToInterval / 2;
|
|
72
|
+
startTimeMinutes = plusHalfSnapTime - (plusHalfSnapTime % config.snapToInterval);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const start = new Date(new Date(cellDate).setMinutes(startTimeMinutes));
|
|
76
|
+
// Force the end of the event at next midnight maximum.
|
|
77
|
+
const endTimeMinutes = Math.min(startTimeMinutes + duration, 24 * 60);
|
|
78
|
+
const end = new Date(new Date(cellDate).setMinutes(endTimeMinutes));
|
|
79
|
+
|
|
80
|
+
return { start, end };
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Convert milliseconds to minutes.
|
|
84
|
+
const deltaMinutes = (date1, date2) => Math.round((date2 - date1) / 60000);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* On event drag start, only possible if editableEvent is true.
|
|
88
|
+
* /!\ This is using the native HTML5 drag & drop.
|
|
89
|
+
*
|
|
90
|
+
* @param {Object} e The associated DOM event.
|
|
91
|
+
* @param {Object} event The event being dragged.
|
|
92
|
+
*/
|
|
93
|
+
const eventDragStart = (e, event) => {
|
|
94
|
+
// Cancel the drag if trying to drag event from a text selection or from the resizer.
|
|
95
|
+
if (e.target.nodeType === 3 || calendar.touch.isResizingEvent) return e.preventDefault();
|
|
96
|
+
|
|
97
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
98
|
+
e.dataTransfer.dropEffect = 'move';
|
|
99
|
+
|
|
100
|
+
// Fix for Chrome on Windows: use a small transparent image as drag image
|
|
101
|
+
// const img = new Image()
|
|
102
|
+
// img.src = 'data:image/gifbase64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' // 1px transparent GIF
|
|
103
|
+
// try {
|
|
104
|
+
// // Some browsers might not support this, so use try/catch
|
|
105
|
+
// e.dataTransfer.setDragImage(img, 0, 0)
|
|
106
|
+
// }
|
|
107
|
+
// catch (err) {
|
|
108
|
+
// console.warn('Failed to set drag image:', err)
|
|
109
|
+
// }
|
|
110
|
+
|
|
111
|
+
// Transfer the event's data to the receiver (when successfully drag & dropping out of Calendar).
|
|
112
|
+
// Notice: in Firefox the drag is prevented if there is no dataTransfer.setData().
|
|
113
|
+
const cleanEvent = {
|
|
114
|
+
...event,
|
|
115
|
+
_: { id: event._.id, duration: deltaMinutes(event.start, event.end) },
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
try {
|
|
119
|
+
e.dataTransfer.setData('text/plain', ''); // Add fallback data type for Chrome.
|
|
120
|
+
e.dataTransfer.setData('event', JSON.stringify(cleanEvent));
|
|
121
|
+
// When click and drag an event the cursor can be anywhere in the event,
|
|
122
|
+
// when later dropping the event, we need to subtract the cursor position in the event.
|
|
123
|
+
// Use offsetX for horizontal layout, offsetY for vertical.
|
|
124
|
+
e.dataTransfer.setData('cursor-grab-at', config.horizontal ? e.offsetX : e.offsetY); // In pixels.
|
|
125
|
+
} catch (err) {
|
|
126
|
+
console.warn('Calendar: Failed to set drag data:', err);
|
|
127
|
+
return e.preventDefault(); // Prevent drag if we can't set the data.
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
dragging.eventId = event._.id;
|
|
131
|
+
dragging.fromCalendar = calendarUid;
|
|
132
|
+
|
|
133
|
+
// Emit `event-drag-start` and return the updated event.
|
|
134
|
+
// `external` is when the event is not coming from this Calendar instance.
|
|
135
|
+
emit('event-drag-start', {
|
|
136
|
+
e,
|
|
137
|
+
event,
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// Add CSS class to the event clone and original for styling while dragging.
|
|
141
|
+
const eventDomNode = e.target.closest(`.${prefixCls}__event`);
|
|
142
|
+
eventDomNode.classList.add(`${prefixCls}__event--dragging-ghost`); // Add a class to the dragging clone.
|
|
143
|
+
// Update classes right after the dragging clone is created.
|
|
144
|
+
setTimeout(() => {
|
|
145
|
+
eventDomNode.classList.add(`${prefixCls}__event--dragging-original`); // Add a class to the original event.
|
|
146
|
+
eventDomNode.classList.remove(`${prefixCls}__event--dragging-ghost`); // Remove the ghost class.
|
|
147
|
+
}, 0);
|
|
148
|
+
|
|
149
|
+
viewChanged = false;
|
|
150
|
+
Object.assign(viewBeforeDrag, { id: view.id, date: view.firstCellDate });
|
|
151
|
+
|
|
152
|
+
cancelViewChange = true; // Re-init the cancel view: should cancel unless a cell received the event.
|
|
153
|
+
|
|
154
|
+
calendar.touch.isDraggingEvent = true; // For the global dragging class and cursor.
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* On event drag end, when releasing the event.
|
|
159
|
+
*
|
|
160
|
+
* @param {Object} event The event being dragged.
|
|
161
|
+
*/
|
|
162
|
+
const eventDragEnd = (e, event) => {
|
|
163
|
+
dragging.eventId = null;
|
|
164
|
+
|
|
165
|
+
e.target
|
|
166
|
+
.closest(`.${prefixCls}__event`)
|
|
167
|
+
.classList.remove(`${prefixCls}__event--dragging-original`);
|
|
168
|
+
|
|
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
|
+
// When dropping the event, cancel view change if no cell received the event (in cellDragDrop).
|
|
179
|
+
if (viewChanged && cancelViewChange && viewBeforeDrag.id) {
|
|
180
|
+
view.switchView(viewBeforeDrag.id, viewBeforeDrag.date, true);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Emit `event-drag-end` and return the updated event.
|
|
184
|
+
// `external` is when the event is not coming from this Calendar instance.
|
|
185
|
+
emit('event-drag-end', {
|
|
186
|
+
e,
|
|
187
|
+
event,
|
|
188
|
+
external: dragging.fromCalendar !== calendarUid,
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
dragging.fromCalendar = null;
|
|
192
|
+
dragging.toCalendar = null;
|
|
193
|
+
calendar.touch.isDraggingEvent = false; // For the global dragging class and cursor.
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* On cell/schedule enter with a dragging event.
|
|
198
|
+
* Highlight the cell, and if on `years`, `year`, `month` view,
|
|
199
|
+
* set a timer to go deeper on drag hold over this cell.
|
|
200
|
+
*
|
|
201
|
+
* @param {Object} e The associated DOM event.
|
|
202
|
+
* @param {Object} cell The cell component's $data.
|
|
203
|
+
* @param {Date} cellDate The hovered cell starting date.
|
|
204
|
+
*/
|
|
205
|
+
const cellDragEnter = (e, cell) => {
|
|
206
|
+
const { start: cellDate } = cell;
|
|
207
|
+
const target = e.currentTarget;
|
|
208
|
+
|
|
209
|
+
// Cancel dragEnter event if hovering a child.
|
|
210
|
+
if (e.currentTarget.contains(e.relatedTarget)) return;
|
|
211
|
+
if (target === dragOverCell.el || !target.className.includes(`${prefixCls}__cell-content`))
|
|
212
|
+
return false;
|
|
213
|
+
|
|
214
|
+
// Un-highlight the previous cell.
|
|
215
|
+
if (dragOverCell.el) dragOverCell.cell.highlighted = false;
|
|
216
|
+
|
|
217
|
+
Object.assign(dragOverCell, { el: target, cell, timeout: clearTimeout(dragOverCell.timeout) });
|
|
218
|
+
cell.highlighted = true;
|
|
219
|
+
|
|
220
|
+
// On `years`, `year` & `month` views, go to narrower view on drag and hold.
|
|
221
|
+
if (['years', 'year', 'month'].includes(view.id)) {
|
|
222
|
+
dragOverCell.timeout = setTimeout(() => calendar.switchToNarrowerView(cellDate), 2000);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* On cell/schedule drag over, highlight the cell being hovered,
|
|
228
|
+
* Useful when starting to drag event on the same cell/schedule it's in.
|
|
229
|
+
* Warning: This is fired repeatedly as long as you stay over this cell/schedule.
|
|
230
|
+
*
|
|
231
|
+
* @param {Object} e The associated DOM event.
|
|
232
|
+
* @param {Object} cell The cell component's $data.
|
|
233
|
+
* @param {Date} cellDate The hovered cell starting date.
|
|
234
|
+
* @param {Number|String} schedule The optional schedule being hovered if any.
|
|
235
|
+
*/
|
|
236
|
+
const cellDragOver = (e, cell) => {
|
|
237
|
+
const { start: cellDate, schedule } = cell;
|
|
238
|
+
e.preventDefault();
|
|
239
|
+
cell.highlighted = true;
|
|
240
|
+
if (schedule || schedule === 0) cell.highlightedSchedule = schedule;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* When event drag leaves a cell/schedule.
|
|
245
|
+
* Remove the cell/schedule highlighted state.
|
|
246
|
+
* Warning: cell dragleave event happens AFTER another cell dragenter!
|
|
247
|
+
*
|
|
248
|
+
* @param {Object} e The associated DOM event.
|
|
249
|
+
* @param {Object} cell The cell component's $data.
|
|
250
|
+
*/
|
|
251
|
+
const cellDragLeave = (e, cell) => {
|
|
252
|
+
e.preventDefault();
|
|
253
|
+
|
|
254
|
+
if (e.currentTarget.contains(e.relatedTarget)) return;
|
|
255
|
+
|
|
256
|
+
cell.highlightedSchedule = false;
|
|
257
|
+
|
|
258
|
+
// Only cancel the timer if leaving the current cell to no other one.
|
|
259
|
+
// If leaving this cell to enter another, a cancel is done in cellDragEnter,
|
|
260
|
+
// and a new timer is started.
|
|
261
|
+
if (dragOverCell.cell === cell) {
|
|
262
|
+
clearTimeout(dragOverCell.timeout);
|
|
263
|
+
Object.assign(dragOverCell, { el: null, cell: null, timeout: null });
|
|
264
|
+
cell.highlighted = false;
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* On successful event drop into a cell/schedule.
|
|
270
|
+
* Change the event start and end time and remove the event dragging state
|
|
271
|
+
* and cell/schedule highlighted state.
|
|
272
|
+
*
|
|
273
|
+
* @param {Object} e The associated DOM event.
|
|
274
|
+
* @param {Object} cell The cell component's $data.
|
|
275
|
+
* @param {Boolean} allDay Whether the event is dropped as all-day.
|
|
276
|
+
*/
|
|
277
|
+
const cellDragDrop = async (e, cell, allDay = false) => {
|
|
278
|
+
// Needed to prevent navigation to the text set in dataTransfer from eventDragStart().
|
|
279
|
+
e.preventDefault();
|
|
280
|
+
|
|
281
|
+
clearTimeout(dragOverCell.timeout); // Clear the timer if dropping before it fires.
|
|
282
|
+
Object.assign(dragOverCell, { el: null, cell: null, timeout: null });
|
|
283
|
+
|
|
284
|
+
// Step 1: Extract the event data from the dataTransfer and cell data from the cell param.
|
|
285
|
+
// ----------------------------------------------------
|
|
286
|
+
const incomingEvent = JSON.parse(e.dataTransfer.getData('event') || '{}');
|
|
287
|
+
if (incomingEvent.start) incomingEvent.start = new Date(incomingEvent.start); // Convert the string to Date.
|
|
288
|
+
if (incomingEvent.end) incomingEvent.end = new Date(incomingEvent.end); // Convert the string to Date.
|
|
289
|
+
|
|
290
|
+
// Step 2: Compute the new event start and end times from the dropped coords in cell.
|
|
291
|
+
// ----------------------------------------------------
|
|
292
|
+
let event;
|
|
293
|
+
let newStart;
|
|
294
|
+
let newEnd;
|
|
295
|
+
if (allDay) {
|
|
296
|
+
newStart = new Date(cell.start);
|
|
297
|
+
newEnd = new Date(cell.end);
|
|
298
|
+
} else
|
|
299
|
+
({ start: newStart, end: newEnd } = computeNewEventStartEnd(e, incomingEvent, cell.start));
|
|
300
|
+
|
|
301
|
+
// Can drop on any DOM node, but look for a `schedule` in the ancestors and apply it if any.
|
|
302
|
+
let { schedule: rawSchedule } = e.target.closest('[data-schedule]')?.dataset || {};
|
|
303
|
+
let newSchedule;
|
|
304
|
+
// Dataset are always strings.
|
|
305
|
+
if (rawSchedule !== undefined && String(rawSchedule).length) {
|
|
306
|
+
newSchedule =
|
|
307
|
+
config.schedules?.find((s) => String(s.id) === String(rawSchedule))?.id ?? rawSchedule;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
let onAcceptedDrop = () => {};
|
|
311
|
+
|
|
312
|
+
// Step 3: Find the event in the config.events array (source of truth) if any and prepare the event
|
|
313
|
+
// for drop approval request.
|
|
314
|
+
// ----------------------------------------------------
|
|
315
|
+
// The event is coming from this Calendar, find it in the events array.
|
|
316
|
+
if (dragging.fromCalendar === calendarUid) {
|
|
317
|
+
event = eventsManager.getEvent(incomingEvent._.id);
|
|
318
|
+
|
|
319
|
+
if (event) {
|
|
320
|
+
event._.dragging = false;
|
|
321
|
+
|
|
322
|
+
onAcceptedDrop = (modifiedEvent) => {
|
|
323
|
+
event.start = newStart;
|
|
324
|
+
event.end = newEnd;
|
|
325
|
+
event.allDay = allDay;
|
|
326
|
+
if (newSchedule !== undefined) event.schedule = newSchedule;
|
|
327
|
+
// Allow event to be modified by the external handler except for the _ property.
|
|
328
|
+
if (modifiedEvent && typeof modifiedEvent === 'object') {
|
|
329
|
+
const { _, ...cleanModifiedEvent } = modifiedEvent;
|
|
330
|
+
Object.assign(event, cleanModifiedEvent);
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
} else {
|
|
334
|
+
// Case where events are fetched from the backend and removed from the array when not in the view.
|
|
335
|
+
// So it won't be found in the config.events array.
|
|
336
|
+
// const duration = incomingEvent.endTimeMinutes - incomingEvent.startTimeMinutes
|
|
337
|
+
// // Pass exactly the same event as it was before the view change (same eventId as well) except dates.
|
|
338
|
+
// const { start, end, ...cleanIncomingEvent } = incomingEvent
|
|
339
|
+
// event = eventsManager.createEvent(cellDate, duration, { ...cleanIncomingEvent, schedule })
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
// If the event is not coming from this Calendar but from another Calendar or an external source,
|
|
343
|
+
// create the event in this Calendar.
|
|
344
|
+
else {
|
|
345
|
+
event = {
|
|
346
|
+
...incomingEvent,
|
|
347
|
+
start: newStart,
|
|
348
|
+
end: newEnd,
|
|
349
|
+
...(newSchedule !== undefined && { schedule: newSchedule }),
|
|
350
|
+
_: {
|
|
351
|
+
id: incomingEvent._?.id || incomingEvent.id,
|
|
352
|
+
duration: deltaMinutes(newStart, newEnd),
|
|
353
|
+
},
|
|
354
|
+
getOverlappingEvents: () => {
|
|
355
|
+
return eventsManager.getEventsInRange(newStart, newEnd, {
|
|
356
|
+
schedule: newSchedule,
|
|
357
|
+
exactTime: true,
|
|
358
|
+
});
|
|
359
|
+
},
|
|
360
|
+
};
|
|
361
|
+
onAcceptedDrop = (modifiedEvent) => {
|
|
362
|
+
event = eventsManager.createEvent(event);
|
|
363
|
+
// Allow event to be modified by the external handler except for the _ property.
|
|
364
|
+
if (modifiedEvent && typeof modifiedEvent === 'object') {
|
|
365
|
+
const { _, ...cleanModifiedEvent } = modifiedEvent;
|
|
366
|
+
Object.assign(event, cleanModifiedEvent);
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const scheduleForCheck =
|
|
372
|
+
newSchedule !== undefined
|
|
373
|
+
? newSchedule
|
|
374
|
+
: event?.schedule !== undefined
|
|
375
|
+
? event.schedule
|
|
376
|
+
: incomingEvent?.schedule;
|
|
377
|
+
const hasSchedules = !!(config.schedules && config.schedules.length);
|
|
378
|
+
|
|
379
|
+
// Step 4: Call the external event drop handler if any, to ask for drop approval.
|
|
380
|
+
// Then update the event in the events array (source of truth).
|
|
381
|
+
// ----------------------------------------------------
|
|
382
|
+
let acceptDrop = true;
|
|
383
|
+
const { drop: dropEventHandler } = config.eventListeners?.event;
|
|
384
|
+
if (
|
|
385
|
+
!allDay &&
|
|
386
|
+
config.time &&
|
|
387
|
+
config.specialHoursDisallowed?.hasAny &&
|
|
388
|
+
eventRangeViolatesAllowEvents({
|
|
389
|
+
start: newStart,
|
|
390
|
+
end: newEnd,
|
|
391
|
+
schedule: scheduleForCheck,
|
|
392
|
+
disallowed: config.specialHoursDisallowed,
|
|
393
|
+
hasSchedules,
|
|
394
|
+
})
|
|
395
|
+
) {
|
|
396
|
+
acceptDrop = false;
|
|
397
|
+
} else if (dropEventHandler) {
|
|
398
|
+
// acceptDrop may be false, true or a modified event object.
|
|
399
|
+
acceptDrop = await dropEventHandler({
|
|
400
|
+
e,
|
|
401
|
+
event: { ...event, start: newStart, end: newEnd, schedule: newSchedule },
|
|
402
|
+
overlaps: event.getOverlappingEvents({
|
|
403
|
+
start: newStart,
|
|
404
|
+
end: newEnd,
|
|
405
|
+
schedule: newSchedule,
|
|
406
|
+
}),
|
|
407
|
+
cell,
|
|
408
|
+
external: dragging.fromCalendar !== calendarUid,
|
|
409
|
+
});
|
|
410
|
+
// Can externally use event.isOverlapping() to check if the event overlaps with other events.
|
|
411
|
+
}
|
|
412
|
+
// If the event drop is accepted, add the event to the events array (source of truth).
|
|
413
|
+
if (acceptDrop !== false) onAcceptedDrop(acceptDrop);
|
|
414
|
+
|
|
415
|
+
// Refresh event metadata so the index and display reflect the new position.
|
|
416
|
+
if (event && acceptDrop !== false) eventsManager.refreshEventMeta(event);
|
|
417
|
+
|
|
418
|
+
cell.highlighted = false;
|
|
419
|
+
cell.highlightedSchedule = null;
|
|
420
|
+
cancelViewChange = false;
|
|
421
|
+
dragging.toCalendar = calendarUid;
|
|
422
|
+
|
|
423
|
+
// Emit `event-dropped` and return the updated event.
|
|
424
|
+
// `external` is when the event is not coming from this Calendar instance.
|
|
425
|
+
emit('event-dropped', {
|
|
426
|
+
e,
|
|
427
|
+
cell,
|
|
428
|
+
event,
|
|
429
|
+
originalEvent: incomingEvent,
|
|
430
|
+
external: dragging.fromCalendar !== calendarUid,
|
|
431
|
+
});
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
return {
|
|
435
|
+
eventDragStart,
|
|
436
|
+
eventDragEnd,
|
|
437
|
+
cellDragEnter,
|
|
438
|
+
cellDragOver,
|
|
439
|
+
cellDragLeave,
|
|
440
|
+
cellDragDrop,
|
|
441
|
+
};
|
|
442
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@use '@style/theme/index.scss' as theme;
|
|
2
|
+
@use 'sass:string';
|
|
3
|
+
|
|
4
|
+
$calendar-prefix-cls: string.unquote('#{theme.$prefix}-calendar');
|
|
5
|
+
$calendar-css-prefix: string.unquote('--#{theme.$prefix}-calendar');
|
|
6
|
+
|
|
7
|
+
// Styles from body.vue
|
|
8
|
+
.#{$calendar-prefix-cls}__body {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-rows: repeat(var(#{$calendar-css-prefix}-grid-rows), 1fr);
|
|
12
|
+
grid-template-columns: repeat(var(#{$calendar-css-prefix}-grid-columns), 1fr);
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.#{$calendar-prefix-cls}__time-at-cursor {
|
|
17
|
+
position: absolute;
|
|
18
|
+
right: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
z-index: 10;
|
|
21
|
+
border-top: 1px dashed var(#{$calendar-css-prefix}-border-color);
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
|
|
24
|
+
label {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 0;
|
|
27
|
+
right: 100%;
|
|
28
|
+
display: block;
|
|
29
|
+
margin-right: 4px;
|
|
30
|
+
padding: 0 3px;
|
|
31
|
+
font-size: 0.7rem;
|
|
32
|
+
letter-spacing: -0.04em;
|
|
33
|
+
border-radius: 99em;
|
|
34
|
+
transform: translateY(-50%);
|
|
35
|
+
backdrop-filter: blur(10px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Always use .#{$calendar-prefix-cls}__scrollable for view specific override for Vue transition to be smooth.
|
|
39
|
+
.#{$calendar-prefix-cls}__scrollable--horizontal & {
|
|
40
|
+
inset: 0 auto;
|
|
41
|
+
border-top: none;
|
|
42
|
+
border-left: 1px dashed var(#{$calendar-css-prefix}-border-color);
|
|
43
|
+
|
|
44
|
+
label {
|
|
45
|
+
inset: auto auto 100% 50%;
|
|
46
|
+
margin-right: 0;
|
|
47
|
+
margin-bottom: 4px;
|
|
48
|
+
transform: translateX(-50%);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
@use '@style/theme/index.scss' as theme;
|
|
2
|
+
@use 'sass:string';
|
|
3
|
+
|
|
4
|
+
$calendar-prefix-cls: string.unquote('#{theme.$prefix}-calendar');
|
|
5
|
+
$calendar-css-prefix: string.unquote('--#{theme.$prefix}-calendar');
|
|
6
|
+
|
|
7
|
+
// Styles from cell.vue
|
|
8
|
+
.#{$calendar-prefix-cls}__cell {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
user-select: none;
|
|
14
|
+
// touch-action: none; // Prevents browser default touch handling.
|
|
15
|
+
|
|
16
|
+
// Always use .#{$calendar-prefix-cls}__scrollable for view specific override for Vue transition to be smooth.
|
|
17
|
+
.#{$calendar-prefix-cls}__scrollable--day-view &,
|
|
18
|
+
.#{$calendar-prefix-cls}__scrollable--days-view &,
|
|
19
|
+
.#{$calendar-prefix-cls}__scrollable--week-view & {
|
|
20
|
+
min-width: var(#{$calendar-css-prefix}-min-cell-size, 0);
|
|
21
|
+
}
|
|
22
|
+
// Min-size overrides for horizontal layout (min-height instead of min-width in vertical).
|
|
23
|
+
.#{$calendar-prefix-cls}__scrollable--horizontal.#{$calendar-prefix-cls}__scrollable--day-view &,
|
|
24
|
+
.#{$calendar-prefix-cls}__scrollable--horizontal.#{$calendar-prefix-cls}__scrollable--days-view &,
|
|
25
|
+
.#{$calendar-prefix-cls}__scrollable--horizontal.#{$calendar-prefix-cls}__scrollable--week-view
|
|
26
|
+
& {
|
|
27
|
+
min-width: 0;
|
|
28
|
+
min-height: var(#{$calendar-css-prefix}-min-cell-size, 0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{$calendar-prefix-cls}__scrollable--day-view &--has-schedules,
|
|
32
|
+
.#{$calendar-prefix-cls}__scrollable--days-view &--has-schedules,
|
|
33
|
+
.#{$calendar-prefix-cls}__scrollable--week-view &--has-schedules {
|
|
34
|
+
min-width: max(
|
|
35
|
+
var(#{$calendar-css-prefix}-min-cell-size),
|
|
36
|
+
calc(
|
|
37
|
+
var(#{$calendar-css-prefix}-min-schedule-size, 0px) *
|
|
38
|
+
var(#{$calendar-css-prefix}-schedules-count, 0)
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.#{$calendar-prefix-cls}__scrollable--horizontal.#{$calendar-prefix-cls}__scrollable--day-view
|
|
44
|
+
&--has-schedules,
|
|
45
|
+
.#{$calendar-prefix-cls}__scrollable--horizontal.#{$calendar-prefix-cls}__scrollable--days-view
|
|
46
|
+
&--has-schedules,
|
|
47
|
+
.#{$calendar-prefix-cls}__scrollable--horizontal.#{$calendar-prefix-cls}__scrollable--week-view
|
|
48
|
+
&--has-schedules {
|
|
49
|
+
min-width: 0;
|
|
50
|
+
min-height: max(
|
|
51
|
+
var(#{$calendar-css-prefix}-min-cell-size),
|
|
52
|
+
calc(
|
|
53
|
+
var(#{$calendar-css-prefix}-min-schedule-size, 0px) *
|
|
54
|
+
var(#{$calendar-css-prefix}-schedules-count, 0)
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--has-schedules {
|
|
60
|
+
align-items: stretch;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--out-of-range {
|
|
64
|
+
opacity: 0.4;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&--disabled {
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// The lines must stay in the cell when there's a min-cell-size for them to fill up the whole body.
|
|
72
|
+
.#{$calendar-prefix-cls}--view-has-time &::before {
|
|
73
|
+
position: absolute;
|
|
74
|
+
background-image: linear-gradient(
|
|
75
|
+
0deg,
|
|
76
|
+
var(#{$calendar-css-prefix}-border-color) 0,
|
|
77
|
+
transparent 1px var(#{$calendar-css-prefix}-time-cell-size)
|
|
78
|
+
);
|
|
79
|
+
background-position: 0 1px;
|
|
80
|
+
background-size: 100% var(#{$calendar-css-prefix}-time-cell-size);
|
|
81
|
+
content: '';
|
|
82
|
+
inset: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.#{$calendar-prefix-cls}--view-has-time.#{$calendar-prefix-cls}--horizontal &::before {
|
|
86
|
+
background-image: linear-gradient(
|
|
87
|
+
90deg,
|
|
88
|
+
var(#{$calendar-css-prefix}-border-color) 0,
|
|
89
|
+
transparent 1px var(#{$calendar-css-prefix}-time-cell-size)
|
|
90
|
+
);
|
|
91
|
+
background-position: 0 1px;
|
|
92
|
+
background-size: var(#{$calendar-css-prefix}-time-cell-size) 100%;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.#{$calendar-prefix-cls}__special-hours {
|
|
97
|
+
position: absolute;
|
|
98
|
+
right: 0;
|
|
99
|
+
left: 0;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
pointer-events: none; // Under the day schedules if enabled.
|
|
105
|
+
|
|
106
|
+
.#{$calendar-prefix-cls}--horizontal & {
|
|
107
|
+
inset: 0 auto;
|
|
108
|
+
flex-direction: row;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.#{$calendar-prefix-cls}__now-line {
|
|
113
|
+
position: absolute;
|
|
114
|
+
left: 0;
|
|
115
|
+
z-index: 3; // Keep above the hovered events.
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: 0;
|
|
118
|
+
border-color: rgb(255 0 0 / 60%);
|
|
119
|
+
border-top: 1px solid;
|
|
120
|
+
|
|
121
|
+
&::before {
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: -6px;
|
|
124
|
+
left: 0;
|
|
125
|
+
border: 5px solid transparent;
|
|
126
|
+
border-left-color: inherit;
|
|
127
|
+
content: '';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
span {
|
|
131
|
+
position: absolute;
|
|
132
|
+
right: 1px;
|
|
133
|
+
font-size: 10px;
|
|
134
|
+
opacity: 0.7;
|
|
135
|
+
pointer-events: none; // Let interactions go through on events.
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.#{$calendar-prefix-cls}__event-placeholder {
|
|
140
|
+
position: absolute;
|
|
141
|
+
right: 0;
|
|
142
|
+
left: 0;
|
|
143
|
+
padding-top: 2px;
|
|
144
|
+
padding-left: 4px;
|
|
145
|
+
font-size: 11px;
|
|
146
|
+
line-height: 1;
|
|
147
|
+
background-color: rgb(35 181 181);
|
|
148
|
+
border-radius: 4px;
|
|
149
|
+
|
|
150
|
+
.#{$calendar-prefix-cls}--horizontal & {
|
|
151
|
+
inset: 0 auto;
|
|
152
|
+
}
|
|
153
|
+
}
|
package/es/calendar/style/css.js
CHANGED