dtable-ui-component 6.0.126 → 7.0.0-xia.1

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