@univerjs/preset-sheets-data-validation 0.25.0 → 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +3 -3
  2. package/lib/cjs/index.js +41 -1
  3. package/lib/cjs/locales/ar-SA.js +13 -1
  4. package/lib/cjs/locales/ca-ES.js +13 -1
  5. package/lib/cjs/locales/de-DE.js +13 -1
  6. package/lib/cjs/locales/en-US.js +13 -1
  7. package/lib/cjs/locales/es-ES.js +13 -1
  8. package/lib/cjs/locales/fa-IR.js +13 -1
  9. package/lib/cjs/locales/fr-FR.js +13 -1
  10. package/lib/cjs/locales/id-ID.js +13 -1
  11. package/lib/cjs/locales/it-IT.js +13 -1
  12. package/lib/cjs/locales/ja-JP.js +13 -1
  13. package/lib/cjs/locales/ko-KR.js +13 -1
  14. package/lib/cjs/locales/pl-PL.js +13 -1
  15. package/lib/cjs/locales/pt-BR.js +13 -1
  16. package/lib/cjs/locales/ru-RU.js +13 -1
  17. package/lib/cjs/locales/sk-SK.js +13 -1
  18. package/lib/cjs/locales/vi-VN.js +13 -1
  19. package/lib/cjs/locales/zh-CN.js +13 -1
  20. package/lib/cjs/locales/zh-HK.js +13 -1
  21. package/lib/cjs/locales/zh-TW.js +13 -1
  22. package/lib/cjs/rolldown-runtime-C_NdSu1c.js +34 -0
  23. package/lib/es/index.js +25 -22
  24. package/lib/es/locales/ar-SA.js +9 -12
  25. package/lib/es/locales/ca-ES.js +9 -12
  26. package/lib/es/locales/de-DE.js +9 -12
  27. package/lib/es/locales/en-US.js +9 -12
  28. package/lib/es/locales/es-ES.js +9 -12
  29. package/lib/es/locales/fa-IR.js +9 -12
  30. package/lib/es/locales/fr-FR.js +9 -12
  31. package/lib/es/locales/id-ID.js +9 -12
  32. package/lib/es/locales/it-IT.js +9 -12
  33. package/lib/es/locales/ja-JP.js +9 -12
  34. package/lib/es/locales/ko-KR.js +9 -12
  35. package/lib/es/locales/pl-PL.js +9 -12
  36. package/lib/es/locales/pt-BR.js +9 -12
  37. package/lib/es/locales/ru-RU.js +9 -12
  38. package/lib/es/locales/sk-SK.js +9 -12
  39. package/lib/es/locales/vi-VN.js +9 -12
  40. package/lib/es/locales/zh-CN.js +9 -12
  41. package/lib/es/locales/zh-HK.js +9 -12
  42. package/lib/es/locales/zh-TW.js +9 -12
  43. package/lib/index.css +313 -1
  44. package/lib/index.js +25 -22
  45. package/lib/locales/ar-SA.js +9 -12
  46. package/lib/locales/ca-ES.js +9 -12
  47. package/lib/locales/de-DE.js +9 -12
  48. package/lib/locales/en-US.js +9 -12
  49. package/lib/locales/es-ES.js +9 -12
  50. package/lib/locales/fa-IR.js +9 -12
  51. package/lib/locales/fr-FR.js +9 -12
  52. package/lib/locales/id-ID.js +9 -12
  53. package/lib/locales/it-IT.js +9 -12
  54. package/lib/locales/ja-JP.js +9 -12
  55. package/lib/locales/ko-KR.js +9 -12
  56. package/lib/locales/pl-PL.js +9 -12
  57. package/lib/locales/pt-BR.js +9 -12
  58. package/lib/locales/ru-RU.js +9 -12
  59. package/lib/locales/sk-SK.js +9 -12
  60. package/lib/locales/vi-VN.js +9 -12
  61. package/lib/locales/zh-CN.js +9 -12
  62. package/lib/locales/zh-HK.js +9 -12
  63. package/lib/locales/zh-TW.js +9 -12
  64. package/lib/types/index.d.ts +16 -1
  65. package/lib/types/locales/ar-SA.d.ts +386 -1
  66. package/lib/types/locales/ca-ES.d.ts +386 -1
  67. package/lib/types/locales/de-DE.d.ts +386 -1
  68. package/lib/types/locales/en-US.d.ts +386 -1
  69. package/lib/types/locales/es-ES.d.ts +386 -1
  70. package/lib/types/locales/fa-IR.d.ts +386 -1
  71. package/lib/types/locales/fr-FR.d.ts +386 -1
  72. package/lib/types/locales/id-ID.d.ts +386 -1
  73. package/lib/types/locales/it-IT.d.ts +386 -1
  74. package/lib/types/locales/ja-JP.d.ts +386 -1
  75. package/lib/types/locales/ko-KR.d.ts +386 -1
  76. package/lib/types/locales/pl-PL.d.ts +386 -1
  77. package/lib/types/locales/pt-BR.d.ts +386 -1
  78. package/lib/types/locales/ru-RU.d.ts +386 -1
  79. package/lib/types/locales/sk-SK.d.ts +386 -1
  80. package/lib/types/locales/vi-VN.d.ts +386 -1
  81. package/lib/types/locales/zh-CN.d.ts +386 -1
  82. package/lib/types/locales/zh-HK.d.ts +386 -1
  83. package/lib/types/locales/zh-TW.d.ts +386 -1
  84. package/lib/types/preset.d.ts +22 -0
  85. package/package.json +14 -16
  86. package/lib/types/types.d.ts +0 -11
  87. package/lib/types/umd.d.ts +0 -8
  88. package/lib/umd/index.js +0 -14
  89. package/lib/umd/locales/ar-SA.js +0 -11
  90. package/lib/umd/locales/ca-ES.js +0 -11
  91. package/lib/umd/locales/de-DE.js +0 -11
  92. package/lib/umd/locales/en-US.js +0 -11
  93. package/lib/umd/locales/es-ES.js +0 -11
  94. package/lib/umd/locales/fa-IR.js +0 -11
  95. package/lib/umd/locales/fr-FR.js +0 -11
  96. package/lib/umd/locales/id-ID.js +0 -11
  97. package/lib/umd/locales/it-IT.js +0 -11
  98. package/lib/umd/locales/ja-JP.js +0 -11
  99. package/lib/umd/locales/ko-KR.js +0 -11
  100. package/lib/umd/locales/pl-PL.js +0 -11
  101. package/lib/umd/locales/pt-BR.js +0 -11
  102. package/lib/umd/locales/ru-RU.js +0 -11
  103. package/lib/umd/locales/sk-SK.js +0 -11
  104. package/lib/umd/locales/vi-VN.js +0 -11
  105. package/lib/umd/locales/zh-CN.js +0 -11
  106. package/lib/umd/locales/zh-HK.js +0 -11
  107. package/lib/umd/locales/zh-TW.js +0 -11
@@ -1,4 +1,389 @@
1
1
  declare const _default: {
2
- [x: string]: any;
2
+ 'data-validation': {
3
+ operators: {
4
+ between: string;
5
+ greaterThan: string;
6
+ greaterThanOrEqual: string;
7
+ lessThan: string;
8
+ lessThanOrEqual: string;
9
+ equal: string;
10
+ notEqual: string;
11
+ notBetween: string;
12
+ legal: string;
13
+ };
14
+ ruleName: {
15
+ between: string;
16
+ greaterThan: string;
17
+ greaterThanOrEqual: string;
18
+ lessThan: string;
19
+ lessThanOrEqual: string;
20
+ equal: string;
21
+ notEqual: string;
22
+ notBetween: string;
23
+ legal: string;
24
+ };
25
+ errorMsg: {
26
+ between: string;
27
+ greaterThan: string;
28
+ greaterThanOrEqual: string;
29
+ lessThan: string;
30
+ lessThanOrEqual: string;
31
+ equal: string;
32
+ notEqual: string;
33
+ notBetween: string;
34
+ legal: string;
35
+ };
36
+ date: {
37
+ operators: {
38
+ between: string;
39
+ greaterThan: string;
40
+ greaterThanOrEqual: string;
41
+ lessThan: string;
42
+ lessThanOrEqual: string;
43
+ equal: string;
44
+ notEqual: string;
45
+ notBetween: string;
46
+ legal: string;
47
+ };
48
+ ruleName: {
49
+ between: string;
50
+ greaterThan: string;
51
+ greaterThanOrEqual: string;
52
+ lessThan: string;
53
+ lessThanOrEqual: string;
54
+ equal: string;
55
+ notEqual: string;
56
+ notBetween: string;
57
+ legal: string;
58
+ };
59
+ errorMsg: {
60
+ between: string;
61
+ greaterThan: string;
62
+ greaterThanOrEqual: string;
63
+ lessThan: string;
64
+ lessThanOrEqual: string;
65
+ equal: string;
66
+ notEqual: string;
67
+ notBetween: string;
68
+ legal: string;
69
+ };
70
+ title: string;
71
+ };
72
+ textLength: {
73
+ errorMsg: {
74
+ between: string;
75
+ greaterThan: string;
76
+ greaterThanOrEqual: string;
77
+ lessThan: string;
78
+ lessThanOrEqual: string;
79
+ equal: string;
80
+ notEqual: string;
81
+ notBetween: string;
82
+ };
83
+ title: string;
84
+ };
85
+ custom: {
86
+ ruleName: string;
87
+ title: string;
88
+ validFail: string;
89
+ error: string;
90
+ };
91
+ validFail: {
92
+ value: string;
93
+ common: string;
94
+ number: string;
95
+ formula: string;
96
+ integer: string;
97
+ date: string;
98
+ list: string;
99
+ listInvalid: string;
100
+ checkboxEqual: string;
101
+ formulaError: string;
102
+ listIntersects: string;
103
+ primitive: string;
104
+ };
105
+ any: {
106
+ title: string;
107
+ error: string;
108
+ };
109
+ list: {
110
+ title: string;
111
+ name: string;
112
+ error: string;
113
+ emptyError: string;
114
+ add: string;
115
+ dropdown: string;
116
+ options: string;
117
+ customOptions: string;
118
+ refOptions: string;
119
+ formulaError: string;
120
+ edit: string;
121
+ };
122
+ listMultiple: {
123
+ title: string;
124
+ dropdown: string;
125
+ };
126
+ decimal: {
127
+ title: string;
128
+ };
129
+ whole: {
130
+ title: string;
131
+ };
132
+ checkbox: {
133
+ title: string;
134
+ error: string;
135
+ tips: string;
136
+ checked: string;
137
+ unchecked: string;
138
+ };
139
+ };
140
+ } & {
141
+ 'sheets-data-validation': {
142
+ operators: {
143
+ between: string;
144
+ greaterThan: string;
145
+ greaterThanOrEqual: string;
146
+ lessThan: string;
147
+ lessThanOrEqual: string;
148
+ equal: string;
149
+ notEqual: string;
150
+ notBetween: string;
151
+ legal: string;
152
+ };
153
+ ruleName: {
154
+ between: string;
155
+ greaterThan: string;
156
+ greaterThanOrEqual: string;
157
+ lessThan: string;
158
+ lessThanOrEqual: string;
159
+ equal: string;
160
+ notEqual: string;
161
+ notBetween: string;
162
+ legal: string;
163
+ };
164
+ errorMsg: {
165
+ between: string;
166
+ greaterThan: string;
167
+ greaterThanOrEqual: string;
168
+ lessThan: string;
169
+ lessThanOrEqual: string;
170
+ equal: string;
171
+ notEqual: string;
172
+ notBetween: string;
173
+ legal: string;
174
+ };
175
+ date: {
176
+ operators: {
177
+ between: string;
178
+ greaterThan: string;
179
+ greaterThanOrEqual: string;
180
+ lessThan: string;
181
+ lessThanOrEqual: string;
182
+ equal: string;
183
+ notEqual: string;
184
+ notBetween: string;
185
+ legal: string;
186
+ };
187
+ ruleName: {
188
+ between: string;
189
+ greaterThan: string;
190
+ greaterThanOrEqual: string;
191
+ lessThan: string;
192
+ lessThanOrEqual: string;
193
+ equal: string;
194
+ notEqual: string;
195
+ notBetween: string;
196
+ legal: string;
197
+ };
198
+ errorMsg: {
199
+ between: string;
200
+ greaterThan: string;
201
+ greaterThanOrEqual: string;
202
+ lessThan: string;
203
+ lessThanOrEqual: string;
204
+ equal: string;
205
+ notEqual: string;
206
+ notBetween: string;
207
+ legal: string;
208
+ };
209
+ title: string;
210
+ };
211
+ textLength: {
212
+ errorMsg: {
213
+ between: string;
214
+ greaterThan: string;
215
+ greaterThanOrEqual: string;
216
+ lessThan: string;
217
+ lessThanOrEqual: string;
218
+ equal: string;
219
+ notEqual: string;
220
+ notBetween: string;
221
+ };
222
+ title: string;
223
+ };
224
+ custom: {
225
+ ruleName: string;
226
+ title: string;
227
+ validFail: string;
228
+ error: string;
229
+ };
230
+ validFail: {
231
+ value: string;
232
+ common: string;
233
+ number: string;
234
+ formula: string;
235
+ integer: string;
236
+ date: string;
237
+ list: string;
238
+ listInvalid: string;
239
+ checkboxEqual: string;
240
+ formulaError: string;
241
+ listIntersects: string;
242
+ primitive: string;
243
+ };
244
+ any: {
245
+ title: string;
246
+ error: string;
247
+ };
248
+ list: {
249
+ title: string;
250
+ name: string;
251
+ error: string;
252
+ emptyError: string;
253
+ add: string;
254
+ dropdown: string;
255
+ options: string;
256
+ customOptions: string;
257
+ refOptions: string;
258
+ formulaError: string;
259
+ edit: string;
260
+ };
261
+ listMultiple: {
262
+ title: string;
263
+ dropdown: string;
264
+ };
265
+ decimal: {
266
+ title: string;
267
+ };
268
+ whole: {
269
+ title: string;
270
+ };
271
+ checkbox: {
272
+ title: string;
273
+ error: string;
274
+ tips: string;
275
+ checked: string;
276
+ unchecked: string;
277
+ };
278
+ };
279
+ } & {
280
+ 'sheets-data-validation-ui': {
281
+ title: string;
282
+ operators: {
283
+ legal: string;
284
+ };
285
+ validFail: {
286
+ value: string;
287
+ common: string;
288
+ number: string;
289
+ formula: string;
290
+ integer: string;
291
+ date: string;
292
+ list: string;
293
+ listInvalid: string;
294
+ checkboxEqual: string;
295
+ formulaError: string;
296
+ listIntersects: string;
297
+ primitive: string;
298
+ };
299
+ panel: {
300
+ title: string;
301
+ addTitle: string;
302
+ removeAll: string;
303
+ add: string;
304
+ range: string;
305
+ type: string;
306
+ options: string;
307
+ operator: string;
308
+ removeRule: string;
309
+ done: string;
310
+ formulaPlaceholder: string;
311
+ valuePlaceholder: string;
312
+ formulaAnd: string;
313
+ invalid: string;
314
+ showWarning: string;
315
+ rejectInput: string;
316
+ messageInfo: string;
317
+ showInfo: string;
318
+ rangeError: string;
319
+ allowBlank: string;
320
+ };
321
+ any: {
322
+ title: string;
323
+ error: string;
324
+ };
325
+ date: {
326
+ title: string;
327
+ };
328
+ list: {
329
+ title: string;
330
+ name: string;
331
+ error: string;
332
+ emptyError: string;
333
+ add: string;
334
+ dropdown: string;
335
+ options: string;
336
+ customOptions: string;
337
+ refOptions: string;
338
+ formulaError: string;
339
+ edit: string;
340
+ };
341
+ listMultiple: {
342
+ title: string;
343
+ dropdown: string;
344
+ };
345
+ textLength: {
346
+ title: string;
347
+ };
348
+ decimal: {
349
+ title: string;
350
+ };
351
+ whole: {
352
+ title: string;
353
+ };
354
+ checkbox: {
355
+ title: string;
356
+ error: string;
357
+ tips: string;
358
+ checked: string;
359
+ unchecked: string;
360
+ };
361
+ custom: {
362
+ title: string;
363
+ error: string;
364
+ validFail: string;
365
+ };
366
+ alert: {
367
+ title: string;
368
+ ok: string;
369
+ };
370
+ error: {
371
+ title: string;
372
+ };
373
+ renderMode: {
374
+ arrow: string;
375
+ chip: string;
376
+ text: string;
377
+ label: string;
378
+ };
379
+ showTime: {
380
+ label: string;
381
+ };
382
+ permission: {
383
+ dialog: {
384
+ setStyleErr: string;
385
+ };
386
+ };
387
+ };
3
388
  };
4
389
  export default _default;
@@ -0,0 +1,22 @@
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 { IPreset } from '@univerjs/presets';
17
+ import type { IUniverSheetsDataValidationUIConfig } from '@univerjs/sheets-data-validation-ui';
18
+ import '@univerjs/sheets-data-validation/facade';
19
+ export type * from '@univerjs/sheets-data-validation/facade';
20
+ export interface IUniverSheetsDataValidationPresetConfig extends Pick<IUniverSheetsDataValidationUIConfig, 'showEditOnDropdown' | 'showSearchOnDropdown'> {
21
+ }
22
+ export declare function UniverSheetsDataValidationPreset(config?: Partial<IUniverSheetsDataValidationPresetConfig>): IPreset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/preset-sheets-data-validation",
3
- "version": "0.25.0",
3
+ "version": "1.0.0-alpha.0",
4
4
  "private": false,
5
5
  "description": "Preset for data validation in Univer Sheets.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -12,10 +12,10 @@
12
12
  "homepage": "https://univer.ai",
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "https://github.com/dream-num/univer-presets"
15
+ "url": "https://github.com/dream-num/univer"
16
16
  },
17
17
  "bugs": {
18
- "url": "https://github.com/dream-num/univer-presets/issues"
18
+ "url": "https://github.com/dream-num/univer/issues"
19
19
  },
20
20
  "keywords": [
21
21
  "univer",
@@ -32,11 +32,6 @@
32
32
  "require": "./lib/cjs/index.js",
33
33
  "types": "./lib/types/index.d.ts"
34
34
  },
35
- "./*": {
36
- "import": "./lib/es/*",
37
- "require": "./lib/cjs/*",
38
- "types": "./lib/types/index.d.ts"
39
- },
40
35
  "./locales/*": {
41
36
  "import": "./lib/es/locales/*.js",
42
37
  "require": "./lib/cjs/locales/*.js",
@@ -51,6 +46,7 @@
51
46
  "directories": {
52
47
  "lib": "lib"
53
48
  },
49
+ "types": "./lib/types/index.d.ts",
54
50
  "files": [
55
51
  "lib"
56
52
  ],
@@ -60,21 +56,23 @@
60
56
  "rxjs": ">=7.0.0"
61
57
  },
62
58
  "dependencies": {
63
- "@univerjs/data-validation": "0.25.0",
64
- "@univerjs/sheets-data-validation": "0.25.0",
65
- "@univerjs/sheets-data-validation-ui": "0.25.0"
59
+ "@univerjs/data-validation": "1.0.0-alpha.0",
60
+ "@univerjs/sheets-data-validation-ui": "1.0.0-alpha.0",
61
+ "@univerjs/sheets-data-validation": "1.0.0-alpha.0"
66
62
  },
67
63
  "devDependencies": {
68
- "@univerjs/core": "0.25.0",
69
64
  "react": "18.3.1",
70
65
  "react-dom": "18.3.1",
71
- "rxjs": "7.8.2",
66
+ "rxjs": "^7.8.2",
72
67
  "typescript": "^6.0.3",
73
- "@univerjs-infra/shared": "0.25.0"
68
+ "@univerjs-infra/shared": "1.0.0-alpha.0",
69
+ "@univerjs/core": "1.0.0-alpha.0",
70
+ "@univerjs/presets": "1.0.0-alpha.0"
74
71
  },
75
72
  "scripts": {
76
- "prebuild:preset": "tsx prepare.ts",
77
- "build:preset": "tsx build.ts",
73
+ "build:bundle": "univer-cli preset build --cleanup",
74
+ "build:types": "tsc -p tsconfig.node.json",
75
+ "build": "pnpm run build:bundle && pnpm run build:types",
78
76
  "typecheck": "tsc --noEmit"
79
77
  },
80
78
  "module": "./lib/es/index.js"
@@ -1,11 +0,0 @@
1
- import { IUniverConfig, Plugin, PluginCtor } from '@univerjs/core';
2
- /**
3
- * A collection of plugins and their default configs.
4
- */
5
- export interface IPreset {
6
- plugins: Array<PluginCtor<Plugin> | [PluginCtor<Plugin>, ConstructorParameters<PluginCtor<Plugin>>[0]]>;
7
- locales?: IUniverConfig['locales'];
8
- }
9
- export interface IPresetOptions {
10
- lazy?: boolean;
11
- }
@@ -1,8 +0,0 @@
1
- import { IUniverSheetsDataValidationUIConfig } from '@univerjs/sheets-data-validation-ui';
2
- import { IPreset } from './types';
3
- import '@univerjs/sheets-data-validation/lib/facade';
4
- import '@univerjs/sheets-data-validation-ui/lib/index.css';
5
- export type * from '@univerjs/sheets-data-validation/lib/facade';
6
- export interface IUniverSheetsDataValidationPresetConfig extends Pick<IUniverSheetsDataValidationUIConfig, 'showEditOnDropdown' | 'showSearchOnDropdown'> {
7
- }
8
- export declare function UniverSheetsDataValidationPreset(config?: Partial<IUniverSheetsDataValidationPresetConfig>): IPreset;