@univerjs/sheets-data-validation 0.23.0 → 0.24.0-insiders.20260527-b1d726f

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 (120) hide show
  1. package/lib/cjs/facade.js +3 -66
  2. package/lib/cjs/index.js +206 -163
  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 +4 -67
  23. package/lib/es/index.js +204 -159
  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 +4 -67
  44. package/lib/index.js +204 -159
  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-workbook.d.ts +1 -43
  65. package/lib/types/facade/f-worksheet.d.ts +0 -5
  66. package/lib/types/index.d.ts +6 -6
  67. package/lib/types/locale/ar-SA.d.ts +18 -0
  68. package/lib/types/locale/ca-ES.d.ts +18 -0
  69. package/lib/types/locale/de-DE.d.ts +18 -0
  70. package/lib/types/locale/en-US.d.ts +156 -0
  71. package/lib/types/locale/es-ES.d.ts +18 -0
  72. package/lib/types/locale/fa-IR.d.ts +18 -0
  73. package/lib/types/locale/fr-FR.d.ts +18 -0
  74. package/lib/types/locale/id-ID.d.ts +18 -0
  75. package/lib/types/locale/it-IT.d.ts +18 -0
  76. package/lib/types/locale/ja-JP.d.ts +18 -0
  77. package/lib/types/locale/ko-KR.d.ts +18 -0
  78. package/lib/types/locale/pl-PL.d.ts +18 -0
  79. package/lib/types/locale/pt-BR.d.ts +18 -0
  80. package/lib/types/locale/ru-RU.d.ts +18 -0
  81. package/lib/types/locale/sk-SK.d.ts +18 -0
  82. package/lib/types/locale/vi-VN.d.ts +18 -0
  83. package/lib/types/locale/zh-CN.d.ts +18 -0
  84. package/lib/types/locale/zh-HK.d.ts +18 -0
  85. package/lib/types/locale/zh-TW.d.ts +18 -0
  86. package/lib/types/types/const/operator-text-map.d.ts +2 -1
  87. package/lib/types/validators/any-validator.d.ts +2 -2
  88. package/lib/types/validators/base-sheet-validator.d.ts +26 -0
  89. package/lib/types/validators/checkbox-validator.d.ts +2 -2
  90. package/lib/types/validators/custom-validator.d.ts +2 -2
  91. package/lib/types/validators/date-validator.d.ts +2 -2
  92. package/lib/types/validators/decimal-validator.d.ts +2 -2
  93. package/lib/types/validators/list-validator.d.ts +2 -2
  94. package/lib/types/validators/text-length-validator.d.ts +2 -2
  95. package/lib/types/validators/util.d.ts +0 -2
  96. package/lib/types/validators/whole-validator.d.ts +2 -2
  97. package/lib/umd/facade.js +1 -1
  98. package/lib/umd/index.js +1 -1
  99. package/lib/umd/locale/ar-SA.js +1 -0
  100. package/lib/umd/locale/ca-ES.js +1 -0
  101. package/lib/umd/locale/de-DE.js +1 -0
  102. package/lib/umd/locale/en-US.js +1 -0
  103. package/lib/umd/locale/es-ES.js +1 -0
  104. package/lib/umd/locale/fa-IR.js +1 -0
  105. package/lib/umd/locale/fr-FR.js +1 -0
  106. package/lib/umd/locale/id-ID.js +1 -0
  107. package/lib/umd/locale/it-IT.js +1 -0
  108. package/lib/umd/locale/ja-JP.js +1 -0
  109. package/lib/umd/locale/ko-KR.js +1 -0
  110. package/lib/umd/locale/pl-PL.js +1 -0
  111. package/lib/umd/locale/pt-BR.js +1 -0
  112. package/lib/umd/locale/ru-RU.js +1 -0
  113. package/lib/umd/locale/sk-SK.js +1 -0
  114. package/lib/umd/locale/vi-VN.js +1 -0
  115. package/lib/umd/locale/zh-CN.js +1 -0
  116. package/lib/umd/locale/zh-HK.js +1 -0
  117. package/lib/umd/locale/zh-TW.js +1 -0
  118. package/package.json +13 -8
  119. package/LICENSE +0 -176
  120. /package/lib/types/services/{dv-validator-service.d.ts → dv-validator.service.d.ts} +0 -0
@@ -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;
@@ -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;
@@ -15,5 +15,6 @@
15
15
  */
16
16
  import { DataValidationOperator } from '@univerjs/core';
17
17
  export declare const OperatorTextMap: Record<DataValidationOperator, string>;
18
- export declare const OperatorTitleMap: Record<DataValidationOperator, string>;
18
+ export declare const OperatorTitleMap: Record<DataValidationOperator | 'NONE', string>;
19
19
  export declare const OperatorErrorTitleMap: Record<DataValidationOperator | 'NONE', string>;
20
+ export declare const TextLengthErrorTitleMap: Record<DataValidationOperator, string>;
@@ -15,8 +15,8 @@
15
15
  */
16
16
  import type { CellValue, DataValidationOperator, IDataValidationRule, IDataValidationRuleBase } from '@univerjs/core';
17
17
  import type { IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
18
- import { BaseDataValidator } from '@univerjs/data-validation';
19
- export declare class AnyValidator extends BaseDataValidator {
18
+ import { BaseSheetValidator } from './base-sheet-validator';
19
+ export declare class AnyValidator extends BaseSheetValidator {
20
20
  id: string;
21
21
  title: string;
22
22
  operators: DataValidationOperator[];
@@ -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
+ import type { IDataValidationRuleBase } from '@univerjs/core';
17
+ import type { ISheetLocationBase } from '@univerjs/sheets';
18
+ import { BaseDataValidator } from '@univerjs/data-validation';
19
+ export declare const FORMULA1 = "{FORMULA1}";
20
+ export declare const FORMULA2 = "{FORMULA2}";
21
+ export declare const TYPE = "{TYPE}";
22
+ export declare abstract class BaseSheetValidator extends BaseDataValidator {
23
+ get operatorNames(): string[];
24
+ generateRuleName(rule: IDataValidationRuleBase): string;
25
+ generateRuleErrorMessage(rule: IDataValidationRuleBase, _position: ISheetLocationBase): string;
26
+ }
@@ -16,7 +16,7 @@
16
16
  import type { CellValue, DataValidationOperator, IDataValidationRule, IDataValidationRuleBase, ISheetDataValidationRule, Nullable } from '@univerjs/core';
17
17
  import type { IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
18
18
  import { WrapStrategy } from '@univerjs/core';
19
- import { BaseDataValidator } from '@univerjs/data-validation';
19
+ import { BaseSheetValidator } from './base-sheet-validator';
20
20
  export declare const CHECKBOX_FORMULA_1 = 1;
21
21
  export declare const CHECKBOX_FORMULA_2 = 0;
22
22
  interface ICheckboxFormulaResult extends IFormulaResult {
@@ -24,7 +24,7 @@ interface ICheckboxFormulaResult extends IFormulaResult {
24
24
  originFormula2: Nullable<CellValue>;
25
25
  }
26
26
  export declare const transformCheckboxValue: (value: Nullable<CellValue>) => Nullable<CellValue>;
27
- export declare class CheckboxValidator extends BaseDataValidator {
27
+ export declare class CheckboxValidator extends BaseSheetValidator {
28
28
  id: string;
29
29
  title: string;
30
30
  operators: DataValidationOperator[];
@@ -15,8 +15,8 @@
15
15
  */
16
16
  import type { CellValue, DataValidationOperator, IDataValidationRule, IDataValidationRuleBase } from '@univerjs/core';
17
17
  import type { IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
18
- import { BaseDataValidator } from '@univerjs/data-validation';
19
- export declare class CustomFormulaValidator extends BaseDataValidator {
18
+ import { BaseSheetValidator } from './base-sheet-validator';
19
+ export declare class CustomFormulaValidator extends BaseSheetValidator {
20
20
  id: string;
21
21
  title: string;
22
22
  operators: DataValidationOperator[];
@@ -17,8 +17,8 @@ import type { CellValue, IDataValidationRule, IDataValidationRuleBase } from '@u
17
17
  import type { IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
18
18
  import type { ISheetLocationBase } from '@univerjs/sheets';
19
19
  import { DataValidationOperator } from '@univerjs/core';
20
- import { BaseDataValidator } from '@univerjs/data-validation';
21
- export declare class DateValidator extends BaseDataValidator {
20
+ import { BaseSheetValidator } from './base-sheet-validator';
21
+ export declare class DateValidator extends BaseSheetValidator {
22
22
  id: string;
23
23
  title: string;
24
24
  order: number;
@@ -17,9 +17,9 @@ import type { CellValue, IDataValidationRule, IDataValidationRuleBase, Nullable
17
17
  import type { IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
18
18
  import type { ISheetLocationBase } from '@univerjs/sheets';
19
19
  import { DataValidationOperator } from '@univerjs/core';
20
- import { BaseDataValidator } from '@univerjs/data-validation';
20
+ import { BaseSheetValidator } from './base-sheet-validator';
21
21
  export declare function getCellValueNumber(cellValue: CellValue): number;
22
- export declare class DecimalValidator extends BaseDataValidator {
22
+ export declare class DecimalValidator extends BaseSheetValidator {
23
23
  private readonly _customFormulaService;
24
24
  id: string;
25
25
  private readonly _lexerTreeBuilder;
@@ -15,12 +15,12 @@
15
15
  */
16
16
  import type { CellValue, DataValidationOperator, ICellData, IDataValidationRule, ISheetDataValidationRule, IStyleData, Nullable } from '@univerjs/core';
17
17
  import type { IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
18
- import { BaseDataValidator } from '@univerjs/data-validation';
19
18
  import { LexerTreeBuilder } from '@univerjs/engine-formula';
20
19
  import { DataValidationFormulaService } from '../services/dv-formula.service';
20
+ import { BaseSheetValidator } from './base-sheet-validator';
21
21
  export declare function getRuleFormulaResultSet(result: Nullable<Nullable<ICellData>[][]>): string[];
22
22
  export declare function isValidListFormula(formula: string, lexer: LexerTreeBuilder): boolean | undefined;
23
- export declare class ListValidator extends BaseDataValidator {
23
+ export declare class ListValidator extends BaseSheetValidator {
24
24
  protected formulaService: DataValidationFormulaService;
25
25
  private _lexer;
26
26
  private _univerInstanceService;
@@ -17,8 +17,8 @@ import type { CellValue, IDataValidationRule, IDataValidationRuleBase, Nullable
17
17
  import type { IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
18
18
  import type { ISheetLocationBase } from '@univerjs/sheets';
19
19
  import { DataValidationOperator } from '@univerjs/core';
20
- import { BaseDataValidator } from '@univerjs/data-validation';
21
- export declare class TextLengthValidator extends BaseDataValidator {
20
+ import { BaseSheetValidator } from './base-sheet-validator';
21
+ export declare class TextLengthValidator extends BaseSheetValidator {
22
22
  id: string;
23
23
  title: string;
24
24
  private readonly _lexerTreeBuilder;
@@ -17,8 +17,6 @@ import type { ICellData, ISheetDataValidationRule, IUnitRangeName, IUniverInstan
17
17
  import type { LexerTreeBuilder } from '@univerjs/engine-formula';
18
18
  import type { ISheetLocationBase } from '@univerjs/sheets';
19
19
  export declare function getSheetRangeValueSet(grid: IUnitRangeName, univerInstanceService: IUniverInstanceService, currUnitId: string, currSubUnitId: string): string[];
20
- export declare function serializeListOptions(options: string[]): string;
21
- export declare function deserializeListOptions(optionsStr: string): string[];
22
20
  export declare function getDataValidationCellValue(cellData: Nullable<ICellData>): string;
23
21
  export declare function getTransformedFormula(lexerTreeBuilder: LexerTreeBuilder, rule: ISheetDataValidationRule, position: ISheetLocationBase): {
24
22
  transformedFormula1: string | undefined;
@@ -17,8 +17,8 @@ import type { CellValue, IDataValidationRule, IDataValidationRuleBase, Nullable
17
17
  import type { IFormulaResult, IFormulaValidResult, IValidatorCellInfo } from '@univerjs/data-validation';
18
18
  import type { ISheetLocationBase } from '@univerjs/sheets';
19
19
  import { DataValidationOperator } from '@univerjs/core';
20
- import { BaseDataValidator } from '@univerjs/data-validation';
21
- export declare class WholeValidator extends BaseDataValidator {
20
+ import { BaseSheetValidator } from './base-sheet-validator';
21
+ export declare class WholeValidator extends BaseSheetValidator {
22
22
  private readonly _customFormulaService;
23
23
  private readonly _lexerTreeBuilder;
24
24
  id: string;