@antv/s2-vue 1.0.2 → 1.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/index.js CHANGED
@@ -17,9 +17,89 @@ 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, extendLocale, 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, 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
+ const EN_US = {
24
+ \u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
25
+ \u5207\u6362\u6307\u6807: "Switch indicator",
26
+ \u786E\u5B9A: "Ok",
27
+ \u53D6\u6D88: "Cancel",
28
+ \u91CD\u7F6E: "Reset",
29
+ \u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "Please enter a keyword search",
30
+ \u641C\u7D22: "Search",
31
+ \u6062\u590D: "Recover",
32
+ "\u5DF2\u9009 {} \u9879": "selected {} item",
33
+ \u6240\u9009\u9879: "selected items",
34
+ \u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "Select drill down dimension",
35
+ \u6062\u590D\u9ED8\u8BA4: "Restore default",
36
+ \u641C\u7D22\u5B57\u6BB5: "Search field",
37
+ \u884C\u5217\u5207\u6362: "Switch Dimensions",
38
+ \u884C\u5934: "Rows",
39
+ \u5217\u5934: "Cols",
40
+ \u503C: "Values",
41
+ \u5C55\u5F00\u5B50\u9879: "Expand Children",
42
+ \u9996\u5B57\u6BCD: "Alphabetical order",
43
+ \u624B\u52A8\u6392\u5E8F: "Custom order",
44
+ \u5176\u4ED6\u5B57\u6BB5: "Other field",
45
+ \u9AD8\u7EA7\u6392\u5E8F: "Advanced order",
46
+ \u8BBE\u7F6E\u987A\u5E8F: "SetManual",
47
+ \u53EF\u9009\u5B57\u6BB5: "Fields",
48
+ "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "Order according to the following rules (from low to high priority)",
49
+ \u6309: "By",
50
+ \u8BF4\u660E: "Description",
51
+ \u590D\u5236\u539F\u59CB\u6570\u636E: "Copy raw data",
52
+ \u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "Copy formatted data",
53
+ \u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
54
+ \u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
55
+ \u64CD\u4F5C\u6210\u529F: "Operation successful",
56
+ \u64CD\u4F5C\u5931\u8D25: "Operation failed",
57
+ \u65F6\u95F4: "Date",
58
+ \u6307\u6807: "Measure",
59
+ \u76EE\u6807\u503C: "Target Value"
60
+ };
61
+ const ZH_CN = {
62
+ \u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
63
+ \u5207\u6362\u6307\u6807: "\u5207\u6362\u6307\u6807",
64
+ \u786E\u5B9A: "\u786E\u5B9A",
65
+ \u53D6\u6D88: "\u53D6\u6D88",
66
+ \u91CD\u7F6E: "\u91CD\u7F6E",
67
+ \u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
68
+ \u641C\u7D22: "\u641C\u7D22",
69
+ \u6062\u590D: "\u6062\u590D",
70
+ "\u5DF2\u9009 {} \u9879": "\u5DF2\u9009 {} \u9879",
71
+ \u6240\u9009\u9879: "\u6240\u9009\u9879",
72
+ \u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6",
73
+ \u6062\u590D\u9ED8\u8BA4: "\u6062\u590D\u9ED8\u8BA4",
74
+ \u641C\u7D22\u5B57\u6BB5: "\u641C\u7D22\u5B57\u6BB5",
75
+ \u884C\u5217\u5207\u6362: "\u884C\u5217\u5207\u6362",
76
+ \u884C\u5934: "\u884C\u5934",
77
+ \u5217\u5934: "\u5217\u5934",
78
+ \u503C: "\u503C",
79
+ \u5C55\u5F00\u5B50\u9879: "\u5C55\u5F00\u5B50\u9879",
80
+ \u9996\u5B57\u6BCD: "\u9996\u5B57\u6BCD",
81
+ \u624B\u52A8\u6392\u5E8F: "\u624B\u52A8\u6392\u5E8F",
82
+ \u5176\u4ED6\u5B57\u6BB5: "\u5176\u4ED6\u5B57\u6BB5",
83
+ \u9AD8\u7EA7\u6392\u5E8F: "\u9AD8\u7EA7\u6392\u5E8F",
84
+ \u8BBE\u7F6E\u987A\u5E8F: "\u8BBE\u7F6E\u987A\u5E8F",
85
+ \u53EF\u9009\u5B57\u6BB5: "\u53EF\u9009\u5B57\u6BB5",
86
+ "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09",
87
+ \u6309: "\u6309",
88
+ \u8BF4\u660E: "\u8BF4\u660E",
89
+ \u590D\u5236\u539F\u59CB\u6570\u636E: "\u590D\u5236\u539F\u59CB\u6570\u636E",
90
+ \u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E",
91
+ \u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
92
+ \u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
93
+ \u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
94
+ \u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25",
95
+ \u65F6\u95F4: "\u65F6\u95F4",
96
+ \u6307\u6807: "\u6307\u6807",
97
+ \u76EE\u6807\u503C: "\u76EE\u6807\u503C"
98
+ };
99
+ const Locale = {
100
+ zh_CN: ZH_CN,
101
+ en_US: EN_US
102
+ };
23
103
  const SHEET_COMPONENT_DEFAULT_OPTIONS = {
24
104
  tooltip: {
25
105
  showTooltip: true,
@@ -32,6 +112,8 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
32
112
  },
33
113
  showDefaultHeaderActionIcon: true
34
114
  };
115
+ const RESIZE_RENDER_DELAY = 200;
116
+ const DRILL_DOWN_PRE_CLASS = "s2-drill-down";
35
117
  const getBaseSheetComponentOptions = (...options) => customMerge(DEFAULT_OPTIONS, SHEET_COMPONENT_DEFAULT_OPTIONS, ...options);
36
118
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
37
119
  var freeGlobal$1 = freeGlobal;
@@ -40,12 +122,12 @@ var root = freeGlobal$1 || freeSelf || Function("return this")();
40
122
  var root$1 = root;
41
123
  var Symbol$1 = root$1.Symbol;
42
124
  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;
125
+ var objectProto$f = Object.prototype;
126
+ var hasOwnProperty$c = objectProto$f.hasOwnProperty;
127
+ var nativeObjectToString$1 = objectProto$f.toString;
46
128
  var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
47
129
  function getRawTag(value) {
48
- var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), tag = value[symToStringTag$1];
130
+ var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
49
131
  try {
50
132
  value[symToStringTag$1] = void 0;
51
133
  var unmasked = true;
@@ -61,8 +143,8 @@ function getRawTag(value) {
61
143
  }
62
144
  return result;
63
145
  }
64
- var objectProto$b = Object.prototype;
65
- var nativeObjectToString = objectProto$b.toString;
146
+ var objectProto$e = Object.prototype;
147
+ var nativeObjectToString = objectProto$e.toString;
66
148
  function objectToString(value) {
67
149
  return nativeObjectToString.call(value);
68
150
  }
@@ -77,9 +159,9 @@ function baseGetTag(value) {
77
159
  function isObjectLike(value) {
78
160
  return value != null && typeof value == "object";
79
161
  }
80
- var symbolTag$1 = "[object Symbol]";
162
+ var symbolTag$3 = "[object Symbol]";
81
163
  function isSymbol(value) {
82
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
164
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
83
165
  }
84
166
  function arrayMap(array, iteratee) {
85
167
  var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
@@ -91,7 +173,7 @@ function arrayMap(array, iteratee) {
91
173
  var isArray = Array.isArray;
92
174
  var isArray$1 = isArray;
93
175
  var INFINITY$1 = 1 / 0;
94
- var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
176
+ var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
95
177
  function baseToString(value) {
96
178
  if (typeof value == "string") {
97
179
  return value;
@@ -146,13 +228,13 @@ function toNumber(value) {
146
228
  function identity(value) {
147
229
  return value;
148
230
  }
149
- var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
231
+ var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
150
232
  function isFunction(value) {
151
233
  if (!isObject(value)) {
152
234
  return false;
153
235
  }
154
236
  var tag = baseGetTag(value);
155
- return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
237
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
156
238
  }
157
239
  var coreJsData = root$1["__core-js_shared__"];
158
240
  var coreJsData$1 = coreJsData;
@@ -180,10 +262,10 @@ function toSource(func) {
180
262
  }
181
263
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
182
264
  var reIsHostCtor = /^\[object .+?Constructor\]$/;
183
- var funcProto = Function.prototype, objectProto$a = Object.prototype;
265
+ var funcProto = Function.prototype, objectProto$d = Object.prototype;
184
266
  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.*?") + "$");
267
+ var hasOwnProperty$b = objectProto$d.hasOwnProperty;
268
+ var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
187
269
  function baseIsNative(value) {
188
270
  if (!isObject(value) || isMasked(value)) {
189
271
  return false;
@@ -200,6 +282,50 @@ function getNative(object, key) {
200
282
  }
201
283
  var WeakMap = getNative(root$1, "WeakMap");
202
284
  var WeakMap$1 = WeakMap;
285
+ var objectCreate = Object.create;
286
+ var baseCreate = function() {
287
+ function object() {
288
+ }
289
+ return function(proto) {
290
+ if (!isObject(proto)) {
291
+ return {};
292
+ }
293
+ if (objectCreate) {
294
+ return objectCreate(proto);
295
+ }
296
+ object.prototype = proto;
297
+ var result = new object();
298
+ object.prototype = void 0;
299
+ return result;
300
+ };
301
+ }();
302
+ var baseCreate$1 = baseCreate;
303
+ function copyArray(source, array) {
304
+ var index2 = -1, length = source.length;
305
+ array || (array = Array(length));
306
+ while (++index2 < length) {
307
+ array[index2] = source[index2];
308
+ }
309
+ return array;
310
+ }
311
+ var defineProperty = function() {
312
+ try {
313
+ var func = getNative(Object, "defineProperty");
314
+ func({}, "", {});
315
+ return func;
316
+ } catch (e) {
317
+ }
318
+ }();
319
+ var defineProperty$1 = defineProperty;
320
+ function arrayEach(array, iteratee) {
321
+ var index2 = -1, length = array == null ? 0 : array.length;
322
+ while (++index2 < length) {
323
+ if (iteratee(array[index2], index2, array) === false) {
324
+ break;
325
+ }
326
+ }
327
+ return array;
328
+ }
203
329
  var MAX_SAFE_INTEGER$1 = 9007199254740991;
204
330
  var reIsUint = /^(?:0|[1-9]\d*)$/;
205
331
  function isIndex(value, length) {
@@ -207,9 +333,47 @@ function isIndex(value, length) {
207
333
  length = length == null ? MAX_SAFE_INTEGER$1 : length;
208
334
  return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
209
335
  }
336
+ function baseAssignValue(object, key, value) {
337
+ if (key == "__proto__" && defineProperty$1) {
338
+ defineProperty$1(object, key, {
339
+ "configurable": true,
340
+ "enumerable": true,
341
+ "value": value,
342
+ "writable": true
343
+ });
344
+ } else {
345
+ object[key] = value;
346
+ }
347
+ }
210
348
  function eq(value, other) {
211
349
  return value === other || value !== value && other !== other;
212
350
  }
351
+ var objectProto$c = Object.prototype;
352
+ var hasOwnProperty$a = objectProto$c.hasOwnProperty;
353
+ function assignValue(object, key, value) {
354
+ var objValue = object[key];
355
+ if (!(hasOwnProperty$a.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
356
+ baseAssignValue(object, key, value);
357
+ }
358
+ }
359
+ function copyObject(source, props, object, customizer) {
360
+ var isNew = !object;
361
+ object || (object = {});
362
+ var index2 = -1, length = props.length;
363
+ while (++index2 < length) {
364
+ var key = props[index2];
365
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
366
+ if (newValue === void 0) {
367
+ newValue = source[key];
368
+ }
369
+ if (isNew) {
370
+ baseAssignValue(object, key, newValue);
371
+ } else {
372
+ assignValue(object, key, newValue);
373
+ }
374
+ }
375
+ return object;
376
+ }
213
377
  var MAX_SAFE_INTEGER = 9007199254740991;
214
378
  function isLength(value) {
215
379
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
@@ -217,9 +381,9 @@ function isLength(value) {
217
381
  function isArrayLike(value) {
218
382
  return value != null && isLength(value.length) && !isFunction(value);
219
383
  }
220
- var objectProto$9 = Object.prototype;
384
+ var objectProto$b = Object.prototype;
221
385
  function isPrototype(value) {
222
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$9;
386
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$b;
223
387
  return value === proto;
224
388
  }
225
389
  function baseTimes(n, iteratee) {
@@ -229,34 +393,34 @@ function baseTimes(n, iteratee) {
229
393
  }
230
394
  return result;
231
395
  }
232
- var argsTag$2 = "[object Arguments]";
396
+ var argsTag$3 = "[object Arguments]";
233
397
  function baseIsArguments(value) {
234
- return isObjectLike(value) && baseGetTag(value) == argsTag$2;
398
+ return isObjectLike(value) && baseGetTag(value) == argsTag$3;
235
399
  }
236
- var objectProto$8 = Object.prototype;
237
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
238
- var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
400
+ var objectProto$a = Object.prototype;
401
+ var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
402
+ var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
239
403
  var isArguments = baseIsArguments(function() {
240
404
  return arguments;
241
405
  }()) ? baseIsArguments : function(value) {
242
- return isObjectLike(value) && hasOwnProperty$7.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
406
+ return isObjectLike(value) && hasOwnProperty$9.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
243
407
  };
244
408
  var isArguments$1 = isArguments;
245
409
  function stubFalse() {
246
410
  return false;
247
411
  }
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;
412
+ var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
413
+ var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
414
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
415
+ var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0;
416
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
253
417
  var isBuffer = nativeIsBuffer || stubFalse;
254
418
  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]";
419
+ 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]";
420
+ 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
421
  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;
422
+ 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;
423
+ 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
424
  function baseIsTypedArray(value) {
261
425
  return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
262
426
  }
@@ -265,13 +429,13 @@ function baseUnary(func) {
265
429
  return func(value);
266
430
  };
267
431
  }
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;
432
+ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
433
+ var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
434
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
435
+ var freeProcess = moduleExports$1 && freeGlobal$1.process;
272
436
  var nodeUtil = function() {
273
437
  try {
274
- var types = freeModule && freeModule.require && freeModule.require("util").types;
438
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
275
439
  if (types) {
276
440
  return types;
277
441
  }
@@ -283,12 +447,12 @@ var nodeUtil$1 = nodeUtil;
283
447
  var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
284
448
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
285
449
  var isTypedArray$1 = isTypedArray;
286
- var objectProto$7 = Object.prototype;
287
- var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
450
+ var objectProto$9 = Object.prototype;
451
+ var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
288
452
  function arrayLikeKeys(value, inherited) {
289
453
  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
454
  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)))) {
455
+ 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
456
  result.push(key);
293
457
  }
294
458
  }
@@ -301,15 +465,15 @@ function overArg(func, transform) {
301
465
  }
302
466
  var nativeKeys = overArg(Object.keys, Object);
303
467
  var nativeKeys$1 = nativeKeys;
304
- var objectProto$6 = Object.prototype;
305
- var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
468
+ var objectProto$8 = Object.prototype;
469
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
306
470
  function baseKeys(object) {
307
471
  if (!isPrototype(object)) {
308
472
  return nativeKeys$1(object);
309
473
  }
310
474
  var result = [];
311
475
  for (var key in Object(object)) {
312
- if (hasOwnProperty$5.call(object, key) && key != "constructor") {
476
+ if (hasOwnProperty$7.call(object, key) && key != "constructor") {
313
477
  result.push(key);
314
478
  }
315
479
  }
@@ -318,6 +482,32 @@ function baseKeys(object) {
318
482
  function keys(object) {
319
483
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
320
484
  }
485
+ function nativeKeysIn(object) {
486
+ var result = [];
487
+ if (object != null) {
488
+ for (var key in Object(object)) {
489
+ result.push(key);
490
+ }
491
+ }
492
+ return result;
493
+ }
494
+ var objectProto$7 = Object.prototype;
495
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
496
+ function baseKeysIn(object) {
497
+ if (!isObject(object)) {
498
+ return nativeKeysIn(object);
499
+ }
500
+ var isProto = isPrototype(object), result = [];
501
+ for (var key in object) {
502
+ if (!(key == "constructor" && (isProto || !hasOwnProperty$6.call(object, key)))) {
503
+ result.push(key);
504
+ }
505
+ }
506
+ return result;
507
+ }
508
+ function keysIn(object) {
509
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
510
+ }
321
511
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
322
512
  function isKey(value, object) {
323
513
  if (isArray$1(value)) {
@@ -341,21 +531,21 @@ function hashDelete(key) {
341
531
  return result;
342
532
  }
343
533
  var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
344
- var objectProto$5 = Object.prototype;
345
- var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
534
+ var objectProto$6 = Object.prototype;
535
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
346
536
  function hashGet(key) {
347
537
  var data = this.__data__;
348
538
  if (nativeCreate$1) {
349
539
  var result = data[key];
350
540
  return result === HASH_UNDEFINED$2 ? void 0 : result;
351
541
  }
352
- return hasOwnProperty$4.call(data, key) ? data[key] : void 0;
542
+ return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
353
543
  }
354
- var objectProto$4 = Object.prototype;
355
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
544
+ var objectProto$5 = Object.prototype;
545
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
356
546
  function hashHas(key) {
357
547
  var data = this.__data__;
358
- return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$3.call(data, key);
548
+ return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
359
549
  }
360
550
  var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
361
551
  function hashSet(key, value) {
@@ -562,6 +752,8 @@ function arrayPush(array, values) {
562
752
  }
563
753
  return array;
564
754
  }
755
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
756
+ var getPrototype$1 = getPrototype;
565
757
  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
758
  var rsZWJ$1 = "\\u200d";
567
759
  var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
@@ -618,6 +810,24 @@ Stack.prototype["delete"] = stackDelete;
618
810
  Stack.prototype.get = stackGet;
619
811
  Stack.prototype.has = stackHas;
620
812
  Stack.prototype.set = stackSet;
813
+ function baseAssign(object, source) {
814
+ return object && copyObject(source, keys(source), object);
815
+ }
816
+ function baseAssignIn(object, source) {
817
+ return object && copyObject(source, keysIn(source), object);
818
+ }
819
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
820
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
821
+ var moduleExports = freeModule && freeModule.exports === freeExports;
822
+ var Buffer2 = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
823
+ function cloneBuffer(buffer, isDeep) {
824
+ if (isDeep) {
825
+ return buffer.slice();
826
+ }
827
+ var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
828
+ buffer.copy(result);
829
+ return result;
830
+ }
621
831
  function arrayFilter(array, predicate) {
622
832
  var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
623
833
  while (++index2 < length) {
@@ -631,19 +841,35 @@ function arrayFilter(array, predicate) {
631
841
  function stubArray() {
632
842
  return [];
633
843
  }
634
- var objectProto$3 = Object.prototype;
635
- var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
636
- var nativeGetSymbols = Object.getOwnPropertySymbols;
637
- var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
844
+ var objectProto$4 = Object.prototype;
845
+ var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
846
+ var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
847
+ var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
638
848
  if (object == null) {
639
849
  return [];
640
850
  }
641
851
  object = Object(object);
642
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
852
+ return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
643
853
  return propertyIsEnumerable.call(object, symbol);
644
854
  });
645
855
  };
646
856
  var getSymbols$1 = getSymbols;
857
+ function copySymbols(source, object) {
858
+ return copyObject(source, getSymbols$1(source), object);
859
+ }
860
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
861
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
862
+ var result = [];
863
+ while (object) {
864
+ arrayPush(result, getSymbols$1(object));
865
+ object = getPrototype$1(object);
866
+ }
867
+ return result;
868
+ };
869
+ var getSymbolsIn$1 = getSymbolsIn;
870
+ function copySymbolsIn(source, object) {
871
+ return copyObject(source, getSymbolsIn$1(source), object);
872
+ }
647
873
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
648
874
  var result = keysFunc(object);
649
875
  return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
@@ -651,39 +877,197 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
651
877
  function getAllKeys(object) {
652
878
  return baseGetAllKeys(object, keys, getSymbols$1);
653
879
  }
880
+ function getAllKeysIn(object) {
881
+ return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
882
+ }
654
883
  var DataView = getNative(root$1, "DataView");
655
884
  var DataView$1 = DataView;
656
885
  var Promise$1 = getNative(root$1, "Promise");
657
886
  var Promise$2 = Promise$1;
658
887
  var Set = getNative(root$1, "Set");
659
888
  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]";
889
+ var mapTag$6 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$6 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
890
+ var dataViewTag$3 = "[object DataView]";
662
891
  var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
663
892
  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) {
893
+ 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
894
  getTag = function(value) {
666
- var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
895
+ var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
667
896
  if (ctorString) {
668
897
  switch (ctorString) {
669
898
  case dataViewCtorString:
670
- return dataViewTag$1;
899
+ return dataViewTag$3;
671
900
  case mapCtorString:
672
- return mapTag$3;
901
+ return mapTag$6;
673
902
  case promiseCtorString:
674
903
  return promiseTag;
675
904
  case setCtorString:
676
- return setTag$3;
905
+ return setTag$6;
677
906
  case weakMapCtorString:
678
- return weakMapTag;
907
+ return weakMapTag$1;
679
908
  }
680
909
  }
681
910
  return result;
682
911
  };
683
912
  }
684
913
  var getTag$1 = getTag;
914
+ var objectProto$3 = Object.prototype;
915
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
916
+ function initCloneArray(array) {
917
+ var length = array.length, result = new array.constructor(length);
918
+ if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
919
+ result.index = array.index;
920
+ result.input = array.input;
921
+ }
922
+ return result;
923
+ }
685
924
  var Uint8Array2 = root$1.Uint8Array;
686
925
  var Uint8Array$1 = Uint8Array2;
926
+ function cloneArrayBuffer(arrayBuffer) {
927
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
928
+ new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
929
+ return result;
930
+ }
931
+ function cloneDataView(dataView, isDeep) {
932
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
933
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
934
+ }
935
+ var reFlags = /\w*$/;
936
+ function cloneRegExp(regexp) {
937
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
938
+ result.lastIndex = regexp.lastIndex;
939
+ return result;
940
+ }
941
+ var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
942
+ function cloneSymbol(symbol) {
943
+ return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
944
+ }
945
+ function cloneTypedArray(typedArray, isDeep) {
946
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
947
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
948
+ }
949
+ 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]";
950
+ 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]";
951
+ function initCloneByTag(object, tag, isDeep) {
952
+ var Ctor = object.constructor;
953
+ switch (tag) {
954
+ case arrayBufferTag$2:
955
+ return cloneArrayBuffer(object);
956
+ case boolTag$3:
957
+ case dateTag$2:
958
+ return new Ctor(+object);
959
+ case dataViewTag$2:
960
+ return cloneDataView(object, isDeep);
961
+ case float32Tag$1:
962
+ case float64Tag$1:
963
+ case int8Tag$1:
964
+ case int16Tag$1:
965
+ case int32Tag$1:
966
+ case uint8Tag$1:
967
+ case uint8ClampedTag$1:
968
+ case uint16Tag$1:
969
+ case uint32Tag$1:
970
+ return cloneTypedArray(object, isDeep);
971
+ case mapTag$5:
972
+ return new Ctor();
973
+ case numberTag$2:
974
+ case stringTag$3:
975
+ return new Ctor(object);
976
+ case regexpTag$2:
977
+ return cloneRegExp(object);
978
+ case setTag$5:
979
+ return new Ctor();
980
+ case symbolTag$2:
981
+ return cloneSymbol(object);
982
+ }
983
+ }
984
+ function initCloneObject(object) {
985
+ return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
986
+ }
987
+ var mapTag$4 = "[object Map]";
988
+ function baseIsMap(value) {
989
+ return isObjectLike(value) && getTag$1(value) == mapTag$4;
990
+ }
991
+ var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
992
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
993
+ var isMap$1 = isMap;
994
+ var setTag$4 = "[object Set]";
995
+ function baseIsSet(value) {
996
+ return isObjectLike(value) && getTag$1(value) == setTag$4;
997
+ }
998
+ var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
999
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
1000
+ var isSet$1 = isSet;
1001
+ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
1002
+ 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]";
1003
+ 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]";
1004
+ var cloneableTags = {};
1005
+ 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;
1006
+ cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
1007
+ function baseClone(value, bitmask, customizer, key, object, stack) {
1008
+ var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
1009
+ if (customizer) {
1010
+ result = object ? customizer(value, key, object, stack) : customizer(value);
1011
+ }
1012
+ if (result !== void 0) {
1013
+ return result;
1014
+ }
1015
+ if (!isObject(value)) {
1016
+ return value;
1017
+ }
1018
+ var isArr = isArray$1(value);
1019
+ if (isArr) {
1020
+ result = initCloneArray(value);
1021
+ if (!isDeep) {
1022
+ return copyArray(value, result);
1023
+ }
1024
+ } else {
1025
+ var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
1026
+ if (isBuffer$1(value)) {
1027
+ return cloneBuffer(value, isDeep);
1028
+ }
1029
+ if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
1030
+ result = isFlat || isFunc ? {} : initCloneObject(value);
1031
+ if (!isDeep) {
1032
+ return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
1033
+ }
1034
+ } else {
1035
+ if (!cloneableTags[tag]) {
1036
+ return object ? value : {};
1037
+ }
1038
+ result = initCloneByTag(value, tag, isDeep);
1039
+ }
1040
+ }
1041
+ stack || (stack = new Stack());
1042
+ var stacked = stack.get(value);
1043
+ if (stacked) {
1044
+ return stacked;
1045
+ }
1046
+ stack.set(value, result);
1047
+ if (isSet$1(value)) {
1048
+ value.forEach(function(subValue) {
1049
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
1050
+ });
1051
+ } else if (isMap$1(value)) {
1052
+ value.forEach(function(subValue, key2) {
1053
+ result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
1054
+ });
1055
+ }
1056
+ var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
1057
+ var props = isArr ? void 0 : keysFunc(value);
1058
+ arrayEach(props || value, function(subValue, key2) {
1059
+ if (props) {
1060
+ key2 = subValue;
1061
+ subValue = value[key2];
1062
+ }
1063
+ assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
1064
+ });
1065
+ return result;
1066
+ }
1067
+ var CLONE_SYMBOLS_FLAG = 4;
1068
+ function clone(value) {
1069
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
1070
+ }
687
1071
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
688
1072
  function setCacheAdd(value) {
689
1073
  this.__data__.set(value, HASH_UNDEFINED);
@@ -1150,6 +1534,19 @@ function debounce(func, wait, options) {
1150
1534
  debounced.flush = flush;
1151
1535
  return debounced;
1152
1536
  }
1537
+ function baseFilter(collection, predicate) {
1538
+ var result = [];
1539
+ baseEach$1(collection, function(value, index2, collection2) {
1540
+ if (predicate(value, index2, collection2)) {
1541
+ result.push(value);
1542
+ }
1543
+ });
1544
+ return result;
1545
+ }
1546
+ function filter(collection, predicate) {
1547
+ var func = isArray$1(collection) ? arrayFilter : baseFilter;
1548
+ return func(collection, baseIteratee(predicate));
1549
+ }
1153
1550
  var stringTag = "[object String]";
1154
1551
  function isString(value) {
1155
1552
  return typeof value == "string" || !isArray$1(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
@@ -1222,7 +1619,6 @@ function size(collection) {
1222
1619
  }
1223
1620
  return baseKeys(collection).length;
1224
1621
  }
1225
- const RESIZE_RENDER_DELAY = 200;
1226
1622
  const analyzeAdaptive = (paramsContainer, adaptive) => {
1227
1623
  var _a, _b, _c;
1228
1624
  let container = paramsContainer;
@@ -1252,9 +1648,9 @@ const createResizeObserver = (params) => {
1252
1648
  };
1253
1649
  const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
1254
1650
  const onResize = () => {
1255
- const { clientWidth: nodeWidth, clientHeight: nodeHeight } = container;
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;
1651
+ const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
1652
+ const width = adaptiveWidth ? Math.floor(containerWidth != null ? containerWidth : s2.options.width) : s2.options.width;
1653
+ const height = adaptiveHeight ? Math.floor(containerHeight != null ? containerHeight : s2.options.height) : s2.options.height;
1258
1654
  if (!adaptiveWidth && !adaptiveHeight) {
1259
1655
  return;
1260
1656
  }
@@ -1277,79 +1673,100 @@ const createResizeObserver = (params) => {
1277
1673
  resizeObserver.unobserve(actualWrapper);
1278
1674
  };
1279
1675
  };
1280
- const EN_US = {
1281
- \u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
1282
- \u5207\u6362\u6307\u6807: "Switch indicator",
1283
- \u786E\u5B9A: "Ok",
1284
- \u53D6\u6D88: "Cancel",
1285
- \u91CD\u7F6E: "Reset",
1286
- \u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "Please enter a keyword search",
1287
- \u641C\u7D22: "Search",
1288
- \u6062\u590D: "Recover",
1289
- "\u5DF2\u9009 {} \u9879": "selected {} item",
1290
- \u6240\u9009\u9879: "selected items",
1291
- \u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "Select drill down dimension",
1292
- \u6062\u590D\u9ED8\u8BA4: "Restore default",
1293
- \u641C\u7D22\u5B57\u6BB5: "Search field",
1294
- \u884C\u5217\u5207\u6362: "Switch Dimensions",
1295
- \u884C\u5934: "Rows",
1296
- \u5217\u5934: "Cols",
1297
- \u503C: "Values",
1298
- \u5C55\u5F00\u5B50\u9879: "Expand Children",
1299
- \u9996\u5B57\u6BCD: "Alphabetical order",
1300
- \u624B\u52A8\u6392\u5E8F: "Custom order",
1301
- \u5176\u4ED6\u5B57\u6BB5: "Other field",
1302
- \u9AD8\u7EA7\u6392\u5E8F: "Advanced order",
1303
- \u8BBE\u7F6E\u987A\u5E8F: "SetManual",
1304
- \u53EF\u9009\u5B57\u6BB5: "Fields",
1305
- "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "Order according to the following rules (from low to high priority)",
1306
- \u6309: "By",
1307
- \u8BF4\u660E: "Description",
1308
- \u590D\u5236\u539F\u59CB\u6570\u636E: "Copy raw data",
1309
- \u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "Copy formatted data",
1310
- \u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
1311
- \u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
1312
- \u64CD\u4F5C\u6210\u529F: "Operation successful",
1313
- \u64CD\u4F5C\u5931\u8D25: "Operation failed"
1676
+ const getDrillDownCache = (spreadsheet, meta) => {
1677
+ const drillDownDataCache = spreadsheet.store.get("drillDownDataCache", []);
1678
+ const cache = drillDownDataCache.find((dc) => dc.rowId === meta.id);
1679
+ return {
1680
+ drillDownDataCache,
1681
+ drillDownCurrentCache: cache
1682
+ };
1314
1683
  };
1315
- const ZH_CN = {
1316
- \u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
1317
- \u5207\u6362\u6307\u6807: "\u5207\u6362\u6307\u6807",
1318
- \u786E\u5B9A: "\u786E\u5B9A",
1319
- \u53D6\u6D88: "\u53D6\u6D88",
1320
- \u91CD\u7F6E: "\u91CD\u7F6E",
1321
- \u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
1322
- \u641C\u7D22: "\u641C\u7D22",
1323
- \u6062\u590D: "\u6062\u590D",
1324
- "\u5DF2\u9009 {} \u9879": "\u5DF2\u9009 {} \u9879",
1325
- \u6240\u9009\u9879: "\u6240\u9009\u9879",
1326
- \u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6",
1327
- \u6062\u590D\u9ED8\u8BA4: "\u6062\u590D\u9ED8\u8BA4",
1328
- \u641C\u7D22\u5B57\u6BB5: "\u641C\u7D22\u5B57\u6BB5",
1329
- \u884C\u5217\u5207\u6362: "\u884C\u5217\u5207\u6362",
1330
- \u884C\u5934: "\u884C\u5934",
1331
- \u5217\u5934: "\u5217\u5934",
1332
- \u503C: "\u503C",
1333
- \u5C55\u5F00\u5B50\u9879: "\u5C55\u5F00\u5B50\u9879",
1334
- \u9996\u5B57\u6BCD: "\u9996\u5B57\u6BCD",
1335
- \u624B\u52A8\u6392\u5E8F: "\u624B\u52A8\u6392\u5E8F",
1336
- \u5176\u4ED6\u5B57\u6BB5: "\u5176\u4ED6\u5B57\u6BB5",
1337
- \u9AD8\u7EA7\u6392\u5E8F: "\u9AD8\u7EA7\u6392\u5E8F",
1338
- \u8BBE\u7F6E\u987A\u5E8F: "\u8BBE\u7F6E\u987A\u5E8F",
1339
- \u53EF\u9009\u5B57\u6BB5: "\u53EF\u9009\u5B57\u6BB5",
1340
- "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09",
1341
- \u6309: "\u6309",
1342
- \u8BF4\u660E: "\u8BF4\u660E",
1343
- \u590D\u5236\u539F\u59CB\u6570\u636E: "\u590D\u5236\u539F\u59CB\u6570\u636E",
1344
- \u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E",
1345
- \u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
1346
- \u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
1347
- \u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
1348
- \u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25"
1684
+ const handleActionIconClick = (params) => {
1685
+ const { meta, event, callback } = params;
1686
+ const { spreadsheet } = meta;
1687
+ spreadsheet.store.set("drillDownNode", meta);
1688
+ const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
1689
+ const cache = (drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField) ? [drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField] : [];
1690
+ const disabled = [];
1691
+ drillDownDataCache.forEach((val) => {
1692
+ if (meta.id.includes(val.rowId) && meta.id !== val.rowId) {
1693
+ disabled.push(val.drillField);
1694
+ }
1695
+ });
1696
+ if (event) {
1697
+ spreadsheet.emit(S2Event.GLOBAL_ACTION_ICON_CLICK, event);
1698
+ }
1699
+ callback({
1700
+ sheetInstance: spreadsheet,
1701
+ cacheDrillFields: cache,
1702
+ disabledFields: disabled,
1703
+ event
1704
+ });
1349
1705
  };
1350
- const Locale = {
1351
- zh_CN: ZH_CN,
1352
- en_US: EN_US
1706
+ const defaultPartDrillDownDisplayCondition = (meta) => {
1707
+ var _a;
1708
+ const s2 = meta.spreadsheet;
1709
+ const { fields } = s2.dataCfg;
1710
+ const iconLevel = ((_a = fields.rows) == null ? void 0 : _a.length) - 1;
1711
+ const isValueInCols = !isEmpty(fields.values) ? s2.isValueInCols() : true;
1712
+ return iconLevel <= meta.level && s2.isHierarchyTreeType() && isValueInCols && !meta.isGrandTotals;
1713
+ };
1714
+ const buildDrillDownOptions = (options, partDrillDown, callback) => {
1715
+ var _a;
1716
+ const nextHeaderIcons = ((_a = options.headerActionIcons) == null ? void 0 : _a.length) ? [...options.headerActionIcons] : [];
1717
+ if (!isEmpty(partDrillDown)) {
1718
+ const drillDownActionIcon = {
1719
+ belongsCell: "rowCell",
1720
+ iconNames: ["DrillDownIcon"],
1721
+ defaultHide: true,
1722
+ displayCondition: partDrillDown.displayCondition || defaultPartDrillDownDisplayCondition,
1723
+ action: (actionIconProps) => {
1724
+ const { iconName, meta, event } = actionIconProps;
1725
+ if (iconName === "DrillDownIcon") {
1726
+ meta.spreadsheet.store.set("drillDownNode", meta);
1727
+ handleActionIconClick({
1728
+ meta,
1729
+ event,
1730
+ callback
1731
+ });
1732
+ }
1733
+ }
1734
+ };
1735
+ nextHeaderIcons.push(drillDownActionIcon);
1736
+ }
1737
+ return __spreadProps(__spreadValues({}, options), {
1738
+ headerActionIcons: nextHeaderIcons
1739
+ });
1740
+ };
1741
+ const handleDrillDown = (params) => {
1742
+ const { fetchData, spreadsheet, drillFields, drillItemsNum = -1 } = params;
1743
+ spreadsheet.store.set("drillItemsNum", drillItemsNum);
1744
+ const meta = spreadsheet.store.get("drillDownNode");
1745
+ const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
1746
+ let newDrillDownDataCache = clone(drillDownDataCache);
1747
+ if (drillDownCurrentCache) {
1748
+ newDrillDownDataCache = filter(drillDownDataCache, (cache) => cache.rowId !== meta.id);
1749
+ }
1750
+ if (!fetchData) {
1751
+ return;
1752
+ }
1753
+ fetchData(meta, drillFields).then((info) => {
1754
+ const { drillData, drillField } = info;
1755
+ spreadsheet.dataSet.transformDrillDownData(drillField, drillData, meta);
1756
+ if (!isEmpty(drillData)) {
1757
+ const drillLevel = meta.level + 1;
1758
+ const newDrillDownData = {
1759
+ rowId: meta.id,
1760
+ drillLevel,
1761
+ drillData,
1762
+ drillField
1763
+ };
1764
+ newDrillDownDataCache.push(newDrillDownData);
1765
+ spreadsheet.store.set("drillDownDataCache", newDrillDownDataCache);
1766
+ }
1767
+ spreadsheet.interaction.reset();
1768
+ spreadsheet.render(false);
1769
+ });
1353
1770
  };
1354
1771
  extendLocale(Locale);
1355
1772
  const useExpose = (expose) => {
@@ -1436,7 +1853,7 @@ var _export_sfc = (sfc, props) => {
1436
1853
  return target;
1437
1854
  };
1438
1855
  const PRE_CLASS = `${S2_PREFIX_CLS}-pagination`;
1439
- const _sfc_main$d = defineComponent({
1856
+ const _sfc_main$e = defineComponent({
1440
1857
  name: "s2-pagination",
1441
1858
  props: {
1442
1859
  current: {
@@ -1467,7 +1884,7 @@ const _sfc_main$d = defineComponent({
1467
1884
  AntDPagination: Pagination
1468
1885
  }
1469
1886
  });
1470
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
1887
+ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
1471
1888
  const _component_AntDPagination = resolveComponent("AntDPagination");
1472
1889
  return openBlock(), createElementBlock("div", {
1473
1890
  class: normalizeClass(_ctx.PRE_CLASS)
@@ -1488,8 +1905,8 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
1488
1905
  }, toDisplayString(_ctx.i18n("\u5171\u8BA1")) + " " + toDisplayString(_ctx.total || " - ") + " " + toDisplayString(_ctx.i18n("\u6761")), 3)
1489
1906
  ], 2);
1490
1907
  }
1491
- var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
1492
- const _sfc_main$c = defineComponent({
1908
+ var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
1909
+ const _sfc_main$d = defineComponent({
1493
1910
  name: "TooltipDetail",
1494
1911
  props: ["list"],
1495
1912
  setup() {
@@ -1498,7 +1915,7 @@ const _sfc_main$c = defineComponent({
1498
1915
  };
1499
1916
  }
1500
1917
  });
1501
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
1918
+ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
1502
1919
  return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
1503
1920
  return openBlock(), createElementBlock("div", {
1504
1921
  key: `${item.value}-${index2}`,
@@ -1517,8 +1934,8 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
1517
1934
  ], 2);
1518
1935
  }), 128);
1519
1936
  }
1520
- var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
1521
- const _sfc_main$b = defineComponent({
1937
+ var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
1938
+ const _sfc_main$c = defineComponent({
1522
1939
  name: "TooltipHeadInfo",
1523
1940
  props: ["rows", "cols"],
1524
1941
  setup() {
@@ -1528,8 +1945,8 @@ const _sfc_main$b = defineComponent({
1528
1945
  },
1529
1946
  components: {}
1530
1947
  });
1531
- const _hoisted_1$1 = { key: 0 };
1532
- 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) {
1533
1950
  var _a, _b, _c, _d;
1534
1951
  return ((_a = _ctx.cols) == null ? void 0 : _a.length) || ((_b = _ctx.rows) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", {
1535
1952
  key: 0,
@@ -1540,7 +1957,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1540
1957
  key: col.value
1541
1958
  }, toDisplayString(col.value) + "/", 1);
1542
1959
  }), 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),
1960
+ ((_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
1961
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (row) => {
1545
1962
  return openBlock(), createElementBlock("span", {
1546
1963
  key: row.value
@@ -1548,8 +1965,8 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1548
1965
  }), 128))
1549
1966
  ], 2)) : createCommentVNode("", true);
1550
1967
  }
1551
- var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
1552
- const _sfc_main$a = defineComponent({
1968
+ var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
1969
+ const _sfc_main$b = defineComponent({
1553
1970
  name: "TooltipInfos",
1554
1971
  props: ["infos"],
1555
1972
  setup() {
@@ -1559,13 +1976,13 @@ const _sfc_main$a = defineComponent({
1559
1976
  },
1560
1977
  components: {}
1561
1978
  });
1562
- function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
1979
+ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1563
1980
  return openBlock(), createElementBlock("div", {
1564
1981
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-infos`)
1565
1982
  }, toDisplayString(_ctx.infos), 3);
1566
1983
  }
1567
- var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
1568
- const _sfc_main$9 = defineComponent({
1984
+ var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
1985
+ const _sfc_main$a = defineComponent({
1569
1986
  name: "TooltipSimpleTips",
1570
1987
  props: ["name", "tips"],
1571
1988
  setup() {
@@ -1575,7 +1992,7 @@ const _sfc_main$9 = defineComponent({
1575
1992
  },
1576
1993
  components: {}
1577
1994
  });
1578
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
1995
+ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
1579
1996
  return openBlock(), createElementBlock(Fragment, null, [
1580
1997
  _ctx.name ? (openBlock(), createElementBlock("div", {
1581
1998
  key: 0,
@@ -1587,21 +2004,27 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
1587
2004
  }, toDisplayString(_ctx.tips), 3)) : createCommentVNode("", true)
1588
2005
  ], 64);
1589
2006
  }
1590
- var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
1591
- const _sfc_main$8 = defineComponent({
2007
+ var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
2008
+ const _sfc_main$9 = defineComponent({
1592
2009
  name: "TooltipSummary",
1593
2010
  props: ["summaries"],
1594
2011
  setup(props) {
1595
- const count = computed(() => reduce(props.summaries, (pre, next) => pre + size(next == null ? void 0 : next.selectedData), 0));
2012
+ const summaryInfo = computed(() => reduce(props.summaries, (pre, next) => {
2013
+ pre.count += size(next == null ? void 0 : next.selectedData);
2014
+ if (next.value || next.name) {
2015
+ pre.summaries.push(next);
2016
+ }
2017
+ return pre;
2018
+ }, { count: 0, summaries: [] }));
1596
2019
  return {
1597
- count: count.value,
2020
+ summaryInfo,
1598
2021
  i18n,
1599
2022
  TOOLTIP_PREFIX_CLS
1600
2023
  };
1601
2024
  },
1602
2025
  components: {}
1603
2026
  });
1604
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
2027
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
1605
2028
  return openBlock(), createElementBlock("div", {
1606
2029
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary`)
1607
2030
  }, [
@@ -1610,10 +2033,10 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
1610
2033
  }, [
1611
2034
  createElementVNode("span", {
1612
2035
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-selected`)
1613
- }, toDisplayString(_ctx.count) + " " + toDisplayString(_ctx.i18n("\u9879")), 3),
2036
+ }, toDisplayString(_ctx.summaryInfo.count) + " " + toDisplayString(_ctx.i18n("\u9879")), 3),
1614
2037
  createTextVNode(" " + toDisplayString(_ctx.i18n("\u5DF2\u9009\u62E9")), 1)
1615
2038
  ], 2),
1616
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.summaries, (summary) => {
2039
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.summaryInfo.summaries, (summary) => {
1617
2040
  return openBlock(), createElementBlock("div", {
1618
2041
  key: `${summary.name}-${summary.value}`,
1619
2042
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-item`)
@@ -1628,8 +2051,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
1628
2051
  }), 128))
1629
2052
  ], 2);
1630
2053
  }
1631
- var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
1632
- const _sfc_main$7 = defineComponent({
2054
+ var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
2055
+ const _sfc_main$8 = defineComponent({
1633
2056
  name: "TooltipOperatorTitle",
1634
2057
  props: ["menu"],
1635
2058
  setup(props) {
@@ -1640,21 +2063,21 @@ const _sfc_main$7 = defineComponent({
1640
2063
  };
1641
2064
  }
1642
2065
  });
1643
- const _hoisted_1 = ["innerHTML"];
1644
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
2066
+ const _hoisted_1$3 = ["innerHTML"];
2067
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
1645
2068
  return openBlock(), createElementBlock("span", null, [
1646
2069
  _ctx.icon ? (openBlock(), createElementBlock("span", {
1647
2070
  key: 0,
1648
2071
  innerHTML: _ctx.icon,
1649
2072
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-icon`)
1650
- }, null, 10, _hoisted_1)) : createCommentVNode("", true),
2073
+ }, null, 10, _hoisted_1$3)) : createCommentVNode("", true),
1651
2074
  createElementVNode("span", {
1652
2075
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-text`)
1653
2076
  }, toDisplayString(_ctx.menu.text), 3)
1654
2077
  ]);
1655
2078
  }
1656
- var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
1657
- const _sfc_main$6 = defineComponent({
2079
+ var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
2080
+ const _sfc_main$7 = defineComponent({
1658
2081
  name: "TooltipOperatorMenu",
1659
2082
  props: ["menu", "cell"],
1660
2083
  setup(props) {
@@ -1664,6 +2087,7 @@ const _sfc_main$6 = defineComponent({
1664
2087
  };
1665
2088
  return {
1666
2089
  onMenuTitleClick,
2090
+ isEmpty,
1667
2091
  TOOLTIP_PREFIX_CLS
1668
2092
  };
1669
2093
  },
@@ -1673,53 +2097,67 @@ const _sfc_main$6 = defineComponent({
1673
2097
  TooltipOperatorTitle
1674
2098
  }
1675
2099
  });
1676
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
2100
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
1677
2101
  const _component_TooltipOperatorTitle = resolveComponent("TooltipOperatorTitle");
1678
2102
  const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
1679
2103
  const _component_MenuItem = resolveComponent("MenuItem");
1680
2104
  const _component_SubMenu = resolveComponent("SubMenu");
1681
- return openBlock(), createBlock(_component_SubMenu, {
1682
- key: _ctx.menu.key,
1683
- popupClassName: `${_ctx.TOOLTIP_PREFIX_CLS}-operator-submenu-popup`,
1684
- onTitleClick: _ctx.onMenuTitleClick
1685
- }, {
1686
- title: withCtx(() => [
1687
- createVNode(_component_TooltipOperatorTitle, {
1688
- menu: _ctx.menu,
1689
- onClick: _ctx.onMenuTitleClick
1690
- }, null, 8, ["menu", "onClick"])
1691
- ]),
1692
- default: withCtx(() => [
1693
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menu.children, (subMenu) => {
1694
- var _a;
1695
- return openBlock(), createElementBlock(Fragment, {
1696
- key: subMenu.key
1697
- }, [
1698
- ((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_TooltipOperatorMenu, {
1699
- key: 0,
1700
- menu: subMenu,
1701
- cell: _ctx.cell
1702
- }, null, 8, ["menu", "cell"])) : (openBlock(), createBlock(_component_MenuItem, {
1703
- title: subMenu.text,
2105
+ return openBlock(), createElementBlock(Fragment, null, [
2106
+ !_ctx.isEmpty(_ctx.menu.children) ? (openBlock(), createBlock(_component_SubMenu, {
2107
+ key: _ctx.menu.key,
2108
+ popupClassName: `${_ctx.TOOLTIP_PREFIX_CLS}-operator-submenu-popup`,
2109
+ onTitleClick: _ctx.onMenuTitleClick
2110
+ }, {
2111
+ title: withCtx(() => [
2112
+ createVNode(_component_TooltipOperatorTitle, {
2113
+ menu: _ctx.menu,
2114
+ onClick: _ctx.onMenuTitleClick
2115
+ }, null, 8, ["menu", "onClick"])
2116
+ ]),
2117
+ default: withCtx(() => [
2118
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menu.children, (subMenu) => {
2119
+ var _a;
2120
+ return openBlock(), createElementBlock(Fragment, {
1704
2121
  key: subMenu.key
1705
- }, {
1706
- default: withCtx(() => [
1707
- createVNode(_component_TooltipOperatorTitle, {
1708
- menu: subMenu,
1709
- onClick: _ctx.onMenuTitleClick
1710
- }, null, 8, ["menu", "onClick"])
1711
- ]),
1712
- _: 2
1713
- }, 1032, ["title"]))
1714
- ], 64);
1715
- }), 128))
1716
- ]),
1717
- _: 1
1718
- }, 8, ["popupClassName", "onTitleClick"]);
2122
+ }, [
2123
+ ((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_TooltipOperatorMenu, {
2124
+ key: 0,
2125
+ menu: subMenu,
2126
+ cell: _ctx.cell
2127
+ }, null, 8, ["menu", "cell"])) : (openBlock(), createBlock(_component_MenuItem, {
2128
+ title: subMenu.text,
2129
+ key: subMenu.key
2130
+ }, {
2131
+ default: withCtx(() => [
2132
+ createVNode(_component_TooltipOperatorTitle, {
2133
+ menu: subMenu,
2134
+ onClick: _ctx.onMenuTitleClick
2135
+ }, null, 8, ["menu", "onClick"])
2136
+ ]),
2137
+ _: 2
2138
+ }, 1032, ["title"]))
2139
+ ], 64);
2140
+ }), 128))
2141
+ ]),
2142
+ _: 1
2143
+ }, 8, ["popupClassName", "onTitleClick"])) : createCommentVNode("", true),
2144
+ _ctx.isEmpty(_ctx.menu.children) ? (openBlock(), createBlock(_component_MenuItem, {
2145
+ title: _ctx.menu.text,
2146
+ key: _ctx.menu.key
2147
+ }, {
2148
+ default: withCtx(() => [
2149
+ createVNode(_component_TooltipOperatorTitle, {
2150
+ menu: _ctx.menu,
2151
+ onClick: _ctx.onMenuTitleClick
2152
+ }, null, 8, ["menu", "onClick"])
2153
+ ]),
2154
+ _: 1
2155
+ }, 8, ["title"])) : createCommentVNode("", true)
2156
+ ], 64);
1719
2157
  }
1720
- var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
2158
+ var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
1721
2159
  var index_vue_vue_type_style_index_0_lang$1 = "";
1722
- const _sfc_main$5 = defineComponent({
2160
+ const _sfc_main$6 = defineComponent({
1723
2161
  name: "TooltipOperator",
1724
2162
  props: [
1725
2163
  "menus",
@@ -1727,9 +2165,13 @@ const _sfc_main$5 = defineComponent({
1727
2165
  "onClick",
1728
2166
  "cell"
1729
2167
  ],
1730
- setup() {
2168
+ setup(props, { emit }) {
2169
+ const onMenuClick = (...args) => {
2170
+ emit("click", ...args);
2171
+ };
1731
2172
  return {
1732
- TOOLTIP_PREFIX_CLS
2173
+ TOOLTIP_PREFIX_CLS,
2174
+ onMenuClick
1733
2175
  };
1734
2176
  },
1735
2177
  components: {
@@ -1739,7 +2181,7 @@ const _sfc_main$5 = defineComponent({
1739
2181
  TooltipOperatorMenu
1740
2182
  }
1741
2183
  });
1742
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
2184
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
1743
2185
  const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
1744
2186
  const _component_Menu = resolveComponent("Menu");
1745
2187
  const _component_TooltipOperatorTitle = resolveComponent("TooltipOperatorTitle");
@@ -1750,7 +2192,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1750
2192
  _ctx.onlyMenu ? (openBlock(), createBlock(_component_Menu, {
1751
2193
  key: 0,
1752
2194
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
1753
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$.emit("click"))
2195
+ onClick: _ctx.onMenuClick
1754
2196
  }, {
1755
2197
  default: withCtx(() => [
1756
2198
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menus, (menu) => {
@@ -1762,7 +2204,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1762
2204
  }), 128))
1763
2205
  ]),
1764
2206
  _: 1
1765
- }, 8, ["class"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.menus, (menu) => {
2207
+ }, 8, ["class", "onClick"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.menus, (menu) => {
1766
2208
  return openBlock(), createBlock(_component_Dropdown, {
1767
2209
  key: menu.key,
1768
2210
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-dropdown`)
@@ -1773,7 +2215,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1773
2215
  ((_a = menu == null ? void 0 : menu.children) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_Menu, {
1774
2216
  key: 0,
1775
2217
  class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
1776
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$.emit("click"))
2218
+ onClick: _ctx.onMenuClick
1777
2219
  }, {
1778
2220
  default: withCtx(() => [
1779
2221
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menus, (menu2) => {
@@ -1785,7 +2227,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1785
2227
  }), 128))
1786
2228
  ]),
1787
2229
  _: 2
1788
- }, 1032, ["class"])) : createCommentVNode("", true)
2230
+ }, 1032, ["class", "onClick"])) : createCommentVNode("", true)
1789
2231
  ];
1790
2232
  }),
1791
2233
  default: withCtx(() => [
@@ -1802,17 +2244,17 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1802
2244
  }), 128))
1803
2245
  ], 2);
1804
2246
  }
1805
- var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
2247
+ var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
1806
2248
  var index_vue_vue_type_style_index_0_lang = "";
1807
- const _sfc_main$4 = defineComponent({
2249
+ const _sfc_main$5 = defineComponent({
1808
2250
  name: "TooltipComponent",
1809
2251
  props: [
1810
- "content",
1811
2252
  "data",
1812
2253
  "options",
1813
2254
  "cell",
1814
2255
  "position",
1815
- "event"
2256
+ "event",
2257
+ "content"
1816
2258
  ],
1817
2259
  setup(props) {
1818
2260
  const { operator, onlyMenu } = getTooltipDefaultOptions(props.options);
@@ -1830,7 +2272,7 @@ const _sfc_main$4 = defineComponent({
1830
2272
  TooltipOperator
1831
2273
  }
1832
2274
  });
1833
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
2275
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1834
2276
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
1835
2277
  const _component_TooltipOperator = resolveComponent("TooltipOperator");
1836
2278
  const _component_TooltipSimpleTips = resolveComponent("TooltipSimpleTips");
@@ -1851,9 +2293,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1851
2293
  cell: _ctx.cell,
1852
2294
  onClick: (_d = _ctx.operator) == null ? void 0 : _d.onClick
1853
2295
  }, 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 }, [
2296
+ _ctx.content ? renderSlot(_ctx.$slots, "content", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1857
2297
  createVNode(_component_TooltipSimpleTips, {
1858
2298
  name: (_e = _ctx.data) == null ? void 0 : _e.name,
1859
2299
  tips: (_f = _ctx.data) == null ? void 0 : _f.tips
@@ -1876,7 +2316,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1876
2316
  ], 64))
1877
2317
  ], 64));
1878
2318
  }
1879
- var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
2319
+ var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
1880
2320
  class CustomTooltip extends BaseTooltip {
1881
2321
  constructor(spreadsheet) {
1882
2322
  super(spreadsheet);
@@ -1891,14 +2331,16 @@ class CustomTooltip extends BaseTooltip {
1891
2331
  cell,
1892
2332
  content
1893
2333
  });
1894
- const tooltipVNode = createVNode(TooltipComponent, tooltipProps);
1895
- render(null, this.container);
1896
- render(tooltipVNode, this.container);
2334
+ const tooltipVNode = createVNode(TooltipComponent, tooltipProps, {
2335
+ content: () => content
2336
+ });
2337
+ render$3(null, this.container);
2338
+ render$3(tooltipVNode, this.container);
1897
2339
  }
1898
2340
  destroy() {
1899
2341
  super.destroy();
1900
2342
  if (this.container) {
1901
- render(null, this.container);
2343
+ render$3(null, this.container);
1902
2344
  }
1903
2345
  }
1904
2346
  }
@@ -1936,6 +2378,7 @@ const useEvents = (s2Ref, emit) => {
1936
2378
  useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
1937
2379
  useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
1938
2380
  useS2Event(s2Ref, emit, S2Event.ROW_CELL_COLLAPSE_TREE_ROWS, "rowCellCollapseTreeRows");
2381
+ useS2Event(s2Ref, emit, S2Event.ROW_CELL_SCROLL, "rowCellScroll");
1939
2382
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_HOVER, "colCellHover");
1940
2383
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_CLICK, "colCellClick");
1941
2384
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_DOUBLE_CLICK, "colCellDoubleClick");
@@ -1951,7 +2394,8 @@ const useEvents = (s2Ref, emit) => {
1951
2394
  useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_UP, "dataCellMouseUp");
1952
2395
  useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_MOVE, "dataCellMouseMove");
1953
2396
  useS2Event(s2Ref, emit, S2Event.DATA_CELL_TREND_ICON_CLICK, "dataCellTrendIconClick");
1954
- useS2Event(s2Ref, emit, S2Event.DATE_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
2397
+ useS2Event(s2Ref, emit, S2Event.DATA_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
2398
+ useS2Event(s2Ref, emit, S2Event.DATA_CELL_SELECT_MOVE, "dataCellSelectMove");
1955
2399
  useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_HOVER, "cornerCellHover");
1956
2400
  useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_CLICK, "cornerCellClick");
1957
2401
  useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_DOUBLE_CLICK, "cornerCellDoubleClick");
@@ -2003,6 +2447,7 @@ const useEvents = (s2Ref, emit) => {
2003
2447
  useS2Event(s2Ref, emit, S2Event.GLOBAL_MOUSE_UP, "mouseUp");
2004
2448
  useS2Event(s2Ref, emit, S2Event.GLOBAL_RESET, "reset");
2005
2449
  useS2Event(s2Ref, emit, S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
2450
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_SCROLL, "scroll");
2006
2451
  });
2007
2452
  };
2008
2453
  const useLoading = (s2Ref, loadingProp = false) => {
@@ -2036,11 +2481,14 @@ const useSheetUpdate = (s2Ref, props) => {
2036
2481
  (_a = s2Ref.value) == null ? void 0 : _a.setOptions(options);
2037
2482
  (_b = s2Ref.value) == null ? void 0 : _b.changeSheetSize(options == null ? void 0 : options.width, options == null ? void 0 : options.height);
2038
2483
  }, { deep: isProxy(props.options) });
2039
- watch(() => props.dataCfg, (dataCfg) => {
2040
- var _a;
2484
+ watch(() => props.dataCfg, (dataCfg, prevDataCfg) => {
2485
+ var _a, _b, _c, _d, _e, _f;
2486
+ 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)) {
2487
+ (_e = s2Ref.value) == null ? void 0 : _e.clearColumnLeafNodes();
2488
+ }
2041
2489
  updateFlag.rerender = true;
2042
2490
  updateFlag.reloadData = true;
2043
- (_a = s2Ref.value) == null ? void 0 : _a.setDataCfg(dataCfg);
2491
+ (_f = s2Ref.value) == null ? void 0 : _f.setDataCfg(dataCfg);
2044
2492
  }, { deep: isProxy(props.dataCfg) });
2045
2493
  watch(() => props.themeCfg, (themeCfg) => {
2046
2494
  var _a;
@@ -2137,7 +2585,7 @@ const initBaseSheetProps = () => ({
2137
2585
  dataCfg: Object,
2138
2586
  themeCfg: Object,
2139
2587
  showPagination: {
2140
- type: Object,
2588
+ type: [Object, Boolean],
2141
2589
  default: false
2142
2590
  },
2143
2591
  loading: Boolean,
@@ -2148,12 +2596,40 @@ const initBaseSheetProps = () => ({
2148
2596
  default: {}
2149
2597
  },
2150
2598
  adaptive: {
2151
- type: Object,
2599
+ type: [Object, Boolean],
2152
2600
  default: false
2153
2601
  },
2154
2602
  onSpreadsheet: Function,
2155
2603
  onGetSpreadSheet: Function
2156
2604
  });
2605
+ const initDrillDownProps = () => ({
2606
+ className: String,
2607
+ titleText: {
2608
+ type: String,
2609
+ default: i18n("\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6")
2610
+ },
2611
+ searchText: {
2612
+ type: String,
2613
+ default: i18n("\u641C\u7D22\u5B57\u6BB5")
2614
+ },
2615
+ clearButtonText: {
2616
+ type: String,
2617
+ default: i18n("\u6062\u590D\u9ED8\u8BA4")
2618
+ },
2619
+ extra: Node,
2620
+ dataSet: {
2621
+ type: Array,
2622
+ default: []
2623
+ },
2624
+ drillFields: Array,
2625
+ disabledFields: Array,
2626
+ getDrillFields: Function,
2627
+ setDrillFields: Function
2628
+ });
2629
+ const initDrillDownEmits = () => {
2630
+ const keys2 = ["getDrillFields", "setDrillFields"];
2631
+ return keys2;
2632
+ };
2157
2633
  const initBaseSheetEmits = () => {
2158
2634
  const keys2 = [
2159
2635
  "spreadsheet",
@@ -2179,6 +2655,7 @@ const initBaseSheetEmits = () => {
2179
2655
  "dataCellMouseMove",
2180
2656
  "dataCellTrendIconClick",
2181
2657
  "dataCellBrushSelection",
2658
+ "dataCellSelectMove",
2182
2659
  "cornerCellHover",
2183
2660
  "cornerCellClick",
2184
2661
  "cornerCellDoubleClick",
@@ -2225,12 +2702,13 @@ const initBaseSheetEmits = () => {
2225
2702
  "mouseUp",
2226
2703
  "selected",
2227
2704
  "reset",
2228
- "linkFieldJump"
2705
+ "linkFieldJump",
2706
+ "scroll"
2229
2707
  ];
2230
2708
  return keys2;
2231
2709
  };
2232
2710
  var baseSheet_vue_vue_type_style_index_0_lang = "";
2233
- const _sfc_main$3 = defineComponent({
2711
+ const _sfc_main$4 = defineComponent({
2234
2712
  name: "BaseSheet",
2235
2713
  props: initBaseSheetProps(),
2236
2714
  emits: initBaseSheetEmits(),
@@ -2271,7 +2749,7 @@ const _sfc_main$3 = defineComponent({
2271
2749
  S2Pagination
2272
2750
  }
2273
2751
  });
2274
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2752
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
2275
2753
  const _component_S2Pagination = resolveComponent("S2Pagination");
2276
2754
  const _component_Spin = resolveComponent("Spin");
2277
2755
  return openBlock(), createBlock(_component_Spin, {
@@ -2300,14 +2778,251 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2300
2778
  _: 1
2301
2779
  }, 8, ["wrapperClassName", "spinning"]);
2302
2780
  }
2303
- var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
2781
+ var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
2782
+ const _hoisted_1$2 = {
2783
+ class: "antv-s2-icon",
2784
+ viewBox: "0 0 1024 1024",
2785
+ xmlns: "http://www.w3.org/2000/svg",
2786
+ width: "12.6",
2787
+ height: "12.6"
2788
+ };
2789
+ const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", {
2790
+ 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",
2791
+ fill: "currentColor"
2792
+ }, null, -1);
2793
+ const _hoisted_3$2 = [
2794
+ _hoisted_2$2
2795
+ ];
2796
+ function render$2(_ctx, _cache) {
2797
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
2798
+ }
2799
+ var LocationIcon = { render: render$2 };
2800
+ const _hoisted_1$1 = {
2801
+ class: "antv-s2-icon",
2802
+ viewBox: "0 0 1024 1024",
2803
+ xmlns: "http://www.w3.org/2000/svg",
2804
+ width: "12.6",
2805
+ height: "12.6"
2806
+ };
2807
+ const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("path", {
2808
+ 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",
2809
+ fill: "currentColor"
2810
+ }, null, -1);
2811
+ const _hoisted_3$1 = [
2812
+ _hoisted_2$1
2813
+ ];
2814
+ function render$1(_ctx, _cache) {
2815
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
2816
+ }
2817
+ var TextIcon = { render: render$1 };
2818
+ const _hoisted_1 = {
2819
+ class: "antv-s2-icon",
2820
+ viewBox: "0 0 1024 1024",
2821
+ xmlns: "http://www.w3.org/2000/svg",
2822
+ width: "12.6",
2823
+ height: "12.6"
2824
+ };
2825
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", {
2826
+ 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",
2827
+ fill: "currentColor"
2828
+ }, null, -1);
2829
+ const _hoisted_3 = [
2830
+ _hoisted_2
2831
+ ];
2832
+ function render(_ctx, _cache) {
2833
+ return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
2834
+ }
2835
+ var CalendarIcon = { render };
2836
+ var index_vue_vue_type_style_index_0_scoped_true_lang = "";
2837
+ const _sfc_main$3 = defineComponent({
2838
+ name: "DrillDown",
2839
+ props: initDrillDownProps(),
2840
+ emits: initDrillDownEmits(),
2841
+ methods: {},
2842
+ components: {
2843
+ Button,
2844
+ Input,
2845
+ Empty,
2846
+ Menu,
2847
+ MenuItem,
2848
+ LocationIcon,
2849
+ TextIcon,
2850
+ CalendarIcon
2851
+ },
2852
+ setup(props) {
2853
+ const {
2854
+ dataSet,
2855
+ disabledFields,
2856
+ getDrillFields,
2857
+ setDrillFields,
2858
+ className
2859
+ } = props;
2860
+ const getOptions = () => {
2861
+ return dataSet.map((val) => {
2862
+ val.disabled = !!(disabledFields && disabledFields.includes(val.value));
2863
+ return val;
2864
+ });
2865
+ };
2866
+ const options = ref(getOptions());
2867
+ const selected = ref([]);
2868
+ const handleSearch = (e) => {
2869
+ const { value } = e.target;
2870
+ if (!value) {
2871
+ options.value = [...dataSet];
2872
+ } else {
2873
+ const reg = new RegExp(value, "gi");
2874
+ const result = dataSet.filter((item) => reg.test(item.name));
2875
+ options.value = [...result];
2876
+ }
2877
+ };
2878
+ const handleSelect = (value) => {
2879
+ const key = value == null ? void 0 : value.selectedKeys;
2880
+ selected.value = key;
2881
+ if (getDrillFields) {
2882
+ getDrillFields(key);
2883
+ }
2884
+ if (setDrillFields)
2885
+ setDrillFields(key);
2886
+ };
2887
+ const handleClear = (e) => {
2888
+ e.stopPropagation();
2889
+ selected.value = [];
2890
+ if (getDrillFields)
2891
+ getDrillFields([]);
2892
+ if (setDrillFields)
2893
+ setDrillFields([]);
2894
+ };
2895
+ return {
2896
+ options,
2897
+ handleSearch,
2898
+ handleSelect,
2899
+ handleClear,
2900
+ className,
2901
+ selected,
2902
+ isEmpty,
2903
+ DRILL_DOWN_PRE_CLASS
2904
+ };
2905
+ }
2906
+ });
2907
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2908
+ const _component_Button = resolveComponent("Button");
2909
+ const _component_Input = resolveComponent("Input");
2910
+ const _component_Empty = resolveComponent("Empty");
2911
+ const _component_text_icon = resolveComponent("text-icon");
2912
+ const _component_calendar_icon = resolveComponent("calendar-icon");
2913
+ const _component_location_icon = resolveComponent("location-icon");
2914
+ const _component_MenuItem = resolveComponent("MenuItem");
2915
+ const _component_Menu = resolveComponent("Menu");
2916
+ return openBlock(), createElementBlock("div", {
2917
+ class: normalizeClass([_ctx.DRILL_DOWN_PRE_CLASS, _ctx.className])
2918
+ }, [
2919
+ createElementVNode("header", {
2920
+ class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-header`)
2921
+ }, [
2922
+ createElementVNode("div", null, toDisplayString(_ctx.titleText), 1),
2923
+ createVNode(_component_Button, {
2924
+ type: "link",
2925
+ onClick: _ctx.handleClear
2926
+ }, {
2927
+ default: withCtx(() => [
2928
+ createTextVNode(toDisplayString(_ctx.clearButtonText), 1)
2929
+ ]),
2930
+ _: 1
2931
+ }, 8, ["onClick"])
2932
+ ], 2),
2933
+ createVNode(_component_Input, {
2934
+ class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-search`),
2935
+ placeholder: _ctx.searchText,
2936
+ onChange: _ctx.handleSearch,
2937
+ onPressEnter: _ctx.handleSearch,
2938
+ allowClear: true
2939
+ }, null, 8, ["class", "placeholder", "onChange", "onPressEnter"]),
2940
+ _ctx.isEmpty(_ctx.options) ? (openBlock(), createBlock(_component_Empty, {
2941
+ key: 0,
2942
+ imageStyle: { height: "64px" },
2943
+ class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-empty`)
2944
+ }, null, 8, ["class"])) : createCommentVNode("", true),
2945
+ createVNode(_component_Menu, {
2946
+ class: "`${DRILL_DOWN_PRE_CLASS}-menu`",
2947
+ selectedKeys: _ctx.selected,
2948
+ "onUpdate:selectedKeys": _cache[0] || (_cache[0] = ($event) => _ctx.selected = $event),
2949
+ onSelect: _ctx.handleSelect
2950
+ }, {
2951
+ default: withCtx(() => [
2952
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option) => {
2953
+ return openBlock(), createBlock(_component_MenuItem, {
2954
+ key: option.value,
2955
+ disabled: option.disabled,
2956
+ class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-menu-item`)
2957
+ }, {
2958
+ icon: withCtx(() => [
2959
+ option.type === "text" ? (openBlock(), createBlock(_component_text_icon, { key: 0 })) : createCommentVNode("", true),
2960
+ option.type === "date" ? (openBlock(), createBlock(_component_calendar_icon, { key: 1 })) : createCommentVNode("", true),
2961
+ option.type === "location" ? (openBlock(), createBlock(_component_location_icon, { key: 2 })) : createCommentVNode("", true)
2962
+ ]),
2963
+ default: withCtx(() => [
2964
+ createTextVNode(" " + toDisplayString(option == null ? void 0 : option.name), 1)
2965
+ ]),
2966
+ _: 2
2967
+ }, 1032, ["disabled", "class"]);
2968
+ }), 128))
2969
+ ]),
2970
+ _: 1
2971
+ }, 8, ["selectedKeys", "onSelect"])
2972
+ ], 2);
2973
+ }
2974
+ var DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-6eb1ccd0"]]);
2304
2975
  const _sfc_main$2 = defineComponent({
2305
2976
  name: "PivotSheet",
2306
- props: [],
2307
- emits: [],
2977
+ props: initBaseSheetProps(),
2978
+ emits: initBaseSheetEmits(),
2308
2979
  setup(props, ctx) {
2309
2980
  const s2Ref = useExpose(ctx.expose);
2310
- return { s2Ref };
2981
+ const { options: pivotOptions } = toRefs(props);
2982
+ const { dataCfg, partDrillDown } = toRefs(props);
2983
+ const drillFields = ref([]);
2984
+ const setDrillFields = (fields) => {
2985
+ var _a, _b, _c, _d, _e, _f;
2986
+ const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
2987
+ drillFields.value = fields;
2988
+ instance == null ? void 0 : instance.hideTooltip();
2989
+ if (isEmpty(fields)) {
2990
+ instance == null ? void 0 : instance.clearDrillDownData((_b = instance == null ? void 0 : instance.store.get("drillDownNode")) == null ? void 0 : _b.id);
2991
+ } else {
2992
+ handleDrillDown({
2993
+ rows: (_d = (_c = dataCfg.value) == null ? void 0 : _c.fields.rows) != null ? _d : [],
2994
+ drillFields: fields,
2995
+ fetchData: (_e = partDrillDown.value) == null ? void 0 : _e.fetchData,
2996
+ drillItemsNum: (_f = partDrillDown.value) == null ? void 0 : _f.drillItemsNum,
2997
+ spreadsheet: instance
2998
+ });
2999
+ }
3000
+ };
3001
+ const onDrillDownIconClick = (params) => {
3002
+ var _a, _b;
3003
+ const { event, disabledFields } = params;
3004
+ if (event) {
3005
+ const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
3006
+ const drillDownNode = createVNode(DrillDown, __spreadProps(__spreadValues({}, (_b = partDrillDown.value) == null ? void 0 : _b.drillConfig), {
3007
+ setDrillFields,
3008
+ drillFields: drillFields.value,
3009
+ disabledFields
3010
+ }));
3011
+ instance == null ? void 0 : instance.showTooltip({
3012
+ position: {
3013
+ x: event.clientX,
3014
+ y: event.clientY
3015
+ },
3016
+ event,
3017
+ content: drillDownNode
3018
+ });
3019
+ }
3020
+ };
3021
+ const options = computed(() => buildDrillDownOptions(pivotOptions.value, partDrillDown.value, (params) => onDrillDownIconClick(params)));
3022
+ return {
3023
+ s2Ref,
3024
+ options
3025
+ };
2311
3026
  },
2312
3027
  components: {
2313
3028
  BaseSheet
@@ -2315,7 +3030,10 @@ const _sfc_main$2 = defineComponent({
2315
3030
  });
2316
3031
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2317
3032
  const _component_BaseSheet = resolveComponent("BaseSheet");
2318
- return openBlock(), createBlock(_component_BaseSheet, { ref: "s2Ref" }, null, 512);
3033
+ return openBlock(), createBlock(_component_BaseSheet, mergeProps(_ctx.$props, {
3034
+ ref: "s2Ref",
3035
+ options: _ctx.options
3036
+ }), null, 16, ["options"]);
2319
3037
  }
2320
3038
  var PivotSheet = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
2321
3039
  const _sfc_main$1 = defineComponent({