@zohodesk/dot 1.2.4 → 1.3.0

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 (257) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/PropValidationExcludeFilesArray.js +1 -1
  3. package/.cli/propValidation_report.html +1 -1
  4. package/README.md +9 -0
  5. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  6. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  7. package/coverage/ExternalLink/index.html +1 -1
  8. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  9. package/coverage/ExternalLink/props/index.html +1 -1
  10. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  11. package/coverage/Image/Image.js.html +1 -1
  12. package/coverage/Image/Image.module.css.html +1 -1
  13. package/coverage/Image/index.html +1 -1
  14. package/coverage/Image/props/defaultProps.js.html +1 -1
  15. package/coverage/Image/props/index.html +1 -1
  16. package/coverage/Image/props/propTypes.js.html +1 -1
  17. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  18. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  19. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  20. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  21. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  22. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  23. package/coverage/coverage-final.json +12 -12
  24. package/coverage/coverage-summary.json +12 -12
  25. package/coverage/index.html +1 -1
  26. package/es/Drawer/Drawer.js +3 -2
  27. package/es/v1/ActionButton/ActionButton.js +11 -8
  28. package/es/v1/AlphabeticList/AlphabeticList.js +2 -2
  29. package/es/v1/Attachment/Attachment.js +1 -1
  30. package/es/v1/AttachmentViewer/AttachmentViewer.js +4 -4
  31. package/es/v1/ChannelIcon/ChannelIcon.js +1 -1
  32. package/es/v1/Drawer/Drawer.js +6 -6
  33. package/es/v1/FlipCard/FlipCard.js +4 -4
  34. package/es/v1/FormAction/FormAction.js +1 -1
  35. package/es/v1/FreezeLayer/FreezeLayer.js +3 -3
  36. package/es/v1/{version2/GlobalNotification → GlobalNotification}/GlobalNotification.js +7 -7
  37. package/es/v1/IconButton/IconButton.js +3 -3
  38. package/es/v1/ImportantNotes/ImportantNotes.js +1 -1
  39. package/es/v1/Loader/Loader.js +1 -1
  40. package/es/v1/MessageBanner/MessageBanner.js +1 -1
  41. package/es/v1/NewStar/NewStar.js +1 -1
  42. package/es/v1/Separator/Separator.js +1 -1
  43. package/es/v1/TagWithIcon/TagWithIcon.js +1 -1
  44. package/es/v1/ToastMessage/ToastMessage.js +4 -4
  45. package/es/v1/Upload/Upload.js +1 -1
  46. package/es/v1/{version2 → alert}/AlertClose/AlertClose.js +1 -1
  47. package/es/v1/alert/AlertHeader/AlertHeader.js +58 -49
  48. package/es/v1/alert/AlertLookup/AlertLookup.js +101 -41
  49. package/es/v1/avatar/AvatarClose/AvatarClose.js +1 -1
  50. package/es/v1/avatar/AvatarCollision/AvatarCollision.js +1 -1
  51. package/es/v1/avatar/AvatarIcon/AvatarIcon.js +2 -2
  52. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +1 -1
  53. package/es/v1/avatar/AvatarThread/AvatarThread.js +1 -1
  54. package/es/v1/avatar/AvatarUser/AvatarUser.js +1 -1
  55. package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
  56. package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +18 -15
  57. package/es/v1/errorstate/Inconvenience/Inconvenience.js +53 -80
  58. package/es/v1/{version2/errorstate → errorstate}/OopsSomethingMiss/OopsSomethingMiss.js +6 -6
  59. package/es/v1/{version2/errorstate → errorstate}/UnableToProcessRequest/UnableToProcessRequest.js +6 -6
  60. package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +54 -73
  61. package/es/v1/{version2/errorstate → errorstate}/UrlNotFound/UrlNotFound.js +6 -6
  62. package/es/v1/{version2/errorstate → errorstate}/WillBeRightBack/WillBeRightBack.js +6 -6
  63. package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +102 -118
  64. package/es/v1/form/fields/CurrencyField/CurrencyField.js +128 -154
  65. package/es/v1/form/fields/DateField/DateField.js +131 -162
  66. package/es/v1/form/fields/FieldContainer/FieldContainer.js +52 -57
  67. package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +144 -168
  68. package/es/v1/form/fields/PhoneField/PhoneField.js +128 -156
  69. package/es/v1/form/fields/RadioField/RadioField.js +2 -2
  70. package/es/v1/form/fields/SelectField/SelectField.js +3 -3
  71. package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +8 -8
  72. package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +8 -5
  73. package/es/v1/form/fields/TextBoxField/TextBoxField.js +3 -3
  74. package/es/v1/form/fields/TextEditor/TextEditor.js +1 -1
  75. package/es/v1/form/fields/TextEditorField/TextEditorField.js +1 -1
  76. package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
  77. package/es/v1/form/fields/TextareaField/TextareaField.js +3 -3
  78. package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +2 -2
  79. package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
  80. package/es/v1/layout/SubtabLayout/SubtabLayout.js +2 -2
  81. package/es/v1/list/AvatarFlip/AvatarFlip.js +61 -64
  82. package/es/v1/list/BluePrintStatus/BluePrintStatus.js +11 -18
  83. package/es/v1/list/Comment/Comment.js +25 -32
  84. package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +57 -72
  85. package/es/v1/list/Dot/Dot.js +9 -16
  86. package/es/v1/list/DotNew/DotNew.js +11 -18
  87. package/es/v1/list/GridStencils/GridStencils.js +21 -24
  88. package/es/v1/list/Icons/AddNewIcon.js +19 -22
  89. package/es/v1/list/Icons/CompleteIcon.js +21 -24
  90. package/es/v1/list/Icons/DeleteIcon.js +22 -25
  91. package/es/v1/list/Icons/EditIcon.js +22 -25
  92. package/es/v1/list/Icons/FloatingIcons.js +12 -19
  93. package/es/v1/list/Icons/ReadUnreadIcon.js +24 -27
  94. package/es/v1/list/Icons/SmartIcon.js +20 -23
  95. package/es/v1/list/ListLayout/ListLayout.js +54 -68
  96. package/es/v1/list/ListStencils/ListStencils.js +28 -31
  97. package/es/v1/list/SecondaryText/AccountName.js +1 -1
  98. package/es/v1/list/SecondaryText/ContactName.js +1 -1
  99. package/es/v1/list/SecondryPanel/SecondryPanel.js +1 -2
  100. package/es/v1/list/Thread/Thread.js +1 -1
  101. package/es/v1/list/UserTime/UserTime.js +1 -1
  102. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +266 -357
  103. package/es/v1/list/status/StatusListItem/StatusListItem.js +5 -5
  104. package/es/v1/lookup/Lookup/Lookup.js +4 -3
  105. package/es/v1/lookup/Section/Section.js +1 -1
  106. package/es/v1/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
  107. package/es/v1/lookup/header/Search/Search.js +3 -3
  108. package/es/v1/lookup/header/TicketHeader/TicketHeader.js +1 -1
  109. package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +10 -9
  110. package/es/v1/{version2/notification → notification}/DesktopNotification/DesktopNotification.js +6 -6
  111. package/es/v1/{version2/notification → notification}/DesktopNotificationHeader/DesktopNotificationHeader.js +6 -6
  112. package/es/v1/setup/header/Button/Button.js +1 -1
  113. package/es/v1/setup/header/Link/Link.js +1 -1
  114. package/es/v1/setup/header/Search/Search.js +1 -1
  115. package/es/v1/setup/table/Table/Table.js +1 -1
  116. package/es/v1/setup/table/TableBody/TableBody.js +1 -1
  117. package/es/v1/setup/table/TableData/TableData.js +1 -1
  118. package/es/v1/setup/table/TableHead/TableHead.js +1 -1
  119. package/es/v1/setup/table/TableRow/TableRow.js +1 -1
  120. package/lib/Drawer/Drawer.js +3 -2
  121. package/lib/v1/ActionButton/ActionButton.js +11 -9
  122. package/lib/v1/AlphabeticList/AlphabeticList.js +2 -4
  123. package/lib/v1/Attachment/Attachment.js +1 -1
  124. package/lib/v1/AttachmentViewer/AttachmentViewer.js +4 -4
  125. package/lib/v1/ChannelIcon/ChannelIcon.js +1 -1
  126. package/lib/v1/Drawer/Drawer.js +6 -6
  127. package/lib/v1/FlipCard/FlipCard.js +4 -4
  128. package/lib/v1/FormAction/FormAction.js +1 -1
  129. package/lib/v1/FreezeLayer/FreezeLayer.js +3 -3
  130. package/lib/v1/{version2/GlobalNotification → GlobalNotification}/GlobalNotification.js +7 -7
  131. package/lib/v1/IconButton/IconButton.js +3 -3
  132. package/lib/v1/ImportantNotes/ImportantNotes.js +1 -1
  133. package/lib/v1/Loader/Loader.js +1 -1
  134. package/lib/v1/MessageBanner/MessageBanner.js +1 -1
  135. package/lib/v1/NewStar/NewStar.js +1 -1
  136. package/lib/v1/Separator/Separator.js +1 -1
  137. package/lib/v1/TagWithIcon/TagWithIcon.js +1 -1
  138. package/lib/v1/ToastMessage/ToastMessage.js +4 -4
  139. package/lib/v1/Upload/Upload.js +1 -1
  140. package/lib/v1/{version2 → alert}/AlertClose/AlertClose.js +1 -1
  141. package/lib/v1/alert/AlertHeader/AlertHeader.js +68 -50
  142. package/lib/v1/alert/AlertLookup/AlertLookup.js +109 -42
  143. package/lib/v1/avatar/AvatarClose/AvatarClose.js +1 -1
  144. package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +1 -1
  145. package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +2 -2
  146. package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +1 -1
  147. package/lib/v1/avatar/AvatarThread/AvatarThread.js +1 -1
  148. package/lib/v1/avatar/AvatarUser/AvatarUser.js +1 -1
  149. package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
  150. package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +18 -16
  151. package/lib/v1/errorstate/Inconvenience/Inconvenience.js +53 -115
  152. package/lib/v1/{version2/errorstate → errorstate}/OopsSomethingMiss/OopsSomethingMiss.js +6 -6
  153. package/lib/v1/{version2/errorstate → errorstate}/UnableToProcessRequest/UnableToProcessRequest.js +6 -6
  154. package/lib/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +54 -108
  155. package/lib/v1/{version2/errorstate → errorstate}/UrlNotFound/UrlNotFound.js +6 -6
  156. package/lib/v1/{version2/errorstate → errorstate}/WillBeRightBack/WillBeRightBack.js +6 -6
  157. package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +107 -159
  158. package/lib/v1/form/fields/CurrencyField/CurrencyField.js +152 -193
  159. package/lib/v1/form/fields/DateField/DateField.js +140 -206
  160. package/lib/v1/form/fields/FieldContainer/FieldContainer.js +60 -91
  161. package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +168 -228
  162. package/lib/v1/form/fields/PhoneField/PhoneField.js +150 -193
  163. package/lib/v1/form/fields/RadioField/RadioField.js +2 -2
  164. package/lib/v1/form/fields/SelectField/SelectField.js +3 -3
  165. package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +8 -8
  166. package/lib/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -8
  167. package/lib/v1/form/fields/TextBoxField/TextBoxField.js +3 -3
  168. package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
  169. package/lib/v1/form/fields/TextEditorField/TextEditorField.js +1 -1
  170. package/lib/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
  171. package/lib/v1/form/fields/TextareaField/TextareaField.js +3 -3
  172. package/lib/v1/form/fields/ValidationMessage/ValidationMessage.js +2 -2
  173. package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
  174. package/lib/v1/layout/SubtabLayout/SubtabLayout.js +2 -2
  175. package/lib/v1/list/AvatarFlip/AvatarFlip.js +61 -106
  176. package/lib/v1/list/BluePrintStatus/BluePrintStatus.js +11 -51
  177. package/lib/v1/list/Comment/Comment.js +24 -69
  178. package/lib/v1/list/DepartmentDropDown/DepartmentDropDown.js +67 -122
  179. package/lib/v1/list/Dot/Dot.js +9 -54
  180. package/lib/v1/list/DotNew/DotNew.js +11 -56
  181. package/lib/v1/list/GridStencils/GridStencils.js +21 -62
  182. package/lib/v1/list/Icons/AddNewIcon.js +19 -60
  183. package/lib/v1/list/Icons/CompleteIcon.js +21 -62
  184. package/lib/v1/list/Icons/DeleteIcon.js +22 -63
  185. package/lib/v1/list/Icons/EditIcon.js +22 -63
  186. package/lib/v1/list/Icons/FloatingIcons.js +17 -62
  187. package/lib/v1/list/Icons/ReadUnreadIcon.js +24 -65
  188. package/lib/v1/list/Icons/SmartIcon.js +20 -65
  189. package/lib/v1/list/ListLayout/ListLayout.js +53 -116
  190. package/lib/v1/list/ListStencils/ListStencils.js +33 -72
  191. package/lib/v1/list/SecondaryText/AccountName.js +1 -1
  192. package/lib/v1/list/SecondaryText/ContactName.js +1 -1
  193. package/lib/v1/list/SecondryPanel/SecondryPanel.js +3 -5
  194. package/lib/v1/list/Thread/Thread.js +1 -1
  195. package/lib/v1/list/UserTime/UserTime.js +1 -1
  196. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +367 -472
  197. package/lib/v1/list/status/StatusListItem/StatusListItem.js +5 -5
  198. package/lib/v1/lookup/Lookup/Lookup.js +5 -3
  199. package/lib/v1/lookup/Section/Section.js +1 -1
  200. package/lib/v1/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
  201. package/lib/v1/lookup/header/Search/Search.js +3 -3
  202. package/lib/v1/lookup/header/TicketHeader/TicketHeader.js +1 -1
  203. package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +10 -9
  204. package/lib/v1/{version2/notification → notification}/DesktopNotification/DesktopNotification.js +6 -6
  205. package/lib/v1/{version2/notification → notification}/DesktopNotificationHeader/DesktopNotificationHeader.js +6 -6
  206. package/lib/v1/setup/header/Button/Button.js +1 -1
  207. package/lib/v1/setup/header/Link/Link.js +1 -1
  208. package/lib/v1/setup/header/Search/Search.js +1 -1
  209. package/lib/v1/setup/table/Table/Table.js +1 -1
  210. package/lib/v1/setup/table/TableBody/TableBody.js +1 -1
  211. package/lib/v1/setup/table/TableData/TableData.js +1 -1
  212. package/lib/v1/setup/table/TableHead/TableHead.js +1 -1
  213. package/lib/v1/setup/table/TableRow/TableRow.js +1 -1
  214. package/package.json +8 -8
  215. package/result.json +1 -1
  216. package/es/v1/errorstate/LinkText/LinkText.js +0 -29
  217. package/es/v1/errorstate/NoRequestFound/NoRequestFound.js +0 -84
  218. package/es/v1/errorstate/PermissionPlay/PermissionPlay.js +0 -83
  219. package/es/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +0 -84
  220. package/es/v1/errorstate/UnableToProcess/UnableToProcess.js +0 -86
  221. package/es/v1/errorstate/WillBack/WillBack.js +0 -75
  222. package/es/v1/errorstate/index.js +0 -8
  223. package/es/v1/version2/errorstate/Inconvenience/Inconvenience.js +0 -63
  224. package/es/v1/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +0 -65
  225. package/es/v1/version2/index.js +0 -12
  226. package/es/v1/version2/lookup/AlertHeader/AlertHeader.js +0 -79
  227. package/es/v1/version2/lookup/AlertLookup/AlertLookup.js +0 -164
  228. package/lib/v1/errorstate/LinkText/LinkText.js +0 -80
  229. package/lib/v1/errorstate/NoRequestFound/NoRequestFound.js +0 -135
  230. package/lib/v1/errorstate/PermissionPlay/PermissionPlay.js +0 -134
  231. package/lib/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +0 -135
  232. package/lib/v1/errorstate/UnableToProcess/UnableToProcess.js +0 -137
  233. package/lib/v1/errorstate/WillBack/WillBack.js +0 -125
  234. package/lib/v1/errorstate/index.js +0 -71
  235. package/lib/v1/version2/errorstate/Inconvenience/Inconvenience.js +0 -79
  236. package/lib/v1/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +0 -81
  237. package/lib/v1/version2/index.js +0 -58
  238. package/lib/v1/version2/lookup/AlertHeader/AlertHeader.js +0 -104
  239. package/lib/v1/version2/lookup/AlertLookup/AlertLookup.js +0 -185
  240. /package/es/v1/{version2 → alert}/alertIcons/AlarmAlertIcon.js +0 -0
  241. /package/es/v1/{version2 → alert}/alertIcons/AlertIcons.js +0 -0
  242. /package/es/v1/{version2 → alert}/alertIcons/DangerAlertIcon.js +0 -0
  243. /package/es/v1/{version2 → alert}/alertIcons/ErrorAlertIcon.js +0 -0
  244. /package/es/v1/{version2 → alert}/alertIcons/InfoAlertIcon.js +0 -0
  245. /package/es/v1/{version2 → alert}/alertIcons/NotificationAlertIcon.js +0 -0
  246. /package/es/v1/{version2 → alert}/alertIcons/SuccessAlertIcon.js +0 -0
  247. /package/es/v1/{version2 → alert}/alertIcons/WarningAlertIcon.js +0 -0
  248. /package/es/v1/{version2 → alert}/alertIcons/index.js +0 -0
  249. /package/lib/v1/{version2 → alert}/alertIcons/AlarmAlertIcon.js +0 -0
  250. /package/lib/v1/{version2 → alert}/alertIcons/AlertIcons.js +0 -0
  251. /package/lib/v1/{version2 → alert}/alertIcons/DangerAlertIcon.js +0 -0
  252. /package/lib/v1/{version2 → alert}/alertIcons/ErrorAlertIcon.js +0 -0
  253. /package/lib/v1/{version2 → alert}/alertIcons/InfoAlertIcon.js +0 -0
  254. /package/lib/v1/{version2 → alert}/alertIcons/NotificationAlertIcon.js +0 -0
  255. /package/lib/v1/{version2 → alert}/alertIcons/SuccessAlertIcon.js +0 -0
  256. /package/lib/v1/{version2 → alert}/alertIcons/WarningAlertIcon.js +0 -0
  257. /package/lib/v1/{version2 → alert}/alertIcons/index.js +0 -0
@@ -1,158 +1,136 @@
1
- import React from 'react';
1
+ import React, { useState, useRef } from 'react';
2
+ import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
2
3
  import { defaultProps } from '../../../../list/status/StatusDropdown/props/defaultProps';
3
4
  import { propTypes } from '../../../../list/status/StatusDropdown/props/propTypes';
4
5
  import { Icon } from '@zohodesk/icons';
5
- import Popup from '@zohodesk/components/lib/Popup/Popup';
6
- import { Box, Container } from '@zohodesk/components/lib/Layout';
7
- import DropDownHeading from '@zohodesk/components/lib/DropDown/DropDownHeading';
8
- import TextBoxIcon from '@zohodesk/components/lib/TextBoxIcon/TextBoxIcon';
6
+ import Popup from '@zohodesk/components/es/v1/Popup/Popup';
7
+ import { Box, Container } from '@zohodesk/components/es/v1/Layout';
8
+ import DropDownHeading from '@zohodesk/components/es/v1/DropDown/DropDownHeading';
9
+ import TextBoxIcon from '@zohodesk/components/es/v1/TextBoxIcon/TextBoxIcon';
9
10
  import Loader from '@zohodesk/svg/lib/Loader/Loader';
10
11
  import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch';
11
- import { scrollTo } from '@zohodesk/components/lib/utils/Common.js';
12
- import TextBox from '@zohodesk/components/lib/TextBox/TextBox';
12
+ import { scrollTo } from '@zohodesk/components/es/utils/Common';
13
+ import TextBox from '@zohodesk/components/es/v1/TextBox/TextBox';
13
14
  import CommonEmptyState from '../../../emptystate/CommonEmptyState/CommonEmptyState';
14
15
  import StatusListItem from '../StatusListItem/StatusListItem';
15
- import commonStyle from '@zohodesk/components/lib/common/common.module.css';
16
- import ResponsiveDropBox from '@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox';
17
- import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
18
- import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
19
- import btnStyle from '@zohodesk/components/lib/semantic/Button/semanticButton.module.css';
16
+ import commonStyle from '@zohodesk/components/es/common/common.module.css';
17
+ import ResponsiveDropBox from '@zohodesk/components/es/v1/ResponsiveDropBox/ResponsiveDropBox';
18
+ import { ResponsiveReceiver } from '@zohodesk/components/es/v1/Responsive/CustomResponsive';
19
+ import { useUniqueId } from '@zohodesk/components/es/v1/Provider/IdProvider';
20
+ import btnStyle from '@zohodesk/components/es/semantic/Button/semanticButton.module.css';
20
21
  import style from '../../../../list/status/StatusDropdown/StatusDropdown.module.css';
21
- export class StatusDropdown extends React.Component {
22
- constructor(props) {
23
- super(props);
24
- this.state = {
25
- searchString: '',
26
- selectedIndex: 0,
27
- options: props.options
28
- };
29
- this.handleChange = this.handleChange.bind(this);
30
- this.handleKeyDown = this.handleKeyDown.bind(this);
31
- this.onSelect = this.onSelect.bind(this);
32
- this.handleTogglePopup = this.handleTogglePopup.bind(this);
33
- this.onSearchClear = this.onSearchClear.bind(this);
34
- this.searchList = this.searchList.bind(this);
35
- this.scrollContentRef = this.scrollContentRef.bind(this);
36
- this.handleMouseEnter = this.handleMouseEnter.bind(this);
37
- this.searchInputRef = this.searchInputRef.bind(this);
38
- this.itemRef = this.itemRef.bind(this);
39
- this.inputRef = this.inputRef.bind(this);
40
- this.handleScroll = this.handleScroll.bind(this);
41
- this.emptySearchSVG = this.emptySearchSVG.bind(this);
42
- this.getAriaId = getUniqueId(this);
43
- }
44
22
 
45
- emptySearchSVG() {
23
+ function StatusDropdown(props) {
24
+ let {
25
+ value,
26
+ removeClose,
27
+ boxSize,
28
+ keyName,
29
+ idName,
30
+ title,
31
+ isSearch,
32
+ isArrow,
33
+ placeHolderText,
34
+ className,
35
+ right,
36
+ left,
37
+ top,
38
+ bottom,
39
+ isPopupOpen: isOpen,
40
+ isPopupReady,
41
+ position,
42
+ getTargetRef,
43
+ getContainerRef,
44
+ dataId,
45
+ searchBoxSize,
46
+ searchEmptyHint,
47
+ searchErrorText,
48
+ activeStyle,
49
+ showOnHover = false,
50
+ isDisabled,
51
+ showIconOnHover,
52
+ isReadOnly,
53
+ hoverStyle,
54
+ isEditable,
55
+ needTick,
56
+ dataTitle,
57
+ isDataLoaded,
58
+ children,
59
+ targetAlign,
60
+ needResponsive,
61
+ arrowIconPosition,
62
+ statusColor,
63
+ needExternalPopupState = false,
64
+ isPopupActive = false,
65
+ needMultiLineText,
66
+ boxPosition,
67
+ togglePopup,
68
+ onTogglePopup,
69
+ onClick,
70
+ onSelectLabel,
71
+ isNextOptions,
72
+ getNextOptions,
73
+ options,
74
+ a11y = {}
75
+ } = props;
76
+ const [optionsList, setOptionsList] = useState(options);
77
+ const [selectedIndex, setSelectedIndex] = useState(0);
78
+ const [searchString, setSearchString] = useState('');
79
+ const hiddenInput = useRef(null);
80
+ const searchInput = useRef(null);
81
+ const optionsContainer = useRef(null);
82
+ const dropdown = useRef({});
83
+ const getAriaId = useUniqueId();
84
+ const {
85
+ tabIndex = 0,
86
+ ariaLabelledby,
87
+ ariaLabel
88
+ } = a11y;
89
+ let isPopupOpen = needExternalPopupState ? isPopupActive && isOpen : isOpen;
90
+ let containerClass = `${className ? className : ''} ${isPopupReady ? activeStyle ? activeStyle : '' : showIconOnHover ? style.hoverIcon : ''} ${isDisabled ? commonStyle.disabled : isReadOnly ? style.readOnly : !isEditable ? style.cursorDefault : !showOnHover ? `${style.cursor} ${hoverStyle ? hoverStyle : ''}` : `${hoverStyle ? hoverStyle : ''} ${style.cursorDefault}`}`;
91
+ let ariaTitleId = getAriaId();
92
+
93
+ function emptySearchSVG() {
46
94
  return /*#__PURE__*/React.createElement(EmptySearch, {
47
95
  size: "small"
48
96
  });
49
97
  }
50
98
 
51
- inputRef(el) {
52
- this.hiddenInput = el;
99
+ function handleInputRef(el) {
100
+ hiddenInput.current = el;
53
101
  }
54
102
 
55
- itemRef(ele, index, id) {
56
- this[`suggestion_${id}`] = ele;
103
+ function itemRef(ele, index, id) {
104
+ dropdown.current[`suggestion_${id}`] = ele;
57
105
  }
58
106
 
59
- searchInputRef(el) {
60
- this.searchInput = el;
107
+ function searchInputRef(el) {
108
+ searchInput.current = el;
61
109
  }
62
110
 
63
- handleTogglePopup(e) {
64
- let {
65
- togglePopup,
66
- boxPosition,
67
- onSelectLabel,
68
- isPopupOpen,
69
- onTogglePopup
70
- } = this.props;
111
+ function handleTogglePopup(e) {
71
112
  !isPopupOpen && onSelectLabel && onSelectLabel(e);
72
113
  onTogglePopup && onTogglePopup(isPopupOpen);
73
114
  togglePopup(e, boxPosition);
74
115
  }
75
116
 
76
- scrollContentRef(el) {
77
- let {
78
- isPopupOpen
79
- } = this.props;
80
-
117
+ function scrollContentRef(el) {
81
118
  if (isPopupOpen) {
82
- this.optionsContainer = el;
119
+ optionsContainer.current = el;
83
120
  }
84
121
  }
85
122
 
86
- UNSAFE_componentWillReceiveProps(nextProps) {
87
- if (nextProps.options.length != this.props.options.length) {
88
- this.setState({
89
- options: nextProps.options
90
- });
91
- }
92
- }
93
-
94
- onSelect(element, e) {
95
- let {
96
- onClick,
97
- togglePopup,
98
- isPopupOpen,
99
- onTogglePopup
100
- } = this.props;
123
+ function onSelect(element, e) {
101
124
  onClick && onClick(e, element);
102
125
  onTogglePopup && onTogglePopup(isPopupOpen);
103
126
  togglePopup(e);
104
127
  }
105
128
 
106
- componentDidUpdate(prevProps) {
107
- let {
108
- isPopupOpen,
109
- isSearch,
110
- idName
111
- } = this.props;
112
- let {
113
- selectedIndex,
114
- options
115
- } = this.state;
116
-
117
- if (prevProps.isPopupOpen != isPopupOpen) {
118
- setTimeout(() => {
119
- isPopupOpen && isSearch ? this.searchInput && this.searchInput.focus() : this.hiddenInput && this.hiddenInput.focus();
120
- }, 10);
121
- }
122
-
123
- let mergeOptions = options;
124
- let option = mergeOptions[selectedIndex];
125
- let id = option && option[idName] || {};
126
- let selSuggestion = this[`suggestion_${id}`];
127
-
128
- if (isPopupOpen) {
129
- this.optionsContainer && scrollTo(this.optionsContainer, selSuggestion);
130
- }
131
-
132
- if (!prevProps.isPopupOpen && this.props.isPopupOpen) {
133
- this.onSearchClear();
134
- }
135
- }
136
-
137
- handleKeyDown(e) {
129
+ function handleKeyDown(e) {
138
130
  let {
139
131
  keyCode
140
132
  } = e;
141
- let {
142
- selectedIndex,
143
- options
144
- } = this.state;
145
- let totalIndex = options.length;
146
- let {
147
- togglePopup,
148
- onClick,
149
- boxPosition,
150
- isPopupReady,
151
- isNextOptions,
152
- getNextOptions,
153
- onTogglePopup,
154
- isPopupOpen
155
- } = this.props;
133
+ let totalIndex = optionsList.length;
156
134
 
157
135
  if (isPopupReady && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
158
136
  e.preventDefault(); //prevent body scroll
@@ -162,36 +140,28 @@ export class StatusDropdown extends React.Component {
162
140
  switch (keyCode) {
163
141
  case 40:
164
142
  if (selectedIndex === totalIndex - 1) {
165
- this.setState({
166
- selectedIndex: 0
167
- });
143
+ setSelectedIndex(0);
168
144
  } else {
169
145
  if (selectedIndex === totalIndex - 3) {
170
146
  isNextOptions && getNextOptions && getNextOptions();
171
147
  }
172
148
 
173
- this.setState({
174
- selectedIndex: selectedIndex + 1
175
- });
149
+ setSelectedIndex(selectedIndex + 1);
176
150
  }
177
151
 
178
152
  break;
179
153
 
180
154
  case 38:
181
155
  if (selectedIndex === 0) {
182
- this.setState({
183
- selectedIndex: totalIndex - 1
184
- });
156
+ setSelectedIndex(totalIndex - 1);
185
157
  } else {
186
- this.setState({
187
- selectedIndex: selectedIndex - 1
188
- });
158
+ setSelectedIndex(selectedIndex - 1);
189
159
  }
190
160
 
191
161
  break;
192
162
 
193
163
  case 13:
194
- onClick && onClick(options[selectedIndex].name, e);
164
+ onClick && onClick(optionsList[selectedIndex].name, e);
195
165
  onTogglePopup && onTogglePopup(isPopupOpen);
196
166
  togglePopup(e, boxPosition);
197
167
  break;
@@ -206,50 +176,35 @@ export class StatusDropdown extends React.Component {
206
176
  }
207
177
  }
208
178
 
209
- searchList(value) {
210
- let {
211
- options,
212
- keyName
213
- } = this.props;
179
+ function searchList(value) {
214
180
  let foptions = options.filter(dept => dept[keyName].toLowerCase().indexOf(value.toLowerCase()) != -1);
215
181
  return foptions;
216
182
  }
217
183
 
218
- handleChange(value, e) {
219
- let foptions = this.searchList(value);
220
- this.setState({
221
- searchString: value,
222
- selectedIndex: -1,
223
- options: foptions
224
- });
184
+ function handleChange(value, e) {
185
+ let foptions = searchList(value);
186
+ setSearchString(value);
187
+ setSelectedIndex(-1);
188
+ setOptionsList(foptions);
225
189
  }
226
190
 
227
- onSearchClear() {
228
- let foptions = this.searchList('');
229
- this.setState({
230
- searchString: '',
231
- options: foptions
232
- });
191
+ function onSearchClear() {
192
+ let foptions = searchList('');
193
+ setSearchString('');
194
+ setOptionsList(foptions);
233
195
  }
234
196
 
235
- handleMouseEnter(id, value, index, e) {
236
- this.setState({
237
- selectedIndex: index
238
- });
197
+ function handleMouseEnter(id, value, index, e) {
198
+ setSelectedIndex(index);
239
199
  }
240
200
 
241
- handleScroll(e) {
242
- const {
243
- isNextOptions,
244
- getNextOptions
245
- } = this.props;
246
-
201
+ function handleScroll(e) {
247
202
  if (e.target.scrollTop + e.target.offsetHeight > e.target.scrollHeight - 1) {
248
203
  isNextOptions && getNextOptions && getNextOptions(e);
249
204
  }
250
205
  }
251
206
 
252
- responsiveFunc(_ref) {
207
+ function responsiveFunc(_ref) {
253
208
  let {
254
209
  mediaQueryOR
255
210
  } = _ref;
@@ -260,206 +215,160 @@ export class StatusDropdown extends React.Component {
260
215
  };
261
216
  }
262
217
 
263
- render() {
264
- let {
265
- options,
266
- selectedIndex
267
- } = this.state;
268
- let {
269
- value,
270
- removeClose,
271
- boxSize,
272
- keyName,
273
- idName,
274
- title,
275
- isSearch,
276
- isArrow,
277
- placeHolderText,
278
- className,
279
- right,
280
- left,
281
- top,
282
- bottom,
283
- isPopupOpen: isOpen,
284
- isPopupReady,
285
- position,
286
- getTargetRef,
287
- getContainerRef,
288
- dataId,
289
- searchBoxSize,
290
- searchEmptyHint,
291
- searchErrorText,
292
- activeStyle,
293
- showOnHover = false,
294
- isDisabled,
295
- showIconOnHover,
296
- isReadOnly,
297
- hoverStyle,
298
- isEditable,
299
- needTick,
300
- dataTitle,
301
- isDataLoaded,
302
- children,
303
- targetAlign,
304
- needResponsive,
305
- arrowIconPosition,
306
- statusColor,
307
- needExternalPopupState = false,
308
- isPopupActive = false,
309
- needMultiLineText,
310
- a11y = {}
311
- } = this.props;
312
- const {
313
- tabIndex = 0,
314
- ariaLabelledby,
315
- ariaLabel
316
- } = a11y;
317
- let isPopupOpen = needExternalPopupState ? isPopupActive && isOpen : isOpen;
218
+ useEffectCallOnlyAfterState(() => {
219
+ setOptionsList(options);
220
+ }, [options.length]);
221
+ useEffectCallOnlyAfterState(() => {
222
+ setTimeout(() => {
223
+ isPopupOpen && isSearch ? searchInput.current && searchInput.current.focus() : hiddenInput.current && hiddenInput.current.focus();
224
+ }, 10);
225
+ let mergeOptions = optionsList;
226
+ let option = mergeOptions[selectedIndex];
227
+ let id = option && option[idName] || {};
228
+ let selSuggestion = dropdown.current[`suggestion_${id}`];
229
+
230
+ if (isPopupOpen) {
231
+ optionsContainer.current && scrollTo(optionsContainer.current, selSuggestion);
232
+ onSearchClear();
233
+ }
234
+ }, [isPopupOpen]);
235
+ return /*#__PURE__*/React.createElement("div", {
236
+ className: style.posRel,
237
+ onMouseEnter: showOnHover && !isDisabled && !isReadOnly && isEditable ? handleTogglePopup : undefined,
238
+ onMouseLeave: showOnHover && !isDisabled && !isReadOnly && isEditable ? handleTogglePopup : undefined
239
+ }, /*#__PURE__*/React.createElement(Container, {
240
+ tagName: "button",
241
+ alignBox: "row",
242
+ className: `${style.container} ${containerClass} ${btnStyle.buttonReset}`,
243
+ onMouseDown: !showOnHover && !isDisabled && !isReadOnly && isEditable ? handleTogglePopup : null,
244
+ eleRef: getTargetRef,
245
+ align: targetAlign,
246
+ isCover: false,
247
+ dataId: dataId,
248
+ onClick: removeClose,
249
+ disabled: isDisabled || isReadOnly ? true : false,
250
+ "aria-haspopup": true,
251
+ "aria-expanded": isPopupOpen && isEditable ? true : false,
252
+ tabIndex: tabIndex,
253
+ "aria-labelledby": ariaLabelledby,
254
+ "aria-label": ariaLabel,
255
+ "aria-disabled": isDisabled || isReadOnly
256
+ }, isEditable ? /*#__PURE__*/React.createElement("div", {
257
+ className: style.hiddenInput
258
+ }, /*#__PURE__*/React.createElement(TextBox, {
259
+ type: "text",
260
+ inputRef: handleInputRef,
261
+ onKeyDown: handleKeyDown,
262
+ needAppearance: false,
263
+ placeHolder: placeHolderText
264
+ })) : null, children ? children : /*#__PURE__*/React.createElement(Box, {
265
+ className: `${style.value} toggleDropText`,
266
+ shrink: true,
267
+ tagName: "span",
268
+ "data-title": dataTitle
269
+ }, value), isEditable ? /*#__PURE__*/React.createElement(Icon, {
270
+ "aria-hidden": true,
271
+ size: "7",
272
+ name: "ZD-down",
273
+ iconClass: `${'toggleDropIcon'} ${style.arrow} ${style[`${arrowIconPosition}_arrow`]}`,
274
+ dataId: "statusdownarrow"
275
+ }) : null), isPopupOpen && isEditable ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
276
+ query: responsiveFunc,
277
+ responsiveId: "Helmet"
278
+ }, _ref2 => {
318
279
  let {
319
- searchString
320
- } = this.state;
321
- let containerClass = `${className ? className : ''} ${isPopupReady ? activeStyle ? activeStyle : '' : showIconOnHover ? style.hoverIcon : ''} ${isDisabled ? commonStyle.disabled : isReadOnly ? style.readOnly : !isEditable ? style.cursorDefault : !showOnHover ? `${style.cursor} ${hoverStyle ? hoverStyle : ''}` : `${hoverStyle ? hoverStyle : ''} ${style.cursorDefault}`}`;
322
- let ariaTitleId = this.getAriaId();
323
- return /*#__PURE__*/React.createElement("div", {
324
- className: style.posRel,
325
- onMouseEnter: showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : undefined,
326
- onMouseLeave: showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : undefined
327
- }, /*#__PURE__*/React.createElement(Container, {
328
- tagName: "button",
329
- alignBox: "row",
330
- className: `${style.container} ${containerClass} ${btnStyle.buttonReset}`,
331
- onMouseDown: !showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : null,
332
- eleRef: getTargetRef,
333
- align: targetAlign,
334
- isCover: false,
335
- dataId: dataId,
280
+ tabletMode
281
+ } = _ref2;
282
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
283
+ boxPosition: position,
284
+ isActive: isPopupReady,
336
285
  onClick: removeClose,
337
- disabled: isDisabled || isReadOnly ? true : false,
338
- "aria-haspopup": true,
339
- "aria-expanded": isPopupOpen && isEditable ? true : false,
340
- tabIndex: tabIndex,
341
- "aria-labelledby": ariaLabelledby,
342
- "aria-label": ariaLabel,
343
- "aria-disabled": isDisabled || isReadOnly
344
- }, isEditable ? /*#__PURE__*/React.createElement("div", {
345
- className: style.hiddenInput
346
- }, /*#__PURE__*/React.createElement(TextBox, {
347
- type: "text",
348
- inputRef: this.inputRef,
349
- onKeyDown: this.handleKeyDown,
350
- needAppearance: false,
351
- placeHolder: placeHolderText
352
- })) : null, children ? children : /*#__PURE__*/React.createElement(Box, {
353
- className: `${style.value} toggleDropText`,
286
+ size: boxSize,
287
+ right: right,
288
+ left: left,
289
+ top: top,
290
+ bottom: bottom,
291
+ isArrow: isArrow,
292
+ isAnimate: true,
293
+ getRef: getContainerRef,
294
+ customClass: {
295
+ customDropBoxWrap: style.dropBoxContainer
296
+ },
297
+ needResponsive: needResponsive,
298
+ isResponsivePadding: true
299
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
300
+ className: style.search
301
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
302
+ placeHolder: placeHolderText,
303
+ onChange: handleChange,
304
+ value: searchString,
305
+ onClear: onSearchClear,
306
+ size: searchBoxSize,
307
+ inputRef: searchInputRef,
308
+ onKeyDown: handleKeyDown,
309
+ a11y: {
310
+ ariaHaspopup: true,
311
+ ariaExpanded: true,
312
+ role: 'combobox',
313
+ ariaActivedescendant: value,
314
+ ariaOwns: ariaTitleId
315
+ }
316
+ })) : null, title && optionsList.length != 0 && /*#__PURE__*/React.createElement(Box, {
317
+ className: style.title
318
+ }, /*#__PURE__*/React.createElement(DropDownHeading, {
319
+ htmlId: ariaTitleId,
320
+ text: title,
321
+ a11y: {
322
+ role: 'heading'
323
+ }
324
+ })), /*#__PURE__*/React.createElement(Box, {
325
+ scroll: "vertical",
326
+ flexible: true,
354
327
  shrink: true,
355
- tagName: "span",
356
- "data-title": dataTitle
357
- }, value), isEditable ? /*#__PURE__*/React.createElement(Icon, {
358
- "aria-hidden": true,
359
- size: "7",
360
- name: "ZD-down",
361
- iconClass: `${'toggleDropIcon'} ${style.arrow} ${style[`${arrowIconPosition}_arrow`]}`,
362
- dataId: "statusdownarrow"
363
- }) : null), isPopupOpen && isEditable ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
364
- query: this.responsiveFunc,
365
- responsiveId: "Helmet"
366
- }, _ref2 => {
367
- let {
368
- tabletMode
369
- } = _ref2;
370
- return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
371
- boxPosition: position,
372
- isActive: isPopupReady,
373
- onClick: removeClose,
374
- size: boxSize,
375
- right: right,
376
- left: left,
377
- top: top,
378
- bottom: bottom,
379
- isArrow: isArrow,
380
- isAnimate: true,
381
- getRef: getContainerRef,
382
- customClass: {
383
- customDropBoxWrap: style.dropBoxContainer
384
- },
385
- needResponsive: needResponsive,
386
- isResponsivePadding: true
387
- }, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
388
- className: style.search
389
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
390
- placeHolder: placeHolderText,
391
- onChange: this.handleChange,
392
- value: searchString,
393
- onClear: this.onSearchClear,
394
- size: searchBoxSize,
395
- inputRef: this.searchInputRef,
396
- onKeyDown: this.handleKeyDown,
397
- a11y: {
398
- ariaHaspopup: true,
399
- ariaExpanded: true,
400
- role: 'combobox',
401
- ariaActivedescendant: value,
402
- ariaOwns: ariaTitleId
403
- }
404
- })) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
405
- className: style.title
406
- }, /*#__PURE__*/React.createElement(DropDownHeading, {
407
- htmlId: ariaTitleId,
408
- text: title,
409
- a11y: {
410
- role: 'heading'
411
- }
412
- })), /*#__PURE__*/React.createElement(Box, {
413
- scroll: "vertical",
414
- flexible: true,
415
- shrink: true,
416
- dataId: `${dataId}_list`,
417
- preventParentScroll: "vertical",
418
- className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
419
- eleRef: this.scrollContentRef,
420
- onScroll: this.handleScroll,
421
- role: isSearch ? 'listbox' : 'menu',
422
- "aria-labelledby": ariaTitleId,
423
- tabindex: "0"
424
- }, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => /*#__PURE__*/React.createElement(React.Fragment, {
425
- key: i
426
- }, /*#__PURE__*/React.createElement(StatusListItem, {
427
- dataId: `dataid_${i}`,
428
- value: item[keyName],
429
- id: item[idName],
430
- active: value === item[keyName],
431
- onClick: this.onSelect.bind(this, item),
432
- index: i,
433
- highlight: selectedIndex === i,
434
- needTick: needTick,
435
- needBorder: false,
436
- onMouseEnter: this.handleMouseEnter,
437
- getRef: this.itemRef,
438
- bulletColor: item[statusColor],
439
- title: item[keyName],
440
- needMultiLineText: needMultiLineText,
441
- a11y: {
442
- role: isSearch ? 'option' : 'menuitem',
443
- ariaSelected: value === item[keyName]
444
- }
445
- })))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
446
- className: style.svgWrapper,
447
- title: searchErrorText || 'No results',
448
- description: searchEmptyHint,
449
- size: "small",
450
- getEmptyState: this.emptySearchSVG
451
- }) : /*#__PURE__*/React.createElement("div", {
452
- className: style.loader
453
- }, /*#__PURE__*/React.createElement(Loader, null)))));
454
- }) : null);
455
- }
456
-
457
- } // if (__DOCS__) {
458
- // StatusDropdown.docs = {
459
- // componentGroup: 'Molecule'
460
- // };
461
- // }
328
+ dataId: `${dataId}_list`,
329
+ preventParentScroll: "vertical",
330
+ className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
331
+ eleRef: scrollContentRef,
332
+ onScroll: handleScroll,
333
+ role: isSearch ? 'listbox' : 'menu',
334
+ "aria-labelledby": ariaTitleId,
335
+ tabindex: "0"
336
+ }, optionsList.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, optionsList.map((item, i) => /*#__PURE__*/React.createElement(React.Fragment, {
337
+ key: i
338
+ }, /*#__PURE__*/React.createElement(StatusListItem, {
339
+ dataId: `dataid_${i}`,
340
+ value: item[keyName],
341
+ id: item[idName],
342
+ active: value === item[keyName],
343
+ onClick: e => onSelect(item, e),
344
+ index: i,
345
+ highlight: selectedIndex === i,
346
+ needTick: needTick,
347
+ needBorder: false,
348
+ onMouseEnter: handleMouseEnter,
349
+ getRef: itemRef,
350
+ bulletColor: item[statusColor],
351
+ title: item[keyName],
352
+ needMultiLineText: needMultiLineText,
353
+ a11y: {
354
+ role: isSearch ? 'option' : 'menuitem',
355
+ ariaSelected: value === item[keyName]
356
+ }
357
+ })))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
358
+ className: style.svgWrapper,
359
+ title: searchErrorText || 'No results',
360
+ description: searchEmptyHint,
361
+ size: "small",
362
+ getEmptyState: emptySearchSVG
363
+ }) : /*#__PURE__*/React.createElement("div", {
364
+ className: style.loader
365
+ }, /*#__PURE__*/React.createElement(Loader, null)))));
366
+ }) : null);
367
+ }
462
368
 
463
369
  StatusDropdown.defaultProps = defaultProps;
464
370
  StatusDropdown.propTypes = propTypes;
465
- export default Popup(StatusDropdown);
371
+ const StatusDropdown_Component = Popup(StatusDropdown);
372
+ StatusDropdown_Component.defaultProps = StatusDropdown.defaultProps;
373
+ StatusDropdown_Component.propTypes = StatusDropdown.propTypes;
374
+ export default StatusDropdown_Component;