@antv/s2-vue 2.0.0-next.8 → 2.0.0
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/README.md +7 -8
- package/dist/s2-vue.min.css +1 -0
- package/dist/s2-vue.min.js +28 -0
- package/dist/s2-vue.min.js.map +1 -0
- package/esm/common/constant/index.d.ts +1 -0
- package/esm/common/constant/index.js +2 -0
- package/esm/common/constant/index.js.map +1 -0
- package/esm/common/constant/options.d.ts +2 -0
- package/esm/common/constant/options.js +7 -0
- package/esm/common/constant/options.js.map +1 -0
- package/esm/components/drill-down/index.vue.d.ts +126 -0
- package/esm/components/drill-down/index.vue.js +206 -0
- package/esm/components/drill-down/index.vue.js.map +1 -0
- package/esm/components/index.d.ts +6 -0
- package/esm/components/index.js +8 -0
- package/esm/components/index.js.map +1 -0
- package/esm/components/pagination/index.vue.d.ts +44 -0
- package/esm/components/pagination/index.vue.js +91 -0
- package/esm/components/pagination/index.vue.js.map +1 -0
- package/esm/components/sheets/base-sheet.vue.d.ts +391 -0
- package/esm/components/sheets/base-sheet.vue.js +119 -0
- package/esm/components/sheets/base-sheet.vue.js.map +1 -0
- package/esm/components/sheets/editable-sheet.vue.d.ts +2 -0
- package/esm/components/sheets/editable-sheet.vue.js +181 -0
- package/esm/components/sheets/editable-sheet.vue.js.map +1 -0
- package/esm/components/sheets/index.vue.d.ts +251 -0
- package/esm/components/sheets/index.vue.js +77 -0
- package/esm/components/sheets/index.vue.js.map +1 -0
- package/esm/components/sheets/pivot-sheet.vue.d.ts +322 -0
- package/esm/components/sheets/pivot-sheet.vue.js +117 -0
- package/esm/components/sheets/pivot-sheet.vue.js.map +1 -0
- package/esm/components/sheets/table-sheet.vue.d.ts +250 -0
- package/esm/components/sheets/table-sheet.vue.js +61 -0
- package/esm/components/sheets/table-sheet.vue.js.map +1 -0
- package/esm/components/tooltip/components/detail.vue.d.ts +6 -0
- package/esm/components/tooltip/components/detail.vue.js +53 -0
- package/esm/components/tooltip/components/detail.vue.js.map +1 -0
- package/esm/components/tooltip/components/head-info.vue.d.ts +6 -0
- package/esm/components/tooltip/components/head-info.vue.js +61 -0
- package/esm/components/tooltip/components/head-info.vue.js.map +1 -0
- package/esm/components/tooltip/components/infos.vue.d.ts +6 -0
- package/esm/components/tooltip/components/infos.vue.js +49 -0
- package/esm/components/tooltip/components/infos.vue.js.map +1 -0
- package/esm/components/tooltip/components/operator/index.d.ts +3 -0
- package/esm/components/tooltip/components/operator/index.js +4 -0
- package/esm/components/tooltip/components/operator/index.js.map +1 -0
- package/esm/components/tooltip/components/operator/index.vue.d.ts +14 -0
- package/esm/components/tooltip/components/operator/index.vue.js +149 -0
- package/esm/components/tooltip/components/operator/index.vue.js.map +1 -0
- package/esm/components/tooltip/components/operator/menu.vue.d.ts +21 -0
- package/esm/components/tooltip/components/operator/menu.vue.js +146 -0
- package/esm/components/tooltip/components/operator/menu.vue.js.map +1 -0
- package/esm/components/tooltip/components/operator/title.vue.d.ts +10 -0
- package/esm/components/tooltip/components/operator/title.vue.js +54 -0
- package/esm/components/tooltip/components/operator/title.vue.js.map +1 -0
- package/esm/components/tooltip/components/simple-tips.vue.d.ts +6 -0
- package/esm/components/tooltip/components/simple-tips.vue.js +55 -0
- package/esm/components/tooltip/components/simple-tips.vue.js.map +1 -0
- package/esm/components/tooltip/components/summary.vue.d.ts +11 -0
- package/esm/components/tooltip/components/summary.vue.js +71 -0
- package/esm/components/tooltip/components/summary.vue.js.map +1 -0
- package/esm/components/tooltip/custom-tooltip.d.ts +6 -0
- package/esm/components/tooltip/custom-tooltip.js +36 -0
- package/esm/components/tooltip/custom-tooltip.js.map +1 -0
- package/esm/components/tooltip/index.vue.d.ts +13 -0
- package/esm/components/tooltip/index.vue.js +124 -0
- package/esm/components/tooltip/index.vue.js.map +1 -0
- package/esm/components/tooltip/interface.d.ts +8 -0
- package/esm/components/tooltip/interface.js +2 -0
- package/esm/components/tooltip/interface.js.map +1 -0
- package/esm/hooks/useEvents.d.ts +4 -0
- package/esm/hooks/useEvents.js +125 -0
- package/esm/hooks/useEvents.js.map +1 -0
- package/esm/hooks/useExpose.d.ts +5 -0
- package/esm/hooks/useExpose.js +11 -0
- package/esm/hooks/useExpose.js.map +1 -0
- package/esm/hooks/useLoading.d.ts +6 -0
- package/esm/hooks/useLoading.js +18 -0
- package/esm/hooks/useLoading.js.map +1 -0
- package/esm/hooks/usePagination.d.ts +70 -0
- package/esm/hooks/usePagination.js +68 -0
- package/esm/hooks/usePagination.js.map +1 -0
- package/esm/hooks/useResize.d.ts +7 -0
- package/esm/hooks/useResize.js +20 -0
- package/esm/hooks/useResize.js.map +1 -0
- package/esm/hooks/useSheetUpdate.d.ts +13 -0
- package/esm/hooks/useSheetUpdate.js +56 -0
- package/esm/hooks/useSheetUpdate.js.map +1 -0
- package/esm/hooks/useSpreadSheet.d.ts +75 -0
- package/esm/hooks/useSpreadSheet.js +60 -0
- package/esm/hooks/useSpreadSheet.js.map +1 -0
- package/esm/index.d.ts +4 -6068
- package/esm/index.js +5 -3363
- package/esm/index.js.map +1 -1
- package/esm/interface.d.ts +47 -0
- package/esm/interface.js +2 -0
- package/esm/interface.js.map +1 -0
- package/esm/svg/calendar-icon.svg +13 -0
- package/esm/svg/location-icon.svg +13 -0
- package/esm/svg/text-icon.svg +13 -0
- package/esm/utils/extendLocale.d.ts +1 -0
- package/esm/utils/extendLocale.js +3 -0
- package/esm/utils/extendLocale.js.map +1 -0
- package/esm/utils/initPropAndEmits.d.ts +204 -0
- package/esm/utils/initPropAndEmits.js +158 -0
- package/esm/utils/initPropAndEmits.js.map +1 -0
- package/esm/utils/options.d.ts +2 -0
- package/esm/utils/options.js +4 -0
- package/esm/utils/options.js.map +1 -0
- package/lib/common/constant/index.d.ts +1 -0
- package/lib/common/constant/index.js +5 -0
- package/lib/common/constant/index.js.map +1 -0
- package/lib/common/constant/options.d.ts +2 -0
- package/lib/common/constant/options.js +10 -0
- package/lib/common/constant/options.js.map +1 -0
- package/lib/components/drill-down/index.vue.d.ts +126 -0
- package/lib/components/drill-down/index.vue.js +209 -0
- package/lib/components/drill-down/index.vue.js.map +1 -0
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.js +20 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/pagination/index.vue.d.ts +44 -0
- package/lib/components/pagination/index.vue.js +93 -0
- package/lib/components/pagination/index.vue.js.map +1 -0
- package/lib/components/sheets/base-sheet.vue.d.ts +391 -0
- package/lib/components/sheets/base-sheet.vue.js +122 -0
- package/lib/components/sheets/base-sheet.vue.js.map +1 -0
- package/lib/components/sheets/editable-sheet.vue.d.ts +2 -0
- package/lib/components/sheets/editable-sheet.vue.js +184 -0
- package/lib/components/sheets/editable-sheet.vue.js.map +1 -0
- package/lib/components/sheets/index.vue.d.ts +251 -0
- package/lib/components/sheets/index.vue.js +80 -0
- package/lib/components/sheets/index.vue.js.map +1 -0
- package/lib/components/sheets/pivot-sheet.vue.d.ts +322 -0
- package/lib/components/sheets/pivot-sheet.vue.js +120 -0
- package/lib/components/sheets/pivot-sheet.vue.js.map +1 -0
- package/lib/components/sheets/table-sheet.vue.d.ts +250 -0
- package/lib/components/sheets/table-sheet.vue.js +64 -0
- package/lib/components/sheets/table-sheet.vue.js.map +1 -0
- package/lib/components/tooltip/components/detail.vue.d.ts +6 -0
- package/lib/components/tooltip/components/detail.vue.js +55 -0
- package/lib/components/tooltip/components/detail.vue.js.map +1 -0
- package/lib/components/tooltip/components/head-info.vue.d.ts +6 -0
- package/lib/components/tooltip/components/head-info.vue.js +63 -0
- package/lib/components/tooltip/components/head-info.vue.js.map +1 -0
- package/lib/components/tooltip/components/infos.vue.d.ts +6 -0
- package/lib/components/tooltip/components/infos.vue.js +51 -0
- package/lib/components/tooltip/components/infos.vue.js.map +1 -0
- package/lib/components/tooltip/components/operator/index.d.ts +3 -0
- package/lib/components/tooltip/components/operator/index.js +13 -0
- package/lib/components/tooltip/components/operator/index.js.map +1 -0
- package/lib/components/tooltip/components/operator/index.vue.d.ts +14 -0
- package/lib/components/tooltip/components/operator/index.vue.js +152 -0
- package/lib/components/tooltip/components/operator/index.vue.js.map +1 -0
- package/lib/components/tooltip/components/operator/menu.vue.d.ts +21 -0
- package/lib/components/tooltip/components/operator/menu.vue.js +149 -0
- package/lib/components/tooltip/components/operator/menu.vue.js.map +1 -0
- package/lib/components/tooltip/components/operator/title.vue.d.ts +10 -0
- package/lib/components/tooltip/components/operator/title.vue.js +56 -0
- package/lib/components/tooltip/components/operator/title.vue.js.map +1 -0
- package/lib/components/tooltip/components/simple-tips.vue.d.ts +6 -0
- package/lib/components/tooltip/components/simple-tips.vue.js +57 -0
- package/lib/components/tooltip/components/simple-tips.vue.js.map +1 -0
- package/lib/components/tooltip/components/summary.vue.d.ts +11 -0
- package/lib/components/tooltip/components/summary.vue.js +73 -0
- package/lib/components/tooltip/components/summary.vue.js.map +1 -0
- package/lib/components/tooltip/custom-tooltip.d.ts +6 -0
- package/lib/components/tooltip/custom-tooltip.js +41 -0
- package/lib/components/tooltip/custom-tooltip.js.map +1 -0
- package/lib/components/tooltip/index.vue.d.ts +13 -0
- package/lib/components/tooltip/index.vue.js +127 -0
- package/lib/components/tooltip/index.vue.js.map +1 -0
- package/lib/components/tooltip/interface.d.ts +8 -0
- package/lib/components/tooltip/interface.js +3 -0
- package/lib/components/tooltip/interface.js.map +1 -0
- package/lib/hooks/useEvents.d.ts +4 -0
- package/lib/hooks/useEvents.js +129 -0
- package/lib/hooks/useEvents.js.map +1 -0
- package/lib/hooks/useExpose.d.ts +5 -0
- package/lib/hooks/useExpose.js +15 -0
- package/lib/hooks/useExpose.js.map +1 -0
- package/lib/hooks/useLoading.d.ts +6 -0
- package/lib/hooks/useLoading.js +22 -0
- package/lib/hooks/useLoading.js.map +1 -0
- package/lib/hooks/usePagination.d.ts +70 -0
- package/lib/hooks/usePagination.js +72 -0
- package/lib/hooks/usePagination.js.map +1 -0
- package/lib/hooks/useResize.d.ts +7 -0
- package/lib/hooks/useResize.js +24 -0
- package/lib/hooks/useResize.js.map +1 -0
- package/lib/hooks/useSheetUpdate.d.ts +13 -0
- package/lib/hooks/useSheetUpdate.js +60 -0
- package/lib/hooks/useSheetUpdate.js.map +1 -0
- package/lib/hooks/useSpreadSheet.d.ts +75 -0
- package/lib/hooks/useSpreadSheet.js +64 -0
- package/lib/hooks/useSpreadSheet.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +8 -3362
- package/lib/index.js.map +1 -1
- package/lib/interface.d.ts +47 -0
- package/lib/interface.js +3 -0
- package/lib/interface.js.map +1 -0
- package/lib/svg/calendar-icon.svg +13 -0
- package/lib/svg/location-icon.svg +13 -0
- package/lib/svg/text-icon.svg +13 -0
- package/lib/utils/extendLocale.d.ts +1 -0
- package/lib/utils/extendLocale.js +5 -0
- package/lib/utils/extendLocale.js.map +1 -0
- package/lib/utils/initPropAndEmits.d.ts +204 -0
- package/lib/utils/initPropAndEmits.js +165 -0
- package/lib/utils/initPropAndEmits.js.map +1 -0
- package/lib/utils/options.d.ts +2 -0
- package/lib/utils/options.js +8 -0
- package/lib/utils/options.js.map +1 -0
- package/package.json +65 -57
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/dist/style.min.css +0 -1
- package/esm/style.css +0 -393
- package/lib/style.css +0 -393
package/lib/index.js
CHANGED
|
@@ -1,3363 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
取消: "Cancel",
|
|
11
|
-
重置: "Reset",
|
|
12
|
-
请输入关键字搜索: "Please enter a keyword search",
|
|
13
|
-
搜索: "Search",
|
|
14
|
-
恢复: "Recover",
|
|
15
|
-
"已选 {} 项": "selected {} item",
|
|
16
|
-
所选项: "selected items",
|
|
17
|
-
选择下钻维度: "Select drill down dimension",
|
|
18
|
-
恢复默认: "Restore default",
|
|
19
|
-
搜索字段: "Search field",
|
|
20
|
-
// switcher
|
|
21
|
-
行列切换: "Switch Dimensions",
|
|
22
|
-
行头: "Rows",
|
|
23
|
-
列头: "Cols",
|
|
24
|
-
值: "Values",
|
|
25
|
-
展开子项: "Expand Children",
|
|
26
|
-
// sort
|
|
27
|
-
首字母: "Alphabetical order",
|
|
28
|
-
手动排序: "Custom order",
|
|
29
|
-
其他字段: "Other field",
|
|
30
|
-
高级排序: "Advanced order",
|
|
31
|
-
设置顺序: "SetManual",
|
|
32
|
-
可选字段: "Fields",
|
|
33
|
-
"按以下规则进行排序(优先级由低到高)": "Order according to the following rules (from low to high priority)",
|
|
34
|
-
按: "By",
|
|
35
|
-
说明: "Description",
|
|
36
|
-
// export
|
|
37
|
-
复制原始数据: "Copy raw data",
|
|
38
|
-
复制格式化数据: "Copy formatted data",
|
|
39
|
-
下载原始数据: "Download raw data",
|
|
40
|
-
下载格式化数据: "Download formatted data",
|
|
41
|
-
操作成功: "Operation successful",
|
|
42
|
-
操作失败: "Operation failed",
|
|
43
|
-
// strategy
|
|
44
|
-
时间: "Date",
|
|
45
|
-
指标: "Measure",
|
|
46
|
-
目标值: "Target Value"
|
|
47
|
-
};
|
|
48
|
-
const ZH_CN = {
|
|
49
|
-
选择分析信息: "选择分析信息",
|
|
50
|
-
切换指标: "切换指标",
|
|
51
|
-
确定: "确定",
|
|
52
|
-
取消: "取消",
|
|
53
|
-
重置: "重置",
|
|
54
|
-
请输入关键字搜索: "请输入关键字搜索",
|
|
55
|
-
搜索: "搜索",
|
|
56
|
-
恢复: "恢复",
|
|
57
|
-
"已选 {} 项": "已选 {} 项",
|
|
58
|
-
所选项: "所选项",
|
|
59
|
-
选择下钻维度: "选择下钻维度",
|
|
60
|
-
恢复默认: "恢复默认",
|
|
61
|
-
搜索字段: "搜索字段",
|
|
62
|
-
// switcher
|
|
63
|
-
行列切换: "行列切换",
|
|
64
|
-
行头: "行头",
|
|
65
|
-
列头: "列头",
|
|
66
|
-
值: "值",
|
|
67
|
-
展开子项: "展开子项",
|
|
68
|
-
// sort
|
|
69
|
-
首字母: "首字母",
|
|
70
|
-
手动排序: "手动排序",
|
|
71
|
-
其他字段: "其他字段",
|
|
72
|
-
高级排序: "高级排序",
|
|
73
|
-
设置顺序: "设置顺序",
|
|
74
|
-
可选字段: "可选字段",
|
|
75
|
-
"按以下规则进行排序(优先级由低到高)": "按以下规则进行排序(优先级由低到高)",
|
|
76
|
-
按: "按",
|
|
77
|
-
说明: "说明",
|
|
78
|
-
// export
|
|
79
|
-
复制原始数据: "复制原始数据",
|
|
80
|
-
复制格式化数据: "复制格式化数据",
|
|
81
|
-
下载原始数据: "下载原始数据",
|
|
82
|
-
下载格式化数据: "下载格式化数据",
|
|
83
|
-
操作成功: "操作成功",
|
|
84
|
-
操作失败: "操作失败",
|
|
85
|
-
// strategy
|
|
86
|
-
时间: "时间",
|
|
87
|
-
指标: "指标",
|
|
88
|
-
目标值: "目标值"
|
|
89
|
-
};
|
|
90
|
-
const Locale = {
|
|
91
|
-
zh_CN: ZH_CN,
|
|
92
|
-
en_US: EN_US
|
|
93
|
-
};
|
|
94
|
-
const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
95
|
-
tooltip: {
|
|
96
|
-
enable: true,
|
|
97
|
-
autoAdjustBoundary: "body",
|
|
98
|
-
operation: {
|
|
99
|
-
hiddenColumns: true,
|
|
100
|
-
sort: true
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
showDefaultHeaderActionIcon: true
|
|
104
|
-
};
|
|
105
|
-
const RESIZE_RENDER_DELAY = 200;
|
|
106
|
-
const DRILL_DOWN_PRE_CLASS = `${s2.S2_PREFIX_CLS}-drill-down`;
|
|
107
|
-
const getBaseSheetComponentOptions = (...options) => s2.customMerge(
|
|
108
|
-
s2.DEFAULT_OPTIONS,
|
|
109
|
-
SHEET_COMPONENT_DEFAULT_OPTIONS,
|
|
110
|
-
...options
|
|
111
|
-
);
|
|
112
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
113
|
-
const freeGlobal$1 = freeGlobal;
|
|
114
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
115
|
-
var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
116
|
-
const root$1 = root;
|
|
117
|
-
var Symbol$1 = root$1.Symbol;
|
|
118
|
-
const Symbol$2 = Symbol$1;
|
|
119
|
-
var objectProto$f = Object.prototype;
|
|
120
|
-
var hasOwnProperty$c = objectProto$f.hasOwnProperty;
|
|
121
|
-
var nativeObjectToString$1 = objectProto$f.toString;
|
|
122
|
-
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
123
|
-
function getRawTag(value) {
|
|
124
|
-
var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
125
|
-
try {
|
|
126
|
-
value[symToStringTag$1] = void 0;
|
|
127
|
-
var unmasked = true;
|
|
128
|
-
} catch (e) {
|
|
129
|
-
}
|
|
130
|
-
var result = nativeObjectToString$1.call(value);
|
|
131
|
-
if (unmasked) {
|
|
132
|
-
if (isOwn) {
|
|
133
|
-
value[symToStringTag$1] = tag;
|
|
134
|
-
} else {
|
|
135
|
-
delete value[symToStringTag$1];
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
140
|
-
var objectProto$e = Object.prototype;
|
|
141
|
-
var nativeObjectToString = objectProto$e.toString;
|
|
142
|
-
function objectToString(value) {
|
|
143
|
-
return nativeObjectToString.call(value);
|
|
144
|
-
}
|
|
145
|
-
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
146
|
-
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
147
|
-
function baseGetTag(value) {
|
|
148
|
-
if (value == null) {
|
|
149
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
150
|
-
}
|
|
151
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
152
|
-
}
|
|
153
|
-
function isObjectLike(value) {
|
|
154
|
-
return value != null && typeof value == "object";
|
|
155
|
-
}
|
|
156
|
-
var symbolTag$3 = "[object Symbol]";
|
|
157
|
-
function isSymbol(value) {
|
|
158
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
|
|
159
|
-
}
|
|
160
|
-
function arrayMap(array, iteratee) {
|
|
161
|
-
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
162
|
-
while (++index2 < length) {
|
|
163
|
-
result[index2] = iteratee(array[index2], index2, array);
|
|
164
|
-
}
|
|
165
|
-
return result;
|
|
166
|
-
}
|
|
167
|
-
var isArray = Array.isArray;
|
|
168
|
-
const isArray$1 = isArray;
|
|
169
|
-
var INFINITY$1 = 1 / 0;
|
|
170
|
-
var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
|
|
171
|
-
function baseToString(value) {
|
|
172
|
-
if (typeof value == "string") {
|
|
173
|
-
return value;
|
|
174
|
-
}
|
|
175
|
-
if (isArray$1(value)) {
|
|
176
|
-
return arrayMap(value, baseToString) + "";
|
|
177
|
-
}
|
|
178
|
-
if (isSymbol(value)) {
|
|
179
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
180
|
-
}
|
|
181
|
-
var result = value + "";
|
|
182
|
-
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
183
|
-
}
|
|
184
|
-
var reWhitespace = /\s/;
|
|
185
|
-
function trimmedEndIndex(string) {
|
|
186
|
-
var index2 = string.length;
|
|
187
|
-
while (index2-- && reWhitespace.test(string.charAt(index2))) {
|
|
188
|
-
}
|
|
189
|
-
return index2;
|
|
190
|
-
}
|
|
191
|
-
var reTrimStart = /^\s+/;
|
|
192
|
-
function baseTrim(string) {
|
|
193
|
-
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
194
|
-
}
|
|
195
|
-
function isObject(value) {
|
|
196
|
-
var type = typeof value;
|
|
197
|
-
return value != null && (type == "object" || type == "function");
|
|
198
|
-
}
|
|
199
|
-
var NAN = 0 / 0;
|
|
200
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
201
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
202
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
203
|
-
var freeParseInt = parseInt;
|
|
204
|
-
function toNumber(value) {
|
|
205
|
-
if (typeof value == "number") {
|
|
206
|
-
return value;
|
|
207
|
-
}
|
|
208
|
-
if (isSymbol(value)) {
|
|
209
|
-
return NAN;
|
|
210
|
-
}
|
|
211
|
-
if (isObject(value)) {
|
|
212
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
213
|
-
value = isObject(other) ? other + "" : other;
|
|
214
|
-
}
|
|
215
|
-
if (typeof value != "string") {
|
|
216
|
-
return value === 0 ? value : +value;
|
|
217
|
-
}
|
|
218
|
-
value = baseTrim(value);
|
|
219
|
-
var isBinary = reIsBinary.test(value);
|
|
220
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
221
|
-
}
|
|
222
|
-
function identity(value) {
|
|
223
|
-
return value;
|
|
224
|
-
}
|
|
225
|
-
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
226
|
-
function isFunction(value) {
|
|
227
|
-
if (!isObject(value)) {
|
|
228
|
-
return false;
|
|
229
|
-
}
|
|
230
|
-
var tag = baseGetTag(value);
|
|
231
|
-
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
232
|
-
}
|
|
233
|
-
var coreJsData = root$1["__core-js_shared__"];
|
|
234
|
-
const coreJsData$1 = coreJsData;
|
|
235
|
-
var maskSrcKey = function() {
|
|
236
|
-
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
|
|
237
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
238
|
-
}();
|
|
239
|
-
function isMasked(func) {
|
|
240
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
241
|
-
}
|
|
242
|
-
var funcProto$1 = Function.prototype;
|
|
243
|
-
var funcToString$1 = funcProto$1.toString;
|
|
244
|
-
function toSource(func) {
|
|
245
|
-
if (func != null) {
|
|
246
|
-
try {
|
|
247
|
-
return funcToString$1.call(func);
|
|
248
|
-
} catch (e) {
|
|
249
|
-
}
|
|
250
|
-
try {
|
|
251
|
-
return func + "";
|
|
252
|
-
} catch (e) {
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return "";
|
|
256
|
-
}
|
|
257
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
258
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
259
|
-
var funcProto = Function.prototype, objectProto$d = Object.prototype;
|
|
260
|
-
var funcToString = funcProto.toString;
|
|
261
|
-
var hasOwnProperty$b = objectProto$d.hasOwnProperty;
|
|
262
|
-
var reIsNative = RegExp(
|
|
263
|
-
"^" + funcToString.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
264
|
-
);
|
|
265
|
-
function baseIsNative(value) {
|
|
266
|
-
if (!isObject(value) || isMasked(value)) {
|
|
267
|
-
return false;
|
|
268
|
-
}
|
|
269
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
270
|
-
return pattern.test(toSource(value));
|
|
271
|
-
}
|
|
272
|
-
function getValue(object, key) {
|
|
273
|
-
return object == null ? void 0 : object[key];
|
|
274
|
-
}
|
|
275
|
-
function getNative(object, key) {
|
|
276
|
-
var value = getValue(object, key);
|
|
277
|
-
return baseIsNative(value) ? value : void 0;
|
|
278
|
-
}
|
|
279
|
-
var WeakMap = getNative(root$1, "WeakMap");
|
|
280
|
-
const WeakMap$1 = WeakMap;
|
|
281
|
-
var objectCreate = Object.create;
|
|
282
|
-
var baseCreate = function() {
|
|
283
|
-
function object() {
|
|
284
|
-
}
|
|
285
|
-
return function(proto) {
|
|
286
|
-
if (!isObject(proto)) {
|
|
287
|
-
return {};
|
|
288
|
-
}
|
|
289
|
-
if (objectCreate) {
|
|
290
|
-
return objectCreate(proto);
|
|
291
|
-
}
|
|
292
|
-
object.prototype = proto;
|
|
293
|
-
var result = new object();
|
|
294
|
-
object.prototype = void 0;
|
|
295
|
-
return result;
|
|
296
|
-
};
|
|
297
|
-
}();
|
|
298
|
-
const baseCreate$1 = baseCreate;
|
|
299
|
-
function copyArray(source, array) {
|
|
300
|
-
var index2 = -1, length = source.length;
|
|
301
|
-
array || (array = Array(length));
|
|
302
|
-
while (++index2 < length) {
|
|
303
|
-
array[index2] = source[index2];
|
|
304
|
-
}
|
|
305
|
-
return array;
|
|
306
|
-
}
|
|
307
|
-
var defineProperty = function() {
|
|
308
|
-
try {
|
|
309
|
-
var func = getNative(Object, "defineProperty");
|
|
310
|
-
func({}, "", {});
|
|
311
|
-
return func;
|
|
312
|
-
} catch (e) {
|
|
313
|
-
}
|
|
314
|
-
}();
|
|
315
|
-
const defineProperty$1 = defineProperty;
|
|
316
|
-
function arrayEach(array, iteratee) {
|
|
317
|
-
var index2 = -1, length = array == null ? 0 : array.length;
|
|
318
|
-
while (++index2 < length) {
|
|
319
|
-
if (iteratee(array[index2], index2, array) === false) {
|
|
320
|
-
break;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
return array;
|
|
324
|
-
}
|
|
325
|
-
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
326
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
327
|
-
function isIndex(value, length) {
|
|
328
|
-
var type = typeof value;
|
|
329
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
330
|
-
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
331
|
-
}
|
|
332
|
-
function baseAssignValue(object, key, value) {
|
|
333
|
-
if (key == "__proto__" && defineProperty$1) {
|
|
334
|
-
defineProperty$1(object, key, {
|
|
335
|
-
"configurable": true,
|
|
336
|
-
"enumerable": true,
|
|
337
|
-
"value": value,
|
|
338
|
-
"writable": true
|
|
339
|
-
});
|
|
340
|
-
} else {
|
|
341
|
-
object[key] = value;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
function eq(value, other) {
|
|
345
|
-
return value === other || value !== value && other !== other;
|
|
346
|
-
}
|
|
347
|
-
var objectProto$c = Object.prototype;
|
|
348
|
-
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
349
|
-
function assignValue(object, key, value) {
|
|
350
|
-
var objValue = object[key];
|
|
351
|
-
if (!(hasOwnProperty$a.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
352
|
-
baseAssignValue(object, key, value);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
function copyObject(source, props, object, customizer) {
|
|
356
|
-
var isNew = !object;
|
|
357
|
-
object || (object = {});
|
|
358
|
-
var index2 = -1, length = props.length;
|
|
359
|
-
while (++index2 < length) {
|
|
360
|
-
var key = props[index2];
|
|
361
|
-
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
|
|
362
|
-
if (newValue === void 0) {
|
|
363
|
-
newValue = source[key];
|
|
364
|
-
}
|
|
365
|
-
if (isNew) {
|
|
366
|
-
baseAssignValue(object, key, newValue);
|
|
367
|
-
} else {
|
|
368
|
-
assignValue(object, key, newValue);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
return object;
|
|
372
|
-
}
|
|
373
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
374
|
-
function isLength(value) {
|
|
375
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
376
|
-
}
|
|
377
|
-
function isArrayLike(value) {
|
|
378
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
379
|
-
}
|
|
380
|
-
var objectProto$b = Object.prototype;
|
|
381
|
-
function isPrototype(value) {
|
|
382
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$b;
|
|
383
|
-
return value === proto;
|
|
384
|
-
}
|
|
385
|
-
function baseTimes(n, iteratee) {
|
|
386
|
-
var index2 = -1, result = Array(n);
|
|
387
|
-
while (++index2 < n) {
|
|
388
|
-
result[index2] = iteratee(index2);
|
|
389
|
-
}
|
|
390
|
-
return result;
|
|
391
|
-
}
|
|
392
|
-
var argsTag$3 = "[object Arguments]";
|
|
393
|
-
function baseIsArguments(value) {
|
|
394
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag$3;
|
|
395
|
-
}
|
|
396
|
-
var objectProto$a = Object.prototype;
|
|
397
|
-
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
398
|
-
var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
|
|
399
|
-
var isArguments = baseIsArguments(function() {
|
|
400
|
-
return arguments;
|
|
401
|
-
}()) ? baseIsArguments : function(value) {
|
|
402
|
-
return isObjectLike(value) && hasOwnProperty$9.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
403
|
-
};
|
|
404
|
-
const isArguments$1 = isArguments;
|
|
405
|
-
function stubFalse() {
|
|
406
|
-
return false;
|
|
407
|
-
}
|
|
408
|
-
var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
409
|
-
var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
|
|
410
|
-
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
411
|
-
var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0;
|
|
412
|
-
var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
|
|
413
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
414
|
-
const isBuffer$1 = isBuffer;
|
|
415
|
-
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]";
|
|
416
|
-
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]";
|
|
417
|
-
var typedArrayTags = {};
|
|
418
|
-
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;
|
|
419
|
-
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;
|
|
420
|
-
function baseIsTypedArray(value) {
|
|
421
|
-
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
422
|
-
}
|
|
423
|
-
function baseUnary(func) {
|
|
424
|
-
return function(value) {
|
|
425
|
-
return func(value);
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
429
|
-
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
430
|
-
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
431
|
-
var freeProcess = moduleExports$1 && freeGlobal$1.process;
|
|
432
|
-
var nodeUtil = function() {
|
|
433
|
-
try {
|
|
434
|
-
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
|
|
435
|
-
if (types) {
|
|
436
|
-
return types;
|
|
437
|
-
}
|
|
438
|
-
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
439
|
-
} catch (e) {
|
|
440
|
-
}
|
|
441
|
-
}();
|
|
442
|
-
const nodeUtil$1 = nodeUtil;
|
|
443
|
-
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
444
|
-
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
445
|
-
const isTypedArray$1 = isTypedArray;
|
|
446
|
-
var objectProto$9 = Object.prototype;
|
|
447
|
-
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
448
|
-
function arrayLikeKeys(value, inherited) {
|
|
449
|
-
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;
|
|
450
|
-
for (var key in value) {
|
|
451
|
-
if ((inherited || hasOwnProperty$8.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
452
|
-
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
453
|
-
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
454
|
-
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
455
|
-
isIndex(key, length)))) {
|
|
456
|
-
result.push(key);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
return result;
|
|
460
|
-
}
|
|
461
|
-
function overArg(func, transform) {
|
|
462
|
-
return function(arg) {
|
|
463
|
-
return func(transform(arg));
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
var nativeKeys = overArg(Object.keys, Object);
|
|
467
|
-
const nativeKeys$1 = nativeKeys;
|
|
468
|
-
var objectProto$8 = Object.prototype;
|
|
469
|
-
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
470
|
-
function baseKeys(object) {
|
|
471
|
-
if (!isPrototype(object)) {
|
|
472
|
-
return nativeKeys$1(object);
|
|
473
|
-
}
|
|
474
|
-
var result = [];
|
|
475
|
-
for (var key in Object(object)) {
|
|
476
|
-
if (hasOwnProperty$7.call(object, key) && key != "constructor") {
|
|
477
|
-
result.push(key);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
return result;
|
|
481
|
-
}
|
|
482
|
-
function keys(object) {
|
|
483
|
-
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
484
|
-
}
|
|
485
|
-
function nativeKeysIn(object) {
|
|
486
|
-
var result = [];
|
|
487
|
-
if (object != null) {
|
|
488
|
-
for (var key in Object(object)) {
|
|
489
|
-
result.push(key);
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
return result;
|
|
493
|
-
}
|
|
494
|
-
var objectProto$7 = Object.prototype;
|
|
495
|
-
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
496
|
-
function baseKeysIn(object) {
|
|
497
|
-
if (!isObject(object)) {
|
|
498
|
-
return nativeKeysIn(object);
|
|
499
|
-
}
|
|
500
|
-
var isProto = isPrototype(object), result = [];
|
|
501
|
-
for (var key in object) {
|
|
502
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty$6.call(object, key)))) {
|
|
503
|
-
result.push(key);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
return result;
|
|
507
|
-
}
|
|
508
|
-
function keysIn(object) {
|
|
509
|
-
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
510
|
-
}
|
|
511
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
512
|
-
function isKey(value, object) {
|
|
513
|
-
if (isArray$1(value)) {
|
|
514
|
-
return false;
|
|
515
|
-
}
|
|
516
|
-
var type = typeof value;
|
|
517
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
|
|
518
|
-
return true;
|
|
519
|
-
}
|
|
520
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
521
|
-
}
|
|
522
|
-
var nativeCreate = getNative(Object, "create");
|
|
523
|
-
const nativeCreate$1 = nativeCreate;
|
|
524
|
-
function hashClear() {
|
|
525
|
-
this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
|
|
526
|
-
this.size = 0;
|
|
527
|
-
}
|
|
528
|
-
function hashDelete(key) {
|
|
529
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
530
|
-
this.size -= result ? 1 : 0;
|
|
531
|
-
return result;
|
|
532
|
-
}
|
|
533
|
-
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
534
|
-
var objectProto$6 = Object.prototype;
|
|
535
|
-
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
536
|
-
function hashGet(key) {
|
|
537
|
-
var data = this.__data__;
|
|
538
|
-
if (nativeCreate$1) {
|
|
539
|
-
var result = data[key];
|
|
540
|
-
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
541
|
-
}
|
|
542
|
-
return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
|
|
543
|
-
}
|
|
544
|
-
var objectProto$5 = Object.prototype;
|
|
545
|
-
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
546
|
-
function hashHas(key) {
|
|
547
|
-
var data = this.__data__;
|
|
548
|
-
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
|
|
549
|
-
}
|
|
550
|
-
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
551
|
-
function hashSet(key, value) {
|
|
552
|
-
var data = this.__data__;
|
|
553
|
-
this.size += this.has(key) ? 0 : 1;
|
|
554
|
-
data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
555
|
-
return this;
|
|
556
|
-
}
|
|
557
|
-
function Hash(entries) {
|
|
558
|
-
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
559
|
-
this.clear();
|
|
560
|
-
while (++index2 < length) {
|
|
561
|
-
var entry = entries[index2];
|
|
562
|
-
this.set(entry[0], entry[1]);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
Hash.prototype.clear = hashClear;
|
|
566
|
-
Hash.prototype["delete"] = hashDelete;
|
|
567
|
-
Hash.prototype.get = hashGet;
|
|
568
|
-
Hash.prototype.has = hashHas;
|
|
569
|
-
Hash.prototype.set = hashSet;
|
|
570
|
-
function listCacheClear() {
|
|
571
|
-
this.__data__ = [];
|
|
572
|
-
this.size = 0;
|
|
573
|
-
}
|
|
574
|
-
function assocIndexOf(array, key) {
|
|
575
|
-
var length = array.length;
|
|
576
|
-
while (length--) {
|
|
577
|
-
if (eq(array[length][0], key)) {
|
|
578
|
-
return length;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
return -1;
|
|
582
|
-
}
|
|
583
|
-
var arrayProto = Array.prototype;
|
|
584
|
-
var splice = arrayProto.splice;
|
|
585
|
-
function listCacheDelete(key) {
|
|
586
|
-
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
587
|
-
if (index2 < 0) {
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
|
-
var lastIndex = data.length - 1;
|
|
591
|
-
if (index2 == lastIndex) {
|
|
592
|
-
data.pop();
|
|
593
|
-
} else {
|
|
594
|
-
splice.call(data, index2, 1);
|
|
595
|
-
}
|
|
596
|
-
--this.size;
|
|
597
|
-
return true;
|
|
598
|
-
}
|
|
599
|
-
function listCacheGet(key) {
|
|
600
|
-
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
601
|
-
return index2 < 0 ? void 0 : data[index2][1];
|
|
602
|
-
}
|
|
603
|
-
function listCacheHas(key) {
|
|
604
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
605
|
-
}
|
|
606
|
-
function listCacheSet(key, value) {
|
|
607
|
-
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
608
|
-
if (index2 < 0) {
|
|
609
|
-
++this.size;
|
|
610
|
-
data.push([key, value]);
|
|
611
|
-
} else {
|
|
612
|
-
data[index2][1] = value;
|
|
613
|
-
}
|
|
614
|
-
return this;
|
|
615
|
-
}
|
|
616
|
-
function ListCache(entries) {
|
|
617
|
-
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
618
|
-
this.clear();
|
|
619
|
-
while (++index2 < length) {
|
|
620
|
-
var entry = entries[index2];
|
|
621
|
-
this.set(entry[0], entry[1]);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
ListCache.prototype.clear = listCacheClear;
|
|
625
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
626
|
-
ListCache.prototype.get = listCacheGet;
|
|
627
|
-
ListCache.prototype.has = listCacheHas;
|
|
628
|
-
ListCache.prototype.set = listCacheSet;
|
|
629
|
-
var Map = getNative(root$1, "Map");
|
|
630
|
-
const Map$1 = Map;
|
|
631
|
-
function mapCacheClear() {
|
|
632
|
-
this.size = 0;
|
|
633
|
-
this.__data__ = {
|
|
634
|
-
"hash": new Hash(),
|
|
635
|
-
"map": new (Map$1 || ListCache)(),
|
|
636
|
-
"string": new Hash()
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
function isKeyable(value) {
|
|
640
|
-
var type = typeof value;
|
|
641
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
642
|
-
}
|
|
643
|
-
function getMapData(map, key) {
|
|
644
|
-
var data = map.__data__;
|
|
645
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
646
|
-
}
|
|
647
|
-
function mapCacheDelete(key) {
|
|
648
|
-
var result = getMapData(this, key)["delete"](key);
|
|
649
|
-
this.size -= result ? 1 : 0;
|
|
650
|
-
return result;
|
|
651
|
-
}
|
|
652
|
-
function mapCacheGet(key) {
|
|
653
|
-
return getMapData(this, key).get(key);
|
|
654
|
-
}
|
|
655
|
-
function mapCacheHas(key) {
|
|
656
|
-
return getMapData(this, key).has(key);
|
|
657
|
-
}
|
|
658
|
-
function mapCacheSet(key, value) {
|
|
659
|
-
var data = getMapData(this, key), size2 = data.size;
|
|
660
|
-
data.set(key, value);
|
|
661
|
-
this.size += data.size == size2 ? 0 : 1;
|
|
662
|
-
return this;
|
|
663
|
-
}
|
|
664
|
-
function MapCache(entries) {
|
|
665
|
-
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
666
|
-
this.clear();
|
|
667
|
-
while (++index2 < length) {
|
|
668
|
-
var entry = entries[index2];
|
|
669
|
-
this.set(entry[0], entry[1]);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
MapCache.prototype.clear = mapCacheClear;
|
|
673
|
-
MapCache.prototype["delete"] = mapCacheDelete;
|
|
674
|
-
MapCache.prototype.get = mapCacheGet;
|
|
675
|
-
MapCache.prototype.has = mapCacheHas;
|
|
676
|
-
MapCache.prototype.set = mapCacheSet;
|
|
677
|
-
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
678
|
-
function memoize(func, resolver) {
|
|
679
|
-
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
680
|
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
681
|
-
}
|
|
682
|
-
var memoized = function() {
|
|
683
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
684
|
-
if (cache.has(key)) {
|
|
685
|
-
return cache.get(key);
|
|
686
|
-
}
|
|
687
|
-
var result = func.apply(this, args);
|
|
688
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
689
|
-
return result;
|
|
690
|
-
};
|
|
691
|
-
memoized.cache = new (memoize.Cache || MapCache)();
|
|
692
|
-
return memoized;
|
|
693
|
-
}
|
|
694
|
-
memoize.Cache = MapCache;
|
|
695
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
696
|
-
function memoizeCapped(func) {
|
|
697
|
-
var result = memoize(func, function(key) {
|
|
698
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
699
|
-
cache.clear();
|
|
700
|
-
}
|
|
701
|
-
return key;
|
|
702
|
-
});
|
|
703
|
-
var cache = result.cache;
|
|
704
|
-
return result;
|
|
705
|
-
}
|
|
706
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
707
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
708
|
-
var stringToPath = memoizeCapped(function(string) {
|
|
709
|
-
var result = [];
|
|
710
|
-
if (string.charCodeAt(0) === 46) {
|
|
711
|
-
result.push("");
|
|
712
|
-
}
|
|
713
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
714
|
-
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
715
|
-
});
|
|
716
|
-
return result;
|
|
717
|
-
});
|
|
718
|
-
const stringToPath$1 = stringToPath;
|
|
719
|
-
function toString(value) {
|
|
720
|
-
return value == null ? "" : baseToString(value);
|
|
721
|
-
}
|
|
722
|
-
function castPath(value, object) {
|
|
723
|
-
if (isArray$1(value)) {
|
|
724
|
-
return value;
|
|
725
|
-
}
|
|
726
|
-
return isKey(value, object) ? [value] : stringToPath$1(toString(value));
|
|
727
|
-
}
|
|
728
|
-
var INFINITY = 1 / 0;
|
|
729
|
-
function toKey(value) {
|
|
730
|
-
if (typeof value == "string" || isSymbol(value)) {
|
|
731
|
-
return value;
|
|
732
|
-
}
|
|
733
|
-
var result = value + "";
|
|
734
|
-
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
735
|
-
}
|
|
736
|
-
function baseGet(object, path) {
|
|
737
|
-
path = castPath(path, object);
|
|
738
|
-
var index2 = 0, length = path.length;
|
|
739
|
-
while (object != null && index2 < length) {
|
|
740
|
-
object = object[toKey(path[index2++])];
|
|
741
|
-
}
|
|
742
|
-
return index2 && index2 == length ? object : void 0;
|
|
743
|
-
}
|
|
744
|
-
function get(object, path, defaultValue) {
|
|
745
|
-
var result = object == null ? void 0 : baseGet(object, path);
|
|
746
|
-
return result === void 0 ? defaultValue : result;
|
|
747
|
-
}
|
|
748
|
-
function arrayPush(array, values) {
|
|
749
|
-
var index2 = -1, length = values.length, offset = array.length;
|
|
750
|
-
while (++index2 < length) {
|
|
751
|
-
array[offset + index2] = values[index2];
|
|
752
|
-
}
|
|
753
|
-
return array;
|
|
754
|
-
}
|
|
755
|
-
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
756
|
-
const getPrototype$1 = getPrototype;
|
|
757
|
-
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
|
-
var rsZWJ$1 = "\\u200d";
|
|
759
|
-
var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
|
|
760
|
-
function hasUnicode(string) {
|
|
761
|
-
return reHasUnicode.test(string);
|
|
762
|
-
}
|
|
763
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
764
|
-
var index2 = -1, length = array == null ? 0 : array.length;
|
|
765
|
-
if (initAccum && length) {
|
|
766
|
-
accumulator = array[++index2];
|
|
767
|
-
}
|
|
768
|
-
while (++index2 < length) {
|
|
769
|
-
accumulator = iteratee(accumulator, array[index2], index2, array);
|
|
770
|
-
}
|
|
771
|
-
return accumulator;
|
|
772
|
-
}
|
|
773
|
-
function stackClear() {
|
|
774
|
-
this.__data__ = new ListCache();
|
|
775
|
-
this.size = 0;
|
|
776
|
-
}
|
|
777
|
-
function stackDelete(key) {
|
|
778
|
-
var data = this.__data__, result = data["delete"](key);
|
|
779
|
-
this.size = data.size;
|
|
780
|
-
return result;
|
|
781
|
-
}
|
|
782
|
-
function stackGet(key) {
|
|
783
|
-
return this.__data__.get(key);
|
|
784
|
-
}
|
|
785
|
-
function stackHas(key) {
|
|
786
|
-
return this.__data__.has(key);
|
|
787
|
-
}
|
|
788
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
789
|
-
function stackSet(key, value) {
|
|
790
|
-
var data = this.__data__;
|
|
791
|
-
if (data instanceof ListCache) {
|
|
792
|
-
var pairs = data.__data__;
|
|
793
|
-
if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
794
|
-
pairs.push([key, value]);
|
|
795
|
-
this.size = ++data.size;
|
|
796
|
-
return this;
|
|
797
|
-
}
|
|
798
|
-
data = this.__data__ = new MapCache(pairs);
|
|
799
|
-
}
|
|
800
|
-
data.set(key, value);
|
|
801
|
-
this.size = data.size;
|
|
802
|
-
return this;
|
|
803
|
-
}
|
|
804
|
-
function Stack(entries) {
|
|
805
|
-
var data = this.__data__ = new ListCache(entries);
|
|
806
|
-
this.size = data.size;
|
|
807
|
-
}
|
|
808
|
-
Stack.prototype.clear = stackClear;
|
|
809
|
-
Stack.prototype["delete"] = stackDelete;
|
|
810
|
-
Stack.prototype.get = stackGet;
|
|
811
|
-
Stack.prototype.has = stackHas;
|
|
812
|
-
Stack.prototype.set = stackSet;
|
|
813
|
-
function baseAssign(object, source) {
|
|
814
|
-
return object && copyObject(source, keys(source), object);
|
|
815
|
-
}
|
|
816
|
-
function baseAssignIn(object, source) {
|
|
817
|
-
return object && copyObject(source, keysIn(source), object);
|
|
818
|
-
}
|
|
819
|
-
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
820
|
-
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
821
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
822
|
-
var Buffer = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
|
|
823
|
-
function cloneBuffer(buffer, isDeep) {
|
|
824
|
-
if (isDeep) {
|
|
825
|
-
return buffer.slice();
|
|
826
|
-
}
|
|
827
|
-
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
828
|
-
buffer.copy(result);
|
|
829
|
-
return result;
|
|
830
|
-
}
|
|
831
|
-
function arrayFilter(array, predicate) {
|
|
832
|
-
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
833
|
-
while (++index2 < length) {
|
|
834
|
-
var value = array[index2];
|
|
835
|
-
if (predicate(value, index2, array)) {
|
|
836
|
-
result[resIndex++] = value;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
return result;
|
|
840
|
-
}
|
|
841
|
-
function stubArray() {
|
|
842
|
-
return [];
|
|
843
|
-
}
|
|
844
|
-
var objectProto$4 = Object.prototype;
|
|
845
|
-
var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
|
|
846
|
-
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
847
|
-
var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
|
|
848
|
-
if (object == null) {
|
|
849
|
-
return [];
|
|
850
|
-
}
|
|
851
|
-
object = Object(object);
|
|
852
|
-
return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
|
|
853
|
-
return propertyIsEnumerable.call(object, symbol);
|
|
854
|
-
});
|
|
855
|
-
};
|
|
856
|
-
const getSymbols$1 = getSymbols;
|
|
857
|
-
function copySymbols(source, object) {
|
|
858
|
-
return copyObject(source, getSymbols$1(source), object);
|
|
859
|
-
}
|
|
860
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
861
|
-
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
862
|
-
var result = [];
|
|
863
|
-
while (object) {
|
|
864
|
-
arrayPush(result, getSymbols$1(object));
|
|
865
|
-
object = getPrototype$1(object);
|
|
866
|
-
}
|
|
867
|
-
return result;
|
|
868
|
-
};
|
|
869
|
-
const getSymbolsIn$1 = getSymbolsIn;
|
|
870
|
-
function copySymbolsIn(source, object) {
|
|
871
|
-
return copyObject(source, getSymbolsIn$1(source), object);
|
|
872
|
-
}
|
|
873
|
-
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
874
|
-
var result = keysFunc(object);
|
|
875
|
-
return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
876
|
-
}
|
|
877
|
-
function getAllKeys(object) {
|
|
878
|
-
return baseGetAllKeys(object, keys, getSymbols$1);
|
|
879
|
-
}
|
|
880
|
-
function getAllKeysIn(object) {
|
|
881
|
-
return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
|
|
882
|
-
}
|
|
883
|
-
var DataView = getNative(root$1, "DataView");
|
|
884
|
-
const DataView$1 = DataView;
|
|
885
|
-
var Promise$1 = getNative(root$1, "Promise");
|
|
886
|
-
const Promise$2 = Promise$1;
|
|
887
|
-
var Set = getNative(root$1, "Set");
|
|
888
|
-
const Set$1 = Set;
|
|
889
|
-
var mapTag$6 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$6 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
890
|
-
var dataViewTag$3 = "[object DataView]";
|
|
891
|
-
var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
|
|
892
|
-
var getTag = baseGetTag;
|
|
893
|
-
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) {
|
|
894
|
-
getTag = function(value) {
|
|
895
|
-
var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
896
|
-
if (ctorString) {
|
|
897
|
-
switch (ctorString) {
|
|
898
|
-
case dataViewCtorString:
|
|
899
|
-
return dataViewTag$3;
|
|
900
|
-
case mapCtorString:
|
|
901
|
-
return mapTag$6;
|
|
902
|
-
case promiseCtorString:
|
|
903
|
-
return promiseTag;
|
|
904
|
-
case setCtorString:
|
|
905
|
-
return setTag$6;
|
|
906
|
-
case weakMapCtorString:
|
|
907
|
-
return weakMapTag$1;
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
return result;
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
const getTag$1 = getTag;
|
|
914
|
-
var objectProto$3 = Object.prototype;
|
|
915
|
-
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
916
|
-
function initCloneArray(array) {
|
|
917
|
-
var length = array.length, result = new array.constructor(length);
|
|
918
|
-
if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
|
|
919
|
-
result.index = array.index;
|
|
920
|
-
result.input = array.input;
|
|
921
|
-
}
|
|
922
|
-
return result;
|
|
923
|
-
}
|
|
924
|
-
var Uint8Array = root$1.Uint8Array;
|
|
925
|
-
const Uint8Array$1 = Uint8Array;
|
|
926
|
-
function cloneArrayBuffer(arrayBuffer) {
|
|
927
|
-
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
928
|
-
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
929
|
-
return result;
|
|
930
|
-
}
|
|
931
|
-
function cloneDataView(dataView, isDeep) {
|
|
932
|
-
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
933
|
-
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
934
|
-
}
|
|
935
|
-
var reFlags = /\w*$/;
|
|
936
|
-
function cloneRegExp(regexp) {
|
|
937
|
-
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
938
|
-
result.lastIndex = regexp.lastIndex;
|
|
939
|
-
return result;
|
|
940
|
-
}
|
|
941
|
-
var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
|
|
942
|
-
function cloneSymbol(symbol) {
|
|
943
|
-
return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
|
|
944
|
-
}
|
|
945
|
-
function cloneTypedArray(typedArray, isDeep) {
|
|
946
|
-
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
947
|
-
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
948
|
-
}
|
|
949
|
-
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]";
|
|
950
|
-
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]";
|
|
951
|
-
function initCloneByTag(object, tag, isDeep) {
|
|
952
|
-
var Ctor = object.constructor;
|
|
953
|
-
switch (tag) {
|
|
954
|
-
case arrayBufferTag$2:
|
|
955
|
-
return cloneArrayBuffer(object);
|
|
956
|
-
case boolTag$3:
|
|
957
|
-
case dateTag$2:
|
|
958
|
-
return new Ctor(+object);
|
|
959
|
-
case dataViewTag$2:
|
|
960
|
-
return cloneDataView(object, isDeep);
|
|
961
|
-
case float32Tag$1:
|
|
962
|
-
case float64Tag$1:
|
|
963
|
-
case int8Tag$1:
|
|
964
|
-
case int16Tag$1:
|
|
965
|
-
case int32Tag$1:
|
|
966
|
-
case uint8Tag$1:
|
|
967
|
-
case uint8ClampedTag$1:
|
|
968
|
-
case uint16Tag$1:
|
|
969
|
-
case uint32Tag$1:
|
|
970
|
-
return cloneTypedArray(object, isDeep);
|
|
971
|
-
case mapTag$5:
|
|
972
|
-
return new Ctor();
|
|
973
|
-
case numberTag$2:
|
|
974
|
-
case stringTag$3:
|
|
975
|
-
return new Ctor(object);
|
|
976
|
-
case regexpTag$2:
|
|
977
|
-
return cloneRegExp(object);
|
|
978
|
-
case setTag$5:
|
|
979
|
-
return new Ctor();
|
|
980
|
-
case symbolTag$2:
|
|
981
|
-
return cloneSymbol(object);
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
function initCloneObject(object) {
|
|
985
|
-
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
|
|
986
|
-
}
|
|
987
|
-
var mapTag$4 = "[object Map]";
|
|
988
|
-
function baseIsMap(value) {
|
|
989
|
-
return isObjectLike(value) && getTag$1(value) == mapTag$4;
|
|
990
|
-
}
|
|
991
|
-
var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
|
|
992
|
-
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
993
|
-
const isMap$1 = isMap;
|
|
994
|
-
var setTag$4 = "[object Set]";
|
|
995
|
-
function baseIsSet(value) {
|
|
996
|
-
return isObjectLike(value) && getTag$1(value) == setTag$4;
|
|
997
|
-
}
|
|
998
|
-
var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
|
|
999
|
-
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
1000
|
-
const isSet$1 = isSet;
|
|
1001
|
-
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
|
|
1002
|
-
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
|
-
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]";
|
|
1004
|
-
var cloneableTags = {};
|
|
1005
|
-
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;
|
|
1006
|
-
cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
1007
|
-
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
1008
|
-
var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
|
|
1009
|
-
if (customizer) {
|
|
1010
|
-
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
1011
|
-
}
|
|
1012
|
-
if (result !== void 0) {
|
|
1013
|
-
return result;
|
|
1014
|
-
}
|
|
1015
|
-
if (!isObject(value)) {
|
|
1016
|
-
return value;
|
|
1017
|
-
}
|
|
1018
|
-
var isArr = isArray$1(value);
|
|
1019
|
-
if (isArr) {
|
|
1020
|
-
result = initCloneArray(value);
|
|
1021
|
-
if (!isDeep) {
|
|
1022
|
-
return copyArray(value, result);
|
|
1023
|
-
}
|
|
1024
|
-
} else {
|
|
1025
|
-
var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
|
|
1026
|
-
if (isBuffer$1(value)) {
|
|
1027
|
-
return cloneBuffer(value, isDeep);
|
|
1028
|
-
}
|
|
1029
|
-
if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
|
|
1030
|
-
result = isFlat || isFunc ? {} : initCloneObject(value);
|
|
1031
|
-
if (!isDeep) {
|
|
1032
|
-
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
|
|
1033
|
-
}
|
|
1034
|
-
} else {
|
|
1035
|
-
if (!cloneableTags[tag]) {
|
|
1036
|
-
return object ? value : {};
|
|
1037
|
-
}
|
|
1038
|
-
result = initCloneByTag(value, tag, isDeep);
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
stack || (stack = new Stack());
|
|
1042
|
-
var stacked = stack.get(value);
|
|
1043
|
-
if (stacked) {
|
|
1044
|
-
return stacked;
|
|
1045
|
-
}
|
|
1046
|
-
stack.set(value, result);
|
|
1047
|
-
if (isSet$1(value)) {
|
|
1048
|
-
value.forEach(function(subValue) {
|
|
1049
|
-
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
1050
|
-
});
|
|
1051
|
-
} else if (isMap$1(value)) {
|
|
1052
|
-
value.forEach(function(subValue, key2) {
|
|
1053
|
-
result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
|
|
1057
|
-
var props = isArr ? void 0 : keysFunc(value);
|
|
1058
|
-
arrayEach(props || value, function(subValue, key2) {
|
|
1059
|
-
if (props) {
|
|
1060
|
-
key2 = subValue;
|
|
1061
|
-
subValue = value[key2];
|
|
1062
|
-
}
|
|
1063
|
-
assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1064
|
-
});
|
|
1065
|
-
return result;
|
|
1066
|
-
}
|
|
1067
|
-
var CLONE_SYMBOLS_FLAG = 4;
|
|
1068
|
-
function clone(value) {
|
|
1069
|
-
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
|
1070
|
-
}
|
|
1071
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
1072
|
-
function setCacheAdd(value) {
|
|
1073
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
1074
|
-
return this;
|
|
1075
|
-
}
|
|
1076
|
-
function setCacheHas(value) {
|
|
1077
|
-
return this.__data__.has(value);
|
|
1078
|
-
}
|
|
1079
|
-
function SetCache(values) {
|
|
1080
|
-
var index2 = -1, length = values == null ? 0 : values.length;
|
|
1081
|
-
this.__data__ = new MapCache();
|
|
1082
|
-
while (++index2 < length) {
|
|
1083
|
-
this.add(values[index2]);
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
1087
|
-
SetCache.prototype.has = setCacheHas;
|
|
1088
|
-
function arraySome(array, predicate) {
|
|
1089
|
-
var index2 = -1, length = array == null ? 0 : array.length;
|
|
1090
|
-
while (++index2 < length) {
|
|
1091
|
-
if (predicate(array[index2], index2, array)) {
|
|
1092
|
-
return true;
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
return false;
|
|
1096
|
-
}
|
|
1097
|
-
function cacheHas(cache, key) {
|
|
1098
|
-
return cache.has(key);
|
|
1099
|
-
}
|
|
1100
|
-
var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
|
|
1101
|
-
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
1102
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
|
|
1103
|
-
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
1104
|
-
return false;
|
|
1105
|
-
}
|
|
1106
|
-
var arrStacked = stack.get(array);
|
|
1107
|
-
var othStacked = stack.get(other);
|
|
1108
|
-
if (arrStacked && othStacked) {
|
|
1109
|
-
return arrStacked == other && othStacked == array;
|
|
1110
|
-
}
|
|
1111
|
-
var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
|
|
1112
|
-
stack.set(array, other);
|
|
1113
|
-
stack.set(other, array);
|
|
1114
|
-
while (++index2 < arrLength) {
|
|
1115
|
-
var arrValue = array[index2], othValue = other[index2];
|
|
1116
|
-
if (customizer) {
|
|
1117
|
-
var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
|
|
1118
|
-
}
|
|
1119
|
-
if (compared !== void 0) {
|
|
1120
|
-
if (compared) {
|
|
1121
|
-
continue;
|
|
1122
|
-
}
|
|
1123
|
-
result = false;
|
|
1124
|
-
break;
|
|
1125
|
-
}
|
|
1126
|
-
if (seen) {
|
|
1127
|
-
if (!arraySome(other, function(othValue2, othIndex) {
|
|
1128
|
-
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
1129
|
-
return seen.push(othIndex);
|
|
1130
|
-
}
|
|
1131
|
-
})) {
|
|
1132
|
-
result = false;
|
|
1133
|
-
break;
|
|
1134
|
-
}
|
|
1135
|
-
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
1136
|
-
result = false;
|
|
1137
|
-
break;
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
stack["delete"](array);
|
|
1141
|
-
stack["delete"](other);
|
|
1142
|
-
return result;
|
|
1143
|
-
}
|
|
1144
|
-
function mapToArray(map) {
|
|
1145
|
-
var index2 = -1, result = Array(map.size);
|
|
1146
|
-
map.forEach(function(value, key) {
|
|
1147
|
-
result[++index2] = [key, value];
|
|
1148
|
-
});
|
|
1149
|
-
return result;
|
|
1150
|
-
}
|
|
1151
|
-
function setToArray(set) {
|
|
1152
|
-
var index2 = -1, result = Array(set.size);
|
|
1153
|
-
set.forEach(function(value) {
|
|
1154
|
-
result[++index2] = value;
|
|
1155
|
-
});
|
|
1156
|
-
return result;
|
|
1157
|
-
}
|
|
1158
|
-
var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
|
|
1159
|
-
var boolTag$1 = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag$2 = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag = "[object Symbol]";
|
|
1160
|
-
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
|
|
1161
|
-
var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
1162
|
-
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
1163
|
-
switch (tag) {
|
|
1164
|
-
case dataViewTag:
|
|
1165
|
-
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
1166
|
-
return false;
|
|
1167
|
-
}
|
|
1168
|
-
object = object.buffer;
|
|
1169
|
-
other = other.buffer;
|
|
1170
|
-
case arrayBufferTag:
|
|
1171
|
-
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
|
|
1172
|
-
return false;
|
|
1173
|
-
}
|
|
1174
|
-
return true;
|
|
1175
|
-
case boolTag$1:
|
|
1176
|
-
case dateTag:
|
|
1177
|
-
case numberTag:
|
|
1178
|
-
return eq(+object, +other);
|
|
1179
|
-
case errorTag:
|
|
1180
|
-
return object.name == other.name && object.message == other.message;
|
|
1181
|
-
case regexpTag:
|
|
1182
|
-
case stringTag$1:
|
|
1183
|
-
return object == other + "";
|
|
1184
|
-
case mapTag$2:
|
|
1185
|
-
var convert = mapToArray;
|
|
1186
|
-
case setTag$2:
|
|
1187
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
|
|
1188
|
-
convert || (convert = setToArray);
|
|
1189
|
-
if (object.size != other.size && !isPartial) {
|
|
1190
|
-
return false;
|
|
1191
|
-
}
|
|
1192
|
-
var stacked = stack.get(object);
|
|
1193
|
-
if (stacked) {
|
|
1194
|
-
return stacked == other;
|
|
1195
|
-
}
|
|
1196
|
-
bitmask |= COMPARE_UNORDERED_FLAG$2;
|
|
1197
|
-
stack.set(object, other);
|
|
1198
|
-
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
1199
|
-
stack["delete"](object);
|
|
1200
|
-
return result;
|
|
1201
|
-
case symbolTag:
|
|
1202
|
-
if (symbolValueOf) {
|
|
1203
|
-
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
return false;
|
|
1207
|
-
}
|
|
1208
|
-
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
1209
|
-
var objectProto$2 = Object.prototype;
|
|
1210
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1211
|
-
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1212
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
1213
|
-
if (objLength != othLength && !isPartial) {
|
|
1214
|
-
return false;
|
|
1215
|
-
}
|
|
1216
|
-
var index2 = objLength;
|
|
1217
|
-
while (index2--) {
|
|
1218
|
-
var key = objProps[index2];
|
|
1219
|
-
if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
|
|
1220
|
-
return false;
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
var objStacked = stack.get(object);
|
|
1224
|
-
var othStacked = stack.get(other);
|
|
1225
|
-
if (objStacked && othStacked) {
|
|
1226
|
-
return objStacked == other && othStacked == object;
|
|
1227
|
-
}
|
|
1228
|
-
var result = true;
|
|
1229
|
-
stack.set(object, other);
|
|
1230
|
-
stack.set(other, object);
|
|
1231
|
-
var skipCtor = isPartial;
|
|
1232
|
-
while (++index2 < objLength) {
|
|
1233
|
-
key = objProps[index2];
|
|
1234
|
-
var objValue = object[key], othValue = other[key];
|
|
1235
|
-
if (customizer) {
|
|
1236
|
-
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
1237
|
-
}
|
|
1238
|
-
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
1239
|
-
result = false;
|
|
1240
|
-
break;
|
|
1241
|
-
}
|
|
1242
|
-
skipCtor || (skipCtor = key == "constructor");
|
|
1243
|
-
}
|
|
1244
|
-
if (result && !skipCtor) {
|
|
1245
|
-
var objCtor = object.constructor, othCtor = other.constructor;
|
|
1246
|
-
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
1247
|
-
result = false;
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
stack["delete"](object);
|
|
1251
|
-
stack["delete"](other);
|
|
1252
|
-
return result;
|
|
1253
|
-
}
|
|
1254
|
-
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
1255
|
-
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
1256
|
-
var objectProto$1 = Object.prototype;
|
|
1257
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1258
|
-
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1259
|
-
var objIsArr = isArray$1(object), othIsArr = isArray$1(other), objTag = objIsArr ? arrayTag : getTag$1(object), othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
1260
|
-
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1261
|
-
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1262
|
-
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1263
|
-
if (isSameTag && isBuffer$1(object)) {
|
|
1264
|
-
if (!isBuffer$1(other)) {
|
|
1265
|
-
return false;
|
|
1266
|
-
}
|
|
1267
|
-
objIsArr = true;
|
|
1268
|
-
objIsObj = false;
|
|
1269
|
-
}
|
|
1270
|
-
if (isSameTag && !objIsObj) {
|
|
1271
|
-
stack || (stack = new Stack());
|
|
1272
|
-
return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1273
|
-
}
|
|
1274
|
-
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
1275
|
-
var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
|
|
1276
|
-
if (objIsWrapped || othIsWrapped) {
|
|
1277
|
-
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1278
|
-
stack || (stack = new Stack());
|
|
1279
|
-
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
if (!isSameTag) {
|
|
1283
|
-
return false;
|
|
1284
|
-
}
|
|
1285
|
-
stack || (stack = new Stack());
|
|
1286
|
-
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
1287
|
-
}
|
|
1288
|
-
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1289
|
-
if (value === other) {
|
|
1290
|
-
return true;
|
|
1291
|
-
}
|
|
1292
|
-
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
1293
|
-
return value !== value && other !== other;
|
|
1294
|
-
}
|
|
1295
|
-
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1296
|
-
}
|
|
1297
|
-
var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
|
1298
|
-
function baseIsMatch(object, source, matchData, customizer) {
|
|
1299
|
-
var index2 = matchData.length, length = index2, noCustomizer = !customizer;
|
|
1300
|
-
if (object == null) {
|
|
1301
|
-
return !length;
|
|
1302
|
-
}
|
|
1303
|
-
object = Object(object);
|
|
1304
|
-
while (index2--) {
|
|
1305
|
-
var data = matchData[index2];
|
|
1306
|
-
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
1307
|
-
return false;
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
while (++index2 < length) {
|
|
1311
|
-
data = matchData[index2];
|
|
1312
|
-
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1313
|
-
if (noCustomizer && data[2]) {
|
|
1314
|
-
if (objValue === void 0 && !(key in object)) {
|
|
1315
|
-
return false;
|
|
1316
|
-
}
|
|
1317
|
-
} else {
|
|
1318
|
-
var stack = new Stack();
|
|
1319
|
-
if (customizer) {
|
|
1320
|
-
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
1321
|
-
}
|
|
1322
|
-
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
|
|
1323
|
-
return false;
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
return true;
|
|
1328
|
-
}
|
|
1329
|
-
function isStrictComparable(value) {
|
|
1330
|
-
return value === value && !isObject(value);
|
|
1331
|
-
}
|
|
1332
|
-
function getMatchData(object) {
|
|
1333
|
-
var result = keys(object), length = result.length;
|
|
1334
|
-
while (length--) {
|
|
1335
|
-
var key = result[length], value = object[key];
|
|
1336
|
-
result[length] = [key, value, isStrictComparable(value)];
|
|
1337
|
-
}
|
|
1338
|
-
return result;
|
|
1339
|
-
}
|
|
1340
|
-
function matchesStrictComparable(key, srcValue) {
|
|
1341
|
-
return function(object) {
|
|
1342
|
-
if (object == null) {
|
|
1343
|
-
return false;
|
|
1344
|
-
}
|
|
1345
|
-
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
1346
|
-
};
|
|
1347
|
-
}
|
|
1348
|
-
function baseMatches(source) {
|
|
1349
|
-
var matchData = getMatchData(source);
|
|
1350
|
-
if (matchData.length == 1 && matchData[0][2]) {
|
|
1351
|
-
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
1352
|
-
}
|
|
1353
|
-
return function(object) {
|
|
1354
|
-
return object === source || baseIsMatch(object, source, matchData);
|
|
1355
|
-
};
|
|
1356
|
-
}
|
|
1357
|
-
function baseHasIn(object, key) {
|
|
1358
|
-
return object != null && key in Object(object);
|
|
1359
|
-
}
|
|
1360
|
-
function hasPath(object, path, hasFunc) {
|
|
1361
|
-
path = castPath(path, object);
|
|
1362
|
-
var index2 = -1, length = path.length, result = false;
|
|
1363
|
-
while (++index2 < length) {
|
|
1364
|
-
var key = toKey(path[index2]);
|
|
1365
|
-
if (!(result = object != null && hasFunc(object, key))) {
|
|
1366
|
-
break;
|
|
1367
|
-
}
|
|
1368
|
-
object = object[key];
|
|
1369
|
-
}
|
|
1370
|
-
if (result || ++index2 != length) {
|
|
1371
|
-
return result;
|
|
1372
|
-
}
|
|
1373
|
-
length = object == null ? 0 : object.length;
|
|
1374
|
-
return !!length && isLength(length) && isIndex(key, length) && (isArray$1(object) || isArguments$1(object));
|
|
1375
|
-
}
|
|
1376
|
-
function hasIn(object, path) {
|
|
1377
|
-
return object != null && hasPath(object, path, baseHasIn);
|
|
1378
|
-
}
|
|
1379
|
-
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
|
|
1380
|
-
function baseMatchesProperty(path, srcValue) {
|
|
1381
|
-
if (isKey(path) && isStrictComparable(srcValue)) {
|
|
1382
|
-
return matchesStrictComparable(toKey(path), srcValue);
|
|
1383
|
-
}
|
|
1384
|
-
return function(object) {
|
|
1385
|
-
var objValue = get(object, path);
|
|
1386
|
-
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1387
|
-
};
|
|
1388
|
-
}
|
|
1389
|
-
function baseProperty(key) {
|
|
1390
|
-
return function(object) {
|
|
1391
|
-
return object == null ? void 0 : object[key];
|
|
1392
|
-
};
|
|
1393
|
-
}
|
|
1394
|
-
function basePropertyDeep(path) {
|
|
1395
|
-
return function(object) {
|
|
1396
|
-
return baseGet(object, path);
|
|
1397
|
-
};
|
|
1398
|
-
}
|
|
1399
|
-
function property(path) {
|
|
1400
|
-
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
1401
|
-
}
|
|
1402
|
-
function baseIteratee(value) {
|
|
1403
|
-
if (typeof value == "function") {
|
|
1404
|
-
return value;
|
|
1405
|
-
}
|
|
1406
|
-
if (value == null) {
|
|
1407
|
-
return identity;
|
|
1408
|
-
}
|
|
1409
|
-
if (typeof value == "object") {
|
|
1410
|
-
return isArray$1(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
|
1411
|
-
}
|
|
1412
|
-
return property(value);
|
|
1413
|
-
}
|
|
1414
|
-
function createBaseFor(fromRight) {
|
|
1415
|
-
return function(object, iteratee, keysFunc) {
|
|
1416
|
-
var index2 = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
1417
|
-
while (length--) {
|
|
1418
|
-
var key = props[fromRight ? length : ++index2];
|
|
1419
|
-
if (iteratee(iterable[key], key, iterable) === false) {
|
|
1420
|
-
break;
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
return object;
|
|
1424
|
-
};
|
|
1425
|
-
}
|
|
1426
|
-
var baseFor = createBaseFor();
|
|
1427
|
-
const baseFor$1 = baseFor;
|
|
1428
|
-
function baseForOwn(object, iteratee) {
|
|
1429
|
-
return object && baseFor$1(object, iteratee, keys);
|
|
1430
|
-
}
|
|
1431
|
-
function createBaseEach(eachFunc, fromRight) {
|
|
1432
|
-
return function(collection, iteratee) {
|
|
1433
|
-
if (collection == null) {
|
|
1434
|
-
return collection;
|
|
1435
|
-
}
|
|
1436
|
-
if (!isArrayLike(collection)) {
|
|
1437
|
-
return eachFunc(collection, iteratee);
|
|
1438
|
-
}
|
|
1439
|
-
var length = collection.length, index2 = fromRight ? length : -1, iterable = Object(collection);
|
|
1440
|
-
while (fromRight ? index2-- : ++index2 < length) {
|
|
1441
|
-
if (iteratee(iterable[index2], index2, iterable) === false) {
|
|
1442
|
-
break;
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
return collection;
|
|
1446
|
-
};
|
|
1447
|
-
}
|
|
1448
|
-
var baseEach = createBaseEach(baseForOwn);
|
|
1449
|
-
const baseEach$1 = baseEach;
|
|
1450
|
-
var now = function() {
|
|
1451
|
-
return root$1.Date.now();
|
|
1452
|
-
};
|
|
1453
|
-
const now$1 = now;
|
|
1454
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1455
|
-
var nativeMax = Math.max, nativeMin = Math.min;
|
|
1456
|
-
function debounce(func, wait, options) {
|
|
1457
|
-
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
1458
|
-
if (typeof func != "function") {
|
|
1459
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1460
|
-
}
|
|
1461
|
-
wait = toNumber(wait) || 0;
|
|
1462
|
-
if (isObject(options)) {
|
|
1463
|
-
leading = !!options.leading;
|
|
1464
|
-
maxing = "maxWait" in options;
|
|
1465
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
1466
|
-
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
1467
|
-
}
|
|
1468
|
-
function invokeFunc(time) {
|
|
1469
|
-
var args = lastArgs, thisArg = lastThis;
|
|
1470
|
-
lastArgs = lastThis = void 0;
|
|
1471
|
-
lastInvokeTime = time;
|
|
1472
|
-
result = func.apply(thisArg, args);
|
|
1473
|
-
return result;
|
|
1474
|
-
}
|
|
1475
|
-
function leadingEdge(time) {
|
|
1476
|
-
lastInvokeTime = time;
|
|
1477
|
-
timerId = setTimeout(timerExpired, wait);
|
|
1478
|
-
return leading ? invokeFunc(time) : result;
|
|
1479
|
-
}
|
|
1480
|
-
function remainingWait(time) {
|
|
1481
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
1482
|
-
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
1483
|
-
}
|
|
1484
|
-
function shouldInvoke(time) {
|
|
1485
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
1486
|
-
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
1487
|
-
}
|
|
1488
|
-
function timerExpired() {
|
|
1489
|
-
var time = now$1();
|
|
1490
|
-
if (shouldInvoke(time)) {
|
|
1491
|
-
return trailingEdge(time);
|
|
1492
|
-
}
|
|
1493
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
1494
|
-
}
|
|
1495
|
-
function trailingEdge(time) {
|
|
1496
|
-
timerId = void 0;
|
|
1497
|
-
if (trailing && lastArgs) {
|
|
1498
|
-
return invokeFunc(time);
|
|
1499
|
-
}
|
|
1500
|
-
lastArgs = lastThis = void 0;
|
|
1501
|
-
return result;
|
|
1502
|
-
}
|
|
1503
|
-
function cancel() {
|
|
1504
|
-
if (timerId !== void 0) {
|
|
1505
|
-
clearTimeout(timerId);
|
|
1506
|
-
}
|
|
1507
|
-
lastInvokeTime = 0;
|
|
1508
|
-
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
1509
|
-
}
|
|
1510
|
-
function flush() {
|
|
1511
|
-
return timerId === void 0 ? result : trailingEdge(now$1());
|
|
1512
|
-
}
|
|
1513
|
-
function debounced() {
|
|
1514
|
-
var time = now$1(), isInvoking = shouldInvoke(time);
|
|
1515
|
-
lastArgs = arguments;
|
|
1516
|
-
lastThis = this;
|
|
1517
|
-
lastCallTime = time;
|
|
1518
|
-
if (isInvoking) {
|
|
1519
|
-
if (timerId === void 0) {
|
|
1520
|
-
return leadingEdge(lastCallTime);
|
|
1521
|
-
}
|
|
1522
|
-
if (maxing) {
|
|
1523
|
-
clearTimeout(timerId);
|
|
1524
|
-
timerId = setTimeout(timerExpired, wait);
|
|
1525
|
-
return invokeFunc(lastCallTime);
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
if (timerId === void 0) {
|
|
1529
|
-
timerId = setTimeout(timerExpired, wait);
|
|
1530
|
-
}
|
|
1531
|
-
return result;
|
|
1532
|
-
}
|
|
1533
|
-
debounced.cancel = cancel;
|
|
1534
|
-
debounced.flush = flush;
|
|
1535
|
-
return debounced;
|
|
1536
|
-
}
|
|
1537
|
-
function baseFilter(collection, predicate) {
|
|
1538
|
-
var result = [];
|
|
1539
|
-
baseEach$1(collection, function(value, index2, collection2) {
|
|
1540
|
-
if (predicate(value, index2, collection2)) {
|
|
1541
|
-
result.push(value);
|
|
1542
|
-
}
|
|
1543
|
-
});
|
|
1544
|
-
return result;
|
|
1545
|
-
}
|
|
1546
|
-
function filter(collection, predicate) {
|
|
1547
|
-
var func = isArray$1(collection) ? arrayFilter : baseFilter;
|
|
1548
|
-
return func(collection, baseIteratee(predicate));
|
|
1549
|
-
}
|
|
1550
|
-
var stringTag = "[object String]";
|
|
1551
|
-
function isString(value) {
|
|
1552
|
-
return typeof value == "string" || !isArray$1(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
1553
|
-
}
|
|
1554
|
-
var boolTag = "[object Boolean]";
|
|
1555
|
-
function isBoolean(value) {
|
|
1556
|
-
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
|
|
1557
|
-
}
|
|
1558
|
-
var mapTag$1 = "[object Map]", setTag$1 = "[object Set]";
|
|
1559
|
-
var objectProto = Object.prototype;
|
|
1560
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1561
|
-
function isEmpty(value) {
|
|
1562
|
-
if (value == null) {
|
|
1563
|
-
return true;
|
|
1564
|
-
}
|
|
1565
|
-
if (isArrayLike(value) && (isArray$1(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
|
|
1566
|
-
return !value.length;
|
|
1567
|
-
}
|
|
1568
|
-
var tag = getTag$1(value);
|
|
1569
|
-
if (tag == mapTag$1 || tag == setTag$1) {
|
|
1570
|
-
return !value.size;
|
|
1571
|
-
}
|
|
1572
|
-
if (isPrototype(value)) {
|
|
1573
|
-
return !baseKeys(value).length;
|
|
1574
|
-
}
|
|
1575
|
-
for (var key in value) {
|
|
1576
|
-
if (hasOwnProperty.call(value, key)) {
|
|
1577
|
-
return false;
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
return true;
|
|
1581
|
-
}
|
|
1582
|
-
var asciiSize = baseProperty("length");
|
|
1583
|
-
const asciiSize$1 = asciiSize;
|
|
1584
|
-
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = "\\ufe0e\\ufe0f";
|
|
1585
|
-
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
|
-
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("|") + ")";
|
|
1587
|
-
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
|
|
1588
|
-
function unicodeSize(string) {
|
|
1589
|
-
var result = reUnicode.lastIndex = 0;
|
|
1590
|
-
while (reUnicode.test(string)) {
|
|
1591
|
-
++result;
|
|
1592
|
-
}
|
|
1593
|
-
return result;
|
|
1594
|
-
}
|
|
1595
|
-
function stringSize(string) {
|
|
1596
|
-
return hasUnicode(string) ? unicodeSize(string) : asciiSize$1(string);
|
|
1597
|
-
}
|
|
1598
|
-
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
1599
|
-
eachFunc(collection, function(value, index2, collection2) {
|
|
1600
|
-
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2);
|
|
1601
|
-
});
|
|
1602
|
-
return accumulator;
|
|
1603
|
-
}
|
|
1604
|
-
function reduce(collection, iteratee, accumulator) {
|
|
1605
|
-
var func = isArray$1(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
|
|
1606
|
-
return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach$1);
|
|
1607
|
-
}
|
|
1608
|
-
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
1609
|
-
function size(collection) {
|
|
1610
|
-
if (collection == null) {
|
|
1611
|
-
return 0;
|
|
1612
|
-
}
|
|
1613
|
-
if (isArrayLike(collection)) {
|
|
1614
|
-
return isString(collection) ? stringSize(collection) : collection.length;
|
|
1615
|
-
}
|
|
1616
|
-
var tag = getTag$1(collection);
|
|
1617
|
-
if (tag == mapTag || tag == setTag) {
|
|
1618
|
-
return collection.size;
|
|
1619
|
-
}
|
|
1620
|
-
return baseKeys(collection).length;
|
|
1621
|
-
}
|
|
1622
|
-
const analyzeAdaptive = (defaultContainer, adaptive) => {
|
|
1623
|
-
var _a;
|
|
1624
|
-
if (isBoolean(adaptive)) {
|
|
1625
|
-
return {
|
|
1626
|
-
container: defaultContainer,
|
|
1627
|
-
adaptiveWidth: true,
|
|
1628
|
-
adaptiveHeight: false
|
|
1629
|
-
};
|
|
1630
|
-
}
|
|
1631
|
-
return {
|
|
1632
|
-
container: ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || defaultContainer,
|
|
1633
|
-
adaptiveWidth: (adaptive == null ? void 0 : adaptive.width) ?? true,
|
|
1634
|
-
adaptiveHeight: (adaptive == null ? void 0 : adaptive.height) ?? true
|
|
1635
|
-
};
|
|
1636
|
-
};
|
|
1637
|
-
const createResizeObserver = (params) => {
|
|
1638
|
-
let isFirstRender = true;
|
|
1639
|
-
const { s2: s22, adaptive, container, wrapper } = params;
|
|
1640
|
-
const {
|
|
1641
|
-
container: actualWrapper,
|
|
1642
|
-
adaptiveWidth,
|
|
1643
|
-
adaptiveHeight
|
|
1644
|
-
} = analyzeAdaptive(wrapper, adaptive);
|
|
1645
|
-
if (!actualWrapper || !container || !adaptive || !s22) {
|
|
1646
|
-
return;
|
|
1647
|
-
}
|
|
1648
|
-
const render2 = (width, height) => {
|
|
1649
|
-
s22 == null ? void 0 : s22.changeSheetSize(width, height);
|
|
1650
|
-
s22 == null ? void 0 : s22.render(false);
|
|
1651
|
-
};
|
|
1652
|
-
const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
|
|
1653
|
-
const onResize = () => {
|
|
1654
|
-
const { clientWidth: containerWidth, clientHeight: containerHeight } = container;
|
|
1655
|
-
const width = adaptiveWidth ? Math.floor(containerWidth ?? s22.options.width) : s22.options.width;
|
|
1656
|
-
const height = adaptiveHeight ? Math.floor(containerHeight ?? s22.options.height) : s22.options.height;
|
|
1657
|
-
if (!adaptiveWidth && !adaptiveHeight) {
|
|
1658
|
-
return;
|
|
1659
|
-
}
|
|
1660
|
-
if (isFirstRender) {
|
|
1661
|
-
render2(width, height);
|
|
1662
|
-
isFirstRender = false;
|
|
1663
|
-
return;
|
|
1664
|
-
}
|
|
1665
|
-
debounceRender(width, height);
|
|
1666
|
-
};
|
|
1667
|
-
const resizeObserver = new ResizeObserver(
|
|
1668
|
-
([entry] = []) => {
|
|
1669
|
-
if (entry) {
|
|
1670
|
-
onResize();
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
);
|
|
1674
|
-
resizeObserver.observe(actualWrapper, {
|
|
1675
|
-
box: "border-box"
|
|
1676
|
-
});
|
|
1677
|
-
return () => {
|
|
1678
|
-
resizeObserver.unobserve(actualWrapper);
|
|
1679
|
-
};
|
|
1680
|
-
};
|
|
1681
|
-
const getDrillDownCache = (spreadsheet, meta) => {
|
|
1682
|
-
const drillDownDataCache = spreadsheet.store.get(
|
|
1683
|
-
"drillDownDataCache",
|
|
1684
|
-
[]
|
|
1685
|
-
);
|
|
1686
|
-
const cache = drillDownDataCache.find((dc) => dc.rowId === meta.id);
|
|
1687
|
-
return {
|
|
1688
|
-
drillDownDataCache,
|
|
1689
|
-
drillDownCurrentCache: cache
|
|
1690
|
-
};
|
|
1691
|
-
};
|
|
1692
|
-
const handleActionIconClick = (params) => {
|
|
1693
|
-
const { meta, event, callback } = params;
|
|
1694
|
-
const { spreadsheet } = meta;
|
|
1695
|
-
spreadsheet.store.set("drillDownNode", meta);
|
|
1696
|
-
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(
|
|
1697
|
-
spreadsheet,
|
|
1698
|
-
meta
|
|
1699
|
-
);
|
|
1700
|
-
const cache = (drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField) ? [drillDownCurrentCache == null ? void 0 : drillDownCurrentCache.drillField] : [];
|
|
1701
|
-
const disabled = [];
|
|
1702
|
-
drillDownDataCache.forEach((val) => {
|
|
1703
|
-
if (meta.id.includes(val.rowId) && meta.id !== val.rowId) {
|
|
1704
|
-
disabled.push(val.drillField);
|
|
1705
|
-
}
|
|
1706
|
-
});
|
|
1707
|
-
if (event) {
|
|
1708
|
-
spreadsheet.emit(s2.S2Event.GLOBAL_ACTION_ICON_CLICK, event);
|
|
1709
|
-
}
|
|
1710
|
-
callback({
|
|
1711
|
-
sheetInstance: spreadsheet,
|
|
1712
|
-
cacheDrillFields: cache,
|
|
1713
|
-
disabledFields: disabled,
|
|
1714
|
-
event
|
|
1715
|
-
});
|
|
1716
|
-
};
|
|
1717
|
-
const defaultPartDrillDownDisplayCondition = (meta) => {
|
|
1718
|
-
const s22 = meta.spreadsheet;
|
|
1719
|
-
const { fields } = s22.dataCfg;
|
|
1720
|
-
const iconLevel = size(fields.rows) - 1;
|
|
1721
|
-
const isValueInCols = !isEmpty(fields.values) ? s22.isValueInCols() : true;
|
|
1722
|
-
return iconLevel <= meta.level && s22.isHierarchyTreeType() && isValueInCols && !meta.isGrandTotals;
|
|
1723
|
-
};
|
|
1724
|
-
const buildDrillDownOptions = (options, partDrillDown, callback) => {
|
|
1725
|
-
var _a;
|
|
1726
|
-
const nextHeaderIcons = ((_a = options == null ? void 0 : options.headerActionIcons) == null ? void 0 : _a.length) ? [...options.headerActionIcons] : [];
|
|
1727
|
-
if (!isEmpty(partDrillDown)) {
|
|
1728
|
-
const drillDownActionIcon = {
|
|
1729
|
-
icons: [
|
|
1730
|
-
{
|
|
1731
|
-
name: "DrillDownIcon",
|
|
1732
|
-
position: "right",
|
|
1733
|
-
onClick: ({ meta, event }) => {
|
|
1734
|
-
meta.spreadsheet.store.set("drillDownNode", meta);
|
|
1735
|
-
handleActionIconClick({
|
|
1736
|
-
meta,
|
|
1737
|
-
event,
|
|
1738
|
-
callback
|
|
1739
|
-
});
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
],
|
|
1743
|
-
belongsCell: "rowCell",
|
|
1744
|
-
defaultHide: false,
|
|
1745
|
-
displayCondition: (partDrillDown == null ? void 0 : partDrillDown.displayCondition) || defaultPartDrillDownDisplayCondition
|
|
1746
|
-
};
|
|
1747
|
-
nextHeaderIcons.push(drillDownActionIcon);
|
|
1748
|
-
}
|
|
1749
|
-
return {
|
|
1750
|
-
...options,
|
|
1751
|
-
headerActionIcons: nextHeaderIcons
|
|
1752
|
-
};
|
|
1753
|
-
};
|
|
1754
|
-
const handleDrillDown = (params) => {
|
|
1755
|
-
const { fetchData, spreadsheet, drillFields, drillItemsNum = -1 } = params;
|
|
1756
|
-
spreadsheet.store.set("drillItemsNum", drillItemsNum);
|
|
1757
|
-
const meta = spreadsheet.store.get("drillDownNode");
|
|
1758
|
-
const { drillDownDataCache, drillDownCurrentCache } = getDrillDownCache(
|
|
1759
|
-
spreadsheet,
|
|
1760
|
-
meta
|
|
1761
|
-
);
|
|
1762
|
-
let newDrillDownDataCache = clone(drillDownDataCache);
|
|
1763
|
-
if (drillDownCurrentCache) {
|
|
1764
|
-
newDrillDownDataCache = filter(
|
|
1765
|
-
drillDownDataCache,
|
|
1766
|
-
(cache) => cache.rowId !== meta.id
|
|
1767
|
-
);
|
|
1768
|
-
}
|
|
1769
|
-
if (!fetchData) {
|
|
1770
|
-
return;
|
|
1771
|
-
}
|
|
1772
|
-
fetchData(meta, drillFields).then((info) => {
|
|
1773
|
-
const { drillData, drillField } = info;
|
|
1774
|
-
spreadsheet.dataSet.transformDrillDownData(
|
|
1775
|
-
drillField,
|
|
1776
|
-
drillData,
|
|
1777
|
-
meta
|
|
1778
|
-
);
|
|
1779
|
-
if (!isEmpty(drillData)) {
|
|
1780
|
-
const drillLevel = meta.level + 1;
|
|
1781
|
-
const newDrillDownData = {
|
|
1782
|
-
rowId: meta.id,
|
|
1783
|
-
drillLevel,
|
|
1784
|
-
drillData,
|
|
1785
|
-
drillField
|
|
1786
|
-
};
|
|
1787
|
-
newDrillDownDataCache.push(newDrillDownData);
|
|
1788
|
-
spreadsheet.store.set("drillDownDataCache", newDrillDownDataCache);
|
|
1789
|
-
}
|
|
1790
|
-
spreadsheet.interaction.reset();
|
|
1791
|
-
spreadsheet.render(false);
|
|
1792
|
-
});
|
|
1793
|
-
};
|
|
1794
|
-
s2.extendLocale(Locale);
|
|
1795
|
-
const useExpose = (expose) => {
|
|
1796
|
-
const s2Ref = vue.shallowRef();
|
|
1797
|
-
expose({
|
|
1798
|
-
get instance() {
|
|
1799
|
-
var _a;
|
|
1800
|
-
return (_a = s2Ref.value) == null ? void 0 : _a.instance;
|
|
1801
|
-
}
|
|
1802
|
-
});
|
|
1803
|
-
return s2Ref;
|
|
1804
|
-
};
|
|
1805
|
-
const _sfc_main$e = vue.defineComponent({
|
|
1806
|
-
name: "TooltipDetail",
|
|
1807
|
-
props: ["list"],
|
|
1808
|
-
setup() {
|
|
1809
|
-
return {
|
|
1810
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
1811
|
-
};
|
|
1812
|
-
}
|
|
1813
|
-
});
|
|
1814
|
-
const _export_sfc = (sfc, props) => {
|
|
1815
|
-
const target = sfc.__vccOpts || sfc;
|
|
1816
|
-
for (const [key, val] of props) {
|
|
1817
|
-
target[key] = val;
|
|
1818
|
-
}
|
|
1819
|
-
return target;
|
|
1820
|
-
};
|
|
1821
|
-
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1822
|
-
return vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => {
|
|
1823
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1824
|
-
key: `${item.value}-${index2}`,
|
|
1825
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-detail-list`)
|
|
1826
|
-
}, [
|
|
1827
|
-
vue.createElementVNode("div", {
|
|
1828
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-detail-item`)
|
|
1829
|
-
}, [
|
|
1830
|
-
vue.createElementVNode("span", {
|
|
1831
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-detail-item-key`)
|
|
1832
|
-
}, vue.toDisplayString(item.name), 3),
|
|
1833
|
-
vue.createElementVNode("span", {
|
|
1834
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-detail-item-val ${_ctx.TOOLTIP_PREFIX_CLS}-highlight`)
|
|
1835
|
-
}, vue.toDisplayString(item.value), 3)
|
|
1836
|
-
], 2)
|
|
1837
|
-
], 2);
|
|
1838
|
-
}), 128);
|
|
1839
|
-
}
|
|
1840
|
-
const TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
|
|
1841
|
-
const _sfc_main$d = vue.defineComponent({
|
|
1842
|
-
name: "TooltipHeadInfo",
|
|
1843
|
-
props: ["rows", "cols"],
|
|
1844
|
-
setup() {
|
|
1845
|
-
return {
|
|
1846
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
1847
|
-
};
|
|
1848
|
-
},
|
|
1849
|
-
components: {}
|
|
1850
|
-
});
|
|
1851
|
-
const _hoisted_1$4 = { key: 0 };
|
|
1852
|
-
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1853
|
-
var _a, _b, _c, _d;
|
|
1854
|
-
return ((_a = _ctx.cols) == null ? void 0 : _a.length) || ((_b = _ctx.rows) == null ? void 0 : _b.length) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1855
|
-
key: 0,
|
|
1856
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-head-info-list`)
|
|
1857
|
-
}, [
|
|
1858
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.cols, (col) => {
|
|
1859
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
1860
|
-
key: col.value
|
|
1861
|
-
}, vue.toDisplayString(col.value) + "/", 1);
|
|
1862
|
-
}), 128)),
|
|
1863
|
-
((_c = _ctx.cols) == null ? void 0 : _c.length) > 0 && ((_d = _ctx.rows) == null ? void 0 : _d.length) > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$4, ",")) : vue.createCommentVNode("", true),
|
|
1864
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.rows, (row) => {
|
|
1865
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
1866
|
-
key: row.value
|
|
1867
|
-
}, vue.toDisplayString(row.value) + "/", 1);
|
|
1868
|
-
}), 128))
|
|
1869
|
-
], 2)) : vue.createCommentVNode("", true);
|
|
1870
|
-
}
|
|
1871
|
-
const TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
|
|
1872
|
-
const _sfc_main$c = vue.defineComponent({
|
|
1873
|
-
name: "TooltipInfos",
|
|
1874
|
-
props: ["infos"],
|
|
1875
|
-
setup() {
|
|
1876
|
-
return {
|
|
1877
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
1878
|
-
};
|
|
1879
|
-
},
|
|
1880
|
-
components: {}
|
|
1881
|
-
});
|
|
1882
|
-
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1883
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1884
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-infos`)
|
|
1885
|
-
}, vue.toDisplayString(_ctx.infos), 3);
|
|
1886
|
-
}
|
|
1887
|
-
const TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
|
|
1888
|
-
const _sfc_main$b = vue.defineComponent({
|
|
1889
|
-
name: "TooltipSimpleTips",
|
|
1890
|
-
props: ["name", "tips"],
|
|
1891
|
-
setup() {
|
|
1892
|
-
return {
|
|
1893
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
1894
|
-
};
|
|
1895
|
-
},
|
|
1896
|
-
components: {}
|
|
1897
|
-
});
|
|
1898
|
-
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1899
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1900
|
-
_ctx.name ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1901
|
-
key: 0,
|
|
1902
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-name`)
|
|
1903
|
-
}, vue.toDisplayString(_ctx.name), 3)) : vue.createCommentVNode("", true),
|
|
1904
|
-
_ctx.tips ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1905
|
-
key: 1,
|
|
1906
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-tips`)
|
|
1907
|
-
}, vue.toDisplayString(_ctx.tips), 3)) : vue.createCommentVNode("", true)
|
|
1908
|
-
], 64);
|
|
1909
|
-
}
|
|
1910
|
-
const TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
|
|
1911
|
-
const _sfc_main$a = vue.defineComponent({
|
|
1912
|
-
name: "TooltipSummary",
|
|
1913
|
-
props: ["summaries"],
|
|
1914
|
-
setup(props) {
|
|
1915
|
-
const summaryInfo = vue.computed(
|
|
1916
|
-
() => reduce(
|
|
1917
|
-
props.summaries,
|
|
1918
|
-
(pre, next) => {
|
|
1919
|
-
pre.count += size(next == null ? void 0 : next.selectedData);
|
|
1920
|
-
if (next.value || next.name) {
|
|
1921
|
-
pre.summaries.push(next);
|
|
1922
|
-
}
|
|
1923
|
-
return pre;
|
|
1924
|
-
},
|
|
1925
|
-
{ count: 0, summaries: [] }
|
|
1926
|
-
)
|
|
1927
|
-
);
|
|
1928
|
-
return {
|
|
1929
|
-
summaryInfo,
|
|
1930
|
-
i18n: s2.i18n,
|
|
1931
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
1932
|
-
};
|
|
1933
|
-
},
|
|
1934
|
-
components: {}
|
|
1935
|
-
});
|
|
1936
|
-
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1937
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1938
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary`)
|
|
1939
|
-
}, [
|
|
1940
|
-
vue.createElementVNode("div", {
|
|
1941
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-item`)
|
|
1942
|
-
}, [
|
|
1943
|
-
vue.createElementVNode("span", {
|
|
1944
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-selected`)
|
|
1945
|
-
}, vue.toDisplayString(_ctx.summaryInfo.count) + " " + vue.toDisplayString(_ctx.i18n("项")), 3),
|
|
1946
|
-
vue.createTextVNode(" " + vue.toDisplayString(_ctx.i18n("已选择")), 1)
|
|
1947
|
-
], 2),
|
|
1948
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.summaryInfo.summaries, (summary) => {
|
|
1949
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1950
|
-
key: `${summary.name}-${summary.value}`,
|
|
1951
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-item`)
|
|
1952
|
-
}, [
|
|
1953
|
-
vue.createElementVNode("span", {
|
|
1954
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-key`)
|
|
1955
|
-
}, vue.toDisplayString(summary.name) + " (" + vue.toDisplayString(_ctx.i18n("总和")) + ") ", 3),
|
|
1956
|
-
vue.createElementVNode("span", {
|
|
1957
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-val ${_ctx.TOOLTIP_PREFIX_CLS}-bold`)
|
|
1958
|
-
}, vue.toDisplayString(summary.value), 3)
|
|
1959
|
-
], 2);
|
|
1960
|
-
}), 128))
|
|
1961
|
-
], 2);
|
|
1962
|
-
}
|
|
1963
|
-
const TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
|
|
1964
|
-
const _sfc_main$9 = vue.defineComponent({
|
|
1965
|
-
name: "TooltipOperatorTitle",
|
|
1966
|
-
props: ["menu"],
|
|
1967
|
-
setup(props) {
|
|
1968
|
-
const icon = vue.computed(() => s2.getIcon(props.menu.icon));
|
|
1969
|
-
return {
|
|
1970
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS,
|
|
1971
|
-
icon
|
|
1972
|
-
};
|
|
1973
|
-
}
|
|
1974
|
-
});
|
|
1975
|
-
const _hoisted_1$3 = ["innerHTML"];
|
|
1976
|
-
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1977
|
-
return vue.openBlock(), vue.createElementBlock("span", null, [
|
|
1978
|
-
_ctx.icon ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
1979
|
-
key: 0,
|
|
1980
|
-
innerHTML: _ctx.icon,
|
|
1981
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-icon`)
|
|
1982
|
-
}, null, 10, _hoisted_1$3)) : vue.createCommentVNode("", true),
|
|
1983
|
-
vue.createElementVNode("span", {
|
|
1984
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-text`)
|
|
1985
|
-
}, vue.toDisplayString(_ctx.menu.label), 3)
|
|
1986
|
-
]);
|
|
1987
|
-
}
|
|
1988
|
-
const TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
|
|
1989
|
-
const _sfc_main$8 = vue.defineComponent({
|
|
1990
|
-
name: "TooltipOperatorMenu",
|
|
1991
|
-
props: ["menu", "cell"],
|
|
1992
|
-
setup(props) {
|
|
1993
|
-
const { menu, cell } = props;
|
|
1994
|
-
const onMenuTitleClick = () => {
|
|
1995
|
-
var _a, _b;
|
|
1996
|
-
(_b = (_a = props.menu).onClick) == null ? void 0 : _b.call(_a, menu, cell);
|
|
1997
|
-
};
|
|
1998
|
-
return {
|
|
1999
|
-
onMenuTitleClick,
|
|
2000
|
-
isEmpty,
|
|
2001
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS
|
|
2002
|
-
};
|
|
2003
|
-
},
|
|
2004
|
-
components: {
|
|
2005
|
-
MenuItem: antDesignVue.Menu.Item,
|
|
2006
|
-
SubMenu: antDesignVue.Menu.SubMenu,
|
|
2007
|
-
TooltipOperatorTitle
|
|
2008
|
-
}
|
|
2009
|
-
});
|
|
2010
|
-
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2011
|
-
const _component_TooltipOperatorTitle = vue.resolveComponent("TooltipOperatorTitle");
|
|
2012
|
-
const _component_TooltipOperatorMenu = vue.resolveComponent("TooltipOperatorMenu");
|
|
2013
|
-
const _component_MenuItem = vue.resolveComponent("MenuItem");
|
|
2014
|
-
const _component_SubMenu = vue.resolveComponent("SubMenu");
|
|
2015
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
2016
|
-
!_ctx.isEmpty(_ctx.menu.children) ? (vue.openBlock(), vue.createBlock(_component_SubMenu, {
|
|
2017
|
-
key: _ctx.menu.key,
|
|
2018
|
-
popupClassName: `${_ctx.TOOLTIP_PREFIX_CLS}-operator-submenu-popup`,
|
|
2019
|
-
onTitleClick: _ctx.onMenuTitleClick
|
|
2020
|
-
}, {
|
|
2021
|
-
title: vue.withCtx(() => [
|
|
2022
|
-
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2023
|
-
menu: _ctx.menu,
|
|
2024
|
-
onClick: _ctx.onMenuTitleClick
|
|
2025
|
-
}, null, 8, ["menu", "onClick"])
|
|
2026
|
-
]),
|
|
2027
|
-
default: vue.withCtx(() => [
|
|
2028
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menu.children, (subMenu) => {
|
|
2029
|
-
var _a;
|
|
2030
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2031
|
-
key: subMenu.key
|
|
2032
|
-
}, [
|
|
2033
|
-
((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createBlock(_component_TooltipOperatorMenu, {
|
|
2034
|
-
key: 0,
|
|
2035
|
-
menu: subMenu,
|
|
2036
|
-
cell: _ctx.cell
|
|
2037
|
-
}, null, 8, ["menu", "cell"])) : (vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
2038
|
-
title: subMenu.label,
|
|
2039
|
-
key: subMenu.key
|
|
2040
|
-
}, {
|
|
2041
|
-
default: vue.withCtx(() => [
|
|
2042
|
-
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2043
|
-
menu: subMenu,
|
|
2044
|
-
onClick: _ctx.onMenuTitleClick
|
|
2045
|
-
}, null, 8, ["menu", "onClick"])
|
|
2046
|
-
]),
|
|
2047
|
-
_: 2
|
|
2048
|
-
}, 1032, ["title"]))
|
|
2049
|
-
], 64);
|
|
2050
|
-
}), 128))
|
|
2051
|
-
]),
|
|
2052
|
-
_: 1
|
|
2053
|
-
}, 8, ["popupClassName", "onTitleClick"])) : vue.createCommentVNode("", true),
|
|
2054
|
-
_ctx.isEmpty(_ctx.menu.children) ? (vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
2055
|
-
title: _ctx.menu.label,
|
|
2056
|
-
key: _ctx.menu.key
|
|
2057
|
-
}, {
|
|
2058
|
-
default: vue.withCtx(() => [
|
|
2059
|
-
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2060
|
-
menu: _ctx.menu,
|
|
2061
|
-
onClick: _ctx.onMenuTitleClick
|
|
2062
|
-
}, null, 8, ["menu", "onClick"])
|
|
2063
|
-
]),
|
|
2064
|
-
_: 1
|
|
2065
|
-
}, 8, ["title"])) : vue.createCommentVNode("", true)
|
|
2066
|
-
], 64);
|
|
2067
|
-
}
|
|
2068
|
-
const TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
|
|
2069
|
-
const _sfc_main$7 = vue.defineComponent({
|
|
2070
|
-
name: "TooltipOperator",
|
|
2071
|
-
props: [
|
|
2072
|
-
"menu",
|
|
2073
|
-
"onlyShowOperator",
|
|
2074
|
-
"cell"
|
|
2075
|
-
],
|
|
2076
|
-
setup(props) {
|
|
2077
|
-
const { menu, cell } = props;
|
|
2078
|
-
const onMenuClick = (menuInfo) => {
|
|
2079
|
-
var _a;
|
|
2080
|
-
(_a = menu == null ? void 0 : menu.onClick) == null ? void 0 : _a.call(menu, menuInfo, cell);
|
|
2081
|
-
};
|
|
2082
|
-
const onMenuTitleClick = (subMenu) => () => {
|
|
2083
|
-
subMenu == null ? void 0 : subMenu.onClick(subMenu, cell);
|
|
2084
|
-
};
|
|
2085
|
-
return {
|
|
2086
|
-
TOOLTIP_PREFIX_CLS: s2.TOOLTIP_PREFIX_CLS,
|
|
2087
|
-
onMenuClick,
|
|
2088
|
-
onMenuTitleClick,
|
|
2089
|
-
menus: menu == null ? void 0 : menu.items
|
|
2090
|
-
};
|
|
2091
|
-
},
|
|
2092
|
-
components: {
|
|
2093
|
-
Menu: antDesignVue.Menu,
|
|
2094
|
-
Dropdown: antDesignVue.Dropdown,
|
|
2095
|
-
TooltipOperatorTitle,
|
|
2096
|
-
TooltipOperatorMenu
|
|
2097
|
-
}
|
|
2098
|
-
});
|
|
2099
|
-
const index_vue_vue_type_style_index_0_lang$1 = "";
|
|
2100
|
-
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2101
|
-
const _component_TooltipOperatorMenu = vue.resolveComponent("TooltipOperatorMenu");
|
|
2102
|
-
const _component_Menu = vue.resolveComponent("Menu");
|
|
2103
|
-
const _component_TooltipOperatorTitle = vue.resolveComponent("TooltipOperatorTitle");
|
|
2104
|
-
const _component_Dropdown = vue.resolveComponent("Dropdown");
|
|
2105
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2106
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator`)
|
|
2107
|
-
}, [
|
|
2108
|
-
_ctx.onlyShowOperator ? (vue.openBlock(), vue.createBlock(_component_Menu, {
|
|
2109
|
-
key: 0,
|
|
2110
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2111
|
-
onClick: _ctx.onMenuClick
|
|
2112
|
-
}, {
|
|
2113
|
-
default: vue.withCtx(() => [
|
|
2114
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menus, (menu) => {
|
|
2115
|
-
return vue.openBlock(), vue.createBlock(_component_TooltipOperatorMenu, {
|
|
2116
|
-
key: menu.key,
|
|
2117
|
-
menu,
|
|
2118
|
-
cell: _ctx.cell
|
|
2119
|
-
}, null, 8, ["menu", "cell"]);
|
|
2120
|
-
}), 128))
|
|
2121
|
-
]),
|
|
2122
|
-
_: 1
|
|
2123
|
-
}, 8, ["class", "onClick"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.menus, (menu) => {
|
|
2124
|
-
return vue.openBlock(), vue.createBlock(_component_Dropdown, {
|
|
2125
|
-
key: menu.key,
|
|
2126
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-dropdown`)
|
|
2127
|
-
}, {
|
|
2128
|
-
overlay: vue.withCtx(() => {
|
|
2129
|
-
var _a;
|
|
2130
|
-
return [
|
|
2131
|
-
((_a = menu == null ? void 0 : menu.children) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createBlock(_component_Menu, {
|
|
2132
|
-
key: 0,
|
|
2133
|
-
class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
|
|
2134
|
-
onClick: _ctx.onMenuClick
|
|
2135
|
-
}, {
|
|
2136
|
-
default: vue.withCtx(() => [
|
|
2137
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menus, (menu2) => {
|
|
2138
|
-
return vue.openBlock(), vue.createBlock(_component_TooltipOperatorMenu, {
|
|
2139
|
-
key: menu2.key,
|
|
2140
|
-
menu: menu2,
|
|
2141
|
-
cell: _ctx.cell
|
|
2142
|
-
}, null, 8, ["menu", "cell"]);
|
|
2143
|
-
}), 128))
|
|
2144
|
-
]),
|
|
2145
|
-
_: 2
|
|
2146
|
-
}, 1032, ["class", "onClick"])) : vue.createCommentVNode("", true)
|
|
2147
|
-
];
|
|
2148
|
-
}),
|
|
2149
|
-
default: vue.withCtx(() => [
|
|
2150
|
-
vue.createVNode(_component_TooltipOperatorTitle, {
|
|
2151
|
-
menu,
|
|
2152
|
-
onClick: ($event) => _ctx.onMenuTitleClick(menu)
|
|
2153
|
-
}, null, 8, ["menu", "onClick"])
|
|
2154
|
-
]),
|
|
2155
|
-
_: 2
|
|
2156
|
-
}, 1032, ["class"]);
|
|
2157
|
-
}), 128))
|
|
2158
|
-
], 2);
|
|
2159
|
-
}
|
|
2160
|
-
const TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
2161
|
-
const _sfc_main$6 = vue.defineComponent({
|
|
2162
|
-
name: "TooltipComponent",
|
|
2163
|
-
props: [
|
|
2164
|
-
"data",
|
|
2165
|
-
"options",
|
|
2166
|
-
"cell",
|
|
2167
|
-
"position",
|
|
2168
|
-
"event",
|
|
2169
|
-
"content"
|
|
2170
|
-
],
|
|
2171
|
-
setup(props) {
|
|
2172
|
-
const { operator, onlyShowOperator } = s2.getTooltipDefaultOptions(
|
|
2173
|
-
props.options
|
|
2174
|
-
);
|
|
2175
|
-
return {
|
|
2176
|
-
operator,
|
|
2177
|
-
onlyShowOperator
|
|
2178
|
-
};
|
|
2179
|
-
},
|
|
2180
|
-
components: {
|
|
2181
|
-
TooltipDetail,
|
|
2182
|
-
TooltipHeadInfo,
|
|
2183
|
-
TooltipInfos,
|
|
2184
|
-
TooltipSimpleTips,
|
|
2185
|
-
TooltipSummary,
|
|
2186
|
-
TooltipOperator
|
|
2187
|
-
}
|
|
2188
|
-
});
|
|
2189
|
-
const index_vue_vue_type_style_index_0_lang = "";
|
|
2190
|
-
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2191
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
2192
|
-
const _component_TooltipOperator = vue.resolveComponent("TooltipOperator");
|
|
2193
|
-
const _component_TooltipSimpleTips = vue.resolveComponent("TooltipSimpleTips");
|
|
2194
|
-
const _component_TooltipSummary = vue.resolveComponent("TooltipSummary");
|
|
2195
|
-
const _component_TooltipHeadInfo = vue.resolveComponent("TooltipHeadInfo");
|
|
2196
|
-
const _component_TooltipDetail = vue.resolveComponent("TooltipDetail");
|
|
2197
|
-
const _component_TooltipInfos = vue.resolveComponent("TooltipInfos");
|
|
2198
|
-
return _ctx.onlyShowOperator ? (vue.openBlock(), vue.createBlock(_component_TooltipOperator, {
|
|
2199
|
-
key: 0,
|
|
2200
|
-
menu: (_a = _ctx.operator) == null ? void 0 : _a.menu,
|
|
2201
|
-
onlyShowOperator: true,
|
|
2202
|
-
cell: _ctx.cell
|
|
2203
|
-
}, null, 8, ["menu", "cell"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
2204
|
-
vue.createVNode(_component_TooltipOperator, {
|
|
2205
|
-
menu: (_b = _ctx.operator) == null ? void 0 : _b.menu,
|
|
2206
|
-
onlyShowOperator: false,
|
|
2207
|
-
cell: _ctx.cell
|
|
2208
|
-
}, null, 8, ["menu", "cell"]),
|
|
2209
|
-
_ctx.content ? vue.renderSlot(_ctx.$slots, "content", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
2210
|
-
vue.createVNode(_component_TooltipSimpleTips, {
|
|
2211
|
-
name: (_c = _ctx.data) == null ? void 0 : _c.name,
|
|
2212
|
-
tips: (_d = _ctx.data) == null ? void 0 : _d.tips
|
|
2213
|
-
}, null, 8, ["name", "tips"]),
|
|
2214
|
-
((_f = (_e = _ctx.data) == null ? void 0 : _e.summaries) == null ? void 0 : _f.length) ? (vue.openBlock(), vue.createBlock(_component_TooltipSummary, {
|
|
2215
|
-
key: 0,
|
|
2216
|
-
summaries: (_g = _ctx.data) == null ? void 0 : _g.summaries
|
|
2217
|
-
}, null, 8, ["summaries"])) : vue.createCommentVNode("", true),
|
|
2218
|
-
vue.createVNode(_component_TooltipHeadInfo, {
|
|
2219
|
-
rows: ((_i = (_h = _ctx.data) == null ? void 0 : _h.headInfo) == null ? void 0 : _i.rows) || [],
|
|
2220
|
-
cols: ((_k = (_j = _ctx.data) == null ? void 0 : _j.headInfo) == null ? void 0 : _k.cols) || []
|
|
2221
|
-
}, null, 8, ["rows", "cols"]),
|
|
2222
|
-
vue.createVNode(_component_TooltipDetail, {
|
|
2223
|
-
list: ((_l = _ctx.data) == null ? void 0 : _l.details) || []
|
|
2224
|
-
}, null, 8, ["list"]),
|
|
2225
|
-
((_m = _ctx.data) == null ? void 0 : _m.infos) ? (vue.openBlock(), vue.createBlock(_component_TooltipInfos, {
|
|
2226
|
-
key: 1,
|
|
2227
|
-
infos: (_n = _ctx.data) == null ? void 0 : _n.infos
|
|
2228
|
-
}, null, 8, ["infos"])) : vue.createCommentVNode("", true)
|
|
2229
|
-
], 64))
|
|
2230
|
-
], 64));
|
|
2231
|
-
}
|
|
2232
|
-
const TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
2233
|
-
class CustomTooltip extends s2.BaseTooltip {
|
|
2234
|
-
constructor(spreadsheet) {
|
|
2235
|
-
super(spreadsheet);
|
|
2236
|
-
}
|
|
2237
|
-
renderContent() {
|
|
2238
|
-
var _a;
|
|
2239
|
-
const { tooltip } = this.spreadsheet.options;
|
|
2240
|
-
const showOptions = this.options;
|
|
2241
|
-
const cell = this.spreadsheet.getCell(
|
|
2242
|
-
(_a = showOptions.event) == null ? void 0 : _a.target
|
|
2243
|
-
);
|
|
2244
|
-
const content = showOptions.content ?? (tooltip == null ? void 0 : tooltip.content);
|
|
2245
|
-
const tooltipProps = {
|
|
2246
|
-
...showOptions,
|
|
2247
|
-
cell,
|
|
2248
|
-
content
|
|
2249
|
-
};
|
|
2250
|
-
const tooltipVNode = vue.createVNode(
|
|
2251
|
-
TooltipComponent,
|
|
2252
|
-
tooltipProps,
|
|
2253
|
-
{
|
|
2254
|
-
content: () => content
|
|
2255
|
-
}
|
|
2256
|
-
);
|
|
2257
|
-
vue.render(null, this.container);
|
|
2258
|
-
vue.render(tooltipVNode, this.container);
|
|
2259
|
-
}
|
|
2260
|
-
destroy() {
|
|
2261
|
-
super.destroy();
|
|
2262
|
-
if (this.container) {
|
|
2263
|
-
vue.render(null, this.container);
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
const DEFAULT_PAGE_NUMBER = 1;
|
|
2268
|
-
const DEFAULT_PAGE_SIZE = 10;
|
|
2269
|
-
const usePagination = (s2Ref, props) => {
|
|
2270
|
-
var _a, _b, _c, _d;
|
|
2271
|
-
const current = vue.ref(
|
|
2272
|
-
((_b = (_a = props.options) == null ? void 0 : _a.pagination) == null ? void 0 : _b.current) ?? DEFAULT_PAGE_NUMBER
|
|
2273
|
-
);
|
|
2274
|
-
const pageSize = vue.ref(
|
|
2275
|
-
((_d = (_c = props.options) == null ? void 0 : _c.pagination) == null ? void 0 : _d.pageSize) ?? DEFAULT_PAGE_SIZE
|
|
2276
|
-
);
|
|
2277
|
-
const total = vue.ref(0);
|
|
2278
|
-
const change = (nextCurrent) => {
|
|
2279
|
-
current.value = nextCurrent;
|
|
2280
|
-
};
|
|
2281
|
-
const showSizeChange = (nextPageSize) => {
|
|
2282
|
-
pageSize.value = nextPageSize;
|
|
2283
|
-
};
|
|
2284
|
-
const visible = vue.computed(
|
|
2285
|
-
() => {
|
|
2286
|
-
var _a2;
|
|
2287
|
-
return props.showPagination && !isEmpty((_a2 = props.options) == null ? void 0 : _a2.pagination);
|
|
2288
|
-
}
|
|
2289
|
-
);
|
|
2290
|
-
vue.watch([current, pageSize], () => {
|
|
2291
|
-
var _a2;
|
|
2292
|
-
if (!s2Ref.value) {
|
|
2293
|
-
return;
|
|
2294
|
-
}
|
|
2295
|
-
const nextPagination = isEmpty((_a2 = props.options) == null ? void 0 : _a2.pagination) ? null : {
|
|
2296
|
-
current: current.value,
|
|
2297
|
-
pageSize: pageSize.value
|
|
2298
|
-
};
|
|
2299
|
-
s2Ref.value.updatePagination(nextPagination);
|
|
2300
|
-
s2Ref.value.render(false);
|
|
2301
|
-
});
|
|
2302
|
-
vue.watch(
|
|
2303
|
-
[() => {
|
|
2304
|
-
var _a2;
|
|
2305
|
-
return (_a2 = props.options) == null ? void 0 : _a2.pagination;
|
|
2306
|
-
}, s2Ref],
|
|
2307
|
-
() => {
|
|
2308
|
-
var _a2, _b2, _c2, _d2, _e, _f;
|
|
2309
|
-
current.value = ((_b2 = (_a2 = props.options) == null ? void 0 : _a2.pagination) == null ? void 0 : _b2.current) ?? DEFAULT_PAGE_NUMBER;
|
|
2310
|
-
pageSize.value = ((_d2 = (_c2 = props.options) == null ? void 0 : _c2.pagination) == null ? void 0 : _d2.pageSize) ?? DEFAULT_PAGE_SIZE;
|
|
2311
|
-
total.value = ((_f = (_e = s2Ref.value) == null ? void 0 : _e.facet) == null ? void 0 : _f.viewCellHeights.getTotalLength()) ?? 0;
|
|
2312
|
-
},
|
|
2313
|
-
{
|
|
2314
|
-
immediate: true
|
|
2315
|
-
}
|
|
2316
|
-
);
|
|
2317
|
-
vue.watch(s2Ref, (value, oldValue, onCleanup) => {
|
|
2318
|
-
if (!s2Ref.value) {
|
|
2319
|
-
return;
|
|
2320
|
-
}
|
|
2321
|
-
const totalUpdateCallback = (data) => {
|
|
2322
|
-
var _a2;
|
|
2323
|
-
if (isEmpty((_a2 = props.options) == null ? void 0 : _a2.pagination)) {
|
|
2324
|
-
return;
|
|
2325
|
-
}
|
|
2326
|
-
total.value = data.total;
|
|
2327
|
-
};
|
|
2328
|
-
s2Ref.value.on(s2.S2Event.LAYOUT_PAGINATION, totalUpdateCallback);
|
|
2329
|
-
onCleanup(() => {
|
|
2330
|
-
var _a2;
|
|
2331
|
-
(_a2 = s2Ref.value) == null ? void 0 : _a2.off(s2.S2Event.LAYOUT_PAGINATION, totalUpdateCallback);
|
|
2332
|
-
});
|
|
2333
|
-
});
|
|
2334
|
-
return {
|
|
2335
|
-
visible,
|
|
2336
|
-
current,
|
|
2337
|
-
pageSize,
|
|
2338
|
-
total,
|
|
2339
|
-
change,
|
|
2340
|
-
showSizeChange
|
|
2341
|
-
};
|
|
2342
|
-
};
|
|
2343
|
-
const PRE_CLASS = `${s2.S2_PREFIX_CLS}-pagination`;
|
|
2344
|
-
const _sfc_main$5 = vue.defineComponent({
|
|
2345
|
-
name: "s2-pagination",
|
|
2346
|
-
props: {
|
|
2347
|
-
current: {
|
|
2348
|
-
type: Number,
|
|
2349
|
-
default: DEFAULT_PAGE_NUMBER
|
|
2350
|
-
},
|
|
2351
|
-
total: {
|
|
2352
|
-
type: Number,
|
|
2353
|
-
default: 0
|
|
2354
|
-
},
|
|
2355
|
-
pageSize: {
|
|
2356
|
-
type: Number,
|
|
2357
|
-
default: DEFAULT_PAGE_SIZE
|
|
2358
|
-
}
|
|
2359
|
-
},
|
|
2360
|
-
emits: ["change", "showSizeChange"],
|
|
2361
|
-
setup: (props) => {
|
|
2362
|
-
const showQuickJumper = vue.computed(() => props.total / props.pageSize > 5);
|
|
2363
|
-
return {
|
|
2364
|
-
showQuickJumper,
|
|
2365
|
-
PRE_CLASS,
|
|
2366
|
-
i18n: s2.i18n
|
|
2367
|
-
};
|
|
2368
|
-
},
|
|
2369
|
-
components: {
|
|
2370
|
-
AntDPagination: antDesignVue.Pagination
|
|
2371
|
-
}
|
|
2372
|
-
});
|
|
2373
|
-
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2374
|
-
const _component_AntDPagination = vue.resolveComponent("AntDPagination");
|
|
2375
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2376
|
-
class: vue.normalizeClass(_ctx.PRE_CLASS)
|
|
2377
|
-
}, [
|
|
2378
|
-
vue.createVNode(_component_AntDPagination, {
|
|
2379
|
-
"default-current": 1,
|
|
2380
|
-
current: _ctx.current,
|
|
2381
|
-
total: _ctx.total,
|
|
2382
|
-
pageSize: _ctx.pageSize,
|
|
2383
|
-
showSizeChanger: true,
|
|
2384
|
-
onShowSizeChange: _cache[0] || (_cache[0] = (_, size2) => _ctx.$emit("showSizeChange", size2)),
|
|
2385
|
-
size: "small",
|
|
2386
|
-
showQuickJumper: _ctx.showQuickJumper,
|
|
2387
|
-
onChange: _cache[1] || (_cache[1] = (current) => _ctx.$emit("change", current))
|
|
2388
|
-
}, null, 8, ["current", "total", "pageSize", "showQuickJumper"]),
|
|
2389
|
-
vue.createElementVNode("span", {
|
|
2390
|
-
class: vue.normalizeClass(`${_ctx.PRE_CLASS}-count`)
|
|
2391
|
-
}, vue.toDisplayString(_ctx.i18n("共计")) + " " + vue.toDisplayString(_ctx.total || " - ") + " " + vue.toDisplayString(_ctx.i18n("条")), 3)
|
|
2392
|
-
], 2);
|
|
2393
|
-
}
|
|
2394
|
-
const S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
2395
|
-
const RENDER_TOOLTIP_OPTION = {
|
|
2396
|
-
tooltip: {
|
|
2397
|
-
render: (spreadsheet) => new CustomTooltip(spreadsheet)
|
|
2398
|
-
}
|
|
2399
|
-
};
|
|
2400
|
-
const getSheetComponentOptions = (...options) => getBaseSheetComponentOptions(RENDER_TOOLTIP_OPTION, ...options);
|
|
2401
|
-
const useCellEvent = (s2Ref, emit, eventName, emitName) => {
|
|
2402
|
-
var _a;
|
|
2403
|
-
const handler = (event) => {
|
|
2404
|
-
const param = s2.getBaseCellData(event);
|
|
2405
|
-
emit(emitName, param);
|
|
2406
|
-
};
|
|
2407
|
-
(_a = s2Ref.value) == null ? void 0 : _a.on(eventName, handler);
|
|
2408
|
-
};
|
|
2409
|
-
const useS2Event = (s2Ref, emit, eventName, emitName) => {
|
|
2410
|
-
var _a;
|
|
2411
|
-
const handler = (params) => {
|
|
2412
|
-
emit(emitName, params);
|
|
2413
|
-
};
|
|
2414
|
-
(_a = s2Ref.value) == null ? void 0 : _a.on(eventName, handler);
|
|
2415
|
-
};
|
|
2416
|
-
const useEvents = (s2Ref, emit) => {
|
|
2417
|
-
vue.onMounted(() => {
|
|
2418
|
-
if (!s2Ref.value) {
|
|
2419
|
-
return;
|
|
2420
|
-
}
|
|
2421
|
-
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_HOVER, "rowCellHover");
|
|
2422
|
-
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_CLICK, "rowCellClick");
|
|
2423
|
-
useCellEvent(
|
|
2424
|
-
s2Ref,
|
|
2425
|
-
emit,
|
|
2426
|
-
s2.S2Event.ROW_CELL_DOUBLE_CLICK,
|
|
2427
|
-
"rowCellDoubleClick"
|
|
2428
|
-
);
|
|
2429
|
-
useCellEvent(
|
|
2430
|
-
s2Ref,
|
|
2431
|
-
emit,
|
|
2432
|
-
s2.S2Event.ROW_CELL_CONTEXT_MENU,
|
|
2433
|
-
"rowCellContextMenu"
|
|
2434
|
-
);
|
|
2435
|
-
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_DOWN, "rowCellMouseDown");
|
|
2436
|
-
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
|
|
2437
|
-
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
|
|
2438
|
-
useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_COLLAPSED, "rowCellCollapsed");
|
|
2439
|
-
useS2Event(
|
|
2440
|
-
s2Ref,
|
|
2441
|
-
emit,
|
|
2442
|
-
s2.S2Event.ROW_CELL_ALL_COLLAPSED,
|
|
2443
|
-
"rowCellAllCollapsed"
|
|
2444
|
-
);
|
|
2445
|
-
useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_SCROLL, "rowCellScroll");
|
|
2446
|
-
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_HOVER, "colCellHover");
|
|
2447
|
-
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_CLICK, "colCellClick");
|
|
2448
|
-
useCellEvent(
|
|
2449
|
-
s2Ref,
|
|
2450
|
-
emit,
|
|
2451
|
-
s2.S2Event.COL_CELL_DOUBLE_CLICK,
|
|
2452
|
-
"colCellDoubleClick"
|
|
2453
|
-
);
|
|
2454
|
-
useCellEvent(
|
|
2455
|
-
s2Ref,
|
|
2456
|
-
emit,
|
|
2457
|
-
s2.S2Event.COL_CELL_CONTEXT_MENU,
|
|
2458
|
-
"colCellContextMenu"
|
|
2459
|
-
);
|
|
2460
|
-
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_MOUSE_DOWN, "colCellMouseDown");
|
|
2461
|
-
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_MOUSE_UP, "colCellMouseUp");
|
|
2462
|
-
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_MOUSE_MOVE, "colCellMouseMove");
|
|
2463
|
-
useS2Event(s2Ref, emit, s2.S2Event.COL_CELL_EXPANDED, "colCellExpanded");
|
|
2464
|
-
useS2Event(s2Ref, emit, s2.S2Event.COL_CELL_HIDDEN, "colCellHidden");
|
|
2465
|
-
useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_HOVER, "dataCellHover");
|
|
2466
|
-
useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_CLICK, "dataCellClick");
|
|
2467
|
-
useCellEvent(
|
|
2468
|
-
s2Ref,
|
|
2469
|
-
emit,
|
|
2470
|
-
s2.S2Event.DATA_CELL_DOUBLE_CLICK,
|
|
2471
|
-
"dataCellDoubleClick"
|
|
2472
|
-
);
|
|
2473
|
-
useCellEvent(
|
|
2474
|
-
s2Ref,
|
|
2475
|
-
emit,
|
|
2476
|
-
s2.S2Event.DATA_CELL_CONTEXT_MENU,
|
|
2477
|
-
"dataCellContextMenu"
|
|
2478
|
-
);
|
|
2479
|
-
useCellEvent(
|
|
2480
|
-
s2Ref,
|
|
2481
|
-
emit,
|
|
2482
|
-
s2.S2Event.DATA_CELL_MOUSE_DOWN,
|
|
2483
|
-
"dataCellMouseDown"
|
|
2484
|
-
);
|
|
2485
|
-
useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_MOUSE_UP, "dataCellMouseUp");
|
|
2486
|
-
useCellEvent(
|
|
2487
|
-
s2Ref,
|
|
2488
|
-
emit,
|
|
2489
|
-
s2.S2Event.DATA_CELL_MOUSE_MOVE,
|
|
2490
|
-
"dataCellMouseMove"
|
|
2491
|
-
);
|
|
2492
|
-
useS2Event(
|
|
2493
|
-
s2Ref,
|
|
2494
|
-
emit,
|
|
2495
|
-
s2.S2Event.DATA_CELL_BRUSH_SELECTION,
|
|
2496
|
-
"dataCellBrushSelection"
|
|
2497
|
-
);
|
|
2498
|
-
useS2Event(
|
|
2499
|
-
s2Ref,
|
|
2500
|
-
emit,
|
|
2501
|
-
s2.S2Event.DATA_CELL_SELECT_MOVE,
|
|
2502
|
-
"dataCellSelectMove"
|
|
2503
|
-
);
|
|
2504
|
-
useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_HOVER, "cornerCellHover");
|
|
2505
|
-
useCellEvent(s2Ref, emit, s2.S2Event.CORNER_CELL_CLICK, "cornerCellClick");
|
|
2506
|
-
useCellEvent(
|
|
2507
|
-
s2Ref,
|
|
2508
|
-
emit,
|
|
2509
|
-
s2.S2Event.CORNER_CELL_DOUBLE_CLICK,
|
|
2510
|
-
"cornerCellDoubleClick"
|
|
2511
|
-
);
|
|
2512
|
-
useCellEvent(
|
|
2513
|
-
s2Ref,
|
|
2514
|
-
emit,
|
|
2515
|
-
s2.S2Event.CORNER_CELL_CONTEXT_MENU,
|
|
2516
|
-
"cornerCellContextMenu"
|
|
2517
|
-
);
|
|
2518
|
-
useCellEvent(
|
|
2519
|
-
s2Ref,
|
|
2520
|
-
emit,
|
|
2521
|
-
s2.S2Event.CORNER_CELL_MOUSE_DOWN,
|
|
2522
|
-
"cornerCellMouseDown"
|
|
2523
|
-
);
|
|
2524
|
-
useCellEvent(
|
|
2525
|
-
s2Ref,
|
|
2526
|
-
emit,
|
|
2527
|
-
s2.S2Event.CORNER_CELL_MOUSE_UP,
|
|
2528
|
-
"cornerCellMouseUp"
|
|
2529
|
-
);
|
|
2530
|
-
useCellEvent(
|
|
2531
|
-
s2Ref,
|
|
2532
|
-
emit,
|
|
2533
|
-
s2.S2Event.CORNER_CELL_MOUSE_MOVE,
|
|
2534
|
-
"cornerCellMouseMove"
|
|
2535
|
-
);
|
|
2536
|
-
useCellEvent(s2Ref, emit, s2.S2Event.MERGED_CELLS_HOVER, "mergedCellsHover");
|
|
2537
|
-
useCellEvent(s2Ref, emit, s2.S2Event.MERGED_CELLS_CLICK, "mergedCellsClick");
|
|
2538
|
-
useCellEvent(
|
|
2539
|
-
s2Ref,
|
|
2540
|
-
emit,
|
|
2541
|
-
s2.S2Event.MERGED_CELLS_DOUBLE_CLICK,
|
|
2542
|
-
"mergedCellsDoubleClick"
|
|
2543
|
-
);
|
|
2544
|
-
useCellEvent(
|
|
2545
|
-
s2Ref,
|
|
2546
|
-
emit,
|
|
2547
|
-
s2.S2Event.MERGED_CELLS_CONTEXT_MENU,
|
|
2548
|
-
"mergedCellsContextMenu"
|
|
2549
|
-
);
|
|
2550
|
-
useCellEvent(
|
|
2551
|
-
s2Ref,
|
|
2552
|
-
emit,
|
|
2553
|
-
s2.S2Event.MERGED_CELLS_MOUSE_DOWN,
|
|
2554
|
-
"mergedCellsMouseDown"
|
|
2555
|
-
);
|
|
2556
|
-
useCellEvent(
|
|
2557
|
-
s2Ref,
|
|
2558
|
-
emit,
|
|
2559
|
-
s2.S2Event.MERGED_CELLS_MOUSE_UP,
|
|
2560
|
-
"mergedCellsMouseUp"
|
|
2561
|
-
);
|
|
2562
|
-
useCellEvent(
|
|
2563
|
-
s2Ref,
|
|
2564
|
-
emit,
|
|
2565
|
-
s2.S2Event.MERGED_CELLS_MOUSE_MOVE,
|
|
2566
|
-
"mergedCellsMouseMove"
|
|
2567
|
-
);
|
|
2568
|
-
useS2Event(s2Ref, emit, s2.S2Event.RANGE_SORT, "rangeSort");
|
|
2569
|
-
useS2Event(s2Ref, emit, s2.S2Event.RANGE_SORTED, "rangeSorted");
|
|
2570
|
-
useS2Event(s2Ref, emit, s2.S2Event.RANGE_FILTER, "rangeFilter");
|
|
2571
|
-
useS2Event(s2Ref, emit, s2.S2Event.RANGE_FILTERED, "rangeFiltered");
|
|
2572
|
-
useS2Event(
|
|
2573
|
-
s2Ref,
|
|
2574
|
-
emit,
|
|
2575
|
-
s2.S2Event.LAYOUT_AFTER_HEADER_LAYOUT,
|
|
2576
|
-
"layoutAfterHeaderLayout"
|
|
2577
|
-
);
|
|
2578
|
-
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_PAGINATION, "layoutPagination");
|
|
2579
|
-
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_BEFORE_RENDER, "beforeRender");
|
|
2580
|
-
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_AFTER_RENDER, "afterRender");
|
|
2581
|
-
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_DESTROY, "destroy");
|
|
2582
|
-
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_RESIZE, "layoutResize");
|
|
2583
|
-
useS2Event(
|
|
2584
|
-
s2Ref,
|
|
2585
|
-
emit,
|
|
2586
|
-
s2.S2Event.LAYOUT_RESIZE_SERIES_WIDTH,
|
|
2587
|
-
"layoutResizeSeriesWidth"
|
|
2588
|
-
);
|
|
2589
|
-
useS2Event(
|
|
2590
|
-
s2Ref,
|
|
2591
|
-
emit,
|
|
2592
|
-
s2.S2Event.LAYOUT_RESIZE_ROW_WIDTH,
|
|
2593
|
-
"layoutResizeRowWidth"
|
|
2594
|
-
);
|
|
2595
|
-
useS2Event(
|
|
2596
|
-
s2Ref,
|
|
2597
|
-
emit,
|
|
2598
|
-
s2.S2Event.LAYOUT_RESIZE_ROW_HEIGHT,
|
|
2599
|
-
"layoutResizeRowHeight"
|
|
2600
|
-
);
|
|
2601
|
-
useS2Event(
|
|
2602
|
-
s2Ref,
|
|
2603
|
-
emit,
|
|
2604
|
-
s2.S2Event.LAYOUT_RESIZE_COL_WIDTH,
|
|
2605
|
-
"layoutResizeColWidth"
|
|
2606
|
-
);
|
|
2607
|
-
useS2Event(
|
|
2608
|
-
s2Ref,
|
|
2609
|
-
emit,
|
|
2610
|
-
s2.S2Event.LAYOUT_RESIZE_COL_HEIGHT,
|
|
2611
|
-
"layoutResizeColHeight"
|
|
2612
|
-
);
|
|
2613
|
-
useS2Event(
|
|
2614
|
-
s2Ref,
|
|
2615
|
-
emit,
|
|
2616
|
-
s2.S2Event.LAYOUT_RESIZE_TREE_WIDTH,
|
|
2617
|
-
"layoutResizeTreeWidth"
|
|
2618
|
-
);
|
|
2619
|
-
useS2Event(
|
|
2620
|
-
s2Ref,
|
|
2621
|
-
emit,
|
|
2622
|
-
s2.S2Event.LAYOUT_RESIZE_MOUSE_DOWN,
|
|
2623
|
-
"layoutResizeMouseDown"
|
|
2624
|
-
);
|
|
2625
|
-
useS2Event(
|
|
2626
|
-
s2Ref,
|
|
2627
|
-
emit,
|
|
2628
|
-
s2.S2Event.LAYOUT_RESIZE_MOUSE_UP,
|
|
2629
|
-
"layoutResizeMouseUp"
|
|
2630
|
-
);
|
|
2631
|
-
useS2Event(
|
|
2632
|
-
s2Ref,
|
|
2633
|
-
emit,
|
|
2634
|
-
s2.S2Event.LAYOUT_RESIZE_MOUSE_MOVE,
|
|
2635
|
-
"layoutResizeMouseMove"
|
|
2636
|
-
);
|
|
2637
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_KEYBOARD_DOWN, "keyBoardDown");
|
|
2638
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_KEYBOARD_UP, "keyBoardUp");
|
|
2639
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_COPIED, "copied");
|
|
2640
|
-
useS2Event(
|
|
2641
|
-
s2Ref,
|
|
2642
|
-
emit,
|
|
2643
|
-
s2.S2Event.GLOBAL_ACTION_ICON_HOVER,
|
|
2644
|
-
"actionIconHover"
|
|
2645
|
-
);
|
|
2646
|
-
useS2Event(
|
|
2647
|
-
s2Ref,
|
|
2648
|
-
emit,
|
|
2649
|
-
s2.S2Event.GLOBAL_ACTION_ICON_CLICK,
|
|
2650
|
-
"actionIconClick"
|
|
2651
|
-
);
|
|
2652
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_CONTEXT_MENU, "contextMenu");
|
|
2653
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_HOVER, "mouseHover");
|
|
2654
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_CLICK, "click");
|
|
2655
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_DOUBLE_CLICK, "doubleClick");
|
|
2656
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_SELECTED, "selected");
|
|
2657
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_MOUSE_UP, "mouseUp");
|
|
2658
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_RESET, "reset");
|
|
2659
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
|
|
2660
|
-
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_SCROLL, "scroll");
|
|
2661
|
-
useS2Event(
|
|
2662
|
-
s2Ref,
|
|
2663
|
-
emit,
|
|
2664
|
-
s2.S2Event.LAYOUT_AFTER_REAL_DATA_CELL_RENDER,
|
|
2665
|
-
"layoutAfterRealDataCellRender"
|
|
2666
|
-
);
|
|
2667
|
-
useS2Event(
|
|
2668
|
-
s2Ref,
|
|
2669
|
-
emit,
|
|
2670
|
-
s2.S2Event.ROW_CELL_BRUSH_SELECTION,
|
|
2671
|
-
"rowCellBrushSelection"
|
|
2672
|
-
);
|
|
2673
|
-
useS2Event(
|
|
2674
|
-
s2Ref,
|
|
2675
|
-
emit,
|
|
2676
|
-
s2.S2Event.COL_CELL_BRUSH_SELECTION,
|
|
2677
|
-
"colCellBrushSelection"
|
|
2678
|
-
);
|
|
2679
|
-
});
|
|
2680
|
-
};
|
|
2681
|
-
const useLoading = (s2Ref, loadingProp = false) => {
|
|
2682
|
-
const loading = vue.ref(loadingProp);
|
|
2683
|
-
const setLoading = (updated) => {
|
|
2684
|
-
loading.value = updated;
|
|
2685
|
-
};
|
|
2686
|
-
vue.watch(s2Ref, (s2$1) => {
|
|
2687
|
-
s2$1 == null ? void 0 : s2$1.on(s2.S2Event.LAYOUT_BEFORE_RENDER, () => {
|
|
2688
|
-
setLoading(true);
|
|
2689
|
-
});
|
|
2690
|
-
s2$1 == null ? void 0 : s2$1.on(s2.S2Event.LAYOUT_AFTER_RENDER, () => {
|
|
2691
|
-
setLoading(false);
|
|
2692
|
-
});
|
|
2693
|
-
});
|
|
2694
|
-
return { loading, setLoading };
|
|
2695
|
-
};
|
|
2696
|
-
const useSheetUpdate = (s2Ref, props) => {
|
|
2697
|
-
const updateFlag = vue.reactive({
|
|
2698
|
-
rerender: false,
|
|
2699
|
-
reloadData: false,
|
|
2700
|
-
rebuildDataset: false
|
|
2701
|
-
});
|
|
2702
|
-
vue.watch(
|
|
2703
|
-
() => props.options,
|
|
2704
|
-
(options, prevOptions) => {
|
|
2705
|
-
var _a, _b;
|
|
2706
|
-
updateFlag.rerender = true;
|
|
2707
|
-
if (!Object.is(prevOptions == null ? void 0 : prevOptions.hierarchyType, options == null ? void 0 : options.hierarchyType)) {
|
|
2708
|
-
updateFlag.reloadData = true;
|
|
2709
|
-
updateFlag.rebuildDataset = true;
|
|
2710
|
-
}
|
|
2711
|
-
(_a = s2Ref.value) == null ? void 0 : _a.setOptions(options);
|
|
2712
|
-
(_b = s2Ref.value) == null ? void 0 : _b.changeSheetSize(options == null ? void 0 : options.width, options == null ? void 0 : options.height);
|
|
2713
|
-
},
|
|
2714
|
-
{ deep: vue.isProxy(props.options) }
|
|
2715
|
-
);
|
|
2716
|
-
vue.watch(
|
|
2717
|
-
() => props.dataCfg,
|
|
2718
|
-
(dataCfg, prevDataCfg) => {
|
|
2719
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2720
|
-
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)) {
|
|
2721
|
-
(_e = s2Ref.value) == null ? void 0 : _e.facet.clearInitColLeafNodes();
|
|
2722
|
-
}
|
|
2723
|
-
updateFlag.rerender = true;
|
|
2724
|
-
updateFlag.reloadData = true;
|
|
2725
|
-
(_f = s2Ref.value) == null ? void 0 : _f.setDataCfg(dataCfg);
|
|
2726
|
-
},
|
|
2727
|
-
{ deep: vue.isProxy(props.dataCfg) }
|
|
2728
|
-
);
|
|
2729
|
-
vue.watch(
|
|
2730
|
-
() => props.themeCfg,
|
|
2731
|
-
(themeCfg) => {
|
|
2732
|
-
var _a;
|
|
2733
|
-
updateFlag.rerender = true;
|
|
2734
|
-
(_a = s2Ref.value) == null ? void 0 : _a.setThemeCfg(themeCfg);
|
|
2735
|
-
},
|
|
2736
|
-
{
|
|
2737
|
-
deep: vue.isProxy(props.themeCfg)
|
|
2738
|
-
}
|
|
2739
|
-
);
|
|
2740
|
-
vue.watch(updateFlag, (flag) => {
|
|
2741
|
-
var _a;
|
|
2742
|
-
if (!flag.rerender) {
|
|
2743
|
-
return;
|
|
2744
|
-
}
|
|
2745
|
-
(_a = s2Ref.value) == null ? void 0 : _a.render(flag.reloadData, {
|
|
2746
|
-
reBuildDataSet: flag.rebuildDataset
|
|
2747
|
-
});
|
|
2748
|
-
flag.rerender = false;
|
|
2749
|
-
flag.reloadData = false;
|
|
2750
|
-
flag.rebuildDataset = false;
|
|
2751
|
-
});
|
|
2752
|
-
};
|
|
2753
|
-
const useResize = (s2Ref, props, dom) => {
|
|
2754
|
-
const unobserve = vue.ref();
|
|
2755
|
-
vue.watch([s2Ref, () => props.adaptive], ([s22, adaptive], _, onCleanup) => {
|
|
2756
|
-
if (!s22) {
|
|
2757
|
-
return;
|
|
2758
|
-
}
|
|
2759
|
-
unobserve.value = createResizeObserver({
|
|
2760
|
-
s2: s22,
|
|
2761
|
-
adaptive,
|
|
2762
|
-
wrapper: dom.wrapperRef.value,
|
|
2763
|
-
container: dom.containerRef.value
|
|
2764
|
-
});
|
|
2765
|
-
onCleanup(() => {
|
|
2766
|
-
var _a;
|
|
2767
|
-
(_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
|
|
2768
|
-
});
|
|
2769
|
-
});
|
|
2770
|
-
};
|
|
2771
|
-
function useSpreadSheet(props, emit) {
|
|
2772
|
-
const {
|
|
2773
|
-
dataCfg,
|
|
2774
|
-
options,
|
|
2775
|
-
themeCfg,
|
|
2776
|
-
loading: loadingProps,
|
|
2777
|
-
sheetType,
|
|
2778
|
-
onSpreadsheet,
|
|
2779
|
-
onMounted: onS2Mounted
|
|
2780
|
-
} = props;
|
|
2781
|
-
const wrapperRef = vue.ref();
|
|
2782
|
-
const containerRef = vue.ref();
|
|
2783
|
-
const s2Ref = vue.shallowRef();
|
|
2784
|
-
const { loading, setLoading } = useLoading(s2Ref, loadingProps);
|
|
2785
|
-
const pagination = usePagination(s2Ref, props);
|
|
2786
|
-
const renderSpreadSheet = (container) => {
|
|
2787
|
-
const rawDataCfg = vue.toRaw(dataCfg);
|
|
2788
|
-
const rawOptions = vue.toRaw(options);
|
|
2789
|
-
const s2Options = getSheetComponentOptions(rawOptions);
|
|
2790
|
-
if (onSpreadsheet) {
|
|
2791
|
-
return onSpreadsheet(container, rawDataCfg, s2Options);
|
|
2792
|
-
}
|
|
2793
|
-
if (sheetType === "table") {
|
|
2794
|
-
return new s2.TableSheet(container, rawDataCfg, s2Options);
|
|
2795
|
-
}
|
|
2796
|
-
return new s2.PivotSheet(container, rawDataCfg, s2Options);
|
|
2797
|
-
};
|
|
2798
|
-
const buildSpreadSheet = () => {
|
|
2799
|
-
setLoading(true);
|
|
2800
|
-
s2Ref.value = renderSpreadSheet(containerRef.value);
|
|
2801
|
-
s2Ref.value.setThemeCfg(vue.toRaw(themeCfg));
|
|
2802
|
-
s2Ref.value.render();
|
|
2803
|
-
setLoading(false);
|
|
2804
|
-
onS2Mounted == null ? void 0 : onS2Mounted(s2Ref.value);
|
|
2805
|
-
};
|
|
2806
|
-
vue.onMounted(buildSpreadSheet);
|
|
2807
|
-
useEvents(s2Ref, emit);
|
|
2808
|
-
useSheetUpdate(s2Ref, props);
|
|
2809
|
-
useResize(s2Ref, props, { wrapperRef, containerRef });
|
|
2810
|
-
vue.onBeforeUnmount(() => {
|
|
2811
|
-
var _a;
|
|
2812
|
-
(_a = s2Ref.value) == null ? void 0 : _a.destroy();
|
|
2813
|
-
});
|
|
2814
|
-
return {
|
|
2815
|
-
wrapperRef,
|
|
2816
|
-
containerRef,
|
|
2817
|
-
s2Ref,
|
|
2818
|
-
loading,
|
|
2819
|
-
setLoading,
|
|
2820
|
-
pagination
|
|
2821
|
-
};
|
|
2822
|
-
}
|
|
2823
|
-
const initBaseSheetProps = () => {
|
|
2824
|
-
return {
|
|
2825
|
-
sheetType: String,
|
|
2826
|
-
dataCfg: Object,
|
|
2827
|
-
themeCfg: Object,
|
|
2828
|
-
showPagination: {
|
|
2829
|
-
type: [Object, Boolean],
|
|
2830
|
-
default: false
|
|
2831
|
-
},
|
|
2832
|
-
loading: Boolean,
|
|
2833
|
-
// TODO: 待后续完善
|
|
2834
|
-
partDrillDown: Object,
|
|
2835
|
-
header: Object,
|
|
2836
|
-
options: {
|
|
2837
|
-
type: Object,
|
|
2838
|
-
default: {}
|
|
2839
|
-
},
|
|
2840
|
-
adaptive: {
|
|
2841
|
-
type: [Object, Boolean],
|
|
2842
|
-
default: false
|
|
2843
|
-
},
|
|
2844
|
-
onSpreadsheet: Function,
|
|
2845
|
-
onMounted: Function
|
|
2846
|
-
};
|
|
2847
|
-
};
|
|
2848
|
-
const initDrillDownProps = () => {
|
|
2849
|
-
return {
|
|
2850
|
-
className: String,
|
|
2851
|
-
titleText: {
|
|
2852
|
-
type: String,
|
|
2853
|
-
default: s2.i18n("选择下钻维度")
|
|
2854
|
-
},
|
|
2855
|
-
searchText: {
|
|
2856
|
-
type: String,
|
|
2857
|
-
default: s2.i18n("搜索字段")
|
|
2858
|
-
},
|
|
2859
|
-
clearButtonText: {
|
|
2860
|
-
type: String,
|
|
2861
|
-
default: s2.i18n("恢复默认")
|
|
2862
|
-
},
|
|
2863
|
-
extra: Node,
|
|
2864
|
-
dataSet: {
|
|
2865
|
-
type: Array,
|
|
2866
|
-
default: []
|
|
2867
|
-
},
|
|
2868
|
-
drillFields: Array,
|
|
2869
|
-
disabledFields: Array,
|
|
2870
|
-
getDrillFields: Function,
|
|
2871
|
-
setDrillFields: Function
|
|
2872
|
-
};
|
|
2873
|
-
};
|
|
2874
|
-
const initDrillDownEmits = () => {
|
|
2875
|
-
const keys2 = ["getDrillFields", "setDrillFields"];
|
|
2876
|
-
return keys2;
|
|
2877
|
-
};
|
|
2878
|
-
const initBaseSheetEmits = () => {
|
|
2879
|
-
const keys2 = [
|
|
2880
|
-
"spreadsheet",
|
|
2881
|
-
// ============== Row Cell ====================
|
|
2882
|
-
"rowCellHover",
|
|
2883
|
-
"rowCellClick",
|
|
2884
|
-
"rowCellDoubleClick",
|
|
2885
|
-
"rowCellContextMenu",
|
|
2886
|
-
"rowCellMouseDown",
|
|
2887
|
-
"rowCellMouseUp",
|
|
2888
|
-
"rowCellMouseMove",
|
|
2889
|
-
"rowCellCollapsed",
|
|
2890
|
-
"rowCellAllCollapsed",
|
|
2891
|
-
"rowCellScroll",
|
|
2892
|
-
// ============== Col Cell ====================
|
|
2893
|
-
"colCellHover",
|
|
2894
|
-
"colCellClick",
|
|
2895
|
-
"colCellDoubleClick",
|
|
2896
|
-
"colCellContextMenu",
|
|
2897
|
-
"colCellMouseDown",
|
|
2898
|
-
"colCellMouseUp",
|
|
2899
|
-
"colCellMouseMove",
|
|
2900
|
-
"colCellExpanded",
|
|
2901
|
-
"colCellHidden",
|
|
2902
|
-
// ============== Data Cell ====================
|
|
2903
|
-
"dataCellHover",
|
|
2904
|
-
"dataCellClick",
|
|
2905
|
-
"dataCellDoubleClick",
|
|
2906
|
-
"dataCellContextMenu",
|
|
2907
|
-
"dataCellMouseDown",
|
|
2908
|
-
"dataCellMouseUp",
|
|
2909
|
-
"dataCellMouseMove",
|
|
2910
|
-
"dataCellBrushSelection",
|
|
2911
|
-
"dataCellSelectMove",
|
|
2912
|
-
// ============== Corner Cell ====================
|
|
2913
|
-
"cornerCellHover",
|
|
2914
|
-
"cornerCellClick",
|
|
2915
|
-
"cornerCellDoubleClick",
|
|
2916
|
-
"cornerCellContextMenu",
|
|
2917
|
-
"cornerCellMouseDown",
|
|
2918
|
-
"cornerCellMouseUp",
|
|
2919
|
-
"cornerCellMouseMove",
|
|
2920
|
-
// ============== Merged Cells ====================
|
|
2921
|
-
"mergedCellsHover",
|
|
2922
|
-
"mergedCellsClick",
|
|
2923
|
-
"mergedCellsDoubleClick",
|
|
2924
|
-
"mergedCellsContextMenu",
|
|
2925
|
-
"mergedCellsMouseDown",
|
|
2926
|
-
"mergedCellsMouseUp",
|
|
2927
|
-
"mergedCellsMouseMove",
|
|
2928
|
-
// ============== Sort ====================
|
|
2929
|
-
"rangeSort",
|
|
2930
|
-
"rangeSorted",
|
|
2931
|
-
// ============== Filter ====================
|
|
2932
|
-
"rangeFilter",
|
|
2933
|
-
"rangeFiltered",
|
|
2934
|
-
// ============== Layout ====================
|
|
2935
|
-
"layoutAfterHeaderLayout",
|
|
2936
|
-
"layoutPagination",
|
|
2937
|
-
"beforeRender",
|
|
2938
|
-
"afterRender",
|
|
2939
|
-
"mounted",
|
|
2940
|
-
"destroy",
|
|
2941
|
-
// ============== Resize ====================
|
|
2942
|
-
"layoutResize",
|
|
2943
|
-
"layoutResizeSeriesWidth",
|
|
2944
|
-
"layoutResizeRowWidth",
|
|
2945
|
-
"layoutResizeRowHeight",
|
|
2946
|
-
"layoutResizeColWidth",
|
|
2947
|
-
"layoutResizeColHeight",
|
|
2948
|
-
"layoutResizeTreeWidth",
|
|
2949
|
-
"layoutResizeMouseDown",
|
|
2950
|
-
"layoutResizeMouseUp",
|
|
2951
|
-
"layoutResizeMouseMove",
|
|
2952
|
-
// ============== Global ====================
|
|
2953
|
-
"keyBoardDown",
|
|
2954
|
-
"keyBoardUp",
|
|
2955
|
-
"copied",
|
|
2956
|
-
"actionIconHover",
|
|
2957
|
-
"actionIconClick",
|
|
2958
|
-
"contextMenu",
|
|
2959
|
-
"mouseHover",
|
|
2960
|
-
"mouseUp",
|
|
2961
|
-
"mouseMove",
|
|
2962
|
-
"mouseDown",
|
|
2963
|
-
"selected",
|
|
2964
|
-
"reset",
|
|
2965
|
-
"linkFieldJump",
|
|
2966
|
-
"click",
|
|
2967
|
-
"doubleClick",
|
|
2968
|
-
"scroll",
|
|
2969
|
-
"hover",
|
|
2970
|
-
// ============== Auto 自动生成的 ================
|
|
2971
|
-
"layoutAfterRealDataCellRender",
|
|
2972
|
-
"rowCellBrushSelection",
|
|
2973
|
-
"colCellBrushSelection"
|
|
2974
|
-
];
|
|
2975
|
-
return keys2;
|
|
2976
|
-
};
|
|
2977
|
-
const _sfc_main$4 = vue.defineComponent({
|
|
2978
|
-
name: "BaseSheet",
|
|
2979
|
-
props: initBaseSheetProps(),
|
|
2980
|
-
emits: initBaseSheetEmits(),
|
|
2981
|
-
setup(props, ctx) {
|
|
2982
|
-
const { wrapperRef, containerRef, s2Ref, loading, pagination } = useSpreadSheet(props, ctx.emit);
|
|
2983
|
-
ctx.expose({
|
|
2984
|
-
get instance() {
|
|
2985
|
-
return s2Ref.value;
|
|
2986
|
-
}
|
|
2987
|
-
});
|
|
2988
|
-
const handlePageChange = (nextCurrent) => {
|
|
2989
|
-
var _a, _b;
|
|
2990
|
-
if (props.showPagination && !isBoolean(props.showPagination)) {
|
|
2991
|
-
(_b = (_a = props.showPagination).onChange) == null ? void 0 : _b.call(_a, nextCurrent);
|
|
2992
|
-
}
|
|
2993
|
-
pagination.change(nextCurrent);
|
|
2994
|
-
};
|
|
2995
|
-
const handlePageSizeChange = (nextSize) => {
|
|
2996
|
-
var _a, _b;
|
|
2997
|
-
if (props.showPagination && !isBoolean(props.showPagination)) {
|
|
2998
|
-
(_b = (_a = props.showPagination).onShowSizeChange) == null ? void 0 : _b.call(_a, nextSize);
|
|
2999
|
-
}
|
|
3000
|
-
pagination.showSizeChange(nextSize);
|
|
3001
|
-
};
|
|
3002
|
-
return {
|
|
3003
|
-
S2_PREFIX_CLS: s2.S2_PREFIX_CLS,
|
|
3004
|
-
wrapperRef,
|
|
3005
|
-
containerRef,
|
|
3006
|
-
s2Ref,
|
|
3007
|
-
loading,
|
|
3008
|
-
pagination,
|
|
3009
|
-
handlePageChange,
|
|
3010
|
-
handlePageSizeChange
|
|
3011
|
-
};
|
|
3012
|
-
},
|
|
3013
|
-
components: {
|
|
3014
|
-
Spin: antDesignVue.Spin,
|
|
3015
|
-
S2Pagination
|
|
3016
|
-
}
|
|
3017
|
-
});
|
|
3018
|
-
const baseSheet_vue_vue_type_style_index_0_lang = "";
|
|
3019
|
-
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3020
|
-
const _component_S2Pagination = vue.resolveComponent("S2Pagination");
|
|
3021
|
-
const _component_Spin = vue.resolveComponent("Spin");
|
|
3022
|
-
return vue.openBlock(), vue.createBlock(_component_Spin, {
|
|
3023
|
-
wrapperClassName: _ctx.S2_PREFIX_CLS + "-spin",
|
|
3024
|
-
spinning: _ctx.loading
|
|
3025
|
-
}, {
|
|
3026
|
-
default: vue.withCtx(() => [
|
|
3027
|
-
vue.createElementVNode("div", {
|
|
3028
|
-
ref: "wrapperRef",
|
|
3029
|
-
class: vue.normalizeClass(_ctx.S2_PREFIX_CLS + "-wrapper")
|
|
3030
|
-
}, [
|
|
3031
|
-
vue.createElementVNode("div", {
|
|
3032
|
-
ref: "containerRef",
|
|
3033
|
-
class: vue.normalizeClass(_ctx.S2_PREFIX_CLS + "-container")
|
|
3034
|
-
}, null, 2),
|
|
3035
|
-
_ctx.pagination.visible.value ? (vue.openBlock(), vue.createBlock(_component_S2Pagination, {
|
|
3036
|
-
key: 0,
|
|
3037
|
-
current: _ctx.pagination.current.value,
|
|
3038
|
-
pageSize: _ctx.pagination.pageSize.value,
|
|
3039
|
-
total: _ctx.pagination.total.value,
|
|
3040
|
-
onChange: _ctx.handlePageChange,
|
|
3041
|
-
onShowSizeChange: _ctx.handlePageSizeChange
|
|
3042
|
-
}, null, 8, ["current", "pageSize", "total", "onChange", "onShowSizeChange"])) : vue.createCommentVNode("", true)
|
|
3043
|
-
], 2)
|
|
3044
|
-
]),
|
|
3045
|
-
_: 1
|
|
3046
|
-
}, 8, ["wrapperClassName", "spinning"]);
|
|
3047
|
-
}
|
|
3048
|
-
const BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
3049
|
-
const _hoisted_1$2 = {
|
|
3050
|
-
class: "antv-s2-icon",
|
|
3051
|
-
viewBox: "0 0 1024 1024",
|
|
3052
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3053
|
-
width: "12.6",
|
|
3054
|
-
height: "12.6"
|
|
3055
|
-
};
|
|
3056
|
-
const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
3057
|
-
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",
|
|
3058
|
-
fill: "currentColor"
|
|
3059
|
-
}, null, -1);
|
|
3060
|
-
const _hoisted_3$2 = [
|
|
3061
|
-
_hoisted_2$2
|
|
3062
|
-
];
|
|
3063
|
-
function render$2(_ctx, _cache) {
|
|
3064
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
|
|
3065
|
-
}
|
|
3066
|
-
const LocationIcon = { render: render$2 };
|
|
3067
|
-
const _hoisted_1$1 = {
|
|
3068
|
-
class: "antv-s2-icon",
|
|
3069
|
-
viewBox: "0 0 1024 1024",
|
|
3070
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3071
|
-
width: "12.6",
|
|
3072
|
-
height: "12.6"
|
|
3073
|
-
};
|
|
3074
|
-
const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
3075
|
-
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",
|
|
3076
|
-
fill: "currentColor"
|
|
3077
|
-
}, null, -1);
|
|
3078
|
-
const _hoisted_3$1 = [
|
|
3079
|
-
_hoisted_2$1
|
|
3080
|
-
];
|
|
3081
|
-
function render$1(_ctx, _cache) {
|
|
3082
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
|
|
3083
|
-
}
|
|
3084
|
-
const TextIcon = { render: render$1 };
|
|
3085
|
-
const _hoisted_1 = {
|
|
3086
|
-
class: "antv-s2-icon",
|
|
3087
|
-
viewBox: "0 0 1024 1024",
|
|
3088
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3089
|
-
width: "12.6",
|
|
3090
|
-
height: "12.6"
|
|
3091
|
-
};
|
|
3092
|
-
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
3093
|
-
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",
|
|
3094
|
-
fill: "currentColor"
|
|
3095
|
-
}, null, -1);
|
|
3096
|
-
const _hoisted_3 = [
|
|
3097
|
-
_hoisted_2
|
|
3098
|
-
];
|
|
3099
|
-
function render(_ctx, _cache) {
|
|
3100
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _hoisted_3);
|
|
3101
|
-
}
|
|
3102
|
-
const CalendarIcon = { render };
|
|
3103
|
-
const _sfc_main$3 = vue.defineComponent({
|
|
3104
|
-
name: "DrillDown",
|
|
3105
|
-
props: initDrillDownProps(),
|
|
3106
|
-
emits: initDrillDownEmits(),
|
|
3107
|
-
methods: {},
|
|
3108
|
-
components: {
|
|
3109
|
-
Button: antDesignVue.Button,
|
|
3110
|
-
Input: antDesignVue.Input,
|
|
3111
|
-
Empty: antDesignVue.Empty,
|
|
3112
|
-
Menu: antDesignVue.Menu,
|
|
3113
|
-
MenuItem: antDesignVue.MenuItem,
|
|
3114
|
-
LocationIcon,
|
|
3115
|
-
TextIcon,
|
|
3116
|
-
CalendarIcon
|
|
3117
|
-
},
|
|
3118
|
-
setup(props) {
|
|
3119
|
-
const {
|
|
3120
|
-
dataSet,
|
|
3121
|
-
disabledFields,
|
|
3122
|
-
getDrillFields,
|
|
3123
|
-
setDrillFields,
|
|
3124
|
-
className
|
|
3125
|
-
} = props;
|
|
3126
|
-
const getOptions = () => dataSet.map((val) => {
|
|
3127
|
-
val.disabled = !!(disabledFields && disabledFields.includes(val.value));
|
|
3128
|
-
return val;
|
|
3129
|
-
});
|
|
3130
|
-
const options = vue.ref(getOptions());
|
|
3131
|
-
const selected = vue.ref([]);
|
|
3132
|
-
const handleSearch = (e) => {
|
|
3133
|
-
const { value } = e.target;
|
|
3134
|
-
if (!value) {
|
|
3135
|
-
options.value = [...dataSet];
|
|
3136
|
-
} else {
|
|
3137
|
-
const reg = new RegExp(value, "gi");
|
|
3138
|
-
const result = dataSet.filter((item) => reg.test(item.name));
|
|
3139
|
-
options.value = [...result];
|
|
3140
|
-
}
|
|
3141
|
-
};
|
|
3142
|
-
const handleSelect = (value) => {
|
|
3143
|
-
const key = value == null ? void 0 : value.selectedKeys;
|
|
3144
|
-
selected.value = key;
|
|
3145
|
-
if (getDrillFields) {
|
|
3146
|
-
getDrillFields(key);
|
|
3147
|
-
}
|
|
3148
|
-
if (setDrillFields) {
|
|
3149
|
-
setDrillFields(key);
|
|
3150
|
-
}
|
|
3151
|
-
};
|
|
3152
|
-
const handleClear = (e) => {
|
|
3153
|
-
e.stopPropagation();
|
|
3154
|
-
selected.value = [];
|
|
3155
|
-
if (getDrillFields) {
|
|
3156
|
-
getDrillFields([]);
|
|
3157
|
-
}
|
|
3158
|
-
if (setDrillFields) {
|
|
3159
|
-
setDrillFields([]);
|
|
3160
|
-
}
|
|
3161
|
-
};
|
|
3162
|
-
return {
|
|
3163
|
-
options,
|
|
3164
|
-
handleSearch,
|
|
3165
|
-
handleSelect,
|
|
3166
|
-
handleClear,
|
|
3167
|
-
className,
|
|
3168
|
-
selected,
|
|
3169
|
-
isEmpty,
|
|
3170
|
-
DRILL_DOWN_PRE_CLASS
|
|
3171
|
-
};
|
|
3172
|
-
}
|
|
3173
|
-
});
|
|
3174
|
-
const index_vue_vue_type_style_index_0_scoped_8dd920ec_lang = "";
|
|
3175
|
-
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3176
|
-
const _component_Button = vue.resolveComponent("Button");
|
|
3177
|
-
const _component_Input = vue.resolveComponent("Input");
|
|
3178
|
-
const _component_Empty = vue.resolveComponent("Empty");
|
|
3179
|
-
const _component_text_icon = vue.resolveComponent("text-icon");
|
|
3180
|
-
const _component_calendar_icon = vue.resolveComponent("calendar-icon");
|
|
3181
|
-
const _component_location_icon = vue.resolveComponent("location-icon");
|
|
3182
|
-
const _component_MenuItem = vue.resolveComponent("MenuItem");
|
|
3183
|
-
const _component_Menu = vue.resolveComponent("Menu");
|
|
3184
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3185
|
-
class: vue.normalizeClass([_ctx.DRILL_DOWN_PRE_CLASS, _ctx.className])
|
|
3186
|
-
}, [
|
|
3187
|
-
vue.createElementVNode("header", {
|
|
3188
|
-
class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-header`)
|
|
3189
|
-
}, [
|
|
3190
|
-
vue.createElementVNode("div", null, vue.toDisplayString(_ctx.titleText), 1),
|
|
3191
|
-
vue.createVNode(_component_Button, {
|
|
3192
|
-
type: "link",
|
|
3193
|
-
onClick: _ctx.handleClear
|
|
3194
|
-
}, {
|
|
3195
|
-
default: vue.withCtx(() => [
|
|
3196
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.clearButtonText), 1)
|
|
3197
|
-
]),
|
|
3198
|
-
_: 1
|
|
3199
|
-
}, 8, ["onClick"])
|
|
3200
|
-
], 2),
|
|
3201
|
-
vue.createVNode(_component_Input, {
|
|
3202
|
-
class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-search`),
|
|
3203
|
-
placeholder: _ctx.searchText,
|
|
3204
|
-
onChange: _ctx.handleSearch,
|
|
3205
|
-
onPressEnter: _ctx.handleSearch,
|
|
3206
|
-
allowClear: true
|
|
3207
|
-
}, null, 8, ["class", "placeholder", "onChange", "onPressEnter"]),
|
|
3208
|
-
_ctx.isEmpty(_ctx.options) ? (vue.openBlock(), vue.createBlock(_component_Empty, {
|
|
3209
|
-
key: 0,
|
|
3210
|
-
imageStyle: { height: "64px" },
|
|
3211
|
-
class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-empty`)
|
|
3212
|
-
}, null, 8, ["class"])) : vue.createCommentVNode("", true),
|
|
3213
|
-
vue.createVNode(_component_Menu, {
|
|
3214
|
-
class: "`${DRILL_DOWN_PRE_CLASS}-menu`",
|
|
3215
|
-
selectedKeys: _ctx.selected,
|
|
3216
|
-
"onUpdate:selectedKeys": _cache[0] || (_cache[0] = ($event) => _ctx.selected = $event),
|
|
3217
|
-
onSelect: _ctx.handleSelect
|
|
3218
|
-
}, {
|
|
3219
|
-
default: vue.withCtx(() => [
|
|
3220
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (option) => {
|
|
3221
|
-
return vue.openBlock(), vue.createBlock(_component_MenuItem, {
|
|
3222
|
-
key: option.value,
|
|
3223
|
-
disabled: option.disabled,
|
|
3224
|
-
class: vue.normalizeClass(`${_ctx.DRILL_DOWN_PRE_CLASS}-menu-item`)
|
|
3225
|
-
}, {
|
|
3226
|
-
icon: vue.withCtx(() => [
|
|
3227
|
-
option.type === "text" ? (vue.openBlock(), vue.createBlock(_component_text_icon, { key: 0 })) : vue.createCommentVNode("", true),
|
|
3228
|
-
option.type === "date" ? (vue.openBlock(), vue.createBlock(_component_calendar_icon, { key: 1 })) : vue.createCommentVNode("", true),
|
|
3229
|
-
option.type === "location" ? (vue.openBlock(), vue.createBlock(_component_location_icon, { key: 2 })) : vue.createCommentVNode("", true)
|
|
3230
|
-
]),
|
|
3231
|
-
default: vue.withCtx(() => [
|
|
3232
|
-
vue.createTextVNode(" " + vue.toDisplayString(option == null ? void 0 : option.name), 1)
|
|
3233
|
-
]),
|
|
3234
|
-
_: 2
|
|
3235
|
-
}, 1032, ["disabled", "class"]);
|
|
3236
|
-
}), 128))
|
|
3237
|
-
]),
|
|
3238
|
-
_: 1
|
|
3239
|
-
}, 8, ["selectedKeys", "onSelect"])
|
|
3240
|
-
], 2);
|
|
3241
|
-
}
|
|
3242
|
-
const DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-8dd920ec"]]);
|
|
3243
|
-
const _sfc_main$2 = vue.defineComponent({
|
|
3244
|
-
name: "PivotSheet",
|
|
3245
|
-
props: initBaseSheetProps(),
|
|
3246
|
-
emits: [],
|
|
3247
|
-
setup(props, ctx) {
|
|
3248
|
-
const s2Ref = useExpose(ctx.expose);
|
|
3249
|
-
const { options: pivotOptions } = vue.toRefs(props);
|
|
3250
|
-
const { dataCfg, partDrillDown } = vue.toRefs(props);
|
|
3251
|
-
const drillFields = vue.ref([]);
|
|
3252
|
-
const setDrillFields = (fields) => {
|
|
3253
|
-
var _a, _b, _c, _d, _e;
|
|
3254
|
-
const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
|
|
3255
|
-
drillFields.value = fields;
|
|
3256
|
-
instance == null ? void 0 : instance.hideTooltip();
|
|
3257
|
-
if (isEmpty(fields)) {
|
|
3258
|
-
instance == null ? void 0 : instance.clearDrillDownData((_b = instance == null ? void 0 : instance.store.get("drillDownNode")) == null ? void 0 : _b.id);
|
|
3259
|
-
} else {
|
|
3260
|
-
handleDrillDown({
|
|
3261
|
-
rows: ((_c = dataCfg.value) == null ? void 0 : _c.fields.rows) ?? [],
|
|
3262
|
-
drillFields: fields,
|
|
3263
|
-
fetchData: (_d = partDrillDown.value) == null ? void 0 : _d["fetchData"],
|
|
3264
|
-
drillItemsNum: (_e = partDrillDown.value) == null ? void 0 : _e["drillItemsNum"],
|
|
3265
|
-
spreadsheet: instance
|
|
3266
|
-
});
|
|
3267
|
-
}
|
|
3268
|
-
};
|
|
3269
|
-
const onDrillDownIconClick = (params) => {
|
|
3270
|
-
var _a, _b;
|
|
3271
|
-
const { event, disabledFields } = params;
|
|
3272
|
-
if (event) {
|
|
3273
|
-
const instance = (_a = s2Ref == null ? void 0 : s2Ref.value) == null ? void 0 : _a.instance;
|
|
3274
|
-
const drillDownNode = vue.createVNode(DrillDown, {
|
|
3275
|
-
...(_b = partDrillDown.value) == null ? void 0 : _b["drillConfig"],
|
|
3276
|
-
setDrillFields,
|
|
3277
|
-
drillFields: drillFields.value,
|
|
3278
|
-
disabledFields
|
|
3279
|
-
});
|
|
3280
|
-
instance == null ? void 0 : instance.showTooltip({
|
|
3281
|
-
position: {
|
|
3282
|
-
x: event.clientX,
|
|
3283
|
-
y: event.clientY
|
|
3284
|
-
},
|
|
3285
|
-
event,
|
|
3286
|
-
content: drillDownNode
|
|
3287
|
-
});
|
|
3288
|
-
}
|
|
3289
|
-
};
|
|
3290
|
-
const options = vue.computed(
|
|
3291
|
-
() => buildDrillDownOptions(
|
|
3292
|
-
pivotOptions.value,
|
|
3293
|
-
partDrillDown.value,
|
|
3294
|
-
(params) => onDrillDownIconClick(params)
|
|
3295
|
-
)
|
|
3296
|
-
);
|
|
3297
|
-
return {
|
|
3298
|
-
s2Ref,
|
|
3299
|
-
options
|
|
3300
|
-
};
|
|
3301
|
-
},
|
|
3302
|
-
components: {
|
|
3303
|
-
BaseSheet
|
|
3304
|
-
}
|
|
3305
|
-
});
|
|
3306
|
-
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3307
|
-
const _component_BaseSheet = vue.resolveComponent("BaseSheet");
|
|
3308
|
-
return vue.openBlock(), vue.createBlock(_component_BaseSheet, vue.mergeProps(_ctx.$props, {
|
|
3309
|
-
ref: "s2Ref",
|
|
3310
|
-
options: _ctx.options
|
|
3311
|
-
}), null, 16, ["options"]);
|
|
3312
|
-
}
|
|
3313
|
-
const PivotSheet = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
3314
|
-
const _sfc_main$1 = vue.defineComponent({
|
|
3315
|
-
name: "TableSheet",
|
|
3316
|
-
props: [],
|
|
3317
|
-
emits: [],
|
|
3318
|
-
setup(props, ctx) {
|
|
3319
|
-
const s2Ref = useExpose(ctx.expose);
|
|
3320
|
-
return { s2Ref };
|
|
3321
|
-
},
|
|
3322
|
-
components: {
|
|
3323
|
-
BaseSheet
|
|
3324
|
-
}
|
|
3325
|
-
});
|
|
3326
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3327
|
-
const _component_BaseSheet = vue.resolveComponent("BaseSheet");
|
|
3328
|
-
return vue.openBlock(), vue.createBlock(_component_BaseSheet, { ref: "s2Ref" }, null, 512);
|
|
3329
|
-
}
|
|
3330
|
-
const TableSheet = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
3331
|
-
const _sfc_main = vue.defineComponent({
|
|
3332
|
-
name: "Sheet",
|
|
3333
|
-
props: [],
|
|
3334
|
-
emits: [],
|
|
3335
|
-
setup(props, ctx) {
|
|
3336
|
-
const s2Ref = useExpose(ctx.expose);
|
|
3337
|
-
const sheetType = vue.computed(() => {
|
|
3338
|
-
const type = ctx.attrs["sheetType"];
|
|
3339
|
-
switch (type) {
|
|
3340
|
-
case "table":
|
|
3341
|
-
return TableSheet;
|
|
3342
|
-
default:
|
|
3343
|
-
return PivotSheet;
|
|
3344
|
-
}
|
|
3345
|
-
});
|
|
3346
|
-
return { s2Ref, sheetType };
|
|
3347
|
-
},
|
|
3348
|
-
components: {
|
|
3349
|
-
PivotSheet,
|
|
3350
|
-
TableSheet
|
|
3351
|
-
}
|
|
3352
|
-
});
|
|
3353
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3354
|
-
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.sheetType), { ref: "s2Ref" }, null, 512);
|
|
3355
|
-
}
|
|
3356
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
3357
|
-
exports.BaseSheet = BaseSheet;
|
|
3358
|
-
exports.CustomTooltip = CustomTooltip;
|
|
3359
|
-
exports.PivotSheet = PivotSheet;
|
|
3360
|
-
exports.SheetComponent = index;
|
|
3361
|
-
exports.TableSheet = TableSheet;
|
|
3362
|
-
exports.useExpose = useExpose;
|
|
3363
|
-
//# sourceMappingURL=index.js.map
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.version = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
require("./utils/extendLocale");
|
|
6
|
+
tslib_1.__exportStar(require("./components"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./hooks/useExpose"), exports);
|
|
8
|
+
exports.version = '@antv/s2-vue-v2.0.0';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|