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