dtable-ui-component 7.0.13 → 7.0.15

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 (308) hide show
  1. package/lib/ActionSheet/index.js +58 -49
  2. package/lib/ActivityIndicator/index.js +17 -16
  3. package/lib/AsyncUserSelect/index.js +20 -46
  4. package/lib/AsyncUserSelect/user-item.js +6 -5
  5. package/lib/AutoNumberFormatter/index.js +4 -3
  6. package/lib/Badge/index.js +27 -29
  7. package/lib/ButtonFormatter/index.js +8 -6
  8. package/lib/CTimeFormatter/index.js +4 -3
  9. package/lib/CheckboxEditor/index.js +16 -13
  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 +17 -14
  14. package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
  15. package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
  16. package/lib/CollaboratorFormatter/index.js +10 -8
  17. package/lib/CollaboratorItem/index.js +5 -4
  18. package/lib/CollapsibleSettingLayout/index.js +8 -10
  19. package/lib/Comment/body/comment.js +19 -11
  20. package/lib/Comment/body/index.js +8 -8
  21. package/lib/Comment/footer/btns/index.js +7 -4
  22. package/lib/Comment/footer/index.js +21 -10
  23. package/lib/Comment/footer/input/index.js +55 -34
  24. package/lib/Comment/footer/input/participant/index.js +6 -5
  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 +26 -10
  28. package/lib/Comment/index.js +57 -39
  29. package/lib/Comment/utils/utilities.js +22 -16
  30. package/lib/CreatorFormatter/index.js +8 -6
  31. package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
  32. package/lib/DTableColorPicker/index.js +53 -67
  33. package/lib/DTableColorPicker/utils.js +7 -5
  34. package/lib/DTableColumnIcon/index.js +7 -6
  35. package/lib/DTableCommonAddTool/index.js +10 -8
  36. package/lib/DTableCustomFooter/index.js +3 -1
  37. package/lib/DTableCustomizeSearchInput/index.js +41 -26
  38. package/lib/DTableCustomizeSelect/index.js +24 -19
  39. package/lib/DTableDropdownItem/index.js +28 -24
  40. package/lib/DTableDropdownMenu/index.js +17 -14
  41. package/lib/DTableEmptyTip/index.js +5 -4
  42. package/lib/DTableFiltersPopover/index.js +42 -27
  43. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
  44. package/lib/DTableFiltersPopover/utils/index.js +114 -64
  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 +57 -36
  50. package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
  51. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
  52. package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
  53. package/lib/DTableIcon/index.js +11 -10
  54. package/lib/DTableIcon/svg-icon.js +11 -9
  55. package/lib/DTableModalHeader/index.js +7 -7
  56. package/lib/DTablePopover/index.js +16 -12
  57. package/lib/DTableRadio/index.js +9 -10
  58. package/lib/DTableRadioGroup/index.js +20 -11
  59. package/lib/DTableSearchInput/index.js +29 -19
  60. package/lib/DTableSelect/dtable-select-label.js +6 -7
  61. package/lib/DTableSelect/index.js +26 -25
  62. package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
  63. package/lib/DTableSelect/utils.js +83 -47
  64. package/lib/DTableSubDropdownMenu/index.js +16 -12
  65. package/lib/DTableSubDropdownToggle/index.js +16 -17
  66. package/lib/DTableSwitch/index.js +11 -12
  67. package/lib/DTableToolTip/index.js +12 -11
  68. package/lib/DateEditor/index.js +28 -30
  69. package/lib/DateEditor/mb-editor/index.js +31 -18
  70. package/lib/DateEditor/pc-editor.js +46 -27
  71. package/lib/DateFormatter/index.js +5 -4
  72. package/lib/DatePicker/index.js +15 -9
  73. package/lib/DatePicker/utils.js +7 -5
  74. package/lib/DeleteTip/index.js +6 -5
  75. package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
  76. package/lib/DepartmentSelectFilter/index.js +13 -8
  77. package/lib/DepartmentSingleSelectEditor/index.js +16 -13
  78. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
  79. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
  80. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
  81. package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
  82. package/lib/DigitalSignEditor/index.js +16 -13
  83. package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
  84. package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
  85. package/lib/DigitalSignEditor/service.js +5 -3
  86. package/lib/DigitalSignEditor/signature-board/index.js +10 -7
  87. package/lib/DigitalSignEditor/utils.js +4 -2
  88. package/lib/DigitalSignFormatter/index.js +15 -12
  89. package/lib/DigitalSignFormatter/utils.js +6 -5
  90. package/lib/Drawer/index.js +3 -2
  91. package/lib/DurationEditor/index.js +31 -21
  92. package/lib/DurationFormatter/index.js +5 -4
  93. package/lib/EditEditorButton/index.js +3 -1
  94. package/lib/EmailFormatter/index.js +4 -3
  95. package/lib/FieldDisplaySetting/field-item.js +13 -13
  96. package/lib/FieldDisplaySetting/index.js +20 -20
  97. package/lib/FileEditor/files-previewer/index.js +16 -13
  98. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
  99. package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
  100. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
  101. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
  102. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +24 -17
  103. package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
  104. package/lib/FileEditor/index.js +16 -13
  105. package/lib/FileEditor/mb-editor/index.js +20 -28
  106. package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
  107. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
  108. package/lib/FileEditor/pc-editor/index.js +30 -22
  109. package/lib/FileFormatter/index.js +20 -27
  110. package/lib/FileItemFormatter/index.js +10 -7
  111. package/lib/FileUploader/index.js +46 -29
  112. package/lib/FormulaFormatter/index.js +44 -24
  113. package/lib/GeolocationEditor/index.js +32 -27
  114. package/lib/GeolocationEditor/map-editor-utils.js +23 -21
  115. package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
  116. package/lib/GeolocationEditor/mb-editor/index.js +28 -22
  117. package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
  118. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
  119. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
  120. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
  121. package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
  122. package/lib/GeolocationEditor/pc-editor/country-editor.js +25 -12
  123. package/lib/GeolocationEditor/pc-editor/index.js +41 -27
  124. package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
  125. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
  126. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
  127. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
  128. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
  129. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
  130. package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
  131. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
  132. package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
  133. package/lib/GeolocationFormatter/index.js +5 -4
  134. package/lib/HtmlLongTextFormatter/index.js +13 -5
  135. package/lib/Icon/index.js +13 -15
  136. package/lib/Icon/load-sprite.js +13 -2
  137. package/lib/IconButton/index.js +12 -13
  138. package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
  139. package/lib/ImageEditor/images-previewer/index.js +9 -3
  140. package/lib/ImageEditor/index.js +16 -13
  141. package/lib/ImageEditor/mb-editor/index.js +20 -28
  142. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
  143. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +5 -3
  144. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
  145. package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
  146. package/lib/ImageEditor/pc-editor/index.js +16 -11
  147. package/lib/ImageFormatter/images-lazy-load.js +11 -19
  148. package/lib/ImageFormatter/index.js +14 -12
  149. package/lib/ImagePreviewerLightbox/index.js +15 -19
  150. package/lib/ImageThumbnail/index.js +15 -12
  151. package/lib/InputItem/custom-input.js +55 -35
  152. package/lib/InputItem/custom-keyboard.js +42 -42
  153. package/lib/InputItem/index.js +82 -63
  154. package/lib/InputItem/input.js +9 -11
  155. package/lib/LastModifierFormatter/index.js +8 -6
  156. package/lib/LinkEditor/index.js +53 -33
  157. package/lib/LinkEditor/link-editor-option.js +4 -3
  158. package/lib/LinkEditor/mb-popover/index.js +22 -9
  159. package/lib/LinkEditor/pc-popover/index.js +13 -7
  160. package/lib/LinkFormatter/index.js +37 -21
  161. package/lib/List/index.js +17 -19
  162. package/lib/List/list-item.js +59 -55
  163. package/lib/LongTextFormatter/index.js +5 -4
  164. package/lib/MBEditorHeader/index.js +9 -8
  165. package/lib/MTimeFormatter/index.js +4 -3
  166. package/lib/MobileFullScreenPage/body/index.js +6 -4
  167. package/lib/MobileFullScreenPage/header/index.js +10 -8
  168. package/lib/MobileFullScreenPage/index.js +12 -14
  169. package/lib/MobileModal/index.js +7 -8
  170. package/lib/MobileOperationSheet/index.js +8 -7
  171. package/lib/MobileSelector/empty/index.js +3 -1
  172. package/lib/MobileSelector/index.js +7 -5
  173. package/lib/MobileSelector/option/index.js +5 -3
  174. package/lib/MobileSelector/options/index.css +0 -4
  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/alert.js +2 -2
  179. package/lib/Modal/modal.js +28 -30
  180. package/lib/Modal/prompt.js +14 -14
  181. package/lib/MultipleSelectEditor/index.js +7 -7
  182. package/lib/MultipleSelectFormatter/index.js +9 -7
  183. package/lib/NotificationPopover/index.js +5 -4
  184. package/lib/NumberEditor/index.js +21 -12
  185. package/lib/NumberFormatter/index.js +5 -4
  186. package/lib/PhoneNumberLink/index.js +5 -3
  187. package/lib/Picker/AbstractPicker.js +35 -33
  188. package/lib/Popover/index.js +9 -11
  189. package/lib/Popover/item.js +22 -24
  190. package/lib/Progress/index.js +18 -17
  191. package/lib/Radio/Radio.js +17 -15
  192. package/lib/Radio/RadioItem.js +23 -19
  193. package/lib/RateFormatter/index.js +15 -15
  194. package/lib/RoleStatusEditor/index.js +18 -19
  195. package/lib/RowExpand/index.js +7 -6
  196. package/lib/RowExpandDialog/body/index.js +57 -40
  197. package/lib/RowExpandDialog/column-content/index.js +10 -6
  198. package/lib/RowExpandDialog/header/index.js +12 -9
  199. package/lib/RowExpandDialog/index.js +59 -63
  200. package/lib/RowExpandEditor/add-btn/index.js +7 -6
  201. package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
  202. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
  203. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
  204. package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
  205. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
  206. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
  207. package/lib/RowExpandEditor/date-editor/index.js +7 -6
  208. package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
  209. package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
  210. package/lib/RowExpandEditor/department-editor/index.js +7 -6
  211. package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
  212. package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
  213. package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
  214. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
  215. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
  216. package/lib/RowExpandEditor/duration-editor/index.js +7 -6
  217. package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
  218. package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
  219. package/lib/RowExpandEditor/email-editor/index.js +7 -6
  220. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
  221. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
  222. package/lib/RowExpandEditor/file-editor/index.js +7 -6
  223. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
  224. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
  225. package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
  226. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
  227. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
  228. package/lib/RowExpandEditor/image-editor/index.js +7 -6
  229. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
  230. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
  231. package/lib/RowExpandEditor/index.js +16 -11
  232. package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
  233. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
  234. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
  235. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
  236. package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
  237. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
  238. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
  239. package/lib/RowExpandEditor/number-editor/index.js +7 -6
  240. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
  241. package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
  242. package/lib/RowExpandEditor/rate-editor/index.js +7 -6
  243. package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
  244. package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
  245. package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
  246. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
  247. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
  248. package/lib/RowExpandEditor/text-editor/index.js +7 -6
  249. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
  250. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
  251. package/lib/RowExpandEditor/url-editor/index.js +7 -6
  252. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
  253. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
  254. package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
  255. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
  256. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
  257. package/lib/RowExpandFormatter/email-formatter/index.js +8 -5
  258. package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
  259. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
  260. package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
  261. package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
  262. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
  263. package/lib/RowExpandFormatter/index.js +52 -34
  264. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
  265. package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
  266. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
  267. package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
  268. package/lib/RowExpandFormatter/text/index.js +5 -4
  269. package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
  270. package/lib/RowExpandView/body/index.js +43 -32
  271. package/lib/RowExpandView/column-content/index.js +7 -3
  272. package/lib/RowExpandView/index.js +52 -53
  273. package/lib/SelectItem/index.js +7 -5
  274. package/lib/SelectOptionGroup/index.js +40 -30
  275. package/lib/SelectedDepartments/index.js +12 -10
  276. package/lib/SimpleLongTextFormatter/index.js +18 -12
  277. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
  278. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
  279. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
  280. package/lib/SingleSelectEditor/index.js +7 -7
  281. package/lib/SingleSelectFormatter/index.js +9 -8
  282. package/lib/TabBar/Tab.js +26 -24
  283. package/lib/TabBar/index.js +28 -24
  284. package/lib/Tabs/index.js +13 -10
  285. package/lib/TextEditor/index.js +23 -14
  286. package/lib/TextFormatter/index.js +4 -3
  287. package/lib/TextareaItem/index.js +53 -48
  288. package/lib/Toast/index.js +9 -8
  289. package/lib/UrlFormatter/index.js +4 -3
  290. package/lib/common/editor-base.js +12 -7
  291. package/lib/formatterConfig/index.js +3 -3
  292. package/lib/hooks/common-hooks.js +4 -2
  293. package/lib/select-editor/index.js +16 -13
  294. package/lib/select-editor/mb-editor/index.js +28 -17
  295. package/lib/select-editor/pc-editor/index.js +47 -32
  296. package/lib/toaster/alert.js +8 -7
  297. package/lib/toaster/toast.js +4 -3
  298. package/lib/toaster/toastManager.js +13 -13
  299. package/lib/toaster/toaster.js +12 -9
  300. package/lib/utils/cell.js +11 -8
  301. package/lib/utils/class.js +3 -3
  302. package/lib/utils/column-utils.js +14 -8
  303. package/lib/utils/departments.js +6 -5
  304. package/lib/utils/getLocale.js +11 -5
  305. package/lib/utils/object-utils.js +5 -4
  306. package/lib/utils/url.js +29 -22
  307. package/lib/utils/utils.js +6 -2
  308. package/package.json +2 -2
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _reactstrap = require("reactstrap");
12
11
  var _DTableCustomFooter = _interopRequireDefault(require("../../DTableCustomFooter"));
@@ -24,12 +23,14 @@ class PCDigitalSignEditor extends _react.Component {
24
23
  super(props);
25
24
  this.setPosition = () => {
26
25
  if (!this.editor) return;
27
- const _this$editor$parentNo = this.editor.parentNode,
28
- offsetLeft = _this$editor$parentNo.offsetLeft,
29
- offsetTop = _this$editor$parentNo.offsetTop;
30
- const _this$editor = this.editor,
31
- editorWidth = _this$editor.offsetWidth,
32
- editorHeight = _this$editor.offsetHeight;
26
+ const {
27
+ offsetLeft,
28
+ offsetTop
29
+ } = this.editor.parentNode;
30
+ const {
31
+ offsetWidth: editorWidth,
32
+ offsetHeight: editorHeight
33
+ } = this.editor;
33
34
  let editorLeft = offsetLeft - editorWidth;
34
35
  let editorTop = offsetTop;
35
36
  if (this.props.isInModal) {
@@ -111,11 +112,14 @@ class PCDigitalSignEditor extends _react.Component {
111
112
  editorPosition: {},
112
113
  saving: false
113
114
  };
114
- const uploadFile = props.uploadFile,
115
- config = props.config,
116
- value = props.value;
117
- const _ref = config || {},
118
- username = _ref.username;
115
+ const {
116
+ uploadFile,
117
+ config,
118
+ value
119
+ } = props;
120
+ const {
121
+ username
122
+ } = config || {};
119
123
  this.value = value || {};
120
124
  this.digitalService = new _service.default({
121
125
  uploadFile,
@@ -126,21 +130,25 @@ class PCDigitalSignEditor extends _react.Component {
126
130
  this.setPosition();
127
131
  }
128
132
  render() {
129
- const _this$props = this.props,
130
- value = _this$props.value,
131
- config = _this$props.config;
132
- const _this$state = this.state,
133
- editorPosition = _this$state.editorPosition,
134
- saving = _this$state.saving;
135
- const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
133
+ const {
134
+ value,
135
+ config
136
+ } = this.props;
137
+ const {
138
+ editorPosition,
139
+ saving
140
+ } = this.state;
141
+ const signImageUrl = (0, _url.generateCurrentBaseImageUrl)({
142
+ ...config,
136
143
  partUrl: _utils.default.getSignImageUrl(value)
137
- }));
144
+ });
138
145
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
139
146
  className: "dtable-ui-digital-sign-editor-container",
140
147
  ref: ref => this.editor = ref,
141
- style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, editorPosition), {}, {
148
+ style: {
149
+ ...editorPosition,
142
150
  zIndex: 1000
143
- }),
151
+ },
144
152
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
145
153
  className: "dtable-ui-digital-sign-editor-header",
146
154
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -16,10 +16,12 @@ class DigitalService {
16
16
  this.username = props.username;
17
17
  }
18
18
  uploadSignImage(signBlob, _ref) {
19
- let successCallback = _ref.successCallback,
20
- failedCallback = _ref.failedCallback;
19
+ let {
20
+ successCallback,
21
+ failedCallback
22
+ } = _ref;
21
23
  if (!this.uploadFile) return;
22
- const name = "".concat(this.username, "-").concat(Date.now().toString(), ".png");
24
+ const name = `${this.username}-${Date.now().toString()}.png`;
23
25
  const file = new File([signBlob], name, {
24
26
  type: 'image/png'
25
27
  });
@@ -18,8 +18,8 @@ class SignatureBoard extends _react.Component {
18
18
  this.initSignTool = () => {
19
19
  let signatureBoardCanvas = document.querySelector('#signature_board_canvas');
20
20
  if (!this.signatureBoard || !signatureBoardCanvas) return;
21
- signatureBoardCanvas.style.width = "".concat(this.signatureBoard.offsetWidth, "px");
22
- signatureBoardCanvas.style.height = "".concat(this.signatureBoard.offsetHeight, "px");
21
+ signatureBoardCanvas.style.width = `${this.signatureBoard.offsetWidth}px`;
22
+ signatureBoardCanvas.style.height = `${this.signatureBoard.offsetHeight}px`;
23
23
  this.signatureTool = new _signatureTool.default(signatureBoardCanvas, {
24
24
  minLineWidth: 2,
25
25
  maxLineWidth: 4,
@@ -72,7 +72,9 @@ class SignatureBoard extends _react.Component {
72
72
  }
73
73
  };
74
74
  this.renderTips = () => {
75
- const isEmpty = this.state.isEmpty;
75
+ const {
76
+ isEmpty
77
+ } = this.state;
76
78
  if (!isEmpty) return null;
77
79
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
78
80
  className: "signature-board-tips",
@@ -80,10 +82,11 @@ class SignatureBoard extends _react.Component {
80
82
  });
81
83
  };
82
84
  this.renderSignImage = () => {
83
- const _this$state = this.state,
84
- isEmpty = _this$state.isEmpty,
85
- signImageUrl = _this$state.signImageUrl,
86
- loadingSignImage = _this$state.loadingSignImage;
85
+ const {
86
+ isEmpty,
87
+ signImageUrl,
88
+ loadingSignImage
89
+ } = this.state;
87
90
  if (isEmpty || !signImageUrl) return null;
88
91
  let img = new Image();
89
92
  img.src = signImageUrl;
@@ -14,8 +14,10 @@ class DigitalSignUtils {
14
14
  return (0, _dtableUtils.getDigitalSignImageUrl)(sign);
15
15
  }
16
16
  static getUpdatedSign(_ref) {
17
- let username = _ref.username,
18
- sign_image_url = _ref.sign_image_url;
17
+ let {
18
+ username,
19
+ sign_image_url
20
+ } = _ref;
19
21
  const time = (0, _dayjs.default)().utc().format('YYYY-MM-DDTHH:mm:ss.SSSZ');
20
22
  return {
21
23
  username,
@@ -18,9 +18,10 @@ class DigitalSignFormatter extends _react.Component {
18
18
  constructor(props) {
19
19
  super(props);
20
20
  this.getSignImages = () => {
21
- const _this$props = this.props,
22
- value = _this$props.value,
23
- config = _this$props.config;
21
+ const {
22
+ value,
23
+ config
24
+ } = this.props;
24
25
  return [(0, _utils.getDigitalSignImageUrl)(value, config)].filter(Boolean);
25
26
  };
26
27
  this.onClickSignImage = index => {
@@ -56,18 +57,20 @@ class DigitalSignFormatter extends _react.Component {
56
57
  };
57
58
  }
58
59
  render() {
59
- const _this$props2 = this.props,
60
- containerClassName = _this$props2.containerClassName,
61
- readOnly = _this$props2.readOnly,
62
- config = _this$props2.config,
63
- isSample = _this$props2.isSample,
64
- renderItem = _this$props2.renderItem;
60
+ const {
61
+ containerClassName,
62
+ readOnly,
63
+ config,
64
+ isSample,
65
+ renderItem
66
+ } = this.props;
65
67
  const className = (0, _classnames.default)('dtable-ui cell-formatter-container digital-sign-formatter', containerClassName);
66
68
  const signImages = this.getSignImages();
67
69
  if (signImages.length === 0) return null;
68
- const _this$state = this.state,
69
- isPreviewSignImage = _this$state.isPreviewSignImage,
70
- largeSignImageIndex = _this$state.largeSignImageIndex;
70
+ const {
71
+ isPreviewSignImage,
72
+ largeSignImageIndex
73
+ } = this.state;
71
74
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
72
75
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
73
76
  className: className,
@@ -9,12 +9,13 @@ const getDigitalSignImageUrl = (cellValue, config) => {
9
9
  const url = cellValue && cellValue.sign_image_url || '';
10
10
  if (!url) return '';
11
11
  if (!config) return url;
12
- const _ref = config || {},
13
- server = _ref.server,
14
- workspaceID = _ref.workspaceID,
15
- dtableUuid = _ref.dtableUuid;
12
+ const {
13
+ server,
14
+ workspaceID,
15
+ dtableUuid
16
+ } = config || {};
16
17
  if (server && (workspaceID || workspaceID === 0) && dtableUuid) {
17
- return "".concat(server, "/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(url);
18
+ return `${server}/workspace/${workspaceID}/asset/${dtableUuid}${url}`;
18
19
  }
19
20
  return url;
20
21
  };
@@ -6,14 +6,15 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
9
  var _rmcDrawer = _interopRequireDefault(require("rmc-drawer"));
11
10
  var React = _interopRequireWildcard(require("react"));
12
11
  require("./index.css");
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  class Drawer extends React.Component {
15
14
  render() {
16
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcDrawer.default, (0, _objectSpread2.default)({}, this.props));
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcDrawer.default, {
16
+ ...this.props
17
+ });
17
18
  }
18
19
  }
19
20
  exports.default = Drawer;
@@ -23,10 +23,11 @@ class DurationEditor extends _react.default.Component {
23
23
  });
24
24
  };
25
25
  this.onKeyDown = event => {
26
- let _event$currentTarget = event.currentTarget,
27
- selectionStart = _event$currentTarget.selectionStart,
28
- selectionEnd = _event$currentTarget.selectionEnd,
29
- value = _event$currentTarget.value;
26
+ let {
27
+ selectionStart,
28
+ selectionEnd,
29
+ value
30
+ } = event.currentTarget;
30
31
  if (event.keyCode === _constants.KeyCodes.Enter) {
31
32
  event.preventDefault();
32
33
  this.onBlur();
@@ -36,7 +37,9 @@ class DurationEditor extends _react.default.Component {
36
37
  }
37
38
  };
38
39
  this.getValue = () => {
39
- const column = this.props.column;
40
+ const {
41
+ column
42
+ } = this.props;
40
43
  const newDuration = (0, _dtableUtils.formatDurationToNumber)(this.getInputNode().value, column.data);
41
44
  return newDuration;
42
45
  };
@@ -48,10 +51,11 @@ class DurationEditor extends _react.default.Component {
48
51
  return this.input.querySelector('input:not([type=hidden])');
49
52
  };
50
53
  this.onBlur = () => {
51
- const _this$props = this.props,
52
- isInModal = _this$props.isInModal,
53
- onBlur = _this$props.onBlur,
54
- onCommit = _this$props.onCommit;
54
+ const {
55
+ isInModal,
56
+ onBlur,
57
+ onCommit
58
+ } = this.props;
55
59
  isInModal ? onCommit(this.getValue()) : onBlur();
56
60
  };
57
61
  this.setInputRef = input => {
@@ -64,30 +68,36 @@ class DurationEditor extends _react.default.Component {
64
68
  this.onCut = e => {
65
69
  e.stopPropagation();
66
70
  };
67
- let _value = props.value,
68
- _column = props.column;
71
+ let {
72
+ value: _value,
73
+ column: _column
74
+ } = props;
69
75
  this.initValue = _value || _value === 0 ? (0, _dtableUtils.getDurationDisplayString)(_value, _column.data) : '';
70
76
  this.state = {
71
77
  value: this.initValue
72
78
  };
73
79
  }
74
80
  componentDidMount() {
75
- const _this$props2 = this.props,
76
- isInModal = _this$props2.isInModal,
77
- autoFocus = _this$props2.autoFocus,
78
- readOnly = _this$props2.readOnly;
81
+ const {
82
+ isInModal,
83
+ autoFocus,
84
+ readOnly
85
+ } = this.props;
79
86
  if (isInModal && autoFocus && !readOnly) {
80
87
  this.input.focus();
81
88
  }
82
89
  }
83
90
  render() {
84
- const _this$props3 = this.props,
85
- column = _this$props3.column,
86
- isInModal = _this$props3.isInModal,
87
- className = _this$props3.className,
88
- readOnly = _this$props3.readOnly;
91
+ const {
92
+ column,
93
+ isInModal,
94
+ className,
95
+ readOnly
96
+ } = this.props;
89
97
  const data = column.data || {};
90
- const duration_format = data.duration_format;
98
+ const {
99
+ duration_format
100
+ } = data;
91
101
  const style = isInModal ? {
92
102
  textAlign: 'left',
93
103
  width: '320px'
@@ -12,10 +12,11 @@ require("./index.css");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  class DurationFormatter extends _react.default.Component {
14
14
  render() {
15
- let _this$props = this.props,
16
- value = _this$props.value,
17
- containerClassName = _this$props.containerClassName,
18
- format = _this$props.format;
15
+ let {
16
+ value,
17
+ containerClassName,
18
+ format
19
+ } = this.props;
19
20
  let classname = (0, _classnames.default)('dtable-ui cell-formatter-container duration-formatter', containerClassName);
20
21
  const durationDisplayString = (0, _dtableUtils.getDurationDisplayString)(value, {
21
22
  duration_format: format
@@ -10,7 +10,9 @@ require("./index.css");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  class EditEditorButton extends _react.default.Component {
12
12
  render() {
13
- const text = this.props.text;
13
+ const {
14
+ text
15
+ } = this.props;
14
16
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
15
17
  className: "dtable-ui-editor-button",
16
18
  onClick: this.props.onClick,
@@ -11,9 +11,10 @@ require("./index.css");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  class EmailFormatter extends _react.default.Component {
13
13
  render() {
14
- const _this$props = this.props,
15
- containerClassName = _this$props.containerClassName,
16
- value = _this$props.value;
14
+ const {
15
+ containerClassName,
16
+ value
17
+ } = this.props;
17
18
  let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter', containerClassName);
18
19
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
19
20
  title: value,
@@ -1,27 +1,25 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _DTableSwitch = _interopRequireDefault(require("../DTableSwitch"));
12
11
  var _DTableColumnIcon = _interopRequireDefault(require("../DTableColumnIcon"));
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  function FieldItem(_ref) {
15
- let field = _ref.field,
16
- isCollapsed = _ref.isCollapsed,
17
- onClickField = _ref.onClickField,
18
- onMoveField = _ref.onMoveField;
14
+ let {
15
+ field,
16
+ isCollapsed,
17
+ onClickField,
18
+ onMoveField
19
+ } = _ref;
19
20
  let enteredCounter = 0;
20
21
  const fieldItemRef = (0, _react.useRef)(null);
21
- const _useState = (0, _react.useState)(false),
22
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
23
- isItemDropTipShow = _useState2[0],
24
- setDropTipShow = _useState2[1];
22
+ const [isItemDropTipShow, setDropTipShow] = (0, _react.useState)(false);
25
23
  const handleClickField = e => {
26
24
  e.nativeEvent.stopImmediatePropagation();
27
25
  const value = e.target.checked;
@@ -65,8 +63,10 @@ function FieldItem(_ref) {
65
63
  onMoveField(droppedColumnKey, field.key);
66
64
  };
67
65
  const placeholder = () => {
68
- const type = field.type,
69
- data = field.data;
66
+ const {
67
+ type,
68
+ data
69
+ } = field;
70
70
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
71
71
  className: "field-switch",
72
72
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
@@ -81,7 +81,7 @@ function FieldItem(_ref) {
81
81
  };
82
82
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
83
83
  ref: fieldItemRef,
84
- className: "field-item-container ".concat(isCollapsed ? 'd-none' : ''),
84
+ className: `field-item-container ${isCollapsed ? 'd-none' : ''}`,
85
85
  onDrop: onDrop,
86
86
  onDragEnter: onTableDragEnter,
87
87
  onDragOver: onDragOver,
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
9
  var _react = _interopRequireWildcard(require("react"));
12
10
  var _reactstrap = require("reactstrap");
13
11
  var _reactTransitionGroup = require("react-transition-group");
@@ -18,32 +16,31 @@ const FIELD_ITEM_HEIGHT = 30;
18
16
  const BANNER_HEIGHT = 24;
19
17
  const DURATION = 300;
20
18
  function FieldDisplaySetting(_ref) {
21
- let fields = _ref.fields,
22
- textProperties = _ref.textProperties,
23
- fieldAllShown = _ref.fieldAllShown,
24
- onClickField = _ref.onClickField,
25
- onMoveField = _ref.onMoveField,
26
- onToggleFieldsVisibility = _ref.onToggleFieldsVisibility;
19
+ let {
20
+ fields,
21
+ textProperties,
22
+ fieldAllShown,
23
+ onClickField,
24
+ onMoveField,
25
+ onToggleFieldsVisibility
26
+ } = _ref;
27
27
  const nodeRef = (0, _react.useRef)(null);
28
- const _useState = (0, _react.useState)(true),
29
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
30
- isCollapsed = _useState2[0],
31
- setCollapsed = _useState2[1];
28
+ const [isCollapsed, setCollapsed] = (0, _react.useState)(true);
32
29
  const expandAllFields = () => {
33
30
  setCollapsed(!isCollapsed);
34
31
  };
35
32
  const defaultStyle = {
36
- transition: "all ".concat(DURATION, "ms cubic-bezier(.645,.045,.355,1)"),
33
+ transition: `all ${DURATION}ms cubic-bezier(.645,.045,.355,1)`,
37
34
  opacity: 0
38
35
  };
39
36
  const transitionStyles = {
40
37
  entering: {
41
38
  opacity: 1,
42
- height: "".concat(fields.length * FIELD_ITEM_HEIGHT + BANNER_HEIGHT, "px")
39
+ height: `${fields.length * FIELD_ITEM_HEIGHT + BANNER_HEIGHT}px`
43
40
  },
44
41
  entered: {
45
42
  opacity: 1,
46
- height: "".concat(fields.length * FIELD_ITEM_HEIGHT + BANNER_HEIGHT, "px")
43
+ height: `${fields.length * FIELD_ITEM_HEIGHT + BANNER_HEIGHT}px`
47
44
  },
48
45
  exiting: {
49
46
  opacity: 0,
@@ -63,7 +60,7 @@ function FieldDisplaySetting(_ref) {
63
60
  className: "mb-0",
64
61
  children: textProperties.titleValue
65
62
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
66
- className: "seatable-icon-btn dtable-font dtable-icon-right expand-button ".concat(isCollapsed ? '' : 'revolving')
63
+ className: `seatable-icon-btn dtable-font dtable-icon-right expand-button ${isCollapsed ? '' : 'revolving'}`
67
64
  })]
68
65
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.Transition, {
69
66
  nodeRef: nodeRef,
@@ -72,9 +69,12 @@ function FieldDisplaySetting(_ref) {
72
69
  children: state => /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
73
70
  className: "field-setting-wrapper",
74
71
  ref: nodeRef,
75
- style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultStyle), transitionStyles[state]),
72
+ style: {
73
+ ...defaultStyle,
74
+ ...transitionStyles[state]
75
+ },
76
76
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
77
- className: "field-setting-banner ".concat(isCollapsed ? 'd-none' : 'd-flex', " align-items-center justify-content-between h-5 mt-2 mb-2"),
77
+ className: `field-setting-banner ${isCollapsed ? 'd-none' : 'd-flex'} align-items-center justify-content-between h-5 mt-2 mb-2`,
78
78
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Label, {
79
79
  className: "mb-0",
80
80
  children: textProperties.bannerValue
@@ -91,7 +91,7 @@ function FieldDisplaySetting(_ref) {
91
91
  isCollapsed: isCollapsed,
92
92
  onClickField: onClickField,
93
93
  onMoveField: onMoveField
94
- }, "".concat(field.key, "-").concat(index));
94
+ }, `${field.key}-${index}`);
95
95
  })
96
96
  })]
97
97
  })
@@ -6,35 +6,38 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
9
  var _react = _interopRequireWildcard(require("react"));
12
10
  var _reactResponsive = _interopRequireDefault(require("react-responsive"));
13
11
  var _pcPreviewer = _interopRequireDefault(require("./pc-previewer"));
14
12
  var _mbPreviewer = _interopRequireDefault(require("./mb-previewer"));
15
13
  require("./index.css");
16
14
  var _jsxRuntime = require("react/jsx-runtime");
17
- const _excluded = ["isMobile"];
18
15
  const FilesPreviewer = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
19
- let isMobile = _ref.isMobile,
20
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
- if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
16
+ let {
17
+ isMobile,
18
+ ...props
19
+ } = _ref;
20
+ if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, {
21
+ ...props,
22
22
  ref: ref
23
- }));
24
- if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbPreviewer.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
23
+ });
24
+ if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbPreviewer.default, {
25
+ ...props,
25
26
  ref: ref
26
- }));
27
+ });
27
28
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
28
29
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
29
30
  query: "(min-width: 768px)",
30
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
31
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, {
32
+ ...props,
31
33
  ref: ref
32
- }))
34
+ })
33
35
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
34
36
  query: "(max-width: 768px)",
35
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbPreviewer.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
37
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbPreviewer.default, {
38
+ ...props,
36
39
  ref: ref
37
- }))
40
+ })
38
41
  })]
39
42
  });
40
43
  });
@@ -19,7 +19,9 @@ class FilePreviewer extends _react.default.Component {
19
19
  this.props.downloadFile(downloadUrl);
20
20
  };
21
21
  this.deleteFile = () => {
22
- const fileItem = this.props.fileItem;
22
+ const {
23
+ fileItem
24
+ } = this.props;
23
25
  this.props.deleteFile(fileItem);
24
26
  };
25
27
  this.closeRenameFile = () => {
@@ -61,9 +63,11 @@ class FilePreviewer extends _react.default.Component {
61
63
  showOperationSheet: false
62
64
  };
63
65
  this.operations = [];
64
- const renameFile = props.renameFile,
65
- downloadFile = props.downloadFile,
66
- deleteFile = props.deleteFile;
66
+ const {
67
+ renameFile,
68
+ downloadFile,
69
+ deleteFile
70
+ } = props;
67
71
  if (renameFile) {
68
72
  this.operations.push(_MobileOperationSheet.OPERATION_TYPE.RENAME);
69
73
  }
@@ -75,12 +79,16 @@ class FilePreviewer extends _react.default.Component {
75
79
  }
76
80
  }
77
81
  render() {
78
- const _this$props = this.props,
79
- fileItem = _this$props.fileItem,
80
- config = _this$props.config;
81
- const showOperationSheet = this.state.showOperationSheet;
82
- const _getFileThumbnailInfo = (0, _url.getFileThumbnailInfo)(fileItem, config),
83
- fileIconUrl = _getFileThumbnailInfo.fileIconUrl;
82
+ const {
83
+ fileItem,
84
+ config
85
+ } = this.props;
86
+ const {
87
+ showOperationSheet
88
+ } = this.state;
89
+ const {
90
+ fileIconUrl
91
+ } = (0, _url.getFileThumbnailInfo)(fileItem, config);
84
92
  const uploadTime = (0, _utils.getFileUploadTime)(fileItem);
85
93
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
86
94
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -96,7 +104,7 @@ class FilePreviewer extends _react.default.Component {
96
104
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
97
105
  className: "dtable-ui-file-editor-previewer-info",
98
106
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
99
- className: "dtable-ui-file-editor-previewer-item-name ".concat(fileItem.type === 'dir' ? 'dtable-ui-file-editor-previewer-item-name-height' : ''),
107
+ className: `dtable-ui-file-editor-previewer-item-name ${fileItem.type === 'dir' ? 'dtable-ui-file-editor-previewer-item-name-height' : ''}`,
100
108
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
101
109
  children: fileItem.name
102
110
  })
@@ -104,7 +112,7 @@ class FilePreviewer extends _react.default.Component {
104
112
  className: "dtable-ui-file-editor-preview-item-detail d-flex",
105
113
  children: [uploadTime && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
106
114
  className: "file-upload-time",
107
- children: "".concat(uploadTime, ", ")
115
+ children: `${uploadTime}, `
108
116
  }), fileItem.size > -1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
109
117
  children: (0, _utils.bytesToSize)(fileItem.size)
110
118
  })]