@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/lib/index.js CHANGED
@@ -18,10 +18,31 @@ var __spreadValues = (a, b) => {
18
18
  return a;
19
19
  };
20
20
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
+ var __async = (__this, __arguments, generator) => {
22
+ return new Promise((resolve, reject) => {
23
+ var fulfilled = (value) => {
24
+ try {
25
+ step(generator.next(value));
26
+ } catch (e) {
27
+ reject(e);
28
+ }
29
+ };
30
+ var rejected = (value) => {
31
+ try {
32
+ step(generator.throw(value));
33
+ } catch (e) {
34
+ reject(e);
35
+ }
36
+ };
37
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
38
+ step((generator = generator.apply(__this, __arguments)).next());
39
+ });
40
+ };
21
41
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
22
42
  const s2 = require("@antv/s2");
23
43
  const vue = require("vue");
24
44
  const antDesignVue = require("ant-design-vue");
45
+ const DRILL_DOWN_PRE_CLASS = `${s2.S2_PREFIX_CLS}-drill-down`;
25
46
  const EN_US = {
26
47
  选择分析信息: "Select Analysis Information",
27
48
  切换指标: "Switch indicator",
@@ -62,7 +83,81 @@ const EN_US = {
62
83
  // strategy
63
84
  时间: "Date",
64
85
  指标: "Measure",
65
- 目标值: "Target Value"
86
+ 目标值: "Target Value",
87
+ // components
88
+ 自定义颜色: "Custom color",
89
+ 平铺: "Grid",
90
+ 树状: "Tree",
91
+ 默认: "Default",
92
+ 多彩风: "Colorful",
93
+ 简约风: "Normal",
94
+ 极简风: "Basic",
95
+ 斑马纹风: "Zebra",
96
+ 主题风格: "Thematic style",
97
+ 类型: "Theme type",
98
+ 主题: "Theme color",
99
+ 主色系: "Primary color",
100
+ 深色主题: "Dark theme",
101
+ 浅色主题: "Light theme",
102
+ 灰色: "Gray",
103
+ 自定义: "Custom",
104
+ 文字对齐: "Text align",
105
+ 左对齐: "Align left",
106
+ 居中: "Align center",
107
+ 右对齐: "Align right",
108
+ 表头: "Header",
109
+ "表身 (维度)": "Body(dimension)",
110
+ "表身 (指标)": "Body(measure)",
111
+ 冻结行列头: "Frozen header",
112
+ 行: "Row",
113
+ 列: "Column",
114
+ 冻结行: "Frozen row",
115
+ 冻结列: "Frozen column",
116
+ 冻结: "Frozen",
117
+ 冻结前: "Freeze the first",
118
+ 冻结后: "Freeze the last"
119
+ };
120
+ const RU = {
121
+ 选择分析信息: "Выберите информацию для анализа",
122
+ 切换指标: "Индикатор переключения",
123
+ 确定: "Подтвердить",
124
+ 取消: "Отмена",
125
+ 重置: "Сбросить",
126
+ 请输入关键字搜索: "Пожалуйста, введите поиск по ключевым словам",
127
+ 搜索: "Поиск",
128
+ 恢复: "Восстановить",
129
+ "已选 {} 项": "Выбран(-но) {} элемент(-а/-ов)",
130
+ 所选项: "выбранные элементы",
131
+ 选择下钻维度: "Выберите параметры детализации",
132
+ 恢复默认: "Сбросить до первоначального состояния",
133
+ 搜索字段: "Поисковое поле",
134
+ // switcher
135
+ 行列切换: "Конфигурация отображения строк, столбцов и значений",
136
+ 行头: "Строки",
137
+ 列头: "Колонки",
138
+ 值: "Значения",
139
+ 展开子项: "Отобразить дочерние элементы",
140
+ // sort
141
+ 首字母: "Алфавитная сортировка",
142
+ 手动排序: "Ручная сортировка",
143
+ 其他字段: "Другое поле",
144
+ 高级排序: "Расширенная сортировка",
145
+ 设置顺序: "Установить сортировку",
146
+ 可选字段: "Необязательные поля",
147
+ "按以下规则进行排序(优先级由低到高)": "Порядок, определеяемый следующими правилами (от низкого приоритета к высокому)",
148
+ 按: "По",
149
+ 说明: "Описание: ",
150
+ // export
151
+ 复制原始数据: "Копировать строковые данные",
152
+ 复制格式化数据: "Копировать отформатированные данные",
153
+ 下载原始数据: "Скачать строковые данные",
154
+ 下载格式化数据: "Скачать отформатированные данные",
155
+ 操作成功: "Операция успешно выполнена",
156
+ 操作失败: "Операция завершилась неудачно",
157
+ // strategy
158
+ 时间: "Дата",
159
+ 指标: "Мера",
160
+ 目标值: "Целевое Значение"
66
161
  };
67
162
  const ZH_CN = {
68
163
  选择分析信息: "选择分析信息",
@@ -104,11 +199,44 @@ const ZH_CN = {
104
199
  // strategy
105
200
  时间: "时间",
106
201
  指标: "指标",
107
- 目标值: "目标值"
202
+ 目标值: "目标值",
203
+ // components
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
+ 冻结: "冻结",
233
+ 冻结前: "冻结前",
234
+ 冻结后: "冻结后"
108
235
  };
109
236
  const Locale = {
110
237
  zh_CN: ZH_CN,
111
- en_US: EN_US
238
+ en_US: EN_US,
239
+ ru_RU: RU
112
240
  };
113
241
  const SHEET_COMPONENT_DEFAULT_OPTIONS = {
114
242
  tooltip: {
@@ -122,12 +250,6 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
122
250
  showDefaultHeaderActionIcon: true
123
251
  };
124
252
  const RESIZE_RENDER_DELAY = 200;
125
- const DRILL_DOWN_PRE_CLASS = `${s2.S2_PREFIX_CLS}-drill-down`;
126
- const getBaseSheetComponentOptions = (...options) => s2.customMerge(
127
- s2.DEFAULT_OPTIONS,
128
- SHEET_COMPONENT_DEFAULT_OPTIONS,
129
- ...options
130
- );
131
253
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
132
254
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
133
255
  var root = freeGlobal || freeSelf || Function("return this")();
@@ -367,8 +489,7 @@ var baseSetToString = !defineProperty ? identity : function(func, string) {
367
489
  "writable": true
368
490
  });
369
491
  };
370
- const baseSetToString$1 = baseSetToString;
371
- var setToString = shortOut(baseSetToString$1);
492
+ var setToString = shortOut(baseSetToString);
372
493
  function arrayEach(array, iteratee) {
373
494
  var index2 = -1, length = array == null ? 0 : array.length;
374
495
  while (++index2 < length) {
@@ -414,7 +535,7 @@ function copyObject(source, props, object, customizer) {
414
535
  var index2 = -1, length = props.length;
415
536
  while (++index2 < length) {
416
537
  var key = props[index2];
417
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
538
+ var newValue = void 0;
418
539
  if (newValue === void 0) {
419
540
  newValue = source[key];
420
541
  }
@@ -474,7 +595,6 @@ var isArguments = baseIsArguments(/* @__PURE__ */ function() {
474
595
  }()) ? baseIsArguments : function(value) {
475
596
  return isObjectLike(value) && hasOwnProperty$a.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
476
597
  };
477
- const isArguments$1 = isArguments;
478
598
  function stubFalse() {
479
599
  return false;
480
600
  }
@@ -484,7 +604,6 @@ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
484
604
  var Buffer$1 = moduleExports$2 ? root.Buffer : void 0;
485
605
  var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
486
606
  var isBuffer = nativeIsBuffer || stubFalse;
487
- const isBuffer$1 = isBuffer;
488
607
  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]";
489
608
  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]";
490
609
  var typedArrayTags = {};
@@ -514,11 +633,10 @@ var nodeUtil = function() {
514
633
  }();
515
634
  var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
516
635
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
517
- const isTypedArray$1 = isTypedArray;
518
636
  var objectProto$a = Object.prototype;
519
637
  var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
520
638
  function arrayLikeKeys(value, inherited) {
521
- 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;
639
+ 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;
522
640
  for (var key in value) {
523
641
  if ((inherited || hasOwnProperty$9.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
524
642
  (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
@@ -822,7 +940,7 @@ function arrayPush(array, values) {
822
940
  }
823
941
  var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
824
942
  function isFlattenable(value) {
825
- return isArray(value) || isArguments$1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
943
+ return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
826
944
  }
827
945
  function baseFlatten(array, depth, predicate, isStrict, result) {
828
946
  var index2 = -1, length = array.length;
@@ -830,13 +948,11 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
830
948
  result || (result = []);
831
949
  while (++index2 < length) {
832
950
  var value = array[index2];
833
- if (depth > 0 && predicate(value)) {
834
- if (depth > 1) {
835
- baseFlatten(value, depth - 1, predicate, isStrict, result);
836
- } else {
951
+ if (predicate(value)) {
952
+ {
837
953
  arrayPush(result, value);
838
954
  }
839
- } else if (!isStrict) {
955
+ } else {
840
956
  result[result.length] = value;
841
957
  }
842
958
  }
@@ -844,7 +960,7 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
844
960
  }
845
961
  function flatten(array) {
846
962
  var length = array == null ? 0 : array.length;
847
- return length ? baseFlatten(array, 1) : [];
963
+ return length ? baseFlatten(array) : [];
848
964
  }
849
965
  function flatRest(func) {
850
966
  return setToString(overRest(func, void 0, flatten), func + "");
@@ -994,9 +1110,8 @@ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
994
1110
  }
995
1111
  return result;
996
1112
  };
997
- const getSymbolsIn$1 = getSymbolsIn;
998
1113
  function copySymbolsIn(source, object) {
999
- return copyObject(source, getSymbolsIn$1(source), object);
1114
+ return copyObject(source, getSymbolsIn(source), object);
1000
1115
  }
1001
1116
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1002
1117
  var result = keysFunc(object);
@@ -1006,7 +1121,7 @@ function getAllKeys(object) {
1006
1121
  return baseGetAllKeys(object, keys, getSymbols);
1007
1122
  }
1008
1123
  function getAllKeysIn(object) {
1009
- return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
1124
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
1010
1125
  }
1011
1126
  var DataView = getNative(root, "DataView");
1012
1127
  var Promise$1 = getNative(root, "Promise");
@@ -1035,7 +1150,6 @@ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map
1035
1150
  return result;
1036
1151
  };
1037
1152
  }
1038
- const getTag$1 = getTag;
1039
1153
  var objectProto$3 = Object.prototype;
1040
1154
  var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
1041
1155
  function initCloneArray(array) {
@@ -1047,10 +1161,9 @@ function initCloneArray(array) {
1047
1161
  return result;
1048
1162
  }
1049
1163
  var Uint8Array2 = root.Uint8Array;
1050
- const Uint8Array$1 = Uint8Array2;
1051
1164
  function cloneArrayBuffer(arrayBuffer) {
1052
1165
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1053
- new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
1166
+ new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
1054
1167
  return result;
1055
1168
  }
1056
1169
  function cloneDataView(dataView, isDeep) {
@@ -1111,13 +1224,13 @@ function initCloneObject(object) {
1111
1224
  }
1112
1225
  var mapTag$4 = "[object Map]";
1113
1226
  function baseIsMap(value) {
1114
- return isObjectLike(value) && getTag$1(value) == mapTag$4;
1227
+ return isObjectLike(value) && getTag(value) == mapTag$4;
1115
1228
  }
1116
1229
  var nodeIsMap = nodeUtil && nodeUtil.isMap;
1117
1230
  var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
1118
1231
  var setTag$4 = "[object Set]";
1119
1232
  function baseIsSet(value) {
1120
- return isObjectLike(value) && getTag$1(value) == setTag$4;
1233
+ return isObjectLike(value) && getTag(value) == setTag$4;
1121
1234
  }
1122
1235
  var nodeIsSet = nodeUtil && nodeUtil.isSet;
1123
1236
  var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
@@ -1145,8 +1258,8 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
1145
1258
  return copyArray(value, result);
1146
1259
  }
1147
1260
  } else {
1148
- var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
1149
- if (isBuffer$1(value)) {
1261
+ var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
1262
+ if (isBuffer(value)) {
1150
1263
  return cloneBuffer(value, isDeep);
1151
1264
  }
1152
1265
  if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
@@ -1291,7 +1404,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1291
1404
  object = object.buffer;
1292
1405
  other = other.buffer;
1293
1406
  case arrayBufferTag:
1294
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
1407
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
1295
1408
  return false;
1296
1409
  }
1297
1410
  return true;
@@ -1379,12 +1492,12 @@ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[o
1379
1492
  var objectProto$1 = Object.prototype;
1380
1493
  var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1381
1494
  function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1382
- var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag$1(object), othTag = othIsArr ? arrayTag : getTag$1(other);
1495
+ var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
1383
1496
  objTag = objTag == argsTag ? objectTag : objTag;
1384
1497
  othTag = othTag == argsTag ? objectTag : othTag;
1385
1498
  var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
1386
- if (isSameTag && isBuffer$1(object)) {
1387
- if (!isBuffer$1(other)) {
1499
+ if (isSameTag && isBuffer(object)) {
1500
+ if (!isBuffer(other)) {
1388
1501
  return false;
1389
1502
  }
1390
1503
  objIsArr = true;
@@ -1392,7 +1505,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1392
1505
  }
1393
1506
  if (isSameTag && !objIsObj) {
1394
1507
  stack || (stack = new Stack());
1395
- return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1508
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1396
1509
  }
1397
1510
  if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
1398
1511
  var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
@@ -1419,29 +1532,27 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
1419
1532
  }
1420
1533
  var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
1421
1534
  function baseIsMatch(object, source, matchData, customizer) {
1422
- var index2 = matchData.length, length = index2, noCustomizer = !customizer;
1535
+ var index2 = matchData.length, length = index2;
1423
1536
  if (object == null) {
1424
1537
  return !length;
1425
1538
  }
1426
1539
  object = Object(object);
1427
1540
  while (index2--) {
1428
1541
  var data = matchData[index2];
1429
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1542
+ if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1430
1543
  return false;
1431
1544
  }
1432
1545
  }
1433
1546
  while (++index2 < length) {
1434
1547
  data = matchData[index2];
1435
1548
  var key = data[0], objValue = object[key], srcValue = data[1];
1436
- if (noCustomizer && data[2]) {
1549
+ if (data[2]) {
1437
1550
  if (objValue === void 0 && !(key in object)) {
1438
1551
  return false;
1439
1552
  }
1440
1553
  } else {
1441
1554
  var stack = new Stack();
1442
- if (customizer) {
1443
- var result = customizer(objValue, srcValue, key, object, source, stack);
1444
- }
1555
+ var result;
1445
1556
  if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
1446
1557
  return false;
1447
1558
  }
@@ -1494,7 +1605,7 @@ function hasPath(object, path, hasFunc) {
1494
1605
  return result;
1495
1606
  }
1496
1607
  length = object == null ? 0 : object.length;
1497
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments$1(object));
1608
+ return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
1498
1609
  }
1499
1610
  function hasIn(object, path) {
1500
1611
  return object != null && hasPath(object, path, baseHasIn);
@@ -1538,7 +1649,7 @@ function createBaseFor(fromRight) {
1538
1649
  return function(object, iteratee, keysFunc) {
1539
1650
  var index2 = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1540
1651
  while (length--) {
1541
- var key = props[fromRight ? length : ++index2];
1652
+ var key = props[++index2];
1542
1653
  if (iteratee(iterable[key], key, iterable) === false) {
1543
1654
  break;
1544
1655
  }
@@ -1547,9 +1658,8 @@ function createBaseFor(fromRight) {
1547
1658
  };
1548
1659
  }
1549
1660
  var baseFor = createBaseFor();
1550
- const baseFor$1 = baseFor;
1551
1661
  function baseForOwn(object, iteratee) {
1552
- return object && baseFor$1(object, iteratee, keys);
1662
+ return object && baseFor(object, iteratee, keys);
1553
1663
  }
1554
1664
  function createBaseEach(eachFunc, fromRight) {
1555
1665
  return function(collection, iteratee) {
@@ -1559,8 +1669,8 @@ function createBaseEach(eachFunc, fromRight) {
1559
1669
  if (!isArrayLike(collection)) {
1560
1670
  return eachFunc(collection, iteratee);
1561
1671
  }
1562
- var length = collection.length, index2 = fromRight ? length : -1, iterable = Object(collection);
1563
- while (fromRight ? index2-- : ++index2 < length) {
1672
+ var length = collection.length, index2 = -1, iterable = Object(collection);
1673
+ while (++index2 < length) {
1564
1674
  if (iteratee(iterable[index2], index2, iterable) === false) {
1565
1675
  break;
1566
1676
  }
@@ -1569,7 +1679,6 @@ function createBaseEach(eachFunc, fromRight) {
1569
1679
  };
1570
1680
  }
1571
1681
  var baseEach = createBaseEach(baseForOwn);
1572
- const baseEach$1 = baseEach;
1573
1682
  var now = function() {
1574
1683
  return root.Date.now();
1575
1684
  };
@@ -1662,7 +1771,7 @@ function last(array) {
1662
1771
  }
1663
1772
  function baseFilter(collection, predicate) {
1664
1773
  var result = [];
1665
- baseEach$1(collection, function(value, index2, collection2) {
1774
+ baseEach(collection, function(value, index2, collection2) {
1666
1775
  if (predicate(value, index2, collection2)) {
1667
1776
  result.push(value);
1668
1777
  }
@@ -1691,10 +1800,10 @@ function isEmpty(value) {
1691
1800
  if (value == null) {
1692
1801
  return true;
1693
1802
  }
1694
- if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
1803
+ if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
1695
1804
  return !value.length;
1696
1805
  }
1697
- var tag = getTag$1(value);
1806
+ var tag = getTag(value);
1698
1807
  if (tag == mapTag$1 || tag == setTag$1) {
1699
1808
  return !value.size;
1700
1809
  }
@@ -1761,7 +1870,7 @@ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
1761
1870
  }
1762
1871
  function reduce(collection, iteratee, accumulator) {
1763
1872
  var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
1764
- return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach$1);
1873
+ return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach);
1765
1874
  }
1766
1875
  var mapTag = "[object Map]", setTag = "[object Set]";
1767
1876
  function size(collection) {
@@ -1771,71 +1880,12 @@ function size(collection) {
1771
1880
  if (isArrayLike(collection)) {
1772
1881
  return isString(collection) ? stringSize(collection) : collection.length;
1773
1882
  }
1774
- var tag = getTag$1(collection);
1883
+ var tag = getTag(collection);
1775
1884
  if (tag == mapTag || tag == setTag) {
1776
1885
  return collection.size;
1777
1886
  }
1778
1887
  return baseKeys(collection).length;
1779
1888
  }
1780
- const analyzeAdaptive = (defaultContainer, adaptive) => {
1781
- var _a, _b, _c;
1782
- if (isBoolean(adaptive)) {
1783
- return {
1784
- container: defaultContainer,
1785
- adaptiveWidth: true,
1786
- adaptiveHeight: false
1787
- };
1788
- }
1789
- return {
1790
- container: ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || defaultContainer,
1791
- adaptiveWidth: (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true,
1792
- adaptiveHeight: (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true
1793
- };
1794
- };
1795
- const createResizeObserver = (params) => {
1796
- let isFirstRender = true;
1797
- const { s2: s2$1, adaptive, container, wrapper } = params;
1798
- const {
1799
- container: actualWrapper,
1800
- adaptiveWidth,
1801
- adaptiveHeight
1802
- } = analyzeAdaptive(wrapper, adaptive);
1803
- if (!actualWrapper || !container || !adaptive || !s2$1) {
1804
- return;
1805
- }
1806
- const render2 = (width, height) => {
1807
- s2$1 == null ? void 0 : s2$1.changeSheetSize(width, height);
1808
- s2$1 == null ? void 0 : s2$1.render(false);
1809
- };
1810
- const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
1811
- const onResize = () => {
1812
- const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
1813
- const width = adaptiveWidth ? s2.floor(containerWidth != null ? containerWidth : s2$1.options.width) : s2$1.options.width;
1814
- const height = adaptiveHeight ? s2.floor(containerHeight != null ? containerHeight : s2$1.options.height) : s2$1.options.height;
1815
- if (!adaptiveWidth && !adaptiveHeight) {
1816
- return;
1817
- }
1818
- if (isFirstRender) {
1819
- render2(width, height);
1820
- isFirstRender = false;
1821
- return;
1822
- }
1823
- debounceRender(width, height);
1824
- };
1825
- const resizeObserver = new ResizeObserver(
1826
- ([entry] = []) => {
1827
- if (entry) {
1828
- onResize();
1829
- }
1830
- }
1831
- );
1832
- resizeObserver.observe(actualWrapper, {
1833
- box: "border-box"
1834
- });
1835
- return () => {
1836
- resizeObserver.unobserve(actualWrapper);
1837
- };
1838
- };
1839
1889
  const getDrillDownCache = (spreadsheet, meta) => {
1840
1890
  const drillDownDataCache = spreadsheet.store.get(
1841
1891
  "drillDownDataCache",
@@ -1899,7 +1949,7 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
1899
1949
  }
1900
1950
  ],
1901
1951
  belongsCell: "rowCell",
1902
- defaultHide: false,
1952
+ defaultHide: true,
1903
1953
  displayCondition: (partDrillDown == null ? void 0 : partDrillDown.displayCondition) || defaultPartDrillDownDisplayCondition
1904
1954
  };
1905
1955
  nextHeaderIcons.push(drillDownActionIcon);
@@ -1926,7 +1976,7 @@ const handleDrillDown = (params) => {
1926
1976
  if (!fetchData) {
1927
1977
  return;
1928
1978
  }
1929
- fetchData(meta, drillFields).then((info) => {
1979
+ fetchData(meta, drillFields).then((info) => __async(exports, null, function* () {
1930
1980
  const { drillData, drillField } = info;
1931
1981
  spreadsheet.dataSet.transformDrillDownData(
1932
1982
  drillField,
@@ -1945,20 +1995,74 @@ const handleDrillDown = (params) => {
1945
1995
  spreadsheet.store.set("drillDownDataCache", newDrillDownDataCache);
1946
1996
  }
1947
1997
  spreadsheet.interaction.reset();
1948
- spreadsheet.render(false);
1949
- });
1998
+ yield spreadsheet.render(false);
1999
+ }));
1950
2000
  };
1951
- s2.extendLocale(Locale);
1952
- const useExpose = (expose) => {
1953
- const s2Ref = vue.shallowRef();
1954
- expose({
1955
- get instance() {
1956
- var _a;
1957
- return (_a = s2Ref.value) == null ? void 0 : _a.instance;
2001
+ const getBaseSheetComponentOptions = (...options) => s2.customMerge(
2002
+ s2.DEFAULT_OPTIONS,
2003
+ SHEET_COMPONENT_DEFAULT_OPTIONS,
2004
+ ...options
2005
+ );
2006
+ const analyzeAdaptive = (defaultContainer, adaptive) => {
2007
+ var _a, _b, _c;
2008
+ if (isBoolean(adaptive)) {
2009
+ return {
2010
+ container: defaultContainer,
2011
+ adaptiveWidth: true,
2012
+ adaptiveHeight: false
2013
+ };
2014
+ }
2015
+ return {
2016
+ container: ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || defaultContainer,
2017
+ adaptiveWidth: (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true,
2018
+ adaptiveHeight: (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true
2019
+ };
2020
+ };
2021
+ const createResizeObserver = (params) => {
2022
+ let isFirstRender = true;
2023
+ const { s2: s2$1, adaptive, container, wrapper } = params;
2024
+ const {
2025
+ container: actualWrapper,
2026
+ adaptiveWidth,
2027
+ adaptiveHeight
2028
+ } = analyzeAdaptive(wrapper, adaptive);
2029
+ if (!actualWrapper || !container || !adaptive || !s2$1) {
2030
+ return;
2031
+ }
2032
+ const render2 = (width, height) => __async(exports, null, function* () {
2033
+ s2$1 == null ? void 0 : s2$1.changeSheetSize(width, height);
2034
+ yield s2$1 == null ? void 0 : s2$1.render(false);
2035
+ });
2036
+ const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
2037
+ const onResize = () => __async(exports, null, function* () {
2038
+ const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
2039
+ const width = adaptiveWidth ? s2.floor(containerWidth != null ? containerWidth : s2$1.options.width) : s2$1.options.width;
2040
+ const height = adaptiveHeight ? s2.floor(containerHeight != null ? containerHeight : s2$1.options.height) : s2$1.options.height;
2041
+ if (!adaptiveWidth && !adaptiveHeight) {
2042
+ return;
2043
+ }
2044
+ if (isFirstRender) {
2045
+ yield render2(width, height);
2046
+ isFirstRender = false;
2047
+ return;
1958
2048
  }
2049
+ debounceRender(width, height);
1959
2050
  });
1960
- return s2Ref;
2051
+ const resizeObserver = new ResizeObserver(
2052
+ ([entry] = []) => {
2053
+ if (entry) {
2054
+ onResize();
2055
+ }
2056
+ }
2057
+ );
2058
+ resizeObserver.observe(actualWrapper, {
2059
+ box: "border-box"
2060
+ });
2061
+ return () => {
2062
+ resizeObserver.unobserve(actualWrapper);
2063
+ };
1961
2064
  };
2065
+ s2.extendLocale(Locale);
1962
2066
  const _sfc_main$e = vue.defineComponent({
1963
2067
  name: "TooltipDetail",
1964
2068
  props: ["list"],
@@ -2438,7 +2542,7 @@ const usePagination = (s2Ref, props) => {
2438
2542
  const visible = vue.computed(() => {
2439
2543
  return showPagination && !isEmpty(paginationCfg);
2440
2544
  });
2441
- vue.watch([current, pageSize], () => {
2545
+ vue.watch([current, pageSize], () => __async(exports, null, function* () {
2442
2546
  if (!s2Ref.value) {
2443
2547
  return;
2444
2548
  }
@@ -2447,8 +2551,8 @@ const usePagination = (s2Ref, props) => {
2447
2551
  pageSize: pageSize.value
2448
2552
  };
2449
2553
  s2Ref.value.updatePagination(nextPagination);
2450
- s2Ref.value.render(false);
2451
- });
2554
+ yield s2Ref.value.render(false);
2555
+ }));
2452
2556
  vue.watch(
2453
2557
  [() => paginationCfg, s2Ref],
2454
2558
  () => {
@@ -2557,8 +2661,8 @@ const useCellEvent = (s2Ref, emit, eventName, emitName) => {
2557
2661
  };
2558
2662
  const useS2Event = (s2Ref, emit, eventName, emitName) => {
2559
2663
  var _a;
2560
- const handler = (params) => {
2561
- emit(emitName, params);
2664
+ const handler = (...params) => {
2665
+ emit(emitName, ...params);
2562
2666
  };
2563
2667
  (_a = s2Ref.value) == null ? void 0 : _a.on(eventName, handler);
2564
2668
  };
@@ -2592,6 +2696,8 @@ const useEvents = (s2Ref, emit) => {
2592
2696
  "rowCellAllCollapsed"
2593
2697
  );
2594
2698
  useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_SCROLL, "rowCellScroll");
2699
+ useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_RENDER, "rowCellRender");
2700
+ useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_SELECTED, "rowCellSelected");
2595
2701
  useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_HOVER, "colCellHover");
2596
2702
  useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_CLICK, "colCellClick");
2597
2703
  useCellEvent(
@@ -2611,6 +2717,8 @@ const useEvents = (s2Ref, emit) => {
2611
2717
  useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_MOUSE_MOVE, "colCellMouseMove");
2612
2718
  useS2Event(s2Ref, emit, s2.S2Event.COL_CELL_EXPANDED, "colCellExpanded");
2613
2719
  useS2Event(s2Ref, emit, s2.S2Event.COL_CELL_HIDDEN, "colCellHidden");
2720
+ useS2Event(s2Ref, emit, s2.S2Event.COL_CELL_RENDER, "colCellRender");
2721
+ useS2Event(s2Ref, emit, s2.S2Event.COL_CELL_SELECTED, "colCellSelected");
2614
2722
  useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_HOVER, "dataCellHover");
2615
2723
  useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_CLICK, "dataCellClick");
2616
2724
  useCellEvent(
@@ -2650,6 +2758,8 @@ const useEvents = (s2Ref, emit) => {
2650
2758
  s2.S2Event.DATA_CELL_SELECT_MOVE,
2651
2759
  "dataCellSelectMove"
2652
2760
  );
2761
+ useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_RENDER, "dataCellRender");
2762
+ useS2Event(s2Ref, emit, s2.S2Event.DATA_CELL_SELECTED, "dataCellSelected");
2653
2763
  useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_HOVER, "cornerCellHover");
2654
2764
  useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_CLICK, "cornerCellClick");
2655
2765
  useCellEvent(
@@ -2682,6 +2792,8 @@ const useEvents = (s2Ref, emit) => {
2682
2792
  s2.S2Event.CORNER_CELL_MOUSE_MOVE,
2683
2793
  "cornerCellMouseMove"
2684
2794
  );
2795
+ useS2Event(s2Ref, emit, s2.S2Event.CORNER_CELL_RENDER, "cornerCellRender");
2796
+ useS2Event(s2Ref, emit, s2.S2Event.CORNER_CELL_SELECTED, "cornerCellSelected");
2685
2797
  useCellEvent(s2Ref, emit, s2.S2Event.MERGED_CELLS_HOVER, "mergedCellsHover");
2686
2798
  useCellEvent(s2Ref, emit, s2.S2Event.MERGED_CELLS_CLICK, "mergedCellsClick");
2687
2799
  useCellEvent(
@@ -2714,6 +2826,13 @@ const useEvents = (s2Ref, emit) => {
2714
2826
  s2.S2Event.MERGED_CELLS_MOUSE_MOVE,
2715
2827
  "mergedCellsMouseMove"
2716
2828
  );
2829
+ useS2Event(s2Ref, emit, s2.S2Event.MERGED_CELLS_RENDER, "mergedCellsRender");
2830
+ useS2Event(
2831
+ s2Ref,
2832
+ emit,
2833
+ s2.S2Event.SERIES_NUMBER_CELL_RENDER,
2834
+ "seriesNumberCellRender"
2835
+ );
2717
2836
  useS2Event(s2Ref, emit, s2.S2Event.RANGE_SORT, "rangeSort");
2718
2837
  useS2Event(s2Ref, emit, s2.S2Event.RANGE_SORTED, "rangeSorted");
2719
2838
  useS2Event(s2Ref, emit, s2.S2Event.RANGE_FILTER, "rangeFilter");
@@ -2842,7 +2961,25 @@ const useLoading = (s2Ref, loadingProp = false) => {
2842
2961
  });
2843
2962
  return { loading, setLoading };
2844
2963
  };
2845
- const useSheetUpdate = (s2Ref, props) => {
2964
+ const useResize = (s2Ref, props, dom) => {
2965
+ const unobserve = vue.ref();
2966
+ vue.watch([s2Ref, () => props.adaptive], ([s22, adaptive], _, onCleanup) => {
2967
+ if (!s22) {
2968
+ return;
2969
+ }
2970
+ unobserve.value = createResizeObserver({
2971
+ s2: s22,
2972
+ adaptive,
2973
+ wrapper: dom.wrapperRef.value,
2974
+ container: dom.containerRef.value
2975
+ });
2976
+ onCleanup(() => {
2977
+ var _a;
2978
+ (_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
2979
+ });
2980
+ });
2981
+ };
2982
+ const useSheetUpdate = (s2Ref, props, hooks) => {
2846
2983
  const updateFlag = vue.reactive({
2847
2984
  rerender: false,
2848
2985
  reloadData: false,
@@ -2886,37 +3023,23 @@ const useSheetUpdate = (s2Ref, props) => {
2886
3023
  deep: vue.isProxy(props.themeCfg)
2887
3024
  }
2888
3025
  );
2889
- vue.watch(updateFlag, (flag) => {
2890
- var _a;
3026
+ vue.watch(updateFlag, (flag) => __async(exports, null, function* () {
3027
+ var _a, _b, _c, _d, _e;
2891
3028
  if (!flag.rerender) {
2892
3029
  return;
2893
3030
  }
2894
- (_a = s2Ref.value) == null ? void 0 : _a.render({
3031
+ (_a = hooks == null ? void 0 : hooks.before) == null ? void 0 : _a.call(hooks);
3032
+ const renderOptions = (_b = props == null ? void 0 : props.onUpdate) == null ? void 0 : _b.call(props, {
2895
3033
  reloadData: flag.reloadData,
2896
- reBuildDataSet: flag.rebuildDataset
3034
+ rebuildDataSet: flag.rebuildDataset
2897
3035
  });
3036
+ yield (_c = s2Ref.value) == null ? void 0 : _c.render(renderOptions);
3037
+ (_d = props == null ? void 0 : props.onUpdateAfterRender) == null ? void 0 : _d.call(props, renderOptions);
3038
+ (_e = hooks == null ? void 0 : hooks.after) == null ? void 0 : _e.call(hooks);
2898
3039
  flag.rerender = false;
2899
3040
  flag.reloadData = false;
2900
3041
  flag.rebuildDataset = false;
2901
- });
2902
- };
2903
- const useResize = (s2Ref, props, dom) => {
2904
- const unobserve = vue.ref();
2905
- vue.watch([s2Ref, () => props.adaptive], ([s22, adaptive], _, onCleanup) => {
2906
- if (!s22) {
2907
- return;
2908
- }
2909
- unobserve.value = createResizeObserver({
2910
- s2: s22,
2911
- adaptive,
2912
- wrapper: dom.wrapperRef.value,
2913
- container: dom.containerRef.value
2914
- });
2915
- onCleanup(() => {
2916
- var _a;
2917
- (_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
2918
- });
2919
- });
3042
+ }));
2920
3043
  };
2921
3044
  function useSpreadSheet(props, emit) {
2922
3045
  const {
@@ -2945,20 +3068,28 @@ function useSpreadSheet(props, emit) {
2945
3068
  }
2946
3069
  return new s2.PivotSheet(container, rawDataCfg, s2Options);
2947
3070
  };
2948
- const buildSpreadSheet = () => {
3071
+ const buildSpreadSheet = () => __async(this, null, function* () {
2949
3072
  setLoading(true);
2950
3073
  s2Ref.value = renderSpreadSheet(containerRef.value);
2951
3074
  s2Ref.value.setThemeCfg(vue.toRaw(themeCfg));
2952
- s2Ref.value.render();
3075
+ yield s2Ref.value.render();
2953
3076
  setLoading(false);
2954
3077
  onS2Mounted == null ? void 0 : onS2Mounted(s2Ref.value);
2955
- };
3078
+ });
2956
3079
  vue.onMounted(buildSpreadSheet);
2957
3080
  useEvents(s2Ref, emit);
2958
- useSheetUpdate(s2Ref, props);
3081
+ useSheetUpdate(s2Ref, props, {
3082
+ before() {
3083
+ setLoading(true);
3084
+ },
3085
+ after() {
3086
+ setLoading(false);
3087
+ }
3088
+ });
2959
3089
  useResize(s2Ref, props, { wrapperRef, containerRef });
2960
3090
  vue.onBeforeUnmount(() => {
2961
3091
  var _a;
3092
+ setLoading(false);
2962
3093
  (_a = s2Ref.value) == null ? void 0 : _a.destroy();
2963
3094
  });
2964
3095
  return {
@@ -2991,7 +3122,9 @@ const initBaseSheetProps = () => {
2991
3122
  default: false
2992
3123
  },
2993
3124
  spreadsheet: Function,
2994
- onMounted: Function
3125
+ onMounted: Function,
3126
+ onUpdate: Function,
3127
+ onUpdateAfterRender: Function
2995
3128
  };
2996
3129
  };
2997
3130
  const initDrillDownProps = () => {
@@ -3195,6 +3328,16 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3195
3328
  }, 8, ["wrapperClassName", "spinning"]);
3196
3329
  }
3197
3330
  const BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
3331
+ const useExpose = (expose) => {
3332
+ const s2Ref = vue.shallowRef();
3333
+ expose({
3334
+ get instance() {
3335
+ var _a;
3336
+ return (_a = s2Ref.value) == null ? void 0 : _a.instance;
3337
+ }
3338
+ });
3339
+ return s2Ref;
3340
+ };
3198
3341
  const _hoisted_1$2 = {
3199
3342
  class: "antv-s2-icon",
3200
3343
  viewBox: "0 0 1024 1024",
@@ -3501,7 +3644,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3501
3644
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.sheetType), { ref: "s2Ref" }, null, 512);
3502
3645
  }
3503
3646
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
3504
- const version = "@antv/s2-vue-v2.0.0-next.14";
3647
+ const version = "@antv/s2-vue-v2.0.0-next.16";
3505
3648
  exports.BaseSheet = BaseSheet;
3506
3649
  exports.CustomTooltip = CustomTooltip;
3507
3650
  exports.PivotSheet = PivotSheet;