dtable-ui-component 6.0.108 → 6.0.110-aik.2

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 (194) hide show
  1. package/lib/ActionSheet/index.js +42 -35
  2. package/lib/ActivityIndicator/index.js +9 -9
  3. package/lib/AsyncUserSelect/index.css +54 -12
  4. package/lib/AsyncUserSelect/index.js +27 -16
  5. package/lib/Badge/index.js +27 -31
  6. package/lib/CheckboxEditor/index.js +15 -14
  7. package/lib/CollaboratorEditor/index.js +16 -15
  8. package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
  9. package/lib/CollapsibleSettingLayout/index.js +1 -1
  10. package/lib/Comment/body/comment.js +1 -1
  11. package/lib/Comment/body/index.js +7 -9
  12. package/lib/Comment/footer/index.js +1 -1
  13. package/lib/Comment/footer/input/index.js +5 -5
  14. package/lib/Comment/footer/input/participant/index.js +1 -1
  15. package/lib/Comment/footer/participants/participant-select/index.js +2 -2
  16. package/lib/Comment/utils/utilities.js +1 -1
  17. package/lib/DTableColorPicker/ColorPickerPortal/index.js +8 -6
  18. package/lib/DTableColorPicker/index.js +13 -12
  19. package/lib/DTableColorPicker/utils.js +1 -1
  20. package/lib/DTableCommonAddTool/index.js +2 -2
  21. package/lib/DTableFiltersPopover/index.js +1 -1
  22. package/lib/DTableFiltersPopover/utils/index.js +1 -1
  23. package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
  24. package/lib/DTableFiltersPopover/widgets/filter-item.js +1 -1
  25. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
  26. package/lib/DTableFiltersPopover/widgets/rate-item.js +5 -5
  27. package/lib/DTableGroupSelect/index.css +42 -5
  28. package/lib/DTableGroupSelect/select-option-group.css +3 -3
  29. package/lib/DTableGroupSelect/select-option-group.js +23 -5
  30. package/lib/DTableIcon/index.js +4 -4
  31. package/lib/DTableIcon/svg-icon.js +4 -4
  32. package/lib/DTableModalHeader/index.js +6 -8
  33. package/lib/DTableRadioGroup/index.js +3 -3
  34. package/lib/DTableSelect/dtable-select-label.js +1 -1
  35. package/lib/DTableSelect/utils.js +55 -36
  36. package/lib/DateEditor/index.js +13 -10
  37. package/lib/DateEditor/pc-editor.js +1 -1
  38. package/lib/DatePicker/utils.js +4 -4
  39. package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
  40. package/lib/DepartmentSelectFilter/index.js +5 -2
  41. package/lib/DepartmentSingleSelectEditor/index.js +15 -14
  42. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
  43. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +6 -6
  44. package/lib/DigitalSignEditor/index.js +15 -14
  45. package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
  46. package/lib/DigitalSignEditor/pc-editor/index.js +7 -6
  47. package/lib/DigitalSignEditor/service.js +1 -1
  48. package/lib/DigitalSignEditor/signature-board/index.js +2 -2
  49. package/lib/DigitalSignFormatter/utils.js +1 -1
  50. package/lib/Drawer/index.js +3 -2
  51. package/lib/FieldDisplaySetting/field-item.js +1 -1
  52. package/lib/FieldDisplaySetting/index.js +11 -9
  53. package/lib/FileEditor/files-previewer/index.js +15 -14
  54. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
  55. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
  56. package/lib/FileEditor/index.js +15 -14
  57. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
  58. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
  59. package/lib/FileEditor/pc-editor/index.js +3 -3
  60. package/lib/FileFormatter/index.js +1 -1
  61. package/lib/FileItemFormatter/index.js +1 -1
  62. package/lib/FileUploader/index.js +1 -1
  63. package/lib/FormulaFormatter/index.js +15 -9
  64. package/lib/GeolocationEditor/index.js +23 -19
  65. package/lib/GeolocationEditor/map-editor-utils.js +10 -6
  66. package/lib/GeolocationEditor/mb-editor/index.js +27 -23
  67. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +9 -6
  68. package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
  69. package/lib/GeolocationEditor/pc-editor/index.js +21 -15
  70. package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
  71. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +13 -9
  72. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +9 -6
  73. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +24 -7
  74. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +20 -3
  75. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
  76. package/lib/GeolocationEditor/pc-editor/province-editor.js +2 -2
  77. package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
  78. package/lib/HtmlLongTextFormatter/index.js +1 -1
  79. package/lib/Icon/index.js +13 -17
  80. package/lib/Icon/load-sprite.js +13 -2
  81. package/lib/IconButton/index.js +11 -14
  82. package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
  83. package/lib/ImageEditor/index.js +15 -14
  84. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
  85. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
  86. package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
  87. package/lib/ImageFormatter/index.js +1 -1
  88. package/lib/ImagePreviewerLightbox/index.js +30 -21
  89. package/lib/ImageThumbnail/index.js +2 -2
  90. package/lib/InputItem/custom-input.js +9 -9
  91. package/lib/InputItem/custom-keyboard.js +34 -37
  92. package/lib/InputItem/index.js +52 -49
  93. package/lib/InputItem/input.js +9 -13
  94. package/lib/LinkEditor/pc-popover/index.js +3 -2
  95. package/lib/List/index.js +17 -21
  96. package/lib/List/list-item.js +50 -52
  97. package/lib/MBEditorHeader/index.js +1 -1
  98. package/lib/MobileFullScreenPage/body/index.js +1 -1
  99. package/lib/MobileFullScreenPage/header/index.js +4 -4
  100. package/lib/MobileFullScreenPage/index.js +1 -1
  101. package/lib/MobileModal/index.js +7 -10
  102. package/lib/Modal/alert.js +2 -2
  103. package/lib/Modal/modal.js +28 -31
  104. package/lib/Modal/prompt.js +10 -10
  105. package/lib/MultipleSelectEditor/index.js +6 -8
  106. package/lib/MultipleSelectFormatter/index.js +1 -1
  107. package/lib/PhoneNumberLink/index.js +1 -1
  108. package/lib/Picker/AbstractPicker.js +26 -28
  109. package/lib/Popover/index.js +9 -12
  110. package/lib/Popover/item.js +22 -26
  111. package/lib/Progress/index.js +10 -8
  112. package/lib/Radio/Radio.js +13 -15
  113. package/lib/Radio/RadioItem.js +18 -18
  114. package/lib/RateFormatter/index.js +2 -2
  115. package/lib/RoleStatusEditor/index.js +1 -1
  116. package/lib/RowExpand/index.js +7 -6
  117. package/lib/RowExpandDialog/body/index.js +14 -14
  118. package/lib/RowExpandDialog/column-content/index.js +1 -1
  119. package/lib/RowExpandDialog/header/index.js +4 -3
  120. package/lib/RowExpandDialog/index.js +43 -32
  121. package/lib/RowExpandEditor/add-btn/index.js +7 -6
  122. package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
  123. package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
  124. package/lib/RowExpandEditor/date-editor/index.js +7 -6
  125. package/lib/RowExpandEditor/department-editor/index.js +7 -6
  126. package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
  127. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
  128. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
  129. package/lib/RowExpandEditor/duration-editor/index.js +7 -6
  130. package/lib/RowExpandEditor/email-editor/index.js +7 -6
  131. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
  132. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
  133. package/lib/RowExpandEditor/file-editor/index.js +7 -6
  134. package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
  135. package/lib/RowExpandEditor/image-editor/index.js +7 -6
  136. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
  137. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
  138. package/lib/RowExpandEditor/index.js +11 -10
  139. package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
  140. package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
  141. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
  142. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
  143. package/lib/RowExpandEditor/number-editor/index.js +7 -6
  144. package/lib/RowExpandEditor/rate-editor/index.js +7 -6
  145. package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
  146. package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
  147. package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
  148. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
  149. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
  150. package/lib/RowExpandEditor/text-editor/index.js +7 -6
  151. package/lib/RowExpandEditor/url-editor/index.js +7 -6
  152. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
  153. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
  154. package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
  155. package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
  156. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
  157. package/lib/RowExpandFormatter/formula-formatter/index.js +17 -11
  158. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
  159. package/lib/RowExpandFormatter/index.js +11 -7
  160. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
  161. package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
  162. package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
  163. package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
  164. package/lib/RowExpandView/body/index.js +13 -15
  165. package/lib/RowExpandView/index.js +39 -28
  166. package/lib/SelectOptionGroup/index.js +1 -1
  167. package/lib/SelectedDepartments/index.js +3 -3
  168. package/lib/SimpleLongTextFormatter/index.js +2 -2
  169. package/lib/SingleSelectEditor/index.js +6 -8
  170. package/lib/TabBar/Tab.js +10 -10
  171. package/lib/TabBar/index.js +7 -6
  172. package/lib/Tabs/index.js +10 -9
  173. package/lib/TextareaItem/index.js +43 -45
  174. package/lib/Toast/index.js +5 -5
  175. package/lib/formatterConfig/index.js +3 -3
  176. package/lib/locales/de.json +5 -5
  177. package/lib/locales/en.json +5 -6
  178. package/lib/locales/es.json +5 -5
  179. package/lib/locales/fr.json +5 -5
  180. package/lib/locales/pt.json +5 -5
  181. package/lib/locales/ru.json +5 -5
  182. package/lib/locales/zh-CN.json +5 -5
  183. package/lib/select-editor/index.js +15 -14
  184. package/lib/select-editor/pc-editor/index.js +5 -5
  185. package/lib/toaster/alert.js +1 -1
  186. package/lib/toaster/toast.js +1 -1
  187. package/lib/toaster/toastManager.js +12 -14
  188. package/lib/toaster/toaster.js +12 -9
  189. package/lib/utils/class.js +3 -3
  190. package/lib/utils/departments.js +3 -4
  191. package/lib/utils/getLocale.js +11 -5
  192. package/lib/utils/object-utils.js +5 -4
  193. package/lib/utils/url.js +4 -4
  194. package/package.json +14 -15
@@ -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;
@@ -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 _dtableUtils = require("dtable-utils");
@@ -157,7 +156,9 @@ class LargeMapEditorDialog extends _react.default.Component {
157
156
  };
158
157
  this.geolocationCallback = (error, point) => {
159
158
  if (!error) {
160
- this.setValue((0, _objectSpread2.default)({}, point));
159
+ this.setValue({
160
+ ...point
161
+ });
161
162
  this.addMarkerByPosition(point.lng, point.lat);
162
163
  if (this.mapType === _mapEditorUtils.MAP_TYPES.G_MAP) {
163
164
  this.map.setCenter({
@@ -268,9 +269,10 @@ class LargeMapEditorDialog extends _react.default.Component {
268
269
  });
269
270
  };
270
271
  this.onChangeLatitude = event => {
271
- const newValue = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.state.value), {}, {
272
+ const newValue = {
273
+ ...this.state.value,
272
274
  lat: event.target.value
273
- });
275
+ };
274
276
  this.setState({
275
277
  value: newValue
276
278
  }, () => {
@@ -280,9 +282,10 @@ class LargeMapEditorDialog extends _react.default.Component {
280
282
  });
281
283
  };
282
284
  this.onChangeLongitude = event => {
283
- const newValue = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.state.value), {}, {
285
+ const newValue = {
286
+ ...this.state.value,
284
287
  lng: event.target.value
285
- });
288
+ };
286
289
  this.setState({
287
290
  value: newValue
288
291
  }, () => {
@@ -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"));
@@ -126,7 +125,7 @@ class MapSelectionEditor extends _react.Component {
126
125
  backgroundColor: '#ffffff',
127
126
  boxShadow: '1px 2px 1px rgba(0,0,0,.15)',
128
127
  padding: '3px 10px',
129
- transform: "translate(-50%, ".concat(translateY, ")"),
128
+ transform: `translate(-50%, ${translateY})`,
130
129
  borderRadius: '3px',
131
130
  fontWeight: '500',
132
131
  left: '7px'
@@ -168,9 +167,26 @@ class MapSelectionEditor extends _react.Component {
168
167
  } = value;
169
168
  const tagContent = Array.isArray(tag) && tag.length > 0 ? tag[0] : '';
170
169
  if (title) {
171
- return "\n <div class='dtable-ui-selection-label-content' id='dtable-ui-selection-label-content'>\n <i class='dtable-font dtable-icon-down3'></i>\n <span class='label-title text-truncate' title=".concat(title, ">").concat(title, "</span>\n ").concat(tagContent && "<span class='label-tag'>".concat(tagContent, "</span>"), "\n <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>\n <span class='label-address-tip'>").concat((0, _lang.getLocale)('Address'), "</span>\n <span class='label-address text-truncate' title=").concat(address, ">").concat(address, "</span>\n <div class='label-submit btn btn-primary' id='selection-label-submit'>").concat((0, _lang.getLocale)('Fill_in'), "</div>\n </div>\n ");
170
+ return `
171
+ <div class='dtable-ui-selection-label-content' id='dtable-ui-selection-label-content'>
172
+ <i class='dtable-font dtable-icon-down3'></i>
173
+ <span class='label-title text-truncate' title=${title}>${title}</span>
174
+ ${tagContent && `<span class='label-tag'>${tagContent}</span>`}
175
+ <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>
176
+ <span class='label-address-tip'>${(0, _lang.getLocale)('Address')}</span>
177
+ <span class='label-address text-truncate' title=${address}>${address}</span>
178
+ <div class='label-submit btn btn-primary' id='selection-label-submit'>${(0, _lang.getLocale)('Fill_in')}</div>
179
+ </div>
180
+ `;
172
181
  }
173
- return "\n <div class='dtable-ui-selection-label-content simple' id='dtable-ui-selection-label-content'>\n <i class='dtable-font dtable-icon-down3'></i>\n <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>\n <span class='label-address text-truncate simple' title=".concat(address, ">").concat(address, "</span>\n <div class='label-submit btn btn-primary' id='selection-label-submit'>").concat((0, _lang.getLocale)('Fill_in'), "</div>\n </div>\n ");
182
+ return `
183
+ <div class='dtable-ui-selection-label-content simple' id='dtable-ui-selection-label-content'>
184
+ <i class='dtable-font dtable-icon-down3'></i>
185
+ <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>
186
+ <span class='label-address text-truncate simple' title=${address}>${address}</span>
187
+ <div class='label-submit btn btn-primary' id='selection-label-submit'>${(0, _lang.getLocale)('Fill_in')}</div>
188
+ </div>
189
+ `;
174
190
  };
175
191
  this.getInitValue = () => {
176
192
  const {
@@ -382,9 +398,10 @@ class MapSelectionEditor extends _react.Component {
382
398
  isShowLargeEditor
383
399
  } = this.state;
384
400
  if (isShowLargeEditor) {
385
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_largeEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.props), {}, {
401
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_largeEditor.default, {
402
+ ...this.props,
386
403
  toggleFullScreen: this.toggleFullScreen
387
- }));
404
+ });
388
405
  }
389
406
  if (this.mapType === _mapEditorUtils.MAP_TYPES.G_MAP || this.mapType === _mapEditorUtils.MAP_TYPES.M_MAP) {
390
407
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
@@ -113,7 +113,7 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
113
113
  backgroundColor: '#ffffff',
114
114
  boxShadow: '1px 2px 1px rgba(0,0,0,.15)',
115
115
  padding: '3px 10px',
116
- transform: "translate(-50%, ".concat(translateY, ")"),
116
+ transform: `translate(-50%, ${translateY})`,
117
117
  borderRadius: '3px',
118
118
  fontWeight: '500',
119
119
  left: '7px'
@@ -155,9 +155,26 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
155
155
  } = value;
156
156
  const tagContent = Array.isArray(tag) && tag.length > 0 ? tag[0] : '';
157
157
  if (title) {
158
- return "\n <div class='dtable-ui-selection-label-content' id='dtable-ui-selection-label-content'>\n <i class='dtable-font dtable-icon-down3'></i>\n <span class='label-title text-truncate' title=".concat(title, ">").concat(title, "</span>\n ").concat(tagContent && "<span class='label-tag'>".concat(tagContent, "</span>"), "\n <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>\n <span class='label-address-tip'>").concat((0, _lang.getLocale)('Address'), "</span>\n <span class='label-address text-truncate' title=").concat(address, ">").concat(address, "</span>\n <div class='label-submit btn btn-primary' id='selection-label-submit'>").concat((0, _lang.getLocale)('Fill_in'), "</div>\n </div>\n ");
158
+ return `
159
+ <div class='dtable-ui-selection-label-content' id='dtable-ui-selection-label-content'>
160
+ <i class='dtable-font dtable-icon-down3'></i>
161
+ <span class='label-title text-truncate' title=${title}>${title}</span>
162
+ ${tagContent && `<span class='label-tag'>${tagContent}</span>`}
163
+ <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>
164
+ <span class='label-address-tip'>${(0, _lang.getLocale)('Address')}</span>
165
+ <span class='label-address text-truncate' title=${address}>${address}</span>
166
+ <div class='label-submit btn btn-primary' id='selection-label-submit'>${(0, _lang.getLocale)('Fill_in')}</div>
167
+ </div>
168
+ `;
159
169
  } else {
160
- return "\n <div class='dtable-ui-selection-label-content simple' id='dtable-ui-selection-label-content'>\n <i class='dtable-font dtable-icon-down3'></i>\n <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>\n <span class='label-address text-truncate simple' title=".concat(address, ">").concat(address, "</span>\n <div class='label-submit btn btn-primary' id='selection-label-submit'>").concat((0, _lang.getLocale)('Fill_in'), "</div>\n </div>\n ");
170
+ return `
171
+ <div class='dtable-ui-selection-label-content simple' id='dtable-ui-selection-label-content'>
172
+ <i class='dtable-font dtable-icon-down3'></i>
173
+ <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>
174
+ <span class='label-address text-truncate simple' title=${address}>${address}</span>
175
+ <div class='label-submit btn btn-primary' id='selection-label-submit'>${(0, _lang.getLocale)('Fill_in')}</div>
176
+ </div>
177
+ `;
161
178
  }
162
179
  };
163
180
  this.getInitValue = () => {
@@ -197,7 +197,7 @@ class ProvinceCityEditor extends _react.Component {
197
197
  className: "dtable-ui-geolocation-editor-item-right",
198
198
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
199
199
  onClick: this.onToggleSelector,
200
- className: "dtable-ui-geolocation-editor-selector text-truncate ".concat(isShowSelector ? 'focus' : ''),
200
+ className: `dtable-ui-geolocation-editor-selector text-truncate ${isShowSelector ? 'focus' : ''}`,
201
201
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
202
202
  className: "selected-option-show",
203
203
  children: location ? location : (0, _lang.getLocale)('Select_province_city')
@@ -130,7 +130,7 @@ class ProvinceEditor extends _react.Component {
130
130
  } = this.state;
131
131
  let provinceList = this.filteredProvince.map((item, index) => {
132
132
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
133
- className: "geolocation-region-editor-province ".concat(highlightIndex === index ? 'geolocation-region-editor-province-highlight' : ''),
133
+ className: `geolocation-region-editor-province ${highlightIndex === index ? 'geolocation-region-editor-province-highlight' : ''}`,
134
134
  title: item.name,
135
135
  "aria-label": item.name,
136
136
  onClick: () => this.onClick(item.name),
@@ -140,7 +140,7 @@ class ProvinceEditor extends _react.Component {
140
140
  className: "province-name",
141
141
  children: item.name
142
142
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
143
- className: "icon ".concat(value === item.name ? 'province-selected-icon dtable-font dtable-icon-check-mark' : '')
143
+ className: `icon ${value === item.name ? 'province-selected-icon dtable-font dtable-icon-check-mark' : ''}`
144
144
  })]
145
145
  }, item.alphabetic + index);
146
146
  });
@@ -25,7 +25,7 @@ class SelectorList extends _react.default.Component {
25
25
  onDoubleClick: () => {
26
26
  doubleClickHandler && doubleClickHandler(item);
27
27
  },
28
- className: "dtable-ui-geolocation-selector-list-item ".concat(type === 'province' ? 'province-item' : '', " ").concat(isSelected ? 'selected-list-item' : ''),
28
+ className: `dtable-ui-geolocation-selector-list-item ${type === 'province' ? 'province-item' : ''} ${isSelected ? 'selected-list-item' : ''}`,
29
29
  children: item.name
30
30
  }, type + '-item-' + index);
31
31
  })
@@ -68,7 +68,7 @@ class HtmlLongTextFormatter extends _react.Component {
68
68
  const className = (0, _classnames.default)('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
69
69
  if (!innerHtml) return null;
70
70
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
71
- className: "".concat(className, " article"),
71
+ className: `${className} article`,
72
72
  dangerouslySetInnerHTML: {
73
73
  __html: innerHtml
74
74
  }
package/lib/Icon/index.js CHANGED
@@ -1,39 +1,35 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
9
  var _classnames = _interopRequireDefault(require("classnames"));
12
10
  var React = _interopRequireWildcard(require("react"));
13
11
  var _loadSprite = _interopRequireDefault(require("./load-sprite"));
14
12
  require("./index.css");
15
13
  var _jsxRuntime = require("react/jsx-runtime");
16
- const _excluded = ["type", "className", "size"];
17
14
  class Icon extends React.Component {
18
15
  componentDidMount() {
19
16
  (0, _loadSprite.default)();
20
17
  }
21
18
  render() {
22
- const _this$props = this.props,
23
- {
24
- type,
25
- className,
26
- size
27
- } = _this$props,
28
- restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
29
- const cls = (0, _classnames.default)(className, 'am-icon', "am-icon-".concat(type), "am-icon-".concat(size));
30
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", (0, _objectSpread2.default)((0, _objectSpread2.default)({
31
- className: cls
32
- }, restProps), {}, {
19
+ const {
20
+ type,
21
+ className,
22
+ size,
23
+ ...restProps
24
+ } = this.props;
25
+ const cls = (0, _classnames.default)(className, 'am-icon', `am-icon-${type}`, `am-icon-${size}`);
26
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
27
+ className: cls,
28
+ ...restProps,
33
29
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("use", {
34
- xlinkHref: "#".concat(type)
30
+ xlinkHref: `#${type}`
35
31
  })
36
- }));
32
+ });
37
33
  }
38
34
  }
39
35
  exports.default = Icon;
@@ -7,7 +7,18 @@ exports.default = void 0;
7
7
  /* tslint:disable:max-line-length */
8
8
  // inspried by https://github.com/kisenka/svg-sprite-loader/blob/master/runtime/browser-sprite.js
9
9
  // Much simplified, do make sure run this after document ready
10
- const svgSprite = contents => "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n id=\"__ANTD_MOBILE_SVG_SPRITE_NODE__\"\n style=\"display:none;overflow:hidden;width:0;height:0\"\n >\n <defs>\n ".concat(contents, "\n </defs>\n </svg>\n");
10
+ const svgSprite = contents => `
11
+ <svg
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ xmlns:xlink="http://www.w3.org/1999/xlink"
14
+ id="__ANTD_MOBILE_SVG_SPRITE_NODE__"
15
+ style="display:none;overflow:hidden;width:0;height:0"
16
+ >
17
+ <defs>
18
+ ${contents}
19
+ </defs>
20
+ </svg>
21
+ `;
11
22
 
12
23
  // both minified by https://github.com/svg/svgo
13
24
  const icons = {
@@ -39,7 +50,7 @@ const icons = {
39
50
  const renderSvgSprite = () => {
40
51
  const symbols = Object.keys(icons).map(iconName => {
41
52
  const svgContent = icons[iconName].split('svg')[1];
42
- return "<symbol id=".concat(iconName).concat(svgContent, "symbol>");
53
+ return `<symbol id=${iconName}${svgContent}symbol>`;
43
54
  }).join('');
44
55
  return svgSprite(symbols);
45
56
  };