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
@@ -40,17 +40,19 @@ class RowExpandFileItemFormatter extends _react.Component {
40
40
  };
41
41
  }
42
42
  render() {
43
- const _this$props = this.props,
44
- file = _this$props.file,
45
- column = _this$props.column,
46
- index = _this$props.index,
47
- readOnly = _this$props.readOnly,
48
- downloadFile = _this$props.downloadFile,
49
- deleteFile = _this$props.deleteFile,
50
- config = _this$props.config;
43
+ const {
44
+ file,
45
+ column,
46
+ index,
47
+ readOnly,
48
+ downloadFile,
49
+ deleteFile,
50
+ config
51
+ } = this.props;
51
52
  const id = 'file-list-preview-item' + column.key + index;
52
- const _getFileThumbnailInfo = (0, _url.getFileThumbnailInfo)(file, config),
53
- fileIconUrl = _getFileThumbnailInfo.fileIconUrl;
53
+ const {
54
+ fileIconUrl
55
+ } = (0, _url.getFileThumbnailInfo)(file, config);
54
56
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
55
57
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
56
58
  className: "row-expand-item-file",
@@ -50,8 +50,12 @@ class RowExpandFormulaFormatter extends _react.default.Component {
50
50
  window.location.href = "mailto:".concat(email.trim());
51
51
  };
52
52
  this.renderBorder = dom => {
53
- const column = this.props.column;
54
- const result_type = column.data.result_type;
53
+ const {
54
+ column
55
+ } = this.props;
56
+ const {
57
+ result_type
58
+ } = column.data;
55
59
  let style = {
56
60
  minHeight: '38px'
57
61
  };
@@ -67,7 +71,9 @@ class RowExpandFormulaFormatter extends _react.default.Component {
67
71
  });
68
72
  };
69
73
  this.renderCellValue = (cellValue, resultType) => {
70
- const containerClassName = this.props.containerClassName;
74
+ const {
75
+ containerClassName
76
+ } = this.props;
71
77
  const customClassName = this.getGridCellClassName(resultType);
72
78
  const className = "dtable-ui cell-formatter-container formula-formatter ".concat(containerClassName, " ").concat(customClassName);
73
79
  return this.renderBorder(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -81,14 +87,16 @@ class RowExpandFormulaFormatter extends _react.default.Component {
81
87
  return this.renderCellValue(errorValue, resultType);
82
88
  };
83
89
  this.renderOtherColumnFormatter = () => {
84
- const _this$props = this.props,
85
- value = _this$props.value,
86
- column = _this$props.column,
87
- collaborators = _this$props.collaborators,
88
- departments = _this$props.departments;
89
- const _column$data = column.data,
90
- array_type = _column$data.array_type,
91
- array_data = _column$data.array_data;
90
+ const {
91
+ value,
92
+ column,
93
+ collaborators,
94
+ departments
95
+ } = this.props;
96
+ const {
97
+ array_type,
98
+ array_data
99
+ } = column.data;
92
100
  if (!array_type || array_type === _dtableUtils.CellType.LINK) {
93
101
  return null;
94
102
  }
@@ -148,7 +156,9 @@ class RowExpandFormulaFormatter extends _react.default.Component {
148
156
  switch (array_type) {
149
157
  case _dtableUtils.CellType.DURATION:
150
158
  {
151
- const duration_format = array_data.duration_format;
159
+ const {
160
+ duration_format
161
+ } = array_data;
152
162
  return {
153
163
  format: duration_format
154
164
  };
@@ -193,13 +203,18 @@ class RowExpandFormulaFormatter extends _react.default.Component {
193
203
  }
194
204
  }
195
205
  render() {
196
- let _this$props2 = this.props,
197
- column = _this$props2.column,
198
- collaborators = _this$props2.collaborators,
199
- value = _this$props2.value;
200
- const data = column.data;
201
- const array_type = data.array_type,
202
- result_type = data.result_type;
206
+ let {
207
+ column,
208
+ collaborators,
209
+ value
210
+ } = this.props;
211
+ const {
212
+ data
213
+ } = column;
214
+ const {
215
+ array_type,
216
+ result_type
217
+ } = data;
203
218
  if (_dtableUtils.DISPLAY_INTERNAL_ERRORS.includes(value)) {
204
219
  return this.renderInternalErrorValue(value, result_type);
205
220
  }
@@ -48,15 +48,17 @@ class RowExpandImageFormatter extends _react.default.Component {
48
48
  };
49
49
  }
50
50
  render() {
51
- const _this$props = this.props,
52
- value = _this$props.value,
53
- server = _this$props.server,
54
- containerClassName = _this$props.containerClassName,
55
- readOnly = _this$props.readOnly,
56
- column = _this$props.column;
57
- const _this$state = this.state,
58
- isPreviewImage = _this$state.isPreviewImage,
59
- previewImageIndex = _this$state.previewImageIndex;
51
+ const {
52
+ value,
53
+ server,
54
+ containerClassName,
55
+ readOnly,
56
+ column
57
+ } = this.props;
58
+ const {
59
+ isPreviewImage,
60
+ previewImageIndex
61
+ } = this.state;
60
62
  if (!Array.isArray(value) || value.length === 0) {
61
63
  return null;
62
64
  }
@@ -49,13 +49,14 @@ class RowExpandImageItemFormatter extends _react.Component {
49
49
  };
50
50
  }
51
51
  render() {
52
- const _this$props = this.props,
53
- url = _this$props.url,
54
- column = _this$props.column,
55
- index = _this$props.index,
56
- readOnly = _this$props.readOnly,
57
- downloadFile = _this$props.downloadFile,
58
- deleteFile = _this$props.deleteFile;
52
+ const {
53
+ url,
54
+ column,
55
+ index,
56
+ readOnly,
57
+ downloadFile,
58
+ deleteFile
59
+ } = this.props;
59
60
  const id = 'image-list-preview-item' + column.key + index;
60
61
  const name = decodeURI(url.slice(url.lastIndexOf('/') + 1));
61
62
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
@@ -16,7 +16,9 @@ class RowExpandFormatter extends _react.default.Component {
16
16
  constructor(_props) {
17
17
  super(_props);
18
18
  this.updateCollaborators = () => {
19
- const column = this.props.column;
19
+ const {
20
+ column
21
+ } = this.props;
20
22
  if (![_dtableUtils.CellType.CREATOR, _dtableUtils.CellType.LAST_MODIFIER, _dtableUtils.CellType.COLLABORATOR].includes(column.type)) return;
21
23
  const collaborators = this.getCollaborators();
22
24
  this.setState({
@@ -24,10 +26,12 @@ class RowExpandFormatter extends _react.default.Component {
24
26
  });
25
27
  };
26
28
  this.calculateCollaboratorData = props => {
27
- const row = props.row,
28
- column = props.column,
29
- valueKey = props.valueKey,
30
- queryCollaborators = props.queryCollaborators;
29
+ const {
30
+ row,
31
+ column,
32
+ valueKey,
33
+ queryCollaborators
34
+ } = props;
31
35
  if (column.type === _dtableUtils.CellType.CREATOR || column.type === _dtableUtils.CellType.LAST_MODIFIER) {
32
36
  const email = row[column[valueKey]];
33
37
  queryCollaborators && queryCollaborators(email);
@@ -39,9 +43,10 @@ class RowExpandFormatter extends _react.default.Component {
39
43
  }
40
44
  };
41
45
  this.getCollaborators = () => {
42
- const _this$props = this.props,
43
- getCollaborators = _this$props.getCollaborators,
44
- collaborators = _this$props.collaborators;
46
+ const {
47
+ getCollaborators,
48
+ collaborators
49
+ } = this.props;
45
50
  if (getCollaborators) return getCollaborators();
46
51
  return collaborators || [];
47
52
  };
@@ -51,13 +56,17 @@ class RowExpandFormatter extends _react.default.Component {
51
56
  });
52
57
  };
53
58
  this.renderFormatter = () => {
54
- let _this$props2 = this.props,
55
- column = _this$props2.column,
56
- row = _this$props2.row,
57
- valueKey = _this$props2.valueKey;
58
- let _column = column,
59
- columnType = _column.type;
60
- const collaborators = this.state.collaborators;
59
+ let {
60
+ column,
61
+ row,
62
+ valueKey
63
+ } = this.props;
64
+ let {
65
+ type: columnType
66
+ } = column;
67
+ const {
68
+ collaborators
69
+ } = this.state;
61
70
  const containerClassName = "dtable-ui-row-expand-".concat(columnType, "-formatter");
62
71
  let cellValue = row[column[valueKey]];
63
72
  const Formatter = this.component[columnType];
@@ -168,8 +177,8 @@ class RowExpandFormatter extends _react.default.Component {
168
177
  }
169
178
  case _dtableUtils.CellType.MULTIPLE_SELECT:
170
179
  {
171
- var _column2, _column2$data;
172
- const options = ((_column2 = column) === null || _column2 === void 0 ? void 0 : (_column2$data = _column2.data) === null || _column2$data === void 0 ? void 0 : _column2$data.options) || [];
180
+ var _column, _column$data;
181
+ const options = ((_column = column) === null || _column === void 0 ? void 0 : (_column$data = _column.data) === null || _column$data === void 0 ? void 0 : _column$data.options) || [];
173
182
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
174
183
  className: "form-control d-flex align-items-center w-100 h-auto",
175
184
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, {
@@ -181,8 +190,8 @@ class RowExpandFormatter extends _react.default.Component {
181
190
  }
182
191
  case _dtableUtils.CellType.SINGLE_SELECT:
183
192
  {
184
- var _column3, _column3$data;
185
- const options = ((_column3 = column) === null || _column3 === void 0 ? void 0 : (_column3$data = _column3.data) === null || _column3$data === void 0 ? void 0 : _column3$data.options) || [];
193
+ var _column2, _column2$data;
194
+ const options = ((_column2 = column) === null || _column2 === void 0 ? void 0 : (_column2$data = _column2.data) === null || _column2$data === void 0 ? void 0 : _column2$data.options) || [];
186
195
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
187
196
  className: "form-control d-flex align-items-center w-100",
188
197
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, {
@@ -215,12 +224,12 @@ class RowExpandFormatter extends _react.default.Component {
215
224
  }
216
225
  case _dtableUtils.CellType.CHECKBOX:
217
226
  {
218
- var _column$data;
227
+ var _column$data2;
219
228
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
220
229
  className: "checkbox-formatter-container",
221
230
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, {
222
231
  value: cellValue,
223
- checkboxStyle: ((_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style) || {}
232
+ checkboxStyle: ((_column$data2 = column.data) === null || _column$data2 === void 0 ? void 0 : _column$data2.checkbox_style) || {}
224
233
  })
225
234
  });
226
235
  }
@@ -247,11 +256,14 @@ class RowExpandFormatter extends _react.default.Component {
247
256
  case _dtableUtils.CellType.LINK:
248
257
  {
249
258
  // handle link column do not have column.data.display_column
250
- const _column4 = column,
251
- data = _column4.data;
252
- const display_column_key = data.display_column_key,
253
- array_type = data.array_type,
254
- array_data = data.array_data;
259
+ const {
260
+ data
261
+ } = column;
262
+ const {
263
+ display_column_key,
264
+ array_type,
265
+ array_data
266
+ } = data;
255
267
  if (!data.display_column) {
256
268
  column = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, column), {}, {
257
269
  data: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
@@ -380,7 +392,9 @@ class RowExpandFormatter extends _react.default.Component {
380
392
  }
381
393
  }
382
394
  render() {
383
- const className = this.props.className;
395
+ const {
396
+ className
397
+ } = this.props;
384
398
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
385
399
  className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-formatter', className),
386
400
  children: this.renderFormatter()
@@ -14,10 +14,13 @@ class CollaboratorItemFormatter extends _react.Component {
14
14
  constructor(_props) {
15
15
  super(_props);
16
16
  this.calculateCollaboratorData = props => {
17
- const _this$props = this.props,
18
- context = _this$props.context,
19
- collaborators = _this$props.collaborators;
20
- const cellValue = props.cellValue;
17
+ const {
18
+ context,
19
+ collaborators
20
+ } = this.props;
21
+ const {
22
+ cellValue
23
+ } = props;
21
24
  if (!cellValue) {
22
25
  this.setState({
23
26
  isDataLoaded: true,
@@ -103,10 +106,13 @@ class CollaboratorItemFormatter extends _react.Component {
103
106
  this.calculateCollaboratorData(nextProps);
104
107
  }
105
108
  render() {
106
- const cellValue = this.props.cellValue;
107
- const _this$state = this.state,
108
- collaborator = _this$state.collaborator,
109
- isDataLoaded = _this$state.isDataLoaded;
109
+ const {
110
+ cellValue
111
+ } = this.props;
112
+ const {
113
+ collaborator,
114
+ isDataLoaded
115
+ } = this.state;
110
116
  if (!isDataLoaded || !cellValue || !collaborator) {
111
117
  return this.props.renderEmpty();
112
118
  }
@@ -20,21 +20,28 @@ var _jsxRuntime = require("react/jsx-runtime");
20
20
  class RowExpandLinkFormatter extends _react.Component {
21
21
  render() {
22
22
  const props = this.props;
23
- const column = props.column,
24
- value = props.value,
25
- containerClassName = props.containerClassName,
26
- collaborators = props.collaborators;
27
- const data = column.data;
23
+ const {
24
+ column,
25
+ value,
26
+ containerClassName,
27
+ collaborators
28
+ } = props;
29
+ const {
30
+ data
31
+ } = column;
28
32
  if (!Array.isArray(value) || value.length === 0) {
29
33
  return props.renderEmpty();
30
34
  }
31
- let _ref = data || {},
32
- displayColumn = _ref.display_column;
35
+ let {
36
+ display_column: displayColumn
37
+ } = data || {};
33
38
  if (!displayColumn) {
34
39
  return props.renderEmpty();
35
40
  }
36
- let displayColumnType = displayColumn.type,
37
- displayColumnData = displayColumn.data;
41
+ let {
42
+ type: displayColumnType,
43
+ data: displayColumnData
44
+ } = displayColumn;
38
45
  if (displayColumnType === 'string') {
39
46
  displayColumnType = _dtableUtils.CellType.TEXT;
40
47
  }
@@ -67,8 +74,9 @@ class RowExpandLinkFormatter extends _react.Component {
67
74
  className: containerClassName,
68
75
  children: cellValue.map((value, index) => {
69
76
  if (!value || typeof value !== 'string') return null;
70
- const _ref2 = displayColumnData || {},
71
- format = _ref2.format;
77
+ const {
78
+ format
79
+ } = displayColumnData || {};
72
80
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DateFormatter.default, {
73
81
  value: value,
74
82
  format: format,
@@ -8,9 +8,11 @@ var _dtableUtils = require("dtable-utils");
8
8
  const DOWNLOAD_NAME_COLUMN_TYPES = [_dtableUtils.CellType.TEXT, _dtableUtils.CellType.NUMBER, _dtableUtils.CellType.DATE, _dtableUtils.CellType.COLLABORATOR, _dtableUtils.CellType.CREATOR, _dtableUtils.CellType.AUTO_NUMBER];
9
9
  const getCellDisplayValue = (record, column, collaborators) => {
10
10
  if (!column || !DOWNLOAD_NAME_COLUMN_TYPES.includes(column.type)) return '';
11
- const key = column.key,
12
- type = column.type,
13
- data = column.data;
11
+ const {
12
+ key,
13
+ type,
14
+ data
15
+ } = column;
14
16
  return (0, _dtableUtils.getCellValueDisplayString)(record, type, key, {
15
17
  data,
16
18
  collaborators,
@@ -13,16 +13,15 @@ class RateExpendRateFormatter extends _react.default.Component {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.getRateList = () => {
16
- const _this$props = this.props,
17
- data = _this$props.data,
18
- value = _this$props.value;
19
- const _ref = data || {},
20
- _ref$rate_max_number = _ref.rate_max_number,
21
- rate_max_number = _ref$rate_max_number === void 0 ? 5 : _ref$rate_max_number,
22
- _ref$rate_style_color = _ref.rate_style_color,
23
- rate_style_color = _ref$rate_style_color === void 0 ? '#e5e5e5' : _ref$rate_style_color,
24
- _ref$rate_style_type = _ref.rate_style_type,
25
- rate_style_type = _ref$rate_style_type === void 0 ? 'dtable-icon-rate' : _ref$rate_style_type;
16
+ const {
17
+ data,
18
+ value
19
+ } = this.props;
20
+ const {
21
+ rate_max_number = 5,
22
+ rate_style_color = '#e5e5e5',
23
+ rate_style_type = 'dtable-icon-rate'
24
+ } = data || {};
26
25
  let rateList = [];
27
26
  for (let i = 0; i < rate_max_number; i++) {
28
27
  let style = {
@@ -37,7 +36,9 @@ class RateExpendRateFormatter extends _react.default.Component {
37
36
  };
38
37
  }
39
38
  render() {
40
- const containerClassName = this.props.containerClassName;
39
+ const {
40
+ containerClassName
41
+ } = this.props;
41
42
  const className = (0, _classnames.default)('dtable-ui cell-formatter-container rate-formatter', containerClassName);
42
43
  const rateList = this.getRateList();
43
44
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -26,10 +26,11 @@ class TextFormatter extends _react.default.Component {
26
26
  };
27
27
  }
28
28
  render() {
29
- const _this$props = this.props,
30
- containerClassName = _this$props.containerClassName,
31
- value = _this$props.value,
32
- column = _this$props.column;
29
+ const {
30
+ containerClassName,
31
+ value,
32
+ column
33
+ } = this.props;
33
34
  const isDisplayAsAsPhoneNumber = column ? (0, _dtableUtils.checkIsDisplayAsPhoneNumberColumn)(column) : false;
34
35
  const classname = (0, _classnames.default)('dtable-ui cell-formatter-container text-formatter', containerClassName, {
35
36
  'row-expand-jump-link-container': isDisplayAsAsPhoneNumber
@@ -16,7 +16,9 @@ class UrlFormatter extends _react.default.Component {
16
16
  constructor() {
17
17
  super(...arguments);
18
18
  this.onOpenUrlLink = () => {
19
- const value = this.props.value;
19
+ const {
20
+ value
21
+ } = this.props;
20
22
  const url = (0, _editorUtils.getTrimmedString)(value);
21
23
  const validUrl = (0, _utils.isValidUrl)(url) ? url : "http://".concat(url);
22
24
  try {
@@ -33,9 +35,10 @@ class UrlFormatter extends _react.default.Component {
33
35
  };
34
36
  }
35
37
  render() {
36
- const _this$props = this.props,
37
- containerClassName = _this$props.containerClassName,
38
- value = _this$props.value;
38
+ const {
39
+ containerClassName,
40
+ value
41
+ } = this.props;
39
42
  const classname = (0, _classnames.default)('dtable-ui cell-formatter-container url-formatter row-expand-jump-link-container', containerClassName);
40
43
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
41
44
  className: classname,
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
10
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
10
  var _react = _interopRequireDefault(require("react"));
12
11
  var _classnames = _interopRequireDefault(require("classnames"));
13
12
  var _dtableUtils = require("dtable-utils");
@@ -25,31 +24,41 @@ class Body extends _react.default.Component {
25
24
  this.props.getDownLoadFiles([{
26
25
  url: imageItemUrl
27
26
  }]).then(res => {
28
- const _res$data$urls = (0, _slicedToArray2.default)(res.data.urls, 1),
29
- downloadUrl = _res$data$urls[0];
27
+ const [downloadUrl] = res.data.urls;
30
28
  (0, _utils.downloadFile)(downloadUrl);
31
29
  }).catch(error => {
32
30
  // todo
33
31
  });
34
32
  };
35
33
  this.getCellValue = _ref => {
36
- let row = _ref.row,
37
- column = _ref.column;
34
+ let {
35
+ row,
36
+ column
37
+ } = _ref;
38
38
  if (!row || !column) return null;
39
- const valueKey = this.props.valueKey;
39
+ const {
40
+ valueKey
41
+ } = this.props;
40
42
  return row[column[valueKey]];
41
43
  };
42
44
  this.renderColumnValue = (row, column) => {
43
45
  const _this$props = this.props,
44
- component = _this$props.component,
45
- onChange = _this$props.onChange,
46
- className = _this$props.className,
46
+ {
47
+ component,
48
+ onChange,
49
+ className
50
+ } = _this$props,
47
51
  props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
48
- const getDownLoadFiles = props.getDownLoadFiles;
49
- const editable = column.editable;
50
- const _ref2 = component || {},
51
- editor = _ref2.editor,
52
- formatter = _ref2.formatter;
52
+ const {
53
+ getDownLoadFiles
54
+ } = props;
55
+ const {
56
+ editable
57
+ } = column;
58
+ const {
59
+ editor,
60
+ formatter
61
+ } = component || {};
53
62
  if (editable) {
54
63
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
55
64
  column: column,
@@ -68,21 +77,25 @@ class Body extends _react.default.Component {
68
77
  };
69
78
  }
70
79
  render() {
71
- const _this$props2 = this.props,
72
- columns = _this$props2.columns,
73
- row = _this$props2.row,
74
- placeholder = _this$props2.placeholder;
80
+ const {
81
+ columns,
82
+ row,
83
+ placeholder
84
+ } = this.props;
75
85
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
76
86
  className: "dtable-ui-row-expand-body dtable-ui-mobile-row-expand-body",
77
87
  children: [columns.length === 0 && placeholder && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
78
88
  children: placeholder
79
89
  }), columns.map(column => {
80
- const type = column.type,
81
- data = column.data;
90
+ const {
91
+ type,
92
+ data
93
+ } = column;
82
94
  let isHasMore = false;
83
95
  if (type === _dtableUtils.CellType.LINK_FORMULA) {
84
- let _ref3 = data || {},
85
- array_type = _ref3.array_type;
96
+ let {
97
+ array_type
98
+ } = data || {};
86
99
  const value = this.getCellValue({
87
100
  row,
88
101
  column
@@ -10,9 +10,13 @@ var _reactstrap = require("reactstrap");
10
10
  require("./index.css");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  const ColumnContent = _ref => {
13
- let column = _ref.column,
14
- children = _ref.children;
15
- const name = column.name;
13
+ let {
14
+ column,
15
+ children
16
+ } = _ref;
17
+ const {
18
+ name
19
+ } = column;
16
20
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
17
21
  className: "dtable-ui-mobile-row-expand-item",
18
22
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {