@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/esm/index.js CHANGED
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { customMerge, DEFAULT_OPTIONS, extendLocale, S2Event, i18n, S2_PREFIX_CLS, TOOLTIP_PREFIX_CLS, getIcon, getTooltipDefaultOptions, BaseTooltip, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
21
- import { shallowRef, ref, computed, watch, defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, createTextVNode, createBlock, withCtx, render, onMounted, reactive, isProxy, onBeforeUnmount, toRaw, resolveDynamicComponent } from "vue";
22
- import { Pagination, Menu, Dropdown, Spin } from "ant-design-vue";
20
+ import { customMerge, DEFAULT_OPTIONS, S2Event, i18n, extendLocale, S2_PREFIX_CLS, TOOLTIP_PREFIX_CLS, getIcon, getTooltipDefaultOptions, BaseTooltip, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
21
+ import { shallowRef, ref, computed, watch, defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, createTextVNode, createBlock, withCtx, renderSlot, render as render$3, onMounted, reactive, isProxy, onBeforeUnmount, toRaw, toRefs, mergeProps, resolveDynamicComponent } from "vue";
22
+ import { Pagination, Menu, Dropdown, Spin, Button, Input, Empty, MenuItem } from "ant-design-vue";
23
23
  const SHEET_COMPONENT_DEFAULT_OPTIONS = {
24
24
  tooltip: {
25
25
  showTooltip: true,
@@ -40,12 +40,12 @@ var root = freeGlobal$1 || freeSelf || Function("return this")();
40
40
  var root$1 = root;
41
41
  var Symbol$1 = root$1.Symbol;
42
42
  var Symbol$2 = Symbol$1;
43
- var objectProto$c = Object.prototype;
44
- var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
45
- var nativeObjectToString$1 = objectProto$c.toString;
43
+ var objectProto$f = Object.prototype;
44
+ var hasOwnProperty$c = objectProto$f.hasOwnProperty;
45
+ var nativeObjectToString$1 = objectProto$f.toString;
46
46
  var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
47
47
  function getRawTag(value) {
48
- var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), tag = value[symToStringTag$1];
48
+ var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
49
49
  try {
50
50
  value[symToStringTag$1] = void 0;
51
51
  var unmasked = true;
@@ -61,8 +61,8 @@ function getRawTag(value) {
61
61
  }
62
62
  return result;
63
63
  }
64
- var objectProto$b = Object.prototype;
65
- var nativeObjectToString = objectProto$b.toString;
64
+ var objectProto$e = Object.prototype;
65
+ var nativeObjectToString = objectProto$e.toString;
66
66
  function objectToString(value) {
67
67
  return nativeObjectToString.call(value);
68
68
  }
@@ -77,9 +77,9 @@ function baseGetTag(value) {
77
77
  function isObjectLike(value) {
78
78
  return value != null && typeof value == "object";
79
79
  }
80
- var symbolTag$1 = "[object Symbol]";
80
+ var symbolTag$3 = "[object Symbol]";
81
81
  function isSymbol(value) {
82
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
82
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
83
83
  }
84
84
  function arrayMap(array, iteratee) {
85
85
  var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
@@ -91,7 +91,7 @@ function arrayMap(array, iteratee) {
91
91
  var isArray = Array.isArray;
92
92
  var isArray$1 = isArray;
93
93
  var INFINITY$1 = 1 / 0;
94
- var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
94
+ var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
95
95
  function baseToString(value) {
96
96
  if (typeof value == "string") {
97
97
  return value;
@@ -146,13 +146,13 @@ function toNumber(value) {
146
146
  function identity(value) {
147
147
  return value;
148
148
  }
149
- var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
149
+ var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
150
150
  function isFunction(value) {
151
151
  if (!isObject(value)) {
152
152
  return false;
153
153
  }
154
154
  var tag = baseGetTag(value);
155
- return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
155
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
156
156
  }
157
157
  var coreJsData = root$1["__core-js_shared__"];
158
158
  var coreJsData$1 = coreJsData;
@@ -180,10 +180,10 @@ function toSource(func) {
180
180
  }
181
181
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
182
182
  var reIsHostCtor = /^\[object .+?Constructor\]$/;
183
- var funcProto = Function.prototype, objectProto$a = Object.prototype;
183
+ var funcProto = Function.prototype, objectProto$d = Object.prototype;
184
184
  var funcToString = funcProto.toString;
185
- var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
186
- var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
185
+ var hasOwnProperty$b = objectProto$d.hasOwnProperty;
186
+ var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
187
187
  function baseIsNative(value) {
188
188
  if (!isObject(value) || isMasked(value)) {
189
189
  return false;
@@ -200,6 +200,50 @@ function getNative(object, key) {
200
200
  }
201
201
  var WeakMap = getNative(root$1, "WeakMap");
202
202
  var WeakMap$1 = WeakMap;
203
+ var objectCreate = Object.create;
204
+ var baseCreate = function() {
205
+ function object() {
206
+ }
207
+ return function(proto) {
208
+ if (!isObject(proto)) {
209
+ return {};
210
+ }
211
+ if (objectCreate) {
212
+ return objectCreate(proto);
213
+ }
214
+ object.prototype = proto;
215
+ var result = new object();
216
+ object.prototype = void 0;
217
+ return result;
218
+ };
219
+ }();
220
+ var baseCreate$1 = baseCreate;
221
+ function copyArray(source, array) {
222
+ var index2 = -1, length = source.length;
223
+ array || (array = Array(length));
224
+ while (++index2 < length) {
225
+ array[index2] = source[index2];
226
+ }
227
+ return array;
228
+ }
229
+ var defineProperty = function() {
230
+ try {
231
+ var func = getNative(Object, "defineProperty");
232
+ func({}, "", {});
233
+ return func;
234
+ } catch (e) {
235
+ }
236
+ }();
237
+ var defineProperty$1 = defineProperty;
238
+ function arrayEach(array, iteratee) {
239
+ var index2 = -1, length = array == null ? 0 : array.length;
240
+ while (++index2 < length) {
241
+ if (iteratee(array[index2], index2, array) === false) {
242
+ break;
243
+ }
244
+ }
245
+ return array;
246
+ }
203
247
  var MAX_SAFE_INTEGER$1 = 9007199254740991;
204
248
  var reIsUint = /^(?:0|[1-9]\d*)$/;
205
249
  function isIndex(value, length) {
@@ -207,9 +251,47 @@ function isIndex(value, length) {
207
251
  length = length == null ? MAX_SAFE_INTEGER$1 : length;
208
252
  return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
209
253
  }
254
+ function baseAssignValue(object, key, value) {
255
+ if (key == "__proto__" && defineProperty$1) {
256
+ defineProperty$1(object, key, {
257
+ "configurable": true,
258
+ "enumerable": true,
259
+ "value": value,
260
+ "writable": true
261
+ });
262
+ } else {
263
+ object[key] = value;
264
+ }
265
+ }
210
266
  function eq(value, other) {
211
267
  return value === other || value !== value && other !== other;
212
268
  }
269
+ var objectProto$c = Object.prototype;
270
+ var hasOwnProperty$a = objectProto$c.hasOwnProperty;
271
+ function assignValue(object, key, value) {
272
+ var objValue = object[key];
273
+ if (!(hasOwnProperty$a.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
274
+ baseAssignValue(object, key, value);
275
+ }
276
+ }
277
+ function copyObject(source, props, object, customizer) {
278
+ var isNew = !object;
279
+ object || (object = {});
280
+ var index2 = -1, length = props.length;
281
+ while (++index2 < length) {
282
+ var key = props[index2];
283
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
284
+ if (newValue === void 0) {
285
+ newValue = source[key];
286
+ }
287
+ if (isNew) {
288
+ baseAssignValue(object, key, newValue);
289
+ } else {
290
+ assignValue(object, key, newValue);
291
+ }
292
+ }
293
+ return object;
294
+ }
213
295
  var MAX_SAFE_INTEGER = 9007199254740991;
214
296
  function isLength(value) {
215
297
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
@@ -217,9 +299,9 @@ function isLength(value) {
217
299
  function isArrayLike(value) {
218
300
  return value != null && isLength(value.length) && !isFunction(value);
219
301
  }
220
- var objectProto$9 = Object.prototype;
302
+ var objectProto$b = Object.prototype;
221
303
  function isPrototype(value) {
222
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$9;
304
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$b;
223
305
  return value === proto;
224
306
  }
225
307
  function baseTimes(n, iteratee) {
@@ -229,34 +311,34 @@ function baseTimes(n, iteratee) {
229
311
  }
230
312
  return result;
231
313
  }
232
- var argsTag$2 = "[object Arguments]";
314
+ var argsTag$3 = "[object Arguments]";
233
315
  function baseIsArguments(value) {
234
- return isObjectLike(value) && baseGetTag(value) == argsTag$2;
316
+ return isObjectLike(value) && baseGetTag(value) == argsTag$3;
235
317
  }
236
- var objectProto$8 = Object.prototype;
237
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
238
- var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
318
+ var objectProto$a = Object.prototype;
319
+ var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
320
+ var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
239
321
  var isArguments = baseIsArguments(function() {
240
322
  return arguments;
241
323
  }()) ? baseIsArguments : function(value) {
242
- return isObjectLike(value) && hasOwnProperty$7.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
324
+ return isObjectLike(value) && hasOwnProperty$9.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
243
325
  };
244
326
  var isArguments$1 = isArguments;
245
327
  function stubFalse() {
246
328
  return false;
247
329
  }
248
- var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
249
- var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
250
- var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
251
- var Buffer2 = moduleExports$1 ? root$1.Buffer : void 0;
252
- var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
330
+ var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
331
+ var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
332
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
333
+ var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0;
334
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
253
335
  var isBuffer = nativeIsBuffer || stubFalse;
254
336
  var isBuffer$1 = isBuffer;
255
- 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]";
256
- 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]";
337
+ 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]";
338
+ 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]";
257
339
  var typedArrayTags = {};
258
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
259
- 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;
340
+ 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;
341
+ 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;
260
342
  function baseIsTypedArray(value) {
261
343
  return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
262
344
  }
@@ -265,13 +347,13 @@ function baseUnary(func) {
265
347
  return func(value);
266
348
  };
267
349
  }
268
- var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
269
- var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
270
- var moduleExports = freeModule && freeModule.exports === freeExports;
271
- var freeProcess = moduleExports && freeGlobal$1.process;
350
+ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
351
+ var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
352
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
353
+ var freeProcess = moduleExports$1 && freeGlobal$1.process;
272
354
  var nodeUtil = function() {
273
355
  try {
274
- var types = freeModule && freeModule.require && freeModule.require("util").types;
356
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
275
357
  if (types) {
276
358
  return types;
277
359
  }
@@ -283,12 +365,12 @@ var nodeUtil$1 = nodeUtil;
283
365
  var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
284
366
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
285
367
  var isTypedArray$1 = isTypedArray;
286
- var objectProto$7 = Object.prototype;
287
- var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
368
+ var objectProto$9 = Object.prototype;
369
+ var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
288
370
  function arrayLikeKeys(value, inherited) {
289
371
  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;
290
372
  for (var key in value) {
291
- 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)))) {
373
+ 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)))) {
292
374
  result.push(key);
293
375
  }
294
376
  }
@@ -301,15 +383,15 @@ function overArg(func, transform) {
301
383
  }
302
384
  var nativeKeys = overArg(Object.keys, Object);
303
385
  var nativeKeys$1 = nativeKeys;
304
- var objectProto$6 = Object.prototype;
305
- var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
386
+ var objectProto$8 = Object.prototype;
387
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
306
388
  function baseKeys(object) {
307
389
  if (!isPrototype(object)) {
308
390
  return nativeKeys$1(object);
309
391
  }
310
392
  var result = [];
311
393
  for (var key in Object(object)) {
312
- if (hasOwnProperty$5.call(object, key) && key != "constructor") {
394
+ if (hasOwnProperty$7.call(object, key) && key != "constructor") {
313
395
  result.push(key);
314
396
  }
315
397
  }
@@ -318,6 +400,32 @@ function baseKeys(object) {
318
400
  function keys(object) {
319
401
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
320
402
  }
403
+ function nativeKeysIn(object) {
404
+ var result = [];
405
+ if (object != null) {
406
+ for (var key in Object(object)) {
407
+ result.push(key);
408
+ }
409
+ }
410
+ return result;
411
+ }
412
+ var objectProto$7 = Object.prototype;
413
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
414
+ function baseKeysIn(object) {
415
+ if (!isObject(object)) {
416
+ return nativeKeysIn(object);
417
+ }
418
+ var isProto = isPrototype(object), result = [];
419
+ for (var key in object) {
420
+ if (!(key == "constructor" && (isProto || !hasOwnProperty$6.call(object, key)))) {
421
+ result.push(key);
422
+ }
423
+ }
424
+ return result;
425
+ }
426
+ function keysIn(object) {
427
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
428
+ }
321
429
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
322
430
  function isKey(value, object) {
323
431
  if (isArray$1(value)) {
@@ -341,21 +449,21 @@ function hashDelete(key) {
341
449
  return result;
342
450
  }
343
451
  var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
344
- var objectProto$5 = Object.prototype;
345
- var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
452
+ var objectProto$6 = Object.prototype;
453
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
346
454
  function hashGet(key) {
347
455
  var data = this.__data__;
348
456
  if (nativeCreate$1) {
349
457
  var result = data[key];
350
458
  return result === HASH_UNDEFINED$2 ? void 0 : result;
351
459
  }
352
- return hasOwnProperty$4.call(data, key) ? data[key] : void 0;
460
+ return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
353
461
  }
354
- var objectProto$4 = Object.prototype;
355
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
462
+ var objectProto$5 = Object.prototype;
463
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
356
464
  function hashHas(key) {
357
465
  var data = this.__data__;
358
- return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$3.call(data, key);
466
+ return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
359
467
  }
360
468
  var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
361
469
  function hashSet(key, value) {
@@ -562,6 +670,8 @@ function arrayPush(array, values) {
562
670
  }
563
671
  return array;
564
672
  }
673
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
674
+ var getPrototype$1 = getPrototype;
565
675
  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";
566
676
  var rsZWJ$1 = "\\u200d";
567
677
  var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
@@ -618,6 +728,24 @@ Stack.prototype["delete"] = stackDelete;
618
728
  Stack.prototype.get = stackGet;
619
729
  Stack.prototype.has = stackHas;
620
730
  Stack.prototype.set = stackSet;
731
+ function baseAssign(object, source) {
732
+ return object && copyObject(source, keys(source), object);
733
+ }
734
+ function baseAssignIn(object, source) {
735
+ return object && copyObject(source, keysIn(source), object);
736
+ }
737
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
738
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
739
+ var moduleExports = freeModule && freeModule.exports === freeExports;
740
+ var Buffer2 = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
741
+ function cloneBuffer(buffer, isDeep) {
742
+ if (isDeep) {
743
+ return buffer.slice();
744
+ }
745
+ var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
746
+ buffer.copy(result);
747
+ return result;
748
+ }
621
749
  function arrayFilter(array, predicate) {
622
750
  var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
623
751
  while (++index2 < length) {
@@ -631,19 +759,35 @@ function arrayFilter(array, predicate) {
631
759
  function stubArray() {
632
760
  return [];
633
761
  }
634
- var objectProto$3 = Object.prototype;
635
- var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
636
- var nativeGetSymbols = Object.getOwnPropertySymbols;
637
- var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
762
+ var objectProto$4 = Object.prototype;
763
+ var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
764
+ var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
765
+ var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
638
766
  if (object == null) {
639
767
  return [];
640
768
  }
641
769
  object = Object(object);
642
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
770
+ return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
643
771
  return propertyIsEnumerable.call(object, symbol);
644
772
  });
645
773
  };
646
774
  var getSymbols$1 = getSymbols;
775
+ function copySymbols(source, object) {
776
+ return copyObject(source, getSymbols$1(source), object);
777
+ }
778
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
779
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
780
+ var result = [];
781
+ while (object) {
782
+ arrayPush(result, getSymbols$1(object));
783
+ object = getPrototype$1(object);
784
+ }
785
+ return result;
786
+ };
787
+ var getSymbolsIn$1 = getSymbolsIn;
788
+ function copySymbolsIn(source, object) {
789
+ return copyObject(source, getSymbolsIn$1(source), object);
790
+ }
647
791
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
648
792
  var result = keysFunc(object);
649
793
  return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
@@ -651,39 +795,197 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
651
795
  function getAllKeys(object) {
652
796
  return baseGetAllKeys(object, keys, getSymbols$1);
653
797
  }
798
+ function getAllKeysIn(object) {
799
+ return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
800
+ }
654
801
  var DataView = getNative(root$1, "DataView");
655
802
  var DataView$1 = DataView;
656
803
  var Promise$1 = getNative(root$1, "Promise");
657
804
  var Promise$2 = Promise$1;
658
805
  var Set = getNative(root$1, "Set");
659
806
  var Set$1 = Set;
660
- var mapTag$3 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag = "[object WeakMap]";
661
- var dataViewTag$1 = "[object DataView]";
807
+ var mapTag$6 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$6 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
808
+ var dataViewTag$3 = "[object DataView]";
662
809
  var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
663
810
  var getTag = baseGetTag;
664
- 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) {
811
+ 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) {
665
812
  getTag = function(value) {
666
- var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
813
+ var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
667
814
  if (ctorString) {
668
815
  switch (ctorString) {
669
816
  case dataViewCtorString:
670
- return dataViewTag$1;
817
+ return dataViewTag$3;
671
818
  case mapCtorString:
672
- return mapTag$3;
819
+ return mapTag$6;
673
820
  case promiseCtorString:
674
821
  return promiseTag;
675
822
  case setCtorString:
676
- return setTag$3;
823
+ return setTag$6;
677
824
  case weakMapCtorString:
678
- return weakMapTag;
825
+ return weakMapTag$1;
679
826
  }
680
827
  }
681
828
  return result;
682
829
  };
683
830
  }
684
831
  var getTag$1 = getTag;
832
+ var objectProto$3 = Object.prototype;
833
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
834
+ function initCloneArray(array) {
835
+ var length = array.length, result = new array.constructor(length);
836
+ if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
837
+ result.index = array.index;
838
+ result.input = array.input;
839
+ }
840
+ return result;
841
+ }
685
842
  var Uint8Array2 = root$1.Uint8Array;
686
843
  var Uint8Array$1 = Uint8Array2;
844
+ function cloneArrayBuffer(arrayBuffer) {
845
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
846
+ new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
847
+ return result;
848
+ }
849
+ function cloneDataView(dataView, isDeep) {
850
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
851
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
852
+ }
853
+ var reFlags = /\w*$/;
854
+ function cloneRegExp(regexp) {
855
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
856
+ result.lastIndex = regexp.lastIndex;
857
+ return result;
858
+ }
859
+ var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
860
+ function cloneSymbol(symbol) {
861
+ return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
862
+ }
863
+ function cloneTypedArray(typedArray, isDeep) {
864
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
865
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
866
+ }
867
+ 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]";
868
+ 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]";
869
+ function initCloneByTag(object, tag, isDeep) {
870
+ var Ctor = object.constructor;
871
+ switch (tag) {
872
+ case arrayBufferTag$2:
873
+ return cloneArrayBuffer(object);
874
+ case boolTag$3:
875
+ case dateTag$2:
876
+ return new Ctor(+object);
877
+ case dataViewTag$2:
878
+ return cloneDataView(object, isDeep);
879
+ case float32Tag$1:
880
+ case float64Tag$1:
881
+ case int8Tag$1:
882
+ case int16Tag$1:
883
+ case int32Tag$1:
884
+ case uint8Tag$1:
885
+ case uint8ClampedTag$1:
886
+ case uint16Tag$1:
887
+ case uint32Tag$1:
888
+ return cloneTypedArray(object, isDeep);
889
+ case mapTag$5:
890
+ return new Ctor();
891
+ case numberTag$2:
892
+ case stringTag$3:
893
+ return new Ctor(object);
894
+ case regexpTag$2:
895
+ return cloneRegExp(object);
896
+ case setTag$5:
897
+ return new Ctor();
898
+ case symbolTag$2:
899
+ return cloneSymbol(object);
900
+ }
901
+ }
902
+ function initCloneObject(object) {
903
+ return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
904
+ }
905
+ var mapTag$4 = "[object Map]";
906
+ function baseIsMap(value) {
907
+ return isObjectLike(value) && getTag$1(value) == mapTag$4;
908
+ }
909
+ var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
910
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
911
+ var isMap$1 = isMap;
912
+ var setTag$4 = "[object Set]";
913
+ function baseIsSet(value) {
914
+ return isObjectLike(value) && getTag$1(value) == setTag$4;
915
+ }
916
+ var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
917
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
918
+ var isSet$1 = isSet;
919
+ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
920
+ 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]";
921
+ 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]";
922
+ var cloneableTags = {};
923
+ 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;
924
+ cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
925
+ function baseClone(value, bitmask, customizer, key, object, stack) {
926
+ var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
927
+ if (customizer) {
928
+ result = object ? customizer(value, key, object, stack) : customizer(value);
929
+ }
930
+ if (result !== void 0) {
931
+ return result;
932
+ }
933
+ if (!isObject(value)) {
934
+ return value;
935
+ }
936
+ var isArr = isArray$1(value);
937
+ if (isArr) {
938
+ result = initCloneArray(value);
939
+ if (!isDeep) {
940
+ return copyArray(value, result);
941
+ }
942
+ } else {
943
+ var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
944
+ if (isBuffer$1(value)) {
945
+ return cloneBuffer(value, isDeep);
946
+ }
947
+ if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
948
+ result = isFlat || isFunc ? {} : initCloneObject(value);
949
+ if (!isDeep) {
950
+ return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
951
+ }
952
+ } else {
953
+ if (!cloneableTags[tag]) {
954
+ return object ? value : {};
955
+ }
956
+ result = initCloneByTag(value, tag, isDeep);
957
+ }
958
+ }
959
+ stack || (stack = new Stack());
960
+ var stacked = stack.get(value);
961
+ if (stacked) {
962
+ return stacked;
963
+ }
964
+ stack.set(value, result);
965
+ if (isSet$1(value)) {
966
+ value.forEach(function(subValue) {
967
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
968
+ });
969
+ } else if (isMap$1(value)) {
970
+ value.forEach(function(subValue, key2) {
971
+ result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
972
+ });
973
+ }
974
+ var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
975
+ var props = isArr ? void 0 : keysFunc(value);
976
+ arrayEach(props || value, function(subValue, key2) {
977
+ if (props) {
978
+ key2 = subValue;
979
+ subValue = value[key2];
980
+ }
981
+ assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
982
+ });
983
+ return result;
984
+ }
985
+ var CLONE_SYMBOLS_FLAG = 4;
986
+ function clone(value) {
987
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
988
+ }
687
989
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
688
990
  function setCacheAdd(value) {
689
991
  this.__data__.set(value, HASH_UNDEFINED);
@@ -1150,6 +1452,19 @@ function debounce(func, wait, options) {
1150
1452
  debounced.flush = flush;
1151
1453
  return debounced;
1152
1454
  }
1455
+ function baseFilter(collection, predicate) {
1456
+ var result = [];
1457
+ baseEach$1(collection, function(value, index2, collection2) {
1458
+ if (predicate(value, index2, collection2)) {
1459
+ result.push(value);
1460
+ }
1461
+ });
1462
+ return result;
1463
+ }
1464
+ function filter(collection, predicate) {
1465
+ var func = isArray$1(collection) ? arrayFilter : baseFilter;
1466
+ return func(collection, baseIteratee(predicate));
1467
+ }
1153
1468
  var stringTag = "[object String]";
1154
1469
  function isString(value) {
1155
1470
  return typeof value == "string" || !isArray$1(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
@@ -1252,9 +1567,9 @@ const createResizeObserver = (params) => {
1252
1567
  };
1253
1568
  const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
1254
1569
  const onResize = () => {
1255
- const { width: nodeWidth, height: nodeHeight } = container == null ? void 0 : container.getBoundingClientRect();
1256
- const width = adaptiveWidth ? Math.floor(nodeWidth != null ? nodeWidth : s2.options.width) : s2.options.width;
1257
- const height = adaptiveHeight ? Math.floor(nodeHeight != null ? nodeHeight : s2.options.height) : s2.options.height;
1570
+ const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
1571
+ const width = adaptiveWidth ? Math.floor(containerWidth != null ? containerWidth : s2.options.width) : s2.options.width;
1572
+ const height = adaptiveHeight ? Math.floor(containerHeight != null ? containerHeight : s2.options.height) : s2.options.height;
1258
1573
  if (!adaptiveWidth && !adaptiveHeight) {
1259
1574
  return;
1260
1575
  }
@@ -1277,6 +1592,99 @@ const createResizeObserver = (params) => {
1277
1592
  resizeObserver.unobserve(actualWrapper);
1278
1593
  };
1279
1594
  };
1595
+ const getDrillDownCache = (spreadsheet, meta) => {
1596
+ const drillDownDataCache = spreadsheet.store.get("drillDownDataCache", []);
1597
+ const cache = drillDownDataCache.find((dc) => dc.rowId === meta.id);
1598
+ return {
1599
+ drillDownDataCache,
1600
+ drillDownCurrentCache: cache
1601
+ };
1602
+ };
1603
+ const handleActionIconClick = (params) => {
1604
+ const { meta, event, callback } = params;
1605
+ const { spreadsheet } = meta;
1606
+ spreadsheet.store.set("drillDownNode", meta);
1607
+ const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
1608
+ const cache = (drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField) ? [drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField] : [];
1609
+ const disabled = [];
1610
+ drillDownDataCache.forEach((val) => {
1611
+ if (meta.id.includes(val.rowId) && meta.id !== val.rowId) {
1612
+ disabled.push(val.drillField);
1613
+ }
1614
+ });
1615
+ if (event) {
1616
+ spreadsheet.emit(S2Event.GLOBAL_ACTION_ICON_CLICK, event);
1617
+ }
1618
+ callback({
1619
+ sheetInstance: spreadsheet,
1620
+ cacheDrillFields: cache,
1621
+ disabledFields: disabled,
1622
+ event
1623
+ });
1624
+ };
1625
+ const defaultDisplayCondition = (meta) => {
1626
+ const iconLevel = get(meta, "spreadsheet.dataCfg.fields.rows.length") - 1;
1627
+ return iconLevel <= meta.level && meta.spreadsheet.options.hierarchyType === "tree" && meta.spreadsheet.isValueInCols() && meta.label !== i18n("\u603B\u8BA1");
1628
+ };
1629
+ const buildDrillDownOptions = (options, partDrillDown, callback) => {
1630
+ var _a;
1631
+ const nextHeaderIcons = ((_a = options.headerActionIcons) == null ? void 0 : _a.length) ? [...options.headerActionIcons] : [];
1632
+ if (!isEmpty(partDrillDown)) {
1633
+ const drillDownActionIcon = {
1634
+ belongsCell: "rowCell",
1635
+ iconNames: ["DrillDownIcon"],
1636
+ defaultHide: true,
1637
+ displayCondition: partDrillDown.displayCondition || defaultDisplayCondition,
1638
+ action: (actionIconProps) => {
1639
+ const { iconName, meta, event } = actionIconProps;
1640
+ if (iconName === "DrillDownIcon") {
1641
+ meta.spreadsheet.store.set("drillDownNode", meta);
1642
+ handleActionIconClick({
1643
+ meta,
1644
+ event,
1645
+ callback
1646
+ });
1647
+ }
1648
+ }
1649
+ };
1650
+ nextHeaderIcons.push(drillDownActionIcon);
1651
+ }
1652
+ return __spreadProps(__spreadValues({}, options), {
1653
+ headerActionIcons: nextHeaderIcons
1654
+ });
1655
+ };
1656
+ const handleDrillDown = (params) => {
1657
+ const { fetchData, spreadsheet, drillFields, drillItemsNum } = params;
1658
+ if (drillItemsNum) {
1659
+ spreadsheet.store.set("drillItemsNum", drillItemsNum);
1660
+ }
1661
+ const meta = spreadsheet.store.get("drillDownNode");
1662
+ const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
1663
+ let newDrillDownDataCache = clone(drillDownDataCache);
1664
+ if (drillDownCurrentCache) {
1665
+ newDrillDownDataCache = filter(drillDownDataCache, (cache) => cache.rowId !== meta.id);
1666
+ }
1667
+ if (!fetchData) {
1668
+ return;
1669
+ }
1670
+ fetchData(meta, drillFields).then((info) => {
1671
+ const { drillData, drillField } = info;
1672
+ spreadsheet.dataSet.transformDrillDownData(drillField, drillData, meta);
1673
+ if (!isEmpty(drillData)) {
1674
+ const drillLevel = meta.level + 1;
1675
+ const newDrillDownData = {
1676
+ rowId: meta.id,
1677
+ drillLevel,
1678
+ drillData,
1679
+ drillField
1680
+ };
1681
+ newDrillDownDataCache.push(newDrillDownData);
1682
+ spreadsheet.store.set("drillDownDataCache", newDrillDownDataCache);
1683
+ }
1684
+ spreadsheet.interaction.reset();
1685
+ spreadsheet.render(false);
1686
+ });
1687
+ };
1280
1688
  const EN_US = {
1281
1689
  \u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
1282
1690
  \u5207\u6362\u6307\u6807: "Switch indicator",
@@ -1310,7 +1718,10 @@ const EN_US = {
1310
1718
  \u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
1311
1719
  \u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
1312
1720
  \u64CD\u4F5C\u6210\u529F: "Operation successful",
1313
- \u64CD\u4F5C\u5931\u8D25: "Operation failed"
1721
+ \u64CD\u4F5C\u5931\u8D25: "Operation failed",
1722
+ \u65F6\u95F4: "Date",
1723
+ \u6307\u6807: "Measure",
1724
+ \u76EE\u6807\u503C: "Target Value"
1314
1725
  };
1315
1726
  const ZH_CN = {
1316
1727
  \u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
@@ -1345,12 +1756,16 @@ const ZH_CN = {
1345
1756
  \u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
1346
1757
  \u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
1347
1758
  \u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
1348
- \u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25"
1759
+ \u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25",
1760
+ \u65F6\u95F4: "\u65F6\u95F4",
1761
+ \u6307\u6807: "\u6307\u6807",
1762
+ \u76EE\u6807\u503C: "\u76EE\u6807\u503C"
1349
1763
  };
1350
1764
  const Locale = {
1351
1765
  zh_CN: ZH_CN,
1352
1766
  en_US: EN_US
1353
1767
  };
1768
+ const DRILL_DOWN_PRE_CLASS = "s2-drill-down";
1354
1769
  extendLocale(Locale);
1355
1770
  const useExpose = (expose) => {
1356
1771
  const s2Ref = shallowRef();
@@ -1436,7 +1851,7 @@ var _export_sfc = (sfc, props) => {
1436
1851
  return target;
1437
1852
  };
1438
1853
  const PRE_CLASS = `${S2_PREFIX_CLS}-pagination`;
1439
- const _sfc_main$d = defineComponent({
1854
+ const _sfc_main$e = defineComponent({
1440
1855
  name: "s2-pagination",
1441
1856
  props: {
1442
1857
  current: {
@@ -1467,7 +1882,7 @@ const _sfc_main$d = defineComponent({
1467
1882
  AntDPagination: Pagination
1468
1883
  }
1469
1884
  });
1470
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
1885
+ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
1471
1886
  const _component_AntDPagination = resolveComponent("AntDPagination");
1472
1887
  return openBlock(), createElementBlock("div", {
1473
1888
  class: normalizeClass(_ctx.PRE_CLASS)
@@ -1488,8 +1903,8 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
1488
1903
  }, toDisplayString(_ctx.i18n("\u5171\u8BA1")) + " " + toDisplayString(_ctx.total || " - ") + " " + toDisplayString(_ctx.i18n("\u6761")), 3)
1489
1904
  ], 2);
1490
1905
  }
1491
- var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
1492
- const _sfc_main$c = defineComponent({
1906
+ var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
1907
+ const _sfc_main$d = defineComponent({
1493
1908
  name: "TooltipDetail",
1494
1909
  props: ["list"],
1495
1910
  setup() {
@@ -1498,7 +1913,7 @@ const _sfc_main$c = defineComponent({
1498
1913
  };
1499
1914
  }
1500
1915
  });
1501
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
1916
+ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
1502
1917
  return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
1503
1918
  return openBlock(), createElementBlock("div", {
1504
1919
  key: `${item.value}-${index2}`,
@@ -1517,8 +1932,8 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
1517
1932
  ], 2);
1518
1933
  }), 128);
1519
1934
  }
1520
- var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
1521
- const _sfc_main$b = defineComponent({
1935
+ var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
1936
+ const _sfc_main$c = defineComponent({
1522
1937
  name: "TooltipHeadInfo",
1523
1938
  props: ["rows", "cols"],
1524
1939
  setup() {
@@ -1528,8 +1943,8 @@ const _sfc_main$b = defineComponent({
1528
1943
  },
1529
1944
  components: {}
1530
1945
  });
1531
- const _hoisted_1$1 = { key: 0 };
1532
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1946
+ const _hoisted_1$4 = { key: 0 };
1947
+ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
1533
1948
  var _a, _b, _c, _d;
1534
1949
  return ((_a = _ctx.cols) == null ? void 0 : _a.length) || ((_b = _ctx.rows) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", {
1535
1950
  key: 0,
@@ -1540,7 +1955,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1540
1955
  key: col.value
1541
1956
  }, toDisplayString(col.value) + "/", 1);
1542
1957
  }), 128)),
1543
- ((_c = _ctx.cols) == null ? void 0 : _c.length) > 0 && ((_d = _ctx.rows) == null ? void 0 : _d.length) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$1, "\uFF0C")) : createCommentVNode("", true),
1958
+ ((_c = _ctx.cols) == null ? void 0 : _c.length) > 0 && ((_d = _ctx.rows) == null ? void 0 : _d.length) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$4, "\uFF0C")) : createCommentVNode("", true),
1544
1959
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (row) => {
1545
1960
  return openBlock(), createElementBlock("span", {
1546
1961
  key: row.value
@@ -1548,8 +1963,8 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1548
1963
  }), 128))
1549
1964
  ], 2)) : createCommentVNode("", true);
1550
1965
  }
1551
- var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
1552
- const _sfc_main$a = defineComponent({
1966
+ var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
1967
+ const _sfc_main$b = defineComponent({
1553
1968
  name: "TooltipInfos",
1554
1969
  props: ["infos"],
1555
1970
  setup() {
@@ -1559,13 +1974,13 @@ const _sfc_main$a = defineComponent({
1559
1974
  },
1560
1975
  components: {}
1561
1976
  });
1562
- function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
1977
+ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1563
1978
  return openBlock(), createElementBlock("div", {
1564
1979
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-infos`)
1565
1980
  }, toDisplayString(_ctx.infos), 3);
1566
1981
  }
1567
- var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
1568
- const _sfc_main$9 = defineComponent({
1982
+ var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
1983
+ const _sfc_main$a = defineComponent({
1569
1984
  name: "TooltipSimpleTips",
1570
1985
  props: ["name", "tips"],
1571
1986
  setup() {
@@ -1575,7 +1990,7 @@ const _sfc_main$9 = defineComponent({
1575
1990
  },
1576
1991
  components: {}
1577
1992
  });
1578
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
1993
+ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
1579
1994
  return openBlock(), createElementBlock(Fragment, null, [
1580
1995
  _ctx.name ? (openBlock(), createElementBlock("div", {
1581
1996
  key: 0,
@@ -1587,8 +2002,8 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
1587
2002
  }, toDisplayString(_ctx.tips), 3)) : createCommentVNode("", true)
1588
2003
  ], 64);
1589
2004
  }
1590
- var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
1591
- const _sfc_main$8 = defineComponent({
2005
+ var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
2006
+ const _sfc_main$9 = defineComponent({
1592
2007
  name: "TooltipSummary",
1593
2008
  props: ["summaries"],
1594
2009
  setup(props) {
@@ -1601,7 +2016,7 @@ const _sfc_main$8 = defineComponent({
1601
2016
  },
1602
2017
  components: {}
1603
2018
  });
1604
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
2019
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
1605
2020
  return openBlock(), createElementBlock("div", {
1606
2021
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary`)
1607
2022
  }, [
@@ -1628,8 +2043,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
1628
2043
  }), 128))
1629
2044
  ], 2);
1630
2045
  }
1631
- var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
1632
- const _sfc_main$7 = defineComponent({
2046
+ var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
2047
+ const _sfc_main$8 = defineComponent({
1633
2048
  name: "TooltipOperatorTitle",
1634
2049
  props: ["menu"],
1635
2050
  setup(props) {
@@ -1640,21 +2055,21 @@ const _sfc_main$7 = defineComponent({
1640
2055
  };
1641
2056
  }
1642
2057
  });
1643
- const _hoisted_1 = ["innerHTML"];
1644
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
2058
+ const _hoisted_1$3 = ["innerHTML"];
2059
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
1645
2060
  return openBlock(), createElementBlock("span", null, [
1646
2061
  _ctx.icon ? (openBlock(), createElementBlock("span", {
1647
2062
  key: 0,
1648
2063
  innerHTML: _ctx.icon,
1649
2064
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-icon`)
1650
- }, null, 10, _hoisted_1)) : createCommentVNode("", true),
2065
+ }, null, 10, _hoisted_1$3)) : createCommentVNode("", true),
1651
2066
  createElementVNode("span", {
1652
2067
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-text`)
1653
2068
  }, toDisplayString(_ctx.menu.text), 3)
1654
2069
  ]);
1655
2070
  }
1656
- var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
1657
- const _sfc_main$6 = defineComponent({
2071
+ var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
2072
+ const _sfc_main$7 = defineComponent({
1658
2073
  name: "TooltipOperatorMenu",
1659
2074
  props: ["menu", "cell"],
1660
2075
  setup(props) {
@@ -1673,7 +2088,7 @@ const _sfc_main$6 = defineComponent({
1673
2088
  TooltipOperatorTitle
1674
2089
  }
1675
2090
  });
1676
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
2091
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
1677
2092
  const _component_TooltipOperatorTitle = resolveComponent("TooltipOperatorTitle");
1678
2093
  const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
1679
2094
  const _component_MenuItem = resolveComponent("MenuItem");
@@ -1717,9 +2132,9 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
1717
2132
  _: 1
1718
2133
  }, 8, ["popupClassName", "onTitleClick"]);
1719
2134
  }
1720
- var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
2135
+ var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
1721
2136
  var index_vue_vue_type_style_index_0_lang$1 = "";
1722
- const _sfc_main$5 = defineComponent({
2137
+ const _sfc_main$6 = defineComponent({
1723
2138
  name: "TooltipOperator",
1724
2139
  props: [
1725
2140
  "menus",
@@ -1739,7 +2154,7 @@ const _sfc_main$5 = defineComponent({
1739
2154
  TooltipOperatorMenu
1740
2155
  }
1741
2156
  });
1742
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
2157
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
1743
2158
  const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
1744
2159
  const _component_Menu = resolveComponent("Menu");
1745
2160
  const _component_TooltipOperatorTitle = resolveComponent("TooltipOperatorTitle");
@@ -1802,17 +2217,17 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1802
2217
  }), 128))
1803
2218
  ], 2);
1804
2219
  }
1805
- var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
2220
+ var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
1806
2221
  var index_vue_vue_type_style_index_0_lang = "";
1807
- const _sfc_main$4 = defineComponent({
2222
+ const _sfc_main$5 = defineComponent({
1808
2223
  name: "TooltipComponent",
1809
2224
  props: [
1810
- "content",
1811
2225
  "data",
1812
2226
  "options",
1813
2227
  "cell",
1814
2228
  "position",
1815
- "event"
2229
+ "event",
2230
+ "content"
1816
2231
  ],
1817
2232
  setup(props) {
1818
2233
  const { operator, onlyMenu } = getTooltipDefaultOptions(props.options);
@@ -1830,7 +2245,7 @@ const _sfc_main$4 = defineComponent({
1830
2245
  TooltipOperator
1831
2246
  }
1832
2247
  });
1833
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
2248
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1834
2249
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
1835
2250
  const _component_TooltipOperator = resolveComponent("TooltipOperator");
1836
2251
  const _component_TooltipSimpleTips = resolveComponent("TooltipSimpleTips");
@@ -1851,9 +2266,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1851
2266
  cell: _ctx.cell,
1852
2267
  onClick: (_d = _ctx.operator) == null ? void 0 : _d.onClick
1853
2268
  }, null, 8, ["menus", "cell", "onClick"]),
1854
- _ctx.content ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1855
- createTextVNode(toDisplayString(_ctx.content), 1)
1856
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2269
+ _ctx.content ? renderSlot(_ctx.$slots, "content", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1857
2270
  createVNode(_component_TooltipSimpleTips, {
1858
2271
  name: (_e = _ctx.data) == null ? void 0 : _e.name,
1859
2272
  tips: (_f = _ctx.data) == null ? void 0 : _f.tips
@@ -1876,7 +2289,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1876
2289
  ], 64))
1877
2290
  ], 64));
1878
2291
  }
1879
- var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
2292
+ var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
1880
2293
  class CustomTooltip extends BaseTooltip {
1881
2294
  constructor(spreadsheet) {
1882
2295
  super(spreadsheet);
@@ -1891,14 +2304,16 @@ class CustomTooltip extends BaseTooltip {
1891
2304
  cell,
1892
2305
  content
1893
2306
  });
1894
- const tooltipVNode = createVNode(TooltipComponent, tooltipProps);
1895
- render(null, this.container);
1896
- render(tooltipVNode, this.container);
2307
+ const tooltipVNode = createVNode(TooltipComponent, tooltipProps, {
2308
+ content: () => content
2309
+ });
2310
+ render$3(null, this.container);
2311
+ render$3(tooltipVNode, this.container);
1897
2312
  }
1898
2313
  destroy() {
1899
2314
  super.destroy();
1900
2315
  if (this.container) {
1901
- render(null, this.container);
2316
+ render$3(null, this.container);
1902
2317
  }
1903
2318
  }
1904
2319
  }
@@ -1936,6 +2351,7 @@ const useEvents = (s2Ref, emit) => {
1936
2351
  useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
1937
2352
  useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
1938
2353
  useS2Event(s2Ref, emit, S2Event.ROW_CELL_COLLAPSE_TREE_ROWS, "rowCellCollapseTreeRows");
2354
+ useS2Event(s2Ref, emit, S2Event.ROW_CELL_SCROLL, "rowCellScroll");
1939
2355
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_HOVER, "colCellHover");
1940
2356
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_CLICK, "colCellClick");
1941
2357
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_DOUBLE_CLICK, "colCellDoubleClick");
@@ -1951,7 +2367,8 @@ const useEvents = (s2Ref, emit) => {
1951
2367
  useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_UP, "dataCellMouseUp");
1952
2368
  useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_MOVE, "dataCellMouseMove");
1953
2369
  useS2Event(s2Ref, emit, S2Event.DATA_CELL_TREND_ICON_CLICK, "dataCellTrendIconClick");
1954
- useS2Event(s2Ref, emit, S2Event.DATE_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
2370
+ useS2Event(s2Ref, emit, S2Event.DATA_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
2371
+ useS2Event(s2Ref, emit, S2Event.DATA_CELL_SELECT_MOVE, "dataCellSelectMove");
1955
2372
  useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_HOVER, "cornerCellHover");
1956
2373
  useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_CLICK, "cornerCellClick");
1957
2374
  useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_DOUBLE_CLICK, "cornerCellDoubleClick");
@@ -2003,6 +2420,7 @@ const useEvents = (s2Ref, emit) => {
2003
2420
  useS2Event(s2Ref, emit, S2Event.GLOBAL_MOUSE_UP, "mouseUp");
2004
2421
  useS2Event(s2Ref, emit, S2Event.GLOBAL_RESET, "reset");
2005
2422
  useS2Event(s2Ref, emit, S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
2423
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_SCROLL, "scroll");
2006
2424
  });
2007
2425
  };
2008
2426
  const useLoading = (s2Ref, loadingProp = false) => {
@@ -2036,11 +2454,14 @@ const useSheetUpdate = (s2Ref, props) => {
2036
2454
  (_a = s2Ref.value) == null ? void 0 : _a.setOptions(options);
2037
2455
  (_b = s2Ref.value) == null ? void 0 : _b.changeSheetSize(options == null ? void 0 : options.width, options == null ? void 0 : options.height);
2038
2456
  }, { deep: isProxy(props.options) });
2039
- watch(() => props.dataCfg, (dataCfg) => {
2040
- var _a;
2457
+ 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
+ }
2041
2462
  updateFlag.rerender = true;
2042
2463
  updateFlag.reloadData = true;
2043
- (_a = s2Ref.value) == null ? void 0 : _a.setDataCfg(dataCfg);
2464
+ (_f = s2Ref.value) == null ? void 0 : _f.setDataCfg(dataCfg);
2044
2465
  }, { deep: isProxy(props.dataCfg) });
2045
2466
  watch(() => props.themeCfg, (themeCfg) => {
2046
2467
  var _a;
@@ -2099,9 +2520,8 @@ function useSpreadSheet(props, emit) {
2099
2520
  const rawDataCfg = toRaw(dataCfg);
2100
2521
  const rawOptions = toRaw(options);
2101
2522
  const s2Options = getSheetComponentOptions(rawOptions);
2102
- const s2Constructor = [container, rawDataCfg, s2Options];
2103
2523
  if (onSpreadsheet) {
2104
- return onSpreadsheet(...s2Constructor);
2524
+ return onSpreadsheet(container, rawDataCfg, s2Options);
2105
2525
  }
2106
2526
  if (sheetType === "table") {
2107
2527
  return new TableSheet$1(container, rawDataCfg, s2Options);
@@ -2155,6 +2575,34 @@ const initBaseSheetProps = () => ({
2155
2575
  onSpreadsheet: Function,
2156
2576
  onGetSpreadSheet: Function
2157
2577
  });
2578
+ const initDrillDownProps = () => ({
2579
+ className: String,
2580
+ titleText: {
2581
+ type: String,
2582
+ default: i18n("\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6")
2583
+ },
2584
+ searchText: {
2585
+ type: String,
2586
+ default: i18n("\u641C\u7D22\u5B57\u6BB5")
2587
+ },
2588
+ clearButtonText: {
2589
+ type: String,
2590
+ default: 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
+ };
2158
2606
  const initBaseSheetEmits = () => {
2159
2607
  const keys2 = [
2160
2608
  "spreadsheet",
@@ -2180,6 +2628,7 @@ const initBaseSheetEmits = () => {
2180
2628
  "dataCellMouseMove",
2181
2629
  "dataCellTrendIconClick",
2182
2630
  "dataCellBrushSelection",
2631
+ "dataCellSelectMove",
2183
2632
  "cornerCellHover",
2184
2633
  "cornerCellClick",
2185
2634
  "cornerCellDoubleClick",
@@ -2231,7 +2680,7 @@ const initBaseSheetEmits = () => {
2231
2680
  return keys2;
2232
2681
  };
2233
2682
  var baseSheet_vue_vue_type_style_index_0_lang = "";
2234
- const _sfc_main$3 = defineComponent({
2683
+ const _sfc_main$4 = defineComponent({
2235
2684
  name: "BaseSheet",
2236
2685
  props: initBaseSheetProps(),
2237
2686
  emits: initBaseSheetEmits(),
@@ -2272,7 +2721,7 @@ const _sfc_main$3 = defineComponent({
2272
2721
  S2Pagination
2273
2722
  }
2274
2723
  });
2275
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2724
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
2276
2725
  const _component_S2Pagination = resolveComponent("S2Pagination");
2277
2726
  const _component_Spin = resolveComponent("Spin");
2278
2727
  return openBlock(), createBlock(_component_Spin, {
@@ -2301,14 +2750,251 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2301
2750
  _: 1
2302
2751
  }, 8, ["wrapperClassName", "spinning"]);
2303
2752
  }
2304
- var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
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__ */ 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 openBlock(), 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__ */ 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 openBlock(), 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__ */ 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 openBlock(), 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 = defineComponent({
2810
+ name: "DrillDown",
2811
+ props: initDrillDownProps(),
2812
+ emits: initDrillDownEmits(),
2813
+ methods: {},
2814
+ components: {
2815
+ Button,
2816
+ Input,
2817
+ Empty,
2818
+ Menu,
2819
+ 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 = ref(getOptions());
2839
+ const selected = 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 = resolveComponent("Button");
2881
+ const _component_Input = resolveComponent("Input");
2882
+ const _component_Empty = resolveComponent("Empty");
2883
+ const _component_text_icon = resolveComponent("text-icon");
2884
+ const _component_calendar_icon = resolveComponent("calendar-icon");
2885
+ const _component_location_icon = resolveComponent("location-icon");
2886
+ const _component_MenuItem = resolveComponent("MenuItem");
2887
+ const _component_Menu = resolveComponent("Menu");
2888
+ return openBlock(), createElementBlock("div", {
2889
+ class: normalizeClass([_ctx.DRILL_DOWN_PRE_CLASS, _ctx.className])
2890
+ }, [
2891
+ createElementVNode("header", {
2892
+ class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-header`)
2893
+ }, [
2894
+ createElementVNode("div", null, toDisplayString(_ctx.titleText), 1),
2895
+ createVNode(_component_Button, {
2896
+ type: "link",
2897
+ onClick: _ctx.handleClear
2898
+ }, {
2899
+ default: withCtx(() => [
2900
+ createTextVNode(toDisplayString(_ctx.clearButtonText), 1)
2901
+ ]),
2902
+ _: 1
2903
+ }, 8, ["onClick"])
2904
+ ], 2),
2905
+ createVNode(_component_Input, {
2906
+ class: 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) ? (openBlock(), createBlock(_component_Empty, {
2913
+ key: 0,
2914
+ imageStyle: { height: "64px" },
2915
+ class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-empty`)
2916
+ }, null, 8, ["class"])) : createCommentVNode("", true),
2917
+ 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: withCtx(() => [
2924
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option) => {
2925
+ return openBlock(), createBlock(_component_MenuItem, {
2926
+ key: option.value,
2927
+ disabled: option.disabled,
2928
+ class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-menu-item`)
2929
+ }, {
2930
+ icon: withCtx(() => [
2931
+ option.type === "text" ? (openBlock(), createBlock(_component_text_icon, { key: 0 })) : createCommentVNode("", true),
2932
+ option.type === "date" ? (openBlock(), createBlock(_component_calendar_icon, { key: 1 })) : createCommentVNode("", true),
2933
+ option.type === "location" ? (openBlock(), createBlock(_component_location_icon, { key: 2 })) : createCommentVNode("", true)
2934
+ ]),
2935
+ default: withCtx(() => [
2936
+ createTextVNode(" " + 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"]]);
2305
2947
  const _sfc_main$2 = defineComponent({
2306
2948
  name: "PivotSheet",
2307
- props: [],
2308
- emits: [],
2949
+ props: initBaseSheetProps(),
2950
+ emits: initBaseSheetEmits(),
2309
2951
  setup(props, ctx) {
2310
2952
  const s2Ref = useExpose(ctx.expose);
2311
- return { s2Ref };
2953
+ const { options: pivotOptions } = toRefs(props);
2954
+ const { dataCfg, partDrillDown } = toRefs(props);
2955
+ const drillFields = 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 = 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 = computed(() => buildDrillDownOptions(pivotOptions.value, partDrillDown.value, (params) => onDrillDownIconClick(params)));
2994
+ return {
2995
+ s2Ref,
2996
+ options
2997
+ };
2312
2998
  },
2313
2999
  components: {
2314
3000
  BaseSheet
@@ -2316,7 +3002,10 @@ const _sfc_main$2 = defineComponent({
2316
3002
  });
2317
3003
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2318
3004
  const _component_BaseSheet = resolveComponent("BaseSheet");
2319
- return openBlock(), createBlock(_component_BaseSheet, { ref: "s2Ref" }, null, 512);
3005
+ return openBlock(), createBlock(_component_BaseSheet, mergeProps(_ctx.$props, {
3006
+ ref: "s2Ref",
3007
+ options: _ctx.options
3008
+ }), null, 16, ["options"]);
2320
3009
  }
2321
3010
  var PivotSheet = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
2322
3011
  const _sfc_main$1 = defineComponent({