dtable-ui-component 6.0.126 → 7.0.0-xia.1

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 (282) hide show
  1. package/lib/ActionSheet/index.js +16 -14
  2. package/lib/ActivityIndicator/index.js +8 -7
  3. package/lib/AsyncUserSelect/index.js +19 -40
  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/DTableCustomizeCollaboratorSelect/index.js +20 -17
  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 +50 -34
  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 +56 -35
  50. package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
  51. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
  52. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
  53. package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
  54. package/lib/DTableGroupSelect/index.js +15 -11
  55. package/lib/DTableGroupSelect/select-option-group.js +32 -23
  56. package/lib/DTableIcon/index.js +7 -6
  57. package/lib/DTableIcon/svg-icon.js +7 -5
  58. package/lib/DTableModalHeader/index.css +3 -20
  59. package/lib/DTableModalHeader/index.js +3 -1
  60. package/lib/DTablePopover/index.js +15 -11
  61. package/lib/DTableRadio/index.js +9 -10
  62. package/lib/DTableRadioGroup/index.js +17 -8
  63. package/lib/DTableSearchInput/index.js +29 -19
  64. package/lib/DTableSelect/dtable-select-label.js +5 -6
  65. package/lib/DTableSelect/index.js +22 -21
  66. package/lib/DTableSelect/utils.js +15 -7
  67. package/lib/DTableSubDropdownMenu/index.js +10 -8
  68. package/lib/DTableSubDropdownToggle/index.js +12 -12
  69. package/lib/DTableSwitch/index.js +11 -12
  70. package/lib/DTableToolTip/index.js +8 -7
  71. package/lib/DateEditor/index.js +15 -20
  72. package/lib/DateEditor/mb-editor/index.js +31 -18
  73. package/lib/DateEditor/pc-editor.js +45 -26
  74. package/lib/DateFormatter/index.js +5 -4
  75. package/lib/DatePicker/index.js +15 -9
  76. package/lib/DatePicker/utils.js +3 -1
  77. package/lib/DeleteTip/index.js +6 -5
  78. package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
  79. package/lib/DepartmentSelectFilter/index.js +8 -6
  80. package/lib/DepartmentSingleSelectEditor/index.js +3 -1
  81. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
  82. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
  83. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
  84. package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
  85. package/lib/DigitalSignEditor/index.js +3 -1
  86. package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
  87. package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
  88. package/lib/DigitalSignEditor/service.js +4 -2
  89. package/lib/DigitalSignEditor/signature-board/index.js +8 -5
  90. package/lib/DigitalSignEditor/utils.js +4 -2
  91. package/lib/DigitalSignFormatter/index.js +15 -12
  92. package/lib/DigitalSignFormatter/utils.js +5 -4
  93. package/lib/DurationEditor/index.js +31 -21
  94. package/lib/DurationFormatter/index.js +5 -4
  95. package/lib/EditEditorButton/index.js +3 -1
  96. package/lib/EmailFormatter/index.js +4 -3
  97. package/lib/FieldDisplaySetting/field-item.js +12 -12
  98. package/lib/FieldDisplaySetting/index.js +10 -12
  99. package/lib/FileEditor/files-previewer/index.js +3 -1
  100. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
  101. package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
  102. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
  103. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
  104. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +21 -14
  105. package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
  106. package/lib/FileEditor/index.js +3 -1
  107. package/lib/FileEditor/mb-editor/index.js +20 -28
  108. package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
  109. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
  110. package/lib/FileEditor/pc-editor/index.js +27 -19
  111. package/lib/FileFormatter/index.js +19 -26
  112. package/lib/FileItemFormatter/index.js +9 -6
  113. package/lib/FileUploader/index.js +45 -28
  114. package/lib/FormulaFormatter/index.js +29 -15
  115. package/lib/GeolocationEditor/index.js +12 -11
  116. package/lib/GeolocationEditor/map-editor-utils.js +15 -17
  117. package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
  118. package/lib/GeolocationEditor/mb-editor/index.js +6 -4
  119. package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
  120. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
  121. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
  122. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
  123. package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
  124. package/lib/GeolocationEditor/pc-editor/country-editor.js +23 -10
  125. package/lib/GeolocationEditor/pc-editor/index.js +20 -12
  126. package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
  127. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
  128. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
  129. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
  130. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
  131. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
  132. package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
  133. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
  134. package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
  135. package/lib/GeolocationFormatter/index.js +5 -4
  136. package/lib/HtmlLongTextFormatter/index.js +12 -4
  137. package/lib/Icon/index.js +5 -3
  138. package/lib/IconButton/index.js +6 -4
  139. package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
  140. package/lib/ImageEditor/images-previewer/index.js +9 -3
  141. package/lib/ImageEditor/index.js +3 -1
  142. package/lib/ImageEditor/mb-editor/index.js +20 -28
  143. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
  144. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +3 -1
  145. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
  146. package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
  147. package/lib/ImageEditor/pc-editor/index.js +16 -11
  148. package/lib/ImageFormatter/images-lazy-load.js +11 -19
  149. package/lib/ImageFormatter/index.js +13 -11
  150. package/lib/ImagePreviewerLightbox/index.js +13 -15
  151. package/lib/ImageThumbnail/index.js +13 -10
  152. package/lib/InputItem/custom-input.js +46 -26
  153. package/lib/InputItem/custom-keyboard.js +18 -15
  154. package/lib/InputItem/index.js +50 -34
  155. package/lib/InputItem/input.js +4 -2
  156. package/lib/LastModifierFormatter/index.js +8 -6
  157. package/lib/LinkEditor/index.js +53 -33
  158. package/lib/LinkEditor/link-editor-option.js +4 -3
  159. package/lib/LinkEditor/mb-popover/index.js +22 -9
  160. package/lib/LinkEditor/pc-popover/index.js +10 -5
  161. package/lib/LinkFormatter/index.js +37 -21
  162. package/lib/List/index.js +8 -6
  163. package/lib/List/list-item.js +28 -22
  164. package/lib/LongTextFormatter/index.js +5 -4
  165. package/lib/MBEditorHeader/index.js +8 -7
  166. package/lib/MTimeFormatter/index.js +4 -3
  167. package/lib/MobileFullScreenPage/body/index.js +5 -3
  168. package/lib/MobileFullScreenPage/header/index.js +6 -4
  169. package/lib/MobileFullScreenPage/index.js +11 -13
  170. package/lib/MobileModal/index.js +3 -1
  171. package/lib/MobileOperationSheet/index.js +8 -7
  172. package/lib/MobileSelector/empty/index.js +3 -1
  173. package/lib/MobileSelector/index.js +7 -5
  174. package/lib/MobileSelector/option/index.js +5 -3
  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/modal.js +15 -14
  179. package/lib/Modal/prompt.js +4 -4
  180. package/lib/MultipleSelectEditor/index.js +3 -1
  181. package/lib/MultipleSelectFormatter/index.js +8 -6
  182. package/lib/NotificationPopover/index.js +5 -4
  183. package/lib/NumberEditor/index.js +21 -12
  184. package/lib/NumberFormatter/index.js +5 -4
  185. package/lib/PhoneNumberLink/index.js +4 -2
  186. package/lib/Picker/AbstractPicker.js +27 -23
  187. package/lib/Popover/index.js +4 -3
  188. package/lib/Popover/item.js +9 -7
  189. package/lib/Progress/index.js +8 -9
  190. package/lib/Radio/Radio.js +8 -4
  191. package/lib/Radio/RadioItem.js +12 -8
  192. package/lib/RateFormatter/index.js +13 -13
  193. package/lib/RoleStatusEditor/index.js +17 -18
  194. package/lib/RowExpandDialog/body/index.js +49 -32
  195. package/lib/RowExpandDialog/column-content/index.js +9 -5
  196. package/lib/RowExpandDialog/header/index.js +8 -6
  197. package/lib/RowExpandDialog/index.js +34 -49
  198. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
  199. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
  200. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
  201. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
  202. package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
  203. package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
  204. package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
  205. package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
  206. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
  207. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
  208. package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
  209. package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
  210. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +19 -9
  211. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
  212. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
  213. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
  214. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
  215. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
  216. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
  217. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
  218. package/lib/RowExpandEditor/index.js +8 -4
  219. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
  220. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
  221. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
  222. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +19 -11
  223. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
  224. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
  225. package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
  226. package/lib/RowExpandEditor/rate-editor/mb-editor.js +25 -12
  227. package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
  228. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
  229. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
  230. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
  231. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
  232. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +13 -5
  233. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
  234. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
  235. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
  236. package/lib/RowExpandFormatter/email-formatter/index.js +7 -4
  237. package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
  238. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
  239. package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
  240. package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
  241. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
  242. package/lib/RowExpandFormatter/index.js +41 -27
  243. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
  244. package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
  245. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
  246. package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
  247. package/lib/RowExpandFormatter/text/index.js +5 -4
  248. package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
  249. package/lib/RowExpandView/body/index.js +35 -22
  250. package/lib/RowExpandView/column-content/index.js +7 -3
  251. package/lib/RowExpandView/index.js +30 -42
  252. package/lib/SelectItem/index.js +8 -6
  253. package/lib/SelectOptionGroup/index.js +40 -30
  254. package/lib/SelectedDepartments/index.js +9 -7
  255. package/lib/SimpleLongTextFormatter/index.js +16 -10
  256. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
  257. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
  258. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
  259. package/lib/SingleSelectEditor/index.js +3 -1
  260. package/lib/SingleSelectFormatter/index.js +9 -8
  261. package/lib/TabBar/Tab.js +16 -14
  262. package/lib/TabBar/index.js +21 -18
  263. package/lib/Tabs/index.js +3 -1
  264. package/lib/TextEditor/index.js +23 -14
  265. package/lib/TextFormatter/index.js +4 -3
  266. package/lib/TextareaItem/index.js +26 -19
  267. package/lib/Toast/index.js +4 -3
  268. package/lib/UrlFormatter/index.js +4 -3
  269. package/lib/common/editor-base.js +12 -7
  270. package/lib/hooks/common-hooks.js +4 -2
  271. package/lib/select-editor/index.js +3 -1
  272. package/lib/select-editor/mb-editor/index.js +28 -17
  273. package/lib/select-editor/pc-editor/index.js +42 -27
  274. package/lib/toaster/alert.js +7 -6
  275. package/lib/toaster/toast.js +3 -2
  276. package/lib/toaster/toastManager.js +4 -2
  277. package/lib/utils/cell.js +11 -8
  278. package/lib/utils/column-utils.js +14 -8
  279. package/lib/utils/departments.js +3 -1
  280. package/lib/utils/url.js +31 -24
  281. package/lib/utils/utils.js +6 -2
  282. package/package.json +1 -1
@@ -15,7 +15,9 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
15
15
  constructor(props) {
16
16
  super(props);
17
17
  this.onCommit = value => {
18
- const onCommit = this.props.onCommit;
18
+ const {
19
+ onCommit
20
+ } = this.props;
19
21
  this.setState({
20
22
  value
21
23
  }, () => {
@@ -27,10 +29,12 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
27
29
  updated[this.props.column.key] = this.state.value;
28
30
  return updated;
29
31
  };
30
- const column = props.column,
31
- isInModal = props.isInModal,
32
- _value = props.value,
33
- height = props.height;
32
+ const {
33
+ column,
34
+ isInModal,
35
+ value: _value,
36
+ height
37
+ } = props;
34
38
  const editorWidth = column.width > 300 ? column.width : 300;
35
39
  const data = column.data || {};
36
40
  this.state = {
@@ -46,9 +50,10 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
46
50
  componentDidMount() {
47
51
  if (this.isRowExpand) {
48
52
  let menuStyle = {};
49
- const _this$outerRef$getBou = this.outerRef.getBoundingClientRect(),
50
- top = _this$outerRef$getBou.top,
51
- left = _this$outerRef$getBou.left;
53
+ const {
54
+ top,
55
+ left
56
+ } = this.outerRef.getBoundingClientRect();
52
57
  if (top > 330) {
53
58
  menuStyle.top = -200;
54
59
  }
@@ -61,11 +66,12 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
61
66
  }
62
67
  }
63
68
  render() {
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;
69
+ const {
70
+ target,
71
+ column,
72
+ userDepartmentIdsMap,
73
+ departments
74
+ } = this.props;
69
75
  const dom = /*#__PURE__*/(0, _jsxRuntime.jsx)(_departmentSingleSelect.default, {
70
76
  column: column,
71
77
  value: this.state.value,
@@ -11,10 +11,12 @@ var _lang = require("../lang");
11
11
  require("./index.css");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function DepartmentSingleSelectFormatter(props) {
14
- const value = props.value,
15
- departments = props.departments,
16
- containerClassName = props.containerClassName,
17
- tip = props.tip;
14
+ const {
15
+ value,
16
+ departments,
17
+ containerClassName,
18
+ tip
19
+ } = props;
18
20
  if (!value || !Array.isArray(departments)) return null;
19
21
  const deletedTip = tip || (0, _lang.getLocale)('Deleted_department');
20
22
  const department = departments.find(department => department.id === value);
@@ -15,7 +15,9 @@ 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 isMobile = _ref.isMobile,
18
+ let {
19
+ isMobile
20
+ } = _ref,
19
21
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
20
22
  if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
21
23
  ref: ref
@@ -18,8 +18,10 @@ 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 Header = _MobileFullScreenPage.default.Header,
22
- Body = _MobileFullScreenPage.default.Body;
21
+ const {
22
+ Header,
23
+ Body
24
+ } = _MobileFullScreenPage.default;
23
25
  class MBDigitalSignEditor extends _react.Component {
24
26
  constructor(props) {
25
27
  super(props);
@@ -85,11 +87,14 @@ class MBDigitalSignEditor extends _react.Component {
85
87
  this.state = {
86
88
  saving: false
87
89
  };
88
- const uploadFile = props.uploadFile,
89
- config = props.config,
90
- value = props.value;
91
- const _ref = config || {},
92
- username = _ref.username;
90
+ const {
91
+ uploadFile,
92
+ config,
93
+ value
94
+ } = props;
95
+ const {
96
+ username
97
+ } = config || {};
93
98
  this.value = value || {};
94
99
  this.digitalService = new _service.default({
95
100
  uploadFile,
@@ -98,11 +103,14 @@ class MBDigitalSignEditor extends _react.Component {
98
103
  this.signatureBoard = null;
99
104
  }
100
105
  render() {
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;
106
+ const {
107
+ value,
108
+ config,
109
+ column
110
+ } = this.props;
111
+ const {
112
+ saving
113
+ } = this.state;
106
114
  const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
107
115
  partUrl: _utils.default.getSignImageUrl(value)
108
116
  }));
@@ -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
  };
@@ -63,7 +61,7 @@ function FieldDisplaySetting(_ref) {
63
61
  className: "mb-0",
64
62
  children: textProperties.titleValue
65
63
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
66
- className: "dtable-font dtable-icon-right expand-button ".concat(isCollapsed ? '' : 'revolving')
64
+ className: "seatable-icon-btn sm dtable-font dtable-icon-right expand-button ".concat(isCollapsed ? '' : 'revolving')
67
65
  })]
68
66
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.Transition, {
69
67
  nodeRef: nodeRef,
@@ -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,