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