bkui-vue 0.0.2-beta.93 → 0.0.2-beta.94
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 +28 -28
- package/dist/index.esm.js +4874 -4808
- package/dist/index.umd.js +28 -28
- 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/components/table-column.d.ts +1 -0
- package/lib/table/index.d.ts +50 -0
- package/lib/table/index.js +300 -104
- package/lib/table-column/index.d.ts +150 -0
- package/lib/table-column/index.js +15 -6
- package/lib/tree/index.d.ts +9 -15
- package/lib/tree/index.js +297 -102
- package/lib/tree/props.d.ts +2 -4
- package/lib/tree/tree.d.ts +5 -9
- package/lib/tree/util.d.ts +1 -0
- package/package.json +1 -1
package/lib/table/index.js
CHANGED
@@ -16,8 +16,274 @@ import * as __WEBPACK_EXTERNAL_MODULE__exception_12c197e0__ from "../exception";
|
|
16
16
|
import * as __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__ from "../popover";
|
17
17
|
import * as __WEBPACK_EXTERNAL_MODULE__icon__2ba2075d__ from "../icon/";
|
18
18
|
import * as __WEBPACK_EXTERNAL_MODULE__button_59c00871__ from "../button";
|
19
|
-
/******/
|
20
|
-
|
19
|
+
/******/ var __webpack_modules__ = ({
|
20
|
+
|
21
|
+
/***/ 8022:
|
22
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
23
|
+
|
24
|
+
var v1 = __webpack_require__(4481);
|
25
|
+
var v4 = __webpack_require__(6426);
|
26
|
+
|
27
|
+
var uuid = v4;
|
28
|
+
uuid.v1 = v1;
|
29
|
+
uuid.v4 = v4;
|
30
|
+
|
31
|
+
module.exports = uuid;
|
32
|
+
|
33
|
+
|
34
|
+
/***/ }),
|
35
|
+
|
36
|
+
/***/ 8725:
|
37
|
+
/***/ ((module) => {
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
41
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
42
|
+
*/
|
43
|
+
var byteToHex = [];
|
44
|
+
for (var i = 0; i < 256; ++i) {
|
45
|
+
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
46
|
+
}
|
47
|
+
|
48
|
+
function bytesToUuid(buf, offset) {
|
49
|
+
var i = offset || 0;
|
50
|
+
var bth = byteToHex;
|
51
|
+
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
52
|
+
return ([
|
53
|
+
bth[buf[i++]], bth[buf[i++]],
|
54
|
+
bth[buf[i++]], bth[buf[i++]], '-',
|
55
|
+
bth[buf[i++]], bth[buf[i++]], '-',
|
56
|
+
bth[buf[i++]], bth[buf[i++]], '-',
|
57
|
+
bth[buf[i++]], bth[buf[i++]], '-',
|
58
|
+
bth[buf[i++]], bth[buf[i++]],
|
59
|
+
bth[buf[i++]], bth[buf[i++]],
|
60
|
+
bth[buf[i++]], bth[buf[i++]]
|
61
|
+
]).join('');
|
62
|
+
}
|
63
|
+
|
64
|
+
module.exports = bytesToUuid;
|
65
|
+
|
66
|
+
|
67
|
+
/***/ }),
|
68
|
+
|
69
|
+
/***/ 9157:
|
70
|
+
/***/ ((module) => {
|
71
|
+
|
72
|
+
// Unique ID creation requires a high quality random # generator. In the
|
73
|
+
// browser this is a little complicated due to unknown quality of Math.random()
|
74
|
+
// and inconsistent support for the `crypto` API. We do the best we can via
|
75
|
+
// feature-detection
|
76
|
+
|
77
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto
|
78
|
+
// implementation. Also, find the complete implementation of crypto on IE11.
|
79
|
+
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
|
80
|
+
(typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
|
81
|
+
|
82
|
+
if (getRandomValues) {
|
83
|
+
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
|
84
|
+
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
|
85
|
+
|
86
|
+
module.exports = function whatwgRNG() {
|
87
|
+
getRandomValues(rnds8);
|
88
|
+
return rnds8;
|
89
|
+
};
|
90
|
+
} else {
|
91
|
+
// Math.random()-based (RNG)
|
92
|
+
//
|
93
|
+
// If all else fails, use Math.random(). It's fast, but is of unspecified
|
94
|
+
// quality.
|
95
|
+
var rnds = new Array(16);
|
96
|
+
|
97
|
+
module.exports = function mathRNG() {
|
98
|
+
for (var i = 0, r; i < 16; i++) {
|
99
|
+
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
|
100
|
+
rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
|
101
|
+
}
|
102
|
+
|
103
|
+
return rnds;
|
104
|
+
};
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
/***/ }),
|
109
|
+
|
110
|
+
/***/ 4481:
|
111
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
112
|
+
|
113
|
+
var rng = __webpack_require__(9157);
|
114
|
+
var bytesToUuid = __webpack_require__(8725);
|
115
|
+
|
116
|
+
// **`v1()` - Generate time-based UUID**
|
117
|
+
//
|
118
|
+
// Inspired by https://github.com/LiosK/UUID.js
|
119
|
+
// and http://docs.python.org/library/uuid.html
|
120
|
+
|
121
|
+
var _nodeId;
|
122
|
+
var _clockseq;
|
123
|
+
|
124
|
+
// Previous uuid creation time
|
125
|
+
var _lastMSecs = 0;
|
126
|
+
var _lastNSecs = 0;
|
127
|
+
|
128
|
+
// See https://github.com/uuidjs/uuid for API details
|
129
|
+
function v1(options, buf, offset) {
|
130
|
+
var i = buf && offset || 0;
|
131
|
+
var b = buf || [];
|
132
|
+
|
133
|
+
options = options || {};
|
134
|
+
var node = options.node || _nodeId;
|
135
|
+
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
136
|
+
|
137
|
+
// node and clockseq need to be initialized to random values if they're not
|
138
|
+
// specified. We do this lazily to minimize issues related to insufficient
|
139
|
+
// system entropy. See #189
|
140
|
+
if (node == null || clockseq == null) {
|
141
|
+
var seedBytes = rng();
|
142
|
+
if (node == null) {
|
143
|
+
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
144
|
+
node = _nodeId = [
|
145
|
+
seedBytes[0] | 0x01,
|
146
|
+
seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
|
147
|
+
];
|
148
|
+
}
|
149
|
+
if (clockseq == null) {
|
150
|
+
// Per 4.2.2, randomize (14 bit) clockseq
|
151
|
+
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
156
|
+
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
157
|
+
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
158
|
+
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
159
|
+
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
160
|
+
|
161
|
+
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
162
|
+
// cycle to simulate higher resolution clock
|
163
|
+
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
164
|
+
|
165
|
+
// Time since last uuid creation (in msecs)
|
166
|
+
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
167
|
+
|
168
|
+
// Per 4.2.1.2, Bump clockseq on clock regression
|
169
|
+
if (dt < 0 && options.clockseq === undefined) {
|
170
|
+
clockseq = clockseq + 1 & 0x3fff;
|
171
|
+
}
|
172
|
+
|
173
|
+
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
174
|
+
// time interval
|
175
|
+
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
176
|
+
nsecs = 0;
|
177
|
+
}
|
178
|
+
|
179
|
+
// Per 4.2.1.2 Throw error if too many uuids are requested
|
180
|
+
if (nsecs >= 10000) {
|
181
|
+
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
182
|
+
}
|
183
|
+
|
184
|
+
_lastMSecs = msecs;
|
185
|
+
_lastNSecs = nsecs;
|
186
|
+
_clockseq = clockseq;
|
187
|
+
|
188
|
+
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
189
|
+
msecs += 12219292800000;
|
190
|
+
|
191
|
+
// `time_low`
|
192
|
+
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
193
|
+
b[i++] = tl >>> 24 & 0xff;
|
194
|
+
b[i++] = tl >>> 16 & 0xff;
|
195
|
+
b[i++] = tl >>> 8 & 0xff;
|
196
|
+
b[i++] = tl & 0xff;
|
197
|
+
|
198
|
+
// `time_mid`
|
199
|
+
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
200
|
+
b[i++] = tmh >>> 8 & 0xff;
|
201
|
+
b[i++] = tmh & 0xff;
|
202
|
+
|
203
|
+
// `time_high_and_version`
|
204
|
+
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
205
|
+
b[i++] = tmh >>> 16 & 0xff;
|
206
|
+
|
207
|
+
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
208
|
+
b[i++] = clockseq >>> 8 | 0x80;
|
209
|
+
|
210
|
+
// `clock_seq_low`
|
211
|
+
b[i++] = clockseq & 0xff;
|
212
|
+
|
213
|
+
// `node`
|
214
|
+
for (var n = 0; n < 6; ++n) {
|
215
|
+
b[i + n] = node[n];
|
216
|
+
}
|
217
|
+
|
218
|
+
return buf ? buf : bytesToUuid(b);
|
219
|
+
}
|
220
|
+
|
221
|
+
module.exports = v1;
|
222
|
+
|
223
|
+
|
224
|
+
/***/ }),
|
225
|
+
|
226
|
+
/***/ 6426:
|
227
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
228
|
+
|
229
|
+
var rng = __webpack_require__(9157);
|
230
|
+
var bytesToUuid = __webpack_require__(8725);
|
231
|
+
|
232
|
+
function v4(options, buf, offset) {
|
233
|
+
var i = buf && offset || 0;
|
234
|
+
|
235
|
+
if (typeof(options) == 'string') {
|
236
|
+
buf = options === 'binary' ? new Array(16) : null;
|
237
|
+
options = null;
|
238
|
+
}
|
239
|
+
options = options || {};
|
240
|
+
|
241
|
+
var rnds = options.random || (options.rng || rng)();
|
242
|
+
|
243
|
+
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
244
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
245
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
246
|
+
|
247
|
+
// Copy bytes to buffer, if provided
|
248
|
+
if (buf) {
|
249
|
+
for (var ii = 0; ii < 16; ++ii) {
|
250
|
+
buf[i + ii] = rnds[ii];
|
251
|
+
}
|
252
|
+
}
|
253
|
+
|
254
|
+
return buf || bytesToUuid(rnds);
|
255
|
+
}
|
256
|
+
|
257
|
+
module.exports = v4;
|
258
|
+
|
259
|
+
|
260
|
+
/***/ })
|
261
|
+
|
262
|
+
/******/ });
|
263
|
+
/************************************************************************/
|
264
|
+
/******/ // The module cache
|
265
|
+
/******/ var __webpack_module_cache__ = {};
|
266
|
+
/******/
|
267
|
+
/******/ // The require function
|
268
|
+
/******/ function __webpack_require__(moduleId) {
|
269
|
+
/******/ // Check if module is in cache
|
270
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
271
|
+
/******/ if (cachedModule !== undefined) {
|
272
|
+
/******/ return cachedModule.exports;
|
273
|
+
/******/ }
|
274
|
+
/******/ // Create a new module (and put it into the cache)
|
275
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
276
|
+
/******/ // no module.id needed
|
277
|
+
/******/ // no module.loaded needed
|
278
|
+
/******/ exports: {}
|
279
|
+
/******/ };
|
280
|
+
/******/
|
281
|
+
/******/ // Execute the module function
|
282
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
283
|
+
/******/
|
284
|
+
/******/ // Return the exports of the module
|
285
|
+
/******/ return module.exports;
|
286
|
+
/******/ }
|
21
287
|
/******/
|
22
288
|
/************************************************************************/
|
23
289
|
/******/ /* webpack/runtime/define property getters */
|
@@ -51,6 +317,8 @@ import * as __WEBPACK_EXTERNAL_MODULE__button_59c00871__ from "../button";
|
|
51
317
|
/******/
|
52
318
|
/************************************************************************/
|
53
319
|
var __webpack_exports__ = {};
|
320
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
321
|
+
(() => {
|
54
322
|
|
55
323
|
// EXPORTS
|
56
324
|
__webpack_require__.d(__webpack_exports__, {
|
@@ -63,10 +331,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
63
331
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
64
332
|
var y = x => () => x
|
65
333
|
const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["RenderType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.RenderType, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.classes, ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.debounce, ["hasOverflowEllipsis"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.hasOverflowEllipsis, ["isElement"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.isElement, ["resolveClassName"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.resolveClassName, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstallProps });
|
66
|
-
;// CONCATENATED MODULE: external "vue"
|
67
|
-
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
68
|
-
var external_vue_y = x => () => x
|
69
|
-
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["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, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
70
334
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
71
335
|
function typeof_typeof(obj) {
|
72
336
|
"@babel/helpers - typeof";
|
@@ -112,6 +376,10 @@ function defineProperty_defineProperty(obj, key, value) {
|
|
112
376
|
}
|
113
377
|
return obj;
|
114
378
|
}
|
379
|
+
;// CONCATENATED MODULE: external "vue"
|
380
|
+
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
381
|
+
var external_vue_y = x => () => x
|
382
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["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, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
115
383
|
;// CONCATENATED MODULE: ../../packages/table/src/const.ts
|
116
384
|
|
117
385
|
var _DEF_COLOR;
|
@@ -618,6 +886,7 @@ var tableProps = {
|
|
618
886
|
};
|
619
887
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
620
888
|
|
889
|
+
|
621
890
|
/*
|
622
891
|
* Tencent is pleased to support the open source community by making
|
623
892
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -703,6 +972,14 @@ var TableColumnProp = {
|
|
703
972
|
}
|
704
973
|
this.updateColumnDefineByParent();
|
705
974
|
},
|
975
|
+
copyProps: function copyProps(props) {
|
976
|
+
return Object.keys(props !== null && props !== void 0 ? props : {}).reduce(function (result, key) {
|
977
|
+
var target = key.replace(/-(\w)/g, function (_, letter) {
|
978
|
+
return letter.toUpperCase();
|
979
|
+
});
|
980
|
+
return Object.assign(result, defineProperty_defineProperty({}, target, props[key]));
|
981
|
+
}, {});
|
982
|
+
},
|
706
983
|
updateColumnDefineByParent: function updateColumnDefineByParent() {
|
707
984
|
var _this = this;
|
708
985
|
var fn = function fn() {
|
@@ -727,7 +1004,7 @@ var TableColumnProp = {
|
|
727
1004
|
skipValidateKey0 = Object.hasOwnProperty.call(node.props || {}, 'key');
|
728
1005
|
var resolveProp = Object.assign({
|
729
1006
|
index: index
|
730
|
-
}, node.props, {
|
1007
|
+
}, _this.copyProps(node.props), {
|
731
1008
|
field: node.props.prop || node.props.field,
|
732
1009
|
render: (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"]
|
733
1010
|
});
|
@@ -747,7 +1024,7 @@ var TableColumnProp = {
|
|
747
1024
|
}
|
748
1025
|
},
|
749
1026
|
unmountColumn: function unmountColumn() {
|
750
|
-
var resolveProp = Object.assign({}, this.$props, {
|
1027
|
+
var resolveProp = Object.assign({}, this.copyProps(this.$props), {
|
751
1028
|
field: this.$props.prop || this.$props.field,
|
752
1029
|
render: this.$slots["default"]
|
753
1030
|
});
|
@@ -1167,13 +1444,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
1167
1444
|
});
|
1168
1445
|
var resizeColumnStyle = (0,external_vue_namespaceObject.computed)(function () {
|
1169
1446
|
return _objectSpread(_objectSpread({}, dragOffsetXStyle), {}, {
|
1170
|
-
transform: "translate(".concat(dragOffsetX.value
|
1447
|
+
transform: "translate(".concat(dragOffsetX.value + 3, "px, ").concat(layout.value.translateY, "px)")
|
1171
1448
|
});
|
1172
1449
|
});
|
1173
1450
|
var resizeHeadColStyle = (0,external_vue_namespaceObject.computed)(function () {
|
1174
1451
|
return _objectSpread(_objectSpread({}, dragOffsetXStyle), {}, {
|
1175
1452
|
width: '6px',
|
1176
|
-
transform: "translateX(".concat(dragOffsetX.value
|
1453
|
+
transform: "translateX(".concat(dragOffsetX.value, "px)")
|
1177
1454
|
});
|
1178
1455
|
});
|
1179
1456
|
return {
|
@@ -1478,94 +1755,8 @@ const external_loading_namespaceObject = external_loading_x({ ["BkLoadingMode"]:
|
|
1478
1755
|
renderScrollLoading: renderScrollLoading
|
1479
1756
|
};
|
1480
1757
|
});
|
1481
|
-
|
1482
|
-
|
1483
|
-
/* harmony default export */ const esm_browser_native = ({
|
1484
|
-
randomUUID
|
1485
|
-
});
|
1486
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
|
1487
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
1488
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
1489
|
-
// generators (like Math.random()).
|
1490
|
-
let getRandomValues;
|
1491
|
-
const rnds8 = new Uint8Array(16);
|
1492
|
-
function rng() {
|
1493
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
1494
|
-
if (!getRandomValues) {
|
1495
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
1496
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
1497
|
-
|
1498
|
-
if (!getRandomValues) {
|
1499
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
1500
|
-
}
|
1501
|
-
}
|
1502
|
-
|
1503
|
-
return getRandomValues(rnds8);
|
1504
|
-
}
|
1505
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
|
1506
|
-
|
1507
|
-
/**
|
1508
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
1509
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
1510
|
-
*/
|
1511
|
-
|
1512
|
-
const byteToHex = [];
|
1513
|
-
|
1514
|
-
for (let i = 0; i < 256; ++i) {
|
1515
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
1516
|
-
}
|
1517
|
-
|
1518
|
-
function unsafeStringify(arr, offset = 0) {
|
1519
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
1520
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
1521
|
-
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]];
|
1522
|
-
}
|
1523
|
-
|
1524
|
-
function stringify(arr, offset = 0) {
|
1525
|
-
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
1526
|
-
// of the following:
|
1527
|
-
// - One or more input array values don't map to a hex octet (leading to
|
1528
|
-
// "undefined" in the uuid)
|
1529
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
1530
|
-
|
1531
|
-
if (!validate(uuid)) {
|
1532
|
-
throw TypeError('Stringified UUID is invalid');
|
1533
|
-
}
|
1534
|
-
|
1535
|
-
return uuid;
|
1536
|
-
}
|
1537
|
-
|
1538
|
-
/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
|
1539
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
function v4(options, buf, offset) {
|
1545
|
-
if (esm_browser_native.randomUUID && !buf && !options) {
|
1546
|
-
return esm_browser_native.randomUUID();
|
1547
|
-
}
|
1548
|
-
|
1549
|
-
options = options || {};
|
1550
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
1551
|
-
|
1552
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
1553
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
1554
|
-
|
1555
|
-
if (buf) {
|
1556
|
-
offset = offset || 0;
|
1557
|
-
|
1558
|
-
for (let i = 0; i < 16; ++i) {
|
1559
|
-
buf[offset + i] = rnds[i];
|
1560
|
-
}
|
1561
|
-
|
1562
|
-
return buf;
|
1563
|
-
}
|
1564
|
-
|
1565
|
-
return unsafeStringify(rnds);
|
1566
|
-
}
|
1567
|
-
|
1568
|
-
/* harmony default export */ const esm_browser_v4 = (v4);
|
1758
|
+
// EXTERNAL MODULE: ../../node_modules/uuid/index.js
|
1759
|
+
var node_modules_uuid = __webpack_require__(8022);
|
1569
1760
|
;// CONCATENATED MODULE: ../../packages/table/src/plugins/use-pagination.tsx
|
1570
1761
|
|
1571
1762
|
|
@@ -2933,7 +3124,7 @@ var getRowKey = function getRowKey(item, props, index) {
|
|
2933
3124
|
if (val !== null) {
|
2934
3125
|
return val;
|
2935
3126
|
}
|
2936
|
-
return
|
3127
|
+
return (0,node_modules_uuid.v4)();
|
2937
3128
|
};
|
2938
3129
|
var getRowKeyNull = function getRowKeyNull(item, props, index) {
|
2939
3130
|
if (typeof props.rowKey === 'string') {
|
@@ -3211,6 +3402,7 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3211
3402
|
var skipColNum = 0;
|
3212
3403
|
var needColSpan = neepColspanOrRowspan(['colspan']);
|
3213
3404
|
(columns || []).forEach(function (col, index) {
|
3405
|
+
var _Object$assign;
|
3214
3406
|
var _ref = needColSpan ? getColumnSpanConfig(col, index, skipColNum) : {
|
3215
3407
|
skipCol: false,
|
3216
3408
|
skipColumnNum: 0,
|
@@ -3231,14 +3423,16 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3231
3423
|
skipCol: skipCol,
|
3232
3424
|
skipColumnNum: skipColumnNum,
|
3233
3425
|
skipColLen: skipColLen
|
3234
|
-
}), defineProperty_defineProperty(_formatData$columnSch, COLUMN_ATTRIBUTE.COL_UID,
|
3426
|
+
}), defineProperty_defineProperty(_formatData$columnSch, COLUMN_ATTRIBUTE.COL_UID, (0,node_modules_uuid.v4)()), _formatData$columnSch));
|
3235
3427
|
}
|
3236
|
-
|
3428
|
+
console.log('resolveMinWidth', resolveMinWidth(col), col);
|
3429
|
+
Object.assign(formatData.columnSchema.get(col), (_Object$assign = {}, defineProperty_defineProperty(_Object$assign, COLUMN_ATTRIBUTE.COL_SPAN, {
|
3237
3430
|
skipCol: skipCol,
|
3238
3431
|
skipColumnNum: skipColumnNum,
|
3239
3432
|
skipColLen: skipColLen
|
3240
|
-
}));
|
3433
|
+
}), defineProperty_defineProperty(_Object$assign, COLUMN_ATTRIBUTE.COL_MIN_WIDTH, resolveMinWidth(col)), _Object$assign));
|
3241
3434
|
});
|
3435
|
+
console.log('formatColumns', columns, formatData.columnSchema);
|
3242
3436
|
};
|
3243
3437
|
var getColumnSpanConfig = function getColumnSpanConfig(col, index, skipColNum) {
|
3244
3438
|
var skipColumnNum = skipColNum;
|
@@ -3465,7 +3659,7 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3465
3659
|
var hasSelectedRow = false;
|
3466
3660
|
var hasUnSelectedRow = false;
|
3467
3661
|
(data || []).forEach(function (row, index) {
|
3468
|
-
var rowId = getRowId(row,
|
3662
|
+
var rowId = getRowId(row, (0,node_modules_uuid.v4)(), props);
|
3469
3663
|
var isSelected = isRowSelected(row);
|
3470
3664
|
if (isSelected) {
|
3471
3665
|
hasSelectedRow = true;
|
@@ -5251,7 +5445,7 @@ function use_render_isSlot(s) {
|
|
5251
5445
|
}
|
5252
5446
|
/* harmony default export */ const use_render = (function (props, context, tableResp, styleRef, head) {
|
5253
5447
|
var t = (0,external_config_provider_namespaceObject.useLocale)('table');
|
5254
|
-
var uuid =
|
5448
|
+
var uuid = (0,node_modules_uuid.v4)();
|
5255
5449
|
var formatData = (0,external_vue_namespaceObject.computed)(function () {
|
5256
5450
|
return tableResp.formatData;
|
5257
5451
|
});
|
@@ -6237,6 +6431,8 @@ var BkTable = (0,external_shared_namespaceObject.withInstallProps)(table, {
|
|
6237
6431
|
});
|
6238
6432
|
/* harmony default export */ const src = (BkTable);
|
6239
6433
|
|
6434
|
+
})();
|
6435
|
+
|
6240
6436
|
var __webpack_exports__BkTable = __webpack_exports__.IR;
|
6241
6437
|
var __webpack_exports__BkTableColumn = __webpack_exports__.Nr;
|
6242
6438
|
var __webpack_exports__default = __webpack_exports__.ZP;
|