dtable-ui-component 0.1.50 → 0.1.58

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 (39) hide show
  1. package/es/components/cell-editor/date-editor.js +2 -2
  2. package/es/components/cell-editor/index.js +1 -1
  3. package/es/components/cell-editor/link-editor.js +4 -4
  4. package/es/components/cell-editor/number-editor.js +13 -13
  5. package/es/components/cell-formatter/date-formatter.js +2 -2
  6. package/es/components/cell-formatter/formatter-config.js +1 -1
  7. package/es/components/cell-formatter/formula-formatter.js +62 -104
  8. package/es/components/cell-formatter/link-formatter.js +4 -4
  9. package/es/components/cell-formatter/multiple-select-formatter.js +9 -10
  10. package/es/components/cell-formatter/number-formatter.js +2 -2
  11. package/es/{utils → constants}/cell-types.js +0 -0
  12. package/es/{utils/constants.js → constants/index.js} +7 -0
  13. package/es/index.js +2 -2
  14. package/es/utils/cell-value-validator.js +32 -0
  15. package/es/utils/column-utils.js +7 -0
  16. package/es/utils/value-format-utils.js +196 -16
  17. package/lib/components/cell-editor/date-editor.js +1 -1
  18. package/lib/components/cell-editor/index.js +2 -2
  19. package/lib/components/cell-editor/link-editor.js +3 -3
  20. package/lib/components/cell-editor/number-editor.js +11 -11
  21. package/lib/components/cell-formatter/date-formatter.js +1 -1
  22. package/lib/components/cell-formatter/formatter-config.js +1 -1
  23. package/lib/components/cell-formatter/formula-formatter.js +67 -110
  24. package/lib/components/cell-formatter/index.js +1 -1
  25. package/lib/components/cell-formatter/link-formatter.js +3 -3
  26. package/lib/components/cell-formatter/multiple-select-formatter.js +9 -10
  27. package/lib/components/cell-formatter/number-formatter.js +1 -1
  28. package/lib/{utils → constants}/cell-types.js +1 -1
  29. package/lib/constants/index.js +70 -0
  30. package/lib/index.js +4 -4
  31. package/lib/lang/index.js +1 -1
  32. package/lib/utils/cell-value-validator.js +41 -0
  33. package/lib/utils/column-utils.js +15 -0
  34. package/lib/utils/editor-utils.js +1 -1
  35. package/lib/utils/number-precision.js +8 -8
  36. package/lib/utils/utils.js +1 -1
  37. package/lib/utils/value-format-utils.js +222 -19
  38. package/package.json +1 -1
  39. package/lib/utils/constants.js +0 -52
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.DURATION_DECIMAL_DIGITS = exports.DURATION_ZERO_DISPLAY = exports.DURATION_FORMATS = exports.DURATION_FORMATS_MAP = exports.DEFAULT_NUMBER_FORMAT = exports.FORMULA_RESULT_TYPE = exports.DATE_TYPES = exports.NUMBER_TYPES = void 0;
5
-
6
- var _DURATION_ZERO_DISPLA, _DURATION_DECIMAL_DIG;
7
-
8
- var NUMBER_TYPES = {
9
- 'NUMBER': 'number',
10
- 'NUMBER_WITH_COMMAS': 'number-with-commas',
11
- 'PERCENT': 'percent',
12
- 'YUAN': 'yuan',
13
- 'EURO': 'euro',
14
- 'DOLLAR': 'dollar'
15
- };
16
- exports.NUMBER_TYPES = NUMBER_TYPES;
17
- var DATE_TYPES = {
18
- 'D/M/YYYY': 'D/M/YYYY',
19
- 'D/M/YYYY HH:mm': 'D/M/YYYY HH:mm',
20
- 'M/D/YYYY': 'M/D/YY',
21
- 'M/D/YYYY HH:mm': 'M/D/YYYY HH:mm',
22
- 'YYYY-MM-DD': 'YYYY-MM-DD',
23
- 'YYYY-MM-DD HH:mm': 'YYYY-MM-DD HH:mm'
24
- };
25
- exports.DATE_TYPES = DATE_TYPES;
26
- var FORMULA_RESULT_TYPE = {
27
- NUMBER: 'number',
28
- STRING: 'string',
29
- DATE: 'date',
30
- BOOL: 'bool',
31
- ARRAY: 'array'
32
- };
33
- exports.FORMULA_RESULT_TYPE = FORMULA_RESULT_TYPE;
34
- var DEFAULT_NUMBER_FORMAT = 'number';
35
- exports.DEFAULT_NUMBER_FORMAT = DEFAULT_NUMBER_FORMAT;
36
- var DURATION_FORMATS_MAP = {
37
- H_MM: 'h:mm',
38
- H_MM_SS: 'h:mm:ss'
39
- };
40
- exports.DURATION_FORMATS_MAP = DURATION_FORMATS_MAP;
41
- var DURATION_FORMATS = [{
42
- name: DURATION_FORMATS_MAP.H_MM,
43
- type: DURATION_FORMATS_MAP.H_MM
44
- }, {
45
- name: DURATION_FORMATS_MAP.H_MM_SS,
46
- type: DURATION_FORMATS_MAP.H_MM_SS
47
- }];
48
- exports.DURATION_FORMATS = DURATION_FORMATS;
49
- var DURATION_ZERO_DISPLAY = (_DURATION_ZERO_DISPLA = {}, _DURATION_ZERO_DISPLA[DURATION_FORMATS_MAP.H_MM] = '0:00', _DURATION_ZERO_DISPLA[DURATION_FORMATS_MAP.H_MM_SS] = '0:00', _DURATION_ZERO_DISPLA);
50
- exports.DURATION_ZERO_DISPLAY = DURATION_ZERO_DISPLAY;
51
- var DURATION_DECIMAL_DIGITS = (_DURATION_DECIMAL_DIG = {}, _DURATION_DECIMAL_DIG[DURATION_FORMATS_MAP.H_MM] = 0, _DURATION_DECIMAL_DIG[DURATION_FORMATS_MAP.H_MM_SS] = 0, _DURATION_DECIMAL_DIG);
52
- exports.DURATION_DECIMAL_DIGITS = DURATION_DECIMAL_DIGITS;