dtable-ui-component 6.0.110-hap.1 → 6.0.110-hum.3

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 (203) hide show
  1. package/lib/ActionSheet/index.js +35 -42
  2. package/lib/ActivityIndicator/index.js +9 -9
  3. package/lib/AsyncUserSelect/index.js +3 -3
  4. package/lib/Badge/index.js +31 -27
  5. package/lib/CheckboxEditor/index.js +14 -15
  6. package/lib/CollaboratorEditor/index.js +15 -16
  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 +9 -7
  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 +6 -8
  17. package/lib/DTableColorPicker/index.js +12 -13
  18. package/lib/DTableColorPicker/utils.js +1 -1
  19. package/lib/DTableCommonAddTool/index.js +2 -2
  20. package/lib/DTableCustomizeSelect/index.css +30 -59
  21. package/lib/DTableCustomizeSelect/index.js +11 -10
  22. package/lib/DTableCustomizeSelect/select-option-group/KeyCodes.js +109 -0
  23. package/lib/DTableCustomizeSelect/select-option-group/index.css +129 -0
  24. package/lib/DTableCustomizeSelect/select-option-group/index.js +250 -0
  25. package/lib/DTableCustomizeSelect/select-option-group/option.js +48 -0
  26. package/lib/DTableCustomizeSelect/select-option-group/search-input.js +135 -0
  27. package/lib/DTableCustomizeSelect/util.js +12 -0
  28. package/lib/DTableFiltersPopover/index.js +1 -1
  29. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +2 -2
  30. package/lib/DTableFiltersPopover/utils/index.js +1 -1
  31. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +1 -1
  32. package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
  33. package/lib/DTableFiltersPopover/widgets/filter-item.js +1 -1
  34. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +3 -3
  35. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
  36. package/lib/DTableFiltersPopover/widgets/rate-item.js +5 -5
  37. package/lib/DTableGroupSelect/index.css +3 -16
  38. package/lib/DTableGroupSelect/select-option-group.css +3 -3
  39. package/lib/DTableGroupSelect/select-option-group.js +10 -11
  40. package/lib/DTableIcon/index.js +4 -4
  41. package/lib/DTableIcon/svg-icon.js +4 -4
  42. package/lib/DTableModalHeader/index.js +8 -6
  43. package/lib/DTableRadioGroup/index.js +3 -3
  44. package/lib/DTableSelect/dtable-select-label.js +1 -1
  45. package/lib/DTableSelect/index.js +145 -44
  46. package/lib/DTableSelect/select-dropdown-indicator/index.css +12 -0
  47. package/lib/DTableSelect/select-dropdown-indicator/index.js +20 -0
  48. package/lib/DTableSelect/select-style.js +134 -0
  49. package/lib/DTableSelect/user-select.css +3 -50
  50. package/lib/DateEditor/index.js +10 -13
  51. package/lib/DateEditor/pc-editor.js +1 -1
  52. package/lib/DatePicker/utils.js +4 -4
  53. package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
  54. package/lib/DepartmentSelectFilter/index.js +2 -5
  55. package/lib/DepartmentSingleSelectEditor/index.js +14 -15
  56. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
  57. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +6 -6
  58. package/lib/DigitalSignEditor/index.js +14 -15
  59. package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
  60. package/lib/DigitalSignEditor/pc-editor/index.js +6 -7
  61. package/lib/DigitalSignEditor/service.js +1 -1
  62. package/lib/DigitalSignEditor/signature-board/index.js +2 -2
  63. package/lib/DigitalSignFormatter/utils.js +1 -1
  64. package/lib/Drawer/index.js +2 -3
  65. package/lib/FieldDisplaySetting/field-item.js +1 -1
  66. package/lib/FieldDisplaySetting/index.js +9 -11
  67. package/lib/FileEditor/files-previewer/index.js +14 -15
  68. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
  69. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
  70. package/lib/FileEditor/index.js +14 -15
  71. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
  72. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
  73. package/lib/FileEditor/pc-editor/index.js +3 -3
  74. package/lib/FileFormatter/index.js +1 -1
  75. package/lib/FileItemFormatter/index.js +1 -1
  76. package/lib/FileUploader/index.js +1 -1
  77. package/lib/FormulaFormatter/index.js +9 -15
  78. package/lib/GeolocationEditor/index.js +19 -23
  79. package/lib/GeolocationEditor/map-editor-utils.js +6 -10
  80. package/lib/GeolocationEditor/mb-editor/index.js +23 -27
  81. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +6 -9
  82. package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
  83. package/lib/GeolocationEditor/pc-editor/index.js +15 -21
  84. package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
  85. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +9 -13
  86. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +6 -9
  87. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +7 -24
  88. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +3 -20
  89. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
  90. package/lib/GeolocationEditor/pc-editor/province-editor.js +2 -2
  91. package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
  92. package/lib/HtmlLongTextFormatter/index.js +1 -1
  93. package/lib/Icon/index.js +17 -13
  94. package/lib/Icon/load-sprite.js +2 -13
  95. package/lib/IconButton/index.js +14 -11
  96. package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
  97. package/lib/ImageEditor/index.js +14 -15
  98. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
  99. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
  100. package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
  101. package/lib/ImageFormatter/index.js +1 -1
  102. package/lib/ImageThumbnail/index.js +2 -2
  103. package/lib/InputItem/custom-input.js +9 -9
  104. package/lib/InputItem/custom-keyboard.js +37 -34
  105. package/lib/InputItem/index.js +49 -52
  106. package/lib/InputItem/input.js +13 -9
  107. package/lib/LinkEditor/pc-popover/index.js +2 -3
  108. package/lib/List/index.js +21 -17
  109. package/lib/List/list-item.js +52 -50
  110. package/lib/MBEditorHeader/index.js +1 -1
  111. package/lib/MobileFullScreenPage/body/index.js +1 -1
  112. package/lib/MobileFullScreenPage/header/index.js +4 -4
  113. package/lib/MobileFullScreenPage/index.js +1 -1
  114. package/lib/MobileModal/index.js +10 -7
  115. package/lib/Modal/alert.js +2 -2
  116. package/lib/Modal/modal.js +31 -28
  117. package/lib/Modal/prompt.js +10 -10
  118. package/lib/MultipleSelectEditor/index.js +8 -6
  119. package/lib/MultipleSelectFormatter/index.js +1 -1
  120. package/lib/PhoneNumberLink/index.js +1 -1
  121. package/lib/Picker/AbstractPicker.js +28 -26
  122. package/lib/Popover/index.js +12 -9
  123. package/lib/Popover/item.js +26 -22
  124. package/lib/Progress/index.js +8 -10
  125. package/lib/Radio/Radio.js +15 -13
  126. package/lib/Radio/RadioItem.js +18 -18
  127. package/lib/RateFormatter/index.js +2 -2
  128. package/lib/RoleStatusEditor/index.js +1 -1
  129. package/lib/RowExpand/index.js +6 -7
  130. package/lib/RowExpandDialog/body/index.js +14 -14
  131. package/lib/RowExpandDialog/column-content/index.js +1 -1
  132. package/lib/RowExpandDialog/header/index.js +3 -4
  133. package/lib/RowExpandDialog/index.js +32 -43
  134. package/lib/RowExpandEditor/add-btn/index.js +6 -7
  135. package/lib/RowExpandEditor/checkbox-editor/index.js +6 -7
  136. package/lib/RowExpandEditor/collaborator-editor/index.js +6 -7
  137. package/lib/RowExpandEditor/date-editor/index.js +6 -7
  138. package/lib/RowExpandEditor/department-editor/index.js +6 -7
  139. package/lib/RowExpandEditor/digital-sign-editor/index.js +6 -7
  140. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
  141. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
  142. package/lib/RowExpandEditor/duration-editor/index.js +6 -7
  143. package/lib/RowExpandEditor/email-editor/index.js +6 -7
  144. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
  145. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
  146. package/lib/RowExpandEditor/file-editor/index.js +6 -7
  147. package/lib/RowExpandEditor/geolocation-editor/index.js +6 -7
  148. package/lib/RowExpandEditor/image-editor/index.js +6 -7
  149. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
  150. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
  151. package/lib/RowExpandEditor/index.js +10 -11
  152. package/lib/RowExpandEditor/long-text-editor/index.js +6 -7
  153. package/lib/RowExpandEditor/multiple-select-editor/index.js +6 -7
  154. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
  155. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
  156. package/lib/RowExpandEditor/number-editor/index.js +6 -7
  157. package/lib/RowExpandEditor/rate-editor/index.js +6 -7
  158. package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
  159. package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
  160. package/lib/RowExpandEditor/single-select-editor/index.js +6 -7
  161. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
  162. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
  163. package/lib/RowExpandEditor/text-editor/index.js +6 -7
  164. package/lib/RowExpandEditor/url-editor/index.js +6 -7
  165. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
  166. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
  167. package/lib/RowExpandFormatter/department-formatter/index.js +3 -6
  168. package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
  169. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
  170. package/lib/RowExpandFormatter/formula-formatter/index.js +11 -17
  171. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
  172. package/lib/RowExpandFormatter/index.js +7 -11
  173. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
  174. package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
  175. package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
  176. package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
  177. package/lib/RowExpandView/body/index.js +15 -13
  178. package/lib/RowExpandView/index.js +28 -39
  179. package/lib/SelectOptionGroup/index.css +35 -17
  180. package/lib/SelectOptionGroup/index.js +44 -6
  181. package/lib/SelectedDepartments/index.js +3 -3
  182. package/lib/SimpleLongTextFormatter/index.js +2 -2
  183. package/lib/SingleSelectEditor/index.js +8 -6
  184. package/lib/TabBar/Tab.js +10 -10
  185. package/lib/TabBar/index.js +6 -7
  186. package/lib/Tabs/index.js +9 -10
  187. package/lib/TextareaItem/index.js +45 -43
  188. package/lib/Toast/index.js +5 -5
  189. package/lib/assets/icons/close.svg +1 -0
  190. package/lib/formatterConfig/index.js +3 -3
  191. package/lib/select-editor/index.js +14 -15
  192. package/lib/select-editor/pc-editor/index.js +5 -5
  193. package/lib/toaster/alert.js +1 -1
  194. package/lib/toaster/toast.js +1 -1
  195. package/lib/toaster/toastManager.js +14 -12
  196. package/lib/toaster/toaster.js +9 -12
  197. package/lib/utils/class.js +3 -3
  198. package/lib/utils/departments.js +4 -3
  199. package/lib/utils/getLocale.js +5 -11
  200. package/lib/utils/object-utils.js +4 -5
  201. package/lib/utils/url.js +4 -4
  202. package/package.json +2 -2
  203. package/lib/DTableSelect/utils.js +0 -227
@@ -6,7 +6,7 @@
6
6
  min-height: 60px;
7
7
  min-width: 100%;
8
8
  max-width: 15rem;
9
- padding-top: 0.25rem;
9
+ padding-top: 0;
10
10
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
11
11
  background: #fff;
12
12
  border: 1px solid rgba(0, 40, 100, 0.12);
@@ -17,11 +17,18 @@
17
17
  .option-group .option-group-search {
18
18
  width: 100%;
19
19
  min-width: 170px;
20
- padding: 0 0 8px 0 !important;
20
+ }
21
+
22
+ .option-group .option-group-content .label-space {
23
+ display: flex;
24
+ justify-content: space-between;
25
+ align-items: center;
26
+ width: 100%;
21
27
  }
22
28
 
23
29
  .option-group-search .form-control {
24
30
  height: 32px;
31
+ border-radius: 4px;
25
32
  }
26
33
 
27
34
  .option-group .none-search-result {
@@ -34,6 +41,7 @@
34
41
  flex: 1;
35
42
  max-height: 252px;
36
43
  overflow-y: auto;
44
+ padding: 8px;
37
45
  }
38
46
 
39
47
  .option-group .option-group-top {
@@ -44,7 +52,7 @@
44
52
  display: block;
45
53
  width: 100%;
46
54
  line-height: 24px;
47
- padding: 0.25rem 10px;
55
+ padding: 0.25rem 8px;
48
56
  clear: both;
49
57
  font-weight: 400;
50
58
  text-align: inherit;
@@ -53,30 +61,40 @@
53
61
  overflow: hidden;
54
62
  text-overflow: ellipsis;
55
63
  white-space: nowrap;
64
+ border-radius: 4px;
56
65
  }
57
66
 
58
- .option.option-active {
59
- background-color: #f5f5f5;
60
- color: #212529;
61
- cursor: pointer;
67
+ .option-group .option-group-search .form-control {
68
+ border: none;
69
+ border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
70
+ border-radius: 4px 4px 0 0;
71
+ padding: .375rem 1rem !important;
72
+ height: 32px;
62
73
  }
63
74
 
64
- .option:hover .header-icon .dtable-font,
65
- .option:hover .header-icon .multicolor-icon,
66
- .option.option-active .select-option-name {
67
- color: #fff;
75
+ .option-group .option-group-search .form-control:focus {
76
+ border-color: transparent !important;
77
+ border-bottom: 1px solid rgb(0 40 100 / 12%) !important;
78
+ box-shadow: none !important;
68
79
  }
69
80
 
70
- .option.option-active .header-icon .dtable-font,
71
- .option.option-active .header-icon .multicolor-icon {
72
- color: #fff;
81
+
82
+ .option-group-content .label-check-icon {
83
+ margin-left: 16px;
84
+ }
85
+
86
+ .option-group-content .dtable-icon-check {
87
+ font-size: 14px !important;
88
+ color: #666666;
73
89
  }
74
90
 
75
- .option:not(.option-active):hover .header-icon .dtable-font,
76
- .option:not(.option-active):hover .header-icon .multicolor-icon {
77
- color: #aaa;
91
+ .option.option-active {
92
+ background-color: #f5f5f5;
93
+ color: #212529;
94
+ cursor: pointer;
78
95
  }
79
96
 
97
+
80
98
  .option .select-option-name .multiple-select-option {
81
99
  margin: 0;
82
100
  }
@@ -132,10 +132,17 @@ class SelectOptionGroup extends _react.Component {
132
132
  });
133
133
  }
134
134
  };
135
+ this.isEqual = (obj1, obj2) => {
136
+ if (obj1 === obj2) return true;
137
+ if (!obj1 || !obj2) return false;
138
+ return JSON.stringify(obj1) === JSON.stringify(obj2);
139
+ };
135
140
  this.renderOptGroup = searchVal => {
136
141
  let {
137
142
  noOptionsPlaceholder,
138
- onSelectOption
143
+ onSelectOption,
144
+ value,
145
+ supportMultipleSelect
139
146
  } = this.props;
140
147
  this.filterOptions = this.props.getFilterOptions(searchVal);
141
148
  if (this.filterOptions.length === 0) {
@@ -147,6 +154,7 @@ class SelectOptionGroup extends _react.Component {
147
154
  return this.filterOptions.map((opt, i) => {
148
155
  let key = opt.value.column ? opt.value.column.key : i;
149
156
  let isActive = this.state.activeIndex === i;
157
+ let isSelected = value && typeof value === 'object' && !supportMultipleSelect ? this.isEqual(value.value, opt.value) : Array.isArray(value.value) ? value.value.includes(opt.value.column_key) : false;
150
158
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_option.default, {
151
159
  index: i,
152
160
  isActive: isActive,
@@ -155,8 +163,24 @@ class SelectOptionGroup extends _react.Component {
155
163
  changeIndex: this.changeIndex,
156
164
  supportMultipleSelect: this.props.supportMultipleSelect,
157
165
  disableHover: this.state.disableHover,
158
- children: opt.label
159
- }, `${key}-${i}`);
166
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
167
+ className: "label-space",
168
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
169
+ children: [" ", opt.label]
170
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
171
+ className: "label-check-icon",
172
+ children: [" ", isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
173
+ className: "dtable-font dtable-icon-check"
174
+ })]
175
+ })]
176
+ })
177
+ }, "".concat(key, "-").concat(i));
178
+ });
179
+ };
180
+ this.clearValue = () => {
181
+ this.setState({
182
+ searchVal: '',
183
+ activeIndex: -1
160
184
  });
161
185
  };
162
186
  this.state = {
@@ -216,7 +240,7 @@ class SelectOptionGroup extends _react.Component {
216
240
  style = {
217
241
  position: 'fixed',
218
242
  left: position.x,
219
- top: `${position.y + position.height + 4}px`,
243
+ top: "".concat(position.y + position.height + 4, "px"),
220
244
  minWidth: position.width,
221
245
  opacity: 0
222
246
  };
@@ -243,10 +267,24 @@ class SelectOptionGroup extends _react.Component {
243
267
  placeholder: searchPlaceholder,
244
268
  onChange: this.onChangeSearch,
245
269
  autoFocus: true,
246
- ref: this.searchInputRef
270
+ ref: this.searchInputRef,
271
+ clearValue: this.clearValue,
272
+ isClearable: true,
273
+ components: {
274
+ ClearIndicator: props => {
275
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
276
+ className: (0, _classnames.default)('select-search-text-clear input-icon-addon seatable-icon dtable-font dtable-icon-x'),
277
+ onClick: e => {
278
+ e.stopPropagation();
279
+ e.nativeEvent.stopImmediatePropagation();
280
+ props.clearValue();
281
+ }
282
+ });
283
+ }
284
+ }
247
285
  })
248
286
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
249
- className: `option-group-content ${!searchable && !supportMultipleSelect ? 'option-group-top' : ''}`,
287
+ className: "option-group-content ".concat(!searchable && !supportMultipleSelect ? 'option-group-top' : ''),
250
288
  ref: ref => this.optionGroupContentRef = ref,
251
289
  children: this.renderOptGroup(searchVal)
252
290
  }), addOptionAble && AddOption]
@@ -36,7 +36,7 @@ function SelectedDepartments(_ref) {
36
36
  "aria-label": name,
37
37
  children: name
38
38
  })
39
- }, `department-${index}`);
39
+ }, "department-".concat(index));
40
40
  }
41
41
  const department = idDepartmentMap[content];
42
42
  if (department) {
@@ -65,7 +65,7 @@ function SelectedDepartments(_ref) {
65
65
  })
66
66
  })
67
67
  })]
68
- }, `department-${index}`);
68
+ }, "department-".concat(index));
69
69
  }
70
70
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
71
71
  className: "department empty-department mr-1",
@@ -87,7 +87,7 @@ function SelectedDepartments(_ref) {
87
87
  })
88
88
  })
89
89
  })]
90
- }, `department-${index}`);
90
+ }, "department-".concat(index));
91
91
  }) : null;
92
92
  return dom;
93
93
  }
@@ -31,8 +31,8 @@ class SimpleLongTextFormatter extends _react.default.Component {
31
31
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
32
32
  className: "long-text-check-list",
33
33
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
34
- className: `dtable-font dtable-icon-check-square-solid ${checkList.completed === checkList.total ? 'long-text-check-list-completed' : ''}`
35
- }), `${checkList.completed}/${checkList.total}`]
34
+ className: "dtable-font dtable-icon-check-square-solid ".concat(checkList.completed === checkList.total ? 'long-text-check-list-completed' : '')
35
+ }), "".concat(checkList.completed, "/").concat(checkList.total)]
36
36
  });
37
37
  };
38
38
  this.renderImages = value => {
@@ -6,19 +6,21 @@ 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"));
9
11
  var _react = _interopRequireWildcard(require("react"));
10
12
  var _selectEditor = _interopRequireDefault(require("../select-editor"));
11
13
  var _jsxRuntime = require("react/jsx-runtime");
14
+ const _excluded = ["value"];
12
15
  const SingleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
13
16
  let {
14
- value: oldValue,
15
- ...props
16
- } = _ref;
17
+ value: oldValue
18
+ } = _ref,
19
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
17
20
  const value = oldValue ? [oldValue] : [];
18
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.default, {
19
- ...props,
21
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
20
22
  value: value,
21
23
  ref: ref
22
- });
24
+ }));
23
25
  });
24
26
  var _default = exports.default = SingleSelectEditor;
package/lib/TabBar/Tab.js CHANGED
@@ -1,11 +1,12 @@
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"));
9
10
  var React = _interopRequireWildcard(require("react"));
10
11
  var _Badge = _interopRequireDefault(require("../Badge"));
11
12
  var _jsxRuntime = require("react/jsx-runtime");
@@ -24,21 +25,21 @@ class Tab extends React.PureComponent {
24
25
  } = this.props;
25
26
  const iconRes = selected ? selectedIcon : icon;
26
27
  const iconDom = /*#__PURE__*/React.isValidElement(iconRes) ? iconRes : /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
27
- className: `${prefixCls}-image`,
28
+ className: "".concat(prefixCls, "-image"),
28
29
  src: iconRes ? iconRes.uri : iconRes,
29
30
  alt: title
30
31
  });
31
32
  if (badge) {
32
33
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Badge.default, {
33
34
  text: badge,
34
- className: `${prefixCls}-badge tab-badge`,
35
+ className: "".concat(prefixCls, "-badge tab-badge"),
35
36
  children: [' ', iconDom, ' ']
36
37
  });
37
38
  }
38
39
  if (dot) {
39
40
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
40
41
  dot: true,
41
- className: `${prefixCls}-badge tab-dot`,
42
+ className: "".concat(prefixCls, "-badge tab-dot"),
42
43
  children: iconDom
43
44
  });
44
45
  }
@@ -60,24 +61,23 @@ class Tab extends React.PureComponent {
60
61
  tintColor
61
62
  } = this.props;
62
63
  const iconColor = selected ? tintColor : unselectedTintColor;
63
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
64
- ...this.props.dataAttrs,
64
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.props.dataAttrs), {}, {
65
65
  onClick: this.onClick,
66
- className: `${prefixCls}`,
66
+ className: "".concat(prefixCls),
67
67
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
68
- className: `${prefixCls}-icon`,
68
+ className: "".concat(prefixCls, "-icon"),
69
69
  style: {
70
70
  color: iconColor
71
71
  },
72
72
  children: this.renderIcon()
73
73
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
74
- className: `${prefixCls}-title`,
74
+ className: "".concat(prefixCls, "-title"),
75
75
  style: {
76
76
  color: selected ? tintColor : unselectedTintColor
77
77
  },
78
78
  children: title
79
79
  })]
80
- });
80
+ }));
81
81
  }
82
82
  }
83
83
  var _default = exports.default = Tab;
@@ -1,11 +1,12 @@
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 = exports.Item = void 0;
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
10
  var React = _interopRequireWildcard(require("react"));
10
11
  var _getDataAttr = _interopRequireDefault(require("../utils/getDataAttr"));
11
12
  var _Tabs = _interopRequireDefault(require("../Tabs"));
@@ -37,9 +38,7 @@ class AntTabBar extends React.Component {
37
38
  const tabs = [];
38
39
  React.Children.forEach(this.props.children, c => {
39
40
  if (c) {
40
- tabs.push({
41
- ...c.props
42
- });
41
+ tabs.push((0, _objectSpread2.default)({}, c.props));
43
42
  }
44
43
  });
45
44
  return tabs;
@@ -56,7 +55,7 @@ class AntTabBar extends React.Component {
56
55
  const tabsData = this.getTabs();
57
56
  const content = Array.isArray(tabsData) ? tabsData.map((cProps, index) => {
58
57
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tab.default, {
59
- prefixCls: `${this.props.prefixCls}-tab`,
58
+ prefixCls: "".concat(this.props.prefixCls, "-tab"),
60
59
  badge: cProps.badge,
61
60
  dot: cProps.dot,
62
61
  selected: cProps.selected,
@@ -69,9 +68,9 @@ class AntTabBar extends React.Component {
69
68
  onClick: () => cProps.onPress && cProps.onPress()
70
69
  }, index);
71
70
  }) : null;
72
- let cls = `${prefixCls}-bar`;
71
+ let cls = "".concat(prefixCls, "-bar");
73
72
  if (hidden) {
74
- cls += ` ${prefixCls}-bar-hidden-${tabBarPosition}`;
73
+ cls += " ".concat(prefixCls, "-bar-hidden-").concat(tabBarPosition);
75
74
  }
76
75
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
77
76
  className: cls,
package/lib/Tabs/index.js CHANGED
@@ -1,20 +1,21 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = exports.DefaultTabBar = void 0;
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
8
10
  var React = _interopRequireWildcard(require("react"));
9
11
  var _rmcTabs = require("rmc-tabs");
10
12
  require("./index.css");
11
13
  var _jsxRuntime = require("react/jsx-runtime");
12
14
  class DefaultTabBar extends _rmcTabs.DefaultTabBar {}
13
15
  exports.DefaultTabBar = DefaultTabBar;
14
- DefaultTabBar.defaultProps = {
15
- ..._rmcTabs.DefaultTabBar.defaultProps,
16
+ DefaultTabBar.defaultProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _rmcTabs.DefaultTabBar.defaultProps), {}, {
16
17
  prefixCls: 'am-tabs-default-bar'
17
- };
18
+ });
18
19
  class Tabs extends React.PureComponent {
19
20
  constructor() {
20
21
  super(...arguments);
@@ -22,17 +23,15 @@ class Tabs extends React.PureComponent {
22
23
  const {
23
24
  renderTab
24
25
  } = this.props;
25
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(DefaultTabBar, {
26
- ...props,
26
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(DefaultTabBar, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
27
27
  renderTab: renderTab
28
- });
28
+ }));
29
29
  };
30
30
  }
31
31
  render() {
32
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcTabs.Tabs, {
33
- renderTabBar: this.renderTabBar,
34
- ...this.props
35
- });
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcTabs.Tabs, (0, _objectSpread2.default)({
33
+ renderTabBar: this.renderTabBar
34
+ }, this.props));
36
35
  }
37
36
  }
38
37
  exports.default = Tabs;
@@ -1,19 +1,21 @@
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
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
9
11
  var _classnames = _interopRequireDefault(require("classnames"));
10
12
  var React = _interopRequireWildcard(require("react"));
11
13
  var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
12
14
  var _exenv = require("../utils/exenv");
13
15
  require("./index.css");
14
16
  var _jsxRuntime = require("react/jsx-runtime");
17
+ const _excluded = ["prefixCls", "prefixListCls", "editable", "style", "clear", "children", "error", "className", "count", "labelNumber", "title", "onErrorClick", "autoHeight", "defaultValue"];
15
18
  /* tslint:disable:jsx-no-multiline-js */
16
-
17
19
  function noop() {}
18
20
  function fixControlledValue(value) {
19
21
  if (typeof value === 'undefined' || value === null) {
@@ -35,7 +37,7 @@ class TextareaItem extends React.Component {
35
37
  this.reAlignHeight = () => {
36
38
  const textareaDom = this.textareaRef;
37
39
  textareaDom.style.height = ''; // 字数减少时能自动减小高度
38
- textareaDom.style.height = `${textareaDom.scrollHeight}px`;
40
+ textareaDom.style.height = "".concat(textareaDom.scrollHeight, "px");
39
41
  };
40
42
  this.onChange = e => {
41
43
  const value = e.target.value;
@@ -133,23 +135,24 @@ class TextareaItem extends React.Component {
133
135
  }
134
136
  }
135
137
  render() {
136
- const {
137
- prefixCls,
138
- prefixListCls,
139
- editable,
140
- style,
141
- clear,
142
- children,
143
- error,
144
- className,
145
- count,
146
- labelNumber,
147
- title,
148
- onErrorClick,
149
- autoHeight,
150
- defaultValue,
151
- ...otherProps
152
- } = this.props;
138
+ const _this$props = this.props,
139
+ {
140
+ prefixCls,
141
+ prefixListCls,
142
+ editable,
143
+ style,
144
+ clear,
145
+ children,
146
+ error,
147
+ className,
148
+ count,
149
+ labelNumber,
150
+ title,
151
+ onErrorClick,
152
+ autoHeight,
153
+ defaultValue
154
+ } = _this$props,
155
+ otherProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
153
156
  const {
154
157
  disabled
155
158
  } = otherProps;
@@ -158,20 +161,20 @@ class TextareaItem extends React.Component {
158
161
  focus
159
162
  } = this.state;
160
163
  const hasCount = count > 0 && this.props.rows > 1;
161
- const wrapCls = (0, _classnames.default)(className, `${prefixListCls}-item`, `${prefixCls}-item`, {
162
- [`${prefixCls}-disabled`]: disabled,
163
- [`${prefixCls}-item-single-line`]: this.props.rows === 1 && !autoHeight,
164
- [`${prefixCls}-error`]: error,
165
- [`${prefixCls}-focus`]: focus,
166
- [`${prefixCls}-has-count`]: hasCount
164
+ const wrapCls = (0, _classnames.default)(className, "".concat(prefixListCls, "-item"), "".concat(prefixCls, "-item"), {
165
+ ["".concat(prefixCls, "-disabled")]: disabled,
166
+ ["".concat(prefixCls, "-item-single-line")]: this.props.rows === 1 && !autoHeight,
167
+ ["".concat(prefixCls, "-error")]: error,
168
+ ["".concat(prefixCls, "-focus")]: focus,
169
+ ["".concat(prefixCls, "-has-count")]: hasCount
167
170
  });
168
- const labelCls = (0, _classnames.default)(`${prefixCls}-label`, {
169
- [`${prefixCls}-label-2`]: labelNumber === 2,
170
- [`${prefixCls}-label-3`]: labelNumber === 3,
171
- [`${prefixCls}-label-4`]: labelNumber === 4,
172
- [`${prefixCls}-label-5`]: labelNumber === 5,
173
- [`${prefixCls}-label-6`]: labelNumber === 6,
174
- [`${prefixCls}-label-7`]: labelNumber === 7
171
+ const labelCls = (0, _classnames.default)("".concat(prefixCls, "-label"), {
172
+ ["".concat(prefixCls, "-label-2")]: labelNumber === 2,
173
+ ["".concat(prefixCls, "-label-3")]: labelNumber === 3,
174
+ ["".concat(prefixCls, "-label-4")]: labelNumber === 4,
175
+ ["".concat(prefixCls, "-label-5")]: labelNumber === 5,
176
+ ["".concat(prefixCls, "-label-6")]: labelNumber === 6,
177
+ ["".concat(prefixCls, "-label-7")]: labelNumber === 7
175
178
  });
176
179
  const characterLength = countSymbols(value);
177
180
  const lengthCtrlProps = {};
@@ -191,29 +194,28 @@ class TextareaItem extends React.Component {
191
194
  className: labelCls,
192
195
  children: title
193
196
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
194
- className: `${prefixCls}-control`,
195
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", {
196
- ref: el => this.textareaRef = el,
197
- ...lengthCtrlProps,
198
- ...otherProps,
197
+ className: "".concat(prefixCls, "-control"),
198
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
199
+ ref: el => this.textareaRef = el
200
+ }, lengthCtrlProps), otherProps), {}, {
199
201
  value: value,
200
202
  onChange: this.onChange,
201
203
  onBlur: this.onBlur,
202
204
  onFocus: this.onFocus,
203
205
  readOnly: !editable,
204
206
  style: style
205
- })
207
+ }))
206
208
  }), clear && editable && value && characterLength > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
207
- activeClassName: `${prefixCls}-clear-active`,
209
+ activeClassName: "".concat(prefixCls, "-clear-active"),
208
210
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
209
- className: `${prefixCls}-clear`,
211
+ className: "".concat(prefixCls, "-clear"),
210
212
  onClick: this.clearInput
211
213
  })
212
214
  }), error && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
213
- className: `${prefixCls}-error-extra`,
215
+ className: "".concat(prefixCls, "-error-extra"),
214
216
  onClick: this.onErrorClick
215
217
  }), hasCount && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
216
- className: `${prefixCls}-count`,
218
+ className: "".concat(prefixCls, "-count"),
217
219
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
218
220
  children: value ? characterLength : 0
219
221
  }), "/", count]
@@ -27,8 +27,8 @@ function getMessageInstance(mask, callback) {
27
27
  // clear rmc-notification default style
28
28
  transitionName: 'am-fade',
29
29
  className: (0, _classnames.default)({
30
- [`${prefixCls}-mask`]: mask,
31
- [`${prefixCls}-nomask`]: !mask
30
+ ["".concat(prefixCls, "-mask")]: mask,
31
+ ["".concat(prefixCls, "-nomask")]: !mask
32
32
  })
33
33
  }, notification => callback && callback(notification));
34
34
  }
@@ -63,18 +63,18 @@ function notice(content, type) {
63
63
  duration,
64
64
  style: {},
65
65
  content: iconType ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
66
- className: `${prefixCls}-text ${prefixCls}-text-icon`,
66
+ className: "".concat(prefixCls, "-text ").concat(prefixCls, "-text-icon"),
67
67
  role: "alert",
68
68
  "aria-live": "assertive",
69
69
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
70
70
  type: iconType,
71
71
  size: "lg"
72
72
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
73
- className: `${prefixCls}-text-info`,
73
+ className: "".concat(prefixCls, "-text-info"),
74
74
  children: content
75
75
  })]
76
76
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
77
- className: `${prefixCls}-text`,
77
+ className: "".concat(prefixCls, "-text"),
78
78
  role: "alert",
79
79
  "aria-live": "assertive",
80
80
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718937171668" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18368" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M489.6 444.8l294.4-294.4 67.2 67.2-294.4 294.4 294.4 294.4-67.2 67.2-294.4-294.4-272 272-67.2-67.2 272-272-272-272 67.2-67.2z" p-id="18369" fill="currentColor"></path></svg>
@@ -5,15 +5,15 @@ 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"));
8
9
  var _react = _interopRequireDefault(require("react"));
9
10
  var _dtableUtils = require("dtable-utils");
10
11
  var _baseFormatterConfig = _interopRequireDefault(require("./base-formatter-config"));
11
12
  var _LinkFormatter = _interopRequireDefault(require("../LinkFormatter"));
12
13
  var _FormulaFormatter = _interopRequireDefault(require("../FormulaFormatter"));
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
- const FormatterConfig = {
15
- ..._baseFormatterConfig.default,
15
+ const FormatterConfig = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _baseFormatterConfig.default), {}, {
16
16
  [_dtableUtils.CellType.FORMULA]: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormulaFormatter.default, {}),
17
17
  [_dtableUtils.CellType.LINK]: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LinkFormatter.default, {})
18
- };
18
+ });
19
19
  var _default = exports.default = FormatterConfig;