bkui-vue 2.0.1 → 2.0.2-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +23 -23
- package/dist/index.esm.js +5684 -5650
- package/dist/index.umd.js +27 -27
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/cascader/index.js +1669 -181
- package/lib/color-picker/index.js +1613 -170
- package/lib/components.d.ts +1 -2
- package/lib/components.js +1 -2
- package/lib/date-picker/date-picker.css +220 -4
- package/lib/date-picker/date-picker.less +5 -5
- package/lib/date-picker/date-picker.variable.css +237 -21
- package/lib/date-picker/index.js +1882 -470
- package/lib/directives/index.js +228 -111
- package/lib/form/index.js +1570 -162
- package/lib/image/index.js +1468 -164
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -2
- package/lib/input/index.js +1301 -13
- package/lib/pop-confirm/index.d.ts +16 -2
- package/lib/pop-confirm/index.js +13 -5
- package/lib/pop-confirm/pop-confirm.d.ts +5 -1
- package/lib/popover/index.js +1356 -68
- package/lib/search-select/index.js +1329 -108
- package/lib/select/index.js +1237 -16
- package/lib/slider/index.js +2 -1
- package/lib/tab/index.js +1277 -10
- package/lib/table/index.js +1346 -125
- package/lib/tag-input/index.js +1278 -16
- package/lib/tree/index.d.ts +4 -0
- package/lib/tree/index.js +47 -23
- package/lib/tree/props.d.ts +1 -0
- package/lib/tree/tree.css +18 -0
- package/lib/tree/tree.d.ts +2 -0
- package/lib/tree/tree.less +24 -0
- package/lib/tree/tree.variable.css +18 -0
- package/lib/tree/use-node-action.d.ts +1 -1
- package/package.json +1 -1
- package/lib/plugin-popover/index.d.ts +0 -27
- package/lib/plugin-popover/index.js +0 -65
- package/lib/plugins/index.d.ts +0 -1
- package/lib/plugins/index.js +0 -64
package/lib/form/index.js
CHANGED
@@ -1,20 +1,1508 @@
|
|
1
1
|
import "../styles/reset.css";
|
2
2
|
import "./form.less";
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__loading_4d683b23__ from "../loading";
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__overflow_title_f9bafa47__ from "../overflow-title";
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
|
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_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
|
6
10
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash_isBoolean_dcb66997__ from "lodash/isBoolean";
|
7
11
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash_isString_e6fa8a5b__ from "lodash/isString";
|
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
13
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash_get_9427f899__ from "lodash/get";
|
11
14
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash_isFunction_f90b20d6__ from "lodash/isFunction";
|
12
15
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash_isDate_b457317b__ from "lodash/isDate";
|
13
16
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash_isEmpty_e109fd6b__ from "lodash/isEmpty";
|
14
|
-
/******/
|
15
|
-
|
17
|
+
/******/ var __webpack_modules__ = ({
|
18
|
+
|
19
|
+
/***/ 668:
|
20
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
21
|
+
|
22
|
+
|
23
|
+
// EXPORTS
|
24
|
+
__webpack_require__.d(__webpack_exports__, {
|
25
|
+
bkTooltips: () => (/* reexport */ src_tooltips)
|
26
|
+
});
|
27
|
+
|
28
|
+
// UNUSED EXPORTS: bkEllipsis, bkEllipsisInstance, bkLoading, clickoutside, mousewheel, overflowTitle
|
29
|
+
|
30
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/clickoutside.ts
|
31
|
+
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; } } }; }
|
32
|
+
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); }
|
33
|
+
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; }
|
34
|
+
/*
|
35
|
+
* Tencent is pleased to support the open source community by making
|
36
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
37
|
+
*
|
38
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
39
|
+
*
|
40
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
41
|
+
*
|
42
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
43
|
+
*
|
44
|
+
* ---------------------------------------------------
|
45
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
46
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
47
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
48
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
49
|
+
*
|
50
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
51
|
+
* the Software.
|
52
|
+
*
|
53
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
54
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
55
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
56
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
57
|
+
* IN THE SOFTWARE.
|
58
|
+
*/
|
59
|
+
var isElement = function isElement(e) {
|
60
|
+
if (typeof Element === 'undefined') return false;
|
61
|
+
return e instanceof Element;
|
62
|
+
};
|
63
|
+
var nodeList = new Map();
|
64
|
+
var startClick;
|
65
|
+
document.addEventListener('mousedown', function (e) {
|
66
|
+
return startClick = e;
|
67
|
+
});
|
68
|
+
document.addEventListener('mouseup', function (e) {
|
69
|
+
var _iterator = _createForOfIteratorHelper(nodeList.values()),
|
70
|
+
_step;
|
71
|
+
try {
|
72
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
73
|
+
var handlers = _step.value;
|
74
|
+
var _iterator2 = _createForOfIteratorHelper(handlers),
|
75
|
+
_step2;
|
76
|
+
try {
|
77
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
78
|
+
var documentHandler = _step2.value.documentHandler;
|
79
|
+
documentHandler(e, startClick);
|
80
|
+
}
|
81
|
+
} catch (err) {
|
82
|
+
_iterator2.e(err);
|
83
|
+
} finally {
|
84
|
+
_iterator2.f();
|
85
|
+
}
|
86
|
+
}
|
87
|
+
} catch (err) {
|
88
|
+
_iterator.e(err);
|
89
|
+
} finally {
|
90
|
+
_iterator.f();
|
91
|
+
}
|
92
|
+
});
|
93
|
+
function createDocumentHandler(el, binding) {
|
94
|
+
var excludes = [];
|
95
|
+
if (Array.isArray(binding.arg)) {
|
96
|
+
excludes = binding.arg;
|
97
|
+
} else if (isElement(binding.arg)) {
|
98
|
+
excludes.push(binding.arg);
|
99
|
+
}
|
100
|
+
return function (mouseup, mousedown) {
|
101
|
+
var popperRef = binding.instance.popperRef;
|
102
|
+
var mouseUpTarget = mouseup.target;
|
103
|
+
var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
|
104
|
+
var isBound = !binding || !binding.instance;
|
105
|
+
var isTargetExists = !mouseUpTarget || !mouseDownTarget;
|
106
|
+
var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
|
107
|
+
var isSelf = el === mouseUpTarget;
|
108
|
+
var isTargetExcluded = excludes.length && excludes.some(function (item) {
|
109
|
+
return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
|
110
|
+
}) || excludes.length && excludes.includes(mouseDownTarget);
|
111
|
+
var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
|
112
|
+
if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
|
113
|
+
return;
|
114
|
+
}
|
115
|
+
binding.value(mouseup, mousedown);
|
116
|
+
};
|
117
|
+
}
|
118
|
+
var ClickOutside = {
|
119
|
+
beforeMount: function beforeMount(el, binding) {
|
120
|
+
if (!nodeList.has(el)) {
|
121
|
+
nodeList.set(el, []);
|
122
|
+
}
|
123
|
+
nodeList.get(el).push({
|
124
|
+
documentHandler: createDocumentHandler(el, binding),
|
125
|
+
bindingFn: binding.value
|
126
|
+
});
|
127
|
+
},
|
128
|
+
updated: function updated(el, binding) {
|
129
|
+
if (!nodeList.has(el)) {
|
130
|
+
nodeList.set(el, []);
|
131
|
+
}
|
132
|
+
var handlers = nodeList.get(el);
|
133
|
+
var oldHandlerIndex = handlers.findIndex(function (item) {
|
134
|
+
return item.bindingFn === binding.oldValue;
|
135
|
+
});
|
136
|
+
var newHandler = {
|
137
|
+
documentHandler: createDocumentHandler(el, binding),
|
138
|
+
bindingFn: binding.value
|
139
|
+
};
|
140
|
+
if (oldHandlerIndex >= 0) {
|
141
|
+
// replace the old handler to the new handler
|
142
|
+
handlers.splice(oldHandlerIndex, 1, newHandler);
|
143
|
+
} else {
|
144
|
+
handlers.push(newHandler);
|
145
|
+
}
|
146
|
+
},
|
147
|
+
unmounted: function unmounted(el) {
|
148
|
+
// remove all listeners when a component unmounted
|
149
|
+
nodeList["delete"](el);
|
150
|
+
}
|
151
|
+
};
|
152
|
+
ClickOutside.install = function (app) {
|
153
|
+
app.directive('bkTooltips', ClickOutside);
|
154
|
+
};
|
155
|
+
/* harmony default export */ const clickoutside = ((/* unused pure expression or super */ null && (ClickOutside)));
|
156
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
157
|
+
var esm_typeof = __webpack_require__(6522);
|
158
|
+
// EXTERNAL MODULE: external "../popover"
|
159
|
+
var popover_ = __webpack_require__(563);
|
160
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/ellipsis.ts
|
161
|
+
|
162
|
+
/*
|
163
|
+
* Tencent is pleased to support the open source community by making
|
164
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
165
|
+
*
|
166
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
167
|
+
*
|
168
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
169
|
+
*
|
170
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
171
|
+
*
|
172
|
+
* ---------------------------------------------------
|
173
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
174
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
175
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
176
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
177
|
+
*
|
178
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
179
|
+
* the Software.
|
180
|
+
*
|
181
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
182
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
183
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
184
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
185
|
+
* IN THE SOFTWARE.
|
186
|
+
*/
|
187
|
+
|
188
|
+
var resolveOptions = function resolveOptions(el, binding) {
|
189
|
+
var options = {
|
190
|
+
content: '',
|
191
|
+
target: el
|
192
|
+
};
|
193
|
+
if ((0,esm_typeof["default"])(binding) === 'object') {
|
194
|
+
Object.assign(options, binding);
|
195
|
+
if (Object.prototype.hasOwnProperty.call(binding, 'popoverOption')) {
|
196
|
+
Object.assign(options, binding.popoverOption);
|
197
|
+
}
|
198
|
+
} else {
|
199
|
+
options.content = binding;
|
200
|
+
}
|
201
|
+
return options;
|
202
|
+
};
|
203
|
+
var createInstance = function createInstance(el, binding) {
|
204
|
+
var instance = null;
|
205
|
+
var createTimer = null;
|
206
|
+
var hidePopTimer = null;
|
207
|
+
var options = resolveOptions(el, binding);
|
208
|
+
var disabled = options.disabled;
|
209
|
+
if (disabled || instance) {
|
210
|
+
return;
|
211
|
+
}
|
212
|
+
var handleContentEnter = function handleContentEnter() {
|
213
|
+
hidePopTimer && clearTimeout(hidePopTimer);
|
214
|
+
hidePopTimer = null;
|
215
|
+
};
|
216
|
+
var handleContentLeave = function handleContentLeave() {
|
217
|
+
var _instance, _instance2;
|
218
|
+
if (createTimer) {
|
219
|
+
clearTimeout(createTimer);
|
220
|
+
}
|
221
|
+
(_instance = instance) === null || _instance === void 0 || _instance.hide();
|
222
|
+
(_instance2 = instance) === null || _instance2 === void 0 || _instance2.close();
|
223
|
+
instance = null;
|
224
|
+
};
|
225
|
+
var handleMouseEnter = function handleMouseEnter() {
|
226
|
+
handleContentLeave();
|
227
|
+
createTimer && clearTimeout(createTimer);
|
228
|
+
createTimer = setTimeout(function () {
|
229
|
+
var targetOptions = resolveOptions(el, binding);
|
230
|
+
targetOptions.isShow = true;
|
231
|
+
targetOptions.content = typeof targetOptions.content === 'function' ? targetOptions.content() : targetOptions.content || el.innerText;
|
232
|
+
targetOptions.allowHtml = true;
|
233
|
+
Object.assign(targetOptions, {
|
234
|
+
onContentMouseenter: handleContentEnter,
|
235
|
+
onContentMouseleave: handleContentLeave
|
236
|
+
});
|
237
|
+
instance = (0,popover_.$bkPopover)(targetOptions);
|
238
|
+
}, 300);
|
239
|
+
};
|
240
|
+
var handleMouseLeave = function handleMouseLeave() {
|
241
|
+
hidePopTimer = setTimeout(function () {
|
242
|
+
var _instance3, _instance4;
|
243
|
+
if (createTimer) {
|
244
|
+
clearTimeout(createTimer);
|
245
|
+
}
|
246
|
+
(_instance3 = instance) === null || _instance3 === void 0 || _instance3.hide();
|
247
|
+
(_instance4 = instance) === null || _instance4 === void 0 || _instance4.close();
|
248
|
+
instance = null;
|
249
|
+
}, 120);
|
250
|
+
};
|
251
|
+
el.addEventListener('mouseenter', handleMouseEnter);
|
252
|
+
el.addEventListener('mouseleave', handleMouseLeave);
|
253
|
+
var destroyInstance = function destroyInstance(element) {
|
254
|
+
var _ref, _ref2;
|
255
|
+
handleMouseLeave();
|
256
|
+
(_ref = element !== null && element !== void 0 ? element : el) === null || _ref === void 0 || _ref.removeEventListener('mouseenter', handleMouseEnter);
|
257
|
+
(_ref2 = element !== null && element !== void 0 ? element : el) === null || _ref2 === void 0 || _ref2.removeEventListener('mouseleave', handleMouseLeave);
|
258
|
+
};
|
259
|
+
return {
|
260
|
+
destroyInstance: destroyInstance,
|
261
|
+
instance: instance
|
262
|
+
};
|
263
|
+
};
|
264
|
+
var ellipsis = {
|
265
|
+
mounted: function mounted(el, binding) {
|
266
|
+
createInstance(el, binding);
|
267
|
+
}
|
268
|
+
};
|
269
|
+
/* harmony default export */ const src_ellipsis = ((/* unused pure expression or super */ null && (ellipsis)));
|
270
|
+
// EXTERNAL MODULE: ../../node_modules/normalize-wheel/index.js
|
271
|
+
var normalize_wheel = __webpack_require__(2439);
|
272
|
+
var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel);
|
273
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/mousewheel.ts
|
274
|
+
/*
|
275
|
+
* Tencent is pleased to support the open source community by making
|
276
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
277
|
+
*
|
278
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
279
|
+
*
|
280
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
281
|
+
*
|
282
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
283
|
+
*
|
284
|
+
* ---------------------------------------------------
|
285
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
286
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
287
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
288
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
289
|
+
*
|
290
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
291
|
+
* the Software.
|
292
|
+
*
|
293
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
294
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
295
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
296
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
297
|
+
* IN THE SOFTWARE.
|
298
|
+
*/
|
299
|
+
|
300
|
+
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
301
|
+
var mousewheelHandler = function mousewheelHandler(element, callback) {
|
302
|
+
if (element !== null && element !== void 0 && element.addEventListener) {
|
303
|
+
element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', function (e) {
|
304
|
+
var normalized = normalize_wheel_default()(e);
|
305
|
+
callback === null || callback === void 0 || callback.apply(this, [e, normalized]);
|
306
|
+
});
|
307
|
+
}
|
308
|
+
};
|
309
|
+
var mousewheel = {
|
310
|
+
beforeMount: function beforeMount(el, binding) {
|
311
|
+
mousewheelHandler(el, binding.value);
|
312
|
+
}
|
313
|
+
};
|
314
|
+
/* harmony default export */ const src_mousewheel = ((/* unused pure expression or super */ null && (mousewheel)));
|
315
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
316
|
+
var defineProperty = __webpack_require__(6666);
|
317
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
318
|
+
var toConsumableArray = __webpack_require__(7930);
|
319
|
+
// EXTERNAL MODULE: external "vue"
|
320
|
+
var external_vue_ = __webpack_require__(6609);
|
321
|
+
// EXTERNAL MODULE: external "../shared"
|
322
|
+
var shared_ = __webpack_require__(9253);
|
323
|
+
;// CONCATENATED MODULE: external "@popperjs/core"
|
324
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
325
|
+
var y = x => () => x
|
326
|
+
const core_namespaceObject = x({ ["createPopper"]: () => __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper });
|
327
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/tooltips.ts
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
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; }
|
332
|
+
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; }
|
333
|
+
/*
|
334
|
+
* Tencent is pleased to support the open source community by making
|
335
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
336
|
+
*
|
337
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
338
|
+
*
|
339
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
340
|
+
*
|
341
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
342
|
+
*
|
343
|
+
* ---------------------------------------------------
|
344
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
345
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
346
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
347
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
348
|
+
*
|
349
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
350
|
+
* the Software.
|
351
|
+
*
|
352
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
353
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
354
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
355
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
356
|
+
* IN THE SOFTWARE.
|
357
|
+
*/
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
var tooltips_nodeList = new WeakMap();
|
362
|
+
var tooltips = {
|
363
|
+
beforeMount: function beforeMount(el, binding) {
|
364
|
+
var opts = getOpts(binding);
|
365
|
+
var trigger = opts.trigger,
|
366
|
+
showOnInit = opts.showOnInit;
|
367
|
+
var popper = renderContent(opts);
|
368
|
+
var delayTimeout = null;
|
369
|
+
if (showOnInit) {
|
370
|
+
(0,external_vue_.nextTick)(function () {
|
371
|
+
show(el);
|
372
|
+
});
|
373
|
+
}
|
374
|
+
if (trigger === 'hover') {
|
375
|
+
var hideTimeout = null;
|
376
|
+
el.addEventListener('mouseenter', function () {
|
377
|
+
delayTimeout = setTimeout(function () {
|
378
|
+
show(el);
|
379
|
+
clearTimeout(hideTimeout);
|
380
|
+
clearTimeout(delayTimeout);
|
381
|
+
}, opts.delay);
|
382
|
+
});
|
383
|
+
popper.addEventListener('mouseenter', function () {
|
384
|
+
clearTimeout(hideTimeout);
|
385
|
+
});
|
386
|
+
el.addEventListener('mouseleave', function () {
|
387
|
+
clearTimeout(delayTimeout);
|
388
|
+
hideTimeout = setTimeout(function () {
|
389
|
+
hide(el);
|
390
|
+
}, 100);
|
391
|
+
});
|
392
|
+
el.addEventListener('click', function () {
|
393
|
+
hide(el);
|
394
|
+
});
|
395
|
+
popper.addEventListener('mouseleave', function () {
|
396
|
+
clearTimeout(delayTimeout);
|
397
|
+
hideTimeout = setTimeout(function () {
|
398
|
+
hide(el);
|
399
|
+
}, 100);
|
400
|
+
});
|
401
|
+
} else if (trigger === 'click') {
|
402
|
+
document.body.addEventListener('click', function (event) {
|
403
|
+
if (el.contains(event.target) && !popper.hasAttribute('data-show')) {
|
404
|
+
delayTimeout = setTimeout(function () {
|
405
|
+
show(el);
|
406
|
+
clearTimeout(delayTimeout);
|
407
|
+
}, opts.delay);
|
408
|
+
} else if (popper.hasAttribute('data-show')) {
|
409
|
+
hide(el);
|
410
|
+
}
|
411
|
+
});
|
412
|
+
}
|
413
|
+
tooltips_nodeList.set(el, {
|
414
|
+
opts: opts,
|
415
|
+
popper: popper,
|
416
|
+
popperInstance: null
|
417
|
+
});
|
418
|
+
},
|
419
|
+
updated: function updated(el, binding) {
|
420
|
+
if (tooltips_nodeList.get(el)) {
|
421
|
+
tooltips_nodeList.get(el).opts = getOpts(binding);
|
422
|
+
}
|
423
|
+
},
|
424
|
+
unmounted: function unmounted(el) {
|
425
|
+
hide(el);
|
426
|
+
tooltips_nodeList["delete"](el);
|
427
|
+
}
|
428
|
+
};
|
429
|
+
/**
|
430
|
+
* 初始化配置
|
431
|
+
* @returns tooltips配置
|
432
|
+
*/
|
433
|
+
function initOptions() {
|
434
|
+
var defaultOpts = {
|
435
|
+
arrow: true,
|
436
|
+
disabled: false,
|
437
|
+
trigger: 'hover',
|
438
|
+
theme: 'dark',
|
439
|
+
content: '',
|
440
|
+
showOnInit: false,
|
441
|
+
placement: 'top',
|
442
|
+
distance: 8,
|
443
|
+
extCls: '',
|
444
|
+
sameWidth: false,
|
445
|
+
delay: 0,
|
446
|
+
onShow: function onShow() {},
|
447
|
+
onHide: function onHide() {}
|
448
|
+
};
|
449
|
+
return defaultOpts;
|
450
|
+
}
|
451
|
+
/**
|
452
|
+
* 获取配置
|
453
|
+
* @returns tooltips配置
|
454
|
+
*/
|
455
|
+
function getOpts(binding) {
|
456
|
+
var opts = initOptions();
|
457
|
+
if ((0,esm_typeof["default"])(binding.value) === 'object') {
|
458
|
+
Object.assign(opts, binding.value);
|
459
|
+
} else {
|
460
|
+
opts.content = binding.value;
|
461
|
+
}
|
462
|
+
return opts;
|
463
|
+
}
|
464
|
+
/**
|
465
|
+
* 创建tooltips DOM
|
466
|
+
* @param opts
|
467
|
+
* @returns
|
468
|
+
*/
|
469
|
+
function renderContext(value, content) {
|
470
|
+
if (typeof value === 'string') {
|
471
|
+
content.innerText = value;
|
472
|
+
} else {
|
473
|
+
// 如果 content 是 Vue 组件的实例,则挂载它
|
474
|
+
var container = document.createElement('div');
|
475
|
+
var vnode = (0,external_vue_.h)(value);
|
476
|
+
(0,external_vue_.render)(vnode, container);
|
477
|
+
content.innerHTML = container.innerHTML;
|
478
|
+
}
|
479
|
+
}
|
480
|
+
function renderContent(opts) {
|
481
|
+
var value = opts.content,
|
482
|
+
hasArrow = opts.arrow,
|
483
|
+
theme = opts.theme,
|
484
|
+
extCls = opts.extCls;
|
485
|
+
var isLight = theme === 'light';
|
486
|
+
var zIndex = shared_.bkZIndexManager.getPopperIndex();
|
487
|
+
var content = document.createElement('div');
|
488
|
+
var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
|
489
|
+
content.className = "".concat((0,shared_.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
|
490
|
+
content.innerText = value;
|
491
|
+
content.style.zIndex = String(zIndex);
|
492
|
+
renderContext(value, content);
|
493
|
+
if (hasArrow) {
|
494
|
+
var arrow = renderArrow();
|
495
|
+
content.appendChild(arrow);
|
496
|
+
}
|
497
|
+
return content;
|
498
|
+
}
|
499
|
+
/**
|
500
|
+
* 渲染箭头dom
|
501
|
+
* @returns arrow DOM
|
502
|
+
*/
|
503
|
+
function renderArrow() {
|
504
|
+
var arrow = document.createElement('div');
|
505
|
+
var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
|
506
|
+
arrow.className = (0,shared_.resolveClassName)('popper-arrow', prefix);
|
507
|
+
arrow.setAttribute('data-popper-arrow', '');
|
508
|
+
return arrow;
|
509
|
+
}
|
510
|
+
/**
|
511
|
+
* 创建popper实例
|
512
|
+
* @param el
|
513
|
+
* @param popper
|
514
|
+
* @returns popper实例
|
515
|
+
*/
|
516
|
+
function createPopperInstance(el, popper) {
|
517
|
+
var _nodeList$get = tooltips_nodeList.get(el),
|
518
|
+
opts = _nodeList$get.opts;
|
519
|
+
var placement = opts.placement,
|
520
|
+
distance = opts.distance,
|
521
|
+
sameWidth = opts.sameWidth;
|
522
|
+
var popperInstance = (0,core_namespaceObject.createPopper)(el, popper, {
|
523
|
+
placement: placement,
|
524
|
+
modifiers: [{
|
525
|
+
name: 'offset',
|
526
|
+
options: {
|
527
|
+
offset: [0, distance]
|
528
|
+
}
|
529
|
+
}, {
|
530
|
+
name: 'arrow',
|
531
|
+
options: {
|
532
|
+
padding: 5
|
533
|
+
}
|
534
|
+
}].concat((0,toConsumableArray["default"])(sameWidth ? [{
|
535
|
+
name: 'sameWidth',
|
536
|
+
enabled: true,
|
537
|
+
phase: 'beforeWrite',
|
538
|
+
requires: ['computeStyles'],
|
539
|
+
fn: function fn(_ref) {
|
540
|
+
var state = _ref.state;
|
541
|
+
state.styles.popper.width = "".concat(state.rects.reference.width, "px");
|
542
|
+
},
|
543
|
+
effect: function effect(_ref2) {
|
544
|
+
var state = _ref2.state;
|
545
|
+
state.elements.popper.style.overflowWrap = 'break-word';
|
546
|
+
state.elements.popper.style.width = "".concat(state.elements.reference.offsetWidth, "px");
|
547
|
+
}
|
548
|
+
}] : []))
|
549
|
+
});
|
550
|
+
return popperInstance;
|
551
|
+
}
|
552
|
+
/**
|
553
|
+
* 显示
|
554
|
+
* @param el
|
555
|
+
*/
|
556
|
+
function show(el) {
|
557
|
+
var _nodeList$get2 = tooltips_nodeList.get(el),
|
558
|
+
popper = _nodeList$get2.popper,
|
559
|
+
opts = _nodeList$get2.opts;
|
560
|
+
var disabled = opts.disabled,
|
561
|
+
content = opts.content,
|
562
|
+
hasArrow = opts.arrow,
|
563
|
+
onShow = opts.onShow,
|
564
|
+
boundary = opts.boundary,
|
565
|
+
_opts$modifiers = opts.modifiers,
|
566
|
+
modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
|
567
|
+
if (disabled) return;
|
568
|
+
renderContext(content, popper);
|
569
|
+
if (hasArrow) {
|
570
|
+
var arrow = renderArrow();
|
571
|
+
popper.appendChild(arrow);
|
572
|
+
}
|
573
|
+
var container = document.body;
|
574
|
+
if (boundary) {
|
575
|
+
if (boundary === 'parent') {
|
576
|
+
container = el.parentElement;
|
577
|
+
} else if (boundary instanceof HTMLElement) {
|
578
|
+
container = boundary;
|
579
|
+
}
|
580
|
+
}
|
581
|
+
container.appendChild(popper);
|
582
|
+
var popperInstance = createPopperInstance(el, popper);
|
583
|
+
onShow();
|
584
|
+
// Make the tooltip visible
|
585
|
+
popper.setAttribute('data-show', '');
|
586
|
+
// Enable the event listeners
|
587
|
+
popperInstance.setOptions(function (options) {
|
588
|
+
return _objectSpread(_objectSpread({}, options), {}, {
|
589
|
+
modifiers: [].concat((0,toConsumableArray["default"])(options.modifiers), (0,toConsumableArray["default"])(modifiers), [{
|
590
|
+
name: 'eventListeners',
|
591
|
+
enabled: true
|
592
|
+
}])
|
593
|
+
});
|
594
|
+
});
|
595
|
+
// Update its position
|
596
|
+
popperInstance.forceUpdate();
|
597
|
+
tooltips_nodeList.get(el).popperInstance = popperInstance;
|
598
|
+
}
|
599
|
+
/**
|
600
|
+
* 隐藏
|
601
|
+
* @param el
|
602
|
+
*/
|
603
|
+
function hide(el) {
|
604
|
+
if (!tooltips_nodeList.get(el)) return;
|
605
|
+
var _nodeList$get3 = tooltips_nodeList.get(el),
|
606
|
+
popper = _nodeList$get3.popper,
|
607
|
+
popperInstance = _nodeList$get3.popperInstance,
|
608
|
+
opts = _nodeList$get3.opts;
|
609
|
+
var onHide = opts.onHide;
|
610
|
+
if (popper && document.body.contains(popper)) {
|
611
|
+
var _popper$parentNode;
|
612
|
+
popper.removeAttribute('data-show');
|
613
|
+
popperInstance === null || popperInstance === void 0 || popperInstance.destroy();
|
614
|
+
popper === null || popper === void 0 || (_popper$parentNode = popper.parentNode) === null || _popper$parentNode === void 0 || _popper$parentNode.removeChild(popper);
|
615
|
+
onHide();
|
616
|
+
}
|
617
|
+
}
|
618
|
+
/* harmony default export */ const src_tooltips = (tooltips);
|
619
|
+
;// CONCATENATED MODULE: external "../loading"
|
620
|
+
var external_loading_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
621
|
+
var external_loading_y = x => () => x
|
622
|
+
const external_loading_namespaceObject = external_loading_x({ });
|
623
|
+
;// CONCATENATED MODULE: external "../overflow-title"
|
624
|
+
var external_overflow_title_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
625
|
+
var external_overflow_title_y = x => () => x
|
626
|
+
const external_overflow_title_namespaceObject = external_overflow_title_x({ });
|
627
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/index.ts
|
628
|
+
/*
|
629
|
+
* Tencent is pleased to support the open source community by making
|
630
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
631
|
+
*
|
632
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
633
|
+
*
|
634
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
635
|
+
*
|
636
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
637
|
+
*
|
638
|
+
* ---------------------------------------------------
|
639
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
640
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
641
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
642
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
643
|
+
*
|
644
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
645
|
+
* the Software.
|
646
|
+
*
|
647
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
648
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
649
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
650
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
651
|
+
* IN THE SOFTWARE.
|
652
|
+
*/
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
// export { createInstance as bkEllipsisInstance } from './ellipsis';
|
660
|
+
|
661
|
+
/***/ }),
|
662
|
+
|
663
|
+
/***/ 2439:
|
664
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
665
|
+
|
666
|
+
module.exports = __webpack_require__(2527);
|
667
|
+
|
668
|
+
|
669
|
+
/***/ }),
|
670
|
+
|
671
|
+
/***/ 7430:
|
672
|
+
/***/ ((module) => {
|
673
|
+
|
674
|
+
/**
|
675
|
+
* Copyright (c) 2015, Facebook, Inc.
|
676
|
+
* All rights reserved.
|
677
|
+
*
|
678
|
+
* This source code is licensed under the BSD-style license found in the
|
679
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
680
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
681
|
+
*
|
682
|
+
* @providesModule ExecutionEnvironment
|
683
|
+
*/
|
684
|
+
|
685
|
+
/*jslint evil: true */
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
var canUseDOM = !!(
|
690
|
+
typeof window !== 'undefined' &&
|
691
|
+
window.document &&
|
692
|
+
window.document.createElement
|
693
|
+
);
|
694
|
+
|
695
|
+
/**
|
696
|
+
* Simple, lightweight module assisting with the detection and context of
|
697
|
+
* Worker. Helps avoid circular dependencies and allows code to reason about
|
698
|
+
* whether or not they are in a Worker, even if they never include the main
|
699
|
+
* `ReactWorker` dependency.
|
700
|
+
*/
|
701
|
+
var ExecutionEnvironment = {
|
702
|
+
|
703
|
+
canUseDOM: canUseDOM,
|
704
|
+
|
705
|
+
canUseWorkers: typeof Worker !== 'undefined',
|
706
|
+
|
707
|
+
canUseEventListeners:
|
708
|
+
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
709
|
+
|
710
|
+
canUseViewport: canUseDOM && !!window.screen,
|
711
|
+
|
712
|
+
isInWorker: !canUseDOM // For now, this is true - might change in the future.
|
713
|
+
|
714
|
+
};
|
715
|
+
|
716
|
+
module.exports = ExecutionEnvironment;
|
717
|
+
|
718
|
+
|
719
|
+
/***/ }),
|
720
|
+
|
721
|
+
/***/ 6377:
|
722
|
+
/***/ ((module) => {
|
723
|
+
|
724
|
+
/**
|
725
|
+
* Copyright 2004-present Facebook. All Rights Reserved.
|
726
|
+
*
|
727
|
+
* @providesModule UserAgent_DEPRECATED
|
728
|
+
*/
|
729
|
+
|
730
|
+
/**
|
731
|
+
* Provides entirely client-side User Agent and OS detection. You should prefer
|
732
|
+
* the non-deprecated UserAgent module when possible, which exposes our
|
733
|
+
* authoritative server-side PHP-based detection to the client.
|
734
|
+
*
|
735
|
+
* Usage is straightforward:
|
736
|
+
*
|
737
|
+
* if (UserAgent_DEPRECATED.ie()) {
|
738
|
+
* // IE
|
739
|
+
* }
|
740
|
+
*
|
741
|
+
* You can also do version checks:
|
742
|
+
*
|
743
|
+
* if (UserAgent_DEPRECATED.ie() >= 7) {
|
744
|
+
* // IE7 or better
|
745
|
+
* }
|
746
|
+
*
|
747
|
+
* The browser functions will return NaN if the browser does not match, so
|
748
|
+
* you can also do version compares the other way:
|
749
|
+
*
|
750
|
+
* if (UserAgent_DEPRECATED.ie() < 7) {
|
751
|
+
* // IE6 or worse
|
752
|
+
* }
|
753
|
+
*
|
754
|
+
* Note that the version is a float and may include a minor version number,
|
755
|
+
* so you should always use range operators to perform comparisons, not
|
756
|
+
* strict equality.
|
757
|
+
*
|
758
|
+
* **Note:** You should **strongly** prefer capability detection to browser
|
759
|
+
* version detection where it's reasonable:
|
760
|
+
*
|
761
|
+
* http://www.quirksmode.org/js/support.html
|
762
|
+
*
|
763
|
+
* Further, we have a large number of mature wrapper functions and classes
|
764
|
+
* which abstract away many browser irregularities. Check the documentation,
|
765
|
+
* grep for things, or ask on javascript@lists.facebook.com before writing yet
|
766
|
+
* another copy of "event || window.event".
|
767
|
+
*
|
768
|
+
*/
|
769
|
+
|
770
|
+
var _populated = false;
|
771
|
+
|
772
|
+
// Browsers
|
773
|
+
var _ie, _firefox, _opera, _webkit, _chrome;
|
774
|
+
|
775
|
+
// Actual IE browser for compatibility mode
|
776
|
+
var _ie_real_version;
|
777
|
+
|
778
|
+
// Platforms
|
779
|
+
var _osx, _windows, _linux, _android;
|
780
|
+
|
781
|
+
// Architectures
|
782
|
+
var _win64;
|
783
|
+
|
784
|
+
// Devices
|
785
|
+
var _iphone, _ipad, _native;
|
786
|
+
|
787
|
+
var _mobile;
|
788
|
+
|
789
|
+
function _populate() {
|
790
|
+
if (_populated) {
|
791
|
+
return;
|
792
|
+
}
|
793
|
+
|
794
|
+
_populated = true;
|
795
|
+
|
796
|
+
// To work around buggy JS libraries that can't handle multi-digit
|
797
|
+
// version numbers, Opera 10's user agent string claims it's Opera
|
798
|
+
// 9, then later includes a Version/X.Y field:
|
799
|
+
//
|
800
|
+
// Opera/9.80 (foo) Presto/2.2.15 Version/10.10
|
801
|
+
var uas = navigator.userAgent;
|
802
|
+
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);
|
803
|
+
var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
|
804
|
+
|
805
|
+
_iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
|
806
|
+
_ipad = /\b(iP[ao]d)/.exec(uas);
|
807
|
+
_android = /Android/i.exec(uas);
|
808
|
+
_native = /FBAN\/\w+;/i.exec(uas);
|
809
|
+
_mobile = /Mobile/i.exec(uas);
|
810
|
+
|
811
|
+
// Note that the IE team blog would have you believe you should be checking
|
812
|
+
// for 'Win64; x64'. But MSDN then reveals that you can actually be coming
|
813
|
+
// from either x64 or ia64; so ultimately, you should just check for Win64
|
814
|
+
// as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
|
815
|
+
// Windows will send 'WOW64' instead.
|
816
|
+
_win64 = !!(/Win64/.exec(uas));
|
817
|
+
|
818
|
+
if (agent) {
|
819
|
+
_ie = agent[1] ? parseFloat(agent[1]) : (
|
820
|
+
agent[5] ? parseFloat(agent[5]) : NaN);
|
821
|
+
// IE compatibility mode
|
822
|
+
if (_ie && document && document.documentMode) {
|
823
|
+
_ie = document.documentMode;
|
824
|
+
}
|
825
|
+
// grab the "true" ie version from the trident token if available
|
826
|
+
var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
|
827
|
+
_ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
|
828
|
+
|
829
|
+
_firefox = agent[2] ? parseFloat(agent[2]) : NaN;
|
830
|
+
_opera = agent[3] ? parseFloat(agent[3]) : NaN;
|
831
|
+
_webkit = agent[4] ? parseFloat(agent[4]) : NaN;
|
832
|
+
if (_webkit) {
|
833
|
+
// We do not add the regexp to the above test, because it will always
|
834
|
+
// match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
|
835
|
+
// the userAgent string.
|
836
|
+
agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
|
837
|
+
_chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
|
838
|
+
} else {
|
839
|
+
_chrome = NaN;
|
840
|
+
}
|
841
|
+
} else {
|
842
|
+
_ie = _firefox = _opera = _chrome = _webkit = NaN;
|
843
|
+
}
|
844
|
+
|
845
|
+
if (os) {
|
846
|
+
if (os[1]) {
|
847
|
+
// Detect OS X version. If no version number matches, set _osx to true.
|
848
|
+
// Version examples: 10, 10_6_1, 10.7
|
849
|
+
// Parses version number as a float, taking only first two sets of
|
850
|
+
// digits. If only one set of digits is found, returns just the major
|
851
|
+
// version number.
|
852
|
+
var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
|
853
|
+
|
854
|
+
_osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
|
855
|
+
} else {
|
856
|
+
_osx = false;
|
857
|
+
}
|
858
|
+
_windows = !!os[2];
|
859
|
+
_linux = !!os[3];
|
860
|
+
} else {
|
861
|
+
_osx = _windows = _linux = false;
|
862
|
+
}
|
863
|
+
}
|
864
|
+
|
865
|
+
var UserAgent_DEPRECATED = {
|
866
|
+
|
867
|
+
/**
|
868
|
+
* Check if the UA is Internet Explorer.
|
869
|
+
*
|
870
|
+
*
|
871
|
+
* @return float|NaN Version number (if match) or NaN.
|
872
|
+
*/
|
873
|
+
ie: function() {
|
874
|
+
return _populate() || _ie;
|
875
|
+
},
|
876
|
+
|
877
|
+
/**
|
878
|
+
* Check if we're in Internet Explorer compatibility mode.
|
879
|
+
*
|
880
|
+
* @return bool true if in compatibility mode, false if
|
881
|
+
* not compatibility mode or not ie
|
882
|
+
*/
|
883
|
+
ieCompatibilityMode: function() {
|
884
|
+
return _populate() || (_ie_real_version > _ie);
|
885
|
+
},
|
886
|
+
|
887
|
+
|
888
|
+
/**
|
889
|
+
* Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
|
890
|
+
* only need this because Skype can't handle 64-bit IE yet. We need to remove
|
891
|
+
* this when we don't need it -- tracked by #601957.
|
892
|
+
*/
|
893
|
+
ie64: function() {
|
894
|
+
return UserAgent_DEPRECATED.ie() && _win64;
|
895
|
+
},
|
896
|
+
|
897
|
+
/**
|
898
|
+
* Check if the UA is Firefox.
|
899
|
+
*
|
900
|
+
*
|
901
|
+
* @return float|NaN Version number (if match) or NaN.
|
902
|
+
*/
|
903
|
+
firefox: function() {
|
904
|
+
return _populate() || _firefox;
|
905
|
+
},
|
906
|
+
|
907
|
+
|
908
|
+
/**
|
909
|
+
* Check if the UA is Opera.
|
910
|
+
*
|
911
|
+
*
|
912
|
+
* @return float|NaN Version number (if match) or NaN.
|
913
|
+
*/
|
914
|
+
opera: function() {
|
915
|
+
return _populate() || _opera;
|
916
|
+
},
|
917
|
+
|
918
|
+
|
919
|
+
/**
|
920
|
+
* Check if the UA is WebKit.
|
921
|
+
*
|
922
|
+
*
|
923
|
+
* @return float|NaN Version number (if match) or NaN.
|
924
|
+
*/
|
925
|
+
webkit: function() {
|
926
|
+
return _populate() || _webkit;
|
927
|
+
},
|
928
|
+
|
929
|
+
/**
|
930
|
+
* For Push
|
931
|
+
* WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
|
932
|
+
*/
|
933
|
+
safari: function() {
|
934
|
+
return UserAgent_DEPRECATED.webkit();
|
935
|
+
},
|
936
|
+
|
937
|
+
/**
|
938
|
+
* Check if the UA is a Chrome browser.
|
939
|
+
*
|
940
|
+
*
|
941
|
+
* @return float|NaN Version number (if match) or NaN.
|
942
|
+
*/
|
943
|
+
chrome : function() {
|
944
|
+
return _populate() || _chrome;
|
945
|
+
},
|
946
|
+
|
947
|
+
|
948
|
+
/**
|
949
|
+
* Check if the user is running Windows.
|
950
|
+
*
|
951
|
+
* @return bool `true' if the user's OS is Windows.
|
952
|
+
*/
|
953
|
+
windows: function() {
|
954
|
+
return _populate() || _windows;
|
955
|
+
},
|
956
|
+
|
957
|
+
|
958
|
+
/**
|
959
|
+
* Check if the user is running Mac OS X.
|
960
|
+
*
|
961
|
+
* @return float|bool Returns a float if a version number is detected,
|
962
|
+
* otherwise true/false.
|
963
|
+
*/
|
964
|
+
osx: function() {
|
965
|
+
return _populate() || _osx;
|
966
|
+
},
|
967
|
+
|
968
|
+
/**
|
969
|
+
* Check if the user is running Linux.
|
970
|
+
*
|
971
|
+
* @return bool `true' if the user's OS is some flavor of Linux.
|
972
|
+
*/
|
973
|
+
linux: function() {
|
974
|
+
return _populate() || _linux;
|
975
|
+
},
|
976
|
+
|
977
|
+
/**
|
978
|
+
* Check if the user is running on an iPhone or iPod platform.
|
979
|
+
*
|
980
|
+
* @return bool `true' if the user is running some flavor of the
|
981
|
+
* iPhone OS.
|
982
|
+
*/
|
983
|
+
iphone: function() {
|
984
|
+
return _populate() || _iphone;
|
985
|
+
},
|
986
|
+
|
987
|
+
mobile: function() {
|
988
|
+
return _populate() || (_iphone || _ipad || _android || _mobile);
|
989
|
+
},
|
990
|
+
|
991
|
+
nativeApp: function() {
|
992
|
+
// webviews inside of the native apps
|
993
|
+
return _populate() || _native;
|
994
|
+
},
|
995
|
+
|
996
|
+
android: function() {
|
997
|
+
return _populate() || _android;
|
998
|
+
},
|
999
|
+
|
1000
|
+
ipad: function() {
|
1001
|
+
return _populate() || _ipad;
|
1002
|
+
}
|
1003
|
+
};
|
1004
|
+
|
1005
|
+
module.exports = UserAgent_DEPRECATED;
|
1006
|
+
|
1007
|
+
|
1008
|
+
/***/ }),
|
1009
|
+
|
1010
|
+
/***/ 3541:
|
1011
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1012
|
+
|
1013
|
+
/**
|
1014
|
+
* Copyright 2013-2015, Facebook, Inc.
|
1015
|
+
* All rights reserved.
|
1016
|
+
*
|
1017
|
+
* This source code is licensed under the BSD-style license found in the
|
1018
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
1019
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
1020
|
+
*
|
1021
|
+
* @providesModule isEventSupported
|
1022
|
+
*/
|
1023
|
+
|
1024
|
+
|
1025
|
+
|
1026
|
+
var ExecutionEnvironment = __webpack_require__(7430);
|
1027
|
+
|
1028
|
+
var useHasFeature;
|
1029
|
+
if (ExecutionEnvironment.canUseDOM) {
|
1030
|
+
useHasFeature =
|
1031
|
+
document.implementation &&
|
1032
|
+
document.implementation.hasFeature &&
|
1033
|
+
// always returns true in newer browsers as per the standard.
|
1034
|
+
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
1035
|
+
document.implementation.hasFeature('', '') !== true;
|
1036
|
+
}
|
1037
|
+
|
1038
|
+
/**
|
1039
|
+
* Checks if an event is supported in the current execution environment.
|
1040
|
+
*
|
1041
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
1042
|
+
* `reset`, `load`, `error`, and `select`.
|
1043
|
+
*
|
1044
|
+
* Borrows from Modernizr.
|
1045
|
+
*
|
1046
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
1047
|
+
* @param {?boolean} capture Check if the capture phase is supported.
|
1048
|
+
* @return {boolean} True if the event is supported.
|
1049
|
+
* @internal
|
1050
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
1051
|
+
*/
|
1052
|
+
function isEventSupported(eventNameSuffix, capture) {
|
1053
|
+
if (!ExecutionEnvironment.canUseDOM ||
|
1054
|
+
capture && !('addEventListener' in document)) {
|
1055
|
+
return false;
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
var eventName = 'on' + eventNameSuffix;
|
1059
|
+
var isSupported = eventName in document;
|
1060
|
+
|
1061
|
+
if (!isSupported) {
|
1062
|
+
var element = document.createElement('div');
|
1063
|
+
element.setAttribute(eventName, 'return;');
|
1064
|
+
isSupported = typeof element[eventName] === 'function';
|
1065
|
+
}
|
1066
|
+
|
1067
|
+
if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
1068
|
+
// This is the only way to test support for the `wheel` event in IE9+.
|
1069
|
+
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
return isSupported;
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
module.exports = isEventSupported;
|
1076
|
+
|
1077
|
+
|
1078
|
+
/***/ }),
|
1079
|
+
|
1080
|
+
/***/ 2527:
|
1081
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1082
|
+
|
1083
|
+
/**
|
1084
|
+
* Copyright (c) 2015, Facebook, Inc.
|
1085
|
+
* All rights reserved.
|
1086
|
+
*
|
1087
|
+
* This source code is licensed under the BSD-style license found in the
|
1088
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
1089
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
1090
|
+
*
|
1091
|
+
* @providesModule normalizeWheel
|
1092
|
+
* @typechecks
|
1093
|
+
*/
|
1094
|
+
|
1095
|
+
|
1096
|
+
|
1097
|
+
var UserAgent_DEPRECATED = __webpack_require__(6377);
|
1098
|
+
|
1099
|
+
var isEventSupported = __webpack_require__(3541);
|
1100
|
+
|
1101
|
+
|
1102
|
+
// Reasonable defaults
|
1103
|
+
var PIXEL_STEP = 10;
|
1104
|
+
var LINE_HEIGHT = 40;
|
1105
|
+
var PAGE_HEIGHT = 800;
|
1106
|
+
|
1107
|
+
/**
|
1108
|
+
* Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
|
1109
|
+
* complicated, thus this doc is long and (hopefully) detailed enough to answer
|
1110
|
+
* your questions.
|
1111
|
+
*
|
1112
|
+
* If you need to react to the mouse wheel in a predictable way, this code is
|
1113
|
+
* like your bestest friend. * hugs *
|
1114
|
+
*
|
1115
|
+
* As of today, there are 4 DOM event types you can listen to:
|
1116
|
+
*
|
1117
|
+
* 'wheel' -- Chrome(31+), FF(17+), IE(9+)
|
1118
|
+
* 'mousewheel' -- Chrome, IE(6+), Opera, Safari
|
1119
|
+
* 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
|
1120
|
+
* 'DOMMouseScroll' -- FF(0.9.7+) since 2003
|
1121
|
+
*
|
1122
|
+
* So what to do? The is the best:
|
1123
|
+
*
|
1124
|
+
* normalizeWheel.getEventType();
|
1125
|
+
*
|
1126
|
+
* In your event callback, use this code to get sane interpretation of the
|
1127
|
+
* deltas. This code will return an object with properties:
|
1128
|
+
*
|
1129
|
+
* spinX -- normalized spin speed (use for zoom) - x plane
|
1130
|
+
* spinY -- " - y plane
|
1131
|
+
* pixelX -- normalized distance (to pixels) - x plane
|
1132
|
+
* pixelY -- " - y plane
|
1133
|
+
*
|
1134
|
+
* Wheel values are provided by the browser assuming you are using the wheel to
|
1135
|
+
* scroll a web page by a number of lines or pixels (or pages). Values can vary
|
1136
|
+
* significantly on different platforms and browsers, forgetting that you can
|
1137
|
+
* scroll at different speeds. Some devices (like trackpads) emit more events
|
1138
|
+
* at smaller increments with fine granularity, and some emit massive jumps with
|
1139
|
+
* linear speed or acceleration.
|
1140
|
+
*
|
1141
|
+
* This code does its best to normalize the deltas for you:
|
1142
|
+
*
|
1143
|
+
* - spin is trying to normalize how far the wheel was spun (or trackpad
|
1144
|
+
* dragged). This is super useful for zoom support where you want to
|
1145
|
+
* throw away the chunky scroll steps on the PC and make those equal to
|
1146
|
+
* the slow and smooth tiny steps on the Mac. Key data: This code tries to
|
1147
|
+
* resolve a single slow step on a wheel to 1.
|
1148
|
+
*
|
1149
|
+
* - pixel is normalizing the desired scroll delta in pixel units. You'll
|
1150
|
+
* get the crazy differences between browsers, but at least it'll be in
|
1151
|
+
* pixels!
|
1152
|
+
*
|
1153
|
+
* - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
|
1154
|
+
* should translate to positive value zooming IN, negative zooming OUT.
|
1155
|
+
* This matches the newer 'wheel' event.
|
1156
|
+
*
|
1157
|
+
* Why are there spinX, spinY (or pixels)?
|
1158
|
+
*
|
1159
|
+
* - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
|
1160
|
+
* with a mouse. It results in side-scrolling in the browser by default.
|
1161
|
+
*
|
1162
|
+
* - spinY is what you expect -- it's the classic axis of a mouse wheel.
|
1163
|
+
*
|
1164
|
+
* - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
|
1165
|
+
* probably is by browsers in conjunction with fancy 3D controllers .. but
|
1166
|
+
* you know.
|
1167
|
+
*
|
1168
|
+
* Implementation info:
|
1169
|
+
*
|
1170
|
+
* Examples of 'wheel' event if you scroll slowly (down) by one step with an
|
1171
|
+
* average mouse:
|
1172
|
+
*
|
1173
|
+
* OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
|
1174
|
+
* OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
|
1175
|
+
* OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
|
1176
|
+
* Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
|
1177
|
+
* Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
|
1178
|
+
*
|
1179
|
+
* On the trackpad:
|
1180
|
+
*
|
1181
|
+
* OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
|
1182
|
+
* OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
|
1183
|
+
*
|
1184
|
+
* On other/older browsers.. it's more complicated as there can be multiple and
|
1185
|
+
* also missing delta values.
|
1186
|
+
*
|
1187
|
+
* The 'wheel' event is more standard:
|
1188
|
+
*
|
1189
|
+
* http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
|
1190
|
+
*
|
1191
|
+
* The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
|
1192
|
+
* deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
|
1193
|
+
* backward compatibility with older events. Those other values help us
|
1194
|
+
* better normalize spin speed. Example of what the browsers provide:
|
1195
|
+
*
|
1196
|
+
* | event.wheelDelta | event.detail
|
1197
|
+
* ------------------+------------------+--------------
|
1198
|
+
* Safari v5/OS X | -120 | 0
|
1199
|
+
* Safari v5/Win7 | -120 | 0
|
1200
|
+
* Chrome v17/OS X | -120 | 0
|
1201
|
+
* Chrome v17/Win7 | -120 | 0
|
1202
|
+
* IE9/Win7 | -120 | undefined
|
1203
|
+
* Firefox v4/OS X | undefined | 1
|
1204
|
+
* Firefox v4/Win7 | undefined | 3
|
1205
|
+
*
|
1206
|
+
*/
|
1207
|
+
function normalizeWheel(/*object*/ event) /*object*/ {
|
1208
|
+
var sX = 0, sY = 0, // spinX, spinY
|
1209
|
+
pX = 0, pY = 0; // pixelX, pixelY
|
1210
|
+
|
1211
|
+
// Legacy
|
1212
|
+
if ('detail' in event) { sY = event.detail; }
|
1213
|
+
if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
|
1214
|
+
if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
|
1215
|
+
if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
|
1216
|
+
|
1217
|
+
// side scrolling on FF with DOMMouseScroll
|
1218
|
+
if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
|
1219
|
+
sX = sY;
|
1220
|
+
sY = 0;
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
pX = sX * PIXEL_STEP;
|
1224
|
+
pY = sY * PIXEL_STEP;
|
1225
|
+
|
1226
|
+
if ('deltaY' in event) { pY = event.deltaY; }
|
1227
|
+
if ('deltaX' in event) { pX = event.deltaX; }
|
1228
|
+
|
1229
|
+
if ((pX || pY) && event.deltaMode) {
|
1230
|
+
if (event.deltaMode == 1) { // delta in LINE units
|
1231
|
+
pX *= LINE_HEIGHT;
|
1232
|
+
pY *= LINE_HEIGHT;
|
1233
|
+
} else { // delta in PAGE units
|
1234
|
+
pX *= PAGE_HEIGHT;
|
1235
|
+
pY *= PAGE_HEIGHT;
|
1236
|
+
}
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
// Fall-back if spin cannot be determined
|
1240
|
+
if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
|
1241
|
+
if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
|
1242
|
+
|
1243
|
+
return { spinX : sX,
|
1244
|
+
spinY : sY,
|
1245
|
+
pixelX : pX,
|
1246
|
+
pixelY : pY };
|
1247
|
+
}
|
1248
|
+
|
1249
|
+
|
1250
|
+
/**
|
1251
|
+
* The best combination if you prefer spinX + spinY normalization. It favors
|
1252
|
+
* the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
|
1253
|
+
* 'wheel' event, making spin speed determination impossible.
|
1254
|
+
*/
|
1255
|
+
normalizeWheel.getEventType = function() /*string*/ {
|
1256
|
+
return (UserAgent_DEPRECATED.firefox())
|
1257
|
+
? 'DOMMouseScroll'
|
1258
|
+
: (isEventSupported('wheel'))
|
1259
|
+
? 'wheel'
|
1260
|
+
: 'mousewheel';
|
1261
|
+
};
|
1262
|
+
|
1263
|
+
module.exports = normalizeWheel;
|
1264
|
+
|
1265
|
+
|
1266
|
+
/***/ }),
|
1267
|
+
|
1268
|
+
/***/ 563:
|
1269
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1270
|
+
|
1271
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1272
|
+
var y = x => () => x
|
1273
|
+
module.exports = x({ ["$bkPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__.$bkPopover });
|
1274
|
+
|
1275
|
+
/***/ }),
|
1276
|
+
|
1277
|
+
/***/ 9253:
|
1278
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1279
|
+
|
1280
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1281
|
+
var y = x => () => x
|
1282
|
+
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, ["formItemKey"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.formItemKey, ["formKey"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.formKey, ["resolveClassName"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName, ["useForm"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.useForm, ["useFormItem"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.useFormItem, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstallProps });
|
1283
|
+
|
1284
|
+
/***/ }),
|
1285
|
+
|
1286
|
+
/***/ 6609:
|
1287
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1288
|
+
|
1289
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1290
|
+
var y = x => () => x
|
1291
|
+
module.exports = x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
1292
|
+
|
1293
|
+
/***/ }),
|
1294
|
+
|
1295
|
+
/***/ 926:
|
1296
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1297
|
+
|
1298
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1299
|
+
/* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
|
1300
|
+
/* harmony export */ });
|
1301
|
+
function _arrayLikeToArray(arr, len) {
|
1302
|
+
if (len == null || len > arr.length) len = arr.length;
|
1303
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
1304
|
+
return arr2;
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
/***/ }),
|
1308
|
+
|
1309
|
+
/***/ 74:
|
1310
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1311
|
+
|
1312
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1313
|
+
/* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles)
|
1314
|
+
/* harmony export */ });
|
1315
|
+
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(926);
|
1316
|
+
|
1317
|
+
function _arrayWithoutHoles(arr) {
|
1318
|
+
if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr);
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
/***/ }),
|
1322
|
+
|
1323
|
+
/***/ 6666:
|
1324
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1325
|
+
|
1326
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1327
|
+
/* harmony export */ "default": () => (/* binding */ _defineProperty)
|
1328
|
+
/* harmony export */ });
|
1329
|
+
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3795);
|
1330
|
+
|
1331
|
+
function _defineProperty(obj, key, value) {
|
1332
|
+
key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key);
|
1333
|
+
if (key in obj) {
|
1334
|
+
Object.defineProperty(obj, key, {
|
1335
|
+
value: value,
|
1336
|
+
enumerable: true,
|
1337
|
+
configurable: true,
|
1338
|
+
writable: true
|
1339
|
+
});
|
1340
|
+
} else {
|
1341
|
+
obj[key] = value;
|
1342
|
+
}
|
1343
|
+
return obj;
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
/***/ }),
|
1347
|
+
|
1348
|
+
/***/ 1079:
|
1349
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1350
|
+
|
1351
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1352
|
+
/* harmony export */ "default": () => (/* binding */ _iterableToArray)
|
1353
|
+
/* harmony export */ });
|
1354
|
+
function _iterableToArray(iter) {
|
1355
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
1356
|
+
}
|
1357
|
+
|
1358
|
+
/***/ }),
|
1359
|
+
|
1360
|
+
/***/ 6098:
|
1361
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1362
|
+
|
1363
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1364
|
+
/* harmony export */ "default": () => (/* binding */ _nonIterableSpread)
|
1365
|
+
/* harmony export */ });
|
1366
|
+
function _nonIterableSpread() {
|
1367
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
/***/ }),
|
1371
|
+
|
1372
|
+
/***/ 7930:
|
1373
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1374
|
+
|
1375
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1376
|
+
/* harmony export */ "default": () => (/* binding */ _toConsumableArray)
|
1377
|
+
/* harmony export */ });
|
1378
|
+
/* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
|
1379
|
+
/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1079);
|
1380
|
+
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9147);
|
1381
|
+
/* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6098);
|
1382
|
+
|
1383
|
+
|
1384
|
+
|
1385
|
+
|
1386
|
+
function _toConsumableArray(arr) {
|
1387
|
+
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"])();
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
/***/ }),
|
1391
|
+
|
1392
|
+
/***/ 9745:
|
1393
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1394
|
+
|
1395
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1396
|
+
/* harmony export */ "default": () => (/* binding */ toPrimitive)
|
1397
|
+
/* harmony export */ });
|
1398
|
+
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6522);
|
1399
|
+
|
1400
|
+
function toPrimitive(t, r) {
|
1401
|
+
if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t;
|
1402
|
+
var e = t[Symbol.toPrimitive];
|
1403
|
+
if (void 0 !== e) {
|
1404
|
+
var i = e.call(t, r || "default");
|
1405
|
+
if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i;
|
1406
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
1407
|
+
}
|
1408
|
+
return ("string" === r ? String : Number)(t);
|
1409
|
+
}
|
1410
|
+
|
1411
|
+
/***/ }),
|
1412
|
+
|
1413
|
+
/***/ 3795:
|
1414
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1415
|
+
|
1416
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1417
|
+
/* harmony export */ "default": () => (/* binding */ toPropertyKey)
|
1418
|
+
/* harmony export */ });
|
1419
|
+
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6522);
|
1420
|
+
/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9745);
|
1421
|
+
|
1422
|
+
|
1423
|
+
function toPropertyKey(t) {
|
1424
|
+
var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t, "string");
|
1425
|
+
return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_1__["default"])(i) ? i : String(i);
|
1426
|
+
}
|
1427
|
+
|
1428
|
+
/***/ }),
|
1429
|
+
|
1430
|
+
/***/ 6522:
|
1431
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1432
|
+
|
1433
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1434
|
+
/* harmony export */ "default": () => (/* binding */ _typeof)
|
1435
|
+
/* harmony export */ });
|
1436
|
+
function _typeof(o) {
|
1437
|
+
"@babel/helpers - typeof";
|
1438
|
+
|
1439
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
1440
|
+
return typeof o;
|
1441
|
+
} : function (o) {
|
1442
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
1443
|
+
}, _typeof(o);
|
1444
|
+
}
|
1445
|
+
|
1446
|
+
/***/ }),
|
1447
|
+
|
1448
|
+
/***/ 9147:
|
1449
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
1450
|
+
|
1451
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1452
|
+
/* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
|
1453
|
+
/* harmony export */ });
|
1454
|
+
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(926);
|
1455
|
+
|
1456
|
+
function _unsupportedIterableToArray(o, minLen) {
|
1457
|
+
if (!o) return;
|
1458
|
+
if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
|
1459
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
1460
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
1461
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
1462
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
|
1463
|
+
}
|
1464
|
+
|
1465
|
+
/***/ })
|
1466
|
+
|
1467
|
+
/******/ });
|
1468
|
+
/************************************************************************/
|
1469
|
+
/******/ // The module cache
|
1470
|
+
/******/ var __webpack_module_cache__ = {};
|
1471
|
+
/******/
|
1472
|
+
/******/ // The require function
|
1473
|
+
/******/ function __webpack_require__(moduleId) {
|
1474
|
+
/******/ // Check if module is in cache
|
1475
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
1476
|
+
/******/ if (cachedModule !== undefined) {
|
1477
|
+
/******/ return cachedModule.exports;
|
1478
|
+
/******/ }
|
1479
|
+
/******/ // Create a new module (and put it into the cache)
|
1480
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
1481
|
+
/******/ // no module.id needed
|
1482
|
+
/******/ // no module.loaded needed
|
1483
|
+
/******/ exports: {}
|
1484
|
+
/******/ };
|
1485
|
+
/******/
|
1486
|
+
/******/ // Execute the module function
|
1487
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
1488
|
+
/******/
|
1489
|
+
/******/ // Return the exports of the module
|
1490
|
+
/******/ return module.exports;
|
1491
|
+
/******/ }
|
16
1492
|
/******/
|
17
1493
|
/************************************************************************/
|
1494
|
+
/******/ /* webpack/runtime/compat get default export */
|
1495
|
+
/******/ (() => {
|
1496
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
1497
|
+
/******/ __webpack_require__.n = (module) => {
|
1498
|
+
/******/ var getter = module && module.__esModule ?
|
1499
|
+
/******/ () => (module['default']) :
|
1500
|
+
/******/ () => (module);
|
1501
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
1502
|
+
/******/ return getter;
|
1503
|
+
/******/ };
|
1504
|
+
/******/ })();
|
1505
|
+
/******/
|
18
1506
|
/******/ /* webpack/runtime/define property getters */
|
19
1507
|
/******/ (() => {
|
20
1508
|
/******/ // define getter functions for harmony exports
|
@@ -34,30 +1522,28 @@ import * as __WEBPACK_EXTERNAL_MODULE_lodash_isEmpty_e109fd6b__ from "lodash/isE
|
|
34
1522
|
/******/
|
35
1523
|
/************************************************************************/
|
36
1524
|
var __webpack_exports__ = {};
|
1525
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
1526
|
+
(() => {
|
37
1527
|
|
38
1528
|
// EXPORTS
|
39
1529
|
__webpack_require__.d(__webpack_exports__, {
|
40
1530
|
BkComposeFormItem: () => (/* reexport */ compose_form_item),
|
41
1531
|
BkForm: () => (/* binding */ BkForm),
|
42
1532
|
BkFormItem: () => (/* reexport */ form_item),
|
43
|
-
"default": () => (/* binding */
|
44
|
-
formItemKey: () => (/* reexport */
|
45
|
-
formKey: () => (/* reexport */
|
46
|
-
useFormItem: () => (/* reexport */
|
1533
|
+
"default": () => (/* binding */ form_src),
|
1534
|
+
formItemKey: () => (/* reexport */ shared_.formItemKey),
|
1535
|
+
formKey: () => (/* reexport */ shared_.formKey),
|
1536
|
+
useFormItem: () => (/* reexport */ shared_.useFormItem)
|
47
1537
|
});
|
48
1538
|
|
49
|
-
|
1539
|
+
// EXTERNAL MODULE: external "../shared"
|
1540
|
+
var shared_ = __webpack_require__(9253);
|
1541
|
+
// EXTERNAL MODULE: external "vue"
|
1542
|
+
var external_vue_ = __webpack_require__(6609);
|
1543
|
+
;// CONCATENATED MODULE: external "../config-provider"
|
50
1544
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
51
1545
|
var y = x => () => x
|
52
|
-
const
|
53
|
-
;// CONCATENATED MODULE: external "vue"
|
54
|
-
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
55
|
-
var external_vue_y = x => () => x
|
56
|
-
const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
57
|
-
;// CONCATENATED MODULE: external "../config-provider"
|
58
|
-
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
59
|
-
var config_provider_y = x => () => x
|
60
|
-
const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
1546
|
+
const config_provider_namespaceObject = x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
61
1547
|
;// CONCATENATED MODULE: ../../packages/form/src/compose-form-item.tsx
|
62
1548
|
/*
|
63
1549
|
* Tencent is pleased to support the open source community by making
|
@@ -89,7 +1575,7 @@ const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () =>
|
|
89
1575
|
var isCustomComponent = function isCustomComponent(node) {
|
90
1576
|
return node.__v_isVNode;
|
91
1577
|
};
|
92
|
-
/* harmony default export */ const compose_form_item = ((0,
|
1578
|
+
/* harmony default export */ const compose_form_item = ((0,external_vue_.defineComponent)({
|
93
1579
|
name: 'ComposeFormItem',
|
94
1580
|
props: {
|
95
1581
|
headBackgroundColor: {
|
@@ -159,56 +1645,13 @@ var isCustomComponent = function isCustomComponent(node) {
|
|
159
1645
|
tailChildren.props["class"] = tailChildStaticClass;
|
160
1646
|
}
|
161
1647
|
}
|
162
|
-
return (0,
|
1648
|
+
return (0,external_vue_.h)('div', {
|
163
1649
|
"class": "".concat(this.resolveClassName('compose-form-item'))
|
164
1650
|
}, childrenArr);
|
165
1651
|
}
|
166
1652
|
}));
|
167
|
-
|
168
|
-
|
169
|
-
"@babel/helpers - typeof";
|
170
|
-
|
171
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
172
|
-
return typeof o;
|
173
|
-
} : function (o) {
|
174
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
175
|
-
}, _typeof(o);
|
176
|
-
}
|
177
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
178
|
-
|
179
|
-
function toPrimitive(t, r) {
|
180
|
-
if ("object" != _typeof(t) || !t) return t;
|
181
|
-
var e = t[Symbol.toPrimitive];
|
182
|
-
if (void 0 !== e) {
|
183
|
-
var i = e.call(t, r || "default");
|
184
|
-
if ("object" != _typeof(i)) return i;
|
185
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
186
|
-
}
|
187
|
-
return ("string" === r ? String : Number)(t);
|
188
|
-
}
|
189
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
190
|
-
|
191
|
-
|
192
|
-
function toPropertyKey(t) {
|
193
|
-
var i = toPrimitive(t, "string");
|
194
|
-
return "symbol" == _typeof(i) ? i : String(i);
|
195
|
-
}
|
196
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
197
|
-
|
198
|
-
function _defineProperty(obj, key, value) {
|
199
|
-
key = toPropertyKey(key);
|
200
|
-
if (key in obj) {
|
201
|
-
Object.defineProperty(obj, key, {
|
202
|
-
value: value,
|
203
|
-
enumerable: true,
|
204
|
-
configurable: true,
|
205
|
-
writable: true
|
206
|
-
});
|
207
|
-
} else {
|
208
|
-
obj[key] = value;
|
209
|
-
}
|
210
|
-
return obj;
|
211
|
-
}
|
1653
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
1654
|
+
var defineProperty = __webpack_require__(6666);
|
212
1655
|
;// CONCATENATED MODULE: external "lodash/isBoolean"
|
213
1656
|
var isBoolean_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
214
1657
|
var isBoolean_y = x => () => x
|
@@ -221,7 +1664,7 @@ const isString_namespaceObject = isString_x({ ["default"]: () => __WEBPACK_EXTER
|
|
221
1664
|
|
222
1665
|
|
223
1666
|
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; }
|
224
|
-
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) {
|
1667
|
+
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; }
|
225
1668
|
/*
|
226
1669
|
* Tencent is pleased to support the open source community by making
|
227
1670
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -253,11 +1696,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
253
1696
|
|
254
1697
|
|
255
1698
|
var formProps = {
|
256
|
-
formType:
|
257
|
-
labelWidth:
|
258
|
-
labelPosition:
|
259
|
-
model:
|
260
|
-
rules:
|
1699
|
+
formType: shared_.PropTypes.oneOf(['default', 'vertical']).def('default'),
|
1700
|
+
labelWidth: shared_.PropTypes.oneOfType([Number, String]).def(150),
|
1701
|
+
labelPosition: shared_.PropTypes.oneOf(['left', 'center', 'right']),
|
1702
|
+
model: shared_.PropTypes.object,
|
1703
|
+
rules: shared_.PropTypes.object
|
261
1704
|
};
|
262
1705
|
var formEvents = {
|
263
1706
|
submit: null,
|
@@ -265,7 +1708,7 @@ var formEvents = {
|
|
265
1708
|
return (0,isString_namespaceObject["default"])(property) && (0,isBoolean_namespaceObject["default"])(result) && (0,isString_namespaceObject["default"])(message);
|
266
1709
|
}
|
267
1710
|
};
|
268
|
-
/* harmony default export */ const src_form = ((0,
|
1711
|
+
/* harmony default export */ const src_form = ((0,external_vue_.defineComponent)({
|
269
1712
|
name: 'Form',
|
270
1713
|
props: formProps,
|
271
1714
|
emits: formEvents,
|
@@ -291,7 +1734,7 @@ var formEvents = {
|
|
291
1734
|
return result;
|
292
1735
|
}, []);
|
293
1736
|
};
|
294
|
-
(0,
|
1737
|
+
(0,external_vue_.provide)(shared_.formKey, {
|
295
1738
|
props: props,
|
296
1739
|
emit: context.emit,
|
297
1740
|
register: register,
|
@@ -311,12 +1754,12 @@ var formEvents = {
|
|
311
1754
|
if (fields) {
|
312
1755
|
var fieldList = typeof fields === 'string' ? [fields] : fields;
|
313
1756
|
fieldMap = fieldList.reduce(function (result, item) {
|
314
|
-
return _objectSpread(_objectSpread({}, result), {},
|
1757
|
+
return _objectSpread(_objectSpread({}, result), {}, (0,defineProperty["default"])({}, item, true));
|
315
1758
|
}, {});
|
316
1759
|
} else {
|
317
1760
|
fieldMap = formItemInstanceList.reduce(function (result, item) {
|
318
1761
|
if (item.property) {
|
319
|
-
return _objectSpread(_objectSpread({}, result), {},
|
1762
|
+
return _objectSpread(_objectSpread({}, result), {}, (0,defineProperty["default"])({}, item.property, true));
|
320
1763
|
}
|
321
1764
|
return result;
|
322
1765
|
}, {});
|
@@ -352,11 +1795,11 @@ var formEvents = {
|
|
352
1795
|
if (fields) {
|
353
1796
|
var fieldList = typeof fields === 'string' ? [fields] : fields;
|
354
1797
|
fieldMap = fieldList.reduce(function (result, item) {
|
355
|
-
return _objectSpread(_objectSpread({}, result), {},
|
1798
|
+
return _objectSpread(_objectSpread({}, result), {}, (0,defineProperty["default"])({}, item, true));
|
356
1799
|
}, {});
|
357
1800
|
} else {
|
358
1801
|
fieldMap = formItemInstanceList.reduce(function (result, item) {
|
359
|
-
return _objectSpread(_objectSpread({}, result), {},
|
1802
|
+
return _objectSpread(_objectSpread({}, result), {}, (0,defineProperty["default"])({}, item.property, true));
|
360
1803
|
}, {});
|
361
1804
|
}
|
362
1805
|
formItemInstanceList.forEach(function (formItem) {
|
@@ -375,54 +1818,17 @@ var formEvents = {
|
|
375
1818
|
},
|
376
1819
|
render: function render() {
|
377
1820
|
var _this$$slots$default, _this$$slots;
|
378
|
-
var formClasses = (0,
|
379
|
-
return (0,
|
1821
|
+
var formClasses = (0,shared_.classes)((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(this.resolveClassName('form')), true), "".concat(this.resolveClassName("form--".concat(this.formType))), true));
|
1822
|
+
return (0,external_vue_.createVNode)("form", {
|
380
1823
|
"class": formClasses,
|
381
1824
|
"onSubmit": this.handleSubmit
|
382
1825
|
}, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)]);
|
383
1826
|
}
|
384
1827
|
}));
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
return arr2;
|
390
|
-
}
|
391
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
392
|
-
|
393
|
-
function _arrayWithoutHoles(arr) {
|
394
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
395
|
-
}
|
396
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
397
|
-
function _iterableToArray(iter) {
|
398
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
399
|
-
}
|
400
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
401
|
-
|
402
|
-
function _unsupportedIterableToArray(o, minLen) {
|
403
|
-
if (!o) return;
|
404
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
405
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
406
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
407
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
408
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
409
|
-
}
|
410
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
|
411
|
-
function _nonIterableSpread() {
|
412
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
413
|
-
}
|
414
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
function _toConsumableArray(arr) {
|
420
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
421
|
-
}
|
422
|
-
;// CONCATENATED MODULE: external "../directives"
|
423
|
-
var directives_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
424
|
-
var directives_y = x => () => x
|
425
|
-
const directives_namespaceObject = directives_x({ ["bkTooltips"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__.bkTooltips });
|
1828
|
+
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
1829
|
+
var toConsumableArray = __webpack_require__(7930);
|
1830
|
+
// EXTERNAL MODULE: ../../packages/directives/src/index.ts + 7 modules
|
1831
|
+
var src = __webpack_require__(668);
|
426
1832
|
;// CONCATENATED MODULE: external "../icon"
|
427
1833
|
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
428
1834
|
var icon_y = x => () => x
|
@@ -533,7 +1939,7 @@ const isEmpty_namespaceObject = isEmpty_x({ ["default"]: () => __WEBPACK_EXTERNA
|
|
533
1939
|
|
534
1940
|
|
535
1941
|
function form_item_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; }
|
536
|
-
function form_item_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? form_item_ownKeys(Object(t), !0).forEach(function (r) {
|
1942
|
+
function form_item_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? form_item_ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : form_item_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
537
1943
|
/*
|
538
1944
|
* Tencent is pleased to support the open source community by making
|
539
1945
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -569,18 +1975,18 @@ function form_item_objectSpread(e) { for (var r = 1; r < arguments.length; r++)
|
|
569
1975
|
|
570
1976
|
|
571
1977
|
var formItemProps = {
|
572
|
-
label:
|
573
|
-
labelWidth:
|
574
|
-
labelPosition:
|
575
|
-
property:
|
576
|
-
required:
|
577
|
-
email:
|
578
|
-
max:
|
579
|
-
min:
|
580
|
-
maxlength:
|
581
|
-
rules:
|
582
|
-
description:
|
583
|
-
errorDisplayType:
|
1978
|
+
label: shared_.PropTypes.string,
|
1979
|
+
labelWidth: shared_.PropTypes.oneOfType([Number, String]),
|
1980
|
+
labelPosition: shared_.PropTypes.oneOf(['left', 'center', 'right']),
|
1981
|
+
property: shared_.PropTypes.string.def(''),
|
1982
|
+
required: shared_.PropTypes.bool.def(false),
|
1983
|
+
email: shared_.PropTypes.bool.def(false),
|
1984
|
+
max: shared_.PropTypes.number,
|
1985
|
+
min: shared_.PropTypes.number,
|
1986
|
+
maxlength: shared_.PropTypes.number,
|
1987
|
+
rules: shared_.PropTypes.array,
|
1988
|
+
description: shared_.PropTypes.string,
|
1989
|
+
errorDisplayType: shared_.PropTypes.oneOf(['tooltips', 'normal']).def('normal')
|
584
1990
|
};
|
585
1991
|
var hasOwn = function hasOwn(obj, key) {
|
586
1992
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
@@ -684,7 +2090,7 @@ var mergeRules = function mergeRules(configRules, propRules, t) {
|
|
684
2090
|
result.push(ruleItem);
|
685
2091
|
return result;
|
686
2092
|
}, []);
|
687
|
-
return [].concat(
|
2093
|
+
return [].concat((0,toConsumableArray["default"])(filterPropRules), (0,toConsumableArray["default"])(formatConfigRules));
|
688
2094
|
};
|
689
2095
|
var getTriggerRules = function getTriggerRules(trigger, rules) {
|
690
2096
|
return rules.reduce(function (result, rule) {
|
@@ -702,36 +2108,36 @@ var getTriggerRules = function getTriggerRules(trigger, rules) {
|
|
702
2108
|
var isValid = function isValid(value) {
|
703
2109
|
return value !== undefined;
|
704
2110
|
};
|
705
|
-
/* harmony default export */ const form_item = ((0,
|
2111
|
+
/* harmony default export */ const form_item = ((0,external_vue_.defineComponent)({
|
706
2112
|
name: 'FormItem',
|
707
2113
|
directives: {
|
708
|
-
bkTooltips:
|
2114
|
+
bkTooltips: src.bkTooltips
|
709
2115
|
},
|
710
2116
|
props: formItemProps,
|
711
2117
|
setup: function setup(props, context) {
|
712
2118
|
var t = (0,config_provider_namespaceObject.useLocale)('form');
|
713
|
-
var form = (0,
|
2119
|
+
var form = (0,shared_.useForm)();
|
714
2120
|
var isForm = Boolean(form);
|
715
|
-
var parentFormItem = (0,
|
2121
|
+
var parentFormItem = (0,shared_.useFormItem)();
|
716
2122
|
var isNested = Boolean(parentFormItem);
|
717
|
-
var currentInstance = (0,
|
718
|
-
var state = (0,
|
2123
|
+
var currentInstance = (0,external_vue_.getCurrentInstance)();
|
2124
|
+
var state = (0,external_vue_.reactive)({
|
719
2125
|
isError: false,
|
720
2126
|
errorMessage: ''
|
721
2127
|
});
|
722
|
-
var isFormTypeVertical = (0,
|
2128
|
+
var isFormTypeVertical = (0,external_vue_.computed)(function () {
|
723
2129
|
if (!isForm) {
|
724
2130
|
return false;
|
725
2131
|
}
|
726
2132
|
return form.props.formType === 'vertical';
|
727
2133
|
});
|
728
|
-
var isShowLabel = (0,
|
2134
|
+
var isShowLabel = (0,external_vue_.computed)(function () {
|
729
2135
|
if (props.label || context.slots.label) {
|
730
2136
|
return true;
|
731
2137
|
}
|
732
2138
|
return false;
|
733
2139
|
});
|
734
|
-
var labelStyles = (0,
|
2140
|
+
var labelStyles = (0,external_vue_.computed)(function () {
|
735
2141
|
var styles = {
|
736
2142
|
width: '',
|
737
2143
|
paddingRight: '',
|
@@ -751,8 +2157,8 @@ var isValid = function isValid(value) {
|
|
751
2157
|
}
|
752
2158
|
return styles;
|
753
2159
|
});
|
754
|
-
var contentStyles = (0,
|
755
|
-
return
|
2160
|
+
var contentStyles = (0,external_vue_.computed)(function () {
|
2161
|
+
return (0,defineProperty["default"])({}, 'margin-left', labelStyles.value.width);
|
756
2162
|
});
|
757
2163
|
/**
|
758
2164
|
* @desc 验证字段
|
@@ -841,23 +2247,23 @@ var isValid = function isValid(value) {
|
|
841
2247
|
state.isError = false;
|
842
2248
|
state.errorMessage = '';
|
843
2249
|
};
|
844
|
-
(0,
|
2250
|
+
(0,external_vue_.provide)(shared_.formItemKey, form_item_objectSpread(form_item_objectSpread({}, props), {}, {
|
845
2251
|
validate: validate,
|
846
2252
|
clearValidate: clearValidate
|
847
2253
|
}));
|
848
|
-
(0,
|
2254
|
+
(0,external_vue_.onMounted)(function () {
|
849
2255
|
if (isForm) {
|
850
2256
|
form.register(currentInstance.proxy);
|
851
2257
|
}
|
852
2258
|
});
|
853
|
-
(0,
|
2259
|
+
(0,external_vue_.onBeforeUnmount)(function () {
|
854
2260
|
if (isForm) {
|
855
2261
|
form.unregister(currentInstance.proxy);
|
856
2262
|
}
|
857
2263
|
});
|
858
2264
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
859
2265
|
resolveClassName = _usePrefix.resolveClassName;
|
860
|
-
return form_item_objectSpread(form_item_objectSpread({}, (0,
|
2266
|
+
return form_item_objectSpread(form_item_objectSpread({}, (0,external_vue_.toRefs)(state)), {}, {
|
861
2267
|
isShowLabel: isShowLabel,
|
862
2268
|
labelStyles: labelStyles,
|
863
2269
|
contentStyles: contentStyles,
|
@@ -873,40 +2279,40 @@ var isValid = function isValid(value) {
|
|
873
2279
|
_this$$slots,
|
874
2280
|
_this$$slots$default,
|
875
2281
|
_this$$slots2;
|
876
|
-
var itemClassees = (0,
|
2282
|
+
var itemClassees = (0,shared_.classes)((0,defineProperty["default"])((0,defineProperty["default"])((0,defineProperty["default"])({}, "".concat(this.resolveClassName('form-item')), true), 'is-error', this.isError), 'is-required', this.required));
|
877
2283
|
var renderLabel = function renderLabel() {
|
878
2284
|
if (_this.$slots.label) {
|
879
|
-
return (0,
|
2285
|
+
return (0,external_vue_.createVNode)("span", null, [_this.$slots.label()]);
|
880
2286
|
}
|
881
2287
|
if (_this.description) {
|
882
|
-
return (0,
|
883
|
-
"class":
|
884
|
-
}, [_this.label]), [[(0,
|
2288
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
2289
|
+
"class": (0,defineProperty["default"])({}, "".concat(_this.resolveClassName('form-label-description')), Boolean(_this.description))
|
2290
|
+
}, [_this.label]), [[(0,external_vue_.resolveDirective)("bk-tooltips"), {
|
885
2291
|
content: _this.description,
|
886
2292
|
extCls: _this.resolveClassName('form-label-description-popper')
|
887
2293
|
}]]);
|
888
2294
|
}
|
889
|
-
return (0,
|
2295
|
+
return (0,external_vue_.createVNode)("span", null, [_this.label]);
|
890
2296
|
};
|
891
2297
|
var renderError = function renderError() {
|
892
2298
|
if (!_this.isError) {
|
893
2299
|
return null;
|
894
2300
|
}
|
895
2301
|
if (_this.errorDisplayType === 'tooltips') {
|
896
|
-
return (0,
|
2302
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
897
2303
|
"class": "".concat(_this.resolveClassName('form-error-tips'))
|
898
|
-
}, [(0,
|
2304
|
+
}, [(0,external_vue_.createVNode)(icon_namespaceObject.ExclamationCircleShape, null, null)]), [[(0,external_vue_.resolveDirective)("bk-tooltips"), _this.errorMessage]]);
|
899
2305
|
}
|
900
|
-
return (0,
|
2306
|
+
return (0,external_vue_.createVNode)("div", {
|
901
2307
|
"class": "".concat(_this.resolveClassName('form-error'))
|
902
2308
|
}, [_this.$slots.error ? _this.$slots.error(_this.errorMessage) : _this.errorMessage]);
|
903
2309
|
};
|
904
|
-
return (0,
|
2310
|
+
return (0,external_vue_.createVNode)("div", {
|
905
2311
|
"class": itemClassees
|
906
|
-
}, [this.isShowLabel && (0,
|
2312
|
+
}, [this.isShowLabel && (0,external_vue_.createVNode)("div", {
|
907
2313
|
"style": this.labelStyles,
|
908
2314
|
"class": "".concat(this.resolveClassName('form-label'))
|
909
|
-
}, [renderLabel(), this.isFormTypeVertical && ((_this$$slots$labelApp = (_this$$slots = this.$slots).labelAppend) === null || _this$$slots$labelApp === void 0 ? void 0 : _this$$slots$labelApp.call(_this$$slots))]), (0,
|
2315
|
+
}, [renderLabel(), this.isFormTypeVertical && ((_this$$slots$labelApp = (_this$$slots = this.$slots).labelAppend) === null || _this$$slots$labelApp === void 0 ? void 0 : _this$$slots$labelApp.call(_this$$slots))]), (0,external_vue_.createVNode)("div", {
|
910
2316
|
"style": this.contentStyles,
|
911
2317
|
"class": "".concat(this.resolveClassName('form-content'))
|
912
2318
|
}, [(_this$$slots$default = (_this$$slots2 = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots2), renderError()])]);
|
@@ -943,11 +2349,13 @@ var isValid = function isValid(value) {
|
|
943
2349
|
|
944
2350
|
|
945
2351
|
|
946
|
-
var BkForm = (0,
|
2352
|
+
var BkForm = (0,shared_.withInstallProps)(src_form, {
|
947
2353
|
FormItem: form_item,
|
948
2354
|
ComposeFormItem: compose_form_item
|
949
2355
|
});
|
950
|
-
/* harmony default export */ const
|
2356
|
+
/* harmony default export */ const form_src = (BkForm);
|
2357
|
+
|
2358
|
+
})();
|
951
2359
|
|
952
2360
|
var __webpack_exports__BkComposeFormItem = __webpack_exports__.BkComposeFormItem;
|
953
2361
|
var __webpack_exports__BkForm = __webpack_exports__.BkForm;
|