@univerjs/sheets-filter-ui 0.1.16 → 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 +750 -712
- 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 -0
- package/lib/types/mobile-plugin.d.ts +12 -0
- package/lib/umd/index.js +4 -4
- package/package.json +17 -17
package/lib/es/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var N = (e, t, r) =>
|
|
4
|
-
import { CommandType as Re, IUniverInstanceService as
|
|
5
|
-
import { Quantity as
|
|
6
|
-
import { SheetsFilterService as ee, RemoveSheetsFilterMutation 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 T, { forwardRef as
|
|
15
|
-
import { useDependency as
|
|
16
|
-
import
|
|
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
17
|
var oe = function() {
|
|
18
18
|
return oe = Object.assign || function(e) {
|
|
19
19
|
for (var t, r = 1, n = arguments.length; r < n; r++) {
|
|
@@ -22,23 +22,23 @@ var oe = function() {
|
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}, oe.apply(this, arguments);
|
|
25
|
-
},
|
|
25
|
+
}, _o = function(e, t) {
|
|
26
26
|
var r = {};
|
|
27
27
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
28
28
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
29
29
|
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
30
30
|
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
31
31
|
return r;
|
|
32
|
-
},
|
|
33
|
-
var r = e.icon, n = e.id, o = e.className, a = e.extend, i =
|
|
34
|
-
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);
|
|
35
35
|
});
|
|
36
|
-
function
|
|
37
|
-
return
|
|
38
|
-
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);
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function go(e, t, r) {
|
|
42
42
|
var n = oe({}, e.attrs);
|
|
43
43
|
r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1);
|
|
44
44
|
var o = t.defIds;
|
|
@@ -47,65 +47,65 @@ function fo(e, t, r) {
|
|
|
47
47
|
typeof s == "string" && (n[i] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
48
48
|
})), n;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function So(e, t) {
|
|
51
51
|
var r, n = t.defIds;
|
|
52
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
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;
|
|
54
54
|
}) }) : e;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Eo() {
|
|
57
57
|
return Math.random().toString(36).substring(2, 8);
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
var
|
|
61
|
-
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, {
|
|
62
62
|
id: "filter-single",
|
|
63
63
|
ref: t,
|
|
64
|
-
icon:
|
|
64
|
+
icon: bo
|
|
65
65
|
}));
|
|
66
66
|
});
|
|
67
|
-
|
|
67
|
+
Mn.displayName = "FilterSingle";
|
|
68
68
|
const Ve = {
|
|
69
69
|
id: "sheet.command.smart-toggle-filter",
|
|
70
70
|
type: Re.COMMAND,
|
|
71
71
|
handler: async (e) => {
|
|
72
|
-
const t = e.get(
|
|
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
73
|
if (!i || !a) return !1;
|
|
74
74
|
const s = a.getUnitId(), l = i.getSheetId(), u = r.getFilterModel(s, l);
|
|
75
75
|
if (u) {
|
|
76
|
-
const _ = u == null ? void 0 : u.serialize(), b =
|
|
76
|
+
const _ = u == null ? void 0 : u.serialize(), b = yo(s, l, _), S = n.syncExecuteCommand(_t.id, { unitId: s, subUnitId: l });
|
|
77
77
|
return S && o.pushUndoRedo({
|
|
78
78
|
unitID: s,
|
|
79
79
|
undoMutations: b,
|
|
80
|
-
redoMutations: [{ id:
|
|
80
|
+
redoMutations: [{ id: _t.id, params: { unitId: s, subUnitId: l } }]
|
|
81
81
|
}), S;
|
|
82
82
|
}
|
|
83
|
-
const h = e.get(
|
|
83
|
+
const h = e.get(ao).getLast();
|
|
84
84
|
if (!h) return !1;
|
|
85
|
-
const v = h.range, f =
|
|
85
|
+
const v = h.range, f = lo(h) ? zi(v, { left: !0, right: !0, up: !0, down: !0 }, i) : v;
|
|
86
86
|
if (f.endRow === f.startRow) {
|
|
87
|
-
const _ = e.get(
|
|
88
|
-
return _ == null || _.show({ type:
|
|
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;
|
|
89
89
|
}
|
|
90
|
-
const g = { id:
|
|
90
|
+
const g = { id: dr.id, params: { unitId: s, subUnitId: l, range: f } }, p = n.syncExecuteCommand(g.id, g.params);
|
|
91
91
|
return p && o.pushUndoRedo({
|
|
92
92
|
unitID: s,
|
|
93
|
-
undoMutations: [{ id:
|
|
93
|
+
undoMutations: [{ id: _t.id, params: { unitId: s, subUnitId: l } }],
|
|
94
94
|
redoMutations: [g]
|
|
95
95
|
}), p;
|
|
96
96
|
}
|
|
97
|
-
},
|
|
97
|
+
}, He = {
|
|
98
98
|
id: "sheet.command.set-filter-criteria",
|
|
99
99
|
type: Re.COMMAND,
|
|
100
100
|
handler: async (e, t) => {
|
|
101
|
-
const r = e.get(ee), n = e.get(ae), o = 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);
|
|
102
102
|
if (!u)
|
|
103
103
|
return !1;
|
|
104
104
|
const c = u.getRange();
|
|
105
105
|
if (!c || s < c.startColumn || s > c.endColumn)
|
|
106
106
|
return !1;
|
|
107
|
-
const h = u.getFilterColumn(s), v =
|
|
108
|
-
id:
|
|
107
|
+
const h = u.getFilterColumn(s), v = To(a, i, s, h), f = {
|
|
108
|
+
id: Ue.id,
|
|
109
109
|
params: {
|
|
110
110
|
unitId: a,
|
|
111
111
|
subUnitId: i,
|
|
@@ -119,21 +119,21 @@ const Ve = {
|
|
|
119
119
|
redoMutations: [f]
|
|
120
120
|
}), g;
|
|
121
121
|
}
|
|
122
|
-
},
|
|
122
|
+
}, wn = {
|
|
123
123
|
id: "sheet.command.clear-filter-criteria",
|
|
124
124
|
type: Re.COMMAND,
|
|
125
125
|
handler: (e) => {
|
|
126
|
-
const t = e.get(ee), r = e.get(
|
|
126
|
+
const t = e.get(ee), r = e.get(cr), n = e.get(ae), o = t.activeFilterModel;
|
|
127
127
|
if (!o)
|
|
128
128
|
return !1;
|
|
129
|
-
const { unitId: a, subUnitId: i } = o, s = o.serialize(), l =
|
|
130
|
-
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({
|
|
131
131
|
unitID: a,
|
|
132
132
|
undoMutations: l,
|
|
133
133
|
redoMutations: u
|
|
134
134
|
}), !0;
|
|
135
135
|
}
|
|
136
|
-
},
|
|
136
|
+
}, An = {
|
|
137
137
|
id: "sheet.command.re-calc-filter",
|
|
138
138
|
type: Re.COMMAND,
|
|
139
139
|
handler: (e) => {
|
|
@@ -141,26 +141,26 @@ const Ve = {
|
|
|
141
141
|
if (!n)
|
|
142
142
|
return !1;
|
|
143
143
|
const { unitId: o, subUnitId: a } = n;
|
|
144
|
-
return r.executeCommand(
|
|
144
|
+
return r.executeCommand(Sn.id, { unitId: o, subUnitId: a });
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
|
-
function
|
|
147
|
+
function yo(e, t, r) {
|
|
148
148
|
const n = [], o = {
|
|
149
|
-
id:
|
|
149
|
+
id: dr.id,
|
|
150
150
|
params: {
|
|
151
151
|
unitId: e,
|
|
152
152
|
subUnitId: t,
|
|
153
153
|
range: r.ref
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
-
return n.push(o),
|
|
156
|
+
return n.push(o), Ln(e, t, r).forEach((i) => n.push(i)), n;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ln(e, t, r) {
|
|
159
159
|
var o;
|
|
160
160
|
const n = [];
|
|
161
161
|
return (o = r.filterColumns) == null || o.forEach((a) => {
|
|
162
162
|
const i = {
|
|
163
|
-
id:
|
|
163
|
+
id: Ue.id,
|
|
164
164
|
params: {
|
|
165
165
|
unitId: e,
|
|
166
166
|
subUnitId: t,
|
|
@@ -171,12 +171,12 @@ function Nn(e, t, r) {
|
|
|
171
171
|
n.push(i);
|
|
172
172
|
}), n;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Ro(e, t, r) {
|
|
175
175
|
var o;
|
|
176
176
|
const n = [];
|
|
177
177
|
return (o = r.filterColumns) == null || o.forEach((a) => {
|
|
178
178
|
const i = {
|
|
179
|
-
id:
|
|
179
|
+
id: Ue.id,
|
|
180
180
|
params: {
|
|
181
181
|
unitId: e,
|
|
182
182
|
subUnitId: t,
|
|
@@ -187,10 +187,10 @@ function _o(e, t, r) {
|
|
|
187
187
|
n.push(i);
|
|
188
188
|
}), n;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function To(e, t, r, n) {
|
|
191
191
|
if (!n)
|
|
192
192
|
return {
|
|
193
|
-
id:
|
|
193
|
+
id: Ue.id,
|
|
194
194
|
params: {
|
|
195
195
|
unitId: e,
|
|
196
196
|
subUnitId: t,
|
|
@@ -200,7 +200,7 @@ function go(e, t, r, n) {
|
|
|
200
200
|
};
|
|
201
201
|
const o = n.serialize();
|
|
202
202
|
return {
|
|
203
|
-
id:
|
|
203
|
+
id: Ue.id,
|
|
204
204
|
params: {
|
|
205
205
|
unitId: e,
|
|
206
206
|
subUnitId: t,
|
|
@@ -501,7 +501,7 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
501
501
|
const { val1: s, val2: l, operator1: u } = i, c = u === m.GREATER_THAN_OR_EQUAL;
|
|
502
502
|
return {
|
|
503
503
|
customFilters: {
|
|
504
|
-
and:
|
|
504
|
+
and: Br.TRUE,
|
|
505
505
|
customFilters: [
|
|
506
506
|
{ val: c ? s : l, operator: m.GREATER_THAN_OR_EQUAL },
|
|
507
507
|
{ val: c ? l : s, operator: m.LESS_THAN_OR_EQUAL }
|
|
@@ -605,7 +605,7 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
605
605
|
_.customFilters.customFilters[0]
|
|
606
606
|
]
|
|
607
607
|
};
|
|
608
|
-
return s && (b.and =
|
|
608
|
+
return s && (b.and = Br.TRUE), { customFilters: b };
|
|
609
609
|
},
|
|
610
610
|
testMappingFilterColumn: (i) => {
|
|
611
611
|
var u;
|
|
@@ -689,7 +689,7 @@ function ce(e) {
|
|
|
689
689
|
throw new Error("Neither operator1 and operator2 and both not set!");
|
|
690
690
|
return t ? [t, n] : [r, o];
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function rr(e) {
|
|
693
693
|
const t = [], r = [];
|
|
694
694
|
for (const n of e)
|
|
695
695
|
n.checked ? t.push(n) : r.push(n);
|
|
@@ -700,13 +700,13 @@ function Jt(e) {
|
|
|
700
700
|
unchecked: r.length
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
var
|
|
704
|
-
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--)
|
|
705
705
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
706
|
-
return n && o &&
|
|
707
|
-
},
|
|
708
|
-
|
|
709
|
-
let ye = class extends
|
|
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 {
|
|
710
710
|
constructor(t, r, n, o) {
|
|
711
711
|
super();
|
|
712
712
|
N(this, "_filterBy$", new Pe(
|
|
@@ -714,7 +714,7 @@ let ye = class extends Ot {
|
|
|
714
714
|
/* VALUES */
|
|
715
715
|
));
|
|
716
716
|
N(this, "filterBy$", this._filterBy$.asObservable());
|
|
717
|
-
N(this, "_filterByModel$", new
|
|
717
|
+
N(this, "_filterByModel$", new xi(1));
|
|
718
718
|
N(this, "filterByModel$", this._filterByModel$.asObservable());
|
|
719
719
|
N(this, "_filterByModel", null);
|
|
720
720
|
N(this, "_hasCriteria$", new Pe(!1));
|
|
@@ -783,7 +783,7 @@ let ye = class extends Ot {
|
|
|
783
783
|
this._disposePreviousModel();
|
|
784
784
|
const n = t.getRange();
|
|
785
785
|
if (n.startRow === n.endRow) return !1;
|
|
786
|
-
const o =
|
|
786
|
+
const o = yt.fromFilterColumn(
|
|
787
787
|
this._injector,
|
|
788
788
|
t,
|
|
789
789
|
r
|
|
@@ -797,7 +797,7 @@ let ye = class extends Ot {
|
|
|
797
797
|
this._disposePreviousModel();
|
|
798
798
|
const n = t.getRange();
|
|
799
799
|
if (n.startRow === n.endRow) return !1;
|
|
800
|
-
const o =
|
|
800
|
+
const o = bt.fromFilterColumn(
|
|
801
801
|
this._injector,
|
|
802
802
|
t,
|
|
803
803
|
r,
|
|
@@ -813,16 +813,16 @@ let ye = class extends Ot {
|
|
|
813
813
|
(t = this._filterByModel) == null || t.dispose(), this.filterByModel = null;
|
|
814
814
|
}
|
|
815
815
|
};
|
|
816
|
-
ye =
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
816
|
+
ye = Er([
|
|
817
|
+
De(0, D(it)),
|
|
818
|
+
De(1, D(ee)),
|
|
819
|
+
De(2, ur),
|
|
820
|
+
De(3, D(uo))
|
|
821
821
|
], ye);
|
|
822
|
-
let
|
|
822
|
+
let bt = class extends It {
|
|
823
823
|
constructor(t, r, n, o, a) {
|
|
824
824
|
super();
|
|
825
|
-
N(this, "canApply$",
|
|
825
|
+
N(this, "canApply$", ot(!0));
|
|
826
826
|
N(this, "_conditionItem$");
|
|
827
827
|
N(this, "conditionItem$");
|
|
828
828
|
N(this, "_filterConditionFormParams$");
|
|
@@ -842,7 +842,7 @@ let St = class extends Ot {
|
|
|
842
842
|
*/
|
|
843
843
|
static fromFilterColumn(t, r, n, o) {
|
|
844
844
|
const [a, i] = R.testMappingFilterColumn(o == null ? void 0 : o.getColumnData());
|
|
845
|
-
return t.createInstance(
|
|
845
|
+
return t.createInstance(bt, r, n, a, i);
|
|
846
846
|
}
|
|
847
847
|
get conditionItem() {
|
|
848
848
|
return this._conditionItem$.getValue();
|
|
@@ -857,7 +857,7 @@ let St = class extends Ot {
|
|
|
857
857
|
this.col += t;
|
|
858
858
|
}
|
|
859
859
|
clear() {
|
|
860
|
-
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(
|
|
860
|
+
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(He.id, {
|
|
861
861
|
unitId: this._filterModel.unitId,
|
|
862
862
|
subUnitId: this._filterModel.subUnitId,
|
|
863
863
|
col: this.col,
|
|
@@ -870,7 +870,7 @@ let St = class extends Ot {
|
|
|
870
870
|
async apply() {
|
|
871
871
|
if (this._disposed) return !1;
|
|
872
872
|
const t = R.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
|
|
873
|
-
return this._commandService.executeCommand(
|
|
873
|
+
return this._commandService.executeCommand(He.id, {
|
|
874
874
|
unitId: this._filterModel.unitId,
|
|
875
875
|
subUnitId: this._filterModel.subUnitId,
|
|
876
876
|
col: this.col,
|
|
@@ -904,10 +904,10 @@ let St = class extends Ot {
|
|
|
904
904
|
this._filterConditionFormParams$.next(r);
|
|
905
905
|
}
|
|
906
906
|
};
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
],
|
|
910
|
-
let
|
|
907
|
+
bt = Er([
|
|
908
|
+
De(4, ae)
|
|
909
|
+
], bt);
|
|
910
|
+
let yt = class extends It {
|
|
911
911
|
constructor(t, r, n, o) {
|
|
912
912
|
super();
|
|
913
913
|
N(this, "_rawFilterItems$");
|
|
@@ -918,11 +918,11 @@ let Et = class extends Ot {
|
|
|
918
918
|
N(this, "_manuallyUpdateFilterItems$");
|
|
919
919
|
N(this, "_searchString$");
|
|
920
920
|
N(this, "searchString$");
|
|
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
|
|
922
|
-
|
|
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([
|
|
923
923
|
this._searchString$.pipe(
|
|
924
|
-
|
|
925
|
-
|
|
924
|
+
Rn(500, void 0, { leading: !0, trailing: !0 }),
|
|
925
|
+
Tn(void 0)
|
|
926
926
|
),
|
|
927
927
|
this._rawFilterItems$
|
|
928
928
|
]).pipe(
|
|
@@ -936,7 +936,7 @@ let Et = class extends Ot {
|
|
|
936
936
|
})
|
|
937
937
|
),
|
|
938
938
|
this._manuallyUpdateFilterItems$
|
|
939
|
-
).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));
|
|
940
940
|
}
|
|
941
941
|
/**
|
|
942
942
|
* Create a model with targeting filter column. If there is not a filter column, the model would be created with
|
|
@@ -949,25 +949,25 @@ let Et = class extends Ot {
|
|
|
949
949
|
* @returns the model to control the panel's state
|
|
950
950
|
*/
|
|
951
951
|
static fromFilterColumn(t, r, n) {
|
|
952
|
-
var
|
|
953
|
-
const o = t.get(
|
|
952
|
+
var A;
|
|
953
|
+
const o = t.get(ur), a = t.get(Te), { unitId: i, subUnitId: s } = r, l = o.getUniverSheetInstance(i);
|
|
954
954
|
if (!l) throw new Error(`[ByValuesModel]: Workbook not found for filter model with unitId: ${i}!`);
|
|
955
955
|
const u = l == null ? void 0 : l.getSheetBySheetId(s);
|
|
956
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 = (
|
|
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
958
|
let C = 0, O = 0;
|
|
959
959
|
for (const F of u.iterateByColumn(g, !1, !1)) {
|
|
960
|
-
const { row: L, rowSpan:
|
|
960
|
+
const { row: L, rowSpan: H = 1 } = F;
|
|
961
961
|
let W = 0;
|
|
962
|
-
for (; W <
|
|
962
|
+
for (; W < H; ) {
|
|
963
963
|
const q = L + W;
|
|
964
964
|
if (S.has(q)) {
|
|
965
965
|
W++;
|
|
966
966
|
continue;
|
|
967
967
|
}
|
|
968
|
-
const k = F != null && F.value ?
|
|
968
|
+
const k = F != null && F.value ? Oi(F.value) : "";
|
|
969
969
|
if (!k) {
|
|
970
|
-
O += 1, W +=
|
|
970
|
+
O += 1, W += H;
|
|
971
971
|
continue;
|
|
972
972
|
}
|
|
973
973
|
if (_[k])
|
|
@@ -997,7 +997,7 @@ let Et = class extends Ot {
|
|
|
997
997
|
};
|
|
998
998
|
p.push(F);
|
|
999
999
|
}
|
|
1000
|
-
return t.createInstance(
|
|
1000
|
+
return t.createInstance(yt, r, n, p);
|
|
1001
1001
|
}
|
|
1002
1002
|
get rawFilterItems() {
|
|
1003
1003
|
return this._rawFilterItems$.getValue();
|
|
@@ -1035,7 +1035,7 @@ let Et = class extends Ot {
|
|
|
1035
1035
|
// expose method here to let the panel change filter items
|
|
1036
1036
|
// #region ByValuesModel apply methods
|
|
1037
1037
|
clear() {
|
|
1038
|
-
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(
|
|
1038
|
+
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(He.id, {
|
|
1039
1039
|
unitId: this._filterModel.unitId,
|
|
1040
1040
|
subUnitId: this._filterModel.subUnitId,
|
|
1041
1041
|
col: this.col,
|
|
@@ -1048,11 +1048,11 @@ let Et = class extends Ot {
|
|
|
1048
1048
|
async apply() {
|
|
1049
1049
|
if (this._disposed)
|
|
1050
1050
|
return !1;
|
|
1051
|
-
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 };
|
|
1052
1052
|
if (a)
|
|
1053
1053
|
throw new Error("[ByValuesModel]: no checked items!");
|
|
1054
1054
|
if (i)
|
|
1055
|
-
return this._commandService.executeCommand(
|
|
1055
|
+
return this._commandService.executeCommand(He.id, {
|
|
1056
1056
|
unitId: this._filterModel.unitId,
|
|
1057
1057
|
subUnitId: this._filterModel.subUnitId,
|
|
1058
1058
|
col: this.col,
|
|
@@ -1063,7 +1063,7 @@ let Et = class extends Ot {
|
|
|
1063
1063
|
const l = n.filter((c) => !c.isEmpty);
|
|
1064
1064
|
l.length > 0 && (s.filters = { filters: l.map((c) => c.value) }), l.length !== n.length && (s.filters.blank = !0);
|
|
1065
1065
|
}
|
|
1066
|
-
return this._commandService.executeCommand(
|
|
1066
|
+
return this._commandService.executeCommand(He.id, {
|
|
1067
1067
|
unitId: this._filterModel.unitId,
|
|
1068
1068
|
subUnitId: this._filterModel.subUnitId,
|
|
1069
1069
|
col: this.col,
|
|
@@ -1072,77 +1072,77 @@ let Et = class extends Ot {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
// #endregion
|
|
1074
1074
|
};
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
],
|
|
1078
|
-
const
|
|
1075
|
+
yt = Er([
|
|
1076
|
+
De(3, ae)
|
|
1077
|
+
], yt);
|
|
1078
|
+
const Be = "FILTER_PANEL_OPENED", Rt = {
|
|
1079
1079
|
id: "sheet.operation.open-filter-panel",
|
|
1080
1080
|
type: Re.OPERATION,
|
|
1081
1081
|
handler: (e, t) => {
|
|
1082
|
-
const r = e.get(
|
|
1083
|
-
e.get(ae).syncExecuteCommand(
|
|
1082
|
+
const r = e.get(Mt), n = e.get(ee), o = e.get(ye);
|
|
1083
|
+
e.get(ae).syncExecuteCommand(Qi.id, { visible: !1 });
|
|
1084
1084
|
const { unitId: i, subUnitId: s, col: l } = t, u = n.getFilterModel(i, s);
|
|
1085
|
-
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);
|
|
1086
1086
|
}
|
|
1087
1087
|
}, qe = {
|
|
1088
1088
|
id: "sheet.operation.close-filter-panel",
|
|
1089
1089
|
type: Re.OPERATION,
|
|
1090
1090
|
handler: (e) => {
|
|
1091
|
-
const t = e.get(
|
|
1092
|
-
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;
|
|
1093
1093
|
}
|
|
1094
|
-
},
|
|
1094
|
+
}, $n = {
|
|
1095
1095
|
id: "sheet.operation.apply-filter",
|
|
1096
1096
|
type: Re.OPERATION,
|
|
1097
1097
|
handler: (e, t) => {
|
|
1098
1098
|
const { filterBy: r } = t;
|
|
1099
1099
|
return e.get(ye).changeFilterBy(r);
|
|
1100
1100
|
}
|
|
1101
|
-
},
|
|
1102
|
-
sheetsFilterPanel:
|
|
1103
|
-
sheetsFilterPanelHeader:
|
|
1104
|
-
sheetsFilterPanelContent:
|
|
1105
|
-
sheetsFilterPanelSelectAll:
|
|
1106
|
-
sheetsFilterPanelSelectAllCount:
|
|
1107
|
-
sheetsFilterPanelValuesContainer:
|
|
1108
|
-
inputAffixWrapper:
|
|
1109
|
-
select:
|
|
1110
|
-
radioGroup:
|
|
1111
|
-
sheetsFilterPanelValuesFind:
|
|
1112
|
-
sheetsFilterPanelValuesList:
|
|
1113
|
-
sheetsFilterPanelValuesListInnerContainer:
|
|
1114
|
-
sheetsFilterPanelValuesVirtual:
|
|
1115
|
-
sheetsFilterPanelValuesItem:
|
|
1116
|
-
sheetsFilterPanelValuesItemInner:
|
|
1117
|
-
sheetsFilterPanelValuesItemCount:
|
|
1118
|
-
sheetsFilterPanelValuesItemExcludeButton:
|
|
1119
|
-
sheetsFilterPanelValuesItemText:
|
|
1120
|
-
sheetsFilterPanelConditionsContainer:
|
|
1121
|
-
sheetsFilterPanelConditionsContainerInner:
|
|
1122
|
-
sheetsFilterPanelConditionsDesc:
|
|
1123
|
-
sheetsFilterPanelFooter:
|
|
1124
|
-
sheetsFilterPanelFooterPrimaryButtons:
|
|
1125
|
-
button:
|
|
1126
|
-
input:
|
|
1127
|
-
formDualColumnLayout:
|
|
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
|
|
1128
1128
|
};
|
|
1129
|
-
function
|
|
1130
|
-
const { model: t } = e, r =
|
|
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
1131
|
t.onConditionFormChange({ and: O === "AND" });
|
|
1132
|
-
}, [t]), g =
|
|
1132
|
+
}, [t]), g = es(r), p = fe((O) => {
|
|
1133
1133
|
t.onPrimaryConditionChange(O);
|
|
1134
|
-
}, [t]), _ =
|
|
1134
|
+
}, [t]), _ = ts(r), b = fe((O) => {
|
|
1135
1135
|
t.onConditionFormChange(O);
|
|
1136
1136
|
}, [t]), S = r.t("sheets-filter.panel.input-values-placeholder");
|
|
1137
|
-
function C(O, B,
|
|
1137
|
+
function C(O, B, A) {
|
|
1138
1138
|
const F = R.getItemByOperator(O).numOfParameters === 1;
|
|
1139
|
-
return /* @__PURE__ */ T.createElement(T.Fragment, null,
|
|
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 }) }));
|
|
1140
1140
|
}
|
|
1141
|
-
return /* @__PURE__ */ T.createElement("div", { className:
|
|
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);
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1143
|
+
function es(e) {
|
|
1144
1144
|
const t = e.getCurrentLocale();
|
|
1145
|
-
return
|
|
1145
|
+
return Sr(
|
|
1146
1146
|
() => [
|
|
1147
1147
|
{
|
|
1148
1148
|
options: [
|
|
@@ -1186,22 +1186,22 @@ function Yo(e) {
|
|
|
1186
1186
|
[t, e]
|
|
1187
1187
|
);
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function ts(e) {
|
|
1190
1190
|
const t = e.getCurrentLocale();
|
|
1191
|
-
return
|
|
1191
|
+
return Sr(
|
|
1192
1192
|
() => R.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: e.t(r.label), value: r.operator })),
|
|
1193
1193
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1194
1194
|
[t, e]
|
|
1195
1195
|
);
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
return
|
|
1197
|
+
function rt() {
|
|
1198
|
+
return rt = Object.assign ? Object.assign.bind() : function(e) {
|
|
1199
1199
|
for (var t = 1; t < arguments.length; t++) {
|
|
1200
1200
|
var r = arguments[t];
|
|
1201
1201
|
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
1202
1202
|
}
|
|
1203
1203
|
return e;
|
|
1204
|
-
},
|
|
1204
|
+
}, rt.apply(null, arguments);
|
|
1205
1205
|
}
|
|
1206
1206
|
function se(e) {
|
|
1207
1207
|
"@babel/helpers - typeof";
|
|
@@ -1211,7 +1211,7 @@ function se(e) {
|
|
|
1211
1211
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1212
1212
|
}, se(e);
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function rs(e, t) {
|
|
1215
1215
|
if (se(e) != "object" || !e) return e;
|
|
1216
1216
|
var r = e[Symbol.toPrimitive];
|
|
1217
1217
|
if (r !== void 0) {
|
|
@@ -1221,19 +1221,19 @@ function Ko(e, t) {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
return (t === "string" ? String : Number)(e);
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1225
|
-
var t =
|
|
1224
|
+
function Dn(e) {
|
|
1225
|
+
var t = rs(e, "string");
|
|
1226
1226
|
return se(t) == "symbol" ? t : t + "";
|
|
1227
1227
|
}
|
|
1228
1228
|
function K(e, t, r) {
|
|
1229
|
-
return (t =
|
|
1229
|
+
return (t = Dn(t)) in e ? Object.defineProperty(e, t, {
|
|
1230
1230
|
value: r,
|
|
1231
1231
|
enumerable: !0,
|
|
1232
1232
|
configurable: !0,
|
|
1233
1233
|
writable: !0
|
|
1234
1234
|
}) : e[t] = r, e;
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1236
|
+
function Kr(e, t) {
|
|
1237
1237
|
var r = Object.keys(e);
|
|
1238
1238
|
if (Object.getOwnPropertySymbols) {
|
|
1239
1239
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -1246,18 +1246,18 @@ function zr(e, t) {
|
|
|
1246
1246
|
function G(e) {
|
|
1247
1247
|
for (var t = 1; t < arguments.length; t++) {
|
|
1248
1248
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1249
|
-
t % 2 ?
|
|
1249
|
+
t % 2 ? Kr(Object(r), !0).forEach(function(n) {
|
|
1250
1250
|
K(e, n, r[n]);
|
|
1251
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
1251
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Kr(Object(r)).forEach(function(n) {
|
|
1252
1252
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
1255
1255
|
return e;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function ns(e) {
|
|
1258
1258
|
if (Array.isArray(e)) return e;
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function is(e, t) {
|
|
1261
1261
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1262
1262
|
if (r != null) {
|
|
1263
1263
|
var n, o, a, i, s = [], l = !0, u = !1;
|
|
@@ -1278,26 +1278,26 @@ function Zo(e, t) {
|
|
|
1278
1278
|
return s;
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function qr(e, t) {
|
|
1282
1282
|
(t == null || t > e.length) && (t = e.length);
|
|
1283
1283
|
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1284
1284
|
return n;
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function os(e, t) {
|
|
1287
1287
|
if (e) {
|
|
1288
|
-
if (typeof e == "string") return
|
|
1288
|
+
if (typeof e == "string") return qr(e, t);
|
|
1289
1289
|
var r = {}.toString.call(e).slice(8, -1);
|
|
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) ?
|
|
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;
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function ss() {
|
|
1294
1294
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1295
1295
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1296
1296
|
}
|
|
1297
1297
|
function Q(e, t) {
|
|
1298
|
-
return
|
|
1298
|
+
return ns(e) || is(e, t) || os(e, t) || ss();
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function as(e, t) {
|
|
1301
1301
|
if (e == null) return {};
|
|
1302
1302
|
var r = {};
|
|
1303
1303
|
for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
|
|
@@ -1306,19 +1306,19 @@ function ts(e, t) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
return r;
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function ls(e, t) {
|
|
1310
1310
|
if (e == null) return {};
|
|
1311
|
-
var r, n, o =
|
|
1311
|
+
var r, n, o = as(e, t);
|
|
1312
1312
|
if (Object.getOwnPropertySymbols) {
|
|
1313
1313
|
var a = Object.getOwnPropertySymbols(e);
|
|
1314
1314
|
for (n = 0; n < a.length; n++) r = a[n], t.indexOf(r) >= 0 || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
|
|
1315
1315
|
}
|
|
1316
1316
|
return o;
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function us(e) {
|
|
1319
1319
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1320
1320
|
}
|
|
1321
|
-
var
|
|
1321
|
+
var Hn = { exports: {} };
|
|
1322
1322
|
/*!
|
|
1323
1323
|
Copyright (c) 2018 Jed Watson.
|
|
1324
1324
|
Licensed under the MIT License (MIT), see
|
|
@@ -1353,10 +1353,10 @@ var An = { exports: {} };
|
|
|
1353
1353
|
}
|
|
1354
1354
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1355
1355
|
})();
|
|
1356
|
-
})(
|
|
1357
|
-
var
|
|
1358
|
-
const
|
|
1359
|
-
var
|
|
1356
|
+
})(Hn);
|
|
1357
|
+
var cs = Hn.exports;
|
|
1358
|
+
const Tt = /* @__PURE__ */ us(cs);
|
|
1359
|
+
var Un = { exports: {} }, M = {};
|
|
1360
1360
|
/**
|
|
1361
1361
|
* @license React
|
|
1362
1362
|
* react-is.production.min.js
|
|
@@ -1366,50 +1366,50 @@ var wn = { exports: {} }, M = {};
|
|
|
1366
1366
|
* This source code is licensed under the MIT license found in the
|
|
1367
1367
|
* LICENSE file in the root directory of this source tree.
|
|
1368
1368
|
*/
|
|
1369
|
-
var
|
|
1370
|
-
|
|
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");
|
|
1371
1371
|
function le(e) {
|
|
1372
1372
|
if (typeof e == "object" && e !== null) {
|
|
1373
1373
|
var t = e.$$typeof;
|
|
1374
1374
|
switch (t) {
|
|
1375
|
-
case
|
|
1375
|
+
case br:
|
|
1376
1376
|
switch (e = e.type, e) {
|
|
1377
|
-
case
|
|
1378
|
-
case
|
|
1379
|
-
case
|
|
1380
|
-
case
|
|
1381
|
-
case
|
|
1377
|
+
case wt:
|
|
1378
|
+
case Lt:
|
|
1379
|
+
case At:
|
|
1380
|
+
case Ut:
|
|
1381
|
+
case xt:
|
|
1382
1382
|
return e;
|
|
1383
1383
|
default:
|
|
1384
1384
|
switch (e = e && e.$$typeof, e) {
|
|
1385
|
-
case
|
|
1386
|
-
case
|
|
1387
|
-
case Lt:
|
|
1388
|
-
case xt:
|
|
1385
|
+
case fs:
|
|
1386
|
+
case Dt:
|
|
1389
1387
|
case Ht:
|
|
1390
|
-
case
|
|
1388
|
+
case Wt:
|
|
1389
|
+
case Bt:
|
|
1390
|
+
case $t:
|
|
1391
1391
|
return e;
|
|
1392
1392
|
default:
|
|
1393
1393
|
return t;
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
case
|
|
1396
|
+
case yr:
|
|
1397
1397
|
return t;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
|
-
M.ContextConsumer =
|
|
1402
|
-
M.ContextProvider =
|
|
1403
|
-
M.Element =
|
|
1404
|
-
M.ForwardRef =
|
|
1405
|
-
M.Fragment =
|
|
1406
|
-
M.Lazy =
|
|
1407
|
-
M.Memo =
|
|
1408
|
-
M.Portal =
|
|
1409
|
-
M.Profiler =
|
|
1410
|
-
M.StrictMode =
|
|
1411
|
-
M.Suspense =
|
|
1412
|
-
M.SuspenseList =
|
|
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
1413
|
M.isAsyncMode = function() {
|
|
1414
1414
|
return !1;
|
|
1415
1415
|
};
|
|
@@ -1417,105 +1417,105 @@ M.isConcurrentMode = function() {
|
|
|
1417
1417
|
return !1;
|
|
1418
1418
|
};
|
|
1419
1419
|
M.isContextConsumer = function(e) {
|
|
1420
|
-
return le(e) ===
|
|
1420
|
+
return le(e) === Dt;
|
|
1421
1421
|
};
|
|
1422
1422
|
M.isContextProvider = function(e) {
|
|
1423
|
-
return le(e) ===
|
|
1423
|
+
return le(e) === $t;
|
|
1424
1424
|
};
|
|
1425
1425
|
M.isElement = function(e) {
|
|
1426
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
1426
|
+
return typeof e == "object" && e !== null && e.$$typeof === br;
|
|
1427
1427
|
};
|
|
1428
1428
|
M.isForwardRef = function(e) {
|
|
1429
|
-
return le(e) ===
|
|
1429
|
+
return le(e) === Ht;
|
|
1430
1430
|
};
|
|
1431
1431
|
M.isFragment = function(e) {
|
|
1432
|
-
return le(e) ===
|
|
1432
|
+
return le(e) === wt;
|
|
1433
1433
|
};
|
|
1434
1434
|
M.isLazy = function(e) {
|
|
1435
|
-
return le(e) ===
|
|
1435
|
+
return le(e) === Wt;
|
|
1436
1436
|
};
|
|
1437
1437
|
M.isMemo = function(e) {
|
|
1438
|
-
return le(e) ===
|
|
1438
|
+
return le(e) === Bt;
|
|
1439
1439
|
};
|
|
1440
1440
|
M.isPortal = function(e) {
|
|
1441
|
-
return le(e) ===
|
|
1441
|
+
return le(e) === yr;
|
|
1442
1442
|
};
|
|
1443
1443
|
M.isProfiler = function(e) {
|
|
1444
|
-
return le(e) ===
|
|
1444
|
+
return le(e) === Lt;
|
|
1445
1445
|
};
|
|
1446
1446
|
M.isStrictMode = function(e) {
|
|
1447
|
-
return le(e) ===
|
|
1447
|
+
return le(e) === At;
|
|
1448
1448
|
};
|
|
1449
1449
|
M.isSuspense = function(e) {
|
|
1450
|
-
return le(e) ===
|
|
1450
|
+
return le(e) === Ut;
|
|
1451
1451
|
};
|
|
1452
1452
|
M.isSuspenseList = function(e) {
|
|
1453
|
-
return le(e) ===
|
|
1453
|
+
return le(e) === xt;
|
|
1454
1454
|
};
|
|
1455
1455
|
M.isValidElementType = function(e) {
|
|
1456
|
-
return typeof e == "string" || typeof e == "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);
|
|
1457
1457
|
};
|
|
1458
1458
|
M.typeOf = le;
|
|
1459
|
-
|
|
1460
|
-
var Ze =
|
|
1461
|
-
function
|
|
1459
|
+
Un.exports = M;
|
|
1460
|
+
var Ze = Un.exports;
|
|
1461
|
+
function nr(e) {
|
|
1462
1462
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [];
|
|
1463
1463
|
return T.Children.forEach(e, function(n) {
|
|
1464
|
-
n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat(
|
|
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));
|
|
1465
1465
|
}), r;
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function Zr(e) {
|
|
1468
1468
|
return e instanceof HTMLElement || e instanceof SVGElement;
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1471
|
-
return e && se(e) === "object" &&
|
|
1470
|
+
function ds(e) {
|
|
1471
|
+
return e && se(e) === "object" && Zr(e.nativeElement) ? e.nativeElement : Zr(e) ? e : null;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1474
|
-
var t =
|
|
1473
|
+
function St(e) {
|
|
1474
|
+
var t = ds(e);
|
|
1475
1475
|
if (t)
|
|
1476
1476
|
return t;
|
|
1477
1477
|
if (e instanceof T.Component) {
|
|
1478
1478
|
var r;
|
|
1479
|
-
return (r =
|
|
1479
|
+
return (r = Yr.findDOMNode) === null || r === void 0 ? void 0 : r.call(Yr, e);
|
|
1480
1480
|
}
|
|
1481
1481
|
return null;
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1483
|
+
function ms(e, t, r) {
|
|
1484
1484
|
var n = d.useRef({});
|
|
1485
1485
|
return (!("value" in n.current) || r(n.current.condition, t)) && (n.current.value = e(), n.current.condition = t), n.current.value;
|
|
1486
1486
|
}
|
|
1487
|
-
var
|
|
1487
|
+
var vs = function(t, r) {
|
|
1488
1488
|
typeof t == "function" ? t(r) : se(t) === "object" && t && "current" in t && (t.current = r);
|
|
1489
|
-
},
|
|
1489
|
+
}, ps = function() {
|
|
1490
1490
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1491
1491
|
r[n] = arguments[n];
|
|
1492
1492
|
var o = r.filter(Boolean);
|
|
1493
1493
|
return o.length <= 1 ? o[0] : function(a) {
|
|
1494
1494
|
r.forEach(function(i) {
|
|
1495
|
-
|
|
1495
|
+
vs(i, a);
|
|
1496
1496
|
});
|
|
1497
1497
|
};
|
|
1498
|
-
},
|
|
1498
|
+
}, _s = function() {
|
|
1499
1499
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1500
1500
|
r[n] = arguments[n];
|
|
1501
|
-
return
|
|
1502
|
-
return
|
|
1501
|
+
return ms(function() {
|
|
1502
|
+
return ps.apply(void 0, r);
|
|
1503
1503
|
}, r, function(o, a) {
|
|
1504
1504
|
return o.length !== a.length || o.every(function(i, s) {
|
|
1505
1505
|
return i !== a[s];
|
|
1506
1506
|
});
|
|
1507
1507
|
});
|
|
1508
|
-
},
|
|
1508
|
+
}, gs = function(t) {
|
|
1509
1509
|
var r, n, o = Ze.isMemo(t) ? t.type.type : t.type;
|
|
1510
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);
|
|
1511
1511
|
};
|
|
1512
|
-
function
|
|
1513
|
-
return /* @__PURE__ */
|
|
1512
|
+
function Jr(e) {
|
|
1513
|
+
return /* @__PURE__ */ vo(e) && !Ze.isFragment(e);
|
|
1514
1514
|
}
|
|
1515
|
-
Number(
|
|
1516
|
-
var
|
|
1517
|
-
function
|
|
1518
|
-
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) {
|
|
1519
1519
|
n.current += 1;
|
|
1520
1520
|
var c = n.current;
|
|
1521
1521
|
o.current.push({
|
|
@@ -1526,11 +1526,11 @@ function ds(e) {
|
|
|
1526
1526
|
c === n.current && (r == null || r(o.current), o.current = []);
|
|
1527
1527
|
}), a == null || a(s, l, u);
|
|
1528
1528
|
}, [r, a]);
|
|
1529
|
-
return /* @__PURE__ */ d.createElement(
|
|
1529
|
+
return /* @__PURE__ */ d.createElement(ir.Provider, {
|
|
1530
1530
|
value: i
|
|
1531
1531
|
}, t);
|
|
1532
1532
|
}
|
|
1533
|
-
var
|
|
1533
|
+
var Bn = function() {
|
|
1534
1534
|
if (typeof Map < "u")
|
|
1535
1535
|
return Map;
|
|
1536
1536
|
function e(t, r) {
|
|
@@ -1576,27 +1576,27 @@ var $n = function() {
|
|
|
1576
1576
|
}, t;
|
|
1577
1577
|
}()
|
|
1578
1578
|
);
|
|
1579
|
-
}(),
|
|
1579
|
+
}(), or = typeof window < "u" && typeof document < "u" && window.document === document, Ft = function() {
|
|
1580
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")();
|
|
1581
|
-
}(),
|
|
1582
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
1581
|
+
}(), Es = function() {
|
|
1582
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Ft) : function(e) {
|
|
1583
1583
|
return setTimeout(function() {
|
|
1584
1584
|
return e(Date.now());
|
|
1585
1585
|
}, 1e3 / 60);
|
|
1586
1586
|
};
|
|
1587
|
-
}(),
|
|
1588
|
-
function
|
|
1587
|
+
}(), bs = 2;
|
|
1588
|
+
function ys(e, t) {
|
|
1589
1589
|
var r = !1, n = !1, o = 0;
|
|
1590
1590
|
function a() {
|
|
1591
1591
|
r && (r = !1, e()), n && s();
|
|
1592
1592
|
}
|
|
1593
1593
|
function i() {
|
|
1594
|
-
|
|
1594
|
+
Es(a);
|
|
1595
1595
|
}
|
|
1596
1596
|
function s() {
|
|
1597
1597
|
var l = Date.now();
|
|
1598
1598
|
if (r) {
|
|
1599
|
-
if (l - o <
|
|
1599
|
+
if (l - o < bs)
|
|
1600
1600
|
return;
|
|
1601
1601
|
n = !0;
|
|
1602
1602
|
} else
|
|
@@ -1605,11 +1605,11 @@ function ps(e, t) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
return s;
|
|
1607
1607
|
}
|
|
1608
|
-
var
|
|
1608
|
+
var Rs = 20, Ts = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Fs = typeof MutationObserver < "u", Os = (
|
|
1609
1609
|
/** @class */
|
|
1610
1610
|
function() {
|
|
1611
1611
|
function e() {
|
|
1612
|
-
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);
|
|
1613
1613
|
}
|
|
1614
1614
|
return e.prototype.addObserver = function(t) {
|
|
1615
1615
|
~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
|
|
@@ -1627,16 +1627,16 @@ var _s = 20, gs = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1627
1627
|
return r.broadcastActive();
|
|
1628
1628
|
}), t.length > 0;
|
|
1629
1629
|
}, e.prototype.connect_ = function() {
|
|
1630
|
-
!
|
|
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, {
|
|
1631
1631
|
attributes: !0,
|
|
1632
1632
|
childList: !0,
|
|
1633
1633
|
characterData: !0,
|
|
1634
1634
|
subtree: !0
|
|
1635
1635
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
1636
1636
|
}, e.prototype.disconnect_ = function() {
|
|
1637
|
-
!
|
|
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);
|
|
1638
1638
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
1639
|
-
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) {
|
|
1640
1640
|
return !!~n.indexOf(a);
|
|
1641
1641
|
});
|
|
1642
1642
|
o && this.refresh();
|
|
@@ -1644,7 +1644,7 @@ var _s = 20, gs = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1644
1644
|
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
1645
1645
|
}, e.instance_ = null, e;
|
|
1646
1646
|
}()
|
|
1647
|
-
),
|
|
1647
|
+
), Wn = function(e, t) {
|
|
1648
1648
|
for (var r = 0, n = Object.keys(t); r < n.length; r++) {
|
|
1649
1649
|
var o = n[r];
|
|
1650
1650
|
Object.defineProperty(e, o, {
|
|
@@ -1655,59 +1655,59 @@ var _s = 20, gs = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1655
1655
|
});
|
|
1656
1656
|
}
|
|
1657
1657
|
return e;
|
|
1658
|
-
},
|
|
1658
|
+
}, We = function(e) {
|
|
1659
1659
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
1660
|
-
return t ||
|
|
1661
|
-
},
|
|
1662
|
-
function
|
|
1660
|
+
return t || Ft;
|
|
1661
|
+
}, Vn = Vt(0, 0, 0, 0);
|
|
1662
|
+
function Ot(e) {
|
|
1663
1663
|
return parseFloat(e) || 0;
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function en(e) {
|
|
1666
1666
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
1667
1667
|
t[r - 1] = arguments[r];
|
|
1668
1668
|
return t.reduce(function(n, o) {
|
|
1669
1669
|
var a = e["border-" + o + "-width"];
|
|
1670
|
-
return n +
|
|
1670
|
+
return n + Ot(a);
|
|
1671
1671
|
}, 0);
|
|
1672
1672
|
}
|
|
1673
|
-
function
|
|
1673
|
+
function Cs(e) {
|
|
1674
1674
|
for (var t = ["top", "right", "bottom", "left"], r = {}, n = 0, o = t; n < o.length; n++) {
|
|
1675
1675
|
var a = o[n], i = e["padding-" + a];
|
|
1676
|
-
r[a] =
|
|
1676
|
+
r[a] = Ot(i);
|
|
1677
1677
|
}
|
|
1678
1678
|
return r;
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1680
|
+
function Ps(e) {
|
|
1681
1681
|
var t = e.getBBox();
|
|
1682
|
-
return
|
|
1682
|
+
return Vt(0, 0, t.width, t.height);
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1684
|
+
function Ns(e) {
|
|
1685
1685
|
var t = e.clientWidth, r = e.clientHeight;
|
|
1686
1686
|
if (!t && !r)
|
|
1687
|
-
return
|
|
1688
|
-
var n =
|
|
1689
|
-
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)) {
|
|
1690
1690
|
var u = Math.round(s + a) - t, c = Math.round(l + i) - r;
|
|
1691
1691
|
Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
|
|
1692
1692
|
}
|
|
1693
|
-
return
|
|
1693
|
+
return Vt(o.left, o.top, s, l);
|
|
1694
1694
|
}
|
|
1695
|
-
var
|
|
1695
|
+
var Is = /* @__PURE__ */ function() {
|
|
1696
1696
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
1697
|
-
return e instanceof
|
|
1697
|
+
return e instanceof We(e).SVGGraphicsElement;
|
|
1698
1698
|
} : function(e) {
|
|
1699
|
-
return e instanceof
|
|
1699
|
+
return e instanceof We(e).SVGElement && typeof e.getBBox == "function";
|
|
1700
1700
|
};
|
|
1701
1701
|
}();
|
|
1702
|
-
function
|
|
1703
|
-
return e ===
|
|
1702
|
+
function Ms(e) {
|
|
1703
|
+
return e === We(e).document.documentElement;
|
|
1704
1704
|
}
|
|
1705
|
-
function
|
|
1706
|
-
return
|
|
1705
|
+
function ws(e) {
|
|
1706
|
+
return or ? Is(e) ? Ps(e) : Ns(e) : Vn;
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1708
|
+
function As(e) {
|
|
1709
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);
|
|
1710
|
-
return
|
|
1710
|
+
return Wn(i, {
|
|
1711
1711
|
x: t,
|
|
1712
1712
|
y: r,
|
|
1713
1713
|
width: n,
|
|
@@ -1718,37 +1718,37 @@ function Cs(e) {
|
|
|
1718
1718
|
left: t
|
|
1719
1719
|
}), i;
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function Vt(e, t, r, n) {
|
|
1722
1722
|
return { x: e, y: t, width: r, height: n };
|
|
1723
1723
|
}
|
|
1724
|
-
var
|
|
1724
|
+
var Ls = (
|
|
1725
1725
|
/** @class */
|
|
1726
1726
|
function() {
|
|
1727
1727
|
function e(t) {
|
|
1728
|
-
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;
|
|
1729
1729
|
}
|
|
1730
1730
|
return e.prototype.isActive = function() {
|
|
1731
|
-
var t =
|
|
1731
|
+
var t = ws(this.target);
|
|
1732
1732
|
return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
|
|
1733
1733
|
}, e.prototype.broadcastRect = function() {
|
|
1734
1734
|
var t = this.contentRect_;
|
|
1735
1735
|
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
|
|
1736
1736
|
}, e;
|
|
1737
1737
|
}()
|
|
1738
|
-
),
|
|
1738
|
+
), $s = (
|
|
1739
1739
|
/** @class */
|
|
1740
1740
|
/* @__PURE__ */ function() {
|
|
1741
1741
|
function e(t, r) {
|
|
1742
|
-
var n =
|
|
1743
|
-
|
|
1742
|
+
var n = As(r);
|
|
1743
|
+
Wn(this, { target: t, contentRect: n });
|
|
1744
1744
|
}
|
|
1745
1745
|
return e;
|
|
1746
1746
|
}()
|
|
1747
|
-
),
|
|
1747
|
+
), Ds = (
|
|
1748
1748
|
/** @class */
|
|
1749
1749
|
function() {
|
|
1750
1750
|
function e(t, r, n) {
|
|
1751
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
1751
|
+
if (this.activeObservations_ = [], this.observations_ = new Bn(), typeof t != "function")
|
|
1752
1752
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
1753
1753
|
this.callback_ = t, this.controller_ = r, this.callbackCtx_ = n;
|
|
1754
1754
|
}
|
|
@@ -1756,16 +1756,16 @@ var Ps = (
|
|
|
1756
1756
|
if (!arguments.length)
|
|
1757
1757
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1758
1758
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1759
|
-
if (!(t instanceof
|
|
1759
|
+
if (!(t instanceof We(t).Element))
|
|
1760
1760
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1761
1761
|
var r = this.observations_;
|
|
1762
|
-
r.has(t) || (r.set(t, new
|
|
1762
|
+
r.has(t) || (r.set(t, new Ls(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
1763
1763
|
}
|
|
1764
1764
|
}, e.prototype.unobserve = function(t) {
|
|
1765
1765
|
if (!arguments.length)
|
|
1766
1766
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1767
1767
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1768
|
-
if (!(t instanceof
|
|
1768
|
+
if (!(t instanceof We(t).Element))
|
|
1769
1769
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1770
1770
|
var r = this.observations_;
|
|
1771
1771
|
r.has(t) && (r.delete(t), r.size || this.controller_.removeObserver(this));
|
|
@@ -1780,7 +1780,7 @@ var Ps = (
|
|
|
1780
1780
|
}, e.prototype.broadcastActive = function() {
|
|
1781
1781
|
if (this.hasActive()) {
|
|
1782
1782
|
var t = this.callbackCtx_, r = this.activeObservations_.map(function(n) {
|
|
1783
|
-
return new
|
|
1783
|
+
return new $s(n.target, n.broadcastRect());
|
|
1784
1784
|
});
|
|
1785
1785
|
this.callback_.call(t, r, t), this.clearActive();
|
|
1786
1786
|
}
|
|
@@ -1790,7 +1790,7 @@ var Ps = (
|
|
|
1790
1790
|
return this.activeObservations_.length > 0;
|
|
1791
1791
|
}, e;
|
|
1792
1792
|
}()
|
|
1793
|
-
),
|
|
1793
|
+
), jn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Bn(), kn = (
|
|
1794
1794
|
/** @class */
|
|
1795
1795
|
/* @__PURE__ */ function() {
|
|
1796
1796
|
function e(t) {
|
|
@@ -1798,8 +1798,8 @@ var Ps = (
|
|
|
1798
1798
|
throw new TypeError("Cannot call a class as a function.");
|
|
1799
1799
|
if (!arguments.length)
|
|
1800
1800
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1801
|
-
var r =
|
|
1802
|
-
|
|
1801
|
+
var r = Os.getInstance(), n = new Ds(t, r, this);
|
|
1802
|
+
jn.set(this, n);
|
|
1803
1803
|
}
|
|
1804
1804
|
return e;
|
|
1805
1805
|
}()
|
|
@@ -1809,15 +1809,15 @@ var Ps = (
|
|
|
1809
1809
|
"unobserve",
|
|
1810
1810
|
"disconnect"
|
|
1811
1811
|
].forEach(function(e) {
|
|
1812
|
-
|
|
1812
|
+
kn.prototype[e] = function() {
|
|
1813
1813
|
var t;
|
|
1814
|
-
return (t =
|
|
1814
|
+
return (t = jn.get(this))[e].apply(t, arguments);
|
|
1815
1815
|
};
|
|
1816
1816
|
});
|
|
1817
|
-
var
|
|
1818
|
-
return typeof
|
|
1817
|
+
var Hs = function() {
|
|
1818
|
+
return typeof Ft.ResizeObserver < "u" ? Ft.ResizeObserver : kn;
|
|
1819
1819
|
}(), be = /* @__PURE__ */ new Map();
|
|
1820
|
-
function
|
|
1820
|
+
function Us(e) {
|
|
1821
1821
|
e.forEach(function(t) {
|
|
1822
1822
|
var r, n = t.target;
|
|
1823
1823
|
(r = be.get(n)) === null || r === void 0 || r.forEach(function(o) {
|
|
@@ -1825,33 +1825,33 @@ function As(e) {
|
|
|
1825
1825
|
});
|
|
1826
1826
|
});
|
|
1827
1827
|
}
|
|
1828
|
-
var
|
|
1829
|
-
function
|
|
1830
|
-
be.has(e) || (be.set(e, /* @__PURE__ */ new Set()),
|
|
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);
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1833
|
-
be.has(e) && (be.get(e).delete(t), be.get(e).size || (
|
|
1832
|
+
function Bs(e, t) {
|
|
1833
|
+
be.has(e) && (be.get(e).delete(t), be.get(e).size || (zn.unobserve(e), be.delete(e)));
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function Qn(e, t) {
|
|
1836
1836
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function Ws(e, t) {
|
|
1839
1839
|
for (var r = 0; r < t.length; r++) {
|
|
1840
1840
|
var n = t[r];
|
|
1841
|
-
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);
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1845
|
-
return t &&
|
|
1844
|
+
function Gn(e, t, r) {
|
|
1845
|
+
return t && Ws(e.prototype, t), Object.defineProperty(e, "prototype", {
|
|
1846
1846
|
writable: !1
|
|
1847
1847
|
}), e;
|
|
1848
1848
|
}
|
|
1849
|
-
function
|
|
1850
|
-
return
|
|
1849
|
+
function sr(e, t) {
|
|
1850
|
+
return sr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
|
|
1851
1851
|
return r.__proto__ = n, r;
|
|
1852
|
-
},
|
|
1852
|
+
}, sr(e, t);
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1854
|
+
function Vs(e, t) {
|
|
1855
1855
|
if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1856
1856
|
e.prototype = Object.create(t && t.prototype, {
|
|
1857
1857
|
constructor: {
|
|
@@ -1861,66 +1861,66 @@ function Ds(e, t) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
}), Object.defineProperty(e, "prototype", {
|
|
1863
1863
|
writable: !1
|
|
1864
|
-
}), t &&
|
|
1864
|
+
}), t && sr(e, t);
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1867
|
-
return
|
|
1866
|
+
function Ct(e) {
|
|
1867
|
+
return Ct = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1868
1868
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1869
|
-
},
|
|
1869
|
+
}, Ct(e);
|
|
1870
1870
|
}
|
|
1871
|
-
function
|
|
1871
|
+
function Yn() {
|
|
1872
1872
|
try {
|
|
1873
1873
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1874
1874
|
}));
|
|
1875
1875
|
} catch {
|
|
1876
1876
|
}
|
|
1877
|
-
return (
|
|
1877
|
+
return (Yn = function() {
|
|
1878
1878
|
return !!e;
|
|
1879
1879
|
})();
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1881
|
+
function js(e) {
|
|
1882
1882
|
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1883
1883
|
return e;
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function ks(e, t) {
|
|
1886
1886
|
if (t && (se(t) == "object" || typeof t == "function")) return t;
|
|
1887
1887
|
if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1888
|
-
return
|
|
1888
|
+
return js(e);
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1891
|
-
var t =
|
|
1890
|
+
function zs(e) {
|
|
1891
|
+
var t = Yn();
|
|
1892
1892
|
return function() {
|
|
1893
|
-
var r, n =
|
|
1893
|
+
var r, n = Ct(e);
|
|
1894
1894
|
if (t) {
|
|
1895
|
-
var o =
|
|
1895
|
+
var o = Ct(this).constructor;
|
|
1896
1896
|
r = Reflect.construct(n, arguments, o);
|
|
1897
1897
|
} else r = n.apply(this, arguments);
|
|
1898
|
-
return
|
|
1898
|
+
return ks(this, r);
|
|
1899
1899
|
};
|
|
1900
1900
|
}
|
|
1901
|
-
var
|
|
1902
|
-
|
|
1903
|
-
var t =
|
|
1901
|
+
var Qs = /* @__PURE__ */ function(e) {
|
|
1902
|
+
Vs(r, e);
|
|
1903
|
+
var t = zs(r);
|
|
1904
1904
|
function r() {
|
|
1905
|
-
return
|
|
1905
|
+
return Qn(this, r), t.apply(this, arguments);
|
|
1906
1906
|
}
|
|
1907
|
-
return
|
|
1907
|
+
return Gn(r, [{
|
|
1908
1908
|
key: "render",
|
|
1909
1909
|
value: function() {
|
|
1910
1910
|
return this.props.children;
|
|
1911
1911
|
}
|
|
1912
1912
|
}]), r;
|
|
1913
1913
|
}(d.Component);
|
|
1914
|
-
function
|
|
1915
|
-
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({
|
|
1916
1916
|
width: -1,
|
|
1917
1917
|
height: -1,
|
|
1918
1918
|
offsetWidth: -1,
|
|
1919
1919
|
offsetHeight: -1
|
|
1920
|
-
}), c = !s && /* @__PURE__ */ d.isValidElement(l) &&
|
|
1920
|
+
}), c = !s && /* @__PURE__ */ d.isValidElement(l) && gs(l), h = c ? l.ref : null, v = _s(h, o), f = function() {
|
|
1921
1921
|
var b;
|
|
1922
|
-
return
|
|
1923
|
-
(o.current && se(o.current) === "object" ?
|
|
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);
|
|
1924
1924
|
};
|
|
1925
1925
|
d.useImperativeHandle(t, function() {
|
|
1926
1926
|
return f();
|
|
@@ -1928,16 +1928,16 @@ function Ws(e, t) {
|
|
|
1928
1928
|
var g = d.useRef(e);
|
|
1929
1929
|
g.current = e;
|
|
1930
1930
|
var p = d.useCallback(function(_) {
|
|
1931
|
-
var b = g.current, S = b.onResize, C = b.data, O = _.getBoundingClientRect(), B = O.width,
|
|
1932
|
-
if (u.current.width !==
|
|
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
1933
|
var q = {
|
|
1934
|
-
width:
|
|
1934
|
+
width: H,
|
|
1935
1935
|
height: W,
|
|
1936
1936
|
offsetWidth: F,
|
|
1937
1937
|
offsetHeight: L
|
|
1938
1938
|
};
|
|
1939
1939
|
u.current = q;
|
|
1940
|
-
var k = F === Math.round(B) ? B : F, te = L === Math.round(
|
|
1940
|
+
var k = F === Math.round(B) ? B : F, te = L === Math.round(A) ? A : L, z = G(G({}, q), {}, {
|
|
1941
1941
|
offsetWidth: k,
|
|
1942
1942
|
offsetHeight: te
|
|
1943
1943
|
});
|
|
@@ -1948,29 +1948,29 @@ function Ws(e, t) {
|
|
|
1948
1948
|
}, []);
|
|
1949
1949
|
return d.useEffect(function() {
|
|
1950
1950
|
var _ = f();
|
|
1951
|
-
return _ && !n &&
|
|
1952
|
-
return
|
|
1951
|
+
return _ && !n && xs(_, p), function() {
|
|
1952
|
+
return Bs(_, p);
|
|
1953
1953
|
};
|
|
1954
|
-
}, [o.current, n]), /* @__PURE__ */ d.createElement(
|
|
1954
|
+
}, [o.current, n]), /* @__PURE__ */ d.createElement(Qs, {
|
|
1955
1955
|
ref: a
|
|
1956
1956
|
}, c ? /* @__PURE__ */ d.cloneElement(l, {
|
|
1957
1957
|
ref: v
|
|
1958
1958
|
}) : l);
|
|
1959
1959
|
}
|
|
1960
|
-
var
|
|
1961
|
-
function
|
|
1962
|
-
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);
|
|
1963
1963
|
return n.map(function(o, a) {
|
|
1964
|
-
var i = (o == null ? void 0 : o.key) || "".concat(
|
|
1965
|
-
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, {
|
|
1966
1966
|
key: i,
|
|
1967
1967
|
ref: a === 0 ? t : void 0
|
|
1968
1968
|
}), o);
|
|
1969
1969
|
});
|
|
1970
1970
|
}
|
|
1971
|
-
var
|
|
1972
|
-
|
|
1973
|
-
function
|
|
1971
|
+
var Rr = /* @__PURE__ */ d.forwardRef(Ks);
|
|
1972
|
+
Rr.Collection = Ss;
|
|
1973
|
+
function tn(e) {
|
|
1974
1974
|
var t = d.useRef();
|
|
1975
1975
|
t.current = e;
|
|
1976
1976
|
var r = d.useCallback(function() {
|
|
@@ -1980,19 +1980,19 @@ function Kr(e) {
|
|
|
1980
1980
|
}, []);
|
|
1981
1981
|
return r;
|
|
1982
1982
|
}
|
|
1983
|
-
function
|
|
1983
|
+
function qs() {
|
|
1984
1984
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
1985
1985
|
}
|
|
1986
|
-
var
|
|
1986
|
+
var rn = qs() ? d.useLayoutEffect : d.useEffect, Je = function(t, r) {
|
|
1987
1987
|
var n = d.useRef(!0);
|
|
1988
|
-
|
|
1988
|
+
rn(function() {
|
|
1989
1989
|
return t(n.current);
|
|
1990
|
-
}, r),
|
|
1990
|
+
}, r), rn(function() {
|
|
1991
1991
|
return n.current = !1, function() {
|
|
1992
1992
|
n.current = !0;
|
|
1993
1993
|
};
|
|
1994
1994
|
}, []);
|
|
1995
|
-
},
|
|
1995
|
+
}, Xn = /* @__PURE__ */ d.forwardRef(function(e, t) {
|
|
1996
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 = {
|
|
1997
1997
|
display: "flex",
|
|
1998
1998
|
flexDirection: "column"
|
|
@@ -2005,19 +2005,19 @@ var qr = zs() ? d.useLayoutEffect : d.useEffect, Je = function(t, r) {
|
|
|
2005
2005
|
transform: "translateY(".concat(n, "px)")
|
|
2006
2006
|
}, u ? "marginRight" : "marginLeft", -o), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ d.createElement("div", {
|
|
2007
2007
|
style: h
|
|
2008
|
-
}, /* @__PURE__ */ d.createElement(
|
|
2008
|
+
}, /* @__PURE__ */ d.createElement(Rr, {
|
|
2009
2009
|
onResize: function(g) {
|
|
2010
2010
|
var p = g.offsetHeight;
|
|
2011
2011
|
p && s && s();
|
|
2012
2012
|
}
|
|
2013
|
-
}, /* @__PURE__ */ d.createElement("div",
|
|
2013
|
+
}, /* @__PURE__ */ d.createElement("div", rt({
|
|
2014
2014
|
style: v,
|
|
2015
|
-
className:
|
|
2015
|
+
className: Tt(K({}, "".concat(i, "-holder-inner"), i)),
|
|
2016
2016
|
ref: t
|
|
2017
2017
|
}, l), a, c)));
|
|
2018
2018
|
});
|
|
2019
|
-
|
|
2020
|
-
function
|
|
2019
|
+
Xn.displayName = "Filler";
|
|
2020
|
+
function Zs(e) {
|
|
2021
2021
|
var t = e.children, r = e.setRef, n = d.useCallback(function(o) {
|
|
2022
2022
|
r(o);
|
|
2023
2023
|
}, []);
|
|
@@ -2025,7 +2025,7 @@ function Qs(e) {
|
|
|
2025
2025
|
ref: n
|
|
2026
2026
|
});
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function Js(e, t, r, n, o, a, i, s) {
|
|
2029
2029
|
var l = s.getKey;
|
|
2030
2030
|
return e.slice(t, r + 1).map(function(u, c) {
|
|
2031
2031
|
var h = t + c, v = i(u, h, {
|
|
@@ -2034,7 +2034,7 @@ function Gs(e, t, r, n, o, a, i, s) {
|
|
|
2034
2034
|
},
|
|
2035
2035
|
offsetX: o
|
|
2036
2036
|
}), f = l(u);
|
|
2037
|
-
return /* @__PURE__ */ d.createElement(
|
|
2037
|
+
return /* @__PURE__ */ d.createElement(Zs, {
|
|
2038
2038
|
key: f,
|
|
2039
2039
|
setRef: function(p) {
|
|
2040
2040
|
return a(u, p);
|
|
@@ -2042,7 +2042,7 @@ function Gs(e, t, r, n, o, a, i, s) {
|
|
|
2042
2042
|
}, v);
|
|
2043
2043
|
});
|
|
2044
2044
|
}
|
|
2045
|
-
function
|
|
2045
|
+
function ea(e, t, r) {
|
|
2046
2046
|
var n = e.length, o = t.length, a, i;
|
|
2047
2047
|
if (n === 0 && o === 0)
|
|
2048
2048
|
return null;
|
|
@@ -2065,56 +2065,56 @@ function Ys(e, t, r) {
|
|
|
2065
2065
|
multiple: c
|
|
2066
2066
|
};
|
|
2067
2067
|
}
|
|
2068
|
-
function
|
|
2068
|
+
function ta(e, t, r) {
|
|
2069
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];
|
|
2070
2070
|
return d.useEffect(function() {
|
|
2071
|
-
var h =
|
|
2071
|
+
var h = ea(a || [], e || [], t);
|
|
2072
2072
|
(h == null ? void 0 : h.index) !== void 0 && c(e[h.index]), i(e);
|
|
2073
2073
|
}, [e]), [u];
|
|
2074
2074
|
}
|
|
2075
|
-
var
|
|
2075
|
+
var Kn = function(t) {
|
|
2076
2076
|
return +setTimeout(t, 16);
|
|
2077
|
-
},
|
|
2077
|
+
}, qn = function(t) {
|
|
2078
2078
|
return clearTimeout(t);
|
|
2079
2079
|
};
|
|
2080
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
2080
|
+
typeof window < "u" && "requestAnimationFrame" in window && (Kn = function(t) {
|
|
2081
2081
|
return window.requestAnimationFrame(t);
|
|
2082
|
-
},
|
|
2082
|
+
}, qn = function(t) {
|
|
2083
2083
|
return window.cancelAnimationFrame(t);
|
|
2084
2084
|
});
|
|
2085
|
-
var
|
|
2086
|
-
function
|
|
2087
|
-
|
|
2085
|
+
var nn = 0, Tr = /* @__PURE__ */ new Map();
|
|
2086
|
+
function Zn(e) {
|
|
2087
|
+
Tr.delete(e);
|
|
2088
2088
|
}
|
|
2089
2089
|
var he = function(t) {
|
|
2090
2090
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
2091
|
-
|
|
2092
|
-
var n =
|
|
2091
|
+
nn += 1;
|
|
2092
|
+
var n = nn;
|
|
2093
2093
|
function o(a) {
|
|
2094
2094
|
if (a === 0)
|
|
2095
|
-
|
|
2095
|
+
Zn(n), t();
|
|
2096
2096
|
else {
|
|
2097
|
-
var i =
|
|
2097
|
+
var i = Kn(function() {
|
|
2098
2098
|
o(a - 1);
|
|
2099
2099
|
});
|
|
2100
|
-
|
|
2100
|
+
Tr.set(n, i);
|
|
2101
2101
|
}
|
|
2102
2102
|
}
|
|
2103
2103
|
return o(r), n;
|
|
2104
2104
|
};
|
|
2105
2105
|
he.cancel = function(e) {
|
|
2106
|
-
var t =
|
|
2107
|
-
return
|
|
2106
|
+
var t = Tr.get(e);
|
|
2107
|
+
return Zn(e), qn(t);
|
|
2108
2108
|
};
|
|
2109
|
-
var
|
|
2110
|
-
const
|
|
2111
|
-
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);
|
|
2112
2112
|
function i() {
|
|
2113
2113
|
clearTimeout(a.current), o.current = !0, a.current = setTimeout(function() {
|
|
2114
2114
|
o.current = !1;
|
|
2115
2115
|
}, 50);
|
|
2116
2116
|
}
|
|
2117
|
-
var s =
|
|
2117
|
+
var s = w({
|
|
2118
2118
|
top: e,
|
|
2119
2119
|
bottom: t,
|
|
2120
2120
|
left: r,
|
|
@@ -2130,27 +2130,27 @@ const Yn = function(e, t, r, n) {
|
|
|
2130
2130
|
return c && h ? (clearTimeout(a.current), o.current = !1) : (!h || o.current) && i(), !o.current && h;
|
|
2131
2131
|
};
|
|
2132
2132
|
};
|
|
2133
|
-
function
|
|
2134
|
-
var s =
|
|
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
2135
|
function v(S, C) {
|
|
2136
|
-
he.cancel(l.current), s.current += C, u.current = C, !h(!1, C) && (
|
|
2136
|
+
he.cancel(l.current), s.current += C, u.current = C, !h(!1, C) && (on || S.preventDefault(), l.current = he(function() {
|
|
2137
2137
|
var O = c.current ? 10 : 1;
|
|
2138
2138
|
i(s.current * O), s.current = 0;
|
|
2139
2139
|
}));
|
|
2140
2140
|
}
|
|
2141
2141
|
function f(S, C) {
|
|
2142
|
-
i(C, !0),
|
|
2142
|
+
i(C, !0), on || S.preventDefault();
|
|
2143
2143
|
}
|
|
2144
|
-
var g =
|
|
2144
|
+
var g = w(null), p = w(null);
|
|
2145
2145
|
function _(S) {
|
|
2146
2146
|
if (e) {
|
|
2147
2147
|
he.cancel(p.current), p.current = he(function() {
|
|
2148
2148
|
g.current = null;
|
|
2149
2149
|
}, 2);
|
|
2150
|
-
var C = S.deltaX, O = S.deltaY, B = S.shiftKey,
|
|
2151
|
-
(g.current === "sx" || !g.current && B && O && !C) && (
|
|
2152
|
-
var L = Math.abs(
|
|
2153
|
-
g.current === null && (g.current = a && L >
|
|
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);
|
|
2154
2154
|
}
|
|
2155
2155
|
}
|
|
2156
2156
|
function b(S) {
|
|
@@ -2158,7 +2158,7 @@ function Ks(e, t, r, n, o, a, i) {
|
|
|
2158
2158
|
}
|
|
2159
2159
|
return [_, b];
|
|
2160
2160
|
}
|
|
2161
|
-
function
|
|
2161
|
+
function na(e, t, r, n) {
|
|
2162
2162
|
var o = d.useMemo(function() {
|
|
2163
2163
|
return [/* @__PURE__ */ new Map(), []];
|
|
2164
2164
|
}, [e, r.id, n]), a = Q(o, 2), i = a[0], s = a[1], l = function(c) {
|
|
@@ -2178,11 +2178,11 @@ function qs(e, t, r, n) {
|
|
|
2178
2178
|
};
|
|
2179
2179
|
return l;
|
|
2180
2180
|
}
|
|
2181
|
-
var
|
|
2181
|
+
var ia = /* @__PURE__ */ function() {
|
|
2182
2182
|
function e() {
|
|
2183
|
-
|
|
2183
|
+
Qn(this, e), K(this, "maps", void 0), K(this, "id", 0), this.maps = /* @__PURE__ */ Object.create(null);
|
|
2184
2184
|
}
|
|
2185
|
-
return
|
|
2185
|
+
return Gn(e, [{
|
|
2186
2186
|
key: "set",
|
|
2187
2187
|
value: function(r, n) {
|
|
2188
2188
|
this.maps[r] = n, this.id += 1;
|
|
@@ -2194,8 +2194,8 @@ var Zs = /* @__PURE__ */ function() {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
}]), e;
|
|
2196
2196
|
}();
|
|
2197
|
-
function
|
|
2198
|
-
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();
|
|
2199
2199
|
function c() {
|
|
2200
2200
|
he.cancel(u.current);
|
|
2201
2201
|
}
|
|
@@ -2205,7 +2205,7 @@ function Js(e, t, r) {
|
|
|
2205
2205
|
var g = function() {
|
|
2206
2206
|
s.current.forEach(function(_, b) {
|
|
2207
2207
|
if (_ && _.offsetParent) {
|
|
2208
|
-
var S =
|
|
2208
|
+
var S = St(_), C = S.offsetHeight;
|
|
2209
2209
|
l.current.get(b) !== C && l.current.set(b, S.offsetHeight);
|
|
2210
2210
|
}
|
|
2211
2211
|
}), i(function(_) {
|
|
@@ -2218,17 +2218,17 @@ function Js(e, t, r) {
|
|
|
2218
2218
|
var p = e(f);
|
|
2219
2219
|
s.current.get(p), g ? (s.current.set(p, g), h()) : s.current.delete(p);
|
|
2220
2220
|
}
|
|
2221
|
-
return
|
|
2221
|
+
return po(function() {
|
|
2222
2222
|
return c;
|
|
2223
2223
|
}, []), [v, h, l.current, a];
|
|
2224
2224
|
}
|
|
2225
|
-
var
|
|
2226
|
-
function
|
|
2227
|
-
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) {
|
|
2228
2228
|
if (n.current) {
|
|
2229
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
2230
|
S ? o.current = g : a.current = p, r(S, S ? _ : b) && f.preventDefault(), clearInterval(s.current), s.current = setInterval(function() {
|
|
2231
|
-
S ? _ *=
|
|
2231
|
+
S ? _ *= sn : b *= sn;
|
|
2232
2232
|
var C = Math.floor(S ? _ : b);
|
|
2233
2233
|
(!r(S, C, !0) || Math.abs(C) <= 0.1) && clearInterval(s.current);
|
|
2234
2234
|
}, 16);
|
|
@@ -2247,11 +2247,11 @@ function ea(e, t, r) {
|
|
|
2247
2247
|
};
|
|
2248
2248
|
}, [e]);
|
|
2249
2249
|
}
|
|
2250
|
-
var
|
|
2251
|
-
function
|
|
2250
|
+
var aa = 10;
|
|
2251
|
+
function la(e, t, r, n, o, a, i, s) {
|
|
2252
2252
|
var l = d.useRef(), u = d.useState(null), c = Q(u, 2), h = c[0], v = c[1];
|
|
2253
2253
|
return Je(function() {
|
|
2254
|
-
if (h && h.times <
|
|
2254
|
+
if (h && h.times < aa) {
|
|
2255
2255
|
if (!e.current) {
|
|
2256
2256
|
v(function(Y) {
|
|
2257
2257
|
return G({}, Y);
|
|
@@ -2261,14 +2261,14 @@ function ra(e, t, r, n, o, a, i, s) {
|
|
|
2261
2261
|
a();
|
|
2262
2262
|
var f = h.targetAlign, g = h.originAlign, p = h.index, _ = h.offset, b = e.current.clientHeight, S = !1, C = f, O = null;
|
|
2263
2263
|
if (b) {
|
|
2264
|
-
for (var B = f || g,
|
|
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
2265
|
var q = o(t[W]);
|
|
2266
|
-
F =
|
|
2266
|
+
F = A;
|
|
2267
2267
|
var k = r.get(q);
|
|
2268
|
-
L = F + (k === void 0 ? n : k),
|
|
2268
|
+
L = F + (k === void 0 ? n : k), A = L;
|
|
2269
2269
|
}
|
|
2270
|
-
for (var te = B === "top" ? _ : b - _, z =
|
|
2271
|
-
var
|
|
2270
|
+
for (var te = B === "top" ? _ : b - _, z = H; z >= 0; z -= 1) {
|
|
2271
|
+
var Ie = o(t[z]), Z = r.get(Ie);
|
|
2272
2272
|
if (Z === void 0) {
|
|
2273
2273
|
S = !0;
|
|
2274
2274
|
break;
|
|
@@ -2318,56 +2318,56 @@ function ra(e, t, r, n, o, a, i, s) {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
};
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function an(e, t) {
|
|
2322
2322
|
var r = "touches" in e ? e.touches[0] : e;
|
|
2323
2323
|
return r[t ? "pageX" : "pageY"];
|
|
2324
2324
|
}
|
|
2325
|
-
var
|
|
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],
|
|
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
2327
|
clearTimeout(Fe.current), Z(!0), Fe.current = setTimeout(function() {
|
|
2328
2328
|
Z(!1);
|
|
2329
2329
|
}, 3e3);
|
|
2330
|
-
}, Y = a - h || 0, je = h - c || 0,
|
|
2330
|
+
}, Y = a - h || 0, je = h - c || 0, U = d.useMemo(function() {
|
|
2331
2331
|
if (o === 0 || Y === 0)
|
|
2332
2332
|
return 0;
|
|
2333
2333
|
var J = o / Y;
|
|
2334
2334
|
return J * je;
|
|
2335
2335
|
}, [o, Y, je]), Oe = function($) {
|
|
2336
2336
|
$.stopPropagation(), $.preventDefault();
|
|
2337
|
-
},
|
|
2338
|
-
top:
|
|
2337
|
+
}, Me = d.useRef({
|
|
2338
|
+
top: U,
|
|
2339
2339
|
dragging: _,
|
|
2340
2340
|
pageY: O,
|
|
2341
2341
|
startTop: L
|
|
2342
2342
|
});
|
|
2343
|
-
|
|
2344
|
-
top:
|
|
2343
|
+
Me.current = {
|
|
2344
|
+
top: U,
|
|
2345
2345
|
dragging: _,
|
|
2346
2346
|
pageY: O,
|
|
2347
2347
|
startTop: L
|
|
2348
2348
|
};
|
|
2349
|
-
var
|
|
2350
|
-
b(!0), B(
|
|
2349
|
+
var we = function($) {
|
|
2350
|
+
b(!0), B(an($, u)), H(Me.current.top), i(), $.stopPropagation(), $.preventDefault();
|
|
2351
2351
|
};
|
|
2352
2352
|
d.useEffect(function() {
|
|
2353
2353
|
var J = function(Ae) {
|
|
2354
2354
|
Ae.preventDefault();
|
|
2355
2355
|
}, $ = q.current, ne = k.current;
|
|
2356
|
-
return $.addEventListener("touchstart", J), ne.addEventListener("touchstart",
|
|
2357
|
-
$.removeEventListener("touchstart", J), ne.removeEventListener("touchstart",
|
|
2356
|
+
return $.addEventListener("touchstart", J), ne.addEventListener("touchstart", we), function() {
|
|
2357
|
+
$.removeEventListener("touchstart", J), ne.removeEventListener("touchstart", we);
|
|
2358
2358
|
};
|
|
2359
2359
|
}, []);
|
|
2360
|
-
var
|
|
2361
|
-
|
|
2360
|
+
var st = d.useRef();
|
|
2361
|
+
st.current = Y;
|
|
2362
2362
|
var ke = d.useRef();
|
|
2363
2363
|
ke.current = je, d.useEffect(function() {
|
|
2364
2364
|
if (_) {
|
|
2365
2365
|
var J, $ = function(Ae) {
|
|
2366
|
-
var ze =
|
|
2367
|
-
if (he.cancel(J),
|
|
2368
|
-
var
|
|
2369
|
-
!W && u ? _e -=
|
|
2370
|
-
var Qe =
|
|
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
2371
|
Ce = Math.max(Ce, 0), Ce = Math.min(Ce, Qe), J = he(function() {
|
|
2372
2372
|
l(Ce, u);
|
|
2373
2373
|
});
|
|
@@ -2388,7 +2388,7 @@ var rn = /* @__PURE__ */ d.forwardRef(function(e, t) {
|
|
|
2388
2388
|
});
|
|
2389
2389
|
var X = "".concat(r, "-scrollbar"), re = {
|
|
2390
2390
|
position: "absolute",
|
|
2391
|
-
visibility:
|
|
2391
|
+
visibility: Ie ? null : "hidden"
|
|
2392
2392
|
}, de = {
|
|
2393
2393
|
position: "absolute",
|
|
2394
2394
|
background: "rgba(0, 0, 0, 0.5)",
|
|
@@ -2396,138 +2396,138 @@ var rn = /* @__PURE__ */ d.forwardRef(function(e, t) {
|
|
|
2396
2396
|
cursor: "pointer",
|
|
2397
2397
|
userSelect: "none"
|
|
2398
2398
|
};
|
|
2399
|
-
return u ? (re.height = 8, re.left = 0, re.right = 0, re.bottom = 0, de.height = "100%", de.width = c, W ? de.left =
|
|
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
2400
|
ref: q,
|
|
2401
|
-
className:
|
|
2401
|
+
className: Tt(X, K(K(K({}, "".concat(X, "-horizontal"), u), "".concat(X, "-vertical"), !u), "".concat(X, "-visible"), Ie)),
|
|
2402
2402
|
style: G(G({}, re), v),
|
|
2403
2403
|
onMouseDown: Oe,
|
|
2404
2404
|
onMouseMove: ue
|
|
2405
2405
|
}, /* @__PURE__ */ d.createElement("div", {
|
|
2406
2406
|
ref: k,
|
|
2407
|
-
className:
|
|
2407
|
+
className: Tt("".concat(X, "-thumb"), K({}, "".concat(X, "-thumb-moving"), _)),
|
|
2408
2408
|
style: G(G({}, de), f),
|
|
2409
|
-
onMouseDown:
|
|
2409
|
+
onMouseDown: we
|
|
2410
2410
|
}));
|
|
2411
|
-
}),
|
|
2412
|
-
function
|
|
2411
|
+
}), ua = 20;
|
|
2412
|
+
function un() {
|
|
2413
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;
|
|
2414
|
-
return isNaN(r) && (r = 0), r = Math.max(r,
|
|
2414
|
+
return isNaN(r) && (r = 0), r = Math.max(r, ua), Math.floor(r);
|
|
2415
2415
|
}
|
|
2416
|
-
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 = {
|
|
2417
2417
|
overflowY: "auto",
|
|
2418
2418
|
overflowAnchor: "none"
|
|
2419
2419
|
};
|
|
2420
|
-
function
|
|
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,
|
|
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
2422
|
return typeof v == "function" ? v(y) : y == null ? void 0 : y[v];
|
|
2423
|
-
}, [v]), W =
|
|
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
2424
|
return Object.values(z.maps).reduce(function(y, E) {
|
|
2425
2425
|
return y + E;
|
|
2426
2426
|
}, 0);
|
|
2427
|
-
}, [z.id, z.maps]), ue = Z && c && (Math.max(i * c.length, Fe) > a || !!p), Y = g === "rtl", je =
|
|
2428
|
-
|
|
2429
|
-
},
|
|
2430
|
-
|
|
2431
|
-
},
|
|
2432
|
-
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
|
|
2433
2433
|
};
|
|
2434
2434
|
function _e(y) {
|
|
2435
2435
|
re(function(E) {
|
|
2436
2436
|
var I;
|
|
2437
2437
|
typeof y == "function" ? I = y(E) : I = y;
|
|
2438
|
-
var V =
|
|
2438
|
+
var V = hi(I);
|
|
2439
2439
|
return Oe.current.scrollTop = V, V;
|
|
2440
2440
|
});
|
|
2441
2441
|
}
|
|
2442
|
-
var Qe =
|
|
2442
|
+
var Qe = w({
|
|
2443
2443
|
start: 0,
|
|
2444
|
-
end:
|
|
2445
|
-
}),
|
|
2446
|
-
|
|
2447
|
-
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() {
|
|
2448
2448
|
if (!Z)
|
|
2449
2449
|
return {
|
|
2450
2450
|
scrollHeight: void 0,
|
|
2451
2451
|
start: 0,
|
|
2452
|
-
end:
|
|
2452
|
+
end: U.length - 1,
|
|
2453
2453
|
offset: void 0
|
|
2454
2454
|
};
|
|
2455
2455
|
if (!ue) {
|
|
2456
2456
|
var y;
|
|
2457
2457
|
return {
|
|
2458
|
-
scrollHeight: ((y =
|
|
2458
|
+
scrollHeight: ((y = Me.current) === null || y === void 0 ? void 0 : y.offsetHeight) || 0,
|
|
2459
2459
|
start: 0,
|
|
2460
|
-
end:
|
|
2460
|
+
end: U.length - 1,
|
|
2461
2461
|
offset: void 0
|
|
2462
2462
|
};
|
|
2463
2463
|
}
|
|
2464
|
-
for (var E = 0, I, V, ge,
|
|
2465
|
-
var
|
|
2466
|
-
|
|
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;
|
|
2467
2467
|
}
|
|
2468
|
-
return I === void 0 && (I = 0, V = 0, ge = Math.ceil(a / i)), ge === void 0 && (ge =
|
|
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), {
|
|
2469
2469
|
scrollHeight: E,
|
|
2470
2470
|
start: I,
|
|
2471
2471
|
end: ge,
|
|
2472
2472
|
offset: V
|
|
2473
2473
|
};
|
|
2474
|
-
}, [ue, Z, X,
|
|
2474
|
+
}, [ue, Z, X, U, Ie, a]), Le = dt.scrollHeight, Ge = dt.start, Ye = dt.end, Fr = dt.offset;
|
|
2475
2475
|
Qe.current.start = Ge, Qe.current.end = Ye;
|
|
2476
|
-
var
|
|
2476
|
+
var ai = d.useState({
|
|
2477
2477
|
width: 0,
|
|
2478
2478
|
height: a
|
|
2479
|
-
}),
|
|
2480
|
-
|
|
2479
|
+
}), Or = Q(ai, 2), me = Or[0], li = Or[1], ui = function(E) {
|
|
2480
|
+
li({
|
|
2481
2481
|
width: E.width || E.offsetWidth,
|
|
2482
2482
|
height: E.height || E.offsetHeight
|
|
2483
2483
|
});
|
|
2484
|
-
},
|
|
2485
|
-
return
|
|
2486
|
-
}, [me.width, p]),
|
|
2487
|
-
return
|
|
2488
|
-
}, [me.height,
|
|
2489
|
-
|
|
2490
|
-
function
|
|
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
2491
|
var E = y;
|
|
2492
|
-
return Number.isNaN(
|
|
2492
|
+
return Number.isNaN(zt.current) || (E = Math.min(E, zt.current)), E = Math.max(E, 0), E;
|
|
2493
2493
|
}
|
|
2494
|
-
var
|
|
2494
|
+
var Nr = X <= 0, Ir = X >= kt, Mr = $ <= 0, wr = $ >= p, di = Jn(Nr, Ir, Mr, wr), Qt = function() {
|
|
2495
2495
|
return {
|
|
2496
2496
|
x: Y ? -$ : $,
|
|
2497
2497
|
y: X
|
|
2498
2498
|
};
|
|
2499
|
-
},
|
|
2499
|
+
}, Gt = w(Qt()), mt = tn(function(y) {
|
|
2500
2500
|
if (C) {
|
|
2501
|
-
var E = G(G({},
|
|
2502
|
-
(
|
|
2501
|
+
var E = G(G({}, Qt()), y);
|
|
2502
|
+
(Gt.current.x !== E.x || Gt.current.y !== E.y) && (C(E), Gt.current = E);
|
|
2503
2503
|
}
|
|
2504
2504
|
});
|
|
2505
|
-
function
|
|
2505
|
+
function Ar(y, E) {
|
|
2506
2506
|
var I = y;
|
|
2507
|
-
E ? (
|
|
2507
|
+
E ? (Xr(function() {
|
|
2508
2508
|
ne(I);
|
|
2509
|
-
}),
|
|
2509
|
+
}), mt()) : _e(I);
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function mi(y) {
|
|
2512
2512
|
var E = y.currentTarget.scrollTop;
|
|
2513
|
-
E !== X && _e(E), S == null || S(y),
|
|
2513
|
+
E !== X && _e(E), S == null || S(y), mt();
|
|
2514
2514
|
}
|
|
2515
|
-
var
|
|
2515
|
+
var Yt = function(E) {
|
|
2516
2516
|
var I = E, V = p ? p - me.width : 0;
|
|
2517
2517
|
return I = Math.max(I, 0), I = Math.min(I, V), I;
|
|
2518
|
-
},
|
|
2519
|
-
E ? (
|
|
2518
|
+
}, vi = tn(function(y, E) {
|
|
2519
|
+
E ? (Xr(function() {
|
|
2520
2520
|
ne(function(I) {
|
|
2521
2521
|
var V = I + (Y ? -y : y);
|
|
2522
|
-
return
|
|
2522
|
+
return Yt(V);
|
|
2523
2523
|
});
|
|
2524
|
-
}),
|
|
2524
|
+
}), mt()) : _e(function(I) {
|
|
2525
2525
|
var V = I + y;
|
|
2526
2526
|
return V;
|
|
2527
2527
|
});
|
|
2528
|
-
}),
|
|
2529
|
-
|
|
2530
|
-
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({
|
|
2531
2531
|
preventDefault: function() {
|
|
2532
2532
|
},
|
|
2533
2533
|
deltaX: y ? E : 0,
|
|
@@ -2538,109 +2538,109 @@ function aa(e, t) {
|
|
|
2538
2538
|
Z && I.preventDefault();
|
|
2539
2539
|
}
|
|
2540
2540
|
var E = Oe.current;
|
|
2541
|
-
return E.addEventListener("wheel",
|
|
2542
|
-
E.removeEventListener("wheel",
|
|
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);
|
|
2543
2543
|
};
|
|
2544
2544
|
}, [Z]), Je(function() {
|
|
2545
2545
|
if (p) {
|
|
2546
|
-
var y =
|
|
2547
|
-
ne(y),
|
|
2546
|
+
var y = Yt($);
|
|
2547
|
+
ne(y), mt({
|
|
2548
2548
|
x: y
|
|
2549
2549
|
});
|
|
2550
2550
|
}
|
|
2551
2551
|
}, [me.width, p]);
|
|
2552
|
-
var
|
|
2552
|
+
var Dr = function() {
|
|
2553
2553
|
var E, I;
|
|
2554
|
-
(E =
|
|
2555
|
-
},
|
|
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
2556
|
return te(!0);
|
|
2557
|
-
}, _e,
|
|
2557
|
+
}, _e, Dr);
|
|
2558
2558
|
d.useImperativeHandle(t, function() {
|
|
2559
2559
|
return {
|
|
2560
|
-
nativeElement:
|
|
2561
|
-
getScrollInfo:
|
|
2560
|
+
nativeElement: we.current,
|
|
2561
|
+
getScrollInfo: Qt,
|
|
2562
2562
|
scrollTo: function(E) {
|
|
2563
2563
|
function I(V) {
|
|
2564
2564
|
return V && se(V) === "object" && ("left" in V || "top" in V);
|
|
2565
2565
|
}
|
|
2566
|
-
I(E) ? (E.left !== void 0 && ne(
|
|
2566
|
+
I(E) ? (E.left !== void 0 && ne(Yt(E.left)), Hr(E.top)) : Hr(E);
|
|
2567
2567
|
}
|
|
2568
2568
|
};
|
|
2569
2569
|
}), Je(function() {
|
|
2570
2570
|
if (O) {
|
|
2571
|
-
var y =
|
|
2572
|
-
O(y,
|
|
2571
|
+
var y = U.slice(Ge, Ye + 1);
|
|
2572
|
+
O(y, U);
|
|
2573
2573
|
}
|
|
2574
|
-
}, [Ge, Ye,
|
|
2575
|
-
var
|
|
2574
|
+
}, [Ge, Ye, U]);
|
|
2575
|
+
var _i = na(U, H, z, i), gi = A == null ? void 0 : A({
|
|
2576
2576
|
start: Ge,
|
|
2577
2577
|
end: Ye,
|
|
2578
2578
|
virtual: ue,
|
|
2579
2579
|
offsetX: $,
|
|
2580
|
-
offsetY:
|
|
2580
|
+
offsetY: Fr,
|
|
2581
2581
|
rtl: Y,
|
|
2582
|
-
getSize:
|
|
2583
|
-
}),
|
|
2584
|
-
a && (Xe = G(K({}, l ? "height" : "maxHeight", a),
|
|
2585
|
-
var
|
|
2586
|
-
return Y && (
|
|
2587
|
-
ref:
|
|
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({
|
|
2587
|
+
ref: we,
|
|
2588
2588
|
style: G(G({}, u), {}, {
|
|
2589
2589
|
position: "relative"
|
|
2590
2590
|
}),
|
|
2591
2591
|
className: je
|
|
2592
|
-
},
|
|
2593
|
-
onResize:
|
|
2592
|
+
}, Ur, L), /* @__PURE__ */ d.createElement(Rr, {
|
|
2593
|
+
onResize: ui
|
|
2594
2594
|
}, /* @__PURE__ */ d.createElement(b, {
|
|
2595
2595
|
className: "".concat(n, "-holder"),
|
|
2596
2596
|
style: Xe,
|
|
2597
2597
|
ref: Oe,
|
|
2598
|
-
onScroll:
|
|
2599
|
-
onMouseEnter:
|
|
2600
|
-
}, /* @__PURE__ */ d.createElement(
|
|
2598
|
+
onScroll: mi,
|
|
2599
|
+
onMouseEnter: Dr
|
|
2600
|
+
}, /* @__PURE__ */ d.createElement(Xn, {
|
|
2601
2601
|
prefixCls: n,
|
|
2602
|
-
height:
|
|
2602
|
+
height: Le,
|
|
2603
2603
|
offsetX: $,
|
|
2604
|
-
offsetY:
|
|
2604
|
+
offsetY: Fr,
|
|
2605
2605
|
scrollWidth: p,
|
|
2606
2606
|
onInnerResize: te,
|
|
2607
|
-
ref:
|
|
2607
|
+
ref: Me,
|
|
2608
2608
|
innerProps: B,
|
|
2609
2609
|
rtl: Y,
|
|
2610
|
-
extra:
|
|
2611
|
-
},
|
|
2612
|
-
ref:
|
|
2610
|
+
extra: gi
|
|
2611
|
+
}, Si))), ue && Le > a && /* @__PURE__ */ d.createElement(ln, {
|
|
2612
|
+
ref: Cr,
|
|
2613
2613
|
prefixCls: n,
|
|
2614
2614
|
scrollOffset: X,
|
|
2615
|
-
scrollRange:
|
|
2615
|
+
scrollRange: Le,
|
|
2616
2616
|
rtl: Y,
|
|
2617
|
-
onScroll:
|
|
2618
|
-
onStartMove:
|
|
2619
|
-
onStopMove:
|
|
2620
|
-
spinSize:
|
|
2617
|
+
onScroll: Ar,
|
|
2618
|
+
onStartMove: ut,
|
|
2619
|
+
onStopMove: ct,
|
|
2620
|
+
spinSize: fi,
|
|
2621
2621
|
containerSize: me.height,
|
|
2622
2622
|
style: F == null ? void 0 : F.verticalScrollBar,
|
|
2623
2623
|
thumbStyle: F == null ? void 0 : F.verticalScrollBarThumb
|
|
2624
|
-
}), ue && p > me.width && /* @__PURE__ */ d.createElement(
|
|
2625
|
-
ref:
|
|
2624
|
+
}), ue && p > me.width && /* @__PURE__ */ d.createElement(ln, {
|
|
2625
|
+
ref: Pr,
|
|
2626
2626
|
prefixCls: n,
|
|
2627
2627
|
scrollOffset: $,
|
|
2628
2628
|
scrollRange: p,
|
|
2629
2629
|
rtl: Y,
|
|
2630
|
-
onScroll:
|
|
2631
|
-
onStartMove:
|
|
2632
|
-
onStopMove:
|
|
2633
|
-
spinSize:
|
|
2630
|
+
onScroll: Ar,
|
|
2631
|
+
onStartMove: ut,
|
|
2632
|
+
onStopMove: ct,
|
|
2633
|
+
spinSize: ci,
|
|
2634
2634
|
containerSize: me.width,
|
|
2635
2635
|
horizontal: !0,
|
|
2636
2636
|
style: F == null ? void 0 : F.horizontalScrollBar,
|
|
2637
2637
|
thumbStyle: F == null ? void 0 : F.horizontalScrollBarThumb
|
|
2638
2638
|
}));
|
|
2639
2639
|
}
|
|
2640
|
-
var
|
|
2641
|
-
|
|
2642
|
-
function
|
|
2643
|
-
const { model: t } = e, r =
|
|
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
2644
|
t.onFilterCheckToggled(f, g);
|
|
2645
2645
|
}, [t]), c = fe((f) => {
|
|
2646
2646
|
t.onFilterOnly(f);
|
|
@@ -2649,18 +2649,18 @@ function la(e) {
|
|
|
2649
2649
|
}, [t, s]), v = fe((f) => {
|
|
2650
2650
|
t.setSearchString(f);
|
|
2651
2651
|
}, [t]);
|
|
2652
|
-
return /* @__PURE__ */ T.createElement("div", { className:
|
|
2653
|
-
|
|
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,
|
|
2654
2654
|
{
|
|
2655
2655
|
indeterminate: l,
|
|
2656
2656
|
disabled: o.length === 0,
|
|
2657
2657
|
checked: s,
|
|
2658
2658
|
onChange: h
|
|
2659
2659
|
}
|
|
2660
|
-
), /* @__PURE__ */ T.createElement("span", { className:
|
|
2661
|
-
|
|
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,
|
|
2662
2662
|
{
|
|
2663
|
-
className:
|
|
2663
|
+
className: x.sheetsFilterPanelValuesItemExcludeButton,
|
|
2664
2664
|
size: "small",
|
|
2665
2665
|
type: "link",
|
|
2666
2666
|
onClick: () => c(f)
|
|
@@ -2668,90 +2668,90 @@ function la(e) {
|
|
|
2668
2668
|
a
|
|
2669
2669
|
)))))));
|
|
2670
2670
|
}
|
|
2671
|
-
function
|
|
2671
|
+
function va() {
|
|
2672
2672
|
var _;
|
|
2673
|
-
const e =
|
|
2674
|
-
r.executeCommand(
|
|
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 });
|
|
2675
2675
|
}, [r]), u = fe(async () => {
|
|
2676
2676
|
await (o == null ? void 0 : o.clear()), r.executeCommand(qe.id);
|
|
2677
2677
|
}, [o, r]), c = fe(() => {
|
|
2678
2678
|
r.executeCommand(qe.id);
|
|
2679
2679
|
}, [r]), h = fe(async () => {
|
|
2680
2680
|
await (o == null ? void 0 : o.apply()), r.executeCommand(qe.id);
|
|
2681
|
-
}, [o, r]), f = (_ =
|
|
2682
|
-
return /* @__PURE__ */ T.createElement("div", { className:
|
|
2683
|
-
|
|
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
2684
|
{
|
|
2685
2685
|
components: p,
|
|
2686
2686
|
sharedProps: { range: f, colIndex: g, onClose: c }
|
|
2687
2687
|
}
|
|
2688
|
-
), /* @__PURE__ */ T.createElement("div", { className:
|
|
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")))));
|
|
2689
2689
|
}
|
|
2690
|
-
function
|
|
2690
|
+
function pa(e) {
|
|
2691
2691
|
const t = e.getCurrentLocale();
|
|
2692
|
-
return
|
|
2692
|
+
return Sr(
|
|
2693
2693
|
() => [
|
|
2694
|
-
{ label: e.t("sheets-filter.panel.by-values"), value:
|
|
2695
|
-
{ 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 }
|
|
2696
2696
|
],
|
|
2697
2697
|
[t, e]
|
|
2698
2698
|
);
|
|
2699
2699
|
}
|
|
2700
|
-
const
|
|
2700
|
+
const _a = {
|
|
2701
2701
|
id: Ve.id,
|
|
2702
|
-
binding:
|
|
2702
|
+
binding: Li.L | Wr.CTRL_COMMAND | Wr.SHIFT,
|
|
2703
2703
|
description: "sheets-filter.shortcut.smart-toggle-filter",
|
|
2704
|
-
preconditions:
|
|
2704
|
+
preconditions: Yi,
|
|
2705
2705
|
group: "4_sheet-edit"
|
|
2706
2706
|
};
|
|
2707
|
-
function
|
|
2707
|
+
function ga(e) {
|
|
2708
2708
|
const t = e.get(ee);
|
|
2709
2709
|
return {
|
|
2710
2710
|
id: Ve.id,
|
|
2711
|
-
group:
|
|
2712
|
-
type:
|
|
2711
|
+
group: mr.TOOLBAR_FORMULAS_INSERT,
|
|
2712
|
+
type: vr.BUTTON_SELECTOR,
|
|
2713
2713
|
icon: "FilterSingle",
|
|
2714
2714
|
tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
|
|
2715
|
-
positions: [
|
|
2716
|
-
hidden$:
|
|
2715
|
+
positions: [$i.TOOLBAR_START],
|
|
2716
|
+
hidden$: pr(e, Ne.UNIVER_SHEET),
|
|
2717
2717
|
activated$: t.activeFilterModel$.pipe(xe((r) => !!r)),
|
|
2718
|
-
disabled$:
|
|
2718
|
+
disabled$: Xi(e, { workbookTypes: [Jt], worksheetTypes: [er, tr], rangeTypes: [co] })
|
|
2719
2719
|
};
|
|
2720
2720
|
}
|
|
2721
|
-
function
|
|
2721
|
+
function Sa(e) {
|
|
2722
2722
|
const t = e.get(ee);
|
|
2723
2723
|
return {
|
|
2724
|
-
id:
|
|
2725
|
-
group:
|
|
2726
|
-
type:
|
|
2724
|
+
id: wn.id,
|
|
2725
|
+
group: mr.TOOLBAR_OTHERS,
|
|
2726
|
+
type: vr.BUTTON,
|
|
2727
2727
|
title: "sheets-filter.toolbar.clear-filter-criteria",
|
|
2728
2728
|
positions: [Ve.id],
|
|
2729
|
-
hidden$:
|
|
2730
|
-
disabled$: t.activeFilterModel$.pipe(
|
|
2729
|
+
hidden$: pr(e, Ne.UNIVER_SHEET),
|
|
2730
|
+
disabled$: t.activeFilterModel$.pipe(_r((r) => {
|
|
2731
2731
|
var n;
|
|
2732
|
-
return (n = r == null ? void 0 : r.hasCriteria$.pipe(xe((o) => !o))) != null ? n :
|
|
2732
|
+
return (n = r == null ? void 0 : r.hasCriteria$.pipe(xe((o) => !o))) != null ? n : ot(!0);
|
|
2733
2733
|
}))
|
|
2734
2734
|
};
|
|
2735
2735
|
}
|
|
2736
|
-
function
|
|
2736
|
+
function Ea(e) {
|
|
2737
2737
|
const t = e.get(ee);
|
|
2738
2738
|
return {
|
|
2739
|
-
id:
|
|
2740
|
-
group:
|
|
2741
|
-
type:
|
|
2739
|
+
id: An.id,
|
|
2740
|
+
group: mr.TOOLBAR_OTHERS,
|
|
2741
|
+
type: vr.BUTTON,
|
|
2742
2742
|
title: "sheets-filter.toolbar.re-calc-filter-conditions",
|
|
2743
2743
|
positions: [Ve.id],
|
|
2744
|
-
hidden$:
|
|
2745
|
-
disabled$: t.activeFilterModel$.pipe(
|
|
2744
|
+
hidden$: pr(e, Ne.UNIVER_SHEET),
|
|
2745
|
+
disabled$: t.activeFilterModel$.pipe(_r((r) => {
|
|
2746
2746
|
var n;
|
|
2747
|
-
return (n = r == null ? void 0 : r.hasCriteria$.pipe(xe((o) => !o))) != null ? n :
|
|
2747
|
+
return (n = r == null ? void 0 : r.hasCriteria$.pipe(xe((o) => !o))) != null ? n : ot(!0);
|
|
2748
2748
|
}))
|
|
2749
2749
|
};
|
|
2750
2750
|
}
|
|
2751
|
-
const Se = 16,
|
|
2752
|
-
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 {
|
|
2753
2753
|
static drawNoCriteria(t, r, n, o) {
|
|
2754
|
-
t.save(),
|
|
2754
|
+
t.save(), jr.drawWith(t, {
|
|
2755
2755
|
radius: 2,
|
|
2756
2756
|
width: Se,
|
|
2757
2757
|
height: Se,
|
|
@@ -2759,28 +2759,28 @@ class on {
|
|
|
2759
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();
|
|
2760
2760
|
}
|
|
2761
2761
|
static drawHasCriteria(t, r, n, o) {
|
|
2762
|
-
t.save(),
|
|
2762
|
+
t.save(), jr.drawWith(t, {
|
|
2763
2763
|
radius: 2,
|
|
2764
2764
|
width: Se,
|
|
2765
2765
|
height: Se,
|
|
2766
2766
|
fill: o
|
|
2767
|
-
}), 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();
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
2770
|
-
var
|
|
2771
|
-
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--)
|
|
2772
2772
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2773
|
-
return n && o &&
|
|
2774
|
-
},
|
|
2775
|
-
const pe = 16,
|
|
2776
|
-
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 {
|
|
2777
2777
|
constructor(t, r, n, o, a) {
|
|
2778
2778
|
super(t, r);
|
|
2779
2779
|
N(this, "_cellWidth", 0);
|
|
2780
2780
|
N(this, "_cellHeight", 0);
|
|
2781
2781
|
N(this, "_filterParams");
|
|
2782
2782
|
N(this, "_hovered", !1);
|
|
2783
|
-
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());
|
|
2784
2784
|
}
|
|
2785
2785
|
setShapeProps(t) {
|
|
2786
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({
|
|
@@ -2794,14 +2794,14 @@ let ir = class extends qi {
|
|
|
2794
2794
|
const i = new Path2D();
|
|
2795
2795
|
i.rect(o, a, n, r), t.clip(i);
|
|
2796
2796
|
const { hasCriteria: s } = this._filterParams, l = this._themeService.getCurrentTheme().primaryColor, u = this._hovered ? this._themeService.getCurrentTheme().grey50 : "rgba(255, 255, 255, 1.0)";
|
|
2797
|
-
s ?
|
|
2797
|
+
s ? cn.drawHasCriteria(t, pe, l, u) : cn.drawNoCriteria(t, pe, l, u), t.restore();
|
|
2798
2798
|
}
|
|
2799
2799
|
onPointerDown(t) {
|
|
2800
2800
|
if (t.button === 2)
|
|
2801
2801
|
return;
|
|
2802
2802
|
const { col: r, unitId: n, subUnitId: o } = this._filterParams;
|
|
2803
|
-
this._contextService.getContextValue(
|
|
2804
|
-
this._commandService.executeCommand(
|
|
2803
|
+
this._contextService.getContextValue(Be) || !this._commandService.hasCommand(Rt.id) || setTimeout(() => {
|
|
2804
|
+
this._commandService.executeCommand(Rt.id, {
|
|
2805
2805
|
unitId: n,
|
|
2806
2806
|
subUnitId: o,
|
|
2807
2807
|
col: r
|
|
@@ -2815,39 +2815,39 @@ let ir = class extends qi {
|
|
|
2815
2815
|
this._hovered = !1, this.makeDirty(!0);
|
|
2816
2816
|
}
|
|
2817
2817
|
};
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
],
|
|
2823
|
-
var
|
|
2824
|
-
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--)
|
|
2825
2825
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2826
|
-
return n && o &&
|
|
2826
|
+
return n && o && Fa(t, r, o), o;
|
|
2827
2827
|
}, ve = (e, t) => (r, n) => t(r, n, e);
|
|
2828
|
-
const
|
|
2829
|
-
let
|
|
2828
|
+
const Pa = 1e3, Na = 5e3;
|
|
2829
|
+
let lr = class extends mn {
|
|
2830
2830
|
constructor(t, r, n, o, a, i, s, l, u, c) {
|
|
2831
2831
|
super();
|
|
2832
2832
|
N(this, "_filterRangeShape", null);
|
|
2833
2833
|
N(this, "_buttonRenderDisposable", null);
|
|
2834
2834
|
N(this, "_filterButtonShapes", []);
|
|
2835
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, [
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2836
|
+
dr,
|
|
2837
|
+
Ue,
|
|
2838
|
+
_t,
|
|
2839
|
+
Sn
|
|
2840
2840
|
].forEach((h) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(h.id))), this._initRenderer();
|
|
2841
2841
|
}
|
|
2842
2842
|
_initRenderer() {
|
|
2843
|
-
|
|
2843
|
+
yn([
|
|
2844
2844
|
this._selectionRenderService.usable$,
|
|
2845
2845
|
this._sheetSkeletonManagerService.currentSkeleton$
|
|
2846
2846
|
]).pipe(
|
|
2847
|
-
|
|
2848
|
-
|
|
2847
|
+
Vr(([t]) => t),
|
|
2848
|
+
_r(([t, r]) => {
|
|
2849
2849
|
var l, u;
|
|
2850
|
-
if (!r) return
|
|
2850
|
+
if (!r) return ot(null);
|
|
2851
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 = () => ({
|
|
2852
2852
|
unitId: o,
|
|
2853
2853
|
worksheetId: a,
|
|
@@ -2855,17 +2855,17 @@ let or = class extends un {
|
|
|
2855
2855
|
range: i == null ? void 0 : i.getRange(),
|
|
2856
2856
|
skeleton: r.skeleton
|
|
2857
2857
|
});
|
|
2858
|
-
return
|
|
2859
|
-
|
|
2860
|
-
([c]) => c.type === Re.MUTATION && c.params.unitId === n.getUnitId() &&
|
|
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)
|
|
2861
2861
|
),
|
|
2862
|
-
|
|
2862
|
+
Rn(20, void 0, { leading: !1, trailing: !0 }),
|
|
2863
2863
|
xe(s),
|
|
2864
|
-
|
|
2864
|
+
Tn(s())
|
|
2865
2865
|
// must trigger once
|
|
2866
2866
|
);
|
|
2867
2867
|
}),
|
|
2868
|
-
|
|
2868
|
+
ji(this.dispose$)
|
|
2869
2869
|
).subscribe((t) => {
|
|
2870
2870
|
this._disposeRendering(), !(!t || !t.range) && (this._renderRange(t.unitId, t.range, t.skeleton), this._renderButtons(t));
|
|
2871
2871
|
});
|
|
@@ -2878,7 +2878,7 @@ let or = class extends un {
|
|
|
2878
2878
|
range: r,
|
|
2879
2879
|
primary: null,
|
|
2880
2880
|
style: null
|
|
2881
|
-
}), { 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);
|
|
2882
2882
|
c.update(i, l, u, {
|
|
2883
2883
|
hasAutoFill: !1,
|
|
2884
2884
|
fill: "rgba(0, 0, 0, 0.0)",
|
|
@@ -2893,26 +2893,26 @@ let or = class extends un {
|
|
|
2893
2893
|
this._interceptCellContent(t.range);
|
|
2894
2894
|
const { startColumn: u, endColumn: c, startRow: h } = r;
|
|
2895
2895
|
for (let v = u; v <= c; v++) {
|
|
2896
|
-
const f = `sheets-filter-button-${v}`, g =
|
|
2897
|
-
if (O <=
|
|
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)
|
|
2898
2898
|
continue;
|
|
2899
|
-
const B = !!n.getFilterColumn(v),
|
|
2900
|
-
left:
|
|
2899
|
+
const B = !!n.getFilterColumn(v), A = b - pe - vt, F = S - pe - vt, L = {
|
|
2900
|
+
left: A,
|
|
2901
2901
|
top: F,
|
|
2902
2902
|
height: pe,
|
|
2903
2903
|
width: pe,
|
|
2904
|
-
zIndex:
|
|
2904
|
+
zIndex: Na,
|
|
2905
2905
|
cellHeight: O,
|
|
2906
2906
|
cellWidth: C,
|
|
2907
2907
|
filterParams: { unitId: o, subUnitId: i, col: v, hasCriteria: B }
|
|
2908
|
-
},
|
|
2909
|
-
this._filterButtonShapes.push(
|
|
2908
|
+
}, H = this._injector.createInstance(ar, f, L);
|
|
2909
|
+
this._filterButtonShapes.push(H);
|
|
2910
2910
|
}
|
|
2911
2911
|
l.addObjects(this._filterButtonShapes), l.makeDirty();
|
|
2912
2912
|
}
|
|
2913
2913
|
_interceptCellContent(t) {
|
|
2914
2914
|
const { startRow: r, startColumn: n, endColumn: o } = t;
|
|
2915
|
-
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(
|
|
2915
|
+
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(fo.CELL_CONTENT, {
|
|
2916
2916
|
handler: (a, i, s) => {
|
|
2917
2917
|
const { row: l, col: u } = i;
|
|
2918
2918
|
return l !== r || u < n || u > o ? s(a) : s({
|
|
@@ -2933,35 +2933,52 @@ let or = class extends un {
|
|
|
2933
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 = [];
|
|
2934
2934
|
}
|
|
2935
2935
|
};
|
|
2936
|
-
|
|
2937
|
-
ve(1,
|
|
2938
|
-
ve(2,
|
|
2939
|
-
ve(3,
|
|
2940
|
-
ve(4,
|
|
2941
|
-
ve(5,
|
|
2942
|
-
ve(6,
|
|
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
2943
|
ve(7, ae),
|
|
2944
|
-
ve(8,
|
|
2945
|
-
ve(9,
|
|
2946
|
-
],
|
|
2947
|
-
var
|
|
2948
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
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--)
|
|
2949
|
+
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
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--)
|
|
2949
2966
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2950
|
-
return n && o &&
|
|
2967
|
+
return n && o && La(t, r, o), o;
|
|
2951
2968
|
}, ie = (e, t) => (r, n) => t(r, n, e);
|
|
2952
|
-
const
|
|
2953
|
-
let et = class extends
|
|
2969
|
+
const ti = {}, fn = "FILTER_PANEL_POPUP";
|
|
2970
|
+
let et = class extends nt {
|
|
2954
2971
|
constructor(t, r, n, o, a, i, s, l, u, c, h, v, f) {
|
|
2955
|
-
super();
|
|
2972
|
+
super(f);
|
|
2956
2973
|
N(this, "_popupDisposable");
|
|
2957
|
-
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();
|
|
2958
2975
|
}
|
|
2959
2976
|
dispose() {
|
|
2960
2977
|
super.dispose(), this._closeFilterPopup();
|
|
2961
2978
|
}
|
|
2962
2979
|
_initShortcuts() {
|
|
2963
2980
|
[
|
|
2964
|
-
|
|
2981
|
+
_a
|
|
2965
2982
|
].forEach((t) => {
|
|
2966
2983
|
this.disposeWithMe(this._shortcutService.registerShortcut(t));
|
|
2967
2984
|
});
|
|
@@ -2969,11 +2986,11 @@ let et = class extends un {
|
|
|
2969
2986
|
_initCommands() {
|
|
2970
2987
|
[
|
|
2971
2988
|
Ve,
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2989
|
+
He,
|
|
2990
|
+
wn,
|
|
2991
|
+
An,
|
|
2992
|
+
$n,
|
|
2993
|
+
Rt,
|
|
2977
2994
|
qe
|
|
2978
2995
|
].forEach((t) => {
|
|
2979
2996
|
this.disposeWithMe(this._commandService.registerCommand(t));
|
|
@@ -2982,33 +2999,30 @@ let et = class extends un {
|
|
|
2982
2999
|
_initMenuItems() {
|
|
2983
3000
|
const { menu: t = {} } = this._config;
|
|
2984
3001
|
[
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
3002
|
+
ga,
|
|
3003
|
+
Sa,
|
|
3004
|
+
Ea
|
|
2988
3005
|
].forEach((r) => {
|
|
2989
3006
|
this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(r), t));
|
|
2990
3007
|
});
|
|
2991
3008
|
}
|
|
2992
3009
|
_initUI() {
|
|
2993
|
-
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) => {
|
|
2994
3011
|
t ? this._openFilterPopup() : this._closeFilterPopup();
|
|
2995
3012
|
})), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((t) => {
|
|
2996
3013
|
t && this._messageService.show({
|
|
2997
|
-
type:
|
|
3014
|
+
type: Fn.Error,
|
|
2998
3015
|
content: this._localeService.t(t)
|
|
2999
3016
|
});
|
|
3000
3017
|
}));
|
|
3001
3018
|
}
|
|
3002
|
-
_initRenderControllers() {
|
|
3003
|
-
this.disposeWithMe(this._renderManagerService.registerRenderController(We.UNIVER_SHEET, or));
|
|
3004
|
-
}
|
|
3005
3019
|
_openFilterPopup() {
|
|
3006
3020
|
const t = this._sheetsFilterPanelService.filterModel;
|
|
3007
3021
|
if (!t)
|
|
3008
3022
|
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
3009
3023
|
const r = t.getRange(), n = this._sheetsFilterPanelService.col, { startRow: o } = r;
|
|
3010
3024
|
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(o, n, {
|
|
3011
|
-
componentKey:
|
|
3025
|
+
componentKey: fn,
|
|
3012
3026
|
direction: "horizontal",
|
|
3013
3027
|
closeOnSelfTarget: !0,
|
|
3014
3028
|
onClickOutside: () => this._commandService.syncExecuteCommand(qe.id),
|
|
@@ -3020,27 +3034,27 @@ let et = class extends un {
|
|
|
3020
3034
|
(t = this._popupDisposable) == null || t.dispose(), this._popupDisposable = null;
|
|
3021
3035
|
}
|
|
3022
3036
|
};
|
|
3023
|
-
et =
|
|
3024
|
-
|
|
3025
|
-
ie(1,
|
|
3026
|
-
ie(2,
|
|
3027
|
-
ie(3,
|
|
3028
|
-
ie(4,
|
|
3029
|
-
ie(5,
|
|
3030
|
-
ie(6,
|
|
3031
|
-
ie(7,
|
|
3032
|
-
ie(8,
|
|
3033
|
-
ie(9,
|
|
3034
|
-
ie(10,
|
|
3035
|
-
ie(11,
|
|
3036
|
-
ie(12,
|
|
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)
|
|
3037
3051
|
], et);
|
|
3038
|
-
var
|
|
3039
|
-
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--)
|
|
3040
3054
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3041
|
-
return n && o &&
|
|
3042
|
-
},
|
|
3043
|
-
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 {
|
|
3044
3058
|
constructor(e, t, r, n) {
|
|
3045
3059
|
super(), this._sheetsFilterService = e, this._localeService = t, this._commandService = r, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
|
|
3046
3060
|
}
|
|
@@ -3049,42 +3063,42 @@ let _t = class extends Ot {
|
|
|
3049
3063
|
this._commandService.beforeCommandExecuted((e) => {
|
|
3050
3064
|
var t;
|
|
3051
3065
|
if (e.id === Ve.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithoutRange({
|
|
3052
|
-
workbookTypes: [
|
|
3053
|
-
rangeTypes: [
|
|
3054
|
-
worksheetTypes: [
|
|
3055
|
-
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr"))), e.id ===
|
|
3056
|
-
const r = e.params, { unitId: n, subUnitId: o } = r, a = (t = this._sheetsFilterService.getFilterModel(n, o)) == null ? void 0 : t.getRange(), i =
|
|
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);
|
|
3057
3071
|
i && (i.startColumn = r.col, i.endColumn = r.col, this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
3058
|
-
workbookTypes: [
|
|
3059
|
-
rangeTypes: [
|
|
3060
|
-
worksheetTypes: [
|
|
3072
|
+
workbookTypes: [Jt],
|
|
3073
|
+
rangeTypes: [Gr],
|
|
3074
|
+
worksheetTypes: [er, tr]
|
|
3061
3075
|
}, [i]) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr")));
|
|
3062
3076
|
}
|
|
3063
3077
|
})
|
|
3064
3078
|
);
|
|
3065
3079
|
}
|
|
3066
3080
|
};
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
],
|
|
3074
|
-
var
|
|
3075
|
-
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--)
|
|
3076
3090
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3077
|
-
return n && o &&
|
|
3078
|
-
},
|
|
3079
|
-
const
|
|
3080
|
-
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 {
|
|
3081
3095
|
constructor(e = {}, t, r) {
|
|
3082
|
-
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);
|
|
3083
3097
|
}
|
|
3084
3098
|
onStarting(e) {
|
|
3085
3099
|
[
|
|
3086
3100
|
[ye],
|
|
3087
|
-
[
|
|
3101
|
+
[tt],
|
|
3088
3102
|
[
|
|
3089
3103
|
et,
|
|
3090
3104
|
{
|
|
@@ -3094,15 +3108,39 @@ let Ft = class extends Ei {
|
|
|
3094
3108
|
].forEach((t) => e.add(t));
|
|
3095
3109
|
}
|
|
3096
3110
|
};
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
],
|
|
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);
|
|
3127
|
+
}
|
|
3128
|
+
onStarting(e) {
|
|
3129
|
+
[
|
|
3130
|
+
[tt],
|
|
3131
|
+
[nt]
|
|
3132
|
+
].forEach((t) => e.add(t));
|
|
3133
|
+
}
|
|
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);
|
|
3104
3141
|
export {
|
|
3105
|
-
|
|
3142
|
+
Rt as OpenFilterPanelOperation,
|
|
3106
3143
|
Ve as SmartToggleSheetsFilterCommand,
|
|
3107
|
-
|
|
3144
|
+
Nt as UniverSheetsFilterMobileUIPlugin,
|
|
3145
|
+
Pt as UniverSheetsFilterUIPlugin
|
|
3108
3146
|
};
|