dtable-ui-component 7.0.13 → 7.0.15

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 (308) hide show
  1. package/lib/ActionSheet/index.js +58 -49
  2. package/lib/ActivityIndicator/index.js +17 -16
  3. package/lib/AsyncUserSelect/index.js +20 -46
  4. package/lib/AsyncUserSelect/user-item.js +6 -5
  5. package/lib/AutoNumberFormatter/index.js +4 -3
  6. package/lib/Badge/index.js +27 -29
  7. package/lib/ButtonFormatter/index.js +8 -6
  8. package/lib/CTimeFormatter/index.js +4 -3
  9. package/lib/CheckboxEditor/index.js +16 -13
  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 +17 -14
  14. package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
  15. package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
  16. package/lib/CollaboratorFormatter/index.js +10 -8
  17. package/lib/CollaboratorItem/index.js +5 -4
  18. package/lib/CollapsibleSettingLayout/index.js +8 -10
  19. package/lib/Comment/body/comment.js +19 -11
  20. package/lib/Comment/body/index.js +8 -8
  21. package/lib/Comment/footer/btns/index.js +7 -4
  22. package/lib/Comment/footer/index.js +21 -10
  23. package/lib/Comment/footer/input/index.js +55 -34
  24. package/lib/Comment/footer/input/participant/index.js +6 -5
  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 +26 -10
  28. package/lib/Comment/index.js +57 -39
  29. package/lib/Comment/utils/utilities.js +22 -16
  30. package/lib/CreatorFormatter/index.js +8 -6
  31. package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
  32. package/lib/DTableColorPicker/index.js +53 -67
  33. package/lib/DTableColorPicker/utils.js +7 -5
  34. package/lib/DTableColumnIcon/index.js +7 -6
  35. package/lib/DTableCommonAddTool/index.js +10 -8
  36. package/lib/DTableCustomFooter/index.js +3 -1
  37. package/lib/DTableCustomizeSearchInput/index.js +41 -26
  38. package/lib/DTableCustomizeSelect/index.js +24 -19
  39. package/lib/DTableDropdownItem/index.js +28 -24
  40. package/lib/DTableDropdownMenu/index.js +17 -14
  41. package/lib/DTableEmptyTip/index.js +5 -4
  42. package/lib/DTableFiltersPopover/index.js +42 -27
  43. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
  44. package/lib/DTableFiltersPopover/utils/index.js +114 -64
  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 +57 -36
  50. package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
  51. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
  52. package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
  53. package/lib/DTableIcon/index.js +11 -10
  54. package/lib/DTableIcon/svg-icon.js +11 -9
  55. package/lib/DTableModalHeader/index.js +7 -7
  56. package/lib/DTablePopover/index.js +16 -12
  57. package/lib/DTableRadio/index.js +9 -10
  58. package/lib/DTableRadioGroup/index.js +20 -11
  59. package/lib/DTableSearchInput/index.js +29 -19
  60. package/lib/DTableSelect/dtable-select-label.js +6 -7
  61. package/lib/DTableSelect/index.js +26 -25
  62. package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
  63. package/lib/DTableSelect/utils.js +83 -47
  64. package/lib/DTableSubDropdownMenu/index.js +16 -12
  65. package/lib/DTableSubDropdownToggle/index.js +16 -17
  66. package/lib/DTableSwitch/index.js +11 -12
  67. package/lib/DTableToolTip/index.js +12 -11
  68. package/lib/DateEditor/index.js +28 -30
  69. package/lib/DateEditor/mb-editor/index.js +31 -18
  70. package/lib/DateEditor/pc-editor.js +46 -27
  71. package/lib/DateFormatter/index.js +5 -4
  72. package/lib/DatePicker/index.js +15 -9
  73. package/lib/DatePicker/utils.js +7 -5
  74. package/lib/DeleteTip/index.js +6 -5
  75. package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
  76. package/lib/DepartmentSelectFilter/index.js +13 -8
  77. package/lib/DepartmentSingleSelectEditor/index.js +16 -13
  78. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
  79. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
  80. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
  81. package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
  82. package/lib/DigitalSignEditor/index.js +16 -13
  83. package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
  84. package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
  85. package/lib/DigitalSignEditor/service.js +5 -3
  86. package/lib/DigitalSignEditor/signature-board/index.js +10 -7
  87. package/lib/DigitalSignEditor/utils.js +4 -2
  88. package/lib/DigitalSignFormatter/index.js +15 -12
  89. package/lib/DigitalSignFormatter/utils.js +6 -5
  90. package/lib/Drawer/index.js +3 -2
  91. package/lib/DurationEditor/index.js +31 -21
  92. package/lib/DurationFormatter/index.js +5 -4
  93. package/lib/EditEditorButton/index.js +3 -1
  94. package/lib/EmailFormatter/index.js +4 -3
  95. package/lib/FieldDisplaySetting/field-item.js +13 -13
  96. package/lib/FieldDisplaySetting/index.js +20 -20
  97. package/lib/FileEditor/files-previewer/index.js +16 -13
  98. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
  99. package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
  100. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
  101. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
  102. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +24 -17
  103. package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
  104. package/lib/FileEditor/index.js +16 -13
  105. package/lib/FileEditor/mb-editor/index.js +20 -28
  106. package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
  107. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
  108. package/lib/FileEditor/pc-editor/index.js +30 -22
  109. package/lib/FileFormatter/index.js +20 -27
  110. package/lib/FileItemFormatter/index.js +10 -7
  111. package/lib/FileUploader/index.js +46 -29
  112. package/lib/FormulaFormatter/index.js +44 -24
  113. package/lib/GeolocationEditor/index.js +32 -27
  114. package/lib/GeolocationEditor/map-editor-utils.js +23 -21
  115. package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
  116. package/lib/GeolocationEditor/mb-editor/index.js +28 -22
  117. package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
  118. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
  119. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
  120. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
  121. package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
  122. package/lib/GeolocationEditor/pc-editor/country-editor.js +25 -12
  123. package/lib/GeolocationEditor/pc-editor/index.js +41 -27
  124. package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
  125. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
  126. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
  127. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
  128. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
  129. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
  130. package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
  131. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
  132. package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
  133. package/lib/GeolocationFormatter/index.js +5 -4
  134. package/lib/HtmlLongTextFormatter/index.js +13 -5
  135. package/lib/Icon/index.js +13 -15
  136. package/lib/Icon/load-sprite.js +13 -2
  137. package/lib/IconButton/index.js +12 -13
  138. package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
  139. package/lib/ImageEditor/images-previewer/index.js +9 -3
  140. package/lib/ImageEditor/index.js +16 -13
  141. package/lib/ImageEditor/mb-editor/index.js +20 -28
  142. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
  143. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +5 -3
  144. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
  145. package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
  146. package/lib/ImageEditor/pc-editor/index.js +16 -11
  147. package/lib/ImageFormatter/images-lazy-load.js +11 -19
  148. package/lib/ImageFormatter/index.js +14 -12
  149. package/lib/ImagePreviewerLightbox/index.js +15 -19
  150. package/lib/ImageThumbnail/index.js +15 -12
  151. package/lib/InputItem/custom-input.js +55 -35
  152. package/lib/InputItem/custom-keyboard.js +42 -42
  153. package/lib/InputItem/index.js +82 -63
  154. package/lib/InputItem/input.js +9 -11
  155. package/lib/LastModifierFormatter/index.js +8 -6
  156. package/lib/LinkEditor/index.js +53 -33
  157. package/lib/LinkEditor/link-editor-option.js +4 -3
  158. package/lib/LinkEditor/mb-popover/index.js +22 -9
  159. package/lib/LinkEditor/pc-popover/index.js +13 -7
  160. package/lib/LinkFormatter/index.js +37 -21
  161. package/lib/List/index.js +17 -19
  162. package/lib/List/list-item.js +59 -55
  163. package/lib/LongTextFormatter/index.js +5 -4
  164. package/lib/MBEditorHeader/index.js +9 -8
  165. package/lib/MTimeFormatter/index.js +4 -3
  166. package/lib/MobileFullScreenPage/body/index.js +6 -4
  167. package/lib/MobileFullScreenPage/header/index.js +10 -8
  168. package/lib/MobileFullScreenPage/index.js +12 -14
  169. package/lib/MobileModal/index.js +7 -8
  170. package/lib/MobileOperationSheet/index.js +8 -7
  171. package/lib/MobileSelector/empty/index.js +3 -1
  172. package/lib/MobileSelector/index.js +7 -5
  173. package/lib/MobileSelector/option/index.js +5 -3
  174. package/lib/MobileSelector/options/index.css +0 -4
  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/alert.js +2 -2
  179. package/lib/Modal/modal.js +28 -30
  180. package/lib/Modal/prompt.js +14 -14
  181. package/lib/MultipleSelectEditor/index.js +7 -7
  182. package/lib/MultipleSelectFormatter/index.js +9 -7
  183. package/lib/NotificationPopover/index.js +5 -4
  184. package/lib/NumberEditor/index.js +21 -12
  185. package/lib/NumberFormatter/index.js +5 -4
  186. package/lib/PhoneNumberLink/index.js +5 -3
  187. package/lib/Picker/AbstractPicker.js +35 -33
  188. package/lib/Popover/index.js +9 -11
  189. package/lib/Popover/item.js +22 -24
  190. package/lib/Progress/index.js +18 -17
  191. package/lib/Radio/Radio.js +17 -15
  192. package/lib/Radio/RadioItem.js +23 -19
  193. package/lib/RateFormatter/index.js +15 -15
  194. package/lib/RoleStatusEditor/index.js +18 -19
  195. package/lib/RowExpand/index.js +7 -6
  196. package/lib/RowExpandDialog/body/index.js +57 -40
  197. package/lib/RowExpandDialog/column-content/index.js +10 -6
  198. package/lib/RowExpandDialog/header/index.js +12 -9
  199. package/lib/RowExpandDialog/index.js +59 -63
  200. package/lib/RowExpandEditor/add-btn/index.js +7 -6
  201. package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
  202. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
  203. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
  204. package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
  205. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
  206. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
  207. package/lib/RowExpandEditor/date-editor/index.js +7 -6
  208. package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
  209. package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
  210. package/lib/RowExpandEditor/department-editor/index.js +7 -6
  211. package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
  212. package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
  213. package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
  214. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
  215. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
  216. package/lib/RowExpandEditor/duration-editor/index.js +7 -6
  217. package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
  218. package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
  219. package/lib/RowExpandEditor/email-editor/index.js +7 -6
  220. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
  221. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
  222. package/lib/RowExpandEditor/file-editor/index.js +7 -6
  223. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
  224. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
  225. package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
  226. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
  227. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
  228. package/lib/RowExpandEditor/image-editor/index.js +7 -6
  229. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
  230. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
  231. package/lib/RowExpandEditor/index.js +16 -11
  232. package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
  233. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
  234. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
  235. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
  236. package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
  237. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
  238. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
  239. package/lib/RowExpandEditor/number-editor/index.js +7 -6
  240. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
  241. package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
  242. package/lib/RowExpandEditor/rate-editor/index.js +7 -6
  243. package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
  244. package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
  245. package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
  246. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
  247. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
  248. package/lib/RowExpandEditor/text-editor/index.js +7 -6
  249. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
  250. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
  251. package/lib/RowExpandEditor/url-editor/index.js +7 -6
  252. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
  253. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
  254. package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
  255. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
  256. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
  257. package/lib/RowExpandFormatter/email-formatter/index.js +8 -5
  258. package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
  259. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
  260. package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
  261. package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
  262. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
  263. package/lib/RowExpandFormatter/index.js +52 -34
  264. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
  265. package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
  266. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
  267. package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
  268. package/lib/RowExpandFormatter/text/index.js +5 -4
  269. package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
  270. package/lib/RowExpandView/body/index.js +43 -32
  271. package/lib/RowExpandView/column-content/index.js +7 -3
  272. package/lib/RowExpandView/index.js +52 -53
  273. package/lib/SelectItem/index.js +7 -5
  274. package/lib/SelectOptionGroup/index.js +40 -30
  275. package/lib/SelectedDepartments/index.js +12 -10
  276. package/lib/SimpleLongTextFormatter/index.js +18 -12
  277. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
  278. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
  279. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
  280. package/lib/SingleSelectEditor/index.js +7 -7
  281. package/lib/SingleSelectFormatter/index.js +9 -8
  282. package/lib/TabBar/Tab.js +26 -24
  283. package/lib/TabBar/index.js +28 -24
  284. package/lib/Tabs/index.js +13 -10
  285. package/lib/TextEditor/index.js +23 -14
  286. package/lib/TextFormatter/index.js +4 -3
  287. package/lib/TextareaItem/index.js +53 -48
  288. package/lib/Toast/index.js +9 -8
  289. package/lib/UrlFormatter/index.js +4 -3
  290. package/lib/common/editor-base.js +12 -7
  291. package/lib/formatterConfig/index.js +3 -3
  292. package/lib/hooks/common-hooks.js +4 -2
  293. package/lib/select-editor/index.js +16 -13
  294. package/lib/select-editor/mb-editor/index.js +28 -17
  295. package/lib/select-editor/pc-editor/index.js +47 -32
  296. package/lib/toaster/alert.js +8 -7
  297. package/lib/toaster/toast.js +4 -3
  298. package/lib/toaster/toastManager.js +13 -13
  299. package/lib/toaster/toaster.js +12 -9
  300. package/lib/utils/cell.js +11 -8
  301. package/lib/utils/class.js +3 -3
  302. package/lib/utils/column-utils.js +14 -8
  303. package/lib/utils/departments.js +6 -5
  304. package/lib/utils/getLocale.js +11 -5
  305. package/lib/utils/object-utils.js +5 -4
  306. package/lib/utils/url.js +29 -22
  307. package/lib/utils/utils.js +6 -2
  308. package/package.json +2 -2
@@ -65,11 +65,14 @@ class RowExpandPCImageEditor extends _react.default.Component {
65
65
  this.setLargeImageIndex(-1);
66
66
  };
67
67
  this.getValue = () => {
68
- let _this$props = this.props,
69
- column = _this$props.column,
70
- row = _this$props.row,
71
- valueKey = _this$props.valueKey;
72
- let imageContainer = this.state.imageContainer;
68
+ let {
69
+ column,
70
+ row,
71
+ valueKey
72
+ } = this.props;
73
+ let {
74
+ imageContainer
75
+ } = this.state;
73
76
  return imageContainer ? imageContainer : row[column[valueKey]];
74
77
  };
75
78
  this.deleteImage = index => {
@@ -82,7 +85,9 @@ class RowExpandPCImageEditor extends _react.default.Component {
82
85
  this.props.onCommit(updatedValue);
83
86
  };
84
87
  this.getImageArray = value => {
85
- const config = this.props.config;
88
+ const {
89
+ config
90
+ } = this.props;
86
91
  return value.map((imageSrc, index) => {
87
92
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
88
93
  index: index,
@@ -90,7 +95,7 @@ class RowExpandPCImageEditor extends _react.default.Component {
90
95
  onClick: this.setLargeImageIndex,
91
96
  deleteImage: this.deleteImage,
92
97
  config: config
93
- }, "image-".concat(index));
98
+ }, `image-${index}`);
94
99
  });
95
100
  };
96
101
  this.state = {
@@ -103,9 +108,11 @@ class RowExpandPCImageEditor extends _react.default.Component {
103
108
  document.addEventListener('keydown', this.onKeyDown);
104
109
  }
105
110
  UNSAFE_componentWillReceiveProps(nextProps) {
106
- const column = nextProps.column,
107
- row = nextProps.row,
108
- valueKey = nextProps.valueKey;
111
+ const {
112
+ column,
113
+ row,
114
+ valueKey
115
+ } = nextProps;
109
116
  if (row._id !== this.props.row._id) {
110
117
  this.setState({
111
118
  imageContainer: row[column[valueKey]] || [],
@@ -128,10 +135,13 @@ class RowExpandPCImageEditor extends _react.default.Component {
128
135
  document.removeEventListener('keydown', this.onKeyDown);
129
136
  }
130
137
  render() {
131
- const isEditorFocus = this.props.isEditorFocus;
132
- let _this$state = this.state,
133
- isShowImageEditor = _this$state.isShowImageEditor,
134
- largeImageIndex = _this$state.largeImageIndex;
138
+ const {
139
+ isEditorFocus
140
+ } = this.props;
141
+ let {
142
+ isShowImageEditor,
143
+ largeImageIndex
144
+ } = this.state;
135
145
  let value = this.getValue();
136
146
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
137
147
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -5,25 +5,30 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
  var _constants = require("./constants");
12
10
  var _jsxRuntime = require("react/jsx-runtime");
13
- const _excluded = ["column", "component"];
14
11
  const RowExpandEditor = _ref => {
15
- let column = _ref.column,
16
- component = _ref.component,
17
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
18
- const components = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _constants.CELL_EDITOR_MAP), component);
12
+ let {
13
+ column,
14
+ component,
15
+ ...props
16
+ } = _ref;
17
+ const components = {
18
+ ..._constants.CELL_EDITOR_MAP,
19
+ ...component
20
+ };
19
21
  const Editor = components[column.type];
20
22
  if (!Editor) return null;
21
- const row = props.row,
22
- valueKey = props.valueKey;
23
+ const {
24
+ row,
25
+ valueKey
26
+ } = props;
23
27
  const value = row[column[valueKey]];
24
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Editor, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Editor, {
29
+ ...props,
25
30
  value: value,
26
31
  column: column
27
- }));
32
+ });
28
33
  };
29
34
  var _default = exports.default = RowExpandEditor;
@@ -1,12 +1,11 @@
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _reactResponsive = _interopRequireDefault(require("react-responsive"));
12
11
  var _pcEditor = _interopRequireDefault(require("./pc-editor"));
@@ -16,14 +15,16 @@ const RowExpandLongTextEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
16
15
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
17
16
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
18
17
  query: "(min-width: 768px)",
19
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
18
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
19
+ ...props,
20
20
  ref: ref
21
- }))
21
+ })
22
22
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
23
23
  query: "(max-width: 768px)",
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
24
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
25
+ ...props,
25
26
  ref: ref
26
- }))
27
+ })
27
28
  })]
28
29
  });
29
30
  });
@@ -1,12 +1,11 @@
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 _seafileEditor = require("@seafile/seafile-editor");
12
11
  var _TextareaItem = _interopRequireDefault(require("../../../../TextareaItem"));
@@ -14,17 +13,18 @@ var _MobileFullScreenPage = _interopRequireDefault(require("../../../../MobileFu
14
13
  var _lang = require("../../../../lang");
15
14
  require("./index.css");
16
15
  var _jsxRuntime = require("react/jsx-runtime");
17
- const Header = _MobileFullScreenPage.default.Header,
18
- Body = _MobileFullScreenPage.default.Body;
16
+ const {
17
+ Header,
18
+ Body
19
+ } = _MobileFullScreenPage.default;
19
20
  const Editor = _ref => {
20
- let oldValue = _ref.value,
21
- title = _ref.title,
22
- onToggle = _ref.onToggle,
23
- onChange = _ref.onChange;
24
- const _useState = (0, _react.useState)(oldValue || ''),
25
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
26
- value = _useState2[0],
27
- setValue = _useState2[1];
21
+ let {
22
+ value: oldValue,
23
+ title,
24
+ onToggle,
25
+ onChange
26
+ } = _ref;
27
+ const [value, setValue] = (0, _react.useState)(oldValue || '');
28
28
  const hasUnSaved = (0, _react.useRef)(false);
29
29
  const rowCounts = (0, _react.useMemo)(() => document.body.offsetWidth < 768 ? 10 : 20, []);
30
30
  const handleTextChange = (0, _react.useCallback)(newValue => {
@@ -34,11 +34,12 @@ const Editor = _ref => {
34
34
  }, [value]);
35
35
  const onSave = (0, _react.useCallback)(() => {
36
36
  if (!hasUnSaved.current) return;
37
- const _getPreviewContent = (0, _seafileEditor.getPreviewContent)(value),
38
- previewText = _getPreviewContent.previewText,
39
- images = _getPreviewContent.images,
40
- links = _getPreviewContent.links,
41
- checklist = _getPreviewContent.checklist;
37
+ const {
38
+ previewText,
39
+ images,
40
+ links,
41
+ checklist
42
+ } = (0, _seafileEditor.getPreviewContent)(value);
42
43
  const newValue = Object.assign({}, {
43
44
  text: value,
44
45
  preview: previewText,
@@ -48,12 +48,15 @@ class RowExpandMBLongTextEditor extends _react.default.Component {
48
48
  }
49
49
  UNSAFE_componentWillReceiveProps(nextProps) {
50
50
  var _this$editorRef, _this$editorRef$curre;
51
- const column = nextProps.column,
52
- row = nextProps.row,
53
- valueKey = nextProps.valueKey;
54
- const _this$props = this.props,
55
- currentColumn = _this$props.column,
56
- currentRow = _this$props.row;
51
+ const {
52
+ column,
53
+ row,
54
+ valueKey
55
+ } = nextProps;
56
+ const {
57
+ column: currentColumn,
58
+ row: currentRow
59
+ } = this.props;
57
60
  const value = row[column[valueKey]];
58
61
  const currentValue = currentRow[currentColumn[valueKey]];
59
62
  if (value !== currentValue && !((_this$editorRef = this.editorRef) !== null && _this$editorRef !== void 0 && (_this$editorRef$curre = _this$editorRef.current) !== null && _this$editorRef$curre !== void 0 && _this$editorRef$curre.enableEdit)) {
@@ -61,10 +64,13 @@ class RowExpandMBLongTextEditor extends _react.default.Component {
61
64
  }
62
65
  }
63
66
  render() {
64
- const column = this.props.column;
65
- const _this$state = this.state,
66
- innerHtml = _this$state.innerHtml,
67
- isShowEditor = _this$state.isShowEditor;
67
+ const {
68
+ column
69
+ } = this.props;
70
+ const {
71
+ innerHtml,
72
+ isShowEditor
73
+ } = this.state;
68
74
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
69
75
  children: [innerHtml ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
70
76
  className: "dtable-ui-mobile-long-text-formatter article py-2",
@@ -47,7 +47,9 @@ class RowExpandPCLongTextEditor extends _react.default.Component {
47
47
  this.editorRef.current.closeEditor();
48
48
  };
49
49
  this.onClick = () => {
50
- const columnIndex = this.props.columnIndex;
50
+ const {
51
+ columnIndex
52
+ } = this.props;
51
53
  this.props.updateTabIndex && this.props.updateTabIndex(columnIndex);
52
54
  };
53
55
  this.state = {
@@ -61,14 +63,17 @@ class RowExpandPCLongTextEditor extends _react.default.Component {
61
63
  }
62
64
  UNSAFE_componentWillReceiveProps(nextProps) {
63
65
  var _this$editorRef, _this$editorRef$curre;
64
- const column = nextProps.column,
65
- row = nextProps.row,
66
- nextIsEditorFocus = nextProps.isEditorFocus,
67
- valueKey = nextProps.valueKey;
68
- const _this$props = this.props,
69
- currentColumn = _this$props.column,
70
- currentRow = _this$props.row,
71
- isEditorFocus = _this$props.isEditorFocus;
66
+ const {
67
+ column,
68
+ row,
69
+ isEditorFocus: nextIsEditorFocus,
70
+ valueKey
71
+ } = nextProps;
72
+ const {
73
+ column: currentColumn,
74
+ row: currentRow,
75
+ isEditorFocus
76
+ } = this.props;
72
77
  const value = row[column[valueKey]];
73
78
  const currentValue = currentRow[currentColumn[valueKey]];
74
79
  if (value !== currentValue && !((_this$editorRef = this.editorRef) !== null && _this$editorRef !== void 0 && (_this$editorRef$curre = _this$editorRef.current) !== null && _this$editorRef$curre !== void 0 && _this$editorRef$curre.enableEdit)) {
@@ -86,13 +91,15 @@ class RowExpandPCLongTextEditor extends _react.default.Component {
86
91
  }
87
92
  }
88
93
  render() {
89
- const _this$props2 = this.props,
90
- column = _this$props2.column,
91
- longTextEditorAPI = _this$props2.longTextEditorAPI,
92
- longTextEditorI18n = _this$props2.longTextEditorI18n;
93
- const _this$state = this.state,
94
- isLoading = _this$state.isLoading,
95
- value = _this$state.value;
94
+ const {
95
+ column,
96
+ longTextEditorAPI,
97
+ longTextEditorI18n
98
+ } = this.props;
99
+ const {
100
+ isLoading,
101
+ value
102
+ } = this.state;
96
103
  if (isLoading) return null;
97
104
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Suspense, {
98
105
  fallback: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -1,12 +1,11 @@
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _reactResponsive = _interopRequireDefault(require("react-responsive"));
12
11
  var _pcEditor = _interopRequireDefault(require("./pc-editor"));
@@ -16,14 +15,16 @@ const RowExpandMultipleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((props
16
15
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
17
16
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
18
17
  query: "(min-width: 768px)",
19
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
18
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
19
+ ...props,
20
20
  ref: ref
21
- }))
21
+ })
22
22
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
23
23
  query: "(max-width: 768px)",
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
24
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
25
+ ...props,
25
26
  ref: ref
26
- }))
27
+ })
27
28
  })]
28
29
  });
29
30
  });
@@ -19,7 +19,9 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
19
19
  constructor(_props) {
20
20
  super(_props);
21
21
  this.getOptions = props => {
22
- const column = props.column;
22
+ const {
23
+ column
24
+ } = props;
23
25
  return (0, _dtableUtils.getColumnOptions)(column);
24
26
  };
25
27
  this.toggleEditor = value => {
@@ -63,7 +65,9 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
63
65
  this.props.onCommit(newValue);
64
66
  };
65
67
  this.renderOptions = () => {
66
- const value = this.state.value;
68
+ const {
69
+ value
70
+ } = this.state;
67
71
  let displayOptions = [];
68
72
  if (Array.isArray(value)) {
69
73
  const selectedOptions = this.options.filter(option => value.includes(option[this.key]));
@@ -86,7 +90,7 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
86
90
  onRemove: this.removeOption.bind(this, {
87
91
  [this.key]: optionId
88
92
  })
89
- }, "deleted-".concat(index));
93
+ }, `deleted-${index}`);
90
94
  }));
91
95
  }
92
96
  if (displayOptions.length === 0) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_addBtn.default, {
@@ -110,8 +114,10 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
110
114
  this.options = this.getOptions(_props);
111
115
  }
112
116
  UNSAFE_componentWillReceiveProps(nextProps) {
113
- const value = nextProps.value,
114
- column = nextProps.column;
117
+ const {
118
+ value,
119
+ column
120
+ } = nextProps;
115
121
  if (value !== this.props.value || !_objectUtils.default.isSameObject(column, this.props.column)) {
116
122
  this.options = this.getOptions(nextProps);
117
123
  this.setState({
@@ -121,13 +127,15 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
121
127
  }
122
128
  }
123
129
  render() {
124
- const _this$props = this.props,
125
- column = _this$props.column,
126
- isSupportNewOption = _this$props.isSupportNewOption,
127
- onAddNewOption = _this$props.onAddNewOption;
128
- const _this$state = this.state,
129
- showEditor = _this$state.showEditor,
130
- value = _this$state.value;
130
+ const {
131
+ column,
132
+ isSupportNewOption,
133
+ onAddNewOption
134
+ } = this.props;
135
+ const {
136
+ showEditor,
137
+ value
138
+ } = this.state;
131
139
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
132
140
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
133
141
  className: "dtable-ui dtable-ui-mobile-row-expand-options-editor position-relative",
@@ -18,7 +18,9 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
18
18
  constructor(_props) {
19
19
  super(_props);
20
20
  this.getOptions = props => {
21
- const column = props.column;
21
+ const {
22
+ column
23
+ } = props;
22
24
  return (0, _dtableUtils.getColumnOptions)(column);
23
25
  };
24
26
  this.onKeyDown = e => {
@@ -49,9 +51,10 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
49
51
  this.onToggleSelect = e => {
50
52
  e.preventDefault();
51
53
  e.stopPropagation();
52
- const _this$props = this.props,
53
- updateTabIndex = _this$props.updateTabIndex,
54
- columnIndex = _this$props.columnIndex;
54
+ const {
55
+ updateTabIndex,
56
+ columnIndex
57
+ } = this.props;
55
58
  updateTabIndex && updateTabIndex(columnIndex);
56
59
  this.toggleSingleSelect(true);
57
60
  };
@@ -59,9 +62,10 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
59
62
  this.toggleSingleSelect(false);
60
63
  };
61
64
  this.onFocus = () => {
62
- const _this$props2 = this.props,
63
- updateTabIndex = _this$props2.updateTabIndex,
64
- columnIndex = _this$props2.columnIndex;
65
+ const {
66
+ updateTabIndex,
67
+ columnIndex
68
+ } = this.props;
65
69
  updateTabIndex && updateTabIndex(columnIndex);
66
70
  };
67
71
  this.onChange = option => {
@@ -83,7 +87,9 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
83
87
  this.onChange(option);
84
88
  };
85
89
  this.getMultipleSelectList = () => {
86
- const value = this.state.value;
90
+ const {
91
+ value
92
+ } = this.state;
87
93
  if (!Array.isArray(value)) return [];
88
94
  const selectedOptions = this.options.filter(option => value.includes(option[this.key]));
89
95
  const selectedOptionIds = selectedOptions.map(option => option[this.key]);
@@ -140,14 +146,15 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
140
146
  })
141
147
  })
142
148
  })]
143
- }, "deleted-multiple-select-".concat(index));
149
+ }, `deleted-multiple-select-${index}`);
144
150
  }));
145
151
  };
146
152
  this.renderOptions = () => {
147
- const _this$props3 = this.props,
148
- isEditorFocus = _this$props3.isEditorFocus,
149
- classNamePrefix = _this$props3.classNamePrefix,
150
- placeholder = _this$props3.placeholder;
153
+ const {
154
+ isEditorFocus,
155
+ classNamePrefix,
156
+ placeholder
157
+ } = this.props;
151
158
  const options = this.getMultipleSelectList();
152
159
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
153
160
  tabIndex: 0,
@@ -156,19 +163,19 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
156
163
  ref: ref => this.multipleSelectOptionsRef = ref,
157
164
  className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-select-editor custom-select', {
158
165
  'focus': isEditorFocus,
159
- ["".concat(classNamePrefix, "-select-editor")]: classNamePrefix
166
+ [`${classNamePrefix}-select-editor`]: classNamePrefix
160
167
  }),
161
168
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
162
169
  className: (0, _classnames.default)('dtable-ui-row-expand-select-editor-inner', {
163
- ["".concat(classNamePrefix, "-select-editor-inner")]: classNamePrefix
170
+ [`${classNamePrefix}-select-editor-inner`]: classNamePrefix
164
171
  }),
165
172
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
166
173
  className: (0, _classnames.default)('', {
167
- ["".concat(classNamePrefix, "-select-editor-inner-container")]: classNamePrefix
174
+ [`${classNamePrefix}-select-editor-inner-container`]: classNamePrefix
168
175
  }),
169
176
  children: [options.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
170
177
  className: (0, _classnames.default)('dtable-ui-row-expand-select-options', {
171
- ["".concat(classNamePrefix, "-select-editor-options")]: classNamePrefix
178
+ [`${classNamePrefix}-select-editor-options`]: classNamePrefix
172
179
  }),
173
180
  children: options
174
181
  }), options.length === 0 && placeholder && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
@@ -194,8 +201,10 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
194
201
  document.addEventListener('keydown', this.onKeyDown);
195
202
  }
196
203
  UNSAFE_componentWillReceiveProps(nextProps) {
197
- const value = nextProps.value,
198
- column = nextProps.column;
204
+ const {
205
+ value,
206
+ column
207
+ } = nextProps;
199
208
  if (value !== this.props.value || !_objectUtils.default.isSameObject(column, this.props.column)) {
200
209
  this.options = this.getOptions(nextProps);
201
210
  this.setState({
@@ -218,14 +227,16 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
218
227
  document.removeEventListener('keydown', this.onKeyDown);
219
228
  }
220
229
  render() {
221
- const _this$props4 = this.props,
222
- column = _this$props4.column,
223
- isSupportNewOption = _this$props4.isSupportNewOption,
224
- onAddNewOption = _this$props4.onAddNewOption,
225
- classNamePrefix = _this$props4.classNamePrefix;
226
- const _this$state = this.state,
227
- showSelectPopover = _this$state.showSelectPopover,
228
- value = _this$state.value;
230
+ const {
231
+ column,
232
+ isSupportNewOption,
233
+ onAddNewOption,
234
+ classNamePrefix
235
+ } = this.props;
236
+ const {
237
+ showSelectPopover,
238
+ value
239
+ } = this.state;
229
240
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
230
241
  className: "position-relative w-100",
231
242
  ref: ref => this.ref = ref,
@@ -1,12 +1,11 @@
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _reactResponsive = _interopRequireDefault(require("react-responsive"));
12
11
  var _pcEditor = _interopRequireDefault(require("./pc-editor"));
@@ -16,14 +15,16 @@ const RowExpandNumberEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =
16
15
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
17
16
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
18
17
  query: "(min-width: 768px)",
19
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
18
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
19
+ ...props,
20
20
  ref: ref
21
- }))
21
+ })
22
22
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
23
23
  query: "(max-width: 768px)",
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
24
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
25
+ ...props,
25
26
  ref: ref
26
- }))
27
+ })
27
28
  })]
28
29
  });
29
30
  });
@@ -35,22 +35,28 @@ class RowExpandMBNumberEditor extends _react.default.Component {
35
35
  isShowEditor: false
36
36
  });
37
37
  };
38
- const column = props.column,
39
- row = props.row;
38
+ const {
39
+ column,
40
+ row
41
+ } = props;
40
42
  this.state = {
41
43
  isShowEditor: false,
42
44
  value: row[column.key]
43
45
  };
44
46
  }
45
47
  render() {
46
- const column = this.props.column;
47
- const _this$state = this.state,
48
- value = _this$state.value,
49
- isShowEditor = _this$state.isShowEditor;
48
+ const {
49
+ column
50
+ } = this.props;
51
+ const {
52
+ value,
53
+ isShowEditor
54
+ } = this.state;
50
55
  let formatValue = '';
51
56
  if (!isShowEditor && (0, _dtableUtils.isNumber)(value)) {
52
- const _column$data = column.data,
53
- data = _column$data === void 0 ? {} : _column$data;
57
+ const {
58
+ data = {}
59
+ } = column;
54
60
  formatValue = (0, _dtableUtils.getNumberDisplayString)(value, data);
55
61
  }
56
62
  const dom = isShowEditor ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_NumberEditor.default, {