@antv/s2-vue 2.0.0-next.13 → 2.0.0-next.15

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,30 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { S2_PREFIX_CLS, customMerge, DEFAULT_OPTIONS, floor, S2Event, extendLocale, TOOLTIP_PREFIX_CLS, i18n, getIcon, getTooltipDefaultOptions, BaseTooltip, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
21
- import { shallowRef, defineComponent, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, computed, createTextVNode, resolveComponent, createBlock, withCtx, createVNode, renderSlot, render as render$3, ref, watch, mergeProps, onMounted, reactive, isProxy, onBeforeUnmount, toRaw, toRefs, resolveDynamicComponent } from "vue";
20
+ var __async = (__this, __arguments, generator) => {
21
+ return new Promise((resolve, reject) => {
22
+ var fulfilled = (value) => {
23
+ try {
24
+ step(generator.next(value));
25
+ } catch (e) {
26
+ reject(e);
27
+ }
28
+ };
29
+ var rejected = (value) => {
30
+ try {
31
+ step(generator.throw(value));
32
+ } catch (e) {
33
+ reject(e);
34
+ }
35
+ };
36
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
37
+ step((generator = generator.apply(__this, __arguments)).next());
38
+ });
39
+ };
40
+ import { S2_PREFIX_CLS, S2Event, customMerge, DEFAULT_OPTIONS, floor, extendLocale, TOOLTIP_PREFIX_CLS, i18n, getIcon, getTooltipDefaultOptions, BaseTooltip, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
41
+ import { defineComponent, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, computed, createTextVNode, resolveComponent, createBlock, withCtx, createVNode, renderSlot, render as render$3, ref, watch, mergeProps, onMounted, reactive, isProxy, shallowRef, onBeforeUnmount, toRaw, toRefs, resolveDynamicComponent } from "vue";
22
42
  import { Menu, Dropdown, Pagination, Spin, Button, Input, Empty, MenuItem } from "ant-design-vue";
43
+ const DRILL_DOWN_PRE_CLASS = `${S2_PREFIX_CLS}-drill-down`;
23
44
  const EN_US = {
24
45
  选择分析信息: "Select Analysis Information",
25
46
  切换指标: "Switch indicator",
@@ -60,7 +81,39 @@ const EN_US = {
60
81
  // strategy
61
82
  时间: "Date",
62
83
  指标: "Measure",
63
- 目标值: "Target Value"
84
+ 目标值: "Target Value",
85
+ // components
86
+ 自定义颜色: "Custom color",
87
+ 平铺: "Grid",
88
+ 树状: "Tree",
89
+ 默认: "Default",
90
+ 多彩风: "Colorful",
91
+ 简约风: "Normal",
92
+ 极简风: "Basic",
93
+ 斑马纹风: "Zebra",
94
+ 主题风格: "Thematic style",
95
+ 类型: "Theme type",
96
+ 主题: "Theme color",
97
+ 主色系: "Primary color",
98
+ 深色主题: "Dark theme",
99
+ 浅色主题: "Light theme",
100
+ 灰色: "Gray",
101
+ 自定义: "Custom",
102
+ 文字对齐: "Text align",
103
+ 左对齐: "Align left",
104
+ 居中: "Align center",
105
+ 右对齐: "Align right",
106
+ 表头: "Header",
107
+ "表身 (维度)": "Body(dimension)",
108
+ "表身 (指标)": "Body(measure)",
109
+ 冻结行列头: "Frozen header",
110
+ 行: "Row",
111
+ 列: "Column",
112
+ 冻结行: "Frozen row",
113
+ 冻结列: "Frozen column",
114
+ 冻结: "Frozen",
115
+ 冻结前: "Freeze the first",
116
+ 冻结后: "Freeze the last"
64
117
  };
65
118
  const ZH_CN = {
66
119
  选择分析信息: "选择分析信息",
@@ -102,7 +155,39 @@ const ZH_CN = {
102
155
  // strategy
103
156
  时间: "时间",
104
157
  指标: "指标",
105
- 目标值: "目标值"
158
+ 目标值: "目标值",
159
+ // components
160
+ 自定义颜色: "自定义颜色",
161
+ 平铺: "平铺",
162
+ 树状: "树状",
163
+ 默认: "默认",
164
+ 多彩风: "多彩风",
165
+ 简约风: "简约风",
166
+ 极简风: "极简风",
167
+ 斑马纹风: "斑马纹风",
168
+ 主题风格: "主题风格",
169
+ 类型: "类型",
170
+ 主题: "主题",
171
+ 主色系: "主色系",
172
+ 深色主题: "深色主题",
173
+ 浅色主题: "浅色主题",
174
+ 灰色: "灰色",
175
+ 自定义: "自定义",
176
+ 文字对齐: "文字对齐",
177
+ 左对齐: "左对齐",
178
+ 居中: "居中",
179
+ 右对齐: "右对齐",
180
+ 表头: "表头",
181
+ "表身 (维度)": "表身 (维度)",
182
+ "表身 (指标)": "表身 (指标)",
183
+ 冻结行列头: "冻结行列头",
184
+ 行: "行",
185
+ 列: "列",
186
+ 冻结行: "冻结行",
187
+ 冻结列: "冻结列",
188
+ 冻结: "冻结",
189
+ 冻结前: "冻结前",
190
+ 冻结后: "冻结后"
106
191
  };
107
192
  const Locale = {
108
193
  zh_CN: ZH_CN,
@@ -120,12 +205,6 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
120
205
  showDefaultHeaderActionIcon: true
121
206
  };
122
207
  const RESIZE_RENDER_DELAY = 200;
123
- const DRILL_DOWN_PRE_CLASS = `${S2_PREFIX_CLS}-drill-down`;
124
- const getBaseSheetComponentOptions = (...options) => customMerge(
125
- DEFAULT_OPTIONS,
126
- SHEET_COMPONENT_DEFAULT_OPTIONS,
127
- ...options
128
- );
129
208
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
130
209
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
131
210
  var root = freeGlobal || freeSelf || Function("return this")();
@@ -365,8 +444,7 @@ var baseSetToString = !defineProperty ? identity : function(func, string) {
365
444
  "writable": true
366
445
  });
367
446
  };
368
- const baseSetToString$1 = baseSetToString;
369
- var setToString = shortOut(baseSetToString$1);
447
+ var setToString = shortOut(baseSetToString);
370
448
  function arrayEach(array, iteratee) {
371
449
  var index2 = -1, length = array == null ? 0 : array.length;
372
450
  while (++index2 < length) {
@@ -412,7 +490,7 @@ function copyObject(source, props, object, customizer) {
412
490
  var index2 = -1, length = props.length;
413
491
  while (++index2 < length) {
414
492
  var key = props[index2];
415
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
493
+ var newValue = void 0;
416
494
  if (newValue === void 0) {
417
495
  newValue = source[key];
418
496
  }
@@ -472,7 +550,6 @@ var isArguments = baseIsArguments(/* @__PURE__ */ function() {
472
550
  }()) ? baseIsArguments : function(value) {
473
551
  return isObjectLike(value) && hasOwnProperty$a.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
474
552
  };
475
- const isArguments$1 = isArguments;
476
553
  function stubFalse() {
477
554
  return false;
478
555
  }
@@ -482,7 +559,6 @@ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
482
559
  var Buffer$1 = moduleExports$2 ? root.Buffer : void 0;
483
560
  var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
484
561
  var isBuffer = nativeIsBuffer || stubFalse;
485
- const isBuffer$1 = isBuffer;
486
562
  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$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$7 = "[object Set]", stringTag$4 = "[object String]", weakMapTag$2 = "[object WeakMap]";
487
563
  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]";
488
564
  var typedArrayTags = {};
@@ -512,11 +588,10 @@ var nodeUtil = function() {
512
588
  }();
513
589
  var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
514
590
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
515
- const isTypedArray$1 = isTypedArray;
516
591
  var objectProto$a = Object.prototype;
517
592
  var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
518
593
  function arrayLikeKeys(value, inherited) {
519
- var isArr = isArray(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;
594
+ var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
520
595
  for (var key in value) {
521
596
  if ((inherited || hasOwnProperty$9.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
522
597
  (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
@@ -820,7 +895,7 @@ function arrayPush(array, values) {
820
895
  }
821
896
  var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
822
897
  function isFlattenable(value) {
823
- return isArray(value) || isArguments$1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
898
+ return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
824
899
  }
825
900
  function baseFlatten(array, depth, predicate, isStrict, result) {
826
901
  var index2 = -1, length = array.length;
@@ -828,13 +903,11 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
828
903
  result || (result = []);
829
904
  while (++index2 < length) {
830
905
  var value = array[index2];
831
- if (depth > 0 && predicate(value)) {
832
- if (depth > 1) {
833
- baseFlatten(value, depth - 1, predicate, isStrict, result);
834
- } else {
906
+ if (predicate(value)) {
907
+ {
835
908
  arrayPush(result, value);
836
909
  }
837
- } else if (!isStrict) {
910
+ } else {
838
911
  result[result.length] = value;
839
912
  }
840
913
  }
@@ -842,7 +915,7 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
842
915
  }
843
916
  function flatten(array) {
844
917
  var length = array == null ? 0 : array.length;
845
- return length ? baseFlatten(array, 1) : [];
918
+ return length ? baseFlatten(array) : [];
846
919
  }
847
920
  function flatRest(func) {
848
921
  return setToString(overRest(func, void 0, flatten), func + "");
@@ -992,9 +1065,8 @@ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
992
1065
  }
993
1066
  return result;
994
1067
  };
995
- const getSymbolsIn$1 = getSymbolsIn;
996
1068
  function copySymbolsIn(source, object) {
997
- return copyObject(source, getSymbolsIn$1(source), object);
1069
+ return copyObject(source, getSymbolsIn(source), object);
998
1070
  }
999
1071
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1000
1072
  var result = keysFunc(object);
@@ -1004,7 +1076,7 @@ function getAllKeys(object) {
1004
1076
  return baseGetAllKeys(object, keys, getSymbols);
1005
1077
  }
1006
1078
  function getAllKeysIn(object) {
1007
- return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
1079
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
1008
1080
  }
1009
1081
  var DataView = getNative(root, "DataView");
1010
1082
  var Promise$1 = getNative(root, "Promise");
@@ -1033,7 +1105,6 @@ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map
1033
1105
  return result;
1034
1106
  };
1035
1107
  }
1036
- const getTag$1 = getTag;
1037
1108
  var objectProto$3 = Object.prototype;
1038
1109
  var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
1039
1110
  function initCloneArray(array) {
@@ -1045,10 +1116,9 @@ function initCloneArray(array) {
1045
1116
  return result;
1046
1117
  }
1047
1118
  var Uint8Array2 = root.Uint8Array;
1048
- const Uint8Array$1 = Uint8Array2;
1049
1119
  function cloneArrayBuffer(arrayBuffer) {
1050
1120
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1051
- new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
1121
+ new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
1052
1122
  return result;
1053
1123
  }
1054
1124
  function cloneDataView(dataView, isDeep) {
@@ -1109,13 +1179,13 @@ function initCloneObject(object) {
1109
1179
  }
1110
1180
  var mapTag$4 = "[object Map]";
1111
1181
  function baseIsMap(value) {
1112
- return isObjectLike(value) && getTag$1(value) == mapTag$4;
1182
+ return isObjectLike(value) && getTag(value) == mapTag$4;
1113
1183
  }
1114
1184
  var nodeIsMap = nodeUtil && nodeUtil.isMap;
1115
1185
  var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
1116
1186
  var setTag$4 = "[object Set]";
1117
1187
  function baseIsSet(value) {
1118
- return isObjectLike(value) && getTag$1(value) == setTag$4;
1188
+ return isObjectLike(value) && getTag(value) == setTag$4;
1119
1189
  }
1120
1190
  var nodeIsSet = nodeUtil && nodeUtil.isSet;
1121
1191
  var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
@@ -1143,8 +1213,8 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
1143
1213
  return copyArray(value, result);
1144
1214
  }
1145
1215
  } else {
1146
- var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
1147
- if (isBuffer$1(value)) {
1216
+ var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
1217
+ if (isBuffer(value)) {
1148
1218
  return cloneBuffer(value, isDeep);
1149
1219
  }
1150
1220
  if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
@@ -1289,7 +1359,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1289
1359
  object = object.buffer;
1290
1360
  other = other.buffer;
1291
1361
  case arrayBufferTag:
1292
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
1362
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
1293
1363
  return false;
1294
1364
  }
1295
1365
  return true;
@@ -1377,12 +1447,12 @@ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[o
1377
1447
  var objectProto$1 = Object.prototype;
1378
1448
  var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1379
1449
  function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1380
- var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag$1(object), othTag = othIsArr ? arrayTag : getTag$1(other);
1450
+ var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
1381
1451
  objTag = objTag == argsTag ? objectTag : objTag;
1382
1452
  othTag = othTag == argsTag ? objectTag : othTag;
1383
1453
  var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
1384
- if (isSameTag && isBuffer$1(object)) {
1385
- if (!isBuffer$1(other)) {
1454
+ if (isSameTag && isBuffer(object)) {
1455
+ if (!isBuffer(other)) {
1386
1456
  return false;
1387
1457
  }
1388
1458
  objIsArr = true;
@@ -1390,7 +1460,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1390
1460
  }
1391
1461
  if (isSameTag && !objIsObj) {
1392
1462
  stack || (stack = new Stack());
1393
- return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1463
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1394
1464
  }
1395
1465
  if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
1396
1466
  var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
@@ -1417,29 +1487,27 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
1417
1487
  }
1418
1488
  var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
1419
1489
  function baseIsMatch(object, source, matchData, customizer) {
1420
- var index2 = matchData.length, length = index2, noCustomizer = !customizer;
1490
+ var index2 = matchData.length, length = index2;
1421
1491
  if (object == null) {
1422
1492
  return !length;
1423
1493
  }
1424
1494
  object = Object(object);
1425
1495
  while (index2--) {
1426
1496
  var data = matchData[index2];
1427
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1497
+ if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1428
1498
  return false;
1429
1499
  }
1430
1500
  }
1431
1501
  while (++index2 < length) {
1432
1502
  data = matchData[index2];
1433
1503
  var key = data[0], objValue = object[key], srcValue = data[1];
1434
- if (noCustomizer && data[2]) {
1504
+ if (data[2]) {
1435
1505
  if (objValue === void 0 && !(key in object)) {
1436
1506
  return false;
1437
1507
  }
1438
1508
  } else {
1439
1509
  var stack = new Stack();
1440
- if (customizer) {
1441
- var result = customizer(objValue, srcValue, key, object, source, stack);
1442
- }
1510
+ var result;
1443
1511
  if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
1444
1512
  return false;
1445
1513
  }
@@ -1492,7 +1560,7 @@ function hasPath(object, path, hasFunc) {
1492
1560
  return result;
1493
1561
  }
1494
1562
  length = object == null ? 0 : object.length;
1495
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments$1(object));
1563
+ return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
1496
1564
  }
1497
1565
  function hasIn(object, path) {
1498
1566
  return object != null && hasPath(object, path, baseHasIn);
@@ -1536,7 +1604,7 @@ function createBaseFor(fromRight) {
1536
1604
  return function(object, iteratee, keysFunc) {
1537
1605
  var index2 = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1538
1606
  while (length--) {
1539
- var key = props[fromRight ? length : ++index2];
1607
+ var key = props[++index2];
1540
1608
  if (iteratee(iterable[key], key, iterable) === false) {
1541
1609
  break;
1542
1610
  }
@@ -1545,9 +1613,8 @@ function createBaseFor(fromRight) {
1545
1613
  };
1546
1614
  }
1547
1615
  var baseFor = createBaseFor();
1548
- const baseFor$1 = baseFor;
1549
1616
  function baseForOwn(object, iteratee) {
1550
- return object && baseFor$1(object, iteratee, keys);
1617
+ return object && baseFor(object, iteratee, keys);
1551
1618
  }
1552
1619
  function createBaseEach(eachFunc, fromRight) {
1553
1620
  return function(collection, iteratee) {
@@ -1557,8 +1624,8 @@ function createBaseEach(eachFunc, fromRight) {
1557
1624
  if (!isArrayLike(collection)) {
1558
1625
  return eachFunc(collection, iteratee);
1559
1626
  }
1560
- var length = collection.length, index2 = fromRight ? length : -1, iterable = Object(collection);
1561
- while (fromRight ? index2-- : ++index2 < length) {
1627
+ var length = collection.length, index2 = -1, iterable = Object(collection);
1628
+ while (++index2 < length) {
1562
1629
  if (iteratee(iterable[index2], index2, iterable) === false) {
1563
1630
  break;
1564
1631
  }
@@ -1567,7 +1634,6 @@ function createBaseEach(eachFunc, fromRight) {
1567
1634
  };
1568
1635
  }
1569
1636
  var baseEach = createBaseEach(baseForOwn);
1570
- const baseEach$1 = baseEach;
1571
1637
  var now = function() {
1572
1638
  return root.Date.now();
1573
1639
  };
@@ -1660,7 +1726,7 @@ function last(array) {
1660
1726
  }
1661
1727
  function baseFilter(collection, predicate) {
1662
1728
  var result = [];
1663
- baseEach$1(collection, function(value, index2, collection2) {
1729
+ baseEach(collection, function(value, index2, collection2) {
1664
1730
  if (predicate(value, index2, collection2)) {
1665
1731
  result.push(value);
1666
1732
  }
@@ -1689,10 +1755,10 @@ function isEmpty(value) {
1689
1755
  if (value == null) {
1690
1756
  return true;
1691
1757
  }
1692
- if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
1758
+ if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
1693
1759
  return !value.length;
1694
1760
  }
1695
- var tag = getTag$1(value);
1761
+ var tag = getTag(value);
1696
1762
  if (tag == mapTag$1 || tag == setTag$1) {
1697
1763
  return !value.size;
1698
1764
  }
@@ -1759,7 +1825,7 @@ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
1759
1825
  }
1760
1826
  function reduce(collection, iteratee, accumulator) {
1761
1827
  var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
1762
- return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach$1);
1828
+ return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach);
1763
1829
  }
1764
1830
  var mapTag = "[object Map]", setTag = "[object Set]";
1765
1831
  function size(collection) {
@@ -1769,71 +1835,12 @@ function size(collection) {
1769
1835
  if (isArrayLike(collection)) {
1770
1836
  return isString(collection) ? stringSize(collection) : collection.length;
1771
1837
  }
1772
- var tag = getTag$1(collection);
1838
+ var tag = getTag(collection);
1773
1839
  if (tag == mapTag || tag == setTag) {
1774
1840
  return collection.size;
1775
1841
  }
1776
1842
  return baseKeys(collection).length;
1777
1843
  }
1778
- const analyzeAdaptive = (defaultContainer, adaptive) => {
1779
- var _a, _b, _c;
1780
- if (isBoolean(adaptive)) {
1781
- return {
1782
- container: defaultContainer,
1783
- adaptiveWidth: true,
1784
- adaptiveHeight: false
1785
- };
1786
- }
1787
- return {
1788
- container: ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || defaultContainer,
1789
- adaptiveWidth: (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true,
1790
- adaptiveHeight: (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true
1791
- };
1792
- };
1793
- const createResizeObserver = (params) => {
1794
- let isFirstRender = true;
1795
- const { s2, adaptive, container, wrapper } = params;
1796
- const {
1797
- container: actualWrapper,
1798
- adaptiveWidth,
1799
- adaptiveHeight
1800
- } = analyzeAdaptive(wrapper, adaptive);
1801
- if (!actualWrapper || !container || !adaptive || !s2) {
1802
- return;
1803
- }
1804
- const render2 = (width, height) => {
1805
- s2 == null ? void 0 : s2.changeSheetSize(width, height);
1806
- s2 == null ? void 0 : s2.render(false);
1807
- };
1808
- const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
1809
- const onResize = () => {
1810
- const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
1811
- const width = adaptiveWidth ? floor(containerWidth != null ? containerWidth : s2.options.width) : s2.options.width;
1812
- const height = adaptiveHeight ? floor(containerHeight != null ? containerHeight : s2.options.height) : s2.options.height;
1813
- if (!adaptiveWidth && !adaptiveHeight) {
1814
- return;
1815
- }
1816
- if (isFirstRender) {
1817
- render2(width, height);
1818
- isFirstRender = false;
1819
- return;
1820
- }
1821
- debounceRender(width, height);
1822
- };
1823
- const resizeObserver = new ResizeObserver(
1824
- ([entry] = []) => {
1825
- if (entry) {
1826
- onResize();
1827
- }
1828
- }
1829
- );
1830
- resizeObserver.observe(actualWrapper, {
1831
- box: "border-box"
1832
- });
1833
- return () => {
1834
- resizeObserver.unobserve(actualWrapper);
1835
- };
1836
- };
1837
1844
  const getDrillDownCache = (spreadsheet, meta) => {
1838
1845
  const drillDownDataCache = spreadsheet.store.get(
1839
1846
  "drillDownDataCache",
@@ -1924,7 +1931,7 @@ const handleDrillDown = (params) => {
1924
1931
  if (!fetchData) {
1925
1932
  return;
1926
1933
  }
1927
- fetchData(meta, drillFields).then((info) => {
1934
+ fetchData(meta, drillFields).then((info) => __async(void 0, null, function* () {
1928
1935
  const { drillData, drillField } = info;
1929
1936
  spreadsheet.dataSet.transformDrillDownData(
1930
1937
  drillField,
@@ -1943,20 +1950,74 @@ const handleDrillDown = (params) => {
1943
1950
  spreadsheet.store.set("drillDownDataCache", newDrillDownDataCache);
1944
1951
  }
1945
1952
  spreadsheet.interaction.reset();
1946
- spreadsheet.render(false);
1947
- });
1953
+ yield spreadsheet.render(false);
1954
+ }));
1948
1955
  };
1949
- extendLocale(Locale);
1950
- const useExpose = (expose) => {
1951
- const s2Ref = shallowRef();
1952
- expose({
1953
- get instance() {
1954
- var _a;
1955
- return (_a = s2Ref.value) == null ? void 0 : _a.instance;
1956
+ const getBaseSheetComponentOptions = (...options) => customMerge(
1957
+ DEFAULT_OPTIONS,
1958
+ SHEET_COMPONENT_DEFAULT_OPTIONS,
1959
+ ...options
1960
+ );
1961
+ const analyzeAdaptive = (defaultContainer, adaptive) => {
1962
+ var _a, _b, _c;
1963
+ if (isBoolean(adaptive)) {
1964
+ return {
1965
+ container: defaultContainer,
1966
+ adaptiveWidth: true,
1967
+ adaptiveHeight: false
1968
+ };
1969
+ }
1970
+ return {
1971
+ container: ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || defaultContainer,
1972
+ adaptiveWidth: (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true,
1973
+ adaptiveHeight: (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true
1974
+ };
1975
+ };
1976
+ const createResizeObserver = (params) => {
1977
+ let isFirstRender = true;
1978
+ const { s2, adaptive, container, wrapper } = params;
1979
+ const {
1980
+ container: actualWrapper,
1981
+ adaptiveWidth,
1982
+ adaptiveHeight
1983
+ } = analyzeAdaptive(wrapper, adaptive);
1984
+ if (!actualWrapper || !container || !adaptive || !s2) {
1985
+ return;
1986
+ }
1987
+ const render2 = (width, height) => __async(void 0, null, function* () {
1988
+ s2 == null ? void 0 : s2.changeSheetSize(width, height);
1989
+ yield s2 == null ? void 0 : s2.render(false);
1990
+ });
1991
+ const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
1992
+ const onResize = () => __async(void 0, null, function* () {
1993
+ const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
1994
+ const width = adaptiveWidth ? floor(containerWidth != null ? containerWidth : s2.options.width) : s2.options.width;
1995
+ const height = adaptiveHeight ? floor(containerHeight != null ? containerHeight : s2.options.height) : s2.options.height;
1996
+ if (!adaptiveWidth && !adaptiveHeight) {
1997
+ return;
1998
+ }
1999
+ if (isFirstRender) {
2000
+ yield render2(width, height);
2001
+ isFirstRender = false;
2002
+ return;
1956
2003
  }
2004
+ debounceRender(width, height);
1957
2005
  });
1958
- return s2Ref;
2006
+ const resizeObserver = new ResizeObserver(
2007
+ ([entry] = []) => {
2008
+ if (entry) {
2009
+ onResize();
2010
+ }
2011
+ }
2012
+ );
2013
+ resizeObserver.observe(actualWrapper, {
2014
+ box: "border-box"
2015
+ });
2016
+ return () => {
2017
+ resizeObserver.unobserve(actualWrapper);
2018
+ };
1959
2019
  };
2020
+ extendLocale(Locale);
1960
2021
  const _sfc_main$e = defineComponent({
1961
2022
  name: "TooltipDetail",
1962
2023
  props: ["list"],
@@ -2436,7 +2497,7 @@ const usePagination = (s2Ref, props) => {
2436
2497
  const visible = computed(() => {
2437
2498
  return showPagination && !isEmpty(paginationCfg);
2438
2499
  });
2439
- watch([current, pageSize], () => {
2500
+ watch([current, pageSize], () => __async(void 0, null, function* () {
2440
2501
  if (!s2Ref.value) {
2441
2502
  return;
2442
2503
  }
@@ -2445,8 +2506,8 @@ const usePagination = (s2Ref, props) => {
2445
2506
  pageSize: pageSize.value
2446
2507
  };
2447
2508
  s2Ref.value.updatePagination(nextPagination);
2448
- s2Ref.value.render(false);
2449
- });
2509
+ yield s2Ref.value.render(false);
2510
+ }));
2450
2511
  watch(
2451
2512
  [() => paginationCfg, s2Ref],
2452
2513
  () => {
@@ -2840,7 +2901,25 @@ const useLoading = (s2Ref, loadingProp = false) => {
2840
2901
  });
2841
2902
  return { loading, setLoading };
2842
2903
  };
2843
- const useSheetUpdate = (s2Ref, props) => {
2904
+ const useResize = (s2Ref, props, dom) => {
2905
+ const unobserve = ref();
2906
+ watch([s2Ref, () => props.adaptive], ([s2, adaptive], _, onCleanup) => {
2907
+ if (!s2) {
2908
+ return;
2909
+ }
2910
+ unobserve.value = createResizeObserver({
2911
+ s2,
2912
+ adaptive,
2913
+ wrapper: dom.wrapperRef.value,
2914
+ container: dom.containerRef.value
2915
+ });
2916
+ onCleanup(() => {
2917
+ var _a;
2918
+ (_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
2919
+ });
2920
+ });
2921
+ };
2922
+ const useSheetUpdate = (s2Ref, props, hooks) => {
2844
2923
  const updateFlag = reactive({
2845
2924
  rerender: false,
2846
2925
  reloadData: false,
@@ -2884,37 +2963,23 @@ const useSheetUpdate = (s2Ref, props) => {
2884
2963
  deep: isProxy(props.themeCfg)
2885
2964
  }
2886
2965
  );
2887
- watch(updateFlag, (flag) => {
2888
- var _a;
2966
+ watch(updateFlag, (flag) => __async(void 0, null, function* () {
2967
+ var _a, _b, _c, _d, _e;
2889
2968
  if (!flag.rerender) {
2890
2969
  return;
2891
2970
  }
2892
- (_a = s2Ref.value) == null ? void 0 : _a.render({
2971
+ (_a = hooks == null ? void 0 : hooks.before) == null ? void 0 : _a.call(hooks);
2972
+ const renderOptions = (_b = props == null ? void 0 : props.onUpdate) == null ? void 0 : _b.call(props, {
2893
2973
  reloadData: flag.reloadData,
2894
- reBuildDataSet: flag.rebuildDataset
2974
+ rebuildDataSet: flag.rebuildDataset
2895
2975
  });
2976
+ yield (_c = s2Ref.value) == null ? void 0 : _c.render(renderOptions);
2977
+ (_d = props == null ? void 0 : props.onUpdateAfterRender) == null ? void 0 : _d.call(props, renderOptions);
2978
+ (_e = hooks == null ? void 0 : hooks.after) == null ? void 0 : _e.call(hooks);
2896
2979
  flag.rerender = false;
2897
2980
  flag.reloadData = false;
2898
2981
  flag.rebuildDataset = false;
2899
- });
2900
- };
2901
- const useResize = (s2Ref, props, dom) => {
2902
- const unobserve = ref();
2903
- watch([s2Ref, () => props.adaptive], ([s2, adaptive], _, onCleanup) => {
2904
- if (!s2) {
2905
- return;
2906
- }
2907
- unobserve.value = createResizeObserver({
2908
- s2,
2909
- adaptive,
2910
- wrapper: dom.wrapperRef.value,
2911
- container: dom.containerRef.value
2912
- });
2913
- onCleanup(() => {
2914
- var _a;
2915
- (_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
2916
- });
2917
- });
2982
+ }));
2918
2983
  };
2919
2984
  function useSpreadSheet(props, emit) {
2920
2985
  const {
@@ -2943,20 +3008,28 @@ function useSpreadSheet(props, emit) {
2943
3008
  }
2944
3009
  return new PivotSheet$1(container, rawDataCfg, s2Options);
2945
3010
  };
2946
- const buildSpreadSheet = () => {
3011
+ const buildSpreadSheet = () => __async(this, null, function* () {
2947
3012
  setLoading(true);
2948
3013
  s2Ref.value = renderSpreadSheet(containerRef.value);
2949
3014
  s2Ref.value.setThemeCfg(toRaw(themeCfg));
2950
- s2Ref.value.render();
3015
+ yield s2Ref.value.render();
2951
3016
  setLoading(false);
2952
3017
  onS2Mounted == null ? void 0 : onS2Mounted(s2Ref.value);
2953
- };
3018
+ });
2954
3019
  onMounted(buildSpreadSheet);
2955
3020
  useEvents(s2Ref, emit);
2956
- useSheetUpdate(s2Ref, props);
3021
+ useSheetUpdate(s2Ref, props, {
3022
+ before() {
3023
+ setLoading(true);
3024
+ },
3025
+ after() {
3026
+ setLoading(false);
3027
+ }
3028
+ });
2957
3029
  useResize(s2Ref, props, { wrapperRef, containerRef });
2958
3030
  onBeforeUnmount(() => {
2959
3031
  var _a;
3032
+ setLoading(false);
2960
3033
  (_a = s2Ref.value) == null ? void 0 : _a.destroy();
2961
3034
  });
2962
3035
  return {
@@ -2989,7 +3062,9 @@ const initBaseSheetProps = () => {
2989
3062
  default: false
2990
3063
  },
2991
3064
  spreadsheet: Function,
2992
- onMounted: Function
3065
+ onMounted: Function,
3066
+ onUpdate: Function,
3067
+ onUpdateAfterRender: Function
2993
3068
  };
2994
3069
  };
2995
3070
  const initDrillDownProps = () => {
@@ -3193,6 +3268,16 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3193
3268
  }, 8, ["wrapperClassName", "spinning"]);
3194
3269
  }
3195
3270
  const BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
3271
+ const useExpose = (expose) => {
3272
+ const s2Ref = shallowRef();
3273
+ expose({
3274
+ get instance() {
3275
+ var _a;
3276
+ return (_a = s2Ref.value) == null ? void 0 : _a.instance;
3277
+ }
3278
+ });
3279
+ return s2Ref;
3280
+ };
3196
3281
  const _hoisted_1$2 = {
3197
3282
  class: "antv-s2-icon",
3198
3283
  viewBox: "0 0 1024 1024",
@@ -3208,7 +3293,7 @@ const _hoisted_3$2 = [
3208
3293
  _hoisted_2$2
3209
3294
  ];
3210
3295
  function render$2(_ctx, _cache) {
3211
- return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
3296
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._hoisted_3$2]);
3212
3297
  }
3213
3298
  const LocationIcon = { render: render$2 };
3214
3299
  const _hoisted_1$1 = {
@@ -3226,7 +3311,7 @@ const _hoisted_3$1 = [
3226
3311
  _hoisted_2$1
3227
3312
  ];
3228
3313
  function render$1(_ctx, _cache) {
3229
- return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
3314
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._hoisted_3$1]);
3230
3315
  }
3231
3316
  const TextIcon = { render: render$1 };
3232
3317
  const _hoisted_1 = {
@@ -3244,7 +3329,7 @@ const _hoisted_3 = [
3244
3329
  _hoisted_2
3245
3330
  ];
3246
3331
  function render(_ctx, _cache) {
3247
- return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
3332
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._hoisted_3]);
3248
3333
  }
3249
3334
  const CalendarIcon = { render };
3250
3335
  const _sfc_main$3 = defineComponent({
@@ -3499,7 +3584,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3499
3584
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.sheetType), { ref: "s2Ref" }, null, 512);
3500
3585
  }
3501
3586
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
3502
- const version = "@antv/s2-vue-v2.0.0-next.13";
3587
+ const version = "@antv/s2-vue-v2.0.0-next.15";
3503
3588
  export {
3504
3589
  BaseSheet,
3505
3590
  CustomTooltip,