@univerjs/sheets-conditional-formatting 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.
- package/lib/cjs/facade.js +142 -73
- package/lib/cjs/index.js +263 -166
- package/lib/cjs/locale/ar-SA.js +11 -0
- package/lib/cjs/locale/ca-ES.js +11 -0
- package/lib/cjs/locale/de-DE.js +11 -0
- package/lib/cjs/locale/en-US.js +26 -0
- package/lib/cjs/locale/es-ES.js +11 -0
- package/lib/cjs/locale/fa-IR.js +11 -0
- package/lib/cjs/locale/fr-FR.js +11 -0
- package/lib/cjs/locale/id-ID.js +11 -0
- package/lib/cjs/locale/it-IT.js +11 -0
- package/lib/cjs/locale/ja-JP.js +11 -0
- package/lib/cjs/locale/ko-KR.js +11 -0
- package/lib/cjs/locale/pl-PL.js +11 -0
- package/lib/cjs/locale/pt-BR.js +11 -0
- package/lib/cjs/locale/ru-RU.js +11 -0
- package/lib/cjs/locale/sk-SK.js +11 -0
- package/lib/cjs/locale/vi-VN.js +11 -0
- package/lib/cjs/locale/zh-CN.js +11 -0
- package/lib/cjs/locale/zh-HK.js +11 -0
- package/lib/cjs/locale/zh-TW.js +11 -0
- package/lib/es/facade.js +142 -73
- package/lib/es/index.js +252 -168
- package/lib/es/locale/ar-SA.js +10 -0
- package/lib/es/locale/ca-ES.js +10 -0
- package/lib/es/locale/de-DE.js +10 -0
- package/lib/es/locale/en-US.js +25 -0
- package/lib/es/locale/es-ES.js +10 -0
- package/lib/es/locale/fa-IR.js +10 -0
- package/lib/es/locale/fr-FR.js +10 -0
- package/lib/es/locale/id-ID.js +10 -0
- package/lib/es/locale/it-IT.js +10 -0
- package/lib/es/locale/ja-JP.js +10 -0
- package/lib/es/locale/ko-KR.js +10 -0
- package/lib/es/locale/pl-PL.js +10 -0
- package/lib/es/locale/pt-BR.js +10 -0
- package/lib/es/locale/ru-RU.js +10 -0
- package/lib/es/locale/sk-SK.js +10 -0
- package/lib/es/locale/vi-VN.js +10 -0
- package/lib/es/locale/zh-CN.js +10 -0
- package/lib/es/locale/zh-HK.js +10 -0
- package/lib/es/locale/zh-TW.js +10 -0
- package/lib/facade.js +142 -73
- package/lib/index.js +252 -168
- package/lib/locale/ar-SA.js +10 -0
- package/lib/locale/ca-ES.js +10 -0
- package/lib/locale/de-DE.js +10 -0
- package/lib/locale/en-US.js +25 -0
- package/lib/locale/es-ES.js +10 -0
- package/lib/locale/fa-IR.js +10 -0
- package/lib/locale/fr-FR.js +10 -0
- package/lib/locale/id-ID.js +10 -0
- package/lib/locale/it-IT.js +10 -0
- package/lib/locale/ja-JP.js +10 -0
- package/lib/locale/ko-KR.js +10 -0
- package/lib/locale/pl-PL.js +10 -0
- package/lib/locale/pt-BR.js +10 -0
- package/lib/locale/ru-RU.js +10 -0
- package/lib/locale/sk-SK.js +10 -0
- package/lib/locale/vi-VN.js +10 -0
- package/lib/locale/zh-CN.js +10 -0
- package/lib/locale/zh-HK.js +10 -0
- package/lib/locale/zh-TW.js +10 -0
- package/lib/types/facade/f-conditional-formatting-builder.d.ts +138 -69
- package/lib/types/facade/f-range.d.ts +6 -3
- package/lib/types/facade/f-worksheet.d.ts +14 -7
- package/lib/types/index.d.ts +3 -0
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/ca-ES.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +26 -0
- package/lib/types/locale/es-ES.d.ts +18 -0
- package/lib/types/locale/fa-IR.d.ts +18 -0
- package/lib/types/locale/fr-FR.d.ts +18 -0
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/ja-JP.d.ts +18 -0
- package/lib/types/locale/ko-KR.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/ru-RU.d.ts +18 -0
- package/lib/types/locale/sk-SK.d.ts +18 -0
- package/lib/types/locale/vi-VN.d.ts +18 -0
- package/lib/types/locale/zh-CN.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/types/locale/zh-TW.d.ts +18 -0
- package/lib/types/models/conditional-formatting-range-index-model.d.ts +32 -0
- package/lib/types/models/conditional-formatting-view-model.d.ts +3 -2
- package/lib/types/services/conditional-formatting-range-transform.service.d.ts +27 -0
- package/lib/types/services/conditional-formatting-style-composer.service.d.ts +31 -0
- package/lib/types/services/conditional-formatting.service.d.ts +7 -7
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +14 -9
- package/LICENSE +0 -176
|
@@ -26,7 +26,8 @@ export interface IFRangeSheetsConditionalFormattingMixin {
|
|
|
26
26
|
* @example
|
|
27
27
|
* ```ts
|
|
28
28
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
29
|
-
* const fWorksheet = fWorkbook.
|
|
29
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
30
|
+
* if (!fWorksheet) return;
|
|
30
31
|
*
|
|
31
32
|
* // Create a conditional formatting rule that sets the cell format to italic, red background, and green font color when the cell is not empty.
|
|
32
33
|
* const fRange = fWorksheet.getRange('A1:T100');
|
|
@@ -52,7 +53,8 @@ export interface IFRangeSheetsConditionalFormattingMixin {
|
|
|
52
53
|
* @example
|
|
53
54
|
* ```ts
|
|
54
55
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
55
|
-
* const fWorksheet = fWorkbook.
|
|
56
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
57
|
+
* if (!fWorksheet) return;
|
|
56
58
|
*
|
|
57
59
|
* // Create a conditional formatting rule that sets the cell format to italic, red background, and green font color when the cell is not empty.
|
|
58
60
|
* const fRange = fWorksheet.getRange('A1:T100');
|
|
@@ -109,7 +111,8 @@ export interface IFRangeSheetsConditionalFormattingMixin {
|
|
|
109
111
|
* @example
|
|
110
112
|
* ```ts
|
|
111
113
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
112
|
-
* const fWorksheet = fWorkbook.
|
|
114
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
115
|
+
* if (!fWorksheet) return;
|
|
113
116
|
* const fRange = fWorksheet.getRange('A1:T100');
|
|
114
117
|
*
|
|
115
118
|
* // Clear all conditional format rules for the range
|
|
@@ -27,7 +27,8 @@ export interface IFWorksheetConditionalFormattingMixin {
|
|
|
27
27
|
* @example
|
|
28
28
|
* ```ts
|
|
29
29
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
30
|
-
* const fWorksheet = fWorkbook.
|
|
30
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
31
|
+
* if (!fWorksheet) return;
|
|
31
32
|
* const rules = fWorksheet.getConditionalFormattingRules();
|
|
32
33
|
* console.log(rules);
|
|
33
34
|
* ```
|
|
@@ -47,7 +48,8 @@ export interface IFWorksheetConditionalFormattingMixin {
|
|
|
47
48
|
* @example
|
|
48
49
|
* ```ts
|
|
49
50
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
50
|
-
* const fWorksheet = fWorkbook.
|
|
51
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
52
|
+
* if (!fWorksheet) return;
|
|
51
53
|
*
|
|
52
54
|
* // Create a conditional formatting rule that sets the cell format to italic, red background, and green font color when the cell is not empty.
|
|
53
55
|
* const fRange = fWorksheet.getRange('A1:T100');
|
|
@@ -70,7 +72,8 @@ export interface IFWorksheetConditionalFormattingMixin {
|
|
|
70
72
|
* @example
|
|
71
73
|
* ```ts
|
|
72
74
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
73
|
-
* const fWorksheet = fWorkbook.
|
|
75
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
76
|
+
* if (!fWorksheet) return;
|
|
74
77
|
*
|
|
75
78
|
* // Create a conditional formatting rule that sets the cell format to italic, red background, and green font color when the cell is not empty.
|
|
76
79
|
* const fRange = fWorksheet.getRange('A1:T100');
|
|
@@ -93,7 +96,8 @@ export interface IFWorksheetConditionalFormattingMixin {
|
|
|
93
96
|
* @example
|
|
94
97
|
* ```ts
|
|
95
98
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
96
|
-
* const fWorksheet = fWorkbook.
|
|
99
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
100
|
+
* if (!fWorksheet) return;
|
|
97
101
|
* const rules = fWorksheet.getConditionalFormattingRules();
|
|
98
102
|
*
|
|
99
103
|
* // Delete the first rule
|
|
@@ -111,7 +115,8 @@ export interface IFWorksheetConditionalFormattingMixin {
|
|
|
111
115
|
* @example
|
|
112
116
|
* ```ts
|
|
113
117
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
114
|
-
* const fWorksheet = fWorkbook.
|
|
118
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
119
|
+
* if (!fWorksheet) return;
|
|
115
120
|
* const rules = fWorksheet.getConditionalFormattingRules();
|
|
116
121
|
*
|
|
117
122
|
* // Move the third rule before the first rule
|
|
@@ -130,7 +135,8 @@ export interface IFWorksheetConditionalFormattingMixin {
|
|
|
130
135
|
* @example
|
|
131
136
|
* ```ts
|
|
132
137
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
133
|
-
* const fWorksheet = fWorkbook.
|
|
138
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
139
|
+
* if (!fWorksheet) return;
|
|
134
140
|
*
|
|
135
141
|
* // Create a conditional formatting rule that sets the cell format to italic, red background, and green font color when the cell is not empty.
|
|
136
142
|
* const fRange = fWorksheet.getRange('A1:T100');
|
|
@@ -157,7 +163,8 @@ export interface IFWorksheetConditionalFormattingMixin {
|
|
|
157
163
|
* @example
|
|
158
164
|
* ```ts
|
|
159
165
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
160
|
-
* const fWorksheet = fWorkbook.
|
|
166
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
167
|
+
* if (!fWorksheet) return;
|
|
161
168
|
* fWorksheet.clearConditionalFormatRules();
|
|
162
169
|
* console.log(fWorksheet.getConditionalFormattingRules()); // []
|
|
163
170
|
* ```
|
package/lib/types/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export type { ISetConditionalRuleMutationParams } from './commands/mutations/set
|
|
|
27
27
|
export { SetConditionalRuleMutation, setConditionalRuleMutationUndoFactory } from './commands/mutations/set-conditional-rule.mutation';
|
|
28
28
|
export type { IUniverSheetsConditionalFormattingConfig } from './config/config';
|
|
29
29
|
export * from './models/calculate-unit-v2/utils';
|
|
30
|
+
export * from './models/conditional-formatting-range-index-model';
|
|
30
31
|
export * from './models/conditional-formatting-rule-model';
|
|
31
32
|
export * from './models/conditional-formatting-view-model';
|
|
32
33
|
export * from './models/icon-map';
|
|
@@ -36,6 +37,8 @@ export * from './render/data-bar.render';
|
|
|
36
37
|
export * from './render/icon.render';
|
|
37
38
|
export * from './render/type';
|
|
38
39
|
export * from './services/conditional-formatting-formula.service';
|
|
40
|
+
export * from './services/conditional-formatting-range-transform.service';
|
|
41
|
+
export * from './services/conditional-formatting-style-composer.service';
|
|
39
42
|
export * from './services/conditional-formatting.service';
|
|
40
43
|
export * from './utils/anchor';
|
|
41
44
|
export * from './utils/create-cf-id';
|
|
@@ -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-conditional-formatting': {
|
|
18
|
+
iconSet: {
|
|
19
|
+
direction: string;
|
|
20
|
+
shape: string;
|
|
21
|
+
mark: string;
|
|
22
|
+
rank: 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;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { IRange } from '@univerjs/core';
|
|
17
|
+
import { Disposable } from '@univerjs/core';
|
|
18
|
+
import { ConditionalFormattingRuleModel } from './conditional-formatting-rule-model';
|
|
19
|
+
export declare class ConditionalFormattingRangeIndexModel extends Disposable {
|
|
20
|
+
private _conditionalFormattingRuleModel;
|
|
21
|
+
private _rTreeManager;
|
|
22
|
+
constructor(_conditionalFormattingRuleModel: ConditionalFormattingRuleModel);
|
|
23
|
+
getRuleIdsByCell(unitId: string, subUnitId: string, row: number, col: number): Set<string>;
|
|
24
|
+
getRuleIdsByRanges(unitId: string, subUnitId: string, ranges: IRange[]): Set<string>;
|
|
25
|
+
getRulesByRanges(unitId: string, subUnitId: string, ranges: IRange[]): import("./type").IConditionFormattingRule<import("./type").IConditionalFormattingRuleConfig>[];
|
|
26
|
+
dispose(): void;
|
|
27
|
+
clear(): void;
|
|
28
|
+
rebuild(): void;
|
|
29
|
+
private _initRuleListener;
|
|
30
|
+
private _insert;
|
|
31
|
+
private _remove;
|
|
32
|
+
}
|
|
@@ -15,15 +15,16 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
17
17
|
import { ConditionalFormattingFormulaService } from '../services/conditional-formatting-formula.service';
|
|
18
|
+
import { ConditionalFormattingRangeIndexModel } from './conditional-formatting-range-index-model';
|
|
18
19
|
import { ConditionalFormattingRuleModel } from './conditional-formatting-rule-model';
|
|
19
20
|
export declare const CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH: number;
|
|
20
21
|
export declare class ConditionalFormattingViewModel extends Disposable {
|
|
21
22
|
private _injector;
|
|
22
23
|
private _conditionalFormattingRuleModel;
|
|
24
|
+
private _conditionalFormattingRangeIndexModel;
|
|
23
25
|
private _conditionalFormattingFormulaService;
|
|
24
26
|
private _univerInstanceService;
|
|
25
27
|
private _calculateUnitManagers;
|
|
26
|
-
private _rTreeManager;
|
|
27
28
|
/**
|
|
28
29
|
* 1nd-level cache
|
|
29
30
|
*/
|
|
@@ -39,7 +40,7 @@ export declare class ConditionalFormattingViewModel extends Disposable {
|
|
|
39
40
|
subUnitId: string;
|
|
40
41
|
isImmediately?: boolean;
|
|
41
42
|
}>;
|
|
42
|
-
constructor(_injector: Injector, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingFormulaService: ConditionalFormattingFormulaService, _univerInstanceService: IUniverInstanceService);
|
|
43
|
+
constructor(_injector: Injector, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingRangeIndexModel: ConditionalFormattingRangeIndexModel, _conditionalFormattingFormulaService: ConditionalFormattingFormulaService, _univerInstanceService: IUniverInstanceService);
|
|
43
44
|
private _initCFFormulaListener;
|
|
44
45
|
getCellCfs(unitId: string, subUnitId: string, row: number, col: number): {
|
|
45
46
|
cfId: string;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { IRange } from '@univerjs/core';
|
|
17
|
+
export interface IRangeAnchor {
|
|
18
|
+
row: number;
|
|
19
|
+
col: number;
|
|
20
|
+
}
|
|
21
|
+
export declare class ConditionalFormattingRangeTransformService {
|
|
22
|
+
subtractRanges(sourceRanges: IRange[], rangesToSubtract: IRange[]): IRange[];
|
|
23
|
+
addRanges(sourceRanges: IRange[], rangesToAdd: IRange[]): IRange[];
|
|
24
|
+
applyRangeDelta(sourceRanges: IRange[], rangesToSubtract: IRange[], rangesToAdd: IRange[]): IRange[];
|
|
25
|
+
copyIntersectingRanges(sourceRanges: IRange[], sourceRange: IRange, targetAnchor: IRangeAnchor): IRange[];
|
|
26
|
+
translateRange(range: IRange, offset: IRangeAnchor): IRange;
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { IHighlightCell } from '../models/type';
|
|
17
|
+
import type { IDataBarCellData, IIconSetCellData } from '../render/type';
|
|
18
|
+
import { ConditionalFormattingRuleModel } from '../models/conditional-formatting-rule-model';
|
|
19
|
+
import { ConditionalFormattingViewModel } from '../models/conditional-formatting-view-model';
|
|
20
|
+
export declare class ConditionalFormattingStyleComposer {
|
|
21
|
+
private _conditionalFormattingRuleModel;
|
|
22
|
+
private _conditionalFormattingViewModel;
|
|
23
|
+
constructor(_conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingViewModel: ConditionalFormattingViewModel);
|
|
24
|
+
composeStyle(unitId: string, subUnitId: string, row: number, col: number): ({
|
|
25
|
+
style?: IHighlightCell["style"];
|
|
26
|
+
} & IDataBarCellData & IIconSetCellData & {
|
|
27
|
+
isShowValue: boolean;
|
|
28
|
+
}) | null;
|
|
29
|
+
private _mergeComposeResult;
|
|
30
|
+
private _isRuleMatched;
|
|
31
|
+
}
|
|
@@ -13,28 +13,28 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IHighlightCell } from '../models/type';
|
|
17
|
-
import type { IDataBarCellData, IIconSetCellData } from '../render/type';
|
|
18
16
|
import { Disposable, ICommandService, Injector, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
|
|
19
17
|
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
18
|
+
import { ConditionalFormattingRangeIndexModel } from '../models/conditional-formatting-range-index-model';
|
|
20
19
|
import { ConditionalFormattingRuleModel } from '../models/conditional-formatting-rule-model';
|
|
21
20
|
import { ConditionalFormattingViewModel } from '../models/conditional-formatting-view-model';
|
|
21
|
+
import { ConditionalFormattingStyleComposer } from './conditional-formatting-style-composer.service';
|
|
22
22
|
export declare class ConditionalFormattingService extends Disposable {
|
|
23
23
|
private _conditionalFormattingRuleModel;
|
|
24
|
+
private _conditionalFormattingRangeIndexModel;
|
|
25
|
+
private _conditionalFormattingStyleComposer;
|
|
24
26
|
private _injector;
|
|
25
27
|
private _univerInstanceService;
|
|
26
28
|
private _resourceManagerService;
|
|
27
29
|
private _sheetInterceptorService;
|
|
28
30
|
private _commandService;
|
|
29
31
|
get _conditionalFormattingViewModelV2(): ConditionalFormattingViewModel;
|
|
30
|
-
|
|
31
|
-
constructor(_conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _injector: Injector, _univerInstanceService: IUniverInstanceService, _resourceManagerService: IResourceManagerService, _sheetInterceptorService: SheetInterceptorService, _commandService: ICommandService);
|
|
32
|
+
constructor(_conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingRangeIndexModel: ConditionalFormattingRangeIndexModel, _conditionalFormattingStyleComposer: ConditionalFormattingStyleComposer, _injector: Injector, _univerInstanceService: IUniverInstanceService, _resourceManagerService: IResourceManagerService, _sheetInterceptorService: SheetInterceptorService, _commandService: ICommandService);
|
|
32
33
|
composeStyle(unitId: string, subUnitId: string, row: number, col: number): ({
|
|
33
|
-
style?: IHighlightCell["style"];
|
|
34
|
-
} & IDataBarCellData & IIconSetCellData & {
|
|
34
|
+
style?: import("..").IHighlightCell["style"];
|
|
35
|
+
} & import("..").IDataBarCellData & import("..").IIconSetCellData & {
|
|
35
36
|
isShowValue: boolean;
|
|
36
37
|
}) | null;
|
|
37
|
-
private _isRuleMatched;
|
|
38
38
|
private _initSnapshot;
|
|
39
39
|
private _initSheetChange;
|
|
40
40
|
private _initCellChange;
|