@univerjs/sheets-filter 0.24.0 → 0.25.0-insiders.20260608-e4336f7

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.
Files changed (109) hide show
  1. package/lib/cjs/facade.js +18 -11
  2. package/lib/cjs/index.js +23 -10
  3. package/lib/cjs/locale/ar-SA.js +9 -0
  4. package/lib/cjs/locale/ca-ES.js +9 -0
  5. package/lib/cjs/locale/de-DE.js +9 -0
  6. package/lib/cjs/locale/en-US.js +24 -0
  7. package/lib/cjs/locale/es-ES.js +9 -0
  8. package/lib/cjs/locale/fa-IR.js +9 -0
  9. package/lib/cjs/locale/fr-FR.js +9 -0
  10. package/lib/cjs/locale/id-ID.js +9 -0
  11. package/lib/cjs/locale/it-IT.js +9 -0
  12. package/lib/cjs/locale/ja-JP.js +9 -0
  13. package/lib/cjs/locale/ko-KR.js +9 -0
  14. package/lib/cjs/locale/pl-PL.js +9 -0
  15. package/lib/cjs/locale/pt-BR.js +9 -0
  16. package/lib/cjs/locale/ru-RU.js +9 -0
  17. package/lib/cjs/locale/sk-SK.js +9 -0
  18. package/lib/cjs/locale/vi-VN.js +9 -0
  19. package/lib/cjs/locale/zh-CN.js +9 -0
  20. package/lib/cjs/locale/zh-HK.js +9 -0
  21. package/lib/cjs/locale/zh-TW.js +9 -0
  22. package/lib/es/facade.js +18 -11
  23. package/lib/es/index.js +23 -10
  24. package/lib/es/locale/ar-SA.js +8 -0
  25. package/lib/es/locale/ca-ES.js +8 -0
  26. package/lib/es/locale/de-DE.js +8 -0
  27. package/lib/es/locale/en-US.js +23 -0
  28. package/lib/es/locale/es-ES.js +8 -0
  29. package/lib/es/locale/fa-IR.js +8 -0
  30. package/lib/es/locale/fr-FR.js +8 -0
  31. package/lib/es/locale/id-ID.js +8 -0
  32. package/lib/es/locale/it-IT.js +8 -0
  33. package/lib/es/locale/ja-JP.js +8 -0
  34. package/lib/es/locale/ko-KR.js +8 -0
  35. package/lib/es/locale/pl-PL.js +8 -0
  36. package/lib/es/locale/pt-BR.js +8 -0
  37. package/lib/es/locale/ru-RU.js +8 -0
  38. package/lib/es/locale/sk-SK.js +8 -0
  39. package/lib/es/locale/vi-VN.js +8 -0
  40. package/lib/es/locale/zh-CN.js +8 -0
  41. package/lib/es/locale/zh-HK.js +8 -0
  42. package/lib/es/locale/zh-TW.js +8 -0
  43. package/lib/facade.js +18 -11
  44. package/lib/index.js +23 -10
  45. package/lib/locale/ar-SA.js +8 -0
  46. package/lib/locale/ca-ES.js +8 -0
  47. package/lib/locale/de-DE.js +8 -0
  48. package/lib/locale/en-US.js +23 -0
  49. package/lib/locale/es-ES.js +8 -0
  50. package/lib/locale/fa-IR.js +8 -0
  51. package/lib/locale/fr-FR.js +8 -0
  52. package/lib/locale/id-ID.js +8 -0
  53. package/lib/locale/it-IT.js +8 -0
  54. package/lib/locale/ja-JP.js +8 -0
  55. package/lib/locale/ko-KR.js +8 -0
  56. package/lib/locale/pl-PL.js +8 -0
  57. package/lib/locale/pt-BR.js +8 -0
  58. package/lib/locale/ru-RU.js +8 -0
  59. package/lib/locale/sk-SK.js +8 -0
  60. package/lib/locale/vi-VN.js +8 -0
  61. package/lib/locale/zh-CN.js +8 -0
  62. package/lib/locale/zh-HK.js +8 -0
  63. package/lib/locale/zh-TW.js +8 -0
  64. package/lib/types/controllers/sheets-filter.controller.d.ts +1 -0
  65. package/lib/types/facade/f-filter.d.ts +14 -7
  66. package/lib/types/facade/f-range.d.ts +4 -2
  67. package/lib/types/facade/f-worksheet.d.ts +2 -1
  68. package/lib/types/locale/ar-SA.d.ts +18 -0
  69. package/lib/types/locale/ca-ES.d.ts +18 -0
  70. package/lib/types/locale/de-DE.d.ts +18 -0
  71. package/lib/types/locale/en-US.d.ts +26 -0
  72. package/lib/types/locale/es-ES.d.ts +18 -0
  73. package/lib/types/locale/fa-IR.d.ts +18 -0
  74. package/lib/types/locale/fr-FR.d.ts +18 -0
  75. package/lib/types/locale/id-ID.d.ts +18 -0
  76. package/lib/types/locale/it-IT.d.ts +18 -0
  77. package/lib/types/locale/ja-JP.d.ts +18 -0
  78. package/lib/types/locale/ko-KR.d.ts +18 -0
  79. package/lib/types/locale/pl-PL.d.ts +18 -0
  80. package/lib/types/locale/pt-BR.d.ts +18 -0
  81. package/lib/types/locale/ru-RU.d.ts +18 -0
  82. package/lib/types/locale/sk-SK.d.ts +18 -0
  83. package/lib/types/locale/vi-VN.d.ts +18 -0
  84. package/lib/types/locale/zh-CN.d.ts +18 -0
  85. package/lib/types/locale/zh-HK.d.ts +18 -0
  86. package/lib/types/locale/zh-TW.d.ts +18 -0
  87. package/lib/umd/facade.js +1 -1
  88. package/lib/umd/index.js +1 -1
  89. package/lib/umd/locale/ar-SA.js +1 -0
  90. package/lib/umd/locale/ca-ES.js +1 -0
  91. package/lib/umd/locale/de-DE.js +1 -0
  92. package/lib/umd/locale/en-US.js +1 -0
  93. package/lib/umd/locale/es-ES.js +1 -0
  94. package/lib/umd/locale/fa-IR.js +1 -0
  95. package/lib/umd/locale/fr-FR.js +1 -0
  96. package/lib/umd/locale/id-ID.js +1 -0
  97. package/lib/umd/locale/it-IT.js +1 -0
  98. package/lib/umd/locale/ja-JP.js +1 -0
  99. package/lib/umd/locale/ko-KR.js +1 -0
  100. package/lib/umd/locale/pl-PL.js +1 -0
  101. package/lib/umd/locale/pt-BR.js +1 -0
  102. package/lib/umd/locale/ru-RU.js +1 -0
  103. package/lib/umd/locale/sk-SK.js +1 -0
  104. package/lib/umd/locale/vi-VN.js +1 -0
  105. package/lib/umd/locale/zh-CN.js +1 -0
  106. package/lib/umd/locale/zh-HK.js +1 -0
  107. package/lib/umd/locale/zh-TW.js +1 -0
  108. package/package.json +13 -8
  109. package/LICENSE +0 -176
@@ -34,7 +34,8 @@ export declare class FFilter {
34
34
  * @example
35
35
  * ```typescript
36
36
  * const fWorkbook = univerAPI.getActiveWorkbook();
37
- * const fWorksheet = fWorkbook.getActiveSheet();
37
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
38
+ * if (!fWorksheet) return;
38
39
  *
39
40
  * // Set some values of the range C1:F10
40
41
  * const fRange = fWorksheet.getRange('C1:F10');
@@ -81,7 +82,8 @@ export declare class FFilter {
81
82
  * @example
82
83
  * ```typescript
83
84
  * const fWorkbook = univerAPI.getActiveWorkbook();
84
- * const fWorksheet = fWorkbook.getActiveSheet();
85
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
86
+ * if (!fWorksheet) return;
85
87
  *
86
88
  * // Set some values of the range C1:F10
87
89
  * const fRange = fWorksheet.getRange('C1:F10');
@@ -129,7 +131,8 @@ export declare class FFilter {
129
131
  * @example
130
132
  * ```typescript
131
133
  * const fWorkbook = univerAPI.getActiveWorkbook();
132
- * const fWorksheet = fWorkbook.getActiveSheet();
134
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
135
+ * if (!fWorksheet) return;
133
136
  *
134
137
  * // Set some values of the range C1:F10
135
138
  * const fRange = fWorksheet.getRange('C1:F10');
@@ -179,7 +182,8 @@ export declare class FFilter {
179
182
  * @example
180
183
  * ```typescript
181
184
  * const fWorkbook = univerAPI.getActiveWorkbook();
182
- * const fWorksheet = fWorkbook.getActiveSheet();
185
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
186
+ * if (!fWorksheet) return;
183
187
  *
184
188
  * // Set some values of the range C1:F10
185
189
  * const fRange = fWorksheet.getRange('C1:F10');
@@ -222,7 +226,8 @@ export declare class FFilter {
222
226
  * @example
223
227
  * ```typescript
224
228
  * const fWorkbook = univerAPI.getActiveWorkbook();
225
- * const fWorksheet = fWorkbook.getActiveSheet();
229
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
230
+ * if (!fWorksheet) return;
226
231
  * const fFilter = fWorksheet.getFilter();
227
232
  * console.log(fFilter?.getRange().getA1Notation());
228
233
  * ```
@@ -234,7 +239,8 @@ export declare class FFilter {
234
239
  * @example
235
240
  * ```typescript
236
241
  * const fWorkbook = univerAPI.getActiveWorkbook();
237
- * const fWorksheet = fWorkbook.getActiveSheet();
242
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
243
+ * if (!fWorksheet) return;
238
244
  *
239
245
  * // Set some values of the range C1:F10
240
246
  * const fRange = fWorksheet.getRange('C1:F10');
@@ -282,7 +288,8 @@ export declare class FFilter {
282
288
  * @example
283
289
  * ```typescript
284
290
  * const fWorkbook = univerAPI.getActiveWorkbook();
285
- * const fWorksheet = fWorkbook.getActiveSheet();
291
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
292
+ * if (!fWorksheet) return;
286
293
  * const fRange = fWorksheet.getRange('A1:D14');
287
294
  * let fFilter = fRange.createFilter();
288
295
  *
@@ -25,7 +25,8 @@ export interface IFRangeSheetsFilterMixin {
25
25
  * @example
26
26
  * ```typescript
27
27
  * const fWorkbook = univerAPI.getActiveWorkbook();
28
- * const fWorksheet = fWorkbook.getActiveSheet();
28
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
29
+ * if (!fWorksheet) return;
29
30
  * const fRange = fWorksheet.getRange('A1:D14');
30
31
  * let fFilter = fRange.createFilter();
31
32
  *
@@ -45,7 +46,8 @@ export interface IFRangeSheetsFilterMixin {
45
46
  * @example
46
47
  * ```typescript
47
48
  * const fWorkbook = univerAPI.getActiveWorkbook();
48
- * const fWorksheet = fWorkbook.getActiveSheet();
49
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
50
+ * if (!fWorksheet) return;
49
51
  * const fRange = fWorksheet.getRange('A1:D14');
50
52
  * let fFilter = fRange.getFilter();
51
53
  *
@@ -26,7 +26,8 @@ export interface IFWorksheetFilterMixin {
26
26
  * @example
27
27
  * ```typescript
28
28
  * const workbook = univerAPI.getActiveWorkbook();
29
- * const worksheet = workbook.getActiveSheet();
29
+ * const worksheet = workbook.getSheetByName('Sheet1');
30
+ * if (!worksheet) return;
30
31
  * const filter = worksheet.getFilter();
31
32
  * console.log(filter, filter?.getRange().getA1Notation());
32
33
  * ```
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ declare const locale: {
17
+ 'sheets-filter': {
18
+ command: {
19
+ 'not-valid-filter-range': string;
20
+ };
21
+ msg: {
22
+ 'filter-header-forbidden': string;
23
+ };
24
+ };
25
+ };
26
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@univerjs/core`),require(`@univerjs/core/facade`),require(`@univerjs/sheets-filter`),require(`@univerjs/sheets/facade`)):typeof define==`function`&&define.amd?define([`exports`,`@univerjs/core`,`@univerjs/core/facade`,`@univerjs/sheets-filter`,`@univerjs/sheets/facade`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverSheetsFilterFacade={},e.UniverCore,e.UniverCoreFacade,e.UniverSheetsFilter,e.UniverSheetsFacade))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=class extends n.FUniver{_initialize(e){let n=e.get(t.ICommandService);this.disposeWithMe(this.registerEventHandler(this.Event.SheetBeforeRangeFilter,()=>n.beforeCommandExecuted(e=>{e.id===r.SetSheetsFilterCriteriaCommand.id&&this._beforeRangeFilter(e)}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetBeforeRangeFilterClear,()=>n.beforeCommandExecuted(e=>{e.id===r.ClearSheetsFilterCriteriaCommand.id&&this._beforeRangeFilterClear()}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetRangeFiltered,()=>n.onCommandExecuted(e=>{e.id===r.SetSheetsFilterCriteriaCommand.id&&this._onRangeFiltered(e)}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetRangeFilterCleared,()=>n.onCommandExecuted(e=>{e.id===r.ClearSheetsFilterCriteriaCommand.id&&this._onRangeFilterCleared()})))}_beforeRangeFilter(e){let t=e.params,n=this.getUniverSheet(t.unitId),r={workbook:n,worksheet:n.getSheetBySheetId(t.subUnitId),col:t.col,criteria:t.criteria};if(this.fireEvent(this.Event.SheetBeforeRangeFilter,r),r.cancel)throw Error(`SetSheetsFilterCriteriaCommand canceled.`)}_onRangeFiltered(e){let t=e.params,n=this.getUniverSheet(t.unitId),r={workbook:n,worksheet:n.getSheetBySheetId(t.subUnitId),col:t.col,criteria:t.criteria};this.fireEvent(this.Event.SheetRangeFiltered,r)}_beforeRangeFilterClear(){let e=this.getActiveWorkbook();if(!e)return;let t={workbook:e,worksheet:e.getActiveSheet()};if(this.fireEvent(this.Event.SheetBeforeRangeFilterClear,t),t.cancel)throw Error(`SetSheetsFilterCriteriaCommand canceled.`)}_onRangeFilterCleared(){let e=this.getActiveWorkbook();if(!e)return;let t={workbook:e,worksheet:e.getActiveSheet()};this.fireEvent(this.Event.SheetRangeFilterCleared,t)}};n.FUniver.extend(a);function o(e,t){return function(n,r){t(n,r,e)}}function s(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let c=class{constructor(e,t,n,r,i){this._workbook=e,this._worksheet=t,this._filterModel=n,this._injector=r,this._commandSrv=i}getFilteredOutRows(){return Array.from(this._filterModel.filteredOutRows).sort()}getColumnFilterCriteria(e){var t;return(t=this._filterModel.getFilterColumn(e))==null?void 0:t.getColumnData()}removeColumnFilterCriteria(e){return this._commandSrv.syncExecuteCommand(r.SetSheetsFilterCriteriaCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId(),col:e,criteria:null}),this}setColumnFilterCriteria(e,t){return this._commandSrv.syncExecuteCommand(r.SetSheetsFilterCriteriaCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId(),col:e,criteria:t}),this}getRange(){let e=this._filterModel.getRange();return this._injector.createInstance(i.FRange,this._workbook,this._worksheet,e)}removeFilterCriteria(){return this._commandSrv.syncExecuteCommand(r.ClearSheetsFilterCriteriaCommand.id),this}remove(){return this._commandSrv.syncExecuteCommand(r.RemoveSheetFilterCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId()})}};c=s([o(3,(0,t.Inject)(t.Injector)),o(4,t.ICommandService)],c);var l=class extends i.FRange{createFilter(){return this._getFilterModel()||!this._commandService.syncExecuteCommand(r.SetSheetFilterRangeCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId(),range:this._range})?null:this.getFilter()}getFilter(){let e=this._getFilterModel();return e?this._injector.createInstance(c,this._workbook,this._worksheet,e):null}_getFilterModel(){return this._injector.get(r.SheetsFilterService).getFilterModel(this._workbook.getUnitId(),this._worksheet.getSheetId())}};i.FRange.extend(l);var u=class extends i.FWorksheet{getFilter(){let e=this._getFilterModel();return e?this._injector.createInstance(c,this._workbook,this._worksheet,e):null}_getFilterModel(){return this._injector.get(r.SheetsFilterService).getFilterModel(this._workbook.getUnitId(),this._worksheet.getSheetId())}};i.FWorksheet.extend(u);var d=class extends n.FEnum{get CustomFilterOperator(){return r.CustomFilterOperator}};n.FEnum.extend(d);var f=class extends n.FEventName{get SheetBeforeRangeFilter(){return`SheetBeforeRangeFilter`}get SheetRangeFiltered(){return`SheetRangeFiltered`}get SheetRangeFilterCleared(){return`SheetRangeFilterCleared`}get SheetBeforeRangeFilterClear(){return`SheetBeforeRangeFilterClear`}};n.FEventName.extend(f),Object.defineProperty(e,`FFilter`,{enumerable:!0,get:function(){return c}})});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@univerjs/core"),require("@univerjs/core/facade"),require("@univerjs/sheets-filter"),require("@univerjs/sheets/facade")):typeof define==`function`&&define.amd?define([`exports`,`@univerjs/core`,`@univerjs/core/facade`,`@univerjs/sheets-filter`,`@univerjs/sheets/facade`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverSheetsFilterFacade={},e.UniverCore,e.UniverCoreFacade,e.UniverSheetsFilter,e.UniverSheetsFacade))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=class extends n.FUniver{_initialize(e){let n=e.get(t.ICommandService);this.disposeWithMe(this.registerEventHandler(this.Event.SheetBeforeRangeFilter,()=>n.beforeCommandExecuted(e=>{e.id===r.SetSheetsFilterCriteriaCommand.id&&this._beforeRangeFilter(e)}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetBeforeRangeFilterClear,()=>n.beforeCommandExecuted(e=>{e.id===r.ClearSheetsFilterCriteriaCommand.id&&this._beforeRangeFilterClear()}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetRangeFiltered,()=>n.onCommandExecuted(e=>{e.id===r.SetSheetsFilterCriteriaCommand.id&&this._onRangeFiltered(e)}))),this.disposeWithMe(this.registerEventHandler(this.Event.SheetRangeFilterCleared,()=>n.onCommandExecuted(e=>{e.id===r.ClearSheetsFilterCriteriaCommand.id&&this._onRangeFilterCleared()})))}_beforeRangeFilter(e){let t=e.params,n=this.getWorkbook(t.unitId),r={workbook:n,worksheet:n.getSheetBySheetId(t.subUnitId),col:t.col,criteria:t.criteria};if(this.fireEvent(this.Event.SheetBeforeRangeFilter,r),r.cancel)throw Error(`SetSheetsFilterCriteriaCommand canceled.`)}_onRangeFiltered(e){let t=e.params,n=this.getWorkbook(t.unitId),r={workbook:n,worksheet:n.getSheetBySheetId(t.subUnitId),col:t.col,criteria:t.criteria};this.fireEvent(this.Event.SheetRangeFiltered,r)}_beforeRangeFilterClear(){let e=this.getActiveWorkbook();if(!e)return;let t={workbook:e,worksheet:e.getActiveSheet()};if(this.fireEvent(this.Event.SheetBeforeRangeFilterClear,t),t.cancel)throw Error(`SetSheetsFilterCriteriaCommand canceled.`)}_onRangeFilterCleared(){let e=this.getActiveWorkbook();if(!e)return;let t={workbook:e,worksheet:e.getActiveSheet()};this.fireEvent(this.Event.SheetRangeFilterCleared,t)}};n.FUniver.extend(a);function o(e,t){return function(n,r){t(n,r,e)}}function s(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let c=class{constructor(e,t,n,r,i){this._workbook=e,this._worksheet=t,this._filterModel=n,this._injector=r,this._commandSrv=i}getFilteredOutRows(){return Array.from(this._filterModel.filteredOutRows).sort()}getColumnFilterCriteria(e){var t;return(t=this._filterModel.getFilterColumn(e))==null?void 0:t.getColumnData()}removeColumnFilterCriteria(e){return this._commandSrv.syncExecuteCommand(r.SetSheetsFilterCriteriaCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId(),col:e,criteria:null}),this}setColumnFilterCriteria(e,t){return this._commandSrv.syncExecuteCommand(r.SetSheetsFilterCriteriaCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId(),col:e,criteria:t}),this}getRange(){let e=this._filterModel.getRange();return this._injector.createInstance(i.FRange,this._workbook,this._worksheet,e)}removeFilterCriteria(){return this._commandSrv.syncExecuteCommand(r.ClearSheetsFilterCriteriaCommand.id),this}remove(){return this._commandSrv.syncExecuteCommand(r.RemoveSheetFilterCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId()})}};c=s([o(3,(0,t.Inject)(t.Injector)),o(4,t.ICommandService)],c);var l=class extends i.FRange{createFilter(){return this._getFilterModel()||!this._commandService.syncExecuteCommand(r.SetSheetFilterRangeCommand.id,{unitId:this._workbook.getUnitId(),subUnitId:this._worksheet.getSheetId(),range:this._range})?null:this.getFilter()}getFilter(){let e=this._getFilterModel();return e?this._injector.createInstance(c,this._workbook,this._worksheet,e):null}_getFilterModel(){return this._injector.get(r.SheetsFilterService).getFilterModel(this._workbook.getUnitId(),this._worksheet.getSheetId())}};i.FRange.extend(l);var u=class extends i.FWorksheet{getFilter(){let e=this._getFilterModel();return e?this._injector.createInstance(c,this._workbook,this._worksheet,e):null}_getFilterModel(){return this._injector.get(r.SheetsFilterService).getFilterModel(this._workbook.getUnitId(),this._worksheet.getSheetId())}};i.FWorksheet.extend(u);var d=class extends n.FEnum{get CustomFilterOperator(){return r.CustomFilterOperator}};n.FEnum.extend(d);var f=class extends n.FEventName{get SheetBeforeRangeFilter(){return`SheetBeforeRangeFilter`}get SheetRangeFiltered(){return`SheetRangeFiltered`}get SheetRangeFilterCleared(){return`SheetRangeFilterCleared`}get SheetBeforeRangeFilterClear(){return`SheetBeforeRangeFilterClear`}};n.FEventName.extend(f),Object.defineProperty(e,"FFilter",{enumerable:!0,get:function(){return c}})});