dtable-ui-component 7.0.14 → 7.0.16

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 (280) hide show
  1. package/lib/ActionSheet/index.js +16 -14
  2. package/lib/ActivityIndicator/index.js +8 -7
  3. package/lib/AsyncUserSelect/index.js +18 -44
  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/DTableCustomizeSearchInput/index.js +25 -19
  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 +41 -26
  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 +55 -34
  50. package/lib/DTableFiltersPopover/widgets/filter-item.js +164 -105
  51. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
  52. package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
  53. package/lib/DTableIcon/index.js +7 -6
  54. package/lib/DTableIcon/svg-icon.js +7 -5
  55. package/lib/DTableModalHeader/index.js +3 -1
  56. package/lib/DTablePopover/index.js +15 -11
  57. package/lib/DTableRadio/index.js +9 -10
  58. package/lib/DTableRadioGroup/index.js +17 -8
  59. package/lib/DTableSearchInput/index.js +29 -19
  60. package/lib/DTableSelect/dtable-select-label.js +5 -6
  61. package/lib/DTableSelect/index.js +22 -21
  62. package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
  63. package/lib/DTableSelect/utils.js +20 -8
  64. package/lib/DTableSubDropdownMenu/index.js +10 -8
  65. package/lib/DTableSubDropdownToggle/index.js +12 -12
  66. package/lib/DTableSwitch/index.js +11 -12
  67. package/lib/DTableToolTip/index.js +8 -7
  68. package/lib/DateEditor/index.js +15 -20
  69. package/lib/DateEditor/mb-editor/index.js +31 -18
  70. package/lib/DateEditor/pc-editor.js +45 -26
  71. package/lib/DateFormatter/index.js +5 -4
  72. package/lib/DatePicker/index.js +15 -9
  73. package/lib/DatePicker/utils.js +3 -1
  74. package/lib/DeleteTip/index.js +6 -5
  75. package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
  76. package/lib/DepartmentSelectFilter/index.js +8 -6
  77. package/lib/DepartmentSingleSelectEditor/index.js +3 -1
  78. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
  79. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
  80. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
  81. package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
  82. package/lib/DigitalSignEditor/index.js +3 -1
  83. package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
  84. package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
  85. package/lib/DigitalSignEditor/service.js +4 -2
  86. package/lib/DigitalSignEditor/signature-board/index.js +8 -5
  87. package/lib/DigitalSignEditor/utils.js +4 -2
  88. package/lib/DigitalSignFormatter/index.js +15 -12
  89. package/lib/DigitalSignFormatter/utils.js +5 -4
  90. package/lib/DurationEditor/index.js +31 -21
  91. package/lib/DurationFormatter/index.js +5 -4
  92. package/lib/EditEditorButton/index.js +3 -1
  93. package/lib/EmailFormatter/index.js +4 -3
  94. package/lib/FieldDisplaySetting/field-item.js +12 -12
  95. package/lib/FieldDisplaySetting/index.js +9 -11
  96. package/lib/FileEditor/files-previewer/index.js +3 -1
  97. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
  98. package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
  99. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
  100. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
  101. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +21 -14
  102. package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
  103. package/lib/FileEditor/index.js +3 -1
  104. package/lib/FileEditor/mb-editor/index.js +20 -28
  105. package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
  106. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
  107. package/lib/FileEditor/pc-editor/index.js +27 -19
  108. package/lib/FileFormatter/index.js +19 -26
  109. package/lib/FileItemFormatter/index.js +9 -6
  110. package/lib/FileUploader/index.js +45 -28
  111. package/lib/FormulaFormatter/index.js +29 -15
  112. package/lib/GeolocationEditor/index.js +12 -11
  113. package/lib/GeolocationEditor/map-editor-utils.js +15 -17
  114. package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
  115. package/lib/GeolocationEditor/mb-editor/index.js +6 -4
  116. package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
  117. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
  118. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
  119. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
  120. package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
  121. package/lib/GeolocationEditor/pc-editor/country-editor.js +23 -10
  122. package/lib/GeolocationEditor/pc-editor/index.js +20 -12
  123. package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
  124. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
  125. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
  126. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
  127. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
  128. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
  129. package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
  130. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
  131. package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
  132. package/lib/GeolocationFormatter/index.js +5 -4
  133. package/lib/HtmlLongTextFormatter/index.js +12 -4
  134. package/lib/Icon/index.js +5 -3
  135. package/lib/IconButton/index.js +6 -4
  136. package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
  137. package/lib/ImageEditor/images-previewer/index.js +9 -3
  138. package/lib/ImageEditor/index.js +3 -1
  139. package/lib/ImageEditor/mb-editor/index.js +20 -28
  140. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
  141. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +3 -1
  142. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
  143. package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
  144. package/lib/ImageEditor/pc-editor/index.js +16 -11
  145. package/lib/ImageFormatter/images-lazy-load.js +11 -19
  146. package/lib/ImageFormatter/index.js +13 -11
  147. package/lib/ImagePreviewerLightbox/index.js +15 -19
  148. package/lib/ImageThumbnail/index.js +13 -10
  149. package/lib/InputItem/custom-input.js +46 -26
  150. package/lib/InputItem/custom-keyboard.js +18 -15
  151. package/lib/InputItem/index.js +50 -34
  152. package/lib/InputItem/input.js +4 -2
  153. package/lib/LastModifierFormatter/index.js +8 -6
  154. package/lib/LinkEditor/index.js +53 -33
  155. package/lib/LinkEditor/link-editor-option.js +4 -3
  156. package/lib/LinkEditor/mb-popover/index.js +22 -9
  157. package/lib/LinkEditor/pc-popover/index.js +10 -5
  158. package/lib/LinkFormatter/index.js +37 -21
  159. package/lib/List/index.js +8 -6
  160. package/lib/List/list-item.js +28 -22
  161. package/lib/LongTextFormatter/index.js +5 -4
  162. package/lib/MBEditorHeader/index.js +8 -7
  163. package/lib/MTimeFormatter/index.js +4 -3
  164. package/lib/MobileFullScreenPage/body/index.js +5 -3
  165. package/lib/MobileFullScreenPage/header/index.js +6 -4
  166. package/lib/MobileFullScreenPage/index.js +11 -13
  167. package/lib/MobileModal/index.js +3 -1
  168. package/lib/MobileOperationSheet/index.js +8 -7
  169. package/lib/MobileSelector/empty/index.js +3 -1
  170. package/lib/MobileSelector/index.js +7 -5
  171. package/lib/MobileSelector/option/index.js +5 -3
  172. package/lib/MobileSelector/options/index.css +0 -4
  173. package/lib/MobileSelector/options/index.js +3 -1
  174. package/lib/MobileSelector/search/index.js +5 -3
  175. package/lib/MobileUpload/index.js +5 -4
  176. package/lib/Modal/modal.js +15 -14
  177. package/lib/Modal/prompt.js +4 -4
  178. package/lib/MultipleSelectEditor/index.js +3 -1
  179. package/lib/MultipleSelectFormatter/index.js +8 -6
  180. package/lib/NotificationPopover/index.js +5 -4
  181. package/lib/NumberEditor/index.js +21 -12
  182. package/lib/NumberFormatter/index.js +5 -4
  183. package/lib/PhoneNumberLink/index.js +4 -2
  184. package/lib/Picker/AbstractPicker.js +27 -23
  185. package/lib/Popover/index.js +4 -3
  186. package/lib/Popover/item.js +9 -7
  187. package/lib/Progress/index.js +8 -9
  188. package/lib/Radio/Radio.js +8 -4
  189. package/lib/Radio/RadioItem.js +12 -8
  190. package/lib/RateFormatter/index.js +13 -13
  191. package/lib/RoleStatusEditor/index.js +17 -18
  192. package/lib/RowExpandDialog/body/index.js +49 -32
  193. package/lib/RowExpandDialog/column-content/index.js +9 -5
  194. package/lib/RowExpandDialog/header/index.js +8 -6
  195. package/lib/RowExpandDialog/index.js +34 -49
  196. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
  197. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
  198. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
  199. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
  200. package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
  201. package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
  202. package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
  203. package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
  204. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
  205. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
  206. package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
  207. package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
  208. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +19 -9
  209. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
  210. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
  211. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
  212. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
  213. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
  214. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
  215. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
  216. package/lib/RowExpandEditor/index.js +8 -4
  217. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
  218. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
  219. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
  220. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +19 -11
  221. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
  222. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
  223. package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
  224. package/lib/RowExpandEditor/rate-editor/mb-editor.js +25 -12
  225. package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
  226. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
  227. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
  228. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
  229. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
  230. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +13 -5
  231. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
  232. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
  233. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
  234. package/lib/RowExpandFormatter/email-formatter/index.js +7 -4
  235. package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
  236. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
  237. package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
  238. package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
  239. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
  240. package/lib/RowExpandFormatter/index.js +41 -27
  241. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
  242. package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
  243. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
  244. package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
  245. package/lib/RowExpandFormatter/text/index.js +5 -4
  246. package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
  247. package/lib/RowExpandView/body/index.js +35 -22
  248. package/lib/RowExpandView/column-content/index.js +7 -3
  249. package/lib/RowExpandView/index.js +30 -42
  250. package/lib/SelectItem/index.js +7 -5
  251. package/lib/SelectOptionGroup/index.js +40 -30
  252. package/lib/SelectedDepartments/index.js +9 -7
  253. package/lib/SimpleLongTextFormatter/index.js +16 -10
  254. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
  255. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
  256. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
  257. package/lib/SingleSelectEditor/index.js +3 -1
  258. package/lib/SingleSelectFormatter/index.js +9 -8
  259. package/lib/TabBar/Tab.js +16 -14
  260. package/lib/TabBar/index.js +21 -18
  261. package/lib/Tabs/index.js +3 -1
  262. package/lib/TextEditor/index.js +23 -14
  263. package/lib/TextFormatter/index.js +4 -3
  264. package/lib/TextareaItem/index.js +26 -19
  265. package/lib/Toast/index.js +4 -3
  266. package/lib/UrlFormatter/index.js +4 -3
  267. package/lib/common/editor-base.js +12 -7
  268. package/lib/hooks/common-hooks.js +4 -2
  269. package/lib/select-editor/index.js +3 -1
  270. package/lib/select-editor/mb-editor/index.js +28 -17
  271. package/lib/select-editor/pc-editor/index.js +42 -27
  272. package/lib/toaster/alert.js +7 -6
  273. package/lib/toaster/toast.js +3 -2
  274. package/lib/toaster/toastManager.js +4 -2
  275. package/lib/utils/cell.js +11 -8
  276. package/lib/utils/column-utils.js +14 -8
  277. package/lib/utils/departments.js +3 -1
  278. package/lib/utils/url.js +25 -18
  279. package/lib/utils/utils.js +6 -2
  280. package/package.json +2 -2
@@ -24,12 +24,14 @@ class PCDigitalSignEditor extends _react.Component {
24
24
  super(props);
25
25
  this.setPosition = () => {
26
26
  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;
27
+ const {
28
+ offsetLeft,
29
+ offsetTop
30
+ } = this.editor.parentNode;
31
+ const {
32
+ offsetWidth: editorWidth,
33
+ offsetHeight: editorHeight
34
+ } = this.editor;
33
35
  let editorLeft = offsetLeft - editorWidth;
34
36
  let editorTop = offsetTop;
35
37
  if (this.props.isInModal) {
@@ -111,11 +113,14 @@ class PCDigitalSignEditor extends _react.Component {
111
113
  editorPosition: {},
112
114
  saving: false
113
115
  };
114
- const uploadFile = props.uploadFile,
115
- config = props.config,
116
- value = props.value;
117
- const _ref = config || {},
118
- username = _ref.username;
116
+ const {
117
+ uploadFile,
118
+ config,
119
+ value
120
+ } = props;
121
+ const {
122
+ username
123
+ } = config || {};
119
124
  this.value = value || {};
120
125
  this.digitalService = new _service.default({
121
126
  uploadFile,
@@ -126,12 +131,14 @@ class PCDigitalSignEditor extends _react.Component {
126
131
  this.setPosition();
127
132
  }
128
133
  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;
134
+ const {
135
+ value,
136
+ config
137
+ } = this.props;
138
+ const {
139
+ editorPosition,
140
+ saving
141
+ } = this.state;
135
142
  const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
136
143
  partUrl: _utils.default.getSignImageUrl(value)
137
144
  }));
@@ -16,8 +16,10 @@ 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
24
  const name = "".concat(this.username, "-").concat(Date.now().toString(), ".png");
23
25
  const file = new File([signBlob], name, {
@@ -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,10 +9,11 @@ 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
18
  return "".concat(server, "/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(url);
18
19
  }
@@ -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, {
@@ -7,7 +7,6 @@ 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"));
11
10
  var _react = _interopRequireWildcard(require("react"));
12
11
  var _reactstrap = require("reactstrap");
13
12
  var _reactTransitionGroup = require("react-transition-group");
@@ -18,17 +17,16 @@ const FIELD_ITEM_HEIGHT = 30;
18
17
  const BANNER_HEIGHT = 24;
19
18
  const DURATION = 300;
20
19
  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;
20
+ let {
21
+ fields,
22
+ textProperties,
23
+ fieldAllShown,
24
+ onClickField,
25
+ onMoveField,
26
+ onToggleFieldsVisibility
27
+ } = _ref;
27
28
  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];
29
+ const [isCollapsed, setCollapsed] = (0, _react.useState)(true);
32
30
  const expandAllFields = () => {
33
31
  setCollapsed(!isCollapsed);
34
32
  };
@@ -16,7 +16,9 @@ require("./index.css");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
  const _excluded = ["isMobile"];
18
18
  const FilesPreviewer = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
19
- let isMobile = _ref.isMobile,
19
+ let {
20
+ isMobile
21
+ } = _ref,
20
22
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
23
  if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
22
24
  ref: ref
@@ -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", {
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _classnames = _interopRequireDefault(require("classnames"));
11
10
  var _utils = require("../../../utils/utils");
@@ -18,12 +17,13 @@ class MBFilesPreviewer extends _react.default.Component {
18
17
  constructor() {
19
18
  super(...arguments);
20
19
  this.downloadImage = imageItemUrl => {
21
- const value = this.props.value;
20
+ const {
21
+ value
22
+ } = this.props;
22
23
  const file = value.find(v => v.url === imageItemUrl);
23
24
  if (!file) return;
24
25
  this.props.getDownLoadFiles([file], _ref => {
25
- let _ref2 = (0, _slicedToArray2.default)(_ref, 1),
26
- dFile = _ref2[0];
26
+ let [dFile] = _ref;
27
27
  dFile && (0, _utils.downloadFile)(dFile);
28
28
  });
29
29
  };
@@ -33,9 +33,10 @@ class MBFilesPreviewer extends _react.default.Component {
33
33
  };
34
34
  }
35
35
  render() {
36
- const _this$props = this.props,
37
- value = _this$props.value,
38
- getDownLoadFiles = _this$props.getDownLoadFiles;
36
+ const {
37
+ value,
38
+ getDownLoadFiles
39
+ } = this.props;
39
40
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
40
41
  className: (0, _classnames.default)('dtable-ui-file-editor-previewer dtable-ui-mobile-file-editor-previewer', {
41
42
  'mt-0': value.length === 0
@@ -42,9 +42,10 @@ class FileDropdownMenu extends _react.default.Component {
42
42
  };
43
43
  }
44
44
  render() {
45
- const _this$props = this.props,
46
- onRenameFile = _this$props.onRenameFile,
47
- onDeleteFile = _this$props.onDeleteFile;
45
+ const {
46
+ onRenameFile,
47
+ onDeleteFile
48
+ } = this.props;
48
49
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Dropdown, {
49
50
  isOpen: this.state.isItemMenuShow,
50
51
  toggle: this.onDropdownToggleClick,
@@ -31,11 +31,12 @@ class FileNameEditor extends _react.Component {
31
31
  }
32
32
  };
33
33
  this.onSave = () => {
34
- const _this$props = this.props,
35
- renameFile = _this$props.renameFile,
36
- name = _this$props.name,
37
- closeRenameFile = _this$props.closeRenameFile,
38
- itemIndex = _this$props.itemIndex;
34
+ const {
35
+ renameFile,
36
+ name,
37
+ closeRenameFile,
38
+ itemIndex
39
+ } = this.props;
39
40
  let newName = this.state.fileName.trim();
40
41
  if (newName === name || newName === '') {
41
42
  closeRenameFile();
@@ -33,7 +33,9 @@ class FilePreviewer extends _react.default.Component {
33
33
  }
34
34
  };
35
35
  this.handleFileClick = () => {
36
- let fileItem = this.props.fileItem;
36
+ let {
37
+ fileItem
38
+ } = this.props;
37
39
  let openFileUrl = fileItem.url;
38
40
  let assetFileIndex = openFileUrl.indexOf('/asset');
39
41
  if (assetFileIndex > -1 && (0, _url.imageCheck)(fileItem.name)) {
@@ -47,7 +49,9 @@ class FilePreviewer extends _react.default.Component {
47
49
  this.props.downloadFile(downloadUrl);
48
50
  };
49
51
  this.onSelectFile = () => {
50
- const fileItem = this.props.fileItem;
52
+ const {
53
+ fileItem
54
+ } = this.props;
51
55
  this.props.onSelectFiles(fileItem.name);
52
56
  };
53
57
  this.closeRenameFile = () => {
@@ -77,18 +81,21 @@ class FilePreviewer extends _react.default.Component {
77
81
  };
78
82
  }
79
83
  render() {
80
- const _this$props = this.props,
81
- fileItem = _this$props.fileItem,
82
- isItemFreezed = _this$props.isItemFreezed,
83
- isSelectMultipleFiles = _this$props.isSelectMultipleFiles,
84
- isSelected = _this$props.isSelected,
85
- config = _this$props.config;
86
- const _this$state = this.state,
87
- isShowRename = _this$state.isShowRename,
88
- isShowOperation = _this$state.isShowOperation,
89
- highlight = _this$state.highlight;
90
- const _getFileThumbnailInfo = (0, _url.getFileThumbnailInfo)(fileItem, config),
91
- fileIconUrl = _getFileThumbnailInfo.fileIconUrl;
84
+ const {
85
+ fileItem,
86
+ isItemFreezed,
87
+ isSelectMultipleFiles,
88
+ isSelected,
89
+ config
90
+ } = this.props;
91
+ const {
92
+ isShowRename,
93
+ isShowOperation,
94
+ highlight
95
+ } = this.state;
96
+ const {
97
+ fileIconUrl
98
+ } = (0, _url.getFileThumbnailInfo)(fileItem, config);
92
99
  const errorMessage = '';
93
100
  const uploadTime = (0, _utils.getFileUploadTime)(fileItem);
94
101
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {