dtable-ui-component 6.0.126-beta.s1 → 6.0.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/lib/ActionSheet/index.js +14 -16
  2. package/lib/ActivityIndicator/index.js +7 -8
  3. package/lib/AsyncUserSelect/index.css +19 -46
  4. package/lib/AsyncUserSelect/index.js +58 -41
  5. package/lib/AsyncUserSelect/user-item.js +5 -6
  6. package/lib/AutoNumberFormatter/index.js +3 -4
  7. package/lib/Badge/index.js +9 -11
  8. package/lib/ButtonFormatter/index.js +6 -8
  9. package/lib/CTimeFormatter/index.js +3 -4
  10. package/lib/CheckboxEditor/index.js +1 -3
  11. package/lib/CheckboxEditor/mb-editor.js +9 -20
  12. package/lib/CheckboxEditor/pc-editor.js +12 -24
  13. package/lib/CheckboxFormatter/index.js +4 -5
  14. package/lib/CollaboratorEditor/index.js +2 -4
  15. package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
  16. package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
  17. package/lib/CollaboratorFormatter/index.js +8 -10
  18. package/lib/CollaboratorItem/index.js +4 -5
  19. package/lib/CollapsibleSettingLayout/index.js +9 -7
  20. package/lib/Comment/body/comment.js +10 -18
  21. package/lib/Comment/body/index.js +2 -4
  22. package/lib/Comment/footer/btns/index.js +4 -7
  23. package/lib/Comment/footer/index.js +9 -20
  24. package/lib/Comment/footer/input/index.js +29 -50
  25. package/lib/Comment/footer/input/participant/index.js +4 -5
  26. package/lib/Comment/footer/participants/index.js +4 -5
  27. package/lib/Comment/footer/participants/participant/index.js +1 -3
  28. package/lib/Comment/footer/participants/participant-select/index.js +8 -24
  29. package/lib/Comment/index.js +39 -57
  30. package/lib/Comment/utils/utilities.js +15 -21
  31. package/lib/CreatorFormatter/index.js +6 -8
  32. package/lib/DTableColorPicker/ColorPickerPortal/index.js +23 -19
  33. package/lib/DTableColorPicker/index.css +0 -2
  34. package/lib/DTableColorPicker/index.js +56 -41
  35. package/lib/DTableColorPicker/utils.js +4 -6
  36. package/lib/DTableColumnIcon/index.js +6 -7
  37. package/lib/DTableCommonAddTool/index.css +1 -3
  38. package/lib/DTableCommonAddTool/index.js +6 -8
  39. package/lib/DTableCustomFooter/index.css +1 -3
  40. package/lib/DTableCustomFooter/index.js +1 -3
  41. package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
  42. package/lib/DTableCustomizeSelect/index.css +43 -67
  43. package/lib/DTableCustomizeSelect/index.js +29 -40
  44. package/lib/DTableDropdownItem/index.js +16 -18
  45. package/lib/DTableDropdownMenu/index.js +8 -10
  46. package/lib/DTableEmptyTip/index.js +4 -5
  47. package/lib/DTableFiltersPopover/index.css +0 -2
  48. package/lib/DTableFiltersPopover/index.js +26 -41
  49. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -5
  50. package/lib/DTableFiltersPopover/utils/index.js +63 -113
  51. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -10
  52. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
  53. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
  54. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
  55. package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
  56. package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
  57. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
  58. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
  59. package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
  60. package/lib/DTableGroupSelect/index.css +5 -31
  61. package/lib/DTableGroupSelect/index.js +13 -17
  62. package/lib/DTableGroupSelect/select-option-group.css +15 -11
  63. package/lib/DTableGroupSelect/select-option-group.js +31 -43
  64. package/lib/DTableIcon/index.js +6 -7
  65. package/lib/DTableIcon/svg-icon.js +5 -7
  66. package/lib/DTableModalHeader/index.js +1 -3
  67. package/lib/DTablePopover/index.js +13 -16
  68. package/lib/DTableRadio/index.js +10 -9
  69. package/lib/DTableRadioGroup/index.js +8 -17
  70. package/lib/DTableSearchInput/index.js +19 -29
  71. package/lib/DTableSelect/dtable-select-label.css +4 -4
  72. package/lib/DTableSelect/dtable-select-label.js +7 -6
  73. package/lib/DTableSelect/index.js +24 -25
  74. package/lib/DTableSelect/user-select.css +46 -7
  75. package/lib/DTableSelect/utils.js +82 -179
  76. package/lib/DTableSubDropdownMenu/index.js +8 -10
  77. package/lib/DTableSubDropdownToggle/index.js +12 -12
  78. package/lib/DTableSwitch/index.css +0 -1
  79. package/lib/DTableSwitch/index.js +12 -11
  80. package/lib/DTableToolTip/index.js +7 -8
  81. package/lib/DateEditor/index.js +20 -15
  82. package/lib/DateEditor/mb-editor/index.js +18 -31
  83. package/lib/DateEditor/pc-editor.js +26 -45
  84. package/lib/DateFormatter/index.js +4 -5
  85. package/lib/DatePicker/index.js +9 -15
  86. package/lib/DatePicker/utils.js +1 -3
  87. package/lib/DeleteTip/index.js +5 -6
  88. package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
  89. package/lib/DepartmentSelectFilter/index.js +6 -8
  90. package/lib/DepartmentSingleSelectEditor/index.js +1 -3
  91. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
  92. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
  93. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
  94. package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
  95. package/lib/DigitalSignEditor/index.js +1 -3
  96. package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
  97. package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
  98. package/lib/DigitalSignEditor/service.js +2 -4
  99. package/lib/DigitalSignEditor/signature-board/index.js +5 -8
  100. package/lib/DigitalSignEditor/utils.js +2 -4
  101. package/lib/DigitalSignFormatter/index.js +12 -15
  102. package/lib/DigitalSignFormatter/utils.js +4 -5
  103. package/lib/DurationEditor/index.js +21 -31
  104. package/lib/DurationFormatter/index.js +4 -5
  105. package/lib/EditEditorButton/index.js +1 -3
  106. package/lib/EmailFormatter/index.js +3 -4
  107. package/lib/FieldDisplaySetting/field-item.js +12 -12
  108. package/lib/FieldDisplaySetting/index.js +11 -9
  109. package/lib/FileEditor/files-previewer/index.js +1 -3
  110. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
  111. package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
  112. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
  113. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
  114. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
  115. package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
  116. package/lib/FileEditor/index.js +1 -3
  117. package/lib/FileEditor/mb-editor/index.js +28 -20
  118. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
  119. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
  120. package/lib/FileEditor/pc-editor/index.js +19 -27
  121. package/lib/FileFormatter/index.js +26 -19
  122. package/lib/FileItemFormatter/index.js +6 -9
  123. package/lib/FileUploader/index.js +28 -45
  124. package/lib/FormulaFormatter/index.js +15 -29
  125. package/lib/GeolocationEditor/index.js +11 -12
  126. package/lib/GeolocationEditor/map-editor-utils.js +17 -15
  127. package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
  128. package/lib/GeolocationEditor/mb-editor/index.js +4 -6
  129. package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
  130. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
  131. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
  132. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
  133. package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
  134. package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
  135. package/lib/GeolocationEditor/pc-editor/index.js +12 -20
  136. package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
  137. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
  138. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
  139. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
  140. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
  141. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
  142. package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
  143. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
  144. package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
  145. package/lib/GeolocationFormatter/index.js +4 -5
  146. package/lib/HtmlLongTextFormatter/index.js +4 -12
  147. package/lib/Icon/index.js +3 -5
  148. package/lib/IconButton/index.js +4 -6
  149. package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
  150. package/lib/ImageEditor/images-previewer/index.js +3 -9
  151. package/lib/ImageEditor/index.js +1 -3
  152. package/lib/ImageEditor/mb-editor/index.js +28 -20
  153. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
  154. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
  155. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
  156. package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
  157. package/lib/ImageEditor/pc-editor/index.js +11 -16
  158. package/lib/ImageFormatter/images-lazy-load.js +19 -11
  159. package/lib/ImageFormatter/index.js +11 -13
  160. package/lib/ImagePreviewerLightbox/index.js +15 -13
  161. package/lib/ImageThumbnail/index.js +10 -13
  162. package/lib/InputItem/custom-input.js +26 -46
  163. package/lib/InputItem/custom-keyboard.js +15 -18
  164. package/lib/InputItem/index.js +34 -50
  165. package/lib/InputItem/input.js +2 -4
  166. package/lib/LastModifierFormatter/index.js +6 -8
  167. package/lib/LinkEditor/index.js +33 -53
  168. package/lib/LinkEditor/link-editor-option.js +3 -4
  169. package/lib/LinkEditor/mb-popover/index.js +9 -22
  170. package/lib/LinkEditor/pc-popover/index.js +5 -10
  171. package/lib/LinkFormatter/index.js +21 -37
  172. package/lib/List/index.js +6 -8
  173. package/lib/List/list-item.js +22 -28
  174. package/lib/LongTextFormatter/index.js +4 -5
  175. package/lib/MBEditorHeader/index.js +7 -8
  176. package/lib/MTimeFormatter/index.js +3 -4
  177. package/lib/MobileFullScreenPage/body/index.js +3 -5
  178. package/lib/MobileFullScreenPage/header/index.js +4 -6
  179. package/lib/MobileFullScreenPage/index.js +13 -11
  180. package/lib/MobileModal/index.js +1 -3
  181. package/lib/MobileOperationSheet/index.js +7 -8
  182. package/lib/MobileSelector/empty/index.js +1 -3
  183. package/lib/MobileSelector/index.js +5 -7
  184. package/lib/MobileSelector/option/index.js +3 -5
  185. package/lib/MobileSelector/options/index.js +1 -3
  186. package/lib/MobileSelector/search/index.js +3 -5
  187. package/lib/MobileUpload/index.js +4 -5
  188. package/lib/Modal/modal.js +14 -15
  189. package/lib/Modal/prompt.js +4 -4
  190. package/lib/MultipleSelectEditor/index.js +1 -3
  191. package/lib/MultipleSelectFormatter/index.js +6 -8
  192. package/lib/NotificationPopover/index.css +1 -6
  193. package/lib/NotificationPopover/index.js +6 -7
  194. package/lib/NumberEditor/index.js +12 -21
  195. package/lib/NumberFormatter/index.js +4 -5
  196. package/lib/PhoneNumberLink/index.js +2 -4
  197. package/lib/Picker/AbstractPicker.js +23 -27
  198. package/lib/Popover/index.js +3 -4
  199. package/lib/Popover/item.js +7 -9
  200. package/lib/Progress/index.js +9 -8
  201. package/lib/Radio/Radio.js +4 -8
  202. package/lib/Radio/RadioItem.js +8 -12
  203. package/lib/RateFormatter/index.js +13 -13
  204. package/lib/RoleStatusEditor/index.js +18 -17
  205. package/lib/RowExpandDialog/body/index.js +32 -49
  206. package/lib/RowExpandDialog/column-content/index.js +5 -9
  207. package/lib/RowExpandDialog/header/index.js +6 -8
  208. package/lib/RowExpandDialog/index.js +49 -34
  209. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
  210. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
  211. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
  212. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
  213. package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
  214. package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
  215. package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
  216. package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
  217. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
  218. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
  219. package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
  220. package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
  221. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
  222. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
  223. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
  224. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
  225. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
  226. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
  227. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
  228. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
  229. package/lib/RowExpandEditor/index.js +4 -8
  230. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
  231. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
  232. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
  233. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
  234. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
  235. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
  236. package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
  237. package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
  238. package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
  239. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
  240. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
  241. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
  242. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
  243. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
  244. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
  245. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
  246. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
  247. package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
  248. package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
  249. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
  250. package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
  251. package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
  252. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
  253. package/lib/RowExpandFormatter/index.js +27 -41
  254. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
  255. package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
  256. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
  257. package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
  258. package/lib/RowExpandFormatter/text/index.js +4 -5
  259. package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
  260. package/lib/RowExpandView/body/index.js +22 -35
  261. package/lib/RowExpandView/column-content/index.js +3 -7
  262. package/lib/RowExpandView/index.js +42 -30
  263. package/lib/SelectItem/index.js +5 -7
  264. package/lib/SelectOptionGroup/index.css +25 -53
  265. package/lib/SelectOptionGroup/index.js +36 -84
  266. package/lib/SelectedDepartments/index.js +7 -9
  267. package/lib/SimpleLongTextFormatter/index.js +10 -16
  268. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
  269. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
  270. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
  271. package/lib/SingleSelectEditor/index.js +1 -3
  272. package/lib/SingleSelectFormatter/index.js +8 -9
  273. package/lib/TabBar/Tab.js +14 -16
  274. package/lib/TabBar/index.js +18 -21
  275. package/lib/Tabs/index.js +1 -3
  276. package/lib/TextEditor/index.js +14 -23
  277. package/lib/TextFormatter/index.js +3 -4
  278. package/lib/TextareaItem/index.js +19 -26
  279. package/lib/Toast/index.js +3 -4
  280. package/lib/UrlFormatter/index.js +3 -4
  281. package/lib/common/editor-base.js +7 -12
  282. package/lib/hooks/common-hooks.js +2 -4
  283. package/lib/index.js +0 -7
  284. package/lib/select-editor/index.js +1 -3
  285. package/lib/select-editor/mb-editor/index.js +17 -28
  286. package/lib/select-editor/pc-editor/index.js +27 -42
  287. package/lib/toaster/alert.js +6 -7
  288. package/lib/toaster/toast.js +2 -3
  289. package/lib/toaster/toastManager.js +2 -4
  290. package/lib/utils/cell.js +8 -11
  291. package/lib/utils/column-utils.js +8 -14
  292. package/lib/utils/departments.js +1 -3
  293. package/lib/utils/url.js +24 -31
  294. package/lib/utils/utils.js +2 -6
  295. package/package.json +8 -8
  296. package/lib/DTableCustomizeSearchInput/index.css +0 -81
  297. package/lib/DTableCustomizeSearchInput/index.js +0 -141
  298. package/lib/DTableCustomizeSelect/select-option-group/KeyCodes.js +0 -109
  299. package/lib/DTableCustomizeSelect/select-option-group/index.css +0 -134
  300. package/lib/DTableCustomizeSelect/select-option-group/index.js +0 -260
  301. package/lib/DTableCustomizeSelect/select-option-group/option.js +0 -48
  302. package/lib/DTableCustomizeSelect/util.js +0 -12
  303. package/lib/DTableSelect/select-dropdown-indicator/index.css +0 -16
  304. package/lib/DTableSelect/select-dropdown-indicator/index.js +0 -26
  305. package/lib/DTableSelect/select-style.js +0 -133
  306. package/lib/assets/icons/close.svg +0 -1
  307. package/lib/assets/icons/down.svg +0 -3
@@ -42,9 +42,7 @@ class Comment extends _react.default.Component {
42
42
  let isGetCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
43
43
  _this.initComments(row, 1, pageNum);
44
44
  if (!isGetCount) return;
45
- const {
46
- api
47
- } = _this.props;
45
+ const api = _this.props.api;
48
46
  api.getCount(row).then(res => {
49
47
  const count = res.data.count;
50
48
  _this.updateCount(row, count);
@@ -55,9 +53,7 @@ class Comment extends _react.default.Component {
55
53
  this.initComments = function (row) {
56
54
  let page = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
57
55
  let perPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
58
- const {
59
- api
60
- } = _this.props;
56
+ const api = _this.props.api;
61
57
  api.get(row, page, perPage).then(res => {
62
58
  let comments = res.data.comment_list || [];
63
59
  let newComments = [];
@@ -74,14 +70,11 @@ class Comment extends _react.default.Component {
74
70
  });
75
71
  };
76
72
  this.addComment = (newComment, _ref) => {
77
- let {
78
- successCallback,
79
- failCallback
80
- } = _ref;
81
- const {
82
- row,
83
- api
84
- } = this.props;
73
+ let successCallback = _ref.successCallback,
74
+ failCallback = _ref.failCallback;
75
+ const _this$props = this.props,
76
+ row = _this$props.row,
77
+ api = _this$props.api;
85
78
  api.add(row, newComment).then(res => api.getCount(row)).then(res => {
86
79
  const count = res.data.count;
87
80
  this.updateCount(row, count);
@@ -96,10 +89,9 @@ class Comment extends _react.default.Component {
96
89
  };
97
90
  this.resolveComment = (event, commentID) => {
98
91
  event.persist();
99
- const {
100
- row,
101
- api
102
- } = this.props;
92
+ const _this$props2 = this.props,
93
+ row = _this$props2.row,
94
+ api = _this$props2.api;
103
95
  api.update(row, commentID, null, 1).then(() => {
104
96
  this.reCalculateComments(row);
105
97
  }).catch(error => {
@@ -107,10 +99,9 @@ class Comment extends _react.default.Component {
107
99
  });
108
100
  };
109
101
  this.deleteComment = (event, commentID) => {
110
- const {
111
- api,
112
- row
113
- } = this.props;
102
+ const _this$props3 = this.props,
103
+ api = _this$props3.api,
104
+ row = _this$props3.row;
114
105
  api.delete(row, commentID).then(() => {
115
106
  this.reCalculateComments(row);
116
107
  }).catch(e => {
@@ -119,17 +110,14 @@ class Comment extends _react.default.Component {
119
110
  };
120
111
  // notification
121
112
  this.onNewNotification = notification => {
122
- const {
123
- msg_type
124
- } = notification;
113
+ const msg_type = notification.msg_type;
125
114
  if (msg_type !== ROW_COMMENT) return;
126
115
  this.setState({
127
116
  isFirstLoading: true
128
117
  });
129
- const {
130
- row,
131
- api
132
- } = this.props;
118
+ const _this$props4 = this.props,
119
+ row = _this$props4.row,
120
+ api = _this$props4.api;
133
121
  api.getCount(row).then(res => {
134
122
  const count = res.data.count;
135
123
  this.updateCount(row, count);
@@ -140,11 +128,9 @@ class Comment extends _react.default.Component {
140
128
  };
141
129
  // collaborators
142
130
  this.initCollaborators = props => {
143
- const {
144
- columns,
145
- row,
146
- collaborators
147
- } = props;
131
+ const columns = props.columns,
132
+ row = props.row,
133
+ collaborators = props.collaborators;
148
134
  let collaboratorColumnKeyList = [];
149
135
  columns.forEach(column => {
150
136
  if (column.type === _dtableUtils.CellType.COLLABORATOR) {
@@ -193,14 +179,12 @@ class Comment extends _react.default.Component {
193
179
  };
194
180
  this.onScroll = () => {
195
181
  if (this.body.offsetHeight + this.body.scrollTop + 1 < this.bodyContent.offsetHeight + 32) return; // 16 is padding height
196
- const {
197
- api,
198
- row
199
- } = this.props;
200
- const {
201
- comments,
202
- count
203
- } = this.state;
182
+ const _this$props5 = this.props,
183
+ api = _this$props5.api,
184
+ row = _this$props5.row;
185
+ const _this$state = this.state,
186
+ comments = _this$state.comments,
187
+ count = _this$state.count;
204
188
  let currentCommentsLength = comments.length;
205
189
  if (currentCommentsLength < count) {
206
190
  // Have pagination
@@ -257,21 +241,19 @@ class Comment extends _react.default.Component {
257
241
  this.unsubscribeNotification();
258
242
  }
259
243
  render() {
260
- const {
261
- collaborators,
262
- comments,
263
- isLoading,
264
- isFirstLoading
265
- } = this.state;
266
- const {
267
- autoFocusInput,
268
- row,
269
- columns,
270
- onInputFocus,
271
- onInputBlur,
272
- api,
273
- uploadFile
274
- } = this.props;
244
+ const _this$state2 = this.state,
245
+ collaborators = _this$state2.collaborators,
246
+ comments = _this$state2.comments,
247
+ isLoading = _this$state2.isLoading,
248
+ isFirstLoading = _this$state2.isFirstLoading;
249
+ const _this$props6 = this.props,
250
+ autoFocusInput = _this$props6.autoFocusInput,
251
+ row = _this$props6.row,
252
+ columns = _this$props6.columns,
253
+ onInputFocus = _this$props6.onInputFocus,
254
+ onInputBlur = _this$props6.onInputBlur,
255
+ api = _this$props6.api,
256
+ uploadFile = _this$props6.uploadFile;
275
257
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
276
258
  className: "dtable-ui-comments h-100 w-100",
277
259
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -9,13 +9,11 @@ var _getEventTransfer = _interopRequireDefault(require("../../utils/get-event-tr
9
9
  class Utilities {
10
10
  constructor() {
11
11
  this.onInsertElement = _ref => {
12
- let {
13
- commentRef,
14
- selection,
15
- range,
16
- content,
17
- nodeType
18
- } = _ref;
12
+ let commentRef = _ref.commentRef,
13
+ selection = _ref.selection,
14
+ range = _ref.range,
15
+ content = _ref.content,
16
+ nodeType = _ref.nodeType;
19
17
  if (range) {
20
18
  selection.removeAllRanges();
21
19
  selection.addRange(range);
@@ -48,13 +46,11 @@ class Utilities {
48
46
  }
49
47
  };
50
48
  this.createHtmlElement = _ref2 => {
51
- let {
52
- commentRef,
53
- selection,
54
- range,
55
- content,
56
- nodeType
57
- } = _ref2;
49
+ let commentRef = _ref2.commentRef,
50
+ selection = _ref2.selection,
51
+ range = _ref2.range,
52
+ content = _ref2.content,
53
+ nodeType = _ref2.nodeType;
58
54
  let spanNode1;
59
55
  let spanNode2;
60
56
  let imageContainer;
@@ -97,13 +93,11 @@ class Utilities {
97
93
  return range;
98
94
  };
99
95
  this.onSelectParticipant = _ref3 => {
100
- let {
101
- selection,
102
- range,
103
- participant,
104
- callBack,
105
- commentRef
106
- } = _ref3;
96
+ let selection = _ref3.selection,
97
+ range = _ref3.range,
98
+ participant = _ref3.participant,
99
+ callBack = _ref3.callBack,
100
+ commentRef = _ref3.commentRef;
107
101
  if (range) {
108
102
  // delete '@xxx';
109
103
  selection.removeAllRanges();
@@ -20,10 +20,9 @@ class CreatorFormatter extends _react.default.PureComponent {
20
20
  constructor() {
21
21
  super(...arguments);
22
22
  this.getCollaborators = () => {
23
- let {
24
- value,
25
- collaborators
26
- } = this.props;
23
+ let _this$props = this.props,
24
+ value = _this$props.value,
25
+ collaborators = _this$props.collaborators;
27
26
  if (!Array.isArray(value)) {
28
27
  value = [value];
29
28
  }
@@ -43,10 +42,9 @@ class CreatorFormatter extends _react.default.PureComponent {
43
42
  };
44
43
  }
45
44
  render() {
46
- const {
47
- containerClassName,
48
- value
49
- } = this.props;
45
+ const _this$props2 = this.props,
46
+ containerClassName = _this$props2.containerClassName,
47
+ value = _this$props2.value;
50
48
  const classname = (0, _classnames.default)('dtable-ui cell-formatter-container creator-formatter', containerClassName);
51
49
  if (!value || Array.isArray(value) && value.length === 0) {
52
50
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -7,33 +7,37 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = ColorPickerPortal;
9
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
11
  var _react = _interopRequireWildcard(require("react"));
11
12
  var _reactDom = _interopRequireDefault(require("react-dom"));
12
13
  var _utils = require("../../utils/utils");
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  function ColorPickerPortal(_ref) {
15
- let {
16
- target,
17
- scrollContainerId,
18
- throttleDelay = 16,
19
- children
20
- } = _ref;
16
+ let target = _ref.target,
17
+ scrollContainerId = _ref.scrollContainerId,
18
+ _ref$throttleDelay = _ref.throttleDelay,
19
+ throttleDelay = _ref$throttleDelay === void 0 ? 16 : _ref$throttleDelay,
20
+ children = _ref.children;
21
21
  const containerRef = (0, _react.useRef)(null);
22
- const [isPositioned, setIsPositioned] = (0, _react.useState)(false);
23
- const [position, setPosition] = (0, _react.useState)(() => {
24
- return {
25
- top: '-9999px',
26
- left: '-9999px',
27
- visibility: 'hidden'
28
- };
29
- });
22
+ const _useState = (0, _react.useState)(false),
23
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
24
+ isPositioned = _useState2[0],
25
+ setIsPositioned = _useState2[1];
26
+ const _useState3 = (0, _react.useState)(() => {
27
+ return {
28
+ top: '-9999px',
29
+ left: '-9999px',
30
+ visibility: 'hidden'
31
+ };
32
+ }),
33
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
34
+ position = _useState4[0],
35
+ setPosition = _useState4[1];
30
36
  const updatePosition = (0, _react.useCallback)(() => {
31
37
  if (!target || !containerRef.current) return;
32
38
  const targetRect = target.getBoundingClientRect();
33
- const {
34
- top: spaceAbove,
35
- left
36
- } = targetRect;
39
+ const spaceAbove = targetRect.top,
40
+ left = targetRect.left;
37
41
  const portalRectHeight = containerRef.current.clientHeight;
38
42
  const newPosition = {
39
43
  left: "".concat(left + 1, "px"),
@@ -72,7 +76,7 @@ function ColorPickerPortal(_ref) {
72
76
  }, [target, scrollContainerId, throttleDelay, updatePosition]);
73
77
  if (!target) return null;
74
78
  return /*#__PURE__*/_reactDom.default.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
75
- className: "dtable-color-picker-portal",
79
+ className: "dtable-color-picker-portal dtable-popover-container",
76
80
  style: {
77
81
  position: 'fixed',
78
82
  zIndex: '1049',
@@ -2,12 +2,10 @@
2
2
  width: 240px;
3
3
  height: 370px;
4
4
  background-color: #fff;
5
- border-radius: 3px;
6
5
  z-index: 100;
7
6
  padding: 0.75rem;
8
7
  line-height: 16px;
9
8
  position: absolute;
10
- box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 2px, rgba(0, 0, 0, 0.3) 0px 4px 4px;
11
9
  }
12
10
 
13
11
  .dtable-color-picker .chrome-picker {
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
11
  var _react = _interopRequireWildcard(require("react"));
11
12
  var _reactstrap = require("reactstrap");
12
13
  var _reactColor = require("react-color");
@@ -29,25 +30,46 @@ const RGB_COLORS_MAP = {
29
30
  };
30
31
  const LOCAL_STORAGE_KEY = 'dtable-color-picker';
31
32
  const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
32
- let {
33
- onToggle,
34
- popoverStyle,
35
- color = '#ffffff',
36
- defaultColors,
37
- useProtal,
38
- target,
39
- scrollContainerId,
40
- throttleDelay = 20,
41
- onSubmit
42
- } = _ref;
33
+ let onToggle = _ref.onToggle,
34
+ popoverStyle = _ref.popoverStyle,
35
+ _ref$color = _ref.color,
36
+ color = _ref$color === void 0 ? '#ffffff' : _ref$color,
37
+ defaultColors = _ref.defaultColors,
38
+ useProtal = _ref.useProtal,
39
+ target = _ref.target,
40
+ scrollContainerId = _ref.scrollContainerId,
41
+ _ref$throttleDelay = _ref.throttleDelay,
42
+ throttleDelay = _ref$throttleDelay === void 0 ? 20 : _ref$throttleDelay,
43
+ onSubmit = _ref.onSubmit;
43
44
  const initialRgbaColor = (0, _utils.hexToRgba)(color);
44
- const [value, setValue] = (0, _react.useState)(initialRgbaColor);
45
- const [hexVal, setHexVal] = (0, _react.useState)((0, _utils.getInitialHexVal)(color));
46
- const [alphaVal, setAlphaVal] = (0, _react.useState)((0, _utils.toPercentage)(initialRgbaColor.a));
47
- const [redVal, setRedVal] = (0, _react.useState)(initialRgbaColor.r);
48
- const [greenVal, setGreenVal] = (0, _react.useState)(initialRgbaColor.g);
49
- const [blueVal, setBlueVal] = (0, _react.useState)(initialRgbaColor.b);
50
- const [colorMode, setColorMode] = (0, _react.useState)(COLOR_PICKER_MODE.HEX); // hex or rgb
45
+ const _useState = (0, _react.useState)(initialRgbaColor),
46
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
47
+ value = _useState2[0],
48
+ setValue = _useState2[1];
49
+ const _useState3 = (0, _react.useState)((0, _utils.getInitialHexVal)(color)),
50
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
51
+ hexVal = _useState4[0],
52
+ setHexVal = _useState4[1];
53
+ const _useState5 = (0, _react.useState)((0, _utils.toPercentage)(initialRgbaColor.a)),
54
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
55
+ alphaVal = _useState6[0],
56
+ setAlphaVal = _useState6[1];
57
+ const _useState7 = (0, _react.useState)(initialRgbaColor.r),
58
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
59
+ redVal = _useState8[0],
60
+ setRedVal = _useState8[1];
61
+ const _useState9 = (0, _react.useState)(initialRgbaColor.g),
62
+ _useState0 = (0, _slicedToArray2.default)(_useState9, 2),
63
+ greenVal = _useState0[0],
64
+ setGreenVal = _useState0[1];
65
+ const _useState1 = (0, _react.useState)(initialRgbaColor.b),
66
+ _useState10 = (0, _slicedToArray2.default)(_useState1, 2),
67
+ blueVal = _useState10[0],
68
+ setBlueVal = _useState10[1];
69
+ const _useState11 = (0, _react.useState)(COLOR_PICKER_MODE.HEX),
70
+ _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
71
+ colorMode = _useState12[0],
72
+ setColorMode = _useState12[1]; // hex or rgb
51
73
  const colorPickerRef = (0, _react.useRef)(null);
52
74
  let currentUsedColors = [];
53
75
  const currentUsedColorsStr = window.localStorage.getItem(LOCAL_STORAGE_KEY);
@@ -70,12 +92,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
70
92
  rgba.a = Math.round(rgba.a * 100) / 100;
71
93
  const transferedHex = (0, _utils.rgbaToHex)(rgba);
72
94
  const hexVal = transferedHex.substring(1, 7);
73
- const {
74
- r,
75
- g,
76
- b,
77
- a
78
- } = rgba;
95
+ const r = rgba.r,
96
+ g = rgba.g,
97
+ b = rgba.b,
98
+ a = rgba.a;
79
99
  setAlphaVal((0, _utils.toPercentage)(a));
80
100
  updateValue(rgba);
81
101
  if (colorMode === COLOR_PICKER_MODE.HEX) {
@@ -91,11 +111,9 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
91
111
  if (colorMode === COLOR_PICKER_MODE.HEX) {
92
112
  newMode = COLOR_PICKER_MODE.RGBA;
93
113
  const rgba = (0, _utils.hexToRgba)(color);
94
- const {
95
- r,
96
- g,
97
- b
98
- } = rgba;
114
+ const r = rgba.r,
115
+ g = rgba.g,
116
+ b = rgba.b;
99
117
  setRedVal(r);
100
118
  setGreenVal(g);
101
119
  setBlueVal(b);
@@ -122,11 +140,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
122
140
  newHexVal = newHexVal.split('').map(char => char + char).join('');
123
141
  }
124
142
  setHexVal(newHexVal);
125
- const {
126
- r,
127
- g,
128
- b
129
- } = (0, _utils.hexToRgba)(newHexVal);
143
+ const _hexToRgba = (0, _utils.hexToRgba)(newHexVal),
144
+ r = _hexToRgba.r,
145
+ g = _hexToRgba.g,
146
+ b = _hexToRgba.b;
130
147
  const newValue = {
131
148
  r,
132
149
  g,
@@ -209,12 +226,10 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
209
226
  };
210
227
  const onSelectDefaultColor = color => {
211
228
  const rgba = (0, _utils.hexToRgba)(color);
212
- const {
213
- r,
214
- g,
215
- b,
216
- a
217
- } = rgba;
229
+ const r = rgba.r,
230
+ g = rgba.g,
231
+ b = rgba.b,
232
+ a = rgba.a;
218
233
  const alphaVal = (0, _utils.toPercentage)(a);
219
234
  if (colorMode === COLOR_PICKER_MODE.RGBA) {
220
235
  setRedVal(r);
@@ -368,7 +383,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
368
383
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
369
384
  style: popoverStyle,
370
385
  ref: colorPickerRef,
371
- className: "dtable-color-picker",
386
+ className: "dtable-color-picker dtable-popover-container",
372
387
  children: [renderDefaultContainer(), renderCustomContainer(), renderUsedContainer()]
373
388
  })
374
389
  });
@@ -43,12 +43,10 @@ const rgbaToHex = function (color) {
43
43
  let isNeedPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
44
44
  let isNeedAlpha = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
45
45
  if (hexRegex.test(color)) return color;
46
- const {
47
- r,
48
- g,
49
- b,
50
- a
51
- } = color;
46
+ const r = color.r,
47
+ g = color.g,
48
+ b = color.b,
49
+ a = color.a;
52
50
  const toHex = value => {
53
51
  const hex = value.toString(16);
54
52
  return hex.length === 1 ? '0' + hex : hex;
@@ -45,13 +45,12 @@ const COLUMN_DISPLAY_TYPE_ICON_CONFIG = {
45
45
  }
46
46
  };
47
47
  const DTableColumnIcon = _ref => {
48
- let {
49
- column,
50
- color,
51
- className,
52
- ariaHidden = false,
53
- getSvg
54
- } = _ref;
48
+ let column = _ref.column,
49
+ color = _ref.color,
50
+ className = _ref.className,
51
+ _ref$ariaHidden = _ref.ariaHidden,
52
+ ariaHidden = _ref$ariaHidden === void 0 ? false : _ref$ariaHidden,
53
+ getSvg = _ref.getSvg;
55
54
  const columnType = column === null || column === void 0 ? void 0 : column.type;
56
55
  if (!columnType) return null;
57
56
  const columnDisplayType = (0, _dtableUtils.getColumnDisplayType)(column);
@@ -4,11 +4,9 @@
4
4
  height: 40px;
5
5
  font-size: 14px;
6
6
  font-weight: 500;
7
- border-top: 1px solid #dedede;
7
+ border-top: 1px solid var(--bs-border-secondary-color);
8
8
  background: #fff;
9
9
  padding: 0 1rem;
10
- border-bottom-left-radius: 3px;
11
- border-bottom-right-radius: 3px;
12
10
  position: relative;
13
11
  }
14
12
 
@@ -9,14 +9,12 @@ var _react = _interopRequireDefault(require("react"));
9
9
  require("./index.css");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function DTableCommonAddTool(_ref) {
12
- let {
13
- callBack,
14
- footerName,
15
- className,
16
- addIconClassName,
17
- hideIcon,
18
- style
19
- } = _ref;
12
+ let callBack = _ref.callBack,
13
+ footerName = _ref.footerName,
14
+ className = _ref.className,
15
+ addIconClassName = _ref.addIconClassName,
16
+ hideIcon = _ref.hideIcon,
17
+ style = _ref.style;
20
18
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
21
19
  className: "dtable-ui add-item-btn ".concat(className ? className : ''),
22
20
  style: style,
@@ -4,9 +4,7 @@
4
4
  align-items: center;
5
5
  justify-content: flex-end;
6
6
  padding: 0.75rem;
7
- border-top: 1px solid rgba(0, 40, 100, 0.12);
8
- border-bottom-right-radius: 2px;
9
- border-bottom-left-radius: 2px;
7
+ border-top: 1px solid var(--bs-border-secondary-color) !important;
10
8
  }
11
9
 
12
10
  .dtable-custom-footer>* {
@@ -10,9 +10,7 @@ require("./index.css");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  // DTableCustomFooter is used in geolocation editor and digital sign editor
12
12
  const DTableCustomFooter = _ref => {
13
- let {
14
- children
15
- } = _ref;
13
+ let children = _ref.children;
16
14
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
17
15
  className: "dtable-custom-footer",
18
16
  children: children
@@ -47,24 +47,22 @@ class CollaboratorSelect extends _react.Component {
47
47
  });
48
48
  };
49
49
  this.getFilterOptions = searchValue => {
50
- const {
51
- options,
52
- searchable
53
- } = this.props;
50
+ const _this$props = this.props,
51
+ options = _this$props.options,
52
+ searchable = _this$props.searchable;
54
53
  if (!searchable) return options || [];
55
54
  return (0, _dtableUtils.searchCollaborators)(options, searchValue);
56
55
  };
57
56
  this.renderOptionGroup = () => {
58
- const {
59
- value,
60
- options,
61
- searchable,
62
- searchPlaceholder,
63
- noOptionsPlaceholder,
64
- top,
65
- left,
66
- isUsePopover
67
- } = this.props;
57
+ const _this$props2 = this.props,
58
+ value = _this$props2.value,
59
+ options = _this$props2.options,
60
+ searchable = _this$props2.searchable,
61
+ searchPlaceholder = _this$props2.searchPlaceholder,
62
+ noOptionsPlaceholder = _this$props2.noOptionsPlaceholder,
63
+ top = _this$props2.top,
64
+ left = _this$props2.left,
65
+ isUsePopover = _this$props2.isUsePopover;
68
66
  if (!isUsePopover) {
69
67
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectOptionGroup.default, {
70
68
  value: value,
@@ -123,12 +121,11 @@ class CollaboratorSelect extends _react.Component {
123
121
  document.removeEventListener('mousedown', this.onMousedown);
124
122
  }
125
123
  render() {
126
- let {
127
- className,
128
- value,
129
- placeholder,
130
- isLocked
131
- } = this.props;
124
+ let _this$props3 = this.props,
125
+ className = _this$props3.className,
126
+ value = _this$props3.value,
127
+ placeholder = _this$props3.placeholder,
128
+ isLocked = _this$props3.isLocked;
132
129
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
133
130
  ref: node => this.selector = node,
134
131
  className: (0, _classnames.default)('dtable-select custom-select collaborator-select', {