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,48 @@
1
+ 'use strict';
2
+
3
+ var VMessage = require('vfile-message');
4
+
5
+ var VFile = require('./core.js');
6
+
7
+ module.exports = VFile;
8
+ var proto = VFile.prototype;
9
+ proto.message = message;
10
+ proto.info = info;
11
+ proto.fail = fail;
12
+ /* Slight backwards compatibility. Remove in the future. */
13
+
14
+ proto.warn = message;
15
+ /* Create a message with `reason` at `position`.
16
+ * When an error is passed in as `reason`, copies the stack. */
17
+
18
+ function message(reason, position, origin) {
19
+ var filePath = this.path;
20
+ var message = new VMessage(reason, position, origin);
21
+
22
+ if (filePath) {
23
+ message.name = filePath + ':' + message.name;
24
+ message.file = filePath;
25
+ }
26
+
27
+ message.fatal = false;
28
+ this.messages.push(message);
29
+ return message;
30
+ }
31
+ /* Fail. Creates a vmessage, associates it with the file,
32
+ * and throws it. */
33
+
34
+
35
+ function fail() {
36
+ var message = this.message.apply(this, arguments);
37
+ message.fatal = true;
38
+ throw message;
39
+ }
40
+ /* Info. Creates a vmessage, associates it with the file,
41
+ * and marks the fatality as null. */
42
+
43
+
44
+ function info() {
45
+ var message = this.message.apply(this, arguments);
46
+ message.fatal = null;
47
+ return message;
48
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "0.1.75beta",
3
+ "version": "0.1.75beta1",
4
4
  "main": "./es/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "0.0.9",
@@ -48,8 +48,8 @@
48
48
  "pub:esm": "npm run clean:esm && export BABEL_ENV=production && ./node_modules/.bin/babel src --out-dir es --copy-files",
49
49
  "pub:lib": "npm run clean:lib && export BABEL_ENV=node && ./node_modules/.bin/babel src --out-dir lib --copy-files",
50
50
  "pub:umd": "npm run build",
51
- "pub:optimized": "rm es/index.local.js",
52
- "prepublishOnly": "npm run pub:esm && npm run pub:umd && npm run pub:optimized"
51
+ "pub:optimized": "rm es/index.local.js && rm lib/index.local.js",
52
+ "prepublishOnly": "npm run pub:esm && npm run pub:lib && npm run pub:umd && npm run pub:optimized"
53
53
  },
54
54
  "files": [
55
55
  "assets",