dtable-ui-component 6.0.126-beta.s1 → 6.0.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/lib/ActionSheet/index.js +14 -16
  2. package/lib/ActivityIndicator/index.js +7 -8
  3. package/lib/AsyncUserSelect/index.css +19 -46
  4. package/lib/AsyncUserSelect/index.js +58 -41
  5. package/lib/AsyncUserSelect/user-item.js +5 -6
  6. package/lib/AutoNumberFormatter/index.js +3 -4
  7. package/lib/Badge/index.js +9 -11
  8. package/lib/ButtonFormatter/index.js +6 -8
  9. package/lib/CTimeFormatter/index.js +3 -4
  10. package/lib/CheckboxEditor/index.js +1 -3
  11. package/lib/CheckboxEditor/mb-editor.js +9 -20
  12. package/lib/CheckboxEditor/pc-editor.js +12 -24
  13. package/lib/CheckboxFormatter/index.js +4 -5
  14. package/lib/CollaboratorEditor/index.js +2 -4
  15. package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
  16. package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
  17. package/lib/CollaboratorFormatter/index.js +8 -10
  18. package/lib/CollaboratorItem/index.js +4 -5
  19. package/lib/CollapsibleSettingLayout/index.js +9 -7
  20. package/lib/Comment/body/comment.js +10 -18
  21. package/lib/Comment/body/index.js +2 -4
  22. package/lib/Comment/footer/btns/index.js +4 -7
  23. package/lib/Comment/footer/index.js +9 -20
  24. package/lib/Comment/footer/input/index.js +29 -50
  25. package/lib/Comment/footer/input/participant/index.js +4 -5
  26. package/lib/Comment/footer/participants/index.js +4 -5
  27. package/lib/Comment/footer/participants/participant/index.js +1 -3
  28. package/lib/Comment/footer/participants/participant-select/index.js +8 -24
  29. package/lib/Comment/index.js +39 -57
  30. package/lib/Comment/utils/utilities.js +15 -21
  31. package/lib/CreatorFormatter/index.js +6 -8
  32. package/lib/DTableColorPicker/ColorPickerPortal/index.js +23 -19
  33. package/lib/DTableColorPicker/index.css +0 -2
  34. package/lib/DTableColorPicker/index.js +56 -41
  35. package/lib/DTableColorPicker/utils.js +4 -6
  36. package/lib/DTableColumnIcon/index.js +6 -7
  37. package/lib/DTableCommonAddTool/index.css +1 -3
  38. package/lib/DTableCommonAddTool/index.js +6 -8
  39. package/lib/DTableCustomFooter/index.css +1 -3
  40. package/lib/DTableCustomFooter/index.js +1 -3
  41. package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
  42. package/lib/DTableCustomizeSelect/index.css +43 -67
  43. package/lib/DTableCustomizeSelect/index.js +29 -40
  44. package/lib/DTableDropdownItem/index.js +16 -18
  45. package/lib/DTableDropdownMenu/index.js +8 -10
  46. package/lib/DTableEmptyTip/index.js +4 -5
  47. package/lib/DTableFiltersPopover/index.css +0 -2
  48. package/lib/DTableFiltersPopover/index.js +26 -41
  49. package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -5
  50. package/lib/DTableFiltersPopover/utils/index.js +63 -113
  51. package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -10
  52. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
  53. package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
  54. package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
  55. package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
  56. package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
  57. package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
  58. package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
  59. package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
  60. package/lib/DTableGroupSelect/index.css +5 -31
  61. package/lib/DTableGroupSelect/index.js +13 -17
  62. package/lib/DTableGroupSelect/select-option-group.css +15 -11
  63. package/lib/DTableGroupSelect/select-option-group.js +31 -43
  64. package/lib/DTableIcon/index.js +6 -7
  65. package/lib/DTableIcon/svg-icon.js +5 -7
  66. package/lib/DTableModalHeader/index.js +1 -3
  67. package/lib/DTablePopover/index.js +13 -16
  68. package/lib/DTableRadio/index.js +10 -9
  69. package/lib/DTableRadioGroup/index.js +8 -17
  70. package/lib/DTableSearchInput/index.js +19 -29
  71. package/lib/DTableSelect/dtable-select-label.css +4 -4
  72. package/lib/DTableSelect/dtable-select-label.js +7 -6
  73. package/lib/DTableSelect/index.js +24 -25
  74. package/lib/DTableSelect/user-select.css +46 -7
  75. package/lib/DTableSelect/utils.js +82 -179
  76. package/lib/DTableSubDropdownMenu/index.js +8 -10
  77. package/lib/DTableSubDropdownToggle/index.js +12 -12
  78. package/lib/DTableSwitch/index.css +0 -1
  79. package/lib/DTableSwitch/index.js +12 -11
  80. package/lib/DTableToolTip/index.js +7 -8
  81. package/lib/DateEditor/index.js +20 -15
  82. package/lib/DateEditor/mb-editor/index.js +18 -31
  83. package/lib/DateEditor/pc-editor.js +26 -45
  84. package/lib/DateFormatter/index.js +4 -5
  85. package/lib/DatePicker/index.js +9 -15
  86. package/lib/DatePicker/utils.js +1 -3
  87. package/lib/DeleteTip/index.js +5 -6
  88. package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
  89. package/lib/DepartmentSelectFilter/index.js +6 -8
  90. package/lib/DepartmentSingleSelectEditor/index.js +1 -3
  91. package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
  92. package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
  93. package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
  94. package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
  95. package/lib/DigitalSignEditor/index.js +1 -3
  96. package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
  97. package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
  98. package/lib/DigitalSignEditor/service.js +2 -4
  99. package/lib/DigitalSignEditor/signature-board/index.js +5 -8
  100. package/lib/DigitalSignEditor/utils.js +2 -4
  101. package/lib/DigitalSignFormatter/index.js +12 -15
  102. package/lib/DigitalSignFormatter/utils.js +4 -5
  103. package/lib/DurationEditor/index.js +21 -31
  104. package/lib/DurationFormatter/index.js +4 -5
  105. package/lib/EditEditorButton/index.js +1 -3
  106. package/lib/EmailFormatter/index.js +3 -4
  107. package/lib/FieldDisplaySetting/field-item.js +12 -12
  108. package/lib/FieldDisplaySetting/index.js +11 -9
  109. package/lib/FileEditor/files-previewer/index.js +1 -3
  110. package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
  111. package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
  112. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
  113. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
  114. package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
  115. package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
  116. package/lib/FileEditor/index.js +1 -3
  117. package/lib/FileEditor/mb-editor/index.js +28 -20
  118. package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
  119. package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
  120. package/lib/FileEditor/pc-editor/index.js +19 -27
  121. package/lib/FileFormatter/index.js +26 -19
  122. package/lib/FileItemFormatter/index.js +6 -9
  123. package/lib/FileUploader/index.js +28 -45
  124. package/lib/FormulaFormatter/index.js +15 -29
  125. package/lib/GeolocationEditor/index.js +11 -12
  126. package/lib/GeolocationEditor/map-editor-utils.js +17 -15
  127. package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
  128. package/lib/GeolocationEditor/mb-editor/index.js +4 -6
  129. package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
  130. package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
  131. package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
  132. package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
  133. package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
  134. package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
  135. package/lib/GeolocationEditor/pc-editor/index.js +12 -20
  136. package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
  137. package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
  138. package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
  139. package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
  140. package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
  141. package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
  142. package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
  143. package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
  144. package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
  145. package/lib/GeolocationFormatter/index.js +4 -5
  146. package/lib/HtmlLongTextFormatter/index.js +4 -12
  147. package/lib/Icon/index.js +3 -5
  148. package/lib/IconButton/index.js +4 -6
  149. package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
  150. package/lib/ImageEditor/images-previewer/index.js +3 -9
  151. package/lib/ImageEditor/index.js +1 -3
  152. package/lib/ImageEditor/mb-editor/index.js +28 -20
  153. package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
  154. package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
  155. package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
  156. package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
  157. package/lib/ImageEditor/pc-editor/index.js +11 -16
  158. package/lib/ImageFormatter/images-lazy-load.js +19 -11
  159. package/lib/ImageFormatter/index.js +11 -13
  160. package/lib/ImagePreviewerLightbox/index.js +15 -13
  161. package/lib/ImageThumbnail/index.js +10 -13
  162. package/lib/InputItem/custom-input.js +26 -46
  163. package/lib/InputItem/custom-keyboard.js +15 -18
  164. package/lib/InputItem/index.js +34 -50
  165. package/lib/InputItem/input.js +2 -4
  166. package/lib/LastModifierFormatter/index.js +6 -8
  167. package/lib/LinkEditor/index.js +33 -53
  168. package/lib/LinkEditor/link-editor-option.js +3 -4
  169. package/lib/LinkEditor/mb-popover/index.js +9 -22
  170. package/lib/LinkEditor/pc-popover/index.js +5 -10
  171. package/lib/LinkFormatter/index.js +21 -37
  172. package/lib/List/index.js +6 -8
  173. package/lib/List/list-item.js +22 -28
  174. package/lib/LongTextFormatter/index.js +4 -5
  175. package/lib/MBEditorHeader/index.js +7 -8
  176. package/lib/MTimeFormatter/index.js +3 -4
  177. package/lib/MobileFullScreenPage/body/index.js +3 -5
  178. package/lib/MobileFullScreenPage/header/index.js +4 -6
  179. package/lib/MobileFullScreenPage/index.js +13 -11
  180. package/lib/MobileModal/index.js +1 -3
  181. package/lib/MobileOperationSheet/index.js +7 -8
  182. package/lib/MobileSelector/empty/index.js +1 -3
  183. package/lib/MobileSelector/index.js +5 -7
  184. package/lib/MobileSelector/option/index.js +3 -5
  185. package/lib/MobileSelector/options/index.js +1 -3
  186. package/lib/MobileSelector/search/index.js +3 -5
  187. package/lib/MobileUpload/index.js +4 -5
  188. package/lib/Modal/modal.js +14 -15
  189. package/lib/Modal/prompt.js +4 -4
  190. package/lib/MultipleSelectEditor/index.js +1 -3
  191. package/lib/MultipleSelectFormatter/index.js +6 -8
  192. package/lib/NotificationPopover/index.css +1 -6
  193. package/lib/NotificationPopover/index.js +6 -7
  194. package/lib/NumberEditor/index.js +12 -21
  195. package/lib/NumberFormatter/index.js +4 -5
  196. package/lib/PhoneNumberLink/index.js +2 -4
  197. package/lib/Picker/AbstractPicker.js +23 -27
  198. package/lib/Popover/index.js +3 -4
  199. package/lib/Popover/item.js +7 -9
  200. package/lib/Progress/index.js +9 -8
  201. package/lib/Radio/Radio.js +4 -8
  202. package/lib/Radio/RadioItem.js +8 -12
  203. package/lib/RateFormatter/index.js +13 -13
  204. package/lib/RoleStatusEditor/index.js +18 -17
  205. package/lib/RowExpandDialog/body/index.js +32 -49
  206. package/lib/RowExpandDialog/column-content/index.js +5 -9
  207. package/lib/RowExpandDialog/header/index.js +6 -8
  208. package/lib/RowExpandDialog/index.js +49 -34
  209. package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
  210. package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
  211. package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
  212. package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
  213. package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
  214. package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
  215. package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
  216. package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
  217. package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
  218. package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
  219. package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
  220. package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
  221. package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
  222. package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
  223. package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
  224. package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
  225. package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
  226. package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
  227. package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
  228. package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
  229. package/lib/RowExpandEditor/index.js +4 -8
  230. package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
  231. package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
  232. package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
  233. package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
  234. package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
  235. package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
  236. package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
  237. package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
  238. package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
  239. package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
  240. package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
  241. package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
  242. package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
  243. package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
  244. package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
  245. package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
  246. package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
  247. package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
  248. package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
  249. package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
  250. package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
  251. package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
  252. package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
  253. package/lib/RowExpandFormatter/index.js +27 -41
  254. package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
  255. package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
  256. package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
  257. package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
  258. package/lib/RowExpandFormatter/text/index.js +4 -5
  259. package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
  260. package/lib/RowExpandView/body/index.js +22 -35
  261. package/lib/RowExpandView/column-content/index.js +3 -7
  262. package/lib/RowExpandView/index.js +42 -30
  263. package/lib/SelectItem/index.js +5 -7
  264. package/lib/SelectOptionGroup/index.css +25 -53
  265. package/lib/SelectOptionGroup/index.js +36 -84
  266. package/lib/SelectedDepartments/index.js +7 -9
  267. package/lib/SimpleLongTextFormatter/index.js +10 -16
  268. package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
  269. package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
  270. package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
  271. package/lib/SingleSelectEditor/index.js +1 -3
  272. package/lib/SingleSelectFormatter/index.js +8 -9
  273. package/lib/TabBar/Tab.js +14 -16
  274. package/lib/TabBar/index.js +18 -21
  275. package/lib/Tabs/index.js +1 -3
  276. package/lib/TextEditor/index.js +14 -23
  277. package/lib/TextFormatter/index.js +3 -4
  278. package/lib/TextareaItem/index.js +19 -26
  279. package/lib/Toast/index.js +3 -4
  280. package/lib/UrlFormatter/index.js +3 -4
  281. package/lib/common/editor-base.js +7 -12
  282. package/lib/hooks/common-hooks.js +2 -4
  283. package/lib/index.js +0 -7
  284. package/lib/select-editor/index.js +1 -3
  285. package/lib/select-editor/mb-editor/index.js +17 -28
  286. package/lib/select-editor/pc-editor/index.js +27 -42
  287. package/lib/toaster/alert.js +6 -7
  288. package/lib/toaster/toast.js +2 -3
  289. package/lib/toaster/toastManager.js +2 -4
  290. package/lib/utils/cell.js +8 -11
  291. package/lib/utils/column-utils.js +8 -14
  292. package/lib/utils/departments.js +1 -3
  293. package/lib/utils/url.js +24 -31
  294. package/lib/utils/utils.js +2 -6
  295. package/package.json +8 -8
  296. package/lib/DTableCustomizeSearchInput/index.css +0 -81
  297. package/lib/DTableCustomizeSearchInput/index.js +0 -141
  298. package/lib/DTableCustomizeSelect/select-option-group/KeyCodes.js +0 -109
  299. package/lib/DTableCustomizeSelect/select-option-group/index.css +0 -134
  300. package/lib/DTableCustomizeSelect/select-option-group/index.js +0 -260
  301. package/lib/DTableCustomizeSelect/select-option-group/option.js +0 -48
  302. package/lib/DTableCustomizeSelect/util.js +0 -12
  303. package/lib/DTableSelect/select-dropdown-indicator/index.css +0 -16
  304. package/lib/DTableSelect/select-dropdown-indicator/index.js +0 -26
  305. package/lib/DTableSelect/select-style.js +0 -133
  306. package/lib/assets/icons/close.svg +0 -1
  307. package/lib/assets/icons/down.svg +0 -3
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
- var _DTableCustomizeSearchInput = _interopRequireDefault(require("../DTableCustomizeSearchInput"));
11
+ var _DTableSearchInput = _interopRequireDefault(require("../DTableSearchInput"));
12
12
  var _option = _interopRequireDefault(require("./option"));
13
13
  var _KeyCodes = _interopRequireDefault(require("../SelectOptionGroup/KeyCodes"));
14
14
  require("./select-option-group.css");
@@ -21,14 +21,12 @@ class SelectOptionGroup extends _react.Component {
21
21
  this.props.onClickOutside(e);
22
22
  };
23
23
  this.resetMenuStyle = () => {
24
- const {
25
- isInModal,
26
- position
27
- } = this.props;
28
- const {
29
- top,
30
- height
31
- } = this.optionGroupRef.getBoundingClientRect();
24
+ const _this$props = this.props,
25
+ isInModal = _this$props.isInModal,
26
+ position = _this$props.position;
27
+ const _this$optionGroupRef$ = this.optionGroupRef.getBoundingClientRect(),
28
+ top = _this$optionGroupRef$.top,
29
+ height = _this$optionGroupRef$.height;
32
30
  if (isInModal) {
33
31
  if (position.y + position.height + height > window.innerHeight) {
34
32
  this.optionGroupRef.style.top = position.y - height + 'px';
@@ -76,9 +74,7 @@ class SelectOptionGroup extends _react.Component {
76
74
  }
77
75
  };
78
76
  this.onMouseDown = e => {
79
- const {
80
- isInModal
81
- } = this.props;
77
+ const isInModal = this.props.isInModal;
82
78
  // prevent event propagation when click option or search input
83
79
  if (isInModal) {
84
80
  e.stopPropagation();
@@ -86,10 +82,9 @@ class SelectOptionGroup extends _react.Component {
86
82
  }
87
83
  };
88
84
  this.scrollContent = () => {
89
- const {
90
- offsetHeight,
91
- scrollTop
92
- } = this.optionGroupContentRef;
85
+ const _this$optionGroupCont = this.optionGroupContentRef,
86
+ offsetHeight = _this$optionGroupCont.offsetHeight,
87
+ scrollTop = _this$optionGroupCont.scrollTop;
93
88
  this.setState({
94
89
  disableHover: true
95
90
  });
@@ -126,11 +121,10 @@ class SelectOptionGroup extends _react.Component {
126
121
  });
127
122
  };
128
123
  this.renderOptGroup = searchVal => {
129
- let {
130
- noOptionsPlaceholder,
131
- onSelectOption,
132
- selectedOptions
133
- } = this.props;
124
+ let _this$props2 = this.props,
125
+ noOptionsPlaceholder = _this$props2.noOptionsPlaceholder,
126
+ onSelectOption = _this$props2.onSelectOption,
127
+ selectedOptions = _this$props2.selectedOptions;
134
128
  this.filterOptions = this.props.getFilterOptions(searchVal);
135
129
  if (this.filterOptions.length === 0) {
136
130
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -152,7 +146,7 @@ class SelectOptionGroup extends _react.Component {
152
146
  title: option.label,
153
147
  children: option.label
154
148
  }), isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
155
- className: "dtable-font dtable-icon-check"
149
+ className: "dtable-font dtable-icon-check-mark"
156
150
  })]
157
151
  }, "".concat(option.id, "-").concat(index));
158
152
  });
@@ -180,18 +174,15 @@ class SelectOptionGroup extends _react.Component {
180
174
  document.removeEventListener('mousedown', this.handleDocumentClick);
181
175
  }
182
176
  render() {
183
- const {
184
- searchPlaceholder,
185
- top,
186
- left,
187
- minWidth,
188
- isInModal,
189
- position,
190
- className
191
- } = this.props;
192
- let {
193
- searchVal
194
- } = this.state;
177
+ const _this$props3 = this.props,
178
+ searchPlaceholder = _this$props3.searchPlaceholder,
179
+ top = _this$props3.top,
180
+ left = _this$props3.left,
181
+ minWidth = _this$props3.minWidth,
182
+ isInModal = _this$props3.isInModal,
183
+ position = _this$props3.position,
184
+ className = _this$props3.className;
185
+ let searchVal = this.state.searchVal;
195
186
  let style = {
196
187
  top: top || 0,
197
188
  left: left || 0
@@ -213,20 +204,17 @@ class SelectOptionGroup extends _react.Component {
213
204
  };
214
205
  }
215
206
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
216
- className: (0, _classnames.default)('option-group group-selector seatable-group-select', className ? 'option-group-' + className : ''),
207
+ className: (0, _classnames.default)('option-group group-selector', className ? 'option-group-' + className : ''),
217
208
  ref: ref => this.optionGroupRef = ref,
218
209
  style: style,
219
210
  onMouseDown: this.onMouseDown,
220
- children: [this.props.options && this.props.options.length > 10 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
221
- className: "seatable-search-input",
222
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableCustomizeSearchInput.default, {
211
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
212
+ className: "option-group-search position-relative",
213
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
214
+ className: "option-search-control",
223
215
  placeholder: searchPlaceholder,
224
216
  onChange: this.onChangeSearch,
225
- autoFocus: true,
226
- value: searchVal,
227
- clearValue: this.clearValue,
228
- isClearable: true,
229
- isLeftIcon: true
217
+ ref: this.searchInputRef
230
218
  })
231
219
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
232
220
  className: "option-group-content",
@@ -11,13 +11,12 @@ var _svgIcon = _interopRequireDefault(require("./svg-icon"));
11
11
  require("./index.css");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  const DTableIcon = _ref => {
14
- let {
15
- className,
16
- symbol,
17
- color,
18
- ariaHidden = false,
19
- getSvg
20
- } = _ref;
14
+ let className = _ref.className,
15
+ symbol = _ref.symbol,
16
+ color = _ref.color,
17
+ _ref$ariaHidden = _ref.ariaHidden,
18
+ ariaHidden = _ref$ariaHidden === void 0 ? false : _ref$ariaHidden,
19
+ getSvg = _ref.getSvg;
21
20
  if (!symbol) return null;
22
21
  if (symbol.includes('dtable-icon')) {
23
22
  let customProps = {};
@@ -26,13 +26,11 @@ const getSvgIconComponents = () => {
26
26
  return svgIconComponents;
27
27
  };
28
28
  const SvgIcon = _ref => {
29
- let {
30
- className,
31
- symbol,
32
- color,
33
- ariaHidden,
34
- getSvg
35
- } = _ref;
29
+ let className = _ref.className,
30
+ symbol = _ref.symbol,
31
+ color = _ref.color,
32
+ ariaHidden = _ref.ariaHidden,
33
+ getSvg = _ref.getSvg;
36
34
  if (!symbol) return null;
37
35
  let props = {
38
36
  style: {
@@ -14,9 +14,7 @@ require("./index.css");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  const _excluded = ["children"];
16
16
  const DTableModalHeader = _ref => {
17
- let {
18
- children
19
- } = _ref,
17
+ let children = _ref.children,
20
18
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
19
  const customCloseBtn = /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
22
20
  type: "button",
@@ -18,10 +18,9 @@ class DTablePopover extends _react.default.Component {
18
18
  this.props.hideDTablePopover(e);
19
19
  };
20
20
  this.onKeyDown = e => {
21
- const {
22
- canHideDTablePopover,
23
- hideDTablePopoverWithEsc
24
- } = this.props;
21
+ const _this$props = this.props,
22
+ canHideDTablePopover = _this$props.canHideDTablePopover,
23
+ hideDTablePopoverWithEsc = _this$props.hideDTablePopoverWithEsc;
25
24
  if (e.keyCode === 27 && typeof hideDTablePopoverWithEsc === 'function') {
26
25
  e.preventDefault();
27
26
  hideDTablePopoverWithEsc();
@@ -32,9 +31,7 @@ class DTablePopover extends _react.default.Component {
32
31
  }
33
32
  };
34
33
  this.onMousedown = e => {
35
- const {
36
- canHideDTablePopover
37
- } = this.props;
34
+ const canHideDTablePopover = this.props.canHideDTablePopover;
38
35
  if (!canHideDTablePopover) return;
39
36
  if (this.dtablePopoverRef && e && (0, _utils.getEventClassName)(e).indexOf('popover') === -1 && !this.dtablePopoverRef.contains(e.target)) {
40
37
  this.props.hideDTablePopover(e);
@@ -55,14 +52,13 @@ class DTablePopover extends _react.default.Component {
55
52
  window.removeEventListener('popstate', this.onHistoryState);
56
53
  }
57
54
  render() {
58
- const {
59
- target,
60
- innerClassName,
61
- popoverClassName,
62
- hideArrow,
63
- modifiers,
64
- placement
65
- } = this.props;
55
+ const _this$props2 = this.props,
56
+ target = _this$props2.target,
57
+ innerClassName = _this$props2.innerClassName,
58
+ popoverClassName = _this$props2.popoverClassName,
59
+ hideArrow = _this$props2.hideArrow,
60
+ modifiers = _this$props2.modifiers,
61
+ placement = _this$props2.placement;
66
62
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
67
63
  placement: placement,
68
64
  isOpen: true,
@@ -70,11 +66,12 @@ class DTablePopover extends _react.default.Component {
70
66
  fade: false,
71
67
  hideArrow: hideArrow,
72
68
  innerClassName: innerClassName,
73
- className: popoverClassName,
69
+ className: "dtable-popove ".concat(popoverClassName),
74
70
  modifiers: modifiers,
75
71
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
76
72
  ref: ref => this.dtablePopoverRef = ref,
77
73
  onClick: this.onPopoverInsideClick,
74
+ className: "dtable-popover-container",
78
75
  children: this.props.children
79
76
  })
80
77
  });
@@ -10,15 +10,16 @@ var _classnames = _interopRequireDefault(require("classnames"));
10
10
  require("./index.css");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  function DTableRadio(_ref) {
13
- let {
14
- disabled = false,
15
- name = 'dtable-radio-input',
16
- onCheckedChange = () => {},
17
- className,
18
- isChecked,
19
- value,
20
- label
21
- } = _ref;
13
+ let _ref$disabled = _ref.disabled,
14
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
15
+ _ref$name = _ref.name,
16
+ name = _ref$name === void 0 ? 'dtable-radio-input' : _ref$name,
17
+ _ref$onCheckedChange = _ref.onCheckedChange,
18
+ onCheckedChange = _ref$onCheckedChange === void 0 ? () => {} : _ref$onCheckedChange,
19
+ className = _ref.className,
20
+ isChecked = _ref.isChecked,
21
+ value = _ref.value,
22
+ label = _ref.label;
22
23
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
23
24
  className: (0, _classnames.default)('dtable-radio w-100 align-items-center position-relative', {
24
25
  'dtable-radio-disable': disabled,
@@ -28,9 +28,7 @@ class DTableRadioGroup extends _react.default.Component {
28
28
  this.setTransitionTimer = null;
29
29
  };
30
30
  this.onSelectChanged = event => {
31
- const {
32
- option
33
- } = event.target.dataset;
31
+ const option = event.target.dataset.option;
34
32
  if (option === this.state.activeOption) return;
35
33
  this.setState({
36
34
  activeOption: option
@@ -45,17 +43,13 @@ class DTableRadioGroup extends _react.default.Component {
45
43
  this.setTransitionTimer = null;
46
44
  }
47
45
  componentDidMount() {
48
- const {
49
- options
50
- } = this.props;
46
+ const options = this.props.options;
51
47
  if (!this.btn || !this.slider || !Array.isArray(options)) return;
52
48
  this.slider.style.width = "".concat(100 / options.length, "%");
53
49
  this.setSliderTransition();
54
50
  }
55
51
  componentDidUpdate(prevProps) {
56
- const {
57
- activeOption
58
- } = this.props;
52
+ const activeOption = this.props.activeOption;
59
53
  if (activeOption !== prevProps.activeOption && activeOption !== this.state.activeOption) {
60
54
  this.setState({
61
55
  activeOption
@@ -66,14 +60,11 @@ class DTableRadioGroup extends _react.default.Component {
66
60
  this.clearTransitionTimer();
67
61
  }
68
62
  render() {
69
- const {
70
- options,
71
- optionsDisplay,
72
- readOnly
73
- } = this.props;
74
- const {
75
- activeOption
76
- } = this.state;
63
+ const _this$props = this.props,
64
+ options = _this$props.options,
65
+ optionsDisplay = _this$props.optionsDisplay,
66
+ readOnly = _this$props.readOnly;
67
+ const activeOption = this.state.activeOption;
77
68
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
78
69
  className: "radio-group-wrapper",
79
70
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -18,10 +18,9 @@ class DtableSearchInput extends _react.Component {
18
18
  };
19
19
  this.onChange = e => {
20
20
  this.timer && clearTimeout(this.timer);
21
- const {
22
- onChange,
23
- wait
24
- } = this.props;
21
+ const _this$props = this.props,
22
+ onChange = _this$props.onChange,
23
+ wait = _this$props.wait;
25
24
  let text = e.target.value;
26
25
  this.setState({
27
26
  searchValue: text || ''
@@ -37,9 +36,7 @@ class DtableSearchInput extends _react.Component {
37
36
  this.onChange(e);
38
37
  };
39
38
  this.clearSearch = () => {
40
- const {
41
- clearValue
42
- } = this.props;
39
+ const clearValue = this.props.clearValue;
43
40
  this.setState({
44
41
  searchValue: ''
45
42
  }, () => {
@@ -55,18 +52,14 @@ class DtableSearchInput extends _react.Component {
55
52
  }
56
53
  };
57
54
  this.renderClear = () => {
58
- const {
59
- isClearable,
60
- clearClassName,
61
- components = {}
62
- } = this.props;
63
- const {
64
- searchValue
65
- } = this.state;
55
+ const _this$props2 = this.props,
56
+ isClearable = _this$props2.isClearable,
57
+ clearClassName = _this$props2.clearClassName,
58
+ _this$props2$componen = _this$props2.components,
59
+ components = _this$props2$componen === void 0 ? {} : _this$props2$componen;
60
+ const searchValue = this.state.searchValue;
66
61
  if (!isClearable || !searchValue) return null;
67
- const {
68
- ClearIndicator
69
- } = components;
62
+ const ClearIndicator = components.ClearIndicator;
70
63
  if (/*#__PURE__*/_react.default.isValidElement(ClearIndicator)) {
71
64
  return /*#__PURE__*/_react.default.cloneElement(ClearIndicator, {
72
65
  clearValue: this.clearSearch
@@ -102,17 +95,14 @@ class DtableSearchInput extends _react.Component {
102
95
  this.inputRef = null;
103
96
  }
104
97
  render() {
105
- const {
106
- placeholder,
107
- autoFocus,
108
- className,
109
- onKeyDown,
110
- disabled,
111
- style
112
- } = this.props;
113
- const {
114
- searchValue
115
- } = this.state;
98
+ const _this$props3 = this.props,
99
+ placeholder = _this$props3.placeholder,
100
+ autoFocus = _this$props3.autoFocus,
101
+ className = _this$props3.className,
102
+ onKeyDown = _this$props3.onKeyDown,
103
+ disabled = _this$props3.disabled,
104
+ style = _this$props3.style;
105
+ const searchValue = this.state.searchValue;
116
106
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
117
107
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
118
108
  ref: ref => this.inputRef = ref,
@@ -1,10 +1,10 @@
1
1
  .dtable-select-check-icon {
2
- width: 14px;
3
- height: 14px;
2
+ width: 20px;
3
+ height: 20px;
4
4
  text-align: center;
5
5
  }
6
6
 
7
7
  .dtable-select-check-icon .dtable-font {
8
- font-size: 14px;
9
- color: #666;
8
+ font-size: 12px;
9
+ color: #798d99;
10
10
  }
@@ -9,11 +9,12 @@ var _react = _interopRequireDefault(require("react"));
9
9
  require("./dtable-select-label.css");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function DTableSelectLabel(_ref) {
12
- let {
13
- classname = '',
14
- name = '',
15
- isSelect = false
16
- } = _ref;
12
+ let _ref$classname = _ref.classname,
13
+ classname = _ref$classname === void 0 ? '' : _ref$classname,
14
+ _ref$name = _ref.name,
15
+ name = _ref$name === void 0 ? '' : _ref$name,
16
+ _ref$isSelect = _ref.isSelect,
17
+ isSelect = _ref$isSelect === void 0 ? false : _ref$isSelect;
17
18
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
18
19
  className: "".concat(classname, " w-100 d-flex justify-content-between"),
19
20
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
@@ -21,7 +22,7 @@ function DTableSelectLabel(_ref) {
21
22
  }), isSelect && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
22
23
  className: "dtable-select-check-icon",
23
24
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
24
- className: "dtable-font dtable-icon-check"
25
+ className: "dtable-font dtable-icon-check-mark"
25
26
  })
26
27
  })]
27
28
  });
@@ -12,39 +12,37 @@ var _utils = require("./utils");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  class DTableSelect extends _react.default.Component {
14
14
  render() {
15
- const {
16
- options,
17
- onChange,
18
- value,
19
- isSearchable,
20
- placeholder,
21
- isMulti,
22
- menuPosition,
23
- isClearable,
24
- noOptionsMessage,
25
- classNamePrefix,
26
- style,
27
- innerRef,
28
- isDisabled,
29
- form,
30
- customFilterOption,
31
- autoFocus,
32
- className,
33
- closeMenuOnSelect,
34
- onMenuClose,
35
- components: userComponents
36
- } = this.props;
15
+ const _this$props = this.props,
16
+ options = _this$props.options,
17
+ onChange = _this$props.onChange,
18
+ value = _this$props.value,
19
+ isSearchable = _this$props.isSearchable,
20
+ placeholder = _this$props.placeholder,
21
+ isMulti = _this$props.isMulti,
22
+ menuPosition = _this$props.menuPosition,
23
+ isClearable = _this$props.isClearable,
24
+ noOptionsMessage = _this$props.noOptionsMessage,
25
+ classNamePrefix = _this$props.classNamePrefix,
26
+ style = _this$props.style,
27
+ innerRef = _this$props.innerRef,
28
+ isDisabled = _this$props.isDisabled,
29
+ form = _this$props.form,
30
+ customFilterOption = _this$props.customFilterOption,
31
+ autoFocus = _this$props.autoFocus,
32
+ className = _this$props.className,
33
+ closeMenuOnSelect = _this$props.closeMenuOnSelect,
34
+ onMenuClose = _this$props.onMenuClose,
35
+ userComponents = _this$props.components;
37
36
  const mergedComponents = (0, _objectSpread2.default)({
38
37
  Option: _utils.Option,
39
38
  DropdownIndicator: _utils.DropdownIndicator,
40
39
  MenuList: _utils.MenuList,
41
40
  ClearIndicator: _utils.ClearIndicator
42
41
  }, userComponents);
43
- const processedOptions = (0, _utils.processOptionsWithClear)(options, isClearable);
44
42
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSelect.default, {
45
43
  value: value,
46
- onChange: (0, _utils.createHandleChange)(onChange),
47
- options: processedOptions,
44
+ onChange: onChange,
45
+ options: options,
48
46
  isMulti: isMulti,
49
47
  className: className,
50
48
  classNamePrefix: classNamePrefix,
@@ -52,6 +50,7 @@ class DTableSelect extends _react.default.Component {
52
50
  components: mergedComponents,
53
51
  placeholder: placeholder,
54
52
  isSearchable: isSearchable,
53
+ isClearable: isClearable,
55
54
  menuPosition: menuPosition || 'fixed' // when use default menuPosition(absolute), menuPortalTarget is unnecessary.
56
55
  ,
57
56
  menuShouldScrollIntoView: true,
@@ -1,12 +1,51 @@
1
- /* hide checkbox in select value container */
2
- .seatable-select-value-container .seatable-multicolor-icon-check {
3
- display: none;
1
+ .user-select .select-module-container {
2
+ display: flex;
3
+ align-items: center;
4
4
  }
5
5
 
6
- .seatable-select-value-container .select-option-label {
7
- font-size: 14px !important;
6
+ .user-select .select-module.select-module-avatar {
7
+ height: 24px;
8
+ width: 24px;
9
+ border-radius: 50%;
8
10
  }
9
11
 
10
- .seatable-check-color {
11
- color: var(--bs-icon-secondary-color);
12
+ .user-select .select-module.select-module-name {
13
+ color: #212529;
14
+ font-size: 14px;
15
+ }
16
+
17
+ .user-select .true__value-container .select-module-container {
18
+ display: block;
19
+ }
20
+
21
+ .user-select .true__value-container .select-module.select-module-avatar {
22
+ height: 16px;
23
+ width: 16px;
24
+ border-radius: 50%;
25
+ }
26
+
27
+ .user-select .true__value-container .true__multi-value__label {
28
+ padding: 0px;
29
+ }
30
+
31
+ .user-select .true__value-container .true__multi-value__label .select-module.select-module-avatar {
32
+ transform: translateY(-2px);
33
+ }
34
+
35
+ .user-select .true__value-container .select-module.select-module-name {
36
+ font-size: 13px;
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
39
+ white-space: nowrap;
40
+ flex: 1 1;
41
+ line-height: 20px;
42
+ margin-left: 5px;
43
+ }
44
+
45
+ .user-select .true__control.true__control--is-focused,
46
+ .user-select .true__control.true__control--is-focused:hover {
47
+ background-color: #ffffff;
48
+ border-color: #1991eb;
49
+ outline: 0;
50
+ box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.25);
12
51
  }