@univerjs/sheets-filter-ui 0.1.9 → 0.1.11
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 +716 -670
- package/lib/types/commands/sheets-filter.command.d.ts +2 -2
- package/lib/types/commands/sheets-filter.operation.d.ts +1 -1
- package/lib/types/controllers/sheets-filter-render.controller.d.ts +8 -8
- package/lib/types/controllers/sheets-filter-ui.controller.d.ts +8 -5
- package/lib/types/controllers/sheets-filter.menu.d.ts +1 -1
- package/lib/types/index.d.ts +1 -2
- package/lib/types/locale/en-US.d.ts +4 -66
- package/lib/types/locale/index.d.ts +1 -0
- package/lib/types/locale/ru-RU.d.ts +4 -0
- package/lib/types/locale/zh-CN.d.ts +66 -4
- package/lib/types/models/conditions.d.ts +2 -2
- package/lib/types/plugin.d.ts +1 -1
- package/lib/types/services/sheets-filter-panel.service.d.ts +5 -5
- package/lib/types/views/components/SheetsFilterByConditionsPanel.d.ts +1 -1
- package/lib/types/views/components/SheetsFilterByValuesPanel.d.ts +1 -1
- package/lib/types/views/components/SheetsFilterPanel.stories.d.ts +2 -2
- package/lib/types/views/widgets/filter-button.shape.d.ts +1 -1
- package/lib/umd/index.js +4 -4
- package/package.json +21 -21
package/lib/es/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var C = (e, t, r) => (
|
|
4
|
-
import { CommandType as Te, IUniverInstanceService as
|
|
5
|
-
import { Quantity as
|
|
6
|
-
import { IMessageService as
|
|
7
|
-
import { BehaviorSubject as Ne, ReplaySubject as
|
|
8
|
-
import { expandToContinuousRange as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
var Kn = Object.defineProperty;
|
|
2
|
+
var Zn = (e, t, r) => t in e ? Kn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var C = (e, t, r) => (Zn(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { CommandType as Te, IUniverInstanceService as er, ICommandService as ce, IUndoRedoService as tr, UniverInstanceType as Be, LocaleService as We, sequenceExecute as Jn, BooleanNumber as Cr, Disposable as rr, extractPureTextFromCell as ei, IContextService as bt, ThemeService as Xr, RxDisposable as Kr, fromCallback as ti, OnLifecycle as ri, LifecycleStages as ni, Plugin as ii } from "@univerjs/core";
|
|
5
|
+
import { Quantity as Zr, createIdentifier as oi, Inject as G, Injector as Tt } from "@wendellhu/redi";
|
|
6
|
+
import { IMessageService as si, ILayoutService as ai, useObservable as Ee, KeyCode as li, MetaKeys as Nr, MenuGroup as nr, MenuItemType as ir, MenuPosition as ui, getMenuHiddenObservable as or, ComponentManager as ci, IShortcutService as fi, IMenuService as hi } from "@univerjs/ui";
|
|
7
|
+
import { BehaviorSubject as Ne, ReplaySubject as di, of as tt, Subject as mi, merge as vi, combineLatest as Jr, throttleTime as en, startWith as tn, map as He, shareReplay as pi, switchMap as sr, filter as Pr, takeUntil as gi, distinctUntilChanged as _i } from "rxjs";
|
|
8
|
+
import { expandToContinuousRange as Si, SetCellEditVisibleOperation as Ei, whenSheetEditorFocused as yi, SelectionShape as bi, getCoordByCell as Ti, SheetSkeletonManagerService as Ri, SheetRenderController as Oi, ISelectionRenderService as Fi, SheetCanvasPopManagerService as Ci } from "@univerjs/sheets-ui";
|
|
9
|
+
import { Rect as Ir, Shape as Ni, IRenderManagerService as rn } from "@univerjs/engine-render";
|
|
10
|
+
import { MessageType as Pi, Select as wr, RadioGroup as Ii, Radio as Ar, Input as nn, Checkbox as Mr, Tooltip as wi, Button as ct, Segmented as Ai } from "@univerjs/design";
|
|
11
|
+
import { SelectionManagerService as Mi, isSingleCellSelection as Li, RefRangeService as $i, INTERCEPTOR_POINT as Hi, SheetInterceptorService as Di } from "@univerjs/sheets";
|
|
12
|
+
import { SheetsFilterService as fe, RemoveSheetsFilterMutation as ft, SetSheetsFilterRangeMutation as ar, SetSheetsFilterCriteriaMutation as De, ReCalcSheetsFilterMutation as on, CustomFilterOperator as v, FILTER_MUTATIONS as xi } from "@univerjs/sheets-filter";
|
|
12
13
|
import * as m from "react";
|
|
13
|
-
import
|
|
14
|
+
import T, { forwardRef as sn, useRef as A, createElement as an, useCallback as ae, useMemo as lr, useEffect as Ui, useState as zt } from "react";
|
|
14
15
|
import { useDependency as Ke } from "@wendellhu/redi/react-bindings";
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
const ba = {
|
|
16
|
+
import Bi, { flushSync as Lr } from "react-dom";
|
|
17
|
+
const Wi = {
|
|
18
18
|
"sheets-filter": {
|
|
19
19
|
toolbar: {
|
|
20
20
|
"smart-toggle-filter-tooltip": "Toggle Filter",
|
|
@@ -63,7 +63,7 @@ const ba = {
|
|
|
63
63
|
custom: "Custom"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
},
|
|
66
|
+
}, Oa = Wi, Vi = {
|
|
67
67
|
"sheets-filter": {
|
|
68
68
|
toolbar: {
|
|
69
69
|
"smart-toggle-filter-tooltip": "筛选",
|
|
@@ -112,7 +112,56 @@ const ba = {
|
|
|
112
112
|
custom: "自定义"
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, ji = Vi, ki = {
|
|
116
|
+
"sheets-filter": {
|
|
117
|
+
toolbar: {
|
|
118
|
+
"smart-toggle-filter-tooltip": "Переключить фильтр",
|
|
119
|
+
"clear-filter-criteria": "Очистить условия фильтра",
|
|
120
|
+
"re-calc-filter-conditions": "Пересчитать условия фильтра"
|
|
121
|
+
},
|
|
122
|
+
command: {
|
|
123
|
+
"not-valid-filter-range": "Выбранный диапазон содержит только одну строку и не подходит для фильтра."
|
|
124
|
+
},
|
|
125
|
+
shortcut: {
|
|
126
|
+
"smart-toggle-filter": "Переключить фильтр"
|
|
127
|
+
},
|
|
128
|
+
panel: {
|
|
129
|
+
"clear-filter": "Очистить фильтр",
|
|
130
|
+
cancel: "Отмена",
|
|
131
|
+
confirm: "Подтвердить",
|
|
132
|
+
"by-values": "По значениям",
|
|
133
|
+
"by-conditions": "По условиям",
|
|
134
|
+
"filter-only": "Только фильтр",
|
|
135
|
+
"search-placeholder": "Используйте пробел для разделения ключевых слов",
|
|
136
|
+
"select-all": "Выбрать все",
|
|
137
|
+
"input-values-placeholder": "Введите значения",
|
|
138
|
+
and: "И",
|
|
139
|
+
or: "ИЛИ",
|
|
140
|
+
empty: "(пусто)",
|
|
141
|
+
"?": "Используйте “?” для обозначения одного символа.",
|
|
142
|
+
"*": "Используйте “*” для обозначения нескольких символов."
|
|
143
|
+
},
|
|
144
|
+
conditions: {
|
|
145
|
+
none: "Нет",
|
|
146
|
+
empty: "Пусто",
|
|
147
|
+
"not-empty": "Не пусто",
|
|
148
|
+
"text-contains": "Содержит текст",
|
|
149
|
+
"does-not-contain": "Не содержит текст",
|
|
150
|
+
"starts-with": "Начинается с",
|
|
151
|
+
"ends-with": "Заканчивается на",
|
|
152
|
+
equals: "Равно",
|
|
153
|
+
"greater-than": "Больше чем",
|
|
154
|
+
"greater-than-or-equal": "Больше или равно",
|
|
155
|
+
"less-than": "Меньше чем",
|
|
156
|
+
"less-than-or-equal": "Меньше или равно",
|
|
157
|
+
equal: "Равно",
|
|
158
|
+
"not-equal": "Не равно",
|
|
159
|
+
between: "Между",
|
|
160
|
+
"not-between": "Не между",
|
|
161
|
+
custom: "Пользовательский"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}, Fa = ki;
|
|
116
165
|
var te = function() {
|
|
117
166
|
return te = Object.assign || function(e) {
|
|
118
167
|
for (var t, r = 1, n = arguments.length; r < n; r++) {
|
|
@@ -122,7 +171,7 @@ var te = function() {
|
|
|
122
171
|
}
|
|
123
172
|
return e;
|
|
124
173
|
}, te.apply(this, arguments);
|
|
125
|
-
},
|
|
174
|
+
}, zi = function(e, t) {
|
|
126
175
|
var r = {};
|
|
127
176
|
for (var n in e)
|
|
128
177
|
Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
@@ -130,16 +179,16 @@ var te = function() {
|
|
|
130
179
|
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
131
180
|
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
132
181
|
return r;
|
|
133
|
-
},
|
|
134
|
-
var r = e.icon, n = e.id, o = e.className, a = e.extend, i =
|
|
135
|
-
return
|
|
182
|
+
}, ln = sn(function(e, t) {
|
|
183
|
+
var r = e.icon, n = e.id, o = e.className, a = e.extend, i = zi(e, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(n, " ").concat(o || "").trim(), l = A("_".concat(Yi()));
|
|
184
|
+
return un(r, "".concat(n), { defIds: r.defIds, idSuffix: l.current }, te({ ref: t, className: s }, i), a);
|
|
136
185
|
});
|
|
137
|
-
function
|
|
138
|
-
return
|
|
139
|
-
return
|
|
186
|
+
function un(e, t, r, n, o) {
|
|
187
|
+
return an(e.tag, te(te({ key: t }, Qi(e, r, o)), n), (Gi(e, r).children || []).map(function(a, i) {
|
|
188
|
+
return un(a, "".concat(t, "-").concat(e.tag, "-").concat(i), r, void 0, o);
|
|
140
189
|
}));
|
|
141
190
|
}
|
|
142
|
-
function
|
|
191
|
+
function Qi(e, t, r) {
|
|
143
192
|
var n = te({}, e.attrs);
|
|
144
193
|
r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1);
|
|
145
194
|
var o = t.defIds;
|
|
@@ -148,47 +197,47 @@ function ji(e, t, r) {
|
|
|
148
197
|
typeof s == "string" && (n[i] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
149
198
|
})), n;
|
|
150
199
|
}
|
|
151
|
-
function
|
|
200
|
+
function Gi(e, t) {
|
|
152
201
|
var r, n = t.defIds;
|
|
153
202
|
return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? te(te({}, e), { children: e.children.map(function(o) {
|
|
154
203
|
return typeof o.attrs.id == "string" && n && n.indexOf(o.attrs.id) > -1 ? te(te({}, o), { attrs: te(te({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
|
|
155
204
|
}) }) : e;
|
|
156
205
|
}
|
|
157
|
-
function
|
|
206
|
+
function Yi() {
|
|
158
207
|
return Math.random().toString(36).substring(2, 8);
|
|
159
208
|
}
|
|
160
|
-
|
|
161
|
-
var
|
|
162
|
-
return
|
|
209
|
+
ln.displayName = "UniverIcon";
|
|
210
|
+
var qi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { stroke: "currentColor", d: "M2 3L6.8 8.60593V12.8148L9.2 14V8.60593L14 3H2Z", strokeLinejoin: "round", strokeWidth: 1.33 } }] }, cn = sn(function(e, t) {
|
|
211
|
+
return an(ln, Object.assign({}, e, {
|
|
163
212
|
id: "filter-single",
|
|
164
213
|
ref: t,
|
|
165
|
-
icon:
|
|
214
|
+
icon: qi
|
|
166
215
|
}));
|
|
167
216
|
});
|
|
168
|
-
|
|
217
|
+
cn.displayName = "FilterSingle";
|
|
169
218
|
const rt = {
|
|
170
219
|
id: "sheet.command.smart-toggle-filter",
|
|
171
220
|
type: Te.COMMAND,
|
|
172
221
|
handler: async (e) => {
|
|
173
|
-
const t = e.get(
|
|
222
|
+
const t = e.get(er), r = e.get(fe), n = e.get(ce), o = e.get(tr), a = t.getCurrentUnitForType(Be.UNIVER_SHEET), i = a == null ? void 0 : a.getActiveSheet();
|
|
174
223
|
if (!i || !a)
|
|
175
224
|
return !1;
|
|
176
225
|
const s = a.getUnitId(), l = i.getSheetId(), u = r.getFilterModel(s, l);
|
|
177
226
|
if (u) {
|
|
178
|
-
const p = u == null ? void 0 : u.serialize(), S =
|
|
179
|
-
return
|
|
227
|
+
const p = u == null ? void 0 : u.serialize(), S = Xi(s, l, p), R = n.syncExecuteCommand(ft.id, { unitId: s, subUnitId: l });
|
|
228
|
+
return R && o.pushUndoRedo({
|
|
180
229
|
unitID: s,
|
|
181
230
|
undoMutations: S,
|
|
182
231
|
redoMutations: [{ id: ft.id, params: { unitId: s, subUnitId: l } }]
|
|
183
|
-
}),
|
|
232
|
+
}), R;
|
|
184
233
|
}
|
|
185
|
-
const f = e.get(
|
|
234
|
+
const f = e.get(Mi).getLast();
|
|
186
235
|
if (!f)
|
|
187
236
|
return !1;
|
|
188
|
-
const d = f.range, h =
|
|
237
|
+
const d = f.range, h = Li(f) ? Si(d, { left: !0, right: !0, up: !0, down: !0 }, i) : d;
|
|
189
238
|
if (h.endRow === h.startRow) {
|
|
190
|
-
const p = e.get(
|
|
191
|
-
return p == null || p.show({ type:
|
|
239
|
+
const p = e.get(si, Zr.OPTIONAL), S = e.get(We);
|
|
240
|
+
return p == null || p.show({ type: Pi.Warning, content: S.t("sheets-filter.command.not-valid-filter-range") }), !1;
|
|
192
241
|
}
|
|
193
242
|
const g = { id: ar.id, params: { unitId: s, subUnitId: l, range: h } }, _ = n.syncExecuteCommand(g.id, g.params);
|
|
194
243
|
return _ && o.pushUndoRedo({
|
|
@@ -201,14 +250,14 @@ const rt = {
|
|
|
201
250
|
id: "sheet.command.set-filter-criteria",
|
|
202
251
|
type: Te.COMMAND,
|
|
203
252
|
handler: async (e, t) => {
|
|
204
|
-
const r = e.get(
|
|
253
|
+
const r = e.get(fe), n = e.get(ce), o = e.get(tr), { unitId: a, subUnitId: i, col: s, criteria: l } = t, u = r.getFilterModel(a, i);
|
|
205
254
|
if (!u)
|
|
206
255
|
return !1;
|
|
207
256
|
const c = u.getRange();
|
|
208
257
|
if (!c || s < c.startColumn || s > c.endColumn)
|
|
209
258
|
return !1;
|
|
210
|
-
const f = u.getFilterColumn(s), d =
|
|
211
|
-
id:
|
|
259
|
+
const f = u.getFilterColumn(s), d = Zi(a, i, s, f), h = {
|
|
260
|
+
id: De.id,
|
|
212
261
|
params: {
|
|
213
262
|
unitId: a,
|
|
214
263
|
subUnitId: i,
|
|
@@ -222,32 +271,32 @@ const rt = {
|
|
|
222
271
|
redoMutations: [h]
|
|
223
272
|
}), g;
|
|
224
273
|
}
|
|
225
|
-
},
|
|
274
|
+
}, fn = {
|
|
226
275
|
id: "sheet.command.clear-filter-criteria",
|
|
227
276
|
type: Te.COMMAND,
|
|
228
277
|
handler: (e) => {
|
|
229
|
-
const t = e.get(
|
|
278
|
+
const t = e.get(fe), r = e.get(tr), n = e.get(ce), o = t.activeFilterModel;
|
|
230
279
|
if (!o)
|
|
231
280
|
return !1;
|
|
232
|
-
const { unitId: a, subUnitId: i } = o, s = o.serialize(), l =
|
|
233
|
-
return
|
|
281
|
+
const { unitId: a, subUnitId: i } = o, s = o.serialize(), l = dn(a, i, s), u = Ki(a, i, s);
|
|
282
|
+
return Jn(u, n) && r.pushUndoRedo({
|
|
234
283
|
unitID: a,
|
|
235
284
|
undoMutations: l,
|
|
236
285
|
redoMutations: u
|
|
237
286
|
}), !0;
|
|
238
287
|
}
|
|
239
|
-
},
|
|
288
|
+
}, hn = {
|
|
240
289
|
id: "sheet.command.re-calc-filter",
|
|
241
290
|
type: Te.COMMAND,
|
|
242
291
|
handler: (e) => {
|
|
243
|
-
const t = e.get(
|
|
292
|
+
const t = e.get(fe), r = e.get(ce), n = t.activeFilterModel;
|
|
244
293
|
if (!n)
|
|
245
294
|
return !1;
|
|
246
295
|
const { unitId: o, subUnitId: a } = n;
|
|
247
|
-
return r.executeCommand(
|
|
296
|
+
return r.executeCommand(on.id, { unitId: o, subUnitId: a });
|
|
248
297
|
}
|
|
249
298
|
};
|
|
250
|
-
function
|
|
299
|
+
function Xi(e, t, r) {
|
|
251
300
|
const n = [], o = {
|
|
252
301
|
id: ar.id,
|
|
253
302
|
params: {
|
|
@@ -256,14 +305,14 @@ function Gi(e, t, r) {
|
|
|
256
305
|
range: r.ref
|
|
257
306
|
}
|
|
258
307
|
};
|
|
259
|
-
return n.push(o),
|
|
308
|
+
return n.push(o), dn(e, t, r).forEach((i) => n.push(i)), n;
|
|
260
309
|
}
|
|
261
|
-
function
|
|
310
|
+
function dn(e, t, r) {
|
|
262
311
|
var o;
|
|
263
312
|
const n = [];
|
|
264
313
|
return (o = r.filterColumns) == null || o.forEach((a) => {
|
|
265
314
|
const i = {
|
|
266
|
-
id:
|
|
315
|
+
id: De.id,
|
|
267
316
|
params: {
|
|
268
317
|
unitId: e,
|
|
269
318
|
subUnitId: t,
|
|
@@ -274,12 +323,12 @@ function hn(e, t, r) {
|
|
|
274
323
|
n.push(i);
|
|
275
324
|
}), n;
|
|
276
325
|
}
|
|
277
|
-
function
|
|
326
|
+
function Ki(e, t, r) {
|
|
278
327
|
var o;
|
|
279
328
|
const n = [];
|
|
280
329
|
return (o = r.filterColumns) == null || o.forEach((a) => {
|
|
281
330
|
const i = {
|
|
282
|
-
id:
|
|
331
|
+
id: De.id,
|
|
283
332
|
params: {
|
|
284
333
|
unitId: e,
|
|
285
334
|
subUnitId: t,
|
|
@@ -290,10 +339,10 @@ function Yi(e, t, r) {
|
|
|
290
339
|
n.push(i);
|
|
291
340
|
}), n;
|
|
292
341
|
}
|
|
293
|
-
function
|
|
342
|
+
function Zi(e, t, r, n) {
|
|
294
343
|
if (!n)
|
|
295
344
|
return {
|
|
296
|
-
id:
|
|
345
|
+
id: De.id,
|
|
297
346
|
params: {
|
|
298
347
|
unitId: e,
|
|
299
348
|
subUnitId: t,
|
|
@@ -303,7 +352,7 @@ function qi(e, t, r, n) {
|
|
|
303
352
|
};
|
|
304
353
|
const o = n.serialize();
|
|
305
354
|
return {
|
|
306
|
-
id:
|
|
355
|
+
id: De.id,
|
|
307
356
|
params: {
|
|
308
357
|
unitId: e,
|
|
309
358
|
subUnitId: t,
|
|
@@ -692,10 +741,10 @@ var W = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
692
741
|
testMappingParams: () => !0,
|
|
693
742
|
mapToFilterColumn: (i) => {
|
|
694
743
|
const { and: s, val1: l, val2: u, operator1: c, operator2: f } = i;
|
|
695
|
-
function d(
|
|
744
|
+
function d(R, I) {
|
|
696
745
|
for (const F of e.ALL_CONDITIONS)
|
|
697
|
-
if (F.operator ===
|
|
698
|
-
return F.mapToFilterColumn({ val1: I, operator1:
|
|
746
|
+
if (F.operator === R)
|
|
747
|
+
return F.mapToFilterColumn({ val1: I, operator1: R });
|
|
699
748
|
}
|
|
700
749
|
const h = !c || c === e.NONE.operator, g = !f || f === e.NONE.operator;
|
|
701
750
|
if (h && g)
|
|
@@ -794,7 +843,7 @@ function se(e) {
|
|
|
794
843
|
throw new Error("Neither operator1 and operator2 and both not set!");
|
|
795
844
|
return t ? [t, n] : [r, o];
|
|
796
845
|
}
|
|
797
|
-
function
|
|
846
|
+
function Gt(e) {
|
|
798
847
|
const t = [], r = [];
|
|
799
848
|
for (const n of e)
|
|
800
849
|
n.checked ? t.push(n) : r.push(n);
|
|
@@ -805,12 +854,12 @@ function qt(e) {
|
|
|
805
854
|
unchecked: r.length
|
|
806
855
|
};
|
|
807
856
|
}
|
|
808
|
-
var
|
|
809
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
857
|
+
var Ji = Object.defineProperty, eo = Object.getOwnPropertyDescriptor, ur = (e, t, r, n) => {
|
|
858
|
+
for (var o = n > 1 ? void 0 : n ? eo(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
810
859
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
811
|
-
return n && o &&
|
|
812
|
-
}, Le = (e, t) => (r, n) => t(r, n, e),
|
|
813
|
-
|
|
860
|
+
return n && o && Ji(t, r, o), o;
|
|
861
|
+
}, Le = (e, t) => (r, n) => t(r, n, e), vt = /* @__PURE__ */ ((e) => (e[e.VALUES = 0] = "VALUES", e[e.CONDITIONS = 1] = "CONDITIONS", e))(vt || {});
|
|
862
|
+
oi("sheets-filter-ui.sheets-filter-panel.service");
|
|
814
863
|
let be = class extends rr {
|
|
815
864
|
constructor(t, r, n, o) {
|
|
816
865
|
super();
|
|
@@ -819,7 +868,7 @@ let be = class extends rr {
|
|
|
819
868
|
/* VALUES */
|
|
820
869
|
));
|
|
821
870
|
C(this, "filterBy$", this._filterBy$.asObservable());
|
|
822
|
-
C(this, "_filterByModel$", new
|
|
871
|
+
C(this, "_filterByModel$", new di(1));
|
|
823
872
|
C(this, "filterByModel$", this._filterByModel$.asObservable());
|
|
824
873
|
C(this, "_filterByModel", null);
|
|
825
874
|
C(this, "_hasCriteria$", new Ne(!1));
|
|
@@ -889,7 +938,7 @@ let be = class extends rr {
|
|
|
889
938
|
const n = t.getRange();
|
|
890
939
|
if (n.startRow === n.endRow)
|
|
891
940
|
return !1;
|
|
892
|
-
const o =
|
|
941
|
+
const o = gt.fromFilterColumn(
|
|
893
942
|
this._injector,
|
|
894
943
|
t,
|
|
895
944
|
r
|
|
@@ -904,7 +953,7 @@ let be = class extends rr {
|
|
|
904
953
|
const n = t.getRange();
|
|
905
954
|
if (n.startRow === n.endRow)
|
|
906
955
|
return !1;
|
|
907
|
-
const o =
|
|
956
|
+
const o = pt.fromFilterColumn(
|
|
908
957
|
this._injector,
|
|
909
958
|
t,
|
|
910
959
|
r,
|
|
@@ -921,15 +970,15 @@ let be = class extends rr {
|
|
|
921
970
|
}
|
|
922
971
|
};
|
|
923
972
|
be = ur([
|
|
924
|
-
Le(0, G(
|
|
925
|
-
Le(1, G(
|
|
926
|
-
Le(2,
|
|
927
|
-
Le(3, G(
|
|
973
|
+
Le(0, G(Tt)),
|
|
974
|
+
Le(1, G(fe)),
|
|
975
|
+
Le(2, er),
|
|
976
|
+
Le(3, G($i))
|
|
928
977
|
], be);
|
|
929
|
-
let
|
|
978
|
+
let pt = class extends rr {
|
|
930
979
|
constructor(t, r, n, o, a) {
|
|
931
980
|
super();
|
|
932
|
-
C(this, "canApply$",
|
|
981
|
+
C(this, "canApply$", tt(!0));
|
|
933
982
|
C(this, "_conditionItem$");
|
|
934
983
|
C(this, "conditionItem$");
|
|
935
984
|
C(this, "_filterConditionFormParams$");
|
|
@@ -949,7 +998,7 @@ let gt = class extends rr {
|
|
|
949
998
|
*/
|
|
950
999
|
static fromFilterColumn(t, r, n, o) {
|
|
951
1000
|
const [a, i] = b.testMappingFilterColumn(o == null ? void 0 : o.getColumnData());
|
|
952
|
-
return t.createInstance(
|
|
1001
|
+
return t.createInstance(pt, r, n, a, i);
|
|
953
1002
|
}
|
|
954
1003
|
get conditionItem() {
|
|
955
1004
|
return this._conditionItem$.getValue();
|
|
@@ -1012,10 +1061,10 @@ let gt = class extends rr {
|
|
|
1012
1061
|
this._filterConditionFormParams$.next(r);
|
|
1013
1062
|
}
|
|
1014
1063
|
};
|
|
1015
|
-
|
|
1064
|
+
pt = ur([
|
|
1016
1065
|
Le(4, ce)
|
|
1017
|
-
],
|
|
1018
|
-
let
|
|
1066
|
+
], pt);
|
|
1067
|
+
let gt = class extends rr {
|
|
1019
1068
|
constructor(t, r, n, o) {
|
|
1020
1069
|
super();
|
|
1021
1070
|
C(this, "_rawFilterItems$");
|
|
@@ -1026,15 +1075,15 @@ let _t = class extends rr {
|
|
|
1026
1075
|
C(this, "_manuallyUpdateFilterItems$");
|
|
1027
1076
|
C(this, "_searchString$");
|
|
1028
1077
|
C(this, "searchString$");
|
|
1029
|
-
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
|
|
1030
|
-
|
|
1078
|
+
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 mi(), this.filterItems$ = vi(
|
|
1079
|
+
Jr([
|
|
1031
1080
|
this._searchString$.pipe(
|
|
1032
1081
|
en(500, void 0, { leading: !0, trailing: !0 }),
|
|
1033
1082
|
tn(void 0)
|
|
1034
1083
|
),
|
|
1035
1084
|
this._rawFilterItems$
|
|
1036
1085
|
]).pipe(
|
|
1037
|
-
|
|
1086
|
+
He(([a, i]) => {
|
|
1038
1087
|
if (!a)
|
|
1039
1088
|
return i;
|
|
1040
1089
|
const l = a.toLowerCase().split(/\s+/).filter((u) => !!u);
|
|
@@ -1045,7 +1094,7 @@ let _t = class extends rr {
|
|
|
1045
1094
|
})
|
|
1046
1095
|
),
|
|
1047
1096
|
this._manuallyUpdateFilterItems$
|
|
1048
|
-
).pipe(
|
|
1097
|
+
).pipe(pi(1)), this.canApply$ = this.filterItems$.pipe(He((a) => Gt(a).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((a) => this._filterItems = a));
|
|
1049
1098
|
}
|
|
1050
1099
|
/**
|
|
1051
1100
|
* Create a model with targeting filter column. If there is not a filter column, the model would be created with
|
|
@@ -1059,26 +1108,26 @@ let _t = class extends rr {
|
|
|
1059
1108
|
*/
|
|
1060
1109
|
static fromFilterColumn(t, r, n) {
|
|
1061
1110
|
var M;
|
|
1062
|
-
const o = t.get(
|
|
1111
|
+
const o = t.get(er), a = t.get(We), { unitId: i, subUnitId: s } = r, l = o.getUniverSheetInstance(i);
|
|
1063
1112
|
if (!l)
|
|
1064
1113
|
throw new Error(`[ByValuesModel]: Workbook not found for filter model with unitId: ${i}!`);
|
|
1065
1114
|
const u = l == null ? void 0 : l.getSheetBySheetId(s);
|
|
1066
1115
|
if (!u)
|
|
1067
1116
|
throw new Error(`[ByValuesModel]: Worksheet not found for filter model with unitId: ${i} and subUnitId: ${s}!`);
|
|
1068
|
-
const c = r.getRange(), f = n, d = (M = r.getFilterColumn(n)) == null ? void 0 : M.getColumnData().filters, h = !!(d && d.blank), g = { ...c, startRow: c.startRow + 1, startColumn: f, endColumn: f }, _ = [], p = {}, S = new Set(d == null ? void 0 : d.filters),
|
|
1117
|
+
const c = r.getRange(), f = n, d = (M = r.getFilterColumn(n)) == null ? void 0 : M.getColumnData().filters, h = !!(d && d.blank), g = { ...c, startRow: c.startRow + 1, startColumn: f, endColumn: f }, _ = [], p = {}, S = new Set(d == null ? void 0 : d.filters), R = r.getFilteredOutRowsExceptCol(n);
|
|
1069
1118
|
let I = 0, F = 0;
|
|
1070
1119
|
for (const O of u.iterateByColumn(g, !1, !1)) {
|
|
1071
|
-
const { row: L, rowSpan:
|
|
1120
|
+
const { row: L, rowSpan: x = 1 } = O;
|
|
1072
1121
|
let B = 0;
|
|
1073
|
-
for (; B <
|
|
1122
|
+
for (; B < x; ) {
|
|
1074
1123
|
const X = L + B;
|
|
1075
|
-
if (
|
|
1124
|
+
if (R.has(X)) {
|
|
1076
1125
|
B++;
|
|
1077
1126
|
continue;
|
|
1078
1127
|
}
|
|
1079
|
-
const k = O != null && O.value ?
|
|
1128
|
+
const k = O != null && O.value ? ei(O.value) : "";
|
|
1080
1129
|
if (!k) {
|
|
1081
|
-
F += 1, B +=
|
|
1130
|
+
F += 1, B += x;
|
|
1082
1131
|
continue;
|
|
1083
1132
|
}
|
|
1084
1133
|
if (p[k])
|
|
@@ -1108,7 +1157,7 @@ let _t = class extends rr {
|
|
|
1108
1157
|
};
|
|
1109
1158
|
_.push(O);
|
|
1110
1159
|
}
|
|
1111
|
-
return t.createInstance(
|
|
1160
|
+
return t.createInstance(gt, r, n, _);
|
|
1112
1161
|
}
|
|
1113
1162
|
get rawFilterItems() {
|
|
1114
1163
|
return this._rawFilterItems$.getValue();
|
|
@@ -1159,7 +1208,7 @@ let _t = class extends rr {
|
|
|
1159
1208
|
async apply() {
|
|
1160
1209
|
if (this._disposed)
|
|
1161
1210
|
return !1;
|
|
1162
|
-
const t =
|
|
1211
|
+
const t = Gt(this._filterItems), { checked: r, checkedItems: n } = t, o = this.rawFilterItems, a = r === 0, i = t.checked === o.length, s = { colId: this.col };
|
|
1163
1212
|
if (a)
|
|
1164
1213
|
throw new Error("[ByValuesModel]: no checked items!");
|
|
1165
1214
|
if (i)
|
|
@@ -1183,15 +1232,15 @@ let _t = class extends rr {
|
|
|
1183
1232
|
}
|
|
1184
1233
|
// #endregion
|
|
1185
1234
|
};
|
|
1186
|
-
|
|
1235
|
+
gt = ur([
|
|
1187
1236
|
Le(3, ce)
|
|
1188
|
-
],
|
|
1189
|
-
const xe = "FILTER_PANEL_OPENED",
|
|
1237
|
+
], gt);
|
|
1238
|
+
const xe = "FILTER_PANEL_OPENED", mn = {
|
|
1190
1239
|
id: "sheet.operation.open-filter-panel",
|
|
1191
1240
|
type: Te.OPERATION,
|
|
1192
1241
|
handler: (e, t) => {
|
|
1193
|
-
const r = e.get(
|
|
1194
|
-
e.get(ce).syncExecuteCommand(
|
|
1242
|
+
const r = e.get(bt), n = e.get(fe), o = e.get(be);
|
|
1243
|
+
e.get(ce).syncExecuteCommand(Ei.id, { visible: !1 });
|
|
1195
1244
|
const { unitId: i, subUnitId: s, col: l } = t, u = n.getFilterModel(i, s);
|
|
1196
1245
|
return !u || !o.setupCol(u, l) ? !1 : (r.getContextValue(xe) || r.setContextValue(xe, !0), !0);
|
|
1197
1246
|
}
|
|
@@ -1199,59 +1248,59 @@ const xe = "FILTER_PANEL_OPENED", dn = {
|
|
|
1199
1248
|
id: "sheet.operation.close-filter-panel",
|
|
1200
1249
|
type: Te.OPERATION,
|
|
1201
1250
|
handler: (e) => {
|
|
1202
|
-
const t = e.get(
|
|
1251
|
+
const t = e.get(bt), r = e.get(be), n = e.get(ai, Zr.OPTIONAL);
|
|
1203
1252
|
return t.getContextValue(xe) ? (t.setContextValue(xe, !1), n == null || n.focus(), r.terminate()) : !1;
|
|
1204
1253
|
}
|
|
1205
|
-
},
|
|
1254
|
+
}, vn = {
|
|
1206
1255
|
id: "sheet.operation.apply-filter",
|
|
1207
1256
|
type: Te.OPERATION,
|
|
1208
1257
|
handler: (e, t) => {
|
|
1209
1258
|
const { filterBy: r } = t;
|
|
1210
1259
|
return e.get(be).changeFilterBy(r);
|
|
1211
1260
|
}
|
|
1212
|
-
},
|
|
1213
|
-
sheetsFilterPanel:
|
|
1214
|
-
sheetsFilterPanelHeader:
|
|
1215
|
-
sheetsFilterPanelContent:
|
|
1216
|
-
sheetsFilterPanelSelectAll:
|
|
1217
|
-
sheetsFilterPanelSelectAllCount:
|
|
1218
|
-
sheetsFilterPanelValuesContainer:
|
|
1219
|
-
inputAffixWrapper:
|
|
1220
|
-
select:
|
|
1221
|
-
radioGroup:
|
|
1222
|
-
sheetsFilterPanelValuesFind:
|
|
1223
|
-
sheetsFilterPanelValuesList:
|
|
1224
|
-
sheetsFilterPanelValuesListInnerContainer:
|
|
1225
|
-
sheetsFilterPanelValuesVirtual:
|
|
1226
|
-
sheetsFilterPanelValuesItem:
|
|
1227
|
-
sheetsFilterPanelValuesItemInner:
|
|
1228
|
-
sheetsFilterPanelValuesItemCount:
|
|
1229
|
-
sheetsFilterPanelValuesItemExcludeButton:
|
|
1230
|
-
sheetsFilterPanelValuesItemText:
|
|
1231
|
-
sheetsFilterPanelConditionsContainer:
|
|
1232
|
-
sheetsFilterPanelConditionsContainerInner:
|
|
1233
|
-
sheetsFilterPanelConditionsDesc:
|
|
1234
|
-
sheetsFilterPanelFooter:
|
|
1235
|
-
sheetsFilterPanelFooterPrimaryButtons:
|
|
1236
|
-
button:
|
|
1237
|
-
input:
|
|
1238
|
-
formDualColumnLayout:
|
|
1261
|
+
}, to = "univer-sheets-filter-panel", ro = "univer-sheets-filter-panel-header", no = "univer-sheets-filter-panel-content", io = "univer-sheets-filter-panel-select-all", oo = "univer-sheets-filter-panel-select-all-count", so = "univer-sheets-filter-panel-values-container", ao = "univer-input-affix-wrapper", lo = "univer-select", uo = "univer-radio-group", co = "univer-sheets-filter-panel-values-find", fo = "univer-sheets-filter-panel-values-list", ho = "univer-sheets-filter-panel-values-list-inner-container", mo = "univer-sheets-filter-panel-values-virtual", vo = "univer-sheets-filter-panel-values-item", po = "univer-sheets-filter-panel-values-item-inner", go = "univer-sheets-filter-panel-values-item-count", _o = "univer-sheets-filter-panel-values-item-exclude-button", So = "univer-sheets-filter-panel-values-item-text", Eo = "univer-sheets-filter-panel-conditions-container", yo = "univer-sheets-filter-panel-conditions-container-inner", bo = "univer-sheets-filter-panel-conditions-desc", To = "univer-sheets-filter-panel-footer", Ro = "univer-sheets-filter-panel-footer-primary-buttons", Oo = "univer-button", Fo = "univer-input", Co = "univer-form-dual-column-layout", D = {
|
|
1262
|
+
sheetsFilterPanel: to,
|
|
1263
|
+
sheetsFilterPanelHeader: ro,
|
|
1264
|
+
sheetsFilterPanelContent: no,
|
|
1265
|
+
sheetsFilterPanelSelectAll: io,
|
|
1266
|
+
sheetsFilterPanelSelectAllCount: oo,
|
|
1267
|
+
sheetsFilterPanelValuesContainer: so,
|
|
1268
|
+
inputAffixWrapper: ao,
|
|
1269
|
+
select: lo,
|
|
1270
|
+
radioGroup: uo,
|
|
1271
|
+
sheetsFilterPanelValuesFind: co,
|
|
1272
|
+
sheetsFilterPanelValuesList: fo,
|
|
1273
|
+
sheetsFilterPanelValuesListInnerContainer: ho,
|
|
1274
|
+
sheetsFilterPanelValuesVirtual: mo,
|
|
1275
|
+
sheetsFilterPanelValuesItem: vo,
|
|
1276
|
+
sheetsFilterPanelValuesItemInner: po,
|
|
1277
|
+
sheetsFilterPanelValuesItemCount: go,
|
|
1278
|
+
sheetsFilterPanelValuesItemExcludeButton: _o,
|
|
1279
|
+
sheetsFilterPanelValuesItemText: So,
|
|
1280
|
+
sheetsFilterPanelConditionsContainer: Eo,
|
|
1281
|
+
sheetsFilterPanelConditionsContainerInner: yo,
|
|
1282
|
+
sheetsFilterPanelConditionsDesc: bo,
|
|
1283
|
+
sheetsFilterPanelFooter: To,
|
|
1284
|
+
sheetsFilterPanelFooterPrimaryButtons: Ro,
|
|
1285
|
+
button: Oo,
|
|
1286
|
+
input: Fo,
|
|
1287
|
+
formDualColumnLayout: Co
|
|
1239
1288
|
};
|
|
1240
|
-
function
|
|
1289
|
+
function No(e) {
|
|
1241
1290
|
const { model: t } = e, r = Ke(We), 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 = ae((F) => {
|
|
1242
1291
|
t.onConditionFormChange({ and: F === "AND" });
|
|
1243
|
-
}, [t]), g =
|
|
1292
|
+
}, [t]), g = Po(r), _ = ae((F) => {
|
|
1244
1293
|
t.onPrimaryConditionChange(F);
|
|
1245
|
-
}, [t]), p =
|
|
1294
|
+
}, [t]), p = Io(r), S = ae((F) => {
|
|
1246
1295
|
t.onConditionFormChange(F);
|
|
1247
|
-
}, [t]),
|
|
1296
|
+
}, [t]), R = r.t("sheets-filter.panel.input-values-placeholder");
|
|
1248
1297
|
function I(F, H, M) {
|
|
1249
1298
|
const O = b.getItemByOperator(F).numOfParameters === 1;
|
|
1250
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ T.createElement(T.Fragment, null, M === "operator2" && /* @__PURE__ */ T.createElement(Ii, { value: d, onChange: h }, /* @__PURE__ */ T.createElement(Ar, { value: "AND" }, r.t("sheets-filter.panel.and")), /* @__PURE__ */ T.createElement(Ar, { value: "OR" }, r.t("sheets-filter.panel.or"))), /* @__PURE__ */ T.createElement(wr, { value: F, options: p, onChange: (L) => S({ [M]: L }) }), O && /* @__PURE__ */ T.createElement(nn, { value: H, placeholder: R, onChange: (L) => S({ [M === "operator1" ? "val1" : "val2"]: L }) }));
|
|
1251
1300
|
}
|
|
1252
|
-
return /* @__PURE__ */
|
|
1301
|
+
return /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelConditionsContainer }, /* @__PURE__ */ T.createElement(wr, { value: a, options: g, onChange: _ }), b.getItemByOperator(a).numOfParameters !== 0 ? /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelConditionsContainerInner }, i >= 1 && I(s, u != null ? u : "", "operator1"), i >= 2 && I(l, c != null ? c : "", "operator2"), /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelConditionsDesc }, r.t("sheets-filter.panel.?"), /* @__PURE__ */ T.createElement("br", null), r.t("sheets-filter.panel.*"))) : null);
|
|
1253
1302
|
}
|
|
1254
|
-
function
|
|
1303
|
+
function Po(e) {
|
|
1255
1304
|
const t = e.getCurrentLocale();
|
|
1256
1305
|
return lr(
|
|
1257
1306
|
() => [
|
|
@@ -1297,7 +1346,7 @@ function Fo(e) {
|
|
|
1297
1346
|
[t, e]
|
|
1298
1347
|
);
|
|
1299
1348
|
}
|
|
1300
|
-
function
|
|
1349
|
+
function Io(e) {
|
|
1301
1350
|
const t = e.getCurrentLocale();
|
|
1302
1351
|
return lr(
|
|
1303
1352
|
() => b.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: e.t(r.label), value: r.operator })),
|
|
@@ -1323,7 +1372,7 @@ function ue(e) {
|
|
|
1323
1372
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1324
1373
|
}, ue(e);
|
|
1325
1374
|
}
|
|
1326
|
-
function
|
|
1375
|
+
function wo(e, t) {
|
|
1327
1376
|
if (ue(e) != "object" || !e)
|
|
1328
1377
|
return e;
|
|
1329
1378
|
var r = e[Symbol.toPrimitive];
|
|
@@ -1335,19 +1384,19 @@ function No(e, t) {
|
|
|
1335
1384
|
}
|
|
1336
1385
|
return (t === "string" ? String : Number)(e);
|
|
1337
1386
|
}
|
|
1338
|
-
function
|
|
1339
|
-
var t =
|
|
1387
|
+
function pn(e) {
|
|
1388
|
+
var t = wo(e, "string");
|
|
1340
1389
|
return ue(t) == "symbol" ? t : t + "";
|
|
1341
1390
|
}
|
|
1342
1391
|
function q(e, t, r) {
|
|
1343
|
-
return t =
|
|
1392
|
+
return t = pn(t), t in e ? Object.defineProperty(e, t, {
|
|
1344
1393
|
value: r,
|
|
1345
1394
|
enumerable: !0,
|
|
1346
1395
|
configurable: !0,
|
|
1347
1396
|
writable: !0
|
|
1348
1397
|
}) : e[t] = r, e;
|
|
1349
1398
|
}
|
|
1350
|
-
function
|
|
1399
|
+
function $r(e, t) {
|
|
1351
1400
|
var r = Object.keys(e);
|
|
1352
1401
|
if (Object.getOwnPropertySymbols) {
|
|
1353
1402
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -1360,19 +1409,19 @@ function Lr(e, t) {
|
|
|
1360
1409
|
function Z(e) {
|
|
1361
1410
|
for (var t = 1; t < arguments.length; t++) {
|
|
1362
1411
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1363
|
-
t % 2 ?
|
|
1412
|
+
t % 2 ? $r(Object(r), !0).forEach(function(n) {
|
|
1364
1413
|
q(e, n, r[n]);
|
|
1365
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
1414
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : $r(Object(r)).forEach(function(n) {
|
|
1366
1415
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1367
1416
|
});
|
|
1368
1417
|
}
|
|
1369
1418
|
return e;
|
|
1370
1419
|
}
|
|
1371
|
-
function
|
|
1420
|
+
function Ao(e) {
|
|
1372
1421
|
if (Array.isArray(e))
|
|
1373
1422
|
return e;
|
|
1374
1423
|
}
|
|
1375
|
-
function
|
|
1424
|
+
function Mo(e, t) {
|
|
1376
1425
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1377
1426
|
if (r != null) {
|
|
1378
1427
|
var n, o, a, i, s = [], l = !0, u = !1;
|
|
@@ -1398,31 +1447,31 @@ function Io(e, t) {
|
|
|
1398
1447
|
return s;
|
|
1399
1448
|
}
|
|
1400
1449
|
}
|
|
1401
|
-
function
|
|
1450
|
+
function Hr(e, t) {
|
|
1402
1451
|
(t == null || t > e.length) && (t = e.length);
|
|
1403
1452
|
for (var r = 0, n = new Array(t); r < t; r++)
|
|
1404
1453
|
n[r] = e[r];
|
|
1405
1454
|
return n;
|
|
1406
1455
|
}
|
|
1407
|
-
function
|
|
1456
|
+
function Lo(e, t) {
|
|
1408
1457
|
if (e) {
|
|
1409
1458
|
if (typeof e == "string")
|
|
1410
|
-
return
|
|
1459
|
+
return Hr(e, t);
|
|
1411
1460
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1412
1461
|
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
|
|
1413
1462
|
return Array.from(e);
|
|
1414
1463
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
|
|
1415
|
-
return
|
|
1464
|
+
return Hr(e, t);
|
|
1416
1465
|
}
|
|
1417
1466
|
}
|
|
1418
|
-
function
|
|
1467
|
+
function $o() {
|
|
1419
1468
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1420
1469
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1421
1470
|
}
|
|
1422
1471
|
function Q(e, t) {
|
|
1423
|
-
return
|
|
1472
|
+
return Ao(e) || Mo(e, t) || Lo(e, t) || $o();
|
|
1424
1473
|
}
|
|
1425
|
-
function
|
|
1474
|
+
function Ho(e, t) {
|
|
1426
1475
|
if (e == null)
|
|
1427
1476
|
return {};
|
|
1428
1477
|
var r = {}, n = Object.keys(e), o, a;
|
|
@@ -1430,10 +1479,10 @@ function Mo(e, t) {
|
|
|
1430
1479
|
o = n[a], !(t.indexOf(o) >= 0) && (r[o] = e[o]);
|
|
1431
1480
|
return r;
|
|
1432
1481
|
}
|
|
1433
|
-
function
|
|
1482
|
+
function Do(e, t) {
|
|
1434
1483
|
if (e == null)
|
|
1435
1484
|
return {};
|
|
1436
|
-
var r =
|
|
1485
|
+
var r = Ho(e, t), n, o;
|
|
1437
1486
|
if (Object.getOwnPropertySymbols) {
|
|
1438
1487
|
var a = Object.getOwnPropertySymbols(e);
|
|
1439
1488
|
for (o = 0; o < a.length; o++)
|
|
@@ -1441,10 +1490,10 @@ function Lo(e, t) {
|
|
|
1441
1490
|
}
|
|
1442
1491
|
return r;
|
|
1443
1492
|
}
|
|
1444
|
-
function
|
|
1493
|
+
function xo(e) {
|
|
1445
1494
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1446
1495
|
}
|
|
1447
|
-
var
|
|
1496
|
+
var gn = { exports: {} };
|
|
1448
1497
|
/*!
|
|
1449
1498
|
Copyright (c) 2018 Jed Watson.
|
|
1450
1499
|
Licensed under the MIT License (MIT), see
|
|
@@ -1479,10 +1528,10 @@ var pn = { exports: {} };
|
|
|
1479
1528
|
}
|
|
1480
1529
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1481
1530
|
})();
|
|
1482
|
-
})(
|
|
1483
|
-
var
|
|
1484
|
-
const
|
|
1485
|
-
var
|
|
1531
|
+
})(gn);
|
|
1532
|
+
var Uo = gn.exports;
|
|
1533
|
+
const _t = /* @__PURE__ */ xo(Uo);
|
|
1534
|
+
var _n = { exports: {} }, w = {};
|
|
1486
1535
|
/**
|
|
1487
1536
|
* @license React
|
|
1488
1537
|
* react-is.production.min.js
|
|
@@ -1492,28 +1541,28 @@ var gn = { exports: {} }, w = {};
|
|
|
1492
1541
|
* This source code is licensed under the MIT license found in the
|
|
1493
1542
|
* LICENSE file in the root directory of this source tree.
|
|
1494
1543
|
*/
|
|
1495
|
-
var cr = Symbol.for("react.element"), fr = Symbol.for("react.portal"),
|
|
1496
|
-
|
|
1544
|
+
var cr = Symbol.for("react.element"), fr = Symbol.for("react.portal"), Rt = Symbol.for("react.fragment"), Ot = Symbol.for("react.strict_mode"), Ft = Symbol.for("react.profiler"), Ct = Symbol.for("react.provider"), Nt = Symbol.for("react.context"), Bo = Symbol.for("react.server_context"), Pt = Symbol.for("react.forward_ref"), It = Symbol.for("react.suspense"), wt = Symbol.for("react.suspense_list"), At = Symbol.for("react.memo"), Mt = Symbol.for("react.lazy"), Wo = Symbol.for("react.offscreen"), Sn;
|
|
1545
|
+
Sn = Symbol.for("react.module.reference");
|
|
1497
1546
|
function re(e) {
|
|
1498
1547
|
if (typeof e == "object" && e !== null) {
|
|
1499
1548
|
var t = e.$$typeof;
|
|
1500
1549
|
switch (t) {
|
|
1501
1550
|
case cr:
|
|
1502
1551
|
switch (e = e.type, e) {
|
|
1552
|
+
case Rt:
|
|
1503
1553
|
case Ft:
|
|
1504
|
-
case
|
|
1505
|
-
case
|
|
1506
|
-
case
|
|
1507
|
-
case Mt:
|
|
1554
|
+
case Ot:
|
|
1555
|
+
case It:
|
|
1556
|
+
case wt:
|
|
1508
1557
|
return e;
|
|
1509
1558
|
default:
|
|
1510
1559
|
switch (e = e && e.$$typeof, e) {
|
|
1511
|
-
case
|
|
1512
|
-
case
|
|
1513
|
-
case wt:
|
|
1514
|
-
case $t:
|
|
1515
|
-
case Lt:
|
|
1560
|
+
case Bo:
|
|
1561
|
+
case Nt:
|
|
1516
1562
|
case Pt:
|
|
1563
|
+
case Mt:
|
|
1564
|
+
case At:
|
|
1565
|
+
case Ct:
|
|
1517
1566
|
return e;
|
|
1518
1567
|
default:
|
|
1519
1568
|
return t;
|
|
@@ -1524,18 +1573,18 @@ function re(e) {
|
|
|
1524
1573
|
}
|
|
1525
1574
|
}
|
|
1526
1575
|
}
|
|
1527
|
-
w.ContextConsumer =
|
|
1528
|
-
w.ContextProvider =
|
|
1576
|
+
w.ContextConsumer = Nt;
|
|
1577
|
+
w.ContextProvider = Ct;
|
|
1529
1578
|
w.Element = cr;
|
|
1530
|
-
w.ForwardRef =
|
|
1531
|
-
w.Fragment =
|
|
1532
|
-
w.Lazy =
|
|
1533
|
-
w.Memo =
|
|
1579
|
+
w.ForwardRef = Pt;
|
|
1580
|
+
w.Fragment = Rt;
|
|
1581
|
+
w.Lazy = Mt;
|
|
1582
|
+
w.Memo = At;
|
|
1534
1583
|
w.Portal = fr;
|
|
1535
|
-
w.Profiler =
|
|
1536
|
-
w.StrictMode =
|
|
1537
|
-
w.Suspense =
|
|
1538
|
-
w.SuspenseList =
|
|
1584
|
+
w.Profiler = Ft;
|
|
1585
|
+
w.StrictMode = Ot;
|
|
1586
|
+
w.Suspense = It;
|
|
1587
|
+
w.SuspenseList = wt;
|
|
1539
1588
|
w.isAsyncMode = function() {
|
|
1540
1589
|
return !1;
|
|
1541
1590
|
};
|
|
@@ -1543,96 +1592,90 @@ w.isConcurrentMode = function() {
|
|
|
1543
1592
|
return !1;
|
|
1544
1593
|
};
|
|
1545
1594
|
w.isContextConsumer = function(e) {
|
|
1546
|
-
return re(e) ===
|
|
1595
|
+
return re(e) === Nt;
|
|
1547
1596
|
};
|
|
1548
1597
|
w.isContextProvider = function(e) {
|
|
1549
|
-
return re(e) ===
|
|
1598
|
+
return re(e) === Ct;
|
|
1550
1599
|
};
|
|
1551
1600
|
w.isElement = function(e) {
|
|
1552
1601
|
return typeof e == "object" && e !== null && e.$$typeof === cr;
|
|
1553
1602
|
};
|
|
1554
1603
|
w.isForwardRef = function(e) {
|
|
1555
|
-
return re(e) ===
|
|
1604
|
+
return re(e) === Pt;
|
|
1556
1605
|
};
|
|
1557
1606
|
w.isFragment = function(e) {
|
|
1558
|
-
return re(e) ===
|
|
1607
|
+
return re(e) === Rt;
|
|
1559
1608
|
};
|
|
1560
1609
|
w.isLazy = function(e) {
|
|
1561
|
-
return re(e) ===
|
|
1610
|
+
return re(e) === Mt;
|
|
1562
1611
|
};
|
|
1563
1612
|
w.isMemo = function(e) {
|
|
1564
|
-
return re(e) ===
|
|
1613
|
+
return re(e) === At;
|
|
1565
1614
|
};
|
|
1566
1615
|
w.isPortal = function(e) {
|
|
1567
1616
|
return re(e) === fr;
|
|
1568
1617
|
};
|
|
1569
1618
|
w.isProfiler = function(e) {
|
|
1570
|
-
return re(e) ===
|
|
1619
|
+
return re(e) === Ft;
|
|
1571
1620
|
};
|
|
1572
1621
|
w.isStrictMode = function(e) {
|
|
1573
|
-
return re(e) ===
|
|
1622
|
+
return re(e) === Ot;
|
|
1574
1623
|
};
|
|
1575
1624
|
w.isSuspense = function(e) {
|
|
1576
|
-
return re(e) ===
|
|
1625
|
+
return re(e) === It;
|
|
1577
1626
|
};
|
|
1578
1627
|
w.isSuspenseList = function(e) {
|
|
1579
|
-
return re(e) ===
|
|
1628
|
+
return re(e) === wt;
|
|
1580
1629
|
};
|
|
1581
1630
|
w.isValidElementType = function(e) {
|
|
1582
|
-
return typeof e == "string" || typeof e == "function" || e ===
|
|
1631
|
+
return typeof e == "string" || typeof e == "function" || e === Rt || e === Ft || e === Ot || e === It || e === wt || e === Wo || typeof e == "object" && e !== null && (e.$$typeof === Mt || e.$$typeof === At || e.$$typeof === Ct || e.$$typeof === Nt || e.$$typeof === Pt || e.$$typeof === Sn || e.getModuleId !== void 0);
|
|
1583
1632
|
};
|
|
1584
1633
|
w.typeOf = re;
|
|
1585
|
-
|
|
1586
|
-
var ht =
|
|
1587
|
-
function
|
|
1634
|
+
_n.exports = w;
|
|
1635
|
+
var ht = _n.exports;
|
|
1636
|
+
function Yt(e) {
|
|
1588
1637
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [];
|
|
1589
|
-
return
|
|
1590
|
-
n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat(
|
|
1638
|
+
return T.Children.forEach(e, function(n) {
|
|
1639
|
+
n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat(Yt(n)) : ht.isFragment(n) && n.props ? r = r.concat(Yt(n.props.children, t)) : r.push(n));
|
|
1591
1640
|
}), r;
|
|
1592
1641
|
}
|
|
1593
|
-
function
|
|
1642
|
+
function Vo(e) {
|
|
1594
1643
|
return e instanceof HTMLElement || e instanceof SVGElement;
|
|
1595
1644
|
}
|
|
1596
1645
|
function dt(e) {
|
|
1597
|
-
return
|
|
1646
|
+
return Vo(e) ? e : e instanceof T.Component ? Bi.findDOMNode(e) : null;
|
|
1598
1647
|
}
|
|
1599
|
-
function
|
|
1648
|
+
function jo(e, t, r) {
|
|
1600
1649
|
var n = m.useRef({});
|
|
1601
1650
|
return (!("value" in n.current) || r(n.current.condition, t)) && (n.current.value = e(), n.current.condition = t), n.current.value;
|
|
1602
1651
|
}
|
|
1603
|
-
function
|
|
1604
|
-
typeof
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
return n.length <= 1 ? n[0] : function(o) {
|
|
1613
|
-
t.forEach(function(a) {
|
|
1614
|
-
Wo(a, o);
|
|
1652
|
+
var ko = function(t, r) {
|
|
1653
|
+
typeof t == "function" ? t(r) : ue(t) === "object" && t && "current" in t && (t.current = r);
|
|
1654
|
+
}, zo = function() {
|
|
1655
|
+
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1656
|
+
r[n] = arguments[n];
|
|
1657
|
+
var o = r.filter(Boolean);
|
|
1658
|
+
return o.length <= 1 ? o[0] : function(a) {
|
|
1659
|
+
r.forEach(function(i) {
|
|
1660
|
+
ko(i, a);
|
|
1615
1661
|
});
|
|
1616
1662
|
};
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
return a !== o[i];
|
|
1663
|
+
}, Qo = function() {
|
|
1664
|
+
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1665
|
+
r[n] = arguments[n];
|
|
1666
|
+
return jo(function() {
|
|
1667
|
+
return zo.apply(void 0, r);
|
|
1668
|
+
}, r, function(o, a) {
|
|
1669
|
+
return o.length !== a.length || o.every(function(i, s) {
|
|
1670
|
+
return i !== a[s];
|
|
1626
1671
|
});
|
|
1627
1672
|
});
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
var
|
|
1634
|
-
function zo(e) {
|
|
1635
|
-
var t = e.children, r = e.onBatchResize, n = m.useRef(0), o = m.useRef([]), a = m.useContext(Kt), i = m.useCallback(function(s, l, u) {
|
|
1673
|
+
}, Go = function(t) {
|
|
1674
|
+
var r, n, o = ht.isMemo(t) ? t.type.type : t.type;
|
|
1675
|
+
return !(typeof o == "function" && !((r = o.prototype) !== null && r !== void 0 && r.render) && o.$$typeof !== ht.ForwardRef || typeof t == "function" && !((n = t.prototype) !== null && n !== void 0 && n.render) && t.$$typeof !== ht.ForwardRef);
|
|
1676
|
+
}, qt = /* @__PURE__ */ m.createContext(null);
|
|
1677
|
+
function Yo(e) {
|
|
1678
|
+
var t = e.children, r = e.onBatchResize, n = m.useRef(0), o = m.useRef([]), a = m.useContext(qt), i = m.useCallback(function(s, l, u) {
|
|
1636
1679
|
n.current += 1;
|
|
1637
1680
|
var c = n.current;
|
|
1638
1681
|
o.current.push({
|
|
@@ -1643,11 +1686,11 @@ function zo(e) {
|
|
|
1643
1686
|
c === n.current && (r == null || r(o.current), o.current = []);
|
|
1644
1687
|
}), a == null || a(s, l, u);
|
|
1645
1688
|
}, [r, a]);
|
|
1646
|
-
return /* @__PURE__ */ m.createElement(
|
|
1689
|
+
return /* @__PURE__ */ m.createElement(qt.Provider, {
|
|
1647
1690
|
value: i
|
|
1648
1691
|
}, t);
|
|
1649
1692
|
}
|
|
1650
|
-
var
|
|
1693
|
+
var En = function() {
|
|
1651
1694
|
if (typeof Map < "u")
|
|
1652
1695
|
return Map;
|
|
1653
1696
|
function e(t, r) {
|
|
@@ -1693,27 +1736,27 @@ var Sn = function() {
|
|
|
1693
1736
|
}, t;
|
|
1694
1737
|
}()
|
|
1695
1738
|
);
|
|
1696
|
-
}(),
|
|
1739
|
+
}(), Xt = typeof window < "u" && typeof document < "u" && window.document === document, St = function() {
|
|
1697
1740
|
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")();
|
|
1698
|
-
}(),
|
|
1699
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
1741
|
+
}(), qo = function() {
|
|
1742
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(St) : function(e) {
|
|
1700
1743
|
return setTimeout(function() {
|
|
1701
1744
|
return e(Date.now());
|
|
1702
1745
|
}, 1e3 / 60);
|
|
1703
1746
|
};
|
|
1704
|
-
}(),
|
|
1705
|
-
function
|
|
1747
|
+
}(), Xo = 2;
|
|
1748
|
+
function Ko(e, t) {
|
|
1706
1749
|
var r = !1, n = !1, o = 0;
|
|
1707
1750
|
function a() {
|
|
1708
1751
|
r && (r = !1, e()), n && s();
|
|
1709
1752
|
}
|
|
1710
1753
|
function i() {
|
|
1711
|
-
|
|
1754
|
+
qo(a);
|
|
1712
1755
|
}
|
|
1713
1756
|
function s() {
|
|
1714
1757
|
var l = Date.now();
|
|
1715
1758
|
if (r) {
|
|
1716
|
-
if (l - o <
|
|
1759
|
+
if (l - o < Xo)
|
|
1717
1760
|
return;
|
|
1718
1761
|
n = !0;
|
|
1719
1762
|
} else
|
|
@@ -1722,11 +1765,11 @@ function Yo(e, t) {
|
|
|
1722
1765
|
}
|
|
1723
1766
|
return s;
|
|
1724
1767
|
}
|
|
1725
|
-
var
|
|
1768
|
+
var Zo = 20, Jo = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], es = typeof MutationObserver < "u", ts = (
|
|
1726
1769
|
/** @class */
|
|
1727
1770
|
function() {
|
|
1728
1771
|
function e() {
|
|
1729
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh =
|
|
1772
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = Ko(this.refresh.bind(this), Zo);
|
|
1730
1773
|
}
|
|
1731
1774
|
return e.prototype.addObserver = function(t) {
|
|
1732
1775
|
~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
|
|
@@ -1744,16 +1787,16 @@ var qo = 20, Xo = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1744
1787
|
return r.broadcastActive();
|
|
1745
1788
|
}), t.length > 0;
|
|
1746
1789
|
}, e.prototype.connect_ = function() {
|
|
1747
|
-
!
|
|
1790
|
+
!Xt || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), es ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
1748
1791
|
attributes: !0,
|
|
1749
1792
|
childList: !0,
|
|
1750
1793
|
characterData: !0,
|
|
1751
1794
|
subtree: !0
|
|
1752
1795
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
1753
1796
|
}, e.prototype.disconnect_ = function() {
|
|
1754
|
-
!
|
|
1797
|
+
!Xt || !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);
|
|
1755
1798
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
1756
|
-
var r = t.propertyName, n = r === void 0 ? "" : r, o =
|
|
1799
|
+
var r = t.propertyName, n = r === void 0 ? "" : r, o = Jo.some(function(a) {
|
|
1757
1800
|
return !!~n.indexOf(a);
|
|
1758
1801
|
});
|
|
1759
1802
|
o && this.refresh();
|
|
@@ -1761,7 +1804,7 @@ var qo = 20, Xo = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1761
1804
|
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
1762
1805
|
}, e.instance_ = null, e;
|
|
1763
1806
|
}()
|
|
1764
|
-
),
|
|
1807
|
+
), yn = function(e, t) {
|
|
1765
1808
|
for (var r = 0, n = Object.keys(t); r < n.length; r++) {
|
|
1766
1809
|
var o = n[r];
|
|
1767
1810
|
Object.defineProperty(e, o, {
|
|
@@ -1772,59 +1815,59 @@ var qo = 20, Xo = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1772
1815
|
});
|
|
1773
1816
|
}
|
|
1774
1817
|
return e;
|
|
1775
|
-
},
|
|
1818
|
+
}, Ue = function(e) {
|
|
1776
1819
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
1777
|
-
return t ||
|
|
1778
|
-
},
|
|
1779
|
-
function
|
|
1820
|
+
return t || St;
|
|
1821
|
+
}, bn = Lt(0, 0, 0, 0);
|
|
1822
|
+
function Et(e) {
|
|
1780
1823
|
return parseFloat(e) || 0;
|
|
1781
1824
|
}
|
|
1782
|
-
function
|
|
1825
|
+
function Dr(e) {
|
|
1783
1826
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
1784
1827
|
t[r - 1] = arguments[r];
|
|
1785
1828
|
return t.reduce(function(n, o) {
|
|
1786
1829
|
var a = e["border-" + o + "-width"];
|
|
1787
|
-
return n +
|
|
1830
|
+
return n + Et(a);
|
|
1788
1831
|
}, 0);
|
|
1789
1832
|
}
|
|
1790
|
-
function
|
|
1833
|
+
function rs(e) {
|
|
1791
1834
|
for (var t = ["top", "right", "bottom", "left"], r = {}, n = 0, o = t; n < o.length; n++) {
|
|
1792
1835
|
var a = o[n], i = e["padding-" + a];
|
|
1793
|
-
r[a] =
|
|
1836
|
+
r[a] = Et(i);
|
|
1794
1837
|
}
|
|
1795
1838
|
return r;
|
|
1796
1839
|
}
|
|
1797
|
-
function
|
|
1840
|
+
function ns(e) {
|
|
1798
1841
|
var t = e.getBBox();
|
|
1799
|
-
return
|
|
1842
|
+
return Lt(0, 0, t.width, t.height);
|
|
1800
1843
|
}
|
|
1801
|
-
function
|
|
1844
|
+
function is(e) {
|
|
1802
1845
|
var t = e.clientWidth, r = e.clientHeight;
|
|
1803
1846
|
if (!t && !r)
|
|
1804
|
-
return
|
|
1805
|
-
var n =
|
|
1806
|
-
if (n.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -=
|
|
1847
|
+
return bn;
|
|
1848
|
+
var n = Ue(e).getComputedStyle(e), o = rs(n), a = o.left + o.right, i = o.top + o.bottom, s = Et(n.width), l = Et(n.height);
|
|
1849
|
+
if (n.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= Dr(n, "left", "right") + a), Math.round(l + i) !== r && (l -= Dr(n, "top", "bottom") + i)), !ss(e)) {
|
|
1807
1850
|
var u = Math.round(s + a) - t, c = Math.round(l + i) - r;
|
|
1808
1851
|
Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
|
|
1809
1852
|
}
|
|
1810
|
-
return
|
|
1853
|
+
return Lt(o.left, o.top, s, l);
|
|
1811
1854
|
}
|
|
1812
|
-
var
|
|
1855
|
+
var os = /* @__PURE__ */ function() {
|
|
1813
1856
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
1814
|
-
return e instanceof
|
|
1857
|
+
return e instanceof Ue(e).SVGGraphicsElement;
|
|
1815
1858
|
} : function(e) {
|
|
1816
|
-
return e instanceof
|
|
1859
|
+
return e instanceof Ue(e).SVGElement && typeof e.getBBox == "function";
|
|
1817
1860
|
};
|
|
1818
1861
|
}();
|
|
1819
|
-
function
|
|
1820
|
-
return e ===
|
|
1862
|
+
function ss(e) {
|
|
1863
|
+
return e === Ue(e).document.documentElement;
|
|
1821
1864
|
}
|
|
1822
|
-
function
|
|
1823
|
-
return
|
|
1865
|
+
function as(e) {
|
|
1866
|
+
return Xt ? os(e) ? ns(e) : is(e) : bn;
|
|
1824
1867
|
}
|
|
1825
|
-
function
|
|
1868
|
+
function ls(e) {
|
|
1826
1869
|
var t = e.x, r = e.y, n = e.width, o = e.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, i = Object.create(a.prototype);
|
|
1827
|
-
return
|
|
1870
|
+
return yn(i, {
|
|
1828
1871
|
x: t,
|
|
1829
1872
|
y: r,
|
|
1830
1873
|
width: n,
|
|
@@ -1835,37 +1878,37 @@ function os(e) {
|
|
|
1835
1878
|
left: t
|
|
1836
1879
|
}), i;
|
|
1837
1880
|
}
|
|
1838
|
-
function
|
|
1881
|
+
function Lt(e, t, r, n) {
|
|
1839
1882
|
return { x: e, y: t, width: r, height: n };
|
|
1840
1883
|
}
|
|
1841
|
-
var
|
|
1884
|
+
var us = (
|
|
1842
1885
|
/** @class */
|
|
1843
1886
|
function() {
|
|
1844
1887
|
function e(t) {
|
|
1845
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
1888
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Lt(0, 0, 0, 0), this.target = t;
|
|
1846
1889
|
}
|
|
1847
1890
|
return e.prototype.isActive = function() {
|
|
1848
|
-
var t =
|
|
1891
|
+
var t = as(this.target);
|
|
1849
1892
|
return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
|
|
1850
1893
|
}, e.prototype.broadcastRect = function() {
|
|
1851
1894
|
var t = this.contentRect_;
|
|
1852
1895
|
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
|
|
1853
1896
|
}, e;
|
|
1854
1897
|
}()
|
|
1855
|
-
),
|
|
1898
|
+
), cs = (
|
|
1856
1899
|
/** @class */
|
|
1857
1900
|
/* @__PURE__ */ function() {
|
|
1858
1901
|
function e(t, r) {
|
|
1859
|
-
var n =
|
|
1860
|
-
|
|
1902
|
+
var n = ls(r);
|
|
1903
|
+
yn(this, { target: t, contentRect: n });
|
|
1861
1904
|
}
|
|
1862
1905
|
return e;
|
|
1863
1906
|
}()
|
|
1864
|
-
),
|
|
1907
|
+
), fs = (
|
|
1865
1908
|
/** @class */
|
|
1866
1909
|
function() {
|
|
1867
1910
|
function e(t, r, n) {
|
|
1868
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
1911
|
+
if (this.activeObservations_ = [], this.observations_ = new En(), typeof t != "function")
|
|
1869
1912
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
1870
1913
|
this.callback_ = t, this.controller_ = r, this.callbackCtx_ = n;
|
|
1871
1914
|
}
|
|
@@ -1873,16 +1916,16 @@ var ss = (
|
|
|
1873
1916
|
if (!arguments.length)
|
|
1874
1917
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1875
1918
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1876
|
-
if (!(t instanceof
|
|
1919
|
+
if (!(t instanceof Ue(t).Element))
|
|
1877
1920
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1878
1921
|
var r = this.observations_;
|
|
1879
|
-
r.has(t) || (r.set(t, new
|
|
1922
|
+
r.has(t) || (r.set(t, new us(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
1880
1923
|
}
|
|
1881
1924
|
}, e.prototype.unobserve = function(t) {
|
|
1882
1925
|
if (!arguments.length)
|
|
1883
1926
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1884
1927
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1885
|
-
if (!(t instanceof
|
|
1928
|
+
if (!(t instanceof Ue(t).Element))
|
|
1886
1929
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
1887
1930
|
var r = this.observations_;
|
|
1888
1931
|
r.has(t) && (r.delete(t), r.size || this.controller_.removeObserver(this));
|
|
@@ -1897,7 +1940,7 @@ var ss = (
|
|
|
1897
1940
|
}, e.prototype.broadcastActive = function() {
|
|
1898
1941
|
if (this.hasActive()) {
|
|
1899
1942
|
var t = this.callbackCtx_, r = this.activeObservations_.map(function(n) {
|
|
1900
|
-
return new
|
|
1943
|
+
return new cs(n.target, n.broadcastRect());
|
|
1901
1944
|
});
|
|
1902
1945
|
this.callback_.call(t, r, t), this.clearActive();
|
|
1903
1946
|
}
|
|
@@ -1907,7 +1950,7 @@ var ss = (
|
|
|
1907
1950
|
return this.activeObservations_.length > 0;
|
|
1908
1951
|
}, e;
|
|
1909
1952
|
}()
|
|
1910
|
-
),
|
|
1953
|
+
), Tn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new En(), Rn = (
|
|
1911
1954
|
/** @class */
|
|
1912
1955
|
/* @__PURE__ */ function() {
|
|
1913
1956
|
function e(t) {
|
|
@@ -1915,8 +1958,8 @@ var ss = (
|
|
|
1915
1958
|
throw new TypeError("Cannot call a class as a function.");
|
|
1916
1959
|
if (!arguments.length)
|
|
1917
1960
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1918
|
-
var r =
|
|
1919
|
-
|
|
1961
|
+
var r = ts.getInstance(), n = new fs(t, r, this);
|
|
1962
|
+
Tn.set(this, n);
|
|
1920
1963
|
}
|
|
1921
1964
|
return e;
|
|
1922
1965
|
}()
|
|
@@ -1926,15 +1969,15 @@ var ss = (
|
|
|
1926
1969
|
"unobserve",
|
|
1927
1970
|
"disconnect"
|
|
1928
1971
|
].forEach(function(e) {
|
|
1929
|
-
|
|
1972
|
+
Rn.prototype[e] = function() {
|
|
1930
1973
|
var t;
|
|
1931
|
-
return (t =
|
|
1974
|
+
return (t = Tn.get(this))[e].apply(t, arguments);
|
|
1932
1975
|
};
|
|
1933
1976
|
});
|
|
1934
|
-
var
|
|
1935
|
-
return typeof
|
|
1977
|
+
var hs = function() {
|
|
1978
|
+
return typeof St.ResizeObserver < "u" ? St.ResizeObserver : Rn;
|
|
1936
1979
|
}(), ye = /* @__PURE__ */ new Map();
|
|
1937
|
-
function
|
|
1980
|
+
function ds(e) {
|
|
1938
1981
|
e.forEach(function(t) {
|
|
1939
1982
|
var r, n = t.target;
|
|
1940
1983
|
(r = ye.get(n)) === null || r === void 0 || r.forEach(function(o) {
|
|
@@ -1942,34 +1985,34 @@ function cs(e) {
|
|
|
1942
1985
|
});
|
|
1943
1986
|
});
|
|
1944
1987
|
}
|
|
1945
|
-
var
|
|
1946
|
-
function
|
|
1947
|
-
ye.has(e) || (ye.set(e, /* @__PURE__ */ new Set()),
|
|
1988
|
+
var On = new hs(ds);
|
|
1989
|
+
function ms(e, t) {
|
|
1990
|
+
ye.has(e) || (ye.set(e, /* @__PURE__ */ new Set()), On.observe(e)), ye.get(e).add(t);
|
|
1948
1991
|
}
|
|
1949
|
-
function
|
|
1950
|
-
ye.has(e) && (ye.get(e).delete(t), ye.get(e).size || (
|
|
1992
|
+
function vs(e, t) {
|
|
1993
|
+
ye.has(e) && (ye.get(e).delete(t), ye.get(e).size || (On.unobserve(e), ye.delete(e)));
|
|
1951
1994
|
}
|
|
1952
|
-
function
|
|
1995
|
+
function Fn(e, t) {
|
|
1953
1996
|
if (!(e instanceof t))
|
|
1954
1997
|
throw new TypeError("Cannot call a class as a function");
|
|
1955
1998
|
}
|
|
1956
|
-
function
|
|
1999
|
+
function xr(e, t) {
|
|
1957
2000
|
for (var r = 0; r < t.length; r++) {
|
|
1958
2001
|
var n = t[r];
|
|
1959
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e,
|
|
2002
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, pn(n.key), n);
|
|
1960
2003
|
}
|
|
1961
2004
|
}
|
|
1962
|
-
function
|
|
1963
|
-
return t &&
|
|
2005
|
+
function Cn(e, t, r) {
|
|
2006
|
+
return t && xr(e.prototype, t), r && xr(e, r), Object.defineProperty(e, "prototype", {
|
|
1964
2007
|
writable: !1
|
|
1965
2008
|
}), e;
|
|
1966
2009
|
}
|
|
1967
|
-
function
|
|
1968
|
-
return
|
|
2010
|
+
function Kt(e, t) {
|
|
2011
|
+
return Kt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
1969
2012
|
return n.__proto__ = o, n;
|
|
1970
|
-
},
|
|
2013
|
+
}, Kt(e, t);
|
|
1971
2014
|
}
|
|
1972
|
-
function
|
|
2015
|
+
function ps(e, t) {
|
|
1973
2016
|
if (typeof t != "function" && t !== null)
|
|
1974
2017
|
throw new TypeError("Super expression must either be null or a function");
|
|
1975
2018
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -1980,67 +2023,67 @@ function ds(e, t) {
|
|
|
1980
2023
|
}
|
|
1981
2024
|
}), Object.defineProperty(e, "prototype", {
|
|
1982
2025
|
writable: !1
|
|
1983
|
-
}), t &&
|
|
2026
|
+
}), t && Kt(e, t);
|
|
1984
2027
|
}
|
|
1985
|
-
function
|
|
1986
|
-
return
|
|
2028
|
+
function yt(e) {
|
|
2029
|
+
return yt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
|
|
1987
2030
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
1988
|
-
},
|
|
2031
|
+
}, yt(e);
|
|
1989
2032
|
}
|
|
1990
|
-
function
|
|
2033
|
+
function Nn() {
|
|
1991
2034
|
try {
|
|
1992
2035
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1993
2036
|
}));
|
|
1994
2037
|
} catch {
|
|
1995
2038
|
}
|
|
1996
|
-
return (
|
|
2039
|
+
return (Nn = function() {
|
|
1997
2040
|
return !!e;
|
|
1998
2041
|
})();
|
|
1999
2042
|
}
|
|
2000
|
-
function
|
|
2043
|
+
function gs(e) {
|
|
2001
2044
|
if (e === void 0)
|
|
2002
2045
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2003
2046
|
return e;
|
|
2004
2047
|
}
|
|
2005
|
-
function
|
|
2048
|
+
function _s(e, t) {
|
|
2006
2049
|
if (t && (ue(t) === "object" || typeof t == "function"))
|
|
2007
2050
|
return t;
|
|
2008
2051
|
if (t !== void 0)
|
|
2009
2052
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
2010
|
-
return
|
|
2053
|
+
return gs(e);
|
|
2011
2054
|
}
|
|
2012
|
-
function
|
|
2013
|
-
var t =
|
|
2055
|
+
function Ss(e) {
|
|
2056
|
+
var t = Nn();
|
|
2014
2057
|
return function() {
|
|
2015
|
-
var n =
|
|
2058
|
+
var n = yt(e), o;
|
|
2016
2059
|
if (t) {
|
|
2017
|
-
var a =
|
|
2060
|
+
var a = yt(this).constructor;
|
|
2018
2061
|
o = Reflect.construct(n, arguments, a);
|
|
2019
2062
|
} else
|
|
2020
2063
|
o = n.apply(this, arguments);
|
|
2021
|
-
return
|
|
2064
|
+
return _s(this, o);
|
|
2022
2065
|
};
|
|
2023
2066
|
}
|
|
2024
|
-
var
|
|
2025
|
-
|
|
2026
|
-
var t =
|
|
2067
|
+
var Es = /* @__PURE__ */ function(e) {
|
|
2068
|
+
ps(r, e);
|
|
2069
|
+
var t = Ss(r);
|
|
2027
2070
|
function r() {
|
|
2028
|
-
return
|
|
2071
|
+
return Fn(this, r), t.apply(this, arguments);
|
|
2029
2072
|
}
|
|
2030
|
-
return
|
|
2073
|
+
return Cn(r, [{
|
|
2031
2074
|
key: "render",
|
|
2032
2075
|
value: function() {
|
|
2033
2076
|
return this.props.children;
|
|
2034
2077
|
}
|
|
2035
2078
|
}]), r;
|
|
2036
2079
|
}(m.Component);
|
|
2037
|
-
function
|
|
2038
|
-
var r = e.children, n = e.disabled, o = m.useRef(null), a = m.useRef(null), i = m.useContext(
|
|
2080
|
+
function ys(e, t) {
|
|
2081
|
+
var r = e.children, n = e.disabled, o = m.useRef(null), a = m.useRef(null), i = m.useContext(qt), s = typeof r == "function", l = s ? r(o) : r, u = m.useRef({
|
|
2039
2082
|
width: -1,
|
|
2040
2083
|
height: -1,
|
|
2041
2084
|
offsetWidth: -1,
|
|
2042
2085
|
offsetHeight: -1
|
|
2043
|
-
}), c = !s && /* @__PURE__ */ m.isValidElement(l) &&
|
|
2086
|
+
}), c = !s && /* @__PURE__ */ m.isValidElement(l) && Go(l), f = c ? l.ref : null, d = Qo(f, o), h = function() {
|
|
2044
2087
|
var S;
|
|
2045
2088
|
return dt(o.current) || // Support `nativeElement` format
|
|
2046
2089
|
(o.current && ue(o.current) === "object" ? dt((S = o.current) === null || S === void 0 ? void 0 : S.nativeElement) : null) || dt(a.current);
|
|
@@ -2051,10 +2094,10 @@ function _s(e, t) {
|
|
|
2051
2094
|
var g = m.useRef(e);
|
|
2052
2095
|
g.current = e;
|
|
2053
2096
|
var _ = m.useCallback(function(p) {
|
|
2054
|
-
var S = g.current,
|
|
2055
|
-
if (u.current.width !==
|
|
2097
|
+
var S = g.current, R = S.onResize, I = S.data, F = p.getBoundingClientRect(), H = F.width, M = F.height, O = p.offsetWidth, L = p.offsetHeight, x = Math.floor(H), B = Math.floor(M);
|
|
2098
|
+
if (u.current.width !== x || u.current.height !== B || u.current.offsetWidth !== O || u.current.offsetHeight !== L) {
|
|
2056
2099
|
var X = {
|
|
2057
|
-
width:
|
|
2100
|
+
width: x,
|
|
2058
2101
|
height: B,
|
|
2059
2102
|
offsetWidth: O,
|
|
2060
2103
|
offsetHeight: L
|
|
@@ -2064,36 +2107,36 @@ function _s(e, t) {
|
|
|
2064
2107
|
offsetWidth: k,
|
|
2065
2108
|
offsetHeight: J
|
|
2066
2109
|
});
|
|
2067
|
-
i == null || i(z, p, I),
|
|
2068
|
-
|
|
2110
|
+
i == null || i(z, p, I), R && Promise.resolve().then(function() {
|
|
2111
|
+
R(z, p);
|
|
2069
2112
|
});
|
|
2070
2113
|
}
|
|
2071
2114
|
}, []);
|
|
2072
2115
|
return m.useEffect(function() {
|
|
2073
2116
|
var p = h();
|
|
2074
|
-
return p && !n &&
|
|
2075
|
-
return
|
|
2117
|
+
return p && !n && ms(p, _), function() {
|
|
2118
|
+
return vs(p, _);
|
|
2076
2119
|
};
|
|
2077
|
-
}, [o.current, n]), /* @__PURE__ */ m.createElement(
|
|
2120
|
+
}, [o.current, n]), /* @__PURE__ */ m.createElement(Es, {
|
|
2078
2121
|
ref: a
|
|
2079
2122
|
}, c ? /* @__PURE__ */ m.cloneElement(l, {
|
|
2080
2123
|
ref: d
|
|
2081
2124
|
}) : l);
|
|
2082
2125
|
}
|
|
2083
|
-
var
|
|
2084
|
-
function
|
|
2085
|
-
var r = e.children, n = typeof r == "function" ? [r] :
|
|
2126
|
+
var bs = /* @__PURE__ */ m.forwardRef(ys), Ts = "rc-observer-key";
|
|
2127
|
+
function Rs(e, t) {
|
|
2128
|
+
var r = e.children, n = typeof r == "function" ? [r] : Yt(r);
|
|
2086
2129
|
return n.map(function(o, a) {
|
|
2087
|
-
var i = (o == null ? void 0 : o.key) || "".concat(
|
|
2088
|
-
return /* @__PURE__ */ m.createElement(
|
|
2130
|
+
var i = (o == null ? void 0 : o.key) || "".concat(Ts, "-").concat(a);
|
|
2131
|
+
return /* @__PURE__ */ m.createElement(bs, et({}, e, {
|
|
2089
2132
|
key: i,
|
|
2090
2133
|
ref: a === 0 ? t : void 0
|
|
2091
2134
|
}), o);
|
|
2092
2135
|
});
|
|
2093
2136
|
}
|
|
2094
|
-
var hr = /* @__PURE__ */ m.forwardRef(
|
|
2095
|
-
hr.Collection =
|
|
2096
|
-
var
|
|
2137
|
+
var hr = /* @__PURE__ */ m.forwardRef(Rs);
|
|
2138
|
+
hr.Collection = Yo;
|
|
2139
|
+
var Pn = /* @__PURE__ */ m.forwardRef(function(e, t) {
|
|
2097
2140
|
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 = {
|
|
2098
2141
|
display: "flex",
|
|
2099
2142
|
flexDirection: "column"
|
|
@@ -2113,23 +2156,23 @@ var Nn = /* @__PURE__ */ m.forwardRef(function(e, t) {
|
|
|
2113
2156
|
}
|
|
2114
2157
|
}, /* @__PURE__ */ m.createElement("div", et({
|
|
2115
2158
|
style: d,
|
|
2116
|
-
className:
|
|
2159
|
+
className: _t(q({}, "".concat(i, "-holder-inner"), i)),
|
|
2117
2160
|
ref: t
|
|
2118
2161
|
}, l), a, c)));
|
|
2119
2162
|
});
|
|
2120
|
-
|
|
2121
|
-
var
|
|
2163
|
+
Pn.displayName = "Filler";
|
|
2164
|
+
var In = function(t) {
|
|
2122
2165
|
return +setTimeout(t, 16);
|
|
2123
|
-
},
|
|
2166
|
+
}, wn = function(t) {
|
|
2124
2167
|
return clearTimeout(t);
|
|
2125
2168
|
};
|
|
2126
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
2169
|
+
typeof window < "u" && "requestAnimationFrame" in window && (In = function(t) {
|
|
2127
2170
|
return window.requestAnimationFrame(t);
|
|
2128
|
-
},
|
|
2171
|
+
}, wn = function(t) {
|
|
2129
2172
|
return window.cancelAnimationFrame(t);
|
|
2130
2173
|
});
|
|
2131
2174
|
var Ur = 0, dr = /* @__PURE__ */ new Map();
|
|
2132
|
-
function
|
|
2175
|
+
function An(e) {
|
|
2133
2176
|
dr.delete(e);
|
|
2134
2177
|
}
|
|
2135
2178
|
var le = function(t) {
|
|
@@ -2138,9 +2181,9 @@ var le = function(t) {
|
|
|
2138
2181
|
var n = Ur;
|
|
2139
2182
|
function o(a) {
|
|
2140
2183
|
if (a === 0)
|
|
2141
|
-
|
|
2184
|
+
An(n), t();
|
|
2142
2185
|
else {
|
|
2143
|
-
var i =
|
|
2186
|
+
var i = In(function() {
|
|
2144
2187
|
o(a - 1);
|
|
2145
2188
|
});
|
|
2146
2189
|
dr.set(n, i);
|
|
@@ -2150,14 +2193,14 @@ var le = function(t) {
|
|
|
2150
2193
|
};
|
|
2151
2194
|
le.cancel = function(e) {
|
|
2152
2195
|
var t = dr.get(e);
|
|
2153
|
-
return
|
|
2196
|
+
return An(e), wn(t);
|
|
2154
2197
|
};
|
|
2155
|
-
function
|
|
2198
|
+
function Br(e, t) {
|
|
2156
2199
|
var r = "touches" in e ? e.touches[0] : e;
|
|
2157
2200
|
return r[t ? "pageX" : "pageY"];
|
|
2158
2201
|
}
|
|
2159
|
-
var
|
|
2160
|
-
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), _ = Q(g, 2), p = _[0], S = _[1],
|
|
2202
|
+
var Wr = /* @__PURE__ */ m.forwardRef(function(e, t) {
|
|
2203
|
+
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), _ = Q(g, 2), p = _[0], S = _[1], R = m.useState(null), I = Q(R, 2), F = I[0], H = I[1], M = m.useState(null), O = Q(M, 2), L = O[0], x = O[1], B = !n, X = m.useRef(), k = m.useRef(), J = m.useState(!1), z = Q(J, 2), Pe = z[0], K = z[1], Re = m.useRef(), ne = function() {
|
|
2161
2204
|
clearTimeout(Re.current), K(!0), Re.current = setTimeout(function() {
|
|
2162
2205
|
K(!1);
|
|
2163
2206
|
}, 3e3);
|
|
@@ -2166,8 +2209,8 @@ var Br = /* @__PURE__ */ m.forwardRef(function(e, t) {
|
|
|
2166
2209
|
return 0;
|
|
2167
2210
|
var V = o / Y;
|
|
2168
2211
|
return V * Ve;
|
|
2169
|
-
}, [o, Y, Ve]), Oe = function(
|
|
2170
|
-
|
|
2212
|
+
}, [o, Y, Ve]), Oe = function(U) {
|
|
2213
|
+
U.stopPropagation(), U.preventDefault();
|
|
2171
2214
|
}, Ie = m.useRef({
|
|
2172
2215
|
top: $,
|
|
2173
2216
|
dragging: p,
|
|
@@ -2180,15 +2223,15 @@ var Br = /* @__PURE__ */ m.forwardRef(function(e, t) {
|
|
|
2180
2223
|
pageY: F,
|
|
2181
2224
|
startTop: L
|
|
2182
2225
|
};
|
|
2183
|
-
var je = function(
|
|
2184
|
-
S(!0), H(
|
|
2226
|
+
var je = function(U) {
|
|
2227
|
+
S(!0), H(Br(U, u)), x(Ie.current.top), i(), U.stopPropagation(), U.preventDefault();
|
|
2185
2228
|
};
|
|
2186
2229
|
m.useEffect(function() {
|
|
2187
2230
|
var V = function(Qe) {
|
|
2188
2231
|
Qe.preventDefault();
|
|
2189
|
-
},
|
|
2190
|
-
return
|
|
2191
|
-
|
|
2232
|
+
}, U = X.current, he = k.current;
|
|
2233
|
+
return U.addEventListener("touchstart", V), he.addEventListener("touchstart", je), function() {
|
|
2234
|
+
U.removeEventListener("touchstart", V), he.removeEventListener("touchstart", je);
|
|
2192
2235
|
};
|
|
2193
2236
|
}, []);
|
|
2194
2237
|
var ke = m.useRef();
|
|
@@ -2196,21 +2239,21 @@ var Br = /* @__PURE__ */ m.forwardRef(function(e, t) {
|
|
|
2196
2239
|
var ie = m.useRef();
|
|
2197
2240
|
ie.current = Ve, m.useEffect(function() {
|
|
2198
2241
|
if (p) {
|
|
2199
|
-
var V,
|
|
2200
|
-
var we = Ie.current, nt = we.dragging, it = we.pageY,
|
|
2242
|
+
var V, U = function(Qe) {
|
|
2243
|
+
var we = Ie.current, nt = we.dragging, it = we.pageY, $t = we.startTop;
|
|
2201
2244
|
if (le.cancel(V), nt) {
|
|
2202
|
-
var Fe =
|
|
2245
|
+
var Fe = Br(Qe, u) - it, Ae = $t;
|
|
2203
2246
|
!B && u ? Ae -= Fe : Ae += Fe;
|
|
2204
|
-
var ot = ke.current, st = ie.current,
|
|
2247
|
+
var ot = ke.current, st = ie.current, Ht = st ? Ae / st : 0, Ce = Math.ceil(Ht * ot);
|
|
2205
2248
|
Ce = Math.max(Ce, 0), Ce = Math.min(Ce, ot), V = le(function() {
|
|
2206
2249
|
l(Ce, u);
|
|
2207
2250
|
});
|
|
2208
2251
|
}
|
|
2209
|
-
},
|
|
2252
|
+
}, he = function() {
|
|
2210
2253
|
S(!1), s();
|
|
2211
2254
|
};
|
|
2212
|
-
return window.addEventListener("mousemove",
|
|
2213
|
-
window.removeEventListener("mousemove",
|
|
2255
|
+
return window.addEventListener("mousemove", U), window.addEventListener("touchmove", U), window.addEventListener("mouseup", he), window.addEventListener("touchend", he), function() {
|
|
2256
|
+
window.removeEventListener("mousemove", U), window.removeEventListener("touchmove", U), window.removeEventListener("mouseup", he), window.removeEventListener("touchend", he), le.cancel(V);
|
|
2214
2257
|
};
|
|
2215
2258
|
}
|
|
2216
2259
|
}, [p]), m.useEffect(function() {
|
|
@@ -2220,7 +2263,7 @@ var Br = /* @__PURE__ */ m.forwardRef(function(e, t) {
|
|
|
2220
2263
|
delayHidden: ne
|
|
2221
2264
|
};
|
|
2222
2265
|
});
|
|
2223
|
-
var
|
|
2266
|
+
var ge = "".concat(r, "-scrollbar"), ee = {
|
|
2224
2267
|
position: "absolute",
|
|
2225
2268
|
visibility: Pe ? null : "hidden"
|
|
2226
2269
|
}, oe = {
|
|
@@ -2232,18 +2275,18 @@ var Br = /* @__PURE__ */ m.forwardRef(function(e, t) {
|
|
|
2232
2275
|
};
|
|
2233
2276
|
return u ? (ee.height = 8, ee.left = 0, ee.right = 0, ee.bottom = 0, oe.height = "100%", oe.width = c, B ? oe.left = $ : oe.right = $) : (ee.width = 8, ee.top = 0, ee.bottom = 0, B ? ee.right = 0 : ee.left = 0, oe.width = "100%", oe.height = c, oe.top = $), /* @__PURE__ */ m.createElement("div", {
|
|
2234
2277
|
ref: X,
|
|
2235
|
-
className:
|
|
2278
|
+
className: _t(ge, q(q(q({}, "".concat(ge, "-horizontal"), u), "".concat(ge, "-vertical"), !u), "".concat(ge, "-visible"), Pe)),
|
|
2236
2279
|
style: Z(Z({}, ee), d),
|
|
2237
2280
|
onMouseDown: Oe,
|
|
2238
2281
|
onMouseMove: ne
|
|
2239
2282
|
}, /* @__PURE__ */ m.createElement("div", {
|
|
2240
2283
|
ref: k,
|
|
2241
|
-
className:
|
|
2284
|
+
className: _t("".concat(ge, "-thumb"), q({}, "".concat(ge, "-thumb-moving"), p)),
|
|
2242
2285
|
style: Z(Z({}, oe), h),
|
|
2243
2286
|
onMouseDown: je
|
|
2244
2287
|
}));
|
|
2245
2288
|
});
|
|
2246
|
-
function
|
|
2289
|
+
function Os(e) {
|
|
2247
2290
|
var t = e.children, r = e.setRef, n = m.useCallback(function(o) {
|
|
2248
2291
|
r(o);
|
|
2249
2292
|
}, []);
|
|
@@ -2251,7 +2294,7 @@ function bs(e) {
|
|
|
2251
2294
|
ref: n
|
|
2252
2295
|
});
|
|
2253
2296
|
}
|
|
2254
|
-
function
|
|
2297
|
+
function Fs(e, t, r, n, o, a, i) {
|
|
2255
2298
|
var s = i.getKey;
|
|
2256
2299
|
return e.slice(t, r + 1).map(function(l, u) {
|
|
2257
2300
|
var c = t + u, f = a(l, c, {
|
|
@@ -2259,7 +2302,7 @@ function Ts(e, t, r, n, o, a, i) {
|
|
|
2259
2302
|
width: n
|
|
2260
2303
|
}
|
|
2261
2304
|
}), d = s(l);
|
|
2262
|
-
return /* @__PURE__ */ m.createElement(
|
|
2305
|
+
return /* @__PURE__ */ m.createElement(Os, {
|
|
2263
2306
|
key: d,
|
|
2264
2307
|
setRef: function(g) {
|
|
2265
2308
|
return o(l, g);
|
|
@@ -2267,11 +2310,11 @@ function Ts(e, t, r, n, o, a, i) {
|
|
|
2267
2310
|
}, f);
|
|
2268
2311
|
});
|
|
2269
2312
|
}
|
|
2270
|
-
var
|
|
2313
|
+
var Cs = /* @__PURE__ */ function() {
|
|
2271
2314
|
function e() {
|
|
2272
|
-
|
|
2315
|
+
Fn(this, e), q(this, "maps", void 0), q(this, "id", 0), this.maps = /* @__PURE__ */ Object.create(null);
|
|
2273
2316
|
}
|
|
2274
|
-
return
|
|
2317
|
+
return Cn(e, [{
|
|
2275
2318
|
key: "set",
|
|
2276
2319
|
value: function(r, n) {
|
|
2277
2320
|
this.maps[r] = n, this.id += 1;
|
|
@@ -2283,8 +2326,8 @@ var Rs = /* @__PURE__ */ function() {
|
|
|
2283
2326
|
}
|
|
2284
2327
|
}]), e;
|
|
2285
2328
|
}();
|
|
2286
|
-
function
|
|
2287
|
-
var n = m.useState(0), o = Q(n, 2), a = o[0], i = o[1], s = A(/* @__PURE__ */ new Map()), l = A(new
|
|
2329
|
+
function Ns(e, t, r) {
|
|
2330
|
+
var n = m.useState(0), o = Q(n, 2), a = o[0], i = o[1], s = A(/* @__PURE__ */ new Map()), l = A(new Cs()), u = A();
|
|
2288
2331
|
function c() {
|
|
2289
2332
|
le.cancel(u.current);
|
|
2290
2333
|
}
|
|
@@ -2294,8 +2337,8 @@ function Os(e, t, r) {
|
|
|
2294
2337
|
var g = function() {
|
|
2295
2338
|
s.current.forEach(function(p, S) {
|
|
2296
2339
|
if (p && p.offsetParent) {
|
|
2297
|
-
var
|
|
2298
|
-
l.current.get(S) !== I && l.current.set(S,
|
|
2340
|
+
var R = dt(p), I = R.offsetHeight;
|
|
2341
|
+
l.current.get(S) !== I && l.current.set(S, R.offsetHeight);
|
|
2299
2342
|
}
|
|
2300
2343
|
}), i(function(p) {
|
|
2301
2344
|
return p + 1;
|
|
@@ -2307,24 +2350,24 @@ function Os(e, t, r) {
|
|
|
2307
2350
|
var _ = e(h), p = s.current.get(_);
|
|
2308
2351
|
g ? (s.current.set(_, g), f()) : s.current.delete(_), !p != !g && (g ? t == null || t(h) : r == null || r(h));
|
|
2309
2352
|
}
|
|
2310
|
-
return
|
|
2353
|
+
return Ui(function() {
|
|
2311
2354
|
return c;
|
|
2312
2355
|
}, []), [d, f, l.current, a];
|
|
2313
2356
|
}
|
|
2314
|
-
function
|
|
2357
|
+
function Ps() {
|
|
2315
2358
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
2316
2359
|
}
|
|
2317
|
-
var
|
|
2360
|
+
var Vr = Ps() ? m.useLayoutEffect : m.useEffect, Je = function(t, r) {
|
|
2318
2361
|
var n = m.useRef(!0);
|
|
2319
|
-
|
|
2362
|
+
Vr(function() {
|
|
2320
2363
|
return t(n.current);
|
|
2321
|
-
}, r),
|
|
2364
|
+
}, r), Vr(function() {
|
|
2322
2365
|
return n.current = !1, function() {
|
|
2323
2366
|
n.current = !0;
|
|
2324
2367
|
};
|
|
2325
2368
|
}, []);
|
|
2326
2369
|
};
|
|
2327
|
-
function
|
|
2370
|
+
function jr(e) {
|
|
2328
2371
|
var t = m.useRef();
|
|
2329
2372
|
t.current = e;
|
|
2330
2373
|
var r = m.useCallback(function() {
|
|
@@ -2334,11 +2377,11 @@ function Vr(e) {
|
|
|
2334
2377
|
}, []);
|
|
2335
2378
|
return r;
|
|
2336
2379
|
}
|
|
2337
|
-
var
|
|
2338
|
-
function
|
|
2380
|
+
var Is = 10;
|
|
2381
|
+
function ws(e, t, r, n, o, a, i, s) {
|
|
2339
2382
|
var l = m.useRef(), u = m.useState(null), c = Q(u, 2), f = c[0], d = c[1];
|
|
2340
2383
|
return Je(function() {
|
|
2341
|
-
if (f && f.times <
|
|
2384
|
+
if (f && f.times < Is) {
|
|
2342
2385
|
if (!e.current) {
|
|
2343
2386
|
d(function(Y) {
|
|
2344
2387
|
return Z({}, Y);
|
|
@@ -2346,18 +2389,18 @@ function Ns(e, t, r, n, o, a, i, s) {
|
|
|
2346
2389
|
return;
|
|
2347
2390
|
}
|
|
2348
2391
|
a();
|
|
2349
|
-
var h = f.targetAlign, g = f.originAlign, _ = f.index, p = f.offset, S = e.current.clientHeight,
|
|
2392
|
+
var h = f.targetAlign, g = f.originAlign, _ = f.index, p = f.offset, S = e.current.clientHeight, R = !1, I = h, F = null;
|
|
2350
2393
|
if (S) {
|
|
2351
|
-
for (var H = h || g, M = 0, O = 0, L = 0,
|
|
2394
|
+
for (var H = h || g, M = 0, O = 0, L = 0, x = Math.min(t.length - 1, _), B = 0; B <= x; B += 1) {
|
|
2352
2395
|
var X = o(t[B]);
|
|
2353
2396
|
O = M;
|
|
2354
2397
|
var k = r.get(X);
|
|
2355
2398
|
L = O + (k === void 0 ? n : k), M = L;
|
|
2356
2399
|
}
|
|
2357
|
-
for (var J = H === "top" ? p : S - p, z =
|
|
2400
|
+
for (var J = H === "top" ? p : S - p, z = x; z >= 0; z -= 1) {
|
|
2358
2401
|
var Pe = o(t[z]), K = r.get(Pe);
|
|
2359
2402
|
if (K === void 0) {
|
|
2360
|
-
|
|
2403
|
+
R = !0;
|
|
2361
2404
|
break;
|
|
2362
2405
|
}
|
|
2363
2406
|
if (J -= K, J <= 0)
|
|
@@ -2375,9 +2418,9 @@ function Ns(e, t, r, n, o, a, i, s) {
|
|
|
2375
2418
|
O < Re ? I = "top" : L > ne && (I = "bottom");
|
|
2376
2419
|
}
|
|
2377
2420
|
}
|
|
2378
|
-
F !== null && i(F), F !== f.lastTop && (
|
|
2421
|
+
F !== null && i(F), F !== f.lastTop && (R = !0);
|
|
2379
2422
|
}
|
|
2380
|
-
|
|
2423
|
+
R && d(Z(Z({}, f), {}, {
|
|
2381
2424
|
times: f.times + 1,
|
|
2382
2425
|
targetAlign: I,
|
|
2383
2426
|
lastTop: F
|
|
@@ -2392,8 +2435,8 @@ function Ns(e, t, r, n, o, a, i, s) {
|
|
|
2392
2435
|
i(h);
|
|
2393
2436
|
else if (h && ue(h) === "object") {
|
|
2394
2437
|
var g, _ = h.align;
|
|
2395
|
-
"index" in h ? g = h.index : g = t.findIndex(function(
|
|
2396
|
-
return o(
|
|
2438
|
+
"index" in h ? g = h.index : g = t.findIndex(function(R) {
|
|
2439
|
+
return o(R) === h.key;
|
|
2397
2440
|
});
|
|
2398
2441
|
var p = h.offset, S = p === void 0 ? 0 : p;
|
|
2399
2442
|
d({
|
|
@@ -2405,7 +2448,7 @@ function Ns(e, t, r, n, o, a, i, s) {
|
|
|
2405
2448
|
}
|
|
2406
2449
|
};
|
|
2407
2450
|
}
|
|
2408
|
-
function
|
|
2451
|
+
function As(e, t, r) {
|
|
2409
2452
|
var n = e.length, o = t.length, a, i;
|
|
2410
2453
|
if (n === 0 && o === 0)
|
|
2411
2454
|
return null;
|
|
@@ -2428,15 +2471,15 @@ function Ps(e, t, r) {
|
|
|
2428
2471
|
multiple: c
|
|
2429
2472
|
};
|
|
2430
2473
|
}
|
|
2431
|
-
function
|
|
2474
|
+
function Ms(e, t, r) {
|
|
2432
2475
|
var n = m.useState(e), o = Q(n, 2), a = o[0], i = o[1], s = m.useState(null), l = Q(s, 2), u = l[0], c = l[1];
|
|
2433
2476
|
return m.useEffect(function() {
|
|
2434
|
-
var f =
|
|
2477
|
+
var f = As(a || [], e || [], t);
|
|
2435
2478
|
(f == null ? void 0 : f.index) !== void 0 && (r == null || r(f.index), c(e[f.index])), i(e);
|
|
2436
2479
|
}, [e]), [u];
|
|
2437
2480
|
}
|
|
2438
|
-
var
|
|
2439
|
-
const
|
|
2481
|
+
var kr = (typeof navigator > "u" ? "undefined" : ue(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
|
|
2482
|
+
const Mn = function(e, t) {
|
|
2440
2483
|
var r = A(!1), n = A(null);
|
|
2441
2484
|
function o() {
|
|
2442
2485
|
clearTimeout(n.current), r.current = !0, n.current = setTimeout(function() {
|
|
@@ -2456,16 +2499,16 @@ const An = function(e, t) {
|
|
|
2456
2499
|
return s && l ? (clearTimeout(n.current), r.current = !1) : (!l || r.current) && o(), !r.current && l;
|
|
2457
2500
|
};
|
|
2458
2501
|
};
|
|
2459
|
-
function
|
|
2460
|
-
var a = A(0), i = A(null), s = A(null), l = A(!1), u =
|
|
2502
|
+
function Ls(e, t, r, n, o) {
|
|
2503
|
+
var a = A(0), i = A(null), s = A(null), l = A(!1), u = Mn(t, r);
|
|
2461
2504
|
function c(p, S) {
|
|
2462
|
-
le.cancel(i.current), a.current += S, s.current = S, !u(S) && (
|
|
2463
|
-
var
|
|
2464
|
-
o(a.current *
|
|
2505
|
+
le.cancel(i.current), a.current += S, s.current = S, !u(S) && (kr || p.preventDefault(), i.current = le(function() {
|
|
2506
|
+
var R = l.current ? 10 : 1;
|
|
2507
|
+
o(a.current * R), a.current = 0;
|
|
2465
2508
|
}));
|
|
2466
2509
|
}
|
|
2467
2510
|
function f(p, S) {
|
|
2468
|
-
o(S, !0),
|
|
2511
|
+
o(S, !0), kr || p.preventDefault();
|
|
2469
2512
|
}
|
|
2470
2513
|
var d = A(null), h = A(null);
|
|
2471
2514
|
function g(p) {
|
|
@@ -2473,8 +2516,8 @@ function ws(e, t, r, n, o) {
|
|
|
2473
2516
|
le.cancel(h.current), h.current = le(function() {
|
|
2474
2517
|
d.current = null;
|
|
2475
2518
|
}, 2);
|
|
2476
|
-
var S = p.deltaX,
|
|
2477
|
-
(d.current === "sx" || !d.current && I &&
|
|
2519
|
+
var S = p.deltaX, R = p.deltaY, I = p.shiftKey, F = S, H = R;
|
|
2520
|
+
(d.current === "sx" || !d.current && I && R && !S) && (F = R, H = 0, d.current = "sx");
|
|
2478
2521
|
var M = Math.abs(F), O = Math.abs(H);
|
|
2479
2522
|
d.current === null && (d.current = n && M > O ? "x" : "y"), d.current === "y" ? c(p, H) : f(p, F);
|
|
2480
2523
|
}
|
|
@@ -2484,13 +2527,13 @@ function ws(e, t, r, n, o) {
|
|
|
2484
2527
|
}
|
|
2485
2528
|
return [g, _];
|
|
2486
2529
|
}
|
|
2487
|
-
var
|
|
2488
|
-
function
|
|
2530
|
+
var $s = 14 / 15;
|
|
2531
|
+
function Hs(e, t, r) {
|
|
2489
2532
|
var n = A(!1), o = A(0), a = A(null), i = A(null), s, l = function(d) {
|
|
2490
2533
|
if (n.current) {
|
|
2491
2534
|
var h = Math.ceil(d.touches[0].pageY), g = o.current - h;
|
|
2492
2535
|
o.current = h, r(g) && d.preventDefault(), clearInterval(i.current), i.current = setInterval(function() {
|
|
2493
|
-
g *=
|
|
2536
|
+
g *= $s, (!r(g, !0) || Math.abs(g) <= 0.1) && clearInterval(i.current);
|
|
2494
2537
|
}, 16);
|
|
2495
2538
|
}
|
|
2496
2539
|
}, u = function() {
|
|
@@ -2507,22 +2550,22 @@ function Ms(e, t, r) {
|
|
|
2507
2550
|
};
|
|
2508
2551
|
}, [e]);
|
|
2509
2552
|
}
|
|
2510
|
-
var
|
|
2511
|
-
function
|
|
2553
|
+
var Ds = 20;
|
|
2554
|
+
function zr() {
|
|
2512
2555
|
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;
|
|
2513
|
-
return isNaN(r) && (r = 0), r = Math.max(r,
|
|
2556
|
+
return isNaN(r) && (r = 0), r = Math.max(r, Ds), Math.floor(r);
|
|
2514
2557
|
}
|
|
2515
|
-
function
|
|
2558
|
+
function xs(e, t, r, n) {
|
|
2516
2559
|
var o = m.useMemo(function() {
|
|
2517
2560
|
return [/* @__PURE__ */ new Map(), []];
|
|
2518
2561
|
}, [e, r.id, n]), a = Q(o, 2), i = a[0], s = a[1], l = function(c) {
|
|
2519
2562
|
var f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : c, d = i.get(c), h = i.get(f);
|
|
2520
2563
|
if (d === void 0 || h === void 0)
|
|
2521
2564
|
for (var g = e.length, _ = s.length; _ < g; _ += 1) {
|
|
2522
|
-
var p, S = e[_],
|
|
2523
|
-
i.set(
|
|
2524
|
-
var I = (p = r.get(
|
|
2525
|
-
if (s[_] = (s[_ - 1] || 0) + I,
|
|
2565
|
+
var p, S = e[_], R = t(S);
|
|
2566
|
+
i.set(R, _);
|
|
2567
|
+
var I = (p = r.get(R)) !== null && p !== void 0 ? p : n;
|
|
2568
|
+
if (s[_] = (s[_ - 1] || 0) + I, R === c && (d = _), R === f && (h = _), d !== void 0 && h !== void 0)
|
|
2526
2569
|
break;
|
|
2527
2570
|
}
|
|
2528
2571
|
return {
|
|
@@ -2532,36 +2575,36 @@ function $s(e, t, r, n) {
|
|
|
2532
2575
|
};
|
|
2533
2576
|
return l;
|
|
2534
2577
|
}
|
|
2535
|
-
var
|
|
2578
|
+
var Us = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles"], Bs = [], Ws = {
|
|
2536
2579
|
overflowY: "auto",
|
|
2537
2580
|
overflowAnchor: "none"
|
|
2538
2581
|
};
|
|
2539
|
-
function
|
|
2540
|
-
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, p = e.component, S = p === void 0 ? "div" : p,
|
|
2582
|
+
function Vs(e, t) {
|
|
2583
|
+
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, p = e.component, S = p === void 0 ? "div" : p, R = e.onScroll, I = e.onVirtualScroll, F = e.onVisibleChange, H = e.innerProps, M = e.extraRender, O = e.styles, L = Do(e, Us), x = m.useCallback(function(E) {
|
|
2541
2584
|
return typeof d == "function" ? d(E) : E == null ? void 0 : E[d];
|
|
2542
|
-
}, [d]), B =
|
|
2585
|
+
}, [d]), B = Ns(x, null, null), X = Q(B, 4), k = X[0], J = X[1], z = X[2], Pe = X[3], K = !!(h !== !1 && a && i), Re = m.useMemo(function() {
|
|
2543
2586
|
return Object.values(z.maps).reduce(function(E, y) {
|
|
2544
2587
|
return E + y;
|
|
2545
2588
|
}, 0);
|
|
2546
|
-
}, [z.id, z.maps]), ne = K && c && (Math.max(i * c.length, Re) > a || !!_), Y = g === "rtl", Ve =
|
|
2589
|
+
}, [z.id, z.maps]), ne = K && c && (Math.max(i * c.length, Re) > a || !!_), Y = g === "rtl", Ve = _t(n, q({}, "".concat(n, "-rtl"), Y), o), $ = c || Bs, Oe = A(), Ie = A(), je = zt(0), ke = Q(je, 2), ie = ke[0], ge = ke[1], ee = zt(0), oe = Q(ee, 2), V = oe[0], U = oe[1], he = zt(!1), ze = Q(he, 2), Qe = ze[0], we = ze[1], nt = function() {
|
|
2547
2590
|
we(!0);
|
|
2548
2591
|
}, it = function() {
|
|
2549
2592
|
we(!1);
|
|
2550
|
-
},
|
|
2551
|
-
getKey:
|
|
2593
|
+
}, $t = {
|
|
2594
|
+
getKey: x
|
|
2552
2595
|
};
|
|
2553
2596
|
function Fe(E) {
|
|
2554
|
-
|
|
2597
|
+
ge(function(y) {
|
|
2555
2598
|
var P;
|
|
2556
2599
|
typeof E == "function" ? P = E(y) : P = E;
|
|
2557
|
-
var j =
|
|
2600
|
+
var j = Bn(P);
|
|
2558
2601
|
return Oe.current.scrollTop = j, j;
|
|
2559
2602
|
});
|
|
2560
2603
|
}
|
|
2561
2604
|
var Ae = A({
|
|
2562
2605
|
start: 0,
|
|
2563
2606
|
end: $.length
|
|
2564
|
-
}), ot = A(), st =
|
|
2607
|
+
}), ot = A(), st = Ms($, x), Ht = Q(st, 1), Ce = Ht[0];
|
|
2565
2608
|
ot.current = Ce;
|
|
2566
2609
|
var at = m.useMemo(function() {
|
|
2567
2610
|
if (!K)
|
|
@@ -2580,73 +2623,73 @@ function xs(e, t) {
|
|
|
2580
2623
|
offset: void 0
|
|
2581
2624
|
};
|
|
2582
2625
|
}
|
|
2583
|
-
for (var y = 0, P, j,
|
|
2584
|
-
var
|
|
2585
|
-
|
|
2626
|
+
for (var y = 0, P, j, _e, Yn = $.length, Xe = 0; Xe < Yn; Xe += 1) {
|
|
2627
|
+
var qn = $[Xe], Xn = x(qn), Fr = z.get(Xn), kt = y + (Fr === void 0 ? i : Fr);
|
|
2628
|
+
kt >= ie && P === void 0 && (P = Xe, j = y), kt > ie + a && _e === void 0 && (_e = Xe), y = kt;
|
|
2586
2629
|
}
|
|
2587
|
-
return P === void 0 && (P = 0, j = 0,
|
|
2630
|
+
return P === void 0 && (P = 0, j = 0, _e = Math.ceil(a / i)), _e === void 0 && (_e = $.length - 1), _e = Math.min(_e + 1, $.length - 1), {
|
|
2588
2631
|
scrollHeight: y,
|
|
2589
2632
|
start: P,
|
|
2590
|
-
end:
|
|
2633
|
+
end: _e,
|
|
2591
2634
|
offset: j
|
|
2592
2635
|
};
|
|
2593
2636
|
}, [ne, K, ie, $, Pe, a]), Me = at.scrollHeight, Ge = at.start, Ye = at.end, mr = at.offset;
|
|
2594
2637
|
Ae.current.start = Ge, Ae.current.end = Ye;
|
|
2595
|
-
var
|
|
2638
|
+
var $n = m.useState({
|
|
2596
2639
|
width: 0,
|
|
2597
2640
|
height: a
|
|
2598
|
-
}), vr = Q(
|
|
2599
|
-
|
|
2641
|
+
}), vr = Q($n, 2), de = vr[0], Hn = vr[1], Dn = function(y) {
|
|
2642
|
+
Hn({
|
|
2600
2643
|
width: y.width || y.offsetWidth,
|
|
2601
2644
|
height: y.height || y.offsetHeight
|
|
2602
2645
|
});
|
|
2603
|
-
}, pr = A(), gr = A(),
|
|
2604
|
-
return
|
|
2605
|
-
}, [
|
|
2606
|
-
return
|
|
2607
|
-
}, [
|
|
2608
|
-
|
|
2609
|
-
function
|
|
2646
|
+
}, pr = A(), gr = A(), xn = m.useMemo(function() {
|
|
2647
|
+
return zr(de.width, _);
|
|
2648
|
+
}, [de.width, _]), Un = m.useMemo(function() {
|
|
2649
|
+
return zr(de.height, Me);
|
|
2650
|
+
}, [de.height, Me]), Dt = Me - a, xt = A(Dt);
|
|
2651
|
+
xt.current = Dt;
|
|
2652
|
+
function Bn(E) {
|
|
2610
2653
|
var y = E;
|
|
2611
|
-
return Number.isNaN(
|
|
2654
|
+
return Number.isNaN(xt.current) || (y = Math.min(y, xt.current)), y = Math.max(y, 0), y;
|
|
2612
2655
|
}
|
|
2613
|
-
var _r = ie <= 0, Sr = ie >=
|
|
2656
|
+
var _r = ie <= 0, Sr = ie >= Dt, Wn = Mn(_r, Sr), Ut = function() {
|
|
2614
2657
|
return {
|
|
2615
2658
|
x: Y ? -V : V,
|
|
2616
2659
|
y: ie
|
|
2617
2660
|
};
|
|
2618
|
-
},
|
|
2661
|
+
}, Bt = A(Ut()), Wt = jr(function() {
|
|
2619
2662
|
if (I) {
|
|
2620
|
-
var E =
|
|
2621
|
-
(
|
|
2663
|
+
var E = Ut();
|
|
2664
|
+
(Bt.current.x !== E.x || Bt.current.y !== E.y) && (I(E), Bt.current = E);
|
|
2622
2665
|
}
|
|
2623
2666
|
});
|
|
2624
2667
|
function Er(E, y) {
|
|
2625
2668
|
var P = E;
|
|
2626
|
-
y ? (
|
|
2627
|
-
|
|
2628
|
-
}),
|
|
2669
|
+
y ? (Lr(function() {
|
|
2670
|
+
U(P);
|
|
2671
|
+
}), Wt()) : Fe(P);
|
|
2629
2672
|
}
|
|
2630
|
-
function
|
|
2673
|
+
function Vn(E) {
|
|
2631
2674
|
var y = E.currentTarget.scrollTop;
|
|
2632
|
-
y !== ie && Fe(y),
|
|
2675
|
+
y !== ie && Fe(y), R == null || R(E), Wt();
|
|
2633
2676
|
}
|
|
2634
|
-
var
|
|
2635
|
-
var P = y, j = _ ? _ -
|
|
2677
|
+
var Vt = function(y) {
|
|
2678
|
+
var P = y, j = _ ? _ - de.width : 0;
|
|
2636
2679
|
return P = Math.max(P, 0), P = Math.min(P, j), P;
|
|
2637
|
-
},
|
|
2638
|
-
y ? (
|
|
2639
|
-
|
|
2680
|
+
}, jn = jr(function(E, y) {
|
|
2681
|
+
y ? (Lr(function() {
|
|
2682
|
+
U(function(P) {
|
|
2640
2683
|
var j = P + (Y ? -E : E);
|
|
2641
|
-
return
|
|
2684
|
+
return Vt(j);
|
|
2642
2685
|
});
|
|
2643
|
-
}),
|
|
2686
|
+
}), Wt()) : Fe(function(P) {
|
|
2644
2687
|
var j = P + E;
|
|
2645
2688
|
return j;
|
|
2646
2689
|
});
|
|
2647
|
-
}),
|
|
2648
|
-
|
|
2649
|
-
return
|
|
2690
|
+
}), kn = Ls(K, _r, Sr, !!_, jn), yr = Q(kn, 2), jt = yr[0], br = yr[1];
|
|
2691
|
+
Hs(K, Oe, function(E, y) {
|
|
2692
|
+
return Wn(E, y) ? !1 : (jt({
|
|
2650
2693
|
preventDefault: function() {
|
|
2651
2694
|
},
|
|
2652
2695
|
deltaY: E
|
|
@@ -2656,28 +2699,28 @@ function xs(e, t) {
|
|
|
2656
2699
|
K && P.preventDefault();
|
|
2657
2700
|
}
|
|
2658
2701
|
var y = Oe.current;
|
|
2659
|
-
return y.addEventListener("wheel",
|
|
2660
|
-
y.removeEventListener("wheel",
|
|
2702
|
+
return y.addEventListener("wheel", jt), y.addEventListener("DOMMouseScroll", br), y.addEventListener("MozMousePixelScroll", E), function() {
|
|
2703
|
+
y.removeEventListener("wheel", jt), y.removeEventListener("DOMMouseScroll", br), y.removeEventListener("MozMousePixelScroll", E);
|
|
2661
2704
|
};
|
|
2662
2705
|
}, [K]), Je(function() {
|
|
2663
|
-
_ &&
|
|
2664
|
-
return
|
|
2706
|
+
_ && U(function(E) {
|
|
2707
|
+
return Vt(E);
|
|
2665
2708
|
});
|
|
2666
|
-
}, [
|
|
2709
|
+
}, [de.width, _]);
|
|
2667
2710
|
var Tr = function() {
|
|
2668
2711
|
var y, P;
|
|
2669
2712
|
(y = pr.current) === null || y === void 0 || y.delayHidden(), (P = gr.current) === null || P === void 0 || P.delayHidden();
|
|
2670
|
-
}, Rr =
|
|
2713
|
+
}, Rr = ws(Oe, $, z, i, x, function() {
|
|
2671
2714
|
return J(!0);
|
|
2672
2715
|
}, Fe, Tr);
|
|
2673
2716
|
m.useImperativeHandle(t, function() {
|
|
2674
2717
|
return {
|
|
2675
|
-
getScrollInfo:
|
|
2718
|
+
getScrollInfo: Ut,
|
|
2676
2719
|
scrollTo: function(y) {
|
|
2677
2720
|
function P(j) {
|
|
2678
2721
|
return j && ue(j) === "object" && ("left" in j || "top" in j);
|
|
2679
2722
|
}
|
|
2680
|
-
P(y) ? (y.left !== void 0 &&
|
|
2723
|
+
P(y) ? (y.left !== void 0 && U(Vt(y.left)), Rr(y.top)) : Rr(y);
|
|
2681
2724
|
}
|
|
2682
2725
|
};
|
|
2683
2726
|
}), Je(function() {
|
|
@@ -2686,16 +2729,16 @@ function xs(e, t) {
|
|
|
2686
2729
|
F(E, $);
|
|
2687
2730
|
}
|
|
2688
2731
|
}, [Ge, Ye, $]);
|
|
2689
|
-
var
|
|
2732
|
+
var zn = xs($, x, z, i), Qn = M == null ? void 0 : M({
|
|
2690
2733
|
start: Ge,
|
|
2691
2734
|
end: Ye,
|
|
2692
2735
|
virtual: ne,
|
|
2693
2736
|
offsetX: V,
|
|
2694
2737
|
offsetY: mr,
|
|
2695
2738
|
rtl: Y,
|
|
2696
|
-
getSize:
|
|
2697
|
-
}),
|
|
2698
|
-
a && (qe = Z(q({}, l ? "height" : "maxHeight", a),
|
|
2739
|
+
getSize: zn
|
|
2740
|
+
}), Gn = Fs($, Ge, Ye, _, k, f, $t), qe = null;
|
|
2741
|
+
a && (qe = Z(q({}, l ? "height" : "maxHeight", a), Ws), K && (qe.overflowY = "hidden", _ && (qe.overflowX = "hidden"), Qe && (qe.pointerEvents = "none")));
|
|
2699
2742
|
var Or = {};
|
|
2700
2743
|
return Y && (Or.dir = "rtl"), /* @__PURE__ */ m.createElement("div", et({
|
|
2701
2744
|
style: Z(Z({}, u), {}, {
|
|
@@ -2703,14 +2746,14 @@ function xs(e, t) {
|
|
|
2703
2746
|
}),
|
|
2704
2747
|
className: Ve
|
|
2705
2748
|
}, Or, L), /* @__PURE__ */ m.createElement(hr, {
|
|
2706
|
-
onResize:
|
|
2749
|
+
onResize: Dn
|
|
2707
2750
|
}, /* @__PURE__ */ m.createElement(S, {
|
|
2708
2751
|
className: "".concat(n, "-holder"),
|
|
2709
2752
|
style: qe,
|
|
2710
2753
|
ref: Oe,
|
|
2711
|
-
onScroll:
|
|
2754
|
+
onScroll: Vn,
|
|
2712
2755
|
onMouseEnter: Tr
|
|
2713
|
-
}, /* @__PURE__ */ m.createElement(
|
|
2756
|
+
}, /* @__PURE__ */ m.createElement(Pn, {
|
|
2714
2757
|
prefixCls: n,
|
|
2715
2758
|
height: Me,
|
|
2716
2759
|
offsetX: V,
|
|
@@ -2720,8 +2763,8 @@ function xs(e, t) {
|
|
|
2720
2763
|
ref: Ie,
|
|
2721
2764
|
innerProps: H,
|
|
2722
2765
|
rtl: Y,
|
|
2723
|
-
extra:
|
|
2724
|
-
},
|
|
2766
|
+
extra: Qn
|
|
2767
|
+
}, Gn))), ne && Me > a && /* @__PURE__ */ m.createElement(Wr, {
|
|
2725
2768
|
ref: pr,
|
|
2726
2769
|
prefixCls: n,
|
|
2727
2770
|
scrollOffset: ie,
|
|
@@ -2731,10 +2774,10 @@ function xs(e, t) {
|
|
|
2731
2774
|
onStartMove: nt,
|
|
2732
2775
|
onStopMove: it,
|
|
2733
2776
|
spinSize: Un,
|
|
2734
|
-
containerSize:
|
|
2777
|
+
containerSize: de.height,
|
|
2735
2778
|
style: O == null ? void 0 : O.verticalScrollBar,
|
|
2736
2779
|
thumbStyle: O == null ? void 0 : O.verticalScrollBarThumb
|
|
2737
|
-
}), ne && _ >
|
|
2780
|
+
}), ne && _ > de.width && /* @__PURE__ */ m.createElement(Wr, {
|
|
2738
2781
|
ref: gr,
|
|
2739
2782
|
prefixCls: n,
|
|
2740
2783
|
scrollOffset: V,
|
|
@@ -2743,17 +2786,17 @@ function xs(e, t) {
|
|
|
2743
2786
|
onScroll: Er,
|
|
2744
2787
|
onStartMove: nt,
|
|
2745
2788
|
onStopMove: it,
|
|
2746
|
-
spinSize:
|
|
2747
|
-
containerSize:
|
|
2789
|
+
spinSize: xn,
|
|
2790
|
+
containerSize: de.width,
|
|
2748
2791
|
horizontal: !0,
|
|
2749
2792
|
style: O == null ? void 0 : O.horizontalScrollBar,
|
|
2750
2793
|
thumbStyle: O == null ? void 0 : O.horizontalScrollBarThumb
|
|
2751
2794
|
}));
|
|
2752
2795
|
}
|
|
2753
|
-
var
|
|
2754
|
-
|
|
2755
|
-
function
|
|
2756
|
-
const { model: t } = e, r = Ke(We), n = Ee(t.searchString$, "", !0), o = Ee(t.filterItems$, void 0, !0), a = r.t("sheets-filter.panel.filter-only"), i =
|
|
2796
|
+
var Ln = /* @__PURE__ */ m.forwardRef(Vs);
|
|
2797
|
+
Ln.displayName = "List";
|
|
2798
|
+
function js(e) {
|
|
2799
|
+
const { model: t } = e, r = Ke(We), n = Ee(t.searchString$, "", !0), o = Ee(t.filterItems$, void 0, !0), a = r.t("sheets-filter.panel.filter-only"), i = Gt(o), s = i.checked > 0 && i.unchecked === 0, l = i.checked > 0 && i.unchecked > 0, u = ae((h, g) => {
|
|
2757
2800
|
t.onFilterCheckToggled(h, g);
|
|
2758
2801
|
}, [t]), c = ae((h) => {
|
|
2759
2802
|
t.onFilterOnly(h);
|
|
@@ -2762,15 +2805,15 @@ function Bs(e) {
|
|
|
2762
2805
|
}, [t, s]), d = ae((h) => {
|
|
2763
2806
|
t.setSearchString(h);
|
|
2764
2807
|
}, [t]);
|
|
2765
|
-
return /* @__PURE__ */
|
|
2766
|
-
|
|
2808
|
+
return /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelValuesContainer }, /* @__PURE__ */ T.createElement(nn, { value: n, placeholder: r.t("sheets-filter.panel.search-placeholder"), onChange: d }), /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelValuesList }, /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelValuesItem }, /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelValuesItemInner }, /* @__PURE__ */ T.createElement(
|
|
2809
|
+
Mr,
|
|
2767
2810
|
{
|
|
2768
2811
|
indeterminate: l,
|
|
2769
2812
|
disabled: o.length === 0,
|
|
2770
2813
|
checked: s,
|
|
2771
2814
|
onChange: f
|
|
2772
2815
|
}
|
|
2773
|
-
), /* @__PURE__ */
|
|
2816
|
+
), /* @__PURE__ */ T.createElement("span", { className: D.sheetsFilterPanelValuesItemText }, `${r.t("sheets-filter.panel.select-all")}`), /* @__PURE__ */ T.createElement("span", { className: D.sheetsFilterPanelValuesItemCount }, `(${i.checked}/${i.checked + i.unchecked})`))), /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelValuesVirtual }, /* @__PURE__ */ T.createElement(Ln, { style: { paddingRight: 8 }, data: o, height: 190, itemHeight: 32, itemKey: (h) => `${h.value}----${h.checked}` }, (h) => /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelValuesItem }, /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelValuesItemInner }, /* @__PURE__ */ T.createElement(Mr, { checked: h.checked, onChange: () => u(h, !h.checked) }), /* @__PURE__ */ T.createElement(wi, { showIfEllipsis: !0, placement: "top", title: h.value }, /* @__PURE__ */ T.createElement("span", { className: D.sheetsFilterPanelValuesItemText }, h.value)), /* @__PURE__ */ T.createElement("span", { className: D.sheetsFilterPanelValuesItemCount }, `(${h.count})`), /* @__PURE__ */ T.createElement(
|
|
2774
2817
|
ct,
|
|
2775
2818
|
{
|
|
2776
2819
|
className: D.sheetsFilterPanelValuesItemExcludeButton,
|
|
@@ -2781,9 +2824,9 @@ function Bs(e) {
|
|
|
2781
2824
|
a
|
|
2782
2825
|
)))))));
|
|
2783
2826
|
}
|
|
2784
|
-
function
|
|
2785
|
-
const e = Ke(be), t = Ke(We), r = Ke(ce), n = Ee(e.filterBy$, void 0, !0), o = Ee(e.filterByModel$, void 0, !1), a = Ee(() => (o == null ? void 0 : o.canApply$) ||
|
|
2786
|
-
r.executeCommand(
|
|
2827
|
+
function ks() {
|
|
2828
|
+
const e = Ke(be), t = Ke(We), r = Ke(ce), n = Ee(e.filterBy$, void 0, !0), o = Ee(e.filterByModel$, void 0, !1), a = Ee(() => (o == null ? void 0 : o.canApply$) || tt(!1), void 0, !1, [o]), i = zs(t), s = !Ee(e.hasCriteria$), l = ae((d) => {
|
|
2829
|
+
r.executeCommand(vn.id, { filterBy: d });
|
|
2787
2830
|
}, [r]), u = ae(async () => {
|
|
2788
2831
|
await (o == null ? void 0 : o.clear()), r.executeCommand(Ze.id);
|
|
2789
2832
|
}, [o, r]), c = ae(() => {
|
|
@@ -2791,149 +2834,72 @@ function Ws() {
|
|
|
2791
2834
|
}, [r]), f = ae(async () => {
|
|
2792
2835
|
await (o == null ? void 0 : o.apply()), r.executeCommand(Ze.id);
|
|
2793
2836
|
}, [o, r]);
|
|
2794
|
-
return /* @__PURE__ */
|
|
2837
|
+
return /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanel }, /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelHeader }, /* @__PURE__ */ T.createElement(Ai, { value: n, options: i, onChange: (d) => l(d) })), o ? /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelContent }, n === vt.VALUES ? /* @__PURE__ */ T.createElement(js, { model: o }) : /* @__PURE__ */ T.createElement(No, { model: o })) : null, /* @__PURE__ */ T.createElement("div", { className: D.sheetsFilterPanelFooter }, /* @__PURE__ */ T.createElement(ct, { type: "link", onClick: u, disabled: s }, t.t("sheets-filter.panel.clear-filter")), /* @__PURE__ */ T.createElement("span", { className: D.sheetsFilterPanelFooterPrimaryButtons }, /* @__PURE__ */ T.createElement(ct, { type: "default", onClick: c }, t.t("sheets-filter.panel.cancel")), /* @__PURE__ */ T.createElement(ct, { disabled: !a, type: "primary", onClick: f }, t.t("sheets-filter.panel.confirm")))));
|
|
2795
2838
|
}
|
|
2796
|
-
function
|
|
2839
|
+
function zs(e) {
|
|
2797
2840
|
const t = e.getCurrentLocale();
|
|
2798
2841
|
return lr(
|
|
2799
2842
|
() => [
|
|
2800
|
-
{ label: e.t("sheets-filter.panel.by-values"), value:
|
|
2801
|
-
{ label: e.t("sheets-filter.panel.by-conditions"), value:
|
|
2843
|
+
{ label: e.t("sheets-filter.panel.by-values"), value: vt.VALUES },
|
|
2844
|
+
{ label: e.t("sheets-filter.panel.by-conditions"), value: vt.CONDITIONS }
|
|
2802
2845
|
],
|
|
2803
2846
|
[t, e]
|
|
2804
2847
|
);
|
|
2805
2848
|
}
|
|
2806
|
-
const
|
|
2849
|
+
const Qs = {
|
|
2807
2850
|
id: rt.id,
|
|
2808
|
-
binding:
|
|
2851
|
+
binding: li.L | Nr.CTRL_COMMAND | Nr.SHIFT,
|
|
2809
2852
|
description: "sheets-filter.shortcut.smart-toggle-filter",
|
|
2810
|
-
preconditions:
|
|
2853
|
+
preconditions: yi,
|
|
2811
2854
|
group: "4_sheet-edit"
|
|
2812
2855
|
};
|
|
2813
|
-
function
|
|
2814
|
-
const t = e.get(
|
|
2856
|
+
function Gs(e) {
|
|
2857
|
+
const t = e.get(fe);
|
|
2815
2858
|
return {
|
|
2816
2859
|
id: rt.id,
|
|
2817
2860
|
group: nr.TOOLBAR_FORMULAS_INSERT,
|
|
2818
2861
|
type: ir.BUTTON_SELECTOR,
|
|
2819
2862
|
icon: "FilterSingle",
|
|
2820
2863
|
tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
|
|
2821
|
-
positions: [
|
|
2822
|
-
hidden$: or(e,
|
|
2823
|
-
activated$: t.activeFilterModel$.pipe(
|
|
2864
|
+
positions: [ui.TOOLBAR_START],
|
|
2865
|
+
hidden$: or(e, Be.UNIVER_SHEET),
|
|
2866
|
+
activated$: t.activeFilterModel$.pipe(He((r) => !!r))
|
|
2824
2867
|
};
|
|
2825
2868
|
}
|
|
2826
|
-
function
|
|
2827
|
-
const t = e.get(
|
|
2869
|
+
function Ys(e) {
|
|
2870
|
+
const t = e.get(fe);
|
|
2828
2871
|
return {
|
|
2829
|
-
id:
|
|
2872
|
+
id: fn.id,
|
|
2830
2873
|
group: nr.TOOLBAR_OTHERS,
|
|
2831
2874
|
type: ir.BUTTON,
|
|
2832
2875
|
title: "sheets-filter.toolbar.clear-filter-criteria",
|
|
2833
2876
|
positions: [rt.id],
|
|
2834
|
-
hidden$: or(e,
|
|
2877
|
+
hidden$: or(e, Be.UNIVER_SHEET),
|
|
2835
2878
|
disabled$: t.activeFilterModel$.pipe(sr((r) => {
|
|
2836
2879
|
var n;
|
|
2837
|
-
return (n = r == null ? void 0 : r.hasCriteria$.pipe(
|
|
2880
|
+
return (n = r == null ? void 0 : r.hasCriteria$.pipe(He((o) => !o))) != null ? n : tt(!0);
|
|
2838
2881
|
}))
|
|
2839
2882
|
};
|
|
2840
2883
|
}
|
|
2841
|
-
function
|
|
2842
|
-
const t = e.get(
|
|
2884
|
+
function qs(e) {
|
|
2885
|
+
const t = e.get(fe);
|
|
2843
2886
|
return {
|
|
2844
|
-
id:
|
|
2887
|
+
id: hn.id,
|
|
2845
2888
|
group: nr.TOOLBAR_OTHERS,
|
|
2846
2889
|
type: ir.BUTTON,
|
|
2847
2890
|
title: "sheets-filter.toolbar.re-calc-filter-conditions",
|
|
2848
2891
|
positions: [rt.id],
|
|
2849
|
-
hidden$: or(e,
|
|
2892
|
+
hidden$: or(e, Be.UNIVER_SHEET),
|
|
2850
2893
|
disabled$: t.activeFilterModel$.pipe(sr((r) => {
|
|
2851
2894
|
var n;
|
|
2852
|
-
return (n = r == null ? void 0 : r.hasCriteria$.pipe(
|
|
2895
|
+
return (n = r == null ? void 0 : r.hasCriteria$.pipe(He((o) => !o))) != null ? n : tt(!0);
|
|
2853
2896
|
}))
|
|
2854
2897
|
};
|
|
2855
2898
|
}
|
|
2856
|
-
var Gs = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, qs = (e, t, r, n) => {
|
|
2857
|
-
for (var o = n > 1 ? void 0 : n ? Ys(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2858
|
-
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2859
|
-
return n && o && Gs(t, r, o), o;
|
|
2860
|
-
}, _e = (e, t) => (r, n) => t(r, n, e);
|
|
2861
|
-
const zr = "FILTER_PANEL_POPUP";
|
|
2862
|
-
let mt = class extends qr {
|
|
2863
|
-
constructor(t, r, n, o, a, i, s, l) {
|
|
2864
|
-
super();
|
|
2865
|
-
C(this, "_popupDisposable");
|
|
2866
|
-
this._injector = t, this._componentManager = r, this._sheetsFilterPanelService = n, this._sheetCanvasPopupService = o, this._shortcutService = a, this._commandService = i, this._menuService = s, this._contextService = l, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI();
|
|
2867
|
-
}
|
|
2868
|
-
dispose() {
|
|
2869
|
-
super.dispose(), this._closeFilterPopup();
|
|
2870
|
-
}
|
|
2871
|
-
_initShortcuts() {
|
|
2872
|
-
[
|
|
2873
|
-
js
|
|
2874
|
-
].forEach((t) => {
|
|
2875
|
-
this.disposeWithMe(this._shortcutService.registerShortcut(t));
|
|
2876
|
-
});
|
|
2877
|
-
}
|
|
2878
|
-
_initCommands() {
|
|
2879
|
-
[
|
|
2880
|
-
rt,
|
|
2881
|
-
$e,
|
|
2882
|
-
cn,
|
|
2883
|
-
fn,
|
|
2884
|
-
mn,
|
|
2885
|
-
dn,
|
|
2886
|
-
Ze
|
|
2887
|
-
].forEach((t) => {
|
|
2888
|
-
this.disposeWithMe(this._commandService.registerCommand(t));
|
|
2889
|
-
});
|
|
2890
|
-
}
|
|
2891
|
-
_initMenuItems() {
|
|
2892
|
-
[
|
|
2893
|
-
ks,
|
|
2894
|
-
zs,
|
|
2895
|
-
Qs
|
|
2896
|
-
].forEach((t) => {
|
|
2897
|
-
this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(t)));
|
|
2898
|
-
});
|
|
2899
|
-
}
|
|
2900
|
-
_initUI() {
|
|
2901
|
-
this.disposeWithMe(this._componentManager.register(zr, Ws)), this.disposeWithMe(this._componentManager.register("FilterSingle", un)), this.disposeWithMe(this._contextService.subscribeContextValue$(xe).pipe(vi()).subscribe((t) => {
|
|
2902
|
-
t ? this._openFilterPopup() : this._closeFilterPopup();
|
|
2903
|
-
}));
|
|
2904
|
-
}
|
|
2905
|
-
_openFilterPopup() {
|
|
2906
|
-
const t = this._sheetsFilterPanelService.filterModel;
|
|
2907
|
-
if (!t)
|
|
2908
|
-
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
2909
|
-
const r = t.getRange(), n = this._sheetsFilterPanelService.col, { startRow: o } = r;
|
|
2910
|
-
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(o, n, {
|
|
2911
|
-
componentKey: zr,
|
|
2912
|
-
direction: "horizontal",
|
|
2913
|
-
closeOnSelfTarget: !0,
|
|
2914
|
-
onClickOutside: () => this._commandService.syncExecuteCommand(Ze.id)
|
|
2915
|
-
});
|
|
2916
|
-
}
|
|
2917
|
-
_closeFilterPopup() {
|
|
2918
|
-
var t;
|
|
2919
|
-
(t = this._popupDisposable) == null || t.dispose(), this._popupDisposable = null;
|
|
2920
|
-
}
|
|
2921
|
-
};
|
|
2922
|
-
mt = qs([
|
|
2923
|
-
Xr(Kr.Ready, mt),
|
|
2924
|
-
_e(0, G(Ot)),
|
|
2925
|
-
_e(1, G(ai)),
|
|
2926
|
-
_e(2, G(be)),
|
|
2927
|
-
_e(3, G(yi)),
|
|
2928
|
-
_e(4, li),
|
|
2929
|
-
_e(5, ce),
|
|
2930
|
-
_e(6, ui),
|
|
2931
|
-
_e(7, Rt)
|
|
2932
|
-
], mt);
|
|
2933
2899
|
const Se = 16, Xs = 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");
|
|
2934
2900
|
class Qr {
|
|
2935
2901
|
static drawNoCriteria(t, r, n, o) {
|
|
2936
|
-
t.save(),
|
|
2902
|
+
t.save(), Ir.drawWith(t, {
|
|
2937
2903
|
radius: 2,
|
|
2938
2904
|
width: Se,
|
|
2939
2905
|
height: Se,
|
|
@@ -2941,7 +2907,7 @@ class Qr {
|
|
|
2941
2907
|
}), t.lineCap = "square", t.strokeStyle = n, t.scale(r / Se, r / Se), t.beginPath(), t.lineWidth = 1, t.lineCap = "round", t.moveTo(3, 4), t.lineTo(13, 4), t.moveTo(4.5, 8), t.lineTo(11.5, 8), t.moveTo(6, 12), t.lineTo(10, 12), t.stroke(), t.restore();
|
|
2942
2908
|
}
|
|
2943
2909
|
static drawHasCriteria(t, r, n, o) {
|
|
2944
|
-
t.save(),
|
|
2910
|
+
t.save(), Ir.drawWith(t, {
|
|
2945
2911
|
radius: 2,
|
|
2946
2912
|
width: Se,
|
|
2947
2913
|
height: Se,
|
|
@@ -2953,9 +2919,9 @@ var Ks = Object.defineProperty, Zs = Object.getOwnPropertyDescriptor, Js = (e, t
|
|
|
2953
2919
|
for (var o = n > 1 ? void 0 : n ? Zs(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2954
2920
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2955
2921
|
return n && o && Ks(t, r, o), o;
|
|
2956
|
-
},
|
|
2957
|
-
const
|
|
2958
|
-
let
|
|
2922
|
+
}, Qt = (e, t) => (r, n) => t(r, n, e);
|
|
2923
|
+
const pe = 16, lt = 1;
|
|
2924
|
+
let Zt = class extends Ni {
|
|
2959
2925
|
constructor(t, r, n, o, a) {
|
|
2960
2926
|
super(t, r);
|
|
2961
2927
|
C(this, "_cellWidth", 0);
|
|
@@ -2971,19 +2937,19 @@ let er = class extends Ui {
|
|
|
2971
2937
|
});
|
|
2972
2938
|
}
|
|
2973
2939
|
_draw(t) {
|
|
2974
|
-
const r = this._cellHeight, n = this._cellWidth, o =
|
|
2940
|
+
const r = this._cellHeight, n = this._cellWidth, o = pe - n, a = pe - r;
|
|
2975
2941
|
t.save();
|
|
2976
2942
|
const i = new Path2D();
|
|
2977
2943
|
i.rect(o, a, n, r), t.clip(i);
|
|
2978
2944
|
const { hasCriteria: s } = this._filterParams, l = this._themeService.getCurrentTheme().primaryColor, u = this._hovered ? this._themeService.getCurrentTheme().grey50 : "rgba(255, 255, 255, 1.0)";
|
|
2979
|
-
s ? Qr.drawHasCriteria(t,
|
|
2945
|
+
s ? Qr.drawHasCriteria(t, pe, l, u) : Qr.drawNoCriteria(t, pe, l, u), t.restore();
|
|
2980
2946
|
}
|
|
2981
2947
|
onPointerDown(t) {
|
|
2982
2948
|
if (t.button === 2)
|
|
2983
2949
|
return;
|
|
2984
2950
|
const { col: r, unitId: n, subUnitId: o } = this._filterParams;
|
|
2985
2951
|
this._contextService.getContextValue(xe) || setTimeout(() => {
|
|
2986
|
-
this._commandService.executeCommand(
|
|
2952
|
+
this._commandService.executeCommand(mn.id, {
|
|
2987
2953
|
unitId: n,
|
|
2988
2954
|
subUnitId: o,
|
|
2989
2955
|
col: r
|
|
@@ -2997,53 +2963,54 @@ let er = class extends Ui {
|
|
|
2997
2963
|
this._hovered = !1, this.makeDirty(!0);
|
|
2998
2964
|
}
|
|
2999
2965
|
};
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
],
|
|
2966
|
+
Zt = Js([
|
|
2967
|
+
Qt(2, bt),
|
|
2968
|
+
Qt(3, ce),
|
|
2969
|
+
Qt(4, G(Xr))
|
|
2970
|
+
], Zt);
|
|
3005
2971
|
var ea = Object.defineProperty, ta = Object.getOwnPropertyDescriptor, ra = (e, t, r, n) => {
|
|
3006
2972
|
for (var o = n > 1 ? void 0 : n ? ta(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
3007
2973
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3008
2974
|
return n && o && ea(t, r, o), o;
|
|
3009
|
-
},
|
|
2975
|
+
}, me = (e, t) => (r, n) => t(r, n, e);
|
|
3010
2976
|
const na = 1e3, ia = 5e3;
|
|
3011
|
-
let
|
|
2977
|
+
let Jt = class extends Kr {
|
|
3012
2978
|
constructor(t, r, n, o, a, i, s, l, u, c) {
|
|
3013
2979
|
super();
|
|
3014
2980
|
C(this, "_filterRangeShape", null);
|
|
3015
2981
|
C(this, "_buttonRenderDisposable", null);
|
|
3016
2982
|
C(this, "_filterButtonShapes", []);
|
|
3017
|
-
this.
|
|
2983
|
+
this._context = t, this._injector = r, this._sheetSkeletonManagerService = n, this._sheetsFilterService = o, this._themeService = a, this._sheetInterceptorService = i, this._sheetRenderController = s, this._commandService = l, this._renderManagerService = u, this._selectionRenderService = c, [
|
|
3018
2984
|
ar,
|
|
3019
|
-
|
|
2985
|
+
De,
|
|
3020
2986
|
ft,
|
|
3021
|
-
|
|
2987
|
+
on
|
|
3022
2988
|
].forEach((f) => this.disposeWithMe(this._sheetRenderController.registerSkeletonChangingMutations(f.id))), this._initRenderer();
|
|
3023
2989
|
}
|
|
3024
2990
|
_initRenderer() {
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
2991
|
+
Jr([
|
|
2992
|
+
this._selectionRenderService.usable$,
|
|
2993
|
+
this._sheetSkeletonManagerService.currentSkeleton$
|
|
2994
|
+
]).pipe(
|
|
2995
|
+
Pr(([t]) => t),
|
|
2996
|
+
sr(([t, r]) => {
|
|
2997
|
+
var l;
|
|
2998
|
+
if (!r)
|
|
2999
|
+
return tt(null);
|
|
3000
|
+
const { unitId: n } = r, o = this._context.unit, a = o.getActiveSheet().getSheetId(), i = (l = this._sheetsFilterService.getFilterModel(n, a)) != null ? l : void 0, s = () => ({
|
|
3001
|
+
unitId: n,
|
|
3002
|
+
worksheetId: a,
|
|
3003
|
+
filterModel: i,
|
|
3004
|
+
range: i == null ? void 0 : i.getRange(),
|
|
3005
|
+
skeleton: r.skeleton
|
|
3039
3006
|
});
|
|
3040
|
-
return
|
|
3041
|
-
|
|
3042
|
-
([
|
|
3007
|
+
return ti(this._commandService.onCommandExecuted).pipe(
|
|
3008
|
+
Pr(
|
|
3009
|
+
([u]) => u.type === Te.MUTATION && u.params.unitId === o.getUnitId() && xi.has(u.id)
|
|
3043
3010
|
),
|
|
3044
3011
|
en(20, void 0, { leading: !1, trailing: !0 }),
|
|
3045
|
-
|
|
3046
|
-
tn(
|
|
3012
|
+
He(s),
|
|
3013
|
+
tn(s())
|
|
3047
3014
|
// must trigger once
|
|
3048
3015
|
);
|
|
3049
3016
|
}),
|
|
@@ -3056,7 +3023,7 @@ let vt = class extends qr {
|
|
|
3056
3023
|
const o = this._renderManagerService.getRenderById(t);
|
|
3057
3024
|
if (!o)
|
|
3058
3025
|
return;
|
|
3059
|
-
const { scene: a } = o, { rangeWithCoord: i, style: s } = this._selectionRenderService.
|
|
3026
|
+
const { scene: a } = o, { rangeWithCoord: i, style: s } = this._selectionRenderService.convertSelectionToCoord({
|
|
3060
3027
|
range: r,
|
|
3061
3028
|
primary: null,
|
|
3062
3029
|
style: null
|
|
@@ -3075,25 +3042,25 @@ let vt = class extends qr {
|
|
|
3075
3042
|
this._interceptCellContent(t.range);
|
|
3076
3043
|
const { startColumn: u, endColumn: c, startRow: f } = r;
|
|
3077
3044
|
for (let d = u; d <= c; d++) {
|
|
3078
|
-
const h = `sheets-filter-button-${d}`, g = Ti(f, d, l, a), { startX: _, startY: p, endX: S, endY:
|
|
3045
|
+
const h = `sheets-filter-button-${d}`, g = Ti(f, d, l, a), { startX: _, startY: p, endX: S, endY: R } = g, I = S - _, F = R - p;
|
|
3079
3046
|
if (F <= lt || I <= lt)
|
|
3080
3047
|
continue;
|
|
3081
|
-
const H = !!n.getFilterColumn(d), M = S -
|
|
3048
|
+
const H = !!n.getFilterColumn(d), M = S - pe - lt, O = R - pe - lt, L = {
|
|
3082
3049
|
left: M,
|
|
3083
3050
|
top: O,
|
|
3084
|
-
height:
|
|
3085
|
-
width:
|
|
3051
|
+
height: pe,
|
|
3052
|
+
width: pe,
|
|
3086
3053
|
cellHeight: F,
|
|
3087
3054
|
cellWidth: I,
|
|
3088
3055
|
filterParams: { unitId: o, subUnitId: i, col: d, hasCriteria: H }
|
|
3089
|
-
},
|
|
3090
|
-
this._filterButtonShapes.push(
|
|
3056
|
+
}, x = this._injector.createInstance(Zt, h, L);
|
|
3057
|
+
this._filterButtonShapes.push(x);
|
|
3091
3058
|
}
|
|
3092
3059
|
l.addObjects(this._filterButtonShapes, ia), l.makeDirty();
|
|
3093
3060
|
}
|
|
3094
3061
|
_interceptCellContent(t) {
|
|
3095
3062
|
const { startRow: r, startColumn: n, endColumn: o } = t;
|
|
3096
|
-
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(
|
|
3063
|
+
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(Hi.CELL_CONTENT, {
|
|
3097
3064
|
handler: (a, i, s) => {
|
|
3098
3065
|
const { row: l, col: u } = i;
|
|
3099
3066
|
return l !== r || u < n || u > o ? s(a) : s({
|
|
@@ -3102,7 +3069,7 @@ let vt = class extends qr {
|
|
|
3102
3069
|
fontRenderExtension: {
|
|
3103
3070
|
// @ts-ignore
|
|
3104
3071
|
...a == null ? void 0 : a.fontRenderExtension,
|
|
3105
|
-
rightOffset:
|
|
3072
|
+
rightOffset: pe
|
|
3106
3073
|
}
|
|
3107
3074
|
});
|
|
3108
3075
|
}
|
|
@@ -3113,46 +3080,125 @@ let vt = class extends qr {
|
|
|
3113
3080
|
(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 = [];
|
|
3114
3081
|
}
|
|
3115
3082
|
};
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
fe(9, Fi)
|
|
3128
|
-
], vt);
|
|
3083
|
+
Jt = ra([
|
|
3084
|
+
me(1, G(Tt)),
|
|
3085
|
+
me(2, G(Ri)),
|
|
3086
|
+
me(3, G(fe)),
|
|
3087
|
+
me(4, G(Xr)),
|
|
3088
|
+
me(5, G(Di)),
|
|
3089
|
+
me(6, G(Oi)),
|
|
3090
|
+
me(7, ce),
|
|
3091
|
+
me(8, rn),
|
|
3092
|
+
me(9, Fi)
|
|
3093
|
+
], Jt);
|
|
3129
3094
|
var oa = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, aa = (e, t, r, n) => {
|
|
3130
3095
|
for (var o = n > 1 ? void 0 : n ? sa(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
3131
3096
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3132
3097
|
return n && o && oa(t, r, o), o;
|
|
3133
|
-
},
|
|
3134
|
-
const
|
|
3098
|
+
}, ve = (e, t) => (r, n) => t(r, n, e);
|
|
3099
|
+
const Gr = "FILTER_PANEL_POPUP";
|
|
3100
|
+
let mt = class extends Kr {
|
|
3101
|
+
constructor(t, r, n, o, a, i, s, l, u) {
|
|
3102
|
+
super();
|
|
3103
|
+
C(this, "_popupDisposable");
|
|
3104
|
+
this._injector = t, this._componentManager = r, this._sheetsFilterPanelService = n, this._sheetCanvasPopupService = o, this._renderManagerService = a, this._shortcutService = i, this._commandService = s, this._menuService = l, this._contextService = u, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI(), this._initRenderControllers();
|
|
3105
|
+
}
|
|
3106
|
+
dispose() {
|
|
3107
|
+
super.dispose(), this._closeFilterPopup();
|
|
3108
|
+
}
|
|
3109
|
+
_initShortcuts() {
|
|
3110
|
+
[
|
|
3111
|
+
Qs
|
|
3112
|
+
].forEach((t) => {
|
|
3113
|
+
this.disposeWithMe(this._shortcutService.registerShortcut(t));
|
|
3114
|
+
});
|
|
3115
|
+
}
|
|
3116
|
+
_initCommands() {
|
|
3117
|
+
[
|
|
3118
|
+
rt,
|
|
3119
|
+
$e,
|
|
3120
|
+
fn,
|
|
3121
|
+
hn,
|
|
3122
|
+
vn,
|
|
3123
|
+
mn,
|
|
3124
|
+
Ze
|
|
3125
|
+
].forEach((t) => {
|
|
3126
|
+
this.disposeWithMe(this._commandService.registerCommand(t));
|
|
3127
|
+
});
|
|
3128
|
+
}
|
|
3129
|
+
_initMenuItems() {
|
|
3130
|
+
[
|
|
3131
|
+
Gs,
|
|
3132
|
+
Ys,
|
|
3133
|
+
qs
|
|
3134
|
+
].forEach((t) => {
|
|
3135
|
+
this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(t)));
|
|
3136
|
+
});
|
|
3137
|
+
}
|
|
3138
|
+
_initUI() {
|
|
3139
|
+
this.disposeWithMe(this._componentManager.register(Gr, ks)), this.disposeWithMe(this._componentManager.register("FilterSingle", cn)), this.disposeWithMe(this._contextService.subscribeContextValue$(xe).pipe(_i()).subscribe((t) => {
|
|
3140
|
+
t ? this._openFilterPopup() : this._closeFilterPopup();
|
|
3141
|
+
}));
|
|
3142
|
+
}
|
|
3143
|
+
_initRenderControllers() {
|
|
3144
|
+
this.disposeWithMe(this._renderManagerService.registerRenderController(Be.UNIVER_SHEET, Jt));
|
|
3145
|
+
}
|
|
3146
|
+
_openFilterPopup() {
|
|
3147
|
+
const t = this._sheetsFilterPanelService.filterModel;
|
|
3148
|
+
if (!t)
|
|
3149
|
+
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
3150
|
+
const r = t.getRange(), n = this._sheetsFilterPanelService.col, { startRow: o } = r;
|
|
3151
|
+
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(o, n, {
|
|
3152
|
+
componentKey: Gr,
|
|
3153
|
+
direction: "horizontal",
|
|
3154
|
+
closeOnSelfTarget: !0,
|
|
3155
|
+
onClickOutside: () => this._commandService.syncExecuteCommand(Ze.id)
|
|
3156
|
+
});
|
|
3157
|
+
}
|
|
3158
|
+
_closeFilterPopup() {
|
|
3159
|
+
var t;
|
|
3160
|
+
(t = this._popupDisposable) == null || t.dispose(), this._popupDisposable = null;
|
|
3161
|
+
}
|
|
3162
|
+
};
|
|
3163
|
+
mt = aa([
|
|
3164
|
+
ri(ni.Ready, mt),
|
|
3165
|
+
ve(0, G(Tt)),
|
|
3166
|
+
ve(1, G(ci)),
|
|
3167
|
+
ve(2, G(be)),
|
|
3168
|
+
ve(3, G(Ci)),
|
|
3169
|
+
ve(4, rn),
|
|
3170
|
+
ve(5, fi),
|
|
3171
|
+
ve(6, ce),
|
|
3172
|
+
ve(7, hi),
|
|
3173
|
+
ve(8, bt)
|
|
3174
|
+
], mt);
|
|
3175
|
+
var la = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, ca = (e, t, r, n) => {
|
|
3176
|
+
for (var o = n > 1 ? void 0 : n ? ua(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
3177
|
+
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3178
|
+
return n && o && la(t, r, o), o;
|
|
3179
|
+
}, Yr = (e, t) => (r, n) => t(r, n, e);
|
|
3180
|
+
const fa = "UNIVER_SHEETS_FILTER_UI_PLUGIN";
|
|
3135
3181
|
var ut;
|
|
3136
|
-
let
|
|
3182
|
+
let qr = (ut = class extends ii {
|
|
3137
3183
|
constructor(e, t, r) {
|
|
3138
3184
|
super(), this._injector = t, this._localeService = r, this._localeService.load({
|
|
3139
|
-
zhCN:
|
|
3185
|
+
zhCN: ji
|
|
3140
3186
|
});
|
|
3141
3187
|
}
|
|
3142
3188
|
onStarting(e) {
|
|
3143
3189
|
[
|
|
3144
3190
|
[be],
|
|
3145
|
-
[mt]
|
|
3146
|
-
[vt]
|
|
3191
|
+
[mt]
|
|
3147
3192
|
].forEach((t) => e.add(t));
|
|
3148
3193
|
}
|
|
3149
|
-
}, C(ut, "type",
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
],
|
|
3194
|
+
}, C(ut, "type", Be.UNIVER_SHEET), C(ut, "pluginName", fa), ut);
|
|
3195
|
+
qr = ca([
|
|
3196
|
+
Yr(1, G(Tt)),
|
|
3197
|
+
Yr(2, G(We))
|
|
3198
|
+
], qr);
|
|
3154
3199
|
export {
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3200
|
+
qr as UniverSheetsFilterUIPlugin,
|
|
3201
|
+
Oa as enUS,
|
|
3202
|
+
Fa as ruRU,
|
|
3203
|
+
ji as zhCN
|
|
3158
3204
|
};
|