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
@@ -32,16 +32,21 @@ class FilterItem extends _react.default.Component {
32
32
  super(_props);
33
33
  _this = this;
34
34
  this.initSelectOptions = props => {
35
- const filter = props.filter,
36
- filterColumn = props.filterColumn;
37
- let _getColumnOptions = (0, _utils.getColumnOptions)(filterColumn),
38
- filterPredicateList = _getColumnOptions.filterPredicateList,
39
- filterTermModifierList = _getColumnOptions.filterTermModifierList;
35
+ const {
36
+ filter,
37
+ filterColumn
38
+ } = props;
39
+ let {
40
+ filterPredicateList,
41
+ filterTermModifierList
42
+ } = (0, _utils.getColumnOptions)(filterColumn);
40
43
  // The value of the calculation formula column does not exist in the shared view
41
44
  this.filterPredicateOptions = filterPredicateList ? filterPredicateList.map(predicate => {
42
45
  return _filterItemUtils.default.generatorPredicateOption(predicate);
43
46
  }).filter(item => item) : [];
44
- const filter_predicate = filter.filter_predicate;
47
+ const {
48
+ filter_predicate
49
+ } = filter;
45
50
  if ((0, _dtableUtils.isDateColumn)(filterColumn)) {
46
51
  if (filter_predicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_WITHIN) {
47
52
  filterTermModifierList = _dtableUtils.filterTermModifierIsWithin;
@@ -53,7 +58,9 @@ class FilterItem extends _react.default.Component {
53
58
  };
54
59
  this.onDeleteFilter = event => {
55
60
  event.nativeEvent.stopImmediatePropagation();
56
- const index = this.props.index;
61
+ const {
62
+ index
63
+ } = this.props;
57
64
  this.props.deleteFilter(index);
58
65
  };
59
66
  this.resetState = filter => {
@@ -62,17 +69,22 @@ class FilterItem extends _react.default.Component {
62
69
  });
63
70
  };
64
71
  this.onSelectConjunction = value => {
65
- const filterConjunction = this.props.filterConjunction;
72
+ const {
73
+ filterConjunction
74
+ } = this.props;
66
75
  if (filterConjunction === value.filterConjunction) {
67
76
  return;
68
77
  }
69
78
  this.props.updateConjunction(value.filterConjunction);
70
79
  };
71
80
  this.onSelectColumn = value => {
72
- const _this$props = this.props,
73
- index = _this$props.index,
74
- filter = _this$props.filter;
75
- const column = value.column;
81
+ const {
82
+ index,
83
+ filter
84
+ } = this.props;
85
+ const {
86
+ column
87
+ } = value;
76
88
  if (column.key === filter.column_key) return;
77
89
  let newFilter = (0, _utils.getFilterByColumn)(column, filter);
78
90
  if (!newFilter) return;
@@ -80,11 +92,14 @@ class FilterItem extends _react.default.Component {
80
92
  this.props.updateFilter(index, newFilter);
81
93
  };
82
94
  this.onSelectPredicate = value => {
83
- const _this$props2 = this.props,
84
- index = _this$props2.index,
85
- filter = _this$props2.filter,
86
- filterColumn = _this$props2.filterColumn;
87
- const filterPredicate = value.filterPredicate;
95
+ const {
96
+ index,
97
+ filter,
98
+ filterColumn
99
+ } = this.props;
100
+ const {
101
+ filterPredicate
102
+ } = value;
88
103
  if (filter.filter_predicate === filterPredicate) {
89
104
  return;
90
105
  }
@@ -93,10 +108,13 @@ class FilterItem extends _react.default.Component {
93
108
  this.props.updateFilter(index, newFilter);
94
109
  };
95
110
  this.onSelectTermModifier = value => {
96
- const _this$props3 = this.props,
97
- index = _this$props3.index,
98
- filter = _this$props3.filter;
99
- const filterTermModifier = value.filterTermModifier;
111
+ const {
112
+ index,
113
+ filter
114
+ } = this.props;
115
+ const {
116
+ filterTermModifier
117
+ } = value;
100
118
  const inputRangeLabel = [_dtableUtils.FILTER_TERM_MODIFIER_TYPE.EXACT_DATE, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.NUMBER_OF_DAYS_AGO, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.NUMBER_OF_DAYS_FROM_NOW, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.THE_NEXT_NUMBERS_OF_DAYS, _dtableUtils.FILTER_TERM_MODIFIER_TYPE.THE_PAST_NUMBERS_OF_DAYS];
101
119
  if (filter.filter_term_modifier === filterTermModifier) {
102
120
  return;
@@ -113,10 +131,13 @@ class FilterItem extends _react.default.Component {
113
131
  this.props.updateFilter(index, newFilter);
114
132
  };
115
133
  this.onSelectSingle = value => {
116
- const _this$props4 = this.props,
117
- index = _this$props4.index,
118
- filter = _this$props4.filter;
119
- const option = value.columnOption;
134
+ const {
135
+ index,
136
+ filter
137
+ } = this.props;
138
+ const {
139
+ columnOption: option
140
+ } = value;
120
141
  if (filter.filter_term === option.id) {
121
142
  return;
122
143
  }
@@ -125,28 +146,37 @@ class FilterItem extends _react.default.Component {
125
146
  this.props.updateFilter(index, newFilter);
126
147
  };
127
148
  this.onSelectMultiple = value => {
128
- const _this$props5 = this.props,
129
- index = _this$props5.index,
130
- filter = _this$props5.filter;
131
- const option = value.columnOption;
149
+ const {
150
+ index,
151
+ filter
152
+ } = this.props;
153
+ const {
154
+ columnOption: option
155
+ } = value;
132
156
  let newFilter = (0, _utils.getUpdatedFilterBySelectMultiple)(filter, option);
133
157
  this.resetState(newFilter);
134
158
  this.props.updateFilter(index, newFilter);
135
159
  };
136
160
  this.onSelectCollaborator = value => {
137
- const _this$props6 = this.props,
138
- index = _this$props6.index,
139
- filter = _this$props6.filter;
140
- const collaborator = value.columnOption;
161
+ const {
162
+ index,
163
+ filter
164
+ } = this.props;
165
+ const {
166
+ columnOption: collaborator
167
+ } = value;
141
168
  let newFilter = (0, _utils.getUpdatedFilterByCollaborator)(filter, collaborator);
142
169
  this.resetState(newFilter);
143
170
  this.props.updateFilter(index, newFilter);
144
171
  };
145
172
  this.onSelectCreator = value => {
146
- const _this$props7 = this.props,
147
- index = _this$props7.index,
148
- filter = _this$props7.filter;
149
- const collaborator = value.columnOption;
173
+ const {
174
+ index,
175
+ filter
176
+ } = this.props;
177
+ const {
178
+ columnOption: collaborator
179
+ } = value;
150
180
  let newFilter = (0, _utils.getUpdatedFilterByCreator)(filter, collaborator);
151
181
  // the predicate is 'is' or 'is not'
152
182
  if (!newFilter) {
@@ -173,10 +203,13 @@ class FilterItem extends _react.default.Component {
173
203
  this.onFilterTermChanged(value);
174
204
  };
175
205
  this.onFilterTermChanged = newFilterTerm => {
176
- const _this$props8 = this.props,
177
- index = _this$props8.index,
178
- filter = _this$props8.filter;
179
- const filterTerm = this.state.filterTerm;
206
+ const {
207
+ index,
208
+ filter
209
+ } = this.props;
210
+ const {
211
+ filterTerm
212
+ } = this.state;
180
213
  if (newFilterTerm !== filterTerm) {
181
214
  this.setState({
182
215
  filterTerm: newFilterTerm
@@ -201,11 +234,14 @@ class FilterItem extends _react.default.Component {
201
234
  this.onFilterTermChanged(index);
202
235
  };
203
236
  this.getInputComponent = type => {
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;
237
+ const {
238
+ filterColumn,
239
+ readOnly,
240
+ isInModal
241
+ } = this.props;
242
+ const {
243
+ filterTerm
244
+ } = this.state;
209
245
  if (type === _constants.INPUT_CMP_TYPE_MAP.TEXT) {
210
246
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
211
247
  value: filterTerm,
@@ -248,12 +284,13 @@ class FilterItem extends _react.default.Component {
248
284
  }
249
285
  };
250
286
  this.renderConjunction = () => {
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;
287
+ const {
288
+ index,
289
+ filterConjunction,
290
+ conjunctionOptions,
291
+ readOnly,
292
+ isInModal
293
+ } = this.props;
257
294
  switch (index) {
258
295
  case 0:
259
296
  {
@@ -282,10 +319,13 @@ class FilterItem extends _react.default.Component {
282
319
  this.renderMultipleSelectOption = function () {
283
320
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
284
321
  let filterTerm = arguments.length > 1 ? arguments[1] : undefined;
285
- const _this$props1 = _this.props,
286
- filter = _this$props1.filter,
287
- readOnly = _this$props1.readOnly;
288
- const filter_predicate = filter.filter_predicate;
322
+ const {
323
+ filter,
324
+ readOnly
325
+ } = _this.props;
326
+ const {
327
+ filter_predicate
328
+ } = filter;
289
329
  let isSupportMultipleSelect = false;
290
330
  // The first two options are used for single selection, and the last four options are used for multiple selection
291
331
  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];
@@ -341,19 +381,24 @@ class FilterItem extends _react.default.Component {
341
381
  });
342
382
  };
343
383
  this.renderFilterTerm = filterColumn => {
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;
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;
357
402
  // predicate is empty or not empty
358
403
  if (_constants.EMPTY_PREDICATE.includes(filter_predicate)) {
359
404
  return null;
@@ -410,9 +455,9 @@ class FilterItem extends _react.default.Component {
410
455
  case _dtableUtils.CellType.SINGLE_SELECT:
411
456
  {
412
457
  // get options
413
- let _ref = filterColumn.data || {},
414
- _ref$options = _ref.options,
415
- options = _ref$options === void 0 ? [] : _ref$options;
458
+ let {
459
+ options = []
460
+ } = filterColumn.data || {};
416
461
  if ([_dtableUtils.FILTER_PREDICATE_TYPE.IS_ANY_OF, _dtableUtils.FILTER_PREDICATE_TYPE.IS_NONE_OF].includes(filter_predicate)) {
417
462
  return this.renderMultipleSelectOption(options, filter_term);
418
463
  }
@@ -452,9 +497,9 @@ class FilterItem extends _react.default.Component {
452
497
  }
453
498
  case _dtableUtils.CellType.MULTIPLE_SELECT:
454
499
  {
455
- let _ref2 = filterColumn.data || {},
456
- _ref2$options = _ref2.options,
457
- options = _ref2$options === void 0 ? [] : _ref2$options;
500
+ let {
501
+ options = []
502
+ } = filterColumn.data || {};
458
503
  return this.renderMultipleSelectOption(options, filter_term);
459
504
  }
460
505
  case _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT:
@@ -512,8 +557,9 @@ class FilterItem extends _react.default.Component {
512
557
  }
513
558
  case _dtableUtils.CellType.RATE:
514
559
  {
515
- let _ref3 = filterColumn.data || {},
516
- rate_max_number = _ref3.rate_max_number;
560
+ let {
561
+ rate_max_number
562
+ } = filterColumn.data || {};
517
563
  let rateList = [];
518
564
  for (let i = 0; i < rate_max_number; i++) {
519
565
  let rateItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rateItem.default, {
@@ -550,16 +596,19 @@ class FilterItem extends _react.default.Component {
550
596
  }
551
597
  };
552
598
  this.renderFormulaFilterTerm = (filterPredicate, filterTerm, index, filterColumn) => {
553
- const _ref4 = filterColumn || {},
554
- data = _ref4.data;
555
- const _ref5 = data || {},
556
- result_type = _ref5.result_type;
599
+ const {
600
+ data
601
+ } = filterColumn || {};
602
+ const {
603
+ result_type
604
+ } = data || {};
557
605
  if (filterPredicate === _dtableUtils.FILTER_PREDICATE_TYPE.IS_CURRENT_USER_ID) {
558
606
  return null;
559
607
  }
560
608
  if (result_type === _dtableUtils.FORMULA_RESULT_TYPE.NUMBER) {
561
- const _ref6 = filterColumn.data || {},
562
- format = _ref6.format;
609
+ const {
610
+ format
611
+ } = filterColumn.data || {};
563
612
  if (format === _dtableUtils.CellType.DURATION) {
564
613
  return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.DURATION, filterColumn);
565
614
  }
@@ -577,15 +626,18 @@ class FilterItem extends _react.default.Component {
577
626
  return this.renderFilterTermByArrayType(filterPredicate, filterTerm, index, filterColumn);
578
627
  };
579
628
  this.renderFilterTermByArrayType = (filterPredicate, filterTerm, index, filterColumn) => {
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;
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 || {};
589
641
  if (!array_type) {
590
642
  return null;
591
643
  }
@@ -594,9 +646,9 @@ class FilterItem extends _react.default.Component {
594
646
  data: array_data
595
647
  };
596
648
  if (array_type === _dtableUtils.CellType.SINGLE_SELECT || array_type === _dtableUtils.CellType.MULTIPLE_SELECT) {
597
- let _ref9 = array_data || {},
598
- _ref9$options = _ref9.options,
599
- options = _ref9$options === void 0 ? [] : _ref9$options;
649
+ let {
650
+ options = []
651
+ } = array_data || {};
600
652
  return this.renderMultipleSelectOption(options, filterTerm);
601
653
  }
602
654
  if (array_type === _dtableUtils.CellType.DEPARTMENT_SINGLE_SELECT) {
@@ -628,7 +680,9 @@ class FilterItem extends _react.default.Component {
628
680
  return this.getInputComponent(_constants.INPUT_CMP_TYPE_MAP.TEXT);
629
681
  };
630
682
  this.isRenderErrorTips = () => {
631
- const errMsg = this.props.errMsg;
683
+ const {
684
+ errMsg
685
+ } = this.props;
632
686
  return errMsg && errMsg !== _dtableUtils.FILTER_ERR_MSG.INCOMPLETE_FILTER;
633
687
  };
634
688
  this.renderErrorMessage = () => {
@@ -658,7 +712,9 @@ class FilterItem extends _react.default.Component {
658
712
  this.initSelectOptions(_props);
659
713
  }
660
714
  UNSAFE_componentWillReceiveProps(nextProps) {
661
- const filter = this.props.filter;
715
+ const {
716
+ filter
717
+ } = this.props;
662
718
  if (nextProps.filter !== filter) {
663
719
  this.initSelectOptions(nextProps);
664
720
  this.setState({
@@ -672,15 +728,20 @@ class FilterItem extends _react.default.Component {
672
728
  return shouldUpdated;
673
729
  }
674
730
  render() {
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;
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;
684
745
  const activeColumn = _filterItemUtils.default.generatorColumnOption(filterColumn);
685
746
  const activePredicate = _filterItemUtils.default.generatorPredicateOption(filter_predicate, true);
686
747
  let activeTermModifier = null;
@@ -690,7 +751,9 @@ class FilterItem extends _react.default.Component {
690
751
  } else if ((0, _columnUtils.isCheckboxColumn)(filterColumn)) {
691
752
  _isCheckboxColumn = true;
692
753
  }
693
- const type = filterColumn.type;
754
+ const {
755
+ type
756
+ } = filterColumn;
694
757
  const computedColumnTypes = [_dtableUtils.CellType.FORMULA, _dtableUtils.CellType.LINK_FORMULA, _dtableUtils.CellType.LINK];
695
758
  const isContainPredicate = [_dtableUtils.FILTER_PREDICATE_TYPE.CONTAINS, _dtableUtils.FILTER_PREDICATE_TYPE.NOT_CONTAIN].includes(filter_predicate);
696
759
  const isRenderErrorTips = this.isRenderErrorTips();
@@ -701,7 +764,7 @@ class FilterItem extends _react.default.Component {
701
764
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
702
765
  className: "filter-item",
703
766
  children: [!readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
704
- className: "delete-filter",
767
+ className: "delete-filter seatable-icon-btn",
705
768
  onClick: this.onDeleteFilter,
706
769
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
707
770
  className: "dtable-font dtable-icon-fork-number"
@@ -289,8 +289,8 @@
289
289
  }
290
290
 
291
291
  .dtable-ui-filters-list .delete-filter {
292
- width: 12px;
293
- height: 20px;
292
+ width: 24px;
293
+ height: 24px;
294
294
  margin-right: 14px;
295
295
  text-align: center;
296
296
  }
@@ -301,8 +301,8 @@
301
301
 
302
302
  .dtable-ui-filters-list .delete-filter .dtable-icon-fork-number {
303
303
  display: inline-block;
304
- font-size: 12px;
305
- color: #999;
304
+ font-size: 16px;
305
+ color: var(--bs-icon-color);
306
306
  }
307
307
 
308
308
  .dtable-ui-filters-list .multiple-option-name {
@@ -388,7 +388,7 @@
388
388
  }
389
389
 
390
390
  .dtable-ui-filters-list .filter-item .dtable-icon-fork-number:hover {
391
- color: #555555;
391
+ color: var(--bs-icon-color);
392
392
  }
393
393
 
394
394
  .dtable-ui-filters-list .filter-container-readonly .dtable-select .selected-option-show,