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
@@ -12,10 +12,11 @@ require("./index.css");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  class GeolocationFormatter extends _react.default.Component {
14
14
  render() {
15
- let _this$props = this.props,
16
- value = _this$props.value,
17
- data = _this$props.data,
18
- containerClassName = _this$props.containerClassName;
15
+ let {
16
+ value,
17
+ data,
18
+ containerClassName
19
+ } = this.props;
19
20
  let className = (0, _classnames.default)('dtable-ui cell-formatter-container geolocation-formatter', containerClassName);
20
21
  if (typeof value !== 'object') {
21
22
  return null;
@@ -15,7 +15,9 @@ class HtmlLongTextFormatter extends _react.Component {
15
15
  constructor(_props) {
16
16
  super(_props);
17
17
  this.translateValue = props => {
18
- const value = props.value;
18
+ const {
19
+ value
20
+ } = props;
19
21
  if (!value) {
20
22
  this.setState({
21
23
  innerHtml: null
@@ -49,18 +51,24 @@ class HtmlLongTextFormatter extends _react.Component {
49
51
  this.translateValue(this.props);
50
52
  }
51
53
  UNSAFE_componentWillReceiveProps(nextProps) {
52
- const value = this.props.value;
54
+ const {
55
+ value
56
+ } = this.props;
53
57
  if (nextProps.value !== value) {
54
58
  this.translateValue(nextProps);
55
59
  }
56
60
  }
57
61
  render() {
58
- const innerHtml = this.state.innerHtml;
59
- const containerClassName = this.props.containerClassName;
62
+ const {
63
+ innerHtml
64
+ } = this.state;
65
+ const {
66
+ containerClassName
67
+ } = this.props;
60
68
  const className = (0, _classnames.default)('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
61
69
  if (!innerHtml) return null;
62
70
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
63
- className: "".concat(className, " article"),
71
+ className: `${className} article`,
64
72
  dangerouslySetInnerHTML: {
65
73
  __html: innerHtml
66
74
  }
package/lib/Icon/index.js CHANGED
@@ -1,37 +1,35 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
9
  var _classnames = _interopRequireDefault(require("classnames"));
12
10
  var React = _interopRequireWildcard(require("react"));
13
11
  var _loadSprite = _interopRequireDefault(require("./load-sprite"));
14
12
  require("./index.css");
15
13
  var _jsxRuntime = require("react/jsx-runtime");
16
- const _excluded = ["type", "className", "size"];
17
14
  class Icon extends React.Component {
18
15
  componentDidMount() {
19
16
  (0, _loadSprite.default)();
20
17
  }
21
18
  render() {
22
- const _this$props = this.props,
23
- type = _this$props.type,
24
- className = _this$props.className,
25
- size = _this$props.size,
26
- restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
27
- const cls = (0, _classnames.default)(className, 'am-icon', "am-icon-".concat(type), "am-icon-".concat(size));
28
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", (0, _objectSpread2.default)((0, _objectSpread2.default)({
29
- className: cls
30
- }, restProps), {}, {
19
+ const {
20
+ type,
21
+ className,
22
+ size,
23
+ ...restProps
24
+ } = this.props;
25
+ const cls = (0, _classnames.default)(className, 'am-icon', `am-icon-${type}`, `am-icon-${size}`);
26
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
27
+ className: cls,
28
+ ...restProps,
31
29
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("use", {
32
- xlinkHref: "#".concat(type)
30
+ xlinkHref: `#${type}`
33
31
  })
34
- }));
32
+ });
35
33
  }
36
34
  }
37
35
  exports.default = Icon;
@@ -7,7 +7,18 @@ exports.default = void 0;
7
7
  /* tslint:disable:max-line-length */
8
8
  // inspried by https://github.com/kisenka/svg-sprite-loader/blob/master/runtime/browser-sprite.js
9
9
  // Much simplified, do make sure run this after document ready
10
- const svgSprite = contents => "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n id=\"__ANTD_MOBILE_SVG_SPRITE_NODE__\"\n style=\"display:none;overflow:hidden;width:0;height:0\"\n >\n <defs>\n ".concat(contents, "\n </defs>\n </svg>\n");
10
+ const svgSprite = contents => `
11
+ <svg
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ xmlns:xlink="http://www.w3.org/1999/xlink"
14
+ id="__ANTD_MOBILE_SVG_SPRITE_NODE__"
15
+ style="display:none;overflow:hidden;width:0;height:0"
16
+ >
17
+ <defs>
18
+ ${contents}
19
+ </defs>
20
+ </svg>
21
+ `;
11
22
 
12
23
  // both minified by https://github.com/svg/svgo
13
24
  const icons = {
@@ -39,7 +50,7 @@ const icons = {
39
50
  const renderSvgSprite = () => {
40
51
  const symbols = Object.keys(icons).map(iconName => {
41
52
  const svgContent = icons[iconName].split('svg')[1];
42
- return "<symbol id=".concat(iconName).concat(svgContent, "symbol>");
53
+ return `<symbol id=${iconName}${svgContent}symbol>`;
43
54
  }).join('');
44
55
  return svgSprite(symbols);
45
56
  };
@@ -5,28 +5,27 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
  var _classnames = _interopRequireDefault(require("classnames"));
12
10
  require("./index.css");
13
11
  var _jsxRuntime = require("react/jsx-runtime");
14
- const _excluded = ["disabled", "className", "icon", "children"];
15
12
  const IconButton = _ref => {
16
- let disabled = _ref.disabled,
17
- className = _ref.className,
18
- icon = _ref.icon,
19
- children = _ref.children,
20
- otherProperties = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
13
+ let {
14
+ disabled,
15
+ className,
16
+ icon,
17
+ children,
18
+ ...otherProperties
19
+ } = _ref;
20
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
22
21
  className: (0, _classnames.default)('seatable-icon-btn icon-button', className, {
23
22
  'disabled': disabled
24
- })
25
- }, otherProperties), {}, {
23
+ }),
24
+ ...otherProperties,
26
25
  children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
27
- className: (0, _classnames.default)('seatable-icon dtable-font', "dtable-icon-".concat(icon)),
26
+ className: (0, _classnames.default)('seatable-icon dtable-font', `dtable-icon-${icon}`),
28
27
  "aria-hidden": "true"
29
28
  }), children]
30
- }));
29
+ });
31
30
  };
32
31
  var _default = exports.default = IconButton;
@@ -19,11 +19,15 @@ class ImagePreviewer extends _react.default.Component {
19
19
  constructor(props) {
20
20
  super(props);
21
21
  this.showLargeImage = () => {
22
- let imageItemUrl = this.props.imageItemUrl;
22
+ let {
23
+ imageItemUrl
24
+ } = this.props;
23
25
  this.props.showLargeImage(imageItemUrl);
24
26
  };
25
27
  this.showImageToolbar = () => {
26
- let itemIndex = this.props.itemIndex;
28
+ let {
29
+ itemIndex
30
+ } = this.props;
27
31
  this.props.setImageItemIndex(itemIndex);
28
32
  };
29
33
  this.hideImageToolbar = () => {
@@ -35,7 +39,9 @@ class ImagePreviewer extends _react.default.Component {
35
39
  };
36
40
  this.deleteImage = e => {
37
41
  e.stopPropagation();
38
- let itemIndex = this.props.itemIndex;
42
+ let {
43
+ itemIndex
44
+ } = this.props;
39
45
  this.props.deleteImage(itemIndex, _constants.FILE_EDITOR_STATUS.PREVIEWER);
40
46
  };
41
47
  this.onClickDelete = e => {
@@ -85,15 +91,17 @@ class ImagePreviewer extends _react.default.Component {
85
91
  const offsetWidth = document.body.offsetWidth;
86
92
  this.containerSize = offsetWidth < 768 ? (offsetWidth - 55) / 2 + 'px' : (offsetWidth - 80) / 3 + 'px';
87
93
  this.position = {};
88
- const _ref = props.config || {},
89
- mediaUrl = _ref.mediaUrl;
90
- this.imageLoadingFailedUrl = "".concat(mediaUrl, "img/image-loading-failed.png");
94
+ const {
95
+ mediaUrl
96
+ } = props.config || {};
97
+ this.imageLoadingFailedUrl = `${mediaUrl}img/image-loading-failed.png`;
91
98
  this.ref = null;
92
99
  }
93
100
  componentDidMount() {
94
- let _this$props = this.props,
95
- imageItemUrl = _this$props.imageItemUrl,
96
- config = _this$props.config;
101
+ let {
102
+ imageItemUrl,
103
+ config
104
+ } = this.props;
97
105
  if ((0, _url.checkSVGImage)(imageItemUrl)) {
98
106
  this.setState({
99
107
  imageThumbnailUrl: imageItemUrl
@@ -112,10 +120,11 @@ class ImagePreviewer extends _react.default.Component {
112
120
  });
113
121
  }
114
122
  render() {
115
- const _this$props2 = this.props,
116
- enterImageItemIndex = _this$props2.enterImageItemIndex,
117
- itemIndex = _this$props2.itemIndex,
118
- imageItemUrl = _this$props2.imageItemUrl;
123
+ const {
124
+ enterImageItemIndex,
125
+ itemIndex,
126
+ imageItemUrl
127
+ } = this.props;
119
128
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
120
129
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
121
130
  style: _constants.isMobile ? {
@@ -26,7 +26,9 @@ class ImagesPreviewer extends _react.default.Component {
26
26
  }
27
27
  };
28
28
  this.showLargeImage = itemUrl => {
29
- let value = this.props.value;
29
+ let {
30
+ value
31
+ } = this.props;
30
32
  this.setState({
31
33
  isShowLargeImage: true,
32
34
  largeImageIndex: value.indexOf(itemUrl)
@@ -56,7 +58,9 @@ class ImagesPreviewer extends _react.default.Component {
56
58
  };
57
59
  this.deleteImage = (index, type) => {
58
60
  this.props.deleteImage(index, type);
59
- const value = this.props.value;
61
+ const {
62
+ value
63
+ } = this.props;
60
64
  if (index > value.length - 2) {
61
65
  if (value.length - 2 < 0) {
62
66
  this.hideLargeImage();
@@ -99,7 +103,9 @@ class ImagesPreviewer extends _react.default.Component {
99
103
  }
100
104
  }
101
105
  render() {
102
- let value = this.props.value;
106
+ let {
107
+ value
108
+ } = this.props;
103
109
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
104
110
  className: (0, _classnames.default)('dtable-ui-image-previewer-container', {
105
111
  'mt-0': value.length === 0 && _constants.isMobile
@@ -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 _pcEditor = _interopRequireDefault(require("./pc-editor"));
14
12
  var _mbEditor = _interopRequireDefault(require("./mb-editor"));
15
13
  require("./index.css");
16
14
  var _jsxRuntime = require("react/jsx-runtime");
17
- const _excluded = ["isMobile"];
18
15
  const ImageEditor = /*#__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)(_pcEditor.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)(_pcEditor.default, {
21
+ ...props,
22
22
  ref: ref
23
- }));
24
- if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
23
+ });
24
+ if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.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)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
31
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.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)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
37
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
38
+ ...props,
36
39
  ref: ref
37
- }))
40
+ })
38
41
  })]
39
42
  });
40
43
  });
@@ -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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _ActivityIndicator = _interopRequireDefault(require("../../ActivityIndicator"));
12
11
  var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
@@ -17,35 +16,28 @@ var _utils = require("../../utils/utils");
17
16
  var _lang = require("../../lang");
18
17
  require("./index.css");
19
18
  var _jsxRuntime = require("react/jsx-runtime");
20
- const Header = _MobileFullScreenPage.default.Header,
21
- Body = _MobileFullScreenPage.default.Body;
19
+ const {
20
+ Header,
21
+ Body
22
+ } = _MobileFullScreenPage.default;
22
23
  const MBImageEditor = _ref => {
23
- let oldValue = _ref.value,
24
- column = _ref.column,
25
- config = _ref.config,
26
- onToggle = _ref.onToggle,
27
- onCommit = _ref.onCommit,
28
- uploadFile = _ref.uploadFile;
29
- const _useState = (0, _react.useState)(oldValue || []),
30
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
31
- value = _useState2[0],
32
- setValue = _useState2[1];
33
- const _useState3 = (0, _react.useState)(false),
34
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
35
- isShowEditor = _useState4[0],
36
- setShowEditor = _useState4[1];
37
- const _useState5 = (0, _react.useState)([]),
38
- _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
39
- uploadLocalImages = _useState6[0],
40
- setUploadLocalImages = _useState6[1];
41
- const _useState7 = (0, _react.useState)(false),
42
- _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
43
- isUploading = _useState8[0],
44
- setUploading = _useState8[1];
24
+ let {
25
+ value: oldValue,
26
+ column,
27
+ config,
28
+ onToggle,
29
+ onCommit,
30
+ uploadFile
31
+ } = _ref;
32
+ const [value, setValue] = (0, _react.useState)(oldValue || []);
33
+ const [isShowEditor, setShowEditor] = (0, _react.useState)(false);
34
+ const [uploadLocalImages, setUploadLocalImages] = (0, _react.useState)([]);
35
+ const [isUploading, setUploading] = (0, _react.useState)(false);
45
36
  const uploadingFilesCount = (0, _react.useRef)(0);
46
37
  const uploadedFilesCount = (0, _react.useRef)(0);
47
- const _ref2 = config || {},
48
- mediaUrl = _ref2.mediaUrl;
38
+ const {
39
+ mediaUrl
40
+ } = config || {};
49
41
  const resetAdditionImage = (0, _react.useCallback)(() => {
50
42
  setUploadLocalImages([]);
51
43
  }, []);
@@ -14,7 +14,9 @@ class ImageLink extends _react.default.Component {
14
14
  constructor(props) {
15
15
  super(props);
16
16
  this.saveImageLink = () => {
17
- let imageLink = this.state.imageLink;
17
+ let {
18
+ imageLink
19
+ } = this.state;
18
20
  let _this = this;
19
21
  let image = new Image();
20
22
  image.onload = function () {
@@ -48,7 +50,9 @@ class ImageLink extends _react.default.Component {
48
50
  };
49
51
  }
50
52
  render() {
51
- const isShowErrorMessage = this.state.isShowErrorMessage;
53
+ const {
54
+ isShowErrorMessage
55
+ } = this.state;
52
56
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
53
57
  className: "dtable-ui-image-link",
54
58
  onKeyDown: this.onKeyDown,
@@ -32,7 +32,9 @@ class AdditionPreviewer extends _react.default.Component {
32
32
  };
33
33
  }
34
34
  render() {
35
- const activeTab = this.state.activeTab;
35
+ const {
36
+ activeTab
37
+ } = this.state;
36
38
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
37
39
  className: "dtable-ui-image-addition-container",
38
40
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -40,11 +42,11 @@ class AdditionPreviewer extends _react.default.Component {
40
42
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
41
43
  className: "dtable-ui-image-addition-nav",
42
44
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
43
- className: "dtable-ui-addition-item ".concat(activeTab === 'localPicture' ? 'dtable-ui-addition-item-selected' : ''),
45
+ className: `dtable-ui-addition-item ${activeTab === 'localPicture' ? 'dtable-ui-addition-item-selected' : ''}`,
44
46
  onClick: this.toggle.bind(this, 'localPicture'),
45
47
  children: (0, _lang.getLocale)('Local_Images')
46
48
  }), this.props.saveImageLink && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
47
- className: "dtable-ui-addition-item ".concat(activeTab === 'imageLink' ? 'dtable-ui-addition-item-selected' : ''),
49
+ className: `dtable-ui-addition-item ${activeTab === 'imageLink' ? 'dtable-ui-addition-item-selected' : ''}`,
48
50
  onClick: this.toggle.bind(this, 'imageLink'),
49
51
  children: (0, _lang.getLocale)('Image_Link')
50
52
  })]
@@ -41,7 +41,9 @@ class LocalImageAddition extends _react.default.Component {
41
41
  };
42
42
  this.onFileUploadSuccess = fileMessage => {
43
43
  this.hideDeleteIcon();
44
- let thumbnailSrcList = this.state.thumbnailSrcList;
44
+ let {
45
+ thumbnailSrcList
46
+ } = this.state;
45
47
  const findUploadFileIndex = this.findUploadFileIndex(fileMessage);
46
48
  thumbnailSrcList.splice(findUploadFileIndex, 1, fileMessage);
47
49
  if (thumbnailSrcList.every(fileItem => !fileItem.isUploading)) {
@@ -52,7 +54,9 @@ class LocalImageAddition extends _react.default.Component {
52
54
  this.props.fileUploadCompleted(fileMessage);
53
55
  };
54
56
  this.onFileUploadFailed = uploadedFileInfo => {
55
- let thumbnailSrcList = this.state.thumbnailSrcList;
57
+ let {
58
+ thumbnailSrcList
59
+ } = this.state;
56
60
  const findUploadFileIndex = this.findUploadFileIndex(uploadedFileInfo);
57
61
  thumbnailSrcList.splice(findUploadFileIndex, 1, uploadedFileInfo);
58
62
  this.setState({
@@ -60,7 +64,9 @@ class LocalImageAddition extends _react.default.Component {
60
64
  });
61
65
  };
62
66
  this.findUploadFileIndex = fileMessage => {
63
- let thumbnailSrcList = this.state.thumbnailSrcList;
67
+ let {
68
+ thumbnailSrcList
69
+ } = this.state;
64
70
  let uploadFileIndex = thumbnailSrcList.findIndex(item => item.name === fileMessage.file.name);
65
71
  return uploadFileIndex;
66
72
  };
@@ -71,7 +77,9 @@ class LocalImageAddition extends _react.default.Component {
71
77
  });
72
78
  return;
73
79
  }
74
- let uploadMessageList = this.state.uploadMessageList;
80
+ let {
81
+ uploadMessageList
82
+ } = this.state;
75
83
  let newUploadMessageList = uploadMessageList.slice(0);
76
84
  let uploadFile = uploadMessageList.find(item => item.uploadName === uploadMessage.uploadName);
77
85
  if (uploadFile) {
@@ -105,7 +113,9 @@ class LocalImageAddition extends _react.default.Component {
105
113
  });
106
114
  };
107
115
  this.renderMultipleFilesArr = () => {
108
- let thumbnailSrcList = this.state.thumbnailSrcList;
116
+ let {
117
+ thumbnailSrcList
118
+ } = this.state;
109
119
  let imageArr = [];
110
120
  if (Array.isArray(this.props.uploadLocalImageValue)) {
111
121
  let uploadedFileList = this.renderUploadedFile();
@@ -123,7 +133,7 @@ class LocalImageAddition extends _react.default.Component {
123
133
  src: fileThumbnailItem.fileIconUrl,
124
134
  style: {
125
135
  position: 'absolute',
126
- zIndex: "".concat(fileThumbnailItem.percent === 100 ? 3 : 1),
136
+ zIndex: `${fileThumbnailItem.percent === 100 ? 3 : 1}`,
127
137
  maxHeight: '100%'
128
138
  },
129
139
  alt: ""
@@ -152,7 +162,7 @@ class LocalImageAddition extends _react.default.Component {
152
162
  })]
153
163
  })
154
164
  })
155
- }, "dtable-ui-image-wrapper-circle".concat(index));
165
+ }, `dtable-ui-image-wrapper-circle${index}`);
156
166
  });
157
167
  imageArr.push(...thumbnailList);
158
168
  }
@@ -160,7 +170,9 @@ class LocalImageAddition extends _react.default.Component {
160
170
  return imageArr;
161
171
  };
162
172
  this.renderUploadedFile = () => {
163
- const uploadLocalImageValue = this.props.uploadLocalImageValue;
173
+ const {
174
+ uploadLocalImageValue
175
+ } = this.props;
164
176
  let uploadedFileList = [];
165
177
  uploadedFileList = uploadLocalImageValue.length > 0 && uploadLocalImageValue.map((imgSrc, index) => {
166
178
  let imageThumbnailUrl = (0, _dtableUtils.getImageThumbnailUrl)(imgSrc);
@@ -190,13 +202,15 @@ class LocalImageAddition extends _react.default.Component {
190
202
  return uploadedFileList;
191
203
  };
192
204
  this.renderUploadFileWrapper = imageArr => {
193
- let isImageTipShow = this.state.isImageTipShow;
205
+ let {
206
+ isImageTipShow
207
+ } = this.state;
194
208
  let editorContent;
195
- let className = imageArr.length === 0 ? "dtable-ui-image-upload-container ".concat(isImageTipShow ? 'dtable-ui-image-upload-container-active' : '') : 'dtable-ui-image-wrapper';
209
+ let className = imageArr.length === 0 ? `dtable-ui-image-upload-container ${isImageTipShow ? 'dtable-ui-image-upload-container-active' : ''}` : 'dtable-ui-image-wrapper';
196
210
  if (imageArr.length === 0) {
197
211
  editorContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
198
212
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
199
- className: "dtable-ui-image-tip-addition ".concat(isImageTipShow ? 'dtable-ui-image-drop-active' : ''),
213
+ className: `dtable-ui-image-tip-addition ${isImageTipShow ? 'dtable-ui-image-drop-active' : ''}`,
200
214
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
201
215
  className: "dtable-ui-dtable-ui-image-add-icon",
202
216
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
@@ -219,7 +233,7 @@ class LocalImageAddition extends _react.default.Component {
219
233
  editorContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
220
234
  className: "dtable-ui-image-add-box",
221
235
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
222
- className: "dtable-ui-image-add-button ".concat(isImageTipShow ? 'dtable-ui-image-wrapper-drop-active' : ''),
236
+ className: `dtable-ui-image-add-button ${isImageTipShow ? 'dtable-ui-image-wrapper-drop-active' : ''}`,
223
237
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
224
238
  "aria-hidden": "true",
225
239
  className: "dtable-font dtable-icon-add-table"
@@ -25,7 +25,9 @@ class ImagesPreviewer extends _react.default.Component {
25
25
  }
26
26
  };
27
27
  this.showLargeImage = itemUrl => {
28
- let value = this.props.value;
28
+ let {
29
+ value
30
+ } = this.props;
29
31
  this.setState({
30
32
  isShowLargeImage: true,
31
33
  largeImageIndex: value.indexOf(itemUrl)
@@ -55,7 +57,9 @@ class ImagesPreviewer extends _react.default.Component {
55
57
  };
56
58
  this.deleteImage = (index, type) => {
57
59
  this.props.deleteImage(index, type);
58
- const value = this.props.value;
60
+ const {
61
+ value
62
+ } = this.props;
59
63
  if (index > value.length - 2) {
60
64
  if (value.length - 2 < 0) {
61
65
  this.hideLargeImage();
@@ -98,11 +102,13 @@ class ImagesPreviewer extends _react.default.Component {
98
102
  }
99
103
  }
100
104
  render() {
101
- let value = this.props.value;
105
+ let {
106
+ value
107
+ } = this.props;
102
108
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
103
109
  className: "dtable-ui-image-previewer-container",
104
110
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
105
- className: "dtable-ui-image-previewer-wrapper ".concat(value.length === 0 && _constants.isMobile ? 'd-none' : ''),
111
+ className: `dtable-ui-image-previewer-wrapper ${value.length === 0 && _constants.isMobile ? 'd-none' : ''}`,
106
112
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
107
113
  className: "dtable-ui-image-previewer-content",
108
114
  children: value.length > 0 && value.map((imageItemUrl, index) => {
@@ -24,9 +24,10 @@ class PCImageEditor extends _react.default.Component {
24
24
  return this.state.value;
25
25
  };
26
26
  this.getEditorView = () => {
27
- const _this$props = this.props,
28
- isInModal = _this$props.isInModal,
29
- value = _this$props.value;
27
+ const {
28
+ isInModal,
29
+ value
30
+ } = this.props;
30
31
  return !value || value.length === 0 || isInModal ? _constants.FILE_EDITOR_STATUS.ADDITION : _constants.FILE_EDITOR_STATUS.PREVIEWER;
31
32
  };
32
33
  this.deleteImage = function (index) {
@@ -56,9 +57,10 @@ class PCImageEditor extends _react.default.Component {
56
57
  e.stopPropagation();
57
58
  if (this.state.isOpen && this.state.isUpdated) {
58
59
  if (this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION) {
59
- let _this$state = this.state,
60
- value = _this$state.value,
61
- uploadLocalImageValue = _this$state.uploadLocalImageValue;
60
+ let {
61
+ value,
62
+ uploadLocalImageValue
63
+ } = this.state;
62
64
  let newValue = value.concat(uploadLocalImageValue);
63
65
  this.setState({
64
66
  value: newValue
@@ -112,7 +114,9 @@ class PCImageEditor extends _react.default.Component {
112
114
  });
113
115
  };
114
116
  this.renderHeader = () => {
115
- let editorView = this.state.editorView;
117
+ let {
118
+ editorView
119
+ } = this.state;
116
120
  if (this.props.isInModal) {
117
121
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
118
122
  children: (0, _lang.getLocale)('Add_images')
@@ -134,10 +138,11 @@ class PCImageEditor extends _react.default.Component {
134
138
  });
135
139
  };
136
140
  this.showImageListPreviewer = () => {
137
- let _this$state2 = this.state,
138
- value = _this$state2.value,
139
- uploadLocalImageValue = _this$state2.uploadLocalImageValue,
140
- imageLinkValue = _this$state2.imageLinkValue;
141
+ let {
142
+ value,
143
+ uploadLocalImageValue,
144
+ imageLinkValue
145
+ } = this.state;
141
146
  let newValue = value.concat(uploadLocalImageValue, imageLinkValue);
142
147
  this.setState({
143
148
  value: newValue