@univerjs/sheets-data-validation 1.3.0 → 1.4.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 (68) hide show
  1. package/lib/cjs/facade.js +11 -22
  2. package/lib/cjs/index.js +44 -87
  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/facade.js +11 -22
  23. package/lib/es/index.js +44 -87
  24. package/lib/es/locale/ar-SA.js +1 -2
  25. package/lib/es/locale/ca-ES.js +1 -2
  26. package/lib/es/locale/de-DE.js +1 -2
  27. package/lib/es/locale/en-US.js +1 -2
  28. package/lib/es/locale/es-ES.js +1 -2
  29. package/lib/es/locale/fa-IR.js +1 -2
  30. package/lib/es/locale/fr-FR.js +1 -2
  31. package/lib/es/locale/id-ID.js +1 -2
  32. package/lib/es/locale/it-IT.js +1 -2
  33. package/lib/es/locale/ja-JP.js +1 -2
  34. package/lib/es/locale/ko-KR.js +1 -2
  35. package/lib/es/locale/pl-PL.js +1 -2
  36. package/lib/es/locale/pt-BR.js +1 -2
  37. package/lib/es/locale/ru-RU.js +1 -2
  38. package/lib/es/locale/sk-SK.js +1 -2
  39. package/lib/es/locale/vi-VN.js +1 -2
  40. package/lib/es/locale/zh-CN.js +1 -2
  41. package/lib/es/locale/zh-HK.js +1 -2
  42. package/lib/es/locale/zh-TW.js +1 -2
  43. package/lib/facade.js +11 -22
  44. package/lib/index.js +44 -87
  45. package/lib/locale/ar-SA.js +1 -2
  46. package/lib/locale/ca-ES.js +1 -2
  47. package/lib/locale/de-DE.js +1 -2
  48. package/lib/locale/en-US.js +1 -2
  49. package/lib/locale/es-ES.js +1 -2
  50. package/lib/locale/fa-IR.js +1 -2
  51. package/lib/locale/fr-FR.js +1 -2
  52. package/lib/locale/id-ID.js +1 -2
  53. package/lib/locale/it-IT.js +1 -2
  54. package/lib/locale/ja-JP.js +1 -2
  55. package/lib/locale/ko-KR.js +1 -2
  56. package/lib/locale/pl-PL.js +1 -2
  57. package/lib/locale/pt-BR.js +1 -2
  58. package/lib/locale/ru-RU.js +1 -2
  59. package/lib/locale/sk-SK.js +1 -2
  60. package/lib/locale/vi-VN.js +1 -2
  61. package/lib/locale/zh-CN.js +1 -2
  62. package/lib/locale/zh-HK.js +1 -2
  63. package/lib/locale/zh-TW.js +1 -2
  64. package/lib/types/validators/decimal-validator.d.ts +1 -1
  65. package/lib/types/validators/text-length-validator.d.ts +1 -1
  66. package/lib/types/validators/whole-validator.d.ts +1 -1
  67. package/lib/umd/index.js +1 -1
  68. package/package.json +12 -12
@@ -1,4 +1,4 @@
1
- //#region src/locale/pt-BR.ts
1
+ // src/locale/pt-BR.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "entre",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ru-RU.ts
1
+ // src/locale/ru-RU.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "между",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/sk-SK.ts
1
+ // src/locale/sk-SK.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "medzi",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/vi-VN.ts
1
+ // src/locale/vi-VN.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "Giữa",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-CN.ts
1
+ // src/locale/zh-CN.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "介于",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-HK.ts
1
+ // src/locale/zh-HK.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "介於",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-TW.ts
1
+ // src/locale/zh-TW.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "介於",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  module.exports = locale;
package/lib/es/facade.js CHANGED
@@ -6,7 +6,7 @@ import { serializeRangeToRefString } from "@univerjs/engine-formula";
6
6
  import { serializeListOptions } from "@univerjs/sheets";
7
7
  import { FEventName, FUniver } from "@univerjs/core/facade";
8
8
 
9
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
9
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
10
10
  function _typeof(o) {
11
11
  "@babel/helpers - typeof";
12
12
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -16,8 +16,7 @@ function _typeof(o) {
16
16
  }, _typeof(o);
17
17
  }
18
18
 
19
- //#endregion
20
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
19
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
21
20
  function toPrimitive(t, r) {
22
21
  if ("object" != _typeof(t) || !t) return t;
23
22
  var e = t[Symbol.toPrimitive];
@@ -29,15 +28,13 @@ function toPrimitive(t, r) {
29
28
  return ("string" === r ? String : Number)(t);
30
29
  }
31
30
 
32
- //#endregion
33
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
31
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
34
32
  function toPropertyKey(t) {
35
33
  var i = toPrimitive(t, "string");
36
34
  return "symbol" == _typeof(i) ? i : i + "";
37
35
  }
38
36
 
39
- //#endregion
40
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
37
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
41
38
  function _defineProperty(e, r, t) {
42
39
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
43
40
  value: t,
@@ -47,8 +44,7 @@ function _defineProperty(e, r, t) {
47
44
  }) : e[r] = t, e;
48
45
  }
49
46
 
50
- //#endregion
51
- //#region src/facade/f-data-validation-builder.ts
47
+ // src/facade/f-data-validation-builder.ts
52
48
  /**
53
49
  * Builder for data validation rules. use {@link FUniver} `univerAPI.newDataValidation()` to create a new builder.
54
50
  * @example
@@ -953,8 +949,7 @@ var FDataValidationBuilder = class FDataValidationBuilder {
953
949
  }
954
950
  };
955
951
 
956
- //#endregion
957
- //#region src/facade/f-data-validation.ts
952
+ // src/facade/f-data-validation.ts
958
953
  /**
959
954
  * @hideconstructor
960
955
  */
@@ -1318,8 +1313,7 @@ var FDataValidation = class {
1318
1313
  }
1319
1314
  };
1320
1315
 
1321
- //#endregion
1322
- //#region src/facade/f-range.ts
1316
+ // src/facade/f-range.ts
1323
1317
  /**
1324
1318
  * @ignore
1325
1319
  */
@@ -1400,8 +1394,7 @@ var FRangeSheetsDataValidationMixin = class extends FRange {
1400
1394
  };
1401
1395
  FRange.extend(FRangeSheetsDataValidationMixin);
1402
1396
 
1403
- //#endregion
1404
- //#region src/facade/f-univer.ts
1397
+ // src/facade/f-univer.ts
1405
1398
  var FUniverSheetsDataValidationMixin = class extends FUniver {
1406
1399
  newDataValidation() {
1407
1400
  return new FDataValidationBuilder();
@@ -1569,8 +1562,7 @@ var FUniverSheetsDataValidationMixin = class extends FUniver {
1569
1562
  };
1570
1563
  FUniver.extend(FUniverSheetsDataValidationMixin);
1571
1564
 
1572
- //#endregion
1573
- //#region src/facade/f-workbook.ts
1565
+ // src/facade/f-workbook.ts
1574
1566
  /**
1575
1567
  * @ignore
1576
1568
  */
@@ -1640,8 +1632,7 @@ var FWorkbookSheetsDataValidationMixin = class extends FWorkbook {
1640
1632
  };
1641
1633
  FWorkbook.extend(FWorkbookSheetsDataValidationMixin);
1642
1634
 
1643
- //#endregion
1644
- //#region src/facade/f-worksheet.ts
1635
+ // src/facade/f-worksheet.ts
1645
1636
  /**
1646
1637
  * @ignore
1647
1638
  */
@@ -1708,8 +1699,7 @@ var FWorksheetDataValidationMixin = class extends FWorksheet {
1708
1699
  };
1709
1700
  FWorksheet.extend(FWorksheetDataValidationMixin);
1710
1701
 
1711
- //#endregion
1712
- //#region src/facade/f-event.ts
1702
+ // src/facade/f-event.ts
1713
1703
  /**
1714
1704
  * @ignore
1715
1705
  */
@@ -1741,5 +1731,4 @@ var FSheetsDataValidationEventNameMixin = class extends FEventName {
1741
1731
  };
1742
1732
  FEventName.extend(FSheetsDataValidationEventNameMixin);
1743
1733
 
1744
- //#endregion
1745
1734
  export { FDataValidation, FDataValidationBuilder };
package/lib/es/index.js CHANGED
@@ -6,7 +6,7 @@ import { Subject, bufferWhen, filter, skip } from "rxjs";
6
6
  import { UnitAction } from "@univerjs/protocol";
7
7
  import { FormulaRefRangeService, UniverSheetsFormulaPlugin } from "@univerjs/sheets-formula";
8
8
 
9
- //#region src/utils/range.ts
9
+ // src/utils/range.ts
10
10
  function getRangeInWorksheet(range, worksheet) {
11
11
  const maxRows = worksheet.getMaxRows();
12
12
  const maxColumns = worksheet.getMaxColumns();
@@ -34,8 +34,7 @@ function getRangesInWorksheet(ranges, worksheet) {
34
34
  return effectiveRanges;
35
35
  }
36
36
 
37
- //#endregion
38
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
37
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
39
38
  function _typeof(o) {
40
39
  "@babel/helpers - typeof";
41
40
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -45,8 +44,7 @@ function _typeof(o) {
45
44
  }, _typeof(o);
46
45
  }
47
46
 
48
- //#endregion
49
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
47
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
50
48
  function toPrimitive(t, r) {
51
49
  if ("object" != _typeof(t) || !t) return t;
52
50
  var e = t[Symbol.toPrimitive];
@@ -58,15 +56,13 @@ function toPrimitive(t, r) {
58
56
  return ("string" === r ? String : Number)(t);
59
57
  }
60
58
 
61
- //#endregion
62
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
59
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
63
60
  function toPropertyKey(t) {
64
61
  var i = toPrimitive(t, "string");
65
62
  return "symbol" == _typeof(i) ? i : i + "";
66
63
  }
67
64
 
68
- //#endregion
69
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
65
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
70
66
  function _defineProperty(e, r, t) {
71
67
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
72
68
  value: t,
@@ -76,16 +72,14 @@ function _defineProperty(e, r, t) {
76
72
  }) : e[r] = t, e;
77
73
  }
78
74
 
79
- //#endregion
80
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
75
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/decorateParam.js
81
76
  function __decorateParam(paramIndex, decorator) {
82
77
  return function(target, key) {
83
78
  decorator(target, key, paramIndex);
84
79
  };
85
80
  }
86
81
 
87
- //#endregion
88
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
82
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/decorate.js
89
83
  function __decorate(decorators, target, key, desc) {
90
84
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
91
85
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -93,8 +87,7 @@ function __decorate(decorators, target, key, desc) {
93
87
  return c > 3 && r && Object.defineProperty(target, key, r), r;
94
88
  }
95
89
 
96
- //#endregion
97
- //#region src/services/dv-cache.service.ts
90
+ // src/services/dv-cache.service.ts
98
91
  let DataValidationCacheService = class DataValidationCacheService extends Disposable {
99
92
  constructor(_commandService, _univerInstanceService, _sheetDataValidationModel) {
100
93
  super();
@@ -204,8 +197,7 @@ DataValidationCacheService = __decorate([
204
197
  __decorateParam(2, Inject(DataValidationModel))
205
198
  ], DataValidationCacheService);
206
199
 
207
- //#endregion
208
- //#region src/utils/formula.ts
200
+ // src/utils/formula.ts
209
201
  function getFormulaResult(result) {
210
202
  var _result$;
211
203
  return result === null || result === void 0 || (_result$ = result[0]) === null || _result$ === void 0 || (_result$ = _result$[0]) === null || _result$ === void 0 ? void 0 : _result$.v;
@@ -225,8 +217,7 @@ function shouldOffsetFormulaByRange(type, validatorRegistryService) {
225
217
  return (validator === null || validator === void 0 ? void 0 : validator.offsetFormulaByRange) ?? false;
226
218
  }
227
219
 
228
- //#endregion
229
- //#region src/services/dv-custom-formula.service.ts
220
+ // src/services/dv-custom-formula.service.ts
230
221
  let DataValidationCustomFormulaService = class DataValidationCustomFormulaService extends Disposable {
231
222
  constructor(_instanceSrv, _registerOtherFormulaService, _dataValidationModel, _dataValidationCacheService, _validatorRegistryService) {
232
223
  super();
@@ -417,8 +408,7 @@ DataValidationCustomFormulaService = __decorate([
417
408
  __decorateParam(4, Inject(DataValidatorRegistryService))
418
409
  ], DataValidationCustomFormulaService);
419
410
 
420
- //#endregion
421
- //#region src/utils/get-cell-data-origin.ts
411
+ // src/utils/get-cell-data-origin.ts
422
412
  function getCellValueOrigin(cell) {
423
413
  return getOriginCellValue(cell);
424
414
  }
@@ -426,8 +416,7 @@ function getStringCellValue(cell) {
426
416
  return String(getCellValueOrigin(cell) ?? "");
427
417
  }
428
418
 
429
- //#endregion
430
- //#region src/services/dv-list-cache.service.ts
419
+ // src/services/dv-list-cache.service.ts
431
420
  let DataValidationListCacheService = class DataValidationListCacheService extends Disposable {
432
421
  constructor(_injector, _dataValidationModel) {
433
422
  super();
@@ -541,8 +530,7 @@ let DataValidationListCacheService = class DataValidationListCacheService extend
541
530
  };
542
531
  DataValidationListCacheService = __decorate([__decorateParam(0, Inject(Injector)), __decorateParam(1, Inject(DataValidationModel))], DataValidationListCacheService);
543
532
 
544
- //#endregion
545
- //#region src/services/dv-formula.service.ts
533
+ // src/services/dv-formula.service.ts
546
534
  let DataValidationFormulaService = class DataValidationFormulaService extends Disposable {
547
535
  constructor(_instanceService, _registerOtherFormulaService, _dataValidationCacheService, _dataValidationModel, _validatorRegistryService, _listCacheService) {
548
536
  super();
@@ -651,8 +639,7 @@ DataValidationFormulaService = __decorate([
651
639
  __decorateParam(5, Inject(DataValidationListCacheService))
652
640
  ], DataValidationFormulaService);
653
641
 
654
- //#endregion
655
- //#region src/models/rule-matrix.ts
642
+ // src/models/rule-matrix.ts
656
643
  var RuleMatrix = class RuleMatrix {
657
644
  constructor(value, _unitId, _subUnitId, _univerInstanceService, _disableTree = false) {
658
645
  this._unitId = _unitId;
@@ -821,8 +808,7 @@ var RuleMatrix = class RuleMatrix {
821
808
  }
822
809
  };
823
810
 
824
- //#endregion
825
- //#region src/models/sheet-data-validation-model.ts
811
+ // src/models/sheet-data-validation-model.ts
826
812
  let SheetDataValidationModel = class SheetDataValidationModel extends Disposable {
827
813
  constructor(_dataValidationModel, _univerInstanceService, _dataValidatorRegistryService, _dataValidationCacheService, _dataValidationFormulaService, _dataValidationCustomFormulaService, _commandService) {
828
814
  super();
@@ -1020,8 +1006,7 @@ SheetDataValidationModel = __decorate([
1020
1006
  __decorateParam(6, ICommandService)
1021
1007
  ], SheetDataValidationModel);
1022
1008
 
1023
- //#endregion
1024
- //#region src/types/const/operator-text-map.ts
1009
+ // src/types/const/operator-text-map.ts
1025
1010
  /**
1026
1011
  * Copyright 2023-present DreamNum Co., Ltd.
1027
1012
  *
@@ -1080,8 +1065,7 @@ const TextLengthErrorTitleMap = {
1080
1065
  [DataValidationOperator.NOT_EQUAL]: "sheets-data-validation.textLength.errorMsg.notEqual"
1081
1066
  };
1082
1067
 
1083
- //#endregion
1084
- //#region src/validators/base-sheet-validator.ts
1068
+ // src/validators/base-sheet-validator.ts
1085
1069
  const FORMULA1$1 = "{FORMULA1}";
1086
1070
  const FORMULA2$1 = "{FORMULA2}";
1087
1071
  const TYPE = "{TYPE}";
@@ -1100,8 +1084,7 @@ var BaseSheetValidator = class extends BaseDataValidator {
1100
1084
  }
1101
1085
  };
1102
1086
 
1103
- //#endregion
1104
- //#region src/validators/checkbox-validator.ts
1087
+ // src/validators/checkbox-validator.ts
1105
1088
  const CHECKBOX_FORMULA_1 = 1;
1106
1089
  const CHECKBOX_FORMULA_2 = 0;
1107
1090
  function getFailMessage(formula, localeService) {
@@ -1191,8 +1174,7 @@ var CheckboxValidator = class extends BaseSheetValidator {
1191
1174
  }
1192
1175
  };
1193
1176
 
1194
- //#endregion
1195
- //#region src/common/date-text-map.ts
1177
+ // src/common/date-text-map.ts
1196
1178
  /**
1197
1179
  * Copyright 2023-present DreamNum Co., Ltd.
1198
1180
  *
@@ -1251,8 +1233,7 @@ const DateOperatorErrorTitleMap = {
1251
1233
  NONE: "sheets-data-validation.date.errorMsg.legal"
1252
1234
  };
1253
1235
 
1254
- //#endregion
1255
- //#region src/types/const/two-formula-operators.ts
1236
+ // src/types/const/two-formula-operators.ts
1256
1237
  /**
1257
1238
  * Copyright 2023-present DreamNum Co., Ltd.
1258
1239
  *
@@ -1270,8 +1251,7 @@ const DateOperatorErrorTitleMap = {
1270
1251
  */
1271
1252
  const TWO_FORMULA_OPERATOR_COUNT = [DataValidationOperator.BETWEEN, DataValidationOperator.NOT_BETWEEN];
1272
1253
 
1273
- //#endregion
1274
- //#region src/validators/const.ts
1254
+ // src/validators/const.ts
1275
1255
  /**
1276
1256
  * Copyright 2023-present DreamNum Co., Ltd.
1277
1257
  *
@@ -1290,8 +1270,7 @@ const TWO_FORMULA_OPERATOR_COUNT = [DataValidationOperator.BETWEEN, DataValidati
1290
1270
  const FORMULA1 = "{FORMULA1}";
1291
1271
  const FORMULA2 = "{FORMULA2}";
1292
1272
 
1293
- //#endregion
1294
- //#region src/validators/util.ts
1273
+ // src/validators/util.ts
1295
1274
  function getDataValidationCellValue(cellData) {
1296
1275
  const cellValue = getCellValueOrigin(cellData);
1297
1276
  if (cellValue === void 0 || cellValue === null) return "";
@@ -1309,8 +1288,7 @@ function getTransformedFormula(lexerTreeBuilder, rule, position) {
1309
1288
  };
1310
1289
  }
1311
1290
 
1312
- //#endregion
1313
- //#region src/validators/date-validator.ts
1291
+ // src/validators/date-validator.ts
1314
1292
  const transformDate2SerialNumber = (value, options = {}) => {
1315
1293
  var _numfmt$parseDate;
1316
1294
  if (value === void 0 || value === null || typeof value === "boolean") return;
@@ -1428,8 +1406,7 @@ var DateValidator = class extends BaseSheetValidator {
1428
1406
  }
1429
1407
  };
1430
1408
 
1431
- //#endregion
1432
- //#region src/validators/decimal-validator.ts
1409
+ // src/validators/decimal-validator.ts
1433
1410
  function getCellValueNumber(cellValue) {
1434
1411
  return +cellValue;
1435
1412
  }
@@ -1506,8 +1483,7 @@ var DecimalValidator = class extends BaseSheetValidator {
1506
1483
  }
1507
1484
  };
1508
1485
 
1509
- //#endregion
1510
- //#region src/validators/list-validator.ts
1486
+ // src/validators/list-validator.ts
1511
1487
  function getRuleFormulaResultSet(result) {
1512
1488
  if (!result) return [];
1513
1489
  const resultSet = /* @__PURE__ */ new Set();
@@ -1653,8 +1629,7 @@ var ListValidator = class extends BaseSheetValidator {
1653
1629
  }
1654
1630
  };
1655
1631
 
1656
- //#endregion
1657
- //#region src/validators/text-length-validator.ts
1632
+ // src/validators/text-length-validator.ts
1658
1633
  var TextLengthValidator = class extends BaseSheetValidator {
1659
1634
  constructor(..._args) {
1660
1635
  super(..._args);
@@ -1727,8 +1702,7 @@ var TextLengthValidator = class extends BaseSheetValidator {
1727
1702
  }
1728
1703
  };
1729
1704
 
1730
- //#endregion
1731
- //#region src/commands/commands/data-validation.command.ts
1705
+ // src/commands/commands/data-validation.command.ts
1732
1706
  function isBlankCell(cellData) {
1733
1707
  var _cellData$p$body;
1734
1708
  if (!cellData) return true;
@@ -2284,8 +2258,7 @@ const RemoveSheetDataValidationCommand = {
2284
2258
  }
2285
2259
  };
2286
2260
 
2287
- //#endregion
2288
- //#region src/common/const.ts
2261
+ // src/common/const.ts
2289
2262
  /**
2290
2263
  * Copyright 2023-present DreamNum Co., Ltd.
2291
2264
  *
@@ -2303,8 +2276,7 @@ const RemoveSheetDataValidationCommand = {
2303
2276
  */
2304
2277
  const DATA_VALIDATION_PLUGIN_NAME = "SHEET_DATA_VALIDATION_PLUGIN";
2305
2278
 
2306
- //#endregion
2307
- //#region src/controllers/dv-formula.controller.ts
2279
+ // src/controllers/dv-formula.controller.ts
2308
2280
  let DataValidationFormulaController = class DataValidationFormulaController extends Disposable {
2309
2281
  constructor(_univerInstanceService, _permissionService, _lexerTreeBuilder) {
2310
2282
  super();
@@ -2348,13 +2320,11 @@ DataValidationFormulaController = __decorate([
2348
2320
  __decorateParam(2, Inject(LexerTreeBuilder))
2349
2321
  ], DataValidationFormulaController);
2350
2322
 
2351
- //#endregion
2352
- //#region package.json
2323
+ // package.json
2353
2324
  var name = "@univerjs/sheets-data-validation";
2354
- var version = "1.3.0";
2325
+ var version = "1.4.0";
2355
2326
 
2356
- //#endregion
2357
- //#region src/config/config.ts
2327
+ // src/config/config.ts
2358
2328
  /**
2359
2329
  * Copyright 2023-present DreamNum Co., Ltd.
2360
2330
  *
@@ -2374,8 +2344,7 @@ const SHEETS_DATA_VALIDATION_PLUGIN_CONFIG_KEY = "sheets-data-validation.config"
2374
2344
  const configSymbol = Symbol(SHEETS_DATA_VALIDATION_PLUGIN_CONFIG_KEY);
2375
2345
  const defaultPluginConfig = {};
2376
2346
 
2377
- //#endregion
2378
- //#region src/controllers/dv-formula-ref-range.controller.ts
2347
+ // src/controllers/dv-formula-ref-range.controller.ts
2379
2348
  let DataValidationFormulaRefRangeController = class DataValidationFormulaRefRangeController extends Disposable {
2380
2349
  constructor(_dataValidationModel, _formulaRefRangeService, _validatorRegistryService) {
2381
2350
  super();
@@ -2529,8 +2498,7 @@ DataValidationFormulaRefRangeController = __decorate([
2529
2498
  __decorateParam(2, Inject(DataValidatorRegistryService))
2530
2499
  ], DataValidationFormulaRefRangeController);
2531
2500
 
2532
- //#endregion
2533
- //#region src/controllers/dv-ref-range.controller.ts
2501
+ // src/controllers/dv-ref-range.controller.ts
2534
2502
  let DataValidationRefRangeController = class DataValidationRefRangeController extends Disposable {
2535
2503
  constructor(_dataValidationModel, _injector, _refRangeService, _dataValidationFormulaService, _formulaRefRangeService, _validatorRegistryService) {
2536
2504
  super();
@@ -2726,8 +2694,7 @@ DataValidationRefRangeController = __decorate([
2726
2694
  __decorateParam(5, Inject(DataValidatorRegistryService))
2727
2695
  ], DataValidationRefRangeController);
2728
2696
 
2729
- //#endregion
2730
- //#region src/controllers/dv-sheet.controller.ts
2697
+ // src/controllers/dv-sheet.controller.ts
2731
2698
  let SheetDataValidationSheetController = class SheetDataValidationSheetController extends Disposable {
2732
2699
  constructor(_sheetInterceptorService, _univerInstanceService, _sheetDataValidationModel) {
2733
2700
  super();
@@ -2830,8 +2797,7 @@ SheetDataValidationSheetController = __decorate([
2830
2797
  __decorateParam(2, Inject(SheetDataValidationModel))
2831
2798
  ], SheetDataValidationSheetController);
2832
2799
 
2833
- //#endregion
2834
- //#region src/validators/any-validator.ts
2800
+ // src/validators/any-validator.ts
2835
2801
  var AnyValidator = class extends BaseSheetValidator {
2836
2802
  constructor(..._args) {
2837
2803
  super(..._args);
@@ -2860,8 +2826,7 @@ var AnyValidator = class extends BaseSheetValidator {
2860
2826
  }
2861
2827
  };
2862
2828
 
2863
- //#endregion
2864
- //#region src/validators/custom-validator.ts
2829
+ // src/validators/custom-validator.ts
2865
2830
  var CustomFormulaValidator = class extends BaseSheetValidator {
2866
2831
  constructor(..._args) {
2867
2832
  super(..._args);
@@ -2911,8 +2876,7 @@ var CustomFormulaValidator = class extends BaseSheetValidator {
2911
2876
  }
2912
2877
  };
2913
2878
 
2914
- //#endregion
2915
- //#region src/validators/list-multiple-validator.ts
2879
+ // src/validators/list-multiple-validator.ts
2916
2880
  /**
2917
2881
  * Copyright 2023-present DreamNum Co., Ltd.
2918
2882
  *
@@ -2940,8 +2904,7 @@ var ListMultipleValidator = class extends ListValidator {
2940
2904
  }
2941
2905
  };
2942
2906
 
2943
- //#endregion
2944
- //#region src/validators/whole-validator.ts
2907
+ // src/validators/whole-validator.ts
2945
2908
  var WholeValidator = class extends BaseSheetValidator {
2946
2909
  constructor(..._args) {
2947
2910
  super(..._args);
@@ -3018,8 +2981,7 @@ var WholeValidator = class extends BaseSheetValidator {
3018
2981
  }
3019
2982
  };
3020
2983
 
3021
- //#endregion
3022
- //#region src/controllers/dv.controller.ts
2984
+ // src/controllers/dv.controller.ts
3023
2985
  let DataValidationController = class DataValidationController extends RxDisposable {
3024
2986
  constructor(_univerInstanceService, _dataValidatorRegistryService, _injector, _selectionManagerService, _sheetInterceptorService, _sheetDataValidationModel) {
3025
2987
  super();
@@ -3087,8 +3049,7 @@ DataValidationController = __decorate([
3087
3049
  __decorateParam(5, Inject(SheetDataValidationModel))
3088
3050
  ], DataValidationController);
3089
3051
 
3090
- //#endregion
3091
- //#region src/services/dv-validator.service.ts
3052
+ // src/services/dv-validator.service.ts
3092
3053
  let SheetsDataValidationValidatorService = class SheetsDataValidationValidatorService extends Disposable {
3093
3054
  constructor(_univerInstanceService, _sheetDataValidationModel, _dataValidationCacheService, _lifecycleService) {
3094
3055
  super();
@@ -3253,8 +3214,7 @@ SheetsDataValidationValidatorService = __decorate([
3253
3214
  __decorateParam(3, Inject(LifecycleService))
3254
3215
  ], SheetsDataValidationValidatorService);
3255
3216
 
3256
- //#endregion
3257
- //#region src/plugin.ts
3217
+ // src/plugin.ts
3258
3218
  let UniverSheetsDataValidationPlugin = class UniverSheetsDataValidationPlugin extends Plugin {
3259
3219
  constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
3260
3220
  super();
@@ -3316,8 +3276,7 @@ UniverSheetsDataValidationPlugin = __decorate([
3316
3276
  __decorateParam(3, IConfigService)
3317
3277
  ], UniverSheetsDataValidationPlugin);
3318
3278
 
3319
- //#endregion
3320
- //#region src/utils/create.ts
3279
+ // src/utils/create.ts
3321
3280
  function createDefaultNewRule(accessor) {
3322
3281
  const currentRanges = accessor.get(SheetsSelectionsService).getCurrentSelections().map((s) => s.range);
3323
3282
  return {
@@ -3334,12 +3293,10 @@ function createDefaultNewRule(accessor) {
3334
3293
  };
3335
3294
  }
3336
3295
 
3337
- //#endregion
3338
- //#region src/index.ts
3296
+ // src/index.ts
3339
3297
  const CUSTOM_FORMULA_INPUT_NAME = "sheets-data-validation.custom-formula-input";
3340
3298
  const BASE_FORMULA_INPUT_NAME = "sheets-data-validation.formula-input";
3341
3299
  const LIST_FORMULA_INPUT_NAME = "sheets-data-validation.list-formula-input";
3342
3300
  const CHECKBOX_FORMULA_INPUT_NAME = "sheets-data-validation.checkbox-formula-input";
3343
3301
 
3344
- //#endregion
3345
3302
  export { AddSheetDataValidationCommand, BASE_FORMULA_INPUT_NAME, CHECKBOX_FORMULA_1, CHECKBOX_FORMULA_2, CHECKBOX_FORMULA_INPUT_NAME, CUSTOM_FORMULA_INPUT_NAME, CheckboxValidator, ClearRangeDataValidationCommand, DATA_VALIDATION_PLUGIN_NAME, DataValidationCacheService, DataValidationCustomFormulaService, DataValidationFormulaController, DataValidationFormulaService, DataValidationListCacheService, DateValidator, LIST_FORMULA_INPUT_NAME, ListMultipleValidator, ListValidator, RemoveSheetAllDataValidationCommand, RemoveSheetDataValidationCommand, SheetDataValidationModel, SheetsDataValidationValidatorService, UniverSheetsDataValidationPlugin, UpdateSheetDataValidationOptionsCommand, UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand, createDefaultNewRule, getCellValueNumber, getCellValueOrigin, getDataValidationCellValue, getDataValidationDiffMutations, getFormulaCellData, getFormulaResult, getRangesInWorksheet, getTransformedFormula, isLegalFormulaResult, transformCheckboxValue };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ar-SA.ts
1
+ // src/locale/ar-SA.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "بين",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  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 = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "entre",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  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 = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "zwischen",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  export { locale as default };
@@ -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
  *
@@ -129,5 +129,4 @@ const locale = { "sheets-data-validation": {
129
129
  }
130
130
  } };
131
131
 
132
- //#endregion
133
132
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/es-ES.ts
1
+ // src/locale/es-ES.ts
2
2
  const locale = { "sheets-data-validation": {
3
3
  operators: {
4
4
  between: "entre",
@@ -114,5 +114,4 @@ const locale = { "sheets-data-validation": {
114
114
  }
115
115
  } };
116
116
 
117
- //#endregion
118
117
  export { locale as default };