dtable-ui-component 6.0.125 → 6.0.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/lib/ActionSheet/index.js +14 -16
  2. package/lib/ActivityIndicator/index.js +7 -8
  3. package/lib/AsyncUserSelect/index.css +5 -0
  4. package/lib/AsyncUserSelect/index.js +40 -19
  5. package/lib/AsyncUserSelect/user-item.js +5 -6
  6. package/lib/AutoNumberFormatter/index.js +3 -4
  7. package/lib/Badge/index.js +9 -11
  8. package/lib/ButtonFormatter/index.js +6 -8
  9. package/lib/CTimeFormatter/index.js +3 -4
  10. package/lib/CheckboxEditor/index.js +1 -3
  11. package/lib/CheckboxEditor/mb-editor.js +9 -20
  12. package/lib/CheckboxEditor/pc-editor.js +12 -24
  13. package/lib/CheckboxFormatter/index.js +4 -5
  14. package/lib/CollaboratorEditor/index.js +2 -4
  15. package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
  16. package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
  17. package/lib/CollaboratorFormatter/index.js +8 -10
  18. package/lib/CollaboratorItem/index.js +4 -5
  19. package/lib/CollapsibleSettingLayout/index.js +9 -7
  20. package/lib/Comment/body/comment.js +10 -18
  21. package/lib/Comment/body/index.js +2 -4
  22. package/lib/Comment/footer/btns/index.js +4 -7
  23. package/lib/Comment/footer/index.js +9 -20
  24. package/lib/Comment/footer/input/index.js +29 -50
  25. package/lib/Comment/footer/input/participant/index.js +4 -5
  26. package/lib/Comment/footer/participants/index.js +4 -5
  27. package/lib/Comment/footer/participants/participant/index.js +1 -3
  28. package/lib/Comment/footer/participants/participant-select/index.js +8 -24
  29. package/lib/Comment/index.js +39 -57
  30. package/lib/Comment/utils/utilities.js +15 -21
  31. package/lib/CreatorFormatter/index.js +6 -8
  32. package/lib/DTableColorPicker/ColorPickerPortal/index.js +23 -19
  33. package/lib/DTableColorPicker/index.css +0 -2
  34. package/lib/DTableColorPicker/index.js +56 -41
  35. package/lib/DTableColorPicker/utils.js +4 -6
  36. package/lib/DTableColumnIcon/index.js +6 -7
  37. package/lib/DTableCommonAddTool/index.css +1 -3
  38. package/lib/DTableCommonAddTool/index.js +6 -8
  39. package/lib/DTableCustomFooter/index.css +1 -3
  40. package/lib/DTableCustomFooter/index.js +1 -3
  41. package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
  42. package/lib/DTableCustomizeSelect/index.js +19 -24
  43. package/lib/DTableDropdownItem/index.js +16 -18
  44. package/lib/DTableDropdownMenu/index.js +8 -10
  45. package/lib/DTableEmptyTip/index.js +4 -5
  46. package/lib/DTableFiltersPopover/index.css +0 -2
  47. package/lib/DTableFiltersPopover/index.js +26 -41
  48. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +1 -3
  49. package/lib/DTableFiltersPopover/utils/index.js +63 -113
  50. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +8 -9
  51. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
  52. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
  53. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
  54. package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
  55. package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
  56. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
  57. package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
  58. package/lib/DTableGroupSelect/index.js +11 -15
  59. package/lib/DTableGroupSelect/select-option-group.js +23 -32
  60. package/lib/DTableIcon/index.js +6 -7
  61. package/lib/DTableIcon/svg-icon.js +5 -7
  62. package/lib/DTableModalHeader/index.js +1 -3
  63. package/lib/DTablePopover/index.js +13 -16
  64. package/lib/DTableRadio/index.js +10 -9
  65. package/lib/DTableRadioGroup/index.js +8 -17
  66. package/lib/DTableSearchInput/index.js +19 -29
  67. package/lib/DTableSelect/dtable-select-label.js +6 -5
  68. package/lib/DTableSelect/index.js +21 -22
  69. package/lib/DTableSelect/utils.js +7 -15
  70. package/lib/DTableSubDropdownMenu/index.js +8 -10
  71. package/lib/DTableSubDropdownToggle/index.js +12 -12
  72. package/lib/DTableSwitch/index.css +0 -1
  73. package/lib/DTableSwitch/index.js +12 -11
  74. package/lib/DTableToolTip/index.js +7 -8
  75. package/lib/DateEditor/index.js +20 -15
  76. package/lib/DateEditor/mb-editor/index.js +18 -31
  77. package/lib/DateEditor/pc-editor.js +26 -45
  78. package/lib/DateFormatter/index.js +4 -5
  79. package/lib/DatePicker/index.js +9 -15
  80. package/lib/DatePicker/utils.js +1 -3
  81. package/lib/DeleteTip/index.js +5 -6
  82. package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
  83. package/lib/DepartmentSelectFilter/index.js +6 -8
  84. package/lib/DepartmentSingleSelectEditor/index.js +1 -3
  85. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
  86. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
  87. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
  88. package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
  89. package/lib/DigitalSignEditor/index.js +1 -3
  90. package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
  91. package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
  92. package/lib/DigitalSignEditor/service.js +2 -4
  93. package/lib/DigitalSignEditor/signature-board/index.js +5 -8
  94. package/lib/DigitalSignEditor/utils.js +2 -4
  95. package/lib/DigitalSignFormatter/index.js +12 -15
  96. package/lib/DigitalSignFormatter/utils.js +4 -5
  97. package/lib/DurationEditor/index.js +21 -31
  98. package/lib/DurationFormatter/index.js +4 -5
  99. package/lib/EditEditorButton/index.js +1 -3
  100. package/lib/EmailFormatter/index.js +3 -4
  101. package/lib/FieldDisplaySetting/field-item.js +12 -12
  102. package/lib/FieldDisplaySetting/index.js +11 -9
  103. package/lib/FileEditor/files-previewer/index.js +1 -3
  104. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
  105. package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
  106. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
  107. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
  108. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
  109. package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
  110. package/lib/FileEditor/index.js +1 -3
  111. package/lib/FileEditor/mb-editor/index.js +28 -20
  112. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
  113. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
  114. package/lib/FileEditor/pc-editor/index.js +19 -27
  115. package/lib/FileFormatter/index.js +26 -19
  116. package/lib/FileItemFormatter/index.js +6 -9
  117. package/lib/FileUploader/index.js +28 -45
  118. package/lib/FormulaFormatter/index.js +15 -29
  119. package/lib/GeolocationEditor/index.js +11 -12
  120. package/lib/GeolocationEditor/map-editor-utils.js +17 -15
  121. package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
  122. package/lib/GeolocationEditor/mb-editor/index.js +4 -6
  123. package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
  124. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
  125. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
  126. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
  127. package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
  128. package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
  129. package/lib/GeolocationEditor/pc-editor/index.js +12 -20
  130. package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
  131. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
  132. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
  133. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
  134. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
  135. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
  136. package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
  137. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
  138. package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
  139. package/lib/GeolocationFormatter/index.js +4 -5
  140. package/lib/HtmlLongTextFormatter/index.js +4 -12
  141. package/lib/Icon/index.js +3 -5
  142. package/lib/IconButton/index.js +4 -6
  143. package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
  144. package/lib/ImageEditor/images-previewer/index.js +3 -9
  145. package/lib/ImageEditor/index.js +1 -3
  146. package/lib/ImageEditor/mb-editor/index.js +28 -20
  147. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
  148. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
  149. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
  150. package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
  151. package/lib/ImageEditor/pc-editor/index.js +11 -16
  152. package/lib/ImageFormatter/images-lazy-load.js +19 -11
  153. package/lib/ImageFormatter/index.js +11 -13
  154. package/lib/ImagePreviewerLightbox/index.js +15 -13
  155. package/lib/ImageThumbnail/index.js +10 -13
  156. package/lib/InputItem/custom-input.js +26 -46
  157. package/lib/InputItem/custom-keyboard.js +15 -18
  158. package/lib/InputItem/index.js +34 -50
  159. package/lib/InputItem/input.js +2 -4
  160. package/lib/LastModifierFormatter/index.js +6 -8
  161. package/lib/LinkEditor/index.js +33 -53
  162. package/lib/LinkEditor/link-editor-option.js +3 -4
  163. package/lib/LinkEditor/mb-popover/index.js +9 -22
  164. package/lib/LinkEditor/pc-popover/index.js +5 -10
  165. package/lib/LinkFormatter/index.js +21 -37
  166. package/lib/List/index.js +6 -8
  167. package/lib/List/list-item.js +22 -28
  168. package/lib/LongTextFormatter/index.js +4 -5
  169. package/lib/MBEditorHeader/index.js +7 -8
  170. package/lib/MTimeFormatter/index.js +3 -4
  171. package/lib/MobileFullScreenPage/body/index.js +3 -5
  172. package/lib/MobileFullScreenPage/header/index.js +4 -6
  173. package/lib/MobileFullScreenPage/index.js +13 -11
  174. package/lib/MobileModal/index.js +1 -3
  175. package/lib/MobileOperationSheet/index.js +7 -8
  176. package/lib/MobileSelector/empty/index.js +1 -3
  177. package/lib/MobileSelector/index.js +5 -7
  178. package/lib/MobileSelector/option/index.js +3 -5
  179. package/lib/MobileSelector/options/index.js +1 -3
  180. package/lib/MobileSelector/search/index.js +3 -5
  181. package/lib/MobileUpload/index.js +4 -5
  182. package/lib/Modal/modal.js +14 -15
  183. package/lib/Modal/prompt.js +4 -4
  184. package/lib/MultipleSelectEditor/index.js +1 -3
  185. package/lib/MultipleSelectFormatter/index.js +6 -8
  186. package/lib/NotificationPopover/index.css +1 -6
  187. package/lib/NotificationPopover/index.js +6 -7
  188. package/lib/NumberEditor/index.js +12 -21
  189. package/lib/NumberFormatter/index.js +4 -5
  190. package/lib/PhoneNumberLink/index.js +2 -4
  191. package/lib/Picker/AbstractPicker.js +23 -27
  192. package/lib/Popover/index.js +3 -4
  193. package/lib/Popover/item.js +7 -9
  194. package/lib/Progress/index.js +9 -8
  195. package/lib/Radio/Radio.js +4 -8
  196. package/lib/Radio/RadioItem.js +8 -12
  197. package/lib/RateFormatter/index.js +13 -13
  198. package/lib/RoleStatusEditor/index.js +18 -17
  199. package/lib/RowExpandDialog/body/index.js +32 -49
  200. package/lib/RowExpandDialog/column-content/index.js +5 -9
  201. package/lib/RowExpandDialog/header/index.js +6 -8
  202. package/lib/RowExpandDialog/index.js +49 -34
  203. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
  204. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
  205. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
  206. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
  207. package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
  208. package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
  209. package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
  210. package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
  211. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
  212. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
  213. package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
  214. package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
  215. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
  216. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
  217. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
  218. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
  219. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
  220. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
  221. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
  222. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
  223. package/lib/RowExpandEditor/index.js +4 -8
  224. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
  225. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
  226. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
  227. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
  228. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
  229. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
  230. package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
  231. package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
  232. package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
  233. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
  234. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
  235. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
  236. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
  237. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
  238. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
  239. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
  240. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
  241. package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
  242. package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
  243. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
  244. package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
  245. package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
  246. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
  247. package/lib/RowExpandFormatter/index.js +27 -41
  248. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
  249. package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
  250. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
  251. package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
  252. package/lib/RowExpandFormatter/text/index.js +4 -5
  253. package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
  254. package/lib/RowExpandView/body/index.js +22 -35
  255. package/lib/RowExpandView/column-content/index.js +3 -7
  256. package/lib/RowExpandView/index.js +42 -30
  257. package/lib/SelectItem/index.js +5 -7
  258. package/lib/SelectOptionGroup/index.css +3 -3
  259. package/lib/SelectOptionGroup/index.js +31 -40
  260. package/lib/SelectedDepartments/index.js +7 -9
  261. package/lib/SimpleLongTextFormatter/index.js +10 -16
  262. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
  263. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
  264. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
  265. package/lib/SingleSelectEditor/index.js +1 -3
  266. package/lib/SingleSelectFormatter/index.js +8 -9
  267. package/lib/TabBar/Tab.js +14 -16
  268. package/lib/TabBar/index.js +18 -21
  269. package/lib/Tabs/index.js +1 -3
  270. package/lib/TextEditor/index.js +14 -23
  271. package/lib/TextFormatter/index.js +3 -4
  272. package/lib/TextareaItem/index.js +19 -26
  273. package/lib/Toast/index.js +3 -4
  274. package/lib/UrlFormatter/index.js +3 -4
  275. package/lib/common/editor-base.js +7 -12
  276. package/lib/hooks/common-hooks.js +2 -4
  277. package/lib/select-editor/index.js +1 -3
  278. package/lib/select-editor/mb-editor/index.js +17 -28
  279. package/lib/select-editor/pc-editor/index.js +27 -42
  280. package/lib/toaster/alert.js +6 -7
  281. package/lib/toaster/toast.js +2 -3
  282. package/lib/toaster/toastManager.js +2 -4
  283. package/lib/utils/cell.js +8 -11
  284. package/lib/utils/column-utils.js +8 -14
  285. package/lib/utils/departments.js +1 -3
  286. package/lib/utils/url.js +24 -31
  287. package/lib/utils/utils.js +2 -6
  288. package/package.json +8 -8
@@ -15,9 +15,7 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
15
15
  constructor(props) {
16
16
  super(props);
17
17
  this.onCommit = value => {
18
- const {
19
- onCommit
20
- } = this.props;
18
+ const onCommit = this.props.onCommit;
21
19
  this.setState({
22
20
  value
23
21
  }, () => {
@@ -29,12 +27,10 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
29
27
  updated[this.props.column.key] = this.state.value;
30
28
  return updated;
31
29
  };
32
- const {
33
- column,
34
- isInModal,
35
- value: _value,
36
- height
37
- } = props;
30
+ const column = props.column,
31
+ isInModal = props.isInModal,
32
+ _value = props.value,
33
+ height = props.height;
38
34
  const editorWidth = column.width > 300 ? column.width : 300;
39
35
  const data = column.data || {};
40
36
  this.state = {
@@ -50,10 +46,9 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
50
46
  componentDidMount() {
51
47
  if (this.isRowExpand) {
52
48
  let menuStyle = {};
53
- const {
54
- top,
55
- left
56
- } = this.outerRef.getBoundingClientRect();
49
+ const _this$outerRef$getBou = this.outerRef.getBoundingClientRect(),
50
+ top = _this$outerRef$getBou.top,
51
+ left = _this$outerRef$getBou.left;
57
52
  if (top > 330) {
58
53
  menuStyle.top = -200;
59
54
  }
@@ -66,12 +61,11 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
66
61
  }
67
62
  }
68
63
  render() {
69
- const {
70
- target,
71
- column,
72
- userDepartmentIdsMap,
73
- departments
74
- } = this.props;
64
+ const _this$props = this.props,
65
+ target = _this$props.target,
66
+ column = _this$props.column,
67
+ userDepartmentIdsMap = _this$props.userDepartmentIdsMap,
68
+ departments = _this$props.departments;
75
69
  const dom = /*#__PURE__*/(0, _jsxRuntime.jsx)(_departmentSingleSelect.default, {
76
70
  column: column,
77
71
  value: this.state.value,
@@ -11,12 +11,10 @@ var _lang = require("../lang");
11
11
  require("./index.css");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function DepartmentSingleSelectFormatter(props) {
14
- const {
15
- value,
16
- departments,
17
- containerClassName,
18
- tip
19
- } = props;
14
+ const value = props.value,
15
+ departments = props.departments,
16
+ containerClassName = props.containerClassName,
17
+ tip = props.tip;
20
18
  if (!value || !Array.isArray(departments)) return null;
21
19
  const deletedTip = tip || (0, _lang.getLocale)('Deleted_department');
22
20
  const department = departments.find(department => department.id === value);
@@ -15,9 +15,7 @@ var _mbEditor = _interopRequireDefault(require("./mb-editor"));
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  const _excluded = ["isMobile"];
17
17
  const DigitalSignEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
18
- let {
19
- isMobile
20
- } = _ref,
18
+ let isMobile = _ref.isMobile,
21
19
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
20
  if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
23
21
  ref: ref
@@ -18,10 +18,8 @@ var _lang = require("../../lang");
18
18
  var _utils2 = require("../../utils/utils");
19
19
  require("./index.css");
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
- const {
22
- Header,
23
- Body
24
- } = _MobileFullScreenPage.default;
21
+ const Header = _MobileFullScreenPage.default.Header,
22
+ Body = _MobileFullScreenPage.default.Body;
25
23
  class MBDigitalSignEditor extends _react.Component {
26
24
  constructor(props) {
27
25
  super(props);
@@ -87,14 +85,11 @@ class MBDigitalSignEditor extends _react.Component {
87
85
  this.state = {
88
86
  saving: false
89
87
  };
90
- const {
91
- uploadFile,
92
- config,
93
- value
94
- } = props;
95
- const {
96
- username
97
- } = config || {};
88
+ const uploadFile = props.uploadFile,
89
+ config = props.config,
90
+ value = props.value;
91
+ const _ref = config || {},
92
+ username = _ref.username;
98
93
  this.value = value || {};
99
94
  this.digitalService = new _service.default({
100
95
  uploadFile,
@@ -103,14 +98,11 @@ class MBDigitalSignEditor extends _react.Component {
103
98
  this.signatureBoard = null;
104
99
  }
105
100
  render() {
106
- const {
107
- value,
108
- config,
109
- column
110
- } = this.props;
111
- const {
112
- saving
113
- } = this.state;
101
+ const _this$props = this.props,
102
+ value = _this$props.value,
103
+ config = _this$props.config,
104
+ column = _this$props.column;
105
+ const saving = this.state.saving;
114
106
  const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
115
107
  partUrl: _utils.default.getSignImageUrl(value)
116
108
  }));
@@ -24,14 +24,12 @@ class PCDigitalSignEditor extends _react.Component {
24
24
  super(props);
25
25
  this.setPosition = () => {
26
26
  if (!this.editor) return;
27
- const {
28
- offsetLeft,
29
- offsetTop
30
- } = this.editor.parentNode;
31
- const {
32
- offsetWidth: editorWidth,
33
- offsetHeight: editorHeight
34
- } = this.editor;
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;
35
33
  let editorLeft = offsetLeft - editorWidth;
36
34
  let editorTop = offsetTop;
37
35
  if (this.props.isInModal) {
@@ -113,14 +111,11 @@ class PCDigitalSignEditor extends _react.Component {
113
111
  editorPosition: {},
114
112
  saving: false
115
113
  };
116
- const {
117
- uploadFile,
118
- config,
119
- value
120
- } = props;
121
- const {
122
- username
123
- } = config || {};
114
+ const uploadFile = props.uploadFile,
115
+ config = props.config,
116
+ value = props.value;
117
+ const _ref = config || {},
118
+ username = _ref.username;
124
119
  this.value = value || {};
125
120
  this.digitalService = new _service.default({
126
121
  uploadFile,
@@ -131,14 +126,12 @@ class PCDigitalSignEditor extends _react.Component {
131
126
  this.setPosition();
132
127
  }
133
128
  render() {
134
- const {
135
- value,
136
- config
137
- } = this.props;
138
- const {
139
- editorPosition,
140
- saving
141
- } = this.state;
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;
142
135
  const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
143
136
  partUrl: _utils.default.getSignImageUrl(value)
144
137
  }));
@@ -16,10 +16,8 @@ class DigitalService {
16
16
  this.username = props.username;
17
17
  }
18
18
  uploadSignImage(signBlob, _ref) {
19
- let {
20
- successCallback,
21
- failedCallback
22
- } = _ref;
19
+ let successCallback = _ref.successCallback,
20
+ failedCallback = _ref.failedCallback;
23
21
  if (!this.uploadFile) return;
24
22
  const name = "".concat(this.username, "-").concat(Date.now().toString(), ".png");
25
23
  const file = new File([signBlob], name, {
@@ -72,9 +72,7 @@ class SignatureBoard extends _react.Component {
72
72
  }
73
73
  };
74
74
  this.renderTips = () => {
75
- const {
76
- isEmpty
77
- } = this.state;
75
+ const isEmpty = this.state.isEmpty;
78
76
  if (!isEmpty) return null;
79
77
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
80
78
  className: "signature-board-tips",
@@ -82,11 +80,10 @@ class SignatureBoard extends _react.Component {
82
80
  });
83
81
  };
84
82
  this.renderSignImage = () => {
85
- const {
86
- isEmpty,
87
- signImageUrl,
88
- loadingSignImage
89
- } = this.state;
83
+ const _this$state = this.state,
84
+ isEmpty = _this$state.isEmpty,
85
+ signImageUrl = _this$state.signImageUrl,
86
+ loadingSignImage = _this$state.loadingSignImage;
90
87
  if (isEmpty || !signImageUrl) return null;
91
88
  let img = new Image();
92
89
  img.src = signImageUrl;
@@ -14,10 +14,8 @@ class DigitalSignUtils {
14
14
  return (0, _dtableUtils.getDigitalSignImageUrl)(sign);
15
15
  }
16
16
  static getUpdatedSign(_ref) {
17
- let {
18
- username,
19
- sign_image_url
20
- } = _ref;
17
+ let username = _ref.username,
18
+ sign_image_url = _ref.sign_image_url;
21
19
  const time = (0, _dayjs.default)().utc().format('YYYY-MM-DDTHH:mm:ss.SSSZ');
22
20
  return {
23
21
  username,
@@ -18,10 +18,9 @@ class DigitalSignFormatter extends _react.Component {
18
18
  constructor(props) {
19
19
  super(props);
20
20
  this.getSignImages = () => {
21
- const {
22
- value,
23
- config
24
- } = this.props;
21
+ const _this$props = this.props,
22
+ value = _this$props.value,
23
+ config = _this$props.config;
25
24
  return [(0, _utils.getDigitalSignImageUrl)(value, config)].filter(Boolean);
26
25
  };
27
26
  this.onClickSignImage = index => {
@@ -57,20 +56,18 @@ class DigitalSignFormatter extends _react.Component {
57
56
  };
58
57
  }
59
58
  render() {
60
- const {
61
- containerClassName,
62
- readOnly,
63
- config,
64
- isSample,
65
- renderItem
66
- } = this.props;
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;
67
65
  const className = (0, _classnames.default)('dtable-ui cell-formatter-container digital-sign-formatter', containerClassName);
68
66
  const signImages = this.getSignImages();
69
67
  if (signImages.length === 0) return null;
70
- const {
71
- isPreviewSignImage,
72
- largeSignImageIndex
73
- } = this.state;
68
+ const _this$state = this.state,
69
+ isPreviewSignImage = _this$state.isPreviewSignImage,
70
+ largeSignImageIndex = _this$state.largeSignImageIndex;
74
71
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
75
72
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
76
73
  className: className,
@@ -9,11 +9,10 @@ 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 {
13
- server,
14
- workspaceID,
15
- dtableUuid
16
- } = config || {};
12
+ const _ref = config || {},
13
+ server = _ref.server,
14
+ workspaceID = _ref.workspaceID,
15
+ dtableUuid = _ref.dtableUuid;
17
16
  if (server && (workspaceID || workspaceID === 0) && dtableUuid) {
18
17
  return "".concat(server, "/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(url);
19
18
  }
@@ -23,11 +23,10 @@ class DurationEditor extends _react.default.Component {
23
23
  });
24
24
  };
25
25
  this.onKeyDown = event => {
26
- let {
27
- selectionStart,
28
- selectionEnd,
29
- value
30
- } = event.currentTarget;
26
+ let _event$currentTarget = event.currentTarget,
27
+ selectionStart = _event$currentTarget.selectionStart,
28
+ selectionEnd = _event$currentTarget.selectionEnd,
29
+ value = _event$currentTarget.value;
31
30
  if (event.keyCode === _constants.KeyCodes.Enter) {
32
31
  event.preventDefault();
33
32
  this.onBlur();
@@ -37,9 +36,7 @@ class DurationEditor extends _react.default.Component {
37
36
  }
38
37
  };
39
38
  this.getValue = () => {
40
- const {
41
- column
42
- } = this.props;
39
+ const column = this.props.column;
43
40
  const newDuration = (0, _dtableUtils.formatDurationToNumber)(this.getInputNode().value, column.data);
44
41
  return newDuration;
45
42
  };
@@ -51,11 +48,10 @@ class DurationEditor extends _react.default.Component {
51
48
  return this.input.querySelector('input:not([type=hidden])');
52
49
  };
53
50
  this.onBlur = () => {
54
- const {
55
- isInModal,
56
- onBlur,
57
- onCommit
58
- } = this.props;
51
+ const _this$props = this.props,
52
+ isInModal = _this$props.isInModal,
53
+ onBlur = _this$props.onBlur,
54
+ onCommit = _this$props.onCommit;
59
55
  isInModal ? onCommit(this.getValue()) : onBlur();
60
56
  };
61
57
  this.setInputRef = input => {
@@ -68,36 +64,30 @@ class DurationEditor extends _react.default.Component {
68
64
  this.onCut = e => {
69
65
  e.stopPropagation();
70
66
  };
71
- let {
72
- value: _value,
73
- column: _column
74
- } = props;
67
+ let _value = props.value,
68
+ _column = props.column;
75
69
  this.initValue = _value || _value === 0 ? (0, _dtableUtils.getDurationDisplayString)(_value, _column.data) : '';
76
70
  this.state = {
77
71
  value: this.initValue
78
72
  };
79
73
  }
80
74
  componentDidMount() {
81
- const {
82
- isInModal,
83
- autoFocus,
84
- readOnly
85
- } = this.props;
75
+ const _this$props2 = this.props,
76
+ isInModal = _this$props2.isInModal,
77
+ autoFocus = _this$props2.autoFocus,
78
+ readOnly = _this$props2.readOnly;
86
79
  if (isInModal && autoFocus && !readOnly) {
87
80
  this.input.focus();
88
81
  }
89
82
  }
90
83
  render() {
91
- const {
92
- column,
93
- isInModal,
94
- className,
95
- readOnly
96
- } = this.props;
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;
97
89
  const data = column.data || {};
98
- const {
99
- duration_format
100
- } = data;
90
+ const duration_format = data.duration_format;
101
91
  const style = isInModal ? {
102
92
  textAlign: 'left',
103
93
  width: '320px'
@@ -12,11 +12,10 @@ require("./index.css");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  class DurationFormatter extends _react.default.Component {
14
14
  render() {
15
- let {
16
- value,
17
- containerClassName,
18
- format
19
- } = this.props;
15
+ let _this$props = this.props,
16
+ value = _this$props.value,
17
+ containerClassName = _this$props.containerClassName,
18
+ format = _this$props.format;
20
19
  let classname = (0, _classnames.default)('dtable-ui cell-formatter-container duration-formatter', containerClassName);
21
20
  const durationDisplayString = (0, _dtableUtils.getDurationDisplayString)(value, {
22
21
  duration_format: format
@@ -10,9 +10,7 @@ require("./index.css");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  class EditEditorButton extends _react.default.Component {
12
12
  render() {
13
- const {
14
- text
15
- } = this.props;
13
+ const text = this.props.text;
16
14
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
17
15
  className: "dtable-ui-editor-button",
18
16
  onClick: this.props.onClick,
@@ -11,10 +11,9 @@ require("./index.css");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  class EmailFormatter extends _react.default.Component {
13
13
  render() {
14
- const {
15
- containerClassName,
16
- value
17
- } = this.props;
14
+ const _this$props = this.props,
15
+ containerClassName = _this$props.containerClassName,
16
+ value = _this$props.value;
18
17
  let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter', containerClassName);
19
18
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
20
19
  title: value,
@@ -1,25 +1,27 @@
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _DTableSwitch = _interopRequireDefault(require("../DTableSwitch"));
11
12
  var _DTableColumnIcon = _interopRequireDefault(require("../DTableColumnIcon"));
12
13
  var _jsxRuntime = require("react/jsx-runtime");
13
14
  function FieldItem(_ref) {
14
- let {
15
- field,
16
- isCollapsed,
17
- onClickField,
18
- onMoveField
19
- } = _ref;
15
+ let field = _ref.field,
16
+ isCollapsed = _ref.isCollapsed,
17
+ onClickField = _ref.onClickField,
18
+ onMoveField = _ref.onMoveField;
20
19
  let enteredCounter = 0;
21
20
  const fieldItemRef = (0, _react.useRef)(null);
22
- const [isItemDropTipShow, setDropTipShow] = (0, _react.useState)(false);
21
+ const _useState = (0, _react.useState)(false),
22
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
23
+ isItemDropTipShow = _useState2[0],
24
+ setDropTipShow = _useState2[1];
23
25
  const handleClickField = e => {
24
26
  e.nativeEvent.stopImmediatePropagation();
25
27
  const value = e.target.checked;
@@ -63,10 +65,8 @@ function FieldItem(_ref) {
63
65
  onMoveField(droppedColumnKey, field.key);
64
66
  };
65
67
  const placeholder = () => {
66
- const {
67
- type,
68
- data
69
- } = field;
68
+ const type = field.type,
69
+ data = field.data;
70
70
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
71
71
  className: "field-switch",
72
72
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
10
11
  var _react = _interopRequireWildcard(require("react"));
11
12
  var _reactstrap = require("reactstrap");
12
13
  var _reactTransitionGroup = require("react-transition-group");
@@ -17,16 +18,17 @@ const FIELD_ITEM_HEIGHT = 30;
17
18
  const BANNER_HEIGHT = 24;
18
19
  const DURATION = 300;
19
20
  function FieldDisplaySetting(_ref) {
20
- let {
21
- fields,
22
- textProperties,
23
- fieldAllShown,
24
- onClickField,
25
- onMoveField,
26
- onToggleFieldsVisibility
27
- } = _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;
28
27
  const nodeRef = (0, _react.useRef)(null);
29
- const [isCollapsed, setCollapsed] = (0, _react.useState)(true);
28
+ const _useState = (0, _react.useState)(true),
29
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
30
+ isCollapsed = _useState2[0],
31
+ setCollapsed = _useState2[1];
30
32
  const expandAllFields = () => {
31
33
  setCollapsed(!isCollapsed);
32
34
  };
@@ -16,9 +16,7 @@ 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 {
20
- isMobile
21
- } = _ref,
19
+ let isMobile = _ref.isMobile,
22
20
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
23
21
  if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
24
22
  ref: ref
@@ -19,9 +19,7 @@ class FilePreviewer extends _react.default.Component {
19
19
  this.props.downloadFile(downloadUrl);
20
20
  };
21
21
  this.deleteFile = () => {
22
- const {
23
- fileItem
24
- } = this.props;
22
+ const fileItem = this.props.fileItem;
25
23
  this.props.deleteFile(fileItem);
26
24
  };
27
25
  this.closeRenameFile = () => {
@@ -63,11 +61,9 @@ class FilePreviewer extends _react.default.Component {
63
61
  showOperationSheet: false
64
62
  };
65
63
  this.operations = [];
66
- const {
67
- renameFile,
68
- downloadFile,
69
- deleteFile
70
- } = props;
64
+ const renameFile = props.renameFile,
65
+ downloadFile = props.downloadFile,
66
+ deleteFile = props.deleteFile;
71
67
  if (renameFile) {
72
68
  this.operations.push(_MobileOperationSheet.OPERATION_TYPE.RENAME);
73
69
  }
@@ -79,16 +75,12 @@ class FilePreviewer extends _react.default.Component {
79
75
  }
80
76
  }
81
77
  render() {
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);
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;
92
84
  const uploadTime = (0, _utils.getFileUploadTime)(fileItem);
93
85
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
94
86
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -5,6 +5,7 @@ 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"));
8
9
  var _react = _interopRequireDefault(require("react"));
9
10
  var _classnames = _interopRequireDefault(require("classnames"));
10
11
  var _utils = require("../../../utils/utils");
@@ -17,13 +18,12 @@ class MBFilesPreviewer extends _react.default.Component {
17
18
  constructor() {
18
19
  super(...arguments);
19
20
  this.downloadImage = imageItemUrl => {
20
- const {
21
- value
22
- } = this.props;
21
+ const value = this.props.value;
23
22
  const file = value.find(v => v.url === imageItemUrl);
24
23
  if (!file) return;
25
24
  this.props.getDownLoadFiles([file], _ref => {
26
- let [dFile] = _ref;
25
+ let _ref2 = (0, _slicedToArray2.default)(_ref, 1),
26
+ dFile = _ref2[0];
27
27
  dFile && (0, _utils.downloadFile)(dFile);
28
28
  });
29
29
  };
@@ -33,10 +33,9 @@ class MBFilesPreviewer extends _react.default.Component {
33
33
  };
34
34
  }
35
35
  render() {
36
- const {
37
- value,
38
- getDownLoadFiles
39
- } = this.props;
36
+ const _this$props = this.props,
37
+ value = _this$props.value,
38
+ getDownLoadFiles = _this$props.getDownLoadFiles;
40
39
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
41
40
  className: (0, _classnames.default)('dtable-ui-file-editor-previewer dtable-ui-mobile-file-editor-previewer', {
42
41
  'mt-0': value.length === 0
@@ -42,10 +42,9 @@ class FileDropdownMenu extends _react.default.Component {
42
42
  };
43
43
  }
44
44
  render() {
45
- const {
46
- onRenameFile,
47
- onDeleteFile
48
- } = this.props;
45
+ const _this$props = this.props,
46
+ onRenameFile = _this$props.onRenameFile,
47
+ onDeleteFile = _this$props.onDeleteFile;
49
48
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Dropdown, {
50
49
  isOpen: this.state.isItemMenuShow,
51
50
  toggle: this.onDropdownToggleClick,