@antv/s2-vue 1.4.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/style.min.css +1 -1
- package/esm/index.d.ts +760 -627
- package/esm/index.js +457 -209
- package/esm/index.js.map +1 -1
- package/esm/style.css +61 -14
- package/lib/index.js +449 -208
- package/lib/index.js.map +1 -1
- package/lib/style.css +61 -14
- package/package.json +10 -9
package/esm/index.js
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { customMerge, DEFAULT_OPTIONS, S2Event, extendLocale, TOOLTIP_PREFIX_CLS, i18n, getIcon, getTooltipDefaultOptions, BaseTooltip, S2_PREFIX_CLS, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
|
|
1
|
+
import { S2_PREFIX_CLS, customMerge, DEFAULT_OPTIONS, S2Event, extendLocale, TOOLTIP_PREFIX_CLS, i18n, getIcon, getTooltipDefaultOptions, BaseTooltip, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
|
|
21
2
|
import { shallowRef, defineComponent, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, computed, createTextVNode, resolveComponent, createBlock, withCtx, createVNode, renderSlot, render as render$3, ref, watch, onMounted, reactive, isProxy, onBeforeUnmount, toRaw, toRefs, mergeProps, resolveDynamicComponent } from "vue";
|
|
22
3
|
import { Menu, Dropdown, Pagination, Spin, Button, Input, Empty, MenuItem } from "ant-design-vue";
|
|
23
4
|
const EN_US = {
|
|
@@ -113,15 +94,21 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
|
113
94
|
showDefaultHeaderActionIcon: true
|
|
114
95
|
};
|
|
115
96
|
const RESIZE_RENDER_DELAY = 200;
|
|
116
|
-
const DRILL_DOWN_PRE_CLASS =
|
|
117
|
-
const getBaseSheetComponentOptions = (...options) =>
|
|
97
|
+
const DRILL_DOWN_PRE_CLASS = `${S2_PREFIX_CLS}-drill-down`;
|
|
98
|
+
const getBaseSheetComponentOptions = (...options) => {
|
|
99
|
+
return customMerge(
|
|
100
|
+
DEFAULT_OPTIONS,
|
|
101
|
+
SHEET_COMPONENT_DEFAULT_OPTIONS,
|
|
102
|
+
...options
|
|
103
|
+
);
|
|
104
|
+
};
|
|
118
105
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
119
|
-
|
|
106
|
+
const freeGlobal$1 = freeGlobal;
|
|
120
107
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
121
108
|
var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
122
|
-
|
|
109
|
+
const root$1 = root;
|
|
123
110
|
var Symbol$1 = root$1.Symbol;
|
|
124
|
-
|
|
111
|
+
const Symbol$2 = Symbol$1;
|
|
125
112
|
var objectProto$f = Object.prototype;
|
|
126
113
|
var hasOwnProperty$c = objectProto$f.hasOwnProperty;
|
|
127
114
|
var nativeObjectToString$1 = objectProto$f.toString;
|
|
@@ -171,7 +158,7 @@ function arrayMap(array, iteratee) {
|
|
|
171
158
|
return result;
|
|
172
159
|
}
|
|
173
160
|
var isArray = Array.isArray;
|
|
174
|
-
|
|
161
|
+
const isArray$1 = isArray;
|
|
175
162
|
var INFINITY$1 = 1 / 0;
|
|
176
163
|
var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
|
|
177
164
|
function baseToString(value) {
|
|
@@ -237,7 +224,7 @@ function isFunction(value) {
|
|
|
237
224
|
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
238
225
|
}
|
|
239
226
|
var coreJsData = root$1["__core-js_shared__"];
|
|
240
|
-
|
|
227
|
+
const coreJsData$1 = coreJsData;
|
|
241
228
|
var maskSrcKey = function() {
|
|
242
229
|
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
|
|
243
230
|
return uid ? "Symbol(src)_1." + uid : "";
|
|
@@ -265,7 +252,9 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
265
252
|
var funcProto = Function.prototype, objectProto$d = Object.prototype;
|
|
266
253
|
var funcToString = funcProto.toString;
|
|
267
254
|
var hasOwnProperty$b = objectProto$d.hasOwnProperty;
|
|
268
|
-
var reIsNative = RegExp(
|
|
255
|
+
var reIsNative = RegExp(
|
|
256
|
+
"^" + funcToString.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
257
|
+
);
|
|
269
258
|
function baseIsNative(value) {
|
|
270
259
|
if (!isObject(value) || isMasked(value)) {
|
|
271
260
|
return false;
|
|
@@ -281,7 +270,7 @@ function getNative(object, key) {
|
|
|
281
270
|
return baseIsNative(value) ? value : void 0;
|
|
282
271
|
}
|
|
283
272
|
var WeakMap = getNative(root$1, "WeakMap");
|
|
284
|
-
|
|
273
|
+
const WeakMap$1 = WeakMap;
|
|
285
274
|
var objectCreate = Object.create;
|
|
286
275
|
var baseCreate = function() {
|
|
287
276
|
function object() {
|
|
@@ -299,7 +288,7 @@ var baseCreate = function() {
|
|
|
299
288
|
return result;
|
|
300
289
|
};
|
|
301
290
|
}();
|
|
302
|
-
|
|
291
|
+
const baseCreate$1 = baseCreate;
|
|
303
292
|
function copyArray(source, array) {
|
|
304
293
|
var index2 = -1, length = source.length;
|
|
305
294
|
array || (array = Array(length));
|
|
@@ -316,7 +305,7 @@ var defineProperty = function() {
|
|
|
316
305
|
} catch (e) {
|
|
317
306
|
}
|
|
318
307
|
}();
|
|
319
|
-
|
|
308
|
+
const defineProperty$1 = defineProperty;
|
|
320
309
|
function arrayEach(array, iteratee) {
|
|
321
310
|
var index2 = -1, length = array == null ? 0 : array.length;
|
|
322
311
|
while (++index2 < length) {
|
|
@@ -405,7 +394,7 @@ var isArguments = baseIsArguments(function() {
|
|
|
405
394
|
}()) ? baseIsArguments : function(value) {
|
|
406
395
|
return isObjectLike(value) && hasOwnProperty$9.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
407
396
|
};
|
|
408
|
-
|
|
397
|
+
const isArguments$1 = isArguments;
|
|
409
398
|
function stubFalse() {
|
|
410
399
|
return false;
|
|
411
400
|
}
|
|
@@ -415,7 +404,7 @@ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
|
415
404
|
var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0;
|
|
416
405
|
var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
|
|
417
406
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
418
|
-
|
|
407
|
+
const isBuffer$1 = isBuffer;
|
|
419
408
|
var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$4 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$7 = "[object Map]", numberTag$3 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$7 = "[object Set]", stringTag$4 = "[object String]", weakMapTag$2 = "[object WeakMap]";
|
|
420
409
|
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]";
|
|
421
410
|
var typedArrayTags = {};
|
|
@@ -443,10 +432,10 @@ var nodeUtil = function() {
|
|
|
443
432
|
} catch (e) {
|
|
444
433
|
}
|
|
445
434
|
}();
|
|
446
|
-
|
|
435
|
+
const nodeUtil$1 = nodeUtil;
|
|
447
436
|
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
448
437
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
449
|
-
|
|
438
|
+
const isTypedArray$1 = isTypedArray;
|
|
450
439
|
var objectProto$9 = Object.prototype;
|
|
451
440
|
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
452
441
|
function arrayLikeKeys(value, inherited) {
|
|
@@ -464,7 +453,7 @@ function overArg(func, transform) {
|
|
|
464
453
|
};
|
|
465
454
|
}
|
|
466
455
|
var nativeKeys = overArg(Object.keys, Object);
|
|
467
|
-
|
|
456
|
+
const nativeKeys$1 = nativeKeys;
|
|
468
457
|
var objectProto$8 = Object.prototype;
|
|
469
458
|
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
470
459
|
function baseKeys(object) {
|
|
@@ -520,7 +509,7 @@ function isKey(value, object) {
|
|
|
520
509
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
521
510
|
}
|
|
522
511
|
var nativeCreate = getNative(Object, "create");
|
|
523
|
-
|
|
512
|
+
const nativeCreate$1 = nativeCreate;
|
|
524
513
|
function hashClear() {
|
|
525
514
|
this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
|
|
526
515
|
this.size = 0;
|
|
@@ -627,7 +616,7 @@ ListCache.prototype.get = listCacheGet;
|
|
|
627
616
|
ListCache.prototype.has = listCacheHas;
|
|
628
617
|
ListCache.prototype.set = listCacheSet;
|
|
629
618
|
var Map = getNative(root$1, "Map");
|
|
630
|
-
|
|
619
|
+
const Map$1 = Map;
|
|
631
620
|
function mapCacheClear() {
|
|
632
621
|
this.size = 0;
|
|
633
622
|
this.__data__ = {
|
|
@@ -715,7 +704,7 @@ var stringToPath = memoizeCapped(function(string) {
|
|
|
715
704
|
});
|
|
716
705
|
return result;
|
|
717
706
|
});
|
|
718
|
-
|
|
707
|
+
const stringToPath$1 = stringToPath;
|
|
719
708
|
function toString(value) {
|
|
720
709
|
return value == null ? "" : baseToString(value);
|
|
721
710
|
}
|
|
@@ -753,7 +742,7 @@ function arrayPush(array, values) {
|
|
|
753
742
|
return array;
|
|
754
743
|
}
|
|
755
744
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
756
|
-
|
|
745
|
+
const getPrototype$1 = getPrototype;
|
|
757
746
|
var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
|
|
758
747
|
var rsZWJ$1 = "\\u200d";
|
|
759
748
|
var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
|
|
@@ -819,7 +808,7 @@ function baseAssignIn(object, source) {
|
|
|
819
808
|
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
820
809
|
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
821
810
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
822
|
-
var
|
|
811
|
+
var Buffer = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
|
|
823
812
|
function cloneBuffer(buffer, isDeep) {
|
|
824
813
|
if (isDeep) {
|
|
825
814
|
return buffer.slice();
|
|
@@ -853,7 +842,7 @@ var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
|
|
|
853
842
|
return propertyIsEnumerable.call(object, symbol);
|
|
854
843
|
});
|
|
855
844
|
};
|
|
856
|
-
|
|
845
|
+
const getSymbols$1 = getSymbols;
|
|
857
846
|
function copySymbols(source, object) {
|
|
858
847
|
return copyObject(source, getSymbols$1(source), object);
|
|
859
848
|
}
|
|
@@ -866,7 +855,7 @@ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
|
866
855
|
}
|
|
867
856
|
return result;
|
|
868
857
|
};
|
|
869
|
-
|
|
858
|
+
const getSymbolsIn$1 = getSymbolsIn;
|
|
870
859
|
function copySymbolsIn(source, object) {
|
|
871
860
|
return copyObject(source, getSymbolsIn$1(source), object);
|
|
872
861
|
}
|
|
@@ -881,11 +870,11 @@ function getAllKeysIn(object) {
|
|
|
881
870
|
return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
|
|
882
871
|
}
|
|
883
872
|
var DataView = getNative(root$1, "DataView");
|
|
884
|
-
|
|
873
|
+
const DataView$1 = DataView;
|
|
885
874
|
var Promise$1 = getNative(root$1, "Promise");
|
|
886
|
-
|
|
875
|
+
const Promise$2 = Promise$1;
|
|
887
876
|
var Set = getNative(root$1, "Set");
|
|
888
|
-
|
|
877
|
+
const Set$1 = Set;
|
|
889
878
|
var mapTag$6 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$6 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
890
879
|
var dataViewTag$3 = "[object DataView]";
|
|
891
880
|
var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
|
|
@@ -910,7 +899,7 @@ if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3 ||
|
|
|
910
899
|
return result;
|
|
911
900
|
};
|
|
912
901
|
}
|
|
913
|
-
|
|
902
|
+
const getTag$1 = getTag;
|
|
914
903
|
var objectProto$3 = Object.prototype;
|
|
915
904
|
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
916
905
|
function initCloneArray(array) {
|
|
@@ -921,8 +910,8 @@ function initCloneArray(array) {
|
|
|
921
910
|
}
|
|
922
911
|
return result;
|
|
923
912
|
}
|
|
924
|
-
var
|
|
925
|
-
|
|
913
|
+
var Uint8Array = root$1.Uint8Array;
|
|
914
|
+
const Uint8Array$1 = Uint8Array;
|
|
926
915
|
function cloneArrayBuffer(arrayBuffer) {
|
|
927
916
|
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
928
917
|
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
@@ -990,14 +979,14 @@ function baseIsMap(value) {
|
|
|
990
979
|
}
|
|
991
980
|
var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
|
|
992
981
|
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
993
|
-
|
|
982
|
+
const isMap$1 = isMap;
|
|
994
983
|
var setTag$4 = "[object Set]";
|
|
995
984
|
function baseIsSet(value) {
|
|
996
985
|
return isObjectLike(value) && getTag$1(value) == setTag$4;
|
|
997
986
|
}
|
|
998
987
|
var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
|
|
999
988
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
1000
|
-
|
|
989
|
+
const isSet$1 = isSet;
|
|
1001
990
|
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
|
|
1002
991
|
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$3 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
|
|
1003
992
|
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
@@ -1424,7 +1413,7 @@ function createBaseFor(fromRight) {
|
|
|
1424
1413
|
};
|
|
1425
1414
|
}
|
|
1426
1415
|
var baseFor = createBaseFor();
|
|
1427
|
-
|
|
1416
|
+
const baseFor$1 = baseFor;
|
|
1428
1417
|
function baseForOwn(object, iteratee) {
|
|
1429
1418
|
return object && baseFor$1(object, iteratee, keys);
|
|
1430
1419
|
}
|
|
@@ -1446,11 +1435,11 @@ function createBaseEach(eachFunc, fromRight) {
|
|
|
1446
1435
|
};
|
|
1447
1436
|
}
|
|
1448
1437
|
var baseEach = createBaseEach(baseForOwn);
|
|
1449
|
-
|
|
1438
|
+
const baseEach$1 = baseEach;
|
|
1450
1439
|
var now = function() {
|
|
1451
1440
|
return root$1.Date.now();
|
|
1452
1441
|
};
|
|
1453
|
-
|
|
1442
|
+
const now$1 = now;
|
|
1454
1443
|
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1455
1444
|
var nativeMax = Math.max, nativeMin = Math.min;
|
|
1456
1445
|
function debounce(func, wait, options) {
|
|
@@ -1580,7 +1569,7 @@ function isEmpty(value) {
|
|
|
1580
1569
|
return true;
|
|
1581
1570
|
}
|
|
1582
1571
|
var asciiSize = baseProperty("length");
|
|
1583
|
-
|
|
1572
|
+
const asciiSize$1 = asciiSize;
|
|
1584
1573
|
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = "\\ufe0e\\ufe0f";
|
|
1585
1574
|
var rsAstral = "[" + rsAstralRange + "]", rsCombo = "[" + rsComboRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ = "\\u200d";
|
|
1586
1575
|
var reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
|
|
@@ -1664,11 +1653,13 @@ const createResizeObserver = (params) => {
|
|
|
1664
1653
|
}
|
|
1665
1654
|
debounceRender(width, height);
|
|
1666
1655
|
};
|
|
1667
|
-
const resizeObserver = new ResizeObserver(
|
|
1668
|
-
|
|
1669
|
-
|
|
1656
|
+
const resizeObserver = new ResizeObserver(
|
|
1657
|
+
([entry] = []) => {
|
|
1658
|
+
if (entry) {
|
|
1659
|
+
onResize();
|
|
1660
|
+
}
|
|
1670
1661
|
}
|
|
1671
|
-
|
|
1662
|
+
);
|
|
1672
1663
|
resizeObserver.observe(actualWrapper, {
|
|
1673
1664
|
box: "border-box"
|
|
1674
1665
|
});
|
|
@@ -1677,7 +1668,10 @@ const createResizeObserver = (params) => {
|
|
|
1677
1668
|
};
|
|
1678
1669
|
};
|
|
1679
1670
|
const getDrillDownCache = (spreadsheet, meta) => {
|
|
1680
|
-
const drillDownDataCache = spreadsheet.store.get(
|
|
1671
|
+
const drillDownDataCache = spreadsheet.store.get(
|
|
1672
|
+
"drillDownDataCache",
|
|
1673
|
+
[]
|
|
1674
|
+
);
|
|
1681
1675
|
const cache = drillDownDataCache.find((dc) => dc.rowId === meta.id);
|
|
1682
1676
|
return {
|
|
1683
1677
|
drillDownDataCache,
|
|
@@ -1688,7 +1682,10 @@ const handleActionIconClick = (params) => {
|
|
|
1688
1682
|
const { meta, event, callback } = params;
|
|
1689
1683
|
const { spreadsheet } = meta;
|
|
1690
1684
|
spreadsheet.store.set("drillDownNode", meta);
|
|
1691
|
-
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(
|
|
1685
|
+
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(
|
|
1686
|
+
spreadsheet,
|
|
1687
|
+
meta
|
|
1688
|
+
);
|
|
1692
1689
|
const cache = (drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField) ? [drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField] : [];
|
|
1693
1690
|
const disabled = [];
|
|
1694
1691
|
drillDownDataCache.forEach((val) => {
|
|
@@ -1707,10 +1704,9 @@ const handleActionIconClick = (params) => {
|
|
|
1707
1704
|
});
|
|
1708
1705
|
};
|
|
1709
1706
|
const defaultPartDrillDownDisplayCondition = (meta) => {
|
|
1710
|
-
var _a;
|
|
1711
1707
|
const s2 = meta.spreadsheet;
|
|
1712
1708
|
const { fields } = s2.dataCfg;
|
|
1713
|
-
const iconLevel = (
|
|
1709
|
+
const iconLevel = size(fields.rows) - 1;
|
|
1714
1710
|
const isValueInCols = !isEmpty(fields.values) ? s2.isValueInCols() : true;
|
|
1715
1711
|
return iconLevel <= meta.level && s2.isHierarchyTreeType() && isValueInCols && !meta.isGrandTotals;
|
|
1716
1712
|
};
|
|
@@ -1737,25 +1733,36 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
|
1737
1733
|
};
|
|
1738
1734
|
nextHeaderIcons.push(drillDownActionIcon);
|
|
1739
1735
|
}
|
|
1740
|
-
return
|
|
1736
|
+
return {
|
|
1737
|
+
...options,
|
|
1741
1738
|
headerActionIcons: nextHeaderIcons
|
|
1742
|
-
}
|
|
1739
|
+
};
|
|
1743
1740
|
};
|
|
1744
1741
|
const handleDrillDown = (params) => {
|
|
1745
1742
|
const { fetchData, spreadsheet, drillFields, drillItemsNum = -1 } = params;
|
|
1746
1743
|
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1747
1744
|
const meta = spreadsheet.store.get("drillDownNode");
|
|
1748
|
-
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(
|
|
1745
|
+
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(
|
|
1746
|
+
spreadsheet,
|
|
1747
|
+
meta
|
|
1748
|
+
);
|
|
1749
1749
|
let newDrillDownDataCache = clone(drillDownDataCache);
|
|
1750
1750
|
if (drillDownCurrentCache) {
|
|
1751
|
-
newDrillDownDataCache = filter(
|
|
1751
|
+
newDrillDownDataCache = filter(
|
|
1752
|
+
drillDownDataCache,
|
|
1753
|
+
(cache) => cache.rowId !== meta.id
|
|
1754
|
+
);
|
|
1752
1755
|
}
|
|
1753
1756
|
if (!fetchData) {
|
|
1754
1757
|
return;
|
|
1755
1758
|
}
|
|
1756
1759
|
fetchData(meta, drillFields).then((info) => {
|
|
1757
1760
|
const { drillData, drillField } = info;
|
|
1758
|
-
spreadsheet.dataSet.transformDrillDownData(
|
|
1761
|
+
spreadsheet.dataSet.transformDrillDownData(
|
|
1762
|
+
drillField,
|
|
1763
|
+
drillData,
|
|
1764
|
+
meta
|
|
1765
|
+
);
|
|
1759
1766
|
if (!isEmpty(drillData)) {
|
|
1760
1767
|
const drillLevel = meta.level + 1;
|
|
1761
1768
|
const newDrillDownData = {
|
|
@@ -1782,13 +1789,6 @@ const useExpose = (expose) => {
|
|
|
1782
1789
|
});
|
|
1783
1790
|
return s2Ref;
|
|
1784
1791
|
};
|
|
1785
|
-
var _export_sfc = (sfc, props) => {
|
|
1786
|
-
const target = sfc.__vccOpts || sfc;
|
|
1787
|
-
for (const [key, val] of props) {
|
|
1788
|
-
target[key] = val;
|
|
1789
|
-
}
|
|
1790
|
-
return target;
|
|
1791
|
-
};
|
|
1792
1792
|
const _sfc_main$e = defineComponent({
|
|
1793
1793
|
name: "TooltipDetail",
|
|
1794
1794
|
props: ["list"],
|
|
@@ -1798,6 +1798,13 @@ const _sfc_main$e = defineComponent({
|
|
|
1798
1798
|
};
|
|
1799
1799
|
}
|
|
1800
1800
|
});
|
|
1801
|
+
const _export_sfc = (sfc, props) => {
|
|
1802
|
+
const target = sfc.__vccOpts || sfc;
|
|
1803
|
+
for (const [key, val] of props) {
|
|
1804
|
+
target[key] = val;
|
|
1805
|
+
}
|
|
1806
|
+
return target;
|
|
1807
|
+
};
|
|
1801
1808
|
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1802
1809
|
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
|
|
1803
1810
|
return openBlock(), createElementBlock("div", {
|
|
@@ -1817,7 +1824,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1817
1824
|
], 2);
|
|
1818
1825
|
}), 128);
|
|
1819
1826
|
}
|
|
1820
|
-
|
|
1827
|
+
const TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
|
|
1821
1828
|
const _sfc_main$d = defineComponent({
|
|
1822
1829
|
name: "TooltipHeadInfo",
|
|
1823
1830
|
props: ["rows", "cols"],
|
|
@@ -1848,7 +1855,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1848
1855
|
}), 128))
|
|
1849
1856
|
], 2)) : createCommentVNode("", true);
|
|
1850
1857
|
}
|
|
1851
|
-
|
|
1858
|
+
const TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
|
|
1852
1859
|
const _sfc_main$c = defineComponent({
|
|
1853
1860
|
name: "TooltipInfos",
|
|
1854
1861
|
props: ["infos"],
|
|
@@ -1864,7 +1871,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1864
1871
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-infos`)
|
|
1865
1872
|
}, toDisplayString(_ctx.infos), 3);
|
|
1866
1873
|
}
|
|
1867
|
-
|
|
1874
|
+
const TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
|
|
1868
1875
|
const _sfc_main$b = defineComponent({
|
|
1869
1876
|
name: "TooltipSimpleTips",
|
|
1870
1877
|
props: ["name", "tips"],
|
|
@@ -1887,18 +1894,24 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1887
1894
|
}, toDisplayString(_ctx.tips), 3)) : createCommentVNode("", true)
|
|
1888
1895
|
], 64);
|
|
1889
1896
|
}
|
|
1890
|
-
|
|
1897
|
+
const TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
|
|
1891
1898
|
const _sfc_main$a = defineComponent({
|
|
1892
1899
|
name: "TooltipSummary",
|
|
1893
1900
|
props: ["summaries"],
|
|
1894
1901
|
setup(props) {
|
|
1895
|
-
const summaryInfo = computed(
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
pre
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
+
const summaryInfo = computed(
|
|
1903
|
+
() => reduce(
|
|
1904
|
+
props.summaries,
|
|
1905
|
+
(pre, next) => {
|
|
1906
|
+
pre.count += size(next == null ? void 0 : next.selectedData);
|
|
1907
|
+
if (next.value || next.name) {
|
|
1908
|
+
pre.summaries.push(next);
|
|
1909
|
+
}
|
|
1910
|
+
return pre;
|
|
1911
|
+
},
|
|
1912
|
+
{ count: 0, summaries: [] }
|
|
1913
|
+
)
|
|
1914
|
+
);
|
|
1902
1915
|
return {
|
|
1903
1916
|
summaryInfo,
|
|
1904
1917
|
i18n,
|
|
@@ -1926,7 +1939,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1926
1939
|
}, [
|
|
1927
1940
|
createElementVNode("span", {
|
|
1928
1941
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-key`)
|
|
1929
|
-
}, toDisplayString(summary.name) + " " + toDisplayString(_ctx.i18n("\u603B\u548C")), 3),
|
|
1942
|
+
}, toDisplayString(summary.name) + " (" + toDisplayString(_ctx.i18n("\u603B\u548C")) + ") ", 3),
|
|
1930
1943
|
createElementVNode("span", {
|
|
1931
1944
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-val ${_ctx.TOOLTIP_PREFIX_CLS}-bold`)
|
|
1932
1945
|
}, toDisplayString(summary.value), 3)
|
|
@@ -1934,7 +1947,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1934
1947
|
}), 128))
|
|
1935
1948
|
], 2);
|
|
1936
1949
|
}
|
|
1937
|
-
|
|
1950
|
+
const TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
|
|
1938
1951
|
const _sfc_main$9 = defineComponent({
|
|
1939
1952
|
name: "TooltipOperatorTitle",
|
|
1940
1953
|
props: ["menu"],
|
|
@@ -1959,7 +1972,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1959
1972
|
}, toDisplayString(_ctx.menu.text), 3)
|
|
1960
1973
|
]);
|
|
1961
1974
|
}
|
|
1962
|
-
|
|
1975
|
+
const TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
|
|
1963
1976
|
const _sfc_main$8 = defineComponent({
|
|
1964
1977
|
name: "TooltipOperatorMenu",
|
|
1965
1978
|
props: ["menu", "cell"],
|
|
@@ -2038,8 +2051,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2038
2051
|
}, 8, ["title"])) : createCommentVNode("", true)
|
|
2039
2052
|
], 64);
|
|
2040
2053
|
}
|
|
2041
|
-
|
|
2042
|
-
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
2054
|
+
const TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
|
|
2043
2055
|
const _sfc_main$7 = defineComponent({
|
|
2044
2056
|
name: "TooltipOperator",
|
|
2045
2057
|
props: [
|
|
@@ -2048,9 +2060,9 @@ const _sfc_main$7 = defineComponent({
|
|
|
2048
2060
|
"onClick",
|
|
2049
2061
|
"cell"
|
|
2050
2062
|
],
|
|
2051
|
-
setup(
|
|
2052
|
-
const onMenuClick = (
|
|
2053
|
-
emit("click",
|
|
2063
|
+
setup(_, { emit }) {
|
|
2064
|
+
const onMenuClick = (menuInfo) => {
|
|
2065
|
+
emit("click", menuInfo);
|
|
2054
2066
|
};
|
|
2055
2067
|
return {
|
|
2056
2068
|
TOOLTIP_PREFIX_CLS,
|
|
@@ -2064,6 +2076,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
2064
2076
|
TooltipOperatorMenu
|
|
2065
2077
|
}
|
|
2066
2078
|
});
|
|
2079
|
+
const index_vue_vue_type_style_index_0_lang$1 = "";
|
|
2067
2080
|
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2068
2081
|
const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
|
|
2069
2082
|
const _component_Menu = resolveComponent("Menu");
|
|
@@ -2127,8 +2140,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2127
2140
|
}), 128))
|
|
2128
2141
|
], 2);
|
|
2129
2142
|
}
|
|
2130
|
-
|
|
2131
|
-
var index_vue_vue_type_style_index_0_lang = "";
|
|
2143
|
+
const TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
2132
2144
|
const _sfc_main$6 = defineComponent({
|
|
2133
2145
|
name: "TooltipComponent",
|
|
2134
2146
|
props: [
|
|
@@ -2155,6 +2167,7 @@ const _sfc_main$6 = defineComponent({
|
|
|
2155
2167
|
TooltipOperator
|
|
2156
2168
|
}
|
|
2157
2169
|
});
|
|
2170
|
+
const index_vue_vue_type_style_index_0_lang = "";
|
|
2158
2171
|
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2159
2172
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
2160
2173
|
const _component_TooltipOperator = resolveComponent("TooltipOperator");
|
|
@@ -2199,7 +2212,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2199
2212
|
], 64))
|
|
2200
2213
|
], 64));
|
|
2201
2214
|
}
|
|
2202
|
-
|
|
2215
|
+
const TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
2203
2216
|
class CustomTooltip extends BaseTooltip {
|
|
2204
2217
|
constructor(spreadsheet) {
|
|
2205
2218
|
super(spreadsheet);
|
|
@@ -2208,15 +2221,22 @@ class CustomTooltip extends BaseTooltip {
|
|
|
2208
2221
|
var _a, _b;
|
|
2209
2222
|
const { tooltip } = this.spreadsheet.options;
|
|
2210
2223
|
const showOptions = this.options;
|
|
2211
|
-
const cell = this.spreadsheet.getCell(
|
|
2224
|
+
const cell = this.spreadsheet.getCell(
|
|
2225
|
+
(_a = showOptions.event) == null ? void 0 : _a.target
|
|
2226
|
+
);
|
|
2212
2227
|
const content = (_b = showOptions.content) != null ? _b : tooltip == null ? void 0 : tooltip.content;
|
|
2213
|
-
const tooltipProps =
|
|
2228
|
+
const tooltipProps = {
|
|
2229
|
+
...showOptions,
|
|
2214
2230
|
cell,
|
|
2215
2231
|
content
|
|
2216
|
-
}
|
|
2217
|
-
const tooltipVNode = createVNode(
|
|
2218
|
-
|
|
2219
|
-
|
|
2232
|
+
};
|
|
2233
|
+
const tooltipVNode = createVNode(
|
|
2234
|
+
TooltipComponent,
|
|
2235
|
+
tooltipProps,
|
|
2236
|
+
{
|
|
2237
|
+
content: () => content
|
|
2238
|
+
}
|
|
2239
|
+
);
|
|
2220
2240
|
render$3(null, this.container);
|
|
2221
2241
|
render$3(tooltipVNode, this.container);
|
|
2222
2242
|
}
|
|
@@ -2231,8 +2251,12 @@ const DEFAULT_PAGE_NUMBER = 1;
|
|
|
2231
2251
|
const DEFAULT_PAGE_SIZE = 10;
|
|
2232
2252
|
const usePagination = (s2Ref, props) => {
|
|
2233
2253
|
var _a, _b, _c, _d, _e, _f;
|
|
2234
|
-
const current = ref(
|
|
2235
|
-
|
|
2254
|
+
const current = ref(
|
|
2255
|
+
(_c = (_b = (_a = props.options) == null ? void 0 : _a.pagination) == null ? void 0 : _b.current) != null ? _c : DEFAULT_PAGE_NUMBER
|
|
2256
|
+
);
|
|
2257
|
+
const pageSize = ref(
|
|
2258
|
+
(_f = (_e = (_d = props.options) == null ? void 0 : _d.pagination) == null ? void 0 : _e.pageSize) != null ? _f : DEFAULT_PAGE_SIZE
|
|
2259
|
+
);
|
|
2236
2260
|
const total = ref(0);
|
|
2237
2261
|
const change = (nextCurrent) => {
|
|
2238
2262
|
current.value = nextCurrent;
|
|
@@ -2256,17 +2280,21 @@ const usePagination = (s2Ref, props) => {
|
|
|
2256
2280
|
s2Ref.value.updatePagination(nextPagination);
|
|
2257
2281
|
s2Ref.value.render(false);
|
|
2258
2282
|
});
|
|
2259
|
-
watch(
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2283
|
+
watch(
|
|
2284
|
+
[() => {
|
|
2285
|
+
var _a2;
|
|
2286
|
+
return (_a2 = props.options) == null ? void 0 : _a2.pagination;
|
|
2287
|
+
}, s2Ref],
|
|
2288
|
+
() => {
|
|
2289
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i;
|
|
2290
|
+
current.value = (_c2 = (_b2 = (_a2 = props.options) == null ? void 0 : _a2.pagination) == null ? void 0 : _b2.current) != null ? _c2 : DEFAULT_PAGE_NUMBER;
|
|
2291
|
+
pageSize.value = (_f2 = (_e2 = (_d2 = props.options) == null ? void 0 : _d2.pagination) == null ? void 0 : _e2.pageSize) != null ? _f2 : DEFAULT_PAGE_SIZE;
|
|
2292
|
+
total.value = (_i = (_h = (_g = s2Ref.value) == null ? void 0 : _g.facet) == null ? void 0 : _h.viewCellHeights.getTotalLength()) != null ? _i : 0;
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
immediate: true
|
|
2296
|
+
}
|
|
2297
|
+
);
|
|
2270
2298
|
watch(s2Ref, (value, oldValue, onCleanup) => {
|
|
2271
2299
|
if (!s2Ref.value) {
|
|
2272
2300
|
return;
|
|
@@ -2346,7 +2374,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2346
2374
|
}, toDisplayString(_ctx.i18n("\u5171\u8BA1")) + " " + toDisplayString(_ctx.total || " - ") + " " + toDisplayString(_ctx.i18n("\u6761")), 3)
|
|
2347
2375
|
], 2);
|
|
2348
2376
|
}
|
|
2349
|
-
|
|
2377
|
+
const S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
2350
2378
|
const RENDER_TOOLTIP_OPTION = {
|
|
2351
2379
|
tooltip: {
|
|
2352
2380
|
renderTooltip: (spreadsheet) => new CustomTooltip(spreadsheet)
|
|
@@ -2375,73 +2403,253 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2375
2403
|
}
|
|
2376
2404
|
useCellEvent(s2Ref, emit, S2Event.ROW_CELL_HOVER, "rowCellHover");
|
|
2377
2405
|
useCellEvent(s2Ref, emit, S2Event.ROW_CELL_CLICK, "rowCellClick");
|
|
2378
|
-
useCellEvent(
|
|
2379
|
-
|
|
2406
|
+
useCellEvent(
|
|
2407
|
+
s2Ref,
|
|
2408
|
+
emit,
|
|
2409
|
+
S2Event.ROW_CELL_DOUBLE_CLICK,
|
|
2410
|
+
"rowCellDoubleClick"
|
|
2411
|
+
);
|
|
2412
|
+
useCellEvent(
|
|
2413
|
+
s2Ref,
|
|
2414
|
+
emit,
|
|
2415
|
+
S2Event.ROW_CELL_CONTEXT_MENU,
|
|
2416
|
+
"rowCellContextMenu"
|
|
2417
|
+
);
|
|
2380
2418
|
useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_DOWN, "rowCellMouseDown");
|
|
2381
2419
|
useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
|
|
2382
2420
|
useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
|
|
2383
|
-
useS2Event(
|
|
2421
|
+
useS2Event(
|
|
2422
|
+
s2Ref,
|
|
2423
|
+
emit,
|
|
2424
|
+
S2Event.ROW_CELL_COLLAPSE_TREE_ROWS,
|
|
2425
|
+
"rowCellCollapseTreeRows"
|
|
2426
|
+
);
|
|
2384
2427
|
useS2Event(s2Ref, emit, S2Event.ROW_CELL_SCROLL, "rowCellScroll");
|
|
2385
2428
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_HOVER, "colCellHover");
|
|
2386
2429
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_CLICK, "colCellClick");
|
|
2387
|
-
useCellEvent(
|
|
2388
|
-
|
|
2430
|
+
useCellEvent(
|
|
2431
|
+
s2Ref,
|
|
2432
|
+
emit,
|
|
2433
|
+
S2Event.COL_CELL_DOUBLE_CLICK,
|
|
2434
|
+
"colCellDoubleClick"
|
|
2435
|
+
);
|
|
2436
|
+
useCellEvent(
|
|
2437
|
+
s2Ref,
|
|
2438
|
+
emit,
|
|
2439
|
+
S2Event.COL_CELL_CONTEXT_MENU,
|
|
2440
|
+
"colCellContextMenu"
|
|
2441
|
+
);
|
|
2389
2442
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_DOWN, "colCellMouseDown");
|
|
2390
2443
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_UP, "colCellMouseUp");
|
|
2391
2444
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_MOVE, "colCellMouseMove");
|
|
2392
2445
|
useCellEvent(s2Ref, emit, S2Event.DATA_CELL_HOVER, "dataCellHover");
|
|
2393
2446
|
useCellEvent(s2Ref, emit, S2Event.DATA_CELL_CLICK, "dataCellClick");
|
|
2394
|
-
useCellEvent(
|
|
2395
|
-
|
|
2396
|
-
|
|
2447
|
+
useCellEvent(
|
|
2448
|
+
s2Ref,
|
|
2449
|
+
emit,
|
|
2450
|
+
S2Event.DATA_CELL_DOUBLE_CLICK,
|
|
2451
|
+
"dataCellDoubleClick"
|
|
2452
|
+
);
|
|
2453
|
+
useCellEvent(
|
|
2454
|
+
s2Ref,
|
|
2455
|
+
emit,
|
|
2456
|
+
S2Event.DATA_CELL_CONTEXT_MENU,
|
|
2457
|
+
"dataCellContextMenu"
|
|
2458
|
+
);
|
|
2459
|
+
useCellEvent(
|
|
2460
|
+
s2Ref,
|
|
2461
|
+
emit,
|
|
2462
|
+
S2Event.DATA_CELL_MOUSE_DOWN,
|
|
2463
|
+
"dataCellMouseDown"
|
|
2464
|
+
);
|
|
2397
2465
|
useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_UP, "dataCellMouseUp");
|
|
2398
|
-
useCellEvent(
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2466
|
+
useCellEvent(
|
|
2467
|
+
s2Ref,
|
|
2468
|
+
emit,
|
|
2469
|
+
S2Event.DATA_CELL_MOUSE_MOVE,
|
|
2470
|
+
"dataCellMouseMove"
|
|
2471
|
+
);
|
|
2472
|
+
useS2Event(
|
|
2473
|
+
s2Ref,
|
|
2474
|
+
emit,
|
|
2475
|
+
S2Event.DATA_CELL_TREND_ICON_CLICK,
|
|
2476
|
+
"dataCellTrendIconClick"
|
|
2477
|
+
);
|
|
2478
|
+
useS2Event(
|
|
2479
|
+
s2Ref,
|
|
2480
|
+
emit,
|
|
2481
|
+
S2Event.DATA_CELL_BRUSH_SELECTION,
|
|
2482
|
+
"dataCellBrushSelection"
|
|
2483
|
+
);
|
|
2484
|
+
useS2Event(
|
|
2485
|
+
s2Ref,
|
|
2486
|
+
emit,
|
|
2487
|
+
S2Event.DATA_CELL_SELECT_MOVE,
|
|
2488
|
+
"dataCellSelectMove"
|
|
2489
|
+
);
|
|
2402
2490
|
useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_HOVER, "cornerCellHover");
|
|
2403
2491
|
useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_CLICK, "cornerCellClick");
|
|
2404
|
-
useCellEvent(
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2492
|
+
useCellEvent(
|
|
2493
|
+
s2Ref,
|
|
2494
|
+
emit,
|
|
2495
|
+
S2Event.CORNER_CELL_DOUBLE_CLICK,
|
|
2496
|
+
"cornerCellDoubleClick"
|
|
2497
|
+
);
|
|
2498
|
+
useCellEvent(
|
|
2499
|
+
s2Ref,
|
|
2500
|
+
emit,
|
|
2501
|
+
S2Event.CORNER_CELL_CONTEXT_MENU,
|
|
2502
|
+
"cornerCellContextMenu"
|
|
2503
|
+
);
|
|
2504
|
+
useCellEvent(
|
|
2505
|
+
s2Ref,
|
|
2506
|
+
emit,
|
|
2507
|
+
S2Event.CORNER_CELL_MOUSE_DOWN,
|
|
2508
|
+
"cornerCellMouseDown"
|
|
2509
|
+
);
|
|
2510
|
+
useCellEvent(
|
|
2511
|
+
s2Ref,
|
|
2512
|
+
emit,
|
|
2513
|
+
S2Event.CORNER_CELL_MOUSE_UP,
|
|
2514
|
+
"cornerCellMouseUp"
|
|
2515
|
+
);
|
|
2516
|
+
useCellEvent(
|
|
2517
|
+
s2Ref,
|
|
2518
|
+
emit,
|
|
2519
|
+
S2Event.CORNER_CELL_MOUSE_MOVE,
|
|
2520
|
+
"cornerCellMouseMove"
|
|
2521
|
+
);
|
|
2409
2522
|
useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_HOVER, "mergedCellsHover");
|
|
2410
2523
|
useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_CLICK, "mergedCellsClick");
|
|
2411
|
-
useCellEvent(
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2524
|
+
useCellEvent(
|
|
2525
|
+
s2Ref,
|
|
2526
|
+
emit,
|
|
2527
|
+
S2Event.MERGED_CELLS_DOUBLE_CLICK,
|
|
2528
|
+
"mergedCellsDoubleClick"
|
|
2529
|
+
);
|
|
2530
|
+
useCellEvent(
|
|
2531
|
+
s2Ref,
|
|
2532
|
+
emit,
|
|
2533
|
+
S2Event.MERGED_CELLS_CONTEXT_MENU,
|
|
2534
|
+
"mergedCellsContextMenu"
|
|
2535
|
+
);
|
|
2536
|
+
useCellEvent(
|
|
2537
|
+
s2Ref,
|
|
2538
|
+
emit,
|
|
2539
|
+
S2Event.MERGED_CELLS_MOUSE_DOWN,
|
|
2540
|
+
"mergedCellsMouseDown"
|
|
2541
|
+
);
|
|
2542
|
+
useCellEvent(
|
|
2543
|
+
s2Ref,
|
|
2544
|
+
emit,
|
|
2545
|
+
S2Event.MERGED_CELLS_MOUSE_UP,
|
|
2546
|
+
"mergedCellsMouseUp"
|
|
2547
|
+
);
|
|
2548
|
+
useCellEvent(
|
|
2549
|
+
s2Ref,
|
|
2550
|
+
emit,
|
|
2551
|
+
S2Event.MERGED_CELLS_MOUSE_MOVE,
|
|
2552
|
+
"mergedCellsMouseMove"
|
|
2553
|
+
);
|
|
2416
2554
|
useS2Event(s2Ref, emit, S2Event.RANGE_SORT, "rangeSort");
|
|
2417
2555
|
useS2Event(s2Ref, emit, S2Event.RANGE_SORTED, "rangeSorted");
|
|
2418
2556
|
useS2Event(s2Ref, emit, S2Event.RANGE_FILTER, "rangeFilter");
|
|
2419
2557
|
useS2Event(s2Ref, emit, S2Event.RANGE_FILTERED, "rangeFiltered");
|
|
2420
|
-
useS2Event(
|
|
2558
|
+
useS2Event(
|
|
2559
|
+
s2Ref,
|
|
2560
|
+
emit,
|
|
2561
|
+
S2Event.LAYOUT_AFTER_HEADER_LAYOUT,
|
|
2562
|
+
"layoutAfterHeaderLayout"
|
|
2563
|
+
);
|
|
2421
2564
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_PAGINATION, "layoutPagination");
|
|
2422
2565
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_CELL_SCROLL, "layoutCellScroll");
|
|
2423
|
-
useS2Event(
|
|
2424
|
-
|
|
2566
|
+
useS2Event(
|
|
2567
|
+
s2Ref,
|
|
2568
|
+
emit,
|
|
2569
|
+
S2Event.LAYOUT_AFTER_COLLAPSE_ROWS,
|
|
2570
|
+
"layoutAfterCollapseRows"
|
|
2571
|
+
);
|
|
2572
|
+
useS2Event(
|
|
2573
|
+
s2Ref,
|
|
2574
|
+
emit,
|
|
2575
|
+
S2Event.LAYOUT_TREE_ROWS_COLLAPSE_ALL,
|
|
2576
|
+
"collapseRowsAll"
|
|
2577
|
+
);
|
|
2425
2578
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_COLS_EXPANDED, "layoutColsExpanded");
|
|
2426
2579
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_COLS_HIDDEN, "layoutColsHidden");
|
|
2427
2580
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_BEFORE_RENDER, "beforeRender");
|
|
2428
2581
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_AFTER_RENDER, "afterRender");
|
|
2429
2582
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_DESTROY, "destroy");
|
|
2430
2583
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE, "layoutResize");
|
|
2431
|
-
useS2Event(
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
useS2Event(
|
|
2438
|
-
|
|
2439
|
-
|
|
2584
|
+
useS2Event(
|
|
2585
|
+
s2Ref,
|
|
2586
|
+
emit,
|
|
2587
|
+
S2Event.LAYOUT_RESIZE_SERIES_WIDTH,
|
|
2588
|
+
"layoutResizeSeriesWidth"
|
|
2589
|
+
);
|
|
2590
|
+
useS2Event(
|
|
2591
|
+
s2Ref,
|
|
2592
|
+
emit,
|
|
2593
|
+
S2Event.LAYOUT_RESIZE_ROW_WIDTH,
|
|
2594
|
+
"layoutResizeRowWidth"
|
|
2595
|
+
);
|
|
2596
|
+
useS2Event(
|
|
2597
|
+
s2Ref,
|
|
2598
|
+
emit,
|
|
2599
|
+
S2Event.LAYOUT_RESIZE_ROW_HEIGHT,
|
|
2600
|
+
"layoutResizeRowHeight"
|
|
2601
|
+
);
|
|
2602
|
+
useS2Event(
|
|
2603
|
+
s2Ref,
|
|
2604
|
+
emit,
|
|
2605
|
+
S2Event.LAYOUT_RESIZE_COL_WIDTH,
|
|
2606
|
+
"layoutResizeColWidth"
|
|
2607
|
+
);
|
|
2608
|
+
useS2Event(
|
|
2609
|
+
s2Ref,
|
|
2610
|
+
emit,
|
|
2611
|
+
S2Event.LAYOUT_RESIZE_COL_HEIGHT,
|
|
2612
|
+
"layoutResizeColHeight"
|
|
2613
|
+
);
|
|
2614
|
+
useS2Event(
|
|
2615
|
+
s2Ref,
|
|
2616
|
+
emit,
|
|
2617
|
+
S2Event.LAYOUT_RESIZE_TREE_WIDTH,
|
|
2618
|
+
"layoutResizeTreeWidth"
|
|
2619
|
+
);
|
|
2620
|
+
useS2Event(
|
|
2621
|
+
s2Ref,
|
|
2622
|
+
emit,
|
|
2623
|
+
S2Event.LAYOUT_RESIZE_MOUSE_DOWN,
|
|
2624
|
+
"layoutResizeMouseDown"
|
|
2625
|
+
);
|
|
2626
|
+
useS2Event(
|
|
2627
|
+
s2Ref,
|
|
2628
|
+
emit,
|
|
2629
|
+
S2Event.LAYOUT_RESIZE_MOUSE_UP,
|
|
2630
|
+
"layoutResizeMouseUp"
|
|
2631
|
+
);
|
|
2632
|
+
useS2Event(
|
|
2633
|
+
s2Ref,
|
|
2634
|
+
emit,
|
|
2635
|
+
S2Event.LAYOUT_RESIZE_MOUSE_MOVE,
|
|
2636
|
+
"layoutResizeMouseMove"
|
|
2637
|
+
);
|
|
2440
2638
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_KEYBOARD_DOWN, "keyBoardDown");
|
|
2441
2639
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_KEYBOARD_UP, "keyBoardUp");
|
|
2442
2640
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_COPIED, "copied");
|
|
2443
|
-
useS2Event(
|
|
2444
|
-
|
|
2641
|
+
useS2Event(
|
|
2642
|
+
s2Ref,
|
|
2643
|
+
emit,
|
|
2644
|
+
S2Event.GLOBAL_ACTION_ICON_HOVER,
|
|
2645
|
+
"actionIconHover"
|
|
2646
|
+
);
|
|
2647
|
+
useS2Event(
|
|
2648
|
+
s2Ref,
|
|
2649
|
+
emit,
|
|
2650
|
+
S2Event.GLOBAL_ACTION_ICON_CLICK,
|
|
2651
|
+
"actionIconClick"
|
|
2652
|
+
);
|
|
2445
2653
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_CONTEXT_MENU, "contextMenu");
|
|
2446
2654
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_HOVER, "mouseHover");
|
|
2447
2655
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_CLICK, "click");
|
|
@@ -2451,8 +2659,18 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2451
2659
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_RESET, "reset");
|
|
2452
2660
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
|
|
2453
2661
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_SCROLL, "scroll");
|
|
2454
|
-
useS2Event(
|
|
2455
|
-
|
|
2662
|
+
useS2Event(
|
|
2663
|
+
s2Ref,
|
|
2664
|
+
emit,
|
|
2665
|
+
S2Event.ROW_CELL_BRUSH_SELECTION,
|
|
2666
|
+
"rowCellBrushSelection"
|
|
2667
|
+
);
|
|
2668
|
+
useS2Event(
|
|
2669
|
+
s2Ref,
|
|
2670
|
+
emit,
|
|
2671
|
+
S2Event.COL_CELL_BRUSH_SELECTION,
|
|
2672
|
+
"colCellBrushSelection"
|
|
2673
|
+
);
|
|
2456
2674
|
});
|
|
2457
2675
|
};
|
|
2458
2676
|
const useLoading = (s2Ref, loadingProp = false) => {
|
|
@@ -2476,32 +2694,44 @@ const useSheetUpdate = (s2Ref, props) => {
|
|
|
2476
2694
|
reloadData: false,
|
|
2477
2695
|
rebuildDataset: false
|
|
2478
2696
|
});
|
|
2479
|
-
watch(
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2697
|
+
watch(
|
|
2698
|
+
() => props.options,
|
|
2699
|
+
(options, prevOptions) => {
|
|
2700
|
+
var _a, _b;
|
|
2701
|
+
updateFlag.rerender = true;
|
|
2702
|
+
if (!Object.is(prevOptions == null ? void 0 : prevOptions.hierarchyType, options == null ? void 0 : options.hierarchyType)) {
|
|
2703
|
+
updateFlag.reloadData = true;
|
|
2704
|
+
updateFlag.rebuildDataset = true;
|
|
2705
|
+
}
|
|
2706
|
+
(_a = s2Ref.value) == null ? void 0 : _a.setOptions(options);
|
|
2707
|
+
(_b = s2Ref.value) == null ? void 0 : _b.changeSheetSize(options == null ? void 0 : options.width, options == null ? void 0 : options.height);
|
|
2708
|
+
},
|
|
2709
|
+
{ deep: isProxy(props.options) }
|
|
2710
|
+
);
|
|
2711
|
+
watch(
|
|
2712
|
+
() => props.dataCfg,
|
|
2713
|
+
(dataCfg, prevDataCfg) => {
|
|
2714
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2715
|
+
if (((_b = (_a = prevDataCfg == null ? void 0 : prevDataCfg.fields) == null ? void 0 : _a.columns) == null ? void 0 : _b.length) !== ((_d = (_c = dataCfg == null ? void 0 : dataCfg.fields) == null ? void 0 : _c.columns) == null ? void 0 : _d.length)) {
|
|
2716
|
+
(_e = s2Ref.value) == null ? void 0 : _e.clearColumnLeafNodes();
|
|
2717
|
+
}
|
|
2718
|
+
updateFlag.rerender = true;
|
|
2483
2719
|
updateFlag.reloadData = true;
|
|
2484
|
-
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
var _a;
|
|
2500
|
-
updateFlag.rerender = true;
|
|
2501
|
-
(_a = s2Ref.value) == null ? void 0 : _a.setThemeCfg(themeCfg);
|
|
2502
|
-
}, {
|
|
2503
|
-
deep: isProxy(props.themeCfg)
|
|
2504
|
-
});
|
|
2720
|
+
(_f = s2Ref.value) == null ? void 0 : _f.setDataCfg(dataCfg);
|
|
2721
|
+
},
|
|
2722
|
+
{ deep: isProxy(props.dataCfg) }
|
|
2723
|
+
);
|
|
2724
|
+
watch(
|
|
2725
|
+
() => props.themeCfg,
|
|
2726
|
+
(themeCfg) => {
|
|
2727
|
+
var _a;
|
|
2728
|
+
updateFlag.rerender = true;
|
|
2729
|
+
(_a = s2Ref.value) == null ? void 0 : _a.setThemeCfg(themeCfg);
|
|
2730
|
+
},
|
|
2731
|
+
{
|
|
2732
|
+
deep: isProxy(props.themeCfg)
|
|
2733
|
+
}
|
|
2734
|
+
);
|
|
2505
2735
|
watch(updateFlag, (flag) => {
|
|
2506
2736
|
var _a;
|
|
2507
2737
|
if (!flag.rerender) {
|
|
@@ -2517,21 +2747,25 @@ const useSheetUpdate = (s2Ref, props) => {
|
|
|
2517
2747
|
};
|
|
2518
2748
|
const useResize = (s2Ref, props, dom) => {
|
|
2519
2749
|
const unobserve = ref();
|
|
2520
|
-
watch(
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
(
|
|
2533
|
-
|
|
2534
|
-
|
|
2750
|
+
watch(
|
|
2751
|
+
[s2Ref, () => props.adaptive],
|
|
2752
|
+
([s2, adaptive], _, onCleanup) => {
|
|
2753
|
+
if (!s2) {
|
|
2754
|
+
return;
|
|
2755
|
+
}
|
|
2756
|
+
unobserve.value = createResizeObserver({
|
|
2757
|
+
s2,
|
|
2758
|
+
adaptive,
|
|
2759
|
+
wrapper: dom.wrapperRef.value,
|
|
2760
|
+
container: dom.containerRef.value
|
|
2761
|
+
});
|
|
2762
|
+
onCleanup(() => {
|
|
2763
|
+
var _a;
|
|
2764
|
+
(_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
|
|
2765
|
+
});
|
|
2766
|
+
},
|
|
2767
|
+
{ deep: true }
|
|
2768
|
+
);
|
|
2535
2769
|
};
|
|
2536
2770
|
function useSpreadSheet(props, emit) {
|
|
2537
2771
|
const {
|
|
@@ -2730,7 +2964,6 @@ const initBaseSheetEmits = () => {
|
|
|
2730
2964
|
];
|
|
2731
2965
|
return keys2;
|
|
2732
2966
|
};
|
|
2733
|
-
var baseSheet_vue_vue_type_style_index_0_lang = "";
|
|
2734
2967
|
const _sfc_main$4 = defineComponent({
|
|
2735
2968
|
name: "BaseSheet",
|
|
2736
2969
|
props: initBaseSheetProps(),
|
|
@@ -2772,6 +3005,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
2772
3005
|
S2Pagination
|
|
2773
3006
|
}
|
|
2774
3007
|
});
|
|
3008
|
+
const baseSheet_vue_vue_type_style_index_0_lang = "";
|
|
2775
3009
|
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2776
3010
|
const _component_S2Pagination = resolveComponent("S2Pagination");
|
|
2777
3011
|
const _component_Spin = resolveComponent("Spin");
|
|
@@ -2801,7 +3035,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2801
3035
|
_: 1
|
|
2802
3036
|
}, 8, ["wrapperClassName", "spinning"]);
|
|
2803
3037
|
}
|
|
2804
|
-
|
|
3038
|
+
const BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
2805
3039
|
const _hoisted_1$2 = {
|
|
2806
3040
|
class: "antv-s2-icon",
|
|
2807
3041
|
viewBox: "0 0 1024 1024",
|
|
@@ -2819,7 +3053,7 @@ const _hoisted_3$2 = [
|
|
|
2819
3053
|
function render$2(_ctx, _cache) {
|
|
2820
3054
|
return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
|
|
2821
3055
|
}
|
|
2822
|
-
|
|
3056
|
+
const LocationIcon = { render: render$2 };
|
|
2823
3057
|
const _hoisted_1$1 = {
|
|
2824
3058
|
class: "antv-s2-icon",
|
|
2825
3059
|
viewBox: "0 0 1024 1024",
|
|
@@ -2837,7 +3071,7 @@ const _hoisted_3$1 = [
|
|
|
2837
3071
|
function render$1(_ctx, _cache) {
|
|
2838
3072
|
return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
|
|
2839
3073
|
}
|
|
2840
|
-
|
|
3074
|
+
const TextIcon = { render: render$1 };
|
|
2841
3075
|
const _hoisted_1 = {
|
|
2842
3076
|
class: "antv-s2-icon",
|
|
2843
3077
|
viewBox: "0 0 1024 1024",
|
|
@@ -2855,8 +3089,7 @@ const _hoisted_3 = [
|
|
|
2855
3089
|
function render(_ctx, _cache) {
|
|
2856
3090
|
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
|
|
2857
3091
|
}
|
|
2858
|
-
|
|
2859
|
-
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
3092
|
+
const CalendarIcon = { render };
|
|
2860
3093
|
const _sfc_main$3 = defineComponent({
|
|
2861
3094
|
name: "DrillDown",
|
|
2862
3095
|
props: initDrillDownProps(),
|
|
@@ -2930,6 +3163,7 @@ const _sfc_main$3 = defineComponent({
|
|
|
2930
3163
|
};
|
|
2931
3164
|
}
|
|
2932
3165
|
});
|
|
3166
|
+
const index_vue_vue_type_style_index_0_scoped_1a60f775_lang = "";
|
|
2933
3167
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2934
3168
|
const _component_Button = resolveComponent("Button");
|
|
2935
3169
|
const _component_Input = resolveComponent("Input");
|
|
@@ -2997,7 +3231,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2997
3231
|
}, 8, ["selectedKeys", "onSelect"])
|
|
2998
3232
|
], 2);
|
|
2999
3233
|
}
|
|
3000
|
-
|
|
3234
|
+
const DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-1a60f775"]]);
|
|
3001
3235
|
const _sfc_main$2 = defineComponent({
|
|
3002
3236
|
name: "PivotSheet",
|
|
3003
3237
|
props: initBaseSheetProps(),
|
|
@@ -3029,11 +3263,12 @@ const _sfc_main$2 = defineComponent({
|
|
|
3029
3263
|
const { event, disabledFields } = params;
|
|
3030
3264
|
if (event) {
|
|
3031
3265
|
const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
|
|
3032
|
-
const drillDownNode = createVNode(DrillDown,
|
|
3266
|
+
const drillDownNode = createVNode(DrillDown, {
|
|
3267
|
+
...(_b = partDrillDown.value) == null ? void 0 : _b.drillConfig,
|
|
3033
3268
|
setDrillFields,
|
|
3034
3269
|
drillFields: drillFields.value,
|
|
3035
3270
|
disabledFields
|
|
3036
|
-
})
|
|
3271
|
+
});
|
|
3037
3272
|
instance == null ? void 0 : instance.showTooltip({
|
|
3038
3273
|
position: {
|
|
3039
3274
|
x: event.clientX,
|
|
@@ -3044,7 +3279,13 @@ const _sfc_main$2 = defineComponent({
|
|
|
3044
3279
|
});
|
|
3045
3280
|
}
|
|
3046
3281
|
};
|
|
3047
|
-
const options = computed(
|
|
3282
|
+
const options = computed(
|
|
3283
|
+
() => buildDrillDownOptions(
|
|
3284
|
+
pivotOptions.value,
|
|
3285
|
+
partDrillDown.value,
|
|
3286
|
+
(params) => onDrillDownIconClick(params)
|
|
3287
|
+
)
|
|
3288
|
+
);
|
|
3048
3289
|
return {
|
|
3049
3290
|
s2Ref,
|
|
3050
3291
|
options
|
|
@@ -3061,7 +3302,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3061
3302
|
options: _ctx.options
|
|
3062
3303
|
}), null, 16, ["options"]);
|
|
3063
3304
|
}
|
|
3064
|
-
|
|
3305
|
+
const PivotSheet = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
3065
3306
|
const _sfc_main$1 = defineComponent({
|
|
3066
3307
|
name: "TableSheet",
|
|
3067
3308
|
props: [],
|
|
@@ -3078,7 +3319,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3078
3319
|
const _component_BaseSheet = resolveComponent("BaseSheet");
|
|
3079
3320
|
return openBlock(), createBlock(_component_BaseSheet, { ref: "s2Ref" }, null, 512);
|
|
3080
3321
|
}
|
|
3081
|
-
|
|
3322
|
+
const TableSheet = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
3082
3323
|
const _sfc_main = defineComponent({
|
|
3083
3324
|
name: "Sheet",
|
|
3084
3325
|
props: [],
|
|
@@ -3104,6 +3345,13 @@ const _sfc_main = defineComponent({
|
|
|
3104
3345
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3105
3346
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.sheetType), { ref: "s2Ref" }, null, 512);
|
|
3106
3347
|
}
|
|
3107
|
-
|
|
3108
|
-
export {
|
|
3348
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
3349
|
+
export {
|
|
3350
|
+
BaseSheet,
|
|
3351
|
+
CustomTooltip,
|
|
3352
|
+
PivotSheet,
|
|
3353
|
+
index as SheetComponent,
|
|
3354
|
+
TableSheet,
|
|
3355
|
+
useExpose
|
|
3356
|
+
};
|
|
3109
3357
|
//# sourceMappingURL=index.js.map
|