bkui-vue 0.0.2-beta.96 → 0.0.2-beta.97
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 +27 -27
- package/dist/index.esm.js +4509 -4455
- package/dist/index.umd.js +27 -27
- package/lib/plugin-popover/index.js +277 -93
- package/lib/popover/index.js +277 -93
- package/lib/shared/index.js +275 -91
- package/lib/table/index.js +278 -94
- package/lib/tree/index.js +276 -92
- package/package.json +2 -2
package/lib/popover/index.js
CHANGED
@@ -3,8 +3,274 @@ import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash_isElement_e6b2a6ce__ from "lodash/isElement";
|
6
|
-
/******/
|
7
|
-
|
6
|
+
/******/ var __webpack_modules__ = ({
|
7
|
+
|
8
|
+
/***/ 8022:
|
9
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
10
|
+
|
11
|
+
var v1 = __webpack_require__(4481);
|
12
|
+
var v4 = __webpack_require__(6426);
|
13
|
+
|
14
|
+
var uuid = v4;
|
15
|
+
uuid.v1 = v1;
|
16
|
+
uuid.v4 = v4;
|
17
|
+
|
18
|
+
module.exports = uuid;
|
19
|
+
|
20
|
+
|
21
|
+
/***/ }),
|
22
|
+
|
23
|
+
/***/ 8725:
|
24
|
+
/***/ ((module) => {
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
28
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
29
|
+
*/
|
30
|
+
var byteToHex = [];
|
31
|
+
for (var i = 0; i < 256; ++i) {
|
32
|
+
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
33
|
+
}
|
34
|
+
|
35
|
+
function bytesToUuid(buf, offset) {
|
36
|
+
var i = offset || 0;
|
37
|
+
var bth = byteToHex;
|
38
|
+
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
39
|
+
return ([
|
40
|
+
bth[buf[i++]], bth[buf[i++]],
|
41
|
+
bth[buf[i++]], bth[buf[i++]], '-',
|
42
|
+
bth[buf[i++]], bth[buf[i++]], '-',
|
43
|
+
bth[buf[i++]], bth[buf[i++]], '-',
|
44
|
+
bth[buf[i++]], bth[buf[i++]], '-',
|
45
|
+
bth[buf[i++]], bth[buf[i++]],
|
46
|
+
bth[buf[i++]], bth[buf[i++]],
|
47
|
+
bth[buf[i++]], bth[buf[i++]]
|
48
|
+
]).join('');
|
49
|
+
}
|
50
|
+
|
51
|
+
module.exports = bytesToUuid;
|
52
|
+
|
53
|
+
|
54
|
+
/***/ }),
|
55
|
+
|
56
|
+
/***/ 9157:
|
57
|
+
/***/ ((module) => {
|
58
|
+
|
59
|
+
// Unique ID creation requires a high quality random # generator. In the
|
60
|
+
// browser this is a little complicated due to unknown quality of Math.random()
|
61
|
+
// and inconsistent support for the `crypto` API. We do the best we can via
|
62
|
+
// feature-detection
|
63
|
+
|
64
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto
|
65
|
+
// implementation. Also, find the complete implementation of crypto on IE11.
|
66
|
+
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
|
67
|
+
(typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
|
68
|
+
|
69
|
+
if (getRandomValues) {
|
70
|
+
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
|
71
|
+
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
|
72
|
+
|
73
|
+
module.exports = function whatwgRNG() {
|
74
|
+
getRandomValues(rnds8);
|
75
|
+
return rnds8;
|
76
|
+
};
|
77
|
+
} else {
|
78
|
+
// Math.random()-based (RNG)
|
79
|
+
//
|
80
|
+
// If all else fails, use Math.random(). It's fast, but is of unspecified
|
81
|
+
// quality.
|
82
|
+
var rnds = new Array(16);
|
83
|
+
|
84
|
+
module.exports = function mathRNG() {
|
85
|
+
for (var i = 0, r; i < 16; i++) {
|
86
|
+
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
|
87
|
+
rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
|
88
|
+
}
|
89
|
+
|
90
|
+
return rnds;
|
91
|
+
};
|
92
|
+
}
|
93
|
+
|
94
|
+
|
95
|
+
/***/ }),
|
96
|
+
|
97
|
+
/***/ 4481:
|
98
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
99
|
+
|
100
|
+
var rng = __webpack_require__(9157);
|
101
|
+
var bytesToUuid = __webpack_require__(8725);
|
102
|
+
|
103
|
+
// **`v1()` - Generate time-based UUID**
|
104
|
+
//
|
105
|
+
// Inspired by https://github.com/LiosK/UUID.js
|
106
|
+
// and http://docs.python.org/library/uuid.html
|
107
|
+
|
108
|
+
var _nodeId;
|
109
|
+
var _clockseq;
|
110
|
+
|
111
|
+
// Previous uuid creation time
|
112
|
+
var _lastMSecs = 0;
|
113
|
+
var _lastNSecs = 0;
|
114
|
+
|
115
|
+
// See https://github.com/uuidjs/uuid for API details
|
116
|
+
function v1(options, buf, offset) {
|
117
|
+
var i = buf && offset || 0;
|
118
|
+
var b = buf || [];
|
119
|
+
|
120
|
+
options = options || {};
|
121
|
+
var node = options.node || _nodeId;
|
122
|
+
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
123
|
+
|
124
|
+
// node and clockseq need to be initialized to random values if they're not
|
125
|
+
// specified. We do this lazily to minimize issues related to insufficient
|
126
|
+
// system entropy. See #189
|
127
|
+
if (node == null || clockseq == null) {
|
128
|
+
var seedBytes = rng();
|
129
|
+
if (node == null) {
|
130
|
+
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
131
|
+
node = _nodeId = [
|
132
|
+
seedBytes[0] | 0x01,
|
133
|
+
seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
|
134
|
+
];
|
135
|
+
}
|
136
|
+
if (clockseq == null) {
|
137
|
+
// Per 4.2.2, randomize (14 bit) clockseq
|
138
|
+
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
143
|
+
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
144
|
+
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
145
|
+
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
146
|
+
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
147
|
+
|
148
|
+
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
149
|
+
// cycle to simulate higher resolution clock
|
150
|
+
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
151
|
+
|
152
|
+
// Time since last uuid creation (in msecs)
|
153
|
+
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
154
|
+
|
155
|
+
// Per 4.2.1.2, Bump clockseq on clock regression
|
156
|
+
if (dt < 0 && options.clockseq === undefined) {
|
157
|
+
clockseq = clockseq + 1 & 0x3fff;
|
158
|
+
}
|
159
|
+
|
160
|
+
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
161
|
+
// time interval
|
162
|
+
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
163
|
+
nsecs = 0;
|
164
|
+
}
|
165
|
+
|
166
|
+
// Per 4.2.1.2 Throw error if too many uuids are requested
|
167
|
+
if (nsecs >= 10000) {
|
168
|
+
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
169
|
+
}
|
170
|
+
|
171
|
+
_lastMSecs = msecs;
|
172
|
+
_lastNSecs = nsecs;
|
173
|
+
_clockseq = clockseq;
|
174
|
+
|
175
|
+
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
176
|
+
msecs += 12219292800000;
|
177
|
+
|
178
|
+
// `time_low`
|
179
|
+
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
180
|
+
b[i++] = tl >>> 24 & 0xff;
|
181
|
+
b[i++] = tl >>> 16 & 0xff;
|
182
|
+
b[i++] = tl >>> 8 & 0xff;
|
183
|
+
b[i++] = tl & 0xff;
|
184
|
+
|
185
|
+
// `time_mid`
|
186
|
+
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
187
|
+
b[i++] = tmh >>> 8 & 0xff;
|
188
|
+
b[i++] = tmh & 0xff;
|
189
|
+
|
190
|
+
// `time_high_and_version`
|
191
|
+
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
192
|
+
b[i++] = tmh >>> 16 & 0xff;
|
193
|
+
|
194
|
+
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
195
|
+
b[i++] = clockseq >>> 8 | 0x80;
|
196
|
+
|
197
|
+
// `clock_seq_low`
|
198
|
+
b[i++] = clockseq & 0xff;
|
199
|
+
|
200
|
+
// `node`
|
201
|
+
for (var n = 0; n < 6; ++n) {
|
202
|
+
b[i + n] = node[n];
|
203
|
+
}
|
204
|
+
|
205
|
+
return buf ? buf : bytesToUuid(b);
|
206
|
+
}
|
207
|
+
|
208
|
+
module.exports = v1;
|
209
|
+
|
210
|
+
|
211
|
+
/***/ }),
|
212
|
+
|
213
|
+
/***/ 6426:
|
214
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
215
|
+
|
216
|
+
var rng = __webpack_require__(9157);
|
217
|
+
var bytesToUuid = __webpack_require__(8725);
|
218
|
+
|
219
|
+
function v4(options, buf, offset) {
|
220
|
+
var i = buf && offset || 0;
|
221
|
+
|
222
|
+
if (typeof(options) == 'string') {
|
223
|
+
buf = options === 'binary' ? new Array(16) : null;
|
224
|
+
options = null;
|
225
|
+
}
|
226
|
+
options = options || {};
|
227
|
+
|
228
|
+
var rnds = options.random || (options.rng || rng)();
|
229
|
+
|
230
|
+
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
231
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
232
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
233
|
+
|
234
|
+
// Copy bytes to buffer, if provided
|
235
|
+
if (buf) {
|
236
|
+
for (var ii = 0; ii < 16; ++ii) {
|
237
|
+
buf[i + ii] = rnds[ii];
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
return buf || bytesToUuid(rnds);
|
242
|
+
}
|
243
|
+
|
244
|
+
module.exports = v4;
|
245
|
+
|
246
|
+
|
247
|
+
/***/ })
|
248
|
+
|
249
|
+
/******/ });
|
250
|
+
/************************************************************************/
|
251
|
+
/******/ // The module cache
|
252
|
+
/******/ var __webpack_module_cache__ = {};
|
253
|
+
/******/
|
254
|
+
/******/ // The require function
|
255
|
+
/******/ function __webpack_require__(moduleId) {
|
256
|
+
/******/ // Check if module is in cache
|
257
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
258
|
+
/******/ if (cachedModule !== undefined) {
|
259
|
+
/******/ return cachedModule.exports;
|
260
|
+
/******/ }
|
261
|
+
/******/ // Create a new module (and put it into the cache)
|
262
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
263
|
+
/******/ // no module.id needed
|
264
|
+
/******/ // no module.loaded needed
|
265
|
+
/******/ exports: {}
|
266
|
+
/******/ };
|
267
|
+
/******/
|
268
|
+
/******/ // Execute the module function
|
269
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
270
|
+
/******/
|
271
|
+
/******/ // Return the exports of the module
|
272
|
+
/******/ return module.exports;
|
273
|
+
/******/ }
|
8
274
|
/******/
|
9
275
|
/************************************************************************/
|
10
276
|
/******/ /* webpack/runtime/define property getters */
|
@@ -26,6 +292,8 @@ import * as __WEBPACK_EXTERNAL_MODULE_lodash_isElement_e6b2a6ce__ from "lodash/i
|
|
26
292
|
/******/
|
27
293
|
/************************************************************************/
|
28
294
|
var __webpack_exports__ = {};
|
295
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
296
|
+
(() => {
|
29
297
|
|
30
298
|
// EXPORTS
|
31
299
|
__webpack_require__.d(__webpack_exports__, {
|
@@ -2591,94 +2859,8 @@ function _objectDestructuringEmpty(obj) {
|
|
2591
2859
|
getClippingRect: getClippingRect
|
2592
2860
|
};
|
2593
2861
|
});
|
2594
|
-
|
2595
|
-
|
2596
|
-
/* harmony default export */ const esm_browser_native = ({
|
2597
|
-
randomUUID
|
2598
|
-
});
|
2599
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
|
2600
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
2601
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
2602
|
-
// generators (like Math.random()).
|
2603
|
-
let getRandomValues;
|
2604
|
-
const rnds8 = new Uint8Array(16);
|
2605
|
-
function rng() {
|
2606
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
2607
|
-
if (!getRandomValues) {
|
2608
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
2609
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
2610
|
-
|
2611
|
-
if (!getRandomValues) {
|
2612
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
2613
|
-
}
|
2614
|
-
}
|
2615
|
-
|
2616
|
-
return getRandomValues(rnds8);
|
2617
|
-
}
|
2618
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
|
2619
|
-
|
2620
|
-
/**
|
2621
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
2622
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
2623
|
-
*/
|
2624
|
-
|
2625
|
-
const byteToHex = [];
|
2626
|
-
|
2627
|
-
for (let i = 0; i < 256; ++i) {
|
2628
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
2629
|
-
}
|
2630
|
-
|
2631
|
-
function unsafeStringify(arr, offset = 0) {
|
2632
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
2633
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
2634
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
2635
|
-
}
|
2636
|
-
|
2637
|
-
function stringify(arr, offset = 0) {
|
2638
|
-
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
2639
|
-
// of the following:
|
2640
|
-
// - One or more input array values don't map to a hex octet (leading to
|
2641
|
-
// "undefined" in the uuid)
|
2642
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
2643
|
-
|
2644
|
-
if (!validate(uuid)) {
|
2645
|
-
throw TypeError('Stringified UUID is invalid');
|
2646
|
-
}
|
2647
|
-
|
2648
|
-
return uuid;
|
2649
|
-
}
|
2650
|
-
|
2651
|
-
/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
|
2652
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
|
2653
|
-
|
2654
|
-
|
2655
|
-
|
2656
|
-
|
2657
|
-
function v4(options, buf, offset) {
|
2658
|
-
if (esm_browser_native.randomUUID && !buf && !options) {
|
2659
|
-
return esm_browser_native.randomUUID();
|
2660
|
-
}
|
2661
|
-
|
2662
|
-
options = options || {};
|
2663
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
2664
|
-
|
2665
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
2666
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
2667
|
-
|
2668
|
-
if (buf) {
|
2669
|
-
offset = offset || 0;
|
2670
|
-
|
2671
|
-
for (let i = 0; i < 16; ++i) {
|
2672
|
-
buf[offset + i] = rnds[i];
|
2673
|
-
}
|
2674
|
-
|
2675
|
-
return buf;
|
2676
|
-
}
|
2677
|
-
|
2678
|
-
return unsafeStringify(rnds);
|
2679
|
-
}
|
2680
|
-
|
2681
|
-
/* harmony default export */ const esm_browser_v4 = (v4);
|
2862
|
+
// EXTERNAL MODULE: ../../node_modules/uuid/index.js
|
2863
|
+
var uuid = __webpack_require__(8022);
|
2682
2864
|
;// CONCATENATED MODULE: ../../packages/popover/src/utils.ts
|
2683
2865
|
/*
|
2684
2866
|
* Tencent is pleased to support the open source community by making
|
@@ -2713,7 +2895,7 @@ var isAvailableId = function isAvailableId(query) {
|
|
2713
2895
|
};
|
2714
2896
|
var getFullscreenUid = function getFullscreenUid() {
|
2715
2897
|
if (!CachedConst.fullscreenReferId) {
|
2716
|
-
CachedConst.fullscreenReferId = "id_".concat(
|
2898
|
+
CachedConst.fullscreenReferId = "id_".concat((0,uuid.v4)());
|
2717
2899
|
}
|
2718
2900
|
return CachedConst.fullscreenReferId;
|
2719
2901
|
};
|
@@ -3282,14 +3464,14 @@ var parentNodeReferId = null;
|
|
3282
3464
|
return resolvedBoundary;
|
3283
3465
|
};
|
3284
3466
|
if (popContainerId === null || !isAvailableId("#".concat(popContainerId))) {
|
3285
|
-
popContainerId = "id_".concat(
|
3467
|
+
popContainerId = "id_".concat((0,uuid.v4)());
|
3286
3468
|
var popContainer = document.createElement('div');
|
3287
3469
|
popContainer.setAttribute('id', popContainerId);
|
3288
3470
|
popContainer.setAttribute('data-popper-id', popContainerId);
|
3289
3471
|
document.body.append(popContainer);
|
3290
3472
|
}
|
3291
3473
|
if (parentNodeReferId === null) {
|
3292
|
-
parentNodeReferId = "id_".concat(
|
3474
|
+
parentNodeReferId = "id_".concat((0,uuid.v4)());
|
3293
3475
|
}
|
3294
3476
|
return {
|
3295
3477
|
popContainerId: popContainerId,
|
@@ -3907,6 +4089,8 @@ var BkPopover = (0,external_shared_namespaceObject.withInstall)(popover);
|
|
3907
4089
|
/* harmony default export */ const src = (BkPopover);
|
3908
4090
|
|
3909
4091
|
|
4092
|
+
})();
|
4093
|
+
|
3910
4094
|
var __webpack_exports__$bkPopover = __webpack_exports__.kB;
|
3911
4095
|
var __webpack_exports__PopoverProps = __webpack_exports__.uE;
|
3912
4096
|
var __webpack_exports__default = __webpack_exports__.ZP;
|