bkui-vue 1.0.3-beta.9 → 2.0.1-beta.10
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/index.cjs.js +162 -164
- package/dist/index.esm.js +31999 -29678
- package/dist/index.umd.js +162 -164
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +3 -0
- package/lib/affix/index.js +7 -7
- package/lib/alert/alert.d.ts +5 -5
- package/lib/alert/alert.variable.css +3 -0
- package/lib/alert/index.d.ts +11 -11
- package/lib/backtop/backtop.d.ts +1 -1
- package/lib/backtop/backtop.variable.css +3 -0
- package/lib/backtop/index.d.ts +3 -3
- package/lib/backtop/index.js +6 -6
- package/lib/badge/badge.variable.css +3 -0
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb.variable.css +3 -0
- package/lib/button/button.d.ts +7 -7
- package/lib/button/button.variable.css +3 -0
- package/lib/button/index.d.ts +8 -8
- package/lib/button/index.js +6 -6
- package/lib/card/card.variable.css +3 -0
- package/lib/cascader/cascader-panel.d.ts +1 -1
- package/lib/cascader/cascader.css +3 -3
- package/lib/cascader/cascader.d.ts +1 -1
- package/lib/cascader/cascader.less +4 -4
- package/lib/cascader/cascader.variable.css +6 -3
- package/lib/cascader/index.js +35 -36
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox.variable.css +3 -0
- package/lib/checkbox/index.js +7 -7
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.variable.css +3 -0
- package/lib/code-diff/index.js +8 -8
- package/lib/collapse/collapse.css +11 -0
- package/lib/collapse/collapse.d.ts +11 -0
- package/lib/collapse/collapse.less +15 -1
- package/lib/collapse/collapse.variable.css +14 -0
- package/lib/collapse/index.d.ts +23 -0
- package/lib/collapse/index.js +11 -3
- package/lib/collapse/props.d.ts +8 -0
- package/lib/collapse/utils.d.ts +2 -2
- package/lib/collapse-transition/collapse-transition.variable.css +3 -0
- package/lib/color-picker/color-picker.css +3 -3
- package/lib/color-picker/color-picker.less +3 -3
- package/lib/color-picker/color-picker.variable.css +6 -3
- package/lib/color-picker/index.js +45 -45
- package/lib/components.d.ts +32 -30
- package/lib/components.js +31 -29
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/config-provider.variable.css +3 -0
- package/lib/config-provider/index.d.ts +5 -1
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/container.variable.css +3 -0
- package/lib/container/index.js +6 -6
- package/lib/date-picker/base/date-table.d.ts +1 -1
- package/lib/date-picker/base/month-table.d.ts +3 -3
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -1
- package/lib/date-picker/base/year-table.d.ts +3 -3
- package/lib/date-picker/date-picker.d.ts +1 -0
- package/lib/date-picker/date-picker.variable.css +3 -0
- package/lib/date-picker/index.d.ts +3 -0
- package/lib/date-picker/index.js +340 -224
- package/lib/date-picker/interface.d.ts +9 -9
- package/lib/date-picker/panel/date-range.d.ts +2 -64
- package/lib/date-picker/panel/date.d.ts +1 -1
- package/lib/date-picker/panel/time-range.d.ts +1 -1
- package/lib/date-picker/panel/time.d.ts +1 -1
- package/lib/date-picker/props.d.ts +1 -1
- package/lib/date-picker/time-picker.d.ts +1 -0
- package/lib/date-picker/utils.d.ts +9 -1
- package/lib/dialog/dialog.css +172 -150
- package/lib/dialog/dialog.d.ts +55 -124
- package/lib/dialog/dialog.less +51 -124
- package/lib/dialog/dialog.variable.css +175 -150
- package/lib/dialog/index.d.ts +132 -296
- package/lib/dialog/index.js +244 -246
- package/lib/dialog/props.d.ts +16 -41
- package/lib/directives/index.d.ts +3 -3
- package/lib/directives/index.js +166 -167
- package/lib/directives/tooltips.d.ts +1 -1
- package/lib/dist.index.js +2 -2
- package/lib/divider/divider.d.ts +5 -5
- package/lib/divider/divider.variable.css +3 -0
- package/lib/divider/index.d.ts +11 -11
- package/lib/divider/index.js +2 -2
- package/lib/divider/props.d.ts +2 -2
- package/lib/dropdown/dropdown.css +3 -1
- package/lib/dropdown/dropdown.d.ts +5 -5
- package/lib/dropdown/dropdown.variable.css +6 -1
- package/lib/dropdown/index.d.ts +11 -11
- package/lib/dropdown/index.js +7 -7
- package/lib/exception/exception.d.ts +9 -9
- package/lib/exception/exception.variable.css +3 -0
- package/lib/exception/index.d.ts +11 -11
- package/lib/exception/index.js +10 -10
- package/lib/exception/typings/index.d.ts +1 -1
- package/lib/fixed-navbar/fixed-navbar.variable.css +3 -0
- package/lib/fixed-navbar/index.js +2 -2
- package/lib/form/form.d.ts +2 -2
- package/lib/form/form.variable.css +3 -0
- package/lib/form/index.js +17 -15
- package/lib/form/type.d.ts +2 -2
- package/lib/icon/image-fill.js +82 -167
- package/lib/icon/img-error.js +82 -167
- package/lib/icon/img-placehoulder.js +82 -167
- package/lib/icon/index.d.ts +12 -11
- package/lib/icon/index.js +87 -2427
- package/lib/icon/info-line.js +82 -167
- package/lib/icon/info.js +82 -167
- package/lib/icon/left-shape.js +82 -167
- package/lib/icon/left-turn-line.js +82 -167
- package/lib/icon/loading.js +82 -167
- package/lib/icon/narrow-line.js +82 -167
- package/lib/icon/original.js +82 -167
- package/lib/icon/pdf-fill.js +82 -167
- package/lib/icon/play-shape.js +82 -167
- package/lib/icon/plus.js +82 -167
- package/lib/icon/ppt-fill.js +82 -167
- package/lib/icon/qq.js +82 -167
- package/lib/icon/right-shape.js +82 -167
- package/lib/icon/right-turn-line.js +82 -167
- package/lib/icon/search.js +82 -167
- package/lib/icon/share.js +82 -167
- package/lib/icon/spinner.js +82 -167
- package/lib/icon/success.js +82 -167
- package/lib/icon/switcher-loading.js +82 -167
- package/lib/icon/text-all.d.ts +4 -0
- package/lib/icon/text-all.js +191 -0
- package/lib/icon/text-file.js +82 -167
- package/lib/icon/text-fill.js +82 -167
- package/lib/icon/transfer.js +82 -167
- package/lib/icon/tree-application-shape.js +82 -167
- package/lib/icon/unfull-screen.js +82 -167
- package/lib/icon/unvisible.js +82 -167
- package/lib/icon/up-shape.js +82 -167
- package/lib/icon/upload.js +82 -167
- package/lib/icon/video-fill.js +82 -167
- package/lib/icon/warn.js +82 -167
- package/lib/icon/weixin-pro.js +82 -167
- package/lib/icon/weixin.js +82 -167
- package/lib/image/image-viewer.d.ts +1 -1
- package/lib/image/image-viewer.variable.css +3 -0
- package/lib/image/image.variable.css +3 -0
- package/lib/image/index.js +25 -22
- package/lib/index.d.ts +3 -3
- package/lib/index.js +3 -3
- package/lib/info-box/index.d.ts +2 -2
- package/lib/info-box/index.js +257 -516
- package/lib/info-box/info-box.css +58 -28
- package/lib/info-box/info-box.d.ts +25 -23
- package/lib/info-box/info-box.less +82 -51
- package/lib/info-box/info-box.variable.css +61 -28
- package/lib/info-box/render-component.d.ts +4 -0
- package/lib/input/index.d.ts +15 -15
- package/lib/input/index.js +23 -17
- package/lib/input/input.d.ts +15 -15
- package/lib/input/input.variable.css +3 -0
- package/lib/link/index.d.ts +11 -11
- package/lib/link/index.js +3 -3
- package/lib/link/link.d.ts +5 -5
- package/lib/link/link.variable.css +3 -0
- package/lib/loading/index.d.ts +4 -4
- package/lib/loading/index.js +6 -6
- package/lib/loading/loading.d.ts +6 -6
- package/lib/loading/loading.variable.css +3 -0
- package/lib/locale/index.d.ts +1 -1
- package/lib/locale/index.js +4 -2
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.js +0 -1
- package/lib/menu/menu.variable.css +3 -0
- package/lib/menu/submenu.variable.css +3 -0
- package/lib/menu/utils.d.ts +3 -3
- package/lib/message/index.js +18 -18
- package/lib/message/message.variable.css +3 -0
- package/lib/message/messageConstructor.d.ts +11 -11
- package/lib/modal/hooks.d.ts +6 -0
- package/lib/modal/index.d.ts +44 -312
- package/lib/modal/index.js +286 -672
- package/lib/modal/mask.d.ts +6 -0
- package/lib/modal/modal.css +151 -76
- package/lib/modal/modal.d.ts +19 -117
- package/lib/modal/modal.less +103 -56
- package/lib/modal/modal.variable.css +154 -76
- package/lib/modal/props.mixin.d.ts +5 -41
- package/lib/navigation/index.js +20 -20
- package/lib/navigation/navigation.d.ts +1 -1
- package/lib/navigation/navigation.variable.css +3 -0
- package/lib/notify/index.js +4 -4
- package/lib/notify/notify.variable.css +3 -0
- package/lib/overflow-title/components/overflow-title.d.ts +9 -9
- package/lib/overflow-title/index.d.ts +19 -19
- package/lib/overflow-title/index.js +107 -63
- package/lib/overflow-title/props.d.ts +18 -18
- package/lib/pagination/index.js +16 -15
- package/lib/pagination/pagination.variable.css +3 -0
- package/lib/pagination/type.d.ts +1 -1
- package/lib/pagination/use-limit.d.ts +1 -1
- package/lib/pagination/use-total.d.ts +1 -1
- package/lib/plugin-popover/index.d.ts +1 -1
- package/lib/plugin-popover/index.js +62 -44
- package/lib/pop-confirm/index.js +17 -14
- package/lib/pop-confirm/pop-confirm.variable.css +3 -0
- package/lib/pop-confirm/props.d.ts +2 -2
- package/lib/popover/const.d.ts +3 -3
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.d.ts +19 -19
- package/lib/popover/index.js +62 -44
- package/lib/popover/plugin-popover.d.ts +4 -1
- package/lib/popover/popover.css +3 -1
- package/lib/popover/popover.d.ts +7 -7
- package/lib/popover/popover.less +4 -1
- package/lib/popover/popover.variable.css +6 -1
- package/lib/popover/props.d.ts +4 -4
- package/lib/preset.d.ts +2 -0
- package/lib/process/index.js +3 -3
- package/lib/process/process.variable.css +3 -0
- package/lib/progress/index.d.ts +11 -11
- package/lib/progress/index.js +10 -10
- package/lib/progress/progress.d.ts +7 -7
- package/lib/progress/progress.variable.css +3 -0
- package/lib/radio/index.d.ts +29 -0
- package/lib/radio/index.js +49 -31
- package/lib/radio/radio-button.d.ts +10 -0
- package/lib/radio/radio-group.d.ts +10 -0
- package/lib/radio/radio.d.ts +10 -0
- package/lib/radio/radio.variable.css +3 -0
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.js +8 -8
- package/lib/rate/rate.css +27 -0
- package/lib/rate/rate.less +33 -0
- package/lib/rate/rate.variable.css +30 -0
- package/lib/resize-layout/index.d.ts +11 -11
- package/lib/resize-layout/index.js +8 -9
- package/lib/resize-layout/resize-layout.d.ts +5 -5
- package/lib/resize-layout/resize-layout.variable.css +3 -0
- package/lib/scrollbar/index.d.ts +15 -0
- package/lib/scrollbar/index.js +18762 -0
- package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +2 -0
- package/lib/scrollbar/scrollbar-core/helpers.d.ts +5 -0
- package/lib/scrollbar/scrollbar-core/index.d.ts +241 -0
- package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +5 -0
- package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +1 -0
- package/lib/scrollbar/scrollbar.css +75 -0
- package/lib/scrollbar/scrollbar.less +94 -0
- package/lib/{rate/star.variable.css → scrollbar/scrollbar.variable.css} +70 -19
- package/lib/search-select/index.d.ts +375 -16
- package/lib/search-select/index.js +754 -419
- package/lib/search-select/input.d.ts +14 -5
- package/lib/search-select/menu.d.ts +1 -1
- package/lib/search-select/search-select.css +20 -6
- package/lib/search-select/search-select.d.ts +129 -7
- package/lib/search-select/search-select.less +16 -12
- package/lib/search-select/search-select.variable.css +23 -6
- package/lib/search-select/selected.d.ts +117 -7
- package/lib/search-select/utils.d.ts +22 -9
- package/lib/select/index.d.ts +185 -67
- package/lib/select/index.js +1396 -136
- package/lib/select/option.d.ts +3 -1
- package/lib/select/pinyin/core.d.ts +14 -0
- package/lib/select/pinyin/dict.d.ts +34 -0
- package/lib/select/pinyin/index.d.ts +2 -0
- package/lib/select/select.css +56 -14
- package/lib/select/select.d.ts +74 -26
- package/lib/select/select.less +70 -21
- package/lib/select/select.variable.css +59 -14
- package/lib/select/selectTagInput.d.ts +13 -6
- package/lib/select/type.d.ts +4 -5
- package/lib/shared/index.d.ts +1 -2
- package/lib/shared/index.js +108 -96
- package/lib/shared/popover.d.ts +3 -3
- package/lib/shared/token.d.ts +1 -1
- package/lib/shared/utils.d.ts +12 -0
- package/lib/shared/vue-types.d.ts +51 -46
- package/lib/shared/z-index-manager.d.ts +6 -6
- package/lib/sideslider/index.d.ts +58 -188
- package/lib/sideslider/index.js +83 -57
- package/lib/sideslider/sideslider.css +26 -90
- package/lib/sideslider/sideslider.d.ts +26 -88
- package/lib/sideslider/sideslider.less +56 -132
- package/lib/sideslider/sideslider.variable.css +29 -90
- package/lib/slider/index.d.ts +19 -0
- package/lib/slider/index.js +64 -26
- package/lib/slider/slider.css +14 -0
- package/lib/slider/slider.d.ts +9 -0
- package/lib/slider/slider.less +15 -0
- package/lib/slider/slider.variable.css +17 -0
- package/lib/steps/index.d.ts +11 -11
- package/lib/steps/index.js +3 -3
- package/lib/steps/steps.d.ts +7 -7
- package/lib/steps/steps.variable.css +3 -0
- package/lib/styles/index.d.ts +0 -1
- package/lib/styles/mixins/animate.variable.css +3 -0
- package/lib/styles/mixins/popper.variable.css +3 -0
- package/lib/styles/mixins/scroll.variable.css +3 -0
- package/lib/styles/reset.css +1 -3
- package/lib/styles/reset.less +3 -6
- package/lib/styles/reset.variable.css +4 -3
- package/lib/styles/themes/themes.less +5 -0
- package/lib/swiper/index.js +5 -5
- package/lib/swiper/swiper.variable.css +3 -0
- package/lib/switcher/index.js +2 -2
- package/lib/switcher/switcher.d.ts +2 -2
- package/lib/switcher/switcher.variable.css +3 -0
- package/lib/tab/index.d.ts +22 -22
- package/lib/tab/index.js +15 -15
- package/lib/tab/props.d.ts +15 -15
- package/lib/tab/tab-nav.d.ts +10 -10
- package/lib/tab/tab.d.ts +10 -10
- package/lib/tab/tab.variable.css +3 -0
- package/lib/table/cache.d.ts +11 -3
- package/lib/table/components/table-cell.d.ts +3 -2
- package/lib/table/components/table-column.d.ts +30 -100
- package/lib/table/const.d.ts +12 -12
- package/lib/table/events.d.ts +21 -21
- package/lib/table/index.d.ts +220 -305
- package/lib/table/index.js +18165 -688
- package/lib/table/plugins/head-filter.css +8 -4
- package/lib/table/plugins/head-filter.less +6 -3
- package/lib/table/plugins/head-filter.variable.css +11 -4
- package/lib/table/plugins/head-sort.variable.css +3 -0
- package/lib/table/plugins/settings.variable.css +3 -0
- package/lib/table/plugins/use-active-columns.d.ts +2 -2
- package/lib/table/plugins/use-column-template.d.ts +7 -0
- package/lib/table/plugins/use-draggable.d.ts +2 -2
- package/lib/table/plugins/use-fixed-column.d.ts +1 -1
- package/lib/table/plugins/use-observer-resize.d.ts +5 -0
- package/lib/table/plugins/use-pagination.d.ts +3 -1
- package/lib/table/plugins/use-shift-key.d.ts +13 -0
- package/lib/table/props.d.ts +49 -39
- package/lib/table/table.css +112 -58
- package/lib/table/table.d.ts +58 -47
- package/lib/table/table.less +46 -58
- package/lib/table/table.variable.css +115 -58
- package/lib/table/use-attributes.d.ts +9 -46
- package/lib/table/use-column.d.ts +18 -139
- package/lib/table/use-common.d.ts +5 -5
- package/lib/table/use-render.d.ts +1 -1
- package/lib/table/utils.d.ts +6 -6
- package/lib/table-column/index.d.ts +127 -431
- package/lib/table-column/index.js +43 -117
- package/lib/tag/index.d.ts +11 -11
- package/lib/tag/index.js +2 -2
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag/tag.variable.css +3 -0
- package/lib/tag-input/common.d.ts +1 -1
- package/lib/tag-input/index.d.ts +12 -12
- package/lib/tag-input/index.js +30 -30
- package/lib/tag-input/tag-input.d.ts +6 -6
- package/lib/tag-input/tag-input.variable.css +3 -0
- package/lib/tag-input/tag-props.d.ts +3 -3
- package/lib/tag-input/tag-render.d.ts +1 -1
- package/lib/time-picker/index.d.ts +38 -35
- package/lib/time-picker/time-picker.variable.css +3 -0
- package/lib/timeline/index.d.ts +80 -44
- package/lib/timeline/index.js +56 -67
- package/lib/timeline/timeline.d.ts +46 -29
- package/lib/timeline/timeline.variable.css +3 -0
- package/lib/transfer/const.d.ts +2 -2
- package/lib/transfer/index.js +19 -19
- package/lib/transfer/transfer.css +9 -9
- package/lib/transfer/transfer.less +3 -3
- package/lib/transfer/transfer.variable.css +12 -9
- package/lib/tree/constant.d.ts +22 -20
- package/lib/tree/index.d.ts +64 -20
- package/lib/tree/index.js +17595 -72
- package/lib/tree/props.d.ts +24 -6
- package/lib/tree/tree.css +76 -2
- package/lib/tree/tree.d.ts +34 -8
- package/lib/tree/tree.less +1 -1
- package/lib/tree/tree.variable.css +79 -2
- package/lib/tree/use-empty.d.ts +1 -1
- package/lib/tree/use-intersection-observer.d.ts +27 -0
- package/lib/tree/use-node-action.d.ts +2 -2
- package/lib/tree/use-node-attribute.d.ts +9 -0
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/util.d.ts +1 -1
- package/lib/upload/index.d.ts +12 -0
- package/lib/upload/index.js +62 -65
- package/lib/upload/props.d.ts +4 -1
- package/lib/upload/upload-trigger.d.ts +6 -0
- package/lib/upload/upload.d.ts +6 -0
- package/lib/upload/upload.type.d.ts +7 -7
- package/lib/upload/upload.variable.css +3 -0
- package/lib/upload/use-file-handler.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +36 -9
- package/lib/virtual-render/index.js +295 -80
- package/lib/virtual-render/props.d.ts +16 -0
- package/lib/virtual-render/use-fix-top.d.ts +2 -7
- package/lib/virtual-render/use-scrollbar.d.ts +24 -0
- package/lib/virtual-render/v-virtual-render.d.ts +2 -1
- package/lib/virtual-render/virtual-render.css +76 -2
- package/lib/virtual-render/virtual-render.d.ts +16 -3
- package/lib/virtual-render/virtual-render.less +3 -3
- package/lib/virtual-render/virtual-render.variable.css +79 -2
- package/package.json +13 -49
- package/lib/rate/star.css +0 -27
- package/lib/rate/star.less +0 -34
- package/lib/shared/mask.d.ts +0 -11
package/lib/date-picker/index.js
CHANGED
@@ -43,7 +43,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
43
43
|
;// CONCATENATED MODULE: external "../shared"
|
44
44
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
45
45
|
var y = x => () => x
|
46
|
-
const shared_namespaceObject = x({ ["BKPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.BKPopover, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager, ["capitalize"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.capitalize, ["
|
46
|
+
const shared_namespaceObject = x({ ["BKPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.BKPopover, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager, ["capitalize"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.capitalize, ["getFullscreenRoot"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.getFullscreenRoot, ["scrollTop"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.scrollTop, ["useFormItem"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.useFormItem, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
47
47
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
48
48
|
function _typeof(o) {
|
49
49
|
"@babel/helpers - typeof";
|
@@ -173,7 +173,7 @@ function _toConsumableArray(arr) {
|
|
173
173
|
;// CONCATENATED MODULE: external "vue"
|
174
174
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
175
175
|
var external_vue_y = x => () => x
|
176
|
-
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["vShow"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.vShow, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
176
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["vShow"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.vShow, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
177
177
|
;// CONCATENATED MODULE: external "../config-provider"
|
178
178
|
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
179
179
|
var config_provider_y = x => () => x
|
@@ -431,8 +431,8 @@ var pickerDropdownProps = {
|
|
431
431
|
var _this$$slots$default, _this$$slots$default2, _this$$slots;
|
432
432
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
433
433
|
"ref": "refContentRef",
|
434
|
-
"class": [this.resolveClassName('date-picker-dropdown'), this.className, this.extPopoverCls],
|
435
434
|
"style": this.styles,
|
435
|
+
"class": [this.resolveClassName('date-picker-dropdown'), this.className, this.extPopoverCls],
|
436
436
|
"onClick": this.onClick
|
437
437
|
}, [(_this$$slots$default = (_this$$slots$default2 = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : '']);
|
438
438
|
}
|
@@ -442,70 +442,52 @@ var pickerDropdownProps = {
|
|
442
442
|
/*
|
443
443
|
* Tencent is pleased to support the open source community by making
|
444
444
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
445
|
-
|
446
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
447
|
-
*
|
448
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
449
|
-
*
|
450
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
451
|
-
*
|
452
|
-
* ---------------------------------------------------
|
453
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
454
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
455
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
456
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
457
|
-
*
|
458
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
459
|
-
* the Software.
|
460
|
-
*
|
461
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
462
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
463
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
445
|
+
@@ -23,68 +24,72 @@
|
464
446
|
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
465
447
|
* IN THE SOFTWARE.
|
466
448
|
*/
|
467
449
|
var dateIcon = (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("svg", {
|
468
450
|
"class": "picker-icon",
|
451
|
+
"viewBox": "0 0 1024 1024",
|
469
452
|
"x": "0px",
|
470
|
-
"y": "0px"
|
471
|
-
"viewBox": "0 0 1024 1024"
|
453
|
+
"y": "0px"
|
472
454
|
}, [(0,external_vue_namespaceObject.createVNode)("g", {
|
473
455
|
"id": "date"
|
474
456
|
}, [(0,external_vue_namespaceObject.createVNode)("path", {
|
475
|
-
"
|
476
|
-
"
|
457
|
+
"d": "M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z",
|
458
|
+
"fill": "#c4c6cc"
|
477
459
|
}, null), (0,external_vue_namespaceObject.createVNode)("rect", {
|
478
|
-
"x": "416",
|
479
|
-
"y": "128",
|
480
|
-
"fill": "#c4c6cc",
|
481
460
|
"width": "192",
|
482
|
-
"height": "64"
|
483
|
-
}, null), (0,external_vue_namespaceObject.createVNode)("rect", {
|
484
|
-
"x": "288",
|
485
|
-
"y": "96",
|
461
|
+
"height": "64",
|
486
462
|
"fill": "#c4c6cc",
|
487
|
-
"
|
488
|
-
"
|
463
|
+
"x": "416",
|
464
|
+
"y": "128"
|
489
465
|
}, null), (0,external_vue_namespaceObject.createVNode)("rect", {
|
490
|
-
"
|
491
|
-
"
|
466
|
+
"width": "64",
|
467
|
+
"height": "128",
|
492
468
|
"fill": "#c4c6cc",
|
469
|
+
"x": "288",
|
470
|
+
"y": "96"
|
471
|
+
}, null), (0,external_vue_namespaceObject.createVNode)("rect", {
|
493
472
|
"width": "64",
|
494
|
-
"height": "128"
|
473
|
+
"height": "128",
|
474
|
+
"fill": "#c4c6cc",
|
475
|
+
"x": "672",
|
476
|
+
"y": "96"
|
495
477
|
}, null), (0,external_vue_namespaceObject.createVNode)("polygon", {
|
496
478
|
"fill": "#c4c6cc",
|
497
479
|
"points": "403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"
|
498
480
|
}, null)])])]);
|
499
481
|
var timeIcon = (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("svg", {
|
500
482
|
"class": "picker-icon",
|
483
|
+
"viewBox": "0 0 1024 1024",
|
501
484
|
"x": "0px",
|
502
|
-
"y": "0px"
|
503
|
-
"viewBox": "0 0 1024 1024"
|
485
|
+
"y": "0px"
|
504
486
|
}, [(0,external_vue_namespaceObject.createVNode)("g", {
|
505
487
|
"id": "time"
|
506
488
|
}, [(0,external_vue_namespaceObject.createVNode)("path", {
|
507
|
-
"
|
508
|
-
"
|
489
|
+
"d": "M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z",
|
490
|
+
"fill": "#c4c6cc"
|
509
491
|
}, null), (0,external_vue_namespaceObject.createVNode)("polygon", {
|
510
492
|
"fill": "#c4c6cc",
|
511
493
|
"points": "512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"
|
@@ -621,17 +603,17 @@ var confirmProps = {
|
|
621
603
|
_this$$slots$confirm2,
|
622
604
|
_this$$slots;
|
623
605
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
624
|
-
"class": this.resolveClassName('picker-confirm'),
|
625
606
|
"ref": "elRef",
|
607
|
+
"class": this.resolveClassName('picker-confirm'),
|
626
608
|
"onKeydown": this.handleTab
|
627
609
|
}, [this.showTime ? // <a href="javascript: void(0);" class="bk-picker-confirm-time" disabled onClick={this.handleToggleTime}>
|
628
610
|
// {this.labels.time}
|
629
611
|
// </a>
|
630
612
|
(0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
631
|
-
"text": true,
|
632
|
-
"theme": "primary",
|
633
613
|
"class": this.resolveClassName('picker-confirm-time'),
|
634
614
|
"disabled": this.timeDisabled,
|
615
|
+
"theme": "primary",
|
616
|
+
"text": true,
|
635
617
|
"onClick": this.handleToggleTime
|
636
618
|
}, {
|
637
619
|
"default": function _default() {
|
@@ -643,12 +625,13 @@ var confirmProps = {
|
|
643
625
|
"href": "javascript: void(0);",
|
644
626
|
"onClick": this.handleClear,
|
645
627
|
"onKeydown": this.handleClear
|
646
|
-
}, [this.labels.clear]) : '', (0,external_vue_namespaceObject.createVNode)("a", {
|
647
|
-
"href": "javascript: void(0);",
|
628
|
+
}, [this.labels.clear]) : '', (0,external_vue_namespaceObject.createVNode)("a", (0,external_vue_namespaceObject.mergeProps)({
|
648
629
|
"class": "confirm",
|
649
|
-
"
|
650
|
-
"
|
651
|
-
},
|
630
|
+
"href": "javascript: void(0);",
|
631
|
+
"onClick": this.handleSuccess
|
632
|
+
}, {
|
633
|
+
onKeydown_enter: this.handleSuccess
|
634
|
+
}), [this.labels.ok])])]);
|
652
635
|
}
|
653
636
|
}));
|
654
637
|
;// CONCATENATED MODULE: external "js-calendar"
|
@@ -685,7 +668,6 @@ const external_date_fns_namespaceObject = external_date_fns_x({ ["format"]: () =
|
|
685
668
|
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
686
669
|
* IN THE SOFTWARE.
|
687
670
|
*/
|
688
|
-
/* eslint-disable no-param-reassign, no-multi-assign */
|
689
671
|
/**
|
690
672
|
* @file fecha
|
691
673
|
* https://github.com/taylorhakes/fecha
|
@@ -695,7 +677,6 @@ var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^
|
|
695
677
|
var twoDigits = /\d\d?/;
|
696
678
|
var threeDigits = /\d{3}/;
|
697
679
|
var fourDigits = /\d{4}/;
|
698
|
-
// eslint-disable-next-line max-len
|
699
680
|
var word = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
|
700
681
|
var noop = function noop() {};
|
701
682
|
function shorten(arr, sLen) {
|
@@ -1105,6 +1086,10 @@ var typeValueResolver = {
|
|
1105
1086
|
return src_fecha.parse(text, format || 'yyyy-MM-dd');
|
1106
1087
|
}
|
1107
1088
|
},
|
1089
|
+
monthrange: {
|
1090
|
+
formatter: rangeFormatter,
|
1091
|
+
parser: rangeParser
|
1092
|
+
},
|
1108
1093
|
year: {
|
1109
1094
|
formatter: function formatter(value, format) {
|
1110
1095
|
return dateFormat(value, format);
|
@@ -1113,6 +1098,10 @@ var typeValueResolver = {
|
|
1113
1098
|
return src_fecha.parse(text, format || 'yyyy-MM-dd');
|
1114
1099
|
}
|
1115
1100
|
},
|
1101
|
+
yearrange: {
|
1102
|
+
formatter: rangeFormatter,
|
1103
|
+
parser: rangeParser
|
1104
|
+
},
|
1116
1105
|
multiple: {
|
1117
1106
|
formatter: function formatter(value, format) {
|
1118
1107
|
return value.filter(Boolean).map(function (date) {
|
@@ -1205,7 +1194,9 @@ var extractTime = function extractTime(date) {
|
|
1205
1194
|
var DEFAULT_FORMATS = {
|
1206
1195
|
date: 'yyyy-MM-dd',
|
1207
1196
|
month: 'yyyy-MM',
|
1197
|
+
monthrange: 'yyyy-MM',
|
1208
1198
|
year: 'yyyy',
|
1199
|
+
yearrange: 'yyyy',
|
1209
1200
|
datetime: 'yyyy-MM-dd HH:mm:ss',
|
1210
1201
|
time: 'HH:mm:ss',
|
1211
1202
|
timerange: 'HH:mm:ss',
|
@@ -1284,7 +1275,9 @@ var timePickerKey = Symbol('time-picker');
|
|
1284
1275
|
// }
|
1285
1276
|
function iconBtnCls(direction) {
|
1286
1277
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
1287
|
-
|
1278
|
+
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1279
|
+
resolveClassName = _usePrefix.resolveClassName;
|
1280
|
+
return [resolveClassName('picker-panel-icon-btn'), resolveClassName("date-picker-".concat(direction, "-btn")), resolveClassName("date-picker-".concat(direction, "-btn-arrow").concat(type))];
|
1288
1281
|
}
|
1289
1282
|
var getDayCountOfMonth = function getDayCountOfMonth(year, month) {
|
1290
1283
|
return new Date(year, month + 1, 0).getDate();
|
@@ -1376,7 +1369,15 @@ var isInRange = function isInRange(time, a, b) {
|
|
1376
1369
|
if (!a || !b) {
|
1377
1370
|
return false;
|
1378
1371
|
}
|
1379
|
-
var _sort = [a, b].sort()
|
1372
|
+
var _sort = [a, b].sort(function (x, y) {
|
1373
|
+
if (x - y > 0) {
|
1374
|
+
return 1;
|
1375
|
+
}
|
1376
|
+
if (x - y < 0) {
|
1377
|
+
return -1;
|
1378
|
+
}
|
1379
|
+
return 0;
|
1380
|
+
}),
|
1380
1381
|
_sort2 = _slicedToArray(_sort, 2),
|
1381
1382
|
start = _sort2[0],
|
1382
1383
|
end = _sort2[1];
|
@@ -1581,6 +1582,7 @@ var dateTableProps = {
|
|
1581
1582
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/base/month-table.tsx
|
1582
1583
|
|
1583
1584
|
|
1585
|
+
|
1584
1586
|
/*
|
1585
1587
|
* Tencent is pleased to support the open source community by making
|
1586
1588
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -1653,7 +1655,7 @@ var monthTableProps = {
|
|
1653
1655
|
/* harmony default export */ const month_table = ((0,external_vue_namespaceObject.defineComponent)({
|
1654
1656
|
name: 'MonthTable',
|
1655
1657
|
props: monthTableProps,
|
1656
|
-
emits: ['pick', 'pick-click', '
|
1658
|
+
emits: ['pick', 'pick-click', 'changeRange'],
|
1657
1659
|
setup: function setup(props, _ref) {
|
1658
1660
|
var emit = _ref.emit;
|
1659
1661
|
var dates = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -1663,6 +1665,7 @@ var monthTableProps = {
|
|
1663
1665
|
var rangeSelecting = selectionMode === 'range' && rangeState.selecting;
|
1664
1666
|
return rangeSelecting ? [rangeState.from] : modelValue;
|
1665
1667
|
});
|
1668
|
+
var isRange = props.selectionMode === 'range';
|
1666
1669
|
var cells = (0,external_vue_namespaceObject.computed)(function () {
|
1667
1670
|
var cells = [];
|
1668
1671
|
var cellTmpl = {
|
@@ -1675,14 +1678,27 @@ var monthTableProps = {
|
|
1675
1678
|
return clearHours(new Date(date.getFullYear(), date.getMonth(), 1));
|
1676
1679
|
});
|
1677
1680
|
var focusedDate = clearHours(new Date(props.focusedDate.getFullYear(), props.focusedDate.getMonth(), 1));
|
1681
|
+
var _dates$value$map = dates.value.map(clearHours),
|
1682
|
+
_dates$value$map2 = _slicedToArray(_dates$value$map, 2),
|
1683
|
+
minDay = _dates$value$map2[0],
|
1684
|
+
maxDay = _dates$value$map2[1];
|
1685
|
+
var rangeStart = props.rangeState.from && clearHours(props.rangeState.from);
|
1686
|
+
var rangeEnd = props.rangeState.to && clearHours(props.rangeState.to);
|
1687
|
+
var now = new Date();
|
1688
|
+
var currentMonth = clearHours(new Date(now.getFullYear(), now.getMonth(), 1));
|
1678
1689
|
for (var i = 0; i < 12; i++) {
|
1679
1690
|
var cell = JSON.parse(JSON.stringify(cellTmpl));
|
1680
1691
|
cell.date = new Date(tableYear, i, 1);
|
1681
1692
|
cell.text = tCell(i + 1);
|
1682
1693
|
var day = clearHours(cell.date);
|
1683
|
-
|
1694
|
+
var time = cell.date && clearHours(cell.date);
|
1695
|
+
cell.disabled = typeof props.disabledDate === 'function' && props.disabledDate(cell.date);
|
1684
1696
|
cell.selected = selectedDays.includes(day);
|
1697
|
+
cell.range = isRange && isInRange(time, rangeStart, rangeEnd);
|
1698
|
+
cell.start = isRange && time === minDay;
|
1699
|
+
cell.end = isRange && time === maxDay;
|
1685
1700
|
cell.focused = day === focusedDate;
|
1701
|
+
cell.isCurrentMonth = day === currentMonth;
|
1686
1702
|
cells.push(cell);
|
1687
1703
|
}
|
1688
1704
|
return cells;
|
@@ -1693,7 +1709,12 @@ var monthTableProps = {
|
|
1693
1709
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1694
1710
|
resolveClassName = _usePrefix.resolveClassName;
|
1695
1711
|
var getCellCls = function getCellCls(cell) {
|
1696
|
-
return [resolveClassName('date-picker-cells-cell'), _defineProperty(_defineProperty(_defineProperty({}, resolveClassName('date-picker-cells-cell-selected'), cell.selected), resolveClassName('date-picker-cells-cell-disabled'), cell.disabled), resolveClassName('date-picker-cells-cell-range'), cell.range && !cell.start && !cell.end)
|
1712
|
+
return [resolveClassName('date-picker-cells-cell'), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, resolveClassName('date-picker-cells-cell-selected'), cell.selected), resolveClassName('date-picker-cells-cell-disabled'), cell.disabled), resolveClassName('date-picker-cells-cell-today'), cell.isCurrentMonth), resolveClassName('date-picker-cells-cell-range'), cell.range && !cell.start && !cell.end) // resolveClassName('date-picker-cells-cell'),
|
1713
|
+
// {
|
1714
|
+
// [resolveClassName('date-picker-cells-cell-today')]: cell.type === 'today',
|
1715
|
+
// [resolveClassName('date-picker-cells-cell-range')]: cell.range && !cell.start && !cell.end,
|
1716
|
+
// },
|
1717
|
+
];
|
1697
1718
|
};
|
1698
1719
|
var handleClick = function handleClick(cell) {
|
1699
1720
|
if (cell.disabled || cell.type === 'weekLabel') {
|
@@ -1711,7 +1732,7 @@ var monthTableProps = {
|
|
1711
1732
|
return;
|
1712
1733
|
}
|
1713
1734
|
var newDate = cell.date;
|
1714
|
-
emit('
|
1735
|
+
emit('changeRange', newDate);
|
1715
1736
|
};
|
1716
1737
|
return {
|
1717
1738
|
cells: cells,
|
@@ -1741,6 +1762,7 @@ var monthTableProps = {
|
|
1741
1762
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/base/year-table.tsx
|
1742
1763
|
|
1743
1764
|
|
1765
|
+
|
1744
1766
|
/*
|
1745
1767
|
* Tencent is pleased to support the open source community by making
|
1746
1768
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -1813,7 +1835,7 @@ var yearTableProps = {
|
|
1813
1835
|
/* harmony default export */ const year_table = ((0,external_vue_namespaceObject.defineComponent)({
|
1814
1836
|
name: 'YearTable',
|
1815
1837
|
props: yearTableProps,
|
1816
|
-
emits: ['pick', 'pick-click', '
|
1838
|
+
emits: ['pick', 'pick-click', 'changeRange'],
|
1817
1839
|
setup: function setup(props, _ref) {
|
1818
1840
|
var emit = _ref.emit;
|
1819
1841
|
var dates = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -1823,6 +1845,7 @@ var yearTableProps = {
|
|
1823
1845
|
var rangeSelecting = selectionMode === 'range' && rangeState.selecting;
|
1824
1846
|
return rangeSelecting ? [rangeState.from] : modelValue;
|
1825
1847
|
});
|
1848
|
+
var isRange = props.selectionMode === 'range';
|
1826
1849
|
var startYear = (0,external_vue_namespaceObject.computed)(function () {
|
1827
1850
|
return Math.floor(props.tableDate.getFullYear() / 10) * 10;
|
1828
1851
|
});
|
@@ -1837,13 +1860,25 @@ var yearTableProps = {
|
|
1837
1860
|
return clearHours(new Date(date.getFullYear(), 0, 1));
|
1838
1861
|
});
|
1839
1862
|
var focusedDate = clearHours(new Date(props.focusedDate.getFullYear(), 0, 1));
|
1863
|
+
var currentYear = clearHours(new Date(new Date().getFullYear(), 0, 1));
|
1864
|
+
var _dates$value$map = dates.value.map(clearHours),
|
1865
|
+
_dates$value$map2 = _slicedToArray(_dates$value$map, 2),
|
1866
|
+
minDay = _dates$value$map2[0],
|
1867
|
+
maxDay = _dates$value$map2[1];
|
1868
|
+
var rangeStart = props.rangeState.from && clearHours(props.rangeState.from);
|
1869
|
+
var rangeEnd = props.rangeState.to && clearHours(props.rangeState.to);
|
1840
1870
|
for (var i = 0; i < 10; i++) {
|
1841
1871
|
var cell = JSON.parse(JSON.stringify(cellTmpl));
|
1842
1872
|
cell.date = new Date(startYear.value + i, 0, 1);
|
1843
|
-
cell.disabled = typeof props.disabledDate === 'function' && props.disabledDate(cell.date)
|
1873
|
+
cell.disabled = typeof props.disabledDate === 'function' && props.disabledDate(cell.date);
|
1844
1874
|
var day = clearHours(cell.date);
|
1875
|
+
var time = cell.date && clearHours(cell.date);
|
1876
|
+
cell.range = isRange && isInRange(time, rangeStart, rangeEnd);
|
1877
|
+
cell.start = isRange && time === minDay;
|
1878
|
+
cell.end = isRange && time === maxDay;
|
1845
1879
|
cell.selected = selectedDays.includes(day);
|
1846
1880
|
cell.focused = day === focusedDate;
|
1881
|
+
cell.isCurrent = day === currentYear;
|
1847
1882
|
cells.push(cell);
|
1848
1883
|
}
|
1849
1884
|
return cells;
|
@@ -1851,7 +1886,7 @@ var yearTableProps = {
|
|
1851
1886
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1852
1887
|
resolveClassName = _usePrefix.resolveClassName;
|
1853
1888
|
var getCellCls = function getCellCls(cell) {
|
1854
|
-
return [resolveClassName('date-picker-cells-cell'), _defineProperty(_defineProperty(_defineProperty({}, resolveClassName('date-picker-cells-cell-selected'), cell.selected), resolveClassName('date-picker-cells-cell-disabled'), cell.disabled), resolveClassName('date-picker-cells-cell-range'), cell.range && !cell.start && !cell.end)];
|
1889
|
+
return [resolveClassName('date-picker-cells-cell'), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, resolveClassName('date-picker-cells-cell-selected'), cell.selected), resolveClassName('date-picker-cells-cell-disabled'), cell.disabled), resolveClassName('date-picker-cells-cell-today'), cell.isCurrent), resolveClassName('date-picker-cells-cell-range'), cell.range && !cell.start && !cell.end)];
|
1855
1890
|
};
|
1856
1891
|
var handleClick = function handleClick(cell) {
|
1857
1892
|
if (cell.disabled || cell.type === 'weekLabel') {
|
@@ -1869,7 +1904,7 @@ var yearTableProps = {
|
|
1869
1904
|
return;
|
1870
1905
|
}
|
1871
1906
|
var newDate = cell.date;
|
1872
|
-
emit('
|
1907
|
+
emit('changeRange', newDate);
|
1873
1908
|
};
|
1874
1909
|
return {
|
1875
1910
|
cells: cells,
|
@@ -1938,7 +1973,7 @@ var datePickerProps = {
|
|
1938
1973
|
type: String,
|
1939
1974
|
"default": 'date',
|
1940
1975
|
validator: function validator(value) {
|
1941
|
-
var validList = ['year', 'month', 'date', 'daterange', 'datetime', 'datetimerange', 'time', 'timerange'];
|
1976
|
+
var validList = ['year', 'yearrange', 'month', 'monthrange', 'date', 'daterange', 'datetime', 'datetimerange', 'time', 'timerange'];
|
1942
1977
|
if (validList.indexOf(value) < 0) {
|
1943
1978
|
console.error("type property is not valid: '".concat(value, "'"));
|
1944
1979
|
return false;
|
@@ -2508,18 +2543,18 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2508
2543
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
2509
2544
|
"class": this.resolveClassName('time-picker-cells-title-wrapper')
|
2510
2545
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
2511
|
-
"
|
2512
|
-
"
|
2546
|
+
"style": this.styles,
|
2547
|
+
"class": [this.resolveClassName('time-picker-cells-title'), this.focusedColumn === 0 ? 'active' : '']
|
2513
2548
|
}, [this.t.hour]), (0,external_vue_namespaceObject.createVNode)("div", {
|
2514
|
-
"
|
2515
|
-
"
|
2549
|
+
"style": this.styles,
|
2550
|
+
"class": [this.resolveClassName('time-picker-cells-title'), this.focusedColumn === 1 ? 'active' : '']
|
2516
2551
|
}, [this.t.min]), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
2517
|
-
"
|
2518
|
-
"
|
2552
|
+
"style": this.styles,
|
2553
|
+
"class": [this.resolveClassName('time-picker-cells-title'), this.focusedColumn === 2 ? 'active' : '']
|
2519
2554
|
}, [this.t.sec]), [[external_vue_namespaceObject.vShow, this.showSeconds]])]), (0,external_vue_namespaceObject.createVNode)("div", {
|
2520
|
-
"class": this.resolveClassName('time-picker-cells-list'),
|
2521
2555
|
"ref": "hoursRef",
|
2522
|
-
"style": this.styles
|
2556
|
+
"style": this.styles,
|
2557
|
+
"class": this.resolveClassName('time-picker-cells-list')
|
2523
2558
|
}, [(0,external_vue_namespaceObject.createVNode)("ul", {
|
2524
2559
|
"class": this.resolveClassName('time-picker-cells-ul')
|
2525
2560
|
}, [this.hoursList.map(function (item) {
|
@@ -2530,9 +2565,9 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2530
2565
|
}
|
2531
2566
|
}, [_this2.padTime(item.text)]), [[external_vue_namespaceObject.vShow, !item.hide]]);
|
2532
2567
|
})])]), (0,external_vue_namespaceObject.createVNode)("div", {
|
2533
|
-
"class": this.resolveClassName('time-picker-cells-list'),
|
2534
2568
|
"ref": "minutesRef",
|
2535
|
-
"style": this.styles
|
2569
|
+
"style": this.styles,
|
2570
|
+
"class": this.resolveClassName('time-picker-cells-list')
|
2536
2571
|
}, [(0,external_vue_namespaceObject.createVNode)("ul", {
|
2537
2572
|
"class": this.resolveClassName('time-picker-cells-ul')
|
2538
2573
|
}, [this.minutesList.map(function (item) {
|
@@ -2543,9 +2578,9 @@ var timeParts = ['hours', 'minutes', 'seconds'];
|
|
2543
2578
|
}
|
2544
2579
|
}, [_this2.padTime(item.text)]), [[external_vue_namespaceObject.vShow, !item.hide]]);
|
2545
2580
|
})])]), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
2546
|
-
"class": this.resolveClassName('time-picker-cells-list'),
|
2547
2581
|
"ref": "secondsRef",
|
2548
|
-
"style": this.styles
|
2582
|
+
"style": this.styles,
|
2583
|
+
"class": this.resolveClassName('time-picker-cells-list')
|
2549
2584
|
}, [(0,external_vue_namespaceObject.createVNode)("ul", {
|
2550
2585
|
"class": this.resolveClassName('time-picker-cells-ul')
|
2551
2586
|
}, [this.secondsList.map(function (item) {
|
@@ -2754,27 +2789,27 @@ var timeProps = {
|
|
2754
2789
|
e.preventDefault();
|
2755
2790
|
}
|
2756
2791
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
2757
|
-
"class": this.resolveClassName('picker-panel-body'),
|
2758
2792
|
"style": {
|
2759
2793
|
width: "".concat(this.width, "px")
|
2760
|
-
}
|
2794
|
+
},
|
2795
|
+
"class": this.resolveClassName('picker-panel-body')
|
2761
2796
|
}, [this.showDate ? (0,external_vue_namespaceObject.createVNode)("div", {
|
2762
2797
|
"class": this.resolveClassName('time-picker-header')
|
2763
2798
|
}, [this.visibleDate]) : '', (0,external_vue_namespaceObject.createVNode)("div", {
|
2764
2799
|
"class": this.resolveClassName('picker-panel-content')
|
2765
2800
|
}, [(0,external_vue_namespaceObject.createVNode)(time_spinner, {
|
2766
2801
|
"ref": "timeSpinnerRef",
|
2767
|
-
"showSeconds": this.showSeconds,
|
2768
|
-
"steps": this.steps,
|
2769
|
-
"hours": this.timeSlots[0],
|
2770
|
-
"minutes": this.timeSlots[1],
|
2771
|
-
"seconds": this.timeSlots[2],
|
2772
2802
|
"disabledHours": this.disabledHMS.disabledHours,
|
2773
2803
|
"disabledMinutes": this.disabledHMS.disabledMinutes,
|
2774
2804
|
"disabledSeconds": this.disabledHMS.disabledSeconds,
|
2775
2805
|
"hideDisabledOptions": this.hideDisabledOptions,
|
2776
|
-
"
|
2777
|
-
"
|
2806
|
+
"hours": this.timeSlots[0],
|
2807
|
+
"minutes": this.timeSlots[1],
|
2808
|
+
"seconds": this.timeSlots[2],
|
2809
|
+
"showSeconds": this.showSeconds,
|
2810
|
+
"steps": this.steps,
|
2811
|
+
"onChange": this.handleChange,
|
2812
|
+
"onPick-click": this.handlePickClick
|
2778
2813
|
}, null)])])]);
|
2779
2814
|
}
|
2780
2815
|
}));
|
@@ -2808,6 +2843,7 @@ function date_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
2808
2843
|
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2809
2844
|
* IN THE SOFTWARE.
|
2810
2845
|
*/
|
2846
|
+
// import type { Placement } from '@popperjs/core';
|
2811
2847
|
|
2812
2848
|
|
2813
2849
|
|
@@ -3093,8 +3129,8 @@ var datePanelProps = {
|
|
3093
3129
|
}
|
3094
3130
|
}, [shortcut.text]);
|
3095
3131
|
})]) : '', (0,external_vue_namespaceObject.createVNode)("div", {
|
3096
|
-
"
|
3097
|
-
"
|
3132
|
+
"style": "width: 261px;",
|
3133
|
+
"class": this.resolveClassName('picker-panel-body')
|
3098
3134
|
}, [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
3099
3135
|
"class": this.resolveClassName('date-picker-header')
|
3100
3136
|
}, [(0,external_vue_namespaceObject.createVNode)("span", {
|
@@ -3157,29 +3193,29 @@ var datePanelProps = {
|
|
3157
3193
|
switch (_this2.pickerTable) {
|
3158
3194
|
case 'date-table':
|
3159
3195
|
return (0,external_vue_namespaceObject.createVNode)(date_table, {
|
3160
|
-
"tableDate": _this2.panelDate,
|
3161
3196
|
"disabledDate": _this2.disabledDate,
|
3162
|
-
"selectionMode": _this2.selectionMode,
|
3163
|
-
"modelValue": _this2.dates,
|
3164
3197
|
"focusedDate": _this2.focusedDate,
|
3198
|
+
"modelValue": _this2.dates,
|
3199
|
+
"selectionMode": _this2.selectionMode,
|
3200
|
+
"tableDate": _this2.panelDate,
|
3165
3201
|
"onPick": _this2.panelPickerHandlers
|
3166
3202
|
}, null);
|
3167
3203
|
case 'year-table':
|
3168
3204
|
return (0,external_vue_namespaceObject.createVNode)(year_table, {
|
3169
|
-
"tableDate": _this2.panelDate,
|
3170
3205
|
"disabledDate": _this2.disabledDate,
|
3171
|
-
"selectionMode": _this2.selectionMode,
|
3172
|
-
"modelValue": _this2.dates,
|
3173
3206
|
"focusedDate": _this2.focusedDate,
|
3207
|
+
"modelValue": _this2.dates,
|
3208
|
+
"selectionMode": _this2.selectionMode,
|
3209
|
+
"tableDate": _this2.panelDate,
|
3174
3210
|
"onPick": _this2.panelPickerHandlers
|
3175
3211
|
}, null);
|
3176
3212
|
case 'month-table':
|
3177
3213
|
return (0,external_vue_namespaceObject.createVNode)(month_table, {
|
3178
|
-
"tableDate": _this2.panelDate,
|
3179
3214
|
"disabledDate": _this2.disabledDate,
|
3180
|
-
"selectionMode": _this2.selectionMode,
|
3181
|
-
"modelValue": _this2.dates,
|
3182
3215
|
"focusedDate": _this2.focusedDate,
|
3216
|
+
"modelValue": _this2.dates,
|
3217
|
+
"selectionMode": _this2.selectionMode,
|
3218
|
+
"tableDate": _this2.panelDate,
|
3183
3219
|
"onPick": _this2.panelPickerHandlers
|
3184
3220
|
}, null);
|
3185
3221
|
default:
|
@@ -3187,23 +3223,23 @@ var datePanelProps = {
|
|
3187
3223
|
}
|
3188
3224
|
}() : (0,external_vue_namespaceObject.createVNode)(time, {
|
3189
3225
|
"ref": "timePickerRef",
|
3190
|
-
"
|
3226
|
+
"disabledDate": this.disabledDate,
|
3191
3227
|
"format": this.format,
|
3192
3228
|
"selectionMode": this.selectionMode,
|
3193
|
-
"
|
3229
|
+
"value": this.dates,
|
3194
3230
|
"onPick": this.handlePick,
|
3195
|
-
"onPick-click": this.handlePickClick,
|
3196
3231
|
"onPick-clear": this.handlePickClear,
|
3232
|
+
"onPick-click": this.handlePickClick,
|
3197
3233
|
"onPick-success": this.handlePickSuccess,
|
3198
3234
|
"onPick-toggle-time": this.handleToggleTime
|
3199
3235
|
}, null)]), this.confirm ? (0,external_vue_namespaceObject.createVNode)(base_confirm, {
|
3200
3236
|
"clearable": this.clearable,
|
3237
|
+
"isTime": this.isTime,
|
3201
3238
|
"showTime": this.showTime,
|
3202
3239
|
"timeDisabled": this.timeDisabled,
|
3203
|
-
"isTime": this.isTime,
|
3204
|
-
"onPick-toggle-time": this.handleToggleTime,
|
3205
3240
|
"onPick-clear": this.handlePickClear,
|
3206
|
-
"onPick-success": this.handlePickSuccess
|
3241
|
+
"onPick-success": this.handlePickSuccess,
|
3242
|
+
"onPick-toggle-time": this.handleToggleTime
|
3207
3243
|
}, this.$slots) : '']), this.hasShortcuts ? (0,external_vue_namespaceObject.createVNode)("div", {
|
3208
3244
|
"class": this.resolveClassName('picker-panel-sidebar')
|
3209
3245
|
}, [(_this$$slots$shortcut = (_this$$slots$shortcut2 = (_this$$slots = this.$slots).shortcuts) === null || _this$$slots$shortcut2 === void 0 ? void 0 : _this$$slots$shortcut2.call(_this$$slots)) !== null && _this$$slots$shortcut !== void 0 ? _this$$slots$shortcut : null]) : null]);
|
@@ -3426,48 +3462,48 @@ var timeRangeProps = {
|
|
3426
3462
|
e.preventDefault();
|
3427
3463
|
}
|
3428
3464
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
3429
|
-
"class": this.resolveClassName('picker-panel-body'),
|
3430
3465
|
"style": {
|
3431
3466
|
width: "".concat(this.width * 2, "px")
|
3432
|
-
}
|
3467
|
+
},
|
3468
|
+
"class": this.resolveClassName('picker-panel-body')
|
3433
3469
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
3434
|
-
"class": [this.resolveClassName('picker-panel-content'), this.resolveClassName('picker-panel-content-left')],
|
3435
3470
|
"style": {
|
3436
3471
|
width: "".concat(this.width, "px")
|
3437
|
-
}
|
3472
|
+
},
|
3473
|
+
"class": [this.resolveClassName('picker-panel-content'), this.resolveClassName('picker-panel-content-left')]
|
3438
3474
|
}, [this.showDate ? (0,external_vue_namespaceObject.createVNode)("div", {
|
3439
3475
|
"class": "".concat(this.resolveClassName('time-picker-header'))
|
3440
3476
|
}, [this.leftDatePanelLabel]) : '', (0,external_vue_namespaceObject.createVNode)(time_spinner, {
|
3441
3477
|
"ref": "timeSpinnerRef",
|
3442
|
-
"steps": this.steps,
|
3443
|
-
"showSeconds": this.showSeconds,
|
3444
|
-
"hours": this.value[0] && this.dateStart.getHours(),
|
3445
|
-
"minutes": this.value[0] && this.dateStart.getMinutes(),
|
3446
|
-
"seconds": this.value[0] && this.dateStart.getSeconds(),
|
3447
3478
|
"disabledHours": this.disabledHours,
|
3448
3479
|
"disabledMinutes": this.disabledMinutes,
|
3449
3480
|
"disabledSeconds": this.disabledSeconds,
|
3450
3481
|
"hideDisabledOptions": this.hideDisabledOptions,
|
3482
|
+
"hours": this.value[0] && this.dateStart.getHours(),
|
3483
|
+
"minutes": this.value[0] && this.dateStart.getMinutes(),
|
3484
|
+
"seconds": this.value[0] && this.dateStart.getSeconds(),
|
3485
|
+
"showSeconds": this.showSeconds,
|
3486
|
+
"steps": this.steps,
|
3451
3487
|
"onChange": this.handleStartChange,
|
3452
3488
|
"onPick-click": this.handlePickClick
|
3453
3489
|
}, null)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
3454
|
-
"class": [this.resolveClassName('picker-panel-content'), this.resolveClassName('picker-panel-content-right')],
|
3455
3490
|
"style": {
|
3456
3491
|
width: "".concat(this.width, "px")
|
3457
|
-
}
|
3492
|
+
},
|
3493
|
+
"class": [this.resolveClassName('picker-panel-content'), this.resolveClassName('picker-panel-content-right')]
|
3458
3494
|
}, [this.showDate ? (0,external_vue_namespaceObject.createVNode)("div", {
|
3459
3495
|
"class": this.resolveClassName('time-picker-header')
|
3460
3496
|
}, [this.rightDatePanelLabel]) : '', (0,external_vue_namespaceObject.createVNode)(time_spinner, {
|
3461
3497
|
"ref": "timeSpinnerEndRef",
|
3462
|
-
"steps": this.steps,
|
3463
|
-
"showSeconds": this.showSeconds,
|
3464
|
-
"hours": this.value[1] && this.dateEnd.getHours(),
|
3465
|
-
"minutes": this.value[1] && this.dateEnd.getMinutes(),
|
3466
|
-
"seconds": this.value[1] && this.dateEnd.getSeconds(),
|
3467
3498
|
"disabledHours": this.disabledHours,
|
3468
3499
|
"disabledMinutes": this.disabledMinutes,
|
3469
3500
|
"disabledSeconds": this.disabledSeconds,
|
3470
3501
|
"hideDisabledOptions": this.hideDisabledOptions,
|
3502
|
+
"hours": this.value[1] && this.dateEnd.getHours(),
|
3503
|
+
"minutes": this.value[1] && this.dateEnd.getMinutes(),
|
3504
|
+
"seconds": this.value[1] && this.dateEnd.getSeconds(),
|
3505
|
+
"showSeconds": this.showSeconds,
|
3506
|
+
"steps": this.steps,
|
3471
3507
|
"onChange": this.handleEndChange,
|
3472
3508
|
"onPick-click": this.handlePickClick
|
3473
3509
|
}, null)])])]);
|
@@ -3505,9 +3541,10 @@ function date_range_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
3505
3541
|
* IN THE SOFTWARE.
|
3506
3542
|
*/
|
3507
3543
|
// import type { Placement } from '@popperjs/core';
|
3508
|
-
// import { bkZIndexManager, BKPopover, IBKPopover } from '@bkui-vue/shared';
|
3509
3544
|
|
3510
3545
|
|
3546
|
+
// import { bkZIndexManager, BKPopover, IBKPopover } from '@bkui-vue/shared';
|
3547
|
+
|
3511
3548
|
|
3512
3549
|
|
3513
3550
|
|
@@ -3524,7 +3561,7 @@ var dateRangePanelProps = {
|
|
3524
3561
|
type: String,
|
3525
3562
|
"default": 'date',
|
3526
3563
|
validator: function validator(value) {
|
3527
|
-
var validList = ['year', 'month', 'date', 'daterange', 'datetime', 'datetimerange', 'time', 'timerange'];
|
3564
|
+
var validList = ['year', 'yearrange', 'month', 'monthrange', 'date', 'daterange', 'datetime', 'datetimerange', 'time', 'timerange'];
|
3528
3565
|
if (validList.indexOf(value) < 0) {
|
3529
3566
|
console.error("type property is not valid: '".concat(value, "'"));
|
3530
3567
|
return false;
|
@@ -3612,12 +3649,20 @@ var dateRangePanelProps = {
|
|
3612
3649
|
minDate = _props$modelValue$map2[0],
|
3613
3650
|
maxDate = _props$modelValue$map2[1];
|
3614
3651
|
var leftPanelDate = props.startDate ? props.startDate : minDate;
|
3652
|
+
var rightPanelDate;
|
3653
|
+
if (props.type === 'monthrange') {
|
3654
|
+
rightPanelDate = new Date(leftPanelDate.getFullYear() + 1, leftPanelDate.getMonth(), 1);
|
3655
|
+
} else if (props.type === 'yearrange') {
|
3656
|
+
rightPanelDate = new Date(leftPanelDate.getFullYear() + 10, leftPanelDate.getMonth(), 1);
|
3657
|
+
} else {
|
3658
|
+
rightPanelDate = new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1);
|
3659
|
+
}
|
3615
3660
|
var state = (0,external_vue_namespaceObject.reactive)({
|
3616
3661
|
currentView: props.selectionMode || 'date',
|
3617
3662
|
leftPickerTable: "".concat(props.selectionMode, "-table"),
|
3618
3663
|
rightPickerTable: "".concat(props.selectionMode, "-table"),
|
3619
3664
|
leftPanelDate: leftPanelDate,
|
3620
|
-
rightPanelDate:
|
3665
|
+
rightPanelDate: rightPanelDate,
|
3621
3666
|
rangeState: {
|
3622
3667
|
from: props.modelValue[0],
|
3623
3668
|
to: props.modelValue[1],
|
@@ -3667,11 +3712,13 @@ var dateRangePanelProps = {
|
|
3667
3712
|
}
|
3668
3713
|
if (props.splitPanels) {
|
3669
3714
|
var otherPanel = panel === 'left' ? 'right' : 'left';
|
3670
|
-
if (panel === 'left' && state.leftPanelDate >= state.rightPanelDate) {
|
3671
|
-
changePanelDate(otherPanel, type, 1);
|
3715
|
+
if (panel === 'left' && (state.leftPanelDate >= state.rightPanelDate || Math.floor(state.leftPanelDate.getFullYear() / 10) * 10 === Math.floor(state.rightPanelDate.getFullYear() / 10) * 10)) {
|
3716
|
+
// changePanelDate(otherPanel, type, 1);
|
3717
|
+
changePanelDate(otherPanel, type, state.currentView === 'year' ? 10 : 1);
|
3672
3718
|
}
|
3673
|
-
if (panel === 'right' && state.rightPanelDate <= state.leftPanelDate) {
|
3674
|
-
changePanelDate(otherPanel, type, -1);
|
3719
|
+
if (panel === 'right' && (state.rightPanelDate <= state.leftPanelDate || Math.floor(state.leftPanelDate.getFullYear() / 10) * 10 === Math.floor(state.rightPanelDate.getFullYear() / 10) * 10)) {
|
3720
|
+
// changePanelDate(otherPanel, type, -1);
|
3721
|
+
changePanelDate(otherPanel, type, state.currentView === 'year' ? -10 : -1);
|
3675
3722
|
}
|
3676
3723
|
} else {
|
3677
3724
|
var _otherPanel = panel === 'left' ? 'right' : 'left';
|
@@ -3839,7 +3886,15 @@ var dateRangePanelProps = {
|
|
3839
3886
|
};
|
3840
3887
|
function setPanelDates(leftPanelDate) {
|
3841
3888
|
state.leftPanelDate = leftPanelDate;
|
3842
|
-
|
3889
|
+
// const rightPanelDate = new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1);
|
3890
|
+
var rightPanelDate;
|
3891
|
+
if (props.type === 'monthrange') {
|
3892
|
+
rightPanelDate = new Date(leftPanelDate.getFullYear() + 1, leftPanelDate.getMonth(), 1);
|
3893
|
+
} else if (props.type === 'yearrange') {
|
3894
|
+
rightPanelDate = new Date(leftPanelDate.getFullYear() + 10, leftPanelDate.getMonth(), 1);
|
3895
|
+
} else {
|
3896
|
+
rightPanelDate = new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1);
|
3897
|
+
}
|
3843
3898
|
var splitRightPanelDate = state.dates[1] ? state.dates[1].getTime() : state.dates[1];
|
3844
3899
|
state.rightPanelDate = props.splitPanels ? new Date(Math.max(splitRightPanelDate, rightPanelDate.getTime())) : rightPanelDate;
|
3845
3900
|
}
|
@@ -4019,8 +4074,8 @@ var dateRangePanelProps = {
|
|
4019
4074
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
4020
4075
|
"class": [this.resolveClassName('picker-panel-body'), this.showTime ? this.resolveClassName('picker-panel-body-time') : this.resolveClassName('picker-panel-body-date')]
|
4021
4076
|
}, [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
4022
|
-
"
|
4023
|
-
"
|
4077
|
+
"style": "width: 261px;",
|
4078
|
+
"class": [this.resolveClassName('picker-panel-content'), this.resolveClassName('picker-panel-content-left')]
|
4024
4079
|
}, [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
4025
4080
|
"class": this.resolveClassName('date-picker-header')
|
4026
4081
|
}, [(0,external_vue_namespaceObject.createVNode)("span", {
|
@@ -4050,12 +4105,12 @@ var dateRangePanelProps = {
|
|
4050
4105
|
"onClick": function onClick() {
|
4051
4106
|
return _this.leftDatePanelLabel.labels[0].handler;
|
4052
4107
|
}
|
4053
|
-
}, [this.leftDatePanelLabel.labels[0].label]), [[external_vue_namespaceObject.vShow, this.leftShowLabelFirst]]), this.leftDatePanelView === 'date' ? " ".concat(this.leftDatePanelLabel.separator, " ") : ' ', (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("span", {
|
4108
|
+
}, [this.type === 'yearrange' ? "".concat(Math.floor(this.leftDatePanelLabel.labels[0].label / 10) * 10, " - ").concat(Math.ceil(this.leftDatePanelLabel.labels[0].label / 10) * 10 - 1) : this.leftDatePanelLabel.labels[0].label]), [[external_vue_namespaceObject.vShow, this.leftShowLabelFirst]]), this.leftDatePanelView === 'date' ? " ".concat(this.leftDatePanelLabel.separator, " ") : ' ', (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("span", {
|
4054
4109
|
"class": this.resolveClassName('date-picker-header-label'),
|
4055
4110
|
"onClick": function onClick() {
|
4056
4111
|
return _this.leftDatePanelLabel.labels[1].handler;
|
4057
4112
|
}
|
4058
|
-
}, [this.leftDatePanelLabel.labels[1].label]), [[external_vue_namespaceObject.vShow, this.leftShowLabelSecond]])]) : '', this.splitPanels || this.leftPickerTable !== 'date-table' ? (0,external_vue_namespaceObject.createVNode)("span", {
|
4113
|
+
}, [this.leftDatePanelLabel.labels[1].label]), [[external_vue_namespaceObject.vShow, this.leftShowLabelSecond]])]) : '', this.splitPanels || this.leftPickerTable !== 'date-table' && this.leftPickerTable !== 'month-table' && this.leftPickerTable !== 'year-table' ? (0,external_vue_namespaceObject.createVNode)("span", {
|
4059
4114
|
"class": iconBtnCls('next', '-double'),
|
4060
4115
|
"onClick": function onClick() {
|
4061
4116
|
return _this.nextYear('left');
|
@@ -4081,12 +4136,34 @@ var dateRangePanelProps = {
|
|
4081
4136
|
switch (_this.leftPickerTable) {
|
4082
4137
|
case 'date-table':
|
4083
4138
|
return (0,external_vue_namespaceObject.createVNode)(date_table, {
|
4139
|
+
"disabledDate": _this.disabledDate,
|
4140
|
+
"focusedDate": _this.focusedDate,
|
4141
|
+
"modelValue": _this.preSelecting.left ? [_this.dates[0]] : _this.dates,
|
4142
|
+
"rangeState": _this.rangeState,
|
4084
4143
|
"selectionMode": "range",
|
4085
4144
|
"tableDate": _this.leftPanelDate,
|
4145
|
+
"onChangeRange": _this.handleChangeRange,
|
4146
|
+
"onPick": _this.panelPickerHandlers.left
|
4147
|
+
}, null);
|
4148
|
+
case 'month-table':
|
4149
|
+
return (0,external_vue_namespaceObject.createVNode)(month_table, {
|
4086
4150
|
"disabledDate": _this.disabledDate,
|
4087
|
-
"
|
4151
|
+
"focusedDate": _this.focusedDate,
|
4088
4152
|
"modelValue": _this.preSelecting.left ? [_this.dates[0]] : _this.dates,
|
4153
|
+
"rangeState": _this.rangeState,
|
4154
|
+
"selectionMode": "range",
|
4155
|
+
"tableDate": _this.leftPanelDate,
|
4156
|
+
"onChangeRange": _this.handleChangeRange,
|
4157
|
+
"onPick": _this.panelPickerHandlers.left
|
4158
|
+
}, null);
|
4159
|
+
case 'year-table':
|
4160
|
+
return (0,external_vue_namespaceObject.createVNode)(year_table, {
|
4161
|
+
"disabledDate": _this.disabledDate,
|
4089
4162
|
"focusedDate": _this.focusedDate,
|
4163
|
+
"modelValue": _this.preSelecting.left ? [_this.dates[0]] : _this.dates,
|
4164
|
+
"rangeState": _this.rangeState,
|
4165
|
+
"selectionMode": "range",
|
4166
|
+
"tableDate": _this.leftPanelDate,
|
4090
4167
|
"onChangeRange": _this.handleChangeRange,
|
4091
4168
|
"onPick": _this.panelPickerHandlers.left
|
4092
4169
|
}, null);
|
@@ -4094,11 +4171,11 @@ var dateRangePanelProps = {
|
|
4094
4171
|
return null;
|
4095
4172
|
}
|
4096
4173
|
}() : '']), [[external_vue_namespaceObject.vShow, !this.isTime]]), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
4097
|
-
"
|
4098
|
-
"
|
4174
|
+
"style": "width: 261px;",
|
4175
|
+
"class": [this.resolveClassName('picker-panel-content'), this.resolveClassName('picker-panel-content-right')]
|
4099
4176
|
}, [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
4100
4177
|
"class": this.resolveClassName('date-picker-header')
|
4101
|
-
}, [this.splitPanels || this.rightPickerTable !== 'date-table' ? (0,external_vue_namespaceObject.createVNode)("span", {
|
4178
|
+
}, [this.splitPanels || this.rightPickerTable !== 'date-table' && this.rightPickerTable !== 'month-table' && this.rightPickerTable !== 'year-table' ? (0,external_vue_namespaceObject.createVNode)("span", {
|
4102
4179
|
"class": iconBtnCls('prev', '-double'),
|
4103
4180
|
"onClick": function onClick() {
|
4104
4181
|
return _this.prevYear('right');
|
@@ -4125,7 +4202,7 @@ var dateRangePanelProps = {
|
|
4125
4202
|
"onClick": function onClick() {
|
4126
4203
|
return _this.rightDatePanelLabel.labels[0].handler;
|
4127
4204
|
}
|
4128
|
-
}, [this.rightDatePanelLabel.labels[0].label]), [[external_vue_namespaceObject.vShow, this.rightShowLabelFirst]]), this.rightDatePanelView === 'date' ? " ".concat(this.rightDatePanelLabel.separator, " ") : ' ', (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("span", {
|
4205
|
+
}, [this.type === 'yearrange' ? "".concat(Math.floor(this.rightDatePanelLabel.labels[0].label / 10) * 10, " - ").concat(Math.ceil(this.rightDatePanelLabel.labels[0].label / 10) * 10 - 1) : this.rightDatePanelLabel.labels[0].label]), [[external_vue_namespaceObject.vShow, this.rightShowLabelFirst]]), this.rightDatePanelView === 'date' ? " ".concat(this.rightDatePanelLabel.separator, " ") : ' ', (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("span", {
|
4129
4206
|
"class": this.resolveClassName('date-picker-header-label'),
|
4130
4207
|
"onClick": function onClick() {
|
4131
4208
|
return _this.rightDatePanelLabel.labels[1].handler;
|
@@ -4168,12 +4245,34 @@ var dateRangePanelProps = {
|
|
4168
4245
|
switch (_this.rightPickerTable) {
|
4169
4246
|
case 'date-table':
|
4170
4247
|
return (0,external_vue_namespaceObject.createVNode)(date_table, {
|
4248
|
+
"modelValue": _this.preSelecting.right ? [_this.dates[_this.dates.length - 1]] : _this.dates,
|
4249
|
+
"disabledDate": _this.disabledDate,
|
4250
|
+
"focusedDate": _this.focusedDate,
|
4251
|
+
"rangeState": _this.rangeState,
|
4171
4252
|
"selectionMode": "range",
|
4172
4253
|
"tableDate": _this.rightPanelDate,
|
4254
|
+
"onChangeRange": _this.handleChangeRange,
|
4255
|
+
"onPick": _this.panelPickerHandlers.right
|
4256
|
+
}, null);
|
4257
|
+
case 'month-table':
|
4258
|
+
return (0,external_vue_namespaceObject.createVNode)(month_table, {
|
4259
|
+
"modelValue": _this.preSelecting.right ? [_this.dates[_this.dates.length - 1]] : _this.dates,
|
4173
4260
|
"disabledDate": _this.disabledDate,
|
4261
|
+
"focusedDate": _this.focusedDate,
|
4174
4262
|
"rangeState": _this.rangeState,
|
4263
|
+
"selectionMode": "range",
|
4264
|
+
"tableDate": _this.rightPanelDate,
|
4265
|
+
"onChangeRange": _this.handleChangeRange,
|
4266
|
+
"onPick": _this.panelPickerHandlers.right
|
4267
|
+
}, null);
|
4268
|
+
case 'year-table':
|
4269
|
+
return (0,external_vue_namespaceObject.createVNode)(year_table, {
|
4175
4270
|
"modelValue": _this.preSelecting.right ? [_this.dates[_this.dates.length - 1]] : _this.dates,
|
4271
|
+
"disabledDate": _this.disabledDate,
|
4176
4272
|
"focusedDate": _this.focusedDate,
|
4273
|
+
"rangeState": _this.rangeState,
|
4274
|
+
"selectionMode": "range",
|
4275
|
+
"tableDate": _this.rightPanelDate,
|
4177
4276
|
"onChangeRange": _this.handleChangeRange,
|
4178
4277
|
"onPick": _this.panelPickerHandlers.right
|
4179
4278
|
}, null);
|
@@ -4182,23 +4281,23 @@ var dateRangePanelProps = {
|
|
4182
4281
|
}
|
4183
4282
|
}() : '']), [[external_vue_namespaceObject.vShow, !this.isTime]]), this.isTime ? (0,external_vue_namespaceObject.createVNode)(time_range, {
|
4184
4283
|
"ref": "timePickerRef",
|
4284
|
+
"disabledDate": this.disabledDate,
|
4285
|
+
"format": this.format,
|
4185
4286
|
"selectionMode": this.selectionMode,
|
4186
4287
|
"value": this.dates,
|
4187
|
-
"format": this.format,
|
4188
|
-
"disabledDate": this.disabledDate,
|
4189
4288
|
"onPick": this.handleRangePick,
|
4190
|
-
"onPick-click": this.handlePickClick,
|
4191
4289
|
"onPick-clear": this.handlePickClear,
|
4290
|
+
"onPick-click": this.handlePickClick,
|
4192
4291
|
"onPick-success": this.handlePickSuccess,
|
4193
4292
|
"onPick-toggle-time": this.handleToggleTime
|
4194
4293
|
}, null) : '', this.confirm ? (0,external_vue_namespaceObject.createVNode)(base_confirm, {
|
4195
4294
|
"clearable": this.clearable,
|
4295
|
+
"isTime": this.isTime,
|
4196
4296
|
"showTime": this.showTime,
|
4197
4297
|
"timeDisabled": this.timeDisabled,
|
4198
|
-
"isTime": this.isTime,
|
4199
|
-
"onPick-toggle-time": this.handleToggleTime,
|
4200
4298
|
"onPick-clear": this.handlePickClear,
|
4201
|
-
"onPick-success": this.handlePickSuccess
|
4299
|
+
"onPick-success": this.handlePickSuccess,
|
4300
|
+
"onPick-toggle-time": this.handleToggleTime
|
4202
4301
|
}, this.$slots) : '']), shortcuts]);
|
4203
4302
|
}
|
4204
4303
|
}));
|
@@ -4242,6 +4341,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4242
4341
|
|
4243
4342
|
|
4244
4343
|
|
4344
|
+
// import VueTypes, { toType, toValidableType } from 'vue-types';
|
4245
4345
|
|
4246
4346
|
|
4247
4347
|
|
@@ -4260,6 +4360,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4260
4360
|
emit = _ref.emit;
|
4261
4361
|
var formItem = (0,shared_namespaceObject.useFormItem)();
|
4262
4362
|
var isRange = props.type.includes('range');
|
4363
|
+
var teleportTo = (0,external_vue_namespaceObject.ref)((0,shared_namespaceObject.getFullscreenRoot)());
|
4263
4364
|
var emptyArray = isRange ? [null, null] : [null];
|
4264
4365
|
var initialArr = isRange ? props.value || props.modelValue : [props.value || props.modelValue];
|
4265
4366
|
var initialValue = isAllEmptyArr(initialArr) ? emptyArray : parseDate(props.value || props.modelValue, props.type, props.multiple, props.format);
|
@@ -4303,6 +4404,14 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4303
4404
|
if (_type.match(/^date/)) {
|
4304
4405
|
type = 'date';
|
4305
4406
|
}
|
4407
|
+
// 增加了 monthrange
|
4408
|
+
if (_type.match(/^month/)) {
|
4409
|
+
type = 'month';
|
4410
|
+
}
|
4411
|
+
// 增加了 yearrange
|
4412
|
+
if (_type.match(/^year/)) {
|
4413
|
+
type = 'year';
|
4414
|
+
}
|
4306
4415
|
// return ['year', 'month', 'date', 'time'].indexOf(type) > -1 && type;
|
4307
4416
|
state.selectionMode = ['year', 'month', 'date', 'time'].indexOf(type) > -1 && type;
|
4308
4417
|
return state.selectionMode;
|
@@ -4334,7 +4443,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4334
4443
|
}) : formatDate(publicVModelValue.value, props.type, props.multiple, props.format);
|
4335
4444
|
});
|
4336
4445
|
var panel = (0,external_vue_namespaceObject.computed)(function () {
|
4337
|
-
var isRange = props.type === 'daterange' || props.type === 'datetimerange';
|
4446
|
+
var isRange = props.type === 'daterange' || props.type === 'datetimerange' || props.type === 'monthrange' || props.type === 'yearrange';
|
4338
4447
|
return isRange ? 'DateRangePanel' : 'DatePanel';
|
4339
4448
|
});
|
4340
4449
|
var opened = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -4493,7 +4602,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4493
4602
|
if (state.visible) {
|
4494
4603
|
var _pickerPanelRef$value;
|
4495
4604
|
var pickerPanel = pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value = pickerPanelRef.value) === null || _pickerPanelRef$value === void 0 ? void 0 : _pickerPanelRef$value.$el;
|
4496
|
-
if (e && pickerPanel && pickerPanel.contains(e.target)) {
|
4605
|
+
if (e && pickerPanel !== null && pickerPanel !== void 0 && pickerPanel.contains(e.target)) {
|
4497
4606
|
return;
|
4498
4607
|
}
|
4499
4608
|
state.visible = false;
|
@@ -4575,6 +4684,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4575
4684
|
if (props.readonly) {
|
4576
4685
|
return;
|
4577
4686
|
}
|
4687
|
+
teleportTo.value = (0,shared_namespaceObject.getFullscreenRoot)();
|
4578
4688
|
state.isFocused = true;
|
4579
4689
|
if (e && e.type === 'focus') {
|
4580
4690
|
return;
|
@@ -4760,6 +4870,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4760
4870
|
localReadonly: localReadonly,
|
4761
4871
|
allowCrossDayProp: allowCrossDayProp,
|
4762
4872
|
ownPickerProps: ownPickerProps,
|
4873
|
+
teleportTo: teleportTo,
|
4763
4874
|
pickerDropdownRef: pickerDropdownRef,
|
4764
4875
|
inputRef: inputRef,
|
4765
4876
|
triggerRef: triggerRef,
|
@@ -4796,23 +4907,23 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4796
4907
|
"class": ['icon-wrapper', this.disabled ? 'disabled' : ''],
|
4797
4908
|
"onClick": this.handleIconClick
|
4798
4909
|
}, [this.type === 'time' || this.type === 'timerange' ? timeIcon : dateIcon]), (0,external_vue_namespaceObject.createVNode)("input", {
|
4799
|
-
"type": "text",
|
4800
|
-
"class": [this.resolveClassName('date-picker-editor'), this.readonly ? 'readonly' : '', this.fontSizeCls, this.behavior === 'simplicity' ? 'only-bottom-border' : ''],
|
4801
|
-
"ref": "inputRef",
|
4802
4910
|
"key": this.forceInputRerender,
|
4803
|
-
"
|
4911
|
+
"ref": "inputRef",
|
4912
|
+
"class": [this.resolveClassName('date-picker-editor'), this.readonly ? 'readonly' : '', this.fontSizeCls, this.behavior === 'simplicity' ? 'only-bottom-border' : ''],
|
4804
4913
|
"disabled": this.disabled,
|
4805
4914
|
"placeholder": this.placeholder,
|
4915
|
+
"readonly": this.localReadonly,
|
4916
|
+
"type": "text",
|
4806
4917
|
"value": this.displayValue,
|
4807
|
-
"onFocus": this.handleFocus,
|
4808
|
-
"onClick": this.handleFocus,
|
4809
4918
|
"onBlur": this.handleBlur,
|
4810
|
-
"onKeydown": this.handleKeydown,
|
4811
4919
|
"onChange": this.handleInputChange,
|
4812
|
-
"
|
4920
|
+
"onClick": this.handleFocus,
|
4921
|
+
"onFocus": this.handleFocus,
|
4922
|
+
"onInput": this.handleInputInput,
|
4923
|
+
"onKeydown": this.handleKeydown
|
4813
4924
|
}, null), this.clearable && this.showClose ? (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Close, {
|
4814
|
-
"
|
4815
|
-
"
|
4925
|
+
"class": "clear-action",
|
4926
|
+
"onClick": this.handleClear
|
4816
4927
|
}, null) : '']);
|
4817
4928
|
// const shortcutsSlot = this.hasShortcuts ? { shortcuts: () => this.$slots.shortcuts?.() || null } : {};
|
4818
4929
|
var shortcutsSlot = this.hasShortcuts ? {
|
@@ -4835,8 +4946,8 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4835
4946
|
"onMouseenter": this.handleInputMouseenter,
|
4836
4947
|
"onMouseleave": this.handleInputMouseleave
|
4837
4948
|
}, [(_this$$slots$trigger = (_this$$slots$trigger2 = (_this$$slots2 = this.$slots).trigger) === null || _this$$slots$trigger2 === void 0 ? void 0 : _this$$slots$trigger2.call(_this$$slots2, this.displayValue)) !== null && _this$$slots$trigger !== void 0 ? _this$$slots$trigger : defaultTrigger]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
|
4838
|
-
"
|
4839
|
-
"
|
4949
|
+
"disabled": !this.appendToBody,
|
4950
|
+
"to": this.teleportTo
|
4840
4951
|
}, {
|
4841
4952
|
"default": function _default() {
|
4842
4953
|
return [(0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Transition, {
|
@@ -4844,48 +4955,48 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4844
4955
|
}, {
|
4845
4956
|
"default": function _default() {
|
4846
4957
|
return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)(picker_dropdown, {
|
4847
|
-
"class": [_this.appendToBody ? _this.resolveClassName('date-picker-transfer') : ''],
|
4848
4958
|
"ref": "pickerDropdownRef",
|
4849
|
-
"
|
4850
|
-
"
|
4959
|
+
"class": [_this.appendToBody ? _this.resolveClassName('date-picker-transfer') : ''],
|
4960
|
+
"appendToBody": _this.appendToBody,
|
4851
4961
|
"extPopoverCls": _this.extPopoverCls,
|
4852
|
-
"
|
4962
|
+
"placement": _this.placement,
|
4963
|
+
"triggerRef": _this.triggerRef
|
4853
4964
|
}, {
|
4854
4965
|
"default": function _default() {
|
4855
4966
|
return [_this.hasHeader ? (0,external_vue_namespaceObject.createVNode)("div", {
|
4856
4967
|
"class": [_this.resolveClassName('date-picker-top-wrapper'), _this.headerSlotCls]
|
4857
4968
|
}, [(_this$$slots$header = (_this$$slots$header2 = (_this$$slots3 = _this.$slots).header) === null || _this$$slots$header2 === void 0 ? void 0 : _this$$slots$header2.call(_this$$slots3)) !== null && _this$$slots$header !== void 0 ? _this$$slots$header : null]) : null, _this.panel === 'DateRangePanel' ? (0,external_vue_namespaceObject.createVNode)(date_range, {
|
4858
4969
|
"ref": "pickerPanelRef",
|
4859
|
-
"type": _this.type,
|
4860
|
-
"showTime": _this.type === 'datetime' || _this.type === 'datetimerange',
|
4861
4970
|
"confirm": _this.isConfirm,
|
4862
|
-
"
|
4863
|
-
"
|
4971
|
+
"disabledDate": _this.disabledDate,
|
4972
|
+
"focusedDate": _this.focusedDate,
|
4864
4973
|
"modelValue": _this.internalValue,
|
4865
4974
|
"selectionMode": _this.selectionMode,
|
4975
|
+
"shortcutClose": _this.shortcutClose,
|
4976
|
+
"shortcutSelectedIndex": _this.shortcutSelectedIndex,
|
4977
|
+
"shortcuts": _this.shortcuts,
|
4978
|
+
"showTime": _this.type === 'datetime' || _this.type === 'datetimerange',
|
4866
4979
|
"startDate": _this.startDate,
|
4867
|
-
"disabledDate": _this.disabledDate,
|
4868
|
-
"focusedDate": _this.focusedDate,
|
4869
4980
|
"timePickerOptions": _this.timePickerOptions,
|
4981
|
+
"type": _this.type,
|
4870
4982
|
"onPick": _this.onPick,
|
4871
4983
|
"onPick-clear": _this.handleClear,
|
4984
|
+
"onPick-first": _this.onPickFirst,
|
4872
4985
|
"onPick-success": _this.onPickSuccess,
|
4873
|
-
"onSelection-mode-change": _this.onSelectionModeChange
|
4874
|
-
"shortcutSelectedIndex": _this.shortcutSelectedIndex,
|
4875
|
-
"onPick-first": _this.onPickFirst
|
4986
|
+
"onSelection-mode-change": _this.onSelectionModeChange
|
4876
4987
|
}, slots) : (0,external_vue_namespaceObject.createVNode)(date, {
|
4877
4988
|
"ref": "pickerPanelRef",
|
4878
4989
|
"clearable": _this.clearable,
|
4879
|
-
"showTime": _this.type === 'datetime' || _this.type === 'datetimerange',
|
4880
4990
|
"confirm": _this.isConfirm,
|
4881
|
-
"
|
4991
|
+
"disabledDate": _this.disabledDate,
|
4992
|
+
"focusedDate": _this.focusedDate,
|
4993
|
+
"modelValue": _this.internalValue,
|
4882
4994
|
"multiple": _this.multiple,
|
4883
|
-
"shortcutClose": _this.shortcutClose,
|
4884
4995
|
"selectionMode": _this.selectionMode,
|
4885
|
-
"
|
4996
|
+
"shortcutClose": _this.shortcutClose,
|
4997
|
+
"shortcuts": _this.shortcuts,
|
4998
|
+
"showTime": _this.type === 'datetime' || _this.type === 'datetimerange',
|
4886
4999
|
"startDate": _this.startDate,
|
4887
|
-
"disabledDate": _this.disabledDate,
|
4888
|
-
"focusedDate": _this.focusedDate,
|
4889
5000
|
"timePickerOptions": _this.timePickerOptions,
|
4890
5001
|
"onPick": _this.onPick,
|
4891
5002
|
"onPick-clear": _this.handleClear,
|
@@ -4942,6 +5053,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4942
5053
|
|
4943
5054
|
|
4944
5055
|
|
5056
|
+
// import VueTypes, { toType, toValidableType } from 'vue-types';
|
4945
5057
|
|
4946
5058
|
|
4947
5059
|
|
@@ -4960,6 +5072,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4960
5072
|
emit = _ref.emit;
|
4961
5073
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
4962
5074
|
resolveClassName = _usePrefix.resolveClassName;
|
5075
|
+
var teleportTo = (0,external_vue_namespaceObject.ref)((0,shared_namespaceObject.getFullscreenRoot)());
|
4963
5076
|
var formItem = (0,shared_namespaceObject.useFormItem)();
|
4964
5077
|
var isRange = props.type.includes('range');
|
4965
5078
|
var emptyArray = isRange ? [null, null] : [null];
|
@@ -5098,10 +5211,9 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5098
5211
|
return panel.value === 'RangeTimePickerPanel' ? props.allowCrossDay : false;
|
5099
5212
|
});
|
5100
5213
|
var inputRef = (0,external_vue_namespaceObject.ref)(null);
|
5101
|
-
|
5102
|
-
|
5103
|
-
|
5104
|
-
};
|
5214
|
+
// const inputFocus = () => {
|
5215
|
+
// inputRef?.value?.focus();
|
5216
|
+
// };
|
5105
5217
|
var _getCurrentInstance = (0,external_vue_namespaceObject.getCurrentInstance)(),
|
5106
5218
|
proxy = _getCurrentInstance.proxy;
|
5107
5219
|
var pickerDropdownRef = (0,external_vue_namespaceObject.ref)(null);
|
@@ -5169,12 +5281,14 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5169
5281
|
state.visible = props.open;
|
5170
5282
|
}
|
5171
5283
|
// this.$on('focus-input', () => this.focus())
|
5172
|
-
|
5173
|
-
|
5174
|
-
|
5175
|
-
|
5176
|
-
|
5177
|
-
|
5284
|
+
// provide(datePickerKey, {
|
5285
|
+
// props,
|
5286
|
+
// focus: () => inputFocus(),
|
5287
|
+
// });
|
5288
|
+
});
|
5289
|
+
(0,external_vue_namespaceObject.provide)(timePickerKey, {
|
5290
|
+
panelDate: state.focusedDate,
|
5291
|
+
parentName: proxy.$options.name
|
5178
5292
|
});
|
5179
5293
|
var pickerPanelRef = (0,external_vue_namespaceObject.ref)(null);
|
5180
5294
|
var handleClose = function handleClose(e) {
|
@@ -5190,7 +5304,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5190
5304
|
if (state.visible) {
|
5191
5305
|
var _pickerPanelRef$value;
|
5192
5306
|
var pickerPanel = pickerPanelRef === null || pickerPanelRef === void 0 || (_pickerPanelRef$value = pickerPanelRef.value) === null || _pickerPanelRef$value === void 0 ? void 0 : _pickerPanelRef$value.$el;
|
5193
|
-
if (e && pickerPanel && pickerPanel.contains(e.target)) {
|
5307
|
+
if (e && pickerPanel !== null && pickerPanel !== void 0 && pickerPanel.contains(e.target)) {
|
5194
5308
|
return;
|
5195
5309
|
}
|
5196
5310
|
state.visible = false;
|
@@ -5202,9 +5316,9 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5202
5316
|
state.disableClickOutSide = false;
|
5203
5317
|
};
|
5204
5318
|
var handleIconClick = function handleIconClick() {
|
5205
|
-
var _inputRef$
|
5206
|
-
inputRef === null || inputRef === void 0 || (_inputRef$
|
5207
|
-
inputRef === null || inputRef === void 0 || (_inputRef$
|
5319
|
+
var _inputRef$value, _inputRef$value2;
|
5320
|
+
inputRef === null || inputRef === void 0 || (_inputRef$value = inputRef.value) === null || _inputRef$value === void 0 || _inputRef$value.focus();
|
5321
|
+
inputRef === null || inputRef === void 0 || (_inputRef$value2 = inputRef.value) === null || _inputRef$value2 === void 0 || _inputRef$value2.click();
|
5208
5322
|
};
|
5209
5323
|
var handleInputMouseenter = function handleInputMouseenter() {
|
5210
5324
|
if (props.readonly || props.disabled) {
|
@@ -5230,8 +5344,8 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5230
5344
|
emit('change', publicStringValue.value, type);
|
5231
5345
|
// this.dispatch('bk-form-item', 'form-change');
|
5232
5346
|
if (props.type.indexOf('time') < 0) {
|
5233
|
-
var _inputRef$
|
5234
|
-
inputRef === null || inputRef === void 0 || (_inputRef$
|
5347
|
+
var _inputRef$value3;
|
5348
|
+
inputRef === null || inputRef === void 0 || (_inputRef$value3 = inputRef.value) === null || _inputRef$value3 === void 0 || _inputRef$value3.blur();
|
5235
5349
|
}
|
5236
5350
|
});
|
5237
5351
|
};
|
@@ -5272,6 +5386,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5272
5386
|
if (props.readonly) {
|
5273
5387
|
return;
|
5274
5388
|
}
|
5389
|
+
teleportTo.value = (0,shared_namespaceObject.getFullscreenRoot)();
|
5275
5390
|
state.isFocused = true;
|
5276
5391
|
if (e && e.type === 'focus') {
|
5277
5392
|
return;
|
@@ -5380,14 +5495,14 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5380
5495
|
}
|
5381
5496
|
};
|
5382
5497
|
var onPickSuccess = function onPickSuccess() {
|
5383
|
-
var _inputRef$
|
5498
|
+
var _inputRef$value4;
|
5384
5499
|
state.visible = false;
|
5385
5500
|
// 点击 shortcuts 会关闭弹层时,如果不在 nextTick 里触发 pick-success,那么会导致触发 pick-success 的时候,
|
5386
5501
|
// v-model 的值还是之前的值
|
5387
5502
|
(0,external_vue_namespaceObject.nextTick)(function () {
|
5388
5503
|
emit('pick-success');
|
5389
5504
|
});
|
5390
|
-
inputRef === null || inputRef === void 0 || (_inputRef$
|
5505
|
+
inputRef === null || inputRef === void 0 || (_inputRef$value4 = inputRef.value) === null || _inputRef$value4 === void 0 || _inputRef$value4.blur();
|
5391
5506
|
reset();
|
5392
5507
|
};
|
5393
5508
|
var onPick = function onPick(_dates) {
|
@@ -5459,6 +5574,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5459
5574
|
inputRef: inputRef,
|
5460
5575
|
triggerRef: triggerRef,
|
5461
5576
|
pickerPanelRef: pickerPanelRef,
|
5577
|
+
teleportTo: teleportTo,
|
5462
5578
|
handleClose: handleClose,
|
5463
5579
|
handleIconClick: handleIconClick,
|
5464
5580
|
handleInputMouseenter: handleInputMouseenter,
|
@@ -5490,23 +5606,23 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5490
5606
|
"class": ['icon-wrapper', this.disabled ? 'disabled' : ''],
|
5491
5607
|
"onClick": this.handleIconClick
|
5492
5608
|
}, [this.type === 'time' || this.type === 'timerange' ? timeIcon : dateIcon]), (0,external_vue_namespaceObject.createVNode)("input", {
|
5493
|
-
"type": "text",
|
5494
|
-
"class": [this.resolveClassName('date-picker-editor'), this.readonly ? 'readonly' : '', this.fontSizeCls, this.behavior === 'simplicity' ? 'only-bottom-border' : ''],
|
5495
|
-
"ref": "inputRef",
|
5496
5609
|
"key": this.forceInputRerender,
|
5497
|
-
"
|
5610
|
+
"ref": "inputRef",
|
5611
|
+
"class": [this.resolveClassName('date-picker-editor'), this.readonly ? 'readonly' : '', this.fontSizeCls, this.behavior === 'simplicity' ? 'only-bottom-border' : ''],
|
5498
5612
|
"disabled": this.disabled,
|
5499
5613
|
"placeholder": this.placeholder,
|
5614
|
+
"readonly": this.localReadonly,
|
5615
|
+
"type": "text",
|
5500
5616
|
"value": this.displayValue,
|
5501
|
-
"onFocus": this.handleFocus,
|
5502
|
-
"onClick": this.handleFocus,
|
5503
5617
|
"onBlur": this.handleBlur,
|
5504
|
-
"onKeydown": this.handleKeydown,
|
5505
5618
|
"onChange": this.handleInputChange,
|
5506
|
-
"
|
5619
|
+
"onClick": this.handleFocus,
|
5620
|
+
"onFocus": this.handleFocus,
|
5621
|
+
"onInput": this.handleInputInput,
|
5622
|
+
"onKeydown": this.handleKeydown
|
5507
5623
|
}, null), this.clearable && this.showClose ? (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Close, {
|
5508
|
-
"
|
5509
|
-
"
|
5624
|
+
"class": "clear-action",
|
5625
|
+
"onClick": this.handleClear
|
5510
5626
|
}, null) : '']);
|
5511
5627
|
var shortcutsSlot = this.hasShortcuts ? {
|
5512
5628
|
shortcuts: function shortcuts() {
|
@@ -5522,8 +5638,8 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5522
5638
|
"onMouseenter": this.handleInputMouseenter,
|
5523
5639
|
"onMouseleave": this.handleInputMouseleave
|
5524
5640
|
}, [(_this$$slots$trigger = (_this$$slots$trigger2 = (_this$$slots2 = this.$slots).trigger) === null || _this$$slots$trigger2 === void 0 ? void 0 : _this$$slots$trigger2.call(_this$$slots2, this.displayValue)) !== null && _this$$slots$trigger !== void 0 ? _this$$slots$trigger : defaultTrigger]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
|
5525
|
-
"
|
5526
|
-
"
|
5641
|
+
"disabled": !this.appendToBody,
|
5642
|
+
"to": this.teleportTo
|
5527
5643
|
}, {
|
5528
5644
|
"default": function _default() {
|
5529
5645
|
return [(0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Transition, {
|
@@ -5531,12 +5647,12 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5531
5647
|
}, {
|
5532
5648
|
"default": function _default() {
|
5533
5649
|
return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)(picker_dropdown, {
|
5534
|
-
"class": [_this.appendToBody ? _this.resolveClassName('date-picker-transfer') : ''],
|
5535
5650
|
"ref": "pickerDropdownRef",
|
5536
|
-
"
|
5537
|
-
"placement": _this.placement,
|
5538
|
-
"extPopoverCls": _this.extPopoverCls,
|
5651
|
+
"class": [_this.appendToBody ? _this.resolveClassName('date-picker-transfer') : ''],
|
5539
5652
|
"appendToBody": _this.appendToBody,
|
5653
|
+
"extPopoverCls": _this.extPopoverCls,
|
5654
|
+
"placement": _this.placement,
|
5655
|
+
"triggerRef": _this.triggerRef,
|
5540
5656
|
"onClick": _this.handleTransferClick
|
5541
5657
|
}, {
|
5542
5658
|
"default": function _default() {
|
@@ -5544,38 +5660,38 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5544
5660
|
"class": [_this.resolveClassName('date-picker-top-wrapper'), _this.headerSlotCls]
|
5545
5661
|
}, [(_this$$slots$header = (_this$$slots$header2 = (_this$$slots3 = _this.$slots).header) === null || _this$$slots$header2 === void 0 ? void 0 : _this$$slots$header2.call(_this$$slots3)) !== null && _this$$slots$header !== void 0 ? _this$$slots$header : null]) : null, _this.panel === 'RangeTimePickerPanel' ? (0,external_vue_namespaceObject.createVNode)(time_range, {
|
5546
5662
|
"ref": "pickerPanelRef",
|
5663
|
+
"allowCrossDay": _this.allowCrossDayProp,
|
5547
5664
|
"clearable": _this.clearable,
|
5548
|
-
"
|
5665
|
+
"disabledDate": _this.disabledDate,
|
5666
|
+
"disabledHours": _this.ownPickerProps.disabledHours,
|
5667
|
+
"disabledMinutes": _this.ownPickerProps.disabledMinutes,
|
5668
|
+
"disabledSeconds": _this.ownPickerProps.disabledSeconds,
|
5669
|
+
"format": _this.format,
|
5549
5670
|
"multiple": _this.multiple,
|
5550
5671
|
"shortcutClose": _this.shortcutClose,
|
5551
|
-
"
|
5672
|
+
"shortcuts": _this.shortcuts,
|
5552
5673
|
"startDate": _this.startDate,
|
5553
|
-
"
|
5674
|
+
"value": _this.internalValue,
|
5554
5675
|
"onPick": _this.onPick,
|
5555
5676
|
"onPick-clear": _this.handleClear,
|
5556
|
-
"onPick-success": _this.onPickSuccess
|
5557
|
-
"disabledHours": _this.ownPickerProps.disabledHours,
|
5558
|
-
"disabledMinutes": _this.ownPickerProps.disabledMinutes,
|
5559
|
-
"disabledSeconds": _this.ownPickerProps.disabledSeconds,
|
5560
|
-
"allowCrossDay": _this.allowCrossDayProp,
|
5561
|
-
"format": _this.format
|
5677
|
+
"onPick-success": _this.onPickSuccess
|
5562
5678
|
}, shortcutsSlot) : (0,external_vue_namespaceObject.createVNode)(time, {
|
5563
5679
|
"ref": "pickerPanelRef",
|
5564
5680
|
"clearable": _this.clearable,
|
5565
5681
|
"confirm": _this.isConfirm,
|
5566
|
-
"
|
5682
|
+
"disabledDate": _this.disabledDate,
|
5683
|
+
"disabledHours": _this.ownPickerProps.disabledHours,
|
5684
|
+
"disabledMinutes": _this.ownPickerProps.disabledMinutes,
|
5685
|
+
"disabledSeconds": _this.ownPickerProps.disabledSeconds,
|
5686
|
+
"format": _this.format,
|
5567
5687
|
"multiple": _this.multiple,
|
5568
5688
|
"shortcutClose": _this.shortcutClose,
|
5569
|
-
"
|
5689
|
+
"shortcuts": _this.shortcuts,
|
5570
5690
|
"startDate": _this.startDate,
|
5571
|
-
"
|
5691
|
+
"value": _this.internalValue,
|
5572
5692
|
"onPick": _this.onPick,
|
5573
5693
|
"onPick-clear": _this.handleClear,
|
5574
|
-
"onPick-success": _this.onPickSuccess
|
5575
|
-
"disabledHours": _this.ownPickerProps.disabledHours,
|
5576
|
-
"disabledMinutes": _this.ownPickerProps.disabledMinutes,
|
5577
|
-
"disabledSeconds": _this.ownPickerProps.disabledSeconds,
|
5578
|
-
"format": _this.format
|
5694
|
+
"onPick-success": _this.onPickSuccess
|
5579
5695
|
}, shortcutsSlot), _this.hasFooter ? (0,external_vue_namespaceObject.createVNode)("div", {
|
5580
5696
|
"class": [_this.resolveClassName('date-picker-footer-wrapper'), _this.footerSlotCls]
|
5581
5697
|
}, [(_this$$slots$footer = (_this$$slots$footer2 = (_this$$slots4 = _this.$slots).footer) === null || _this$$slots$footer2 === void 0 ? void 0 : _this$$slots$footer2.call(_this$$slots4)) !== null && _this$$slots$footer !== void 0 ? _this$$slots$footer : null]) : null];
|