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
@@ -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 _reactstrap = require("reactstrap");
12
11
  var _lang = require("../../lang");
@@ -15,12 +14,14 @@ var _IconButton = _interopRequireDefault(require("../../IconButton"));
15
14
  require("./index.css");
16
15
  var _jsxRuntime = require("react/jsx-runtime");
17
16
  const Header = _ref => {
18
- let title = _ref.title,
19
- columns = _ref.columns,
20
- row = _ref.row,
21
- onToggle = _ref.onToggle,
22
- copyURL = _ref.copyURL,
23
- children = _ref.children;
17
+ let {
18
+ title,
19
+ columns,
20
+ row,
21
+ onToggle,
22
+ copyURL,
23
+ children
24
+ } = _ref;
24
25
  const renderTitle = (0, _react.useCallback)(() => {
25
26
  const props = {
26
27
  columns,
@@ -28,7 +29,9 @@ const Header = _ref => {
28
29
  };
29
30
  const CustomTitle = title;
30
31
  if (/*#__PURE__*/_react.default.isValidElement(CustomTitle)) return /*#__PURE__*/_react.default.cloneElement(CustomTitle, props);
31
- if ((0, _utils.isFunction)(CustomTitle)) return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTitle, (0, _objectSpread2.default)({}, props));
32
+ if ((0, _utils.isFunction)(CustomTitle)) return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTitle, {
33
+ ...props
34
+ });
32
35
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
33
36
  className: "dtable-ui-row-expand-header-title text-truncate",
34
37
  children: title
@@ -6,9 +6,6 @@ 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
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
12
9
  var _react = _interopRequireWildcard(require("react"));
13
10
  var _classnames = _interopRequireDefault(require("classnames"));
14
11
  var _reactstrap = require("reactstrap");
@@ -21,50 +18,32 @@ var _lang = require("../lang");
21
18
  var _cellComparer = require("../utils/cell-comparer");
22
19
  require("./index.css");
23
20
  var _jsxRuntime = require("react/jsx-runtime");
24
- const _excluded = ["saveImmediately", "readonly", "isInsertingRow", "zIndex", "title", "className", "valueKey", "layout", "row", "columns", "commit", "onToggle", "uploadFile", "copyURL", "children"];
25
21
  const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
26
- let _ref$saveImmediately = _ref.saveImmediately,
27
- saveImmediately = _ref$saveImmediately === void 0 ? true : _ref$saveImmediately,
28
- _ref$readonly = _ref.readonly,
29
- readonly = _ref$readonly === void 0 ? false : _ref$readonly,
30
- _ref$isInsertingRow = _ref.isInsertingRow,
31
- isInsertingRow = _ref$isInsertingRow === void 0 ? false : _ref$isInsertingRow,
32
- zIndex = _ref.zIndex,
33
- title = _ref.title,
34
- className = _ref.className,
35
- _ref$valueKey = _ref.valueKey,
36
- valueKey = _ref$valueKey === void 0 ? 'name' : _ref$valueKey,
37
- _ref$layout = _ref.layout,
38
- layout = _ref$layout === void 0 ? 'horizontal' : _ref$layout,
39
- defaultRow = _ref.row,
40
- defaultColumns = _ref.columns,
41
- commit = _ref.commit,
42
- onToggle = _ref.onToggle,
43
- uploadFile = _ref.uploadFile,
44
- copyURL = _ref.copyURL,
45
- _ref$children = _ref.children,
46
- children = _ref$children === void 0 ? [] : _ref$children,
47
- otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
48
- const _useState = (0, _react.useState)(false),
49
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
50
- isAnimationEnd = _useState2[0],
51
- setAnimationEnd = _useState2[1];
52
- const _useState3 = (0, _react.useState)(true),
53
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
54
- isLoading = _useState4[0],
55
- setLoading = _useState4[1];
56
- const _useState5 = (0, _react.useState)(false),
57
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
58
- isSaving = _useState6[0],
59
- setSaving = _useState6[1];
60
- const _useState7 = (0, _react.useState)({}),
61
- _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
62
- row = _useState8[0],
63
- setRow = _useState8[1];
64
- const _useState9 = (0, _react.useState)([]),
65
- _useState0 = (0, _slicedToArray2.default)(_useState9, 2),
66
- columns = _useState0[0],
67
- setColumns = _useState0[1];
22
+ let {
23
+ saveImmediately = true,
24
+ readonly = false,
25
+ isInsertingRow = false,
26
+ zIndex,
27
+ title,
28
+ className,
29
+ valueKey = 'name',
30
+ // name or key
31
+ layout = 'horizontal',
32
+ // horizontal or vertical
33
+ row: defaultRow,
34
+ columns: defaultColumns,
35
+ commit,
36
+ onToggle,
37
+ uploadFile,
38
+ copyURL,
39
+ children = [],
40
+ ...otherProps
41
+ } = _ref;
42
+ const [isAnimationEnd, setAnimationEnd] = (0, _react.useState)(false);
43
+ const [isLoading, setLoading] = (0, _react.useState)(true);
44
+ const [isSaving, setSaving] = (0, _react.useState)(false);
45
+ const [row, setRow] = (0, _react.useState)({});
46
+ const [columns, setColumns] = (0, _react.useState)([]);
68
47
  const modalRef = (0, _react.useRef)(null);
69
48
  const isChangedRef = (0, _react.useRef)(false);
70
49
  const update = (0, _react.useRef)({});
@@ -99,7 +78,8 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
99
78
  const initRowData = (0, _react.useCallback)(() => {
100
79
  setLoading(true);
101
80
  setRow(defaultRow);
102
- let validColumns = defaultColumns.map(c => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, c), {}, {
81
+ let validColumns = defaultColumns.map(c => ({
82
+ ...c,
103
83
  editable: checkEditable(c, defaultRow),
104
84
  width: 320
105
85
  }));
@@ -115,9 +95,10 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
115
95
  onToggle();
116
96
  }, [isSaving, onToggle]);
117
97
  const onSave = (0, _react.useCallback)(function (updated) {
118
- let _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
119
- successCallback = _ref2.successCallback,
120
- failCallback = _ref2.failCallback;
98
+ let {
99
+ successCallback,
100
+ failCallback
101
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
121
102
  commit(updated, columns, {
122
103
  successCallback,
123
104
  failCallback
@@ -132,15 +113,24 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
132
113
  if (!(0, _cellComparer.isCellValueChanged)(oldValue, value, column.type)) return;
133
114
  if (!saveImmediately || isInsertingRow) {
134
115
  isChangedRef.current = true;
135
- update.current = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, update.current), updated);
136
- setRow((0, _objectSpread2.default)((0, _objectSpread2.default)({}, row), updated));
116
+ update.current = {
117
+ ...update.current,
118
+ ...updated
119
+ };
120
+ setRow({
121
+ ...row,
122
+ ...updated
123
+ });
137
124
  return;
138
125
  }
139
126
  onSave(updated, {
140
127
  successCallback: () => {
141
128
  isChangedRef.current = false;
142
129
  update.current = {};
143
- setRow((0, _objectSpread2.default)((0, _objectSpread2.default)({}, row), updated));
130
+ setRow({
131
+ ...row,
132
+ ...updated
133
+ });
144
134
  },
145
135
  failCallback: () => {
146
136
  _toaster.default.danger((0, _lang.getLocale)('Save_failed'));
@@ -158,7 +148,10 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
158
148
  setSaving(false);
159
149
  _toaster.default.danger((0, _lang.getLocale)('Save_failed'));
160
150
  };
161
- const newRow = isInsertingRow ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, row), update.current) : update.current;
151
+ const newRow = isInsertingRow ? {
152
+ ...row,
153
+ ...update.current
154
+ } : update.current;
162
155
  onSave(newRow, {
163
156
  successCallback,
164
157
  failCallback
@@ -168,13 +161,15 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
168
161
  // use setTimeout to make sure real dom rendered
169
162
  setTimeout(() => {
170
163
  let dom = modalRef.current.firstChild;
171
- const width = style.width,
172
- maxWidth = style.maxWidth,
173
- marginLeft = style.marginLeft,
174
- height = style.height;
175
- dom.style.width = "".concat(width, "px");
176
- dom.style.maxWidth = "".concat(maxWidth, "px");
177
- dom.style.marginLeft = "".concat(marginLeft, "px");
164
+ const {
165
+ width,
166
+ maxWidth,
167
+ marginLeft,
168
+ height
169
+ } = style;
170
+ dom.style.width = `${width}px`;
171
+ dom.style.maxWidth = `${maxWidth}px`;
172
+ dom.style.marginLeft = `${marginLeft}px`;
178
173
  dom.style.height = height;
179
174
  dom.style.marginRight = 'unset';
180
175
  dom.style.marginTop = '28px';
@@ -228,7 +223,8 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
228
223
  copyURL: copyURL,
229
224
  onToggle: toggle,
230
225
  children: children[0]
231
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_body.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherProps), {}, {
226
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_body.default, {
227
+ ...otherProps,
232
228
  row: row,
233
229
  columns: columns,
234
230
  valueKey: valueKey,
@@ -236,7 +232,7 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
236
232
  uploadFile: uploadFile,
237
233
  onToggle: onToggle,
238
234
  children: children[1]
239
- })), (!saveImmediately || isInsertingRow) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.ModalFooter, {
235
+ }), (!saveImmediately || isInsertingRow) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.ModalFooter, {
240
236
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Button, {
241
237
  onClick: toggle,
242
238
  color: "secondary",
@@ -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 _pcAddBtn = _interopRequireDefault(require("./pc-add-btn"));
@@ -16,14 +15,16 @@ const RowExpandAddBtn = /*#__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)(_pcAddBtn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
18
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcAddBtn.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)(_mbAddBtn.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
24
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbAddBtn.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 _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"));
@@ -17,14 +16,16 @@ const RowExpandCheckboxEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
17
16
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
18
17
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
19
18
  query: "(min-width: 768px)",
20
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
19
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
20
+ ...props,
21
21
  ref: ref
22
- }))
22
+ })
23
23
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
24
24
  query: "(max-width: 768px)",
25
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
25
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
26
+ ...props,
26
27
  ref: ref
27
- }))
28
+ })
28
29
  })]
29
30
  });
30
31
  });
@@ -19,10 +19,11 @@ class RowExpandMBCheckboxEditor extends _react.default.Component {
19
19
  this.editor = null;
20
20
  }
21
21
  render() {
22
- const _this$props = this.props,
23
- column = _this$props.column,
24
- value = _this$props.value,
25
- className = _this$props.className;
22
+ const {
23
+ column,
24
+ value,
25
+ className
26
+ } = this.props;
26
27
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
27
28
  className: (0, _classnames.default)('dtable-ui-mobile-row-expand-checkbox-editor-container', className),
28
29
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckboxEditor.default, {
@@ -13,19 +13,21 @@ class RowExpandPCCheckboxEditor extends _react.default.Component {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.onCommit = newValue => {
16
- const _this$props = this.props,
17
- columnIndex = _this$props.columnIndex,
18
- updateTabIndex = _this$props.updateTabIndex,
19
- onCommit = _this$props.onCommit;
16
+ const {
17
+ columnIndex,
18
+ updateTabIndex,
19
+ onCommit
20
+ } = this.props;
20
21
  updateTabIndex && updateTabIndex(columnIndex);
21
22
  onCommit && onCommit(newValue);
22
23
  };
23
24
  }
24
25
  render() {
25
- const _this$props2 = this.props,
26
- isEditorFocus = _this$props2.isEditorFocus,
27
- column = _this$props2.column,
28
- value = _this$props2.value;
26
+ const {
27
+ isEditorFocus,
28
+ column,
29
+ value
30
+ } = this.props;
29
31
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckboxEditor.default, {
30
32
  className: "dtable-ui-row-expand-checkbox-editor mt-2",
31
33
  column: column,
@@ -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 RowExpandCollaboratorEditor = /*#__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
  });
@@ -17,16 +17,19 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
17
17
  constructor(_props) {
18
18
  super(_props);
19
19
  this.initCollaborators = props => {
20
- const row = props.row,
21
- column = props.column,
22
- valueKey = props.valueKey;
20
+ const {
21
+ row,
22
+ column,
23
+ valueKey
24
+ } = props;
23
25
  const emails = row[column[valueKey]] || [];
24
26
  props.queryCollaborators && props.queryCollaborators(emails);
25
27
  };
26
28
  this.getCollaborators = () => {
27
- const _this$props = this.props,
28
- getCollaborators = _this$props.getCollaborators,
29
- collaborators = _this$props.collaborators;
29
+ const {
30
+ getCollaborators,
31
+ collaborators
32
+ } = this.props;
30
33
  if (getCollaborators) return getCollaborators();
31
34
  return collaborators || [];
32
35
  };
@@ -66,13 +69,16 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
66
69
  this.props.onCommit(newValue);
67
70
  };
68
71
  this.renderCollaborators = value => {
69
- const emailCollaboratorMap = this.state.emailCollaboratorMap;
72
+ const {
73
+ emailCollaboratorMap
74
+ } = this.state;
70
75
  if (Array.isArray(value) && value.length > 0) {
71
76
  return value.map((email, index) => {
72
77
  let collaborator = emailCollaboratorMap[email];
73
78
  if (collaborator) {
74
- const _collaborator = collaborator,
75
- email = _collaborator.email;
79
+ const {
80
+ email
81
+ } = collaborator;
76
82
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
77
83
  collaborator: collaborator
78
84
  }, email);
@@ -92,10 +98,11 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
92
98
  text: (0, _lang.getLocale)('Add_collaborator')
93
99
  });
94
100
  };
95
- const _this$props2 = this.props,
96
- _row = _this$props2.row,
97
- _column = _this$props2.column,
98
- _valueKey = _this$props2.valueKey;
101
+ const {
102
+ row: _row,
103
+ column: _column,
104
+ valueKey: _valueKey
105
+ } = this.props;
99
106
  this.state = {
100
107
  menuPosition: null,
101
108
  value: _row[_column[_valueKey]] || [],
@@ -113,9 +120,11 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
113
120
  }
114
121
  }
115
122
  UNSAFE_componentWillReceiveProps(nextProps) {
116
- const column = nextProps.column,
117
- row = nextProps.row,
118
- valueKey = nextProps.valueKey;
123
+ const {
124
+ column,
125
+ row,
126
+ valueKey
127
+ } = nextProps;
119
128
  if (row._id !== this.props.row._id) {
120
129
  this.initCollaborators(nextProps);
121
130
  this.setState({
@@ -130,12 +139,14 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
130
139
  }
131
140
  }
132
141
  render() {
133
- const _this$props3 = this.props,
134
- collaborators = _this$props3.collaborators,
135
- column = _this$props3.column;
136
- const _this$state = this.state,
137
- showEditor = _this$state.showEditor,
138
- value = _this$state.value;
142
+ const {
143
+ collaborators,
144
+ column
145
+ } = this.props;
146
+ const {
147
+ showEditor,
148
+ value
149
+ } = this.state;
139
150
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
140
151
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
141
152
  className: "dtable-ui dtable-ui-mobile-row-expand-collaborators position-relative",
@@ -17,16 +17,19 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
17
17
  constructor(_props) {
18
18
  super(_props);
19
19
  this.initCollaborators = props => {
20
- const row = props.row,
21
- column = props.column,
22
- valueKey = props.valueKey;
20
+ const {
21
+ row,
22
+ column,
23
+ valueKey
24
+ } = props;
23
25
  const emails = row[column[valueKey]] || [];
24
26
  props.queryCollaborators && props.queryCollaborators(emails);
25
27
  };
26
28
  this.getCollaborators = () => {
27
- const _this$props = this.props,
28
- getCollaborators = _this$props.getCollaborators,
29
- collaborators = _this$props.collaborators;
29
+ const {
30
+ getCollaborators,
31
+ collaborators
32
+ } = this.props;
30
33
  if (getCollaborators) return getCollaborators();
31
34
  return collaborators || [];
32
35
  };
@@ -87,7 +90,9 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
87
90
  this.props.onCommit(newValue);
88
91
  };
89
92
  this.removeCollaborator = index => {
90
- let value = this.state.value;
93
+ let {
94
+ value
95
+ } = this.state;
91
96
  let newValue = value.slice(0);
92
97
  newValue.splice(index, 1);
93
98
  this.setState({
@@ -96,10 +101,13 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
96
101
  this.props.onCommit(newValue);
97
102
  };
98
103
  this.renderSelectedCollaborators = () => {
99
- const isEditorFocus = this.props.isEditorFocus;
100
- const _this$state = this.state,
101
- value = _this$state.value,
102
- emailCollaboratorMap = _this$state.emailCollaboratorMap;
104
+ const {
105
+ isEditorFocus
106
+ } = this.props;
107
+ const {
108
+ value,
109
+ emailCollaboratorMap
110
+ } = this.state;
103
111
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
104
112
  tabIndex: 0,
105
113
  onFocus: this.onFocus,
@@ -116,8 +124,9 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
116
124
  children: value.map((email, index) => {
117
125
  let collaborator = emailCollaboratorMap[email];
118
126
  if (collaborator) {
119
- const _collaborator = collaborator,
120
- email = _collaborator.email;
127
+ const {
128
+ email
129
+ } = collaborator;
121
130
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
122
131
  collaborator: collaborator,
123
132
  enableDeleteCollaborator: true,
@@ -144,10 +153,11 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
144
153
  })
145
154
  });
146
155
  };
147
- const _this$props2 = this.props,
148
- _row = _this$props2.row,
149
- _column = _this$props2.column,
150
- _valueKey = _this$props2.valueKey;
156
+ const {
157
+ row: _row,
158
+ column: _column,
159
+ valueKey: _valueKey
160
+ } = this.props;
151
161
  this.state = {
152
162
  menuPosition: null,
153
163
  value: _row[_column[_valueKey]] || [],
@@ -167,9 +177,11 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
167
177
  }
168
178
  }
169
179
  UNSAFE_componentWillReceiveProps(nextProps) {
170
- const column = nextProps.column,
171
- row = nextProps.row,
172
- valueKey = nextProps.valueKey;
180
+ const {
181
+ column,
182
+ row,
183
+ valueKey
184
+ } = nextProps;
173
185
  if (row._id !== this.props.row._id) {
174
186
  this.initCollaborators(nextProps);
175
187
  this.setState({
@@ -196,12 +208,14 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
196
208
  document.removeEventListener('keydown', this.onKeyDown);
197
209
  }
198
210
  render() {
199
- const _this$props3 = this.props,
200
- collaborators = _this$props3.collaborators,
201
- column = _this$props3.column;
202
- const _this$state2 = this.state,
203
- showCollaboratorSelect = _this$state2.showCollaboratorSelect,
204
- value = _this$state2.value;
211
+ const {
212
+ collaborators,
213
+ column
214
+ } = this.props;
215
+ const {
216
+ showCollaboratorSelect,
217
+ value
218
+ } = this.state;
205
219
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
206
220
  className: "position-relative mt-1 w-100",
207
221
  ref: ref => this.collaboratorSelectRef = 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 RowExpandDateEditor = /*#__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
  });