dtable-ui-component 6.0.126 → 7.0.0-xia.1

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 (282) hide show
  1. package/lib/ActionSheet/index.js +16 -14
  2. package/lib/ActivityIndicator/index.js +8 -7
  3. package/lib/AsyncUserSelect/index.js +19 -40
  4. package/lib/AsyncUserSelect/user-item.js +6 -5
  5. package/lib/AutoNumberFormatter/index.js +4 -3
  6. package/lib/Badge/index.js +11 -9
  7. package/lib/ButtonFormatter/index.js +8 -6
  8. package/lib/CTimeFormatter/index.js +4 -3
  9. package/lib/CheckboxEditor/index.js +3 -1
  10. package/lib/CheckboxEditor/mb-editor.js +20 -9
  11. package/lib/CheckboxEditor/pc-editor.js +24 -12
  12. package/lib/CheckboxFormatter/index.js +5 -4
  13. package/lib/CollaboratorEditor/index.js +4 -2
  14. package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
  15. package/lib/CollaboratorEditor/pc-editor/index.js +34 -25
  16. package/lib/CollaboratorFormatter/index.js +10 -8
  17. package/lib/CollaboratorItem/index.js +5 -4
  18. package/lib/CollapsibleSettingLayout/index.js +7 -9
  19. package/lib/Comment/body/comment.js +18 -10
  20. package/lib/Comment/body/index.js +4 -2
  21. package/lib/Comment/footer/btns/index.js +7 -4
  22. package/lib/Comment/footer/index.js +20 -9
  23. package/lib/Comment/footer/input/index.js +50 -29
  24. package/lib/Comment/footer/input/participant/index.js +5 -4
  25. package/lib/Comment/footer/participants/index.js +5 -4
  26. package/lib/Comment/footer/participants/participant/index.js +3 -1
  27. package/lib/Comment/footer/participants/participant-select/index.js +24 -8
  28. package/lib/Comment/index.js +57 -39
  29. package/lib/Comment/utils/utilities.js +21 -15
  30. package/lib/CreatorFormatter/index.js +8 -6
  31. package/lib/DTableColorPicker/ColorPickerPortal/index.js +18 -22
  32. package/lib/DTableColorPicker/index.js +40 -55
  33. package/lib/DTableColorPicker/utils.js +6 -4
  34. package/lib/DTableColumnIcon/index.js +7 -6
  35. package/lib/DTableCommonAddTool/index.js +8 -6
  36. package/lib/DTableCustomFooter/index.js +3 -1
  37. package/lib/DTableCustomizeCollaboratorSelect/index.js +20 -17
  38. package/lib/DTableCustomizeSelect/index.js +24 -19
  39. package/lib/DTableDropdownItem/index.js +18 -16
  40. package/lib/DTableDropdownMenu/index.js +10 -8
  41. package/lib/DTableEmptyTip/index.js +5 -4
  42. package/lib/DTableFiltersPopover/index.js +50 -34
  43. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
  44. package/lib/DTableFiltersPopover/utils/index.js +113 -63
  45. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
  46. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
  47. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
  48. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
  49. package/lib/DTableFiltersPopover/widgets/filter-group.js +56 -35
  50. package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
  51. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
  52. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
  53. package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
  54. package/lib/DTableGroupSelect/index.js +15 -11
  55. package/lib/DTableGroupSelect/select-option-group.js +32 -23
  56. package/lib/DTableIcon/index.js +7 -6
  57. package/lib/DTableIcon/svg-icon.js +7 -5
  58. package/lib/DTableModalHeader/index.css +3 -20
  59. package/lib/DTableModalHeader/index.js +3 -1
  60. package/lib/DTablePopover/index.js +15 -11
  61. package/lib/DTableRadio/index.js +9 -10
  62. package/lib/DTableRadioGroup/index.js +17 -8
  63. package/lib/DTableSearchInput/index.js +29 -19
  64. package/lib/DTableSelect/dtable-select-label.js +5 -6
  65. package/lib/DTableSelect/index.js +22 -21
  66. package/lib/DTableSelect/utils.js +15 -7
  67. package/lib/DTableSubDropdownMenu/index.js +10 -8
  68. package/lib/DTableSubDropdownToggle/index.js +12 -12
  69. package/lib/DTableSwitch/index.js +11 -12
  70. package/lib/DTableToolTip/index.js +8 -7
  71. package/lib/DateEditor/index.js +15 -20
  72. package/lib/DateEditor/mb-editor/index.js +31 -18
  73. package/lib/DateEditor/pc-editor.js +45 -26
  74. package/lib/DateFormatter/index.js +5 -4
  75. package/lib/DatePicker/index.js +15 -9
  76. package/lib/DatePicker/utils.js +3 -1
  77. package/lib/DeleteTip/index.js +6 -5
  78. package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
  79. package/lib/DepartmentSelectFilter/index.js +8 -6
  80. package/lib/DepartmentSingleSelectEditor/index.js +3 -1
  81. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
  82. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
  83. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
  84. package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
  85. package/lib/DigitalSignEditor/index.js +3 -1
  86. package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
  87. package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
  88. package/lib/DigitalSignEditor/service.js +4 -2
  89. package/lib/DigitalSignEditor/signature-board/index.js +8 -5
  90. package/lib/DigitalSignEditor/utils.js +4 -2
  91. package/lib/DigitalSignFormatter/index.js +15 -12
  92. package/lib/DigitalSignFormatter/utils.js +5 -4
  93. package/lib/DurationEditor/index.js +31 -21
  94. package/lib/DurationFormatter/index.js +5 -4
  95. package/lib/EditEditorButton/index.js +3 -1
  96. package/lib/EmailFormatter/index.js +4 -3
  97. package/lib/FieldDisplaySetting/field-item.js +12 -12
  98. package/lib/FieldDisplaySetting/index.js +10 -12
  99. package/lib/FileEditor/files-previewer/index.js +3 -1
  100. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
  101. package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
  102. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
  103. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
  104. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +21 -14
  105. package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
  106. package/lib/FileEditor/index.js +3 -1
  107. package/lib/FileEditor/mb-editor/index.js +20 -28
  108. package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
  109. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
  110. package/lib/FileEditor/pc-editor/index.js +27 -19
  111. package/lib/FileFormatter/index.js +19 -26
  112. package/lib/FileItemFormatter/index.js +9 -6
  113. package/lib/FileUploader/index.js +45 -28
  114. package/lib/FormulaFormatter/index.js +29 -15
  115. package/lib/GeolocationEditor/index.js +12 -11
  116. package/lib/GeolocationEditor/map-editor-utils.js +15 -17
  117. package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
  118. package/lib/GeolocationEditor/mb-editor/index.js +6 -4
  119. package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
  120. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
  121. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
  122. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
  123. package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
  124. package/lib/GeolocationEditor/pc-editor/country-editor.js +23 -10
  125. package/lib/GeolocationEditor/pc-editor/index.js +20 -12
  126. package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
  127. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
  128. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
  129. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
  130. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
  131. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
  132. package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
  133. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
  134. package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
  135. package/lib/GeolocationFormatter/index.js +5 -4
  136. package/lib/HtmlLongTextFormatter/index.js +12 -4
  137. package/lib/Icon/index.js +5 -3
  138. package/lib/IconButton/index.js +6 -4
  139. package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
  140. package/lib/ImageEditor/images-previewer/index.js +9 -3
  141. package/lib/ImageEditor/index.js +3 -1
  142. package/lib/ImageEditor/mb-editor/index.js +20 -28
  143. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
  144. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +3 -1
  145. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
  146. package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
  147. package/lib/ImageEditor/pc-editor/index.js +16 -11
  148. package/lib/ImageFormatter/images-lazy-load.js +11 -19
  149. package/lib/ImageFormatter/index.js +13 -11
  150. package/lib/ImagePreviewerLightbox/index.js +13 -15
  151. package/lib/ImageThumbnail/index.js +13 -10
  152. package/lib/InputItem/custom-input.js +46 -26
  153. package/lib/InputItem/custom-keyboard.js +18 -15
  154. package/lib/InputItem/index.js +50 -34
  155. package/lib/InputItem/input.js +4 -2
  156. package/lib/LastModifierFormatter/index.js +8 -6
  157. package/lib/LinkEditor/index.js +53 -33
  158. package/lib/LinkEditor/link-editor-option.js +4 -3
  159. package/lib/LinkEditor/mb-popover/index.js +22 -9
  160. package/lib/LinkEditor/pc-popover/index.js +10 -5
  161. package/lib/LinkFormatter/index.js +37 -21
  162. package/lib/List/index.js +8 -6
  163. package/lib/List/list-item.js +28 -22
  164. package/lib/LongTextFormatter/index.js +5 -4
  165. package/lib/MBEditorHeader/index.js +8 -7
  166. package/lib/MTimeFormatter/index.js +4 -3
  167. package/lib/MobileFullScreenPage/body/index.js +5 -3
  168. package/lib/MobileFullScreenPage/header/index.js +6 -4
  169. package/lib/MobileFullScreenPage/index.js +11 -13
  170. package/lib/MobileModal/index.js +3 -1
  171. package/lib/MobileOperationSheet/index.js +8 -7
  172. package/lib/MobileSelector/empty/index.js +3 -1
  173. package/lib/MobileSelector/index.js +7 -5
  174. package/lib/MobileSelector/option/index.js +5 -3
  175. package/lib/MobileSelector/options/index.js +3 -1
  176. package/lib/MobileSelector/search/index.js +5 -3
  177. package/lib/MobileUpload/index.js +5 -4
  178. package/lib/Modal/modal.js +15 -14
  179. package/lib/Modal/prompt.js +4 -4
  180. package/lib/MultipleSelectEditor/index.js +3 -1
  181. package/lib/MultipleSelectFormatter/index.js +8 -6
  182. package/lib/NotificationPopover/index.js +5 -4
  183. package/lib/NumberEditor/index.js +21 -12
  184. package/lib/NumberFormatter/index.js +5 -4
  185. package/lib/PhoneNumberLink/index.js +4 -2
  186. package/lib/Picker/AbstractPicker.js +27 -23
  187. package/lib/Popover/index.js +4 -3
  188. package/lib/Popover/item.js +9 -7
  189. package/lib/Progress/index.js +8 -9
  190. package/lib/Radio/Radio.js +8 -4
  191. package/lib/Radio/RadioItem.js +12 -8
  192. package/lib/RateFormatter/index.js +13 -13
  193. package/lib/RoleStatusEditor/index.js +17 -18
  194. package/lib/RowExpandDialog/body/index.js +49 -32
  195. package/lib/RowExpandDialog/column-content/index.js +9 -5
  196. package/lib/RowExpandDialog/header/index.js +8 -6
  197. package/lib/RowExpandDialog/index.js +34 -49
  198. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
  199. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
  200. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
  201. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
  202. package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
  203. package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
  204. package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
  205. package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
  206. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
  207. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
  208. package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
  209. package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
  210. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +19 -9
  211. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
  212. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
  213. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
  214. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
  215. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
  216. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
  217. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
  218. package/lib/RowExpandEditor/index.js +8 -4
  219. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
  220. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
  221. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
  222. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +19 -11
  223. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
  224. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
  225. package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
  226. package/lib/RowExpandEditor/rate-editor/mb-editor.js +25 -12
  227. package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
  228. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
  229. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
  230. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
  231. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
  232. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +13 -5
  233. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
  234. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
  235. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
  236. package/lib/RowExpandFormatter/email-formatter/index.js +7 -4
  237. package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
  238. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
  239. package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
  240. package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
  241. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
  242. package/lib/RowExpandFormatter/index.js +41 -27
  243. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
  244. package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
  245. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
  246. package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
  247. package/lib/RowExpandFormatter/text/index.js +5 -4
  248. package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
  249. package/lib/RowExpandView/body/index.js +35 -22
  250. package/lib/RowExpandView/column-content/index.js +7 -3
  251. package/lib/RowExpandView/index.js +30 -42
  252. package/lib/SelectItem/index.js +8 -6
  253. package/lib/SelectOptionGroup/index.js +40 -30
  254. package/lib/SelectedDepartments/index.js +9 -7
  255. package/lib/SimpleLongTextFormatter/index.js +16 -10
  256. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
  257. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
  258. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
  259. package/lib/SingleSelectEditor/index.js +3 -1
  260. package/lib/SingleSelectFormatter/index.js +9 -8
  261. package/lib/TabBar/Tab.js +16 -14
  262. package/lib/TabBar/index.js +21 -18
  263. package/lib/Tabs/index.js +3 -1
  264. package/lib/TextEditor/index.js +23 -14
  265. package/lib/TextFormatter/index.js +4 -3
  266. package/lib/TextareaItem/index.js +26 -19
  267. package/lib/Toast/index.js +4 -3
  268. package/lib/UrlFormatter/index.js +4 -3
  269. package/lib/common/editor-base.js +12 -7
  270. package/lib/hooks/common-hooks.js +4 -2
  271. package/lib/select-editor/index.js +3 -1
  272. package/lib/select-editor/mb-editor/index.js +28 -17
  273. package/lib/select-editor/pc-editor/index.js +42 -27
  274. package/lib/toaster/alert.js +7 -6
  275. package/lib/toaster/toast.js +3 -2
  276. package/lib/toaster/toastManager.js +4 -2
  277. package/lib/utils/cell.js +11 -8
  278. package/lib/utils/column-utils.js +14 -8
  279. package/lib/utils/departments.js +3 -1
  280. package/lib/utils/url.js +31 -24
  281. package/lib/utils/utils.js +6 -2
  282. package/package.json +1 -1
@@ -41,7 +41,9 @@ class LocalImageAddition extends _react.default.Component {
41
41
  };
42
42
  this.onFileUploadSuccess = fileMessage => {
43
43
  this.hideDeleteIcon();
44
- let thumbnailSrcList = this.state.thumbnailSrcList;
44
+ let {
45
+ thumbnailSrcList
46
+ } = this.state;
45
47
  const findUploadFileIndex = this.findUploadFileIndex(fileMessage);
46
48
  thumbnailSrcList.splice(findUploadFileIndex, 1, fileMessage);
47
49
  if (thumbnailSrcList.every(fileItem => !fileItem.isUploading)) {
@@ -52,7 +54,9 @@ class LocalImageAddition extends _react.default.Component {
52
54
  this.props.fileUploadCompleted(fileMessage);
53
55
  };
54
56
  this.onFileUploadFailed = uploadedFileInfo => {
55
- let thumbnailSrcList = this.state.thumbnailSrcList;
57
+ let {
58
+ thumbnailSrcList
59
+ } = this.state;
56
60
  const findUploadFileIndex = this.findUploadFileIndex(uploadedFileInfo);
57
61
  thumbnailSrcList.splice(findUploadFileIndex, 1, uploadedFileInfo);
58
62
  this.setState({
@@ -60,7 +64,9 @@ class LocalImageAddition extends _react.default.Component {
60
64
  });
61
65
  };
62
66
  this.findUploadFileIndex = fileMessage => {
63
- let thumbnailSrcList = this.state.thumbnailSrcList;
67
+ let {
68
+ thumbnailSrcList
69
+ } = this.state;
64
70
  let uploadFileIndex = thumbnailSrcList.findIndex(item => item.name === fileMessage.file.name);
65
71
  return uploadFileIndex;
66
72
  };
@@ -71,7 +77,9 @@ class LocalImageAddition extends _react.default.Component {
71
77
  });
72
78
  return;
73
79
  }
74
- let uploadMessageList = this.state.uploadMessageList;
80
+ let {
81
+ uploadMessageList
82
+ } = this.state;
75
83
  let newUploadMessageList = uploadMessageList.slice(0);
76
84
  let uploadFile = uploadMessageList.find(item => item.uploadName === uploadMessage.uploadName);
77
85
  if (uploadFile) {
@@ -105,7 +113,9 @@ class LocalImageAddition extends _react.default.Component {
105
113
  });
106
114
  };
107
115
  this.renderMultipleFilesArr = () => {
108
- let thumbnailSrcList = this.state.thumbnailSrcList;
116
+ let {
117
+ thumbnailSrcList
118
+ } = this.state;
109
119
  let imageArr = [];
110
120
  if (Array.isArray(this.props.uploadLocalImageValue)) {
111
121
  let uploadedFileList = this.renderUploadedFile();
@@ -160,7 +170,9 @@ class LocalImageAddition extends _react.default.Component {
160
170
  return imageArr;
161
171
  };
162
172
  this.renderUploadedFile = () => {
163
- const uploadLocalImageValue = this.props.uploadLocalImageValue;
173
+ const {
174
+ uploadLocalImageValue
175
+ } = this.props;
164
176
  let uploadedFileList = [];
165
177
  uploadedFileList = uploadLocalImageValue.length > 0 && uploadLocalImageValue.map((imgSrc, index) => {
166
178
  let imageThumbnailUrl = (0, _url.getImageThumbnailUrl)(imgSrc);
@@ -190,7 +202,9 @@ class LocalImageAddition extends _react.default.Component {
190
202
  return uploadedFileList;
191
203
  };
192
204
  this.renderUploadFileWrapper = imageArr => {
193
- let isImageTipShow = this.state.isImageTipShow;
205
+ let {
206
+ isImageTipShow
207
+ } = this.state;
194
208
  let editorContent;
195
209
  let className = imageArr.length === 0 ? "dtable-ui-image-upload-container ".concat(isImageTipShow ? 'dtable-ui-image-upload-container-active' : '') : 'dtable-ui-image-wrapper';
196
210
  if (imageArr.length === 0) {
@@ -25,7 +25,9 @@ class ImagesPreviewer extends _react.default.Component {
25
25
  }
26
26
  };
27
27
  this.showLargeImage = itemUrl => {
28
- let value = this.props.value;
28
+ let {
29
+ value
30
+ } = this.props;
29
31
  this.setState({
30
32
  isShowLargeImage: true,
31
33
  largeImageIndex: value.indexOf(itemUrl)
@@ -55,7 +57,9 @@ class ImagesPreviewer extends _react.default.Component {
55
57
  };
56
58
  this.deleteImage = (index, type) => {
57
59
  this.props.deleteImage(index, type);
58
- const value = this.props.value;
60
+ const {
61
+ value
62
+ } = this.props;
59
63
  if (index > value.length - 2) {
60
64
  if (value.length - 2 < 0) {
61
65
  this.hideLargeImage();
@@ -98,7 +102,9 @@ class ImagesPreviewer extends _react.default.Component {
98
102
  }
99
103
  }
100
104
  render() {
101
- let value = this.props.value;
105
+ let {
106
+ value
107
+ } = this.props;
102
108
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
103
109
  className: "dtable-ui-image-previewer-container",
104
110
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -24,9 +24,10 @@ class PCImageEditor extends _react.default.Component {
24
24
  return this.state.value;
25
25
  };
26
26
  this.getEditorView = () => {
27
- const _this$props = this.props,
28
- isInModal = _this$props.isInModal,
29
- value = _this$props.value;
27
+ const {
28
+ isInModal,
29
+ value
30
+ } = this.props;
30
31
  return !value || value.length === 0 || isInModal ? _constants.FILE_EDITOR_STATUS.ADDITION : _constants.FILE_EDITOR_STATUS.PREVIEWER;
31
32
  };
32
33
  this.deleteImage = function (index) {
@@ -56,9 +57,10 @@ class PCImageEditor extends _react.default.Component {
56
57
  e.stopPropagation();
57
58
  if (this.state.isOpen && this.state.isUpdated) {
58
59
  if (this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION) {
59
- let _this$state = this.state,
60
- value = _this$state.value,
61
- uploadLocalImageValue = _this$state.uploadLocalImageValue;
60
+ let {
61
+ value,
62
+ uploadLocalImageValue
63
+ } = this.state;
62
64
  let newValue = value.concat(uploadLocalImageValue);
63
65
  this.setState({
64
66
  value: newValue
@@ -112,7 +114,9 @@ class PCImageEditor extends _react.default.Component {
112
114
  });
113
115
  };
114
116
  this.renderHeader = () => {
115
- let editorView = this.state.editorView;
117
+ let {
118
+ editorView
119
+ } = this.state;
116
120
  if (this.props.isInModal) {
117
121
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
118
122
  children: (0, _lang.getLocale)('Add_images')
@@ -134,10 +138,11 @@ class PCImageEditor extends _react.default.Component {
134
138
  });
135
139
  };
136
140
  this.showImageListPreviewer = () => {
137
- let _this$state2 = this.state,
138
- value = _this$state2.value,
139
- uploadLocalImageValue = _this$state2.uploadLocalImageValue,
140
- imageLinkValue = _this$state2.imageLinkValue;
141
+ let {
142
+ value,
143
+ uploadLocalImageValue,
144
+ imageLinkValue
145
+ } = this.state;
141
146
  let newValue = value.concat(uploadLocalImageValue, imageLinkValue);
142
147
  this.setState({
143
148
  value: newValue
@@ -1,34 +1,26 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _Loading = _interopRequireDefault(require("../Loading"));
12
11
  var _url = require("../utils/url");
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  const ImagesLazyLoad = _ref => {
15
- let images = _ref.images,
16
- server = _ref.server,
17
- onImageClick = _ref.onImageClick,
18
- renderItem = _ref.renderItem,
19
- dtableUuid = _ref.dtableUuid;
20
- const _useState = (0, _react.useState)(images),
21
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
22
- currentImages = _useState2[0],
23
- setCurrentImages = _useState2[1];
24
- const _useState3 = (0, _react.useState)([]),
25
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
26
- loadedImages = _useState4[0],
27
- setLoadedImages = _useState4[1];
28
- const _useState5 = (0, _react.useState)(0),
29
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
30
- loadedCount = _useState6[0],
31
- setLoadedCount = _useState6[1];
14
+ let {
15
+ images,
16
+ server,
17
+ onImageClick,
18
+ renderItem,
19
+ dtableUuid
20
+ } = _ref;
21
+ const [currentImages, setCurrentImages] = (0, _react.useState)(images);
22
+ const [loadedImages, setLoadedImages] = (0, _react.useState)([]);
23
+ const [loadedCount, setLoadedCount] = (0, _react.useState)(0);
32
24
  const lazyLoadImage = (url, resolve, reject) => {
33
25
  if (!url) {
34
26
  reject('img path is required');
@@ -63,18 +63,20 @@ class ImageFormatter extends _react.default.Component {
63
63
  this.canRotate = props.rotateImage && !props.readOnly;
64
64
  }
65
65
  render() {
66
- const _this$props = this.props,
67
- isSample = _this$props.isSample,
68
- value = _this$props.value,
69
- server = _this$props.server,
70
- containerClassName = _this$props.containerClassName,
71
- lightboxClassName = _this$props.lightboxClassName,
72
- readOnly = _this$props.readOnly,
73
- dtableUuid = _this$props.dtableUuid;
66
+ const {
67
+ isSample,
68
+ value,
69
+ server,
70
+ containerClassName,
71
+ lightboxClassName,
72
+ readOnly,
73
+ dtableUuid
74
+ } = this.props;
74
75
  const className = (0, _classnames.default)('dtable-ui cell-formatter-container image-formatter', containerClassName);
75
- const _this$state = this.state,
76
- isPreviewImage = _this$state.isPreviewImage,
77
- previewImageIndex = _this$state.previewImageIndex;
76
+ const {
77
+ isPreviewImage,
78
+ previewImageIndex
79
+ } = this.state;
78
80
  if (!Array.isArray(value) || value.length === 0) {
79
81
  return null;
80
82
  }
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _classnames = _interopRequireDefault(require("classnames"));
11
10
  var _reactImageLightbox = _interopRequireDefault(require("@seafile/react-image-lightbox"));
@@ -15,16 +14,18 @@ require("@seafile/react-image-lightbox/style.css");
15
14
  require("./index.css");
16
15
  var _jsxRuntime = require("react/jsx-runtime");
17
16
  function ImagePreviewerLightbox(props) {
18
- const imageItems = props.imageItems,
19
- imageIndex = props.imageIndex,
20
- readOnly = props.readOnly,
21
- className = props.className,
22
- server = props.server,
23
- workspaceID = props.workspaceID,
24
- dtableUuid = props.dtableUuid,
25
- deleteImage = props.deleteImage,
26
- downloadImage = props.downloadImage,
27
- onRotateImage = props.onRotateImage;
17
+ const {
18
+ imageItems,
19
+ imageIndex,
20
+ readOnly,
21
+ className,
22
+ server,
23
+ workspaceID,
24
+ dtableUuid,
25
+ deleteImage,
26
+ downloadImage,
27
+ onRotateImage
28
+ } = props;
28
29
  const imageSrcList = imageItems.map(src => {
29
30
  let name = '';
30
31
  try {
@@ -57,10 +58,7 @@ function ImagePreviewerLightbox(props) {
57
58
  };
58
59
  });
59
60
  const imagesLength = imageSrcList.length;
60
- const _React$useState = _react.default.useState(imageIndex || 0),
61
- _React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
62
- currentImageIndex = _React$useState2[0],
63
- setCurrentImageIndex = _React$useState2[1];
61
+ const [currentImageIndex, setCurrentImageIndex] = _react.default.useState(imageIndex || 0);
64
62
  const imageItem = imageSrcList[currentImageIndex];
65
63
  const URL = imageItem ? imageItem.thumbnail : '';
66
64
  const imageName = imageItem ? imageItem.name : '';
@@ -66,9 +66,9 @@ class ImageThumbnail extends _react.default.Component {
66
66
  showTip: false
67
67
  };
68
68
  this.ref = null;
69
- const _ref = props.config || {},
70
- _ref$mediaUrl = _ref.mediaUrl,
71
- mediaUrl = _ref$mediaUrl === void 0 ? '' : _ref$mediaUrl;
69
+ const {
70
+ mediaUrl = ''
71
+ } = props.config || {};
72
72
  this.imageLoadingFailedUrl = "".concat(mediaUrl, "img/image-loading-failed.png");
73
73
  }
74
74
  componentDidMount() {
@@ -80,13 +80,16 @@ class ImageThumbnail extends _react.default.Component {
80
80
  }
81
81
  }
82
82
  render() {
83
- const _this$props = this.props,
84
- index = _this$props.index,
85
- downloadImage = _this$props.downloadImage,
86
- src = _this$props.src,
87
- className = _this$props.className,
88
- name = _this$props.name;
89
- const imageThumbnailUrl = this.state.imageThumbnailUrl;
83
+ const {
84
+ index,
85
+ downloadImage,
86
+ src,
87
+ className,
88
+ name
89
+ } = this.props;
90
+ const {
91
+ imageThumbnailUrl
92
+ } = this.state;
90
93
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
91
94
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
92
95
  className: (0, _classnames.default)('dtable-ui-image-thumbnail', className),
@@ -50,7 +50,9 @@ class NumberInput extends React.Component {
50
50
  }
51
51
  };
52
52
  this.doBlur = ev => {
53
- const value = this.state.value;
53
+ const {
54
+ value
55
+ } = this.state;
54
56
  if (ev.target !== this.inputRef) {
55
57
  this.onInputBlur(value);
56
58
  }
@@ -70,7 +72,9 @@ class NumberInput extends React.Component {
70
72
  if (IS_REACT_16) {
71
73
  this.keyBoard = null;
72
74
  }
73
- const focus = this.state.focus;
75
+ const {
76
+ focus
77
+ } = this.state;
74
78
  if (focus) {
75
79
  this.setState({
76
80
  focus: false
@@ -82,7 +86,9 @@ class NumberInput extends React.Component {
82
86
  }
83
87
  };
84
88
  this.onInputFocus = () => {
85
- const value = this.state.value;
89
+ const {
90
+ value
91
+ } = this.state;
86
92
  this.props.onFocus(value);
87
93
  this.setState({
88
94
  focus: true
@@ -94,8 +100,9 @@ class NumberInput extends React.Component {
94
100
  const keyBoardHeight = customNumberKeyboard.antmKeyboard.offsetHeight;
95
101
  this.getContainer().style.height = "".concat(keyBoardHeight, "px");
96
102
  if (this.inputRef) {
97
- const _this$inputRef$getBou = this.inputRef.getBoundingClientRect(),
98
- bottom = _this$inputRef$getBou.bottom;
103
+ const {
104
+ bottom
105
+ } = this.inputRef.getBoundingClientRect();
99
106
  const clientHeight = window.innerHeight;
100
107
  // 计算输入框距离视窗的底部距离
101
108
  const distance = clientHeight - bottom;
@@ -118,10 +125,16 @@ class NumberInput extends React.Component {
118
125
  });
119
126
  };
120
127
  this.onKeyboardClick = KeyboardItemValue => {
121
- const maxLength = this.props.maxLength;
122
- const value = this.state.value;
128
+ const {
129
+ maxLength
130
+ } = this.props;
131
+ const {
132
+ value
133
+ } = this.state;
123
134
  // tslint:disable-next-line:no-this-assignment
124
- const onChange = this.onChange;
135
+ const {
136
+ onChange
137
+ } = this;
125
138
  let valueAfterChange;
126
139
  // 删除键
127
140
  if (KeyboardItemValue === 'delete') {
@@ -180,7 +193,9 @@ class NumberInput extends React.Component {
180
193
  // this focus may invocked by users page button click, so this click may trigger blurEventListener at the same time
181
194
  this.renderCustomKeyboard();
182
195
  this.removeBlurListener();
183
- const focus = this.state.focus;
196
+ const {
197
+ focus
198
+ } = this.state;
184
199
  if (!focus) {
185
200
  this.onInputFocus();
186
201
  }
@@ -208,14 +223,15 @@ class NumberInput extends React.Component {
208
223
  this.unLinkInput();
209
224
  }
210
225
  getComponent() {
211
- const _this$props = this.props,
212
- confirmLabel = _this$props.confirmLabel,
213
- backspaceLabel = _this$props.backspaceLabel,
214
- cancelKeyboardLabel = _this$props.cancelKeyboardLabel,
215
- keyboardPrefixCls = _this$props.keyboardPrefixCls,
216
- moneyKeyboardWrapProps = _this$props.moneyKeyboardWrapProps,
217
- moneyKeyboardHeader = _this$props.moneyKeyboardHeader,
218
- disabledKeys = _this$props.disabledKeys;
226
+ const {
227
+ confirmLabel,
228
+ backspaceLabel,
229
+ cancelKeyboardLabel,
230
+ keyboardPrefixCls,
231
+ moneyKeyboardWrapProps,
232
+ moneyKeyboardHeader,
233
+ disabledKeys
234
+ } = this.props;
219
235
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_customKeyboard.default, {
220
236
  ref: this.saveRef,
221
237
  onClick: this.onKeyboardClick,
@@ -229,7 +245,9 @@ class NumberInput extends React.Component {
229
245
  });
230
246
  }
231
247
  getContainer() {
232
- const keyboardPrefixCls = this.props.keyboardPrefixCls;
248
+ const {
249
+ keyboardPrefixCls
250
+ } = this.props;
233
251
  let container = document.querySelector("#".concat(keyboardPrefixCls, "-container"));
234
252
  if (!container) {
235
253
  container = document.createElement('div');
@@ -258,14 +276,16 @@ class NumberInput extends React.Component {
258
276
  return this.keyBoard;
259
277
  }
260
278
  render() {
261
- const _this$props2 = this.props,
262
- placeholder = _this$props2.placeholder,
263
- disabled = _this$props2.disabled,
264
- editable = _this$props2.editable,
265
- moneyKeyboardAlign = _this$props2.moneyKeyboardAlign;
266
- const _this$state = this.state,
267
- focus = _this$state.focus,
268
- value = _this$state.value;
279
+ const {
280
+ placeholder,
281
+ disabled,
282
+ editable,
283
+ moneyKeyboardAlign
284
+ } = this.props;
285
+ const {
286
+ focus,
287
+ value
288
+ } = this.state;
269
289
  const preventKeyboard = disabled || !editable;
270
290
  const fakeInputCls = (0, _classnames.default)('fake-input', {
271
291
  focus,
@@ -33,14 +33,16 @@ function includes(arr, item) {
33
33
  class KeyboardItem extends React.Component {
34
34
  render() {
35
35
  const _this$props = this.props,
36
- prefixCls = _this$props.prefixCls,
37
- onClick = _this$props.onClick,
38
- className = _this$props.className,
39
- disabled = _this$props.disabled,
40
- children = _this$props.children,
41
- tdRef = _this$props.tdRef,
42
- label = _this$props.label,
43
- iconOnly = _this$props.iconOnly,
36
+ {
37
+ prefixCls,
38
+ onClick,
39
+ className,
40
+ disabled,
41
+ children,
42
+ tdRef,
43
+ label,
44
+ iconOnly
45
+ } = _this$props,
44
46
  restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
45
47
  let value = children;
46
48
  if (className === 'keyboard-delete') {
@@ -112,13 +114,14 @@ class CustomKeyboard extends React.Component {
112
114
  };
113
115
  }
114
116
  render() {
115
- const _this$props2 = this.props,
116
- prefixCls = _this$props2.prefixCls,
117
- confirmLabel = _this$props2.confirmLabel,
118
- backspaceLabel = _this$props2.backspaceLabel,
119
- cancelKeyboardLabel = _this$props2.cancelKeyboardLabel,
120
- wrapProps = _this$props2.wrapProps,
121
- header = _this$props2.header;
117
+ const {
118
+ prefixCls,
119
+ confirmLabel,
120
+ backspaceLabel,
121
+ cancelKeyboardLabel,
122
+ wrapProps,
123
+ header
124
+ } = this.props;
122
125
  const wrapperCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"), "".concat(prefixCls, "-wrapper-hide"));
123
126
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
124
127
  className: wrapperCls,
@@ -33,7 +33,9 @@ class InputItem extends React.Component {
33
33
  _this = this;
34
34
  this.onInputChange = e => {
35
35
  const el = e.target;
36
- const rawVal = el.value;
36
+ const {
37
+ value: rawVal
38
+ } = el;
37
39
  let prePos = 0;
38
40
  try {
39
41
  // some input type do not support selection, see https://html.spec.whatwg.org/multipage/input.html#do-not-apply
@@ -41,9 +43,12 @@ class InputItem extends React.Component {
41
43
  } catch (error) {
42
44
  console.warn('Get selection error:', error);
43
45
  }
44
- const _this$state$value = this.state.value,
45
- preCtrlVal = _this$state$value === void 0 ? '' : _this$state$value;
46
- const type = this.props.type;
46
+ const {
47
+ value: preCtrlVal = ''
48
+ } = this.state;
49
+ const {
50
+ type
51
+ } = this.props;
47
52
  let ctrlValue = rawVal;
48
53
  switch (type) {
49
54
  case 'bankCard':
@@ -91,7 +96,9 @@ class InputItem extends React.Component {
91
96
  this.handleOnChange = function (value) {
92
97
  let isMutated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
93
98
  let adjustPos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
94
- const onChange = _this.props.onChange;
99
+ const {
100
+ onChange
101
+ } = _this.props;
95
102
  if (!('value' in _this.props)) {
96
103
  _this.setState({
97
104
  value
@@ -217,39 +224,48 @@ class InputItem extends React.Component {
217
224
  render() {
218
225
  const props = (0, _objectSpread2.default)({}, this.props);
219
226
  delete props.updatePlaceholder;
220
- const prefixCls = props.prefixCls,
221
- prefixListCls = props.prefixListCls,
222
- editable = props.editable,
223
- style = props.style,
224
- clear = props.clear,
225
- children = props.children,
226
- error = props.error,
227
- className = props.className,
228
- extra = props.extra,
229
- labelNumber = props.labelNumber,
230
- type = props.type,
231
- onExtraClick = props.onExtraClick,
232
- onErrorClick = props.onErrorClick,
233
- moneyKeyboardAlign = props.moneyKeyboardAlign,
234
- moneyKeyboardWrapProps = props.moneyKeyboardWrapProps,
235
- moneyKeyboardHeader = props.moneyKeyboardHeader,
236
- onVirtualKeyboardConfirm = props.onVirtualKeyboardConfirm,
237
- autoAdjustHeight = props.autoAdjustHeight,
238
- disabledKeys = props.disabledKeys,
227
+ const {
228
+ prefixCls,
229
+ prefixListCls,
230
+ editable,
231
+ style,
232
+ clear,
233
+ children,
234
+ error,
235
+ className,
236
+ extra,
237
+ labelNumber,
238
+ type,
239
+ onExtraClick,
240
+ onErrorClick,
241
+ moneyKeyboardAlign,
242
+ moneyKeyboardWrapProps,
243
+ moneyKeyboardHeader,
244
+ onVirtualKeyboardConfirm,
245
+ autoAdjustHeight,
246
+ disabledKeys
247
+ } = props,
239
248
  restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
240
- const name = restProps.name,
241
- disabled = restProps.disabled,
242
- maxLength = restProps.maxLength;
243
- const value = this.state.value;
249
+ const {
250
+ name,
251
+ disabled,
252
+ maxLength
253
+ } = restProps;
254
+ const {
255
+ value
256
+ } = this.state;
244
257
 
245
258
  // tslint:disable-next-line:variable-name
246
259
  const _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'InputItem', () => require('./locale/zh_CN'));
247
- const confirmLabel = _locale.confirmLabel,
248
- backspaceLabel = _locale.backspaceLabel,
249
- cancelKeyboardLabel = _locale.cancelKeyboardLabel;
250
- const _this$state = this.state,
251
- focus = _this$state.focus,
252
- placeholder = _this$state.placeholder;
260
+ const {
261
+ confirmLabel,
262
+ backspaceLabel,
263
+ cancelKeyboardLabel
264
+ } = _locale;
265
+ const {
266
+ focus,
267
+ placeholder
268
+ } = this.state;
253
269
  const wrapCls = (0, _classnames.default)("".concat(prefixListCls, "-item"), "".concat(prefixCls, "-item"), "".concat(prefixListCls, "-item-middle"), className, {
254
270
  ["".concat(prefixCls, "-disabled")]: disabled,
255
271
  ["".concat(prefixCls, "-error")]: error,
@@ -36,8 +36,10 @@ class Input extends React.Component {
36
36
  }
37
37
  render() {
38
38
  const _this$props = this.props,
39
- onBlur = _this$props.onBlur,
40
- onFocus = _this$props.onFocus,
39
+ {
40
+ onBlur,
41
+ onFocus
42
+ } = _this$props,
41
43
  restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
42
44
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", (0, _objectSpread2.default)({
43
45
  ref: el => this.inputRef = el,
@@ -20,9 +20,10 @@ class LastModifierFormatter extends _react.default.PureComponent {
20
20
  constructor() {
21
21
  super(...arguments);
22
22
  this.getCollaborators = () => {
23
- let _this$props = this.props,
24
- value = _this$props.value,
25
- collaborators = _this$props.collaborators;
23
+ let {
24
+ value,
25
+ collaborators
26
+ } = this.props;
26
27
  if (!Array.isArray(value)) {
27
28
  value = [value];
28
29
  }
@@ -42,9 +43,10 @@ class LastModifierFormatter extends _react.default.PureComponent {
42
43
  };
43
44
  }
44
45
  render() {
45
- const _this$props2 = this.props,
46
- containerClassName = _this$props2.containerClassName,
47
- value = _this$props2.value;
46
+ const {
47
+ containerClassName,
48
+ value
49
+ } = this.props;
48
50
  const classname = (0, _classnames.default)('dtable-ui cell-formatter-container last-modified-formatter', containerClassName);
49
51
  if (!value || Array.isArray(value) && value.length === 0) {
50
52
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {