bkui-vue 2.0.1-beta.99 → 2.0.2-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 +133 -159
- package/dist/index.esm.js +26188 -29904
- package/dist/index.umd.js +133 -159
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.css +0 -130
- package/lib/affix/affix.variable.css +1 -261
- package/lib/affix/index.js +30 -22
- package/lib/alert/alert.css +3 -133
- package/lib/alert/alert.variable.css +1 -261
- package/lib/alert/index.js +30 -22
- package/lib/animate-number/index.js +14 -10
- package/lib/backtop/backtop.css +3 -133
- package/lib/backtop/backtop.variable.css +4 -394
- package/lib/backtop/index.js +32 -22
- package/lib/badge/badge.css +26 -156
- package/lib/badge/badge.variable.css +1 -261
- package/lib/badge/index.js +24 -18
- package/lib/breadcrumb/breadcrumb.css +5 -135
- package/lib/breadcrumb/breadcrumb.variable.css +6 -396
- package/lib/breadcrumb/index.js +31 -23
- package/lib/button/button.css +143 -273
- package/lib/button/button.variable.css +1 -261
- package/lib/button/index.d.ts +2 -1
- package/lib/button/index.js +36 -26
- package/lib/card/card.css +4 -134
- package/lib/card/card.variable.css +5 -395
- package/lib/card/index.js +47 -33
- package/lib/cascader/cascader.css +27 -153
- package/lib/cascader/cascader.d.ts +2 -2
- package/lib/cascader/cascader.less +5 -0
- package/lib/cascader/cascader.variable.css +28 -414
- package/lib/cascader/index.d.ts +6 -6
- package/lib/cascader/index.js +1609 -859
- package/lib/checkbox/checkbox.css +10 -140
- package/lib/checkbox/checkbox.variable.css +1 -261
- package/lib/checkbox/index.js +44 -34
- package/lib/code-diff/code-diff.css +0 -130
- package/lib/code-diff/code-diff.variable.css +1 -261
- package/lib/code-diff/index.js +83 -79
- package/lib/collapse/collapse.css +1 -131
- package/lib/collapse/collapse.variable.css +1 -261
- package/lib/collapse/index.js +39 -33
- package/lib/collapse-transition/collapse-transition.css +0 -130
- package/lib/collapse-transition/collapse-transition.variable.css +1 -261
- package/lib/collapse-transition/index.js +20 -14
- package/lib/color-picker/color-picker.css +0 -130
- package/lib/color-picker/color-picker.variable.css +1 -261
- package/lib/color-picker/index.js +1646 -440
- package/lib/config-provider/config-provider.css +0 -130
- package/lib/config-provider/config-provider.variable.css +1 -261
- package/lib/config-provider/index.js +34 -26
- package/lib/container/container.css +0 -130
- package/lib/container/container.variable.css +1 -391
- package/lib/container/index.js +27 -21
- package/lib/date-picker/date-picker.css +17 -147
- package/lib/date-picker/date-picker.variable.css +1 -261
- package/lib/date-picker/index.d.ts +2 -1
- package/lib/date-picker/index.js +1992 -554
- package/lib/dialog/dialog.css +8 -138
- package/lib/dialog/dialog.variable.css +9 -399
- package/lib/dialog/index.js +101 -87
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/index.js +495 -378
- package/lib/divider/divider.css +3 -133
- package/lib/divider/divider.variable.css +1 -261
- package/lib/divider/index.js +21 -15
- package/lib/dropdown/dropdown.css +0 -130
- package/lib/dropdown/dropdown.variable.css +1 -391
- package/lib/dropdown/index.js +43 -31
- package/lib/exception/exception.css +0 -130
- package/lib/exception/exception.variable.css +1 -261
- package/lib/exception/index.js +55 -49
- package/lib/fixed-navbar/fixed-navbar.css +4 -134
- package/lib/fixed-navbar/fixed-navbar.variable.css +1 -261
- package/lib/fixed-navbar/index.js +20 -14
- package/lib/form/form.css +0 -130
- package/lib/form/form.variable.css +1 -261
- package/lib/form/index.js +1623 -198
- package/lib/icon/angle-double-down-line.js +14 -12
- package/lib/icon/angle-double-left-line.js +14 -12
- package/lib/icon/angle-double-left.js +14 -12
- package/lib/icon/angle-double-right-line.js +14 -12
- package/lib/icon/angle-double-right.js +14 -12
- package/lib/icon/angle-double-up-line.js +14 -12
- package/lib/icon/angle-down-fill.js +14 -12
- package/lib/icon/angle-down-line.js +14 -12
- package/lib/icon/angle-down.js +14 -12
- package/lib/icon/angle-left.js +14 -12
- package/lib/icon/angle-right.js +14 -12
- package/lib/icon/angle-up-fill.js +14 -12
- package/lib/icon/angle-up.js +14 -12
- package/lib/icon/archive-fill.js +14 -12
- package/lib/icon/arrows-left.js +14 -12
- package/lib/icon/arrows-right.js +14 -12
- package/lib/icon/assistant.js +14 -12
- package/lib/icon/audio-fill.js +14 -12
- package/lib/icon/bk.js +14 -12
- package/lib/icon/circle.js +14 -12
- package/lib/icon/close-line.js +14 -12
- package/lib/icon/close.js +14 -12
- package/lib/icon/code.js +14 -12
- package/lib/icon/cog-shape.js +14 -12
- package/lib/icon/collapse-left.js +14 -12
- package/lib/icon/copy-shape.js +14 -12
- package/lib/icon/copy.js +14 -12
- package/lib/icon/data-shape.js +14 -12
- package/lib/icon/del.js +14 -12
- package/lib/icon/doc-fill.js +14 -12
- package/lib/icon/done.js +14 -12
- package/lib/icon/down-shape.js +14 -12
- package/lib/icon/down-small.js +14 -12
- package/lib/icon/edit-line.js +14 -12
- package/lib/icon/ellipsis.js +14 -12
- package/lib/icon/enlarge-line.js +14 -12
- package/lib/icon/error.js +14 -12
- package/lib/icon/excel-fill.js +14 -12
- package/lib/icon/exclamation-circle-shape.js +14 -12
- package/lib/icon/eye.js +14 -12
- package/lib/icon/filliscreen-line.js +14 -12
- package/lib/icon/fix-line.js +14 -12
- package/lib/icon/fix-shape.js +14 -12
- package/lib/icon/folder-open.js +14 -12
- package/lib/icon/folder-shape-open.js +14 -12
- package/lib/icon/folder-shape.js +14 -12
- package/lib/icon/folder.js +14 -12
- package/lib/icon/funnel.js +14 -12
- package/lib/icon/grag-fill.js +14 -12
- package/lib/icon/help-document-fill.js +14 -12
- package/lib/icon/help-fill.js +14 -12
- package/lib/icon/help.js +14 -12
- package/lib/icon/image-fill.js +14 -12
- package/lib/icon/img-error.js +14 -12
- package/lib/icon/img-placehoulder.js +14 -12
- package/lib/icon/info-line.js +14 -12
- package/lib/icon/info.js +14 -12
- package/lib/icon/left-shape.js +14 -12
- package/lib/icon/left-turn-line.js +14 -12
- package/lib/icon/loading.js +14 -12
- package/lib/icon/narrow-line.js +14 -12
- package/lib/icon/original.js +14 -12
- package/lib/icon/pdf-fill.js +14 -12
- package/lib/icon/play-shape.js +14 -12
- package/lib/icon/plus.js +14 -12
- package/lib/icon/ppt-fill.js +14 -12
- package/lib/icon/qq.js +14 -12
- package/lib/icon/right-shape.js +14 -12
- package/lib/icon/right-turn-line.js +14 -12
- package/lib/icon/search.js +14 -12
- package/lib/icon/share.js +14 -12
- package/lib/icon/spinner.js +14 -12
- package/lib/icon/success.js +14 -12
- package/lib/icon/switcher-loading.js +14 -12
- package/lib/icon/text-all.js +14 -12
- package/lib/icon/text-file.js +14 -12
- package/lib/icon/text-fill.js +14 -12
- package/lib/icon/transfer.js +14 -12
- package/lib/icon/tree-application-shape.js +14 -12
- package/lib/icon/unfull-screen.js +14 -12
- package/lib/icon/unvisible.js +14 -12
- package/lib/icon/up-shape.js +14 -12
- package/lib/icon/upload.js +14 -12
- package/lib/icon/video-fill.js +14 -12
- package/lib/icon/warn.js +14 -12
- package/lib/icon/weixin-pro.js +14 -12
- package/lib/icon/weixin.js +14 -12
- package/lib/image/image-viewer.css +0 -130
- package/lib/image/image-viewer.variable.css +1 -261
- package/lib/image/image.css +0 -130
- package/lib/image/image.variable.css +1 -391
- package/lib/image/index.js +1502 -182
- package/lib/index.js +1 -1
- package/lib/info-box/index.js +101 -87
- package/lib/info-box/info-box.css +4 -134
- package/lib/info-box/info-box.variable.css +1 -261
- package/lib/input/index.js +1342 -42
- package/lib/input/input.css +75 -205
- package/lib/input/input.variable.css +76 -466
- package/lib/link/index.js +26 -18
- package/lib/link/link.css +16 -146
- package/lib/link/link.variable.css +1 -261
- package/lib/loading/index.js +25 -19
- package/lib/loading/loading.css +16 -146
- package/lib/loading/loading.variable.css +17 -407
- package/lib/locale/index.js +3 -3
- package/lib/menu/index.js +40 -32
- package/lib/menu/menu.css +20 -150
- package/lib/menu/menu.variable.css +21 -411
- package/lib/menu/submenu.css +0 -130
- package/lib/menu/submenu.variable.css +1 -261
- package/lib/message/index.js +47 -41
- package/lib/message/message.css +21 -151
- package/lib/message/message.variable.css +1 -261
- package/lib/modal/index.js +42 -29
- package/lib/modal/modal.css +4 -134
- package/lib/modal/modal.variable.css +5 -395
- package/lib/navigation/index.js +27 -19
- package/lib/navigation/navigation.css +2 -132
- package/lib/navigation/navigation.variable.css +1 -261
- package/lib/notify/index.js +37 -27
- package/lib/notify/notify.css +7 -137
- package/lib/notify/notify.variable.css +1 -261
- package/lib/overflow-title/components/overflow-title.d.ts +20 -0
- package/lib/overflow-title/index.d.ts +40 -0
- package/lib/overflow-title/index.js +43 -30
- package/lib/overflow-title/overflow-title.css +3 -0
- package/lib/overflow-title/overflow-title.less +4 -0
- package/lib/overflow-title/overflow-title.variable.css +3 -0
- package/lib/overflow-title/props.d.ts +10 -0
- package/lib/pagination/index.d.ts +3 -3
- package/lib/pagination/index.js +62 -46
- package/lib/pagination/pagination.css +1 -131
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/pagination/pagination.variable.css +1 -261
- package/lib/plugin-popover/index.d.ts +1 -1
- package/lib/plugin-popover/index.js +35 -21266
- package/lib/plugins/index.js +7 -5
- package/lib/pop-confirm/index.d.ts +8 -0
- package/lib/pop-confirm/index.js +64 -40
- package/lib/pop-confirm/pop-confirm.css +0 -130
- package/lib/pop-confirm/pop-confirm.d.ts +4 -0
- package/lib/pop-confirm/pop-confirm.variable.css +1 -261
- package/lib/pop-confirm/props.d.ts +3 -0
- package/lib/popover/index.d.ts +49 -3
- package/lib/popover/index.js +1323 -17381
- package/lib/popover/popover.css +0 -130
- package/lib/popover/popover.d.ts +23 -1
- package/lib/popover/popover.variable.css +1 -261
- package/lib/popover/props.d.ts +16 -0
- package/lib/popover/use-popover-init.d.ts +1 -2
- package/lib/popover/utils.d.ts +1 -1
- package/lib/popover2/index.js +14 -10
- package/lib/process/index.js +78 -74
- package/lib/process/process.css +13 -143
- package/lib/process/process.variable.css +1 -261
- package/lib/progress/index.js +26 -20
- package/lib/progress/progress.css +4 -134
- package/lib/progress/progress.variable.css +5 -395
- package/lib/radio/index.js +39 -31
- package/lib/radio/radio.css +42 -172
- package/lib/radio/radio.variable.css +1 -261
- package/lib/rate/index.js +25 -19
- package/lib/rate/rate.css +0 -130
- package/lib/rate/rate.variable.css +1 -261
- package/lib/resize-layout/index.js +30 -22
- package/lib/resize-layout/resize-layout.css +0 -130
- package/lib/resize-layout/resize-layout.variable.css +1 -261
- package/lib/scrollbar/css/scrollbar.css +0 -130
- package/lib/scrollbar/css/scrollbar.variable.css +1 -261
- package/lib/scrollbar/index.js +25 -25
- package/lib/search-select/index.d.ts +6 -0
- package/lib/search-select/index.js +1514 -238
- package/lib/search-select/input.d.ts +1 -0
- package/lib/search-select/search-select.css +78 -208
- package/lib/search-select/search-select.d.ts +2 -0
- package/lib/search-select/search-select.less +39 -39
- package/lib/search-select/search-select.variable.css +79 -469
- package/lib/search-select/selected.d.ts +2 -0
- package/lib/select/index.d.ts +78 -7
- package/lib/select/index.js +1460 -181
- package/lib/select/select.css +42 -169
- package/lib/select/select.d.ts +32 -2
- package/lib/select/select.less +4 -0
- package/lib/select/select.variable.css +43 -430
- package/lib/shared/index.js +57 -49
- package/lib/sideslider/index.js +89 -79
- package/lib/sideslider/sideslider.css +1 -131
- package/lib/sideslider/sideslider.variable.css +1 -261
- package/lib/slider/index.js +85 -75
- package/lib/slider/slider.css +5 -135
- package/lib/slider/slider.variable.css +1 -261
- package/lib/steps/index.js +78 -72
- package/lib/steps/steps.css +38 -168
- package/lib/steps/steps.variable.css +1 -261
- package/lib/styles/mixins/animate.css +0 -130
- package/lib/styles/mixins/animate.variable.css +1 -261
- package/lib/styles/mixins/mixins.css +0 -130
- package/lib/styles/mixins/mixins.variable.css +0 -130
- package/lib/styles/mixins/popper.css +0 -130
- package/lib/styles/mixins/popper.variable.css +1 -261
- package/lib/styles/mixins/scroll.css +0 -130
- package/lib/styles/mixins/scroll.variable.css +1 -261
- package/lib/styles/reset.css +0 -130
- package/lib/styles/reset.variable.css +1 -261
- package/lib/styles/themes/themes.less +130 -299
- package/lib/swiper/index.js +24 -18
- package/lib/swiper/swiper.css +0 -130
- package/lib/swiper/swiper.variable.css +1 -261
- package/lib/switcher/index.js +30 -22
- package/lib/switcher/switcher.css +17 -147
- package/lib/switcher/switcher.variable.css +18 -408
- package/lib/tab/index.js +1324 -43
- package/lib/tab/tab.css +26 -156
- package/lib/tab/tab.variable.css +1 -261
- package/lib/table/components/table-column.d.ts +1 -1
- package/lib/table/index.d.ts +7 -7
- package/lib/table/index.js +1543 -17458
- package/lib/table/plugins/head-filter.css +0 -130
- package/lib/table/plugins/head-filter.variable.css +1 -261
- package/lib/table/plugins/head-sort.css +0 -130
- package/lib/table/plugins/head-sort.variable.css +1 -261
- package/lib/table/plugins/settings.css +0 -130
- package/lib/table/plugins/settings.variable.css +1 -261
- package/lib/table/table.css +189 -319
- package/lib/table/table.d.ts +2 -2
- package/lib/table/table.variable.css +190 -580
- package/lib/table-column/index.d.ts +3 -3
- package/lib/table-column/index.js +17 -17995
- package/lib/tag/index.js +36 -26
- package/lib/tag/tag.css +5 -135
- package/lib/tag/tag.variable.css +1 -261
- package/lib/tag-input/index.d.ts +52 -10
- package/lib/tag-input/index.js +1453 -17423
- package/lib/tag-input/tag-input.css +21 -148
- package/lib/tag-input/tag-input.d.ts +24 -4
- package/lib/tag-input/tag-input.less +4 -0
- package/lib/tag-input/tag-input.variable.css +4 -261
- package/lib/tag-input/tag-props.d.ts +11 -1
- package/lib/tag-input/tag-render.d.ts +2 -2
- package/lib/time-picker/index.js +13 -9
- package/lib/time-picker/time-picker.css +0 -130
- package/lib/time-picker/time-picker.variable.css +1 -261
- package/lib/timeline/index.js +21 -15
- package/lib/timeline/timeline.css +19 -149
- package/lib/timeline/timeline.variable.css +1 -261
- package/lib/transfer/index.d.ts +3 -3
- package/lib/transfer/index.js +56 -40
- package/lib/transfer/transfer.css +19 -149
- package/lib/transfer/transfer.d.ts +1 -1
- package/lib/transfer/transfer.variable.css +1 -261
- package/lib/tree/index.d.ts +3 -3
- package/lib/tree/index.js +107 -17342
- package/lib/tree/tree.css +10 -140
- package/lib/tree/tree.d.ts +1 -1
- package/lib/tree/tree.variable.css +11 -401
- package/lib/upload/index.js +584 -572
- package/lib/upload/upload.css +27 -157
- package/lib/upload/upload.variable.css +28 -418
- package/lib/virtual-render/index.d.ts +3 -3
- package/lib/virtual-render/index.js +59 -17306
- package/lib/virtual-render/virtual-render.css +0 -130
- package/lib/virtual-render/virtual-render.d.ts +1 -1
- package/lib/virtual-render/virtual-render.variable.css +1 -391
- package/package.json +1 -1
- package/lib/styles/themes/themes.css +0 -130
- package/lib/styles/themes/themes.variable.css +0 -130
package/lib/cascader/index.js
CHANGED
@@ -1,365 +1,1475 @@
|
|
1
1
|
import "../styles/reset.css";
|
2
2
|
import "./cascader.less";
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__ from "../plugin-popover";
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__loading_4d683b23__ from "../loading";
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__overflow_title_f9bafa47__ from "../overflow-title";
|
3
7
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
|
4
8
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
5
9
|
import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
|
6
10
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__ from "../directives";
|
8
11
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
9
12
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
|
10
13
|
import "../popover/popover.less";
|
14
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_select_1a0d1ad7__ from "../select";
|
11
15
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_tag_d74826be__ from "../tag";
|
12
16
|
import "../tag/tag.less";
|
17
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_tag_input_bee9f515__ from "../tag-input";
|
13
18
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__ from "../checkbox";
|
14
19
|
import "../checkbox/checkbox.less";
|
15
20
|
/******/ var __webpack_modules__ = ({
|
16
21
|
|
17
|
-
/***/
|
22
|
+
/***/ 205:
|
23
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
24
|
+
|
25
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
26
|
+
/* harmony export */ "default": () => (/* binding */ toPropertyKey)
|
27
|
+
/* harmony export */ });
|
28
|
+
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7545);
|
29
|
+
/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9824);
|
30
|
+
|
31
|
+
|
32
|
+
function toPropertyKey(t) {
|
33
|
+
var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t, "string");
|
34
|
+
return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_1__["default"])(i) ? i : String(i);
|
35
|
+
}
|
36
|
+
|
37
|
+
/***/ }),
|
38
|
+
|
39
|
+
/***/ 1043:
|
40
|
+
/***/ ((module) => {
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Copyright (c) 2015, Facebook, Inc.
|
44
|
+
* All rights reserved.
|
45
|
+
*
|
46
|
+
* This source code is licensed under the BSD-style license found in the
|
47
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
48
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
49
|
+
*
|
50
|
+
* @providesModule ExecutionEnvironment
|
51
|
+
*/
|
52
|
+
|
53
|
+
/*jslint evil: true */
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
var canUseDOM = !!(
|
58
|
+
typeof window !== 'undefined' &&
|
59
|
+
window.document &&
|
60
|
+
window.document.createElement
|
61
|
+
);
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Simple, lightweight module assisting with the detection and context of
|
65
|
+
* Worker. Helps avoid circular dependencies and allows code to reason about
|
66
|
+
* whether or not they are in a Worker, even if they never include the main
|
67
|
+
* `ReactWorker` dependency.
|
68
|
+
*/
|
69
|
+
var ExecutionEnvironment = {
|
70
|
+
|
71
|
+
canUseDOM: canUseDOM,
|
72
|
+
|
73
|
+
canUseWorkers: typeof Worker !== 'undefined',
|
74
|
+
|
75
|
+
canUseEventListeners:
|
76
|
+
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
77
|
+
|
78
|
+
canUseViewport: canUseDOM && !!window.screen,
|
79
|
+
|
80
|
+
isInWorker: !canUseDOM // For now, this is true - might change in the future.
|
81
|
+
|
82
|
+
};
|
83
|
+
|
84
|
+
module.exports = ExecutionEnvironment;
|
85
|
+
|
86
|
+
|
87
|
+
/***/ }),
|
88
|
+
|
89
|
+
/***/ 2586:
|
18
90
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
19
91
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
92
|
+
/**
|
93
|
+
* Copyright 2013-2015, Facebook, Inc.
|
94
|
+
* All rights reserved.
|
95
|
+
*
|
96
|
+
* This source code is licensed under the BSD-style license found in the
|
97
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
98
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
99
|
+
*
|
100
|
+
* @providesModule isEventSupported
|
101
|
+
*/
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
var ExecutionEnvironment = __webpack_require__(1043);
|
106
|
+
|
107
|
+
var useHasFeature;
|
108
|
+
if (ExecutionEnvironment.canUseDOM) {
|
109
|
+
useHasFeature =
|
110
|
+
document.implementation &&
|
111
|
+
document.implementation.hasFeature &&
|
112
|
+
// always returns true in newer browsers as per the standard.
|
113
|
+
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
114
|
+
document.implementation.hasFeature('', '') !== true;
|
115
|
+
}
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Checks if an event is supported in the current execution environment.
|
119
|
+
*
|
120
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
121
|
+
* `reset`, `load`, `error`, and `select`.
|
122
|
+
*
|
123
|
+
* Borrows from Modernizr.
|
124
|
+
*
|
125
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
126
|
+
* @param {?boolean} capture Check if the capture phase is supported.
|
127
|
+
* @return {boolean} True if the event is supported.
|
128
|
+
* @internal
|
129
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
130
|
+
*/
|
131
|
+
function isEventSupported(eventNameSuffix, capture) {
|
132
|
+
if (!ExecutionEnvironment.canUseDOM ||
|
133
|
+
capture && !('addEventListener' in document)) {
|
134
|
+
return false;
|
135
|
+
}
|
136
|
+
|
137
|
+
var eventName = 'on' + eventNameSuffix;
|
138
|
+
var isSupported = eventName in document;
|
139
|
+
|
140
|
+
if (!isSupported) {
|
141
|
+
var element = document.createElement('div');
|
142
|
+
element.setAttribute(eventName, 'return;');
|
143
|
+
isSupported = typeof element[eventName] === 'function';
|
144
|
+
}
|
145
|
+
|
146
|
+
if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
147
|
+
// This is the only way to test support for the `wheel` event in IE9+.
|
148
|
+
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
149
|
+
}
|
150
|
+
|
151
|
+
return isSupported;
|
152
|
+
}
|
153
|
+
|
154
|
+
module.exports = isEventSupported;
|
155
|
+
|
156
|
+
|
157
|
+
/***/ }),
|
158
|
+
|
159
|
+
/***/ 2880:
|
160
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
161
|
+
|
162
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
163
|
+
/* harmony export */ "default": () => (/* binding */ _nonIterableSpread)
|
164
|
+
/* harmony export */ });
|
165
|
+
function _nonIterableSpread() {
|
166
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
167
|
+
}
|
168
|
+
|
169
|
+
/***/ }),
|
170
|
+
|
171
|
+
/***/ 3492:
|
172
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
173
|
+
|
174
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
175
|
+
/* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles)
|
176
|
+
/* harmony export */ });
|
177
|
+
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6284);
|
178
|
+
|
179
|
+
function _arrayWithoutHoles(arr) {
|
180
|
+
if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr);
|
181
|
+
}
|
182
|
+
|
183
|
+
/***/ }),
|
184
|
+
|
185
|
+
/***/ 4430:
|
186
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
187
|
+
|
188
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
189
|
+
/* harmony export */ "default": () => (/* binding */ _iterableToArray)
|
190
|
+
/* harmony export */ });
|
191
|
+
function _iterableToArray(iter) {
|
192
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
193
|
+
}
|
194
|
+
|
195
|
+
/***/ }),
|
196
|
+
|
197
|
+
/***/ 4586:
|
198
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
199
|
+
|
200
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
201
|
+
/* harmony export */ "default": () => (/* binding */ _defineProperty)
|
202
|
+
/* harmony export */ });
|
203
|
+
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
|
204
|
+
|
205
|
+
function _defineProperty(obj, key, value) {
|
206
|
+
key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key);
|
207
|
+
if (key in obj) {
|
208
|
+
Object.defineProperty(obj, key, {
|
209
|
+
value: value,
|
210
|
+
enumerable: true,
|
211
|
+
configurable: true,
|
212
|
+
writable: true
|
213
|
+
});
|
214
|
+
} else {
|
215
|
+
obj[key] = value;
|
44
216
|
}
|
217
|
+
return obj;
|
218
|
+
}
|
219
|
+
|
220
|
+
/***/ }),
|
221
|
+
|
222
|
+
/***/ 4923:
|
223
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
224
|
+
|
225
|
+
|
226
|
+
// EXPORTS
|
227
|
+
__webpack_require__.d(__webpack_exports__, {
|
228
|
+
bkTooltips: () => (/* reexport */ src_tooltips)
|
229
|
+
});
|
230
|
+
|
231
|
+
// UNUSED EXPORTS: bkEllipsis, bkEllipsisInstance, bkLoading, clickoutside, mousewheel, overflowTitle
|
232
|
+
|
233
|
+
;// ../../packages/directives/src/clickoutside.ts
|
234
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
235
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
236
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
237
|
+
/*
|
238
|
+
* Tencent is pleased to support the open source community by making
|
239
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
240
|
+
*
|
241
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
242
|
+
*
|
243
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
244
|
+
*
|
245
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
246
|
+
*
|
247
|
+
* ---------------------------------------------------
|
248
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
249
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
250
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
251
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
252
|
+
*
|
253
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
254
|
+
* the Software.
|
255
|
+
*
|
256
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
257
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
258
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
259
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
260
|
+
* IN THE SOFTWARE.
|
261
|
+
*/
|
262
|
+
var isElement = function isElement(e) {
|
263
|
+
if (typeof Element === 'undefined') return false;
|
264
|
+
return e instanceof Element;
|
265
|
+
};
|
266
|
+
var nodeList = new Map();
|
267
|
+
var startClick;
|
268
|
+
document.addEventListener('mousedown', function (e) {
|
269
|
+
return startClick = e;
|
270
|
+
});
|
271
|
+
document.addEventListener('mouseup', function (e) {
|
272
|
+
var _iterator = _createForOfIteratorHelper(nodeList.values()),
|
273
|
+
_step;
|
45
274
|
try {
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
275
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
276
|
+
var handlers = _step.value;
|
277
|
+
var _iterator2 = _createForOfIteratorHelper(handlers),
|
278
|
+
_step2;
|
279
|
+
try {
|
280
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
281
|
+
var documentHandler = _step2.value.documentHandler;
|
282
|
+
documentHandler(e, startClick);
|
283
|
+
}
|
284
|
+
} catch (err) {
|
285
|
+
_iterator2.e(err);
|
286
|
+
} finally {
|
287
|
+
_iterator2.f();
|
288
|
+
}
|
289
|
+
}
|
290
|
+
} catch (err) {
|
291
|
+
_iterator.e(err);
|
292
|
+
} finally {
|
293
|
+
_iterator.f();
|
51
294
|
}
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
295
|
+
});
|
296
|
+
function createDocumentHandler(el, binding) {
|
297
|
+
var excludes = [];
|
298
|
+
if (Array.isArray(binding.arg)) {
|
299
|
+
excludes = binding.arg;
|
300
|
+
} else if (isElement(binding.arg)) {
|
301
|
+
excludes.push(binding.arg);
|
59
302
|
}
|
60
|
-
function
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
303
|
+
return function (mouseup, mousedown) {
|
304
|
+
var popperRef = binding.instance.popperRef;
|
305
|
+
var mouseUpTarget = mouseup.target;
|
306
|
+
var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
|
307
|
+
var isBound = !binding || !binding.instance;
|
308
|
+
var isTargetExists = !mouseUpTarget || !mouseDownTarget;
|
309
|
+
var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
|
310
|
+
var isSelf = el === mouseUpTarget;
|
311
|
+
var isTargetExcluded = excludes.length && excludes.some(function (item) {
|
312
|
+
return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
|
313
|
+
}) || excludes.length && excludes.includes(mouseDownTarget);
|
314
|
+
var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
|
315
|
+
if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
|
316
|
+
return;
|
71
317
|
}
|
318
|
+
binding.value(mouseup, mousedown);
|
319
|
+
};
|
320
|
+
}
|
321
|
+
var ClickOutside = {
|
322
|
+
beforeMount: function beforeMount(el, binding) {
|
323
|
+
if (!nodeList.has(el)) {
|
324
|
+
nodeList.set(el, []);
|
325
|
+
}
|
326
|
+
nodeList.get(el).push({
|
327
|
+
documentHandler: createDocumentHandler(el, binding),
|
328
|
+
bindingFn: binding.value
|
329
|
+
});
|
330
|
+
},
|
331
|
+
updated: function updated(el, binding) {
|
332
|
+
if (!nodeList.has(el)) {
|
333
|
+
nodeList.set(el, []);
|
334
|
+
}
|
335
|
+
var handlers = nodeList.get(el);
|
336
|
+
var oldHandlerIndex = handlers.findIndex(function (item) {
|
337
|
+
return item.bindingFn === binding.oldValue;
|
338
|
+
});
|
339
|
+
var newHandler = {
|
340
|
+
documentHandler: createDocumentHandler(el, binding),
|
341
|
+
bindingFn: binding.value
|
342
|
+
};
|
343
|
+
if (oldHandlerIndex >= 0) {
|
344
|
+
// replace the old handler to the new handler
|
345
|
+
handlers.splice(oldHandlerIndex, 1, newHandler);
|
346
|
+
} else {
|
347
|
+
handlers.push(newHandler);
|
348
|
+
}
|
349
|
+
},
|
350
|
+
unmounted: function unmounted(el) {
|
351
|
+
// remove all listeners when a component unmounted
|
352
|
+
nodeList["delete"](el);
|
72
353
|
}
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
354
|
+
};
|
355
|
+
ClickOutside.install = function (app) {
|
356
|
+
app.directive('bkTooltips', ClickOutside);
|
357
|
+
};
|
358
|
+
/* harmony default export */ const clickoutside = ((/* unused pure expression or super */ null && (ClickOutside)));
|
359
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
360
|
+
var esm_typeof = __webpack_require__(7545);
|
361
|
+
;// external "../plugin-popover"
|
362
|
+
var x = (y) => {
|
363
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
364
|
+
}
|
365
|
+
var y = (x) => (() => (x))
|
366
|
+
const plugin_popover_namespaceObject = x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__["default"]) });
|
367
|
+
;// ../../packages/directives/src/ellipsis.ts
|
368
|
+
|
369
|
+
/*
|
370
|
+
* Tencent is pleased to support the open source community by making
|
371
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
372
|
+
*
|
373
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
374
|
+
*
|
375
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
376
|
+
*
|
377
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
378
|
+
*
|
379
|
+
* ---------------------------------------------------
|
380
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
381
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
382
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
383
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
384
|
+
*
|
385
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
386
|
+
* the Software.
|
387
|
+
*
|
388
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
389
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
390
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
391
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
392
|
+
* IN THE SOFTWARE.
|
393
|
+
*/
|
394
|
+
|
395
|
+
var resolveOptions = function resolveOptions(el, binding) {
|
396
|
+
var options = {
|
397
|
+
content: '',
|
398
|
+
target: el
|
399
|
+
};
|
400
|
+
if ((0,esm_typeof["default"])(binding) === 'object') {
|
401
|
+
Object.assign(options, binding);
|
402
|
+
if (Object.prototype.hasOwnProperty.call(binding, 'popoverOption')) {
|
403
|
+
Object.assign(options, binding.popoverOption);
|
404
|
+
}
|
405
|
+
} else {
|
406
|
+
options.content = binding;
|
407
|
+
}
|
408
|
+
return options;
|
409
|
+
};
|
410
|
+
var createInstance = function createInstance(el, binding) {
|
411
|
+
var instance = null;
|
412
|
+
var createTimer = null;
|
413
|
+
var hidePopTimer = null;
|
414
|
+
var options = resolveOptions(el, binding);
|
415
|
+
var disabled = options.disabled;
|
416
|
+
if (disabled || instance) {
|
417
|
+
return;
|
418
|
+
}
|
419
|
+
var handleContentEnter = function handleContentEnter() {
|
420
|
+
hidePopTimer && clearTimeout(hidePopTimer);
|
421
|
+
hidePopTimer = null;
|
422
|
+
};
|
423
|
+
var handleContentLeave = function handleContentLeave() {
|
424
|
+
var _instance, _instance2;
|
425
|
+
if (createTimer) {
|
426
|
+
clearTimeout(createTimer);
|
427
|
+
}
|
428
|
+
(_instance = instance) === null || _instance === void 0 || _instance.hide();
|
429
|
+
(_instance2 = instance) === null || _instance2 === void 0 || _instance2.close();
|
430
|
+
instance = null;
|
431
|
+
};
|
432
|
+
var handleMouseEnter = function handleMouseEnter() {
|
433
|
+
handleContentLeave();
|
434
|
+
createTimer && clearTimeout(createTimer);
|
435
|
+
createTimer = setTimeout(function () {
|
436
|
+
var targetOptions = resolveOptions(el, binding);
|
437
|
+
targetOptions.isShow = true;
|
438
|
+
targetOptions.content = typeof targetOptions.content === 'function' ? targetOptions.content() : targetOptions.content || el.innerText;
|
439
|
+
targetOptions.allowHtml = true;
|
440
|
+
Object.assign(targetOptions, {
|
441
|
+
onContentMouseenter: handleContentEnter,
|
442
|
+
onContentMouseleave: handleContentLeave
|
94
443
|
});
|
444
|
+
instance = (0,plugin_popover_namespaceObject["default"])(targetOptions);
|
445
|
+
}, 300);
|
446
|
+
};
|
447
|
+
var handleMouseLeave = function handleMouseLeave() {
|
448
|
+
hidePopTimer = setTimeout(function () {
|
449
|
+
var _instance3, _instance4;
|
450
|
+
if (createTimer) {
|
451
|
+
clearTimeout(createTimer);
|
452
|
+
}
|
453
|
+
(_instance3 = instance) === null || _instance3 === void 0 || _instance3.hide();
|
454
|
+
(_instance4 = instance) === null || _instance4 === void 0 || _instance4.close();
|
455
|
+
instance = null;
|
456
|
+
}, 120);
|
457
|
+
};
|
458
|
+
el.addEventListener('mouseenter', handleMouseEnter);
|
459
|
+
el.addEventListener('mouseleave', handleMouseLeave);
|
460
|
+
var destroyInstance = function destroyInstance(element) {
|
461
|
+
var _ref, _ref2;
|
462
|
+
handleMouseLeave();
|
463
|
+
(_ref = element !== null && element !== void 0 ? element : el) === null || _ref === void 0 || _ref.removeEventListener('mouseenter', handleMouseEnter);
|
464
|
+
(_ref2 = element !== null && element !== void 0 ? element : el) === null || _ref2 === void 0 || _ref2.removeEventListener('mouseleave', handleMouseLeave);
|
465
|
+
};
|
466
|
+
return {
|
467
|
+
destroyInstance: destroyInstance,
|
468
|
+
instance: instance
|
469
|
+
};
|
470
|
+
};
|
471
|
+
var ellipsis = {
|
472
|
+
mounted: function mounted(el, binding) {
|
473
|
+
createInstance(el, binding);
|
474
|
+
}
|
475
|
+
};
|
476
|
+
/* harmony default export */ const src_ellipsis = ((/* unused pure expression or super */ null && (ellipsis)));
|
477
|
+
// EXTERNAL MODULE: ../../node_modules/normalize-wheel/index.js
|
478
|
+
var normalize_wheel = __webpack_require__(8283);
|
479
|
+
var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel);
|
480
|
+
;// ../../packages/directives/src/mousewheel.ts
|
481
|
+
/*
|
482
|
+
* Tencent is pleased to support the open source community by making
|
483
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
484
|
+
*
|
485
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
486
|
+
*
|
487
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
488
|
+
*
|
489
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
490
|
+
*
|
491
|
+
* ---------------------------------------------------
|
492
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
493
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
494
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
495
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
496
|
+
*
|
497
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
498
|
+
* the Software.
|
499
|
+
*
|
500
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
501
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
502
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
503
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
504
|
+
* IN THE SOFTWARE.
|
505
|
+
*/
|
506
|
+
|
507
|
+
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
508
|
+
var mousewheelHandler = function mousewheelHandler(element, callback) {
|
509
|
+
if (element !== null && element !== void 0 && element.addEventListener) {
|
510
|
+
element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', function (e) {
|
511
|
+
var normalized = normalize_wheel_default()(e);
|
512
|
+
callback === null || callback === void 0 || callback.apply(this, [e, normalized]);
|
95
513
|
});
|
96
514
|
}
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
515
|
+
};
|
516
|
+
var mousewheel = {
|
517
|
+
beforeMount: function beforeMount(el, binding) {
|
518
|
+
mousewheelHandler(el, binding.value);
|
519
|
+
}
|
520
|
+
};
|
521
|
+
/* harmony default export */ const src_mousewheel = ((/* unused pure expression or super */ null && (mousewheel)));
|
522
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
523
|
+
var defineProperty = __webpack_require__(4586);
|
524
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
525
|
+
var toConsumableArray = __webpack_require__(5153);
|
526
|
+
// EXTERNAL MODULE: external "vue"
|
527
|
+
var external_vue_ = __webpack_require__(5286);
|
528
|
+
// EXTERNAL MODULE: external "../shared"
|
529
|
+
var shared_ = __webpack_require__(5166);
|
530
|
+
;// external "@popperjs/core"
|
531
|
+
var core_x = (y) => {
|
532
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
533
|
+
}
|
534
|
+
var core_y = (x) => (() => (x))
|
535
|
+
const core_namespaceObject = core_x({ ["createPopper"]: () => (__WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper) });
|
536
|
+
;// ../../packages/directives/src/tooltips.ts
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
541
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
542
|
+
/*
|
543
|
+
* Tencent is pleased to support the open source community by making
|
544
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
545
|
+
*
|
546
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
547
|
+
*
|
548
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
549
|
+
*
|
550
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
551
|
+
*
|
552
|
+
* ---------------------------------------------------
|
553
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
554
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
555
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
556
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
557
|
+
*
|
558
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
559
|
+
* the Software.
|
560
|
+
*
|
561
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
562
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
563
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
564
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
565
|
+
* IN THE SOFTWARE.
|
566
|
+
*/
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
var tooltips_nodeList = new WeakMap();
|
571
|
+
var tooltips = {
|
572
|
+
beforeMount: function beforeMount(el, binding) {
|
573
|
+
var opts = getOpts(binding);
|
574
|
+
var trigger = opts.trigger,
|
575
|
+
showOnInit = opts.showOnInit;
|
576
|
+
var popper = renderContent(opts);
|
577
|
+
var delayTimeout = null;
|
578
|
+
if (showOnInit) {
|
579
|
+
(0,external_vue_.nextTick)(function () {
|
580
|
+
show(el);
|
581
|
+
});
|
114
582
|
}
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
function
|
119
|
-
|
120
|
-
|
121
|
-
|
583
|
+
if (trigger === 'hover') {
|
584
|
+
var hideTimeout = null;
|
585
|
+
el.addEventListener('mouseenter', function () {
|
586
|
+
delayTimeout = setTimeout(function () {
|
587
|
+
show(el);
|
588
|
+
clearTimeout(hideTimeout);
|
589
|
+
clearTimeout(delayTimeout);
|
590
|
+
}, opts.delay);
|
591
|
+
});
|
592
|
+
popper.addEventListener('mouseenter', function () {
|
593
|
+
clearTimeout(hideTimeout);
|
594
|
+
});
|
595
|
+
el.addEventListener('mouseleave', function () {
|
596
|
+
clearTimeout(delayTimeout);
|
597
|
+
hideTimeout = setTimeout(function () {
|
598
|
+
hide(el);
|
599
|
+
}, 100);
|
600
|
+
});
|
601
|
+
el.addEventListener('click', function () {
|
602
|
+
hide(el);
|
603
|
+
});
|
604
|
+
popper.addEventListener('mouseleave', function () {
|
605
|
+
clearTimeout(delayTimeout);
|
606
|
+
hideTimeout = setTimeout(function () {
|
607
|
+
hide(el);
|
608
|
+
}, 100);
|
609
|
+
});
|
610
|
+
} else if (trigger === 'click') {
|
611
|
+
document.body.addEventListener('click', function (event) {
|
612
|
+
if (el.contains(event.target) && !popper.hasAttribute('data-show')) {
|
613
|
+
delayTimeout = setTimeout(function () {
|
614
|
+
show(el);
|
615
|
+
clearTimeout(delayTimeout);
|
616
|
+
}, opts.delay);
|
617
|
+
} else if (popper.hasAttribute('data-show')) {
|
618
|
+
hide(el);
|
122
619
|
}
|
123
|
-
|
124
|
-
|
620
|
+
});
|
621
|
+
}
|
622
|
+
tooltips_nodeList.set(el, {
|
623
|
+
opts: opts,
|
624
|
+
popper: popper,
|
625
|
+
popperInstance: null
|
125
626
|
});
|
627
|
+
},
|
628
|
+
updated: function updated(el, binding) {
|
629
|
+
if (tooltips_nodeList.get(el)) {
|
630
|
+
tooltips_nodeList.get(el).opts = getOpts(binding);
|
631
|
+
}
|
632
|
+
},
|
633
|
+
unmounted: function unmounted(el) {
|
634
|
+
hide(el);
|
635
|
+
tooltips_nodeList["delete"](el);
|
126
636
|
}
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
637
|
+
};
|
638
|
+
/**
|
639
|
+
* 初始化配置
|
640
|
+
* @returns tooltips配置
|
641
|
+
*/
|
642
|
+
function initOptions() {
|
643
|
+
var defaultOpts = {
|
644
|
+
arrow: true,
|
645
|
+
disabled: false,
|
646
|
+
trigger: 'hover',
|
647
|
+
theme: 'dark',
|
648
|
+
content: '',
|
649
|
+
showOnInit: false,
|
650
|
+
placement: 'top',
|
651
|
+
distance: 8,
|
652
|
+
extCls: '',
|
653
|
+
sameWidth: false,
|
654
|
+
delay: 0,
|
655
|
+
onShow: function onShow() {},
|
656
|
+
onHide: function onHide() {}
|
657
|
+
};
|
658
|
+
return defaultOpts;
|
659
|
+
}
|
660
|
+
/**
|
661
|
+
* 获取配置
|
662
|
+
* @returns tooltips配置
|
663
|
+
*/
|
664
|
+
function getOpts(binding) {
|
665
|
+
var opts = initOptions();
|
666
|
+
if ((0,esm_typeof["default"])(binding.value) === 'object') {
|
667
|
+
Object.assign(opts, binding.value);
|
668
|
+
} else {
|
669
|
+
opts.content = binding.value;
|
670
|
+
}
|
671
|
+
return opts;
|
672
|
+
}
|
673
|
+
/**
|
674
|
+
* 创建tooltips DOM
|
675
|
+
* @param opts
|
676
|
+
* @returns
|
677
|
+
*/
|
678
|
+
function renderContext(value, content) {
|
679
|
+
if (typeof value === 'string') {
|
680
|
+
content.innerText = value;
|
681
|
+
} else {
|
682
|
+
// 如果 content 是 Vue 组件的实例,则挂载它
|
683
|
+
var container = document.createElement('div');
|
684
|
+
var vnode = (0,external_vue_.h)(value);
|
685
|
+
(0,external_vue_.render)(vnode, container);
|
686
|
+
content.innerHTML = container.innerHTML;
|
687
|
+
}
|
688
|
+
}
|
689
|
+
function renderContent(opts) {
|
690
|
+
var value = opts.content,
|
691
|
+
hasArrow = opts.arrow,
|
692
|
+
theme = opts.theme,
|
693
|
+
extCls = opts.extCls;
|
694
|
+
var isLight = theme === 'light';
|
695
|
+
var zIndex = shared_.bkZIndexManager.getPopperIndex();
|
696
|
+
var content = document.createElement('div');
|
697
|
+
var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
|
698
|
+
content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
|
699
|
+
content.innerText = value;
|
700
|
+
content.style.zIndex = String(zIndex);
|
701
|
+
renderContext(value, content);
|
702
|
+
if (hasArrow) {
|
703
|
+
var arrow = renderArrow();
|
704
|
+
content.appendChild(arrow);
|
705
|
+
}
|
706
|
+
return content;
|
707
|
+
}
|
708
|
+
/**
|
709
|
+
* 渲染箭头dom
|
710
|
+
* @returns arrow DOM
|
711
|
+
*/
|
712
|
+
function renderArrow() {
|
713
|
+
var arrow = document.createElement('div');
|
714
|
+
var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
|
715
|
+
arrow.className = (0,shared_.resolveClassName)('popper-arrow', prefix);
|
716
|
+
arrow.setAttribute('data-popper-arrow', '');
|
717
|
+
return arrow;
|
718
|
+
}
|
719
|
+
/**
|
720
|
+
* 创建popper实例
|
721
|
+
* @param el
|
722
|
+
* @param popper
|
723
|
+
* @returns popper实例
|
724
|
+
*/
|
725
|
+
function createPopperInstance(el, popper) {
|
726
|
+
var _nodeList$get = tooltips_nodeList.get(el),
|
727
|
+
opts = _nodeList$get.opts;
|
728
|
+
var placement = opts.placement,
|
729
|
+
distance = opts.distance,
|
730
|
+
sameWidth = opts.sameWidth;
|
731
|
+
var popperInstance = (0,core_namespaceObject.createPopper)(el, popper, {
|
732
|
+
placement: placement,
|
733
|
+
modifiers: [{
|
734
|
+
name: 'offset',
|
735
|
+
options: {
|
736
|
+
offset: [0, distance]
|
137
737
|
}
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
if (u) {
|
143
|
-
if (u === y) continue;
|
144
|
-
return u;
|
145
|
-
}
|
146
|
-
}
|
147
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
148
|
-
if (o === h) throw o = s, n.arg;
|
149
|
-
n.dispatchException(n.arg);
|
150
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
151
|
-
o = f;
|
152
|
-
var p = tryCatch(e, r, n);
|
153
|
-
if ("normal" === p.type) {
|
154
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
155
|
-
return {
|
156
|
-
value: p.arg,
|
157
|
-
done: n.done
|
158
|
-
};
|
159
|
-
}
|
160
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
738
|
+
}, {
|
739
|
+
name: 'arrow',
|
740
|
+
options: {
|
741
|
+
padding: 5
|
161
742
|
}
|
162
|
-
}
|
743
|
+
}].concat((0,toConsumableArray["default"])(sameWidth ? [{
|
744
|
+
name: 'sameWidth',
|
745
|
+
enabled: true,
|
746
|
+
phase: 'beforeWrite',
|
747
|
+
requires: ['computeStyles'],
|
748
|
+
fn: function fn(_ref) {
|
749
|
+
var state = _ref.state;
|
750
|
+
state.styles.popper.width = "".concat(state.rects.reference.width, "px");
|
751
|
+
},
|
752
|
+
effect: function effect(_ref2) {
|
753
|
+
var state = _ref2.state;
|
754
|
+
state.elements.popper.style.overflowWrap = 'break-word';
|
755
|
+
state.elements.popper.style.width = "".concat(state.elements.reference.offsetWidth, "px");
|
756
|
+
}
|
757
|
+
}] : []))
|
758
|
+
});
|
759
|
+
return popperInstance;
|
760
|
+
}
|
761
|
+
/**
|
762
|
+
* 显示
|
763
|
+
* @param el
|
764
|
+
*/
|
765
|
+
function show(el) {
|
766
|
+
var _nodeList$get2 = tooltips_nodeList.get(el),
|
767
|
+
popper = _nodeList$get2.popper,
|
768
|
+
opts = _nodeList$get2.opts;
|
769
|
+
var disabled = opts.disabled,
|
770
|
+
content = opts.content,
|
771
|
+
hasArrow = opts.arrow,
|
772
|
+
onShow = opts.onShow,
|
773
|
+
boundary = opts.boundary,
|
774
|
+
_opts$modifiers = opts.modifiers,
|
775
|
+
modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
|
776
|
+
if (disabled) return;
|
777
|
+
renderContext(content, popper);
|
778
|
+
if (hasArrow) {
|
779
|
+
var arrow = renderArrow();
|
780
|
+
popper.appendChild(arrow);
|
163
781
|
}
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
782
|
+
var container = document.body;
|
783
|
+
if (boundary) {
|
784
|
+
if (boundary === 'parent') {
|
785
|
+
container = el.parentElement;
|
786
|
+
} else if (boundary instanceof HTMLElement) {
|
787
|
+
container = boundary;
|
788
|
+
}
|
172
789
|
}
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
790
|
+
container.appendChild(popper);
|
791
|
+
var popperInstance = createPopperInstance(el, popper);
|
792
|
+
onShow();
|
793
|
+
// Make the tooltip visible
|
794
|
+
popper.setAttribute('data-show', '');
|
795
|
+
// Enable the event listeners
|
796
|
+
popperInstance.setOptions(function (options) {
|
797
|
+
return _objectSpread(_objectSpread({}, options), {}, {
|
798
|
+
modifiers: [].concat((0,toConsumableArray["default"])(options.modifiers), (0,toConsumableArray["default"])(modifiers), [{
|
799
|
+
name: 'eventListeners',
|
800
|
+
enabled: true
|
801
|
+
}])
|
802
|
+
});
|
803
|
+
});
|
804
|
+
// Update its position
|
805
|
+
popperInstance.forceUpdate();
|
806
|
+
tooltips_nodeList.get(el).popperInstance = popperInstance;
|
807
|
+
}
|
808
|
+
/**
|
809
|
+
* 隐藏
|
810
|
+
* @param el
|
811
|
+
*/
|
812
|
+
function hide(el) {
|
813
|
+
if (!tooltips_nodeList.get(el)) return;
|
814
|
+
var _nodeList$get3 = tooltips_nodeList.get(el),
|
815
|
+
popper = _nodeList$get3.popper,
|
816
|
+
popperInstance = _nodeList$get3.popperInstance,
|
817
|
+
opts = _nodeList$get3.opts;
|
818
|
+
var onHide = opts.onHide;
|
819
|
+
if (popper && document.body.contains(popper)) {
|
820
|
+
var _popper$parentNode;
|
821
|
+
popper.removeAttribute('data-show');
|
822
|
+
popperInstance === null || popperInstance === void 0 || popperInstance.destroy();
|
823
|
+
popper === null || popper === void 0 || (_popper$parentNode = popper.parentNode) === null || _popper$parentNode === void 0 || _popper$parentNode.removeChild(popper);
|
824
|
+
onHide();
|
825
|
+
}
|
826
|
+
}
|
827
|
+
/* harmony default export */ const src_tooltips = (tooltips);
|
828
|
+
;// external "../loading"
|
829
|
+
var external_loading_x = (y) => {
|
830
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
831
|
+
}
|
832
|
+
var external_loading_y = (x) => (() => (x))
|
833
|
+
const external_loading_namespaceObject = external_loading_x({ });
|
834
|
+
;// external "../overflow-title"
|
835
|
+
var external_overflow_title_x = (y) => {
|
836
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
837
|
+
}
|
838
|
+
var external_overflow_title_y = (x) => (() => (x))
|
839
|
+
const external_overflow_title_namespaceObject = external_overflow_title_x({ });
|
840
|
+
;// ../../packages/directives/src/index.ts
|
841
|
+
/*
|
842
|
+
* Tencent is pleased to support the open source community by making
|
843
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
844
|
+
*
|
845
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
846
|
+
*
|
847
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
848
|
+
*
|
849
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
850
|
+
*
|
851
|
+
* ---------------------------------------------------
|
852
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
853
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
854
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
855
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
856
|
+
*
|
857
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
858
|
+
* the Software.
|
859
|
+
*
|
860
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
861
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
862
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
863
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
864
|
+
* IN THE SOFTWARE.
|
865
|
+
*/
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
|
872
|
+
// export { createInstance as bkEllipsisInstance } from './ellipsis';
|
873
|
+
|
874
|
+
/***/ }),
|
875
|
+
|
876
|
+
/***/ 5022:
|
877
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
878
|
+
|
879
|
+
/**
|
880
|
+
* Copyright (c) 2015, Facebook, Inc.
|
881
|
+
* All rights reserved.
|
882
|
+
*
|
883
|
+
* This source code is licensed under the BSD-style license found in the
|
884
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
885
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
886
|
+
*
|
887
|
+
* @providesModule normalizeWheel
|
888
|
+
* @typechecks
|
889
|
+
*/
|
890
|
+
|
891
|
+
|
892
|
+
|
893
|
+
var UserAgent_DEPRECATED = __webpack_require__(7416);
|
894
|
+
|
895
|
+
var isEventSupported = __webpack_require__(2586);
|
896
|
+
|
897
|
+
|
898
|
+
// Reasonable defaults
|
899
|
+
var PIXEL_STEP = 10;
|
900
|
+
var LINE_HEIGHT = 40;
|
901
|
+
var PAGE_HEIGHT = 800;
|
902
|
+
|
903
|
+
/**
|
904
|
+
* Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
|
905
|
+
* complicated, thus this doc is long and (hopefully) detailed enough to answer
|
906
|
+
* your questions.
|
907
|
+
*
|
908
|
+
* If you need to react to the mouse wheel in a predictable way, this code is
|
909
|
+
* like your bestest friend. * hugs *
|
910
|
+
*
|
911
|
+
* As of today, there are 4 DOM event types you can listen to:
|
912
|
+
*
|
913
|
+
* 'wheel' -- Chrome(31+), FF(17+), IE(9+)
|
914
|
+
* 'mousewheel' -- Chrome, IE(6+), Opera, Safari
|
915
|
+
* 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
|
916
|
+
* 'DOMMouseScroll' -- FF(0.9.7+) since 2003
|
917
|
+
*
|
918
|
+
* So what to do? The is the best:
|
919
|
+
*
|
920
|
+
* normalizeWheel.getEventType();
|
921
|
+
*
|
922
|
+
* In your event callback, use this code to get sane interpretation of the
|
923
|
+
* deltas. This code will return an object with properties:
|
924
|
+
*
|
925
|
+
* spinX -- normalized spin speed (use for zoom) - x plane
|
926
|
+
* spinY -- " - y plane
|
927
|
+
* pixelX -- normalized distance (to pixels) - x plane
|
928
|
+
* pixelY -- " - y plane
|
929
|
+
*
|
930
|
+
* Wheel values are provided by the browser assuming you are using the wheel to
|
931
|
+
* scroll a web page by a number of lines or pixels (or pages). Values can vary
|
932
|
+
* significantly on different platforms and browsers, forgetting that you can
|
933
|
+
* scroll at different speeds. Some devices (like trackpads) emit more events
|
934
|
+
* at smaller increments with fine granularity, and some emit massive jumps with
|
935
|
+
* linear speed or acceleration.
|
936
|
+
*
|
937
|
+
* This code does its best to normalize the deltas for you:
|
938
|
+
*
|
939
|
+
* - spin is trying to normalize how far the wheel was spun (or trackpad
|
940
|
+
* dragged). This is super useful for zoom support where you want to
|
941
|
+
* throw away the chunky scroll steps on the PC and make those equal to
|
942
|
+
* the slow and smooth tiny steps on the Mac. Key data: This code tries to
|
943
|
+
* resolve a single slow step on a wheel to 1.
|
944
|
+
*
|
945
|
+
* - pixel is normalizing the desired scroll delta in pixel units. You'll
|
946
|
+
* get the crazy differences between browsers, but at least it'll be in
|
947
|
+
* pixels!
|
948
|
+
*
|
949
|
+
* - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
|
950
|
+
* should translate to positive value zooming IN, negative zooming OUT.
|
951
|
+
* This matches the newer 'wheel' event.
|
952
|
+
*
|
953
|
+
* Why are there spinX, spinY (or pixels)?
|
954
|
+
*
|
955
|
+
* - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
|
956
|
+
* with a mouse. It results in side-scrolling in the browser by default.
|
957
|
+
*
|
958
|
+
* - spinY is what you expect -- it's the classic axis of a mouse wheel.
|
959
|
+
*
|
960
|
+
* - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
|
961
|
+
* probably is by browsers in conjunction with fancy 3D controllers .. but
|
962
|
+
* you know.
|
963
|
+
*
|
964
|
+
* Implementation info:
|
965
|
+
*
|
966
|
+
* Examples of 'wheel' event if you scroll slowly (down) by one step with an
|
967
|
+
* average mouse:
|
968
|
+
*
|
969
|
+
* OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
|
970
|
+
* OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
|
971
|
+
* OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
|
972
|
+
* Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
|
973
|
+
* Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
|
974
|
+
*
|
975
|
+
* On the trackpad:
|
976
|
+
*
|
977
|
+
* OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
|
978
|
+
* OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
|
979
|
+
*
|
980
|
+
* On other/older browsers.. it's more complicated as there can be multiple and
|
981
|
+
* also missing delta values.
|
982
|
+
*
|
983
|
+
* The 'wheel' event is more standard:
|
984
|
+
*
|
985
|
+
* http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
|
986
|
+
*
|
987
|
+
* The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
|
988
|
+
* deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
|
989
|
+
* backward compatibility with older events. Those other values help us
|
990
|
+
* better normalize spin speed. Example of what the browsers provide:
|
991
|
+
*
|
992
|
+
* | event.wheelDelta | event.detail
|
993
|
+
* ------------------+------------------+--------------
|
994
|
+
* Safari v5/OS X | -120 | 0
|
995
|
+
* Safari v5/Win7 | -120 | 0
|
996
|
+
* Chrome v17/OS X | -120 | 0
|
997
|
+
* Chrome v17/Win7 | -120 | 0
|
998
|
+
* IE9/Win7 | -120 | undefined
|
999
|
+
* Firefox v4/OS X | undefined | 1
|
1000
|
+
* Firefox v4/Win7 | undefined | 3
|
1001
|
+
*
|
1002
|
+
*/
|
1003
|
+
function normalizeWheel(/*object*/ event) /*object*/ {
|
1004
|
+
var sX = 0, sY = 0, // spinX, spinY
|
1005
|
+
pX = 0, pY = 0; // pixelX, pixelY
|
1006
|
+
|
1007
|
+
// Legacy
|
1008
|
+
if ('detail' in event) { sY = event.detail; }
|
1009
|
+
if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
|
1010
|
+
if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
|
1011
|
+
if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
|
1012
|
+
|
1013
|
+
// side scrolling on FF with DOMMouseScroll
|
1014
|
+
if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
|
1015
|
+
sX = sY;
|
1016
|
+
sY = 0;
|
178
1017
|
}
|
179
|
-
|
180
|
-
|
181
|
-
|
1018
|
+
|
1019
|
+
pX = sX * PIXEL_STEP;
|
1020
|
+
pY = sY * PIXEL_STEP;
|
1021
|
+
|
1022
|
+
if ('deltaY' in event) { pY = event.deltaY; }
|
1023
|
+
if ('deltaX' in event) { pX = event.deltaX; }
|
1024
|
+
|
1025
|
+
if ((pX || pY) && event.deltaMode) {
|
1026
|
+
if (event.deltaMode == 1) { // delta in LINE units
|
1027
|
+
pX *= LINE_HEIGHT;
|
1028
|
+
pY *= LINE_HEIGHT;
|
1029
|
+
} else { // delta in PAGE units
|
1030
|
+
pX *= PAGE_HEIGHT;
|
1031
|
+
pY *= PAGE_HEIGHT;
|
1032
|
+
}
|
182
1033
|
}
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
1034
|
+
|
1035
|
+
// Fall-back if spin cannot be determined
|
1036
|
+
if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
|
1037
|
+
if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
|
1038
|
+
|
1039
|
+
return { spinX : sX,
|
1040
|
+
spinY : sY,
|
1041
|
+
pixelX : pX,
|
1042
|
+
pixelY : pY };
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
|
1046
|
+
/**
|
1047
|
+
* The best combination if you prefer spinX + spinY normalization. It favors
|
1048
|
+
* the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
|
1049
|
+
* 'wheel' event, making spin speed determination impossible.
|
1050
|
+
*/
|
1051
|
+
normalizeWheel.getEventType = function() /*string*/ {
|
1052
|
+
return (UserAgent_DEPRECATED.firefox())
|
1053
|
+
? 'DOMMouseScroll'
|
1054
|
+
: (isEventSupported('wheel'))
|
1055
|
+
? 'wheel'
|
1056
|
+
: 'mousewheel';
|
1057
|
+
};
|
1058
|
+
|
1059
|
+
module.exports = normalizeWheel;
|
1060
|
+
|
1061
|
+
|
1062
|
+
/***/ }),
|
1063
|
+
|
1064
|
+
/***/ 5153:
|
1065
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1066
|
+
|
1067
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1068
|
+
/* harmony export */ "default": () => (/* binding */ _toConsumableArray)
|
1069
|
+
/* harmony export */ });
|
1070
|
+
/* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3492);
|
1071
|
+
/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4430);
|
1072
|
+
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7985);
|
1073
|
+
/* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2880);
|
1074
|
+
|
1075
|
+
|
1076
|
+
|
1077
|
+
|
1078
|
+
function _toConsumableArray(arr) {
|
1079
|
+
return (0,_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr) || (0,_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
|
1080
|
+
}
|
1081
|
+
|
1082
|
+
/***/ }),
|
1083
|
+
|
1084
|
+
/***/ 5166:
|
1085
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1086
|
+
|
1087
|
+
var x = (y) => {
|
1088
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1089
|
+
}
|
1090
|
+
var y = (x) => (() => (x))
|
1091
|
+
module.exports = x({ ["PropTypes"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes), ["arrayEqual"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.arrayEqual), ["bkZIndexManager"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager), ["capitalize"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.capitalize), ["debounce"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.debounce), ["resolveClassName"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName), ["withInstallProps"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstallProps) });
|
1092
|
+
|
1093
|
+
/***/ }),
|
1094
|
+
|
1095
|
+
/***/ 5286:
|
1096
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1097
|
+
|
1098
|
+
var x = (y) => {
|
1099
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1100
|
+
}
|
1101
|
+
var y = (x) => (() => (x))
|
1102
|
+
module.exports = x({ ["computed"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.computed), ["createTextVNode"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode), ["createVNode"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.createVNode), ["defineComponent"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.defineComponent), ["h"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.h), ["mergeProps"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.mergeProps), ["nextTick"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.nextTick), ["reactive"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.reactive), ["ref"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.ref), ["render"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.render), ["resolveDirective"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective), ["toRefs"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.toRefs), ["watch"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.watch), ["withDirectives"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.withDirectives) });
|
1103
|
+
|
1104
|
+
/***/ }),
|
1105
|
+
|
1106
|
+
/***/ 6284:
|
1107
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1108
|
+
|
1109
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1110
|
+
/* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
|
1111
|
+
/* harmony export */ });
|
1112
|
+
function _arrayLikeToArray(arr, len) {
|
1113
|
+
if (len == null || len > arr.length) len = arr.length;
|
1114
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
1115
|
+
return arr2;
|
1116
|
+
}
|
1117
|
+
|
1118
|
+
/***/ }),
|
1119
|
+
|
1120
|
+
/***/ 7416:
|
1121
|
+
/***/ ((module) => {
|
1122
|
+
|
1123
|
+
/**
|
1124
|
+
* Copyright 2004-present Facebook. All Rights Reserved.
|
1125
|
+
*
|
1126
|
+
* @providesModule UserAgent_DEPRECATED
|
1127
|
+
*/
|
1128
|
+
|
1129
|
+
/**
|
1130
|
+
* Provides entirely client-side User Agent and OS detection. You should prefer
|
1131
|
+
* the non-deprecated UserAgent module when possible, which exposes our
|
1132
|
+
* authoritative server-side PHP-based detection to the client.
|
1133
|
+
*
|
1134
|
+
* Usage is straightforward:
|
1135
|
+
*
|
1136
|
+
* if (UserAgent_DEPRECATED.ie()) {
|
1137
|
+
* // IE
|
1138
|
+
* }
|
1139
|
+
*
|
1140
|
+
* You can also do version checks:
|
1141
|
+
*
|
1142
|
+
* if (UserAgent_DEPRECATED.ie() >= 7) {
|
1143
|
+
* // IE7 or better
|
1144
|
+
* }
|
1145
|
+
*
|
1146
|
+
* The browser functions will return NaN if the browser does not match, so
|
1147
|
+
* you can also do version compares the other way:
|
1148
|
+
*
|
1149
|
+
* if (UserAgent_DEPRECATED.ie() < 7) {
|
1150
|
+
* // IE6 or worse
|
1151
|
+
* }
|
1152
|
+
*
|
1153
|
+
* Note that the version is a float and may include a minor version number,
|
1154
|
+
* so you should always use range operators to perform comparisons, not
|
1155
|
+
* strict equality.
|
1156
|
+
*
|
1157
|
+
* **Note:** You should **strongly** prefer capability detection to browser
|
1158
|
+
* version detection where it's reasonable:
|
1159
|
+
*
|
1160
|
+
* http://www.quirksmode.org/js/support.html
|
1161
|
+
*
|
1162
|
+
* Further, we have a large number of mature wrapper functions and classes
|
1163
|
+
* which abstract away many browser irregularities. Check the documentation,
|
1164
|
+
* grep for things, or ask on javascript@lists.facebook.com before writing yet
|
1165
|
+
* another copy of "event || window.event".
|
1166
|
+
*
|
1167
|
+
*/
|
1168
|
+
|
1169
|
+
var _populated = false;
|
1170
|
+
|
1171
|
+
// Browsers
|
1172
|
+
var _ie, _firefox, _opera, _webkit, _chrome;
|
1173
|
+
|
1174
|
+
// Actual IE browser for compatibility mode
|
1175
|
+
var _ie_real_version;
|
1176
|
+
|
1177
|
+
// Platforms
|
1178
|
+
var _osx, _windows, _linux, _android;
|
1179
|
+
|
1180
|
+
// Architectures
|
1181
|
+
var _win64;
|
1182
|
+
|
1183
|
+
// Devices
|
1184
|
+
var _iphone, _ipad, _native;
|
1185
|
+
|
1186
|
+
var _mobile;
|
1187
|
+
|
1188
|
+
function _populate() {
|
1189
|
+
if (_populated) {
|
1190
|
+
return;
|
187
1191
|
}
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
1192
|
+
|
1193
|
+
_populated = true;
|
1194
|
+
|
1195
|
+
// To work around buggy JS libraries that can't handle multi-digit
|
1196
|
+
// version numbers, Opera 10's user agent string claims it's Opera
|
1197
|
+
// 9, then later includes a Version/X.Y field:
|
1198
|
+
//
|
1199
|
+
// Opera/9.80 (foo) Presto/2.2.15 Version/10.10
|
1200
|
+
var uas = navigator.userAgent;
|
1201
|
+
var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
|
1202
|
+
var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
|
1203
|
+
|
1204
|
+
_iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
|
1205
|
+
_ipad = /\b(iP[ao]d)/.exec(uas);
|
1206
|
+
_android = /Android/i.exec(uas);
|
1207
|
+
_native = /FBAN\/\w+;/i.exec(uas);
|
1208
|
+
_mobile = /Mobile/i.exec(uas);
|
1209
|
+
|
1210
|
+
// Note that the IE team blog would have you believe you should be checking
|
1211
|
+
// for 'Win64; x64'. But MSDN then reveals that you can actually be coming
|
1212
|
+
// from either x64 or ia64; so ultimately, you should just check for Win64
|
1213
|
+
// as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
|
1214
|
+
// Windows will send 'WOW64' instead.
|
1215
|
+
_win64 = !!(/Win64/.exec(uas));
|
1216
|
+
|
1217
|
+
if (agent) {
|
1218
|
+
_ie = agent[1] ? parseFloat(agent[1]) : (
|
1219
|
+
agent[5] ? parseFloat(agent[5]) : NaN);
|
1220
|
+
// IE compatibility mode
|
1221
|
+
if (_ie && document && document.documentMode) {
|
1222
|
+
_ie = document.documentMode;
|
1223
|
+
}
|
1224
|
+
// grab the "true" ie version from the trident token if available
|
1225
|
+
var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
|
1226
|
+
_ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
|
1227
|
+
|
1228
|
+
_firefox = agent[2] ? parseFloat(agent[2]) : NaN;
|
1229
|
+
_opera = agent[3] ? parseFloat(agent[3]) : NaN;
|
1230
|
+
_webkit = agent[4] ? parseFloat(agent[4]) : NaN;
|
1231
|
+
if (_webkit) {
|
1232
|
+
// We do not add the regexp to the above test, because it will always
|
1233
|
+
// match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
|
1234
|
+
// the userAgent string.
|
1235
|
+
agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
|
1236
|
+
_chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
|
1237
|
+
} else {
|
1238
|
+
_chrome = NaN;
|
201
1239
|
}
|
202
|
-
|
1240
|
+
} else {
|
1241
|
+
_ie = _firefox = _opera = _chrome = _webkit = NaN;
|
203
1242
|
}
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
__await: t
|
218
|
-
};
|
219
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
220
|
-
return this;
|
221
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
222
|
-
void 0 === i && (i = Promise);
|
223
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
224
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
225
|
-
return t.done ? t.value : a.next();
|
226
|
-
});
|
227
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
228
|
-
return this;
|
229
|
-
}), define(g, "toString", function () {
|
230
|
-
return "[object Generator]";
|
231
|
-
}), e.keys = function (t) {
|
232
|
-
var e = Object(t),
|
233
|
-
r = [];
|
234
|
-
for (var n in e) r.push(n);
|
235
|
-
return r.reverse(), function next() {
|
236
|
-
for (; r.length;) {
|
237
|
-
var t = r.pop();
|
238
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
239
|
-
}
|
240
|
-
return next.done = !0, next;
|
241
|
-
};
|
242
|
-
}, e.values = values, Context.prototype = {
|
243
|
-
constructor: Context,
|
244
|
-
reset: function reset(e) {
|
245
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
246
|
-
},
|
247
|
-
stop: function stop() {
|
248
|
-
this.done = !0;
|
249
|
-
var t = this.tryEntries[0].completion;
|
250
|
-
if ("throw" === t.type) throw t.arg;
|
251
|
-
return this.rval;
|
252
|
-
},
|
253
|
-
dispatchException: function dispatchException(e) {
|
254
|
-
if (this.done) throw e;
|
255
|
-
var r = this;
|
256
|
-
function handle(n, o) {
|
257
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
258
|
-
}
|
259
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
260
|
-
var i = this.tryEntries[o],
|
261
|
-
a = i.completion;
|
262
|
-
if ("root" === i.tryLoc) return handle("end");
|
263
|
-
if (i.tryLoc <= this.prev) {
|
264
|
-
var c = n.call(i, "catchLoc"),
|
265
|
-
u = n.call(i, "finallyLoc");
|
266
|
-
if (c && u) {
|
267
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
268
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
269
|
-
} else if (c) {
|
270
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
271
|
-
} else {
|
272
|
-
if (!u) throw new Error("try statement without catch or finally");
|
273
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
274
|
-
}
|
275
|
-
}
|
276
|
-
}
|
277
|
-
},
|
278
|
-
abrupt: function abrupt(t, e) {
|
279
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
280
|
-
var o = this.tryEntries[r];
|
281
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
282
|
-
var i = o;
|
283
|
-
break;
|
284
|
-
}
|
285
|
-
}
|
286
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
287
|
-
var a = i ? i.completion : {};
|
288
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
289
|
-
},
|
290
|
-
complete: function complete(t, e) {
|
291
|
-
if ("throw" === t.type) throw t.arg;
|
292
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
293
|
-
},
|
294
|
-
finish: function finish(t) {
|
295
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
296
|
-
var r = this.tryEntries[e];
|
297
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
298
|
-
}
|
299
|
-
},
|
300
|
-
"catch": function _catch(t) {
|
301
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
302
|
-
var r = this.tryEntries[e];
|
303
|
-
if (r.tryLoc === t) {
|
304
|
-
var n = r.completion;
|
305
|
-
if ("throw" === n.type) {
|
306
|
-
var o = n.arg;
|
307
|
-
resetTryEntry(r);
|
308
|
-
}
|
309
|
-
return o;
|
310
|
-
}
|
311
|
-
}
|
312
|
-
throw new Error("illegal catch attempt");
|
313
|
-
},
|
314
|
-
delegateYield: function delegateYield(e, r, n) {
|
315
|
-
return this.delegate = {
|
316
|
-
iterator: values(e),
|
317
|
-
resultName: r,
|
318
|
-
nextLoc: n
|
319
|
-
}, "next" === this.method && (this.arg = t), y;
|
1243
|
+
|
1244
|
+
if (os) {
|
1245
|
+
if (os[1]) {
|
1246
|
+
// Detect OS X version. If no version number matches, set _osx to true.
|
1247
|
+
// Version examples: 10, 10_6_1, 10.7
|
1248
|
+
// Parses version number as a float, taking only first two sets of
|
1249
|
+
// digits. If only one set of digits is found, returns just the major
|
1250
|
+
// version number.
|
1251
|
+
var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
|
1252
|
+
|
1253
|
+
_osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
|
1254
|
+
} else {
|
1255
|
+
_osx = false;
|
320
1256
|
}
|
321
|
-
|
1257
|
+
_windows = !!os[2];
|
1258
|
+
_linux = !!os[3];
|
1259
|
+
} else {
|
1260
|
+
_osx = _windows = _linux = false;
|
1261
|
+
}
|
322
1262
|
}
|
323
|
-
|
1263
|
+
|
1264
|
+
var UserAgent_DEPRECATED = {
|
1265
|
+
|
1266
|
+
/**
|
1267
|
+
* Check if the UA is Internet Explorer.
|
1268
|
+
*
|
1269
|
+
*
|
1270
|
+
* @return float|NaN Version number (if match) or NaN.
|
1271
|
+
*/
|
1272
|
+
ie: function() {
|
1273
|
+
return _populate() || _ie;
|
1274
|
+
},
|
1275
|
+
|
1276
|
+
/**
|
1277
|
+
* Check if we're in Internet Explorer compatibility mode.
|
1278
|
+
*
|
1279
|
+
* @return bool true if in compatibility mode, false if
|
1280
|
+
* not compatibility mode or not ie
|
1281
|
+
*/
|
1282
|
+
ieCompatibilityMode: function() {
|
1283
|
+
return _populate() || (_ie_real_version > _ie);
|
1284
|
+
},
|
1285
|
+
|
1286
|
+
|
1287
|
+
/**
|
1288
|
+
* Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
|
1289
|
+
* only need this because Skype can't handle 64-bit IE yet. We need to remove
|
1290
|
+
* this when we don't need it -- tracked by #601957.
|
1291
|
+
*/
|
1292
|
+
ie64: function() {
|
1293
|
+
return UserAgent_DEPRECATED.ie() && _win64;
|
1294
|
+
},
|
1295
|
+
|
1296
|
+
/**
|
1297
|
+
* Check if the UA is Firefox.
|
1298
|
+
*
|
1299
|
+
*
|
1300
|
+
* @return float|NaN Version number (if match) or NaN.
|
1301
|
+
*/
|
1302
|
+
firefox: function() {
|
1303
|
+
return _populate() || _firefox;
|
1304
|
+
},
|
1305
|
+
|
1306
|
+
|
1307
|
+
/**
|
1308
|
+
* Check if the UA is Opera.
|
1309
|
+
*
|
1310
|
+
*
|
1311
|
+
* @return float|NaN Version number (if match) or NaN.
|
1312
|
+
*/
|
1313
|
+
opera: function() {
|
1314
|
+
return _populate() || _opera;
|
1315
|
+
},
|
1316
|
+
|
1317
|
+
|
1318
|
+
/**
|
1319
|
+
* Check if the UA is WebKit.
|
1320
|
+
*
|
1321
|
+
*
|
1322
|
+
* @return float|NaN Version number (if match) or NaN.
|
1323
|
+
*/
|
1324
|
+
webkit: function() {
|
1325
|
+
return _populate() || _webkit;
|
1326
|
+
},
|
1327
|
+
|
1328
|
+
/**
|
1329
|
+
* For Push
|
1330
|
+
* WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
|
1331
|
+
*/
|
1332
|
+
safari: function() {
|
1333
|
+
return UserAgent_DEPRECATED.webkit();
|
1334
|
+
},
|
1335
|
+
|
1336
|
+
/**
|
1337
|
+
* Check if the UA is a Chrome browser.
|
1338
|
+
*
|
1339
|
+
*
|
1340
|
+
* @return float|NaN Version number (if match) or NaN.
|
1341
|
+
*/
|
1342
|
+
chrome : function() {
|
1343
|
+
return _populate() || _chrome;
|
1344
|
+
},
|
1345
|
+
|
1346
|
+
|
1347
|
+
/**
|
1348
|
+
* Check if the user is running Windows.
|
1349
|
+
*
|
1350
|
+
* @return bool `true' if the user's OS is Windows.
|
1351
|
+
*/
|
1352
|
+
windows: function() {
|
1353
|
+
return _populate() || _windows;
|
1354
|
+
},
|
1355
|
+
|
1356
|
+
|
1357
|
+
/**
|
1358
|
+
* Check if the user is running Mac OS X.
|
1359
|
+
*
|
1360
|
+
* @return float|bool Returns a float if a version number is detected,
|
1361
|
+
* otherwise true/false.
|
1362
|
+
*/
|
1363
|
+
osx: function() {
|
1364
|
+
return _populate() || _osx;
|
1365
|
+
},
|
1366
|
+
|
1367
|
+
/**
|
1368
|
+
* Check if the user is running Linux.
|
1369
|
+
*
|
1370
|
+
* @return bool `true' if the user's OS is some flavor of Linux.
|
1371
|
+
*/
|
1372
|
+
linux: function() {
|
1373
|
+
return _populate() || _linux;
|
1374
|
+
},
|
1375
|
+
|
1376
|
+
/**
|
1377
|
+
* Check if the user is running on an iPhone or iPod platform.
|
1378
|
+
*
|
1379
|
+
* @return bool `true' if the user is running some flavor of the
|
1380
|
+
* iPhone OS.
|
1381
|
+
*/
|
1382
|
+
iphone: function() {
|
1383
|
+
return _populate() || _iphone;
|
1384
|
+
},
|
1385
|
+
|
1386
|
+
mobile: function() {
|
1387
|
+
return _populate() || (_iphone || _ipad || _android || _mobile);
|
1388
|
+
},
|
1389
|
+
|
1390
|
+
nativeApp: function() {
|
1391
|
+
// webviews inside of the native apps
|
1392
|
+
return _populate() || _native;
|
1393
|
+
},
|
1394
|
+
|
1395
|
+
android: function() {
|
1396
|
+
return _populate() || _android;
|
1397
|
+
},
|
1398
|
+
|
1399
|
+
ipad: function() {
|
1400
|
+
return _populate() || _ipad;
|
1401
|
+
}
|
1402
|
+
};
|
1403
|
+
|
1404
|
+
module.exports = UserAgent_DEPRECATED;
|
1405
|
+
|
324
1406
|
|
325
1407
|
/***/ }),
|
326
1408
|
|
327
|
-
/***/
|
328
|
-
/***/ ((
|
1409
|
+
/***/ 7545:
|
1410
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
329
1411
|
|
1412
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1413
|
+
/* harmony export */ "default": () => (/* binding */ _typeof)
|
1414
|
+
/* harmony export */ });
|
330
1415
|
function _typeof(o) {
|
331
1416
|
"@babel/helpers - typeof";
|
332
1417
|
|
333
|
-
return
|
1418
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
334
1419
|
return typeof o;
|
335
1420
|
} : function (o) {
|
336
1421
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
337
|
-
},
|
1422
|
+
}, _typeof(o);
|
1423
|
+
}
|
1424
|
+
|
1425
|
+
/***/ }),
|
1426
|
+
|
1427
|
+
/***/ 7985:
|
1428
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1429
|
+
|
1430
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1431
|
+
/* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
|
1432
|
+
/* harmony export */ });
|
1433
|
+
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6284);
|
1434
|
+
|
1435
|
+
function _unsupportedIterableToArray(o, minLen) {
|
1436
|
+
if (!o) return;
|
1437
|
+
if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
|
1438
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
1439
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
1440
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
1441
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
|
338
1442
|
}
|
339
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
340
1443
|
|
341
1444
|
/***/ }),
|
342
1445
|
|
343
|
-
/***/
|
1446
|
+
/***/ 8283:
|
344
1447
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
345
1448
|
|
346
|
-
|
1449
|
+
module.exports = __webpack_require__(5022);
|
347
1450
|
|
348
|
-
var runtime = __webpack_require__(7609)();
|
349
|
-
module.exports = runtime;
|
350
1451
|
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
1452
|
+
/***/ }),
|
1453
|
+
|
1454
|
+
/***/ 9824:
|
1455
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1456
|
+
|
1457
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1458
|
+
/* harmony export */ "default": () => (/* binding */ toPrimitive)
|
1459
|
+
/* harmony export */ });
|
1460
|
+
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7545);
|
1461
|
+
|
1462
|
+
function toPrimitive(t, r) {
|
1463
|
+
if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t;
|
1464
|
+
var e = t[Symbol.toPrimitive];
|
1465
|
+
if (void 0 !== e) {
|
1466
|
+
var i = e.call(t, r || "default");
|
1467
|
+
if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i;
|
1468
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
359
1469
|
}
|
1470
|
+
return ("string" === r ? String : Number)(t);
|
360
1471
|
}
|
361
1472
|
|
362
|
-
|
363
1473
|
/***/ })
|
364
1474
|
|
365
1475
|
/******/ });
|
@@ -389,6 +1499,18 @@ try {
|
|
389
1499
|
/******/ }
|
390
1500
|
/******/
|
391
1501
|
/************************************************************************/
|
1502
|
+
/******/ /* webpack/runtime/compat get default export */
|
1503
|
+
/******/ (() => {
|
1504
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
1505
|
+
/******/ __webpack_require__.n = (module) => {
|
1506
|
+
/******/ var getter = module && module.__esModule ?
|
1507
|
+
/******/ () => (module['default']) :
|
1508
|
+
/******/ () => (module);
|
1509
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
1510
|
+
/******/ return getter;
|
1511
|
+
/******/ };
|
1512
|
+
/******/ })();
|
1513
|
+
/******/
|
392
1514
|
/******/ /* webpack/runtime/define property getters */
|
393
1515
|
/******/ (() => {
|
394
1516
|
/******/ // define getter functions for harmony exports
|
@@ -408,431 +1530,87 @@ try {
|
|
408
1530
|
/******/
|
409
1531
|
/************************************************************************/
|
410
1532
|
var __webpack_exports__ = {};
|
411
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
412
|
-
(() => {
|
413
1533
|
|
414
1534
|
// EXPORTS
|
415
1535
|
__webpack_require__.d(__webpack_exports__, {
|
416
1536
|
BkCascader: () => (/* binding */ BkCascader),
|
417
1537
|
BkCascaderPanel: () => (/* reexport */ cascader_panel),
|
418
|
-
"default": () => (/* binding */
|
1538
|
+
"default": () => (/* binding */ cascader_src)
|
419
1539
|
});
|
420
1540
|
|
421
|
-
|
422
|
-
var
|
423
|
-
|
424
|
-
|
425
|
-
;//
|
426
|
-
var
|
427
|
-
var
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
var config_provider_y = x => () => x
|
436
|
-
const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
437
|
-
|
438
|
-
var
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
var icon_y = x => () => x
|
444
|
-
const icon_namespaceObject = icon_x({ ["AngleRight"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleRight, ["AngleUp"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleUp, ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Error"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error, ["Spinner"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Spinner });
|
445
|
-
;//
|
446
|
-
var popover_x = y => {
|
447
|
-
var
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
1541
|
+
// EXTERNAL MODULE: external "../shared"
|
1542
|
+
var shared_ = __webpack_require__(5166);
|
1543
|
+
// EXTERNAL MODULE: external "vue"
|
1544
|
+
var external_vue_ = __webpack_require__(5286);
|
1545
|
+
;// external "vue-types"
|
1546
|
+
var x = (y) => {
|
1547
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1548
|
+
}
|
1549
|
+
var y = (x) => (() => (x))
|
1550
|
+
const external_vue_types_namespaceObject = x({ ["array"]: () => (__WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.array), ["object"]: () => (__WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.object) });
|
1551
|
+
;// external "../config-provider"
|
1552
|
+
var config_provider_x = (y) => {
|
1553
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1554
|
+
}
|
1555
|
+
var config_provider_y = (x) => (() => (x))
|
1556
|
+
const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale), ["usePrefix"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix) });
|
1557
|
+
// EXTERNAL MODULE: ../../packages/directives/src/index.ts + 8 modules
|
1558
|
+
var src = __webpack_require__(4923);
|
1559
|
+
;// external "../icon"
|
1560
|
+
var icon_x = (y) => {
|
1561
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1562
|
+
}
|
1563
|
+
var icon_y = (x) => (() => (x))
|
1564
|
+
const icon_namespaceObject = icon_x({ ["AngleRight"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleRight), ["AngleUp"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleUp), ["Close"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close), ["Error"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error), ["Spinner"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Spinner) });
|
1565
|
+
;// external "../popover"
|
1566
|
+
var popover_x = (y) => {
|
1567
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1568
|
+
}
|
1569
|
+
var popover_y = (x) => (() => (x))
|
1570
|
+
const popover_namespaceObject = popover_x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"]) });
|
1571
|
+
;// external "../popover/popover.less"
|
1572
|
+
var popover_less_x = (y) => {
|
1573
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1574
|
+
}
|
1575
|
+
var popover_less_y = (x) => (() => (x))
|
452
1576
|
const popover_less_namespaceObject = popover_less_x({ });
|
453
|
-
;//
|
454
|
-
var
|
455
|
-
var
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
1577
|
+
;// external "../select"
|
1578
|
+
var select_x = (y) => {
|
1579
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1580
|
+
}
|
1581
|
+
var select_y = (x) => (() => (x))
|
1582
|
+
const select_namespaceObject = select_x({ ["useHover"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_select_1a0d1ad7__.useHover) });
|
1583
|
+
;// external "../tag"
|
1584
|
+
var tag_x = (y) => {
|
1585
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1586
|
+
}
|
1587
|
+
var tag_y = (x) => (() => (x))
|
1588
|
+
const tag_namespaceObject = tag_x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_tag_d74826be__["default"]) });
|
1589
|
+
;// external "../tag/tag.less"
|
1590
|
+
var tag_less_x = (y) => {
|
1591
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1592
|
+
}
|
1593
|
+
var tag_less_y = (x) => (() => (x))
|
460
1594
|
const tag_less_namespaceObject = tag_less_x({ });
|
461
|
-
|
462
|
-
var
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
479
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
480
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
481
|
-
*
|
482
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
483
|
-
* the Software.
|
484
|
-
*
|
485
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
486
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
487
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
488
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
489
|
-
* IN THE SOFTWARE.
|
490
|
-
*/
|
491
|
-
|
492
|
-
|
493
|
-
var selectKey = Symbol('BkSelect');
|
494
|
-
var optionGroupKey = Symbol('BkOptionGroup');
|
495
|
-
function useHover() {
|
496
|
-
var isHover = (0,external_vue_namespaceObject.ref)(false);
|
497
|
-
var setHover = function setHover() {
|
498
|
-
isHover.value = true;
|
499
|
-
};
|
500
|
-
var cancelHover = function cancelHover() {
|
501
|
-
isHover.value = false;
|
502
|
-
};
|
503
|
-
return {
|
504
|
-
isHover: isHover,
|
505
|
-
setHover: setHover,
|
506
|
-
cancelHover: cancelHover
|
507
|
-
};
|
508
|
-
}
|
509
|
-
function useRegistry(data) {
|
510
|
-
// 注册item
|
511
|
-
var register = function register(key, item) {
|
512
|
-
if (!item) return;
|
513
|
-
return data.value.set(key, item);
|
514
|
-
};
|
515
|
-
// 删除item
|
516
|
-
var unregister = function unregister(key, item) {
|
517
|
-
if (item) {
|
518
|
-
if (data.value.get(key) !== item) return;
|
519
|
-
data.value["delete"](key);
|
520
|
-
} else {
|
521
|
-
data.value["delete"](key);
|
522
|
-
}
|
523
|
-
};
|
524
|
-
return {
|
525
|
-
register: register,
|
526
|
-
unregister: unregister
|
527
|
-
};
|
528
|
-
}
|
529
|
-
function useDebouncedRef(value) {
|
530
|
-
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
|
531
|
-
var timeout;
|
532
|
-
var innerValue = value;
|
533
|
-
return customRef(function (track, trigger) {
|
534
|
-
return {
|
535
|
-
get: function get() {
|
536
|
-
track();
|
537
|
-
return innerValue;
|
538
|
-
},
|
539
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
540
|
-
set: function set(newValue) {
|
541
|
-
clearTimeout(timeout);
|
542
|
-
if (newValue === undefined || newValue === '') {
|
543
|
-
innerValue = newValue;
|
544
|
-
trigger();
|
545
|
-
} else {
|
546
|
-
timeout = setTimeout(function () {
|
547
|
-
innerValue = newValue;
|
548
|
-
trigger();
|
549
|
-
}, delay);
|
550
|
-
}
|
551
|
-
}
|
552
|
-
};
|
553
|
-
});
|
554
|
-
}
|
555
|
-
function usePopover(config, triggerRef) {
|
556
|
-
var popoverMinWidth = config.popoverMinWidth;
|
557
|
-
var observerIns = null;
|
558
|
-
var popperWidth = ref('auto');
|
559
|
-
var isPopoverShow = ref(false);
|
560
|
-
var togglePopover = function togglePopover() {
|
561
|
-
isPopoverShow.value = !isPopoverShow.value;
|
562
|
-
};
|
563
|
-
var hidePopover = function hidePopover() {
|
564
|
-
isPopoverShow.value = false;
|
565
|
-
};
|
566
|
-
var showPopover = function showPopover() {
|
567
|
-
isPopoverShow.value = true;
|
568
|
-
};
|
569
|
-
var triggerRefResize = function triggerRefResize() {
|
570
|
-
var _triggerRef$value;
|
571
|
-
popperWidth.value = Math.max((_triggerRef$value = triggerRef.value) === null || _triggerRef$value === void 0 ? void 0 : _triggerRef$value.offsetWidth, popoverMinWidth);
|
572
|
-
};
|
573
|
-
onMounted(function () {
|
574
|
-
if (!triggerRef.value) return;
|
575
|
-
observerIns = observerResize(triggerRef.value, triggerRefResize, 60, true);
|
576
|
-
observerIns.start();
|
577
|
-
});
|
578
|
-
onBeforeUnmount(function () {
|
579
|
-
var _observerIns;
|
580
|
-
(_observerIns = observerIns) === null || _observerIns === void 0 || _observerIns.stop();
|
581
|
-
observerIns = null;
|
582
|
-
});
|
583
|
-
return {
|
584
|
-
isPopoverShow: isPopoverShow,
|
585
|
-
popperWidth: popperWidth,
|
586
|
-
togglePopover: togglePopover,
|
587
|
-
hidePopover: hidePopover,
|
588
|
-
showPopover: showPopover
|
589
|
-
};
|
590
|
-
}
|
591
|
-
function useRemoteSearch(method, callBack) {
|
592
|
-
var customOptionName = useDebouncedRef(''); // 自定义创建选项(自定义创建也会触发搜索)
|
593
|
-
var searchValue = useDebouncedRef('');
|
594
|
-
var curSearchValue = computed(function () {
|
595
|
-
return searchValue.value || customOptionName.value;
|
596
|
-
});
|
597
|
-
var searchLoading = ref(false);
|
598
|
-
watch(curSearchValue, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
599
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
600
|
-
while (1) switch (_context.prev = _context.next) {
|
601
|
-
case 0:
|
602
|
-
_context.prev = 0;
|
603
|
-
searchLoading.value = true;
|
604
|
-
_context.next = 4;
|
605
|
-
return method(curSearchValue.value);
|
606
|
-
case 4:
|
607
|
-
searchLoading.value = false;
|
608
|
-
_context.next = 10;
|
609
|
-
break;
|
610
|
-
case 7:
|
611
|
-
_context.prev = 7;
|
612
|
-
_context.t0 = _context["catch"](0);
|
613
|
-
console.error(_context.t0);
|
614
|
-
case 10:
|
615
|
-
_context.prev = 10;
|
616
|
-
callBack === null || callBack === void 0 || callBack();
|
617
|
-
return _context.finish(10);
|
618
|
-
case 13:
|
619
|
-
case "end":
|
620
|
-
return _context.stop();
|
621
|
-
}
|
622
|
-
}, _callee, null, [[0, 7, 10, 13]]);
|
623
|
-
})));
|
624
|
-
return {
|
625
|
-
customOptionName: customOptionName,
|
626
|
-
searchValue: searchValue,
|
627
|
-
curSearchValue: curSearchValue,
|
628
|
-
searchLoading: searchLoading
|
629
|
-
};
|
630
|
-
}
|
631
|
-
function toLowerCase() {
|
632
|
-
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
633
|
-
if (!value) return value;
|
634
|
-
return String(value).trim().toLowerCase();
|
635
|
-
}
|
636
|
-
function isInViewPort(el, client) {
|
637
|
-
if (!el || !client) return true;
|
638
|
-
var _el$getBoundingClient = el.getBoundingClientRect(),
|
639
|
-
elTop = _el$getBoundingClient.top,
|
640
|
-
elBottom = _el$getBoundingClient.bottom;
|
641
|
-
var _client$getBoundingCl = client.getBoundingClientRect(),
|
642
|
-
clientTop = _client$getBoundingCl.top,
|
643
|
-
clientBottom = _client$getBoundingCl.bottom;
|
644
|
-
return elTop >= clientTop && elBottom <= clientBottom;
|
645
|
-
}
|
646
|
-
;// CONCATENATED MODULE: ../../packages/tag-input/src/common.ts
|
647
|
-
|
648
|
-
|
649
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
650
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
651
|
-
/*
|
652
|
-
* Tencent is pleased to support the open source community by making
|
653
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
654
|
-
*
|
655
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
656
|
-
*
|
657
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
658
|
-
*
|
659
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
660
|
-
*
|
661
|
-
* ---------------------------------------------------
|
662
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
663
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
664
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
665
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
666
|
-
*
|
667
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
668
|
-
* the Software.
|
669
|
-
*
|
670
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
671
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
672
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
673
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
674
|
-
* IN THE SOFTWARE.
|
675
|
-
*/
|
676
|
-
|
677
|
-
var INPUT_MIN_WIDTH = 10;
|
678
|
-
function common_useDebouncedRef(value) {
|
679
|
-
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
|
680
|
-
var timeout;
|
681
|
-
var innerValue = value;
|
682
|
-
return customRef(function (track, trigger) {
|
683
|
-
return {
|
684
|
-
get: function get() {
|
685
|
-
track();
|
686
|
-
return innerValue;
|
687
|
-
},
|
688
|
-
set: function set(newValue) {
|
689
|
-
clearTimeout(timeout);
|
690
|
-
timeout = setTimeout(function () {
|
691
|
-
innerValue = newValue;
|
692
|
-
trigger();
|
693
|
-
}, delay);
|
694
|
-
}
|
695
|
-
};
|
696
|
-
});
|
697
|
-
}
|
698
|
-
function usePage(pageSize) {
|
699
|
-
var state = reactive({
|
700
|
-
curPage: 1,
|
701
|
-
totalSize: 0,
|
702
|
-
totalPage: 0,
|
703
|
-
pageSize: pageSize,
|
704
|
-
isPageLoading: false,
|
705
|
-
curPageList: [],
|
706
|
-
renderListPaged: []
|
707
|
-
});
|
708
|
-
// 初始化分页信息
|
709
|
-
var initPage = function initPage() {
|
710
|
-
var _state$renderListPage, _state$curPageList;
|
711
|
-
var allList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
712
|
-
state.curPage = 1;
|
713
|
-
state.totalSize = allList.length;
|
714
|
-
state.totalPage = Math.ceil(state.totalSize / state.pageSize) || 1;
|
715
|
-
var list = [];
|
716
|
-
// 小于等于0会无限循环
|
717
|
-
if (state.pageSize > 0) {
|
718
|
-
for (var i = 0; i < state.totalSize; i += state.pageSize) {
|
719
|
-
list.push(allList.slice(i, i + state.pageSize));
|
720
|
-
}
|
721
|
-
}
|
722
|
-
(_state$renderListPage = state.renderListPaged).splice.apply(_state$renderListPage, [0, state.renderListPaged.length].concat(list));
|
723
|
-
(_state$curPageList = state.curPageList).splice.apply(_state$curPageList, [0, state.curPageList.length].concat(_toConsumableArray(state.renderListPaged[state.curPage - 1] || [])));
|
724
|
-
};
|
725
|
-
var pageChange = function pageChange(page) {
|
726
|
-
var _state$curPageList2;
|
727
|
-
state.curPage = page;
|
728
|
-
(_state$curPageList2 = state.curPageList).splice.apply(_state$curPageList2, [state.curPageList.length, 0].concat(_toConsumableArray(state.renderListPaged[state.curPage - 1] || [])));
|
729
|
-
state.isPageLoading = false;
|
730
|
-
};
|
731
|
-
return {
|
732
|
-
pageState: state,
|
733
|
-
initPage: initPage,
|
734
|
-
pageChange: pageChange
|
735
|
-
};
|
736
|
-
}
|
737
|
-
function useFlatList(props) {
|
738
|
-
var _toRefs = toRefs(props),
|
739
|
-
useGroup = _toRefs.useGroup,
|
740
|
-
saveKey = _toRefs.saveKey,
|
741
|
-
displayKey = _toRefs.displayKey,
|
742
|
-
list = _toRefs.list;
|
743
|
-
var flatList = ref([]);
|
744
|
-
var saveKeyMap = ref({});
|
745
|
-
watch([useGroup, saveKey, displayKey, list], function () {
|
746
|
-
flatList.value = [];
|
747
|
-
var formatList = markRaw(list.value);
|
748
|
-
if (useGroup.value) {
|
749
|
-
formatList = formatList.reduce(function (formatList, item) {
|
750
|
-
var children = [];
|
751
|
-
if (item.children) {
|
752
|
-
children = item.children.map(function (child) {
|
753
|
-
return _objectSpread({
|
754
|
-
group: {
|
755
|
-
groupId: item[saveKey.value],
|
756
|
-
groupName: item[displayKey.value]
|
757
|
-
}
|
758
|
-
}, child);
|
759
|
-
});
|
760
|
-
}
|
761
|
-
return formatList.concat(children);
|
762
|
-
}, []);
|
763
|
-
}
|
764
|
-
flatList.value = formatList;
|
765
|
-
saveKeyMap.value = formatList.reduce(function (acc, item) {
|
766
|
-
acc[item[saveKey.value]] = item;
|
767
|
-
return acc;
|
768
|
-
}, {});
|
769
|
-
}, {
|
770
|
-
immediate: true,
|
771
|
-
deep: true
|
772
|
-
});
|
773
|
-
return {
|
774
|
-
flatList: flatList,
|
775
|
-
saveKeyMap: saveKeyMap
|
776
|
-
};
|
777
|
-
}
|
778
|
-
/**
|
779
|
-
* 获取字符长度,汉字两个字节
|
780
|
-
* @param str 需要计算长度的字符
|
781
|
-
* @returns 字符长度
|
782
|
-
*/
|
783
|
-
var getCharLength = function getCharLength(str) {
|
784
|
-
var len = str.length;
|
785
|
-
var bitLen = 0;
|
786
|
-
for (var i = 0; i < len; i++) {
|
787
|
-
if ((str.charCodeAt(i) & 0xff00) !== 0) {
|
788
|
-
bitLen += 1;
|
789
|
-
}
|
790
|
-
bitLen += 1;
|
791
|
-
}
|
792
|
-
return bitLen;
|
793
|
-
};
|
794
|
-
/**
|
795
|
-
* 获取隐藏 tag index
|
796
|
-
* @param tagInputRef 组件容器 ref
|
797
|
-
* @param collapseTags 是否折叠 tags
|
798
|
-
* @param selectedTagList 已选择 tags
|
799
|
-
*/
|
800
|
-
var useTagsOverflow = function useTagsOverflow(tagInputRef, collapseTags, selectedTagList) {
|
801
|
-
(0,external_vue_namespaceObject.watch)([selectedTagList, collapseTags], function () {
|
802
|
-
calcOverflow();
|
803
|
-
}, {
|
804
|
-
flush: 'post'
|
805
|
-
});
|
806
|
-
var overflowTagIndex = (0,external_vue_namespaceObject.ref)(null);
|
807
|
-
// 计算出现换行的索引
|
808
|
-
var calcOverflow = function calcOverflow() {
|
809
|
-
if (!collapseTags.value) return;
|
810
|
-
overflowTagIndex.value = null;
|
811
|
-
setTimeout(function () {
|
812
|
-
var tags = Array.from(tagInputRef.value.querySelectorAll('.tag-item'));
|
813
|
-
var tagIndexInSecondRow = tags.findIndex(function (currentTag, index) {
|
814
|
-
if (!index) {
|
815
|
-
return false;
|
816
|
-
}
|
817
|
-
var previousTag = tags[index - 1];
|
818
|
-
return previousTag.offsetTop !== currentTag.offsetTop;
|
819
|
-
});
|
820
|
-
overflowTagIndex.value = tagIndexInSecondRow > 0 ? tagIndexInSecondRow - 1 : null;
|
821
|
-
});
|
822
|
-
};
|
823
|
-
return {
|
824
|
-
overflowTagIndex: overflowTagIndex
|
825
|
-
};
|
826
|
-
};
|
827
|
-
;// CONCATENATED MODULE: external "../checkbox"
|
828
|
-
var checkbox_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
829
|
-
var checkbox_y = x => () => x
|
830
|
-
const checkbox_namespaceObject = checkbox_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__["default"] });
|
831
|
-
;// CONCATENATED MODULE: external "../checkbox/checkbox.less"
|
832
|
-
var checkbox_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
833
|
-
var checkbox_less_y = x => () => x
|
1595
|
+
;// external "../tag-input"
|
1596
|
+
var tag_input_x = (y) => {
|
1597
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1598
|
+
}
|
1599
|
+
var tag_input_y = (x) => (() => (x))
|
1600
|
+
const tag_input_namespaceObject = tag_input_x({ ["useTagsOverflow"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_tag_input_bee9f515__.useTagsOverflow) });
|
1601
|
+
;// external "../checkbox"
|
1602
|
+
var checkbox_x = (y) => {
|
1603
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1604
|
+
}
|
1605
|
+
var checkbox_y = (x) => (() => (x))
|
1606
|
+
const checkbox_namespaceObject = checkbox_x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__["default"]) });
|
1607
|
+
;// external "../checkbox/checkbox.less"
|
1608
|
+
var checkbox_less_x = (y) => {
|
1609
|
+
var x = {}; __webpack_require__.d(x, y); return x
|
1610
|
+
}
|
1611
|
+
var checkbox_less_y = (x) => (() => (x))
|
834
1612
|
const checkbox_less_namespaceObject = checkbox_less_x({ });
|
835
|
-
;//
|
1613
|
+
;// ../../packages/cascader/src/cascader-panel.tsx
|
836
1614
|
|
837
1615
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
838
1616
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -873,17 +1651,17 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
873
1651
|
* CascaderPanel 组件
|
874
1652
|
* 用于展示级联选择器的面板,支持多选、单选、远程加载等功能。
|
875
1653
|
*/
|
876
|
-
/* harmony default export */ const cascader_panel = ((0,
|
1654
|
+
/* harmony default export */ const cascader_panel = ((0,external_vue_.defineComponent)({
|
877
1655
|
name: 'CascaderPanel',
|
878
1656
|
props: {
|
879
|
-
width:
|
880
|
-
height:
|
881
|
-
store:
|
882
|
-
separator:
|
883
|
-
suggestions:
|
884
|
-
isFiltering:
|
885
|
-
searchKey:
|
886
|
-
modelValue:
|
1657
|
+
width: shared_.PropTypes.oneOfType([shared_.PropTypes.number, shared_.PropTypes.string]).def('auto'),
|
1658
|
+
height: shared_.PropTypes.oneOfType([shared_.PropTypes.number, shared_.PropTypes.string]).def(216),
|
1659
|
+
store: shared_.PropTypes.object.def({}),
|
1660
|
+
separator: shared_.PropTypes.string.def(''),
|
1661
|
+
suggestions: shared_.PropTypes.arrayOf((0,external_vue_types_namespaceObject.object)()),
|
1662
|
+
isFiltering: shared_.PropTypes.bool.def(false),
|
1663
|
+
searchKey: shared_.PropTypes.oneOfType([shared_.PropTypes.string, shared_.PropTypes.number]).def(''),
|
1664
|
+
modelValue: shared_.PropTypes.arrayOf(shared_.PropTypes.oneOfType([(0,external_vue_types_namespaceObject.array)(), String, Number]))
|
887
1665
|
},
|
888
1666
|
emits: ['update:modelValue'],
|
889
1667
|
setup: function setup(props, _ref) {
|
@@ -892,11 +1670,11 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
892
1670
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
893
1671
|
resolveClassName = _usePrefix.resolveClassName;
|
894
1672
|
var store = props.store;
|
895
|
-
var menus = (0,
|
1673
|
+
var menus = (0,external_vue_.reactive)({
|
896
1674
|
list: [props.store.getNodes()]
|
897
1675
|
});
|
898
|
-
var activePath = (0,
|
899
|
-
var checkValue = (0,
|
1676
|
+
var activePath = (0,external_vue_.ref)([]);
|
1677
|
+
var checkValue = (0,external_vue_.ref)([]);
|
900
1678
|
/**
|
901
1679
|
* 根据传入的值计算尺寸
|
902
1680
|
* @param value - 数字或字符串类型的尺寸值
|
@@ -1049,7 +1827,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1049
1827
|
// 查找当前级别中选中的或已勾选的节点
|
1050
1828
|
var selectedNode = document.querySelector(".".concat(resolveClassName('cascader-panel'), ":nth-child(").concat(level + 1, ") .").concat(resolveClassName('cascader-node.is-selected'), ", .").concat(resolveClassName('cascader-node.is-checked')));
|
1051
1829
|
if (selectedNode) {
|
1052
|
-
(0,
|
1830
|
+
(0,external_vue_.nextTick)(function () {
|
1053
1831
|
selectedNode.scrollIntoView();
|
1054
1832
|
});
|
1055
1833
|
}
|
@@ -1076,10 +1854,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1076
1854
|
var multiple = node.config.multiple;
|
1077
1855
|
if (multiple) {
|
1078
1856
|
return checkValue.some(function (val) {
|
1079
|
-
return (0,
|
1857
|
+
return (0,shared_.arrayEqual)(val, node.path);
|
1080
1858
|
});
|
1081
1859
|
}
|
1082
|
-
return (0,
|
1860
|
+
return (0,shared_.arrayEqual)(checkValue, node.path);
|
1083
1861
|
};
|
1084
1862
|
/** 多选节点checkbox点击的回调 */
|
1085
1863
|
var checkNode = function checkNode(node, value) {
|
@@ -1092,14 +1870,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1092
1870
|
* @returns 图标组件
|
1093
1871
|
*/
|
1094
1872
|
var iconRender = function iconRender(node) {
|
1095
|
-
return node.loading ? (0,
|
1873
|
+
return node.loading ? (0,external_vue_.createVNode)(icon_namespaceObject.Spinner, {
|
1096
1874
|
"class": resolveClassName('icon-spinner')
|
1097
|
-
}, null) : (0,
|
1875
|
+
}, null) : (0,external_vue_.createVNode)(icon_namespaceObject.AngleRight, {
|
1098
1876
|
"class": resolveClassName('icon-angle-right')
|
1099
1877
|
}, null);
|
1100
1878
|
};
|
1101
1879
|
// 监听 modelValue 的变化,更新选中值
|
1102
|
-
(0,
|
1880
|
+
(0,external_vue_.watch)(function () {
|
1103
1881
|
return props.modelValue;
|
1104
1882
|
}, function (value) {
|
1105
1883
|
updateCheckValue(value);
|
@@ -1107,7 +1885,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1107
1885
|
immediate: true
|
1108
1886
|
});
|
1109
1887
|
// 监听 store 的变化,更新菜单列表
|
1110
|
-
(0,
|
1888
|
+
(0,external_vue_.watch)(function () {
|
1111
1889
|
return props.store;
|
1112
1890
|
}, function (value) {
|
1113
1891
|
menus.list = [value.getNodes()];
|
@@ -1136,14 +1914,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1136
1914
|
var _this = this;
|
1137
1915
|
var emptyWidth = parseInt(this.panelWidth, 10) > 200 ? this.panelWidth : "".concat(200, "px");
|
1138
1916
|
var searchPanelRender = function searchPanelRender() {
|
1139
|
-
return _this.suggestions.length ? (0,
|
1917
|
+
return _this.suggestions.length ? (0,external_vue_.createVNode)("ul", {
|
1140
1918
|
"style": {
|
1141
1919
|
height: _this.panelHeight,
|
1142
1920
|
width: _this.panelWidth
|
1143
1921
|
},
|
1144
1922
|
"class": [_this.resolveClassName('cascader-panel'), _this.resolveClassName('scroll-y')]
|
1145
1923
|
}, [_this.suggestions.map(function (node) {
|
1146
|
-
return (0,
|
1924
|
+
return (0,external_vue_.createVNode)("li", (0,external_vue_.mergeProps)({
|
1147
1925
|
"class": [_this.resolveClassName('cascader-node'), {
|
1148
1926
|
'is-selected': _this.isNodeInPath(node)
|
1149
1927
|
}, {
|
@@ -1152,17 +1930,17 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1152
1930
|
'is-checked': _this.isCheckedNode(node, _this.checkValue)
|
1153
1931
|
}]
|
1154
1932
|
}, _this.searchPanelEvents(node)), [node.pathNames.join(_this.separator)]);
|
1155
|
-
})]) : (0,
|
1933
|
+
})]) : (0,external_vue_.createVNode)("div", {
|
1156
1934
|
"style": {
|
1157
1935
|
width: emptyWidth
|
1158
1936
|
},
|
1159
1937
|
"class": _this.resolveClassName('cascader-search-empty')
|
1160
|
-
}, [(0,
|
1938
|
+
}, [(0,external_vue_.createVNode)("span", null, [_this.noDataText])]);
|
1161
1939
|
};
|
1162
|
-
return (0,
|
1940
|
+
return (0,external_vue_.createVNode)("div", {
|
1163
1941
|
"class": this.resolveClassName('cascader-panel-wrapper')
|
1164
1942
|
}, [this.isFiltering ? searchPanelRender() : this.menus.list.map(function (menu) {
|
1165
|
-
return (0,
|
1943
|
+
return (0,external_vue_.createVNode)("ul", {
|
1166
1944
|
"style": {
|
1167
1945
|
height: _this.panelHeight,
|
1168
1946
|
width: _this.panelWidth
|
@@ -1170,7 +1948,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1170
1948
|
"class": [_this.resolveClassName('cascader-panel'), _this.resolveClassName('scroll-y')]
|
1171
1949
|
}, [menu.length ? menu.map(function (node) {
|
1172
1950
|
var _this$$slots$default, _this$$slots;
|
1173
|
-
return (0,
|
1951
|
+
return (0,external_vue_.createVNode)("li", (0,external_vue_.mergeProps)({
|
1174
1952
|
"class": [_this.resolveClassName('cascader-node'), {
|
1175
1953
|
'is-selected': _this.isNodeInPath(node)
|
1176
1954
|
}, {
|
@@ -1178,7 +1956,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1178
1956
|
}, {
|
1179
1957
|
'is-checked': !node.config.multiple && _this.isCheckedNode(node, _this.checkValue)
|
1180
1958
|
}]
|
1181
|
-
}, Object.assign(_this.nodeEvent(node), node.config.multiple ? {} : {})), [node.config.multiple && (0,
|
1959
|
+
}, Object.assign(_this.nodeEvent(node), node.config.multiple ? {} : {})), [node.config.multiple && (0,external_vue_.createVNode)(checkbox_namespaceObject["default"], {
|
1182
1960
|
"style": "margin-right: 5px",
|
1183
1961
|
"modelValue": node.checked,
|
1184
1962
|
"onUpdate:modelValue": function onUpdateModelValue($event) {
|
@@ -1193,48 +1971,21 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1193
1971
|
node: node,
|
1194
1972
|
data: node.data
|
1195
1973
|
}), !node.isLeaf ? _this.iconRender(node) : '']);
|
1196
|
-
}) : (0,
|
1974
|
+
}) : (0,external_vue_.createVNode)("div", {
|
1197
1975
|
"class": _this.resolveClassName('cascader-panel-empty-wrapper')
|
1198
1976
|
}, [_this.noDataText])]);
|
1199
1977
|
})]);
|
1200
1978
|
}
|
1201
1979
|
}));
|
1202
|
-
;//
|
1980
|
+
;// ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
1203
1981
|
function _classCallCheck(instance, Constructor) {
|
1204
1982
|
if (!(instance instanceof Constructor)) {
|
1205
1983
|
throw new TypeError("Cannot call a class as a function");
|
1206
1984
|
}
|
1207
1985
|
}
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
1213
|
-
return typeof o;
|
1214
|
-
} : function (o) {
|
1215
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
1216
|
-
}, _typeof(o);
|
1217
|
-
}
|
1218
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
1219
|
-
|
1220
|
-
function toPrimitive(t, r) {
|
1221
|
-
if ("object" != _typeof(t) || !t) return t;
|
1222
|
-
var e = t[Symbol.toPrimitive];
|
1223
|
-
if (void 0 !== e) {
|
1224
|
-
var i = e.call(t, r || "default");
|
1225
|
-
if ("object" != _typeof(i)) return i;
|
1226
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
1227
|
-
}
|
1228
|
-
return ("string" === r ? String : Number)(t);
|
1229
|
-
}
|
1230
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
1231
|
-
|
1232
|
-
|
1233
|
-
function toPropertyKey(t) {
|
1234
|
-
var i = toPrimitive(t, "string");
|
1235
|
-
return "symbol" == _typeof(i) ? i : String(i);
|
1236
|
-
}
|
1237
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/createClass.js
|
1986
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
1987
|
+
var toPropertyKey = __webpack_require__(205);
|
1988
|
+
;// ../../node_modules/@babel/runtime/helpers/esm/createClass.js
|
1238
1989
|
|
1239
1990
|
function _defineProperties(target, props) {
|
1240
1991
|
for (var i = 0; i < props.length; i++) {
|
@@ -1242,7 +1993,7 @@ function _defineProperties(target, props) {
|
|
1242
1993
|
descriptor.enumerable = descriptor.enumerable || false;
|
1243
1994
|
descriptor.configurable = true;
|
1244
1995
|
if ("value" in descriptor) descriptor.writable = true;
|
1245
|
-
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
1996
|
+
Object.defineProperty(target, (0,toPropertyKey["default"])(descriptor.key), descriptor);
|
1246
1997
|
}
|
1247
1998
|
}
|
1248
1999
|
function _createClass(Constructor, protoProps, staticProps) {
|
@@ -1253,7 +2004,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
1253
2004
|
});
|
1254
2005
|
return Constructor;
|
1255
2006
|
}
|
1256
|
-
;//
|
2007
|
+
;// ../../packages/cascader/src/node.ts
|
1257
2008
|
|
1258
2009
|
|
1259
2010
|
/*
|
@@ -1366,7 +2117,7 @@ var Node = /*#__PURE__*/function () {
|
|
1366
2117
|
}, {
|
1367
2118
|
key: "broadcast",
|
1368
2119
|
value: function broadcast(event, checkStatus) {
|
1369
|
-
var handlerName = "onParent".concat((0,
|
2120
|
+
var handlerName = "onParent".concat((0,shared_.capitalize)(event));
|
1370
2121
|
this.children.forEach(function (child) {
|
1371
2122
|
if (child) {
|
1372
2123
|
var _child$handlerName;
|
@@ -1381,7 +2132,7 @@ var Node = /*#__PURE__*/function () {
|
|
1381
2132
|
key: "emit",
|
1382
2133
|
value: function emit(event) {
|
1383
2134
|
var parent = this.parent;
|
1384
|
-
var handlerName = "onChild".concat((0,
|
2135
|
+
var handlerName = "onChild".concat((0,shared_.capitalize)(event));
|
1385
2136
|
if (parent) {
|
1386
2137
|
var _parent$handlerName;
|
1387
2138
|
(_parent$handlerName = parent[handlerName]) === null || _parent$handlerName === void 0 || _parent$handlerName.call(parent);
|
@@ -1450,7 +2201,7 @@ var Node = /*#__PURE__*/function () {
|
|
1450
2201
|
return Node;
|
1451
2202
|
}();
|
1452
2203
|
/* harmony default export */ const src_node = (Node);
|
1453
|
-
;//
|
2204
|
+
;// ../../packages/cascader/src/store.ts
|
1454
2205
|
|
1455
2206
|
|
1456
2207
|
/*
|
@@ -1521,7 +2272,7 @@ var Store = /*#__PURE__*/function () {
|
|
1521
2272
|
key: "removeTag",
|
1522
2273
|
value: function removeTag(tag) {
|
1523
2274
|
this.getFlattedNodes().find(function (node) {
|
1524
|
-
if ((0,
|
2275
|
+
if ((0,shared_.arrayEqual)(tag, node.path)) {
|
1525
2276
|
node.setNodeCheck(false);
|
1526
2277
|
return true;
|
1527
2278
|
}
|
@@ -1543,7 +2294,7 @@ var Store = /*#__PURE__*/function () {
|
|
1543
2294
|
this.getFlattedNodes().forEach(function (node) {
|
1544
2295
|
node.setNodeCheck(false);
|
1545
2296
|
var checkedNode = nodes.find(function (nodeValue) {
|
1546
|
-
return (0,
|
2297
|
+
return (0,shared_.arrayEqual)(node.path, nodeValue);
|
1547
2298
|
});
|
1548
2299
|
if (checkedNode) {
|
1549
2300
|
var currentNode = _this2.getNodeByValue(checkedNode);
|
@@ -1573,7 +2324,7 @@ var Store = /*#__PURE__*/function () {
|
|
1573
2324
|
value: function getNodeByValue(value) {
|
1574
2325
|
var _nodes$;
|
1575
2326
|
var nodes = this.getFlattedNodes().filter(function (node) {
|
1576
|
-
return (0,
|
2327
|
+
return (0,shared_.arrayEqual)(node.path, value);
|
1577
2328
|
});
|
1578
2329
|
return (_nodes$ = nodes[0]) !== null && _nodes$ !== void 0 ? _nodes$ : null;
|
1579
2330
|
}
|
@@ -1604,7 +2355,7 @@ var Store = /*#__PURE__*/function () {
|
|
1604
2355
|
return Store;
|
1605
2356
|
}();
|
1606
2357
|
/* harmony default export */ const src_store = (Store);
|
1607
|
-
;//
|
2358
|
+
;// ../../packages/cascader/src/cascader.tsx
|
1608
2359
|
|
1609
2360
|
/*
|
1610
2361
|
* Tencent is pleased to support the open source community by making
|
@@ -1649,36 +2400,36 @@ var Store = /*#__PURE__*/function () {
|
|
1649
2400
|
* Cascader 组件
|
1650
2401
|
* 用于展示级联选择器,支持多选、单选、搜索、远程加载等功能。
|
1651
2402
|
*/
|
1652
|
-
/* harmony default export */ const cascader = ((0,
|
2403
|
+
/* harmony default export */ const cascader = ((0,external_vue_.defineComponent)({
|
1653
2404
|
name: 'Cascader',
|
1654
2405
|
directives: {
|
1655
|
-
bkTooltips:
|
2406
|
+
bkTooltips: src.bkTooltips
|
1656
2407
|
},
|
1657
2408
|
props: {
|
1658
|
-
modelValue:
|
1659
|
-
list:
|
1660
|
-
placeholder:
|
1661
|
-
behavior:
|
1662
|
-
filterable:
|
1663
|
-
multiple:
|
1664
|
-
disabled:
|
1665
|
-
clearable:
|
1666
|
-
trigger:
|
1667
|
-
checkAnyLevel:
|
1668
|
-
isRemote:
|
1669
|
-
remoteMethod:
|
1670
|
-
showCompleteName:
|
1671
|
-
idKey:
|
1672
|
-
nameKey:
|
1673
|
-
childrenKey:
|
1674
|
-
separator:
|
1675
|
-
limitOneLine:
|
1676
|
-
extCls:
|
1677
|
-
filterMethod:
|
1678
|
-
scrollHeight:
|
1679
|
-
scrollWidth:
|
1680
|
-
customTextFillback:
|
1681
|
-
customTagsFillback:
|
2409
|
+
modelValue: shared_.PropTypes.arrayOf(shared_.PropTypes.oneOfType([(0,external_vue_types_namespaceObject.array)(), String, Number])),
|
2410
|
+
list: shared_.PropTypes.array.def([]),
|
2411
|
+
placeholder: shared_.PropTypes.string.def(''),
|
2412
|
+
behavior: shared_.PropTypes.string.def('normal'),
|
2413
|
+
filterable: shared_.PropTypes.bool.def(false),
|
2414
|
+
multiple: shared_.PropTypes.bool.def(false),
|
2415
|
+
disabled: shared_.PropTypes.bool.def(false),
|
2416
|
+
clearable: shared_.PropTypes.bool.def(true),
|
2417
|
+
trigger: shared_.PropTypes.string.def('click'),
|
2418
|
+
checkAnyLevel: shared_.PropTypes.bool.def(false),
|
2419
|
+
isRemote: shared_.PropTypes.bool.def(false),
|
2420
|
+
remoteMethod: shared_.PropTypes.func,
|
2421
|
+
showCompleteName: shared_.PropTypes.bool.def(true),
|
2422
|
+
idKey: shared_.PropTypes.string.def('id'),
|
2423
|
+
nameKey: shared_.PropTypes.string.def('name'),
|
2424
|
+
childrenKey: shared_.PropTypes.string.def('children'),
|
2425
|
+
separator: shared_.PropTypes.string.def('/'),
|
2426
|
+
limitOneLine: shared_.PropTypes.bool.def(false),
|
2427
|
+
extCls: shared_.PropTypes.string.def(''),
|
2428
|
+
filterMethod: shared_.PropTypes.func,
|
2429
|
+
scrollHeight: shared_.PropTypes.oneOfType([shared_.PropTypes.number, shared_.PropTypes.string]).def(216),
|
2430
|
+
scrollWidth: shared_.PropTypes.oneOfType([shared_.PropTypes.number, shared_.PropTypes.string]).def('auto'),
|
2431
|
+
customTextFillback: shared_.PropTypes.func,
|
2432
|
+
customTagsFillback: shared_.PropTypes.func,
|
1682
2433
|
collapseTags: {
|
1683
2434
|
type: Boolean,
|
1684
2435
|
"default": true
|
@@ -1697,33 +2448,33 @@ var Store = /*#__PURE__*/function () {
|
|
1697
2448
|
var separator = props.separator,
|
1698
2449
|
multiple = props.multiple;
|
1699
2450
|
// 用useHover自定义hook来处理鼠标hover状态
|
1700
|
-
var _useHover = useHover(),
|
2451
|
+
var _useHover = (0,select_namespaceObject.useHover)(),
|
1701
2452
|
isHover = _useHover.isHover,
|
1702
2453
|
setHover = _useHover.setHover,
|
1703
2454
|
cancelHover = _useHover.cancelHover;
|
1704
|
-
var store = (0,
|
2455
|
+
var store = (0,external_vue_.ref)(new src_store(props));
|
1705
2456
|
// 定义selectedText变量用于记录当前选择的值的文本
|
1706
|
-
var selectedText = (0,
|
2457
|
+
var selectedText = (0,external_vue_.ref)('');
|
1707
2458
|
// 定义selectedTags变量用于记录多选模式下已选的tag
|
1708
|
-
var selectedTags = (0,
|
1709
|
-
var _toRefs = (0,
|
2459
|
+
var selectedTags = (0,external_vue_.ref)([]);
|
2460
|
+
var _toRefs = (0,external_vue_.toRefs)(props),
|
1710
2461
|
modelValue = _toRefs.modelValue;
|
1711
2462
|
// 定义cascaderPanel 引用
|
1712
|
-
var cascaderPanel = (0,
|
2463
|
+
var cascaderPanel = (0,external_vue_.ref)();
|
1713
2464
|
// 定义searchKey变量,支持搜索时,搜索框绑定变量
|
1714
|
-
var searchKey = (0,
|
2465
|
+
var searchKey = (0,external_vue_.ref)('');
|
1715
2466
|
// 定义suggestions变量,搜索功能打开时,面板给出的列表
|
1716
|
-
var suggestions = (0,
|
2467
|
+
var suggestions = (0,external_vue_.ref)([]);
|
1717
2468
|
// 定义isFiltering变量,记录是否正在搜索,过滤
|
1718
|
-
var isFiltering = (0,
|
2469
|
+
var isFiltering = (0,external_vue_.ref)(false);
|
1719
2470
|
// 定义isEdit变量,记录是否处于编辑状态
|
1720
|
-
var isEdit = (0,
|
2471
|
+
var isEdit = (0,external_vue_.ref)(false);
|
1721
2472
|
// 定义isFocus变量,记录是否处于焦点状态
|
1722
|
-
var isFocus = (0,
|
2473
|
+
var isFocus = (0,external_vue_.ref)(false);
|
1723
2474
|
// 定义isShowPanel变量,用于标致面板显示
|
1724
|
-
var isShowPanel = (0,
|
2475
|
+
var isShowPanel = (0,external_vue_.ref)(false);
|
1725
2476
|
// 用computed定义checkedValue变量,用于监听modelValue的变化
|
1726
|
-
var checkedValue = (0,
|
2477
|
+
var checkedValue = (0,external_vue_.computed)({
|
1727
2478
|
get: function get() {
|
1728
2479
|
return modelValue.value;
|
1729
2480
|
},
|
@@ -1732,15 +2483,15 @@ var Store = /*#__PURE__*/function () {
|
|
1732
2483
|
}
|
1733
2484
|
});
|
1734
2485
|
// 定义popover变量
|
1735
|
-
var popover = (0,
|
2486
|
+
var popover = (0,external_vue_.ref)(null);
|
1736
2487
|
// 定义bkCascaderRef和inputRef变量
|
1737
|
-
var bkCascaderRef = (0,
|
1738
|
-
var inputRef = (0,
|
2488
|
+
var bkCascaderRef = (0,external_vue_.ref)(null);
|
2489
|
+
var inputRef = (0,external_vue_.ref)(null);
|
1739
2490
|
// 用computed定义placeholder变量,用于处理props中的placeholder属性
|
1740
|
-
var placeholder = (0,
|
2491
|
+
var placeholder = (0,external_vue_.computed)(function () {
|
1741
2492
|
return props.placeholder ? props.placeholder : t.value.pleaseSelect;
|
1742
2493
|
});
|
1743
|
-
var displayText = (0,
|
2494
|
+
var displayText = (0,external_vue_.computed)(function () {
|
1744
2495
|
if (props.customTextFillback) {
|
1745
2496
|
return props.customTextFillback(props.modelValue, store.value.getFlattedNodes());
|
1746
2497
|
}
|
@@ -1841,7 +2592,7 @@ var Store = /*#__PURE__*/function () {
|
|
1841
2592
|
isEdit.value = val.isShow;
|
1842
2593
|
// popover激活后,focus相应事件
|
1843
2594
|
isFocus.value = val.isShow;
|
1844
|
-
(0,
|
2595
|
+
(0,external_vue_.nextTick)(function () {
|
1845
2596
|
var _inputRef$value2;
|
1846
2597
|
val && ((_inputRef$value2 = inputRef.value) === null || _inputRef$value2 === void 0 ? void 0 : _inputRef$value2.focus());
|
1847
2598
|
if (val.isShow) {
|
@@ -1856,7 +2607,7 @@ var Store = /*#__PURE__*/function () {
|
|
1856
2607
|
}
|
1857
2608
|
};
|
1858
2609
|
// 搜索框输入的处理函数
|
1859
|
-
var searchInputHandler = (0,
|
2610
|
+
var searchInputHandler = (0,shared_.debounce)(200, function (e) {
|
1860
2611
|
var target = e.target;
|
1861
2612
|
searchKey.value = target.value;
|
1862
2613
|
if (searchKey.value === '') {
|
@@ -1889,34 +2640,34 @@ var Store = /*#__PURE__*/function () {
|
|
1889
2640
|
emit('focus');
|
1890
2641
|
};
|
1891
2642
|
// 监听modelValue的变化
|
1892
|
-
(0,
|
2643
|
+
(0,external_vue_.watch)(function () {
|
1893
2644
|
return props.modelValue;
|
1894
2645
|
}, modelValueChangeHandler, {
|
1895
2646
|
immediate: true
|
1896
2647
|
});
|
1897
2648
|
// 监听list的变化
|
1898
|
-
(0,
|
2649
|
+
(0,external_vue_.watch)(function () {
|
1899
2650
|
return props.list;
|
1900
2651
|
}, listChangeHandler, {
|
1901
2652
|
deep: true,
|
1902
2653
|
immediate: true
|
1903
2654
|
});
|
1904
2655
|
// 定义overflowTagIndex变量,用于处理tag的折叠
|
1905
|
-
var tagList = (0,
|
2656
|
+
var tagList = (0,external_vue_.computed)(function () {
|
1906
2657
|
return props.customTagsFillback ? props.customTagsFillback(props.modelValue, store.value.getFlattedNodes()) : selectedTags.value.map(function (item) {
|
1907
2658
|
return item.text;
|
1908
2659
|
});
|
1909
2660
|
});
|
1910
|
-
var isCollapse = (0,
|
2661
|
+
var isCollapse = (0,external_vue_.computed)(function () {
|
1911
2662
|
return props.collapseTags ? props.collapseTags && isFocus.value : props.collapseTags;
|
1912
2663
|
});
|
1913
|
-
var isEditMode = (0,
|
2664
|
+
var isEditMode = (0,external_vue_.computed)(function () {
|
1914
2665
|
return props.collapseTags ? props.collapseTags && isEdit.value : props.collapseTags;
|
1915
2666
|
});
|
1916
2667
|
// 如果使用了trigger插槽,则不存在bkCascaderRef,做兼容处理
|
1917
2668
|
var _ref2 = slots.trigger ? {
|
1918
2669
|
overflowTagIndex: null
|
1919
|
-
} : useTagsOverflow(bkCascaderRef, isEditMode, tagList),
|
2670
|
+
} : (0,tag_input_namespaceObject.useTagsOverflow)(bkCascaderRef, isEditMode, tagList),
|
1920
2671
|
overflowTagIndex = _ref2.overflowTagIndex;
|
1921
2672
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1922
2673
|
resolveClassName = _usePrefix.resolveClassName;
|
@@ -1960,13 +2711,13 @@ var Store = /*#__PURE__*/function () {
|
|
1960
2711
|
var suffixIcon = function suffixIcon() {
|
1961
2712
|
if (_this.clearable && _this.isHover && !_this.disabled) {
|
1962
2713
|
// 当可清空、鼠标悬浮且未禁用时,渲染清空图标
|
1963
|
-
return (0,
|
2714
|
+
return (0,external_vue_.createVNode)(icon_namespaceObject.Close, {
|
1964
2715
|
"class": _this.resolveClassName('icon-clear-icon'),
|
1965
2716
|
"onClick": _this.handleClear
|
1966
2717
|
}, null);
|
1967
2718
|
}
|
1968
2719
|
// 否则渲染展开/收起图标
|
1969
|
-
return (0,
|
2720
|
+
return (0,external_vue_.createVNode)(icon_namespaceObject.AngleUp, {
|
1970
2721
|
"class": [_this.resolveClassName('icon-angle-up'), _this.isShowPanel ? 'active' : '']
|
1971
2722
|
}, null);
|
1972
2723
|
};
|
@@ -1983,47 +2734,47 @@ var Store = /*#__PURE__*/function () {
|
|
1983
2734
|
var renderTags = function renderTags() {
|
1984
2735
|
if (_this.limitOneLine) {
|
1985
2736
|
// 如果limitOneLine为true,则只显示一行
|
1986
|
-
return (0,
|
2737
|
+
return (0,external_vue_.createVNode)("span", {
|
1987
2738
|
"class": "cascader-selected-text"
|
1988
2739
|
}, [_this.displayText]);
|
1989
2740
|
}
|
1990
|
-
return (0,
|
2741
|
+
return (0,external_vue_.createVNode)("div", {
|
1991
2742
|
"class": "cascader-tag-list"
|
1992
2743
|
}, [_this.tagList.map(function (tag, index) {
|
1993
2744
|
var isOverflow = !_this.isCollapse && _this.overflowTagIndex !== null && index >= _this.overflowTagIndex;
|
1994
2745
|
// 根据tag是否超出显示范围,来决定是否渲染
|
1995
|
-
return (0,
|
2746
|
+
return (0,external_vue_.createVNode)("span", {
|
1996
2747
|
"key": tag,
|
1997
2748
|
"style": {
|
1998
2749
|
display: isOverflow ? 'none' : ''
|
1999
2750
|
},
|
2000
2751
|
"class": "tag-item"
|
2001
|
-
}, [(0,
|
2752
|
+
}, [(0,external_vue_.createVNode)("span", {
|
2002
2753
|
"class": "tag-item-name"
|
2003
|
-
}, [tag]), (0,
|
2754
|
+
}, [tag]), (0,external_vue_.createVNode)(icon_namespaceObject.Error, {
|
2004
2755
|
"class": _this.resolveClassName('icon-clear-icon'),
|
2005
2756
|
"onClick": function onClick(e) {
|
2006
2757
|
e.stopPropagation();
|
2007
2758
|
_this.removeTag(_this.modelValue, index, e);
|
2008
2759
|
}
|
2009
2760
|
}, null)]);
|
2010
|
-
}), _this.overflowTagIndex !== null && !_this.isCollapse && (0,
|
2761
|
+
}), _this.overflowTagIndex !== null && !_this.isCollapse && (0,external_vue_.withDirectives)((0,external_vue_.createVNode)(tag_namespaceObject["default"], {
|
2011
2762
|
"style": "margin-top: 0"
|
2012
2763
|
}, {
|
2013
2764
|
"default": function _default() {
|
2014
|
-
return [(0,
|
2765
|
+
return [(0,external_vue_.createTextVNode)("+"), _this.selectedTags.length - _this.overflowTagIndex];
|
2015
2766
|
}
|
2016
|
-
}), [[(0,
|
2767
|
+
}), [[(0,external_vue_.resolveDirective)("bk-tooltips"), collapseTooltip.join(', ')]])]);
|
2017
2768
|
};
|
2018
2769
|
var textRender = function textRender() {
|
2019
2770
|
return (
|
2020
2771
|
// 多选时, text被tagRender填充,不需要进行text渲染
|
2021
|
-
_this.multiple ? null : (0,
|
2772
|
+
_this.multiple ? null : (0,external_vue_.createVNode)("span", null, [_this.displayText])
|
2022
2773
|
);
|
2023
2774
|
};
|
2024
2775
|
// 定义popoverRender函数,用于渲染弹出框
|
2025
2776
|
var popoverRender = function popoverRender() {
|
2026
|
-
return (0,
|
2777
|
+
return (0,external_vue_.createVNode)(popover_namespaceObject["default"], {
|
2027
2778
|
"ref": "popover",
|
2028
2779
|
"class": _this.resolveClassName('cascader-popover-wrapper'),
|
2029
2780
|
"arrow": false,
|
@@ -2031,6 +2782,7 @@ var Store = /*#__PURE__*/function () {
|
|
2031
2782
|
"disabled": _this.disabled,
|
2032
2783
|
"offset": 4,
|
2033
2784
|
"placement": "bottom-start",
|
2785
|
+
"referenceCls": _this.resolveClassName('cascader-popover-reference'),
|
2034
2786
|
"theme": "light ".concat(_this.resolveClassName('cascader-popover')),
|
2035
2787
|
"trigger": "click",
|
2036
2788
|
"onAfterHidden": _this.popoverChangeEmitter,
|
@@ -2040,9 +2792,9 @@ var Store = /*#__PURE__*/function () {
|
|
2040
2792
|
return _this.$slots.trigger ? _this.$slots.trigger({
|
2041
2793
|
selected: _this.modelValue,
|
2042
2794
|
isShow: _this.isShowPanel
|
2043
|
-
}) : (0,
|
2795
|
+
}) : (0,external_vue_.createVNode)("div", {
|
2044
2796
|
"class": [_this.resolveClassName('cascader-name'), _this.resolveClassName('scroll-y')]
|
2045
|
-
}, [_this.multiple && _this.selectedTags.length > 0 && renderTags(), _this.filterable ? (_this.isCollapse || _this.selectedTags.length === 0) && (0,
|
2797
|
+
}, [_this.multiple && _this.selectedTags.length > 0 && renderTags(), _this.filterable ? (_this.isCollapse || _this.selectedTags.length === 0) && (0,external_vue_.createVNode)("input", {
|
2046
2798
|
"ref": "inputRef",
|
2047
2799
|
"class": [_this.resolveClassName('cascader-search-input'), {
|
2048
2800
|
'is-disabled': _this.disabled
|
@@ -2056,9 +2808,9 @@ var Store = /*#__PURE__*/function () {
|
|
2056
2808
|
}, null) : textRender()]);
|
2057
2809
|
},
|
2058
2810
|
content: function content() {
|
2059
|
-
return (0,
|
2811
|
+
return (0,external_vue_.createVNode)("div", {
|
2060
2812
|
"class": _this.resolveClassName('cascader-popover')
|
2061
|
-
}, [(0,
|
2813
|
+
}, [(0,external_vue_.createVNode)(cascader_panel, {
|
2062
2814
|
"ref": "cascaderPanel",
|
2063
2815
|
"width": _this.scrollWidth,
|
2064
2816
|
"height": _this.scrollHeight,
|
@@ -2073,7 +2825,7 @@ var Store = /*#__PURE__*/function () {
|
|
2073
2825
|
"suggestions": _this.suggestions
|
2074
2826
|
}, {
|
2075
2827
|
"default": function _default(scope) {
|
2076
|
-
return _this.$slots["default"] ? _this.$slots["default"](scope) : (0,
|
2828
|
+
return _this.$slots["default"] ? _this.$slots["default"](scope) : (0,external_vue_.createVNode)("span", {
|
2077
2829
|
"class": _this.resolveClassName('cascader-node-name')
|
2078
2830
|
}, [scope.node.name]);
|
2079
2831
|
}
|
@@ -2081,9 +2833,9 @@ var Store = /*#__PURE__*/function () {
|
|
2081
2833
|
}
|
2082
2834
|
});
|
2083
2835
|
};
|
2084
|
-
return (0,
|
2836
|
+
return (0,external_vue_.createVNode)("div", {
|
2085
2837
|
"class": [this.resolveClassName('cascader-wrapper'), this.floatMode ? 'float-mode' : '']
|
2086
|
-
}, [this.$slots.trigger ? popoverRender() : (0,
|
2838
|
+
}, [this.$slots.trigger ? popoverRender() : (0,external_vue_.createVNode)("div", {
|
2087
2839
|
"ref": "bkCascaderRef",
|
2088
2840
|
"class": [this.resolveClassName('cascader'), this.extCls, {
|
2089
2841
|
'is-unselected': this.modelValue.length === 0,
|
@@ -2100,7 +2852,7 @@ var Store = /*#__PURE__*/function () {
|
|
2100
2852
|
}, [suffixIcon(), popoverRender()])]);
|
2101
2853
|
}
|
2102
2854
|
}));
|
2103
|
-
;//
|
2855
|
+
;// ../../packages/cascader/src/index.ts
|
2104
2856
|
/*
|
2105
2857
|
* Tencent is pleased to support the open source community by making
|
2106
2858
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -2129,12 +2881,10 @@ var Store = /*#__PURE__*/function () {
|
|
2129
2881
|
|
2130
2882
|
|
2131
2883
|
|
2132
|
-
var BkCascader = (0,
|
2884
|
+
var BkCascader = (0,shared_.withInstallProps)(cascader, {
|
2133
2885
|
CascaderPanel: cascader_panel
|
2134
2886
|
});
|
2135
|
-
/* harmony default export */ const
|
2136
|
-
|
2137
|
-
})();
|
2887
|
+
/* harmony default export */ const cascader_src = (BkCascader);
|
2138
2888
|
|
2139
2889
|
var __webpack_exports__BkCascader = __webpack_exports__.BkCascader;
|
2140
2890
|
var __webpack_exports__BkCascaderPanel = __webpack_exports__.BkCascaderPanel;
|