@univerjs/sheets-filter-ui 0.4.2 → 0.5.0-beta.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.
Files changed (36) hide show
  1. package/lib/cjs/index.js +3 -8
  2. package/lib/cjs/locale/en-US.js +1 -0
  3. package/lib/cjs/locale/fa-IR.js +1 -0
  4. package/lib/cjs/locale/ru-RU.js +1 -0
  5. package/lib/cjs/locale/vi-VN.js +1 -0
  6. package/lib/cjs/locale/zh-CN.js +1 -0
  7. package/lib/cjs/locale/zh-TW.js +1 -0
  8. package/lib/es/index.js +1422 -2985
  9. package/lib/{locale/en-US.json → es/locale/en-US.js} +36 -19
  10. package/lib/{locale/fa-IR.json → es/locale/fa-IR.js} +36 -19
  11. package/lib/{locale/ru-RU.json → es/locale/ru-RU.js} +36 -19
  12. package/lib/{locale/vi-VN.json → es/locale/vi-VN.js} +36 -19
  13. package/lib/{locale/zh-CN.json → es/locale/zh-CN.js} +36 -19
  14. package/lib/{locale/zh-TW.json → es/locale/zh-TW.js} +36 -19
  15. package/lib/index.css +1 -1
  16. package/lib/types/__testing__/data.d.ts +60 -9
  17. package/lib/types/controllers/sheets-filter-permission.controller.d.ts +1 -1
  18. package/lib/types/controllers/sheets-filter-ui-desktop.controller.d.ts +2 -2
  19. package/lib/types/controllers/sheets-filter.menu.d.ts +1 -1
  20. package/lib/types/index.d.ts +0 -1
  21. package/lib/types/locale/zh-CN.d.ts +14 -0
  22. package/lib/types/models/utils.d.ts +4 -4
  23. package/lib/types/services/sheets-filter-panel.service.d.ts +20 -9
  24. package/lib/types/services/util.d.ts +5 -0
  25. package/lib/types/views/components/SheetsFilterPanel.stories.d.ts +1 -1
  26. package/lib/types/views/render-modules/sheets-filter.render-controller.d.ts +3 -0
  27. package/lib/types/worker/generate-filter-values.service.d.ts +14 -4
  28. package/lib/umd/index.js +3 -8
  29. package/lib/umd/locale/en-US.js +1 -0
  30. package/lib/umd/locale/fa-IR.js +1 -0
  31. package/lib/umd/locale/ru-RU.js +1 -0
  32. package/lib/umd/locale/vi-VN.js +1 -0
  33. package/lib/umd/locale/zh-CN.js +1 -0
  34. package/lib/umd/locale/zh-TW.js +1 -0
  35. package/package.json +31 -23
  36. package/lib/types/commands/commands/sheets-filter.command.d.ts +0 -57
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsFilterUiZhCN=t())})(this,function(){"use strict";return{"sheets-filter":{toolbar:{"smart-toggle-filter-tooltip":"筛选","clear-filter-criteria":"清除筛选条件","re-calc-filter-conditions":"重新计算"},command:{"not-valid-filter-range":"选中的区域只有一行,无法进行筛选"},shortcut:{"smart-toggle-filter":"切换筛选"},panel:{"clear-filter":"清除筛选",cancel:"取消",confirm:"确认","by-values":"按值","by-conditions":"按条件","filter-only":"仅筛选","search-placeholder":"使用空格分隔关键字","select-all":"全选","input-values-placeholder":"请输入",or:"或",and:"和",empty:"(空白)","?":"可用 ? 代表单个字符","*":"可用 * 代表任意多个字符"},conditions:{none:"无",empty:"为空","not-empty":"不为空","text-contains":"文本包含","does-not-contain":"文本不包含","starts-with":"文本开头","ends-with":"文本结尾",equals:"文本相符","greater-than":"大于","greater-than-or-equal":"大于等于","less-than":"小于","less-than-or-equal":"小于等于",equal:"等于","not-equal":"不等于",between:"介于","not-between":"不介于",custom:"自定义"},msg:{"filter-header-forbidden":"无法移动筛选行头"},date:{1:"1月",2:"2月",3:"3月",4:"4月",5:"5月",6:"6月",7:"7月",8:"8月",9:"9月",10:"10月",11:"11月",12:"12月"}}}});
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsFilterUiZhTW=t())})(this,function(){"use strict";return{"sheets-filter":{toolbar:{"smart-toggle-filter-tooltip":"篩選","clear-filter-criteria":"清除篩選條件","re-calc-filter-conditions":"重新計算"},command:{"not-valid-filter-range":"選取的區域只有一行,無法進行篩選"},shortcut:{"smart-toggle-filter":"切換篩選"},panel:{"clear-filter":"清除篩選",cancel:"取消",confirm:"確認","by-values":"按值","by-conditions":"按條件","filter-only":"僅篩選","search-placeholder":"使用空格分隔關鍵字","select-all":"全選","input-values-placeholder":"請輸入",or:"或",and:"和",empty:"(空白)","?":"可用 ? 代表單一字元","*":"可用 * 代表任意多個字元"},conditions:{none:"無",empty:"為空","not-empty":"不為空","text-contains":"文字包含","does-not-contain":"文本不包含","starts-with":"文字開頭","ends-with":"文本結尾",equals:"文字相符","greater-than":"大於","greater-than-or-equal":"大於等於","less-than":"小於","less-than-or-equal":"小於等於",equal:"等於","not-equal":"不等於",between:"介於","not-between":"不介於",custom:"自訂"},msg:{"filter-header-forbidden":"無法移動篩選行頭"},date:{1:"1月",2:"2月",3:"3月",4:"4月",5:"5月",6:"6月",7:"7月",8:"8月",9:"9月",10:"10月",11:"11月",12:"12月"}}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-filter-ui",
3
- "version": "0.4.2",
3
+ "version": "0.5.0-beta.0",
4
4
  "private": false,
5
5
  "description": "Univer Sheets Filter UI",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -29,11 +29,14 @@
29
29
  "require": "./lib/cjs/*",
30
30
  "types": "./lib/types/index.d.ts"
31
31
  },
32
- "./lib/*": "./lib/*",
33
- "./locale/*": "./lib/locale/*.json"
32
+ "./locale/*": {
33
+ "import": "./lib/es/locale/*.js",
34
+ "require": "./lib/cjs/locale/*.js",
35
+ "types": "./lib/types/locale/*.d.ts"
36
+ },
37
+ "./lib/*": "./lib/*"
34
38
  },
35
- "main": "./lib/cjs/index.js",
36
- "module": "./lib/es/index.js",
39
+ "main": "./lib/es/index.js",
37
40
  "types": "./lib/types/index.d.ts",
38
41
  "publishConfig": {
39
42
  "access": "public"
@@ -50,28 +53,28 @@
50
53
  "rxjs": ">=7.0.0"
51
54
  },
52
55
  "dependencies": {
53
- "@univerjs/icons": "^0.1.84",
56
+ "@univerjs/icons": "^0.2.5",
54
57
  "clsx": "^2.1.1",
55
- "rc-virtual-list": "^3.14.5",
56
- "@univerjs/core": "0.4.2",
57
- "@univerjs/rpc": "0.4.2",
58
- "@univerjs/design": "0.4.2",
59
- "@univerjs/sheets": "0.4.2",
60
- "@univerjs/engine-render": "0.4.2",
61
- "@univerjs/sheets-ui": "0.4.2",
62
- "@univerjs/ui": "0.4.2",
63
- "@univerjs/sheets-filter": "0.4.2"
58
+ "rc-virtual-list": "^3.15.0",
59
+ "@univerjs/design": "0.5.0-beta.0",
60
+ "@univerjs/core": "0.5.0-beta.0",
61
+ "@univerjs/rpc": "0.5.0-beta.0",
62
+ "@univerjs/engine-render": "0.5.0-beta.0",
63
+ "@univerjs/sheets": "0.5.0-beta.0",
64
+ "@univerjs/sheets-filter": "0.5.0-beta.0",
65
+ "@univerjs/sheets-ui": "0.5.0-beta.0",
66
+ "@univerjs/ui": "0.5.0-beta.0"
64
67
  },
65
68
  "devDependencies": {
66
69
  "less": "^4.2.0",
67
70
  "react": "18.3.1",
68
71
  "rxjs": "^7.8.1",
69
72
  "typescript": "^5.6.3",
70
- "vite": "^5.4.8",
71
- "vitest": "^2.1.2",
72
- "@univerjs-infra/shared": "0.4.2"
73
+ "vite": "^5.4.11",
74
+ "vitest": "^2.1.5",
75
+ "@univerjs-infra/shared": "0.5.0-beta.0"
73
76
  },
74
- "univerSpace": {
77
+ "space": {
75
78
  ".": {
76
79
  "import": "./lib/es/index.js",
77
80
  "require": "./lib/cjs/index.js",
@@ -82,14 +85,19 @@
82
85
  "require": "./lib/cjs/*",
83
86
  "types": "./lib/types/index.d.ts"
84
87
  },
85
- "./lib/*": "./lib/*",
86
- "./locale/*": "./lib/locale/*.json"
88
+ "./locale/*": {
89
+ "import": "./lib/es/locale/*.js",
90
+ "require": "./lib/cjs/locale/*.js",
91
+ "types": "./lib/types/locale/*.d.ts"
92
+ },
93
+ "./lib/*": "./lib/*"
87
94
  },
88
95
  "scripts": {
89
96
  "test": "vitest run",
90
97
  "test:watch": "vitest",
91
98
  "coverage": "vitest run --coverage",
92
99
  "lint:types": "tsc --noEmit",
93
- "build": "tsc && vite build"
94
- }
100
+ "build": "univer-cli build"
101
+ },
102
+ "module": "./lib/es/index.js"
95
103
  }
@@ -1,57 +0,0 @@
1
- import { ICommand, IMutationInfo, IRange, Nullable } from '@univerjs/core';
2
- import { ISheetCommandSharedParams } from '@univerjs/sheets';
3
- import { IAutoFilter, IFilterColumn, ISetSheetsFilterCriteriaMutationParams } from '@univerjs/sheets-filter';
4
- /**
5
- * Parameters of command {@link SetSheetFilterRangeCommand}.
6
- * @property {IRange} range - the range to be set as filter range.
7
- */
8
- export interface ISetSheetFilterRangeCommandParams extends ISheetCommandSharedParams {
9
- range: IRange;
10
- }
11
- /**
12
- * A {@link CommandType.COMMAND} to set filter range in a Worksheet. Its params {@link ISetSheetFilterRangeCommandParams}
13
- * is required. If the {@link FilterModel} does not exist, it will be created.
14
- */
15
- export declare const SetSheetFilterRangeCommand: ICommand<ISetSheetFilterRangeCommandParams>;
16
- /**
17
- * A {@link CommandType.COMMAND} to remove filter in a Worksheet. Its params {@link ISheetCommandSharedParams} is
18
- * required. If the {@link FilterModel} does not exist, it will fail to execute.
19
- */
20
- export declare const RemoveSheetFilterCommand: ICommand<ISheetCommandSharedParams>;
21
- /**
22
- * A {@link CommandType.COMMAND} to toggle filter in the current {@link Worksheet}.
23
- */
24
- export declare const SmartToggleSheetsFilterCommand: ICommand;
25
- /**
26
- * Parameters of command {@link SetSheetsFilterCriteriaCommand}.
27
- * @property {number} col - the column index of the filter criteria
28
- * @property {Nullable<IFilterColumn>} criteria - the filter criteria to be set
29
- */
30
- export interface ISetSheetsFilterCriteriaCommandParams extends ISheetCommandSharedParams {
31
- col: number;
32
- criteria: Nullable<IFilterColumn>;
33
- }
34
- /**
35
- * A {@link CommandType.COMMAND} to set filter criteria to a column in the targeting {@link FilterModel}. Its params
36
- * {@link ISetSheetsFilterCriteriaCommandParams} is required.
37
- */
38
- export declare const SetSheetsFilterCriteriaCommand: ICommand<ISetSheetsFilterCriteriaCommandParams>;
39
- /**
40
- * A {@link CommandType.COMMAND} to clear all filter criteria in the targeting {@link FilterModel}. Its params
41
- * {@link ISheetCommandSharedParams} is required.
42
- */
43
- export declare const ClearSheetsFilterCriteriaCommand: ICommand<ISheetCommandSharedParams>;
44
- /**
45
- * A {@link CommandType.COMMAND} forcing the currently active {@link FilterModel} to re-calculate all filter criteria.
46
- * Its params {@link ISheetCommandSharedParams} is required.
47
- */
48
- export declare const ReCalcSheetsFilterCommand: ICommand<ISheetCommandSharedParams>;
49
- /**
50
- * Transform a {@link FilterModel} to a list of mutations to set the filter criteria.
51
- * @param unitId - the unit id of the {@link Workbook}
52
- * @param subUnitId - the sub unit id of the {@link Worksheet}
53
- * @param autoFilter - the to be destructed {@link FilterModel}
54
- * @returns {IMutationInfo<ISetSheetsFilterCriteriaMutationParams>} a list of mutations those can be used to
55
- * reconstruct the {@link FilterModel}
56
- */
57
- export declare function destructFilterCriteria(unitId: string, subUnitId: string, autoFilter: IAutoFilter): IMutationInfo<ISetSheetsFilterCriteriaMutationParams>[];