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
@@ -28,12 +28,13 @@ function createActionSheet(flag, config, callback) {
28
28
  prefixCls: 'am-action-sheet',
29
29
  cancelButtonText: '取消'
30
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;
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,14 +62,15 @@ 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
75
  className: "".concat(prefixCls, "-title"),
74
76
  children: title
@@ -14,13 +14,14 @@ 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
26
  ["".concat(prefixCls, "-lg")]: size === 'large',
26
27
  ["".concat(prefixCls, "-sm")]: size === 'small',
@@ -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 _reactstrap = require("reactstrap");
@@ -17,43 +16,22 @@ var _keyCodes = _interopRequireDefault(require("../constants/key-codes"));
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
- const _useState = (0, _react.useState)(false),
34
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
35
- isPopoverOpen = _useState2[0],
36
- setIsPopoverOpen = _useState2[1];
37
- const _useState3 = (0, _react.useState)(''),
38
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
39
- searchValue = _useState4[0],
40
- setSearchValue = _useState4[1];
41
- const _useState5 = (0, _react.useState)([]),
42
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
43
- searchedUsers = _useState6[0],
44
- setSearchedUsers = _useState6[1];
45
- const _useState7 = (0, _react.useState)(-1),
46
- _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
47
- highlightIndex = _useState8[0],
48
- setHighlightIndex = _useState8[1];
49
- const _useState9 = (0, _react.useState)(0),
50
- _useState0 = (0, _slicedToArray2.default)(_useState9, 2),
51
- maxItemNum = _useState0[0],
52
- setMaxItemNum = _useState0[1];
53
- const _useState1 = (0, _react.useState)(0),
54
- _useState10 = (0, _slicedToArray2.default)(_useState1, 2),
55
- itemHeight = _useState10[0],
56
- setItemHeight = _useState10[1];
19
+ let {
20
+ className,
21
+ emptyPlaceholder = '',
22
+ searchPlaceholder = '',
23
+ isMulti = true,
24
+ enableShowIDInOrgWhenSearchUser = false,
25
+ selectedUsers = [],
26
+ loadOptions,
27
+ modifySelectedUsers
28
+ } = _ref;
29
+ const [isPopoverOpen, setIsPopoverOpen] = (0, _react.useState)(false);
30
+ const [searchValue, setSearchValue] = (0, _react.useState)('');
31
+ const [searchedUsers, setSearchedUsers] = (0, _react.useState)([]);
32
+ const [highlightIndex, setHighlightIndex] = (0, _react.useState)(-1);
33
+ const [maxItemNum, setMaxItemNum] = (0, _react.useState)(0);
34
+ const [itemHeight, setItemHeight] = (0, _react.useState)(0);
57
35
  const selectorRef = (0, _react.useRef)(null);
58
36
  const userSelectContainerRef = (0, _react.useRef)(null);
59
37
  const userListContainerRef = (0, _react.useRef)(null);
@@ -187,8 +165,9 @@ const AsyncUserSelect = _ref => {
187
165
  }, [onEnter, onUpArrow, onDownArrow, onEsc]);
188
166
  (0, _react.useEffect)(() => {
189
167
  if (userSelectContainerRef.current) {
190
- const _userSelectContainerR = userSelectContainerRef.current.getBoundingClientRect(),
191
- bottom = _userSelectContainerR.bottom;
168
+ const {
169
+ bottom
170
+ } = userSelectContainerRef.current.getBoundingClientRect();
192
171
  if (bottom > window.innerHeight) {
193
172
  userSelectContainerRef.current.style.top = "".concat(window.innerHeight - bottom, "px");
194
173
  }
@@ -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,
@@ -17,15 +17,17 @@ class Badge extends React.Component {
17
17
  render() {
18
18
  // tslint:disable:prefer-const
19
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,
20
+ {
21
+ className,
22
+ prefixCls,
23
+ children,
24
+ text,
25
+ size,
26
+ overflowCount,
27
+ dot,
28
+ corner,
29
+ hot
30
+ } = _this$props,
29
31
  restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
30
32
  // eslint-disable-next-line no-self-assign
31
33
  overflowCount = overflowCount;
@@ -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);
@@ -16,7 +16,9 @@ require("./index.css");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
  const _excluded = ["isMobile"];
18
18
  const CheckboxEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
19
- let isMobile = _ref.isMobile,
19
+ let {
20
+ isMobile
21
+ } = _ref,
20
22
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
23
  if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
22
24
  ref: ref
@@ -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;
@@ -15,9 +15,10 @@ class PCCheckboxEditor extends _react.Component {
15
15
  constructor(props) {
16
16
  super(props);
17
17
  this.onKeyDown = event => {
18
- const _this$props = this.props,
19
- isEditorShow = _this$props.isEditorShow,
20
- readOnly = _this$props.readOnly;
18
+ const {
19
+ isEditorShow,
20
+ readOnly
21
+ } = this.props;
21
22
  if (event.keyCode === _constants.KeyCodes.Enter && isEditorShow && !readOnly) {
22
23
  this.setState({
23
24
  value: !this.state.value
@@ -25,7 +26,9 @@ class PCCheckboxEditor extends _react.Component {
25
26
  }
26
27
  };
27
28
  this.getValue = () => {
28
- const value = this.state.value;
29
+ const {
30
+ value
31
+ } = this.state;
29
32
  return value;
30
33
  };
31
34
  this.updateValue = value => {
@@ -37,14 +40,18 @@ class PCCheckboxEditor extends _react.Component {
37
40
  });
38
41
  };
39
42
  this.onChangeCheckboxValue = event => {
40
- const readOnly = this.props.readOnly;
43
+ const {
44
+ readOnly
45
+ } = this.props;
41
46
  if (readOnly) return;
42
47
  if (event) {
43
48
  event.stopPropagation();
44
49
  event.nativeEvent.stopImmediatePropagation();
45
50
  event.persist();
46
51
  }
47
- const value = this.state.value;
52
+ const {
53
+ value
54
+ } = this.state;
48
55
  const newValue = !value;
49
56
  this.setState({
50
57
  value: newValue
@@ -75,7 +82,9 @@ class PCCheckboxEditor extends _react.Component {
75
82
  document.removeEventListener('keydown', this.onKeyDown);
76
83
  }
77
84
  componentDidUpdate(prevProps) {
78
- const value = this.props.value;
85
+ const {
86
+ value
87
+ } = this.props;
79
88
  if (value !== prevProps.value) {
80
89
  this.setState({
81
90
  value
@@ -84,11 +93,14 @@ class PCCheckboxEditor extends _react.Component {
84
93
  }
85
94
  render() {
86
95
  var _column$data;
87
- const _this$props2 = this.props,
88
- className = _this$props2.className,
89
- style = _this$props2.style,
90
- column = _this$props2.column;
91
- const value = this.state.value;
96
+ const {
97
+ className,
98
+ style,
99
+ column
100
+ } = this.props;
101
+ const {
102
+ value
103
+ } = this.state;
92
104
  let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
93
105
  if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
94
106
  checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
@@ -26,10 +26,11 @@ class CheckboxFormatter extends _react.default.PureComponent {
26
26
  };
27
27
  }
28
28
  render() {
29
- let _this$props = this.props,
30
- value = _this$props.value,
31
- containerClassName = _this$props.containerClassName,
32
- checkboxStyle = _this$props.checkboxStyle;
29
+ let {
30
+ value,
31
+ containerClassName,
32
+ checkboxStyle
33
+ } = this.props;
33
34
  if (!checkboxStyle || !('type' in checkboxStyle && 'color' in checkboxStyle)) {
34
35
  checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
35
36
  }
@@ -16,8 +16,10 @@ require("./index.css");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
  const _excluded = ["isMobile", "value"];
18
18
  const CollaboratorEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
19
- let isMobile = _ref.isMobile,
20
- oldValue = _ref.value,
19
+ let {
20
+ isMobile,
21
+ value: oldValue
22
+ } = _ref,
21
23
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
24
  const value = Array.isArray(oldValue) ? oldValue : [];
23
25
  if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
@@ -12,10 +12,12 @@ var _lang = require("../../lang");
12
12
  var _CollaboratorItem = _interopRequireDefault(require("../../CollaboratorItem"));
13
13
  require("./index.css");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
- const Search = _MobileSelector.default.Search,
16
- Option = _MobileSelector.default.Option,
17
- Options = _MobileSelector.default.Options,
18
- Empty = _MobileSelector.default.Empty;
15
+ const {
16
+ Search,
17
+ Option,
18
+ Options,
19
+ Empty
20
+ } = _MobileSelector.default;
19
21
  class MBCollaboratorEditor extends _react.default.Component {
20
22
  constructor(props) {
21
23
  super(props);
@@ -24,7 +26,9 @@ class MBCollaboratorEditor extends _react.default.Component {
24
26
  this.props.onClose();
25
27
  };
26
28
  this.onChangeSearch = newValue => {
27
- let searchVal = this.state.searchVal;
29
+ let {
30
+ searchVal
31
+ } = this.state;
28
32
  if (searchVal === newValue) return;
29
33
  this.setState({
30
34
  searchVal: newValue
@@ -34,8 +38,9 @@ class MBCollaboratorEditor extends _react.default.Component {
34
38
  this.props.onCommit(collaborator);
35
39
  };
36
40
  this.renderCollaborators = collaborators => {
37
- const _this$props$value = this.props.value,
38
- value = _this$props$value === void 0 ? [] : _this$props$value;
41
+ const {
42
+ value = []
43
+ } = this.props;
39
44
  return collaborators.map(collaborator => {
40
45
  const isSelected = value.includes(collaborator.email);
41
46
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Option, {
@@ -59,10 +64,13 @@ class MBCollaboratorEditor extends _react.default.Component {
59
64
  window.removeEventListener('popstate', this.handleHistoryBack, false);
60
65
  }
61
66
  render() {
62
- const _this$props = this.props,
63
- column = _this$props.column,
64
- collaborators = _this$props.collaborators;
65
- const searchVal = this.state.searchVal;
67
+ const {
68
+ column,
69
+ collaborators
70
+ } = this.props;
71
+ const {
72
+ searchVal
73
+ } = this.state;
66
74
  const displayCollaborators = searchVal ? (0, _dtableUtils.searchCollaborators)(collaborators, searchVal) : collaborators;
67
75
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MobileSelector.default, {
68
76
  onClose: this.props.onClose,
@@ -21,7 +21,9 @@ class PCCollaboratorEditor extends _react.default.Component {
21
21
  super(props);
22
22
  this.onValueChanged = newSearchValue => {
23
23
  if (newSearchValue === this.state.searchValue) return;
24
- const collaborators = this.props.collaborators;
24
+ const {
25
+ collaborators
26
+ } = this.props;
25
27
  this.filteredCollaborators = (0, _dtableUtils.searchCollaborators)(collaborators, newSearchValue);
26
28
  this.setState({
27
29
  highlightIndex: this.filteredCollaborators.length > 0 ? 0 : -1,
@@ -32,7 +34,9 @@ class PCCollaboratorEditor extends _react.default.Component {
32
34
  this.props.onCommit(collaborator);
33
35
  };
34
36
  this.getFilterCollaborator = () => {
35
- const collaborators = this.props.collaborators;
37
+ const {
38
+ collaborators
39
+ } = this.props;
36
40
  const searchValue = this.state.searchValue.toLowerCase();
37
41
  if (!searchValue) return collaborators;
38
42
  return (0, _dtableUtils.searchCollaborators)(collaborators, searchValue);
@@ -73,10 +77,11 @@ class PCCollaboratorEditor extends _react.default.Component {
73
77
  this.onUpArrow = e => {
74
78
  e.preventDefault();
75
79
  e.stopPropagation();
76
- let _this$state = this.state,
77
- highlightIndex = _this$state.highlightIndex,
78
- maxItemNum = _this$state.maxItemNum,
79
- itemHeight = _this$state.itemHeight;
80
+ let {
81
+ highlightIndex,
82
+ maxItemNum,
83
+ itemHeight
84
+ } = this.state;
80
85
  if (highlightIndex > 0) {
81
86
  this.setState({
82
87
  highlightIndex: highlightIndex - 1
@@ -96,10 +101,11 @@ class PCCollaboratorEditor extends _react.default.Component {
96
101
  this.onDownArrow = e => {
97
102
  e.preventDefault();
98
103
  e.stopPropagation();
99
- let _this$state2 = this.state,
100
- highlightIndex = _this$state2.highlightIndex,
101
- maxItemNum = _this$state2.maxItemNum,
102
- itemHeight = _this$state2.itemHeight;
104
+ let {
105
+ highlightIndex,
106
+ maxItemNum,
107
+ itemHeight
108
+ } = this.state;
103
109
  if (highlightIndex < this.filteredCollaborators.length - 1) {
104
110
  this.setState({
105
111
  highlightIndex: highlightIndex + 1
@@ -119,11 +125,12 @@ class PCCollaboratorEditor extends _react.default.Component {
119
125
  this.onEsc = e => {
120
126
  e.preventDefault();
121
127
  e.stopPropagation();
122
- const _this$props = this.props,
123
- isInModal = _this$props.isInModal,
124
- value = _this$props.value,
125
- onCommitCancel = _this$props.onCommitCancel,
126
- onClose = _this$props.onClose;
128
+ const {
129
+ isInModal,
130
+ value,
131
+ onCommitCancel,
132
+ onClose
133
+ } = this.props;
127
134
  if (isInModal) {
128
135
  onClose && onClose();
129
136
  return;
@@ -165,8 +172,9 @@ class PCCollaboratorEditor extends _react.default.Component {
165
172
  }
166
173
  }
167
174
  if (!this.props.isInModal && this.ref) {
168
- const _this$ref$getBounding = this.ref.getBoundingClientRect(),
169
- bottom = _this$ref$getBounding.bottom;
175
+ const {
176
+ bottom
177
+ } = this.ref.getBoundingClientRect();
170
178
  if (bottom > window.innerHeight) {
171
179
  this.ref.style.top = "".concat(window.innerHeight - bottom, "px");
172
180
  }
@@ -190,14 +198,15 @@ class PCCollaboratorEditor extends _react.default.Component {
190
198
  document.removeEventListener('keydown', this.onHotKey, true);
191
199
  }
192
200
  render() {
193
- const _this$state3 = this.state,
194
- searchValue = _this$state3.searchValue,
195
- highlightIndex = _this$state3.highlightIndex;
196
- const _this$props2 = this.props,
197
- isInModal = _this$props2.isInModal,
198
- _this$props2$value = _this$props2.value,
199
- value = _this$props2$value === void 0 ? [] : _this$props2$value,
200
- target = _this$props2.target;
201
+ const {
202
+ searchValue,
203
+ highlightIndex
204
+ } = this.state;
205
+ const {
206
+ isInModal,
207
+ value = [],
208
+ target
209
+ } = this.props;
201
210
  const dom = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
202
211
  className: "dtable-ui-editor-container dtable-ui-collaborator-editor-container",
203
212
  ref: ref => this.ref = ref,
@@ -20,11 +20,12 @@ class CollaboratorFormatter extends _react.default.PureComponent {
20
20
  constructor() {
21
21
  super(...arguments);
22
22
  this.getCollaborators = () => {
23
- let _this$props = this.props,
24
- value = _this$props.value,
25
- collaborators = _this$props.collaborators,
26
- enableDeleteCollaborator = _this$props.enableDeleteCollaborator,
27
- onDeleteCollaborator = _this$props.onDeleteCollaborator;
23
+ let {
24
+ value,
25
+ collaborators,
26
+ enableDeleteCollaborator,
27
+ onDeleteCollaborator
28
+ } = this.props;
28
29
  if (!Array.isArray(value)) {
29
30
  value = [value];
30
31
  }
@@ -45,9 +46,10 @@ class CollaboratorFormatter extends _react.default.PureComponent {
45
46
  };
46
47
  }
47
48
  render() {
48
- const _this$props2 = this.props,
49
- containerClassName = _this$props2.containerClassName,
50
- value = _this$props2.value;
49
+ const {
50
+ containerClassName,
51
+ value
52
+ } = this.props;
51
53
  const classname = (0, _classnames.default)('dtable-ui cell-formatter-container collaborator-formatter', containerClassName);
52
54
  if (!value || Array.isArray(value) && value.length === 0) {
53
55
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -19,10 +19,11 @@ class CollaboratorItem extends _react.default.Component {
19
19
  };
20
20
  }
21
21
  render() {
22
- const _this$props = this.props,
23
- className = _this$props.className,
24
- collaborator = _this$props.collaborator,
25
- enableDeleteCollaborator = _this$props.enableDeleteCollaborator;
22
+ const {
23
+ className,
24
+ collaborator,
25
+ enableDeleteCollaborator
26
+ } = this.props;
26
27
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
27
28
  title: collaborator.name,
28
29
  className: (0, _classnames.default)('dtable-ui collaborator-item', className),