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

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 (281) hide show
  1. package/lib/ActionSheet/index.js +14 -16
  2. package/lib/ActivityIndicator/index.js +7 -8
  3. package/lib/AsyncUserSelect/index.js +40 -19
  4. package/lib/AsyncUserSelect/user-item.js +5 -6
  5. package/lib/AutoNumberFormatter/index.js +3 -4
  6. package/lib/Badge/index.js +9 -11
  7. package/lib/ButtonFormatter/index.js +6 -8
  8. package/lib/CTimeFormatter/index.js +3 -4
  9. package/lib/CheckboxEditor/index.js +1 -3
  10. package/lib/CheckboxEditor/mb-editor.js +9 -20
  11. package/lib/CheckboxEditor/pc-editor.js +12 -24
  12. package/lib/CheckboxFormatter/index.js +4 -5
  13. package/lib/CollaboratorEditor/index.js +2 -4
  14. package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
  15. package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
  16. package/lib/CollaboratorFormatter/index.js +8 -10
  17. package/lib/CollaboratorItem/index.js +4 -5
  18. package/lib/CollapsibleSettingLayout/index.js +9 -7
  19. package/lib/Comment/body/comment.js +10 -18
  20. package/lib/Comment/body/index.js +2 -4
  21. package/lib/Comment/footer/btns/index.js +4 -7
  22. package/lib/Comment/footer/index.js +9 -20
  23. package/lib/Comment/footer/input/index.js +29 -50
  24. package/lib/Comment/footer/input/participant/index.js +4 -5
  25. package/lib/Comment/footer/participants/index.js +4 -5
  26. package/lib/Comment/footer/participants/participant/index.js +1 -3
  27. package/lib/Comment/footer/participants/participant-select/index.js +8 -24
  28. package/lib/Comment/index.js +39 -57
  29. package/lib/Comment/utils/utilities.js +15 -21
  30. package/lib/CreatorFormatter/index.js +6 -8
  31. package/lib/DTableColorPicker/ColorPickerPortal/index.js +22 -18
  32. package/lib/DTableColorPicker/index.js +55 -40
  33. package/lib/DTableColorPicker/utils.js +4 -6
  34. package/lib/DTableColumnIcon/index.js +6 -7
  35. package/lib/DTableCommonAddTool/index.js +6 -8
  36. package/lib/DTableCustomFooter/index.js +1 -3
  37. package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
  38. package/lib/DTableCustomizeSelect/index.js +19 -24
  39. package/lib/DTableDropdownItem/index.js +16 -18
  40. package/lib/DTableDropdownMenu/index.js +8 -10
  41. package/lib/DTableEmptyTip/index.js +4 -5
  42. package/lib/DTableFiltersPopover/index.js +26 -41
  43. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +1 -3
  44. package/lib/DTableFiltersPopover/utils/index.js +63 -113
  45. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +8 -9
  46. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
  47. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
  48. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
  49. package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
  50. package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
  51. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
  52. package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
  53. package/lib/DTableGroupSelect/index.js +11 -15
  54. package/lib/DTableGroupSelect/select-option-group.js +23 -32
  55. package/lib/DTableIcon/index.js +6 -7
  56. package/lib/DTableIcon/svg-icon.js +5 -7
  57. package/lib/DTableModalHeader/index.js +4 -13
  58. package/lib/DTablePopover/index.js +11 -15
  59. package/lib/DTableRadio/index.js +10 -9
  60. package/lib/DTableRadioGroup/index.js +8 -17
  61. package/lib/DTableSearchInput/index.js +19 -29
  62. package/lib/DTableSelect/dtable-select-label.js +6 -5
  63. package/lib/DTableSelect/index.js +21 -22
  64. package/lib/DTableSelect/utils.js +7 -15
  65. package/lib/DTableSubDropdownMenu/index.js +8 -10
  66. package/lib/DTableSubDropdownToggle/index.js +12 -12
  67. package/lib/DTableSwitch/index.js +12 -11
  68. package/lib/DTableToolTip/index.js +7 -8
  69. package/lib/DateEditor/index.js +20 -15
  70. package/lib/DateEditor/mb-editor/index.js +18 -31
  71. package/lib/DateEditor/pc-editor.js +26 -45
  72. package/lib/DateFormatter/index.js +4 -5
  73. package/lib/DatePicker/index.js +9 -15
  74. package/lib/DatePicker/utils.js +1 -3
  75. package/lib/DeleteTip/index.js +5 -6
  76. package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
  77. package/lib/DepartmentSelectFilter/index.js +6 -8
  78. package/lib/DepartmentSingleSelectEditor/index.js +1 -3
  79. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
  80. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
  81. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
  82. package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
  83. package/lib/DigitalSignEditor/index.js +1 -3
  84. package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
  85. package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
  86. package/lib/DigitalSignEditor/service.js +2 -4
  87. package/lib/DigitalSignEditor/signature-board/index.js +5 -8
  88. package/lib/DigitalSignEditor/utils.js +2 -4
  89. package/lib/DigitalSignFormatter/index.js +12 -15
  90. package/lib/DigitalSignFormatter/utils.js +4 -5
  91. package/lib/DurationEditor/index.js +21 -31
  92. package/lib/DurationFormatter/index.js +4 -5
  93. package/lib/EditEditorButton/index.js +1 -3
  94. package/lib/EmailFormatter/index.js +3 -4
  95. package/lib/FieldDisplaySetting/field-item.js +12 -12
  96. package/lib/FieldDisplaySetting/index.js +11 -9
  97. package/lib/FileEditor/files-previewer/index.js +1 -3
  98. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
  99. package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
  100. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
  101. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
  102. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
  103. package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
  104. package/lib/FileEditor/index.js +1 -3
  105. package/lib/FileEditor/mb-editor/index.js +28 -20
  106. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
  107. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
  108. package/lib/FileEditor/pc-editor/index.js +19 -27
  109. package/lib/FileFormatter/index.js +26 -19
  110. package/lib/FileItemFormatter/index.js +6 -9
  111. package/lib/FileUploader/index.js +28 -45
  112. package/lib/FormulaFormatter/index.js +15 -29
  113. package/lib/GeolocationEditor/index.js +11 -12
  114. package/lib/GeolocationEditor/map-editor-utils.js +17 -15
  115. package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
  116. package/lib/GeolocationEditor/mb-editor/index.js +4 -6
  117. package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
  118. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
  119. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
  120. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
  121. package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
  122. package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
  123. package/lib/GeolocationEditor/pc-editor/index.js +12 -20
  124. package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
  125. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
  126. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
  127. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
  128. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
  129. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
  130. package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
  131. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
  132. package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
  133. package/lib/GeolocationFormatter/index.js +4 -5
  134. package/lib/HtmlLongTextFormatter/index.js +4 -12
  135. package/lib/Icon/index.js +3 -5
  136. package/lib/IconButton/index.js +4 -6
  137. package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
  138. package/lib/ImageEditor/images-previewer/index.js +3 -9
  139. package/lib/ImageEditor/index.js +1 -3
  140. package/lib/ImageEditor/mb-editor/index.js +28 -20
  141. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
  142. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
  143. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
  144. package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
  145. package/lib/ImageEditor/pc-editor/index.js +11 -16
  146. package/lib/ImageFormatter/images-lazy-load.js +19 -11
  147. package/lib/ImageFormatter/index.js +11 -13
  148. package/lib/ImagePreviewerLightbox/index.js +15 -13
  149. package/lib/ImageThumbnail/index.js +10 -13
  150. package/lib/InputItem/custom-input.js +26 -46
  151. package/lib/InputItem/custom-keyboard.js +15 -18
  152. package/lib/InputItem/index.js +34 -50
  153. package/lib/InputItem/input.js +2 -4
  154. package/lib/LastModifierFormatter/index.js +6 -8
  155. package/lib/LinkEditor/index.js +33 -53
  156. package/lib/LinkEditor/link-editor-option.js +3 -4
  157. package/lib/LinkEditor/mb-popover/index.js +9 -22
  158. package/lib/LinkEditor/pc-popover/index.js +5 -10
  159. package/lib/LinkFormatter/index.js +21 -37
  160. package/lib/List/index.js +6 -8
  161. package/lib/List/list-item.js +22 -28
  162. package/lib/LongTextFormatter/index.js +4 -5
  163. package/lib/MBEditorHeader/index.js +7 -8
  164. package/lib/MTimeFormatter/index.js +3 -4
  165. package/lib/MobileFullScreenPage/body/index.js +3 -5
  166. package/lib/MobileFullScreenPage/header/index.js +4 -6
  167. package/lib/MobileFullScreenPage/index.js +13 -11
  168. package/lib/MobileModal/index.js +1 -3
  169. package/lib/MobileOperationSheet/index.js +7 -8
  170. package/lib/MobileSelector/empty/index.js +1 -3
  171. package/lib/MobileSelector/index.js +5 -7
  172. package/lib/MobileSelector/option/index.js +3 -5
  173. package/lib/MobileSelector/options/index.js +1 -3
  174. package/lib/MobileSelector/search/index.js +3 -5
  175. package/lib/MobileUpload/index.js +4 -5
  176. package/lib/Modal/modal.js +14 -15
  177. package/lib/Modal/prompt.js +4 -4
  178. package/lib/MultipleSelectEditor/index.js +1 -3
  179. package/lib/MultipleSelectFormatter/index.js +6 -8
  180. package/lib/NotificationPopover/index.js +4 -5
  181. package/lib/NumberEditor/index.js +12 -21
  182. package/lib/NumberFormatter/index.js +4 -5
  183. package/lib/PhoneNumberLink/index.js +2 -4
  184. package/lib/Picker/AbstractPicker.js +23 -27
  185. package/lib/Popover/index.js +3 -4
  186. package/lib/Popover/item.js +7 -9
  187. package/lib/Progress/index.js +9 -8
  188. package/lib/Radio/Radio.js +4 -8
  189. package/lib/Radio/RadioItem.js +8 -12
  190. package/lib/RateFormatter/index.js +13 -13
  191. package/lib/RoleStatusEditor/index.js +18 -17
  192. package/lib/RowExpandDialog/body/index.js +32 -49
  193. package/lib/RowExpandDialog/column-content/index.js +5 -9
  194. package/lib/RowExpandDialog/header/index.js +6 -8
  195. package/lib/RowExpandDialog/index.js +49 -34
  196. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
  197. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
  198. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
  199. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
  200. package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
  201. package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
  202. package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
  203. package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
  204. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
  205. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
  206. package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
  207. package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
  208. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
  209. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
  210. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
  211. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
  212. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
  213. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
  214. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
  215. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
  216. package/lib/RowExpandEditor/index.js +4 -8
  217. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
  218. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
  219. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
  220. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
  221. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
  222. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
  223. package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
  224. package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
  225. package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
  226. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
  227. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
  228. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
  229. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
  230. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
  231. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
  232. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
  233. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
  234. package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
  235. package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
  236. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
  237. package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
  238. package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
  239. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
  240. package/lib/RowExpandFormatter/index.js +27 -41
  241. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
  242. package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
  243. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
  244. package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
  245. package/lib/RowExpandFormatter/text/index.js +4 -5
  246. package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
  247. package/lib/RowExpandView/body/index.js +22 -35
  248. package/lib/RowExpandView/column-content/index.js +3 -7
  249. package/lib/RowExpandView/index.js +42 -30
  250. package/lib/SelectItem/index.js +5 -7
  251. package/lib/SelectOptionGroup/index.js +30 -40
  252. package/lib/SelectedDepartments/index.js +7 -9
  253. package/lib/SimpleLongTextFormatter/index.js +10 -16
  254. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
  255. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
  256. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
  257. package/lib/SingleSelectEditor/index.js +1 -3
  258. package/lib/SingleSelectFormatter/index.js +8 -9
  259. package/lib/TabBar/Tab.js +14 -16
  260. package/lib/TabBar/index.js +18 -21
  261. package/lib/Tabs/index.js +1 -3
  262. package/lib/TextEditor/index.js +14 -23
  263. package/lib/TextFormatter/index.js +3 -4
  264. package/lib/TextareaItem/index.js +19 -26
  265. package/lib/Toast/index.js +3 -4
  266. package/lib/UrlFormatter/index.js +3 -4
  267. package/lib/common/editor-base.js +7 -12
  268. package/lib/hooks/common-hooks.js +2 -4
  269. package/lib/select-editor/index.js +1 -3
  270. package/lib/select-editor/mb-editor/index.js +17 -28
  271. package/lib/select-editor/pc-editor/index.js +27 -42
  272. package/lib/toaster/alert.js +6 -7
  273. package/lib/toaster/toast.js +2 -3
  274. package/lib/toaster/toastManager.js +2 -4
  275. package/lib/utils/cell.js +8 -11
  276. package/lib/utils/column-utils.js +8 -14
  277. package/lib/utils/departments.js +1 -3
  278. package/lib/utils/url.js +24 -31
  279. package/lib/utils/utils.js +2 -6
  280. package/package.json +1 -1
  281. package/lib/DTableModalHeader/index.css +0 -5
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").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"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _rightAngle = _interopRequireDefault(require("../right-angle"));
11
12
  var _addBtn = _interopRequireDefault(require("../add-btn"));
@@ -14,16 +15,20 @@ var _DepartmentSingleSelectEditor = _interopRequireDefault(require("../../Depart
14
15
  var _lang = require("../../lang");
15
16
  var _jsxRuntime = require("react/jsx-runtime");
16
17
  const RowExpandMBDepartmentEditor = _ref => {
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);
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];
27
32
  const openEditor = (0, _react.useCallback)(() => {
28
33
  setShowEditor(true);
29
34
  }, []);
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").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"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _classnames = _interopRequireDefault(require("classnames"));
11
12
  var _DepartmentSingleSelectFormatter = _interopRequireDefault(require("../../DepartmentSingleSelectFormatter"));
@@ -13,19 +14,23 @@ var _constants = require("../../constants");
13
14
  var _DepartmentSingleSelectEditor = _interopRequireDefault(require("../../DepartmentSingleSelectEditor"));
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
16
  const RowExpandPCDepartmentEditor = _ref => {
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);
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];
29
34
  const departmentSelectContainer = (0, _react.useRef)(null);
30
35
  const departmentSelectContent = (0, _react.useRef)(null);
31
36
  const onKeyDown = (0, _react.useCallback)(event => {
@@ -31,21 +31,17 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
31
31
  });
32
32
  };
33
33
  this.getValue = () => {
34
- const {
35
- column,
36
- row,
37
- valueKey
38
- } = this.props;
39
- const {
40
- updated
41
- } = this.state;
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;
42
39
  return updated ? updated : row[column[valueKey]];
43
40
  };
44
41
  this.deleteImage = () => {
45
- const {
46
- column,
47
- onCommit
48
- } = this.props;
42
+ const _this$props2 = this.props,
43
+ column = _this$props2.column,
44
+ onCommit = _this$props2.onCommit;
49
45
  const updated = {
50
46
  [column.key]: null
51
47
  };
@@ -55,9 +51,7 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
55
51
  });
56
52
  };
57
53
  this.getSignImages = () => {
58
- const {
59
- config
60
- } = this.props;
54
+ const config = this.props.config;
61
55
  const value = this.getValue();
62
56
  const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
63
57
  partUrl: _utils.default.getSignImageUrl(value)
@@ -65,13 +59,10 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
65
59
  return [signImageUrl].filter(Boolean);
66
60
  };
67
61
  this.renderSignature = signImages => {
68
- const {
69
- column,
70
- config
71
- } = this.props;
72
- const {
73
- key
74
- } = column;
62
+ const _this$props3 = this.props,
63
+ column = _this$props3.column,
64
+ config = _this$props3.config;
65
+ const key = column.key;
75
66
  return signImages.map((src, index) => {
76
67
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
77
68
  index: index,
@@ -90,11 +81,9 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
90
81
  };
91
82
  }
92
83
  UNSAFE_componentWillReceiveProps(nextProps) {
93
- const {
94
- column,
95
- row,
96
- valueKey
97
- } = nextProps;
84
+ const column = nextProps.column,
85
+ row = nextProps.row,
86
+ valueKey = nextProps.valueKey;
98
87
  if (row._id !== this.props.row._id) {
99
88
  this.setState({
100
89
  updated: row[column[valueKey]] || [],
@@ -103,13 +92,10 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
103
92
  }
104
93
  }
105
94
  render() {
106
- const {
107
- config,
108
- column
109
- } = this.props;
110
- const {
111
- isShowEditor
112
- } = this.state;
95
+ const _this$props4 = this.props,
96
+ config = _this$props4.config,
97
+ column = _this$props4.column;
98
+ const isShowEditor = this.state.isShowEditor;
113
99
  const signImages = this.getSignImages();
114
100
  const signImageExisted = Array.isArray(signImages) && signImages.length > 0;
115
101
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
@@ -62,21 +62,17 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
62
62
  this.props.onCommit(value);
63
63
  };
64
64
  this.getValue = () => {
65
- const {
66
- column,
67
- row,
68
- valueKey
69
- } = this.props;
70
- const {
71
- updated
72
- } = this.state;
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;
73
70
  return updated ? updated : row[column[valueKey]];
74
71
  };
75
72
  this.deleteImage = () => {
76
- const {
77
- column,
78
- onCommit
79
- } = this.props;
73
+ const _this$props2 = this.props,
74
+ column = _this$props2.column,
75
+ onCommit = _this$props2.onCommit;
80
76
  const updated = {
81
77
  [column.key]: null
82
78
  };
@@ -86,9 +82,7 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
86
82
  });
87
83
  };
88
84
  this.getSignImages = () => {
89
- const {
90
- config
91
- } = this.props;
85
+ const config = this.props.config;
92
86
  const value = this.getValue();
93
87
  const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
94
88
  partUrl: _utils.default.getSignImageUrl(value)
@@ -106,12 +100,8 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
106
100
  this.setLargeImageIndex(-1);
107
101
  };
108
102
  this.renderSignature = signImages => {
109
- const {
110
- column
111
- } = this.props;
112
- const {
113
- key
114
- } = column;
103
+ const column = this.props.column;
104
+ const key = column.key;
115
105
  return signImages.map((src, index) => {
116
106
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
117
107
  index: index,
@@ -134,11 +124,9 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
134
124
  document.addEventListener('keydown', this.onKeyDown);
135
125
  }
136
126
  UNSAFE_componentWillReceiveProps(nextProps) {
137
- const {
138
- column,
139
- row,
140
- valueKey
141
- } = nextProps;
127
+ const column = nextProps.column,
128
+ row = nextProps.row,
129
+ valueKey = nextProps.valueKey;
142
130
  if (row._id !== this.props.row._id) {
143
131
  this.setState({
144
132
  updated: row[column[valueKey]] || [],
@@ -162,15 +150,13 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
162
150
  document.removeEventListener('keydown', this.onKeyDown);
163
151
  }
164
152
  render() {
165
- const {
166
- config,
167
- column,
168
- isEditorFocus
169
- } = this.props;
170
- const {
171
- isShowEditor,
172
- largeImageIndex
173
- } = this.state;
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;
174
160
  const signImages = this.getSignImages();
175
161
  const signImageExisted = Array.isArray(signImages) && signImages.length > 0;
176
162
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -24,22 +24,18 @@ class RowExpandMBDurationEditor extends _react.default.Component {
24
24
  isShowEditor: false
25
25
  });
26
26
  };
27
- let {
28
- row,
29
- column,
30
- valueKey
31
- } = props;
27
+ let row = props.row,
28
+ column = props.column,
29
+ valueKey = props.valueKey;
32
30
  this.state = {
33
31
  isShowEditor: false,
34
32
  value: row[column[valueKey]]
35
33
  };
36
34
  }
37
35
  UNSAFE_componentWillReceiveProps(nextProps) {
38
- const {
39
- column,
40
- row,
41
- valueKey
42
- } = nextProps;
36
+ const column = nextProps.column,
37
+ row = nextProps.row,
38
+ valueKey = nextProps.valueKey;
43
39
  if (row._id !== this.props.row._id) {
44
40
  this.setState({
45
41
  value: row[column[valueKey]],
@@ -48,13 +44,10 @@ class RowExpandMBDurationEditor extends _react.default.Component {
48
44
  }
49
45
  }
50
46
  render() {
51
- const {
52
- column
53
- } = this.props;
54
- const {
55
- value,
56
- isShowEditor
57
- } = this.state;
47
+ const column = this.props.column;
48
+ const _this$state = this.state,
49
+ value = _this$state.value,
50
+ isShowEditor = _this$state.isShowEditor;
58
51
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
59
52
  className: "dtable-ui-mobile-row-expand-input-editor-container",
60
53
  children: isShowEditor ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_DurationEditor.default, {
@@ -34,11 +34,9 @@ class RowExpandPCDurationEditor extends _react.default.Component {
34
34
  isShowEditor: false
35
35
  });
36
36
  };
37
- let {
38
- row,
39
- column,
40
- valueKey
41
- } = props;
37
+ let row = props.row,
38
+ column = props.column,
39
+ valueKey = props.valueKey;
42
40
  this.state = {
43
41
  isShowEditor: false,
44
42
  value: row[column[valueKey]]
@@ -48,11 +46,9 @@ class RowExpandPCDurationEditor extends _react.default.Component {
48
46
  document.addEventListener('keydown', this.onKeyDown);
49
47
  }
50
48
  UNSAFE_componentWillReceiveProps(nextProps) {
51
- const {
52
- column,
53
- row,
54
- valueKey
55
- } = nextProps;
49
+ const column = nextProps.column,
50
+ row = nextProps.row,
51
+ valueKey = nextProps.valueKey;
56
52
  if (row._id !== this.props.row._id) {
57
53
  this.setState({
58
54
  value: row[column[valueKey]],
@@ -73,15 +69,13 @@ class RowExpandPCDurationEditor extends _react.default.Component {
73
69
  document.removeEventListener('keydown', this.onKeyDown);
74
70
  }
75
71
  render() {
76
- let {
77
- column,
78
- isEditorFocus,
79
- isInModal
80
- } = this.props;
81
- let {
82
- value,
83
- isShowEditor
84
- } = this.state;
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;
85
79
  let style = {
86
80
  width: 320
87
81
  };
@@ -12,9 +12,7 @@ class RowExpandMBEmailEditor extends _react.default.Component {
12
12
  constructor(props) {
13
13
  super(props);
14
14
  this.onBlur = () => {
15
- const {
16
- onCommit
17
- } = this.props;
15
+ const onCommit = this.props.onCommit;
18
16
  const updated = this.state.value.trim();
19
17
  onCommit(updated);
20
18
  };
@@ -32,27 +30,21 @@ class RowExpandMBEmailEditor extends _react.default.Component {
32
30
  e.stopPropagation();
33
31
  };
34
32
  this.onOpenEmailLink = () => {
35
- const {
36
- value
37
- } = this.state;
33
+ const value = this.state.value;
38
34
  let newValue = value.trim();
39
35
  window.location.href = "mailto:".concat(newValue);
40
36
  };
41
- const {
42
- row,
43
- column,
44
- valueKey
45
- } = props;
37
+ const row = props.row,
38
+ column = props.column,
39
+ valueKey = props.valueKey;
46
40
  this.state = {
47
41
  value: row[column[valueKey]] || ''
48
42
  };
49
43
  }
50
44
  UNSAFE_componentWillReceiveProps(nextProps) {
51
- const {
52
- column,
53
- row,
54
- valueKey
55
- } = nextProps;
45
+ const column = nextProps.column,
46
+ row = nextProps.row,
47
+ valueKey = nextProps.valueKey;
56
48
  if (row._id !== this.props.row._id) {
57
49
  this.setState({
58
50
  value: row[column[valueKey]] || ''
@@ -60,9 +52,7 @@ class RowExpandMBEmailEditor extends _react.default.Component {
60
52
  }
61
53
  }
62
54
  render() {
63
- const {
64
- value
65
- } = this.state;
55
+ const value = this.state.value;
66
56
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
67
57
  className: "dtable-ui-mobile-row-expand-input-editor-container position-relative dtable-ui-mobile-row-expand-url-editor-container",
68
58
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
@@ -24,9 +24,7 @@ class RowExpandPCEmailEditor extends _react.default.Component {
24
24
  }, 1);
25
25
  };
26
26
  this.onBlur = () => {
27
- const {
28
- onCommit
29
- } = this.props;
27
+ const onCommit = this.props.onCommit;
30
28
  const updated = this.state.value.trim();
31
29
  onCommit(updated);
32
30
  };
@@ -52,27 +50,22 @@ class RowExpandPCEmailEditor extends _react.default.Component {
52
50
  this.blurInput();
53
51
  return;
54
52
  }
55
- const {
56
- selectionStart,
57
- selectionEnd,
58
- value
59
- } = event.currentTarget;
53
+ const _event$currentTarget = event.currentTarget,
54
+ selectionStart = _event$currentTarget.selectionStart,
55
+ selectionEnd = _event$currentTarget.selectionEnd,
56
+ value = _event$currentTarget.value;
60
57
  if (event.keyCode === _constants.KeyCodes.ChineseInputMethod || event.keyCode === _constants.KeyCodes.LeftArrow && selectionStart === 0 || event.keyCode === _constants.KeyCodes.RightArrow && selectionEnd === value.length) {
61
58
  event.stopPropagation();
62
59
  }
63
60
  };
64
61
  this.onOpenEmailLink = () => {
65
- const {
66
- value
67
- } = this.state;
62
+ const value = this.state.value;
68
63
  let newValue = value.trim();
69
64
  window.location.href = "mailto:".concat(newValue);
70
65
  };
71
- const {
72
- row,
73
- column,
74
- valueKey
75
- } = props;
66
+ const row = props.row,
67
+ column = props.column,
68
+ valueKey = props.valueKey;
76
69
  this.state = {
77
70
  value: row[column[valueKey]] || ''
78
71
  };
@@ -83,11 +76,9 @@ class RowExpandPCEmailEditor extends _react.default.Component {
83
76
  }
84
77
  }
85
78
  UNSAFE_componentWillReceiveProps(nextProps) {
86
- const {
87
- column,
88
- row,
89
- valueKey
90
- } = nextProps;
79
+ const column = nextProps.column,
80
+ row = nextProps.row,
81
+ valueKey = nextProps.valueKey;
91
82
  if (row._id !== this.props.row._id) {
92
83
  this.setState({
93
84
  value: row[column[valueKey]] || ''
@@ -100,9 +91,7 @@ class RowExpandPCEmailEditor extends _react.default.Component {
100
91
  }
101
92
  }
102
93
  render() {
103
- let {
104
- value
105
- } = this.state;
94
+ let value = this.state.value;
106
95
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
107
96
  className: "dtable-ui-row-expand-url-editor",
108
97
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
@@ -32,24 +32,17 @@ class RowExpandMBFileEditor extends _react.default.Component {
32
32
  this.props.onCommit(value);
33
33
  };
34
34
  this.deleteFile = index => {
35
- const {
36
- value
37
- } = this.state;
35
+ const value = this.state.value;
38
36
  const newValue = value.slice(0);
39
37
  newValue.splice(index, 1);
40
38
  this.onCommit(newValue);
41
39
  };
42
40
  this.renderFiles = () => {
43
- const {
44
- value
45
- } = this.state;
46
- const {
47
- config
48
- } = this.props;
41
+ const value = this.state.value;
42
+ const config = this.props.config;
49
43
  return value.map((file, index) => {
50
- const {
51
- fileIconUrl
52
- } = (0, _url.getFileThumbnailInfo)(file);
44
+ const _getFileThumbnailInfo = (0, _url.getFileThumbnailInfo)(file),
45
+ fileIconUrl = _getFileThumbnailInfo.fileIconUrl;
53
46
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
54
47
  src: fileIconUrl,
55
48
  name: file.name,
@@ -62,11 +55,9 @@ class RowExpandMBFileEditor extends _react.default.Component {
62
55
  }, 'file-' + index);
63
56
  });
64
57
  };
65
- const {
66
- column,
67
- row,
68
- valueKey
69
- } = props;
58
+ const column = props.column,
59
+ row = props.row,
60
+ valueKey = props.valueKey;
70
61
  this.state = {
71
62
  isShowEditor: false,
72
63
  value: row[column[valueKey]] || []
@@ -74,11 +65,9 @@ class RowExpandMBFileEditor extends _react.default.Component {
74
65
  this.openEditorMode = null;
75
66
  }
76
67
  UNSAFE_componentWillReceiveProps(nextProps) {
77
- const {
78
- column,
79
- row,
80
- valueKey
81
- } = nextProps;
68
+ const column = nextProps.column,
69
+ row = nextProps.row,
70
+ valueKey = nextProps.valueKey;
82
71
  if (row._id !== this.props.row._id) {
83
72
  this.setState({
84
73
  value: row[column[valueKey]] || [],
@@ -87,15 +76,13 @@ class RowExpandMBFileEditor extends _react.default.Component {
87
76
  }
88
77
  }
89
78
  render() {
90
- const {
91
- column,
92
- config,
93
- uploadFile
94
- } = this.props;
95
- const {
96
- isShowEditor,
97
- value
98
- } = this.state;
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;
99
86
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
100
87
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
101
88
  className: "dtable-ui-mobile-row-expand-image position-relative",
@@ -45,14 +45,11 @@ class RowExpandPCFileEditor extends _react.default.Component {
45
45
  this.props.onCommit(value);
46
46
  };
47
47
  this.deleteFile = index => {
48
- const {
49
- column,
50
- row,
51
- onCommit
52
- } = this.props;
53
- let {
54
- fileContainer
55
- } = this.state;
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;
56
53
  let value = fileContainer || row[column.key];
57
54
  let updatedValue = value.slice(0);
58
55
  updatedValue.splice(index, 1);
@@ -75,11 +72,9 @@ class RowExpandPCFileEditor extends _react.default.Component {
75
72
  document.addEventListener('keydown', this.onKeyDown);
76
73
  }
77
74
  UNSAFE_componentWillReceiveProps(nextProps) {
78
- const {
79
- column,
80
- row,
81
- valueKey
82
- } = nextProps;
75
+ const column = nextProps.column,
76
+ row = nextProps.row,
77
+ valueKey = nextProps.valueKey;
83
78
  if (row._id !== this.props.row._id) {
84
79
  this.setState({
85
80
  fileContainer: row[column[valueKey]] || [],
@@ -102,19 +97,17 @@ class RowExpandPCFileEditor extends _react.default.Component {
102
97
  }
103
98
  render() {
104
99
  let fileArr = [];
105
- const {
106
- column,
107
- row,
108
- config,
109
- valueKey,
110
- isEditorFocus
111
- } = this.props;
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;
112
106
  let value = this.state.fileContainer !== null ? this.state.fileContainer : row[column[valueKey]];
113
107
  if (value && value.length > 0) {
114
108
  fileArr = value.map((file, index) => {
115
- const {
116
- fileIconUrl
117
- } = (0, _url.getFileThumbnailInfo)(file);
109
+ const _getFileThumbnailInfo = (0, _url.getFileThumbnailInfo)(file),
110
+ fileIconUrl = _getFileThumbnailInfo.fileIconUrl;
118
111
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
119
112
  src: fileIconUrl,
120
113
  name: file.name,