bkui-vue 1.0.3-beta.9 → 2.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +71 -73
- package/dist/index.esm.js +20956 -18684
- package/dist/index.umd.js +71 -73
- 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/alert/alert.variable.css +3 -0
- package/lib/backtop/backtop.variable.css +3 -0
- package/lib/badge/badge.variable.css +3 -0
- package/lib/breadcrumb/breadcrumb.variable.css +3 -0
- package/lib/button/button.variable.css +3 -0
- package/lib/card/card.variable.css +3 -0
- package/lib/cascader/cascader.variable.css +3 -0
- package/lib/checkbox/checkbox.variable.css +3 -0
- package/lib/checkbox/index.js +4 -4
- package/lib/code-diff/code-diff.variable.css +3 -0
- 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 +9 -1
- package/lib/collapse/props.d.ts +8 -0
- package/lib/collapse-transition/collapse-transition.variable.css +3 -0
- package/lib/color-picker/color-picker.variable.css +3 -0
- package/lib/components.d.ts +2 -0
- package/lib/components.js +3 -1
- 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 +4 -0
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/container.variable.css +3 -0
- package/lib/date-picker/base/month-table.d.ts +2 -2
- 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 +70 -32
- package/lib/date-picker/interface.d.ts +1 -1
- package/lib/date-picker/time-picker.d.ts +1 -0
- package/lib/date-picker/utils.d.ts +4 -0
- package/lib/dialog/dialog.css +176 -150
- package/lib/dialog/dialog.d.ts +40 -109
- package/lib/dialog/dialog.less +51 -124
- package/lib/dialog/dialog.variable.css +179 -150
- package/lib/dialog/index.d.ts +99 -263
- package/lib/dialog/index.js +244 -246
- package/lib/dialog/props.d.ts +10 -35
- package/lib/directives/index.js +0 -1
- package/lib/divider/divider.variable.css +3 -0
- package/lib/dropdown/dropdown.css +3 -1
- package/lib/dropdown/dropdown.variable.css +6 -1
- package/lib/exception/exception.variable.css +3 -0
- package/lib/fixed-navbar/fixed-navbar.variable.css +3 -0
- package/lib/form/form.variable.css +3 -0
- package/lib/form/index.js +3 -1
- 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 +1 -0
- 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.variable.css +3 -0
- package/lib/image/image.variable.css +3 -0
- package/lib/image/index.js +5 -2
- 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 +18 -16
- 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.js +7 -1
- package/lib/input/input.variable.css +3 -0
- package/lib/link/link.variable.css +3 -0
- package/lib/loading/loading.variable.css +3 -0
- package/lib/locale/index.js +4 -2
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/menu.variable.css +3 -0
- package/lib/menu/submenu.variable.css +3 -0
- package/lib/message/message.variable.css +3 -0
- package/lib/modal/hooks.d.ts +6 -0
- package/lib/modal/index.d.ts +41 -309
- package/lib/modal/index.js +285 -671
- package/lib/modal/mask.d.ts +6 -0
- package/lib/modal/modal.css +155 -76
- package/lib/modal/modal.d.ts +18 -116
- package/lib/modal/modal.less +107 -55
- package/lib/modal/modal.variable.css +158 -76
- package/lib/modal/props.mixin.d.ts +5 -41
- package/lib/navigation/navigation.variable.css +3 -0
- package/lib/notify/notify.variable.css +3 -0
- package/lib/overflow-title/index.js +46 -52
- package/lib/pagination/index.js +2 -1
- package/lib/pagination/pagination.variable.css +3 -0
- package/lib/plugin-popover/index.d.ts +1 -1
- package/lib/plugin-popover/index.js +45 -26
- package/lib/pop-confirm/index.js +8 -5
- package/lib/pop-confirm/pop-confirm.variable.css +3 -0
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.js +45 -26
- package/lib/popover/plugin-popover.d.ts +4 -1
- package/lib/popover/popover.css +3 -1
- package/lib/popover/popover.less +4 -1
- package/lib/popover/popover.variable.css +6 -1
- package/lib/preset.d.ts +2 -0
- package/lib/process/process.variable.css +3 -0
- package/lib/progress/progress.variable.css +3 -0
- package/lib/radio/index.d.ts +29 -0
- package/lib/radio/index.js +49 -26
- 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/rate/rate.variable.css +3 -0
- package/lib/rate/star.variable.css +3 -0
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.variable.css +3 -0
- package/lib/scrollbar/index.d.ts +15 -0
- package/lib/scrollbar/index.js +18763 -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/scrollbar/scrollbar.variable.css +204 -0
- package/lib/search-select/index.d.ts +375 -16
- package/lib/search-select/index.js +701 -366
- package/lib/search-select/input.d.ts +14 -5
- 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 +116 -6
- package/lib/search-select/utils.d.ts +19 -6
- package/lib/select/index.d.ts +124 -6
- package/lib/select/index.js +1336 -72
- 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 +55 -12
- package/lib/select/select.d.ts +50 -2
- package/lib/select/select.less +69 -19
- package/lib/select/select.variable.css +58 -12
- package/lib/select/selectTagInput.d.ts +7 -0
- package/lib/select/type.d.ts +2 -3
- package/lib/shared/index.d.ts +0 -1
- package/lib/shared/index.js +70 -50
- package/lib/shared/utils.d.ts +12 -0
- package/lib/shared/vue-types.d.ts +5 -0
- package/lib/sideslider/index.d.ts +55 -185
- package/lib/sideslider/index.js +81 -55
- package/lib/sideslider/sideslider.css +26 -90
- package/lib/sideslider/sideslider.d.ts +25 -87
- 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 +45 -5
- 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/steps.variable.css +3 -0
- 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/swiper.variable.css +3 -0
- package/lib/switcher/switcher.variable.css +3 -0
- 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 +7 -17
- package/lib/table/const.d.ts +4 -4
- package/lib/table/index.d.ts +29 -64
- package/lib/table/index.js +18068 -613
- 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 +11 -0
- package/lib/table/props.d.ts +17 -7
- package/lib/table/table.css +112 -58
- package/lib/table/table.d.ts +11 -0
- package/lib/table/table.less +46 -58
- package/lib/table/table.variable.css +115 -58
- package/lib/table/use-attributes.d.ts +6 -43
- package/lib/table/use-column.d.ts +9 -10
- package/lib/table/use-common.d.ts +1 -1
- package/lib/table/use-render.d.ts +1 -1
- package/lib/table/utils.d.ts +1 -1
- package/lib/table-column/index.d.ts +92 -266
- package/lib/table-column/index.js +24 -98
- package/lib/tag/tag.variable.css +3 -0
- package/lib/tag-input/index.d.ts +4 -4
- package/lib/tag-input/tag-input.d.ts +2 -2
- package/lib/tag-input/tag-input.variable.css +3 -0
- package/lib/tag-input/tag-props.d.ts +1 -1
- 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 +54 -65
- package/lib/timeline/timeline.d.ts +46 -29
- package/lib/timeline/timeline.variable.css +3 -0
- package/lib/transfer/transfer.variable.css +3 -0
- package/lib/tree/constant.d.ts +3 -1
- package/lib/tree/index.d.ts +44 -0
- package/lib/tree/index.js +17548 -25
- package/lib/tree/props.d.ts +18 -0
- package/lib/tree/tree.css +76 -2
- package/lib/tree/tree.d.ts +28 -2
- package/lib/tree/tree.variable.css +79 -2
- package/lib/tree/use-intersection-observer.d.ts +27 -0
- package/lib/tree/use-node-attribute.d.ts +9 -0
- package/lib/upload/index.d.ts +12 -0
- package/lib/upload/index.js +21 -30
- package/lib/upload/props.d.ts +3 -0
- package/lib/upload/upload-trigger.d.ts +6 -0
- package/lib/upload/upload.d.ts +6 -0
- package/lib/upload/upload.variable.css +3 -0
- 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 +1 -1
- 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, ["resolveClassName"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName, ["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 });
|
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, ["resolveClassName"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName, ["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";
|
@@ -442,25 +442,7 @@ 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
|
*/
|
@@ -1105,6 +1087,10 @@ var typeValueResolver = {
|
|
1105
1087
|
return src_fecha.parse(text, format || 'yyyy-MM-dd');
|
1106
1088
|
}
|
1107
1089
|
},
|
1090
|
+
monthrange: {
|
1091
|
+
formatter: rangeFormatter,
|
1092
|
+
parser: rangeParser
|
1093
|
+
},
|
1108
1094
|
year: {
|
1109
1095
|
formatter: function formatter(value, format) {
|
1110
1096
|
return dateFormat(value, format);
|
@@ -1205,6 +1191,7 @@ var extractTime = function extractTime(date) {
|
|
1205
1191
|
var DEFAULT_FORMATS = {
|
1206
1192
|
date: 'yyyy-MM-dd',
|
1207
1193
|
month: 'yyyy-MM',
|
1194
|
+
monthrange: 'yyyy-MM',
|
1208
1195
|
year: 'yyyy',
|
1209
1196
|
datetime: 'yyyy-MM-dd HH:mm:ss',
|
1210
1197
|
time: 'HH:mm:ss',
|
@@ -1581,6 +1568,7 @@ var dateTableProps = {
|
|
1581
1568
|
;// CONCATENATED MODULE: ../../packages/date-picker/src/base/month-table.tsx
|
1582
1569
|
|
1583
1570
|
|
1571
|
+
|
1584
1572
|
/*
|
1585
1573
|
* Tencent is pleased to support the open source community by making
|
1586
1574
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -1653,7 +1641,7 @@ var monthTableProps = {
|
|
1653
1641
|
/* harmony default export */ const month_table = ((0,external_vue_namespaceObject.defineComponent)({
|
1654
1642
|
name: 'MonthTable',
|
1655
1643
|
props: monthTableProps,
|
1656
|
-
emits: ['pick', 'pick-click', '
|
1644
|
+
emits: ['pick', 'pick-click', 'changeRange'],
|
1657
1645
|
setup: function setup(props, _ref) {
|
1658
1646
|
var emit = _ref.emit;
|
1659
1647
|
var dates = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -1663,6 +1651,7 @@ var monthTableProps = {
|
|
1663
1651
|
var rangeSelecting = selectionMode === 'range' && rangeState.selecting;
|
1664
1652
|
return rangeSelecting ? [rangeState.from] : modelValue;
|
1665
1653
|
});
|
1654
|
+
var isRange = props.selectionMode === 'range';
|
1666
1655
|
var cells = (0,external_vue_namespaceObject.computed)(function () {
|
1667
1656
|
var cells = [];
|
1668
1657
|
var cellTmpl = {
|
@@ -1675,13 +1664,23 @@ var monthTableProps = {
|
|
1675
1664
|
return clearHours(new Date(date.getFullYear(), date.getMonth(), 1));
|
1676
1665
|
});
|
1677
1666
|
var focusedDate = clearHours(new Date(props.focusedDate.getFullYear(), props.focusedDate.getMonth(), 1));
|
1667
|
+
var _dates$value$map = dates.value.map(clearHours),
|
1668
|
+
_dates$value$map2 = _slicedToArray(_dates$value$map, 2),
|
1669
|
+
minDay = _dates$value$map2[0],
|
1670
|
+
maxDay = _dates$value$map2[1];
|
1671
|
+
var rangeStart = props.rangeState.from && clearHours(props.rangeState.from);
|
1672
|
+
var rangeEnd = props.rangeState.to && clearHours(props.rangeState.to);
|
1678
1673
|
for (var i = 0; i < 12; i++) {
|
1679
1674
|
var cell = JSON.parse(JSON.stringify(cellTmpl));
|
1680
1675
|
cell.date = new Date(tableYear, i, 1);
|
1681
1676
|
cell.text = tCell(i + 1);
|
1682
1677
|
var day = clearHours(cell.date);
|
1683
|
-
|
1678
|
+
var time = cell.date && clearHours(cell.date);
|
1679
|
+
cell.disabled = typeof props.disabledDate === 'function' && props.disabledDate(cell.date);
|
1684
1680
|
cell.selected = selectedDays.includes(day);
|
1681
|
+
cell.range = isRange && isInRange(time, rangeStart, rangeEnd);
|
1682
|
+
cell.start = isRange && time === minDay;
|
1683
|
+
cell.end = isRange && time === maxDay;
|
1685
1684
|
cell.focused = day === focusedDate;
|
1686
1685
|
cells.push(cell);
|
1687
1686
|
}
|
@@ -1693,7 +1692,12 @@ var monthTableProps = {
|
|
1693
1692
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1694
1693
|
resolveClassName = _usePrefix.resolveClassName;
|
1695
1694
|
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)
|
1695
|
+
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) // resolveClassName('date-picker-cells-cell'),
|
1696
|
+
// {
|
1697
|
+
// [resolveClassName('date-picker-cells-cell-today')]: cell.type === 'today',
|
1698
|
+
// [resolveClassName('date-picker-cells-cell-range')]: cell.range && !cell.start && !cell.end,
|
1699
|
+
// },
|
1700
|
+
];
|
1697
1701
|
};
|
1698
1702
|
var handleClick = function handleClick(cell) {
|
1699
1703
|
if (cell.disabled || cell.type === 'weekLabel') {
|
@@ -1711,7 +1715,7 @@ var monthTableProps = {
|
|
1711
1715
|
return;
|
1712
1716
|
}
|
1713
1717
|
var newDate = cell.date;
|
1714
|
-
emit('
|
1718
|
+
emit('changeRange', newDate);
|
1715
1719
|
};
|
1716
1720
|
return {
|
1717
1721
|
cells: cells,
|
@@ -1938,7 +1942,7 @@ var datePickerProps = {
|
|
1938
1942
|
type: String,
|
1939
1943
|
"default": 'date',
|
1940
1944
|
validator: function validator(value) {
|
1941
|
-
var validList = ['year', 'month', 'date', 'daterange', 'datetime', 'datetimerange', 'time', 'timerange'];
|
1945
|
+
var validList = ['year', 'month', 'monthrange', 'date', 'daterange', 'datetime', 'datetimerange', 'time', 'timerange'];
|
1942
1946
|
if (validList.indexOf(value) < 0) {
|
1943
1947
|
console.error("type property is not valid: '".concat(value, "'"));
|
1944
1948
|
return false;
|
@@ -3514,6 +3518,7 @@ function date_range_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
3514
3518
|
|
3515
3519
|
|
3516
3520
|
|
3521
|
+
|
3517
3522
|
// import MonthTable from '../base/month-table';
|
3518
3523
|
// import YearTable from '../base/year-table';
|
3519
3524
|
var dateRangePanelProps = {
|
@@ -3524,7 +3529,7 @@ var dateRangePanelProps = {
|
|
3524
3529
|
type: String,
|
3525
3530
|
"default": 'date',
|
3526
3531
|
validator: function validator(value) {
|
3527
|
-
var validList = ['year', 'month', 'date', 'daterange', 'datetime', 'datetimerange', 'time', 'timerange'];
|
3532
|
+
var validList = ['year', 'month', 'monthrange', 'date', 'daterange', 'datetime', 'datetimerange', 'time', 'timerange'];
|
3528
3533
|
if (validList.indexOf(value) < 0) {
|
3529
3534
|
console.error("type property is not valid: '".concat(value, "'"));
|
3530
3535
|
return false;
|
@@ -3612,12 +3617,13 @@ var dateRangePanelProps = {
|
|
3612
3617
|
minDate = _props$modelValue$map2[0],
|
3613
3618
|
maxDate = _props$modelValue$map2[1];
|
3614
3619
|
var leftPanelDate = props.startDate ? props.startDate : minDate;
|
3620
|
+
var rightPanelDate = props.type === 'monthrange' ? new Date(leftPanelDate.getFullYear() + 1, leftPanelDate.getMonth(), 1) : new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1);
|
3615
3621
|
var state = (0,external_vue_namespaceObject.reactive)({
|
3616
3622
|
currentView: props.selectionMode || 'date',
|
3617
3623
|
leftPickerTable: "".concat(props.selectionMode, "-table"),
|
3618
3624
|
rightPickerTable: "".concat(props.selectionMode, "-table"),
|
3619
3625
|
leftPanelDate: leftPanelDate,
|
3620
|
-
rightPanelDate:
|
3626
|
+
rightPanelDate: rightPanelDate,
|
3621
3627
|
rangeState: {
|
3622
3628
|
from: props.modelValue[0],
|
3623
3629
|
to: props.modelValue[1],
|
@@ -4055,7 +4061,7 @@ var dateRangePanelProps = {
|
|
4055
4061
|
"onClick": function onClick() {
|
4056
4062
|
return _this.leftDatePanelLabel.labels[1].handler;
|
4057
4063
|
}
|
4058
|
-
}, [this.leftDatePanelLabel.labels[1].label]), [[external_vue_namespaceObject.vShow, this.leftShowLabelSecond]])]) : '', this.splitPanels || this.leftPickerTable !== 'date-table' ? (0,external_vue_namespaceObject.createVNode)("span", {
|
4064
|
+
}, [this.leftDatePanelLabel.labels[1].label]), [[external_vue_namespaceObject.vShow, this.leftShowLabelSecond]])]) : '', this.splitPanels || this.leftPickerTable !== 'date-table' && this.leftPickerTable !== 'month-table' ? (0,external_vue_namespaceObject.createVNode)("span", {
|
4059
4065
|
"class": iconBtnCls('next', '-double'),
|
4060
4066
|
"onClick": function onClick() {
|
4061
4067
|
return _this.nextYear('left');
|
@@ -4090,6 +4096,17 @@ var dateRangePanelProps = {
|
|
4090
4096
|
"onChangeRange": _this.handleChangeRange,
|
4091
4097
|
"onPick": _this.panelPickerHandlers.left
|
4092
4098
|
}, null);
|
4099
|
+
case 'month-table':
|
4100
|
+
return (0,external_vue_namespaceObject.createVNode)(month_table, {
|
4101
|
+
"selectionMode": "range",
|
4102
|
+
"tableDate": _this.leftPanelDate,
|
4103
|
+
"disabledDate": _this.disabledDate,
|
4104
|
+
"rangeState": _this.rangeState,
|
4105
|
+
"modelValue": _this.preSelecting.left ? [_this.dates[0]] : _this.dates,
|
4106
|
+
"focusedDate": _this.focusedDate,
|
4107
|
+
"onChangeRange": _this.handleChangeRange,
|
4108
|
+
"onPick": _this.panelPickerHandlers.left
|
4109
|
+
}, null);
|
4093
4110
|
default:
|
4094
4111
|
return null;
|
4095
4112
|
}
|
@@ -4098,7 +4115,7 @@ var dateRangePanelProps = {
|
|
4098
4115
|
"style": "width: 261px;"
|
4099
4116
|
}, [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
|
4100
4117
|
"class": this.resolveClassName('date-picker-header')
|
4101
|
-
}, [this.splitPanels || this.rightPickerTable !== 'date-table' ? (0,external_vue_namespaceObject.createVNode)("span", {
|
4118
|
+
}, [this.splitPanels || this.rightPickerTable !== 'date-table' && this.rightPickerTable !== 'month-table' ? (0,external_vue_namespaceObject.createVNode)("span", {
|
4102
4119
|
"class": iconBtnCls('prev', '-double'),
|
4103
4120
|
"onClick": function onClick() {
|
4104
4121
|
return _this.prevYear('right');
|
@@ -4177,6 +4194,17 @@ var dateRangePanelProps = {
|
|
4177
4194
|
"onChangeRange": _this.handleChangeRange,
|
4178
4195
|
"onPick": _this.panelPickerHandlers.right
|
4179
4196
|
}, null);
|
4197
|
+
case 'month-table':
|
4198
|
+
return (0,external_vue_namespaceObject.createVNode)(month_table, {
|
4199
|
+
"selectionMode": "range",
|
4200
|
+
"tableDate": _this.rightPanelDate,
|
4201
|
+
"disabledDate": _this.disabledDate,
|
4202
|
+
"rangeState": _this.rangeState,
|
4203
|
+
"modelValue": _this.preSelecting.right ? [_this.dates[_this.dates.length - 1]] : _this.dates,
|
4204
|
+
"focusedDate": _this.focusedDate,
|
4205
|
+
"onChangeRange": _this.handleChangeRange,
|
4206
|
+
"onPick": _this.panelPickerHandlers.right
|
4207
|
+
}, null);
|
4180
4208
|
default:
|
4181
4209
|
return null;
|
4182
4210
|
}
|
@@ -4260,6 +4288,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4260
4288
|
emit = _ref.emit;
|
4261
4289
|
var formItem = (0,shared_namespaceObject.useFormItem)();
|
4262
4290
|
var isRange = props.type.includes('range');
|
4291
|
+
var teleportTo = (0,external_vue_namespaceObject.ref)((0,shared_namespaceObject.getFullscreenRoot)());
|
4263
4292
|
var emptyArray = isRange ? [null, null] : [null];
|
4264
4293
|
var initialArr = isRange ? props.value || props.modelValue : [props.value || props.modelValue];
|
4265
4294
|
var initialValue = isAllEmptyArr(initialArr) ? emptyArray : parseDate(props.value || props.modelValue, props.type, props.multiple, props.format);
|
@@ -4303,6 +4332,10 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4303
4332
|
if (_type.match(/^date/)) {
|
4304
4333
|
type = 'date';
|
4305
4334
|
}
|
4335
|
+
// 增加了 monthrange
|
4336
|
+
if (_type.match(/^month/)) {
|
4337
|
+
type = 'month';
|
4338
|
+
}
|
4306
4339
|
// return ['year', 'month', 'date', 'time'].indexOf(type) > -1 && type;
|
4307
4340
|
state.selectionMode = ['year', 'month', 'date', 'time'].indexOf(type) > -1 && type;
|
4308
4341
|
return state.selectionMode;
|
@@ -4334,7 +4367,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4334
4367
|
}) : formatDate(publicVModelValue.value, props.type, props.multiple, props.format);
|
4335
4368
|
});
|
4336
4369
|
var panel = (0,external_vue_namespaceObject.computed)(function () {
|
4337
|
-
var isRange = props.type === 'daterange' || props.type === 'datetimerange';
|
4370
|
+
var isRange = props.type === 'daterange' || props.type === 'datetimerange' || props.type === 'monthrange';
|
4338
4371
|
return isRange ? 'DateRangePanel' : 'DatePanel';
|
4339
4372
|
});
|
4340
4373
|
var opened = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -4575,6 +4608,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4575
4608
|
if (props.readonly) {
|
4576
4609
|
return;
|
4577
4610
|
}
|
4611
|
+
teleportTo.value = (0,shared_namespaceObject.getFullscreenRoot)();
|
4578
4612
|
state.isFocused = true;
|
4579
4613
|
if (e && e.type === 'focus') {
|
4580
4614
|
return;
|
@@ -4760,6 +4794,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4760
4794
|
localReadonly: localReadonly,
|
4761
4795
|
allowCrossDayProp: allowCrossDayProp,
|
4762
4796
|
ownPickerProps: ownPickerProps,
|
4797
|
+
teleportTo: teleportTo,
|
4763
4798
|
pickerDropdownRef: pickerDropdownRef,
|
4764
4799
|
inputRef: inputRef,
|
4765
4800
|
triggerRef: triggerRef,
|
@@ -4835,7 +4870,7 @@ function date_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4835
4870
|
"onMouseenter": this.handleInputMouseenter,
|
4836
4871
|
"onMouseleave": this.handleInputMouseleave
|
4837
4872
|
}, [(_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
|
-
"to":
|
4873
|
+
"to": this.teleportTo,
|
4839
4874
|
"disabled": !this.appendToBody
|
4840
4875
|
}, {
|
4841
4876
|
"default": function _default() {
|
@@ -4960,6 +4995,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
4960
4995
|
emit = _ref.emit;
|
4961
4996
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
4962
4997
|
resolveClassName = _usePrefix.resolveClassName;
|
4998
|
+
var teleportTo = (0,external_vue_namespaceObject.ref)((0,shared_namespaceObject.getFullscreenRoot)());
|
4963
4999
|
var formItem = (0,shared_namespaceObject.useFormItem)();
|
4964
5000
|
var isRange = props.type.includes('range');
|
4965
5001
|
var emptyArray = isRange ? [null, null] : [null];
|
@@ -5272,6 +5308,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5272
5308
|
if (props.readonly) {
|
5273
5309
|
return;
|
5274
5310
|
}
|
5311
|
+
teleportTo.value = (0,shared_namespaceObject.getFullscreenRoot)();
|
5275
5312
|
state.isFocused = true;
|
5276
5313
|
if (e && e.type === 'focus') {
|
5277
5314
|
return;
|
@@ -5459,6 +5496,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5459
5496
|
inputRef: inputRef,
|
5460
5497
|
triggerRef: triggerRef,
|
5461
5498
|
pickerPanelRef: pickerPanelRef,
|
5499
|
+
teleportTo: teleportTo,
|
5462
5500
|
handleClose: handleClose,
|
5463
5501
|
handleIconClick: handleIconClick,
|
5464
5502
|
handleInputMouseenter: handleInputMouseenter,
|
@@ -5522,7 +5560,7 @@ function time_picker_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
5522
5560
|
"onMouseenter": this.handleInputMouseenter,
|
5523
5561
|
"onMouseleave": this.handleInputMouseleave
|
5524
5562
|
}, [(_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
|
-
"to":
|
5563
|
+
"to": this.teleportTo,
|
5526
5564
|
"disabled": !this.appendToBody
|
5527
5565
|
}, {
|
5528
5566
|
"default": function _default() {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { ComputedPlacement } from '@popperjs/core';
|
2
2
|
import type { DatePickerProps } from './props';
|
3
3
|
export type DatePickerPlacementType = ComputedPlacement;
|
4
|
-
export type DatePickerTypeType = 'year' | 'month' | 'date' | 'daterange' | 'datetime' | 'datetimerange';
|
4
|
+
export type DatePickerTypeType = 'year' | 'month' | 'monthrange' | 'date' | 'daterange' | 'datetime' | 'datetimerange';
|
5
5
|
export type TimePickerTypeType = 'time' | 'timerange';
|
6
6
|
export type PickerTypeType = DatePickerTypeType | TimePickerTypeType;
|
7
7
|
export interface IDatePickerShortcut {
|
@@ -165,6 +165,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
165
165
|
inputRef: import("vue").Ref<any>;
|
166
166
|
triggerRef: import("vue").Ref<HTMLElement>;
|
167
167
|
pickerPanelRef: import("vue").Ref<any>;
|
168
|
+
teleportTo: import("vue").Ref<any>;
|
168
169
|
handleClose: (e?: Event) => boolean;
|
169
170
|
handleIconClick: () => void;
|
170
171
|
handleInputMouseenter: () => void;
|
@@ -34,6 +34,10 @@ export declare const typeValueResolver: {
|
|
34
34
|
formatter: (value: any, format: any) => string;
|
35
35
|
parser: (text: any, format: any) => any;
|
36
36
|
};
|
37
|
+
monthrange: {
|
38
|
+
formatter: (value: any, format: any) => string;
|
39
|
+
parser: (text: any, format: any) => any[];
|
40
|
+
};
|
37
41
|
year: {
|
38
42
|
formatter: (value: any, format: any) => string;
|
39
43
|
parser: (text: any, format: any) => any;
|