@univerjs/sheets-filter-ui 0.21.1 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,41 +1,48 @@
1
1
  # @univerjs/sheets-filter-ui
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs/sheets-filter-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-filter-ui)
4
+ [![license](https://img.shields.io/npm/l/@univerjs/sheets-filter-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-filter-ui)
5
+ [![downloads](https://img.shields.io/npm/dm/@univerjs/sheets-filter-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-filter-ui)
6
+
7
+ `@univerjs/sheets-filter-ui` adds filter menus, panels, and interaction UI for Univer Sheets.
8
+
3
9
  ## Package Overview
4
10
 
5
- | Package Name | UMD Namespace | Version | License | Downloads | Contains CSS | Contains i18n locales |
6
- | --- | --- | --- | --- | --- | :---: | :---: |
7
- | `@univerjs/sheets-filter-ui` | `UniverSheetsFilterUi` | [![][npm-version-shield]][npm-version-link] | ![][npm-license-shield] | ![][npm-downloads-shield] | ⭕️ | ⭕️ |
11
+ | Package | UMD global | CSS | Locales | Facade entry |
12
+ | --- | --- | :---: | :---: | :---: |
13
+ | `@univerjs/sheets-filter-ui` | `UniverSheetsFilterUi` | Yes | Yes | No |
8
14
 
9
- ## Introduction
15
+ ## Installation
10
16
 
11
- `@univerjs/sheets-filter-ui` provides a user interface for filtering in sheets.
17
+ ```sh
18
+ pnpm add @univerjs/sheets-filter-ui
19
+ # or
20
+ npm install @univerjs/sheets-filter-ui
21
+ ```
12
22
 
13
- ## Usage
23
+ Keep all `@univerjs/*` packages on the same version.
14
24
 
15
- You should use this plugin with the `@univerjs/sheets-filter` package.
25
+ ## Usage
16
26
 
17
- ```typescript
27
+ ```ts
18
28
  import '@univerjs/sheets-filter-ui/lib/index.css';
19
-
20
- import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
29
+ import EnUS from '@univerjs/sheets-filter-ui/locale/en-US';
21
30
  import { UniverSheetsFilterUIPlugin } from '@univerjs/sheets-filter-ui';
22
31
 
23
- univer.registerPlugin(UniverSheetsFilterPlugin);
24
32
  univer.registerPlugin(UniverSheetsFilterUIPlugin);
33
+
34
+ // Merge EnUS into your Univer locale map when this package contributes UI text.
25
35
  ```
26
36
 
27
- ### Installation
37
+ Exported plugin classes:
28
38
 
29
- ```shell
30
- # Using npm
31
- npm install @univerjs/sheets-filter-ui
39
+ - `UniverSheetsFilterUIPlugin`
40
+ - `UniverSheetsFilterMobileUIPlugin`
41
+ - `UniverSheetsFilterUIWorkerPlugin`
32
42
 
33
- # Using pnpm
34
- pnpm add @univerjs/sheets-filter-ui
35
- ```
43
+ ## Resources
44
+
45
+ - [Documentation](https://docs.univer.ai)
46
+ - [NPM package](https://npmjs.com/package/@univerjs/sheets-filter-ui)
47
+ - [GitHub repository](https://github.com/dream-num/univer)
36
48
 
37
- <!-- Links -->
38
- [npm-version-shield]: https://img.shields.io/npm/v/@univerjs/sheets-filter-ui?style=flat-square
39
- [npm-version-link]: https://npmjs.com/package/@univerjs/sheets-filter-ui
40
- [npm-license-shield]: https://img.shields.io/npm/l/@univerjs/sheets-filter-ui?style=flat-square
41
- [npm-downloads-shield]: https://img.shields.io/npm/dm/@univerjs/sheets-filter-ui?style=flat-square
package/lib/cjs/index.js CHANGED
@@ -12,113 +12,19 @@ let _univerjs_icons = require("@univerjs/icons");
12
12
  let react = require("react");
13
13
  let react_jsx_runtime = require("react/jsx-runtime");
14
14
 
15
- //#region src/models/extended-operators.ts
16
- /**
17
- * Copyright 2023-present DreamNum Co., Ltd.
18
- *
19
- * Licensed under the Apache License, Version 2.0 (the "License");
20
- * you may not use this file except in compliance with the License.
21
- * You may obtain a copy of the License at
22
- *
23
- * http://www.apache.org/licenses/LICENSE-2.0
24
- *
25
- * Unless required by applicable law or agreed to in writing, software
26
- * distributed under the License is distributed on an "AS IS" BASIS,
27
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
- * See the License for the specific language governing permissions and
29
- * limitations under the License.
30
- */
31
- let OperatorOrder = /* @__PURE__ */ function(OperatorOrder) {
32
- OperatorOrder[OperatorOrder["FIRST"] = 0] = "FIRST";
33
- OperatorOrder[OperatorOrder["SECOND"] = 1] = "SECOND";
34
- return OperatorOrder;
35
- }({});
36
- /**
37
- * Extended custom filter operators.
38
- *
39
- * These operators are not defined in OOXML,
40
- * so when exporting these operators we need to fallback to `CustomFilterOperator` and
41
- * other possible filter types.
42
- */
43
- let ExtendCustomFilterOperator = /* @__PURE__ */ function(ExtendCustomFilterOperator) {
44
- ExtendCustomFilterOperator["NONE"] = "none";
45
- /** Fallback to `<customFilter val="123*" />` */
46
- ExtendCustomFilterOperator["STARTS_WITH"] = "startsWith";
47
- /** Fallback to `<customFilter operator="notEqual" val="123*" />` */
48
- ExtendCustomFilterOperator["DOES_NOT_START_WITH"] = "doesNotStartWith";
49
- /** Fallback to `<customFilter val="*123" />` */
50
- ExtendCustomFilterOperator["ENDS_WITH"] = "endsWith";
51
- /** Fallback to `<customFilter operator="notEqual" val="*123" />` */
52
- ExtendCustomFilterOperator["DOES_NOT_END_WITH"] = "doesNotEndWith";
53
- /** Fallback to `<customFilter val="*123*" />` */
54
- ExtendCustomFilterOperator["CONTAINS"] = "contains";
55
- /** Fallback to `<customFilter operator="notEqual" val="*123*" />` */
56
- ExtendCustomFilterOperator["DOES_NOT_CONTAIN"] = "doesNotContain";
57
- /**
58
- * Text equals. It is not same as CustomFilterOperator.EQUAL.
59
- *
60
- * When equals empty, it will be mapped to.
61
- *
62
- * <autoFilter>
63
- * <filterColumn colId="0">
64
- * <filters blank="1"/>
65
- * </filterColumn>
66
- * </autoFilter>
67
- */
68
- ExtendCustomFilterOperator["EQUALS"] = "equals";
69
- /** Fallback to `<customFilter operator="notEqual" val="" />` */
70
- ExtendCustomFilterOperator["NOT_EQUALS"] = "notEquals";
71
- /**
72
- * Fallback to `<filter blank="1" />`.
73
- *
74
- * It can also fallback to `<customFilter val="" />`, when with another custom filter.
75
- */
76
- ExtendCustomFilterOperator["EMPTY"] = "empty";
77
- /** Fallback to `<customFilter operator="notEqual" val=" " />` */
78
- ExtendCustomFilterOperator["NOT_EMPTY"] = "notEmpty";
79
- /**
80
- * Falls back to the following XML:
81
- *
82
- * ```xml
83
- * <customFilters and="1">
84
- * <customFilter operator="greaterThanOrEqual" val="123"/>
85
- * <customFilter operator="lessThanOrEqual" val="456"/>
86
- * </customFilters>
87
- * ```
88
- *
89
- * Actually in Microsoft Excel, `NOT_BETWEEN` is still `BETWEEN`, as long as the two operators
90
- * are `greaterThanOrEqual` and `lessThanOrEqual`.
91
- */
92
- ExtendCustomFilterOperator["BETWEEN"] = "between";
93
- /**
94
- * Falls back to the following XML:
95
- *
96
- * ```xml
97
- * <customFilters> <!-- no `and="1"` means `OR` -->
98
- * <customFilter operator="lessThan" val="456"/>
99
- * <customFilter operator="greaterThan" val="123"/>
100
- * </customFilters>
101
- * ```
102
- */
103
- ExtendCustomFilterOperator["NOT_BETWEEN"] = "notBetween";
104
- ExtendCustomFilterOperator["CUSTOM"] = "custom";
105
- return ExtendCustomFilterOperator;
106
- }({});
107
-
108
- //#endregion
109
15
  //#region src/models/conditions.ts
110
16
  let FilterConditionItems;
111
17
  (function(_FilterConditionItems) {
112
18
  const NONE = _FilterConditionItems.NONE = {
113
19
  label: "sheets-filter.conditions.none",
114
- operator: ExtendCustomFilterOperator.NONE,
115
- order: OperatorOrder.SECOND,
20
+ operator: "none",
21
+ order: 1,
116
22
  numOfParameters: 0,
117
23
  getDefaultFormParams: () => {
118
24
  throw new Error("[FilterConditionItems.NONE]: should not have initial form params!");
119
25
  },
120
26
  testMappingParams: (params) => {
121
- return params.operator1 === ExtendCustomFilterOperator.NONE;
27
+ return params.operator1 === "none";
122
28
  },
123
29
  mapToFilterColumn: () => null,
124
30
  testMappingFilterColumn: (filterColumn) => {
@@ -130,31 +36,31 @@ let FilterConditionItems;
130
36
  NONE,
131
37
  _FilterConditionItems.EMPTY = {
132
38
  label: "sheets-filter.conditions.empty",
133
- operator: ExtendCustomFilterOperator.EMPTY,
134
- order: OperatorOrder.SECOND,
39
+ operator: "empty",
40
+ order: 1,
135
41
  numOfParameters: 0,
136
42
  getDefaultFormParams: () => {
137
43
  throw new Error("[FilterConditionItems.EMPTY]: should not have initial form params!");
138
44
  },
139
- testMappingParams: ({ operator1 }) => operator1 === ExtendCustomFilterOperator.EMPTY,
45
+ testMappingParams: ({ operator1 }) => operator1 === "empty",
140
46
  mapToFilterColumn: () => ({ customFilters: { customFilters: [{ val: "" }] } }),
141
47
  testMappingFilterColumn: (filterColumn) => {
142
48
  var _filterColumn$customF;
143
49
  if (((_filterColumn$customF = filterColumn.customFilters) === null || _filterColumn$customF === void 0 ? void 0 : _filterColumn$customF.customFilters.length) !== 1) return false;
144
50
  const firstCustomFilter = filterColumn.customFilters.customFilters[0];
145
51
  if (!(firstCustomFilter.val === "" && firstCustomFilter.operator === void 0)) return false;
146
- return { operator1: ExtendCustomFilterOperator.EMPTY };
52
+ return { operator1: "empty" };
147
53
  }
148
54
  },
149
55
  _FilterConditionItems.NOT_EMPTY = {
150
56
  label: "sheets-filter.conditions.not-empty",
151
- operator: ExtendCustomFilterOperator.NOT_EMPTY,
152
- order: OperatorOrder.SECOND,
57
+ operator: "notEmpty",
58
+ order: 1,
153
59
  numOfParameters: 0,
154
60
  getDefaultFormParams: () => {
155
61
  throw new Error("[FilterConditionItems.NOT_EMPTY]: should not have initial form params!");
156
62
  },
157
- testMappingParams: ({ operator1 }) => operator1 === ExtendCustomFilterOperator.NOT_EMPTY,
63
+ testMappingParams: ({ operator1 }) => operator1 === "notEmpty",
158
64
  mapToFilterColumn: () => ({ customFilters: { customFilters: [{
159
65
  val: "",
160
66
  operator: _univerjs_sheets_filter.CustomFilterOperator.NOT_EQUALS
@@ -164,21 +70,21 @@ let FilterConditionItems;
164
70
  if (((_filterColumn$customF2 = filterColumn.customFilters) === null || _filterColumn$customF2 === void 0 ? void 0 : _filterColumn$customF2.customFilters.length) !== 1) return false;
165
71
  const firstCustomFilter = filterColumn.customFilters.customFilters[0];
166
72
  if (!(firstCustomFilter.val === " " && firstCustomFilter.operator === _univerjs_sheets_filter.CustomFilterOperator.NOT_EQUALS)) return false;
167
- return { operator1: ExtendCustomFilterOperator.NOT_EMPTY };
73
+ return { operator1: "notEmpty" };
168
74
  }
169
75
  },
170
76
  _FilterConditionItems.TEXT_CONTAINS = {
171
77
  label: "sheets-filter.conditions.text-contains",
172
- operator: ExtendCustomFilterOperator.CONTAINS,
173
- order: OperatorOrder.FIRST,
78
+ operator: "contains",
79
+ order: 0,
174
80
  numOfParameters: 1,
175
81
  getDefaultFormParams: () => ({
176
- operator1: ExtendCustomFilterOperator.CONTAINS,
82
+ operator1: "contains",
177
83
  val1: ""
178
84
  }),
179
85
  testMappingParams: (params) => {
180
86
  const [op] = getOnlyOperatorAndVal(params);
181
- return op === ExtendCustomFilterOperator.CONTAINS;
87
+ return op === "contains";
182
88
  },
183
89
  mapToFilterColumn: (mapParams) => {
184
90
  const { val1 } = mapParams;
@@ -191,7 +97,7 @@ let FilterConditionItems;
191
97
  const firstCustomFilter = filterColumn.customFilters.customFilters[0];
192
98
  const valAsString = firstCustomFilter.val.toString();
193
99
  if (!firstCustomFilter.operator && valAsString.startsWith("*") && valAsString.endsWith("*")) return {
194
- operator1: ExtendCustomFilterOperator.CONTAINS,
100
+ operator1: "contains",
195
101
  val1: valAsString.slice(1, -1)
196
102
  };
197
103
  return false;
@@ -199,11 +105,11 @@ let FilterConditionItems;
199
105
  },
200
106
  _FilterConditionItems.DOES_NOT_CONTAIN = {
201
107
  label: "sheets-filter.conditions.does-not-contain",
202
- operator: ExtendCustomFilterOperator.DOES_NOT_CONTAIN,
203
- order: OperatorOrder.FIRST,
108
+ operator: "doesNotContain",
109
+ order: 0,
204
110
  numOfParameters: 1,
205
111
  getDefaultFormParams: () => ({
206
- operator1: ExtendCustomFilterOperator.DOES_NOT_CONTAIN,
112
+ operator1: "doesNotContain",
207
113
  val1: ""
208
114
  }),
209
115
  mapToFilterColumn: (mapParams) => ({ customFilters: { customFilters: [{
@@ -212,7 +118,7 @@ let FilterConditionItems;
212
118
  }] } }),
213
119
  testMappingParams: (params) => {
214
120
  const [op] = getOnlyOperatorAndVal(params);
215
- return op === ExtendCustomFilterOperator.DOES_NOT_CONTAIN;
121
+ return op === "doesNotContain";
216
122
  },
217
123
  testMappingFilterColumn: (filterColumn) => {
218
124
  var _filterColumn$customF4;
@@ -220,7 +126,7 @@ let FilterConditionItems;
220
126
  const firstCustomFilter = filterColumn.customFilters.customFilters[0];
221
127
  const valAsString = firstCustomFilter.val.toString();
222
128
  if (firstCustomFilter.operator === _univerjs_sheets_filter.CustomFilterOperator.NOT_EQUALS && valAsString.startsWith("*") && valAsString.endsWith("*")) return {
223
- operator1: ExtendCustomFilterOperator.DOES_NOT_CONTAIN,
129
+ operator1: "doesNotContain",
224
130
  val1: valAsString.slice(1, -1)
225
131
  };
226
132
  return false;
@@ -228,17 +134,17 @@ let FilterConditionItems;
228
134
  },
229
135
  _FilterConditionItems.STARTS_WITH = {
230
136
  label: "sheets-filter.conditions.starts-with",
231
- operator: ExtendCustomFilterOperator.STARTS_WITH,
232
- order: OperatorOrder.FIRST,
137
+ operator: "startsWith",
138
+ order: 0,
233
139
  numOfParameters: 1,
234
140
  getDefaultFormParams: () => ({
235
- operator1: ExtendCustomFilterOperator.STARTS_WITH,
141
+ operator1: "startsWith",
236
142
  val1: ""
237
143
  }),
238
144
  mapToFilterColumn: (mapParams) => ({ customFilters: { customFilters: [{ val: `${mapParams.val1}*` }] } }),
239
145
  testMappingParams: (params) => {
240
146
  const [op] = getOnlyOperatorAndVal(params);
241
- return op === ExtendCustomFilterOperator.STARTS_WITH;
147
+ return op === "startsWith";
242
148
  },
243
149
  testMappingFilterColumn: (filterColumn) => {
244
150
  var _filterColumn$customF5;
@@ -246,7 +152,7 @@ let FilterConditionItems;
246
152
  const firstCustomFilter = filterColumn.customFilters.customFilters[0];
247
153
  const valAsString = firstCustomFilter.val.toString();
248
154
  if (!firstCustomFilter.operator && valAsString.endsWith("*") && !valAsString.startsWith("*")) return {
249
- operator1: ExtendCustomFilterOperator.STARTS_WITH,
155
+ operator1: "startsWith",
250
156
  val1: valAsString.slice(0, -1)
251
157
  };
252
158
  return false;
@@ -254,17 +160,17 @@ let FilterConditionItems;
254
160
  },
255
161
  _FilterConditionItems.ENDS_WITH = {
256
162
  label: "sheets-filter.conditions.ends-with",
257
- operator: ExtendCustomFilterOperator.ENDS_WITH,
258
- order: OperatorOrder.FIRST,
163
+ operator: "endsWith",
164
+ order: 0,
259
165
  numOfParameters: 1,
260
166
  getDefaultFormParams: () => ({
261
- operator1: ExtendCustomFilterOperator.ENDS_WITH,
167
+ operator1: "endsWith",
262
168
  val1: ""
263
169
  }),
264
170
  mapToFilterColumn: (mapParams) => ({ customFilters: { customFilters: [{ val: `*${mapParams.val1}` }] } }),
265
171
  testMappingParams: (params) => {
266
172
  const [op] = getOnlyOperatorAndVal(params);
267
- return op === ExtendCustomFilterOperator.ENDS_WITH;
173
+ return op === "endsWith";
268
174
  },
269
175
  testMappingFilterColumn: (filterColumn) => {
270
176
  var _filterColumn$customF6;
@@ -272,7 +178,7 @@ let FilterConditionItems;
272
178
  const firstCustomFilter = filterColumn.customFilters.customFilters[0];
273
179
  const valAsString = firstCustomFilter.val.toString();
274
180
  if (!firstCustomFilter.operator && valAsString.startsWith("*") && !valAsString.endsWith("*")) return {
275
- operator1: ExtendCustomFilterOperator.ENDS_WITH,
181
+ operator1: "endsWith",
276
182
  val1: valAsString.slice(1)
277
183
  };
278
184
  return false;
@@ -280,16 +186,16 @@ let FilterConditionItems;
280
186
  },
281
187
  _FilterConditionItems.EQUALS = {
282
188
  label: "sheets-filter.conditions.equals",
283
- operator: ExtendCustomFilterOperator.EQUALS,
284
- order: OperatorOrder.FIRST,
189
+ operator: "equals",
190
+ order: 0,
285
191
  numOfParameters: 1,
286
192
  getDefaultFormParams: () => ({
287
- operator1: ExtendCustomFilterOperator.EQUALS,
193
+ operator1: "equals",
288
194
  val1: ""
289
195
  }),
290
196
  testMappingParams: (params) => {
291
197
  const [op] = getOnlyOperatorAndVal(params);
292
- return op === ExtendCustomFilterOperator.EQUALS;
198
+ return op === "equals";
293
199
  },
294
200
  mapToFilterColumn: (mapParams) => {
295
201
  const { val1 } = mapParams;
@@ -299,11 +205,11 @@ let FilterConditionItems;
299
205
  testMappingFilterColumn: (filterColumn) => {
300
206
  var _filterColumn$filters, _filterColumn$customF7;
301
207
  if (((_filterColumn$filters = filterColumn.filters) === null || _filterColumn$filters === void 0 || (_filterColumn$filters = _filterColumn$filters.filters) === null || _filterColumn$filters === void 0 ? void 0 : _filterColumn$filters.length) === 1) return {
302
- operator1: ExtendCustomFilterOperator.EQUALS,
208
+ operator1: "equals",
303
209
  val1: ""
304
210
  };
305
211
  if (((_filterColumn$customF7 = filterColumn.customFilters) === null || _filterColumn$customF7 === void 0 ? void 0 : _filterColumn$customF7.customFilters.length) === 1 && !filterColumn.customFilters.customFilters[0].operator) return {
306
- operator1: ExtendCustomFilterOperator.EQUALS,
212
+ operator1: "equals",
307
213
  val1: filterColumn.customFilters.customFilters[0].val.toString()
308
214
  };
309
215
  return false;
@@ -313,7 +219,7 @@ let FilterConditionItems;
313
219
  label: "sheets-filter.conditions.greater-than",
314
220
  operator: _univerjs_sheets_filter.CustomFilterOperator.GREATER_THAN,
315
221
  numOfParameters: 1,
316
- order: OperatorOrder.FIRST,
222
+ order: 0,
317
223
  getDefaultFormParams: () => ({
318
224
  operator1: _univerjs_sheets_filter.CustomFilterOperator.GREATER_THAN,
319
225
  val1: ""
@@ -341,7 +247,7 @@ let FilterConditionItems;
341
247
  label: "sheets-filter.conditions.greater-than-or-equal",
342
248
  operator: _univerjs_sheets_filter.CustomFilterOperator.GREATER_THAN_OR_EQUAL,
343
249
  numOfParameters: 1,
344
- order: OperatorOrder.FIRST,
250
+ order: 0,
345
251
  getDefaultFormParams: () => ({
346
252
  operator1: _univerjs_sheets_filter.CustomFilterOperator.GREATER_THAN_OR_EQUAL,
347
253
  val1: ""
@@ -369,7 +275,7 @@ let FilterConditionItems;
369
275
  label: "sheets-filter.conditions.less-than",
370
276
  operator: _univerjs_sheets_filter.CustomFilterOperator.LESS_THAN,
371
277
  numOfParameters: 1,
372
- order: OperatorOrder.FIRST,
278
+ order: 0,
373
279
  getDefaultFormParams: () => ({
374
280
  operator1: _univerjs_sheets_filter.CustomFilterOperator.LESS_THAN,
375
281
  val1: ""
@@ -397,7 +303,7 @@ let FilterConditionItems;
397
303
  label: "sheets-filter.conditions.less-than-or-equal",
398
304
  operator: _univerjs_sheets_filter.CustomFilterOperator.LESS_THAN_OR_EQUAL,
399
305
  numOfParameters: 1,
400
- order: OperatorOrder.FIRST,
306
+ order: 0,
401
307
  getDefaultFormParams: () => ({
402
308
  operator1: _univerjs_sheets_filter.CustomFilterOperator.LESS_THAN_OR_EQUAL,
403
309
  val1: ""
@@ -425,7 +331,7 @@ let FilterConditionItems;
425
331
  label: "sheets-filter.conditions.equal",
426
332
  operator: _univerjs_sheets_filter.CustomFilterOperator.EQUAL,
427
333
  numOfParameters: 1,
428
- order: OperatorOrder.FIRST,
334
+ order: 0,
429
335
  getDefaultFormParams: () => ({
430
336
  operator1: _univerjs_sheets_filter.CustomFilterOperator.EQUAL,
431
337
  val1: ""
@@ -453,7 +359,7 @@ let FilterConditionItems;
453
359
  label: "sheets-filter.conditions.not-equal",
454
360
  operator: _univerjs_sheets_filter.CustomFilterOperator.NOT_EQUALS,
455
361
  numOfParameters: 1,
456
- order: OperatorOrder.FIRST,
362
+ order: 0,
457
363
  getDefaultFormParams: () => ({
458
364
  operator1: _univerjs_sheets_filter.CustomFilterOperator.NOT_EQUALS,
459
365
  val1: ""
@@ -479,8 +385,8 @@ let FilterConditionItems;
479
385
  },
480
386
  _FilterConditionItems.BETWEEN = {
481
387
  label: "sheets-filter.conditions.between",
482
- operator: ExtendCustomFilterOperator.BETWEEN,
483
- order: OperatorOrder.SECOND,
388
+ operator: "between",
389
+ order: 1,
484
390
  numOfParameters: 2,
485
391
  getDefaultFormParams: () => ({
486
392
  and: true,
@@ -532,8 +438,8 @@ let FilterConditionItems;
532
438
  },
533
439
  _FilterConditionItems.NOT_BETWEEN = {
534
440
  label: "sheets-filter.conditions.not-between",
535
- operator: ExtendCustomFilterOperator.NOT_BETWEEN,
536
- order: OperatorOrder.SECOND,
441
+ operator: "notBetween",
442
+ order: 1,
537
443
  numOfParameters: 2,
538
444
  getDefaultFormParams: () => ({
539
445
  operator1: _univerjs_sheets_filter.CustomFilterOperator.LESS_THAN,
@@ -579,14 +485,14 @@ let FilterConditionItems;
579
485
  },
580
486
  _FilterConditionItems.CUSTOM = {
581
487
  label: "sheets-filter.conditions.custom",
582
- operator: ExtendCustomFilterOperator.CUSTOM,
583
- order: OperatorOrder.SECOND,
488
+ operator: "custom",
489
+ order: 1,
584
490
  numOfParameters: 2,
585
491
  getDefaultFormParams: () => {
586
492
  return {
587
- operator1: ExtendCustomFilterOperator.NONE,
493
+ operator1: "none",
588
494
  val1: "",
589
- operator2: ExtendCustomFilterOperator.NONE,
495
+ operator2: "none",
590
496
  val2: ""
591
497
  };
592
498
  },
@@ -693,7 +599,7 @@ function statisticFilterByValueItems(items) {
693
599
  }
694
600
 
695
601
  //#endregion
696
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorateParam.js
602
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
697
603
  function __decorateParam(paramIndex, decorator) {
698
604
  return function(target, key) {
699
605
  decorator(target, key, paramIndex);
@@ -701,7 +607,7 @@ function __decorateParam(paramIndex, decorator) {
701
607
  }
702
608
 
703
609
  //#endregion
704
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorate.js
610
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
705
611
  function __decorate(decorators, target, key, desc) {
706
612
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
707
613
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -932,7 +838,7 @@ function searchTree(items, searchKeywords) {
932
838
  }
933
839
 
934
840
  //#endregion
935
- //#region \0@oxc-project+runtime@0.124.0/helpers/typeof.js
841
+ //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
936
842
  function _typeof(o) {
937
843
  "@babel/helpers - typeof";
938
844
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -943,7 +849,7 @@ function _typeof(o) {
943
849
  }
944
850
 
945
851
  //#endregion
946
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPrimitive.js
852
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
947
853
  function toPrimitive(t, r) {
948
854
  if ("object" != _typeof(t) || !t) return t;
949
855
  var e = t[Symbol.toPrimitive];
@@ -956,14 +862,14 @@ function toPrimitive(t, r) {
956
862
  }
957
863
 
958
864
  //#endregion
959
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPropertyKey.js
865
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
960
866
  function toPropertyKey(t) {
961
867
  var i = toPrimitive(t, "string");
962
868
  return "symbol" == _typeof(i) ? i : i + "";
963
869
  }
964
870
 
965
871
  //#endregion
966
- //#region \0@oxc-project+runtime@0.124.0/helpers/defineProperty.js
872
+ //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
967
873
  function _defineProperty(e, r, t) {
968
874
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
969
875
  value: t,
@@ -1093,7 +999,8 @@ let SheetsFilterPanelService = class SheetsFilterPanelService extends _univerjs_
1093
999
  this._disposePreviousModel();
1094
1000
  const range = filterModel.getRange();
1095
1001
  if (range.startRow === range.endRow) return false;
1096
- this.filterByModel = await ByValuesModel.fromFilterColumn(this._injector, filterModel, col);
1002
+ const filterByModel = await ByValuesModel.fromFilterColumn(this._injector, filterModel, col);
1003
+ this.filterByModel = filterByModel;
1097
1004
  this._filterBy$.next(_univerjs_sheets_filter.FilterBy.VALUES);
1098
1005
  this._listenToFilterHeaderChange(filterModel, col);
1099
1006
  return true;
@@ -1102,7 +1009,8 @@ let SheetsFilterPanelService = class SheetsFilterPanelService extends _univerjs_
1102
1009
  this._disposePreviousModel();
1103
1010
  const range = filterModel.getRange();
1104
1011
  if (range.startRow === range.endRow) return false;
1105
- this.filterByModel = await ByColorsModel.fromFilterColumn(this._injector, filterModel, col);
1012
+ const filterByModel = await ByColorsModel.fromFilterColumn(this._injector, filterModel, col);
1013
+ this.filterByModel = filterByModel;
1106
1014
  this._filterBy$.next(_univerjs_sheets_filter.FilterBy.COLORS);
1107
1015
  this._listenToFilterHeaderChange(filterModel, col);
1108
1016
  return true;
@@ -1111,7 +1019,8 @@ let SheetsFilterPanelService = class SheetsFilterPanelService extends _univerjs_
1111
1019
  this._disposePreviousModel();
1112
1020
  const range = filterModel.getRange();
1113
1021
  if (range.startRow === range.endRow) return false;
1114
- this.filterByModel = ByConditionsModel.fromFilterColumn(this._injector, filterModel, col, filterModel.getFilterColumn(col));
1022
+ const model = ByConditionsModel.fromFilterColumn(this._injector, filterModel, col, filterModel.getFilterColumn(col));
1023
+ this.filterByModel = model;
1115
1024
  this._filterBy$.next(_univerjs_sheets_filter.FilterBy.CONDITIONS);
1116
1025
  this._listenToFilterHeaderChange(filterModel, col);
1117
1026
  return true;
@@ -1607,7 +1516,7 @@ const ChangeFilterByOperation = {
1607
1516
  //#endregion
1608
1517
  //#region package.json
1609
1518
  var name = "@univerjs/sheets-filter-ui";
1610
- var version = "0.21.1";
1519
+ var version = "0.22.0";
1611
1520
 
1612
1521
  //#endregion
1613
1522
  //#region src/config/config.ts