@univerjs/sheets-filter-ui 0.10.3-nightly.202508121228 → 0.10.3-nightly.202508150623
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 +1 -1
- package/lib/es/index.js +401 -421
- package/lib/index.js +401 -421
- package/lib/types/views/render-modules/sheets-filter.render-controller.d.ts +0 -1
- package/lib/umd/index.js +2 -2
- package/package.json +10 -10
package/lib/es/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var or = (t, e, r) => e in t ?
|
|
1
|
+
var nr = Object.defineProperty;
|
|
2
|
+
var or = (t, e, r) => e in t ? nr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var v = (t, e, r) => or(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { BooleanNumber as mt, createIdentifier as Pt, Inject as T, LocaleService as X, IUniverInstanceService as Be, ILogService as lr, extractPureTextFromCell as ar, numfmt as ft, Disposable as de, Injector as ie, Quantity as wt, Tools as Re, ColorKit as pt, ICommandService as j, CommandType as We, IContextService as
|
|
5
|
-
import { CustomFilterOperator as u, FilterBy as w, SetSheetsFilterCriteriaCommand as
|
|
6
|
-
import { SetCellEditVisibleOperation as Cr, SheetSkeletonManagerService as Tr, ISheetSelectionRenderService as Er, SelectionControl as
|
|
4
|
+
import { BooleanNumber as mt, createIdentifier as Pt, Inject as T, LocaleService as X, IUniverInstanceService as Be, ILogService as lr, extractPureTextFromCell as ar, numfmt as ft, Disposable as de, Injector as ie, Quantity as wt, Tools as Re, ColorKit as pt, ICommandService as j, CommandType as We, IContextService as Qe, ThemeService as Lt, RxDisposable as Mt, fromCallback as cr, VerticalAlign as Ae, InterceptorEffectEnum as ur, UniverInstanceType as se, DependentOn as $t, IConfigService as xt, Plugin as it, merge as Ut, Optional as hr, registerDependencies as dr, touchDependencies as vt } from "@univerjs/core";
|
|
5
|
+
import { CustomFilterOperator as u, FilterBy as w, SetSheetsFilterCriteriaCommand as Q, SheetsFilterService as z, SmartToggleSheetsFilterCommand as Ne, FILTER_MUTATIONS as mr, SetSheetsFilterRangeMutation as fr, SetSheetsFilterCriteriaMutation as pr, RemoveSheetsFilterMutation as vr, ReCalcSheetsFilterMutation as _r, UniverSheetsFilterPlugin as kt, ReCalcSheetsFilterCommand as st, ClearSheetsFilterCriteriaCommand as nt, RemoveSheetFilterCommand as gr, SetSheetFilterRangeCommand as Sr } from "@univerjs/sheets-filter";
|
|
6
|
+
import { SetCellEditVisibleOperation as Cr, SheetSkeletonManagerService as Tr, ISheetSelectionRenderService as Er, SelectionControl as Nr, attachSelectionWithCoord as Fr, getCoordByCell as yr, SheetsRenderService as Ht, SheetsUIPart as Or, getObservableWithExclusiveRange$ as Ir, getCurrentRangeDisable$ as br, whenSheetEditorFocused as Rr, SheetCanvasPopManagerService as Ar } from "@univerjs/sheets-ui";
|
|
7
7
|
import { ILayoutService as Pr, useDependency as re, useObservable as D, useComponentsOfPart as wr, ComponentContainer as Lr, getMenuHiddenObservable as ot, MenuItemType as lt, RibbonDataGroup as Mr, KeyCode as $r, MetaKeys as _t, ComponentManager as xr, IShortcutService as Ur, IMenuManagerService as kr, IMessageService as Hr } from "@univerjs/ui";
|
|
8
8
|
import { COLOR_BLACK_RGB as gt, Rect as St, Shape as Dr, IRenderManagerService as Dt } from "@univerjs/engine-render";
|
|
9
|
-
import { RefRangeService as Br, SheetPermissionCheckController as Wr, SheetsSelectionsService as
|
|
10
|
-
import { BehaviorSubject as
|
|
11
|
-
import { IRPCChannelService as
|
|
12
|
-
import { clsx as Pe, borderClassName as ct, Select as Ct, RadioGroup as
|
|
9
|
+
import { RefRangeService as Br, SheetPermissionCheckController as Wr, SheetsSelectionsService as Qr, getSheetCommandTarget as Vr, WorksheetFilterPermission as pe, WorksheetViewPermission as ve, RangeProtectionPermissionViewPoint as _e, expandToContinuousRange as jr, SheetInterceptorService as Gr, SetRangeValuesMutation as Yr, INTERCEPTOR_POINT as Zr } from "@univerjs/sheets";
|
|
10
|
+
import { BehaviorSubject as V, ReplaySubject as Kr, Subject as qr, merge as Xr, combineLatest as zr, throttleTime as Bt, startWith as Wt, map as ce, shareReplay as Jr, of as me, switchMap as at, filter as ei, takeUntil as ti, distinctUntilChanged as ri } from "rxjs";
|
|
11
|
+
import { IRPCChannelService as Qt, toModule as ii, fromModule as si } from "@univerjs/rpc";
|
|
12
|
+
import { clsx as Pe, borderClassName as ct, Select as Ct, RadioGroup as ni, Radio as Tt, Input as Vt, Checkbox as oi, Tree as li, Segmented as ai, Button as Ze, MessageType as ci } from "@univerjs/design";
|
|
13
13
|
import { jsx as p, jsxs as I, Fragment as Et } from "react/jsx-runtime";
|
|
14
|
-
import { forwardRef as
|
|
14
|
+
import { forwardRef as Fe, useRef as ui, createElement as ye, useCallback as k, useMemo as ut } from "react";
|
|
15
15
|
var y = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SECOND", t))(y || {}), g = /* @__PURE__ */ ((t) => (t.NONE = "none", t.STARTS_WITH = "startsWith", t.DOES_NOT_START_WITH = "doesNotStartWith", t.ENDS_WITH = "endsWith", t.DOES_NOT_END_WITH = "doesNotEndWith", t.CONTAINS = "contains", t.DOES_NOT_CONTAIN = "doesNotContain", t.EQUALS = "equals", t.NOT_EQUALS = "notEquals", t.EMPTY = "empty", t.NOT_EMPTY = "notEmpty", t.BETWEEN = "between", t.NOT_BETWEEN = "notBetween", t.CUSTOM = "custom", t))(g || {}), m;
|
|
16
16
|
((t) => {
|
|
17
17
|
t.NONE = {
|
|
@@ -390,10 +390,10 @@ var y = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
|
|
|
390
390
|
testMappingParams: () => !0,
|
|
391
391
|
mapToFilterColumn: (i) => {
|
|
392
392
|
const { and: o, val1: l, val2: c, operator1: h, operator2: d } = i;
|
|
393
|
-
function C(b,
|
|
393
|
+
function C(b, F) {
|
|
394
394
|
for (const R of t.ALL_CONDITIONS)
|
|
395
395
|
if (R.operator === b)
|
|
396
|
-
return R.mapToFilterColumn({ val1:
|
|
396
|
+
return R.mapToFilterColumn({ val1: F, operator1: b });
|
|
397
397
|
}
|
|
398
398
|
const f = !h || h === t.NONE.operator, _ = !d || d === t.NONE.operator;
|
|
399
399
|
if (f && _)
|
|
@@ -402,13 +402,13 @@ var y = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
|
|
|
402
402
|
return C(d, c);
|
|
403
403
|
if (_)
|
|
404
404
|
return C(h, l);
|
|
405
|
-
const S = C(h, l), E = C(d, c),
|
|
405
|
+
const S = C(h, l), E = C(d, c), N = {
|
|
406
406
|
customFilters: [
|
|
407
407
|
S.customFilters.customFilters[0],
|
|
408
408
|
E.customFilters.customFilters[0]
|
|
409
409
|
]
|
|
410
410
|
};
|
|
411
|
-
return o && (
|
|
411
|
+
return o && (N.and = mt.TRUE), { customFilters: N };
|
|
412
412
|
},
|
|
413
413
|
testMappingFilterColumn: (i) => {
|
|
414
414
|
var c;
|
|
@@ -463,15 +463,15 @@ var y = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
|
|
|
463
463
|
throw new Error("[SheetsFilter]: no condition item can be mapped from the filter map params!");
|
|
464
464
|
}
|
|
465
465
|
t.testMappingParams = r;
|
|
466
|
-
function
|
|
466
|
+
function s(i) {
|
|
467
467
|
const o = t.ALL_CONDITIONS.find((l) => l.operator === i);
|
|
468
468
|
return (o == null ? void 0 : o.numOfParameters) === 0 ? { operator1: o.operator } : o.getDefaultFormParams();
|
|
469
469
|
}
|
|
470
|
-
t.getInitialFormParams =
|
|
471
|
-
function
|
|
470
|
+
t.getInitialFormParams = s;
|
|
471
|
+
function n(i, o) {
|
|
472
472
|
return i.mapToFilterColumn(o);
|
|
473
473
|
}
|
|
474
|
-
t.mapToFilterColumn =
|
|
474
|
+
t.mapToFilterColumn = n;
|
|
475
475
|
function a(i) {
|
|
476
476
|
if (!i)
|
|
477
477
|
return [t.NONE, {}];
|
|
@@ -485,67 +485,67 @@ var y = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
|
|
|
485
485
|
t.testMappingFilterColumn = a;
|
|
486
486
|
})(m || (m = {}));
|
|
487
487
|
function U(t) {
|
|
488
|
-
const { operator1: e, operator2: r, val1:
|
|
488
|
+
const { operator1: e, operator2: r, val1: s, val2: n } = t;
|
|
489
489
|
if (e && r)
|
|
490
490
|
throw new Error("Both operator1 and operator2 are set!");
|
|
491
491
|
if (!e && !r)
|
|
492
492
|
throw new Error("Neither operator1 and operator2 and both not set!");
|
|
493
|
-
return e ? [e,
|
|
493
|
+
return e ? [e, s] : [r, n];
|
|
494
494
|
}
|
|
495
495
|
function ze(t) {
|
|
496
496
|
const e = [], r = [];
|
|
497
|
-
let
|
|
497
|
+
let s = 0, n = 0;
|
|
498
498
|
function a(i) {
|
|
499
|
-
i.leaf && (i.checked ? (e.push(i),
|
|
499
|
+
i.leaf && (i.checked ? (e.push(i), s += i.count) : (r.push(i), n += i.count)), i.children && i.children.forEach(a);
|
|
500
500
|
}
|
|
501
501
|
return t.forEach(a), {
|
|
502
502
|
checkedItems: e,
|
|
503
503
|
uncheckedItems: r,
|
|
504
|
-
checked:
|
|
505
|
-
unchecked:
|
|
504
|
+
checked: s,
|
|
505
|
+
unchecked: n
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
|
-
var
|
|
509
|
-
for (var
|
|
510
|
-
(i = t[a]) && (
|
|
511
|
-
return
|
|
512
|
-
}, Ke = (t, e) => (r,
|
|
513
|
-
const ht = "sheets-filter.generate-filter-values.service", we = Pt(ht),
|
|
508
|
+
var hi = Object.getOwnPropertyDescriptor, di = (t, e, r, s) => {
|
|
509
|
+
for (var n = s > 1 ? void 0 : s ? hi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
510
|
+
(i = t[a]) && (n = i(n) || n);
|
|
511
|
+
return n;
|
|
512
|
+
}, Ke = (t, e) => (r, s) => e(r, s, t);
|
|
513
|
+
const ht = "sheets-filter.generate-filter-values.service", we = Pt(ht), mi = ["yyyy-mm-dd", "yyyy-mm-dd;@", "yyyy/mm/dd;@", "yyyy/mm/dd hh:mm", "yyyy-m-d am/pm h:mm", "yyyy-MM-dd", "yyyy/MM/dd", "yyyy/mm/dd", 'yyyy"年"MM"月"dd"日"', "MM-dd", 'M"月"d"日"', "MM-dd A/P hh:mm"];
|
|
514
514
|
let Je = class extends de {
|
|
515
515
|
constructor(t, e, r) {
|
|
516
516
|
super(), this._localeService = t, this._univerInstanceService = e, this._logService = r;
|
|
517
517
|
}
|
|
518
518
|
async getFilterValues(t) {
|
|
519
519
|
var d;
|
|
520
|
-
const { unitId: e, subUnitId: r, filteredOutRowsByOtherColumns:
|
|
520
|
+
const { unitId: e, subUnitId: r, filteredOutRowsByOtherColumns: s, filterColumn: n, filters: a, blankChecked: i, iterateRange: o, alreadyChecked: l } = t, c = this._univerInstanceService.getUnit(e), h = (d = this._univerInstanceService.getUnit(e)) == null ? void 0 : d.getSheetBySheetId(r);
|
|
521
521
|
return !c || !h ? [] : (this._logService.debug("[SheetsGenerateFilterValuesService]", "getFilterValues for", { unitId: e, subUnitId: r }), jt(
|
|
522
522
|
a,
|
|
523
523
|
this._localeService,
|
|
524
524
|
o,
|
|
525
525
|
h,
|
|
526
|
-
new Set(
|
|
527
|
-
|
|
526
|
+
new Set(s),
|
|
527
|
+
n,
|
|
528
528
|
new Set(l.map(String)),
|
|
529
529
|
i,
|
|
530
530
|
c.getStyles()
|
|
531
531
|
));
|
|
532
532
|
}
|
|
533
533
|
};
|
|
534
|
-
Je =
|
|
534
|
+
Je = di([
|
|
535
535
|
Ke(0, T(X)),
|
|
536
536
|
Ke(1, Be),
|
|
537
537
|
Ke(2, lr)
|
|
538
538
|
], Je);
|
|
539
|
-
function jt(t, e, r,
|
|
540
|
-
var
|
|
541
|
-
const c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), d = "yyyy-mm-dd", C = new Set(
|
|
539
|
+
function jt(t, e, r, s, n, a, i, o, l) {
|
|
540
|
+
var N, b, F, R, L, G, Y, ne, x, A;
|
|
541
|
+
const c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), d = "yyyy-mm-dd", C = new Set(mi), f = "empty", _ = !t && ((a == null ? void 0 : a.filterBy) === w.COLORS || (a == null ? void 0 : a.filterBy) === w.CONDITIONS) && ((N = a.filteredOutRows) == null ? void 0 : N.size);
|
|
542
542
|
let S = 0;
|
|
543
|
-
for (const P of
|
|
543
|
+
for (const P of s.iterateByColumn(r, !1, !1)) {
|
|
544
544
|
const { row: je, rowSpan: dt = 1 } = P;
|
|
545
545
|
let oe = 0;
|
|
546
546
|
for (; oe < dt; ) {
|
|
547
547
|
const ir = je + oe;
|
|
548
|
-
if (
|
|
548
|
+
if (n.has(ir)) {
|
|
549
549
|
oe++;
|
|
550
550
|
continue;
|
|
551
551
|
}
|
|
@@ -554,9 +554,9 @@ function jt(t, e, r, n, s, a, i, o, l) {
|
|
|
554
554
|
S += 1, oe += dt;
|
|
555
555
|
continue;
|
|
556
556
|
}
|
|
557
|
-
const Ie = (b = P.value) != null && b.v && !P.value.p ? (L = (R = l.get((
|
|
558
|
-
if (Ie &&
|
|
559
|
-
const Z = (G =
|
|
557
|
+
const Ie = (b = P.value) != null && b.v && !P.value.p ? (L = (R = l.get((F = P.value) == null ? void 0 : F.s)) == null ? void 0 : R.n) == null ? void 0 : L.pattern : "", sr = Ie && ft.getFormatInfo(Ie).isDate;
|
|
558
|
+
if (Ie && sr && C.has(Ie)) {
|
|
559
|
+
const Z = (G = s.getCellRaw(P.row, P.col)) == null ? void 0 : G.v;
|
|
560
560
|
if (!Z) {
|
|
561
561
|
oe++;
|
|
562
562
|
continue;
|
|
@@ -579,7 +579,7 @@ function jt(t, e, r, n, s, a, i, o, l) {
|
|
|
579
579
|
count: 0,
|
|
580
580
|
leaf: !1,
|
|
581
581
|
checked: !1
|
|
582
|
-
}, (
|
|
582
|
+
}, (ne = ee.children) == null || ne.push(W), h.set(`${O}-${H}`, [`${O}`, `${O}-${H}`]));
|
|
583
583
|
const Ge = (x = W == null ? void 0 : W.children) == null ? void 0 : x.find((Ye) => Ye.key === `${O}-${H}-${fe}`);
|
|
584
584
|
Ge ? (Ge.originValues.add(J), Ge.count++, W.count++, ee.count++) : ((A = W.children) == null || A.push({
|
|
585
585
|
title: `${fe}`,
|
|
@@ -615,34 +615,34 @@ function jt(t, e, r, n, s, a, i, o, l) {
|
|
|
615
615
|
c.set("empty", P), h.set("empty", [f]);
|
|
616
616
|
}
|
|
617
617
|
return {
|
|
618
|
-
filterTreeItems:
|
|
618
|
+
filterTreeItems: fi(Array.from(c.values())),
|
|
619
619
|
filterTreeMapCache: h
|
|
620
620
|
};
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return Array.from(t).sort((e, r) => e.children && !r.children ? -1 : !e.children && r.children ? 1 :
|
|
624
|
-
const
|
|
625
|
-
return
|
|
622
|
+
function fi(t) {
|
|
623
|
+
return Array.from(t).sort((e, r) => e.children && !r.children ? -1 : !e.children && r.children ? 1 : pi(e.title, r.title)).map((e) => (e.children && e.children.sort((r, s) => {
|
|
624
|
+
const n = Number.parseInt(r.key.split("-")[1], 10), a = Number.parseInt(s.key.split("-")[1], 10);
|
|
625
|
+
return n - a;
|
|
626
626
|
}).forEach((r) => {
|
|
627
|
-
r.children && r.children.sort((
|
|
628
|
-
const a = Number.parseInt(
|
|
627
|
+
r.children && r.children.sort((s, n) => {
|
|
628
|
+
const a = Number.parseInt(s.key.split("-")[2], 10), i = Number.parseInt(n.key.split("-")[2], 10);
|
|
629
629
|
return a - i;
|
|
630
630
|
});
|
|
631
631
|
}), e));
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
function
|
|
635
|
-
const r =
|
|
636
|
-
return r &&
|
|
633
|
+
const Nt = (t) => !Number.isNaN(Number(t)) && !Number.isNaN(Number.parseFloat(t));
|
|
634
|
+
function pi(t, e) {
|
|
635
|
+
const r = Nt(t), s = Nt(e);
|
|
636
|
+
return r && s ? Number.parseFloat(t) - Number.parseFloat(e) : r && !s ? -1 : !r && s ? 1 : t.localeCompare(e);
|
|
637
637
|
}
|
|
638
638
|
function et(t, e) {
|
|
639
639
|
for (const r of t) {
|
|
640
640
|
if (r.key === e)
|
|
641
641
|
return r;
|
|
642
642
|
if (r.children) {
|
|
643
|
-
const
|
|
644
|
-
if (
|
|
645
|
-
return
|
|
643
|
+
const s = et(r.children, e);
|
|
644
|
+
if (s)
|
|
645
|
+
return s;
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
return null;
|
|
@@ -655,43 +655,43 @@ function ge(t, e) {
|
|
|
655
655
|
}
|
|
656
656
|
function Yt(t, e) {
|
|
657
657
|
const r = [];
|
|
658
|
-
return t.forEach((
|
|
659
|
-
const
|
|
660
|
-
(o) => Array.from(
|
|
658
|
+
return t.forEach((s) => {
|
|
659
|
+
const n = s.originValues ? e.some(
|
|
660
|
+
(o) => Array.from(s.originValues).some(
|
|
661
661
|
(l) => l.toLowerCase().includes(o.toLowerCase())
|
|
662
662
|
)
|
|
663
|
-
) : !1, a = !
|
|
664
|
-
(o) =>
|
|
663
|
+
) : !1, a = !n && e.some(
|
|
664
|
+
(o) => s.title.toLowerCase().includes(o.toLowerCase())
|
|
665
665
|
);
|
|
666
|
-
if (
|
|
667
|
-
r.push({ ...
|
|
668
|
-
else if (
|
|
669
|
-
const o = Yt(
|
|
666
|
+
if (n || a)
|
|
667
|
+
r.push({ ...s });
|
|
668
|
+
else if (s.children) {
|
|
669
|
+
const o = Yt(s.children, e);
|
|
670
670
|
if (o.length > 0) {
|
|
671
671
|
const l = o.reduce((c, h) => c + h.count, 0);
|
|
672
|
-
r.push({ ...
|
|
672
|
+
r.push({ ...s, count: l, children: o });
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
}), r;
|
|
676
676
|
}
|
|
677
|
-
var
|
|
678
|
-
for (var
|
|
679
|
-
(i = t[a]) && (
|
|
680
|
-
return
|
|
681
|
-
}, Te = (t, e) => (r,
|
|
677
|
+
var vi = Object.getOwnPropertyDescriptor, Ve = (t, e, r, s) => {
|
|
678
|
+
for (var n = s > 1 ? void 0 : s ? vi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
679
|
+
(i = t[a]) && (n = i(n) || n);
|
|
680
|
+
return n;
|
|
681
|
+
}, Te = (t, e) => (r, s) => e(r, s, t);
|
|
682
682
|
Pt("sheets-filter-ui.sheets-filter-panel.service");
|
|
683
683
|
let q = class extends de {
|
|
684
684
|
constructor(e, r) {
|
|
685
685
|
super();
|
|
686
|
-
v(this, "_filterBy$", new
|
|
686
|
+
v(this, "_filterBy$", new V(w.VALUES));
|
|
687
687
|
v(this, "filterBy$", this._filterBy$.asObservable());
|
|
688
|
-
v(this, "_filterByModel$", new
|
|
688
|
+
v(this, "_filterByModel$", new Kr(1));
|
|
689
689
|
v(this, "filterByModel$", this._filterByModel$.asObservable());
|
|
690
690
|
v(this, "_filterByModel", null);
|
|
691
|
-
v(this, "_hasCriteria$", new
|
|
691
|
+
v(this, "_hasCriteria$", new V(!1));
|
|
692
692
|
v(this, "hasCriteria$", this._hasCriteria$.asObservable());
|
|
693
693
|
v(this, "_filterModel", null);
|
|
694
|
-
v(this, "_col$", new
|
|
694
|
+
v(this, "_col$", new V(-1));
|
|
695
695
|
v(this, "col$", this._col$.asObservable());
|
|
696
696
|
v(this, "_filterHeaderListener", null);
|
|
697
697
|
this._injector = e, this._refRangeService = r;
|
|
@@ -716,18 +716,18 @@ let q = class extends de {
|
|
|
716
716
|
}
|
|
717
717
|
setupCol(e, r) {
|
|
718
718
|
this.terminate(), this._filterModel = e, this._col$.next(r);
|
|
719
|
-
const
|
|
720
|
-
if (
|
|
721
|
-
const
|
|
722
|
-
if (
|
|
719
|
+
const s = e.getFilterColumn(r);
|
|
720
|
+
if (s) {
|
|
721
|
+
const n = s.getColumnData();
|
|
722
|
+
if (n.customFilters) {
|
|
723
723
|
this._hasCriteria$.next(!0), this._setupByConditions(e, r);
|
|
724
724
|
return;
|
|
725
725
|
}
|
|
726
|
-
if (
|
|
726
|
+
if (n.colorFilters) {
|
|
727
727
|
this._hasCriteria$.next(!0), this._setupByColors(e, r);
|
|
728
728
|
return;
|
|
729
729
|
}
|
|
730
|
-
if (
|
|
730
|
+
if (n.filters) {
|
|
731
731
|
this._hasCriteria$.next(!0), this._setupByValues(e, r);
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
@@ -761,13 +761,13 @@ let q = class extends de {
|
|
|
761
761
|
}
|
|
762
762
|
_listenToFilterHeaderChange(e, r) {
|
|
763
763
|
this._disposeFilterHeaderChangeListener();
|
|
764
|
-
const
|
|
764
|
+
const s = e.unitId, n = e.subUnitId, a = e.getRange(), i = {
|
|
765
765
|
startColumn: r,
|
|
766
766
|
startRow: a.startRow,
|
|
767
767
|
endRow: a.startRow,
|
|
768
768
|
endColumn: r
|
|
769
769
|
};
|
|
770
|
-
this._filterHeaderListener = this._refRangeService.watchRange(
|
|
770
|
+
this._filterHeaderListener = this._refRangeService.watchRange(s, n, i, (o, l) => {
|
|
771
771
|
if (!l)
|
|
772
772
|
this.terminate();
|
|
773
773
|
else {
|
|
@@ -778,56 +778,56 @@ let q = class extends de {
|
|
|
778
778
|
}
|
|
779
779
|
async _setupByValues(e, r) {
|
|
780
780
|
this._disposePreviousModel();
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
const
|
|
781
|
+
const s = e.getRange();
|
|
782
|
+
if (s.startRow === s.endRow) return !1;
|
|
783
|
+
const n = await Me.fromFilterColumn(
|
|
784
784
|
this._injector,
|
|
785
785
|
e,
|
|
786
786
|
r
|
|
787
787
|
);
|
|
788
|
-
return this.filterByModel =
|
|
788
|
+
return this.filterByModel = n, this._filterBy$.next(w.VALUES), this._listenToFilterHeaderChange(e, r), !0;
|
|
789
789
|
}
|
|
790
790
|
async _setupByColors(e, r) {
|
|
791
791
|
this._disposePreviousModel();
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
const
|
|
792
|
+
const s = e.getRange();
|
|
793
|
+
if (s.startRow === s.endRow) return !1;
|
|
794
|
+
const n = await $e.fromFilterColumn(
|
|
795
795
|
this._injector,
|
|
796
796
|
e,
|
|
797
797
|
r
|
|
798
798
|
);
|
|
799
|
-
return this.filterByModel =
|
|
799
|
+
return this.filterByModel = n, this._filterBy$.next(w.COLORS), this._listenToFilterHeaderChange(e, r), !0;
|
|
800
800
|
}
|
|
801
801
|
_setupByConditions(e, r) {
|
|
802
802
|
this._disposePreviousModel();
|
|
803
|
-
const
|
|
804
|
-
if (
|
|
805
|
-
const
|
|
803
|
+
const s = e.getRange();
|
|
804
|
+
if (s.startRow === s.endRow) return !1;
|
|
805
|
+
const n = Le.fromFilterColumn(
|
|
806
806
|
this._injector,
|
|
807
807
|
e,
|
|
808
808
|
r,
|
|
809
809
|
e.getFilterColumn(r)
|
|
810
810
|
);
|
|
811
|
-
return this.filterByModel =
|
|
811
|
+
return this.filterByModel = n, this._filterBy$.next(w.CONDITIONS), this._listenToFilterHeaderChange(e, r), !0;
|
|
812
812
|
}
|
|
813
813
|
_disposePreviousModel() {
|
|
814
814
|
var e;
|
|
815
815
|
(e = this._filterByModel) == null || e.dispose(), this.filterByModel = null;
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
|
-
q =
|
|
818
|
+
q = Ve([
|
|
819
819
|
Te(0, T(ie)),
|
|
820
820
|
Te(1, T(Br))
|
|
821
821
|
], q);
|
|
822
822
|
let Le = class extends de {
|
|
823
|
-
constructor(e, r,
|
|
823
|
+
constructor(e, r, s, n, a) {
|
|
824
824
|
super();
|
|
825
825
|
v(this, "canApply$", me(!0));
|
|
826
826
|
v(this, "_conditionItem$");
|
|
827
827
|
v(this, "conditionItem$");
|
|
828
828
|
v(this, "_filterConditionFormParams$");
|
|
829
829
|
v(this, "filterConditionFormParams$");
|
|
830
|
-
this._filterModel = e, this.col = r, this._commandService = a, this._conditionItem$ = new
|
|
830
|
+
this._filterModel = e, this.col = r, this._commandService = a, this._conditionItem$ = new V(s), this.conditionItem$ = this._conditionItem$.asObservable(), this._filterConditionFormParams$ = new V(n), 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
|
|
@@ -840,9 +840,9 @@ let Le = class extends de {
|
|
|
840
840
|
*
|
|
841
841
|
* @returns the model to control the panel's state
|
|
842
842
|
*/
|
|
843
|
-
static fromFilterColumn(e, r,
|
|
844
|
-
const [a, i] = m.testMappingFilterColumn(
|
|
845
|
-
return e.createInstance(Le, r,
|
|
843
|
+
static fromFilterColumn(e, r, s, n) {
|
|
844
|
+
const [a, i] = m.testMappingFilterColumn(n == null ? void 0 : n.getColumnData());
|
|
845
|
+
return e.createInstance(Le, r, s, a, i);
|
|
846
846
|
}
|
|
847
847
|
get conditionItem() {
|
|
848
848
|
return this._conditionItem$.getValue();
|
|
@@ -857,7 +857,7 @@ let Le = class extends de {
|
|
|
857
857
|
this.col += e;
|
|
858
858
|
}
|
|
859
859
|
clear() {
|
|
860
|
-
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(
|
|
860
|
+
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(Q.id, {
|
|
861
861
|
unitId: this._filterModel.unitId,
|
|
862
862
|
subUnitId: this._filterModel.subUnitId,
|
|
863
863
|
col: this.col,
|
|
@@ -870,7 +870,7 @@ let Le = class extends de {
|
|
|
870
870
|
async apply() {
|
|
871
871
|
if (this._disposed) return !1;
|
|
872
872
|
const e = m.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
|
|
873
|
-
return this._commandService.executeCommand(
|
|
873
|
+
return this._commandService.executeCommand(Q.id, {
|
|
874
874
|
unitId: this._filterModel.unitId,
|
|
875
875
|
subUnitId: this._filterModel.subUnitId,
|
|
876
876
|
col: this.col,
|
|
@@ -882,7 +882,7 @@ let Le = class extends de {
|
|
|
882
882
|
* `IFilterConditionFormParams` and load default condition form params.
|
|
883
883
|
*/
|
|
884
884
|
onPrimaryConditionChange(e) {
|
|
885
|
-
const r = m.ALL_CONDITIONS.find((
|
|
885
|
+
const r = m.ALL_CONDITIONS.find((s) => s.operator === e);
|
|
886
886
|
if (!r)
|
|
887
887
|
throw new Error(`[ByConditionsModel]: condition item not found for operator: ${e}!`);
|
|
888
888
|
this._conditionItem$.next(r), this._filterConditionFormParams$.next(m.getInitialFormParams(e));
|
|
@@ -898,17 +898,17 @@ let Le = class extends de {
|
|
|
898
898
|
onConditionFormChange(e) {
|
|
899
899
|
const r = { ...this.filterConditionFormParams, ...e };
|
|
900
900
|
if (r.and !== !0 && delete r.and, typeof e.and < "u" || typeof e.operator1 < "u" || typeof e.operator2 < "u") {
|
|
901
|
-
const
|
|
902
|
-
this._conditionItem$.next(
|
|
901
|
+
const s = m.testMappingParams(r, this.conditionItem.numOfParameters);
|
|
902
|
+
this._conditionItem$.next(s);
|
|
903
903
|
}
|
|
904
904
|
this._filterConditionFormParams$.next(r);
|
|
905
905
|
}
|
|
906
906
|
};
|
|
907
|
-
Le =
|
|
907
|
+
Le = Ve([
|
|
908
908
|
Te(4, j)
|
|
909
909
|
], Le);
|
|
910
910
|
let Me = class extends de {
|
|
911
|
-
constructor(e, r,
|
|
911
|
+
constructor(e, r, s, n, a) {
|
|
912
912
|
super();
|
|
913
913
|
v(this, "_rawFilterItems$");
|
|
914
914
|
v(this, "rawFilterItems$");
|
|
@@ -919,8 +919,8 @@ let Me = class extends de {
|
|
|
919
919
|
v(this, "_manuallyUpdateFilterItems$");
|
|
920
920
|
v(this, "_searchString$");
|
|
921
921
|
v(this, "searchString$");
|
|
922
|
-
this._filterModel = e, this.col = r, this._commandService = a, this._treeMapCache =
|
|
923
|
-
|
|
922
|
+
this._filterModel = e, this.col = r, this._commandService = a, this._treeMapCache = n, this._searchString$ = new V(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new V(s), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new qr(), this.filterItems$ = Xr(
|
|
923
|
+
zr([
|
|
924
924
|
this._searchString$.pipe(
|
|
925
925
|
Bt(500, void 0, { leading: !0, trailing: !0 }),
|
|
926
926
|
Wt(void 0)
|
|
@@ -934,7 +934,7 @@ let Me = class extends de {
|
|
|
934
934
|
})
|
|
935
935
|
),
|
|
936
936
|
this._manuallyUpdateFilterItems$
|
|
937
|
-
).pipe(
|
|
937
|
+
).pipe(Jr(1)), this.canApply$ = this.filterItems$.pipe(ce((i) => ze(i).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((i) => this._filterItems = i));
|
|
938
938
|
}
|
|
939
939
|
/**
|
|
940
940
|
* Create a model with targeting filter column. If there is not a filter column, the model would be created with
|
|
@@ -946,40 +946,40 @@ let Me = class extends de {
|
|
|
946
946
|
*
|
|
947
947
|
* @returns the model to control the panel's state
|
|
948
948
|
*/
|
|
949
|
-
static async fromFilterColumn(e, r,
|
|
950
|
-
const
|
|
949
|
+
static async fromFilterColumn(e, r, s) {
|
|
950
|
+
const n = e.get(Be), a = e.get(X), i = e.get(we, wt.OPTIONAL), { unitId: o, subUnitId: l } = r, c = n.getUniverSheetInstance(o);
|
|
951
951
|
if (!c) throw new Error(`[ByValuesModel]: Workbook not found for filter model with unitId: ${o}!`);
|
|
952
952
|
const h = c == null ? void 0 : c.getSheetBySheetId(l);
|
|
953
953
|
if (!h) throw new Error(`[ByValuesModel]: Worksheet not found for filter model with unitId: ${o} and subUnitId: ${l}!`);
|
|
954
|
-
const d = r.getRange(), C =
|
|
955
|
-
let
|
|
954
|
+
const d = r.getRange(), C = s, f = r.getFilterColumn(s), _ = f == null ? void 0 : f.getColumnData().filters, S = new Set(_ == null ? void 0 : _.filters), E = !!(_ && _.blank), N = r.getFilteredOutRowsExceptCol(s), b = { ...d, startRow: d.startRow + 1, startColumn: C, endColumn: C };
|
|
955
|
+
let F, R;
|
|
956
956
|
if (i) {
|
|
957
957
|
const L = await i.getFilterValues({
|
|
958
958
|
unitId: o,
|
|
959
959
|
subUnitId: l,
|
|
960
|
-
filteredOutRowsByOtherColumns: Array.from(
|
|
960
|
+
filteredOutRowsByOtherColumns: Array.from(N),
|
|
961
961
|
filterColumn: f,
|
|
962
962
|
filters: !!_,
|
|
963
963
|
blankChecked: E,
|
|
964
964
|
iterateRange: b,
|
|
965
965
|
alreadyChecked: Array.from(S)
|
|
966
966
|
});
|
|
967
|
-
|
|
967
|
+
F = L.filterTreeItems, R = L.filterTreeMapCache;
|
|
968
968
|
} else {
|
|
969
969
|
const L = jt(
|
|
970
970
|
!!_,
|
|
971
971
|
a,
|
|
972
972
|
b,
|
|
973
973
|
h,
|
|
974
|
-
|
|
974
|
+
N,
|
|
975
975
|
f,
|
|
976
976
|
S,
|
|
977
977
|
E,
|
|
978
978
|
c.getStyles()
|
|
979
979
|
);
|
|
980
|
-
|
|
980
|
+
F = L.filterTreeItems, R = L.filterTreeMapCache;
|
|
981
981
|
}
|
|
982
|
-
return e.createInstance(Me, r,
|
|
982
|
+
return e.createInstance(Me, r, s, F, R);
|
|
983
983
|
}
|
|
984
984
|
get rawFilterItems() {
|
|
985
985
|
return this._rawFilterItems$.getValue();
|
|
@@ -1001,23 +1001,23 @@ let Me = class extends de {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
onCheckAllToggled(e) {
|
|
1003
1003
|
const r = Re.deepClone(this._filterItems);
|
|
1004
|
-
r.forEach((
|
|
1004
|
+
r.forEach((s) => ge(s, e)), this._manuallyUpdateFilterItems(r);
|
|
1005
1005
|
}
|
|
1006
1006
|
/**
|
|
1007
1007
|
* Toggle a filter item.
|
|
1008
1008
|
*/
|
|
1009
1009
|
onFilterCheckToggled(e) {
|
|
1010
|
-
const r = Re.deepClone(this._filterItems),
|
|
1011
|
-
if (!
|
|
1010
|
+
const r = Re.deepClone(this._filterItems), s = et(r, e.key);
|
|
1011
|
+
if (!s)
|
|
1012
1012
|
return;
|
|
1013
|
-
const
|
|
1014
|
-
ge(
|
|
1013
|
+
const n = Gt(s);
|
|
1014
|
+
ge(s, !n), this._manuallyUpdateFilterItems(r);
|
|
1015
1015
|
}
|
|
1016
1016
|
onFilterOnly(e) {
|
|
1017
1017
|
const r = Re.deepClone(this._filterItems);
|
|
1018
|
-
r.forEach((
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1018
|
+
r.forEach((s) => ge(s, !1)), e.forEach((s) => {
|
|
1019
|
+
const n = et(r, s);
|
|
1020
|
+
n && ge(n, !0);
|
|
1021
1021
|
}), this._manuallyUpdateFilterItems(r);
|
|
1022
1022
|
}
|
|
1023
1023
|
_manuallyUpdateFilterItems(e) {
|
|
@@ -1026,7 +1026,7 @@ let Me = class extends de {
|
|
|
1026
1026
|
// expose method here to let the panel change filter items
|
|
1027
1027
|
// #region ByValuesModel apply methods
|
|
1028
1028
|
clear() {
|
|
1029
|
-
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(
|
|
1029
|
+
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(Q.id, {
|
|
1030
1030
|
unitId: this._filterModel.unitId,
|
|
1031
1031
|
subUnitId: this._filterModel.subUnitId,
|
|
1032
1032
|
col: this.col,
|
|
@@ -1039,15 +1039,15 @@ let Me = class extends de {
|
|
|
1039
1039
|
async apply() {
|
|
1040
1040
|
if (this._disposed)
|
|
1041
1041
|
return !1;
|
|
1042
|
-
const e = ze(this._filterItems), { checked: r, checkedItems:
|
|
1042
|
+
const e = ze(this._filterItems), { checked: r, checkedItems: s } = e, n = this.rawFilterItems;
|
|
1043
1043
|
let a = 0;
|
|
1044
|
-
for (const c of
|
|
1044
|
+
for (const c of n)
|
|
1045
1045
|
a += c.count;
|
|
1046
1046
|
const i = r === 0, o = e.checked === a, l = { colId: this.col };
|
|
1047
1047
|
if (i)
|
|
1048
1048
|
throw new Error("[ByValuesModel]: no checked items!");
|
|
1049
1049
|
if (o)
|
|
1050
|
-
return this._commandService.executeCommand(
|
|
1050
|
+
return this._commandService.executeCommand(Q.id, {
|
|
1051
1051
|
unitId: this._filterModel.unitId,
|
|
1052
1052
|
subUnitId: this._filterModel.subUnitId,
|
|
1053
1053
|
col: this.col,
|
|
@@ -1055,12 +1055,12 @@ let Me = class extends de {
|
|
|
1055
1055
|
});
|
|
1056
1056
|
{
|
|
1057
1057
|
l.filters = {};
|
|
1058
|
-
const c =
|
|
1058
|
+
const c = s.filter((d) => d.key !== "empty");
|
|
1059
1059
|
c.length > 0 && (l.filters = {
|
|
1060
1060
|
filters: c.flatMap((d) => d.originValues ? Array.from(d.originValues) : [d.title])
|
|
1061
|
-
}), c.length !==
|
|
1061
|
+
}), c.length !== s.length && (l.filters.blank = !0);
|
|
1062
1062
|
}
|
|
1063
|
-
return this._commandService.executeCommand(
|
|
1063
|
+
return this._commandService.executeCommand(Q.id, {
|
|
1064
1064
|
unitId: this._filterModel.unitId,
|
|
1065
1065
|
subUnitId: this._filterModel.subUnitId,
|
|
1066
1066
|
col: this.col,
|
|
@@ -1069,18 +1069,18 @@ let Me = class extends de {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
// #endregion
|
|
1071
1071
|
};
|
|
1072
|
-
Me =
|
|
1072
|
+
Me = Ve([
|
|
1073
1073
|
Te(4, j)
|
|
1074
1074
|
], Me);
|
|
1075
1075
|
let $e = class extends de {
|
|
1076
|
-
constructor(e, r,
|
|
1076
|
+
constructor(e, r, s, n, a) {
|
|
1077
1077
|
super();
|
|
1078
1078
|
v(this, "canApply$", me(!0));
|
|
1079
1079
|
v(this, "_cellFillColors$");
|
|
1080
1080
|
v(this, "cellFillColors$");
|
|
1081
1081
|
v(this, "_cellTextColors$");
|
|
1082
1082
|
v(this, "cellTextColors$");
|
|
1083
|
-
this._filterModel = e, this.col = r, this._commandService = a, this._cellFillColors$ = new
|
|
1083
|
+
this._filterModel = e, this.col = r, this._commandService = a, this._cellFillColors$ = new V(Array.from(s.values())), this.cellFillColors$ = this._cellFillColors$.asObservable(), this._cellTextColors$ = new V(Array.from(n.values())), this.cellTextColors$ = this._cellTextColors$.asObservable();
|
|
1084
1084
|
}
|
|
1085
1085
|
/**
|
|
1086
1086
|
* Create a model with targeting filter column. If there is not a filter column, the model would be created with
|
|
@@ -1092,18 +1092,18 @@ let $e = class extends de {
|
|
|
1092
1092
|
*
|
|
1093
1093
|
* @returns the model to control the panel's state
|
|
1094
1094
|
*/
|
|
1095
|
-
static async fromFilterColumn(e, r,
|
|
1096
|
-
var b,
|
|
1097
|
-
const
|
|
1095
|
+
static async fromFilterColumn(e, r, s) {
|
|
1096
|
+
var b, F, R;
|
|
1097
|
+
const n = e.get(Be), { unitId: a, subUnitId: i } = r, o = n.getUniverSheetInstance(a);
|
|
1098
1098
|
if (!o) throw new Error(`[ByColorsModel]: Workbook not found for filter model with unitId: ${a}!`);
|
|
1099
1099
|
const l = o == null ? void 0 : o.getSheetBySheetId(i);
|
|
1100
1100
|
if (!l) throw new Error(`[ByColorsModel]: Worksheet not found for filter model with unitId: ${a} and subUnitId: ${i}!`);
|
|
1101
|
-
const c = r.getRange(), h =
|
|
1101
|
+
const c = r.getRange(), h = s, d = (b = r.getFilterColumn(s)) == null ? void 0 : b.getColumnData().colorFilters, C = r.getFilteredOutRowsExceptCol(s), f = { ...c, startRow: c.startRow + 1, startColumn: h, endColumn: h }, _ = /* @__PURE__ */ new Map(), S = new Set((F = d == null ? void 0 : d.cellFillColors) != null ? F : []), E = /* @__PURE__ */ new Map(), N = new Set((R = d == null ? void 0 : d.cellTextColors) != null ? R : []);
|
|
1102
1102
|
for (const L of l.iterateByColumn(f, !1, !0)) {
|
|
1103
|
-
const { row: G, col: Y, value:
|
|
1103
|
+
const { row: G, col: Y, value: ne } = L;
|
|
1104
1104
|
if (C.has(G))
|
|
1105
1105
|
continue;
|
|
1106
|
-
const x = l.getComposedCellStyleByCellData(G, Y,
|
|
1106
|
+
const x = l.getComposedCellStyleByCellData(G, Y, ne);
|
|
1107
1107
|
if (x.bg && x.bg.rgb) {
|
|
1108
1108
|
const A = new pt(x.bg.rgb).toRgbString();
|
|
1109
1109
|
_.has(A) || _.set(A, { color: A, checked: S.has(A) });
|
|
@@ -1111,11 +1111,11 @@ let $e = class extends de {
|
|
|
1111
1111
|
_.set("default-fill-color", { color: null, checked: S.has(null) });
|
|
1112
1112
|
if (x.cl && x.cl.rgb) {
|
|
1113
1113
|
const A = new pt(x.cl.rgb).toRgbString();
|
|
1114
|
-
E.has(A) || E.set(A, { color: A, checked:
|
|
1114
|
+
E.has(A) || E.set(A, { color: A, checked: N.has(A) });
|
|
1115
1115
|
} else
|
|
1116
|
-
E.set("default-font-color", { color: gt, checked:
|
|
1116
|
+
E.set("default-font-color", { color: gt, checked: N.has(gt) });
|
|
1117
1117
|
}
|
|
1118
|
-
return e.createInstance($e, r,
|
|
1118
|
+
return e.createInstance($e, r, s, _, E);
|
|
1119
1119
|
}
|
|
1120
1120
|
get cellFillColors() {
|
|
1121
1121
|
return this._cellFillColors$.getValue();
|
|
@@ -1132,7 +1132,7 @@ let $e = class extends de {
|
|
|
1132
1132
|
// expose method here to let the panel change filter items
|
|
1133
1133
|
// #region ByColorsModel apply methods
|
|
1134
1134
|
clear() {
|
|
1135
|
-
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(
|
|
1135
|
+
return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(Q.id, {
|
|
1136
1136
|
unitId: this._filterModel.unitId,
|
|
1137
1137
|
subUnitId: this._filterModel.subUnitId,
|
|
1138
1138
|
col: this.col,
|
|
@@ -1140,32 +1140,32 @@ let $e = class extends de {
|
|
|
1140
1140
|
});
|
|
1141
1141
|
}
|
|
1142
1142
|
onFilterCheckToggled(e, r = !0) {
|
|
1143
|
-
const
|
|
1143
|
+
const s = r ? this.cellFillColors : this.cellTextColors, n = [];
|
|
1144
1144
|
let a = !1;
|
|
1145
|
-
for (let i = 0; i <
|
|
1146
|
-
const o =
|
|
1145
|
+
for (let i = 0; i < s.length; i++) {
|
|
1146
|
+
const o = s[i];
|
|
1147
1147
|
if (o.color === e.color) {
|
|
1148
|
-
a = !0,
|
|
1148
|
+
a = !0, n.push({
|
|
1149
1149
|
color: o.color,
|
|
1150
1150
|
checked: !o.checked
|
|
1151
1151
|
});
|
|
1152
1152
|
continue;
|
|
1153
1153
|
}
|
|
1154
|
-
|
|
1154
|
+
n.push({
|
|
1155
1155
|
color: o.color,
|
|
1156
1156
|
checked: o.checked
|
|
1157
1157
|
});
|
|
1158
1158
|
}
|
|
1159
|
-
a && (this._resetColorsCheckedStatus(!r), r ? this._cellFillColors$.next([...
|
|
1159
|
+
a && (this._resetColorsCheckedStatus(!r), r ? this._cellFillColors$.next([...n]) : this._cellTextColors$.next([...n]));
|
|
1160
1160
|
}
|
|
1161
1161
|
_resetColorsCheckedStatus(e = !0) {
|
|
1162
|
-
const r = e ? this.cellFillColors : this.cellTextColors,
|
|
1163
|
-
for (let
|
|
1164
|
-
|
|
1165
|
-
color: r[
|
|
1162
|
+
const r = e ? this.cellFillColors : this.cellTextColors, s = [];
|
|
1163
|
+
for (let n = 0; n < r.length; n++)
|
|
1164
|
+
s.push({
|
|
1165
|
+
color: r[n].color,
|
|
1166
1166
|
checked: !1
|
|
1167
1167
|
});
|
|
1168
|
-
e ? this._cellFillColors$.next([...
|
|
1168
|
+
e ? this._cellFillColors$.next([...s]) : this._cellTextColors$.next([...s]);
|
|
1169
1169
|
}
|
|
1170
1170
|
/**
|
|
1171
1171
|
* Apply the filter condition to the target filter column.
|
|
@@ -1173,46 +1173,46 @@ let $e = class extends de {
|
|
|
1173
1173
|
async apply() {
|
|
1174
1174
|
if (this._disposed)
|
|
1175
1175
|
return !1;
|
|
1176
|
-
const e = this.cellFillColors.filter((
|
|
1176
|
+
const e = this.cellFillColors.filter((n) => n.checked).map((n) => n.color), r = this.cellTextColors.filter((n) => n.checked).map((n) => n.color);
|
|
1177
1177
|
if (e.length === 0 && r.length === 0)
|
|
1178
|
-
return this._commandService.executeCommand(
|
|
1178
|
+
return this._commandService.executeCommand(Q.id, {
|
|
1179
1179
|
unitId: this._filterModel.unitId,
|
|
1180
1180
|
subUnitId: this._filterModel.subUnitId,
|
|
1181
1181
|
col: this.col,
|
|
1182
1182
|
criteria: null
|
|
1183
1183
|
});
|
|
1184
|
-
const
|
|
1185
|
-
return e.length > 0 ?
|
|
1184
|
+
const s = { colId: this.col };
|
|
1185
|
+
return e.length > 0 ? s.colorFilters = {
|
|
1186
1186
|
cellFillColors: e
|
|
1187
|
-
} : r.length > 0 && (
|
|
1187
|
+
} : r.length > 0 && (s.colorFilters = {
|
|
1188
1188
|
cellTextColors: r
|
|
1189
|
-
}), this._commandService.executeCommand(
|
|
1189
|
+
}), this._commandService.executeCommand(Q.id, {
|
|
1190
1190
|
unitId: this._filterModel.unitId,
|
|
1191
1191
|
subUnitId: this._filterModel.subUnitId,
|
|
1192
1192
|
col: this.col,
|
|
1193
|
-
criteria:
|
|
1193
|
+
criteria: s
|
|
1194
1194
|
});
|
|
1195
1195
|
}
|
|
1196
1196
|
// #endregion
|
|
1197
1197
|
};
|
|
1198
|
-
$e =
|
|
1198
|
+
$e = Ve([
|
|
1199
1199
|
Te(4, j)
|
|
1200
1200
|
], $e);
|
|
1201
1201
|
const ue = "FILTER_PANEL_OPENED", xe = {
|
|
1202
1202
|
id: "sheet.operation.open-filter-panel",
|
|
1203
1203
|
type: We.OPERATION,
|
|
1204
1204
|
handler: (t, e) => {
|
|
1205
|
-
const r = t.get(
|
|
1205
|
+
const r = t.get(Qe), s = t.get(z), n = t.get(q);
|
|
1206
1206
|
t.get(j).syncExecuteCommand(Cr.id, { visible: !1 });
|
|
1207
|
-
const { unitId: i, subUnitId: o, col: l } = e, c =
|
|
1208
|
-
return c ? (
|
|
1207
|
+
const { unitId: i, subUnitId: o, col: l } = e, c = s.getFilterModel(i, o);
|
|
1208
|
+
return c ? (n.setupCol(c, l), r.getContextValue(ue) || r.setContextValue(ue, !0), !0) : !1;
|
|
1209
1209
|
}
|
|
1210
1210
|
}, Se = {
|
|
1211
1211
|
id: "sheet.operation.close-filter-panel",
|
|
1212
1212
|
type: We.OPERATION,
|
|
1213
1213
|
handler: (t) => {
|
|
1214
|
-
const e = t.get(
|
|
1215
|
-
return e.getContextValue(ue) ? (e.setContextValue(ue, !1),
|
|
1214
|
+
const e = t.get(Qe), r = t.get(q), s = t.get(Pr, wt.OPTIONAL);
|
|
1215
|
+
return e.getContextValue(ue) ? (e.setContextValue(ue, !1), s == null || s.focus(), r.terminate()) : !1;
|
|
1216
1216
|
}
|
|
1217
1217
|
}, Zt = {
|
|
1218
1218
|
id: "sheet.operation.apply-filter",
|
|
@@ -1222,21 +1222,21 @@ const ue = "FILTER_PANEL_OPENED", xe = {
|
|
|
1222
1222
|
return t.get(q).changeFilterBy(r);
|
|
1223
1223
|
}
|
|
1224
1224
|
}, Kt = "sheets-filter-ui.config", Ue = {};
|
|
1225
|
-
var
|
|
1226
|
-
for (var
|
|
1227
|
-
(i = t[a]) && (
|
|
1228
|
-
return
|
|
1229
|
-
}, ae = (t, e) => (r,
|
|
1225
|
+
var _i = Object.getOwnPropertyDescriptor, gi = (t, e, r, s) => {
|
|
1226
|
+
for (var n = s > 1 ? void 0 : s ? _i(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1227
|
+
(i = t[a]) && (n = i(n) || n);
|
|
1228
|
+
return n;
|
|
1229
|
+
}, ae = (t, e) => (r, s) => e(r, s, t);
|
|
1230
1230
|
let he = class extends de {
|
|
1231
|
-
constructor(t, e, r,
|
|
1232
|
-
super(), this._sheetsFilterService = t, this._localeService = e, this._commandService = r, this._sheetPermissionCheckPermission =
|
|
1231
|
+
constructor(t, e, r, s, n, a) {
|
|
1232
|
+
super(), this._sheetsFilterService = t, this._localeService = e, this._commandService = r, this._sheetPermissionCheckPermission = s, this._injector = n, this._sheetsSelectionService = a, this._commandExecutedListener();
|
|
1233
1233
|
}
|
|
1234
1234
|
_commandExecutedListener() {
|
|
1235
1235
|
this.disposeWithMe(
|
|
1236
1236
|
this._commandService.beforeCommandExecuted((t) => {
|
|
1237
|
-
var e, r,
|
|
1238
|
-
if (t.id ===
|
|
1239
|
-
const
|
|
1237
|
+
var e, r, s;
|
|
1238
|
+
if (t.id === Ne.id) {
|
|
1239
|
+
const n = this._injector.get(Be), a = Vr(n);
|
|
1240
1240
|
if (!a) return;
|
|
1241
1241
|
const { unitId: i, subUnitId: o, worksheet: l } = a, c = (e = this._sheetsFilterService.getFilterModel(i, o)) == null ? void 0 : e.getRange();
|
|
1242
1242
|
let h;
|
|
@@ -1262,8 +1262,8 @@ let he = class extends de {
|
|
|
1262
1262
|
h || this._sheetPermissionCheckPermission.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.filterErr"));
|
|
1263
1263
|
}
|
|
1264
1264
|
if (t.id === xe.id) {
|
|
1265
|
-
const
|
|
1266
|
-
l && (l.startColumn =
|
|
1265
|
+
const n = t.params, { unitId: a, subUnitId: i } = n, o = (s = this._sheetsFilterService.getFilterModel(a, i)) == null ? void 0 : s.getRange(), l = Re.deepClone(o);
|
|
1266
|
+
l && (l.startColumn = n.col, l.endColumn = n.col, this._sheetPermissionCheckPermission.permissionCheckWithRanges({
|
|
1267
1267
|
rangeTypes: [_e],
|
|
1268
1268
|
worksheetTypes: [pe, ve]
|
|
1269
1269
|
}, [l]) || this._sheetPermissionCheckPermission.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.filterErr")));
|
|
@@ -1272,47 +1272,47 @@ let he = class extends de {
|
|
|
1272
1272
|
);
|
|
1273
1273
|
}
|
|
1274
1274
|
};
|
|
1275
|
-
he =
|
|
1275
|
+
he = gi([
|
|
1276
1276
|
ae(0, T(z)),
|
|
1277
1277
|
ae(1, T(X)),
|
|
1278
1278
|
ae(2, j),
|
|
1279
1279
|
ae(3, T(Wr)),
|
|
1280
1280
|
ae(4, T(ie)),
|
|
1281
|
-
ae(5, T(
|
|
1281
|
+
ae(5, T(Qr))
|
|
1282
1282
|
], he);
|
|
1283
|
-
const K = 16,
|
|
1284
|
-
class
|
|
1285
|
-
static drawNoCriteria(e, r,
|
|
1283
|
+
const K = 16, Si = 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");
|
|
1284
|
+
class Ft {
|
|
1285
|
+
static drawNoCriteria(e, r, s, n) {
|
|
1286
1286
|
e.save(), St.drawWith(e, {
|
|
1287
1287
|
radius: 2,
|
|
1288
1288
|
width: K,
|
|
1289
1289
|
height: K,
|
|
1290
|
-
fill:
|
|
1291
|
-
}), e.lineCap = "square", e.strokeStyle =
|
|
1290
|
+
fill: n
|
|
1291
|
+
}), e.lineCap = "square", e.strokeStyle = s, e.scale(r / K, r / K), e.beginPath(), e.lineWidth = 1, e.lineCap = "round", e.moveTo(3, 4), e.lineTo(13, 4), e.moveTo(4.5, 8), e.lineTo(11.5, 8), e.moveTo(6, 12), e.lineTo(10, 12), e.stroke(), e.restore();
|
|
1292
1292
|
}
|
|
1293
|
-
static drawHasCriteria(e, r,
|
|
1293
|
+
static drawHasCriteria(e, r, s, n) {
|
|
1294
1294
|
e.save(), St.drawWith(e, {
|
|
1295
1295
|
radius: 2,
|
|
1296
1296
|
width: K,
|
|
1297
1297
|
height: K,
|
|
1298
|
-
fill:
|
|
1299
|
-
}), e.scale(r / K, r / K), e.fillStyle =
|
|
1298
|
+
fill: n
|
|
1299
|
+
}), e.scale(r / K, r / K), e.fillStyle = s, e.fill(Si), e.restore();
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
|
-
var
|
|
1303
|
-
for (var
|
|
1304
|
-
(i = t[a]) && (
|
|
1305
|
-
return
|
|
1306
|
-
}, qe = (t, e) => (r,
|
|
1302
|
+
var Ci = Object.getOwnPropertyDescriptor, Ti = (t, e, r, s) => {
|
|
1303
|
+
for (var n = s > 1 ? void 0 : s ? Ci(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1304
|
+
(i = t[a]) && (n = i(n) || n);
|
|
1305
|
+
return n;
|
|
1306
|
+
}, qe = (t, e) => (r, s) => e(r, s, t);
|
|
1307
1307
|
const B = 16, Ce = 1;
|
|
1308
1308
|
let tt = class extends Dr {
|
|
1309
|
-
constructor(e, r,
|
|
1309
|
+
constructor(e, r, s, n, a) {
|
|
1310
1310
|
super(e, r);
|
|
1311
1311
|
v(this, "_cellWidth", 0);
|
|
1312
1312
|
v(this, "_cellHeight", 0);
|
|
1313
1313
|
v(this, "_filterParams");
|
|
1314
1314
|
v(this, "_hovered", !1);
|
|
1315
|
-
this._contextService =
|
|
1315
|
+
this._contextService = s, this._commandService = n, this._themeService = a, this.setShapeProps(r), this.onPointerDown$.subscribeEvent((i) => this.onPointerDown(i)), this.onPointerEnter$.subscribeEvent(() => this.onPointerEnter()), this.onPointerLeave$.subscribeEvent(() => this.onPointerLeave());
|
|
1316
1316
|
}
|
|
1317
1317
|
setShapeProps(e) {
|
|
1318
1318
|
typeof e.cellHeight < "u" && (this._cellHeight = e.cellHeight), typeof e.cellWidth < "u" && (this._cellWidth = e.cellWidth), typeof e.filterParams < "u" && (this._filterParams = e.filterParams), this.transformByState({
|
|
@@ -1321,21 +1321,21 @@ let tt = class extends Dr {
|
|
|
1321
1321
|
});
|
|
1322
1322
|
}
|
|
1323
1323
|
_draw(e) {
|
|
1324
|
-
const r = this._cellHeight,
|
|
1324
|
+
const r = this._cellHeight, s = this._cellWidth, n = B - s, a = B - r;
|
|
1325
1325
|
e.save();
|
|
1326
1326
|
const i = new Path2D();
|
|
1327
|
-
i.rect(
|
|
1327
|
+
i.rect(n, a, s, r), e.clip(i);
|
|
1328
1328
|
const { hasCriteria: o } = this._filterParams, l = this._themeService.getColorFromTheme("primary.600"), c = this._hovered ? this._themeService.getColorFromTheme("gray.50") : "rgba(255, 255, 255, 1.0)";
|
|
1329
|
-
o ?
|
|
1329
|
+
o ? Ft.drawHasCriteria(e, B, l, c) : Ft.drawNoCriteria(e, B, l, c), e.restore();
|
|
1330
1330
|
}
|
|
1331
1331
|
onPointerDown(e) {
|
|
1332
1332
|
if (e.button === 2)
|
|
1333
1333
|
return;
|
|
1334
|
-
const { col: r, unitId:
|
|
1334
|
+
const { col: r, unitId: s, subUnitId: n } = this._filterParams;
|
|
1335
1335
|
this._contextService.getContextValue(ue) || !this._commandService.hasCommand(xe.id) || setTimeout(() => {
|
|
1336
1336
|
this._commandService.executeCommand(xe.id, {
|
|
1337
|
-
unitId:
|
|
1338
|
-
subUnitId:
|
|
1337
|
+
unitId: s,
|
|
1338
|
+
subUnitId: n,
|
|
1339
1339
|
col: r
|
|
1340
1340
|
});
|
|
1341
1341
|
}, 200);
|
|
@@ -1347,19 +1347,19 @@ let tt = class extends Dr {
|
|
|
1347
1347
|
this._hovered = !1, this.makeDirty(!0);
|
|
1348
1348
|
}
|
|
1349
1349
|
};
|
|
1350
|
-
tt =
|
|
1351
|
-
qe(2,
|
|
1350
|
+
tt = Ti([
|
|
1351
|
+
qe(2, Qe),
|
|
1352
1352
|
qe(3, j),
|
|
1353
1353
|
qe(4, T(Lt))
|
|
1354
1354
|
], tt);
|
|
1355
|
-
var
|
|
1356
|
-
for (var
|
|
1357
|
-
(i = t[a]) && (
|
|
1358
|
-
return
|
|
1359
|
-
}, te = (t, e) => (r,
|
|
1360
|
-
const
|
|
1361
|
-
function
|
|
1362
|
-
switch (
|
|
1355
|
+
var Ei = Object.getOwnPropertyDescriptor, Ni = (t, e, r, s) => {
|
|
1356
|
+
for (var n = s > 1 ? void 0 : s ? Ei(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1357
|
+
(i = t[a]) && (n = i(n) || n);
|
|
1358
|
+
return n;
|
|
1359
|
+
}, te = (t, e) => (r, s) => e(r, s, t);
|
|
1360
|
+
const Fi = 1e3, yi = 5e3;
|
|
1361
|
+
function Oi(t, e, r, s) {
|
|
1362
|
+
switch (s) {
|
|
1363
1363
|
case Ae.TOP:
|
|
1364
1364
|
return t + Ce;
|
|
1365
1365
|
case Ae.MIDDLE:
|
|
@@ -1370,12 +1370,12 @@ function Ii(t, e, r, n) {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
1372
|
let rt = class extends Mt {
|
|
1373
|
-
constructor(e, r,
|
|
1373
|
+
constructor(e, r, s, n, a, i, o, l) {
|
|
1374
1374
|
super();
|
|
1375
1375
|
v(this, "_filterRangeShape", null);
|
|
1376
1376
|
v(this, "_buttonRenderDisposable", null);
|
|
1377
1377
|
v(this, "_filterButtonShapes", []);
|
|
1378
|
-
this._context = e, this._injector = r, this._sheetSkeletonManagerService =
|
|
1378
|
+
this._context = e, this._injector = r, this._sheetSkeletonManagerService = s, this._sheetsFilterService = n, this._themeService = a, this._sheetInterceptorService = i, this._commandService = o, this._selectionRenderService = l, this._initRenderer();
|
|
1379
1379
|
}
|
|
1380
1380
|
dispose() {
|
|
1381
1381
|
super.dispose(), this._disposeRendering();
|
|
@@ -1385,15 +1385,15 @@ let rt = class extends Mt {
|
|
|
1385
1385
|
at((e) => {
|
|
1386
1386
|
var o, l;
|
|
1387
1387
|
if (!e) return me(null);
|
|
1388
|
-
const { unit: r, unitId:
|
|
1389
|
-
unitId:
|
|
1390
|
-
worksheetId:
|
|
1388
|
+
const { unit: r, unitId: s } = this._context, n = ((o = r.getActiveSheet()) == null ? void 0 : o.getSheetId()) || "", a = (l = this._sheetsFilterService.getFilterModel(s, n)) != null ? l : void 0, i = () => ({
|
|
1389
|
+
unitId: s,
|
|
1390
|
+
worksheetId: n,
|
|
1391
1391
|
filterModel: a,
|
|
1392
1392
|
range: a == null ? void 0 : a.getRange(),
|
|
1393
1393
|
skeleton: e.skeleton
|
|
1394
1394
|
});
|
|
1395
1395
|
return cr(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(
|
|
1396
|
-
|
|
1396
|
+
ei(
|
|
1397
1397
|
([c]) => {
|
|
1398
1398
|
var h;
|
|
1399
1399
|
return c.type === We.MUTATION && ((h = c.params) == null ? void 0 : h.unitId) === r.getUnitId() && (mr.has(c.id) || c.id === Yr.id);
|
|
@@ -1405,80 +1405,60 @@ let rt = class extends Mt {
|
|
|
1405
1405
|
// must trigger once
|
|
1406
1406
|
);
|
|
1407
1407
|
}),
|
|
1408
|
-
|
|
1408
|
+
ti(this.dispose$)
|
|
1409
1409
|
).subscribe((e) => {
|
|
1410
1410
|
this._disposeRendering(), !(!e || !e.range) && (this._renderRange(e.range, e.skeleton), this._renderButtons(e));
|
|
1411
1411
|
});
|
|
1412
1412
|
}
|
|
1413
|
-
_initCommandExecuted() {
|
|
1414
|
-
this.disposeWithMe(
|
|
1415
|
-
this._commandService.onCommandExecuted((e) => {
|
|
1416
|
-
var l, c;
|
|
1417
|
-
if (e.id !== Zr.id)
|
|
1418
|
-
return;
|
|
1419
|
-
const { unit: r, unitId: n } = this._context, s = ((l = r.getActiveSheet()) == null ? void 0 : l.getSheetId()) || "", a = this._sheetSkeletonManagerService.getCurrentSkeleton(), i = (c = this._sheetsFilterService.getFilterModel(n, s)) != null ? c : void 0;
|
|
1420
|
-
if (!a)
|
|
1421
|
-
return;
|
|
1422
|
-
const o = {
|
|
1423
|
-
unitId: n,
|
|
1424
|
-
worksheetId: s,
|
|
1425
|
-
filterModel: i,
|
|
1426
|
-
range: i == null ? void 0 : i.getRange(),
|
|
1427
|
-
skeleton: a
|
|
1428
|
-
};
|
|
1429
|
-
this._disposeRendering(), !(!o || !o.range) && (this._renderRange(o.range, o.skeleton), this._renderButtons(o));
|
|
1430
|
-
})
|
|
1431
|
-
);
|
|
1432
|
-
}
|
|
1433
1413
|
_renderRange(e, r) {
|
|
1434
|
-
const { scene:
|
|
1435
|
-
|
|
1436
|
-
|
|
1414
|
+
const { scene: s } = this._context, { rowHeaderWidth: n, columnHeaderHeight: a } = r, i = this._filterRangeShape = new Nr(
|
|
1415
|
+
s,
|
|
1416
|
+
Fi,
|
|
1437
1417
|
this._themeService,
|
|
1438
1418
|
{
|
|
1439
|
-
rowHeaderWidth:
|
|
1419
|
+
rowHeaderWidth: n,
|
|
1440
1420
|
columnHeaderHeight: a,
|
|
1441
1421
|
enableAutoFill: !1,
|
|
1442
1422
|
highlightHeader: !1
|
|
1443
1423
|
}
|
|
1444
|
-
), l =
|
|
1424
|
+
), l = Fr({
|
|
1445
1425
|
range: e,
|
|
1446
1426
|
primary: null,
|
|
1447
1427
|
style: { fill: "rgba(0, 0, 0, 0.0)" }
|
|
1448
1428
|
}, r);
|
|
1449
|
-
i.updateRangeBySelectionWithCoord(l), i.setEvent(!1),
|
|
1429
|
+
i.updateRangeBySelectionWithCoord(l), i.setEvent(!1), s.makeDirty(!0);
|
|
1450
1430
|
}
|
|
1451
1431
|
_renderButtons(e) {
|
|
1452
|
-
const { range: r, filterModel:
|
|
1432
|
+
const { range: r, filterModel: s, unitId: n, skeleton: a, worksheetId: i } = e, { unit: o, scene: l } = this._context, c = o.getSheetBySheetId(i);
|
|
1453
1433
|
if (!c)
|
|
1454
1434
|
return;
|
|
1455
|
-
this._interceptCellContent(
|
|
1435
|
+
this._interceptCellContent(n, i, e.range);
|
|
1456
1436
|
const { startColumn: h, endColumn: d, startRow: C } = r;
|
|
1457
1437
|
for (let f = h; f <= d; f++) {
|
|
1458
|
-
const _ = `sheets-filter-button-${f}`, S = yr(C, f, l, a), E = c.
|
|
1438
|
+
const _ = `sheets-filter-button-${f}`, S = yr(C, f, l, a), E = c.getComposedCellStyle(C, f), N = (E == null ? void 0 : E.vt) || Ae.BOTTOM, { startX: b, startY: F, endX: R, endY: L } = S, G = R - b, Y = L - F;
|
|
1459
1439
|
if (Y <= Ce || G <= Ce)
|
|
1460
1440
|
continue;
|
|
1461
|
-
const
|
|
1441
|
+
const ne = !!s.getFilterColumn(f), x = R - B - Ce, A = Oi(F, L, Y, N), P = {
|
|
1462
1442
|
left: x,
|
|
1463
1443
|
top: A,
|
|
1464
1444
|
height: B,
|
|
1465
1445
|
width: B,
|
|
1466
|
-
zIndex:
|
|
1446
|
+
zIndex: yi,
|
|
1467
1447
|
cellHeight: Y,
|
|
1468
1448
|
cellWidth: G,
|
|
1469
|
-
filterParams: { unitId:
|
|
1449
|
+
filterParams: { unitId: n, subUnitId: i, col: f, hasCriteria: ne }
|
|
1470
1450
|
}, je = this._injector.createInstance(tt, _, P);
|
|
1471
1451
|
this._filterButtonShapes.push(je);
|
|
1472
1452
|
}
|
|
1473
1453
|
l.addObjects(this._filterButtonShapes), l.makeDirty();
|
|
1474
1454
|
}
|
|
1475
|
-
_interceptCellContent(e, r,
|
|
1476
|
-
const { startRow:
|
|
1477
|
-
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(
|
|
1455
|
+
_interceptCellContent(e, r, s) {
|
|
1456
|
+
const { startRow: n, startColumn: a, endColumn: i } = s;
|
|
1457
|
+
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(Zr.CELL_CONTENT, {
|
|
1478
1458
|
effect: ur.Style,
|
|
1479
1459
|
handler: (o, l, c) => {
|
|
1480
1460
|
const { row: h, col: d, unitId: C, subUnitId: f } = l;
|
|
1481
|
-
return C !== e || f !== r || h !==
|
|
1461
|
+
return C !== e || f !== r || h !== n || d < a || d > i || ((!o || o === l.rawData) && (o = { ...l.rawData }), o.fontRenderExtension = {
|
|
1482
1462
|
...o == null ? void 0 : o.fontRenderExtension,
|
|
1483
1463
|
rightOffset: B
|
|
1484
1464
|
}), c(o);
|
|
@@ -1488,7 +1468,7 @@ let rt = class extends Mt {
|
|
|
1488
1468
|
}
|
|
1489
1469
|
_disposeRendering() {
|
|
1490
1470
|
var e, r;
|
|
1491
|
-
(e = this._filterRangeShape) == null || e.dispose(), this._filterButtonShapes.forEach((
|
|
1471
|
+
(e = this._filterRangeShape) == null || e.dispose(), this._filterButtonShapes.forEach((s) => s.dispose()), (r = this._buttonRenderDisposable) == null || r.dispose(), this._filterRangeShape = null, this._buttonRenderDisposable = null, this._filterButtonShapes = [];
|
|
1492
1472
|
}
|
|
1493
1473
|
};
|
|
1494
1474
|
rt = Ni([
|
|
@@ -1500,11 +1480,11 @@ rt = Ni([
|
|
|
1500
1480
|
te(6, j),
|
|
1501
1481
|
te(7, Er)
|
|
1502
1482
|
], rt);
|
|
1503
|
-
var
|
|
1504
|
-
for (var
|
|
1505
|
-
(i = t[a]) && (
|
|
1506
|
-
return
|
|
1507
|
-
}, yt = (t, e) => (r,
|
|
1483
|
+
var Ii = Object.getOwnPropertyDescriptor, bi = (t, e, r, s) => {
|
|
1484
|
+
for (var n = s > 1 ? void 0 : s ? Ii(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1485
|
+
(i = t[a]) && (n = i(n) || n);
|
|
1486
|
+
return n;
|
|
1487
|
+
}, yt = (t, e) => (r, s) => e(r, s, t);
|
|
1508
1488
|
let Ee = class extends Mt {
|
|
1509
1489
|
constructor(t, e) {
|
|
1510
1490
|
super(), this._renderManagerService = t, this._sheetsRenderService = e, [
|
|
@@ -1513,30 +1493,30 @@ let Ee = class extends Mt {
|
|
|
1513
1493
|
vr,
|
|
1514
1494
|
_r
|
|
1515
1495
|
].forEach((r) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(r.id))), this.disposeWithMe(this._renderManagerService.registerRenderModule(
|
|
1516
|
-
|
|
1496
|
+
se.UNIVER_SHEET,
|
|
1517
1497
|
[rt]
|
|
1518
1498
|
));
|
|
1519
1499
|
}
|
|
1520
1500
|
};
|
|
1521
|
-
Ee =
|
|
1501
|
+
Ee = bi([
|
|
1522
1502
|
yt(0, Dt),
|
|
1523
1503
|
yt(1, T(Ht))
|
|
1524
1504
|
], Ee);
|
|
1525
|
-
var
|
|
1526
|
-
for (var
|
|
1527
|
-
(i = t[a]) && (
|
|
1528
|
-
return
|
|
1529
|
-
}, Ot = (t, e) => (r,
|
|
1530
|
-
const
|
|
1505
|
+
var Ri = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, Pi = (t, e, r) => e in t ? Ri(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, wi = (t, e, r, s) => {
|
|
1506
|
+
for (var n = s > 1 ? void 0 : s ? Ai(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1507
|
+
(i = t[a]) && (n = i(n) || n);
|
|
1508
|
+
return n;
|
|
1509
|
+
}, Ot = (t, e) => (r, s) => e(r, s, t), qt = (t, e, r) => Pi(t, typeof e != "symbol" ? e + "" : e, r);
|
|
1510
|
+
const Li = "SHEET_FILTER_UI_PLUGIN";
|
|
1531
1511
|
let ke = class extends it {
|
|
1532
1512
|
constructor(t = Ue, e, r) {
|
|
1533
1513
|
super(), this._config = t, this._injector = e, this._configService = r;
|
|
1534
|
-
const { menu:
|
|
1514
|
+
const { menu: s, ...n } = Ut(
|
|
1535
1515
|
{},
|
|
1536
1516
|
Ue,
|
|
1537
1517
|
this._config
|
|
1538
1518
|
);
|
|
1539
|
-
|
|
1519
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(Kt, n);
|
|
1540
1520
|
}
|
|
1541
1521
|
onStarting() {
|
|
1542
1522
|
[
|
|
@@ -1551,93 +1531,93 @@ let ke = class extends it {
|
|
|
1551
1531
|
this._injector.get(Ee);
|
|
1552
1532
|
}
|
|
1553
1533
|
};
|
|
1554
|
-
qt(ke, "type",
|
|
1555
|
-
qt(ke, "pluginName",
|
|
1556
|
-
ke =
|
|
1534
|
+
qt(ke, "type", se.UNIVER_SHEET);
|
|
1535
|
+
qt(ke, "pluginName", Li);
|
|
1536
|
+
ke = wi([
|
|
1557
1537
|
$t(kt),
|
|
1558
1538
|
Ot(1, T(ie)),
|
|
1559
1539
|
Ot(2, xt)
|
|
1560
1540
|
], ke);
|
|
1561
1541
|
var $ = function() {
|
|
1562
1542
|
return $ = Object.assign || function(t) {
|
|
1563
|
-
for (var e, r = 1,
|
|
1543
|
+
for (var e, r = 1, s = arguments.length; r < s; r++) {
|
|
1564
1544
|
e = arguments[r];
|
|
1565
|
-
for (var
|
|
1545
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
|
|
1566
1546
|
}
|
|
1567
1547
|
return t;
|
|
1568
1548
|
}, $.apply(this, arguments);
|
|
1569
|
-
},
|
|
1549
|
+
}, Mi = function(t, e) {
|
|
1570
1550
|
var r = {};
|
|
1571
|
-
for (var
|
|
1551
|
+
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && e.indexOf(s) < 0 && (r[s] = t[s]);
|
|
1572
1552
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1573
|
-
for (var
|
|
1574
|
-
e.indexOf(n
|
|
1553
|
+
for (var n = 0, s = Object.getOwnPropertySymbols(t); n < s.length; n++)
|
|
1554
|
+
e.indexOf(s[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, s[n]) && (r[s[n]] = t[s[n]]);
|
|
1575
1555
|
return r;
|
|
1576
|
-
}, Oe =
|
|
1577
|
-
var r = t.icon,
|
|
1578
|
-
return Xt(r, "".concat(
|
|
1556
|
+
}, Oe = Fe(function(t, e) {
|
|
1557
|
+
var r = t.icon, s = t.id, n = t.className, a = t.extend, i = Mi(t, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(s, " ").concat(n || "").trim(), l = ui("_".concat(Ui()));
|
|
1558
|
+
return Xt(r, "".concat(s), { defIds: r.defIds, idSuffix: l.current }, $({ ref: e, className: o }, i), a);
|
|
1579
1559
|
});
|
|
1580
|
-
function Xt(t, e, r,
|
|
1581
|
-
return ye(t.tag, $($({ key: e },
|
|
1582
|
-
return Xt(a, "".concat(e, "-").concat(t.tag, "-").concat(i), r, void 0,
|
|
1560
|
+
function Xt(t, e, r, s, n) {
|
|
1561
|
+
return ye(t.tag, $($({ key: e }, $i(t, r, n)), s), (xi(t, r).children || []).map(function(a, i) {
|
|
1562
|
+
return Xt(a, "".concat(e, "-").concat(t.tag, "-").concat(i), r, void 0, n);
|
|
1583
1563
|
}));
|
|
1584
1564
|
}
|
|
1585
|
-
function
|
|
1586
|
-
var
|
|
1587
|
-
r != null && r.colorChannel1 &&
|
|
1565
|
+
function $i(t, e, r) {
|
|
1566
|
+
var s = $({}, t.attrs);
|
|
1567
|
+
r != null && r.colorChannel1 && s.fill === "colorChannel1" && (s.fill = r.colorChannel1), t.tag === "mask" && s.id && (s.id = s.id + e.idSuffix), Object.entries(s).forEach(function(a) {
|
|
1588
1568
|
var i = a[0], o = a[1];
|
|
1589
|
-
i === "mask" && typeof o == "string" && (
|
|
1569
|
+
i === "mask" && typeof o == "string" && (s[i] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
1590
1570
|
});
|
|
1591
|
-
var
|
|
1592
|
-
return !
|
|
1571
|
+
var n = e.defIds;
|
|
1572
|
+
return !n || n.length === 0 || (t.tag === "use" && s["xlink:href"] && (s["xlink:href"] = s["xlink:href"] + e.idSuffix), Object.entries(s).forEach(function(a) {
|
|
1593
1573
|
var i = a[0], o = a[1];
|
|
1594
|
-
typeof o == "string" && (
|
|
1595
|
-
})),
|
|
1574
|
+
typeof o == "string" && (s[i] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
1575
|
+
})), s;
|
|
1596
1576
|
}
|
|
1597
|
-
function
|
|
1598
|
-
var r,
|
|
1599
|
-
return !
|
|
1600
|
-
return typeof
|
|
1577
|
+
function xi(t, e) {
|
|
1578
|
+
var r, s = e.defIds;
|
|
1579
|
+
return !s || s.length === 0 ? t : t.tag === "defs" && (!((r = t.children) === null || r === void 0) && r.length) ? $($({}, t), { children: t.children.map(function(n) {
|
|
1580
|
+
return typeof n.attrs.id == "string" && s && s.includes(n.attrs.id) ? $($({}, n), { attrs: $($({}, n.attrs), { id: n.attrs.id + e.idSuffix }) }) : n;
|
|
1601
1581
|
}) }) : t;
|
|
1602
1582
|
}
|
|
1603
|
-
function
|
|
1583
|
+
function Ui() {
|
|
1604
1584
|
return Math.random().toString(36).substring(2, 8);
|
|
1605
1585
|
}
|
|
1606
1586
|
Oe.displayName = "UniverIcon";
|
|
1607
|
-
var
|
|
1587
|
+
var ki = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 20 20", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M10 1.05957C10.356 1.05957 10.6816 1.26162 10.8408 1.58008L18.8408 17.5801L18.8799 17.668C19.0486 18.1134 18.8551 18.6232 18.4199 18.8408C17.9557 19.0727 17.3913 18.8841 17.1592 18.4199L10 4.10156L2.84082 18.4199C2.60871 18.8841 2.04434 19.0727 1.58008 18.8408C1.11587 18.6087 0.92731 18.0443 1.15918 17.5801L9.15918 1.58008C9.31841 1.26162 9.64395 1.05957 10 1.05957Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M15.3337 11.7261L15.4294 11.731C15.9035 11.779 16.2732 12.1798 16.2732 12.6665C16.2732 13.1532 15.9035 13.554 15.4294 13.602L15.3337 13.6069H4.66675C4.1476 13.6069 3.72632 13.1856 3.72632 12.6665C3.72632 12.1474 4.1476 11.7261 4.66675 11.7261H15.3337Z" } }] }, zt = Fe(function(t, e) {
|
|
1608
1588
|
return ye(Oe, Object.assign({}, t, {
|
|
1609
1589
|
id: "a-icon",
|
|
1610
1590
|
ref: e,
|
|
1611
|
-
icon:
|
|
1591
|
+
icon: ki
|
|
1612
1592
|
}));
|
|
1613
1593
|
});
|
|
1614
1594
|
zt.displayName = "AIcon";
|
|
1615
|
-
var
|
|
1595
|
+
var Hi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 20 20", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M17.0596 10C17.0596 6.10087 13.8992 2.94043 10 2.94043C6.10087 2.94043 2.94043 6.10087 2.94043 10C2.94043 13.8992 6.10087 17.0596 10 17.0596C13.8992 17.0596 17.0596 13.8992 17.0596 10ZM18.9404 10C18.9404 14.9374 14.9374 18.9404 10 18.9404C5.06257 18.9404 1.05957 14.9374 1.05957 10C1.05957 5.06257 5.06257 1.05957 10 1.05957C14.9374 1.05957 18.9404 5.06257 18.9404 10Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.29492 4.13476C4.63911 3.79057 5.1845 3.76906 5.55371 4.07031L5.625 4.13476L16.0244 14.5352L16.0889 14.6064C16.3902 14.9757 16.3686 15.52 16.0244 15.8643C15.6573 16.2313 15.0624 16.2313 14.6953 15.8643L4.29492 5.46484L4.23047 5.39355C3.92922 5.02434 3.95073 4.47895 4.29492 4.13476Z" } }] }, Jt = Fe(function(t, e) {
|
|
1616
1596
|
return ye(Oe, Object.assign({}, t, {
|
|
1617
1597
|
id: "ban-icon",
|
|
1618
1598
|
ref: e,
|
|
1619
|
-
icon:
|
|
1599
|
+
icon: Hi
|
|
1620
1600
|
}));
|
|
1621
1601
|
});
|
|
1622
1602
|
Jt.displayName = "BanIcon";
|
|
1623
|
-
var
|
|
1603
|
+
var Di = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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" } }] }, er = Fe(function(t, e) {
|
|
1624
1604
|
return ye(Oe, Object.assign({}, t, {
|
|
1625
1605
|
id: "filter-icon",
|
|
1626
1606
|
ref: e,
|
|
1627
|
-
icon:
|
|
1607
|
+
icon: Di
|
|
1628
1608
|
}));
|
|
1629
1609
|
});
|
|
1630
1610
|
er.displayName = "FilterIcon";
|
|
1631
|
-
var
|
|
1611
|
+
var Bi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, tr = Fe(function(t, e) {
|
|
1632
1612
|
return ye(Oe, Object.assign({}, t, {
|
|
1633
1613
|
id: "success-icon",
|
|
1634
1614
|
ref: e,
|
|
1635
|
-
icon:
|
|
1615
|
+
icon: Bi
|
|
1636
1616
|
}));
|
|
1637
1617
|
});
|
|
1638
1618
|
tr.displayName = "SuccessIcon";
|
|
1639
|
-
function
|
|
1640
|
-
const { model: e } = t, r = re(X),
|
|
1619
|
+
function Wi(t) {
|
|
1620
|
+
const { model: e } = t, r = re(X), s = D(e.cellFillColors$, [], !0), n = D(e.cellTextColors$, [], !0), a = k((o) => {
|
|
1641
1621
|
e.onFilterCheckToggled(o);
|
|
1642
1622
|
}, [e]), i = k((o) => {
|
|
1643
1623
|
e.onFilterCheckToggled(o, !1);
|
|
@@ -1653,7 +1633,7 @@ function Vi(t) {
|
|
|
1653
1633
|
"data-u-comp": "sheets-filter-panel",
|
|
1654
1634
|
className: Pe("univer-mt-2 univer-box-border univer-flex univer-h-[300px] univer-flex-grow univer-flex-col univer-gap-4 univer-overflow-auto univer-rounded-md univer-px-2 univer-py-2.5", ct),
|
|
1655
1635
|
children: [
|
|
1656
|
-
|
|
1636
|
+
s.length > 1 && /* @__PURE__ */ I("div", { children: [
|
|
1657
1637
|
/* @__PURE__ */ p(
|
|
1658
1638
|
"div",
|
|
1659
1639
|
{
|
|
@@ -1665,7 +1645,7 @@ function Vi(t) {
|
|
|
1665
1645
|
"div",
|
|
1666
1646
|
{
|
|
1667
1647
|
className: "univer-grid univer-grid-cols-8 univer-items-center univer-justify-start univer-gap-2",
|
|
1668
|
-
children:
|
|
1648
|
+
children: s.map((o, l) => /* @__PURE__ */ I(
|
|
1669
1649
|
"div",
|
|
1670
1650
|
{
|
|
1671
1651
|
className: "univer-relative univer-h-6 univer-w-6",
|
|
@@ -1692,7 +1672,7 @@ function Vi(t) {
|
|
|
1692
1672
|
}
|
|
1693
1673
|
)
|
|
1694
1674
|
] }),
|
|
1695
|
-
|
|
1675
|
+
n.length > 1 && /* @__PURE__ */ I("div", { children: [
|
|
1696
1676
|
/* @__PURE__ */ p(
|
|
1697
1677
|
"div",
|
|
1698
1678
|
{
|
|
@@ -1704,7 +1684,7 @@ function Vi(t) {
|
|
|
1704
1684
|
"div",
|
|
1705
1685
|
{
|
|
1706
1686
|
className: "univer-grid univer-grid-cols-8 univer-items-center univer-justify-start univer-gap-2",
|
|
1707
|
-
children:
|
|
1687
|
+
children: n.map((o, l) => /* @__PURE__ */ I(
|
|
1708
1688
|
"div",
|
|
1709
1689
|
{
|
|
1710
1690
|
className: "univer-relative univer-h-6 univer-w-6",
|
|
@@ -1725,7 +1705,7 @@ function Vi(t) {
|
|
|
1725
1705
|
}
|
|
1726
1706
|
)
|
|
1727
1707
|
] }),
|
|
1728
|
-
|
|
1708
|
+
s.length <= 1 && n.length <= 1 && /* @__PURE__ */ p(
|
|
1729
1709
|
"div",
|
|
1730
1710
|
{
|
|
1731
1711
|
className: "univer-flex univer-h-full univer-w-full univer-items-center univer-justify-center univer-text-sm univer-text-gray-900 dark:!univer-text-gray-200",
|
|
@@ -1754,17 +1734,17 @@ function It() {
|
|
|
1754
1734
|
}
|
|
1755
1735
|
function Qi(t) {
|
|
1756
1736
|
var f, _;
|
|
1757
|
-
const { model: e } = t, r = re(X),
|
|
1737
|
+
const { model: e } = t, r = re(X), s = D(e.conditionItem$, void 0), n = D(e.filterConditionFormParams$, void 0), a = n != null && n.and ? "AND" : "OR", i = k((S) => {
|
|
1758
1738
|
e.onConditionFormChange({ and: S === "AND" });
|
|
1759
|
-
}, [e]), o =
|
|
1739
|
+
}, [e]), o = Vi(r), l = k((S) => {
|
|
1760
1740
|
e.onPrimaryConditionChange(S);
|
|
1761
|
-
}, [e]), c =
|
|
1741
|
+
}, [e]), c = ji(r), h = k((S) => {
|
|
1762
1742
|
e.onConditionFormChange(S);
|
|
1763
1743
|
}, [e]), d = r.t("sheets-filter.panel.input-values-placeholder");
|
|
1764
|
-
function C(S, E,
|
|
1744
|
+
function C(S, E, N) {
|
|
1765
1745
|
const b = m.getItemByOperator(S).numOfParameters === 1;
|
|
1766
1746
|
return /* @__PURE__ */ I(Et, { children: [
|
|
1767
|
-
|
|
1747
|
+
N === "operator2" && /* @__PURE__ */ I(ni, { value: a, onChange: i, children: [
|
|
1768
1748
|
/* @__PURE__ */ p(Tt, { value: "AND", children: r.t("sheets-filter.panel.and") }),
|
|
1769
1749
|
/* @__PURE__ */ p(Tt, { value: "OR", children: r.t("sheets-filter.panel.or") })
|
|
1770
1750
|
] }),
|
|
@@ -1773,16 +1753,16 @@ function Qi(t) {
|
|
|
1773
1753
|
{
|
|
1774
1754
|
value: S,
|
|
1775
1755
|
options: c,
|
|
1776
|
-
onChange: (
|
|
1756
|
+
onChange: (F) => h({ [N]: F })
|
|
1777
1757
|
}
|
|
1778
1758
|
),
|
|
1779
1759
|
b && /* @__PURE__ */ p("div", { children: /* @__PURE__ */ p(
|
|
1780
|
-
|
|
1760
|
+
Vt,
|
|
1781
1761
|
{
|
|
1782
1762
|
className: "univer-mt-2",
|
|
1783
1763
|
value: E,
|
|
1784
1764
|
placeholder: d,
|
|
1785
|
-
onChange: (
|
|
1765
|
+
onChange: (F) => h({ [N === "operator1" ? "val1" : "val2"]: F })
|
|
1786
1766
|
}
|
|
1787
1767
|
) })
|
|
1788
1768
|
] });
|
|
@@ -1792,16 +1772,16 @@ function Qi(t) {
|
|
|
1792
1772
|
{
|
|
1793
1773
|
"data-u-comp": "sheets-filter-panel-conditions-container",
|
|
1794
1774
|
className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
|
|
1795
|
-
children:
|
|
1796
|
-
/* @__PURE__ */ p(Ct, { value:
|
|
1797
|
-
m.getItemByOperator(
|
|
1775
|
+
children: s && n && /* @__PURE__ */ I(Et, { children: [
|
|
1776
|
+
/* @__PURE__ */ p(Ct, { value: s.operator, options: o, onChange: l }),
|
|
1777
|
+
m.getItemByOperator(s.operator).numOfParameters !== 0 ? /* @__PURE__ */ I(
|
|
1798
1778
|
"div",
|
|
1799
1779
|
{
|
|
1800
1780
|
"data-u-comp": "sheets-filter-panel-conditions-container-inner",
|
|
1801
1781
|
className: Pe("univer-mt-2 univer-flex-grow univer-overflow-hidden univer-rounded-md univer-p-2", ct),
|
|
1802
1782
|
children: [
|
|
1803
|
-
|
|
1804
|
-
|
|
1783
|
+
s.numOfParameters >= 1 && C(n.operator1, (f = n.val1) != null ? f : "", "operator1"),
|
|
1784
|
+
s.numOfParameters >= 2 && C(n.operator2, (_ = n.val2) != null ? _ : "", "operator2"),
|
|
1805
1785
|
/* @__PURE__ */ I(
|
|
1806
1786
|
"div",
|
|
1807
1787
|
{
|
|
@@ -1821,7 +1801,7 @@ function Qi(t) {
|
|
|
1821
1801
|
}
|
|
1822
1802
|
);
|
|
1823
1803
|
}
|
|
1824
|
-
function
|
|
1804
|
+
function Vi(t) {
|
|
1825
1805
|
const e = t.getCurrentLocale();
|
|
1826
1806
|
return ut(() => [
|
|
1827
1807
|
{
|
|
@@ -1863,12 +1843,12 @@ function ji(t) {
|
|
|
1863
1843
|
}
|
|
1864
1844
|
], [e, t]);
|
|
1865
1845
|
}
|
|
1866
|
-
function
|
|
1846
|
+
function ji(t) {
|
|
1867
1847
|
const e = t.getCurrentLocale();
|
|
1868
1848
|
return ut(() => m.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: t.t(r.label), value: r.operator })), [e, t]);
|
|
1869
1849
|
}
|
|
1870
|
-
function
|
|
1871
|
-
const { model: e } = t, r = re(X),
|
|
1850
|
+
function Gi(t) {
|
|
1851
|
+
const { model: e } = t, r = re(X), s = D(e.searchString$, "", !0), n = D(e.filterItems$, void 0, !0), a = r.t("sheets-filter.panel.filter-only"), i = ze(n), o = i.checked > 0 && i.unchecked === 0, l = i.checked > 0 && i.unchecked > 0, c = e.treeMapCache, h = k(() => {
|
|
1872
1852
|
e.onCheckAllToggled(!o);
|
|
1873
1853
|
}, [e, o]), d = k((f) => {
|
|
1874
1854
|
e.setSearchString(f);
|
|
@@ -1886,10 +1866,10 @@ function Yi(t) {
|
|
|
1886
1866
|
className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
|
|
1887
1867
|
children: [
|
|
1888
1868
|
/* @__PURE__ */ p(
|
|
1889
|
-
|
|
1869
|
+
Vt,
|
|
1890
1870
|
{
|
|
1891
1871
|
autoFocus: !0,
|
|
1892
|
-
value:
|
|
1872
|
+
value: s,
|
|
1893
1873
|
placeholder: r.t("sheets-filter.panel.search-placeholder"),
|
|
1894
1874
|
onChange: d
|
|
1895
1875
|
}
|
|
@@ -1912,10 +1892,10 @@ function Yi(t) {
|
|
|
1912
1892
|
className: "univer-box-border univer-flex univer-h-7 univer-items-center univer-rounded-md univer-pb-0 univer-pl-5 univer-pr-0.5 univer-pt-0 univer-text-sm",
|
|
1913
1893
|
children: [
|
|
1914
1894
|
/* @__PURE__ */ p(
|
|
1915
|
-
|
|
1895
|
+
oi,
|
|
1916
1896
|
{
|
|
1917
1897
|
indeterminate: l,
|
|
1918
|
-
disabled:
|
|
1898
|
+
disabled: n.length === 0,
|
|
1919
1899
|
checked: o,
|
|
1920
1900
|
onChange: h
|
|
1921
1901
|
}
|
|
@@ -1942,11 +1922,11 @@ function Yi(t) {
|
|
|
1942
1922
|
}
|
|
1943
1923
|
),
|
|
1944
1924
|
/* @__PURE__ */ p("div", { "data-u-comp": "sheets-filter-panel-values-virtual", className: "univer-flex-grow", children: /* @__PURE__ */ p(
|
|
1945
|
-
|
|
1925
|
+
li,
|
|
1946
1926
|
{
|
|
1947
|
-
data:
|
|
1927
|
+
data: n,
|
|
1948
1928
|
defaultExpandAll: !1,
|
|
1949
|
-
valueGroup: C(
|
|
1929
|
+
valueGroup: C(n),
|
|
1950
1930
|
onChange: (f) => {
|
|
1951
1931
|
e.onFilterCheckToggled(f);
|
|
1952
1932
|
},
|
|
@@ -1999,17 +1979,17 @@ function Yi(t) {
|
|
|
1999
1979
|
}
|
|
2000
1980
|
);
|
|
2001
1981
|
}
|
|
2002
|
-
function
|
|
1982
|
+
function Yi() {
|
|
2003
1983
|
var E;
|
|
2004
|
-
const t = re(q), e = re(X), r = re(j),
|
|
2005
|
-
r.executeCommand(Zt.id, { filterBy:
|
|
1984
|
+
const t = re(q), e = re(X), r = re(j), s = D(t.filterBy$, void 0, !0), n = D(t.filterByModel$, void 0, !1), a = D(() => (n == null ? void 0 : n.canApply$) || me(!1), void 0, !1, [n]), i = Zi(e), o = !D(t.hasCriteria$), l = k((N) => {
|
|
1985
|
+
r.executeCommand(Zt.id, { filterBy: N });
|
|
2006
1986
|
}, [r]), c = k(async () => {
|
|
2007
|
-
await (
|
|
2008
|
-
}, [
|
|
1987
|
+
await (n == null ? void 0 : n.clear()), r.executeCommand(Se.id);
|
|
1988
|
+
}, [n, r]), h = k(() => {
|
|
2009
1989
|
r.executeCommand(Se.id);
|
|
2010
1990
|
}, [r]), d = k(async () => {
|
|
2011
|
-
await (
|
|
2012
|
-
}, [
|
|
1991
|
+
await (n == null ? void 0 : n.apply()), r.executeCommand(Se.id);
|
|
1992
|
+
}, [n, r]), f = (E = re(z).activeFilterModel) == null ? void 0 : E.getRange(), _ = t.col, S = wr(Or.FILTER_PANEL_EMBED_POINT);
|
|
2013
1993
|
return /* @__PURE__ */ I(
|
|
2014
1994
|
"div",
|
|
2015
1995
|
{
|
|
@@ -2024,19 +2004,19 @@ function Zi() {
|
|
|
2024
2004
|
}
|
|
2025
2005
|
),
|
|
2026
2006
|
/* @__PURE__ */ p("div", { className: "univer-mb-1 univer-flex-shrink-0 univer-flex-grow-0", children: /* @__PURE__ */ p(
|
|
2027
|
-
|
|
2007
|
+
ai,
|
|
2028
2008
|
{
|
|
2029
|
-
value:
|
|
2009
|
+
value: s,
|
|
2030
2010
|
items: i,
|
|
2031
|
-
onChange: (
|
|
2011
|
+
onChange: (N) => l(N)
|
|
2032
2012
|
}
|
|
2033
2013
|
) }),
|
|
2034
|
-
|
|
2014
|
+
n ? /* @__PURE__ */ p(
|
|
2035
2015
|
"div",
|
|
2036
2016
|
{
|
|
2037
2017
|
"data-u-comp": "sheets-filter-panel-content",
|
|
2038
2018
|
className: "univer-flex-shrink univer-flex-grow univer-pt-2",
|
|
2039
|
-
children:
|
|
2019
|
+
children: s === w.VALUES ? /* @__PURE__ */ p(Gi, { model: n }) : s === w.COLORS ? /* @__PURE__ */ p(Wi, { model: n }) : /* @__PURE__ */ p(Qi, { model: n })
|
|
2040
2020
|
}
|
|
2041
2021
|
) : /* @__PURE__ */ p("div", { className: "univer-flex-1" }),
|
|
2042
2022
|
/* @__PURE__ */ I(
|
|
@@ -2057,7 +2037,7 @@ function Zi() {
|
|
|
2057
2037
|
}
|
|
2058
2038
|
);
|
|
2059
2039
|
}
|
|
2060
|
-
function
|
|
2040
|
+
function Zi(t) {
|
|
2061
2041
|
const e = t.getCurrentLocale();
|
|
2062
2042
|
return ut(() => [
|
|
2063
2043
|
{ label: t.t("sheets-filter.panel.by-values"), value: w.VALUES },
|
|
@@ -2065,14 +2045,14 @@ function Ki(t) {
|
|
|
2065
2045
|
{ label: t.t("sheets-filter.panel.by-conditions"), value: w.CONDITIONS }
|
|
2066
2046
|
], [e, t]);
|
|
2067
2047
|
}
|
|
2068
|
-
function
|
|
2048
|
+
function Ki(t) {
|
|
2069
2049
|
const e = t.get(z);
|
|
2070
2050
|
return {
|
|
2071
|
-
id:
|
|
2051
|
+
id: Ne.id,
|
|
2072
2052
|
type: lt.BUTTON_SELECTOR,
|
|
2073
2053
|
icon: "FilterIcon",
|
|
2074
2054
|
tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
|
|
2075
|
-
hidden$: ot(t,
|
|
2055
|
+
hidden$: ot(t, se.UNIVER_SHEET),
|
|
2076
2056
|
activated$: e.activeFilterModel$.pipe(ce((r) => !!r)),
|
|
2077
2057
|
disabled$: Ir(
|
|
2078
2058
|
t,
|
|
@@ -2086,84 +2066,84 @@ function qi(t) {
|
|
|
2086
2066
|
)
|
|
2087
2067
|
};
|
|
2088
2068
|
}
|
|
2089
|
-
function
|
|
2069
|
+
function qi(t) {
|
|
2090
2070
|
const e = t.get(z);
|
|
2091
2071
|
return {
|
|
2092
|
-
id:
|
|
2072
|
+
id: nt.id,
|
|
2093
2073
|
type: lt.BUTTON,
|
|
2094
2074
|
title: "sheets-filter.toolbar.clear-filter-criteria",
|
|
2095
|
-
hidden$: ot(t,
|
|
2075
|
+
hidden$: ot(t, se.UNIVER_SHEET),
|
|
2096
2076
|
disabled$: e.activeFilterModel$.pipe(at((r) => {
|
|
2097
|
-
var
|
|
2098
|
-
return (
|
|
2077
|
+
var s;
|
|
2078
|
+
return (s = r == null ? void 0 : r.hasCriteria$.pipe(ce((n) => !n))) != null ? s : me(!0);
|
|
2099
2079
|
}))
|
|
2100
2080
|
};
|
|
2101
2081
|
}
|
|
2102
|
-
function
|
|
2082
|
+
function Xi(t) {
|
|
2103
2083
|
const e = t.get(z);
|
|
2104
2084
|
return {
|
|
2105
|
-
id:
|
|
2085
|
+
id: st.id,
|
|
2106
2086
|
type: lt.BUTTON,
|
|
2107
2087
|
title: "sheets-filter.toolbar.re-calc-filter-conditions",
|
|
2108
|
-
hidden$: ot(t,
|
|
2088
|
+
hidden$: ot(t, se.UNIVER_SHEET),
|
|
2109
2089
|
disabled$: e.activeFilterModel$.pipe(at((r) => {
|
|
2110
|
-
var
|
|
2111
|
-
return (
|
|
2090
|
+
var s;
|
|
2091
|
+
return (s = r == null ? void 0 : r.hasCriteria$.pipe(ce((n) => !n))) != null ? s : me(!0);
|
|
2112
2092
|
}))
|
|
2113
2093
|
};
|
|
2114
2094
|
}
|
|
2115
|
-
const
|
|
2095
|
+
const zi = {
|
|
2116
2096
|
[Mr.ORGANIZATION]: {
|
|
2117
|
-
[
|
|
2097
|
+
[Ne.id]: {
|
|
2118
2098
|
order: 2,
|
|
2119
|
-
menuItemFactory:
|
|
2120
|
-
[
|
|
2099
|
+
menuItemFactory: Ki,
|
|
2100
|
+
[nt.id]: {
|
|
2121
2101
|
order: 0,
|
|
2122
|
-
menuItemFactory:
|
|
2102
|
+
menuItemFactory: qi
|
|
2123
2103
|
},
|
|
2124
|
-
[
|
|
2104
|
+
[st.id]: {
|
|
2125
2105
|
order: 1,
|
|
2126
|
-
menuItemFactory:
|
|
2106
|
+
menuItemFactory: Xi
|
|
2127
2107
|
}
|
|
2128
2108
|
}
|
|
2129
2109
|
}
|
|
2130
|
-
},
|
|
2131
|
-
id:
|
|
2110
|
+
}, Ji = {
|
|
2111
|
+
id: Ne.id,
|
|
2132
2112
|
binding: $r.L | _t.CTRL_COMMAND | _t.SHIFT,
|
|
2133
2113
|
description: "sheets-filter.shortcut.smart-toggle-filter",
|
|
2134
2114
|
preconditions: Rr,
|
|
2135
2115
|
group: "4_sheet-edit"
|
|
2136
2116
|
};
|
|
2137
|
-
var
|
|
2138
|
-
for (var
|
|
2139
|
-
(i = t[a]) && (
|
|
2140
|
-
return
|
|
2141
|
-
}, M = (t, e) => (r,
|
|
2117
|
+
var es = Object.getOwnPropertyDescriptor, ts = (t, e, r, s) => {
|
|
2118
|
+
for (var n = s > 1 ? void 0 : s ? es(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
2119
|
+
(i = t[a]) && (n = i(n) || n);
|
|
2120
|
+
return n;
|
|
2121
|
+
}, M = (t, e) => (r, s) => e(r, s, t);
|
|
2142
2122
|
const bt = "FILTER_PANEL_POPUP";
|
|
2143
2123
|
let He = class extends Ee {
|
|
2144
|
-
constructor(e, r,
|
|
2124
|
+
constructor(e, r, s, n, a, i, o, l, c, h, d, C, f) {
|
|
2145
2125
|
super(f, C);
|
|
2146
2126
|
v(this, "_popupDisposable");
|
|
2147
|
-
this._injector = e, this._componentManager = r, this._sheetsFilterPanelService =
|
|
2127
|
+
this._injector = e, this._componentManager = r, this._sheetsFilterPanelService = s, this._sheetCanvasPopupService = n, this._sheetsFilterService = a, this._localeService = i, this._shortcutService = o, this._commandService = l, this._menuManagerService = c, this._contextService = h, this._messageService = d, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI();
|
|
2148
2128
|
}
|
|
2149
2129
|
dispose() {
|
|
2150
2130
|
super.dispose(), this._closeFilterPopup();
|
|
2151
2131
|
}
|
|
2152
2132
|
_initShortcuts() {
|
|
2153
2133
|
[
|
|
2154
|
-
|
|
2134
|
+
Ji
|
|
2155
2135
|
].forEach((e) => {
|
|
2156
2136
|
this.disposeWithMe(this._shortcutService.registerShortcut(e));
|
|
2157
2137
|
});
|
|
2158
2138
|
}
|
|
2159
2139
|
_initCommands() {
|
|
2160
2140
|
[
|
|
2161
|
-
|
|
2141
|
+
Ne,
|
|
2162
2142
|
gr,
|
|
2163
2143
|
Sr,
|
|
2164
|
-
|
|
2165
|
-
st,
|
|
2144
|
+
Q,
|
|
2166
2145
|
nt,
|
|
2146
|
+
st,
|
|
2167
2147
|
Zt,
|
|
2168
2148
|
xe,
|
|
2169
2149
|
Se
|
|
@@ -2172,21 +2152,21 @@ let He = class extends Ee {
|
|
|
2172
2152
|
});
|
|
2173
2153
|
}
|
|
2174
2154
|
_initMenuItems() {
|
|
2175
|
-
this._menuManagerService.mergeMenu(
|
|
2155
|
+
this._menuManagerService.mergeMenu(zi);
|
|
2176
2156
|
}
|
|
2177
2157
|
_initUI() {
|
|
2178
2158
|
[
|
|
2179
|
-
[bt,
|
|
2159
|
+
[bt, Yi],
|
|
2180
2160
|
["FilterIcon", er]
|
|
2181
2161
|
].forEach(([e, r]) => {
|
|
2182
2162
|
this.disposeWithMe(
|
|
2183
2163
|
this._componentManager.register(e, r)
|
|
2184
2164
|
);
|
|
2185
|
-
}), this.disposeWithMe(this._contextService.subscribeContextValue$(ue).pipe(
|
|
2165
|
+
}), this.disposeWithMe(this._contextService.subscribeContextValue$(ue).pipe(ri()).subscribe((e) => {
|
|
2186
2166
|
e ? this._openFilterPopup() : this._closeFilterPopup();
|
|
2187
2167
|
})), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((e) => {
|
|
2188
2168
|
e && this._messageService.show({
|
|
2189
|
-
type:
|
|
2169
|
+
type: ci.Error,
|
|
2190
2170
|
content: this._localeService.t(e)
|
|
2191
2171
|
});
|
|
2192
2172
|
}));
|
|
@@ -2195,8 +2175,8 @@ let He = class extends Ee {
|
|
|
2195
2175
|
const e = this._sheetsFilterPanelService.filterModel;
|
|
2196
2176
|
if (!e)
|
|
2197
2177
|
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
2198
|
-
const r = e.getRange(),
|
|
2199
|
-
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(
|
|
2178
|
+
const r = e.getRange(), s = this._sheetsFilterPanelService.col, { startRow: n } = r;
|
|
2179
|
+
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(n, s, {
|
|
2200
2180
|
componentKey: bt,
|
|
2201
2181
|
direction: "horizontal",
|
|
2202
2182
|
onClickOutside: () => this._commandService.syncExecuteCommand(Se.id),
|
|
@@ -2208,7 +2188,7 @@ let He = class extends Ee {
|
|
|
2208
2188
|
(e = this._popupDisposable) == null || e.dispose(), this._popupDisposable = null;
|
|
2209
2189
|
}
|
|
2210
2190
|
};
|
|
2211
|
-
He =
|
|
2191
|
+
He = ts([
|
|
2212
2192
|
M(0, T(ie)),
|
|
2213
2193
|
M(1, T(xr)),
|
|
2214
2194
|
M(2, T(q)),
|
|
@@ -2218,26 +2198,26 @@ He = rn([
|
|
|
2218
2198
|
M(6, Ur),
|
|
2219
2199
|
M(7, j),
|
|
2220
2200
|
M(8, kr),
|
|
2221
|
-
M(9,
|
|
2201
|
+
M(9, Qe),
|
|
2222
2202
|
M(10, Hr),
|
|
2223
2203
|
M(11, T(Ht)),
|
|
2224
2204
|
M(12, Dt)
|
|
2225
2205
|
], He);
|
|
2226
|
-
var
|
|
2227
|
-
for (var
|
|
2228
|
-
(i = t[a]) && (
|
|
2229
|
-
return
|
|
2230
|
-
}, Xe = (t, e) => (r,
|
|
2231
|
-
const
|
|
2206
|
+
var rs = Object.defineProperty, is = Object.getOwnPropertyDescriptor, ss = (t, e, r) => e in t ? rs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, ns = (t, e, r, s) => {
|
|
2207
|
+
for (var n = s > 1 ? void 0 : s ? is(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
2208
|
+
(i = t[a]) && (n = i(n) || n);
|
|
2209
|
+
return n;
|
|
2210
|
+
}, Xe = (t, e) => (r, s) => e(r, s, t), rr = (t, e, r) => ss(t, typeof e != "symbol" ? e + "" : e, r);
|
|
2211
|
+
const os = "SHEET_FILTER_UI_PLUGIN";
|
|
2232
2212
|
let De = class extends it {
|
|
2233
|
-
constructor(t = Ue, e, r,
|
|
2234
|
-
super(), this._config = t, this._injector = e, this._configService = r, this._rpcChannelService =
|
|
2235
|
-
const { menu:
|
|
2213
|
+
constructor(t = Ue, e, r, s) {
|
|
2214
|
+
super(), this._config = t, this._injector = e, this._configService = r, this._rpcChannelService = s;
|
|
2215
|
+
const { menu: n, ...a } = Ut(
|
|
2236
2216
|
{},
|
|
2237
2217
|
Ue,
|
|
2238
2218
|
this._config
|
|
2239
2219
|
);
|
|
2240
|
-
|
|
2220
|
+
n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(Kt, a);
|
|
2241
2221
|
}
|
|
2242
2222
|
onStarting() {
|
|
2243
2223
|
dr(this._injector, [
|
|
@@ -2245,7 +2225,7 @@ let De = class extends it {
|
|
|
2245
2225
|
[he],
|
|
2246
2226
|
[He]
|
|
2247
2227
|
]), this._config.useRemoteFilterValuesGenerator && this._rpcChannelService && this._injector.add([we, {
|
|
2248
|
-
useFactory: () =>
|
|
2228
|
+
useFactory: () => ii(
|
|
2249
2229
|
this._rpcChannelService.requestChannel(ht)
|
|
2250
2230
|
)
|
|
2251
2231
|
}]);
|
|
@@ -2261,19 +2241,19 @@ let De = class extends it {
|
|
|
2261
2241
|
]);
|
|
2262
2242
|
}
|
|
2263
2243
|
};
|
|
2264
|
-
rr(De, "type",
|
|
2265
|
-
rr(De, "pluginName",
|
|
2266
|
-
De =
|
|
2244
|
+
rr(De, "type", se.UNIVER_SHEET);
|
|
2245
|
+
rr(De, "pluginName", os);
|
|
2246
|
+
De = ns([
|
|
2267
2247
|
$t(kt),
|
|
2268
2248
|
Xe(1, T(ie)),
|
|
2269
2249
|
Xe(2, xt),
|
|
2270
|
-
Xe(3, hr(
|
|
2250
|
+
Xe(3, hr(Qt))
|
|
2271
2251
|
], De);
|
|
2272
|
-
var
|
|
2273
|
-
for (var
|
|
2274
|
-
(i = t[a]) && (
|
|
2275
|
-
return
|
|
2276
|
-
}, Rt = (t, e) => (r,
|
|
2252
|
+
var ls = Object.getOwnPropertyDescriptor, as = (t, e, r, s) => {
|
|
2253
|
+
for (var n = s > 1 ? void 0 : s ? ls(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
2254
|
+
(i = t[a]) && (n = i(n) || n);
|
|
2255
|
+
return n;
|
|
2256
|
+
}, Rt = (t, e) => (r, s) => e(r, s, t), be;
|
|
2277
2257
|
let At = (be = class extends it {
|
|
2278
2258
|
constructor(t, e, r) {
|
|
2279
2259
|
super(), this._config = t, this._injector = e, this._rpcChannelService = r;
|
|
@@ -2289,10 +2269,10 @@ let At = (be = class extends it {
|
|
|
2289
2269
|
si(this._injector.get(we))
|
|
2290
2270
|
);
|
|
2291
2271
|
}
|
|
2292
|
-
}, v(be, "type",
|
|
2293
|
-
At =
|
|
2272
|
+
}, v(be, "type", se.UNIVER_SHEET), v(be, "pluginName", "SHEET_FILTER_UI_WORKER_PLUGIN"), be);
|
|
2273
|
+
At = as([
|
|
2294
2274
|
Rt(1, T(ie)),
|
|
2295
|
-
Rt(2,
|
|
2275
|
+
Rt(2, Qt)
|
|
2296
2276
|
], At);
|
|
2297
2277
|
export {
|
|
2298
2278
|
Zt as ChangeFilterByOperation,
|