bkui-vue 2.0.1 → 2.0.2-beta.2

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.
@@ -1,16 +1,1497 @@
1
1
  import "../styles/reset.css";
2
2
  import "./color-picker.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
11
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_date_picker_d04526d6__ from "../date-picker";
8
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__ from "../directives";
9
12
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
10
- /******/ // The require scope
11
- /******/ var __webpack_require__ = {};
13
+ /******/ var __webpack_modules__ = ({
14
+
15
+ /***/ 5235:
16
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
+
18
+
19
+ // EXPORTS
20
+ __webpack_require__.d(__webpack_exports__, {
21
+ clickoutside: () => (/* reexport */ clickoutside)
22
+ });
23
+
24
+ // UNUSED EXPORTS: bkEllipsis, bkEllipsisInstance, bkLoading, bkTooltips, mousewheel, overflowTitle
25
+
26
+ ;// CONCATENATED MODULE: ../../packages/directives/src/clickoutside.ts
27
+ 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; } } }; }
28
+ 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); }
29
+ 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; }
30
+ /*
31
+ * Tencent is pleased to support the open source community by making
32
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
33
+ *
34
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
35
+ *
36
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
37
+ *
38
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
39
+ *
40
+ * ---------------------------------------------------
41
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
42
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
43
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
44
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
45
+ *
46
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
47
+ * the Software.
48
+ *
49
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
50
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
52
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
53
+ * IN THE SOFTWARE.
54
+ */
55
+ var isElement = function isElement(e) {
56
+ if (typeof Element === 'undefined') return false;
57
+ return e instanceof Element;
58
+ };
59
+ var nodeList = new Map();
60
+ var startClick;
61
+ document.addEventListener('mousedown', function (e) {
62
+ return startClick = e;
63
+ });
64
+ document.addEventListener('mouseup', function (e) {
65
+ var _iterator = _createForOfIteratorHelper(nodeList.values()),
66
+ _step;
67
+ try {
68
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
69
+ var handlers = _step.value;
70
+ var _iterator2 = _createForOfIteratorHelper(handlers),
71
+ _step2;
72
+ try {
73
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
74
+ var documentHandler = _step2.value.documentHandler;
75
+ documentHandler(e, startClick);
76
+ }
77
+ } catch (err) {
78
+ _iterator2.e(err);
79
+ } finally {
80
+ _iterator2.f();
81
+ }
82
+ }
83
+ } catch (err) {
84
+ _iterator.e(err);
85
+ } finally {
86
+ _iterator.f();
87
+ }
88
+ });
89
+ function createDocumentHandler(el, binding) {
90
+ var excludes = [];
91
+ if (Array.isArray(binding.arg)) {
92
+ excludes = binding.arg;
93
+ } else if (isElement(binding.arg)) {
94
+ excludes.push(binding.arg);
95
+ }
96
+ return function (mouseup, mousedown) {
97
+ var popperRef = binding.instance.popperRef;
98
+ var mouseUpTarget = mouseup.target;
99
+ var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
100
+ var isBound = !binding || !binding.instance;
101
+ var isTargetExists = !mouseUpTarget || !mouseDownTarget;
102
+ var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
103
+ var isSelf = el === mouseUpTarget;
104
+ var isTargetExcluded = excludes.length && excludes.some(function (item) {
105
+ return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
106
+ }) || excludes.length && excludes.includes(mouseDownTarget);
107
+ var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
108
+ if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
109
+ return;
110
+ }
111
+ binding.value(mouseup, mousedown);
112
+ };
113
+ }
114
+ var ClickOutside = {
115
+ beforeMount: function beforeMount(el, binding) {
116
+ if (!nodeList.has(el)) {
117
+ nodeList.set(el, []);
118
+ }
119
+ nodeList.get(el).push({
120
+ documentHandler: createDocumentHandler(el, binding),
121
+ bindingFn: binding.value
122
+ });
123
+ },
124
+ updated: function updated(el, binding) {
125
+ if (!nodeList.has(el)) {
126
+ nodeList.set(el, []);
127
+ }
128
+ var handlers = nodeList.get(el);
129
+ var oldHandlerIndex = handlers.findIndex(function (item) {
130
+ return item.bindingFn === binding.oldValue;
131
+ });
132
+ var newHandler = {
133
+ documentHandler: createDocumentHandler(el, binding),
134
+ bindingFn: binding.value
135
+ };
136
+ if (oldHandlerIndex >= 0) {
137
+ // replace the old handler to the new handler
138
+ handlers.splice(oldHandlerIndex, 1, newHandler);
139
+ } else {
140
+ handlers.push(newHandler);
141
+ }
142
+ },
143
+ unmounted: function unmounted(el) {
144
+ // remove all listeners when a component unmounted
145
+ nodeList["delete"](el);
146
+ }
147
+ };
148
+ ClickOutside.install = function (app) {
149
+ app.directive('bkTooltips', ClickOutside);
150
+ };
151
+ /* harmony default export */ const clickoutside = (ClickOutside);
152
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
153
+ var esm_typeof = __webpack_require__(6522);
154
+ ;// CONCATENATED MODULE: external "../plugin-popover"
155
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
156
+ var y = x => () => x
157
+ const plugin_popover_namespaceObject = x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__["default"] });
158
+ ;// CONCATENATED MODULE: ../../packages/directives/src/ellipsis.ts
159
+
160
+ /*
161
+ * Tencent is pleased to support the open source community by making
162
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
163
+ *
164
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
165
+ *
166
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
167
+ *
168
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
169
+ *
170
+ * ---------------------------------------------------
171
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
172
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
173
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
174
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
175
+ *
176
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
177
+ * the Software.
178
+ *
179
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
180
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
181
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
182
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
183
+ * IN THE SOFTWARE.
184
+ */
185
+
186
+ var resolveOptions = function resolveOptions(el, binding) {
187
+ var options = {
188
+ content: '',
189
+ target: el
190
+ };
191
+ if ((0,esm_typeof["default"])(binding) === 'object') {
192
+ Object.assign(options, binding);
193
+ if (Object.prototype.hasOwnProperty.call(binding, 'popoverOption')) {
194
+ Object.assign(options, binding.popoverOption);
195
+ }
196
+ } else {
197
+ options.content = binding;
198
+ }
199
+ return options;
200
+ };
201
+ var createInstance = function createInstance(el, binding) {
202
+ var instance = null;
203
+ var createTimer = null;
204
+ var hidePopTimer = null;
205
+ var options = resolveOptions(el, binding);
206
+ var disabled = options.disabled;
207
+ if (disabled || instance) {
208
+ return;
209
+ }
210
+ var handleContentEnter = function handleContentEnter() {
211
+ hidePopTimer && clearTimeout(hidePopTimer);
212
+ hidePopTimer = null;
213
+ };
214
+ var handleContentLeave = function handleContentLeave() {
215
+ var _instance, _instance2;
216
+ if (createTimer) {
217
+ clearTimeout(createTimer);
218
+ }
219
+ (_instance = instance) === null || _instance === void 0 || _instance.hide();
220
+ (_instance2 = instance) === null || _instance2 === void 0 || _instance2.close();
221
+ instance = null;
222
+ };
223
+ var handleMouseEnter = function handleMouseEnter() {
224
+ handleContentLeave();
225
+ createTimer && clearTimeout(createTimer);
226
+ createTimer = setTimeout(function () {
227
+ var targetOptions = resolveOptions(el, binding);
228
+ targetOptions.isShow = true;
229
+ targetOptions.content = typeof targetOptions.content === 'function' ? targetOptions.content() : targetOptions.content || el.innerText;
230
+ targetOptions.allowHtml = true;
231
+ Object.assign(targetOptions, {
232
+ onContentMouseenter: handleContentEnter,
233
+ onContentMouseleave: handleContentLeave
234
+ });
235
+ instance = (0,plugin_popover_namespaceObject["default"])(targetOptions);
236
+ }, 300);
237
+ };
238
+ var handleMouseLeave = function handleMouseLeave() {
239
+ hidePopTimer = setTimeout(function () {
240
+ var _instance3, _instance4;
241
+ if (createTimer) {
242
+ clearTimeout(createTimer);
243
+ }
244
+ (_instance3 = instance) === null || _instance3 === void 0 || _instance3.hide();
245
+ (_instance4 = instance) === null || _instance4 === void 0 || _instance4.close();
246
+ instance = null;
247
+ }, 120);
248
+ };
249
+ el.addEventListener('mouseenter', handleMouseEnter);
250
+ el.addEventListener('mouseleave', handleMouseLeave);
251
+ var destroyInstance = function destroyInstance(element) {
252
+ var _ref, _ref2;
253
+ handleMouseLeave();
254
+ (_ref = element !== null && element !== void 0 ? element : el) === null || _ref === void 0 || _ref.removeEventListener('mouseenter', handleMouseEnter);
255
+ (_ref2 = element !== null && element !== void 0 ? element : el) === null || _ref2 === void 0 || _ref2.removeEventListener('mouseleave', handleMouseLeave);
256
+ };
257
+ return {
258
+ destroyInstance: destroyInstance,
259
+ instance: instance
260
+ };
261
+ };
262
+ var ellipsis = {
263
+ mounted: function mounted(el, binding) {
264
+ createInstance(el, binding);
265
+ }
266
+ };
267
+ /* harmony default export */ const src_ellipsis = ((/* unused pure expression or super */ null && (ellipsis)));
268
+ // EXTERNAL MODULE: ../../node_modules/normalize-wheel/index.js
269
+ var normalize_wheel = __webpack_require__(2439);
270
+ var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel);
271
+ ;// CONCATENATED MODULE: ../../packages/directives/src/mousewheel.ts
272
+ /*
273
+ * Tencent is pleased to support the open source community by making
274
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
275
+ *
276
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
277
+ *
278
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
279
+ *
280
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
281
+ *
282
+ * ---------------------------------------------------
283
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
284
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
285
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
286
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
287
+ *
288
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
289
+ * the Software.
290
+ *
291
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
292
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
293
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
294
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
295
+ * IN THE SOFTWARE.
296
+ */
297
+
298
+ var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
299
+ var mousewheelHandler = function mousewheelHandler(element, callback) {
300
+ if (element !== null && element !== void 0 && element.addEventListener) {
301
+ element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', function (e) {
302
+ var normalized = normalize_wheel_default()(e);
303
+ callback === null || callback === void 0 || callback.apply(this, [e, normalized]);
304
+ });
305
+ }
306
+ };
307
+ var mousewheel = {
308
+ beforeMount: function beforeMount(el, binding) {
309
+ mousewheelHandler(el, binding.value);
310
+ }
311
+ };
312
+ /* harmony default export */ const src_mousewheel = ((/* unused pure expression or super */ null && (mousewheel)));
313
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
314
+ var defineProperty = __webpack_require__(6666);
315
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
316
+ var toConsumableArray = __webpack_require__(7930);
317
+ // EXTERNAL MODULE: external "vue"
318
+ var external_vue_ = __webpack_require__(6609);
319
+ // EXTERNAL MODULE: external "../shared"
320
+ var shared_ = __webpack_require__(9253);
321
+ ;// CONCATENATED MODULE: external "@popperjs/core"
322
+ var core_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
323
+ var core_y = x => () => x
324
+ const core_namespaceObject = core_x({ ["createPopper"]: () => __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper });
325
+ ;// CONCATENATED MODULE: ../../packages/directives/src/tooltips.ts
326
+
327
+
328
+
329
+ 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; }
330
+ 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; }
331
+ /*
332
+ * Tencent is pleased to support the open source community by making
333
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
334
+ *
335
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
336
+ *
337
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
338
+ *
339
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
340
+ *
341
+ * ---------------------------------------------------
342
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
343
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
344
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
345
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
346
+ *
347
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
348
+ * the Software.
349
+ *
350
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
351
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
352
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
353
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
354
+ * IN THE SOFTWARE.
355
+ */
356
+
357
+
358
+
359
+ var tooltips_nodeList = new WeakMap();
360
+ var tooltips = {
361
+ beforeMount: function beforeMount(el, binding) {
362
+ var opts = getOpts(binding);
363
+ var trigger = opts.trigger,
364
+ showOnInit = opts.showOnInit;
365
+ var popper = renderContent(opts);
366
+ var delayTimeout = null;
367
+ if (showOnInit) {
368
+ (0,external_vue_.nextTick)(function () {
369
+ show(el);
370
+ });
371
+ }
372
+ if (trigger === 'hover') {
373
+ var hideTimeout = null;
374
+ el.addEventListener('mouseenter', function () {
375
+ delayTimeout = setTimeout(function () {
376
+ show(el);
377
+ clearTimeout(hideTimeout);
378
+ clearTimeout(delayTimeout);
379
+ }, opts.delay);
380
+ });
381
+ popper.addEventListener('mouseenter', function () {
382
+ clearTimeout(hideTimeout);
383
+ });
384
+ el.addEventListener('mouseleave', function () {
385
+ clearTimeout(delayTimeout);
386
+ hideTimeout = setTimeout(function () {
387
+ hide(el);
388
+ }, 100);
389
+ });
390
+ el.addEventListener('click', function () {
391
+ hide(el);
392
+ });
393
+ popper.addEventListener('mouseleave', function () {
394
+ clearTimeout(delayTimeout);
395
+ hideTimeout = setTimeout(function () {
396
+ hide(el);
397
+ }, 100);
398
+ });
399
+ } else if (trigger === 'click') {
400
+ document.body.addEventListener('click', function (event) {
401
+ if (el.contains(event.target) && !popper.hasAttribute('data-show')) {
402
+ delayTimeout = setTimeout(function () {
403
+ show(el);
404
+ clearTimeout(delayTimeout);
405
+ }, opts.delay);
406
+ } else if (popper.hasAttribute('data-show')) {
407
+ hide(el);
408
+ }
409
+ });
410
+ }
411
+ tooltips_nodeList.set(el, {
412
+ opts: opts,
413
+ popper: popper,
414
+ popperInstance: null
415
+ });
416
+ },
417
+ updated: function updated(el, binding) {
418
+ if (tooltips_nodeList.get(el)) {
419
+ tooltips_nodeList.get(el).opts = getOpts(binding);
420
+ }
421
+ },
422
+ unmounted: function unmounted(el) {
423
+ hide(el);
424
+ tooltips_nodeList["delete"](el);
425
+ }
426
+ };
427
+ /**
428
+ * 初始化配置
429
+ * @returns tooltips配置
430
+ */
431
+ function initOptions() {
432
+ var defaultOpts = {
433
+ arrow: true,
434
+ disabled: false,
435
+ trigger: 'hover',
436
+ theme: 'dark',
437
+ content: '',
438
+ showOnInit: false,
439
+ placement: 'top',
440
+ distance: 8,
441
+ extCls: '',
442
+ sameWidth: false,
443
+ delay: 0,
444
+ onShow: function onShow() {},
445
+ onHide: function onHide() {}
446
+ };
447
+ return defaultOpts;
448
+ }
449
+ /**
450
+ * 获取配置
451
+ * @returns tooltips配置
452
+ */
453
+ function getOpts(binding) {
454
+ var opts = initOptions();
455
+ if ((0,esm_typeof["default"])(binding.value) === 'object') {
456
+ Object.assign(opts, binding.value);
457
+ } else {
458
+ opts.content = binding.value;
459
+ }
460
+ return opts;
461
+ }
462
+ /**
463
+ * 创建tooltips DOM
464
+ * @param opts
465
+ * @returns
466
+ */
467
+ function renderContext(value, content) {
468
+ if (typeof value === 'string') {
469
+ content.innerText = value;
470
+ } else {
471
+ // 如果 content 是 Vue 组件的实例,则挂载它
472
+ var container = document.createElement('div');
473
+ var vnode = (0,external_vue_.h)(value);
474
+ (0,external_vue_.render)(vnode, container);
475
+ content.innerHTML = container.innerHTML;
476
+ }
477
+ }
478
+ function renderContent(opts) {
479
+ var value = opts.content,
480
+ hasArrow = opts.arrow,
481
+ theme = opts.theme,
482
+ extCls = opts.extCls;
483
+ var isLight = theme === 'light';
484
+ var zIndex = shared_.bkZIndexManager.getPopperIndex();
485
+ var content = document.createElement('div');
486
+ var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
487
+ content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
488
+ content.innerText = value;
489
+ content.style.zIndex = String(zIndex);
490
+ renderContext(value, content);
491
+ if (hasArrow) {
492
+ var arrow = renderArrow();
493
+ content.appendChild(arrow);
494
+ }
495
+ return content;
496
+ }
497
+ /**
498
+ * 渲染箭头dom
499
+ * @returns arrow DOM
500
+ */
501
+ function renderArrow() {
502
+ var arrow = document.createElement('div');
503
+ var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
504
+ arrow.className = (0,shared_.resolveClassName)('popper-arrow', prefix);
505
+ arrow.setAttribute('data-popper-arrow', '');
506
+ return arrow;
507
+ }
508
+ /**
509
+ * 创建popper实例
510
+ * @param el
511
+ * @param popper
512
+ * @returns popper实例
513
+ */
514
+ function createPopperInstance(el, popper) {
515
+ var _nodeList$get = tooltips_nodeList.get(el),
516
+ opts = _nodeList$get.opts;
517
+ var placement = opts.placement,
518
+ distance = opts.distance,
519
+ sameWidth = opts.sameWidth;
520
+ var popperInstance = (0,core_namespaceObject.createPopper)(el, popper, {
521
+ placement: placement,
522
+ modifiers: [{
523
+ name: 'offset',
524
+ options: {
525
+ offset: [0, distance]
526
+ }
527
+ }, {
528
+ name: 'arrow',
529
+ options: {
530
+ padding: 5
531
+ }
532
+ }].concat((0,toConsumableArray["default"])(sameWidth ? [{
533
+ name: 'sameWidth',
534
+ enabled: true,
535
+ phase: 'beforeWrite',
536
+ requires: ['computeStyles'],
537
+ fn: function fn(_ref) {
538
+ var state = _ref.state;
539
+ state.styles.popper.width = "".concat(state.rects.reference.width, "px");
540
+ },
541
+ effect: function effect(_ref2) {
542
+ var state = _ref2.state;
543
+ state.elements.popper.style.overflowWrap = 'break-word';
544
+ state.elements.popper.style.width = "".concat(state.elements.reference.offsetWidth, "px");
545
+ }
546
+ }] : []))
547
+ });
548
+ return popperInstance;
549
+ }
550
+ /**
551
+ * 显示
552
+ * @param el
553
+ */
554
+ function show(el) {
555
+ var _nodeList$get2 = tooltips_nodeList.get(el),
556
+ popper = _nodeList$get2.popper,
557
+ opts = _nodeList$get2.opts;
558
+ var disabled = opts.disabled,
559
+ content = opts.content,
560
+ hasArrow = opts.arrow,
561
+ onShow = opts.onShow,
562
+ boundary = opts.boundary,
563
+ _opts$modifiers = opts.modifiers,
564
+ modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
565
+ if (disabled) return;
566
+ renderContext(content, popper);
567
+ if (hasArrow) {
568
+ var arrow = renderArrow();
569
+ popper.appendChild(arrow);
570
+ }
571
+ var container = document.body;
572
+ if (boundary) {
573
+ if (boundary === 'parent') {
574
+ container = el.parentElement;
575
+ } else if (boundary instanceof HTMLElement) {
576
+ container = boundary;
577
+ }
578
+ }
579
+ container.appendChild(popper);
580
+ var popperInstance = createPopperInstance(el, popper);
581
+ onShow();
582
+ // Make the tooltip visible
583
+ popper.setAttribute('data-show', '');
584
+ // Enable the event listeners
585
+ popperInstance.setOptions(function (options) {
586
+ return _objectSpread(_objectSpread({}, options), {}, {
587
+ modifiers: [].concat((0,toConsumableArray["default"])(options.modifiers), (0,toConsumableArray["default"])(modifiers), [{
588
+ name: 'eventListeners',
589
+ enabled: true
590
+ }])
591
+ });
592
+ });
593
+ // Update its position
594
+ popperInstance.forceUpdate();
595
+ tooltips_nodeList.get(el).popperInstance = popperInstance;
596
+ }
597
+ /**
598
+ * 隐藏
599
+ * @param el
600
+ */
601
+ function hide(el) {
602
+ if (!tooltips_nodeList.get(el)) return;
603
+ var _nodeList$get3 = tooltips_nodeList.get(el),
604
+ popper = _nodeList$get3.popper,
605
+ popperInstance = _nodeList$get3.popperInstance,
606
+ opts = _nodeList$get3.opts;
607
+ var onHide = opts.onHide;
608
+ if (popper && document.body.contains(popper)) {
609
+ var _popper$parentNode;
610
+ popper.removeAttribute('data-show');
611
+ popperInstance === null || popperInstance === void 0 || popperInstance.destroy();
612
+ popper === null || popper === void 0 || (_popper$parentNode = popper.parentNode) === null || _popper$parentNode === void 0 || _popper$parentNode.removeChild(popper);
613
+ onHide();
614
+ }
615
+ }
616
+ /* harmony default export */ const src_tooltips = ((/* unused pure expression or super */ null && (tooltips)));
617
+ ;// CONCATENATED MODULE: external "../loading"
618
+ var external_loading_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
619
+ var external_loading_y = x => () => x
620
+ const external_loading_namespaceObject = external_loading_x({ });
621
+ ;// CONCATENATED MODULE: external "../overflow-title"
622
+ var external_overflow_title_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
623
+ var external_overflow_title_y = x => () => x
624
+ const external_overflow_title_namespaceObject = external_overflow_title_x({ });
625
+ ;// CONCATENATED MODULE: ../../packages/directives/src/index.ts
626
+ /*
627
+ * Tencent is pleased to support the open source community by making
628
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
629
+ *
630
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
631
+ *
632
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
633
+ *
634
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
635
+ *
636
+ * ---------------------------------------------------
637
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
638
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
639
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
640
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
641
+ *
642
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
643
+ * the Software.
644
+ *
645
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
646
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
647
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
648
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
649
+ * IN THE SOFTWARE.
650
+ */
651
+
652
+
653
+
654
+
655
+
656
+
657
+ // export { createInstance as bkEllipsisInstance } from './ellipsis';
658
+
659
+ /***/ }),
660
+
661
+ /***/ 2439:
662
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
663
+
664
+ module.exports = __webpack_require__(2527);
665
+
666
+
667
+ /***/ }),
668
+
669
+ /***/ 7430:
670
+ /***/ ((module) => {
671
+
672
+ /**
673
+ * Copyright (c) 2015, Facebook, Inc.
674
+ * All rights reserved.
675
+ *
676
+ * This source code is licensed under the BSD-style license found in the
677
+ * LICENSE file in the root directory of this source tree. An additional grant
678
+ * of patent rights can be found in the PATENTS file in the same directory.
679
+ *
680
+ * @providesModule ExecutionEnvironment
681
+ */
682
+
683
+ /*jslint evil: true */
684
+
685
+
686
+
687
+ var canUseDOM = !!(
688
+ typeof window !== 'undefined' &&
689
+ window.document &&
690
+ window.document.createElement
691
+ );
692
+
693
+ /**
694
+ * Simple, lightweight module assisting with the detection and context of
695
+ * Worker. Helps avoid circular dependencies and allows code to reason about
696
+ * whether or not they are in a Worker, even if they never include the main
697
+ * `ReactWorker` dependency.
698
+ */
699
+ var ExecutionEnvironment = {
700
+
701
+ canUseDOM: canUseDOM,
702
+
703
+ canUseWorkers: typeof Worker !== 'undefined',
704
+
705
+ canUseEventListeners:
706
+ canUseDOM && !!(window.addEventListener || window.attachEvent),
707
+
708
+ canUseViewport: canUseDOM && !!window.screen,
709
+
710
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
711
+
712
+ };
713
+
714
+ module.exports = ExecutionEnvironment;
715
+
716
+
717
+ /***/ }),
718
+
719
+ /***/ 6377:
720
+ /***/ ((module) => {
721
+
722
+ /**
723
+ * Copyright 2004-present Facebook. All Rights Reserved.
724
+ *
725
+ * @providesModule UserAgent_DEPRECATED
726
+ */
727
+
728
+ /**
729
+ * Provides entirely client-side User Agent and OS detection. You should prefer
730
+ * the non-deprecated UserAgent module when possible, which exposes our
731
+ * authoritative server-side PHP-based detection to the client.
732
+ *
733
+ * Usage is straightforward:
734
+ *
735
+ * if (UserAgent_DEPRECATED.ie()) {
736
+ * // IE
737
+ * }
738
+ *
739
+ * You can also do version checks:
740
+ *
741
+ * if (UserAgent_DEPRECATED.ie() >= 7) {
742
+ * // IE7 or better
743
+ * }
744
+ *
745
+ * The browser functions will return NaN if the browser does not match, so
746
+ * you can also do version compares the other way:
747
+ *
748
+ * if (UserAgent_DEPRECATED.ie() < 7) {
749
+ * // IE6 or worse
750
+ * }
751
+ *
752
+ * Note that the version is a float and may include a minor version number,
753
+ * so you should always use range operators to perform comparisons, not
754
+ * strict equality.
755
+ *
756
+ * **Note:** You should **strongly** prefer capability detection to browser
757
+ * version detection where it's reasonable:
758
+ *
759
+ * http://www.quirksmode.org/js/support.html
760
+ *
761
+ * Further, we have a large number of mature wrapper functions and classes
762
+ * which abstract away many browser irregularities. Check the documentation,
763
+ * grep for things, or ask on javascript@lists.facebook.com before writing yet
764
+ * another copy of "event || window.event".
765
+ *
766
+ */
767
+
768
+ var _populated = false;
769
+
770
+ // Browsers
771
+ var _ie, _firefox, _opera, _webkit, _chrome;
772
+
773
+ // Actual IE browser for compatibility mode
774
+ var _ie_real_version;
775
+
776
+ // Platforms
777
+ var _osx, _windows, _linux, _android;
778
+
779
+ // Architectures
780
+ var _win64;
781
+
782
+ // Devices
783
+ var _iphone, _ipad, _native;
784
+
785
+ var _mobile;
786
+
787
+ function _populate() {
788
+ if (_populated) {
789
+ return;
790
+ }
791
+
792
+ _populated = true;
793
+
794
+ // To work around buggy JS libraries that can't handle multi-digit
795
+ // version numbers, Opera 10's user agent string claims it's Opera
796
+ // 9, then later includes a Version/X.Y field:
797
+ //
798
+ // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
799
+ var uas = navigator.userAgent;
800
+ 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);
801
+ var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
802
+
803
+ _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
804
+ _ipad = /\b(iP[ao]d)/.exec(uas);
805
+ _android = /Android/i.exec(uas);
806
+ _native = /FBAN\/\w+;/i.exec(uas);
807
+ _mobile = /Mobile/i.exec(uas);
808
+
809
+ // Note that the IE team blog would have you believe you should be checking
810
+ // for 'Win64; x64'. But MSDN then reveals that you can actually be coming
811
+ // from either x64 or ia64; so ultimately, you should just check for Win64
812
+ // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
813
+ // Windows will send 'WOW64' instead.
814
+ _win64 = !!(/Win64/.exec(uas));
815
+
816
+ if (agent) {
817
+ _ie = agent[1] ? parseFloat(agent[1]) : (
818
+ agent[5] ? parseFloat(agent[5]) : NaN);
819
+ // IE compatibility mode
820
+ if (_ie && document && document.documentMode) {
821
+ _ie = document.documentMode;
822
+ }
823
+ // grab the "true" ie version from the trident token if available
824
+ var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
825
+ _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
826
+
827
+ _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
828
+ _opera = agent[3] ? parseFloat(agent[3]) : NaN;
829
+ _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
830
+ if (_webkit) {
831
+ // We do not add the regexp to the above test, because it will always
832
+ // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
833
+ // the userAgent string.
834
+ agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
835
+ _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
836
+ } else {
837
+ _chrome = NaN;
838
+ }
839
+ } else {
840
+ _ie = _firefox = _opera = _chrome = _webkit = NaN;
841
+ }
842
+
843
+ if (os) {
844
+ if (os[1]) {
845
+ // Detect OS X version. If no version number matches, set _osx to true.
846
+ // Version examples: 10, 10_6_1, 10.7
847
+ // Parses version number as a float, taking only first two sets of
848
+ // digits. If only one set of digits is found, returns just the major
849
+ // version number.
850
+ var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
851
+
852
+ _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
853
+ } else {
854
+ _osx = false;
855
+ }
856
+ _windows = !!os[2];
857
+ _linux = !!os[3];
858
+ } else {
859
+ _osx = _windows = _linux = false;
860
+ }
861
+ }
862
+
863
+ var UserAgent_DEPRECATED = {
864
+
865
+ /**
866
+ * Check if the UA is Internet Explorer.
867
+ *
868
+ *
869
+ * @return float|NaN Version number (if match) or NaN.
870
+ */
871
+ ie: function() {
872
+ return _populate() || _ie;
873
+ },
874
+
875
+ /**
876
+ * Check if we're in Internet Explorer compatibility mode.
877
+ *
878
+ * @return bool true if in compatibility mode, false if
879
+ * not compatibility mode or not ie
880
+ */
881
+ ieCompatibilityMode: function() {
882
+ return _populate() || (_ie_real_version > _ie);
883
+ },
884
+
885
+
886
+ /**
887
+ * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
888
+ * only need this because Skype can't handle 64-bit IE yet. We need to remove
889
+ * this when we don't need it -- tracked by #601957.
890
+ */
891
+ ie64: function() {
892
+ return UserAgent_DEPRECATED.ie() && _win64;
893
+ },
894
+
895
+ /**
896
+ * Check if the UA is Firefox.
897
+ *
898
+ *
899
+ * @return float|NaN Version number (if match) or NaN.
900
+ */
901
+ firefox: function() {
902
+ return _populate() || _firefox;
903
+ },
904
+
905
+
906
+ /**
907
+ * Check if the UA is Opera.
908
+ *
909
+ *
910
+ * @return float|NaN Version number (if match) or NaN.
911
+ */
912
+ opera: function() {
913
+ return _populate() || _opera;
914
+ },
915
+
916
+
917
+ /**
918
+ * Check if the UA is WebKit.
919
+ *
920
+ *
921
+ * @return float|NaN Version number (if match) or NaN.
922
+ */
923
+ webkit: function() {
924
+ return _populate() || _webkit;
925
+ },
926
+
927
+ /**
928
+ * For Push
929
+ * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
930
+ */
931
+ safari: function() {
932
+ return UserAgent_DEPRECATED.webkit();
933
+ },
934
+
935
+ /**
936
+ * Check if the UA is a Chrome browser.
937
+ *
938
+ *
939
+ * @return float|NaN Version number (if match) or NaN.
940
+ */
941
+ chrome : function() {
942
+ return _populate() || _chrome;
943
+ },
944
+
945
+
946
+ /**
947
+ * Check if the user is running Windows.
948
+ *
949
+ * @return bool `true' if the user's OS is Windows.
950
+ */
951
+ windows: function() {
952
+ return _populate() || _windows;
953
+ },
954
+
955
+
956
+ /**
957
+ * Check if the user is running Mac OS X.
958
+ *
959
+ * @return float|bool Returns a float if a version number is detected,
960
+ * otherwise true/false.
961
+ */
962
+ osx: function() {
963
+ return _populate() || _osx;
964
+ },
965
+
966
+ /**
967
+ * Check if the user is running Linux.
968
+ *
969
+ * @return bool `true' if the user's OS is some flavor of Linux.
970
+ */
971
+ linux: function() {
972
+ return _populate() || _linux;
973
+ },
974
+
975
+ /**
976
+ * Check if the user is running on an iPhone or iPod platform.
977
+ *
978
+ * @return bool `true' if the user is running some flavor of the
979
+ * iPhone OS.
980
+ */
981
+ iphone: function() {
982
+ return _populate() || _iphone;
983
+ },
984
+
985
+ mobile: function() {
986
+ return _populate() || (_iphone || _ipad || _android || _mobile);
987
+ },
988
+
989
+ nativeApp: function() {
990
+ // webviews inside of the native apps
991
+ return _populate() || _native;
992
+ },
993
+
994
+ android: function() {
995
+ return _populate() || _android;
996
+ },
997
+
998
+ ipad: function() {
999
+ return _populate() || _ipad;
1000
+ }
1001
+ };
1002
+
1003
+ module.exports = UserAgent_DEPRECATED;
1004
+
1005
+
1006
+ /***/ }),
1007
+
1008
+ /***/ 3541:
1009
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1010
+
1011
+ /**
1012
+ * Copyright 2013-2015, Facebook, Inc.
1013
+ * All rights reserved.
1014
+ *
1015
+ * This source code is licensed under the BSD-style license found in the
1016
+ * LICENSE file in the root directory of this source tree. An additional grant
1017
+ * of patent rights can be found in the PATENTS file in the same directory.
1018
+ *
1019
+ * @providesModule isEventSupported
1020
+ */
1021
+
1022
+
1023
+
1024
+ var ExecutionEnvironment = __webpack_require__(7430);
1025
+
1026
+ var useHasFeature;
1027
+ if (ExecutionEnvironment.canUseDOM) {
1028
+ useHasFeature =
1029
+ document.implementation &&
1030
+ document.implementation.hasFeature &&
1031
+ // always returns true in newer browsers as per the standard.
1032
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
1033
+ document.implementation.hasFeature('', '') !== true;
1034
+ }
1035
+
1036
+ /**
1037
+ * Checks if an event is supported in the current execution environment.
1038
+ *
1039
+ * NOTE: This will not work correctly for non-generic events such as `change`,
1040
+ * `reset`, `load`, `error`, and `select`.
1041
+ *
1042
+ * Borrows from Modernizr.
1043
+ *
1044
+ * @param {string} eventNameSuffix Event name, e.g. "click".
1045
+ * @param {?boolean} capture Check if the capture phase is supported.
1046
+ * @return {boolean} True if the event is supported.
1047
+ * @internal
1048
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
1049
+ */
1050
+ function isEventSupported(eventNameSuffix, capture) {
1051
+ if (!ExecutionEnvironment.canUseDOM ||
1052
+ capture && !('addEventListener' in document)) {
1053
+ return false;
1054
+ }
1055
+
1056
+ var eventName = 'on' + eventNameSuffix;
1057
+ var isSupported = eventName in document;
1058
+
1059
+ if (!isSupported) {
1060
+ var element = document.createElement('div');
1061
+ element.setAttribute(eventName, 'return;');
1062
+ isSupported = typeof element[eventName] === 'function';
1063
+ }
1064
+
1065
+ if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
1066
+ // This is the only way to test support for the `wheel` event in IE9+.
1067
+ isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
1068
+ }
1069
+
1070
+ return isSupported;
1071
+ }
1072
+
1073
+ module.exports = isEventSupported;
1074
+
1075
+
1076
+ /***/ }),
1077
+
1078
+ /***/ 2527:
1079
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1080
+
1081
+ /**
1082
+ * Copyright (c) 2015, Facebook, Inc.
1083
+ * All rights reserved.
1084
+ *
1085
+ * This source code is licensed under the BSD-style license found in the
1086
+ * LICENSE file in the root directory of this source tree. An additional grant
1087
+ * of patent rights can be found in the PATENTS file in the same directory.
1088
+ *
1089
+ * @providesModule normalizeWheel
1090
+ * @typechecks
1091
+ */
1092
+
1093
+
1094
+
1095
+ var UserAgent_DEPRECATED = __webpack_require__(6377);
1096
+
1097
+ var isEventSupported = __webpack_require__(3541);
1098
+
1099
+
1100
+ // Reasonable defaults
1101
+ var PIXEL_STEP = 10;
1102
+ var LINE_HEIGHT = 40;
1103
+ var PAGE_HEIGHT = 800;
1104
+
1105
+ /**
1106
+ * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
1107
+ * complicated, thus this doc is long and (hopefully) detailed enough to answer
1108
+ * your questions.
1109
+ *
1110
+ * If you need to react to the mouse wheel in a predictable way, this code is
1111
+ * like your bestest friend. * hugs *
1112
+ *
1113
+ * As of today, there are 4 DOM event types you can listen to:
1114
+ *
1115
+ * 'wheel' -- Chrome(31+), FF(17+), IE(9+)
1116
+ * 'mousewheel' -- Chrome, IE(6+), Opera, Safari
1117
+ * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
1118
+ * 'DOMMouseScroll' -- FF(0.9.7+) since 2003
1119
+ *
1120
+ * So what to do? The is the best:
1121
+ *
1122
+ * normalizeWheel.getEventType();
1123
+ *
1124
+ * In your event callback, use this code to get sane interpretation of the
1125
+ * deltas. This code will return an object with properties:
1126
+ *
1127
+ * spinX -- normalized spin speed (use for zoom) - x plane
1128
+ * spinY -- " - y plane
1129
+ * pixelX -- normalized distance (to pixels) - x plane
1130
+ * pixelY -- " - y plane
1131
+ *
1132
+ * Wheel values are provided by the browser assuming you are using the wheel to
1133
+ * scroll a web page by a number of lines or pixels (or pages). Values can vary
1134
+ * significantly on different platforms and browsers, forgetting that you can
1135
+ * scroll at different speeds. Some devices (like trackpads) emit more events
1136
+ * at smaller increments with fine granularity, and some emit massive jumps with
1137
+ * linear speed or acceleration.
1138
+ *
1139
+ * This code does its best to normalize the deltas for you:
1140
+ *
1141
+ * - spin is trying to normalize how far the wheel was spun (or trackpad
1142
+ * dragged). This is super useful for zoom support where you want to
1143
+ * throw away the chunky scroll steps on the PC and make those equal to
1144
+ * the slow and smooth tiny steps on the Mac. Key data: This code tries to
1145
+ * resolve a single slow step on a wheel to 1.
1146
+ *
1147
+ * - pixel is normalizing the desired scroll delta in pixel units. You'll
1148
+ * get the crazy differences between browsers, but at least it'll be in
1149
+ * pixels!
1150
+ *
1151
+ * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
1152
+ * should translate to positive value zooming IN, negative zooming OUT.
1153
+ * This matches the newer 'wheel' event.
1154
+ *
1155
+ * Why are there spinX, spinY (or pixels)?
1156
+ *
1157
+ * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
1158
+ * with a mouse. It results in side-scrolling in the browser by default.
1159
+ *
1160
+ * - spinY is what you expect -- it's the classic axis of a mouse wheel.
1161
+ *
1162
+ * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
1163
+ * probably is by browsers in conjunction with fancy 3D controllers .. but
1164
+ * you know.
1165
+ *
1166
+ * Implementation info:
1167
+ *
1168
+ * Examples of 'wheel' event if you scroll slowly (down) by one step with an
1169
+ * average mouse:
1170
+ *
1171
+ * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
1172
+ * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
1173
+ * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
1174
+ * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
1175
+ * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
1176
+ *
1177
+ * On the trackpad:
1178
+ *
1179
+ * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
1180
+ * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
1181
+ *
1182
+ * On other/older browsers.. it's more complicated as there can be multiple and
1183
+ * also missing delta values.
1184
+ *
1185
+ * The 'wheel' event is more standard:
1186
+ *
1187
+ * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
1188
+ *
1189
+ * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
1190
+ * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
1191
+ * backward compatibility with older events. Those other values help us
1192
+ * better normalize spin speed. Example of what the browsers provide:
1193
+ *
1194
+ * | event.wheelDelta | event.detail
1195
+ * ------------------+------------------+--------------
1196
+ * Safari v5/OS X | -120 | 0
1197
+ * Safari v5/Win7 | -120 | 0
1198
+ * Chrome v17/OS X | -120 | 0
1199
+ * Chrome v17/Win7 | -120 | 0
1200
+ * IE9/Win7 | -120 | undefined
1201
+ * Firefox v4/OS X | undefined | 1
1202
+ * Firefox v4/Win7 | undefined | 3
1203
+ *
1204
+ */
1205
+ function normalizeWheel(/*object*/ event) /*object*/ {
1206
+ var sX = 0, sY = 0, // spinX, spinY
1207
+ pX = 0, pY = 0; // pixelX, pixelY
1208
+
1209
+ // Legacy
1210
+ if ('detail' in event) { sY = event.detail; }
1211
+ if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
1212
+ if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
1213
+ if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
1214
+
1215
+ // side scrolling on FF with DOMMouseScroll
1216
+ if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
1217
+ sX = sY;
1218
+ sY = 0;
1219
+ }
1220
+
1221
+ pX = sX * PIXEL_STEP;
1222
+ pY = sY * PIXEL_STEP;
1223
+
1224
+ if ('deltaY' in event) { pY = event.deltaY; }
1225
+ if ('deltaX' in event) { pX = event.deltaX; }
1226
+
1227
+ if ((pX || pY) && event.deltaMode) {
1228
+ if (event.deltaMode == 1) { // delta in LINE units
1229
+ pX *= LINE_HEIGHT;
1230
+ pY *= LINE_HEIGHT;
1231
+ } else { // delta in PAGE units
1232
+ pX *= PAGE_HEIGHT;
1233
+ pY *= PAGE_HEIGHT;
1234
+ }
1235
+ }
1236
+
1237
+ // Fall-back if spin cannot be determined
1238
+ if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
1239
+ if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
1240
+
1241
+ return { spinX : sX,
1242
+ spinY : sY,
1243
+ pixelX : pX,
1244
+ pixelY : pY };
1245
+ }
1246
+
1247
+
1248
+ /**
1249
+ * The best combination if you prefer spinX + spinY normalization. It favors
1250
+ * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
1251
+ * 'wheel' event, making spin speed determination impossible.
1252
+ */
1253
+ normalizeWheel.getEventType = function() /*string*/ {
1254
+ return (UserAgent_DEPRECATED.firefox())
1255
+ ? 'DOMMouseScroll'
1256
+ : (isEventSupported('wheel'))
1257
+ ? 'wheel'
1258
+ : 'mousewheel';
1259
+ };
1260
+
1261
+ module.exports = normalizeWheel;
1262
+
1263
+
1264
+ /***/ }),
1265
+
1266
+ /***/ 9253:
1267
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1268
+
1269
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1270
+ var y = x => () => x
1271
+ module.exports = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.classes, ["resolveClassName"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName, ["useFormItem"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.useFormItem, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
1272
+
1273
+ /***/ }),
1274
+
1275
+ /***/ 6609:
1276
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1277
+
1278
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1279
+ var y = x => () => x
1280
+ module.exports = x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeMount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["vShow"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.vShow, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
1281
+
1282
+ /***/ }),
1283
+
1284
+ /***/ 926:
1285
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1286
+
1287
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1288
+ /* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
1289
+ /* harmony export */ });
1290
+ function _arrayLikeToArray(arr, len) {
1291
+ if (len == null || len > arr.length) len = arr.length;
1292
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1293
+ return arr2;
1294
+ }
1295
+
1296
+ /***/ }),
1297
+
1298
+ /***/ 74:
1299
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1300
+
1301
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1302
+ /* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles)
1303
+ /* harmony export */ });
1304
+ /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(926);
1305
+
1306
+ function _arrayWithoutHoles(arr) {
1307
+ if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr);
1308
+ }
1309
+
1310
+ /***/ }),
1311
+
1312
+ /***/ 6666:
1313
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1314
+
1315
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1316
+ /* harmony export */ "default": () => (/* binding */ _defineProperty)
1317
+ /* harmony export */ });
1318
+ /* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3795);
1319
+
1320
+ function _defineProperty(obj, key, value) {
1321
+ key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key);
1322
+ if (key in obj) {
1323
+ Object.defineProperty(obj, key, {
1324
+ value: value,
1325
+ enumerable: true,
1326
+ configurable: true,
1327
+ writable: true
1328
+ });
1329
+ } else {
1330
+ obj[key] = value;
1331
+ }
1332
+ return obj;
1333
+ }
1334
+
1335
+ /***/ }),
1336
+
1337
+ /***/ 1079:
1338
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1339
+
1340
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1341
+ /* harmony export */ "default": () => (/* binding */ _iterableToArray)
1342
+ /* harmony export */ });
1343
+ function _iterableToArray(iter) {
1344
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1345
+ }
1346
+
1347
+ /***/ }),
1348
+
1349
+ /***/ 6098:
1350
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1351
+
1352
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1353
+ /* harmony export */ "default": () => (/* binding */ _nonIterableSpread)
1354
+ /* harmony export */ });
1355
+ function _nonIterableSpread() {
1356
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1357
+ }
1358
+
1359
+ /***/ }),
1360
+
1361
+ /***/ 7930:
1362
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1363
+
1364
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1365
+ /* harmony export */ "default": () => (/* binding */ _toConsumableArray)
1366
+ /* harmony export */ });
1367
+ /* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
1368
+ /* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1079);
1369
+ /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9147);
1370
+ /* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6098);
1371
+
1372
+
1373
+
1374
+
1375
+ function _toConsumableArray(arr) {
1376
+ 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"])();
1377
+ }
1378
+
1379
+ /***/ }),
1380
+
1381
+ /***/ 9745:
1382
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1383
+
1384
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1385
+ /* harmony export */ "default": () => (/* binding */ toPrimitive)
1386
+ /* harmony export */ });
1387
+ /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6522);
1388
+
1389
+ function toPrimitive(t, r) {
1390
+ if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t;
1391
+ var e = t[Symbol.toPrimitive];
1392
+ if (void 0 !== e) {
1393
+ var i = e.call(t, r || "default");
1394
+ if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i;
1395
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1396
+ }
1397
+ return ("string" === r ? String : Number)(t);
1398
+ }
1399
+
1400
+ /***/ }),
1401
+
1402
+ /***/ 3795:
1403
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1404
+
1405
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1406
+ /* harmony export */ "default": () => (/* binding */ toPropertyKey)
1407
+ /* harmony export */ });
1408
+ /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6522);
1409
+ /* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9745);
1410
+
1411
+
1412
+ function toPropertyKey(t) {
1413
+ var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t, "string");
1414
+ return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_1__["default"])(i) ? i : String(i);
1415
+ }
1416
+
1417
+ /***/ }),
1418
+
1419
+ /***/ 6522:
1420
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1421
+
1422
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1423
+ /* harmony export */ "default": () => (/* binding */ _typeof)
1424
+ /* harmony export */ });
1425
+ function _typeof(o) {
1426
+ "@babel/helpers - typeof";
1427
+
1428
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
1429
+ return typeof o;
1430
+ } : function (o) {
1431
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1432
+ }, _typeof(o);
1433
+ }
1434
+
1435
+ /***/ }),
1436
+
1437
+ /***/ 9147:
1438
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1439
+
1440
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1441
+ /* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
1442
+ /* harmony export */ });
1443
+ /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(926);
1444
+
1445
+ function _unsupportedIterableToArray(o, minLen) {
1446
+ if (!o) return;
1447
+ if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
1448
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1449
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1450
+ if (n === "Map" || n === "Set") return Array.from(o);
1451
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
1452
+ }
1453
+
1454
+ /***/ })
1455
+
1456
+ /******/ });
1457
+ /************************************************************************/
1458
+ /******/ // The module cache
1459
+ /******/ var __webpack_module_cache__ = {};
1460
+ /******/
1461
+ /******/ // The require function
1462
+ /******/ function __webpack_require__(moduleId) {
1463
+ /******/ // Check if module is in cache
1464
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
1465
+ /******/ if (cachedModule !== undefined) {
1466
+ /******/ return cachedModule.exports;
1467
+ /******/ }
1468
+ /******/ // Create a new module (and put it into the cache)
1469
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1470
+ /******/ // no module.id needed
1471
+ /******/ // no module.loaded needed
1472
+ /******/ exports: {}
1473
+ /******/ };
1474
+ /******/
1475
+ /******/ // Execute the module function
1476
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1477
+ /******/
1478
+ /******/ // Return the exports of the module
1479
+ /******/ return module.exports;
1480
+ /******/ }
12
1481
  /******/
13
1482
  /************************************************************************/
1483
+ /******/ /* webpack/runtime/compat get default export */
1484
+ /******/ (() => {
1485
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
1486
+ /******/ __webpack_require__.n = (module) => {
1487
+ /******/ var getter = module && module.__esModule ?
1488
+ /******/ () => (module['default']) :
1489
+ /******/ () => (module);
1490
+ /******/ __webpack_require__.d(getter, { a: getter });
1491
+ /******/ return getter;
1492
+ /******/ };
1493
+ /******/ })();
1494
+ /******/
14
1495
  /******/ /* webpack/runtime/define property getters */
15
1496
  /******/ (() => {
16
1497
  /******/ // define getter functions for harmony exports
@@ -30,69 +1511,24 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon
30
1511
  /******/
31
1512
  /************************************************************************/
32
1513
  var __webpack_exports__ = {};
1514
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1515
+ (() => {
33
1516
 
34
1517
  // EXPORTS
35
1518
  __webpack_require__.d(__webpack_exports__, {
36
- "default": () => (/* binding */ src)
1519
+ "default": () => (/* binding */ color_picker_src)
37
1520
  });
38
1521
 
39
- ;// CONCATENATED MODULE: external "../shared"
1522
+ // EXTERNAL MODULE: external "../shared"
1523
+ var shared_ = __webpack_require__(9253);
1524
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
1525
+ var defineProperty = __webpack_require__(6666);
1526
+ // EXTERNAL MODULE: external "vue"
1527
+ var external_vue_ = __webpack_require__(6609);
1528
+ ;// CONCATENATED MODULE: external "vue-types"
40
1529
  var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
41
1530
  var y = x => () => x
42
- const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.classes, ["useFormItem"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.useFormItem, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
43
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
44
- function _typeof(o) {
45
- "@babel/helpers - typeof";
46
-
47
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
48
- return typeof o;
49
- } : function (o) {
50
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
51
- }, _typeof(o);
52
- }
53
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
54
-
55
- function toPrimitive(t, r) {
56
- if ("object" != _typeof(t) || !t) return t;
57
- var e = t[Symbol.toPrimitive];
58
- if (void 0 !== e) {
59
- var i = e.call(t, r || "default");
60
- if ("object" != _typeof(i)) return i;
61
- throw new TypeError("@@toPrimitive must return a primitive value.");
62
- }
63
- return ("string" === r ? String : Number)(t);
64
- }
65
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
66
-
67
-
68
- function toPropertyKey(t) {
69
- var i = toPrimitive(t, "string");
70
- return "symbol" == _typeof(i) ? i : String(i);
71
- }
72
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
73
-
74
- function _defineProperty(obj, key, value) {
75
- key = toPropertyKey(key);
76
- if (key in obj) {
77
- Object.defineProperty(obj, key, {
78
- value: value,
79
- enumerable: true,
80
- configurable: true,
81
- writable: true
82
- });
83
- } else {
84
- obj[key] = value;
85
- }
86
- return obj;
87
- }
88
- ;// CONCATENATED MODULE: external "vue"
89
- var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
90
- var external_vue_y = x => () => x
91
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeMount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["vShow"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.vShow, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
92
- ;// CONCATENATED MODULE: external "vue-types"
93
- var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
94
- var external_vue_types_y = x => () => x
95
- const external_vue_types_namespaceObject = external_vue_types_x({ ["toType"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.toType });
1531
+ const external_vue_types_namespaceObject = x({ ["toType"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.toType });
96
1532
  ;// CONCATENATED MODULE: external "../config-provider"
97
1533
  var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
98
1534
  var config_provider_y = x => () => x
@@ -101,24 +1537,22 @@ const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () =>
101
1537
  var date_picker_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
102
1538
  var date_picker_y = x => () => x
103
1539
  const date_picker_namespaceObject = date_picker_x({ ["PickerDropdown"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_date_picker_d04526d6__.PickerDropdown });
104
- ;// CONCATENATED MODULE: external "../directives"
105
- var directives_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
106
- var directives_y = x => () => x
107
- const directives_namespaceObject = directives_x({ ["clickoutside"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__.clickoutside });
1540
+ // EXTERNAL MODULE: ../../packages/directives/src/index.ts + 8 modules
1541
+ var src = __webpack_require__(5235);
108
1542
  ;// CONCATENATED MODULE: external "../icon"
109
1543
  var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
110
1544
  var icon_y = x => () => x
111
1545
  const icon_namespaceObject = icon_x({ ["AngleUp"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleUp });
112
1546
  ;// CONCATENATED MODULE: ../../node_modules/tinycolor2/esm/tinycolor.js
113
1547
  // This file is autogenerated. It's used to publish ESM to npm.
114
- function tinycolor_typeof(obj) {
1548
+ function _typeof(obj) {
115
1549
  "@babel/helpers - typeof";
116
1550
 
117
- return tinycolor_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1551
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
118
1552
  return typeof obj;
119
1553
  } : function (obj) {
120
1554
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
121
- }, tinycolor_typeof(obj);
1555
+ }, _typeof(obj);
122
1556
  }
123
1557
 
124
1558
  // https://github.com/bgrins/TinyColor
@@ -382,7 +1816,7 @@ tinycolor.prototype = {
382
1816
  // If input is an object, force 1 into "1.0" to handle ratios properly
383
1817
  // String input requires "1.0" as input, so 1 will be treated as 1
384
1818
  tinycolor.fromRatio = function (color, opts) {
385
- if (tinycolor_typeof(color) == "object") {
1819
+ if (_typeof(color) == "object") {
386
1820
  var newColor = {};
387
1821
  for (var i in color) {
388
1822
  if (color.hasOwnProperty(i)) {
@@ -428,7 +1862,7 @@ function inputToRGB(color) {
428
1862
  if (typeof color == "string") {
429
1863
  color = stringInputToObject(color);
430
1864
  }
431
- if (tinycolor_typeof(color) == "object") {
1865
+ if (_typeof(color) == "object") {
432
1866
  if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
433
1867
  rgb = rgbToRgb(color.r, color.g, color.b);
434
1868
  ok = true;
@@ -1322,9 +2756,9 @@ function validateWCAG2Parms(parms) {
1322
2756
 
1323
2757
 
1324
2758
  var inputContainerProps = {
1325
- info: shared_namespaceObject.PropTypes.object.isRequired
2759
+ info: shared_.PropTypes.object.isRequired
1326
2760
  };
1327
- /* harmony default export */ const input_container = ((0,external_vue_namespaceObject.defineComponent)({
2761
+ /* harmony default export */ const input_container = ((0,external_vue_.defineComponent)({
1328
2762
  props: inputContainerProps,
1329
2763
  emits: ['tab', 'input'],
1330
2764
  setup: function setup(props, _ref) {
@@ -1341,21 +2775,21 @@ var inputContainerProps = {
1341
2775
  };
1342
2776
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
1343
2777
  resolveClassName = _usePrefix.resolveClassName;
1344
- var colorPickerCls = (0,external_vue_namespaceObject.computed)(function () {
1345
- return (0,shared_namespaceObject.classes)({
2778
+ var colorPickerCls = (0,external_vue_.computed)(function () {
2779
+ return (0,shared_.classes)({
1346
2780
  error: props.info.error
1347
2781
  }, "".concat(resolveClassName('color-picker-input-value')));
1348
2782
  });
1349
2783
  return function () {
1350
- return (0,external_vue_namespaceObject.createVNode)("div", {
2784
+ return (0,external_vue_.createVNode)("div", {
1351
2785
  "class": "".concat(resolveClassName('color-picker-input-part'))
1352
- }, [(0,external_vue_namespaceObject.createVNode)("input", {
2786
+ }, [(0,external_vue_.createVNode)("input", {
1353
2787
  "class": colorPickerCls.value,
1354
2788
  "type": props.info.name === 'HEX' ? 'text' : 'number',
1355
2789
  "value": props.info.value,
1356
2790
  "onInput": handleInput,
1357
2791
  "onKeydown": handleTab
1358
- }, null), (0,external_vue_namespaceObject.createVNode)("span", {
2792
+ }, null), (0,external_vue_.createVNode)("span", {
1359
2793
  "class": "".concat(resolveClassName('color-picker-input-text'))
1360
2794
  }, [props.info.name])]);
1361
2795
  };
@@ -1394,45 +2828,45 @@ var inputContainerProps = {
1394
2828
 
1395
2829
 
1396
2830
  var colorPickerProps = {
1397
- colorObj: shared_namespaceObject.PropTypes.object.isRequired
2831
+ colorObj: shared_.PropTypes.object.isRequired
1398
2832
  };
1399
- /* harmony default export */ const color_input = ((0,external_vue_namespaceObject.defineComponent)({
2833
+ /* harmony default export */ const color_input = ((0,external_vue_.defineComponent)({
1400
2834
  name: 'ColorPicker',
1401
2835
  props: colorPickerProps,
1402
2836
  emits: ['change', 'tab'],
1403
2837
  setup: function setup(props, _ref) {
1404
2838
  var emit = _ref.emit;
1405
- var hex = (0,external_vue_namespaceObject.reactive)({
2839
+ var hex = (0,external_vue_.reactive)({
1406
2840
  key: 'hex',
1407
2841
  name: 'HEX',
1408
2842
  value: props.colorObj.hex,
1409
2843
  error: false
1410
2844
  });
1411
- var r = (0,external_vue_namespaceObject.reactive)({
2845
+ var r = (0,external_vue_.reactive)({
1412
2846
  key: 'r',
1413
2847
  name: 'R',
1414
2848
  value: props.colorObj.rgba.r.toString(),
1415
2849
  error: false
1416
2850
  });
1417
- var g = (0,external_vue_namespaceObject.reactive)({
2851
+ var g = (0,external_vue_.reactive)({
1418
2852
  key: 'g',
1419
2853
  name: 'G',
1420
2854
  value: props.colorObj.rgba.g.toString(),
1421
2855
  error: false
1422
2856
  });
1423
- var b = (0,external_vue_namespaceObject.reactive)({
2857
+ var b = (0,external_vue_.reactive)({
1424
2858
  key: 'b',
1425
2859
  name: 'B',
1426
2860
  value: props.colorObj.rgba.b.toString(),
1427
2861
  error: false
1428
2862
  });
1429
- var a = (0,external_vue_namespaceObject.reactive)({
2863
+ var a = (0,external_vue_.reactive)({
1430
2864
  key: 'a',
1431
2865
  name: 'Alpha',
1432
2866
  value: props.colorObj.rgba.a.toString(),
1433
2867
  error: false
1434
2868
  });
1435
- (0,external_vue_namespaceObject.watch)(function () {
2869
+ (0,external_vue_.watch)(function () {
1436
2870
  return props.colorObj;
1437
2871
  }, function (val) {
1438
2872
  if (tinycolor(val.hex).toString() !== tinycolor(hex.value).toString()) {
@@ -1504,25 +2938,25 @@ var colorPickerProps = {
1504
2938
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
1505
2939
  resolveClassName = _usePrefix.resolveClassName;
1506
2940
  return function () {
1507
- return (0,external_vue_namespaceObject.createVNode)("div", {
2941
+ return (0,external_vue_.createVNode)("div", {
1508
2942
  "class": "".concat(resolveClassName('color-picker-input'))
1509
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
2943
+ }, [(0,external_vue_.createVNode)("div", {
1510
2944
  "class": "".concat(resolveClassName('color-picker-input-hex'))
1511
- }, [(0,external_vue_namespaceObject.createVNode)(input_container, {
2945
+ }, [(0,external_vue_.createVNode)(input_container, {
1512
2946
  "info": hex,
1513
2947
  "onInput": handleInput
1514
- }, null)]), (0,external_vue_namespaceObject.createVNode)("div", {
2948
+ }, null)]), (0,external_vue_.createVNode)("div", {
1515
2949
  "class": "".concat(resolveClassName('color-picker-input-rgba'))
1516
- }, [(0,external_vue_namespaceObject.createVNode)(input_container, {
2950
+ }, [(0,external_vue_.createVNode)(input_container, {
1517
2951
  "info": r,
1518
2952
  "onInput": handleInput
1519
- }, null), (0,external_vue_namespaceObject.createVNode)(input_container, {
2953
+ }, null), (0,external_vue_.createVNode)(input_container, {
1520
2954
  "info": g,
1521
2955
  "onInput": handleInput
1522
- }, null), (0,external_vue_namespaceObject.createVNode)(input_container, {
2956
+ }, null), (0,external_vue_.createVNode)(input_container, {
1523
2957
  "info": b,
1524
2958
  "onInput": handleInput
1525
- }, null), (0,external_vue_namespaceObject.createVNode)(input_container, {
2959
+ }, null), (0,external_vue_.createVNode)(input_container, {
1526
2960
  "info": a,
1527
2961
  "onInput": handleInput,
1528
2962
  "onTab": handleAlphaTab
@@ -1668,16 +3102,16 @@ var toRGBAString = function toRGBAString(rgba) {
1668
3102
 
1669
3103
 
1670
3104
  var hue_slider_colorPickerProps = {
1671
- colorObj: shared_namespaceObject.PropTypes.object.isRequired
3105
+ colorObj: shared_.PropTypes.object.isRequired
1672
3106
  };
1673
- /* harmony default export */ const hue_slider = ((0,external_vue_namespaceObject.defineComponent)({
3107
+ /* harmony default export */ const hue_slider = ((0,external_vue_.defineComponent)({
1674
3108
  name: 'ColorPicker',
1675
3109
  props: hue_slider_colorPickerProps,
1676
3110
  emits: ['change'],
1677
3111
  setup: function setup(props, _ref) {
1678
3112
  var emit = _ref.emit;
1679
- var containerRef = (0,external_vue_namespaceObject.ref)(null);
1680
- var pointerStyle = (0,external_vue_namespaceObject.computed)(function () {
3113
+ var containerRef = (0,external_vue_.ref)(null);
3114
+ var pointerStyle = (0,external_vue_.computed)(function () {
1681
3115
  return {
1682
3116
  left: "".concat(props.colorObj.hsv.h / 360 * 100, "%")
1683
3117
  };
@@ -1755,7 +3189,7 @@ var hue_slider_colorPickerProps = {
1755
3189
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
1756
3190
  resolveClassName = _usePrefix.resolveClassName;
1757
3191
  return function () {
1758
- return (0,external_vue_namespaceObject.createVNode)("div", {
3192
+ return (0,external_vue_.createVNode)("div", {
1759
3193
  "ref": containerRef,
1760
3194
  "class": "".concat(resolveClassName('color-picker-hue')),
1761
3195
  "tabindex": "0",
@@ -1765,10 +3199,10 @@ var hue_slider_colorPickerProps = {
1765
3199
  e.preventDefault();
1766
3200
  handleMouseDown(e);
1767
3201
  }
1768
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
3202
+ }, [(0,external_vue_.createVNode)("div", {
1769
3203
  "style": pointerStyle.value,
1770
3204
  "class": "".concat(resolveClassName('color-picker-hue-pointer'))
1771
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
3205
+ }, [(0,external_vue_.createVNode)("div", {
1772
3206
  "class": "".concat(resolveClassName('color-picker-hue-rectangle'))
1773
3207
  }, null)])]);
1774
3208
  };
@@ -1808,21 +3242,21 @@ var hue_slider_colorPickerProps = {
1808
3242
 
1809
3243
 
1810
3244
  var recommend_colors_colorPickerProps = {
1811
- colorObj: shared_namespaceObject.PropTypes.object.isRequired,
1812
- recommend: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.array.def(function () {
3245
+ colorObj: shared_.PropTypes.object.isRequired,
3246
+ recommend: shared_.PropTypes.oneOfType([shared_.PropTypes.array.def(function () {
1813
3247
  return [];
1814
- }), shared_namespaceObject.PropTypes.bool.def(true)]).isRequired,
1815
- recommendEmpty: shared_namespaceObject.PropTypes.bool.def(true)
3248
+ }), shared_.PropTypes.bool.def(true)]).isRequired,
3249
+ recommendEmpty: shared_.PropTypes.bool.def(true)
1816
3250
  };
1817
- /* harmony default export */ const recommend_colors = ((0,external_vue_namespaceObject.defineComponent)({
3251
+ /* harmony default export */ const recommend_colors = ((0,external_vue_.defineComponent)({
1818
3252
  props: recommend_colors_colorPickerProps,
1819
3253
  emits: ['change', 'tab'],
1820
3254
  setup: function setup(props, _ref) {
1821
3255
  var emit = _ref.emit;
1822
- var isFocused = (0,external_vue_namespaceObject.ref)(false);
1823
- var selectedIndex = (0,external_vue_namespaceObject.ref)(-1);
1824
- var selectedColor = (0,external_vue_namespaceObject.ref)(null);
1825
- (0,external_vue_namespaceObject.watch)(function () {
3256
+ var isFocused = (0,external_vue_.ref)(false);
3257
+ var selectedIndex = (0,external_vue_.ref)(-1);
3258
+ var selectedColor = (0,external_vue_.ref)(null);
3259
+ (0,external_vue_.watch)(function () {
1826
3260
  return props.colorObj;
1827
3261
  }, function () {
1828
3262
  // 每次在外部修改颜色后预设面板都会取消预设选择的样式,即便预设和当前色一样
@@ -1832,13 +3266,13 @@ var recommend_colors_colorPickerProps = {
1832
3266
  }, {
1833
3267
  deep: true
1834
3268
  });
1835
- var colors = (0,external_vue_namespaceObject.computed)(function () {
3269
+ var colors = (0,external_vue_.computed)(function () {
1836
3270
  return getColorsFromRecommend(props.recommend);
1837
3271
  });
1838
3272
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
1839
3273
  resolveClassName = _usePrefix.resolveClassName;
1840
3274
  var getColorClass = function getColorClass(color, index) {
1841
- return (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty({}, "".concat(resolveClassName('color-picker-empty')), color === ''), "".concat(resolveClassName('color-picker-recommend-selected-color')), isFocused.value && selectedIndex.value === index), "".concat(resolveClassName('color-picker-recommend-color')));
3275
+ return (0,shared_.classes)((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(resolveClassName('color-picker-empty')), color === ''), "".concat(resolveClassName('color-picker-recommend-selected-color')), isFocused.value && selectedIndex.value === index), "".concat(resolveClassName('color-picker-recommend-color')));
1842
3276
  };
1843
3277
  var handleKeydown = function handleKeydown(e) {
1844
3278
  if (e.code === 'Tab') {
@@ -1874,7 +3308,7 @@ var recommend_colors_colorPickerProps = {
1874
3308
  var color = colors.value[index];
1875
3309
  emit('change', color);
1876
3310
  // 预设里面修改颜色不重置状态(恢复状态)
1877
- (0,external_vue_namespaceObject.nextTick)(function () {
3311
+ (0,external_vue_.nextTick)(function () {
1878
3312
  selectedIndex.value = index;
1879
3313
  selectedColor.value = color;
1880
3314
  });
@@ -1900,7 +3334,7 @@ var recommend_colors_colorPickerProps = {
1900
3334
  }
1901
3335
  };
1902
3336
  return function () {
1903
- return (0,external_vue_namespaceObject.createVNode)("div", {
3337
+ return (0,external_vue_.createVNode)("div", {
1904
3338
  "class": "".concat(resolveClassName('color-picker-recommend'), " "),
1905
3339
  "tabindex": "0",
1906
3340
  "onBlur": function onBlur() {
@@ -1911,15 +3345,15 @@ var recommend_colors_colorPickerProps = {
1911
3345
  },
1912
3346
  "onKeydown": handleKeydown
1913
3347
  }, [colors.value.map(function (color, index) {
1914
- return (0,external_vue_namespaceObject.createVNode)("div", {
3348
+ return (0,external_vue_.createVNode)("div", {
1915
3349
  "style": "background: ".concat(color || '#fff'),
1916
3350
  "class": getColorClass(color, index),
1917
3351
  "onClick": function onClick() {
1918
3352
  return selectColor(index);
1919
3353
  }
1920
- }, [selectedIndex.value === index ? (0,external_vue_namespaceObject.createVNode)("div", {
3354
+ }, [selectedIndex.value === index ? (0,external_vue_.createVNode)("div", {
1921
3355
  "class": "".concat(resolveClassName('color-picker-pointer'))
1922
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
3356
+ }, [(0,external_vue_.createVNode)("div", {
1923
3357
  "class": "".concat(resolveClassName('color-picker-circle'))
1924
3358
  }, null)]) : undefined]);
1925
3359
  })]);
@@ -1958,20 +3392,20 @@ var recommend_colors_colorPickerProps = {
1958
3392
 
1959
3393
 
1960
3394
  var saturation_panel_colorPickerProps = {
1961
- colorObj: shared_namespaceObject.PropTypes.object.isRequired
3395
+ colorObj: shared_.PropTypes.object.isRequired
1962
3396
  };
1963
- /* harmony default export */ const saturation_panel = ((0,external_vue_namespaceObject.defineComponent)({
3397
+ /* harmony default export */ const saturation_panel = ((0,external_vue_.defineComponent)({
1964
3398
  props: saturation_panel_colorPickerProps,
1965
3399
  emits: ['change'],
1966
3400
  setup: function setup(props, _ref) {
1967
3401
  var emit = _ref.emit;
1968
- var containerRef = (0,external_vue_namespaceObject.ref)(null);
1969
- var backgroundStyle = (0,external_vue_namespaceObject.computed)(function () {
3402
+ var containerRef = (0,external_vue_.ref)(null);
3403
+ var backgroundStyle = (0,external_vue_.computed)(function () {
1970
3404
  return {
1971
3405
  background: "hsl(".concat(props.colorObj.hsv.h, ", 100%, 50%)")
1972
3406
  };
1973
3407
  });
1974
- var pointerStyle = (0,external_vue_namespaceObject.computed)(function () {
3408
+ var pointerStyle = (0,external_vue_.computed)(function () {
1975
3409
  return {
1976
3410
  top: "".concat((1 - props.colorObj.hsv.v) * 100, "%"),
1977
3411
  left: "".concat(props.colorObj.hsv.s * 100, "%")
@@ -2055,7 +3489,7 @@ var saturation_panel_colorPickerProps = {
2055
3489
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
2056
3490
  resolveClassName = _usePrefix.resolveClassName;
2057
3491
  return function () {
2058
- return (0,external_vue_namespaceObject.createVNode)("div", {
3492
+ return (0,external_vue_.createVNode)("div", {
2059
3493
  "ref": containerRef,
2060
3494
  "style": backgroundStyle.value,
2061
3495
  "class": "".concat(resolveClassName('color-picker-saturation')),
@@ -2065,14 +3499,14 @@ var saturation_panel_colorPickerProps = {
2065
3499
  e.stopPropagation();
2066
3500
  handleMouseDown(e);
2067
3501
  }
2068
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
3502
+ }, [(0,external_vue_.createVNode)("div", {
2069
3503
  "class": "".concat(resolveClassName('color-picker-saturation-white'))
2070
- }, null), (0,external_vue_namespaceObject.createVNode)("div", {
3504
+ }, null), (0,external_vue_.createVNode)("div", {
2071
3505
  "class": "".concat(resolveClassName('color-picker-saturation-black'))
2072
- }, null), (0,external_vue_namespaceObject.createVNode)("div", {
3506
+ }, null), (0,external_vue_.createVNode)("div", {
2073
3507
  "style": pointerStyle.value,
2074
3508
  "class": "".concat(resolveClassName('color-picker-pointer'))
2075
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
3509
+ }, [(0,external_vue_.createVNode)("div", {
2076
3510
  "class": "".concat(resolveClassName('color-picker-circle'))
2077
3511
  }, null)])]);
2078
3512
  };
@@ -2126,65 +3560,65 @@ var ColorPickSizeEnum;
2126
3560
  ColorPickSizeEnum["UNKNOWN"] = "";
2127
3561
  })(ColorPickSizeEnum || (ColorPickSizeEnum = {}));
2128
3562
  var color_picker_colorPickerProps = {
2129
- modelValue: shared_namespaceObject.PropTypes.string.def(''),
2130
- disabled: shared_namespaceObject.PropTypes.bool.def(false),
2131
- readonly: shared_namespaceObject.PropTypes.bool.def(false),
2132
- transfer: shared_namespaceObject.PropTypes.bool.def(false),
3563
+ modelValue: shared_.PropTypes.string.def(''),
3564
+ disabled: shared_.PropTypes.bool.def(false),
3565
+ readonly: shared_.PropTypes.bool.def(false),
3566
+ transfer: shared_.PropTypes.bool.def(false),
2133
3567
  size: (0,external_vue_types_namespaceObject.toType)('colorPickSize', {}).def(ColorPickSizeEnum.UNKNOWN),
2134
- showValue: shared_namespaceObject.PropTypes.bool.def(true),
3568
+ showValue: shared_.PropTypes.bool.def(true),
2135
3569
  // true 展示组件内置预设值
2136
3570
  // false 不展示预设值
2137
3571
  // 数组 自定义预设值
2138
- recommend: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.array.def(function () {
3572
+ recommend: shared_.PropTypes.oneOfType([shared_.PropTypes.array.def(function () {
2139
3573
  return [];
2140
- }), shared_namespaceObject.PropTypes.bool.def(true)]).def(true),
2141
- extCls: shared_namespaceObject.PropTypes.string.def(''),
2142
- withValidate: shared_namespaceObject.PropTypes.bool.def(true),
2143
- recommendEmpty: shared_namespaceObject.PropTypes.bool.def(true),
3574
+ }), shared_.PropTypes.bool.def(true)]).def(true),
3575
+ extCls: shared_.PropTypes.string.def(''),
3576
+ withValidate: shared_.PropTypes.bool.def(true),
3577
+ recommendEmpty: shared_.PropTypes.bool.def(true),
2144
3578
  // 初始化默认展开
2145
- showOnInit: shared_namespaceObject.PropTypes.bool.def(false)
3579
+ showOnInit: shared_.PropTypes.bool.def(false)
2146
3580
  };
2147
3581
  var whiteColorObj = formatColor('#FFFFFF');
2148
- /* harmony default export */ const color_picker = ((0,external_vue_namespaceObject.defineComponent)({
3582
+ /* harmony default export */ const color_picker = ((0,external_vue_.defineComponent)({
2149
3583
  name: 'ColorPicker',
2150
3584
  directives: {
2151
- clickoutside: directives_namespaceObject.clickoutside
3585
+ clickoutside: src.clickoutside
2152
3586
  },
2153
3587
  props: color_picker_colorPickerProps,
2154
3588
  emits: ['update:modelValue', 'change'],
2155
3589
  setup: function setup(props, _ref) {
2156
3590
  var emit = _ref.emit,
2157
3591
  slots = _ref.slots;
2158
- var formItem = (0,shared_namespaceObject.useFormItem)();
2159
- var showDropdown = (0,external_vue_namespaceObject.ref)(false);
3592
+ var formItem = (0,shared_.useFormItem)();
3593
+ var showDropdown = (0,external_vue_.ref)(false);
2160
3594
  // 当前颜色的色值,如果为空字符串显示:默认白色背景 + 中间一个叉
2161
- var colorStr = (0,external_vue_namespaceObject.ref)('');
3595
+ var colorStr = (0,external_vue_.ref)('');
2162
3596
  // 储存当前颜色的相关信息
2163
- var colorObj = (0,external_vue_namespaceObject.reactive)(JSON.parse(JSON.stringify(whiteColorObj)));
2164
- var dropRef = (0,external_vue_namespaceObject.ref)(null);
2165
- var saturationPanelRef = (0,external_vue_namespaceObject.ref)(null);
2166
- var referenceRef = (0,external_vue_namespaceObject.ref)(null);
3597
+ var colorObj = (0,external_vue_.reactive)(JSON.parse(JSON.stringify(whiteColorObj)));
3598
+ var dropRef = (0,external_vue_.ref)(null);
3599
+ var saturationPanelRef = (0,external_vue_.ref)(null);
3600
+ var referenceRef = (0,external_vue_.ref)(null);
2167
3601
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
2168
3602
  resolveClassName = _usePrefix.resolveClassName;
2169
- var colorPickerCls = (0,external_vue_namespaceObject.computed)(function () {
2170
- return (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(resolveClassName("color-picker-".concat(props.size))), props.size), "".concat(resolveClassName('color-picker-show-dropdown')), showDropdown.value), "".concat(resolveClassName('color-picker-show-value')), props.showValue), "".concat(resolveClassName('color-picker-disabled')), props.disabled || props.readonly), "".concat(resolveClassName('color-picker'), " ").concat(props.extCls));
3603
+ var colorPickerCls = (0,external_vue_.computed)(function () {
3604
+ return (0,shared_.classes)((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(resolveClassName("color-picker-".concat(props.size))), props.size), "".concat(resolveClassName('color-picker-show-dropdown')), showDropdown.value), "".concat(resolveClassName('color-picker-show-value')), props.showValue), "".concat(resolveClassName('color-picker-disabled')), props.disabled || props.readonly), "".concat(resolveClassName('color-picker'), " ").concat(props.extCls));
2171
3605
  });
2172
3606
  // 是否渲染预设值
2173
- var isRenderRecommend = (0,external_vue_namespaceObject.computed)(function () {
3607
+ var isRenderRecommend = (0,external_vue_.computed)(function () {
2174
3608
  return Boolean(props.recommend === true || Array.isArray(props.recommend) && props.recommend.length);
2175
3609
  });
2176
- (0,external_vue_namespaceObject.onBeforeMount)(function () {
3610
+ (0,external_vue_.onBeforeMount)(function () {
2177
3611
  // 1. 组件初始化时,如果计算的色值和传入的值不一样,显示计算的色值
2178
3612
  changeColorFromProps({
2179
3613
  isCreated: true
2180
3614
  });
2181
3615
  if (props.showOnInit) {
2182
- (0,external_vue_namespaceObject.nextTick)(function () {
3616
+ (0,external_vue_.nextTick)(function () {
2183
3617
  openDropdown();
2184
3618
  });
2185
3619
  }
2186
3620
  });
2187
- (0,external_vue_namespaceObject.watch)(function () {
3621
+ (0,external_vue_.watch)(function () {
2188
3622
  return props.modelValue;
2189
3623
  }, function () {
2190
3624
  // 2. 如果组件绑定值被外部修改,自动根据绑定至更新组件色值
@@ -2237,7 +3671,7 @@ var whiteColorObj = formatColor('#FFFFFF');
2237
3671
  var closeDropdown = function closeDropdown() {
2238
3672
  if (showDropdown.value) {
2239
3673
  var _dropRef$value2;
2240
- (0,external_vue_namespaceObject.nextTick)(function () {
3674
+ (0,external_vue_.nextTick)(function () {
2241
3675
  return referenceRef.value.focus();
2242
3676
  });
2243
3677
  showDropdown.value = false;
@@ -2324,7 +3758,7 @@ var whiteColorObj = formatColor('#FFFFFF');
2324
3758
  showDropdown.value = false;
2325
3759
  };
2326
3760
  return function () {
2327
- return (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
3761
+ return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
2328
3762
  "ref": referenceRef,
2329
3763
  "class": colorPickerCls.value,
2330
3764
  "tabindex": "0",
@@ -2333,29 +3767,29 @@ var whiteColorObj = formatColor('#FFFFFF');
2333
3767
  }, [typeof slots.trigger === 'function' ? slots.trigger({
2334
3768
  value: colorStr.value,
2335
3769
  isShowDropdown: showDropdown.value
2336
- }) : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("div", {
3770
+ }) : (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)("div", {
2337
3771
  "class": "".concat(resolveClassName('color-picker-color'))
2338
- }, [(0,external_vue_namespaceObject.createVNode)("span", {
3772
+ }, [(0,external_vue_.createVNode)("span", {
2339
3773
  "style": "background: ".concat(colorStr.value || '#FFF'),
2340
3774
  "class": "".concat(resolveClassName('color-picker-color-square'), " ").concat(!colorStr.value && "".concat(resolveClassName('color-picker-empty')))
2341
- }, null)]), props.showValue ? (0,external_vue_namespaceObject.createVNode)("div", {
3775
+ }, null)]), props.showValue ? (0,external_vue_.createVNode)("div", {
2342
3776
  "class": "".concat(resolveClassName('color-picker-text'))
2343
- }, [(0,external_vue_namespaceObject.createVNode)("span", null, [colorStr.value])]) : undefined, (0,external_vue_namespaceObject.createVNode)("div", {
3777
+ }, [(0,external_vue_.createVNode)("span", null, [colorStr.value])]) : undefined, (0,external_vue_.createVNode)("div", {
2344
3778
  "class": "".concat(resolveClassName('color-picker-icon'))
2345
- }, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.AngleUp, {
3779
+ }, [(0,external_vue_.createVNode)(icon_namespaceObject.AngleUp, {
2346
3780
  "class": resolveClassName('icon-angle-down')
2347
- }, null)])]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Transition, {
3781
+ }, null)])]), (0,external_vue_.createVNode)(external_vue_.Transition, {
2348
3782
  "name": "bk-fade-down-transition"
2349
3783
  }, {
2350
3784
  "default": function _default() {
2351
- return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)(date_picker_namespaceObject.PickerDropdown, {
3785
+ return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)(date_picker_namespaceObject.PickerDropdown, {
2352
3786
  "ref": dropRef,
2353
3787
  "triggerRef": referenceRef.value
2354
3788
  }, {
2355
3789
  "default": function _default() {
2356
- return [(0,external_vue_namespaceObject.createVNode)("div", {
3790
+ return [(0,external_vue_.createVNode)("div", {
2357
3791
  "class": "".concat(resolveClassName('color-dropdown-container'))
2358
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
3792
+ }, [(0,external_vue_.createVNode)("div", {
2359
3793
  "class": "".concat(resolveClassName('color-picker-dropdown')),
2360
3794
  "onClick": function onClick(e) {
2361
3795
  e.stopPropagation();
@@ -2364,20 +3798,20 @@ var whiteColorObj = formatColor('#FFFFFF');
2364
3798
  "onMousedown": function onMousedown(e) {
2365
3799
  e.stopPropagation();
2366
3800
  }
2367
- }, [(0,external_vue_namespaceObject.createVNode)(saturation_panel, {
3801
+ }, [(0,external_vue_.createVNode)(saturation_panel, {
2368
3802
  "ref": saturationPanelRef,
2369
3803
  "colorObj": colorObj,
2370
3804
  "onChange": handleColorChange
2371
- }, null), (0,external_vue_namespaceObject.createVNode)(hue_slider, {
3805
+ }, null), (0,external_vue_.createVNode)(hue_slider, {
2372
3806
  "colorObj": colorObj,
2373
3807
  "onChange": handleColorChange
2374
- }, null), (0,external_vue_namespaceObject.createVNode)(color_input, {
3808
+ }, null), (0,external_vue_.createVNode)(color_input, {
2375
3809
  "colorObj": colorObj,
2376
3810
  "onChange": handleColorChange,
2377
3811
  "onTab": handleTabInput
2378
- }, null), isRenderRecommend.value ? (0,external_vue_namespaceObject.createVNode)("div", {
3812
+ }, null), isRenderRecommend.value ? (0,external_vue_.createVNode)("div", {
2379
3813
  "class": "".concat(resolveClassName('color-picker-recommend-container'))
2380
- }, [(0,external_vue_namespaceObject.createVNode)(recommend_colors, {
3814
+ }, [(0,external_vue_.createVNode)(recommend_colors, {
2381
3815
  "colorObj": colorObj,
2382
3816
  "recommend": props.recommend,
2383
3817
  "recommendEmpty": props.recommendEmpty,
@@ -2385,9 +3819,9 @@ var whiteColorObj = formatColor('#FFFFFF');
2385
3819
  "onTab": handleTabRecommend
2386
3820
  }, null)]) : undefined])])];
2387
3821
  }
2388
- }), [[external_vue_namespaceObject.vShow, showDropdown.value]])];
3822
+ }), [[external_vue_.vShow, showDropdown.value]])];
2389
3823
  }
2390
- })]), [[(0,external_vue_namespaceObject.resolveDirective)("clickoutside"), hideDropDown]]);
3824
+ })]), [[(0,external_vue_.resolveDirective)("clickoutside"), hideDropDown]]);
2391
3825
  };
2392
3826
  }
2393
3827
  }));
@@ -2419,7 +3853,9 @@ var whiteColorObj = formatColor('#FFFFFF');
2419
3853
  */
2420
3854
 
2421
3855
 
2422
- var BkColorPicker = (0,shared_namespaceObject.withInstall)(color_picker);
2423
- /* harmony default export */ const src = (BkColorPicker);
3856
+ var BkColorPicker = (0,shared_.withInstall)(color_picker);
3857
+ /* harmony default export */ const color_picker_src = (BkColorPicker);
3858
+ })();
3859
+
2424
3860
  var __webpack_exports__default = __webpack_exports__["default"];
2425
3861
  export { __webpack_exports__default as default };