dtable-ui-component 6.0.110 → 6.0.111-amk.13

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 (184) hide show
  1. package/lib/ActionSheet/index.js +42 -35
  2. package/lib/ActivityIndicator/index.js +9 -9
  3. package/lib/AsyncUserSelect/index.js +3 -3
  4. package/lib/Badge/index.js +27 -31
  5. package/lib/CheckboxEditor/index.js +15 -14
  6. package/lib/CollaboratorEditor/index.js +16 -15
  7. package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
  8. package/lib/CollapsibleSettingLayout/index.js +1 -1
  9. package/lib/Comment/body/comment.js +1 -1
  10. package/lib/Comment/body/index.js +7 -9
  11. package/lib/Comment/footer/index.js +1 -1
  12. package/lib/Comment/footer/input/index.js +5 -5
  13. package/lib/Comment/footer/input/participant/index.js +1 -1
  14. package/lib/Comment/footer/participants/participant-select/index.js +2 -2
  15. package/lib/Comment/utils/utilities.js +1 -1
  16. package/lib/DTableColorPicker/ColorPickerPortal/index.js +8 -6
  17. package/lib/DTableColorPicker/index.js +13 -12
  18. package/lib/DTableColorPicker/utils.js +1 -1
  19. package/lib/DTableCommonAddTool/index.js +2 -2
  20. package/lib/DTableFiltersPopover/index.js +1 -1
  21. package/lib/DTableFiltersPopover/utils/index.js +1 -1
  22. package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
  23. package/lib/DTableFiltersPopover/widgets/filter-item.js +1 -1
  24. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
  25. package/lib/DTableFiltersPopover/widgets/rate-item.js +5 -5
  26. package/lib/DTableGroupSelect/select-option-group.js +1 -1
  27. package/lib/DTableIcon/index.js +4 -4
  28. package/lib/DTableIcon/svg-icon.js +4 -4
  29. package/lib/DTableModalHeader/index.js +6 -8
  30. package/lib/DTableRadioGroup/index.js +3 -3
  31. package/lib/DTableSelect/dtable-select-label.js +1 -1
  32. package/lib/DTableSelect/utils.js +55 -36
  33. package/lib/DateEditor/index.js +13 -10
  34. package/lib/DateEditor/pc-editor.js +1 -1
  35. package/lib/DatePicker/utils.js +4 -4
  36. package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
  37. package/lib/DepartmentSelectFilter/index.js +5 -2
  38. package/lib/DepartmentSingleSelectEditor/index.js +15 -14
  39. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
  40. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +6 -6
  41. package/lib/DigitalSignEditor/index.js +15 -14
  42. package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
  43. package/lib/DigitalSignEditor/pc-editor/index.js +7 -6
  44. package/lib/DigitalSignEditor/service.js +1 -1
  45. package/lib/DigitalSignEditor/signature-board/index.js +2 -2
  46. package/lib/DigitalSignFormatter/utils.js +1 -1
  47. package/lib/Drawer/index.js +3 -2
  48. package/lib/FieldDisplaySetting/field-item.js +1 -1
  49. package/lib/FieldDisplaySetting/index.js +11 -9
  50. package/lib/FileEditor/files-previewer/index.js +15 -14
  51. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
  52. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
  53. package/lib/FileEditor/index.js +15 -14
  54. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
  55. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
  56. package/lib/FileEditor/pc-editor/index.js +3 -3
  57. package/lib/FileFormatter/index.js +5 -3
  58. package/lib/FileItemFormatter/index.js +1 -1
  59. package/lib/FileUploader/index.js +1 -1
  60. package/lib/FormulaFormatter/index.js +15 -9
  61. package/lib/GeolocationEditor/index.js +23 -19
  62. package/lib/GeolocationEditor/map-editor-utils.js +10 -6
  63. package/lib/GeolocationEditor/mb-editor/index.js +27 -23
  64. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +9 -6
  65. package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
  66. package/lib/GeolocationEditor/pc-editor/index.js +21 -15
  67. package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
  68. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +13 -9
  69. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +9 -6
  70. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +24 -7
  71. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +20 -3
  72. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
  73. package/lib/GeolocationEditor/pc-editor/province-editor.js +2 -2
  74. package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
  75. package/lib/HtmlLongTextFormatter/index.js +1 -1
  76. package/lib/Icon/index.js +13 -17
  77. package/lib/Icon/load-sprite.js +13 -2
  78. package/lib/IconButton/index.js +11 -14
  79. package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
  80. package/lib/ImageEditor/index.js +15 -14
  81. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
  82. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
  83. package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
  84. package/lib/ImageFormatter/index.js +1 -1
  85. package/lib/ImagePreviewerLightbox/index.js +20 -17
  86. package/lib/ImageThumbnail/index.js +2 -2
  87. package/lib/InputItem/custom-input.js +9 -9
  88. package/lib/InputItem/custom-keyboard.js +34 -37
  89. package/lib/InputItem/index.js +52 -49
  90. package/lib/InputItem/input.js +9 -13
  91. package/lib/LinkEditor/pc-popover/index.js +3 -2
  92. package/lib/List/index.js +17 -21
  93. package/lib/List/list-item.js +50 -52
  94. package/lib/MBEditorHeader/index.js +1 -1
  95. package/lib/MobileFullScreenPage/body/index.js +1 -1
  96. package/lib/MobileFullScreenPage/header/index.js +4 -4
  97. package/lib/MobileFullScreenPage/index.js +1 -1
  98. package/lib/MobileModal/index.js +7 -10
  99. package/lib/Modal/alert.js +2 -2
  100. package/lib/Modal/modal.js +28 -31
  101. package/lib/Modal/prompt.js +10 -10
  102. package/lib/MultipleSelectEditor/index.js +6 -8
  103. package/lib/MultipleSelectFormatter/index.js +1 -1
  104. package/lib/PhoneNumberLink/index.js +1 -1
  105. package/lib/Picker/AbstractPicker.js +26 -28
  106. package/lib/Popover/index.js +9 -12
  107. package/lib/Popover/item.js +22 -26
  108. package/lib/Progress/index.js +10 -8
  109. package/lib/Radio/Radio.js +13 -15
  110. package/lib/Radio/RadioItem.js +18 -18
  111. package/lib/RateFormatter/index.js +2 -2
  112. package/lib/RoleStatusEditor/index.js +1 -1
  113. package/lib/RowExpand/index.js +7 -6
  114. package/lib/RowExpandDialog/body/index.js +14 -14
  115. package/lib/RowExpandDialog/column-content/index.js +1 -1
  116. package/lib/RowExpandDialog/header/index.js +4 -3
  117. package/lib/RowExpandDialog/index.js +43 -32
  118. package/lib/RowExpandEditor/add-btn/index.js +7 -6
  119. package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
  120. package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
  121. package/lib/RowExpandEditor/date-editor/index.js +7 -6
  122. package/lib/RowExpandEditor/department-editor/index.js +7 -6
  123. package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
  124. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
  125. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
  126. package/lib/RowExpandEditor/duration-editor/index.js +7 -6
  127. package/lib/RowExpandEditor/email-editor/index.js +7 -6
  128. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
  129. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
  130. package/lib/RowExpandEditor/file-editor/index.js +7 -6
  131. package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
  132. package/lib/RowExpandEditor/image-editor/index.js +7 -6
  133. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
  134. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
  135. package/lib/RowExpandEditor/index.js +11 -10
  136. package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
  137. package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
  138. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
  139. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
  140. package/lib/RowExpandEditor/number-editor/index.js +7 -6
  141. package/lib/RowExpandEditor/rate-editor/index.js +7 -6
  142. package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
  143. package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
  144. package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
  145. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
  146. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
  147. package/lib/RowExpandEditor/text-editor/index.js +7 -6
  148. package/lib/RowExpandEditor/url-editor/index.js +7 -6
  149. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
  150. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
  151. package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
  152. package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
  153. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
  154. package/lib/RowExpandFormatter/formula-formatter/index.js +17 -11
  155. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
  156. package/lib/RowExpandFormatter/index.js +11 -7
  157. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
  158. package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
  159. package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
  160. package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
  161. package/lib/RowExpandView/body/index.js +13 -15
  162. package/lib/RowExpandView/index.js +39 -28
  163. package/lib/SelectOptionGroup/index.js +1 -1
  164. package/lib/SelectedDepartments/index.js +3 -3
  165. package/lib/SimpleLongTextFormatter/index.js +2 -2
  166. package/lib/SingleSelectEditor/index.js +6 -8
  167. package/lib/TabBar/Tab.js +10 -10
  168. package/lib/TabBar/index.js +7 -6
  169. package/lib/Tabs/index.js +10 -9
  170. package/lib/TextareaItem/index.js +43 -45
  171. package/lib/Toast/index.js +5 -5
  172. package/lib/formatterConfig/index.js +3 -3
  173. package/lib/select-editor/index.js +15 -14
  174. package/lib/select-editor/pc-editor/index.js +5 -5
  175. package/lib/toaster/alert.js +1 -1
  176. package/lib/toaster/toast.js +1 -1
  177. package/lib/toaster/toastManager.js +12 -14
  178. package/lib/toaster/toaster.js +12 -9
  179. package/lib/utils/class.js +3 -3
  180. package/lib/utils/departments.js +3 -4
  181. package/lib/utils/getLocale.js +11 -5
  182. package/lib/utils/object-utils.js +5 -4
  183. package/lib/utils/url.js +4 -4
  184. package/package.json +3 -3
@@ -5,7 +5,6 @@ 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
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _reactstrap = require("reactstrap");
11
10
  var _filesPreviewer = _interopRequireDefault(require("../files-previewer"));
@@ -207,10 +206,11 @@ class PCFileEditor extends _react.default.Component {
207
206
  name,
208
207
  url
209
208
  } = res.data;
210
- fileItem = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, fileItem), {}, {
209
+ fileItem = {
210
+ ...fileItem,
211
211
  name,
212
212
  url
213
- });
213
+ };
214
214
  newValue[index] = fileItem;
215
215
  this.setState({
216
216
  value: newValue
@@ -23,7 +23,8 @@ const FileFormatter = _ref => {
23
23
  onOpenFile,
24
24
  server,
25
25
  workspaceID,
26
- dtableUuid
26
+ dtableUuid,
27
+ downloadImage
27
28
  } = _ref;
28
29
  const [largeImageIndex, setLargeImageIndex] = (0, _react.useState)(-1);
29
30
  const [fileImageUrlList, setFileImageUrlList] = (0, _react.useState)([]);
@@ -89,7 +90,7 @@ const FileFormatter = _ref => {
89
90
  file: item
90
91
  }), value.length !== 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
91
92
  className: "file-item-count",
92
- children: "+".concat(value.length)
93
+ children: `+${value.length}`
93
94
  })]
94
95
  });
95
96
  }
@@ -120,7 +121,8 @@ const FileFormatter = _ref => {
120
121
  imageIndex: largeImageIndex,
121
122
  closeImagePopup: hideLargeImage,
122
123
  moveToPrevImage: movePrev,
123
- moveToNextImage: moveNext
124
+ moveToNextImage: moveNext,
125
+ downloadImage: downloadImage
124
126
  })]
125
127
  });
126
128
  };
@@ -20,7 +20,7 @@ const FileItemFormatter = _ref => {
20
20
  } = (0, _url.getFileThumbnailInfo)(file, config);
21
21
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
22
22
  onClick: () => openFile && openFile(file),
23
- className: "file-item-icon ".concat(isImage ? 'img' : ''),
23
+ className: `file-item-icon ${isImage ? 'img' : ''}`,
24
24
  src: fileIconUrl,
25
25
  alt: (file === null || file === void 0 ? void 0 : file.name) || ''
26
26
  });
@@ -137,7 +137,7 @@ class FileUploader extends _react.default.Component {
137
137
  for (let i = 0; i < allFileLen; i++) {
138
138
  let uploadFile = files[i];
139
139
  if (isPasteUpload && uploadFile.name === 'image.png') {
140
- let newName = "image-".concat((0, _dayjs.default)().format('YYYY-MM-DD-HH-mm'), ".png");
140
+ let newName = `image-${(0, _dayjs.default)().format('YYYY-MM-DD-HH-mm')}.png`;
141
141
  uploadFile = new File([uploadFile], newName, {
142
142
  type: uploadFile.type
143
143
  });
@@ -5,7 +5,6 @@ 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
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _dtableUtils = require("dtable-utils");
11
10
  var _baseFormatterConfig = _interopRequireDefault(require("../formatterConfig/base-formatter-config"));
@@ -37,7 +36,7 @@ class FormulaFormatter extends _react.default.Component {
37
36
  } = this.props;
38
37
  const gridCellClassName = this.getGridCellClassName(resultType);
39
38
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
40
- className: "dtable-ui cell-formatter-container formula-formatter ".concat(containerClassName, " ").concat(gridCellClassName),
39
+ className: `dtable-ui cell-formatter-container formula-formatter ${containerClassName} ${gridCellClassName}`,
41
40
  title: cellValue,
42
41
  "aria-label": cellValue,
43
42
  children: cellValue
@@ -73,7 +72,7 @@ class FormulaFormatter extends _react.default.Component {
73
72
  if (!Array.isArray(value)) {
74
73
  cellValue = (0, _cellValueValidator.default)(value, array_type) ? [value] : [];
75
74
  }
76
- const contentItemClassName = "formula-formatter-content-item ".concat(_isSimpleCellFormatterColumn ? 'simple-cell-formatter' : '');
75
+ const contentItemClassName = `formula-formatter-content-item ${_isSimpleCellFormatterColumn ? 'simple-cell-formatter' : ''}`;
77
76
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
78
77
  className: "dtable-ui formula-formatter multiple",
79
78
  children: cellValue.map((v, index) => {
@@ -81,7 +80,7 @@ class FormulaFormatter extends _react.default.Component {
81
80
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
82
81
  className: contentItemClassName,
83
82
  children: this.createColumnFormatter(Formatter, formatterProps)
84
- }, "formula-formatter-content-item-".concat(index));
83
+ }, `formula-formatter-content-item-${index}`);
85
84
  })
86
85
  });
87
86
  };
@@ -106,20 +105,27 @@ class FormulaFormatter extends _react.default.Component {
106
105
  }
107
106
  default:
108
107
  {
109
- return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, array_data), {}, {
108
+ return {
109
+ ...array_data,
110
110
  collaborators
111
- });
111
+ };
112
112
  }
113
113
  }
114
114
  };
115
115
  }
116
116
  createColumnFormatter(Formatter, formatterProps) {
117
117
  if (/*#__PURE__*/_react.default.isValidElement(Formatter)) {
118
- return /*#__PURE__*/_react.default.cloneElement(Formatter, (0, _objectSpread2.default)({}, formatterProps));
118
+ return /*#__PURE__*/_react.default.cloneElement(Formatter, {
119
+ ...formatterProps
120
+ });
119
121
  } else if ((0, _utils2.isFunction)(Formatter)) {
120
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, (0, _objectSpread2.default)({}, formatterProps));
122
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, {
123
+ ...formatterProps
124
+ });
121
125
  }
122
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextFormatter.default, (0, _objectSpread2.default)({}, formatterProps));
126
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextFormatter.default, {
127
+ ...formatterProps
128
+ });
123
129
  }
124
130
  render() {
125
131
  const {
@@ -6,23 +6,23 @@ 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
  var _jsxRuntime = require("react/jsx-runtime");
16
- const _excluded = ["isMobile", "config"];
17
14
  const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
18
15
  let {
19
- isMobile,
20
- config: propsConfig
21
- } = _ref,
22
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
16
+ isMobile,
17
+ config: propsConfig,
18
+ ...props
19
+ } = _ref;
23
20
  const config = (0, _react.useMemo)(() => {
24
21
  var _window;
25
- return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (_window = window) === null || _window === void 0 ? void 0 : _window.dtable), propsConfig);
22
+ return {
23
+ ...((_window = window) === null || _window === void 0 ? void 0 : _window.dtable),
24
+ ...propsConfig
25
+ };
26
26
  }, [propsConfig]);
27
27
  const getLocationData = (0, _react.useCallback)(() => {
28
28
  var _window2, _window2$app;
@@ -33,7 +33,7 @@ const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
33
33
  server = '',
34
34
  mediaUrl = ''
35
35
  } = config || {};
36
- return fetch("".concat(server).concat(mediaUrl, "geo-data/cn-location.json").replaceAll('//', '/')).then(res => {
36
+ return fetch(`${server}${mediaUrl}geo-data/cn-location.json`.replaceAll('//', '/')).then(res => {
37
37
  // get locations from server
38
38
  return res.json();
39
39
  }).catch(() => {
@@ -55,11 +55,11 @@ const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
55
55
  server = ''
56
56
  } = config;
57
57
  const geoFileName = lang === 'cn' ? 'cn-region-location' : 'en-region-location';
58
- return fetch("".concat(server).concat(mediaUrl, "geo-data/").concat(geoFileName, ".json").replaceAll('//', '/')).then(res => {
58
+ return fetch(`${server}${mediaUrl}geo-data/${geoFileName}.json`.replaceAll('//', '/')).then(res => {
59
59
  return res.json();
60
60
  }).catch(() => {
61
61
  // get locations from local
62
- return fetch("./geo-data/".concat(geoFileName, ".json")).then(res => {
62
+ return fetch(`./geo-data/${geoFileName}.json`).then(res => {
63
63
  return res.json();
64
64
  });
65
65
  }).then(res => {
@@ -72,35 +72,39 @@ const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
72
72
  return data;
73
73
  });
74
74
  }, [config]);
75
- if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
75
+ if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
76
+ ...props,
76
77
  config: config,
77
78
  getLocationData: getLocationData,
78
79
  getCountryData: getCountryData,
79
80
  ref: ref
80
- }));
81
- if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
81
+ });
82
+ if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
83
+ ...props,
82
84
  config: config,
83
85
  getLocationData: getLocationData,
84
86
  getCountryData: getCountryData,
85
87
  ref: ref
86
- }));
88
+ });
87
89
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
88
90
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
89
91
  query: "(min-width: 768px)",
90
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
92
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
93
+ ...props,
91
94
  config: config,
92
95
  getLocationData: getLocationData,
93
96
  getCountryData: getCountryData,
94
97
  ref: ref
95
- }))
98
+ })
96
99
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
97
100
  query: "(max-width: 768px)",
98
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
101
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
102
+ ...props,
99
103
  config: config,
100
104
  getLocationData: getLocationData,
101
105
  getCountryData: getCountryData,
102
106
  ref: ref
103
- }))
107
+ })
104
108
  })]
105
109
  });
106
110
  });
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.locateCurrentPosition = exports.loadMapSource = exports.getMineMapUrl = exports.getMapInfo = exports.getInitCenter = exports.MAP_TYPES = exports.INPUT_MODE_MAP = exports.DOMESTIC_MAP_TYPE = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
7
  const INPUT_MODE_MAP = exports.INPUT_MODE_MAP = {
10
8
  ANY_LOCATION: 'any_location',
11
9
  ONLY_MOBILE_POSITIONING: 'only_mobile_positioning'
@@ -32,7 +30,10 @@ const getMineMapUrl = function () {
32
30
  let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
33
31
  const {
34
32
  dtableMineMapCustomConfig = {}
35
- } = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (_window = window) === null || _window === void 0 ? void 0 : _window.dtable), config);
33
+ } = {
34
+ ...((_window = window) === null || _window === void 0 ? void 0 : _window.dtable),
35
+ ...config
36
+ };
36
37
  const {
37
38
  domain_url = '',
38
39
  data_domain_url = '',
@@ -76,7 +77,10 @@ const getMapInfo = function () {
76
77
  dtableBaiduMapKey: baiduMapKey,
77
78
  dtableGoogleMapKey: googleMapKey,
78
79
  dtableMineMapKey: mineMapKey
79
- } = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.dtable), config);
80
+ } = {
81
+ ...((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.dtable),
82
+ ...config
83
+ };
80
84
  let mapType;
81
85
  let mapKey;
82
86
  if (baiduMapKey) {
@@ -101,9 +105,9 @@ const loadMapSource = (mapType, mapKey, callback) => {
101
105
  let script = document.createElement('script');
102
106
  script.type = 'text/javascript';
103
107
  if (mapType === MAP_TYPES.B_MAP) {
104
- scriptUrl = "https://api.map.baidu.com/api?v=3.0&ak=".concat(mapKey, "&callback=renderBaiduMap");
108
+ scriptUrl = `https://api.map.baidu.com/api?v=3.0&ak=${mapKey}&callback=renderBaiduMap`;
105
109
  } else if (mapType === MAP_TYPES.G_MAP) {
106
- scriptUrl = "https://maps.googleapis.com/maps/api/js?key=".concat(mapKey, "&callback=renderGoogleMap&libraries=&v=weekly");
110
+ scriptUrl = `https://maps.googleapis.com/maps/api/js?key=${mapKey}&callback=renderGoogleMap&libraries=&v=weekly`;
107
111
  } else {
108
112
  scriptUrl = 'https://minemap.minedata.cn/minemapapi/v2.1.1/minemap.js';
109
113
  let link = document.createElement('link');
@@ -6,8 +6,6 @@ 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 _dtableUtils = require("dtable-utils");
13
11
  var _countryEditor = _interopRequireDefault(require("./country-editor"));
@@ -18,7 +16,6 @@ var _mapEditor = _interopRequireDefault(require("./map-editor"));
18
16
  var _mapSelectionEditor = _interopRequireDefault(require("./map-selection-editor"));
19
17
  require("./index.css");
20
18
  var _jsxRuntime = require("react/jsx-runtime");
21
- const _excluded = ["column", "config", "getLocationData", "getCountryData"];
22
19
  const transLocationData = data => {
23
20
  if (Object.prototype.toString.call(data) === '[object Object]') {
24
21
  const name = data.name;
@@ -56,12 +53,12 @@ const transCountryData = data => {
56
53
  };
57
54
  const MBGeolocationEditor = _ref => {
58
55
  let {
59
- column,
60
- config,
61
- getLocationData,
62
- getCountryData
63
- } = _ref,
64
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
56
+ column,
57
+ config,
58
+ getLocationData,
59
+ getCountryData,
60
+ ...props
61
+ } = _ref;
65
62
  const format = (0, _react.useMemo)(() => {
66
63
  let data = column.data || {};
67
64
  return data.geo_format ? data.geo_format : _dtableUtils.DEFAULT_GEOLOCATION_FORMAT;
@@ -77,53 +74,60 @@ const MBGeolocationEditor = _ref => {
77
74
  switch (format) {
78
75
  case _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT:
79
76
  {
80
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
77
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapEditor.default, {
78
+ ...props,
81
79
  config: config,
82
80
  column: column
83
- }));
81
+ });
84
82
  }
85
83
  case _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION:
86
84
  {
87
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapSelectionEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
85
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapSelectionEditor.default, {
86
+ ...props,
88
87
  config: config,
89
88
  column: column
90
- }));
89
+ });
91
90
  }
92
91
  case _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION:
93
92
  {
94
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_countryEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
93
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_countryEditor.default, {
94
+ ...props,
95
95
  getData: _getCountryData,
96
96
  column: column
97
- }));
97
+ });
98
98
  }
99
99
  case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE:
100
100
  {
101
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
101
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceEditor.default, {
102
+ ...props,
102
103
  getData: getData,
103
104
  column: column
104
- }));
105
+ });
105
106
  }
106
107
  case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY:
107
108
  {
108
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceCityEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
109
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceCityEditor.default, {
110
+ ...props,
109
111
  getData: getData,
110
112
  column: column
111
- }));
113
+ });
112
114
  }
113
115
  case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY_DISTRICT:
114
116
  {
115
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
117
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, {
118
+ ...props,
116
119
  getData: getData,
117
120
  column: column
118
- }));
121
+ });
119
122
  }
120
123
  default:
121
124
  {
122
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
125
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, {
126
+ ...props,
123
127
  isShowDetails: true,
124
128
  getData: getData,
125
129
  column: column
126
- }));
130
+ });
127
131
  }
128
132
  }
129
133
  };
@@ -5,7 +5,6 @@ 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
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _dtableUtils = require("dtable-utils");
11
10
  var _InputItem = _interopRequireDefault(require("../../../InputItem"));
@@ -120,7 +119,9 @@ class MapEditor extends _react.default.Component {
120
119
  };
121
120
  this.geolocationCallback = (error, point) => {
122
121
  if (!error) {
123
- this.setValue((0, _objectSpread2.default)({}, point));
122
+ this.setValue({
123
+ ...point
124
+ });
124
125
  this.addMarkerByPosition(point.lng, point.lat);
125
126
  if (this.mapType === _mapEditorUtils.MAP_TYPES.G_MAP) {
126
127
  this.map.setCenter({
@@ -301,9 +302,10 @@ class MapEditor extends _react.default.Component {
301
302
  });
302
303
  };
303
304
  this.handleLatitudeChange = value => {
304
- const newValue = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.state.value), {}, {
305
+ const newValue = {
306
+ ...this.state.value,
305
307
  lat: value
306
- });
308
+ };
307
309
  this.setState({
308
310
  value: newValue
309
311
  }, () => {
@@ -312,9 +314,10 @@ class MapEditor extends _react.default.Component {
312
314
  });
313
315
  };
314
316
  this.handleLongitudeChange = value => {
315
- const newValue = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.state.value), {}, {
317
+ const newValue = {
318
+ ...this.state.value,
316
319
  lng: value
317
- });
320
+ };
318
321
  this.setState({
319
322
  value: newValue
320
323
  }, () => {
@@ -159,14 +159,14 @@ class CountryEditor extends _react.Component {
159
159
  let countryList = this.filteredCountry[continent].map((country, index) => {
160
160
  const isHighlight = highlightIndexes[0] === continentIndex && highlightIndexes[1] === index;
161
161
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
162
- className: "geolocation-region-editor-country ".concat(isHighlight ? 'geolocation-region-editor-province-highlight' : ''),
162
+ className: `geolocation-region-editor-country ${isHighlight ? 'geolocation-region-editor-province-highlight' : ''}`,
163
163
  onMouseEnter: () => this.onMenuMouseEnter(continentIndex, index),
164
164
  onMouseLeave: () => this.onMenuMouseLeave(continentIndex, index),
165
165
  title: country,
166
166
  "aria-label": country,
167
167
  onClick: () => this.onClick(country),
168
168
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
169
- className: "icon ".concat(value === country ? 'dtable-font dtable-icon-check-mark' : '')
169
+ className: `icon ${value === country ? 'dtable-font dtable-icon-check-mark' : ''}`
170
170
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
171
171
  className: "country-name",
172
172
  children: country
@@ -5,7 +5,6 @@ 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
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _dtableUtils = require("dtable-utils");
11
10
  var _constants = require("../../constants");
@@ -173,54 +172,61 @@ class PCGeolocationEditor extends _react.default.Component {
173
172
  switch (geoFormat) {
174
173
  case _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT:
175
174
  {
176
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
175
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapEditor.default, {
176
+ ...props,
177
177
  toggleLargeMap: toggleLargeMap,
178
178
  ref: ref => this.editor = ref
179
- }));
179
+ });
180
180
  }
181
181
  case _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION:
182
182
  {
183
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapSelectionEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
183
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mapSelectionEditor.default, {
184
+ ...props,
184
185
  toggleLargeMap: toggleLargeMap,
185
186
  ref: ref => this.editor = ref
186
- }));
187
+ });
187
188
  }
188
189
  case _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION:
189
190
  {
190
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_countryEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
191
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_countryEditor.default, {
192
+ ...props,
191
193
  getData: getCountryData,
192
194
  ref: ref => this.editor = ref
193
- }));
195
+ });
194
196
  }
195
197
  case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE:
196
198
  {
197
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
199
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceEditor.default, {
200
+ ...props,
198
201
  onPressTab: this.props.onPressTab,
199
202
  getData: getLocationData,
200
203
  ref: ref => this.editor = ref
201
- }));
204
+ });
202
205
  }
203
206
  case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY:
204
207
  {
205
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceCityEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
208
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_provinceCityEditor.default, {
209
+ ...props,
206
210
  getData: getLocationData,
207
211
  ref: ref => this.editor = ref
208
- }));
212
+ });
209
213
  }
210
214
  case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY_DISTRICT:
211
215
  {
212
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
216
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, {
217
+ ...props,
213
218
  getData: getLocationData,
214
219
  ref: ref => this.editor = ref
215
- }));
220
+ });
216
221
  }
217
222
  default:
218
223
  {
219
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
224
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_locationEditor.default, {
225
+ ...props,
220
226
  isShowDetails: true,
221
227
  getData: getLocationData,
222
228
  ref: ref => this.editor = ref
223
- }));
229
+ });
224
230
  }
225
231
  }
226
232
  };
@@ -191,7 +191,7 @@ class LocationEditor extends _react.Component {
191
191
  this.locations = {};
192
192
  this.state = {
193
193
  isShowSelector: false,
194
- location: "".concat(this.value.province || '').concat(this.value.city || '').concat(this.value.district || ''),
194
+ location: `${this.value.province || ''}${this.value.city || ''}${this.value.district || ''}`,
195
195
  selectedProvince: null,
196
196
  selectedCity: null,
197
197
  selectedCounty: null,
@@ -243,7 +243,7 @@ class LocationEditor extends _react.Component {
243
243
  className: "dtable-ui-geolocation-editor-item-right",
244
244
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
245
245
  onClick: this.onToggleSelector,
246
- className: "dtable-ui-geolocation-editor-selector text-truncate ".concat(isShowSelector ? 'focus' : ''),
246
+ className: `dtable-ui-geolocation-editor-selector text-truncate ${isShowSelector ? 'focus' : ''}`,
247
247
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
248
248
  className: "selected-option-show",
249
249
  children: location ? location : (0, _lang.getLocale)('Select_province_city_district')
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _dtableUtils = require("dtable-utils");
12
11
  var _toaster = _interopRequireDefault(require("../../../toaster"));
@@ -140,7 +139,9 @@ class MapEditor extends _react.Component {
140
139
  };
141
140
  this.geolocationCallback = (error, point) => {
142
141
  if (!error) {
143
- this.setValue((0, _objectSpread2.default)({}, point));
142
+ this.setValue({
143
+ ...point
144
+ });
144
145
  this.addMarkerByPosition(point.lng, point.lat);
145
146
  if (this.mapType === _mapEditorUtils.MAP_TYPES.G_MAP) {
146
147
  this.map.setCenter({
@@ -324,9 +325,10 @@ class MapEditor extends _react.Component {
324
325
  });
325
326
  };
326
327
  this.onChangeLatitude = event => {
327
- const newValue = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.state.value), {}, {
328
+ const newValue = {
329
+ ...this.state.value,
328
330
  lat: event.target.value
329
- });
331
+ };
330
332
  this.setState({
331
333
  value: newValue
332
334
  }, () => {
@@ -335,9 +337,10 @@ class MapEditor extends _react.Component {
335
337
  });
336
338
  };
337
339
  this.onChangeLongitude = event => {
338
- const newValue = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.state.value), {}, {
340
+ const newValue = {
341
+ ...this.state.value,
339
342
  lng: event.target.value
340
- });
343
+ };
341
344
  this.setState({
342
345
  value: newValue
343
346
  }, () => {
@@ -512,11 +515,12 @@ class MapEditor extends _react.Component {
512
515
  })]
513
516
  });
514
517
  }
515
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_largeEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.props), {}, {
518
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_largeEditor.default, {
519
+ ...this.props,
516
520
  value: this.state.value,
517
521
  setValue: this.setValue,
518
522
  toggleFullScreen: this.toggleFullScreen
519
- }));
523
+ });
520
524
  }
521
525
  }
522
526
  var _default = exports.default = MapEditor;