@antv/s2-vue 1.0.2 → 1.1.0-alpha.1
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.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/style.min.css +1 -1
- package/esm/index.d.ts +573 -180
- package/esm/index.js +810 -122
- package/esm/index.js.map +1 -1
- package/esm/style.css +57 -0
- package/lib/index.js +807 -119
- package/lib/index.js.map +1 -1
- package/lib/style.css +57 -0
- package/package.json +3 -2
package/lib/index.js
CHANGED
|
@@ -42,12 +42,12 @@ var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
|
42
42
|
var root$1 = root;
|
|
43
43
|
var Symbol$1 = root$1.Symbol;
|
|
44
44
|
var Symbol$2 = Symbol$1;
|
|
45
|
-
var objectProto$
|
|
46
|
-
var hasOwnProperty$
|
|
47
|
-
var nativeObjectToString$1 = objectProto$
|
|
45
|
+
var objectProto$f = Object.prototype;
|
|
46
|
+
var hasOwnProperty$c = objectProto$f.hasOwnProperty;
|
|
47
|
+
var nativeObjectToString$1 = objectProto$f.toString;
|
|
48
48
|
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
49
49
|
function getRawTag(value) {
|
|
50
|
-
var isOwn = hasOwnProperty$
|
|
50
|
+
var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
51
51
|
try {
|
|
52
52
|
value[symToStringTag$1] = void 0;
|
|
53
53
|
var unmasked = true;
|
|
@@ -63,8 +63,8 @@ function getRawTag(value) {
|
|
|
63
63
|
}
|
|
64
64
|
return result;
|
|
65
65
|
}
|
|
66
|
-
var objectProto$
|
|
67
|
-
var nativeObjectToString = objectProto$
|
|
66
|
+
var objectProto$e = Object.prototype;
|
|
67
|
+
var nativeObjectToString = objectProto$e.toString;
|
|
68
68
|
function objectToString(value) {
|
|
69
69
|
return nativeObjectToString.call(value);
|
|
70
70
|
}
|
|
@@ -79,9 +79,9 @@ function baseGetTag(value) {
|
|
|
79
79
|
function isObjectLike(value) {
|
|
80
80
|
return value != null && typeof value == "object";
|
|
81
81
|
}
|
|
82
|
-
var symbolTag$
|
|
82
|
+
var symbolTag$3 = "[object Symbol]";
|
|
83
83
|
function isSymbol(value) {
|
|
84
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$
|
|
84
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
|
|
85
85
|
}
|
|
86
86
|
function arrayMap(array, iteratee) {
|
|
87
87
|
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
@@ -93,7 +93,7 @@ function arrayMap(array, iteratee) {
|
|
|
93
93
|
var isArray = Array.isArray;
|
|
94
94
|
var isArray$1 = isArray;
|
|
95
95
|
var INFINITY$1 = 1 / 0;
|
|
96
|
-
var symbolProto$
|
|
96
|
+
var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
|
|
97
97
|
function baseToString(value) {
|
|
98
98
|
if (typeof value == "string") {
|
|
99
99
|
return value;
|
|
@@ -148,13 +148,13 @@ function toNumber(value) {
|
|
|
148
148
|
function identity(value) {
|
|
149
149
|
return value;
|
|
150
150
|
}
|
|
151
|
-
var asyncTag = "[object AsyncFunction]", funcTag$
|
|
151
|
+
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
152
152
|
function isFunction(value) {
|
|
153
153
|
if (!isObject(value)) {
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
156
|
var tag = baseGetTag(value);
|
|
157
|
-
return tag == funcTag$
|
|
157
|
+
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
158
158
|
}
|
|
159
159
|
var coreJsData = root$1["__core-js_shared__"];
|
|
160
160
|
var coreJsData$1 = coreJsData;
|
|
@@ -182,10 +182,10 @@ function toSource(func) {
|
|
|
182
182
|
}
|
|
183
183
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
184
184
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
185
|
-
var funcProto = Function.prototype, objectProto$
|
|
185
|
+
var funcProto = Function.prototype, objectProto$d = Object.prototype;
|
|
186
186
|
var funcToString = funcProto.toString;
|
|
187
|
-
var hasOwnProperty$
|
|
188
|
-
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$
|
|
187
|
+
var hasOwnProperty$b = objectProto$d.hasOwnProperty;
|
|
188
|
+
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
189
189
|
function baseIsNative(value) {
|
|
190
190
|
if (!isObject(value) || isMasked(value)) {
|
|
191
191
|
return false;
|
|
@@ -202,6 +202,50 @@ function getNative(object, key) {
|
|
|
202
202
|
}
|
|
203
203
|
var WeakMap = getNative(root$1, "WeakMap");
|
|
204
204
|
var WeakMap$1 = WeakMap;
|
|
205
|
+
var objectCreate = Object.create;
|
|
206
|
+
var baseCreate = function() {
|
|
207
|
+
function object() {
|
|
208
|
+
}
|
|
209
|
+
return function(proto) {
|
|
210
|
+
if (!isObject(proto)) {
|
|
211
|
+
return {};
|
|
212
|
+
}
|
|
213
|
+
if (objectCreate) {
|
|
214
|
+
return objectCreate(proto);
|
|
215
|
+
}
|
|
216
|
+
object.prototype = proto;
|
|
217
|
+
var result = new object();
|
|
218
|
+
object.prototype = void 0;
|
|
219
|
+
return result;
|
|
220
|
+
};
|
|
221
|
+
}();
|
|
222
|
+
var baseCreate$1 = baseCreate;
|
|
223
|
+
function copyArray(source, array) {
|
|
224
|
+
var index2 = -1, length = source.length;
|
|
225
|
+
array || (array = Array(length));
|
|
226
|
+
while (++index2 < length) {
|
|
227
|
+
array[index2] = source[index2];
|
|
228
|
+
}
|
|
229
|
+
return array;
|
|
230
|
+
}
|
|
231
|
+
var defineProperty = function() {
|
|
232
|
+
try {
|
|
233
|
+
var func = getNative(Object, "defineProperty");
|
|
234
|
+
func({}, "", {});
|
|
235
|
+
return func;
|
|
236
|
+
} catch (e) {
|
|
237
|
+
}
|
|
238
|
+
}();
|
|
239
|
+
var defineProperty$1 = defineProperty;
|
|
240
|
+
function arrayEach(array, iteratee) {
|
|
241
|
+
var index2 = -1, length = array == null ? 0 : array.length;
|
|
242
|
+
while (++index2 < length) {
|
|
243
|
+
if (iteratee(array[index2], index2, array) === false) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return array;
|
|
248
|
+
}
|
|
205
249
|
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
206
250
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
207
251
|
function isIndex(value, length) {
|
|
@@ -209,9 +253,47 @@ function isIndex(value, length) {
|
|
|
209
253
|
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
210
254
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
211
255
|
}
|
|
256
|
+
function baseAssignValue(object, key, value) {
|
|
257
|
+
if (key == "__proto__" && defineProperty$1) {
|
|
258
|
+
defineProperty$1(object, key, {
|
|
259
|
+
"configurable": true,
|
|
260
|
+
"enumerable": true,
|
|
261
|
+
"value": value,
|
|
262
|
+
"writable": true
|
|
263
|
+
});
|
|
264
|
+
} else {
|
|
265
|
+
object[key] = value;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
212
268
|
function eq(value, other) {
|
|
213
269
|
return value === other || value !== value && other !== other;
|
|
214
270
|
}
|
|
271
|
+
var objectProto$c = Object.prototype;
|
|
272
|
+
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
273
|
+
function assignValue(object, key, value) {
|
|
274
|
+
var objValue = object[key];
|
|
275
|
+
if (!(hasOwnProperty$a.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
276
|
+
baseAssignValue(object, key, value);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function copyObject(source, props, object, customizer) {
|
|
280
|
+
var isNew = !object;
|
|
281
|
+
object || (object = {});
|
|
282
|
+
var index2 = -1, length = props.length;
|
|
283
|
+
while (++index2 < length) {
|
|
284
|
+
var key = props[index2];
|
|
285
|
+
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
|
|
286
|
+
if (newValue === void 0) {
|
|
287
|
+
newValue = source[key];
|
|
288
|
+
}
|
|
289
|
+
if (isNew) {
|
|
290
|
+
baseAssignValue(object, key, newValue);
|
|
291
|
+
} else {
|
|
292
|
+
assignValue(object, key, newValue);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return object;
|
|
296
|
+
}
|
|
215
297
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
216
298
|
function isLength(value) {
|
|
217
299
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
@@ -219,9 +301,9 @@ function isLength(value) {
|
|
|
219
301
|
function isArrayLike(value) {
|
|
220
302
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
221
303
|
}
|
|
222
|
-
var objectProto$
|
|
304
|
+
var objectProto$b = Object.prototype;
|
|
223
305
|
function isPrototype(value) {
|
|
224
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$
|
|
306
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$b;
|
|
225
307
|
return value === proto;
|
|
226
308
|
}
|
|
227
309
|
function baseTimes(n, iteratee) {
|
|
@@ -231,34 +313,34 @@ function baseTimes(n, iteratee) {
|
|
|
231
313
|
}
|
|
232
314
|
return result;
|
|
233
315
|
}
|
|
234
|
-
var argsTag$
|
|
316
|
+
var argsTag$3 = "[object Arguments]";
|
|
235
317
|
function baseIsArguments(value) {
|
|
236
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag$
|
|
318
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$3;
|
|
237
319
|
}
|
|
238
|
-
var objectProto$
|
|
239
|
-
var hasOwnProperty$
|
|
240
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
320
|
+
var objectProto$a = Object.prototype;
|
|
321
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
322
|
+
var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
|
|
241
323
|
var isArguments = baseIsArguments(function() {
|
|
242
324
|
return arguments;
|
|
243
325
|
}()) ? baseIsArguments : function(value) {
|
|
244
|
-
return isObjectLike(value) && hasOwnProperty$
|
|
326
|
+
return isObjectLike(value) && hasOwnProperty$9.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
245
327
|
};
|
|
246
328
|
var isArguments$1 = isArguments;
|
|
247
329
|
function stubFalse() {
|
|
248
330
|
return false;
|
|
249
331
|
}
|
|
250
|
-
var freeExports$
|
|
251
|
-
var freeModule$
|
|
252
|
-
var moduleExports$
|
|
253
|
-
var Buffer = moduleExports$
|
|
254
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
|
|
332
|
+
var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
333
|
+
var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
|
|
334
|
+
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
335
|
+
var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0;
|
|
336
|
+
var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
|
|
255
337
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
256
338
|
var isBuffer$1 = isBuffer;
|
|
257
|
-
var argsTag$
|
|
258
|
-
var arrayBufferTag$
|
|
339
|
+
var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$4 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$7 = "[object Map]", numberTag$3 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$7 = "[object Set]", stringTag$4 = "[object String]", weakMapTag$2 = "[object WeakMap]";
|
|
340
|
+
var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
|
|
259
341
|
var typedArrayTags = {};
|
|
260
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
261
|
-
typedArrayTags[argsTag$
|
|
342
|
+
typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
|
|
343
|
+
typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$4] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$7] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$7] = typedArrayTags[stringTag$4] = typedArrayTags[weakMapTag$2] = false;
|
|
262
344
|
function baseIsTypedArray(value) {
|
|
263
345
|
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
264
346
|
}
|
|
@@ -267,13 +349,13 @@ function baseUnary(func) {
|
|
|
267
349
|
return func(value);
|
|
268
350
|
};
|
|
269
351
|
}
|
|
270
|
-
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
271
|
-
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
272
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
273
|
-
var freeProcess = moduleExports && freeGlobal$1.process;
|
|
352
|
+
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
353
|
+
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
354
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
355
|
+
var freeProcess = moduleExports$1 && freeGlobal$1.process;
|
|
274
356
|
var nodeUtil = function() {
|
|
275
357
|
try {
|
|
276
|
-
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
358
|
+
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
|
|
277
359
|
if (types) {
|
|
278
360
|
return types;
|
|
279
361
|
}
|
|
@@ -285,12 +367,12 @@ var nodeUtil$1 = nodeUtil;
|
|
|
285
367
|
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
286
368
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
287
369
|
var isTypedArray$1 = isTypedArray;
|
|
288
|
-
var objectProto$
|
|
289
|
-
var hasOwnProperty$
|
|
370
|
+
var objectProto$9 = Object.prototype;
|
|
371
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
290
372
|
function arrayLikeKeys(value, inherited) {
|
|
291
373
|
var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
292
374
|
for (var key in value) {
|
|
293
|
-
if ((inherited || hasOwnProperty$
|
|
375
|
+
if ((inherited || hasOwnProperty$8.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
|
|
294
376
|
result.push(key);
|
|
295
377
|
}
|
|
296
378
|
}
|
|
@@ -303,15 +385,15 @@ function overArg(func, transform) {
|
|
|
303
385
|
}
|
|
304
386
|
var nativeKeys = overArg(Object.keys, Object);
|
|
305
387
|
var nativeKeys$1 = nativeKeys;
|
|
306
|
-
var objectProto$
|
|
307
|
-
var hasOwnProperty$
|
|
388
|
+
var objectProto$8 = Object.prototype;
|
|
389
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
308
390
|
function baseKeys(object) {
|
|
309
391
|
if (!isPrototype(object)) {
|
|
310
392
|
return nativeKeys$1(object);
|
|
311
393
|
}
|
|
312
394
|
var result = [];
|
|
313
395
|
for (var key in Object(object)) {
|
|
314
|
-
if (hasOwnProperty$
|
|
396
|
+
if (hasOwnProperty$7.call(object, key) && key != "constructor") {
|
|
315
397
|
result.push(key);
|
|
316
398
|
}
|
|
317
399
|
}
|
|
@@ -320,6 +402,32 @@ function baseKeys(object) {
|
|
|
320
402
|
function keys(object) {
|
|
321
403
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
322
404
|
}
|
|
405
|
+
function nativeKeysIn(object) {
|
|
406
|
+
var result = [];
|
|
407
|
+
if (object != null) {
|
|
408
|
+
for (var key in Object(object)) {
|
|
409
|
+
result.push(key);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
return result;
|
|
413
|
+
}
|
|
414
|
+
var objectProto$7 = Object.prototype;
|
|
415
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
416
|
+
function baseKeysIn(object) {
|
|
417
|
+
if (!isObject(object)) {
|
|
418
|
+
return nativeKeysIn(object);
|
|
419
|
+
}
|
|
420
|
+
var isProto = isPrototype(object), result = [];
|
|
421
|
+
for (var key in object) {
|
|
422
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty$6.call(object, key)))) {
|
|
423
|
+
result.push(key);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return result;
|
|
427
|
+
}
|
|
428
|
+
function keysIn(object) {
|
|
429
|
+
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
430
|
+
}
|
|
323
431
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
324
432
|
function isKey(value, object) {
|
|
325
433
|
if (isArray$1(value)) {
|
|
@@ -343,21 +451,21 @@ function hashDelete(key) {
|
|
|
343
451
|
return result;
|
|
344
452
|
}
|
|
345
453
|
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
346
|
-
var objectProto$
|
|
347
|
-
var hasOwnProperty$
|
|
454
|
+
var objectProto$6 = Object.prototype;
|
|
455
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
348
456
|
function hashGet(key) {
|
|
349
457
|
var data = this.__data__;
|
|
350
458
|
if (nativeCreate$1) {
|
|
351
459
|
var result = data[key];
|
|
352
460
|
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
353
461
|
}
|
|
354
|
-
return hasOwnProperty$
|
|
462
|
+
return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
|
|
355
463
|
}
|
|
356
|
-
var objectProto$
|
|
357
|
-
var hasOwnProperty$
|
|
464
|
+
var objectProto$5 = Object.prototype;
|
|
465
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
358
466
|
function hashHas(key) {
|
|
359
467
|
var data = this.__data__;
|
|
360
|
-
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$
|
|
468
|
+
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
|
|
361
469
|
}
|
|
362
470
|
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
363
471
|
function hashSet(key, value) {
|
|
@@ -564,6 +672,8 @@ function arrayPush(array, values) {
|
|
|
564
672
|
}
|
|
565
673
|
return array;
|
|
566
674
|
}
|
|
675
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
676
|
+
var getPrototype$1 = getPrototype;
|
|
567
677
|
var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
|
|
568
678
|
var rsZWJ$1 = "\\u200d";
|
|
569
679
|
var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
|
|
@@ -620,6 +730,24 @@ Stack.prototype["delete"] = stackDelete;
|
|
|
620
730
|
Stack.prototype.get = stackGet;
|
|
621
731
|
Stack.prototype.has = stackHas;
|
|
622
732
|
Stack.prototype.set = stackSet;
|
|
733
|
+
function baseAssign(object, source) {
|
|
734
|
+
return object && copyObject(source, keys(source), object);
|
|
735
|
+
}
|
|
736
|
+
function baseAssignIn(object, source) {
|
|
737
|
+
return object && copyObject(source, keysIn(source), object);
|
|
738
|
+
}
|
|
739
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
740
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
741
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
742
|
+
var Buffer = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
|
|
743
|
+
function cloneBuffer(buffer, isDeep) {
|
|
744
|
+
if (isDeep) {
|
|
745
|
+
return buffer.slice();
|
|
746
|
+
}
|
|
747
|
+
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
748
|
+
buffer.copy(result);
|
|
749
|
+
return result;
|
|
750
|
+
}
|
|
623
751
|
function arrayFilter(array, predicate) {
|
|
624
752
|
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
625
753
|
while (++index2 < length) {
|
|
@@ -633,19 +761,35 @@ function arrayFilter(array, predicate) {
|
|
|
633
761
|
function stubArray() {
|
|
634
762
|
return [];
|
|
635
763
|
}
|
|
636
|
-
var objectProto$
|
|
637
|
-
var propertyIsEnumerable = objectProto$
|
|
638
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
639
|
-
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
764
|
+
var objectProto$4 = Object.prototype;
|
|
765
|
+
var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
|
|
766
|
+
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
767
|
+
var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
|
|
640
768
|
if (object == null) {
|
|
641
769
|
return [];
|
|
642
770
|
}
|
|
643
771
|
object = Object(object);
|
|
644
|
-
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
772
|
+
return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
|
|
645
773
|
return propertyIsEnumerable.call(object, symbol);
|
|
646
774
|
});
|
|
647
775
|
};
|
|
648
776
|
var getSymbols$1 = getSymbols;
|
|
777
|
+
function copySymbols(source, object) {
|
|
778
|
+
return copyObject(source, getSymbols$1(source), object);
|
|
779
|
+
}
|
|
780
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
781
|
+
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
782
|
+
var result = [];
|
|
783
|
+
while (object) {
|
|
784
|
+
arrayPush(result, getSymbols$1(object));
|
|
785
|
+
object = getPrototype$1(object);
|
|
786
|
+
}
|
|
787
|
+
return result;
|
|
788
|
+
};
|
|
789
|
+
var getSymbolsIn$1 = getSymbolsIn;
|
|
790
|
+
function copySymbolsIn(source, object) {
|
|
791
|
+
return copyObject(source, getSymbolsIn$1(source), object);
|
|
792
|
+
}
|
|
649
793
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
650
794
|
var result = keysFunc(object);
|
|
651
795
|
return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
@@ -653,39 +797,197 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
|
653
797
|
function getAllKeys(object) {
|
|
654
798
|
return baseGetAllKeys(object, keys, getSymbols$1);
|
|
655
799
|
}
|
|
800
|
+
function getAllKeysIn(object) {
|
|
801
|
+
return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
|
|
802
|
+
}
|
|
656
803
|
var DataView = getNative(root$1, "DataView");
|
|
657
804
|
var DataView$1 = DataView;
|
|
658
805
|
var Promise$1 = getNative(root$1, "Promise");
|
|
659
806
|
var Promise$2 = Promise$1;
|
|
660
807
|
var Set = getNative(root$1, "Set");
|
|
661
808
|
var Set$1 = Set;
|
|
662
|
-
var mapTag$
|
|
663
|
-
var dataViewTag$
|
|
809
|
+
var mapTag$6 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$6 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
810
|
+
var dataViewTag$3 = "[object DataView]";
|
|
664
811
|
var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
|
|
665
812
|
var getTag = baseGetTag;
|
|
666
|
-
if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$
|
|
813
|
+
if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$6 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$6 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) {
|
|
667
814
|
getTag = function(value) {
|
|
668
|
-
var result = baseGetTag(value), Ctor = result == objectTag$
|
|
815
|
+
var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
669
816
|
if (ctorString) {
|
|
670
817
|
switch (ctorString) {
|
|
671
818
|
case dataViewCtorString:
|
|
672
|
-
return dataViewTag$
|
|
819
|
+
return dataViewTag$3;
|
|
673
820
|
case mapCtorString:
|
|
674
|
-
return mapTag$
|
|
821
|
+
return mapTag$6;
|
|
675
822
|
case promiseCtorString:
|
|
676
823
|
return promiseTag;
|
|
677
824
|
case setCtorString:
|
|
678
|
-
return setTag$
|
|
825
|
+
return setTag$6;
|
|
679
826
|
case weakMapCtorString:
|
|
680
|
-
return weakMapTag;
|
|
827
|
+
return weakMapTag$1;
|
|
681
828
|
}
|
|
682
829
|
}
|
|
683
830
|
return result;
|
|
684
831
|
};
|
|
685
832
|
}
|
|
686
833
|
var getTag$1 = getTag;
|
|
834
|
+
var objectProto$3 = Object.prototype;
|
|
835
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
836
|
+
function initCloneArray(array) {
|
|
837
|
+
var length = array.length, result = new array.constructor(length);
|
|
838
|
+
if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
|
|
839
|
+
result.index = array.index;
|
|
840
|
+
result.input = array.input;
|
|
841
|
+
}
|
|
842
|
+
return result;
|
|
843
|
+
}
|
|
687
844
|
var Uint8Array = root$1.Uint8Array;
|
|
688
845
|
var Uint8Array$1 = Uint8Array;
|
|
846
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
847
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
848
|
+
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
849
|
+
return result;
|
|
850
|
+
}
|
|
851
|
+
function cloneDataView(dataView, isDeep) {
|
|
852
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
853
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
854
|
+
}
|
|
855
|
+
var reFlags = /\w*$/;
|
|
856
|
+
function cloneRegExp(regexp) {
|
|
857
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
858
|
+
result.lastIndex = regexp.lastIndex;
|
|
859
|
+
return result;
|
|
860
|
+
}
|
|
861
|
+
var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
|
|
862
|
+
function cloneSymbol(symbol) {
|
|
863
|
+
return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
|
|
864
|
+
}
|
|
865
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
866
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
867
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
868
|
+
}
|
|
869
|
+
var boolTag$3 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$5 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", symbolTag$2 = "[object Symbol]";
|
|
870
|
+
var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
|
|
871
|
+
function initCloneByTag(object, tag, isDeep) {
|
|
872
|
+
var Ctor = object.constructor;
|
|
873
|
+
switch (tag) {
|
|
874
|
+
case arrayBufferTag$2:
|
|
875
|
+
return cloneArrayBuffer(object);
|
|
876
|
+
case boolTag$3:
|
|
877
|
+
case dateTag$2:
|
|
878
|
+
return new Ctor(+object);
|
|
879
|
+
case dataViewTag$2:
|
|
880
|
+
return cloneDataView(object, isDeep);
|
|
881
|
+
case float32Tag$1:
|
|
882
|
+
case float64Tag$1:
|
|
883
|
+
case int8Tag$1:
|
|
884
|
+
case int16Tag$1:
|
|
885
|
+
case int32Tag$1:
|
|
886
|
+
case uint8Tag$1:
|
|
887
|
+
case uint8ClampedTag$1:
|
|
888
|
+
case uint16Tag$1:
|
|
889
|
+
case uint32Tag$1:
|
|
890
|
+
return cloneTypedArray(object, isDeep);
|
|
891
|
+
case mapTag$5:
|
|
892
|
+
return new Ctor();
|
|
893
|
+
case numberTag$2:
|
|
894
|
+
case stringTag$3:
|
|
895
|
+
return new Ctor(object);
|
|
896
|
+
case regexpTag$2:
|
|
897
|
+
return cloneRegExp(object);
|
|
898
|
+
case setTag$5:
|
|
899
|
+
return new Ctor();
|
|
900
|
+
case symbolTag$2:
|
|
901
|
+
return cloneSymbol(object);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
function initCloneObject(object) {
|
|
905
|
+
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
|
|
906
|
+
}
|
|
907
|
+
var mapTag$4 = "[object Map]";
|
|
908
|
+
function baseIsMap(value) {
|
|
909
|
+
return isObjectLike(value) && getTag$1(value) == mapTag$4;
|
|
910
|
+
}
|
|
911
|
+
var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
|
|
912
|
+
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
913
|
+
var isMap$1 = isMap;
|
|
914
|
+
var setTag$4 = "[object Set]";
|
|
915
|
+
function baseIsSet(value) {
|
|
916
|
+
return isObjectLike(value) && getTag$1(value) == setTag$4;
|
|
917
|
+
}
|
|
918
|
+
var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
|
|
919
|
+
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
920
|
+
var isSet$1 = isSet;
|
|
921
|
+
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
|
|
922
|
+
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$3 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
|
|
923
|
+
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
924
|
+
var cloneableTags = {};
|
|
925
|
+
cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$2] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$3] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$3] = cloneableTags[stringTag$2] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
926
|
+
cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
927
|
+
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
928
|
+
var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
|
|
929
|
+
if (customizer) {
|
|
930
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
931
|
+
}
|
|
932
|
+
if (result !== void 0) {
|
|
933
|
+
return result;
|
|
934
|
+
}
|
|
935
|
+
if (!isObject(value)) {
|
|
936
|
+
return value;
|
|
937
|
+
}
|
|
938
|
+
var isArr = isArray$1(value);
|
|
939
|
+
if (isArr) {
|
|
940
|
+
result = initCloneArray(value);
|
|
941
|
+
if (!isDeep) {
|
|
942
|
+
return copyArray(value, result);
|
|
943
|
+
}
|
|
944
|
+
} else {
|
|
945
|
+
var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
|
|
946
|
+
if (isBuffer$1(value)) {
|
|
947
|
+
return cloneBuffer(value, isDeep);
|
|
948
|
+
}
|
|
949
|
+
if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
|
|
950
|
+
result = isFlat || isFunc ? {} : initCloneObject(value);
|
|
951
|
+
if (!isDeep) {
|
|
952
|
+
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
|
|
953
|
+
}
|
|
954
|
+
} else {
|
|
955
|
+
if (!cloneableTags[tag]) {
|
|
956
|
+
return object ? value : {};
|
|
957
|
+
}
|
|
958
|
+
result = initCloneByTag(value, tag, isDeep);
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
stack || (stack = new Stack());
|
|
962
|
+
var stacked = stack.get(value);
|
|
963
|
+
if (stacked) {
|
|
964
|
+
return stacked;
|
|
965
|
+
}
|
|
966
|
+
stack.set(value, result);
|
|
967
|
+
if (isSet$1(value)) {
|
|
968
|
+
value.forEach(function(subValue) {
|
|
969
|
+
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
970
|
+
});
|
|
971
|
+
} else if (isMap$1(value)) {
|
|
972
|
+
value.forEach(function(subValue, key2) {
|
|
973
|
+
result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
|
|
977
|
+
var props = isArr ? void 0 : keysFunc(value);
|
|
978
|
+
arrayEach(props || value, function(subValue, key2) {
|
|
979
|
+
if (props) {
|
|
980
|
+
key2 = subValue;
|
|
981
|
+
subValue = value[key2];
|
|
982
|
+
}
|
|
983
|
+
assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
984
|
+
});
|
|
985
|
+
return result;
|
|
986
|
+
}
|
|
987
|
+
var CLONE_SYMBOLS_FLAG = 4;
|
|
988
|
+
function clone(value) {
|
|
989
|
+
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
|
990
|
+
}
|
|
689
991
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
690
992
|
function setCacheAdd(value) {
|
|
691
993
|
this.__data__.set(value, HASH_UNDEFINED);
|
|
@@ -1152,6 +1454,19 @@ function debounce(func, wait, options) {
|
|
|
1152
1454
|
debounced.flush = flush;
|
|
1153
1455
|
return debounced;
|
|
1154
1456
|
}
|
|
1457
|
+
function baseFilter(collection, predicate) {
|
|
1458
|
+
var result = [];
|
|
1459
|
+
baseEach$1(collection, function(value, index2, collection2) {
|
|
1460
|
+
if (predicate(value, index2, collection2)) {
|
|
1461
|
+
result.push(value);
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1464
|
+
return result;
|
|
1465
|
+
}
|
|
1466
|
+
function filter(collection, predicate) {
|
|
1467
|
+
var func = isArray$1(collection) ? arrayFilter : baseFilter;
|
|
1468
|
+
return func(collection, baseIteratee(predicate));
|
|
1469
|
+
}
|
|
1155
1470
|
var stringTag = "[object String]";
|
|
1156
1471
|
function isString(value) {
|
|
1157
1472
|
return typeof value == "string" || !isArray$1(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
@@ -1248,20 +1563,20 @@ const createResizeObserver = (params) => {
|
|
|
1248
1563
|
if (!actualWrapper || !container || !adaptive || !s22) {
|
|
1249
1564
|
return;
|
|
1250
1565
|
}
|
|
1251
|
-
const
|
|
1566
|
+
const render2 = (width, height) => {
|
|
1252
1567
|
s22 == null ? void 0 : s22.changeSheetSize(width, height);
|
|
1253
1568
|
s22 == null ? void 0 : s22.render(false);
|
|
1254
1569
|
};
|
|
1255
|
-
const debounceRender = debounce(
|
|
1570
|
+
const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
|
|
1256
1571
|
const onResize = () => {
|
|
1257
|
-
const { clientWidth:
|
|
1258
|
-
const width = adaptiveWidth ? Math.floor(
|
|
1259
|
-
const height = adaptiveHeight ? Math.floor(
|
|
1572
|
+
const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
|
|
1573
|
+
const width = adaptiveWidth ? Math.floor(containerWidth != null ? containerWidth : s22.options.width) : s22.options.width;
|
|
1574
|
+
const height = adaptiveHeight ? Math.floor(containerHeight != null ? containerHeight : s22.options.height) : s22.options.height;
|
|
1260
1575
|
if (!adaptiveWidth && !adaptiveHeight) {
|
|
1261
1576
|
return;
|
|
1262
1577
|
}
|
|
1263
1578
|
if (isFirstRender) {
|
|
1264
|
-
|
|
1579
|
+
render2(width, height);
|
|
1265
1580
|
isFirstRender = false;
|
|
1266
1581
|
return;
|
|
1267
1582
|
}
|
|
@@ -1279,6 +1594,99 @@ const createResizeObserver = (params) => {
|
|
|
1279
1594
|
resizeObserver.unobserve(actualWrapper);
|
|
1280
1595
|
};
|
|
1281
1596
|
};
|
|
1597
|
+
const getDrillDownCache = (spreadsheet, meta) => {
|
|
1598
|
+
const drillDownDataCache = spreadsheet.store.get("drillDownDataCache", []);
|
|
1599
|
+
const cache = drillDownDataCache.find((dc) => dc.rowId === meta.id);
|
|
1600
|
+
return {
|
|
1601
|
+
drillDownDataCache,
|
|
1602
|
+
drillDownCurrentCache: cache
|
|
1603
|
+
};
|
|
1604
|
+
};
|
|
1605
|
+
const handleActionIconClick = (params) => {
|
|
1606
|
+
const { meta, event, callback } = params;
|
|
1607
|
+
const { spreadsheet } = meta;
|
|
1608
|
+
spreadsheet.store.set("drillDownNode", meta);
|
|
1609
|
+
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
|
|
1610
|
+
const cache = (drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField) ? [drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField] : [];
|
|
1611
|
+
const disabled = [];
|
|
1612
|
+
drillDownDataCache.forEach((val) => {
|
|
1613
|
+
if (meta.id.includes(val.rowId) && meta.id !== val.rowId) {
|
|
1614
|
+
disabled.push(val.drillField);
|
|
1615
|
+
}
|
|
1616
|
+
});
|
|
1617
|
+
if (event) {
|
|
1618
|
+
spreadsheet.emit(s2.S2Event.GLOBAL_ACTION_ICON_CLICK, event);
|
|
1619
|
+
}
|
|
1620
|
+
callback({
|
|
1621
|
+
sheetInstance: spreadsheet,
|
|
1622
|
+
cacheDrillFields: cache,
|
|
1623
|
+
disabledFields: disabled,
|
|
1624
|
+
event
|
|
1625
|
+
});
|
|
1626
|
+
};
|
|
1627
|
+
const defaultDisplayCondition = (meta) => {
|
|
1628
|
+
const iconLevel = get(meta, "spreadsheet.dataCfg.fields.rows.length") - 1;
|
|
1629
|
+
return iconLevel <= meta.level && meta.spreadsheet.options.hierarchyType === "tree" && meta.spreadsheet.isValueInCols() && meta.label !== s2.i18n("\u603B\u8BA1");
|
|
1630
|
+
};
|
|
1631
|
+
const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
1632
|
+
var _a;
|
|
1633
|
+
const nextHeaderIcons = ((_a = options.headerActionIcons) == null ? void 0 : _a.length) ? [...options.headerActionIcons] : [];
|
|
1634
|
+
if (!isEmpty(partDrillDown)) {
|
|
1635
|
+
const drillDownActionIcon = {
|
|
1636
|
+
belongsCell: "rowCell",
|
|
1637
|
+
iconNames: ["DrillDownIcon"],
|
|
1638
|
+
defaultHide: true,
|
|
1639
|
+
displayCondition: partDrillDown.displayCondition || defaultDisplayCondition,
|
|
1640
|
+
action: (actionIconProps) => {
|
|
1641
|
+
const { iconName, meta, event } = actionIconProps;
|
|
1642
|
+
if (iconName === "DrillDownIcon") {
|
|
1643
|
+
meta.spreadsheet.store.set("drillDownNode", meta);
|
|
1644
|
+
handleActionIconClick({
|
|
1645
|
+
meta,
|
|
1646
|
+
event,
|
|
1647
|
+
callback
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
};
|
|
1652
|
+
nextHeaderIcons.push(drillDownActionIcon);
|
|
1653
|
+
}
|
|
1654
|
+
return __spreadProps(__spreadValues({}, options), {
|
|
1655
|
+
headerActionIcons: nextHeaderIcons
|
|
1656
|
+
});
|
|
1657
|
+
};
|
|
1658
|
+
const handleDrillDown = (params) => {
|
|
1659
|
+
const { fetchData, spreadsheet, drillFields, drillItemsNum } = params;
|
|
1660
|
+
if (drillItemsNum) {
|
|
1661
|
+
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1662
|
+
}
|
|
1663
|
+
const meta = spreadsheet.store.get("drillDownNode");
|
|
1664
|
+
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
|
|
1665
|
+
let newDrillDownDataCache = clone(drillDownDataCache);
|
|
1666
|
+
if (drillDownCurrentCache) {
|
|
1667
|
+
newDrillDownDataCache = filter(drillDownDataCache, (cache) => cache.rowId !== meta.id);
|
|
1668
|
+
}
|
|
1669
|
+
if (!fetchData) {
|
|
1670
|
+
return;
|
|
1671
|
+
}
|
|
1672
|
+
fetchData(meta, drillFields).then((info) => {
|
|
1673
|
+
const { drillData, drillField } = info;
|
|
1674
|
+
spreadsheet.dataSet.transformDrillDownData(drillField, drillData, meta);
|
|
1675
|
+
if (!isEmpty(drillData)) {
|
|
1676
|
+
const drillLevel = meta.level + 1;
|
|
1677
|
+
const newDrillDownData = {
|
|
1678
|
+
rowId: meta.id,
|
|
1679
|
+
drillLevel,
|
|
1680
|
+
drillData,
|
|
1681
|
+
drillField
|
|
1682
|
+
};
|
|
1683
|
+
newDrillDownDataCache.push(newDrillDownData);
|
|
1684
|
+
spreadsheet.store.set("drillDownDataCache", newDrillDownDataCache);
|
|
1685
|
+
}
|
|
1686
|
+
spreadsheet.interaction.reset();
|
|
1687
|
+
spreadsheet.render(false);
|
|
1688
|
+
});
|
|
1689
|
+
};
|
|
1282
1690
|
const EN_US = {
|
|
1283
1691
|
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
|
|
1284
1692
|
\u5207\u6362\u6307\u6807: "Switch indicator",
|
|
@@ -1312,7 +1720,10 @@ const EN_US = {
|
|
|
1312
1720
|
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
|
|
1313
1721
|
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
|
|
1314
1722
|
\u64CD\u4F5C\u6210\u529F: "Operation successful",
|
|
1315
|
-
\u64CD\u4F5C\u5931\u8D25: "Operation failed"
|
|
1723
|
+
\u64CD\u4F5C\u5931\u8D25: "Operation failed",
|
|
1724
|
+
\u65F6\u95F4: "Date",
|
|
1725
|
+
\u6307\u6807: "Measure",
|
|
1726
|
+
\u76EE\u6807\u503C: "Target Value"
|
|
1316
1727
|
};
|
|
1317
1728
|
const ZH_CN = {
|
|
1318
1729
|
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
|
|
@@ -1347,12 +1758,16 @@ const ZH_CN = {
|
|
|
1347
1758
|
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
|
|
1348
1759
|
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
|
|
1349
1760
|
\u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
|
|
1350
|
-
\u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25"
|
|
1761
|
+
\u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25",
|
|
1762
|
+
\u65F6\u95F4: "\u65F6\u95F4",
|
|
1763
|
+
\u6307\u6807: "\u6307\u6807",
|
|
1764
|
+
\u76EE\u6807\u503C: "\u76EE\u6807\u503C"
|
|
1351
1765
|
};
|
|
1352
1766
|
const Locale = {
|
|
1353
1767
|
zh_CN: ZH_CN,
|
|
1354
1768
|
en_US: EN_US
|
|
1355
1769
|
};
|
|
1770
|
+
const DRILL_DOWN_PRE_CLASS = "s2-drill-down";
|
|
1356
1771
|
s2.extendLocale(Locale);
|
|
1357
1772
|
const useExpose = (expose) => {
|
|
1358
1773
|
const s2Ref = vue.shallowRef();
|
|
@@ -1438,7 +1853,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
1438
1853
|
return target;
|
|
1439
1854
|
};
|
|
1440
1855
|
const PRE_CLASS = `${s2.S2_PREFIX_CLS}-pagination`;
|
|
1441
|
-
const _sfc_main$
|
|
1856
|
+
const _sfc_main$e = vue.defineComponent({
|
|
1442
1857
|
name: "s2-pagination",
|
|
1443
1858
|
props: {
|
|
1444
1859
|
current: {
|
|
@@ -1469,7 +1884,7 @@ const _sfc_main$d = vue.defineComponent({
|
|
|
1469
1884
|
AntDPagination: antDesignVue.Pagination
|
|
1470
1885
|
}
|
|
1471
1886
|
});
|
|
1472
|
-
function _sfc_render$
|
|
1887
|
+
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1473
1888
|
const _component_AntDPagination = vue.resolveComponent("AntDPagination");
|
|
1474
1889
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1475
1890
|
class: vue.normalizeClass(_ctx.PRE_CLASS)
|
|
@@ -1490,8 +1905,8 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1490
1905
|
}, vue.toDisplayString(_ctx.i18n("\u5171\u8BA1")) + " " + vue.toDisplayString(_ctx.total || " - ") + " " + vue.toDisplayString(_ctx.i18n("\u6761")), 3)
|
|
1491
1906
|
], 2);
|
|
1492
1907
|
}
|
|
1493
|
-
var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1494
|
-
const _sfc_main$
|
|
1908
|
+
var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
|
|
1909
|
+
const _sfc_main$d = vue.defineComponent({
|
|
1495
1910
|
name: "TooltipDetail",
|
|
1496
1911
|
props: ["list"],
|
|
1497
1912
|
setup() {
|
|
@@ -1500,7 +1915,7 @@ const _sfc_main$c = vue.defineComponent({
|
|
|
1500
1915
|
};
|
|
1501
1916
|
}
|
|
1502
1917
|
});
|
|
1503
|
-
function _sfc_render$
|
|
1918
|
+
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1504
1919
|
return vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => {
|
|
1505
1920
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1506
1921
|
key: `${item.value}-${index2}`,
|
|
@@ -1519,8 +1934,8 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1519
1934
|
], 2);
|
|
1520
1935
|
}), 128);
|
|
1521
1936
|
}
|
|
1522
|
-
var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1523
|
-
const _sfc_main$
|
|
1937
|
+
var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
|
|
1938
|
+
const _sfc_main$c = vue.defineComponent({
|
|
1524
1939
|
name: "TooltipHeadInfo",
|
|
1525
1940
|
props: ["rows", "cols"],
|
|
1526
1941
|
setup() {
|
|
@@ -1530,8 +1945,8 @@ const _sfc_main$b = vue.defineComponent({
|
|
|
1530
1945
|
},
|
|
1531
1946
|
components: {}
|
|
1532
1947
|
});
|
|
1533
|
-
const _hoisted_1$
|
|
1534
|
-
function _sfc_render$
|
|
1948
|
+
const _hoisted_1$4 = { key: 0 };
|
|
1949
|
+
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1535
1950
|
var _a, _b, _c, _d;
|
|
1536
1951
|
return ((_a = _ctx.cols) == null ? void 0 : _a.length) || ((_b = _ctx.rows) == null ? void 0 : _b.length) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1537
1952
|
key: 0,
|
|
@@ -1542,7 +1957,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1542
1957
|
key: col.value
|
|
1543
1958
|
}, vue.toDisplayString(col.value) + "/", 1);
|
|
1544
1959
|
}), 128)),
|
|
1545
|
-
((_c = _ctx.cols) == null ? void 0 : _c.length) > 0 && ((_d = _ctx.rows) == null ? void 0 : _d.length) > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
1960
|
+
((_c = _ctx.cols) == null ? void 0 : _c.length) > 0 && ((_d = _ctx.rows) == null ? void 0 : _d.length) > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$4, "\uFF0C")) : vue.createCommentVNode("", true),
|
|
1546
1961
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.rows, (row) => {
|
|
1547
1962
|
return vue.openBlock(), vue.createElementBlock("span", {
|
|
1548
1963
|
key: row.value
|
|
@@ -1550,8 +1965,8 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1550
1965
|
}), 128))
|
|
1551
1966
|
], 2)) : vue.createCommentVNode("", true);
|
|
1552
1967
|
}
|
|
1553
|
-
var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1554
|
-
const _sfc_main$
|
|
1968
|
+
var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
|
|
1969
|
+
const _sfc_main$b = vue.defineComponent({
|
|
1555
1970
|
name: "TooltipInfos",
|
|
1556
1971
|
props: ["infos"],
|
|
1557
1972
|
setup() {
|
|
@@ -1561,13 +1976,13 @@ const _sfc_main$a = vue.defineComponent({
|
|
|
1561
1976
|
},
|
|
1562
1977
|
components: {}
|
|
1563
1978
|
});
|
|
1564
|
-
function _sfc_render$
|
|
1979
|
+
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1565
1980
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1566
1981
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-infos`)
|
|
1567
1982
|
}, vue.toDisplayString(_ctx.infos), 3);
|
|
1568
1983
|
}
|
|
1569
|
-
var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1570
|
-
const _sfc_main$
|
|
1984
|
+
var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
|
|
1985
|
+
const _sfc_main$a = vue.defineComponent({
|
|
1571
1986
|
name: "TooltipSimpleTips",
|
|
1572
1987
|
props: ["name", "tips"],
|
|
1573
1988
|
setup() {
|
|
@@ -1577,7 +1992,7 @@ const _sfc_main$9 = vue.defineComponent({
|
|
|
1577
1992
|
},
|
|
1578
1993
|
components: {}
|
|
1579
1994
|
});
|
|
1580
|
-
function _sfc_render$
|
|
1995
|
+
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1581
1996
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1582
1997
|
_ctx.name ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1583
1998
|
key: 0,
|
|
@@ -1589,8 +2004,8 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1589
2004
|
}, vue.toDisplayString(_ctx.tips), 3)) : vue.createCommentVNode("", true)
|
|
1590
2005
|
], 64);
|
|
1591
2006
|
}
|
|
1592
|
-
var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1593
|
-
const _sfc_main$
|
|
2007
|
+
var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
|
|
2008
|
+
const _sfc_main$9 = vue.defineComponent({
|
|
1594
2009
|
name: "TooltipSummary",
|
|
1595
2010
|
props: ["summaries"],
|
|
1596
2011
|
setup(props) {
|
|
@@ -1603,7 +2018,7 @@ const _sfc_main$8 = vue.defineComponent({
|
|
|
1603
2018
|
},
|
|
1604
2019
|
components: {}
|
|
1605
2020
|
});
|
|
1606
|
-
function _sfc_render$
|
|
2021
|
+
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1607
2022
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1608
2023
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary`)
|
|
1609
2024
|
}, [
|
|
@@ -1630,8 +2045,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1630
2045
|
}), 128))
|
|
1631
2046
|
], 2);
|
|
1632
2047
|
}
|
|
1633
|
-
var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1634
|
-
const _sfc_main$
|
|
2048
|
+
var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
|
|
2049
|
+
const _sfc_main$8 = vue.defineComponent({
|
|
1635
2050
|
name: "TooltipOperatorTitle",
|
|
1636
2051
|
props: ["menu"],
|
|
1637
2052
|
setup(props) {
|
|
@@ -1642,21 +2057,21 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
1642
2057
|
};
|
|
1643
2058
|
}
|
|
1644
2059
|
});
|
|
1645
|
-
const _hoisted_1 = ["innerHTML"];
|
|
1646
|
-
function _sfc_render$
|
|
2060
|
+
const _hoisted_1$3 = ["innerHTML"];
|
|
2061
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1647
2062
|
return vue.openBlock(), vue.createElementBlock("span", null, [
|
|
1648
2063
|
_ctx.icon ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1649
2064
|
key: 0,
|
|
1650
2065
|
innerHTML: _ctx.icon,
|
|
1651
2066
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-icon`)
|
|
1652
|
-
}, null, 10, _hoisted_1)) : vue.createCommentVNode("", true),
|
|
2067
|
+
}, null, 10, _hoisted_1$3)) : vue.createCommentVNode("", true),
|
|
1653
2068
|
vue.createElementVNode("span", {
|
|
1654
2069
|
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-text`)
|
|
1655
2070
|
}, vue.toDisplayString(_ctx.menu.text), 3)
|
|
1656
2071
|
]);
|
|
1657
2072
|
}
|
|
1658
|
-
var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1659
|
-
const _sfc_main$
|
|
2073
|
+
var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
|
|
2074
|
+
const _sfc_main$7 = vue.defineComponent({
|
|
1660
2075
|
name: "TooltipOperatorMenu",
|
|
1661
2076
|
props: ["menu", "cell"],
|
|
1662
2077
|
setup(props) {
|
|
@@ -1675,7 +2090,7 @@ const _sfc_main$6 = vue.defineComponent({
|
|
|
1675
2090
|
TooltipOperatorTitle
|
|
1676
2091
|
}
|
|
1677
2092
|
});
|
|
1678
|
-
function _sfc_render$
|
|
2093
|
+
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1679
2094
|
const _component_TooltipOperatorTitle = vue.resolveComponent("TooltipOperatorTitle");
|
|
1680
2095
|
const _component_TooltipOperatorMenu = vue.resolveComponent("TooltipOperatorMenu");
|
|
1681
2096
|
const _component_MenuItem = vue.resolveComponent("MenuItem");
|
|
@@ -1719,9 +2134,9 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1719
2134
|
_: 1
|
|
1720
2135
|
}, 8, ["popupClassName", "onTitleClick"]);
|
|
1721
2136
|
}
|
|
1722
|
-
var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2137
|
+
var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
1723
2138
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
1724
|
-
const _sfc_main$
|
|
2139
|
+
const _sfc_main$6 = vue.defineComponent({
|
|
1725
2140
|
name: "TooltipOperator",
|
|
1726
2141
|
props: [
|
|
1727
2142
|
"menus",
|
|
@@ -1741,7 +2156,7 @@ const _sfc_main$5 = vue.defineComponent({
|
|
|
1741
2156
|
TooltipOperatorMenu
|
|
1742
2157
|
}
|
|
1743
2158
|
});
|
|
1744
|
-
function _sfc_render$
|
|
2159
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1745
2160
|
const _component_TooltipOperatorMenu = vue.resolveComponent("TooltipOperatorMenu");
|
|
1746
2161
|
const _component_Menu = vue.resolveComponent("Menu");
|
|
1747
2162
|
const _component_TooltipOperatorTitle = vue.resolveComponent("TooltipOperatorTitle");
|
|
@@ -1804,17 +2219,17 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1804
2219
|
}), 128))
|
|
1805
2220
|
], 2);
|
|
1806
2221
|
}
|
|
1807
|
-
var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2222
|
+
var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
1808
2223
|
var index_vue_vue_type_style_index_0_lang = "";
|
|
1809
|
-
const _sfc_main$
|
|
2224
|
+
const _sfc_main$5 = vue.defineComponent({
|
|
1810
2225
|
name: "TooltipComponent",
|
|
1811
2226
|
props: [
|
|
1812
|
-
"content",
|
|
1813
2227
|
"data",
|
|
1814
2228
|
"options",
|
|
1815
2229
|
"cell",
|
|
1816
2230
|
"position",
|
|
1817
|
-
"event"
|
|
2231
|
+
"event",
|
|
2232
|
+
"content"
|
|
1818
2233
|
],
|
|
1819
2234
|
setup(props) {
|
|
1820
2235
|
const { operator, onlyMenu } = s2.getTooltipDefaultOptions(props.options);
|
|
@@ -1832,7 +2247,7 @@ const _sfc_main$4 = vue.defineComponent({
|
|
|
1832
2247
|
TooltipOperator
|
|
1833
2248
|
}
|
|
1834
2249
|
});
|
|
1835
|
-
function _sfc_render$
|
|
2250
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1836
2251
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
1837
2252
|
const _component_TooltipOperator = vue.resolveComponent("TooltipOperator");
|
|
1838
2253
|
const _component_TooltipSimpleTips = vue.resolveComponent("TooltipSimpleTips");
|
|
@@ -1853,9 +2268,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1853
2268
|
cell: _ctx.cell,
|
|
1854
2269
|
onClick: (_d = _ctx.operator) == null ? void 0 : _d.onClick
|
|
1855
2270
|
}, null, 8, ["menus", "cell", "onClick"]),
|
|
1856
|
-
_ctx.content ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key:
|
|
1857
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.content), 1)
|
|
1858
|
-
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
2271
|
+
_ctx.content ? vue.renderSlot(_ctx.$slots, "content", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
1859
2272
|
vue.createVNode(_component_TooltipSimpleTips, {
|
|
1860
2273
|
name: (_e = _ctx.data) == null ? void 0 : _e.name,
|
|
1861
2274
|
tips: (_f = _ctx.data) == null ? void 0 : _f.tips
|
|
@@ -1878,7 +2291,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1878
2291
|
], 64))
|
|
1879
2292
|
], 64));
|
|
1880
2293
|
}
|
|
1881
|
-
var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2294
|
+
var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
1882
2295
|
class CustomTooltip extends s2.BaseTooltip {
|
|
1883
2296
|
constructor(spreadsheet) {
|
|
1884
2297
|
super(spreadsheet);
|
|
@@ -1893,7 +2306,9 @@ class CustomTooltip extends s2.BaseTooltip {
|
|
|
1893
2306
|
cell,
|
|
1894
2307
|
content
|
|
1895
2308
|
});
|
|
1896
|
-
const tooltipVNode = vue.createVNode(TooltipComponent, tooltipProps
|
|
2309
|
+
const tooltipVNode = vue.createVNode(TooltipComponent, tooltipProps, {
|
|
2310
|
+
content: () => content
|
|
2311
|
+
});
|
|
1897
2312
|
vue.render(null, this.container);
|
|
1898
2313
|
vue.render(tooltipVNode, this.container);
|
|
1899
2314
|
}
|
|
@@ -1954,6 +2369,7 @@ const useEvents = (s2Ref, emit) => {
|
|
|
1954
2369
|
useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_MOUSE_MOVE, "dataCellMouseMove");
|
|
1955
2370
|
useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_TREND_ICON_CLICK, "dataCellTrendIconClick");
|
|
1956
2371
|
useS2Event(s2Ref, emit, s2.S2Event.DATE_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
|
|
2372
|
+
useS2Event(s2Ref, emit, s2.S2Event.DATE_CELL_SELECT_MOVE, "dataCellSelectMove");
|
|
1957
2373
|
useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_HOVER, "cornerCellHover");
|
|
1958
2374
|
useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_CLICK, "cornerCellClick");
|
|
1959
2375
|
useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_DOUBLE_CLICK, "cornerCellDoubleClick");
|
|
@@ -2038,11 +2454,14 @@ const useSheetUpdate = (s2Ref, props) => {
|
|
|
2038
2454
|
(_a = s2Ref.value) == null ? void 0 : _a.setOptions(options);
|
|
2039
2455
|
(_b = s2Ref.value) == null ? void 0 : _b.changeSheetSize(options == null ? void 0 : options.width, options == null ? void 0 : options.height);
|
|
2040
2456
|
}, { deep: vue.isProxy(props.options) });
|
|
2041
|
-
vue.watch(() => props.dataCfg, (dataCfg) => {
|
|
2042
|
-
var _a;
|
|
2457
|
+
vue.watch(() => props.dataCfg, (dataCfg, prevDataCfg) => {
|
|
2458
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2459
|
+
if (((_b = (_a = prevDataCfg == null ? void 0 : prevDataCfg.fields) == null ? void 0 : _a.columns) == null ? void 0 : _b.length) !== ((_d = (_c = dataCfg == null ? void 0 : dataCfg.fields) == null ? void 0 : _c.columns) == null ? void 0 : _d.length)) {
|
|
2460
|
+
(_e = s2Ref.value) == null ? void 0 : _e.clearColumnLeafNodes();
|
|
2461
|
+
}
|
|
2043
2462
|
updateFlag.rerender = true;
|
|
2044
2463
|
updateFlag.reloadData = true;
|
|
2045
|
-
(
|
|
2464
|
+
(_f = s2Ref.value) == null ? void 0 : _f.setDataCfg(dataCfg);
|
|
2046
2465
|
}, { deep: vue.isProxy(props.dataCfg) });
|
|
2047
2466
|
vue.watch(() => props.themeCfg, (themeCfg) => {
|
|
2048
2467
|
var _a;
|
|
@@ -2156,6 +2575,34 @@ const initBaseSheetProps = () => ({
|
|
|
2156
2575
|
onSpreadsheet: Function,
|
|
2157
2576
|
onGetSpreadSheet: Function
|
|
2158
2577
|
});
|
|
2578
|
+
const initDrillDownProps = () => ({
|
|
2579
|
+
className: String,
|
|
2580
|
+
titleText: {
|
|
2581
|
+
type: String,
|
|
2582
|
+
default: s2.i18n("\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6")
|
|
2583
|
+
},
|
|
2584
|
+
searchText: {
|
|
2585
|
+
type: String,
|
|
2586
|
+
default: s2.i18n("\u641C\u7D22\u5B57\u6BB5")
|
|
2587
|
+
},
|
|
2588
|
+
clearButtonText: {
|
|
2589
|
+
type: String,
|
|
2590
|
+
default: s2.i18n("\u6062\u590D\u9ED8\u8BA4")
|
|
2591
|
+
},
|
|
2592
|
+
extra: Node,
|
|
2593
|
+
dataSet: {
|
|
2594
|
+
type: Array,
|
|
2595
|
+
default: []
|
|
2596
|
+
},
|
|
2597
|
+
drillFields: Array,
|
|
2598
|
+
disabledFields: Array,
|
|
2599
|
+
getDrillFields: Function,
|
|
2600
|
+
setDrillFields: Function
|
|
2601
|
+
});
|
|
2602
|
+
const initDrillDownEmits = () => {
|
|
2603
|
+
const keys2 = ["getDrillFields", "setDrillFields"];
|
|
2604
|
+
return keys2;
|
|
2605
|
+
};
|
|
2159
2606
|
const initBaseSheetEmits = () => {
|
|
2160
2607
|
const keys2 = [
|
|
2161
2608
|
"spreadsheet",
|
|
@@ -2181,6 +2628,7 @@ const initBaseSheetEmits = () => {
|
|
|
2181
2628
|
"dataCellMouseMove",
|
|
2182
2629
|
"dataCellTrendIconClick",
|
|
2183
2630
|
"dataCellBrushSelection",
|
|
2631
|
+
"dataCellSelectMove",
|
|
2184
2632
|
"cornerCellHover",
|
|
2185
2633
|
"cornerCellClick",
|
|
2186
2634
|
"cornerCellDoubleClick",
|
|
@@ -2232,7 +2680,7 @@ const initBaseSheetEmits = () => {
|
|
|
2232
2680
|
return keys2;
|
|
2233
2681
|
};
|
|
2234
2682
|
var baseSheet_vue_vue_type_style_index_0_lang = "";
|
|
2235
|
-
const _sfc_main$
|
|
2683
|
+
const _sfc_main$4 = vue.defineComponent({
|
|
2236
2684
|
name: "BaseSheet",
|
|
2237
2685
|
props: initBaseSheetProps(),
|
|
2238
2686
|
emits: initBaseSheetEmits(),
|
|
@@ -2273,7 +2721,7 @@ const _sfc_main$3 = vue.defineComponent({
|
|
|
2273
2721
|
S2Pagination
|
|
2274
2722
|
}
|
|
2275
2723
|
});
|
|
2276
|
-
function _sfc_render$
|
|
2724
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2277
2725
|
const _component_S2Pagination = vue.resolveComponent("S2Pagination");
|
|
2278
2726
|
const _component_Spin = vue.resolveComponent("Spin");
|
|
2279
2727
|
return vue.openBlock(), vue.createBlock(_component_Spin, {
|
|
@@ -2302,14 +2750,251 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2302
2750
|
_: 1
|
|
2303
2751
|
}, 8, ["wrapperClassName", "spinning"]);
|
|
2304
2752
|
}
|
|
2305
|
-
var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2753
|
+
var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
2754
|
+
const _hoisted_1$2 = {
|
|
2755
|
+
class: "antv-s2-icon",
|
|
2756
|
+
viewBox: "0 0 1024 1024",
|
|
2757
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2758
|
+
width: "12.6",
|
|
2759
|
+
height: "12.6"
|
|
2760
|
+
};
|
|
2761
|
+
const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
2762
|
+
d: "M511.804 222.338c-57.117 0-105.737 20.061-145.86 60.184-40.122 40.123-60.184 88.569-60.184 145.337 0 56.769 20.062 105.214 60.185 145.337 40.122 40.123 88.742 60.185 145.859 60.185 57.116 0 105.736-20.062 145.859-60.185 40.123-40.123 60.184-88.568 60.184-145.337 0-56.768-20.061-105.214-60.184-145.337-40.123-40.123-88.743-60.184-145.86-60.184zm0 338.619c-36.729 0-68.007-12.925-93.835-38.774-25.827-25.85-38.752-57.127-38.773-93.834-.022-36.707 12.902-68.16 38.773-94.357 25.872-26.197 57.15-39.285 93.835-39.263 36.685.022 67.963 13.11 93.834 39.263 25.871 26.154 38.796 57.606 38.774 94.357-.022 36.75-12.946 68.028-38.774 93.834-25.828 25.806-57.106 38.73-93.834 38.774zm366.165-295.766c-21.084-42.168-50.327-79.223-87.73-111.165-37.404-31.941-79.898-57.105-127.484-75.491C614.472 60.845 564.155 52 511.804 52c-52.352 0-103.006 8.845-151.963 26.535-46.911 18.364-89.069 43.528-126.472 75.491-37.403 31.964-66.647 69.019-87.731 111.165C123.879 308.71 113 353.923 113 400.835c0 65.95 15.982 132.924 47.945 200.92 26.524 56.441 63.58 112.198 111.165 167.27 62.556 73.435 134.632 138.71 216.227 195.827 6.81 4.765 14.459 7.148 22.945 7.148 8.485 0 16.47-2.383 23.956-7.148 81.595-57.79 153.67-123.067 216.227-195.828 47.608-55.767 84.663-111.524 111.165-167.27 31.963-67.995 47.945-134.969 47.945-200.919 0-46.912-10.88-92.126-32.638-135.644h.032zm-40.797 136.656c0 55.07-13.6 111.513-40.798 169.326-23.129 49.631-56.452 99.948-99.97 150.95-52.351 61.208-113.885 117.65-184.6 169.326-70.716-51.676-132.25-108.118-184.6-169.326-42.844-51.002-76.167-101.319-99.971-150.95-27.198-57.791-40.797-114.57-40.797-170.338 0-36.032 8.159-70.716 24.478-104.05 16.994-32.638 40.45-61.882 70.368-87.73 30.592-26.525 65.276-47.26 104.05-62.209 40.797-14.97 82.954-22.455 126.472-22.455 43.517 0 85.675 7.485 126.472 22.455 38.752 14.97 73.436 35.706 104.05 62.208 30.593 25.85 54.048 55.093 70.367 87.731 16.32 34.009 24.479 69.03 24.479 105.062z",
|
|
2763
|
+
fill: "currentColor"
|
|
2764
|
+
}, null, -1);
|
|
2765
|
+
const _hoisted_3$2 = [
|
|
2766
|
+
_hoisted_2$2
|
|
2767
|
+
];
|
|
2768
|
+
function render$2(_ctx, _cache) {
|
|
2769
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
|
|
2770
|
+
}
|
|
2771
|
+
var LocationIcon = { render: render$2 };
|
|
2772
|
+
const _hoisted_1$1 = {
|
|
2773
|
+
class: "antv-s2-icon",
|
|
2774
|
+
viewBox: "0 0 1024 1024",
|
|
2775
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2776
|
+
width: "12.6",
|
|
2777
|
+
height: "12.6"
|
|
2778
|
+
};
|
|
2779
|
+
const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
2780
|
+
d: "M86.016 805.888H0l143.872-529.92h79.36l144.896 529.92h-91.136l-29.696-109.056H115.2S85.504 805.888 86.016 805.888zM225.28 613.376 181.248 455.68 138.24 613.376h87.04zM519.168 430.08c24.576-16.384 47.616-25.088 69.12-25.088 30.72 0 58.368 14.848 81.92 44.032 24.064 29.184 35.328 72.192 35.328 128.512 0 44.032-7.168 83.456-22.528 118.272-14.848 34.816-35.328 62.976-60.416 83.456-26.112 20.992-57.856 31.232-95.232 31.232-15.36-.512-31.232-1.536-46.592-3.584-4.096-.512-8.704-1.024-12.8-1.536h-66.56V256h81.92v206.336c11.264-12.8 23.04-23.552 35.84-32.256zM483.84 587.264v135.168c13.824 3.072 26.112 4.608 37.376 4.608 27.648 0 50.176-11.776 69.12-36.352 19.456-25.088 28.672-59.392 28.672-104.96 0-32.256-5.12-55.296-14.848-70.144-9.216-13.824-18.432-19.968-28.672-19.968-12.288 0-27.136 7.68-44.544 24.064-16.896 16.896-32.768 39.424-47.104 67.584zm529.92 207.36c-36.864 14.336-71.68 20.992-104.96 20.992-32.768.512-64.512-9.216-91.648-27.136-27.136-18.432-48.64-44.032-62.464-73.728-14.848-30.72-22.528-65.536-22.528-104.448 0-58.88 16.896-108.032 51.2-146.944 33.792-38.912 75.264-58.88 123.392-58.88 34.304 0 70.144 7.168 108.032 21.504l10.24 4.096v95.232l-20.992-10.752c-34.816-17.92-65.536-26.624-92.16-26.624-16.896 0-32.768 4.608-47.104 13.824-13.824 8.704-25.088 23.04-32.768 42.496-8.192 19.968-12.288 41.472-12.288 63.488 0 28.672 7.68 55.808 24.064 82.432 14.848 24.576 37.888 36.352 71.168 36.352 10.752 0 21.504-1.024 31.744-2.56 9.728-1.536 29.696-8.192 58.88-18.944l19.456-7.68v92.672l-11.264 4.608z",
|
|
2781
|
+
fill: "currentColor"
|
|
2782
|
+
}, null, -1);
|
|
2783
|
+
const _hoisted_3$1 = [
|
|
2784
|
+
_hoisted_2$1
|
|
2785
|
+
];
|
|
2786
|
+
function render$1(_ctx, _cache) {
|
|
2787
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
|
|
2788
|
+
}
|
|
2789
|
+
var TextIcon = { render: render$1 };
|
|
2790
|
+
const _hoisted_1 = {
|
|
2791
|
+
class: "antv-s2-icon",
|
|
2792
|
+
viewBox: "0 0 1024 1024",
|
|
2793
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2794
|
+
width: "12.6",
|
|
2795
|
+
height: "12.6"
|
|
2796
|
+
};
|
|
2797
|
+
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
2798
|
+
d: "M950.016 898.016 744 693.024q88-107.008 88-244.992 0-159.008-112.512-271.488T448 64.032 176.512 176.544 64 448.032 176.512 719.52 448 832.032q138.016 0 244.992-88l206.016 206.016q10.016 10.016 24.992 10.016t26.016-10.016q10.016-11.008 10.016-26.016t-10.016-26.016zM568.992 736Q512 760 448 760t-120.992-24q-56-24-99.488-67.488t-66.496-99.488q-24.992-56.992-24.992-120.992t24.992-120.992q23.008-56 66.496-99.488t99.488-67.488q56.992-24 120.992-24t120.992 24q56 24 99.488 67.488t67.488 99.488q24 56.992 24 120.992t-24 120.992q-24 56-67.488 99.488T568.992 736z",
|
|
2799
|
+
fill: "currentColor"
|
|
2800
|
+
}, null, -1);
|
|
2801
|
+
const _hoisted_3 = [
|
|
2802
|
+
_hoisted_2
|
|
2803
|
+
];
|
|
2804
|
+
function render(_ctx, _cache) {
|
|
2805
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _hoisted_3);
|
|
2806
|
+
}
|
|
2807
|
+
var CalendarIcon = { render };
|
|
2808
|
+
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2809
|
+
const _sfc_main$3 = vue.defineComponent({
|
|
2810
|
+
name: "DrillDown",
|
|
2811
|
+
props: initDrillDownProps(),
|
|
2812
|
+
emits: initDrillDownEmits(),
|
|
2813
|
+
methods: {},
|
|
2814
|
+
components: {
|
|
2815
|
+
Button: antDesignVue.Button,
|
|
2816
|
+
Input: antDesignVue.Input,
|
|
2817
|
+
Empty: antDesignVue.Empty,
|
|
2818
|
+
Menu: antDesignVue.Menu,
|
|
2819
|
+
MenuItem: antDesignVue.MenuItem,
|
|
2820
|
+
LocationIcon,
|
|
2821
|
+
TextIcon,
|
|
2822
|
+
CalendarIcon
|
|
2823
|
+
},
|
|
2824
|
+
setup(props) {
|
|
2825
|
+
const {
|
|
2826
|
+
dataSet,
|
|
2827
|
+
disabledFields,
|
|
2828
|
+
getDrillFields,
|
|
2829
|
+
setDrillFields,
|
|
2830
|
+
className
|
|
2831
|
+
} = props;
|
|
2832
|
+
const getOptions = () => {
|
|
2833
|
+
return dataSet.map((val) => {
|
|
2834
|
+
val.disabled = !!(disabledFields && disabledFields.includes(val.value));
|
|
2835
|
+
return val;
|
|
2836
|
+
});
|
|
2837
|
+
};
|
|
2838
|
+
const options = vue.ref(getOptions());
|
|
2839
|
+
const selected = vue.ref([]);
|
|
2840
|
+
const handleSearch = (e) => {
|
|
2841
|
+
const { value } = e.target;
|
|
2842
|
+
if (!value) {
|
|
2843
|
+
options.value = [...dataSet];
|
|
2844
|
+
} else {
|
|
2845
|
+
const reg = new RegExp(value, "gi");
|
|
2846
|
+
const result = dataSet.filter((item) => reg.test(item.name));
|
|
2847
|
+
options.value = [...result];
|
|
2848
|
+
}
|
|
2849
|
+
};
|
|
2850
|
+
const handleSelect = (value) => {
|
|
2851
|
+
const key = value == null ? void 0 : value.selectedKeys;
|
|
2852
|
+
selected.value = key;
|
|
2853
|
+
if (getDrillFields) {
|
|
2854
|
+
getDrillFields(key);
|
|
2855
|
+
}
|
|
2856
|
+
if (setDrillFields)
|
|
2857
|
+
setDrillFields(key);
|
|
2858
|
+
};
|
|
2859
|
+
const handleClear = (e) => {
|
|
2860
|
+
e.stopPropagation();
|
|
2861
|
+
selected.value = [];
|
|
2862
|
+
if (getDrillFields)
|
|
2863
|
+
getDrillFields([]);
|
|
2864
|
+
if (setDrillFields)
|
|
2865
|
+
setDrillFields([]);
|
|
2866
|
+
};
|
|
2867
|
+
return {
|
|
2868
|
+
options,
|
|
2869
|
+
handleSearch,
|
|
2870
|
+
handleSelect,
|
|
2871
|
+
handleClear,
|
|
2872
|
+
className,
|
|
2873
|
+
selected,
|
|
2874
|
+
isEmpty,
|
|
2875
|
+
DRILL_DOWN_PRE_CLASS
|
|
2876
|
+
};
|
|
2877
|
+
}
|
|
2878
|
+
});
|
|
2879
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2880
|
+
const _component_Button = vue.resolveComponent("Button");
|
|
2881
|
+
const _component_Input = vue.resolveComponent("Input");
|
|
2882
|
+
const _component_Empty = vue.resolveComponent("Empty");
|
|
2883
|
+
const _component_text_icon = vue.resolveComponent("text-icon");
|
|
2884
|
+
const _component_calendar_icon = vue.resolveComponent("calendar-icon");
|
|
2885
|
+
const _component_location_icon = vue.resolveComponent("location-icon");
|
|
2886
|
+
const _component_MenuItem = vue.resolveComponent("MenuItem");
|
|
2887
|
+
const _component_Menu = vue.resolveComponent("Menu");
|
|
2888
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2889
|
+
class: vue.normalizeClass([_ctx.DRILL_DOWN_PRE_CLASS, _ctx.className])
|
|
2890
|
+
}, [
|
|
2891
|
+
vue.createElementVNode("header", {
|
|
2892
|
+
class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-header`)
|
|
2893
|
+
}, [
|
|
2894
|
+
vue.createElementVNode("div", null, vue.toDisplayString(_ctx.titleText), 1),
|
|
2895
|
+
vue.createVNode(_component_Button, {
|
|
2896
|
+
type: "link",
|
|
2897
|
+
onClick: _ctx.handleClear
|
|
2898
|
+
}, {
|
|
2899
|
+
default: vue.withCtx(() => [
|
|
2900
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.clearButtonText), 1)
|
|
2901
|
+
]),
|
|
2902
|
+
_: 1
|
|
2903
|
+
}, 8, ["onClick"])
|
|
2904
|
+
], 2),
|
|
2905
|
+
vue.createVNode(_component_Input, {
|
|
2906
|
+
class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-search`),
|
|
2907
|
+
placeholder: _ctx.searchText,
|
|
2908
|
+
onChange: _ctx.handleSearch,
|
|
2909
|
+
onPressEnter: _ctx.handleSearch,
|
|
2910
|
+
allowClear: true
|
|
2911
|
+
}, null, 8, ["class", "placeholder", "onChange", "onPressEnter"]),
|
|
2912
|
+
_ctx.isEmpty(_ctx.options) ? (vue.openBlock(), vue.createBlock(_component_Empty, {
|
|
2913
|
+
key: 0,
|
|
2914
|
+
imageStyle: { height: "64px" },
|
|
2915
|
+
class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-empty`)
|
|
2916
|
+
}, null, 8, ["class"])) : vue.createCommentVNode("", true),
|
|
2917
|
+
vue.createVNode(_component_Menu, {
|
|
2918
|
+
class: "`${DRILL_DOWN_PRE_CLASS}-menu`",
|
|
2919
|
+
selectedKeys: _ctx.selected,
|
|
2920
|
+
"onUpdate:selectedKeys": _cache[0] || (_cache[0] = ($event) => _ctx.selected = $event),
|
|
2921
|
+
onSelect: _ctx.handleSelect
|
|
2922
|
+
}, {
|
|
2923
|
+
default: vue.withCtx(() => [
|
|
2924
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (option) => {
|
|
2925
|
+
return vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
2926
|
+
key: option.value,
|
|
2927
|
+
disabled: option.disabled,
|
|
2928
|
+
class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-menu-item`)
|
|
2929
|
+
}, {
|
|
2930
|
+
icon: vue.withCtx(() => [
|
|
2931
|
+
option.type === "text" ? (vue.openBlock(), vue.createBlock(_component_text_icon, { key: 0 })) : vue.createCommentVNode("", true),
|
|
2932
|
+
option.type === "date" ? (vue.openBlock(), vue.createBlock(_component_calendar_icon, { key: 1 })) : vue.createCommentVNode("", true),
|
|
2933
|
+
option.type === "location" ? (vue.openBlock(), vue.createBlock(_component_location_icon, { key: 2 })) : vue.createCommentVNode("", true)
|
|
2934
|
+
]),
|
|
2935
|
+
default: vue.withCtx(() => [
|
|
2936
|
+
vue.createTextVNode(" " + vue.toDisplayString(option == null ? void 0 : option.name), 1)
|
|
2937
|
+
]),
|
|
2938
|
+
_: 2
|
|
2939
|
+
}, 1032, ["disabled", "class"]);
|
|
2940
|
+
}), 128))
|
|
2941
|
+
]),
|
|
2942
|
+
_: 1
|
|
2943
|
+
}, 8, ["selectedKeys", "onSelect"])
|
|
2944
|
+
], 2);
|
|
2945
|
+
}
|
|
2946
|
+
var DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-6eb1ccd0"]]);
|
|
2306
2947
|
const _sfc_main$2 = vue.defineComponent({
|
|
2307
2948
|
name: "PivotSheet",
|
|
2308
|
-
props:
|
|
2309
|
-
emits:
|
|
2949
|
+
props: initBaseSheetProps(),
|
|
2950
|
+
emits: initBaseSheetEmits(),
|
|
2310
2951
|
setup(props, ctx) {
|
|
2311
2952
|
const s2Ref = useExpose(ctx.expose);
|
|
2312
|
-
|
|
2953
|
+
const { options: pivotOptions } = vue.toRefs(props);
|
|
2954
|
+
const { dataCfg, partDrillDown } = vue.toRefs(props);
|
|
2955
|
+
const drillFields = vue.ref([]);
|
|
2956
|
+
const setDrillFields = (fields) => {
|
|
2957
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2958
|
+
const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
|
|
2959
|
+
drillFields.value = fields;
|
|
2960
|
+
instance == null ? void 0 : instance.hideTooltip();
|
|
2961
|
+
if (isEmpty(fields)) {
|
|
2962
|
+
instance == null ? void 0 : instance.clearDrillDownData((_b = instance == null ? void 0 : instance.store.get("drillDownNode")) == null ? void 0 : _b.id);
|
|
2963
|
+
} else {
|
|
2964
|
+
handleDrillDown({
|
|
2965
|
+
rows: (_d = (_c = dataCfg.value) == null ? void 0 : _c.fields.rows) != null ? _d : [],
|
|
2966
|
+
drillFields: fields,
|
|
2967
|
+
fetchData: (_e = partDrillDown.value) == null ? void 0 : _e.fetchData,
|
|
2968
|
+
drillItemsNum: (_f = partDrillDown.value) == null ? void 0 : _f.drillItemsNum,
|
|
2969
|
+
spreadsheet: instance
|
|
2970
|
+
});
|
|
2971
|
+
}
|
|
2972
|
+
};
|
|
2973
|
+
const onDrillDownIconClick = (params) => {
|
|
2974
|
+
var _a, _b;
|
|
2975
|
+
const { event, disabledFields } = params;
|
|
2976
|
+
if (event) {
|
|
2977
|
+
const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
|
|
2978
|
+
const drillDownNode = vue.createVNode(DrillDown, __spreadProps(__spreadValues({}, (_b = partDrillDown.value) == null ? void 0 : _b.drillConfig), {
|
|
2979
|
+
setDrillFields,
|
|
2980
|
+
drillFields: drillFields.value,
|
|
2981
|
+
disabledFields
|
|
2982
|
+
}));
|
|
2983
|
+
instance == null ? void 0 : instance.showTooltip({
|
|
2984
|
+
position: {
|
|
2985
|
+
x: event.clientX,
|
|
2986
|
+
y: event.clientY
|
|
2987
|
+
},
|
|
2988
|
+
event,
|
|
2989
|
+
content: drillDownNode
|
|
2990
|
+
});
|
|
2991
|
+
}
|
|
2992
|
+
};
|
|
2993
|
+
const options = vue.computed(() => buildDrillDownOptions(pivotOptions.value, partDrillDown.value, (params) => onDrillDownIconClick(params)));
|
|
2994
|
+
return {
|
|
2995
|
+
s2Ref,
|
|
2996
|
+
options
|
|
2997
|
+
};
|
|
2313
2998
|
},
|
|
2314
2999
|
components: {
|
|
2315
3000
|
BaseSheet
|
|
@@ -2317,7 +3002,10 @@ const _sfc_main$2 = vue.defineComponent({
|
|
|
2317
3002
|
});
|
|
2318
3003
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2319
3004
|
const _component_BaseSheet = vue.resolveComponent("BaseSheet");
|
|
2320
|
-
return vue.openBlock(), vue.createBlock(_component_BaseSheet,
|
|
3005
|
+
return vue.openBlock(), vue.createBlock(_component_BaseSheet, vue.mergeProps(_ctx.$props, {
|
|
3006
|
+
ref: "s2Ref",
|
|
3007
|
+
options: _ctx.options
|
|
3008
|
+
}), null, 16, ["options"]);
|
|
2321
3009
|
}
|
|
2322
3010
|
var PivotSheet = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
2323
3011
|
const _sfc_main$1 = vue.defineComponent({
|