@univerjs/sheets-data-validation 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 (123) hide show
  1. package/lib/cjs/facade.js +114 -128
  2. package/lib/cjs/index.js +185 -160
  3. package/lib/cjs/locale/ar-SA.js +139 -0
  4. package/lib/cjs/locale/ca-ES.js +139 -0
  5. package/lib/cjs/locale/de-DE.js +139 -0
  6. package/lib/cjs/locale/en-US.js +154 -0
  7. package/lib/cjs/locale/es-ES.js +139 -0
  8. package/lib/cjs/locale/fa-IR.js +139 -0
  9. package/lib/cjs/locale/fr-FR.js +139 -0
  10. package/lib/cjs/locale/id-ID.js +139 -0
  11. package/lib/cjs/locale/it-IT.js +139 -0
  12. package/lib/cjs/locale/ja-JP.js +139 -0
  13. package/lib/cjs/locale/ko-KR.js +139 -0
  14. package/lib/cjs/locale/pl-PL.js +139 -0
  15. package/lib/cjs/locale/pt-BR.js +139 -0
  16. package/lib/cjs/locale/ru-RU.js +139 -0
  17. package/lib/cjs/locale/sk-SK.js +139 -0
  18. package/lib/cjs/locale/vi-VN.js +139 -0
  19. package/lib/cjs/locale/zh-CN.js +139 -0
  20. package/lib/cjs/locale/zh-HK.js +139 -0
  21. package/lib/cjs/locale/zh-TW.js +139 -0
  22. package/lib/es/facade.js +115 -129
  23. package/lib/es/index.js +183 -156
  24. package/lib/es/locale/ar-SA.js +138 -0
  25. package/lib/es/locale/ca-ES.js +138 -0
  26. package/lib/es/locale/de-DE.js +138 -0
  27. package/lib/es/locale/en-US.js +153 -0
  28. package/lib/es/locale/es-ES.js +138 -0
  29. package/lib/es/locale/fa-IR.js +138 -0
  30. package/lib/es/locale/fr-FR.js +138 -0
  31. package/lib/es/locale/id-ID.js +138 -0
  32. package/lib/es/locale/it-IT.js +138 -0
  33. package/lib/es/locale/ja-JP.js +138 -0
  34. package/lib/es/locale/ko-KR.js +138 -0
  35. package/lib/es/locale/pl-PL.js +138 -0
  36. package/lib/es/locale/pt-BR.js +138 -0
  37. package/lib/es/locale/ru-RU.js +138 -0
  38. package/lib/es/locale/sk-SK.js +138 -0
  39. package/lib/es/locale/vi-VN.js +138 -0
  40. package/lib/es/locale/zh-CN.js +138 -0
  41. package/lib/es/locale/zh-HK.js +138 -0
  42. package/lib/es/locale/zh-TW.js +138 -0
  43. package/lib/facade.js +115 -129
  44. package/lib/index.js +183 -156
  45. package/lib/locale/ar-SA.js +138 -0
  46. package/lib/locale/ca-ES.js +138 -0
  47. package/lib/locale/de-DE.js +138 -0
  48. package/lib/locale/en-US.js +153 -0
  49. package/lib/locale/es-ES.js +138 -0
  50. package/lib/locale/fa-IR.js +138 -0
  51. package/lib/locale/fr-FR.js +138 -0
  52. package/lib/locale/id-ID.js +138 -0
  53. package/lib/locale/it-IT.js +138 -0
  54. package/lib/locale/ja-JP.js +138 -0
  55. package/lib/locale/ko-KR.js +138 -0
  56. package/lib/locale/pl-PL.js +138 -0
  57. package/lib/locale/pt-BR.js +138 -0
  58. package/lib/locale/ru-RU.js +138 -0
  59. package/lib/locale/sk-SK.js +138 -0
  60. package/lib/locale/vi-VN.js +138 -0
  61. package/lib/locale/zh-CN.js +138 -0
  62. package/lib/locale/zh-HK.js +138 -0
  63. package/lib/locale/zh-TW.js +138 -0
  64. package/lib/types/facade/f-data-validation-builder.d.ts +50 -25
  65. package/lib/types/facade/f-data-validation.d.ts +26 -13
  66. package/lib/types/facade/f-range.d.ts +10 -5
  67. package/lib/types/facade/f-univer.d.ts +2 -1
  68. package/lib/types/facade/f-workbook.d.ts +1 -43
  69. package/lib/types/facade/f-worksheet.d.ts +8 -9
  70. package/lib/types/index.d.ts +5 -5
  71. package/lib/types/locale/ar-SA.d.ts +18 -0
  72. package/lib/types/locale/ca-ES.d.ts +18 -0
  73. package/lib/types/locale/de-DE.d.ts +18 -0
  74. package/lib/types/locale/en-US.d.ts +156 -0
  75. package/lib/types/locale/es-ES.d.ts +18 -0
  76. package/lib/types/locale/fa-IR.d.ts +18 -0
  77. package/lib/types/locale/fr-FR.d.ts +18 -0
  78. package/lib/types/locale/id-ID.d.ts +18 -0
  79. package/lib/types/locale/it-IT.d.ts +18 -0
  80. package/lib/types/locale/ja-JP.d.ts +18 -0
  81. package/lib/types/locale/ko-KR.d.ts +18 -0
  82. package/lib/types/locale/pl-PL.d.ts +18 -0
  83. package/lib/types/locale/pt-BR.d.ts +18 -0
  84. package/lib/types/locale/ru-RU.d.ts +18 -0
  85. package/lib/types/locale/sk-SK.d.ts +18 -0
  86. package/lib/types/locale/vi-VN.d.ts +18 -0
  87. package/lib/types/locale/zh-CN.d.ts +18 -0
  88. package/lib/types/locale/zh-HK.d.ts +18 -0
  89. package/lib/types/locale/zh-TW.d.ts +18 -0
  90. package/lib/types/types/const/operator-text-map.d.ts +2 -1
  91. package/lib/types/validators/any-validator.d.ts +2 -2
  92. package/lib/types/validators/base-sheet-validator.d.ts +26 -0
  93. package/lib/types/validators/checkbox-validator.d.ts +2 -2
  94. package/lib/types/validators/custom-validator.d.ts +2 -2
  95. package/lib/types/validators/date-validator.d.ts +2 -2
  96. package/lib/types/validators/decimal-validator.d.ts +2 -2
  97. package/lib/types/validators/list-validator.d.ts +2 -2
  98. package/lib/types/validators/text-length-validator.d.ts +2 -2
  99. package/lib/types/validators/util.d.ts +0 -2
  100. package/lib/types/validators/whole-validator.d.ts +2 -2
  101. package/lib/umd/facade.js +1 -1
  102. package/lib/umd/index.js +1 -1
  103. package/lib/umd/locale/ar-SA.js +1 -0
  104. package/lib/umd/locale/ca-ES.js +1 -0
  105. package/lib/umd/locale/de-DE.js +1 -0
  106. package/lib/umd/locale/en-US.js +1 -0
  107. package/lib/umd/locale/es-ES.js +1 -0
  108. package/lib/umd/locale/fa-IR.js +1 -0
  109. package/lib/umd/locale/fr-FR.js +1 -0
  110. package/lib/umd/locale/id-ID.js +1 -0
  111. package/lib/umd/locale/it-IT.js +1 -0
  112. package/lib/umd/locale/ja-JP.js +1 -0
  113. package/lib/umd/locale/ko-KR.js +1 -0
  114. package/lib/umd/locale/pl-PL.js +1 -0
  115. package/lib/umd/locale/pt-BR.js +1 -0
  116. package/lib/umd/locale/ru-RU.js +1 -0
  117. package/lib/umd/locale/sk-SK.js +1 -0
  118. package/lib/umd/locale/vi-VN.js +1 -0
  119. package/lib/umd/locale/zh-CN.js +1 -0
  120. package/lib/umd/locale/zh-HK.js +1 -0
  121. package/lib/umd/locale/zh-TW.js +1 -0
  122. package/package.json +14 -9
  123. package/LICENSE +0 -176
@@ -30,7 +30,8 @@ export declare class FDataValidation {
30
30
  * @example
31
31
  * ```typescript
32
32
  * const fWorkbook = univerAPI.getActiveWorkbook();
33
- * const fWorksheet = fWorkbook.getActiveSheet();
33
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
34
+ * if (!fWorksheet) return;
34
35
  * const rules = fWorksheet.getDataValidations();
35
36
  * rules.forEach((rule) => {
36
37
  * console.log(rule, rule.getAllowInvalid());
@@ -44,7 +45,8 @@ export declare class FDataValidation {
44
45
  * @example
45
46
  * ```typescript
46
47
  * const fWorkbook = univerAPI.getActiveWorkbook();
47
- * const fWorksheet = fWorkbook.getActiveSheet();
48
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
49
+ * if (!fWorksheet) return;
48
50
  * const rules = fWorksheet.getDataValidations();
49
51
  * rules.forEach((rule) => {
50
52
  * console.log(rule, rule.getCriteriaType());
@@ -58,7 +60,8 @@ export declare class FDataValidation {
58
60
  * @example
59
61
  * ```typescript
60
62
  * const fWorkbook = univerAPI.getActiveWorkbook();
61
- * const fWorksheet = fWorkbook.getActiveSheet();
63
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
64
+ * if (!fWorksheet) return;
62
65
  * const rules = fWorksheet.getDataValidations();
63
66
  * rules.forEach((rule) => {
64
67
  * console.log(rule);
@@ -75,7 +78,8 @@ export declare class FDataValidation {
75
78
  * @example
76
79
  * ```typescript
77
80
  * const fWorkbook = univerAPI.getActiveWorkbook();
78
- * const fWorksheet = fWorkbook.getActiveSheet();
81
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
82
+ * if (!fWorksheet) return;
79
83
  * const fRange = fWorksheet.getRange('A1:B10');
80
84
  * const rule = univerAPI.newDataValidation()
81
85
  * .requireNumberBetween(1, 10)
@@ -96,7 +100,8 @@ export declare class FDataValidation {
96
100
  * @example
97
101
  * ```typescript
98
102
  * const fWorkbook = univerAPI.getActiveWorkbook();
99
- * const fWorksheet = fWorkbook.getActiveSheet();
103
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
104
+ * if (!fWorksheet) return;
100
105
  * const fRange = fWorksheet.getRange('A1:B10');
101
106
  * const rule = univerAPI.newDataValidation()
102
107
  * .requireNumberBetween(1, 10)
@@ -125,7 +130,8 @@ export declare class FDataValidation {
125
130
  * @example
126
131
  * ```typescript
127
132
  * const fWorkbook = univerAPI.getActiveWorkbook();
128
- * const fWorksheet = fWorkbook.getActiveSheet();
133
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
134
+ * if (!fWorksheet) return;
129
135
  * const rules = fWorksheet.getDataValidations();
130
136
  * rules.forEach((rule) => {
131
137
  * console.log(rule, rule.getApplied());
@@ -142,7 +148,8 @@ export declare class FDataValidation {
142
148
  * @example
143
149
  * ```typescript
144
150
  * const fWorkbook = univerAPI.getActiveWorkbook();
145
- * const fWorksheet = fWorkbook.getActiveSheet();
151
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
152
+ * if (!fWorksheet) return;
146
153
  * const rules = fWorksheet.getDataValidations();
147
154
  * rules.forEach((rule) => {
148
155
  * console.log(rule);
@@ -160,7 +167,8 @@ export declare class FDataValidation {
160
167
  * @example
161
168
  * ```typescript
162
169
  * const fWorkbook = univerAPI.getActiveWorkbook();
163
- * const fWorksheet = fWorkbook.getActiveSheet();
170
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
171
+ * if (!fWorksheet) return;
164
172
  * const fRange = fWorksheet.getRange('A1:B10');
165
173
  * console.log(fRange.getDataValidation().getUnitId());
166
174
  * ```
@@ -172,7 +180,8 @@ export declare class FDataValidation {
172
180
  * @example
173
181
  * ```typescript
174
182
  * const fWorkbook = univerAPI.getActiveWorkbook();
175
- * const fWorksheet = fWorkbook.getActiveSheet();
183
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
184
+ * if (!fWorksheet) return;
176
185
  * const fRange = fWorksheet.getRange('A1:B10');
177
186
  * console.log(fRange.getDataValidation().getSheetId());
178
187
  * ```
@@ -187,7 +196,8 @@ export declare class FDataValidation {
187
196
  * @example
188
197
  * ```typescript
189
198
  * const fWorkbook = univerAPI.getActiveWorkbook();
190
- * const fWorksheet = fWorkbook.getActiveSheet();
199
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
200
+ * if (!fWorksheet) return;
191
201
  *
192
202
  * // Create a new data validation rule that requires a number equal to 20 for the range A1:B10
193
203
  * const fRange = fWorksheet.getRange('A1:B10');
@@ -211,7 +221,8 @@ export declare class FDataValidation {
211
221
  * @example
212
222
  * ```typescript
213
223
  * const fWorkbook = univerAPI.getActiveWorkbook();
214
- * const fWorksheet = fWorkbook.getActiveSheet();
224
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
225
+ * if (!fWorksheet) return;
215
226
  *
216
227
  * // Create a new data validation rule that requires a number equal to 20 for the range A1:B10
217
228
  * const fRange = fWorksheet.getRange('A1:B10');
@@ -236,7 +247,8 @@ export declare class FDataValidation {
236
247
  * @example
237
248
  * ```typescript
238
249
  * const fWorkbook = univerAPI.getActiveWorkbook();
239
- * const fWorksheet = fWorkbook.getActiveSheet();
250
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
251
+ * if (!fWorksheet) return;
240
252
  *
241
253
  * // Create a new data validation rule that requires a number equal to 20 for the range A1:B10
242
254
  * const fRange = fWorksheet.getRange('A1:B10');
@@ -257,7 +269,8 @@ export declare class FDataValidation {
257
269
  * @example
258
270
  * ```typescript
259
271
  * const fWorkbook = univerAPI.getActiveWorkbook();
260
- * const fWorksheet = fWorkbook.getActiveSheet();
272
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
273
+ * if (!fWorksheet) return;
261
274
  *
262
275
  * // Create a new data validation rule that requires a number equal to 20 for the range A1:B10
263
276
  * const fRange = fWorksheet.getRange('A1:B10');
@@ -29,7 +29,8 @@ export interface IFRangeSheetsDataValidationMixin {
29
29
  * @example
30
30
  * ```ts
31
31
  * const fWorkbook = univerAPI.getActiveWorkbook();
32
- * const fWorksheet = fWorkbook.getActiveSheet();
32
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
33
+ * if (!fWorksheet) return;
33
34
  *
34
35
  * // Create a data validation rule that requires a number between 1 and 10 for the range A1:B10
35
36
  * const fRange = fWorksheet.getRange('A1:B10');
@@ -51,7 +52,8 @@ export interface IFRangeSheetsDataValidationMixin {
51
52
  * @example
52
53
  * ```ts
53
54
  * const fWorkbook = univerAPI.getActiveWorkbook();
54
- * const fWorksheet = fWorkbook.getActiveSheet();
55
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
56
+ * if (!fWorksheet) return;
55
57
  *
56
58
  * // Create a data validation rule that requires a number equal to 20 for the range A1:B10
57
59
  * const fRange = fWorksheet.getRange('A1:B10');
@@ -78,7 +80,8 @@ export interface IFRangeSheetsDataValidationMixin {
78
80
  * @example
79
81
  * ```ts
80
82
  * const fWorkbook = univerAPI.getActiveWorkbook();
81
- * const fWorksheet = fWorkbook.getActiveSheet();
83
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
84
+ * if (!fWorksheet) return;
82
85
  *
83
86
  * // Create a data validation rule that requires a number equal to 20 for the range A1:B10
84
87
  * const fRange1 = fWorksheet.getRange('A1:B10');
@@ -107,7 +110,8 @@ export interface IFRangeSheetsDataValidationMixin {
107
110
  * @example
108
111
  * ```ts
109
112
  * const fWorkbook = univerAPI.getActiveWorkbook();
110
- * const fWorksheet = fWorkbook.getActiveSheet();
113
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
114
+ * if (!fWorksheet) return;
111
115
  *
112
116
  * // Set some values in the range A1:B10
113
117
  * const fRange = fWorksheet.getRange('A1:B10');
@@ -146,7 +150,8 @@ export interface IFRangeSheetsDataValidationMixin {
146
150
  * @example
147
151
  * ```ts
148
152
  * const fWorkbook = univerAPI.getActiveWorkbook();
149
- * const fWorksheet = fWorkbook.getActiveSheet();
153
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
154
+ * if (!fWorksheet) return;
150
155
  * const fRange = fWorksheet.getRange('A1:B10');
151
156
  * const errors = await fRange.getDataValidationErrorAsync();
152
157
  *
@@ -26,7 +26,8 @@ export interface IFUniverSheetsDataValidationMixin {
26
26
  * @example
27
27
  * ```ts
28
28
  * const fWorkbook = univerAPI.getActiveWorkbook();
29
- * const fWorksheet = fWorkbook.getActiveSheet();
29
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
30
+ * if (!fWorksheet) return;
30
31
  *
31
32
  * // Create a new data validation rule that requires a number between 1 and 10 fot the range A1:B10
32
33
  * const fRange = fWorksheet.getRange('A1:B10');
@@ -13,9 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { IDataValidationRule, IDisposable, IExecutionOptions, Nullable, ObjectMatrix } from '@univerjs/core';
17
- import type { IRuleChange } from '@univerjs/data-validation';
18
- import type { IAddSheetDataValidationCommandParams, IRemoveSheetAllDataValidationCommandParams, IRemoveSheetDataValidationCommandParams, IUpdateSheetDataValidationOptionsCommandParams, IUpdateSheetDataValidationRangeCommandParams, IUpdateSheetDataValidationSettingCommandParams, IValidStatusChange } from '@univerjs/sheets-data-validation';
16
+ import type { IDataValidationRule, Nullable, ObjectMatrix } from '@univerjs/core';
19
17
  import { DataValidationStatus } from '@univerjs/core';
20
18
  import { SheetDataValidationModel } from '@univerjs/sheets-data-validation';
21
19
  import { FWorkbook } from '@univerjs/sheets/facade';
@@ -57,38 +55,6 @@ export interface IFWorkbookSheetsDataValidationMixin {
57
55
  * ```
58
56
  */
59
57
  getAllDataValidationErrorAsync(): Promise<IDataValidationError[]>;
60
- /**
61
- * @deprecated Use `univerAPI.addEvent(univerAPI.Event.SheetDataValidationChanged, (event) => { ... })` instead
62
- */
63
- onDataValidationChange(callback: (ruleChange: IRuleChange) => void): IDisposable;
64
- /**
65
- * @deprecated Use `univerAPI.addEvent(univerAPI.Event.SheetDataValidatorStatusChanged, (event) => { ... })` instead
66
- */
67
- onDataValidationStatusChange(callback: (statusChange: IValidStatusChange) => void): IDisposable;
68
- /**
69
- * @deprecated Use `univerAPI.addEvent(univerAPI.Event.BeforeSheetDataValidationAdd, (event) => { ... })` instead
70
- */
71
- onBeforeAddDataValidation(this: FWorkbook, callback: (params: IAddSheetDataValidationCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
72
- /**
73
- * @deprecated Use `univerAPI.addEvent(univerAPI.Event.BeforeSheetDataValidationCriteriaUpdate, (event) => { ... })` instead
74
- */
75
- onBeforeUpdateDataValidationCriteria(this: FWorkbook, callback: (params: IUpdateSheetDataValidationSettingCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
76
- /**
77
- * @deprecated Use `univerAPI.addEvent(univerAPI.Event.BeforeSheetDataValidationRangeUpdate, (event) => { ... })` instead
78
- */
79
- onBeforeUpdateDataValidationRange(this: FWorkbook, callback: (params: IUpdateSheetDataValidationRangeCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
80
- /**
81
- * @deprecated Use `univerAPI.addEvent(univerAPI.Event.BeforeSheetDataValidationOptionsUpdate, (event) => { ... })` instead
82
- */
83
- onBeforeUpdateDataValidationOptions(this: FWorkbook, callback: (params: IUpdateSheetDataValidationOptionsCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
84
- /**
85
- * @deprecated Use `univerAPI.addEvent(univerAPI.Event.BeforeSheetDataValidationDelete, (event) => { ... })` instead
86
- */
87
- onBeforeDeleteDataValidation(this: FWorkbook, callback: (params: IRemoveSheetDataValidationCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
88
- /**
89
- * @deprecated Use `univerAPI.addEvent(univerAPI.Event.BeforeSheetDataValidationDeleteAll, (event) => { ... })` instead
90
- */
91
- onBeforeDeleteAllDataValidation(this: FWorkbook, callback: (params: IRemoveSheetAllDataValidationCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
92
58
  }
93
59
  /**
94
60
  * @ignore
@@ -101,14 +67,6 @@ export declare class FWorkbookSheetsDataValidationMixin extends FWorkbook implem
101
67
  private _collectValidationErrorsForSheet;
102
68
  private _collectValidationErrorsForRange;
103
69
  private _createDataValidationError;
104
- onDataValidationChange(callback: (ruleChange: IRuleChange) => void): IDisposable;
105
- onDataValidationStatusChange(callback: (statusChange: IValidStatusChange) => void): IDisposable;
106
- onBeforeAddDataValidation(callback: (params: IAddSheetDataValidationCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
107
- onBeforeUpdateDataValidationCriteria(callback: (params: IUpdateSheetDataValidationSettingCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
108
- onBeforeUpdateDataValidationRange(callback: (params: IUpdateSheetDataValidationRangeCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
109
- onBeforeUpdateDataValidationOptions(callback: (params: IUpdateSheetDataValidationOptionsCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
110
- onBeforeDeleteDataValidation(callback: (params: IRemoveSheetDataValidationCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
111
- onBeforeDeleteAllDataValidation(callback: (params: IRemoveSheetAllDataValidationCommandParams, options: IExecutionOptions | undefined) => void | false): IDisposable;
112
70
  }
113
71
  declare module '@univerjs/sheets/facade' {
114
72
  interface FWorkbook extends IFWorkbookSheetsDataValidationMixin {
@@ -27,22 +27,20 @@ export interface IFWorksheetDataValidationMixin {
27
27
  * @returns {FDataValidation[]} All data validation rules
28
28
  * ```ts
29
29
  * const fWorkbook = univerAPI.getActiveWorkbook();
30
- * const fWorksheet = fWorkbook.getActiveSheet();
30
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
31
+ * if (!fWorksheet) return;
31
32
  * const rules = fWorksheet.getDataValidations();
32
33
  * console.log(rules);
33
34
  * ```
34
35
  */
35
36
  getDataValidations(): FDataValidation[];
36
- /**
37
- * @deprecated use `getValidatorStatusAsync` instead
38
- */
39
- getValidatorStatus(): Promise<ObjectMatrix<Nullable<DataValidationStatus>>>;
40
37
  /**
41
38
  * Get data validation validator status for current sheet.
42
39
  * @returns {Promise<ObjectMatrix<Nullable<DataValidationStatus>>>} matrix of validator status
43
40
  * ```ts
44
41
  * const fWorkbook = univerAPI.getActiveWorkbook();
45
- * const fWorksheet = fWorkbook.getActiveSheet();
42
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
43
+ * if (!fWorksheet) return;
46
44
  * const status = await fWorksheet.getValidatorStatusAsync();
47
45
  * console.log(status);
48
46
  * ```
@@ -54,7 +52,8 @@ export interface IFWorksheetDataValidationMixin {
54
52
  * @returns {Nullable<FDataValidation>} data validation rule
55
53
  * ```ts
56
54
  * const fWorkbook = univerAPI.getActiveWorkbook();
57
- * const fWorksheet = fWorkbook.getActiveSheet();
55
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
56
+ * if (!fWorksheet) return;
58
57
  * const rules = fWorksheet.getDataValidations();
59
58
  * console.log(fWorksheet.getDataValidation(rules[0]?.rule.uid));
60
59
  * ```
@@ -66,7 +65,8 @@ export interface IFWorksheetDataValidationMixin {
66
65
  * @example
67
66
  * ```ts
68
67
  * const fWorkbook = univerAPI.getActiveWorkbook();
69
- * const fWorksheet = fWorkbook.getActiveSheet();
68
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
69
+ * if (!fWorksheet) return;
70
70
  * const errors = await fWorksheet.getAllDataValidationError();
71
71
  * console.log(errors);
72
72
  * ```
@@ -78,7 +78,6 @@ export interface IFWorksheetDataValidationMixin {
78
78
  */
79
79
  export declare class FWorksheetDataValidationMixin extends FWorksheet implements IFWorksheetDataValidationMixin {
80
80
  getDataValidations(): FDataValidation[];
81
- getValidatorStatus(): Promise<ObjectMatrix<Nullable<DataValidationStatus>>>;
82
81
  getValidatorStatusAsync(): Promise<ObjectMatrix<Nullable<DataValidationStatus>>>;
83
82
  getDataValidation(ruleId: string): Nullable<FDataValidation>;
84
83
  getAllDataValidationErrorAsync(): Promise<IDataValidationError[]>;
@@ -33,9 +33,9 @@ export { DateValidator } from './validators/date-validator';
33
33
  export { getCellValueNumber } from './validators/decimal-validator';
34
34
  export { ListMultipleValidator } from './validators/list-multiple-validator';
35
35
  export { ListValidator } from './validators/list-validator';
36
- export { deserializeListOptions, getDataValidationCellValue, serializeListOptions } from './validators/util';
36
+ export { getDataValidationCellValue } from './validators/util';
37
37
  export { getTransformedFormula } from './validators/util';
38
- export declare const CUSTOM_FORMULA_INPUT_NAME = "data-validation.custom-formula-input";
39
- export declare const BASE_FORMULA_INPUT_NAME = "data-validation.formula-input";
40
- export declare const LIST_FORMULA_INPUT_NAME = "data-validation.list-formula-input";
41
- export declare const CHECKBOX_FORMULA_INPUT_NAME = "data-validation.checkbox-formula-input";
38
+ export declare const CUSTOM_FORMULA_INPUT_NAME = "sheets-data-validation.custom-formula-input";
39
+ export declare const BASE_FORMULA_INPUT_NAME = "sheets-data-validation.formula-input";
40
+ export declare const LIST_FORMULA_INPUT_NAME = "sheets-data-validation.list-formula-input";
41
+ export declare const CHECKBOX_FORMULA_INPUT_NAME = "sheets-data-validation.checkbox-formula-input";
@@ -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,156 @@
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-data-validation': {
18
+ operators: {
19
+ between: string;
20
+ greaterThan: string;
21
+ greaterThanOrEqual: string;
22
+ lessThan: string;
23
+ lessThanOrEqual: string;
24
+ equal: string;
25
+ notEqual: string;
26
+ notBetween: string;
27
+ legal: string;
28
+ };
29
+ ruleName: {
30
+ between: string;
31
+ greaterThan: string;
32
+ greaterThanOrEqual: string;
33
+ lessThan: string;
34
+ lessThanOrEqual: string;
35
+ equal: string;
36
+ notEqual: string;
37
+ notBetween: string;
38
+ legal: string;
39
+ };
40
+ errorMsg: {
41
+ between: string;
42
+ greaterThan: string;
43
+ greaterThanOrEqual: string;
44
+ lessThan: string;
45
+ lessThanOrEqual: string;
46
+ equal: string;
47
+ notEqual: string;
48
+ notBetween: string;
49
+ legal: string;
50
+ };
51
+ date: {
52
+ operators: {
53
+ between: string;
54
+ greaterThan: string;
55
+ greaterThanOrEqual: string;
56
+ lessThan: string;
57
+ lessThanOrEqual: string;
58
+ equal: string;
59
+ notEqual: string;
60
+ notBetween: string;
61
+ legal: string;
62
+ };
63
+ ruleName: {
64
+ between: string;
65
+ greaterThan: string;
66
+ greaterThanOrEqual: string;
67
+ lessThan: string;
68
+ lessThanOrEqual: string;
69
+ equal: string;
70
+ notEqual: string;
71
+ notBetween: string;
72
+ legal: string;
73
+ };
74
+ errorMsg: {
75
+ between: string;
76
+ greaterThan: string;
77
+ greaterThanOrEqual: string;
78
+ lessThan: string;
79
+ lessThanOrEqual: string;
80
+ equal: string;
81
+ notEqual: string;
82
+ notBetween: string;
83
+ legal: string;
84
+ };
85
+ title: string;
86
+ };
87
+ textLength: {
88
+ errorMsg: {
89
+ between: string;
90
+ greaterThan: string;
91
+ greaterThanOrEqual: string;
92
+ lessThan: string;
93
+ lessThanOrEqual: string;
94
+ equal: string;
95
+ notEqual: string;
96
+ notBetween: string;
97
+ };
98
+ title: string;
99
+ };
100
+ custom: {
101
+ ruleName: string;
102
+ title: string;
103
+ validFail: string;
104
+ error: string;
105
+ };
106
+ validFail: {
107
+ value: string;
108
+ common: string;
109
+ number: string;
110
+ formula: string;
111
+ integer: string;
112
+ date: string;
113
+ list: string;
114
+ listInvalid: string;
115
+ checkboxEqual: string;
116
+ formulaError: string;
117
+ listIntersects: string;
118
+ primitive: string;
119
+ };
120
+ any: {
121
+ title: string;
122
+ error: string;
123
+ };
124
+ list: {
125
+ title: string;
126
+ name: string;
127
+ error: string;
128
+ emptyError: string;
129
+ add: string;
130
+ dropdown: string;
131
+ options: string;
132
+ customOptions: string;
133
+ refOptions: string;
134
+ formulaError: string;
135
+ edit: string;
136
+ };
137
+ listMultiple: {
138
+ title: string;
139
+ dropdown: string;
140
+ };
141
+ decimal: {
142
+ title: string;
143
+ };
144
+ whole: {
145
+ title: string;
146
+ };
147
+ checkbox: {
148
+ title: string;
149
+ error: string;
150
+ tips: string;
151
+ checked: string;
152
+ unchecked: string;
153
+ };
154
+ };
155
+ };
156
+ 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;