@univerjs/sheets-filter-ui 0.1.13 → 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 +1261 -1233
- package/lib/types/controllers/sheets-filter-render.controller.d.ts +5 -5
- package/lib/umd/index.js +4 -4
- package/package.json +40 -25
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 {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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,122 +49,122 @@ function Zi(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
|
|
112
|
-
id:
|
|
111
|
+
const h = u.getFilterColumn(s), m = po(a, i, s, h), f = {
|
|
112
|
+
id: De.id,
|
|
113
113
|
params: {
|
|
114
114
|
unitId: a,
|
|
115
115
|
subUnitId: i,
|
|
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
|
-
id:
|
|
153
|
+
id: lr.id,
|
|
154
154
|
params: {
|
|
155
155
|
unitId: e,
|
|
156
156
|
subUnitId: t,
|
|
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) => {
|
|
166
166
|
const i = {
|
|
167
|
-
id:
|
|
167
|
+
id: De.id,
|
|
168
168
|
params: {
|
|
169
169
|
unitId: e,
|
|
170
170
|
subUnitId: t,
|
|
@@ -175,12 +175,12 @@ function On(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) => {
|
|
182
182
|
const i = {
|
|
183
|
-
id:
|
|
183
|
+
id: De.id,
|
|
184
184
|
params: {
|
|
185
185
|
unitId: e,
|
|
186
186
|
subUnitId: t,
|
|
@@ -191,10 +191,10 @@ function no(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
|
-
id:
|
|
197
|
+
id: De.id,
|
|
198
198
|
params: {
|
|
199
199
|
unitId: e,
|
|
200
200
|
subUnitId: t,
|
|
@@ -204,7 +204,7 @@ function io(e, t, r, n) {
|
|
|
204
204
|
};
|
|
205
205
|
const o = n.serialize();
|
|
206
206
|
return {
|
|
207
|
-
id:
|
|
207
|
+
id: De.id,
|
|
208
208
|
params: {
|
|
209
209
|
unitId: e,
|
|
210
210
|
subUnitId: t,
|
|
@@ -213,12 +213,12 @@ function io(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
220
|
operator: P.NONE,
|
|
221
|
-
order:
|
|
221
|
+
order: j.SECOND,
|
|
222
222
|
numOfParameters: 0,
|
|
223
223
|
getDefaultFormParams: () => {
|
|
224
224
|
throw new Error("[FilterConditionItems.NONE]: should not have initial form params!");
|
|
@@ -229,7 +229,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
229
229
|
}, e.EMPTY = {
|
|
230
230
|
label: "sheets-filter.conditions.empty",
|
|
231
231
|
operator: P.EMPTY,
|
|
232
|
-
order:
|
|
232
|
+
order: j.SECOND,
|
|
233
233
|
numOfParameters: 0,
|
|
234
234
|
getDefaultFormParams: () => {
|
|
235
235
|
throw new Error("[FilterConditionItems.EMPTY]: should not have initial form params!");
|
|
@@ -246,7 +246,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
246
246
|
}, e.NOT_EMPTY = {
|
|
247
247
|
label: "sheets-filter.conditions.not-empty",
|
|
248
248
|
operator: P.NOT_EMPTY,
|
|
249
|
-
order:
|
|
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!");
|
|
@@ -263,11 +263,11 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
263
263
|
}, e.TEXT_CONTAINS = {
|
|
264
264
|
label: "sheets-filter.conditions.text-contains",
|
|
265
265
|
operator: P.CONTAINS,
|
|
266
|
-
order:
|
|
266
|
+
order: j.FIRST,
|
|
267
267
|
numOfParameters: 1,
|
|
268
268
|
getDefaultFormParams: () => ({ operator1: P.CONTAINS, val1: "" }),
|
|
269
269
|
testMappingParams: (i) => {
|
|
270
|
-
const [s] =
|
|
270
|
+
const [s] = ce(i);
|
|
271
271
|
return s === P.CONTAINS;
|
|
272
272
|
},
|
|
273
273
|
mapToFilterColumn: (i) => {
|
|
@@ -286,14 +286,14 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
286
286
|
}, e.DOES_NOT_CONTAIN = {
|
|
287
287
|
label: "sheets-filter.conditions.does-not-contain",
|
|
288
288
|
operator: P.DOES_NOT_CONTAIN,
|
|
289
|
-
order:
|
|
289
|
+
order: j.FIRST,
|
|
290
290
|
numOfParameters: 1,
|
|
291
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
|
-
const [s] =
|
|
296
|
+
const [s] = ce(i);
|
|
297
297
|
return s === P.DOES_NOT_CONTAIN;
|
|
298
298
|
},
|
|
299
299
|
testMappingFilterColumn: (i) => {
|
|
@@ -306,14 +306,14 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
306
306
|
}, e.STARTS_WITH = {
|
|
307
307
|
label: "sheets-filter.conditions.starts-with",
|
|
308
308
|
operator: P.STARTS_WITH,
|
|
309
|
-
order:
|
|
309
|
+
order: j.FIRST,
|
|
310
310
|
numOfParameters: 1,
|
|
311
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
|
-
const [s] =
|
|
316
|
+
const [s] = ce(i);
|
|
317
317
|
return s === P.STARTS_WITH;
|
|
318
318
|
},
|
|
319
319
|
testMappingFilterColumn: (i) => {
|
|
@@ -326,14 +326,14 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
326
326
|
}, e.ENDS_WITH = {
|
|
327
327
|
label: "sheets-filter.conditions.ends-with",
|
|
328
328
|
operator: P.ENDS_WITH,
|
|
329
|
-
order:
|
|
329
|
+
order: j.FIRST,
|
|
330
330
|
numOfParameters: 1,
|
|
331
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
|
-
const [s] =
|
|
336
|
+
const [s] = ce(i);
|
|
337
337
|
return s === P.ENDS_WITH;
|
|
338
338
|
},
|
|
339
339
|
testMappingFilterColumn: (i) => {
|
|
@@ -346,11 +346,11 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
346
346
|
}, e.EQUALS = {
|
|
347
347
|
label: "sheets-filter.conditions.equals",
|
|
348
348
|
operator: P.EQUALS,
|
|
349
|
-
order:
|
|
349
|
+
order: j.FIRST,
|
|
350
350
|
numOfParameters: 1,
|
|
351
351
|
getDefaultFormParams: () => ({ operator1: P.EQUALS, val1: "" }),
|
|
352
352
|
testMappingParams: (i) => {
|
|
353
|
-
const [s] =
|
|
353
|
+
const [s] = ce(i);
|
|
354
354
|
return s === P.EQUALS;
|
|
355
355
|
},
|
|
356
356
|
mapToFilterColumn: (i) => {
|
|
@@ -367,13 +367,13 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
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 }] }
|
|
374
374
|
}),
|
|
375
375
|
testMappingParams: (i) => {
|
|
376
|
-
const [s] =
|
|
376
|
+
const [s] = ce(i);
|
|
377
377
|
return s === p.GREATER_THAN;
|
|
378
378
|
},
|
|
379
379
|
testMappingFilterColumn: (i) => {
|
|
@@ -387,10 +387,10 @@ 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
|
-
const [s] =
|
|
393
|
+
const [s] = ce(i);
|
|
394
394
|
return s === p.GREATER_THAN_OR_EQUAL;
|
|
395
395
|
},
|
|
396
396
|
mapToFilterColumn: (i) => ({
|
|
@@ -407,10 +407,10 @@ 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
|
-
const [s] =
|
|
413
|
+
const [s] = ce(i);
|
|
414
414
|
return s === p.LESS_THAN;
|
|
415
415
|
},
|
|
416
416
|
mapToFilterColumn: (i) => ({
|
|
@@ -427,10 +427,10 @@ 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
|
-
const [s] =
|
|
433
|
+
const [s] = ce(i);
|
|
434
434
|
return s === p.LESS_THAN_OR_EQUAL;
|
|
435
435
|
},
|
|
436
436
|
mapToFilterColumn: (i) => ({
|
|
@@ -447,10 +447,10 @@ 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
|
-
const [s] =
|
|
453
|
+
const [s] = ce(i);
|
|
454
454
|
return s === p.EQUAL;
|
|
455
455
|
},
|
|
456
456
|
mapToFilterColumn: (i) => ({
|
|
@@ -467,10 +467,10 @@ 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
|
-
const [s] =
|
|
473
|
+
const [s] = ce(i);
|
|
474
474
|
return s === p.NOT_EQUALS;
|
|
475
475
|
},
|
|
476
476
|
mapToFilterColumn: (i) => ({
|
|
@@ -486,7 +486,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
486
486
|
}, e.BETWEEN = {
|
|
487
487
|
label: "sheets-filter.conditions.between",
|
|
488
488
|
operator: P.BETWEEN,
|
|
489
|
-
order:
|
|
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 }
|
|
@@ -536,7 +536,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
536
536
|
}, e.NOT_BETWEEN = {
|
|
537
537
|
label: "sheets-filter.conditions.not-between",
|
|
538
538
|
operator: P.NOT_BETWEEN,
|
|
539
|
-
order:
|
|
539
|
+
order: j.SECOND,
|
|
540
540
|
numOfParameters: 2,
|
|
541
541
|
getDefaultFormParams: () => ({
|
|
542
542
|
operator1: p.LESS_THAN,
|
|
@@ -582,7 +582,7 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
582
582
|
}, e.CUSTOM = {
|
|
583
583
|
label: "sheets-filter.conditions.custom",
|
|
584
584
|
operator: P.CUSTOM,
|
|
585
|
-
order:
|
|
585
|
+
order: j.SECOND,
|
|
586
586
|
numOfParameters: 2,
|
|
587
587
|
getDefaultFormParams: () => ({
|
|
588
588
|
operator1: P.NONE,
|
|
@@ -592,26 +592,26 @@ var V = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
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,8 +686,8 @@ 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
|
-
})(
|
|
690
|
-
function
|
|
689
|
+
})(T || (T = {}));
|
|
690
|
+
function ce(e) {
|
|
691
691
|
const { operator1: t, operator2: r, val1: n, val2: o } = e;
|
|
692
692
|
if (t && r)
|
|
693
693
|
throw new Error("Both operator1 and operator2 are set!");
|
|
@@ -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 _t = 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 _t = 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 _t = 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 _t = 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 _t = 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 St = 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 St = 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 St = 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 St = 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 St = 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 $o(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 Vr(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 Uo(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 jr(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 Pn = { 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 Nn = { 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,109 +1426,124 @@ function oe(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
|
|
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
|
|
1501
|
+
function vt(e) {
|
|
1502
|
+
var t = is(e);
|
|
1503
|
+
if (t)
|
|
1504
|
+
return t;
|
|
1505
|
+
if (e instanceof R.Component) {
|
|
1506
|
+
var r;
|
|
1507
|
+
return (r = jr.findDOMNode) === null || r === void 0 ? void 0 : r.call(jr, e);
|
|
1508
|
+
}
|
|
1509
|
+
return null;
|
|
1510
|
+
}
|
|
1511
|
+
function os(e, t, r) {
|
|
1512
|
+
var n = d.useRef({});
|
|
1502
1513
|
return (!("value" in n.current) || r(n.current.condition, t)) && (n.current.value = e(), n.current.condition = t), n.current.value;
|
|
1503
1514
|
}
|
|
1504
|
-
var
|
|
1505
|
-
typeof t == "function" ? t(r) :
|
|
1506
|
-
},
|
|
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() {
|
|
1507
1518
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1508
1519
|
r[n] = arguments[n];
|
|
1509
1520
|
var o = r.filter(Boolean);
|
|
1510
1521
|
return o.length <= 1 ? o[0] : function(a) {
|
|
1511
1522
|
r.forEach(function(i) {
|
|
1512
|
-
|
|
1523
|
+
ss(i, a);
|
|
1513
1524
|
});
|
|
1514
1525
|
};
|
|
1515
|
-
},
|
|
1526
|
+
}, ls = function() {
|
|
1516
1527
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1517
1528
|
r[n] = arguments[n];
|
|
1518
|
-
return
|
|
1519
|
-
return
|
|
1529
|
+
return os(function() {
|
|
1530
|
+
return as.apply(void 0, r);
|
|
1520
1531
|
}, r, function(o, a) {
|
|
1521
1532
|
return o.length !== a.length || o.every(function(i, s) {
|
|
1522
1533
|
return i !== a[s];
|
|
1523
1534
|
});
|
|
1524
1535
|
});
|
|
1525
|
-
},
|
|
1526
|
-
var r, n, o =
|
|
1527
|
-
return !(typeof o == "function" && !((r = o.prototype) !== null && r !== void 0 && r.render) && o.$$typeof !==
|
|
1528
|
-
}
|
|
1529
|
-
function
|
|
1530
|
-
|
|
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) {
|
|
1531
1547
|
n.current += 1;
|
|
1532
1548
|
var c = n.current;
|
|
1533
1549
|
o.current.push({
|
|
@@ -1538,11 +1554,11 @@ function es(e) {
|
|
|
1538
1554
|
c === n.current && (r == null || r(o.current), o.current = []);
|
|
1539
1555
|
}), a == null || a(s, l, u);
|
|
1540
1556
|
}, [r, a]);
|
|
1541
|
-
return /* @__PURE__ */
|
|
1557
|
+
return /* @__PURE__ */ d.createElement(tr.Provider, {
|
|
1542
1558
|
value: i
|
|
1543
1559
|
}, t);
|
|
1544
1560
|
}
|
|
1545
|
-
var
|
|
1561
|
+
var $n = function() {
|
|
1546
1562
|
if (typeof Map < "u")
|
|
1547
1563
|
return Map;
|
|
1548
1564
|
function e(t, r) {
|
|
@@ -1588,27 +1604,27 @@ var In = function() {
|
|
|
1588
1604
|
}, t;
|
|
1589
1605
|
}()
|
|
1590
1606
|
);
|
|
1591
|
-
}(), rr = typeof window < "u" && typeof document < "u" && window.document === document,
|
|
1607
|
+
}(), rr = typeof window < "u" && typeof document < "u" && window.document === document, bt = function() {
|
|
1592
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")();
|
|
1593
|
-
}(),
|
|
1594
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
1609
|
+
}(), fs = function() {
|
|
1610
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(bt) : function(e) {
|
|
1595
1611
|
return setTimeout(function() {
|
|
1596
1612
|
return e(Date.now());
|
|
1597
1613
|
}, 1e3 / 60);
|
|
1598
1614
|
};
|
|
1599
|
-
}(),
|
|
1600
|
-
function
|
|
1615
|
+
}(), hs = 2;
|
|
1616
|
+
function ds(e, t) {
|
|
1601
1617
|
var r = !1, n = !1, o = 0;
|
|
1602
1618
|
function a() {
|
|
1603
1619
|
r && (r = !1, e()), n && s();
|
|
1604
1620
|
}
|
|
1605
1621
|
function i() {
|
|
1606
|
-
|
|
1622
|
+
fs(a);
|
|
1607
1623
|
}
|
|
1608
1624
|
function s() {
|
|
1609
1625
|
var l = Date.now();
|
|
1610
1626
|
if (r) {
|
|
1611
|
-
if (l - o <
|
|
1627
|
+
if (l - o < hs)
|
|
1612
1628
|
return;
|
|
1613
1629
|
n = !0;
|
|
1614
1630
|
} else
|
|
@@ -1617,11 +1633,11 @@ function ns(e, t) {
|
|
|
1617
1633
|
}
|
|
1618
1634
|
return s;
|
|
1619
1635
|
}
|
|
1620
|
-
var
|
|
1636
|
+
var ms = 20, ps = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], vs = typeof MutationObserver < "u", gs = (
|
|
1621
1637
|
/** @class */
|
|
1622
1638
|
function() {
|
|
1623
1639
|
function e() {
|
|
1624
|
-
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);
|
|
1625
1641
|
}
|
|
1626
1642
|
return e.prototype.addObserver = function(t) {
|
|
1627
1643
|
~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
|
|
@@ -1639,7 +1655,7 @@ var is = 20, os = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1639
1655
|
return r.broadcastActive();
|
|
1640
1656
|
}), t.length > 0;
|
|
1641
1657
|
}, e.prototype.connect_ = function() {
|
|
1642
|
-
!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, {
|
|
1643
1659
|
attributes: !0,
|
|
1644
1660
|
childList: !0,
|
|
1645
1661
|
characterData: !0,
|
|
@@ -1648,7 +1664,7 @@ var is = 20, os = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1648
1664
|
}, e.prototype.disconnect_ = function() {
|
|
1649
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);
|
|
1650
1666
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
1651
|
-
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) {
|
|
1652
1668
|
return !!~n.indexOf(a);
|
|
1653
1669
|
});
|
|
1654
1670
|
o && this.refresh();
|
|
@@ -1656,7 +1672,7 @@ var is = 20, os = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1656
1672
|
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
1657
1673
|
}, e.instance_ = null, e;
|
|
1658
1674
|
}()
|
|
1659
|
-
),
|
|
1675
|
+
), Dn = function(e, t) {
|
|
1660
1676
|
for (var r = 0, n = Object.keys(t); r < n.length; r++) {
|
|
1661
1677
|
var o = n[r];
|
|
1662
1678
|
Object.defineProperty(e, o, {
|
|
@@ -1667,59 +1683,59 @@ var is = 20, os = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1667
1683
|
});
|
|
1668
1684
|
}
|
|
1669
1685
|
return e;
|
|
1670
|
-
},
|
|
1686
|
+
}, Ue = function(e) {
|
|
1671
1687
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
1672
|
-
return t ||
|
|
1673
|
-
},
|
|
1674
|
-
function
|
|
1688
|
+
return t || bt;
|
|
1689
|
+
}, Hn = Ut(0, 0, 0, 0);
|
|
1690
|
+
function Tt(e) {
|
|
1675
1691
|
return parseFloat(e) || 0;
|
|
1676
1692
|
}
|
|
1677
|
-
function
|
|
1693
|
+
function qr(e) {
|
|
1678
1694
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
1679
1695
|
t[r - 1] = arguments[r];
|
|
1680
1696
|
return t.reduce(function(n, o) {
|
|
1681
1697
|
var a = e["border-" + o + "-width"];
|
|
1682
|
-
return n +
|
|
1698
|
+
return n + Tt(a);
|
|
1683
1699
|
}, 0);
|
|
1684
1700
|
}
|
|
1685
|
-
function
|
|
1701
|
+
function _s(e) {
|
|
1686
1702
|
for (var t = ["top", "right", "bottom", "left"], r = {}, n = 0, o = t; n < o.length; n++) {
|
|
1687
1703
|
var a = o[n], i = e["padding-" + a];
|
|
1688
|
-
r[a] =
|
|
1704
|
+
r[a] = Tt(i);
|
|
1689
1705
|
}
|
|
1690
1706
|
return r;
|
|
1691
1707
|
}
|
|
1692
|
-
function
|
|
1708
|
+
function Ss(e) {
|
|
1693
1709
|
var t = e.getBBox();
|
|
1694
|
-
return
|
|
1710
|
+
return Ut(0, 0, t.width, t.height);
|
|
1695
1711
|
}
|
|
1696
|
-
function
|
|
1712
|
+
function Es(e) {
|
|
1697
1713
|
var t = e.clientWidth, r = e.clientHeight;
|
|
1698
1714
|
if (!t && !r)
|
|
1699
|
-
return
|
|
1700
|
-
var n =
|
|
1701
|
-
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)) {
|
|
1702
1718
|
var u = Math.round(s + a) - t, c = Math.round(l + i) - r;
|
|
1703
1719
|
Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
|
|
1704
1720
|
}
|
|
1705
|
-
return
|
|
1721
|
+
return Ut(o.left, o.top, s, l);
|
|
1706
1722
|
}
|
|
1707
|
-
var
|
|
1723
|
+
var ys = /* @__PURE__ */ function() {
|
|
1708
1724
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
1709
|
-
return e instanceof
|
|
1725
|
+
return e instanceof Ue(e).SVGGraphicsElement;
|
|
1710
1726
|
} : function(e) {
|
|
1711
|
-
return e instanceof
|
|
1727
|
+
return e instanceof Ue(e).SVGElement && typeof e.getBBox == "function";
|
|
1712
1728
|
};
|
|
1713
1729
|
}();
|
|
1714
|
-
function
|
|
1715
|
-
return e ===
|
|
1730
|
+
function bs(e) {
|
|
1731
|
+
return e === Ue(e).document.documentElement;
|
|
1716
1732
|
}
|
|
1717
|
-
function
|
|
1718
|
-
return rr ?
|
|
1733
|
+
function Ts(e) {
|
|
1734
|
+
return rr ? ys(e) ? Ss(e) : Es(e) : Hn;
|
|
1719
1735
|
}
|
|
1720
|
-
function
|
|
1736
|
+
function Rs(e) {
|
|
1721
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);
|
|
1722
|
-
return
|
|
1738
|
+
return Dn(i, {
|
|
1723
1739
|
x: t,
|
|
1724
1740
|
y: r,
|
|
1725
1741
|
width: n,
|
|
@@ -1730,37 +1746,37 @@ function ms(e) {
|
|
|
1730
1746
|
left: t
|
|
1731
1747
|
}), i;
|
|
1732
1748
|
}
|
|
1733
|
-
function
|
|
1749
|
+
function Ut(e, t, r, n) {
|
|
1734
1750
|
return { x: e, y: t, width: r, height: n };
|
|
1735
1751
|
}
|
|
1736
|
-
var
|
|
1752
|
+
var Os = (
|
|
1737
1753
|
/** @class */
|
|
1738
1754
|
function() {
|
|
1739
1755
|
function e(t) {
|
|
1740
|
-
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;
|
|
1741
1757
|
}
|
|
1742
1758
|
return e.prototype.isActive = function() {
|
|
1743
|
-
var t =
|
|
1759
|
+
var t = Ts(this.target);
|
|
1744
1760
|
return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
|
|
1745
1761
|
}, e.prototype.broadcastRect = function() {
|
|
1746
1762
|
var t = this.contentRect_;
|
|
1747
1763
|
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
|
|
1748
1764
|
}, e;
|
|
1749
1765
|
}()
|
|
1750
|
-
),
|
|
1766
|
+
), Fs = (
|
|
1751
1767
|
/** @class */
|
|
1752
1768
|
/* @__PURE__ */ function() {
|
|
1753
1769
|
function e(t, r) {
|
|
1754
|
-
var n =
|
|
1755
|
-
|
|
1770
|
+
var n = Rs(r);
|
|
1771
|
+
Dn(this, { target: t, contentRect: n });
|
|
1756
1772
|
}
|
|
1757
1773
|
return e;
|
|
1758
1774
|
}()
|
|
1759
|
-
),
|
|
1775
|
+
), Cs = (
|
|
1760
1776
|
/** @class */
|
|
1761
1777
|
function() {
|
|
1762
1778
|
function e(t, r, n) {
|
|
1763
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
1779
|
+
if (this.activeObservations_ = [], this.observations_ = new $n(), typeof t != "function")
|
|
1764
1780
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
1765
1781
|
this.callback_ = t, this.controller_ = r, this.callbackCtx_ = n;
|
|
1766
1782
|
}
|
|
@@ -1768,16 +1784,16 @@ var ps = (
|
|
|
1768
1784
|
if (!arguments.length)
|
|
1769
1785
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1770
1786
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1771
|
-
if (!(t instanceof
|
|
1787
|
+
if (!(t instanceof Ue(t).Element))
|
|
1772
1788
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1773
1789
|
var r = this.observations_;
|
|
1774
|
-
r.has(t) || (r.set(t, new
|
|
1790
|
+
r.has(t) || (r.set(t, new Os(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
1775
1791
|
}
|
|
1776
1792
|
}, e.prototype.unobserve = function(t) {
|
|
1777
1793
|
if (!arguments.length)
|
|
1778
1794
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1779
1795
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1780
|
-
if (!(t instanceof
|
|
1796
|
+
if (!(t instanceof Ue(t).Element))
|
|
1781
1797
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1782
1798
|
var r = this.observations_;
|
|
1783
1799
|
r.has(t) && (r.delete(t), r.size || this.controller_.removeObserver(this));
|
|
@@ -1792,7 +1808,7 @@ var ps = (
|
|
|
1792
1808
|
}, e.prototype.broadcastActive = function() {
|
|
1793
1809
|
if (this.hasActive()) {
|
|
1794
1810
|
var t = this.callbackCtx_, r = this.activeObservations_.map(function(n) {
|
|
1795
|
-
return new
|
|
1811
|
+
return new Fs(n.target, n.broadcastRect());
|
|
1796
1812
|
});
|
|
1797
1813
|
this.callback_.call(t, r, t), this.clearActive();
|
|
1798
1814
|
}
|
|
@@ -1802,7 +1818,7 @@ var ps = (
|
|
|
1802
1818
|
return this.activeObservations_.length > 0;
|
|
1803
1819
|
}, e;
|
|
1804
1820
|
}()
|
|
1805
|
-
),
|
|
1821
|
+
), xn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new $n(), Un = (
|
|
1806
1822
|
/** @class */
|
|
1807
1823
|
/* @__PURE__ */ function() {
|
|
1808
1824
|
function e(t) {
|
|
@@ -1810,8 +1826,8 @@ var ps = (
|
|
|
1810
1826
|
throw new TypeError("Cannot call a class as a function.");
|
|
1811
1827
|
if (!arguments.length)
|
|
1812
1828
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1813
|
-
var r =
|
|
1814
|
-
|
|
1829
|
+
var r = gs.getInstance(), n = new Cs(t, r, this);
|
|
1830
|
+
xn.set(this, n);
|
|
1815
1831
|
}
|
|
1816
1832
|
return e;
|
|
1817
1833
|
}()
|
|
@@ -1821,15 +1837,15 @@ var ps = (
|
|
|
1821
1837
|
"unobserve",
|
|
1822
1838
|
"disconnect"
|
|
1823
1839
|
].forEach(function(e) {
|
|
1824
|
-
|
|
1840
|
+
Un.prototype[e] = function() {
|
|
1825
1841
|
var t;
|
|
1826
|
-
return (t =
|
|
1842
|
+
return (t = xn.get(this))[e].apply(t, arguments);
|
|
1827
1843
|
};
|
|
1828
1844
|
});
|
|
1829
|
-
var
|
|
1830
|
-
return typeof
|
|
1845
|
+
var Ps = function() {
|
|
1846
|
+
return typeof bt.ResizeObserver < "u" ? bt.ResizeObserver : Un;
|
|
1831
1847
|
}(), ye = /* @__PURE__ */ new Map();
|
|
1832
|
-
function
|
|
1848
|
+
function Ns(e) {
|
|
1833
1849
|
e.forEach(function(t) {
|
|
1834
1850
|
var r, n = t.target;
|
|
1835
1851
|
(r = ye.get(n)) === null || r === void 0 || r.forEach(function(o) {
|
|
@@ -1837,34 +1853,34 @@ function Ss(e) {
|
|
|
1837
1853
|
});
|
|
1838
1854
|
});
|
|
1839
1855
|
}
|
|
1840
|
-
var
|
|
1841
|
-
function
|
|
1842
|
-
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);
|
|
1843
1859
|
}
|
|
1844
|
-
function
|
|
1845
|
-
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)));
|
|
1846
1862
|
}
|
|
1847
|
-
function
|
|
1863
|
+
function Wn(e, t) {
|
|
1848
1864
|
if (!(e instanceof t))
|
|
1849
1865
|
throw new TypeError("Cannot call a class as a function");
|
|
1850
1866
|
}
|
|
1851
|
-
function
|
|
1867
|
+
function Ms(e, t) {
|
|
1852
1868
|
for (var r = 0; r < t.length; r++) {
|
|
1853
1869
|
var n = t[r];
|
|
1854
|
-
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);
|
|
1855
1871
|
}
|
|
1856
1872
|
}
|
|
1857
|
-
function
|
|
1858
|
-
return t &&
|
|
1873
|
+
function Vn(e, t, r) {
|
|
1874
|
+
return t && Ms(e.prototype, t), Object.defineProperty(e, "prototype", {
|
|
1859
1875
|
writable: !1
|
|
1860
1876
|
}), e;
|
|
1861
1877
|
}
|
|
1862
1878
|
function nr(e, t) {
|
|
1863
|
-
return nr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
1864
|
-
return
|
|
1879
|
+
return nr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
|
|
1880
|
+
return r.__proto__ = n, r;
|
|
1865
1881
|
}, nr(e, t);
|
|
1866
1882
|
}
|
|
1867
|
-
function
|
|
1883
|
+
function As(e, t) {
|
|
1868
1884
|
if (typeof t != "function" && t !== null)
|
|
1869
1885
|
throw new TypeError("Super expression must either be null or a function");
|
|
1870
1886
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -1877,165 +1893,242 @@ function bs(e, t) {
|
|
|
1877
1893
|
writable: !1
|
|
1878
1894
|
}), t && nr(e, t);
|
|
1879
1895
|
}
|
|
1880
|
-
function
|
|
1881
|
-
return
|
|
1882
|
-
return
|
|
1883
|
-
},
|
|
1896
|
+
function Rt(e) {
|
|
1897
|
+
return Rt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1898
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1899
|
+
}, Rt(e);
|
|
1884
1900
|
}
|
|
1885
|
-
function
|
|
1901
|
+
function jn() {
|
|
1886
1902
|
try {
|
|
1887
1903
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1888
1904
|
}));
|
|
1889
1905
|
} catch {
|
|
1890
1906
|
}
|
|
1891
|
-
return (
|
|
1907
|
+
return (jn = function() {
|
|
1892
1908
|
return !!e;
|
|
1893
1909
|
})();
|
|
1894
1910
|
}
|
|
1895
|
-
function
|
|
1911
|
+
function Ls(e) {
|
|
1896
1912
|
if (e === void 0)
|
|
1897
1913
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1898
1914
|
return e;
|
|
1899
1915
|
}
|
|
1900
|
-
function
|
|
1901
|
-
if (t && (
|
|
1916
|
+
function $s(e, t) {
|
|
1917
|
+
if (t && (oe(t) == "object" || typeof t == "function"))
|
|
1902
1918
|
return t;
|
|
1903
1919
|
if (t !== void 0)
|
|
1904
1920
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
1905
|
-
return
|
|
1921
|
+
return Ls(e);
|
|
1906
1922
|
}
|
|
1907
|
-
function
|
|
1908
|
-
var t =
|
|
1923
|
+
function Ds(e) {
|
|
1924
|
+
var t = jn();
|
|
1909
1925
|
return function() {
|
|
1910
|
-
var n =
|
|
1926
|
+
var r, n = Rt(e);
|
|
1911
1927
|
if (t) {
|
|
1912
|
-
var
|
|
1913
|
-
|
|
1928
|
+
var o = Rt(this).constructor;
|
|
1929
|
+
r = Reflect.construct(n, arguments, o);
|
|
1914
1930
|
} else
|
|
1915
|
-
|
|
1916
|
-
return
|
|
1931
|
+
r = n.apply(this, arguments);
|
|
1932
|
+
return $s(this, r);
|
|
1917
1933
|
};
|
|
1918
1934
|
}
|
|
1919
|
-
var
|
|
1920
|
-
|
|
1921
|
-
var t =
|
|
1935
|
+
var Hs = /* @__PURE__ */ function(e) {
|
|
1936
|
+
As(r, e);
|
|
1937
|
+
var t = Ds(r);
|
|
1922
1938
|
function r() {
|
|
1923
|
-
return
|
|
1939
|
+
return Wn(this, r), t.apply(this, arguments);
|
|
1924
1940
|
}
|
|
1925
|
-
return
|
|
1941
|
+
return Vn(r, [{
|
|
1926
1942
|
key: "render",
|
|
1927
1943
|
value: function() {
|
|
1928
1944
|
return this.props.children;
|
|
1929
1945
|
}
|
|
1930
1946
|
}]), r;
|
|
1931
|
-
}(
|
|
1932
|
-
function
|
|
1933
|
-
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({
|
|
1934
1950
|
width: -1,
|
|
1935
1951
|
height: -1,
|
|
1936
1952
|
offsetWidth: -1,
|
|
1937
1953
|
offsetHeight: -1
|
|
1938
|
-
}), c = !s && /* @__PURE__ */
|
|
1939
|
-
var
|
|
1940
|
-
return
|
|
1941
|
-
(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);
|
|
1942
1958
|
};
|
|
1943
|
-
|
|
1944
|
-
return
|
|
1959
|
+
d.useImperativeHandle(t, function() {
|
|
1960
|
+
return f();
|
|
1945
1961
|
});
|
|
1946
|
-
var
|
|
1947
|
-
|
|
1948
|
-
var
|
|
1949
|
-
var
|
|
1950
|
-
if (u.current.width !==
|
|
1951
|
-
var
|
|
1952
|
-
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,
|
|
1953
1969
|
height: W,
|
|
1954
1970
|
offsetWidth: O,
|
|
1955
1971
|
offsetHeight: L
|
|
1956
1972
|
};
|
|
1957
|
-
u.current =
|
|
1958
|
-
var
|
|
1959
|
-
offsetWidth:
|
|
1960
|
-
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
|
|
1961
1977
|
});
|
|
1962
|
-
i == null || i(
|
|
1963
|
-
|
|
1978
|
+
i == null || i(z, g, C), S && Promise.resolve().then(function() {
|
|
1979
|
+
S(z, g);
|
|
1964
1980
|
});
|
|
1965
1981
|
}
|
|
1966
1982
|
}, []);
|
|
1967
|
-
return
|
|
1968
|
-
var
|
|
1969
|
-
return
|
|
1970
|
-
return
|
|
1983
|
+
return d.useEffect(function() {
|
|
1984
|
+
var g = f();
|
|
1985
|
+
return g && !n && Is(g, v), function() {
|
|
1986
|
+
return ws(g, v);
|
|
1971
1987
|
};
|
|
1972
|
-
}, [o.current, n]), /* @__PURE__ */
|
|
1988
|
+
}, [o.current, n]), /* @__PURE__ */ d.createElement(Hs, {
|
|
1973
1989
|
ref: a
|
|
1974
|
-
}, c ? /* @__PURE__ */
|
|
1975
|
-
ref:
|
|
1990
|
+
}, c ? /* @__PURE__ */ d.cloneElement(l, {
|
|
1991
|
+
ref: m
|
|
1976
1992
|
}) : l);
|
|
1977
1993
|
}
|
|
1978
|
-
var
|
|
1979
|
-
function
|
|
1994
|
+
var Us = /* @__PURE__ */ d.forwardRef(xs), Bs = "rc-observer-key";
|
|
1995
|
+
function Ws(e, t) {
|
|
1980
1996
|
var r = e.children, n = typeof r == "function" ? [r] : er(r);
|
|
1981
1997
|
return n.map(function(o, a) {
|
|
1982
|
-
var i = (o == null ? void 0 : o.key) || "".concat(
|
|
1983
|
-
return /* @__PURE__ */
|
|
1998
|
+
var i = (o == null ? void 0 : o.key) || "".concat(Bs, "-").concat(a);
|
|
1999
|
+
return /* @__PURE__ */ d.createElement(Us, tt({}, e, {
|
|
1984
2000
|
key: i,
|
|
1985
2001
|
ref: a === 0 ? t : void 0
|
|
1986
2002
|
}), o);
|
|
1987
2003
|
});
|
|
1988
2004
|
}
|
|
1989
|
-
var _r = /* @__PURE__ */
|
|
1990
|
-
_r.Collection =
|
|
1991
|
-
|
|
1992
|
-
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 = {
|
|
1993
2031
|
display: "flex",
|
|
1994
2032
|
flexDirection: "column"
|
|
1995
2033
|
};
|
|
1996
|
-
return n !== void 0 && (
|
|
2034
|
+
return n !== void 0 && (h = {
|
|
1997
2035
|
height: r,
|
|
1998
2036
|
position: "relative",
|
|
1999
2037
|
overflow: "hidden"
|
|
2000
|
-
},
|
|
2038
|
+
}, m = G(G({}, m), {}, X(X(X(X(X({
|
|
2001
2039
|
transform: "translateY(".concat(n, "px)")
|
|
2002
|
-
}, u ? "marginRight" : "marginLeft", -o), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */
|
|
2003
|
-
style:
|
|
2004
|
-
}, /* @__PURE__ */
|
|
2005
|
-
onResize: function(
|
|
2006
|
-
var
|
|
2007
|
-
|
|
2008
|
-
}
|
|
2009
|
-
}, /* @__PURE__ */
|
|
2010
|
-
style:
|
|
2011
|
-
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)),
|
|
2012
2050
|
ref: t
|
|
2013
2051
|
}, l), a, c)));
|
|
2014
2052
|
});
|
|
2015
|
-
|
|
2016
|
-
|
|
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) {
|
|
2017
2110
|
return +setTimeout(t, 16);
|
|
2018
|
-
},
|
|
2111
|
+
}, Qn = function(t) {
|
|
2019
2112
|
return clearTimeout(t);
|
|
2020
2113
|
};
|
|
2021
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
2114
|
+
typeof window < "u" && "requestAnimationFrame" in window && (zn = function(t) {
|
|
2022
2115
|
return window.requestAnimationFrame(t);
|
|
2023
|
-
},
|
|
2116
|
+
}, Qn = function(t) {
|
|
2024
2117
|
return window.cancelAnimationFrame(t);
|
|
2025
2118
|
});
|
|
2026
|
-
var
|
|
2027
|
-
function
|
|
2119
|
+
var Zr = 0, Sr = /* @__PURE__ */ new Map();
|
|
2120
|
+
function Gn(e) {
|
|
2028
2121
|
Sr.delete(e);
|
|
2029
2122
|
}
|
|
2030
|
-
var
|
|
2123
|
+
var he = function(t) {
|
|
2031
2124
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
2032
|
-
|
|
2033
|
-
var n =
|
|
2125
|
+
Zr += 1;
|
|
2126
|
+
var n = Zr;
|
|
2034
2127
|
function o(a) {
|
|
2035
2128
|
if (a === 0)
|
|
2036
|
-
|
|
2129
|
+
Gn(n), t();
|
|
2037
2130
|
else {
|
|
2038
|
-
var i =
|
|
2131
|
+
var i = zn(function() {
|
|
2039
2132
|
o(a - 1);
|
|
2040
2133
|
});
|
|
2041
2134
|
Sr.set(n, i);
|
|
@@ -2043,130 +2136,87 @@ var fe = function(t) {
|
|
|
2043
2136
|
}
|
|
2044
2137
|
return o(r), n;
|
|
2045
2138
|
};
|
|
2046
|
-
|
|
2139
|
+
he.cancel = function(e) {
|
|
2047
2140
|
var t = Sr.get(e);
|
|
2048
|
-
return
|
|
2141
|
+
return Gn(e), Qn(t);
|
|
2049
2142
|
};
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
return j * je;
|
|
2064
|
-
}, [o, Y, je]), Fe = function(B) {
|
|
2065
|
-
B.stopPropagation(), B.preventDefault();
|
|
2066
|
-
}, Ie = m.useRef({
|
|
2067
|
-
top: $,
|
|
2068
|
-
dragging: v,
|
|
2069
|
-
pageY: F,
|
|
2070
|
-
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
|
|
2071
2156
|
});
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
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;
|
|
2080
2165
|
};
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
}
|
|
2104
|
-
}, de = function() {
|
|
2105
|
-
S(!1), s();
|
|
2106
|
-
};
|
|
2107
|
-
return window.addEventListener("mousemove", B), window.addEventListener("touchmove", B), window.addEventListener("mouseup", de), window.addEventListener("touchend", de), function() {
|
|
2108
|
-
window.removeEventListener("mousemove", B), window.removeEventListener("touchmove", B), window.removeEventListener("mouseup", de), window.removeEventListener("touchend", de), fe.cancel(j);
|
|
2109
|
-
};
|
|
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);
|
|
2110
2188
|
}
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
|
|
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
|
+
}
|
|
2114
2208
|
return {
|
|
2115
|
-
|
|
2209
|
+
top: s[m - 1] || 0,
|
|
2210
|
+
bottom: s[f]
|
|
2116
2211
|
};
|
|
2117
|
-
});
|
|
2118
|
-
var ge = "".concat(r, "-scrollbar"), ee = {
|
|
2119
|
-
position: "absolute",
|
|
2120
|
-
visibility: we ? null : "hidden"
|
|
2121
|
-
}, le = {
|
|
2122
|
-
position: "absolute",
|
|
2123
|
-
background: "rgba(0, 0, 0, 0.5)",
|
|
2124
|
-
borderRadius: 99,
|
|
2125
|
-
cursor: "pointer",
|
|
2126
|
-
userSelect: "none"
|
|
2127
2212
|
};
|
|
2128
|
-
return
|
|
2129
|
-
ref: X,
|
|
2130
|
-
className: Et(ge, q(q(q({}, "".concat(ge, "-horizontal"), u), "".concat(ge, "-vertical"), !u), "".concat(ge, "-visible"), we)),
|
|
2131
|
-
style: Z(Z({}, ee), d),
|
|
2132
|
-
onMouseDown: Fe,
|
|
2133
|
-
onMouseMove: se
|
|
2134
|
-
}, /* @__PURE__ */ m.createElement("div", {
|
|
2135
|
-
ref: z,
|
|
2136
|
-
className: Et("".concat(ge, "-thumb"), q({}, "".concat(ge, "-thumb-moving"), v)),
|
|
2137
|
-
style: Z(Z({}, le), h),
|
|
2138
|
-
onMouseDown: ke
|
|
2139
|
-
}));
|
|
2140
|
-
});
|
|
2141
|
-
function Is(e) {
|
|
2142
|
-
var t = e.children, r = e.setRef, n = m.useCallback(function(o) {
|
|
2143
|
-
r(o);
|
|
2144
|
-
}, []);
|
|
2145
|
-
return /* @__PURE__ */ m.cloneElement(t, {
|
|
2146
|
-
ref: n
|
|
2147
|
-
});
|
|
2148
|
-
}
|
|
2149
|
-
function Ms(e, t, r, n, o, a, i) {
|
|
2150
|
-
var s = i.getKey;
|
|
2151
|
-
return e.slice(t, r + 1).map(function(l, u) {
|
|
2152
|
-
var c = t + u, f = a(l, c, {
|
|
2153
|
-
style: {
|
|
2154
|
-
width: n
|
|
2155
|
-
}
|
|
2156
|
-
}), d = s(l);
|
|
2157
|
-
return /* @__PURE__ */ m.createElement(Is, {
|
|
2158
|
-
key: d,
|
|
2159
|
-
setRef: function(g) {
|
|
2160
|
-
return o(l, g);
|
|
2161
|
-
}
|
|
2162
|
-
}, f);
|
|
2163
|
-
});
|
|
2213
|
+
return l;
|
|
2164
2214
|
}
|
|
2165
|
-
var
|
|
2215
|
+
var qs = /* @__PURE__ */ function() {
|
|
2166
2216
|
function e() {
|
|
2167
|
-
|
|
2217
|
+
Wn(this, e), X(this, "maps", void 0), X(this, "id", 0), this.maps = /* @__PURE__ */ Object.create(null);
|
|
2168
2218
|
}
|
|
2169
|
-
return
|
|
2219
|
+
return Vn(e, [{
|
|
2170
2220
|
key: "set",
|
|
2171
2221
|
value: function(r, n) {
|
|
2172
2222
|
this.maps[r] = n, this.id += 1;
|
|
@@ -2178,581 +2228,557 @@ var As = /* @__PURE__ */ function() {
|
|
|
2178
2228
|
}
|
|
2179
2229
|
}]), e;
|
|
2180
2230
|
}();
|
|
2181
|
-
function
|
|
2182
|
-
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();
|
|
2183
2233
|
function c() {
|
|
2184
|
-
|
|
2234
|
+
he.cancel(u.current);
|
|
2185
2235
|
}
|
|
2186
|
-
function
|
|
2187
|
-
var
|
|
2236
|
+
function h() {
|
|
2237
|
+
var f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
2188
2238
|
c();
|
|
2189
|
-
var
|
|
2190
|
-
s.current.forEach(function(
|
|
2191
|
-
if (
|
|
2192
|
-
var
|
|
2193
|
-
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);
|
|
2194
2244
|
}
|
|
2195
|
-
}), i(function(
|
|
2196
|
-
return
|
|
2245
|
+
}), i(function(g) {
|
|
2246
|
+
return g + 1;
|
|
2197
2247
|
});
|
|
2198
2248
|
};
|
|
2199
|
-
|
|
2249
|
+
f ? _() : u.current = he(_);
|
|
2200
2250
|
}
|
|
2201
|
-
function
|
|
2202
|
-
var
|
|
2203
|
-
|
|
2251
|
+
function m(f, _) {
|
|
2252
|
+
var v = e(f);
|
|
2253
|
+
s.current.get(v), _ ? (s.current.set(v, _), h()) : s.current.delete(v);
|
|
2204
2254
|
}
|
|
2205
|
-
return
|
|
2255
|
+
return so(function() {
|
|
2206
2256
|
return c;
|
|
2207
|
-
}, []), [
|
|
2208
|
-
}
|
|
2209
|
-
function $s() {
|
|
2210
|
-
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
2257
|
+
}, []), [m, h, l.current, a];
|
|
2211
2258
|
}
|
|
2212
|
-
var
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
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);
|
|
2219
2281
|
};
|
|
2220
|
-
}, []);
|
|
2221
|
-
};
|
|
2222
|
-
function Xr(e) {
|
|
2223
|
-
var t = m.useRef();
|
|
2224
|
-
t.current = e;
|
|
2225
|
-
var r = m.useCallback(function() {
|
|
2226
|
-
for (var n, o = arguments.length, a = new Array(o), i = 0; i < o; i++)
|
|
2227
|
-
a[i] = arguments[i];
|
|
2228
|
-
return (n = t.current) === null || n === void 0 ? void 0 : n.call.apply(n, [t].concat(a));
|
|
2229
|
-
}, []);
|
|
2230
|
-
return r;
|
|
2282
|
+
}, [e]);
|
|
2231
2283
|
}
|
|
2232
|
-
var
|
|
2233
|
-
function
|
|
2234
|
-
var l =
|
|
2235
|
-
return
|
|
2236
|
-
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) {
|
|
2237
2289
|
if (!e.current) {
|
|
2238
|
-
|
|
2239
|
-
return
|
|
2290
|
+
m(function(Y) {
|
|
2291
|
+
return G({}, Y);
|
|
2240
2292
|
});
|
|
2241
2293
|
return;
|
|
2242
2294
|
}
|
|
2243
2295
|
a();
|
|
2244
|
-
var
|
|
2245
|
-
if (
|
|
2246
|
-
for (var
|
|
2247
|
-
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]);
|
|
2248
2300
|
O = A;
|
|
2249
|
-
var
|
|
2250
|
-
L = O + (
|
|
2301
|
+
var k = r.get(K);
|
|
2302
|
+
L = O + (k === void 0 ? n : k), A = L;
|
|
2251
2303
|
}
|
|
2252
|
-
for (var
|
|
2253
|
-
var
|
|
2254
|
-
if (
|
|
2255
|
-
|
|
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;
|
|
2256
2308
|
break;
|
|
2257
2309
|
}
|
|
2258
|
-
if (
|
|
2310
|
+
if (ee -= Z, ee <= 0)
|
|
2259
2311
|
break;
|
|
2260
2312
|
}
|
|
2261
|
-
switch (
|
|
2313
|
+
switch (B) {
|
|
2262
2314
|
case "top":
|
|
2263
|
-
F = O -
|
|
2315
|
+
F = O - g;
|
|
2264
2316
|
break;
|
|
2265
2317
|
case "bottom":
|
|
2266
|
-
F = L -
|
|
2318
|
+
F = L - y + g;
|
|
2267
2319
|
break;
|
|
2268
2320
|
default: {
|
|
2269
|
-
var Oe = e.current.scrollTop,
|
|
2270
|
-
O < Oe ?
|
|
2321
|
+
var Oe = e.current.scrollTop, ue = Oe + y;
|
|
2322
|
+
O < Oe ? C = "top" : L > ue && (C = "bottom");
|
|
2271
2323
|
}
|
|
2272
2324
|
}
|
|
2273
|
-
F !== null && i(F), F !==
|
|
2325
|
+
F !== null && i(F), F !== h.lastTop && (S = !0);
|
|
2274
2326
|
}
|
|
2275
|
-
|
|
2276
|
-
times:
|
|
2277
|
-
targetAlign:
|
|
2327
|
+
S && m(G(G({}, h), {}, {
|
|
2328
|
+
times: h.times + 1,
|
|
2329
|
+
targetAlign: C,
|
|
2278
2330
|
lastTop: F
|
|
2279
2331
|
}));
|
|
2280
2332
|
}
|
|
2281
|
-
}, [
|
|
2282
|
-
if (
|
|
2333
|
+
}, [h, e.current]), function(f) {
|
|
2334
|
+
if (f == null) {
|
|
2283
2335
|
s();
|
|
2284
2336
|
return;
|
|
2285
2337
|
}
|
|
2286
|
-
if (
|
|
2287
|
-
i(
|
|
2288
|
-
else if (
|
|
2289
|
-
var
|
|
2290
|
-
"index" in
|
|
2291
|
-
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;
|
|
2292
2344
|
});
|
|
2293
|
-
var
|
|
2294
|
-
|
|
2345
|
+
var g = f.offset, y = g === void 0 ? 0 : g;
|
|
2346
|
+
m({
|
|
2295
2347
|
times: 0,
|
|
2296
|
-
index:
|
|
2297
|
-
offset:
|
|
2298
|
-
originAlign:
|
|
2348
|
+
index: _,
|
|
2349
|
+
offset: y,
|
|
2350
|
+
originAlign: v
|
|
2299
2351
|
});
|
|
2300
2352
|
}
|
|
2301
2353
|
};
|
|
2302
2354
|
}
|
|
2303
|
-
function
|
|
2304
|
-
var
|
|
2305
|
-
|
|
2306
|
-
return null;
|
|
2307
|
-
n < o ? (a = e, i = t) : (a = t, i = e);
|
|
2308
|
-
var s = {
|
|
2309
|
-
__EMPTY_ITEM__: !0
|
|
2310
|
-
};
|
|
2311
|
-
function l(g) {
|
|
2312
|
-
return g !== void 0 ? r(g) : s;
|
|
2313
|
-
}
|
|
2314
|
-
for (var u = null, c = Math.abs(n - o) !== 1, f = 0; f < i.length; f += 1) {
|
|
2315
|
-
var d = l(a[f]), h = l(i[f]);
|
|
2316
|
-
if (d !== h) {
|
|
2317
|
-
u = f, c = c || d !== l(i[f + 1]);
|
|
2318
|
-
break;
|
|
2319
|
-
}
|
|
2320
|
-
}
|
|
2321
|
-
return u === null ? null : {
|
|
2322
|
-
index: u,
|
|
2323
|
-
multiple: c
|
|
2324
|
-
};
|
|
2325
|
-
}
|
|
2326
|
-
function Us(e, t, r) {
|
|
2327
|
-
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];
|
|
2328
|
-
return m.useEffect(function() {
|
|
2329
|
-
var f = xs(a || [], e || [], t);
|
|
2330
|
-
(f == null ? void 0 : f.index) !== void 0 && (r == null || r(f.index), c(e[f.index])), i(e);
|
|
2331
|
-
}, [e]), [u];
|
|
2355
|
+
function tn(e, t) {
|
|
2356
|
+
var r = "touches" in e ? e.touches[0] : e;
|
|
2357
|
+
return r[t ? "pageX" : "pageY"];
|
|
2332
2358
|
}
|
|
2333
|
-
var
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
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
|
|
2344
2376
|
});
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
);
|
|
2351
|
-
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
|
|
2352
2382
|
};
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
var a = M(0), i = M(null), s = M(null), l = M(!1), u = kn(t, r);
|
|
2356
|
-
function c(v, S) {
|
|
2357
|
-
fe.cancel(i.current), a.current += S, s.current = S, !u(S) && (Kr || v.preventDefault(), i.current = fe(function() {
|
|
2358
|
-
var R = l.current ? 10 : 1;
|
|
2359
|
-
o(a.current * R), a.current = 0;
|
|
2360
|
-
}));
|
|
2361
|
-
}
|
|
2362
|
-
function f(v, S) {
|
|
2363
|
-
o(S, !0), Kr || v.preventDefault();
|
|
2364
|
-
}
|
|
2365
|
-
var d = M(null), h = M(null);
|
|
2366
|
-
function g(v) {
|
|
2367
|
-
if (e) {
|
|
2368
|
-
fe.cancel(h.current), h.current = fe(function() {
|
|
2369
|
-
d.current = null;
|
|
2370
|
-
}, 2);
|
|
2371
|
-
var S = v.deltaX, R = v.deltaY, w = v.shiftKey, F = S, D = R;
|
|
2372
|
-
(d.current === "sx" || !d.current && w && R && !S) && (F = R, D = 0, d.current = "sx");
|
|
2373
|
-
var A = Math.abs(F), O = Math.abs(D);
|
|
2374
|
-
d.current === null && (d.current = n && A > O ? "x" : "y"), d.current === "y" ? c(v, D) : f(v, F);
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
function _(v) {
|
|
2378
|
-
e && (l.current = v.detail === s.current);
|
|
2379
|
-
}
|
|
2380
|
-
return [g, _];
|
|
2381
|
-
}
|
|
2382
|
-
var Ws = 14 / 15;
|
|
2383
|
-
function Vs(e, t, r) {
|
|
2384
|
-
var n = M(!1), o = M(0), a = M(null), i = M(null), s, l = function(d) {
|
|
2385
|
-
if (n.current) {
|
|
2386
|
-
var h = Math.ceil(d.touches[0].pageY), g = o.current - h;
|
|
2387
|
-
o.current = h, r(g) && d.preventDefault(), clearInterval(i.current), i.current = setInterval(function() {
|
|
2388
|
-
g *= Ws, (!r(g, !0) || Math.abs(g) <= 0.1) && clearInterval(i.current);
|
|
2389
|
-
}, 16);
|
|
2390
|
-
}
|
|
2391
|
-
}, u = function() {
|
|
2392
|
-
n.current = !1, s();
|
|
2393
|
-
}, c = function(d) {
|
|
2394
|
-
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();
|
|
2395
2385
|
};
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
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);
|
|
2402
2392
|
};
|
|
2403
|
-
}, [
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
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() {
|
|
2423
2419
|
return {
|
|
2424
|
-
|
|
2425
|
-
bottom: s[h]
|
|
2420
|
+
delayHidden: ue
|
|
2426
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"
|
|
2427
2432
|
};
|
|
2428
|
-
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);
|
|
2429
2449
|
}
|
|
2430
|
-
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 = {
|
|
2431
2451
|
overflowY: "auto",
|
|
2432
2452
|
overflowAnchor: "none"
|
|
2433
2453
|
};
|
|
2434
|
-
function
|
|
2435
|
-
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,
|
|
2436
|
-
return typeof
|
|
2437
|
-
}, [
|
|
2438
|
-
return Object.values(
|
|
2439
|
-
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;
|
|
2440
2460
|
}, 0);
|
|
2441
|
-
}, [
|
|
2442
|
-
|
|
2443
|
-
},
|
|
2444
|
-
|
|
2445
|
-
},
|
|
2446
|
-
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
|
|
2447
2467
|
};
|
|
2448
|
-
function
|
|
2449
|
-
|
|
2450
|
-
var
|
|
2451
|
-
typeof
|
|
2452
|
-
var
|
|
2453
|
-
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;
|
|
2454
2474
|
});
|
|
2455
2475
|
}
|
|
2456
|
-
var
|
|
2476
|
+
var ze = M({
|
|
2457
2477
|
start: 0,
|
|
2458
|
-
end:
|
|
2459
|
-
}),
|
|
2460
|
-
|
|
2461
|
-
var
|
|
2462
|
-
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)
|
|
2463
2483
|
return {
|
|
2464
2484
|
scrollHeight: void 0,
|
|
2465
2485
|
start: 0,
|
|
2466
|
-
end:
|
|
2486
|
+
end: H.length - 1,
|
|
2467
2487
|
offset: void 0
|
|
2468
2488
|
};
|
|
2469
|
-
if (!
|
|
2470
|
-
var
|
|
2489
|
+
if (!ue) {
|
|
2490
|
+
var b;
|
|
2471
2491
|
return {
|
|
2472
|
-
scrollHeight: ((
|
|
2492
|
+
scrollHeight: ((b = Ie.current) === null || b === void 0 ? void 0 : b.offsetHeight) || 0,
|
|
2473
2493
|
start: 0,
|
|
2474
|
-
end:
|
|
2494
|
+
end: H.length - 1,
|
|
2475
2495
|
offset: void 0
|
|
2476
2496
|
};
|
|
2477
2497
|
}
|
|
2478
|
-
for (var
|
|
2479
|
-
var
|
|
2480
|
-
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;
|
|
2481
2501
|
}
|
|
2482
|
-
return
|
|
2483
|
-
scrollHeight:
|
|
2484
|
-
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,
|
|
2485
2505
|
end: _e,
|
|
2486
|
-
offset:
|
|
2506
|
+
offset: V
|
|
2487
2507
|
};
|
|
2488
|
-
}, [
|
|
2489
|
-
|
|
2490
|
-
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({
|
|
2491
2511
|
width: 0,
|
|
2492
2512
|
height: a
|
|
2493
|
-
}), yr =
|
|
2494
|
-
|
|
2495
|
-
width:
|
|
2496
|
-
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
|
|
2497
2517
|
});
|
|
2498
|
-
}, br = M(), Tr = M(),
|
|
2499
|
-
return
|
|
2500
|
-
}, [me.width,
|
|
2501
|
-
return
|
|
2502
|
-
}, [me.height,
|
|
2503
|
-
|
|
2504
|
-
function
|
|
2505
|
-
var
|
|
2506
|
-
return Number.isNaN(
|
|
2507
|
-
}
|
|
2508
|
-
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() {
|
|
2509
2529
|
return {
|
|
2510
|
-
x: Y ?
|
|
2511
|
-
y:
|
|
2530
|
+
x: Y ? -$ : $,
|
|
2531
|
+
y: q
|
|
2512
2532
|
};
|
|
2513
|
-
},
|
|
2514
|
-
if (
|
|
2515
|
-
var E =
|
|
2516
|
-
(
|
|
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);
|
|
2517
2537
|
}
|
|
2518
2538
|
});
|
|
2519
|
-
function
|
|
2520
|
-
var
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
}),
|
|
2524
|
-
}
|
|
2525
|
-
function
|
|
2526
|
-
var
|
|
2527
|
-
|
|
2528
|
-
}
|
|
2529
|
-
var zt = function(
|
|
2530
|
-
var
|
|
2531
|
-
return
|
|
2532
|
-
},
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
var
|
|
2536
|
-
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);
|
|
2537
2557
|
});
|
|
2538
|
-
}),
|
|
2539
|
-
var
|
|
2540
|
-
return
|
|
2558
|
+
}), ft()) : ge(function(I) {
|
|
2559
|
+
var V = I + b;
|
|
2560
|
+
return V;
|
|
2541
2561
|
});
|
|
2542
|
-
}),
|
|
2543
|
-
|
|
2544
|
-
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({
|
|
2545
2565
|
preventDefault: function() {
|
|
2546
2566
|
},
|
|
2547
|
-
|
|
2567
|
+
deltaX: b ? E : 0,
|
|
2568
|
+
deltaY: b ? 0 : E
|
|
2548
2569
|
}), !0);
|
|
2549
|
-
}),
|
|
2550
|
-
function
|
|
2551
|
-
|
|
2570
|
+
}), Je(function() {
|
|
2571
|
+
function b(I) {
|
|
2572
|
+
Z && I.preventDefault();
|
|
2552
2573
|
}
|
|
2553
|
-
var
|
|
2554
|
-
return
|
|
2555
|
-
|
|
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);
|
|
2556
2577
|
};
|
|
2557
|
-
}, [
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
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() {
|
|
2569
2593
|
return {
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
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);
|
|
2574
2599
|
}
|
|
2575
|
-
|
|
2600
|
+
I(E) ? (E.left !== void 0 && re(zt(E.left)), Mr(E.top)) : Mr(E);
|
|
2576
2601
|
}
|
|
2577
2602
|
};
|
|
2578
|
-
}),
|
|
2603
|
+
}), Je(function() {
|
|
2579
2604
|
if (F) {
|
|
2580
|
-
var
|
|
2581
|
-
F(
|
|
2582
|
-
}
|
|
2583
|
-
}, [
|
|
2584
|
-
var
|
|
2585
|
-
start:
|
|
2586
|
-
end:
|
|
2587
|
-
virtual:
|
|
2588
|
-
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: $,
|
|
2589
2614
|
offsetY: Er,
|
|
2590
2615
|
rtl: Y,
|
|
2591
|
-
getSize:
|
|
2592
|
-
}),
|
|
2593
|
-
a && (
|
|
2594
|
-
var
|
|
2595
|
-
return Y && (
|
|
2596
|
-
|
|
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), {}, {
|
|
2597
2623
|
position: "relative"
|
|
2598
2624
|
}),
|
|
2599
|
-
className:
|
|
2600
|
-
},
|
|
2601
|
-
onResize:
|
|
2602
|
-
}, /* @__PURE__ */
|
|
2625
|
+
className: Ve
|
|
2626
|
+
}, Ar, L), /* @__PURE__ */ d.createElement(_r, {
|
|
2627
|
+
onResize: ti
|
|
2628
|
+
}, /* @__PURE__ */ d.createElement(y, {
|
|
2603
2629
|
className: "".concat(n, "-holder"),
|
|
2604
|
-
style:
|
|
2630
|
+
style: Ye,
|
|
2605
2631
|
ref: Fe,
|
|
2606
|
-
onScroll:
|
|
2607
|
-
onMouseEnter:
|
|
2608
|
-
}, /* @__PURE__ */
|
|
2632
|
+
onScroll: si,
|
|
2633
|
+
onMouseEnter: wr
|
|
2634
|
+
}, /* @__PURE__ */ d.createElement(kn, {
|
|
2609
2635
|
prefixCls: n,
|
|
2610
|
-
height:
|
|
2611
|
-
offsetX:
|
|
2636
|
+
height: Ae,
|
|
2637
|
+
offsetX: $,
|
|
2612
2638
|
offsetY: Er,
|
|
2613
|
-
scrollWidth:
|
|
2614
|
-
onInnerResize:
|
|
2639
|
+
scrollWidth: v,
|
|
2640
|
+
onInnerResize: ee,
|
|
2615
2641
|
ref: Ie,
|
|
2616
|
-
innerProps:
|
|
2642
|
+
innerProps: B,
|
|
2617
2643
|
rtl: Y,
|
|
2618
|
-
extra:
|
|
2619
|
-
},
|
|
2644
|
+
extra: ci
|
|
2645
|
+
}, fi))), ue && Ae > a && /* @__PURE__ */ d.createElement(rn, {
|
|
2620
2646
|
ref: br,
|
|
2621
2647
|
prefixCls: n,
|
|
2622
|
-
scrollOffset:
|
|
2623
|
-
scrollRange:
|
|
2648
|
+
scrollOffset: q,
|
|
2649
|
+
scrollRange: Ae,
|
|
2624
2650
|
rtl: Y,
|
|
2625
|
-
onScroll:
|
|
2626
|
-
onStartMove:
|
|
2627
|
-
onStopMove:
|
|
2628
|
-
spinSize:
|
|
2651
|
+
onScroll: Pr,
|
|
2652
|
+
onStartMove: st,
|
|
2653
|
+
onStopMove: at,
|
|
2654
|
+
spinSize: ni,
|
|
2629
2655
|
containerSize: me.height,
|
|
2630
2656
|
style: O == null ? void 0 : O.verticalScrollBar,
|
|
2631
2657
|
thumbStyle: O == null ? void 0 : O.verticalScrollBarThumb
|
|
2632
|
-
}),
|
|
2658
|
+
}), ue && v > me.width && /* @__PURE__ */ d.createElement(rn, {
|
|
2633
2659
|
ref: Tr,
|
|
2634
2660
|
prefixCls: n,
|
|
2635
|
-
scrollOffset:
|
|
2636
|
-
scrollRange:
|
|
2661
|
+
scrollOffset: $,
|
|
2662
|
+
scrollRange: v,
|
|
2637
2663
|
rtl: Y,
|
|
2638
|
-
onScroll:
|
|
2639
|
-
onStartMove:
|
|
2640
|
-
onStopMove:
|
|
2641
|
-
spinSize:
|
|
2664
|
+
onScroll: Pr,
|
|
2665
|
+
onStartMove: st,
|
|
2666
|
+
onStopMove: at,
|
|
2667
|
+
spinSize: ri,
|
|
2642
2668
|
containerSize: me.width,
|
|
2643
2669
|
horizontal: !0,
|
|
2644
2670
|
style: O == null ? void 0 : O.horizontalScrollBar,
|
|
2645
2671
|
thumbStyle: O == null ? void 0 : O.horizontalScrollBarThumb
|
|
2646
2672
|
}));
|
|
2647
2673
|
}
|
|
2648
|
-
var
|
|
2649
|
-
|
|
2650
|
-
function
|
|
2651
|
-
const { model: t } = e, r =
|
|
2652
|
-
t.onFilterCheckToggled(
|
|
2653
|
-
}, [t]), c =
|
|
2654
|
-
t.onFilterOnly(
|
|
2655
|
-
}, [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(() => {
|
|
2656
2682
|
t.onCheckAllToggled(!s);
|
|
2657
|
-
}, [t, s]),
|
|
2658
|
-
t.setSearchString(
|
|
2683
|
+
}, [t, s]), m = fe((f) => {
|
|
2684
|
+
t.setSearchString(f);
|
|
2659
2685
|
}, [t]);
|
|
2660
|
-
return /* @__PURE__ */
|
|
2661
|
-
|
|
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,
|
|
2662
2688
|
{
|
|
2663
2689
|
indeterminate: l,
|
|
2664
2690
|
disabled: o.length === 0,
|
|
2665
2691
|
checked: s,
|
|
2666
|
-
onChange:
|
|
2692
|
+
onChange: h
|
|
2667
2693
|
}
|
|
2668
|
-
), /* @__PURE__ */
|
|
2669
|
-
|
|
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,
|
|
2670
2696
|
{
|
|
2671
|
-
className:
|
|
2697
|
+
className: U.sheetsFilterPanelValuesItemExcludeButton,
|
|
2672
2698
|
size: "small",
|
|
2673
2699
|
type: "link",
|
|
2674
|
-
onClick: () => c(
|
|
2700
|
+
onClick: () => c(f)
|
|
2675
2701
|
},
|
|
2676
2702
|
a
|
|
2677
2703
|
)))))));
|
|
2678
2704
|
}
|
|
2679
|
-
function
|
|
2680
|
-
const e =
|
|
2681
|
-
r.executeCommand(
|
|
2682
|
-
}, [r]), u =
|
|
2683
|
-
await (o == null ? void 0 : o.clear()), r.executeCommand(
|
|
2684
|
-
}, [o, r]), c =
|
|
2685
|
-
r.executeCommand(
|
|
2686
|
-
}, [r]),
|
|
2687
|
-
await (o == null ? void 0 : o.apply()), 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 });
|
|
2708
|
+
}, [r]), u = fe(async () => {
|
|
2709
|
+
await (o == null ? void 0 : o.clear()), r.executeCommand(Ke.id);
|
|
2710
|
+
}, [o, r]), c = fe(() => {
|
|
2711
|
+
r.executeCommand(Ke.id);
|
|
2712
|
+
}, [r]), h = fe(async () => {
|
|
2713
|
+
await (o == null ? void 0 : o.apply()), r.executeCommand(Ke.id);
|
|
2688
2714
|
}, [o, r]);
|
|
2689
|
-
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")))));
|
|
2690
2716
|
}
|
|
2691
|
-
function
|
|
2717
|
+
function aa(e) {
|
|
2692
2718
|
const t = e.getCurrentLocale();
|
|
2693
2719
|
return dr(
|
|
2694
2720
|
() => [
|
|
2695
|
-
{ label: e.t("sheets-filter.panel.by-values"), value:
|
|
2696
|
-
{ 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 }
|
|
2697
2723
|
],
|
|
2698
2724
|
[t, e]
|
|
2699
2725
|
);
|
|
2700
2726
|
}
|
|
2701
|
-
const
|
|
2702
|
-
id:
|
|
2703
|
-
binding:
|
|
2727
|
+
const la = {
|
|
2728
|
+
id: We.id,
|
|
2729
|
+
binding: Fi.L | Dr.CTRL_COMMAND | Dr.SHIFT,
|
|
2704
2730
|
description: "sheets-filter.shortcut.smart-toggle-filter",
|
|
2705
|
-
preconditions:
|
|
2731
|
+
preconditions: Ui,
|
|
2706
2732
|
group: "4_sheet-edit"
|
|
2707
2733
|
};
|
|
2708
|
-
function
|
|
2709
|
-
const t = e.get(
|
|
2734
|
+
function ua(e) {
|
|
2735
|
+
const t = e.get(ae);
|
|
2710
2736
|
return {
|
|
2711
|
-
id:
|
|
2712
|
-
group:
|
|
2713
|
-
type:
|
|
2737
|
+
id: We.id,
|
|
2738
|
+
group: ur.TOOLBAR_FORMULAS_INSERT,
|
|
2739
|
+
type: cr.BUTTON_SELECTOR,
|
|
2714
2740
|
icon: "FilterSingle",
|
|
2715
2741
|
tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
|
|
2716
|
-
positions: [
|
|
2717
|
-
hidden$:
|
|
2718
|
-
activated$: t.activeFilterModel$.pipe(
|
|
2719
|
-
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] })
|
|
2720
2746
|
};
|
|
2721
2747
|
}
|
|
2722
|
-
function
|
|
2723
|
-
const t = e.get(
|
|
2748
|
+
function ca(e) {
|
|
2749
|
+
const t = e.get(ae);
|
|
2724
2750
|
return {
|
|
2725
|
-
id:
|
|
2726
|
-
group:
|
|
2727
|
-
type:
|
|
2751
|
+
id: Cn.id,
|
|
2752
|
+
group: ur.TOOLBAR_OTHERS,
|
|
2753
|
+
type: cr.BUTTON,
|
|
2728
2754
|
title: "sheets-filter.toolbar.clear-filter-criteria",
|
|
2729
|
-
positions: [
|
|
2730
|
-
hidden$:
|
|
2731
|
-
disabled$: t.activeFilterModel$.pipe(
|
|
2755
|
+
positions: [We.id],
|
|
2756
|
+
hidden$: fr(e, Be.UNIVER_SHEET),
|
|
2757
|
+
disabled$: t.activeFilterModel$.pipe(hr((r) => {
|
|
2732
2758
|
var n;
|
|
2733
|
-
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);
|
|
2734
2760
|
}))
|
|
2735
2761
|
};
|
|
2736
2762
|
}
|
|
2737
|
-
function
|
|
2738
|
-
const t = e.get(
|
|
2763
|
+
function fa(e) {
|
|
2764
|
+
const t = e.get(ae);
|
|
2739
2765
|
return {
|
|
2740
|
-
id:
|
|
2741
|
-
group:
|
|
2742
|
-
type:
|
|
2766
|
+
id: Pn.id,
|
|
2767
|
+
group: ur.TOOLBAR_OTHERS,
|
|
2768
|
+
type: cr.BUTTON,
|
|
2743
2769
|
title: "sheets-filter.toolbar.re-calc-filter-conditions",
|
|
2744
|
-
positions: [
|
|
2745
|
-
hidden$:
|
|
2746
|
-
disabled$: t.activeFilterModel$.pipe(
|
|
2770
|
+
positions: [We.id],
|
|
2771
|
+
hidden$: fr(e, Be.UNIVER_SHEET),
|
|
2772
|
+
disabled$: t.activeFilterModel$.pipe(hr((r) => {
|
|
2747
2773
|
var n;
|
|
2748
|
-
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);
|
|
2749
2775
|
}))
|
|
2750
2776
|
};
|
|
2751
2777
|
}
|
|
2752
|
-
const Se = 16,
|
|
2753
|
-
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 {
|
|
2754
2780
|
static drawNoCriteria(t, r, n, o) {
|
|
2755
|
-
t.save(),
|
|
2781
|
+
t.save(), xr.drawWith(t, {
|
|
2756
2782
|
radius: 2,
|
|
2757
2783
|
width: Se,
|
|
2758
2784
|
height: Se,
|
|
@@ -2760,27 +2786,27 @@ class Jr {
|
|
|
2760
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();
|
|
2761
2787
|
}
|
|
2762
2788
|
static drawHasCriteria(t, r, n, o) {
|
|
2763
|
-
t.save(),
|
|
2789
|
+
t.save(), xr.drawWith(t, {
|
|
2764
2790
|
radius: 2,
|
|
2765
2791
|
width: Se,
|
|
2766
2792
|
height: Se,
|
|
2767
2793
|
fill: o
|
|
2768
|
-
}), 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();
|
|
2769
2795
|
}
|
|
2770
2796
|
}
|
|
2771
|
-
var
|
|
2772
|
-
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--)
|
|
2773
2799
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2774
|
-
return n && o &&
|
|
2800
|
+
return n && o && da(t, r, o), o;
|
|
2775
2801
|
}, qt = (e, t) => (r, n) => t(r, n, e);
|
|
2776
|
-
const ve = 16,
|
|
2777
|
-
let ir = class extends
|
|
2802
|
+
const ve = 16, ht = 1;
|
|
2803
|
+
let ir = class extends Yi {
|
|
2778
2804
|
constructor(t, r, n, o, a) {
|
|
2779
2805
|
super(t, r);
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2806
|
+
N(this, "_cellWidth", 0);
|
|
2807
|
+
N(this, "_cellHeight", 0);
|
|
2808
|
+
N(this, "_filterParams");
|
|
2809
|
+
N(this, "_hovered", !1);
|
|
2784
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());
|
|
2785
2811
|
}
|
|
2786
2812
|
setShapeProps(t) {
|
|
@@ -2795,13 +2821,13 @@ let ir = class extends xi {
|
|
|
2795
2821
|
const i = new Path2D();
|
|
2796
2822
|
i.rect(o, a, n, r), t.clip(i);
|
|
2797
2823
|
const { hasCriteria: s } = this._filterParams, l = this._themeService.getCurrentTheme().primaryColor, u = this._hovered ? this._themeService.getCurrentTheme().grey50 : "rgba(255, 255, 255, 1.0)";
|
|
2798
|
-
s ?
|
|
2824
|
+
s ? on.drawHasCriteria(t, ve, l, u) : on.drawNoCriteria(t, ve, l, u), t.restore();
|
|
2799
2825
|
}
|
|
2800
2826
|
onPointerDown(t) {
|
|
2801
2827
|
if (t.button === 2)
|
|
2802
2828
|
return;
|
|
2803
2829
|
const { col: r, unitId: n, subUnitId: o } = this._filterParams;
|
|
2804
|
-
this._contextService.getContextValue(
|
|
2830
|
+
this._contextService.getContextValue(xe) || setTimeout(() => {
|
|
2805
2831
|
this._commandService.executeCommand(pr.id, {
|
|
2806
2832
|
unitId: n,
|
|
2807
2833
|
subUnitId: o,
|
|
@@ -2816,58 +2842,58 @@ let ir = class extends xi {
|
|
|
2816
2842
|
this._hovered = !1, this.makeDirty(!0);
|
|
2817
2843
|
}
|
|
2818
2844
|
};
|
|
2819
|
-
ir =
|
|
2820
|
-
qt(2,
|
|
2821
|
-
qt(3,
|
|
2822
|
-
qt(4,
|
|
2845
|
+
ir = pa([
|
|
2846
|
+
qt(2, Ct),
|
|
2847
|
+
qt(3, se),
|
|
2848
|
+
qt(4, x(ln))
|
|
2823
2849
|
], ir);
|
|
2824
|
-
var
|
|
2825
|
-
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--)
|
|
2826
2852
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2827
|
-
return n && o &&
|
|
2853
|
+
return n && o && va(t, r, o), o;
|
|
2828
2854
|
}, pe = (e, t) => (r, n) => t(r, n, e);
|
|
2829
|
-
const
|
|
2830
|
-
let or = class extends
|
|
2855
|
+
const Sa = 1e3, Ea = 5e3;
|
|
2856
|
+
let or = class extends un {
|
|
2831
2857
|
constructor(t, r, n, o, a, i, s, l, u, c) {
|
|
2832
2858
|
super();
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
this._context = t, this._injector = r, this._sheetSkeletonManagerService = n, this._sheetsFilterService = o, this._themeService = a, this._sheetInterceptorService = i, this.
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
].forEach((
|
|
2859
|
+
N(this, "_filterRangeShape", null);
|
|
2860
|
+
N(this, "_buttonRenderDisposable", null);
|
|
2861
|
+
N(this, "_filterButtonShapes", []);
|
|
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, [
|
|
2863
|
+
lr,
|
|
2864
|
+
De,
|
|
2865
|
+
mt,
|
|
2866
|
+
mn
|
|
2867
|
+
].forEach((h) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(h.id))), this._initRenderer();
|
|
2842
2868
|
}
|
|
2843
2869
|
_initRenderer() {
|
|
2844
|
-
|
|
2870
|
+
vn([
|
|
2845
2871
|
this._selectionRenderService.usable$,
|
|
2846
2872
|
this._sheetSkeletonManagerService.currentSkeleton$
|
|
2847
2873
|
]).pipe(
|
|
2848
|
-
|
|
2849
|
-
|
|
2874
|
+
Hr(([t]) => t),
|
|
2875
|
+
hr(([t, r]) => {
|
|
2850
2876
|
var l;
|
|
2851
2877
|
if (!r)
|
|
2852
|
-
return
|
|
2853
|
-
const {
|
|
2854
|
-
unitId:
|
|
2878
|
+
return rt(null);
|
|
2879
|
+
const { unit: n, unitId: o } = this._context, a = n.getActiveSheet().getSheetId(), i = (l = this._sheetsFilterService.getFilterModel(o, a)) != null ? l : void 0, s = () => ({
|
|
2880
|
+
unitId: o,
|
|
2855
2881
|
worksheetId: a,
|
|
2856
2882
|
filterModel: i,
|
|
2857
2883
|
range: i == null ? void 0 : i.getRange(),
|
|
2858
2884
|
skeleton: r.skeleton
|
|
2859
2885
|
});
|
|
2860
|
-
return
|
|
2861
|
-
|
|
2862
|
-
([u]) => u.type === Te.MUTATION && u.params.unitId ===
|
|
2886
|
+
return Si(this._commandService.onCommandExecuted).pipe(
|
|
2887
|
+
Hr(
|
|
2888
|
+
([u]) => u.type === Te.MUTATION && u.params.unitId === n.getUnitId() && Ti.has(u.id)
|
|
2863
2889
|
),
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2890
|
+
gn(20, void 0, { leading: !1, trailing: !0 }),
|
|
2891
|
+
He(s),
|
|
2892
|
+
_n(s())
|
|
2867
2893
|
// must trigger once
|
|
2868
2894
|
);
|
|
2869
2895
|
}),
|
|
2870
|
-
|
|
2896
|
+
$i(this.dispose$)
|
|
2871
2897
|
).subscribe((t) => {
|
|
2872
2898
|
this._disposeRendering(), !(!t || !t.range) && (this._renderRange(t.unitId, t.range, t.skeleton), this._renderButtons(t));
|
|
2873
2899
|
});
|
|
@@ -2880,7 +2906,7 @@ let or = class extends on {
|
|
|
2880
2906
|
range: r,
|
|
2881
2907
|
primary: null,
|
|
2882
2908
|
style: null
|
|
2883
|
-
}), { 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);
|
|
2884
2910
|
c.update(i, l, u, {
|
|
2885
2911
|
hasAutoFill: !1,
|
|
2886
2912
|
fill: "rgba(0, 0, 0, 0.0)",
|
|
@@ -2893,28 +2919,28 @@ let or = class extends on {
|
|
|
2893
2919
|
return;
|
|
2894
2920
|
const { scene: l } = s;
|
|
2895
2921
|
this._interceptCellContent(t.range);
|
|
2896
|
-
const { startColumn: u, endColumn: c, startRow:
|
|
2897
|
-
for (let
|
|
2898
|
-
const
|
|
2899
|
-
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)
|
|
2900
2926
|
continue;
|
|
2901
|
-
const
|
|
2927
|
+
const B = !!n.getFilterColumn(m), A = y - ve - ht, O = S - ve - ht, L = {
|
|
2902
2928
|
left: A,
|
|
2903
2929
|
top: O,
|
|
2904
2930
|
height: ve,
|
|
2905
2931
|
width: ve,
|
|
2906
|
-
zIndex:
|
|
2932
|
+
zIndex: Ea,
|
|
2907
2933
|
cellHeight: F,
|
|
2908
|
-
cellWidth:
|
|
2909
|
-
filterParams: { unitId: o, subUnitId: i, col:
|
|
2910
|
-
},
|
|
2911
|
-
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);
|
|
2912
2938
|
}
|
|
2913
2939
|
l.addObjects(this._filterButtonShapes), l.makeDirty();
|
|
2914
2940
|
}
|
|
2915
2941
|
_interceptCellContent(t) {
|
|
2916
2942
|
const { startRow: r, startColumn: n, endColumn: o } = t;
|
|
2917
|
-
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(
|
|
2943
|
+
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(ro.CELL_CONTENT, {
|
|
2918
2944
|
handler: (a, i, s) => {
|
|
2919
2945
|
const { row: l, col: u } = i;
|
|
2920
2946
|
return l !== r || u < n || u > o ? s(a) : s({
|
|
@@ -2935,48 +2961,48 @@ let or = class extends on {
|
|
|
2935
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 = [];
|
|
2936
2962
|
}
|
|
2937
2963
|
};
|
|
2938
|
-
or =
|
|
2939
|
-
pe(1,
|
|
2940
|
-
pe(2,
|
|
2941
|
-
pe(3,
|
|
2942
|
-
pe(4,
|
|
2943
|
-
pe(5,
|
|
2944
|
-
pe(6,
|
|
2945
|
-
pe(7,
|
|
2946
|
-
pe(8,
|
|
2947
|
-
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)
|
|
2948
2974
|
], or);
|
|
2949
|
-
var
|
|
2950
|
-
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--)
|
|
2951
2977
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2952
|
-
return n && o &&
|
|
2953
|
-
},
|
|
2954
|
-
const
|
|
2955
|
-
let
|
|
2956
|
-
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) {
|
|
2957
2983
|
super();
|
|
2958
|
-
|
|
2959
|
-
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();
|
|
2960
2986
|
}
|
|
2961
2987
|
dispose() {
|
|
2962
2988
|
super.dispose(), this._closeFilterPopup();
|
|
2963
2989
|
}
|
|
2964
2990
|
_initShortcuts() {
|
|
2965
2991
|
[
|
|
2966
|
-
|
|
2992
|
+
la
|
|
2967
2993
|
].forEach((t) => {
|
|
2968
2994
|
this.disposeWithMe(this._shortcutService.registerShortcut(t));
|
|
2969
2995
|
});
|
|
2970
2996
|
}
|
|
2971
2997
|
_initCommands() {
|
|
2972
2998
|
[
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2999
|
+
We,
|
|
3000
|
+
$e,
|
|
3001
|
+
Cn,
|
|
3002
|
+
Pn,
|
|
3003
|
+
In,
|
|
2978
3004
|
pr,
|
|
2979
|
-
|
|
3005
|
+
Ke
|
|
2980
3006
|
].forEach((t) => {
|
|
2981
3007
|
this.disposeWithMe(this._commandService.registerCommand(t));
|
|
2982
3008
|
});
|
|
@@ -2984,25 +3010,25 @@ let tt = class extends on {
|
|
|
2984
3010
|
_initMenuItems() {
|
|
2985
3011
|
const { menu: t = {} } = this._config;
|
|
2986
3012
|
[
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3013
|
+
ua,
|
|
3014
|
+
ca,
|
|
3015
|
+
fa
|
|
2990
3016
|
].forEach((r) => {
|
|
2991
3017
|
this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(r), t));
|
|
2992
3018
|
});
|
|
2993
3019
|
}
|
|
2994
3020
|
_initUI() {
|
|
2995
|
-
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) => {
|
|
2996
3022
|
t ? this._openFilterPopup() : this._closeFilterPopup();
|
|
2997
3023
|
})), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((t) => {
|
|
2998
3024
|
t && this._messageService.show({
|
|
2999
|
-
type:
|
|
3025
|
+
type: En.Error,
|
|
3000
3026
|
content: this._localeService.t(t)
|
|
3001
3027
|
});
|
|
3002
3028
|
}));
|
|
3003
3029
|
}
|
|
3004
3030
|
_initRenderControllers() {
|
|
3005
|
-
this.disposeWithMe(this._renderManagerService.registerRenderController(
|
|
3031
|
+
this.disposeWithMe(this._renderManagerService.registerRenderController(Be.UNIVER_SHEET, or));
|
|
3006
3032
|
}
|
|
3007
3033
|
_openFilterPopup() {
|
|
3008
3034
|
const t = this._sheetsFilterPanelService.filterModel;
|
|
@@ -3010,10 +3036,10 @@ let tt = class extends on {
|
|
|
3010
3036
|
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
3011
3037
|
const r = t.getRange(), n = this._sheetsFilterPanelService.col, { startRow: o } = r;
|
|
3012
3038
|
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(o, n, {
|
|
3013
|
-
componentKey:
|
|
3039
|
+
componentKey: sn,
|
|
3014
3040
|
direction: "horizontal",
|
|
3015
3041
|
closeOnSelfTarget: !0,
|
|
3016
|
-
onClickOutside: () => this._commandService.syncExecuteCommand(
|
|
3042
|
+
onClickOutside: () => this._commandService.syncExecuteCommand(Ke.id),
|
|
3017
3043
|
offset: [5, 0]
|
|
3018
3044
|
});
|
|
3019
3045
|
}
|
|
@@ -3022,27 +3048,27 @@ let tt = class extends on {
|
|
|
3022
3048
|
(t = this._popupDisposable) == null || t.dispose(), this._popupDisposable = null;
|
|
3023
3049
|
}
|
|
3024
3050
|
};
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
],
|
|
3040
|
-
var
|
|
3041
|
-
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--)
|
|
3042
3068
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3043
|
-
return n && o &&
|
|
3044
|
-
},
|
|
3045
|
-
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 {
|
|
3046
3072
|
constructor(e, t, r, n) {
|
|
3047
3073
|
super(), this._sheetsFilterService = e, this._localeService = t, this._commandService = r, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
|
|
3048
3074
|
}
|
|
@@ -3050,15 +3076,15 @@ let vt = class extends Rt {
|
|
|
3050
3076
|
this.disposeWithMe(
|
|
3051
3077
|
this._commandService.beforeCommandExecuted((e) => {
|
|
3052
3078
|
var t;
|
|
3053
|
-
if (e.id ===
|
|
3079
|
+
if (e.id === We.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithoutRange({
|
|
3054
3080
|
workbookTypes: [Xt],
|
|
3055
|
-
rangeTypes: [
|
|
3081
|
+
rangeTypes: [Vr],
|
|
3056
3082
|
worksheetTypes: [Kt, Zt]
|
|
3057
3083
|
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr"))), e.id === pr.id) {
|
|
3058
|
-
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);
|
|
3059
3085
|
i && (i.startColumn = r.col, i.endColumn = r.col, this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
3060
3086
|
workbookTypes: [Xt],
|
|
3061
|
-
rangeTypes: [
|
|
3087
|
+
rangeTypes: [Vr],
|
|
3062
3088
|
worksheetTypes: [Kt, Zt]
|
|
3063
3089
|
}, [i]) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr")));
|
|
3064
3090
|
}
|
|
@@ -3066,42 +3092,44 @@ let vt = class extends Rt {
|
|
|
3066
3092
|
);
|
|
3067
3093
|
}
|
|
3068
3094
|
};
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
],
|
|
3076
|
-
var
|
|
3077
|
-
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--)
|
|
3078
3104
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3079
|
-
return n && o &&
|
|
3080
|
-
},
|
|
3081
|
-
const
|
|
3082
|
-
|
|
3083
|
-
let rn = (ft = class extends di {
|
|
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 {
|
|
3084
3109
|
constructor(e = {}, t, r) {
|
|
3085
|
-
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);
|
|
3086
3111
|
}
|
|
3087
3112
|
onStarting(e) {
|
|
3088
3113
|
[
|
|
3089
3114
|
[be],
|
|
3090
|
-
[
|
|
3115
|
+
[gt],
|
|
3091
3116
|
[
|
|
3092
|
-
|
|
3117
|
+
et,
|
|
3093
3118
|
{
|
|
3094
|
-
useFactory: () => this._injector.createInstance(
|
|
3119
|
+
useFactory: () => this._injector.createInstance(et, this._config)
|
|
3095
3120
|
}
|
|
3096
3121
|
]
|
|
3097
3122
|
].forEach((t) => e.add(t));
|
|
3098
3123
|
}
|
|
3099
|
-
}
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3124
|
+
};
|
|
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 = {
|
|
3105
3133
|
"sheets-filter": {
|
|
3106
3134
|
toolbar: {
|
|
3107
3135
|
"smart-toggle-filter-tooltip": "筛选",
|
|
@@ -3153,10 +3181,10 @@ const ba = {
|
|
|
3153
3181
|
"filter-header-forbidden": "无法移动筛选行头"
|
|
3154
3182
|
}
|
|
3155
3183
|
}
|
|
3156
|
-
},
|
|
3184
|
+
}, Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3157
3185
|
__proto__: null,
|
|
3158
|
-
default:
|
|
3159
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3186
|
+
default: Ma
|
|
3187
|
+
}, Symbol.toStringTag, { value: "Module" })), Aa = {
|
|
3160
3188
|
"sheets-filter": {
|
|
3161
3189
|
toolbar: {
|
|
3162
3190
|
"smart-toggle-filter-tooltip": "Toggle Filter",
|
|
@@ -3208,10 +3236,10 @@ const ba = {
|
|
|
3208
3236
|
"filter-header-forbidden": "You can't move the header row of a filter."
|
|
3209
3237
|
}
|
|
3210
3238
|
}
|
|
3211
|
-
},
|
|
3239
|
+
}, qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3212
3240
|
__proto__: null,
|
|
3213
|
-
default:
|
|
3214
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3241
|
+
default: Aa
|
|
3242
|
+
}, Symbol.toStringTag, { value: "Module" })), La = {
|
|
3215
3243
|
"sheets-filter": {
|
|
3216
3244
|
toolbar: {
|
|
3217
3245
|
"smart-toggle-filter-tooltip": "Переключить фильтр",
|
|
@@ -3263,15 +3291,15 @@ const ba = {
|
|
|
3263
3291
|
"filter-header-forbidden": "Вы не можете переместить строку заголовка фильтра."
|
|
3264
3292
|
}
|
|
3265
3293
|
}
|
|
3266
|
-
},
|
|
3294
|
+
}, Xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3267
3295
|
__proto__: null,
|
|
3268
|
-
default:
|
|
3296
|
+
default: La
|
|
3269
3297
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3270
3298
|
export {
|
|
3271
3299
|
pr as OpenFilterPanelOperation,
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3300
|
+
We as SmartToggleSheetsFilterCommand,
|
|
3301
|
+
Ot as UniverSheetsFilterUIPlugin,
|
|
3302
|
+
qa as enUS,
|
|
3303
|
+
Xa as ruRU,
|
|
3304
|
+
Ya as zhCN
|
|
3277
3305
|
};
|