@expressms/smartapp-ui 3.0.0-alpha.22 → 3.0.0-alpha.24

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 (483) hide show
  1. package/build/main/assets/icons/accepted-invite-status.svg +4 -0
  2. package/build/main/assets/icons/arrow-back.svg +3 -0
  3. package/build/main/assets/icons/arrow-down.svg +3 -0
  4. package/build/main/assets/icons/arrow-up.svg +3 -0
  5. package/build/main/assets/icons/attachment-loader.svg +3 -0
  6. package/build/main/assets/icons/avatar-arrow-down.svg +3 -0
  7. package/build/main/assets/icons/avatar-arrow-up.svg +3 -0
  8. package/build/main/assets/icons/avatar-loader.svg +3 -0
  9. package/build/main/assets/icons/button-loader.svg +3 -0
  10. package/build/main/assets/icons/calendar-arrow-next.svg +3 -0
  11. package/build/main/assets/icons/calendar-arrow-prev.svg +3 -0
  12. package/build/main/assets/icons/check-mark-square.svg +4 -0
  13. package/build/main/assets/icons/check-mark.svg +4 -0
  14. package/build/main/assets/icons/chip-info.svg +5 -0
  15. package/build/main/assets/icons/clear.svg +3 -0
  16. package/build/main/assets/icons/close-modal.svg +3 -0
  17. package/build/main/assets/icons/close-stories.svg +4 -0
  18. package/build/main/assets/icons/close.svg +3 -0
  19. package/build/main/assets/icons/contact-info.svg +5 -0
  20. package/build/main/assets/icons/corporate-user.svg +3 -0
  21. package/build/main/assets/icons/crown.svg +5 -0
  22. package/build/main/assets/icons/declined-invite-status.svg +4 -0
  23. package/build/main/assets/icons/delete-chip.svg +3 -0
  24. package/build/main/assets/icons/distribution.svg +12 -0
  25. package/build/main/assets/icons/doc-small.svg +11 -0
  26. package/build/main/assets/icons/doc.svg +11 -0
  27. package/build/main/assets/icons/error.svg +5 -0
  28. package/build/main/assets/icons/external-link.svg +3 -0
  29. package/build/main/assets/icons/eye-off.svg +5 -0
  30. package/build/main/assets/icons/eye-on.svg +4 -0
  31. package/build/main/assets/icons/file-small.svg +11 -0
  32. package/build/main/assets/icons/file.svg +11 -0
  33. package/build/main/assets/icons/global-address-book-user.svg +4 -0
  34. package/build/main/assets/icons/group.svg +3 -0
  35. package/build/main/assets/icons/indeterminate-check-mark-square.svg +4 -0
  36. package/build/main/assets/icons/info.svg +5 -0
  37. package/build/main/assets/icons/input-arrow-down.svg +3 -0
  38. package/build/main/assets/icons/input-arrow-up.svg +3 -0
  39. package/build/main/assets/icons/loader.svg +3 -0
  40. package/build/main/assets/icons/logout.svg +4 -0
  41. package/build/main/assets/icons/magnifying-glass.svg +3 -0
  42. package/build/main/assets/icons/mail.svg +3 -0
  43. package/build/main/assets/icons/meeting-room.svg +3 -0
  44. package/build/main/assets/icons/more.svg +3 -0
  45. package/build/main/assets/icons/my-contacts-user.svg +3 -0
  46. package/build/main/assets/icons/needs-action-invite-status.svg +4 -0
  47. package/build/main/assets/icons/notification-close.svg +3 -0
  48. package/build/main/assets/icons/notification-failure.svg +3 -0
  49. package/build/main/assets/icons/notification-info-filled.svg +5 -0
  50. package/build/main/assets/icons/notification-info.svg +5 -0
  51. package/build/main/assets/icons/notification-success-filled.svg +4 -0
  52. package/build/main/assets/icons/notification-success.svg +4 -0
  53. package/build/main/assets/icons/order.svg +6 -0
  54. package/build/main/assets/icons/pdf-small.svg +11 -0
  55. package/build/main/assets/icons/pdf.svg +11 -0
  56. package/build/main/assets/icons/play-small.svg +3 -0
  57. package/build/main/assets/icons/play.svg +3 -0
  58. package/build/main/assets/icons/plus.svg +4 -0
  59. package/build/main/assets/icons/ppt-small.svg +11 -0
  60. package/build/main/assets/icons/ppt.svg +11 -0
  61. package/build/main/assets/icons/private.svg +12 -0
  62. package/build/main/assets/icons/refresh.svg +3 -0
  63. package/build/main/assets/icons/search.svg +3 -0
  64. package/build/main/assets/icons/story-loader.svg +3 -0
  65. package/build/main/assets/icons/tick.svg +10 -0
  66. package/build/main/assets/icons/trash.svg +3 -0
  67. package/build/main/assets/icons/txt-small.svg +11 -0
  68. package/build/main/assets/icons/txt.svg +11 -0
  69. package/build/main/assets/icons/unread-mails.svg +4 -0
  70. package/build/main/assets/icons/warning-avatar.svg +4 -0
  71. package/build/main/assets/icons/xls-small.svg +11 -0
  72. package/build/main/assets/icons/xls.svg +11 -0
  73. package/build/main/assets/storybook/index.d.ts +24 -0
  74. package/build/main/assets/storybook/index.js +25 -0
  75. package/build/main/assets/storybook/index.js.map +1 -0
  76. package/build/main/constants/constants.d.ts +198 -0
  77. package/build/main/constants/constants.js +218 -0
  78. package/build/main/constants/constants.js.map +1 -0
  79. package/build/main/constants/index.d.ts +2 -0
  80. package/build/main/constants/index.js +3 -0
  81. package/build/main/constants/index.js.map +1 -0
  82. package/build/main/constants/types.d.ts +58 -0
  83. package/build/main/constants/types.js +2 -0
  84. package/build/main/constants/types.js.map +1 -0
  85. package/build/main/helpers/index.d.ts +31 -0
  86. package/build/main/helpers/index.js +183 -0
  87. package/build/main/helpers/index.js.map +1 -0
  88. package/build/main/hooks/useLongTap.d.ts +12 -0
  89. package/build/main/hooks/useLongTap.js +29 -0
  90. package/build/main/hooks/useLongTap.js.map +1 -0
  91. package/build/main/hooks/useModal.d.ts +22 -0
  92. package/build/main/hooks/useModal.js +61 -0
  93. package/build/main/hooks/useModal.js.map +1 -0
  94. package/build/main/index.d.ts +36 -0
  95. package/build/main/index.js +37 -0
  96. package/build/main/index.js.map +1 -0
  97. package/build/main/styles/index.d.ts +1 -0
  98. package/build/main/styles/index.js +2 -0
  99. package/build/main/styles/index.js.map +1 -0
  100. package/build/main/styles/main.js +0 -0
  101. package/build/main/styles/styles.scss +14 -0
  102. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +4 -0
  103. package/build/main//321/201omponents/ActionModal/ActionModal.js +53 -0
  104. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -0
  105. package/build/main//321/201omponents/ActionModal/index.d.ts +1 -0
  106. package/build/main//321/201omponents/ActionModal/index.js +2 -0
  107. package/build/main//321/201omponents/ActionModal/index.js.map +1 -0
  108. package/build/main//321/201omponents/ActionModal/types.d.ts +23 -0
  109. package/build/main//321/201omponents/ActionModal/types.js +2 -0
  110. package/build/main//321/201omponents/ActionModal/types.js.map +1 -0
  111. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +8 -0
  112. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +146 -0
  113. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -0
  114. package/build/main//321/201omponents/AttachedFile/index.d.ts +1 -0
  115. package/build/main//321/201omponents/AttachedFile/index.js +2 -0
  116. package/build/main//321/201omponents/AttachedFile/index.js.map +1 -0
  117. package/build/main//321/201omponents/AttachedFile/types.d.ts +22 -0
  118. package/build/main//321/201omponents/AttachedFile/types.js +2 -0
  119. package/build/main//321/201omponents/AttachedFile/types.js.map +1 -0
  120. package/build/main//321/201omponents/Avatar/Avatar.d.ts +4 -0
  121. package/build/main//321/201omponents/Avatar/Avatar.js +243 -0
  122. package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -0
  123. package/build/main//321/201omponents/Avatar/index.d.ts +1 -0
  124. package/build/main//321/201omponents/Avatar/index.js +2 -0
  125. package/build/main//321/201omponents/Avatar/index.js.map +1 -0
  126. package/build/main//321/201omponents/Avatar/types.d.ts +61 -0
  127. package/build/main//321/201omponents/Avatar/types.js +29 -0
  128. package/build/main//321/201omponents/Avatar/types.js.map +1 -0
  129. package/build/main//321/201omponents/Button/Button.d.ts +4 -0
  130. package/build/main//321/201omponents/Button/Button.js +62 -0
  131. package/build/main//321/201omponents/Button/Button.js.map +1 -0
  132. package/build/main//321/201omponents/Button/index.d.ts +1 -0
  133. package/build/main//321/201omponents/Button/index.js +2 -0
  134. package/build/main//321/201omponents/Button/index.js.map +1 -0
  135. package/build/main//321/201omponents/Button/types.d.ts +24 -0
  136. package/build/main//321/201omponents/Button/types.js +12 -0
  137. package/build/main//321/201omponents/Button/types.js.map +1 -0
  138. package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +4 -0
  139. package/build/main//321/201omponents/CachedImage/CachedImage.js +59 -0
  140. package/build/main//321/201omponents/CachedImage/CachedImage.js.map +1 -0
  141. package/build/main//321/201omponents/CachedImage/helpers.d.ts +3 -0
  142. package/build/main//321/201omponents/CachedImage/helpers.js +40 -0
  143. package/build/main//321/201omponents/CachedImage/helpers.js.map +1 -0
  144. package/build/main//321/201omponents/CachedImage/index.d.ts +1 -0
  145. package/build/main//321/201omponents/CachedImage/index.js +2 -0
  146. package/build/main//321/201omponents/CachedImage/index.js.map +1 -0
  147. package/build/main//321/201omponents/CachedImage/types.d.ts +10 -0
  148. package/build/main//321/201omponents/CachedImage/types.js +2 -0
  149. package/build/main//321/201omponents/CachedImage/types.js.map +1 -0
  150. package/build/main//321/201omponents/Calendar/Calendar.d.ts +4 -0
  151. package/build/main//321/201omponents/Calendar/Calendar.js +145 -0
  152. package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -0
  153. package/build/main//321/201omponents/Calendar/index.d.ts +1 -0
  154. package/build/main//321/201omponents/Calendar/index.js +2 -0
  155. package/build/main//321/201omponents/Calendar/index.js.map +1 -0
  156. package/build/main//321/201omponents/Calendar/types.d.ts +15 -0
  157. package/build/main//321/201omponents/Calendar/types.js +2 -0
  158. package/build/main//321/201omponents/Calendar/types.js.map +1 -0
  159. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +4 -0
  160. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +47 -0
  161. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -0
  162. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +4 -0
  163. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js +71 -0
  164. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js.map +1 -0
  165. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +4 -0
  166. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +42 -0
  167. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -0
  168. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +4 -0
  169. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +64 -0
  170. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -0
  171. package/build/main//321/201omponents/Charts/colors.d.ts +3 -0
  172. package/build/main//321/201omponents/Charts/colors.js +4 -0
  173. package/build/main//321/201omponents/Charts/colors.js.map +1 -0
  174. package/build/main//321/201omponents/Charts/constants.d.ts +42 -0
  175. package/build/main//321/201omponents/Charts/constants.js +42 -0
  176. package/build/main//321/201omponents/Charts/constants.js.map +1 -0
  177. package/build/main//321/201omponents/Charts/helpers.d.ts +17 -0
  178. package/build/main//321/201omponents/Charts/helpers.js +73 -0
  179. package/build/main//321/201omponents/Charts/helpers.js.map +1 -0
  180. package/build/main//321/201omponents/Charts/index.d.ts +3 -0
  181. package/build/main//321/201omponents/Charts/index.js +4 -0
  182. package/build/main//321/201omponents/Charts/index.js.map +1 -0
  183. package/build/main//321/201omponents/Charts/types.d.ts +89 -0
  184. package/build/main//321/201omponents/Charts/types.js +2 -0
  185. package/build/main//321/201omponents/Charts/types.js.map +1 -0
  186. package/build/main//321/201omponents/Charts/useEvents.d.ts +5 -0
  187. package/build/main//321/201omponents/Charts/useEvents.js +45 -0
  188. package/build/main//321/201omponents/Charts/useEvents.js.map +1 -0
  189. package/build/main//321/201omponents/Charts/usePieEvents.d.ts +6 -0
  190. package/build/main//321/201omponents/Charts/usePieEvents.js +57 -0
  191. package/build/main//321/201omponents/Charts/usePieEvents.js.map +1 -0
  192. package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +8 -0
  193. package/build/main//321/201omponents/Checkbox/Checkbox.js +48 -0
  194. package/build/main//321/201omponents/Checkbox/Checkbox.js.map +1 -0
  195. package/build/main//321/201omponents/Checkbox/index.d.ts +1 -0
  196. package/build/main//321/201omponents/Checkbox/index.js +2 -0
  197. package/build/main//321/201omponents/Checkbox/index.js.map +1 -0
  198. package/build/main//321/201omponents/Checkbox/types.d.ts +14 -0
  199. package/build/main//321/201omponents/Checkbox/types.js +2 -0
  200. package/build/main//321/201omponents/Checkbox/types.js.map +1 -0
  201. package/build/main//321/201omponents/Chip/Chip.d.ts +4 -0
  202. package/build/main//321/201omponents/Chip/Chip.js +118 -0
  203. package/build/main//321/201omponents/Chip/Chip.js.map +1 -0
  204. package/build/main//321/201omponents/Chip/index.d.ts +1 -0
  205. package/build/main//321/201omponents/Chip/index.js +2 -0
  206. package/build/main//321/201omponents/Chip/index.js.map +1 -0
  207. package/build/main//321/201omponents/Chip/types.d.ts +28 -0
  208. package/build/main//321/201omponents/Chip/types.js +2 -0
  209. package/build/main//321/201omponents/Chip/types.js.map +1 -0
  210. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +4 -0
  211. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +63 -0
  212. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -0
  213. package/build/main//321/201omponents/ConfirmationModal/index.d.ts +1 -0
  214. package/build/main//321/201omponents/ConfirmationModal/index.js +2 -0
  215. package/build/main//321/201omponents/ConfirmationModal/index.js.map +1 -0
  216. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +28 -0
  217. package/build/main//321/201omponents/ConfirmationModal/types.js +2 -0
  218. package/build/main//321/201omponents/ConfirmationModal/types.js.map +1 -0
  219. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +4 -0
  220. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +81 -0
  221. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -0
  222. package/build/main//321/201omponents/ContextMenu/index.d.ts +1 -0
  223. package/build/main//321/201omponents/ContextMenu/index.js +2 -0
  224. package/build/main//321/201omponents/ContextMenu/index.js.map +1 -0
  225. package/build/main//321/201omponents/ContextMenu/types.d.ts +34 -0
  226. package/build/main//321/201omponents/ContextMenu/types.js +2 -0
  227. package/build/main//321/201omponents/ContextMenu/types.js.map +1 -0
  228. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +12 -0
  229. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +248 -0
  230. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -0
  231. package/build/main//321/201omponents/CustomSelect/index.d.ts +1 -0
  232. package/build/main//321/201omponents/CustomSelect/index.js +2 -0
  233. package/build/main//321/201omponents/CustomSelect/index.js.map +1 -0
  234. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +16 -0
  235. package/build/main//321/201omponents/CustomSelect/selectStyles.js +70 -0
  236. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -0
  237. package/build/main//321/201omponents/CustomSelect/types.d.ts +69 -0
  238. package/build/main//321/201omponents/CustomSelect/types.js +2 -0
  239. package/build/main//321/201omponents/CustomSelect/types.js.map +1 -0
  240. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +4 -0
  241. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +58 -0
  242. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -0
  243. package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +1 -0
  244. package/build/main//321/201omponents/CustomSelectProfiles/index.js +2 -0
  245. package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +1 -0
  246. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +12 -0
  247. package/build/main//321/201omponents/CustomSelectProfiles/types.js +2 -0
  248. package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +1 -0
  249. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +4 -0
  250. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +57 -0
  251. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -0
  252. package/build/main//321/201omponents/DragAndDrop/index.d.ts +1 -0
  253. package/build/main//321/201omponents/DragAndDrop/index.js +2 -0
  254. package/build/main//321/201omponents/DragAndDrop/index.js.map +1 -0
  255. package/build/main//321/201omponents/DragAndDrop/types.d.ts +24 -0
  256. package/build/main//321/201omponents/DragAndDrop/types.js +2 -0
  257. package/build/main//321/201omponents/DragAndDrop/types.js.map +1 -0
  258. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +4 -0
  259. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +222 -0
  260. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -0
  261. package/build/main//321/201omponents/DraggablePopup/index.d.ts +1 -0
  262. package/build/main//321/201omponents/DraggablePopup/index.js +2 -0
  263. package/build/main//321/201omponents/DraggablePopup/index.js.map +1 -0
  264. package/build/main//321/201omponents/DraggablePopup/types.d.ts +90 -0
  265. package/build/main//321/201omponents/DraggablePopup/types.js +2 -0
  266. package/build/main//321/201omponents/DraggablePopup/types.js.map +1 -0
  267. package/build/main//321/201omponents/Error/Error.d.ts +4 -0
  268. package/build/main//321/201omponents/Error/Error.js +23 -0
  269. package/build/main//321/201omponents/Error/Error.js.map +1 -0
  270. package/build/main//321/201omponents/Error/index.d.ts +1 -0
  271. package/build/main//321/201omponents/Error/index.js +2 -0
  272. package/build/main//321/201omponents/Error/index.js.map +1 -0
  273. package/build/main//321/201omponents/Error/types.d.ts +10 -0
  274. package/build/main//321/201omponents/Error/types.js +2 -0
  275. package/build/main//321/201omponents/Error/types.js.map +1 -0
  276. package/build/main//321/201omponents/Flex/Flex.d.ts +2 -0
  277. package/build/main//321/201omponents/Flex/Flex.js +35 -0
  278. package/build/main//321/201omponents/Flex/Flex.js.map +1 -0
  279. package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +5 -0
  280. package/build/main//321/201omponents/Flex/HFlex/HFlex.js +16 -0
  281. package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +1 -0
  282. package/build/main//321/201omponents/Flex/HFlex/index.d.ts +1 -0
  283. package/build/main//321/201omponents/Flex/HFlex/index.js +2 -0
  284. package/build/main//321/201omponents/Flex/HFlex/index.js.map +1 -0
  285. package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +5 -0
  286. package/build/main//321/201omponents/Flex/VFlex/VFlex.js +16 -0
  287. package/build/main//321/201omponents/Flex/VFlex/VFlex.js.map +1 -0
  288. package/build/main//321/201omponents/Flex/VFlex/index.d.ts +1 -0
  289. package/build/main//321/201omponents/Flex/VFlex/index.js +2 -0
  290. package/build/main//321/201omponents/Flex/VFlex/index.js.map +1 -0
  291. package/build/main//321/201omponents/Flex/index.d.ts +3 -0
  292. package/build/main//321/201omponents/Flex/index.js +4 -0
  293. package/build/main//321/201omponents/Flex/index.js.map +1 -0
  294. package/build/main//321/201omponents/Flex/types.d.ts +20 -0
  295. package/build/main//321/201omponents/Flex/types.js +2 -0
  296. package/build/main//321/201omponents/Flex/types.js.map +1 -0
  297. package/build/main//321/201omponents/Header/Header.d.ts +5 -0
  298. package/build/main//321/201omponents/Header/Header.js +125 -0
  299. package/build/main//321/201omponents/Header/Header.js.map +1 -0
  300. package/build/main//321/201omponents/Header/index.d.ts +1 -0
  301. package/build/main//321/201omponents/Header/index.js +2 -0
  302. package/build/main//321/201omponents/Header/index.js.map +1 -0
  303. package/build/main//321/201omponents/Header/types.d.ts +47 -0
  304. package/build/main//321/201omponents/Header/types.js +2 -0
  305. package/build/main//321/201omponents/Header/types.js.map +1 -0
  306. package/build/main//321/201omponents/Input/Input.d.ts +4 -0
  307. package/build/main//321/201omponents/Input/Input.js +182 -0
  308. package/build/main//321/201omponents/Input/Input.js.map +1 -0
  309. package/build/main//321/201omponents/Input/index.d.ts +1 -0
  310. package/build/main//321/201omponents/Input/index.js +2 -0
  311. package/build/main//321/201omponents/Input/index.js.map +1 -0
  312. package/build/main//321/201omponents/Input/types.d.ts +27 -0
  313. package/build/main//321/201omponents/Input/types.js +2 -0
  314. package/build/main//321/201omponents/Input/types.js.map +1 -0
  315. package/build/main//321/201omponents/ListItem/ListItem.d.ts +23 -0
  316. package/build/main//321/201omponents/ListItem/ListItem.js +203 -0
  317. package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -0
  318. package/build/main//321/201omponents/ListItem/index.d.ts +1 -0
  319. package/build/main//321/201omponents/ListItem/index.js +2 -0
  320. package/build/main//321/201omponents/ListItem/index.js.map +1 -0
  321. package/build/main//321/201omponents/ListItem/types.d.ts +41 -0
  322. package/build/main//321/201omponents/ListItem/types.js +2 -0
  323. package/build/main//321/201omponents/ListItem/types.js.map +1 -0
  324. package/build/main//321/201omponents/Loader/Loader.d.ts +4 -0
  325. package/build/main//321/201omponents/Loader/Loader.js +44 -0
  326. package/build/main//321/201omponents/Loader/Loader.js.map +1 -0
  327. package/build/main//321/201omponents/Loader/index.d.ts +1 -0
  328. package/build/main//321/201omponents/Loader/index.js +2 -0
  329. package/build/main//321/201omponents/Loader/index.js.map +1 -0
  330. package/build/main//321/201omponents/Loader/types.d.ts +18 -0
  331. package/build/main//321/201omponents/Loader/types.js +2 -0
  332. package/build/main//321/201omponents/Loader/types.js.map +1 -0
  333. package/build/main//321/201omponents/Modal/Modal.d.ts +4 -0
  334. package/build/main//321/201omponents/Modal/Modal.js +261 -0
  335. package/build/main//321/201omponents/Modal/Modal.js.map +1 -0
  336. package/build/main//321/201omponents/Modal/index.d.ts +1 -0
  337. package/build/main//321/201omponents/Modal/index.js +2 -0
  338. package/build/main//321/201omponents/Modal/index.js.map +1 -0
  339. package/build/main//321/201omponents/Modal/types.d.ts +41 -0
  340. package/build/main//321/201omponents/Modal/types.js +2 -0
  341. package/build/main//321/201omponents/Modal/types.js.map +1 -0
  342. package/build/main//321/201omponents/Notification/Notification.d.ts +9 -0
  343. package/build/main//321/201omponents/Notification/Notification.js +231 -0
  344. package/build/main//321/201omponents/Notification/Notification.js.map +1 -0
  345. package/build/main//321/201omponents/Notification/index.d.ts +1 -0
  346. package/build/main//321/201omponents/Notification/index.js +2 -0
  347. package/build/main//321/201omponents/Notification/index.js.map +1 -0
  348. package/build/main//321/201omponents/Notification/types.d.ts +48 -0
  349. package/build/main//321/201omponents/Notification/types.js +2 -0
  350. package/build/main//321/201omponents/Notification/types.js.map +1 -0
  351. package/build/main//321/201omponents/Profile/Profile.d.ts +4 -0
  352. package/build/main//321/201omponents/Profile/Profile.js +42 -0
  353. package/build/main//321/201omponents/Profile/Profile.js.map +1 -0
  354. package/build/main//321/201omponents/Profile/index.d.ts +1 -0
  355. package/build/main//321/201omponents/Profile/index.js +2 -0
  356. package/build/main//321/201omponents/Profile/index.js.map +1 -0
  357. package/build/main//321/201omponents/Profile/types.d.ts +14 -0
  358. package/build/main//321/201omponents/Profile/types.js +2 -0
  359. package/build/main//321/201omponents/Profile/types.js.map +1 -0
  360. package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +4 -0
  361. package/build/main//321/201omponents/ProgressBar/ProgressBar.js +66 -0
  362. package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +1 -0
  363. package/build/main//321/201omponents/ProgressBar/index.d.ts +1 -0
  364. package/build/main//321/201omponents/ProgressBar/index.js +2 -0
  365. package/build/main//321/201omponents/ProgressBar/index.js.map +1 -0
  366. package/build/main//321/201omponents/ProgressBar/types.d.ts +7 -0
  367. package/build/main//321/201omponents/ProgressBar/types.js +2 -0
  368. package/build/main//321/201omponents/ProgressBar/types.js.map +1 -0
  369. package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +4 -0
  370. package/build/main//321/201omponents/RadioButton/RadioButton.js +33 -0
  371. package/build/main//321/201omponents/RadioButton/RadioButton.js.map +1 -0
  372. package/build/main//321/201omponents/RadioButton/index.d.ts +1 -0
  373. package/build/main//321/201omponents/RadioButton/index.js +2 -0
  374. package/build/main//321/201omponents/RadioButton/index.js.map +1 -0
  375. package/build/main//321/201omponents/RadioButton/types.d.ts +12 -0
  376. package/build/main//321/201omponents/RadioButton/types.js +2 -0
  377. package/build/main//321/201omponents/RadioButton/types.js.map +1 -0
  378. package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +5 -0
  379. package/build/main//321/201omponents/ScrollBar/ScrollBar.js +140 -0
  380. package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -0
  381. package/build/main//321/201omponents/ScrollBar/index.d.ts +1 -0
  382. package/build/main//321/201omponents/ScrollBar/index.js +2 -0
  383. package/build/main//321/201omponents/ScrollBar/index.js.map +1 -0
  384. package/build/main//321/201omponents/ScrollBar/types.d.ts +24 -0
  385. package/build/main//321/201omponents/ScrollBar/types.js +2 -0
  386. package/build/main//321/201omponents/ScrollBar/types.js.map +1 -0
  387. package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +4 -0
  388. package/build/main//321/201omponents/Skeleton/Skeleton.js +59 -0
  389. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -0
  390. package/build/main//321/201omponents/Skeleton/index.d.ts +1 -0
  391. package/build/main//321/201omponents/Skeleton/index.js +2 -0
  392. package/build/main//321/201omponents/Skeleton/index.js.map +1 -0
  393. package/build/main//321/201omponents/Skeleton/types.d.ts +17 -0
  394. package/build/main//321/201omponents/Skeleton/types.js +2 -0
  395. package/build/main//321/201omponents/Skeleton/types.js.map +1 -0
  396. package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
  397. package/build/main//321/201omponents/Stories/Stories.js +338 -0
  398. package/build/main//321/201omponents/Stories/Stories.js.map +1 -0
  399. package/build/main//321/201omponents/Stories/index.d.ts +1 -0
  400. package/build/main//321/201omponents/Stories/index.js +2 -0
  401. package/build/main//321/201omponents/Stories/index.js.map +1 -0
  402. package/build/main//321/201omponents/Stories/types.d.ts +71 -0
  403. package/build/main//321/201omponents/Stories/types.js +16 -0
  404. package/build/main//321/201omponents/Stories/types.js.map +1 -0
  405. package/build/main//321/201omponents/Switcher/Switcher.d.ts +4 -0
  406. package/build/main//321/201omponents/Switcher/Switcher.js +34 -0
  407. package/build/main//321/201omponents/Switcher/Switcher.js.map +1 -0
  408. package/build/main//321/201omponents/Switcher/index.d.ts +1 -0
  409. package/build/main//321/201omponents/Switcher/index.js +2 -0
  410. package/build/main//321/201omponents/Switcher/index.js.map +1 -0
  411. package/build/main//321/201omponents/Switcher/types.d.ts +8 -0
  412. package/build/main//321/201omponents/Switcher/types.js +2 -0
  413. package/build/main//321/201omponents/Switcher/types.js.map +1 -0
  414. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +5 -0
  415. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +65 -0
  416. package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +1 -0
  417. package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
  418. package/build/main//321/201omponents/SyncLoader/index.js +2 -0
  419. package/build/main//321/201omponents/SyncLoader/index.js.map +1 -0
  420. package/build/main//321/201omponents/SyncLoader/types.d.ts +8 -0
  421. package/build/main//321/201omponents/SyncLoader/types.js +2 -0
  422. package/build/main//321/201omponents/SyncLoader/types.js.map +1 -0
  423. package/build/main//321/201omponents/Textarea/Textarea.d.ts +4 -0
  424. package/build/main//321/201omponents/Textarea/Textarea.js +59 -0
  425. package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -0
  426. package/build/main//321/201omponents/Textarea/index.d.ts +1 -0
  427. package/build/main//321/201omponents/Textarea/index.js +2 -0
  428. package/build/main//321/201omponents/Textarea/index.js.map +1 -0
  429. package/build/main//321/201omponents/Textarea/types.d.ts +13 -0
  430. package/build/main//321/201omponents/Textarea/types.js +2 -0
  431. package/build/main//321/201omponents/Textarea/types.js.map +1 -0
  432. package/build/main//321/201omponents/Toggle/Toggle.d.ts +4 -0
  433. package/build/main//321/201omponents/Toggle/Toggle.js +35 -0
  434. package/build/main//321/201omponents/Toggle/Toggle.js.map +1 -0
  435. package/build/main//321/201omponents/Toggle/index.d.ts +1 -0
  436. package/build/main//321/201omponents/Toggle/index.js +2 -0
  437. package/build/main//321/201omponents/Toggle/index.js.map +1 -0
  438. package/build/main//321/201omponents/Toggle/types.d.ts +12 -0
  439. package/build/main//321/201omponents/Toggle/types.js +2 -0
  440. package/build/main//321/201omponents/Toggle/types.js.map +1 -0
  441. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +4 -0
  442. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +31 -0
  443. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -0
  444. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +4 -0
  445. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +88 -0
  446. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -0
  447. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +4 -0
  448. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +23 -0
  449. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -0
  450. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +4 -0
  451. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +129 -0
  452. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -0
  453. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -0
  454. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +137 -0
  455. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -0
  456. package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +4 -0
  457. package/build/main//321/201omponents/UserDropdown/Option/Option.js +80 -0
  458. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -0
  459. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +4 -0
  460. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +44 -0
  461. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -0
  462. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +5 -0
  463. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +549 -0
  464. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
  465. package/build/main//321/201omponents/UserDropdown/constants.d.ts +8 -0
  466. package/build/main//321/201omponents/UserDropdown/constants.js +10 -0
  467. package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -0
  468. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +105 -0
  469. package/build/main//321/201omponents/UserDropdown/helpers.js +143 -0
  470. package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -0
  471. package/build/main//321/201omponents/UserDropdown/index.d.ts +1 -0
  472. package/build/main//321/201omponents/UserDropdown/index.js +2 -0
  473. package/build/main//321/201omponents/UserDropdown/index.js.map +1 -0
  474. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +15 -0
  475. package/build/main//321/201omponents/UserDropdown/selectStyles.js +69 -0
  476. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
  477. package/build/main//321/201omponents/UserDropdown/types.d.ts +269 -0
  478. package/build/main//321/201omponents/UserDropdown/types.js +9 -0
  479. package/build/main//321/201omponents/UserDropdown/types.js.map +1 -0
  480. package/build/main//321/201omponents/types.d.ts +2 -0
  481. package/build/main//321/201omponents/types.js +2 -0
  482. package/build/main//321/201omponents/types.js.map +1 -0
  483. package/package.json +1 -1
@@ -0,0 +1,129 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var _a;
13
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import React, { useEffect, useRef, useState } from 'react';
15
+ import { components } from 'react-select';
16
+ import { AutoSizer } from 'react-virtualized';
17
+ import { FixedSizeList } from 'react-window';
18
+ import classNames from 'classnames';
19
+ import LoadingMessage from '../LoadingMessage/LoadingMessage';
20
+ import SearchInCatalogButton from '../SearchInCatalogButton/SearchInCatalogButton';
21
+ import { LANGUAGES } from '../../../constants';
22
+ import '../../../styles/styles.scss';
23
+ var MIN_INPUT_SYMBOLS = 3;
24
+ var SKELETON_ROWS_COUNT = 3;
25
+ var MENU_ITEM_HEIGHT = 47;
26
+ var MAX_MENU_HEIGHT = 220;
27
+ var LIST_OVER_SCAN_COUNT = 5;
28
+ var PADDING_SIZE = 12;
29
+ var BUTTON_SIZE = 48;
30
+ var CHAR_HINT_TIMEOUT = 1500;
31
+ var ONE_CHARACTER = 1;
32
+ var TWO_CHARACTERS = 2;
33
+ var CHAR_HINT = (_a = {},
34
+ _a[LANGUAGES.ru] = 'Запрос должен содержать не менее 3-х символов',
35
+ _a[LANGUAGES.en] = 'The query must contain at least 3 characters',
36
+ _a[LANGUAGES.de] = 'Die Anfrage muss mindestens 3 Zeichen enthalten',
37
+ _a[LANGUAGES.es] = 'La consulta debe contener al menos 3 caracteres',
38
+ _a[LANGUAGES.fr] = 'Il faut au moins 3 caractères pour la recherche',
39
+ _a[LANGUAGES.ar] = 'الاستفسار يجب أن يحتوي على 3 حروف على الأقل',
40
+ _a[LANGUAGES.ms] = 'Pertanyaan harus mengandungi sekurang-kurangnya 3 aksara',
41
+ _a[LANGUAGES.tr] = 'Sorgu en az 3 karakter içermelidir',
42
+ _a[LANGUAGES.id] = 'Kueri harus berisi minimal 3 karakter',
43
+ _a[LANGUAGES.uz] = 'So‘rov kamida 3 ta belgi bo‘lishi kerak',
44
+ _a);
45
+ var MenuList = function (props) {
46
+ var _a;
47
+ var selectRef = props.selectRef, scrollFromTop = props.scrollFromTop, language = props.language, hasNextPage = props.hasNextPage, isLoading = props.isLoading, isUserTyping = props.isUserTyping, isNextPageLoading = props.isNextPageLoading, onLoadNextPage = props.onLoadNextPage, onShowCatalogSearchButtonClick = props.onShowCatalogSearchButtonClick, children = props.children, _b = props.isShowCatalogSearchButton, isShowCatalogSearchButton = _b === void 0 ? false : _b;
48
+ var selectRefCurrent = selectRef.current;
49
+ var inputValue = (_a = selectRefCurrent === null || selectRefCurrent === void 0 ? void 0 : selectRefCurrent.props) === null || _a === void 0 ? void 0 : _a.inputValue;
50
+ var inputValueLength = inputValue === null || inputValue === void 0 ? void 0 : inputValue.length;
51
+ var virtualizationListRef = useRef(null);
52
+ var lastElement = useRef(null);
53
+ var observer = useRef(new IntersectionObserver(function (entries) { return entries[0].isIntersecting && handleLoadNextPage(); }));
54
+ var _c = useState(false), isCharHintVisible = _c[0], setIsCharHintVisible = _c[1];
55
+ var _d = useState(null), timeoutId = _d[0], setTimeoutId = _d[1];
56
+ useEffect(function () {
57
+ if (timeoutId) {
58
+ clearTimeout(timeoutId);
59
+ setTimeoutId(null);
60
+ }
61
+ if (inputValueLength >= MIN_INPUT_SYMBOLS) {
62
+ setIsCharHintVisible(false);
63
+ }
64
+ else if (inputValueLength === ONE_CHARACTER || inputValueLength === TWO_CHARACTERS) {
65
+ if (!isCharHintVisible) {
66
+ var nextTimeoutId = setTimeout(function () { return setIsCharHintVisible(true); }, CHAR_HINT_TIMEOUT);
67
+ setTimeoutId(nextTimeoutId);
68
+ }
69
+ }
70
+ else {
71
+ setIsCharHintVisible(false);
72
+ }
73
+ return function () {
74
+ timeoutId && clearTimeout(timeoutId);
75
+ };
76
+ // eslint-disable-next-line
77
+ }, [inputValue]);
78
+ useEffect(function () {
79
+ var lastElementCurrent = lastElement.current;
80
+ var observerCurrent = observer.current;
81
+ lastElementCurrent && observerCurrent.observe(lastElementCurrent);
82
+ return function () {
83
+ lastElementCurrent && observerCurrent.unobserve(lastElementCurrent);
84
+ };
85
+ // eslint-disable-next-line
86
+ }, [lastElement.current]);
87
+ var handleLoadNextPage = function () {
88
+ onLoadNextPage(inputValue);
89
+ if (virtualizationListRef.current) {
90
+ var scrollOffset = virtualizationListRef.current.state.scrollOffset;
91
+ scrollFromTop.current = scrollOffset + MENU_ITEM_HEIGHT * SKELETON_ROWS_COUNT;
92
+ }
93
+ };
94
+ if (inputValueLength < MIN_INPUT_SYMBOLS)
95
+ return isCharHintVisible ? _jsx("div", __assign({ className: "smartapp-menu-list__char-hint" }, { children: CHAR_HINT[language] })) : null;
96
+ // For children like: "Loading" or "No Options" provided by 'react-select'
97
+ if (!Array.isArray(children))
98
+ return _jsx(_Fragment, { children: children });
99
+ var childrenLength = children.length;
100
+ var listChildrenHeight = childrenLength * MENU_ITEM_HEIGHT + PADDING_SIZE;
101
+ var maxMenuHeight = isShowCatalogSearchButton ? MAX_MENU_HEIGHT - BUTTON_SIZE : MAX_MENU_HEIGHT;
102
+ var listHeight = listChildrenHeight > maxMenuHeight ? maxMenuHeight : listChildrenHeight;
103
+ var itemCount = hasNextPage ? childrenLength + SKELETON_ROWS_COUNT : childrenLength;
104
+ var isNextPageSkeletonsVisible = hasNextPage && !isNextPageLoading && !isLoading && !isUserTyping;
105
+ var isDataLoadingSkeletonsVisible = isNextPageLoading || isLoading || (isUserTyping && inputValueLength >= MIN_INPUT_SYMBOLS);
106
+ var isSkeletonsVisible = isNextPageSkeletonsVisible || isDataLoadingSkeletonsVisible;
107
+ var renderSkeletons = function () { return isSkeletonsVisible && _jsx(LoadingMessage, { skeletonRowsCount: SKELETON_ROWS_COUNT }); };
108
+ var rowRenderer = function (_a) {
109
+ var index = _a.index, style = _a.style;
110
+ var isLastRow = index === childrenLength - 1;
111
+ var rowRef = isNextPageSkeletonsVisible ? lastElement : null;
112
+ return (_jsxs("div", __assign({ ref: rowRef, style: style, role: children[index] ? 'option' : '' }, { children: [children[index], isLastRow && renderSkeletons()] }), index));
113
+ };
114
+ return (_jsx(components.MenuList, __assign({}, props, { children: _jsx(AutoSizer, __assign({ disableHeight: true }, { children: function (_a) {
115
+ var width = _a.width;
116
+ return (_jsxs("div", __assign({ style: {
117
+ display: 'flex',
118
+ flexDirection: 'column',
119
+ height: isShowCatalogSearchButton ? listHeight + BUTTON_SIZE : listHeight,
120
+ } }, { children: [_jsx(FixedSizeList, __assign({ ref: virtualizationListRef, height: listHeight, itemCount: itemCount, itemSize: MENU_ITEM_HEIGHT, width: width, overscanCount: LIST_OVER_SCAN_COUNT, onScroll: function (_a) {
121
+ var scrollOffset = _a.scrollOffset;
122
+ return (scrollFromTop.current = scrollOffset);
123
+ }, initialScrollOffset: scrollFromTop.current, className: classNames('smartapp-menu-list', { 'smartapp-menu-list__with-button': isShowCatalogSearchButton }), outerElementType: CustomOuterElement }, { children: rowRenderer })), isShowCatalogSearchButton && (_jsx(SearchInCatalogButton, { language: language, width: width, onShowCatalogSearchButtonClick: onShowCatalogSearchButtonClick }))] })));
124
+ } })) })));
125
+ };
126
+ var CustomOuterElement = React.forwardRef(function (props, ref) { return _jsx("div", __assign({ ref: ref }, props, { style: __assign({}, props.style) })); });
127
+ CustomOuterElement.displayName = 'CustomOuterElement';
128
+ export default MenuList;
129
+ //# sourceMappingURL=MenuList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/MenuList/MenuList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAA2B,MAAM,cAAc,CAAA;AACrE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,cAAc,MAAM,kCAAkC,CAAA;AAC7D,OAAO,qBAAqB,MAAM,gDAAgD,CAAA;AAClF,OAAO,EAAE,SAAS,EAAmB,MAAM,oBAAoB,CAAA;AAE/D,OAAO,6BAA6B,CAAA;AAEpC,IAAM,iBAAiB,GAAG,CAAC,CAAA;AAC3B,IAAM,mBAAmB,GAAG,CAAC,CAAA;AAC7B,IAAM,g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vB,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,UAAU;qBAC1E,iBAED,KAAC,aAAa,aACZ,GAAG,EAAE,qBAAqB,EAC1B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,oBAAoB,EACnC,QAAQ,EAAE,UAAC,EAAgB;oCAAd,YAAY,kBAAA;gCAAO,OAAA,CAAC,aAAa,CAAC,OAAO,GAAG,YAAY,CAAC;4BAAtC,CAAsC,EACtE,mBAAmB,EAAE,aAAa,CAAC,OAAO,EAC1C,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,EAAE,iCAAiC,EAAE,yBAAyB,EAAE,CAAC,EAC7G,gBAAgB,EAAE,kBAAkB,gBAEnC,WAAW,IACE,EACf,yBAAyB,IAAI,CAC5B,KAAC,qBAAqB,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,8BAA8B,EAAE,8BAA8B,GAAI,CAC5H,KACG,CACP;YA1Be,CA0Bf,IACS,IACQ,CACvB,CAAA;AACH,CAAC,CAAA;AAED,IAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAsB,UAAC,KAAK,EAAE,GAAG,IAAK,OAAA,uBAAK,GAAG,EAAE,GAAG,IAAM,KAAK,IAAE,KAAK,eAAO,KAAK,CAAC,KAAK,KAAM,EAAvD,CAAuD,CAAC,CAAA;AAEzI,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAA;AAErD,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,3 @@
1
+ import '../../../styles/styles.scss';
2
+ declare const MultiValueLabel: (props: any) => import("react/jsx-runtime").JSX.Element | null;
3
+ export default MultiValueLabel;
@@ -0,0 +1,137 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var _a;
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { useEffect, useRef, useState } from 'react';
15
+ import { components } from 'react-select';
16
+ import Popup from 'reactjs-popup';
17
+ import classNames from 'classnames';
18
+ import { isEqual } from 'lodash';
19
+ import Avatar from '../../Avatar';
20
+ import Chip from '../../Chip';
21
+ import { generateAvatarIcon, generateFontFamilyStyle, isValueEqualToZero, renderUserIcon } from '../../../helpers';
22
+ import { COLORS, LANGUAGES } from '../../../constants';
23
+ import { AVATAR_SIZES } from '../../Avatar/types';
24
+ import '../../../styles/styles.scss';
25
+ var POPUP_APPEARANCE_DELAY = 1500;
26
+ var POPUP_HIDDEN_CLASSNAME = 'multi-value-info-hidden';
27
+ var POPUP_PADDINGS = 16;
28
+ var POPUP_MARGINS = 32;
29
+ var POPUP_MARGIN_TOP = 1;
30
+ var YOU = (_a = {},
31
+ _a[LANGUAGES.ru] = 'Вы',
32
+ _a[LANGUAGES.en] = 'You',
33
+ _a[LANGUAGES.de] = 'Sie',
34
+ _a[LANGUAGES.es] = 'Usted',
35
+ _a[LANGUAGES.fr] = 'Vous',
36
+ _a[LANGUAGES.ar] = 'ﺃﻧﺖ',
37
+ _a[LANGUAGES.ms] = 'Anda',
38
+ _a[LANGUAGES.tr] = 'Siz',
39
+ _a[LANGUAGES.id] = 'Anda',
40
+ _a[LANGUAGES.uz] = 'Siz',
41
+ _a);
42
+ var MultiValueLabel = function (props) {
43
+ var _a = props.data, value = _a.value, label = _a.label, name = _a.name, email = _a.email, uid = _a.uid, isResetChipsToInputValue = _a.isResetChipsToInputValue, avatar = _a.avatar, platform = _a.platform, fontFamily = _a.fontFamily, contextMenuItems = _a.contextMenuItems, language = _a.language, userType = _a.userType, isMyContacts = _a.isMyContacts, isOrganizer = _a.isOrganizer, isPrivateSchedule = _a.isPrivateSchedule, isNotRemovable = _a.isNotRemovable, isChipsCollapsable = _a.isChipsCollapsable, isSelectedChipHasTooltip = _a.isSelectedChipHasTooltip, isBusyAtSelectedTime = _a.isBusyAtSelectedTime, isLoading = _a.isLoading, isWarning = _a.isWarning, isInputFocused = _a.isInputFocused.current, collapsableChipsCount = _a.collapsableChipsCount.current, lastVisibleChipIndex = _a.lastVisibleChipIndex.current, transformCurrentChipToInputValue = props.transformCurrentChipToInputValue, _b = props.selectProps, isDisabled = _b.isDisabled, selectedUsers = _b.value, onChange = _b.onChange, isChipsOutline = props.isChipsOutline;
44
+ var multiValueLabelRef = useRef(null);
45
+ var popupRef = useRef(null);
46
+ var popupContentRef = useRef(null);
47
+ var _c = useState(-1), left = _c[0], setLeft = _c[1];
48
+ var _d = useState(-1), top = _d[0], setTop = _d[1];
49
+ var _e = useState(null), timeoutId = _e[0], setTimeoutId = _e[1];
50
+ var _f = useState(POPUP_HIDDEN_CLASSNAME), hiddenClassName = _f[0], setHiddenClassName = _f[1];
51
+ var _g = useState(false), isOpenContextMenu = _g[0], setIsOpenContextMenu = _g[1];
52
+ var _h = useState(false), isChipHovered = _h[0], setIsChipHovered = _h[1];
53
+ var _j = useState(false), isShowPopup = _j[0], setIsShowPopup = _j[1];
54
+ var isPopupVisible = isChipHovered && !isOpenContextMenu && name && email && isSelectedChipHasTooltip;
55
+ useEffect(function () {
56
+ label && isResetChipsToInputValue && transformCurrentChipToInputValue(label, email);
57
+ // eslint-disable-next-line
58
+ }, [isResetChipsToInputValue]);
59
+ useEffect(function () {
60
+ var _a;
61
+ if (isPopupVisible) {
62
+ var timer_1 = setTimeout(function () {
63
+ if (isChipHovered && !isOpenContextMenu) {
64
+ setIsShowPopup(true);
65
+ handleOpenPopup();
66
+ }
67
+ }, POPUP_APPEARANCE_DELAY);
68
+ return function () { return clearTimeout(timer_1); };
69
+ }
70
+ else {
71
+ setIsShowPopup(false);
72
+ (_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.close();
73
+ }
74
+ // eslint-disable-next-line react-hooks/exhaustive-deps
75
+ }, [isPopupVisible, isChipHovered, isOpenContextMenu]);
76
+ var windowInnerWidth = window.innerWidth;
77
+ var popupContentMaxWidth = windowInnerWidth - POPUP_MARGINS - POPUP_PADDINGS;
78
+ var noChipsCount = isValueEqualToZero(collapsableChipsCount);
79
+ var userIndex = selectedUsers.findIndex(function (_a) {
80
+ var selectedUserValue = _a.value, selectedUserLabel = _a.label;
81
+ return selectedUserValue === value && selectedUserLabel === label;
82
+ });
83
+ var handleDelete = function () { return onChange(selectedUsers.filter(function (user) { return !isEqual(user, props.data); })); };
84
+ var handleMouseDown = function (event) {
85
+ event.preventDefault();
86
+ event.stopPropagation();
87
+ };
88
+ var handleTouchEnd = function (event) { return event.stopPropagation(); };
89
+ var handleMouseEnter = function () { return !isOpenContextMenu && setIsChipHovered(true); };
90
+ var handleMouseLeave = function () { return setIsChipHovered(false); };
91
+ var handleContextMenu = function () {
92
+ var _a;
93
+ setIsChipHovered(false);
94
+ setIsShowPopup(false);
95
+ (_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.close();
96
+ };
97
+ var renderPopupContent = function () { return (_jsxs("div", __assign({ ref: popupContentRef, className: "smartapp-multi-value-label" }, { children: [_jsx(Avatar, { fontFamily: fontFamily, icon: generateAvatarIcon(userType), username: label, avatar: avatar, size: AVATAR_SIZES.size_32, isEye: isPrivateSchedule, outlineDefaultBackground: COLORS.chip }), _jsxs("div", __assign({ className: "smartapp-multi-value-label__content" }, { children: [_jsxs("div", __assign({ className: "smartapp-multi-value-label__content--name" }, { children: [_jsx("div", __assign({ className: "smartapp-multi-value-label__content--name__icon" }, { children: renderUserIcon({ userType: userType, isMyContacts: isMyContacts }) })), _jsx("span", { children: name })] })), _jsx("div", __assign({ className: "smartapp-multi-value-label__content--email" }, { children: email }))] }))] }))); };
98
+ var handleOpenPopup = function () {
99
+ var popupRefCurrent = popupRef.current;
100
+ var popupContentRefCurrent = popupContentRef.current;
101
+ var multiValueLabelRefCurrent = multiValueLabelRef.current;
102
+ if (popupRefCurrent && popupContentRefCurrent && multiValueLabelRefCurrent && isShowPopup) {
103
+ var _a = multiValueLabelRefCurrent.getBoundingClientRect(), width = _a.width, multiValueLabelLeft = _a.left, top_1 = _a.top, height = _a.height;
104
+ var popupContentWidth = popupContentRefCurrent.getBoundingClientRect().width;
105
+ var popupContentWidthWithIndents_1 = popupContentWidth + POPUP_PADDINGS + POPUP_MARGINS;
106
+ var nextLeft_1 = multiValueLabelLeft + width / 2 - popupContentWidthWithIndents_1 / 2;
107
+ var generateNextLeftValue = function () {
108
+ if (nextLeft_1 < 0)
109
+ return 0;
110
+ var popupContentRightmostPosition = nextLeft_1 + popupContentWidthWithIndents_1;
111
+ var popupContentOutsideScreen = popupContentRightmostPosition - windowInnerWidth;
112
+ return nextLeft_1 - Math.max(popupContentOutsideScreen, 0);
113
+ };
114
+ var nextLeftValue = generateNextLeftValue();
115
+ if (left !== nextLeftValue) {
116
+ popupRefCurrent.close();
117
+ setLeft(nextLeftValue);
118
+ setTop(top_1 + height - POPUP_MARGIN_TOP);
119
+ var nextTimeoutId = setTimeout(function () { var _a; return (_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.open(); }, 0);
120
+ setTimeoutId(nextTimeoutId);
121
+ }
122
+ setHiddenClassName('');
123
+ }
124
+ };
125
+ var handleClosePopup = function () { return timeoutId && clearTimeout(timeoutId); };
126
+ if (!isChipsCollapsable || isInputFocused || (!isInputFocused && userIndex < lastVisibleChipIndex) || noChipsCount) {
127
+ return (_jsx(components.MultiValueLabel, __assign({}, props, { innerProps: { ref: multiValueLabelRef } }, { children: _jsx(Popup, __assign({ ref: popupRef, onOpen: handleOpenPopup, onClose: handleClosePopup, arrow: false, open: isShowPopup, className: classNames('multi-value-info', hiddenClassName), contentStyle: __assign({ '--multi-value-label-content-left': "".concat(left, "px"), '--multi-value-label-content-top': "".concat(top, "px"), '--multi-value-label-content-max-width': "".concat(popupContentMaxWidth, "px") }, generateFontFamilyStyle(fontFamily)), trigger: function () { return (_jsx("div", __assign({ onMouseDown: handleMouseDown, onTouchEnd: handleTouchEnd, onContextMenu: handleContextMenu, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, { children: _jsx(Chip, { fontFamily: fontFamily, language: language, name: label, email: email, uid: uid, isOpenContextMenu: isOpenContextMenu, setIsOpenContextMenu: setIsOpenContextMenu, isMyContacts: isMyContacts, organizerName: isOrganizer ? YOU[language] : null, isOrganizerShort: true, isWarning: isWarning, userType: userType, avatar: avatar, isLoading: isLoading, isError: isBusyAtSelectedTime, isDisabled: isDisabled || isNotRemovable, isEye: isPrivateSchedule, isOutline: isChipsOutline, onDelete: handleDelete, contextMenuItems: contextMenuItems, platform: platform }) }))); } }, { children: renderPopupContent() })) })));
128
+ }
129
+ if (isChipsCollapsable && !isInputFocused && userIndex === lastVisibleChipIndex && !noChipsCount) {
130
+ return (_jsxs("div", __assign({ className: classNames('multi-value-label-counter', "multi-value-label-counter__".concat(platform), {
131
+ 'multi-value-label-counter__outline': isChipsOutline,
132
+ }), onTouchEnd: handleTouchEnd }, { children: ["+", collapsableChipsCount] })));
133
+ }
134
+ return null;
135
+ };
136
+ export default MultiValueLabel;
137
+ //# sourceMappingURL=MultiValueLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiValueLabel.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/MultiValueLabel/MultiValueLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,MAAM,eAAe,CAAA;AAEjC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACh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oBAAoB,EAAE,oBAAoB,EAC1C,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EACjD,gBAAgB,QAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,oBAAoB,EAC7B,UAAU,EAAE,UAAU,IAAI,cAAc,EACxC,KAAK,EAAE,iBAAiB,EACxB,SAAS,EAAE,cAAc,EACzB,QAAQ,EAAE,YAAY,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,GAClB,IACE,CACP,EAhCc,CAgCd,gBAEA,kBAAkB,EAAE,IACf,IACmB,CAC9B,CAAA;KACF;IAED,IAAI,kBAAkB,IAAI,CAAC,cAAc,IAAI,SAAS,KAAK,oBAAoB,IAAI,CAAC,YAAY,EAAE;QAChG,OAAO,CACL,wBACE,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE,qCAA8B,QAAQ,CAAE,EAAE;gBAC3F,oCAAoC,EAAE,cAAc;aACrD,CAAC,EACF,UAAU,EAAE,cAAc,sBAExB,qBAAqB,KACnB,CACP,CAAA;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { IOptionProps } from '../types';
2
+ import '../../../styles/styles.scss';
3
+ declare const Option: (props: IOptionProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default Option;
@@ -0,0 +1,80 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useEffect, useRef, useState } from 'react';
14
+ import { components } from 'react-select';
15
+ import Popup from 'reactjs-popup';
16
+ import classNames from 'classnames';
17
+ import Avatar from '../../Avatar';
18
+ import ContactInfo from '../ContactInfo/ContactInfo';
19
+ import { generateAvatarIcon, generateFontFamilyStyle, isMobilePlatform, isWebPlatform, renderUserIcon } from '../../../helpers';
20
+ import { POPUP_ON_EVENT_TYPE, POPUP_VERTICAL_POSITION } from '../../../constants';
21
+ import { AVATAR_SIZES } from '../../Avatar/types';
22
+ import { ReactComponent as ContactInfoIcon } from '../../../assets/icons/contact-info.svg';
23
+ import '../../../styles/styles.scss';
24
+ var POPUP_APPEARANCE_DELAY = 1000;
25
+ var PADDING_LEFT = 8;
26
+ var INDENTS = 50;
27
+ var POPUP_MARGIN_TOP = 3;
28
+ var EMPTY_SPACE = 8;
29
+ var POPUP_HIDDEN_CLASSNAME = 'contact-info-hidden';
30
+ var Option = function (props) {
31
+ var _a;
32
+ var _b = props.data, label = _b.label, avatar = _b.avatar, email = _b.email, serverName = _b.serverName, company = _b.company, department = _b.department, companyPosition = _b.companyPosition, isMyContacts = _b.isMyContacts, userType = _b.userType, platform = _b.platform, language = _b.language, fontFamily = _b.fontFamily, setIsSearchable = _b.setIsSearchable, setModalData = _b.setModalData;
33
+ var ref = useRef(null);
34
+ var contactInfoRef = useRef(null);
35
+ var popupRef = useRef(null);
36
+ var _c = useState(0), left = _c[0], setLeft = _c[1];
37
+ var _d = useState(0), maxWidth = _d[0], setMaxWidth = _d[1];
38
+ var _e = useState(POPUP_VERTICAL_POSITION.bottom), popupVerticalPosition = _e[0], setPopupVerticalPosition = _e[1];
39
+ var _f = useState(POPUP_HIDDEN_CLASSNAME), hiddenClassName = _f[0], setHiddenClassName = _f[1];
40
+ var _g = useState(POPUP_MARGIN_TOP), popupMarginTop = _g[0], setPopupMarginTop = _g[1];
41
+ var _h = useState(null), timeoutId = _h[0], setTimeoutId = _h[1];
42
+ var clientRect = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
43
+ var clientRectLeft = ((clientRect === null || clientRect === void 0 ? void 0 : clientRect.left) || 0) + PADDING_LEFT;
44
+ var clientRectWidth = ((clientRect === null || clientRect === void 0 ? void 0 : clientRect.width) || INDENTS) - INDENTS;
45
+ var handleContactInfoIconClick = function (event) {
46
+ event.stopPropagation();
47
+ setIsSearchable(false);
48
+ setModalData({ avatar: avatar, name: label, email: email, serverName: serverName, company: company, department: department, companyPosition: companyPosition });
49
+ };
50
+ var renderContactInfoIcon = function () {
51
+ var isIconVisible = !isMyContacts && isMobilePlatform(platform);
52
+ return isIconVisible && _jsx(ContactInfoIcon, { className: "smartapp-option__container--icon", onClick: handleContactInfoIconClick });
53
+ };
54
+ var calculatePopupVerticalPosition = function () {
55
+ var popupRefCurrent = popupRef.current;
56
+ var contactInfoRefCurrent = contactInfoRef.current;
57
+ if (popupRefCurrent && contactInfoRefCurrent) {
58
+ var _a = contactInfoRefCurrent.getBoundingClientRect(), height = _a.height, y = _a.y;
59
+ if (window.innerHeight - y <= height + EMPTY_SPACE) {
60
+ popupRefCurrent.close();
61
+ setPopupVerticalPosition(POPUP_VERTICAL_POSITION.top);
62
+ setPopupMarginTop(-POPUP_MARGIN_TOP);
63
+ var nextTimeoutId = setTimeout(function () { var _a; return (_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.open(); }, 0);
64
+ setTimeoutId(nextTimeoutId);
65
+ }
66
+ setHiddenClassName('');
67
+ }
68
+ };
69
+ var handleClosePopup = function () { return timeoutId && clearTimeout(timeoutId); };
70
+ useEffect(function () {
71
+ setLeft(clientRectLeft);
72
+ setMaxWidth(clientRectWidth);
73
+ }, [clientRectLeft, clientRectWidth]);
74
+ var renderContactInfoPopup = function () { return (_jsx(Popup, __assign({ arrow: false, ref: popupRef, onOpen: calculatePopupVerticalPosition, onClose: handleClosePopup, className: classNames('contact-info', hiddenClassName), position: "".concat(popupVerticalPosition, " center"), contentStyle: __assign({ '--contact-info-content-margin-top': "".concat(popupMarginTop, "px"), '--contact-info-content-left': "".concat(left, "px"), '--contact-info-content-max-width': "".concat(maxWidth, "px") }, generateFontFamilyStyle(fontFamily)), on: [POPUP_ON_EVENT_TYPE.hover], mouseEnterDelay: POPUP_APPEARANCE_DELAY, trigger: function () { return (_jsx("div", { children: _jsx(Avatar, { fontFamily: fontFamily, icon: generateAvatarIcon(userType), username: label, avatar: avatar, size: AVATAR_SIZES.size_32 }) })); } }, { children: _jsx(ContactInfo, { elementRef: contactInfoRef, language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition }) }))); };
75
+ return (_jsx(components.Option, __assign({}, props, { innerRef: function (el) {
76
+ ref.current = el;
77
+ } }, { children: _jsxs("div", __assign({ className: "smartapp-option" }, { children: [!isMyContacts && isWebPlatform(platform) ? (renderContactInfoPopup()) : (_jsx(Avatar, { fontFamily: fontFamily, username: label, avatar: avatar, size: AVATAR_SIZES.size_32 })), _jsxs("div", __assign({ className: "smartapp-option__container" }, { children: [_jsxs("div", __assign({ className: "smartapp-option__container--info" }, { children: [_jsxs("div", __assign({ className: "smartapp-option__container--info__name" }, { children: [renderUserIcon({ userType: userType, isMyContacts: isMyContacts }), _jsx("div", { children: label })] })), _jsx("div", __assign({ className: "smartapp-option__container--info__email" }, { children: email }))] })), renderContactInfoIcon()] }))] })) })));
78
+ };
79
+ export default Option;
80
+ //# sourceMappingURL=Option.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Option.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/Option/Option.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,MAAM,eAAe,CAAA;AAEjC,OAAO,UAAU,MAAM,YAAY,CAAA;AACn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ACpD,cAAc,CAAC,EAAE,QAAQ,UAAA,EAAE,YAAY,cAAA,EAAE,CAAC,EAC3C,wBAAM,KAAK,GAAO,KACd,EACN,uBAAK,SAAS,EAAC,yCAAyC,gBAAE,KAAK,IAAO,KAClE,EACL,qBAAqB,EAAE,KACpB,KACF,IACY,CACrB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { ISearchInCatalogButtonProps } from '../types';
2
+ import '../../../styles/styles.scss';
3
+ declare const SearchInCatalogButton: ({ width, onShowCatalogSearchButtonClick, language, noOptionText, isOnlyButtonInList, }: ISearchInCatalogButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default SearchInCatalogButton;
@@ -0,0 +1,44 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var _a;
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import classNames from 'classnames';
15
+ import { LANGUAGES } from '../../../constants';
16
+ import { ReactComponent as SearchIcon } from './../../../assets/icons/search.svg';
17
+ import '../../../styles/styles.scss';
18
+ var BUTTON_SIZE = 48;
19
+ var NO_OPTIONS_BUTTON_SIZE = 18;
20
+ var SINGLE_BUTTON_SIZE = 18;
21
+ var SEARCH_BUTTON_TEXT = (_a = {},
22
+ _a[LANGUAGES.ru] = 'Поиск в каталоге',
23
+ _a[LANGUAGES.en] = 'Search in catalog',
24
+ _a[LANGUAGES.de] = 'Im Katalog suchen',
25
+ _a[LANGUAGES.es] = 'Buscar en el directorio',
26
+ _a[LANGUAGES.fr] = 'Recherche dans le directoire',
27
+ _a[LANGUAGES.ar] = 'البحث في الدليل',
28
+ _a[LANGUAGES.ms] = 'Cari dalam katalog',
29
+ _a[LANGUAGES.tr] = 'Katalogda ara',
30
+ _a[LANGUAGES.id] = 'Cari di katalog',
31
+ _a[LANGUAGES.uz] = 'Katalogdan qidirish',
32
+ _a);
33
+ var SearchInCatalogButton = function (_a) {
34
+ var width = _a.width, onShowCatalogSearchButtonClick = _a.onShowCatalogSearchButtonClick, language = _a.language, noOptionText = _a.noOptionText, _b = _a.isOnlyButtonInList, isOnlyButtonInList = _b === void 0 ? false : _b;
35
+ var defaultButtonHeight = isOnlyButtonInList ? SINGLE_BUTTON_SIZE : BUTTON_SIZE;
36
+ var height = noOptionText ? NO_OPTIONS_BUTTON_SIZE : defaultButtonHeight;
37
+ var generateButtonStyles = function () { return ({ width: width, height: height }); };
38
+ return (_jsxs("div", __assign({ className: classNames('search-in-catalog-button', {
39
+ 'search-in-catalog-button__single': isOnlyButtonInList,
40
+ 'search-in-catalog-button__no-option-text': !!noOptionText,
41
+ }), style: generateButtonStyles(), onClick: onShowCatalogSearchButtonClick }, { children: [!noOptionText && _jsx(SearchIcon, {}), _jsx("span", { children: noOptionText || SEARCH_BUTTON_TEXT[language] })] })));
42
+ };
43
+ export default SearchInCatalogButton;
44
+ //# sourceMappingURL=SearchInCatalogButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchInCatalogButton.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,SAAS,EAAmB,MAAM,oBAAoB,CAAA;AAE/D,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAA;AACjF,OAAO,6BAA6B,CAAA;AAEpC,IAAM,WAAW,GAAG,EAAE,CAAA;AACtB,IAAM,sBAAsB,GAAG,EAAE,CAAA;AACjC,IAAM,kBAAkB,GAAG,EAAE,CAAA;AAE7B,IAAM,kBA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vD,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,qBAAqB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { IUserDropdownProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ export declare const EMAIL_FIELD = "email";
4
+ declare const UserDropdown: ({ platform, fontFamily, isDisabled, isLoading, isChipsOutline, isChipsVisible, isChipsCollapsable, isSelectedChipHasTooltip, isMenuCloseOnSelect, isFilteringDisabled, hasNextPage, isNextPageLoading, isInputHidden, isBackspaceChipToInput, isShowCatalogSearchButton, isDisabledMenuOffsetAtFullscreen, language, layoutType, externalInputValue, title, mask, placeholder, hint, onShowCatalogSearchButtonClick, noOptionsMessage, maxMembersCount, menuPosition, autoFocus, containerClassName, containerPadding, containerStyles, selectedEntries, corporateEntries, myContactsEntries, emailsToExclude, onInputChange, onChange, onMenuOpen, onMenuClose, onLoadNextPage, }: IUserDropdownProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default UserDropdown;