dtable-ui-component 6.0.126-beta.s1 → 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 (307) hide show
  1. package/lib/ActionSheet/index.js +14 -16
  2. package/lib/ActivityIndicator/index.js +7 -8
  3. package/lib/AsyncUserSelect/index.css +19 -46
  4. package/lib/AsyncUserSelect/index.js +58 -41
  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.css +43 -67
  43. package/lib/DTableCustomizeSelect/index.js +29 -40
  44. package/lib/DTableDropdownItem/index.js +16 -18
  45. package/lib/DTableDropdownMenu/index.js +8 -10
  46. package/lib/DTableEmptyTip/index.js +4 -5
  47. package/lib/DTableFiltersPopover/index.css +0 -2
  48. package/lib/DTableFiltersPopover/index.js +26 -41
  49. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -5
  50. package/lib/DTableFiltersPopover/utils/index.js +63 -113
  51. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -10
  52. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
  53. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
  54. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
  55. package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
  56. package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
  57. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
  58. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
  59. package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
  60. package/lib/DTableGroupSelect/index.css +5 -31
  61. package/lib/DTableGroupSelect/index.js +13 -17
  62. package/lib/DTableGroupSelect/select-option-group.css +15 -11
  63. package/lib/DTableGroupSelect/select-option-group.js +31 -43
  64. package/lib/DTableIcon/index.js +6 -7
  65. package/lib/DTableIcon/svg-icon.js +5 -7
  66. package/lib/DTableModalHeader/index.js +1 -3
  67. package/lib/DTablePopover/index.js +13 -16
  68. package/lib/DTableRadio/index.js +10 -9
  69. package/lib/DTableRadioGroup/index.js +8 -17
  70. package/lib/DTableSearchInput/index.js +19 -29
  71. package/lib/DTableSelect/dtable-select-label.css +4 -4
  72. package/lib/DTableSelect/dtable-select-label.js +7 -6
  73. package/lib/DTableSelect/index.js +24 -25
  74. package/lib/DTableSelect/user-select.css +46 -7
  75. package/lib/DTableSelect/utils.js +82 -179
  76. package/lib/DTableSubDropdownMenu/index.js +8 -10
  77. package/lib/DTableSubDropdownToggle/index.js +12 -12
  78. package/lib/DTableSwitch/index.css +0 -1
  79. package/lib/DTableSwitch/index.js +12 -11
  80. package/lib/DTableToolTip/index.js +7 -8
  81. package/lib/DateEditor/index.js +20 -15
  82. package/lib/DateEditor/mb-editor/index.js +18 -31
  83. package/lib/DateEditor/pc-editor.js +26 -45
  84. package/lib/DateFormatter/index.js +4 -5
  85. package/lib/DatePicker/index.js +9 -15
  86. package/lib/DatePicker/utils.js +1 -3
  87. package/lib/DeleteTip/index.js +5 -6
  88. package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
  89. package/lib/DepartmentSelectFilter/index.js +6 -8
  90. package/lib/DepartmentSingleSelectEditor/index.js +1 -3
  91. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
  92. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
  93. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
  94. package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
  95. package/lib/DigitalSignEditor/index.js +1 -3
  96. package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
  97. package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
  98. package/lib/DigitalSignEditor/service.js +2 -4
  99. package/lib/DigitalSignEditor/signature-board/index.js +5 -8
  100. package/lib/DigitalSignEditor/utils.js +2 -4
  101. package/lib/DigitalSignFormatter/index.js +12 -15
  102. package/lib/DigitalSignFormatter/utils.js +4 -5
  103. package/lib/DurationEditor/index.js +21 -31
  104. package/lib/DurationFormatter/index.js +4 -5
  105. package/lib/EditEditorButton/index.js +1 -3
  106. package/lib/EmailFormatter/index.js +3 -4
  107. package/lib/FieldDisplaySetting/field-item.js +12 -12
  108. package/lib/FieldDisplaySetting/index.js +11 -9
  109. package/lib/FileEditor/files-previewer/index.js +1 -3
  110. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
  111. package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
  112. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
  113. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
  114. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
  115. package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
  116. package/lib/FileEditor/index.js +1 -3
  117. package/lib/FileEditor/mb-editor/index.js +28 -20
  118. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
  119. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
  120. package/lib/FileEditor/pc-editor/index.js +19 -27
  121. package/lib/FileFormatter/index.js +26 -19
  122. package/lib/FileItemFormatter/index.js +6 -9
  123. package/lib/FileUploader/index.js +28 -45
  124. package/lib/FormulaFormatter/index.js +15 -29
  125. package/lib/GeolocationEditor/index.js +11 -12
  126. package/lib/GeolocationEditor/map-editor-utils.js +17 -15
  127. package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
  128. package/lib/GeolocationEditor/mb-editor/index.js +4 -6
  129. package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
  130. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
  131. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
  132. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
  133. package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
  134. package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
  135. package/lib/GeolocationEditor/pc-editor/index.js +12 -20
  136. package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
  137. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
  138. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
  139. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
  140. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
  141. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
  142. package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
  143. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
  144. package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
  145. package/lib/GeolocationFormatter/index.js +4 -5
  146. package/lib/HtmlLongTextFormatter/index.js +4 -12
  147. package/lib/Icon/index.js +3 -5
  148. package/lib/IconButton/index.js +4 -6
  149. package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
  150. package/lib/ImageEditor/images-previewer/index.js +3 -9
  151. package/lib/ImageEditor/index.js +1 -3
  152. package/lib/ImageEditor/mb-editor/index.js +28 -20
  153. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
  154. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
  155. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
  156. package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
  157. package/lib/ImageEditor/pc-editor/index.js +11 -16
  158. package/lib/ImageFormatter/images-lazy-load.js +19 -11
  159. package/lib/ImageFormatter/index.js +11 -13
  160. package/lib/ImagePreviewerLightbox/index.js +15 -13
  161. package/lib/ImageThumbnail/index.js +10 -13
  162. package/lib/InputItem/custom-input.js +26 -46
  163. package/lib/InputItem/custom-keyboard.js +15 -18
  164. package/lib/InputItem/index.js +34 -50
  165. package/lib/InputItem/input.js +2 -4
  166. package/lib/LastModifierFormatter/index.js +6 -8
  167. package/lib/LinkEditor/index.js +33 -53
  168. package/lib/LinkEditor/link-editor-option.js +3 -4
  169. package/lib/LinkEditor/mb-popover/index.js +9 -22
  170. package/lib/LinkEditor/pc-popover/index.js +5 -10
  171. package/lib/LinkFormatter/index.js +21 -37
  172. package/lib/List/index.js +6 -8
  173. package/lib/List/list-item.js +22 -28
  174. package/lib/LongTextFormatter/index.js +4 -5
  175. package/lib/MBEditorHeader/index.js +7 -8
  176. package/lib/MTimeFormatter/index.js +3 -4
  177. package/lib/MobileFullScreenPage/body/index.js +3 -5
  178. package/lib/MobileFullScreenPage/header/index.js +4 -6
  179. package/lib/MobileFullScreenPage/index.js +13 -11
  180. package/lib/MobileModal/index.js +1 -3
  181. package/lib/MobileOperationSheet/index.js +7 -8
  182. package/lib/MobileSelector/empty/index.js +1 -3
  183. package/lib/MobileSelector/index.js +5 -7
  184. package/lib/MobileSelector/option/index.js +3 -5
  185. package/lib/MobileSelector/options/index.js +1 -3
  186. package/lib/MobileSelector/search/index.js +3 -5
  187. package/lib/MobileUpload/index.js +4 -5
  188. package/lib/Modal/modal.js +14 -15
  189. package/lib/Modal/prompt.js +4 -4
  190. package/lib/MultipleSelectEditor/index.js +1 -3
  191. package/lib/MultipleSelectFormatter/index.js +6 -8
  192. package/lib/NotificationPopover/index.css +1 -6
  193. package/lib/NotificationPopover/index.js +6 -7
  194. package/lib/NumberEditor/index.js +12 -21
  195. package/lib/NumberFormatter/index.js +4 -5
  196. package/lib/PhoneNumberLink/index.js +2 -4
  197. package/lib/Picker/AbstractPicker.js +23 -27
  198. package/lib/Popover/index.js +3 -4
  199. package/lib/Popover/item.js +7 -9
  200. package/lib/Progress/index.js +9 -8
  201. package/lib/Radio/Radio.js +4 -8
  202. package/lib/Radio/RadioItem.js +8 -12
  203. package/lib/RateFormatter/index.js +13 -13
  204. package/lib/RoleStatusEditor/index.js +18 -17
  205. package/lib/RowExpandDialog/body/index.js +32 -49
  206. package/lib/RowExpandDialog/column-content/index.js +5 -9
  207. package/lib/RowExpandDialog/header/index.js +6 -8
  208. package/lib/RowExpandDialog/index.js +49 -34
  209. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
  210. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
  211. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
  212. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
  213. package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
  214. package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
  215. package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
  216. package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
  217. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
  218. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
  219. package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
  220. package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
  221. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
  222. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
  223. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
  224. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
  225. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
  226. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
  227. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
  228. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
  229. package/lib/RowExpandEditor/index.js +4 -8
  230. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
  231. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
  232. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
  233. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
  234. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
  235. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
  236. package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
  237. package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
  238. package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
  239. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
  240. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
  241. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
  242. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
  243. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
  244. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
  245. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
  246. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
  247. package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
  248. package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
  249. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
  250. package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
  251. package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
  252. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
  253. package/lib/RowExpandFormatter/index.js +27 -41
  254. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
  255. package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
  256. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
  257. package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
  258. package/lib/RowExpandFormatter/text/index.js +4 -5
  259. package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
  260. package/lib/RowExpandView/body/index.js +22 -35
  261. package/lib/RowExpandView/column-content/index.js +3 -7
  262. package/lib/RowExpandView/index.js +42 -30
  263. package/lib/SelectItem/index.js +5 -7
  264. package/lib/SelectOptionGroup/index.css +25 -53
  265. package/lib/SelectOptionGroup/index.js +36 -84
  266. package/lib/SelectedDepartments/index.js +7 -9
  267. package/lib/SimpleLongTextFormatter/index.js +10 -16
  268. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
  269. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
  270. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
  271. package/lib/SingleSelectEditor/index.js +1 -3
  272. package/lib/SingleSelectFormatter/index.js +8 -9
  273. package/lib/TabBar/Tab.js +14 -16
  274. package/lib/TabBar/index.js +18 -21
  275. package/lib/Tabs/index.js +1 -3
  276. package/lib/TextEditor/index.js +14 -23
  277. package/lib/TextFormatter/index.js +3 -4
  278. package/lib/TextareaItem/index.js +19 -26
  279. package/lib/Toast/index.js +3 -4
  280. package/lib/UrlFormatter/index.js +3 -4
  281. package/lib/common/editor-base.js +7 -12
  282. package/lib/hooks/common-hooks.js +2 -4
  283. package/lib/index.js +0 -7
  284. package/lib/select-editor/index.js +1 -3
  285. package/lib/select-editor/mb-editor/index.js +17 -28
  286. package/lib/select-editor/pc-editor/index.js +27 -42
  287. package/lib/toaster/alert.js +6 -7
  288. package/lib/toaster/toast.js +2 -3
  289. package/lib/toaster/toastManager.js +2 -4
  290. package/lib/utils/cell.js +8 -11
  291. package/lib/utils/column-utils.js +8 -14
  292. package/lib/utils/departments.js +1 -3
  293. package/lib/utils/url.js +24 -31
  294. package/lib/utils/utils.js +2 -6
  295. package/package.json +8 -8
  296. package/lib/DTableCustomizeSearchInput/index.css +0 -81
  297. package/lib/DTableCustomizeSearchInput/index.js +0 -141
  298. package/lib/DTableCustomizeSelect/select-option-group/KeyCodes.js +0 -109
  299. package/lib/DTableCustomizeSelect/select-option-group/index.css +0 -134
  300. package/lib/DTableCustomizeSelect/select-option-group/index.js +0 -260
  301. package/lib/DTableCustomizeSelect/select-option-group/option.js +0 -48
  302. package/lib/DTableCustomizeSelect/util.js +0 -12
  303. package/lib/DTableSelect/select-dropdown-indicator/index.css +0 -16
  304. package/lib/DTableSelect/select-dropdown-indicator/index.js +0 -26
  305. package/lib/DTableSelect/select-style.js +0 -133
  306. package/lib/assets/icons/close.svg +0 -1
  307. package/lib/assets/icons/down.svg +0 -3
@@ -18,10 +18,8 @@ const isArrayFilterTermByArrayType = array_type => {
18
18
  return _dtableUtils.COLLABORATOR_COLUMN_TYPES.includes(array_type) || array_type === _dtableUtils.CellType.SINGLE_SELECT || array_type === _dtableUtils.CellType.MULTIPLE_SELECT;
19
19
  };
20
20
  const isFilterTermArray = (column, filterPredicate) => {
21
- const {
22
- type,
23
- data
24
- } = column;
21
+ const type = column.type,
22
+ data = column.data;
25
23
  if (_constants.MULTIPLE_SELECTOR_COLUMNS.includes(type)) {
26
24
  return true;
27
25
  }
@@ -29,17 +27,15 @@ const isFilterTermArray = (column, filterPredicate) => {
29
27
  return true;
30
28
  }
31
29
  if (_dtableUtils.FORMULA_COLUMN_TYPES_MAP[type]) {
32
- const {
33
- result_type,
34
- array_type
35
- } = data || {};
30
+ const _ref = data || {},
31
+ result_type = _ref.result_type,
32
+ array_type = _ref.array_type;
36
33
  if (result_type !== _dtableUtils.FORMULA_RESULT_TYPE.ARRAY) return false;
37
34
  return isArrayFilterTermByArrayType(array_type);
38
35
  }
39
36
  if (type === _dtableUtils.CellType.LINK) {
40
- const {
41
- array_type
42
- } = data || {};
37
+ const _ref2 = data || {},
38
+ array_type = _ref2.array_type;
43
39
  return isArrayFilterTermByArrayType(array_type);
44
40
  }
45
41
  return false;
@@ -47,10 +43,8 @@ const isFilterTermArray = (column, filterPredicate) => {
47
43
  exports.isFilterTermArray = isFilterTermArray;
48
44
  const getUpdatedFilterByCreator = (filter, collaborator) => {
49
45
  const multipleSelectType = [_dtableUtils.FILTER_PREDICATE_TYPE.CONTAINS, _dtableUtils.FILTER_PREDICATE_TYPE.NOT_CONTAIN];
50
- let {
51
- filter_predicate,
52
- filter_term: filterTerm
53
- } = filter;
46
+ let filter_predicate = filter.filter_predicate,
47
+ filterTerm = filter.filter_term;
54
48
  if (multipleSelectType.includes(filter_predicate)) {
55
49
  filterTerm = filterTerm ? filter.filter_term.slice(0) : [];
56
50
  let selectedEmail = collaborator.email;
@@ -124,18 +118,15 @@ const getUpdatedFilterByRate = (filter, value) => {
124
118
  };
125
119
  exports.getUpdatedFilterByRate = getUpdatedFilterByRate;
126
120
  const getColumnOptions = column => {
127
- const {
128
- type,
129
- data
130
- } = column;
121
+ const type = column.type,
122
+ data = column.data;
131
123
  if (_dtableUtils.FORMULA_COLUMN_TYPES_MAP[type]) {
132
124
  return getFormulaColumnFilterOptions(column);
133
125
  }
134
126
  if (type === _dtableUtils.CellType.LINK) {
135
- const {
136
- array_type,
137
- array_data
138
- } = data || {};
127
+ const _ref3 = data || {},
128
+ array_type = _ref3.array_type,
129
+ array_data = _ref3.array_data;
139
130
  if (array_type === _dtableUtils.FORMULA_RESULT_TYPE.BOOL) {
140
131
  return (0, _dtableUtils.getColumnFilterOptions)({
141
132
  type: _dtableUtils.CellType.CHECKBOX
@@ -152,14 +143,11 @@ const getColumnOptions = column => {
152
143
  };
153
144
  exports.getColumnOptions = getColumnOptions;
154
145
  const getFormulaColumnFilterOptions = column => {
155
- const {
156
- data
157
- } = column;
158
- const {
159
- result_type,
160
- array_type,
161
- array_data
162
- } = data || {};
146
+ const data = column.data;
147
+ const _ref4 = data || {},
148
+ result_type = _ref4.result_type,
149
+ array_type = _ref4.array_type,
150
+ array_data = _ref4.array_data;
163
151
  if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.BOOL) {
164
152
  return (0, _dtableUtils.getColumnFilterOptions)({
165
153
  type: _dtableUtils.CellType.CHECKBOX
@@ -215,9 +203,7 @@ const getFilterOptionsByArrayType = (array_type, array_data) => {
215
203
  type: _dtableUtils.CellType.TEXT,
216
204
  data: array_data
217
205
  });
218
- const {
219
- filterPredicateList
220
- } = filterOptions;
206
+ const filterPredicateList = filterOptions.filterPredicateList;
221
207
  if (filterPredicateList && !filterPredicateList.includes(_dtableUtils.FILTER_PREDICATE_TYPE.EMPTY)) {
222
208
  filterPredicateList.push(_dtableUtils.FILTER_PREDICATE_TYPE.EMPTY);
223
209
  }
@@ -228,13 +214,10 @@ const getFilterOptionsByArrayType = (array_type, array_data) => {
228
214
  };
229
215
  const getFilterByColumn = function (column) {
230
216
  let filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
231
- let {
232
- type: columnType,
233
- data: columnData
234
- } = column;
235
- let {
236
- filterPredicateList
237
- } = getColumnOptions(column);
217
+ let columnType = column.type,
218
+ columnData = column.data;
219
+ let _getColumnOptions = getColumnOptions(column),
220
+ filterPredicateList = _getColumnOptions.filterPredicateList;
238
221
  if (!filterPredicateList) return;
239
222
  let filterPredicate = filterPredicateList[0];
240
223
  let updatedFilter = Object.assign({}, filter, {
@@ -253,9 +236,7 @@ const getFilterByColumn = function (column) {
253
236
  }
254
237
  // rate
255
238
  if (columnType === _dtableUtils.CellType.RATE) {
256
- const {
257
- rate_max_number
258
- } = columnData;
239
+ const rate_max_number = columnData.rate_max_number;
259
240
  updatedFilter.filter_term = rate_max_number;
260
241
  return updatedFilter;
261
242
  }
@@ -281,10 +262,9 @@ const getFilterByColumn = function (column) {
281
262
  }
282
263
  // link
283
264
  if (columnType === _dtableUtils.CellType.LINK) {
284
- let {
285
- array_type,
286
- array_data
287
- } = columnData || {};
265
+ let _ref5 = columnData || {},
266
+ array_type = _ref5.array_type,
267
+ array_data = _ref5.array_data;
288
268
  if (array_type) {
289
269
  if (array_type === _dtableUtils.FORMULA_RESULT_TYPE.BOOL) {
290
270
  array_type = _dtableUtils.CellType.CHECKBOX;
@@ -308,14 +288,11 @@ const getFilterByColumn = function (column) {
308
288
  };
309
289
  exports.getFilterByColumn = getFilterByColumn;
310
290
  const getFormulaColumnFilter = (column, filter) => {
311
- const {
312
- data
313
- } = column;
314
- let {
315
- result_type,
316
- array_type,
317
- array_data
318
- } = data || {};
291
+ const data = column.data;
292
+ let _ref6 = data || {},
293
+ result_type = _ref6.result_type,
294
+ array_type = _ref6.array_type,
295
+ array_data = _ref6.array_data;
319
296
  if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.ARRAY) {
320
297
  const linkedColumn = {
321
298
  key: column.key,
@@ -356,9 +333,7 @@ const getUpdatedFilterByPredicate = (filter, column, filterPredicate) => {
356
333
  let updatedFilter = Object.assign({}, filter, {
357
334
  filter_predicate: filterPredicate
358
335
  });
359
- let {
360
- type: columnType
361
- } = column;
336
+ let columnType = column.type;
362
337
  if (columnType === _dtableUtils.CellType.CHECKBOX) {
363
338
  updatedFilter.filter_term = false;
364
339
  return updatedFilter;
@@ -441,9 +416,7 @@ const getFormulaAndLinkFilters = (filters, columns) => {
441
416
  let formulaFilters = [];
442
417
  filters.forEach(filter => {
443
418
  const filterColumn = columns.find(column => column.key === (filter === null || filter === void 0 ? void 0 : filter.column_key));
444
- const {
445
- type
446
- } = filterColumn;
419
+ const type = filterColumn.type;
447
420
  if (_dtableUtils.FORMULA_COLUMN_TYPES_MAP[type] || type === _dtableUtils.CellType.LINK) {
448
421
  formulaFilters.push(filter);
449
422
  }
@@ -453,10 +426,8 @@ const getFormulaAndLinkFilters = (filters, columns) => {
453
426
  exports.getFormulaAndLinkFilters = getFormulaAndLinkFilters;
454
427
  const getFilterColumns = columns => {
455
428
  return columns.filter(column => {
456
- const {
457
- data,
458
- type
459
- } = column;
429
+ const data = column.data,
430
+ type = column.type;
460
431
  if (data && (type === _dtableUtils.CellType.LINK || _dtableUtils.FORMULA_COLUMN_TYPES_MAP[type] && data.result_type === _dtableUtils.FORMULA_RESULT_TYPE.ARRAY)) {
461
432
  return (0, _dtableUtils.checkColumnHasFilterOptions)({
462
433
  type: data.array_type,
@@ -468,18 +439,14 @@ const getFilterColumns = columns => {
468
439
  };
469
440
  exports.getFilterColumns = getFilterColumns;
470
441
  const applyFilterOperation = operation => {
471
- const {
472
- type,
473
- filter_conjunction,
474
- filters,
475
- payload
476
- } = operation;
442
+ const type = operation.type,
443
+ filter_conjunction = operation.filter_conjunction,
444
+ filters = operation.filters,
445
+ payload = operation.payload;
477
446
  switch (type) {
478
447
  case _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION:
479
448
  {
480
- const {
481
- new_filter_conjunction
482
- } = payload;
449
+ const new_filter_conjunction = payload.new_filter_conjunction;
483
450
  return {
484
451
  filter_conjunction: new_filter_conjunction,
485
452
  filters
@@ -487,9 +454,7 @@ const applyFilterOperation = operation => {
487
454
  }
488
455
  case _constants.FILTER_OPERATION_TYPE.DELETE_FILTER:
489
456
  {
490
- const {
491
- filter_index
492
- } = payload;
457
+ const filter_index = payload.filter_index;
493
458
  let updatedFilters = [...filters];
494
459
  if (!updatedFilters[filter_index]) {
495
460
  return {
@@ -505,10 +470,8 @@ const applyFilterOperation = operation => {
505
470
  }
506
471
  case _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER:
507
472
  {
508
- const {
509
- filter_index,
510
- new_filter
511
- } = payload;
473
+ const filter_index = payload.filter_index,
474
+ new_filter = payload.new_filter;
512
475
  let updatedFilters = [...filters];
513
476
  if (!updatedFilters[filter_index]) {
514
477
  return {
@@ -524,12 +487,10 @@ const applyFilterOperation = operation => {
524
487
  }
525
488
  case _constants.FILTER_OPERATION_TYPE.MOVE_FILTER:
526
489
  {
527
- const {
528
- source_filter_index,
529
- target_filter_index,
530
- source_group_index,
531
- target_group_index
532
- } = payload;
490
+ const source_filter_index = payload.source_filter_index,
491
+ target_filter_index = payload.target_filter_index,
492
+ source_group_index = payload.source_group_index,
493
+ target_group_index = payload.target_group_index;
533
494
  const isFromFilterGroup = typeof source_group_index === 'number';
534
495
  const isToFilterGroup = typeof target_group_index === 'number';
535
496
  let updatedFilters = [...filters];
@@ -590,10 +551,8 @@ const applyFilterOperation = operation => {
590
551
  }
591
552
  case _constants.FILTER_OPERATION_TYPE.ADD_FILTER_INTO_GROUP:
592
553
  {
593
- const {
594
- filter,
595
- group_index
596
- } = payload;
554
+ const filter = payload.filter,
555
+ group_index = payload.group_index;
597
556
  let updatedFilters = [...filters];
598
557
  let updatedFilterGroup = updatedFilters[group_index];
599
558
  if (!updatedFilterGroup) {
@@ -614,10 +573,8 @@ const applyFilterOperation = operation => {
614
573
  }
615
574
  case _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION_IN_GROUP:
616
575
  {
617
- const {
618
- group_index,
619
- new_filter_conjunction
620
- } = payload;
576
+ const group_index = payload.group_index,
577
+ new_filter_conjunction = payload.new_filter_conjunction;
621
578
  let updatedFilters = [...filters];
622
579
  let updatedFilterGroup = updatedFilters[group_index];
623
580
  if (!updatedFilterGroup) {
@@ -634,10 +591,8 @@ const applyFilterOperation = operation => {
634
591
  }
635
592
  case _constants.FILTER_OPERATION_TYPE.DELETE_FILTER_IN_GROUP:
636
593
  {
637
- const {
638
- group_index,
639
- filter_index
640
- } = payload;
594
+ const group_index = payload.group_index,
595
+ filter_index = payload.filter_index;
641
596
  let updatedFilters = [...filters];
642
597
  let updatedFilterGroup = updatedFilters[group_index];
643
598
  if (!updatedFilterGroup || !updatedFilterGroup.filters || !updatedFilterGroup.filters[filter_index]) {
@@ -656,11 +611,9 @@ const applyFilterOperation = operation => {
656
611
  }
657
612
  case _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER_IN_GROUP:
658
613
  {
659
- const {
660
- group_index,
661
- filter_index,
662
- new_filter
663
- } = payload;
614
+ const group_index = payload.group_index,
615
+ filter_index = payload.filter_index,
616
+ new_filter = payload.new_filter;
664
617
  let updatedFilters = [...filters];
665
618
  let updatedFilterGroup = updatedFilters[group_index];
666
619
  if (!updatedFilterGroup || !updatedFilterGroup.filters || !updatedFilterGroup.filters[filter_index]) {
@@ -721,18 +674,15 @@ const getCreatorUpdatedFilterTerm = (filterTerm, filterPredicate, collaborator)
721
674
  };
722
675
  exports.getCreatorUpdatedFilterTerm = getCreatorUpdatedFilterTerm;
723
676
  const getFilterConfigOptions = column => {
724
- const {
725
- type,
726
- data
727
- } = column;
677
+ const type = column.type,
678
+ data = column.data;
728
679
  if (_dtableUtils.FORMULA_COLUMN_TYPES_MAP[type]) {
729
680
  return getFormulaColumnFilterOptions(column);
730
681
  }
731
682
  if (type === _dtableUtils.CellType.LINK) {
732
- const {
733
- array_type,
734
- array_data
735
- } = data || {};
683
+ const _ref7 = data || {},
684
+ array_type = _ref7.array_type,
685
+ array_data = _ref7.array_data;
736
686
  if (array_type === _dtableUtils.FORMULA_RESULT_TYPE.BOOL) {
737
687
  return (0, _dtableUtils.getColumnFilterOptions)({
738
688
  type: _dtableUtils.CellType.CHECKBOX
@@ -49,7 +49,7 @@ class CollaboratorFilter extends _react.Component {
49
49
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
50
50
  className: "collaborator-check-icon",
51
51
  children: isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
52
- className: "option-edit dtable-font dtable-icon-check"
52
+ className: "option-edit dtable-font dtable-icon-check-mark"
53
53
  })
54
54
  })]
55
55
  })
@@ -66,15 +66,14 @@ class CollaboratorFilter extends _react.Component {
66
66
  this.supportMultipleSelectOptions = [_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];
67
67
  }
68
68
  render() {
69
- let {
70
- filterIndex,
71
- filterTerm,
72
- collaborators,
73
- placeholder,
74
- filter_predicate,
75
- isInModal,
76
- readOnly
77
- } = this.props;
69
+ let _this$props = this.props,
70
+ filterIndex = _this$props.filterIndex,
71
+ filterTerm = _this$props.filterTerm,
72
+ collaborators = _this$props.collaborators,
73
+ placeholder = _this$props.placeholder,
74
+ filter_predicate = _this$props.filter_predicate,
75
+ isInModal = _this$props.isInModal,
76
+ readOnly = _this$props.readOnly;
78
77
  let isSupportMultipleSelect = this.supportMultipleSelectOptions.indexOf(filter_predicate) > -1 ? true : false;
79
78
  let selectedCollaborators = Array.isArray(filterTerm) && filterTerm.length > 0 && filterTerm.map(item => {
80
79
  let collaborator = collaborators.find(c => c.email === item);
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _classnames = _interopRequireDefault(require("classnames"));
11
12
  var _ModalPortal = _interopRequireDefault(require("../../../ModalPortal"));
@@ -16,14 +17,18 @@ var _lang = require("../../../lang");
16
17
  var _departments = require("../../../constants/departments");
17
18
  var _jsxRuntime = require("react/jsx-runtime");
18
19
  function DepartmentMultipleSelectFilter(props) {
19
- const {
20
- value,
21
- isInModal,
22
- readOnly,
23
- departments
24
- } = props;
25
- const [isShowSelector, setIsShowSelector] = (0, _react.useState)(false);
26
- const [selectedDepartments, setSelectedDepartments] = (0, _react.useState)(value || []);
20
+ const value = props.value,
21
+ isInModal = props.isInModal,
22
+ readOnly = props.readOnly,
23
+ departments = props.departments;
24
+ const _useState = (0, _react.useState)(false),
25
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
26
+ isShowSelector = _useState2[0],
27
+ setIsShowSelector = _useState2[1];
28
+ const _useState3 = (0, _react.useState)(value || []),
29
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
30
+ selectedDepartments = _useState4[0],
31
+ setSelectedDepartments = _useState4[1];
27
32
  const selectorRef = (0, _react.useRef)(null);
28
33
  (0, _commonHooks.useClickOutside)({
29
34
  currDOM: selectorRef.current,
@@ -31,10 +36,8 @@ function DepartmentMultipleSelectFilter(props) {
31
36
  }, [selectedDepartments]);
32
37
  function renderUserDepartmentOptions() {
33
38
  return _departments.DEPARTMENT_SELECT_RANGE_OPTIONS.slice(0, 2).map((option, index) => {
34
- const {
35
- type,
36
- name
37
- } = option;
39
+ const type = option.type,
40
+ name = option.name;
38
41
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
39
42
  className: "department-item",
40
43
  onClick: event => selectDepartment(event, type),
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _classnames = _interopRequireDefault(require("classnames"));
11
12
  var _SelectedDepartments = _interopRequireDefault(require("../../../SelectedDepartments"));
@@ -16,16 +17,20 @@ var _commonHooks = require("../../../hooks/common-hooks");
16
17
  var _lang = require("../../../lang");
17
18
  var _jsxRuntime = require("react/jsx-runtime");
18
19
  function DepartmentSingleSelectFilter(props) {
19
- const {
20
- value,
21
- column,
22
- isInModal,
23
- userDepartmentIdsMap,
24
- departments,
25
- readOnly
26
- } = props;
27
- const [isShowSelector, setIsShowSelector] = (0, _react.useState)(false);
28
- const [selectedDepartment, setSelectedDepartment] = (0, _react.useState)(value || '');
20
+ const value = props.value,
21
+ column = props.column,
22
+ isInModal = props.isInModal,
23
+ userDepartmentIdsMap = props.userDepartmentIdsMap,
24
+ departments = props.departments,
25
+ readOnly = props.readOnly;
26
+ const _useState = (0, _react.useState)(false),
27
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
28
+ isShowSelector = _useState2[0],
29
+ setIsShowSelector = _useState2[1];
30
+ const _useState3 = (0, _react.useState)(value || ''),
31
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
32
+ selectedDepartment = _useState4[0],
33
+ setSelectedDepartment = _useState4[1];
29
34
  const selectorRef = (0, _react.useRef)(null);
30
35
  let selectedDepartmentIds = [];
31
36
  selectedDepartmentIds.push(value);
@@ -36,10 +41,8 @@ function DepartmentSingleSelectFilter(props) {
36
41
  function renderUserDepartmentOptions(onSelect) {
37
42
  if (!departments || departments.length === 0) return [];
38
43
  return _departments.DEPARTMENT_SELECT_RANGE_OPTIONS.slice(0, 2).map((option, index) => {
39
- const {
40
- type,
41
- name
42
- } = option;
44
+ const type = option.type,
45
+ name = option.name;
43
46
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
44
47
  className: "department-item",
45
48
  onClick: event => onSelect(event, type),
@@ -24,9 +24,7 @@ class FilterCalendar extends _react.Component {
24
24
  e.preventDefault();
25
25
  };
26
26
  this.onChange = value => {
27
- const {
28
- onChange
29
- } = this.props;
27
+ const onChange = this.props.onChange;
30
28
  const searchFormat = 'YYYY-MM-DD';
31
29
  this.setState({
32
30
  value
@@ -88,10 +86,9 @@ class FilterCalendar extends _react.Component {
88
86
  this.defaultCalendarValue = null;
89
87
  }
90
88
  componentDidMount() {
91
- const {
92
- value,
93
- lang
94
- } = this.props;
89
+ const _this$props = this.props,
90
+ value = _this$props.value,
91
+ lang = _this$props.lang;
95
92
  const iszhcn = lang === 'zh-cn';
96
93
  if (iszhcn) {
97
94
  now = now.locale('zh-cn');
@@ -107,10 +104,9 @@ class FilterCalendar extends _react.Component {
107
104
  }
108
105
  }
109
106
  render() {
110
- const {
111
- isReadOnly,
112
- firstDayOfWeek
113
- } = this.props;
107
+ const _this$props2 = this.props,
108
+ isReadOnly = _this$props2.isReadOnly,
109
+ firstDayOfWeek = _this$props2.firstDayOfWeek;
114
110
  const state = this.state;
115
111
  if (isReadOnly) return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
116
112
  className: "ant-calendar-picker-input ant-input form-control",
@@ -156,9 +152,7 @@ class FilterCalendar extends _react.Component {
156
152
  zIndex: 1001
157
153
  },
158
154
  children: _ref => {
159
- let {
160
- value
161
- } = _ref;
155
+ let value = _ref.value;
162
156
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
163
157
  tabIndex: "0",
164
158
  onFocus: this.onReadOnlyFocus,
@@ -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", {