dtable-ui-component 7.0.13 → 7.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/lib/ActionSheet/index.js +58 -49
  2. package/lib/ActivityIndicator/index.js +17 -16
  3. package/lib/AsyncUserSelect/index.js +20 -46
  4. package/lib/AsyncUserSelect/user-item.js +6 -5
  5. package/lib/AutoNumberFormatter/index.js +4 -3
  6. package/lib/Badge/index.js +27 -29
  7. package/lib/ButtonFormatter/index.js +8 -6
  8. package/lib/CTimeFormatter/index.js +4 -3
  9. package/lib/CheckboxEditor/index.js +16 -13
  10. package/lib/CheckboxEditor/mb-editor.js +20 -9
  11. package/lib/CheckboxEditor/pc-editor.js +24 -12
  12. package/lib/CheckboxFormatter/index.js +5 -4
  13. package/lib/CollaboratorEditor/index.js +17 -14
  14. package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
  15. package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
  16. package/lib/CollaboratorFormatter/index.js +10 -8
  17. package/lib/CollaboratorItem/index.js +5 -4
  18. package/lib/CollapsibleSettingLayout/index.js +8 -10
  19. package/lib/Comment/body/comment.js +19 -11
  20. package/lib/Comment/body/index.js +8 -8
  21. package/lib/Comment/footer/btns/index.js +7 -4
  22. package/lib/Comment/footer/index.js +21 -10
  23. package/lib/Comment/footer/input/index.js +55 -34
  24. package/lib/Comment/footer/input/participant/index.js +6 -5
  25. package/lib/Comment/footer/participants/index.js +5 -4
  26. package/lib/Comment/footer/participants/participant/index.js +3 -1
  27. package/lib/Comment/footer/participants/participant-select/index.js +26 -10
  28. package/lib/Comment/index.js +57 -39
  29. package/lib/Comment/utils/utilities.js +22 -16
  30. package/lib/CreatorFormatter/index.js +8 -6
  31. package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
  32. package/lib/DTableColorPicker/index.js +53 -67
  33. package/lib/DTableColorPicker/utils.js +7 -5
  34. package/lib/DTableColumnIcon/index.js +7 -6
  35. package/lib/DTableCommonAddTool/index.js +10 -8
  36. package/lib/DTableCustomFooter/index.js +3 -1
  37. package/lib/DTableCustomizeSearchInput/index.js +41 -26
  38. package/lib/DTableCustomizeSelect/index.js +24 -19
  39. package/lib/DTableDropdownItem/index.js +28 -24
  40. package/lib/DTableDropdownMenu/index.js +17 -14
  41. package/lib/DTableEmptyTip/index.js +5 -4
  42. package/lib/DTableFiltersPopover/index.js +42 -27
  43. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
  44. package/lib/DTableFiltersPopover/utils/index.js +114 -64
  45. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
  46. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
  47. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
  48. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
  49. package/lib/DTableFiltersPopover/widgets/filter-group.js +57 -36
  50. package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
  51. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
  52. package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
  53. package/lib/DTableIcon/index.js +11 -10
  54. package/lib/DTableIcon/svg-icon.js +11 -9
  55. package/lib/DTableModalHeader/index.js +7 -7
  56. package/lib/DTablePopover/index.js +16 -12
  57. package/lib/DTableRadio/index.js +9 -10
  58. package/lib/DTableRadioGroup/index.js +20 -11
  59. package/lib/DTableSearchInput/index.js +29 -19
  60. package/lib/DTableSelect/dtable-select-label.js +6 -7
  61. package/lib/DTableSelect/index.js +26 -25
  62. package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
  63. package/lib/DTableSelect/utils.js +83 -47
  64. package/lib/DTableSubDropdownMenu/index.js +16 -12
  65. package/lib/DTableSubDropdownToggle/index.js +16 -17
  66. package/lib/DTableSwitch/index.js +11 -12
  67. package/lib/DTableToolTip/index.js +12 -11
  68. package/lib/DateEditor/index.js +28 -30
  69. package/lib/DateEditor/mb-editor/index.js +31 -18
  70. package/lib/DateEditor/pc-editor.js +46 -27
  71. package/lib/DateFormatter/index.js +5 -4
  72. package/lib/DatePicker/index.js +15 -9
  73. package/lib/DatePicker/utils.js +7 -5
  74. package/lib/DeleteTip/index.js +6 -5
  75. package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
  76. package/lib/DepartmentSelectFilter/index.js +13 -8
  77. package/lib/DepartmentSingleSelectEditor/index.js +16 -13
  78. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
  79. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
  80. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
  81. package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
  82. package/lib/DigitalSignEditor/index.js +16 -13
  83. package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
  84. package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
  85. package/lib/DigitalSignEditor/service.js +5 -3
  86. package/lib/DigitalSignEditor/signature-board/index.js +10 -7
  87. package/lib/DigitalSignEditor/utils.js +4 -2
  88. package/lib/DigitalSignFormatter/index.js +15 -12
  89. package/lib/DigitalSignFormatter/utils.js +6 -5
  90. package/lib/Drawer/index.js +3 -2
  91. package/lib/DurationEditor/index.js +31 -21
  92. package/lib/DurationFormatter/index.js +5 -4
  93. package/lib/EditEditorButton/index.js +3 -1
  94. package/lib/EmailFormatter/index.js +4 -3
  95. package/lib/FieldDisplaySetting/field-item.js +13 -13
  96. package/lib/FieldDisplaySetting/index.js +20 -20
  97. package/lib/FileEditor/files-previewer/index.js +16 -13
  98. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
  99. package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
  100. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
  101. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
  102. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +24 -17
  103. package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
  104. package/lib/FileEditor/index.js +16 -13
  105. package/lib/FileEditor/mb-editor/index.js +20 -28
  106. package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
  107. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
  108. package/lib/FileEditor/pc-editor/index.js +30 -22
  109. package/lib/FileFormatter/index.js +20 -27
  110. package/lib/FileItemFormatter/index.js +10 -7
  111. package/lib/FileUploader/index.js +46 -29
  112. package/lib/FormulaFormatter/index.js +44 -24
  113. package/lib/GeolocationEditor/index.js +32 -27
  114. package/lib/GeolocationEditor/map-editor-utils.js +23 -21
  115. package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
  116. package/lib/GeolocationEditor/mb-editor/index.js +28 -22
  117. package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
  118. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
  119. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
  120. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
  121. package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
  122. package/lib/GeolocationEditor/pc-editor/country-editor.js +25 -12
  123. package/lib/GeolocationEditor/pc-editor/index.js +41 -27
  124. package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
  125. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
  126. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
  127. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
  128. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
  129. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
  130. package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
  131. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
  132. package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
  133. package/lib/GeolocationFormatter/index.js +5 -4
  134. package/lib/HtmlLongTextFormatter/index.js +13 -5
  135. package/lib/Icon/index.js +13 -15
  136. package/lib/Icon/load-sprite.js +13 -2
  137. package/lib/IconButton/index.js +12 -13
  138. package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
  139. package/lib/ImageEditor/images-previewer/index.js +9 -3
  140. package/lib/ImageEditor/index.js +16 -13
  141. package/lib/ImageEditor/mb-editor/index.js +20 -28
  142. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
  143. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +5 -3
  144. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
  145. package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
  146. package/lib/ImageEditor/pc-editor/index.js +16 -11
  147. package/lib/ImageFormatter/images-lazy-load.js +11 -19
  148. package/lib/ImageFormatter/index.js +14 -12
  149. package/lib/ImagePreviewerLightbox/index.js +15 -19
  150. package/lib/ImageThumbnail/index.js +15 -12
  151. package/lib/InputItem/custom-input.js +55 -35
  152. package/lib/InputItem/custom-keyboard.js +42 -42
  153. package/lib/InputItem/index.js +82 -63
  154. package/lib/InputItem/input.js +9 -11
  155. package/lib/LastModifierFormatter/index.js +8 -6
  156. package/lib/LinkEditor/index.js +53 -33
  157. package/lib/LinkEditor/link-editor-option.js +4 -3
  158. package/lib/LinkEditor/mb-popover/index.js +22 -9
  159. package/lib/LinkEditor/pc-popover/index.js +13 -7
  160. package/lib/LinkFormatter/index.js +37 -21
  161. package/lib/List/index.js +17 -19
  162. package/lib/List/list-item.js +59 -55
  163. package/lib/LongTextFormatter/index.js +5 -4
  164. package/lib/MBEditorHeader/index.js +9 -8
  165. package/lib/MTimeFormatter/index.js +4 -3
  166. package/lib/MobileFullScreenPage/body/index.js +6 -4
  167. package/lib/MobileFullScreenPage/header/index.js +10 -8
  168. package/lib/MobileFullScreenPage/index.js +12 -14
  169. package/lib/MobileModal/index.js +7 -8
  170. package/lib/MobileOperationSheet/index.js +8 -7
  171. package/lib/MobileSelector/empty/index.js +3 -1
  172. package/lib/MobileSelector/index.js +7 -5
  173. package/lib/MobileSelector/option/index.js +5 -3
  174. package/lib/MobileSelector/options/index.css +0 -4
  175. package/lib/MobileSelector/options/index.js +3 -1
  176. package/lib/MobileSelector/search/index.js +5 -3
  177. package/lib/MobileUpload/index.js +5 -4
  178. package/lib/Modal/alert.js +2 -2
  179. package/lib/Modal/modal.js +28 -30
  180. package/lib/Modal/prompt.js +14 -14
  181. package/lib/MultipleSelectEditor/index.js +7 -7
  182. package/lib/MultipleSelectFormatter/index.js +9 -7
  183. package/lib/NotificationPopover/index.js +5 -4
  184. package/lib/NumberEditor/index.js +21 -12
  185. package/lib/NumberFormatter/index.js +5 -4
  186. package/lib/PhoneNumberLink/index.js +5 -3
  187. package/lib/Picker/AbstractPicker.js +35 -33
  188. package/lib/Popover/index.js +9 -11
  189. package/lib/Popover/item.js +22 -24
  190. package/lib/Progress/index.js +18 -17
  191. package/lib/Radio/Radio.js +17 -15
  192. package/lib/Radio/RadioItem.js +23 -19
  193. package/lib/RateFormatter/index.js +15 -15
  194. package/lib/RoleStatusEditor/index.js +18 -19
  195. package/lib/RowExpand/index.js +7 -6
  196. package/lib/RowExpandDialog/body/index.js +57 -40
  197. package/lib/RowExpandDialog/column-content/index.js +10 -6
  198. package/lib/RowExpandDialog/header/index.js +12 -9
  199. package/lib/RowExpandDialog/index.js +59 -63
  200. package/lib/RowExpandEditor/add-btn/index.js +7 -6
  201. package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
  202. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
  203. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
  204. package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
  205. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
  206. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
  207. package/lib/RowExpandEditor/date-editor/index.js +7 -6
  208. package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
  209. package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
  210. package/lib/RowExpandEditor/department-editor/index.js +7 -6
  211. package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
  212. package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
  213. package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
  214. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
  215. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
  216. package/lib/RowExpandEditor/duration-editor/index.js +7 -6
  217. package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
  218. package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
  219. package/lib/RowExpandEditor/email-editor/index.js +7 -6
  220. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
  221. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
  222. package/lib/RowExpandEditor/file-editor/index.js +7 -6
  223. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
  224. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
  225. package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
  226. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
  227. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
  228. package/lib/RowExpandEditor/image-editor/index.js +7 -6
  229. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
  230. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
  231. package/lib/RowExpandEditor/index.js +16 -11
  232. package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
  233. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
  234. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
  235. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
  236. package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
  237. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
  238. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
  239. package/lib/RowExpandEditor/number-editor/index.js +7 -6
  240. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
  241. package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
  242. package/lib/RowExpandEditor/rate-editor/index.js +7 -6
  243. package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
  244. package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
  245. package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
  246. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
  247. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
  248. package/lib/RowExpandEditor/text-editor/index.js +7 -6
  249. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
  250. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
  251. package/lib/RowExpandEditor/url-editor/index.js +7 -6
  252. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
  253. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
  254. package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
  255. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
  256. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
  257. package/lib/RowExpandFormatter/email-formatter/index.js +8 -5
  258. package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
  259. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
  260. package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
  261. package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
  262. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
  263. package/lib/RowExpandFormatter/index.js +52 -34
  264. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
  265. package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
  266. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
  267. package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
  268. package/lib/RowExpandFormatter/text/index.js +5 -4
  269. package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
  270. package/lib/RowExpandView/body/index.js +43 -32
  271. package/lib/RowExpandView/column-content/index.js +7 -3
  272. package/lib/RowExpandView/index.js +52 -53
  273. package/lib/SelectItem/index.js +7 -5
  274. package/lib/SelectOptionGroup/index.js +40 -30
  275. package/lib/SelectedDepartments/index.js +12 -10
  276. package/lib/SimpleLongTextFormatter/index.js +18 -12
  277. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
  278. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
  279. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
  280. package/lib/SingleSelectEditor/index.js +7 -7
  281. package/lib/SingleSelectFormatter/index.js +9 -8
  282. package/lib/TabBar/Tab.js +26 -24
  283. package/lib/TabBar/index.js +28 -24
  284. package/lib/Tabs/index.js +13 -10
  285. package/lib/TextEditor/index.js +23 -14
  286. package/lib/TextFormatter/index.js +4 -3
  287. package/lib/TextareaItem/index.js +53 -48
  288. package/lib/Toast/index.js +9 -8
  289. package/lib/UrlFormatter/index.js +4 -3
  290. package/lib/common/editor-base.js +12 -7
  291. package/lib/formatterConfig/index.js +3 -3
  292. package/lib/hooks/common-hooks.js +4 -2
  293. package/lib/select-editor/index.js +16 -13
  294. package/lib/select-editor/mb-editor/index.js +28 -17
  295. package/lib/select-editor/pc-editor/index.js +47 -32
  296. package/lib/toaster/alert.js +8 -7
  297. package/lib/toaster/toast.js +4 -3
  298. package/lib/toaster/toastManager.js +13 -13
  299. package/lib/toaster/toaster.js +12 -9
  300. package/lib/utils/cell.js +11 -8
  301. package/lib/utils/class.js +3 -3
  302. package/lib/utils/column-utils.js +14 -8
  303. package/lib/utils/departments.js +6 -5
  304. package/lib/utils/getLocale.js +11 -5
  305. package/lib/utils/object-utils.js +5 -4
  306. package/lib/utils/url.js +29 -22
  307. package/lib/utils/utils.js +6 -2
  308. package/package.json +2 -2
@@ -21,8 +21,12 @@ class FilterGroup extends _react.Component {
21
21
  constructor() {
22
22
  super(...arguments);
23
23
  this.onSelectGroupConjunction = conjunctionOption => {
24
- const filterConjunction = this.props.filterConjunction;
25
- const newConjunction = conjunctionOption.filterConjunction;
24
+ const {
25
+ filterConjunction
26
+ } = this.props;
27
+ const {
28
+ filterConjunction: newConjunction
29
+ } = conjunctionOption;
26
30
  if (newConjunction === filterConjunction) {
27
31
  return;
28
32
  }
@@ -30,17 +34,22 @@ class FilterGroup extends _react.Component {
30
34
  };
31
35
  this.deleteFilterGroup = event => {
32
36
  event.nativeEvent.stopImmediatePropagation();
33
- const index = this.props.index;
37
+ const {
38
+ index
39
+ } = this.props;
34
40
  this.props.deleteFilterGroup(index);
35
41
  };
36
42
  this.modifyConjunctionInGroup = new_filter_conjunction => {
37
- const index = this.props.index;
43
+ const {
44
+ index
45
+ } = this.props;
38
46
  this.props.modifyConjunctionInGroup(index, new_filter_conjunction);
39
47
  };
40
48
  this.addFilterIntoGroup = () => {
41
- const _this$props = this.props,
42
- columns = _this$props.columns,
43
- index = _this$props.index;
49
+ const {
50
+ columns,
51
+ index
52
+ } = this.props;
44
53
  const newFilter = (0, _utils.getDefaultFilter)(columns);
45
54
  if (!newFilter) {
46
55
  return;
@@ -48,18 +57,23 @@ class FilterGroup extends _react.Component {
48
57
  this.props.addFilterIntoGroup(index, newFilter);
49
58
  };
50
59
  this.deleteFilterInGroup = filter_index => {
51
- const index = this.props.index;
60
+ const {
61
+ index
62
+ } = this.props;
52
63
  this.props.deleteFilterInGroup(index, filter_index);
53
64
  };
54
65
  this.updateFilterInGroup = (filter_index, new_filter) => {
55
- const index = this.props.index;
66
+ const {
67
+ index
68
+ } = this.props;
56
69
  this.props.updateFilterInGroup(index, filter_index, new_filter);
57
70
  };
58
71
  this.renderConjunction = () => {
59
- const _this$props2 = this.props,
60
- index = _this$props2.index,
61
- filterConjunction = _this$props2.filterConjunction,
62
- conjunctionOptions = _this$props2.conjunctionOptions;
72
+ const {
73
+ index,
74
+ filterConjunction,
75
+ conjunctionOptions
76
+ } = this.props;
63
77
  switch (index) {
64
78
  case 0:
65
79
  {
@@ -84,29 +98,35 @@ class FilterGroup extends _react.Component {
84
98
  }
85
99
  };
86
100
  this.renderGroupFilters = () => {
87
- const _this$props3 = this.props,
88
- columns = _this$props3.columns,
89
- conjunctionOptions = _this$props3.conjunctionOptions,
90
- columnOptions = _this$props3.columnOptions,
91
- filter = _this$props3.filter,
92
- groupIndex = _this$props3.index,
93
- collaborators = _this$props3.collaborators,
94
- lang = _this$props3.lang,
95
- userDepartmentIdsMap = _this$props3.userDepartmentIdsMap,
96
- departments = _this$props3.departments,
97
- firstDayOfWeek = _this$props3.firstDayOfWeek,
98
- readOnly = _this$props3.readOnly;
99
- const subFilters = filter.filters,
100
- filter_conjunction = filter.filter_conjunction;
101
+ const {
102
+ columns,
103
+ conjunctionOptions,
104
+ columnOptions,
105
+ filter,
106
+ index: groupIndex,
107
+ collaborators,
108
+ lang,
109
+ userDepartmentIdsMap,
110
+ departments,
111
+ firstDayOfWeek,
112
+ readOnly
113
+ } = this.props;
114
+ const {
115
+ filters: subFilters,
116
+ filter_conjunction
117
+ } = filter;
101
118
  const subFilterConjunction = _constants.SUPPORT_CONJUNCTIONS.includes(filter_conjunction) ? filter_conjunction : _dtableUtils.FILTER_CONJUNCTION_TYPE.AND;
102
119
  const subFiltersLength = Array.isArray(subFilters) ? subFilters.length : 0;
103
120
  if (subFiltersLength === 0) {
104
121
  return null;
105
122
  }
106
123
  return subFilters.map((currentFilter, subFilterIndex) => {
107
- const sub_filter_column_key = currentFilter.column_key;
108
- const _ValidateFilter$valid = _dtableUtils.ValidateFilter.validate(currentFilter, columns),
109
- error_message = _ValidateFilter$valid.error_message;
124
+ const {
125
+ column_key: sub_filter_column_key
126
+ } = currentFilter;
127
+ const {
128
+ error_message
129
+ } = _dtableUtils.ValidateFilter.validate(currentFilter, columns);
110
130
  const filterColumn = columns.find(column => column.key === sub_filter_column_key) || {};
111
131
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterItem.default, {
112
132
  isInModal: this.props.isInModal,
@@ -126,17 +146,18 @@ class FilterGroup extends _react.Component {
126
146
  updateConjunction: this.modifyConjunctionInGroup,
127
147
  deleteFilter: this.deleteFilterInGroup,
128
148
  updateFilter: this.updateFilterInGroup
129
- }, "filter-in-group-".concat(groupIndex, "-").concat(subFilterIndex));
149
+ }, `filter-in-group-${groupIndex}-${subFilterIndex}`);
130
150
  });
131
151
  };
132
152
  }
133
153
  render() {
134
- const _this$props4 = this.props,
135
- level = _this$props4.level,
136
- index = _this$props4.index,
137
- readOnly = _this$props4.readOnly;
154
+ const {
155
+ level,
156
+ index,
157
+ readOnly
158
+ } = this.props;
138
159
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
139
- className: (0, _classnames.default)('filter-item', 'filter-group', "level-".concat(level)),
160
+ className: (0, _classnames.default)('filter-item', 'filter-group', `level-${level}`),
140
161
  children: [!readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
141
162
  className: "delete-filter seatable-icon-btn",
142
163
  onClick: this.deleteFilterGroup,
@@ -32,16 +32,21 @@ class FilterItem extends _react.default.Component {
32
32
  super(_props);
33
33
  _this = this;
34
34
  this.initSelectOptions = props => {
35
- const filter = props.filter,
36
- filterColumn = props.filterColumn;
37
- let _getColumnOptions = (0, _utils.getColumnOptions)(filterColumn),
38
- filterPredicateList = _getColumnOptions.filterPredicateList,
39
- filterTermModifierList = _getColumnOptions.filterTermModifierList;
35
+ const {
36
+ filter,
37
+ filterColumn
38
+ } = props;
39
+ let {
40
+ filterPredicateList,
41
+ filterTermModifierList
42
+ } = (0, _utils.getColumnOptions)(filterColumn);
40
43
  // The value of the calculation formula column does not exist in the shared view
41
44
  this.filterPredicateOptions = filterPredicateList ? filterPredicateList.map(predicate => {
42
45
  return _filterItemUtils.default.generatorPredicateOption(predicate);
43
46
  }).filter(item => item) : [];
44
- const filter_predicate = filter.filter_predicate;
47
+ const {
48
+ filter_predicate
49
+ } = filter;
45
50
  if ((0, _dtableUtils.isDateColumn)(filterColumn)) {
46
51
  if (filter_predicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_WITHIN) {
47
52
  filterTermModifierList = _dtableUtils.filterTermModifierIsWithin;
@@ -53,7 +58,9 @@ class FilterItem extends _react.default.Component {
53
58
  };
54
59
  this.onDeleteFilter = event => {
55
60
  event.nativeEvent.stopImmediatePropagation();
56
- const index = this.props.index;
61
+ const {
62
+ index
63
+ } = this.props;
57
64
  this.props.deleteFilter(index);
58
65
  };
59
66
  this.resetState = filter => {
@@ -62,17 +69,22 @@ class FilterItem extends _react.default.Component {
62
69
  });
63
70
  };
64
71
  this.onSelectConjunction = value => {
65
- const filterConjunction = this.props.filterConjunction;
72
+ const {
73
+ filterConjunction
74
+ } = this.props;
66
75
  if (filterConjunction === value.filterConjunction) {
67
76
  return;
68
77
  }
69
78
  this.props.updateConjunction(value.filterConjunction);
70
79
  };
71
80
  this.onSelectColumn = value => {
72
- const _this$props = this.props,
73
- index = _this$props.index,
74
- filter = _this$props.filter;
75
- const column = value.column;
81
+ const {
82
+ index,
83
+ filter
84
+ } = this.props;
85
+ const {
86
+ column
87
+ } = value;
76
88
  if (column.key === filter.column_key) return;
77
89
  let newFilter = (0, _utils.getFilterByColumn)(column, filter);
78
90
  if (!newFilter) return;
@@ -80,11 +92,14 @@ class FilterItem extends _react.default.Component {
80
92
  this.props.updateFilter(index, newFilter);
81
93
  };
82
94
  this.onSelectPredicate = value => {
83
- const _this$props2 = this.props,
84
- index = _this$props2.index,
85
- filter = _this$props2.filter,
86
- filterColumn = _this$props2.filterColumn;
87
- const filterPredicate = value.filterPredicate;
95
+ const {
96
+ index,
97
+ filter,
98
+ filterColumn
99
+ } = this.props;
100
+ const {
101
+ filterPredicate
102
+ } = value;
88
103
  if (filter.filter_predicate === filterPredicate) {
89
104
  return;
90
105
  }
@@ -93,10 +108,13 @@ class FilterItem extends _react.default.Component {
93
108
  this.props.updateFilter(index, newFilter);
94
109
  };
95
110
  this.onSelectTermModifier = value => {
96
- const _this$props3 = this.props,
97
- index = _this$props3.index,
98
- filter = _this$props3.filter;
99
- const filterTermModifier = value.filterTermModifier;
111
+ const {
112
+ index,
113
+ filter
114
+ } = this.props;
115
+ const {
116
+ filterTermModifier
117
+ } = value;
100
118
  const inputRangeLabel = [_dtableUtils.FILTER_TERM_MODIFIER_TYPE.EXACT_DATE, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.NUMBER_OF_DAYS_AGO, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.NUMBER_OF_DAYS_FROM_NOW, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.THE_NEXT_NUMBERS_OF_DAYS, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.THE_PAST_NUMBERS_OF_DAYS];
101
119
  if (filter.filter_term_modifier === filterTermModifier) {
102
120
  return;
@@ -113,10 +131,13 @@ class FilterItem extends _react.default.Component {
113
131
  this.props.updateFilter(index, newFilter);
114
132
  };
115
133
  this.onSelectSingle = value => {
116
- const _this$props4 = this.props,
117
- index = _this$props4.index,
118
- filter = _this$props4.filter;
119
- const option = value.columnOption;
134
+ const {
135
+ index,
136
+ filter
137
+ } = this.props;
138
+ const {
139
+ columnOption: option
140
+ } = value;
120
141
  if (filter.filter_term === option.id) {
121
142
  return;
122
143
  }
@@ -125,26 +146,31 @@ class FilterItem extends _react.default.Component {
125
146
  this.props.updateFilter(index, newFilter);
126
147
  };
127
148
  this.onSelectMultiple = value => {
128
- const _this$props5 = this.props,
129
- index = _this$props5.index,
130
- filter = _this$props5.filter;
149
+ const {
150
+ index,
151
+ filter
152
+ } = this.props;
131
153
  let newFilter = (0, _utils.getUpdatedFilterBySelectMultiple)(filter, value);
132
154
  this.resetState(newFilter);
133
155
  this.props.updateFilter(index, newFilter);
134
156
  };
135
157
  this.onSelectCollaborator = _ref => {
136
- let collaborator = _ref.columnOption;
137
- const _this$props6 = this.props,
138
- index = _this$props6.index,
139
- filter = _this$props6.filter;
158
+ let {
159
+ columnOption: collaborator
160
+ } = _ref;
161
+ const {
162
+ index,
163
+ filter
164
+ } = this.props;
140
165
  let newFilter = (0, _utils.getUpdatedFilterByCollaborator)(filter, collaborator);
141
166
  this.resetState(newFilter);
142
167
  this.props.updateFilter(index, newFilter);
143
168
  };
144
169
  this.onSelectCreator = value => {
145
- const _this$props7 = this.props,
146
- index = _this$props7.index,
147
- filter = _this$props7.filter;
170
+ const {
171
+ index,
172
+ filter
173
+ } = this.props;
148
174
  const collaborator = value && (value.columnOption || value.value || value);
149
175
  if (!collaborator || !collaborator.email) {
150
176
  return;
@@ -175,10 +201,13 @@ class FilterItem extends _react.default.Component {
175
201
  this.onFilterTermChanged(value);
176
202
  };
177
203
  this.onFilterTermChanged = newFilterTerm => {
178
- const _this$props8 = this.props,
179
- index = _this$props8.index,
180
- filter = _this$props8.filter;
181
- const filterTerm = this.state.filterTerm;
204
+ const {
205
+ index,
206
+ filter
207
+ } = this.props;
208
+ const {
209
+ filterTerm
210
+ } = this.state;
182
211
  if (newFilterTerm !== filterTerm) {
183
212
  this.setState({
184
213
  filterTerm: newFilterTerm
@@ -203,11 +232,14 @@ class FilterItem extends _react.default.Component {
203
232
  this.onFilterTermChanged(index);
204
233
  };
205
234
  this.getInputComponent = type => {
206
- const _this$props9 = this.props,
207
- filterColumn = _this$props9.filterColumn,
208
- readOnly = _this$props9.readOnly,
209
- isInModal = _this$props9.isInModal;
210
- const filterTerm = this.state.filterTerm;
235
+ const {
236
+ filterColumn,
237
+ readOnly,
238
+ isInModal
239
+ } = this.props;
240
+ const {
241
+ filterTerm
242
+ } = this.state;
211
243
  if (type === _constants.INPUT_CMP_TYPE_MAP.TEXT) {
212
244
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
213
245
  value: filterTerm,
@@ -250,12 +282,13 @@ class FilterItem extends _react.default.Component {
250
282
  }
251
283
  };
252
284
  this.renderConjunction = () => {
253
- const _this$props0 = this.props,
254
- index = _this$props0.index,
255
- filterConjunction = _this$props0.filterConjunction,
256
- conjunctionOptions = _this$props0.conjunctionOptions,
257
- readOnly = _this$props0.readOnly,
258
- isInModal = _this$props0.isInModal;
285
+ const {
286
+ index,
287
+ filterConjunction,
288
+ conjunctionOptions,
289
+ readOnly,
290
+ isInModal
291
+ } = this.props;
259
292
  switch (index) {
260
293
  case 0:
261
294
  {
@@ -284,10 +317,13 @@ class FilterItem extends _react.default.Component {
284
317
  this.renderMultipleSelectOption = function () {
285
318
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
286
319
  let filterTerm = arguments.length > 1 ? arguments[1] : undefined;
287
- const _this$props1 = _this.props,
288
- filter = _this$props1.filter,
289
- readOnly = _this$props1.readOnly;
290
- const filter_predicate = filter.filter_predicate;
320
+ const {
321
+ filter,
322
+ readOnly
323
+ } = _this.props;
324
+ const {
325
+ filter_predicate
326
+ } = filter;
291
327
  let isSupportMultipleSelect = false;
292
328
  // The first two options are used for single selection, and the last four options are used for multiple selection
293
329
  const supportMultipleSelectOptions = [_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF, _dtableUtils.FILTER_PREDICATE_TYPE.HAS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.HAS_ALL_OF, _dtableUtils.FILTER_PREDICATE_TYPE.HAS_NONE_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_EXACTLY];
@@ -346,19 +382,24 @@ class FilterItem extends _react.default.Component {
346
382
  });
347
383
  };
348
384
  this.renderFilterTerm = filterColumn => {
349
- const _this$props10 = this.props,
350
- index = _this$props10.index,
351
- filter = _this$props10.filter,
352
- collaborators = _this$props10.collaborators,
353
- userDepartmentIdsMap = _this$props10.userDepartmentIdsMap,
354
- departments = _this$props10.departments,
355
- lang = _this$props10.lang,
356
- firstDayOfWeek = _this$props10.firstDayOfWeek,
357
- readOnly = _this$props10.readOnly;
358
- const type = filterColumn.type;
359
- const filter_term = filter.filter_term,
360
- filter_predicate = filter.filter_predicate,
361
- filter_term_modifier = filter.filter_term_modifier;
385
+ const {
386
+ index,
387
+ filter,
388
+ collaborators,
389
+ userDepartmentIdsMap,
390
+ departments,
391
+ lang,
392
+ firstDayOfWeek,
393
+ readOnly
394
+ } = this.props;
395
+ const {
396
+ type
397
+ } = filterColumn;
398
+ const {
399
+ filter_term,
400
+ filter_predicate,
401
+ filter_term_modifier
402
+ } = filter;
362
403
  // predicate is empty or not empty
363
404
  if (_constants.EMPTY_PREDICATE.includes(filter_predicate)) {
364
405
  return null;
@@ -415,9 +456,9 @@ class FilterItem extends _react.default.Component {
415
456
  case _dtableUtils.CellType.SINGLE_SELECT:
416
457
  {
417
458
  // get options
418
- let _ref2 = filterColumn.data || {},
419
- _ref2$options = _ref2.options,
420
- options = _ref2$options === void 0 ? [] : _ref2$options;
459
+ let {
460
+ options = []
461
+ } = filterColumn.data || {};
421
462
  if ([_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF].includes(filter_predicate)) {
422
463
  return this.renderMultipleSelectOption(options, filter_term);
423
464
  }
@@ -460,9 +501,9 @@ class FilterItem extends _react.default.Component {
460
501
  }
461
502
  case _dtableUtils.CellType.MULTIPLE_SELECT:
462
503
  {
463
- let _ref3 = filterColumn.data || {},
464
- _ref3$options = _ref3.options,
465
- options = _ref3$options === void 0 ? [] : _ref3$options;
504
+ let {
505
+ options = []
506
+ } = filterColumn.data || {};
466
507
  return this.renderMultipleSelectOption(options, filter_term);
467
508
  }
468
509
  case _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT:
@@ -521,8 +562,9 @@ class FilterItem extends _react.default.Component {
521
562
  }
522
563
  case _dtableUtils.CellType.RATE:
523
564
  {
524
- let _ref4 = filterColumn.data || {},
525
- rate_max_number = _ref4.rate_max_number;
565
+ let {
566
+ rate_max_number
567
+ } = filterColumn.data || {};
526
568
  let rateList = [];
527
569
  for (let i = 0; i < rate_max_number; i++) {
528
570
  let rateItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rateItem.default, {
@@ -559,16 +601,19 @@ class FilterItem extends _react.default.Component {
559
601
  }
560
602
  };
561
603
  this.renderFormulaFilterTerm = (filterPredicate, filterTerm, index, filterColumn) => {
562
- const _ref5 = filterColumn || {},
563
- data = _ref5.data;
564
- const _ref6 = data || {},
565
- result_type = _ref6.result_type;
604
+ const {
605
+ data
606
+ } = filterColumn || {};
607
+ const {
608
+ result_type
609
+ } = data || {};
566
610
  if (filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_CURRENT_USER_ID) {
567
611
  return null;
568
612
  }
569
613
  if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.NUMBER) {
570
- const _ref7 = filterColumn.data || {},
571
- format = _ref7.format;
614
+ const {
615
+ format
616
+ } = filterColumn.data || {};
572
617
  if (format === _dtableUtils.CellType.DURATION) {
573
618
  return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.DURATION, filterColumn);
574
619
  }
@@ -586,15 +631,18 @@ class FilterItem extends _react.default.Component {
586
631
  return this.renderFilterTermByArrayType(filterPredicate, filterTerm, index, filterColumn);
587
632
  };
588
633
  this.renderFilterTermByArrayType = (filterPredicate, filterTerm, index, filterColumn) => {
589
- const _this$props11 = this.props,
590
- collaborators = _this$props11.collaborators,
591
- departments = _this$props11.departments,
592
- readOnly = _this$props11.readOnly;
593
- const _ref8 = filterColumn || {},
594
- data = _ref8.data;
595
- const _ref9 = data || {},
596
- array_type = _ref9.array_type,
597
- array_data = _ref9.array_data;
634
+ const {
635
+ collaborators,
636
+ departments,
637
+ readOnly
638
+ } = this.props;
639
+ const {
640
+ data
641
+ } = filterColumn || {};
642
+ const {
643
+ array_type,
644
+ array_data
645
+ } = data || {};
598
646
  if (!array_type) {
599
647
  return null;
600
648
  }
@@ -603,9 +651,9 @@ class FilterItem extends _react.default.Component {
603
651
  data: array_data
604
652
  };
605
653
  if (array_type === _dtableUtils.CellType.SINGLE_SELECT || array_type === _dtableUtils.CellType.MULTIPLE_SELECT) {
606
- let _ref0 = array_data || {},
607
- _ref0$options = _ref0.options,
608
- options = _ref0$options === void 0 ? [] : _ref0$options;
654
+ let {
655
+ options = []
656
+ } = array_data || {};
609
657
  return this.renderMultipleSelectOption(options, filterTerm);
610
658
  }
611
659
  if (array_type === _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT) {
@@ -637,7 +685,9 @@ class FilterItem extends _react.default.Component {
637
685
  return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.TEXT);
638
686
  };
639
687
  this.isRenderErrorTips = () => {
640
- const errMsg = this.props.errMsg;
688
+ const {
689
+ errMsg
690
+ } = this.props;
641
691
  return errMsg && errMsg !== _dtableUtils.FILTER_ERR_MSG.INCOMPLETE_FILTER;
642
692
  };
643
693
  this.renderErrorMessage = () => {
@@ -667,7 +717,9 @@ class FilterItem extends _react.default.Component {
667
717
  this.initSelectOptions(_props);
668
718
  }
669
719
  UNSAFE_componentWillReceiveProps(nextProps) {
670
- const filter = this.props.filter;
720
+ const {
721
+ filter
722
+ } = this.props;
671
723
  if (nextProps.filter !== filter) {
672
724
  this.initSelectOptions(nextProps);
673
725
  this.setState({
@@ -681,15 +733,20 @@ class FilterItem extends _react.default.Component {
681
733
  return shouldUpdated;
682
734
  }
683
735
  render() {
684
- const filterPredicateOptions = this.filterPredicateOptions,
685
- filterTermModifierOptions = this.filterTermModifierOptions;
686
- const _this$props12 = this.props,
687
- filter = _this$props12.filter,
688
- filterColumn = _this$props12.filterColumn,
689
- filterColumnOptions = _this$props12.filterColumnOptions,
690
- readOnly = _this$props12.readOnly;
691
- const filter_predicate = filter.filter_predicate,
692
- filter_term_modifier = filter.filter_term_modifier;
736
+ const {
737
+ filterPredicateOptions,
738
+ filterTermModifierOptions
739
+ } = this;
740
+ const {
741
+ filter,
742
+ filterColumn,
743
+ filterColumnOptions,
744
+ readOnly
745
+ } = this.props;
746
+ const {
747
+ filter_predicate,
748
+ filter_term_modifier
749
+ } = filter;
693
750
  const activeColumn = _filterItemUtils.default.generatorColumnOption(filterColumn);
694
751
  const activePredicate = _filterItemUtils.default.generatorPredicateOption(filter_predicate, true);
695
752
  let activeTermModifier = null;
@@ -699,7 +756,9 @@ class FilterItem extends _react.default.Component {
699
756
  } else if ((0, _columnUtils.isCheckboxColumn)(filterColumn)) {
700
757
  _isCheckboxColumn = true;
701
758
  }
702
- const type = filterColumn.type;
759
+ const {
760
+ type
761
+ } = filterColumn;
703
762
  const computedColumnTypes = [_dtableUtils.CellType.FORMULA, _dtableUtils.CellType.LINK_FORMULA, _dtableUtils.CellType.LINK];
704
763
  const isContainPredicate = [_dtableUtils.FILTER_PREDICATE_TYPE.CONTAINS, _dtableUtils.FILTER_PREDICATE_TYPE.NOT_CONTAIN].includes(filter_predicate);
705
764
  const isRenderErrorTips = this.isRenderErrorTips();
@@ -735,7 +794,7 @@ class FilterItem extends _react.default.Component {
735
794
  isLocked: readOnly
736
795
  })
737
796
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
738
- className: "filter-predicate ml-2 ".concat(_isCheckboxColumn ? 'filter-checkbox-predicate' : ''),
797
+ className: `filter-predicate ml-2 ${_isCheckboxColumn ? 'filter-checkbox-predicate' : ''}`,
739
798
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSelect.default, {
740
799
  value: activePredicate,
741
800
  options: filterPredicateOptions,