@antv/s2-vue 1.0.1 → 1.1.0

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/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$c = Object.prototype;
46
- var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
47
- var nativeObjectToString$1 = objectProto$c.toString;
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$9.call(value, symToStringTag$1), tag = value[symToStringTag$1];
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$b = Object.prototype;
67
- var nativeObjectToString = objectProto$b.toString;
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$1 = "[object Symbol]";
82
+ var symbolTag$3 = "[object Symbol]";
83
83
  function isSymbol(value) {
84
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
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$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
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$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
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$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
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$a = Object.prototype;
185
+ var funcProto = Function.prototype, objectProto$d = Object.prototype;
186
186
  var funcToString = funcProto.toString;
187
- var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
188
- var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
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$9 = Object.prototype;
304
+ var objectProto$b = Object.prototype;
223
305
  function isPrototype(value) {
224
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$9;
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$2 = "[object Arguments]";
316
+ var argsTag$3 = "[object Arguments]";
235
317
  function baseIsArguments(value) {
236
- return isObjectLike(value) && baseGetTag(value) == argsTag$2;
318
+ return isObjectLike(value) && baseGetTag(value) == argsTag$3;
237
319
  }
238
- var objectProto$8 = Object.prototype;
239
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
240
- var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
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$7.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
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$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
251
- var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
252
- var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
253
- var Buffer = moduleExports$1 ? root$1.Buffer : void 0;
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$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$4 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", weakMapTag$1 = "[object WeakMap]";
258
- var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[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]";
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$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$2] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$4] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$1] = false;
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$7 = Object.prototype;
289
- var hasOwnProperty$6 = objectProto$7.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$6.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
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$6 = Object.prototype;
307
- var hasOwnProperty$5 = objectProto$6.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$5.call(object, key) && key != "constructor") {
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$5 = Object.prototype;
347
- var hasOwnProperty$4 = objectProto$5.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$4.call(data, key) ? data[key] : void 0;
462
+ return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
355
463
  }
356
- var objectProto$4 = Object.prototype;
357
- var hasOwnProperty$3 = objectProto$4.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$3.call(data, key);
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$3 = Object.prototype;
637
- var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
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$3 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag = "[object WeakMap]";
663
- var dataViewTag$1 = "[object DataView]";
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$1 || Map$1 && getTag(new Map$1()) != mapTag$3 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$3 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag) {
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$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
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$1;
819
+ return dataViewTag$3;
673
820
  case mapCtorString:
674
- return mapTag$3;
821
+ return mapTag$6;
675
822
  case promiseCtorString:
676
823
  return promiseTag;
677
824
  case setCtorString:
678
- return setTag$3;
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 render = (width, height) => {
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(render, RESIZE_RENDER_DELAY);
1570
+ const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
1256
1571
  const onResize = () => {
1257
- const { width: nodeWidth, height: nodeHeight } = container == null ? void 0 : container.getBoundingClientRect();
1258
- const width = adaptiveWidth ? Math.floor(nodeWidth != null ? nodeWidth : s22.options.width) : s22.options.width;
1259
- const height = adaptiveHeight ? Math.floor(nodeHeight != null ? nodeHeight : s22.options.height) : s22.options.height;
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
- render(width, height);
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$d = vue.defineComponent({
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$d(_ctx, _cache, $props, $setup, $data, $options) {
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$d, [["render", _sfc_render$d]]);
1494
- const _sfc_main$c = vue.defineComponent({
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$c(_ctx, _cache, $props, $setup, $data, $options) {
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$c, [["render", _sfc_render$c]]);
1523
- const _sfc_main$b = vue.defineComponent({
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$1 = { key: 0 };
1534
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
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$1, "\uFF0C")) : vue.createCommentVNode("", true),
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$b, [["render", _sfc_render$b]]);
1554
- const _sfc_main$a = vue.defineComponent({
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$a(_ctx, _cache, $props, $setup, $data, $options) {
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$a, [["render", _sfc_render$a]]);
1570
- const _sfc_main$9 = vue.defineComponent({
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$9(_ctx, _cache, $props, $setup, $data, $options) {
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$9, [["render", _sfc_render$9]]);
1593
- const _sfc_main$8 = vue.defineComponent({
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$8(_ctx, _cache, $props, $setup, $data, $options) {
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$8, [["render", _sfc_render$8]]);
1634
- const _sfc_main$7 = vue.defineComponent({
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$7(_ctx, _cache, $props, $setup, $data, $options) {
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$7, [["render", _sfc_render$7]]);
1659
- const _sfc_main$6 = vue.defineComponent({
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$6(_ctx, _cache, $props, $setup, $data, $options) {
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$6, [["render", _sfc_render$6]]);
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$5 = vue.defineComponent({
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$5(_ctx, _cache, $props, $setup, $data, $options) {
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$5, [["render", _sfc_render$5]]);
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$4 = vue.defineComponent({
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$4(_ctx, _cache, $props, $setup, $data, $options) {
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: 0 }, [
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$4, [["render", _sfc_render$4]]);
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
  }
@@ -1938,6 +2353,7 @@ const useEvents = (s2Ref, emit) => {
1938
2353
  useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
1939
2354
  useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
1940
2355
  useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_COLLAPSE_TREE_ROWS, "rowCellCollapseTreeRows");
2356
+ useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_SCROLL, "rowCellScroll");
1941
2357
  useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_HOVER, "colCellHover");
1942
2358
  useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_CLICK, "colCellClick");
1943
2359
  useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_DOUBLE_CLICK, "colCellDoubleClick");
@@ -1953,7 +2369,8 @@ const useEvents = (s2Ref, emit) => {
1953
2369
  useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_MOUSE_UP, "dataCellMouseUp");
1954
2370
  useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_MOUSE_MOVE, "dataCellMouseMove");
1955
2371
  useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_TREND_ICON_CLICK, "dataCellTrendIconClick");
1956
- useS2Event(s2Ref, emit, s2.S2Event.DATE_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
2372
+ useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
2373
+ useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_SELECT_MOVE, "dataCellSelectMove");
1957
2374
  useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_HOVER, "cornerCellHover");
1958
2375
  useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_CLICK, "cornerCellClick");
1959
2376
  useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_DOUBLE_CLICK, "cornerCellDoubleClick");
@@ -2005,6 +2422,7 @@ const useEvents = (s2Ref, emit) => {
2005
2422
  useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_MOUSE_UP, "mouseUp");
2006
2423
  useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_RESET, "reset");
2007
2424
  useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
2425
+ useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_SCROLL, "scroll");
2008
2426
  });
2009
2427
  };
2010
2428
  const useLoading = (s2Ref, loadingProp = false) => {
@@ -2038,11 +2456,14 @@ const useSheetUpdate = (s2Ref, props) => {
2038
2456
  (_a = s2Ref.value) == null ? void 0 : _a.setOptions(options);
2039
2457
  (_b = s2Ref.value) == null ? void 0 : _b.changeSheetSize(options == null ? void 0 : options.width, options == null ? void 0 : options.height);
2040
2458
  }, { deep: vue.isProxy(props.options) });
2041
- vue.watch(() => props.dataCfg, (dataCfg) => {
2042
- var _a;
2459
+ vue.watch(() => props.dataCfg, (dataCfg, prevDataCfg) => {
2460
+ var _a, _b, _c, _d, _e, _f;
2461
+ 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)) {
2462
+ (_e = s2Ref.value) == null ? void 0 : _e.clearColumnLeafNodes();
2463
+ }
2043
2464
  updateFlag.rerender = true;
2044
2465
  updateFlag.reloadData = true;
2045
- (_a = s2Ref.value) == null ? void 0 : _a.setDataCfg(dataCfg);
2466
+ (_f = s2Ref.value) == null ? void 0 : _f.setDataCfg(dataCfg);
2046
2467
  }, { deep: vue.isProxy(props.dataCfg) });
2047
2468
  vue.watch(() => props.themeCfg, (themeCfg) => {
2048
2469
  var _a;
@@ -2101,9 +2522,8 @@ function useSpreadSheet(props, emit) {
2101
2522
  const rawDataCfg = vue.toRaw(dataCfg);
2102
2523
  const rawOptions = vue.toRaw(options);
2103
2524
  const s2Options = getSheetComponentOptions(rawOptions);
2104
- const s2Constructor = [container, rawDataCfg, s2Options];
2105
2525
  if (onSpreadsheet) {
2106
- return onSpreadsheet(...s2Constructor);
2526
+ return onSpreadsheet(container, rawDataCfg, s2Options);
2107
2527
  }
2108
2528
  if (sheetType === "table") {
2109
2529
  return new s2.TableSheet(container, rawDataCfg, s2Options);
@@ -2157,6 +2577,34 @@ const initBaseSheetProps = () => ({
2157
2577
  onSpreadsheet: Function,
2158
2578
  onGetSpreadSheet: Function
2159
2579
  });
2580
+ const initDrillDownProps = () => ({
2581
+ className: String,
2582
+ titleText: {
2583
+ type: String,
2584
+ default: s2.i18n("\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6")
2585
+ },
2586
+ searchText: {
2587
+ type: String,
2588
+ default: s2.i18n("\u641C\u7D22\u5B57\u6BB5")
2589
+ },
2590
+ clearButtonText: {
2591
+ type: String,
2592
+ default: s2.i18n("\u6062\u590D\u9ED8\u8BA4")
2593
+ },
2594
+ extra: Node,
2595
+ dataSet: {
2596
+ type: Array,
2597
+ default: []
2598
+ },
2599
+ drillFields: Array,
2600
+ disabledFields: Array,
2601
+ getDrillFields: Function,
2602
+ setDrillFields: Function
2603
+ });
2604
+ const initDrillDownEmits = () => {
2605
+ const keys2 = ["getDrillFields", "setDrillFields"];
2606
+ return keys2;
2607
+ };
2160
2608
  const initBaseSheetEmits = () => {
2161
2609
  const keys2 = [
2162
2610
  "spreadsheet",
@@ -2182,6 +2630,7 @@ const initBaseSheetEmits = () => {
2182
2630
  "dataCellMouseMove",
2183
2631
  "dataCellTrendIconClick",
2184
2632
  "dataCellBrushSelection",
2633
+ "dataCellSelectMove",
2185
2634
  "cornerCellHover",
2186
2635
  "cornerCellClick",
2187
2636
  "cornerCellDoubleClick",
@@ -2233,7 +2682,7 @@ const initBaseSheetEmits = () => {
2233
2682
  return keys2;
2234
2683
  };
2235
2684
  var baseSheet_vue_vue_type_style_index_0_lang = "";
2236
- const _sfc_main$3 = vue.defineComponent({
2685
+ const _sfc_main$4 = vue.defineComponent({
2237
2686
  name: "BaseSheet",
2238
2687
  props: initBaseSheetProps(),
2239
2688
  emits: initBaseSheetEmits(),
@@ -2274,7 +2723,7 @@ const _sfc_main$3 = vue.defineComponent({
2274
2723
  S2Pagination
2275
2724
  }
2276
2725
  });
2277
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2726
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
2278
2727
  const _component_S2Pagination = vue.resolveComponent("S2Pagination");
2279
2728
  const _component_Spin = vue.resolveComponent("Spin");
2280
2729
  return vue.openBlock(), vue.createBlock(_component_Spin, {
@@ -2303,14 +2752,251 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2303
2752
  _: 1
2304
2753
  }, 8, ["wrapperClassName", "spinning"]);
2305
2754
  }
2306
- var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
2755
+ var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
2756
+ const _hoisted_1$2 = {
2757
+ class: "antv-s2-icon",
2758
+ viewBox: "0 0 1024 1024",
2759
+ xmlns: "http://www.w3.org/2000/svg",
2760
+ width: "12.6",
2761
+ height: "12.6"
2762
+ };
2763
+ const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("path", {
2764
+ 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",
2765
+ fill: "currentColor"
2766
+ }, null, -1);
2767
+ const _hoisted_3$2 = [
2768
+ _hoisted_2$2
2769
+ ];
2770
+ function render$2(_ctx, _cache) {
2771
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
2772
+ }
2773
+ var LocationIcon = { render: render$2 };
2774
+ const _hoisted_1$1 = {
2775
+ class: "antv-s2-icon",
2776
+ viewBox: "0 0 1024 1024",
2777
+ xmlns: "http://www.w3.org/2000/svg",
2778
+ width: "12.6",
2779
+ height: "12.6"
2780
+ };
2781
+ const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode("path", {
2782
+ 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",
2783
+ fill: "currentColor"
2784
+ }, null, -1);
2785
+ const _hoisted_3$1 = [
2786
+ _hoisted_2$1
2787
+ ];
2788
+ function render$1(_ctx, _cache) {
2789
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
2790
+ }
2791
+ var TextIcon = { render: render$1 };
2792
+ const _hoisted_1 = {
2793
+ class: "antv-s2-icon",
2794
+ viewBox: "0 0 1024 1024",
2795
+ xmlns: "http://www.w3.org/2000/svg",
2796
+ width: "12.6",
2797
+ height: "12.6"
2798
+ };
2799
+ const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("path", {
2800
+ 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",
2801
+ fill: "currentColor"
2802
+ }, null, -1);
2803
+ const _hoisted_3 = [
2804
+ _hoisted_2
2805
+ ];
2806
+ function render(_ctx, _cache) {
2807
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _hoisted_3);
2808
+ }
2809
+ var CalendarIcon = { render };
2810
+ var index_vue_vue_type_style_index_0_scoped_true_lang = "";
2811
+ const _sfc_main$3 = vue.defineComponent({
2812
+ name: "DrillDown",
2813
+ props: initDrillDownProps(),
2814
+ emits: initDrillDownEmits(),
2815
+ methods: {},
2816
+ components: {
2817
+ Button: antDesignVue.Button,
2818
+ Input: antDesignVue.Input,
2819
+ Empty: antDesignVue.Empty,
2820
+ Menu: antDesignVue.Menu,
2821
+ MenuItem: antDesignVue.MenuItem,
2822
+ LocationIcon,
2823
+ TextIcon,
2824
+ CalendarIcon
2825
+ },
2826
+ setup(props) {
2827
+ const {
2828
+ dataSet,
2829
+ disabledFields,
2830
+ getDrillFields,
2831
+ setDrillFields,
2832
+ className
2833
+ } = props;
2834
+ const getOptions = () => {
2835
+ return dataSet.map((val) => {
2836
+ val.disabled = !!(disabledFields && disabledFields.includes(val.value));
2837
+ return val;
2838
+ });
2839
+ };
2840
+ const options = vue.ref(getOptions());
2841
+ const selected = vue.ref([]);
2842
+ const handleSearch = (e) => {
2843
+ const { value } = e.target;
2844
+ if (!value) {
2845
+ options.value = [...dataSet];
2846
+ } else {
2847
+ const reg = new RegExp(value, "gi");
2848
+ const result = dataSet.filter((item) => reg.test(item.name));
2849
+ options.value = [...result];
2850
+ }
2851
+ };
2852
+ const handleSelect = (value) => {
2853
+ const key = value == null ? void 0 : value.selectedKeys;
2854
+ selected.value = key;
2855
+ if (getDrillFields) {
2856
+ getDrillFields(key);
2857
+ }
2858
+ if (setDrillFields)
2859
+ setDrillFields(key);
2860
+ };
2861
+ const handleClear = (e) => {
2862
+ e.stopPropagation();
2863
+ selected.value = [];
2864
+ if (getDrillFields)
2865
+ getDrillFields([]);
2866
+ if (setDrillFields)
2867
+ setDrillFields([]);
2868
+ };
2869
+ return {
2870
+ options,
2871
+ handleSearch,
2872
+ handleSelect,
2873
+ handleClear,
2874
+ className,
2875
+ selected,
2876
+ isEmpty,
2877
+ DRILL_DOWN_PRE_CLASS
2878
+ };
2879
+ }
2880
+ });
2881
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2882
+ const _component_Button = vue.resolveComponent("Button");
2883
+ const _component_Input = vue.resolveComponent("Input");
2884
+ const _component_Empty = vue.resolveComponent("Empty");
2885
+ const _component_text_icon = vue.resolveComponent("text-icon");
2886
+ const _component_calendar_icon = vue.resolveComponent("calendar-icon");
2887
+ const _component_location_icon = vue.resolveComponent("location-icon");
2888
+ const _component_MenuItem = vue.resolveComponent("MenuItem");
2889
+ const _component_Menu = vue.resolveComponent("Menu");
2890
+ return vue.openBlock(), vue.createElementBlock("div", {
2891
+ class: vue.normalizeClass([_ctx.DRILL_DOWN_PRE_CLASS, _ctx.className])
2892
+ }, [
2893
+ vue.createElementVNode("header", {
2894
+ class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-header`)
2895
+ }, [
2896
+ vue.createElementVNode("div", null, vue.toDisplayString(_ctx.titleText), 1),
2897
+ vue.createVNode(_component_Button, {
2898
+ type: "link",
2899
+ onClick: _ctx.handleClear
2900
+ }, {
2901
+ default: vue.withCtx(() => [
2902
+ vue.createTextVNode(vue.toDisplayString(_ctx.clearButtonText), 1)
2903
+ ]),
2904
+ _: 1
2905
+ }, 8, ["onClick"])
2906
+ ], 2),
2907
+ vue.createVNode(_component_Input, {
2908
+ class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-search`),
2909
+ placeholder: _ctx.searchText,
2910
+ onChange: _ctx.handleSearch,
2911
+ onPressEnter: _ctx.handleSearch,
2912
+ allowClear: true
2913
+ }, null, 8, ["class", "placeholder", "onChange", "onPressEnter"]),
2914
+ _ctx.isEmpty(_ctx.options) ? (vue.openBlock(), vue.createBlock(_component_Empty, {
2915
+ key: 0,
2916
+ imageStyle: { height: "64px" },
2917
+ class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-empty`)
2918
+ }, null, 8, ["class"])) : vue.createCommentVNode("", true),
2919
+ vue.createVNode(_component_Menu, {
2920
+ class: "`${DRILL_DOWN_PRE_CLASS}-menu`",
2921
+ selectedKeys: _ctx.selected,
2922
+ "onUpdate:selectedKeys": _cache[0] || (_cache[0] = ($event) => _ctx.selected = $event),
2923
+ onSelect: _ctx.handleSelect
2924
+ }, {
2925
+ default: vue.withCtx(() => [
2926
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (option) => {
2927
+ return vue.openBlock(), vue.createBlock(_component_MenuItem, {
2928
+ key: option.value,
2929
+ disabled: option.disabled,
2930
+ class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-menu-item`)
2931
+ }, {
2932
+ icon: vue.withCtx(() => [
2933
+ option.type === "text" ? (vue.openBlock(), vue.createBlock(_component_text_icon, { key: 0 })) : vue.createCommentVNode("", true),
2934
+ option.type === "date" ? (vue.openBlock(), vue.createBlock(_component_calendar_icon, { key: 1 })) : vue.createCommentVNode("", true),
2935
+ option.type === "location" ? (vue.openBlock(), vue.createBlock(_component_location_icon, { key: 2 })) : vue.createCommentVNode("", true)
2936
+ ]),
2937
+ default: vue.withCtx(() => [
2938
+ vue.createTextVNode(" " + vue.toDisplayString(option == null ? void 0 : option.name), 1)
2939
+ ]),
2940
+ _: 2
2941
+ }, 1032, ["disabled", "class"]);
2942
+ }), 128))
2943
+ ]),
2944
+ _: 1
2945
+ }, 8, ["selectedKeys", "onSelect"])
2946
+ ], 2);
2947
+ }
2948
+ var DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-6eb1ccd0"]]);
2307
2949
  const _sfc_main$2 = vue.defineComponent({
2308
2950
  name: "PivotSheet",
2309
- props: [],
2310
- emits: [],
2951
+ props: initBaseSheetProps(),
2952
+ emits: initBaseSheetEmits(),
2311
2953
  setup(props, ctx) {
2312
2954
  const s2Ref = useExpose(ctx.expose);
2313
- return { s2Ref };
2955
+ const { options: pivotOptions } = vue.toRefs(props);
2956
+ const { dataCfg, partDrillDown } = vue.toRefs(props);
2957
+ const drillFields = vue.ref([]);
2958
+ const setDrillFields = (fields) => {
2959
+ var _a, _b, _c, _d, _e, _f;
2960
+ const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
2961
+ drillFields.value = fields;
2962
+ instance == null ? void 0 : instance.hideTooltip();
2963
+ if (isEmpty(fields)) {
2964
+ instance == null ? void 0 : instance.clearDrillDownData((_b = instance == null ? void 0 : instance.store.get("drillDownNode")) == null ? void 0 : _b.id);
2965
+ } else {
2966
+ handleDrillDown({
2967
+ rows: (_d = (_c = dataCfg.value) == null ? void 0 : _c.fields.rows) != null ? _d : [],
2968
+ drillFields: fields,
2969
+ fetchData: (_e = partDrillDown.value) == null ? void 0 : _e.fetchData,
2970
+ drillItemsNum: (_f = partDrillDown.value) == null ? void 0 : _f.drillItemsNum,
2971
+ spreadsheet: instance
2972
+ });
2973
+ }
2974
+ };
2975
+ const onDrillDownIconClick = (params) => {
2976
+ var _a, _b;
2977
+ const { event, disabledFields } = params;
2978
+ if (event) {
2979
+ const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
2980
+ const drillDownNode = vue.createVNode(DrillDown, __spreadProps(__spreadValues({}, (_b = partDrillDown.value) == null ? void 0 : _b.drillConfig), {
2981
+ setDrillFields,
2982
+ drillFields: drillFields.value,
2983
+ disabledFields
2984
+ }));
2985
+ instance == null ? void 0 : instance.showTooltip({
2986
+ position: {
2987
+ x: event.clientX,
2988
+ y: event.clientY
2989
+ },
2990
+ event,
2991
+ content: drillDownNode
2992
+ });
2993
+ }
2994
+ };
2995
+ const options = vue.computed(() => buildDrillDownOptions(pivotOptions.value, partDrillDown.value, (params) => onDrillDownIconClick(params)));
2996
+ return {
2997
+ s2Ref,
2998
+ options
2999
+ };
2314
3000
  },
2315
3001
  components: {
2316
3002
  BaseSheet
@@ -2318,7 +3004,10 @@ const _sfc_main$2 = vue.defineComponent({
2318
3004
  });
2319
3005
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2320
3006
  const _component_BaseSheet = vue.resolveComponent("BaseSheet");
2321
- return vue.openBlock(), vue.createBlock(_component_BaseSheet, { ref: "s2Ref" }, null, 512);
3007
+ return vue.openBlock(), vue.createBlock(_component_BaseSheet, vue.mergeProps(_ctx.$props, {
3008
+ ref: "s2Ref",
3009
+ options: _ctx.options
3010
+ }), null, 16, ["options"]);
2322
3011
  }
2323
3012
  var PivotSheet = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
2324
3013
  const _sfc_main$1 = vue.defineComponent({