@antv/s2-vue 1.0.0 → 1.1.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/README.md +26 -55
- 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 +4366 -4
- package/esm/index.js +824 -150
- package/esm/index.js.map +1 -1
- package/esm/style.css +123 -21
- package/lib/index.js +821 -147
- package/lib/index.js.map +1 -1
- package/lib/style.css +123 -21
- package/package.json +11 -8
- package/esm/common/constant/index.d.ts +0 -3
- package/esm/common/constant/index.d.ts.map +0 -1
- package/esm/common/constant/options.d.ts +0 -3
- package/esm/common/constant/options.d.ts.map +0 -1
- package/esm/common/constant/sort.d.ts +0 -15
- package/esm/common/constant/sort.d.ts.map +0 -1
- package/esm/components/index.d.ts +0 -5
- package/esm/components/index.d.ts.map +0 -1
- package/esm/components/pagination/index.vue.d.ts +0 -43
- package/esm/components/pagination/index.vue.d.ts.map +0 -1
- package/esm/components/sheets/base-sheet.vue.d.ts +0 -287
- package/esm/components/sheets/base-sheet.vue.d.ts.map +0 -1
- package/esm/components/sheets/index.vue.d.ts +0 -432
- package/esm/components/sheets/index.vue.d.ts.map +0 -1
- package/esm/components/sheets/pivot-sheet.vue.d.ts +0 -217
- package/esm/components/sheets/pivot-sheet.vue.d.ts.map +0 -1
- package/esm/components/sheets/table-sheet.vue.d.ts +0 -217
- package/esm/components/sheets/table-sheet.vue.d.ts.map +0 -1
- package/esm/components/tooltip/components/detail.vue.d.ts +0 -7
- package/esm/components/tooltip/components/detail.vue.d.ts.map +0 -1
- package/esm/components/tooltip/components/head-info.vue.d.ts +0 -7
- package/esm/components/tooltip/components/head-info.vue.d.ts.map +0 -1
- package/esm/components/tooltip/components/infos.vue.d.ts +0 -7
- package/esm/components/tooltip/components/infos.vue.d.ts.map +0 -1
- package/esm/components/tooltip/components/operator/index.d.ts +0 -4
- package/esm/components/tooltip/components/operator/index.d.ts.map +0 -1
- package/esm/components/tooltip/components/operator/index.vue.d.ts +0 -11
- package/esm/components/tooltip/components/operator/index.vue.d.ts.map +0 -1
- package/esm/components/tooltip/components/operator/menu.vue.d.ts +0 -12
- package/esm/components/tooltip/components/operator/menu.vue.d.ts.map +0 -1
- package/esm/components/tooltip/components/operator/title.vue.d.ts +0 -11
- package/esm/components/tooltip/components/operator/title.vue.d.ts.map +0 -1
- package/esm/components/tooltip/components/simple-tips.vue.d.ts +0 -7
- package/esm/components/tooltip/components/simple-tips.vue.d.ts.map +0 -1
- package/esm/components/tooltip/components/summary.vue.d.ts +0 -9
- package/esm/components/tooltip/components/summary.vue.d.ts.map +0 -1
- package/esm/components/tooltip/custom-tooltip.d.ts +0 -7
- package/esm/components/tooltip/custom-tooltip.d.ts.map +0 -1
- package/esm/components/tooltip/index.vue.d.ts +0 -8
- package/esm/components/tooltip/index.vue.d.ts.map +0 -1
- package/esm/components/tooltip/interface.d.ts +0 -9
- package/esm/components/tooltip/interface.d.ts.map +0 -1
- package/esm/hooks/useEvents.d.ts +0 -5
- package/esm/hooks/useEvents.d.ts.map +0 -1
- package/esm/hooks/useExpose.d.ts +0 -6
- package/esm/hooks/useExpose.d.ts.map +0 -1
- package/esm/hooks/useLoading.d.ts +0 -7
- package/esm/hooks/useLoading.d.ts.map +0 -1
- package/esm/hooks/usePagination.d.ts +0 -14
- package/esm/hooks/usePagination.d.ts.map +0 -1
- package/esm/hooks/useResize.d.ts +0 -8
- package/esm/hooks/useResize.d.ts.map +0 -1
- package/esm/hooks/useSheetUpdate.d.ts +0 -5
- package/esm/hooks/useSheetUpdate.d.ts.map +0 -1
- package/esm/hooks/useSpreadSheet.d.ts +0 -19
- package/esm/hooks/useSpreadSheet.d.ts.map +0 -1
- package/esm/index.d.ts.map +0 -1
- package/esm/interface.d.ts +0 -36
- package/esm/interface.d.ts.map +0 -1
- package/esm/utils/extendLocale.d.ts +0 -2
- package/esm/utils/extendLocale.d.ts.map +0 -1
- package/esm/utils/initPropAndEmits.d.ts +0 -137
- package/esm/utils/initPropAndEmits.d.ts.map +0 -1
- package/esm/utils/options.d.ts +0 -3
- package/esm/utils/options.d.ts.map +0 -1
- package/esm/utils/traverse.d.ts +0 -2
- package/esm/utils/traverse.d.ts.map +0 -1
package/esm/index.js
CHANGED
|
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { customMerge, DEFAULT_OPTIONS,
|
|
21
|
-
import { shallowRef, ref, computed, watch, defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, createTextVNode, createBlock, withCtx, render, onMounted, reactive, isProxy, onBeforeUnmount, toRaw, resolveDynamicComponent } from "vue";
|
|
22
|
-
import { Pagination, Menu, Dropdown, Spin } from "ant-design-vue";
|
|
20
|
+
import { customMerge, DEFAULT_OPTIONS, S2Event, i18n, extendLocale, S2_PREFIX_CLS, TOOLTIP_PREFIX_CLS, getIcon, getTooltipDefaultOptions, BaseTooltip, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
|
|
21
|
+
import { shallowRef, ref, computed, watch, defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, createTextVNode, createBlock, withCtx, renderSlot, render as render$3, onMounted, reactive, isProxy, onBeforeUnmount, toRaw, toRefs, mergeProps, resolveDynamicComponent } from "vue";
|
|
22
|
+
import { Pagination, Menu, Dropdown, Spin, Button, Input, Empty, MenuItem } from "ant-design-vue";
|
|
23
23
|
const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
24
24
|
tooltip: {
|
|
25
25
|
showTooltip: true,
|
|
@@ -40,12 +40,12 @@ var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
|
40
40
|
var root$1 = root;
|
|
41
41
|
var Symbol$1 = root$1.Symbol;
|
|
42
42
|
var Symbol$2 = Symbol$1;
|
|
43
|
-
var objectProto$
|
|
44
|
-
var hasOwnProperty$
|
|
45
|
-
var nativeObjectToString$1 = objectProto$
|
|
43
|
+
var objectProto$f = Object.prototype;
|
|
44
|
+
var hasOwnProperty$c = objectProto$f.hasOwnProperty;
|
|
45
|
+
var nativeObjectToString$1 = objectProto$f.toString;
|
|
46
46
|
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
47
47
|
function getRawTag(value) {
|
|
48
|
-
var isOwn = hasOwnProperty$
|
|
48
|
+
var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
49
49
|
try {
|
|
50
50
|
value[symToStringTag$1] = void 0;
|
|
51
51
|
var unmasked = true;
|
|
@@ -61,8 +61,8 @@ function getRawTag(value) {
|
|
|
61
61
|
}
|
|
62
62
|
return result;
|
|
63
63
|
}
|
|
64
|
-
var objectProto$
|
|
65
|
-
var nativeObjectToString = objectProto$
|
|
64
|
+
var objectProto$e = Object.prototype;
|
|
65
|
+
var nativeObjectToString = objectProto$e.toString;
|
|
66
66
|
function objectToString(value) {
|
|
67
67
|
return nativeObjectToString.call(value);
|
|
68
68
|
}
|
|
@@ -77,9 +77,9 @@ function baseGetTag(value) {
|
|
|
77
77
|
function isObjectLike(value) {
|
|
78
78
|
return value != null && typeof value == "object";
|
|
79
79
|
}
|
|
80
|
-
var symbolTag$
|
|
80
|
+
var symbolTag$3 = "[object Symbol]";
|
|
81
81
|
function isSymbol(value) {
|
|
82
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$
|
|
82
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
|
|
83
83
|
}
|
|
84
84
|
function arrayMap(array, iteratee) {
|
|
85
85
|
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
@@ -91,7 +91,7 @@ function arrayMap(array, iteratee) {
|
|
|
91
91
|
var isArray = Array.isArray;
|
|
92
92
|
var isArray$1 = isArray;
|
|
93
93
|
var INFINITY$1 = 1 / 0;
|
|
94
|
-
var symbolProto$
|
|
94
|
+
var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
|
|
95
95
|
function baseToString(value) {
|
|
96
96
|
if (typeof value == "string") {
|
|
97
97
|
return value;
|
|
@@ -146,13 +146,13 @@ function toNumber(value) {
|
|
|
146
146
|
function identity(value) {
|
|
147
147
|
return value;
|
|
148
148
|
}
|
|
149
|
-
var asyncTag = "[object AsyncFunction]", funcTag$
|
|
149
|
+
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
150
150
|
function isFunction(value) {
|
|
151
151
|
if (!isObject(value)) {
|
|
152
152
|
return false;
|
|
153
153
|
}
|
|
154
154
|
var tag = baseGetTag(value);
|
|
155
|
-
return tag == funcTag$
|
|
155
|
+
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
156
156
|
}
|
|
157
157
|
var coreJsData = root$1["__core-js_shared__"];
|
|
158
158
|
var coreJsData$1 = coreJsData;
|
|
@@ -180,10 +180,10 @@ function toSource(func) {
|
|
|
180
180
|
}
|
|
181
181
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
182
182
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
183
|
-
var funcProto = Function.prototype, objectProto$
|
|
183
|
+
var funcProto = Function.prototype, objectProto$d = Object.prototype;
|
|
184
184
|
var funcToString = funcProto.toString;
|
|
185
|
-
var hasOwnProperty$
|
|
186
|
-
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$
|
|
185
|
+
var hasOwnProperty$b = objectProto$d.hasOwnProperty;
|
|
186
|
+
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
187
187
|
function baseIsNative(value) {
|
|
188
188
|
if (!isObject(value) || isMasked(value)) {
|
|
189
189
|
return false;
|
|
@@ -200,6 +200,50 @@ function getNative(object, key) {
|
|
|
200
200
|
}
|
|
201
201
|
var WeakMap = getNative(root$1, "WeakMap");
|
|
202
202
|
var WeakMap$1 = WeakMap;
|
|
203
|
+
var objectCreate = Object.create;
|
|
204
|
+
var baseCreate = function() {
|
|
205
|
+
function object() {
|
|
206
|
+
}
|
|
207
|
+
return function(proto) {
|
|
208
|
+
if (!isObject(proto)) {
|
|
209
|
+
return {};
|
|
210
|
+
}
|
|
211
|
+
if (objectCreate) {
|
|
212
|
+
return objectCreate(proto);
|
|
213
|
+
}
|
|
214
|
+
object.prototype = proto;
|
|
215
|
+
var result = new object();
|
|
216
|
+
object.prototype = void 0;
|
|
217
|
+
return result;
|
|
218
|
+
};
|
|
219
|
+
}();
|
|
220
|
+
var baseCreate$1 = baseCreate;
|
|
221
|
+
function copyArray(source, array) {
|
|
222
|
+
var index2 = -1, length = source.length;
|
|
223
|
+
array || (array = Array(length));
|
|
224
|
+
while (++index2 < length) {
|
|
225
|
+
array[index2] = source[index2];
|
|
226
|
+
}
|
|
227
|
+
return array;
|
|
228
|
+
}
|
|
229
|
+
var defineProperty = function() {
|
|
230
|
+
try {
|
|
231
|
+
var func = getNative(Object, "defineProperty");
|
|
232
|
+
func({}, "", {});
|
|
233
|
+
return func;
|
|
234
|
+
} catch (e) {
|
|
235
|
+
}
|
|
236
|
+
}();
|
|
237
|
+
var defineProperty$1 = defineProperty;
|
|
238
|
+
function arrayEach(array, iteratee) {
|
|
239
|
+
var index2 = -1, length = array == null ? 0 : array.length;
|
|
240
|
+
while (++index2 < length) {
|
|
241
|
+
if (iteratee(array[index2], index2, array) === false) {
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return array;
|
|
246
|
+
}
|
|
203
247
|
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
204
248
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
205
249
|
function isIndex(value, length) {
|
|
@@ -207,9 +251,47 @@ function isIndex(value, length) {
|
|
|
207
251
|
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
208
252
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
209
253
|
}
|
|
254
|
+
function baseAssignValue(object, key, value) {
|
|
255
|
+
if (key == "__proto__" && defineProperty$1) {
|
|
256
|
+
defineProperty$1(object, key, {
|
|
257
|
+
"configurable": true,
|
|
258
|
+
"enumerable": true,
|
|
259
|
+
"value": value,
|
|
260
|
+
"writable": true
|
|
261
|
+
});
|
|
262
|
+
} else {
|
|
263
|
+
object[key] = value;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
210
266
|
function eq(value, other) {
|
|
211
267
|
return value === other || value !== value && other !== other;
|
|
212
268
|
}
|
|
269
|
+
var objectProto$c = Object.prototype;
|
|
270
|
+
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
271
|
+
function assignValue(object, key, value) {
|
|
272
|
+
var objValue = object[key];
|
|
273
|
+
if (!(hasOwnProperty$a.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
274
|
+
baseAssignValue(object, key, value);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function copyObject(source, props, object, customizer) {
|
|
278
|
+
var isNew = !object;
|
|
279
|
+
object || (object = {});
|
|
280
|
+
var index2 = -1, length = props.length;
|
|
281
|
+
while (++index2 < length) {
|
|
282
|
+
var key = props[index2];
|
|
283
|
+
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
|
|
284
|
+
if (newValue === void 0) {
|
|
285
|
+
newValue = source[key];
|
|
286
|
+
}
|
|
287
|
+
if (isNew) {
|
|
288
|
+
baseAssignValue(object, key, newValue);
|
|
289
|
+
} else {
|
|
290
|
+
assignValue(object, key, newValue);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return object;
|
|
294
|
+
}
|
|
213
295
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
214
296
|
function isLength(value) {
|
|
215
297
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
@@ -217,9 +299,9 @@ function isLength(value) {
|
|
|
217
299
|
function isArrayLike(value) {
|
|
218
300
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
219
301
|
}
|
|
220
|
-
var objectProto$
|
|
302
|
+
var objectProto$b = Object.prototype;
|
|
221
303
|
function isPrototype(value) {
|
|
222
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$
|
|
304
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$b;
|
|
223
305
|
return value === proto;
|
|
224
306
|
}
|
|
225
307
|
function baseTimes(n, iteratee) {
|
|
@@ -229,34 +311,34 @@ function baseTimes(n, iteratee) {
|
|
|
229
311
|
}
|
|
230
312
|
return result;
|
|
231
313
|
}
|
|
232
|
-
var argsTag$
|
|
314
|
+
var argsTag$3 = "[object Arguments]";
|
|
233
315
|
function baseIsArguments(value) {
|
|
234
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag$
|
|
316
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$3;
|
|
235
317
|
}
|
|
236
|
-
var objectProto$
|
|
237
|
-
var hasOwnProperty$
|
|
238
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
318
|
+
var objectProto$a = Object.prototype;
|
|
319
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
320
|
+
var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
|
|
239
321
|
var isArguments = baseIsArguments(function() {
|
|
240
322
|
return arguments;
|
|
241
323
|
}()) ? baseIsArguments : function(value) {
|
|
242
|
-
return isObjectLike(value) && hasOwnProperty$
|
|
324
|
+
return isObjectLike(value) && hasOwnProperty$9.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
243
325
|
};
|
|
244
326
|
var isArguments$1 = isArguments;
|
|
245
327
|
function stubFalse() {
|
|
246
328
|
return false;
|
|
247
329
|
}
|
|
248
|
-
var freeExports$
|
|
249
|
-
var freeModule$
|
|
250
|
-
var moduleExports$
|
|
251
|
-
var
|
|
252
|
-
var nativeIsBuffer =
|
|
330
|
+
var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
331
|
+
var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
|
|
332
|
+
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
333
|
+
var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0;
|
|
334
|
+
var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
|
|
253
335
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
254
336
|
var isBuffer$1 = isBuffer;
|
|
255
|
-
var argsTag$
|
|
256
|
-
var arrayBufferTag$
|
|
337
|
+
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]";
|
|
338
|
+
var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
|
|
257
339
|
var typedArrayTags = {};
|
|
258
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
259
|
-
typedArrayTags[argsTag$
|
|
340
|
+
typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
|
|
341
|
+
typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$4] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$7] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$7] = typedArrayTags[stringTag$4] = typedArrayTags[weakMapTag$2] = false;
|
|
260
342
|
function baseIsTypedArray(value) {
|
|
261
343
|
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
262
344
|
}
|
|
@@ -265,13 +347,13 @@ function baseUnary(func) {
|
|
|
265
347
|
return func(value);
|
|
266
348
|
};
|
|
267
349
|
}
|
|
268
|
-
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
269
|
-
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
270
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
271
|
-
var freeProcess = moduleExports && freeGlobal$1.process;
|
|
350
|
+
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
351
|
+
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
352
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
353
|
+
var freeProcess = moduleExports$1 && freeGlobal$1.process;
|
|
272
354
|
var nodeUtil = function() {
|
|
273
355
|
try {
|
|
274
|
-
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
356
|
+
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
|
|
275
357
|
if (types) {
|
|
276
358
|
return types;
|
|
277
359
|
}
|
|
@@ -283,12 +365,12 @@ var nodeUtil$1 = nodeUtil;
|
|
|
283
365
|
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
284
366
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
285
367
|
var isTypedArray$1 = isTypedArray;
|
|
286
|
-
var objectProto$
|
|
287
|
-
var hasOwnProperty$
|
|
368
|
+
var objectProto$9 = Object.prototype;
|
|
369
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
288
370
|
function arrayLikeKeys(value, inherited) {
|
|
289
371
|
var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
290
372
|
for (var key in value) {
|
|
291
|
-
if ((inherited || hasOwnProperty$
|
|
373
|
+
if ((inherited || hasOwnProperty$8.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
|
|
292
374
|
result.push(key);
|
|
293
375
|
}
|
|
294
376
|
}
|
|
@@ -301,15 +383,15 @@ function overArg(func, transform) {
|
|
|
301
383
|
}
|
|
302
384
|
var nativeKeys = overArg(Object.keys, Object);
|
|
303
385
|
var nativeKeys$1 = nativeKeys;
|
|
304
|
-
var objectProto$
|
|
305
|
-
var hasOwnProperty$
|
|
386
|
+
var objectProto$8 = Object.prototype;
|
|
387
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
306
388
|
function baseKeys(object) {
|
|
307
389
|
if (!isPrototype(object)) {
|
|
308
390
|
return nativeKeys$1(object);
|
|
309
391
|
}
|
|
310
392
|
var result = [];
|
|
311
393
|
for (var key in Object(object)) {
|
|
312
|
-
if (hasOwnProperty$
|
|
394
|
+
if (hasOwnProperty$7.call(object, key) && key != "constructor") {
|
|
313
395
|
result.push(key);
|
|
314
396
|
}
|
|
315
397
|
}
|
|
@@ -318,6 +400,32 @@ function baseKeys(object) {
|
|
|
318
400
|
function keys(object) {
|
|
319
401
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
320
402
|
}
|
|
403
|
+
function nativeKeysIn(object) {
|
|
404
|
+
var result = [];
|
|
405
|
+
if (object != null) {
|
|
406
|
+
for (var key in Object(object)) {
|
|
407
|
+
result.push(key);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return result;
|
|
411
|
+
}
|
|
412
|
+
var objectProto$7 = Object.prototype;
|
|
413
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
414
|
+
function baseKeysIn(object) {
|
|
415
|
+
if (!isObject(object)) {
|
|
416
|
+
return nativeKeysIn(object);
|
|
417
|
+
}
|
|
418
|
+
var isProto = isPrototype(object), result = [];
|
|
419
|
+
for (var key in object) {
|
|
420
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty$6.call(object, key)))) {
|
|
421
|
+
result.push(key);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return result;
|
|
425
|
+
}
|
|
426
|
+
function keysIn(object) {
|
|
427
|
+
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
428
|
+
}
|
|
321
429
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
322
430
|
function isKey(value, object) {
|
|
323
431
|
if (isArray$1(value)) {
|
|
@@ -341,21 +449,21 @@ function hashDelete(key) {
|
|
|
341
449
|
return result;
|
|
342
450
|
}
|
|
343
451
|
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
344
|
-
var objectProto$
|
|
345
|
-
var hasOwnProperty$
|
|
452
|
+
var objectProto$6 = Object.prototype;
|
|
453
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
346
454
|
function hashGet(key) {
|
|
347
455
|
var data = this.__data__;
|
|
348
456
|
if (nativeCreate$1) {
|
|
349
457
|
var result = data[key];
|
|
350
458
|
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
351
459
|
}
|
|
352
|
-
return hasOwnProperty$
|
|
460
|
+
return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
|
|
353
461
|
}
|
|
354
|
-
var objectProto$
|
|
355
|
-
var hasOwnProperty$
|
|
462
|
+
var objectProto$5 = Object.prototype;
|
|
463
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
356
464
|
function hashHas(key) {
|
|
357
465
|
var data = this.__data__;
|
|
358
|
-
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$
|
|
466
|
+
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
|
|
359
467
|
}
|
|
360
468
|
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
361
469
|
function hashSet(key, value) {
|
|
@@ -562,6 +670,8 @@ function arrayPush(array, values) {
|
|
|
562
670
|
}
|
|
563
671
|
return array;
|
|
564
672
|
}
|
|
673
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
674
|
+
var getPrototype$1 = getPrototype;
|
|
565
675
|
var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
|
|
566
676
|
var rsZWJ$1 = "\\u200d";
|
|
567
677
|
var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
|
|
@@ -618,6 +728,24 @@ Stack.prototype["delete"] = stackDelete;
|
|
|
618
728
|
Stack.prototype.get = stackGet;
|
|
619
729
|
Stack.prototype.has = stackHas;
|
|
620
730
|
Stack.prototype.set = stackSet;
|
|
731
|
+
function baseAssign(object, source) {
|
|
732
|
+
return object && copyObject(source, keys(source), object);
|
|
733
|
+
}
|
|
734
|
+
function baseAssignIn(object, source) {
|
|
735
|
+
return object && copyObject(source, keysIn(source), object);
|
|
736
|
+
}
|
|
737
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
738
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
739
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
740
|
+
var Buffer2 = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
|
|
741
|
+
function cloneBuffer(buffer, isDeep) {
|
|
742
|
+
if (isDeep) {
|
|
743
|
+
return buffer.slice();
|
|
744
|
+
}
|
|
745
|
+
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
746
|
+
buffer.copy(result);
|
|
747
|
+
return result;
|
|
748
|
+
}
|
|
621
749
|
function arrayFilter(array, predicate) {
|
|
622
750
|
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
623
751
|
while (++index2 < length) {
|
|
@@ -631,19 +759,35 @@ function arrayFilter(array, predicate) {
|
|
|
631
759
|
function stubArray() {
|
|
632
760
|
return [];
|
|
633
761
|
}
|
|
634
|
-
var objectProto$
|
|
635
|
-
var propertyIsEnumerable = objectProto$
|
|
636
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
637
|
-
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
762
|
+
var objectProto$4 = Object.prototype;
|
|
763
|
+
var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
|
|
764
|
+
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
765
|
+
var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
|
|
638
766
|
if (object == null) {
|
|
639
767
|
return [];
|
|
640
768
|
}
|
|
641
769
|
object = Object(object);
|
|
642
|
-
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
770
|
+
return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
|
|
643
771
|
return propertyIsEnumerable.call(object, symbol);
|
|
644
772
|
});
|
|
645
773
|
};
|
|
646
774
|
var getSymbols$1 = getSymbols;
|
|
775
|
+
function copySymbols(source, object) {
|
|
776
|
+
return copyObject(source, getSymbols$1(source), object);
|
|
777
|
+
}
|
|
778
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
779
|
+
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
780
|
+
var result = [];
|
|
781
|
+
while (object) {
|
|
782
|
+
arrayPush(result, getSymbols$1(object));
|
|
783
|
+
object = getPrototype$1(object);
|
|
784
|
+
}
|
|
785
|
+
return result;
|
|
786
|
+
};
|
|
787
|
+
var getSymbolsIn$1 = getSymbolsIn;
|
|
788
|
+
function copySymbolsIn(source, object) {
|
|
789
|
+
return copyObject(source, getSymbolsIn$1(source), object);
|
|
790
|
+
}
|
|
647
791
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
648
792
|
var result = keysFunc(object);
|
|
649
793
|
return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
@@ -651,39 +795,197 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
|
651
795
|
function getAllKeys(object) {
|
|
652
796
|
return baseGetAllKeys(object, keys, getSymbols$1);
|
|
653
797
|
}
|
|
798
|
+
function getAllKeysIn(object) {
|
|
799
|
+
return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
|
|
800
|
+
}
|
|
654
801
|
var DataView = getNative(root$1, "DataView");
|
|
655
802
|
var DataView$1 = DataView;
|
|
656
803
|
var Promise$1 = getNative(root$1, "Promise");
|
|
657
804
|
var Promise$2 = Promise$1;
|
|
658
805
|
var Set = getNative(root$1, "Set");
|
|
659
806
|
var Set$1 = Set;
|
|
660
|
-
var mapTag$
|
|
661
|
-
var dataViewTag$
|
|
807
|
+
var mapTag$6 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$6 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
808
|
+
var dataViewTag$3 = "[object DataView]";
|
|
662
809
|
var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
|
|
663
810
|
var getTag = baseGetTag;
|
|
664
|
-
if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$
|
|
811
|
+
if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$6 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$6 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) {
|
|
665
812
|
getTag = function(value) {
|
|
666
|
-
var result = baseGetTag(value), Ctor = result == objectTag$
|
|
813
|
+
var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
667
814
|
if (ctorString) {
|
|
668
815
|
switch (ctorString) {
|
|
669
816
|
case dataViewCtorString:
|
|
670
|
-
return dataViewTag$
|
|
817
|
+
return dataViewTag$3;
|
|
671
818
|
case mapCtorString:
|
|
672
|
-
return mapTag$
|
|
819
|
+
return mapTag$6;
|
|
673
820
|
case promiseCtorString:
|
|
674
821
|
return promiseTag;
|
|
675
822
|
case setCtorString:
|
|
676
|
-
return setTag$
|
|
823
|
+
return setTag$6;
|
|
677
824
|
case weakMapCtorString:
|
|
678
|
-
return weakMapTag;
|
|
825
|
+
return weakMapTag$1;
|
|
679
826
|
}
|
|
680
827
|
}
|
|
681
828
|
return result;
|
|
682
829
|
};
|
|
683
830
|
}
|
|
684
831
|
var getTag$1 = getTag;
|
|
832
|
+
var objectProto$3 = Object.prototype;
|
|
833
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
834
|
+
function initCloneArray(array) {
|
|
835
|
+
var length = array.length, result = new array.constructor(length);
|
|
836
|
+
if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
|
|
837
|
+
result.index = array.index;
|
|
838
|
+
result.input = array.input;
|
|
839
|
+
}
|
|
840
|
+
return result;
|
|
841
|
+
}
|
|
685
842
|
var Uint8Array2 = root$1.Uint8Array;
|
|
686
843
|
var Uint8Array$1 = Uint8Array2;
|
|
844
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
845
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
846
|
+
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
847
|
+
return result;
|
|
848
|
+
}
|
|
849
|
+
function cloneDataView(dataView, isDeep) {
|
|
850
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
851
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
852
|
+
}
|
|
853
|
+
var reFlags = /\w*$/;
|
|
854
|
+
function cloneRegExp(regexp) {
|
|
855
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
856
|
+
result.lastIndex = regexp.lastIndex;
|
|
857
|
+
return result;
|
|
858
|
+
}
|
|
859
|
+
var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
|
|
860
|
+
function cloneSymbol(symbol) {
|
|
861
|
+
return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
|
|
862
|
+
}
|
|
863
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
864
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
865
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
866
|
+
}
|
|
867
|
+
var boolTag$3 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$5 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", symbolTag$2 = "[object Symbol]";
|
|
868
|
+
var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
|
|
869
|
+
function initCloneByTag(object, tag, isDeep) {
|
|
870
|
+
var Ctor = object.constructor;
|
|
871
|
+
switch (tag) {
|
|
872
|
+
case arrayBufferTag$2:
|
|
873
|
+
return cloneArrayBuffer(object);
|
|
874
|
+
case boolTag$3:
|
|
875
|
+
case dateTag$2:
|
|
876
|
+
return new Ctor(+object);
|
|
877
|
+
case dataViewTag$2:
|
|
878
|
+
return cloneDataView(object, isDeep);
|
|
879
|
+
case float32Tag$1:
|
|
880
|
+
case float64Tag$1:
|
|
881
|
+
case int8Tag$1:
|
|
882
|
+
case int16Tag$1:
|
|
883
|
+
case int32Tag$1:
|
|
884
|
+
case uint8Tag$1:
|
|
885
|
+
case uint8ClampedTag$1:
|
|
886
|
+
case uint16Tag$1:
|
|
887
|
+
case uint32Tag$1:
|
|
888
|
+
return cloneTypedArray(object, isDeep);
|
|
889
|
+
case mapTag$5:
|
|
890
|
+
return new Ctor();
|
|
891
|
+
case numberTag$2:
|
|
892
|
+
case stringTag$3:
|
|
893
|
+
return new Ctor(object);
|
|
894
|
+
case regexpTag$2:
|
|
895
|
+
return cloneRegExp(object);
|
|
896
|
+
case setTag$5:
|
|
897
|
+
return new Ctor();
|
|
898
|
+
case symbolTag$2:
|
|
899
|
+
return cloneSymbol(object);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
function initCloneObject(object) {
|
|
903
|
+
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
|
|
904
|
+
}
|
|
905
|
+
var mapTag$4 = "[object Map]";
|
|
906
|
+
function baseIsMap(value) {
|
|
907
|
+
return isObjectLike(value) && getTag$1(value) == mapTag$4;
|
|
908
|
+
}
|
|
909
|
+
var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
|
|
910
|
+
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
911
|
+
var isMap$1 = isMap;
|
|
912
|
+
var setTag$4 = "[object Set]";
|
|
913
|
+
function baseIsSet(value) {
|
|
914
|
+
return isObjectLike(value) && getTag$1(value) == setTag$4;
|
|
915
|
+
}
|
|
916
|
+
var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
|
|
917
|
+
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
918
|
+
var isSet$1 = isSet;
|
|
919
|
+
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
|
|
920
|
+
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]";
|
|
921
|
+
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]";
|
|
922
|
+
var cloneableTags = {};
|
|
923
|
+
cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$2] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$3] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$3] = cloneableTags[stringTag$2] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
924
|
+
cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
925
|
+
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
926
|
+
var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
|
|
927
|
+
if (customizer) {
|
|
928
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
929
|
+
}
|
|
930
|
+
if (result !== void 0) {
|
|
931
|
+
return result;
|
|
932
|
+
}
|
|
933
|
+
if (!isObject(value)) {
|
|
934
|
+
return value;
|
|
935
|
+
}
|
|
936
|
+
var isArr = isArray$1(value);
|
|
937
|
+
if (isArr) {
|
|
938
|
+
result = initCloneArray(value);
|
|
939
|
+
if (!isDeep) {
|
|
940
|
+
return copyArray(value, result);
|
|
941
|
+
}
|
|
942
|
+
} else {
|
|
943
|
+
var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
|
|
944
|
+
if (isBuffer$1(value)) {
|
|
945
|
+
return cloneBuffer(value, isDeep);
|
|
946
|
+
}
|
|
947
|
+
if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
|
|
948
|
+
result = isFlat || isFunc ? {} : initCloneObject(value);
|
|
949
|
+
if (!isDeep) {
|
|
950
|
+
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
|
|
951
|
+
}
|
|
952
|
+
} else {
|
|
953
|
+
if (!cloneableTags[tag]) {
|
|
954
|
+
return object ? value : {};
|
|
955
|
+
}
|
|
956
|
+
result = initCloneByTag(value, tag, isDeep);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
stack || (stack = new Stack());
|
|
960
|
+
var stacked = stack.get(value);
|
|
961
|
+
if (stacked) {
|
|
962
|
+
return stacked;
|
|
963
|
+
}
|
|
964
|
+
stack.set(value, result);
|
|
965
|
+
if (isSet$1(value)) {
|
|
966
|
+
value.forEach(function(subValue) {
|
|
967
|
+
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
968
|
+
});
|
|
969
|
+
} else if (isMap$1(value)) {
|
|
970
|
+
value.forEach(function(subValue, key2) {
|
|
971
|
+
result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
|
|
975
|
+
var props = isArr ? void 0 : keysFunc(value);
|
|
976
|
+
arrayEach(props || value, function(subValue, key2) {
|
|
977
|
+
if (props) {
|
|
978
|
+
key2 = subValue;
|
|
979
|
+
subValue = value[key2];
|
|
980
|
+
}
|
|
981
|
+
assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
982
|
+
});
|
|
983
|
+
return result;
|
|
984
|
+
}
|
|
985
|
+
var CLONE_SYMBOLS_FLAG = 4;
|
|
986
|
+
function clone(value) {
|
|
987
|
+
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
|
988
|
+
}
|
|
687
989
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
688
990
|
function setCacheAdd(value) {
|
|
689
991
|
this.__data__.set(value, HASH_UNDEFINED);
|
|
@@ -1150,6 +1452,19 @@ function debounce(func, wait, options) {
|
|
|
1150
1452
|
debounced.flush = flush;
|
|
1151
1453
|
return debounced;
|
|
1152
1454
|
}
|
|
1455
|
+
function baseFilter(collection, predicate) {
|
|
1456
|
+
var result = [];
|
|
1457
|
+
baseEach$1(collection, function(value, index2, collection2) {
|
|
1458
|
+
if (predicate(value, index2, collection2)) {
|
|
1459
|
+
result.push(value);
|
|
1460
|
+
}
|
|
1461
|
+
});
|
|
1462
|
+
return result;
|
|
1463
|
+
}
|
|
1464
|
+
function filter(collection, predicate) {
|
|
1465
|
+
var func = isArray$1(collection) ? arrayFilter : baseFilter;
|
|
1466
|
+
return func(collection, baseIteratee(predicate));
|
|
1467
|
+
}
|
|
1153
1468
|
var stringTag = "[object String]";
|
|
1154
1469
|
function isString(value) {
|
|
1155
1470
|
return typeof value == "string" || !isArray$1(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
@@ -1252,9 +1567,9 @@ const createResizeObserver = (params) => {
|
|
|
1252
1567
|
};
|
|
1253
1568
|
const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
|
|
1254
1569
|
const onResize = () => {
|
|
1255
|
-
const {
|
|
1256
|
-
const width = adaptiveWidth ? Math.floor(
|
|
1257
|
-
const height = adaptiveHeight ? Math.floor(
|
|
1570
|
+
const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
|
|
1571
|
+
const width = adaptiveWidth ? Math.floor(containerWidth != null ? containerWidth : s2.options.width) : s2.options.width;
|
|
1572
|
+
const height = adaptiveHeight ? Math.floor(containerHeight != null ? containerHeight : s2.options.height) : s2.options.height;
|
|
1258
1573
|
if (!adaptiveWidth && !adaptiveHeight) {
|
|
1259
1574
|
return;
|
|
1260
1575
|
}
|
|
@@ -1277,6 +1592,99 @@ const createResizeObserver = (params) => {
|
|
|
1277
1592
|
resizeObserver.unobserve(actualWrapper);
|
|
1278
1593
|
};
|
|
1279
1594
|
};
|
|
1595
|
+
const getDrillDownCache = (spreadsheet, meta) => {
|
|
1596
|
+
const drillDownDataCache = spreadsheet.store.get("drillDownDataCache", []);
|
|
1597
|
+
const cache = drillDownDataCache.find((dc) => dc.rowId === meta.id);
|
|
1598
|
+
return {
|
|
1599
|
+
drillDownDataCache,
|
|
1600
|
+
drillDownCurrentCache: cache
|
|
1601
|
+
};
|
|
1602
|
+
};
|
|
1603
|
+
const handleActionIconClick = (params) => {
|
|
1604
|
+
const { meta, event, callback } = params;
|
|
1605
|
+
const { spreadsheet } = meta;
|
|
1606
|
+
spreadsheet.store.set("drillDownNode", meta);
|
|
1607
|
+
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
|
|
1608
|
+
const cache = (drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField) ? [drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField] : [];
|
|
1609
|
+
const disabled = [];
|
|
1610
|
+
drillDownDataCache.forEach((val) => {
|
|
1611
|
+
if (meta.id.includes(val.rowId) && meta.id !== val.rowId) {
|
|
1612
|
+
disabled.push(val.drillField);
|
|
1613
|
+
}
|
|
1614
|
+
});
|
|
1615
|
+
if (event) {
|
|
1616
|
+
spreadsheet.emit(S2Event.GLOBAL_ACTION_ICON_CLICK, event);
|
|
1617
|
+
}
|
|
1618
|
+
callback({
|
|
1619
|
+
sheetInstance: spreadsheet,
|
|
1620
|
+
cacheDrillFields: cache,
|
|
1621
|
+
disabledFields: disabled,
|
|
1622
|
+
event
|
|
1623
|
+
});
|
|
1624
|
+
};
|
|
1625
|
+
const defaultDisplayCondition = (meta) => {
|
|
1626
|
+
const iconLevel = get(meta, "spreadsheet.dataCfg.fields.rows.length") - 1;
|
|
1627
|
+
return iconLevel <= meta.level && meta.spreadsheet.options.hierarchyType === "tree" && meta.spreadsheet.isValueInCols() && meta.label !== i18n("\u603B\u8BA1");
|
|
1628
|
+
};
|
|
1629
|
+
const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
1630
|
+
var _a;
|
|
1631
|
+
const nextHeaderIcons = ((_a = options.headerActionIcons) == null ? void 0 : _a.length) ? [...options.headerActionIcons] : [];
|
|
1632
|
+
if (!isEmpty(partDrillDown)) {
|
|
1633
|
+
const drillDownActionIcon = {
|
|
1634
|
+
belongsCell: "rowCell",
|
|
1635
|
+
iconNames: ["DrillDownIcon"],
|
|
1636
|
+
defaultHide: true,
|
|
1637
|
+
displayCondition: partDrillDown.displayCondition || defaultDisplayCondition,
|
|
1638
|
+
action: (actionIconProps) => {
|
|
1639
|
+
const { iconName, meta, event } = actionIconProps;
|
|
1640
|
+
if (iconName === "DrillDownIcon") {
|
|
1641
|
+
meta.spreadsheet.store.set("drillDownNode", meta);
|
|
1642
|
+
handleActionIconClick({
|
|
1643
|
+
meta,
|
|
1644
|
+
event,
|
|
1645
|
+
callback
|
|
1646
|
+
});
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
};
|
|
1650
|
+
nextHeaderIcons.push(drillDownActionIcon);
|
|
1651
|
+
}
|
|
1652
|
+
return __spreadProps(__spreadValues({}, options), {
|
|
1653
|
+
headerActionIcons: nextHeaderIcons
|
|
1654
|
+
});
|
|
1655
|
+
};
|
|
1656
|
+
const handleDrillDown = (params) => {
|
|
1657
|
+
const { fetchData, spreadsheet, drillFields, drillItemsNum } = params;
|
|
1658
|
+
if (drillItemsNum) {
|
|
1659
|
+
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1660
|
+
}
|
|
1661
|
+
const meta = spreadsheet.store.get("drillDownNode");
|
|
1662
|
+
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(spreadsheet, meta);
|
|
1663
|
+
let newDrillDownDataCache = clone(drillDownDataCache);
|
|
1664
|
+
if (drillDownCurrentCache) {
|
|
1665
|
+
newDrillDownDataCache = filter(drillDownDataCache, (cache) => cache.rowId !== meta.id);
|
|
1666
|
+
}
|
|
1667
|
+
if (!fetchData) {
|
|
1668
|
+
return;
|
|
1669
|
+
}
|
|
1670
|
+
fetchData(meta, drillFields).then((info) => {
|
|
1671
|
+
const { drillData, drillField } = info;
|
|
1672
|
+
spreadsheet.dataSet.transformDrillDownData(drillField, drillData, meta);
|
|
1673
|
+
if (!isEmpty(drillData)) {
|
|
1674
|
+
const drillLevel = meta.level + 1;
|
|
1675
|
+
const newDrillDownData = {
|
|
1676
|
+
rowId: meta.id,
|
|
1677
|
+
drillLevel,
|
|
1678
|
+
drillData,
|
|
1679
|
+
drillField
|
|
1680
|
+
};
|
|
1681
|
+
newDrillDownDataCache.push(newDrillDownData);
|
|
1682
|
+
spreadsheet.store.set("drillDownDataCache", newDrillDownDataCache);
|
|
1683
|
+
}
|
|
1684
|
+
spreadsheet.interaction.reset();
|
|
1685
|
+
spreadsheet.render(false);
|
|
1686
|
+
});
|
|
1687
|
+
};
|
|
1280
1688
|
const EN_US = {
|
|
1281
1689
|
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
|
|
1282
1690
|
\u5207\u6362\u6307\u6807: "Switch indicator",
|
|
@@ -1304,7 +1712,16 @@ const EN_US = {
|
|
|
1304
1712
|
\u53EF\u9009\u5B57\u6BB5: "Fields",
|
|
1305
1713
|
"\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "Order according to the following rules (from low to high priority)",
|
|
1306
1714
|
\u6309: "By",
|
|
1307
|
-
\u8BF4\u660E: "Description"
|
|
1715
|
+
\u8BF4\u660E: "Description",
|
|
1716
|
+
\u590D\u5236\u539F\u59CB\u6570\u636E: "Copy raw data",
|
|
1717
|
+
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "Copy formatted data",
|
|
1718
|
+
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "Download raw data",
|
|
1719
|
+
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "Download formatted data",
|
|
1720
|
+
\u64CD\u4F5C\u6210\u529F: "Operation successful",
|
|
1721
|
+
\u64CD\u4F5C\u5931\u8D25: "Operation failed",
|
|
1722
|
+
\u65F6\u95F4: "Date",
|
|
1723
|
+
\u6307\u6807: "Measure",
|
|
1724
|
+
\u76EE\u6807\u503C: "Target Value"
|
|
1308
1725
|
};
|
|
1309
1726
|
const ZH_CN = {
|
|
1310
1727
|
\u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
|
|
@@ -1333,12 +1750,22 @@ const ZH_CN = {
|
|
|
1333
1750
|
\u53EF\u9009\u5B57\u6BB5: "\u53EF\u9009\u5B57\u6BB5",
|
|
1334
1751
|
"\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09",
|
|
1335
1752
|
\u6309: "\u6309",
|
|
1336
|
-
\u8BF4\u660E: "\u8BF4\u660E"
|
|
1753
|
+
\u8BF4\u660E: "\u8BF4\u660E",
|
|
1754
|
+
\u590D\u5236\u539F\u59CB\u6570\u636E: "\u590D\u5236\u539F\u59CB\u6570\u636E",
|
|
1755
|
+
\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E: "\u590D\u5236\u683C\u5F0F\u5316\u6570\u636E",
|
|
1756
|
+
\u4E0B\u8F7D\u539F\u59CB\u6570\u636E: "\u4E0B\u8F7D\u539F\u59CB\u6570\u636E",
|
|
1757
|
+
\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E: "\u4E0B\u8F7D\u683C\u5F0F\u5316\u6570\u636E",
|
|
1758
|
+
\u64CD\u4F5C\u6210\u529F: "\u64CD\u4F5C\u6210\u529F",
|
|
1759
|
+
\u64CD\u4F5C\u5931\u8D25: "\u64CD\u4F5C\u5931\u8D25",
|
|
1760
|
+
\u65F6\u95F4: "\u65F6\u95F4",
|
|
1761
|
+
\u6307\u6807: "\u6307\u6807",
|
|
1762
|
+
\u76EE\u6807\u503C: "\u76EE\u6807\u503C"
|
|
1337
1763
|
};
|
|
1338
1764
|
const Locale = {
|
|
1339
1765
|
zh_CN: ZH_CN,
|
|
1340
1766
|
en_US: EN_US
|
|
1341
1767
|
};
|
|
1768
|
+
const DRILL_DOWN_PRE_CLASS = "s2-drill-down";
|
|
1342
1769
|
extendLocale(Locale);
|
|
1343
1770
|
const useExpose = (expose) => {
|
|
1344
1771
|
const s2Ref = shallowRef();
|
|
@@ -1424,7 +1851,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
1424
1851
|
return target;
|
|
1425
1852
|
};
|
|
1426
1853
|
const PRE_CLASS = `${S2_PREFIX_CLS}-pagination`;
|
|
1427
|
-
const _sfc_main$
|
|
1854
|
+
const _sfc_main$e = defineComponent({
|
|
1428
1855
|
name: "s2-pagination",
|
|
1429
1856
|
props: {
|
|
1430
1857
|
current: {
|
|
@@ -1455,7 +1882,7 @@ const _sfc_main$d = defineComponent({
|
|
|
1455
1882
|
AntDPagination: Pagination
|
|
1456
1883
|
}
|
|
1457
1884
|
});
|
|
1458
|
-
function _sfc_render$
|
|
1885
|
+
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1459
1886
|
const _component_AntDPagination = resolveComponent("AntDPagination");
|
|
1460
1887
|
return openBlock(), createElementBlock("div", {
|
|
1461
1888
|
class: normalizeClass(_ctx.PRE_CLASS)
|
|
@@ -1476,8 +1903,8 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1476
1903
|
}, toDisplayString(_ctx.i18n("\u5171\u8BA1")) + " " + toDisplayString(_ctx.total || " - ") + " " + toDisplayString(_ctx.i18n("\u6761")), 3)
|
|
1477
1904
|
], 2);
|
|
1478
1905
|
}
|
|
1479
|
-
var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1480
|
-
const _sfc_main$
|
|
1906
|
+
var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
|
|
1907
|
+
const _sfc_main$d = defineComponent({
|
|
1481
1908
|
name: "TooltipDetail",
|
|
1482
1909
|
props: ["list"],
|
|
1483
1910
|
setup() {
|
|
@@ -1486,7 +1913,7 @@ const _sfc_main$c = defineComponent({
|
|
|
1486
1913
|
};
|
|
1487
1914
|
}
|
|
1488
1915
|
});
|
|
1489
|
-
function _sfc_render$
|
|
1916
|
+
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1490
1917
|
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
|
|
1491
1918
|
return openBlock(), createElementBlock("div", {
|
|
1492
1919
|
key: `${item.value}-${index2}`,
|
|
@@ -1505,8 +1932,8 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1505
1932
|
], 2);
|
|
1506
1933
|
}), 128);
|
|
1507
1934
|
}
|
|
1508
|
-
var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1509
|
-
const _sfc_main$
|
|
1935
|
+
var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
|
|
1936
|
+
const _sfc_main$c = defineComponent({
|
|
1510
1937
|
name: "TooltipHeadInfo",
|
|
1511
1938
|
props: ["rows", "cols"],
|
|
1512
1939
|
setup() {
|
|
@@ -1516,8 +1943,8 @@ const _sfc_main$b = defineComponent({
|
|
|
1516
1943
|
},
|
|
1517
1944
|
components: {}
|
|
1518
1945
|
});
|
|
1519
|
-
const _hoisted_1$
|
|
1520
|
-
function _sfc_render$
|
|
1946
|
+
const _hoisted_1$4 = { key: 0 };
|
|
1947
|
+
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1521
1948
|
var _a, _b, _c, _d;
|
|
1522
1949
|
return ((_a = _ctx.cols) == null ? void 0 : _a.length) || ((_b = _ctx.rows) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", {
|
|
1523
1950
|
key: 0,
|
|
@@ -1528,7 +1955,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1528
1955
|
key: col.value
|
|
1529
1956
|
}, toDisplayString(col.value) + "/", 1);
|
|
1530
1957
|
}), 128)),
|
|
1531
|
-
((_c = _ctx.cols) == null ? void 0 : _c.length) > 0 && ((_d = _ctx.rows) == null ? void 0 : _d.length) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
1958
|
+
((_c = _ctx.cols) == null ? void 0 : _c.length) > 0 && ((_d = _ctx.rows) == null ? void 0 : _d.length) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$4, "\uFF0C")) : createCommentVNode("", true),
|
|
1532
1959
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (row) => {
|
|
1533
1960
|
return openBlock(), createElementBlock("span", {
|
|
1534
1961
|
key: row.value
|
|
@@ -1536,8 +1963,8 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1536
1963
|
}), 128))
|
|
1537
1964
|
], 2)) : createCommentVNode("", true);
|
|
1538
1965
|
}
|
|
1539
|
-
var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1540
|
-
const _sfc_main$
|
|
1966
|
+
var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
|
|
1967
|
+
const _sfc_main$b = defineComponent({
|
|
1541
1968
|
name: "TooltipInfos",
|
|
1542
1969
|
props: ["infos"],
|
|
1543
1970
|
setup() {
|
|
@@ -1547,13 +1974,13 @@ const _sfc_main$a = defineComponent({
|
|
|
1547
1974
|
},
|
|
1548
1975
|
components: {}
|
|
1549
1976
|
});
|
|
1550
|
-
function _sfc_render$
|
|
1977
|
+
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1551
1978
|
return openBlock(), createElementBlock("div", {
|
|
1552
1979
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-infos`)
|
|
1553
1980
|
}, toDisplayString(_ctx.infos), 3);
|
|
1554
1981
|
}
|
|
1555
|
-
var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1556
|
-
const _sfc_main$
|
|
1982
|
+
var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
|
|
1983
|
+
const _sfc_main$a = defineComponent({
|
|
1557
1984
|
name: "TooltipSimpleTips",
|
|
1558
1985
|
props: ["name", "tips"],
|
|
1559
1986
|
setup() {
|
|
@@ -1563,7 +1990,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
1563
1990
|
},
|
|
1564
1991
|
components: {}
|
|
1565
1992
|
});
|
|
1566
|
-
function _sfc_render$
|
|
1993
|
+
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1567
1994
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1568
1995
|
_ctx.name ? (openBlock(), createElementBlock("div", {
|
|
1569
1996
|
key: 0,
|
|
@@ -1575,8 +2002,8 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1575
2002
|
}, toDisplayString(_ctx.tips), 3)) : createCommentVNode("", true)
|
|
1576
2003
|
], 64);
|
|
1577
2004
|
}
|
|
1578
|
-
var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1579
|
-
const _sfc_main$
|
|
2005
|
+
var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
|
|
2006
|
+
const _sfc_main$9 = defineComponent({
|
|
1580
2007
|
name: "TooltipSummary",
|
|
1581
2008
|
props: ["summaries"],
|
|
1582
2009
|
setup(props) {
|
|
@@ -1589,7 +2016,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
1589
2016
|
},
|
|
1590
2017
|
components: {}
|
|
1591
2018
|
});
|
|
1592
|
-
function _sfc_render$
|
|
2019
|
+
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1593
2020
|
return openBlock(), createElementBlock("div", {
|
|
1594
2021
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary`)
|
|
1595
2022
|
}, [
|
|
@@ -1616,8 +2043,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1616
2043
|
}), 128))
|
|
1617
2044
|
], 2);
|
|
1618
2045
|
}
|
|
1619
|
-
var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1620
|
-
const _sfc_main$
|
|
2046
|
+
var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
|
|
2047
|
+
const _sfc_main$8 = defineComponent({
|
|
1621
2048
|
name: "TooltipOperatorTitle",
|
|
1622
2049
|
props: ["menu"],
|
|
1623
2050
|
setup(props) {
|
|
@@ -1628,21 +2055,21 @@ const _sfc_main$7 = defineComponent({
|
|
|
1628
2055
|
};
|
|
1629
2056
|
}
|
|
1630
2057
|
});
|
|
1631
|
-
const _hoisted_1 = ["innerHTML"];
|
|
1632
|
-
function _sfc_render$
|
|
2058
|
+
const _hoisted_1$3 = ["innerHTML"];
|
|
2059
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1633
2060
|
return openBlock(), createElementBlock("span", null, [
|
|
1634
2061
|
_ctx.icon ? (openBlock(), createElementBlock("span", {
|
|
1635
2062
|
key: 0,
|
|
1636
2063
|
innerHTML: _ctx.icon,
|
|
1637
2064
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-icon`)
|
|
1638
|
-
}, null, 10, _hoisted_1)) : createCommentVNode("", true),
|
|
2065
|
+
}, null, 10, _hoisted_1$3)) : createCommentVNode("", true),
|
|
1639
2066
|
createElementVNode("span", {
|
|
1640
2067
|
class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-text`)
|
|
1641
2068
|
}, toDisplayString(_ctx.menu.text), 3)
|
|
1642
2069
|
]);
|
|
1643
2070
|
}
|
|
1644
|
-
var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1645
|
-
const _sfc_main$
|
|
2071
|
+
var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
|
|
2072
|
+
const _sfc_main$7 = defineComponent({
|
|
1646
2073
|
name: "TooltipOperatorMenu",
|
|
1647
2074
|
props: ["menu", "cell"],
|
|
1648
2075
|
setup(props) {
|
|
@@ -1661,7 +2088,7 @@ const _sfc_main$6 = defineComponent({
|
|
|
1661
2088
|
TooltipOperatorTitle
|
|
1662
2089
|
}
|
|
1663
2090
|
});
|
|
1664
|
-
function _sfc_render$
|
|
2091
|
+
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1665
2092
|
const _component_TooltipOperatorTitle = resolveComponent("TooltipOperatorTitle");
|
|
1666
2093
|
const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
|
|
1667
2094
|
const _component_MenuItem = resolveComponent("MenuItem");
|
|
@@ -1705,9 +2132,9 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1705
2132
|
_: 1
|
|
1706
2133
|
}, 8, ["popupClassName", "onTitleClick"]);
|
|
1707
2134
|
}
|
|
1708
|
-
var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2135
|
+
var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
1709
2136
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
1710
|
-
const _sfc_main$
|
|
2137
|
+
const _sfc_main$6 = defineComponent({
|
|
1711
2138
|
name: "TooltipOperator",
|
|
1712
2139
|
props: [
|
|
1713
2140
|
"menus",
|
|
@@ -1727,7 +2154,7 @@ const _sfc_main$5 = defineComponent({
|
|
|
1727
2154
|
TooltipOperatorMenu
|
|
1728
2155
|
}
|
|
1729
2156
|
});
|
|
1730
|
-
function _sfc_render$
|
|
2157
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1731
2158
|
const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
|
|
1732
2159
|
const _component_Menu = resolveComponent("Menu");
|
|
1733
2160
|
const _component_TooltipOperatorTitle = resolveComponent("TooltipOperatorTitle");
|
|
@@ -1790,17 +2217,17 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1790
2217
|
}), 128))
|
|
1791
2218
|
], 2);
|
|
1792
2219
|
}
|
|
1793
|
-
var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2220
|
+
var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
1794
2221
|
var index_vue_vue_type_style_index_0_lang = "";
|
|
1795
|
-
const _sfc_main$
|
|
2222
|
+
const _sfc_main$5 = defineComponent({
|
|
1796
2223
|
name: "TooltipComponent",
|
|
1797
2224
|
props: [
|
|
1798
|
-
"content",
|
|
1799
2225
|
"data",
|
|
1800
2226
|
"options",
|
|
1801
2227
|
"cell",
|
|
1802
2228
|
"position",
|
|
1803
|
-
"event"
|
|
2229
|
+
"event",
|
|
2230
|
+
"content"
|
|
1804
2231
|
],
|
|
1805
2232
|
setup(props) {
|
|
1806
2233
|
const { operator, onlyMenu } = getTooltipDefaultOptions(props.options);
|
|
@@ -1818,7 +2245,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
1818
2245
|
TooltipOperator
|
|
1819
2246
|
}
|
|
1820
2247
|
});
|
|
1821
|
-
function _sfc_render$
|
|
2248
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1822
2249
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
1823
2250
|
const _component_TooltipOperator = resolveComponent("TooltipOperator");
|
|
1824
2251
|
const _component_TooltipSimpleTips = resolveComponent("TooltipSimpleTips");
|
|
@@ -1839,9 +2266,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1839
2266
|
cell: _ctx.cell,
|
|
1840
2267
|
onClick: (_d = _ctx.operator) == null ? void 0 : _d.onClick
|
|
1841
2268
|
}, null, 8, ["menus", "cell", "onClick"]),
|
|
1842
|
-
_ctx.content ? (openBlock(), createElementBlock(Fragment, { key:
|
|
1843
|
-
createTextVNode(toDisplayString(_ctx.content), 1)
|
|
1844
|
-
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2269
|
+
_ctx.content ? renderSlot(_ctx.$slots, "content", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1845
2270
|
createVNode(_component_TooltipSimpleTips, {
|
|
1846
2271
|
name: (_e = _ctx.data) == null ? void 0 : _e.name,
|
|
1847
2272
|
tips: (_f = _ctx.data) == null ? void 0 : _f.tips
|
|
@@ -1864,7 +2289,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1864
2289
|
], 64))
|
|
1865
2290
|
], 64));
|
|
1866
2291
|
}
|
|
1867
|
-
var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2292
|
+
var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
1868
2293
|
class CustomTooltip extends BaseTooltip {
|
|
1869
2294
|
constructor(spreadsheet) {
|
|
1870
2295
|
super(spreadsheet);
|
|
@@ -1879,14 +2304,16 @@ class CustomTooltip extends BaseTooltip {
|
|
|
1879
2304
|
cell,
|
|
1880
2305
|
content
|
|
1881
2306
|
});
|
|
1882
|
-
const tooltipVNode = createVNode(TooltipComponent, tooltipProps
|
|
1883
|
-
|
|
1884
|
-
|
|
2307
|
+
const tooltipVNode = createVNode(TooltipComponent, tooltipProps, {
|
|
2308
|
+
content: () => content
|
|
2309
|
+
});
|
|
2310
|
+
render$3(null, this.container);
|
|
2311
|
+
render$3(tooltipVNode, this.container);
|
|
1885
2312
|
}
|
|
1886
2313
|
destroy() {
|
|
1887
2314
|
super.destroy();
|
|
1888
2315
|
if (this.container) {
|
|
1889
|
-
render(null, this.container);
|
|
2316
|
+
render$3(null, this.container);
|
|
1890
2317
|
}
|
|
1891
2318
|
}
|
|
1892
2319
|
}
|
|
@@ -1895,31 +2322,6 @@ const RENDER_TOOLTIP_OPTION = {
|
|
|
1895
2322
|
renderTooltip: (spreadsheet) => new CustomTooltip(spreadsheet)
|
|
1896
2323
|
}
|
|
1897
2324
|
};
|
|
1898
|
-
[
|
|
1899
|
-
{
|
|
1900
|
-
name: i18n("\u5347\u5E8F"),
|
|
1901
|
-
value: "ASC"
|
|
1902
|
-
},
|
|
1903
|
-
{
|
|
1904
|
-
name: i18n("\u964D\u5E8F"),
|
|
1905
|
-
value: "DESC"
|
|
1906
|
-
}
|
|
1907
|
-
];
|
|
1908
|
-
[
|
|
1909
|
-
{
|
|
1910
|
-
label: i18n("\u9996\u5B57\u6BCD"),
|
|
1911
|
-
value: "sortMethod"
|
|
1912
|
-
},
|
|
1913
|
-
{
|
|
1914
|
-
label: i18n("\u624B\u52A8\u6392\u5E8F"),
|
|
1915
|
-
value: "sortBy"
|
|
1916
|
-
},
|
|
1917
|
-
{
|
|
1918
|
-
label: i18n("\u5176\u4ED6\u5B57\u6BB5"),
|
|
1919
|
-
value: "sortByMeasure",
|
|
1920
|
-
children: []
|
|
1921
|
-
}
|
|
1922
|
-
];
|
|
1923
2325
|
const getSheetComponentOptions = (...options) => getBaseSheetComponentOptions(RENDER_TOOLTIP_OPTION, ...options);
|
|
1924
2326
|
const useCellEvent = (s2Ref, emit, eventName, emitName) => {
|
|
1925
2327
|
var _a;
|
|
@@ -1965,6 +2367,7 @@ const useEvents = (s2Ref, emit) => {
|
|
|
1965
2367
|
useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_MOVE, "dataCellMouseMove");
|
|
1966
2368
|
useS2Event(s2Ref, emit, S2Event.DATA_CELL_TREND_ICON_CLICK, "dataCellTrendIconClick");
|
|
1967
2369
|
useS2Event(s2Ref, emit, S2Event.DATE_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
|
|
2370
|
+
useS2Event(s2Ref, emit, S2Event.DATE_CELL_SELECT_MOVE, "dataCellSelectMove");
|
|
1968
2371
|
useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_HOVER, "cornerCellHover");
|
|
1969
2372
|
useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_CLICK, "cornerCellClick");
|
|
1970
2373
|
useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_DOUBLE_CLICK, "cornerCellDoubleClick");
|
|
@@ -2049,11 +2452,14 @@ const useSheetUpdate = (s2Ref, props) => {
|
|
|
2049
2452
|
(_a = s2Ref.value) == null ? void 0 : _a.setOptions(options);
|
|
2050
2453
|
(_b = s2Ref.value) == null ? void 0 : _b.changeSheetSize(options == null ? void 0 : options.width, options == null ? void 0 : options.height);
|
|
2051
2454
|
}, { deep: isProxy(props.options) });
|
|
2052
|
-
watch(() => props.dataCfg, (dataCfg) => {
|
|
2053
|
-
var _a;
|
|
2455
|
+
watch(() => props.dataCfg, (dataCfg, prevDataCfg) => {
|
|
2456
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2457
|
+
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)) {
|
|
2458
|
+
(_e = s2Ref.value) == null ? void 0 : _e.clearColumnLeafNodes();
|
|
2459
|
+
}
|
|
2054
2460
|
updateFlag.rerender = true;
|
|
2055
2461
|
updateFlag.reloadData = true;
|
|
2056
|
-
(
|
|
2462
|
+
(_f = s2Ref.value) == null ? void 0 : _f.setDataCfg(dataCfg);
|
|
2057
2463
|
}, { deep: isProxy(props.dataCfg) });
|
|
2058
2464
|
watch(() => props.themeCfg, (themeCfg) => {
|
|
2059
2465
|
var _a;
|
|
@@ -2112,9 +2518,8 @@ function useSpreadSheet(props, emit) {
|
|
|
2112
2518
|
const rawDataCfg = toRaw(dataCfg);
|
|
2113
2519
|
const rawOptions = toRaw(options);
|
|
2114
2520
|
const s2Options = getSheetComponentOptions(rawOptions);
|
|
2115
|
-
const s2Constructor = [container, rawDataCfg, s2Options];
|
|
2116
2521
|
if (onSpreadsheet) {
|
|
2117
|
-
return onSpreadsheet(
|
|
2522
|
+
return onSpreadsheet(container, rawDataCfg, s2Options);
|
|
2118
2523
|
}
|
|
2119
2524
|
if (sheetType === "table") {
|
|
2120
2525
|
return new TableSheet$1(container, rawDataCfg, s2Options);
|
|
@@ -2168,6 +2573,34 @@ const initBaseSheetProps = () => ({
|
|
|
2168
2573
|
onSpreadsheet: Function,
|
|
2169
2574
|
onGetSpreadSheet: Function
|
|
2170
2575
|
});
|
|
2576
|
+
const initDrillDownProps = () => ({
|
|
2577
|
+
className: String,
|
|
2578
|
+
titleText: {
|
|
2579
|
+
type: String,
|
|
2580
|
+
default: i18n("\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6")
|
|
2581
|
+
},
|
|
2582
|
+
searchText: {
|
|
2583
|
+
type: String,
|
|
2584
|
+
default: i18n("\u641C\u7D22\u5B57\u6BB5")
|
|
2585
|
+
},
|
|
2586
|
+
clearButtonText: {
|
|
2587
|
+
type: String,
|
|
2588
|
+
default: i18n("\u6062\u590D\u9ED8\u8BA4")
|
|
2589
|
+
},
|
|
2590
|
+
extra: Node,
|
|
2591
|
+
dataSet: {
|
|
2592
|
+
type: Array,
|
|
2593
|
+
default: []
|
|
2594
|
+
},
|
|
2595
|
+
drillFields: Array,
|
|
2596
|
+
disabledFields: Array,
|
|
2597
|
+
getDrillFields: Function,
|
|
2598
|
+
setDrillFields: Function
|
|
2599
|
+
});
|
|
2600
|
+
const initDrillDownEmits = () => {
|
|
2601
|
+
const keys2 = ["getDrillFields", "setDrillFields"];
|
|
2602
|
+
return keys2;
|
|
2603
|
+
};
|
|
2171
2604
|
const initBaseSheetEmits = () => {
|
|
2172
2605
|
const keys2 = [
|
|
2173
2606
|
"spreadsheet",
|
|
@@ -2193,6 +2626,7 @@ const initBaseSheetEmits = () => {
|
|
|
2193
2626
|
"dataCellMouseMove",
|
|
2194
2627
|
"dataCellTrendIconClick",
|
|
2195
2628
|
"dataCellBrushSelection",
|
|
2629
|
+
"dataCellSelectMove",
|
|
2196
2630
|
"cornerCellHover",
|
|
2197
2631
|
"cornerCellClick",
|
|
2198
2632
|
"cornerCellDoubleClick",
|
|
@@ -2244,7 +2678,7 @@ const initBaseSheetEmits = () => {
|
|
|
2244
2678
|
return keys2;
|
|
2245
2679
|
};
|
|
2246
2680
|
var baseSheet_vue_vue_type_style_index_0_lang = "";
|
|
2247
|
-
const _sfc_main$
|
|
2681
|
+
const _sfc_main$4 = defineComponent({
|
|
2248
2682
|
name: "BaseSheet",
|
|
2249
2683
|
props: initBaseSheetProps(),
|
|
2250
2684
|
emits: initBaseSheetEmits(),
|
|
@@ -2285,7 +2719,7 @@ const _sfc_main$3 = defineComponent({
|
|
|
2285
2719
|
S2Pagination
|
|
2286
2720
|
}
|
|
2287
2721
|
});
|
|
2288
|
-
function _sfc_render$
|
|
2722
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2289
2723
|
const _component_S2Pagination = resolveComponent("S2Pagination");
|
|
2290
2724
|
const _component_Spin = resolveComponent("Spin");
|
|
2291
2725
|
return openBlock(), createBlock(_component_Spin, {
|
|
@@ -2314,14 +2748,251 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2314
2748
|
_: 1
|
|
2315
2749
|
}, 8, ["wrapperClassName", "spinning"]);
|
|
2316
2750
|
}
|
|
2317
|
-
var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2751
|
+
var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
2752
|
+
const _hoisted_1$2 = {
|
|
2753
|
+
class: "antv-s2-icon",
|
|
2754
|
+
viewBox: "0 0 1024 1024",
|
|
2755
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2756
|
+
width: "12.6",
|
|
2757
|
+
height: "12.6"
|
|
2758
|
+
};
|
|
2759
|
+
const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", {
|
|
2760
|
+
d: "M511.804 222.338c-57.117 0-105.737 20.061-145.86 60.184-40.122 40.123-60.184 88.569-60.184 145.337 0 56.769 20.062 105.214 60.185 145.337 40.122 40.123 88.742 60.185 145.859 60.185 57.116 0 105.736-20.062 145.859-60.185 40.123-40.123 60.184-88.568 60.184-145.337 0-56.768-20.061-105.214-60.184-145.337-40.123-40.123-88.743-60.184-145.86-60.184zm0 338.619c-36.729 0-68.007-12.925-93.835-38.774-25.827-25.85-38.752-57.127-38.773-93.834-.022-36.707 12.902-68.16 38.773-94.357 25.872-26.197 57.15-39.285 93.835-39.263 36.685.022 67.963 13.11 93.834 39.263 25.871 26.154 38.796 57.606 38.774 94.357-.022 36.75-12.946 68.028-38.774 93.834-25.828 25.806-57.106 38.73-93.834 38.774zm366.165-295.766c-21.084-42.168-50.327-79.223-87.73-111.165-37.404-31.941-79.898-57.105-127.484-75.491C614.472 60.845 564.155 52 511.804 52c-52.352 0-103.006 8.845-151.963 26.535-46.911 18.364-89.069 43.528-126.472 75.491-37.403 31.964-66.647 69.019-87.731 111.165C123.879 308.71 113 353.923 113 400.835c0 65.95 15.982 132.924 47.945 200.92 26.524 56.441 63.58 112.198 111.165 167.27 62.556 73.435 134.632 138.71 216.227 195.827 6.81 4.765 14.459 7.148 22.945 7.148 8.485 0 16.47-2.383 23.956-7.148 81.595-57.79 153.67-123.067 216.227-195.828 47.608-55.767 84.663-111.524 111.165-167.27 31.963-67.995 47.945-134.969 47.945-200.919 0-46.912-10.88-92.126-32.638-135.644h.032zm-40.797 136.656c0 55.07-13.6 111.513-40.798 169.326-23.129 49.631-56.452 99.948-99.97 150.95-52.351 61.208-113.885 117.65-184.6 169.326-70.716-51.676-132.25-108.118-184.6-169.326-42.844-51.002-76.167-101.319-99.971-150.95-27.198-57.791-40.797-114.57-40.797-170.338 0-36.032 8.159-70.716 24.478-104.05 16.994-32.638 40.45-61.882 70.368-87.73 30.592-26.525 65.276-47.26 104.05-62.209 40.797-14.97 82.954-22.455 126.472-22.455 43.517 0 85.675 7.485 126.472 22.455 38.752 14.97 73.436 35.706 104.05 62.208 30.593 25.85 54.048 55.093 70.367 87.731 16.32 34.009 24.479 69.03 24.479 105.062z",
|
|
2761
|
+
fill: "currentColor"
|
|
2762
|
+
}, null, -1);
|
|
2763
|
+
const _hoisted_3$2 = [
|
|
2764
|
+
_hoisted_2$2
|
|
2765
|
+
];
|
|
2766
|
+
function render$2(_ctx, _cache) {
|
|
2767
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
|
|
2768
|
+
}
|
|
2769
|
+
var LocationIcon = { render: render$2 };
|
|
2770
|
+
const _hoisted_1$1 = {
|
|
2771
|
+
class: "antv-s2-icon",
|
|
2772
|
+
viewBox: "0 0 1024 1024",
|
|
2773
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2774
|
+
width: "12.6",
|
|
2775
|
+
height: "12.6"
|
|
2776
|
+
};
|
|
2777
|
+
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("path", {
|
|
2778
|
+
d: "M86.016 805.888H0l143.872-529.92h79.36l144.896 529.92h-91.136l-29.696-109.056H115.2S85.504 805.888 86.016 805.888zM225.28 613.376 181.248 455.68 138.24 613.376h87.04zM519.168 430.08c24.576-16.384 47.616-25.088 69.12-25.088 30.72 0 58.368 14.848 81.92 44.032 24.064 29.184 35.328 72.192 35.328 128.512 0 44.032-7.168 83.456-22.528 118.272-14.848 34.816-35.328 62.976-60.416 83.456-26.112 20.992-57.856 31.232-95.232 31.232-15.36-.512-31.232-1.536-46.592-3.584-4.096-.512-8.704-1.024-12.8-1.536h-66.56V256h81.92v206.336c11.264-12.8 23.04-23.552 35.84-32.256zM483.84 587.264v135.168c13.824 3.072 26.112 4.608 37.376 4.608 27.648 0 50.176-11.776 69.12-36.352 19.456-25.088 28.672-59.392 28.672-104.96 0-32.256-5.12-55.296-14.848-70.144-9.216-13.824-18.432-19.968-28.672-19.968-12.288 0-27.136 7.68-44.544 24.064-16.896 16.896-32.768 39.424-47.104 67.584zm529.92 207.36c-36.864 14.336-71.68 20.992-104.96 20.992-32.768.512-64.512-9.216-91.648-27.136-27.136-18.432-48.64-44.032-62.464-73.728-14.848-30.72-22.528-65.536-22.528-104.448 0-58.88 16.896-108.032 51.2-146.944 33.792-38.912 75.264-58.88 123.392-58.88 34.304 0 70.144 7.168 108.032 21.504l10.24 4.096v95.232l-20.992-10.752c-34.816-17.92-65.536-26.624-92.16-26.624-16.896 0-32.768 4.608-47.104 13.824-13.824 8.704-25.088 23.04-32.768 42.496-8.192 19.968-12.288 41.472-12.288 63.488 0 28.672 7.68 55.808 24.064 82.432 14.848 24.576 37.888 36.352 71.168 36.352 10.752 0 21.504-1.024 31.744-2.56 9.728-1.536 29.696-8.192 58.88-18.944l19.456-7.68v92.672l-11.264 4.608z",
|
|
2779
|
+
fill: "currentColor"
|
|
2780
|
+
}, null, -1);
|
|
2781
|
+
const _hoisted_3$1 = [
|
|
2782
|
+
_hoisted_2$1
|
|
2783
|
+
];
|
|
2784
|
+
function render$1(_ctx, _cache) {
|
|
2785
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
|
|
2786
|
+
}
|
|
2787
|
+
var TextIcon = { render: render$1 };
|
|
2788
|
+
const _hoisted_1 = {
|
|
2789
|
+
class: "antv-s2-icon",
|
|
2790
|
+
viewBox: "0 0 1024 1024",
|
|
2791
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2792
|
+
width: "12.6",
|
|
2793
|
+
height: "12.6"
|
|
2794
|
+
};
|
|
2795
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", {
|
|
2796
|
+
d: "M950.016 898.016 744 693.024q88-107.008 88-244.992 0-159.008-112.512-271.488T448 64.032 176.512 176.544 64 448.032 176.512 719.52 448 832.032q138.016 0 244.992-88l206.016 206.016q10.016 10.016 24.992 10.016t26.016-10.016q10.016-11.008 10.016-26.016t-10.016-26.016zM568.992 736Q512 760 448 760t-120.992-24q-56-24-99.488-67.488t-66.496-99.488q-24.992-56.992-24.992-120.992t24.992-120.992q23.008-56 66.496-99.488t99.488-67.488q56.992-24 120.992-24t120.992 24q56 24 99.488 67.488t67.488 99.488q24 56.992 24 120.992t-24 120.992q-24 56-67.488 99.488T568.992 736z",
|
|
2797
|
+
fill: "currentColor"
|
|
2798
|
+
}, null, -1);
|
|
2799
|
+
const _hoisted_3 = [
|
|
2800
|
+
_hoisted_2
|
|
2801
|
+
];
|
|
2802
|
+
function render(_ctx, _cache) {
|
|
2803
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
|
|
2804
|
+
}
|
|
2805
|
+
var CalendarIcon = { render };
|
|
2806
|
+
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2807
|
+
const _sfc_main$3 = defineComponent({
|
|
2808
|
+
name: "DrillDown",
|
|
2809
|
+
props: initDrillDownProps(),
|
|
2810
|
+
emits: initDrillDownEmits(),
|
|
2811
|
+
methods: {},
|
|
2812
|
+
components: {
|
|
2813
|
+
Button,
|
|
2814
|
+
Input,
|
|
2815
|
+
Empty,
|
|
2816
|
+
Menu,
|
|
2817
|
+
MenuItem,
|
|
2818
|
+
LocationIcon,
|
|
2819
|
+
TextIcon,
|
|
2820
|
+
CalendarIcon
|
|
2821
|
+
},
|
|
2822
|
+
setup(props) {
|
|
2823
|
+
const {
|
|
2824
|
+
dataSet,
|
|
2825
|
+
disabledFields,
|
|
2826
|
+
getDrillFields,
|
|
2827
|
+
setDrillFields,
|
|
2828
|
+
className
|
|
2829
|
+
} = props;
|
|
2830
|
+
const getOptions = () => {
|
|
2831
|
+
return dataSet.map((val) => {
|
|
2832
|
+
val.disabled = !!(disabledFields && disabledFields.includes(val.value));
|
|
2833
|
+
return val;
|
|
2834
|
+
});
|
|
2835
|
+
};
|
|
2836
|
+
const options = ref(getOptions());
|
|
2837
|
+
const selected = ref([]);
|
|
2838
|
+
const handleSearch = (e) => {
|
|
2839
|
+
const { value } = e.target;
|
|
2840
|
+
if (!value) {
|
|
2841
|
+
options.value = [...dataSet];
|
|
2842
|
+
} else {
|
|
2843
|
+
const reg = new RegExp(value, "gi");
|
|
2844
|
+
const result = dataSet.filter((item) => reg.test(item.name));
|
|
2845
|
+
options.value = [...result];
|
|
2846
|
+
}
|
|
2847
|
+
};
|
|
2848
|
+
const handleSelect = (value) => {
|
|
2849
|
+
const key = value == null ? void 0 : value.selectedKeys;
|
|
2850
|
+
selected.value = key;
|
|
2851
|
+
if (getDrillFields) {
|
|
2852
|
+
getDrillFields(key);
|
|
2853
|
+
}
|
|
2854
|
+
if (setDrillFields)
|
|
2855
|
+
setDrillFields(key);
|
|
2856
|
+
};
|
|
2857
|
+
const handleClear = (e) => {
|
|
2858
|
+
e.stopPropagation();
|
|
2859
|
+
selected.value = [];
|
|
2860
|
+
if (getDrillFields)
|
|
2861
|
+
getDrillFields([]);
|
|
2862
|
+
if (setDrillFields)
|
|
2863
|
+
setDrillFields([]);
|
|
2864
|
+
};
|
|
2865
|
+
return {
|
|
2866
|
+
options,
|
|
2867
|
+
handleSearch,
|
|
2868
|
+
handleSelect,
|
|
2869
|
+
handleClear,
|
|
2870
|
+
className,
|
|
2871
|
+
selected,
|
|
2872
|
+
isEmpty,
|
|
2873
|
+
DRILL_DOWN_PRE_CLASS
|
|
2874
|
+
};
|
|
2875
|
+
}
|
|
2876
|
+
});
|
|
2877
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2878
|
+
const _component_Button = resolveComponent("Button");
|
|
2879
|
+
const _component_Input = resolveComponent("Input");
|
|
2880
|
+
const _component_Empty = resolveComponent("Empty");
|
|
2881
|
+
const _component_text_icon = resolveComponent("text-icon");
|
|
2882
|
+
const _component_calendar_icon = resolveComponent("calendar-icon");
|
|
2883
|
+
const _component_location_icon = resolveComponent("location-icon");
|
|
2884
|
+
const _component_MenuItem = resolveComponent("MenuItem");
|
|
2885
|
+
const _component_Menu = resolveComponent("Menu");
|
|
2886
|
+
return openBlock(), createElementBlock("div", {
|
|
2887
|
+
class: normalizeClass([_ctx.DRILL_DOWN_PRE_CLASS, _ctx.className])
|
|
2888
|
+
}, [
|
|
2889
|
+
createElementVNode("header", {
|
|
2890
|
+
class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-header`)
|
|
2891
|
+
}, [
|
|
2892
|
+
createElementVNode("div", null, toDisplayString(_ctx.titleText), 1),
|
|
2893
|
+
createVNode(_component_Button, {
|
|
2894
|
+
type: "link",
|
|
2895
|
+
onClick: _ctx.handleClear
|
|
2896
|
+
}, {
|
|
2897
|
+
default: withCtx(() => [
|
|
2898
|
+
createTextVNode(toDisplayString(_ctx.clearButtonText), 1)
|
|
2899
|
+
]),
|
|
2900
|
+
_: 1
|
|
2901
|
+
}, 8, ["onClick"])
|
|
2902
|
+
], 2),
|
|
2903
|
+
createVNode(_component_Input, {
|
|
2904
|
+
class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-search`),
|
|
2905
|
+
placeholder: _ctx.searchText,
|
|
2906
|
+
onChange: _ctx.handleSearch,
|
|
2907
|
+
onPressEnter: _ctx.handleSearch,
|
|
2908
|
+
allowClear: true
|
|
2909
|
+
}, null, 8, ["class", "placeholder", "onChange", "onPressEnter"]),
|
|
2910
|
+
_ctx.isEmpty(_ctx.options) ? (openBlock(), createBlock(_component_Empty, {
|
|
2911
|
+
key: 0,
|
|
2912
|
+
imageStyle: { height: "64px" },
|
|
2913
|
+
class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-empty`)
|
|
2914
|
+
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
2915
|
+
createVNode(_component_Menu, {
|
|
2916
|
+
class: "`${DRILL_DOWN_PRE_CLASS}-menu`",
|
|
2917
|
+
selectedKeys: _ctx.selected,
|
|
2918
|
+
"onUpdate:selectedKeys": _cache[0] || (_cache[0] = ($event) => _ctx.selected = $event),
|
|
2919
|
+
onSelect: _ctx.handleSelect
|
|
2920
|
+
}, {
|
|
2921
|
+
default: withCtx(() => [
|
|
2922
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option) => {
|
|
2923
|
+
return openBlock(), createBlock(_component_MenuItem, {
|
|
2924
|
+
key: option.value,
|
|
2925
|
+
disabled: option.disabled,
|
|
2926
|
+
class: normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-menu-item`)
|
|
2927
|
+
}, {
|
|
2928
|
+
icon: withCtx(() => [
|
|
2929
|
+
option.type === "text" ? (openBlock(), createBlock(_component_text_icon, { key: 0 })) : createCommentVNode("", true),
|
|
2930
|
+
option.type === "date" ? (openBlock(), createBlock(_component_calendar_icon, { key: 1 })) : createCommentVNode("", true),
|
|
2931
|
+
option.type === "location" ? (openBlock(), createBlock(_component_location_icon, { key: 2 })) : createCommentVNode("", true)
|
|
2932
|
+
]),
|
|
2933
|
+
default: withCtx(() => [
|
|
2934
|
+
createTextVNode(" " + toDisplayString(option == null ? void 0 : option.name), 1)
|
|
2935
|
+
]),
|
|
2936
|
+
_: 2
|
|
2937
|
+
}, 1032, ["disabled", "class"]);
|
|
2938
|
+
}), 128))
|
|
2939
|
+
]),
|
|
2940
|
+
_: 1
|
|
2941
|
+
}, 8, ["selectedKeys", "onSelect"])
|
|
2942
|
+
], 2);
|
|
2943
|
+
}
|
|
2944
|
+
var DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-6eb1ccd0"]]);
|
|
2318
2945
|
const _sfc_main$2 = defineComponent({
|
|
2319
2946
|
name: "PivotSheet",
|
|
2320
|
-
props:
|
|
2321
|
-
emits:
|
|
2947
|
+
props: initBaseSheetProps(),
|
|
2948
|
+
emits: initBaseSheetEmits(),
|
|
2322
2949
|
setup(props, ctx) {
|
|
2323
2950
|
const s2Ref = useExpose(ctx.expose);
|
|
2324
|
-
|
|
2951
|
+
const { options: pivotOptions } = toRefs(props);
|
|
2952
|
+
const { dataCfg, partDrillDown } = toRefs(props);
|
|
2953
|
+
const drillFields = ref([]);
|
|
2954
|
+
const setDrillFields = (fields) => {
|
|
2955
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2956
|
+
const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
|
|
2957
|
+
drillFields.value = fields;
|
|
2958
|
+
instance == null ? void 0 : instance.hideTooltip();
|
|
2959
|
+
if (isEmpty(fields)) {
|
|
2960
|
+
instance == null ? void 0 : instance.clearDrillDownData((_b = instance == null ? void 0 : instance.store.get("drillDownNode")) == null ? void 0 : _b.id);
|
|
2961
|
+
} else {
|
|
2962
|
+
handleDrillDown({
|
|
2963
|
+
rows: (_d = (_c = dataCfg.value) == null ? void 0 : _c.fields.rows) != null ? _d : [],
|
|
2964
|
+
drillFields: fields,
|
|
2965
|
+
fetchData: (_e = partDrillDown.value) == null ? void 0 : _e.fetchData,
|
|
2966
|
+
drillItemsNum: (_f = partDrillDown.value) == null ? void 0 : _f.drillItemsNum,
|
|
2967
|
+
spreadsheet: instance
|
|
2968
|
+
});
|
|
2969
|
+
}
|
|
2970
|
+
};
|
|
2971
|
+
const onDrillDownIconClick = (params) => {
|
|
2972
|
+
var _a, _b;
|
|
2973
|
+
const { event, disabledFields } = params;
|
|
2974
|
+
if (event) {
|
|
2975
|
+
const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
|
|
2976
|
+
const drillDownNode = createVNode(DrillDown, __spreadProps(__spreadValues({}, (_b = partDrillDown.value) == null ? void 0 : _b.drillConfig), {
|
|
2977
|
+
setDrillFields,
|
|
2978
|
+
drillFields: drillFields.value,
|
|
2979
|
+
disabledFields
|
|
2980
|
+
}));
|
|
2981
|
+
instance == null ? void 0 : instance.showTooltip({
|
|
2982
|
+
position: {
|
|
2983
|
+
x: event.clientX,
|
|
2984
|
+
y: event.clientY
|
|
2985
|
+
},
|
|
2986
|
+
event,
|
|
2987
|
+
content: drillDownNode
|
|
2988
|
+
});
|
|
2989
|
+
}
|
|
2990
|
+
};
|
|
2991
|
+
const options = computed(() => buildDrillDownOptions(pivotOptions.value, partDrillDown.value, (params) => onDrillDownIconClick(params)));
|
|
2992
|
+
return {
|
|
2993
|
+
s2Ref,
|
|
2994
|
+
options
|
|
2995
|
+
};
|
|
2325
2996
|
},
|
|
2326
2997
|
components: {
|
|
2327
2998
|
BaseSheet
|
|
@@ -2329,7 +3000,10 @@ const _sfc_main$2 = defineComponent({
|
|
|
2329
3000
|
});
|
|
2330
3001
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2331
3002
|
const _component_BaseSheet = resolveComponent("BaseSheet");
|
|
2332
|
-
return openBlock(), createBlock(_component_BaseSheet,
|
|
3003
|
+
return openBlock(), createBlock(_component_BaseSheet, mergeProps(_ctx.$props, {
|
|
3004
|
+
ref: "s2Ref",
|
|
3005
|
+
options: _ctx.options
|
|
3006
|
+
}), null, 16, ["options"]);
|
|
2333
3007
|
}
|
|
2334
3008
|
var PivotSheet = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
2335
3009
|
const _sfc_main$1 = defineComponent({
|
|
@@ -2375,5 +3049,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2375
3049
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.sheetType), { ref: "s2Ref" }, null, 512);
|
|
2376
3050
|
}
|
|
2377
3051
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
2378
|
-
export { BaseSheet, PivotSheet, index as
|
|
3052
|
+
export { BaseSheet, PivotSheet, index as SheetComponent, TableSheet, useExpose };
|
|
2379
3053
|
//# sourceMappingURL=index.js.map
|