dtable-ui-component 6.0.125 → 6.0.126

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 (288) hide show
  1. package/lib/ActionSheet/index.js +14 -16
  2. package/lib/ActivityIndicator/index.js +7 -8
  3. package/lib/AsyncUserSelect/index.css +5 -0
  4. package/lib/AsyncUserSelect/index.js +40 -19
  5. package/lib/AsyncUserSelect/user-item.js +5 -6
  6. package/lib/AutoNumberFormatter/index.js +3 -4
  7. package/lib/Badge/index.js +9 -11
  8. package/lib/ButtonFormatter/index.js +6 -8
  9. package/lib/CTimeFormatter/index.js +3 -4
  10. package/lib/CheckboxEditor/index.js +1 -3
  11. package/lib/CheckboxEditor/mb-editor.js +9 -20
  12. package/lib/CheckboxEditor/pc-editor.js +12 -24
  13. package/lib/CheckboxFormatter/index.js +4 -5
  14. package/lib/CollaboratorEditor/index.js +2 -4
  15. package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
  16. package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
  17. package/lib/CollaboratorFormatter/index.js +8 -10
  18. package/lib/CollaboratorItem/index.js +4 -5
  19. package/lib/CollapsibleSettingLayout/index.js +9 -7
  20. package/lib/Comment/body/comment.js +10 -18
  21. package/lib/Comment/body/index.js +2 -4
  22. package/lib/Comment/footer/btns/index.js +4 -7
  23. package/lib/Comment/footer/index.js +9 -20
  24. package/lib/Comment/footer/input/index.js +29 -50
  25. package/lib/Comment/footer/input/participant/index.js +4 -5
  26. package/lib/Comment/footer/participants/index.js +4 -5
  27. package/lib/Comment/footer/participants/participant/index.js +1 -3
  28. package/lib/Comment/footer/participants/participant-select/index.js +8 -24
  29. package/lib/Comment/index.js +39 -57
  30. package/lib/Comment/utils/utilities.js +15 -21
  31. package/lib/CreatorFormatter/index.js +6 -8
  32. package/lib/DTableColorPicker/ColorPickerPortal/index.js +23 -19
  33. package/lib/DTableColorPicker/index.css +0 -2
  34. package/lib/DTableColorPicker/index.js +56 -41
  35. package/lib/DTableColorPicker/utils.js +4 -6
  36. package/lib/DTableColumnIcon/index.js +6 -7
  37. package/lib/DTableCommonAddTool/index.css +1 -3
  38. package/lib/DTableCommonAddTool/index.js +6 -8
  39. package/lib/DTableCustomFooter/index.css +1 -3
  40. package/lib/DTableCustomFooter/index.js +1 -3
  41. package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
  42. package/lib/DTableCustomizeSelect/index.js +19 -24
  43. package/lib/DTableDropdownItem/index.js +16 -18
  44. package/lib/DTableDropdownMenu/index.js +8 -10
  45. package/lib/DTableEmptyTip/index.js +4 -5
  46. package/lib/DTableFiltersPopover/index.css +0 -2
  47. package/lib/DTableFiltersPopover/index.js +26 -41
  48. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +1 -3
  49. package/lib/DTableFiltersPopover/utils/index.js +63 -113
  50. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +8 -9
  51. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
  52. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
  53. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
  54. package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
  55. package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
  56. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
  57. package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
  58. package/lib/DTableGroupSelect/index.js +11 -15
  59. package/lib/DTableGroupSelect/select-option-group.js +23 -32
  60. package/lib/DTableIcon/index.js +6 -7
  61. package/lib/DTableIcon/svg-icon.js +5 -7
  62. package/lib/DTableModalHeader/index.js +1 -3
  63. package/lib/DTablePopover/index.js +13 -16
  64. package/lib/DTableRadio/index.js +10 -9
  65. package/lib/DTableRadioGroup/index.js +8 -17
  66. package/lib/DTableSearchInput/index.js +19 -29
  67. package/lib/DTableSelect/dtable-select-label.js +6 -5
  68. package/lib/DTableSelect/index.js +21 -22
  69. package/lib/DTableSelect/utils.js +7 -15
  70. package/lib/DTableSubDropdownMenu/index.js +8 -10
  71. package/lib/DTableSubDropdownToggle/index.js +12 -12
  72. package/lib/DTableSwitch/index.css +0 -1
  73. package/lib/DTableSwitch/index.js +12 -11
  74. package/lib/DTableToolTip/index.js +7 -8
  75. package/lib/DateEditor/index.js +20 -15
  76. package/lib/DateEditor/mb-editor/index.js +18 -31
  77. package/lib/DateEditor/pc-editor.js +26 -45
  78. package/lib/DateFormatter/index.js +4 -5
  79. package/lib/DatePicker/index.js +9 -15
  80. package/lib/DatePicker/utils.js +1 -3
  81. package/lib/DeleteTip/index.js +5 -6
  82. package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
  83. package/lib/DepartmentSelectFilter/index.js +6 -8
  84. package/lib/DepartmentSingleSelectEditor/index.js +1 -3
  85. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
  86. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
  87. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
  88. package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
  89. package/lib/DigitalSignEditor/index.js +1 -3
  90. package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
  91. package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
  92. package/lib/DigitalSignEditor/service.js +2 -4
  93. package/lib/DigitalSignEditor/signature-board/index.js +5 -8
  94. package/lib/DigitalSignEditor/utils.js +2 -4
  95. package/lib/DigitalSignFormatter/index.js +12 -15
  96. package/lib/DigitalSignFormatter/utils.js +4 -5
  97. package/lib/DurationEditor/index.js +21 -31
  98. package/lib/DurationFormatter/index.js +4 -5
  99. package/lib/EditEditorButton/index.js +1 -3
  100. package/lib/EmailFormatter/index.js +3 -4
  101. package/lib/FieldDisplaySetting/field-item.js +12 -12
  102. package/lib/FieldDisplaySetting/index.js +11 -9
  103. package/lib/FileEditor/files-previewer/index.js +1 -3
  104. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
  105. package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
  106. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
  107. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
  108. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
  109. package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
  110. package/lib/FileEditor/index.js +1 -3
  111. package/lib/FileEditor/mb-editor/index.js +28 -20
  112. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
  113. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
  114. package/lib/FileEditor/pc-editor/index.js +19 -27
  115. package/lib/FileFormatter/index.js +26 -19
  116. package/lib/FileItemFormatter/index.js +6 -9
  117. package/lib/FileUploader/index.js +28 -45
  118. package/lib/FormulaFormatter/index.js +15 -29
  119. package/lib/GeolocationEditor/index.js +11 -12
  120. package/lib/GeolocationEditor/map-editor-utils.js +17 -15
  121. package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
  122. package/lib/GeolocationEditor/mb-editor/index.js +4 -6
  123. package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
  124. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
  125. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
  126. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
  127. package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
  128. package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
  129. package/lib/GeolocationEditor/pc-editor/index.js +12 -20
  130. package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
  131. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
  132. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
  133. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
  134. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
  135. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
  136. package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
  137. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
  138. package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
  139. package/lib/GeolocationFormatter/index.js +4 -5
  140. package/lib/HtmlLongTextFormatter/index.js +4 -12
  141. package/lib/Icon/index.js +3 -5
  142. package/lib/IconButton/index.js +4 -6
  143. package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
  144. package/lib/ImageEditor/images-previewer/index.js +3 -9
  145. package/lib/ImageEditor/index.js +1 -3
  146. package/lib/ImageEditor/mb-editor/index.js +28 -20
  147. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
  148. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
  149. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
  150. package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
  151. package/lib/ImageEditor/pc-editor/index.js +11 -16
  152. package/lib/ImageFormatter/images-lazy-load.js +19 -11
  153. package/lib/ImageFormatter/index.js +11 -13
  154. package/lib/ImagePreviewerLightbox/index.js +15 -13
  155. package/lib/ImageThumbnail/index.js +10 -13
  156. package/lib/InputItem/custom-input.js +26 -46
  157. package/lib/InputItem/custom-keyboard.js +15 -18
  158. package/lib/InputItem/index.js +34 -50
  159. package/lib/InputItem/input.js +2 -4
  160. package/lib/LastModifierFormatter/index.js +6 -8
  161. package/lib/LinkEditor/index.js +33 -53
  162. package/lib/LinkEditor/link-editor-option.js +3 -4
  163. package/lib/LinkEditor/mb-popover/index.js +9 -22
  164. package/lib/LinkEditor/pc-popover/index.js +5 -10
  165. package/lib/LinkFormatter/index.js +21 -37
  166. package/lib/List/index.js +6 -8
  167. package/lib/List/list-item.js +22 -28
  168. package/lib/LongTextFormatter/index.js +4 -5
  169. package/lib/MBEditorHeader/index.js +7 -8
  170. package/lib/MTimeFormatter/index.js +3 -4
  171. package/lib/MobileFullScreenPage/body/index.js +3 -5
  172. package/lib/MobileFullScreenPage/header/index.js +4 -6
  173. package/lib/MobileFullScreenPage/index.js +13 -11
  174. package/lib/MobileModal/index.js +1 -3
  175. package/lib/MobileOperationSheet/index.js +7 -8
  176. package/lib/MobileSelector/empty/index.js +1 -3
  177. package/lib/MobileSelector/index.js +5 -7
  178. package/lib/MobileSelector/option/index.js +3 -5
  179. package/lib/MobileSelector/options/index.js +1 -3
  180. package/lib/MobileSelector/search/index.js +3 -5
  181. package/lib/MobileUpload/index.js +4 -5
  182. package/lib/Modal/modal.js +14 -15
  183. package/lib/Modal/prompt.js +4 -4
  184. package/lib/MultipleSelectEditor/index.js +1 -3
  185. package/lib/MultipleSelectFormatter/index.js +6 -8
  186. package/lib/NotificationPopover/index.css +1 -6
  187. package/lib/NotificationPopover/index.js +6 -7
  188. package/lib/NumberEditor/index.js +12 -21
  189. package/lib/NumberFormatter/index.js +4 -5
  190. package/lib/PhoneNumberLink/index.js +2 -4
  191. package/lib/Picker/AbstractPicker.js +23 -27
  192. package/lib/Popover/index.js +3 -4
  193. package/lib/Popover/item.js +7 -9
  194. package/lib/Progress/index.js +9 -8
  195. package/lib/Radio/Radio.js +4 -8
  196. package/lib/Radio/RadioItem.js +8 -12
  197. package/lib/RateFormatter/index.js +13 -13
  198. package/lib/RoleStatusEditor/index.js +18 -17
  199. package/lib/RowExpandDialog/body/index.js +32 -49
  200. package/lib/RowExpandDialog/column-content/index.js +5 -9
  201. package/lib/RowExpandDialog/header/index.js +6 -8
  202. package/lib/RowExpandDialog/index.js +49 -34
  203. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
  204. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
  205. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
  206. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
  207. package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
  208. package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
  209. package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
  210. package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
  211. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
  212. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
  213. package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
  214. package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
  215. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
  216. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
  217. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
  218. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
  219. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
  220. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
  221. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
  222. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
  223. package/lib/RowExpandEditor/index.js +4 -8
  224. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
  225. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
  226. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
  227. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
  228. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
  229. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
  230. package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
  231. package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
  232. package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
  233. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
  234. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
  235. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
  236. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
  237. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
  238. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
  239. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
  240. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
  241. package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
  242. package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
  243. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
  244. package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
  245. package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
  246. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
  247. package/lib/RowExpandFormatter/index.js +27 -41
  248. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
  249. package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
  250. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
  251. package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
  252. package/lib/RowExpandFormatter/text/index.js +4 -5
  253. package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
  254. package/lib/RowExpandView/body/index.js +22 -35
  255. package/lib/RowExpandView/column-content/index.js +3 -7
  256. package/lib/RowExpandView/index.js +42 -30
  257. package/lib/SelectItem/index.js +5 -7
  258. package/lib/SelectOptionGroup/index.css +3 -3
  259. package/lib/SelectOptionGroup/index.js +31 -40
  260. package/lib/SelectedDepartments/index.js +7 -9
  261. package/lib/SimpleLongTextFormatter/index.js +10 -16
  262. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
  263. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
  264. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
  265. package/lib/SingleSelectEditor/index.js +1 -3
  266. package/lib/SingleSelectFormatter/index.js +8 -9
  267. package/lib/TabBar/Tab.js +14 -16
  268. package/lib/TabBar/index.js +18 -21
  269. package/lib/Tabs/index.js +1 -3
  270. package/lib/TextEditor/index.js +14 -23
  271. package/lib/TextFormatter/index.js +3 -4
  272. package/lib/TextareaItem/index.js +19 -26
  273. package/lib/Toast/index.js +3 -4
  274. package/lib/UrlFormatter/index.js +3 -4
  275. package/lib/common/editor-base.js +7 -12
  276. package/lib/hooks/common-hooks.js +2 -4
  277. package/lib/select-editor/index.js +1 -3
  278. package/lib/select-editor/mb-editor/index.js +17 -28
  279. package/lib/select-editor/pc-editor/index.js +27 -42
  280. package/lib/toaster/alert.js +6 -7
  281. package/lib/toaster/toast.js +2 -3
  282. package/lib/toaster/toastManager.js +2 -4
  283. package/lib/utils/cell.js +8 -11
  284. package/lib/utils/column-utils.js +8 -14
  285. package/lib/utils/departments.js +1 -3
  286. package/lib/utils/url.js +24 -31
  287. package/lib/utils/utils.js +2 -6
  288. package/package.json +8 -8
@@ -21,12 +21,8 @@ class FilterGroup extends _react.Component {
21
21
  constructor() {
22
22
  super(...arguments);
23
23
  this.onSelectGroupConjunction = conjunctionOption => {
24
- const {
25
- filterConjunction
26
- } = this.props;
27
- const {
28
- filterConjunction: newConjunction
29
- } = conjunctionOption;
24
+ const filterConjunction = this.props.filterConjunction;
25
+ const newConjunction = conjunctionOption.filterConjunction;
30
26
  if (newConjunction === filterConjunction) {
31
27
  return;
32
28
  }
@@ -34,22 +30,17 @@ class FilterGroup extends _react.Component {
34
30
  };
35
31
  this.deleteFilterGroup = event => {
36
32
  event.nativeEvent.stopImmediatePropagation();
37
- const {
38
- index
39
- } = this.props;
33
+ const index = this.props.index;
40
34
  this.props.deleteFilterGroup(index);
41
35
  };
42
36
  this.modifyConjunctionInGroup = new_filter_conjunction => {
43
- const {
44
- index
45
- } = this.props;
37
+ const index = this.props.index;
46
38
  this.props.modifyConjunctionInGroup(index, new_filter_conjunction);
47
39
  };
48
40
  this.addFilterIntoGroup = () => {
49
- const {
50
- columns,
51
- index
52
- } = this.props;
41
+ const _this$props = this.props,
42
+ columns = _this$props.columns,
43
+ index = _this$props.index;
53
44
  const newFilter = (0, _utils.getDefaultFilter)(columns);
54
45
  if (!newFilter) {
55
46
  return;
@@ -57,23 +48,18 @@ class FilterGroup extends _react.Component {
57
48
  this.props.addFilterIntoGroup(index, newFilter);
58
49
  };
59
50
  this.deleteFilterInGroup = filter_index => {
60
- const {
61
- index
62
- } = this.props;
51
+ const index = this.props.index;
63
52
  this.props.deleteFilterInGroup(index, filter_index);
64
53
  };
65
54
  this.updateFilterInGroup = (filter_index, new_filter) => {
66
- const {
67
- index
68
- } = this.props;
55
+ const index = this.props.index;
69
56
  this.props.updateFilterInGroup(index, filter_index, new_filter);
70
57
  };
71
58
  this.renderConjunction = () => {
72
- const {
73
- index,
74
- filterConjunction,
75
- conjunctionOptions
76
- } = this.props;
59
+ const _this$props2 = this.props,
60
+ index = _this$props2.index,
61
+ filterConjunction = _this$props2.filterConjunction,
62
+ conjunctionOptions = _this$props2.conjunctionOptions;
77
63
  switch (index) {
78
64
  case 0:
79
65
  {
@@ -98,35 +84,29 @@ class FilterGroup extends _react.Component {
98
84
  }
99
85
  };
100
86
  this.renderGroupFilters = () => {
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;
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;
118
101
  const subFilterConjunction = _constants.SUPPORT_CONJUNCTIONS.includes(filter_conjunction) ? filter_conjunction : _dtableUtils.FILTER_CONJUNCTION_TYPE.AND;
119
102
  const subFiltersLength = Array.isArray(subFilters) ? subFilters.length : 0;
120
103
  if (subFiltersLength === 0) {
121
104
  return null;
122
105
  }
123
106
  return subFilters.map((currentFilter, subFilterIndex) => {
124
- const {
125
- column_key: sub_filter_column_key
126
- } = currentFilter;
127
- const {
128
- error_message
129
- } = _dtableUtils.ValidateFilter.validate(currentFilter, columns);
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;
130
110
  const filterColumn = columns.find(column => column.key === sub_filter_column_key) || {};
131
111
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterItem.default, {
132
112
  isInModal: this.props.isInModal,
@@ -151,11 +131,10 @@ class FilterGroup extends _react.Component {
151
131
  };
152
132
  }
153
133
  render() {
154
- const {
155
- level,
156
- index,
157
- readOnly
158
- } = this.props;
134
+ const _this$props4 = this.props,
135
+ level = _this$props4.level,
136
+ index = _this$props4.index,
137
+ readOnly = _this$props4.readOnly;
159
138
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
160
139
  className: (0, _classnames.default)('filter-item', 'filter-group', "level-".concat(level)),
161
140
  children: [!readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -32,21 +32,16 @@ class FilterItem extends _react.default.Component {
32
32
  super(_props);
33
33
  _this = this;
34
34
  this.initSelectOptions = props => {
35
- const {
36
- filter,
37
- filterColumn
38
- } = props;
39
- let {
40
- filterPredicateList,
41
- filterTermModifierList
42
- } = (0, _utils.getColumnOptions)(filterColumn);
35
+ const filter = props.filter,
36
+ filterColumn = props.filterColumn;
37
+ let _getColumnOptions = (0, _utils.getColumnOptions)(filterColumn),
38
+ filterPredicateList = _getColumnOptions.filterPredicateList,
39
+ filterTermModifierList = _getColumnOptions.filterTermModifierList;
43
40
  // The value of the calculation formula column does not exist in the shared view
44
41
  this.filterPredicateOptions = filterPredicateList ? filterPredicateList.map(predicate => {
45
42
  return _filterItemUtils.default.generatorPredicateOption(predicate);
46
43
  }).filter(item => item) : [];
47
- const {
48
- filter_predicate
49
- } = filter;
44
+ const filter_predicate = filter.filter_predicate;
50
45
  if ((0, _dtableUtils.isDateColumn)(filterColumn)) {
51
46
  if (filter_predicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_WITHIN) {
52
47
  filterTermModifierList = _dtableUtils.filterTermModifierIsWithin;
@@ -58,9 +53,7 @@ class FilterItem extends _react.default.Component {
58
53
  };
59
54
  this.onDeleteFilter = event => {
60
55
  event.nativeEvent.stopImmediatePropagation();
61
- const {
62
- index
63
- } = this.props;
56
+ const index = this.props.index;
64
57
  this.props.deleteFilter(index);
65
58
  };
66
59
  this.resetState = filter => {
@@ -69,22 +62,17 @@ class FilterItem extends _react.default.Component {
69
62
  });
70
63
  };
71
64
  this.onSelectConjunction = value => {
72
- const {
73
- filterConjunction
74
- } = this.props;
65
+ const filterConjunction = this.props.filterConjunction;
75
66
  if (filterConjunction === value.filterConjunction) {
76
67
  return;
77
68
  }
78
69
  this.props.updateConjunction(value.filterConjunction);
79
70
  };
80
71
  this.onSelectColumn = value => {
81
- const {
82
- index,
83
- filter
84
- } = this.props;
85
- const {
86
- column
87
- } = value;
72
+ const _this$props = this.props,
73
+ index = _this$props.index,
74
+ filter = _this$props.filter;
75
+ const column = value.column;
88
76
  if (column.key === filter.column_key) return;
89
77
  let newFilter = (0, _utils.getFilterByColumn)(column, filter);
90
78
  if (!newFilter) return;
@@ -92,14 +80,11 @@ class FilterItem extends _react.default.Component {
92
80
  this.props.updateFilter(index, newFilter);
93
81
  };
94
82
  this.onSelectPredicate = value => {
95
- const {
96
- index,
97
- filter,
98
- filterColumn
99
- } = this.props;
100
- const {
101
- filterPredicate
102
- } = 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;
103
88
  if (filter.filter_predicate === filterPredicate) {
104
89
  return;
105
90
  }
@@ -108,13 +93,10 @@ class FilterItem extends _react.default.Component {
108
93
  this.props.updateFilter(index, newFilter);
109
94
  };
110
95
  this.onSelectTermModifier = value => {
111
- const {
112
- index,
113
- filter
114
- } = this.props;
115
- const {
116
- filterTermModifier
117
- } = value;
96
+ const _this$props3 = this.props,
97
+ index = _this$props3.index,
98
+ filter = _this$props3.filter;
99
+ const filterTermModifier = value.filterTermModifier;
118
100
  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];
119
101
  if (filter.filter_term_modifier === filterTermModifier) {
120
102
  return;
@@ -131,13 +113,10 @@ class FilterItem extends _react.default.Component {
131
113
  this.props.updateFilter(index, newFilter);
132
114
  };
133
115
  this.onSelectSingle = value => {
134
- const {
135
- index,
136
- filter
137
- } = this.props;
138
- const {
139
- columnOption: option
140
- } = value;
116
+ const _this$props4 = this.props,
117
+ index = _this$props4.index,
118
+ filter = _this$props4.filter;
119
+ const option = value.columnOption;
141
120
  if (filter.filter_term === option.id) {
142
121
  return;
143
122
  }
@@ -146,37 +125,28 @@ class FilterItem extends _react.default.Component {
146
125
  this.props.updateFilter(index, newFilter);
147
126
  };
148
127
  this.onSelectMultiple = value => {
149
- const {
150
- index,
151
- filter
152
- } = this.props;
153
- const {
154
- columnOption: option
155
- } = value;
128
+ const _this$props5 = this.props,
129
+ index = _this$props5.index,
130
+ filter = _this$props5.filter;
131
+ const option = value.columnOption;
156
132
  let newFilter = (0, _utils.getUpdatedFilterBySelectMultiple)(filter, option);
157
133
  this.resetState(newFilter);
158
134
  this.props.updateFilter(index, newFilter);
159
135
  };
160
136
  this.onSelectCollaborator = value => {
161
- const {
162
- index,
163
- filter
164
- } = this.props;
165
- const {
166
- columnOption: collaborator
167
- } = value;
137
+ const _this$props6 = this.props,
138
+ index = _this$props6.index,
139
+ filter = _this$props6.filter;
140
+ const collaborator = value.columnOption;
168
141
  let newFilter = (0, _utils.getUpdatedFilterByCollaborator)(filter, collaborator);
169
142
  this.resetState(newFilter);
170
143
  this.props.updateFilter(index, newFilter);
171
144
  };
172
145
  this.onSelectCreator = value => {
173
- const {
174
- index,
175
- filter
176
- } = this.props;
177
- const {
178
- columnOption: collaborator
179
- } = value;
146
+ const _this$props7 = this.props,
147
+ index = _this$props7.index,
148
+ filter = _this$props7.filter;
149
+ const collaborator = value.columnOption;
180
150
  let newFilter = (0, _utils.getUpdatedFilterByCreator)(filter, collaborator);
181
151
  // the predicate is 'is' or 'is not'
182
152
  if (!newFilter) {
@@ -203,13 +173,10 @@ class FilterItem extends _react.default.Component {
203
173
  this.onFilterTermChanged(value);
204
174
  };
205
175
  this.onFilterTermChanged = newFilterTerm => {
206
- const {
207
- index,
208
- filter
209
- } = this.props;
210
- const {
211
- filterTerm
212
- } = this.state;
176
+ const _this$props8 = this.props,
177
+ index = _this$props8.index,
178
+ filter = _this$props8.filter;
179
+ const filterTerm = this.state.filterTerm;
213
180
  if (newFilterTerm !== filterTerm) {
214
181
  this.setState({
215
182
  filterTerm: newFilterTerm
@@ -234,14 +201,11 @@ class FilterItem extends _react.default.Component {
234
201
  this.onFilterTermChanged(index);
235
202
  };
236
203
  this.getInputComponent = type => {
237
- const {
238
- filterColumn,
239
- readOnly,
240
- isInModal
241
- } = this.props;
242
- const {
243
- filterTerm
244
- } = this.state;
204
+ const _this$props9 = this.props,
205
+ filterColumn = _this$props9.filterColumn,
206
+ readOnly = _this$props9.readOnly,
207
+ isInModal = _this$props9.isInModal;
208
+ const filterTerm = this.state.filterTerm;
245
209
  if (type === _constants.INPUT_CMP_TYPE_MAP.TEXT) {
246
210
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
247
211
  value: filterTerm,
@@ -284,13 +248,12 @@ class FilterItem extends _react.default.Component {
284
248
  }
285
249
  };
286
250
  this.renderConjunction = () => {
287
- const {
288
- index,
289
- filterConjunction,
290
- conjunctionOptions,
291
- readOnly,
292
- isInModal
293
- } = this.props;
251
+ const _this$props0 = this.props,
252
+ index = _this$props0.index,
253
+ filterConjunction = _this$props0.filterConjunction,
254
+ conjunctionOptions = _this$props0.conjunctionOptions,
255
+ readOnly = _this$props0.readOnly,
256
+ isInModal = _this$props0.isInModal;
294
257
  switch (index) {
295
258
  case 0:
296
259
  {
@@ -319,13 +282,10 @@ class FilterItem extends _react.default.Component {
319
282
  this.renderMultipleSelectOption = function () {
320
283
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
321
284
  let filterTerm = arguments.length > 1 ? arguments[1] : undefined;
322
- const {
323
- filter,
324
- readOnly
325
- } = _this.props;
326
- const {
327
- filter_predicate
328
- } = filter;
285
+ const _this$props1 = _this.props,
286
+ filter = _this$props1.filter,
287
+ readOnly = _this$props1.readOnly;
288
+ const filter_predicate = filter.filter_predicate;
329
289
  let isSupportMultipleSelect = false;
330
290
  // The first two options are used for single selection, and the last four options are used for multiple selection
331
291
  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];
@@ -381,24 +341,19 @@ class FilterItem extends _react.default.Component {
381
341
  });
382
342
  };
383
343
  this.renderFilterTerm = filterColumn => {
384
- const {
385
- index,
386
- filter,
387
- collaborators,
388
- userDepartmentIdsMap,
389
- departments,
390
- lang,
391
- firstDayOfWeek,
392
- readOnly
393
- } = this.props;
394
- const {
395
- type
396
- } = filterColumn;
397
- const {
398
- filter_term,
399
- filter_predicate,
400
- filter_term_modifier
401
- } = filter;
344
+ const _this$props10 = this.props,
345
+ index = _this$props10.index,
346
+ filter = _this$props10.filter,
347
+ collaborators = _this$props10.collaborators,
348
+ userDepartmentIdsMap = _this$props10.userDepartmentIdsMap,
349
+ departments = _this$props10.departments,
350
+ lang = _this$props10.lang,
351
+ firstDayOfWeek = _this$props10.firstDayOfWeek,
352
+ readOnly = _this$props10.readOnly;
353
+ const type = filterColumn.type;
354
+ const filter_term = filter.filter_term,
355
+ filter_predicate = filter.filter_predicate,
356
+ filter_term_modifier = filter.filter_term_modifier;
402
357
  // predicate is empty or not empty
403
358
  if (_constants.EMPTY_PREDICATE.includes(filter_predicate)) {
404
359
  return null;
@@ -455,9 +410,9 @@ class FilterItem extends _react.default.Component {
455
410
  case _dtableUtils.CellType.SINGLE_SELECT:
456
411
  {
457
412
  // get options
458
- let {
459
- options = []
460
- } = filterColumn.data || {};
413
+ let _ref = filterColumn.data || {},
414
+ _ref$options = _ref.options,
415
+ options = _ref$options === void 0 ? [] : _ref$options;
461
416
  if ([_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF].includes(filter_predicate)) {
462
417
  return this.renderMultipleSelectOption(options, filter_term);
463
418
  }
@@ -497,9 +452,9 @@ class FilterItem extends _react.default.Component {
497
452
  }
498
453
  case _dtableUtils.CellType.MULTIPLE_SELECT:
499
454
  {
500
- let {
501
- options = []
502
- } = filterColumn.data || {};
455
+ let _ref2 = filterColumn.data || {},
456
+ _ref2$options = _ref2.options,
457
+ options = _ref2$options === void 0 ? [] : _ref2$options;
503
458
  return this.renderMultipleSelectOption(options, filter_term);
504
459
  }
505
460
  case _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT:
@@ -557,9 +512,8 @@ class FilterItem extends _react.default.Component {
557
512
  }
558
513
  case _dtableUtils.CellType.RATE:
559
514
  {
560
- let {
561
- rate_max_number
562
- } = filterColumn.data || {};
515
+ let _ref3 = filterColumn.data || {},
516
+ rate_max_number = _ref3.rate_max_number;
563
517
  let rateList = [];
564
518
  for (let i = 0; i < rate_max_number; i++) {
565
519
  let rateItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rateItem.default, {
@@ -596,19 +550,16 @@ class FilterItem extends _react.default.Component {
596
550
  }
597
551
  };
598
552
  this.renderFormulaFilterTerm = (filterPredicate, filterTerm, index, filterColumn) => {
599
- const {
600
- data
601
- } = filterColumn || {};
602
- const {
603
- result_type
604
- } = data || {};
553
+ const _ref4 = filterColumn || {},
554
+ data = _ref4.data;
555
+ const _ref5 = data || {},
556
+ result_type = _ref5.result_type;
605
557
  if (filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_CURRENT_USER_ID) {
606
558
  return null;
607
559
  }
608
560
  if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.NUMBER) {
609
- const {
610
- format
611
- } = filterColumn.data || {};
561
+ const _ref6 = filterColumn.data || {},
562
+ format = _ref6.format;
612
563
  if (format === _dtableUtils.CellType.DURATION) {
613
564
  return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.DURATION, filterColumn);
614
565
  }
@@ -626,18 +577,15 @@ class FilterItem extends _react.default.Component {
626
577
  return this.renderFilterTermByArrayType(filterPredicate, filterTerm, index, filterColumn);
627
578
  };
628
579
  this.renderFilterTermByArrayType = (filterPredicate, filterTerm, index, filterColumn) => {
629
- const {
630
- collaborators,
631
- departments,
632
- readOnly
633
- } = this.props;
634
- const {
635
- data
636
- } = filterColumn || {};
637
- const {
638
- array_type,
639
- array_data
640
- } = data || {};
580
+ const _this$props11 = this.props,
581
+ collaborators = _this$props11.collaborators,
582
+ departments = _this$props11.departments,
583
+ readOnly = _this$props11.readOnly;
584
+ const _ref7 = filterColumn || {},
585
+ data = _ref7.data;
586
+ const _ref8 = data || {},
587
+ array_type = _ref8.array_type,
588
+ array_data = _ref8.array_data;
641
589
  if (!array_type) {
642
590
  return null;
643
591
  }
@@ -646,9 +594,9 @@ class FilterItem extends _react.default.Component {
646
594
  data: array_data
647
595
  };
648
596
  if (array_type === _dtableUtils.CellType.SINGLE_SELECT || array_type === _dtableUtils.CellType.MULTIPLE_SELECT) {
649
- let {
650
- options = []
651
- } = array_data || {};
597
+ let _ref9 = array_data || {},
598
+ _ref9$options = _ref9.options,
599
+ options = _ref9$options === void 0 ? [] : _ref9$options;
652
600
  return this.renderMultipleSelectOption(options, filterTerm);
653
601
  }
654
602
  if (array_type === _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT) {
@@ -680,9 +628,7 @@ class FilterItem extends _react.default.Component {
680
628
  return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.TEXT);
681
629
  };
682
630
  this.isRenderErrorTips = () => {
683
- const {
684
- errMsg
685
- } = this.props;
631
+ const errMsg = this.props.errMsg;
686
632
  return errMsg && errMsg !== _dtableUtils.FILTER_ERR_MSG.INCOMPLETE_FILTER;
687
633
  };
688
634
  this.renderErrorMessage = () => {
@@ -712,9 +658,7 @@ class FilterItem extends _react.default.Component {
712
658
  this.initSelectOptions(_props);
713
659
  }
714
660
  UNSAFE_componentWillReceiveProps(nextProps) {
715
- const {
716
- filter
717
- } = this.props;
661
+ const filter = this.props.filter;
718
662
  if (nextProps.filter !== filter) {
719
663
  this.initSelectOptions(nextProps);
720
664
  this.setState({
@@ -728,20 +672,15 @@ class FilterItem extends _react.default.Component {
728
672
  return shouldUpdated;
729
673
  }
730
674
  render() {
731
- const {
732
- filterPredicateOptions,
733
- filterTermModifierOptions
734
- } = this;
735
- const {
736
- filter,
737
- filterColumn,
738
- filterColumnOptions,
739
- readOnly
740
- } = this.props;
741
- const {
742
- filter_predicate,
743
- filter_term_modifier
744
- } = filter;
675
+ const filterPredicateOptions = this.filterPredicateOptions,
676
+ filterTermModifierOptions = this.filterTermModifierOptions;
677
+ const _this$props12 = this.props,
678
+ filter = _this$props12.filter,
679
+ filterColumn = _this$props12.filterColumn,
680
+ filterColumnOptions = _this$props12.filterColumnOptions,
681
+ readOnly = _this$props12.readOnly;
682
+ const filter_predicate = filter.filter_predicate,
683
+ filter_term_modifier = filter.filter_term_modifier;
745
684
  const activeColumn = _filterItemUtils.default.generatorColumnOption(filterColumn);
746
685
  const activePredicate = _filterItemUtils.default.generatorPredicateOption(filter_predicate, true);
747
686
  let activeTermModifier = null;
@@ -751,9 +690,7 @@ class FilterItem extends _react.default.Component {
751
690
  } else if ((0, _columnUtils.isCheckboxColumn)(filterColumn)) {
752
691
  _isCheckboxColumn = true;
753
692
  }
754
- const {
755
- type
756
- } = filterColumn;
693
+ const type = filterColumn.type;
757
694
  const computedColumnTypes = [_dtableUtils.CellType.FORMULA, _dtableUtils.CellType.LINK_FORMULA, _dtableUtils.CellType.LINK];
758
695
  const isContainPredicate = [_dtableUtils.FILTER_PREDICATE_TYPE.CONTAINS, _dtableUtils.FILTER_PREDICATE_TYPE.NOT_CONTAIN].includes(filter_predicate);
759
696
  const isRenderErrorTips = this.isRenderErrorTips();