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
@@ -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 _rightAngle = _interopRequireDefault(require("../right-angle"));
12
11
  var _addBtn = _interopRequireDefault(require("../add-btn"));
@@ -15,20 +14,16 @@ var _DepartmentSingleSelectEditor = _interopRequireDefault(require("../../Depart
15
14
  var _lang = require("../../lang");
16
15
  var _jsxRuntime = require("react/jsx-runtime");
17
16
  const RowExpandMBDepartmentEditor = _ref => {
18
- let row = _ref.row,
19
- column = _ref.column,
20
- valueKey = _ref.valueKey,
21
- departments = _ref.departments,
22
- userDepartmentIdsMap = _ref.userDepartmentIdsMap,
23
- onCommit = _ref.onCommit;
24
- const _useState = (0, _react.useState)(row[column[valueKey]] || ''),
25
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
26
- value = _useState2[0],
27
- setValue = _useState2[1];
28
- const _useState3 = (0, _react.useState)(false),
29
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
30
- showEditor = _useState4[0],
31
- setShowEditor = _useState4[1];
17
+ let {
18
+ row,
19
+ column,
20
+ valueKey,
21
+ departments,
22
+ userDepartmentIdsMap,
23
+ onCommit
24
+ } = _ref;
25
+ const [value, setValue] = (0, _react.useState)(row[column[valueKey]] || '');
26
+ const [showEditor, setShowEditor] = (0, _react.useState)(false);
32
27
  const openEditor = (0, _react.useCallback)(() => {
33
28
  setShowEditor(true);
34
29
  }, []);
@@ -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 _classnames = _interopRequireDefault(require("classnames"));
12
11
  var _DepartmentSingleSelectFormatter = _interopRequireDefault(require("../../DepartmentSingleSelectFormatter"));
@@ -14,23 +13,19 @@ var _constants = require("../../constants");
14
13
  var _DepartmentSingleSelectEditor = _interopRequireDefault(require("../../DepartmentSingleSelectEditor"));
15
14
  var _jsxRuntime = require("react/jsx-runtime");
16
15
  const RowExpandPCDepartmentEditor = _ref => {
17
- let row = _ref.row,
18
- column = _ref.column,
19
- valueKey = _ref.valueKey,
20
- departments = _ref.departments,
21
- userDepartmentIdsMap = _ref.userDepartmentIdsMap,
22
- isEditorFocus = _ref.isEditorFocus,
23
- columnIndex = _ref.columnIndex,
24
- onCommit = _ref.onCommit,
25
- updateTabIndex = _ref.updateTabIndex;
26
- const _useState = (0, _react.useState)(row[column[valueKey]] || ''),
27
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
28
- value = _useState2[0],
29
- setValue = _useState2[1];
30
- const _useState3 = (0, _react.useState)(false),
31
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
32
- showEditor = _useState4[0],
33
- setShowEditor = _useState4[1];
16
+ let {
17
+ row,
18
+ column,
19
+ valueKey,
20
+ departments,
21
+ userDepartmentIdsMap,
22
+ isEditorFocus,
23
+ columnIndex,
24
+ onCommit,
25
+ updateTabIndex
26
+ } = _ref;
27
+ const [value, setValue] = (0, _react.useState)(row[column[valueKey]] || '');
28
+ const [showEditor, setShowEditor] = (0, _react.useState)(false);
34
29
  const departmentSelectContainer = (0, _react.useRef)(null);
35
30
  const departmentSelectContent = (0, _react.useRef)(null);
36
31
  const onKeyDown = (0, _react.useCallback)(event => {
@@ -31,17 +31,21 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
31
31
  });
32
32
  };
33
33
  this.getValue = () => {
34
- const _this$props = this.props,
35
- column = _this$props.column,
36
- row = _this$props.row,
37
- valueKey = _this$props.valueKey;
38
- const updated = this.state.updated;
34
+ const {
35
+ column,
36
+ row,
37
+ valueKey
38
+ } = this.props;
39
+ const {
40
+ updated
41
+ } = this.state;
39
42
  return updated ? updated : row[column[valueKey]];
40
43
  };
41
44
  this.deleteImage = () => {
42
- const _this$props2 = this.props,
43
- column = _this$props2.column,
44
- onCommit = _this$props2.onCommit;
45
+ const {
46
+ column,
47
+ onCommit
48
+ } = this.props;
45
49
  const updated = {
46
50
  [column.key]: null
47
51
  };
@@ -51,7 +55,9 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
51
55
  });
52
56
  };
53
57
  this.getSignImages = () => {
54
- const config = this.props.config;
58
+ const {
59
+ config
60
+ } = this.props;
55
61
  const value = this.getValue();
56
62
  const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
57
63
  partUrl: _utils.default.getSignImageUrl(value)
@@ -59,10 +65,13 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
59
65
  return [signImageUrl].filter(Boolean);
60
66
  };
61
67
  this.renderSignature = signImages => {
62
- const _this$props3 = this.props,
63
- column = _this$props3.column,
64
- config = _this$props3.config;
65
- const key = column.key;
68
+ const {
69
+ column,
70
+ config
71
+ } = this.props;
72
+ const {
73
+ key
74
+ } = column;
66
75
  return signImages.map((src, index) => {
67
76
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
68
77
  index: index,
@@ -81,9 +90,11 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
81
90
  };
82
91
  }
83
92
  UNSAFE_componentWillReceiveProps(nextProps) {
84
- const column = nextProps.column,
85
- row = nextProps.row,
86
- valueKey = nextProps.valueKey;
93
+ const {
94
+ column,
95
+ row,
96
+ valueKey
97
+ } = nextProps;
87
98
  if (row._id !== this.props.row._id) {
88
99
  this.setState({
89
100
  updated: row[column[valueKey]] || [],
@@ -92,10 +103,13 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
92
103
  }
93
104
  }
94
105
  render() {
95
- const _this$props4 = this.props,
96
- config = _this$props4.config,
97
- column = _this$props4.column;
98
- const isShowEditor = this.state.isShowEditor;
106
+ const {
107
+ config,
108
+ column
109
+ } = this.props;
110
+ const {
111
+ isShowEditor
112
+ } = this.state;
99
113
  const signImages = this.getSignImages();
100
114
  const signImageExisted = Array.isArray(signImages) && signImages.length > 0;
101
115
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
@@ -62,17 +62,21 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
62
62
  this.props.onCommit(value);
63
63
  };
64
64
  this.getValue = () => {
65
- const _this$props = this.props,
66
- column = _this$props.column,
67
- row = _this$props.row,
68
- valueKey = _this$props.valueKey;
69
- const updated = this.state.updated;
65
+ const {
66
+ column,
67
+ row,
68
+ valueKey
69
+ } = this.props;
70
+ const {
71
+ updated
72
+ } = this.state;
70
73
  return updated ? updated : row[column[valueKey]];
71
74
  };
72
75
  this.deleteImage = () => {
73
- const _this$props2 = this.props,
74
- column = _this$props2.column,
75
- onCommit = _this$props2.onCommit;
76
+ const {
77
+ column,
78
+ onCommit
79
+ } = this.props;
76
80
  const updated = {
77
81
  [column.key]: null
78
82
  };
@@ -82,7 +86,9 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
82
86
  });
83
87
  };
84
88
  this.getSignImages = () => {
85
- const config = this.props.config;
89
+ const {
90
+ config
91
+ } = this.props;
86
92
  const value = this.getValue();
87
93
  const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
88
94
  partUrl: _utils.default.getSignImageUrl(value)
@@ -100,8 +106,12 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
100
106
  this.setLargeImageIndex(-1);
101
107
  };
102
108
  this.renderSignature = signImages => {
103
- const column = this.props.column;
104
- const key = column.key;
109
+ const {
110
+ column
111
+ } = this.props;
112
+ const {
113
+ key
114
+ } = column;
105
115
  return signImages.map((src, index) => {
106
116
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
107
117
  index: index,
@@ -124,9 +134,11 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
124
134
  document.addEventListener('keydown', this.onKeyDown);
125
135
  }
126
136
  UNSAFE_componentWillReceiveProps(nextProps) {
127
- const column = nextProps.column,
128
- row = nextProps.row,
129
- valueKey = nextProps.valueKey;
137
+ const {
138
+ column,
139
+ row,
140
+ valueKey
141
+ } = nextProps;
130
142
  if (row._id !== this.props.row._id) {
131
143
  this.setState({
132
144
  updated: row[column[valueKey]] || [],
@@ -150,13 +162,15 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
150
162
  document.removeEventListener('keydown', this.onKeyDown);
151
163
  }
152
164
  render() {
153
- const _this$props3 = this.props,
154
- config = _this$props3.config,
155
- column = _this$props3.column,
156
- isEditorFocus = _this$props3.isEditorFocus;
157
- const _this$state = this.state,
158
- isShowEditor = _this$state.isShowEditor,
159
- largeImageIndex = _this$state.largeImageIndex;
165
+ const {
166
+ config,
167
+ column,
168
+ isEditorFocus
169
+ } = this.props;
170
+ const {
171
+ isShowEditor,
172
+ largeImageIndex
173
+ } = this.state;
160
174
  const signImages = this.getSignImages();
161
175
  const signImageExisted = Array.isArray(signImages) && signImages.length > 0;
162
176
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -24,18 +24,22 @@ class RowExpandMBDurationEditor extends _react.default.Component {
24
24
  isShowEditor: false
25
25
  });
26
26
  };
27
- let row = props.row,
28
- column = props.column,
29
- valueKey = props.valueKey;
27
+ let {
28
+ row,
29
+ column,
30
+ valueKey
31
+ } = props;
30
32
  this.state = {
31
33
  isShowEditor: false,
32
34
  value: row[column[valueKey]]
33
35
  };
34
36
  }
35
37
  UNSAFE_componentWillReceiveProps(nextProps) {
36
- const column = nextProps.column,
37
- row = nextProps.row,
38
- valueKey = nextProps.valueKey;
38
+ const {
39
+ column,
40
+ row,
41
+ valueKey
42
+ } = nextProps;
39
43
  if (row._id !== this.props.row._id) {
40
44
  this.setState({
41
45
  value: row[column[valueKey]],
@@ -44,10 +48,13 @@ class RowExpandMBDurationEditor extends _react.default.Component {
44
48
  }
45
49
  }
46
50
  render() {
47
- const column = this.props.column;
48
- const _this$state = this.state,
49
- value = _this$state.value,
50
- isShowEditor = _this$state.isShowEditor;
51
+ const {
52
+ column
53
+ } = this.props;
54
+ const {
55
+ value,
56
+ isShowEditor
57
+ } = this.state;
51
58
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
52
59
  className: "dtable-ui-mobile-row-expand-input-editor-container",
53
60
  children: isShowEditor ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_DurationEditor.default, {
@@ -34,9 +34,11 @@ class RowExpandPCDurationEditor extends _react.default.Component {
34
34
  isShowEditor: false
35
35
  });
36
36
  };
37
- let row = props.row,
38
- column = props.column,
39
- valueKey = props.valueKey;
37
+ let {
38
+ row,
39
+ column,
40
+ valueKey
41
+ } = props;
40
42
  this.state = {
41
43
  isShowEditor: false,
42
44
  value: row[column[valueKey]]
@@ -46,9 +48,11 @@ class RowExpandPCDurationEditor extends _react.default.Component {
46
48
  document.addEventListener('keydown', this.onKeyDown);
47
49
  }
48
50
  UNSAFE_componentWillReceiveProps(nextProps) {
49
- const column = nextProps.column,
50
- row = nextProps.row,
51
- valueKey = nextProps.valueKey;
51
+ const {
52
+ column,
53
+ row,
54
+ valueKey
55
+ } = nextProps;
52
56
  if (row._id !== this.props.row._id) {
53
57
  this.setState({
54
58
  value: row[column[valueKey]],
@@ -69,13 +73,15 @@ class RowExpandPCDurationEditor extends _react.default.Component {
69
73
  document.removeEventListener('keydown', this.onKeyDown);
70
74
  }
71
75
  render() {
72
- let _this$props = this.props,
73
- column = _this$props.column,
74
- isEditorFocus = _this$props.isEditorFocus,
75
- isInModal = _this$props.isInModal;
76
- let _this$state = this.state,
77
- value = _this$state.value,
78
- isShowEditor = _this$state.isShowEditor;
76
+ let {
77
+ column,
78
+ isEditorFocus,
79
+ isInModal
80
+ } = this.props;
81
+ let {
82
+ value,
83
+ isShowEditor
84
+ } = this.state;
79
85
  let style = {
80
86
  width: 320
81
87
  };
@@ -12,7 +12,9 @@ class RowExpandMBEmailEditor extends _react.default.Component {
12
12
  constructor(props) {
13
13
  super(props);
14
14
  this.onBlur = () => {
15
- const onCommit = this.props.onCommit;
15
+ const {
16
+ onCommit
17
+ } = this.props;
16
18
  const updated = this.state.value.trim();
17
19
  onCommit(updated);
18
20
  };
@@ -30,21 +32,27 @@ class RowExpandMBEmailEditor extends _react.default.Component {
30
32
  e.stopPropagation();
31
33
  };
32
34
  this.onOpenEmailLink = () => {
33
- const value = this.state.value;
35
+ const {
36
+ value
37
+ } = this.state;
34
38
  let newValue = value.trim();
35
39
  window.location.href = "mailto:".concat(newValue);
36
40
  };
37
- const row = props.row,
38
- column = props.column,
39
- valueKey = props.valueKey;
41
+ const {
42
+ row,
43
+ column,
44
+ valueKey
45
+ } = props;
40
46
  this.state = {
41
47
  value: row[column[valueKey]] || ''
42
48
  };
43
49
  }
44
50
  UNSAFE_componentWillReceiveProps(nextProps) {
45
- const column = nextProps.column,
46
- row = nextProps.row,
47
- valueKey = nextProps.valueKey;
51
+ const {
52
+ column,
53
+ row,
54
+ valueKey
55
+ } = nextProps;
48
56
  if (row._id !== this.props.row._id) {
49
57
  this.setState({
50
58
  value: row[column[valueKey]] || ''
@@ -52,7 +60,9 @@ class RowExpandMBEmailEditor extends _react.default.Component {
52
60
  }
53
61
  }
54
62
  render() {
55
- const value = this.state.value;
63
+ const {
64
+ value
65
+ } = this.state;
56
66
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
57
67
  className: "dtable-ui-mobile-row-expand-input-editor-container position-relative dtable-ui-mobile-row-expand-url-editor-container",
58
68
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
@@ -24,7 +24,9 @@ class RowExpandPCEmailEditor extends _react.default.Component {
24
24
  }, 1);
25
25
  };
26
26
  this.onBlur = () => {
27
- const onCommit = this.props.onCommit;
27
+ const {
28
+ onCommit
29
+ } = this.props;
28
30
  const updated = this.state.value.trim();
29
31
  onCommit(updated);
30
32
  };
@@ -50,22 +52,27 @@ class RowExpandPCEmailEditor extends _react.default.Component {
50
52
  this.blurInput();
51
53
  return;
52
54
  }
53
- const _event$currentTarget = event.currentTarget,
54
- selectionStart = _event$currentTarget.selectionStart,
55
- selectionEnd = _event$currentTarget.selectionEnd,
56
- value = _event$currentTarget.value;
55
+ const {
56
+ selectionStart,
57
+ selectionEnd,
58
+ value
59
+ } = event.currentTarget;
57
60
  if (event.keyCode === _constants.KeyCodes.ChineseInputMethod || event.keyCode === _constants.KeyCodes.LeftArrow && selectionStart === 0 || event.keyCode === _constants.KeyCodes.RightArrow && selectionEnd === value.length) {
58
61
  event.stopPropagation();
59
62
  }
60
63
  };
61
64
  this.onOpenEmailLink = () => {
62
- const value = this.state.value;
65
+ const {
66
+ value
67
+ } = this.state;
63
68
  let newValue = value.trim();
64
69
  window.location.href = "mailto:".concat(newValue);
65
70
  };
66
- const row = props.row,
67
- column = props.column,
68
- valueKey = props.valueKey;
71
+ const {
72
+ row,
73
+ column,
74
+ valueKey
75
+ } = props;
69
76
  this.state = {
70
77
  value: row[column[valueKey]] || ''
71
78
  };
@@ -76,9 +83,11 @@ class RowExpandPCEmailEditor extends _react.default.Component {
76
83
  }
77
84
  }
78
85
  UNSAFE_componentWillReceiveProps(nextProps) {
79
- const column = nextProps.column,
80
- row = nextProps.row,
81
- valueKey = nextProps.valueKey;
86
+ const {
87
+ column,
88
+ row,
89
+ valueKey
90
+ } = nextProps;
82
91
  if (row._id !== this.props.row._id) {
83
92
  this.setState({
84
93
  value: row[column[valueKey]] || ''
@@ -91,7 +100,9 @@ class RowExpandPCEmailEditor extends _react.default.Component {
91
100
  }
92
101
  }
93
102
  render() {
94
- let value = this.state.value;
103
+ let {
104
+ value
105
+ } = this.state;
95
106
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
96
107
  className: "dtable-ui-row-expand-url-editor",
97
108
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
@@ -32,17 +32,24 @@ class RowExpandMBFileEditor extends _react.default.Component {
32
32
  this.props.onCommit(value);
33
33
  };
34
34
  this.deleteFile = index => {
35
- const value = this.state.value;
35
+ const {
36
+ value
37
+ } = this.state;
36
38
  const newValue = value.slice(0);
37
39
  newValue.splice(index, 1);
38
40
  this.onCommit(newValue);
39
41
  };
40
42
  this.renderFiles = () => {
41
- const value = this.state.value;
42
- const config = this.props.config;
43
+ const {
44
+ value
45
+ } = this.state;
46
+ const {
47
+ config
48
+ } = this.props;
43
49
  return value.map((file, index) => {
44
- const _getFileThumbnailInfo = (0, _url.getFileThumbnailInfo)(file),
45
- fileIconUrl = _getFileThumbnailInfo.fileIconUrl;
50
+ const {
51
+ fileIconUrl
52
+ } = (0, _url.getFileThumbnailInfo)(file);
46
53
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
47
54
  src: fileIconUrl,
48
55
  name: file.name,
@@ -55,9 +62,11 @@ class RowExpandMBFileEditor extends _react.default.Component {
55
62
  }, 'file-' + index);
56
63
  });
57
64
  };
58
- const column = props.column,
59
- row = props.row,
60
- valueKey = props.valueKey;
65
+ const {
66
+ column,
67
+ row,
68
+ valueKey
69
+ } = props;
61
70
  this.state = {
62
71
  isShowEditor: false,
63
72
  value: row[column[valueKey]] || []
@@ -65,9 +74,11 @@ class RowExpandMBFileEditor extends _react.default.Component {
65
74
  this.openEditorMode = null;
66
75
  }
67
76
  UNSAFE_componentWillReceiveProps(nextProps) {
68
- const column = nextProps.column,
69
- row = nextProps.row,
70
- valueKey = nextProps.valueKey;
77
+ const {
78
+ column,
79
+ row,
80
+ valueKey
81
+ } = nextProps;
71
82
  if (row._id !== this.props.row._id) {
72
83
  this.setState({
73
84
  value: row[column[valueKey]] || [],
@@ -76,13 +87,15 @@ class RowExpandMBFileEditor extends _react.default.Component {
76
87
  }
77
88
  }
78
89
  render() {
79
- const _this$props = this.props,
80
- column = _this$props.column,
81
- config = _this$props.config,
82
- uploadFile = _this$props.uploadFile;
83
- const _this$state = this.state,
84
- isShowEditor = _this$state.isShowEditor,
85
- value = _this$state.value;
90
+ const {
91
+ column,
92
+ config,
93
+ uploadFile
94
+ } = this.props;
95
+ const {
96
+ isShowEditor,
97
+ value
98
+ } = this.state;
86
99
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
87
100
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
88
101
  className: "dtable-ui-mobile-row-expand-image position-relative",
@@ -45,11 +45,14 @@ class RowExpandPCFileEditor extends _react.default.Component {
45
45
  this.props.onCommit(value);
46
46
  };
47
47
  this.deleteFile = index => {
48
- const _this$props = this.props,
49
- column = _this$props.column,
50
- row = _this$props.row,
51
- onCommit = _this$props.onCommit;
52
- let fileContainer = this.state.fileContainer;
48
+ const {
49
+ column,
50
+ row,
51
+ onCommit
52
+ } = this.props;
53
+ let {
54
+ fileContainer
55
+ } = this.state;
53
56
  let value = fileContainer || row[column.key];
54
57
  let updatedValue = value.slice(0);
55
58
  updatedValue.splice(index, 1);
@@ -72,9 +75,11 @@ class RowExpandPCFileEditor extends _react.default.Component {
72
75
  document.addEventListener('keydown', this.onKeyDown);
73
76
  }
74
77
  UNSAFE_componentWillReceiveProps(nextProps) {
75
- const column = nextProps.column,
76
- row = nextProps.row,
77
- valueKey = nextProps.valueKey;
78
+ const {
79
+ column,
80
+ row,
81
+ valueKey
82
+ } = nextProps;
78
83
  if (row._id !== this.props.row._id) {
79
84
  this.setState({
80
85
  fileContainer: row[column[valueKey]] || [],
@@ -97,17 +102,19 @@ class RowExpandPCFileEditor extends _react.default.Component {
97
102
  }
98
103
  render() {
99
104
  let fileArr = [];
100
- const _this$props2 = this.props,
101
- column = _this$props2.column,
102
- row = _this$props2.row,
103
- config = _this$props2.config,
104
- valueKey = _this$props2.valueKey,
105
- isEditorFocus = _this$props2.isEditorFocus;
105
+ const {
106
+ column,
107
+ row,
108
+ config,
109
+ valueKey,
110
+ isEditorFocus
111
+ } = this.props;
106
112
  let value = this.state.fileContainer !== null ? this.state.fileContainer : row[column[valueKey]];
107
113
  if (value && value.length > 0) {
108
114
  fileArr = value.map((file, index) => {
109
- const _getFileThumbnailInfo = (0, _url.getFileThumbnailInfo)(file),
110
- fileIconUrl = _getFileThumbnailInfo.fileIconUrl;
115
+ const {
116
+ fileIconUrl
117
+ } = (0, _url.getFileThumbnailInfo)(file);
111
118
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
112
119
  src: fileIconUrl,
113
120
  name: file.name,