@univerjs/sheets-filter-ui 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +4 -4
- package/lib/es/index.js +1249 -1233
- package/lib/umd/index.js +4 -4
- package/package.json +22 -21
package/lib/es/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { CommandType as Te, IUniverInstanceService as sr, ICommandService as
|
|
5
|
-
import { Quantity as
|
|
6
|
-
import { SheetsFilterService as
|
|
7
|
-
import { IMessageService as
|
|
8
|
-
import { BehaviorSubject as
|
|
9
|
-
import { expandToContinuousRange as
|
|
10
|
-
import { Rect as
|
|
11
|
-
import { MessageType as
|
|
12
|
-
import { SelectionManagerService as
|
|
13
|
-
import * as
|
|
14
|
-
import
|
|
15
|
-
import { useDependency as
|
|
16
|
-
import
|
|
17
|
-
var
|
|
18
|
-
return
|
|
1
|
+
var pi = Object.defineProperty;
|
|
2
|
+
var vi = (e, t, r) => t in e ? pi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var N = (e, t, r) => (vi(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { CommandType as Te, IUniverInstanceService as sr, ICommandService as se, IUndoRedoService as ar, UniverInstanceType as Be, LocaleService as Re, sequenceExecute as gi, BooleanNumber as $r, Disposable as Ft, extractPureTextFromCell as _i, IContextService as Ct, ThemeService as ln, RxDisposable as un, fromCallback as Si, OnLifecycle as cn, LifecycleStages as fn, Tools as hn, Plugin as Ei, DependentOn as yi } from "@univerjs/core";
|
|
5
|
+
import { Quantity as dn, createIdentifier as bi, Inject as x, Injector as Pt } from "@wendellhu/redi";
|
|
6
|
+
import { SheetsFilterService as ae, RemoveSheetsFilterMutation as mt, SetSheetsFilterRangeMutation as lr, SetSheetsFilterCriteriaMutation as De, ReCalcSheetsFilterMutation as mn, CustomFilterOperator as p, FILTER_MUTATIONS as Ti, UniverSheetsFilterPlugin as Ri } from "@univerjs/sheets-filter";
|
|
7
|
+
import { IMessageService as pn, ILayoutService as Oi, useObservable as Ee, KeyCode as Fi, MetaKeys as Dr, MenuGroup as ur, MenuItemType as cr, MenuPosition as Ci, getMenuHiddenObservable as fr, ComponentManager as Pi, IShortcutService as Ni, IMenuService as Ii } from "@univerjs/ui";
|
|
8
|
+
import { BehaviorSubject as Pe, ReplaySubject as wi, of as rt, Subject as Mi, merge as Ai, combineLatest as vn, throttleTime as gn, startWith as _n, map as He, shareReplay as Li, switchMap as hr, filter as Hr, takeUntil as $i, distinctUntilChanged as Di } from "rxjs";
|
|
9
|
+
import { expandToContinuousRange as Hi, SetCellEditVisibleOperation as xi, whenSheetEditorFocused as Ui, getCurrentRangeDisable$ as Bi, SelectionShape as Wi, getCoordByCell as Vi, SheetSkeletonManagerService as ji, SheetsRenderService as ki, ISelectionRenderService as zi, SheetCanvasPopManagerService as Qi, SheetPermissionInterceptorBaseController as Gi } from "@univerjs/sheets-ui";
|
|
10
|
+
import { Rect as xr, Shape as Yi, IRenderManagerService as Sn } from "@univerjs/engine-render";
|
|
11
|
+
import { MessageType as En, Select as Ur, RadioGroup as qi, Radio as Br, Input as yn, Checkbox as Wr, Tooltip as Xi, Button as pt, Segmented as Ki } from "@univerjs/design";
|
|
12
|
+
import { SelectionManagerService as Zi, isSingleCellSelection as Ji, RefRangeService as eo, WorkbookEditablePermission as Xt, WorksheetFilterPermission as Kt, WorksheetEditPermission as Zt, RangeProtectionPermissionEditPoint as to, INTERCEPTOR_POINT as ro, SheetInterceptorService as no, RangeProtectionPermissionViewPoint as Vr } from "@univerjs/sheets";
|
|
13
|
+
import * as d from "react";
|
|
14
|
+
import R, { forwardRef as bn, useRef as M, createElement as Tn, useCallback as fe, useMemo as dr, version as io, isValidElement as oo, useEffect as so, useState as Yt } from "react";
|
|
15
|
+
import { useDependency as Xe } from "@wendellhu/redi/react-bindings";
|
|
16
|
+
import jr, { flushSync as kr } from "react-dom";
|
|
17
|
+
var ie = function() {
|
|
18
|
+
return ie = Object.assign || function(e) {
|
|
19
19
|
for (var t, r = 1, n = arguments.length; r < n; r++) {
|
|
20
20
|
t = arguments[r];
|
|
21
21
|
for (var o in t)
|
|
22
22
|
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
23
23
|
}
|
|
24
24
|
return e;
|
|
25
|
-
},
|
|
26
|
-
},
|
|
25
|
+
}, ie.apply(this, arguments);
|
|
26
|
+
}, ao = function(e, t) {
|
|
27
27
|
var r = {};
|
|
28
28
|
for (var n in e)
|
|
29
29
|
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
@@ -31,17 +31,17 @@ var re = function() {
|
|
|
31
31
|
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
32
32
|
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
33
33
|
return r;
|
|
34
|
-
},
|
|
35
|
-
var r = e.icon, n = e.id, o = e.className, a = e.extend, i =
|
|
36
|
-
return
|
|
34
|
+
}, Rn = bn(function(e, t) {
|
|
35
|
+
var r = e.icon, n = e.id, o = e.className, a = e.extend, i = ao(e, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(n, " ").concat(o || "").trim(), l = M("_".concat(co()));
|
|
36
|
+
return On(r, "".concat(n), { defIds: r.defIds, idSuffix: l.current }, ie({ ref: t, className: s }, i), a);
|
|
37
37
|
});
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
return
|
|
38
|
+
function On(e, t, r, n, o) {
|
|
39
|
+
return Tn(e.tag, ie(ie({ key: t }, lo(e, r, o)), n), (uo(e, r).children || []).map(function(a, i) {
|
|
40
|
+
return On(a, "".concat(t, "-").concat(e.tag, "-").concat(i), r, void 0, o);
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
var n =
|
|
43
|
+
function lo(e, t, r) {
|
|
44
|
+
var n = ie({}, e.attrs);
|
|
45
45
|
r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1);
|
|
46
46
|
var o = t.defIds;
|
|
47
47
|
return !o || o.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(a) {
|
|
@@ -49,66 +49,66 @@ function ro(e, t, r) {
|
|
|
49
49
|
typeof s == "string" && (n[i] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
50
50
|
})), n;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function uo(e, t) {
|
|
53
53
|
var r, n = t.defIds;
|
|
54
|
-
return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ?
|
|
55
|
-
return typeof o.attrs.id == "string" && n && n.indexOf(o.attrs.id) > -1 ?
|
|
54
|
+
return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? ie(ie({}, e), { children: e.children.map(function(o) {
|
|
55
|
+
return typeof o.attrs.id == "string" && n && n.indexOf(o.attrs.id) > -1 ? ie(ie({}, o), { attrs: ie(ie({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
|
|
56
56
|
}) }) : e;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function co() {
|
|
59
59
|
return Math.random().toString(36).substring(2, 8);
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
return
|
|
61
|
+
Rn.displayName = "UniverIcon";
|
|
62
|
+
var fo = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.32182 2.60967C2.98161 2.60967 2.79671 3.0074 3.01601 3.2675L6.85819 7.8246C6.94943 7.93282 6.99947 8.06981 6.99947 8.21136V12.7338C6.99947 12.898 7.0998 13.0455 7.2525 13.1058L8.73833 13.6928C9.00085 13.7965 9.28531 13.6031 9.28531 13.3208V8.21136C9.28531 8.06981 9.33535 7.93282 9.42659 7.8246L13.2688 3.2675C13.4881 3.0074 13.3032 2.60967 12.963 2.60967H3.32182ZM2.09858 4.04101C1.22139 3.0006 1.96097 1.40967 3.32182 1.40967H12.963C14.3238 1.40967 15.0634 3.0006 14.1862 4.04101L10.4853 8.43054V13.3208C10.4853 14.4498 9.34747 15.2237 8.29742 14.8089L6.81158 14.2219C6.20078 13.9806 5.79947 13.3905 5.79947 12.7338V8.43054L2.09858 4.04101Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Fn = bn(function(e, t) {
|
|
63
|
+
return Tn(Rn, Object.assign({}, e, {
|
|
64
64
|
id: "filter-single",
|
|
65
65
|
ref: t,
|
|
66
|
-
icon:
|
|
66
|
+
icon: fo
|
|
67
67
|
}));
|
|
68
68
|
});
|
|
69
|
-
|
|
70
|
-
const
|
|
69
|
+
Fn.displayName = "FilterSingle";
|
|
70
|
+
const We = {
|
|
71
71
|
id: "sheet.command.smart-toggle-filter",
|
|
72
72
|
type: Te.COMMAND,
|
|
73
73
|
handler: async (e) => {
|
|
74
|
-
const t = e.get(sr), r = e.get(
|
|
74
|
+
const t = e.get(sr), r = e.get(ae), n = e.get(se), o = e.get(ar), a = t.getCurrentUnitForType(Be.UNIVER_SHEET), i = a == null ? void 0 : a.getActiveSheet();
|
|
75
75
|
if (!i || !a)
|
|
76
76
|
return !1;
|
|
77
77
|
const s = a.getUnitId(), l = i.getSheetId(), u = r.getFilterModel(s, l);
|
|
78
78
|
if (u) {
|
|
79
|
-
const
|
|
80
|
-
return
|
|
79
|
+
const g = u == null ? void 0 : u.serialize(), y = ho(s, l, g), S = n.syncExecuteCommand(mt.id, { unitId: s, subUnitId: l });
|
|
80
|
+
return S && o.pushUndoRedo({
|
|
81
81
|
unitID: s,
|
|
82
|
-
undoMutations:
|
|
83
|
-
redoMutations: [{ id:
|
|
84
|
-
}),
|
|
82
|
+
undoMutations: y,
|
|
83
|
+
redoMutations: [{ id: mt.id, params: { unitId: s, subUnitId: l } }]
|
|
84
|
+
}), S;
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
if (!
|
|
86
|
+
const h = e.get(Zi).getLast();
|
|
87
|
+
if (!h)
|
|
88
88
|
return !1;
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
return
|
|
89
|
+
const m = h.range, f = Ji(h) ? Hi(m, { left: !0, right: !0, up: !0, down: !0 }, i) : m;
|
|
90
|
+
if (f.endRow === f.startRow) {
|
|
91
|
+
const g = e.get(pn, dn.OPTIONAL), y = e.get(Re);
|
|
92
|
+
return g == null || g.show({ type: En.Warning, content: y.t("sheets-filter.command.not-valid-filter-range") }), !1;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
return
|
|
94
|
+
const _ = { id: lr.id, params: { unitId: s, subUnitId: l, range: f } }, v = n.syncExecuteCommand(_.id, _.params);
|
|
95
|
+
return v && o.pushUndoRedo({
|
|
96
96
|
unitID: s,
|
|
97
|
-
undoMutations: [{ id:
|
|
98
|
-
redoMutations: [
|
|
99
|
-
}),
|
|
97
|
+
undoMutations: [{ id: mt.id, params: { unitId: s, subUnitId: l } }],
|
|
98
|
+
redoMutations: [_]
|
|
99
|
+
}), v;
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, $e = {
|
|
102
102
|
id: "sheet.command.set-filter-criteria",
|
|
103
103
|
type: Te.COMMAND,
|
|
104
104
|
handler: async (e, t) => {
|
|
105
|
-
const r = e.get(
|
|
105
|
+
const r = e.get(ae), n = e.get(se), o = e.get(ar), { unitId: a, subUnitId: i, col: s, criteria: l } = t, u = r.getFilterModel(a, i);
|
|
106
106
|
if (!u)
|
|
107
107
|
return !1;
|
|
108
108
|
const c = u.getRange();
|
|
109
109
|
if (!c || s < c.startColumn || s > c.endColumn)
|
|
110
110
|
return !1;
|
|
111
|
-
const
|
|
111
|
+
const h = u.getFilterColumn(s), m = po(a, i, s, h), f = {
|
|
112
112
|
id: De.id,
|
|
113
113
|
params: {
|
|
114
114
|
unitId: a,
|
|
@@ -116,39 +116,39 @@ const Ve = {
|
|
|
116
116
|
col: s,
|
|
117
117
|
criteria: l
|
|
118
118
|
}
|
|
119
|
-
},
|
|
120
|
-
return
|
|
119
|
+
}, _ = n.syncExecuteCommand(f.id, f.params);
|
|
120
|
+
return _ && o.pushUndoRedo({
|
|
121
121
|
unitID: a,
|
|
122
|
-
undoMutations: [
|
|
123
|
-
redoMutations: [
|
|
124
|
-
}),
|
|
122
|
+
undoMutations: [m],
|
|
123
|
+
redoMutations: [f]
|
|
124
|
+
}), _;
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, Cn = {
|
|
127
127
|
id: "sheet.command.clear-filter-criteria",
|
|
128
128
|
type: Te.COMMAND,
|
|
129
129
|
handler: (e) => {
|
|
130
|
-
const t = e.get(
|
|
130
|
+
const t = e.get(ae), r = e.get(ar), n = e.get(se), o = t.activeFilterModel;
|
|
131
131
|
if (!o)
|
|
132
132
|
return !1;
|
|
133
|
-
const { unitId: a, subUnitId: i } = o, s = o.serialize(), l =
|
|
134
|
-
return
|
|
133
|
+
const { unitId: a, subUnitId: i } = o, s = o.serialize(), l = Nn(a, i, s), u = mo(a, i, s);
|
|
134
|
+
return gi(u, n) && r.pushUndoRedo({
|
|
135
135
|
unitID: a,
|
|
136
136
|
undoMutations: l,
|
|
137
137
|
redoMutations: u
|
|
138
138
|
}), !0;
|
|
139
139
|
}
|
|
140
|
-
},
|
|
140
|
+
}, Pn = {
|
|
141
141
|
id: "sheet.command.re-calc-filter",
|
|
142
142
|
type: Te.COMMAND,
|
|
143
143
|
handler: (e) => {
|
|
144
|
-
const t = e.get(
|
|
144
|
+
const t = e.get(ae), r = e.get(se), n = t.activeFilterModel;
|
|
145
145
|
if (!n)
|
|
146
146
|
return !1;
|
|
147
147
|
const { unitId: o, subUnitId: a } = n;
|
|
148
|
-
return r.executeCommand(
|
|
148
|
+
return r.executeCommand(mn.id, { unitId: o, subUnitId: a });
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function ho(e, t, r) {
|
|
152
152
|
const n = [], o = {
|
|
153
153
|
id: lr.id,
|
|
154
154
|
params: {
|
|
@@ -157,9 +157,9 @@ function so(e, t, r) {
|
|
|
157
157
|
range: r.ref
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
-
return n.push(o),
|
|
160
|
+
return n.push(o), Nn(e, t, r).forEach((i) => n.push(i)), n;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Nn(e, t, r) {
|
|
163
163
|
var o;
|
|
164
164
|
const n = [];
|
|
165
165
|
return (o = r.filterColumns) == null || o.forEach((a) => {
|
|
@@ -175,7 +175,7 @@ function Fn(e, t, r) {
|
|
|
175
175
|
n.push(i);
|
|
176
176
|
}), n;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function mo(e, t, r) {
|
|
179
179
|
var o;
|
|
180
180
|
const n = [];
|
|
181
181
|
return (o = r.filterColumns) == null || o.forEach((a) => {
|
|
@@ -191,7 +191,7 @@ function ao(e, t, r) {
|
|
|
191
191
|
n.push(i);
|
|
192
192
|
}), n;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function po(e, t, r, n) {
|
|
195
195
|
if (!n)
|
|
196
196
|
return {
|
|
197
197
|
id: De.id,
|
|
@@ -213,62 +213,62 @@ function lo(e, t, r, n) {
|
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
var
|
|
216
|
+
var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SECOND", e))(j || {}), P = /* @__PURE__ */ ((e) => (e.NONE = "none", e.STARTS_WITH = "startsWith", e.DOES_NOT_START_WITH = "doesNotStartWith", e.ENDS_WITH = "endsWith", e.DOES_NOT_END_WITH = "doesNotEndWith", e.CONTAINS = "contains", e.DOES_NOT_CONTAIN = "doesNotContain", e.EQUALS = "equals", e.NOT_EQUALS = "notEquals", e.EMPTY = "empty", e.NOT_EMPTY = "notEmpty", e.BETWEEN = "between", e.NOT_BETWEEN = "notBetween", e.CUSTOM = "custom", e))(P || {}), T;
|
|
217
217
|
((e) => {
|
|
218
218
|
e.NONE = {
|
|
219
219
|
label: "sheets-filter.conditions.none",
|
|
220
|
-
operator:
|
|
221
|
-
order:
|
|
220
|
+
operator: P.NONE,
|
|
221
|
+
order: j.SECOND,
|
|
222
222
|
numOfParameters: 0,
|
|
223
223
|
getDefaultFormParams: () => {
|
|
224
224
|
throw new Error("[FilterConditionItems.NONE]: should not have initial form params!");
|
|
225
225
|
},
|
|
226
|
-
testMappingParams: (i) => i.operator1 ===
|
|
226
|
+
testMappingParams: (i) => i.operator1 === P.NONE,
|
|
227
227
|
mapToFilterColumn: () => null,
|
|
228
228
|
testMappingFilterColumn: (i) => !i.customFilters && !i.filters ? {} : !1
|
|
229
229
|
}, e.EMPTY = {
|
|
230
230
|
label: "sheets-filter.conditions.empty",
|
|
231
|
-
operator:
|
|
232
|
-
order:
|
|
231
|
+
operator: P.EMPTY,
|
|
232
|
+
order: j.SECOND,
|
|
233
233
|
numOfParameters: 0,
|
|
234
234
|
getDefaultFormParams: () => {
|
|
235
235
|
throw new Error("[FilterConditionItems.EMPTY]: should not have initial form params!");
|
|
236
236
|
},
|
|
237
|
-
testMappingParams: ({ operator1: i }) => i ===
|
|
237
|
+
testMappingParams: ({ operator1: i }) => i === P.EMPTY,
|
|
238
238
|
mapToFilterColumn: () => ({ customFilters: { customFilters: [{ val: "" }] } }),
|
|
239
239
|
testMappingFilterColumn: (i) => {
|
|
240
240
|
var u;
|
|
241
241
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 1)
|
|
242
242
|
return !1;
|
|
243
243
|
const s = i.customFilters.customFilters[0];
|
|
244
|
-
return s.val === "" && s.operator === void 0 ? { operator1:
|
|
244
|
+
return s.val === "" && s.operator === void 0 ? { operator1: P.EMPTY } : !1;
|
|
245
245
|
}
|
|
246
246
|
}, e.NOT_EMPTY = {
|
|
247
247
|
label: "sheets-filter.conditions.not-empty",
|
|
248
|
-
operator:
|
|
249
|
-
order:
|
|
248
|
+
operator: P.NOT_EMPTY,
|
|
249
|
+
order: j.SECOND,
|
|
250
250
|
numOfParameters: 0,
|
|
251
251
|
getDefaultFormParams: () => {
|
|
252
252
|
throw new Error("[FilterConditionItems.NOT_EMPTY]: should not have initial form params!");
|
|
253
253
|
},
|
|
254
|
-
testMappingParams: ({ operator1: i }) => i ===
|
|
254
|
+
testMappingParams: ({ operator1: i }) => i === P.NOT_EMPTY,
|
|
255
255
|
mapToFilterColumn: () => ({ customFilters: { customFilters: [{ val: " ", operator: p.NOT_EQUALS }] } }),
|
|
256
256
|
testMappingFilterColumn: (i) => {
|
|
257
257
|
var u;
|
|
258
258
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 1)
|
|
259
259
|
return !1;
|
|
260
260
|
const s = i.customFilters.customFilters[0];
|
|
261
|
-
return s.val === " " && s.operator === p.NOT_EQUALS ? { operator1:
|
|
261
|
+
return s.val === " " && s.operator === p.NOT_EQUALS ? { operator1: P.NOT_EMPTY } : !1;
|
|
262
262
|
}
|
|
263
263
|
}, e.TEXT_CONTAINS = {
|
|
264
264
|
label: "sheets-filter.conditions.text-contains",
|
|
265
|
-
operator:
|
|
266
|
-
order:
|
|
265
|
+
operator: P.CONTAINS,
|
|
266
|
+
order: j.FIRST,
|
|
267
267
|
numOfParameters: 1,
|
|
268
|
-
getDefaultFormParams: () => ({ operator1:
|
|
268
|
+
getDefaultFormParams: () => ({ operator1: P.CONTAINS, val1: "" }),
|
|
269
269
|
testMappingParams: (i) => {
|
|
270
270
|
const [s] = ce(i);
|
|
271
|
-
return s ===
|
|
271
|
+
return s === P.CONTAINS;
|
|
272
272
|
},
|
|
273
273
|
mapToFilterColumn: (i) => {
|
|
274
274
|
const { val1: s } = i;
|
|
@@ -281,77 +281,77 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
281
281
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 1)
|
|
282
282
|
return !1;
|
|
283
283
|
const s = i.customFilters.customFilters[0], l = s.val.toString();
|
|
284
|
-
return !s.operator && l.startsWith("*") && l.endsWith("*") ? { operator1:
|
|
284
|
+
return !s.operator && l.startsWith("*") && l.endsWith("*") ? { operator1: P.CONTAINS, val1: l.slice(1, -1) } : !1;
|
|
285
285
|
}
|
|
286
286
|
}, e.DOES_NOT_CONTAIN = {
|
|
287
287
|
label: "sheets-filter.conditions.does-not-contain",
|
|
288
|
-
operator:
|
|
289
|
-
order:
|
|
288
|
+
operator: P.DOES_NOT_CONTAIN,
|
|
289
|
+
order: j.FIRST,
|
|
290
290
|
numOfParameters: 1,
|
|
291
|
-
getDefaultFormParams: () => ({ operator1:
|
|
291
|
+
getDefaultFormParams: () => ({ operator1: P.DOES_NOT_CONTAIN, val1: "" }),
|
|
292
292
|
mapToFilterColumn: (i) => ({
|
|
293
293
|
customFilters: { customFilters: [{ val: `*${i.val1}*`, operator: p.NOT_EQUALS }] }
|
|
294
294
|
}),
|
|
295
295
|
testMappingParams: (i) => {
|
|
296
296
|
const [s] = ce(i);
|
|
297
|
-
return s ===
|
|
297
|
+
return s === P.DOES_NOT_CONTAIN;
|
|
298
298
|
},
|
|
299
299
|
testMappingFilterColumn: (i) => {
|
|
300
300
|
var u;
|
|
301
301
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 1)
|
|
302
302
|
return !1;
|
|
303
303
|
const s = i.customFilters.customFilters[0], l = s.val.toString();
|
|
304
|
-
return s.operator === p.NOT_EQUALS && l.startsWith("*") && l.endsWith("*") ? { operator1:
|
|
304
|
+
return s.operator === p.NOT_EQUALS && l.startsWith("*") && l.endsWith("*") ? { operator1: P.DOES_NOT_CONTAIN, val1: l.slice(1, -1) } : !1;
|
|
305
305
|
}
|
|
306
306
|
}, e.STARTS_WITH = {
|
|
307
307
|
label: "sheets-filter.conditions.starts-with",
|
|
308
|
-
operator:
|
|
309
|
-
order:
|
|
308
|
+
operator: P.STARTS_WITH,
|
|
309
|
+
order: j.FIRST,
|
|
310
310
|
numOfParameters: 1,
|
|
311
|
-
getDefaultFormParams: () => ({ operator1:
|
|
311
|
+
getDefaultFormParams: () => ({ operator1: P.STARTS_WITH, val1: "" }),
|
|
312
312
|
mapToFilterColumn: (i) => ({
|
|
313
313
|
customFilters: { customFilters: [{ val: `${i.val1}*` }] }
|
|
314
314
|
}),
|
|
315
315
|
testMappingParams: (i) => {
|
|
316
316
|
const [s] = ce(i);
|
|
317
|
-
return s ===
|
|
317
|
+
return s === P.STARTS_WITH;
|
|
318
318
|
},
|
|
319
319
|
testMappingFilterColumn: (i) => {
|
|
320
320
|
var u;
|
|
321
321
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 1)
|
|
322
322
|
return !1;
|
|
323
323
|
const s = i.customFilters.customFilters[0], l = s.val.toString();
|
|
324
|
-
return !s.operator && l.endsWith("*") && !l.startsWith("*") ? { operator1:
|
|
324
|
+
return !s.operator && l.endsWith("*") && !l.startsWith("*") ? { operator1: P.STARTS_WITH, val1: l.slice(0, -1) } : !1;
|
|
325
325
|
}
|
|
326
326
|
}, e.ENDS_WITH = {
|
|
327
327
|
label: "sheets-filter.conditions.ends-with",
|
|
328
|
-
operator:
|
|
329
|
-
order:
|
|
328
|
+
operator: P.ENDS_WITH,
|
|
329
|
+
order: j.FIRST,
|
|
330
330
|
numOfParameters: 1,
|
|
331
|
-
getDefaultFormParams: () => ({ operator1:
|
|
331
|
+
getDefaultFormParams: () => ({ operator1: P.ENDS_WITH, val1: "" }),
|
|
332
332
|
mapToFilterColumn: (i) => ({
|
|
333
333
|
customFilters: { customFilters: [{ val: `*${i.val1}` }] }
|
|
334
334
|
}),
|
|
335
335
|
testMappingParams: (i) => {
|
|
336
336
|
const [s] = ce(i);
|
|
337
|
-
return s ===
|
|
337
|
+
return s === P.ENDS_WITH;
|
|
338
338
|
},
|
|
339
339
|
testMappingFilterColumn: (i) => {
|
|
340
340
|
var u;
|
|
341
341
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 1)
|
|
342
342
|
return !1;
|
|
343
343
|
const s = i.customFilters.customFilters[0], l = s.val.toString();
|
|
344
|
-
return !s.operator && l.startsWith("*") && !l.endsWith("*") ? { operator1:
|
|
344
|
+
return !s.operator && l.startsWith("*") && !l.endsWith("*") ? { operator1: P.ENDS_WITH, val1: l.slice(1) } : !1;
|
|
345
345
|
}
|
|
346
346
|
}, e.EQUALS = {
|
|
347
347
|
label: "sheets-filter.conditions.equals",
|
|
348
|
-
operator:
|
|
349
|
-
order:
|
|
348
|
+
operator: P.EQUALS,
|
|
349
|
+
order: j.FIRST,
|
|
350
350
|
numOfParameters: 1,
|
|
351
|
-
getDefaultFormParams: () => ({ operator1:
|
|
351
|
+
getDefaultFormParams: () => ({ operator1: P.EQUALS, val1: "" }),
|
|
352
352
|
testMappingParams: (i) => {
|
|
353
353
|
const [s] = ce(i);
|
|
354
|
-
return s ===
|
|
354
|
+
return s === P.EQUALS;
|
|
355
355
|
},
|
|
356
356
|
mapToFilterColumn: (i) => {
|
|
357
357
|
const { val1: s } = i;
|
|
@@ -361,13 +361,13 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
361
361
|
},
|
|
362
362
|
testMappingFilterColumn: (i) => {
|
|
363
363
|
var s, l, u;
|
|
364
|
-
return ((l = (s = i.filters) == null ? void 0 : s.filters) == null ? void 0 : l.length) === 1 ? { operator1:
|
|
364
|
+
return ((l = (s = i.filters) == null ? void 0 : s.filters) == null ? void 0 : l.length) === 1 ? { operator1: P.EQUALS, val1: "" } : ((u = i.customFilters) == null ? void 0 : u.customFilters.length) === 1 && !i.customFilters.customFilters[0].operator ? { operator1: P.EQUALS, val1: i.customFilters.customFilters[0].val.toString() } : !1;
|
|
365
365
|
}
|
|
366
366
|
}, e.GREATER_THAN = {
|
|
367
367
|
label: "sheets-filter.conditions.greater-than",
|
|
368
368
|
operator: p.GREATER_THAN,
|
|
369
369
|
numOfParameters: 1,
|
|
370
|
-
order:
|
|
370
|
+
order: j.FIRST,
|
|
371
371
|
getDefaultFormParams: () => ({ operator1: p.GREATER_THAN, val1: "" }),
|
|
372
372
|
mapToFilterColumn: (i) => ({
|
|
373
373
|
customFilters: { customFilters: [{ val: i.val1, operator: p.GREATER_THAN }] }
|
|
@@ -387,7 +387,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
387
387
|
label: "sheets-filter.conditions.greater-than-or-equal",
|
|
388
388
|
operator: p.GREATER_THAN_OR_EQUAL,
|
|
389
389
|
numOfParameters: 1,
|
|
390
|
-
order:
|
|
390
|
+
order: j.FIRST,
|
|
391
391
|
getDefaultFormParams: () => ({ operator1: p.GREATER_THAN_OR_EQUAL, val1: "" }),
|
|
392
392
|
testMappingParams: (i) => {
|
|
393
393
|
const [s] = ce(i);
|
|
@@ -407,7 +407,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
407
407
|
label: "sheets-filter.conditions.less-than",
|
|
408
408
|
operator: p.LESS_THAN,
|
|
409
409
|
numOfParameters: 1,
|
|
410
|
-
order:
|
|
410
|
+
order: j.FIRST,
|
|
411
411
|
getDefaultFormParams: () => ({ operator1: p.LESS_THAN, val1: "" }),
|
|
412
412
|
testMappingParams: (i) => {
|
|
413
413
|
const [s] = ce(i);
|
|
@@ -427,7 +427,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
427
427
|
label: "sheets-filter.conditions.less-than-or-equal",
|
|
428
428
|
operator: p.LESS_THAN_OR_EQUAL,
|
|
429
429
|
numOfParameters: 1,
|
|
430
|
-
order:
|
|
430
|
+
order: j.FIRST,
|
|
431
431
|
getDefaultFormParams: () => ({ operator1: p.LESS_THAN_OR_EQUAL, val1: "" }),
|
|
432
432
|
testMappingParams: (i) => {
|
|
433
433
|
const [s] = ce(i);
|
|
@@ -447,7 +447,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
447
447
|
label: "sheets-filter.conditions.equal",
|
|
448
448
|
operator: p.EQUAL,
|
|
449
449
|
numOfParameters: 1,
|
|
450
|
-
order:
|
|
450
|
+
order: j.FIRST,
|
|
451
451
|
getDefaultFormParams: () => ({ operator1: p.EQUAL, val1: "" }),
|
|
452
452
|
testMappingParams: (i) => {
|
|
453
453
|
const [s] = ce(i);
|
|
@@ -467,7 +467,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
467
467
|
label: "sheets-filter.conditions.not-equal",
|
|
468
468
|
operator: p.NOT_EQUALS,
|
|
469
469
|
numOfParameters: 1,
|
|
470
|
-
order:
|
|
470
|
+
order: j.FIRST,
|
|
471
471
|
getDefaultFormParams: () => ({ operator1: p.NOT_EQUALS, val1: "" }),
|
|
472
472
|
testMappingParams: (i) => {
|
|
473
473
|
const [s] = ce(i);
|
|
@@ -485,8 +485,8 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
485
485
|
}
|
|
486
486
|
}, e.BETWEEN = {
|
|
487
487
|
label: "sheets-filter.conditions.between",
|
|
488
|
-
operator:
|
|
489
|
-
order:
|
|
488
|
+
operator: P.BETWEEN,
|
|
489
|
+
order: j.SECOND,
|
|
490
490
|
numOfParameters: 2,
|
|
491
491
|
getDefaultFormParams: () => ({
|
|
492
492
|
and: !0,
|
|
@@ -506,7 +506,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
506
506
|
const { val1: s, val2: l, operator1: u } = i, c = u === p.GREATER_THAN_OR_EQUAL;
|
|
507
507
|
return {
|
|
508
508
|
customFilters: {
|
|
509
|
-
and:
|
|
509
|
+
and: $r.TRUE,
|
|
510
510
|
customFilters: [
|
|
511
511
|
{ val: c ? s : l, operator: p.GREATER_THAN_OR_EQUAL },
|
|
512
512
|
{ val: c ? l : s, operator: p.LESS_THAN_OR_EQUAL }
|
|
@@ -535,8 +535,8 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
535
535
|
}
|
|
536
536
|
}, e.NOT_BETWEEN = {
|
|
537
537
|
label: "sheets-filter.conditions.not-between",
|
|
538
|
-
operator:
|
|
539
|
-
order:
|
|
538
|
+
operator: P.NOT_BETWEEN,
|
|
539
|
+
order: j.SECOND,
|
|
540
540
|
numOfParameters: 2,
|
|
541
541
|
getDefaultFormParams: () => ({
|
|
542
542
|
operator1: p.LESS_THAN,
|
|
@@ -581,37 +581,37 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
581
581
|
}
|
|
582
582
|
}, e.CUSTOM = {
|
|
583
583
|
label: "sheets-filter.conditions.custom",
|
|
584
|
-
operator:
|
|
585
|
-
order:
|
|
584
|
+
operator: P.CUSTOM,
|
|
585
|
+
order: j.SECOND,
|
|
586
586
|
numOfParameters: 2,
|
|
587
587
|
getDefaultFormParams: () => ({
|
|
588
|
-
operator1:
|
|
588
|
+
operator1: P.NONE,
|
|
589
589
|
val1: "",
|
|
590
|
-
operator2:
|
|
590
|
+
operator2: P.NONE,
|
|
591
591
|
val2: ""
|
|
592
592
|
}),
|
|
593
593
|
testMappingParams: () => !0,
|
|
594
594
|
mapToFilterColumn: (i) => {
|
|
595
|
-
const { and: s, val1: l, val2: u, operator1: c, operator2:
|
|
596
|
-
function
|
|
595
|
+
const { and: s, val1: l, val2: u, operator1: c, operator2: h } = i;
|
|
596
|
+
function m(S, C) {
|
|
597
597
|
for (const F of e.ALL_CONDITIONS)
|
|
598
|
-
if (F.operator ===
|
|
599
|
-
return F.mapToFilterColumn({ val1:
|
|
598
|
+
if (F.operator === S)
|
|
599
|
+
return F.mapToFilterColumn({ val1: C, operator1: S });
|
|
600
600
|
}
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
601
|
+
const f = !c || c === e.NONE.operator, _ = !h || h === e.NONE.operator;
|
|
602
|
+
if (f && _)
|
|
603
603
|
return e.NONE.mapToFilterColumn({});
|
|
604
|
-
if (
|
|
605
|
-
return
|
|
606
|
-
if (
|
|
607
|
-
return
|
|
608
|
-
const
|
|
604
|
+
if (f)
|
|
605
|
+
return m(h, u);
|
|
606
|
+
if (_)
|
|
607
|
+
return m(c, l);
|
|
608
|
+
const v = m(c, l), g = m(h, u), y = {
|
|
609
609
|
customFilters: [
|
|
610
|
-
|
|
611
|
-
|
|
610
|
+
v.customFilters.customFilters[0],
|
|
611
|
+
g.customFilters.customFilters[0]
|
|
612
612
|
]
|
|
613
613
|
};
|
|
614
|
-
return s && (
|
|
614
|
+
return s && (y.and = $r.TRUE), { customFilters: y };
|
|
615
615
|
},
|
|
616
616
|
testMappingFilterColumn: (i) => {
|
|
617
617
|
var u;
|
|
@@ -686,7 +686,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
686
686
|
return [e.NONE, {}];
|
|
687
687
|
}
|
|
688
688
|
e.testMappingFilterColumn = a;
|
|
689
|
-
})(
|
|
689
|
+
})(T || (T = {}));
|
|
690
690
|
function ce(e) {
|
|
691
691
|
const { operator1: t, operator2: r, val1: n, val2: o } = e;
|
|
692
692
|
if (t && r)
|
|
@@ -706,29 +706,29 @@ function Jt(e) {
|
|
|
706
706
|
unchecked: r.length
|
|
707
707
|
};
|
|
708
708
|
}
|
|
709
|
-
var
|
|
710
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
709
|
+
var vo = Object.defineProperty, go = Object.getOwnPropertyDescriptor, mr = (e, t, r, n) => {
|
|
710
|
+
for (var o = n > 1 ? void 0 : n ? go(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
711
711
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
712
|
-
return n && o &&
|
|
713
|
-
},
|
|
714
|
-
|
|
715
|
-
let be = class extends
|
|
712
|
+
return n && o && vo(t, r, o), o;
|
|
713
|
+
}, Le = (e, t) => (r, n) => t(r, n, e), _t = /* @__PURE__ */ ((e) => (e[e.VALUES = 0] = "VALUES", e[e.CONDITIONS = 1] = "CONDITIONS", e))(_t || {});
|
|
714
|
+
bi("sheets-filter-ui.sheets-filter-panel.service");
|
|
715
|
+
let be = class extends Ft {
|
|
716
716
|
constructor(t, r, n, o) {
|
|
717
717
|
super();
|
|
718
|
-
|
|
718
|
+
N(this, "_filterBy$", new Pe(
|
|
719
719
|
0
|
|
720
720
|
/* VALUES */
|
|
721
721
|
));
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
722
|
+
N(this, "filterBy$", this._filterBy$.asObservable());
|
|
723
|
+
N(this, "_filterByModel$", new wi(1));
|
|
724
|
+
N(this, "filterByModel$", this._filterByModel$.asObservable());
|
|
725
|
+
N(this, "_filterByModel", null);
|
|
726
|
+
N(this, "_hasCriteria$", new Pe(!1));
|
|
727
|
+
N(this, "hasCriteria$", this._hasCriteria$.asObservable());
|
|
728
|
+
N(this, "_filterModel", null);
|
|
729
|
+
N(this, "_col$", new Pe(-1));
|
|
730
|
+
N(this, "col$", this._col$.asObservable());
|
|
731
|
+
N(this, "_filterHeaderListener", null);
|
|
732
732
|
this._injector = t, this._sheetsFilterService = r, this._univerInstanceService = n, this._refRangeService = o;
|
|
733
733
|
}
|
|
734
734
|
get filterBy() {
|
|
@@ -790,7 +790,7 @@ let be = class extends Rt {
|
|
|
790
790
|
const n = t.getRange();
|
|
791
791
|
if (n.startRow === n.endRow)
|
|
792
792
|
return !1;
|
|
793
|
-
const o =
|
|
793
|
+
const o = Et.fromFilterColumn(
|
|
794
794
|
this._injector,
|
|
795
795
|
t,
|
|
796
796
|
r
|
|
@@ -805,7 +805,7 @@ let be = class extends Rt {
|
|
|
805
805
|
const n = t.getRange();
|
|
806
806
|
if (n.startRow === n.endRow)
|
|
807
807
|
return !1;
|
|
808
|
-
const o =
|
|
808
|
+
const o = St.fromFilterColumn(
|
|
809
809
|
this._injector,
|
|
810
810
|
t,
|
|
811
811
|
r,
|
|
@@ -822,20 +822,20 @@ let be = class extends Rt {
|
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
824
|
be = mr([
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
825
|
+
Le(0, x(Pt)),
|
|
826
|
+
Le(1, x(ae)),
|
|
827
|
+
Le(2, sr),
|
|
828
|
+
Le(3, x(eo))
|
|
829
829
|
], be);
|
|
830
|
-
let
|
|
830
|
+
let St = class extends Ft {
|
|
831
831
|
constructor(t, r, n, o, a) {
|
|
832
832
|
super();
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
this._filterModel = t, this.col = r, this._commandService = a, this._conditionItem$ = new
|
|
833
|
+
N(this, "canApply$", rt(!0));
|
|
834
|
+
N(this, "_conditionItem$");
|
|
835
|
+
N(this, "conditionItem$");
|
|
836
|
+
N(this, "_filterConditionFormParams$");
|
|
837
|
+
N(this, "filterConditionFormParams$");
|
|
838
|
+
this._filterModel = t, this.col = r, this._commandService = a, this._conditionItem$ = new Pe(n), this.conditionItem$ = this._conditionItem$.asObservable(), this._filterConditionFormParams$ = new Pe(o), this.filterConditionFormParams$ = this._filterConditionFormParams$.asObservable();
|
|
839
839
|
}
|
|
840
840
|
/**
|
|
841
841
|
* Create a model with targeting filter column. If there is not a filter column, the model would be created with
|
|
@@ -849,8 +849,8 @@ let gt = class extends Rt {
|
|
|
849
849
|
* @returns the model to control the panel's state
|
|
850
850
|
*/
|
|
851
851
|
static fromFilterColumn(t, r, n, o) {
|
|
852
|
-
const [a, i] =
|
|
853
|
-
return t.createInstance(
|
|
852
|
+
const [a, i] = T.testMappingFilterColumn(o == null ? void 0 : o.getColumnData());
|
|
853
|
+
return t.createInstance(St, r, n, a, i);
|
|
854
854
|
}
|
|
855
855
|
get conditionItem() {
|
|
856
856
|
return this._conditionItem$.getValue();
|
|
@@ -865,7 +865,7 @@ let gt = class extends Rt {
|
|
|
865
865
|
this.col += t;
|
|
866
866
|
}
|
|
867
867
|
clear() {
|
|
868
|
-
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(
|
|
868
|
+
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand($e.id, {
|
|
869
869
|
unitId: this._filterModel.unitId,
|
|
870
870
|
subUnitId: this._filterModel.subUnitId,
|
|
871
871
|
col: this.col,
|
|
@@ -878,8 +878,8 @@ let gt = class extends Rt {
|
|
|
878
878
|
async apply() {
|
|
879
879
|
if (this._disposed)
|
|
880
880
|
return !1;
|
|
881
|
-
const t =
|
|
882
|
-
return this._commandService.executeCommand(
|
|
881
|
+
const t = T.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
|
|
882
|
+
return this._commandService.executeCommand($e.id, {
|
|
883
883
|
unitId: this._filterModel.unitId,
|
|
884
884
|
subUnitId: this._filterModel.subUnitId,
|
|
885
885
|
col: this.col,
|
|
@@ -891,10 +891,10 @@ let gt = class extends Rt {
|
|
|
891
891
|
* `IFilterConditionFormParams` and load default condition form params.
|
|
892
892
|
*/
|
|
893
893
|
onPrimaryConditionChange(t) {
|
|
894
|
-
const r =
|
|
894
|
+
const r = T.ALL_CONDITIONS.find((n) => n.operator === t);
|
|
895
895
|
if (!r)
|
|
896
896
|
throw new Error(`[ByConditionsModel]: condition item not found for operator: ${t}!`);
|
|
897
|
-
this._conditionItem$.next(r), this._filterConditionFormParams$.next(
|
|
897
|
+
this._conditionItem$.next(r), this._filterConditionFormParams$.next(T.getInitialFormParams(t));
|
|
898
898
|
}
|
|
899
899
|
/**
|
|
900
900
|
* This method would be called when user changes the primary conditions, the input values or "AND" "OR" ratio.
|
|
@@ -907,46 +907,46 @@ let gt = class extends Rt {
|
|
|
907
907
|
onConditionFormChange(t) {
|
|
908
908
|
const r = { ...this.filterConditionFormParams, ...t };
|
|
909
909
|
if (r.and !== !0 && delete r.and, typeof t.and < "u" || typeof t.operator1 < "u" || typeof t.operator2 < "u") {
|
|
910
|
-
const n =
|
|
910
|
+
const n = T.testMappingParams(r, this.conditionItem.numOfParameters);
|
|
911
911
|
this._conditionItem$.next(n);
|
|
912
912
|
}
|
|
913
913
|
this._filterConditionFormParams$.next(r);
|
|
914
914
|
}
|
|
915
915
|
};
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
],
|
|
919
|
-
let
|
|
916
|
+
St = mr([
|
|
917
|
+
Le(4, se)
|
|
918
|
+
], St);
|
|
919
|
+
let Et = class extends Ft {
|
|
920
920
|
constructor(t, r, n, o) {
|
|
921
921
|
super();
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
this._filterModel = t, this.col = r, this._commandService = o, this._searchString$ = new
|
|
931
|
-
|
|
922
|
+
N(this, "_rawFilterItems$");
|
|
923
|
+
N(this, "rawFilterItems$");
|
|
924
|
+
N(this, "filterItems$");
|
|
925
|
+
N(this, "_filterItems", []);
|
|
926
|
+
N(this, "canApply$");
|
|
927
|
+
N(this, "_manuallyUpdateFilterItems$");
|
|
928
|
+
N(this, "_searchString$");
|
|
929
|
+
N(this, "searchString$");
|
|
930
|
+
this._filterModel = t, this.col = r, this._commandService = o, this._searchString$ = new Pe(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new Pe(n), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new Mi(), this.filterItems$ = Ai(
|
|
931
|
+
vn([
|
|
932
932
|
this._searchString$.pipe(
|
|
933
|
-
|
|
934
|
-
|
|
933
|
+
gn(500, void 0, { leading: !0, trailing: !0 }),
|
|
934
|
+
_n(void 0)
|
|
935
935
|
),
|
|
936
936
|
this._rawFilterItems$
|
|
937
937
|
]).pipe(
|
|
938
|
-
|
|
938
|
+
He(([a, i]) => {
|
|
939
939
|
if (!a)
|
|
940
940
|
return i;
|
|
941
941
|
const l = a.toLowerCase().split(/\s+/).filter((u) => !!u);
|
|
942
942
|
return i.filter((u) => {
|
|
943
943
|
const c = u.value.toLowerCase();
|
|
944
|
-
return l.some((
|
|
944
|
+
return l.some((h) => c.includes(h));
|
|
945
945
|
});
|
|
946
946
|
})
|
|
947
947
|
),
|
|
948
948
|
this._manuallyUpdateFilterItems$
|
|
949
|
-
).pipe(
|
|
949
|
+
).pipe(Li(1)), this.canApply$ = this.filterItems$.pipe(He((a) => Jt(a).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((a) => this._filterItems = a));
|
|
950
950
|
}
|
|
951
951
|
/**
|
|
952
952
|
* Create a model with targeting filter column. If there is not a filter column, the model would be created with
|
|
@@ -966,50 +966,50 @@ let _t = class extends Rt {
|
|
|
966
966
|
const u = l == null ? void 0 : l.getSheetBySheetId(s);
|
|
967
967
|
if (!u)
|
|
968
968
|
throw new Error(`[ByValuesModel]: Worksheet not found for filter model with unitId: ${i} and subUnitId: ${s}!`);
|
|
969
|
-
const c = r.getRange(),
|
|
970
|
-
let
|
|
971
|
-
for (const O of u.iterateByColumn(
|
|
972
|
-
const { row: L, rowSpan:
|
|
969
|
+
const c = r.getRange(), h = n, m = (A = r.getFilterColumn(n)) == null ? void 0 : A.getColumnData().filters, f = !!(m && m.blank), _ = { ...c, startRow: c.startRow + 1, startColumn: h, endColumn: h }, v = [], g = {}, y = new Set(m == null ? void 0 : m.filters), S = r.getFilteredOutRowsExceptCol(n);
|
|
970
|
+
let C = 0, F = 0;
|
|
971
|
+
for (const O of u.iterateByColumn(_, !1, !1)) {
|
|
972
|
+
const { row: L, rowSpan: D = 1 } = O;
|
|
973
973
|
let W = 0;
|
|
974
|
-
for (; W <
|
|
975
|
-
const
|
|
976
|
-
if (
|
|
974
|
+
for (; W < D; ) {
|
|
975
|
+
const K = L + W;
|
|
976
|
+
if (S.has(K)) {
|
|
977
977
|
W++;
|
|
978
978
|
continue;
|
|
979
979
|
}
|
|
980
|
-
const
|
|
981
|
-
if (!
|
|
982
|
-
F += 1, W +=
|
|
980
|
+
const k = O != null && O.value ? _i(O.value) : "";
|
|
981
|
+
if (!k) {
|
|
982
|
+
F += 1, W += D;
|
|
983
983
|
continue;
|
|
984
984
|
}
|
|
985
|
-
if (
|
|
986
|
-
|
|
985
|
+
if (g[k])
|
|
986
|
+
g[k].count++;
|
|
987
987
|
else {
|
|
988
|
-
const
|
|
989
|
-
value:
|
|
990
|
-
checked:
|
|
988
|
+
const ee = {
|
|
989
|
+
value: k,
|
|
990
|
+
checked: y.size ? y.has(k) : !f,
|
|
991
991
|
count: 1,
|
|
992
|
-
index:
|
|
992
|
+
index: C,
|
|
993
993
|
isEmpty: !1
|
|
994
994
|
};
|
|
995
|
-
|
|
995
|
+
g[k] = ee, v.push(ee);
|
|
996
996
|
}
|
|
997
997
|
W++;
|
|
998
998
|
}
|
|
999
|
-
|
|
999
|
+
C++;
|
|
1000
1000
|
}
|
|
1001
|
-
const
|
|
1001
|
+
const B = m ? f : !0;
|
|
1002
1002
|
if (F > 0) {
|
|
1003
1003
|
const O = {
|
|
1004
1004
|
value: a.t("sheets-filter.panel.empty"),
|
|
1005
|
-
checked:
|
|
1005
|
+
checked: B,
|
|
1006
1006
|
count: F,
|
|
1007
|
-
index:
|
|
1007
|
+
index: C,
|
|
1008
1008
|
isEmpty: !0
|
|
1009
1009
|
};
|
|
1010
|
-
|
|
1010
|
+
v.push(O);
|
|
1011
1011
|
}
|
|
1012
|
-
return t.createInstance(
|
|
1012
|
+
return t.createInstance(Et, r, n, v);
|
|
1013
1013
|
}
|
|
1014
1014
|
get rawFilterItems() {
|
|
1015
1015
|
return this._rawFilterItems$.getValue();
|
|
@@ -1047,7 +1047,7 @@ let _t = class extends Rt {
|
|
|
1047
1047
|
// expose method here to let the panel change filter items
|
|
1048
1048
|
// #region ByValuesModel apply methods
|
|
1049
1049
|
clear() {
|
|
1050
|
-
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(
|
|
1050
|
+
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand($e.id, {
|
|
1051
1051
|
unitId: this._filterModel.unitId,
|
|
1052
1052
|
subUnitId: this._filterModel.subUnitId,
|
|
1053
1053
|
col: this.col,
|
|
@@ -1064,7 +1064,7 @@ let _t = class extends Rt {
|
|
|
1064
1064
|
if (a)
|
|
1065
1065
|
throw new Error("[ByValuesModel]: no checked items!");
|
|
1066
1066
|
if (i)
|
|
1067
|
-
return this._commandService.executeCommand(
|
|
1067
|
+
return this._commandService.executeCommand($e.id, {
|
|
1068
1068
|
unitId: this._filterModel.unitId,
|
|
1069
1069
|
subUnitId: this._filterModel.subUnitId,
|
|
1070
1070
|
col: this.col,
|
|
@@ -1075,7 +1075,7 @@ let _t = class extends Rt {
|
|
|
1075
1075
|
const l = n.filter((c) => !c.isEmpty);
|
|
1076
1076
|
l.length > 0 && (s.filters = { filters: l.map((c) => c.value) }), l.length !== n.length && (s.filters.blank = !0);
|
|
1077
1077
|
}
|
|
1078
|
-
return this._commandService.executeCommand(
|
|
1078
|
+
return this._commandService.executeCommand($e.id, {
|
|
1079
1079
|
unitId: this._filterModel.unitId,
|
|
1080
1080
|
subUnitId: this._filterModel.subUnitId,
|
|
1081
1081
|
col: this.col,
|
|
@@ -1084,113 +1084,113 @@ let _t = class extends Rt {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
// #endregion
|
|
1086
1086
|
};
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
],
|
|
1090
|
-
const
|
|
1087
|
+
Et = mr([
|
|
1088
|
+
Le(3, se)
|
|
1089
|
+
], Et);
|
|
1090
|
+
const xe = "FILTER_PANEL_OPENED", pr = {
|
|
1091
1091
|
id: "sheet.operation.open-filter-panel",
|
|
1092
1092
|
type: Te.OPERATION,
|
|
1093
1093
|
handler: (e, t) => {
|
|
1094
|
-
const r = e.get(
|
|
1095
|
-
e.get(
|
|
1094
|
+
const r = e.get(Ct), n = e.get(ae), o = e.get(be);
|
|
1095
|
+
e.get(se).syncExecuteCommand(xi.id, { visible: !1 });
|
|
1096
1096
|
const { unitId: i, subUnitId: s, col: l } = t, u = n.getFilterModel(i, s);
|
|
1097
|
-
return !u || !o.setupCol(u, l) ? !1 : (r.getContextValue(
|
|
1097
|
+
return !u || !o.setupCol(u, l) ? !1 : (r.getContextValue(xe) || r.setContextValue(xe, !0), !0);
|
|
1098
1098
|
}
|
|
1099
|
-
},
|
|
1099
|
+
}, Ke = {
|
|
1100
1100
|
id: "sheet.operation.close-filter-panel",
|
|
1101
1101
|
type: Te.OPERATION,
|
|
1102
1102
|
handler: (e) => {
|
|
1103
|
-
const t = e.get(
|
|
1104
|
-
return t.getContextValue(
|
|
1103
|
+
const t = e.get(Ct), r = e.get(be), n = e.get(Oi, dn.OPTIONAL);
|
|
1104
|
+
return t.getContextValue(xe) ? (t.setContextValue(xe, !1), n == null || n.focus(), r.terminate()) : !1;
|
|
1105
1105
|
}
|
|
1106
|
-
},
|
|
1106
|
+
}, In = {
|
|
1107
1107
|
id: "sheet.operation.apply-filter",
|
|
1108
1108
|
type: Te.OPERATION,
|
|
1109
1109
|
handler: (e, t) => {
|
|
1110
1110
|
const { filterBy: r } = t;
|
|
1111
1111
|
return e.get(be).changeFilterBy(r);
|
|
1112
1112
|
}
|
|
1113
|
-
},
|
|
1114
|
-
sheetsFilterPanel:
|
|
1115
|
-
sheetsFilterPanelHeader:
|
|
1116
|
-
sheetsFilterPanelContent:
|
|
1117
|
-
sheetsFilterPanelSelectAll:
|
|
1118
|
-
sheetsFilterPanelSelectAllCount:
|
|
1119
|
-
sheetsFilterPanelValuesContainer:
|
|
1120
|
-
inputAffixWrapper:
|
|
1121
|
-
select:
|
|
1122
|
-
radioGroup:
|
|
1123
|
-
sheetsFilterPanelValuesFind:
|
|
1124
|
-
sheetsFilterPanelValuesList:
|
|
1125
|
-
sheetsFilterPanelValuesListInnerContainer:
|
|
1126
|
-
sheetsFilterPanelValuesVirtual:
|
|
1127
|
-
sheetsFilterPanelValuesItem:
|
|
1128
|
-
sheetsFilterPanelValuesItemInner:
|
|
1129
|
-
sheetsFilterPanelValuesItemCount:
|
|
1130
|
-
sheetsFilterPanelValuesItemExcludeButton:
|
|
1131
|
-
sheetsFilterPanelValuesItemText:
|
|
1132
|
-
sheetsFilterPanelConditionsContainer:
|
|
1133
|
-
sheetsFilterPanelConditionsContainerInner:
|
|
1134
|
-
sheetsFilterPanelConditionsDesc:
|
|
1135
|
-
sheetsFilterPanelFooter:
|
|
1136
|
-
sheetsFilterPanelFooterPrimaryButtons:
|
|
1137
|
-
button:
|
|
1138
|
-
input:
|
|
1139
|
-
formDualColumnLayout:
|
|
1113
|
+
}, _o = "univer-sheets-filter-panel", So = "univer-sheets-filter-panel-header", Eo = "univer-sheets-filter-panel-content", yo = "univer-sheets-filter-panel-select-all", bo = "univer-sheets-filter-panel-select-all-count", To = "univer-sheets-filter-panel-values-container", Ro = "univer-input-affix-wrapper", Oo = "univer-select", Fo = "univer-radio-group", Co = "univer-sheets-filter-panel-values-find", Po = "univer-sheets-filter-panel-values-list", No = "univer-sheets-filter-panel-values-list-inner-container", Io = "univer-sheets-filter-panel-values-virtual", wo = "univer-sheets-filter-panel-values-item", Mo = "univer-sheets-filter-panel-values-item-inner", Ao = "univer-sheets-filter-panel-values-item-count", Lo = "univer-sheets-filter-panel-values-item-exclude-button", $o = "univer-sheets-filter-panel-values-item-text", Do = "univer-sheets-filter-panel-conditions-container", Ho = "univer-sheets-filter-panel-conditions-container-inner", xo = "univer-sheets-filter-panel-conditions-desc", Uo = "univer-sheets-filter-panel-footer", Bo = "univer-sheets-filter-panel-footer-primary-buttons", Wo = "univer-button", Vo = "univer-input", jo = "univer-form-dual-column-layout", U = {
|
|
1114
|
+
sheetsFilterPanel: _o,
|
|
1115
|
+
sheetsFilterPanelHeader: So,
|
|
1116
|
+
sheetsFilterPanelContent: Eo,
|
|
1117
|
+
sheetsFilterPanelSelectAll: yo,
|
|
1118
|
+
sheetsFilterPanelSelectAllCount: bo,
|
|
1119
|
+
sheetsFilterPanelValuesContainer: To,
|
|
1120
|
+
inputAffixWrapper: Ro,
|
|
1121
|
+
select: Oo,
|
|
1122
|
+
radioGroup: Fo,
|
|
1123
|
+
sheetsFilterPanelValuesFind: Co,
|
|
1124
|
+
sheetsFilterPanelValuesList: Po,
|
|
1125
|
+
sheetsFilterPanelValuesListInnerContainer: No,
|
|
1126
|
+
sheetsFilterPanelValuesVirtual: Io,
|
|
1127
|
+
sheetsFilterPanelValuesItem: wo,
|
|
1128
|
+
sheetsFilterPanelValuesItemInner: Mo,
|
|
1129
|
+
sheetsFilterPanelValuesItemCount: Ao,
|
|
1130
|
+
sheetsFilterPanelValuesItemExcludeButton: Lo,
|
|
1131
|
+
sheetsFilterPanelValuesItemText: $o,
|
|
1132
|
+
sheetsFilterPanelConditionsContainer: Do,
|
|
1133
|
+
sheetsFilterPanelConditionsContainerInner: Ho,
|
|
1134
|
+
sheetsFilterPanelConditionsDesc: xo,
|
|
1135
|
+
sheetsFilterPanelFooter: Uo,
|
|
1136
|
+
sheetsFilterPanelFooterPrimaryButtons: Bo,
|
|
1137
|
+
button: Wo,
|
|
1138
|
+
input: Vo,
|
|
1139
|
+
formDualColumnLayout: jo
|
|
1140
1140
|
};
|
|
1141
|
-
function
|
|
1142
|
-
const { model: t } = e, r =
|
|
1141
|
+
function ko(e) {
|
|
1142
|
+
const { model: t } = e, r = Xe(Re), n = Ee(t.conditionItem$, void 0, !0), o = Ee(t.filterConditionFormParams$, void 0, !0), { operator: a, numOfParameters: i } = n, { operator1: s, operator2: l, val1: u, val2: c, and: h } = o, m = h ? "AND" : "OR", f = fe((F) => {
|
|
1143
1143
|
t.onConditionFormChange({ and: F === "AND" });
|
|
1144
|
-
}, [t]),
|
|
1144
|
+
}, [t]), _ = zo(r), v = fe((F) => {
|
|
1145
1145
|
t.onPrimaryConditionChange(F);
|
|
1146
|
-
}, [t]),
|
|
1146
|
+
}, [t]), g = Qo(r), y = fe((F) => {
|
|
1147
1147
|
t.onConditionFormChange(F);
|
|
1148
|
-
}, [t]),
|
|
1149
|
-
function
|
|
1150
|
-
const O =
|
|
1151
|
-
return /* @__PURE__ */
|
|
1148
|
+
}, [t]), S = r.t("sheets-filter.panel.input-values-placeholder");
|
|
1149
|
+
function C(F, B, A) {
|
|
1150
|
+
const O = T.getItemByOperator(F).numOfParameters === 1;
|
|
1151
|
+
return /* @__PURE__ */ R.createElement(R.Fragment, null, A === "operator2" && /* @__PURE__ */ R.createElement(qi, { value: m, onChange: f }, /* @__PURE__ */ R.createElement(Br, { value: "AND" }, r.t("sheets-filter.panel.and")), /* @__PURE__ */ R.createElement(Br, { value: "OR" }, r.t("sheets-filter.panel.or"))), /* @__PURE__ */ R.createElement(Ur, { value: F, options: g, onChange: (L) => y({ [A]: L }) }), O && /* @__PURE__ */ R.createElement(yn, { value: B, placeholder: S, onChange: (L) => y({ [A === "operator1" ? "val1" : "val2"]: L }) }));
|
|
1152
1152
|
}
|
|
1153
|
-
return /* @__PURE__ */
|
|
1153
|
+
return /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelConditionsContainer }, /* @__PURE__ */ R.createElement(Ur, { value: a, options: _, onChange: v }), T.getItemByOperator(a).numOfParameters !== 0 ? /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelConditionsContainerInner }, i >= 1 && C(s, u != null ? u : "", "operator1"), i >= 2 && C(l, c != null ? c : "", "operator2"), /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelConditionsDesc }, r.t("sheets-filter.panel.?"), /* @__PURE__ */ R.createElement("br", null), r.t("sheets-filter.panel.*"))) : null);
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function zo(e) {
|
|
1156
1156
|
const t = e.getCurrentLocale();
|
|
1157
1157
|
return dr(
|
|
1158
1158
|
() => [
|
|
1159
1159
|
{
|
|
1160
1160
|
options: [
|
|
1161
|
-
{ label: e.t(
|
|
1161
|
+
{ label: e.t(T.NONE.label), value: T.NONE.operator }
|
|
1162
1162
|
]
|
|
1163
1163
|
},
|
|
1164
1164
|
{
|
|
1165
1165
|
options: [
|
|
1166
|
-
{ label: e.t(
|
|
1167
|
-
{ label: e.t(
|
|
1166
|
+
{ label: e.t(T.EMPTY.label), value: T.EMPTY.operator },
|
|
1167
|
+
{ label: e.t(T.NOT_EMPTY.label), value: T.NOT_EMPTY.operator }
|
|
1168
1168
|
]
|
|
1169
1169
|
},
|
|
1170
1170
|
{
|
|
1171
1171
|
options: [
|
|
1172
|
-
{ label: e.t(
|
|
1173
|
-
{ label: e.t(
|
|
1174
|
-
{ label: e.t(
|
|
1175
|
-
{ label: e.t(
|
|
1176
|
-
{ label: e.t(
|
|
1172
|
+
{ label: e.t(T.TEXT_CONTAINS.label), value: T.TEXT_CONTAINS.operator },
|
|
1173
|
+
{ label: e.t(T.DOES_NOT_CONTAIN.label), value: T.DOES_NOT_CONTAIN.operator },
|
|
1174
|
+
{ label: e.t(T.STARTS_WITH.label), value: T.STARTS_WITH.operator },
|
|
1175
|
+
{ label: e.t(T.ENDS_WITH.label), value: T.ENDS_WITH.operator },
|
|
1176
|
+
{ label: e.t(T.EQUALS.label), value: T.EQUALS.operator }
|
|
1177
1177
|
]
|
|
1178
1178
|
},
|
|
1179
1179
|
{
|
|
1180
1180
|
options: [
|
|
1181
|
-
{ label: e.t(
|
|
1182
|
-
{ label: e.t(
|
|
1183
|
-
{ label: e.t(
|
|
1184
|
-
{ label: e.t(
|
|
1185
|
-
{ label: e.t(
|
|
1186
|
-
{ label: e.t(
|
|
1187
|
-
{ label: e.t(
|
|
1188
|
-
{ label: e.t(
|
|
1181
|
+
{ label: e.t(T.GREATER_THAN.label), value: T.GREATER_THAN.operator },
|
|
1182
|
+
{ label: e.t(T.GREATER_THAN_OR_EQUAL.label), value: T.GREATER_THAN_OR_EQUAL.operator },
|
|
1183
|
+
{ label: e.t(T.LESS_THAN.label), value: T.LESS_THAN.operator },
|
|
1184
|
+
{ label: e.t(T.LESS_THAN_OR_EQUAL.label), value: T.LESS_THAN_OR_EQUAL.operator },
|
|
1185
|
+
{ label: e.t(T.EQUAL.label), value: T.EQUAL.operator },
|
|
1186
|
+
{ label: e.t(T.NOT_EQUAL.label), value: T.NOT_EQUAL.operator },
|
|
1187
|
+
{ label: e.t(T.BETWEEN.label), value: T.BETWEEN.operator },
|
|
1188
|
+
{ label: e.t(T.NOT_BETWEEN.label), value: T.NOT_BETWEEN.operator }
|
|
1189
1189
|
]
|
|
1190
1190
|
},
|
|
1191
1191
|
{
|
|
1192
1192
|
options: [
|
|
1193
|
-
{ label: e.t(
|
|
1193
|
+
{ label: e.t(T.CUSTOM.label), value: T.CUSTOM.operator }
|
|
1194
1194
|
]
|
|
1195
1195
|
}
|
|
1196
1196
|
],
|
|
@@ -1198,57 +1198,57 @@ function Uo(e) {
|
|
|
1198
1198
|
[t, e]
|
|
1199
1199
|
);
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function Qo(e) {
|
|
1202
1202
|
const t = e.getCurrentLocale();
|
|
1203
1203
|
return dr(
|
|
1204
|
-
() =>
|
|
1204
|
+
() => T.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: e.t(r.label), value: r.operator })),
|
|
1205
1205
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1206
1206
|
[t, e]
|
|
1207
1207
|
);
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1210
|
-
return
|
|
1209
|
+
function tt() {
|
|
1210
|
+
return tt = Object.assign ? Object.assign.bind() : function(e) {
|
|
1211
1211
|
for (var t = 1; t < arguments.length; t++) {
|
|
1212
1212
|
var r = arguments[t];
|
|
1213
1213
|
for (var n in r)
|
|
1214
|
-
|
|
1214
|
+
({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
1215
1215
|
}
|
|
1216
1216
|
return e;
|
|
1217
|
-
},
|
|
1217
|
+
}, tt.apply(null, arguments);
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function oe(e) {
|
|
1220
1220
|
"@babel/helpers - typeof";
|
|
1221
|
-
return
|
|
1221
|
+
return oe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1222
1222
|
return typeof t;
|
|
1223
1223
|
} : function(t) {
|
|
1224
1224
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1225
|
-
},
|
|
1225
|
+
}, oe(e);
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
if (
|
|
1227
|
+
function Go(e, t) {
|
|
1228
|
+
if (oe(e) != "object" || !e)
|
|
1229
1229
|
return e;
|
|
1230
1230
|
var r = e[Symbol.toPrimitive];
|
|
1231
1231
|
if (r !== void 0) {
|
|
1232
1232
|
var n = r.call(e, t || "default");
|
|
1233
|
-
if (
|
|
1233
|
+
if (oe(n) != "object")
|
|
1234
1234
|
return n;
|
|
1235
1235
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1236
1236
|
}
|
|
1237
1237
|
return (t === "string" ? String : Number)(e);
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1240
|
-
var t =
|
|
1241
|
-
return
|
|
1239
|
+
function wn(e) {
|
|
1240
|
+
var t = Go(e, "string");
|
|
1241
|
+
return oe(t) == "symbol" ? t : t + "";
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1244
|
-
return t =
|
|
1243
|
+
function X(e, t, r) {
|
|
1244
|
+
return (t = wn(t)) in e ? Object.defineProperty(e, t, {
|
|
1245
1245
|
value: r,
|
|
1246
1246
|
enumerable: !0,
|
|
1247
1247
|
configurable: !0,
|
|
1248
1248
|
writable: !0
|
|
1249
1249
|
}) : e[t] = r, e;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function zr(e, t) {
|
|
1252
1252
|
var r = Object.keys(e);
|
|
1253
1253
|
if (Object.getOwnPropertySymbols) {
|
|
1254
1254
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -1258,22 +1258,22 @@ function jr(e, t) {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
return r;
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1261
|
+
function G(e) {
|
|
1262
1262
|
for (var t = 1; t < arguments.length; t++) {
|
|
1263
1263
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1264
|
-
t % 2 ?
|
|
1265
|
-
|
|
1266
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
1264
|
+
t % 2 ? zr(Object(r), !0).forEach(function(n) {
|
|
1265
|
+
X(e, n, r[n]);
|
|
1266
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : zr(Object(r)).forEach(function(n) {
|
|
1267
1267
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1268
1268
|
});
|
|
1269
1269
|
}
|
|
1270
1270
|
return e;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function Yo(e) {
|
|
1273
1273
|
if (Array.isArray(e))
|
|
1274
1274
|
return e;
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function qo(e, t) {
|
|
1277
1277
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1278
1278
|
if (r != null) {
|
|
1279
1279
|
var n, o, a, i, s = [], l = !0, u = !1;
|
|
@@ -1299,53 +1299,54 @@ function jo(e, t) {
|
|
|
1299
1299
|
return s;
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function Qr(e, t) {
|
|
1303
1303
|
(t == null || t > e.length) && (t = e.length);
|
|
1304
|
-
for (var r = 0, n =
|
|
1304
|
+
for (var r = 0, n = Array(t); r < t; r++)
|
|
1305
1305
|
n[r] = e[r];
|
|
1306
1306
|
return n;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Xo(e, t) {
|
|
1309
1309
|
if (e) {
|
|
1310
1310
|
if (typeof e == "string")
|
|
1311
|
-
return
|
|
1312
|
-
var r =
|
|
1313
|
-
|
|
1314
|
-
return Array.from(e);
|
|
1315
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
|
|
1316
|
-
return kr(e, t);
|
|
1311
|
+
return Qr(e, t);
|
|
1312
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1313
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Qr(e, t) : void 0;
|
|
1317
1314
|
}
|
|
1318
1315
|
}
|
|
1319
|
-
function
|
|
1316
|
+
function Ko() {
|
|
1320
1317
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1321
1318
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1322
1319
|
}
|
|
1323
|
-
function
|
|
1324
|
-
return
|
|
1320
|
+
function Q(e, t) {
|
|
1321
|
+
return Yo(e) || qo(e, t) || Xo(e, t) || Ko();
|
|
1325
1322
|
}
|
|
1326
|
-
function
|
|
1323
|
+
function Zo(e, t) {
|
|
1327
1324
|
if (e == null)
|
|
1328
1325
|
return {};
|
|
1329
|
-
var r = {}
|
|
1330
|
-
for (
|
|
1331
|
-
|
|
1326
|
+
var r = {};
|
|
1327
|
+
for (var n in e)
|
|
1328
|
+
if ({}.hasOwnProperty.call(e, n)) {
|
|
1329
|
+
if (t.indexOf(n) >= 0)
|
|
1330
|
+
continue;
|
|
1331
|
+
r[n] = e[n];
|
|
1332
|
+
}
|
|
1332
1333
|
return r;
|
|
1333
1334
|
}
|
|
1334
|
-
function
|
|
1335
|
+
function Jo(e, t) {
|
|
1335
1336
|
if (e == null)
|
|
1336
1337
|
return {};
|
|
1337
|
-
var r =
|
|
1338
|
+
var r, n, o = Zo(e, t);
|
|
1338
1339
|
if (Object.getOwnPropertySymbols) {
|
|
1339
1340
|
var a = Object.getOwnPropertySymbols(e);
|
|
1340
|
-
for (
|
|
1341
|
-
|
|
1341
|
+
for (n = 0; n < a.length; n++)
|
|
1342
|
+
r = a[n], t.indexOf(r) >= 0 || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
|
|
1342
1343
|
}
|
|
1343
|
-
return
|
|
1344
|
+
return o;
|
|
1344
1345
|
}
|
|
1345
|
-
function
|
|
1346
|
+
function es(e) {
|
|
1346
1347
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1347
1348
|
}
|
|
1348
|
-
var
|
|
1349
|
+
var Mn = { exports: {} };
|
|
1349
1350
|
/*!
|
|
1350
1351
|
Copyright (c) 2018 Jed Watson.
|
|
1351
1352
|
Licensed under the MIT License (MIT), see
|
|
@@ -1380,10 +1381,10 @@ var Nn = { exports: {} };
|
|
|
1380
1381
|
}
|
|
1381
1382
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1382
1383
|
})();
|
|
1383
|
-
})(
|
|
1384
|
-
var
|
|
1385
|
-
const
|
|
1386
|
-
var
|
|
1384
|
+
})(Mn);
|
|
1385
|
+
var ts = Mn.exports;
|
|
1386
|
+
const yt = /* @__PURE__ */ es(ts);
|
|
1387
|
+
var An = { exports: {} }, w = {};
|
|
1387
1388
|
/**
|
|
1388
1389
|
* @license React
|
|
1389
1390
|
* react-is.production.min.js
|
|
@@ -1393,28 +1394,28 @@ var wn = { exports: {} }, I = {};
|
|
|
1393
1394
|
* This source code is licensed under the MIT license found in the
|
|
1394
1395
|
* LICENSE file in the root directory of this source tree.
|
|
1395
1396
|
*/
|
|
1396
|
-
var vr = Symbol.for("react.element"), gr = Symbol.for("react.portal"),
|
|
1397
|
-
|
|
1398
|
-
function
|
|
1397
|
+
var vr = Symbol.for("react.element"), gr = Symbol.for("react.portal"), Nt = Symbol.for("react.fragment"), It = Symbol.for("react.strict_mode"), wt = Symbol.for("react.profiler"), Mt = Symbol.for("react.provider"), At = Symbol.for("react.context"), rs = Symbol.for("react.server_context"), Lt = Symbol.for("react.forward_ref"), $t = Symbol.for("react.suspense"), Dt = Symbol.for("react.suspense_list"), Ht = Symbol.for("react.memo"), xt = Symbol.for("react.lazy"), ns = Symbol.for("react.offscreen"), Ln;
|
|
1398
|
+
Ln = Symbol.for("react.module.reference");
|
|
1399
|
+
function le(e) {
|
|
1399
1400
|
if (typeof e == "object" && e !== null) {
|
|
1400
1401
|
var t = e.$$typeof;
|
|
1401
1402
|
switch (t) {
|
|
1402
1403
|
case vr:
|
|
1403
1404
|
switch (e = e.type, e) {
|
|
1404
|
-
case Ct:
|
|
1405
1405
|
case Nt:
|
|
1406
|
-
case
|
|
1407
|
-
case
|
|
1408
|
-
case
|
|
1406
|
+
case wt:
|
|
1407
|
+
case It:
|
|
1408
|
+
case $t:
|
|
1409
|
+
case Dt:
|
|
1409
1410
|
return e;
|
|
1410
1411
|
default:
|
|
1411
1412
|
switch (e = e && e.$$typeof, e) {
|
|
1412
|
-
case
|
|
1413
|
-
case
|
|
1414
|
-
case
|
|
1413
|
+
case rs:
|
|
1414
|
+
case At:
|
|
1415
|
+
case Lt:
|
|
1416
|
+
case xt:
|
|
1415
1417
|
case Ht:
|
|
1416
|
-
case
|
|
1417
|
-
case wt:
|
|
1418
|
+
case Mt:
|
|
1418
1419
|
return e;
|
|
1419
1420
|
default:
|
|
1420
1421
|
return t;
|
|
@@ -1425,119 +1426,124 @@ function se(e) {
|
|
|
1425
1426
|
}
|
|
1426
1427
|
}
|
|
1427
1428
|
}
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1429
|
+
w.ContextConsumer = At;
|
|
1430
|
+
w.ContextProvider = Mt;
|
|
1431
|
+
w.Element = vr;
|
|
1432
|
+
w.ForwardRef = Lt;
|
|
1433
|
+
w.Fragment = Nt;
|
|
1434
|
+
w.Lazy = xt;
|
|
1435
|
+
w.Memo = Ht;
|
|
1436
|
+
w.Portal = gr;
|
|
1437
|
+
w.Profiler = wt;
|
|
1438
|
+
w.StrictMode = It;
|
|
1439
|
+
w.Suspense = $t;
|
|
1440
|
+
w.SuspenseList = Dt;
|
|
1441
|
+
w.isAsyncMode = function() {
|
|
1441
1442
|
return !1;
|
|
1442
1443
|
};
|
|
1443
|
-
|
|
1444
|
+
w.isConcurrentMode = function() {
|
|
1444
1445
|
return !1;
|
|
1445
1446
|
};
|
|
1446
|
-
|
|
1447
|
-
return
|
|
1447
|
+
w.isContextConsumer = function(e) {
|
|
1448
|
+
return le(e) === At;
|
|
1448
1449
|
};
|
|
1449
|
-
|
|
1450
|
-
return
|
|
1450
|
+
w.isContextProvider = function(e) {
|
|
1451
|
+
return le(e) === Mt;
|
|
1451
1452
|
};
|
|
1452
|
-
|
|
1453
|
+
w.isElement = function(e) {
|
|
1453
1454
|
return typeof e == "object" && e !== null && e.$$typeof === vr;
|
|
1454
1455
|
};
|
|
1455
|
-
|
|
1456
|
-
return
|
|
1456
|
+
w.isForwardRef = function(e) {
|
|
1457
|
+
return le(e) === Lt;
|
|
1457
1458
|
};
|
|
1458
|
-
|
|
1459
|
-
return
|
|
1459
|
+
w.isFragment = function(e) {
|
|
1460
|
+
return le(e) === Nt;
|
|
1460
1461
|
};
|
|
1461
|
-
|
|
1462
|
-
return
|
|
1462
|
+
w.isLazy = function(e) {
|
|
1463
|
+
return le(e) === xt;
|
|
1463
1464
|
};
|
|
1464
|
-
|
|
1465
|
-
return
|
|
1465
|
+
w.isMemo = function(e) {
|
|
1466
|
+
return le(e) === Ht;
|
|
1466
1467
|
};
|
|
1467
|
-
|
|
1468
|
-
return
|
|
1468
|
+
w.isPortal = function(e) {
|
|
1469
|
+
return le(e) === gr;
|
|
1469
1470
|
};
|
|
1470
|
-
|
|
1471
|
-
return
|
|
1471
|
+
w.isProfiler = function(e) {
|
|
1472
|
+
return le(e) === wt;
|
|
1472
1473
|
};
|
|
1473
|
-
|
|
1474
|
-
return
|
|
1474
|
+
w.isStrictMode = function(e) {
|
|
1475
|
+
return le(e) === It;
|
|
1475
1476
|
};
|
|
1476
|
-
|
|
1477
|
-
return
|
|
1477
|
+
w.isSuspense = function(e) {
|
|
1478
|
+
return le(e) === $t;
|
|
1478
1479
|
};
|
|
1479
|
-
|
|
1480
|
-
return
|
|
1480
|
+
w.isSuspenseList = function(e) {
|
|
1481
|
+
return le(e) === Dt;
|
|
1481
1482
|
};
|
|
1482
|
-
|
|
1483
|
-
return typeof e == "string" || typeof e == "function" || e ===
|
|
1483
|
+
w.isValidElementType = function(e) {
|
|
1484
|
+
return typeof e == "string" || typeof e == "function" || e === Nt || e === wt || e === It || e === $t || e === Dt || e === ns || typeof e == "object" && e !== null && (e.$$typeof === xt || e.$$typeof === Ht || e.$$typeof === Mt || e.$$typeof === At || e.$$typeof === Lt || e.$$typeof === Ln || e.getModuleId !== void 0);
|
|
1484
1485
|
};
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
var
|
|
1486
|
+
w.typeOf = le;
|
|
1487
|
+
An.exports = w;
|
|
1488
|
+
var Ze = An.exports;
|
|
1488
1489
|
function er(e) {
|
|
1489
1490
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [];
|
|
1490
|
-
return
|
|
1491
|
-
n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat(er(n)) :
|
|
1491
|
+
return R.Children.forEach(e, function(n) {
|
|
1492
|
+
n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat(er(n)) : Ze.isFragment(n) && n.props ? r = r.concat(er(n.props.children, t)) : r.push(n));
|
|
1492
1493
|
}), r;
|
|
1493
1494
|
}
|
|
1494
|
-
function
|
|
1495
|
+
function Gr(e) {
|
|
1495
1496
|
return e instanceof HTMLElement || e instanceof SVGElement;
|
|
1496
1497
|
}
|
|
1497
|
-
function
|
|
1498
|
-
return e &&
|
|
1498
|
+
function is(e) {
|
|
1499
|
+
return e && oe(e) === "object" && Gr(e.nativeElement) ? e.nativeElement : Gr(e) ? e : null;
|
|
1499
1500
|
}
|
|
1500
|
-
function
|
|
1501
|
-
var t =
|
|
1501
|
+
function vt(e) {
|
|
1502
|
+
var t = is(e);
|
|
1502
1503
|
if (t)
|
|
1503
1504
|
return t;
|
|
1504
|
-
if (e instanceof
|
|
1505
|
+
if (e instanceof R.Component) {
|
|
1505
1506
|
var r;
|
|
1506
|
-
return (r =
|
|
1507
|
+
return (r = jr.findDOMNode) === null || r === void 0 ? void 0 : r.call(jr, e);
|
|
1507
1508
|
}
|
|
1508
1509
|
return null;
|
|
1509
1510
|
}
|
|
1510
|
-
function
|
|
1511
|
-
var n =
|
|
1511
|
+
function os(e, t, r) {
|
|
1512
|
+
var n = d.useRef({});
|
|
1512
1513
|
return (!("value" in n.current) || r(n.current.condition, t)) && (n.current.value = e(), n.current.condition = t), n.current.value;
|
|
1513
1514
|
}
|
|
1514
|
-
var
|
|
1515
|
-
typeof t == "function" ? t(r) :
|
|
1516
|
-
},
|
|
1515
|
+
var ss = function(t, r) {
|
|
1516
|
+
typeof t == "function" ? t(r) : oe(t) === "object" && t && "current" in t && (t.current = r);
|
|
1517
|
+
}, as = function() {
|
|
1517
1518
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1518
1519
|
r[n] = arguments[n];
|
|
1519
1520
|
var o = r.filter(Boolean);
|
|
1520
1521
|
return o.length <= 1 ? o[0] : function(a) {
|
|
1521
1522
|
r.forEach(function(i) {
|
|
1522
|
-
|
|
1523
|
+
ss(i, a);
|
|
1523
1524
|
});
|
|
1524
1525
|
};
|
|
1525
|
-
},
|
|
1526
|
+
}, ls = function() {
|
|
1526
1527
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1527
1528
|
r[n] = arguments[n];
|
|
1528
|
-
return
|
|
1529
|
-
return
|
|
1529
|
+
return os(function() {
|
|
1530
|
+
return as.apply(void 0, r);
|
|
1530
1531
|
}, r, function(o, a) {
|
|
1531
1532
|
return o.length !== a.length || o.every(function(i, s) {
|
|
1532
1533
|
return i !== a[s];
|
|
1533
1534
|
});
|
|
1534
1535
|
});
|
|
1535
|
-
},
|
|
1536
|
-
var r, n, o =
|
|
1537
|
-
return !(typeof o == "function" && !((r = o.prototype) !== null && r !== void 0 && r.render) && o.$$typeof !==
|
|
1538
|
-
}
|
|
1539
|
-
function
|
|
1540
|
-
|
|
1536
|
+
}, us = function(t) {
|
|
1537
|
+
var r, n, o = Ze.isMemo(t) ? t.type.type : t.type;
|
|
1538
|
+
return !(typeof o == "function" && !((r = o.prototype) !== null && r !== void 0 && r.render) && o.$$typeof !== Ze.ForwardRef || typeof t == "function" && !((n = t.prototype) !== null && n !== void 0 && n.render) && t.$$typeof !== Ze.ForwardRef);
|
|
1539
|
+
};
|
|
1540
|
+
function Yr(e) {
|
|
1541
|
+
return /* @__PURE__ */ oo(e) && !Ze.isFragment(e);
|
|
1542
|
+
}
|
|
1543
|
+
Number(io.split(".")[0]) >= 19;
|
|
1544
|
+
var tr = /* @__PURE__ */ d.createContext(null);
|
|
1545
|
+
function cs(e) {
|
|
1546
|
+
var t = e.children, r = e.onBatchResize, n = d.useRef(0), o = d.useRef([]), a = d.useContext(tr), i = d.useCallback(function(s, l, u) {
|
|
1541
1547
|
n.current += 1;
|
|
1542
1548
|
var c = n.current;
|
|
1543
1549
|
o.current.push({
|
|
@@ -1548,11 +1554,11 @@ function is(e) {
|
|
|
1548
1554
|
c === n.current && (r == null || r(o.current), o.current = []);
|
|
1549
1555
|
}), a == null || a(s, l, u);
|
|
1550
1556
|
}, [r, a]);
|
|
1551
|
-
return /* @__PURE__ */
|
|
1557
|
+
return /* @__PURE__ */ d.createElement(tr.Provider, {
|
|
1552
1558
|
value: i
|
|
1553
1559
|
}, t);
|
|
1554
1560
|
}
|
|
1555
|
-
var
|
|
1561
|
+
var $n = function() {
|
|
1556
1562
|
if (typeof Map < "u")
|
|
1557
1563
|
return Map;
|
|
1558
1564
|
function e(t, r) {
|
|
@@ -1598,27 +1604,27 @@ var Mn = function() {
|
|
|
1598
1604
|
}, t;
|
|
1599
1605
|
}()
|
|
1600
1606
|
);
|
|
1601
|
-
}(), rr = typeof window < "u" && typeof document < "u" && window.document === document,
|
|
1607
|
+
}(), rr = typeof window < "u" && typeof document < "u" && window.document === document, bt = function() {
|
|
1602
1608
|
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
1603
|
-
}(),
|
|
1604
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
1609
|
+
}(), fs = function() {
|
|
1610
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(bt) : function(e) {
|
|
1605
1611
|
return setTimeout(function() {
|
|
1606
1612
|
return e(Date.now());
|
|
1607
1613
|
}, 1e3 / 60);
|
|
1608
1614
|
};
|
|
1609
|
-
}(),
|
|
1610
|
-
function
|
|
1615
|
+
}(), hs = 2;
|
|
1616
|
+
function ds(e, t) {
|
|
1611
1617
|
var r = !1, n = !1, o = 0;
|
|
1612
1618
|
function a() {
|
|
1613
1619
|
r && (r = !1, e()), n && s();
|
|
1614
1620
|
}
|
|
1615
1621
|
function i() {
|
|
1616
|
-
|
|
1622
|
+
fs(a);
|
|
1617
1623
|
}
|
|
1618
1624
|
function s() {
|
|
1619
1625
|
var l = Date.now();
|
|
1620
1626
|
if (r) {
|
|
1621
|
-
if (l - o <
|
|
1627
|
+
if (l - o < hs)
|
|
1622
1628
|
return;
|
|
1623
1629
|
n = !0;
|
|
1624
1630
|
} else
|
|
@@ -1627,11 +1633,11 @@ function as(e, t) {
|
|
|
1627
1633
|
}
|
|
1628
1634
|
return s;
|
|
1629
1635
|
}
|
|
1630
|
-
var
|
|
1636
|
+
var ms = 20, ps = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], vs = typeof MutationObserver < "u", gs = (
|
|
1631
1637
|
/** @class */
|
|
1632
1638
|
function() {
|
|
1633
1639
|
function e() {
|
|
1634
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh =
|
|
1640
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = ds(this.refresh.bind(this), ms);
|
|
1635
1641
|
}
|
|
1636
1642
|
return e.prototype.addObserver = function(t) {
|
|
1637
1643
|
~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
|
|
@@ -1649,7 +1655,7 @@ var ls = 20, us = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1649
1655
|
return r.broadcastActive();
|
|
1650
1656
|
}), t.length > 0;
|
|
1651
1657
|
}, e.prototype.connect_ = function() {
|
|
1652
|
-
!rr || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh),
|
|
1658
|
+
!rr || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), vs ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
1653
1659
|
attributes: !0,
|
|
1654
1660
|
childList: !0,
|
|
1655
1661
|
characterData: !0,
|
|
@@ -1658,7 +1664,7 @@ var ls = 20, us = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1658
1664
|
}, e.prototype.disconnect_ = function() {
|
|
1659
1665
|
!rr || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
1660
1666
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
1661
|
-
var r = t.propertyName, n = r === void 0 ? "" : r, o =
|
|
1667
|
+
var r = t.propertyName, n = r === void 0 ? "" : r, o = ps.some(function(a) {
|
|
1662
1668
|
return !!~n.indexOf(a);
|
|
1663
1669
|
});
|
|
1664
1670
|
o && this.refresh();
|
|
@@ -1666,7 +1672,7 @@ var ls = 20, us = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1666
1672
|
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
1667
1673
|
}, e.instance_ = null, e;
|
|
1668
1674
|
}()
|
|
1669
|
-
),
|
|
1675
|
+
), Dn = function(e, t) {
|
|
1670
1676
|
for (var r = 0, n = Object.keys(t); r < n.length; r++) {
|
|
1671
1677
|
var o = n[r];
|
|
1672
1678
|
Object.defineProperty(e, o, {
|
|
@@ -1677,59 +1683,59 @@ var ls = 20, us = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1677
1683
|
});
|
|
1678
1684
|
}
|
|
1679
1685
|
return e;
|
|
1680
|
-
},
|
|
1686
|
+
}, Ue = function(e) {
|
|
1681
1687
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
1682
|
-
return t ||
|
|
1683
|
-
},
|
|
1684
|
-
function
|
|
1688
|
+
return t || bt;
|
|
1689
|
+
}, Hn = Ut(0, 0, 0, 0);
|
|
1690
|
+
function Tt(e) {
|
|
1685
1691
|
return parseFloat(e) || 0;
|
|
1686
1692
|
}
|
|
1687
|
-
function
|
|
1693
|
+
function qr(e) {
|
|
1688
1694
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
1689
1695
|
t[r - 1] = arguments[r];
|
|
1690
1696
|
return t.reduce(function(n, o) {
|
|
1691
1697
|
var a = e["border-" + o + "-width"];
|
|
1692
|
-
return n +
|
|
1698
|
+
return n + Tt(a);
|
|
1693
1699
|
}, 0);
|
|
1694
1700
|
}
|
|
1695
|
-
function
|
|
1701
|
+
function _s(e) {
|
|
1696
1702
|
for (var t = ["top", "right", "bottom", "left"], r = {}, n = 0, o = t; n < o.length; n++) {
|
|
1697
1703
|
var a = o[n], i = e["padding-" + a];
|
|
1698
|
-
r[a] =
|
|
1704
|
+
r[a] = Tt(i);
|
|
1699
1705
|
}
|
|
1700
1706
|
return r;
|
|
1701
1707
|
}
|
|
1702
|
-
function
|
|
1708
|
+
function Ss(e) {
|
|
1703
1709
|
var t = e.getBBox();
|
|
1704
|
-
return
|
|
1710
|
+
return Ut(0, 0, t.width, t.height);
|
|
1705
1711
|
}
|
|
1706
|
-
function
|
|
1712
|
+
function Es(e) {
|
|
1707
1713
|
var t = e.clientWidth, r = e.clientHeight;
|
|
1708
1714
|
if (!t && !r)
|
|
1709
|
-
return
|
|
1710
|
-
var n =
|
|
1711
|
-
if (n.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -=
|
|
1715
|
+
return Hn;
|
|
1716
|
+
var n = Ue(e).getComputedStyle(e), o = _s(n), a = o.left + o.right, i = o.top + o.bottom, s = Tt(n.width), l = Tt(n.height);
|
|
1717
|
+
if (n.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= qr(n, "left", "right") + a), Math.round(l + i) !== r && (l -= qr(n, "top", "bottom") + i)), !bs(e)) {
|
|
1712
1718
|
var u = Math.round(s + a) - t, c = Math.round(l + i) - r;
|
|
1713
1719
|
Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
|
|
1714
1720
|
}
|
|
1715
|
-
return
|
|
1721
|
+
return Ut(o.left, o.top, s, l);
|
|
1716
1722
|
}
|
|
1717
|
-
var
|
|
1723
|
+
var ys = /* @__PURE__ */ function() {
|
|
1718
1724
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
1719
|
-
return e instanceof
|
|
1725
|
+
return e instanceof Ue(e).SVGGraphicsElement;
|
|
1720
1726
|
} : function(e) {
|
|
1721
|
-
return e instanceof
|
|
1727
|
+
return e instanceof Ue(e).SVGElement && typeof e.getBBox == "function";
|
|
1722
1728
|
};
|
|
1723
1729
|
}();
|
|
1724
|
-
function
|
|
1725
|
-
return e ===
|
|
1730
|
+
function bs(e) {
|
|
1731
|
+
return e === Ue(e).document.documentElement;
|
|
1726
1732
|
}
|
|
1727
|
-
function
|
|
1728
|
-
return rr ?
|
|
1733
|
+
function Ts(e) {
|
|
1734
|
+
return rr ? ys(e) ? Ss(e) : Es(e) : Hn;
|
|
1729
1735
|
}
|
|
1730
|
-
function
|
|
1736
|
+
function Rs(e) {
|
|
1731
1737
|
var t = e.x, r = e.y, n = e.width, o = e.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, i = Object.create(a.prototype);
|
|
1732
|
-
return
|
|
1738
|
+
return Dn(i, {
|
|
1733
1739
|
x: t,
|
|
1734
1740
|
y: r,
|
|
1735
1741
|
width: n,
|
|
@@ -1740,37 +1746,37 @@ function _s(e) {
|
|
|
1740
1746
|
left: t
|
|
1741
1747
|
}), i;
|
|
1742
1748
|
}
|
|
1743
|
-
function
|
|
1749
|
+
function Ut(e, t, r, n) {
|
|
1744
1750
|
return { x: e, y: t, width: r, height: n };
|
|
1745
1751
|
}
|
|
1746
|
-
var
|
|
1752
|
+
var Os = (
|
|
1747
1753
|
/** @class */
|
|
1748
1754
|
function() {
|
|
1749
1755
|
function e(t) {
|
|
1750
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
1756
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Ut(0, 0, 0, 0), this.target = t;
|
|
1751
1757
|
}
|
|
1752
1758
|
return e.prototype.isActive = function() {
|
|
1753
|
-
var t =
|
|
1759
|
+
var t = Ts(this.target);
|
|
1754
1760
|
return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
|
|
1755
1761
|
}, e.prototype.broadcastRect = function() {
|
|
1756
1762
|
var t = this.contentRect_;
|
|
1757
1763
|
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
|
|
1758
1764
|
}, e;
|
|
1759
1765
|
}()
|
|
1760
|
-
),
|
|
1766
|
+
), Fs = (
|
|
1761
1767
|
/** @class */
|
|
1762
1768
|
/* @__PURE__ */ function() {
|
|
1763
1769
|
function e(t, r) {
|
|
1764
|
-
var n =
|
|
1765
|
-
|
|
1770
|
+
var n = Rs(r);
|
|
1771
|
+
Dn(this, { target: t, contentRect: n });
|
|
1766
1772
|
}
|
|
1767
1773
|
return e;
|
|
1768
1774
|
}()
|
|
1769
|
-
),
|
|
1775
|
+
), Cs = (
|
|
1770
1776
|
/** @class */
|
|
1771
1777
|
function() {
|
|
1772
1778
|
function e(t, r, n) {
|
|
1773
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
1779
|
+
if (this.activeObservations_ = [], this.observations_ = new $n(), typeof t != "function")
|
|
1774
1780
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
1775
1781
|
this.callback_ = t, this.controller_ = r, this.callbackCtx_ = n;
|
|
1776
1782
|
}
|
|
@@ -1778,16 +1784,16 @@ var Ss = (
|
|
|
1778
1784
|
if (!arguments.length)
|
|
1779
1785
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1780
1786
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1781
|
-
if (!(t instanceof
|
|
1787
|
+
if (!(t instanceof Ue(t).Element))
|
|
1782
1788
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1783
1789
|
var r = this.observations_;
|
|
1784
|
-
r.has(t) || (r.set(t, new
|
|
1790
|
+
r.has(t) || (r.set(t, new Os(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
1785
1791
|
}
|
|
1786
1792
|
}, e.prototype.unobserve = function(t) {
|
|
1787
1793
|
if (!arguments.length)
|
|
1788
1794
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1789
1795
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1790
|
-
if (!(t instanceof
|
|
1796
|
+
if (!(t instanceof Ue(t).Element))
|
|
1791
1797
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1792
1798
|
var r = this.observations_;
|
|
1793
1799
|
r.has(t) && (r.delete(t), r.size || this.controller_.removeObserver(this));
|
|
@@ -1802,7 +1808,7 @@ var Ss = (
|
|
|
1802
1808
|
}, e.prototype.broadcastActive = function() {
|
|
1803
1809
|
if (this.hasActive()) {
|
|
1804
1810
|
var t = this.callbackCtx_, r = this.activeObservations_.map(function(n) {
|
|
1805
|
-
return new
|
|
1811
|
+
return new Fs(n.target, n.broadcastRect());
|
|
1806
1812
|
});
|
|
1807
1813
|
this.callback_.call(t, r, t), this.clearActive();
|
|
1808
1814
|
}
|
|
@@ -1812,7 +1818,7 @@ var Ss = (
|
|
|
1812
1818
|
return this.activeObservations_.length > 0;
|
|
1813
1819
|
}, e;
|
|
1814
1820
|
}()
|
|
1815
|
-
),
|
|
1821
|
+
), xn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new $n(), Un = (
|
|
1816
1822
|
/** @class */
|
|
1817
1823
|
/* @__PURE__ */ function() {
|
|
1818
1824
|
function e(t) {
|
|
@@ -1820,8 +1826,8 @@ var Ss = (
|
|
|
1820
1826
|
throw new TypeError("Cannot call a class as a function.");
|
|
1821
1827
|
if (!arguments.length)
|
|
1822
1828
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1823
|
-
var r =
|
|
1824
|
-
|
|
1829
|
+
var r = gs.getInstance(), n = new Cs(t, r, this);
|
|
1830
|
+
xn.set(this, n);
|
|
1825
1831
|
}
|
|
1826
1832
|
return e;
|
|
1827
1833
|
}()
|
|
@@ -1831,15 +1837,15 @@ var Ss = (
|
|
|
1831
1837
|
"unobserve",
|
|
1832
1838
|
"disconnect"
|
|
1833
1839
|
].forEach(function(e) {
|
|
1834
|
-
|
|
1840
|
+
Un.prototype[e] = function() {
|
|
1835
1841
|
var t;
|
|
1836
|
-
return (t =
|
|
1842
|
+
return (t = xn.get(this))[e].apply(t, arguments);
|
|
1837
1843
|
};
|
|
1838
1844
|
});
|
|
1839
|
-
var
|
|
1840
|
-
return typeof
|
|
1845
|
+
var Ps = function() {
|
|
1846
|
+
return typeof bt.ResizeObserver < "u" ? bt.ResizeObserver : Un;
|
|
1841
1847
|
}(), ye = /* @__PURE__ */ new Map();
|
|
1842
|
-
function
|
|
1848
|
+
function Ns(e) {
|
|
1843
1849
|
e.forEach(function(t) {
|
|
1844
1850
|
var r, n = t.target;
|
|
1845
1851
|
(r = ye.get(n)) === null || r === void 0 || r.forEach(function(o) {
|
|
@@ -1847,34 +1853,34 @@ function Ts(e) {
|
|
|
1847
1853
|
});
|
|
1848
1854
|
});
|
|
1849
1855
|
}
|
|
1850
|
-
var
|
|
1851
|
-
function
|
|
1852
|
-
ye.has(e) || (ye.set(e, /* @__PURE__ */ new Set()),
|
|
1856
|
+
var Bn = new Ps(Ns);
|
|
1857
|
+
function Is(e, t) {
|
|
1858
|
+
ye.has(e) || (ye.set(e, /* @__PURE__ */ new Set()), Bn.observe(e)), ye.get(e).add(t);
|
|
1853
1859
|
}
|
|
1854
|
-
function
|
|
1855
|
-
ye.has(e) && (ye.get(e).delete(t), ye.get(e).size || (
|
|
1860
|
+
function ws(e, t) {
|
|
1861
|
+
ye.has(e) && (ye.get(e).delete(t), ye.get(e).size || (Bn.unobserve(e), ye.delete(e)));
|
|
1856
1862
|
}
|
|
1857
|
-
function
|
|
1863
|
+
function Wn(e, t) {
|
|
1858
1864
|
if (!(e instanceof t))
|
|
1859
1865
|
throw new TypeError("Cannot call a class as a function");
|
|
1860
1866
|
}
|
|
1861
|
-
function
|
|
1867
|
+
function Ms(e, t) {
|
|
1862
1868
|
for (var r = 0; r < t.length; r++) {
|
|
1863
1869
|
var n = t[r];
|
|
1864
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e,
|
|
1870
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, wn(n.key), n);
|
|
1865
1871
|
}
|
|
1866
1872
|
}
|
|
1867
|
-
function
|
|
1868
|
-
return t &&
|
|
1873
|
+
function Vn(e, t, r) {
|
|
1874
|
+
return t && Ms(e.prototype, t), Object.defineProperty(e, "prototype", {
|
|
1869
1875
|
writable: !1
|
|
1870
1876
|
}), e;
|
|
1871
1877
|
}
|
|
1872
1878
|
function nr(e, t) {
|
|
1873
|
-
return nr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
1874
|
-
return
|
|
1879
|
+
return nr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
|
|
1880
|
+
return r.__proto__ = n, r;
|
|
1875
1881
|
}, nr(e, t);
|
|
1876
1882
|
}
|
|
1877
|
-
function
|
|
1883
|
+
function As(e, t) {
|
|
1878
1884
|
if (typeof t != "function" && t !== null)
|
|
1879
1885
|
throw new TypeError("Super expression must either be null or a function");
|
|
1880
1886
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -1887,165 +1893,242 @@ function Fs(e, t) {
|
|
|
1887
1893
|
writable: !1
|
|
1888
1894
|
}), t && nr(e, t);
|
|
1889
1895
|
}
|
|
1890
|
-
function
|
|
1891
|
-
return
|
|
1892
|
-
return
|
|
1893
|
-
},
|
|
1896
|
+
function Rt(e) {
|
|
1897
|
+
return Rt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1898
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1899
|
+
}, Rt(e);
|
|
1894
1900
|
}
|
|
1895
|
-
function
|
|
1901
|
+
function jn() {
|
|
1896
1902
|
try {
|
|
1897
1903
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1898
1904
|
}));
|
|
1899
1905
|
} catch {
|
|
1900
1906
|
}
|
|
1901
|
-
return (
|
|
1907
|
+
return (jn = function() {
|
|
1902
1908
|
return !!e;
|
|
1903
1909
|
})();
|
|
1904
1910
|
}
|
|
1905
|
-
function
|
|
1911
|
+
function Ls(e) {
|
|
1906
1912
|
if (e === void 0)
|
|
1907
1913
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1908
1914
|
return e;
|
|
1909
1915
|
}
|
|
1910
|
-
function
|
|
1911
|
-
if (t && (
|
|
1916
|
+
function $s(e, t) {
|
|
1917
|
+
if (t && (oe(t) == "object" || typeof t == "function"))
|
|
1912
1918
|
return t;
|
|
1913
1919
|
if (t !== void 0)
|
|
1914
1920
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
1915
|
-
return
|
|
1921
|
+
return Ls(e);
|
|
1916
1922
|
}
|
|
1917
|
-
function
|
|
1918
|
-
var t =
|
|
1923
|
+
function Ds(e) {
|
|
1924
|
+
var t = jn();
|
|
1919
1925
|
return function() {
|
|
1920
|
-
var n =
|
|
1926
|
+
var r, n = Rt(e);
|
|
1921
1927
|
if (t) {
|
|
1922
|
-
var
|
|
1923
|
-
|
|
1928
|
+
var o = Rt(this).constructor;
|
|
1929
|
+
r = Reflect.construct(n, arguments, o);
|
|
1924
1930
|
} else
|
|
1925
|
-
|
|
1926
|
-
return
|
|
1931
|
+
r = n.apply(this, arguments);
|
|
1932
|
+
return $s(this, r);
|
|
1927
1933
|
};
|
|
1928
1934
|
}
|
|
1929
|
-
var
|
|
1930
|
-
|
|
1931
|
-
var t =
|
|
1935
|
+
var Hs = /* @__PURE__ */ function(e) {
|
|
1936
|
+
As(r, e);
|
|
1937
|
+
var t = Ds(r);
|
|
1932
1938
|
function r() {
|
|
1933
|
-
return
|
|
1939
|
+
return Wn(this, r), t.apply(this, arguments);
|
|
1934
1940
|
}
|
|
1935
|
-
return
|
|
1941
|
+
return Vn(r, [{
|
|
1936
1942
|
key: "render",
|
|
1937
1943
|
value: function() {
|
|
1938
1944
|
return this.props.children;
|
|
1939
1945
|
}
|
|
1940
1946
|
}]), r;
|
|
1941
|
-
}(
|
|
1942
|
-
function
|
|
1943
|
-
var r = e.children, n = e.disabled, o =
|
|
1947
|
+
}(d.Component);
|
|
1948
|
+
function xs(e, t) {
|
|
1949
|
+
var r = e.children, n = e.disabled, o = d.useRef(null), a = d.useRef(null), i = d.useContext(tr), s = typeof r == "function", l = s ? r(o) : r, u = d.useRef({
|
|
1944
1950
|
width: -1,
|
|
1945
1951
|
height: -1,
|
|
1946
1952
|
offsetWidth: -1,
|
|
1947
1953
|
offsetHeight: -1
|
|
1948
|
-
}), c = !s && /* @__PURE__ */
|
|
1949
|
-
var
|
|
1950
|
-
return
|
|
1951
|
-
(o.current &&
|
|
1954
|
+
}), c = !s && /* @__PURE__ */ d.isValidElement(l) && us(l), h = c ? l.ref : null, m = ls(h, o), f = function() {
|
|
1955
|
+
var y;
|
|
1956
|
+
return vt(o.current) || // Support `nativeElement` format
|
|
1957
|
+
(o.current && oe(o.current) === "object" ? vt((y = o.current) === null || y === void 0 ? void 0 : y.nativeElement) : null) || vt(a.current);
|
|
1952
1958
|
};
|
|
1953
|
-
|
|
1954
|
-
return
|
|
1959
|
+
d.useImperativeHandle(t, function() {
|
|
1960
|
+
return f();
|
|
1955
1961
|
});
|
|
1956
|
-
var
|
|
1957
|
-
|
|
1958
|
-
var
|
|
1959
|
-
var
|
|
1960
|
-
if (u.current.width !==
|
|
1961
|
-
var
|
|
1962
|
-
width:
|
|
1962
|
+
var _ = d.useRef(e);
|
|
1963
|
+
_.current = e;
|
|
1964
|
+
var v = d.useCallback(function(g) {
|
|
1965
|
+
var y = _.current, S = y.onResize, C = y.data, F = g.getBoundingClientRect(), B = F.width, A = F.height, O = g.offsetWidth, L = g.offsetHeight, D = Math.floor(B), W = Math.floor(A);
|
|
1966
|
+
if (u.current.width !== D || u.current.height !== W || u.current.offsetWidth !== O || u.current.offsetHeight !== L) {
|
|
1967
|
+
var K = {
|
|
1968
|
+
width: D,
|
|
1963
1969
|
height: W,
|
|
1964
1970
|
offsetWidth: O,
|
|
1965
1971
|
offsetHeight: L
|
|
1966
1972
|
};
|
|
1967
|
-
u.current =
|
|
1968
|
-
var
|
|
1969
|
-
offsetWidth:
|
|
1970
|
-
offsetHeight:
|
|
1973
|
+
u.current = K;
|
|
1974
|
+
var k = O === Math.round(B) ? B : O, ee = L === Math.round(A) ? A : L, z = G(G({}, K), {}, {
|
|
1975
|
+
offsetWidth: k,
|
|
1976
|
+
offsetHeight: ee
|
|
1971
1977
|
});
|
|
1972
|
-
i == null || i(
|
|
1973
|
-
|
|
1978
|
+
i == null || i(z, g, C), S && Promise.resolve().then(function() {
|
|
1979
|
+
S(z, g);
|
|
1974
1980
|
});
|
|
1975
1981
|
}
|
|
1976
1982
|
}, []);
|
|
1977
|
-
return
|
|
1978
|
-
var
|
|
1979
|
-
return
|
|
1980
|
-
return
|
|
1983
|
+
return d.useEffect(function() {
|
|
1984
|
+
var g = f();
|
|
1985
|
+
return g && !n && Is(g, v), function() {
|
|
1986
|
+
return ws(g, v);
|
|
1981
1987
|
};
|
|
1982
|
-
}, [o.current, n]), /* @__PURE__ */
|
|
1988
|
+
}, [o.current, n]), /* @__PURE__ */ d.createElement(Hs, {
|
|
1983
1989
|
ref: a
|
|
1984
|
-
}, c ? /* @__PURE__ */
|
|
1985
|
-
ref:
|
|
1990
|
+
}, c ? /* @__PURE__ */ d.cloneElement(l, {
|
|
1991
|
+
ref: m
|
|
1986
1992
|
}) : l);
|
|
1987
1993
|
}
|
|
1988
|
-
var
|
|
1989
|
-
function
|
|
1994
|
+
var Us = /* @__PURE__ */ d.forwardRef(xs), Bs = "rc-observer-key";
|
|
1995
|
+
function Ws(e, t) {
|
|
1990
1996
|
var r = e.children, n = typeof r == "function" ? [r] : er(r);
|
|
1991
1997
|
return n.map(function(o, a) {
|
|
1992
|
-
var i = (o == null ? void 0 : o.key) || "".concat(
|
|
1993
|
-
return /* @__PURE__ */
|
|
1998
|
+
var i = (o == null ? void 0 : o.key) || "".concat(Bs, "-").concat(a);
|
|
1999
|
+
return /* @__PURE__ */ d.createElement(Us, tt({}, e, {
|
|
1994
2000
|
key: i,
|
|
1995
2001
|
ref: a === 0 ? t : void 0
|
|
1996
2002
|
}), o);
|
|
1997
2003
|
});
|
|
1998
2004
|
}
|
|
1999
|
-
var _r = /* @__PURE__ */
|
|
2000
|
-
_r.Collection =
|
|
2001
|
-
|
|
2002
|
-
var
|
|
2005
|
+
var _r = /* @__PURE__ */ d.forwardRef(Ws);
|
|
2006
|
+
_r.Collection = cs;
|
|
2007
|
+
function Xr(e) {
|
|
2008
|
+
var t = d.useRef();
|
|
2009
|
+
t.current = e;
|
|
2010
|
+
var r = d.useCallback(function() {
|
|
2011
|
+
for (var n, o = arguments.length, a = new Array(o), i = 0; i < o; i++)
|
|
2012
|
+
a[i] = arguments[i];
|
|
2013
|
+
return (n = t.current) === null || n === void 0 ? void 0 : n.call.apply(n, [t].concat(a));
|
|
2014
|
+
}, []);
|
|
2015
|
+
return r;
|
|
2016
|
+
}
|
|
2017
|
+
function Vs() {
|
|
2018
|
+
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
2019
|
+
}
|
|
2020
|
+
var Kr = Vs() ? d.useLayoutEffect : d.useEffect, Je = function(t, r) {
|
|
2021
|
+
var n = d.useRef(!0);
|
|
2022
|
+
Kr(function() {
|
|
2023
|
+
return t(n.current);
|
|
2024
|
+
}, r), Kr(function() {
|
|
2025
|
+
return n.current = !1, function() {
|
|
2026
|
+
n.current = !0;
|
|
2027
|
+
};
|
|
2028
|
+
}, []);
|
|
2029
|
+
}, kn = /* @__PURE__ */ d.forwardRef(function(e, t) {
|
|
2030
|
+
var r = e.height, n = e.offsetY, o = e.offsetX, a = e.children, i = e.prefixCls, s = e.onInnerResize, l = e.innerProps, u = e.rtl, c = e.extra, h = {}, m = {
|
|
2003
2031
|
display: "flex",
|
|
2004
2032
|
flexDirection: "column"
|
|
2005
2033
|
};
|
|
2006
|
-
return n !== void 0 && (
|
|
2034
|
+
return n !== void 0 && (h = {
|
|
2007
2035
|
height: r,
|
|
2008
2036
|
position: "relative",
|
|
2009
2037
|
overflow: "hidden"
|
|
2010
|
-
},
|
|
2038
|
+
}, m = G(G({}, m), {}, X(X(X(X(X({
|
|
2011
2039
|
transform: "translateY(".concat(n, "px)")
|
|
2012
|
-
}, u ? "marginRight" : "marginLeft", -o), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */
|
|
2013
|
-
style:
|
|
2014
|
-
}, /* @__PURE__ */
|
|
2015
|
-
onResize: function(
|
|
2016
|
-
var
|
|
2017
|
-
|
|
2018
|
-
}
|
|
2019
|
-
}, /* @__PURE__ */
|
|
2020
|
-
style:
|
|
2021
|
-
className:
|
|
2040
|
+
}, u ? "marginRight" : "marginLeft", -o), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ d.createElement("div", {
|
|
2041
|
+
style: h
|
|
2042
|
+
}, /* @__PURE__ */ d.createElement(_r, {
|
|
2043
|
+
onResize: function(_) {
|
|
2044
|
+
var v = _.offsetHeight;
|
|
2045
|
+
v && s && s();
|
|
2046
|
+
}
|
|
2047
|
+
}, /* @__PURE__ */ d.createElement("div", tt({
|
|
2048
|
+
style: m,
|
|
2049
|
+
className: yt(X({}, "".concat(i, "-holder-inner"), i)),
|
|
2022
2050
|
ref: t
|
|
2023
2051
|
}, l), a, c)));
|
|
2024
2052
|
});
|
|
2025
|
-
|
|
2026
|
-
|
|
2053
|
+
kn.displayName = "Filler";
|
|
2054
|
+
function js(e) {
|
|
2055
|
+
var t = e.children, r = e.setRef, n = d.useCallback(function(o) {
|
|
2056
|
+
r(o);
|
|
2057
|
+
}, []);
|
|
2058
|
+
return /* @__PURE__ */ d.cloneElement(t, {
|
|
2059
|
+
ref: n
|
|
2060
|
+
});
|
|
2061
|
+
}
|
|
2062
|
+
function ks(e, t, r, n, o, a, i, s) {
|
|
2063
|
+
var l = s.getKey;
|
|
2064
|
+
return e.slice(t, r + 1).map(function(u, c) {
|
|
2065
|
+
var h = t + c, m = i(u, h, {
|
|
2066
|
+
style: {
|
|
2067
|
+
width: n
|
|
2068
|
+
},
|
|
2069
|
+
offsetX: o
|
|
2070
|
+
}), f = l(u);
|
|
2071
|
+
return /* @__PURE__ */ d.createElement(js, {
|
|
2072
|
+
key: f,
|
|
2073
|
+
setRef: function(v) {
|
|
2074
|
+
return a(u, v);
|
|
2075
|
+
}
|
|
2076
|
+
}, m);
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
function zs(e, t, r) {
|
|
2080
|
+
var n = e.length, o = t.length, a, i;
|
|
2081
|
+
if (n === 0 && o === 0)
|
|
2082
|
+
return null;
|
|
2083
|
+
n < o ? (a = e, i = t) : (a = t, i = e);
|
|
2084
|
+
var s = {
|
|
2085
|
+
__EMPTY_ITEM__: !0
|
|
2086
|
+
};
|
|
2087
|
+
function l(_) {
|
|
2088
|
+
return _ !== void 0 ? r(_) : s;
|
|
2089
|
+
}
|
|
2090
|
+
for (var u = null, c = Math.abs(n - o) !== 1, h = 0; h < i.length; h += 1) {
|
|
2091
|
+
var m = l(a[h]), f = l(i[h]);
|
|
2092
|
+
if (m !== f) {
|
|
2093
|
+
u = h, c = c || m !== l(i[h + 1]);
|
|
2094
|
+
break;
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
return u === null ? null : {
|
|
2098
|
+
index: u,
|
|
2099
|
+
multiple: c
|
|
2100
|
+
};
|
|
2101
|
+
}
|
|
2102
|
+
function Qs(e, t, r) {
|
|
2103
|
+
var n = d.useState(e), o = Q(n, 2), a = o[0], i = o[1], s = d.useState(null), l = Q(s, 2), u = l[0], c = l[1];
|
|
2104
|
+
return d.useEffect(function() {
|
|
2105
|
+
var h = zs(a || [], e || [], t);
|
|
2106
|
+
(h == null ? void 0 : h.index) !== void 0 && c(e[h.index]), i(e);
|
|
2107
|
+
}, [e]), [u];
|
|
2108
|
+
}
|
|
2109
|
+
var zn = function(t) {
|
|
2027
2110
|
return +setTimeout(t, 16);
|
|
2028
|
-
},
|
|
2111
|
+
}, Qn = function(t) {
|
|
2029
2112
|
return clearTimeout(t);
|
|
2030
2113
|
};
|
|
2031
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
2114
|
+
typeof window < "u" && "requestAnimationFrame" in window && (zn = function(t) {
|
|
2032
2115
|
return window.requestAnimationFrame(t);
|
|
2033
|
-
},
|
|
2116
|
+
}, Qn = function(t) {
|
|
2034
2117
|
return window.cancelAnimationFrame(t);
|
|
2035
2118
|
});
|
|
2036
|
-
var
|
|
2037
|
-
function
|
|
2119
|
+
var Zr = 0, Sr = /* @__PURE__ */ new Map();
|
|
2120
|
+
function Gn(e) {
|
|
2038
2121
|
Sr.delete(e);
|
|
2039
2122
|
}
|
|
2040
2123
|
var he = function(t) {
|
|
2041
2124
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
2042
|
-
|
|
2043
|
-
var n =
|
|
2125
|
+
Zr += 1;
|
|
2126
|
+
var n = Zr;
|
|
2044
2127
|
function o(a) {
|
|
2045
2128
|
if (a === 0)
|
|
2046
|
-
|
|
2129
|
+
Gn(n), t();
|
|
2047
2130
|
else {
|
|
2048
|
-
var i =
|
|
2131
|
+
var i = zn(function() {
|
|
2049
2132
|
o(a - 1);
|
|
2050
2133
|
});
|
|
2051
2134
|
Sr.set(n, i);
|
|
@@ -2055,128 +2138,85 @@ var he = function(t) {
|
|
|
2055
2138
|
};
|
|
2056
2139
|
he.cancel = function(e) {
|
|
2057
2140
|
var t = Sr.get(e);
|
|
2058
|
-
return
|
|
2141
|
+
return Gn(e), Qn(t);
|
|
2059
2142
|
};
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
return j * je;
|
|
2074
|
-
}, [o, Y, je]), Fe = function(B) {
|
|
2075
|
-
B.stopPropagation(), B.preventDefault();
|
|
2076
|
-
}, Ie = m.useRef({
|
|
2077
|
-
top: $,
|
|
2078
|
-
dragging: v,
|
|
2079
|
-
pageY: F,
|
|
2080
|
-
startTop: L
|
|
2143
|
+
var Jr = (typeof navigator > "u" ? "undefined" : oe(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
|
|
2144
|
+
const Yn = function(e, t, r, n) {
|
|
2145
|
+
var o = M(!1), a = M(null);
|
|
2146
|
+
function i() {
|
|
2147
|
+
clearTimeout(a.current), o.current = !0, a.current = setTimeout(function() {
|
|
2148
|
+
o.current = !1;
|
|
2149
|
+
}, 50);
|
|
2150
|
+
}
|
|
2151
|
+
var s = M({
|
|
2152
|
+
top: e,
|
|
2153
|
+
bottom: t,
|
|
2154
|
+
left: r,
|
|
2155
|
+
right: n
|
|
2081
2156
|
});
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2157
|
+
return s.current.top = e, s.current.bottom = t, s.current.left = r, s.current.right = n, function(l, u) {
|
|
2158
|
+
var c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, h = l ? (
|
|
2159
|
+
// Pass origin wheel when on the left
|
|
2160
|
+
u < 0 && s.current.left || // Pass origin wheel when on the right
|
|
2161
|
+
u > 0 && s.current.right
|
|
2162
|
+
) : u < 0 && s.current.top || // Pass origin wheel when on the bottom
|
|
2163
|
+
u > 0 && s.current.bottom;
|
|
2164
|
+
return c && h ? (clearTimeout(a.current), o.current = !1) : (!h || o.current) && i(), !o.current && h;
|
|
2087
2165
|
};
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
m
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
Pe = Math.max(Pe, 0), Pe = Math.min(Pe, st), j = he(function() {
|
|
2111
|
-
l(Pe, u);
|
|
2112
|
-
});
|
|
2113
|
-
}
|
|
2114
|
-
}, de = function() {
|
|
2115
|
-
S(!1), s();
|
|
2116
|
-
};
|
|
2117
|
-
return window.addEventListener("mousemove", B), window.addEventListener("touchmove", B), window.addEventListener("mouseup", de), window.addEventListener("touchend", de), function() {
|
|
2118
|
-
window.removeEventListener("mousemove", B), window.removeEventListener("touchmove", B), window.removeEventListener("mouseup", de), window.removeEventListener("touchend", de), he.cancel(j);
|
|
2119
|
-
};
|
|
2166
|
+
};
|
|
2167
|
+
function Gs(e, t, r, n, o, a, i) {
|
|
2168
|
+
var s = M(0), l = M(null), u = M(null), c = M(!1), h = Yn(t, r, n, o);
|
|
2169
|
+
function m(S, C) {
|
|
2170
|
+
he.cancel(l.current), s.current += C, u.current = C, !h(!1, C) && (Jr || S.preventDefault(), l.current = he(function() {
|
|
2171
|
+
var F = c.current ? 10 : 1;
|
|
2172
|
+
i(s.current * F), s.current = 0;
|
|
2173
|
+
}));
|
|
2174
|
+
}
|
|
2175
|
+
function f(S, C) {
|
|
2176
|
+
i(C, !0), Jr || S.preventDefault();
|
|
2177
|
+
}
|
|
2178
|
+
var _ = M(null), v = M(null);
|
|
2179
|
+
function g(S) {
|
|
2180
|
+
if (e) {
|
|
2181
|
+
he.cancel(v.current), v.current = he(function() {
|
|
2182
|
+
_.current = null;
|
|
2183
|
+
}, 2);
|
|
2184
|
+
var C = S.deltaX, F = S.deltaY, B = S.shiftKey, A = C, O = F;
|
|
2185
|
+
(_.current === "sx" || !_.current && B && F && !C) && (A = F, O = 0, _.current = "sx");
|
|
2186
|
+
var L = Math.abs(A), D = Math.abs(O);
|
|
2187
|
+
_.current === null && (_.current = a && L > D ? "x" : "y"), _.current === "y" ? m(S, O) : f(S, A);
|
|
2120
2188
|
}
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
|
|
2189
|
+
}
|
|
2190
|
+
function y(S) {
|
|
2191
|
+
e && (c.current = S.detail === u.current);
|
|
2192
|
+
}
|
|
2193
|
+
return [g, y];
|
|
2194
|
+
}
|
|
2195
|
+
function Ys(e, t, r, n) {
|
|
2196
|
+
var o = d.useMemo(function() {
|
|
2197
|
+
return [/* @__PURE__ */ new Map(), []];
|
|
2198
|
+
}, [e, r.id, n]), a = Q(o, 2), i = a[0], s = a[1], l = function(c) {
|
|
2199
|
+
var h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : c, m = i.get(c), f = i.get(h);
|
|
2200
|
+
if (m === void 0 || f === void 0)
|
|
2201
|
+
for (var _ = e.length, v = s.length; v < _; v += 1) {
|
|
2202
|
+
var g, y = e[v], S = t(y);
|
|
2203
|
+
i.set(S, v);
|
|
2204
|
+
var C = (g = r.get(S)) !== null && g !== void 0 ? g : n;
|
|
2205
|
+
if (s[v] = (s[v - 1] || 0) + C, S === c && (m = v), S === h && (f = v), m !== void 0 && f !== void 0)
|
|
2206
|
+
break;
|
|
2207
|
+
}
|
|
2124
2208
|
return {
|
|
2125
|
-
|
|
2209
|
+
top: s[m - 1] || 0,
|
|
2210
|
+
bottom: s[f]
|
|
2126
2211
|
};
|
|
2127
|
-
});
|
|
2128
|
-
var ge = "".concat(r, "-scrollbar"), ee = {
|
|
2129
|
-
position: "absolute",
|
|
2130
|
-
visibility: we ? null : "hidden"
|
|
2131
|
-
}, ue = {
|
|
2132
|
-
position: "absolute",
|
|
2133
|
-
background: "rgba(0, 0, 0, 0.5)",
|
|
2134
|
-
borderRadius: 99,
|
|
2135
|
-
cursor: "pointer",
|
|
2136
|
-
userSelect: "none"
|
|
2137
2212
|
};
|
|
2138
|
-
return
|
|
2139
|
-
ref: X,
|
|
2140
|
-
className: St(ge, q(q(q({}, "".concat(ge, "-horizontal"), u), "".concat(ge, "-vertical"), !u), "".concat(ge, "-visible"), we)),
|
|
2141
|
-
style: Z(Z({}, ee), d),
|
|
2142
|
-
onMouseDown: Fe,
|
|
2143
|
-
onMouseMove: ae
|
|
2144
|
-
}, /* @__PURE__ */ m.createElement("div", {
|
|
2145
|
-
ref: z,
|
|
2146
|
-
className: St("".concat(ge, "-thumb"), q({}, "".concat(ge, "-thumb-moving"), v)),
|
|
2147
|
-
style: Z(Z({}, ue), h),
|
|
2148
|
-
onMouseDown: ke
|
|
2149
|
-
}));
|
|
2150
|
-
});
|
|
2151
|
-
function $s(e) {
|
|
2152
|
-
var t = e.children, r = e.setRef, n = m.useCallback(function(o) {
|
|
2153
|
-
r(o);
|
|
2154
|
-
}, []);
|
|
2155
|
-
return /* @__PURE__ */ m.cloneElement(t, {
|
|
2156
|
-
ref: n
|
|
2157
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
function Hs(e, t, r, n, o, a, i) {
|
|
2160
|
-
var s = i.getKey;
|
|
2161
|
-
return e.slice(t, r + 1).map(function(l, u) {
|
|
2162
|
-
var c = t + u, f = a(l, c, {
|
|
2163
|
-
style: {
|
|
2164
|
-
width: n
|
|
2165
|
-
}
|
|
2166
|
-
}), d = s(l);
|
|
2167
|
-
return /* @__PURE__ */ m.createElement($s, {
|
|
2168
|
-
key: d,
|
|
2169
|
-
setRef: function(g) {
|
|
2170
|
-
return o(l, g);
|
|
2171
|
-
}
|
|
2172
|
-
}, f);
|
|
2173
|
-
});
|
|
2213
|
+
return l;
|
|
2174
2214
|
}
|
|
2175
|
-
var
|
|
2215
|
+
var qs = /* @__PURE__ */ function() {
|
|
2176
2216
|
function e() {
|
|
2177
|
-
|
|
2217
|
+
Wn(this, e), X(this, "maps", void 0), X(this, "id", 0), this.maps = /* @__PURE__ */ Object.create(null);
|
|
2178
2218
|
}
|
|
2179
|
-
return
|
|
2219
|
+
return Vn(e, [{
|
|
2180
2220
|
key: "set",
|
|
2181
2221
|
value: function(r, n) {
|
|
2182
2222
|
this.maps[r] = n, this.id += 1;
|
|
@@ -2188,581 +2228,557 @@ var Ds = /* @__PURE__ */ function() {
|
|
|
2188
2228
|
}
|
|
2189
2229
|
}]), e;
|
|
2190
2230
|
}();
|
|
2191
|
-
function
|
|
2192
|
-
var n =
|
|
2231
|
+
function Xs(e, t, r) {
|
|
2232
|
+
var n = d.useState(0), o = Q(n, 2), a = o[0], i = o[1], s = M(/* @__PURE__ */ new Map()), l = M(new qs()), u = M();
|
|
2193
2233
|
function c() {
|
|
2194
2234
|
he.cancel(u.current);
|
|
2195
2235
|
}
|
|
2196
|
-
function
|
|
2197
|
-
var
|
|
2236
|
+
function h() {
|
|
2237
|
+
var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
2198
2238
|
c();
|
|
2199
|
-
var
|
|
2200
|
-
s.current.forEach(function(
|
|
2201
|
-
if (
|
|
2202
|
-
var
|
|
2203
|
-
l.current.get(
|
|
2239
|
+
var _ = function() {
|
|
2240
|
+
s.current.forEach(function(g, y) {
|
|
2241
|
+
if (g && g.offsetParent) {
|
|
2242
|
+
var S = vt(g), C = S.offsetHeight;
|
|
2243
|
+
l.current.get(y) !== C && l.current.set(y, S.offsetHeight);
|
|
2204
2244
|
}
|
|
2205
|
-
}), i(function(
|
|
2206
|
-
return
|
|
2245
|
+
}), i(function(g) {
|
|
2246
|
+
return g + 1;
|
|
2207
2247
|
});
|
|
2208
2248
|
};
|
|
2209
|
-
|
|
2249
|
+
f ? _() : u.current = he(_);
|
|
2210
2250
|
}
|
|
2211
|
-
function
|
|
2212
|
-
var
|
|
2213
|
-
|
|
2251
|
+
function m(f, _) {
|
|
2252
|
+
var v = e(f);
|
|
2253
|
+
s.current.get(v), _ ? (s.current.set(v, _), h()) : s.current.delete(v);
|
|
2214
2254
|
}
|
|
2215
|
-
return
|
|
2255
|
+
return so(function() {
|
|
2216
2256
|
return c;
|
|
2217
|
-
}, []), [
|
|
2218
|
-
}
|
|
2219
|
-
function Us() {
|
|
2220
|
-
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
2257
|
+
}, []), [m, h, l.current, a];
|
|
2221
2258
|
}
|
|
2222
|
-
var
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2259
|
+
var en = 14 / 15;
|
|
2260
|
+
function Ks(e, t, r) {
|
|
2261
|
+
var n = M(!1), o = M(0), a = M(0), i = M(null), s = M(null), l, u = function(f) {
|
|
2262
|
+
if (n.current) {
|
|
2263
|
+
var _ = Math.ceil(f.touches[0].pageX), v = Math.ceil(f.touches[0].pageY), g = o.current - _, y = a.current - v, S = Math.abs(g) > Math.abs(y);
|
|
2264
|
+
S ? o.current = _ : a.current = v, r(S, S ? g : y) && f.preventDefault(), clearInterval(s.current), s.current = setInterval(function() {
|
|
2265
|
+
S ? g *= en : y *= en;
|
|
2266
|
+
var C = Math.floor(S ? g : y);
|
|
2267
|
+
(!r(S, C, !0) || Math.abs(C) <= 0.1) && clearInterval(s.current);
|
|
2268
|
+
}, 16);
|
|
2269
|
+
}
|
|
2270
|
+
}, c = function() {
|
|
2271
|
+
n.current = !1, l();
|
|
2272
|
+
}, h = function(f) {
|
|
2273
|
+
l(), f.touches.length === 1 && !n.current && (n.current = !0, o.current = Math.ceil(f.touches[0].pageX), a.current = Math.ceil(f.touches[0].pageY), i.current = f.target, i.current.addEventListener("touchmove", u), i.current.addEventListener("touchend", c));
|
|
2274
|
+
};
|
|
2275
|
+
l = function() {
|
|
2276
|
+
i.current && (i.current.removeEventListener("touchmove", u), i.current.removeEventListener("touchend", c));
|
|
2277
|
+
}, Je(function() {
|
|
2278
|
+
return e && t.current.addEventListener("touchstart", h), function() {
|
|
2279
|
+
var m;
|
|
2280
|
+
(m = t.current) === null || m === void 0 || m.removeEventListener("touchstart", h), l(), clearInterval(s.current);
|
|
2229
2281
|
};
|
|
2230
|
-
}, []);
|
|
2231
|
-
};
|
|
2232
|
-
function Zr(e) {
|
|
2233
|
-
var t = m.useRef();
|
|
2234
|
-
t.current = e;
|
|
2235
|
-
var r = m.useCallback(function() {
|
|
2236
|
-
for (var n, o = arguments.length, a = new Array(o), i = 0; i < o; i++)
|
|
2237
|
-
a[i] = arguments[i];
|
|
2238
|
-
return (n = t.current) === null || n === void 0 ? void 0 : n.call.apply(n, [t].concat(a));
|
|
2239
|
-
}, []);
|
|
2240
|
-
return r;
|
|
2282
|
+
}, [e]);
|
|
2241
2283
|
}
|
|
2242
|
-
var
|
|
2243
|
-
function
|
|
2244
|
-
var l =
|
|
2245
|
-
return
|
|
2246
|
-
if (
|
|
2284
|
+
var Zs = 10;
|
|
2285
|
+
function Js(e, t, r, n, o, a, i, s) {
|
|
2286
|
+
var l = d.useRef(), u = d.useState(null), c = Q(u, 2), h = c[0], m = c[1];
|
|
2287
|
+
return Je(function() {
|
|
2288
|
+
if (h && h.times < Zs) {
|
|
2247
2289
|
if (!e.current) {
|
|
2248
|
-
|
|
2249
|
-
return
|
|
2290
|
+
m(function(Y) {
|
|
2291
|
+
return G({}, Y);
|
|
2250
2292
|
});
|
|
2251
2293
|
return;
|
|
2252
2294
|
}
|
|
2253
2295
|
a();
|
|
2254
|
-
var
|
|
2255
|
-
if (
|
|
2256
|
-
for (var
|
|
2257
|
-
var
|
|
2296
|
+
var f = h.targetAlign, _ = h.originAlign, v = h.index, g = h.offset, y = e.current.clientHeight, S = !1, C = f, F = null;
|
|
2297
|
+
if (y) {
|
|
2298
|
+
for (var B = f || _, A = 0, O = 0, L = 0, D = Math.min(t.length - 1, v), W = 0; W <= D; W += 1) {
|
|
2299
|
+
var K = o(t[W]);
|
|
2258
2300
|
O = A;
|
|
2259
|
-
var
|
|
2260
|
-
L = O + (
|
|
2301
|
+
var k = r.get(K);
|
|
2302
|
+
L = O + (k === void 0 ? n : k), A = L;
|
|
2261
2303
|
}
|
|
2262
|
-
for (var
|
|
2263
|
-
var
|
|
2264
|
-
if (
|
|
2265
|
-
|
|
2304
|
+
for (var ee = B === "top" ? g : y - g, z = D; z >= 0; z -= 1) {
|
|
2305
|
+
var Ne = o(t[z]), Z = r.get(Ne);
|
|
2306
|
+
if (Z === void 0) {
|
|
2307
|
+
S = !0;
|
|
2266
2308
|
break;
|
|
2267
2309
|
}
|
|
2268
|
-
if (
|
|
2310
|
+
if (ee -= Z, ee <= 0)
|
|
2269
2311
|
break;
|
|
2270
2312
|
}
|
|
2271
|
-
switch (
|
|
2313
|
+
switch (B) {
|
|
2272
2314
|
case "top":
|
|
2273
|
-
F = O -
|
|
2315
|
+
F = O - g;
|
|
2274
2316
|
break;
|
|
2275
2317
|
case "bottom":
|
|
2276
|
-
F = L -
|
|
2318
|
+
F = L - y + g;
|
|
2277
2319
|
break;
|
|
2278
2320
|
default: {
|
|
2279
|
-
var Oe = e.current.scrollTop,
|
|
2280
|
-
O < Oe ?
|
|
2321
|
+
var Oe = e.current.scrollTop, ue = Oe + y;
|
|
2322
|
+
O < Oe ? C = "top" : L > ue && (C = "bottom");
|
|
2281
2323
|
}
|
|
2282
2324
|
}
|
|
2283
|
-
F !== null && i(F), F !==
|
|
2325
|
+
F !== null && i(F), F !== h.lastTop && (S = !0);
|
|
2284
2326
|
}
|
|
2285
|
-
|
|
2286
|
-
times:
|
|
2287
|
-
targetAlign:
|
|
2327
|
+
S && m(G(G({}, h), {}, {
|
|
2328
|
+
times: h.times + 1,
|
|
2329
|
+
targetAlign: C,
|
|
2288
2330
|
lastTop: F
|
|
2289
2331
|
}));
|
|
2290
2332
|
}
|
|
2291
|
-
}, [
|
|
2292
|
-
if (
|
|
2333
|
+
}, [h, e.current]), function(f) {
|
|
2334
|
+
if (f == null) {
|
|
2293
2335
|
s();
|
|
2294
2336
|
return;
|
|
2295
2337
|
}
|
|
2296
|
-
if (he.cancel(l.current), typeof
|
|
2297
|
-
i(
|
|
2298
|
-
else if (
|
|
2299
|
-
var
|
|
2300
|
-
"index" in
|
|
2301
|
-
return o(
|
|
2338
|
+
if (he.cancel(l.current), typeof f == "number")
|
|
2339
|
+
i(f);
|
|
2340
|
+
else if (f && oe(f) === "object") {
|
|
2341
|
+
var _, v = f.align;
|
|
2342
|
+
"index" in f ? _ = f.index : _ = t.findIndex(function(S) {
|
|
2343
|
+
return o(S) === f.key;
|
|
2302
2344
|
});
|
|
2303
|
-
var
|
|
2304
|
-
|
|
2345
|
+
var g = f.offset, y = g === void 0 ? 0 : g;
|
|
2346
|
+
m({
|
|
2305
2347
|
times: 0,
|
|
2306
|
-
index:
|
|
2307
|
-
offset:
|
|
2308
|
-
originAlign:
|
|
2348
|
+
index: _,
|
|
2349
|
+
offset: y,
|
|
2350
|
+
originAlign: v
|
|
2309
2351
|
});
|
|
2310
2352
|
}
|
|
2311
2353
|
};
|
|
2312
2354
|
}
|
|
2313
|
-
function
|
|
2314
|
-
var
|
|
2315
|
-
|
|
2316
|
-
return null;
|
|
2317
|
-
n < o ? (a = e, i = t) : (a = t, i = e);
|
|
2318
|
-
var s = {
|
|
2319
|
-
__EMPTY_ITEM__: !0
|
|
2320
|
-
};
|
|
2321
|
-
function l(g) {
|
|
2322
|
-
return g !== void 0 ? r(g) : s;
|
|
2323
|
-
}
|
|
2324
|
-
for (var u = null, c = Math.abs(n - o) !== 1, f = 0; f < i.length; f += 1) {
|
|
2325
|
-
var d = l(a[f]), h = l(i[f]);
|
|
2326
|
-
if (d !== h) {
|
|
2327
|
-
u = f, c = c || d !== l(i[f + 1]);
|
|
2328
|
-
break;
|
|
2329
|
-
}
|
|
2330
|
-
}
|
|
2331
|
-
return u === null ? null : {
|
|
2332
|
-
index: u,
|
|
2333
|
-
multiple: c
|
|
2334
|
-
};
|
|
2335
|
-
}
|
|
2336
|
-
function js(e, t, r) {
|
|
2337
|
-
var n = m.useState(e), o = G(n, 2), a = o[0], i = o[1], s = m.useState(null), l = G(s, 2), u = l[0], c = l[1];
|
|
2338
|
-
return m.useEffect(function() {
|
|
2339
|
-
var f = Vs(a || [], e || [], t);
|
|
2340
|
-
(f == null ? void 0 : f.index) !== void 0 && (r == null || r(f.index), c(e[f.index])), i(e);
|
|
2341
|
-
}, [e]), [u];
|
|
2355
|
+
function tn(e, t) {
|
|
2356
|
+
var r = "touches" in e ? e.touches[0] : e;
|
|
2357
|
+
return r[t ? "pageX" : "pageY"];
|
|
2342
2358
|
}
|
|
2343
|
-
var
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2359
|
+
var rn = /* @__PURE__ */ d.forwardRef(function(e, t) {
|
|
2360
|
+
var r = e.prefixCls, n = e.rtl, o = e.scrollOffset, a = e.scrollRange, i = e.onStartMove, s = e.onStopMove, l = e.onScroll, u = e.horizontal, c = e.spinSize, h = e.containerSize, m = e.style, f = e.thumbStyle, _ = d.useState(!1), v = Q(_, 2), g = v[0], y = v[1], S = d.useState(null), C = Q(S, 2), F = C[0], B = C[1], A = d.useState(null), O = Q(A, 2), L = O[0], D = O[1], W = !n, K = d.useRef(), k = d.useRef(), ee = d.useState(!1), z = Q(ee, 2), Ne = z[0], Z = z[1], Oe = d.useRef(), ue = function() {
|
|
2361
|
+
clearTimeout(Oe.current), Z(!0), Oe.current = setTimeout(function() {
|
|
2362
|
+
Z(!1);
|
|
2363
|
+
}, 3e3);
|
|
2364
|
+
}, Y = a - h || 0, Ve = h - c || 0, H = d.useMemo(function() {
|
|
2365
|
+
if (o === 0 || Y === 0)
|
|
2366
|
+
return 0;
|
|
2367
|
+
var J = o / Y;
|
|
2368
|
+
return J * Ve;
|
|
2369
|
+
}, [o, Y, Ve]), Fe = function($) {
|
|
2370
|
+
$.stopPropagation(), $.preventDefault();
|
|
2371
|
+
}, Ie = d.useRef({
|
|
2372
|
+
top: H,
|
|
2373
|
+
dragging: g,
|
|
2374
|
+
pageY: F,
|
|
2375
|
+
startTop: L
|
|
2354
2376
|
});
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
);
|
|
2361
|
-
return s && l ? (clearTimeout(n.current), r.current = !1) : (!l || r.current) && o(), !r.current && l;
|
|
2377
|
+
Ie.current = {
|
|
2378
|
+
top: H,
|
|
2379
|
+
dragging: g,
|
|
2380
|
+
pageY: F,
|
|
2381
|
+
startTop: L
|
|
2362
2382
|
};
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
var a = M(0), i = M(null), s = M(null), l = M(!1), u = zn(t, r);
|
|
2366
|
-
function c(v, S) {
|
|
2367
|
-
he.cancel(i.current), a.current += S, s.current = S, !u(S) && (Jr || v.preventDefault(), i.current = he(function() {
|
|
2368
|
-
var R = l.current ? 10 : 1;
|
|
2369
|
-
o(a.current * R), a.current = 0;
|
|
2370
|
-
}));
|
|
2371
|
-
}
|
|
2372
|
-
function f(v, S) {
|
|
2373
|
-
o(S, !0), Jr || v.preventDefault();
|
|
2374
|
-
}
|
|
2375
|
-
var d = M(null), h = M(null);
|
|
2376
|
-
function g(v) {
|
|
2377
|
-
if (e) {
|
|
2378
|
-
he.cancel(h.current), h.current = he(function() {
|
|
2379
|
-
d.current = null;
|
|
2380
|
-
}, 2);
|
|
2381
|
-
var S = v.deltaX, R = v.deltaY, w = v.shiftKey, F = S, D = R;
|
|
2382
|
-
(d.current === "sx" || !d.current && w && R && !S) && (F = R, D = 0, d.current = "sx");
|
|
2383
|
-
var A = Math.abs(F), O = Math.abs(D);
|
|
2384
|
-
d.current === null && (d.current = n && A > O ? "x" : "y"), d.current === "y" ? c(v, D) : f(v, F);
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
function _(v) {
|
|
2388
|
-
e && (l.current = v.detail === s.current);
|
|
2389
|
-
}
|
|
2390
|
-
return [g, _];
|
|
2391
|
-
}
|
|
2392
|
-
var zs = 14 / 15;
|
|
2393
|
-
function Qs(e, t, r) {
|
|
2394
|
-
var n = M(!1), o = M(0), a = M(null), i = M(null), s, l = function(d) {
|
|
2395
|
-
if (n.current) {
|
|
2396
|
-
var h = Math.ceil(d.touches[0].pageY), g = o.current - h;
|
|
2397
|
-
o.current = h, r(g) && d.preventDefault(), clearInterval(i.current), i.current = setInterval(function() {
|
|
2398
|
-
g *= zs, (!r(g, !0) || Math.abs(g) <= 0.1) && clearInterval(i.current);
|
|
2399
|
-
}, 16);
|
|
2400
|
-
}
|
|
2401
|
-
}, u = function() {
|
|
2402
|
-
n.current = !1, s();
|
|
2403
|
-
}, c = function(d) {
|
|
2404
|
-
s(), d.touches.length === 1 && !n.current && (n.current = !0, o.current = Math.ceil(d.touches[0].pageY), a.current = d.target, a.current.addEventListener("touchmove", l), a.current.addEventListener("touchend", u));
|
|
2383
|
+
var we = function($) {
|
|
2384
|
+
y(!0), B(tn($, u)), D(Ie.current.top), i(), $.stopPropagation(), $.preventDefault();
|
|
2405
2385
|
};
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2386
|
+
d.useEffect(function() {
|
|
2387
|
+
var J = function(Me) {
|
|
2388
|
+
Me.preventDefault();
|
|
2389
|
+
}, $ = K.current, re = k.current;
|
|
2390
|
+
return $.addEventListener("touchstart", J), re.addEventListener("touchstart", we), function() {
|
|
2391
|
+
$.removeEventListener("touchstart", J), re.removeEventListener("touchstart", we);
|
|
2412
2392
|
};
|
|
2413
|
-
}, [
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2393
|
+
}, []);
|
|
2394
|
+
var nt = d.useRef();
|
|
2395
|
+
nt.current = Y;
|
|
2396
|
+
var je = d.useRef();
|
|
2397
|
+
je.current = Ve, d.useEffect(function() {
|
|
2398
|
+
if (g) {
|
|
2399
|
+
var J, $ = function(Me) {
|
|
2400
|
+
var ke = Ie.current, ot = ke.dragging, st = ke.pageY, at = ke.startTop;
|
|
2401
|
+
if (he.cancel(J), ot) {
|
|
2402
|
+
var lt = tn(Me, u) - st, ge = at;
|
|
2403
|
+
!W && u ? ge -= lt : ge += lt;
|
|
2404
|
+
var ze = nt.current, ut = je.current, Bt = ut ? ge / ut : 0, Ce = Math.ceil(Bt * ze);
|
|
2405
|
+
Ce = Math.max(Ce, 0), Ce = Math.min(Ce, ze), J = he(function() {
|
|
2406
|
+
l(Ce, u);
|
|
2407
|
+
});
|
|
2408
|
+
}
|
|
2409
|
+
}, re = function() {
|
|
2410
|
+
y(!1), s();
|
|
2411
|
+
};
|
|
2412
|
+
return window.addEventListener("mousemove", $), window.addEventListener("touchmove", $), window.addEventListener("mouseup", re), window.addEventListener("touchend", re), function() {
|
|
2413
|
+
window.removeEventListener("mousemove", $), window.removeEventListener("touchmove", $), window.removeEventListener("mouseup", re), window.removeEventListener("touchend", re), he.cancel(J);
|
|
2414
|
+
};
|
|
2415
|
+
}
|
|
2416
|
+
}, [g]), d.useEffect(function() {
|
|
2417
|
+
ue();
|
|
2418
|
+
}, [o]), d.useImperativeHandle(t, function() {
|
|
2433
2419
|
return {
|
|
2434
|
-
|
|
2435
|
-
bottom: s[h]
|
|
2420
|
+
delayHidden: ue
|
|
2436
2421
|
};
|
|
2422
|
+
});
|
|
2423
|
+
var q = "".concat(r, "-scrollbar"), te = {
|
|
2424
|
+
position: "absolute",
|
|
2425
|
+
visibility: Ne ? null : "hidden"
|
|
2426
|
+
}, de = {
|
|
2427
|
+
position: "absolute",
|
|
2428
|
+
background: "rgba(0, 0, 0, 0.5)",
|
|
2429
|
+
borderRadius: 99,
|
|
2430
|
+
cursor: "pointer",
|
|
2431
|
+
userSelect: "none"
|
|
2437
2432
|
};
|
|
2438
|
-
return
|
|
2433
|
+
return u ? (te.height = 8, te.left = 0, te.right = 0, te.bottom = 0, de.height = "100%", de.width = c, W ? de.left = H : de.right = H) : (te.width = 8, te.top = 0, te.bottom = 0, W ? te.right = 0 : te.left = 0, de.width = "100%", de.height = c, de.top = H), /* @__PURE__ */ d.createElement("div", {
|
|
2434
|
+
ref: K,
|
|
2435
|
+
className: yt(q, X(X(X({}, "".concat(q, "-horizontal"), u), "".concat(q, "-vertical"), !u), "".concat(q, "-visible"), Ne)),
|
|
2436
|
+
style: G(G({}, te), m),
|
|
2437
|
+
onMouseDown: Fe,
|
|
2438
|
+
onMouseMove: ue
|
|
2439
|
+
}, /* @__PURE__ */ d.createElement("div", {
|
|
2440
|
+
ref: k,
|
|
2441
|
+
className: yt("".concat(q, "-thumb"), X({}, "".concat(q, "-thumb-moving"), g)),
|
|
2442
|
+
style: G(G({}, de), f),
|
|
2443
|
+
onMouseDown: we
|
|
2444
|
+
}));
|
|
2445
|
+
}), ea = 20;
|
|
2446
|
+
function nn() {
|
|
2447
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = e / t * e;
|
|
2448
|
+
return isNaN(r) && (r = 0), r = Math.max(r, ea), Math.floor(r);
|
|
2439
2449
|
}
|
|
2440
|
-
var
|
|
2450
|
+
var ta = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles"], ra = [], na = {
|
|
2441
2451
|
overflowY: "auto",
|
|
2442
2452
|
overflowAnchor: "none"
|
|
2443
2453
|
};
|
|
2444
|
-
function
|
|
2445
|
-
var r = e.prefixCls, n = r === void 0 ? "rc-virtual-list" : r, o = e.className, a = e.height, i = e.itemHeight, s = e.fullHeight, l = s === void 0 ? !0 : s, u = e.style, c = e.data,
|
|
2446
|
-
return typeof
|
|
2447
|
-
}, [
|
|
2448
|
-
return Object.values(
|
|
2449
|
-
return
|
|
2454
|
+
function ia(e, t) {
|
|
2455
|
+
var r = e.prefixCls, n = r === void 0 ? "rc-virtual-list" : r, o = e.className, a = e.height, i = e.itemHeight, s = e.fullHeight, l = s === void 0 ? !0 : s, u = e.style, c = e.data, h = e.children, m = e.itemKey, f = e.virtual, _ = e.direction, v = e.scrollWidth, g = e.component, y = g === void 0 ? "div" : g, S = e.onScroll, C = e.onVirtualScroll, F = e.onVisibleChange, B = e.innerProps, A = e.extraRender, O = e.styles, L = Jo(e, ta), D = d.useCallback(function(b) {
|
|
2456
|
+
return typeof m == "function" ? m(b) : b == null ? void 0 : b[m];
|
|
2457
|
+
}, [m]), W = Xs(D), K = Q(W, 4), k = K[0], ee = K[1], z = K[2], Ne = K[3], Z = !!(f !== !1 && a && i), Oe = d.useMemo(function() {
|
|
2458
|
+
return Object.values(z.maps).reduce(function(b, E) {
|
|
2459
|
+
return b + E;
|
|
2450
2460
|
}, 0);
|
|
2451
|
-
}, [
|
|
2452
|
-
|
|
2453
|
-
},
|
|
2454
|
-
|
|
2455
|
-
},
|
|
2456
|
-
getKey:
|
|
2461
|
+
}, [z.id, z.maps]), ue = Z && c && (Math.max(i * c.length, Oe) > a || !!v), Y = _ === "rtl", Ve = yt(n, X({}, "".concat(n, "-rtl"), Y), o), H = c || ra, Fe = M(), Ie = M(), we = M(), nt = Yt(0), je = Q(nt, 2), q = je[0], te = je[1], de = Yt(0), J = Q(de, 2), $ = J[0], re = J[1], it = Yt(!1), Me = Q(it, 2), ke = Me[0], ot = Me[1], st = function() {
|
|
2462
|
+
ot(!0);
|
|
2463
|
+
}, at = function() {
|
|
2464
|
+
ot(!1);
|
|
2465
|
+
}, lt = {
|
|
2466
|
+
getKey: D
|
|
2457
2467
|
};
|
|
2458
|
-
function
|
|
2459
|
-
|
|
2460
|
-
var
|
|
2461
|
-
typeof
|
|
2462
|
-
var
|
|
2463
|
-
return Fe.current.scrollTop =
|
|
2468
|
+
function ge(b) {
|
|
2469
|
+
te(function(E) {
|
|
2470
|
+
var I;
|
|
2471
|
+
typeof b == "function" ? I = b(E) : I = b;
|
|
2472
|
+
var V = ii(I);
|
|
2473
|
+
return Fe.current.scrollTop = V, V;
|
|
2464
2474
|
});
|
|
2465
2475
|
}
|
|
2466
|
-
var
|
|
2476
|
+
var ze = M({
|
|
2467
2477
|
start: 0,
|
|
2468
|
-
end:
|
|
2469
|
-
}),
|
|
2470
|
-
|
|
2471
|
-
var
|
|
2472
|
-
if (!
|
|
2478
|
+
end: H.length
|
|
2479
|
+
}), ut = M(), Bt = Qs(H, D), Ce = Q(Bt, 1), Zn = Ce[0];
|
|
2480
|
+
ut.current = Zn;
|
|
2481
|
+
var ct = d.useMemo(function() {
|
|
2482
|
+
if (!Z)
|
|
2473
2483
|
return {
|
|
2474
2484
|
scrollHeight: void 0,
|
|
2475
2485
|
start: 0,
|
|
2476
|
-
end:
|
|
2486
|
+
end: H.length - 1,
|
|
2477
2487
|
offset: void 0
|
|
2478
2488
|
};
|
|
2479
|
-
if (!
|
|
2480
|
-
var
|
|
2489
|
+
if (!ue) {
|
|
2490
|
+
var b;
|
|
2481
2491
|
return {
|
|
2482
|
-
scrollHeight: ((
|
|
2492
|
+
scrollHeight: ((b = Ie.current) === null || b === void 0 ? void 0 : b.offsetHeight) || 0,
|
|
2483
2493
|
start: 0,
|
|
2484
|
-
end:
|
|
2494
|
+
end: H.length - 1,
|
|
2485
2495
|
offset: void 0
|
|
2486
2496
|
};
|
|
2487
2497
|
}
|
|
2488
|
-
for (var
|
|
2489
|
-
var
|
|
2490
|
-
Gt >=
|
|
2498
|
+
for (var E = 0, I, V, _e, hi = H.length, qe = 0; qe < hi; qe += 1) {
|
|
2499
|
+
var di = H[qe], mi = D(di), Lr = z.get(mi), Gt = E + (Lr === void 0 ? i : Lr);
|
|
2500
|
+
Gt >= q && I === void 0 && (I = qe, V = E), Gt > q + a && _e === void 0 && (_e = qe), E = Gt;
|
|
2491
2501
|
}
|
|
2492
|
-
return
|
|
2493
|
-
scrollHeight:
|
|
2494
|
-
start:
|
|
2502
|
+
return I === void 0 && (I = 0, V = 0, _e = Math.ceil(a / i)), _e === void 0 && (_e = H.length - 1), _e = Math.min(_e + 1, H.length - 1), {
|
|
2503
|
+
scrollHeight: E,
|
|
2504
|
+
start: I,
|
|
2495
2505
|
end: _e,
|
|
2496
|
-
offset:
|
|
2506
|
+
offset: V
|
|
2497
2507
|
};
|
|
2498
|
-
}, [
|
|
2499
|
-
|
|
2500
|
-
var
|
|
2508
|
+
}, [ue, Z, q, H, Ne, a]), Ae = ct.scrollHeight, Qe = ct.start, Ge = ct.end, Er = ct.offset;
|
|
2509
|
+
ze.current.start = Qe, ze.current.end = Ge;
|
|
2510
|
+
var Jn = d.useState({
|
|
2501
2511
|
width: 0,
|
|
2502
2512
|
height: a
|
|
2503
|
-
}), yr =
|
|
2504
|
-
|
|
2505
|
-
width:
|
|
2506
|
-
height:
|
|
2513
|
+
}), yr = Q(Jn, 2), me = yr[0], ei = yr[1], ti = function(E) {
|
|
2514
|
+
ei({
|
|
2515
|
+
width: E.width || E.offsetWidth,
|
|
2516
|
+
height: E.height || E.offsetHeight
|
|
2507
2517
|
});
|
|
2508
|
-
}, br = M(), Tr = M(),
|
|
2509
|
-
return
|
|
2510
|
-
}, [me.width,
|
|
2511
|
-
return
|
|
2512
|
-
}, [me.height,
|
|
2513
|
-
|
|
2514
|
-
function
|
|
2515
|
-
var
|
|
2516
|
-
return Number.isNaN(
|
|
2517
|
-
}
|
|
2518
|
-
var Rr =
|
|
2518
|
+
}, br = M(), Tr = M(), ri = d.useMemo(function() {
|
|
2519
|
+
return nn(me.width, v);
|
|
2520
|
+
}, [me.width, v]), ni = d.useMemo(function() {
|
|
2521
|
+
return nn(me.height, Ae);
|
|
2522
|
+
}, [me.height, Ae]), Wt = Ae - a, Vt = M(Wt);
|
|
2523
|
+
Vt.current = Wt;
|
|
2524
|
+
function ii(b) {
|
|
2525
|
+
var E = b;
|
|
2526
|
+
return Number.isNaN(Vt.current) || (E = Math.min(E, Vt.current)), E = Math.max(E, 0), E;
|
|
2527
|
+
}
|
|
2528
|
+
var Rr = q <= 0, Or = q >= Wt, Fr = $ <= 0, Cr = $ >= v, oi = Yn(Rr, Or, Fr, Cr), jt = function() {
|
|
2519
2529
|
return {
|
|
2520
|
-
x: Y ?
|
|
2521
|
-
y:
|
|
2530
|
+
x: Y ? -$ : $,
|
|
2531
|
+
y: q
|
|
2522
2532
|
};
|
|
2523
|
-
},
|
|
2524
|
-
if (
|
|
2525
|
-
var E =
|
|
2526
|
-
(
|
|
2533
|
+
}, kt = M(jt()), ft = Xr(function(b) {
|
|
2534
|
+
if (C) {
|
|
2535
|
+
var E = G(G({}, jt()), b);
|
|
2536
|
+
(kt.current.x !== E.x || kt.current.y !== E.y) && (C(E), kt.current = E);
|
|
2527
2537
|
}
|
|
2528
2538
|
});
|
|
2529
|
-
function
|
|
2530
|
-
var
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
}),
|
|
2534
|
-
}
|
|
2535
|
-
function
|
|
2536
|
-
var
|
|
2537
|
-
|
|
2538
|
-
}
|
|
2539
|
-
var zt = function(
|
|
2540
|
-
var
|
|
2541
|
-
return
|
|
2542
|
-
},
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
var
|
|
2546
|
-
return zt(
|
|
2539
|
+
function Pr(b, E) {
|
|
2540
|
+
var I = b;
|
|
2541
|
+
E ? (kr(function() {
|
|
2542
|
+
re(I);
|
|
2543
|
+
}), ft()) : ge(I);
|
|
2544
|
+
}
|
|
2545
|
+
function si(b) {
|
|
2546
|
+
var E = b.currentTarget.scrollTop;
|
|
2547
|
+
E !== q && ge(E), S == null || S(b), ft();
|
|
2548
|
+
}
|
|
2549
|
+
var zt = function(E) {
|
|
2550
|
+
var I = E, V = v ? v - me.width : 0;
|
|
2551
|
+
return I = Math.max(I, 0), I = Math.min(I, V), I;
|
|
2552
|
+
}, ai = Xr(function(b, E) {
|
|
2553
|
+
E ? (kr(function() {
|
|
2554
|
+
re(function(I) {
|
|
2555
|
+
var V = I + (Y ? -b : b);
|
|
2556
|
+
return zt(V);
|
|
2547
2557
|
});
|
|
2548
|
-
}),
|
|
2549
|
-
var
|
|
2550
|
-
return
|
|
2558
|
+
}), ft()) : ge(function(I) {
|
|
2559
|
+
var V = I + b;
|
|
2560
|
+
return V;
|
|
2551
2561
|
});
|
|
2552
|
-
}),
|
|
2553
|
-
|
|
2554
|
-
return
|
|
2562
|
+
}), li = Gs(Z, Rr, Or, Fr, Cr, !!v, ai), Nr = Q(li, 2), Qt = Nr[0], Ir = Nr[1];
|
|
2563
|
+
Ks(Z, Fe, function(b, E, I) {
|
|
2564
|
+
return oi(b, E, I) ? !1 : (Qt({
|
|
2555
2565
|
preventDefault: function() {
|
|
2556
2566
|
},
|
|
2557
|
-
|
|
2567
|
+
deltaX: b ? E : 0,
|
|
2568
|
+
deltaY: b ? 0 : E
|
|
2558
2569
|
}), !0);
|
|
2559
|
-
}),
|
|
2560
|
-
function
|
|
2561
|
-
|
|
2570
|
+
}), Je(function() {
|
|
2571
|
+
function b(I) {
|
|
2572
|
+
Z && I.preventDefault();
|
|
2562
2573
|
}
|
|
2563
|
-
var
|
|
2564
|
-
return
|
|
2565
|
-
|
|
2574
|
+
var E = Fe.current;
|
|
2575
|
+
return E.addEventListener("wheel", Qt), E.addEventListener("DOMMouseScroll", Ir), E.addEventListener("MozMousePixelScroll", b), function() {
|
|
2576
|
+
E.removeEventListener("wheel", Qt), E.removeEventListener("DOMMouseScroll", Ir), E.removeEventListener("MozMousePixelScroll", b);
|
|
2566
2577
|
};
|
|
2567
|
-
}, [
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2578
|
+
}, [Z]), Je(function() {
|
|
2579
|
+
if (v) {
|
|
2580
|
+
var b = zt($);
|
|
2581
|
+
re(b), ft({
|
|
2582
|
+
x: b
|
|
2583
|
+
});
|
|
2584
|
+
}
|
|
2585
|
+
}, [me.width, v]);
|
|
2586
|
+
var wr = function() {
|
|
2587
|
+
var E, I;
|
|
2588
|
+
(E = br.current) === null || E === void 0 || E.delayHidden(), (I = Tr.current) === null || I === void 0 || I.delayHidden();
|
|
2589
|
+
}, Mr = Js(Fe, H, z, i, D, function() {
|
|
2590
|
+
return ee(!0);
|
|
2591
|
+
}, ge, wr);
|
|
2592
|
+
d.useImperativeHandle(t, function() {
|
|
2579
2593
|
return {
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2594
|
+
nativeElement: we.current,
|
|
2595
|
+
getScrollInfo: jt,
|
|
2596
|
+
scrollTo: function(E) {
|
|
2597
|
+
function I(V) {
|
|
2598
|
+
return V && oe(V) === "object" && ("left" in V || "top" in V);
|
|
2584
2599
|
}
|
|
2585
|
-
|
|
2600
|
+
I(E) ? (E.left !== void 0 && re(zt(E.left)), Mr(E.top)) : Mr(E);
|
|
2586
2601
|
}
|
|
2587
2602
|
};
|
|
2588
|
-
}),
|
|
2603
|
+
}), Je(function() {
|
|
2589
2604
|
if (F) {
|
|
2590
|
-
var
|
|
2591
|
-
F(
|
|
2592
|
-
}
|
|
2593
|
-
}, [
|
|
2594
|
-
var
|
|
2595
|
-
start:
|
|
2596
|
-
end:
|
|
2597
|
-
virtual:
|
|
2598
|
-
offsetX:
|
|
2605
|
+
var b = H.slice(Qe, Ge + 1);
|
|
2606
|
+
F(b, H);
|
|
2607
|
+
}
|
|
2608
|
+
}, [Qe, Ge, H]);
|
|
2609
|
+
var ui = Ys(H, D, z, i), ci = A == null ? void 0 : A({
|
|
2610
|
+
start: Qe,
|
|
2611
|
+
end: Ge,
|
|
2612
|
+
virtual: ue,
|
|
2613
|
+
offsetX: $,
|
|
2599
2614
|
offsetY: Er,
|
|
2600
2615
|
rtl: Y,
|
|
2601
|
-
getSize:
|
|
2602
|
-
}),
|
|
2603
|
-
a && (
|
|
2604
|
-
var
|
|
2605
|
-
return Y && (
|
|
2606
|
-
|
|
2616
|
+
getSize: ui
|
|
2617
|
+
}), fi = ks(H, Qe, Ge, v, $, k, h, lt), Ye = null;
|
|
2618
|
+
a && (Ye = G(X({}, l ? "height" : "maxHeight", a), na), Z && (Ye.overflowY = "hidden", v && (Ye.overflowX = "hidden"), ke && (Ye.pointerEvents = "none")));
|
|
2619
|
+
var Ar = {};
|
|
2620
|
+
return Y && (Ar.dir = "rtl"), /* @__PURE__ */ d.createElement("div", tt({
|
|
2621
|
+
ref: we,
|
|
2622
|
+
style: G(G({}, u), {}, {
|
|
2607
2623
|
position: "relative"
|
|
2608
2624
|
}),
|
|
2609
|
-
className:
|
|
2610
|
-
},
|
|
2611
|
-
onResize:
|
|
2612
|
-
}, /* @__PURE__ */
|
|
2625
|
+
className: Ve
|
|
2626
|
+
}, Ar, L), /* @__PURE__ */ d.createElement(_r, {
|
|
2627
|
+
onResize: ti
|
|
2628
|
+
}, /* @__PURE__ */ d.createElement(y, {
|
|
2613
2629
|
className: "".concat(n, "-holder"),
|
|
2614
|
-
style:
|
|
2630
|
+
style: Ye,
|
|
2615
2631
|
ref: Fe,
|
|
2616
|
-
onScroll:
|
|
2617
|
-
onMouseEnter:
|
|
2618
|
-
}, /* @__PURE__ */
|
|
2632
|
+
onScroll: si,
|
|
2633
|
+
onMouseEnter: wr
|
|
2634
|
+
}, /* @__PURE__ */ d.createElement(kn, {
|
|
2619
2635
|
prefixCls: n,
|
|
2620
|
-
height:
|
|
2621
|
-
offsetX:
|
|
2636
|
+
height: Ae,
|
|
2637
|
+
offsetX: $,
|
|
2622
2638
|
offsetY: Er,
|
|
2623
|
-
scrollWidth:
|
|
2624
|
-
onInnerResize:
|
|
2639
|
+
scrollWidth: v,
|
|
2640
|
+
onInnerResize: ee,
|
|
2625
2641
|
ref: Ie,
|
|
2626
|
-
innerProps:
|
|
2642
|
+
innerProps: B,
|
|
2627
2643
|
rtl: Y,
|
|
2628
|
-
extra:
|
|
2629
|
-
},
|
|
2644
|
+
extra: ci
|
|
2645
|
+
}, fi))), ue && Ae > a && /* @__PURE__ */ d.createElement(rn, {
|
|
2630
2646
|
ref: br,
|
|
2631
2647
|
prefixCls: n,
|
|
2632
|
-
scrollOffset:
|
|
2633
|
-
scrollRange:
|
|
2648
|
+
scrollOffset: q,
|
|
2649
|
+
scrollRange: Ae,
|
|
2634
2650
|
rtl: Y,
|
|
2635
|
-
onScroll:
|
|
2636
|
-
onStartMove:
|
|
2637
|
-
onStopMove:
|
|
2638
|
-
spinSize:
|
|
2651
|
+
onScroll: Pr,
|
|
2652
|
+
onStartMove: st,
|
|
2653
|
+
onStopMove: at,
|
|
2654
|
+
spinSize: ni,
|
|
2639
2655
|
containerSize: me.height,
|
|
2640
2656
|
style: O == null ? void 0 : O.verticalScrollBar,
|
|
2641
2657
|
thumbStyle: O == null ? void 0 : O.verticalScrollBarThumb
|
|
2642
|
-
}),
|
|
2658
|
+
}), ue && v > me.width && /* @__PURE__ */ d.createElement(rn, {
|
|
2643
2659
|
ref: Tr,
|
|
2644
2660
|
prefixCls: n,
|
|
2645
|
-
scrollOffset:
|
|
2646
|
-
scrollRange:
|
|
2661
|
+
scrollOffset: $,
|
|
2662
|
+
scrollRange: v,
|
|
2647
2663
|
rtl: Y,
|
|
2648
|
-
onScroll:
|
|
2649
|
-
onStartMove:
|
|
2650
|
-
onStopMove:
|
|
2651
|
-
spinSize:
|
|
2664
|
+
onScroll: Pr,
|
|
2665
|
+
onStartMove: st,
|
|
2666
|
+
onStopMove: at,
|
|
2667
|
+
spinSize: ri,
|
|
2652
2668
|
containerSize: me.width,
|
|
2653
2669
|
horizontal: !0,
|
|
2654
2670
|
style: O == null ? void 0 : O.horizontalScrollBar,
|
|
2655
2671
|
thumbStyle: O == null ? void 0 : O.horizontalScrollBarThumb
|
|
2656
2672
|
}));
|
|
2657
2673
|
}
|
|
2658
|
-
var
|
|
2659
|
-
|
|
2660
|
-
function
|
|
2661
|
-
const { model: t } = e, r =
|
|
2662
|
-
t.onFilterCheckToggled(
|
|
2663
|
-
}, [t]), c = fe((
|
|
2664
|
-
t.onFilterOnly(
|
|
2665
|
-
}, [t]),
|
|
2674
|
+
var qn = /* @__PURE__ */ d.forwardRef(ia);
|
|
2675
|
+
qn.displayName = "List";
|
|
2676
|
+
function oa(e) {
|
|
2677
|
+
const { model: t } = e, r = Xe(Re), n = Ee(t.searchString$, "", !0), o = Ee(t.filterItems$, void 0, !0), a = r.t("sheets-filter.panel.filter-only"), i = Jt(o), s = i.checked > 0 && i.unchecked === 0, l = i.checked > 0 && i.unchecked > 0, u = fe((f, _) => {
|
|
2678
|
+
t.onFilterCheckToggled(f, _);
|
|
2679
|
+
}, [t]), c = fe((f) => {
|
|
2680
|
+
t.onFilterOnly(f);
|
|
2681
|
+
}, [t]), h = fe(() => {
|
|
2666
2682
|
t.onCheckAllToggled(!s);
|
|
2667
|
-
}, [t, s]),
|
|
2668
|
-
t.setSearchString(
|
|
2683
|
+
}, [t, s]), m = fe((f) => {
|
|
2684
|
+
t.setSearchString(f);
|
|
2669
2685
|
}, [t]);
|
|
2670
|
-
return /* @__PURE__ */
|
|
2671
|
-
|
|
2686
|
+
return /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelValuesContainer }, /* @__PURE__ */ R.createElement(yn, { value: n, placeholder: r.t("sheets-filter.panel.search-placeholder"), onChange: m }), /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelValuesList }, /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelValuesItem }, /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelValuesItemInner }, /* @__PURE__ */ R.createElement(
|
|
2687
|
+
Wr,
|
|
2672
2688
|
{
|
|
2673
2689
|
indeterminate: l,
|
|
2674
2690
|
disabled: o.length === 0,
|
|
2675
2691
|
checked: s,
|
|
2676
|
-
onChange:
|
|
2692
|
+
onChange: h
|
|
2677
2693
|
}
|
|
2678
|
-
), /* @__PURE__ */
|
|
2679
|
-
|
|
2694
|
+
), /* @__PURE__ */ R.createElement("span", { className: U.sheetsFilterPanelValuesItemText }, `${r.t("sheets-filter.panel.select-all")}`), /* @__PURE__ */ R.createElement("span", { className: U.sheetsFilterPanelValuesItemCount }, `(${i.checked}/${i.checked + i.unchecked})`))), /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelValuesVirtual }, /* @__PURE__ */ R.createElement(qn, { style: { paddingRight: 8 }, data: o, height: 190, itemHeight: 32, itemKey: (f) => `${f.value}----${f.checked}` }, (f) => /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelValuesItem }, /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelValuesItemInner }, /* @__PURE__ */ R.createElement(Wr, { checked: f.checked, onChange: () => u(f, !f.checked) }), /* @__PURE__ */ R.createElement(Xi, { showIfEllipsis: !0, placement: "top", title: f.value }, /* @__PURE__ */ R.createElement("span", { className: U.sheetsFilterPanelValuesItemText }, f.value)), /* @__PURE__ */ R.createElement("span", { className: U.sheetsFilterPanelValuesItemCount }, `(${f.count})`), /* @__PURE__ */ R.createElement(
|
|
2695
|
+
pt,
|
|
2680
2696
|
{
|
|
2681
|
-
className:
|
|
2697
|
+
className: U.sheetsFilterPanelValuesItemExcludeButton,
|
|
2682
2698
|
size: "small",
|
|
2683
2699
|
type: "link",
|
|
2684
|
-
onClick: () => c(
|
|
2700
|
+
onClick: () => c(f)
|
|
2685
2701
|
},
|
|
2686
2702
|
a
|
|
2687
2703
|
)))))));
|
|
2688
2704
|
}
|
|
2689
|
-
function
|
|
2690
|
-
const e =
|
|
2691
|
-
r.executeCommand(
|
|
2705
|
+
function sa() {
|
|
2706
|
+
const e = Xe(be), t = Xe(Re), r = Xe(se), n = Ee(e.filterBy$, void 0, !0), o = Ee(e.filterByModel$, void 0, !1), a = Ee(() => (o == null ? void 0 : o.canApply$) || rt(!1), void 0, !1, [o]), i = aa(t), s = !Ee(e.hasCriteria$), l = fe((m) => {
|
|
2707
|
+
r.executeCommand(In.id, { filterBy: m });
|
|
2692
2708
|
}, [r]), u = fe(async () => {
|
|
2693
|
-
await (o == null ? void 0 : o.clear()), r.executeCommand(
|
|
2709
|
+
await (o == null ? void 0 : o.clear()), r.executeCommand(Ke.id);
|
|
2694
2710
|
}, [o, r]), c = fe(() => {
|
|
2695
|
-
r.executeCommand(
|
|
2696
|
-
}, [r]),
|
|
2697
|
-
await (o == null ? void 0 : o.apply()), r.executeCommand(
|
|
2711
|
+
r.executeCommand(Ke.id);
|
|
2712
|
+
}, [r]), h = fe(async () => {
|
|
2713
|
+
await (o == null ? void 0 : o.apply()), r.executeCommand(Ke.id);
|
|
2698
2714
|
}, [o, r]);
|
|
2699
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanel }, /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelHeader }, /* @__PURE__ */ R.createElement(Ki, { value: n, options: i, onChange: (m) => l(m) })), o ? /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelContent }, n === _t.VALUES ? /* @__PURE__ */ R.createElement(oa, { model: o }) : /* @__PURE__ */ R.createElement(ko, { model: o })) : null, /* @__PURE__ */ R.createElement("div", { className: U.sheetsFilterPanelFooter }, /* @__PURE__ */ R.createElement(pt, { type: "link", onClick: u, disabled: s }, t.t("sheets-filter.panel.clear-filter")), /* @__PURE__ */ R.createElement("span", { className: U.sheetsFilterPanelFooterPrimaryButtons }, /* @__PURE__ */ R.createElement(pt, { type: "default", onClick: c }, t.t("sheets-filter.panel.cancel")), /* @__PURE__ */ R.createElement(pt, { disabled: !a, type: "primary", onClick: h }, t.t("sheets-filter.panel.confirm")))));
|
|
2700
2716
|
}
|
|
2701
|
-
function
|
|
2717
|
+
function aa(e) {
|
|
2702
2718
|
const t = e.getCurrentLocale();
|
|
2703
2719
|
return dr(
|
|
2704
2720
|
() => [
|
|
2705
|
-
{ label: e.t("sheets-filter.panel.by-values"), value:
|
|
2706
|
-
{ label: e.t("sheets-filter.panel.by-conditions"), value:
|
|
2721
|
+
{ label: e.t("sheets-filter.panel.by-values"), value: _t.VALUES },
|
|
2722
|
+
{ label: e.t("sheets-filter.panel.by-conditions"), value: _t.CONDITIONS }
|
|
2707
2723
|
],
|
|
2708
2724
|
[t, e]
|
|
2709
2725
|
);
|
|
2710
2726
|
}
|
|
2711
|
-
const
|
|
2712
|
-
id:
|
|
2713
|
-
binding:
|
|
2727
|
+
const la = {
|
|
2728
|
+
id: We.id,
|
|
2729
|
+
binding: Fi.L | Dr.CTRL_COMMAND | Dr.SHIFT,
|
|
2714
2730
|
description: "sheets-filter.shortcut.smart-toggle-filter",
|
|
2715
|
-
preconditions:
|
|
2731
|
+
preconditions: Ui,
|
|
2716
2732
|
group: "4_sheet-edit"
|
|
2717
2733
|
};
|
|
2718
|
-
function
|
|
2719
|
-
const t = e.get(
|
|
2734
|
+
function ua(e) {
|
|
2735
|
+
const t = e.get(ae);
|
|
2720
2736
|
return {
|
|
2721
|
-
id:
|
|
2737
|
+
id: We.id,
|
|
2722
2738
|
group: ur.TOOLBAR_FORMULAS_INSERT,
|
|
2723
2739
|
type: cr.BUTTON_SELECTOR,
|
|
2724
2740
|
icon: "FilterSingle",
|
|
2725
2741
|
tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
|
|
2726
|
-
positions: [
|
|
2727
|
-
hidden$: fr(e,
|
|
2728
|
-
activated$: t.activeFilterModel$.pipe(
|
|
2729
|
-
disabled$:
|
|
2742
|
+
positions: [Ci.TOOLBAR_START],
|
|
2743
|
+
hidden$: fr(e, Be.UNIVER_SHEET),
|
|
2744
|
+
activated$: t.activeFilterModel$.pipe(He((r) => !!r)),
|
|
2745
|
+
disabled$: Bi(e, { workbookTypes: [Xt], worksheetTypes: [Kt, Zt], rangeTypes: [to] })
|
|
2730
2746
|
};
|
|
2731
2747
|
}
|
|
2732
|
-
function
|
|
2733
|
-
const t = e.get(
|
|
2748
|
+
function ca(e) {
|
|
2749
|
+
const t = e.get(ae);
|
|
2734
2750
|
return {
|
|
2735
|
-
id:
|
|
2751
|
+
id: Cn.id,
|
|
2736
2752
|
group: ur.TOOLBAR_OTHERS,
|
|
2737
2753
|
type: cr.BUTTON,
|
|
2738
2754
|
title: "sheets-filter.toolbar.clear-filter-criteria",
|
|
2739
|
-
positions: [
|
|
2740
|
-
hidden$: fr(e,
|
|
2755
|
+
positions: [We.id],
|
|
2756
|
+
hidden$: fr(e, Be.UNIVER_SHEET),
|
|
2741
2757
|
disabled$: t.activeFilterModel$.pipe(hr((r) => {
|
|
2742
2758
|
var n;
|
|
2743
|
-
return (n = r == null ? void 0 : r.hasCriteria$.pipe(
|
|
2759
|
+
return (n = r == null ? void 0 : r.hasCriteria$.pipe(He((o) => !o))) != null ? n : rt(!0);
|
|
2744
2760
|
}))
|
|
2745
2761
|
};
|
|
2746
2762
|
}
|
|
2747
|
-
function
|
|
2748
|
-
const t = e.get(
|
|
2763
|
+
function fa(e) {
|
|
2764
|
+
const t = e.get(ae);
|
|
2749
2765
|
return {
|
|
2750
|
-
id:
|
|
2766
|
+
id: Pn.id,
|
|
2751
2767
|
group: ur.TOOLBAR_OTHERS,
|
|
2752
2768
|
type: cr.BUTTON,
|
|
2753
2769
|
title: "sheets-filter.toolbar.re-calc-filter-conditions",
|
|
2754
|
-
positions: [
|
|
2755
|
-
hidden$: fr(e,
|
|
2770
|
+
positions: [We.id],
|
|
2771
|
+
hidden$: fr(e, Be.UNIVER_SHEET),
|
|
2756
2772
|
disabled$: t.activeFilterModel$.pipe(hr((r) => {
|
|
2757
2773
|
var n;
|
|
2758
|
-
return (n = r == null ? void 0 : r.hasCriteria$.pipe(
|
|
2774
|
+
return (n = r == null ? void 0 : r.hasCriteria$.pipe(He((o) => !o))) != null ? n : rt(!0);
|
|
2759
2775
|
}))
|
|
2760
2776
|
};
|
|
2761
2777
|
}
|
|
2762
|
-
const Se = 16,
|
|
2763
|
-
class
|
|
2778
|
+
const Se = 16, ha = new Path2D("M3.30363 3C2.79117 3 2.51457 3.60097 2.84788 3.99024L6.8 8.60593V12.5662C6.8 12.7184 6.8864 12.8575 7.02289 12.9249L8.76717 13.7863C8.96655 13.8847 9.2 13.7396 9.2 13.5173V8.60593L13.1521 3.99024C13.4854 3.60097 13.2088 3 12.6964 3H3.30363Z");
|
|
2779
|
+
class on {
|
|
2764
2780
|
static drawNoCriteria(t, r, n, o) {
|
|
2765
|
-
t.save(),
|
|
2781
|
+
t.save(), xr.drawWith(t, {
|
|
2766
2782
|
radius: 2,
|
|
2767
2783
|
width: Se,
|
|
2768
2784
|
height: Se,
|
|
@@ -2770,27 +2786,27 @@ class tn {
|
|
|
2770
2786
|
}), t.lineCap = "square", t.strokeStyle = n, t.scale(r / Se, r / Se), t.beginPath(), t.lineWidth = 1, t.lineCap = "round", t.moveTo(3, 4), t.lineTo(13, 4), t.moveTo(4.5, 8), t.lineTo(11.5, 8), t.moveTo(6, 12), t.lineTo(10, 12), t.stroke(), t.restore();
|
|
2771
2787
|
}
|
|
2772
2788
|
static drawHasCriteria(t, r, n, o) {
|
|
2773
|
-
t.save(),
|
|
2789
|
+
t.save(), xr.drawWith(t, {
|
|
2774
2790
|
radius: 2,
|
|
2775
2791
|
width: Se,
|
|
2776
2792
|
height: Se,
|
|
2777
2793
|
fill: o
|
|
2778
|
-
}), t.scale(r / Se, r / Se), t.fillStyle = n, t.fill(
|
|
2794
|
+
}), t.scale(r / Se, r / Se), t.fillStyle = n, t.fill(ha), t.restore();
|
|
2779
2795
|
}
|
|
2780
2796
|
}
|
|
2781
|
-
var
|
|
2782
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
2797
|
+
var da = Object.defineProperty, ma = Object.getOwnPropertyDescriptor, pa = (e, t, r, n) => {
|
|
2798
|
+
for (var o = n > 1 ? void 0 : n ? ma(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2783
2799
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2784
|
-
return n && o &&
|
|
2800
|
+
return n && o && da(t, r, o), o;
|
|
2785
2801
|
}, qt = (e, t) => (r, n) => t(r, n, e);
|
|
2786
|
-
const ve = 16,
|
|
2787
|
-
let ir = class extends
|
|
2802
|
+
const ve = 16, ht = 1;
|
|
2803
|
+
let ir = class extends Yi {
|
|
2788
2804
|
constructor(t, r, n, o, a) {
|
|
2789
2805
|
super(t, r);
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2806
|
+
N(this, "_cellWidth", 0);
|
|
2807
|
+
N(this, "_cellHeight", 0);
|
|
2808
|
+
N(this, "_filterParams");
|
|
2809
|
+
N(this, "_hovered", !1);
|
|
2794
2810
|
this._contextService = n, this._commandService = o, this._themeService = a, this.setShapeProps(r), this.onPointerDownObserver.add((i) => this.onPointerDown(i)), this.onPointerEnterObserver.add(() => this.onPointerEnter()), this.onPointerLeaveObserver.add(() => this.onPointerLeave());
|
|
2795
2811
|
}
|
|
2796
2812
|
setShapeProps(t) {
|
|
@@ -2805,13 +2821,13 @@ let ir = class extends ki {
|
|
|
2805
2821
|
const i = new Path2D();
|
|
2806
2822
|
i.rect(o, a, n, r), t.clip(i);
|
|
2807
2823
|
const { hasCriteria: s } = this._filterParams, l = this._themeService.getCurrentTheme().primaryColor, u = this._hovered ? this._themeService.getCurrentTheme().grey50 : "rgba(255, 255, 255, 1.0)";
|
|
2808
|
-
s ?
|
|
2824
|
+
s ? on.drawHasCriteria(t, ve, l, u) : on.drawNoCriteria(t, ve, l, u), t.restore();
|
|
2809
2825
|
}
|
|
2810
2826
|
onPointerDown(t) {
|
|
2811
2827
|
if (t.button === 2)
|
|
2812
2828
|
return;
|
|
2813
2829
|
const { col: r, unitId: n, subUnitId: o } = this._filterParams;
|
|
2814
|
-
this._contextService.getContextValue(
|
|
2830
|
+
this._contextService.getContextValue(xe) || setTimeout(() => {
|
|
2815
2831
|
this._commandService.executeCommand(pr.id, {
|
|
2816
2832
|
unitId: n,
|
|
2817
2833
|
subUnitId: o,
|
|
@@ -2826,40 +2842,40 @@ let ir = class extends ki {
|
|
|
2826
2842
|
this._hovered = !1, this.makeDirty(!0);
|
|
2827
2843
|
}
|
|
2828
2844
|
};
|
|
2829
|
-
ir =
|
|
2830
|
-
qt(2,
|
|
2831
|
-
qt(3,
|
|
2832
|
-
qt(4,
|
|
2845
|
+
ir = pa([
|
|
2846
|
+
qt(2, Ct),
|
|
2847
|
+
qt(3, se),
|
|
2848
|
+
qt(4, x(ln))
|
|
2833
2849
|
], ir);
|
|
2834
|
-
var
|
|
2835
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
2850
|
+
var va = Object.defineProperty, ga = Object.getOwnPropertyDescriptor, _a = (e, t, r, n) => {
|
|
2851
|
+
for (var o = n > 1 ? void 0 : n ? ga(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2836
2852
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2837
|
-
return n && o &&
|
|
2853
|
+
return n && o && va(t, r, o), o;
|
|
2838
2854
|
}, pe = (e, t) => (r, n) => t(r, n, e);
|
|
2839
|
-
const
|
|
2840
|
-
let or = class extends
|
|
2855
|
+
const Sa = 1e3, Ea = 5e3;
|
|
2856
|
+
let or = class extends un {
|
|
2841
2857
|
constructor(t, r, n, o, a, i, s, l, u, c) {
|
|
2842
2858
|
super();
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2859
|
+
N(this, "_filterRangeShape", null);
|
|
2860
|
+
N(this, "_buttonRenderDisposable", null);
|
|
2861
|
+
N(this, "_filterButtonShapes", []);
|
|
2846
2862
|
this._context = t, this._injector = r, this._sheetSkeletonManagerService = n, this._sheetsFilterService = o, this._themeService = a, this._sheetInterceptorService = i, this._sheetsRenderService = s, this._commandService = l, this._renderManagerService = u, this._selectionRenderService = c, [
|
|
2847
2863
|
lr,
|
|
2848
2864
|
De,
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
].forEach((
|
|
2865
|
+
mt,
|
|
2866
|
+
mn
|
|
2867
|
+
].forEach((h) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(h.id))), this._initRenderer();
|
|
2852
2868
|
}
|
|
2853
2869
|
_initRenderer() {
|
|
2854
|
-
|
|
2870
|
+
vn([
|
|
2855
2871
|
this._selectionRenderService.usable$,
|
|
2856
2872
|
this._sheetSkeletonManagerService.currentSkeleton$
|
|
2857
2873
|
]).pipe(
|
|
2858
|
-
|
|
2874
|
+
Hr(([t]) => t),
|
|
2859
2875
|
hr(([t, r]) => {
|
|
2860
2876
|
var l;
|
|
2861
2877
|
if (!r)
|
|
2862
|
-
return
|
|
2878
|
+
return rt(null);
|
|
2863
2879
|
const { unit: n, unitId: o } = this._context, a = n.getActiveSheet().getSheetId(), i = (l = this._sheetsFilterService.getFilterModel(o, a)) != null ? l : void 0, s = () => ({
|
|
2864
2880
|
unitId: o,
|
|
2865
2881
|
worksheetId: a,
|
|
@@ -2867,17 +2883,17 @@ let or = class extends sn {
|
|
|
2867
2883
|
range: i == null ? void 0 : i.getRange(),
|
|
2868
2884
|
skeleton: r.skeleton
|
|
2869
2885
|
});
|
|
2870
|
-
return
|
|
2871
|
-
|
|
2872
|
-
([u]) => u.type === Te.MUTATION && u.params.unitId === n.getUnitId() &&
|
|
2886
|
+
return Si(this._commandService.onCommandExecuted).pipe(
|
|
2887
|
+
Hr(
|
|
2888
|
+
([u]) => u.type === Te.MUTATION && u.params.unitId === n.getUnitId() && Ti.has(u.id)
|
|
2873
2889
|
),
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2890
|
+
gn(20, void 0, { leading: !1, trailing: !0 }),
|
|
2891
|
+
He(s),
|
|
2892
|
+
_n(s())
|
|
2877
2893
|
// must trigger once
|
|
2878
2894
|
);
|
|
2879
2895
|
}),
|
|
2880
|
-
|
|
2896
|
+
$i(this.dispose$)
|
|
2881
2897
|
).subscribe((t) => {
|
|
2882
2898
|
this._disposeRendering(), !(!t || !t.range) && (this._renderRange(t.unitId, t.range, t.skeleton), this._renderButtons(t));
|
|
2883
2899
|
});
|
|
@@ -2890,7 +2906,7 @@ let or = class extends sn {
|
|
|
2890
2906
|
range: r,
|
|
2891
2907
|
primary: null,
|
|
2892
2908
|
style: null
|
|
2893
|
-
}), { rowHeaderWidth: l, columnHeaderHeight: u } = n, c = this._filterRangeShape = new
|
|
2909
|
+
}), { rowHeaderWidth: l, columnHeaderHeight: u } = n, c = this._filterRangeShape = new Wi(a, Sa, !0, this._themeService);
|
|
2894
2910
|
c.update(i, l, u, {
|
|
2895
2911
|
hasAutoFill: !1,
|
|
2896
2912
|
fill: "rgba(0, 0, 0, 0.0)",
|
|
@@ -2903,28 +2919,28 @@ let or = class extends sn {
|
|
|
2903
2919
|
return;
|
|
2904
2920
|
const { scene: l } = s;
|
|
2905
2921
|
this._interceptCellContent(t.range);
|
|
2906
|
-
const { startColumn: u, endColumn: c, startRow:
|
|
2907
|
-
for (let
|
|
2908
|
-
const
|
|
2909
|
-
if (F <=
|
|
2922
|
+
const { startColumn: u, endColumn: c, startRow: h } = r;
|
|
2923
|
+
for (let m = u; m <= c; m++) {
|
|
2924
|
+
const f = `sheets-filter-button-${m}`, _ = Vi(h, m, l, a), { startX: v, startY: g, endX: y, endY: S } = _, C = y - v, F = S - g;
|
|
2925
|
+
if (F <= ht || C <= ht)
|
|
2910
2926
|
continue;
|
|
2911
|
-
const
|
|
2927
|
+
const B = !!n.getFilterColumn(m), A = y - ve - ht, O = S - ve - ht, L = {
|
|
2912
2928
|
left: A,
|
|
2913
2929
|
top: O,
|
|
2914
2930
|
height: ve,
|
|
2915
2931
|
width: ve,
|
|
2916
|
-
zIndex:
|
|
2932
|
+
zIndex: Ea,
|
|
2917
2933
|
cellHeight: F,
|
|
2918
|
-
cellWidth:
|
|
2919
|
-
filterParams: { unitId: o, subUnitId: i, col:
|
|
2920
|
-
},
|
|
2921
|
-
this._filterButtonShapes.push(
|
|
2934
|
+
cellWidth: C,
|
|
2935
|
+
filterParams: { unitId: o, subUnitId: i, col: m, hasCriteria: B }
|
|
2936
|
+
}, D = this._injector.createInstance(ir, f, L);
|
|
2937
|
+
this._filterButtonShapes.push(D);
|
|
2922
2938
|
}
|
|
2923
2939
|
l.addObjects(this._filterButtonShapes), l.makeDirty();
|
|
2924
2940
|
}
|
|
2925
2941
|
_interceptCellContent(t) {
|
|
2926
2942
|
const { startRow: r, startColumn: n, endColumn: o } = t;
|
|
2927
|
-
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(
|
|
2943
|
+
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(ro.CELL_CONTENT, {
|
|
2928
2944
|
handler: (a, i, s) => {
|
|
2929
2945
|
const { row: l, col: u } = i;
|
|
2930
2946
|
return l !== r || u < n || u > o ? s(a) : s({
|
|
@@ -2945,48 +2961,48 @@ let or = class extends sn {
|
|
|
2945
2961
|
(t = this._filterRangeShape) == null || t.dispose(), this._filterButtonShapes.forEach((n) => n.dispose()), (r = this._buttonRenderDisposable) == null || r.dispose(), this._filterRangeShape = null, this._buttonRenderDisposable = null, this._filterButtonShapes = [];
|
|
2946
2962
|
}
|
|
2947
2963
|
};
|
|
2948
|
-
or =
|
|
2949
|
-
pe(1,
|
|
2950
|
-
pe(2,
|
|
2951
|
-
pe(3,
|
|
2952
|
-
pe(4,
|
|
2953
|
-
pe(5,
|
|
2954
|
-
pe(6,
|
|
2955
|
-
pe(7,
|
|
2956
|
-
pe(8,
|
|
2957
|
-
pe(9,
|
|
2964
|
+
or = _a([
|
|
2965
|
+
pe(1, x(Pt)),
|
|
2966
|
+
pe(2, x(ji)),
|
|
2967
|
+
pe(3, x(ae)),
|
|
2968
|
+
pe(4, x(ln)),
|
|
2969
|
+
pe(5, x(no)),
|
|
2970
|
+
pe(6, x(ki)),
|
|
2971
|
+
pe(7, se),
|
|
2972
|
+
pe(8, Sn),
|
|
2973
|
+
pe(9, zi)
|
|
2958
2974
|
], or);
|
|
2959
|
-
var
|
|
2960
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
2975
|
+
var ya = Object.defineProperty, ba = Object.getOwnPropertyDescriptor, Ta = (e, t, r, n) => {
|
|
2976
|
+
for (var o = n > 1 ? void 0 : n ? ba(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2961
2977
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2962
|
-
return n && o &&
|
|
2963
|
-
},
|
|
2964
|
-
const
|
|
2965
|
-
let
|
|
2966
|
-
constructor(t, r, n, o, a, i, s, l, u, c,
|
|
2978
|
+
return n && o && ya(t, r, o), o;
|
|
2979
|
+
}, ne = (e, t) => (r, n) => t(r, n, e);
|
|
2980
|
+
const Ra = {}, sn = "FILTER_PANEL_POPUP";
|
|
2981
|
+
let et = class extends un {
|
|
2982
|
+
constructor(t, r, n, o, a, i, s, l, u, c, h, m, f) {
|
|
2967
2983
|
super();
|
|
2968
|
-
|
|
2969
|
-
this._config = t, this._injector = r, this._componentManager = n, this._sheetsFilterPanelService = o, this._sheetCanvasPopupService = a, this._sheetsFilterService = i, this._localeService = s, this._renderManagerService = l, this._shortcutService = u, this._commandService = c, this._menuService =
|
|
2984
|
+
N(this, "_popupDisposable");
|
|
2985
|
+
this._config = t, this._injector = r, this._componentManager = n, this._sheetsFilterPanelService = o, this._sheetCanvasPopupService = a, this._sheetsFilterService = i, this._localeService = s, this._renderManagerService = l, this._shortcutService = u, this._commandService = c, this._menuService = h, this._contextService = m, this._messageService = f, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI(), this._initRenderControllers();
|
|
2970
2986
|
}
|
|
2971
2987
|
dispose() {
|
|
2972
2988
|
super.dispose(), this._closeFilterPopup();
|
|
2973
2989
|
}
|
|
2974
2990
|
_initShortcuts() {
|
|
2975
2991
|
[
|
|
2976
|
-
|
|
2992
|
+
la
|
|
2977
2993
|
].forEach((t) => {
|
|
2978
2994
|
this.disposeWithMe(this._shortcutService.registerShortcut(t));
|
|
2979
2995
|
});
|
|
2980
2996
|
}
|
|
2981
2997
|
_initCommands() {
|
|
2982
2998
|
[
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
Rn,
|
|
2986
|
-
On,
|
|
2999
|
+
We,
|
|
3000
|
+
$e,
|
|
2987
3001
|
Cn,
|
|
3002
|
+
Pn,
|
|
3003
|
+
In,
|
|
2988
3004
|
pr,
|
|
2989
|
-
|
|
3005
|
+
Ke
|
|
2990
3006
|
].forEach((t) => {
|
|
2991
3007
|
this.disposeWithMe(this._commandService.registerCommand(t));
|
|
2992
3008
|
});
|
|
@@ -2994,25 +3010,25 @@ let tt = class extends sn {
|
|
|
2994
3010
|
_initMenuItems() {
|
|
2995
3011
|
const { menu: t = {} } = this._config;
|
|
2996
3012
|
[
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3013
|
+
ua,
|
|
3014
|
+
ca,
|
|
3015
|
+
fa
|
|
3000
3016
|
].forEach((r) => {
|
|
3001
3017
|
this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(r), t));
|
|
3002
3018
|
});
|
|
3003
3019
|
}
|
|
3004
3020
|
_initUI() {
|
|
3005
|
-
this.disposeWithMe(this._componentManager.register(
|
|
3021
|
+
this.disposeWithMe(this._componentManager.register(sn, sa)), this.disposeWithMe(this._componentManager.register("FilterSingle", Fn)), this.disposeWithMe(this._contextService.subscribeContextValue$(xe).pipe(Di()).subscribe((t) => {
|
|
3006
3022
|
t ? this._openFilterPopup() : this._closeFilterPopup();
|
|
3007
3023
|
})), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((t) => {
|
|
3008
3024
|
t && this._messageService.show({
|
|
3009
|
-
type:
|
|
3025
|
+
type: En.Error,
|
|
3010
3026
|
content: this._localeService.t(t)
|
|
3011
3027
|
});
|
|
3012
3028
|
}));
|
|
3013
3029
|
}
|
|
3014
3030
|
_initRenderControllers() {
|
|
3015
|
-
this.disposeWithMe(this._renderManagerService.registerRenderController(
|
|
3031
|
+
this.disposeWithMe(this._renderManagerService.registerRenderController(Be.UNIVER_SHEET, or));
|
|
3016
3032
|
}
|
|
3017
3033
|
_openFilterPopup() {
|
|
3018
3034
|
const t = this._sheetsFilterPanelService.filterModel;
|
|
@@ -3020,10 +3036,10 @@ let tt = class extends sn {
|
|
|
3020
3036
|
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
3021
3037
|
const r = t.getRange(), n = this._sheetsFilterPanelService.col, { startRow: o } = r;
|
|
3022
3038
|
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(o, n, {
|
|
3023
|
-
componentKey:
|
|
3039
|
+
componentKey: sn,
|
|
3024
3040
|
direction: "horizontal",
|
|
3025
3041
|
closeOnSelfTarget: !0,
|
|
3026
|
-
onClickOutside: () => this._commandService.syncExecuteCommand(
|
|
3042
|
+
onClickOutside: () => this._commandService.syncExecuteCommand(Ke.id),
|
|
3027
3043
|
offset: [5, 0]
|
|
3028
3044
|
});
|
|
3029
3045
|
}
|
|
@@ -3032,27 +3048,27 @@ let tt = class extends sn {
|
|
|
3032
3048
|
(t = this._popupDisposable) == null || t.dispose(), this._popupDisposable = null;
|
|
3033
3049
|
}
|
|
3034
3050
|
};
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
],
|
|
3050
|
-
var
|
|
3051
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
3051
|
+
et = Ta([
|
|
3052
|
+
cn(fn.Ready, et),
|
|
3053
|
+
ne(1, x(Pt)),
|
|
3054
|
+
ne(2, x(Pi)),
|
|
3055
|
+
ne(3, x(be)),
|
|
3056
|
+
ne(4, x(Qi)),
|
|
3057
|
+
ne(5, x(ae)),
|
|
3058
|
+
ne(6, x(Re)),
|
|
3059
|
+
ne(7, Sn),
|
|
3060
|
+
ne(8, Ni),
|
|
3061
|
+
ne(9, se),
|
|
3062
|
+
ne(10, Ii),
|
|
3063
|
+
ne(11, Ct),
|
|
3064
|
+
ne(12, pn)
|
|
3065
|
+
], et);
|
|
3066
|
+
var Oa = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, Ca = (e, t, r, n) => {
|
|
3067
|
+
for (var o = n > 1 ? void 0 : n ? Fa(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
3052
3068
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3053
|
-
return n && o &&
|
|
3054
|
-
},
|
|
3055
|
-
let
|
|
3069
|
+
return n && o && Oa(t, r, o), o;
|
|
3070
|
+
}, dt = (e, t) => (r, n) => t(r, n, e);
|
|
3071
|
+
let gt = class extends Ft {
|
|
3056
3072
|
constructor(e, t, r, n) {
|
|
3057
3073
|
super(), this._sheetsFilterService = e, this._localeService = t, this._commandService = r, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
|
|
3058
3074
|
}
|
|
@@ -3060,15 +3076,15 @@ let pt = class extends Rt {
|
|
|
3060
3076
|
this.disposeWithMe(
|
|
3061
3077
|
this._commandService.beforeCommandExecuted((e) => {
|
|
3062
3078
|
var t;
|
|
3063
|
-
if (e.id ===
|
|
3079
|
+
if (e.id === We.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithoutRange({
|
|
3064
3080
|
workbookTypes: [Xt],
|
|
3065
|
-
rangeTypes: [
|
|
3081
|
+
rangeTypes: [Vr],
|
|
3066
3082
|
worksheetTypes: [Kt, Zt]
|
|
3067
3083
|
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr"))), e.id === pr.id) {
|
|
3068
|
-
const r = e.params, { unitId: n, subUnitId: o } = r, a = (t = this._sheetsFilterService.getFilterModel(n, o)) == null ? void 0 : t.getRange(), i =
|
|
3084
|
+
const r = e.params, { unitId: n, subUnitId: o } = r, a = (t = this._sheetsFilterService.getFilterModel(n, o)) == null ? void 0 : t.getRange(), i = hn.deepClone(a);
|
|
3069
3085
|
i && (i.startColumn = r.col, i.endColumn = r.col, this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
3070
3086
|
workbookTypes: [Xt],
|
|
3071
|
-
rangeTypes: [
|
|
3087
|
+
rangeTypes: [Vr],
|
|
3072
3088
|
worksheetTypes: [Kt, Zt]
|
|
3073
3089
|
}, [i]) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr")));
|
|
3074
3090
|
}
|
|
@@ -3076,44 +3092,44 @@ let pt = class extends Rt {
|
|
|
3076
3092
|
);
|
|
3077
3093
|
}
|
|
3078
3094
|
};
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
],
|
|
3086
|
-
var
|
|
3087
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
3095
|
+
gt = Ca([
|
|
3096
|
+
cn(fn.Ready, gt),
|
|
3097
|
+
dt(0, x(ae)),
|
|
3098
|
+
dt(1, x(Re)),
|
|
3099
|
+
dt(2, se),
|
|
3100
|
+
dt(3, x(Gi))
|
|
3101
|
+
], gt);
|
|
3102
|
+
var Xn = Object.defineProperty, Pa = Object.getOwnPropertyDescriptor, Na = (e, t, r) => t in e ? Xn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ia = (e, t, r, n) => {
|
|
3103
|
+
for (var o = n > 1 ? void 0 : n ? Pa(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
3088
3104
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3089
|
-
return n && o &&
|
|
3090
|
-
},
|
|
3091
|
-
const
|
|
3092
|
-
let
|
|
3105
|
+
return n && o && Xn(t, r, o), o;
|
|
3106
|
+
}, an = (e, t) => (r, n) => t(r, n, e), Kn = (e, t, r) => (Na(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
3107
|
+
const wa = "SHEET_FILTER_UI_PLUGIN";
|
|
3108
|
+
let Ot = class extends Ei {
|
|
3093
3109
|
constructor(e = {}, t, r) {
|
|
3094
|
-
super(), this._config = e, this._injector = t, this._localeService = r, this._config =
|
|
3110
|
+
super(), this._config = e, this._injector = t, this._localeService = r, this._config = hn.deepMerge({}, Ra, this._config);
|
|
3095
3111
|
}
|
|
3096
3112
|
onStarting(e) {
|
|
3097
3113
|
[
|
|
3098
3114
|
[be],
|
|
3099
|
-
[
|
|
3115
|
+
[gt],
|
|
3100
3116
|
[
|
|
3101
|
-
|
|
3117
|
+
et,
|
|
3102
3118
|
{
|
|
3103
|
-
useFactory: () => this._injector.createInstance(
|
|
3119
|
+
useFactory: () => this._injector.createInstance(et, this._config)
|
|
3104
3120
|
}
|
|
3105
3121
|
]
|
|
3106
3122
|
].forEach((t) => e.add(t));
|
|
3107
3123
|
}
|
|
3108
3124
|
};
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
],
|
|
3116
|
-
const
|
|
3125
|
+
Kn(Ot, "type", Be.UNIVER_SHEET);
|
|
3126
|
+
Kn(Ot, "pluginName", wa);
|
|
3127
|
+
Ot = Ia([
|
|
3128
|
+
yi(Ri),
|
|
3129
|
+
an(1, x(Pt)),
|
|
3130
|
+
an(2, x(Re))
|
|
3131
|
+
], Ot);
|
|
3132
|
+
const Ma = {
|
|
3117
3133
|
"sheets-filter": {
|
|
3118
3134
|
toolbar: {
|
|
3119
3135
|
"smart-toggle-filter-tooltip": "筛选",
|
|
@@ -3165,10 +3181,10 @@ const Fa = {
|
|
|
3165
3181
|
"filter-header-forbidden": "无法移动筛选行头"
|
|
3166
3182
|
}
|
|
3167
3183
|
}
|
|
3168
|
-
},
|
|
3184
|
+
}, Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3169
3185
|
__proto__: null,
|
|
3170
|
-
default:
|
|
3171
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3186
|
+
default: Ma
|
|
3187
|
+
}, Symbol.toStringTag, { value: "Module" })), Aa = {
|
|
3172
3188
|
"sheets-filter": {
|
|
3173
3189
|
toolbar: {
|
|
3174
3190
|
"smart-toggle-filter-tooltip": "Toggle Filter",
|
|
@@ -3220,10 +3236,10 @@ const Fa = {
|
|
|
3220
3236
|
"filter-header-forbidden": "You can't move the header row of a filter."
|
|
3221
3237
|
}
|
|
3222
3238
|
}
|
|
3223
|
-
},
|
|
3239
|
+
}, qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3224
3240
|
__proto__: null,
|
|
3225
|
-
default:
|
|
3226
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3241
|
+
default: Aa
|
|
3242
|
+
}, Symbol.toStringTag, { value: "Module" })), La = {
|
|
3227
3243
|
"sheets-filter": {
|
|
3228
3244
|
toolbar: {
|
|
3229
3245
|
"smart-toggle-filter-tooltip": "Переключить фильтр",
|
|
@@ -3275,15 +3291,15 @@ const Fa = {
|
|
|
3275
3291
|
"filter-header-forbidden": "Вы не можете переместить строку заголовка фильтра."
|
|
3276
3292
|
}
|
|
3277
3293
|
}
|
|
3278
|
-
},
|
|
3294
|
+
}, Xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3279
3295
|
__proto__: null,
|
|
3280
|
-
default:
|
|
3296
|
+
default: La
|
|
3281
3297
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3282
3298
|
export {
|
|
3283
3299
|
pr as OpenFilterPanelOperation,
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3300
|
+
We as SmartToggleSheetsFilterCommand,
|
|
3301
|
+
Ot as UniverSheetsFilterUIPlugin,
|
|
3302
|
+
qa as enUS,
|
|
3303
|
+
Xa as ruRU,
|
|
3304
|
+
Ya as zhCN
|
|
3289
3305
|
};
|