@univerjs/sheets-filter-ui 0.1.17 → 0.2.0
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 +705 -672
- package/lib/index.css +1 -1
- package/lib/types/commands/{sheets-filter.operation.d.ts → operations/sheets-filter.operation.d.ts} +1 -1
- package/lib/types/index.d.ts +2 -3
- package/lib/umd/index.js +4 -4
- package/package.json +23 -23
- /package/lib/types/commands/{__tests__ → commands/__tests__}/sheets-filter.command.spec.d.ts +0 -0
- /package/lib/types/commands/{sheets-filter.command.d.ts → commands/sheets-filter.command.d.ts} +0 -0
- /package/lib/types/commands/{__tests__ → operations/__tests__}/sheets-filter.operation.spec.d.ts +0 -0
package/lib/es/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var Ri = Object.defineProperty;
|
|
2
2
|
var Ti = (e, t, r) => t in e ? Ri(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var N = (e, t, r) => Ti(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { CommandType as
|
|
5
|
-
import { Quantity as
|
|
6
|
-
import { SheetsFilterService as ee, RemoveSheetsFilterMutation as
|
|
7
|
-
import { IMessageService as
|
|
8
|
-
import { BehaviorSubject as
|
|
9
|
-
import { expandToContinuousRange as
|
|
10
|
-
import { Rect as
|
|
11
|
-
import { MessageType as
|
|
12
|
-
import { SelectionManagerService as ao, isSingleCellSelection as lo, RefRangeService as uo, WorkbookEditablePermission as
|
|
4
|
+
import { CommandType as Te, IUniverInstanceService as cr, ICommandService as ae, IUndoRedoService as fr, UniverInstanceType as Pe, LocaleService as Fe, sequenceExecute as Fi, BooleanNumber as Wr, Disposable as Mt, extractPureTextFromCell as Oi, IContextService as wt, ThemeService as vn, RxDisposable as mn, fromCallback as Ci, runOnLifecycle as Pi, LifecycleStages as hr, OnLifecycle as pn, Tools as dr, Plugin as _n, DependentOn as gn } from "@univerjs/core";
|
|
5
|
+
import { Quantity as Sn, createIdentifier as Ni, Inject as D, Injector as ot } from "@wendellhu/redi";
|
|
6
|
+
import { SheetsFilterService as ee, RemoveSheetsFilterMutation as gt, SetSheetsFilterRangeMutation as vr, SetSheetsFilterCriteriaMutation as Ue, ReCalcSheetsFilterMutation as En, CustomFilterOperator as v, FILTER_MUTATIONS as Ii, UniverSheetsFilterPlugin as bn } from "@univerjs/sheets-filter";
|
|
7
|
+
import { IMessageService as yn, ILayoutService as Mi, useObservable as be, useComponentsOfPart as wi, ComponentContainer as Ai, KeyCode as Li, MetaKeys as Vr, MenuGroup as mr, MenuItemType as pr, MenuPosition as $i, getMenuHiddenObservable as _r, ComponentManager as Di, IShortcutService as Hi, IMenuService as Ui } from "@univerjs/ui";
|
|
8
|
+
import { BehaviorSubject as Ce, ReplaySubject as xi, of as st, Subject as Bi, merge as Wi, combineLatest as Rn, throttleTime as Tn, startWith as Fn, map as xe, shareReplay as Vi, switchMap as gr, filter as jr, takeUntil as ji, distinctUntilChanged as zi } from "rxjs";
|
|
9
|
+
import { expandToContinuousRange as ki, SetCellEditVisibleOperation as Qi, SheetsUIPart as Gi, whenSheetEditorFocused as Yi, getCurrentRangeDisable$ as Xi, SelectionShape as Ki, getCoordByCell as qi, SheetSkeletonManagerService as Zi, SheetsRenderService as Ji, ISelectionRenderService as eo, SheetCanvasPopManagerService as to, SheetPermissionInterceptorBaseController as ro } from "@univerjs/sheets-ui";
|
|
10
|
+
import { Rect as zr, Shape as no, IRenderManagerService as Sr } from "@univerjs/engine-render";
|
|
11
|
+
import { MessageType as On, Select as kr, RadioGroup as io, Radio as Qr, Input as Cn, Checkbox as Gr, Tooltip as oo, Button as St, Segmented as so } from "@univerjs/design";
|
|
12
|
+
import { SelectionManagerService as ao, isSingleCellSelection as lo, RefRangeService as uo, WorkbookEditablePermission as er, WorksheetFilterPermission as tr, WorksheetEditPermission as rr, RangeProtectionPermissionEditPoint as co, INTERCEPTOR_POINT as fo, SheetInterceptorService as ho, RangeProtectionPermissionViewPoint as Yr } from "@univerjs/sheets";
|
|
13
13
|
import * as d from "react";
|
|
14
|
-
import T, { forwardRef as
|
|
14
|
+
import T, { forwardRef as Pn, useRef as w, createElement as Nn, useCallback as fe, useMemo as Er, version as vo, isValidElement as mo, useEffect as po, useState as Zt } from "react";
|
|
15
15
|
import { useDependency as $e } from "@wendellhu/redi/react-bindings";
|
|
16
|
-
import
|
|
16
|
+
import Xr, { flushSync as Kr } from "react-dom";
|
|
17
17
|
var oe = function() {
|
|
18
18
|
return oe = Object.assign || function(e) {
|
|
19
19
|
for (var t, r = 1, n = arguments.length; r < n; r++) {
|
|
@@ -29,13 +29,13 @@ var oe = function() {
|
|
|
29
29
|
for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
|
|
30
30
|
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
31
31
|
return r;
|
|
32
|
-
},
|
|
32
|
+
}, In = Pn(function(e, t) {
|
|
33
33
|
var r = e.icon, n = e.id, o = e.className, a = e.extend, i = _o(e, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(n, " ").concat(o || "").trim(), l = w("_".concat(Eo()));
|
|
34
|
-
return
|
|
34
|
+
return Mn(r, "".concat(n), { defIds: r.defIds, idSuffix: l.current }, oe({ ref: t, className: s }, i), a);
|
|
35
35
|
});
|
|
36
|
-
function
|
|
37
|
-
return
|
|
38
|
-
return
|
|
36
|
+
function Mn(e, t, r, n, o) {
|
|
37
|
+
return Nn(e.tag, oe(oe({ key: t }, go(e, r, o)), n), (So(e, r).children || []).map(function(a, i) {
|
|
38
|
+
return Mn(a, "".concat(t, "-").concat(e.tag, "-").concat(i), r, void 0, o);
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
41
|
function go(e, t, r) {
|
|
@@ -56,55 +56,55 @@ function So(e, t) {
|
|
|
56
56
|
function Eo() {
|
|
57
57
|
return Math.random().toString(36).substring(2, 8);
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
var bo = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.32182 2.60967C2.98161 2.60967 2.79671 3.0074 3.01601 3.2675L6.85819 7.8246C6.94943 7.93282 6.99947 8.06981 6.99947 8.21136V12.7338C6.99947 12.898 7.0998 13.0455 7.2525 13.1058L8.73833 13.6928C9.00085 13.7965 9.28531 13.6031 9.28531 13.3208V8.21136C9.28531 8.06981 9.33535 7.93282 9.42659 7.8246L13.2688 3.2675C13.4881 3.0074 13.3032 2.60967 12.963 2.60967H3.32182ZM2.09858 4.04101C1.22139 3.0006 1.96097 1.40967 3.32182 1.40967H12.963C14.3238 1.40967 15.0634 3.0006 14.1862 4.04101L10.4853 8.43054V13.3208C10.4853 14.4498 9.34747 15.2237 8.29742 14.8089L6.81158 14.2219C6.20078 13.9806 5.79947 13.3905 5.79947 12.7338V8.43054L2.09858 4.04101Z", fillRule: "evenodd", clipRule: "evenodd" } }] },
|
|
61
|
-
return
|
|
59
|
+
In.displayName = "UniverIcon";
|
|
60
|
+
var bo = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.32182 2.60967C2.98161 2.60967 2.79671 3.0074 3.01601 3.2675L6.85819 7.8246C6.94943 7.93282 6.99947 8.06981 6.99947 8.21136V12.7338C6.99947 12.898 7.0998 13.0455 7.2525 13.1058L8.73833 13.6928C9.00085 13.7965 9.28531 13.6031 9.28531 13.3208V8.21136C9.28531 8.06981 9.33535 7.93282 9.42659 7.8246L13.2688 3.2675C13.4881 3.0074 13.3032 2.60967 12.963 2.60967H3.32182ZM2.09858 4.04101C1.22139 3.0006 1.96097 1.40967 3.32182 1.40967H12.963C14.3238 1.40967 15.0634 3.0006 14.1862 4.04101L10.4853 8.43054V13.3208C10.4853 14.4498 9.34747 15.2237 8.29742 14.8089L6.81158 14.2219C6.20078 13.9806 5.79947 13.3905 5.79947 12.7338V8.43054L2.09858 4.04101Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wn = Pn(function(e, t) {
|
|
61
|
+
return Nn(In, Object.assign({}, e, {
|
|
62
62
|
id: "filter-single",
|
|
63
63
|
ref: t,
|
|
64
64
|
icon: bo
|
|
65
65
|
}));
|
|
66
66
|
});
|
|
67
|
-
|
|
67
|
+
wn.displayName = "FilterSingle";
|
|
68
68
|
const Ve = {
|
|
69
69
|
id: "sheet.command.smart-toggle-filter",
|
|
70
|
-
type:
|
|
70
|
+
type: Te.COMMAND,
|
|
71
71
|
handler: async (e) => {
|
|
72
|
-
const t = e.get(
|
|
72
|
+
const t = e.get(cr), r = e.get(ee), n = e.get(ae), o = e.get(fr), a = t.getCurrentUnitForType(Pe.UNIVER_SHEET), i = a == null ? void 0 : a.getActiveSheet();
|
|
73
73
|
if (!i || !a) return !1;
|
|
74
74
|
const s = a.getUnitId(), l = i.getSheetId(), u = r.getFilterModel(s, l);
|
|
75
75
|
if (u) {
|
|
76
|
-
const _ = u == null ? void 0 : u.serialize(), b = yo(s, l, _), S = n.syncExecuteCommand(
|
|
76
|
+
const _ = u == null ? void 0 : u.serialize(), b = yo(s, l, _), S = n.syncExecuteCommand(gt.id, { unitId: s, subUnitId: l });
|
|
77
77
|
return S && o.pushUndoRedo({
|
|
78
78
|
unitID: s,
|
|
79
79
|
undoMutations: b,
|
|
80
|
-
redoMutations: [{ id:
|
|
80
|
+
redoMutations: [{ id: gt.id, params: { unitId: s, subUnitId: l } }]
|
|
81
81
|
}), S;
|
|
82
82
|
}
|
|
83
83
|
const h = e.get(ao).getLast();
|
|
84
84
|
if (!h) return !1;
|
|
85
|
-
const
|
|
85
|
+
const m = h.range, f = lo(h) ? ki(m, { left: !0, right: !0, up: !0, down: !0 }, i) : m;
|
|
86
86
|
if (f.endRow === f.startRow) {
|
|
87
|
-
const _ = e.get(
|
|
88
|
-
return _ == null || _.show({ type:
|
|
87
|
+
const _ = e.get(yn, Sn.OPTIONAL), b = e.get(Fe);
|
|
88
|
+
return _ == null || _.show({ type: On.Warning, content: b.t("sheets-filter.command.not-valid-filter-range") }), !1;
|
|
89
89
|
}
|
|
90
|
-
const g = { id:
|
|
90
|
+
const g = { id: vr.id, params: { unitId: s, subUnitId: l, range: f } }, p = n.syncExecuteCommand(g.id, g.params);
|
|
91
91
|
return p && o.pushUndoRedo({
|
|
92
92
|
unitID: s,
|
|
93
|
-
undoMutations: [{ id:
|
|
93
|
+
undoMutations: [{ id: gt.id, params: { unitId: s, subUnitId: l } }],
|
|
94
94
|
redoMutations: [g]
|
|
95
95
|
}), p;
|
|
96
96
|
}
|
|
97
97
|
}, He = {
|
|
98
98
|
id: "sheet.command.set-filter-criteria",
|
|
99
|
-
type:
|
|
99
|
+
type: Te.COMMAND,
|
|
100
100
|
handler: async (e, t) => {
|
|
101
|
-
const r = e.get(ee), n = e.get(ae), o = e.get(
|
|
101
|
+
const r = e.get(ee), n = e.get(ae), o = e.get(fr), { unitId: a, subUnitId: i, col: s, criteria: l } = t, u = r.getFilterModel(a, i);
|
|
102
102
|
if (!u)
|
|
103
103
|
return !1;
|
|
104
104
|
const c = u.getRange();
|
|
105
105
|
if (!c || s < c.startColumn || s > c.endColumn)
|
|
106
106
|
return !1;
|
|
107
|
-
const h = u.getFilterColumn(s),
|
|
107
|
+
const h = u.getFilterColumn(s), m = To(a, i, s, h), f = {
|
|
108
108
|
id: Ue.id,
|
|
109
109
|
params: {
|
|
110
110
|
unitId: a,
|
|
@@ -115,47 +115,47 @@ const Ve = {
|
|
|
115
115
|
}, g = n.syncExecuteCommand(f.id, f.params);
|
|
116
116
|
return g && o.pushUndoRedo({
|
|
117
117
|
unitID: a,
|
|
118
|
-
undoMutations: [
|
|
118
|
+
undoMutations: [m],
|
|
119
119
|
redoMutations: [f]
|
|
120
120
|
}), g;
|
|
121
121
|
}
|
|
122
|
-
},
|
|
122
|
+
}, An = {
|
|
123
123
|
id: "sheet.command.clear-filter-criteria",
|
|
124
|
-
type:
|
|
124
|
+
type: Te.COMMAND,
|
|
125
125
|
handler: (e) => {
|
|
126
|
-
const t = e.get(ee), r = e.get(
|
|
126
|
+
const t = e.get(ee), r = e.get(fr), n = e.get(ae), o = t.activeFilterModel;
|
|
127
127
|
if (!o)
|
|
128
128
|
return !1;
|
|
129
|
-
const { unitId: a, subUnitId: i } = o, s = o.serialize(), l =
|
|
129
|
+
const { unitId: a, subUnitId: i } = o, s = o.serialize(), l = $n(a, i, s), u = Ro(a, i, s);
|
|
130
130
|
return Fi(u, n) && r.pushUndoRedo({
|
|
131
131
|
unitID: a,
|
|
132
132
|
undoMutations: l,
|
|
133
133
|
redoMutations: u
|
|
134
134
|
}), !0;
|
|
135
135
|
}
|
|
136
|
-
},
|
|
136
|
+
}, Ln = {
|
|
137
137
|
id: "sheet.command.re-calc-filter",
|
|
138
|
-
type:
|
|
138
|
+
type: Te.COMMAND,
|
|
139
139
|
handler: (e) => {
|
|
140
140
|
const t = e.get(ee), r = e.get(ae), n = t.activeFilterModel;
|
|
141
141
|
if (!n)
|
|
142
142
|
return !1;
|
|
143
143
|
const { unitId: o, subUnitId: a } = n;
|
|
144
|
-
return r.executeCommand(
|
|
144
|
+
return r.executeCommand(En.id, { unitId: o, subUnitId: a });
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
function yo(e, t, r) {
|
|
148
148
|
const n = [], o = {
|
|
149
|
-
id:
|
|
149
|
+
id: vr.id,
|
|
150
150
|
params: {
|
|
151
151
|
unitId: e,
|
|
152
152
|
subUnitId: t,
|
|
153
153
|
range: r.ref
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
-
return n.push(o),
|
|
156
|
+
return n.push(o), $n(e, t, r).forEach((i) => n.push(i)), n;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function $n(e, t, r) {
|
|
159
159
|
var o;
|
|
160
160
|
const n = [];
|
|
161
161
|
return (o = r.filterColumns) == null || o.forEach((a) => {
|
|
@@ -248,13 +248,13 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
248
248
|
throw new Error("[FilterConditionItems.NOT_EMPTY]: should not have initial form params!");
|
|
249
249
|
},
|
|
250
250
|
testMappingParams: ({ operator1: i }) => i === P.NOT_EMPTY,
|
|
251
|
-
mapToFilterColumn: () => ({ customFilters: { customFilters: [{ val: "", operator:
|
|
251
|
+
mapToFilterColumn: () => ({ customFilters: { customFilters: [{ val: "", operator: v.NOT_EQUALS }] } }),
|
|
252
252
|
testMappingFilterColumn: (i) => {
|
|
253
253
|
var u;
|
|
254
254
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 1)
|
|
255
255
|
return !1;
|
|
256
256
|
const s = i.customFilters.customFilters[0];
|
|
257
|
-
return s.val === " " && s.operator ===
|
|
257
|
+
return s.val === " " && s.operator === v.NOT_EQUALS ? { operator1: P.NOT_EMPTY } : !1;
|
|
258
258
|
}
|
|
259
259
|
}, e.TEXT_CONTAINS = {
|
|
260
260
|
label: "sheets-filter.conditions.text-contains",
|
|
@@ -286,7 +286,7 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
286
286
|
numOfParameters: 1,
|
|
287
287
|
getDefaultFormParams: () => ({ operator1: P.DOES_NOT_CONTAIN, val1: "" }),
|
|
288
288
|
mapToFilterColumn: (i) => ({
|
|
289
|
-
customFilters: { customFilters: [{ val: `*${i.val1}*`, operator:
|
|
289
|
+
customFilters: { customFilters: [{ val: `*${i.val1}*`, operator: v.NOT_EQUALS }] }
|
|
290
290
|
}),
|
|
291
291
|
testMappingParams: (i) => {
|
|
292
292
|
const [s] = ce(i);
|
|
@@ -297,7 +297,7 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
297
297
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 1)
|
|
298
298
|
return !1;
|
|
299
299
|
const s = i.customFilters.customFilters[0], l = s.val.toString();
|
|
300
|
-
return s.operator ===
|
|
300
|
+
return s.operator === v.NOT_EQUALS && l.startsWith("*") && l.endsWith("*") ? { operator1: P.DOES_NOT_CONTAIN, val1: l.slice(1, -1) } : !1;
|
|
301
301
|
}
|
|
302
302
|
}, e.STARTS_WITH = {
|
|
303
303
|
label: "sheets-filter.conditions.starts-with",
|
|
@@ -361,123 +361,123 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
361
361
|
}
|
|
362
362
|
}, e.GREATER_THAN = {
|
|
363
363
|
label: "sheets-filter.conditions.greater-than",
|
|
364
|
-
operator:
|
|
364
|
+
operator: v.GREATER_THAN,
|
|
365
365
|
numOfParameters: 1,
|
|
366
366
|
order: j.FIRST,
|
|
367
|
-
getDefaultFormParams: () => ({ operator1:
|
|
367
|
+
getDefaultFormParams: () => ({ operator1: v.GREATER_THAN, val1: "" }),
|
|
368
368
|
mapToFilterColumn: (i) => ({
|
|
369
|
-
customFilters: { customFilters: [{ val: i.val1, operator:
|
|
369
|
+
customFilters: { customFilters: [{ val: i.val1, operator: v.GREATER_THAN }] }
|
|
370
370
|
}),
|
|
371
371
|
testMappingParams: (i) => {
|
|
372
372
|
const [s] = ce(i);
|
|
373
|
-
return s ===
|
|
373
|
+
return s === v.GREATER_THAN;
|
|
374
374
|
},
|
|
375
375
|
testMappingFilterColumn: (i) => {
|
|
376
376
|
var l;
|
|
377
377
|
if (((l = i.customFilters) == null ? void 0 : l.customFilters.length) !== 1)
|
|
378
378
|
return !1;
|
|
379
379
|
const s = i.customFilters.customFilters[0];
|
|
380
|
-
return s.operator !==
|
|
380
|
+
return s.operator !== v.GREATER_THAN ? !1 : { operator1: v.GREATER_THAN, val1: s.val.toString() };
|
|
381
381
|
}
|
|
382
382
|
}, e.GREATER_THAN_OR_EQUAL = {
|
|
383
383
|
label: "sheets-filter.conditions.greater-than-or-equal",
|
|
384
|
-
operator:
|
|
384
|
+
operator: v.GREATER_THAN_OR_EQUAL,
|
|
385
385
|
numOfParameters: 1,
|
|
386
386
|
order: j.FIRST,
|
|
387
|
-
getDefaultFormParams: () => ({ operator1:
|
|
387
|
+
getDefaultFormParams: () => ({ operator1: v.GREATER_THAN_OR_EQUAL, val1: "" }),
|
|
388
388
|
testMappingParams: (i) => {
|
|
389
389
|
const [s] = ce(i);
|
|
390
|
-
return s ===
|
|
390
|
+
return s === v.GREATER_THAN_OR_EQUAL;
|
|
391
391
|
},
|
|
392
392
|
mapToFilterColumn: (i) => ({
|
|
393
|
-
customFilters: { customFilters: [{ val: i.val1, operator:
|
|
393
|
+
customFilters: { customFilters: [{ val: i.val1, operator: v.GREATER_THAN_OR_EQUAL }] }
|
|
394
394
|
}),
|
|
395
395
|
testMappingFilterColumn: (i) => {
|
|
396
396
|
var l;
|
|
397
397
|
if (((l = i.customFilters) == null ? void 0 : l.customFilters.length) !== 1)
|
|
398
398
|
return !1;
|
|
399
399
|
const s = i.customFilters.customFilters[0];
|
|
400
|
-
return s.operator !==
|
|
400
|
+
return s.operator !== v.GREATER_THAN_OR_EQUAL ? !1 : { operator1: v.GREATER_THAN_OR_EQUAL, val1: s.val.toString() };
|
|
401
401
|
}
|
|
402
402
|
}, e.LESS_THAN = {
|
|
403
403
|
label: "sheets-filter.conditions.less-than",
|
|
404
|
-
operator:
|
|
404
|
+
operator: v.LESS_THAN,
|
|
405
405
|
numOfParameters: 1,
|
|
406
406
|
order: j.FIRST,
|
|
407
|
-
getDefaultFormParams: () => ({ operator1:
|
|
407
|
+
getDefaultFormParams: () => ({ operator1: v.LESS_THAN, val1: "" }),
|
|
408
408
|
testMappingParams: (i) => {
|
|
409
409
|
const [s] = ce(i);
|
|
410
|
-
return s ===
|
|
410
|
+
return s === v.LESS_THAN;
|
|
411
411
|
},
|
|
412
412
|
mapToFilterColumn: (i) => ({
|
|
413
|
-
customFilters: { customFilters: [{ val: i.val1, operator:
|
|
413
|
+
customFilters: { customFilters: [{ val: i.val1, operator: v.LESS_THAN }] }
|
|
414
414
|
}),
|
|
415
415
|
testMappingFilterColumn: (i) => {
|
|
416
416
|
var l;
|
|
417
417
|
if (((l = i.customFilters) == null ? void 0 : l.customFilters.length) !== 1)
|
|
418
418
|
return !1;
|
|
419
419
|
const s = i.customFilters.customFilters[0];
|
|
420
|
-
return s.operator !==
|
|
420
|
+
return s.operator !== v.LESS_THAN ? !1 : { operator1: v.LESS_THAN, val1: s.val.toString() };
|
|
421
421
|
}
|
|
422
422
|
}, e.LESS_THAN_OR_EQUAL = {
|
|
423
423
|
label: "sheets-filter.conditions.less-than-or-equal",
|
|
424
|
-
operator:
|
|
424
|
+
operator: v.LESS_THAN_OR_EQUAL,
|
|
425
425
|
numOfParameters: 1,
|
|
426
426
|
order: j.FIRST,
|
|
427
|
-
getDefaultFormParams: () => ({ operator1:
|
|
427
|
+
getDefaultFormParams: () => ({ operator1: v.LESS_THAN_OR_EQUAL, val1: "" }),
|
|
428
428
|
testMappingParams: (i) => {
|
|
429
429
|
const [s] = ce(i);
|
|
430
|
-
return s ===
|
|
430
|
+
return s === v.LESS_THAN_OR_EQUAL;
|
|
431
431
|
},
|
|
432
432
|
mapToFilterColumn: (i) => ({
|
|
433
|
-
customFilters: { customFilters: [{ val: i.val1, operator:
|
|
433
|
+
customFilters: { customFilters: [{ val: i.val1, operator: v.LESS_THAN_OR_EQUAL }] }
|
|
434
434
|
}),
|
|
435
435
|
testMappingFilterColumn: (i) => {
|
|
436
436
|
var l;
|
|
437
437
|
if (((l = i.customFilters) == null ? void 0 : l.customFilters.length) !== 1)
|
|
438
438
|
return !1;
|
|
439
439
|
const s = i.customFilters.customFilters[0];
|
|
440
|
-
return s.operator !==
|
|
440
|
+
return s.operator !== v.LESS_THAN_OR_EQUAL ? !1 : { operator1: v.LESS_THAN_OR_EQUAL, val1: s.val.toString() };
|
|
441
441
|
}
|
|
442
442
|
}, e.EQUAL = {
|
|
443
443
|
label: "sheets-filter.conditions.equal",
|
|
444
|
-
operator:
|
|
444
|
+
operator: v.EQUAL,
|
|
445
445
|
numOfParameters: 1,
|
|
446
446
|
order: j.FIRST,
|
|
447
|
-
getDefaultFormParams: () => ({ operator1:
|
|
447
|
+
getDefaultFormParams: () => ({ operator1: v.EQUAL, val1: "" }),
|
|
448
448
|
testMappingParams: (i) => {
|
|
449
449
|
const [s] = ce(i);
|
|
450
|
-
return s ===
|
|
450
|
+
return s === v.EQUAL;
|
|
451
451
|
},
|
|
452
452
|
mapToFilterColumn: (i) => ({
|
|
453
|
-
customFilters: { customFilters: [{ val: i.val1, operator:
|
|
453
|
+
customFilters: { customFilters: [{ val: i.val1, operator: v.EQUAL }] }
|
|
454
454
|
}),
|
|
455
455
|
testMappingFilterColumn: (i) => {
|
|
456
456
|
var l;
|
|
457
457
|
if (((l = i.customFilters) == null ? void 0 : l.customFilters.length) !== 1)
|
|
458
458
|
return !1;
|
|
459
459
|
const s = i.customFilters.customFilters[0];
|
|
460
|
-
return s.operator !==
|
|
460
|
+
return s.operator !== v.EQUAL ? !1 : { operator1: v.EQUAL, val1: s.val.toString() };
|
|
461
461
|
}
|
|
462
462
|
}, e.NOT_EQUAL = {
|
|
463
463
|
label: "sheets-filter.conditions.not-equal",
|
|
464
|
-
operator:
|
|
464
|
+
operator: v.NOT_EQUALS,
|
|
465
465
|
numOfParameters: 1,
|
|
466
466
|
order: j.FIRST,
|
|
467
|
-
getDefaultFormParams: () => ({ operator1:
|
|
467
|
+
getDefaultFormParams: () => ({ operator1: v.NOT_EQUALS, val1: "" }),
|
|
468
468
|
testMappingParams: (i) => {
|
|
469
469
|
const [s] = ce(i);
|
|
470
|
-
return s ===
|
|
470
|
+
return s === v.NOT_EQUALS;
|
|
471
471
|
},
|
|
472
472
|
mapToFilterColumn: (i) => ({
|
|
473
|
-
customFilters: { customFilters: [{ val: i.val1, operator:
|
|
473
|
+
customFilters: { customFilters: [{ val: i.val1, operator: v.NOT_EQUALS }] }
|
|
474
474
|
}),
|
|
475
475
|
testMappingFilterColumn: (i) => {
|
|
476
476
|
var l;
|
|
477
477
|
if (((l = i.customFilters) == null ? void 0 : l.customFilters.length) !== 1)
|
|
478
478
|
return !1;
|
|
479
479
|
const s = i.customFilters.customFilters[0];
|
|
480
|
-
return s.operator !==
|
|
480
|
+
return s.operator !== v.NOT_EQUALS ? !1 : { operator1: v.NOT_EQUALS, val1: s.val.toString() };
|
|
481
481
|
}
|
|
482
482
|
}, e.BETWEEN = {
|
|
483
483
|
label: "sheets-filter.conditions.between",
|
|
@@ -486,25 +486,25 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
486
486
|
numOfParameters: 2,
|
|
487
487
|
getDefaultFormParams: () => ({
|
|
488
488
|
and: !0,
|
|
489
|
-
operator1:
|
|
489
|
+
operator1: v.GREATER_THAN_OR_EQUAL,
|
|
490
490
|
val1: "",
|
|
491
|
-
operator2:
|
|
491
|
+
operator2: v.LESS_THAN_OR_EQUAL,
|
|
492
492
|
val2: ""
|
|
493
493
|
}),
|
|
494
494
|
testMappingParams: (i) => {
|
|
495
495
|
const { and: s, operator1: l, operator2: u } = i;
|
|
496
496
|
if (!s) return !1;
|
|
497
497
|
const c = [l, u];
|
|
498
|
-
return c.includes(
|
|
498
|
+
return c.includes(v.GREATER_THAN_OR_EQUAL) && c.includes(v.LESS_THAN_OR_EQUAL);
|
|
499
499
|
},
|
|
500
500
|
mapToFilterColumn: (i) => {
|
|
501
|
-
const { val1: s, val2: l, operator1: u } = i, c = u ===
|
|
501
|
+
const { val1: s, val2: l, operator1: u } = i, c = u === v.GREATER_THAN_OR_EQUAL;
|
|
502
502
|
return {
|
|
503
503
|
customFilters: {
|
|
504
|
-
and:
|
|
504
|
+
and: Wr.TRUE,
|
|
505
505
|
customFilters: [
|
|
506
|
-
{ val: c ? s : l, operator:
|
|
507
|
-
{ val: c ? l : s, operator:
|
|
506
|
+
{ val: c ? s : l, operator: v.GREATER_THAN_OR_EQUAL },
|
|
507
|
+
{ val: c ? l : s, operator: v.LESS_THAN_OR_EQUAL }
|
|
508
508
|
]
|
|
509
509
|
}
|
|
510
510
|
};
|
|
@@ -514,17 +514,17 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
514
514
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 2)
|
|
515
515
|
return !1;
|
|
516
516
|
const [s, l] = i.customFilters.customFilters;
|
|
517
|
-
return s.operator ===
|
|
517
|
+
return s.operator === v.GREATER_THAN_OR_EQUAL && l.operator === v.LESS_THAN_OR_EQUAL && i.customFilters.and ? {
|
|
518
518
|
and: !0,
|
|
519
|
-
operator1:
|
|
519
|
+
operator1: v.GREATER_THAN_OR_EQUAL,
|
|
520
520
|
val1: s.val.toString(),
|
|
521
|
-
operator2:
|
|
521
|
+
operator2: v.LESS_THAN_OR_EQUAL,
|
|
522
522
|
val2: l.val.toString()
|
|
523
|
-
} : l.operator ===
|
|
523
|
+
} : l.operator === v.GREATER_THAN_OR_EQUAL && s.operator === v.LESS_THAN_OR_EQUAL && i.customFilters.and ? {
|
|
524
524
|
and: !0,
|
|
525
|
-
operator1:
|
|
525
|
+
operator1: v.GREATER_THAN_OR_EQUAL,
|
|
526
526
|
val1: l.val.toString(),
|
|
527
|
-
operator2:
|
|
527
|
+
operator2: v.LESS_THAN_OR_EQUAL,
|
|
528
528
|
val2: s.val.toLocaleString()
|
|
529
529
|
} : !1;
|
|
530
530
|
}
|
|
@@ -534,24 +534,24 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
534
534
|
order: j.SECOND,
|
|
535
535
|
numOfParameters: 2,
|
|
536
536
|
getDefaultFormParams: () => ({
|
|
537
|
-
operator1:
|
|
537
|
+
operator1: v.LESS_THAN,
|
|
538
538
|
val1: "",
|
|
539
|
-
operator2:
|
|
539
|
+
operator2: v.GREATER_THAN,
|
|
540
540
|
val2: ""
|
|
541
541
|
}),
|
|
542
542
|
testMappingParams: (i) => {
|
|
543
543
|
const { and: s, operator1: l, operator2: u } = i;
|
|
544
544
|
if (s) return !1;
|
|
545
545
|
const c = [l, u];
|
|
546
|
-
return c.includes(
|
|
546
|
+
return c.includes(v.GREATER_THAN) && c.includes(v.LESS_THAN);
|
|
547
547
|
},
|
|
548
548
|
mapToFilterColumn: (i) => {
|
|
549
|
-
const { val1: s, val2: l, operator1: u } = i, c = u ===
|
|
549
|
+
const { val1: s, val2: l, operator1: u } = i, c = u === v.GREATER_THAN;
|
|
550
550
|
return {
|
|
551
551
|
customFilters: {
|
|
552
552
|
customFilters: [
|
|
553
|
-
{ val: c ? s : l, operator:
|
|
554
|
-
{ val: c ? l : s, operator:
|
|
553
|
+
{ val: c ? s : l, operator: v.GREATER_THAN },
|
|
554
|
+
{ val: c ? l : s, operator: v.LESS_THAN }
|
|
555
555
|
]
|
|
556
556
|
}
|
|
557
557
|
};
|
|
@@ -561,15 +561,15 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
561
561
|
if (((u = i.customFilters) == null ? void 0 : u.customFilters.length) !== 2)
|
|
562
562
|
return !1;
|
|
563
563
|
const [s, l] = i.customFilters.customFilters;
|
|
564
|
-
return s.operator ===
|
|
565
|
-
operator1:
|
|
564
|
+
return s.operator === v.LESS_THAN && l.operator === v.GREATER_THAN && !i.customFilters.and ? {
|
|
565
|
+
operator1: v.LESS_THAN,
|
|
566
566
|
val1: s.val.toString(),
|
|
567
|
-
operator2:
|
|
567
|
+
operator2: v.GREATER_THAN,
|
|
568
568
|
val2: l.val.toString()
|
|
569
|
-
} : l.operator ===
|
|
570
|
-
operator1:
|
|
569
|
+
} : l.operator === v.LESS_THAN && s.operator === v.GREATER_THAN && !i.customFilters.and ? {
|
|
570
|
+
operator1: v.GREATER_THAN,
|
|
571
571
|
val1: l.val.toString(),
|
|
572
|
-
operator2:
|
|
572
|
+
operator2: v.LESS_THAN,
|
|
573
573
|
val2: s.val.toLocaleString()
|
|
574
574
|
} : !1;
|
|
575
575
|
}
|
|
@@ -587,7 +587,7 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
587
587
|
testMappingParams: () => !0,
|
|
588
588
|
mapToFilterColumn: (i) => {
|
|
589
589
|
const { and: s, val1: l, val2: u, operator1: c, operator2: h } = i;
|
|
590
|
-
function
|
|
590
|
+
function m(S, C) {
|
|
591
591
|
for (const O of e.ALL_CONDITIONS)
|
|
592
592
|
if (O.operator === S)
|
|
593
593
|
return O.mapToFilterColumn({ val1: C, operator1: S });
|
|
@@ -596,16 +596,16 @@ var j = /* @__PURE__ */ ((e) => (e[e.FIRST = 0] = "FIRST", e[e.SECOND = 1] = "SE
|
|
|
596
596
|
if (f && g)
|
|
597
597
|
return e.NONE.mapToFilterColumn({});
|
|
598
598
|
if (f)
|
|
599
|
-
return
|
|
599
|
+
return m(h, u);
|
|
600
600
|
if (g)
|
|
601
|
-
return
|
|
602
|
-
const p =
|
|
601
|
+
return m(c, l);
|
|
602
|
+
const p = m(c, l), _ = m(h, u), b = {
|
|
603
603
|
customFilters: [
|
|
604
604
|
p.customFilters.customFilters[0],
|
|
605
605
|
_.customFilters.customFilters[0]
|
|
606
606
|
]
|
|
607
607
|
};
|
|
608
|
-
return s && (b.and =
|
|
608
|
+
return s && (b.and = Wr.TRUE), { customFilters: b };
|
|
609
609
|
},
|
|
610
610
|
testMappingFilterColumn: (i) => {
|
|
611
611
|
var u;
|
|
@@ -689,7 +689,7 @@ function ce(e) {
|
|
|
689
689
|
throw new Error("Neither operator1 and operator2 and both not set!");
|
|
690
690
|
return t ? [t, n] : [r, o];
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function nr(e) {
|
|
693
693
|
const t = [], r = [];
|
|
694
694
|
for (const n of e)
|
|
695
695
|
n.checked ? t.push(n) : r.push(n);
|
|
@@ -700,16 +700,16 @@ function rr(e) {
|
|
|
700
700
|
unchecked: r.length
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
var Fo = Object.defineProperty, Oo = Object.getOwnPropertyDescriptor,
|
|
703
|
+
var Fo = Object.defineProperty, Oo = Object.getOwnPropertyDescriptor, br = (e, t, r, n) => {
|
|
704
704
|
for (var o = n > 1 ? void 0 : n ? Oo(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
705
705
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
706
706
|
return n && o && Fo(t, r, o), o;
|
|
707
|
-
}, De = (e, t) => (r, n) => t(r, n, e),
|
|
707
|
+
}, De = (e, t) => (r, n) => t(r, n, e), bt = /* @__PURE__ */ ((e) => (e[e.VALUES = 0] = "VALUES", e[e.CONDITIONS = 1] = "CONDITIONS", e))(bt || {});
|
|
708
708
|
Ni("sheets-filter-ui.sheets-filter-panel.service");
|
|
709
|
-
let
|
|
709
|
+
let Re = class extends Mt {
|
|
710
710
|
constructor(t, r, n, o) {
|
|
711
711
|
super();
|
|
712
|
-
N(this, "_filterBy$", new
|
|
712
|
+
N(this, "_filterBy$", new Ce(
|
|
713
713
|
0
|
|
714
714
|
/* VALUES */
|
|
715
715
|
));
|
|
@@ -717,10 +717,10 @@ let ye = class extends It {
|
|
|
717
717
|
N(this, "_filterByModel$", new xi(1));
|
|
718
718
|
N(this, "filterByModel$", this._filterByModel$.asObservable());
|
|
719
719
|
N(this, "_filterByModel", null);
|
|
720
|
-
N(this, "_hasCriteria$", new
|
|
720
|
+
N(this, "_hasCriteria$", new Ce(!1));
|
|
721
721
|
N(this, "hasCriteria$", this._hasCriteria$.asObservable());
|
|
722
722
|
N(this, "_filterModel", null);
|
|
723
|
-
N(this, "_col$", new
|
|
723
|
+
N(this, "_col$", new Ce(-1));
|
|
724
724
|
N(this, "col$", this._col$.asObservable());
|
|
725
725
|
N(this, "_filterHeaderListener", null);
|
|
726
726
|
this._injector = t, this._sheetsFilterService = r, this._univerInstanceService = n, this._refRangeService = o;
|
|
@@ -783,7 +783,7 @@ let ye = class extends It {
|
|
|
783
783
|
this._disposePreviousModel();
|
|
784
784
|
const n = t.getRange();
|
|
785
785
|
if (n.startRow === n.endRow) return !1;
|
|
786
|
-
const o =
|
|
786
|
+
const o = Rt.fromFilterColumn(
|
|
787
787
|
this._injector,
|
|
788
788
|
t,
|
|
789
789
|
r
|
|
@@ -797,7 +797,7 @@ let ye = class extends It {
|
|
|
797
797
|
this._disposePreviousModel();
|
|
798
798
|
const n = t.getRange();
|
|
799
799
|
if (n.startRow === n.endRow) return !1;
|
|
800
|
-
const o =
|
|
800
|
+
const o = yt.fromFilterColumn(
|
|
801
801
|
this._injector,
|
|
802
802
|
t,
|
|
803
803
|
r,
|
|
@@ -813,21 +813,21 @@ let ye = class extends It {
|
|
|
813
813
|
(t = this._filterByModel) == null || t.dispose(), this.filterByModel = null;
|
|
814
814
|
}
|
|
815
815
|
};
|
|
816
|
-
|
|
817
|
-
De(0, D(
|
|
816
|
+
Re = br([
|
|
817
|
+
De(0, D(ot)),
|
|
818
818
|
De(1, D(ee)),
|
|
819
|
-
De(2,
|
|
819
|
+
De(2, cr),
|
|
820
820
|
De(3, D(uo))
|
|
821
|
-
],
|
|
822
|
-
let
|
|
821
|
+
], Re);
|
|
822
|
+
let yt = class extends Mt {
|
|
823
823
|
constructor(t, r, n, o, a) {
|
|
824
824
|
super();
|
|
825
|
-
N(this, "canApply$",
|
|
825
|
+
N(this, "canApply$", st(!0));
|
|
826
826
|
N(this, "_conditionItem$");
|
|
827
827
|
N(this, "conditionItem$");
|
|
828
828
|
N(this, "_filterConditionFormParams$");
|
|
829
829
|
N(this, "filterConditionFormParams$");
|
|
830
|
-
this._filterModel = t, this.col = r, this._commandService = a, this._conditionItem$ = new
|
|
830
|
+
this._filterModel = t, this.col = r, this._commandService = a, this._conditionItem$ = new Ce(n), this.conditionItem$ = this._conditionItem$.asObservable(), this._filterConditionFormParams$ = new Ce(o), this.filterConditionFormParams$ = this._filterConditionFormParams$.asObservable();
|
|
831
831
|
}
|
|
832
832
|
/**
|
|
833
833
|
* Create a model with targeting filter column. If there is not a filter column, the model would be created with
|
|
@@ -842,7 +842,7 @@ let bt = class extends It {
|
|
|
842
842
|
*/
|
|
843
843
|
static fromFilterColumn(t, r, n, o) {
|
|
844
844
|
const [a, i] = R.testMappingFilterColumn(o == null ? void 0 : o.getColumnData());
|
|
845
|
-
return t.createInstance(
|
|
845
|
+
return t.createInstance(yt, r, n, a, i);
|
|
846
846
|
}
|
|
847
847
|
get conditionItem() {
|
|
848
848
|
return this._conditionItem$.getValue();
|
|
@@ -904,10 +904,10 @@ let bt = class extends It {
|
|
|
904
904
|
this._filterConditionFormParams$.next(r);
|
|
905
905
|
}
|
|
906
906
|
};
|
|
907
|
-
|
|
907
|
+
yt = br([
|
|
908
908
|
De(4, ae)
|
|
909
|
-
],
|
|
910
|
-
let
|
|
909
|
+
], yt);
|
|
910
|
+
let Rt = class extends Mt {
|
|
911
911
|
constructor(t, r, n, o) {
|
|
912
912
|
super();
|
|
913
913
|
N(this, "_rawFilterItems$");
|
|
@@ -918,11 +918,11 @@ let yt = class extends It {
|
|
|
918
918
|
N(this, "_manuallyUpdateFilterItems$");
|
|
919
919
|
N(this, "_searchString$");
|
|
920
920
|
N(this, "searchString$");
|
|
921
|
-
this._filterModel = t, this.col = r, this._commandService = o, this._searchString$ = new
|
|
922
|
-
|
|
921
|
+
this._filterModel = t, this.col = r, this._commandService = o, this._searchString$ = new Ce(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new Ce(n), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new Bi(), this.filterItems$ = Wi(
|
|
922
|
+
Rn([
|
|
923
923
|
this._searchString$.pipe(
|
|
924
|
-
|
|
925
|
-
|
|
924
|
+
Tn(500, void 0, { leading: !0, trailing: !0 }),
|
|
925
|
+
Fn(void 0)
|
|
926
926
|
),
|
|
927
927
|
this._rawFilterItems$
|
|
928
928
|
]).pipe(
|
|
@@ -936,7 +936,7 @@ let yt = class extends It {
|
|
|
936
936
|
})
|
|
937
937
|
),
|
|
938
938
|
this._manuallyUpdateFilterItems$
|
|
939
|
-
).pipe(Vi(1)), this.canApply$ = this.filterItems$.pipe(xe((a) =>
|
|
939
|
+
).pipe(Vi(1)), this.canApply$ = this.filterItems$.pipe(xe((a) => nr(a).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((a) => this._filterItems = a));
|
|
940
940
|
}
|
|
941
941
|
/**
|
|
942
942
|
* Create a model with targeting filter column. If there is not a filter column, the model would be created with
|
|
@@ -950,43 +950,43 @@ let yt = class extends It {
|
|
|
950
950
|
*/
|
|
951
951
|
static fromFilterColumn(t, r, n) {
|
|
952
952
|
var A;
|
|
953
|
-
const o = t.get(
|
|
953
|
+
const o = t.get(cr), a = t.get(Fe), { unitId: i, subUnitId: s } = r, l = o.getUniverSheetInstance(i);
|
|
954
954
|
if (!l) throw new Error(`[ByValuesModel]: Workbook not found for filter model with unitId: ${i}!`);
|
|
955
955
|
const u = l == null ? void 0 : l.getSheetBySheetId(s);
|
|
956
956
|
if (!u) throw new Error(`[ByValuesModel]: Worksheet not found for filter model with unitId: ${i} and subUnitId: ${s}!`);
|
|
957
|
-
const c = r.getRange(), h = n,
|
|
957
|
+
const c = r.getRange(), h = n, m = (A = r.getFilterColumn(n)) == null ? void 0 : A.getColumnData().filters, f = !!(m && m.blank), g = { ...c, startRow: c.startRow + 1, startColumn: h, endColumn: h }, p = [], _ = {}, b = new Set(m == null ? void 0 : m.filters), S = r.getFilteredOutRowsExceptCol(n);
|
|
958
958
|
let C = 0, O = 0;
|
|
959
959
|
for (const F of u.iterateByColumn(g, !1, !1)) {
|
|
960
960
|
const { row: L, rowSpan: H = 1 } = F;
|
|
961
961
|
let W = 0;
|
|
962
962
|
for (; W < H; ) {
|
|
963
|
-
const
|
|
964
|
-
if (S.has(
|
|
963
|
+
const Y = L + W;
|
|
964
|
+
if (S.has(Y)) {
|
|
965
965
|
W++;
|
|
966
966
|
continue;
|
|
967
967
|
}
|
|
968
|
-
const
|
|
969
|
-
if (!
|
|
968
|
+
const z = F != null && F.value ? Oi(F.value) : "";
|
|
969
|
+
if (!z) {
|
|
970
970
|
O += 1, W += H;
|
|
971
971
|
continue;
|
|
972
972
|
}
|
|
973
|
-
if (_[
|
|
974
|
-
_[
|
|
973
|
+
if (_[z])
|
|
974
|
+
_[z].count++;
|
|
975
975
|
else {
|
|
976
976
|
const te = {
|
|
977
|
-
value:
|
|
978
|
-
checked: b.size ? b.has(
|
|
977
|
+
value: z,
|
|
978
|
+
checked: b.size ? b.has(z) : !f,
|
|
979
979
|
count: 1,
|
|
980
980
|
index: C,
|
|
981
981
|
isEmpty: !1
|
|
982
982
|
};
|
|
983
|
-
_[
|
|
983
|
+
_[z] = te, p.push(te);
|
|
984
984
|
}
|
|
985
985
|
W++;
|
|
986
986
|
}
|
|
987
987
|
C++;
|
|
988
988
|
}
|
|
989
|
-
const B =
|
|
989
|
+
const B = m ? f : !0;
|
|
990
990
|
if (O > 0) {
|
|
991
991
|
const F = {
|
|
992
992
|
value: a.t("sheets-filter.panel.empty"),
|
|
@@ -997,7 +997,7 @@ let yt = class extends It {
|
|
|
997
997
|
};
|
|
998
998
|
p.push(F);
|
|
999
999
|
}
|
|
1000
|
-
return t.createInstance(
|
|
1000
|
+
return t.createInstance(Rt, r, n, p);
|
|
1001
1001
|
}
|
|
1002
1002
|
get rawFilterItems() {
|
|
1003
1003
|
return this._rawFilterItems$.getValue();
|
|
@@ -1048,7 +1048,7 @@ let yt = class extends It {
|
|
|
1048
1048
|
async apply() {
|
|
1049
1049
|
if (this._disposed)
|
|
1050
1050
|
return !1;
|
|
1051
|
-
const t =
|
|
1051
|
+
const t = nr(this._filterItems), { checked: r, checkedItems: n } = t, o = this.rawFilterItems, a = r === 0, i = t.checked === o.length, s = { colId: this.col };
|
|
1052
1052
|
if (a)
|
|
1053
1053
|
throw new Error("[ByValuesModel]: no checked items!");
|
|
1054
1054
|
if (i)
|
|
@@ -1072,33 +1072,33 @@ let yt = class extends It {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
// #endregion
|
|
1074
1074
|
};
|
|
1075
|
-
|
|
1075
|
+
Rt = br([
|
|
1076
1076
|
De(3, ae)
|
|
1077
|
-
],
|
|
1078
|
-
const Be = "FILTER_PANEL_OPENED",
|
|
1077
|
+
], Rt);
|
|
1078
|
+
const Be = "FILTER_PANEL_OPENED", Tt = {
|
|
1079
1079
|
id: "sheet.operation.open-filter-panel",
|
|
1080
|
-
type:
|
|
1080
|
+
type: Te.OPERATION,
|
|
1081
1081
|
handler: (e, t) => {
|
|
1082
|
-
const r = e.get(
|
|
1082
|
+
const r = e.get(wt), n = e.get(ee), o = e.get(Re);
|
|
1083
1083
|
e.get(ae).syncExecuteCommand(Qi.id, { visible: !1 });
|
|
1084
1084
|
const { unitId: i, subUnitId: s, col: l } = t, u = n.getFilterModel(i, s);
|
|
1085
1085
|
return !u || !o.setupCol(u, l) ? !1 : (r.getContextValue(Be) || r.setContextValue(Be, !0), !0);
|
|
1086
1086
|
}
|
|
1087
|
-
},
|
|
1087
|
+
}, Ze = {
|
|
1088
1088
|
id: "sheet.operation.close-filter-panel",
|
|
1089
|
-
type:
|
|
1089
|
+
type: Te.OPERATION,
|
|
1090
1090
|
handler: (e) => {
|
|
1091
|
-
const t = e.get(
|
|
1091
|
+
const t = e.get(wt), r = e.get(Re), n = e.get(Mi, Sn.OPTIONAL);
|
|
1092
1092
|
return t.getContextValue(Be) ? (t.setContextValue(Be, !1), n == null || n.focus(), r.terminate()) : !1;
|
|
1093
1093
|
}
|
|
1094
|
-
},
|
|
1094
|
+
}, Dn = {
|
|
1095
1095
|
id: "sheet.operation.apply-filter",
|
|
1096
|
-
type:
|
|
1096
|
+
type: Te.OPERATION,
|
|
1097
1097
|
handler: (e, t) => {
|
|
1098
1098
|
const { filterBy: r } = t;
|
|
1099
|
-
return e.get(
|
|
1099
|
+
return e.get(Re).changeFilterBy(r);
|
|
1100
1100
|
}
|
|
1101
|
-
}, Co = "univer-sheets-filter-panel", Po = "univer-sheets-filter-panel-header", No = "univer-sheets-filter-panel-content", Io = "univer-sheets-filter-panel-select-all", Mo = "univer-sheets-filter-panel-select-all-count", wo = "univer-sheets-filter-panel-values-container", Ao = "univer-input-affix-wrapper", Lo = "univer-select", $o = "univer-radio-group", Do = "univer-sheets-filter-panel-values-find", Ho = "univer-sheets-filter-panel-values-list", Uo = "univer-sheets-filter-panel-values-list-inner-container", xo = "univer-sheets-filter-panel-values-virtual", Bo = "univer-sheets-filter-panel-values-item", Wo = "univer-sheets-filter-panel-values-item-inner", Vo = "univer-sheets-filter-panel-values-item-count", jo = "univer-sheets-filter-panel-values-item-exclude-button",
|
|
1101
|
+
}, Co = "univer-sheets-filter-panel", Po = "univer-sheets-filter-panel-header", No = "univer-sheets-filter-panel-content", Io = "univer-sheets-filter-panel-select-all", Mo = "univer-sheets-filter-panel-select-all-count", wo = "univer-sheets-filter-panel-values-container", Ao = "univer-input-affix-wrapper", Lo = "univer-select", $o = "univer-radio-group", Do = "univer-sheets-filter-panel-values-find", Ho = "univer-sheets-filter-panel-values-list", Uo = "univer-sheets-filter-panel-values-list-inner-container", xo = "univer-sheets-filter-panel-values-virtual", Bo = "univer-sheets-filter-panel-values-item", Wo = "univer-sheets-filter-panel-values-item-inner", Vo = "univer-sheets-filter-panel-values-item-count", jo = "univer-sheets-filter-panel-values-item-exclude-button", zo = "univer-sheets-filter-panel-values-item-text", ko = "univer-sheets-filter-panel-conditions-container", Qo = "univer-sheets-filter-panel-conditions-container-inner", Go = "univer-sheets-filter-panel-conditions-desc", Yo = "univer-sheets-filter-panel-footer", Xo = "univer-sheets-filter-panel-footer-primary-buttons", Ko = "univer-button", qo = "univer-input", Zo = "univer-form-dual-column-layout", x = {
|
|
1102
1102
|
sheetsFilterPanel: Co,
|
|
1103
1103
|
sheetsFilterPanelHeader: Po,
|
|
1104
1104
|
sheetsFilterPanelContent: No,
|
|
@@ -1116,8 +1116,8 @@ const Be = "FILTER_PANEL_OPENED", Rt = {
|
|
|
1116
1116
|
sheetsFilterPanelValuesItemInner: Wo,
|
|
1117
1117
|
sheetsFilterPanelValuesItemCount: Vo,
|
|
1118
1118
|
sheetsFilterPanelValuesItemExcludeButton: jo,
|
|
1119
|
-
sheetsFilterPanelValuesItemText:
|
|
1120
|
-
sheetsFilterPanelConditionsContainer:
|
|
1119
|
+
sheetsFilterPanelValuesItemText: zo,
|
|
1120
|
+
sheetsFilterPanelConditionsContainer: ko,
|
|
1121
1121
|
sheetsFilterPanelConditionsContainerInner: Qo,
|
|
1122
1122
|
sheetsFilterPanelConditionsDesc: Go,
|
|
1123
1123
|
sheetsFilterPanelFooter: Yo,
|
|
@@ -1127,7 +1127,7 @@ const Be = "FILTER_PANEL_OPENED", Rt = {
|
|
|
1127
1127
|
formDualColumnLayout: Zo
|
|
1128
1128
|
};
|
|
1129
1129
|
function Jo(e) {
|
|
1130
|
-
const { model: t } = e, r = $e(
|
|
1130
|
+
const { model: t } = e, r = $e(Fe), n = be(t.conditionItem$, void 0, !0), o = be(t.filterConditionFormParams$, void 0, !0), { operator: a, numOfParameters: i } = n, { operator1: s, operator2: l, val1: u, val2: c, and: h } = o, m = h ? "AND" : "OR", f = fe((O) => {
|
|
1131
1131
|
t.onConditionFormChange({ and: O === "AND" });
|
|
1132
1132
|
}, [t]), g = es(r), p = fe((O) => {
|
|
1133
1133
|
t.onPrimaryConditionChange(O);
|
|
@@ -1136,13 +1136,13 @@ function Jo(e) {
|
|
|
1136
1136
|
}, [t]), S = r.t("sheets-filter.panel.input-values-placeholder");
|
|
1137
1137
|
function C(O, B, A) {
|
|
1138
1138
|
const F = R.getItemByOperator(O).numOfParameters === 1;
|
|
1139
|
-
return /* @__PURE__ */ T.createElement(T.Fragment, null, A === "operator2" && /* @__PURE__ */ T.createElement(io, { value:
|
|
1139
|
+
return /* @__PURE__ */ T.createElement(T.Fragment, null, A === "operator2" && /* @__PURE__ */ T.createElement(io, { value: m, onChange: f }, /* @__PURE__ */ T.createElement(Qr, { value: "AND" }, r.t("sheets-filter.panel.and")), /* @__PURE__ */ T.createElement(Qr, { value: "OR" }, r.t("sheets-filter.panel.or"))), /* @__PURE__ */ T.createElement(kr, { value: O, options: _, onChange: (L) => b({ [A]: L }) }), F && /* @__PURE__ */ T.createElement(Cn, { value: B, placeholder: S, onChange: (L) => b({ [A === "operator1" ? "val1" : "val2"]: L }) }));
|
|
1140
1140
|
}
|
|
1141
1141
|
return /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelConditionsContainer }, /* @__PURE__ */ T.createElement(kr, { value: a, options: g, onChange: p }), R.getItemByOperator(a).numOfParameters !== 0 ? /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelConditionsContainerInner }, i >= 1 && C(s, u != null ? u : "", "operator1"), i >= 2 && C(l, c != null ? c : "", "operator2"), /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelConditionsDesc }, r.t("sheets-filter.panel.?"), /* @__PURE__ */ T.createElement("br", null), r.t("sheets-filter.panel.*"))) : null);
|
|
1142
1142
|
}
|
|
1143
1143
|
function es(e) {
|
|
1144
1144
|
const t = e.getCurrentLocale();
|
|
1145
|
-
return
|
|
1145
|
+
return Er(
|
|
1146
1146
|
() => [
|
|
1147
1147
|
{
|
|
1148
1148
|
options: [
|
|
@@ -1188,20 +1188,20 @@ function es(e) {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
function ts(e) {
|
|
1190
1190
|
const t = e.getCurrentLocale();
|
|
1191
|
-
return
|
|
1191
|
+
return Er(
|
|
1192
1192
|
() => R.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: e.t(r.label), value: r.operator })),
|
|
1193
1193
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1194
1194
|
[t, e]
|
|
1195
1195
|
);
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
return
|
|
1197
|
+
function nt() {
|
|
1198
|
+
return nt = Object.assign ? Object.assign.bind() : function(e) {
|
|
1199
1199
|
for (var t = 1; t < arguments.length; t++) {
|
|
1200
1200
|
var r = arguments[t];
|
|
1201
1201
|
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
1202
1202
|
}
|
|
1203
1203
|
return e;
|
|
1204
|
-
},
|
|
1204
|
+
}, nt.apply(null, arguments);
|
|
1205
1205
|
}
|
|
1206
1206
|
function se(e) {
|
|
1207
1207
|
"@babel/helpers - typeof";
|
|
@@ -1221,19 +1221,19 @@ function rs(e, t) {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
return (t === "string" ? String : Number)(e);
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function Hn(e) {
|
|
1225
1225
|
var t = rs(e, "string");
|
|
1226
1226
|
return se(t) == "symbol" ? t : t + "";
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1229
|
-
return (t =
|
|
1228
|
+
function q(e, t, r) {
|
|
1229
|
+
return (t = Hn(t)) in e ? Object.defineProperty(e, t, {
|
|
1230
1230
|
value: r,
|
|
1231
1231
|
enumerable: !0,
|
|
1232
1232
|
configurable: !0,
|
|
1233
1233
|
writable: !0
|
|
1234
1234
|
}) : e[t] = r, e;
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1236
|
+
function qr(e, t) {
|
|
1237
1237
|
var r = Object.keys(e);
|
|
1238
1238
|
if (Object.getOwnPropertySymbols) {
|
|
1239
1239
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -1246,9 +1246,9 @@ function Kr(e, t) {
|
|
|
1246
1246
|
function G(e) {
|
|
1247
1247
|
for (var t = 1; t < arguments.length; t++) {
|
|
1248
1248
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1249
|
-
t % 2 ?
|
|
1250
|
-
|
|
1251
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
1249
|
+
t % 2 ? qr(Object(r), !0).forEach(function(n) {
|
|
1250
|
+
q(e, n, r[n]);
|
|
1251
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : qr(Object(r)).forEach(function(n) {
|
|
1252
1252
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
@@ -1278,16 +1278,16 @@ function is(e, t) {
|
|
|
1278
1278
|
return s;
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function Zr(e, t) {
|
|
1282
1282
|
(t == null || t > e.length) && (t = e.length);
|
|
1283
1283
|
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1284
1284
|
return n;
|
|
1285
1285
|
}
|
|
1286
1286
|
function os(e, t) {
|
|
1287
1287
|
if (e) {
|
|
1288
|
-
if (typeof e == "string") return
|
|
1288
|
+
if (typeof e == "string") return Zr(e, t);
|
|
1289
1289
|
var r = {}.toString.call(e).slice(8, -1);
|
|
1290
|
-
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ?
|
|
1290
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Zr(e, t) : void 0;
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
1293
|
function ss() {
|
|
@@ -1318,7 +1318,7 @@ function ls(e, t) {
|
|
|
1318
1318
|
function us(e) {
|
|
1319
1319
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1320
1320
|
}
|
|
1321
|
-
var
|
|
1321
|
+
var Un = { exports: {} };
|
|
1322
1322
|
/*!
|
|
1323
1323
|
Copyright (c) 2018 Jed Watson.
|
|
1324
1324
|
Licensed under the MIT License (MIT), see
|
|
@@ -1353,10 +1353,10 @@ var Hn = { exports: {} };
|
|
|
1353
1353
|
}
|
|
1354
1354
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1355
1355
|
})();
|
|
1356
|
-
})(
|
|
1357
|
-
var cs =
|
|
1358
|
-
const
|
|
1359
|
-
var
|
|
1356
|
+
})(Un);
|
|
1357
|
+
var cs = Un.exports;
|
|
1358
|
+
const Ft = /* @__PURE__ */ us(cs);
|
|
1359
|
+
var xn = { exports: {} }, M = {};
|
|
1360
1360
|
/**
|
|
1361
1361
|
* @license React
|
|
1362
1362
|
* react-is.production.min.js
|
|
@@ -1366,50 +1366,50 @@ var Un = { exports: {} }, M = {};
|
|
|
1366
1366
|
* This source code is licensed under the MIT license found in the
|
|
1367
1367
|
* LICENSE file in the root directory of this source tree.
|
|
1368
1368
|
*/
|
|
1369
|
-
var
|
|
1370
|
-
|
|
1369
|
+
var yr = Symbol.for("react.element"), Rr = Symbol.for("react.portal"), At = Symbol.for("react.fragment"), Lt = Symbol.for("react.strict_mode"), $t = Symbol.for("react.profiler"), Dt = Symbol.for("react.provider"), Ht = Symbol.for("react.context"), fs = Symbol.for("react.server_context"), Ut = Symbol.for("react.forward_ref"), xt = Symbol.for("react.suspense"), Bt = Symbol.for("react.suspense_list"), Wt = Symbol.for("react.memo"), Vt = Symbol.for("react.lazy"), hs = Symbol.for("react.offscreen"), Bn;
|
|
1370
|
+
Bn = Symbol.for("react.module.reference");
|
|
1371
1371
|
function le(e) {
|
|
1372
1372
|
if (typeof e == "object" && e !== null) {
|
|
1373
1373
|
var t = e.$$typeof;
|
|
1374
1374
|
switch (t) {
|
|
1375
|
-
case
|
|
1375
|
+
case yr:
|
|
1376
1376
|
switch (e = e.type, e) {
|
|
1377
|
-
case wt:
|
|
1378
|
-
case Lt:
|
|
1379
1377
|
case At:
|
|
1380
|
-
case
|
|
1378
|
+
case $t:
|
|
1379
|
+
case Lt:
|
|
1381
1380
|
case xt:
|
|
1381
|
+
case Bt:
|
|
1382
1382
|
return e;
|
|
1383
1383
|
default:
|
|
1384
1384
|
switch (e = e && e.$$typeof, e) {
|
|
1385
1385
|
case fs:
|
|
1386
|
-
case Dt:
|
|
1387
1386
|
case Ht:
|
|
1387
|
+
case Ut:
|
|
1388
|
+
case Vt:
|
|
1388
1389
|
case Wt:
|
|
1389
|
-
case
|
|
1390
|
-
case $t:
|
|
1390
|
+
case Dt:
|
|
1391
1391
|
return e;
|
|
1392
1392
|
default:
|
|
1393
1393
|
return t;
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
case
|
|
1396
|
+
case Rr:
|
|
1397
1397
|
return t;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
|
-
M.ContextConsumer =
|
|
1402
|
-
M.ContextProvider =
|
|
1403
|
-
M.Element =
|
|
1404
|
-
M.ForwardRef =
|
|
1405
|
-
M.Fragment =
|
|
1406
|
-
M.Lazy =
|
|
1407
|
-
M.Memo =
|
|
1408
|
-
M.Portal =
|
|
1409
|
-
M.Profiler =
|
|
1410
|
-
M.StrictMode =
|
|
1411
|
-
M.Suspense =
|
|
1412
|
-
M.SuspenseList =
|
|
1401
|
+
M.ContextConsumer = Ht;
|
|
1402
|
+
M.ContextProvider = Dt;
|
|
1403
|
+
M.Element = yr;
|
|
1404
|
+
M.ForwardRef = Ut;
|
|
1405
|
+
M.Fragment = At;
|
|
1406
|
+
M.Lazy = Vt;
|
|
1407
|
+
M.Memo = Wt;
|
|
1408
|
+
M.Portal = Rr;
|
|
1409
|
+
M.Profiler = $t;
|
|
1410
|
+
M.StrictMode = Lt;
|
|
1411
|
+
M.Suspense = xt;
|
|
1412
|
+
M.SuspenseList = Bt;
|
|
1413
1413
|
M.isAsyncMode = function() {
|
|
1414
1414
|
return !1;
|
|
1415
1415
|
};
|
|
@@ -1417,74 +1417,74 @@ M.isConcurrentMode = function() {
|
|
|
1417
1417
|
return !1;
|
|
1418
1418
|
};
|
|
1419
1419
|
M.isContextConsumer = function(e) {
|
|
1420
|
-
return le(e) ===
|
|
1420
|
+
return le(e) === Ht;
|
|
1421
1421
|
};
|
|
1422
1422
|
M.isContextProvider = function(e) {
|
|
1423
|
-
return le(e) ===
|
|
1423
|
+
return le(e) === Dt;
|
|
1424
1424
|
};
|
|
1425
1425
|
M.isElement = function(e) {
|
|
1426
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
1426
|
+
return typeof e == "object" && e !== null && e.$$typeof === yr;
|
|
1427
1427
|
};
|
|
1428
1428
|
M.isForwardRef = function(e) {
|
|
1429
|
-
return le(e) ===
|
|
1429
|
+
return le(e) === Ut;
|
|
1430
1430
|
};
|
|
1431
1431
|
M.isFragment = function(e) {
|
|
1432
|
-
return le(e) ===
|
|
1432
|
+
return le(e) === At;
|
|
1433
1433
|
};
|
|
1434
1434
|
M.isLazy = function(e) {
|
|
1435
|
-
return le(e) ===
|
|
1435
|
+
return le(e) === Vt;
|
|
1436
1436
|
};
|
|
1437
1437
|
M.isMemo = function(e) {
|
|
1438
|
-
return le(e) ===
|
|
1438
|
+
return le(e) === Wt;
|
|
1439
1439
|
};
|
|
1440
1440
|
M.isPortal = function(e) {
|
|
1441
|
-
return le(e) ===
|
|
1441
|
+
return le(e) === Rr;
|
|
1442
1442
|
};
|
|
1443
1443
|
M.isProfiler = function(e) {
|
|
1444
|
-
return le(e) ===
|
|
1444
|
+
return le(e) === $t;
|
|
1445
1445
|
};
|
|
1446
1446
|
M.isStrictMode = function(e) {
|
|
1447
|
-
return le(e) ===
|
|
1447
|
+
return le(e) === Lt;
|
|
1448
1448
|
};
|
|
1449
1449
|
M.isSuspense = function(e) {
|
|
1450
|
-
return le(e) ===
|
|
1450
|
+
return le(e) === xt;
|
|
1451
1451
|
};
|
|
1452
1452
|
M.isSuspenseList = function(e) {
|
|
1453
|
-
return le(e) ===
|
|
1453
|
+
return le(e) === Bt;
|
|
1454
1454
|
};
|
|
1455
1455
|
M.isValidElementType = function(e) {
|
|
1456
|
-
return typeof e == "string" || typeof e == "function" || e ===
|
|
1456
|
+
return typeof e == "string" || typeof e == "function" || e === At || e === $t || e === Lt || e === xt || e === Bt || e === hs || typeof e == "object" && e !== null && (e.$$typeof === Vt || e.$$typeof === Wt || e.$$typeof === Dt || e.$$typeof === Ht || e.$$typeof === Ut || e.$$typeof === Bn || e.getModuleId !== void 0);
|
|
1457
1457
|
};
|
|
1458
1458
|
M.typeOf = le;
|
|
1459
|
-
|
|
1460
|
-
var
|
|
1461
|
-
function
|
|
1459
|
+
xn.exports = M;
|
|
1460
|
+
var Je = xn.exports;
|
|
1461
|
+
function ir(e) {
|
|
1462
1462
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [];
|
|
1463
1463
|
return T.Children.forEach(e, function(n) {
|
|
1464
|
-
n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat(
|
|
1464
|
+
n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat(ir(n)) : Je.isFragment(n) && n.props ? r = r.concat(ir(n.props.children, t)) : r.push(n));
|
|
1465
1465
|
}), r;
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function Jr(e) {
|
|
1468
1468
|
return e instanceof HTMLElement || e instanceof SVGElement;
|
|
1469
1469
|
}
|
|
1470
1470
|
function ds(e) {
|
|
1471
|
-
return e && se(e) === "object" &&
|
|
1471
|
+
return e && se(e) === "object" && Jr(e.nativeElement) ? e.nativeElement : Jr(e) ? e : null;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function Et(e) {
|
|
1474
1474
|
var t = ds(e);
|
|
1475
1475
|
if (t)
|
|
1476
1476
|
return t;
|
|
1477
1477
|
if (e instanceof T.Component) {
|
|
1478
1478
|
var r;
|
|
1479
|
-
return (r =
|
|
1479
|
+
return (r = Xr.findDOMNode) === null || r === void 0 ? void 0 : r.call(Xr, e);
|
|
1480
1480
|
}
|
|
1481
1481
|
return null;
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1483
|
+
function vs(e, t, r) {
|
|
1484
1484
|
var n = d.useRef({});
|
|
1485
1485
|
return (!("value" in n.current) || r(n.current.condition, t)) && (n.current.value = e(), n.current.condition = t), n.current.value;
|
|
1486
1486
|
}
|
|
1487
|
-
var
|
|
1487
|
+
var ms = function(t, r) {
|
|
1488
1488
|
typeof t == "function" ? t(r) : se(t) === "object" && t && "current" in t && (t.current = r);
|
|
1489
1489
|
}, ps = function() {
|
|
1490
1490
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
@@ -1492,13 +1492,13 @@ var vs = function(t, r) {
|
|
|
1492
1492
|
var o = r.filter(Boolean);
|
|
1493
1493
|
return o.length <= 1 ? o[0] : function(a) {
|
|
1494
1494
|
r.forEach(function(i) {
|
|
1495
|
-
|
|
1495
|
+
ms(i, a);
|
|
1496
1496
|
});
|
|
1497
1497
|
};
|
|
1498
1498
|
}, _s = function() {
|
|
1499
1499
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1500
1500
|
r[n] = arguments[n];
|
|
1501
|
-
return
|
|
1501
|
+
return vs(function() {
|
|
1502
1502
|
return ps.apply(void 0, r);
|
|
1503
1503
|
}, r, function(o, a) {
|
|
1504
1504
|
return o.length !== a.length || o.every(function(i, s) {
|
|
@@ -1506,16 +1506,16 @@ var vs = function(t, r) {
|
|
|
1506
1506
|
});
|
|
1507
1507
|
});
|
|
1508
1508
|
}, gs = function(t) {
|
|
1509
|
-
var r, n, o =
|
|
1510
|
-
return !(typeof o == "function" && !((r = o.prototype) !== null && r !== void 0 && r.render) && o.$$typeof !==
|
|
1509
|
+
var r, n, o = Je.isMemo(t) ? t.type.type : t.type;
|
|
1510
|
+
return !(typeof o == "function" && !((r = o.prototype) !== null && r !== void 0 && r.render) && o.$$typeof !== Je.ForwardRef || typeof t == "function" && !((n = t.prototype) !== null && n !== void 0 && n.render) && t.$$typeof !== Je.ForwardRef);
|
|
1511
1511
|
};
|
|
1512
|
-
function
|
|
1513
|
-
return /* @__PURE__ */
|
|
1512
|
+
function en(e) {
|
|
1513
|
+
return /* @__PURE__ */ mo(e) && !Je.isFragment(e);
|
|
1514
1514
|
}
|
|
1515
|
-
Number(
|
|
1516
|
-
var
|
|
1515
|
+
Number(vo.split(".")[0]) >= 19;
|
|
1516
|
+
var or = /* @__PURE__ */ d.createContext(null);
|
|
1517
1517
|
function Ss(e) {
|
|
1518
|
-
var t = e.children, r = e.onBatchResize, n = d.useRef(0), o = d.useRef([]), a = d.useContext(
|
|
1518
|
+
var t = e.children, r = e.onBatchResize, n = d.useRef(0), o = d.useRef([]), a = d.useContext(or), i = d.useCallback(function(s, l, u) {
|
|
1519
1519
|
n.current += 1;
|
|
1520
1520
|
var c = n.current;
|
|
1521
1521
|
o.current.push({
|
|
@@ -1526,11 +1526,11 @@ function Ss(e) {
|
|
|
1526
1526
|
c === n.current && (r == null || r(o.current), o.current = []);
|
|
1527
1527
|
}), a == null || a(s, l, u);
|
|
1528
1528
|
}, [r, a]);
|
|
1529
|
-
return /* @__PURE__ */ d.createElement(
|
|
1529
|
+
return /* @__PURE__ */ d.createElement(or.Provider, {
|
|
1530
1530
|
value: i
|
|
1531
1531
|
}, t);
|
|
1532
1532
|
}
|
|
1533
|
-
var
|
|
1533
|
+
var Wn = function() {
|
|
1534
1534
|
if (typeof Map < "u")
|
|
1535
1535
|
return Map;
|
|
1536
1536
|
function e(t, r) {
|
|
@@ -1576,10 +1576,10 @@ var Bn = function() {
|
|
|
1576
1576
|
}, t;
|
|
1577
1577
|
}()
|
|
1578
1578
|
);
|
|
1579
|
-
}(),
|
|
1579
|
+
}(), sr = typeof window < "u" && typeof document < "u" && window.document === document, Ot = function() {
|
|
1580
1580
|
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
1581
1581
|
}(), Es = function() {
|
|
1582
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
1582
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Ot) : function(e) {
|
|
1583
1583
|
return setTimeout(function() {
|
|
1584
1584
|
return e(Date.now());
|
|
1585
1585
|
}, 1e3 / 60);
|
|
@@ -1627,14 +1627,14 @@ var Rs = 20, Ts = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1627
1627
|
return r.broadcastActive();
|
|
1628
1628
|
}), t.length > 0;
|
|
1629
1629
|
}, e.prototype.connect_ = function() {
|
|
1630
|
-
!
|
|
1630
|
+
!sr || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Fs ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
1631
1631
|
attributes: !0,
|
|
1632
1632
|
childList: !0,
|
|
1633
1633
|
characterData: !0,
|
|
1634
1634
|
subtree: !0
|
|
1635
1635
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
1636
1636
|
}, e.prototype.disconnect_ = function() {
|
|
1637
|
-
!
|
|
1637
|
+
!sr || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
1638
1638
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
1639
1639
|
var r = t.propertyName, n = r === void 0 ? "" : r, o = Ts.some(function(a) {
|
|
1640
1640
|
return !!~n.indexOf(a);
|
|
@@ -1644,7 +1644,7 @@ var Rs = 20, Ts = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1644
1644
|
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
1645
1645
|
}, e.instance_ = null, e;
|
|
1646
1646
|
}()
|
|
1647
|
-
),
|
|
1647
|
+
), Vn = function(e, t) {
|
|
1648
1648
|
for (var r = 0, n = Object.keys(t); r < n.length; r++) {
|
|
1649
1649
|
var o = n[r];
|
|
1650
1650
|
Object.defineProperty(e, o, {
|
|
@@ -1657,40 +1657,40 @@ var Rs = 20, Ts = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
1657
1657
|
return e;
|
|
1658
1658
|
}, We = function(e) {
|
|
1659
1659
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
1660
|
-
return t ||
|
|
1661
|
-
},
|
|
1662
|
-
function
|
|
1660
|
+
return t || Ot;
|
|
1661
|
+
}, jn = jt(0, 0, 0, 0);
|
|
1662
|
+
function Ct(e) {
|
|
1663
1663
|
return parseFloat(e) || 0;
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function tn(e) {
|
|
1666
1666
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
1667
1667
|
t[r - 1] = arguments[r];
|
|
1668
1668
|
return t.reduce(function(n, o) {
|
|
1669
1669
|
var a = e["border-" + o + "-width"];
|
|
1670
|
-
return n +
|
|
1670
|
+
return n + Ct(a);
|
|
1671
1671
|
}, 0);
|
|
1672
1672
|
}
|
|
1673
1673
|
function Cs(e) {
|
|
1674
1674
|
for (var t = ["top", "right", "bottom", "left"], r = {}, n = 0, o = t; n < o.length; n++) {
|
|
1675
1675
|
var a = o[n], i = e["padding-" + a];
|
|
1676
|
-
r[a] =
|
|
1676
|
+
r[a] = Ct(i);
|
|
1677
1677
|
}
|
|
1678
1678
|
return r;
|
|
1679
1679
|
}
|
|
1680
1680
|
function Ps(e) {
|
|
1681
1681
|
var t = e.getBBox();
|
|
1682
|
-
return
|
|
1682
|
+
return jt(0, 0, t.width, t.height);
|
|
1683
1683
|
}
|
|
1684
1684
|
function Ns(e) {
|
|
1685
1685
|
var t = e.clientWidth, r = e.clientHeight;
|
|
1686
1686
|
if (!t && !r)
|
|
1687
|
-
return
|
|
1688
|
-
var n = We(e).getComputedStyle(e), o = Cs(n), a = o.left + o.right, i = o.top + o.bottom, s =
|
|
1689
|
-
if (n.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -=
|
|
1687
|
+
return jn;
|
|
1688
|
+
var n = We(e).getComputedStyle(e), o = Cs(n), a = o.left + o.right, i = o.top + o.bottom, s = Ct(n.width), l = Ct(n.height);
|
|
1689
|
+
if (n.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= tn(n, "left", "right") + a), Math.round(l + i) !== r && (l -= tn(n, "top", "bottom") + i)), !Ms(e)) {
|
|
1690
1690
|
var u = Math.round(s + a) - t, c = Math.round(l + i) - r;
|
|
1691
1691
|
Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
|
|
1692
1692
|
}
|
|
1693
|
-
return
|
|
1693
|
+
return jt(o.left, o.top, s, l);
|
|
1694
1694
|
}
|
|
1695
1695
|
var Is = /* @__PURE__ */ function() {
|
|
1696
1696
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
@@ -1703,11 +1703,11 @@ function Ms(e) {
|
|
|
1703
1703
|
return e === We(e).document.documentElement;
|
|
1704
1704
|
}
|
|
1705
1705
|
function ws(e) {
|
|
1706
|
-
return
|
|
1706
|
+
return sr ? Is(e) ? Ps(e) : Ns(e) : jn;
|
|
1707
1707
|
}
|
|
1708
1708
|
function As(e) {
|
|
1709
1709
|
var t = e.x, r = e.y, n = e.width, o = e.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, i = Object.create(a.prototype);
|
|
1710
|
-
return
|
|
1710
|
+
return Vn(i, {
|
|
1711
1711
|
x: t,
|
|
1712
1712
|
y: r,
|
|
1713
1713
|
width: n,
|
|
@@ -1718,14 +1718,14 @@ function As(e) {
|
|
|
1718
1718
|
left: t
|
|
1719
1719
|
}), i;
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function jt(e, t, r, n) {
|
|
1722
1722
|
return { x: e, y: t, width: r, height: n };
|
|
1723
1723
|
}
|
|
1724
1724
|
var Ls = (
|
|
1725
1725
|
/** @class */
|
|
1726
1726
|
function() {
|
|
1727
1727
|
function e(t) {
|
|
1728
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
1728
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = jt(0, 0, 0, 0), this.target = t;
|
|
1729
1729
|
}
|
|
1730
1730
|
return e.prototype.isActive = function() {
|
|
1731
1731
|
var t = ws(this.target);
|
|
@@ -1740,7 +1740,7 @@ var Ls = (
|
|
|
1740
1740
|
/* @__PURE__ */ function() {
|
|
1741
1741
|
function e(t, r) {
|
|
1742
1742
|
var n = As(r);
|
|
1743
|
-
|
|
1743
|
+
Vn(this, { target: t, contentRect: n });
|
|
1744
1744
|
}
|
|
1745
1745
|
return e;
|
|
1746
1746
|
}()
|
|
@@ -1748,7 +1748,7 @@ var Ls = (
|
|
|
1748
1748
|
/** @class */
|
|
1749
1749
|
function() {
|
|
1750
1750
|
function e(t, r, n) {
|
|
1751
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
1751
|
+
if (this.activeObservations_ = [], this.observations_ = new Wn(), typeof t != "function")
|
|
1752
1752
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
1753
1753
|
this.callback_ = t, this.controller_ = r, this.callbackCtx_ = n;
|
|
1754
1754
|
}
|
|
@@ -1790,7 +1790,7 @@ var Ls = (
|
|
|
1790
1790
|
return this.activeObservations_.length > 0;
|
|
1791
1791
|
}, e;
|
|
1792
1792
|
}()
|
|
1793
|
-
),
|
|
1793
|
+
), zn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Wn(), kn = (
|
|
1794
1794
|
/** @class */
|
|
1795
1795
|
/* @__PURE__ */ function() {
|
|
1796
1796
|
function e(t) {
|
|
@@ -1799,7 +1799,7 @@ var Ls = (
|
|
|
1799
1799
|
if (!arguments.length)
|
|
1800
1800
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
1801
1801
|
var r = Os.getInstance(), n = new Ds(t, r, this);
|
|
1802
|
-
|
|
1802
|
+
zn.set(this, n);
|
|
1803
1803
|
}
|
|
1804
1804
|
return e;
|
|
1805
1805
|
}()
|
|
@@ -1811,45 +1811,45 @@ var Ls = (
|
|
|
1811
1811
|
].forEach(function(e) {
|
|
1812
1812
|
kn.prototype[e] = function() {
|
|
1813
1813
|
var t;
|
|
1814
|
-
return (t =
|
|
1814
|
+
return (t = zn.get(this))[e].apply(t, arguments);
|
|
1815
1815
|
};
|
|
1816
1816
|
});
|
|
1817
1817
|
var Hs = function() {
|
|
1818
|
-
return typeof
|
|
1819
|
-
}(),
|
|
1818
|
+
return typeof Ot.ResizeObserver < "u" ? Ot.ResizeObserver : kn;
|
|
1819
|
+
}(), ye = /* @__PURE__ */ new Map();
|
|
1820
1820
|
function Us(e) {
|
|
1821
1821
|
e.forEach(function(t) {
|
|
1822
1822
|
var r, n = t.target;
|
|
1823
|
-
(r =
|
|
1823
|
+
(r = ye.get(n)) === null || r === void 0 || r.forEach(function(o) {
|
|
1824
1824
|
return o(n);
|
|
1825
1825
|
});
|
|
1826
1826
|
});
|
|
1827
1827
|
}
|
|
1828
|
-
var
|
|
1828
|
+
var Qn = new Hs(Us);
|
|
1829
1829
|
function xs(e, t) {
|
|
1830
|
-
|
|
1830
|
+
ye.has(e) || (ye.set(e, /* @__PURE__ */ new Set()), Qn.observe(e)), ye.get(e).add(t);
|
|
1831
1831
|
}
|
|
1832
1832
|
function Bs(e, t) {
|
|
1833
|
-
|
|
1833
|
+
ye.has(e) && (ye.get(e).delete(t), ye.get(e).size || (Qn.unobserve(e), ye.delete(e)));
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function Gn(e, t) {
|
|
1836
1836
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
1837
1837
|
}
|
|
1838
1838
|
function Ws(e, t) {
|
|
1839
1839
|
for (var r = 0; r < t.length; r++) {
|
|
1840
1840
|
var n = t[r];
|
|
1841
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e,
|
|
1841
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, Hn(n.key), n);
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function Yn(e, t, r) {
|
|
1845
1845
|
return t && Ws(e.prototype, t), Object.defineProperty(e, "prototype", {
|
|
1846
1846
|
writable: !1
|
|
1847
1847
|
}), e;
|
|
1848
1848
|
}
|
|
1849
|
-
function
|
|
1850
|
-
return
|
|
1849
|
+
function ar(e, t) {
|
|
1850
|
+
return ar = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
|
|
1851
1851
|
return r.__proto__ = n, r;
|
|
1852
|
-
},
|
|
1852
|
+
}, ar(e, t);
|
|
1853
1853
|
}
|
|
1854
1854
|
function Vs(e, t) {
|
|
1855
1855
|
if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
|
|
@@ -1861,20 +1861,20 @@ function Vs(e, t) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
}), Object.defineProperty(e, "prototype", {
|
|
1863
1863
|
writable: !1
|
|
1864
|
-
}), t &&
|
|
1864
|
+
}), t && ar(e, t);
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1867
|
-
return
|
|
1866
|
+
function Pt(e) {
|
|
1867
|
+
return Pt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1868
1868
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1869
|
-
},
|
|
1869
|
+
}, Pt(e);
|
|
1870
1870
|
}
|
|
1871
|
-
function
|
|
1871
|
+
function Xn() {
|
|
1872
1872
|
try {
|
|
1873
1873
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1874
1874
|
}));
|
|
1875
1875
|
} catch {
|
|
1876
1876
|
}
|
|
1877
|
-
return (
|
|
1877
|
+
return (Xn = function() {
|
|
1878
1878
|
return !!e;
|
|
1879
1879
|
})();
|
|
1880
1880
|
}
|
|
@@ -1882,29 +1882,29 @@ function js(e) {
|
|
|
1882
1882
|
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1883
1883
|
return e;
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function zs(e, t) {
|
|
1886
1886
|
if (t && (se(t) == "object" || typeof t == "function")) return t;
|
|
1887
1887
|
if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1888
1888
|
return js(e);
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1891
|
-
var t =
|
|
1890
|
+
function ks(e) {
|
|
1891
|
+
var t = Xn();
|
|
1892
1892
|
return function() {
|
|
1893
|
-
var r, n =
|
|
1893
|
+
var r, n = Pt(e);
|
|
1894
1894
|
if (t) {
|
|
1895
|
-
var o =
|
|
1895
|
+
var o = Pt(this).constructor;
|
|
1896
1896
|
r = Reflect.construct(n, arguments, o);
|
|
1897
1897
|
} else r = n.apply(this, arguments);
|
|
1898
|
-
return
|
|
1898
|
+
return zs(this, r);
|
|
1899
1899
|
};
|
|
1900
1900
|
}
|
|
1901
1901
|
var Qs = /* @__PURE__ */ function(e) {
|
|
1902
1902
|
Vs(r, e);
|
|
1903
|
-
var t =
|
|
1903
|
+
var t = ks(r);
|
|
1904
1904
|
function r() {
|
|
1905
|
-
return
|
|
1905
|
+
return Gn(this, r), t.apply(this, arguments);
|
|
1906
1906
|
}
|
|
1907
|
-
return
|
|
1907
|
+
return Yn(r, [{
|
|
1908
1908
|
key: "render",
|
|
1909
1909
|
value: function() {
|
|
1910
1910
|
return this.props.children;
|
|
@@ -1912,15 +1912,15 @@ var Qs = /* @__PURE__ */ function(e) {
|
|
|
1912
1912
|
}]), r;
|
|
1913
1913
|
}(d.Component);
|
|
1914
1914
|
function Gs(e, t) {
|
|
1915
|
-
var r = e.children, n = e.disabled, o = d.useRef(null), a = d.useRef(null), i = d.useContext(
|
|
1915
|
+
var r = e.children, n = e.disabled, o = d.useRef(null), a = d.useRef(null), i = d.useContext(or), s = typeof r == "function", l = s ? r(o) : r, u = d.useRef({
|
|
1916
1916
|
width: -1,
|
|
1917
1917
|
height: -1,
|
|
1918
1918
|
offsetWidth: -1,
|
|
1919
1919
|
offsetHeight: -1
|
|
1920
|
-
}), c = !s && /* @__PURE__ */ d.isValidElement(l) && gs(l), h = c ? l.ref : null,
|
|
1920
|
+
}), c = !s && /* @__PURE__ */ d.isValidElement(l) && gs(l), h = c ? l.ref : null, m = _s(h, o), f = function() {
|
|
1921
1921
|
var b;
|
|
1922
|
-
return
|
|
1923
|
-
(o.current && se(o.current) === "object" ?
|
|
1922
|
+
return Et(o.current) || // Support `nativeElement` format
|
|
1923
|
+
(o.current && se(o.current) === "object" ? Et((b = o.current) === null || b === void 0 ? void 0 : b.nativeElement) : null) || Et(a.current);
|
|
1924
1924
|
};
|
|
1925
1925
|
d.useImperativeHandle(t, function() {
|
|
1926
1926
|
return f();
|
|
@@ -1930,19 +1930,19 @@ function Gs(e, t) {
|
|
|
1930
1930
|
var p = d.useCallback(function(_) {
|
|
1931
1931
|
var b = g.current, S = b.onResize, C = b.data, O = _.getBoundingClientRect(), B = O.width, A = O.height, F = _.offsetWidth, L = _.offsetHeight, H = Math.floor(B), W = Math.floor(A);
|
|
1932
1932
|
if (u.current.width !== H || u.current.height !== W || u.current.offsetWidth !== F || u.current.offsetHeight !== L) {
|
|
1933
|
-
var
|
|
1933
|
+
var Y = {
|
|
1934
1934
|
width: H,
|
|
1935
1935
|
height: W,
|
|
1936
1936
|
offsetWidth: F,
|
|
1937
1937
|
offsetHeight: L
|
|
1938
1938
|
};
|
|
1939
|
-
u.current =
|
|
1940
|
-
var
|
|
1941
|
-
offsetWidth:
|
|
1939
|
+
u.current = Y;
|
|
1940
|
+
var z = F === Math.round(B) ? B : F, te = L === Math.round(A) ? A : L, k = G(G({}, Y), {}, {
|
|
1941
|
+
offsetWidth: z,
|
|
1942
1942
|
offsetHeight: te
|
|
1943
1943
|
});
|
|
1944
|
-
i == null || i(
|
|
1945
|
-
S(
|
|
1944
|
+
i == null || i(k, _, C), S && Promise.resolve().then(function() {
|
|
1945
|
+
S(k, _);
|
|
1946
1946
|
});
|
|
1947
1947
|
}
|
|
1948
1948
|
}, []);
|
|
@@ -1954,23 +1954,23 @@ function Gs(e, t) {
|
|
|
1954
1954
|
}, [o.current, n]), /* @__PURE__ */ d.createElement(Qs, {
|
|
1955
1955
|
ref: a
|
|
1956
1956
|
}, c ? /* @__PURE__ */ d.cloneElement(l, {
|
|
1957
|
-
ref:
|
|
1957
|
+
ref: m
|
|
1958
1958
|
}) : l);
|
|
1959
1959
|
}
|
|
1960
1960
|
var Ys = /* @__PURE__ */ d.forwardRef(Gs), Xs = "rc-observer-key";
|
|
1961
1961
|
function Ks(e, t) {
|
|
1962
|
-
var r = e.children, n = typeof r == "function" ? [r] :
|
|
1962
|
+
var r = e.children, n = typeof r == "function" ? [r] : ir(r);
|
|
1963
1963
|
return n.map(function(o, a) {
|
|
1964
1964
|
var i = (o == null ? void 0 : o.key) || "".concat(Xs, "-").concat(a);
|
|
1965
|
-
return /* @__PURE__ */ d.createElement(Ys,
|
|
1965
|
+
return /* @__PURE__ */ d.createElement(Ys, nt({}, e, {
|
|
1966
1966
|
key: i,
|
|
1967
1967
|
ref: a === 0 ? t : void 0
|
|
1968
1968
|
}), o);
|
|
1969
1969
|
});
|
|
1970
1970
|
}
|
|
1971
|
-
var
|
|
1972
|
-
|
|
1973
|
-
function
|
|
1971
|
+
var Tr = /* @__PURE__ */ d.forwardRef(Ks);
|
|
1972
|
+
Tr.Collection = Ss;
|
|
1973
|
+
function rn(e) {
|
|
1974
1974
|
var t = d.useRef();
|
|
1975
1975
|
t.current = e;
|
|
1976
1976
|
var r = d.useCallback(function() {
|
|
@@ -1983,17 +1983,17 @@ function tn(e) {
|
|
|
1983
1983
|
function qs() {
|
|
1984
1984
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
1985
1985
|
}
|
|
1986
|
-
var
|
|
1986
|
+
var nn = qs() ? d.useLayoutEffect : d.useEffect, et = function(t, r) {
|
|
1987
1987
|
var n = d.useRef(!0);
|
|
1988
|
-
|
|
1988
|
+
nn(function() {
|
|
1989
1989
|
return t(n.current);
|
|
1990
|
-
}, r),
|
|
1990
|
+
}, r), nn(function() {
|
|
1991
1991
|
return n.current = !1, function() {
|
|
1992
1992
|
n.current = !0;
|
|
1993
1993
|
};
|
|
1994
1994
|
}, []);
|
|
1995
|
-
},
|
|
1996
|
-
var r = e.height, n = e.offsetY, o = e.offsetX, a = e.children, i = e.prefixCls, s = e.onInnerResize, l = e.innerProps, u = e.rtl, c = e.extra, h = {},
|
|
1995
|
+
}, Kn = /* @__PURE__ */ d.forwardRef(function(e, t) {
|
|
1996
|
+
var r = e.height, n = e.offsetY, o = e.offsetX, a = e.children, i = e.prefixCls, s = e.onInnerResize, l = e.innerProps, u = e.rtl, c = e.extra, h = {}, m = {
|
|
1997
1997
|
display: "flex",
|
|
1998
1998
|
flexDirection: "column"
|
|
1999
1999
|
};
|
|
@@ -2001,22 +2001,22 @@ var rn = qs() ? d.useLayoutEffect : d.useEffect, Je = function(t, r) {
|
|
|
2001
2001
|
height: r,
|
|
2002
2002
|
position: "relative",
|
|
2003
2003
|
overflow: "hidden"
|
|
2004
|
-
},
|
|
2004
|
+
}, m = G(G({}, m), {}, q(q(q(q(q({
|
|
2005
2005
|
transform: "translateY(".concat(n, "px)")
|
|
2006
2006
|
}, u ? "marginRight" : "marginLeft", -o), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ d.createElement("div", {
|
|
2007
2007
|
style: h
|
|
2008
|
-
}, /* @__PURE__ */ d.createElement(
|
|
2008
|
+
}, /* @__PURE__ */ d.createElement(Tr, {
|
|
2009
2009
|
onResize: function(g) {
|
|
2010
2010
|
var p = g.offsetHeight;
|
|
2011
2011
|
p && s && s();
|
|
2012
2012
|
}
|
|
2013
|
-
}, /* @__PURE__ */ d.createElement("div",
|
|
2014
|
-
style:
|
|
2015
|
-
className:
|
|
2013
|
+
}, /* @__PURE__ */ d.createElement("div", nt({
|
|
2014
|
+
style: m,
|
|
2015
|
+
className: Ft(q({}, "".concat(i, "-holder-inner"), i)),
|
|
2016
2016
|
ref: t
|
|
2017
2017
|
}, l), a, c)));
|
|
2018
2018
|
});
|
|
2019
|
-
|
|
2019
|
+
Kn.displayName = "Filler";
|
|
2020
2020
|
function Zs(e) {
|
|
2021
2021
|
var t = e.children, r = e.setRef, n = d.useCallback(function(o) {
|
|
2022
2022
|
r(o);
|
|
@@ -2028,7 +2028,7 @@ function Zs(e) {
|
|
|
2028
2028
|
function Js(e, t, r, n, o, a, i, s) {
|
|
2029
2029
|
var l = s.getKey;
|
|
2030
2030
|
return e.slice(t, r + 1).map(function(u, c) {
|
|
2031
|
-
var h = t + c,
|
|
2031
|
+
var h = t + c, m = i(u, h, {
|
|
2032
2032
|
style: {
|
|
2033
2033
|
width: n
|
|
2034
2034
|
},
|
|
@@ -2039,7 +2039,7 @@ function Js(e, t, r, n, o, a, i, s) {
|
|
|
2039
2039
|
setRef: function(p) {
|
|
2040
2040
|
return a(u, p);
|
|
2041
2041
|
}
|
|
2042
|
-
},
|
|
2042
|
+
}, m);
|
|
2043
2043
|
});
|
|
2044
2044
|
}
|
|
2045
2045
|
function ea(e, t, r) {
|
|
@@ -2054,9 +2054,9 @@ function ea(e, t, r) {
|
|
|
2054
2054
|
return g !== void 0 ? r(g) : s;
|
|
2055
2055
|
}
|
|
2056
2056
|
for (var u = null, c = Math.abs(n - o) !== 1, h = 0; h < i.length; h += 1) {
|
|
2057
|
-
var
|
|
2058
|
-
if (
|
|
2059
|
-
u = h, c = c ||
|
|
2057
|
+
var m = l(a[h]), f = l(i[h]);
|
|
2058
|
+
if (m !== f) {
|
|
2059
|
+
u = h, c = c || m !== l(i[h + 1]);
|
|
2060
2060
|
break;
|
|
2061
2061
|
}
|
|
2062
2062
|
}
|
|
@@ -2072,42 +2072,42 @@ function ta(e, t, r) {
|
|
|
2072
2072
|
(h == null ? void 0 : h.index) !== void 0 && c(e[h.index]), i(e);
|
|
2073
2073
|
}, [e]), [u];
|
|
2074
2074
|
}
|
|
2075
|
-
var
|
|
2075
|
+
var qn = function(t) {
|
|
2076
2076
|
return +setTimeout(t, 16);
|
|
2077
|
-
},
|
|
2077
|
+
}, Zn = function(t) {
|
|
2078
2078
|
return clearTimeout(t);
|
|
2079
2079
|
};
|
|
2080
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
2080
|
+
typeof window < "u" && "requestAnimationFrame" in window && (qn = function(t) {
|
|
2081
2081
|
return window.requestAnimationFrame(t);
|
|
2082
|
-
},
|
|
2082
|
+
}, Zn = function(t) {
|
|
2083
2083
|
return window.cancelAnimationFrame(t);
|
|
2084
2084
|
});
|
|
2085
|
-
var
|
|
2086
|
-
function
|
|
2087
|
-
|
|
2085
|
+
var on = 0, Fr = /* @__PURE__ */ new Map();
|
|
2086
|
+
function Jn(e) {
|
|
2087
|
+
Fr.delete(e);
|
|
2088
2088
|
}
|
|
2089
2089
|
var he = function(t) {
|
|
2090
2090
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
2091
|
-
|
|
2092
|
-
var n =
|
|
2091
|
+
on += 1;
|
|
2092
|
+
var n = on;
|
|
2093
2093
|
function o(a) {
|
|
2094
2094
|
if (a === 0)
|
|
2095
|
-
|
|
2095
|
+
Jn(n), t();
|
|
2096
2096
|
else {
|
|
2097
|
-
var i =
|
|
2097
|
+
var i = qn(function() {
|
|
2098
2098
|
o(a - 1);
|
|
2099
2099
|
});
|
|
2100
|
-
|
|
2100
|
+
Fr.set(n, i);
|
|
2101
2101
|
}
|
|
2102
2102
|
}
|
|
2103
2103
|
return o(r), n;
|
|
2104
2104
|
};
|
|
2105
2105
|
he.cancel = function(e) {
|
|
2106
|
-
var t =
|
|
2107
|
-
return
|
|
2106
|
+
var t = Fr.get(e);
|
|
2107
|
+
return Jn(e), Zn(t);
|
|
2108
2108
|
};
|
|
2109
|
-
var
|
|
2110
|
-
const
|
|
2109
|
+
var sn = (typeof navigator > "u" ? "undefined" : se(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
|
|
2110
|
+
const ei = function(e, t, r, n) {
|
|
2111
2111
|
var o = w(!1), a = w(null);
|
|
2112
2112
|
function i() {
|
|
2113
2113
|
clearTimeout(a.current), o.current = !0, a.current = setTimeout(function() {
|
|
@@ -2131,15 +2131,15 @@ const Jn = function(e, t, r, n) {
|
|
|
2131
2131
|
};
|
|
2132
2132
|
};
|
|
2133
2133
|
function ra(e, t, r, n, o, a, i) {
|
|
2134
|
-
var s = w(0), l = w(null), u = w(null), c = w(!1), h =
|
|
2135
|
-
function
|
|
2136
|
-
he.cancel(l.current), s.current += C, u.current = C, !h(!1, C) && (
|
|
2134
|
+
var s = w(0), l = w(null), u = w(null), c = w(!1), h = ei(t, r, n, o);
|
|
2135
|
+
function m(S, C) {
|
|
2136
|
+
he.cancel(l.current), s.current += C, u.current = C, !h(!1, C) && (sn || S.preventDefault(), l.current = he(function() {
|
|
2137
2137
|
var O = c.current ? 10 : 1;
|
|
2138
2138
|
i(s.current * O), s.current = 0;
|
|
2139
2139
|
}));
|
|
2140
2140
|
}
|
|
2141
2141
|
function f(S, C) {
|
|
2142
|
-
i(C, !0),
|
|
2142
|
+
i(C, !0), sn || S.preventDefault();
|
|
2143
2143
|
}
|
|
2144
2144
|
var g = w(null), p = w(null);
|
|
2145
2145
|
function _(S) {
|
|
@@ -2150,7 +2150,7 @@ function ra(e, t, r, n, o, a, i) {
|
|
|
2150
2150
|
var C = S.deltaX, O = S.deltaY, B = S.shiftKey, A = C, F = O;
|
|
2151
2151
|
(g.current === "sx" || !g.current && B && O && !C) && (A = O, F = 0, g.current = "sx");
|
|
2152
2152
|
var L = Math.abs(A), H = Math.abs(F);
|
|
2153
|
-
g.current === null && (g.current = a && L > H ? "x" : "y"), g.current === "y" ?
|
|
2153
|
+
g.current === null && (g.current = a && L > H ? "x" : "y"), g.current === "y" ? m(S, F) : f(S, A);
|
|
2154
2154
|
}
|
|
2155
2155
|
}
|
|
2156
2156
|
function b(S) {
|
|
@@ -2162,17 +2162,17 @@ function na(e, t, r, n) {
|
|
|
2162
2162
|
var o = d.useMemo(function() {
|
|
2163
2163
|
return [/* @__PURE__ */ new Map(), []];
|
|
2164
2164
|
}, [e, r.id, n]), a = Q(o, 2), i = a[0], s = a[1], l = function(c) {
|
|
2165
|
-
var h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : c,
|
|
2166
|
-
if (
|
|
2165
|
+
var h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : c, m = i.get(c), f = i.get(h);
|
|
2166
|
+
if (m === void 0 || f === void 0)
|
|
2167
2167
|
for (var g = e.length, p = s.length; p < g; p += 1) {
|
|
2168
2168
|
var _, b = e[p], S = t(b);
|
|
2169
2169
|
i.set(S, p);
|
|
2170
2170
|
var C = (_ = r.get(S)) !== null && _ !== void 0 ? _ : n;
|
|
2171
|
-
if (s[p] = (s[p - 1] || 0) + C, S === c && (
|
|
2171
|
+
if (s[p] = (s[p - 1] || 0) + C, S === c && (m = p), S === h && (f = p), m !== void 0 && f !== void 0)
|
|
2172
2172
|
break;
|
|
2173
2173
|
}
|
|
2174
2174
|
return {
|
|
2175
|
-
top: s[
|
|
2175
|
+
top: s[m - 1] || 0,
|
|
2176
2176
|
bottom: s[f]
|
|
2177
2177
|
};
|
|
2178
2178
|
};
|
|
@@ -2180,9 +2180,9 @@ function na(e, t, r, n) {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
var ia = /* @__PURE__ */ function() {
|
|
2182
2182
|
function e() {
|
|
2183
|
-
|
|
2183
|
+
Gn(this, e), q(this, "maps", void 0), q(this, "id", 0), this.maps = /* @__PURE__ */ Object.create(null);
|
|
2184
2184
|
}
|
|
2185
|
-
return
|
|
2185
|
+
return Yn(e, [{
|
|
2186
2186
|
key: "set",
|
|
2187
2187
|
value: function(r, n) {
|
|
2188
2188
|
this.maps[r] = n, this.id += 1;
|
|
@@ -2205,7 +2205,7 @@ function oa(e, t, r) {
|
|
|
2205
2205
|
var g = function() {
|
|
2206
2206
|
s.current.forEach(function(_, b) {
|
|
2207
2207
|
if (_ && _.offsetParent) {
|
|
2208
|
-
var S =
|
|
2208
|
+
var S = Et(_), C = S.offsetHeight;
|
|
2209
2209
|
l.current.get(b) !== C && l.current.set(b, S.offsetHeight);
|
|
2210
2210
|
}
|
|
2211
2211
|
}), i(function(_) {
|
|
@@ -2214,21 +2214,21 @@ function oa(e, t, r) {
|
|
|
2214
2214
|
};
|
|
2215
2215
|
f ? g() : u.current = he(g);
|
|
2216
2216
|
}
|
|
2217
|
-
function
|
|
2217
|
+
function m(f, g) {
|
|
2218
2218
|
var p = e(f);
|
|
2219
2219
|
s.current.get(p), g ? (s.current.set(p, g), h()) : s.current.delete(p);
|
|
2220
2220
|
}
|
|
2221
2221
|
return po(function() {
|
|
2222
2222
|
return c;
|
|
2223
|
-
}, []), [
|
|
2223
|
+
}, []), [m, h, l.current, a];
|
|
2224
2224
|
}
|
|
2225
|
-
var
|
|
2225
|
+
var an = 14 / 15;
|
|
2226
2226
|
function sa(e, t, r) {
|
|
2227
2227
|
var n = w(!1), o = w(0), a = w(0), i = w(null), s = w(null), l, u = function(f) {
|
|
2228
2228
|
if (n.current) {
|
|
2229
2229
|
var g = Math.ceil(f.touches[0].pageX), p = Math.ceil(f.touches[0].pageY), _ = o.current - g, b = a.current - p, S = Math.abs(_) > Math.abs(b);
|
|
2230
2230
|
S ? o.current = g : a.current = p, r(S, S ? _ : b) && f.preventDefault(), clearInterval(s.current), s.current = setInterval(function() {
|
|
2231
|
-
S ? _ *=
|
|
2231
|
+
S ? _ *= an : b *= an;
|
|
2232
2232
|
var C = Math.floor(S ? _ : b);
|
|
2233
2233
|
(!r(S, C, !0) || Math.abs(C) <= 0.1) && clearInterval(s.current);
|
|
2234
2234
|
}, 16);
|
|
@@ -2236,25 +2236,31 @@ function sa(e, t, r) {
|
|
|
2236
2236
|
}, c = function() {
|
|
2237
2237
|
n.current = !1, l();
|
|
2238
2238
|
}, h = function(f) {
|
|
2239
|
-
l(), f.touches.length === 1 && !n.current && (n.current = !0, o.current = Math.ceil(f.touches[0].pageX), a.current = Math.ceil(f.touches[0].pageY), i.current = f.target, i.current.addEventListener("touchmove", u
|
|
2239
|
+
l(), f.touches.length === 1 && !n.current && (n.current = !0, o.current = Math.ceil(f.touches[0].pageX), a.current = Math.ceil(f.touches[0].pageY), i.current = f.target, i.current.addEventListener("touchmove", u, {
|
|
2240
|
+
passive: !1
|
|
2241
|
+
}), i.current.addEventListener("touchend", c, {
|
|
2242
|
+
passive: !0
|
|
2243
|
+
}));
|
|
2240
2244
|
};
|
|
2241
2245
|
l = function() {
|
|
2242
2246
|
i.current && (i.current.removeEventListener("touchmove", u), i.current.removeEventListener("touchend", c));
|
|
2243
|
-
},
|
|
2244
|
-
return e && t.current.addEventListener("touchstart", h
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
+
}, et(function() {
|
|
2248
|
+
return e && t.current.addEventListener("touchstart", h, {
|
|
2249
|
+
passive: !0
|
|
2250
|
+
}), function() {
|
|
2251
|
+
var m;
|
|
2252
|
+
(m = t.current) === null || m === void 0 || m.removeEventListener("touchstart", h), l(), clearInterval(s.current);
|
|
2247
2253
|
};
|
|
2248
2254
|
}, [e]);
|
|
2249
2255
|
}
|
|
2250
2256
|
var aa = 10;
|
|
2251
2257
|
function la(e, t, r, n, o, a, i, s) {
|
|
2252
|
-
var l = d.useRef(), u = d.useState(null), c = Q(u, 2), h = c[0],
|
|
2253
|
-
return
|
|
2258
|
+
var l = d.useRef(), u = d.useState(null), c = Q(u, 2), h = c[0], m = c[1];
|
|
2259
|
+
return et(function() {
|
|
2254
2260
|
if (h && h.times < aa) {
|
|
2255
2261
|
if (!e.current) {
|
|
2256
|
-
|
|
2257
|
-
return G({},
|
|
2262
|
+
m(function(X) {
|
|
2263
|
+
return G({}, X);
|
|
2258
2264
|
});
|
|
2259
2265
|
return;
|
|
2260
2266
|
}
|
|
@@ -2262,13 +2268,13 @@ function la(e, t, r, n, o, a, i, s) {
|
|
|
2262
2268
|
var f = h.targetAlign, g = h.originAlign, p = h.index, _ = h.offset, b = e.current.clientHeight, S = !1, C = f, O = null;
|
|
2263
2269
|
if (b) {
|
|
2264
2270
|
for (var B = f || g, A = 0, F = 0, L = 0, H = Math.min(t.length - 1, p), W = 0; W <= H; W += 1) {
|
|
2265
|
-
var
|
|
2271
|
+
var Y = o(t[W]);
|
|
2266
2272
|
F = A;
|
|
2267
|
-
var
|
|
2268
|
-
L = F + (
|
|
2273
|
+
var z = r.get(Y);
|
|
2274
|
+
L = F + (z === void 0 ? n : z), A = L;
|
|
2269
2275
|
}
|
|
2270
|
-
for (var te = B === "top" ? _ : b - _,
|
|
2271
|
-
var
|
|
2276
|
+
for (var te = B === "top" ? _ : b - _, k = H; k >= 0; k -= 1) {
|
|
2277
|
+
var Ne = o(t[k]), Z = r.get(Ne);
|
|
2272
2278
|
if (Z === void 0) {
|
|
2273
2279
|
S = !0;
|
|
2274
2280
|
break;
|
|
@@ -2284,13 +2290,13 @@ function la(e, t, r, n, o, a, i, s) {
|
|
|
2284
2290
|
O = L - b + _;
|
|
2285
2291
|
break;
|
|
2286
2292
|
default: {
|
|
2287
|
-
var
|
|
2288
|
-
F <
|
|
2293
|
+
var ge = e.current.scrollTop, ue = ge + b;
|
|
2294
|
+
F < ge ? C = "top" : L > ue && (C = "bottom");
|
|
2289
2295
|
}
|
|
2290
2296
|
}
|
|
2291
2297
|
O !== null && i(O), O !== h.lastTop && (S = !0);
|
|
2292
2298
|
}
|
|
2293
|
-
S &&
|
|
2299
|
+
S && m(G(G({}, h), {}, {
|
|
2294
2300
|
times: h.times + 1,
|
|
2295
2301
|
targetAlign: C,
|
|
2296
2302
|
lastTop: O
|
|
@@ -2309,7 +2315,7 @@ function la(e, t, r, n, o, a, i, s) {
|
|
|
2309
2315
|
return o(S) === f.key;
|
|
2310
2316
|
});
|
|
2311
2317
|
var _ = f.offset, b = _ === void 0 ? 0 : _;
|
|
2312
|
-
|
|
2318
|
+
m({
|
|
2313
2319
|
times: 0,
|
|
2314
2320
|
index: g,
|
|
2315
2321
|
offset: b,
|
|
@@ -2318,77 +2324,93 @@ function la(e, t, r, n, o, a, i, s) {
|
|
|
2318
2324
|
}
|
|
2319
2325
|
};
|
|
2320
2326
|
}
|
|
2321
|
-
function
|
|
2327
|
+
function ln(e, t) {
|
|
2322
2328
|
var r = "touches" in e ? e.touches[0] : e;
|
|
2323
2329
|
return r[t ? "pageX" : "pageY"];
|
|
2324
2330
|
}
|
|
2325
|
-
var
|
|
2326
|
-
var r = e.prefixCls, n = e.rtl, o = e.scrollOffset, a = e.scrollRange, i = e.onStartMove, s = e.onStopMove, l = e.onScroll, u = e.horizontal, c = e.spinSize, h = e.containerSize,
|
|
2327
|
-
clearTimeout(
|
|
2331
|
+
var un = /* @__PURE__ */ d.forwardRef(function(e, t) {
|
|
2332
|
+
var r = e.prefixCls, n = e.rtl, o = e.scrollOffset, a = e.scrollRange, i = e.onStartMove, s = e.onStopMove, l = e.onScroll, u = e.horizontal, c = e.spinSize, h = e.containerSize, m = e.style, f = e.thumbStyle, g = d.useState(!1), p = Q(g, 2), _ = p[0], b = p[1], S = d.useState(null), C = Q(S, 2), O = C[0], B = C[1], A = d.useState(null), F = Q(A, 2), L = F[0], H = F[1], W = !n, Y = d.useRef(), z = d.useRef(), te = d.useState(!1), k = Q(te, 2), Ne = k[0], Z = k[1], ge = d.useRef(), ue = function() {
|
|
2333
|
+
clearTimeout(ge.current), Z(!0), ge.current = setTimeout(function() {
|
|
2328
2334
|
Z(!1);
|
|
2329
2335
|
}, 3e3);
|
|
2330
|
-
},
|
|
2331
|
-
if (o === 0 ||
|
|
2336
|
+
}, X = a - h || 0, je = h - c || 0, U = d.useMemo(function() {
|
|
2337
|
+
if (o === 0 || X === 0)
|
|
2332
2338
|
return 0;
|
|
2333
|
-
var J = o /
|
|
2339
|
+
var J = o / X;
|
|
2334
2340
|
return J * je;
|
|
2335
|
-
}, [o,
|
|
2341
|
+
}, [o, X, je]), Oe = function($) {
|
|
2336
2342
|
$.stopPropagation(), $.preventDefault();
|
|
2337
|
-
},
|
|
2343
|
+
}, Ie = d.useRef({
|
|
2338
2344
|
top: U,
|
|
2339
2345
|
dragging: _,
|
|
2340
2346
|
pageY: O,
|
|
2341
2347
|
startTop: L
|
|
2342
2348
|
});
|
|
2343
|
-
|
|
2349
|
+
Ie.current = {
|
|
2344
2350
|
top: U,
|
|
2345
2351
|
dragging: _,
|
|
2346
2352
|
pageY: O,
|
|
2347
2353
|
startTop: L
|
|
2348
2354
|
};
|
|
2349
|
-
var
|
|
2350
|
-
b(!0), B(
|
|
2355
|
+
var Me = function($) {
|
|
2356
|
+
b(!0), B(ln($, u)), H(Ie.current.top), i(), $.stopPropagation(), $.preventDefault();
|
|
2351
2357
|
};
|
|
2352
2358
|
d.useEffect(function() {
|
|
2353
|
-
var J = function(
|
|
2354
|
-
|
|
2355
|
-
}, $ =
|
|
2356
|
-
return $.addEventListener("touchstart", J
|
|
2357
|
-
|
|
2359
|
+
var J = function(we) {
|
|
2360
|
+
we.preventDefault();
|
|
2361
|
+
}, $ = Y.current, ne = z.current;
|
|
2362
|
+
return $.addEventListener("touchstart", J, {
|
|
2363
|
+
passive: !1
|
|
2364
|
+
}), ne.addEventListener("touchstart", Me, {
|
|
2365
|
+
passive: !1
|
|
2366
|
+
}), function() {
|
|
2367
|
+
$.removeEventListener("touchstart", J), ne.removeEventListener("touchstart", Me);
|
|
2358
2368
|
};
|
|
2359
2369
|
}, []);
|
|
2360
|
-
var
|
|
2361
|
-
|
|
2362
|
-
var
|
|
2363
|
-
|
|
2370
|
+
var at = d.useRef();
|
|
2371
|
+
at.current = X;
|
|
2372
|
+
var ze = d.useRef();
|
|
2373
|
+
ze.current = je, d.useEffect(function() {
|
|
2364
2374
|
if (_) {
|
|
2365
|
-
var J, $ = function(
|
|
2366
|
-
var
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
var Qe =
|
|
2371
|
-
|
|
2372
|
-
|
|
2375
|
+
var J, $ = function(we) {
|
|
2376
|
+
var ke = Ie.current, ut = ke.dragging, ct = ke.pageY, ft = ke.startTop;
|
|
2377
|
+
he.cancel(J);
|
|
2378
|
+
var ht = Y.current.getBoundingClientRect(), Ae = h / (u ? ht.width : ht.height);
|
|
2379
|
+
if (ut) {
|
|
2380
|
+
var Qe = (ln(we, u) - ct) * Ae, Ge = ft;
|
|
2381
|
+
!W && u ? Ge -= Qe : Ge += Qe;
|
|
2382
|
+
var dt = at.current, vt = ze.current, zt = vt ? Ge / vt : 0, ve = Math.ceil(zt * dt);
|
|
2383
|
+
ve = Math.max(ve, 0), ve = Math.min(ve, dt), J = he(function() {
|
|
2384
|
+
l(ve, u);
|
|
2373
2385
|
});
|
|
2374
2386
|
}
|
|
2375
2387
|
}, ne = function() {
|
|
2376
2388
|
b(!1), s();
|
|
2377
2389
|
};
|
|
2378
|
-
return window.addEventListener("mousemove",
|
|
2390
|
+
return window.addEventListener("mousemove", $, {
|
|
2391
|
+
passive: !0
|
|
2392
|
+
}), window.addEventListener("touchmove", $, {
|
|
2393
|
+
passive: !0
|
|
2394
|
+
}), window.addEventListener("mouseup", ne, {
|
|
2395
|
+
passive: !0
|
|
2396
|
+
}), window.addEventListener("touchend", ne, {
|
|
2397
|
+
passive: !0
|
|
2398
|
+
}), function() {
|
|
2379
2399
|
window.removeEventListener("mousemove", $), window.removeEventListener("touchmove", $), window.removeEventListener("mouseup", ne), window.removeEventListener("touchend", ne), he.cancel(J);
|
|
2380
2400
|
};
|
|
2381
2401
|
}
|
|
2382
2402
|
}, [_]), d.useEffect(function() {
|
|
2383
|
-
ue()
|
|
2403
|
+
return ue(), function() {
|
|
2404
|
+
clearTimeout(ge.current);
|
|
2405
|
+
};
|
|
2384
2406
|
}, [o]), d.useImperativeHandle(t, function() {
|
|
2385
2407
|
return {
|
|
2386
2408
|
delayHidden: ue
|
|
2387
2409
|
};
|
|
2388
2410
|
});
|
|
2389
|
-
var
|
|
2411
|
+
var K = "".concat(r, "-scrollbar"), re = {
|
|
2390
2412
|
position: "absolute",
|
|
2391
|
-
visibility:
|
|
2413
|
+
visibility: Ne ? null : "hidden"
|
|
2392
2414
|
}, de = {
|
|
2393
2415
|
position: "absolute",
|
|
2394
2416
|
background: "rgba(0, 0, 0, 0.5)",
|
|
@@ -2397,19 +2419,19 @@ var ln = /* @__PURE__ */ d.forwardRef(function(e, t) {
|
|
|
2397
2419
|
userSelect: "none"
|
|
2398
2420
|
};
|
|
2399
2421
|
return u ? (re.height = 8, re.left = 0, re.right = 0, re.bottom = 0, de.height = "100%", de.width = c, W ? de.left = U : de.right = U) : (re.width = 8, re.top = 0, re.bottom = 0, W ? re.right = 0 : re.left = 0, de.width = "100%", de.height = c, de.top = U), /* @__PURE__ */ d.createElement("div", {
|
|
2400
|
-
ref:
|
|
2401
|
-
className:
|
|
2402
|
-
style: G(G({}, re),
|
|
2422
|
+
ref: Y,
|
|
2423
|
+
className: Ft(K, q(q(q({}, "".concat(K, "-horizontal"), u), "".concat(K, "-vertical"), !u), "".concat(K, "-visible"), Ne)),
|
|
2424
|
+
style: G(G({}, re), m),
|
|
2403
2425
|
onMouseDown: Oe,
|
|
2404
2426
|
onMouseMove: ue
|
|
2405
2427
|
}, /* @__PURE__ */ d.createElement("div", {
|
|
2406
|
-
ref:
|
|
2407
|
-
className:
|
|
2428
|
+
ref: z,
|
|
2429
|
+
className: Ft("".concat(K, "-thumb"), q({}, "".concat(K, "-thumb-moving"), _)),
|
|
2408
2430
|
style: G(G({}, de), f),
|
|
2409
|
-
onMouseDown:
|
|
2431
|
+
onMouseDown: Me
|
|
2410
2432
|
}));
|
|
2411
2433
|
}), ua = 20;
|
|
2412
|
-
function
|
|
2434
|
+
function cn() {
|
|
2413
2435
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = e / t * e;
|
|
2414
2436
|
return isNaN(r) && (r = 0), r = Math.max(r, ua), Math.floor(r);
|
|
2415
2437
|
}
|
|
@@ -2418,20 +2440,20 @@ var ca = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style
|
|
|
2418
2440
|
overflowAnchor: "none"
|
|
2419
2441
|
};
|
|
2420
2442
|
function da(e, t) {
|
|
2421
|
-
var r = e.prefixCls, n = r === void 0 ? "rc-virtual-list" : r, o = e.className, a = e.height, i = e.itemHeight, s = e.fullHeight, l = s === void 0 ? !0 : s, u = e.style, c = e.data, h = e.children,
|
|
2422
|
-
return typeof
|
|
2423
|
-
}, [
|
|
2424
|
-
return Object.values(
|
|
2443
|
+
var r = e.prefixCls, n = r === void 0 ? "rc-virtual-list" : r, o = e.className, a = e.height, i = e.itemHeight, s = e.fullHeight, l = s === void 0 ? !0 : s, u = e.style, c = e.data, h = e.children, m = e.itemKey, f = e.virtual, g = e.direction, p = e.scrollWidth, _ = e.component, b = _ === void 0 ? "div" : _, S = e.onScroll, C = e.onVirtualScroll, O = e.onVisibleChange, B = e.innerProps, A = e.extraRender, F = e.styles, L = ls(e, ca), H = d.useCallback(function(y) {
|
|
2444
|
+
return typeof m == "function" ? m(y) : y == null ? void 0 : y[m];
|
|
2445
|
+
}, [m]), W = oa(H), Y = Q(W, 4), z = Y[0], te = Y[1], k = Y[2], Ne = Y[3], Z = !!(f !== !1 && a && i), ge = d.useMemo(function() {
|
|
2446
|
+
return Object.values(k.maps).reduce(function(y, E) {
|
|
2425
2447
|
return y + E;
|
|
2426
2448
|
}, 0);
|
|
2427
|
-
}, [
|
|
2428
|
-
|
|
2429
|
-
},
|
|
2430
|
-
|
|
2431
|
-
},
|
|
2449
|
+
}, [k.id, k.maps]), ue = Z && c && (Math.max(i * c.length, ge) > a || !!p), X = g === "rtl", je = Ft(n, q({}, "".concat(n, "-rtl"), X), o), U = c || fa, Oe = w(), Ie = w(), Me = w(), at = Zt(0), ze = Q(at, 2), K = ze[0], re = ze[1], de = Zt(0), J = Q(de, 2), $ = J[0], ne = J[1], lt = Zt(!1), we = Q(lt, 2), ke = we[0], ut = we[1], ct = function() {
|
|
2450
|
+
ut(!0);
|
|
2451
|
+
}, ft = function() {
|
|
2452
|
+
ut(!1);
|
|
2453
|
+
}, ht = {
|
|
2432
2454
|
getKey: H
|
|
2433
2455
|
};
|
|
2434
|
-
function
|
|
2456
|
+
function Ae(y) {
|
|
2435
2457
|
re(function(E) {
|
|
2436
2458
|
var I;
|
|
2437
2459
|
typeof y == "function" ? I = y(E) : I = y;
|
|
@@ -2442,9 +2464,9 @@ function da(e, t) {
|
|
|
2442
2464
|
var Qe = w({
|
|
2443
2465
|
start: 0,
|
|
2444
2466
|
end: U.length
|
|
2445
|
-
}),
|
|
2446
|
-
|
|
2447
|
-
var
|
|
2467
|
+
}), Ge = w(), dt = ta(U, H), vt = Q(dt, 1), zt = vt[0];
|
|
2468
|
+
Ge.current = zt;
|
|
2469
|
+
var ve = d.useMemo(function() {
|
|
2448
2470
|
if (!Z)
|
|
2449
2471
|
return {
|
|
2450
2472
|
scrollHeight: void 0,
|
|
@@ -2455,181 +2477,187 @@ function da(e, t) {
|
|
|
2455
2477
|
if (!ue) {
|
|
2456
2478
|
var y;
|
|
2457
2479
|
return {
|
|
2458
|
-
scrollHeight: ((y =
|
|
2480
|
+
scrollHeight: ((y = Ie.current) === null || y === void 0 ? void 0 : y.offsetHeight) || 0,
|
|
2459
2481
|
start: 0,
|
|
2460
2482
|
end: U.length - 1,
|
|
2461
2483
|
offset: void 0
|
|
2462
2484
|
};
|
|
2463
2485
|
}
|
|
2464
|
-
for (var E = 0, I, V,
|
|
2465
|
-
var bi = U[
|
|
2466
|
-
|
|
2486
|
+
for (var E = 0, I, V, Se, Ei = U.length, qe = 0; qe < Ei; qe += 1) {
|
|
2487
|
+
var bi = U[qe], yi = H(bi), Br = k.get(yi), qt = E + (Br === void 0 ? i : Br);
|
|
2488
|
+
qt >= K && I === void 0 && (I = qe, V = E), qt > K + a && Se === void 0 && (Se = qe), E = qt;
|
|
2467
2489
|
}
|
|
2468
|
-
return I === void 0 && (I = 0, V = 0,
|
|
2490
|
+
return I === void 0 && (I = 0, V = 0, Se = Math.ceil(a / i)), Se === void 0 && (Se = U.length - 1), Se = Math.min(Se + 1, U.length - 1), {
|
|
2469
2491
|
scrollHeight: E,
|
|
2470
2492
|
start: I,
|
|
2471
|
-
end:
|
|
2493
|
+
end: Se,
|
|
2472
2494
|
offset: V
|
|
2473
2495
|
};
|
|
2474
|
-
}, [ue, Z,
|
|
2475
|
-
Qe.current.start =
|
|
2496
|
+
}, [ue, Z, K, U, Ne, a]), Le = ve.scrollHeight, Ye = ve.start, Xe = ve.end, Or = ve.offset;
|
|
2497
|
+
Qe.current.start = Ye, Qe.current.end = Xe;
|
|
2476
2498
|
var ai = d.useState({
|
|
2477
2499
|
width: 0,
|
|
2478
2500
|
height: a
|
|
2479
|
-
}),
|
|
2501
|
+
}), Cr = Q(ai, 2), me = Cr[0], li = Cr[1], ui = function(E) {
|
|
2480
2502
|
li({
|
|
2481
|
-
width: E.
|
|
2482
|
-
height: E.
|
|
2503
|
+
width: E.offsetWidth,
|
|
2504
|
+
height: E.offsetHeight
|
|
2483
2505
|
});
|
|
2484
|
-
},
|
|
2485
|
-
return
|
|
2506
|
+
}, Pr = w(), Nr = w(), ci = d.useMemo(function() {
|
|
2507
|
+
return cn(me.width, p);
|
|
2486
2508
|
}, [me.width, p]), fi = d.useMemo(function() {
|
|
2487
|
-
return
|
|
2488
|
-
}, [me.height, Le]), kt = Le - a,
|
|
2489
|
-
|
|
2509
|
+
return cn(me.height, Le);
|
|
2510
|
+
}, [me.height, Le]), kt = Le - a, Qt = w(kt);
|
|
2511
|
+
Qt.current = kt;
|
|
2490
2512
|
function hi(y) {
|
|
2491
2513
|
var E = y;
|
|
2492
|
-
return Number.isNaN(
|
|
2514
|
+
return Number.isNaN(Qt.current) || (E = Math.min(E, Qt.current)), E = Math.max(E, 0), E;
|
|
2493
2515
|
}
|
|
2494
|
-
var
|
|
2516
|
+
var Ir = K <= 0, Mr = K >= kt, wr = $ <= 0, Ar = $ >= p, di = ei(Ir, Mr, wr, Ar), Gt = function() {
|
|
2495
2517
|
return {
|
|
2496
|
-
x:
|
|
2497
|
-
y:
|
|
2518
|
+
x: X ? -$ : $,
|
|
2519
|
+
y: K
|
|
2498
2520
|
};
|
|
2499
|
-
},
|
|
2521
|
+
}, Yt = w(Gt()), mt = rn(function(y) {
|
|
2500
2522
|
if (C) {
|
|
2501
|
-
var E = G(G({},
|
|
2502
|
-
(
|
|
2523
|
+
var E = G(G({}, Gt()), y);
|
|
2524
|
+
(Yt.current.x !== E.x || Yt.current.y !== E.y) && (C(E), Yt.current = E);
|
|
2503
2525
|
}
|
|
2504
2526
|
});
|
|
2505
|
-
function
|
|
2527
|
+
function Lr(y, E) {
|
|
2506
2528
|
var I = y;
|
|
2507
|
-
E ? (
|
|
2529
|
+
E ? (Kr(function() {
|
|
2508
2530
|
ne(I);
|
|
2509
|
-
}), mt()) :
|
|
2531
|
+
}), mt()) : Ae(I);
|
|
2510
2532
|
}
|
|
2511
|
-
function
|
|
2533
|
+
function vi(y) {
|
|
2512
2534
|
var E = y.currentTarget.scrollTop;
|
|
2513
|
-
E !==
|
|
2535
|
+
E !== K && Ae(E), S == null || S(y), mt();
|
|
2514
2536
|
}
|
|
2515
|
-
var
|
|
2537
|
+
var Xt = function(E) {
|
|
2516
2538
|
var I = E, V = p ? p - me.width : 0;
|
|
2517
2539
|
return I = Math.max(I, 0), I = Math.min(I, V), I;
|
|
2518
|
-
},
|
|
2519
|
-
E ? (
|
|
2540
|
+
}, mi = rn(function(y, E) {
|
|
2541
|
+
E ? (Kr(function() {
|
|
2520
2542
|
ne(function(I) {
|
|
2521
|
-
var V = I + (
|
|
2522
|
-
return
|
|
2543
|
+
var V = I + (X ? -y : y);
|
|
2544
|
+
return Xt(V);
|
|
2523
2545
|
});
|
|
2524
|
-
}), mt()) :
|
|
2546
|
+
}), mt()) : Ae(function(I) {
|
|
2525
2547
|
var V = I + y;
|
|
2526
2548
|
return V;
|
|
2527
2549
|
});
|
|
2528
|
-
}), pi = ra(Z,
|
|
2550
|
+
}), pi = ra(Z, Ir, Mr, wr, Ar, !!p, mi), $r = Q(pi, 2), Kt = $r[0], Dr = $r[1];
|
|
2529
2551
|
sa(Z, Oe, function(y, E, I) {
|
|
2530
|
-
return di(y, E, I) ? !1 : (
|
|
2552
|
+
return di(y, E, I) ? !1 : (Kt({
|
|
2531
2553
|
preventDefault: function() {
|
|
2532
2554
|
},
|
|
2533
2555
|
deltaX: y ? E : 0,
|
|
2534
2556
|
deltaY: y ? 0 : E
|
|
2535
2557
|
}), !0);
|
|
2536
|
-
}),
|
|
2558
|
+
}), et(function() {
|
|
2537
2559
|
function y(I) {
|
|
2538
2560
|
Z && I.preventDefault();
|
|
2539
2561
|
}
|
|
2540
2562
|
var E = Oe.current;
|
|
2541
|
-
return E.addEventListener("wheel",
|
|
2542
|
-
|
|
2563
|
+
return E.addEventListener("wheel", Kt, {
|
|
2564
|
+
passive: !1
|
|
2565
|
+
}), E.addEventListener("DOMMouseScroll", Dr, {
|
|
2566
|
+
passive: !0
|
|
2567
|
+
}), E.addEventListener("MozMousePixelScroll", y, {
|
|
2568
|
+
passive: !1
|
|
2569
|
+
}), function() {
|
|
2570
|
+
E.removeEventListener("wheel", Kt), E.removeEventListener("DOMMouseScroll", Dr), E.removeEventListener("MozMousePixelScroll", y);
|
|
2543
2571
|
};
|
|
2544
|
-
}, [Z]),
|
|
2572
|
+
}, [Z]), et(function() {
|
|
2545
2573
|
if (p) {
|
|
2546
|
-
var y =
|
|
2574
|
+
var y = Xt($);
|
|
2547
2575
|
ne(y), mt({
|
|
2548
2576
|
x: y
|
|
2549
2577
|
});
|
|
2550
2578
|
}
|
|
2551
2579
|
}, [me.width, p]);
|
|
2552
|
-
var
|
|
2580
|
+
var Hr = function() {
|
|
2553
2581
|
var E, I;
|
|
2554
|
-
(E =
|
|
2555
|
-
},
|
|
2582
|
+
(E = Pr.current) === null || E === void 0 || E.delayHidden(), (I = Nr.current) === null || I === void 0 || I.delayHidden();
|
|
2583
|
+
}, Ur = la(Oe, U, k, i, H, function() {
|
|
2556
2584
|
return te(!0);
|
|
2557
|
-
},
|
|
2585
|
+
}, Ae, Hr);
|
|
2558
2586
|
d.useImperativeHandle(t, function() {
|
|
2559
2587
|
return {
|
|
2560
|
-
nativeElement:
|
|
2561
|
-
getScrollInfo:
|
|
2588
|
+
nativeElement: Me.current,
|
|
2589
|
+
getScrollInfo: Gt,
|
|
2562
2590
|
scrollTo: function(E) {
|
|
2563
2591
|
function I(V) {
|
|
2564
2592
|
return V && se(V) === "object" && ("left" in V || "top" in V);
|
|
2565
2593
|
}
|
|
2566
|
-
I(E) ? (E.left !== void 0 && ne(
|
|
2594
|
+
I(E) ? (E.left !== void 0 && ne(Xt(E.left)), Ur(E.top)) : Ur(E);
|
|
2567
2595
|
}
|
|
2568
2596
|
};
|
|
2569
|
-
}),
|
|
2597
|
+
}), et(function() {
|
|
2570
2598
|
if (O) {
|
|
2571
|
-
var y = U.slice(
|
|
2599
|
+
var y = U.slice(Ye, Xe + 1);
|
|
2572
2600
|
O(y, U);
|
|
2573
2601
|
}
|
|
2574
|
-
}, [
|
|
2575
|
-
var _i = na(U, H,
|
|
2576
|
-
start:
|
|
2577
|
-
end:
|
|
2602
|
+
}, [Ye, Xe, U]);
|
|
2603
|
+
var _i = na(U, H, k, i), gi = A == null ? void 0 : A({
|
|
2604
|
+
start: Ye,
|
|
2605
|
+
end: Xe,
|
|
2578
2606
|
virtual: ue,
|
|
2579
2607
|
offsetX: $,
|
|
2580
|
-
offsetY:
|
|
2581
|
-
rtl:
|
|
2608
|
+
offsetY: Or,
|
|
2609
|
+
rtl: X,
|
|
2582
2610
|
getSize: _i
|
|
2583
|
-
}), Si = Js(U,
|
|
2584
|
-
a && (
|
|
2585
|
-
var
|
|
2586
|
-
return
|
|
2587
|
-
ref:
|
|
2611
|
+
}), Si = Js(U, Ye, Xe, p, $, z, h, ht), Ke = null;
|
|
2612
|
+
a && (Ke = G(q({}, l ? "height" : "maxHeight", a), ha), Z && (Ke.overflowY = "hidden", p && (Ke.overflowX = "hidden"), ke && (Ke.pointerEvents = "none")));
|
|
2613
|
+
var xr = {};
|
|
2614
|
+
return X && (xr.dir = "rtl"), /* @__PURE__ */ d.createElement("div", nt({
|
|
2615
|
+
ref: Me,
|
|
2588
2616
|
style: G(G({}, u), {}, {
|
|
2589
2617
|
position: "relative"
|
|
2590
2618
|
}),
|
|
2591
2619
|
className: je
|
|
2592
|
-
},
|
|
2620
|
+
}, xr, L), /* @__PURE__ */ d.createElement(Tr, {
|
|
2593
2621
|
onResize: ui
|
|
2594
2622
|
}, /* @__PURE__ */ d.createElement(b, {
|
|
2595
2623
|
className: "".concat(n, "-holder"),
|
|
2596
|
-
style:
|
|
2624
|
+
style: Ke,
|
|
2597
2625
|
ref: Oe,
|
|
2598
|
-
onScroll:
|
|
2599
|
-
onMouseEnter:
|
|
2600
|
-
}, /* @__PURE__ */ d.createElement(
|
|
2626
|
+
onScroll: vi,
|
|
2627
|
+
onMouseEnter: Hr
|
|
2628
|
+
}, /* @__PURE__ */ d.createElement(Kn, {
|
|
2601
2629
|
prefixCls: n,
|
|
2602
2630
|
height: Le,
|
|
2603
2631
|
offsetX: $,
|
|
2604
|
-
offsetY:
|
|
2632
|
+
offsetY: Or,
|
|
2605
2633
|
scrollWidth: p,
|
|
2606
2634
|
onInnerResize: te,
|
|
2607
|
-
ref:
|
|
2635
|
+
ref: Ie,
|
|
2608
2636
|
innerProps: B,
|
|
2609
|
-
rtl:
|
|
2637
|
+
rtl: X,
|
|
2610
2638
|
extra: gi
|
|
2611
|
-
}, Si))), ue && Le > a && /* @__PURE__ */ d.createElement(
|
|
2612
|
-
ref:
|
|
2639
|
+
}, Si))), ue && Le > a && /* @__PURE__ */ d.createElement(un, {
|
|
2640
|
+
ref: Pr,
|
|
2613
2641
|
prefixCls: n,
|
|
2614
|
-
scrollOffset:
|
|
2642
|
+
scrollOffset: K,
|
|
2615
2643
|
scrollRange: Le,
|
|
2616
|
-
rtl:
|
|
2617
|
-
onScroll:
|
|
2618
|
-
onStartMove:
|
|
2619
|
-
onStopMove:
|
|
2644
|
+
rtl: X,
|
|
2645
|
+
onScroll: Lr,
|
|
2646
|
+
onStartMove: ct,
|
|
2647
|
+
onStopMove: ft,
|
|
2620
2648
|
spinSize: fi,
|
|
2621
2649
|
containerSize: me.height,
|
|
2622
2650
|
style: F == null ? void 0 : F.verticalScrollBar,
|
|
2623
2651
|
thumbStyle: F == null ? void 0 : F.verticalScrollBarThumb
|
|
2624
|
-
}), ue && p > me.width && /* @__PURE__ */ d.createElement(
|
|
2625
|
-
ref:
|
|
2652
|
+
}), ue && p > me.width && /* @__PURE__ */ d.createElement(un, {
|
|
2653
|
+
ref: Nr,
|
|
2626
2654
|
prefixCls: n,
|
|
2627
2655
|
scrollOffset: $,
|
|
2628
2656
|
scrollRange: p,
|
|
2629
|
-
rtl:
|
|
2630
|
-
onScroll:
|
|
2631
|
-
onStartMove:
|
|
2632
|
-
onStopMove:
|
|
2657
|
+
rtl: X,
|
|
2658
|
+
onScroll: Lr,
|
|
2659
|
+
onStartMove: ct,
|
|
2660
|
+
onStopMove: ft,
|
|
2633
2661
|
spinSize: ci,
|
|
2634
2662
|
containerSize: me.width,
|
|
2635
2663
|
horizontal: !0,
|
|
@@ -2637,28 +2665,28 @@ function da(e, t) {
|
|
|
2637
2665
|
thumbStyle: F == null ? void 0 : F.horizontalScrollBarThumb
|
|
2638
2666
|
}));
|
|
2639
2667
|
}
|
|
2640
|
-
var
|
|
2641
|
-
|
|
2642
|
-
function
|
|
2643
|
-
const { model: t } = e, r = $e(
|
|
2668
|
+
var ti = /* @__PURE__ */ d.forwardRef(da);
|
|
2669
|
+
ti.displayName = "List";
|
|
2670
|
+
function va(e) {
|
|
2671
|
+
const { model: t } = e, r = $e(Fe), n = be(t.searchString$, "", !0), o = be(t.filterItems$, void 0, !0), a = r.t("sheets-filter.panel.filter-only"), i = nr(o), s = i.checked > 0 && i.unchecked === 0, l = i.checked > 0 && i.unchecked > 0, u = fe((f, g) => {
|
|
2644
2672
|
t.onFilterCheckToggled(f, g);
|
|
2645
2673
|
}, [t]), c = fe((f) => {
|
|
2646
2674
|
t.onFilterOnly(f);
|
|
2647
2675
|
}, [t]), h = fe(() => {
|
|
2648
2676
|
t.onCheckAllToggled(!s);
|
|
2649
|
-
}, [t, s]),
|
|
2677
|
+
}, [t, s]), m = fe((f) => {
|
|
2650
2678
|
t.setSearchString(f);
|
|
2651
2679
|
}, [t]);
|
|
2652
|
-
return /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesContainer }, /* @__PURE__ */ T.createElement(
|
|
2653
|
-
|
|
2680
|
+
return /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesContainer }, /* @__PURE__ */ T.createElement(Cn, { value: n, placeholder: r.t("sheets-filter.panel.search-placeholder"), onChange: m }), /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesList }, /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesItem }, /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesItemInner }, /* @__PURE__ */ T.createElement(
|
|
2681
|
+
Gr,
|
|
2654
2682
|
{
|
|
2655
2683
|
indeterminate: l,
|
|
2656
2684
|
disabled: o.length === 0,
|
|
2657
2685
|
checked: s,
|
|
2658
2686
|
onChange: h
|
|
2659
2687
|
}
|
|
2660
|
-
), /* @__PURE__ */ T.createElement("span", { className: x.sheetsFilterPanelValuesItemText }, `${r.t("sheets-filter.panel.select-all")}`), /* @__PURE__ */ T.createElement("span", { className: x.sheetsFilterPanelValuesItemCount }, `(${i.checked}/${i.checked + i.unchecked})`))), /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesVirtual }, /* @__PURE__ */ T.createElement(
|
|
2661
|
-
|
|
2688
|
+
), /* @__PURE__ */ T.createElement("span", { className: x.sheetsFilterPanelValuesItemText }, `${r.t("sheets-filter.panel.select-all")}`), /* @__PURE__ */ T.createElement("span", { className: x.sheetsFilterPanelValuesItemCount }, `(${i.checked}/${i.checked + i.unchecked})`))), /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesVirtual }, /* @__PURE__ */ T.createElement(ti, { style: { paddingRight: 8 }, data: o, height: 190, itemHeight: 32, itemKey: (f) => `${f.value}----${f.checked}` }, (f) => /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesItem }, /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelValuesItemInner }, /* @__PURE__ */ T.createElement(Gr, { checked: f.checked, onChange: () => u(f, !f.checked) }), /* @__PURE__ */ T.createElement(oo, { showIfEllipsis: !0, placement: "top", title: f.value }, /* @__PURE__ */ T.createElement("span", { className: x.sheetsFilterPanelValuesItemText }, f.value)), /* @__PURE__ */ T.createElement("span", { className: x.sheetsFilterPanelValuesItemCount }, `(${f.count})`), /* @__PURE__ */ T.createElement(
|
|
2689
|
+
St,
|
|
2662
2690
|
{
|
|
2663
2691
|
className: x.sheetsFilterPanelValuesItemExcludeButton,
|
|
2664
2692
|
size: "small",
|
|
@@ -2668,16 +2696,16 @@ function ma(e) {
|
|
|
2668
2696
|
a
|
|
2669
2697
|
)))))));
|
|
2670
2698
|
}
|
|
2671
|
-
function
|
|
2699
|
+
function ma() {
|
|
2672
2700
|
var _;
|
|
2673
|
-
const e = $e(
|
|
2674
|
-
r.executeCommand(
|
|
2701
|
+
const e = $e(Re), t = $e(Fe), r = $e(ae), n = be(e.filterBy$, void 0, !0), o = be(e.filterByModel$, void 0, !1), a = be(() => (o == null ? void 0 : o.canApply$) || st(!1), void 0, !1, [o]), i = pa(t), s = !be(e.hasCriteria$), l = fe((b) => {
|
|
2702
|
+
r.executeCommand(Dn.id, { filterBy: b });
|
|
2675
2703
|
}, [r]), u = fe(async () => {
|
|
2676
|
-
await (o == null ? void 0 : o.clear()), r.executeCommand(
|
|
2704
|
+
await (o == null ? void 0 : o.clear()), r.executeCommand(Ze.id);
|
|
2677
2705
|
}, [o, r]), c = fe(() => {
|
|
2678
|
-
r.executeCommand(
|
|
2706
|
+
r.executeCommand(Ze.id);
|
|
2679
2707
|
}, [r]), h = fe(async () => {
|
|
2680
|
-
await (o == null ? void 0 : o.apply()), r.executeCommand(
|
|
2708
|
+
await (o == null ? void 0 : o.apply()), r.executeCommand(Ze.id);
|
|
2681
2709
|
}, [o, r]), f = (_ = $e(ee).activeFilterModel) == null ? void 0 : _.getRange(), g = e.col, p = wi(Gi.FILTER_PANEL_EMBED_POINT);
|
|
2682
2710
|
return /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanel }, /* @__PURE__ */ T.createElement(
|
|
2683
2711
|
Ai,
|
|
@@ -2685,21 +2713,21 @@ function va() {
|
|
|
2685
2713
|
components: p,
|
|
2686
2714
|
sharedProps: { range: f, colIndex: g, onClose: c }
|
|
2687
2715
|
}
|
|
2688
|
-
), /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelHeader }, /* @__PURE__ */ T.createElement(so, { value: n, options: i, onChange: (b) => l(b) })), o ? /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelContent }, n ===
|
|
2716
|
+
), /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelHeader }, /* @__PURE__ */ T.createElement(so, { value: n, options: i, onChange: (b) => l(b) })), o ? /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelContent }, n === bt.VALUES ? /* @__PURE__ */ T.createElement(va, { model: o }) : /* @__PURE__ */ T.createElement(Jo, { model: o })) : null, /* @__PURE__ */ T.createElement("div", { className: x.sheetsFilterPanelFooter }, /* @__PURE__ */ T.createElement(St, { type: "link", onClick: u, disabled: s }, t.t("sheets-filter.panel.clear-filter")), /* @__PURE__ */ T.createElement("span", { className: x.sheetsFilterPanelFooterPrimaryButtons }, /* @__PURE__ */ T.createElement(St, { type: "default", onClick: c }, t.t("sheets-filter.panel.cancel")), /* @__PURE__ */ T.createElement(St, { disabled: !a, type: "primary", onClick: h }, t.t("sheets-filter.panel.confirm")))));
|
|
2689
2717
|
}
|
|
2690
2718
|
function pa(e) {
|
|
2691
2719
|
const t = e.getCurrentLocale();
|
|
2692
|
-
return
|
|
2720
|
+
return Er(
|
|
2693
2721
|
() => [
|
|
2694
|
-
{ label: e.t("sheets-filter.panel.by-values"), value:
|
|
2695
|
-
{ label: e.t("sheets-filter.panel.by-conditions"), value:
|
|
2722
|
+
{ label: e.t("sheets-filter.panel.by-values"), value: bt.VALUES },
|
|
2723
|
+
{ label: e.t("sheets-filter.panel.by-conditions"), value: bt.CONDITIONS }
|
|
2696
2724
|
],
|
|
2697
2725
|
[t, e]
|
|
2698
2726
|
);
|
|
2699
2727
|
}
|
|
2700
2728
|
const _a = {
|
|
2701
2729
|
id: Ve.id,
|
|
2702
|
-
binding: Li.L |
|
|
2730
|
+
binding: Li.L | Vr.CTRL_COMMAND | Vr.SHIFT,
|
|
2703
2731
|
description: "sheets-filter.shortcut.smart-toggle-filter",
|
|
2704
2732
|
preconditions: Yi,
|
|
2705
2733
|
group: "4_sheet-edit"
|
|
@@ -2709,71 +2737,71 @@ function ga(e) {
|
|
|
2709
2737
|
return {
|
|
2710
2738
|
id: Ve.id,
|
|
2711
2739
|
group: mr.TOOLBAR_FORMULAS_INSERT,
|
|
2712
|
-
type:
|
|
2740
|
+
type: pr.BUTTON_SELECTOR,
|
|
2713
2741
|
icon: "FilterSingle",
|
|
2714
2742
|
tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
|
|
2715
2743
|
positions: [$i.TOOLBAR_START],
|
|
2716
|
-
hidden$:
|
|
2744
|
+
hidden$: _r(e, Pe.UNIVER_SHEET),
|
|
2717
2745
|
activated$: t.activeFilterModel$.pipe(xe((r) => !!r)),
|
|
2718
|
-
disabled$: Xi(e, { workbookTypes: [
|
|
2746
|
+
disabled$: Xi(e, { workbookTypes: [er], worksheetTypes: [tr, rr], rangeTypes: [co] })
|
|
2719
2747
|
};
|
|
2720
2748
|
}
|
|
2721
2749
|
function Sa(e) {
|
|
2722
2750
|
const t = e.get(ee);
|
|
2723
2751
|
return {
|
|
2724
|
-
id:
|
|
2752
|
+
id: An.id,
|
|
2725
2753
|
group: mr.TOOLBAR_OTHERS,
|
|
2726
|
-
type:
|
|
2754
|
+
type: pr.BUTTON,
|
|
2727
2755
|
title: "sheets-filter.toolbar.clear-filter-criteria",
|
|
2728
2756
|
positions: [Ve.id],
|
|
2729
|
-
hidden$:
|
|
2730
|
-
disabled$: t.activeFilterModel$.pipe(
|
|
2757
|
+
hidden$: _r(e, Pe.UNIVER_SHEET),
|
|
2758
|
+
disabled$: t.activeFilterModel$.pipe(gr((r) => {
|
|
2731
2759
|
var n;
|
|
2732
|
-
return (n = r == null ? void 0 : r.hasCriteria$.pipe(xe((o) => !o))) != null ? n :
|
|
2760
|
+
return (n = r == null ? void 0 : r.hasCriteria$.pipe(xe((o) => !o))) != null ? n : st(!0);
|
|
2733
2761
|
}))
|
|
2734
2762
|
};
|
|
2735
2763
|
}
|
|
2736
2764
|
function Ea(e) {
|
|
2737
2765
|
const t = e.get(ee);
|
|
2738
2766
|
return {
|
|
2739
|
-
id:
|
|
2767
|
+
id: Ln.id,
|
|
2740
2768
|
group: mr.TOOLBAR_OTHERS,
|
|
2741
|
-
type:
|
|
2769
|
+
type: pr.BUTTON,
|
|
2742
2770
|
title: "sheets-filter.toolbar.re-calc-filter-conditions",
|
|
2743
2771
|
positions: [Ve.id],
|
|
2744
|
-
hidden$:
|
|
2745
|
-
disabled$: t.activeFilterModel$.pipe(
|
|
2772
|
+
hidden$: _r(e, Pe.UNIVER_SHEET),
|
|
2773
|
+
disabled$: t.activeFilterModel$.pipe(gr((r) => {
|
|
2746
2774
|
var n;
|
|
2747
|
-
return (n = r == null ? void 0 : r.hasCriteria$.pipe(xe((o) => !o))) != null ? n :
|
|
2775
|
+
return (n = r == null ? void 0 : r.hasCriteria$.pipe(xe((o) => !o))) != null ? n : st(!0);
|
|
2748
2776
|
}))
|
|
2749
2777
|
};
|
|
2750
2778
|
}
|
|
2751
|
-
const
|
|
2752
|
-
class
|
|
2779
|
+
const Ee = 16, ba = new Path2D("M3.30363 3C2.79117 3 2.51457 3.60097 2.84788 3.99024L6.8 8.60593V12.5662C6.8 12.7184 6.8864 12.8575 7.02289 12.9249L8.76717 13.7863C8.96655 13.8847 9.2 13.7396 9.2 13.5173V8.60593L13.1521 3.99024C13.4854 3.60097 13.2088 3 12.6964 3H3.30363Z");
|
|
2780
|
+
class fn {
|
|
2753
2781
|
static drawNoCriteria(t, r, n, o) {
|
|
2754
|
-
t.save(),
|
|
2782
|
+
t.save(), zr.drawWith(t, {
|
|
2755
2783
|
radius: 2,
|
|
2756
|
-
width:
|
|
2757
|
-
height:
|
|
2784
|
+
width: Ee,
|
|
2785
|
+
height: Ee,
|
|
2758
2786
|
fill: o
|
|
2759
|
-
}), t.lineCap = "square", t.strokeStyle = n, t.scale(r /
|
|
2787
|
+
}), t.lineCap = "square", t.strokeStyle = n, t.scale(r / Ee, r / Ee), t.beginPath(), t.lineWidth = 1, t.lineCap = "round", t.moveTo(3, 4), t.lineTo(13, 4), t.moveTo(4.5, 8), t.lineTo(11.5, 8), t.moveTo(6, 12), t.lineTo(10, 12), t.stroke(), t.restore();
|
|
2760
2788
|
}
|
|
2761
2789
|
static drawHasCriteria(t, r, n, o) {
|
|
2762
|
-
t.save(),
|
|
2790
|
+
t.save(), zr.drawWith(t, {
|
|
2763
2791
|
radius: 2,
|
|
2764
|
-
width:
|
|
2765
|
-
height:
|
|
2792
|
+
width: Ee,
|
|
2793
|
+
height: Ee,
|
|
2766
2794
|
fill: o
|
|
2767
|
-
}), t.scale(r /
|
|
2795
|
+
}), t.scale(r / Ee, r / Ee), t.fillStyle = n, t.fill(ba), t.restore();
|
|
2768
2796
|
}
|
|
2769
2797
|
}
|
|
2770
2798
|
var ya = Object.defineProperty, Ra = Object.getOwnPropertyDescriptor, Ta = (e, t, r, n) => {
|
|
2771
2799
|
for (var o = n > 1 ? void 0 : n ? Ra(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2772
2800
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2773
2801
|
return n && o && ya(t, r, o), o;
|
|
2774
|
-
},
|
|
2775
|
-
const
|
|
2776
|
-
let
|
|
2802
|
+
}, Jt = (e, t) => (r, n) => t(r, n, e);
|
|
2803
|
+
const _e = 16, pt = 1;
|
|
2804
|
+
let lr = class extends no {
|
|
2777
2805
|
constructor(t, r, n, o, a) {
|
|
2778
2806
|
super(t, r);
|
|
2779
2807
|
N(this, "_cellWidth", 0);
|
|
@@ -2789,19 +2817,19 @@ let ar = class extends no {
|
|
|
2789
2817
|
});
|
|
2790
2818
|
}
|
|
2791
2819
|
_draw(t) {
|
|
2792
|
-
const r = this._cellHeight, n = this._cellWidth, o =
|
|
2820
|
+
const r = this._cellHeight, n = this._cellWidth, o = _e - n, a = _e - r;
|
|
2793
2821
|
t.save();
|
|
2794
2822
|
const i = new Path2D();
|
|
2795
2823
|
i.rect(o, a, n, r), t.clip(i);
|
|
2796
2824
|
const { hasCriteria: s } = this._filterParams, l = this._themeService.getCurrentTheme().primaryColor, u = this._hovered ? this._themeService.getCurrentTheme().grey50 : "rgba(255, 255, 255, 1.0)";
|
|
2797
|
-
s ?
|
|
2825
|
+
s ? fn.drawHasCriteria(t, _e, l, u) : fn.drawNoCriteria(t, _e, l, u), t.restore();
|
|
2798
2826
|
}
|
|
2799
2827
|
onPointerDown(t) {
|
|
2800
2828
|
if (t.button === 2)
|
|
2801
2829
|
return;
|
|
2802
2830
|
const { col: r, unitId: n, subUnitId: o } = this._filterParams;
|
|
2803
|
-
this._contextService.getContextValue(Be) || !this._commandService.hasCommand(
|
|
2804
|
-
this._commandService.executeCommand(
|
|
2831
|
+
this._contextService.getContextValue(Be) || !this._commandService.hasCommand(Tt.id) || setTimeout(() => {
|
|
2832
|
+
this._commandService.executeCommand(Tt.id, {
|
|
2805
2833
|
unitId: n,
|
|
2806
2834
|
subUnitId: o,
|
|
2807
2835
|
col: r
|
|
@@ -2815,39 +2843,39 @@ let ar = class extends no {
|
|
|
2815
2843
|
this._hovered = !1, this.makeDirty(!0);
|
|
2816
2844
|
}
|
|
2817
2845
|
};
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
],
|
|
2846
|
+
lr = Ta([
|
|
2847
|
+
Jt(2, wt),
|
|
2848
|
+
Jt(3, ae),
|
|
2849
|
+
Jt(4, D(vn))
|
|
2850
|
+
], lr);
|
|
2823
2851
|
var Fa = Object.defineProperty, Oa = Object.getOwnPropertyDescriptor, Ca = (e, t, r, n) => {
|
|
2824
2852
|
for (var o = n > 1 ? void 0 : n ? Oa(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2825
2853
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2826
2854
|
return n && o && Fa(t, r, o), o;
|
|
2827
|
-
},
|
|
2855
|
+
}, pe = (e, t) => (r, n) => t(r, n, e);
|
|
2828
2856
|
const Pa = 1e3, Na = 5e3;
|
|
2829
|
-
let
|
|
2857
|
+
let ur = class extends mn {
|
|
2830
2858
|
constructor(t, r, n, o, a, i, s, l, u, c) {
|
|
2831
2859
|
super();
|
|
2832
2860
|
N(this, "_filterRangeShape", null);
|
|
2833
2861
|
N(this, "_buttonRenderDisposable", null);
|
|
2834
2862
|
N(this, "_filterButtonShapes", []);
|
|
2835
2863
|
this._context = t, this._injector = r, this._sheetSkeletonManagerService = n, this._sheetsFilterService = o, this._themeService = a, this._sheetInterceptorService = i, this._sheetsRenderService = s, this._commandService = l, this._renderManagerService = u, this._selectionRenderService = c, [
|
|
2836
|
-
|
|
2864
|
+
vr,
|
|
2837
2865
|
Ue,
|
|
2838
|
-
|
|
2839
|
-
|
|
2866
|
+
gt,
|
|
2867
|
+
En
|
|
2840
2868
|
].forEach((h) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(h.id))), this._initRenderer();
|
|
2841
2869
|
}
|
|
2842
2870
|
_initRenderer() {
|
|
2843
|
-
|
|
2871
|
+
Rn([
|
|
2844
2872
|
this._selectionRenderService.usable$,
|
|
2845
2873
|
this._sheetSkeletonManagerService.currentSkeleton$
|
|
2846
2874
|
]).pipe(
|
|
2847
|
-
|
|
2848
|
-
|
|
2875
|
+
jr(([t]) => t),
|
|
2876
|
+
gr(([t, r]) => {
|
|
2849
2877
|
var l, u;
|
|
2850
|
-
if (!r) return
|
|
2878
|
+
if (!r) return st(null);
|
|
2851
2879
|
const { unit: n, unitId: o } = this._context, a = ((l = n.getActiveSheet()) == null ? void 0 : l.getSheetId()) || "", i = (u = this._sheetsFilterService.getFilterModel(o, a)) != null ? u : void 0, s = () => ({
|
|
2852
2880
|
unitId: o,
|
|
2853
2881
|
worksheetId: a,
|
|
@@ -2856,12 +2884,12 @@ let lr = class extends mn {
|
|
|
2856
2884
|
skeleton: r.skeleton
|
|
2857
2885
|
});
|
|
2858
2886
|
return Ci(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(
|
|
2859
|
-
|
|
2860
|
-
([c]) => c.type ===
|
|
2887
|
+
jr(
|
|
2888
|
+
([c]) => c.type === Te.MUTATION && c.params.unitId === n.getUnitId() && Ii.has(c.id)
|
|
2861
2889
|
),
|
|
2862
|
-
|
|
2890
|
+
Tn(20, void 0, { leading: !1, trailing: !0 }),
|
|
2863
2891
|
xe(s),
|
|
2864
|
-
|
|
2892
|
+
Fn(s())
|
|
2865
2893
|
// must trigger once
|
|
2866
2894
|
);
|
|
2867
2895
|
}),
|
|
@@ -2892,20 +2920,20 @@ let lr = class extends mn {
|
|
|
2892
2920
|
const { scene: l } = s;
|
|
2893
2921
|
this._interceptCellContent(t.range);
|
|
2894
2922
|
const { startColumn: u, endColumn: c, startRow: h } = r;
|
|
2895
|
-
for (let
|
|
2896
|
-
const f = `sheets-filter-button-${
|
|
2897
|
-
if (O <=
|
|
2923
|
+
for (let m = u; m <= c; m++) {
|
|
2924
|
+
const f = `sheets-filter-button-${m}`, g = qi(h, m, l, a), { startX: p, startY: _, endX: b, endY: S } = g, C = b - p, O = S - _;
|
|
2925
|
+
if (O <= pt || C <= pt)
|
|
2898
2926
|
continue;
|
|
2899
|
-
const B = !!n.getFilterColumn(
|
|
2927
|
+
const B = !!n.getFilterColumn(m), A = b - _e - pt, F = S - _e - pt, L = {
|
|
2900
2928
|
left: A,
|
|
2901
2929
|
top: F,
|
|
2902
|
-
height:
|
|
2903
|
-
width:
|
|
2930
|
+
height: _e,
|
|
2931
|
+
width: _e,
|
|
2904
2932
|
zIndex: Na,
|
|
2905
2933
|
cellHeight: O,
|
|
2906
2934
|
cellWidth: C,
|
|
2907
|
-
filterParams: { unitId: o, subUnitId: i, col:
|
|
2908
|
-
}, H = this._injector.createInstance(
|
|
2935
|
+
filterParams: { unitId: o, subUnitId: i, col: m, hasCriteria: B }
|
|
2936
|
+
}, H = this._injector.createInstance(lr, f, L);
|
|
2909
2937
|
this._filterButtonShapes.push(H);
|
|
2910
2938
|
}
|
|
2911
2939
|
l.addObjects(this._filterButtonShapes), l.makeDirty();
|
|
@@ -2921,7 +2949,7 @@ let lr = class extends mn {
|
|
|
2921
2949
|
fontRenderExtension: {
|
|
2922
2950
|
// @ts-ignore
|
|
2923
2951
|
...a == null ? void 0 : a.fontRenderExtension,
|
|
2924
|
-
rightOffset:
|
|
2952
|
+
rightOffset: _e
|
|
2925
2953
|
}
|
|
2926
2954
|
});
|
|
2927
2955
|
},
|
|
@@ -2933,45 +2961,45 @@ let lr = class extends mn {
|
|
|
2933
2961
|
(t = this._filterRangeShape) == null || t.dispose(), this._filterButtonShapes.forEach((n) => n.dispose()), (r = this._buttonRenderDisposable) == null || r.dispose(), this._filterRangeShape = null, this._buttonRenderDisposable = null, this._filterButtonShapes = [];
|
|
2934
2962
|
}
|
|
2935
2963
|
};
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
],
|
|
2964
|
+
ur = Ca([
|
|
2965
|
+
pe(1, D(ot)),
|
|
2966
|
+
pe(2, D(Zi)),
|
|
2967
|
+
pe(3, D(ee)),
|
|
2968
|
+
pe(4, D(vn)),
|
|
2969
|
+
pe(5, D(ho)),
|
|
2970
|
+
pe(6, D(Ji)),
|
|
2971
|
+
pe(7, ae),
|
|
2972
|
+
pe(8, Sr),
|
|
2973
|
+
pe(9, eo)
|
|
2974
|
+
], ur);
|
|
2947
2975
|
var Ia = Object.defineProperty, Ma = Object.getOwnPropertyDescriptor, wa = (e, t, r, n) => {
|
|
2948
2976
|
for (var o = n > 1 ? void 0 : n ? Ma(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2949
2977
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2950
2978
|
return n && o && Ia(t, r, o), o;
|
|
2951
2979
|
}, Aa = (e, t) => (r, n) => t(r, n, e);
|
|
2952
|
-
let
|
|
2980
|
+
let it = class extends mn {
|
|
2953
2981
|
constructor(e) {
|
|
2954
2982
|
super(), this._renderManagerService = e, this._initRenderControllers();
|
|
2955
2983
|
}
|
|
2956
2984
|
_initRenderControllers() {
|
|
2957
|
-
this.disposeWithMe(this._renderManagerService.registerRenderModule(
|
|
2985
|
+
this.disposeWithMe(this._renderManagerService.registerRenderModule(Pe.UNIVER_SHEET, ur));
|
|
2958
2986
|
}
|
|
2959
2987
|
};
|
|
2960
|
-
|
|
2961
|
-
Aa(0,
|
|
2962
|
-
],
|
|
2963
|
-
Pi(
|
|
2988
|
+
it = wa([
|
|
2989
|
+
Aa(0, Sr)
|
|
2990
|
+
], it);
|
|
2991
|
+
Pi(hr.Rendered, it);
|
|
2964
2992
|
var La = Object.defineProperty, $a = Object.getOwnPropertyDescriptor, Da = (e, t, r, n) => {
|
|
2965
2993
|
for (var o = n > 1 ? void 0 : n ? $a(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
2966
2994
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
2967
2995
|
return n && o && La(t, r, o), o;
|
|
2968
2996
|
}, ie = (e, t) => (r, n) => t(r, n, e);
|
|
2969
|
-
const
|
|
2970
|
-
let
|
|
2971
|
-
constructor(t, r, n, o, a, i, s, l, u, c, h,
|
|
2997
|
+
const ri = {}, hn = "FILTER_PANEL_POPUP";
|
|
2998
|
+
let tt = class extends it {
|
|
2999
|
+
constructor(t, r, n, o, a, i, s, l, u, c, h, m, f) {
|
|
2972
3000
|
super(f);
|
|
2973
3001
|
N(this, "_popupDisposable");
|
|
2974
|
-
this._config = t, this._injector = r, this._componentManager = n, this._sheetsFilterPanelService = o, this._sheetCanvasPopupService = a, this._sheetsFilterService = i, this._localeService = s, this._shortcutService = l, this._commandService = u, this._menuService = c, this._contextService = h, this._messageService =
|
|
3002
|
+
this._config = t, this._injector = r, this._componentManager = n, this._sheetsFilterPanelService = o, this._sheetCanvasPopupService = a, this._sheetsFilterService = i, this._localeService = s, this._shortcutService = l, this._commandService = u, this._menuService = c, this._contextService = h, this._messageService = m, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI();
|
|
2975
3003
|
}
|
|
2976
3004
|
dispose() {
|
|
2977
3005
|
super.dispose(), this._closeFilterPopup();
|
|
@@ -2987,11 +3015,11 @@ let et = class extends nt {
|
|
|
2987
3015
|
[
|
|
2988
3016
|
Ve,
|
|
2989
3017
|
He,
|
|
2990
|
-
wn,
|
|
2991
3018
|
An,
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
3019
|
+
Ln,
|
|
3020
|
+
Dn,
|
|
3021
|
+
Tt,
|
|
3022
|
+
Ze
|
|
2995
3023
|
].forEach((t) => {
|
|
2996
3024
|
this.disposeWithMe(this._commandService.registerCommand(t));
|
|
2997
3025
|
});
|
|
@@ -3007,11 +3035,11 @@ let et = class extends nt {
|
|
|
3007
3035
|
});
|
|
3008
3036
|
}
|
|
3009
3037
|
_initUI() {
|
|
3010
|
-
this.disposeWithMe(this._componentManager.register(
|
|
3038
|
+
this.disposeWithMe(this._componentManager.register(hn, ma)), this.disposeWithMe(this._componentManager.register("FilterSingle", wn)), this.disposeWithMe(this._contextService.subscribeContextValue$(Be).pipe(zi()).subscribe((t) => {
|
|
3011
3039
|
t ? this._openFilterPopup() : this._closeFilterPopup();
|
|
3012
3040
|
})), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((t) => {
|
|
3013
3041
|
t && this._messageService.show({
|
|
3014
|
-
type:
|
|
3042
|
+
type: On.Error,
|
|
3015
3043
|
content: this._localeService.t(t)
|
|
3016
3044
|
});
|
|
3017
3045
|
}));
|
|
@@ -3022,10 +3050,10 @@ let et = class extends nt {
|
|
|
3022
3050
|
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
3023
3051
|
const r = t.getRange(), n = this._sheetsFilterPanelService.col, { startRow: o } = r;
|
|
3024
3052
|
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(o, n, {
|
|
3025
|
-
componentKey:
|
|
3053
|
+
componentKey: hn,
|
|
3026
3054
|
direction: "horizontal",
|
|
3027
3055
|
closeOnSelfTarget: !0,
|
|
3028
|
-
onClickOutside: () => this._commandService.syncExecuteCommand(
|
|
3056
|
+
onClickOutside: () => this._commandService.syncExecuteCommand(Ze.id),
|
|
3029
3057
|
offset: [5, 0]
|
|
3030
3058
|
});
|
|
3031
3059
|
}
|
|
@@ -3034,27 +3062,27 @@ let et = class extends nt {
|
|
|
3034
3062
|
(t = this._popupDisposable) == null || t.dispose(), this._popupDisposable = null;
|
|
3035
3063
|
}
|
|
3036
3064
|
};
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
ie(1, D(
|
|
3065
|
+
tt = Da([
|
|
3066
|
+
pn(hr.Ready, tt),
|
|
3067
|
+
ie(1, D(ot)),
|
|
3040
3068
|
ie(2, D(Di)),
|
|
3041
|
-
ie(3, D(
|
|
3069
|
+
ie(3, D(Re)),
|
|
3042
3070
|
ie(4, D(to)),
|
|
3043
3071
|
ie(5, D(ee)),
|
|
3044
|
-
ie(6, D(
|
|
3072
|
+
ie(6, D(Fe)),
|
|
3045
3073
|
ie(7, Hi),
|
|
3046
3074
|
ie(8, ae),
|
|
3047
3075
|
ie(9, Ui),
|
|
3048
|
-
ie(10,
|
|
3049
|
-
ie(11,
|
|
3050
|
-
ie(12,
|
|
3051
|
-
],
|
|
3076
|
+
ie(10, wt),
|
|
3077
|
+
ie(11, yn),
|
|
3078
|
+
ie(12, Sr)
|
|
3079
|
+
], tt);
|
|
3052
3080
|
var Ha = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, xa = (e, t, r, n) => {
|
|
3053
3081
|
for (var o = n > 1 ? void 0 : n ? Ua(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
3054
3082
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3055
3083
|
return n && o && Ha(t, r, o), o;
|
|
3056
|
-
},
|
|
3057
|
-
let
|
|
3084
|
+
}, _t = (e, t) => (r, n) => t(r, n, e);
|
|
3085
|
+
let rt = class extends Mt {
|
|
3058
3086
|
constructor(e, t, r, n) {
|
|
3059
3087
|
super(), this._sheetsFilterService = e, this._localeService = t, this._commandService = r, this._sheetPermissionInterceptorBaseController = n, this._commandExecutedListener();
|
|
3060
3088
|
}
|
|
@@ -3063,84 +3091,89 @@ let tt = class extends It {
|
|
|
3063
3091
|
this._commandService.beforeCommandExecuted((e) => {
|
|
3064
3092
|
var t;
|
|
3065
3093
|
if (e.id === Ve.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithoutRange({
|
|
3066
|
-
workbookTypes: [
|
|
3067
|
-
rangeTypes: [
|
|
3068
|
-
worksheetTypes: [
|
|
3069
|
-
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr"))), e.id ===
|
|
3070
|
-
const r = e.params, { unitId: n, subUnitId: o } = r, a = (t = this._sheetsFilterService.getFilterModel(n, o)) == null ? void 0 : t.getRange(), i =
|
|
3094
|
+
workbookTypes: [er],
|
|
3095
|
+
rangeTypes: [Yr],
|
|
3096
|
+
worksheetTypes: [tr, rr]
|
|
3097
|
+
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr"))), e.id === Tt.id) {
|
|
3098
|
+
const r = e.params, { unitId: n, subUnitId: o } = r, a = (t = this._sheetsFilterService.getFilterModel(n, o)) == null ? void 0 : t.getRange(), i = dr.deepClone(a);
|
|
3071
3099
|
i && (i.startColumn = r.col, i.endColumn = r.col, this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
|
3072
|
-
workbookTypes: [
|
|
3073
|
-
rangeTypes: [
|
|
3074
|
-
worksheetTypes: [
|
|
3100
|
+
workbookTypes: [er],
|
|
3101
|
+
rangeTypes: [Yr],
|
|
3102
|
+
worksheetTypes: [tr, rr]
|
|
3075
3103
|
}, [i]) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.filterErr")));
|
|
3076
3104
|
}
|
|
3077
3105
|
})
|
|
3078
3106
|
);
|
|
3079
3107
|
}
|
|
3080
3108
|
};
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
],
|
|
3088
|
-
var
|
|
3109
|
+
rt = xa([
|
|
3110
|
+
pn(hr.Ready, rt),
|
|
3111
|
+
_t(0, D(ee)),
|
|
3112
|
+
_t(1, D(Fe)),
|
|
3113
|
+
_t(2, ae),
|
|
3114
|
+
_t(3, D(ro))
|
|
3115
|
+
], rt);
|
|
3116
|
+
var ni = Object.defineProperty, Ba = Object.getOwnPropertyDescriptor, Wa = (e, t, r) => t in e ? ni(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Va = (e, t, r, n) => {
|
|
3089
3117
|
for (var o = n > 1 ? void 0 : n ? Ba(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
3090
3118
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3091
|
-
return n && o &&
|
|
3092
|
-
},
|
|
3119
|
+
return n && o && ni(t, r, o), o;
|
|
3120
|
+
}, dn = (e, t) => (r, n) => t(r, n, e), ii = (e, t, r) => Wa(e, typeof t != "symbol" ? t + "" : t, r);
|
|
3093
3121
|
const ja = "SHEET_FILTER_UI_PLUGIN";
|
|
3094
|
-
let
|
|
3122
|
+
let Nt = class extends _n {
|
|
3095
3123
|
constructor(e = {}, t, r) {
|
|
3096
|
-
super(), this._config = e, this._injector = t, this._localeService = r, this._config =
|
|
3124
|
+
super(), this._config = e, this._injector = t, this._localeService = r, this._config = dr.deepMerge({}, ri, this._config);
|
|
3097
3125
|
}
|
|
3098
3126
|
onStarting(e) {
|
|
3099
3127
|
[
|
|
3100
|
-
[
|
|
3101
|
-
[
|
|
3128
|
+
[Re],
|
|
3129
|
+
[rt],
|
|
3102
3130
|
[
|
|
3103
|
-
|
|
3131
|
+
tt,
|
|
3104
3132
|
{
|
|
3105
|
-
useFactory: () => this._injector.createInstance(
|
|
3133
|
+
useFactory: () => this._injector.createInstance(tt, this._config)
|
|
3106
3134
|
}
|
|
3107
3135
|
]
|
|
3108
3136
|
].forEach((t) => e.add(t));
|
|
3109
3137
|
}
|
|
3110
3138
|
};
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
],
|
|
3118
|
-
var
|
|
3119
|
-
for (var o = n > 1 ? void 0 : n ?
|
|
3139
|
+
ii(Nt, "type", Pe.UNIVER_SHEET);
|
|
3140
|
+
ii(Nt, "pluginName", ja);
|
|
3141
|
+
Nt = Va([
|
|
3142
|
+
gn(bn),
|
|
3143
|
+
dn(1, D(ot)),
|
|
3144
|
+
dn(2, D(Fe))
|
|
3145
|
+
], Nt);
|
|
3146
|
+
var oi = Object.defineProperty, za = Object.getOwnPropertyDescriptor, ka = (e, t, r) => t in e ? oi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Qa = (e, t, r, n) => {
|
|
3147
|
+
for (var o = n > 1 ? void 0 : n ? za(t, r) : t, a = e.length - 1, i; a >= 0; a--)
|
|
3120
3148
|
(i = e[a]) && (o = (n ? i(t, r, o) : i(o)) || o);
|
|
3121
|
-
return n && o &&
|
|
3122
|
-
}, Ga = (e, t) => (r, n) => t(r, n, e),
|
|
3149
|
+
return n && o && oi(t, r, o), o;
|
|
3150
|
+
}, Ga = (e, t) => (r, n) => t(r, n, e), si = (e, t, r) => ka(e, typeof t != "symbol" ? t + "" : t, r);
|
|
3123
3151
|
const Ya = "SHEET_FILTER_UI_PLUGIN";
|
|
3124
|
-
let
|
|
3152
|
+
let It = class extends _n {
|
|
3125
3153
|
constructor(e = {}, t) {
|
|
3126
|
-
super(), this._config = e, this._injector = t, this._config =
|
|
3154
|
+
super(), this._config = e, this._injector = t, this._config = dr.deepMerge({}, ri, this._config);
|
|
3127
3155
|
}
|
|
3128
3156
|
onStarting(e) {
|
|
3129
3157
|
[
|
|
3130
|
-
[
|
|
3131
|
-
[
|
|
3158
|
+
[rt],
|
|
3159
|
+
[it]
|
|
3132
3160
|
].forEach((t) => e.add(t));
|
|
3133
3161
|
}
|
|
3134
3162
|
};
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
Ga(1, D(
|
|
3140
|
-
],
|
|
3163
|
+
si(It, "type", Pe.UNIVER_SHEET);
|
|
3164
|
+
si(It, "pluginName", Ya);
|
|
3165
|
+
It = Qa([
|
|
3166
|
+
gn(bn),
|
|
3167
|
+
Ga(1, D(ot))
|
|
3168
|
+
], It);
|
|
3141
3169
|
export {
|
|
3142
|
-
|
|
3170
|
+
Dn as ChangeFilterByOperation,
|
|
3171
|
+
An as ClearSheetsFilterCriteriaCommand,
|
|
3172
|
+
Ze as CloseFilterPanelOperation,
|
|
3173
|
+
Tt as OpenFilterPanelOperation,
|
|
3174
|
+
Ln as ReCalcSheetsFilterCommand,
|
|
3175
|
+
He as SetSheetsFilterCriteriaCommand,
|
|
3143
3176
|
Ve as SmartToggleSheetsFilterCommand,
|
|
3144
|
-
|
|
3145
|
-
|
|
3177
|
+
It as UniverSheetsFilterMobileUIPlugin,
|
|
3178
|
+
Nt as UniverSheetsFilterUIPlugin
|
|
3146
3179
|
};
|