dtable-ui-component 7.0.14 → 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 +25 -19
  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
@@ -6,7 +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
9
  var _classnames = _interopRequireDefault(require("classnames"));
11
10
  var React = _interopRequireWildcard(require("react"));
12
11
  var _client = require("react-dom/client");
@@ -24,16 +23,18 @@ const SHARE = 'SHARE';
24
23
  function noop() {}
25
24
  const queue = [];
26
25
  function createActionSheet(flag, config, callback) {
27
- const props = (0, _objectSpread2.default)({
26
+ const props = {
28
27
  prefixCls: 'am-action-sheet',
29
- cancelButtonText: '取消'
30
- }, config);
31
- const prefixCls = props.prefixCls,
32
- className = props.className,
33
- transitionName = props.transitionName,
34
- maskTransitionName = props.maskTransitionName,
35
- _props$maskClosable = props.maskClosable,
36
- maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable;
28
+ cancelButtonText: '取消',
29
+ ...config
30
+ };
31
+ const {
32
+ prefixCls,
33
+ className,
34
+ transitionName,
35
+ maskTransitionName,
36
+ maskClosable = true
37
+ } = props;
37
38
  const div = document.createElement('div');
38
39
  document.body.appendChild(div);
39
40
  const root = (0, _client.createRoot)(div);
@@ -61,19 +62,20 @@ function createActionSheet(flag, config, callback) {
61
62
  close();
62
63
  }
63
64
  }
64
- const title = props.title,
65
- message = props.message,
66
- options = props.options,
67
- destructiveButtonIndex = props.destructiveButtonIndex,
68
- cancelButtonIndex = props.cancelButtonIndex,
69
- cancelButtonText = props.cancelButtonText,
70
- _props$badges = props.badges,
71
- badges = _props$badges === void 0 ? [] : _props$badges;
65
+ const {
66
+ title,
67
+ message,
68
+ options,
69
+ destructiveButtonIndex,
70
+ cancelButtonIndex,
71
+ cancelButtonText,
72
+ badges = []
73
+ } = props;
72
74
  const titleMsg = [title ? /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
73
- className: "".concat(prefixCls, "-title"),
75
+ className: `${prefixCls}-title`,
74
76
  children: title
75
77
  }, "0") : null, message ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
76
- className: "".concat(prefixCls, "-message"),
78
+ className: `${prefixCls}-message`,
77
79
  children: message
78
80
  }, "1") : null];
79
81
  let children = null;
@@ -86,54 +88,60 @@ function createActionSheet(flag, config, callback) {
86
88
  if (badges && badges.length > 0) {
87
89
  badges.forEach(element => {
88
90
  if (element.index >= 0) {
89
- badgesMap[element.index] = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, (0, _objectSpread2.default)({}, element));
91
+ badgesMap[element.index] = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
92
+ ...element
93
+ });
90
94
  }
91
95
  });
92
96
  }
93
- children = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _getDataAttr.default)(props)), {}, {
97
+ children = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
98
+ ...(0, _getDataAttr.default)(props),
94
99
  children: [titleMsg, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
95
- className: "".concat(prefixCls, "-button-list"),
100
+ className: `${prefixCls}-button-list`,
96
101
  role: "group",
97
102
  children: normalOptions.map((item, index) => {
98
103
  const itemProps = {
99
- className: (0, _classnames.default)("".concat(prefixCls, "-button-list-item"), {
100
- ["".concat(prefixCls, "-destructive-button")]: destructiveButtonIndex === index,
101
- ["".concat(prefixCls, "-cancel-button")]: cancelButtonIndex === index
104
+ className: (0, _classnames.default)(`${prefixCls}-button-list-item`, {
105
+ [`${prefixCls}-destructive-button`]: destructiveButtonIndex === index,
106
+ [`${prefixCls}-cancel-button`]: cancelButtonIndex === index
102
107
  }),
103
108
  onClick: () => cb(index),
104
109
  role: 'button'
105
110
  };
106
- let bContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
111
+ let bContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
112
+ ...itemProps,
107
113
  children: item
108
- }));
114
+ });
109
115
  // 仅在设置徽标的情况下修改dom结构
110
116
  if (badgesMap[index]) {
111
- bContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
112
- className: "".concat(itemProps.className, " ").concat(prefixCls, "-button-list-badge"),
117
+ bContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
118
+ ...itemProps,
119
+ className: `${itemProps.className} ${prefixCls}-button-list-badge`,
113
120
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
114
- className: "".concat(prefixCls, "-button-list-item-content"),
121
+ className: `${prefixCls}-button-list-item-content`,
115
122
  children: item
116
123
  }), badgesMap[index]]
117
- }));
124
+ });
118
125
  }
119
126
  let bItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
120
- activeClassName: "".concat(prefixCls, "-button-list-item-active"),
127
+ activeClassName: `${prefixCls}-button-list-item-active`,
121
128
  children: bContent
122
129
  }, index);
123
130
  if (cancelButtonIndex === index || destructiveButtonIndex === index) {
124
131
  bItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
125
- activeClassName: "".concat(prefixCls, "-button-list-item-active"),
126
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
132
+ activeClassName: `${prefixCls}-button-list-item-active`,
133
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
134
+ ...itemProps,
127
135
  children: [item, cancelButtonIndex === index ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
128
- className: "".concat(prefixCls, "-cancel-button-mask")
136
+ className: `${prefixCls}-cancel-button-mask`
129
137
  }) : null]
130
- }))
138
+ })
131
139
  }, index);
132
140
  }
133
141
  return bItem;
134
142
  })
135
143
  })]
136
- }));
144
+ });
137
145
  break;
138
146
  case SHARE:
139
147
  mode = 'share';
@@ -141,43 +149,44 @@ function createActionSheet(flag, config, callback) {
141
149
  const createList = function (item, index) {
142
150
  let rowIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
143
151
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
144
- className: "".concat(prefixCls, "-share-list-item"),
152
+ className: `${prefixCls}-share-list-item`,
145
153
  role: "button",
146
154
  onClick: () => cb(index, rowIndex),
147
155
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
148
- className: "".concat(prefixCls, "-share-list-item-icon"),
156
+ className: `${prefixCls}-share-list-item-icon`,
149
157
  children: item.icon
150
158
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
151
- className: "".concat(prefixCls, "-share-list-item-title"),
159
+ className: `${prefixCls}-share-list-item-title`,
152
160
  children: item.title
153
161
  })]
154
162
  }, index);
155
163
  };
156
- children = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _getDataAttr.default)(props)), {}, {
164
+ children = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
165
+ ...(0, _getDataAttr.default)(props),
157
166
  children: [titleMsg, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
158
- className: "".concat(prefixCls, "-share"),
167
+ className: `${prefixCls}-share`,
159
168
  children: [multipleLine ? options.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
160
- className: "".concat(prefixCls, "-share-list"),
169
+ className: `${prefixCls}-share-list`,
161
170
  children: item.map((ii, ind) => createList(ii, ind, index))
162
171
  }, index)) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
163
- className: "".concat(prefixCls, "-share-list"),
172
+ className: `${prefixCls}-share-list`,
164
173
  children: options.map((item, index) => createList(item, index))
165
174
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
166
- activeClassName: "".concat(prefixCls, "-share-cancel-button-active"),
175
+ activeClassName: `${prefixCls}-share-cancel-button-active`,
167
176
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
168
- className: "".concat(prefixCls, "-share-cancel-button"),
177
+ className: `${prefixCls}-share-cancel-button`,
169
178
  role: "button",
170
179
  onClick: () => cb(-1),
171
180
  children: cancelButtonText
172
181
  })
173
182
  })]
174
183
  })]
175
- }));
184
+ });
176
185
  break;
177
186
  default:
178
187
  break;
179
188
  }
180
- const rootCls = (0, _classnames.default)("".concat(prefixCls, "-").concat(mode), className);
189
+ const rootCls = (0, _classnames.default)(`${prefixCls}-${mode}`, className);
181
190
  root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcDialog.default, {
182
191
  visible: true,
183
192
  title: "",
@@ -14,36 +14,37 @@ var _jsxRuntime = require("react/jsx-runtime");
14
14
 
15
15
  class ActivityIndicator extends React.Component {
16
16
  render() {
17
- const _this$props = this.props,
18
- prefixCls = _this$props.prefixCls,
19
- className = _this$props.className,
20
- animating = _this$props.animating,
21
- toast = _this$props.toast,
22
- size = _this$props.size,
23
- text = _this$props.text;
17
+ const {
18
+ prefixCls,
19
+ className,
20
+ animating,
21
+ toast,
22
+ size,
23
+ text
24
+ } = this.props;
24
25
  const wrapClass = (0, _classnames.default)(prefixCls, className, {
25
- ["".concat(prefixCls, "-lg")]: size === 'large',
26
- ["".concat(prefixCls, "-sm")]: size === 'small',
27
- ["".concat(prefixCls, "-toast")]: !!toast
26
+ [`${prefixCls}-lg`]: size === 'large',
27
+ [`${prefixCls}-sm`]: size === 'small',
28
+ [`${prefixCls}-toast`]: !!toast
28
29
  });
29
- const spinnerClass = (0, _classnames.default)("".concat(prefixCls, "-spinner"), {
30
- ["".concat(prefixCls, "-spinner-lg")]: !!toast || size === 'large'
30
+ const spinnerClass = (0, _classnames.default)(`${prefixCls}-spinner`, {
31
+ [`${prefixCls}-spinner-lg`]: !!toast || size === 'large'
31
32
  });
32
33
  if (animating) {
33
34
  if (toast) {
34
35
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
35
36
  className: wrapClass,
36
37
  children: text ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
37
- className: "".concat(prefixCls, "-content"),
38
+ className: `${prefixCls}-content`,
38
39
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
39
40
  className: spinnerClass,
40
41
  "aria-hidden": "true"
41
42
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
42
- className: "".concat(prefixCls, "-toast"),
43
+ className: `${prefixCls}-toast`,
43
44
  children: text
44
45
  })]
45
46
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
46
- className: "".concat(prefixCls, "-content"),
47
+ className: `${prefixCls}-content`,
47
48
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
48
49
  className: spinnerClass,
49
50
  "aria-label": "Loading"
@@ -57,7 +58,7 @@ class ActivityIndicator extends React.Component {
57
58
  className: spinnerClass,
58
59
  "aria-hidden": "true"
59
60
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
60
- className: "".concat(prefixCls, "-tip"),
61
+ className: `${prefixCls}-tip`,
61
62
  children: text
62
63
  })]
63
64
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
9
8
  var _react = require("react");
10
9
  var _classnames = _interopRequireDefault(require("classnames"));
11
10
  var _ModalPortal = _interopRequireDefault(require("../ModalPortal"));
@@ -17,49 +16,24 @@ var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
17
16
  require("./index.css");
18
17
  var _jsxRuntime = require("react/jsx-runtime");
19
18
  const AsyncUserSelect = _ref => {
20
- let className = _ref.className,
21
- _ref$emptyPlaceholder = _ref.emptyPlaceholder,
22
- emptyPlaceholder = _ref$emptyPlaceholder === void 0 ? '' : _ref$emptyPlaceholder,
23
- _ref$searchPlaceholde = _ref.searchPlaceholder,
24
- searchPlaceholder = _ref$searchPlaceholde === void 0 ? '' : _ref$searchPlaceholde,
25
- _ref$isMulti = _ref.isMulti,
26
- isMulti = _ref$isMulti === void 0 ? true : _ref$isMulti,
27
- _ref$enableShowIDInOr = _ref.enableShowIDInOrgWhenSearchUser,
28
- enableShowIDInOrgWhenSearchUser = _ref$enableShowIDInOr === void 0 ? false : _ref$enableShowIDInOr,
29
- _ref$selectedUsers = _ref.selectedUsers,
30
- selectedUsers = _ref$selectedUsers === void 0 ? [] : _ref$selectedUsers,
31
- loadOptions = _ref.loadOptions,
32
- modifySelectedUsers = _ref.modifySelectedUsers,
33
- _ref$showDeptBtn = _ref.showDeptBtn,
34
- showDeptBtn = _ref$showDeptBtn === void 0 ? false : _ref$showDeptBtn;
35
- const _useState = (0, _react.useState)(false),
36
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
37
- isPopoverOpen = _useState2[0],
38
- setIsPopoverOpen = _useState2[1];
39
- const _useState3 = (0, _react.useState)(''),
40
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
41
- searchValue = _useState4[0],
42
- setSearchValue = _useState4[1];
43
- const _useState5 = (0, _react.useState)([]),
44
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
45
- searchedUsers = _useState6[0],
46
- setSearchedUsers = _useState6[1];
47
- const _useState7 = (0, _react.useState)(-1),
48
- _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
49
- highlightIndex = _useState8[0],
50
- setHighlightIndex = _useState8[1];
51
- const _useState9 = (0, _react.useState)(0),
52
- _useState0 = (0, _slicedToArray2.default)(_useState9, 2),
53
- maxItemNum = _useState0[0],
54
- setMaxItemNum = _useState0[1];
55
- const _useState1 = (0, _react.useState)(0),
56
- _useState10 = (0, _slicedToArray2.default)(_useState1, 2),
57
- itemHeight = _useState10[0],
58
- setItemHeight = _useState10[1];
59
- const _useState11 = (0, _react.useState)(null),
60
- _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
61
- popoverPosition = _useState12[0],
62
- setPopoverPosition = _useState12[1];
19
+ let {
20
+ className,
21
+ emptyPlaceholder = '',
22
+ searchPlaceholder = '',
23
+ isMulti = true,
24
+ enableShowIDInOrgWhenSearchUser = false,
25
+ selectedUsers = [],
26
+ loadOptions,
27
+ modifySelectedUsers,
28
+ showDeptBtn = false
29
+ } = _ref;
30
+ const [isPopoverOpen, setIsPopoverOpen] = (0, _react.useState)(false);
31
+ const [searchValue, setSearchValue] = (0, _react.useState)('');
32
+ const [searchedUsers, setSearchedUsers] = (0, _react.useState)([]);
33
+ const [highlightIndex, setHighlightIndex] = (0, _react.useState)(-1);
34
+ const [maxItemNum, setMaxItemNum] = (0, _react.useState)(0);
35
+ const [itemHeight, setItemHeight] = (0, _react.useState)(0);
36
+ const [popoverPosition, setPopoverPosition] = (0, _react.useState)(null);
63
37
  const selectorRef = (0, _react.useRef)(null);
64
38
  const userSelectContainerRef = (0, _react.useRef)(null);
65
39
  const userListContainerRef = (0, _react.useRef)(null);
@@ -249,7 +223,7 @@ const AsyncUserSelect = _ref => {
249
223
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_userItem.default, {
250
224
  user: user,
251
225
  deleteUser: deselectUser
252
- }, "dtable-ui-user-selector-selected-user-".concat(index));
226
+ }, `dtable-ui-user-selector-selected-user-${index}`);
253
227
  }), selectedUsers.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
254
228
  className: "dtable-ui-user-select-placeholder",
255
229
  children: emptyPlaceholder || (0, _lang.getLocale)('Search_users')
@@ -291,7 +265,7 @@ const AsyncUserSelect = _ref => {
291
265
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_userItem.default, {
292
266
  user: user,
293
267
  enableShowIDInOrgWhenSearchUser: enableShowIDInOrgWhenSearchUser
294
- }, "dtable-ui-user-selector-searched-user-".concat(index)), selectedUsers.find(u => u.email === user.email) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
268
+ }, `dtable-ui-user-selector-searched-user-${index}`), selectedUsers.find(u => u.email === user.email) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
295
269
  className: "dtable-ui-collaborator-check-icon",
296
270
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
297
271
  className: "dtable-font dtable-icon-check",
@@ -10,11 +10,12 @@ var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _lang = require("../lang");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  const UserItem = _ref => {
13
- let className = _ref.className,
14
- user = _ref.user,
15
- deleteUser = _ref.deleteUser,
16
- _ref$enableShowIDInOr = _ref.enableShowIDInOrgWhenSearchUser,
17
- enableShowIDInOrgWhenSearchUser = _ref$enableShowIDInOr === void 0 ? false : _ref$enableShowIDInOr;
13
+ let {
14
+ className,
15
+ user,
16
+ deleteUser,
17
+ enableShowIDInOrgWhenSearchUser = false
18
+ } = _ref;
18
19
  const name = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.name) || '', [user]);
19
20
  const avatarUrl = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.avatar_url) || '', [user]);
20
21
  const idInOrg = (0, _react.useMemo)(() => (user === null || user === void 0 ? void 0 : user.id_in_org) || '', [user]);
@@ -11,9 +11,10 @@ require("./index.css");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  class AutoNumberFormatter extends _react.default.Component {
13
13
  render() {
14
- const _this$props = this.props,
15
- containerClassName = _this$props.containerClassName,
16
- value = _this$props.value;
14
+ const {
15
+ containerClassName,
16
+ value
17
+ } = this.props;
17
18
  let classname = (0, _classnames.default)('dtable-ui cell-formatter-container auto-number-formatter', containerClassName);
18
19
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
19
20
  title: value,
@@ -1,63 +1,61 @@
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
9
  var _classnames = _interopRequireDefault(require("classnames"));
12
10
  var React = _interopRequireWildcard(require("react"));
13
11
  require("./index.css");
14
12
  var _jsxRuntime = require("react/jsx-runtime");
15
- const _excluded = ["className", "prefixCls", "children", "text", "size", "overflowCount", "dot", "corner", "hot"];
16
13
  class Badge extends React.Component {
17
14
  render() {
18
15
  // tslint:disable:prefer-const
19
- let _this$props = this.props,
20
- className = _this$props.className,
21
- prefixCls = _this$props.prefixCls,
22
- children = _this$props.children,
23
- text = _this$props.text,
24
- size = _this$props.size,
25
- overflowCount = _this$props.overflowCount,
26
- dot = _this$props.dot,
27
- corner = _this$props.corner,
28
- hot = _this$props.hot,
29
- restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
16
+ let {
17
+ className,
18
+ prefixCls,
19
+ children,
20
+ text,
21
+ size,
22
+ overflowCount,
23
+ dot,
24
+ corner,
25
+ hot,
26
+ ...restProps
27
+ } = this.props;
30
28
  // eslint-disable-next-line no-self-assign
31
29
  overflowCount = overflowCount;
32
- text = typeof text === 'number' && text > overflowCount ? "".concat(overflowCount, "+") : text;
30
+ text = typeof text === 'number' && text > overflowCount ? `${overflowCount}+` : text;
33
31
 
34
32
  // dot mode don't need text
35
33
  if (dot) {
36
34
  text = '';
37
35
  }
38
36
  const scrollNumberCls = (0, _classnames.default)({
39
- ["".concat(prefixCls, "-dot")]: dot,
40
- ["".concat(prefixCls, "-dot-large")]: dot && size === 'large',
41
- ["".concat(prefixCls, "-text")]: !dot && !corner,
42
- ["".concat(prefixCls, "-corner")]: corner,
43
- ["".concat(prefixCls, "-corner-large")]: corner && size === 'large'
37
+ [`${prefixCls}-dot`]: dot,
38
+ [`${prefixCls}-dot-large`]: dot && size === 'large',
39
+ [`${prefixCls}-text`]: !dot && !corner,
40
+ [`${prefixCls}-corner`]: corner,
41
+ [`${prefixCls}-corner-large`]: corner && size === 'large'
44
42
  });
45
43
  const badgeCls = (0, _classnames.default)(prefixCls, className, {
46
- ["".concat(prefixCls, "-not-a-wrapper")]: !children,
47
- ["".concat(prefixCls, "-corner-wrapper")]: corner,
48
- ["".concat(prefixCls, "-hot")]: !!hot,
49
- ["".concat(prefixCls, "-corner-wrapper-large")]: corner && size === 'large'
44
+ [`${prefixCls}-not-a-wrapper`]: !children,
45
+ [`${prefixCls}-corner-wrapper`]: corner,
46
+ [`${prefixCls}-hot`]: !!hot,
47
+ [`${prefixCls}-corner-wrapper-large`]: corner && size === 'large'
50
48
  });
51
49
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
52
50
  className: badgeCls,
53
51
  children: [children, (text || dot) &&
54
52
  /*#__PURE__*/
55
53
  // tslint:disable-next-line:jsx-no-multiline-js
56
- (0, _jsxRuntime.jsx)("sup", (0, _objectSpread2.default)((0, _objectSpread2.default)({
57
- className: scrollNumberCls
58
- }, restProps), {}, {
54
+ (0, _jsxRuntime.jsx)("sup", {
55
+ className: scrollNumberCls,
56
+ ...restProps,
59
57
  children: text
60
- }))]
58
+ })]
61
59
  });
62
60
  }
63
61
  }
@@ -21,12 +21,14 @@ class ButtonFormatter extends _react.default.Component {
21
21
  };
22
22
  }
23
23
  render() {
24
- let _this$props = this.props,
25
- data = _this$props.data,
26
- containerClassName = _this$props.containerClassName;
27
- const _ref = data || {},
28
- button_color = _ref.button_color,
29
- button_name = _ref.button_name;
24
+ let {
25
+ data,
26
+ containerClassName
27
+ } = this.props;
28
+ const {
29
+ button_color,
30
+ button_name
31
+ } = data || {};
30
32
  const colorObj = _dtableUtils.SELECT_OPTION_COLORS.find(item => item.COLOR === button_color) || _dtableUtils.SELECT_OPTION_COLORS[0];
31
33
  const color = colorObj.TEXT_COLOR === WHITE ? WHITE : '#666666';
32
34
  const btnStyle = {
@@ -18,9 +18,10 @@ class CTimeFormatter extends _react.default.Component {
18
18
  };
19
19
  }
20
20
  render() {
21
- let _this$props = this.props,
22
- date = _this$props.value,
23
- containerClassName = _this$props.containerClassName;
21
+ let {
22
+ value: date,
23
+ containerClassName
24
+ } = this.props;
24
25
  let classname = (0, _classnames.default)('dtable-ui cell-formatter-container ctime-formatter', containerClassName);
25
26
  if (date) {
26
27
  date = this.formatDate(date);
@@ -6,35 +6,38 @@ 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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
9
  var _react = _interopRequireWildcard(require("react"));
12
10
  var _reactResponsive = _interopRequireDefault(require("react-responsive"));
13
11
  var _pcEditor = _interopRequireDefault(require("./pc-editor"));
14
12
  var _mbEditor = _interopRequireDefault(require("./mb-editor"));
15
13
  require("./index.css");
16
14
  var _jsxRuntime = require("react/jsx-runtime");
17
- const _excluded = ["isMobile"];
18
15
  const CheckboxEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
19
- let isMobile = _ref.isMobile,
20
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
- if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
16
+ let {
17
+ isMobile,
18
+ ...props
19
+ } = _ref;
20
+ if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
21
+ ...props,
22
22
  ref: ref
23
- }));
24
- if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
23
+ });
24
+ if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
25
+ ...props,
25
26
  ref: ref
26
- }));
27
+ });
27
28
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
28
29
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
29
30
  query: "(min-width: 768px)",
30
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
31
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
32
+ ...props,
31
33
  ref: ref
32
- }))
34
+ })
33
35
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
34
36
  query: "(max-width: 768px)",
35
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
37
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
38
+ ...props,
36
39
  ref: ref
37
- }))
40
+ })
38
41
  })]
39
42
  });
40
43
  });
@@ -15,7 +15,9 @@ class MBCheckboxEditor extends _react.Component {
15
15
  constructor(props) {
16
16
  super(props);
17
17
  this.getValue = () => {
18
- const value = this.state.value;
18
+ const {
19
+ value
20
+ } = this.state;
19
21
  return value;
20
22
  };
21
23
  this.updateValue = value => {
@@ -27,14 +29,18 @@ class MBCheckboxEditor extends _react.Component {
27
29
  });
28
30
  };
29
31
  this.onChangeCheckboxValue = event => {
30
- const readOnly = this.props.readOnly;
32
+ const {
33
+ readOnly
34
+ } = this.props;
31
35
  if (readOnly) return;
32
36
  if (event) {
33
37
  event.stopPropagation();
34
38
  event.nativeEvent.stopImmediatePropagation();
35
39
  event.persist();
36
40
  }
37
- const value = this.state.value;
41
+ const {
42
+ value
43
+ } = this.state;
38
44
  const newValue = !value;
39
45
  this.setState({
40
46
  value: newValue
@@ -57,7 +63,9 @@ class MBCheckboxEditor extends _react.Component {
57
63
  };
58
64
  }
59
65
  componentDidUpdate(prevProps) {
60
- const value = this.props.value;
66
+ const {
67
+ value
68
+ } = this.props;
61
69
  if (value !== prevProps.value) {
62
70
  this.setState({
63
71
  value
@@ -66,11 +74,14 @@ class MBCheckboxEditor extends _react.Component {
66
74
  }
67
75
  render() {
68
76
  var _column$data;
69
- const _this$props = this.props,
70
- className = _this$props.className,
71
- style = _this$props.style,
72
- column = _this$props.column;
73
- const value = this.state.value;
77
+ const {
78
+ className,
79
+ style,
80
+ column
81
+ } = this.props;
82
+ const {
83
+ value
84
+ } = this.state;
74
85
  let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
75
86
  if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
76
87
  checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;