bkui-vue 1.0.3-beta.35 → 1.0.3-beta.37
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 +435 -407
- package/dist/index.umd.js +19 -19
- package/lib/table/components/table-column.d.ts +104 -1
- package/lib/table/index.d.ts +44 -1
- package/lib/table/index.js +131 -99
- package/lib/table-column/index.d.ts +110 -3
- package/lib/table-column/index.js +129 -9
- package/package.json +1 -1
@@ -49,6 +49,17 @@ declare const TableColumnProp: {
|
|
49
49
|
} & {
|
50
50
|
default: number;
|
51
51
|
};
|
52
|
+
uniqueId: import("vue-types").VueTypeValidableDef<{
|
53
|
+
[key: string]: any;
|
54
|
+
}> & {
|
55
|
+
default: () => {
|
56
|
+
[key: string]: any;
|
57
|
+
};
|
58
|
+
} & {
|
59
|
+
default: () => {
|
60
|
+
[key: string]: any;
|
61
|
+
};
|
62
|
+
};
|
52
63
|
};
|
53
64
|
export type ITableColumn = Partial<ExtractPropTypes<typeof TableColumnProp>>;
|
54
65
|
declare const _default: import("vue").DefineComponent<{
|
@@ -100,6 +111,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
100
111
|
} & {
|
101
112
|
default: number;
|
102
113
|
};
|
114
|
+
uniqueId: import("vue-types").VueTypeValidableDef<{
|
115
|
+
[key: string]: any;
|
116
|
+
}> & {
|
117
|
+
default: () => {
|
118
|
+
[key: string]: any;
|
119
|
+
};
|
120
|
+
} & {
|
121
|
+
default: () => {
|
122
|
+
[key: string]: any;
|
123
|
+
};
|
124
|
+
};
|
103
125
|
}, {
|
104
126
|
isIndexPropChanged: import("vue").Ref<boolean>;
|
105
127
|
setIsIndexChanged: (val: boolean) => void;
|
@@ -145,6 +167,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
145
167
|
(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
|
146
168
|
};
|
147
169
|
};
|
170
|
+
uniqueId?: {
|
171
|
+
[key: string]: any;
|
172
|
+
};
|
148
173
|
render?: import("../props").RenderFunctionString;
|
149
174
|
sort?: string | boolean | {
|
150
175
|
sortFn?: Function;
|
@@ -181,8 +206,72 @@ declare const _default: import("vue").DefineComponent<{
|
|
181
206
|
};
|
182
207
|
}, unknown, {}, {
|
183
208
|
updateColumnDefine(unmounted?: boolean): void;
|
184
|
-
copyProps(props:
|
209
|
+
copyProps(props: Partial<ExtractPropTypes<{
|
210
|
+
label: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
211
|
+
field: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
212
|
+
render: import("vue-types").VueTypeDef<import("../props").RenderFunctionString>;
|
213
|
+
width: import("vue-types").VueTypeDef<string | number>;
|
214
|
+
minWidth: import("vue-types").VueTypeDef<string | number> & {
|
215
|
+
default: string | number;
|
216
|
+
};
|
217
|
+
columnKey: import("vue-types").VueTypeValidableDef<string> & {
|
218
|
+
default: string;
|
219
|
+
} & {
|
220
|
+
default: string;
|
221
|
+
};
|
222
|
+
showOverflowTooltip: import("vue-types").VueTypeDef<import("../props").IOverflowTooltipProp>;
|
223
|
+
type: import("vue-types").VueTypeDef<"index" | "selection" | "expand" | "__COL_TYPE_NONE">;
|
224
|
+
resizable: import("vue-types").VueTypeValidableDef<boolean> & {
|
225
|
+
default: boolean;
|
226
|
+
} & {
|
227
|
+
default: boolean;
|
228
|
+
};
|
229
|
+
fixed: import("vue-types").VueTypeDef<boolean | "right" | "left"> & {
|
230
|
+
default: boolean | "right" | "left";
|
231
|
+
};
|
232
|
+
sort: import("vue-types").VueTypeDef<import("../props").ISortPropShape>;
|
233
|
+
filter: import("vue-types").VueTypeDef<import("../props").IFilterPropShape>;
|
234
|
+
colspan: import("vue-types").VueTypeDef<import("../props").SpanFunctionString> & {
|
235
|
+
default: (({ column, colIndex, row, rowIndex }: {
|
236
|
+
column: any;
|
237
|
+
colIndex: any;
|
238
|
+
row: any;
|
239
|
+
rowIndex: any;
|
240
|
+
}) => number) | (() => Number);
|
241
|
+
};
|
242
|
+
rowspan: import("vue-types").VueTypeDef<import("../props").SpanFunctionString> & {
|
243
|
+
default: (({ column, colIndex, row, rowIndex }: {
|
244
|
+
column: any;
|
245
|
+
colIndex: any;
|
246
|
+
row: any;
|
247
|
+
rowIndex: any;
|
248
|
+
}) => number) | (() => Number);
|
249
|
+
};
|
250
|
+
align: import("vue-types").VueTypeDef<"" | "right" | "left" | "center">;
|
251
|
+
className: import("vue-types").VueTypeDef<import("../props").RowClassFunctionString>;
|
252
|
+
prop: import("vue-types").VueTypeDef<import("../props").LabelFunctionString>;
|
253
|
+
index: import("vue-types").VueTypeValidableDef<number> & {
|
254
|
+
default: number;
|
255
|
+
} & {
|
256
|
+
default: number;
|
257
|
+
};
|
258
|
+
uniqueId: import("vue-types").VueTypeValidableDef<{
|
259
|
+
[key: string]: any;
|
260
|
+
}> & {
|
261
|
+
default: () => {
|
262
|
+
[key: string]: any;
|
263
|
+
};
|
264
|
+
} & {
|
265
|
+
default: () => {
|
266
|
+
[key: string]: any;
|
267
|
+
};
|
268
|
+
};
|
269
|
+
}>> | {
|
270
|
+
[key: string]: any;
|
271
|
+
}): {};
|
185
272
|
rsolveIndexedColumn(): boolean;
|
273
|
+
setNodeUid(): void;
|
274
|
+
getNodeUid(ctx: any): any;
|
186
275
|
updateColumnDefineByParent(): void;
|
187
276
|
unmountColumn(): void;
|
188
277
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
@@ -234,6 +323,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
234
323
|
} & {
|
235
324
|
default: number;
|
236
325
|
};
|
326
|
+
uniqueId: import("vue-types").VueTypeValidableDef<{
|
327
|
+
[key: string]: any;
|
328
|
+
}> & {
|
329
|
+
default: () => {
|
330
|
+
[key: string]: any;
|
331
|
+
};
|
332
|
+
} & {
|
333
|
+
default: () => {
|
334
|
+
[key: string]: any;
|
335
|
+
};
|
336
|
+
};
|
237
337
|
}>>, {
|
238
338
|
fixed: boolean | "right" | "left";
|
239
339
|
resizable: boolean;
|
@@ -242,5 +342,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
242
342
|
columnKey: string;
|
243
343
|
colspan: import("../props").SpanFunctionString;
|
244
344
|
rowspan: import("../props").SpanFunctionString;
|
345
|
+
uniqueId: {
|
346
|
+
[key: string]: any;
|
347
|
+
};
|
245
348
|
}, {}>;
|
246
349
|
export default _default;
|
package/lib/table/index.d.ts
CHANGED
@@ -1324,6 +1324,17 @@ declare const BkTable: {
|
|
1324
1324
|
} & {
|
1325
1325
|
default: number;
|
1326
1326
|
};
|
1327
|
+
uniqueId: import("vue-types").VueTypeValidableDef<{
|
1328
|
+
[key: string]: any;
|
1329
|
+
}> & {
|
1330
|
+
default: () => {
|
1331
|
+
[key: string]: any;
|
1332
|
+
};
|
1333
|
+
} & {
|
1334
|
+
default: () => {
|
1335
|
+
[key: string]: any;
|
1336
|
+
};
|
1337
|
+
};
|
1327
1338
|
}, {
|
1328
1339
|
isIndexPropChanged: import("vue").Ref<boolean>;
|
1329
1340
|
setIsIndexChanged: (val: boolean) => void;
|
@@ -1369,6 +1380,9 @@ declare const BkTable: {
|
|
1369
1380
|
(locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
|
1370
1381
|
};
|
1371
1382
|
};
|
1383
|
+
uniqueId?: {
|
1384
|
+
[key: string]: any;
|
1385
|
+
};
|
1372
1386
|
render?: import("./props").RenderFunctionString;
|
1373
1387
|
sort?: string | boolean | {
|
1374
1388
|
sortFn?: Function;
|
@@ -1454,8 +1468,23 @@ declare const BkTable: {
|
|
1454
1468
|
} & {
|
1455
1469
|
default: number;
|
1456
1470
|
};
|
1457
|
-
|
1471
|
+
uniqueId: import("vue-types").VueTypeValidableDef<{
|
1472
|
+
[key: string]: any;
|
1473
|
+
}> & {
|
1474
|
+
default: () => {
|
1475
|
+
[key: string]: any;
|
1476
|
+
};
|
1477
|
+
} & {
|
1478
|
+
default: () => {
|
1479
|
+
[key: string]: any;
|
1480
|
+
};
|
1481
|
+
};
|
1482
|
+
}>> | {
|
1483
|
+
[key: string]: any;
|
1484
|
+
}): {};
|
1458
1485
|
rsolveIndexedColumn(): boolean;
|
1486
|
+
setNodeUid(): void;
|
1487
|
+
getNodeUid(ctx: any): any;
|
1459
1488
|
updateColumnDefineByParent(): void;
|
1460
1489
|
unmountColumn(): void;
|
1461
1490
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
@@ -1507,6 +1536,17 @@ declare const BkTable: {
|
|
1507
1536
|
} & {
|
1508
1537
|
default: number;
|
1509
1538
|
};
|
1539
|
+
uniqueId: import("vue-types").VueTypeValidableDef<{
|
1540
|
+
[key: string]: any;
|
1541
|
+
}> & {
|
1542
|
+
default: () => {
|
1543
|
+
[key: string]: any;
|
1544
|
+
};
|
1545
|
+
} & {
|
1546
|
+
default: () => {
|
1547
|
+
[key: string]: any;
|
1548
|
+
};
|
1549
|
+
};
|
1510
1550
|
}>>, {
|
1511
1551
|
fixed: boolean | "right" | "left";
|
1512
1552
|
resizable: boolean;
|
@@ -1515,6 +1555,9 @@ declare const BkTable: {
|
|
1515
1555
|
columnKey: string;
|
1516
1556
|
colspan: import("./props").SpanFunctionString;
|
1517
1557
|
rowspan: import("./props").SpanFunctionString;
|
1558
|
+
uniqueId: {
|
1559
|
+
[key: string]: any;
|
1560
|
+
};
|
1518
1561
|
}, {}>;
|
1519
1562
|
}>;
|
1520
1563
|
export default BkTable;
|
package/lib/table/index.js
CHANGED
@@ -123,6 +123,94 @@ function defineProperty_defineProperty(obj, key, value) {
|
|
123
123
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
124
124
|
var external_vue_y = x => () => x
|
125
125
|
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, ["isProxy"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isProxy, ["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, ["toRaw"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRaw, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["watchEffect"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watchEffect });
|
126
|
+
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
|
127
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
128
|
+
/* harmony default export */ const esm_browser_native = ({
|
129
|
+
randomUUID
|
130
|
+
});
|
131
|
+
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
|
132
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
133
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
134
|
+
// generators (like Math.random()).
|
135
|
+
let getRandomValues;
|
136
|
+
const rnds8 = new Uint8Array(16);
|
137
|
+
function rng() {
|
138
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
139
|
+
if (!getRandomValues) {
|
140
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
141
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
142
|
+
|
143
|
+
if (!getRandomValues) {
|
144
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
return getRandomValues(rnds8);
|
149
|
+
}
|
150
|
+
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
|
151
|
+
|
152
|
+
/**
|
153
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
154
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
155
|
+
*/
|
156
|
+
|
157
|
+
const byteToHex = [];
|
158
|
+
|
159
|
+
for (let i = 0; i < 256; ++i) {
|
160
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
161
|
+
}
|
162
|
+
|
163
|
+
function unsafeStringify(arr, offset = 0) {
|
164
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
165
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
166
|
+
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]];
|
167
|
+
}
|
168
|
+
|
169
|
+
function stringify(arr, offset = 0) {
|
170
|
+
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
171
|
+
// of the following:
|
172
|
+
// - One or more input array values don't map to a hex octet (leading to
|
173
|
+
// "undefined" in the uuid)
|
174
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
175
|
+
|
176
|
+
if (!validate(uuid)) {
|
177
|
+
throw TypeError('Stringified UUID is invalid');
|
178
|
+
}
|
179
|
+
|
180
|
+
return uuid;
|
181
|
+
}
|
182
|
+
|
183
|
+
/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
|
184
|
+
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
function v4(options, buf, offset) {
|
190
|
+
if (esm_browser_native.randomUUID && !buf && !options) {
|
191
|
+
return esm_browser_native.randomUUID();
|
192
|
+
}
|
193
|
+
|
194
|
+
options = options || {};
|
195
|
+
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
196
|
+
|
197
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
198
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
199
|
+
|
200
|
+
if (buf) {
|
201
|
+
offset = offset || 0;
|
202
|
+
|
203
|
+
for (let i = 0; i < 16; ++i) {
|
204
|
+
buf[offset + i] = rnds[i];
|
205
|
+
}
|
206
|
+
|
207
|
+
return buf;
|
208
|
+
}
|
209
|
+
|
210
|
+
return unsafeStringify(rnds);
|
211
|
+
}
|
212
|
+
|
213
|
+
/* harmony default export */ const esm_browser_v4 = (v4);
|
126
214
|
;// CONCATENATED MODULE: ../../packages/table/src/const.ts
|
127
215
|
|
128
216
|
/*
|
@@ -670,6 +758,7 @@ var tableProps = {
|
|
670
758
|
|
671
759
|
|
672
760
|
|
761
|
+
|
673
762
|
var TableColumnProp = {
|
674
763
|
label: LabelFunctionStringType,
|
675
764
|
field: LabelFunctionStringType,
|
@@ -688,7 +777,10 @@ var TableColumnProp = {
|
|
688
777
|
align: TableAlign,
|
689
778
|
className: RowClassFunctionStringType,
|
690
779
|
prop: LabelFunctionStringType,
|
691
|
-
index: shared_namespaceObject.PropTypes.number.def(undefined)
|
780
|
+
index: shared_namespaceObject.PropTypes.number.def(undefined),
|
781
|
+
uniqueId: shared_namespaceObject.PropTypes.object.def({
|
782
|
+
val: ''
|
783
|
+
})
|
692
784
|
};
|
693
785
|
/* harmony default export */ const table_column = ((0,external_vue_namespaceObject.defineComponent)({
|
694
786
|
name: 'TableColumn',
|
@@ -729,6 +821,7 @@ var TableColumnProp = {
|
|
729
821
|
this.updateColumnDefine(true);
|
730
822
|
},
|
731
823
|
mounted: function mounted() {
|
824
|
+
this.setNodeUid();
|
732
825
|
this.updateColumnDefine();
|
733
826
|
},
|
734
827
|
updated: function updated() {
|
@@ -757,15 +850,35 @@ var TableColumnProp = {
|
|
757
850
|
rsolveIndexedColumn: function rsolveIndexedColumn() {
|
758
851
|
// 如果是设置了Index,则先添加Index列,不做自动递归读取Column
|
759
852
|
if (/\d+\.?\d*/.test("".concat(this.$props.index))) {
|
760
|
-
var
|
761
|
-
|
762
|
-
|
853
|
+
var _props$render;
|
854
|
+
var props = this.$.vnode.props;
|
855
|
+
var resolveProp = Object.assign({}, this.copyProps(props), {
|
856
|
+
field: props.prop || props.field,
|
857
|
+
render: (_props$render = props.render) !== null && _props$render !== void 0 ? _props$render : this.$slots["default"],
|
858
|
+
uniqueId: this.getNodeUid(this.$.ctx)
|
763
859
|
});
|
764
860
|
this.initColumns(resolveProp);
|
765
861
|
return false;
|
766
862
|
}
|
767
863
|
return true;
|
768
864
|
},
|
865
|
+
setNodeUid: function setNodeUid() {
|
866
|
+
var ctx = this.$.ctx;
|
867
|
+
if (ctx.uniqueId && !ctx.uniqueId.val) {
|
868
|
+
ctx.uniqueId.val = esm_browser_v4();
|
869
|
+
}
|
870
|
+
if (!ctx.uniqueId) {
|
871
|
+
Object.assign(ctx, {
|
872
|
+
uniqueId: {
|
873
|
+
val: esm_browser_v4()
|
874
|
+
}
|
875
|
+
});
|
876
|
+
}
|
877
|
+
},
|
878
|
+
getNodeUid: function getNodeUid(ctx) {
|
879
|
+
var _ctx$uniqueId;
|
880
|
+
return (_ctx$uniqueId = ctx.uniqueId) === null || _ctx$uniqueId === void 0 ? void 0 : _ctx$uniqueId.val;
|
881
|
+
},
|
769
882
|
updateColumnDefineByParent: function updateColumnDefineByParent() {
|
770
883
|
var _this = this;
|
771
884
|
if (!this.rsolveIndexedColumn()) {
|
@@ -773,7 +886,7 @@ var TableColumnProp = {
|
|
773
886
|
}
|
774
887
|
var fn = function fn() {
|
775
888
|
// @ts-ignore
|
776
|
-
var selfVnode = _this
|
889
|
+
var selfVnode = _this.$;
|
777
890
|
var getTableNode = function getTableNode(root) {
|
778
891
|
var _parentVnode$type;
|
779
892
|
if (root === document.body || !root) {
|
@@ -785,6 +898,9 @@ var TableColumnProp = {
|
|
785
898
|
}
|
786
899
|
return getTableNode(parentVnode);
|
787
900
|
};
|
901
|
+
var getNodeUid = function getNodeUid(node) {
|
902
|
+
return _this.getNodeUid(node.ctx);
|
903
|
+
};
|
788
904
|
var tableNode = getTableNode(selfVnode);
|
789
905
|
if (!tableNode) {
|
790
906
|
return;
|
@@ -797,12 +913,13 @@ var TableColumnProp = {
|
|
797
913
|
return null;
|
798
914
|
}
|
799
915
|
if (((_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.name) === 'TableColumn') {
|
800
|
-
var _node$children;
|
916
|
+
var _node$props$render, _node$children;
|
801
917
|
var resolveProp = Object.assign({
|
802
918
|
index: index
|
803
919
|
}, _this.copyProps(node.props), {
|
804
920
|
field: node.props.prop || node.props.field,
|
805
|
-
render: (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"]
|
921
|
+
render: (_node$props$render = node.props.render) !== null && _node$props$render !== void 0 ? _node$props$render : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"],
|
922
|
+
uniqueId: getNodeUid(node.ctx)
|
806
923
|
});
|
807
924
|
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
808
925
|
index = index + 1;
|
@@ -841,9 +958,12 @@ var TableColumnProp = {
|
|
841
958
|
}
|
842
959
|
},
|
843
960
|
unmountColumn: function unmountColumn() {
|
961
|
+
var _props$render2;
|
962
|
+
var props = this.$.vnode.props;
|
844
963
|
var resolveProp = Object.assign({}, this.copyProps(this.$props), {
|
845
|
-
field:
|
846
|
-
render: this.$slots["default"]
|
964
|
+
field: props.prop || props.field,
|
965
|
+
render: (_props$render2 = props.render) !== null && _props$render2 !== void 0 ? _props$render2 : this.$slots["default"],
|
966
|
+
uniqueId: this.getNodeUid(this.$.ctx)
|
847
967
|
});
|
848
968
|
this.initColumns(resolveProp, true);
|
849
969
|
}
|
@@ -2461,94 +2581,6 @@ var index = (function () {
|
|
2461
2581
|
|
2462
2582
|
/* harmony default export */ const ResizeObserver_es = (index);
|
2463
2583
|
|
2464
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
|
2465
|
-
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
2466
|
-
/* harmony default export */ const esm_browser_native = ({
|
2467
|
-
randomUUID
|
2468
|
-
});
|
2469
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
|
2470
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
2471
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
2472
|
-
// generators (like Math.random()).
|
2473
|
-
let getRandomValues;
|
2474
|
-
const rnds8 = new Uint8Array(16);
|
2475
|
-
function rng() {
|
2476
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
2477
|
-
if (!getRandomValues) {
|
2478
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
2479
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
2480
|
-
|
2481
|
-
if (!getRandomValues) {
|
2482
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
2483
|
-
}
|
2484
|
-
}
|
2485
|
-
|
2486
|
-
return getRandomValues(rnds8);
|
2487
|
-
}
|
2488
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
|
2489
|
-
|
2490
|
-
/**
|
2491
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
2492
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
2493
|
-
*/
|
2494
|
-
|
2495
|
-
const byteToHex = [];
|
2496
|
-
|
2497
|
-
for (let i = 0; i < 256; ++i) {
|
2498
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
2499
|
-
}
|
2500
|
-
|
2501
|
-
function unsafeStringify(arr, offset = 0) {
|
2502
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
2503
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
2504
|
-
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]];
|
2505
|
-
}
|
2506
|
-
|
2507
|
-
function stringify(arr, offset = 0) {
|
2508
|
-
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
2509
|
-
// of the following:
|
2510
|
-
// - One or more input array values don't map to a hex octet (leading to
|
2511
|
-
// "undefined" in the uuid)
|
2512
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
2513
|
-
|
2514
|
-
if (!validate(uuid)) {
|
2515
|
-
throw TypeError('Stringified UUID is invalid');
|
2516
|
-
}
|
2517
|
-
|
2518
|
-
return uuid;
|
2519
|
-
}
|
2520
|
-
|
2521
|
-
/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
|
2522
|
-
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
|
2523
|
-
|
2524
|
-
|
2525
|
-
|
2526
|
-
|
2527
|
-
function v4(options, buf, offset) {
|
2528
|
-
if (esm_browser_native.randomUUID && !buf && !options) {
|
2529
|
-
return esm_browser_native.randomUUID();
|
2530
|
-
}
|
2531
|
-
|
2532
|
-
options = options || {};
|
2533
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
2534
|
-
|
2535
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
2536
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
2537
|
-
|
2538
|
-
if (buf) {
|
2539
|
-
offset = offset || 0;
|
2540
|
-
|
2541
|
-
for (let i = 0; i < 16; ++i) {
|
2542
|
-
buf[offset + i] = rnds[i];
|
2543
|
-
}
|
2544
|
-
|
2545
|
-
return buf;
|
2546
|
-
}
|
2547
|
-
|
2548
|
-
return unsafeStringify(rnds);
|
2549
|
-
}
|
2550
|
-
|
2551
|
-
/* harmony default export */ const esm_browser_v4 = (v4);
|
2552
2584
|
;// CONCATENATED MODULE: ../../packages/table/src/utils.tsx
|
2553
2585
|
|
2554
2586
|
|
@@ -4135,7 +4167,7 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
4135
4167
|
if (!remove) {
|
4136
4168
|
resolveColumns.forEach(function (col) {
|
4137
4169
|
var index = targetColumns.findIndex(function (tc) {
|
4138
|
-
return tc.label === col.label && tc.field === col.field;
|
4170
|
+
return tc.label === col.label && tc.field === col.field && tc.uniqueId === col.uniqueId;
|
4139
4171
|
});
|
4140
4172
|
if (index >= 0) {
|
4141
4173
|
Object.assign(targetColumns[index], col);
|
@@ -4149,7 +4181,7 @@ var tableSchemaResponse = function tableSchemaResponse(props) {
|
|
4149
4181
|
} else {
|
4150
4182
|
resolveColumns.forEach(function (col) {
|
4151
4183
|
var matchColIndex = targetColumns.findIndex(function (c) {
|
4152
|
-
return c.label === col.label && c.field === col.field;
|
4184
|
+
return c.label === col.label && c.field === col.field && c.uniqueId === col.uniqueId;
|
4153
4185
|
});
|
4154
4186
|
if (matchColIndex >= 0) {
|
4155
4187
|
targetColumns.splice(matchColIndex, 1);
|