@univerjs/sheets-filter-ui 0.10.12 → 0.10.13

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
- var cr = Object.defineProperty;
2
- var ur = (t, e, r) => e in t ? cr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var v = (t, e, r) => ur(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { BooleanNumber as ft, createIdentifier as Pt, Inject as T, LocaleService as G, IUniverInstanceService as Be, ILogService as hr, extractPureTextFromCell as dr, numfmt as mt, Disposable as de, Injector as ie, Quantity as Lt, Tools as Re, ColorKit as pt, ICommandService as Y, CommandType as We, IContextService as Ve, ThemeService as Mt, RxDisposable as $t, fromCallback as fr, VerticalAlign as Ae, InterceptorEffectEnum as mr, UniverInstanceType as se, DependentOn as xt, IConfigService as Ut, Plugin as it, merge as kt, Optional as pr, registerDependencies as vr, touchDependencies as vt } from "@univerjs/core";
5
- import { CustomFilterOperator as u, FilterBy as P, SetSheetsFilterCriteriaCommand as Q, SheetsFilterService as J, SmartToggleSheetsFilterCommand as Oe, FILTER_MUTATIONS as _r, SetSheetsFilterRangeMutation as gr, SetSheetsFilterCriteriaMutation as Sr, RemoveSheetsFilterMutation as Cr, ReCalcSheetsFilterMutation as Tr, UniverSheetsFilterPlugin as Ht, SheetsFilterSyncController as Er, ReCalcSheetsFilterCommand as st, ClearSheetsFilterCriteriaCommand as nt, RemoveSheetFilterCommand as Nr, SetSheetFilterRangeCommand as Fr } from "@univerjs/sheets-filter";
6
- import { IEditorBridgeService as _t, SetCellEditVisibleOperation as yr, SheetSkeletonManagerService as Or, ISheetSelectionRenderService as Ir, SelectionControl as br, attachSelectionWithCoord as Rr, getCoordByCell as Ar, SheetsRenderService as Dt, SheetsUIPart as wr, getObservableWithExclusiveRange$ as Pr, getCurrentRangeDisable$ as Lr, whenSheetEditorFocused as Mr, SheetCanvasPopManagerService as $r } from "@univerjs/sheets-ui";
7
- import { ILayoutService as xr, useDependency as B, useObservable as x, IMessageService as Bt, useComponentsOfPart as Ur, ComponentContainer as kr, getMenuHiddenObservable as ot, MenuItemType as lt, RibbonDataGroup as Hr, KeyCode as Dr, MetaKeys as gt, ComponentManager as Br, IShortcutService as Wr, IMenuManagerService as Vr } from "@univerjs/ui";
8
- import { COLOR_BLACK_RGB as St, Rect as Ct, Shape as Qr, IRenderManagerService as Wt } from "@univerjs/engine-render";
9
- import { RefRangeService as jr, SheetPermissionCheckController as Gr, SheetsSelectionsService as Yr, getSheetCommandTarget as Zr, WorksheetFilterPermission as ge, WorksheetViewPermission as Se, RangeProtectionPermissionViewPoint as Ce, expandToContinuousRange as Kr, SheetInterceptorService as qr, SetRangeValuesMutation as Xr, INTERCEPTOR_POINT as zr } from "@univerjs/sheets";
10
- import { BehaviorSubject as j, ReplaySubject as Jr, Subject as ei, merge as ti, combineLatest as ri, throttleTime as Vt, startWith as Qt, map as ce, shareReplay as ii, of as fe, switchMap as at, filter as si, takeUntil as ni, distinctUntilChanged as oi } from "rxjs";
11
- import { IRPCChannelService as jt, toModule as li, fromModule as ai } from "@univerjs/rpc";
12
- import { clsx as we, borderClassName as ct, Select as Tt, RadioGroup as ci, Radio as Et, Input as Gt, Checkbox as ui, Tree as hi, Tooltip as di, Switch as fi, MessageType as Yt, Segmented as mi, Button as Ze } from "@univerjs/design";
13
- import { jsx as d, jsxs as F, Fragment as Nt } from "react/jsx-runtime";
14
- import { forwardRef as me, useRef as pi, createElement as pe, useCallback as H, useMemo as ut } from "react";
15
- var O = /* @__PURE__ */ ((t) => (t[t.FIRST = 0] = "FIRST", t[t.SECOND = 1] = "SECOND", t))(O || {}), g = /* @__PURE__ */ ((t) => (t.NONE = "none", t.STARTS_WITH = "startsWith", t.DOES_NOT_START_WITH = "doesNotStartWith", t.ENDS_WITH = "endsWith", t.DOES_NOT_END_WITH = "doesNotEndWith", t.CONTAINS = "contains", t.DOES_NOT_CONTAIN = "doesNotContain", t.EQUALS = "equals", t.NOT_EQUALS = "notEquals", t.EMPTY = "empty", t.NOT_EMPTY = "notEmpty", t.BETWEEN = "between", t.NOT_BETWEEN = "notBetween", t.CUSTOM = "custom", t))(g || {}), m;
1
+ var ar = Object.defineProperty;
2
+ var cr = (t, e, r) => e in t ? ar(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
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;
16
16
  ((t) => {
17
17
  t.NONE = {
18
18
  label: "sheets-filter.conditions.none",
19
19
  operator: g.NONE,
20
- order: O.SECOND,
20
+ order: I.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 O = /* @__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: O.SECOND,
31
+ order: I.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 O = /* @__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: O.SECOND,
48
+ order: I.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 O = /* @__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: O.FIRST,
65
+ order: I.FIRST,
66
66
  numOfParameters: 1,
67
67
  getDefaultFormParams: () => ({ operator1: g.CONTAINS, val1: "" }),
68
68
  testMappingParams: (i) => {
69
- const [o] = k(i);
69
+ const [o] = U(i);
70
70
  return o === g.CONTAINS;
71
71
  },
72
72
  mapToFilterColumn: (i) => {
@@ -85,14 +85,14 @@ var O = /* @__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: O.FIRST,
88
+ order: I.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] = k(i);
95
+ const [o] = U(i);
96
96
  return o === g.DOES_NOT_CONTAIN;
97
97
  },
98
98
  testMappingFilterColumn: (i) => {
@@ -105,14 +105,14 @@ var O = /* @__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: O.FIRST,
108
+ order: I.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] = k(i);
115
+ const [o] = U(i);
116
116
  return o === g.STARTS_WITH;
117
117
  },
118
118
  testMappingFilterColumn: (i) => {
@@ -125,14 +125,14 @@ var O = /* @__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: O.FIRST,
128
+ order: I.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] = k(i);
135
+ const [o] = U(i);
136
136
  return o === g.ENDS_WITH;
137
137
  },
138
138
  testMappingFilterColumn: (i) => {
@@ -145,11 +145,11 @@ var O = /* @__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: O.FIRST,
148
+ order: I.FIRST,
149
149
  numOfParameters: 1,
150
150
  getDefaultFormParams: () => ({ operator1: g.EQUALS, val1: "" }),
151
151
  testMappingParams: (i) => {
152
- const [o] = k(i);
152
+ const [o] = U(i);
153
153
  return o === g.EQUALS;
154
154
  },
155
155
  mapToFilterColumn: (i) => {
@@ -166,13 +166,13 @@ var O = /* @__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: O.FIRST,
169
+ order: I.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] = k(i);
175
+ const [o] = U(i);
176
176
  return o === u.GREATER_THAN;
177
177
  },
178
178
  testMappingFilterColumn: (i) => {
@@ -186,10 +186,10 @@ var O = /* @__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: O.FIRST,
189
+ order: I.FIRST,
190
190
  getDefaultFormParams: () => ({ operator1: u.GREATER_THAN_OR_EQUAL, val1: "" }),
191
191
  testMappingParams: (i) => {
192
- const [o] = k(i);
192
+ const [o] = U(i);
193
193
  return o === u.GREATER_THAN_OR_EQUAL;
194
194
  },
195
195
  mapToFilterColumn: (i) => ({
@@ -206,10 +206,10 @@ var O = /* @__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: O.FIRST,
209
+ order: I.FIRST,
210
210
  getDefaultFormParams: () => ({ operator1: u.LESS_THAN, val1: "" }),
211
211
  testMappingParams: (i) => {
212
- const [o] = k(i);
212
+ const [o] = U(i);
213
213
  return o === u.LESS_THAN;
214
214
  },
215
215
  mapToFilterColumn: (i) => ({
@@ -226,10 +226,10 @@ var O = /* @__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: O.FIRST,
229
+ order: I.FIRST,
230
230
  getDefaultFormParams: () => ({ operator1: u.LESS_THAN_OR_EQUAL, val1: "" }),
231
231
  testMappingParams: (i) => {
232
- const [o] = k(i);
232
+ const [o] = U(i);
233
233
  return o === u.LESS_THAN_OR_EQUAL;
234
234
  },
235
235
  mapToFilterColumn: (i) => ({
@@ -246,10 +246,10 @@ var O = /* @__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: O.FIRST,
249
+ order: I.FIRST,
250
250
  getDefaultFormParams: () => ({ operator1: u.EQUAL, val1: "" }),
251
251
  testMappingParams: (i) => {
252
- const [o] = k(i);
252
+ const [o] = U(i);
253
253
  return o === u.EQUAL;
254
254
  },
255
255
  mapToFilterColumn: (i) => ({
@@ -266,10 +266,10 @@ var O = /* @__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: O.FIRST,
269
+ order: I.FIRST,
270
270
  getDefaultFormParams: () => ({ operator1: u.NOT_EQUALS, val1: "" }),
271
271
  testMappingParams: (i) => {
272
- const [o] = k(i);
272
+ const [o] = U(i);
273
273
  return o === u.NOT_EQUALS;
274
274
  },
275
275
  mapToFilterColumn: (i) => ({
@@ -285,7 +285,7 @@ var O = /* @__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: O.SECOND,
288
+ order: I.SECOND,
289
289
  numOfParameters: 2,
290
290
  getDefaultFormParams: () => ({
291
291
  and: !0,
@@ -304,7 +304,7 @@ var O = /* @__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: ft.TRUE,
307
+ and: dt.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 O = /* @__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: O.SECOND,
337
+ order: I.SECOND,
338
338
  numOfParameters: 2,
339
339
  getDefaultFormParams: () => ({
340
340
  operator1: u.LESS_THAN,
@@ -379,7 +379,7 @@ var O = /* @__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: O.SECOND,
382
+ order: I.SECOND,
383
383
  numOfParameters: 2,
384
384
  getDefaultFormParams: () => ({
385
385
  operator1: g.NONE,
@@ -389,26 +389,26 @@ var O = /* @__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: f } = i;
392
+ const { and: o, val1: l, val2: c, operator1: h, operator2: m } = i;
393
393
  function C(b, y) {
394
394
  for (const R of t.ALL_CONDITIONS)
395
395
  if (R.operator === b)
396
396
  return R.mapToFilterColumn({ val1: y, operator1: b });
397
397
  }
398
- const p = !h || h === t.NONE.operator, _ = !f || f === t.NONE.operator;
398
+ const p = !h || h === t.NONE.operator, _ = !m || m === t.NONE.operator;
399
399
  if (p && _)
400
400
  return t.NONE.mapToFilterColumn({});
401
401
  if (p)
402
- return C(f, c);
402
+ return C(m, c);
403
403
  if (_)
404
404
  return C(h, l);
405
- const S = C(h, l), E = C(f, c), N = {
405
+ const S = C(h, l), E = C(m, c), F = {
406
406
  customFilters: [
407
407
  S.customFilters.customFilters[0],
408
408
  E.customFilters.customFilters[0]
409
409
  ]
410
410
  };
411
- return o && (N.and = ft.TRUE), { customFilters: N };
411
+ return o && (F.and = dt.TRUE), { customFilters: F };
412
412
  },
413
413
  testMappingFilterColumn: (i) => {
414
414
  var c;
@@ -483,8 +483,8 @@ var O = /* @__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
- })(m || (m = {}));
487
- function k(t) {
486
+ })(f || (f = {}));
487
+ function U(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 k(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 ze(t) {
495
+ function Xe(t) {
496
496
  const e = [], r = [];
497
497
  let s = 0, n = 0;
498
498
  function a(i) {
@@ -505,20 +505,20 @@ function ze(t) {
505
505
  unchecked: n
506
506
  };
507
507
  }
508
- var vi = Object.getOwnPropertyDescriptor, _i = (t, e, r, s) => {
509
- for (var n = s > 1 ? void 0 : s ? vi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
508
+ var pi = Object.getOwnPropertyDescriptor, vi = (t, e, r, s) => {
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
- }, Ke = (t, e) => (r, s) => e(r, s, t);
513
- const ht = "sheets-filter.generate-filter-values.service", Pe = Pt(ht), gi = ["yyyy-mm-dd", "yyyy-mm-dd;@", "yyyy/mm/dd;@", "yyyy/mm/dd hh:mm", "yyyy-m-d am/pm h:mm", "yyyy-MM-dd", "yyyy/MM/dd", "yyyy/mm/dd", 'yyyy"年"MM"月"dd"日"', "MM-dd", 'M"月"d"日"', "MM-dd A/P hh:mm"];
514
- let Je = class extends de {
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 {
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 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(
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(
522
522
  a,
523
523
  this._localeService,
524
524
  o,
@@ -531,76 +531,76 @@ let Je = class extends de {
531
531
  ));
532
532
  }
533
533
  };
534
- Je = _i([
535
- Ke(0, T(G)),
536
- Ke(1, Be),
537
- Ke(2, hr)
538
- ], Je);
539
- function Zt(t, e, r, s, n, a, i, o, l) {
540
- var N, b, y, R, L, Z, K, ne, U, A;
541
- const c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), f = "yyyy-mm-dd", C = new Set(gi), p = "empty", _ = !t && ((a == null ? void 0 : a.filterBy) === P.COLORS || (a == null ? void 0 : a.filterBy) === P.CONDITIONS) && ((N = a.filteredOutRows) == null ? void 0 : N.size);
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
542
  let S = 0;
543
543
  for (const w of s.iterateByColumn(r, !1, !1)) {
544
- const { row: je, rowSpan: dt = 1 } = w;
545
- let oe = 0;
546
- for (; oe < dt; ) {
547
- const lr = je + oe;
548
- if (n.has(lr)) {
549
- oe++;
544
+ const { row: Qe, rowSpan: ht = 1 } = w;
545
+ let ne = 0;
546
+ for (; ne < ht; ) {
547
+ const or = Qe + ne;
548
+ if (n.has(or)) {
549
+ ne++;
550
550
  continue;
551
551
  }
552
- const ee = w != null && w.value ? dr(w.value) : "";
553
- if (!ee) {
554
- S += 1, oe += dt;
552
+ const J = w != null && w.value ? hr(w.value) : "";
553
+ if (!J) {
554
+ S += 1, ne += ht;
555
555
  continue;
556
556
  }
557
- const Ie = (b = w.value) != null && b.v && !w.value.p ? (L = (R = l.get((y = w.value) == null ? void 0 : y.s)) == null ? void 0 : R.n) == null ? void 0 : L.pattern : "", ar = Ie && mt.getFormatInfo(Ie).isDate;
558
- if (Ie && ar && C.has(Ie)) {
559
- const q = (Z = s.getCellRaw(w.row, w.col)) == null ? void 0 : Z.v;
560
- if (!q) {
561
- oe++;
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) {
561
+ ne++;
562
562
  continue;
563
563
  }
564
- const le = mt.format(f, q), [I, D, _e] = le.split("-").map(Number);
565
- let te = c.get(`${I}`);
566
- te || (te = {
567
- title: `${I}`,
568
- key: `${I}`,
564
+ const oe = mt.format(m, K), [O, H, pe] = oe.split("-").map(Number);
565
+ let ee = c.get(`${O}`);
566
+ ee || (ee = {
567
+ title: `${O}`,
568
+ key: `${O}`,
569
569
  children: [],
570
570
  count: 0,
571
571
  leaf: !1,
572
572
  checked: !1
573
- }, c.set(`${I}`, te), h.set(`${I}`, [`${I}`]));
574
- let V = (K = te.children) == null ? void 0 : K.find((Ye) => Ye.key === `${I}-${D}`);
575
- V || (V = {
576
- title: e.t(`sheets-filter.date.${D}`),
577
- key: `${I}-${D}`,
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}`);
575
+ W || (W = {
576
+ title: e.t(`sheets-filter.date.${H}`),
577
+ key: `${O}-${H}`,
578
578
  children: [],
579
579
  count: 0,
580
580
  leaf: !1,
581
581
  checked: !1
582
- }, (ne = te.children) == null || ne.push(V), h.set(`${I}-${D}`, [`${I}`, `${I}-${D}`]));
583
- const Ge = (U = V == null ? void 0 : V.children) == null ? void 0 : U.find((Ye) => Ye.key === `${I}-${D}-${_e}`);
584
- Ge ? (Ge.originValues.add(ee), Ge.count++, V.count++, te.count++) : ((A = V.children) == null || A.push({
585
- title: `${_e}`,
586
- key: `${I}-${D}-${_e}`,
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
587
  count: 1,
588
- originValues: /* @__PURE__ */ new Set([ee]),
588
+ originValues: /* @__PURE__ */ new Set([J]),
589
589
  leaf: !0,
590
- checked: _ ? !1 : i.size ? i.has(ee) : !o
591
- }), V.count++, te.count++, h.set(`${I}-${D}-${_e}`, [`${I}`, `${I}-${D}`, `${I}-${D}-${_e}`]));
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}`]));
592
592
  } else {
593
- const q = ee;
594
- let le = c.get(q);
595
- le ? le.count++ : (le = {
596
- title: ee,
593
+ const K = J;
594
+ let oe = c.get(K);
595
+ oe ? oe.count++ : (oe = {
596
+ title: J,
597
597
  leaf: !0,
598
- checked: _ ? !1 : i.size ? i.has(ee) : !o,
599
- key: q,
598
+ checked: _ ? !1 : i.size ? i.has(J) : !o,
599
+ key: K,
600
600
  count: 1
601
- }, c.set(q, le), h.set(q, [q]));
601
+ }, c.set(K, oe), h.set(K, [K]));
602
602
  }
603
- oe++;
603
+ ne++;
604
604
  }
605
605
  }
606
606
  const E = _ ? !1 : t ? o : !0;
@@ -615,12 +615,12 @@ function Zt(t, e, r, s, n, a, i, o, l) {
615
615
  c.set("empty", w), h.set("empty", [p]);
616
616
  }
617
617
  return {
618
- filterTreeItems: Si(Array.from(c.values())),
618
+ filterTreeItems: gi(Array.from(c.values())),
619
619
  filterTreeMapCache: h
620
620
  };
621
621
  }
622
- function Si(t) {
623
- return Array.from(t).sort((e, r) => e.children && !r.children ? -1 : !e.children && r.children ? 1 : Ci(e.title, r.title)).map((e) => (e.children && e.children.sort((r, s) => {
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) => {
624
624
  const n = Number.parseInt(r.key.split("-")[1], 10), a = Number.parseInt(s.key.split("-")[1], 10);
625
625
  return n - a;
626
626
  }).forEach((r) => {
@@ -631,29 +631,29 @@ function Si(t) {
631
631
  }), e));
632
632
  }
633
633
  const Ft = (t) => !Number.isNaN(Number(t)) && !Number.isNaN(Number.parseFloat(t));
634
- function Ci(t, e) {
634
+ function Si(t, e) {
635
635
  const r = Ft(t), s = Ft(e);
636
636
  return r && s ? Number.parseFloat(t) - Number.parseFloat(e) : r && !s ? -1 : !r && s ? 1 : t.localeCompare(e);
637
637
  }
638
- function et(t, e) {
638
+ function Je(t, e) {
639
639
  for (const r of t) {
640
640
  if (r.key === e)
641
641
  return r;
642
642
  if (r.children) {
643
- const s = et(r.children, e);
643
+ const s = Je(r.children, e);
644
644
  if (s)
645
645
  return s;
646
646
  }
647
647
  }
648
648
  return null;
649
649
  }
650
- function Kt(t) {
651
- return t.leaf ? t.checked : t.children ? t.children.every((e) => Kt(e)) : !0;
650
+ function Zt(t) {
651
+ return t.leaf ? t.checked : t.children ? t.children.every((e) => Zt(e)) : !0;
652
652
  }
653
- function Te(t, e) {
654
- t.leaf && (e !== void 0 ? t.checked = e : t.checked = !t.checked), t.children && t.children.forEach((r) => Te(r, e));
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));
655
655
  }
656
- function qt(t, e) {
656
+ function Kt(t, e) {
657
657
  const r = [];
658
658
  return t.forEach((s) => {
659
659
  const n = s.originValues ? e.some(
@@ -666,7 +666,7 @@ function qt(t, e) {
666
666
  if (n || a)
667
667
  r.push({ ...s });
668
668
  else if (s.children) {
669
- const o = qt(s.children, e);
669
+ const o = Kt(s.children, e);
670
670
  if (o.length > 0) {
671
671
  const l = o.reduce((c, h) => c + h.count, 0);
672
672
  r.push({ ...s, count: l, children: o });
@@ -674,24 +674,24 @@ function qt(t, e) {
674
674
  }
675
675
  }), r;
676
676
  }
677
- var Ti = Object.getOwnPropertyDescriptor, Qe = (t, e, r, s) => {
678
- for (var n = s > 1 ? void 0 : s ? Ti(e, r) : e, a = t.length - 1, i; a >= 0; a--)
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--)
679
679
  (i = t[a]) && (n = i(n) || n);
680
680
  return n;
681
- }, Fe = (t, e) => (r, s) => e(r, s, t);
682
- Pt("sheets-filter-ui.sheets-filter-panel.service");
683
- let z = class extends de {
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 {
684
684
  constructor(e, r) {
685
685
  super();
686
- v(this, "_filterBy$", new j(P.VALUES));
686
+ v(this, "_filterBy$", new Q(P.VALUES));
687
687
  v(this, "filterBy$", this._filterBy$.asObservable());
688
- v(this, "_filterByModel$", new Jr(1));
688
+ v(this, "_filterByModel$", new zr(1));
689
689
  v(this, "filterByModel$", this._filterByModel$.asObservable());
690
690
  v(this, "_filterByModel", null);
691
- v(this, "_hasCriteria$", new j(!1));
691
+ v(this, "_hasCriteria$", new Q(!1));
692
692
  v(this, "hasCriteria$", this._hasCriteria$.asObservable());
693
693
  v(this, "_filterModel", null);
694
- v(this, "_col$", new j(-1));
694
+ v(this, "_col$", new Q(-1));
695
695
  v(this, "col$", this._col$.asObservable());
696
696
  v(this, "_filterHeaderListener", null);
697
697
  this._injector = e, this._refRangeService = r;
@@ -780,7 +780,7 @@ let z = class extends de {
780
780
  this._disposePreviousModel();
781
781
  const s = e.getRange();
782
782
  if (s.startRow === s.endRow) return !1;
783
- const n = await Me.fromFilterColumn(
783
+ const n = await $e.fromFilterColumn(
784
784
  this._injector,
785
785
  e,
786
786
  r
@@ -791,7 +791,7 @@ let z = class extends de {
791
791
  this._disposePreviousModel();
792
792
  const s = e.getRange();
793
793
  if (s.startRow === s.endRow) return !1;
794
- const n = await $e.fromFilterColumn(
794
+ const n = await Le.fromFilterColumn(
795
795
  this._injector,
796
796
  e,
797
797
  r
@@ -802,7 +802,7 @@ let z = class extends de {
802
802
  this._disposePreviousModel();
803
803
  const s = e.getRange();
804
804
  if (s.startRow === s.endRow) return !1;
805
- const n = Le.fromFilterColumn(
805
+ const n = Pe.fromFilterColumn(
806
806
  this._injector,
807
807
  e,
808
808
  r,
@@ -815,19 +815,19 @@ let z = class extends de {
815
815
  (e = this._filterByModel) == null || e.dispose(), this.filterByModel = null;
816
816
  }
817
817
  };
818
- z = Qe([
819
- Fe(0, T(ie)),
820
- Fe(1, T(jr))
821
- ], z);
822
- let Le = class extends de {
818
+ X = Ve([
819
+ Ee(0, T(re)),
820
+ Ee(1, T(Qr))
821
+ ], X);
822
+ let Pe = class extends he {
823
823
  constructor(e, r, s, n, a) {
824
824
  super();
825
- v(this, "canApply$", fe(!0));
825
+ v(this, "canApply$", de(!0));
826
826
  v(this, "_conditionItem$");
827
827
  v(this, "conditionItem$");
828
828
  v(this, "_filterConditionFormParams$");
829
829
  v(this, "filterConditionFormParams$");
830
- this._filterModel = e, this.col = r, this._commandService = a, this._conditionItem$ = new j(s), this.conditionItem$ = this._conditionItem$.asObservable(), this._filterConditionFormParams$ = new j(n), this.filterConditionFormParams$ = this._filterConditionFormParams$.asObservable();
830
+ this._filterModel = e, this.col = r, this._commandService = a, this._conditionItem$ = new Q(s), this.conditionItem$ = this._conditionItem$.asObservable(), this._filterConditionFormParams$ = new Q(n), this.filterConditionFormParams$ = this._filterConditionFormParams$.asObservable();
831
831
  }
832
832
  /**
833
833
  * Create a model with targeting filter column. If there is not a filter column, the model would be created with
@@ -841,8 +841,8 @@ let Le = class extends de {
841
841
  * @returns the model to control the panel's state
842
842
  */
843
843
  static fromFilterColumn(e, r, s, n) {
844
- const [a, i] = m.testMappingFilterColumn(n == null ? void 0 : n.getColumnData());
845
- return e.createInstance(Le, r, s, a, i);
844
+ const [a, i] = f.testMappingFilterColumn(n == null ? void 0 : n.getColumnData());
845
+ return e.createInstance(Pe, r, s, a, i);
846
846
  }
847
847
  get conditionItem() {
848
848
  return this._conditionItem$.getValue();
@@ -857,7 +857,7 @@ let Le = class extends de {
857
857
  this.col += e;
858
858
  }
859
859
  clear() {
860
- return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(Q.id, {
860
+ return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(V.id, {
861
861
  unitId: this._filterModel.unitId,
862
862
  subUnitId: this._filterModel.subUnitId,
863
863
  col: this.col,
@@ -869,8 +869,8 @@ let Le = class extends de {
869
869
  */
870
870
  async apply() {
871
871
  if (this._disposed) return !1;
872
- const e = m.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
873
- return this._commandService.executeCommand(Q.id, {
872
+ const e = f.mapToFilterColumn(this.conditionItem, this.filterConditionFormParams);
873
+ return this._commandService.executeCommand(V.id, {
874
874
  unitId: this._filterModel.unitId,
875
875
  subUnitId: this._filterModel.subUnitId,
876
876
  col: this.col,
@@ -882,10 +882,10 @@ let Le = class extends de {
882
882
  * `IFilterConditionFormParams` and load default condition form params.
883
883
  */
884
884
  onPrimaryConditionChange(e) {
885
- const r = m.ALL_CONDITIONS.find((s) => s.operator === e);
885
+ const r = f.ALL_CONDITIONS.find((s) => s.operator === e);
886
886
  if (!r)
887
887
  throw new Error(`[ByConditionsModel]: condition item not found for operator: ${e}!`);
888
- this._conditionItem$.next(r), this._filterConditionFormParams$.next(m.getInitialFormParams(e));
888
+ this._conditionItem$.next(r), this._filterConditionFormParams$.next(f.getInitialFormParams(e));
889
889
  }
890
890
  /**
891
891
  * This method would be called when user changes the primary conditions, the input values or "AND" "OR" ratio.
@@ -898,16 +898,16 @@ let Le = class extends de {
898
898
  onConditionFormChange(e) {
899
899
  const r = { ...this.filterConditionFormParams, ...e };
900
900
  if (r.and !== !0 && delete r.and, typeof e.and < "u" || typeof e.operator1 < "u" || typeof e.operator2 < "u") {
901
- const s = m.testMappingParams(r, this.conditionItem.numOfParameters);
901
+ const s = f.testMappingParams(r, this.conditionItem.numOfParameters);
902
902
  this._conditionItem$.next(s);
903
903
  }
904
904
  this._filterConditionFormParams$.next(r);
905
905
  }
906
906
  };
907
- Le = Qe([
908
- Fe(4, Y)
909
- ], Le);
910
- let Me = class extends de {
907
+ Pe = Ve([
908
+ Ee(4, j)
909
+ ], Pe);
910
+ let $e = class extends he {
911
911
  constructor(e, r, s, n, a) {
912
912
  super();
913
913
  v(this, "_rawFilterItems$");
@@ -919,22 +919,22 @@ let Me = class extends de {
919
919
  v(this, "_manuallyUpdateFilterItems$");
920
920
  v(this, "_searchString$");
921
921
  v(this, "searchString$");
922
- this._filterModel = e, this.col = r, this._commandService = a, this._treeMapCache = n, this._searchString$ = new j(""), this.searchString$ = this._searchString$.asObservable(), this._rawFilterItems$ = new j(s), this.rawFilterItems$ = this._rawFilterItems$.asObservable(), this._manuallyUpdateFilterItems$ = new ei(), this.filterItems$ = ti(
923
- ri([
922
+ 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
+ ti([
924
924
  this._searchString$.pipe(
925
- Vt(500, void 0, { leading: !0, trailing: !0 }),
926
- Qt(void 0)
925
+ Wt(500, void 0, { leading: !0, trailing: !0 }),
926
+ Vt(void 0)
927
927
  ),
928
928
  this._rawFilterItems$
929
929
  ]).pipe(
930
- ce(([i, o]) => {
930
+ ae(([i, o]) => {
931
931
  if (!i) return o;
932
932
  const c = i.toLowerCase().split(/\s+/).filter((h) => !!h);
933
- return qt(o, c);
933
+ return Kt(o, c);
934
934
  })
935
935
  ),
936
936
  this._manuallyUpdateFilterItems$
937
- ).pipe(ii(1)), this.canApply$ = this.filterItems$.pipe(ce((i) => ze(i).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((i) => this._filterItems = i));
937
+ ).pipe(ri(1)), this.canApply$ = this.filterItems$.pipe(ae((i) => Xe(i).checked > 0)), this.disposeWithMe(this.filterItems$.subscribe((i) => this._filterItems = i));
938
938
  }
939
939
  /**
940
940
  * Create a model with targeting filter column. If there is not a filter column, the model would be created with
@@ -947,39 +947,39 @@ let Me = class extends de {
947
947
  * @returns the model to control the panel's state
948
948
  */
949
949
  static async fromFilterColumn(e, r, s) {
950
- const n = e.get(Be), a = e.get(G), i = e.get(Pe, Lt.OPTIONAL), { unitId: o, subUnitId: l } = r, c = n.getUniverSheetInstance(o);
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);
951
951
  if (!c) throw new Error(`[ByValuesModel]: Workbook not found for filter model with unitId: ${o}!`);
952
952
  const h = c == null ? void 0 : c.getSheetBySheetId(l);
953
953
  if (!h) throw new Error(`[ByValuesModel]: Worksheet not found for filter model with unitId: ${o} and subUnitId: ${l}!`);
954
- const f = r.getRange(), C = s, p = r.getFilterColumn(s), _ = p == null ? void 0 : p.getColumnData().filters, S = new Set(_ == null ? void 0 : _.filters), E = !!(_ && _.blank), N = r.getFilteredOutRowsExceptCol(s), b = { ...f, startRow: f.startRow + 1, startColumn: C, endColumn: C };
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
955
  let y, R;
956
956
  if (i) {
957
- const L = await i.getFilterValues({
957
+ const $ = await i.getFilterValues({
958
958
  unitId: o,
959
959
  subUnitId: l,
960
- filteredOutRowsByOtherColumns: Array.from(N),
960
+ filteredOutRowsByOtherColumns: Array.from(F),
961
961
  filterColumn: p,
962
962
  filters: !!_,
963
963
  blankChecked: E,
964
964
  iterateRange: b,
965
965
  alreadyChecked: Array.from(S)
966
966
  });
967
- y = L.filterTreeItems, R = L.filterTreeMapCache;
967
+ y = $.filterTreeItems, R = $.filterTreeMapCache;
968
968
  } else {
969
- const L = Zt(
969
+ const $ = Yt(
970
970
  !!_,
971
971
  a,
972
972
  b,
973
973
  h,
974
- N,
974
+ F,
975
975
  p,
976
976
  S,
977
977
  E,
978
978
  c.getStyles()
979
979
  );
980
- y = L.filterTreeItems, R = L.filterTreeMapCache;
980
+ y = $.filterTreeItems, R = $.filterTreeMapCache;
981
981
  }
982
- return e.createInstance(Me, r, s, y, R);
982
+ return e.createInstance($e, r, s, y, R);
983
983
  }
984
984
  get rawFilterItems() {
985
985
  return this._rawFilterItems$.getValue();
@@ -1000,24 +1000,24 @@ let Me = class extends de {
1000
1000
  this._searchString$.next(e);
1001
1001
  }
1002
1002
  onCheckAllToggled(e) {
1003
- const r = Re.deepClone(this._filterItems);
1004
- r.forEach((s) => Te(s, e)), this._manuallyUpdateFilterItems(r);
1003
+ const r = be.deepClone(this._filterItems);
1004
+ r.forEach((s) => Se(s, e)), this._manuallyUpdateFilterItems(r);
1005
1005
  }
1006
1006
  /**
1007
1007
  * Toggle a filter item.
1008
1008
  */
1009
1009
  onFilterCheckToggled(e) {
1010
- const r = Re.deepClone(this._filterItems), s = et(r, e.key);
1010
+ const r = be.deepClone(this._filterItems), s = Je(r, e.key);
1011
1011
  if (!s)
1012
1012
  return;
1013
- const n = Kt(s);
1014
- Te(s, !n), this._manuallyUpdateFilterItems(r);
1013
+ const n = Zt(s);
1014
+ Se(s, !n), this._manuallyUpdateFilterItems(r);
1015
1015
  }
1016
1016
  onFilterOnly(e) {
1017
- const r = Re.deepClone(this._filterItems);
1018
- r.forEach((s) => Te(s, !1)), e.forEach((s) => {
1019
- const n = et(r, s);
1020
- n && Te(n, !0);
1017
+ 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);
1021
1021
  }), this._manuallyUpdateFilterItems(r);
1022
1022
  }
1023
1023
  _manuallyUpdateFilterItems(e) {
@@ -1026,7 +1026,7 @@ let Me = class extends de {
1026
1026
  // expose method here to let the panel change filter items
1027
1027
  // #region ByValuesModel apply methods
1028
1028
  clear() {
1029
- return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(Q.id, {
1029
+ return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(V.id, {
1030
1030
  unitId: this._filterModel.unitId,
1031
1031
  subUnitId: this._filterModel.subUnitId,
1032
1032
  col: this.col,
@@ -1039,7 +1039,7 @@ let Me = class extends de {
1039
1039
  async apply() {
1040
1040
  if (this._disposed)
1041
1041
  return !1;
1042
- const e = ze(this._filterItems), { checked: r, checkedItems: s } = e, n = this.rawFilterItems;
1042
+ const e = Xe(this._filterItems), { checked: r, checkedItems: s } = e, n = this.rawFilterItems;
1043
1043
  let a = 0;
1044
1044
  for (const c of n)
1045
1045
  a += c.count;
@@ -1047,7 +1047,7 @@ let Me = class extends de {
1047
1047
  if (i)
1048
1048
  throw new Error("[ByValuesModel]: no checked items!");
1049
1049
  if (o)
1050
- return this._commandService.executeCommand(Q.id, {
1050
+ return this._commandService.executeCommand(V.id, {
1051
1051
  unitId: this._filterModel.unitId,
1052
1052
  subUnitId: this._filterModel.subUnitId,
1053
1053
  col: this.col,
@@ -1055,12 +1055,12 @@ let Me = class extends de {
1055
1055
  });
1056
1056
  {
1057
1057
  l.filters = {};
1058
- const c = s.filter((f) => f.key !== "empty");
1058
+ const c = s.filter((m) => m.key !== "empty");
1059
1059
  c.length > 0 && (l.filters = {
1060
- filters: c.flatMap((f) => f.originValues ? Array.from(f.originValues) : [f.title])
1060
+ filters: c.flatMap((m) => m.originValues ? Array.from(m.originValues) : [m.title])
1061
1061
  }), c.length !== s.length && (l.filters.blank = !0);
1062
1062
  }
1063
- return this._commandService.executeCommand(Q.id, {
1063
+ return this._commandService.executeCommand(V.id, {
1064
1064
  unitId: this._filterModel.unitId,
1065
1065
  subUnitId: this._filterModel.subUnitId,
1066
1066
  col: this.col,
@@ -1069,18 +1069,18 @@ let Me = class extends de {
1069
1069
  }
1070
1070
  // #endregion
1071
1071
  };
1072
- Me = Qe([
1073
- Fe(4, Y)
1074
- ], Me);
1075
- let $e = class extends de {
1072
+ $e = Ve([
1073
+ Ee(4, j)
1074
+ ], $e);
1075
+ let Le = class extends he {
1076
1076
  constructor(e, r, s, n, a) {
1077
1077
  super();
1078
- v(this, "canApply$", fe(!0));
1078
+ v(this, "canApply$", de(!0));
1079
1079
  v(this, "_cellFillColors$");
1080
1080
  v(this, "cellFillColors$");
1081
1081
  v(this, "_cellTextColors$");
1082
1082
  v(this, "cellTextColors$");
1083
- this._filterModel = e, this.col = r, this._commandService = a, this._cellFillColors$ = new j(Array.from(s.values())), this.cellFillColors$ = this._cellFillColors$.asObservable(), this._cellTextColors$ = new j(Array.from(n.values())), this.cellTextColors$ = this._cellTextColors$.asObservable();
1083
+ this._filterModel = e, this.col = r, this._commandService = a, this._cellFillColors$ = new Q(Array.from(s.values())), this.cellFillColors$ = this._cellFillColors$.asObservable(), this._cellTextColors$ = new Q(Array.from(n.values())), this.cellTextColors$ = this._cellTextColors$.asObservable();
1084
1084
  }
1085
1085
  /**
1086
1086
  * Create a model with targeting filter column. If there is not a filter column, the model would be created with
@@ -1094,28 +1094,28 @@ let $e = class extends de {
1094
1094
  */
1095
1095
  static async fromFilterColumn(e, r, s) {
1096
1096
  var b, y, R;
1097
- const n = e.get(Be), { unitId: a, subUnitId: i } = r, o = n.getUniverSheetInstance(a);
1097
+ const n = e.get(De), { unitId: a, subUnitId: i } = r, o = n.getUniverSheetInstance(a);
1098
1098
  if (!o) throw new Error(`[ByColorsModel]: Workbook not found for filter model with unitId: ${a}!`);
1099
1099
  const l = o == null ? void 0 : o.getSheetBySheetId(i);
1100
1100
  if (!l) throw new Error(`[ByColorsModel]: Worksheet not found for filter model with unitId: ${a} and subUnitId: ${i}!`);
1101
- const c = r.getRange(), h = s, f = (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 = f == null ? void 0 : f.cellFillColors) != null ? y : []), E = /* @__PURE__ */ new Map(), N = new Set((R = f == null ? void 0 : f.cellTextColors) != null ? R : []);
1102
- for (const L of l.iterateByColumn(p, !1, !0)) {
1103
- const { row: Z, col: K, value: ne } = L;
1104
- if (C.has(Z))
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))
1105
1105
  continue;
1106
- const U = l.getComposedCellStyleByCellData(Z, K, ne);
1107
- if (U.bg && U.bg.rgb) {
1108
- const A = new pt(U.bg.rgb).toRgbString();
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
1109
  _.has(A) || _.set(A, { color: A, checked: S.has(A) });
1110
1110
  } else
1111
1111
  _.set("default-fill-color", { color: null, checked: S.has(null) });
1112
- if (U.cl && U.cl.rgb) {
1113
- const A = new pt(U.cl.rgb).toRgbString();
1114
- E.has(A) || E.set(A, { color: A, checked: N.has(A) });
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) });
1115
1115
  } else
1116
- E.set("default-font-color", { color: St, checked: N.has(St) });
1116
+ E.set("default-font-color", { color: gt, checked: F.has(gt) });
1117
1117
  }
1118
- return e.createInstance($e, r, s, _, E);
1118
+ return e.createInstance(Le, r, s, _, E);
1119
1119
  }
1120
1120
  get cellFillColors() {
1121
1121
  return this._cellFillColors$.getValue();
@@ -1132,7 +1132,7 @@ let $e = class extends de {
1132
1132
  // expose method here to let the panel change filter items
1133
1133
  // #region ByColorsModel apply methods
1134
1134
  clear() {
1135
- return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(Q.id, {
1135
+ return this._disposed ? Promise.resolve(!1) : this._commandService.executeCommand(V.id, {
1136
1136
  unitId: this._filterModel.unitId,
1137
1137
  subUnitId: this._filterModel.subUnitId,
1138
1138
  col: this.col,
@@ -1175,7 +1175,7 @@ let $e = class extends de {
1175
1175
  return !1;
1176
1176
  const e = this.cellFillColors.filter((n) => n.checked).map((n) => n.color), r = this.cellTextColors.filter((n) => n.checked).map((n) => n.color);
1177
1177
  if (e.length === 0 && r.length === 0)
1178
- return this._commandService.executeCommand(Q.id, {
1178
+ return this._commandService.executeCommand(V.id, {
1179
1179
  unitId: this._filterModel.unitId,
1180
1180
  subUnitId: this._filterModel.subUnitId,
1181
1181
  col: this.col,
@@ -1186,7 +1186,7 @@ let $e = class extends de {
1186
1186
  cellFillColors: e
1187
1187
  } : r.length > 0 && (s.colorFilters = {
1188
1188
  cellTextColors: r
1189
- }), this._commandService.executeCommand(Q.id, {
1189
+ }), this._commandService.executeCommand(V.id, {
1190
1190
  unitId: this._filterModel.unitId,
1191
1191
  subUnitId: this._filterModel.subUnitId,
1192
1192
  col: this.col,
@@ -1195,39 +1195,39 @@ let $e = class extends de {
1195
1195
  }
1196
1196
  // #endregion
1197
1197
  };
1198
- $e = Qe([
1199
- Fe(4, Y)
1200
- ], $e);
1201
- const ue = "FILTER_PANEL_OPENED", xe = {
1198
+ Le = Ve([
1199
+ Ee(4, j)
1200
+ ], Le);
1201
+ const ce = "FILTER_PANEL_OPENED", Me = {
1202
1202
  id: "sheet.operation.open-filter-panel",
1203
- type: We.OPERATION,
1203
+ type: Be.OPERATION,
1204
1204
  handler: (t, e) => {
1205
- const r = t.get(Ve), s = t.get(J), n = t.get(z), a = t.get(Y), i = t.has(_t) ? t.get(_t) : null;
1206
- i != null && i.isVisible().visible && a.syncExecuteCommand(yr.id, { visible: !1 });
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;
1206
+ i != null && i.isVisible().visible && a.syncExecuteCommand(Nr.id, { visible: !1 });
1207
1207
  const { unitId: o, subUnitId: l, col: c } = e, h = s.getFilterModel(o, l);
1208
- return h ? (n.setupCol(h, c), r.getContextValue(ue) || r.setContextValue(ue, !0), !0) : !1;
1208
+ return h ? (n.setupCol(h, c), r.getContextValue(ce) || r.setContextValue(ce, !0), !0) : !1;
1209
1209
  }
1210
- }, Ee = {
1210
+ }, Ce = {
1211
1211
  id: "sheet.operation.close-filter-panel",
1212
- type: We.OPERATION,
1212
+ type: Be.OPERATION,
1213
1213
  handler: (t) => {
1214
- const e = t.get(Ve), r = t.get(z), s = t.get(xr, Lt.OPTIONAL);
1215
- return e.getContextValue(ue) ? (e.setContextValue(ue, !1), s == null || s.focus(), r.terminate()) : !1;
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;
1216
1216
  }
1217
- }, Xt = {
1217
+ }, qt = {
1218
1218
  id: "sheet.operation.apply-filter",
1219
- type: We.OPERATION,
1219
+ type: Be.OPERATION,
1220
1220
  handler: (t, e) => {
1221
1221
  const { filterBy: r } = e;
1222
- return t.get(z).changeFilterBy(r);
1222
+ return t.get(X).changeFilterBy(r);
1223
1223
  }
1224
- }, zt = "sheets-filter-ui.config", Ue = {};
1225
- var Ei = Object.getOwnPropertyDescriptor, Ni = (t, e, r, s) => {
1226
- for (var n = s > 1 ? void 0 : s ? Ei(e, r) : e, a = t.length - 1, i; a >= 0; a--)
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--)
1227
1227
  (i = t[a]) && (n = i(n) || n);
1228
1228
  return n;
1229
- }, ae = (t, e) => (r, s) => e(r, s, t);
1230
- let he = class extends de {
1229
+ }, le = (t, e) => (r, s) => e(r, s, t);
1230
+ let ue = class extends he {
1231
1231
  constructor(t, e, r, s, n, a) {
1232
1232
  super(), this._sheetsFilterService = t, this._localeService = e, this._commandService = r, this._sheetPermissionCheckPermission = s, this._injector = n, this._sheetsSelectionService = a, this._commandExecutedListener();
1233
1233
  }
@@ -1235,77 +1235,77 @@ let he = class extends de {
1235
1235
  this.disposeWithMe(
1236
1236
  this._commandService.beforeCommandExecuted((t) => {
1237
1237
  var e, r, s;
1238
- if (t.id === Oe.id) {
1239
- const n = this._injector.get(Be), a = Zr(n);
1238
+ if (t.id === Ne.id) {
1239
+ const n = this._injector.get(De), a = Yr(n);
1240
1240
  if (!a) return;
1241
1241
  const { unitId: i, subUnitId: o, worksheet: l } = a, c = (e = this._sheetsFilterService.getFilterModel(i, o)) == null ? void 0 : e.getRange();
1242
1242
  let h;
1243
1243
  if (c)
1244
1244
  h = this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1245
- rangeTypes: [Ce],
1246
- worksheetTypes: [ge, Se]
1245
+ rangeTypes: [ge],
1246
+ worksheetTypes: [ve, _e]
1247
1247
  }, [c]);
1248
1248
  else {
1249
- const f = (r = this._sheetsSelectionService.getCurrentLastSelection()) == null ? void 0 : r.range;
1250
- if (f) {
1251
- let C = { ...f };
1252
- C = f.startColumn === f.endColumn && f.startRow === f.endRow ? Kr(C, { left: !0, right: !0, up: !0, down: !0 }, l) : C, h = this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1253
- rangeTypes: [Ce],
1254
- worksheetTypes: [Se, ge]
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
1255
  }, [C], i, o);
1256
1256
  } else
1257
1257
  h = this._sheetPermissionCheckPermission.permissionCheckWithoutRange({
1258
- rangeTypes: [Ce],
1259
- worksheetTypes: [Se, ge]
1258
+ rangeTypes: [ge],
1259
+ worksheetTypes: [_e, ve]
1260
1260
  });
1261
1261
  }
1262
1262
  h || this._sheetPermissionCheckPermission.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.filterErr"));
1263
1263
  }
1264
- if (t.id === xe.id) {
1265
- const n = t.params, { unitId: a, subUnitId: i } = n, o = (s = this._sheetsFilterService.getFilterModel(a, i)) == null ? void 0 : s.getRange(), l = Re.deepClone(o);
1264
+ if (t.id === Me.id) {
1265
+ 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
1266
  l && (l.startColumn = n.col, l.endColumn = n.col, this._sheetPermissionCheckPermission.permissionCheckWithRanges({
1267
- rangeTypes: [Ce],
1268
- worksheetTypes: [ge, Se]
1267
+ rangeTypes: [ge],
1268
+ worksheetTypes: [ve, _e]
1269
1269
  }, [l]) || this._sheetPermissionCheckPermission.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.filterErr")));
1270
1270
  }
1271
1271
  })
1272
1272
  );
1273
1273
  }
1274
1274
  };
1275
- he = Ni([
1276
- ae(0, T(J)),
1277
- ae(1, T(G)),
1278
- ae(2, Y),
1279
- ae(3, T(Gr)),
1280
- ae(4, T(ie)),
1281
- ae(5, T(Yr))
1282
- ], he);
1283
- const X = 16, Fi = new Path2D("M3.30363 3C2.79117 3 2.51457 3.60097 2.84788 3.99024L6.8 8.60593V12.5662C6.8 12.7184 6.8864 12.8575 7.02289 12.9249L8.76717 13.7863C8.96655 13.8847 9.2 13.7396 9.2 13.5173V8.60593L13.1521 3.99024C13.4854 3.60097 13.2088 3 12.6964 3H3.30363Z");
1284
- class yt {
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 {
1285
1285
  static drawNoCriteria(e, r, s, n) {
1286
- e.save(), Ct.drawWith(e, {
1286
+ e.save(), St.drawWith(e, {
1287
1287
  radius: 2,
1288
- width: X,
1289
- height: X,
1288
+ width: q,
1289
+ height: q,
1290
1290
  fill: n
1291
- }), e.lineCap = "square", e.strokeStyle = s, e.scale(r / X, r / X), e.beginPath(), e.lineWidth = 1, e.lineCap = "round", e.moveTo(3, 4), e.lineTo(13, 4), e.moveTo(4.5, 8), e.lineTo(11.5, 8), e.moveTo(6, 12), e.lineTo(10, 12), e.stroke(), e.restore();
1291
+ }), 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
1292
  }
1293
1293
  static drawHasCriteria(e, r, s, n) {
1294
- e.save(), Ct.drawWith(e, {
1294
+ e.save(), St.drawWith(e, {
1295
1295
  radius: 2,
1296
- width: X,
1297
- height: X,
1296
+ width: q,
1297
+ height: q,
1298
1298
  fill: n
1299
- }), e.scale(r / X, r / X), e.fillStyle = s, e.fill(Fi), e.restore();
1299
+ }), e.scale(r / q, r / q), e.fillStyle = s, e.fill(Fi), e.restore();
1300
1300
  }
1301
1301
  }
1302
- var yi = Object.getOwnPropertyDescriptor, Oi = (t, e, r, s) => {
1303
- for (var n = s > 1 ? void 0 : s ? yi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
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--)
1304
1304
  (i = t[a]) && (n = i(n) || n);
1305
1305
  return n;
1306
- }, qe = (t, e) => (r, s) => e(r, s, t);
1307
- const W = 16, Ne = 1;
1308
- let tt = class extends Qr {
1306
+ }, Ke = (t, e) => (r, s) => e(r, s, t);
1307
+ const B = 16, Te = 1;
1308
+ let et = class extends Vr {
1309
1309
  constructor(e, r, s, n, a) {
1310
1310
  super(e, r);
1311
1311
  v(this, "_cellWidth", 0);
@@ -1321,19 +1321,19 @@ let tt = class extends Qr {
1321
1321
  });
1322
1322
  }
1323
1323
  _draw(e) {
1324
- const r = this._cellHeight, s = this._cellWidth, n = W - s, a = W - r;
1324
+ const r = this._cellHeight, s = this._cellWidth, n = B - s, a = B - r;
1325
1325
  e.save();
1326
1326
  const i = new Path2D();
1327
1327
  i.rect(n, a, s, r), e.clip(i);
1328
1328
  const { hasCriteria: o } = this._filterParams, l = this._themeService.getColorFromTheme("primary.600"), c = this._hovered ? this._themeService.getColorFromTheme("gray.50") : "rgba(255, 255, 255, 1.0)";
1329
- o ? yt.drawHasCriteria(e, W, l, c) : yt.drawNoCriteria(e, W, l, c), e.restore();
1329
+ o ? Nt.drawHasCriteria(e, B, l, c) : Nt.drawNoCriteria(e, B, l, c), e.restore();
1330
1330
  }
1331
1331
  onPointerDown(e) {
1332
1332
  if (e.button === 2)
1333
1333
  return;
1334
1334
  const { col: r, unitId: s, subUnitId: n } = this._filterParams;
1335
- this._contextService.getContextValue(ue) || !this._commandService.hasCommand(xe.id) || setTimeout(() => {
1336
- this._commandService.executeCommand(xe.id, {
1335
+ this._contextService.getContextValue(ce) || !this._commandService.hasCommand(Me.id) || setTimeout(() => {
1336
+ this._commandService.executeCommand(Me.id, {
1337
1337
  unitId: s,
1338
1338
  subUnitId: n,
1339
1339
  col: r
@@ -1347,29 +1347,29 @@ let tt = class extends Qr {
1347
1347
  this._hovered = !1, this.makeDirty(!0);
1348
1348
  }
1349
1349
  };
1350
- tt = Oi([
1351
- qe(2, Ve),
1352
- qe(3, Y),
1353
- qe(4, T(Mt))
1354
- ], tt);
1355
- var Ii = Object.getOwnPropertyDescriptor, bi = (t, e, r, s) => {
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) => {
1356
1356
  for (var n = s > 1 ? void 0 : s ? Ii(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1357
1357
  (i = t[a]) && (n = i(n) || n);
1358
1358
  return n;
1359
- }, re = (t, e) => (r, s) => e(r, s, t);
1360
- const Ri = 1e3, Ai = 5e3;
1361
- function wi(t, e, r, s) {
1359
+ }, te = (t, e) => (r, s) => e(r, s, t);
1360
+ const bi = 1e3, Ri = 5e3;
1361
+ function Ai(t, e, r, s) {
1362
1362
  switch (s) {
1363
- case Ae.TOP:
1364
- return t + Ne;
1365
- case Ae.MIDDLE:
1366
- return t + Math.max(0, (r - W) / 2);
1367
- case Ae.BOTTOM:
1363
+ case Re.TOP:
1364
+ return t + Te;
1365
+ case Re.MIDDLE:
1366
+ return t + Math.max(0, (r - B) / 2);
1367
+ case Re.BOTTOM:
1368
1368
  default:
1369
- return e - W - Ne;
1369
+ return e - B - Te;
1370
1370
  }
1371
1371
  }
1372
- let rt = class extends $t {
1372
+ let tt = class extends Lt {
1373
1373
  constructor(e, r, s, n, a, i, o, l) {
1374
1374
  super();
1375
1375
  v(this, "_filterRangeShape", null);
@@ -1382,9 +1382,9 @@ let rt = class extends $t {
1382
1382
  }
1383
1383
  _initRenderer() {
1384
1384
  this._sheetSkeletonManagerService.currentSkeleton$.pipe(
1385
- at((e) => {
1385
+ lt((e) => {
1386
1386
  var o, l;
1387
- if (!e) return fe(null);
1387
+ if (!e) return de(null);
1388
1388
  const { unit: r, unitId: s } = this._context, n = ((o = r.getActiveSheet()) == null ? void 0 : o.getSheetId()) || "", a = (l = this._sheetsFilterService.getFilterModel(s, n)) != null ? l : void 0, i = () => ({
1389
1389
  unitId: s,
1390
1390
  worksheetId: n,
@@ -1392,28 +1392,28 @@ let rt = class extends $t {
1392
1392
  range: a == null ? void 0 : a.getRange(),
1393
1393
  skeleton: e.skeleton
1394
1394
  });
1395
- return fr(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(
1396
- si(
1395
+ return dr(this._commandService.onCommandExecuted.bind(this._commandService)).pipe(
1396
+ ii(
1397
1397
  ([c]) => {
1398
1398
  var h;
1399
- return c.type === We.MUTATION && ((h = c.params) == null ? void 0 : h.unitId) === r.getUnitId() && (_r.has(c.id) || c.id === Xr.id);
1399
+ return c.type === Be.MUTATION && ((h = c.params) == null ? void 0 : h.unitId) === r.getUnitId() && (vr.has(c.id) || c.id === qr.id);
1400
1400
  }
1401
1401
  ),
1402
- Vt(20, void 0, { leading: !1, trailing: !0 }),
1403
- ce(i),
1404
- Qt(i())
1402
+ Wt(20, void 0, { leading: !1, trailing: !0 }),
1403
+ ae(i),
1404
+ Vt(i())
1405
1405
  // must trigger once
1406
1406
  );
1407
1407
  }),
1408
- ni(this.dispose$)
1408
+ si(this.dispose$)
1409
1409
  ).subscribe((e) => {
1410
1410
  this._disposeRendering(), !(!e || !e.range) && (this._renderRange(e.range, e.skeleton), this._renderButtons(e));
1411
1411
  });
1412
1412
  }
1413
1413
  _renderRange(e, r) {
1414
- const { scene: s } = this._context, { rowHeaderWidth: n, columnHeaderHeight: a } = r, i = this._filterRangeShape = new br(
1414
+ const { scene: s } = this._context, { rowHeaderWidth: n, columnHeaderHeight: a } = r, i = this._filterRangeShape = new Or(
1415
1415
  s,
1416
- Ri,
1416
+ bi,
1417
1417
  this._themeService,
1418
1418
  {
1419
1419
  rowHeaderWidth: n,
@@ -1421,7 +1421,7 @@ let rt = class extends $t {
1421
1421
  enableAutoFill: !1,
1422
1422
  highlightHeader: !1
1423
1423
  }
1424
- ), l = Rr({
1424
+ ), l = br({
1425
1425
  range: e,
1426
1426
  primary: null,
1427
1427
  style: { fill: "rgba(0, 0, 0, 0.0)" }
@@ -1433,34 +1433,34 @@ let rt = class extends $t {
1433
1433
  if (!c)
1434
1434
  return;
1435
1435
  this._interceptCellContent(n, i, e.range);
1436
- const { startColumn: h, endColumn: f, startRow: C } = r;
1437
- for (let p = h; p <= f; p++) {
1438
- const _ = `sheets-filter-button-${p}`, S = Ar(C, p, l, a), E = c.getComposedCellStyle(C, p), N = (E == null ? void 0 : E.vt) || Ae.BOTTOM, { startX: b, startY: y, endX: R, endY: L } = S, Z = R - b, K = L - y;
1439
- if (K <= Ne || Z <= Ne)
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)
1440
1440
  continue;
1441
- const ne = !!s.getFilterColumn(p), U = R - W - Ne, A = wi(y, L, K, N), w = {
1442
- left: U,
1441
+ const se = !!s.getFilterColumn(p), x = R - B - Te, A = Ai(y, $, Z, F), w = {
1442
+ left: x,
1443
1443
  top: A,
1444
- height: W,
1445
- width: W,
1446
- zIndex: Ai,
1447
- cellHeight: K,
1448
- cellWidth: Z,
1449
- filterParams: { unitId: n, subUnitId: i, col: p, hasCriteria: ne }
1450
- }, je = this._injector.createInstance(tt, _, w);
1451
- this._filterButtonShapes.push(je);
1444
+ height: B,
1445
+ width: B,
1446
+ zIndex: Ri,
1447
+ cellHeight: Z,
1448
+ cellWidth: Y,
1449
+ filterParams: { unitId: n, subUnitId: i, col: p, hasCriteria: se }
1450
+ }, Qe = this._injector.createInstance(et, _, w);
1451
+ this._filterButtonShapes.push(Qe);
1452
1452
  }
1453
1453
  l.addObjects(this._filterButtonShapes), l.makeDirty();
1454
1454
  }
1455
1455
  _interceptCellContent(e, r, s) {
1456
1456
  const { startRow: n, startColumn: a, endColumn: i } = s;
1457
- this._buttonRenderDisposable = this._sheetInterceptorService.intercept(zr.CELL_CONTENT, {
1457
+ this._buttonRenderDisposable = this._sheetInterceptorService.intercept(Xr.CELL_CONTENT, {
1458
1458
  effect: mr.Style,
1459
1459
  handler: (o, l, c) => {
1460
- const { row: h, col: f, unitId: C, subUnitId: p } = l;
1461
- return C !== e || p !== r || h !== n || f < a || f > i || ((!o || o === l.rawData) && (o = { ...l.rawData }), o.fontRenderExtension = {
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 = {
1462
1462
  ...o == null ? void 0 : o.fontRenderExtension,
1463
- rightOffset: W
1463
+ rightOffset: B
1464
1464
  }), c(o);
1465
1465
  },
1466
1466
  priority: 10
@@ -1471,163 +1471,259 @@ let rt = class extends $t {
1471
1471
  (e = this._filterRangeShape) == null || e.dispose(), this._filterButtonShapes.forEach((s) => s.dispose()), (r = this._buttonRenderDisposable) == null || r.dispose(), this._filterRangeShape = null, this._buttonRenderDisposable = null, this._filterButtonShapes = [];
1472
1472
  }
1473
1473
  };
1474
- rt = bi([
1475
- re(1, T(ie)),
1476
- re(2, T(Or)),
1477
- re(3, T(J)),
1478
- re(4, T(Mt)),
1479
- re(5, T(qr)),
1480
- re(6, Y),
1481
- re(7, Ir)
1482
- ], rt);
1483
- var Pi = Object.getOwnPropertyDescriptor, Li = (t, e, r, s) => {
1484
- for (var n = s > 1 ? void 0 : s ? Pi(e, r) : e, a = t.length - 1, i; a >= 0; a--)
1474
+ tt = Oi([
1475
+ te(1, T(re)),
1476
+ te(2, T(yr)),
1477
+ te(3, T(z)),
1478
+ te(4, T($t)),
1479
+ te(5, T(Kr)),
1480
+ 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--)
1485
1485
  (i = t[a]) && (n = i(n) || n);
1486
1486
  return n;
1487
- }, Ot = (t, e) => (r, s) => e(r, s, t);
1488
- let ye = class extends $t {
1487
+ }, yt = (t, e) => (r, s) => e(r, s, t);
1488
+ let Fe = class extends Lt {
1489
1489
  constructor(t, e) {
1490
1490
  super(), this._renderManagerService = t, this._sheetsRenderService = e, [
1491
+ _r,
1491
1492
  gr,
1492
1493
  Sr,
1493
- Cr,
1494
- Tr
1494
+ Cr
1495
1495
  ].forEach((r) => this.disposeWithMe(this._sheetsRenderService.registerSkeletonChangingMutations(r.id))), this.disposeWithMe(this._renderManagerService.registerRenderModule(
1496
- se.UNIVER_SHEET,
1497
- [rt]
1496
+ ie.UNIVER_SHEET,
1497
+ [tt]
1498
1498
  ));
1499
1499
  }
1500
1500
  };
1501
- ye = Li([
1502
- Ot(0, Wt),
1503
- Ot(1, T(Dt))
1504
- ], ye);
1505
- var Mi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, xi = (t, e, r) => e in t ? Mi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Ui = (t, e, r, s) => {
1506
- for (var n = s > 1 ? void 0 : s ? $i(e, r) : e, a = t.length - 1, i; a >= 0; a--)
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--)
1507
1507
  (i = t[a]) && (n = i(n) || n);
1508
1508
  return n;
1509
- }, It = (t, e) => (r, s) => e(r, s, t), Jt = (t, e, r) => xi(t, typeof e != "symbol" ? e + "" : e, r);
1510
- const ki = "SHEET_FILTER_UI_PLUGIN";
1511
- let ke = class extends it {
1512
- constructor(t = Ue, e, r) {
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 {
1512
+ constructor(t = xe, e, r) {
1513
1513
  super(), this._config = t, this._injector = e, this._configService = r;
1514
- const { menu: s, ...n } = kt(
1514
+ const { menu: s, ...n } = Ut(
1515
1515
  {},
1516
- Ue,
1516
+ xe,
1517
1517
  this._config
1518
1518
  );
1519
- s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(zt, n);
1519
+ s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(Xt, n);
1520
1520
  }
1521
1521
  onStarting() {
1522
1522
  [
1523
- [he],
1524
- [ye]
1523
+ [ue],
1524
+ [Fe]
1525
1525
  ].forEach((t) => this._injector.add(t));
1526
1526
  }
1527
1527
  onReady() {
1528
- this._injector.get(he);
1528
+ this._injector.get(ue);
1529
1529
  }
1530
1530
  onRendered() {
1531
- this._injector.get(ye);
1531
+ this._injector.get(Fe);
1532
1532
  }
1533
1533
  };
1534
- Jt(ke, "type", se.UNIVER_SHEET);
1535
- Jt(ke, "pluginName", ki);
1536
- ke = Ui([
1537
- xt(Ht),
1538
- It(1, T(ie)),
1539
- It(2, Ut)
1540
- ], ke);
1541
- var $ = function() {
1542
- return $ = Object.assign || function(t) {
1543
- for (var e, r = 1, s = arguments.length; r < s; r++) {
1544
- e = arguments[r];
1545
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
1546
- }
1547
- return t;
1548
- }, $.apply(this, arguments);
1549
- }, Hi = function(t, e) {
1550
- var r = {};
1551
- for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && e.indexOf(s) < 0 && (r[s] = t[s]);
1552
- if (t != null && typeof Object.getOwnPropertySymbols == "function")
1553
- for (var n = 0, s = Object.getOwnPropertySymbols(t); n < s.length; n++)
1554
- e.indexOf(s[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, s[n]) && (r[s[n]] = t[s[n]]);
1555
- return r;
1556
- }, ve = me(function(t, e) {
1557
- var r = t.icon, s = t.id, n = t.className, a = t.extend, i = Hi(t, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(s, " ").concat(n || "").trim(), l = pi("_".concat(Wi()));
1558
- return er(r, "".concat(s), { defIds: r.defIds, idSuffix: l.current }, $({ ref: e, className: o }, i), a);
1559
- });
1560
- function er(t, e, r, s, n) {
1561
- return pe(t.tag, $($({ key: e }, Di(t, r, n)), s), (Bi(t, r).children || []).map(function(a, i) {
1562
- return er(a, "".concat(e, "-").concat(t.tag, "-").concat(i), r, void 0, n);
1563
- }));
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)
1540
+ ], Ue);
1541
+ 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}`, {
1544
+ defIds: r.defIds,
1545
+ idSuffix: l.current
1546
+ }, {
1547
+ ref: t,
1548
+ className: o,
1549
+ ...i
1550
+ }, a);
1551
+ }
1552
+ function Jt(t, e, r, s, n) {
1553
+ return me(t.tag, {
1554
+ key: e,
1555
+ ...ki(t, r, n),
1556
+ ...s
1557
+ }, (Hi(t, r).children || []).map((a, i) => Jt(a, `${e}-${t.tag}-${i}`, r, void 0, n)));
1564
1558
  }
1565
- function Di(t, e, r) {
1566
- var s = $({}, t.attrs);
1567
- r != null && r.colorChannel1 && s.fill === "colorChannel1" && (s.fill = r.colorChannel1), t.tag === "mask" && s.id && (s.id = s.id + e.idSuffix), Object.entries(s).forEach(function(a) {
1568
- var i = a[0], o = a[1];
1569
- i === "mask" && typeof o == "string" && (s[i] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
1559
+ function ki(t, e, r) {
1560
+ const s = { ...t.attrs };
1561
+ 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
+ a === "mask" && typeof i == "string" && (s[a] = i.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
1570
1563
  });
1571
- var n = e.defIds;
1572
- return !n || n.length === 0 || (t.tag === "use" && s["xlink:href"] && (s["xlink:href"] = s["xlink:href"] + e.idSuffix), Object.entries(s).forEach(function(a) {
1573
- var i = a[0], o = a[1];
1574
- typeof o == "string" && (s[i] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
1564
+ const { defIds: n } = e;
1565
+ return !n || n.length === 0 || (t.tag === "use" && s["xlink:href"] && (s["xlink:href"] = s["xlink:href"] + e.idSuffix), Object.entries(s).forEach(([a, i]) => {
1566
+ typeof i == "string" && (s[a] = i.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
1575
1567
  })), s;
1576
1568
  }
1577
- function Bi(t, e) {
1578
- var r, s = e.defIds;
1579
- return !s || s.length === 0 ? t : t.tag === "defs" && (!((r = t.children) === null || r === void 0) && r.length) ? $($({}, t), { children: t.children.map(function(n) {
1580
- return typeof n.attrs.id == "string" && s && s.includes(n.attrs.id) ? $($({}, n), { attrs: $($({}, n.attrs), { id: n.attrs.id + e.idSuffix }) }) : n;
1581
- }) }) : t;
1569
+ function Hi(t, e) {
1570
+ var s;
1571
+ const { defIds: r } = e;
1572
+ return !r || r.length === 0 ? t : t.tag === "defs" && ((s = t.children) != null && s.length) ? {
1573
+ ...t,
1574
+ children: t.children.map((n) => typeof n.attrs.id == "string" && r && r.includes(n.attrs.id) ? {
1575
+ ...n,
1576
+ attrs: {
1577
+ ...n.attrs,
1578
+ id: n.attrs.id + e.idSuffix
1579
+ }
1580
+ } : n)
1581
+ } : t;
1582
1582
  }
1583
- function Wi() {
1583
+ function Di() {
1584
1584
  return Math.random().toString(36).substring(2, 8);
1585
1585
  }
1586
- ve.displayName = "UniverIcon";
1587
- var Vi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 20 20", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M10 1.05957C10.356 1.05957 10.6816 1.26162 10.8408 1.58008L18.8408 17.5801L18.8799 17.668C19.0486 18.1134 18.8551 18.6232 18.4199 18.8408C17.9557 19.0727 17.3913 18.8841 17.1592 18.4199L10 4.10156L2.84082 18.4199C2.60871 18.8841 2.04434 19.0727 1.58008 18.8408C1.11587 18.6087 0.92731 18.0443 1.15918 17.5801L9.15918 1.58008C9.31841 1.26162 9.64395 1.05957 10 1.05957Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M15.3337 11.7261L15.4294 11.731C15.9035 11.779 16.2732 12.1798 16.2732 12.6665C16.2732 13.1532 15.9035 13.554 15.4294 13.602L15.3337 13.6069H4.66675C4.1476 13.6069 3.72632 13.1856 3.72632 12.6665C3.72632 12.1474 4.1476 11.7261 4.66675 11.7261H15.3337Z" } }] }, tr = me(function(t, e) {
1588
- return pe(ve, Object.assign({}, t, {
1586
+ fe.displayName = "UniverIcon";
1587
+ const Bi = {
1588
+ tag: "svg",
1589
+ attrs: {
1590
+ xmlns: "http://www.w3.org/2000/svg",
1591
+ fill: "none",
1592
+ viewBox: "0 0 20 20",
1593
+ width: "1em",
1594
+ height: "1em"
1595
+ },
1596
+ children: [{
1597
+ tag: "path",
1598
+ attrs: {
1599
+ fill: "currentColor",
1600
+ d: "M10 1.05957C10.356 1.05957 10.6816 1.26162 10.8408 1.58008L18.8408 17.5801L18.8799 17.668C19.0486 18.1134 18.8551 18.6232 18.4199 18.8408C17.9557 19.0727 17.3913 18.8841 17.1592 18.4199L10 4.10156L2.84082 18.4199C2.60871 18.8841 2.04434 19.0727 1.58008 18.8408C1.11587 18.6087 0.92731 18.0443 1.15918 17.5801L9.15918 1.58008C9.31841 1.26162 9.64395 1.05957 10 1.05957Z"
1601
+ }
1602
+ }, {
1603
+ tag: "path",
1604
+ attrs: {
1605
+ fill: "currentColor",
1606
+ 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
+ }
1608
+ }]
1609
+ }, er = ye(function(e, r) {
1610
+ return me(fe, Object.assign({}, e, {
1589
1611
  id: "a-icon",
1590
- ref: e,
1591
- icon: Vi
1612
+ ref: r,
1613
+ icon: Bi
1592
1614
  }));
1593
1615
  });
1594
- tr.displayName = "AIcon";
1595
- var Qi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 20 20", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M17.0596 10C17.0596 6.10087 13.8992 2.94043 10 2.94043C6.10087 2.94043 2.94043 6.10087 2.94043 10C2.94043 13.8992 6.10087 17.0596 10 17.0596C13.8992 17.0596 17.0596 13.8992 17.0596 10ZM18.9404 10C18.9404 14.9374 14.9374 18.9404 10 18.9404C5.06257 18.9404 1.05957 14.9374 1.05957 10C1.05957 5.06257 5.06257 1.05957 10 1.05957C14.9374 1.05957 18.9404 5.06257 18.9404 10Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.29492 4.13476C4.63911 3.79057 5.1845 3.76906 5.55371 4.07031L5.625 4.13476L16.0244 14.5352L16.0889 14.6064C16.3902 14.9757 16.3686 15.52 16.0244 15.8643C15.6573 16.2313 15.0624 16.2313 14.6953 15.8643L4.29492 5.46484L4.23047 5.39355C3.92922 5.02434 3.95073 4.47895 4.29492 4.13476Z" } }] }, rr = me(function(t, e) {
1596
- return pe(ve, Object.assign({}, t, {
1616
+ er.displayName = "AIcon";
1617
+ const Wi = {
1618
+ tag: "svg",
1619
+ attrs: {
1620
+ xmlns: "http://www.w3.org/2000/svg",
1621
+ fill: "none",
1622
+ viewBox: "0 0 20 20",
1623
+ width: "1em",
1624
+ height: "1em"
1625
+ },
1626
+ children: [{
1627
+ tag: "path",
1628
+ attrs: {
1629
+ fill: "currentColor",
1630
+ d: "M17.0596 10C17.0596 6.10087 13.8992 2.94043 10 2.94043C6.10087 2.94043 2.94043 6.10087 2.94043 10C2.94043 13.8992 6.10087 17.0596 10 17.0596C13.8992 17.0596 17.0596 13.8992 17.0596 10ZM18.9404 10C18.9404 14.9374 14.9374 18.9404 10 18.9404C5.06257 18.9404 1.05957 14.9374 1.05957 10C1.05957 5.06257 5.06257 1.05957 10 1.05957C14.9374 1.05957 18.9404 5.06257 18.9404 10Z"
1631
+ }
1632
+ }, {
1633
+ tag: "path",
1634
+ attrs: {
1635
+ fill: "currentColor",
1636
+ 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
+ }
1638
+ }]
1639
+ }, tr = ye(function(e, r) {
1640
+ return me(fe, Object.assign({}, e, {
1597
1641
  id: "ban-icon",
1598
- ref: e,
1599
- icon: Qi
1642
+ ref: r,
1643
+ icon: Wi
1600
1644
  }));
1601
1645
  });
1602
- rr.displayName = "BanIcon";
1603
- var ji = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.32182 2.60967C2.98161 2.60967 2.79671 3.0074 3.01601 3.2675L6.85819 7.8246C6.94943 7.93282 6.99947 8.06981 6.99947 8.21136V12.7338C6.99947 12.898 7.0998 13.0455 7.2525 13.1058L8.73833 13.6928C9.00085 13.7965 9.28531 13.6031 9.28531 13.3208V8.21136C9.28531 8.06981 9.33535 7.93282 9.42659 7.8246L13.2688 3.2675C13.4881 3.0074 13.3032 2.60967 12.963 2.60967H3.32182ZM2.09858 4.04101C1.22139 3.0006 1.96097 1.40967 3.32182 1.40967H12.963C14.3238 1.40967 15.0634 3.0006 14.1862 4.04101L10.4853 8.43054V13.3208C10.4853 14.4498 9.34747 15.2237 8.29742 14.8089L6.81158 14.2219C6.20078 13.9806 5.79947 13.3905 5.79947 12.7338V8.43054L2.09858 4.04101Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ir = me(function(t, e) {
1604
- return pe(ve, Object.assign({}, t, {
1646
+ tr.displayName = "BanIcon";
1647
+ const Vi = {
1648
+ tag: "svg",
1649
+ attrs: {
1650
+ xmlns: "http://www.w3.org/2000/svg",
1651
+ fill: "none",
1652
+ viewBox: "0 0 17 16",
1653
+ width: "1em",
1654
+ height: "1em"
1655
+ },
1656
+ children: [{
1657
+ tag: "path",
1658
+ attrs: {
1659
+ fill: "currentColor",
1660
+ d: "M3.32182 2.60967C2.98161 2.60967 2.79671 3.0074 3.01601 3.2675L6.85819 7.8246C6.94943 7.93282 6.99947 8.06981 6.99947 8.21136V12.7338C6.99947 12.898 7.0998 13.0455 7.2525 13.1058L8.73833 13.6928C9.00085 13.7965 9.28531 13.6031 9.28531 13.3208V8.21136C9.28531 8.06981 9.33535 7.93282 9.42659 7.8246L13.2688 3.2675C13.4881 3.0074 13.3032 2.60967 12.963 2.60967H3.32182ZM2.09858 4.04101C1.22139 3.0006 1.96097 1.40967 3.32182 1.40967H12.963C14.3238 1.40967 15.0634 3.0006 14.1862 4.04101L10.4853 8.43054V13.3208C10.4853 14.4498 9.34747 15.2237 8.29742 14.8089L6.81158 14.2219C6.20078 13.9806 5.79947 13.3905 5.79947 12.7338V8.43054L2.09858 4.04101Z",
1661
+ fillRule: "evenodd",
1662
+ clipRule: "evenodd"
1663
+ }
1664
+ }]
1665
+ }, rr = ye(function(e, r) {
1666
+ return me(fe, Object.assign({}, e, {
1605
1667
  id: "filter-icon",
1606
- ref: e,
1607
- icon: ji
1668
+ ref: r,
1669
+ icon: Vi
1608
1670
  }));
1609
1671
  });
1610
- ir.displayName = "FilterIcon";
1611
- var Gi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.00016 1.33203C6.68162 1.33203 5.39269 1.72302 4.29636 2.45557C3.20004 3.18811 2.34555 4.2293 1.84097 5.44747C1.33638 6.66565 1.20436 8.00609 1.4616 9.2993C1.71883 10.5925 2.35377 11.7804 3.28612 12.7127C4.21847 13.6451 5.40636 14.28 6.69956 14.5373C7.99277 14.7945 9.33321 14.6625 10.5514 14.1579C11.7696 13.6533 12.8108 12.7988 13.5433 11.7025C14.2758 10.6062 14.6668 9.31724 14.6668 7.9987C14.6649 6.23118 13.9619 4.53662 12.7121 3.2868C11.4622 2.03697 9.76768 1.33397 8.00016 1.33203ZM7.66683 3.9987C7.86461 3.9987 8.05795 4.05735 8.2224 4.16723C8.38685 4.27711 8.51502 4.43329 8.59071 4.61601C8.6664 4.79874 8.6862 4.99981 8.64762 5.19379C8.60903 5.38777 8.51379 5.56595 8.37394 5.7058C8.23409 5.84566 8.0559 5.9409 7.86192 5.97948C7.66794 6.01807 7.46687 5.99826 7.28415 5.92258C7.10142 5.84689 6.94524 5.71872 6.83536 5.55427C6.72548 5.38982 6.66683 5.19648 6.66683 4.9987C6.66683 4.73348 6.77219 4.47913 6.95972 4.29159C7.14726 4.10405 7.40162 3.9987 7.66683 3.9987ZM9.3335 11.332H6.66683C6.49002 11.332 6.32045 11.2618 6.19543 11.1368C6.0704 11.0117 6.00016 10.8422 6.00016 10.6654C6.00016 10.4886 6.0704 10.319 6.19543 10.194C6.32045 10.0689 6.49002 9.9987 6.66683 9.9987H7.3335V7.9987H6.66683C6.49002 7.9987 6.32045 7.92846 6.19543 7.80343C6.0704 7.67841 6.00016 7.50884 6.00016 7.33203C6.00016 7.15522 6.0704 6.98565 6.19543 6.86063C6.32045 6.7356 6.49002 6.66536 6.66683 6.66536H8.00016C8.17698 6.66536 8.34655 6.7356 8.47157 6.86063C8.59659 6.98565 8.66683 7.15522 8.66683 7.33203V9.9987H9.3335C9.51031 9.9987 9.67988 10.0689 9.8049 10.194C9.92993 10.319 10.0002 10.4886 10.0002 10.6654C10.0002 10.8422 9.92993 11.0117 9.8049 11.1368C9.67988 11.2618 9.51031 11.332 9.3335 11.332Z" } }] }, sr = me(function(t, e) {
1612
- return pe(ve, Object.assign({}, t, {
1672
+ rr.displayName = "FilterIcon";
1673
+ const Qi = {
1674
+ tag: "svg",
1675
+ attrs: {
1676
+ xmlns: "http://www.w3.org/2000/svg",
1677
+ fill: "none",
1678
+ viewBox: "0 0 16 16",
1679
+ width: "1em",
1680
+ height: "1em"
1681
+ },
1682
+ children: [{
1683
+ tag: "path",
1684
+ attrs: {
1685
+ fill: "currentColor",
1686
+ 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
+ }
1688
+ }]
1689
+ }, ir = ye(function(e, r) {
1690
+ return me(fe, Object.assign({}, e, {
1613
1691
  id: "info-icon",
1614
- ref: e,
1615
- icon: Gi
1692
+ ref: r,
1693
+ icon: Qi
1616
1694
  }));
1617
1695
  });
1618
- sr.displayName = "InfoIcon";
1619
- var Yi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, nr = me(function(t, e) {
1620
- return pe(ve, Object.assign({}, t, {
1696
+ ir.displayName = "InfoIcon";
1697
+ const Gi = {
1698
+ tag: "svg",
1699
+ attrs: {
1700
+ xmlns: "http://www.w3.org/2000/svg",
1701
+ fill: "none",
1702
+ viewBox: "0 0 16 16",
1703
+ width: "1em",
1704
+ height: "1em"
1705
+ },
1706
+ children: [{
1707
+ tag: "path",
1708
+ attrs: {
1709
+ fill: "currentColor",
1710
+ d: "M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z",
1711
+ fillRule: "evenodd",
1712
+ clipRule: "evenodd"
1713
+ }
1714
+ }]
1715
+ }, sr = ye(function(e, r) {
1716
+ return me(fe, Object.assign({}, e, {
1621
1717
  id: "success-icon",
1622
- ref: e,
1623
- icon: Yi
1718
+ ref: r,
1719
+ icon: Gi
1624
1720
  }));
1625
1721
  });
1626
- nr.displayName = "SuccessIcon";
1627
- function Zi(t) {
1628
- const { model: e } = t, r = B(G), s = x(e.cellFillColors$, [], !0), n = x(e.cellTextColors$, [], !0), a = H((o) => {
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) => {
1629
1725
  e.onFilterCheckToggled(o);
1630
- }, [e]), i = H((o) => {
1726
+ }, [e]), i = k((o) => {
1631
1727
  e.onFilterCheckToggled(o, !1);
1632
1728
  }, [e]);
1633
1729
  return /* @__PURE__ */ d(
@@ -1635,13 +1731,13 @@ function Zi(t) {
1635
1731
  {
1636
1732
  "data-u-comp": "sheets-filter-panel-colors-container",
1637
1733
  className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
1638
- children: /* @__PURE__ */ F(
1734
+ children: /* @__PURE__ */ N(
1639
1735
  "div",
1640
1736
  {
1641
1737
  "data-u-comp": "sheets-filter-panel",
1642
- className: we("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),
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),
1643
1739
  children: [
1644
- s.length > 1 && /* @__PURE__ */ F("div", { children: [
1740
+ s.length > 1 && /* @__PURE__ */ N("div", { children: [
1645
1741
  /* @__PURE__ */ d(
1646
1742
  "div",
1647
1743
  {
@@ -1653,7 +1749,7 @@ function Zi(t) {
1653
1749
  "div",
1654
1750
  {
1655
1751
  className: "univer-grid univer-grid-cols-8 univer-items-center univer-justify-start univer-gap-2",
1656
- children: s.map((o, l) => /* @__PURE__ */ F(
1752
+ children: s.map((o, l) => /* @__PURE__ */ N(
1657
1753
  "div",
1658
1754
  {
1659
1755
  className: "univer-relative univer-h-6 univer-w-6",
@@ -1663,16 +1759,16 @@ function Zi(t) {
1663
1759
  "button",
1664
1760
  {
1665
1761
  type: "button",
1666
- className: we("univer-box-border univer-h-6 univer-w-6 univer-cursor-pointer univer-rounded-full univer-border univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow hover:univer-ring-2 hover:univer-ring-offset-2 hover:univer-ring-offset-white"),
1762
+ className: Ae("univer-box-border univer-h-6 univer-w-6 univer-cursor-pointer univer-rounded-full univer-border univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow hover:univer-ring-2 hover:univer-ring-offset-2 hover:univer-ring-offset-white"),
1667
1763
  style: { backgroundColor: o.color }
1668
1764
  }
1669
1765
  ) : /* @__PURE__ */ d(
1670
- rr,
1766
+ tr,
1671
1767
  {
1672
1768
  className: "univer-h-6 univer-w-6 univer-cursor-pointer univer-rounded-full hover:univer-ring-2 hover:univer-ring-offset-2 hover:univer-ring-offset-white"
1673
1769
  }
1674
1770
  ),
1675
- o.checked && /* @__PURE__ */ d(bt, {})
1771
+ o.checked && /* @__PURE__ */ d(Ot, {})
1676
1772
  ]
1677
1773
  },
1678
1774
  `sheets-filter-cell-fill-color-${l}`
@@ -1680,7 +1776,7 @@ function Zi(t) {
1680
1776
  }
1681
1777
  )
1682
1778
  ] }),
1683
- n.length > 1 && /* @__PURE__ */ F("div", { children: [
1779
+ n.length > 1 && /* @__PURE__ */ N("div", { children: [
1684
1780
  /* @__PURE__ */ d(
1685
1781
  "div",
1686
1782
  {
@@ -1692,7 +1788,7 @@ function Zi(t) {
1692
1788
  "div",
1693
1789
  {
1694
1790
  className: "univer-grid univer-grid-cols-8 univer-items-center univer-justify-start univer-gap-2",
1695
- children: n.map((o, l) => /* @__PURE__ */ F(
1791
+ children: n.map((o, l) => /* @__PURE__ */ N(
1696
1792
  "div",
1697
1793
  {
1698
1794
  className: "univer-relative univer-h-6 univer-w-6",
@@ -1702,10 +1798,10 @@ function Zi(t) {
1702
1798
  "div",
1703
1799
  {
1704
1800
  className: "univer-box-border univer-flex univer-h-full univer-w-full univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-border univer-border-solid univer-border-[rgba(13,13,13,0.06)] univer-p-0.5 hover:univer-ring-2 hover:univer-ring-offset-2 hover:univer-ring-offset-white dark:!univer-border-[rgba(255,255,255,0.06)]",
1705
- children: /* @__PURE__ */ d(tr, { style: { color: o.color } })
1801
+ children: /* @__PURE__ */ d(er, { style: { color: o.color } })
1706
1802
  }
1707
1803
  ),
1708
- o.checked && /* @__PURE__ */ d(bt, {})
1804
+ o.checked && /* @__PURE__ */ d(Ot, {})
1709
1805
  ]
1710
1806
  },
1711
1807
  `sheets-filter-cell-text-color-${l}`
@@ -1726,13 +1822,13 @@ function Zi(t) {
1726
1822
  }
1727
1823
  );
1728
1824
  }
1729
- function bt() {
1825
+ function Ot() {
1730
1826
  return /* @__PURE__ */ d(
1731
1827
  "div",
1732
1828
  {
1733
1829
  className: "univer-absolute -univer-bottom-0.5 -univer-right-0.5 univer-flex univer-h-3 univer-w-3 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-bg-white",
1734
1830
  children: /* @__PURE__ */ d(
1735
- nr,
1831
+ sr,
1736
1832
  {
1737
1833
  className: "univer-h-full univer-w-full univer-font-bold univer-text-[#418F1F]"
1738
1834
  }
@@ -1740,28 +1836,28 @@ function bt() {
1740
1836
  }
1741
1837
  );
1742
1838
  }
1743
- function Ki(t) {
1839
+ function Yi(t) {
1744
1840
  var p, _;
1745
- const { model: e } = t, r = B(G), s = x(e.conditionItem$, void 0), n = x(e.filterConditionFormParams$, void 0), a = n != null && n.and ? "AND" : "OR", i = H((S) => {
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) => {
1746
1842
  e.onConditionFormChange({ and: S === "AND" });
1747
- }, [e]), o = qi(r), l = H((S) => {
1843
+ }, [e]), o = Zi(r), l = k((S) => {
1748
1844
  e.onPrimaryConditionChange(S);
1749
- }, [e]), c = Xi(r), h = H((S) => {
1845
+ }, [e]), c = Ki(r), h = k((S) => {
1750
1846
  e.onConditionFormChange(S);
1751
- }, [e]), f = r.t("sheets-filter.panel.input-values-placeholder");
1752
- function C(S, E, N) {
1753
- const b = m.getItemByOperator(S).numOfParameters === 1;
1754
- return /* @__PURE__ */ F(Nt, { children: [
1755
- N === "operator2" && /* @__PURE__ */ F(ci, { value: a, onChange: i, children: [
1756
- /* @__PURE__ */ d(Et, { value: "AND", children: r.t("sheets-filter.panel.and") }),
1757
- /* @__PURE__ */ d(Et, { value: "OR", children: r.t("sheets-filter.panel.or") })
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") })
1758
1854
  ] }),
1759
1855
  /* @__PURE__ */ d(
1760
- Tt,
1856
+ Ct,
1761
1857
  {
1762
1858
  value: S,
1763
1859
  options: c,
1764
- onChange: (y) => h({ [N]: y })
1860
+ onChange: (y) => h({ [F]: y })
1765
1861
  }
1766
1862
  ),
1767
1863
  b && /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d(
@@ -1769,8 +1865,8 @@ function Ki(t) {
1769
1865
  {
1770
1866
  className: "univer-mt-2",
1771
1867
  value: E,
1772
- placeholder: f,
1773
- onChange: (y) => h({ [N === "operator1" ? "val1" : "val2"]: y })
1868
+ placeholder: m,
1869
+ onChange: (y) => h({ [F === "operator1" ? "val1" : "val2"]: y })
1774
1870
  }
1775
1871
  ) })
1776
1872
  ] });
@@ -1780,17 +1876,17 @@ function Ki(t) {
1780
1876
  {
1781
1877
  "data-u-comp": "sheets-filter-panel-conditions-container",
1782
1878
  className: "univer-flex univer-h-full univer-min-h-[300px] univer-flex-col",
1783
- children: s && n && /* @__PURE__ */ F(Nt, { children: [
1784
- /* @__PURE__ */ d(Tt, { value: s.operator, options: o, onChange: l }),
1785
- m.getItemByOperator(s.operator).numOfParameters !== 0 ? /* @__PURE__ */ F(
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(
1786
1882
  "div",
1787
1883
  {
1788
1884
  "data-u-comp": "sheets-filter-panel-conditions-container-inner",
1789
- className: we("univer-mt-2 univer-flex-grow univer-overflow-hidden univer-rounded-md univer-p-2", ct),
1885
+ className: Ae("univer-mt-2 univer-flex-grow univer-overflow-hidden univer-rounded-md univer-p-2", at),
1790
1886
  children: [
1791
1887
  s.numOfParameters >= 1 && C(n.operator1, (p = n.val1) != null ? p : "", "operator1"),
1792
1888
  s.numOfParameters >= 2 && C(n.operator2, (_ = n.val2) != null ? _ : "", "operator2"),
1793
- /* @__PURE__ */ F(
1889
+ /* @__PURE__ */ N(
1794
1890
  "div",
1795
1891
  {
1796
1892
  "data-u-comp": "sheets-filter-panel-conditions-desc",
@@ -1809,56 +1905,56 @@ function Ki(t) {
1809
1905
  }
1810
1906
  );
1811
1907
  }
1812
- function qi(t) {
1908
+ function Zi(t) {
1813
1909
  const e = t.getCurrentLocale();
1814
- return ut(() => [
1910
+ return ct(() => [
1815
1911
  {
1816
1912
  options: [
1817
- { label: t.t(m.NONE.label), value: m.NONE.operator }
1913
+ { label: t.t(f.NONE.label), value: f.NONE.operator }
1818
1914
  ]
1819
1915
  },
1820
1916
  {
1821
1917
  options: [
1822
- { label: t.t(m.EMPTY.label), value: m.EMPTY.operator },
1823
- { label: t.t(m.NOT_EMPTY.label), value: m.NOT_EMPTY.operator }
1918
+ { label: t.t(f.EMPTY.label), value: f.EMPTY.operator },
1919
+ { label: t.t(f.NOT_EMPTY.label), value: f.NOT_EMPTY.operator }
1824
1920
  ]
1825
1921
  },
1826
1922
  {
1827
1923
  options: [
1828
- { label: t.t(m.TEXT_CONTAINS.label), value: m.TEXT_CONTAINS.operator },
1829
- { label: t.t(m.DOES_NOT_CONTAIN.label), value: m.DOES_NOT_CONTAIN.operator },
1830
- { label: t.t(m.STARTS_WITH.label), value: m.STARTS_WITH.operator },
1831
- { label: t.t(m.ENDS_WITH.label), value: m.ENDS_WITH.operator },
1832
- { label: t.t(m.EQUALS.label), value: m.EQUALS.operator }
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 }
1833
1929
  ]
1834
1930
  },
1835
1931
  {
1836
1932
  options: [
1837
- { label: t.t(m.GREATER_THAN.label), value: m.GREATER_THAN.operator },
1838
- { label: t.t(m.GREATER_THAN_OR_EQUAL.label), value: m.GREATER_THAN_OR_EQUAL.operator },
1839
- { label: t.t(m.LESS_THAN.label), value: m.LESS_THAN.operator },
1840
- { label: t.t(m.LESS_THAN_OR_EQUAL.label), value: m.LESS_THAN_OR_EQUAL.operator },
1841
- { label: t.t(m.EQUAL.label), value: m.EQUAL.operator },
1842
- { label: t.t(m.NOT_EQUAL.label), value: m.NOT_EQUAL.operator },
1843
- { label: t.t(m.BETWEEN.label), value: m.BETWEEN.operator },
1844
- { label: t.t(m.NOT_BETWEEN.label), value: m.NOT_BETWEEN.operator }
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 }
1845
1941
  ]
1846
1942
  },
1847
1943
  {
1848
1944
  options: [
1849
- { label: t.t(m.CUSTOM.label), value: m.CUSTOM.operator }
1945
+ { label: t.t(f.CUSTOM.label), value: f.CUSTOM.operator }
1850
1946
  ]
1851
1947
  }
1852
1948
  ], [e, t]);
1853
1949
  }
1854
- function Xi(t) {
1950
+ function Ki(t) {
1855
1951
  const e = t.getCurrentLocale();
1856
- return ut(() => m.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: t.t(r.label), value: r.operator })), [e, t]);
1952
+ return ct(() => f.ALL_CONDITIONS.filter((r) => r.numOfParameters !== 2).map((r) => ({ label: t.t(r.label), value: r.operator })), [e, t]);
1857
1953
  }
1858
- function zi(t) {
1859
- const { model: e } = t, r = B(G), s = x(e.searchString$, "", !0), n = x(e.filterItems$, void 0, !0), a = r.t("sheets-filter.panel.filter-only"), i = ze(n), o = i.checked > 0 && i.unchecked === 0, l = i.checked > 0 && i.unchecked > 0, c = e.treeMapCache, h = H(() => {
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(() => {
1860
1956
  e.onCheckAllToggled(!o);
1861
- }, [e, o]), f = H((p) => {
1957
+ }, [e, o]), m = k((p) => {
1862
1958
  e.setSearchString(p);
1863
1959
  }, [e]);
1864
1960
  function C(p) {
@@ -1867,7 +1963,7 @@ function zi(t) {
1867
1963
  S.checked && _.push(S.key), S.children && (_ = _.concat(C(S.children)));
1868
1964
  }), _;
1869
1965
  }
1870
- return /* @__PURE__ */ F(
1966
+ return /* @__PURE__ */ N(
1871
1967
  "div",
1872
1968
  {
1873
1969
  "data-u-comp": "sheets-filter-panel-values-container",
@@ -1879,28 +1975,28 @@ function zi(t) {
1879
1975
  autoFocus: !0,
1880
1976
  value: s,
1881
1977
  placeholder: r.t("sheets-filter.panel.search-placeholder"),
1882
- onChange: f
1978
+ onChange: m
1883
1979
  }
1884
1980
  ),
1885
- /* @__PURE__ */ F(
1981
+ /* @__PURE__ */ N(
1886
1982
  "div",
1887
1983
  {
1888
1984
  "data-u-comp": "sheets-filter-panel",
1889
- className: we("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),
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),
1890
1986
  children: [
1891
1987
  /* @__PURE__ */ d(
1892
1988
  "div",
1893
1989
  {
1894
1990
  "data-u-comp": "sheets-filter-panel-values-item",
1895
1991
  className: "univer-box-border univer-h-8 univer-w-full univer-py-0.5",
1896
- children: /* @__PURE__ */ F(
1992
+ children: /* @__PURE__ */ N(
1897
1993
  "div",
1898
1994
  {
1899
1995
  "data-u-comp": "sheets-filter-panel-values-item-inner",
1900
1996
  className: "univer-box-border univer-flex univer-h-7 univer-items-center univer-rounded-md univer-pb-0 univer-pl-5 univer-pr-0.5 univer-pt-0 univer-text-sm",
1901
1997
  children: [
1902
1998
  /* @__PURE__ */ d(
1903
- ui,
1999
+ ci,
1904
2000
  {
1905
2001
  indeterminate: l,
1906
2002
  disabled: n.length === 0,
@@ -1930,7 +2026,7 @@ function zi(t) {
1930
2026
  }
1931
2027
  ),
1932
2028
  /* @__PURE__ */ d("div", { "data-u-comp": "sheets-filter-panel-values-virtual", className: "univer-flex-grow", children: /* @__PURE__ */ d(
1933
- hi,
2029
+ ui,
1934
2030
  {
1935
2031
  data: n,
1936
2032
  defaultExpandAll: !1,
@@ -1947,7 +2043,7 @@ function zi(t) {
1947
2043
  univer-text-gray-900 dark:hover:!univer-bg-gray-900
1948
2044
  dark:!univer-text-white
1949
2045
  `,
1950
- attachRender: (p) => /* @__PURE__ */ F(
2046
+ attachRender: (p) => /* @__PURE__ */ N(
1951
2047
  "div",
1952
2048
  {
1953
2049
  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",
@@ -1987,35 +2083,35 @@ function zi(t) {
1987
2083
  }
1988
2084
  );
1989
2085
  }
1990
- function Ji() {
1991
- const t = B(Er);
1992
- if (!x(t.visible$, void 0, !0)) return null;
1993
- const r = B(G), s = B(Bt), n = x(t.enabled$, void 0, !0);
1994
- return /* @__PURE__ */ F(
2086
+ function Xi() {
2087
+ 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(
1995
2091
  "div",
1996
2092
  {
1997
2093
  className: "univer-mt-2 univer-flex univer-items-center univer-justify-between univer-text-sm univer-text-gray-900 dark:!univer-text-gray-200",
1998
2094
  children: [
1999
- /* @__PURE__ */ F("div", { className: "univer-flex univer-items-center univer-gap-1", children: [
2095
+ /* @__PURE__ */ N("div", { className: "univer-flex univer-items-center univer-gap-1", children: [
2000
2096
  /* @__PURE__ */ d("span", { children: r.t("sheets-filter.sync.title") }),
2001
2097
  /* @__PURE__ */ d(
2002
- di,
2098
+ hi,
2003
2099
  {
2004
2100
  title: n ? r.t("sheets-filter.sync.statusTips.off") : r.t("sheets-filter.sync.statusTips.on"),
2005
2101
  asChild: !0,
2006
- children: /* @__PURE__ */ d(sr, { className: "univer-block" })
2102
+ children: /* @__PURE__ */ d(ir, { className: "univer-block" })
2007
2103
  }
2008
2104
  )
2009
2105
  ] }),
2010
2106
  /* @__PURE__ */ d(
2011
- fi,
2107
+ di,
2012
2108
  {
2013
2109
  defaultChecked: n,
2014
2110
  onChange: (a) => {
2015
2111
  const i = a ? r.t("sheets-filter.sync.switchTips.on") : r.t("sheets-filter.sync.switchTips.off");
2016
2112
  t.setEnabled(a), s.show({
2017
2113
  content: i,
2018
- type: Yt.Success,
2114
+ type: jt.Success,
2019
2115
  duration: 2e3
2020
2116
  });
2021
2117
  }
@@ -2025,25 +2121,25 @@ function Ji() {
2025
2121
  }
2026
2122
  );
2027
2123
  }
2028
- function es() {
2124
+ function zi() {
2029
2125
  var E;
2030
- const t = B(z), e = B(G), r = B(Y), s = x(t.filterBy$, void 0, !0), n = x(t.filterByModel$, void 0, !1), a = x(() => (n == null ? void 0 : n.canApply$) || fe(!1), void 0, !1, [n]), i = ts(e), o = !x(t.hasCriteria$), l = H((N) => {
2031
- r.executeCommand(Xt.id, { filterBy: N });
2032
- }, [r]), c = H(async () => {
2033
- await (n == null ? void 0 : n.clear()), r.executeCommand(Ee.id);
2034
- }, [n, r]), h = H(() => {
2035
- r.executeCommand(Ee.id);
2036
- }, [r]), f = H(async () => {
2037
- await (n == null ? void 0 : n.apply()), r.executeCommand(Ee.id);
2038
- }, [n, r]), p = (E = B(J).activeFilterModel) == null ? void 0 : E.getRange(), _ = t.col, S = Ur(wr.FILTER_PANEL_EMBED_POINT);
2039
- return /* @__PURE__ */ F(
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(
2040
2136
  "div",
2041
2137
  {
2042
2138
  "data-u-comp": "sheets-filter-panel",
2043
2139
  className: "univer-box-border univer-flex univer-max-h-[500px] univer-w-[400px] univer-flex-col univer-rounded-lg univer-bg-white univer-p-4 univer-shadow-lg dark:!univer-border-gray-600 dark:!univer-bg-gray-700",
2044
2140
  children: [
2045
2141
  /* @__PURE__ */ d(
2046
- kr,
2142
+ Ur,
2047
2143
  {
2048
2144
  components: S,
2049
2145
  sharedProps: { range: p, colIndex: _, onClose: h }
@@ -2054,7 +2150,7 @@ function es() {
2054
2150
  {
2055
2151
  value: s,
2056
2152
  items: i,
2057
- onChange: (N) => l(N)
2153
+ onChange: (F) => l(F)
2058
2154
  }
2059
2155
  ) }),
2060
2156
  n ? /* @__PURE__ */ d(
@@ -2062,20 +2158,20 @@ function es() {
2062
2158
  {
2063
2159
  "data-u-comp": "sheets-filter-panel-content",
2064
2160
  className: "univer-flex-shrink univer-flex-grow univer-pt-2",
2065
- children: s === P.VALUES ? /* @__PURE__ */ d(zi, { model: n }) : s === P.COLORS ? /* @__PURE__ */ d(Zi, { model: n }) : /* @__PURE__ */ d(Ki, { model: n })
2161
+ children: s === P.VALUES ? /* @__PURE__ */ d(qi, { model: n }) : s === P.COLORS ? /* @__PURE__ */ d(ji, { model: n }) : /* @__PURE__ */ d(Yi, { model: n })
2066
2162
  }
2067
2163
  ) : /* @__PURE__ */ d("div", { className: "univer-flex-1" }),
2068
- /* @__PURE__ */ d(Ji, {}),
2069
- /* @__PURE__ */ F(
2164
+ /* @__PURE__ */ d(Xi, {}),
2165
+ /* @__PURE__ */ N(
2070
2166
  "div",
2071
2167
  {
2072
2168
  "data-u-comp": "sheets-filter-panel-footer",
2073
2169
  className: "univer-mt-4 univer-inline-flex univer-flex-shrink-0 univer-flex-grow-0 univer-flex-nowrap univer-justify-between univer-overflow-hidden",
2074
2170
  children: [
2075
- /* @__PURE__ */ d(Ze, { variant: "link", onClick: c, disabled: o, children: e.t("sheets-filter.panel.clear-filter") }),
2076
- /* @__PURE__ */ F("span", { className: "univer-flex univer-gap-2", children: [
2077
- /* @__PURE__ */ d(Ze, { variant: "default", onClick: h, children: e.t("sheets-filter.panel.cancel") }),
2078
- /* @__PURE__ */ d(Ze, { disabled: !a, variant: "primary", onClick: f, children: e.t("sheets-filter.panel.confirm") })
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") })
2079
2175
  ] })
2080
2176
  ]
2081
2177
  }
@@ -2084,136 +2180,136 @@ function es() {
2084
2180
  }
2085
2181
  );
2086
2182
  }
2087
- function ts(t) {
2183
+ function Ji(t) {
2088
2184
  const e = t.getCurrentLocale();
2089
- return ut(() => [
2185
+ return ct(() => [
2090
2186
  { label: t.t("sheets-filter.panel.by-values"), value: P.VALUES },
2091
2187
  { label: t.t("sheets-filter.panel.by-colors"), value: P.COLORS },
2092
2188
  { label: t.t("sheets-filter.panel.by-conditions"), value: P.CONDITIONS }
2093
2189
  ], [e, t]);
2094
2190
  }
2095
- function rs(t) {
2096
- const e = t.get(J);
2191
+ function es(t) {
2192
+ const e = t.get(z);
2097
2193
  return {
2098
- id: Oe.id,
2099
- type: lt.BUTTON_SELECTOR,
2194
+ id: Ne.id,
2195
+ type: ot.BUTTON_SELECTOR,
2100
2196
  icon: "FilterIcon",
2101
2197
  tooltip: "sheets-filter.toolbar.smart-toggle-filter-tooltip",
2102
- hidden$: ot(t, se.UNIVER_SHEET),
2103
- activated$: e.activeFilterModel$.pipe(ce((r) => !!r)),
2104
- disabled$: Pr(
2198
+ hidden$: nt(t, ie.UNIVER_SHEET),
2199
+ activated$: e.activeFilterModel$.pipe(ae((r) => !!r)),
2200
+ disabled$: wr(
2105
2201
  t,
2106
- Lr(
2202
+ Pr(
2107
2203
  t,
2108
2204
  {
2109
- worksheetTypes: [ge, Se],
2110
- rangeTypes: [Ce]
2205
+ worksheetTypes: [ve, _e],
2206
+ rangeTypes: [ge]
2111
2207
  }
2112
2208
  )
2113
2209
  )
2114
2210
  };
2115
2211
  }
2116
- function is(t) {
2117
- const e = t.get(J);
2212
+ function ts(t) {
2213
+ const e = t.get(z);
2118
2214
  return {
2119
- id: nt.id,
2120
- type: lt.BUTTON,
2215
+ id: st.id,
2216
+ type: ot.BUTTON,
2121
2217
  title: "sheets-filter.toolbar.clear-filter-criteria",
2122
- hidden$: ot(t, se.UNIVER_SHEET),
2123
- disabled$: e.activeFilterModel$.pipe(at((r) => {
2218
+ hidden$: nt(t, ie.UNIVER_SHEET),
2219
+ disabled$: e.activeFilterModel$.pipe(lt((r) => {
2124
2220
  var s;
2125
- return (s = r == null ? void 0 : r.hasCriteria$.pipe(ce((n) => !n))) != null ? s : fe(!0);
2221
+ return (s = r == null ? void 0 : r.hasCriteria$.pipe(ae((n) => !n))) != null ? s : de(!0);
2126
2222
  }))
2127
2223
  };
2128
2224
  }
2129
- function ss(t) {
2130
- const e = t.get(J);
2225
+ function rs(t) {
2226
+ const e = t.get(z);
2131
2227
  return {
2132
- id: st.id,
2133
- type: lt.BUTTON,
2228
+ id: it.id,
2229
+ type: ot.BUTTON,
2134
2230
  title: "sheets-filter.toolbar.re-calc-filter-conditions",
2135
- hidden$: ot(t, se.UNIVER_SHEET),
2136
- disabled$: e.activeFilterModel$.pipe(at((r) => {
2231
+ hidden$: nt(t, ie.UNIVER_SHEET),
2232
+ disabled$: e.activeFilterModel$.pipe(lt((r) => {
2137
2233
  var s;
2138
- return (s = r == null ? void 0 : r.hasCriteria$.pipe(ce((n) => !n))) != null ? s : fe(!0);
2234
+ return (s = r == null ? void 0 : r.hasCriteria$.pipe(ae((n) => !n))) != null ? s : de(!0);
2139
2235
  }))
2140
2236
  };
2141
2237
  }
2142
- const ns = {
2143
- [Hr.ORGANIZATION]: {
2144
- [Oe.id]: {
2238
+ const is = {
2239
+ [kr.ORGANIZATION]: {
2240
+ [Ne.id]: {
2145
2241
  order: 2,
2146
- menuItemFactory: rs,
2147
- [nt.id]: {
2242
+ menuItemFactory: es,
2243
+ [st.id]: {
2148
2244
  order: 0,
2149
- menuItemFactory: is
2245
+ menuItemFactory: ts
2150
2246
  },
2151
- [st.id]: {
2247
+ [it.id]: {
2152
2248
  order: 1,
2153
- menuItemFactory: ss
2249
+ menuItemFactory: rs
2154
2250
  }
2155
2251
  }
2156
2252
  }
2157
- }, os = {
2158
- id: Oe.id,
2159
- binding: Dr.L | gt.CTRL_COMMAND | gt.SHIFT,
2253
+ }, ss = {
2254
+ id: Ne.id,
2255
+ binding: Hr.L | _t.CTRL_COMMAND | _t.SHIFT,
2160
2256
  description: "sheets-filter.shortcut.smart-toggle-filter",
2161
- preconditions: Mr,
2257
+ preconditions: $r,
2162
2258
  group: "4_sheet-edit"
2163
2259
  };
2164
- var ls = Object.getOwnPropertyDescriptor, as = (t, e, r, s) => {
2165
- for (var n = s > 1 ? void 0 : s ? ls(e, r) : e, a = t.length - 1, i; a >= 0; a--)
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--)
2166
2262
  (i = t[a]) && (n = i(n) || n);
2167
2263
  return n;
2168
- }, M = (t, e) => (r, s) => e(r, s, t);
2169
- const Rt = "FILTER_PANEL_POPUP";
2170
- let He = class extends ye {
2171
- constructor(e, r, s, n, a, i, o, l, c, h, f, C, p) {
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) {
2172
2268
  super(p, C);
2173
2269
  v(this, "_popupDisposable");
2174
- 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();
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();
2175
2271
  }
2176
2272
  dispose() {
2177
2273
  super.dispose(), this._closeFilterPopup();
2178
2274
  }
2179
2275
  _initShortcuts() {
2180
2276
  [
2181
- os
2277
+ ss
2182
2278
  ].forEach((e) => {
2183
2279
  this.disposeWithMe(this._shortcutService.registerShortcut(e));
2184
2280
  });
2185
2281
  }
2186
2282
  _initCommands() {
2187
2283
  [
2188
- Oe,
2189
- Nr,
2284
+ Ne,
2285
+ Er,
2190
2286
  Fr,
2191
- Q,
2192
- nt,
2287
+ V,
2193
2288
  st,
2194
- Xt,
2195
- xe,
2196
- Ee
2289
+ it,
2290
+ qt,
2291
+ Me,
2292
+ Ce
2197
2293
  ].forEach((e) => {
2198
2294
  this.disposeWithMe(this._commandService.registerCommand(e));
2199
2295
  });
2200
2296
  }
2201
2297
  _initMenuItems() {
2202
- this._menuManagerService.mergeMenu(ns);
2298
+ this._menuManagerService.mergeMenu(is);
2203
2299
  }
2204
2300
  _initUI() {
2205
2301
  [
2206
- [Rt, es],
2207
- ["FilterIcon", ir]
2302
+ [bt, zi],
2303
+ ["FilterIcon", rr]
2208
2304
  ].forEach(([e, r]) => {
2209
2305
  this.disposeWithMe(
2210
2306
  this._componentManager.register(e, r)
2211
2307
  );
2212
- }), this.disposeWithMe(this._contextService.subscribeContextValue$(ue).pipe(oi()).subscribe((e) => {
2308
+ }), this.disposeWithMe(this._contextService.subscribeContextValue$(ce).pipe(ni()).subscribe((e) => {
2213
2309
  e ? this._openFilterPopup() : this._closeFilterPopup();
2214
2310
  })), this.disposeWithMe(this._sheetsFilterService.errorMsg$.subscribe((e) => {
2215
2311
  e && this._messageService.show({
2216
- type: Yt.Error,
2312
+ type: jt.Error,
2217
2313
  content: this._localeService.t(e)
2218
2314
  });
2219
2315
  }));
@@ -2224,9 +2320,9 @@ let He = class extends ye {
2224
2320
  throw new Error("[SheetsFilterUIController]: no filter model when opening filter popup!");
2225
2321
  const r = e.getRange(), s = this._sheetsFilterPanelService.col, { startRow: n } = r;
2226
2322
  this._popupDisposable = this._sheetCanvasPopupService.attachPopupToCell(n, s, {
2227
- componentKey: Rt,
2323
+ componentKey: bt,
2228
2324
  direction: "horizontal",
2229
- onClickOutside: () => this._commandService.syncExecuteCommand(Ee.id),
2325
+ onClickOutside: () => this._commandService.syncExecuteCommand(Ce.id),
2230
2326
  offset: [5, 0]
2231
2327
  });
2232
2328
  }
@@ -2235,97 +2331,97 @@ let He = class extends ye {
2235
2331
  (e = this._popupDisposable) == null || e.dispose(), this._popupDisposable = null;
2236
2332
  }
2237
2333
  };
2238
- He = as([
2239
- M(0, T(ie)),
2240
- M(1, T(Br)),
2241
- M(2, T(z)),
2242
- M(3, T($r)),
2243
- M(4, T(J)),
2244
- M(5, T(G)),
2245
- M(6, Wr),
2246
- M(7, Y),
2247
- M(8, Vr),
2248
- M(9, Ve),
2249
- M(10, Bt),
2250
- M(11, T(Dt)),
2251
- M(12, Wt)
2252
- ], He);
2253
- var cs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, hs = (t, e, r) => e in t ? cs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, ds = (t, e, r, s) => {
2254
- for (var n = s > 1 ? void 0 : s ? us(e, r) : e, a = t.length - 1, i; a >= 0; a--)
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)
2348
+ ], 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--)
2255
2351
  (i = t[a]) && (n = i(n) || n);
2256
2352
  return n;
2257
- }, Xe = (t, e) => (r, s) => e(r, s, t), or = (t, e, r) => hs(t, typeof e != "symbol" ? e + "" : e, r);
2258
- const fs = "SHEET_FILTER_UI_PLUGIN";
2259
- let De = class extends it {
2260
- constructor(t = Ue, e, r, s) {
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 {
2356
+ constructor(t = xe, e, r, s) {
2261
2357
  super(), this._config = t, this._injector = e, this._configService = r, this._rpcChannelService = s;
2262
- const { menu: n, ...a } = kt(
2358
+ const { menu: n, ...a } = Ut(
2263
2359
  {},
2264
- Ue,
2360
+ xe,
2265
2361
  this._config
2266
2362
  );
2267
- n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(zt, a);
2363
+ n && this._configService.setConfig("menu", n, { merge: !0 }), this._configService.setConfig(Xt, a);
2268
2364
  }
2269
2365
  onStarting() {
2270
- vr(this._injector, [
2271
- [z],
2272
- [he],
2273
- [He]
2274
- ]), this._config.useRemoteFilterValuesGenerator && this._rpcChannelService && this._injector.add([Pe, {
2275
- useFactory: () => li(
2276
- this._rpcChannelService.requestChannel(ht)
2366
+ pr(this._injector, [
2367
+ [X],
2368
+ [ue],
2369
+ [ke]
2370
+ ]), this._config.useRemoteFilterValuesGenerator && this._rpcChannelService && this._injector.add([we, {
2371
+ useFactory: () => oi(
2372
+ this._rpcChannelService.requestChannel(ut)
2277
2373
  )
2278
2374
  }]);
2279
2375
  }
2280
2376
  onReady() {
2281
- vt(this._injector, [
2282
- [he]
2377
+ pt(this._injector, [
2378
+ [ue]
2283
2379
  ]);
2284
2380
  }
2285
2381
  onRendered() {
2286
- vt(this._injector, [
2287
- [He]
2382
+ pt(this._injector, [
2383
+ [ke]
2288
2384
  ]);
2289
2385
  }
2290
2386
  };
2291
- or(De, "type", se.UNIVER_SHEET);
2292
- or(De, "pluginName", fs);
2293
- De = ds([
2294
- xt(Ht),
2295
- Xe(1, T(ie)),
2296
- Xe(2, Ut),
2297
- Xe(3, pr(jt))
2298
- ], De);
2299
- var ms = Object.getOwnPropertyDescriptor, ps = (t, e, r, s) => {
2300
- for (var n = s > 1 ? void 0 : s ? ms(e, r) : e, a = t.length - 1, i; a >= 0; a--)
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))
2394
+ ], 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--)
2301
2397
  (i = t[a]) && (n = i(n) || n);
2302
2398
  return n;
2303
- }, At = (t, e) => (r, s) => e(r, s, t), be;
2304
- let wt = (be = class extends it {
2399
+ }, Rt = (t, e) => (r, s) => e(r, s, t), Oe;
2400
+ let At = (Oe = class extends rt {
2305
2401
  constructor(t, e, r) {
2306
2402
  super(), this._config = t, this._injector = e, this._rpcChannelService = r;
2307
2403
  }
2308
2404
  onStarting() {
2309
2405
  [
2310
- [Pe, { useClass: Je }]
2406
+ [we, { useClass: ze }]
2311
2407
  ].forEach((t) => this._injector.add(t));
2312
2408
  }
2313
2409
  onReady() {
2314
2410
  this._rpcChannelService.registerChannel(
2315
- ht,
2316
- ai(this._injector.get(Pe))
2411
+ ut,
2412
+ li(this._injector.get(we))
2317
2413
  );
2318
2414
  }
2319
- }, v(be, "type", se.UNIVER_SHEET), v(be, "pluginName", "SHEET_FILTER_UI_WORKER_PLUGIN"), be);
2320
- wt = ps([
2321
- At(1, T(ie)),
2322
- At(2, jt)
2323
- ], wt);
2415
+ }, 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);
2324
2420
  export {
2325
- Xt as ChangeFilterByOperation,
2326
- Ee as CloseFilterPanelOperation,
2327
- xe as OpenFilterPanelOperation,
2328
- ke as UniverSheetsFilterMobileUIPlugin,
2329
- De as UniverSheetsFilterUIPlugin,
2330
- wt as UniverSheetsFilterUIWorkerPlugin
2421
+ qt as ChangeFilterByOperation,
2422
+ Ce as CloseFilterPanelOperation,
2423
+ Me as OpenFilterPanelOperation,
2424
+ Ue as UniverSheetsFilterMobileUIPlugin,
2425
+ He as UniverSheetsFilterUIPlugin,
2426
+ At as UniverSheetsFilterUIWorkerPlugin
2331
2427
  };