@univerjs/sheets-filter-ui 0.6.7 → 0.6.9

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/es/index.js CHANGED
@@ -1,19 +1,19 @@
1
- var Gt = Object.defineProperty;
2
- var jt = (t, e, r) => e in t ? Gt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var f = (t, e, r) => jt(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { BooleanNumber as st, createIdentifier as _t, Inject as E, LocaleService as X, IUniverInstanceService as je, ILogService as Yt, extractPureTextFromCell as qt, numfmt as it, Disposable as pe, Injector as Z, Quantity as gt, Tools as Fe, ICommandService as Q, CommandType as Me, IContextService as $e, UniverInstanceType as z, ThemeService as vt, RxDisposable as St, fromCallback as Kt, InterceptorEffectEnum as Xt, DependentOn as Et, IConfigService as Tt, Optional as Zt, Plugin as Ye, merge as Ft } from "@univerjs/core";
5
- import { IRPCChannelService as Ct, toModule as zt, fromModule as Jt } from "@univerjs/rpc";
6
- import { CustomFilterOperator as u, SetSheetsFilterCriteriaCommand as se, SheetsFilterService as G, SmartToggleSheetsFilterCommand as fe, ReCalcSheetsFilterCommand as qe, ClearSheetsFilterCriteriaCommand as Ke, FILTER_MUTATIONS as er, SetSheetsFilterRangeMutation as tr, SetSheetsFilterCriteriaMutation as rr, RemoveSheetsFilterMutation as sr, ReCalcSheetsFilterMutation as ir, RemoveSheetFilterCommand as nr, SetSheetFilterRangeCommand as or, UniverSheetsFilterPlugin as Nt } from "@univerjs/sheets-filter";
7
- import { RefRangeService as ar, SheetPermissionCheckController as lr, SheetsSelectionsService as cr, getSheetCommandTarget as ur, WorksheetFilterPermission as le, WorksheetViewPermission as ce, RangeProtectionPermissionViewPoint as ue, expandToContinuousRange as hr, SheetInterceptorService as dr, SetRangeValuesMutation as mr, INTERCEPTOR_POINT as pr } from "@univerjs/sheets";
8
- import { ILayoutService as fr, useDependency as re, useObservable as W, useComponentsOfPart as _r, ComponentContainer as gr, getMenuHiddenObservable as Xe, MenuItemType as Ze, RibbonStartGroup as vr, KeyCode as Sr, MetaKeys as nt, ComponentManager as Er, IShortcutService as Tr, IMenuManagerService as Fr, IMessageService as Cr } from "@univerjs/ui";
9
- import { SetCellEditVisibleOperation as Nr, SheetsUIPart as Pr, getObservableWithExclusiveRange$ as yr, getCurrentRangeDisable$ as Or, SheetSkeletonManagerService as Ir, ISheetSelectionRenderService as Rr, SelectionControl as Ar, attachSelectionWithCoord as br, getCoordByCell as Lr, SheetsRenderService as Pt, whenSheetEditorFocused as Mr, SheetCanvasPopManagerService as $r } from "@univerjs/sheets-ui";
10
- import { BehaviorSubject as K, ReplaySubject as wr, Subject as Ur, merge as Hr, combineLatest as Dr, throttleTime as yt, startWith as Ot, map as ie, shareReplay as kr, of as _e, switchMap as ze, filter as Br, takeUntil as Vr, distinctUntilChanged as Wr } from "rxjs";
11
- import { Select as ot, RadioGroup as xr, Radio as at, Input as It, Checkbox as Qr, Tree as Gr, Segmented as jr, Button as He, MessageType as Yr } from "@univerjs/design";
12
- import { Rect as lt, Shape as qr, IRenderManagerService as Rt } from "@univerjs/engine-render";
1
+ var jt = Object.defineProperty;
2
+ var Yt = (t, e, r) => e in t ? jt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var f = (t, e, r) => Yt(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { BooleanNumber as st, createIdentifier as gt, Inject as E, LocaleService as X, IUniverInstanceService as je, ILogService as qt, extractPureTextFromCell as Kt, numfmt as it, Disposable as pe, Injector as Z, Quantity as vt, Tools as Fe, ICommandService as Q, CommandType as Me, IContextService as $e, UniverInstanceType as z, ThemeService as St, RxDisposable as Et, fromCallback as Xt, InterceptorEffectEnum as Zt, DependentOn as Tt, IConfigService as Ft, Optional as zt, Plugin as Ye, merge as Ct } from "@univerjs/core";
5
+ import { IRPCChannelService as Nt, toModule as Jt, fromModule as er } from "@univerjs/rpc";
6
+ import { CustomFilterOperator as u, SetSheetsFilterCriteriaCommand as se, SheetsFilterService as G, SmartToggleSheetsFilterCommand as fe, ReCalcSheetsFilterCommand as qe, ClearSheetsFilterCriteriaCommand as Ke, FILTER_MUTATIONS as tr, SetSheetsFilterRangeMutation as rr, SetSheetsFilterCriteriaMutation as sr, RemoveSheetsFilterMutation as ir, ReCalcSheetsFilterMutation as nr, RemoveSheetFilterCommand as or, SetSheetFilterRangeCommand as ar, UniverSheetsFilterPlugin as Pt } from "@univerjs/sheets-filter";
7
+ import { RefRangeService as lr, SheetPermissionCheckController as cr, SheetsSelectionsService as ur, getSheetCommandTarget as hr, WorksheetFilterPermission as le, WorksheetViewPermission as ce, RangeProtectionPermissionViewPoint as ue, expandToContinuousRange as mr, SheetInterceptorService as dr, SetRangeValuesMutation as pr, INTERCEPTOR_POINT as fr } from "@univerjs/sheets";
8
+ import { ILayoutService as _r, useDependency as re, useObservable as W, useComponentsOfPart as gr, ComponentContainer as vr, getMenuHiddenObservable as Xe, MenuItemType as Ze, RibbonStartGroup as Sr, KeyCode as Er, MetaKeys as nt, ComponentManager as Tr, IShortcutService as Fr, IMenuManagerService as Cr, IMessageService as Nr } from "@univerjs/ui";
9
+ import { SetCellEditVisibleOperation as Pr, SheetsUIPart as yr, getObservableWithExclusiveRange$ as Or, getCurrentRangeDisable$ as Ir, SheetSkeletonManagerService as Rr, ISheetSelectionRenderService as Ar, SelectionControl as br, attachSelectionWithCoord as Lr, getCoordByCell as Mr, SheetsRenderService as yt, whenSheetEditorFocused as $r, SheetCanvasPopManagerService as wr } from "@univerjs/sheets-ui";
10
+ import { BehaviorSubject as K, ReplaySubject as Ur, Subject as Hr, merge as Dr, combineLatest as kr, throttleTime as Ot, startWith as It, map as ie, shareReplay as Br, of as _e, switchMap as ze, filter as Vr, takeUntil as Wr, distinctUntilChanged as xr } from "rxjs";
11
+ import { Select as ot, RadioGroup as Qr, Radio as at, Input as Rt, Checkbox as Gr, Tree as jr, Segmented as Yr, Button as He, MessageType as qr } from "@univerjs/design";
12
+ import { Rect as lt, Shape as Kr, IRenderManagerService as At } from "@univerjs/engine-render";
13
13
  import { jsx as S, jsxs as L, Fragment as ct } from "react/jsx-runtime";
14
- import { forwardRef as At, useRef as Kr, createElement as bt, useCallback as k, useMemo as Je } from "react";
15
- const Lt = "sheets-filter-ui.config", Ce = {};
16
- var C = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SECOND", t))(C || {}), _ = /* @__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))(_ || {}), d;
14
+ import { forwardRef as bt, useRef as Xr, createElement as Lt, useCallback as k, useMemo as Je } from "react";
15
+ const Mt = "sheets-filter-ui.config", Ce = {};
16
+ var C = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SECOND", t))(C || {}), _ = /* @__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))(_ || {}), m;
17
17
  ((t) => {
18
18
  t.NONE = {
19
19
  label: "sheets-filter.conditions.none",
@@ -390,20 +390,20 @@ var C = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
390
390
  }),
391
391
  testMappingParams: () => !0,
392
392
  mapToFilterColumn: (s) => {
393
- const { and: o, val1: a, val2: c, operator1: h, operator2: m } = s;
393
+ const { and: o, val1: a, val2: c, operator1: h, operator2: d } = s;
394
394
  function v(I, y) {
395
395
  for (const $ of t.ALL_CONDITIONS)
396
396
  if ($.operator === I)
397
397
  return $.mapToFilterColumn({ val1: y, operator1: I });
398
398
  }
399
- const p = !h || h === t.NONE.operator, T = !m || m === t.NONE.operator;
399
+ const p = !h || h === t.NONE.operator, T = !d || d === t.NONE.operator;
400
400
  if (p && T)
401
401
  return t.NONE.mapToFilterColumn({});
402
402
  if (p)
403
- return v(m, c);
403
+ return v(d, c);
404
404
  if (T)
405
405
  return v(h, a);
406
- const g = v(h, a), N = v(m, c), F = {
406
+ const g = v(h, a), N = v(d, c), F = {
407
407
  customFilters: [
408
408
  g.customFilters.customFilters[0],
409
409
  N.customFilters.customFilters[0]
@@ -484,7 +484,7 @@ var C = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
484
484
  return [t.NONE, {}];
485
485
  }
486
486
  t.testMappingFilterColumn = l;
487
- })(d || (d = {}));
487
+ })(m || (m = {}));
488
488
  function M(t) {
489
489
  const { operator1: e, operator2: r, val1: i, val2: n } = t;
490
490
  if (e && r)
@@ -506,12 +506,12 @@ function Ve(t) {
506
506
  unchecked: n
507
507
  };
508
508
  }
509
- var Xr = Object.getOwnPropertyDescriptor, Zr = (t, e, r, i) => {
510
- for (var n = i > 1 ? void 0 : i ? Xr(e, r) : e, l = t.length - 1, s; l >= 0; l--)
509
+ var Zr = Object.getOwnPropertyDescriptor, zr = (t, e, r, i) => {
510
+ for (var n = i > 1 ? void 0 : i ? Zr(e, r) : e, l = t.length - 1, s; l >= 0; l--)
511
511
  (s = t[l]) && (n = s(n) || n);
512
512
  return n;
513
513
  }, De = (t, e) => (r, i) => e(r, i, t);
514
- const et = "sheets-filter.generate-filter-values.service", Ne = _t(et), zr = ["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
+ const et = "sheets-filter.generate-filter-values.service", Ne = gt(et), Jr = ["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"];
515
515
  let We = class extends pe {
516
516
  constructor(t, e, r) {
517
517
  super(), this._localeService = t, this._univerInstanceService = e, this._logService = r;
@@ -519,34 +519,34 @@ let We = class extends pe {
519
519
  async getFilterValues(t) {
520
520
  var h;
521
521
  const { unitId: e, subUnitId: r, filteredOutRowsByOtherColumns: i, filters: n, blankChecked: l, iterateRange: s, alreadyChecked: o } = t, a = this._univerInstanceService.getUnit(e), c = (h = this._univerInstanceService.getUnit(e)) == null ? void 0 : h.getSheetBySheetId(r);
522
- return !a || !c ? [] : (this._logService.debug("[SheetsGenerateFilterValuesService]", "getFilterValues for", { unitId: e, subUnitId: r }), Mt(n, this._localeService, s, c, new Set(i), new Set(o.map(String)), l, a.getStyles()));
522
+ return !a || !c ? [] : (this._logService.debug("[SheetsGenerateFilterValuesService]", "getFilterValues for", { unitId: e, subUnitId: r }), $t(n, this._localeService, s, c, new Set(i), new Set(o.map(String)), l, a.getStyles()));
523
523
  }
524
524
  };
525
- We = Zr([
525
+ We = zr([
526
526
  De(0, E(X)),
527
527
  De(1, je),
528
- De(2, Yt)
528
+ De(2, qt)
529
529
  ], We);
530
- function Mt(t, e, r, i, n, l, s, o) {
530
+ function $t(t, e, r, i, n, l, s, o) {
531
531
  var g, N, F, I, y, $, w, ge, ve;
532
- const a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), h = "yyyy-mm-dd", m = new Set(zr), v = "empty";
532
+ const a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), h = "yyyy-mm-dd", d = new Set(Jr), v = "empty";
533
533
  let p = 0;
534
534
  for (const R of i.iterateByColumn(r, !1, !1)) {
535
- const { row: Wt, rowSpan: rt = 1 } = R;
535
+ const { row: xt, rowSpan: rt = 1 } = R;
536
536
  let J = 0;
537
537
  for (; J < rt; ) {
538
- const xt = Wt + J;
539
- if (n.has(xt)) {
538
+ const Qt = xt + J;
539
+ if (n.has(Qt)) {
540
540
  J++;
541
541
  continue;
542
542
  }
543
- const j = R != null && R.value ? qt(R.value) : "";
543
+ const j = R != null && R.value ? Kt(R.value) : "";
544
544
  if (!j) {
545
545
  p += 1, J += rt;
546
546
  continue;
547
547
  }
548
- const Se = (g = R.value) != null && g.v && !R.value.p ? (I = (F = o.get((N = R.value) == null ? void 0 : N.s)) == null ? void 0 : F.n) == null ? void 0 : I.pattern : "", Qt = Se && it.isDate(Se);
549
- if (Se && Qt && m.has(Se)) {
548
+ const Se = (g = R.value) != null && g.v && !R.value.p ? (I = (F = o.get((N = R.value) == null ? void 0 : N.s)) == null ? void 0 : F.n) == null ? void 0 : I.pattern : "", Gt = Se && it.isDate(Se);
549
+ if (Se && Gt && d.has(Se)) {
550
550
  const B = (y = i.getCellRaw(R.row, R.col)) == null ? void 0 : y.v;
551
551
  if (!B) {
552
552
  J++;
@@ -606,12 +606,12 @@ function Mt(t, e, r, i, n, l, s, o) {
606
606
  a.set("empty", R), c.set("empty", [v]);
607
607
  }
608
608
  return {
609
- filterTreeItems: Jr(Array.from(a.values())),
609
+ filterTreeItems: es(Array.from(a.values())),
610
610
  filterTreeMapCache: c
611
611
  };
612
612
  }
613
- function Jr(t) {
614
- return Array.from(t).sort((e, r) => e.children && !r.children ? -1 : !e.children && r.children ? 1 : r.title.localeCompare(e.title)).map((e) => (e.children && e.children.sort((r, i) => {
613
+ function es(t) {
614
+ return Array.from(t).sort((e, r) => e.children && !r.children ? -1 : !e.children && r.children ? 1 : ts(e.title, r.title)).map((e) => (e.children && e.children.sort((r, i) => {
615
615
  const n = Number.parseInt(r.key.split("-")[1], 10), l = Number.parseInt(i.key.split("-")[1], 10);
616
616
  return n - l;
617
617
  }).forEach((r) => {
@@ -621,6 +621,11 @@ function Jr(t) {
621
621
  });
622
622
  }), e));
623
623
  }
624
+ const ut = (t) => !Number.isNaN(Number(t)) && !Number.isNaN(Number.parseFloat(t));
625
+ function ts(t, e) {
626
+ const r = ut(t), i = ut(e);
627
+ return r && i ? Number.parseFloat(t) - Number.parseFloat(e) : r && !i ? -1 : !r && i ? 1 : t.localeCompare(e);
628
+ }
624
629
  function xe(t, e) {
625
630
  for (const r of t) {
626
631
  if (r.key === e)
@@ -633,13 +638,13 @@ function xe(t, e) {
633
638
  }
634
639
  return null;
635
640
  }
636
- function $t(t) {
637
- return t.leaf ? t.checked : t.children ? t.children.every((e) => $t(e)) : !0;
641
+ function wt(t) {
642
+ return t.leaf ? t.checked : t.children ? t.children.every((e) => wt(e)) : !0;
638
643
  }
639
644
  function he(t, e) {
640
645
  t.leaf && (e !== void 0 ? t.checked = e : t.checked = !t.checked), t.children && t.children.forEach((r) => he(r, e));
641
646
  }
642
- function wt(t, e) {
647
+ function Ut(t, e) {
643
648
  const r = [];
644
649
  return t.forEach((i) => {
645
650
  const n = i.originValues ? e.some(
@@ -652,7 +657,7 @@ function wt(t, e) {
652
657
  if (n || l)
653
658
  r.push({ ...i });
654
659
  else if (i.children) {
655
- const o = wt(i.children, e);
660
+ const o = Ut(i.children, e);
656
661
  if (o.length > 0) {
657
662
  const a = o.reduce((c, h) => c + h.count, 0);
658
663
  r.push({ ...i, count: a, children: o });
@@ -660,12 +665,12 @@ function wt(t, e) {
660
665
  }
661
666
  }), r;
662
667
  }
663
- var es = Object.getOwnPropertyDescriptor, tt = (t, e, r, i) => {
664
- for (var n = i > 1 ? void 0 : i ? es(e, r) : e, l = t.length - 1, s; l >= 0; l--)
668
+ var rs = Object.getOwnPropertyDescriptor, tt = (t, e, r, i) => {
669
+ for (var n = i > 1 ? void 0 : i ? rs(e, r) : e, l = t.length - 1, s; l >= 0; l--)
665
670
  (s = t[l]) && (n = s(n) || n);
666
671
  return n;
667
672
  }, Pe = (t, e) => (r, i) => e(r, i, t), ye = /* @__PURE__ */ ((t) => (t[t.VALUES = 0] = "VALUES", t[t.CONDITIONS = 1] = "CONDITIONS", t))(ye || {});
668
- _t("sheets-filter-ui.sheets-filter-panel.service");
673
+ gt("sheets-filter-ui.sheets-filter-panel.service");
669
674
  let x = class extends pe {
670
675
  constructor(e, r) {
671
676
  super();
@@ -674,7 +679,7 @@ let x = class extends pe {
674
679
  /* VALUES */
675
680
  ));
676
681
  f(this, "filterBy$", this._filterBy$.asObservable());
677
- f(this, "_filterByModel$", new wr(1));
682
+ f(this, "_filterByModel$", new Ur(1));
678
683
  f(this, "filterByModel$", this._filterByModel$.asObservable());
679
684
  f(this, "_filterByModel", null);
680
685
  f(this, "_hasCriteria$", new K(!1));
@@ -784,7 +789,7 @@ let x = class extends pe {
784
789
  };
785
790
  x = tt([
786
791
  Pe(0, E(Z)),
787
- Pe(1, E(ar))
792
+ Pe(1, E(lr))
788
793
  ], x);
789
794
  let Oe = class extends pe {
790
795
  constructor(e, r, i, n, l) {
@@ -808,7 +813,7 @@ let Oe = class extends pe {
808
813
  * @returns the model to control the panel's state
809
814
  */
810
815
  static fromFilterColumn(e, r, i, n) {
811
- const [l, s] = d.testMappingFilterColumn(n == null ? void 0 : n.getColumnData());
816
+ const [l, s] = m.testMappingFilterColumn(n == null ? void 0 : n.getColumnData());
812
817
  return e.createInstance(Oe, r, i, l, s);
813
818
  }
814
819
  get conditionItem() {
@@ -836,7 +841,7 @@ let Oe = class extends pe {
836
841
  */
837
842
  async apply() {
838
843
  if (this._disposed) return !1;
839
- const e = d.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
844
+ const e = m.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
840
845
  return this._commandService.executeCommand(se.id, {
841
846
  unitId: this._filterModel.unitId,
842
847
  subUnitId: this._filterModel.subUnitId,
@@ -849,10 +854,10 @@ let Oe = class extends pe {
849
854
  * `IFilterConditionFormParams` and load default condition form params.
850
855
  */
851
856
  onPrimaryConditionChange(e) {
852
- const r = d.ALL_CONDITIONS.find((i) => i.operator === e);
857
+ const r = m.ALL_CONDITIONS.find((i) => i.operator === e);
853
858
  if (!r)
854
859
  throw new Error(`[ByConditionsModel]: condition item not found for operator: ${e}!`);
855
- this._conditionItem$.next(r), this._filterConditionFormParams$.next(d.getInitialFormParams(e));
860
+ this._conditionItem$.next(r), this._filterConditionFormParams$.next(m.getInitialFormParams(e));
856
861
  }
857
862
  /**
858
863
  * This method would be called when user changes the primary conditions, the input values or "AND" "OR" ratio.
@@ -865,7 +870,7 @@ let Oe = class extends pe {
865
870
  onConditionFormChange(e) {
866
871
  const r = { ...this.filterConditionFormParams, ...e };
867
872
  if (r.and !== !0 && delete r.and, typeof e.and < "u" || typeof e.operator1 < "u" || typeof e.operator2 < "u") {
868
- const i = d.testMappingParams(r, this.conditionItem.numOfParameters);
873
+ const i = m.testMappingParams(r, this.conditionItem.numOfParameters);
869
874
  this._conditionItem$.next(i);
870
875
  }
871
876
  this._filterConditionFormParams$.next(r);
@@ -886,22 +891,22 @@ let Ie = class extends pe {
886
891
  f(this, "_manuallyUpdateFilterItems$");
887
892
  f(this, "_searchString$");
888
893
  f(this, "searchString$");
889
- this._filterModel = e, this.col = r, this._commandService = l, this._treeMapCache = n, this._searchString$ = new K(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new K(i), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new Ur(), this.filterItems$ = Hr(
890
- Dr([
894
+ this._filterModel = e, this.col = r, this._commandService = l, this._treeMapCache = n, this._searchString$ = new K(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new K(i), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new Hr(), this.filterItems$ = Dr(
895
+ kr([
891
896
  this._searchString$.pipe(
892
- yt(500, void 0, { leading: !0, trailing: !0 }),
893
- Ot(void 0)
897
+ Ot(500, void 0, { leading: !0, trailing: !0 }),
898
+ It(void 0)
894
899
  ),
895
900
  this._rawFilterItems$
896
901
  ]).pipe(
897
902
  ie(([s, o]) => {
898
903
  if (!s) return o;
899
904
  const c = s.toLowerCase().split(/\s+/).filter((h) => !!h);
900
- return wt(o, c);
905
+ return Ut(o, c);
901
906
  })
902
907
  ),
903
908
  this._manuallyUpdateFilterItems$
904
- ).pipe(kr(1)), this.canApply$ = this.filterItems$.pipe(ie((s) => Ve(s).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((s) => this._filterItems = s));
909
+ ).pipe(Br(1)), this.canApply$ = this.filterItems$.pipe(ie((s) => Ve(s).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((s) => this._filterItems = s));
905
910
  }
906
911
  /**
907
912
  * Create a model with targeting filter column. If there is not a filter column, the model would be created with
@@ -915,11 +920,11 @@ let Ie = class extends pe {
915
920
  */
916
921
  static async fromFilterColumn(e, r, i) {
917
922
  var $;
918
- const n = e.get(je), l = e.get(X), s = e.get(Ne, gt.OPTIONAL), { unitId: o, subUnitId: a } = r, c = n.getUniverSheetInstance(o);
923
+ const n = e.get(je), l = e.get(X), s = e.get(Ne, vt.OPTIONAL), { unitId: o, subUnitId: a } = r, c = n.getUniverSheetInstance(o);
919
924
  if (!c) throw new Error(`[ByValuesModel]: Workbook not found for filter model with unitId: ${o}!`);
920
925
  const h = c == null ? void 0 : c.getSheetBySheetId(a);
921
926
  if (!h) throw new Error(`[ByValuesModel]: Worksheet not found for filter model with unitId: ${o} and subUnitId: ${a}!`);
922
- const m = r.getRange(), v = i, p = ($ = r.getFilterColumn(i)) == null ? void 0 : $.getColumnData().filters, T = new Set(p == null ? void 0 : p.filters), g = !!(p && p.blank), N = r.getFilteredOutRowsExceptCol(i), F = { ...m, startRow: m.startRow + 1, startColumn: v, endColumn: v };
927
+ const d = r.getRange(), v = i, p = ($ = r.getFilterColumn(i)) == null ? void 0 : $.getColumnData().filters, T = new Set(p == null ? void 0 : p.filters), g = !!(p && p.blank), N = r.getFilteredOutRowsExceptCol(i), F = { ...d, startRow: d.startRow + 1, startColumn: v, endColumn: v };
923
928
  let I, y;
924
929
  if (s) {
925
930
  const w = await s.getFilterValues({
@@ -933,7 +938,7 @@ let Ie = class extends pe {
933
938
  });
934
939
  I = w.filterTreeItems, y = w.filterTreeMapCache;
935
940
  } else {
936
- const w = Mt(!!p, l, F, h, N, T, g, c.getStyles());
941
+ const w = $t(!!p, l, F, h, N, T, g, c.getStyles());
937
942
  I = w.filterTreeItems, y = w.filterTreeMapCache;
938
943
  }
939
944
  return e.createInstance(Ie, r, i, I, y);
@@ -967,7 +972,7 @@ let Ie = class extends pe {
967
972
  const r = Fe.deepClone(this._filterItems), i = xe(r, e.key);
968
973
  if (!i)
969
974
  return;
970
- const n = $t(i);
975
+ const n = wt(i);
971
976
  he(i, !n), this._manuallyUpdateFilterItems(r);
972
977
  }
973
978
  onFilterOnly(e) {
@@ -1012,9 +1017,9 @@ let Ie = class extends pe {
1012
1017
  });
1013
1018
  {
1014
1019
  a.filters = {};
1015
- const c = i.filter((m) => m.key !== "empty");
1020
+ const c = i.filter((d) => d.key !== "empty");
1016
1021
  c.length > 0 && (a.filters = {
1017
- filters: c.flatMap((m) => m.originValues ? Array.from(m.originValues) : [m.title])
1022
+ filters: c.flatMap((d) => d.originValues ? Array.from(d.originValues) : [d.title])
1018
1023
  }), c.length !== i.length && (a.filters.blank = !0);
1019
1024
  }
1020
1025
  return this._commandService.executeCommand(se.id, {
@@ -1034,18 +1039,18 @@ const ne = "FILTER_PANEL_OPENED", Re = {
1034
1039
  type: Me.OPERATION,
1035
1040
  handler: (t, e) => {
1036
1041
  const r = t.get($e), i = t.get(G), n = t.get(x);
1037
- t.get(Q).syncExecuteCommand(Nr.id, { visible: !1 });
1042
+ t.get(Q).syncExecuteCommand(Pr.id, { visible: !1 });
1038
1043
  const { unitId: s, subUnitId: o, col: a } = e, c = i.getFilterModel(s, o);
1039
1044
  return c ? (n.setupCol(c, a), r.getContextValue(ne) || r.setContextValue(ne, !0), !0) : !1;
1040
1045
  }
1041
- }, de = {
1046
+ }, me = {
1042
1047
  id: "sheet.operation.close-filter-panel",
1043
1048
  type: Me.OPERATION,
1044
1049
  handler: (t) => {
1045
- const e = t.get($e), r = t.get(x), i = t.get(fr, gt.OPTIONAL);
1050
+ const e = t.get($e), r = t.get(x), i = t.get(_r, vt.OPTIONAL);
1046
1051
  return e.getContextValue(ne) ? (e.setContextValue(ne, !1), i == null || i.focus(), r.terminate()) : !1;
1047
1052
  }
1048
- }, Ut = {
1053
+ }, Ht = {
1049
1054
  id: "sheet.operation.apply-filter",
1050
1055
  type: Me.OPERATION,
1051
1056
  handler: (t, e) => {
@@ -1053,8 +1058,8 @@ const ne = "FILTER_PANEL_OPENED", Re = {
1053
1058
  return t.get(x).changeFilterBy(r);
1054
1059
  }
1055
1060
  };
1056
- var ts = Object.getOwnPropertyDescriptor, rs = (t, e, r, i) => {
1057
- for (var n = i > 1 ? void 0 : i ? ts(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1061
+ var ss = Object.getOwnPropertyDescriptor, is = (t, e, r, i) => {
1062
+ for (var n = i > 1 ? void 0 : i ? ss(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1058
1063
  (s = t[l]) && (n = s(n) || n);
1059
1064
  return n;
1060
1065
  }, te = (t, e) => (r, i) => e(r, i, t);
@@ -1067,7 +1072,7 @@ let oe = class extends pe {
1067
1072
  this._commandService.beforeCommandExecuted((t) => {
1068
1073
  var e, r, i;
1069
1074
  if (t.id === fe.id) {
1070
- const n = this._injector.get(je), l = ur(n);
1075
+ const n = this._injector.get(je), l = hr(n);
1071
1076
  if (!l) return;
1072
1077
  const { unitId: s, subUnitId: o, worksheet: a } = l, c = (e = this._sheetsFilterService.getFilterModel(s, o)) == null ? void 0 : e.getRange();
1073
1078
  let h;
@@ -1077,10 +1082,10 @@ let oe = class extends pe {
1077
1082
  worksheetTypes: [le, ce]
1078
1083
  }, [c]);
1079
1084
  else {
1080
- const m = (r = this._sheetsSelectionService.getCurrentLastSelection()) == null ? void 0 : r.range;
1081
- if (m) {
1082
- let v = { ...m };
1083
- v = m.startColumn === m.endColumn && m.startRow === m.endRow ? hr(v, { left: !0, right: !0, up: !0, down: !0 }, a) : v, h = this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1085
+ const d = (r = this._sheetsSelectionService.getCurrentLastSelection()) == null ? void 0 : r.range;
1086
+ if (d) {
1087
+ let v = { ...d };
1088
+ v = d.startColumn === d.endColumn && d.startRow === d.endRow ? mr(v, { left: !0, right: !0, up: !0, down: !0 }, a) : v, h = this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1084
1089
  rangeTypes: [ue],
1085
1090
  worksheetTypes: [ce, le]
1086
1091
  }, [v], s, o);
@@ -1103,13 +1108,13 @@ let oe = class extends pe {
1103
1108
  );
1104
1109
  }
1105
1110
  };
1106
- oe = rs([
1111
+ oe = is([
1107
1112
  te(0, E(G)),
1108
1113
  te(1, E(X)),
1109
1114
  te(2, Q),
1110
- te(3, E(lr)),
1115
+ te(3, E(cr)),
1111
1116
  te(4, E(Z)),
1112
- te(5, E(cr))
1117
+ te(5, E(ur))
1113
1118
  ], oe);
1114
1119
  var b = function() {
1115
1120
  return b = Object.assign || function(t) {
@@ -1119,23 +1124,23 @@ var b = function() {
1119
1124
  }
1120
1125
  return t;
1121
1126
  }, b.apply(this, arguments);
1122
- }, ss = function(t, e) {
1127
+ }, ns = function(t, e) {
1123
1128
  var r = {};
1124
1129
  for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (r[i] = t[i]);
1125
1130
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
1126
1131
  for (var n = 0, i = Object.getOwnPropertySymbols(t); n < i.length; n++)
1127
1132
  e.indexOf(i[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[n]) && (r[i[n]] = t[i[n]]);
1128
1133
  return r;
1129
- }, Ht = At(function(t, e) {
1130
- var r = t.icon, i = t.id, n = t.className, l = t.extend, s = ss(t, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(i, " ").concat(n || "").trim(), a = Kr("_".concat(os()));
1131
- return Dt(r, "".concat(i), { defIds: r.defIds, idSuffix: a.current }, b({ ref: e, className: o }, s), l);
1134
+ }, Dt = bt(function(t, e) {
1135
+ var r = t.icon, i = t.id, n = t.className, l = t.extend, s = ns(t, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(i, " ").concat(n || "").trim(), a = Xr("_".concat(ls()));
1136
+ return kt(r, "".concat(i), { defIds: r.defIds, idSuffix: a.current }, b({ ref: e, className: o }, s), l);
1132
1137
  });
1133
- function Dt(t, e, r, i, n) {
1134
- return bt(t.tag, b(b({ key: e }, is(t, r, n)), i), (ns(t, r).children || []).map(function(l, s) {
1135
- return Dt(l, "".concat(e, "-").concat(t.tag, "-").concat(s), r, void 0, n);
1138
+ function kt(t, e, r, i, n) {
1139
+ return Lt(t.tag, b(b({ key: e }, os(t, r, n)), i), (as(t, r).children || []).map(function(l, s) {
1140
+ return kt(l, "".concat(e, "-").concat(t.tag, "-").concat(s), r, void 0, n);
1136
1141
  }));
1137
1142
  }
1138
- function is(t, e, r) {
1143
+ function os(t, e, r) {
1139
1144
  var i = b({}, t.attrs);
1140
1145
  r != null && r.colorChannel1 && i.fill === "colorChannel1" && (i.fill = r.colorChannel1), t.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(function(l) {
1141
1146
  var s = l[0], o = l[1];
@@ -1147,63 +1152,63 @@ function is(t, e, r) {
1147
1152
  typeof o == "string" && (i[s] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
1148
1153
  })), i;
1149
1154
  }
1150
- function ns(t, e) {
1155
+ function as(t, e) {
1151
1156
  var r, i = e.defIds;
1152
1157
  return !i || i.length === 0 ? t : t.tag === "defs" && (!((r = t.children) === null || r === void 0) && r.length) ? b(b({}, t), { children: t.children.map(function(n) {
1153
1158
  return typeof n.attrs.id == "string" && i && i.indexOf(n.attrs.id) > -1 ? b(b({}, n), { attrs: b(b({}, n.attrs), { id: n.attrs.id + e.idSuffix }) }) : n;
1154
1159
  }) }) : t;
1155
1160
  }
1156
- function os() {
1161
+ function ls() {
1157
1162
  return Math.random().toString(36).substring(2, 8);
1158
1163
  }
1159
- Ht.displayName = "UniverIcon";
1160
- var as = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.32182 2.60967C2.98161 2.60967 2.79671 3.0074 3.01601 3.2675L6.85819 7.8246C6.94943 7.93282 6.99947 8.06981 6.99947 8.21136V12.7338C6.99947 12.898 7.0998 13.0455 7.2525 13.1058L8.73833 13.6928C9.00085 13.7965 9.28531 13.6031 9.28531 13.3208V8.21136C9.28531 8.06981 9.33535 7.93282 9.42659 7.8246L13.2688 3.2675C13.4881 3.0074 13.3032 2.60967 12.963 2.60967H3.32182ZM2.09858 4.04101C1.22139 3.0006 1.96097 1.40967 3.32182 1.40967H12.963C14.3238 1.40967 15.0634 3.0006 14.1862 4.04101L10.4853 8.43054V13.3208C10.4853 14.4498 9.34747 15.2237 8.29742 14.8089L6.81158 14.2219C6.20078 13.9806 5.79947 13.3905 5.79947 12.7338V8.43054L2.09858 4.04101Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, kt = At(function(t, e) {
1161
- return bt(Ht, Object.assign({}, t, {
1164
+ Dt.displayName = "UniverIcon";
1165
+ var cs = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.32182 2.60967C2.98161 2.60967 2.79671 3.0074 3.01601 3.2675L6.85819 7.8246C6.94943 7.93282 6.99947 8.06981 6.99947 8.21136V12.7338C6.99947 12.898 7.0998 13.0455 7.2525 13.1058L8.73833 13.6928C9.00085 13.7965 9.28531 13.6031 9.28531 13.3208V8.21136C9.28531 8.06981 9.33535 7.93282 9.42659 7.8246L13.2688 3.2675C13.4881 3.0074 13.3032 2.60967 12.963 2.60967H3.32182ZM2.09858 4.04101C1.22139 3.0006 1.96097 1.40967 3.32182 1.40967H12.963C14.3238 1.40967 15.0634 3.0006 14.1862 4.04101L10.4853 8.43054V13.3208C10.4853 14.4498 9.34747 15.2237 8.29742 14.8089L6.81158 14.2219C6.20078 13.9806 5.79947 13.3905 5.79947 12.7338V8.43054L2.09858 4.04101Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Bt = bt(function(t, e) {
1166
+ return Lt(Dt, Object.assign({}, t, {
1162
1167
  id: "filter-single",
1163
1168
  ref: e,
1164
- icon: as
1169
+ icon: cs
1165
1170
  }));
1166
1171
  });
1167
- kt.displayName = "FilterSingle";
1168
- const ls = "univer-sheets-filter-panel", cs = "univer-sheets-filter-panel-header", us = "univer-sheets-filter-panel-content", hs = "univer-sheets-filter-panel-values-container", ds = "univer-sheets-filter-panel-values-virtual", ms = "univer-sheets-filter-panel-values-item", ps = "univer-sheets-filter-panel-values-item-inner", fs = "univer-sheets-filter-panel-values-item-count", _s = "univer-sheets-filter-panel-values-item-text", gs = "univer-sheets-filter-panel-conditions-container", vs = "univer-sheets-filter-panel-conditions-container-inner", Ss = "univer-sheets-filter-panel-conditions-desc", Es = "univer-sheets-filter-panel-footer", Ts = "univer-sheets-filter-panel-footer-primary-buttons", O = {
1169
- sheetsFilterPanel: ls,
1170
- sheetsFilterPanelHeader: cs,
1171
- sheetsFilterPanelContent: us,
1172
- sheetsFilterPanelValuesContainer: hs,
1173
- sheetsFilterPanelValuesVirtual: ds,
1174
- sheetsFilterPanelValuesItem: ms,
1175
- sheetsFilterPanelValuesItemInner: ps,
1176
- sheetsFilterPanelValuesItemCount: fs,
1177
- sheetsFilterPanelValuesItemText: _s,
1178
- sheetsFilterPanelConditionsContainer: gs,
1179
- sheetsFilterPanelConditionsContainerInner: vs,
1180
- sheetsFilterPanelConditionsDesc: Ss,
1181
- sheetsFilterPanelFooter: Es,
1182
- sheetsFilterPanelFooterPrimaryButtons: Ts
1172
+ Bt.displayName = "FilterSingle";
1173
+ const us = "univer-sheets-filter-panel", hs = "univer-sheets-filter-panel-header", ms = "univer-sheets-filter-panel-content", ds = "univer-sheets-filter-panel-values-container", ps = "univer-sheets-filter-panel-values-virtual", fs = "univer-sheets-filter-panel-values-item", _s = "univer-sheets-filter-panel-values-item-inner", gs = "univer-sheets-filter-panel-values-item-count", vs = "univer-sheets-filter-panel-values-item-text", Ss = "univer-sheets-filter-panel-conditions-container", Es = "univer-sheets-filter-panel-conditions-container-inner", Ts = "univer-sheets-filter-panel-conditions-desc", Fs = "univer-sheets-filter-panel-footer", Cs = "univer-sheets-filter-panel-footer-primary-buttons", O = {
1174
+ sheetsFilterPanel: us,
1175
+ sheetsFilterPanelHeader: hs,
1176
+ sheetsFilterPanelContent: ms,
1177
+ sheetsFilterPanelValuesContainer: ds,
1178
+ sheetsFilterPanelValuesVirtual: ps,
1179
+ sheetsFilterPanelValuesItem: fs,
1180
+ sheetsFilterPanelValuesItemInner: _s,
1181
+ sheetsFilterPanelValuesItemCount: gs,
1182
+ sheetsFilterPanelValuesItemText: vs,
1183
+ sheetsFilterPanelConditionsContainer: Ss,
1184
+ sheetsFilterPanelConditionsContainerInner: Es,
1185
+ sheetsFilterPanelConditionsDesc: Ts,
1186
+ sheetsFilterPanelFooter: Fs,
1187
+ sheetsFilterPanelFooterPrimaryButtons: Cs
1183
1188
  };
1184
- function Fs(t) {
1189
+ function Ns(t) {
1185
1190
  var p, T;
1186
1191
  const { model: e } = t, r = re(X), i = W(e.conditionItem$, void 0), n = W(e.filterConditionFormParams$, void 0), l = n != null && n.and ? "AND" : "OR", s = k((g) => {
1187
1192
  e.onConditionFormChange({ and: g === "AND" });
1188
- }, [e]), o = Cs(r), a = k((g) => {
1193
+ }, [e]), o = Ps(r), a = k((g) => {
1189
1194
  e.onPrimaryConditionChange(g);
1190
- }, [e]), c = Ns(r), h = k((g) => {
1195
+ }, [e]), c = ys(r), h = k((g) => {
1191
1196
  e.onConditionFormChange(g);
1192
- }, [e]), m = r.t("sheets-filter.panel.input-values-placeholder");
1197
+ }, [e]), d = r.t("sheets-filter.panel.input-values-placeholder");
1193
1198
  function v(g, N, F) {
1194
- const I = d.getItemByOperator(g).numOfParameters === 1;
1199
+ const I = m.getItemByOperator(g).numOfParameters === 1;
1195
1200
  return /* @__PURE__ */ L(ct, { children: [
1196
- F === "operator2" && /* @__PURE__ */ L(xr, { value: l, onChange: s, children: [
1201
+ F === "operator2" && /* @__PURE__ */ L(Qr, { value: l, onChange: s, children: [
1197
1202
  /* @__PURE__ */ S(at, { value: "AND", children: r.t("sheets-filter.panel.and") }),
1198
1203
  /* @__PURE__ */ S(at, { value: "OR", children: r.t("sheets-filter.panel.or") })
1199
1204
  ] }),
1200
1205
  /* @__PURE__ */ S(ot, { value: g, options: c, onChange: (y) => h({ [F]: y }) }),
1201
- I && /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(It, { value: N, placeholder: m, onChange: (y) => h({ [F === "operator1" ? "val1" : "val2"]: y }) }) })
1206
+ I && /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(Rt, { value: N, placeholder: d, onChange: (y) => h({ [F === "operator1" ? "val1" : "val2"]: y }) }) })
1202
1207
  ] });
1203
1208
  }
1204
1209
  return /* @__PURE__ */ S("div", { className: O.sheetsFilterPanelConditionsContainer, children: i && n && /* @__PURE__ */ L(ct, { children: [
1205
1210
  /* @__PURE__ */ S(ot, { value: i.operator, options: o, onChange: a }),
1206
- d.getItemByOperator(i.operator).numOfParameters !== 0 ? /* @__PURE__ */ L("div", { className: O.sheetsFilterPanelConditionsContainerInner, children: [
1211
+ m.getItemByOperator(i.operator).numOfParameters !== 0 ? /* @__PURE__ */ L("div", { className: O.sheetsFilterPanelConditionsContainerInner, children: [
1207
1212
  i.numOfParameters >= 1 && v(n.operator1, (p = n.val1) != null ? p : "", "operator1"),
1208
1213
  i.numOfParameters >= 2 && v(n.operator2, (T = n.val2) != null ? T : "", "operator2"),
1209
1214
  /* @__PURE__ */ L("div", { className: O.sheetsFilterPanelConditionsDesc, children: [
@@ -1214,45 +1219,45 @@ function Fs(t) {
1214
1219
  ] }) : null
1215
1220
  ] }) });
1216
1221
  }
1217
- function Cs(t) {
1222
+ function Ps(t) {
1218
1223
  const e = t.getCurrentLocale();
1219
1224
  return Je(
1220
1225
  () => [
1221
1226
  {
1222
1227
  options: [
1223
- { label: t.t(d.NONE.label), value: d.NONE.operator }
1228
+ { label: t.t(m.NONE.label), value: m.NONE.operator }
1224
1229
  ]
1225
1230
  },
1226
1231
  {
1227
1232
  options: [
1228
- { label: t.t(d.EMPTY.label), value: d.EMPTY.operator },
1229
- { label: t.t(d.NOT_EMPTY.label), value: d.NOT_EMPTY.operator }
1233
+ { label: t.t(m.EMPTY.label), value: m.EMPTY.operator },
1234
+ { label: t.t(m.NOT_EMPTY.label), value: m.NOT_EMPTY.operator }
1230
1235
  ]
1231
1236
  },
1232
1237
  {
1233
1238
  options: [
1234
- { label: t.t(d.TEXT_CONTAINS.label), value: d.TEXT_CONTAINS.operator },
1235
- { label: t.t(d.DOES_NOT_CONTAIN.label), value: d.DOES_NOT_CONTAIN.operator },
1236
- { label: t.t(d.STARTS_WITH.label), value: d.STARTS_WITH.operator },
1237
- { label: t.t(d.ENDS_WITH.label), value: d.ENDS_WITH.operator },
1238
- { label: t.t(d.EQUALS.label), value: d.EQUALS.operator }
1239
+ { label: t.t(m.TEXT_CONTAINS.label), value: m.TEXT_CONTAINS.operator },
1240
+ { label: t.t(m.DOES_NOT_CONTAIN.label), value: m.DOES_NOT_CONTAIN.operator },
1241
+ { label: t.t(m.STARTS_WITH.label), value: m.STARTS_WITH.operator },
1242
+ { label: t.t(m.ENDS_WITH.label), value: m.ENDS_WITH.operator },
1243
+ { label: t.t(m.EQUALS.label), value: m.EQUALS.operator }
1239
1244
  ]
1240
1245
  },
1241
1246
  {
1242
1247
  options: [
1243
- { label: t.t(d.GREATER_THAN.label), value: d.GREATER_THAN.operator },
1244
- { label: t.t(d.GREATER_THAN_OR_EQUAL.label), value: d.GREATER_THAN_OR_EQUAL.operator },
1245
- { label: t.t(d.LESS_THAN.label), value: d.LESS_THAN.operator },
1246
- { label: t.t(d.LESS_THAN_OR_EQUAL.label), value: d.LESS_THAN_OR_EQUAL.operator },
1247
- { label: t.t(d.EQUAL.label), value: d.EQUAL.operator },
1248
- { label: t.t(d.NOT_EQUAL.label), value: d.NOT_EQUAL.operator },
1249
- { label: t.t(d.BETWEEN.label), value: d.BETWEEN.operator },
1250
- { label: t.t(d.NOT_BETWEEN.label), value: d.NOT_BETWEEN.operator }
1248
+ { label: t.t(m.GREATER_THAN.label), value: m.GREATER_THAN.operator },
1249
+ { label: t.t(m.GREATER_THAN_OR_EQUAL.label), value: m.GREATER_THAN_OR_EQUAL.operator },
1250
+ { label: t.t(m.LESS_THAN.label), value: m.LESS_THAN.operator },
1251
+ { label: t.t(m.LESS_THAN_OR_EQUAL.label), value: m.LESS_THAN_OR_EQUAL.operator },
1252
+ { label: t.t(m.EQUAL.label), value: m.EQUAL.operator },
1253
+ { label: t.t(m.NOT_EQUAL.label), value: m.NOT_EQUAL.operator },
1254
+ { label: t.t(m.BETWEEN.label), value: m.BETWEEN.operator },
1255
+ { label: t.t(m.NOT_BETWEEN.label), value: m.NOT_BETWEEN.operator }
1251
1256
  ]
1252
1257
  },
1253
1258
  {
1254
1259
  options: [
1255
- { label: t.t(d.CUSTOM.label), value: d.CUSTOM.operator }
1260
+ { label: t.t(m.CUSTOM.label), value: m.CUSTOM.operator }
1256
1261
  ]
1257
1262
  }
1258
1263
  ],
@@ -1260,18 +1265,18 @@ function Cs(t) {
1260
1265
  [e, t]
1261
1266
  );
1262
1267
  }
1263
- function Ns(t) {
1268
+ function ys(t) {
1264
1269
  const e = t.getCurrentLocale();
1265
1270
  return Je(
1266
- () => d.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: t.t(r.label), value: r.operator })),
1271
+ () => m.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: t.t(r.label), value: r.operator })),
1267
1272
  // eslint-disable-next-line react-hooks/exhaustive-deps
1268
1273
  [e, t]
1269
1274
  );
1270
1275
  }
1271
- function Ps(t) {
1276
+ function Os(t) {
1272
1277
  const { model: e } = t, r = re(X), i = W(e.searchString$, "", !0), n = W(e.filterItems$, void 0, !0), l = r.t("sheets-filter.panel.filter-only"), s = Ve(n), o = s.checked > 0 && s.unchecked === 0, a = s.checked > 0 && s.unchecked > 0, c = e.treeMapCache, h = k(() => {
1273
1278
  e.onCheckAllToggled(!o);
1274
- }, [e, o]), m = k((p) => {
1279
+ }, [e, o]), d = k((p) => {
1275
1280
  e.setSearchString(p);
1276
1281
  }, [e]);
1277
1282
  function v(p) {
@@ -1282,12 +1287,12 @@ function Ps(t) {
1282
1287
  }
1283
1288
  return /* @__PURE__ */ L("div", { className: O.sheetsFilterPanelValuesContainer, children: [
1284
1289
  /* @__PURE__ */ S(
1285
- It,
1290
+ Rt,
1286
1291
  {
1287
1292
  autoFocus: !0,
1288
1293
  value: i,
1289
1294
  placeholder: r.t("sheets-filter.panel.search-placeholder"),
1290
- onChange: m
1295
+ onChange: d
1291
1296
  }
1292
1297
  ),
1293
1298
  /* @__PURE__ */ L(
@@ -1300,7 +1305,7 @@ function Ps(t) {
1300
1305
  children: [
1301
1306
  /* @__PURE__ */ S("div", { className: O.sheetsFilterPanelValuesItem, children: /* @__PURE__ */ L("div", { className: O.sheetsFilterPanelValuesItemInner, children: [
1302
1307
  /* @__PURE__ */ S(
1303
- Qr,
1308
+ Gr,
1304
1309
  {
1305
1310
  indeterminate: a,
1306
1311
  disabled: n.length === 0,
@@ -1312,7 +1317,7 @@ function Ps(t) {
1312
1317
  /* @__PURE__ */ S("span", { className: O.sheetsFilterPanelValuesItemCount, children: `(${s.checked}/${s.checked + s.unchecked})` })
1313
1318
  ] }) }),
1314
1319
  /* @__PURE__ */ S("div", { className: O.sheetsFilterPanelValuesVirtual, children: /* @__PURE__ */ S(
1315
- Gr,
1320
+ jr,
1316
1321
  {
1317
1322
  data: n,
1318
1323
  defaultExpandAll: !1,
@@ -1340,7 +1345,9 @@ function Ps(t) {
1340
1345
  /* @__PURE__ */ S(
1341
1346
  "a",
1342
1347
  {
1343
- className: "univer-box-border univer-hidden univer-h-4 univer-px-1.5",
1348
+ className: `
1349
+ univer-box-border univer-hidden univer-h-4 univer-whitespace-nowrap univer-px-1.5
1350
+ `,
1344
1351
  onClick: () => {
1345
1352
  const T = [];
1346
1353
  p.children ? p.children.forEach((g) => {
@@ -1362,51 +1369,51 @@ function Ps(t) {
1362
1369
  )
1363
1370
  ] });
1364
1371
  }
1365
- function ys() {
1372
+ function Is() {
1366
1373
  var N;
1367
- const t = re(x), e = re(X), r = re(Q), i = W(t.filterBy$, void 0, !0), n = W(t.filterByModel$, void 0, !1), l = W(() => (n == null ? void 0 : n.canApply$) || _e(!1), void 0, !1, [n]), s = Os(e), o = !W(t.hasCriteria$), a = k((F) => {
1368
- r.executeCommand(Ut.id, { filterBy: F });
1374
+ const t = re(x), e = re(X), r = re(Q), i = W(t.filterBy$, void 0, !0), n = W(t.filterByModel$, void 0, !1), l = W(() => (n == null ? void 0 : n.canApply$) || _e(!1), void 0, !1, [n]), s = Rs(e), o = !W(t.hasCriteria$), a = k((F) => {
1375
+ r.executeCommand(Ht.id, { filterBy: F });
1369
1376
  }, [r]), c = k(async () => {
1370
- await (n == null ? void 0 : n.clear()), r.executeCommand(de.id);
1377
+ await (n == null ? void 0 : n.clear()), r.executeCommand(me.id);
1371
1378
  }, [n, r]), h = k(() => {
1372
- r.executeCommand(de.id);
1373
- }, [r]), m = k(async () => {
1374
- await (n == null ? void 0 : n.apply()), r.executeCommand(de.id);
1375
- }, [n, r]), p = (N = re(G).activeFilterModel) == null ? void 0 : N.getRange(), T = t.col, g = _r(Pr.FILTER_PANEL_EMBED_POINT);
1379
+ r.executeCommand(me.id);
1380
+ }, [r]), d = k(async () => {
1381
+ await (n == null ? void 0 : n.apply()), r.executeCommand(me.id);
1382
+ }, [n, r]), p = (N = re(G).activeFilterModel) == null ? void 0 : N.getRange(), T = t.col, g = gr(yr.FILTER_PANEL_EMBED_POINT);
1376
1383
  return /* @__PURE__ */ L("div", { className: O.sheetsFilterPanel, children: [
1377
1384
  /* @__PURE__ */ S(
1378
- gr,
1385
+ vr,
1379
1386
  {
1380
1387
  components: g,
1381
1388
  sharedProps: { range: p, colIndex: T, onClose: h }
1382
1389
  }
1383
1390
  ),
1384
1391
  /* @__PURE__ */ S("div", { className: O.sheetsFilterPanelHeader, children: /* @__PURE__ */ S(
1385
- jr,
1392
+ Yr,
1386
1393
  {
1387
1394
  value: i,
1388
1395
  items: s,
1389
1396
  onChange: (F) => a(F)
1390
1397
  }
1391
1398
  ) }),
1392
- n ? /* @__PURE__ */ S("div", { className: O.sheetsFilterPanelContent, children: i === ye.VALUES ? /* @__PURE__ */ S(Ps, { model: n }) : /* @__PURE__ */ S(Fs, { model: n }) }) : /* @__PURE__ */ S("div", { style: { flex: 1 } }),
1399
+ n ? /* @__PURE__ */ S("div", { className: O.sheetsFilterPanelContent, children: i === ye.VALUES ? /* @__PURE__ */ S(Os, { model: n }) : /* @__PURE__ */ S(Ns, { model: n }) }) : /* @__PURE__ */ S("div", { style: { flex: 1 } }),
1393
1400
  /* @__PURE__ */ L("div", { className: O.sheetsFilterPanelFooter, children: [
1394
1401
  /* @__PURE__ */ S(He, { type: "link", onClick: c, disabled: o, children: e.t("sheets-filter.panel.clear-filter") }),
1395
1402
  /* @__PURE__ */ L("span", { className: O.sheetsFilterPanelFooterPrimaryButtons, children: [
1396
1403
  /* @__PURE__ */ S(He, { type: "default", onClick: h, children: e.t("sheets-filter.panel.cancel") }),
1397
- /* @__PURE__ */ S(He, { disabled: !l, type: "primary", onClick: m, children: e.t("sheets-filter.panel.confirm") })
1404
+ /* @__PURE__ */ S(He, { disabled: !l, type: "primary", onClick: d, children: e.t("sheets-filter.panel.confirm") })
1398
1405
  ] })
1399
1406
  ] })
1400
1407
  ] });
1401
1408
  }
1402
- function Os(t) {
1409
+ function Rs(t) {
1403
1410
  const e = t.getCurrentLocale();
1404
1411
  return Je(() => [
1405
1412
  { label: t.t("sheets-filter.panel.by-values"), value: ye.VALUES },
1406
1413
  { label: t.t("sheets-filter.panel.by-conditions"), value: ye.CONDITIONS }
1407
1414
  ], [e, t]);
1408
1415
  }
1409
- function Is(t) {
1416
+ function As(t) {
1410
1417
  const e = t.get(G);
1411
1418
  return {
1412
1419
  id: fe.id,
@@ -1415,10 +1422,10 @@ function Is(t) {
1415
1422
  tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
1416
1423
  hidden$: Xe(t, z.UNIVER_SHEET),
1417
1424
  activated$: e.activeFilterModel$.pipe(ie((r) => !!r)),
1418
- disabled$: yr(t, Or(t, { worksheetTypes: [le, ce], rangeTypes: [ue] }))
1425
+ disabled$: Or(t, Ir(t, { worksheetTypes: [le, ce], rangeTypes: [ue] }))
1419
1426
  };
1420
1427
  }
1421
- function Rs(t) {
1428
+ function bs(t) {
1422
1429
  const e = t.get(G);
1423
1430
  return {
1424
1431
  id: Ke.id,
@@ -1431,7 +1438,7 @@ function Rs(t) {
1431
1438
  }))
1432
1439
  };
1433
1440
  }
1434
- function As(t) {
1441
+ function Ls(t) {
1435
1442
  const e = t.get(G);
1436
1443
  return {
1437
1444
  id: qe.id,
@@ -1444,23 +1451,23 @@ function As(t) {
1444
1451
  }))
1445
1452
  };
1446
1453
  }
1447
- const bs = {
1448
- [vr.FORMULAS_INSERT]: {
1454
+ const Ms = {
1455
+ [Sr.FORMULAS_INSERT]: {
1449
1456
  [fe.id]: {
1450
1457
  order: 10,
1451
- menuItemFactory: Is,
1458
+ menuItemFactory: As,
1452
1459
  [Ke.id]: {
1453
1460
  order: 0,
1454
- menuItemFactory: Rs
1461
+ menuItemFactory: bs
1455
1462
  },
1456
1463
  [qe.id]: {
1457
1464
  order: 1,
1458
- menuItemFactory: As
1465
+ menuItemFactory: Ls
1459
1466
  }
1460
1467
  }
1461
1468
  }
1462
- }, V = 16, Ls = 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");
1463
- class ut {
1469
+ }, V = 16, $s = 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");
1470
+ class ht {
1464
1471
  static drawNoCriteria(e, r, i, n) {
1465
1472
  e.save(), lt.drawWith(e, {
1466
1473
  radius: 2,
@@ -1475,16 +1482,16 @@ class ut {
1475
1482
  width: V,
1476
1483
  height: V,
1477
1484
  fill: n
1478
- }), e.scale(r / V, r / V), e.fillStyle = i, e.fill(Ls), e.restore();
1485
+ }), e.scale(r / V, r / V), e.fillStyle = i, e.fill($s), e.restore();
1479
1486
  }
1480
1487
  }
1481
- var Ms = Object.getOwnPropertyDescriptor, $s = (t, e, r, i) => {
1482
- for (var n = i > 1 ? void 0 : i ? Ms(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1488
+ var ws = Object.getOwnPropertyDescriptor, Us = (t, e, r, i) => {
1489
+ for (var n = i > 1 ? void 0 : i ? ws(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1483
1490
  (s = t[l]) && (n = s(n) || n);
1484
1491
  return n;
1485
1492
  }, ke = (t, e) => (r, i) => e(r, i, t);
1486
1493
  const D = 16, Ee = 1;
1487
- let Qe = class extends qr {
1494
+ let Qe = class extends Kr {
1488
1495
  constructor(e, r, i, n, l) {
1489
1496
  super(e, r);
1490
1497
  f(this, "_cellWidth", 0);
@@ -1505,7 +1512,7 @@ let Qe = class extends qr {
1505
1512
  const s = new Path2D();
1506
1513
  s.rect(n, l, i, r), e.clip(s);
1507
1514
  const { hasCriteria: o } = this._filterParams, a = this._themeService.getCurrentTheme().primaryColor, c = this._hovered ? this._themeService.getCurrentTheme().grey50 : "rgba(255, 255, 255, 1.0)";
1508
- o ? ut.drawHasCriteria(e, D, a, c) : ut.drawNoCriteria(e, D, a, c), e.restore();
1515
+ o ? ht.drawHasCriteria(e, D, a, c) : ht.drawNoCriteria(e, D, a, c), e.restore();
1509
1516
  }
1510
1517
  onPointerDown(e) {
1511
1518
  if (e.button === 2)
@@ -1526,18 +1533,18 @@ let Qe = class extends qr {
1526
1533
  this._hovered = !1, this.makeDirty(!0);
1527
1534
  }
1528
1535
  };
1529
- Qe = $s([
1536
+ Qe = Us([
1530
1537
  ke(2, $e),
1531
1538
  ke(3, Q),
1532
- ke(4, E(vt))
1539
+ ke(4, E(St))
1533
1540
  ], Qe);
1534
- var ws = Object.getOwnPropertyDescriptor, Us = (t, e, r, i) => {
1535
- for (var n = i > 1 ? void 0 : i ? ws(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1541
+ var Hs = Object.getOwnPropertyDescriptor, Ds = (t, e, r, i) => {
1542
+ for (var n = i > 1 ? void 0 : i ? Hs(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1536
1543
  (s = t[l]) && (n = s(n) || n);
1537
1544
  return n;
1538
1545
  }, q = (t, e) => (r, i) => e(r, i, t);
1539
- const Hs = 1e3, Ds = 5e3;
1540
- let Ge = class extends St {
1546
+ const ks = 1e3, Bs = 5e3;
1547
+ let Ge = class extends Et {
1541
1548
  constructor(e, r, i, n, l, s, o, a) {
1542
1549
  super();
1543
1550
  f(this, "_filterRangeShape", null);
@@ -1560,28 +1567,28 @@ let Ge = class extends St {
1560
1567
  range: l == null ? void 0 : l.getRange(),
1561
1568
  skeleton: e.skeleton
1562
1569
  });
1563
- return Kt(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(
1564
- Br(
1570
+ return Xt(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(
1571
+ Vr(
1565
1572
  ([c]) => {
1566
1573
  var h;
1567
- return c.type === Me.MUTATION && ((h = c.params) == null ? void 0 : h.unitId) === r.getUnitId() && (er.has(c.id) || c.id === mr.id);
1574
+ return c.type === Me.MUTATION && ((h = c.params) == null ? void 0 : h.unitId) === r.getUnitId() && (tr.has(c.id) || c.id === pr.id);
1568
1575
  }
1569
1576
  ),
1570
- yt(20, void 0, { leading: !1, trailing: !0 }),
1577
+ Ot(20, void 0, { leading: !1, trailing: !0 }),
1571
1578
  ie(s),
1572
- Ot(s())
1579
+ It(s())
1573
1580
  // must trigger once
1574
1581
  );
1575
1582
  }),
1576
- Vr(this.dispose$)
1583
+ Wr(this.dispose$)
1577
1584
  ).subscribe((e) => {
1578
1585
  this._disposeRendering(), !(!e || !e.range) && (this._renderRange(e.range, e.skeleton), this._renderButtons(e));
1579
1586
  });
1580
1587
  }
1581
1588
  _renderRange(e, r) {
1582
- const { scene: i } = this._context, { rowHeaderWidth: n, columnHeaderHeight: l } = r, s = this._filterRangeShape = new Ar(
1589
+ const { scene: i } = this._context, { rowHeaderWidth: n, columnHeaderHeight: l } = r, s = this._filterRangeShape = new br(
1583
1590
  i,
1584
- Hs,
1591
+ ks,
1585
1592
  this._themeService,
1586
1593
  {
1587
1594
  rowHeaderWidth: n,
@@ -1589,7 +1596,7 @@ let Ge = class extends St {
1589
1596
  enableAutoFill: !1,
1590
1597
  highlightHeader: !1
1591
1598
  }
1592
- ), a = br({
1599
+ ), a = Lr({
1593
1600
  range: e,
1594
1601
  primary: null,
1595
1602
  style: { fill: "rgba(0, 0, 0, 0.0)" }
@@ -1600,19 +1607,19 @@ let Ge = class extends St {
1600
1607
  const { range: r, filterModel: i, unitId: n, skeleton: l, worksheetId: s } = e, { scene: o } = this._context;
1601
1608
  this._interceptCellContent(n, s, e.range);
1602
1609
  const { startColumn: a, endColumn: c, startRow: h } = r;
1603
- for (let m = a; m <= c; m++) {
1604
- const v = `sheets-filter-button-${m}`, p = Lr(h, m, o, l), { startX: T, startY: g, endX: N, endY: F } = p, I = N - T, y = F - g;
1610
+ for (let d = a; d <= c; d++) {
1611
+ const v = `sheets-filter-button-${d}`, p = Mr(h, d, o, l), { startX: T, startY: g, endX: N, endY: F } = p, I = N - T, y = F - g;
1605
1612
  if (y <= Ee || I <= Ee)
1606
1613
  continue;
1607
- const $ = !!i.getFilterColumn(m), w = N - D - Ee, ge = F - D - Ee, ve = {
1614
+ const $ = !!i.getFilterColumn(d), w = N - D - Ee, ge = F - D - Ee, ve = {
1608
1615
  left: w,
1609
1616
  top: ge,
1610
1617
  height: D,
1611
1618
  width: D,
1612
- zIndex: Ds,
1619
+ zIndex: Bs,
1613
1620
  cellHeight: y,
1614
1621
  cellWidth: I,
1615
- filterParams: { unitId: n, subUnitId: s, col: m, hasCriteria: $ }
1622
+ filterParams: { unitId: n, subUnitId: s, col: d, hasCriteria: $ }
1616
1623
  }, R = this._injector.createInstance(Qe, v, ve);
1617
1624
  this._filterButtonShapes.push(R);
1618
1625
  }
@@ -1620,11 +1627,11 @@ let Ge = class extends St {
1620
1627
  }
1621
1628
  _interceptCellContent(e, r, i) {
1622
1629
  const { startRow: n, startColumn: l, endColumn: s } = i;
1623
- this._buttonRenderDisposable = this._sheetInterceptorService.intercept(pr.CELL_CONTENT, {
1624
- effect: Xt.Style,
1630
+ this._buttonRenderDisposable = this._sheetInterceptorService.intercept(fr.CELL_CONTENT, {
1631
+ effect: Zt.Style,
1625
1632
  handler: (o, a, c) => {
1626
- const { row: h, col: m, unitId: v, subUnitId: p } = a;
1627
- return v !== e || p !== r || h !== n || m < l || m > s ? c(o) : c({
1633
+ const { row: h, col: d, unitId: v, subUnitId: p } = a;
1634
+ return v !== e || p !== r || h !== n || d < l || d > s ? c(o) : c({
1628
1635
  ...o,
1629
1636
  fontRenderExtension: {
1630
1637
  ...o == null ? void 0 : o.fontRenderExtension,
@@ -1640,62 +1647,62 @@ let Ge = class extends St {
1640
1647
  (e = this._filterRangeShape) == null || e.dispose(), this._filterButtonShapes.forEach((i) => i.dispose()), (r = this._buttonRenderDisposable) == null || r.dispose(), this._filterRangeShape = null, this._buttonRenderDisposable = null, this._filterButtonShapes = [];
1641
1648
  }
1642
1649
  };
1643
- Ge = Us([
1650
+ Ge = Ds([
1644
1651
  q(1, E(Z)),
1645
- q(2, E(Ir)),
1652
+ q(2, E(Rr)),
1646
1653
  q(3, E(G)),
1647
- q(4, E(vt)),
1654
+ q(4, E(St)),
1648
1655
  q(5, E(dr)),
1649
1656
  q(6, Q),
1650
- q(7, Rr)
1657
+ q(7, Ar)
1651
1658
  ], Ge);
1652
- var ks = Object.getOwnPropertyDescriptor, Bs = (t, e, r, i) => {
1653
- for (var n = i > 1 ? void 0 : i ? ks(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1659
+ var Vs = Object.getOwnPropertyDescriptor, Ws = (t, e, r, i) => {
1660
+ for (var n = i > 1 ? void 0 : i ? Vs(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1654
1661
  (s = t[l]) && (n = s(n) || n);
1655
1662
  return n;
1656
- }, ht = (t, e) => (r, i) => e(r, i, t);
1657
- let me = class extends St {
1663
+ }, mt = (t, e) => (r, i) => e(r, i, t);
1664
+ let de = class extends Et {
1658
1665
  constructor(t, e) {
1659
1666
  super(), this._renderManagerService = t, this._sheetsRenderService = e, [
1660
- tr,
1661
1667
  rr,
1662
1668
  sr,
1663
- ir
1669
+ ir,
1670
+ nr
1664
1671
  ].forEach((r) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(r.id))), this.disposeWithMe(this._renderManagerService.registerRenderModule(
1665
1672
  z.UNIVER_SHEET,
1666
1673
  [Ge]
1667
1674
  ));
1668
1675
  }
1669
1676
  };
1670
- me = Bs([
1671
- ht(0, Rt),
1672
- ht(1, E(Pt))
1673
- ], me);
1674
- const Vs = {
1677
+ de = Ws([
1678
+ mt(0, At),
1679
+ mt(1, E(yt))
1680
+ ], de);
1681
+ const xs = {
1675
1682
  id: fe.id,
1676
- binding: Sr.L | nt.CTRL_COMMAND | nt.SHIFT,
1683
+ binding: Er.L | nt.CTRL_COMMAND | nt.SHIFT,
1677
1684
  description: "sheets-filter.shortcut.smart-toggle-filter",
1678
- preconditions: Mr,
1685
+ preconditions: $r,
1679
1686
  group: "4_sheet-edit"
1680
1687
  };
1681
- var Ws = Object.getOwnPropertyDescriptor, xs = (t, e, r, i) => {
1682
- for (var n = i > 1 ? void 0 : i ? Ws(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1688
+ var Qs = Object.getOwnPropertyDescriptor, Gs = (t, e, r, i) => {
1689
+ for (var n = i > 1 ? void 0 : i ? Qs(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1683
1690
  (s = t[l]) && (n = s(n) || n);
1684
1691
  return n;
1685
1692
  }, A = (t, e) => (r, i) => e(r, i, t);
1686
1693
  const dt = "FILTER_PANEL_POPUP";
1687
- let Ae = class extends me {
1688
- constructor(e, r, i, n, l, s, o, a, c, h, m, v, p) {
1694
+ let Ae = class extends de {
1695
+ constructor(e, r, i, n, l, s, o, a, c, h, d, v, p) {
1689
1696
  super(p, v);
1690
1697
  f(this, "_popupDisposable");
1691
- this._injector = e, this._componentManager = r, this._sheetsFilterPanelService = i, this._sheetCanvasPopupService = n, this._sheetsFilterService = l, this._localeService = s, this._shortcutService = o, this._commandService = a, this._menuManagerService = c, this._contextService = h, this._messageService = m, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI();
1698
+ this._injector = e, this._componentManager = r, this._sheetsFilterPanelService = i, this._sheetCanvasPopupService = n, this._sheetsFilterService = l, this._localeService = s, this._shortcutService = o, this._commandService = a, this._menuManagerService = c, this._contextService = h, this._messageService = d, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI();
1692
1699
  }
1693
1700
  dispose() {
1694
1701
  super.dispose(), this._closeFilterPopup();
1695
1702
  }
1696
1703
  _initShortcuts() {
1697
1704
  [
1698
- Vs
1705
+ xs
1699
1706
  ].forEach((e) => {
1700
1707
  this.disposeWithMe(this._shortcutService.registerShortcut(e));
1701
1708
  });
@@ -1703,27 +1710,27 @@ let Ae = class extends me {
1703
1710
  _initCommands() {
1704
1711
  [
1705
1712
  fe,
1706
- nr,
1707
1713
  or,
1714
+ ar,
1708
1715
  se,
1709
1716
  Ke,
1710
1717
  qe,
1711
- Ut,
1718
+ Ht,
1712
1719
  Re,
1713
- de
1720
+ me
1714
1721
  ].forEach((e) => {
1715
1722
  this.disposeWithMe(this._commandService.registerCommand(e));
1716
1723
  });
1717
1724
  }
1718
1725
  _initMenuItems() {
1719
- this._menuManagerService.mergeMenu(bs);
1726
+ this._menuManagerService.mergeMenu(Ms);
1720
1727
  }
1721
1728
  _initUI() {
1722
- this.disposeWithMe(this._componentManager.register(dt, ys)), this.disposeWithMe(this._componentManager.register("FilterSingle", kt)), this.disposeWithMe(this._contextService.subscribeContextValue$(ne).pipe(Wr()).subscribe((e) => {
1729
+ this.disposeWithMe(this._componentManager.register(dt, Is)), this.disposeWithMe(this._componentManager.register("FilterSingle", Bt)), this.disposeWithMe(this._contextService.subscribeContextValue$(ne).pipe(xr()).subscribe((e) => {
1723
1730
  e ? this._openFilterPopup() : this._closeFilterPopup();
1724
1731
  })), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((e) => {
1725
1732
  e && this._messageService.show({
1726
- type: Yr.Error,
1733
+ type: qr.Error,
1727
1734
  content: this._localeService.t(e)
1728
1735
  });
1729
1736
  }));
@@ -1736,7 +1743,7 @@ let Ae = class extends me {
1736
1743
  this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(n, i, {
1737
1744
  componentKey: dt,
1738
1745
  direction: "horizontal",
1739
- onClickOutside: () => this._commandService.syncExecuteCommand(de.id),
1746
+ onClickOutside: () => this._commandService.syncExecuteCommand(me.id),
1740
1747
  offset: [5, 0]
1741
1748
  });
1742
1749
  }
@@ -1745,36 +1752,36 @@ let Ae = class extends me {
1745
1752
  (e = this._popupDisposable) == null || e.dispose(), this._popupDisposable = null;
1746
1753
  }
1747
1754
  };
1748
- Ae = xs([
1755
+ Ae = Gs([
1749
1756
  A(0, E(Z)),
1750
- A(1, E(Er)),
1757
+ A(1, E(Tr)),
1751
1758
  A(2, E(x)),
1752
- A(3, E($r)),
1759
+ A(3, E(wr)),
1753
1760
  A(4, E(G)),
1754
1761
  A(5, E(X)),
1755
- A(6, Tr),
1762
+ A(6, Fr),
1756
1763
  A(7, Q),
1757
- A(8, Fr),
1764
+ A(8, Cr),
1758
1765
  A(9, $e),
1759
- A(10, Cr),
1760
- A(11, E(Pt)),
1761
- A(12, Rt)
1766
+ A(10, Nr),
1767
+ A(11, E(yt)),
1768
+ A(12, At)
1762
1769
  ], Ae);
1763
- var Qs = Object.defineProperty, Gs = Object.getOwnPropertyDescriptor, js = (t, e, r) => e in t ? Qs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Ys = (t, e, r, i) => {
1764
- for (var n = i > 1 ? void 0 : i ? Gs(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1770
+ var js = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, qs = (t, e, r) => e in t ? js(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Ks = (t, e, r, i) => {
1771
+ for (var n = i > 1 ? void 0 : i ? Ys(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1765
1772
  (s = t[l]) && (n = s(n) || n);
1766
1773
  return n;
1767
- }, Be = (t, e) => (r, i) => e(r, i, t), Bt = (t, e, r) => js(t, typeof e != "symbol" ? e + "" : e, r);
1768
- const qs = "SHEET_FILTER_UI_PLUGIN";
1774
+ }, Be = (t, e) => (r, i) => e(r, i, t), Vt = (t, e, r) => qs(t, typeof e != "symbol" ? e + "" : e, r);
1775
+ const Xs = "SHEET_FILTER_UI_PLUGIN";
1769
1776
  let be = class extends Ye {
1770
1777
  constructor(t = Ce, e, r, i) {
1771
1778
  super(), this._config = t, this._injector = e, this._configService = r, this._rpcChannelService = i;
1772
- const { menu: n, ...l } = Ft(
1779
+ const { menu: n, ...l } = Ct(
1773
1780
  {},
1774
1781
  Ce,
1775
1782
  this._config
1776
1783
  );
1777
- n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(Lt, l);
1784
+ n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(Mt, l);
1778
1785
  }
1779
1786
  onStarting() {
1780
1787
  [
@@ -1782,7 +1789,7 @@ let be = class extends Ye {
1782
1789
  [oe],
1783
1790
  [Ae]
1784
1791
  ].forEach((t) => this._injector.add(t)), this._config.useRemoteFilterValuesGenerator && this._rpcChannelService && this._injector.add([Ne, {
1785
- useFactory: () => zt(
1792
+ useFactory: () => Jt(
1786
1793
  this._rpcChannelService.requestChannel(et)
1787
1794
  )
1788
1795
  }]);
@@ -1794,56 +1801,56 @@ let be = class extends Ye {
1794
1801
  this._injector.get(Ae);
1795
1802
  }
1796
1803
  };
1797
- Bt(be, "type", z.UNIVER_SHEET);
1798
- Bt(be, "pluginName", qs);
1799
- be = Ys([
1800
- Et(Nt),
1804
+ Vt(be, "type", z.UNIVER_SHEET);
1805
+ Vt(be, "pluginName", Xs);
1806
+ be = Ks([
1807
+ Tt(Pt),
1801
1808
  Be(1, E(Z)),
1802
- Be(2, Tt),
1803
- Be(3, Zt(Ct))
1809
+ Be(2, Ft),
1810
+ Be(3, zt(Nt))
1804
1811
  ], be);
1805
- var Ks = Object.defineProperty, Xs = Object.getOwnPropertyDescriptor, Zs = (t, e, r) => e in t ? Ks(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, zs = (t, e, r, i) => {
1806
- for (var n = i > 1 ? void 0 : i ? Xs(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1812
+ var Zs = Object.defineProperty, zs = Object.getOwnPropertyDescriptor, Js = (t, e, r) => e in t ? Zs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, ei = (t, e, r, i) => {
1813
+ for (var n = i > 1 ? void 0 : i ? zs(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1807
1814
  (s = t[l]) && (n = s(n) || n);
1808
1815
  return n;
1809
- }, mt = (t, e) => (r, i) => e(r, i, t), Vt = (t, e, r) => Zs(t, typeof e != "symbol" ? e + "" : e, r);
1810
- const Js = "SHEET_FILTER_UI_PLUGIN";
1816
+ }, pt = (t, e) => (r, i) => e(r, i, t), Wt = (t, e, r) => Js(t, typeof e != "symbol" ? e + "" : e, r);
1817
+ const ti = "SHEET_FILTER_UI_PLUGIN";
1811
1818
  let Le = class extends Ye {
1812
1819
  constructor(t = Ce, e, r) {
1813
1820
  super(), this._config = t, this._injector = e, this._configService = r;
1814
- const { menu: i, ...n } = Ft(
1821
+ const { menu: i, ...n } = Ct(
1815
1822
  {},
1816
1823
  Ce,
1817
1824
  this._config
1818
1825
  );
1819
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Lt, n);
1826
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Mt, n);
1820
1827
  }
1821
1828
  onStarting() {
1822
1829
  [
1823
1830
  [oe],
1824
- [me]
1831
+ [de]
1825
1832
  ].forEach((t) => this._injector.add(t));
1826
1833
  }
1827
1834
  onReady() {
1828
1835
  this._injector.get(oe);
1829
1836
  }
1830
1837
  onRendered() {
1831
- this._injector.get(me);
1838
+ this._injector.get(de);
1832
1839
  }
1833
1840
  };
1834
- Vt(Le, "type", z.UNIVER_SHEET);
1835
- Vt(Le, "pluginName", Js);
1836
- Le = zs([
1837
- Et(Nt),
1838
- mt(1, E(Z)),
1839
- mt(2, Tt)
1841
+ Wt(Le, "type", z.UNIVER_SHEET);
1842
+ Wt(Le, "pluginName", ti);
1843
+ Le = ei([
1844
+ Tt(Pt),
1845
+ pt(1, E(Z)),
1846
+ pt(2, Ft)
1840
1847
  ], Le);
1841
- var ei = Object.getOwnPropertyDescriptor, ti = (t, e, r, i) => {
1842
- for (var n = i > 1 ? void 0 : i ? ei(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1848
+ var ri = Object.getOwnPropertyDescriptor, si = (t, e, r, i) => {
1849
+ for (var n = i > 1 ? void 0 : i ? ri(e, r) : e, l = t.length - 1, s; l >= 0; l--)
1843
1850
  (s = t[l]) && (n = s(n) || n);
1844
1851
  return n;
1845
- }, pt = (t, e) => (r, i) => e(r, i, t), Te;
1846
- let ft = (Te = class extends Ye {
1852
+ }, ft = (t, e) => (r, i) => e(r, i, t), Te;
1853
+ let _t = (Te = class extends Ye {
1847
1854
  constructor(t, e, r) {
1848
1855
  super(), this._config = t, this._injector = e, this._rpcChannelService = r;
1849
1856
  }
@@ -1855,19 +1862,19 @@ let ft = (Te = class extends Ye {
1855
1862
  onReady() {
1856
1863
  this._rpcChannelService.registerChannel(
1857
1864
  et,
1858
- Jt(this._injector.get(Ne))
1865
+ er(this._injector.get(Ne))
1859
1866
  );
1860
1867
  }
1861
1868
  }, f(Te, "type", z.UNIVER_SHEET), f(Te, "pluginName", "SHEET_FILTER_UI_WORKER_PLUGIN"), Te);
1862
- ft = ti([
1863
- pt(1, E(Z)),
1864
- pt(2, Ct)
1865
- ], ft);
1869
+ _t = si([
1870
+ ft(1, E(Z)),
1871
+ ft(2, Nt)
1872
+ ], _t);
1866
1873
  export {
1867
- Ut as ChangeFilterByOperation,
1868
- de as CloseFilterPanelOperation,
1874
+ Ht as ChangeFilterByOperation,
1875
+ me as CloseFilterPanelOperation,
1869
1876
  Re as OpenFilterPanelOperation,
1870
1877
  Le as UniverSheetsFilterMobileUIPlugin,
1871
1878
  be as UniverSheetsFilterUIPlugin,
1872
- ft as UniverSheetsFilterUIWorkerPlugin
1879
+ _t as UniverSheetsFilterUIWorkerPlugin
1873
1880
  };