@univerjs/sheets-filter-ui 0.10.10 → 0.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +245 -245
- package/lib/index.css +1 -1
- package/lib/index.js +245 -245
- package/lib/umd/index.js +2 -2
- package/package.json +14 -14
package/lib/es/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var v = (t, e, r) =>
|
|
4
|
-
import { BooleanNumber as ft, createIdentifier as
|
|
5
|
-
import { CustomFilterOperator as u, FilterBy as P, SetSheetsFilterCriteriaCommand as Q, SheetsFilterService as J, SmartToggleSheetsFilterCommand as Oe, FILTER_MUTATIONS as
|
|
6
|
-
import { SetCellEditVisibleOperation as
|
|
7
|
-
import { ILayoutService as
|
|
8
|
-
import { COLOR_BLACK_RGB as
|
|
9
|
-
import { RefRangeService as
|
|
10
|
-
import { BehaviorSubject as j, ReplaySubject as
|
|
11
|
-
import { IRPCChannelService as
|
|
12
|
-
import { clsx as we, borderClassName as ct, Select as
|
|
13
|
-
import { jsx as d, jsxs as F, Fragment as
|
|
14
|
-
import { forwardRef as me, useRef as
|
|
1
|
+
var cr = Object.defineProperty;
|
|
2
|
+
var ur = (t, e, r) => e in t ? cr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var v = (t, e, r) => ur(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { BooleanNumber as ft, createIdentifier as Pt, Inject as T, LocaleService as G, IUniverInstanceService as Be, ILogService as hr, extractPureTextFromCell as dr, numfmt as mt, Disposable as de, Injector as ie, Quantity as Lt, Tools as Re, ColorKit as pt, ICommandService as Y, CommandType as We, IContextService as Ve, ThemeService as Mt, RxDisposable as $t, fromCallback as fr, VerticalAlign as Ae, InterceptorEffectEnum as mr, UniverInstanceType as se, DependentOn as xt, IConfigService as Ut, Plugin as it, merge as kt, Optional as pr, registerDependencies as vr, touchDependencies as vt } from "@univerjs/core";
|
|
5
|
+
import { CustomFilterOperator as u, FilterBy as P, SetSheetsFilterCriteriaCommand as Q, SheetsFilterService as J, SmartToggleSheetsFilterCommand as Oe, FILTER_MUTATIONS as _r, SetSheetsFilterRangeMutation as gr, SetSheetsFilterCriteriaMutation as Sr, RemoveSheetsFilterMutation as Cr, ReCalcSheetsFilterMutation as Tr, UniverSheetsFilterPlugin as Ht, SheetsFilterSyncController as Er, ReCalcSheetsFilterCommand as st, ClearSheetsFilterCriteriaCommand as nt, RemoveSheetFilterCommand as Nr, SetSheetFilterRangeCommand as Fr } from "@univerjs/sheets-filter";
|
|
6
|
+
import { IEditorBridgeService as _t, SetCellEditVisibleOperation as yr, SheetSkeletonManagerService as Or, ISheetSelectionRenderService as Ir, SelectionControl as br, attachSelectionWithCoord as Rr, getCoordByCell as Ar, SheetsRenderService as Dt, SheetsUIPart as wr, getObservableWithExclusiveRange$ as Pr, getCurrentRangeDisable$ as Lr, whenSheetEditorFocused as Mr, SheetCanvasPopManagerService as $r } from "@univerjs/sheets-ui";
|
|
7
|
+
import { ILayoutService as xr, useDependency as B, useObservable as x, IMessageService as Bt, useComponentsOfPart as Ur, ComponentContainer as kr, getMenuHiddenObservable as ot, MenuItemType as lt, RibbonDataGroup as Hr, KeyCode as Dr, MetaKeys as gt, ComponentManager as Br, IShortcutService as Wr, IMenuManagerService as Vr } from "@univerjs/ui";
|
|
8
|
+
import { COLOR_BLACK_RGB as St, Rect as Ct, Shape as Qr, IRenderManagerService as Wt } from "@univerjs/engine-render";
|
|
9
|
+
import { RefRangeService as jr, SheetPermissionCheckController as Gr, SheetsSelectionsService as Yr, getSheetCommandTarget as Zr, WorksheetFilterPermission as ge, WorksheetViewPermission as Se, RangeProtectionPermissionViewPoint as Ce, expandToContinuousRange as Kr, SheetInterceptorService as qr, SetRangeValuesMutation as Xr, INTERCEPTOR_POINT as zr } from "@univerjs/sheets";
|
|
10
|
+
import { BehaviorSubject as j, ReplaySubject as Jr, Subject as ei, merge as ti, combineLatest as ri, throttleTime as Vt, startWith as Qt, map as ce, shareReplay as ii, of as fe, switchMap as at, filter as si, takeUntil as ni, distinctUntilChanged as oi } from "rxjs";
|
|
11
|
+
import { IRPCChannelService as jt, toModule as li, fromModule as ai } from "@univerjs/rpc";
|
|
12
|
+
import { clsx as we, borderClassName as ct, Select as Tt, RadioGroup as ci, Radio as Et, Input as Gt, Checkbox as ui, Tree as hi, Tooltip as di, Switch as fi, MessageType as Yt, Segmented as mi, Button as Ze } from "@univerjs/design";
|
|
13
|
+
import { jsx as d, jsxs as F, Fragment as Nt } from "react/jsx-runtime";
|
|
14
|
+
import { forwardRef as me, useRef as pi, createElement as pe, useCallback as H, useMemo as ut } from "react";
|
|
15
15
|
var O = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SECOND", t))(O || {}), 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 = {
|
|
@@ -505,12 +505,12 @@ function ze(t) {
|
|
|
505
505
|
unchecked: n
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
|
-
var
|
|
509
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
508
|
+
var vi = Object.getOwnPropertyDescriptor, _i = (t, e, r, s) => {
|
|
509
|
+
for (var n = s > 1 ? void 0 : s ? vi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
510
510
|
(i = t[a]) && (n = i(n) || n);
|
|
511
511
|
return n;
|
|
512
512
|
}, Ke = (t, e) => (r, s) => e(r, s, t);
|
|
513
|
-
const ht = "sheets-filter.generate-filter-values.service", Pe =
|
|
513
|
+
const ht = "sheets-filter.generate-filter-values.service", Pe = Pt(ht), gi = ["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;
|
|
@@ -518,7 +518,7 @@ let Je = class extends de {
|
|
|
518
518
|
async getFilterValues(t) {
|
|
519
519
|
var f;
|
|
520
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 = (f = this._univerInstanceService.getUnit(e)) == null ? void 0 : f.getSheetBySheetId(r);
|
|
521
|
-
return !c || !h ? [] : (this._logService.debug("[SheetsGenerateFilterValuesService]", "getFilterValues for", { unitId: e, subUnitId: r }),
|
|
521
|
+
return !c || !h ? [] : (this._logService.debug("[SheetsGenerateFilterValuesService]", "getFilterValues for", { unitId: e, subUnitId: r }), Zt(
|
|
522
522
|
a,
|
|
523
523
|
this._localeService,
|
|
524
524
|
o,
|
|
@@ -531,31 +531,31 @@ let Je = class extends de {
|
|
|
531
531
|
));
|
|
532
532
|
}
|
|
533
533
|
};
|
|
534
|
-
Je =
|
|
534
|
+
Je = _i([
|
|
535
535
|
Ke(0, T(G)),
|
|
536
536
|
Ke(1, Be),
|
|
537
|
-
Ke(2,
|
|
537
|
+
Ke(2, hr)
|
|
538
538
|
], Je);
|
|
539
|
-
function
|
|
539
|
+
function Zt(t, e, r, s, n, a, i, o, l) {
|
|
540
540
|
var N, b, y, R, L, Z, K, ne, U, A;
|
|
541
|
-
const c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), f = "yyyy-mm-dd", C = new Set(
|
|
541
|
+
const c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), f = "yyyy-mm-dd", C = new Set(gi), p = "empty", _ = !t && ((a == null ? void 0 : a.filterBy) === P.COLORS || (a == null ? void 0 : a.filterBy) === P.CONDITIONS) && ((N = a.filteredOutRows) == null ? void 0 : N.size);
|
|
542
542
|
let S = 0;
|
|
543
543
|
for (const w of s.iterateByColumn(r, !1, !1)) {
|
|
544
544
|
const { row: je, rowSpan: dt = 1 } = w;
|
|
545
545
|
let oe = 0;
|
|
546
546
|
for (; oe < dt; ) {
|
|
547
|
-
const
|
|
548
|
-
if (n.has(
|
|
547
|
+
const lr = je + oe;
|
|
548
|
+
if (n.has(lr)) {
|
|
549
549
|
oe++;
|
|
550
550
|
continue;
|
|
551
551
|
}
|
|
552
|
-
const ee = w != null && w.value ?
|
|
552
|
+
const ee = w != null && w.value ? dr(w.value) : "";
|
|
553
553
|
if (!ee) {
|
|
554
554
|
S += 1, oe += dt;
|
|
555
555
|
continue;
|
|
556
556
|
}
|
|
557
|
-
const Ie = (b = w.value) != null && b.v && !w.value.p ? (L = (R = l.get((y = w.value) == null ? void 0 : y.s)) == null ? void 0 : R.n) == null ? void 0 : L.pattern : "",
|
|
558
|
-
if (Ie &&
|
|
557
|
+
const Ie = (b = w.value) != null && b.v && !w.value.p ? (L = (R = l.get((y = w.value) == null ? void 0 : y.s)) == null ? void 0 : R.n) == null ? void 0 : L.pattern : "", ar = Ie && mt.getFormatInfo(Ie).isDate;
|
|
558
|
+
if (Ie && ar && C.has(Ie)) {
|
|
559
559
|
const q = (Z = s.getCellRaw(w.row, w.col)) == null ? void 0 : Z.v;
|
|
560
560
|
if (!q) {
|
|
561
561
|
oe++;
|
|
@@ -615,12 +615,12 @@ function Yt(t, e, r, s, n, a, i, o, l) {
|
|
|
615
615
|
c.set("empty", w), h.set("empty", [p]);
|
|
616
616
|
}
|
|
617
617
|
return {
|
|
618
|
-
filterTreeItems:
|
|
618
|
+
filterTreeItems: Si(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 :
|
|
622
|
+
function Si(t) {
|
|
623
|
+
return Array.from(t).sort((e, r) => e.children && !r.children ? -1 : !e.children && r.children ? 1 : Ci(e.title, r.title)).map((e) => (e.children && e.children.sort((r, s) => {
|
|
624
624
|
const n = Number.parseInt(r.key.split("-")[1], 10), a = Number.parseInt(s.key.split("-")[1], 10);
|
|
625
625
|
return n - a;
|
|
626
626
|
}).forEach((r) => {
|
|
@@ -630,9 +630,9 @@ function gi(t) {
|
|
|
630
630
|
});
|
|
631
631
|
}), e));
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
function
|
|
635
|
-
const r =
|
|
633
|
+
const Ft = (t) => !Number.isNaN(Number(t)) && !Number.isNaN(Number.parseFloat(t));
|
|
634
|
+
function Ci(t, e) {
|
|
635
|
+
const r = Ft(t), s = Ft(e);
|
|
636
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) {
|
|
@@ -647,13 +647,13 @@ function et(t, e) {
|
|
|
647
647
|
}
|
|
648
648
|
return null;
|
|
649
649
|
}
|
|
650
|
-
function
|
|
651
|
-
return t.leaf ? t.checked : t.children ? t.children.every((e) =>
|
|
650
|
+
function Kt(t) {
|
|
651
|
+
return t.leaf ? t.checked : t.children ? t.children.every((e) => Kt(e)) : !0;
|
|
652
652
|
}
|
|
653
653
|
function Te(t, e) {
|
|
654
654
|
t.leaf && (e !== void 0 ? t.checked = e : t.checked = !t.checked), t.children && t.children.forEach((r) => Te(r, e));
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function qt(t, e) {
|
|
657
657
|
const r = [];
|
|
658
658
|
return t.forEach((s) => {
|
|
659
659
|
const n = s.originValues ? e.some(
|
|
@@ -666,7 +666,7 @@ function Kt(t, e) {
|
|
|
666
666
|
if (n || a)
|
|
667
667
|
r.push({ ...s });
|
|
668
668
|
else if (s.children) {
|
|
669
|
-
const o =
|
|
669
|
+
const o = qt(s.children, e);
|
|
670
670
|
if (o.length > 0) {
|
|
671
671
|
const l = o.reduce((c, h) => c + h.count, 0);
|
|
672
672
|
r.push({ ...s, count: l, children: o });
|
|
@@ -674,18 +674,18 @@ function Kt(t, e) {
|
|
|
674
674
|
}
|
|
675
675
|
}), r;
|
|
676
676
|
}
|
|
677
|
-
var
|
|
678
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
677
|
+
var Ti = Object.getOwnPropertyDescriptor, Qe = (t, e, r, s) => {
|
|
678
|
+
for (var n = s > 1 ? void 0 : s ? Ti(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
679
679
|
(i = t[a]) && (n = i(n) || n);
|
|
680
680
|
return n;
|
|
681
681
|
}, Fe = (t, e) => (r, s) => e(r, s, t);
|
|
682
|
-
|
|
682
|
+
Pt("sheets-filter-ui.sheets-filter-panel.service");
|
|
683
683
|
let z = class extends de {
|
|
684
684
|
constructor(e, r) {
|
|
685
685
|
super();
|
|
686
686
|
v(this, "_filterBy$", new j(P.VALUES));
|
|
687
687
|
v(this, "filterBy$", this._filterBy$.asObservable());
|
|
688
|
-
v(this, "_filterByModel$", new
|
|
688
|
+
v(this, "_filterByModel$", new Jr(1));
|
|
689
689
|
v(this, "filterByModel$", this._filterByModel$.asObservable());
|
|
690
690
|
v(this, "_filterByModel", null);
|
|
691
691
|
v(this, "_hasCriteria$", new j(!1));
|
|
@@ -817,7 +817,7 @@ let z = class extends de {
|
|
|
817
817
|
};
|
|
818
818
|
z = Qe([
|
|
819
819
|
Fe(0, T(ie)),
|
|
820
|
-
Fe(1, T(
|
|
820
|
+
Fe(1, T(jr))
|
|
821
821
|
], z);
|
|
822
822
|
let Le = class extends de {
|
|
823
823
|
constructor(e, r, s, n, a) {
|
|
@@ -919,22 +919,22 @@ 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 = n, this._searchString$ = new j(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new j(s), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new
|
|
923
|
-
|
|
922
|
+
this._filterModel = e, this.col = r, this._commandService = a, this._treeMapCache = n, this._searchString$ = new j(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new j(s), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new ei(), this.filterItems$ = ti(
|
|
923
|
+
ri([
|
|
924
924
|
this._searchString$.pipe(
|
|
925
|
-
|
|
926
|
-
|
|
925
|
+
Vt(500, void 0, { leading: !0, trailing: !0 }),
|
|
926
|
+
Qt(void 0)
|
|
927
927
|
),
|
|
928
928
|
this._rawFilterItems$
|
|
929
929
|
]).pipe(
|
|
930
930
|
ce(([i, o]) => {
|
|
931
931
|
if (!i) return o;
|
|
932
932
|
const c = i.toLowerCase().split(/\s+/).filter((h) => !!h);
|
|
933
|
-
return
|
|
933
|
+
return qt(o, c);
|
|
934
934
|
})
|
|
935
935
|
),
|
|
936
936
|
this._manuallyUpdateFilterItems$
|
|
937
|
-
).pipe(
|
|
937
|
+
).pipe(ii(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
|
|
@@ -947,7 +947,7 @@ let Me = class extends de {
|
|
|
947
947
|
* @returns the model to control the panel's state
|
|
948
948
|
*/
|
|
949
949
|
static async fromFilterColumn(e, r, s) {
|
|
950
|
-
const n = e.get(Be), a = e.get(G), i = e.get(Pe,
|
|
950
|
+
const n = e.get(Be), a = e.get(G), i = e.get(Pe, Lt.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}!`);
|
|
@@ -966,7 +966,7 @@ let Me = class extends de {
|
|
|
966
966
|
});
|
|
967
967
|
y = L.filterTreeItems, R = L.filterTreeMapCache;
|
|
968
968
|
} else {
|
|
969
|
-
const L =
|
|
969
|
+
const L = Zt(
|
|
970
970
|
!!_,
|
|
971
971
|
a,
|
|
972
972
|
b,
|
|
@@ -1010,7 +1010,7 @@ let Me = class extends de {
|
|
|
1010
1010
|
const r = Re.deepClone(this._filterItems), s = et(r, e.key);
|
|
1011
1011
|
if (!s)
|
|
1012
1012
|
return;
|
|
1013
|
-
const n =
|
|
1013
|
+
const n = Kt(s);
|
|
1014
1014
|
Te(s, !n), this._manuallyUpdateFilterItems(r);
|
|
1015
1015
|
}
|
|
1016
1016
|
onFilterOnly(e) {
|
|
@@ -1113,7 +1113,7 @@ let $e = class extends de {
|
|
|
1113
1113
|
const A = new pt(U.cl.rgb).toRgbString();
|
|
1114
1114
|
E.has(A) || E.set(A, { color: A, checked: N.has(A) });
|
|
1115
1115
|
} else
|
|
1116
|
-
E.set("default-font-color", { color:
|
|
1116
|
+
E.set("default-font-color", { color: St, checked: N.has(St) });
|
|
1117
1117
|
}
|
|
1118
1118
|
return e.createInstance($e, r, s, _, E);
|
|
1119
1119
|
}
|
|
@@ -1202,28 +1202,28 @@ 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(Ve), s = t.get(J), n = t.get(z);
|
|
1206
|
-
|
|
1207
|
-
const { unitId:
|
|
1208
|
-
return
|
|
1205
|
+
const r = t.get(Ve), s = t.get(J), n = t.get(z), a = t.get(Y), i = t.has(_t) ? t.get(_t) : null;
|
|
1206
|
+
i != null && i.isVisible().visible && a.syncExecuteCommand(yr.id, { visible: !1 });
|
|
1207
|
+
const { unitId: o, subUnitId: l, col: c } = e, h = s.getFilterModel(o, l);
|
|
1208
|
+
return h ? (n.setupCol(h, c), r.getContextValue(ue) || r.setContextValue(ue, !0), !0) : !1;
|
|
1209
1209
|
}
|
|
1210
1210
|
}, Ee = {
|
|
1211
1211
|
id: "sheet.operation.close-filter-panel",
|
|
1212
1212
|
type: We.OPERATION,
|
|
1213
1213
|
handler: (t) => {
|
|
1214
|
-
const e = t.get(Ve), r = t.get(z), s = t.get(
|
|
1214
|
+
const e = t.get(Ve), r = t.get(z), s = t.get(xr, Lt.OPTIONAL);
|
|
1215
1215
|
return e.getContextValue(ue) ? (e.setContextValue(ue, !1), s == null || s.focus(), r.terminate()) : !1;
|
|
1216
1216
|
}
|
|
1217
|
-
},
|
|
1217
|
+
}, Xt = {
|
|
1218
1218
|
id: "sheet.operation.apply-filter",
|
|
1219
1219
|
type: We.OPERATION,
|
|
1220
1220
|
handler: (t, e) => {
|
|
1221
1221
|
const { filterBy: r } = e;
|
|
1222
1222
|
return t.get(z).changeFilterBy(r);
|
|
1223
1223
|
}
|
|
1224
|
-
},
|
|
1225
|
-
var
|
|
1226
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1224
|
+
}, zt = "sheets-filter-ui.config", Ue = {};
|
|
1225
|
+
var Ei = Object.getOwnPropertyDescriptor, Ni = (t, e, r, s) => {
|
|
1226
|
+
for (var n = s > 1 ? void 0 : s ? Ei(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1227
1227
|
(i = t[a]) && (n = i(n) || n);
|
|
1228
1228
|
return n;
|
|
1229
1229
|
}, ae = (t, e) => (r, s) => e(r, s, t);
|
|
@@ -1236,7 +1236,7 @@ let he = class extends de {
|
|
|
1236
1236
|
this._commandService.beforeCommandExecuted((t) => {
|
|
1237
1237
|
var e, r, s;
|
|
1238
1238
|
if (t.id === Oe.id) {
|
|
1239
|
-
const n = this._injector.get(Be), a =
|
|
1239
|
+
const n = this._injector.get(Be), a = Zr(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;
|
|
@@ -1249,7 +1249,7 @@ let he = class extends de {
|
|
|
1249
1249
|
const f = (r = this._sheetsSelectionService.getCurrentLastSelection()) == null ? void 0 : r.range;
|
|
1250
1250
|
if (f) {
|
|
1251
1251
|
let C = { ...f };
|
|
1252
|
-
C = f.startColumn === f.endColumn && f.startRow === f.endRow ?
|
|
1252
|
+
C = f.startColumn === f.endColumn && f.startRow === f.endRow ? Kr(C, { left: !0, right: !0, up: !0, down: !0 }, l) : C, h = this._sheetPermissionCheckPermission.permissionCheckWithRanges({
|
|
1253
1253
|
rangeTypes: [Ce],
|
|
1254
1254
|
worksheetTypes: [Se, ge]
|
|
1255
1255
|
}, [C], i, o);
|
|
@@ -1272,18 +1272,18 @@ let he = class extends de {
|
|
|
1272
1272
|
);
|
|
1273
1273
|
}
|
|
1274
1274
|
};
|
|
1275
|
-
he =
|
|
1275
|
+
he = Ni([
|
|
1276
1276
|
ae(0, T(J)),
|
|
1277
1277
|
ae(1, T(G)),
|
|
1278
1278
|
ae(2, Y),
|
|
1279
|
-
ae(3, T(
|
|
1279
|
+
ae(3, T(Gr)),
|
|
1280
1280
|
ae(4, T(ie)),
|
|
1281
|
-
ae(5, T(
|
|
1281
|
+
ae(5, T(Yr))
|
|
1282
1282
|
], he);
|
|
1283
|
-
const X = 16,
|
|
1284
|
-
class
|
|
1283
|
+
const X = 16, Fi = 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 yt {
|
|
1285
1285
|
static drawNoCriteria(e, r, s, n) {
|
|
1286
|
-
e.save(),
|
|
1286
|
+
e.save(), Ct.drawWith(e, {
|
|
1287
1287
|
radius: 2,
|
|
1288
1288
|
width: X,
|
|
1289
1289
|
height: X,
|
|
@@ -1291,21 +1291,21 @@ class Ft {
|
|
|
1291
1291
|
}), e.lineCap = "square", e.strokeStyle = s, e.scale(r / X, r / X), 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
1293
|
static drawHasCriteria(e, r, s, n) {
|
|
1294
|
-
e.save(),
|
|
1294
|
+
e.save(), Ct.drawWith(e, {
|
|
1295
1295
|
radius: 2,
|
|
1296
1296
|
width: X,
|
|
1297
1297
|
height: X,
|
|
1298
1298
|
fill: n
|
|
1299
|
-
}), e.scale(r / X, r / X), e.fillStyle = s, e.fill(
|
|
1299
|
+
}), e.scale(r / X, r / X), e.fillStyle = s, e.fill(Fi), e.restore();
|
|
1300
1300
|
}
|
|
1301
1301
|
}
|
|
1302
|
-
var
|
|
1303
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1302
|
+
var yi = Object.getOwnPropertyDescriptor, Oi = (t, e, r, s) => {
|
|
1303
|
+
for (var n = s > 1 ? void 0 : s ? yi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1304
1304
|
(i = t[a]) && (n = i(n) || n);
|
|
1305
1305
|
return n;
|
|
1306
1306
|
}, qe = (t, e) => (r, s) => e(r, s, t);
|
|
1307
1307
|
const W = 16, Ne = 1;
|
|
1308
|
-
let tt = class extends
|
|
1308
|
+
let tt = class extends Qr {
|
|
1309
1309
|
constructor(e, r, s, n, a) {
|
|
1310
1310
|
super(e, r);
|
|
1311
1311
|
v(this, "_cellWidth", 0);
|
|
@@ -1326,7 +1326,7 @@ let tt = class extends Vr {
|
|
|
1326
1326
|
const i = new Path2D();
|
|
1327
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 ? yt.drawHasCriteria(e, W, l, c) : yt.drawNoCriteria(e, W, l, c), e.restore();
|
|
1330
1330
|
}
|
|
1331
1331
|
onPointerDown(e) {
|
|
1332
1332
|
if (e.button === 2)
|
|
@@ -1347,18 +1347,18 @@ let tt = class extends Vr {
|
|
|
1347
1347
|
this._hovered = !1, this.makeDirty(!0);
|
|
1348
1348
|
}
|
|
1349
1349
|
};
|
|
1350
|
-
tt =
|
|
1350
|
+
tt = Oi([
|
|
1351
1351
|
qe(2, Ve),
|
|
1352
1352
|
qe(3, Y),
|
|
1353
|
-
qe(4, T(
|
|
1353
|
+
qe(4, T(Mt))
|
|
1354
1354
|
], tt);
|
|
1355
|
-
var
|
|
1356
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1355
|
+
var Ii = Object.getOwnPropertyDescriptor, bi = (t, e, r, s) => {
|
|
1356
|
+
for (var n = s > 1 ? void 0 : s ? Ii(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1357
1357
|
(i = t[a]) && (n = i(n) || n);
|
|
1358
1358
|
return n;
|
|
1359
1359
|
}, re = (t, e) => (r, s) => e(r, s, t);
|
|
1360
|
-
const
|
|
1361
|
-
function
|
|
1360
|
+
const Ri = 1e3, Ai = 5e3;
|
|
1361
|
+
function wi(t, e, r, s) {
|
|
1362
1362
|
switch (s) {
|
|
1363
1363
|
case Ae.TOP:
|
|
1364
1364
|
return t + Ne;
|
|
@@ -1369,7 +1369,7 @@ function Ai(t, e, r, s) {
|
|
|
1369
1369
|
return e - W - Ne;
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
|
-
let rt = class extends
|
|
1372
|
+
let rt = class extends $t {
|
|
1373
1373
|
constructor(e, r, s, n, a, i, o, l) {
|
|
1374
1374
|
super();
|
|
1375
1375
|
v(this, "_filterRangeShape", null);
|
|
@@ -1392,28 +1392,28 @@ let rt = class extends Mt {
|
|
|
1392
1392
|
range: a == null ? void 0 : a.getRange(),
|
|
1393
1393
|
skeleton: e.skeleton
|
|
1394
1394
|
});
|
|
1395
|
-
return
|
|
1396
|
-
|
|
1395
|
+
return fr(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(
|
|
1396
|
+
si(
|
|
1397
1397
|
([c]) => {
|
|
1398
1398
|
var h;
|
|
1399
|
-
return c.type === We.MUTATION && ((h = c.params) == null ? void 0 : h.unitId) === r.getUnitId() && (
|
|
1399
|
+
return c.type === We.MUTATION && ((h = c.params) == null ? void 0 : h.unitId) === r.getUnitId() && (_r.has(c.id) || c.id === Xr.id);
|
|
1400
1400
|
}
|
|
1401
1401
|
),
|
|
1402
|
-
|
|
1402
|
+
Vt(20, void 0, { leading: !1, trailing: !0 }),
|
|
1403
1403
|
ce(i),
|
|
1404
|
-
|
|
1404
|
+
Qt(i())
|
|
1405
1405
|
// must trigger once
|
|
1406
1406
|
);
|
|
1407
1407
|
}),
|
|
1408
|
-
|
|
1408
|
+
ni(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
1413
|
_renderRange(e, r) {
|
|
1414
|
-
const { scene: s } = this._context, { rowHeaderWidth: n, columnHeaderHeight: a } = r, i = this._filterRangeShape = new
|
|
1414
|
+
const { scene: s } = this._context, { rowHeaderWidth: n, columnHeaderHeight: a } = r, i = this._filterRangeShape = new br(
|
|
1415
1415
|
s,
|
|
1416
|
-
|
|
1416
|
+
Ri,
|
|
1417
1417
|
this._themeService,
|
|
1418
1418
|
{
|
|
1419
1419
|
rowHeaderWidth: n,
|
|
@@ -1421,7 +1421,7 @@ let rt = class extends Mt {
|
|
|
1421
1421
|
enableAutoFill: !1,
|
|
1422
1422
|
highlightHeader: !1
|
|
1423
1423
|
}
|
|
1424
|
-
), l =
|
|
1424
|
+
), l = Rr({
|
|
1425
1425
|
range: e,
|
|
1426
1426
|
primary: null,
|
|
1427
1427
|
style: { fill: "rgba(0, 0, 0, 0.0)" }
|
|
@@ -1435,15 +1435,15 @@ let rt = class extends Mt {
|
|
|
1435
1435
|
this._interceptCellContent(n, i, e.range);
|
|
1436
1436
|
const { startColumn: h, endColumn: f, startRow: C } = r;
|
|
1437
1437
|
for (let p = h; p <= f; p++) {
|
|
1438
|
-
const _ = `sheets-filter-button-${p}`, S =
|
|
1438
|
+
const _ = `sheets-filter-button-${p}`, S = Ar(C, p, l, a), E = c.getComposedCellStyle(C, p), N = (E == null ? void 0 : E.vt) || Ae.BOTTOM, { startX: b, startY: y, endX: R, endY: L } = S, Z = R - b, K = L - y;
|
|
1439
1439
|
if (K <= Ne || Z <= Ne)
|
|
1440
1440
|
continue;
|
|
1441
|
-
const ne = !!s.getFilterColumn(p), U = R - W - Ne, A =
|
|
1441
|
+
const ne = !!s.getFilterColumn(p), U = R - W - Ne, A = wi(y, L, K, N), w = {
|
|
1442
1442
|
left: U,
|
|
1443
1443
|
top: A,
|
|
1444
1444
|
height: W,
|
|
1445
1445
|
width: W,
|
|
1446
|
-
zIndex:
|
|
1446
|
+
zIndex: Ai,
|
|
1447
1447
|
cellHeight: K,
|
|
1448
1448
|
cellWidth: Z,
|
|
1449
1449
|
filterParams: { unitId: n, subUnitId: i, col: p, hasCriteria: ne }
|
|
@@ -1454,8 +1454,8 @@ let rt = class extends Mt {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
_interceptCellContent(e, r, s) {
|
|
1456
1456
|
const { startRow: n, startColumn: a, endColumn: i } = s;
|
|
1457
|
-
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(
|
|
1458
|
-
effect:
|
|
1457
|
+
this._buttonRenderDisposable = this._sheetInterceptorService.intercept(zr.CELL_CONTENT, {
|
|
1458
|
+
effect: mr.Style,
|
|
1459
1459
|
handler: (o, l, c) => {
|
|
1460
1460
|
const { row: h, col: f, unitId: C, subUnitId: p } = l;
|
|
1461
1461
|
return C !== e || p !== r || h !== n || f < a || f > i || ((!o || o === l.rawData) && (o = { ...l.rawData }), o.fontRenderExtension = {
|
|
@@ -1471,52 +1471,52 @@ let rt = class extends Mt {
|
|
|
1471
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 = [];
|
|
1472
1472
|
}
|
|
1473
1473
|
};
|
|
1474
|
-
rt =
|
|
1474
|
+
rt = bi([
|
|
1475
1475
|
re(1, T(ie)),
|
|
1476
|
-
re(2, T(
|
|
1476
|
+
re(2, T(Or)),
|
|
1477
1477
|
re(3, T(J)),
|
|
1478
|
-
re(4, T(
|
|
1479
|
-
re(5, T(
|
|
1478
|
+
re(4, T(Mt)),
|
|
1479
|
+
re(5, T(qr)),
|
|
1480
1480
|
re(6, Y),
|
|
1481
|
-
re(7,
|
|
1481
|
+
re(7, Ir)
|
|
1482
1482
|
], rt);
|
|
1483
|
-
var
|
|
1484
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1483
|
+
var Pi = Object.getOwnPropertyDescriptor, Li = (t, e, r, s) => {
|
|
1484
|
+
for (var n = s > 1 ? void 0 : s ? Pi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1485
1485
|
(i = t[a]) && (n = i(n) || n);
|
|
1486
1486
|
return n;
|
|
1487
|
-
},
|
|
1488
|
-
let ye = class extends
|
|
1487
|
+
}, Ot = (t, e) => (r, s) => e(r, s, t);
|
|
1488
|
+
let ye = class extends $t {
|
|
1489
1489
|
constructor(t, e) {
|
|
1490
1490
|
super(), this._renderManagerService = t, this._sheetsRenderService = e, [
|
|
1491
|
-
_r,
|
|
1492
1491
|
gr,
|
|
1493
1492
|
Sr,
|
|
1494
|
-
Cr
|
|
1493
|
+
Cr,
|
|
1494
|
+
Tr
|
|
1495
1495
|
].forEach((r) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(r.id))), this.disposeWithMe(this._renderManagerService.registerRenderModule(
|
|
1496
1496
|
se.UNIVER_SHEET,
|
|
1497
1497
|
[rt]
|
|
1498
1498
|
));
|
|
1499
1499
|
}
|
|
1500
1500
|
};
|
|
1501
|
-
ye =
|
|
1502
|
-
|
|
1503
|
-
|
|
1501
|
+
ye = Li([
|
|
1502
|
+
Ot(0, Wt),
|
|
1503
|
+
Ot(1, T(Dt))
|
|
1504
1504
|
], ye);
|
|
1505
|
-
var
|
|
1506
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1505
|
+
var Mi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, xi = (t, e, r) => e in t ? Mi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Ui = (t, e, r, s) => {
|
|
1506
|
+
for (var n = s > 1 ? void 0 : s ? $i(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
1507
1507
|
(i = t[a]) && (n = i(n) || n);
|
|
1508
1508
|
return n;
|
|
1509
|
-
},
|
|
1510
|
-
const
|
|
1509
|
+
}, It = (t, e) => (r, s) => e(r, s, t), Jt = (t, e, r) => xi(t, typeof e != "symbol" ? e + "" : e, r);
|
|
1510
|
+
const ki = "SHEET_FILTER_UI_PLUGIN";
|
|
1511
1511
|
let ke = class extends it {
|
|
1512
1512
|
constructor(t = Ue, e, r) {
|
|
1513
1513
|
super(), this._config = t, this._injector = e, this._configService = r;
|
|
1514
|
-
const { menu: s, ...n } =
|
|
1514
|
+
const { menu: s, ...n } = kt(
|
|
1515
1515
|
{},
|
|
1516
1516
|
Ue,
|
|
1517
1517
|
this._config
|
|
1518
1518
|
);
|
|
1519
|
-
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(
|
|
1519
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(zt, n);
|
|
1520
1520
|
}
|
|
1521
1521
|
onStarting() {
|
|
1522
1522
|
[
|
|
@@ -1531,12 +1531,12 @@ let ke = class extends it {
|
|
|
1531
1531
|
this._injector.get(ye);
|
|
1532
1532
|
}
|
|
1533
1533
|
};
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
ke =
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1534
|
+
Jt(ke, "type", se.UNIVER_SHEET);
|
|
1535
|
+
Jt(ke, "pluginName", ki);
|
|
1536
|
+
ke = Ui([
|
|
1537
|
+
xt(Ht),
|
|
1538
|
+
It(1, T(ie)),
|
|
1539
|
+
It(2, Ut)
|
|
1540
1540
|
], ke);
|
|
1541
1541
|
var $ = function() {
|
|
1542
1542
|
return $ = Object.assign || function(t) {
|
|
@@ -1546,7 +1546,7 @@ var $ = function() {
|
|
|
1546
1546
|
}
|
|
1547
1547
|
return t;
|
|
1548
1548
|
}, $.apply(this, arguments);
|
|
1549
|
-
},
|
|
1549
|
+
}, Hi = function(t, e) {
|
|
1550
1550
|
var r = {};
|
|
1551
1551
|
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && e.indexOf(s) < 0 && (r[s] = t[s]);
|
|
1552
1552
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -1554,15 +1554,15 @@ var $ = function() {
|
|
|
1554
1554
|
e.indexOf(s[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, s[n]) && (r[s[n]] = t[s[n]]);
|
|
1555
1555
|
return r;
|
|
1556
1556
|
}, ve = me(function(t, e) {
|
|
1557
|
-
var r = t.icon, s = t.id, n = t.className, a = t.extend, i =
|
|
1558
|
-
return
|
|
1557
|
+
var r = t.icon, s = t.id, n = t.className, a = t.extend, i = Hi(t, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(s, " ").concat(n || "").trim(), l = pi("_".concat(Wi()));
|
|
1558
|
+
return er(r, "".concat(s), { defIds: r.defIds, idSuffix: l.current }, $({ ref: e, className: o }, i), a);
|
|
1559
1559
|
});
|
|
1560
|
-
function
|
|
1561
|
-
return pe(t.tag, $($({ key: e },
|
|
1562
|
-
return
|
|
1560
|
+
function er(t, e, r, s, n) {
|
|
1561
|
+
return pe(t.tag, $($({ key: e }, Di(t, r, n)), s), (Bi(t, r).children || []).map(function(a, i) {
|
|
1562
|
+
return er(a, "".concat(e, "-").concat(t.tag, "-").concat(i), r, void 0, n);
|
|
1563
1563
|
}));
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function Di(t, e, r) {
|
|
1566
1566
|
var s = $({}, t.attrs);
|
|
1567
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) {
|
|
1568
1568
|
var i = a[0], o = a[1];
|
|
@@ -1574,57 +1574,57 @@ function Hi(t, e, r) {
|
|
|
1574
1574
|
typeof o == "string" && (s[i] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
1575
1575
|
})), s;
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function Bi(t, e) {
|
|
1578
1578
|
var r, s = e.defIds;
|
|
1579
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
1580
|
return typeof n.attrs.id == "string" && s && s.includes(n.attrs.id) ? $($({}, n), { attrs: $($({}, n.attrs), { id: n.attrs.id + e.idSuffix }) }) : n;
|
|
1581
1581
|
}) }) : t;
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function Wi() {
|
|
1584
1584
|
return Math.random().toString(36).substring(2, 8);
|
|
1585
1585
|
}
|
|
1586
1586
|
ve.displayName = "UniverIcon";
|
|
1587
|
-
var
|
|
1587
|
+
var Vi = { 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" } }] }, tr = me(function(t, e) {
|
|
1588
1588
|
return pe(ve, Object.assign({}, t, {
|
|
1589
1589
|
id: "a-icon",
|
|
1590
1590
|
ref: e,
|
|
1591
|
-
icon:
|
|
1591
|
+
icon: Vi
|
|
1592
1592
|
}));
|
|
1593
1593
|
});
|
|
1594
|
-
|
|
1595
|
-
var
|
|
1594
|
+
tr.displayName = "AIcon";
|
|
1595
|
+
var Qi = { 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" } }] }, rr = me(function(t, e) {
|
|
1596
1596
|
return pe(ve, Object.assign({}, t, {
|
|
1597
1597
|
id: "ban-icon",
|
|
1598
1598
|
ref: e,
|
|
1599
|
-
icon:
|
|
1599
|
+
icon: Qi
|
|
1600
1600
|
}));
|
|
1601
1601
|
});
|
|
1602
|
-
|
|
1603
|
-
var
|
|
1602
|
+
rr.displayName = "BanIcon";
|
|
1603
|
+
var ji = { 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" } }] }, ir = me(function(t, e) {
|
|
1604
1604
|
return pe(ve, Object.assign({}, t, {
|
|
1605
1605
|
id: "filter-icon",
|
|
1606
1606
|
ref: e,
|
|
1607
|
-
icon:
|
|
1607
|
+
icon: ji
|
|
1608
1608
|
}));
|
|
1609
1609
|
});
|
|
1610
|
-
|
|
1611
|
-
var
|
|
1610
|
+
ir.displayName = "FilterIcon";
|
|
1611
|
+
var Gi = { 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.00016 1.33203C6.68162 1.33203 5.39269 1.72302 4.29636 2.45557C3.20004 3.18811 2.34555 4.2293 1.84097 5.44747C1.33638 6.66565 1.20436 8.00609 1.4616 9.2993C1.71883 10.5925 2.35377 11.7804 3.28612 12.7127C4.21847 13.6451 5.40636 14.28 6.69956 14.5373C7.99277 14.7945 9.33321 14.6625 10.5514 14.1579C11.7696 13.6533 12.8108 12.7988 13.5433 11.7025C14.2758 10.6062 14.6668 9.31724 14.6668 7.9987C14.6649 6.23118 13.9619 4.53662 12.7121 3.2868C11.4622 2.03697 9.76768 1.33397 8.00016 1.33203ZM7.66683 3.9987C7.86461 3.9987 8.05795 4.05735 8.2224 4.16723C8.38685 4.27711 8.51502 4.43329 8.59071 4.61601C8.6664 4.79874 8.6862 4.99981 8.64762 5.19379C8.60903 5.38777 8.51379 5.56595 8.37394 5.7058C8.23409 5.84566 8.0559 5.9409 7.86192 5.97948C7.66794 6.01807 7.46687 5.99826 7.28415 5.92258C7.10142 5.84689 6.94524 5.71872 6.83536 5.55427C6.72548 5.38982 6.66683 5.19648 6.66683 4.9987C6.66683 4.73348 6.77219 4.47913 6.95972 4.29159C7.14726 4.10405 7.40162 3.9987 7.66683 3.9987ZM9.3335 11.332H6.66683C6.49002 11.332 6.32045 11.2618 6.19543 11.1368C6.0704 11.0117 6.00016 10.8422 6.00016 10.6654C6.00016 10.4886 6.0704 10.319 6.19543 10.194C6.32045 10.0689 6.49002 9.9987 6.66683 9.9987H7.3335V7.9987H6.66683C6.49002 7.9987 6.32045 7.92846 6.19543 7.80343C6.0704 7.67841 6.00016 7.50884 6.00016 7.33203C6.00016 7.15522 6.0704 6.98565 6.19543 6.86063C6.32045 6.7356 6.49002 6.66536 6.66683 6.66536H8.00016C8.17698 6.66536 8.34655 6.7356 8.47157 6.86063C8.59659 6.98565 8.66683 7.15522 8.66683 7.33203V9.9987H9.3335C9.51031 9.9987 9.67988 10.0689 9.8049 10.194C9.92993 10.319 10.0002 10.4886 10.0002 10.6654C10.0002 10.8422 9.92993 11.0117 9.8049 11.1368C9.67988 11.2618 9.51031 11.332 9.3335 11.332Z" } }] }, sr = me(function(t, e) {
|
|
1612
1612
|
return pe(ve, Object.assign({}, t, {
|
|
1613
1613
|
id: "info-icon",
|
|
1614
1614
|
ref: e,
|
|
1615
|
-
icon:
|
|
1615
|
+
icon: Gi
|
|
1616
1616
|
}));
|
|
1617
1617
|
});
|
|
1618
|
-
|
|
1619
|
-
var
|
|
1618
|
+
sr.displayName = "InfoIcon";
|
|
1619
|
+
var Yi = { 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" } }] }, nr = me(function(t, e) {
|
|
1620
1620
|
return pe(ve, Object.assign({}, t, {
|
|
1621
1621
|
id: "success-icon",
|
|
1622
1622
|
ref: e,
|
|
1623
|
-
icon:
|
|
1623
|
+
icon: Yi
|
|
1624
1624
|
}));
|
|
1625
1625
|
});
|
|
1626
|
-
|
|
1627
|
-
function
|
|
1626
|
+
nr.displayName = "SuccessIcon";
|
|
1627
|
+
function Zi(t) {
|
|
1628
1628
|
const { model: e } = t, r = B(G), s = x(e.cellFillColors$, [], !0), n = x(e.cellTextColors$, [], !0), a = H((o) => {
|
|
1629
1629
|
e.onFilterCheckToggled(o);
|
|
1630
1630
|
}, [e]), i = H((o) => {
|
|
@@ -1667,12 +1667,12 @@ function Yi(t) {
|
|
|
1667
1667
|
style: { backgroundColor: o.color }
|
|
1668
1668
|
}
|
|
1669
1669
|
) : /* @__PURE__ */ d(
|
|
1670
|
-
|
|
1670
|
+
rr,
|
|
1671
1671
|
{
|
|
1672
1672
|
className: "univer-h-6 univer-w-6 univer-cursor-pointer univer-rounded-full hover:univer-ring-2 hover:univer-ring-offset-2 hover:univer-ring-offset-white"
|
|
1673
1673
|
}
|
|
1674
1674
|
),
|
|
1675
|
-
o.checked && /* @__PURE__ */ d(
|
|
1675
|
+
o.checked && /* @__PURE__ */ d(bt, {})
|
|
1676
1676
|
]
|
|
1677
1677
|
},
|
|
1678
1678
|
`sheets-filter-cell-fill-color-${l}`
|
|
@@ -1702,10 +1702,10 @@ function Yi(t) {
|
|
|
1702
1702
|
"div",
|
|
1703
1703
|
{
|
|
1704
1704
|
className: "univer-box-border univer-flex univer-h-full univer-w-full univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-border univer-border-solid univer-border-[rgba(13,13,13,0.06)] univer-p-0.5 hover:univer-ring-2 hover:univer-ring-offset-2 hover:univer-ring-offset-white dark:!univer-border-[rgba(255,255,255,0.06)]",
|
|
1705
|
-
children: /* @__PURE__ */ d(
|
|
1705
|
+
children: /* @__PURE__ */ d(tr, { style: { color: o.color } })
|
|
1706
1706
|
}
|
|
1707
1707
|
),
|
|
1708
|
-
o.checked && /* @__PURE__ */ d(
|
|
1708
|
+
o.checked && /* @__PURE__ */ d(bt, {})
|
|
1709
1709
|
]
|
|
1710
1710
|
},
|
|
1711
1711
|
`sheets-filter-cell-text-color-${l}`
|
|
@@ -1726,13 +1726,13 @@ function Yi(t) {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
);
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function bt() {
|
|
1730
1730
|
return /* @__PURE__ */ d(
|
|
1731
1731
|
"div",
|
|
1732
1732
|
{
|
|
1733
1733
|
className: "univer-absolute -univer-bottom-0.5 -univer-right-0.5 univer-flex univer-h-3 univer-w-3 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-bg-white",
|
|
1734
1734
|
children: /* @__PURE__ */ d(
|
|
1735
|
-
|
|
1735
|
+
nr,
|
|
1736
1736
|
{
|
|
1737
1737
|
className: "univer-h-full univer-w-full univer-font-bold univer-text-[#418F1F]"
|
|
1738
1738
|
}
|
|
@@ -1740,24 +1740,24 @@ function It() {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
);
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function Ki(t) {
|
|
1744
1744
|
var p, _;
|
|
1745
1745
|
const { model: e } = t, r = B(G), s = x(e.conditionItem$, void 0), n = x(e.filterConditionFormParams$, void 0), a = n != null && n.and ? "AND" : "OR", i = H((S) => {
|
|
1746
1746
|
e.onConditionFormChange({ and: S === "AND" });
|
|
1747
|
-
}, [e]), o =
|
|
1747
|
+
}, [e]), o = qi(r), l = H((S) => {
|
|
1748
1748
|
e.onPrimaryConditionChange(S);
|
|
1749
|
-
}, [e]), c =
|
|
1749
|
+
}, [e]), c = Xi(r), h = H((S) => {
|
|
1750
1750
|
e.onConditionFormChange(S);
|
|
1751
1751
|
}, [e]), f = r.t("sheets-filter.panel.input-values-placeholder");
|
|
1752
1752
|
function C(S, E, N) {
|
|
1753
1753
|
const b = m.getItemByOperator(S).numOfParameters === 1;
|
|
1754
|
-
return /* @__PURE__ */ F(
|
|
1755
|
-
N === "operator2" && /* @__PURE__ */ F(
|
|
1756
|
-
/* @__PURE__ */ d(
|
|
1757
|
-
/* @__PURE__ */ d(
|
|
1754
|
+
return /* @__PURE__ */ F(Nt, { children: [
|
|
1755
|
+
N === "operator2" && /* @__PURE__ */ F(ci, { value: a, onChange: i, children: [
|
|
1756
|
+
/* @__PURE__ */ d(Et, { value: "AND", children: r.t("sheets-filter.panel.and") }),
|
|
1757
|
+
/* @__PURE__ */ d(Et, { value: "OR", children: r.t("sheets-filter.panel.or") })
|
|
1758
1758
|
] }),
|
|
1759
1759
|
/* @__PURE__ */ d(
|
|
1760
|
-
|
|
1760
|
+
Tt,
|
|
1761
1761
|
{
|
|
1762
1762
|
value: S,
|
|
1763
1763
|
options: c,
|
|
@@ -1765,7 +1765,7 @@ function Zi(t) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
),
|
|
1767
1767
|
b && /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d(
|
|
1768
|
-
|
|
1768
|
+
Gt,
|
|
1769
1769
|
{
|
|
1770
1770
|
className: "univer-mt-2",
|
|
1771
1771
|
value: E,
|
|
@@ -1780,8 +1780,8 @@ function Zi(t) {
|
|
|
1780
1780
|
{
|
|
1781
1781
|
"data-u-comp": "sheets-filter-panel-conditions-container",
|
|
1782
1782
|
className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
|
|
1783
|
-
children: s && n && /* @__PURE__ */ F(
|
|
1784
|
-
/* @__PURE__ */ d(
|
|
1783
|
+
children: s && n && /* @__PURE__ */ F(Nt, { children: [
|
|
1784
|
+
/* @__PURE__ */ d(Tt, { value: s.operator, options: o, onChange: l }),
|
|
1785
1785
|
m.getItemByOperator(s.operator).numOfParameters !== 0 ? /* @__PURE__ */ F(
|
|
1786
1786
|
"div",
|
|
1787
1787
|
{
|
|
@@ -1809,7 +1809,7 @@ function Zi(t) {
|
|
|
1809
1809
|
}
|
|
1810
1810
|
);
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function qi(t) {
|
|
1813
1813
|
const e = t.getCurrentLocale();
|
|
1814
1814
|
return ut(() => [
|
|
1815
1815
|
{
|
|
@@ -1851,11 +1851,11 @@ function Ki(t) {
|
|
|
1851
1851
|
}
|
|
1852
1852
|
], [e, t]);
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1854
|
+
function Xi(t) {
|
|
1855
1855
|
const e = t.getCurrentLocale();
|
|
1856
1856
|
return ut(() => m.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: t.t(r.label), value: r.operator })), [e, t]);
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function zi(t) {
|
|
1859
1859
|
const { model: e } = t, r = B(G), s = x(e.searchString$, "", !0), n = x(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 = H(() => {
|
|
1860
1860
|
e.onCheckAllToggled(!o);
|
|
1861
1861
|
}, [e, o]), f = H((p) => {
|
|
@@ -1874,7 +1874,7 @@ function Xi(t) {
|
|
|
1874
1874
|
className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
|
|
1875
1875
|
children: [
|
|
1876
1876
|
/* @__PURE__ */ d(
|
|
1877
|
-
|
|
1877
|
+
Gt,
|
|
1878
1878
|
{
|
|
1879
1879
|
autoFocus: !0,
|
|
1880
1880
|
value: s,
|
|
@@ -1900,7 +1900,7 @@ function Xi(t) {
|
|
|
1900
1900
|
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",
|
|
1901
1901
|
children: [
|
|
1902
1902
|
/* @__PURE__ */ d(
|
|
1903
|
-
|
|
1903
|
+
ui,
|
|
1904
1904
|
{
|
|
1905
1905
|
indeterminate: l,
|
|
1906
1906
|
disabled: n.length === 0,
|
|
@@ -1930,7 +1930,7 @@ function Xi(t) {
|
|
|
1930
1930
|
}
|
|
1931
1931
|
),
|
|
1932
1932
|
/* @__PURE__ */ d("div", { "data-u-comp": "sheets-filter-panel-values-virtual", className: "univer-flex-grow", children: /* @__PURE__ */ d(
|
|
1933
|
-
|
|
1933
|
+
hi,
|
|
1934
1934
|
{
|
|
1935
1935
|
data: n,
|
|
1936
1936
|
defaultExpandAll: !1,
|
|
@@ -1987,35 +1987,35 @@ function Xi(t) {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
);
|
|
1989
1989
|
}
|
|
1990
|
-
function
|
|
1991
|
-
const t = B(
|
|
1990
|
+
function Ji() {
|
|
1991
|
+
const t = B(Er);
|
|
1992
1992
|
if (!x(t.visible$, void 0, !0)) return null;
|
|
1993
|
-
const r = B(G), s = B(
|
|
1993
|
+
const r = B(G), s = B(Bt), n = x(t.enabled$, void 0, !0);
|
|
1994
1994
|
return /* @__PURE__ */ F(
|
|
1995
1995
|
"div",
|
|
1996
1996
|
{
|
|
1997
|
-
className: "univer-mt-2 univer-flex univer-items-center univer-justify-between univer-text-sm univer-text-gray-900 dark
|
|
1997
|
+
className: "univer-mt-2 univer-flex univer-items-center univer-justify-between univer-text-sm univer-text-gray-900 dark:!univer-text-gray-200",
|
|
1998
1998
|
children: [
|
|
1999
1999
|
/* @__PURE__ */ F("div", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
2000
2000
|
/* @__PURE__ */ d("span", { children: r.t("sheets-filter.sync.title") }),
|
|
2001
2001
|
/* @__PURE__ */ d(
|
|
2002
|
-
|
|
2002
|
+
di,
|
|
2003
2003
|
{
|
|
2004
2004
|
title: n ? r.t("sheets-filter.sync.statusTips.off") : r.t("sheets-filter.sync.statusTips.on"),
|
|
2005
2005
|
asChild: !0,
|
|
2006
|
-
children: /* @__PURE__ */ d(
|
|
2006
|
+
children: /* @__PURE__ */ d(sr, { className: "univer-block" })
|
|
2007
2007
|
}
|
|
2008
2008
|
)
|
|
2009
2009
|
] }),
|
|
2010
2010
|
/* @__PURE__ */ d(
|
|
2011
|
-
|
|
2011
|
+
fi,
|
|
2012
2012
|
{
|
|
2013
2013
|
defaultChecked: n,
|
|
2014
2014
|
onChange: (a) => {
|
|
2015
2015
|
const i = a ? r.t("sheets-filter.sync.switchTips.on") : r.t("sheets-filter.sync.switchTips.off");
|
|
2016
2016
|
t.setEnabled(a), s.show({
|
|
2017
2017
|
content: i,
|
|
2018
|
-
type:
|
|
2018
|
+
type: Yt.Success,
|
|
2019
2019
|
duration: 2e3
|
|
2020
2020
|
});
|
|
2021
2021
|
}
|
|
@@ -2025,17 +2025,17 @@ function zi() {
|
|
|
2025
2025
|
}
|
|
2026
2026
|
);
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function es() {
|
|
2029
2029
|
var E;
|
|
2030
|
-
const t = B(z), e = B(G), r = B(Y), s = x(t.filterBy$, void 0, !0), n = x(t.filterByModel$, void 0, !1), a = x(() => (n == null ? void 0 : n.canApply$) || fe(!1), void 0, !1, [n]), i =
|
|
2031
|
-
r.executeCommand(
|
|
2030
|
+
const t = B(z), e = B(G), r = B(Y), s = x(t.filterBy$, void 0, !0), n = x(t.filterByModel$, void 0, !1), a = x(() => (n == null ? void 0 : n.canApply$) || fe(!1), void 0, !1, [n]), i = ts(e), o = !x(t.hasCriteria$), l = H((N) => {
|
|
2031
|
+
r.executeCommand(Xt.id, { filterBy: N });
|
|
2032
2032
|
}, [r]), c = H(async () => {
|
|
2033
2033
|
await (n == null ? void 0 : n.clear()), r.executeCommand(Ee.id);
|
|
2034
2034
|
}, [n, r]), h = H(() => {
|
|
2035
2035
|
r.executeCommand(Ee.id);
|
|
2036
2036
|
}, [r]), f = H(async () => {
|
|
2037
2037
|
await (n == null ? void 0 : n.apply()), r.executeCommand(Ee.id);
|
|
2038
|
-
}, [n, r]), p = (E = B(J).activeFilterModel) == null ? void 0 : E.getRange(), _ = t.col, S =
|
|
2038
|
+
}, [n, r]), p = (E = B(J).activeFilterModel) == null ? void 0 : E.getRange(), _ = t.col, S = Ur(wr.FILTER_PANEL_EMBED_POINT);
|
|
2039
2039
|
return /* @__PURE__ */ F(
|
|
2040
2040
|
"div",
|
|
2041
2041
|
{
|
|
@@ -2043,14 +2043,14 @@ function Ji() {
|
|
|
2043
2043
|
className: "univer-box-border univer-flex univer-max-h-[500px] univer-w-[400px] univer-flex-col univer-rounded-lg univer-bg-white univer-p-4 univer-shadow-lg dark:!univer-border-gray-600 dark:!univer-bg-gray-700",
|
|
2044
2044
|
children: [
|
|
2045
2045
|
/* @__PURE__ */ d(
|
|
2046
|
-
|
|
2046
|
+
kr,
|
|
2047
2047
|
{
|
|
2048
2048
|
components: S,
|
|
2049
2049
|
sharedProps: { range: p, colIndex: _, onClose: h }
|
|
2050
2050
|
}
|
|
2051
2051
|
),
|
|
2052
2052
|
/* @__PURE__ */ d("div", { className: "univer-mb-1 univer-flex-shrink-0 univer-flex-grow-0", children: /* @__PURE__ */ d(
|
|
2053
|
-
|
|
2053
|
+
mi,
|
|
2054
2054
|
{
|
|
2055
2055
|
value: s,
|
|
2056
2056
|
items: i,
|
|
@@ -2062,10 +2062,10 @@ function Ji() {
|
|
|
2062
2062
|
{
|
|
2063
2063
|
"data-u-comp": "sheets-filter-panel-content",
|
|
2064
2064
|
className: "univer-flex-shrink univer-flex-grow univer-pt-2",
|
|
2065
|
-
children: s === P.VALUES ? /* @__PURE__ */ d(
|
|
2065
|
+
children: s === P.VALUES ? /* @__PURE__ */ d(zi, { model: n }) : s === P.COLORS ? /* @__PURE__ */ d(Zi, { model: n }) : /* @__PURE__ */ d(Ki, { model: n })
|
|
2066
2066
|
}
|
|
2067
2067
|
) : /* @__PURE__ */ d("div", { className: "univer-flex-1" }),
|
|
2068
|
-
/* @__PURE__ */ d(
|
|
2068
|
+
/* @__PURE__ */ d(Ji, {}),
|
|
2069
2069
|
/* @__PURE__ */ F(
|
|
2070
2070
|
"div",
|
|
2071
2071
|
{
|
|
@@ -2084,7 +2084,7 @@ function Ji() {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
);
|
|
2086
2086
|
}
|
|
2087
|
-
function
|
|
2087
|
+
function ts(t) {
|
|
2088
2088
|
const e = t.getCurrentLocale();
|
|
2089
2089
|
return ut(() => [
|
|
2090
2090
|
{ label: t.t("sheets-filter.panel.by-values"), value: P.VALUES },
|
|
@@ -2092,7 +2092,7 @@ function es(t) {
|
|
|
2092
2092
|
{ label: t.t("sheets-filter.panel.by-conditions"), value: P.CONDITIONS }
|
|
2093
2093
|
], [e, t]);
|
|
2094
2094
|
}
|
|
2095
|
-
function
|
|
2095
|
+
function rs(t) {
|
|
2096
2096
|
const e = t.get(J);
|
|
2097
2097
|
return {
|
|
2098
2098
|
id: Oe.id,
|
|
@@ -2101,9 +2101,9 @@ function ts(t) {
|
|
|
2101
2101
|
tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
|
|
2102
2102
|
hidden$: ot(t, se.UNIVER_SHEET),
|
|
2103
2103
|
activated$: e.activeFilterModel$.pipe(ce((r) => !!r)),
|
|
2104
|
-
disabled$:
|
|
2104
|
+
disabled$: Pr(
|
|
2105
2105
|
t,
|
|
2106
|
-
|
|
2106
|
+
Lr(
|
|
2107
2107
|
t,
|
|
2108
2108
|
{
|
|
2109
2109
|
worksheetTypes: [ge, Se],
|
|
@@ -2113,7 +2113,7 @@ function ts(t) {
|
|
|
2113
2113
|
)
|
|
2114
2114
|
};
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2116
|
+
function is(t) {
|
|
2117
2117
|
const e = t.get(J);
|
|
2118
2118
|
return {
|
|
2119
2119
|
id: nt.id,
|
|
@@ -2126,7 +2126,7 @@ function rs(t) {
|
|
|
2126
2126
|
}))
|
|
2127
2127
|
};
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2129
|
+
function ss(t) {
|
|
2130
2130
|
const e = t.get(J);
|
|
2131
2131
|
return {
|
|
2132
2132
|
id: st.id,
|
|
@@ -2139,34 +2139,34 @@ function is(t) {
|
|
|
2139
2139
|
}))
|
|
2140
2140
|
};
|
|
2141
2141
|
}
|
|
2142
|
-
const
|
|
2143
|
-
[
|
|
2142
|
+
const ns = {
|
|
2143
|
+
[Hr.ORGANIZATION]: {
|
|
2144
2144
|
[Oe.id]: {
|
|
2145
2145
|
order: 2,
|
|
2146
|
-
menuItemFactory:
|
|
2146
|
+
menuItemFactory: rs,
|
|
2147
2147
|
[nt.id]: {
|
|
2148
2148
|
order: 0,
|
|
2149
|
-
menuItemFactory:
|
|
2149
|
+
menuItemFactory: is
|
|
2150
2150
|
},
|
|
2151
2151
|
[st.id]: {
|
|
2152
2152
|
order: 1,
|
|
2153
|
-
menuItemFactory:
|
|
2153
|
+
menuItemFactory: ss
|
|
2154
2154
|
}
|
|
2155
2155
|
}
|
|
2156
2156
|
}
|
|
2157
|
-
},
|
|
2157
|
+
}, os = {
|
|
2158
2158
|
id: Oe.id,
|
|
2159
|
-
binding:
|
|
2159
|
+
binding: Dr.L | gt.CTRL_COMMAND | gt.SHIFT,
|
|
2160
2160
|
description: "sheets-filter.shortcut.smart-toggle-filter",
|
|
2161
|
-
preconditions:
|
|
2161
|
+
preconditions: Mr,
|
|
2162
2162
|
group: "4_sheet-edit"
|
|
2163
2163
|
};
|
|
2164
|
-
var
|
|
2165
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
2164
|
+
var ls = Object.getOwnPropertyDescriptor, as = (t, e, r, s) => {
|
|
2165
|
+
for (var n = s > 1 ? void 0 : s ? ls(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
2166
2166
|
(i = t[a]) && (n = i(n) || n);
|
|
2167
2167
|
return n;
|
|
2168
2168
|
}, M = (t, e) => (r, s) => e(r, s, t);
|
|
2169
|
-
const
|
|
2169
|
+
const Rt = "FILTER_PANEL_POPUP";
|
|
2170
2170
|
let He = class extends ye {
|
|
2171
2171
|
constructor(e, r, s, n, a, i, o, l, c, h, f, C, p) {
|
|
2172
2172
|
super(p, C);
|
|
@@ -2178,7 +2178,7 @@ let He = class extends ye {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
_initShortcuts() {
|
|
2180
2180
|
[
|
|
2181
|
-
|
|
2181
|
+
os
|
|
2182
2182
|
].forEach((e) => {
|
|
2183
2183
|
this.disposeWithMe(this._shortcutService.registerShortcut(e));
|
|
2184
2184
|
});
|
|
@@ -2186,12 +2186,12 @@ let He = class extends ye {
|
|
|
2186
2186
|
_initCommands() {
|
|
2187
2187
|
[
|
|
2188
2188
|
Oe,
|
|
2189
|
-
Er,
|
|
2190
2189
|
Nr,
|
|
2190
|
+
Fr,
|
|
2191
2191
|
Q,
|
|
2192
2192
|
nt,
|
|
2193
2193
|
st,
|
|
2194
|
-
|
|
2194
|
+
Xt,
|
|
2195
2195
|
xe,
|
|
2196
2196
|
Ee
|
|
2197
2197
|
].forEach((e) => {
|
|
@@ -2199,21 +2199,21 @@ let He = class extends ye {
|
|
|
2199
2199
|
});
|
|
2200
2200
|
}
|
|
2201
2201
|
_initMenuItems() {
|
|
2202
|
-
this._menuManagerService.mergeMenu(
|
|
2202
|
+
this._menuManagerService.mergeMenu(ns);
|
|
2203
2203
|
}
|
|
2204
2204
|
_initUI() {
|
|
2205
2205
|
[
|
|
2206
|
-
[
|
|
2207
|
-
["FilterIcon",
|
|
2206
|
+
[Rt, es],
|
|
2207
|
+
["FilterIcon", ir]
|
|
2208
2208
|
].forEach(([e, r]) => {
|
|
2209
2209
|
this.disposeWithMe(
|
|
2210
2210
|
this._componentManager.register(e, r)
|
|
2211
2211
|
);
|
|
2212
|
-
}), this.disposeWithMe(this._contextService.subscribeContextValue$(ue).pipe(
|
|
2212
|
+
}), this.disposeWithMe(this._contextService.subscribeContextValue$(ue).pipe(oi()).subscribe((e) => {
|
|
2213
2213
|
e ? this._openFilterPopup() : this._closeFilterPopup();
|
|
2214
2214
|
})), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((e) => {
|
|
2215
2215
|
e && this._messageService.show({
|
|
2216
|
-
type:
|
|
2216
|
+
type: Yt.Error,
|
|
2217
2217
|
content: this._localeService.t(e)
|
|
2218
2218
|
});
|
|
2219
2219
|
}));
|
|
@@ -2224,7 +2224,7 @@ let He = class extends ye {
|
|
|
2224
2224
|
throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
|
|
2225
2225
|
const r = e.getRange(), s = this._sheetsFilterPanelService.col, { startRow: n } = r;
|
|
2226
2226
|
this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(n, s, {
|
|
2227
|
-
componentKey:
|
|
2227
|
+
componentKey: Rt,
|
|
2228
2228
|
direction: "horizontal",
|
|
2229
2229
|
onClickOutside: () => this._commandService.syncExecuteCommand(Ee.id),
|
|
2230
2230
|
offset: [5, 0]
|
|
@@ -2235,44 +2235,44 @@ let He = class extends ye {
|
|
|
2235
2235
|
(e = this._popupDisposable) == null || e.dispose(), this._popupDisposable = null;
|
|
2236
2236
|
}
|
|
2237
2237
|
};
|
|
2238
|
-
He =
|
|
2238
|
+
He = as([
|
|
2239
2239
|
M(0, T(ie)),
|
|
2240
|
-
M(1, T(
|
|
2240
|
+
M(1, T(Br)),
|
|
2241
2241
|
M(2, T(z)),
|
|
2242
|
-
M(3, T(
|
|
2242
|
+
M(3, T($r)),
|
|
2243
2243
|
M(4, T(J)),
|
|
2244
2244
|
M(5, T(G)),
|
|
2245
|
-
M(6,
|
|
2245
|
+
M(6, Wr),
|
|
2246
2246
|
M(7, Y),
|
|
2247
|
-
M(8,
|
|
2247
|
+
M(8, Vr),
|
|
2248
2248
|
M(9, Ve),
|
|
2249
|
-
M(10,
|
|
2250
|
-
M(11, T(
|
|
2251
|
-
M(12,
|
|
2249
|
+
M(10, Bt),
|
|
2250
|
+
M(11, T(Dt)),
|
|
2251
|
+
M(12, Wt)
|
|
2252
2252
|
], He);
|
|
2253
|
-
var
|
|
2254
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
2253
|
+
var cs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, hs = (t, e, r) => e in t ? cs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, ds = (t, e, r, s) => {
|
|
2254
|
+
for (var n = s > 1 ? void 0 : s ? us(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
2255
2255
|
(i = t[a]) && (n = i(n) || n);
|
|
2256
2256
|
return n;
|
|
2257
|
-
}, Xe = (t, e) => (r, s) => e(r, s, t),
|
|
2258
|
-
const
|
|
2257
|
+
}, Xe = (t, e) => (r, s) => e(r, s, t), or = (t, e, r) => hs(t, typeof e != "symbol" ? e + "" : e, r);
|
|
2258
|
+
const fs = "SHEET_FILTER_UI_PLUGIN";
|
|
2259
2259
|
let De = class extends it {
|
|
2260
2260
|
constructor(t = Ue, e, r, s) {
|
|
2261
2261
|
super(), this._config = t, this._injector = e, this._configService = r, this._rpcChannelService = s;
|
|
2262
|
-
const { menu: n, ...a } =
|
|
2262
|
+
const { menu: n, ...a } = kt(
|
|
2263
2263
|
{},
|
|
2264
2264
|
Ue,
|
|
2265
2265
|
this._config
|
|
2266
2266
|
);
|
|
2267
|
-
n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(
|
|
2267
|
+
n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(zt, a);
|
|
2268
2268
|
}
|
|
2269
2269
|
onStarting() {
|
|
2270
|
-
|
|
2270
|
+
vr(this._injector, [
|
|
2271
2271
|
[z],
|
|
2272
2272
|
[he],
|
|
2273
2273
|
[He]
|
|
2274
2274
|
]), this._config.useRemoteFilterValuesGenerator && this._rpcChannelService && this._injector.add([Pe, {
|
|
2275
|
-
useFactory: () =>
|
|
2275
|
+
useFactory: () => li(
|
|
2276
2276
|
this._rpcChannelService.requestChannel(ht)
|
|
2277
2277
|
)
|
|
2278
2278
|
}]);
|
|
@@ -2288,20 +2288,20 @@ let De = class extends it {
|
|
|
2288
2288
|
]);
|
|
2289
2289
|
}
|
|
2290
2290
|
};
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
De =
|
|
2294
|
-
|
|
2291
|
+
or(De, "type", se.UNIVER_SHEET);
|
|
2292
|
+
or(De, "pluginName", fs);
|
|
2293
|
+
De = ds([
|
|
2294
|
+
xt(Ht),
|
|
2295
2295
|
Xe(1, T(ie)),
|
|
2296
|
-
Xe(2,
|
|
2297
|
-
Xe(3,
|
|
2296
|
+
Xe(2, Ut),
|
|
2297
|
+
Xe(3, pr(jt))
|
|
2298
2298
|
], De);
|
|
2299
|
-
var
|
|
2300
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
2299
|
+
var ms = Object.getOwnPropertyDescriptor, ps = (t, e, r, s) => {
|
|
2300
|
+
for (var n = s > 1 ? void 0 : s ? ms(e, r) : e, a = t.length - 1, i; a >= 0; a--)
|
|
2301
2301
|
(i = t[a]) && (n = i(n) || n);
|
|
2302
2302
|
return n;
|
|
2303
|
-
},
|
|
2304
|
-
let
|
|
2303
|
+
}, At = (t, e) => (r, s) => e(r, s, t), be;
|
|
2304
|
+
let wt = (be = class extends it {
|
|
2305
2305
|
constructor(t, e, r) {
|
|
2306
2306
|
super(), this._config = t, this._injector = e, this._rpcChannelService = r;
|
|
2307
2307
|
}
|
|
@@ -2313,19 +2313,19 @@ let At = (be = class extends it {
|
|
|
2313
2313
|
onReady() {
|
|
2314
2314
|
this._rpcChannelService.registerChannel(
|
|
2315
2315
|
ht,
|
|
2316
|
-
|
|
2316
|
+
ai(this._injector.get(Pe))
|
|
2317
2317
|
);
|
|
2318
2318
|
}
|
|
2319
2319
|
}, v(be, "type", se.UNIVER_SHEET), v(be, "pluginName", "SHEET_FILTER_UI_WORKER_PLUGIN"), be);
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
],
|
|
2320
|
+
wt = ps([
|
|
2321
|
+
At(1, T(ie)),
|
|
2322
|
+
At(2, jt)
|
|
2323
|
+
], wt);
|
|
2324
2324
|
export {
|
|
2325
|
-
|
|
2325
|
+
Xt as ChangeFilterByOperation,
|
|
2326
2326
|
Ee as CloseFilterPanelOperation,
|
|
2327
2327
|
xe as OpenFilterPanelOperation,
|
|
2328
2328
|
ke as UniverSheetsFilterMobileUIPlugin,
|
|
2329
2329
|
De as UniverSheetsFilterUIPlugin,
|
|
2330
|
-
|
|
2330
|
+
wt as UniverSheetsFilterUIWorkerPlugin
|
|
2331
2331
|
};
|