@univerjs/sheets-filter-ui 0.10.14 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,23 +1,23 @@
1
1
  var ar = Object.defineProperty;
2
2
  var cr = (t, e, r) => e in t ? ar(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var v = (t, e, r) => cr(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { BooleanNumber as dt, createIdentifier as wt, Inject as T, LocaleService as G, IUniverInstanceService as De, ILogService as ur, extractPureTextFromCell as hr, numfmt as mt, Disposable as he, Injector as re, Quantity as Pt, Tools as be, ColorKit as ft, ICommandService as j, CommandType as Be, IContextService as We, ThemeService as $t, RxDisposable as Lt, fromCallback as dr, VerticalAlign as Re, InterceptorEffectEnum as mr, UniverInstanceType as ie, DependentOn as Mt, IConfigService as xt, Plugin as rt, merge as Ut, Optional as fr, registerDependencies as pr, touchDependencies as pt } from "@univerjs/core";
5
- import { CustomFilterOperator as u, FilterBy as P, SetSheetsFilterCriteriaCommand as V, SheetsFilterService as z, SmartToggleSheetsFilterCommand as Ne, FILTER_MUTATIONS as vr, SetSheetsFilterRangeMutation as _r, SetSheetsFilterCriteriaMutation as gr, RemoveSheetsFilterMutation as Sr, ReCalcSheetsFilterMutation as Cr, UniverSheetsFilterPlugin as kt, SheetsFilterSyncController as Tr, ReCalcSheetsFilterCommand as it, ClearSheetsFilterCriteriaCommand as st, RemoveSheetFilterCommand as Er, SetSheetFilterRangeCommand as Fr } from "@univerjs/sheets-filter";
6
- import { IEditorBridgeService as vt, SetCellEditVisibleOperation as Nr, SheetSkeletonManagerService as yr, ISheetSelectionRenderService as Ir, SelectionControl as Or, attachSelectionWithCoord as br, getCoordByCell as Rr, SheetsRenderService as Ht, SheetsUIPart as Ar, getObservableWithExclusiveRange$ as wr, getCurrentRangeDisable$ as Pr, whenSheetEditorFocused as $r, SheetCanvasPopManagerService as Lr } from "@univerjs/sheets-ui";
7
- import { ILayoutService as Mr, useDependency as D, useObservable as M, IMessageService as Dt, useComponentsOfPart as xr, ComponentContainer as Ur, getMenuHiddenObservable as nt, MenuItemType as ot, RibbonDataGroup as kr, KeyCode as Hr, MetaKeys as _t, ComponentManager as Dr, IShortcutService as Br, IMenuManagerService as Wr } from "@univerjs/ui";
8
- import { COLOR_BLACK_RGB as gt, Rect as St, Shape as Vr, IRenderManagerService as Bt } from "@univerjs/engine-render";
9
- import { RefRangeService as Qr, SheetPermissionCheckController as Gr, SheetsSelectionsService as jr, getSheetCommandTarget as Yr, WorksheetFilterPermission as ve, WorksheetViewPermission as _e, RangeProtectionPermissionViewPoint as ge, expandToContinuousRange as Zr, SheetInterceptorService as Kr, SetRangeValuesMutation as qr, INTERCEPTOR_POINT as Xr } from "@univerjs/sheets";
10
- import { BehaviorSubject as Q, ReplaySubject as zr, Subject as Jr, merge as ei, combineLatest as ti, throttleTime as Wt, startWith as Vt, map as ae, shareReplay as ri, of as de, switchMap as lt, filter as ii, takeUntil as si, distinctUntilChanged as ni } from "rxjs";
11
- import { IRPCChannelService as Qt, toModule as oi, fromModule as li } from "@univerjs/rpc";
12
- import { clsx as Ae, borderClassName as at, Select as Ct, RadioGroup as ai, Radio as Tt, Input as Gt, Checkbox as ci, Tree as ui, Tooltip as hi, Switch as di, MessageType as jt, Segmented as mi, Button as Ye } from "@univerjs/design";
13
- import { useRef as fi, createElement as me, forwardRef as ye, useCallback as k, useMemo as ct } from "react";
14
- import { jsx as d, jsxs as N, Fragment as Et } from "react/jsx-runtime";
15
- var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SECOND", t))(I || {}), 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 || {}), f;
4
+ import { BooleanNumber as mt, createIdentifier as Pt, Inject as T, LocaleService as G, IUniverInstanceService as De, ILogService as ur, extractPureTextFromCell as hr, numfmt as Ye, Disposable as ue, Injector as re, Quantity as $t, Tools as be, ColorKit as pt, ICommandService as j, CommandType as Be, IContextService as We, ThemeService as Lt, RxDisposable as Mt, fromCallback as dr, VerticalAlign as Re, InterceptorEffectEnum as fr, UniverInstanceType as ie, DependentOn as xt, IConfigService as Ut, Plugin as it, merge as kt, Optional as mr, registerDependencies as pr, touchDependencies as vt } from "@univerjs/core";
5
+ import { CustomFilterOperator as u, FilterBy as w, SetSheetsFilterCriteriaCommand as V, SheetsFilterService as z, SmartToggleSheetsFilterCommand as Fe, FILTER_MUTATIONS as vr, SetSheetsFilterRangeMutation as _r, SetSheetsFilterCriteriaMutation as gr, RemoveSheetsFilterMutation as Sr, ReCalcSheetsFilterMutation as Cr, UniverSheetsFilterPlugin as Ht, SheetsFilterSyncController as Tr, ReCalcSheetsFilterCommand as st, ClearSheetsFilterCriteriaCommand as nt, RemoveSheetFilterCommand as Er, SetSheetFilterRangeCommand as Fr } from "@univerjs/sheets-filter";
6
+ import { IEditorBridgeService as _t, SetCellEditVisibleOperation as Nr, SheetSkeletonManagerService as Ir, ISheetSelectionRenderService as yr, SelectionControl as Or, attachSelectionWithCoord as br, getCoordByCell as Rr, SheetsRenderService as Dt, SheetsUIPart as Ar, getObservableWithExclusiveRange$ as wr, getCurrentRangeDisable$ as Pr, whenSheetEditorFocused as $r, SheetCanvasPopManagerService as Lr } from "@univerjs/sheets-ui";
7
+ import { ILayoutService as Mr, useDependency as D, useObservable as L, IMessageService as Bt, useComponentsOfPart as xr, ComponentContainer as Ur, getMenuHiddenObservable as ot, MenuItemType as lt, RibbonDataGroup as kr, KeyCode as Hr, MetaKeys as gt, ComponentManager as Dr, IShortcutService as Br, IMenuManagerService as Wr } from "@univerjs/ui";
8
+ import { COLOR_BLACK_RGB as St, Rect as Ct, Shape as Vr, IRenderManagerService as Wt } from "@univerjs/engine-render";
9
+ import { RefRangeService as Qr, SheetPermissionCheckController as Gr, SheetsSelectionsService as jr, getSheetCommandTarget as Yr, WorksheetFilterPermission as pe, WorksheetViewPermission as ve, RangeProtectionPermissionViewPoint as _e, expandToContinuousRange as Zr, SheetInterceptorService as Kr, SetRangeValuesMutation as qr, INTERCEPTOR_POINT as Xr } from "@univerjs/sheets";
10
+ import { BehaviorSubject as Q, ReplaySubject as zr, Subject as Jr, merge as ei, combineLatest as ti, throttleTime as Vt, startWith as Qt, map as le, shareReplay as ri, of as he, switchMap as at, filter as ii, takeUntil as si, distinctUntilChanged as ni } from "rxjs";
11
+ import { IRPCChannelService as Gt, toModule as oi, fromModule as li } from "@univerjs/rpc";
12
+ import { clsx as Ae, borderClassName as ct, Select as Tt, RadioGroup as ai, Radio as Et, Input as jt, Checkbox as ci, Tree as ui, Tooltip as hi, Switch as di, MessageType as Yt, Segmented as fi, Button as Ze } from "@univerjs/design";
13
+ import { useRef as mi, createElement as de, forwardRef as Ne, useCallback as U, useMemo as ut } from "react";
14
+ import { jsx as d, jsxs as y, Fragment as Ft } from "react/jsx-runtime";
15
+ var b = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SECOND", t))(b || {}), 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 = {
18
18
  label: "sheets-filter.conditions.none",
19
19
  operator: g.NONE,
20
- order: I.SECOND,
20
+ order: b.SECOND,
21
21
  numOfParameters: 0,
22
22
  getDefaultFormParams: () => {
23
23
  throw new Error("[FilterConditionItems.NONE]: should not have initial form params!");
@@ -28,7 +28,7 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
28
28
  }, t.EMPTY = {
29
29
  label: "sheets-filter.conditions.empty",
30
30
  operator: g.EMPTY,
31
- order: I.SECOND,
31
+ order: b.SECOND,
32
32
  numOfParameters: 0,
33
33
  getDefaultFormParams: () => {
34
34
  throw new Error("[FilterConditionItems.EMPTY]: should not have initial form params!");
@@ -45,7 +45,7 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
45
45
  }, t.NOT_EMPTY = {
46
46
  label: "sheets-filter.conditions.not-empty",
47
47
  operator: g.NOT_EMPTY,
48
- order: I.SECOND,
48
+ order: b.SECOND,
49
49
  numOfParameters: 0,
50
50
  getDefaultFormParams: () => {
51
51
  throw new Error("[FilterConditionItems.NOT_EMPTY]: should not have initial form params!");
@@ -62,11 +62,11 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
62
62
  }, t.TEXT_CONTAINS = {
63
63
  label: "sheets-filter.conditions.text-contains",
64
64
  operator: g.CONTAINS,
65
- order: I.FIRST,
65
+ order: b.FIRST,
66
66
  numOfParameters: 1,
67
67
  getDefaultFormParams: () => ({ operator1: g.CONTAINS, val1: "" }),
68
68
  testMappingParams: (i) => {
69
- const [o] = U(i);
69
+ const [o] = x(i);
70
70
  return o === g.CONTAINS;
71
71
  },
72
72
  mapToFilterColumn: (i) => {
@@ -85,14 +85,14 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
85
85
  }, t.DOES_NOT_CONTAIN = {
86
86
  label: "sheets-filter.conditions.does-not-contain",
87
87
  operator: g.DOES_NOT_CONTAIN,
88
- order: I.FIRST,
88
+ order: b.FIRST,
89
89
  numOfParameters: 1,
90
90
  getDefaultFormParams: () => ({ operator1: g.DOES_NOT_CONTAIN, val1: "" }),
91
91
  mapToFilterColumn: (i) => ({
92
92
  customFilters: { customFilters: [{ val: `*${i.val1}*`, operator: u.NOT_EQUALS }] }
93
93
  }),
94
94
  testMappingParams: (i) => {
95
- const [o] = U(i);
95
+ const [o] = x(i);
96
96
  return o === g.DOES_NOT_CONTAIN;
97
97
  },
98
98
  testMappingFilterColumn: (i) => {
@@ -105,14 +105,14 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
105
105
  }, t.STARTS_WITH = {
106
106
  label: "sheets-filter.conditions.starts-with",
107
107
  operator: g.STARTS_WITH,
108
- order: I.FIRST,
108
+ order: b.FIRST,
109
109
  numOfParameters: 1,
110
110
  getDefaultFormParams: () => ({ operator1: g.STARTS_WITH, val1: "" }),
111
111
  mapToFilterColumn: (i) => ({
112
112
  customFilters: { customFilters: [{ val: `${i.val1}*` }] }
113
113
  }),
114
114
  testMappingParams: (i) => {
115
- const [o] = U(i);
115
+ const [o] = x(i);
116
116
  return o === g.STARTS_WITH;
117
117
  },
118
118
  testMappingFilterColumn: (i) => {
@@ -125,14 +125,14 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
125
125
  }, t.ENDS_WITH = {
126
126
  label: "sheets-filter.conditions.ends-with",
127
127
  operator: g.ENDS_WITH,
128
- order: I.FIRST,
128
+ order: b.FIRST,
129
129
  numOfParameters: 1,
130
130
  getDefaultFormParams: () => ({ operator1: g.ENDS_WITH, val1: "" }),
131
131
  mapToFilterColumn: (i) => ({
132
132
  customFilters: { customFilters: [{ val: `*${i.val1}` }] }
133
133
  }),
134
134
  testMappingParams: (i) => {
135
- const [o] = U(i);
135
+ const [o] = x(i);
136
136
  return o === g.ENDS_WITH;
137
137
  },
138
138
  testMappingFilterColumn: (i) => {
@@ -145,11 +145,11 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
145
145
  }, t.EQUALS = {
146
146
  label: "sheets-filter.conditions.equals",
147
147
  operator: g.EQUALS,
148
- order: I.FIRST,
148
+ order: b.FIRST,
149
149
  numOfParameters: 1,
150
150
  getDefaultFormParams: () => ({ operator1: g.EQUALS, val1: "" }),
151
151
  testMappingParams: (i) => {
152
- const [o] = U(i);
152
+ const [o] = x(i);
153
153
  return o === g.EQUALS;
154
154
  },
155
155
  mapToFilterColumn: (i) => {
@@ -166,13 +166,13 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
166
166
  label: "sheets-filter.conditions.greater-than",
167
167
  operator: u.GREATER_THAN,
168
168
  numOfParameters: 1,
169
- order: I.FIRST,
169
+ order: b.FIRST,
170
170
  getDefaultFormParams: () => ({ operator1: u.GREATER_THAN, val1: "" }),
171
171
  mapToFilterColumn: (i) => ({
172
172
  customFilters: { customFilters: [{ val: i.val1, operator: u.GREATER_THAN }] }
173
173
  }),
174
174
  testMappingParams: (i) => {
175
- const [o] = U(i);
175
+ const [o] = x(i);
176
176
  return o === u.GREATER_THAN;
177
177
  },
178
178
  testMappingFilterColumn: (i) => {
@@ -186,10 +186,10 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
186
186
  label: "sheets-filter.conditions.greater-than-or-equal",
187
187
  operator: u.GREATER_THAN_OR_EQUAL,
188
188
  numOfParameters: 1,
189
- order: I.FIRST,
189
+ order: b.FIRST,
190
190
  getDefaultFormParams: () => ({ operator1: u.GREATER_THAN_OR_EQUAL, val1: "" }),
191
191
  testMappingParams: (i) => {
192
- const [o] = U(i);
192
+ const [o] = x(i);
193
193
  return o === u.GREATER_THAN_OR_EQUAL;
194
194
  },
195
195
  mapToFilterColumn: (i) => ({
@@ -206,10 +206,10 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
206
206
  label: "sheets-filter.conditions.less-than",
207
207
  operator: u.LESS_THAN,
208
208
  numOfParameters: 1,
209
- order: I.FIRST,
209
+ order: b.FIRST,
210
210
  getDefaultFormParams: () => ({ operator1: u.LESS_THAN, val1: "" }),
211
211
  testMappingParams: (i) => {
212
- const [o] = U(i);
212
+ const [o] = x(i);
213
213
  return o === u.LESS_THAN;
214
214
  },
215
215
  mapToFilterColumn: (i) => ({
@@ -226,10 +226,10 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
226
226
  label: "sheets-filter.conditions.less-than-or-equal",
227
227
  operator: u.LESS_THAN_OR_EQUAL,
228
228
  numOfParameters: 1,
229
- order: I.FIRST,
229
+ order: b.FIRST,
230
230
  getDefaultFormParams: () => ({ operator1: u.LESS_THAN_OR_EQUAL, val1: "" }),
231
231
  testMappingParams: (i) => {
232
- const [o] = U(i);
232
+ const [o] = x(i);
233
233
  return o === u.LESS_THAN_OR_EQUAL;
234
234
  },
235
235
  mapToFilterColumn: (i) => ({
@@ -246,10 +246,10 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
246
246
  label: "sheets-filter.conditions.equal",
247
247
  operator: u.EQUAL,
248
248
  numOfParameters: 1,
249
- order: I.FIRST,
249
+ order: b.FIRST,
250
250
  getDefaultFormParams: () => ({ operator1: u.EQUAL, val1: "" }),
251
251
  testMappingParams: (i) => {
252
- const [o] = U(i);
252
+ const [o] = x(i);
253
253
  return o === u.EQUAL;
254
254
  },
255
255
  mapToFilterColumn: (i) => ({
@@ -266,10 +266,10 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
266
266
  label: "sheets-filter.conditions.not-equal",
267
267
  operator: u.NOT_EQUALS,
268
268
  numOfParameters: 1,
269
- order: I.FIRST,
269
+ order: b.FIRST,
270
270
  getDefaultFormParams: () => ({ operator1: u.NOT_EQUALS, val1: "" }),
271
271
  testMappingParams: (i) => {
272
- const [o] = U(i);
272
+ const [o] = x(i);
273
273
  return o === u.NOT_EQUALS;
274
274
  },
275
275
  mapToFilterColumn: (i) => ({
@@ -285,7 +285,7 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
285
285
  }, t.BETWEEN = {
286
286
  label: "sheets-filter.conditions.between",
287
287
  operator: g.BETWEEN,
288
- order: I.SECOND,
288
+ order: b.SECOND,
289
289
  numOfParameters: 2,
290
290
  getDefaultFormParams: () => ({
291
291
  and: !0,
@@ -304,7 +304,7 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
304
304
  const { val1: o, val2: l, operator1: c } = i, h = c === u.GREATER_THAN_OR_EQUAL;
305
305
  return {
306
306
  customFilters: {
307
- and: dt.TRUE,
307
+ and: mt.TRUE,
308
308
  customFilters: [
309
309
  { val: h ? o : l, operator: u.GREATER_THAN_OR_EQUAL },
310
310
  { val: h ? l : o, operator: u.LESS_THAN_OR_EQUAL }
@@ -334,7 +334,7 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
334
334
  }, t.NOT_BETWEEN = {
335
335
  label: "sheets-filter.conditions.not-between",
336
336
  operator: g.NOT_BETWEEN,
337
- order: I.SECOND,
337
+ order: b.SECOND,
338
338
  numOfParameters: 2,
339
339
  getDefaultFormParams: () => ({
340
340
  operator1: u.LESS_THAN,
@@ -379,7 +379,7 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
379
379
  }, t.CUSTOM = {
380
380
  label: "sheets-filter.conditions.custom",
381
381
  operator: g.CUSTOM,
382
- order: I.SECOND,
382
+ order: b.SECOND,
383
383
  numOfParameters: 2,
384
384
  getDefaultFormParams: () => ({
385
385
  operator1: g.NONE,
@@ -389,26 +389,26 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
389
389
  }),
390
390
  testMappingParams: () => !0,
391
391
  mapToFilterColumn: (i) => {
392
- const { and: o, val1: l, val2: c, operator1: h, operator2: m } = i;
393
- function C(b, y) {
394
- for (const R of t.ALL_CONDITIONS)
395
- if (R.operator === b)
396
- return R.mapToFilterColumn({ val1: y, operator1: b });
392
+ const { and: o, val1: l, val2: c, operator1: h, operator2: f } = i;
393
+ function S(R, O) {
394
+ for (const A of t.ALL_CONDITIONS)
395
+ if (A.operator === R)
396
+ return A.mapToFilterColumn({ val1: O, operator1: R });
397
397
  }
398
- const p = !h || h === t.NONE.operator, _ = !m || m === t.NONE.operator;
398
+ const p = !h || h === t.NONE.operator, _ = !f || f === t.NONE.operator;
399
399
  if (p && _)
400
400
  return t.NONE.mapToFilterColumn({});
401
401
  if (p)
402
- return C(m, c);
402
+ return S(f, c);
403
403
  if (_)
404
- return C(h, l);
405
- const S = C(h, l), E = C(m, c), F = {
404
+ return S(h, l);
405
+ const C = S(h, l), F = S(f, c), N = {
406
406
  customFilters: [
407
- S.customFilters.customFilters[0],
408
- E.customFilters.customFilters[0]
407
+ C.customFilters.customFilters[0],
408
+ F.customFilters.customFilters[0]
409
409
  ]
410
410
  };
411
- return o && (F.and = dt.TRUE), { customFilters: F };
411
+ return o && (N.and = mt.TRUE), { customFilters: N };
412
412
  },
413
413
  testMappingFilterColumn: (i) => {
414
414
  var c;
@@ -483,8 +483,8 @@ var I = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SE
483
483
  return [t.NONE, {}];
484
484
  }
485
485
  t.testMappingFilterColumn = a;
486
- })(f || (f = {}));
487
- function U(t) {
486
+ })(m || (m = {}));
487
+ function x(t) {
488
488
  const { operator1: e, operator2: r, val1: s, val2: n } = t;
489
489
  if (e && r)
490
490
  throw new Error("Both operator1 and operator2 are set!");
@@ -492,7 +492,7 @@ function U(t) {
492
492
  throw new Error("Neither operator1 and operator2 and both not set!");
493
493
  return e ? [e, s] : [r, n];
494
494
  }
495
- function Xe(t) {
495
+ function ze(t) {
496
496
  const e = [], r = [];
497
497
  let s = 0, n = 0;
498
498
  function a(i) {
@@ -509,16 +509,16 @@ var pi = Object.getOwnPropertyDescriptor, vi = (t, e, r, s) => {
509
509
  for (var n = s > 1 ? void 0 : s ? pi(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
- }, Ze = (t, e) => (r, s) => e(r, s, t);
513
- const ut = "sheets-filter.generate-filter-values.service", we = wt(ut), _i = ["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
- let ze = class extends he {
512
+ }, Ke = (t, e) => (r, s) => e(r, s, t);
513
+ const ht = "sheets-filter.generate-filter-values.service", we = Pt(ht);
514
+ let Je = class extends ue {
515
515
  constructor(t, e, r) {
516
516
  super(), this._localeService = t, this._univerInstanceService = e, this._logService = r;
517
517
  }
518
518
  async getFilterValues(t) {
519
- var m;
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 = (m = this._univerInstanceService.getUnit(e)) == null ? void 0 : m.getSheetBySheetId(r);
521
- return !c || !h ? [] : (this._logService.debug("[SheetsGenerateFilterValuesService]", "getFilterValues for", { unitId: e, subUnitId: r }), Yt(
519
+ var f;
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 }), Zt(
522
522
  a,
523
523
  this._localeService,
524
524
  o,
@@ -531,96 +531,101 @@ let ze = class extends he {
531
531
  ));
532
532
  }
533
533
  };
534
- ze = vi([
535
- Ze(0, T(G)),
536
- Ze(1, De),
537
- Ze(2, ur)
538
- ], ze);
539
- function Yt(t, e, r, s, n, a, i, o, l) {
540
- var F, b, y, R, $, Y, Z, se, x, A;
541
- const c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), m = "yyyy-mm-dd", C = new Set(_i), p = "empty", _ = !t && ((a == null ? void 0 : a.filterBy) === P.COLORS || (a == null ? void 0 : a.filterBy) === P.CONDITIONS) && ((F = a.filteredOutRows) == null ? void 0 : F.size);
542
- let S = 0;
543
- for (const w of s.iterateByColumn(r, !1, !1)) {
544
- const { row: Qe, rowSpan: ht = 1 } = w;
534
+ Je = vi([
535
+ Ke(0, T(G)),
536
+ Ke(1, De),
537
+ Ke(2, ur)
538
+ ], Je);
539
+ function Zt(t, e, r, s, n, a, i, o, l) {
540
+ var F, N, R, O, A, P, Y, Z, se, M;
541
+ const c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), f = "yyyy-mm-dd", S = "empty", p = !t && ((a == null ? void 0 : a.filterBy) === w.COLORS || (a == null ? void 0 : a.filterBy) === w.CONDITIONS) && ((F = a.filteredOutRows) == null ? void 0 : F.size);
542
+ let _ = 0;
543
+ for (const E of s.iterateByColumn(r, !1, !1)) {
544
+ const { row: Qe, rowSpan: Ie = 1 } = E;
545
545
  let ne = 0;
546
- for (; ne < ht; ) {
547
- const or = Qe + ne;
548
- if (n.has(or)) {
546
+ for (; ne < Ie; ) {
547
+ const lr = Qe + ne;
548
+ if (n.has(lr)) {
549
549
  ne++;
550
550
  continue;
551
551
  }
552
- const J = w != null && w.value ? hr(w.value) : "";
552
+ const J = E != null && E.value ? hr(E.value) : "";
553
553
  if (!J) {
554
- S += 1, ne += ht;
554
+ _ += 1, ne += Ie;
555
555
  continue;
556
556
  }
557
- const Ie = (b = w.value) != null && b.v && !w.value.p ? ($ = (R = l.get((y = w.value) == null ? void 0 : y.s)) == null ? void 0 : R.n) == null ? void 0 : $.pattern : "", lr = Ie && mt.getFormatInfo(Ie).isDate;
558
- if (Ie && lr && C.has(Ie)) {
559
- const K = (Y = s.getCellRaw(w.row, w.col)) == null ? void 0 : Y.v;
560
- if (!K) {
557
+ const ye = (N = E.value) != null && N.v && !E.value.p ? (A = (O = l.get((R = E.value) == null ? void 0 : R.s)) == null ? void 0 : O.n) == null ? void 0 : A.pattern : "", dt = ye && Ye.getFormatInfo(ye).isDate;
558
+ let ft = !1;
559
+ if (dt) {
560
+ const { year: k, month: K, day: I } = Ye.getFormatDateInfo(ye);
561
+ ft = k || K || I;
562
+ }
563
+ if (ye && dt && ft) {
564
+ const k = (P = s.getCellRaw(E.row, E.col)) == null ? void 0 : P.v;
565
+ if (!k) {
561
566
  ne++;
562
567
  continue;
563
568
  }
564
- const oe = mt.format(m, K), [O, H, pe] = oe.split("-").map(Number);
565
- let ee = c.get(`${O}`);
569
+ const K = Ye.format(f, Number(k)), [I, H, me] = K.split("-").map(Number);
570
+ let ee = c.get(`${I}`);
566
571
  ee || (ee = {
567
- title: `${O}`,
568
- key: `${O}`,
572
+ title: `${I}`,
573
+ key: `${I}`,
569
574
  children: [],
570
575
  count: 0,
571
576
  leaf: !1,
572
577
  checked: !1
573
- }, c.set(`${O}`, ee), h.set(`${O}`, [`${O}`]));
574
- let W = (Z = ee.children) == null ? void 0 : Z.find((je) => je.key === `${O}-${H}`);
578
+ }, c.set(`${I}`, ee), h.set(`${I}`, [`${I}`]));
579
+ let W = (Y = ee.children) == null ? void 0 : Y.find((je) => je.key === `${I}-${H}`);
575
580
  W || (W = {
576
581
  title: e.t(`sheets-filter.date.${H}`),
577
- key: `${O}-${H}`,
582
+ key: `${I}-${H}`,
578
583
  children: [],
579
584
  count: 0,
580
585
  leaf: !1,
581
586
  checked: !1
582
- }, (se = ee.children) == null || se.push(W), h.set(`${O}-${H}`, [`${O}`, `${O}-${H}`]));
583
- const Ge = (x = W == null ? void 0 : W.children) == null ? void 0 : x.find((je) => je.key === `${O}-${H}-${pe}`);
584
- Ge ? (Ge.originValues.add(J), Ge.count++, W.count++, ee.count++) : ((A = W.children) == null || A.push({
585
- title: `${pe}`,
586
- key: `${O}-${H}-${pe}`,
587
+ }, (Z = ee.children) == null || Z.push(W), h.set(`${I}-${H}`, [`${I}`, `${I}-${H}`]));
588
+ const Ge = (se = W == null ? void 0 : W.children) == null ? void 0 : se.find((je) => je.key === `${I}-${H}-${me}`);
589
+ Ge ? (Ge.originValues.add(J), Ge.count++, W.count++, ee.count++) : ((M = W.children) == null || M.push({
590
+ title: `${me}`,
591
+ key: `${I}-${H}-${me}`,
587
592
  count: 1,
588
593
  originValues: /* @__PURE__ */ new Set([J]),
589
594
  leaf: !0,
590
- checked: _ ? !1 : i.size ? i.has(J) : !o
591
- }), W.count++, ee.count++, h.set(`${O}-${H}-${pe}`, [`${O}`, `${O}-${H}`, `${O}-${H}-${pe}`]));
595
+ checked: p ? !1 : i.size ? i.has(J) : !o
596
+ }), W.count++, ee.count++, h.set(`${I}-${H}-${me}`, [`${I}`, `${I}-${H}`, `${I}-${H}-${me}`]));
592
597
  } else {
593
- const K = J;
594
- let oe = c.get(K);
595
- oe ? oe.count++ : (oe = {
598
+ const k = J;
599
+ let K = c.get(k);
600
+ K ? K.count++ : (K = {
596
601
  title: J,
597
602
  leaf: !0,
598
- checked: _ ? !1 : i.size ? i.has(J) : !o,
599
- key: K,
603
+ checked: p ? !1 : i.size ? i.has(J) : !o,
604
+ key: k,
600
605
  count: 1
601
- }, c.set(K, oe), h.set(K, [K]));
606
+ }, c.set(k, K), h.set(k, [k]));
602
607
  }
603
608
  ne++;
604
609
  }
605
610
  }
606
- const E = _ ? !1 : t ? o : !0;
607
- if (S > 0) {
608
- const w = {
611
+ const C = p ? !1 : t ? o : !0;
612
+ if (_ > 0) {
613
+ const E = {
609
614
  title: e.t("sheets-filter.panel.empty"),
610
- count: S,
615
+ count: _,
611
616
  leaf: !0,
612
- checked: E,
613
- key: p
617
+ checked: C,
618
+ key: S
614
619
  };
615
- c.set("empty", w), h.set("empty", [p]);
620
+ c.set("empty", E), h.set("empty", [S]);
616
621
  }
617
622
  return {
618
- filterTreeItems: gi(Array.from(c.values())),
623
+ filterTreeItems: _i(Array.from(c.values())),
619
624
  filterTreeMapCache: h
620
625
  };
621
626
  }
622
- function gi(t) {
623
- return Array.from(t).sort((e, r) => e.children && !r.children ? -1 : !e.children && r.children ? 1 : Si(e.title, r.title)).map((e) => (e.children && e.children.sort((r, s) => {
627
+ function _i(t) {
628
+ return Array.from(t).sort((e, r) => e.children && !r.children ? -1 : !e.children && r.children ? 1 : gi(e.title, r.title)).map((e) => (e.children && e.children.sort((r, s) => {
624
629
  const n = Number.parseInt(r.key.split("-")[1], 10), a = Number.parseInt(s.key.split("-")[1], 10);
625
630
  return n - a;
626
631
  }).forEach((r) => {
@@ -630,30 +635,30 @@ function gi(t) {
630
635
  });
631
636
  }), e));
632
637
  }
633
- const Ft = (t) => !Number.isNaN(Number(t)) && !Number.isNaN(Number.parseFloat(t));
634
- function Si(t, e) {
635
- const r = Ft(t), s = Ft(e);
638
+ const Nt = (t) => !Number.isNaN(Number(t)) && !Number.isNaN(Number.parseFloat(t));
639
+ function gi(t, e) {
640
+ const r = Nt(t), s = Nt(e);
636
641
  return r && s ? Number.parseFloat(t) - Number.parseFloat(e) : r && !s ? -1 : !r && s ? 1 : t.localeCompare(e);
637
642
  }
638
- function Je(t, e) {
643
+ function et(t, e) {
639
644
  for (const r of t) {
640
645
  if (r.key === e)
641
646
  return r;
642
647
  if (r.children) {
643
- const s = Je(r.children, e);
648
+ const s = et(r.children, e);
644
649
  if (s)
645
650
  return s;
646
651
  }
647
652
  }
648
653
  return null;
649
654
  }
650
- function Zt(t) {
651
- return t.leaf ? t.checked : t.children ? t.children.every((e) => Zt(e)) : !0;
655
+ function Kt(t) {
656
+ return t.leaf ? t.checked : t.children ? t.children.every((e) => Kt(e)) : !0;
652
657
  }
653
- function Se(t, e) {
654
- t.leaf && (e !== void 0 ? t.checked = e : t.checked = !t.checked), t.children && t.children.forEach((r) => Se(r, e));
658
+ function ge(t, e) {
659
+ t.leaf && (e !== void 0 ? t.checked = e : t.checked = !t.checked), t.children && t.children.forEach((r) => ge(r, e));
655
660
  }
656
- function Kt(t, e) {
661
+ function qt(t, e) {
657
662
  const r = [];
658
663
  return t.forEach((s) => {
659
664
  const n = s.originValues ? e.some(
@@ -666,7 +671,7 @@ function Kt(t, e) {
666
671
  if (n || a)
667
672
  r.push({ ...s });
668
673
  else if (s.children) {
669
- const o = Kt(s.children, e);
674
+ const o = qt(s.children, e);
670
675
  if (o.length > 0) {
671
676
  const l = o.reduce((c, h) => c + h.count, 0);
672
677
  r.push({ ...s, count: l, children: o });
@@ -674,16 +679,16 @@ function Kt(t, e) {
674
679
  }
675
680
  }), r;
676
681
  }
677
- var Ci = Object.getOwnPropertyDescriptor, Ve = (t, e, r, s) => {
678
- for (var n = s > 1 ? void 0 : s ? Ci(e, r) : e, a = t.length - 1, i; a >= 0; a--)
682
+ var Si = Object.getOwnPropertyDescriptor, Ve = (t, e, r, s) => {
683
+ for (var n = s > 1 ? void 0 : s ? Si(e, r) : e, a = t.length - 1, i; a >= 0; a--)
679
684
  (i = t[a]) && (n = i(n) || n);
680
685
  return n;
681
- }, Ee = (t, e) => (r, s) => e(r, s, t);
682
- wt("sheets-filter-ui.sheets-filter-panel.service");
683
- let X = class extends he {
686
+ }, Te = (t, e) => (r, s) => e(r, s, t);
687
+ Pt("sheets-filter-ui.sheets-filter-panel.service");
688
+ let X = class extends ue {
684
689
  constructor(e, r) {
685
690
  super();
686
- v(this, "_filterBy$", new Q(P.VALUES));
691
+ v(this, "_filterBy$", new Q(w.VALUES));
687
692
  v(this, "filterBy$", this._filterBy$.asObservable());
688
693
  v(this, "_filterByModel$", new zr(1));
689
694
  v(this, "filterByModel$", this._filterByModel$.asObservable());
@@ -740,13 +745,13 @@ let X = class extends he {
740
745
  if (!this._filterModel || this.col === -1)
741
746
  return !1;
742
747
  switch (e) {
743
- case P.VALUES:
748
+ case w.VALUES:
744
749
  this._setupByValues(this._filterModel, this.col);
745
750
  break;
746
- case P.COLORS:
751
+ case w.COLORS:
747
752
  this._setupByColors(this._filterModel, this.col);
748
753
  break;
749
- case P.CONDITIONS:
754
+ case w.CONDITIONS:
750
755
  this._setupByConditions(this._filterModel, this.col);
751
756
  break;
752
757
  }
@@ -785,7 +790,7 @@ let X = class extends he {
785
790
  e,
786
791
  r
787
792
  );
788
- return this.filterByModel = n, this._filterBy$.next(P.VALUES), this._listenToFilterHeaderChange(e, r), !0;
793
+ return this.filterByModel = n, this._filterBy$.next(w.VALUES), this._listenToFilterHeaderChange(e, r), !0;
789
794
  }
790
795
  async _setupByColors(e, r) {
791
796
  this._disposePreviousModel();
@@ -796,7 +801,7 @@ let X = class extends he {
796
801
  e,
797
802
  r
798
803
  );
799
- return this.filterByModel = n, this._filterBy$.next(P.COLORS), this._listenToFilterHeaderChange(e, r), !0;
804
+ return this.filterByModel = n, this._filterBy$.next(w.COLORS), this._listenToFilterHeaderChange(e, r), !0;
800
805
  }
801
806
  _setupByConditions(e, r) {
802
807
  this._disposePreviousModel();
@@ -808,7 +813,7 @@ let X = class extends he {
808
813
  r,
809
814
  e.getFilterColumn(r)
810
815
  );
811
- return this.filterByModel = n, this._filterBy$.next(P.CONDITIONS), this._listenToFilterHeaderChange(e, r), !0;
816
+ return this.filterByModel = n, this._filterBy$.next(w.CONDITIONS), this._listenToFilterHeaderChange(e, r), !0;
812
817
  }
813
818
  _disposePreviousModel() {
814
819
  var e;
@@ -816,13 +821,13 @@ let X = class extends he {
816
821
  }
817
822
  };
818
823
  X = Ve([
819
- Ee(0, T(re)),
820
- Ee(1, T(Qr))
824
+ Te(0, T(re)),
825
+ Te(1, T(Qr))
821
826
  ], X);
822
- let Pe = class extends he {
827
+ let Pe = class extends ue {
823
828
  constructor(e, r, s, n, a) {
824
829
  super();
825
- v(this, "canApply$", de(!0));
830
+ v(this, "canApply$", he(!0));
826
831
  v(this, "_conditionItem$");
827
832
  v(this, "conditionItem$");
828
833
  v(this, "_filterConditionFormParams$");
@@ -841,7 +846,7 @@ let Pe = class extends he {
841
846
  * @returns the model to control the panel's state
842
847
  */
843
848
  static fromFilterColumn(e, r, s, n) {
844
- const [a, i] = f.testMappingFilterColumn(n == null ? void 0 : n.getColumnData());
849
+ const [a, i] = m.testMappingFilterColumn(n == null ? void 0 : n.getColumnData());
845
850
  return e.createInstance(Pe, r, s, a, i);
846
851
  }
847
852
  get conditionItem() {
@@ -869,7 +874,7 @@ let Pe = class extends he {
869
874
  */
870
875
  async apply() {
871
876
  if (this._disposed) return !1;
872
- const e = f.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
877
+ const e = m.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
873
878
  return this._commandService.executeCommand(V.id, {
874
879
  unitId: this._filterModel.unitId,
875
880
  subUnitId: this._filterModel.subUnitId,
@@ -882,10 +887,10 @@ let Pe = class extends he {
882
887
  * `IFilterConditionFormParams` and load default condition form params.
883
888
  */
884
889
  onPrimaryConditionChange(e) {
885
- const r = f.ALL_CONDITIONS.find((s) => s.operator === e);
890
+ const r = m.ALL_CONDITIONS.find((s) => s.operator === e);
886
891
  if (!r)
887
892
  throw new Error(`[ByConditionsModel]: condition item not found for operator: ${e}!`);
888
- this._conditionItem$.next(r), this._filterConditionFormParams$.next(f.getInitialFormParams(e));
893
+ this._conditionItem$.next(r), this._filterConditionFormParams$.next(m.getInitialFormParams(e));
889
894
  }
890
895
  /**
891
896
  * This method would be called when user changes the primary conditions, the input values or "AND" "OR" ratio.
@@ -898,16 +903,16 @@ let Pe = class extends he {
898
903
  onConditionFormChange(e) {
899
904
  const r = { ...this.filterConditionFormParams, ...e };
900
905
  if (r.and !== !0 && delete r.and, typeof e.and < "u" || typeof e.operator1 < "u" || typeof e.operator2 < "u") {
901
- const s = f.testMappingParams(r, this.conditionItem.numOfParameters);
906
+ const s = m.testMappingParams(r, this.conditionItem.numOfParameters);
902
907
  this._conditionItem$.next(s);
903
908
  }
904
909
  this._filterConditionFormParams$.next(r);
905
910
  }
906
911
  };
907
912
  Pe = Ve([
908
- Ee(4, j)
913
+ Te(4, j)
909
914
  ], Pe);
910
- let $e = class extends he {
915
+ let $e = class extends ue {
911
916
  constructor(e, r, s, n, a) {
912
917
  super();
913
918
  v(this, "_rawFilterItems$");
@@ -922,19 +927,19 @@ let $e = class extends he {
922
927
  this._filterModel = e, this.col = r, this._commandService = a, this._treeMapCache = n, this._searchString$ = new Q(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new Q(s), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new Jr(), this.filterItems$ = ei(
923
928
  ti([
924
929
  this._searchString$.pipe(
925
- Wt(500, void 0, { leading: !0, trailing: !0 }),
926
- Vt(void 0)
930
+ Vt(500, void 0, { leading: !0, trailing: !0 }),
931
+ Qt(void 0)
927
932
  ),
928
933
  this._rawFilterItems$
929
934
  ]).pipe(
930
- ae(([i, o]) => {
935
+ le(([i, o]) => {
931
936
  if (!i) return o;
932
937
  const c = i.toLowerCase().split(/\s+/).filter((h) => !!h);
933
- return Kt(o, c);
938
+ return qt(o, c);
934
939
  })
935
940
  ),
936
941
  this._manuallyUpdateFilterItems$
937
- ).pipe(ri(1)), this.canApply$ = this.filterItems$.pipe(ae((i) => Xe(i).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((i) => this._filterItems = i));
942
+ ).pipe(ri(1)), this.canApply$ = this.filterItems$.pipe(le((i) => ze(i).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((i) => this._filterItems = i));
938
943
  }
939
944
  /**
940
945
  * Create a model with targeting filter column. If there is not a filter column, the model would be created with
@@ -947,39 +952,39 @@ let $e = class extends he {
947
952
  * @returns the model to control the panel's state
948
953
  */
949
954
  static async fromFilterColumn(e, r, s) {
950
- const n = e.get(De), a = e.get(G), i = e.get(we, Pt.OPTIONAL), { unitId: o, subUnitId: l } = r, c = n.getUniverSheetInstance(o);
955
+ const n = e.get(De), a = e.get(G), i = e.get(we, $t.OPTIONAL), { unitId: o, subUnitId: l } = r, c = n.getUniverSheetInstance(o);
951
956
  if (!c) throw new Error(`[ByValuesModel]: Workbook not found for filter model with unitId: ${o}!`);
952
957
  const h = c == null ? void 0 : c.getSheetBySheetId(l);
953
958
  if (!h) throw new Error(`[ByValuesModel]: Worksheet not found for filter model with unitId: ${o} and subUnitId: ${l}!`);
954
- const m = r.getRange(), C = s, p = r.getFilterColumn(s), _ = p == null ? void 0 : p.getColumnData().filters, S = new Set(_ == null ? void 0 : _.filters), E = !!(_ && _.blank), F = r.getFilteredOutRowsExceptCol(s), b = { ...m, startRow: m.startRow + 1, startColumn: C, endColumn: C };
955
- let y, R;
959
+ const f = r.getRange(), S = s, p = r.getFilterColumn(s), _ = p == null ? void 0 : p.getColumnData().filters, C = new Set(_ == null ? void 0 : _.filters), F = !!(_ && _.blank), N = r.getFilteredOutRowsExceptCol(s), R = { ...f, startRow: f.startRow + 1, startColumn: S, endColumn: S };
960
+ let O, A;
956
961
  if (i) {
957
- const $ = await i.getFilterValues({
962
+ const P = await i.getFilterValues({
958
963
  unitId: o,
959
964
  subUnitId: l,
960
- filteredOutRowsByOtherColumns: Array.from(F),
965
+ filteredOutRowsByOtherColumns: Array.from(N),
961
966
  filterColumn: p,
962
967
  filters: !!_,
963
- blankChecked: E,
964
- iterateRange: b,
965
- alreadyChecked: Array.from(S)
968
+ blankChecked: F,
969
+ iterateRange: R,
970
+ alreadyChecked: Array.from(C)
966
971
  });
967
- y = $.filterTreeItems, R = $.filterTreeMapCache;
972
+ O = P.filterTreeItems, A = P.filterTreeMapCache;
968
973
  } else {
969
- const $ = Yt(
974
+ const P = Zt(
970
975
  !!_,
971
976
  a,
972
- b,
977
+ R,
973
978
  h,
974
- F,
979
+ N,
975
980
  p,
976
- S,
977
- E,
981
+ C,
982
+ F,
978
983
  c.getStyles()
979
984
  );
980
- y = $.filterTreeItems, R = $.filterTreeMapCache;
985
+ O = P.filterTreeItems, A = P.filterTreeMapCache;
981
986
  }
982
- return e.createInstance($e, r, s, y, R);
987
+ return e.createInstance($e, r, s, O, A);
983
988
  }
984
989
  get rawFilterItems() {
985
990
  return this._rawFilterItems$.getValue();
@@ -1001,23 +1006,23 @@ let $e = class extends he {
1001
1006
  }
1002
1007
  onCheckAllToggled(e) {
1003
1008
  const r = be.deepClone(this._filterItems);
1004
- r.forEach((s) => Se(s, e)), this._manuallyUpdateFilterItems(r);
1009
+ r.forEach((s) => ge(s, e)), this._manuallyUpdateFilterItems(r);
1005
1010
  }
1006
1011
  /**
1007
1012
  * Toggle a filter item.
1008
1013
  */
1009
1014
  onFilterCheckToggled(e) {
1010
- const r = be.deepClone(this._filterItems), s = Je(r, e.key);
1015
+ const r = be.deepClone(this._filterItems), s = et(r, e.key);
1011
1016
  if (!s)
1012
1017
  return;
1013
- const n = Zt(s);
1014
- Se(s, !n), this._manuallyUpdateFilterItems(r);
1018
+ const n = Kt(s);
1019
+ ge(s, !n), this._manuallyUpdateFilterItems(r);
1015
1020
  }
1016
1021
  onFilterOnly(e) {
1017
1022
  const r = be.deepClone(this._filterItems);
1018
- r.forEach((s) => Se(s, !1)), e.forEach((s) => {
1019
- const n = Je(r, s);
1020
- n && Se(n, !0);
1023
+ r.forEach((s) => ge(s, !1)), e.forEach((s) => {
1024
+ const n = et(r, s);
1025
+ n && ge(n, !0);
1021
1026
  }), this._manuallyUpdateFilterItems(r);
1022
1027
  }
1023
1028
  _manuallyUpdateFilterItems(e) {
@@ -1039,7 +1044,7 @@ let $e = class extends he {
1039
1044
  async apply() {
1040
1045
  if (this._disposed)
1041
1046
  return !1;
1042
- const e = Xe(this._filterItems), { checked: r, checkedItems: s } = e, n = this.rawFilterItems;
1047
+ const e = ze(this._filterItems), { checked: r, checkedItems: s } = e, n = this.rawFilterItems;
1043
1048
  let a = 0;
1044
1049
  for (const c of n)
1045
1050
  a += c.count;
@@ -1055,9 +1060,9 @@ let $e = class extends he {
1055
1060
  });
1056
1061
  {
1057
1062
  l.filters = {};
1058
- const c = s.filter((m) => m.key !== "empty");
1063
+ const c = s.filter((f) => f.key !== "empty");
1059
1064
  c.length > 0 && (l.filters = {
1060
- filters: c.flatMap((m) => m.originValues ? Array.from(m.originValues) : [m.title])
1065
+ filters: c.flatMap((f) => f.originValues ? Array.from(f.originValues) : [f.title])
1061
1066
  }), c.length !== s.length && (l.filters.blank = !0);
1062
1067
  }
1063
1068
  return this._commandService.executeCommand(V.id, {
@@ -1070,12 +1075,12 @@ let $e = class extends he {
1070
1075
  // #endregion
1071
1076
  };
1072
1077
  $e = Ve([
1073
- Ee(4, j)
1078
+ Te(4, j)
1074
1079
  ], $e);
1075
- let Le = class extends he {
1080
+ let Le = class extends ue {
1076
1081
  constructor(e, r, s, n, a) {
1077
1082
  super();
1078
- v(this, "canApply$", de(!0));
1083
+ v(this, "canApply$", he(!0));
1079
1084
  v(this, "_cellFillColors$");
1080
1085
  v(this, "cellFillColors$");
1081
1086
  v(this, "_cellTextColors$");
@@ -1093,29 +1098,29 @@ let Le = class extends he {
1093
1098
  * @returns the model to control the panel's state
1094
1099
  */
1095
1100
  static async fromFilterColumn(e, r, s) {
1096
- var b, y, R;
1101
+ var R, O, A;
1097
1102
  const n = e.get(De), { unitId: a, subUnitId: i } = r, o = n.getUniverSheetInstance(a);
1098
1103
  if (!o) throw new Error(`[ByColorsModel]: Workbook not found for filter model with unitId: ${a}!`);
1099
1104
  const l = o == null ? void 0 : o.getSheetBySheetId(i);
1100
1105
  if (!l) throw new Error(`[ByColorsModel]: Worksheet not found for filter model with unitId: ${a} and subUnitId: ${i}!`);
1101
- const c = r.getRange(), h = s, m = (b = r.getFilterColumn(s)) == null ? void 0 : b.getColumnData().colorFilters, C = r.getFilteredOutRowsExceptCol(s), p = { ...c, startRow: c.startRow + 1, startColumn: h, endColumn: h }, _ = /* @__PURE__ */ new Map(), S = new Set((y = m == null ? void 0 : m.cellFillColors) != null ? y : []), E = /* @__PURE__ */ new Map(), F = new Set((R = m == null ? void 0 : m.cellTextColors) != null ? R : []);
1102
- for (const $ of l.iterateByColumn(p, !1, !0)) {
1103
- const { row: Y, col: Z, value: se } = $;
1104
- if (C.has(Y))
1106
+ const c = r.getRange(), h = s, f = (R = r.getFilterColumn(s)) == null ? void 0 : R.getColumnData().colorFilters, S = r.getFilteredOutRowsExceptCol(s), p = { ...c, startRow: c.startRow + 1, startColumn: h, endColumn: h }, _ = /* @__PURE__ */ new Map(), C = new Set((O = f == null ? void 0 : f.cellFillColors) != null ? O : []), F = /* @__PURE__ */ new Map(), N = new Set((A = f == null ? void 0 : f.cellTextColors) != null ? A : []);
1107
+ for (const P of l.iterateByColumn(p, !1, !0)) {
1108
+ const { row: Y, col: Z, value: se } = P;
1109
+ if (S.has(Y))
1105
1110
  continue;
1106
- const x = l.getComposedCellStyleByCellData(Y, Z, se);
1107
- if (x.bg && x.bg.rgb) {
1108
- const A = new ft(x.bg.rgb).toRgbString();
1109
- _.has(A) || _.set(A, { color: A, checked: S.has(A) });
1111
+ const M = l.getComposedCellStyleByCellData(Y, Z, se);
1112
+ if (M.bg && M.bg.rgb) {
1113
+ const E = new pt(M.bg.rgb).toRgbString();
1114
+ _.has(E) || _.set(E, { color: E, checked: C.has(E) });
1110
1115
  } else
1111
- _.set("default-fill-color", { color: null, checked: S.has(null) });
1112
- if (x.cl && x.cl.rgb) {
1113
- const A = new ft(x.cl.rgb).toRgbString();
1114
- E.has(A) || E.set(A, { color: A, checked: F.has(A) });
1116
+ _.set("default-fill-color", { color: null, checked: C.has(null) });
1117
+ if (M.cl && M.cl.rgb) {
1118
+ const E = new pt(M.cl.rgb).toRgbString();
1119
+ F.has(E) || F.set(E, { color: E, checked: N.has(E) });
1115
1120
  } else
1116
- E.set("default-font-color", { color: gt, checked: F.has(gt) });
1121
+ F.set("default-font-color", { color: St, checked: N.has(St) });
1117
1122
  }
1118
- return e.createInstance(Le, r, s, _, E);
1123
+ return e.createInstance(Le, r, s, _, F);
1119
1124
  }
1120
1125
  get cellFillColors() {
1121
1126
  return this._cellFillColors$.getValue();
@@ -1196,38 +1201,38 @@ let Le = class extends he {
1196
1201
  // #endregion
1197
1202
  };
1198
1203
  Le = Ve([
1199
- Ee(4, j)
1204
+ Te(4, j)
1200
1205
  ], Le);
1201
- const ce = "FILTER_PANEL_OPENED", Me = {
1206
+ const ae = "FILTER_PANEL_OPENED", Me = {
1202
1207
  id: "sheet.operation.open-filter-panel",
1203
1208
  type: Be.OPERATION,
1204
1209
  handler: (t, e) => {
1205
- const r = t.get(We), s = t.get(z), n = t.get(X), a = t.get(j), i = t.has(vt) ? t.get(vt) : null;
1210
+ const r = t.get(We), s = t.get(z), n = t.get(X), a = t.get(j), i = t.has(_t) ? t.get(_t) : null;
1206
1211
  i != null && i.isVisible().visible && a.syncExecuteCommand(Nr.id, { visible: !1 });
1207
1212
  const { unitId: o, subUnitId: l, col: c } = e, h = s.getFilterModel(o, l);
1208
- return h ? (n.setupCol(h, c), r.getContextValue(ce) || r.setContextValue(ce, !0), !0) : !1;
1213
+ return h ? (n.setupCol(h, c), r.getContextValue(ae) || r.setContextValue(ae, !0), !0) : !1;
1209
1214
  }
1210
- }, Ce = {
1215
+ }, Se = {
1211
1216
  id: "sheet.operation.close-filter-panel",
1212
1217
  type: Be.OPERATION,
1213
1218
  handler: (t) => {
1214
- const e = t.get(We), r = t.get(X), s = t.get(Mr, Pt.OPTIONAL);
1215
- return e.getContextValue(ce) ? (e.setContextValue(ce, !1), s == null || s.focus(), r.terminate()) : !1;
1219
+ const e = t.get(We), r = t.get(X), s = t.get(Mr, $t.OPTIONAL);
1220
+ return e.getContextValue(ae) ? (e.setContextValue(ae, !1), s == null || s.focus(), r.terminate()) : !1;
1216
1221
  }
1217
- }, qt = {
1222
+ }, Xt = {
1218
1223
  id: "sheet.operation.apply-filter",
1219
1224
  type: Be.OPERATION,
1220
1225
  handler: (t, e) => {
1221
1226
  const { filterBy: r } = e;
1222
1227
  return t.get(X).changeFilterBy(r);
1223
1228
  }
1224
- }, Xt = "sheets-filter-ui.config", xe = {};
1225
- var Ti = Object.getOwnPropertyDescriptor, Ei = (t, e, r, s) => {
1226
- for (var n = s > 1 ? void 0 : s ? Ti(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1229
+ }, zt = "sheets-filter-ui.config", xe = {};
1230
+ var Ci = Object.getOwnPropertyDescriptor, Ti = (t, e, r, s) => {
1231
+ for (var n = s > 1 ? void 0 : s ? Ci(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1227
1232
  (i = t[a]) && (n = i(n) || n);
1228
1233
  return n;
1229
- }, le = (t, e) => (r, s) => e(r, s, t);
1230
- let ue = class extends he {
1234
+ }, oe = (t, e) => (r, s) => e(r, s, t);
1235
+ let ce = class extends ue {
1231
1236
  constructor(t, e, r, s, n, a) {
1232
1237
  super(), this._sheetsFilterService = t, this._localeService = e, this._commandService = r, this._sheetPermissionCheckPermission = s, this._injector = n, this._sheetsSelectionService = a, this._commandExecutedListener();
1233
1238
  }
@@ -1235,28 +1240,28 @@ let ue = class extends he {
1235
1240
  this.disposeWithMe(
1236
1241
  this._commandService.beforeCommandExecuted((t) => {
1237
1242
  var e, r, s;
1238
- if (t.id === Ne.id) {
1243
+ if (t.id === Fe.id) {
1239
1244
  const n = this._injector.get(De), a = Yr(n);
1240
1245
  if (!a) return;
1241
1246
  const { unitId: i, subUnitId: o, worksheet: l } = a, c = (e = this._sheetsFilterService.getFilterModel(i, o)) == null ? void 0 : e.getRange();
1242
1247
  let h;
1243
1248
  if (c)
1244
1249
  h = this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1245
- rangeTypes: [ge],
1246
- worksheetTypes: [ve, _e]
1250
+ rangeTypes: [_e],
1251
+ worksheetTypes: [pe, ve]
1247
1252
  }, [c]);
1248
1253
  else {
1249
- const m = (r = this._sheetsSelectionService.getCurrentLastSelection()) == null ? void 0 : r.range;
1250
- if (m) {
1251
- let C = { ...m };
1252
- C = m.startColumn === m.endColumn && m.startRow === m.endRow ? Zr(C, { left: !0, right: !0, up: !0, down: !0 }, l) : C, h = this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1253
- rangeTypes: [ge],
1254
- worksheetTypes: [_e, ve]
1255
- }, [C], i, o);
1254
+ const f = (r = this._sheetsSelectionService.getCurrentLastSelection()) == null ? void 0 : r.range;
1255
+ if (f) {
1256
+ let S = { ...f };
1257
+ S = f.startColumn === f.endColumn && f.startRow === f.endRow ? Zr(S, { left: !0, right: !0, up: !0, down: !0 }, l) : S, h = this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1258
+ rangeTypes: [_e],
1259
+ worksheetTypes: [ve, pe]
1260
+ }, [S], i, o);
1256
1261
  } else
1257
1262
  h = this._sheetPermissionCheckPermission.permissionCheckWithoutRange({
1258
- rangeTypes: [ge],
1259
- worksheetTypes: [_e, ve]
1263
+ rangeTypes: [_e],
1264
+ worksheetTypes: [ve, pe]
1260
1265
  });
1261
1266
  }
1262
1267
  h || this._sheetPermissionCheckPermission.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.filterErr"));
@@ -1264,26 +1269,26 @@ let ue = class extends he {
1264
1269
  if (t.id === Me.id) {
1265
1270
  const n = t.params, { unitId: a, subUnitId: i } = n, o = (s = this._sheetsFilterService.getFilterModel(a, i)) == null ? void 0 : s.getRange(), l = be.deepClone(o);
1266
1271
  l && (l.startColumn = n.col, l.endColumn = n.col, this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1267
- rangeTypes: [ge],
1268
- worksheetTypes: [ve, _e]
1272
+ rangeTypes: [_e],
1273
+ worksheetTypes: [pe, ve]
1269
1274
  }, [l]) || this._sheetPermissionCheckPermission.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.filterErr")));
1270
1275
  }
1271
1276
  })
1272
1277
  );
1273
1278
  }
1274
1279
  };
1275
- ue = Ei([
1276
- le(0, T(z)),
1277
- le(1, T(G)),
1278
- le(2, j),
1279
- le(3, T(Gr)),
1280
- le(4, T(re)),
1281
- le(5, T(jr))
1282
- ], ue);
1283
- const q = 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 Nt {
1280
+ ce = Ti([
1281
+ oe(0, T(z)),
1282
+ oe(1, T(G)),
1283
+ oe(2, j),
1284
+ oe(3, T(Gr)),
1285
+ oe(4, T(re)),
1286
+ oe(5, T(jr))
1287
+ ], ce);
1288
+ const q = 16, Ei = 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");
1289
+ class It {
1285
1290
  static drawNoCriteria(e, r, s, n) {
1286
- e.save(), St.drawWith(e, {
1291
+ e.save(), Ct.drawWith(e, {
1287
1292
  radius: 2,
1288
1293
  width: q,
1289
1294
  height: q,
@@ -1291,21 +1296,21 @@ class Nt {
1291
1296
  }), e.lineCap = "square", e.strokeStyle = s, e.scale(r / q, r / q), 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
1297
  }
1293
1298
  static drawHasCriteria(e, r, s, n) {
1294
- e.save(), St.drawWith(e, {
1299
+ e.save(), Ct.drawWith(e, {
1295
1300
  radius: 2,
1296
1301
  width: q,
1297
1302
  height: q,
1298
1303
  fill: n
1299
- }), e.scale(r / q, r / q), e.fillStyle = s, e.fill(Fi), e.restore();
1304
+ }), e.scale(r / q, r / q), e.fillStyle = s, e.fill(Ei), e.restore();
1300
1305
  }
1301
1306
  }
1302
- var Ni = Object.getOwnPropertyDescriptor, yi = (t, e, r, s) => {
1303
- for (var n = s > 1 ? void 0 : s ? Ni(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1307
+ var Fi = Object.getOwnPropertyDescriptor, Ni = (t, e, r, s) => {
1308
+ for (var n = s > 1 ? void 0 : s ? Fi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1304
1309
  (i = t[a]) && (n = i(n) || n);
1305
1310
  return n;
1306
- }, Ke = (t, e) => (r, s) => e(r, s, t);
1307
- const B = 16, Te = 1;
1308
- let et = class extends Vr {
1311
+ }, qe = (t, e) => (r, s) => e(r, s, t);
1312
+ const B = 16, Ce = 1;
1313
+ let tt = class extends Vr {
1309
1314
  constructor(e, r, s, n, a) {
1310
1315
  super(e, r);
1311
1316
  v(this, "_cellWidth", 0);
@@ -1326,13 +1331,13 @@ let et = class extends Vr {
1326
1331
  const i = new Path2D();
1327
1332
  i.rect(n, a, s, r), e.clip(i);
1328
1333
  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 ? Nt.drawHasCriteria(e, B, l, c) : Nt.drawNoCriteria(e, B, l, c), e.restore();
1334
+ o ? It.drawHasCriteria(e, B, l, c) : It.drawNoCriteria(e, B, l, c), e.restore();
1330
1335
  }
1331
1336
  onPointerDown(e) {
1332
1337
  if (e.button === 2)
1333
1338
  return;
1334
1339
  const { col: r, unitId: s, subUnitId: n } = this._filterParams;
1335
- this._contextService.getContextValue(ce) || !this._commandService.hasCommand(Me.id) || setTimeout(() => {
1340
+ this._contextService.getContextValue(ae) || !this._commandService.hasCommand(Me.id) || setTimeout(() => {
1336
1341
  this._commandService.executeCommand(Me.id, {
1337
1342
  unitId: s,
1338
1343
  subUnitId: n,
@@ -1347,29 +1352,29 @@ let et = class extends Vr {
1347
1352
  this._hovered = !1, this.makeDirty(!0);
1348
1353
  }
1349
1354
  };
1350
- et = yi([
1351
- Ke(2, We),
1352
- Ke(3, j),
1353
- Ke(4, T($t))
1354
- ], et);
1355
- var Ii = Object.getOwnPropertyDescriptor, Oi = (t, e, r, s) => {
1355
+ tt = Ni([
1356
+ qe(2, We),
1357
+ qe(3, j),
1358
+ qe(4, T(Lt))
1359
+ ], tt);
1360
+ var Ii = Object.getOwnPropertyDescriptor, yi = (t, e, r, s) => {
1356
1361
  for (var n = s > 1 ? void 0 : s ? Ii(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1357
1362
  (i = t[a]) && (n = i(n) || n);
1358
1363
  return n;
1359
1364
  }, te = (t, e) => (r, s) => e(r, s, t);
1360
- const bi = 1e3, Ri = 5e3;
1361
- function Ai(t, e, r, s) {
1365
+ const Oi = 1e3, bi = 5e3;
1366
+ function Ri(t, e, r, s) {
1362
1367
  switch (s) {
1363
1368
  case Re.TOP:
1364
- return t + Te;
1369
+ return t + Ce;
1365
1370
  case Re.MIDDLE:
1366
1371
  return t + Math.max(0, (r - B) / 2);
1367
1372
  case Re.BOTTOM:
1368
1373
  default:
1369
- return e - B - Te;
1374
+ return e - B - Ce;
1370
1375
  }
1371
1376
  }
1372
- let tt = class extends Lt {
1377
+ let rt = class extends Mt {
1373
1378
  constructor(e, r, s, n, a, i, o, l) {
1374
1379
  super();
1375
1380
  v(this, "_filterRangeShape", null);
@@ -1382,9 +1387,9 @@ let tt = class extends Lt {
1382
1387
  }
1383
1388
  _initRenderer() {
1384
1389
  this._sheetSkeletonManagerService.currentSkeleton$.pipe(
1385
- lt((e) => {
1390
+ at((e) => {
1386
1391
  var o, l;
1387
- if (!e) return de(null);
1392
+ if (!e) return he(null);
1388
1393
  const { unit: r, unitId: s } = this._context, n = ((o = r.getActiveSheet()) == null ? void 0 : o.getSheetId()) || "", a = (l = this._sheetsFilterService.getFilterModel(s, n)) != null ? l : void 0, i = () => ({
1389
1394
  unitId: s,
1390
1395
  worksheetId: n,
@@ -1399,9 +1404,9 @@ let tt = class extends Lt {
1399
1404
  return c.type === Be.MUTATION && ((h = c.params) == null ? void 0 : h.unitId) === r.getUnitId() && (vr.has(c.id) || c.id === qr.id);
1400
1405
  }
1401
1406
  ),
1402
- Wt(20, void 0, { leading: !1, trailing: !0 }),
1403
- ae(i),
1404
- Vt(i())
1407
+ Vt(20, void 0, { leading: !1, trailing: !0 }),
1408
+ le(i),
1409
+ Qt(i())
1405
1410
  // must trigger once
1406
1411
  );
1407
1412
  }),
@@ -1413,7 +1418,7 @@ let tt = class extends Lt {
1413
1418
  _renderRange(e, r) {
1414
1419
  const { scene: s } = this._context, { rowHeaderWidth: n, columnHeaderHeight: a } = r, i = this._filterRangeShape = new Or(
1415
1420
  s,
1416
- bi,
1421
+ Oi,
1417
1422
  this._themeService,
1418
1423
  {
1419
1424
  rowHeaderWidth: n,
@@ -1433,32 +1438,32 @@ let tt = class extends Lt {
1433
1438
  if (!c)
1434
1439
  return;
1435
1440
  this._interceptCellContent(n, i, e.range);
1436
- const { startColumn: h, endColumn: m, startRow: C } = r;
1437
- for (let p = h; p <= m; p++) {
1438
- const _ = `sheets-filter-button-${p}`, S = Rr(C, p, l, a), E = c.getComposedCellStyle(C, p), F = (E == null ? void 0 : E.vt) || Re.BOTTOM, { startX: b, startY: y, endX: R, endY: $ } = S, Y = R - b, Z = $ - y;
1439
- if (Z <= Te || Y <= Te)
1441
+ const { startColumn: h, endColumn: f, startRow: S } = r;
1442
+ for (let p = h; p <= f; p++) {
1443
+ const _ = `sheets-filter-button-${p}`, C = Rr(S, p, l, a), F = c.getComposedCellStyle(S, p), N = (F == null ? void 0 : F.vt) || Re.BOTTOM, { startX: R, startY: O, endX: A, endY: P } = C, Y = A - R, Z = P - O;
1444
+ if (Z <= Ce || Y <= Ce)
1440
1445
  continue;
1441
- const se = !!s.getFilterColumn(p), x = R - B - Te, A = Ai(y, $, Z, F), w = {
1442
- left: x,
1443
- top: A,
1446
+ const se = !!s.getFilterColumn(p), M = A - B - Ce, E = Ri(O, P, Z, N), Qe = {
1447
+ left: M,
1448
+ top: E,
1444
1449
  height: B,
1445
1450
  width: B,
1446
- zIndex: Ri,
1451
+ zIndex: bi,
1447
1452
  cellHeight: Z,
1448
1453
  cellWidth: Y,
1449
1454
  filterParams: { unitId: n, subUnitId: i, col: p, hasCriteria: se }
1450
- }, Qe = this._injector.createInstance(et, _, w);
1451
- this._filterButtonShapes.push(Qe);
1455
+ }, Ie = this._injector.createInstance(tt, _, Qe);
1456
+ this._filterButtonShapes.push(Ie);
1452
1457
  }
1453
1458
  l.addObjects(this._filterButtonShapes), l.makeDirty();
1454
1459
  }
1455
1460
  _interceptCellContent(e, r, s) {
1456
1461
  const { startRow: n, startColumn: a, endColumn: i } = s;
1457
1462
  this._buttonRenderDisposable = this._sheetInterceptorService.intercept(Xr.CELL_CONTENT, {
1458
- effect: mr.Style,
1463
+ effect: fr.Style,
1459
1464
  handler: (o, l, c) => {
1460
- const { row: h, col: m, unitId: C, subUnitId: p } = l;
1461
- return C !== e || p !== r || h !== n || m < a || m > i || ((!o || o === l.rawData) && (o = { ...l.rawData }), o.fontRenderExtension = {
1465
+ const { row: h, col: f, unitId: S, subUnitId: p } = l;
1466
+ return S !== e || p !== r || h !== n || f < a || f > i || ((!o || o === l.rawData) && (o = { ...l.rawData }), o.fontRenderExtension = {
1462
1467
  ...o == null ? void 0 : o.fontRenderExtension,
1463
1468
  rightOffset: B
1464
1469
  }), c(o);
@@ -1471,21 +1476,21 @@ let tt = class extends Lt {
1471
1476
  (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
1477
  }
1473
1478
  };
1474
- tt = Oi([
1479
+ rt = yi([
1475
1480
  te(1, T(re)),
1476
- te(2, T(yr)),
1481
+ te(2, T(Ir)),
1477
1482
  te(3, T(z)),
1478
- te(4, T($t)),
1483
+ te(4, T(Lt)),
1479
1484
  te(5, T(Kr)),
1480
1485
  te(6, j),
1481
- te(7, Ir)
1482
- ], tt);
1483
- var wi = Object.getOwnPropertyDescriptor, Pi = (t, e, r, s) => {
1484
- for (var n = s > 1 ? void 0 : s ? wi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1486
+ te(7, yr)
1487
+ ], rt);
1488
+ var Ai = Object.getOwnPropertyDescriptor, wi = (t, e, r, s) => {
1489
+ for (var n = s > 1 ? void 0 : s ? Ai(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1485
1490
  (i = t[a]) && (n = i(n) || n);
1486
1491
  return n;
1487
1492
  }, yt = (t, e) => (r, s) => e(r, s, t);
1488
- let Fe = class extends Lt {
1493
+ let Ee = class extends Mt {
1489
1494
  constructor(t, e) {
1490
1495
  super(), this._renderManagerService = t, this._sheetsRenderService = e, [
1491
1496
  _r,
@@ -1494,53 +1499,53 @@ let Fe = class extends Lt {
1494
1499
  Cr
1495
1500
  ].forEach((r) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(r.id))), this.disposeWithMe(this._renderManagerService.registerRenderModule(
1496
1501
  ie.UNIVER_SHEET,
1497
- [tt]
1502
+ [rt]
1498
1503
  ));
1499
1504
  }
1500
1505
  };
1501
- Fe = Pi([
1502
- yt(0, Bt),
1503
- yt(1, T(Ht))
1504
- ], Fe);
1505
- var $i = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, Mi = (t, e, r) => e in t ? $i(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, xi = (t, e, r, s) => {
1506
- for (var n = s > 1 ? void 0 : s ? Li(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1506
+ Ee = wi([
1507
+ yt(0, Wt),
1508
+ yt(1, T(Dt))
1509
+ ], Ee);
1510
+ var Pi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, Li = (t, e, r) => e in t ? Pi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Mi = (t, e, r, s) => {
1511
+ for (var n = s > 1 ? void 0 : s ? $i(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1507
1512
  (i = t[a]) && (n = i(n) || n);
1508
1513
  return n;
1509
- }, It = (t, e) => (r, s) => e(r, s, t), zt = (t, e, r) => Mi(t, typeof e != "symbol" ? e + "" : e, r);
1510
- const Ui = "SHEET_FILTER_UI_PLUGIN";
1511
- let Ue = class extends rt {
1514
+ }, Ot = (t, e) => (r, s) => e(r, s, t), Jt = (t, e, r) => Li(t, typeof e != "symbol" ? e + "" : e, r);
1515
+ const xi = "SHEET_FILTER_UI_PLUGIN";
1516
+ let Ue = class extends it {
1512
1517
  constructor(t = xe, e, r) {
1513
1518
  super(), this._config = t, this._injector = e, this._configService = r;
1514
- const { menu: s, ...n } = Ut(
1519
+ const { menu: s, ...n } = kt(
1515
1520
  {},
1516
1521
  xe,
1517
1522
  this._config
1518
1523
  );
1519
- s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(Xt, n);
1524
+ s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(zt, n);
1520
1525
  }
1521
1526
  onStarting() {
1522
1527
  [
1523
- [ue],
1524
- [Fe]
1528
+ [ce],
1529
+ [Ee]
1525
1530
  ].forEach((t) => this._injector.add(t));
1526
1531
  }
1527
1532
  onReady() {
1528
- this._injector.get(ue);
1533
+ this._injector.get(ce);
1529
1534
  }
1530
1535
  onRendered() {
1531
- this._injector.get(Fe);
1536
+ this._injector.get(Ee);
1532
1537
  }
1533
1538
  };
1534
- zt(Ue, "type", ie.UNIVER_SHEET);
1535
- zt(Ue, "pluginName", Ui);
1536
- Ue = xi([
1537
- Mt(kt),
1538
- It(1, T(re)),
1539
- It(2, xt)
1539
+ Jt(Ue, "type", ie.UNIVER_SHEET);
1540
+ Jt(Ue, "pluginName", xi);
1541
+ Ue = Mi([
1542
+ xt(Ht),
1543
+ Ot(1, T(re)),
1544
+ Ot(2, Ut)
1540
1545
  ], Ue);
1541
1546
  function fe({ ref: t, ...e }) {
1542
- const { icon: r, id: s, className: n, extend: a, ...i } = e, o = `univerjs-icon univerjs-icon-${s} ${n || ""}`.trim(), l = fi(`_${Di()}`);
1543
- return Jt(r, `${s}`, {
1547
+ const { icon: r, id: s, className: n, extend: a, ...i } = e, o = `univerjs-icon univerjs-icon-${s} ${n || ""}`.trim(), l = mi(`_${Hi()}`);
1548
+ return er(r, `${s}`, {
1544
1549
  defIds: r.defIds,
1545
1550
  idSuffix: l.current
1546
1551
  }, {
@@ -1549,14 +1554,14 @@ function fe({ ref: t, ...e }) {
1549
1554
  ...i
1550
1555
  }, a);
1551
1556
  }
1552
- function Jt(t, e, r, s, n) {
1553
- return me(t.tag, {
1557
+ function er(t, e, r, s, n) {
1558
+ return de(t.tag, {
1554
1559
  key: e,
1555
- ...ki(t, r, n),
1560
+ ...Ui(t, r, n),
1556
1561
  ...s
1557
- }, (Hi(t, r).children || []).map((a, i) => Jt(a, `${e}-${t.tag}-${i}`, r, void 0, n)));
1562
+ }, (ki(t, r).children || []).map((a, i) => er(a, `${e}-${t.tag}-${i}`, r, void 0, n)));
1558
1563
  }
1559
- function ki(t, e, r) {
1564
+ function Ui(t, e, r) {
1560
1565
  const s = { ...t.attrs };
1561
1566
  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(([a, i]) => {
1562
1567
  a === "mask" && typeof i == "string" && (s[a] = i.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
@@ -1566,7 +1571,7 @@ function ki(t, e, r) {
1566
1571
  typeof i == "string" && (s[a] = i.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
1567
1572
  })), s;
1568
1573
  }
1569
- function Hi(t, e) {
1574
+ function ki(t, e) {
1570
1575
  var s;
1571
1576
  const { defIds: r } = e;
1572
1577
  return !r || r.length === 0 ? t : t.tag === "defs" && ((s = t.children) != null && s.length) ? {
@@ -1580,11 +1585,11 @@ function Hi(t, e) {
1580
1585
  } : n)
1581
1586
  } : t;
1582
1587
  }
1583
- function Di() {
1588
+ function Hi() {
1584
1589
  return Math.random().toString(36).substring(2, 8);
1585
1590
  }
1586
1591
  fe.displayName = "UniverIcon";
1587
- const Bi = {
1592
+ const Di = {
1588
1593
  tag: "svg",
1589
1594
  attrs: {
1590
1595
  xmlns: "http://www.w3.org/2000/svg",
@@ -1606,15 +1611,15 @@ const Bi = {
1606
1611
  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"
1607
1612
  }
1608
1613
  }]
1609
- }, er = ye(function(e, r) {
1610
- return me(fe, Object.assign({}, e, {
1614
+ }, tr = Ne(function(e, r) {
1615
+ return de(fe, Object.assign({}, e, {
1611
1616
  id: "a-icon",
1612
1617
  ref: r,
1613
- icon: Bi
1618
+ icon: Di
1614
1619
  }));
1615
1620
  });
1616
- er.displayName = "AIcon";
1617
- const Wi = {
1621
+ tr.displayName = "AIcon";
1622
+ const Bi = {
1618
1623
  tag: "svg",
1619
1624
  attrs: {
1620
1625
  xmlns: "http://www.w3.org/2000/svg",
@@ -1636,15 +1641,15 @@ const Wi = {
1636
1641
  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"
1637
1642
  }
1638
1643
  }]
1639
- }, tr = ye(function(e, r) {
1640
- return me(fe, Object.assign({}, e, {
1644
+ }, rr = Ne(function(e, r) {
1645
+ return de(fe, Object.assign({}, e, {
1641
1646
  id: "ban-icon",
1642
1647
  ref: r,
1643
- icon: Wi
1648
+ icon: Bi
1644
1649
  }));
1645
1650
  });
1646
- tr.displayName = "BanIcon";
1647
- const Vi = {
1651
+ rr.displayName = "BanIcon";
1652
+ const Wi = {
1648
1653
  tag: "svg",
1649
1654
  attrs: {
1650
1655
  xmlns: "http://www.w3.org/2000/svg",
@@ -1662,15 +1667,15 @@ const Vi = {
1662
1667
  clipRule: "evenodd"
1663
1668
  }
1664
1669
  }]
1665
- }, rr = ye(function(e, r) {
1666
- return me(fe, Object.assign({}, e, {
1670
+ }, ir = Ne(function(e, r) {
1671
+ return de(fe, Object.assign({}, e, {
1667
1672
  id: "filter-icon",
1668
1673
  ref: r,
1669
- icon: Vi
1674
+ icon: Wi
1670
1675
  }));
1671
1676
  });
1672
- rr.displayName = "FilterIcon";
1673
- const Qi = {
1677
+ ir.displayName = "FilterIcon";
1678
+ const Vi = {
1674
1679
  tag: "svg",
1675
1680
  attrs: {
1676
1681
  xmlns: "http://www.w3.org/2000/svg",
@@ -1686,15 +1691,15 @@ const Qi = {
1686
1691
  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"
1687
1692
  }
1688
1693
  }]
1689
- }, ir = ye(function(e, r) {
1690
- return me(fe, Object.assign({}, e, {
1694
+ }, sr = Ne(function(e, r) {
1695
+ return de(fe, Object.assign({}, e, {
1691
1696
  id: "info-icon",
1692
1697
  ref: r,
1693
- icon: Qi
1698
+ icon: Vi
1694
1699
  }));
1695
1700
  });
1696
- ir.displayName = "InfoIcon";
1697
- const Gi = {
1701
+ sr.displayName = "InfoIcon";
1702
+ const Qi = {
1698
1703
  tag: "svg",
1699
1704
  attrs: {
1700
1705
  xmlns: "http://www.w3.org/2000/svg",
@@ -1712,18 +1717,18 @@ const Gi = {
1712
1717
  clipRule: "evenodd"
1713
1718
  }
1714
1719
  }]
1715
- }, sr = ye(function(e, r) {
1716
- return me(fe, Object.assign({}, e, {
1720
+ }, nr = Ne(function(e, r) {
1721
+ return de(fe, Object.assign({}, e, {
1717
1722
  id: "success-icon",
1718
1723
  ref: r,
1719
- icon: Gi
1724
+ icon: Qi
1720
1725
  }));
1721
1726
  });
1722
- sr.displayName = "SuccessIcon";
1723
- function ji(t) {
1724
- const { model: e } = t, r = D(G), s = M(e.cellFillColors$, [], !0), n = M(e.cellTextColors$, [], !0), a = k((o) => {
1727
+ nr.displayName = "SuccessIcon";
1728
+ function Gi(t) {
1729
+ const { model: e } = t, r = D(G), s = L(e.cellFillColors$, [], !0), n = L(e.cellTextColors$, [], !0), a = U((o) => {
1725
1730
  e.onFilterCheckToggled(o);
1726
- }, [e]), i = k((o) => {
1731
+ }, [e]), i = U((o) => {
1727
1732
  e.onFilterCheckToggled(o, !1);
1728
1733
  }, [e]);
1729
1734
  return /* @__PURE__ */ d(
@@ -1731,13 +1736,13 @@ function ji(t) {
1731
1736
  {
1732
1737
  "data-u-comp": "sheets-filter-panel-colors-container",
1733
1738
  className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
1734
- children: /* @__PURE__ */ N(
1739
+ children: /* @__PURE__ */ y(
1735
1740
  "div",
1736
1741
  {
1737
1742
  "data-u-comp": "sheets-filter-panel",
1738
- className: Ae("univer-mt-2 univer-box-border univer-flex univer-h-[300px] univer-flex-grow univer-flex-col univer-gap-4 univer-overflow-auto univer-rounded-md univer-px-2 univer-py-2.5", at),
1743
+ className: Ae("univer-mt-2 univer-box-border univer-flex univer-h-[300px] univer-flex-grow univer-flex-col univer-gap-4 univer-overflow-auto univer-rounded-md univer-px-2 univer-py-2.5", ct),
1739
1744
  children: [
1740
- s.length > 1 && /* @__PURE__ */ N("div", { children: [
1745
+ s.length > 1 && /* @__PURE__ */ y("div", { children: [
1741
1746
  /* @__PURE__ */ d(
1742
1747
  "div",
1743
1748
  {
@@ -1749,7 +1754,7 @@ function ji(t) {
1749
1754
  "div",
1750
1755
  {
1751
1756
  className: "univer-grid univer-grid-cols-8 univer-items-center univer-justify-start univer-gap-2",
1752
- children: s.map((o, l) => /* @__PURE__ */ N(
1757
+ children: s.map((o, l) => /* @__PURE__ */ y(
1753
1758
  "div",
1754
1759
  {
1755
1760
  className: "univer-relative univer-h-6 univer-w-6",
@@ -1763,12 +1768,12 @@ function ji(t) {
1763
1768
  style: { backgroundColor: o.color }
1764
1769
  }
1765
1770
  ) : /* @__PURE__ */ d(
1766
- tr,
1771
+ rr,
1767
1772
  {
1768
1773
  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"
1769
1774
  }
1770
1775
  ),
1771
- o.checked && /* @__PURE__ */ d(Ot, {})
1776
+ o.checked && /* @__PURE__ */ d(bt, {})
1772
1777
  ]
1773
1778
  },
1774
1779
  `sheets-filter-cell-fill-color-${l}`
@@ -1776,7 +1781,7 @@ function ji(t) {
1776
1781
  }
1777
1782
  )
1778
1783
  ] }),
1779
- n.length > 1 && /* @__PURE__ */ N("div", { children: [
1784
+ n.length > 1 && /* @__PURE__ */ y("div", { children: [
1780
1785
  /* @__PURE__ */ d(
1781
1786
  "div",
1782
1787
  {
@@ -1788,7 +1793,7 @@ function ji(t) {
1788
1793
  "div",
1789
1794
  {
1790
1795
  className: "univer-grid univer-grid-cols-8 univer-items-center univer-justify-start univer-gap-2",
1791
- children: n.map((o, l) => /* @__PURE__ */ N(
1796
+ children: n.map((o, l) => /* @__PURE__ */ y(
1792
1797
  "div",
1793
1798
  {
1794
1799
  className: "univer-relative univer-h-6 univer-w-6",
@@ -1798,10 +1803,10 @@ function ji(t) {
1798
1803
  "div",
1799
1804
  {
1800
1805
  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)]",
1801
- children: /* @__PURE__ */ d(er, { style: { color: o.color } })
1806
+ children: /* @__PURE__ */ d(tr, { style: { color: o.color } })
1802
1807
  }
1803
1808
  ),
1804
- o.checked && /* @__PURE__ */ d(Ot, {})
1809
+ o.checked && /* @__PURE__ */ d(bt, {})
1805
1810
  ]
1806
1811
  },
1807
1812
  `sheets-filter-cell-text-color-${l}`
@@ -1822,13 +1827,13 @@ function ji(t) {
1822
1827
  }
1823
1828
  );
1824
1829
  }
1825
- function Ot() {
1830
+ function bt() {
1826
1831
  return /* @__PURE__ */ d(
1827
1832
  "div",
1828
1833
  {
1829
1834
  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",
1830
1835
  children: /* @__PURE__ */ d(
1831
- sr,
1836
+ nr,
1832
1837
  {
1833
1838
  className: "univer-h-full univer-w-full univer-font-bold univer-text-[#418F1F]"
1834
1839
  }
@@ -1836,37 +1841,37 @@ function Ot() {
1836
1841
  }
1837
1842
  );
1838
1843
  }
1839
- function Yi(t) {
1844
+ function ji(t) {
1840
1845
  var p, _;
1841
- const { model: e } = t, r = D(G), s = M(e.conditionItem$, void 0), n = M(e.filterConditionFormParams$, void 0), a = n != null && n.and ? "AND" : "OR", i = k((S) => {
1842
- e.onConditionFormChange({ and: S === "AND" });
1843
- }, [e]), o = Zi(r), l = k((S) => {
1844
- e.onPrimaryConditionChange(S);
1845
- }, [e]), c = Ki(r), h = k((S) => {
1846
- e.onConditionFormChange(S);
1847
- }, [e]), m = r.t("sheets-filter.panel.input-values-placeholder");
1848
- function C(S, E, F) {
1849
- const b = f.getItemByOperator(S).numOfParameters === 1;
1850
- return /* @__PURE__ */ N(Et, { children: [
1851
- F === "operator2" && /* @__PURE__ */ N(ai, { value: a, onChange: i, children: [
1852
- /* @__PURE__ */ d(Tt, { value: "AND", children: r.t("sheets-filter.panel.and") }),
1853
- /* @__PURE__ */ d(Tt, { value: "OR", children: r.t("sheets-filter.panel.or") })
1846
+ const { model: e } = t, r = D(G), s = L(e.conditionItem$, void 0), n = L(e.filterConditionFormParams$, void 0), a = n != null && n.and ? "AND" : "OR", i = U((C) => {
1847
+ e.onConditionFormChange({ and: C === "AND" });
1848
+ }, [e]), o = Yi(r), l = U((C) => {
1849
+ e.onPrimaryConditionChange(C);
1850
+ }, [e]), c = Zi(r), h = U((C) => {
1851
+ e.onConditionFormChange(C);
1852
+ }, [e]), f = r.t("sheets-filter.panel.input-values-placeholder");
1853
+ function S(C, F, N) {
1854
+ const R = m.getItemByOperator(C).numOfParameters === 1;
1855
+ return /* @__PURE__ */ y(Ft, { children: [
1856
+ N === "operator2" && /* @__PURE__ */ y(ai, { value: a, onChange: i, children: [
1857
+ /* @__PURE__ */ d(Et, { value: "AND", children: r.t("sheets-filter.panel.and") }),
1858
+ /* @__PURE__ */ d(Et, { value: "OR", children: r.t("sheets-filter.panel.or") })
1854
1859
  ] }),
1855
1860
  /* @__PURE__ */ d(
1856
- Ct,
1861
+ Tt,
1857
1862
  {
1858
- value: S,
1863
+ value: C,
1859
1864
  options: c,
1860
- onChange: (y) => h({ [F]: y })
1865
+ onChange: (O) => h({ [N]: O })
1861
1866
  }
1862
1867
  ),
1863
- b && /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d(
1864
- Gt,
1868
+ R && /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d(
1869
+ jt,
1865
1870
  {
1866
1871
  className: "univer-mt-2",
1867
- value: E,
1868
- placeholder: m,
1869
- onChange: (y) => h({ [F === "operator1" ? "val1" : "val2"]: y })
1872
+ value: F,
1873
+ placeholder: f,
1874
+ onChange: (O) => h({ [N === "operator1" ? "val1" : "val2"]: O })
1870
1875
  }
1871
1876
  ) })
1872
1877
  ] });
@@ -1876,17 +1881,17 @@ function Yi(t) {
1876
1881
  {
1877
1882
  "data-u-comp": "sheets-filter-panel-conditions-container",
1878
1883
  className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
1879
- children: s && n && /* @__PURE__ */ N(Et, { children: [
1880
- /* @__PURE__ */ d(Ct, { value: s.operator, options: o, onChange: l }),
1881
- f.getItemByOperator(s.operator).numOfParameters !== 0 ? /* @__PURE__ */ N(
1884
+ children: s && n && /* @__PURE__ */ y(Ft, { children: [
1885
+ /* @__PURE__ */ d(Tt, { value: s.operator, options: o, onChange: l }),
1886
+ m.getItemByOperator(s.operator).numOfParameters !== 0 ? /* @__PURE__ */ y(
1882
1887
  "div",
1883
1888
  {
1884
1889
  "data-u-comp": "sheets-filter-panel-conditions-container-inner",
1885
- className: Ae("univer-mt-2 univer-flex-grow univer-overflow-hidden univer-rounded-md univer-p-2", at),
1890
+ className: Ae("univer-mt-2 univer-flex-grow univer-overflow-hidden univer-rounded-md univer-p-2", ct),
1886
1891
  children: [
1887
- s.numOfParameters >= 1 && C(n.operator1, (p = n.val1) != null ? p : "", "operator1"),
1888
- s.numOfParameters >= 2 && C(n.operator2, (_ = n.val2) != null ? _ : "", "operator2"),
1889
- /* @__PURE__ */ N(
1892
+ s.numOfParameters >= 1 && S(n.operator1, (p = n.val1) != null ? p : "", "operator1"),
1893
+ s.numOfParameters >= 2 && S(n.operator2, (_ = n.val2) != null ? _ : "", "operator2"),
1894
+ /* @__PURE__ */ y(
1890
1895
  "div",
1891
1896
  {
1892
1897
  "data-u-comp": "sheets-filter-panel-conditions-desc",
@@ -1905,91 +1910,91 @@ function Yi(t) {
1905
1910
  }
1906
1911
  );
1907
1912
  }
1908
- function Zi(t) {
1913
+ function Yi(t) {
1909
1914
  const e = t.getCurrentLocale();
1910
- return ct(() => [
1915
+ return ut(() => [
1911
1916
  {
1912
1917
  options: [
1913
- { label: t.t(f.NONE.label), value: f.NONE.operator }
1918
+ { label: t.t(m.NONE.label), value: m.NONE.operator }
1914
1919
  ]
1915
1920
  },
1916
1921
  {
1917
1922
  options: [
1918
- { label: t.t(f.EMPTY.label), value: f.EMPTY.operator },
1919
- { label: t.t(f.NOT_EMPTY.label), value: f.NOT_EMPTY.operator }
1923
+ { label: t.t(m.EMPTY.label), value: m.EMPTY.operator },
1924
+ { label: t.t(m.NOT_EMPTY.label), value: m.NOT_EMPTY.operator }
1920
1925
  ]
1921
1926
  },
1922
1927
  {
1923
1928
  options: [
1924
- { label: t.t(f.TEXT_CONTAINS.label), value: f.TEXT_CONTAINS.operator },
1925
- { label: t.t(f.DOES_NOT_CONTAIN.label), value: f.DOES_NOT_CONTAIN.operator },
1926
- { label: t.t(f.STARTS_WITH.label), value: f.STARTS_WITH.operator },
1927
- { label: t.t(f.ENDS_WITH.label), value: f.ENDS_WITH.operator },
1928
- { label: t.t(f.EQUALS.label), value: f.EQUALS.operator }
1929
+ { label: t.t(m.TEXT_CONTAINS.label), value: m.TEXT_CONTAINS.operator },
1930
+ { label: t.t(m.DOES_NOT_CONTAIN.label), value: m.DOES_NOT_CONTAIN.operator },
1931
+ { label: t.t(m.STARTS_WITH.label), value: m.STARTS_WITH.operator },
1932
+ { label: t.t(m.ENDS_WITH.label), value: m.ENDS_WITH.operator },
1933
+ { label: t.t(m.EQUALS.label), value: m.EQUALS.operator }
1929
1934
  ]
1930
1935
  },
1931
1936
  {
1932
1937
  options: [
1933
- { label: t.t(f.GREATER_THAN.label), value: f.GREATER_THAN.operator },
1934
- { label: t.t(f.GREATER_THAN_OR_EQUAL.label), value: f.GREATER_THAN_OR_EQUAL.operator },
1935
- { label: t.t(f.LESS_THAN.label), value: f.LESS_THAN.operator },
1936
- { label: t.t(f.LESS_THAN_OR_EQUAL.label), value: f.LESS_THAN_OR_EQUAL.operator },
1937
- { label: t.t(f.EQUAL.label), value: f.EQUAL.operator },
1938
- { label: t.t(f.NOT_EQUAL.label), value: f.NOT_EQUAL.operator },
1939
- { label: t.t(f.BETWEEN.label), value: f.BETWEEN.operator },
1940
- { label: t.t(f.NOT_BETWEEN.label), value: f.NOT_BETWEEN.operator }
1938
+ { label: t.t(m.GREATER_THAN.label), value: m.GREATER_THAN.operator },
1939
+ { label: t.t(m.GREATER_THAN_OR_EQUAL.label), value: m.GREATER_THAN_OR_EQUAL.operator },
1940
+ { label: t.t(m.LESS_THAN.label), value: m.LESS_THAN.operator },
1941
+ { label: t.t(m.LESS_THAN_OR_EQUAL.label), value: m.LESS_THAN_OR_EQUAL.operator },
1942
+ { label: t.t(m.EQUAL.label), value: m.EQUAL.operator },
1943
+ { label: t.t(m.NOT_EQUAL.label), value: m.NOT_EQUAL.operator },
1944
+ { label: t.t(m.BETWEEN.label), value: m.BETWEEN.operator },
1945
+ { label: t.t(m.NOT_BETWEEN.label), value: m.NOT_BETWEEN.operator }
1941
1946
  ]
1942
1947
  },
1943
1948
  {
1944
1949
  options: [
1945
- { label: t.t(f.CUSTOM.label), value: f.CUSTOM.operator }
1950
+ { label: t.t(m.CUSTOM.label), value: m.CUSTOM.operator }
1946
1951
  ]
1947
1952
  }
1948
1953
  ], [e, t]);
1949
1954
  }
1950
- function Ki(t) {
1955
+ function Zi(t) {
1951
1956
  const e = t.getCurrentLocale();
1952
- return ct(() => f.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: t.t(r.label), value: r.operator })), [e, t]);
1957
+ return ut(() => m.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: t.t(r.label), value: r.operator })), [e, t]);
1953
1958
  }
1954
- function qi(t) {
1955
- const { model: e } = t, r = D(G), s = M(e.searchString$, "", !0), n = M(e.filterItems$, void 0, !0), a = r.t("sheets-filter.panel.filter-only"), i = Xe(n), o = i.checked > 0 && i.unchecked === 0, l = i.checked > 0 && i.unchecked > 0, c = e.treeMapCache, h = k(() => {
1959
+ function Ki(t) {
1960
+ const { model: e } = t, r = D(G), s = L(e.searchString$, "", !0), n = L(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 = U(() => {
1956
1961
  e.onCheckAllToggled(!o);
1957
- }, [e, o]), m = k((p) => {
1962
+ }, [e, o]), f = U((p) => {
1958
1963
  e.setSearchString(p);
1959
1964
  }, [e]);
1960
- function C(p) {
1965
+ function S(p) {
1961
1966
  let _ = [];
1962
- return p.forEach((S) => {
1963
- S.checked && _.push(S.key), S.children && (_ = _.concat(C(S.children)));
1967
+ return p.forEach((C) => {
1968
+ C.checked && _.push(C.key), C.children && (_ = _.concat(S(C.children)));
1964
1969
  }), _;
1965
1970
  }
1966
- return /* @__PURE__ */ N(
1971
+ return /* @__PURE__ */ y(
1967
1972
  "div",
1968
1973
  {
1969
1974
  "data-u-comp": "sheets-filter-panel-values-container",
1970
1975
  className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
1971
1976
  children: [
1972
1977
  /* @__PURE__ */ d(
1973
- Gt,
1978
+ jt,
1974
1979
  {
1975
1980
  autoFocus: !0,
1976
1981
  value: s,
1977
1982
  placeholder: r.t("sheets-filter.panel.search-placeholder"),
1978
- onChange: m
1983
+ onChange: f
1979
1984
  }
1980
1985
  ),
1981
- /* @__PURE__ */ N(
1986
+ /* @__PURE__ */ y(
1982
1987
  "div",
1983
1988
  {
1984
1989
  "data-u-comp": "sheets-filter-panel",
1985
- className: Ae("univer-mt-2 univer-box-border univer-flex univer-flex-grow univer-flex-col univer-overflow-hidden univer-rounded-md univer-px-2 univer-py-2.5", at),
1990
+ className: Ae("univer-mt-2 univer-box-border univer-flex univer-flex-grow univer-flex-col univer-overflow-hidden univer-rounded-md univer-px-2 univer-py-2.5", ct),
1986
1991
  children: [
1987
1992
  /* @__PURE__ */ d(
1988
1993
  "div",
1989
1994
  {
1990
1995
  "data-u-comp": "sheets-filter-panel-values-item",
1991
1996
  className: "univer-box-border univer-h-8 univer-w-full univer-py-0.5",
1992
- children: /* @__PURE__ */ N(
1997
+ children: /* @__PURE__ */ y(
1993
1998
  "div",
1994
1999
  {
1995
2000
  "data-u-comp": "sheets-filter-panel-values-item-inner",
@@ -2008,7 +2013,7 @@ function qi(t) {
2008
2013
  "span",
2009
2014
  {
2010
2015
  "data-u-comp": "sheets-filter-panel-values-item-text",
2011
- className: "univer-mx-1 univer-inline-block univer-flex-shrink univer-overflow-hidden univer-text-ellipsis univer-whitespace-nowrap univer-text-gray-900 dark:!univer-text-white",
2016
+ className: "univer-mx-1 univer-inline-block univer-flex-shrink univer-truncate univer-text-gray-900 dark:!univer-text-white",
2012
2017
  children: `${r.t("sheets-filter.panel.select-all")}`
2013
2018
  }
2014
2019
  ),
@@ -2030,7 +2035,7 @@ function qi(t) {
2030
2035
  {
2031
2036
  data: n,
2032
2037
  defaultExpandAll: !1,
2033
- valueGroup: C(n),
2038
+ valueGroup: S(n),
2034
2039
  onChange: (p) => {
2035
2040
  e.onFilterCheckToggled(p);
2036
2041
  },
@@ -2043,7 +2048,7 @@ function qi(t) {
2043
2048
  univer-text-gray-900 dark:hover:!univer-bg-gray-900
2044
2049
  dark:!univer-text-white
2045
2050
  `,
2046
- attachRender: (p) => /* @__PURE__ */ N(
2051
+ attachRender: (p) => /* @__PURE__ */ y(
2047
2052
  "div",
2048
2053
  {
2049
2054
  className: "univer-ml-1 univer-flex univer-h-5 univer-flex-1 univer-cursor-pointer univer-items-center univer-justify-between univer-text-sm univer-text-primary-500",
@@ -2062,10 +2067,10 @@ function qi(t) {
2062
2067
  className: "univer-box-border univer-hidden univer-h-4 univer-whitespace-nowrap univer-px-1.5",
2063
2068
  onClick: () => {
2064
2069
  const _ = [];
2065
- p.children ? p.children.forEach((S) => {
2066
- S.children ? S.children.forEach((E) => {
2067
- _.push(E.key);
2068
- }) : _.push(S.key);
2070
+ p.children ? p.children.forEach((C) => {
2071
+ C.children ? C.children.forEach((F) => {
2072
+ _.push(F.key);
2073
+ }) : _.push(C.key);
2069
2074
  }) : _.push(p.key), e.onFilterOnly(_);
2070
2075
  },
2071
2076
  children: a
@@ -2083,23 +2088,23 @@ function qi(t) {
2083
2088
  }
2084
2089
  );
2085
2090
  }
2086
- function Xi() {
2091
+ function qi() {
2087
2092
  const t = D(Tr);
2088
- if (!M(t.visible$, void 0, !0)) return null;
2089
- const r = D(G), s = D(Dt), n = M(t.enabled$, void 0, !0);
2090
- return /* @__PURE__ */ N(
2093
+ if (!L(t.visible$, void 0, !0)) return null;
2094
+ const r = D(G), s = D(Bt), n = L(t.enabled$, void 0, !0);
2095
+ return /* @__PURE__ */ y(
2091
2096
  "div",
2092
2097
  {
2093
2098
  className: "univer-mt-2 univer-flex univer-items-center univer-justify-between univer-text-sm univer-text-gray-900 dark:!univer-text-gray-200",
2094
2099
  children: [
2095
- /* @__PURE__ */ N("div", { className: "univer-flex univer-items-center univer-gap-1", children: [
2100
+ /* @__PURE__ */ y("div", { className: "univer-flex univer-items-center univer-gap-1", children: [
2096
2101
  /* @__PURE__ */ d("span", { children: r.t("sheets-filter.sync.title") }),
2097
2102
  /* @__PURE__ */ d(
2098
2103
  hi,
2099
2104
  {
2100
2105
  title: n ? r.t("sheets-filter.sync.statusTips.off") : r.t("sheets-filter.sync.statusTips.on"),
2101
2106
  asChild: !0,
2102
- children: /* @__PURE__ */ d(ir, { className: "univer-block" })
2107
+ children: /* @__PURE__ */ d(sr, { className: "univer-block" })
2103
2108
  }
2104
2109
  )
2105
2110
  ] }),
@@ -2111,7 +2116,7 @@ function Xi() {
2111
2116
  const i = a ? r.t("sheets-filter.sync.switchTips.on") : r.t("sheets-filter.sync.switchTips.off");
2112
2117
  t.setEnabled(a), s.show({
2113
2118
  content: i,
2114
- type: jt.Success,
2119
+ type: Yt.Success,
2115
2120
  duration: 2e3
2116
2121
  });
2117
2122
  }
@@ -2121,18 +2126,18 @@ function Xi() {
2121
2126
  }
2122
2127
  );
2123
2128
  }
2124
- function zi() {
2125
- var E;
2126
- const t = D(X), e = D(G), r = D(j), s = M(t.filterBy$, void 0, !0), n = M(t.filterByModel$, void 0, !1), a = M(() => (n == null ? void 0 : n.canApply$) || de(!1), void 0, !1, [n]), i = Ji(e), o = !M(t.hasCriteria$), l = k((F) => {
2127
- r.executeCommand(qt.id, { filterBy: F });
2128
- }, [r]), c = k(async () => {
2129
- await (n == null ? void 0 : n.clear()), r.executeCommand(Ce.id);
2130
- }, [n, r]), h = k(() => {
2131
- r.executeCommand(Ce.id);
2132
- }, [r]), m = k(async () => {
2133
- await (n == null ? void 0 : n.apply()), r.executeCommand(Ce.id);
2134
- }, [n, r]), p = (E = D(z).activeFilterModel) == null ? void 0 : E.getRange(), _ = t.col, S = xr(Ar.FILTER_PANEL_EMBED_POINT);
2135
- return /* @__PURE__ */ N(
2129
+ function Xi() {
2130
+ var F;
2131
+ const t = D(X), e = D(G), r = D(j), s = L(t.filterBy$, void 0, !0), n = L(t.filterByModel$, void 0, !1), a = L(() => (n == null ? void 0 : n.canApply$) || he(!1), void 0, !1, [n]), i = zi(e), o = !L(t.hasCriteria$), l = U((N) => {
2132
+ r.executeCommand(Xt.id, { filterBy: N });
2133
+ }, [r]), c = U(async () => {
2134
+ await (n == null ? void 0 : n.clear()), r.executeCommand(Se.id);
2135
+ }, [n, r]), h = U(() => {
2136
+ r.executeCommand(Se.id);
2137
+ }, [r]), f = U(async () => {
2138
+ await (n == null ? void 0 : n.apply()), r.executeCommand(Se.id);
2139
+ }, [n, r]), p = (F = D(z).activeFilterModel) == null ? void 0 : F.getRange(), _ = t.col, C = xr(Ar.FILTER_PANEL_EMBED_POINT);
2140
+ return /* @__PURE__ */ y(
2136
2141
  "div",
2137
2142
  {
2138
2143
  "data-u-comp": "sheets-filter-panel",
@@ -2141,16 +2146,16 @@ function zi() {
2141
2146
  /* @__PURE__ */ d(
2142
2147
  Ur,
2143
2148
  {
2144
- components: S,
2149
+ components: C,
2145
2150
  sharedProps: { range: p, colIndex: _, onClose: h }
2146
2151
  }
2147
2152
  ),
2148
2153
  /* @__PURE__ */ d("div", { className: "univer-mb-1 univer-flex-shrink-0 univer-flex-grow-0", children: /* @__PURE__ */ d(
2149
- mi,
2154
+ fi,
2150
2155
  {
2151
2156
  value: s,
2152
2157
  items: i,
2153
- onChange: (F) => l(F)
2158
+ onChange: (N) => l(N)
2154
2159
  }
2155
2160
  ) }),
2156
2161
  n ? /* @__PURE__ */ d(
@@ -2158,20 +2163,20 @@ function zi() {
2158
2163
  {
2159
2164
  "data-u-comp": "sheets-filter-panel-content",
2160
2165
  className: "univer-flex-shrink univer-flex-grow univer-pt-2",
2161
- children: s === P.VALUES ? /* @__PURE__ */ d(qi, { model: n }) : s === P.COLORS ? /* @__PURE__ */ d(ji, { model: n }) : /* @__PURE__ */ d(Yi, { model: n })
2166
+ children: s === w.VALUES ? /* @__PURE__ */ d(Ki, { model: n }) : s === w.COLORS ? /* @__PURE__ */ d(Gi, { model: n }) : /* @__PURE__ */ d(ji, { model: n })
2162
2167
  }
2163
2168
  ) : /* @__PURE__ */ d("div", { className: "univer-flex-1" }),
2164
- /* @__PURE__ */ d(Xi, {}),
2165
- /* @__PURE__ */ N(
2169
+ /* @__PURE__ */ d(qi, {}),
2170
+ /* @__PURE__ */ y(
2166
2171
  "div",
2167
2172
  {
2168
2173
  "data-u-comp": "sheets-filter-panel-footer",
2169
2174
  className: "univer-mt-4 univer-inline-flex univer-flex-shrink-0 univer-flex-grow-0 univer-flex-nowrap univer-justify-between univer-overflow-hidden",
2170
2175
  children: [
2171
- /* @__PURE__ */ d(Ye, { variant: "link", onClick: c, disabled: o, children: e.t("sheets-filter.panel.clear-filter") }),
2172
- /* @__PURE__ */ N("span", { className: "univer-flex univer-gap-2", children: [
2173
- /* @__PURE__ */ d(Ye, { variant: "default", onClick: h, children: e.t("sheets-filter.panel.cancel") }),
2174
- /* @__PURE__ */ d(Ye, { disabled: !a, variant: "primary", onClick: m, children: e.t("sheets-filter.panel.confirm") })
2176
+ /* @__PURE__ */ d(Ze, { variant: "link", onClick: c, disabled: o, children: e.t("sheets-filter.panel.clear-filter") }),
2177
+ /* @__PURE__ */ y("span", { className: "univer-flex univer-gap-2", children: [
2178
+ /* @__PURE__ */ d(Ze, { variant: "default", onClick: h, children: e.t("sheets-filter.panel.cancel") }),
2179
+ /* @__PURE__ */ d(Ze, { disabled: !a, variant: "primary", onClick: f, children: e.t("sheets-filter.panel.confirm") })
2175
2180
  ] })
2176
2181
  ]
2177
2182
  }
@@ -2180,136 +2185,136 @@ function zi() {
2180
2185
  }
2181
2186
  );
2182
2187
  }
2183
- function Ji(t) {
2188
+ function zi(t) {
2184
2189
  const e = t.getCurrentLocale();
2185
- return ct(() => [
2186
- { label: t.t("sheets-filter.panel.by-values"), value: P.VALUES },
2187
- { label: t.t("sheets-filter.panel.by-colors"), value: P.COLORS },
2188
- { label: t.t("sheets-filter.panel.by-conditions"), value: P.CONDITIONS }
2190
+ return ut(() => [
2191
+ { label: t.t("sheets-filter.panel.by-values"), value: w.VALUES },
2192
+ { label: t.t("sheets-filter.panel.by-colors"), value: w.COLORS },
2193
+ { label: t.t("sheets-filter.panel.by-conditions"), value: w.CONDITIONS }
2189
2194
  ], [e, t]);
2190
2195
  }
2191
- function es(t) {
2196
+ function Ji(t) {
2192
2197
  const e = t.get(z);
2193
2198
  return {
2194
- id: Ne.id,
2195
- type: ot.BUTTON_SELECTOR,
2199
+ id: Fe.id,
2200
+ type: lt.BUTTON_SELECTOR,
2196
2201
  icon: "FilterIcon",
2197
2202
  tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
2198
- hidden$: nt(t, ie.UNIVER_SHEET),
2199
- activated$: e.activeFilterModel$.pipe(ae((r) => !!r)),
2203
+ hidden$: ot(t, ie.UNIVER_SHEET),
2204
+ activated$: e.activeFilterModel$.pipe(le((r) => !!r)),
2200
2205
  disabled$: wr(
2201
2206
  t,
2202
2207
  Pr(
2203
2208
  t,
2204
2209
  {
2205
- worksheetTypes: [ve, _e],
2206
- rangeTypes: [ge]
2210
+ worksheetTypes: [pe, ve],
2211
+ rangeTypes: [_e]
2207
2212
  }
2208
2213
  )
2209
2214
  )
2210
2215
  };
2211
2216
  }
2212
- function ts(t) {
2217
+ function es(t) {
2213
2218
  const e = t.get(z);
2214
2219
  return {
2215
- id: st.id,
2216
- type: ot.BUTTON,
2220
+ id: nt.id,
2221
+ type: lt.BUTTON,
2217
2222
  title: "sheets-filter.toolbar.clear-filter-criteria",
2218
- hidden$: nt(t, ie.UNIVER_SHEET),
2219
- disabled$: e.activeFilterModel$.pipe(lt((r) => {
2223
+ hidden$: ot(t, ie.UNIVER_SHEET),
2224
+ disabled$: e.activeFilterModel$.pipe(at((r) => {
2220
2225
  var s;
2221
- return (s = r == null ? void 0 : r.hasCriteria$.pipe(ae((n) => !n))) != null ? s : de(!0);
2226
+ return (s = r == null ? void 0 : r.hasCriteria$.pipe(le((n) => !n))) != null ? s : he(!0);
2222
2227
  }))
2223
2228
  };
2224
2229
  }
2225
- function rs(t) {
2230
+ function ts(t) {
2226
2231
  const e = t.get(z);
2227
2232
  return {
2228
- id: it.id,
2229
- type: ot.BUTTON,
2233
+ id: st.id,
2234
+ type: lt.BUTTON,
2230
2235
  title: "sheets-filter.toolbar.re-calc-filter-conditions",
2231
- hidden$: nt(t, ie.UNIVER_SHEET),
2232
- disabled$: e.activeFilterModel$.pipe(lt((r) => {
2236
+ hidden$: ot(t, ie.UNIVER_SHEET),
2237
+ disabled$: e.activeFilterModel$.pipe(at((r) => {
2233
2238
  var s;
2234
- return (s = r == null ? void 0 : r.hasCriteria$.pipe(ae((n) => !n))) != null ? s : de(!0);
2239
+ return (s = r == null ? void 0 : r.hasCriteria$.pipe(le((n) => !n))) != null ? s : he(!0);
2235
2240
  }))
2236
2241
  };
2237
2242
  }
2238
- const is = {
2243
+ const rs = {
2239
2244
  [kr.ORGANIZATION]: {
2240
- [Ne.id]: {
2245
+ [Fe.id]: {
2241
2246
  order: 2,
2242
- menuItemFactory: es,
2243
- [st.id]: {
2247
+ menuItemFactory: Ji,
2248
+ [nt.id]: {
2244
2249
  order: 0,
2245
- menuItemFactory: ts
2250
+ menuItemFactory: es
2246
2251
  },
2247
- [it.id]: {
2252
+ [st.id]: {
2248
2253
  order: 1,
2249
- menuItemFactory: rs
2254
+ menuItemFactory: ts
2250
2255
  }
2251
2256
  }
2252
2257
  }
2253
- }, ss = {
2254
- id: Ne.id,
2255
- binding: Hr.L | _t.CTRL_COMMAND | _t.SHIFT,
2258
+ }, is = {
2259
+ id: Fe.id,
2260
+ binding: Hr.L | gt.CTRL_COMMAND | gt.SHIFT,
2256
2261
  description: "sheets-filter.shortcut.smart-toggle-filter",
2257
2262
  preconditions: $r,
2258
2263
  group: "4_sheet-edit"
2259
2264
  };
2260
- var ns = Object.getOwnPropertyDescriptor, os = (t, e, r, s) => {
2261
- for (var n = s > 1 ? void 0 : s ? ns(e, r) : e, a = t.length - 1, i; a >= 0; a--)
2265
+ var ss = Object.getOwnPropertyDescriptor, ns = (t, e, r, s) => {
2266
+ for (var n = s > 1 ? void 0 : s ? ss(e, r) : e, a = t.length - 1, i; a >= 0; a--)
2262
2267
  (i = t[a]) && (n = i(n) || n);
2263
2268
  return n;
2264
- }, L = (t, e) => (r, s) => e(r, s, t);
2265
- const bt = "FILTER_PANEL_POPUP";
2266
- let ke = class extends Fe {
2267
- constructor(e, r, s, n, a, i, o, l, c, h, m, C, p) {
2268
- super(p, C);
2269
+ }, $ = (t, e) => (r, s) => e(r, s, t);
2270
+ const Rt = "FILTER_PANEL_POPUP";
2271
+ let ke = class extends Ee {
2272
+ constructor(e, r, s, n, a, i, o, l, c, h, f, S, p) {
2273
+ super(p, S);
2269
2274
  v(this, "_popupDisposable");
2270
- this._injector = e, this._componentManager = r, this._sheetsFilterPanelService = s, this._sheetCanvasPopupService = n, this._sheetsFilterService = a, this._localeService = i, this._shortcutService = o, this._commandService = l, this._menuManagerService = c, this._contextService = h, this._messageService = m, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI();
2275
+ this._injector = e, this._componentManager = r, this._sheetsFilterPanelService = s, this._sheetCanvasPopupService = n, this._sheetsFilterService = a, this._localeService = i, this._shortcutService = o, this._commandService = l, this._menuManagerService = c, this._contextService = h, this._messageService = f, this._initCommands(), this._initShortcuts(), this._initMenuItems(), this._initUI();
2271
2276
  }
2272
2277
  dispose() {
2273
2278
  super.dispose(), this._closeFilterPopup();
2274
2279
  }
2275
2280
  _initShortcuts() {
2276
2281
  [
2277
- ss
2282
+ is
2278
2283
  ].forEach((e) => {
2279
2284
  this.disposeWithMe(this._shortcutService.registerShortcut(e));
2280
2285
  });
2281
2286
  }
2282
2287
  _initCommands() {
2283
2288
  [
2284
- Ne,
2289
+ Fe,
2285
2290
  Er,
2286
2291
  Fr,
2287
2292
  V,
2293
+ nt,
2288
2294
  st,
2289
- it,
2290
- qt,
2295
+ Xt,
2291
2296
  Me,
2292
- Ce
2297
+ Se
2293
2298
  ].forEach((e) => {
2294
2299
  this.disposeWithMe(this._commandService.registerCommand(e));
2295
2300
  });
2296
2301
  }
2297
2302
  _initMenuItems() {
2298
- this._menuManagerService.mergeMenu(is);
2303
+ this._menuManagerService.mergeMenu(rs);
2299
2304
  }
2300
2305
  _initUI() {
2301
2306
  [
2302
- [bt, zi],
2303
- ["FilterIcon", rr]
2307
+ [Rt, Xi],
2308
+ ["FilterIcon", ir]
2304
2309
  ].forEach(([e, r]) => {
2305
2310
  this.disposeWithMe(
2306
2311
  this._componentManager.register(e, r)
2307
2312
  );
2308
- }), this.disposeWithMe(this._contextService.subscribeContextValue$(ce).pipe(ni()).subscribe((e) => {
2313
+ }), this.disposeWithMe(this._contextService.subscribeContextValue$(ae).pipe(ni()).subscribe((e) => {
2309
2314
  e ? this._openFilterPopup() : this._closeFilterPopup();
2310
2315
  })), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((e) => {
2311
2316
  e && this._messageService.show({
2312
- type: jt.Error,
2317
+ type: Yt.Error,
2313
2318
  content: this._localeService.t(e)
2314
2319
  });
2315
2320
  }));
@@ -2320,9 +2325,9 @@ let ke = class extends Fe {
2320
2325
  throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
2321
2326
  const r = e.getRange(), s = this._sheetsFilterPanelService.col, { startRow: n } = r;
2322
2327
  this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(n, s, {
2323
- componentKey: bt,
2328
+ componentKey: Rt,
2324
2329
  direction: "horizontal",
2325
- onClickOutside: () => this._commandService.syncExecuteCommand(Ce.id),
2330
+ onClickOutside: () => this._commandService.syncExecuteCommand(Se.id),
2326
2331
  offset: [5, 0]
2327
2332
  });
2328
2333
  }
@@ -2331,97 +2336,97 @@ let ke = class extends Fe {
2331
2336
  (e = this._popupDisposable) == null || e.dispose(), this._popupDisposable = null;
2332
2337
  }
2333
2338
  };
2334
- ke = os([
2335
- L(0, T(re)),
2336
- L(1, T(Dr)),
2337
- L(2, T(X)),
2338
- L(3, T(Lr)),
2339
- L(4, T(z)),
2340
- L(5, T(G)),
2341
- L(6, Br),
2342
- L(7, j),
2343
- L(8, Wr),
2344
- L(9, We),
2345
- L(10, Dt),
2346
- L(11, T(Ht)),
2347
- L(12, Bt)
2339
+ ke = ns([
2340
+ $(0, T(re)),
2341
+ $(1, T(Dr)),
2342
+ $(2, T(X)),
2343
+ $(3, T(Lr)),
2344
+ $(4, T(z)),
2345
+ $(5, T(G)),
2346
+ $(6, Br),
2347
+ $(7, j),
2348
+ $(8, Wr),
2349
+ $(9, We),
2350
+ $(10, Bt),
2351
+ $(11, T(Dt)),
2352
+ $(12, Wt)
2348
2353
  ], ke);
2349
- var ls = Object.defineProperty, as = Object.getOwnPropertyDescriptor, cs = (t, e, r) => e in t ? ls(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, us = (t, e, r, s) => {
2350
- for (var n = s > 1 ? void 0 : s ? as(e, r) : e, a = t.length - 1, i; a >= 0; a--)
2354
+ var os = Object.defineProperty, ls = Object.getOwnPropertyDescriptor, as = (t, e, r) => e in t ? os(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, cs = (t, e, r, s) => {
2355
+ for (var n = s > 1 ? void 0 : s ? ls(e, r) : e, a = t.length - 1, i; a >= 0; a--)
2351
2356
  (i = t[a]) && (n = i(n) || n);
2352
2357
  return n;
2353
- }, qe = (t, e) => (r, s) => e(r, s, t), nr = (t, e, r) => cs(t, typeof e != "symbol" ? e + "" : e, r);
2354
- const hs = "SHEET_FILTER_UI_PLUGIN";
2355
- let He = class extends rt {
2358
+ }, Xe = (t, e) => (r, s) => e(r, s, t), or = (t, e, r) => as(t, typeof e != "symbol" ? e + "" : e, r);
2359
+ const us = "SHEET_FILTER_UI_PLUGIN";
2360
+ let He = class extends it {
2356
2361
  constructor(t = xe, e, r, s) {
2357
2362
  super(), this._config = t, this._injector = e, this._configService = r, this._rpcChannelService = s;
2358
- const { menu: n, ...a } = Ut(
2363
+ const { menu: n, ...a } = kt(
2359
2364
  {},
2360
2365
  xe,
2361
2366
  this._config
2362
2367
  );
2363
- n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(Xt, a);
2368
+ n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(zt, a);
2364
2369
  }
2365
2370
  onStarting() {
2366
2371
  pr(this._injector, [
2367
2372
  [X],
2368
- [ue],
2373
+ [ce],
2369
2374
  [ke]
2370
2375
  ]), this._config.useRemoteFilterValuesGenerator && this._rpcChannelService && this._injector.add([we, {
2371
2376
  useFactory: () => oi(
2372
- this._rpcChannelService.requestChannel(ut)
2377
+ this._rpcChannelService.requestChannel(ht)
2373
2378
  )
2374
2379
  }]);
2375
2380
  }
2376
2381
  onReady() {
2377
- pt(this._injector, [
2378
- [ue]
2382
+ vt(this._injector, [
2383
+ [ce]
2379
2384
  ]);
2380
2385
  }
2381
2386
  onRendered() {
2382
- pt(this._injector, [
2387
+ vt(this._injector, [
2383
2388
  [ke]
2384
2389
  ]);
2385
2390
  }
2386
2391
  };
2387
- nr(He, "type", ie.UNIVER_SHEET);
2388
- nr(He, "pluginName", hs);
2389
- He = us([
2390
- Mt(kt),
2391
- qe(1, T(re)),
2392
- qe(2, xt),
2393
- qe(3, fr(Qt))
2392
+ or(He, "type", ie.UNIVER_SHEET);
2393
+ or(He, "pluginName", us);
2394
+ He = cs([
2395
+ xt(Ht),
2396
+ Xe(1, T(re)),
2397
+ Xe(2, Ut),
2398
+ Xe(3, mr(Gt))
2394
2399
  ], He);
2395
- var ds = Object.getOwnPropertyDescriptor, ms = (t, e, r, s) => {
2396
- for (var n = s > 1 ? void 0 : s ? ds(e, r) : e, a = t.length - 1, i; a >= 0; a--)
2400
+ var hs = Object.getOwnPropertyDescriptor, ds = (t, e, r, s) => {
2401
+ for (var n = s > 1 ? void 0 : s ? hs(e, r) : e, a = t.length - 1, i; a >= 0; a--)
2397
2402
  (i = t[a]) && (n = i(n) || n);
2398
2403
  return n;
2399
- }, Rt = (t, e) => (r, s) => e(r, s, t), Oe;
2400
- let At = (Oe = class extends rt {
2404
+ }, At = (t, e) => (r, s) => e(r, s, t), Oe;
2405
+ let wt = (Oe = class extends it {
2401
2406
  constructor(t, e, r) {
2402
2407
  super(), this._config = t, this._injector = e, this._rpcChannelService = r;
2403
2408
  }
2404
2409
  onStarting() {
2405
2410
  [
2406
- [we, { useClass: ze }]
2411
+ [we, { useClass: Je }]
2407
2412
  ].forEach((t) => this._injector.add(t));
2408
2413
  }
2409
2414
  onReady() {
2410
2415
  this._rpcChannelService.registerChannel(
2411
- ut,
2416
+ ht,
2412
2417
  li(this._injector.get(we))
2413
2418
  );
2414
2419
  }
2415
2420
  }, v(Oe, "type", ie.UNIVER_SHEET), v(Oe, "pluginName", "SHEET_FILTER_UI_WORKER_PLUGIN"), Oe);
2416
- At = ms([
2417
- Rt(1, T(re)),
2418
- Rt(2, Qt)
2419
- ], At);
2421
+ wt = ds([
2422
+ At(1, T(re)),
2423
+ At(2, Gt)
2424
+ ], wt);
2420
2425
  export {
2421
- qt as ChangeFilterByOperation,
2422
- Ce as CloseFilterPanelOperation,
2426
+ Xt as ChangeFilterByOperation,
2427
+ Se as CloseFilterPanelOperation,
2423
2428
  Me as OpenFilterPanelOperation,
2424
2429
  Ue as UniverSheetsFilterMobileUIPlugin,
2425
2430
  He as UniverSheetsFilterUIPlugin,
2426
- At as UniverSheetsFilterUIWorkerPlugin
2431
+ wt as UniverSheetsFilterUIWorkerPlugin
2427
2432
  };