@antv/s2-vue 2.0.0-next.14 → 2.0.0-next.16

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,81 @@ 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"
117
+ };
118
+ const RU = {
119
+ 选择分析信息: "Выберите информацию для анализа",
120
+ 切换指标: "Индикатор переключения",
121
+ 确定: "Подтвердить",
122
+ 取消: "Отмена",
123
+ 重置: "Сбросить",
124
+ 请输入关键字搜索: "Пожалуйста, введите поиск по ключевым словам",
125
+ 搜索: "Поиск",
126
+ 恢复: "Восстановить",
127
+ "已选 {} 项": "Выбран(-но) {} элемент(-а/-ов)",
128
+ 所选项: "выбранные элементы",
129
+ 选择下钻维度: "Выберите параметры детализации",
130
+ 恢复默认: "Сбросить до первоначального состояния",
131
+ 搜索字段: "Поисковое поле",
132
+ // switcher
133
+ 行列切换: "Конфигурация отображения строк, столбцов и значений",
134
+ 行头: "Строки",
135
+ 列头: "Колонки",
136
+ 值: "Значения",
137
+ 展开子项: "Отобразить дочерние элементы",
138
+ // sort
139
+ 首字母: "Алфавитная сортировка",
140
+ 手动排序: "Ручная сортировка",
141
+ 其他字段: "Другое поле",
142
+ 高级排序: "Расширенная сортировка",
143
+ 设置顺序: "Установить сортировку",
144
+ 可选字段: "Необязательные поля",
145
+ "按以下规则进行排序(优先级由低到高)": "Порядок, определеяемый следующими правилами (от низкого приоритета к высокому)",
146
+ 按: "По",
147
+ 说明: "Описание: ",
148
+ // export
149
+ 复制原始数据: "Копировать строковые данные",
150
+ 复制格式化数据: "Копировать отформатированные данные",
151
+ 下载原始数据: "Скачать строковые данные",
152
+ 下载格式化数据: "Скачать отформатированные данные",
153
+ 操作成功: "Операция успешно выполнена",
154
+ 操作失败: "Операция завершилась неудачно",
155
+ // strategy
156
+ 时间: "Дата",
157
+ 指标: "Мера",
158
+ 目标值: "Целевое Значение"
64
159
  };
65
160
  const ZH_CN = {
66
161
  选择分析信息: "选择分析信息",
@@ -102,11 +197,44 @@ const ZH_CN = {
102
197
  // strategy
103
198
  时间: "时间",
104
199
  指标: "指标",
105
- 目标值: "目标值"
200
+ 目标值: "目标值",
201
+ // components
202
+ 自定义颜色: "自定义颜色",
203
+ 平铺: "平铺",
204
+ 树状: "树状",
205
+ 默认: "默认",
206
+ 多彩风: "多彩风",
207
+ 简约风: "简约风",
208
+ 极简风: "极简风",
209
+ 斑马纹风: "斑马纹风",
210
+ 主题风格: "主题风格",
211
+ 类型: "类型",
212
+ 主题: "主题",
213
+ 主色系: "主色系",
214
+ 深色主题: "深色主题",
215
+ 浅色主题: "浅色主题",
216
+ 灰色: "灰色",
217
+ 自定义: "自定义",
218
+ 文字对齐: "文字对齐",
219
+ 左对齐: "左对齐",
220
+ 居中: "居中",
221
+ 右对齐: "右对齐",
222
+ 表头: "表头",
223
+ "表身 (维度)": "表身 (维度)",
224
+ "表身 (指标)": "表身 (指标)",
225
+ 冻结行列头: "冻结行列头",
226
+ 行: "行",
227
+ 列: "列",
228
+ 冻结行: "冻结行",
229
+ 冻结列: "冻结列",
230
+ 冻结: "冻结",
231
+ 冻结前: "冻结前",
232
+ 冻结后: "冻结后"
106
233
  };
107
234
  const Locale = {
108
235
  zh_CN: ZH_CN,
109
- en_US: EN_US
236
+ en_US: EN_US,
237
+ ru_RU: RU
110
238
  };
111
239
  const SHEET_COMPONENT_DEFAULT_OPTIONS = {
112
240
  tooltip: {
@@ -120,12 +248,6 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
120
248
  showDefaultHeaderActionIcon: true
121
249
  };
122
250
  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
251
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
130
252
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
131
253
  var root = freeGlobal || freeSelf || Function("return this")();
@@ -365,8 +487,7 @@ var baseSetToString = !defineProperty ? identity : function(func, string) {
365
487
  "writable": true
366
488
  });
367
489
  };
368
- const baseSetToString$1 = baseSetToString;
369
- var setToString = shortOut(baseSetToString$1);
490
+ var setToString = shortOut(baseSetToString);
370
491
  function arrayEach(array, iteratee) {
371
492
  var index2 = -1, length = array == null ? 0 : array.length;
372
493
  while (++index2 < length) {
@@ -412,7 +533,7 @@ function copyObject(source, props, object, customizer) {
412
533
  var index2 = -1, length = props.length;
413
534
  while (++index2 < length) {
414
535
  var key = props[index2];
415
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
536
+ var newValue = void 0;
416
537
  if (newValue === void 0) {
417
538
  newValue = source[key];
418
539
  }
@@ -472,7 +593,6 @@ var isArguments = baseIsArguments(/* @__PURE__ */ function() {
472
593
  }()) ? baseIsArguments : function(value) {
473
594
  return isObjectLike(value) && hasOwnProperty$a.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
474
595
  };
475
- const isArguments$1 = isArguments;
476
596
  function stubFalse() {
477
597
  return false;
478
598
  }
@@ -482,7 +602,6 @@ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
482
602
  var Buffer$1 = moduleExports$2 ? root.Buffer : void 0;
483
603
  var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
484
604
  var isBuffer = nativeIsBuffer || stubFalse;
485
- const isBuffer$1 = isBuffer;
486
605
  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
606
  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
607
  var typedArrayTags = {};
@@ -512,11 +631,10 @@ var nodeUtil = function() {
512
631
  }();
513
632
  var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
514
633
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
515
- const isTypedArray$1 = isTypedArray;
516
634
  var objectProto$a = Object.prototype;
517
635
  var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
518
636
  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;
637
+ 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
638
  for (var key in value) {
521
639
  if ((inherited || hasOwnProperty$9.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
522
640
  (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
@@ -820,7 +938,7 @@ function arrayPush(array, values) {
820
938
  }
821
939
  var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
822
940
  function isFlattenable(value) {
823
- return isArray(value) || isArguments$1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
941
+ return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
824
942
  }
825
943
  function baseFlatten(array, depth, predicate, isStrict, result) {
826
944
  var index2 = -1, length = array.length;
@@ -828,13 +946,11 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
828
946
  result || (result = []);
829
947
  while (++index2 < length) {
830
948
  var value = array[index2];
831
- if (depth > 0 && predicate(value)) {
832
- if (depth > 1) {
833
- baseFlatten(value, depth - 1, predicate, isStrict, result);
834
- } else {
949
+ if (predicate(value)) {
950
+ {
835
951
  arrayPush(result, value);
836
952
  }
837
- } else if (!isStrict) {
953
+ } else {
838
954
  result[result.length] = value;
839
955
  }
840
956
  }
@@ -842,7 +958,7 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
842
958
  }
843
959
  function flatten(array) {
844
960
  var length = array == null ? 0 : array.length;
845
- return length ? baseFlatten(array, 1) : [];
961
+ return length ? baseFlatten(array) : [];
846
962
  }
847
963
  function flatRest(func) {
848
964
  return setToString(overRest(func, void 0, flatten), func + "");
@@ -992,9 +1108,8 @@ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
992
1108
  }
993
1109
  return result;
994
1110
  };
995
- const getSymbolsIn$1 = getSymbolsIn;
996
1111
  function copySymbolsIn(source, object) {
997
- return copyObject(source, getSymbolsIn$1(source), object);
1112
+ return copyObject(source, getSymbolsIn(source), object);
998
1113
  }
999
1114
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1000
1115
  var result = keysFunc(object);
@@ -1004,7 +1119,7 @@ function getAllKeys(object) {
1004
1119
  return baseGetAllKeys(object, keys, getSymbols);
1005
1120
  }
1006
1121
  function getAllKeysIn(object) {
1007
- return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
1122
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
1008
1123
  }
1009
1124
  var DataView = getNative(root, "DataView");
1010
1125
  var Promise$1 = getNative(root, "Promise");
@@ -1033,7 +1148,6 @@ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map
1033
1148
  return result;
1034
1149
  };
1035
1150
  }
1036
- const getTag$1 = getTag;
1037
1151
  var objectProto$3 = Object.prototype;
1038
1152
  var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
1039
1153
  function initCloneArray(array) {
@@ -1045,10 +1159,9 @@ function initCloneArray(array) {
1045
1159
  return result;
1046
1160
  }
1047
1161
  var Uint8Array2 = root.Uint8Array;
1048
- const Uint8Array$1 = Uint8Array2;
1049
1162
  function cloneArrayBuffer(arrayBuffer) {
1050
1163
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1051
- new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
1164
+ new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
1052
1165
  return result;
1053
1166
  }
1054
1167
  function cloneDataView(dataView, isDeep) {
@@ -1109,13 +1222,13 @@ function initCloneObject(object) {
1109
1222
  }
1110
1223
  var mapTag$4 = "[object Map]";
1111
1224
  function baseIsMap(value) {
1112
- return isObjectLike(value) && getTag$1(value) == mapTag$4;
1225
+ return isObjectLike(value) && getTag(value) == mapTag$4;
1113
1226
  }
1114
1227
  var nodeIsMap = nodeUtil && nodeUtil.isMap;
1115
1228
  var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
1116
1229
  var setTag$4 = "[object Set]";
1117
1230
  function baseIsSet(value) {
1118
- return isObjectLike(value) && getTag$1(value) == setTag$4;
1231
+ return isObjectLike(value) && getTag(value) == setTag$4;
1119
1232
  }
1120
1233
  var nodeIsSet = nodeUtil && nodeUtil.isSet;
1121
1234
  var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
@@ -1143,8 +1256,8 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
1143
1256
  return copyArray(value, result);
1144
1257
  }
1145
1258
  } else {
1146
- var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
1147
- if (isBuffer$1(value)) {
1259
+ var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
1260
+ if (isBuffer(value)) {
1148
1261
  return cloneBuffer(value, isDeep);
1149
1262
  }
1150
1263
  if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
@@ -1289,7 +1402,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1289
1402
  object = object.buffer;
1290
1403
  other = other.buffer;
1291
1404
  case arrayBufferTag:
1292
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
1405
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
1293
1406
  return false;
1294
1407
  }
1295
1408
  return true;
@@ -1377,12 +1490,12 @@ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[o
1377
1490
  var objectProto$1 = Object.prototype;
1378
1491
  var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1379
1492
  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);
1493
+ var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
1381
1494
  objTag = objTag == argsTag ? objectTag : objTag;
1382
1495
  othTag = othTag == argsTag ? objectTag : othTag;
1383
1496
  var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
1384
- if (isSameTag && isBuffer$1(object)) {
1385
- if (!isBuffer$1(other)) {
1497
+ if (isSameTag && isBuffer(object)) {
1498
+ if (!isBuffer(other)) {
1386
1499
  return false;
1387
1500
  }
1388
1501
  objIsArr = true;
@@ -1390,7 +1503,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1390
1503
  }
1391
1504
  if (isSameTag && !objIsObj) {
1392
1505
  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);
1506
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1394
1507
  }
1395
1508
  if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
1396
1509
  var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
@@ -1417,29 +1530,27 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
1417
1530
  }
1418
1531
  var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
1419
1532
  function baseIsMatch(object, source, matchData, customizer) {
1420
- var index2 = matchData.length, length = index2, noCustomizer = !customizer;
1533
+ var index2 = matchData.length, length = index2;
1421
1534
  if (object == null) {
1422
1535
  return !length;
1423
1536
  }
1424
1537
  object = Object(object);
1425
1538
  while (index2--) {
1426
1539
  var data = matchData[index2];
1427
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1540
+ if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1428
1541
  return false;
1429
1542
  }
1430
1543
  }
1431
1544
  while (++index2 < length) {
1432
1545
  data = matchData[index2];
1433
1546
  var key = data[0], objValue = object[key], srcValue = data[1];
1434
- if (noCustomizer && data[2]) {
1547
+ if (data[2]) {
1435
1548
  if (objValue === void 0 && !(key in object)) {
1436
1549
  return false;
1437
1550
  }
1438
1551
  } else {
1439
1552
  var stack = new Stack();
1440
- if (customizer) {
1441
- var result = customizer(objValue, srcValue, key, object, source, stack);
1442
- }
1553
+ var result;
1443
1554
  if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
1444
1555
  return false;
1445
1556
  }
@@ -1492,7 +1603,7 @@ function hasPath(object, path, hasFunc) {
1492
1603
  return result;
1493
1604
  }
1494
1605
  length = object == null ? 0 : object.length;
1495
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments$1(object));
1606
+ return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
1496
1607
  }
1497
1608
  function hasIn(object, path) {
1498
1609
  return object != null && hasPath(object, path, baseHasIn);
@@ -1536,7 +1647,7 @@ function createBaseFor(fromRight) {
1536
1647
  return function(object, iteratee, keysFunc) {
1537
1648
  var index2 = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1538
1649
  while (length--) {
1539
- var key = props[fromRight ? length : ++index2];
1650
+ var key = props[++index2];
1540
1651
  if (iteratee(iterable[key], key, iterable) === false) {
1541
1652
  break;
1542
1653
  }
@@ -1545,9 +1656,8 @@ function createBaseFor(fromRight) {
1545
1656
  };
1546
1657
  }
1547
1658
  var baseFor = createBaseFor();
1548
- const baseFor$1 = baseFor;
1549
1659
  function baseForOwn(object, iteratee) {
1550
- return object && baseFor$1(object, iteratee, keys);
1660
+ return object && baseFor(object, iteratee, keys);
1551
1661
  }
1552
1662
  function createBaseEach(eachFunc, fromRight) {
1553
1663
  return function(collection, iteratee) {
@@ -1557,8 +1667,8 @@ function createBaseEach(eachFunc, fromRight) {
1557
1667
  if (!isArrayLike(collection)) {
1558
1668
  return eachFunc(collection, iteratee);
1559
1669
  }
1560
- var length = collection.length, index2 = fromRight ? length : -1, iterable = Object(collection);
1561
- while (fromRight ? index2-- : ++index2 < length) {
1670
+ var length = collection.length, index2 = -1, iterable = Object(collection);
1671
+ while (++index2 < length) {
1562
1672
  if (iteratee(iterable[index2], index2, iterable) === false) {
1563
1673
  break;
1564
1674
  }
@@ -1567,7 +1677,6 @@ function createBaseEach(eachFunc, fromRight) {
1567
1677
  };
1568
1678
  }
1569
1679
  var baseEach = createBaseEach(baseForOwn);
1570
- const baseEach$1 = baseEach;
1571
1680
  var now = function() {
1572
1681
  return root.Date.now();
1573
1682
  };
@@ -1660,7 +1769,7 @@ function last(array) {
1660
1769
  }
1661
1770
  function baseFilter(collection, predicate) {
1662
1771
  var result = [];
1663
- baseEach$1(collection, function(value, index2, collection2) {
1772
+ baseEach(collection, function(value, index2, collection2) {
1664
1773
  if (predicate(value, index2, collection2)) {
1665
1774
  result.push(value);
1666
1775
  }
@@ -1689,10 +1798,10 @@ function isEmpty(value) {
1689
1798
  if (value == null) {
1690
1799
  return true;
1691
1800
  }
1692
- if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
1801
+ if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
1693
1802
  return !value.length;
1694
1803
  }
1695
- var tag = getTag$1(value);
1804
+ var tag = getTag(value);
1696
1805
  if (tag == mapTag$1 || tag == setTag$1) {
1697
1806
  return !value.size;
1698
1807
  }
@@ -1759,7 +1868,7 @@ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
1759
1868
  }
1760
1869
  function reduce(collection, iteratee, accumulator) {
1761
1870
  var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
1762
- return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach$1);
1871
+ return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach);
1763
1872
  }
1764
1873
  var mapTag = "[object Map]", setTag = "[object Set]";
1765
1874
  function size(collection) {
@@ -1769,71 +1878,12 @@ function size(collection) {
1769
1878
  if (isArrayLike(collection)) {
1770
1879
  return isString(collection) ? stringSize(collection) : collection.length;
1771
1880
  }
1772
- var tag = getTag$1(collection);
1881
+ var tag = getTag(collection);
1773
1882
  if (tag == mapTag || tag == setTag) {
1774
1883
  return collection.size;
1775
1884
  }
1776
1885
  return baseKeys(collection).length;
1777
1886
  }
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
1887
  const getDrillDownCache = (spreadsheet, meta) => {
1838
1888
  const drillDownDataCache = spreadsheet.store.get(
1839
1889
  "drillDownDataCache",
@@ -1897,7 +1947,7 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
1897
1947
  }
1898
1948
  ],
1899
1949
  belongsCell: "rowCell",
1900
- defaultHide: false,
1950
+ defaultHide: true,
1901
1951
  displayCondition: (partDrillDown == null ? void 0 : partDrillDown.displayCondition) || defaultPartDrillDownDisplayCondition
1902
1952
  };
1903
1953
  nextHeaderIcons.push(drillDownActionIcon);
@@ -1924,7 +1974,7 @@ const handleDrillDown = (params) => {
1924
1974
  if (!fetchData) {
1925
1975
  return;
1926
1976
  }
1927
- fetchData(meta, drillFields).then((info) => {
1977
+ fetchData(meta, drillFields).then((info) => __async(void 0, null, function* () {
1928
1978
  const { drillData, drillField } = info;
1929
1979
  spreadsheet.dataSet.transformDrillDownData(
1930
1980
  drillField,
@@ -1943,20 +1993,74 @@ const handleDrillDown = (params) => {
1943
1993
  spreadsheet.store.set("drillDownDataCache", newDrillDownDataCache);
1944
1994
  }
1945
1995
  spreadsheet.interaction.reset();
1946
- spreadsheet.render(false);
1947
- });
1996
+ yield spreadsheet.render(false);
1997
+ }));
1948
1998
  };
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;
1999
+ const getBaseSheetComponentOptions = (...options) => customMerge(
2000
+ DEFAULT_OPTIONS,
2001
+ SHEET_COMPONENT_DEFAULT_OPTIONS,
2002
+ ...options
2003
+ );
2004
+ const analyzeAdaptive = (defaultContainer, adaptive) => {
2005
+ var _a, _b, _c;
2006
+ if (isBoolean(adaptive)) {
2007
+ return {
2008
+ container: defaultContainer,
2009
+ adaptiveWidth: true,
2010
+ adaptiveHeight: false
2011
+ };
2012
+ }
2013
+ return {
2014
+ container: ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || defaultContainer,
2015
+ adaptiveWidth: (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true,
2016
+ adaptiveHeight: (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true
2017
+ };
2018
+ };
2019
+ const createResizeObserver = (params) => {
2020
+ let isFirstRender = true;
2021
+ const { s2, adaptive, container, wrapper } = params;
2022
+ const {
2023
+ container: actualWrapper,
2024
+ adaptiveWidth,
2025
+ adaptiveHeight
2026
+ } = analyzeAdaptive(wrapper, adaptive);
2027
+ if (!actualWrapper || !container || !adaptive || !s2) {
2028
+ return;
2029
+ }
2030
+ const render2 = (width, height) => __async(void 0, null, function* () {
2031
+ s2 == null ? void 0 : s2.changeSheetSize(width, height);
2032
+ yield s2 == null ? void 0 : s2.render(false);
2033
+ });
2034
+ const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
2035
+ const onResize = () => __async(void 0, null, function* () {
2036
+ const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
2037
+ const width = adaptiveWidth ? floor(containerWidth != null ? containerWidth : s2.options.width) : s2.options.width;
2038
+ const height = adaptiveHeight ? floor(containerHeight != null ? containerHeight : s2.options.height) : s2.options.height;
2039
+ if (!adaptiveWidth && !adaptiveHeight) {
2040
+ return;
2041
+ }
2042
+ if (isFirstRender) {
2043
+ yield render2(width, height);
2044
+ isFirstRender = false;
2045
+ return;
1956
2046
  }
2047
+ debounceRender(width, height);
1957
2048
  });
1958
- return s2Ref;
2049
+ const resizeObserver = new ResizeObserver(
2050
+ ([entry] = []) => {
2051
+ if (entry) {
2052
+ onResize();
2053
+ }
2054
+ }
2055
+ );
2056
+ resizeObserver.observe(actualWrapper, {
2057
+ box: "border-box"
2058
+ });
2059
+ return () => {
2060
+ resizeObserver.unobserve(actualWrapper);
2061
+ };
1959
2062
  };
2063
+ extendLocale(Locale);
1960
2064
  const _sfc_main$e = defineComponent({
1961
2065
  name: "TooltipDetail",
1962
2066
  props: ["list"],
@@ -2436,7 +2540,7 @@ const usePagination = (s2Ref, props) => {
2436
2540
  const visible = computed(() => {
2437
2541
  return showPagination && !isEmpty(paginationCfg);
2438
2542
  });
2439
- watch([current, pageSize], () => {
2543
+ watch([current, pageSize], () => __async(void 0, null, function* () {
2440
2544
  if (!s2Ref.value) {
2441
2545
  return;
2442
2546
  }
@@ -2445,8 +2549,8 @@ const usePagination = (s2Ref, props) => {
2445
2549
  pageSize: pageSize.value
2446
2550
  };
2447
2551
  s2Ref.value.updatePagination(nextPagination);
2448
- s2Ref.value.render(false);
2449
- });
2552
+ yield s2Ref.value.render(false);
2553
+ }));
2450
2554
  watch(
2451
2555
  [() => paginationCfg, s2Ref],
2452
2556
  () => {
@@ -2555,8 +2659,8 @@ const useCellEvent = (s2Ref, emit, eventName, emitName) => {
2555
2659
  };
2556
2660
  const useS2Event = (s2Ref, emit, eventName, emitName) => {
2557
2661
  var _a;
2558
- const handler = (params) => {
2559
- emit(emitName, params);
2662
+ const handler = (...params) => {
2663
+ emit(emitName, ...params);
2560
2664
  };
2561
2665
  (_a = s2Ref.value) == null ? void 0 : _a.on(eventName, handler);
2562
2666
  };
@@ -2590,6 +2694,8 @@ const useEvents = (s2Ref, emit) => {
2590
2694
  "rowCellAllCollapsed"
2591
2695
  );
2592
2696
  useS2Event(s2Ref, emit, S2Event.ROW_CELL_SCROLL, "rowCellScroll");
2697
+ useS2Event(s2Ref, emit, S2Event.ROW_CELL_RENDER, "rowCellRender");
2698
+ useS2Event(s2Ref, emit, S2Event.ROW_CELL_SELECTED, "rowCellSelected");
2593
2699
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_HOVER, "colCellHover");
2594
2700
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_CLICK, "colCellClick");
2595
2701
  useCellEvent(
@@ -2609,6 +2715,8 @@ const useEvents = (s2Ref, emit) => {
2609
2715
  useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_MOVE, "colCellMouseMove");
2610
2716
  useS2Event(s2Ref, emit, S2Event.COL_CELL_EXPANDED, "colCellExpanded");
2611
2717
  useS2Event(s2Ref, emit, S2Event.COL_CELL_HIDDEN, "colCellHidden");
2718
+ useS2Event(s2Ref, emit, S2Event.COL_CELL_RENDER, "colCellRender");
2719
+ useS2Event(s2Ref, emit, S2Event.COL_CELL_SELECTED, "colCellSelected");
2612
2720
  useCellEvent(s2Ref, emit, S2Event.DATA_CELL_HOVER, "dataCellHover");
2613
2721
  useCellEvent(s2Ref, emit, S2Event.DATA_CELL_CLICK, "dataCellClick");
2614
2722
  useCellEvent(
@@ -2648,6 +2756,8 @@ const useEvents = (s2Ref, emit) => {
2648
2756
  S2Event.DATA_CELL_SELECT_MOVE,
2649
2757
  "dataCellSelectMove"
2650
2758
  );
2759
+ useS2Event(s2Ref, emit, S2Event.DATA_CELL_RENDER, "dataCellRender");
2760
+ useS2Event(s2Ref, emit, S2Event.DATA_CELL_SELECTED, "dataCellSelected");
2651
2761
  useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_HOVER, "cornerCellHover");
2652
2762
  useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_CLICK, "cornerCellClick");
2653
2763
  useCellEvent(
@@ -2680,6 +2790,8 @@ const useEvents = (s2Ref, emit) => {
2680
2790
  S2Event.CORNER_CELL_MOUSE_MOVE,
2681
2791
  "cornerCellMouseMove"
2682
2792
  );
2793
+ useS2Event(s2Ref, emit, S2Event.CORNER_CELL_RENDER, "cornerCellRender");
2794
+ useS2Event(s2Ref, emit, S2Event.CORNER_CELL_SELECTED, "cornerCellSelected");
2683
2795
  useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_HOVER, "mergedCellsHover");
2684
2796
  useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_CLICK, "mergedCellsClick");
2685
2797
  useCellEvent(
@@ -2712,6 +2824,13 @@ const useEvents = (s2Ref, emit) => {
2712
2824
  S2Event.MERGED_CELLS_MOUSE_MOVE,
2713
2825
  "mergedCellsMouseMove"
2714
2826
  );
2827
+ useS2Event(s2Ref, emit, S2Event.MERGED_CELLS_RENDER, "mergedCellsRender");
2828
+ useS2Event(
2829
+ s2Ref,
2830
+ emit,
2831
+ S2Event.SERIES_NUMBER_CELL_RENDER,
2832
+ "seriesNumberCellRender"
2833
+ );
2715
2834
  useS2Event(s2Ref, emit, S2Event.RANGE_SORT, "rangeSort");
2716
2835
  useS2Event(s2Ref, emit, S2Event.RANGE_SORTED, "rangeSorted");
2717
2836
  useS2Event(s2Ref, emit, S2Event.RANGE_FILTER, "rangeFilter");
@@ -2840,7 +2959,25 @@ const useLoading = (s2Ref, loadingProp = false) => {
2840
2959
  });
2841
2960
  return { loading, setLoading };
2842
2961
  };
2843
- const useSheetUpdate = (s2Ref, props) => {
2962
+ const useResize = (s2Ref, props, dom) => {
2963
+ const unobserve = ref();
2964
+ watch([s2Ref, () => props.adaptive], ([s2, adaptive], _, onCleanup) => {
2965
+ if (!s2) {
2966
+ return;
2967
+ }
2968
+ unobserve.value = createResizeObserver({
2969
+ s2,
2970
+ adaptive,
2971
+ wrapper: dom.wrapperRef.value,
2972
+ container: dom.containerRef.value
2973
+ });
2974
+ onCleanup(() => {
2975
+ var _a;
2976
+ (_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
2977
+ });
2978
+ });
2979
+ };
2980
+ const useSheetUpdate = (s2Ref, props, hooks) => {
2844
2981
  const updateFlag = reactive({
2845
2982
  rerender: false,
2846
2983
  reloadData: false,
@@ -2884,37 +3021,23 @@ const useSheetUpdate = (s2Ref, props) => {
2884
3021
  deep: isProxy(props.themeCfg)
2885
3022
  }
2886
3023
  );
2887
- watch(updateFlag, (flag) => {
2888
- var _a;
3024
+ watch(updateFlag, (flag) => __async(void 0, null, function* () {
3025
+ var _a, _b, _c, _d, _e;
2889
3026
  if (!flag.rerender) {
2890
3027
  return;
2891
3028
  }
2892
- (_a = s2Ref.value) == null ? void 0 : _a.render({
3029
+ (_a = hooks == null ? void 0 : hooks.before) == null ? void 0 : _a.call(hooks);
3030
+ const renderOptions = (_b = props == null ? void 0 : props.onUpdate) == null ? void 0 : _b.call(props, {
2893
3031
  reloadData: flag.reloadData,
2894
- reBuildDataSet: flag.rebuildDataset
3032
+ rebuildDataSet: flag.rebuildDataset
2895
3033
  });
3034
+ yield (_c = s2Ref.value) == null ? void 0 : _c.render(renderOptions);
3035
+ (_d = props == null ? void 0 : props.onUpdateAfterRender) == null ? void 0 : _d.call(props, renderOptions);
3036
+ (_e = hooks == null ? void 0 : hooks.after) == null ? void 0 : _e.call(hooks);
2896
3037
  flag.rerender = false;
2897
3038
  flag.reloadData = false;
2898
3039
  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
- });
3040
+ }));
2918
3041
  };
2919
3042
  function useSpreadSheet(props, emit) {
2920
3043
  const {
@@ -2943,20 +3066,28 @@ function useSpreadSheet(props, emit) {
2943
3066
  }
2944
3067
  return new PivotSheet$1(container, rawDataCfg, s2Options);
2945
3068
  };
2946
- const buildSpreadSheet = () => {
3069
+ const buildSpreadSheet = () => __async(this, null, function* () {
2947
3070
  setLoading(true);
2948
3071
  s2Ref.value = renderSpreadSheet(containerRef.value);
2949
3072
  s2Ref.value.setThemeCfg(toRaw(themeCfg));
2950
- s2Ref.value.render();
3073
+ yield s2Ref.value.render();
2951
3074
  setLoading(false);
2952
3075
  onS2Mounted == null ? void 0 : onS2Mounted(s2Ref.value);
2953
- };
3076
+ });
2954
3077
  onMounted(buildSpreadSheet);
2955
3078
  useEvents(s2Ref, emit);
2956
- useSheetUpdate(s2Ref, props);
3079
+ useSheetUpdate(s2Ref, props, {
3080
+ before() {
3081
+ setLoading(true);
3082
+ },
3083
+ after() {
3084
+ setLoading(false);
3085
+ }
3086
+ });
2957
3087
  useResize(s2Ref, props, { wrapperRef, containerRef });
2958
3088
  onBeforeUnmount(() => {
2959
3089
  var _a;
3090
+ setLoading(false);
2960
3091
  (_a = s2Ref.value) == null ? void 0 : _a.destroy();
2961
3092
  });
2962
3093
  return {
@@ -2989,7 +3120,9 @@ const initBaseSheetProps = () => {
2989
3120
  default: false
2990
3121
  },
2991
3122
  spreadsheet: Function,
2992
- onMounted: Function
3123
+ onMounted: Function,
3124
+ onUpdate: Function,
3125
+ onUpdateAfterRender: Function
2993
3126
  };
2994
3127
  };
2995
3128
  const initDrillDownProps = () => {
@@ -3193,6 +3326,16 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3193
3326
  }, 8, ["wrapperClassName", "spinning"]);
3194
3327
  }
3195
3328
  const BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
3329
+ const useExpose = (expose) => {
3330
+ const s2Ref = shallowRef();
3331
+ expose({
3332
+ get instance() {
3333
+ var _a;
3334
+ return (_a = s2Ref.value) == null ? void 0 : _a.instance;
3335
+ }
3336
+ });
3337
+ return s2Ref;
3338
+ };
3196
3339
  const _hoisted_1$2 = {
3197
3340
  class: "antv-s2-icon",
3198
3341
  viewBox: "0 0 1024 1024",
@@ -3499,7 +3642,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3499
3642
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.sheetType), { ref: "s2Ref" }, null, 512);
3500
3643
  }
3501
3644
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
3502
- const version = "@antv/s2-vue-v2.0.0-next.14";
3645
+ const version = "@antv/s2-vue-v2.0.0-next.16";
3503
3646
  export {
3504
3647
  BaseSheet,
3505
3648
  CustomTooltip,