@univerjs/data-validation 1.3.1 → 1.5.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 (64) hide show
  1. package/README.md +5 -5
  2. package/lib/cjs/index.js +24 -42
  3. package/lib/cjs/locale/ar-SA.js +1 -2
  4. package/lib/cjs/locale/ca-ES.js +1 -2
  5. package/lib/cjs/locale/de-DE.js +1 -2
  6. package/lib/cjs/locale/en-US.js +1 -2
  7. package/lib/cjs/locale/es-ES.js +1 -2
  8. package/lib/cjs/locale/fa-IR.js +1 -2
  9. package/lib/cjs/locale/fr-FR.js +1 -2
  10. package/lib/cjs/locale/id-ID.js +1 -2
  11. package/lib/cjs/locale/it-IT.js +1 -2
  12. package/lib/cjs/locale/ja-JP.js +1 -2
  13. package/lib/cjs/locale/ko-KR.js +1 -2
  14. package/lib/cjs/locale/pl-PL.js +1 -2
  15. package/lib/cjs/locale/pt-BR.js +1 -2
  16. package/lib/cjs/locale/ru-RU.js +1 -2
  17. package/lib/cjs/locale/sk-SK.js +1 -2
  18. package/lib/cjs/locale/vi-VN.js +1 -2
  19. package/lib/cjs/locale/zh-CN.js +1 -2
  20. package/lib/cjs/locale/zh-HK.js +1 -2
  21. package/lib/cjs/locale/zh-TW.js +1 -2
  22. package/lib/es/index.js +24 -42
  23. package/lib/es/locale/ar-SA.js +1 -2
  24. package/lib/es/locale/ca-ES.js +1 -2
  25. package/lib/es/locale/de-DE.js +1 -2
  26. package/lib/es/locale/en-US.js +1 -2
  27. package/lib/es/locale/es-ES.js +1 -2
  28. package/lib/es/locale/fa-IR.js +1 -2
  29. package/lib/es/locale/fr-FR.js +1 -2
  30. package/lib/es/locale/id-ID.js +1 -2
  31. package/lib/es/locale/it-IT.js +1 -2
  32. package/lib/es/locale/ja-JP.js +1 -2
  33. package/lib/es/locale/ko-KR.js +1 -2
  34. package/lib/es/locale/pl-PL.js +1 -2
  35. package/lib/es/locale/pt-BR.js +1 -2
  36. package/lib/es/locale/ru-RU.js +1 -2
  37. package/lib/es/locale/sk-SK.js +1 -2
  38. package/lib/es/locale/vi-VN.js +1 -2
  39. package/lib/es/locale/zh-CN.js +1 -2
  40. package/lib/es/locale/zh-HK.js +1 -2
  41. package/lib/es/locale/zh-TW.js +1 -2
  42. package/lib/index.js +24 -42
  43. package/lib/locale/ar-SA.js +1 -2
  44. package/lib/locale/ca-ES.js +1 -2
  45. package/lib/locale/de-DE.js +1 -2
  46. package/lib/locale/en-US.js +1 -2
  47. package/lib/locale/es-ES.js +1 -2
  48. package/lib/locale/fa-IR.js +1 -2
  49. package/lib/locale/fr-FR.js +1 -2
  50. package/lib/locale/id-ID.js +1 -2
  51. package/lib/locale/it-IT.js +1 -2
  52. package/lib/locale/ja-JP.js +1 -2
  53. package/lib/locale/ko-KR.js +1 -2
  54. package/lib/locale/pl-PL.js +1 -2
  55. package/lib/locale/pt-BR.js +1 -2
  56. package/lib/locale/ru-RU.js +1 -2
  57. package/lib/locale/sk-SK.js +1 -2
  58. package/lib/locale/vi-VN.js +1 -2
  59. package/lib/locale/zh-CN.js +1 -2
  60. package/lib/locale/zh-HK.js +1 -2
  61. package/lib/locale/zh-TW.js +1 -2
  62. package/lib/types/services/data-validator-registry.service.d.ts +1 -1
  63. package/lib/umd/index.js +1 -1
  64. package/package.json +9 -9
package/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  ## Package Overview
10
10
 
11
- | Package | UMD global | CSS | Locales | Facade entry |
12
- | --- | --- | :---: | :---: | :---: |
13
- | `@univerjs/data-validation` | `UniverDataValidation` | No | Yes | No |
11
+ | Package | UMD global | CSS | Locales | Facade entry | Worker entry |
12
+ | --- | --- | :---: | :---: | :---: | :---: |
13
+ | `@univerjs/data-validation` | `UniverDataValidation` | No | Yes | No | No |
14
14
 
15
15
  ## Installation
16
16
 
@@ -20,10 +20,10 @@ pnpm add @univerjs/data-validation
20
20
  npm install @univerjs/data-validation
21
21
  ```
22
22
 
23
- Keep all `@univerjs/*` packages on the same version.
24
-
25
23
  ## Usage
26
24
 
25
+ Start with the [integration setup](https://docs.univer.ai/) for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
26
+
27
27
  ```ts
28
28
  import { LocaleType, mergeLocales, Univer } from '@univerjs/core';
29
29
  import { UniverDataValidationPlugin } from '@univerjs/data-validation';
package/lib/cjs/index.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  let _univerjs_core = require("@univerjs/core");
3
3
  let rxjs = require("rxjs");
4
4
 
5
- //#region src/common/util.ts
5
+ // src/common/util.ts
6
6
  function getRuleSetting(rule) {
7
7
  return {
8
8
  type: rule.type,
@@ -28,8 +28,7 @@ function getRuleOptions(rule) {
28
28
  };
29
29
  }
30
30
 
31
- //#endregion
32
- //#region src/types/enum/update-rule-type.ts
31
+ // src/types/enum/update-rule-type.ts
33
32
  /**
34
33
  * Copyright 2023-present DreamNum Co., Ltd.
35
34
  *
@@ -53,8 +52,7 @@ let UpdateRuleType = /* @__PURE__ */ function(UpdateRuleType) {
53
52
  return UpdateRuleType;
54
53
  }({});
55
54
 
56
- //#endregion
57
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
55
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
58
56
  function _typeof(o) {
59
57
  "@babel/helpers - typeof";
60
58
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -64,28 +62,25 @@ function _typeof(o) {
64
62
  }, _typeof(o);
65
63
  }
66
64
 
67
- //#endregion
68
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
69
- function toPrimitive(t, r) {
65
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
66
+ function toPrimitive(t, e) {
70
67
  if ("object" != _typeof(t) || !t) return t;
71
- var e = t[Symbol.toPrimitive];
72
- if (void 0 !== e) {
73
- var i = e.call(t, r || "default");
68
+ var r;
69
+ if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
70
+ var i = r.call(t, e || "default");
74
71
  if ("object" != _typeof(i)) return i;
75
72
  throw new TypeError("@@toPrimitive must return a primitive value.");
76
73
  }
77
- return ("string" === r ? String : Number)(t);
74
+ return ("string" === e ? String : Number)(t);
78
75
  }
79
76
 
80
- //#endregion
81
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
77
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
82
78
  function toPropertyKey(t) {
83
79
  var i = toPrimitive(t, "string");
84
80
  return "symbol" == _typeof(i) ? i : i + "";
85
81
  }
86
82
 
87
- //#endregion
88
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
83
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
89
84
  function _defineProperty(e, r, t) {
90
85
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
91
86
  value: t,
@@ -95,16 +90,14 @@ function _defineProperty(e, r, t) {
95
90
  }) : e[r] = t, e;
96
91
  }
97
92
 
98
- //#endregion
99
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
93
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
100
94
  function __decorateParam(paramIndex, decorator) {
101
95
  return function(target, key) {
102
96
  decorator(target, key, paramIndex);
103
97
  };
104
98
  }
105
99
 
106
- //#endregion
107
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
100
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
108
101
  function __decorate(decorators, target, key, desc) {
109
102
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
110
103
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -112,8 +105,7 @@ function __decorate(decorators, target, key, desc) {
112
105
  return c > 3 && r && Object.defineProperty(target, key, r), r;
113
106
  }
114
107
 
115
- //#endregion
116
- //#region src/models/data-validation-model.ts
108
+ // src/models/data-validation-model.ts
117
109
  let DataValidationModel = class DataValidationModel extends _univerjs_core.Disposable {
118
110
  constructor(_logService) {
119
111
  super();
@@ -266,8 +258,7 @@ let DataValidationModel = class DataValidationModel extends _univerjs_core.Dispo
266
258
  };
267
259
  DataValidationModel = __decorate([__decorateParam(0, _univerjs_core.ILogService)], DataValidationModel);
268
260
 
269
- //#endregion
270
- //#region src/commands/mutations/data-validation.mutation.ts
261
+ // src/commands/mutations/data-validation.mutation.ts
271
262
  const AddDataValidationMutation = {
272
263
  type: _univerjs_core.CommandType.MUTATION,
273
264
  id: "data-validation.mutation.addRule",
@@ -303,8 +294,7 @@ const UpdateDataValidationMutation = {
303
294
  }
304
295
  };
305
296
 
306
- //#endregion
307
- //#region src/controllers/dv-resource.controller.ts
297
+ // src/controllers/dv-resource.controller.ts
308
298
  const DATA_VALIDATION_PLUGIN_NAME = "SHEET_DATA_VALIDATION_PLUGIN";
309
299
  let DataValidationResourceController = class DataValidationResourceController extends _univerjs_core.Disposable {
310
300
  constructor(_resourceManagerService, _univerInstanceService, _dataValidationModel) {
@@ -358,13 +348,11 @@ DataValidationResourceController = __decorate([
358
348
  __decorateParam(2, (0, _univerjs_core.Inject)(DataValidationModel))
359
349
  ], DataValidationResourceController);
360
350
 
361
- //#endregion
362
- //#region package.json
351
+ // package.json
363
352
  var name = "@univerjs/data-validation";
364
- var version = "1.3.1";
353
+ var version = "1.5.0";
365
354
 
366
- //#endregion
367
- //#region src/config/config.ts
355
+ // src/config/config.ts
368
356
  /**
369
357
  * Copyright 2023-present DreamNum Co., Ltd.
370
358
  *
@@ -384,8 +372,7 @@ const DATA_VALIDATION_PLUGIN_CONFIG_KEY = "data-validation.config";
384
372
  const configSymbol = Symbol(DATA_VALIDATION_PLUGIN_CONFIG_KEY);
385
373
  const defaultPluginConfig = {};
386
374
 
387
- //#endregion
388
- //#region src/services/data-validator-registry.service.ts
375
+ // src/services/data-validator-registry.service.ts
389
376
  let DataValidatorRegistryScope = /* @__PURE__ */ function(DataValidatorRegistryScope) {
390
377
  DataValidatorRegistryScope["SHEET"] = "sheet";
391
378
  return DataValidatorRegistryScope;
@@ -436,8 +423,7 @@ var DataValidatorRegistryService = class {
436
423
  }
437
424
  };
438
425
 
439
- //#endregion
440
- //#region src/plugin.ts
426
+ // src/plugin.ts
441
427
  let UniverDataValidationPlugin = class UniverDataValidationPlugin extends _univerjs_core.Plugin {
442
428
  constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
443
429
  super();
@@ -476,8 +462,7 @@ UniverDataValidationPlugin = __decorate([
476
462
  __decorateParam(3, _univerjs_core.IConfigService)
477
463
  ], UniverDataValidationPlugin);
478
464
 
479
- //#endregion
480
- //#region src/types/const/two-formula-operators.ts
465
+ // src/types/const/two-formula-operators.ts
481
466
  /**
482
467
  * Copyright 2023-present DreamNum Co., Ltd.
483
468
  *
@@ -495,8 +480,7 @@ UniverDataValidationPlugin = __decorate([
495
480
  */
496
481
  const TWO_FORMULA_OPERATOR_COUNT = [_univerjs_core.DataValidationOperator.BETWEEN, _univerjs_core.DataValidationOperator.NOT_BETWEEN];
497
482
 
498
- //#endregion
499
- //#region src/types/const/operator-text-map.ts
483
+ // src/types/const/operator-text-map.ts
500
484
  /**
501
485
  * Copyright 2023-present DreamNum Co., Ltd.
502
486
  *
@@ -545,8 +529,7 @@ const OperatorErrorTitleMap = {
545
529
  NONE: "data-validation.errorMsg.legal"
546
530
  };
547
531
 
548
- //#endregion
549
- //#region src/validators/base-data-validator.ts
532
+ // src/validators/base-data-validator.ts
550
533
  const FORMULA1 = "{FORMULA1}";
551
534
  const FORMULA2 = "{FORMULA2}";
552
535
  const TYPE = "{TYPE}";
@@ -687,7 +670,6 @@ let BaseDataValidator = class BaseDataValidator {
687
670
  };
688
671
  BaseDataValidator = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_core.LocaleService)), __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_core.Injector))], BaseDataValidator);
689
672
 
690
- //#endregion
691
673
  exports.AddDataValidationMutation = AddDataValidationMutation;
692
674
  Object.defineProperty(exports, "BaseDataValidator", {
693
675
  enumerable: true,
@@ -1,4 +1,4 @@
1
- //#region src/locale/ar-SA.ts
1
+ // src/locale/ar-SA.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "بين",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ca-ES.ts
1
+ // src/locale/ca-ES.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "entre",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/de-DE.ts
1
+ // src/locale/de-DE.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "zwischen",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/en-US.ts
1
+ // src/locale/en-US.ts
2
2
  /**
3
3
  * Copyright 2023-present DreamNum Co., Ltd.
4
4
  *
@@ -49,5 +49,4 @@ const locale = { "data-validation": {
49
49
  }
50
50
  } };
51
51
 
52
- //#endregion
53
52
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/es-ES.ts
1
+ // src/locale/es-ES.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "entre",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/fa-IR.ts
1
+ // src/locale/fa-IR.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "بین",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/fr-FR.ts
1
+ // src/locale/fr-FR.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "entre",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/id-ID.ts
1
+ // src/locale/id-ID.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "antara",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/it-IT.ts
1
+ // src/locale/it-IT.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "tra",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ja-JP.ts
1
+ // src/locale/ja-JP.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "次の値の間",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ko-KR.ts
1
+ // src/locale/ko-KR.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "사이",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/pl-PL.ts
1
+ // src/locale/pl-PL.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "między",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/pt-BR.ts
1
+ // src/locale/pt-BR.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "entre",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ru-RU.ts
1
+ // src/locale/ru-RU.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "между",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/sk-SK.ts
1
+ // src/locale/sk-SK.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "medzi",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/vi-VN.ts
1
+ // src/locale/vi-VN.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "Giữa",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-CN.ts
1
+ // src/locale/zh-CN.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "介于",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-HK.ts
1
+ // src/locale/zh-HK.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "介於",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-TW.ts
1
+ // src/locale/zh-TW.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "介於",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  module.exports = locale;
package/lib/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CommandType, DataValidationOperator, Disposable, ICommandService, IConfigService, ILogService, IResourceManagerService, IUniverInstanceService, Inject, Injector, LocaleService, Plugin, Tools, UniverInstanceType, merge, toDisposable } from "@univerjs/core";
2
2
  import { BehaviorSubject, Subject, debounceTime } from "rxjs";
3
3
 
4
- //#region src/common/util.ts
4
+ // src/common/util.ts
5
5
  function getRuleSetting(rule) {
6
6
  return {
7
7
  type: rule.type,
@@ -27,8 +27,7 @@ function getRuleOptions(rule) {
27
27
  };
28
28
  }
29
29
 
30
- //#endregion
31
- //#region src/types/enum/update-rule-type.ts
30
+ // src/types/enum/update-rule-type.ts
32
31
  /**
33
32
  * Copyright 2023-present DreamNum Co., Ltd.
34
33
  *
@@ -52,8 +51,7 @@ let UpdateRuleType = /* @__PURE__ */ function(UpdateRuleType) {
52
51
  return UpdateRuleType;
53
52
  }({});
54
53
 
55
- //#endregion
56
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
54
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
57
55
  function _typeof(o) {
58
56
  "@babel/helpers - typeof";
59
57
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -63,28 +61,25 @@ function _typeof(o) {
63
61
  }, _typeof(o);
64
62
  }
65
63
 
66
- //#endregion
67
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
68
- function toPrimitive(t, r) {
64
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
65
+ function toPrimitive(t, e) {
69
66
  if ("object" != _typeof(t) || !t) return t;
70
- var e = t[Symbol.toPrimitive];
71
- if (void 0 !== e) {
72
- var i = e.call(t, r || "default");
67
+ var r;
68
+ if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
69
+ var i = r.call(t, e || "default");
73
70
  if ("object" != _typeof(i)) return i;
74
71
  throw new TypeError("@@toPrimitive must return a primitive value.");
75
72
  }
76
- return ("string" === r ? String : Number)(t);
73
+ return ("string" === e ? String : Number)(t);
77
74
  }
78
75
 
79
- //#endregion
80
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
76
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
81
77
  function toPropertyKey(t) {
82
78
  var i = toPrimitive(t, "string");
83
79
  return "symbol" == _typeof(i) ? i : i + "";
84
80
  }
85
81
 
86
- //#endregion
87
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
82
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
88
83
  function _defineProperty(e, r, t) {
89
84
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
90
85
  value: t,
@@ -94,16 +89,14 @@ function _defineProperty(e, r, t) {
94
89
  }) : e[r] = t, e;
95
90
  }
96
91
 
97
- //#endregion
98
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
92
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
99
93
  function __decorateParam(paramIndex, decorator) {
100
94
  return function(target, key) {
101
95
  decorator(target, key, paramIndex);
102
96
  };
103
97
  }
104
98
 
105
- //#endregion
106
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
99
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
107
100
  function __decorate(decorators, target, key, desc) {
108
101
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
109
102
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -111,8 +104,7 @@ function __decorate(decorators, target, key, desc) {
111
104
  return c > 3 && r && Object.defineProperty(target, key, r), r;
112
105
  }
113
106
 
114
- //#endregion
115
- //#region src/models/data-validation-model.ts
107
+ // src/models/data-validation-model.ts
116
108
  let DataValidationModel = class DataValidationModel extends Disposable {
117
109
  constructor(_logService) {
118
110
  super();
@@ -265,8 +257,7 @@ let DataValidationModel = class DataValidationModel extends Disposable {
265
257
  };
266
258
  DataValidationModel = __decorate([__decorateParam(0, ILogService)], DataValidationModel);
267
259
 
268
- //#endregion
269
- //#region src/commands/mutations/data-validation.mutation.ts
260
+ // src/commands/mutations/data-validation.mutation.ts
270
261
  const AddDataValidationMutation = {
271
262
  type: CommandType.MUTATION,
272
263
  id: "data-validation.mutation.addRule",
@@ -302,8 +293,7 @@ const UpdateDataValidationMutation = {
302
293
  }
303
294
  };
304
295
 
305
- //#endregion
306
- //#region src/controllers/dv-resource.controller.ts
296
+ // src/controllers/dv-resource.controller.ts
307
297
  const DATA_VALIDATION_PLUGIN_NAME = "SHEET_DATA_VALIDATION_PLUGIN";
308
298
  let DataValidationResourceController = class DataValidationResourceController extends Disposable {
309
299
  constructor(_resourceManagerService, _univerInstanceService, _dataValidationModel) {
@@ -357,13 +347,11 @@ DataValidationResourceController = __decorate([
357
347
  __decorateParam(2, Inject(DataValidationModel))
358
348
  ], DataValidationResourceController);
359
349
 
360
- //#endregion
361
- //#region package.json
350
+ // package.json
362
351
  var name = "@univerjs/data-validation";
363
- var version = "1.3.1";
352
+ var version = "1.5.0";
364
353
 
365
- //#endregion
366
- //#region src/config/config.ts
354
+ // src/config/config.ts
367
355
  /**
368
356
  * Copyright 2023-present DreamNum Co., Ltd.
369
357
  *
@@ -383,8 +371,7 @@ const DATA_VALIDATION_PLUGIN_CONFIG_KEY = "data-validation.config";
383
371
  const configSymbol = Symbol(DATA_VALIDATION_PLUGIN_CONFIG_KEY);
384
372
  const defaultPluginConfig = {};
385
373
 
386
- //#endregion
387
- //#region src/services/data-validator-registry.service.ts
374
+ // src/services/data-validator-registry.service.ts
388
375
  let DataValidatorRegistryScope = /* @__PURE__ */ function(DataValidatorRegistryScope) {
389
376
  DataValidatorRegistryScope["SHEET"] = "sheet";
390
377
  return DataValidatorRegistryScope;
@@ -435,8 +422,7 @@ var DataValidatorRegistryService = class {
435
422
  }
436
423
  };
437
424
 
438
- //#endregion
439
- //#region src/plugin.ts
425
+ // src/plugin.ts
440
426
  let UniverDataValidationPlugin = class UniverDataValidationPlugin extends Plugin {
441
427
  constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
442
428
  super();
@@ -475,8 +461,7 @@ UniverDataValidationPlugin = __decorate([
475
461
  __decorateParam(3, IConfigService)
476
462
  ], UniverDataValidationPlugin);
477
463
 
478
- //#endregion
479
- //#region src/types/const/two-formula-operators.ts
464
+ // src/types/const/two-formula-operators.ts
480
465
  /**
481
466
  * Copyright 2023-present DreamNum Co., Ltd.
482
467
  *
@@ -494,8 +479,7 @@ UniverDataValidationPlugin = __decorate([
494
479
  */
495
480
  const TWO_FORMULA_OPERATOR_COUNT = [DataValidationOperator.BETWEEN, DataValidationOperator.NOT_BETWEEN];
496
481
 
497
- //#endregion
498
- //#region src/types/const/operator-text-map.ts
482
+ // src/types/const/operator-text-map.ts
499
483
  /**
500
484
  * Copyright 2023-present DreamNum Co., Ltd.
501
485
  *
@@ -544,8 +528,7 @@ const OperatorErrorTitleMap = {
544
528
  NONE: "data-validation.errorMsg.legal"
545
529
  };
546
530
 
547
- //#endregion
548
- //#region src/validators/base-data-validator.ts
531
+ // src/validators/base-data-validator.ts
549
532
  const FORMULA1 = "{FORMULA1}";
550
533
  const FORMULA2 = "{FORMULA2}";
551
534
  const TYPE = "{TYPE}";
@@ -686,5 +669,4 @@ let BaseDataValidator = class BaseDataValidator {
686
669
  };
687
670
  BaseDataValidator = __decorate([__decorateParam(0, Inject(LocaleService)), __decorateParam(1, Inject(Injector))], BaseDataValidator);
688
671
 
689
- //#endregion
690
672
  export { AddDataValidationMutation, BaseDataValidator, DataValidationModel, DataValidationResourceController, DataValidatorDropdownType, DataValidatorRegistryScope, DataValidatorRegistryService, FORMULA1, FORMULA2, RemoveDataValidationMutation, TWO_FORMULA_OPERATOR_COUNT, TYPE, UniverDataValidationPlugin, UpdateDataValidationMutation, UpdateRuleType, getRuleOptions, getRuleSetting };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ar-SA.ts
1
+ // src/locale/ar-SA.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "بين",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ca-ES.ts
1
+ // src/locale/ca-ES.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "entre",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/de-DE.ts
1
+ // src/locale/de-DE.ts
2
2
  const locale = { "data-validation": {
3
3
  operators: {
4
4
  between: "zwischen",
@@ -34,5 +34,4 @@ const locale = { "data-validation": {
34
34
  }
35
35
  } };
36
36
 
37
- //#endregion
38
37
  export { locale as default };