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
@@ -20,19 +20,21 @@ class FiltersList extends _react.Component {
20
20
  constructor(props) {
21
21
  super(props);
22
22
  this.modifyFilterConjunction = new_filter_conjunction => {
23
- const _this$props = this.props,
24
- filter_conjunction = _this$props.filterConjunction,
25
- filters = _this$props.filters;
26
- const _applyFilterOperation = (0, _utils.applyFilterOperation)({
27
- type: _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION,
28
- filter_conjunction,
29
- filters,
30
- payload: {
31
- new_filter_conjunction
32
- }
33
- }),
34
- next_filter_conjunction = _applyFilterOperation.filter_conjunction,
35
- next_filters = _applyFilterOperation.filters;
23
+ const {
24
+ filterConjunction: filter_conjunction,
25
+ filters
26
+ } = this.props;
27
+ const {
28
+ filter_conjunction: next_filter_conjunction,
29
+ filters: next_filters
30
+ } = (0, _utils.applyFilterOperation)({
31
+ type: _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION,
32
+ filter_conjunction,
33
+ filters,
34
+ payload: {
35
+ new_filter_conjunction
36
+ }
37
+ });
36
38
  this.props.updateFilters({
37
39
  filter_conjunction: next_filter_conjunction,
38
40
  filters: next_filters
@@ -40,88 +42,98 @@ class FiltersList extends _react.Component {
40
42
  };
41
43
  this.updateFilter = (filter_index, new_filter) => {
42
44
  if (!new_filter) return;
43
- const _this$props2 = this.props,
44
- filter_conjunction = _this$props2.filterConjunction,
45
- filters = _this$props2.filters;
46
- const _applyFilterOperation2 = (0, _utils.applyFilterOperation)({
47
- type: _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER,
48
- filter_conjunction,
49
- filters,
50
- payload: {
51
- filter_index,
52
- new_filter
53
- }
54
- }),
55
- next_filter_conjunction = _applyFilterOperation2.filter_conjunction,
56
- next_filters = _applyFilterOperation2.filters;
45
+ const {
46
+ filterConjunction: filter_conjunction,
47
+ filters
48
+ } = this.props;
49
+ const {
50
+ filter_conjunction: next_filter_conjunction,
51
+ filters: next_filters
52
+ } = (0, _utils.applyFilterOperation)({
53
+ type: _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER,
54
+ filter_conjunction,
55
+ filters,
56
+ payload: {
57
+ filter_index,
58
+ new_filter
59
+ }
60
+ });
57
61
  this.props.updateFilters({
58
62
  filter_conjunction: next_filter_conjunction,
59
63
  filters: next_filters
60
64
  });
61
65
  };
62
66
  this.deleteFilter = filter_index => {
63
- const _this$props3 = this.props,
64
- filter_conjunction = _this$props3.filterConjunction,
65
- filters = _this$props3.filters;
66
- const _applyFilterOperation3 = (0, _utils.applyFilterOperation)({
67
- type: _constants.FILTER_OPERATION_TYPE.DELETE_FILTER,
68
- filter_conjunction,
69
- filters,
70
- payload: {
71
- filter_index
72
- }
73
- }),
74
- next_filter_conjunction = _applyFilterOperation3.filter_conjunction,
75
- next_filters = _applyFilterOperation3.filters;
67
+ const {
68
+ filterConjunction: filter_conjunction,
69
+ filters
70
+ } = this.props;
71
+ const {
72
+ filter_conjunction: next_filter_conjunction,
73
+ filters: next_filters
74
+ } = (0, _utils.applyFilterOperation)({
75
+ type: _constants.FILTER_OPERATION_TYPE.DELETE_FILTER,
76
+ filter_conjunction,
77
+ filters,
78
+ payload: {
79
+ filter_index
80
+ }
81
+ });
76
82
  this.props.updateFilters({
77
83
  filter_conjunction: next_filter_conjunction,
78
84
  filters: next_filters
79
85
  });
80
86
  };
81
87
  this.moveFilter = _ref => {
82
- let source_filter_index = _ref.source_filter_index,
83
- target_filter_index = _ref.target_filter_index,
84
- source_group_index = _ref.source_group_index,
85
- target_group_index = _ref.target_group_index;
88
+ let {
89
+ source_filter_index,
90
+ target_filter_index,
91
+ source_group_index,
92
+ target_group_index
93
+ } = _ref;
86
94
  if (source_filter_index === target_filter_index && source_group_index === target_group_index) {
87
95
  return;
88
96
  }
89
- const _this$props4 = this.props,
90
- filter_conjunction = _this$props4.filterConjunction,
91
- filters = _this$props4.filters;
92
- const _applyFilterOperation4 = (0, _utils.applyFilterOperation)({
93
- type: _constants.FILTER_OPERATION_TYPE.MOVE_FILTER,
94
- filter_conjunction,
95
- filters,
96
- payload: {
97
- source_filter_index,
98
- target_filter_index,
99
- source_group_index,
100
- target_group_index
101
- }
102
- }),
103
- next_filter_conjunction = _applyFilterOperation4.filter_conjunction,
104
- next_filters = _applyFilterOperation4.filters;
97
+ const {
98
+ filterConjunction: filter_conjunction,
99
+ filters
100
+ } = this.props;
101
+ const {
102
+ filter_conjunction: next_filter_conjunction,
103
+ filters: next_filters
104
+ } = (0, _utils.applyFilterOperation)({
105
+ type: _constants.FILTER_OPERATION_TYPE.MOVE_FILTER,
106
+ filter_conjunction,
107
+ filters,
108
+ payload: {
109
+ source_filter_index,
110
+ target_filter_index,
111
+ source_group_index,
112
+ target_group_index
113
+ }
114
+ });
105
115
  this.props.updateFilters({
106
116
  filter_conjunction: next_filter_conjunction,
107
117
  filters: next_filters
108
118
  });
109
119
  };
110
120
  this.modifyConjunctionInGroup = (group_index, new_filter_conjunction) => {
111
- const _this$props5 = this.props,
112
- filter_conjunction = _this$props5.filterConjunction,
113
- filters = _this$props5.filters;
114
- const _applyFilterOperation5 = (0, _utils.applyFilterOperation)({
115
- type: _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION_IN_GROUP,
116
- filter_conjunction,
117
- filters,
118
- payload: {
119
- group_index,
120
- new_filter_conjunction
121
- }
122
- }),
123
- next_filter_conjunction = _applyFilterOperation5.filter_conjunction,
124
- next_filters = _applyFilterOperation5.filters;
121
+ const {
122
+ filterConjunction: filter_conjunction,
123
+ filters
124
+ } = this.props;
125
+ const {
126
+ filter_conjunction: next_filter_conjunction,
127
+ filters: next_filters
128
+ } = (0, _utils.applyFilterOperation)({
129
+ type: _constants.FILTER_OPERATION_TYPE.MODIFY_CONJUNCTION_IN_GROUP,
130
+ filter_conjunction,
131
+ filters,
132
+ payload: {
133
+ group_index,
134
+ new_filter_conjunction
135
+ }
136
+ });
125
137
  this.props.updateFilters({
126
138
  filter_conjunction: next_filter_conjunction,
127
139
  filters: next_filters
@@ -129,40 +141,44 @@ class FiltersList extends _react.Component {
129
141
  };
130
142
  this.addFilterIntoGroup = (group_index, filter) => {
131
143
  if (!filter) return;
132
- const _this$props6 = this.props,
133
- filter_conjunction = _this$props6.filterConjunction,
134
- filters = _this$props6.filters;
135
- const _applyFilterOperation6 = (0, _utils.applyFilterOperation)({
136
- type: _constants.FILTER_OPERATION_TYPE.ADD_FILTER_INTO_GROUP,
137
- filter_conjunction,
138
- filters,
139
- payload: {
140
- group_index,
141
- filter
142
- }
143
- }),
144
- next_filter_conjunction = _applyFilterOperation6.filter_conjunction,
145
- next_filters = _applyFilterOperation6.filters;
144
+ const {
145
+ filterConjunction: filter_conjunction,
146
+ filters
147
+ } = this.props;
148
+ const {
149
+ filter_conjunction: next_filter_conjunction,
150
+ filters: next_filters
151
+ } = (0, _utils.applyFilterOperation)({
152
+ type: _constants.FILTER_OPERATION_TYPE.ADD_FILTER_INTO_GROUP,
153
+ filter_conjunction,
154
+ filters,
155
+ payload: {
156
+ group_index,
157
+ filter
158
+ }
159
+ });
146
160
  this.props.updateFilters({
147
161
  filter_conjunction: next_filter_conjunction,
148
162
  filters: next_filters
149
163
  });
150
164
  };
151
165
  this.deleteFilterInGroup = (group_index, filter_index) => {
152
- const _this$props7 = this.props,
153
- filter_conjunction = _this$props7.filterConjunction,
154
- filters = _this$props7.filters;
155
- const _applyFilterOperation7 = (0, _utils.applyFilterOperation)({
156
- type: _constants.FILTER_OPERATION_TYPE.DELETE_FILTER_IN_GROUP,
157
- filter_conjunction,
158
- filters,
159
- payload: {
160
- group_index,
161
- filter_index
162
- }
163
- }),
164
- next_filter_conjunction = _applyFilterOperation7.filter_conjunction,
165
- next_filters = _applyFilterOperation7.filters;
166
+ const {
167
+ filterConjunction: filter_conjunction,
168
+ filters
169
+ } = this.props;
170
+ const {
171
+ filter_conjunction: next_filter_conjunction,
172
+ filters: next_filters
173
+ } = (0, _utils.applyFilterOperation)({
174
+ type: _constants.FILTER_OPERATION_TYPE.DELETE_FILTER_IN_GROUP,
175
+ filter_conjunction,
176
+ filters,
177
+ payload: {
178
+ group_index,
179
+ filter_index
180
+ }
181
+ });
166
182
  this.props.updateFilters({
167
183
  filter_conjunction: next_filter_conjunction,
168
184
  filters: next_filters
@@ -170,21 +186,23 @@ class FiltersList extends _react.Component {
170
186
  };
171
187
  this.updateFilterInGroup = (group_index, filter_index, new_filter) => {
172
188
  if (!new_filter) return;
173
- const _this$props8 = this.props,
174
- filter_conjunction = _this$props8.filterConjunction,
175
- filters = _this$props8.filters;
176
- const _applyFilterOperation8 = (0, _utils.applyFilterOperation)({
177
- type: _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER_IN_GROUP,
178
- filter_conjunction,
179
- filters,
180
- payload: {
181
- group_index,
182
- filter_index,
183
- new_filter
184
- }
185
- }),
186
- next_filter_conjunction = _applyFilterOperation8.filter_conjunction,
187
- next_filters = _applyFilterOperation8.filters;
189
+ const {
190
+ filterConjunction: filter_conjunction,
191
+ filters
192
+ } = this.props;
193
+ const {
194
+ filter_conjunction: next_filter_conjunction,
195
+ filters: next_filters
196
+ } = (0, _utils.applyFilterOperation)({
197
+ type: _constants.FILTER_OPERATION_TYPE.UPDATE_FILTER_IN_GROUP,
198
+ filter_conjunction,
199
+ filters,
200
+ payload: {
201
+ group_index,
202
+ filter_index,
203
+ new_filter
204
+ }
205
+ });
188
206
  this.props.updateFilters({
189
207
  filter_conjunction: next_filter_conjunction,
190
208
  filters: next_filters
@@ -197,7 +215,9 @@ class FiltersList extends _react.Component {
197
215
  return this.conjunctionOptions;
198
216
  };
199
217
  this.getColumnOptions = () => {
200
- const columns = this.props.columns;
218
+ const {
219
+ columns
220
+ } = this.props;
201
221
  if (!this.columnOptions) {
202
222
  const filterColumns = (0, _utils.getFilterColumns)(columns);
203
223
  this.columnOptions = filterColumns.map(column => {
@@ -207,16 +227,17 @@ class FiltersList extends _react.Component {
207
227
  return this.columnOptions;
208
228
  };
209
229
  this.renderFilter = (filter, index, filterColumn) => {
210
- const _this$props9 = this.props,
211
- filterConjunction = _this$props9.filterConjunction,
212
- isInModal = _this$props9.isInModal,
213
- columns = _this$props9.columns,
214
- collaborators = _this$props9.collaborators,
215
- userDepartmentIdsMap = _this$props9.userDepartmentIdsMap,
216
- departments = _this$props9.departments,
217
- lang = _this$props9.lang,
218
- firstDayOfWeek = _this$props9.firstDayOfWeek,
219
- readOnly = _this$props9.readOnly;
230
+ const {
231
+ filterConjunction,
232
+ isInModal,
233
+ columns,
234
+ collaborators,
235
+ userDepartmentIdsMap,
236
+ departments,
237
+ lang,
238
+ firstDayOfWeek,
239
+ readOnly
240
+ } = this.props;
220
241
  const conjunctionOptions = this.getConjunctionOptions();
221
242
  const columnOptions = this.getColumnOptions();
222
243
  if ((0, _dtableUtils.checkIsFilterGroup)(filter)) {
@@ -242,8 +263,9 @@ class FiltersList extends _react.Component {
242
263
  updateFilterInGroup: this.updateFilterInGroup
243
264
  }, "filter-group-".concat(index));
244
265
  }
245
- const _ValidateFilter$valid = _dtableUtils.ValidateFilter.validate(filter, columns),
246
- error_message = _ValidateFilter$valid.error_message;
266
+ const {
267
+ error_message
268
+ } = _dtableUtils.ValidateFilter.validate(filter, columns);
247
269
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_filterItem.default, {
248
270
  isInModal: isInModal,
249
271
  lang: lang,
@@ -273,11 +295,12 @@ class FiltersList extends _react.Component {
273
295
  }
274
296
  }
275
297
  render() {
276
- let _this$props0 = this.props,
277
- filters = _this$props0.filters,
278
- className = _this$props0.className,
279
- emptyPlaceholder = _this$props0.emptyPlaceholder,
280
- columns = _this$props0.columns;
298
+ let {
299
+ filters,
300
+ className,
301
+ emptyPlaceholder,
302
+ columns
303
+ } = this.props;
281
304
  const isEmpty = filters.length === 0;
282
305
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
283
306
  className: (0, _classnames.default)('dtable-ui-filters-list', {
@@ -289,7 +312,9 @@ class FiltersList extends _react.Component {
289
312
  className: "empty-filters-list",
290
313
  children: emptyPlaceholder
291
314
  }), !isEmpty && filters.map((filter, index) => {
292
- const column_key = filter.column_key;
315
+ const {
316
+ column_key
317
+ } = filter;
293
318
  const filterColumn = (0, _utils.getColumnByKey)(column_key, columns) || {};
294
319
  return this.renderFilter(filter, index, filterColumn);
295
320
  })]
@@ -13,17 +13,20 @@ class RateItem extends _react.default.Component {
13
13
  constructor(props) {
14
14
  super(props);
15
15
  this.onMouseEnterRateItem = () => {
16
- const rateItemIndex = this.props.rateItemIndex;
16
+ const {
17
+ rateItemIndex
18
+ } = this.props;
17
19
  this.props.onMouseEnterRateItem(rateItemIndex);
18
20
  };
19
21
  this.onMouseLeaveRateItem = () => {
20
22
  this.props.onMouseLeaveRateItem();
21
23
  };
22
24
  this.onChangeRateNumber = () => {
23
- const _this$props = this.props,
24
- onChangeRateNumber = _this$props.onChangeRateNumber,
25
- rateItemIndex = _this$props.rateItemIndex,
26
- editable = _this$props.editable;
25
+ const {
26
+ onChangeRateNumber,
27
+ rateItemIndex,
28
+ editable
29
+ } = this.props;
27
30
  if (onChangeRateNumber && editable) {
28
31
  onChangeRateNumber(rateItemIndex);
29
32
  }
@@ -34,16 +37,18 @@ class RateItem extends _react.default.Component {
34
37
  };
35
38
  }
36
39
  render() {
37
- const _this$props2 = this.props,
38
- enterRateItemIndex = _this$props2.enterRateItemIndex,
39
- rateItemIndex = _this$props2.rateItemIndex,
40
- value = _this$props2.value,
41
- column = _this$props2.column,
42
- isShowRateItem = _this$props2.isShowRateItem,
43
- editable = _this$props2.editable;
44
- const _ref = column.data || {},
45
- rate_style_color = _ref.rate_style_color,
46
- rate_style_type = _ref.rate_style_type;
40
+ const {
41
+ enterRateItemIndex,
42
+ rateItemIndex,
43
+ value,
44
+ column,
45
+ isShowRateItem,
46
+ editable
47
+ } = this.props;
48
+ const {
49
+ rate_style_color,
50
+ rate_style_type
51
+ } = column.data || {};
47
52
  const rateShowType = rate_style_type ? rate_style_type : 'dtable-icon-rate';
48
53
  if (!isShowRateItem && rateItemIndex > value) return null;
49
54
  let itemStyle = {
@@ -40,12 +40,15 @@ class DTableGroupSelect extends _react.Component {
40
40
  };
41
41
  this.getSelectedOptionTop = () => {
42
42
  if (!this.selector) return 38;
43
- const _this$selector$getBou = this.selector.getBoundingClientRect(),
44
- height = _this$selector$getBou.height;
43
+ const {
44
+ height
45
+ } = this.selector.getBoundingClientRect();
45
46
  return height;
46
47
  };
47
48
  this.getFilterOptions = searchValue => {
48
- const options = this.props.options;
49
+ const {
50
+ options
51
+ } = this.props;
49
52
  const validSearchVal = searchValue.trim().toLowerCase();
50
53
  if (!validSearchVal) return options || [];
51
54
  return options.filter(option => option.name.toLowerCase().includes(validSearchVal));
@@ -63,14 +66,15 @@ class DTableGroupSelect extends _react.Component {
63
66
  }
64
67
  }
65
68
  render() {
66
- let _this$props = this.props,
67
- className = _this$props.className,
68
- selectedOptions = _this$props.selectedOptions,
69
- options = _this$props.options,
70
- placeholder = _this$props.placeholder,
71
- searchPlaceholder = _this$props.searchPlaceholder,
72
- noOptionsPlaceholder = _this$props.noOptionsPlaceholder,
73
- isInModal = _this$props.isInModal;
69
+ let {
70
+ className,
71
+ selectedOptions,
72
+ options,
73
+ placeholder,
74
+ searchPlaceholder,
75
+ noOptionsPlaceholder,
76
+ isInModal
77
+ } = this.props;
74
78
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
75
79
  ref: node => this.selector = node,
76
80
  className: (0, _classnames.default)('group-select custom-select', {
@@ -21,12 +21,14 @@ class SelectOptionGroup extends _react.Component {
21
21
  this.props.onClickOutside(e);
22
22
  };
23
23
  this.resetMenuStyle = () => {
24
- const _this$props = this.props,
25
- isInModal = _this$props.isInModal,
26
- position = _this$props.position;
27
- const _this$optionGroupRef$ = this.optionGroupRef.getBoundingClientRect(),
28
- top = _this$optionGroupRef$.top,
29
- height = _this$optionGroupRef$.height;
24
+ const {
25
+ isInModal,
26
+ position
27
+ } = this.props;
28
+ const {
29
+ top,
30
+ height
31
+ } = this.optionGroupRef.getBoundingClientRect();
30
32
  if (isInModal) {
31
33
  if (position.y + position.height + height > window.innerHeight) {
32
34
  this.optionGroupRef.style.top = position.y - height + 'px';
@@ -74,7 +76,9 @@ class SelectOptionGroup extends _react.Component {
74
76
  }
75
77
  };
76
78
  this.onMouseDown = e => {
77
- const isInModal = this.props.isInModal;
79
+ const {
80
+ isInModal
81
+ } = this.props;
78
82
  // prevent event propagation when click option or search input
79
83
  if (isInModal) {
80
84
  e.stopPropagation();
@@ -82,9 +86,10 @@ class SelectOptionGroup extends _react.Component {
82
86
  }
83
87
  };
84
88
  this.scrollContent = () => {
85
- const _this$optionGroupCont = this.optionGroupContentRef,
86
- offsetHeight = _this$optionGroupCont.offsetHeight,
87
- scrollTop = _this$optionGroupCont.scrollTop;
89
+ const {
90
+ offsetHeight,
91
+ scrollTop
92
+ } = this.optionGroupContentRef;
88
93
  this.setState({
89
94
  disableHover: true
90
95
  });
@@ -121,10 +126,11 @@ class SelectOptionGroup extends _react.Component {
121
126
  });
122
127
  };
123
128
  this.renderOptGroup = searchVal => {
124
- let _this$props2 = this.props,
125
- noOptionsPlaceholder = _this$props2.noOptionsPlaceholder,
126
- onSelectOption = _this$props2.onSelectOption,
127
- selectedOptions = _this$props2.selectedOptions;
129
+ let {
130
+ noOptionsPlaceholder,
131
+ onSelectOption,
132
+ selectedOptions
133
+ } = this.props;
128
134
  this.filterOptions = this.props.getFilterOptions(searchVal);
129
135
  if (this.filterOptions.length === 0) {
130
136
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -174,15 +180,18 @@ class SelectOptionGroup extends _react.Component {
174
180
  document.removeEventListener('mousedown', this.handleDocumentClick);
175
181
  }
176
182
  render() {
177
- const _this$props3 = this.props,
178
- searchPlaceholder = _this$props3.searchPlaceholder,
179
- top = _this$props3.top,
180
- left = _this$props3.left,
181
- minWidth = _this$props3.minWidth,
182
- isInModal = _this$props3.isInModal,
183
- position = _this$props3.position,
184
- className = _this$props3.className;
185
- let searchVal = this.state.searchVal;
183
+ const {
184
+ searchPlaceholder,
185
+ top,
186
+ left,
187
+ minWidth,
188
+ isInModal,
189
+ position,
190
+ className
191
+ } = this.props;
192
+ let {
193
+ searchVal
194
+ } = this.state;
186
195
  let style = {
187
196
  top: top || 0,
188
197
  left: left || 0
@@ -11,12 +11,13 @@ var _svgIcon = _interopRequireDefault(require("./svg-icon"));
11
11
  require("./index.css");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  const DTableIcon = _ref => {
14
- let className = _ref.className,
15
- symbol = _ref.symbol,
16
- color = _ref.color,
17
- _ref$ariaHidden = _ref.ariaHidden,
18
- ariaHidden = _ref$ariaHidden === void 0 ? false : _ref$ariaHidden,
19
- getSvg = _ref.getSvg;
14
+ let {
15
+ className,
16
+ symbol,
17
+ color,
18
+ ariaHidden = false,
19
+ getSvg
20
+ } = _ref;
20
21
  if (!symbol) return null;
21
22
  if (symbol.includes('dtable-icon')) {
22
23
  let customProps = {};
@@ -26,11 +26,13 @@ const getSvgIconComponents = () => {
26
26
  return svgIconComponents;
27
27
  };
28
28
  const SvgIcon = _ref => {
29
- let className = _ref.className,
30
- symbol = _ref.symbol,
31
- color = _ref.color,
32
- ariaHidden = _ref.ariaHidden,
33
- getSvg = _ref.getSvg;
29
+ let {
30
+ className,
31
+ symbol,
32
+ color,
33
+ ariaHidden,
34
+ getSvg
35
+ } = _ref;
34
36
  if (!symbol) return null;
35
37
  let props = {
36
38
  style: {
@@ -1,22 +1,5 @@
1
- .modal-header .dtable-modal-close.close {
2
- padding: 14px 16px;
3
- opacity: 1;
4
- margin: -1rem -1rem -1rem auto;
5
- background-color: transparent;
6
- border: 0;
7
- float: right;
8
- font-size: 1.40625rem;
9
- font-weight: 700;
10
- line-height: 1;
11
- color: #000;
12
- }
13
-
14
- .modal-header .dtable-modal-close.close:not(:disabled):not(.disabled):hover {
15
- opacity: 1;
16
- }
17
-
18
1
  .modal-header .dtable-modal-close .dtable-modal-close-inner {
19
- width: 28px;
20
- height: 28px;
21
- font-size: 22.5px; /* same with Seafile close icon */
2
+ width: 24px;
3
+ height: 24px;
4
+ font-size: 16px; /* same with Seafile close icon */
22
5
  }
@@ -14,7 +14,9 @@ require("./index.css");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  const _excluded = ["children"];
16
16
  const DTableModalHeader = _ref => {
17
- let children = _ref.children,
17
+ let {
18
+ children
19
+ } = _ref,
18
20
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
19
21
  const customCloseBtn = /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
20
22
  type: "button",