dtable-ui-component 0.1.75-beta → 0.1.75-beta1

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 (115) hide show
  1. package/lib/app.css +20 -0
  2. package/lib/app.js +96 -0
  3. package/lib/assets/images/avatar/default_avatar.png +0 -0
  4. package/lib/assets/images/file/192/excel.png +0 -0
  5. package/lib/assets/images/file/192/file.png +0 -0
  6. package/lib/assets/images/file/192/music.png +0 -0
  7. package/lib/assets/images/file/192/pdf.png +0 -0
  8. package/lib/assets/images/file/192/pic.png +0 -0
  9. package/lib/assets/images/file/192/ppt.png +0 -0
  10. package/lib/assets/images/file/192/txt.png +0 -0
  11. package/lib/assets/images/file/192/video.png +0 -0
  12. package/lib/assets/images/file/192/word.png +0 -0
  13. package/lib/assets/images/file/24/excel.png +0 -0
  14. package/lib/assets/images/file/24/file.png +0 -0
  15. package/lib/assets/images/file/24/music.png +0 -0
  16. package/lib/assets/images/file/24/pdf.png +0 -0
  17. package/lib/assets/images/file/24/pic.png +0 -0
  18. package/lib/assets/images/file/24/ppt.png +0 -0
  19. package/lib/assets/images/file/24/txt.png +0 -0
  20. package/lib/assets/images/file/24/video.png +0 -0
  21. package/lib/assets/images/file/24/word.png +0 -0
  22. package/lib/assets/images/folder/folder-192.png +0 -0
  23. package/lib/assets/images/folder/folder-24.png +0 -0
  24. package/lib/components/cell-editor/checkbox-editor.js +111 -0
  25. package/lib/components/cell-editor/collaborator-editor.js +249 -0
  26. package/lib/components/cell-editor/date-editor.js +171 -0
  27. package/lib/components/cell-editor/index.js +40 -0
  28. package/lib/components/cell-editor/link-editor.js +321 -0
  29. package/lib/components/cell-editor/multiple-select-editor.js +250 -0
  30. package/lib/components/cell-editor/number-editor.js +162 -0
  31. package/lib/components/cell-editor/single-select-editor.js +216 -0
  32. package/lib/components/cell-editor/text-editor.js +129 -0
  33. package/lib/components/cell-editor-dialog/pc-file-editor-dialog.js +66 -0
  34. package/lib/components/cell-editor-dialog/pc-files-addition/index.js +1 -0
  35. package/lib/components/cell-editor-dialog/pc-files-addition/pc-file-uploaded-item.js +1 -0
  36. package/lib/components/cell-editor-dialog/pc-files-preview/index.js +1 -0
  37. package/lib/components/cell-editor-dialog/pc-files-preview/pc-file-item-preview.js +1 -0
  38. package/lib/components/cell-editor-popover/mb-collaborator-editor-popover.js +183 -0
  39. package/lib/components/cell-editor-popover/mb-date-editor-popover.js +262 -0
  40. package/lib/components/cell-editor-popover/mb-link-editor-popover.js +176 -0
  41. package/lib/components/cell-editor-popover/mb-select-editor-popover.js +243 -0
  42. package/lib/components/cell-editor-popover/pc-collaborator-editor-popover.js +124 -0
  43. package/lib/components/cell-editor-popover/pc-date-editor-popover.js +156 -0
  44. package/lib/components/cell-editor-popover/pc-link-editor-popover.js +128 -0
  45. package/lib/components/cell-editor-popover/pc-select-editor-popover.js +157 -0
  46. package/lib/components/cell-factory/cell-formatter-factory.js +28 -0
  47. package/lib/components/cell-formatter/auto-number-formatter.js +45 -0
  48. package/lib/components/cell-formatter/button-formatter.js +66 -0
  49. package/lib/components/cell-formatter/checkbox-formatter.js +56 -0
  50. package/lib/components/cell-formatter/collaborator-formatter.js +111 -0
  51. package/lib/components/cell-formatter/creator-formatter.js +105 -0
  52. package/lib/components/cell-formatter/ctime-formatter.js +70 -0
  53. package/lib/components/cell-formatter/date-formatter.js +73 -0
  54. package/lib/components/cell-formatter/duration-formatter.js +49 -0
  55. package/lib/components/cell-formatter/email-formatter.js +45 -0
  56. package/lib/components/cell-formatter/file-formatter.js +77 -0
  57. package/lib/components/cell-formatter/formatter-config.js +66 -0
  58. package/lib/components/cell-formatter/formula-formatter.js +189 -0
  59. package/lib/components/cell-formatter/geolocation-formatter.js +66 -0
  60. package/lib/components/cell-formatter/image-formatter.js +171 -0
  61. package/lib/components/cell-formatter/index.js +112 -0
  62. package/lib/components/cell-formatter/last-modifier-formatter.js +105 -0
  63. package/lib/components/cell-formatter/link-formatter.js +165 -0
  64. package/lib/components/cell-formatter/long-text-formatter.js +46 -0
  65. package/lib/components/cell-formatter/mtime-formatter.js +70 -0
  66. package/lib/components/cell-formatter/multiple-select-formatter.js +84 -0
  67. package/lib/components/cell-formatter/number-formatter.js +60 -0
  68. package/lib/components/cell-formatter/rate-formatter.js +93 -0
  69. package/lib/components/cell-formatter/single-select-formatter.js +84 -0
  70. package/lib/components/cell-formatter/text-formatter.js +67 -0
  71. package/lib/components/cell-formatter/url-formatter.js +45 -0
  72. package/lib/components/cell-formatter/widgets/file-item-formatter.js +63 -0
  73. package/lib/components/cell-formatter/widgets/image-previewer-lightbox.js +152 -0
  74. package/lib/components/cell-formatter/widgets/long-text-formatter/html-long-text-formatter.js +107 -0
  75. package/lib/components/cell-formatter/widgets/long-text-formatter/simple-long-text-formatter.js +110 -0
  76. package/lib/components/common/collaborator-item.js +79 -0
  77. package/lib/components/common/edit-editor-button.js +67 -0
  78. package/lib/components/common/images-lazy-load.js +158 -0
  79. package/lib/components/common/link-editor-option.js +121 -0
  80. package/lib/components/common/mobile/mb-editor-header.js +61 -0
  81. package/lib/components/common/modal-portal.js +51 -0
  82. package/lib/components/common/select-editor-option.js +122 -0
  83. package/lib/components/common/select-item.js +73 -0
  84. package/lib/components/file-uploader/index.js +63 -0
  85. package/lib/components/loading.js +16 -0
  86. package/lib/components/toast/alert.js +164 -0
  87. package/lib/components/toast/index.js +12 -0
  88. package/lib/components/toast/toast.js +223 -0
  89. package/lib/components/toast/toastManager.js +189 -0
  90. package/lib/components/toast/toaster.js +92 -0
  91. package/lib/constants/cell-types.js +54 -0
  92. package/lib/constants/index.js +70 -0
  93. package/lib/css/cell-editor.css +614 -0
  94. package/lib/css/cell-formatter.css +247 -0
  95. package/lib/css/custom-rc-calendar.css +118 -0
  96. package/lib/css/image-previewer-ligntbox.css +87 -0
  97. package/lib/css/loading.css +54 -0
  98. package/lib/index.js +64 -0
  99. package/lib/lang/index.js +66 -0
  100. package/lib/locals/de.js +7 -0
  101. package/lib/locals/en.js +22 -0
  102. package/lib/locals/fr.js +7 -0
  103. package/lib/locals/zh-CN.js +22 -0
  104. package/lib/utils/cell-value-validator.js +41 -0
  105. package/lib/utils/column-utils.js +15 -0
  106. package/lib/utils/editor-utils.js +81 -0
  107. package/lib/utils/markdown2html.js +68 -0
  108. package/lib/utils/normalize-long-text-value.js +74 -0
  109. package/lib/utils/number-precision.js +181 -0
  110. package/lib/utils/unified/index.js +470 -0
  111. package/lib/utils/utils.js +141 -0
  112. package/lib/utils/value-format-utils.js +545 -0
  113. package/lib/utils/vfile/core.js +172 -0
  114. package/lib/utils/vfile/index.js +48 -0
  115. package/package.json +3 -3
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.URL = exports.TEXT = exports.SINGLE_SELECT = exports.RATE = exports.NUMBER = exports.MULTIPLE_SELECT = exports.MTIME = exports.LONG_TEXT = exports.LINK_FORMULA = exports.LINK = exports.LAST_MODIFIER = exports.IMAGE = exports.GEOLOCATION = exports.FORMULA = exports.FILE = exports.EMAIL = exports.DURATION = exports.DEFAULT = exports.DATE = exports.CTIME = exports.CREATOR = exports.COLLABORATOR = exports.CHECKBOX = exports.BUTTON = exports.AUTO_NUMBER = void 0;
5
+ var DEFAULT = 'default';
6
+ exports.DEFAULT = DEFAULT;
7
+ var NUMBER = 'number';
8
+ exports.NUMBER = NUMBER;
9
+ var TEXT = 'text';
10
+ exports.TEXT = TEXT;
11
+ var CHECKBOX = 'checkbox';
12
+ exports.CHECKBOX = CHECKBOX;
13
+ var DATE = 'date';
14
+ exports.DATE = DATE;
15
+ var SINGLE_SELECT = 'single-select';
16
+ exports.SINGLE_SELECT = SINGLE_SELECT;
17
+ var LONG_TEXT = 'long-text';
18
+ exports.LONG_TEXT = LONG_TEXT;
19
+ var IMAGE = 'image';
20
+ exports.IMAGE = IMAGE;
21
+ var FILE = 'file';
22
+ exports.FILE = FILE;
23
+ var MULTIPLE_SELECT = 'multiple-select';
24
+ exports.MULTIPLE_SELECT = MULTIPLE_SELECT;
25
+ var COLLABORATOR = 'collaborator';
26
+ exports.COLLABORATOR = COLLABORATOR;
27
+ var LINK = 'link';
28
+ exports.LINK = LINK;
29
+ var FORMULA = 'formula';
30
+ exports.FORMULA = FORMULA;
31
+ var LINK_FORMULA = 'link-formula';
32
+ exports.LINK_FORMULA = LINK_FORMULA;
33
+ var CREATOR = 'creator';
34
+ exports.CREATOR = CREATOR;
35
+ var CTIME = 'ctime';
36
+ exports.CTIME = CTIME;
37
+ var LAST_MODIFIER = 'last-modifier';
38
+ exports.LAST_MODIFIER = LAST_MODIFIER;
39
+ var MTIME = 'mtime';
40
+ exports.MTIME = MTIME;
41
+ var GEOLOCATION = 'geolocation';
42
+ exports.GEOLOCATION = GEOLOCATION;
43
+ var AUTO_NUMBER = 'auto-number';
44
+ exports.AUTO_NUMBER = AUTO_NUMBER;
45
+ var URL = 'url';
46
+ exports.URL = URL;
47
+ var EMAIL = 'email';
48
+ exports.EMAIL = EMAIL;
49
+ var DURATION = 'duration';
50
+ exports.DURATION = DURATION;
51
+ var RATE = 'rate';
52
+ exports.RATE = RATE;
53
+ var BUTTON = 'button';
54
+ exports.BUTTON = BUTTON;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.SIMPLE_CELL_FORMULA_RESULTS = exports.SIMPLE_CELL_COLUMNS = exports.NUMBER_TYPES = exports.FORMULA_RESULT_TYPE = exports.DURATION_ZERO_DISPLAY = exports.DURATION_FORMATS_MAP = exports.DURATION_FORMATS = exports.DURATION_DECIMAL_DIGITS = exports.DEFAULT_NUMBER_FORMAT = exports.DEFAULT_DATE_FORMAT = exports.DATE_TYPES = exports.COLLABORATOR_COLUMN_TYPES = exports.ARRAY_FORMAL_COLUMNS_TYPES = exports.ARRAY_FORMAL_COLUMNS = void 0;
5
+
6
+ var CellType = _interopRequireWildcard(require("./cell-types"));
7
+
8
+ var _DURATION_ZERO_DISPLA, _DURATION_DECIMAL_DIG;
9
+
10
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+
12
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+
14
+ var NUMBER_TYPES = {
15
+ 'NUMBER': 'number',
16
+ 'NUMBER_WITH_COMMAS': 'number-with-commas',
17
+ 'PERCENT': 'percent',
18
+ 'YUAN': 'yuan',
19
+ 'EURO': 'euro',
20
+ 'DOLLAR': 'dollar'
21
+ };
22
+ exports.NUMBER_TYPES = NUMBER_TYPES;
23
+ var DATE_TYPES = {
24
+ 'D/M/YYYY': 'D/M/YYYY',
25
+ 'D/M/YYYY HH:mm': 'D/M/YYYY HH:mm',
26
+ 'M/D/YYYY': 'M/D/YY',
27
+ 'M/D/YYYY HH:mm': 'M/D/YYYY HH:mm',
28
+ 'YYYY-MM-DD': 'YYYY-MM-DD',
29
+ 'YYYY-MM-DD HH:mm': 'YYYY-MM-DD HH:mm'
30
+ };
31
+ exports.DATE_TYPES = DATE_TYPES;
32
+ var FORMULA_RESULT_TYPE = {
33
+ NUMBER: 'number',
34
+ STRING: 'string',
35
+ DATE: 'date',
36
+ BOOL: 'bool',
37
+ ARRAY: 'array'
38
+ };
39
+ exports.FORMULA_RESULT_TYPE = FORMULA_RESULT_TYPE;
40
+ var SIMPLE_CELL_COLUMNS = [CellType.TEXT, CellType.NUMBER, CellType.DATE, CellType.CTIME, CellType.MTIME, CellType.GEOLOCATION, CellType.AUTO_NUMBER, CellType.URL, CellType.EMAIL, CellType.DURATION, CellType.CHECKBOX, CellType.RATE];
41
+ exports.SIMPLE_CELL_COLUMNS = SIMPLE_CELL_COLUMNS;
42
+ var ARRAY_FORMAL_COLUMNS = [CellType.IMAGE, CellType.FILE, CellType.MULTIPLE_SELECT, CellType.COLLABORATOR];
43
+ exports.ARRAY_FORMAL_COLUMNS = ARRAY_FORMAL_COLUMNS;
44
+ var SIMPLE_CELL_FORMULA_RESULTS = [FORMULA_RESULT_TYPE.NUMBER, FORMULA_RESULT_TYPE.STRING, FORMULA_RESULT_TYPE.DATE, FORMULA_RESULT_TYPE.BOOL];
45
+ exports.SIMPLE_CELL_FORMULA_RESULTS = SIMPLE_CELL_FORMULA_RESULTS;
46
+ var COLLABORATOR_COLUMN_TYPES = [CellType.COLLABORATOR, CellType.CREATOR, CellType.LAST_MODIFIER];
47
+ exports.COLLABORATOR_COLUMN_TYPES = COLLABORATOR_COLUMN_TYPES;
48
+ var ARRAY_FORMAL_COLUMNS_TYPES = [CellType.IMAGE, CellType.FILE, CellType.MULTIPLE_SELECT, CellType.COLLABORATOR];
49
+ exports.ARRAY_FORMAL_COLUMNS_TYPES = ARRAY_FORMAL_COLUMNS_TYPES;
50
+ var DEFAULT_NUMBER_FORMAT = 'number';
51
+ exports.DEFAULT_NUMBER_FORMAT = DEFAULT_NUMBER_FORMAT;
52
+ var DEFAULT_DATE_FORMAT = 'YYYY-MM-DD';
53
+ exports.DEFAULT_DATE_FORMAT = DEFAULT_DATE_FORMAT;
54
+ var DURATION_FORMATS_MAP = {
55
+ H_MM: 'h:mm',
56
+ H_MM_SS: 'h:mm:ss'
57
+ };
58
+ exports.DURATION_FORMATS_MAP = DURATION_FORMATS_MAP;
59
+ var DURATION_FORMATS = [{
60
+ name: DURATION_FORMATS_MAP.H_MM,
61
+ type: DURATION_FORMATS_MAP.H_MM
62
+ }, {
63
+ name: DURATION_FORMATS_MAP.H_MM_SS,
64
+ type: DURATION_FORMATS_MAP.H_MM_SS
65
+ }];
66
+ exports.DURATION_FORMATS = DURATION_FORMATS;
67
+ 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);
68
+ exports.DURATION_ZERO_DISPLAY = DURATION_ZERO_DISPLAY;
69
+ 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);
70
+ exports.DURATION_DECIMAL_DIGITS = DURATION_DECIMAL_DIGITS;