@expressms/smartapp-ui 2.5.8 → 2.6.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 (401) hide show
  1. package/build/main/assets/icons/arrow-back.svg +3 -0
  2. package/build/main/assets/icons/arrow-down.svg +3 -0
  3. package/build/main/assets/icons/arrow-up.svg +3 -0
  4. package/build/main/assets/icons/attachment-loader.svg +3 -0
  5. package/build/main/assets/icons/button-loader.svg +3 -0
  6. package/build/main/assets/icons/cancel-cross.svg +3 -0
  7. package/build/main/assets/icons/check-mark.svg +4 -0
  8. package/build/main/assets/icons/clear.svg +3 -0
  9. package/build/main/assets/icons/close-stories.svg +4 -0
  10. package/build/main/assets/icons/close.svg +10 -0
  11. package/build/main/assets/icons/contact-info.svg +12 -0
  12. package/build/main/assets/icons/corporate-user.svg +10 -0
  13. package/build/main/assets/icons/crown.svg +5 -0
  14. package/build/main/assets/icons/delete-chip.svg +3 -0
  15. package/build/main/assets/icons/download.svg +4 -0
  16. package/build/main/assets/icons/error.svg +5 -0
  17. package/build/main/assets/icons/external-link.svg +3 -0
  18. package/build/main/assets/icons/eye-off.svg +10 -0
  19. package/build/main/assets/icons/eye.svg +10 -0
  20. package/build/main/assets/icons/file.svg +3 -0
  21. package/build/main/assets/icons/info.svg +5 -0
  22. package/build/main/assets/icons/loader.svg +3 -0
  23. package/build/main/assets/icons/logout.svg +4 -0
  24. package/build/main/assets/icons/magnifying-glass.svg +3 -0
  25. package/build/main/assets/icons/mail.svg +3 -0
  26. package/build/main/assets/icons/my-contact-user.svg +10 -0
  27. package/build/main/assets/icons/notification-close.svg +3 -0
  28. package/build/main/assets/icons/notification-error.svg +3 -0
  29. package/build/main/assets/icons/notification-failure.svg +3 -0
  30. package/build/main/assets/icons/notification-info.svg +5 -0
  31. package/build/main/assets/icons/notification-success.svg +4 -0
  32. package/build/main/assets/icons/notification-warning.svg +5 -0
  33. package/build/main/assets/icons/order.svg +6 -0
  34. package/build/main/assets/icons/plus.svg +4 -0
  35. package/build/main/assets/icons/refresh.svg +3 -0
  36. package/build/main/assets/icons/story-loader.svg +3 -0
  37. package/build/main/assets/icons/tick.svg +10 -0
  38. package/build/main/assets/icons/trash.svg +3 -0
  39. package/build/main/assets/storybook/index.d.ts +12 -0
  40. package/build/main/assets/storybook/index.js +13 -0
  41. package/build/main/assets/storybook/index.js.map +1 -0
  42. package/build/main/constants/constants.d.ts +136 -0
  43. package/build/main/constants/constants.js +152 -0
  44. package/build/main/constants/constants.js.map +1 -0
  45. package/build/main/constants/index.d.ts +2 -0
  46. package/build/main/constants/index.js +3 -0
  47. package/build/main/constants/index.js.map +1 -0
  48. package/build/main/constants/types.d.ts +28 -0
  49. package/build/main/constants/types.js +2 -0
  50. package/build/main/constants/types.js.map +1 -0
  51. package/build/main/helpers/index.d.ts +20 -0
  52. package/build/main/helpers/index.js +80 -0
  53. package/build/main/helpers/index.js.map +1 -0
  54. package/build/main/index.d.ts +3 -0
  55. package/build/main/index.js +4 -0
  56. package/build/main/index.js.map +1 -0
  57. package/build/main/styles/index.d.ts +1 -0
  58. package/build/main/styles/index.js +2 -0
  59. package/build/main/styles/index.js.map +1 -0
  60. package/build/main/styles/main.js +0 -0
  61. package/build/main/styles/styles.scss +14 -0
  62. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +4 -0
  63. package/build/main//321/201omponents/ActionModal/ActionModal.js +56 -0
  64. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -0
  65. package/build/main//321/201omponents/ActionModal/index.d.ts +1 -0
  66. package/build/main//321/201omponents/ActionModal/index.js +2 -0
  67. package/build/main//321/201omponents/ActionModal/index.js.map +1 -0
  68. package/build/main//321/201omponents/ActionModal/types.d.ts +20 -0
  69. package/build/main//321/201omponents/ActionModal/types.js +2 -0
  70. package/build/main//321/201omponents/ActionModal/types.js.map +1 -0
  71. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +8 -0
  72. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +60 -0
  73. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -0
  74. package/build/main//321/201omponents/AttachedFile/index.d.ts +1 -0
  75. package/build/main//321/201omponents/AttachedFile/index.js +2 -0
  76. package/build/main//321/201omponents/AttachedFile/index.js.map +1 -0
  77. package/build/main//321/201omponents/AttachedFile/types.d.ts +23 -0
  78. package/build/main//321/201omponents/AttachedFile/types.js +2 -0
  79. package/build/main//321/201omponents/AttachedFile/types.js.map +1 -0
  80. package/build/main//321/201omponents/Avatar/Avatar.d.ts +4 -0
  81. package/build/main//321/201omponents/Avatar/Avatar.js +115 -0
  82. package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -0
  83. package/build/main//321/201omponents/Avatar/index.d.ts +1 -0
  84. package/build/main//321/201omponents/Avatar/index.js +2 -0
  85. package/build/main//321/201omponents/Avatar/index.js.map +1 -0
  86. package/build/main//321/201omponents/Avatar/types.d.ts +36 -0
  87. package/build/main//321/201omponents/Avatar/types.js +9 -0
  88. package/build/main//321/201omponents/Avatar/types.js.map +1 -0
  89. package/build/main//321/201omponents/Button/Button.d.ts +4 -0
  90. package/build/main//321/201omponents/Button/Button.js +57 -0
  91. package/build/main//321/201omponents/Button/Button.js.map +1 -0
  92. package/build/main//321/201omponents/Button/index.d.ts +1 -0
  93. package/build/main//321/201omponents/Button/index.js +2 -0
  94. package/build/main//321/201omponents/Button/index.js.map +1 -0
  95. package/build/main//321/201omponents/Button/types.d.ts +23 -0
  96. package/build/main//321/201omponents/Button/types.js +11 -0
  97. package/build/main//321/201omponents/Button/types.js.map +1 -0
  98. package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +4 -0
  99. package/build/main//321/201omponents/CachedImage/CachedImage.js +54 -0
  100. package/build/main//321/201omponents/CachedImage/CachedImage.js.map +1 -0
  101. package/build/main//321/201omponents/CachedImage/helpers.d.ts +3 -0
  102. package/build/main//321/201omponents/CachedImage/helpers.js +40 -0
  103. package/build/main//321/201omponents/CachedImage/helpers.js.map +1 -0
  104. package/build/main//321/201omponents/CachedImage/index.d.ts +1 -0
  105. package/build/main//321/201omponents/CachedImage/index.js +2 -0
  106. package/build/main//321/201omponents/CachedImage/index.js.map +1 -0
  107. package/build/main//321/201omponents/CachedImage/types.d.ts +8 -0
  108. package/build/main//321/201omponents/CachedImage/types.js +2 -0
  109. package/build/main//321/201omponents/CachedImage/types.js.map +1 -0
  110. package/build/main//321/201omponents/Calendar/Calendar.d.ts +4 -0
  111. package/build/main//321/201omponents/Calendar/Calendar.js +48 -0
  112. package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -0
  113. package/build/main//321/201omponents/Calendar/index.d.ts +1 -0
  114. package/build/main//321/201omponents/Calendar/index.js +2 -0
  115. package/build/main//321/201omponents/Calendar/index.js.map +1 -0
  116. package/build/main//321/201omponents/Calendar/types.d.ts +14 -0
  117. package/build/main//321/201omponents/Calendar/types.js +2 -0
  118. package/build/main//321/201omponents/Calendar/types.js.map +1 -0
  119. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +3 -0
  120. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +39 -0
  121. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -0
  122. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +3 -0
  123. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +30 -0
  124. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -0
  125. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +3 -0
  126. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +64 -0
  127. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -0
  128. package/build/main//321/201omponents/Charts/colors.d.ts +2 -0
  129. package/build/main//321/201omponents/Charts/colors.js +3 -0
  130. package/build/main//321/201omponents/Charts/colors.js.map +1 -0
  131. package/build/main//321/201omponents/Charts/constants.d.ts +50 -0
  132. package/build/main//321/201omponents/Charts/constants.js +36 -0
  133. package/build/main//321/201omponents/Charts/constants.js.map +1 -0
  134. package/build/main//321/201omponents/Charts/helpers.d.ts +68 -0
  135. package/build/main//321/201omponents/Charts/helpers.js +91 -0
  136. package/build/main//321/201omponents/Charts/helpers.js.map +1 -0
  137. package/build/main//321/201omponents/Charts/index.d.ts +3 -0
  138. package/build/main//321/201omponents/Charts/index.js +4 -0
  139. package/build/main//321/201omponents/Charts/index.js.map +1 -0
  140. package/build/main//321/201omponents/Charts/types.d.ts +51 -0
  141. package/build/main//321/201omponents/Charts/types.js +2 -0
  142. package/build/main//321/201omponents/Charts/types.js.map +1 -0
  143. package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +4 -0
  144. package/build/main//321/201omponents/Checkbox/Checkbox.js +36 -0
  145. package/build/main//321/201omponents/Checkbox/Checkbox.js.map +1 -0
  146. package/build/main//321/201omponents/Checkbox/index.d.ts +1 -0
  147. package/build/main//321/201omponents/Checkbox/index.js +2 -0
  148. package/build/main//321/201omponents/Checkbox/index.js.map +1 -0
  149. package/build/main//321/201omponents/Checkbox/types.d.ts +9 -0
  150. package/build/main//321/201omponents/Checkbox/types.js +2 -0
  151. package/build/main//321/201omponents/Checkbox/types.js.map +1 -0
  152. package/build/main//321/201omponents/Chip/Chip.d.ts +4 -0
  153. package/build/main//321/201omponents/Chip/Chip.js +40 -0
  154. package/build/main//321/201omponents/Chip/Chip.js.map +1 -0
  155. package/build/main//321/201omponents/Chip/index.d.ts +1 -0
  156. package/build/main//321/201omponents/Chip/index.js +2 -0
  157. package/build/main//321/201omponents/Chip/index.js.map +1 -0
  158. package/build/main//321/201omponents/Chip/types.d.ts +10 -0
  159. package/build/main//321/201omponents/Chip/types.js +2 -0
  160. package/build/main//321/201omponents/Chip/types.js.map +1 -0
  161. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +4 -0
  162. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +44 -0
  163. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -0
  164. package/build/main//321/201omponents/ConfirmationModal/index.d.ts +1 -0
  165. package/build/main//321/201omponents/ConfirmationModal/index.js +2 -0
  166. package/build/main//321/201omponents/ConfirmationModal/index.js.map +1 -0
  167. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +16 -0
  168. package/build/main//321/201omponents/ConfirmationModal/types.js +2 -0
  169. package/build/main//321/201omponents/ConfirmationModal/types.js.map +1 -0
  170. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +4 -0
  171. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +55 -0
  172. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -0
  173. package/build/main//321/201omponents/ContextMenu/index.d.ts +1 -0
  174. package/build/main//321/201omponents/ContextMenu/index.js +2 -0
  175. package/build/main//321/201omponents/ContextMenu/index.js.map +1 -0
  176. package/build/main//321/201omponents/ContextMenu/types.d.ts +24 -0
  177. package/build/main//321/201omponents/ContextMenu/types.js +2 -0
  178. package/build/main//321/201omponents/ContextMenu/types.js.map +1 -0
  179. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +4 -0
  180. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +172 -0
  181. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -0
  182. package/build/main//321/201omponents/CustomSelect/index.d.ts +1 -0
  183. package/build/main//321/201omponents/CustomSelect/index.js +2 -0
  184. package/build/main//321/201omponents/CustomSelect/index.js.map +1 -0
  185. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +16 -0
  186. package/build/main//321/201omponents/CustomSelect/selectStyles.js +61 -0
  187. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -0
  188. package/build/main//321/201omponents/CustomSelect/types.d.ts +54 -0
  189. package/build/main//321/201omponents/CustomSelect/types.js +2 -0
  190. package/build/main//321/201omponents/CustomSelect/types.js.map +1 -0
  191. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +4 -0
  192. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +57 -0
  193. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -0
  194. package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +1 -0
  195. package/build/main//321/201omponents/CustomSelectProfiles/index.js +2 -0
  196. package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +1 -0
  197. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +12 -0
  198. package/build/main//321/201omponents/CustomSelectProfiles/types.js +2 -0
  199. package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +1 -0
  200. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +4 -0
  201. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +57 -0
  202. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -0
  203. package/build/main//321/201omponents/DragAndDrop/index.d.ts +1 -0
  204. package/build/main//321/201omponents/DragAndDrop/index.js +2 -0
  205. package/build/main//321/201omponents/DragAndDrop/index.js.map +1 -0
  206. package/build/main//321/201omponents/DragAndDrop/types.d.ts +24 -0
  207. package/build/main//321/201omponents/DragAndDrop/types.js +2 -0
  208. package/build/main//321/201omponents/DragAndDrop/types.js.map +1 -0
  209. package/build/main//321/201omponents/Error/Error.d.ts +4 -0
  210. package/build/main//321/201omponents/Error/Error.js +22 -0
  211. package/build/main//321/201omponents/Error/Error.js.map +1 -0
  212. package/build/main//321/201omponents/Error/index.d.ts +1 -0
  213. package/build/main//321/201omponents/Error/index.js +2 -0
  214. package/build/main//321/201omponents/Error/index.js.map +1 -0
  215. package/build/main//321/201omponents/Error/types.d.ts +7 -0
  216. package/build/main//321/201omponents/Error/types.js +2 -0
  217. package/build/main//321/201omponents/Error/types.js.map +1 -0
  218. package/build/main//321/201omponents/Header/Header.d.ts +5 -0
  219. package/build/main//321/201omponents/Header/Header.js +124 -0
  220. package/build/main//321/201omponents/Header/Header.js.map +1 -0
  221. package/build/main//321/201omponents/Header/index.d.ts +1 -0
  222. package/build/main//321/201omponents/Header/index.js +2 -0
  223. package/build/main//321/201omponents/Header/index.js.map +1 -0
  224. package/build/main//321/201omponents/Header/types.d.ts +44 -0
  225. package/build/main//321/201omponents/Header/types.js +2 -0
  226. package/build/main//321/201omponents/Header/types.js.map +1 -0
  227. package/build/main//321/201omponents/Input/Input.d.ts +4 -0
  228. package/build/main//321/201omponents/Input/Input.js +210 -0
  229. package/build/main//321/201omponents/Input/Input.js.map +1 -0
  230. package/build/main//321/201omponents/Input/index.d.ts +1 -0
  231. package/build/main//321/201omponents/Input/index.js +2 -0
  232. package/build/main//321/201omponents/Input/index.js.map +1 -0
  233. package/build/main//321/201omponents/Input/types.d.ts +27 -0
  234. package/build/main//321/201omponents/Input/types.js +2 -0
  235. package/build/main//321/201omponents/Input/types.js.map +1 -0
  236. package/build/main//321/201omponents/ListItem/ListItem.d.ts +23 -0
  237. package/build/main//321/201omponents/ListItem/ListItem.js +195 -0
  238. package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -0
  239. package/build/main//321/201omponents/ListItem/index.d.ts +1 -0
  240. package/build/main//321/201omponents/ListItem/index.js +2 -0
  241. package/build/main//321/201omponents/ListItem/index.js.map +1 -0
  242. package/build/main//321/201omponents/ListItem/types.d.ts +38 -0
  243. package/build/main//321/201omponents/ListItem/types.js +2 -0
  244. package/build/main//321/201omponents/ListItem/types.js.map +1 -0
  245. package/build/main//321/201omponents/Loader/Loader.d.ts +4 -0
  246. package/build/main//321/201omponents/Loader/Loader.js +40 -0
  247. package/build/main//321/201omponents/Loader/Loader.js.map +1 -0
  248. package/build/main//321/201omponents/Loader/index.d.ts +1 -0
  249. package/build/main//321/201omponents/Loader/index.js +2 -0
  250. package/build/main//321/201omponents/Loader/index.js.map +1 -0
  251. package/build/main//321/201omponents/Loader/types.d.ts +12 -0
  252. package/build/main//321/201omponents/Loader/types.js +2 -0
  253. package/build/main//321/201omponents/Loader/types.js.map +1 -0
  254. package/build/main//321/201omponents/Modal/Modal.d.ts +4 -0
  255. package/build/main//321/201omponents/Modal/Modal.js +53 -0
  256. package/build/main//321/201omponents/Modal/Modal.js.map +1 -0
  257. package/build/main//321/201omponents/Modal/index.d.ts +1 -0
  258. package/build/main//321/201omponents/Modal/index.js +2 -0
  259. package/build/main//321/201omponents/Modal/index.js.map +1 -0
  260. package/build/main//321/201omponents/Modal/types.d.ts +15 -0
  261. package/build/main//321/201omponents/Modal/types.js +2 -0
  262. package/build/main//321/201omponents/Modal/types.js.map +1 -0
  263. package/build/main//321/201omponents/Notification/Notification.d.ts +8 -0
  264. package/build/main//321/201omponents/Notification/Notification.js +178 -0
  265. package/build/main//321/201omponents/Notification/Notification.js.map +1 -0
  266. package/build/main//321/201omponents/Notification/index.d.ts +1 -0
  267. package/build/main//321/201omponents/Notification/index.js +2 -0
  268. package/build/main//321/201omponents/Notification/index.js.map +1 -0
  269. package/build/main//321/201omponents/Notification/types.d.ts +39 -0
  270. package/build/main//321/201omponents/Notification/types.js +2 -0
  271. package/build/main//321/201omponents/Notification/types.js.map +1 -0
  272. package/build/main//321/201omponents/Profile/Profile.d.ts +4 -0
  273. package/build/main//321/201omponents/Profile/Profile.js +42 -0
  274. package/build/main//321/201omponents/Profile/Profile.js.map +1 -0
  275. package/build/main//321/201omponents/Profile/index.d.ts +1 -0
  276. package/build/main//321/201omponents/Profile/index.js +2 -0
  277. package/build/main//321/201omponents/Profile/index.js.map +1 -0
  278. package/build/main//321/201omponents/Profile/types.d.ts +14 -0
  279. package/build/main//321/201omponents/Profile/types.js +2 -0
  280. package/build/main//321/201omponents/Profile/types.js.map +1 -0
  281. package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +4 -0
  282. package/build/main//321/201omponents/ProgressBar/ProgressBar.js +66 -0
  283. package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +1 -0
  284. package/build/main//321/201omponents/ProgressBar/index.d.ts +1 -0
  285. package/build/main//321/201omponents/ProgressBar/index.js +2 -0
  286. package/build/main//321/201omponents/ProgressBar/index.js.map +1 -0
  287. package/build/main//321/201omponents/ProgressBar/types.d.ts +4 -0
  288. package/build/main//321/201omponents/ProgressBar/types.js +2 -0
  289. package/build/main//321/201omponents/ProgressBar/types.js.map +1 -0
  290. package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +4 -0
  291. package/build/main//321/201omponents/RadioButton/RadioButton.js +36 -0
  292. package/build/main//321/201omponents/RadioButton/RadioButton.js.map +1 -0
  293. package/build/main//321/201omponents/RadioButton/index.d.ts +1 -0
  294. package/build/main//321/201omponents/RadioButton/index.js +2 -0
  295. package/build/main//321/201omponents/RadioButton/index.js.map +1 -0
  296. package/build/main//321/201omponents/RadioButton/types.d.ts +9 -0
  297. package/build/main//321/201omponents/RadioButton/types.js +2 -0
  298. package/build/main//321/201omponents/RadioButton/types.js.map +1 -0
  299. package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +4 -0
  300. package/build/main//321/201omponents/ScrollBar/ScrollBar.js +50 -0
  301. package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -0
  302. package/build/main//321/201omponents/ScrollBar/index.d.ts +1 -0
  303. package/build/main//321/201omponents/ScrollBar/index.js +2 -0
  304. package/build/main//321/201omponents/ScrollBar/index.js.map +1 -0
  305. package/build/main//321/201omponents/ScrollBar/types.d.ts +9 -0
  306. package/build/main//321/201omponents/ScrollBar/types.js +2 -0
  307. package/build/main//321/201omponents/ScrollBar/types.js.map +1 -0
  308. package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +4 -0
  309. package/build/main//321/201omponents/Skeleton/Skeleton.js +66 -0
  310. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -0
  311. package/build/main//321/201omponents/Skeleton/index.d.ts +1 -0
  312. package/build/main//321/201omponents/Skeleton/index.js +2 -0
  313. package/build/main//321/201omponents/Skeleton/index.js.map +1 -0
  314. package/build/main//321/201omponents/Skeleton/types.d.ts +16 -0
  315. package/build/main//321/201omponents/Skeleton/types.js +2 -0
  316. package/build/main//321/201omponents/Skeleton/types.js.map +1 -0
  317. package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
  318. package/build/main//321/201omponents/Stories/Stories.js +281 -0
  319. package/build/main//321/201omponents/Stories/Stories.js.map +1 -0
  320. package/build/main//321/201omponents/Stories/index.d.ts +1 -0
  321. package/build/main//321/201omponents/Stories/index.js +2 -0
  322. package/build/main//321/201omponents/Stories/index.js.map +1 -0
  323. package/build/main//321/201omponents/Stories/types.d.ts +54 -0
  324. package/build/main//321/201omponents/Stories/types.js +11 -0
  325. package/build/main//321/201omponents/Stories/types.js.map +1 -0
  326. package/build/main//321/201omponents/Switcher/Switcher.d.ts +4 -0
  327. package/build/main//321/201omponents/Switcher/Switcher.js +34 -0
  328. package/build/main//321/201omponents/Switcher/Switcher.js.map +1 -0
  329. package/build/main//321/201omponents/Switcher/index.d.ts +1 -0
  330. package/build/main//321/201omponents/Switcher/index.js +2 -0
  331. package/build/main//321/201omponents/Switcher/index.js.map +1 -0
  332. package/build/main//321/201omponents/Switcher/types.d.ts +8 -0
  333. package/build/main//321/201omponents/Switcher/types.js +2 -0
  334. package/build/main//321/201omponents/Switcher/types.js.map +1 -0
  335. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +5 -0
  336. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +65 -0
  337. package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +1 -0
  338. package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
  339. package/build/main//321/201omponents/SyncLoader/index.js +2 -0
  340. package/build/main//321/201omponents/SyncLoader/index.js.map +1 -0
  341. package/build/main//321/201omponents/SyncLoader/types.d.ts +7 -0
  342. package/build/main//321/201omponents/SyncLoader/types.js +2 -0
  343. package/build/main//321/201omponents/SyncLoader/types.js.map +1 -0
  344. package/build/main//321/201omponents/Textarea/Textarea.d.ts +4 -0
  345. package/build/main//321/201omponents/Textarea/Textarea.js +96 -0
  346. package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -0
  347. package/build/main//321/201omponents/Textarea/index.d.ts +1 -0
  348. package/build/main//321/201omponents/Textarea/index.js +2 -0
  349. package/build/main//321/201omponents/Textarea/index.js.map +1 -0
  350. package/build/main//321/201omponents/Textarea/types.d.ts +10 -0
  351. package/build/main//321/201omponents/Textarea/types.js +2 -0
  352. package/build/main//321/201omponents/Textarea/types.js.map +1 -0
  353. package/build/main//321/201omponents/Toggle/Toggle.d.ts +4 -0
  354. package/build/main//321/201omponents/Toggle/Toggle.js +38 -0
  355. package/build/main//321/201omponents/Toggle/Toggle.js.map +1 -0
  356. package/build/main//321/201omponents/Toggle/index.d.ts +1 -0
  357. package/build/main//321/201omponents/Toggle/index.js +2 -0
  358. package/build/main//321/201omponents/Toggle/index.js.map +1 -0
  359. package/build/main//321/201omponents/Toggle/types.d.ts +9 -0
  360. package/build/main//321/201omponents/Toggle/types.js +2 -0
  361. package/build/main//321/201omponents/Toggle/types.js.map +1 -0
  362. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +4 -0
  363. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +31 -0
  364. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -0
  365. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +4 -0
  366. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +70 -0
  367. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -0
  368. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +4 -0
  369. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +23 -0
  370. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -0
  371. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +3 -0
  372. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +76 -0
  373. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -0
  374. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -0
  375. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +40 -0
  376. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -0
  377. package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +4 -0
  378. package/build/main//321/201omponents/UserDropdown/Option/Option.js +55 -0
  379. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -0
  380. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +4 -0
  381. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +396 -0
  382. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
  383. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +90 -0
  384. package/build/main//321/201omponents/UserDropdown/helpers.js +93 -0
  385. package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -0
  386. package/build/main//321/201omponents/UserDropdown/index.d.ts +1 -0
  387. package/build/main//321/201omponents/UserDropdown/index.js +2 -0
  388. package/build/main//321/201omponents/UserDropdown/index.js.map +1 -0
  389. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +15 -0
  390. package/build/main//321/201omponents/UserDropdown/selectStyles.js +72 -0
  391. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
  392. package/build/main//321/201omponents/UserDropdown/types.d.ts +189 -0
  393. package/build/main//321/201omponents/UserDropdown/types.js +2 -0
  394. package/build/main//321/201omponents/UserDropdown/types.js.map +1 -0
  395. package/build/main//321/201omponents/index.d.ts +32 -0
  396. package/build/main//321/201omponents/index.js +33 -0
  397. package/build/main//321/201omponents/index.js.map +1 -0
  398. package/build/main//321/201omponents/types.d.ts +2 -0
  399. package/build/main//321/201omponents/types.js +2 -0
  400. package/build/main//321/201omponents/types.js.map +1 -0
  401. package/package.json +1 -1
@@ -0,0 +1,40 @@
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 { components } from 'react-select';
14
+ import { isEqual } from 'lodash';
15
+ import Chip from '../../Chip';
16
+ import { getClassNames, isValueEqualToZero } from '../../../helpers';
17
+ import '../../../styles/styles.scss';
18
+ var MultiValueLabel = function (props) {
19
+ var _a = props.data, value = _a.value, label = _a.label, avatar = _a.avatar, platform = _a.platform, isChipsCollapsable = _a.isChipsCollapsable, isError = _a.isError, isInputFocused = _a.isInputFocused.current, collapsableChipsCount = _a.collapsableChipsCount.current, lastVisibleChipIndex = _a.lastVisibleChipIndex.current, _b = props.selectProps, isDisabled = _b.isDisabled, selectedUsers = _b.value, onChange = _b.onChange;
20
+ var noChipsCount = isValueEqualToZero(collapsableChipsCount);
21
+ var userIndex = selectedUsers.findIndex(function (_a) {
22
+ var selectedUserValue = _a.value, selectedUserLabel = _a.label;
23
+ return selectedUserValue === value && selectedUserLabel === label;
24
+ });
25
+ var handleDelete = function () { return onChange(selectedUsers.filter(function (user) { return !isEqual(user, props.data); })); };
26
+ var handleMouseDown = function (event) {
27
+ event.preventDefault();
28
+ event.stopPropagation();
29
+ };
30
+ var handleTouchEnd = function (event) { return event.stopPropagation(); };
31
+ if (!isChipsCollapsable || isInputFocused || (!isInputFocused && userIndex < lastVisibleChipIndex) || noChipsCount) {
32
+ return (_jsx(components.MultiValueLabel, __assign({}, props, { children: _jsx("div", __assign({ onMouseDown: handleMouseDown, onTouchEnd: handleTouchEnd }, { children: _jsx(Chip, { name: label, avatar: avatar, isError: isError, isDisabled: isDisabled, onDelete: handleDelete }) })) })));
33
+ }
34
+ if (isChipsCollapsable && !isInputFocused && userIndex === lastVisibleChipIndex && !noChipsCount) {
35
+ return (_jsxs("div", __assign({ className: getClassNames({ className: 'multi-value-label-counter', delimiter: '__', additionalClassName: platform }), onTouchEnd: handleTouchEnd }, { children: ["+", collapsableChipsCount] })));
36
+ }
37
+ return null;
38
+ };
39
+ export default MultiValueLabel;
40
+ //# sourceMappingURL=MultiValueLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiValueLabel.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/MultiValueLabel/MultiValueLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,IAAI,MAAM,YAAY,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAEpE,OAAO,6BAA6B,CAAA;AAEpC,IAAM,eAAe,GAAG,UAAC,KAAU;IAE/B,IAAA,KAYE,KAAK,KAFN,EATC,KAAK,WAAA,EACL,KAAK,WAAA,EACL,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,kBAAkB,wBAAA,EAClB,OAAO,aAAA,EACoB,cAAc,4BAAA,EACP,qBAAqB,mCAAA,EACtB,oBAAoB,kCAAA,EAEvD,KACE,KAAK,YADoD,EAA5C,UAAU,gBAAA,EAAS,aAAa,WAAA,EAAE,QAAQ,cAAE,CACpD;IAET,IAAM,YAAY,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAA;IAC9D,IAAM,SAAS,GAAG,aAAa,CAAC,SAAS,CACvC,UAAC,EAAuE;YAA9D,iBAAiB,WAAA,EAAS,iBAAiB,WAAA;QAAwB,OAAA,iBAAiB,KAAK,KAAK,IAAI,iBAAiB,KAAK,KAAK;IAA1D,CAA0D,CACxI,CAAA;IAED,IAAM,YAAY,GAAG,cAAM,OAAA,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,UAAC,IAAqB,IAAK,OAAA,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAA1B,CAA0B,CAAC,CAAC,EAArF,CAAqF,CAAA;IAEhH,IAAM,eAAe,GAAG,UAAC,KAAuC;QAC9D,KAAK,CAAC,cAAc,EAAE,CAAA;QACtB,KAAK,CAAC,eAAe,EAAE,CAAA;IACzB,CAAC,CAAA;IAED,IAAM,cAAc,GAAG,UAAC,KAAuC,IAAK,OAAA,KAAK,CAAC,eAAe,EAAE,EAAvB,CAAuB,CAAA;IAE3F,IAAI,CAAC,kBAAkB,IAAI,cAAc,IAAI,CAAC,CAAC,cAAc,IAAI,SAAS,GAAG,oBAAoB,CAAC,IAAI,YAAY,EAAE;QAClH,OAAO,CACL,KAAC,UAAU,CAAC,eAAe,eAAK,KAAK,cACnC,uBAAK,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,gBAC3D,KAAC,IAAI,IAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,GAAI,IACnG,IACqB,CAC9B,CAAA;KACF;IAED,IAAI,kBAAkB,IAAI,CAAC,cAAc,IAAI,SAAS,KAAK,oBAAoB,IAAI,CAAC,YAAY,EAAE;QAChG,OAAO,CACL,wBACE,SAAS,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,2BAA2B,EAAE,SAAS,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,EACpH,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,55 @@
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 Popup from 'reactjs-popup';
15
+ import { components } from 'react-select';
16
+ import Avatar from '../../Avatar';
17
+ import ContactInfo from '../ContactInfo/ContactInfo';
18
+ import { isMobilePlatform, isWebPlatform } from '../../../helpers';
19
+ import { ReactComponent as CorporateUserIcon } from '../../../assets/icons/corporate-user.svg';
20
+ import { ReactComponent as MyContactUserIcon } from '../../../assets/icons/my-contact-user.svg';
21
+ import { ReactComponent as ContactInfoIcon } from '../../../assets/icons/contact-info.svg';
22
+ import '../../../styles/styles.scss';
23
+ var POPUP_APPEARANCE_DELAY = 1000;
24
+ var PADDING_LEFT = 8;
25
+ var INDENTS = 50;
26
+ var Option = function (props) {
27
+ var _a;
28
+ 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, platform = _b.platform, language = _b.language, setIsSearchable = _b.setIsSearchable, setModalData = _b.setModalData;
29
+ var ref = useRef(null);
30
+ var _c = useState(0), left = _c[0], setLeft = _c[1];
31
+ var _d = useState(0), maxWidth = _d[0], setMaxWidth = _d[1];
32
+ var clientRect = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
33
+ var clientRectLeft = ((clientRect === null || clientRect === void 0 ? void 0 : clientRect.left) || 0) + PADDING_LEFT;
34
+ var clientRectWidth = ((clientRect === null || clientRect === void 0 ? void 0 : clientRect.width) || INDENTS) - INDENTS;
35
+ var handleContactInfoIconClick = function (event) {
36
+ event.stopPropagation();
37
+ setIsSearchable(false);
38
+ setModalData({ avatar: avatar, name: label, email: email, serverName: serverName, company: company, department: department, companyPosition: companyPosition });
39
+ };
40
+ var renderUserIcon = function () { return (isMyContacts ? _jsx(MyContactUserIcon, { color: "var(--color-icon-secondary)" }) : _jsx(CorporateUserIcon, {})); };
41
+ var renderContactInfoIcon = function () {
42
+ var isIconVisible = !isMyContacts && isMobilePlatform(platform);
43
+ return isIconVisible && _jsx(ContactInfoIcon, { className: "smartapp-option__container--icon", onClick: handleContactInfoIconClick });
44
+ };
45
+ useEffect(function () {
46
+ setLeft(clientRectLeft);
47
+ setMaxWidth(clientRectWidth);
48
+ }, [clientRectLeft, clientRectWidth]);
49
+ var renderContactInfoPopup = function () { return (_jsx(Popup, __assign({ className: "contact-info", position: "bottom center", contentStyle: { '--contact-info-content-left': "".concat(left, "px"), '--contact-info-content-max-width': "".concat(maxWidth, "px") }, on: ['hover'], mouseEnterDelay: POPUP_APPEARANCE_DELAY, trigger: function () { return (_jsx("div", { children: _jsx(Avatar, { username: label, avatar: avatar, size: 32 }) })); } }, { children: _jsx(ContactInfo, { language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition }) }))); };
50
+ return (_jsx(components.Option, __assign({}, props, { innerRef: function (el) {
51
+ ref.current = el;
52
+ } }, { children: _jsxs("div", __assign({ className: "smartapp-option" }, { children: [!isMyContacts && isWebPlatform(platform) ? renderContactInfoPopup() : _jsx(Avatar, { username: label, avatar: avatar, 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(), _jsx("div", { children: label })] })), _jsx("div", __assign({ className: "smartapp-option__container--info__email" }, { children: email }))] })), renderContactInfoIcon()] }))] })) })));
53
+ };
54
+ export default Option;
55
+ //# sourceMappingURL=Option.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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 @@
1
+ import { IUserDropdownProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ declare const UserDropdown: ({ theme, platform, isDisabled, isLoading, isChipsVisible, isChipsCollapsable, isMenuCloseOnSelect, isFilteringDisabled, hasNextPage, isNextPageLoading, language, layoutType, title, mask, placeholder, hint, noOptionsMessage, maxMembersCount, fillType, selectedEntries, corporateEntries, myContactsEntries, onInputChange, onChange, onMenuOpen, onMenuClose, onLoadNextPage, menuPosition, }: IUserDropdownProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default UserDropdown;
@@ -0,0 +1,396 @@
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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
+ if (ar || !(i in from)) {
15
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
+ ar[i] = from[i];
17
+ }
18
+ }
19
+ return to.concat(ar || Array.prototype.slice.call(from));
20
+ };
21
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
22
+ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
23
+ import Select, { components } from 'react-select';
24
+ import { debounce, isNil, isNull, uniqBy, uniq, isEmpty, omit } from 'lodash';
25
+ import classNames from 'classnames';
26
+ import { v4 as uuidv4 } from 'uuid';
27
+ import { transliterate as tr } from 'transliteration';
28
+ import { ru } from 'convert-layout';
29
+ import LoadingMessage from './LoadingMessage/LoadingMessage';
30
+ import MultiValueLabel from './MultiValueLabel/MultiValueLabel';
31
+ import Option from './Option/Option';
32
+ import MenuList from './MenuList/MenuList';
33
+ import Modal from '../Modal';
34
+ import ContactBottomSheet from './ContactBottomSheet/ContactBottomSheet';
35
+ import { IndicatorSeparator, DropdownIndicator, LoadingIndicator, MultiValueRemove, generateCorporateOptionsToSelect, generateContactsOptionsToSelect, generateCorporateOption, generateContactsOption, generateEnteredByUserOption, sortCorporateContacts, } from './helpers';
36
+ import { isIosPlatform, isMobilePlatform } from '../../helpers';
37
+ import { DEFAULT_INPUT_PADDING, ENTER_KEY, FILL_TYPE, INPUT_COUNTER_TIMEOUT, LANGUAGES, LAYOUT_TYPE, MASK_INPUT_PL, MENU_POSITIONS, PLATFORM, THEME, } from '../../constants';
38
+ import selectStyles from './selectStyles';
39
+ import '../../styles/styles.scss';
40
+ var MIN_INPUT_SYMBOLS = 3;
41
+ var EMAIL_FIELD = 'email';
42
+ var THREE_DIGIT_NUMBER_WIDTH = 48;
43
+ var TWO_DIGIT_NUMBER_WIDTH = 40;
44
+ var SINGLE_DIGIT_NUMBER_WIDTH = 32;
45
+ var INPUT_SPACE_WIDTH = 46;
46
+ var GAP = 8;
47
+ var EXCLUDED_FIELDS;
48
+ (function (EXCLUDED_FIELDS) {
49
+ EXCLUDED_FIELDS["value"] = "value";
50
+ EXCLUDED_FIELDS["label"] = "label";
51
+ EXCLUDED_FIELDS["layoutType"] = "layoutType";
52
+ EXCLUDED_FIELDS["platform"] = "platform";
53
+ EXCLUDED_FIELDS["language"] = "language";
54
+ EXCLUDED_FIELDS["isMyContacts"] = "isMyContacts";
55
+ EXCLUDED_FIELDS["isEnteredByUser"] = "isEnteredByUser";
56
+ EXCLUDED_FIELDS["isChipsCollapsable"] = "isChipsCollapsable";
57
+ EXCLUDED_FIELDS["isInputFocused"] = "isInputFocused";
58
+ EXCLUDED_FIELDS["setIsSearchable"] = "setIsSearchable";
59
+ EXCLUDED_FIELDS["selectRef"] = "selectRef";
60
+ EXCLUDED_FIELDS["setModalData"] = "setModalData";
61
+ EXCLUDED_FIELDS["isError"] = "isError";
62
+ EXCLUDED_FIELDS["collapsableChipsCount"] = "collapsableChipsCount";
63
+ EXCLUDED_FIELDS["lastVisibleChipIndex"] = "lastVisibleChipIndex";
64
+ })(EXCLUDED_FIELDS || (EXCLUDED_FIELDS = {}));
65
+ var COMMON_FIELDS_TO_OMIT = Object.keys(omit(EXCLUDED_FIELDS, [EXCLUDED_FIELDS.language, EXCLUDED_FIELDS.isMyContacts, EXCLUDED_FIELDS.isEnteredByUser, EXCLUDED_FIELDS.isError]));
66
+ var Input = function (props) { return _jsx(components.Input, __assign({}, props, { enterkeyhint: "done" })); };
67
+ var UserDropdown = function (_a) {
68
+ var _b = _a.theme, theme = _b === void 0 ? THEME.default : _b, _c = _a.platform, platform = _c === void 0 ? PLATFORM.web : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isLoading, isLoading = _e === void 0 ? false : _e, _f = _a.isChipsVisible, isChipsVisible = _f === void 0 ? true : _f, _g = _a.isChipsCollapsable, isChipsCollapsable = _g === void 0 ? false : _g, _h = _a.isMenuCloseOnSelect, isMenuCloseOnSelect = _h === void 0 ? true : _h, _j = _a.isFilteringDisabled, isFilteringDisabled = _j === void 0 ? false : _j, _k = _a.hasNextPage, hasNextPage = _k === void 0 ? false : _k, _l = _a.isNextPageLoading, isNextPageLoading = _l === void 0 ? false : _l, _m = _a.language, language = _m === void 0 ? LANGUAGES.ru : _m, _o = _a.layoutType, layoutType = _o === void 0 ? LAYOUT_TYPE.minimal : _o, title = _a.title, mask = _a.mask, placeholder = _a.placeholder, hint = _a.hint, noOptionsMessage = _a.noOptionsMessage, maxMembersCount = _a.maxMembersCount, _p = _a.fillType, fillType = _p === void 0 ? FILL_TYPE.primary : _p, _q = _a.selectedEntries, selectedEntries = _q === void 0 ? [] : _q, corporateEntries = _a.corporateEntries, myContactsEntries = _a.myContactsEntries, onInputChange = _a.onInputChange, onChange = _a.onChange, onMenuOpen = _a.onMenuOpen, onMenuClose = _a.onMenuClose, onLoadNextPage = _a.onLoadNextPage, _r = _a.menuPosition, menuPosition = _r === void 0 ? MENU_POSITIONS.top : _r;
69
+ var _s = useState(''), userDropdownId = _s[0], setUserDropdownId = _s[1];
70
+ var _t = useState([]), selectedUsers = _t[0], setSelectedUsers = _t[1];
71
+ var _u = useState(null), timeoutId = _u[0], setTimeoutId = _u[1];
72
+ var _v = useState(''), paddingLeft = _v[0], setPaddingLeft = _v[1];
73
+ var _w = useState(0), maskWidth = _w[0], setMaskWidth = _w[1];
74
+ var _x = useState(false), isError = _x[0], setIsError = _x[1];
75
+ var _y = useState(true), isSearchable = _y[0], setIsSearchable = _y[1];
76
+ var _z = useState(false), isUserTyping = _z[0], setIsUserTyping = _z[1];
77
+ var _0 = useState(null), modalData = _0[0], setModalData = _0[1];
78
+ var _1 = useState(''), chipLabelWithMaxWidth = _1[0], setChipLabelWithMaxWidth = _1[1];
79
+ var isInputFocused = useRef(false);
80
+ var selectRef = useRef(null);
81
+ var maskRef = useRef(null);
82
+ var menuScrollFromTop = useRef(0);
83
+ var collapsableChipsCount = useRef(0);
84
+ var lastVisibleChipIndex = useRef(-1);
85
+ var generatePaddingLeft = function () {
86
+ var _a, _b;
87
+ var maskWidth = ((_b = (_a = maskRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) || null;
88
+ maskWidth && setMaskWidth(maskWidth + GAP);
89
+ return "".concat(maskWidth ? maskWidth + MASK_INPUT_PL : DEFAULT_INPUT_PADDING, "px");
90
+ };
91
+ var generateStyles = function () {
92
+ return selectStyles({
93
+ isChipsVisible: isChipsVisible,
94
+ isMaxMembersAdded: maxMembersCount && isChipsVisible ? selectedUsers.length === maxMembersCount : false,
95
+ isDisabled: isDisabled,
96
+ isError: isError || selectedUsers.some(function (_a) {
97
+ var isError = _a.isError;
98
+ return isError;
99
+ }),
100
+ lastRowNumber: isChipsVisible ? Math.ceil(selectedUsers.length / 2) + 1 : 1,
101
+ paddingLeft: paddingLeft,
102
+ fillType: fillType,
103
+ platform: platform,
104
+ layoutType: layoutType,
105
+ });
106
+ };
107
+ var generateNoOptionsMessage = function (_a) {
108
+ var inputValue = _a.inputValue;
109
+ return inputValue.length >= MIN_INPUT_SYMBOLS && !isNull(corporateEntries) && !isNull(myContactsEntries) && noOptionsMessage ? noOptionsMessage : null;
110
+ };
111
+ var generateOptions = function () {
112
+ var _a, _b;
113
+ var commonFields = {
114
+ platform: platform,
115
+ layoutType: layoutType,
116
+ isChipsCollapsable: isChipsCollapsable,
117
+ isInputFocused: isInputFocused,
118
+ selectRef: selectRef,
119
+ setIsSearchable: setIsSearchable,
120
+ setModalData: setModalData,
121
+ collapsableChipsCount: collapsableChipsCount,
122
+ lastVisibleChipIndex: lastVisibleChipIndex,
123
+ };
124
+ var corporateContacts = uniqBy(__spreadArray(__spreadArray([], ((corporateEntries === null || corporateEntries === void 0 ? void 0 : corporateEntries.corpPhonebookEntries) || []), true), ((corporateEntries === null || corporateEntries === void 0 ? void 0 : corporateEntries.trustSearchEntries) || []), true), function (_a) {
125
+ var contacts = _a.contacts;
126
+ return contacts.filter(function (_a) {
127
+ var contactType = _a.contactType;
128
+ return contactType === EMAIL_FIELD;
129
+ })[0].contact;
130
+ });
131
+ var query = ((_b = (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.inputValue) || '';
132
+ var sortedCorporateContacts = sortCorporateContacts(corporateContacts, query);
133
+ return __spreadArray(__spreadArray([], generateCorporateOptionsToSelect(__assign({ language: language, options: sortedCorporateContacts }, commonFields)), true), generateContactsOptionsToSelect(__assign({ options: myContactsEntries || [] }, commonFields)), true);
134
+ };
135
+ var handleSetTimeoutForCounter = function () {
136
+ var id = setTimeout(function () { return setTimeoutId(null); }, INPUT_COUNTER_TIMEOUT);
137
+ setTimeoutId(id);
138
+ };
139
+ var requestDebounce = debounce(function (inputValue) {
140
+ onInputChange(inputValue);
141
+ setIsUserTyping(false);
142
+ }, 300);
143
+ var handleResetError = function () { return isError && setIsError(false); };
144
+ var handleMenuClose = function () {
145
+ menuScrollFromTop.current = 0;
146
+ handleResetError();
147
+ onMenuClose && onMenuClose();
148
+ };
149
+ var handleInputChange = function (inputValue) {
150
+ setIsUserTyping(true);
151
+ handleResetError();
152
+ if (inputValue.length >= MIN_INPUT_SYMBOLS) {
153
+ requestDebounce(inputValue);
154
+ }
155
+ else {
156
+ debounce(function () {
157
+ setIsUserTyping(false);
158
+ }, 300);
159
+ }
160
+ };
161
+ var handleAddUser = function (needToShowError) {
162
+ if (needToShowError === void 0) { needToShowError = true; }
163
+ var selectRefCurrent = selectRef.current;
164
+ var _a = selectRefCurrent.props, options = _a.options, inputValue = _a.inputValue, onChange = _a.onChange, onInputChange = _a.onInputChange;
165
+ var trimInputValue = inputValue.trim();
166
+ var regex = new RegExp(/^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/);
167
+ var optionProps = {
168
+ email: trimInputValue,
169
+ platform: platform,
170
+ layoutType: layoutType,
171
+ isChipsCollapsable: isChipsCollapsable,
172
+ isInputFocused: isInputFocused,
173
+ selectRef: selectRef,
174
+ collapsableChipsCount: collapsableChipsCount,
175
+ lastVisibleChipIndex: lastVisibleChipIndex,
176
+ };
177
+ if (regex.test(trimInputValue)) {
178
+ var isUserAlreadySelected = selectedUsers.find(function (_a) {
179
+ var email = _a.email;
180
+ return email === trimInputValue;
181
+ });
182
+ var existingUser = options.find(function (_a) {
183
+ var email = _a.email;
184
+ return email === trimInputValue;
185
+ });
186
+ onChange(__spreadArray(__spreadArray([], selectedUsers, true), [existingUser || generateEnteredByUserOption(optionProps)], false));
187
+ isUserAlreadySelected && needToShowError ? setIsError(true) : onInputChange('');
188
+ }
189
+ else if (trimInputValue) {
190
+ onChange(__spreadArray(__spreadArray([], selectedUsers, true), [generateEnteredByUserOption(__assign(__assign({}, optionProps), { isError: true }))], false));
191
+ onInputChange('');
192
+ }
193
+ return Promise.resolve();
194
+ };
195
+ var handleKeyDown = function (event) {
196
+ if (event.code === ENTER_KEY || event.key === ENTER_KEY) {
197
+ event.preventDefault();
198
+ handleAddUser().then(function () { });
199
+ }
200
+ };
201
+ var handleChange = function (newSelectedUsers) {
202
+ var uniqNewSelectedUsers = uniqBy(newSelectedUsers, EMAIL_FIELD);
203
+ var users = [];
204
+ uniqNewSelectedUsers.forEach(function (user) {
205
+ var isEnteredByUser = user.isEnteredByUser, isMyContacts = user.isMyContacts;
206
+ var userToAdd = omit(user, COMMON_FIELDS_TO_OMIT);
207
+ var entryFieldsToExclude = isMyContacts ? [EXCLUDED_FIELDS.isMyContacts] : [EXCLUDED_FIELDS.language];
208
+ var fieldsToExclude = isEnteredByUser ? [EXCLUDED_FIELDS.isEnteredByUser, EXCLUDED_FIELDS.isError] : entryFieldsToExclude;
209
+ users.push(omit(userToAdd, fieldsToExclude));
210
+ });
211
+ onChange(users);
212
+ setSelectedUsers(uniqNewSelectedUsers);
213
+ if (maxMembersCount) {
214
+ var isMaxUsersAdded = uniqNewSelectedUsers.length === maxMembersCount;
215
+ var remainingUsers = maxMembersCount - uniqNewSelectedUsers.length;
216
+ if (isMaxUsersAdded) {
217
+ !isNull(timeoutId) && clearTimeout(timeoutId);
218
+ handleSetTimeoutForCounter();
219
+ }
220
+ if (remainingUsers && !isNull(timeoutId)) {
221
+ clearTimeout(timeoutId);
222
+ setTimeoutId(null);
223
+ }
224
+ }
225
+ if (!isInputFocused.current && isChipsCollapsable) {
226
+ handleFocus();
227
+ }
228
+ };
229
+ var isContainsValue = function (_a) {
230
+ var label = _a.label, email = _a.email, value = _a.value;
231
+ return label.toLowerCase().includes(value) || email.toLowerCase().includes(value);
232
+ };
233
+ var handleFilterOption = function (_a, inputValue) {
234
+ var _b = _a.data, label = _b.label, optionEmail = _b.email;
235
+ var originInputValue = inputValue.toLowerCase();
236
+ var transliteratedInputValue = tr(originInputValue);
237
+ var toEngInputValue = ru.toEn(originInputValue);
238
+ var fromEngInputValue = ru.fromEn(originInputValue);
239
+ var isUserAlreadySelected = selectedUsers.find(function (_a) {
240
+ var email = _a.email;
241
+ return email === optionEmail;
242
+ });
243
+ var isContainsInputValue = [originInputValue, transliteratedInputValue, toEngInputValue, fromEngInputValue].some(function (value) {
244
+ return isContainsValue({ label: label, email: optionEmail, value: value });
245
+ });
246
+ if (isFilteringDisabled)
247
+ return !isEmpty(selectedUsers) ? !isUserAlreadySelected : true;
248
+ return !isEmpty(selectedUsers) ? !isUserAlreadySelected && isContainsInputValue : isContainsInputValue;
249
+ };
250
+ var getTruncatedElementY = function (element) { return Math.trunc(element.getBoundingClientRect().y); };
251
+ var getCounterWidth = function (counterNumber) {
252
+ if (counterNumber >= 100)
253
+ return THREE_DIGIT_NUMBER_WIDTH;
254
+ if (counterNumber >= 10)
255
+ return TWO_DIGIT_NUMBER_WIDTH;
256
+ return SINGLE_DIGIT_NUMBER_WIDTH;
257
+ };
258
+ var handleCollapseChips = function () {
259
+ var _a, _b;
260
+ var collapsableChips = 0;
261
+ var chipLabelWithMaxWidth = '';
262
+ var chipsNodes = ((_a = document.querySelector("#".concat(userDropdownId))) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.smartapp-chip')) || [];
263
+ var chips = Array.from(chipsNodes);
264
+ if (isEmpty(chips))
265
+ return;
266
+ var yRows = uniq(chips.map(function (chip) { return getTruncatedElementY(chip); }));
267
+ var ySecondRow = yRows[1];
268
+ var rowsToHide = yRows.slice(2);
269
+ var secondRow = [];
270
+ chips.forEach(function (chip) {
271
+ var y = getTruncatedElementY(chip);
272
+ if (rowsToHide.includes(y)) {
273
+ collapsableChips += 1;
274
+ }
275
+ else {
276
+ y === ySecondRow && secondRow.push(chip);
277
+ }
278
+ });
279
+ var counterWidth = getCounterWidth(collapsableChips);
280
+ var rowWidth = counterWidth + INPUT_SPACE_WIDTH;
281
+ var dropdownWidth = ((_b = document.querySelector("#".concat(userDropdownId))) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().width) - maskWidth;
282
+ secondRow.forEach(function (chip) {
283
+ var _a;
284
+ rowWidth += chip.getBoundingClientRect().width + GAP;
285
+ if (rowWidth > dropdownWidth) {
286
+ if (secondRow.length > 1) {
287
+ collapsableChips += 1;
288
+ }
289
+ else {
290
+ var emptySpaceWidth = collapsableChips > 0 ? counterWidth + INPUT_SPACE_WIDTH + GAP : INPUT_SPACE_WIDTH;
291
+ chip.style.maxWidth = "".concat(dropdownWidth - emptySpaceWidth, "px");
292
+ chipLabelWithMaxWidth = ((_a = chip.querySelector('.smartapp-chip__info--name')) === null || _a === void 0 ? void 0 : _a.innerHTML) || '';
293
+ }
294
+ }
295
+ });
296
+ collapsableChipsCount.current = collapsableChips;
297
+ lastVisibleChipIndex.current = chips.length - collapsableChips;
298
+ setChipLabelWithMaxWidth(chipLabelWithMaxWidth || uuidv4());
299
+ };
300
+ var handleUnCollapseChips = function () {
301
+ var _a;
302
+ var chipsNodes = ((_a = document.querySelector("#".concat(userDropdownId))) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.smartapp-chip')) || [];
303
+ var chips = Array.from(chipsNodes);
304
+ chips.forEach(function (chip) {
305
+ var _a;
306
+ var chipLabel = ((_a = chip.querySelector('.smartapp-chip__info--name')) === null || _a === void 0 ? void 0 : _a.innerHTML) || '';
307
+ chipLabel === chipLabelWithMaxWidth && (chip.style.maxWidth = '100%');
308
+ });
309
+ collapsableChipsCount.current = 0;
310
+ lastVisibleChipIndex.current = -1;
311
+ setChipLabelWithMaxWidth('');
312
+ };
313
+ var handleBlur = function () {
314
+ handleAddUser(false).then(function () {
315
+ isChipsCollapsable && handleCollapseChips();
316
+ isInputFocused.current = false;
317
+ });
318
+ };
319
+ var handleFocus = function () {
320
+ if (isIosPlatform(platform)) {
321
+ new Promise(function (resolve) { return resolve(); }).then(function () { var _a; return (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
322
+ }
323
+ else {
324
+ setTimeout(function () { var _a; return (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, 100);
325
+ }
326
+ isInputFocused.current = true;
327
+ isChipsCollapsable && handleUnCollapseChips();
328
+ };
329
+ var handleCloseModal = function () {
330
+ setModalData(null);
331
+ setIsSearchable(true);
332
+ if (isMobilePlatform(platform)) {
333
+ new Promise(function (resolve) { return resolve(); }).then(function () { var _a; return (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
334
+ }
335
+ };
336
+ var renderCounter = function () {
337
+ return !isNil(maxMembersCount) && (_jsx("div", __assign({ className: classNames('smartapp-user-dropdown__title--counter', { 'smartapp-user-dropdown__title--counter__error': !isNull(timeoutId) }) }, { children: "".concat(selectedUsers.length, "/").concat(maxMembersCount) })));
338
+ };
339
+ var renderTitle = function () {
340
+ return title && (_jsxs("div", __assign({ className: "smartapp-user-dropdown__title" }, { children: [_jsx("p", __assign({ className: "smartapp-user-dropdown__title--text" }, { children: title })), renderCounter()] })));
341
+ };
342
+ var renderMask = function () {
343
+ return mask && (_jsx("div", __assign({ ref: maskRef, className: "smartapp-user-dropdown__container--mask" }, { children: mask })));
344
+ };
345
+ var renderHint = function () { return hint && _jsx("div", __assign({ className: "smartapp-user-dropdown__hint" }, { children: hint })); };
346
+ var modalContent = modalData ? (_jsx(ContactBottomSheet, { language: language, avatar: modalData.avatar, name: modalData.name, email: modalData.email, serverName: modalData.serverName, company: modalData.company, department: modalData.department, companyPosition: modalData.companyPosition })) : (_jsx(_Fragment, {}));
347
+ useEffect(function () {
348
+ !userDropdownId && setUserDropdownId("user_dropdown_".concat(uuidv4().replace(/-/g, '_')));
349
+ }, [userDropdownId]);
350
+ useLayoutEffect(function () {
351
+ if (userDropdownId) {
352
+ isChipsCollapsable ? handleCollapseChips() : handleUnCollapseChips();
353
+ }
354
+ // eslint-disable-next-line
355
+ }, [isChipsCollapsable, userDropdownId]);
356
+ useEffect(function () {
357
+ setPaddingLeft(generatePaddingLeft());
358
+ }, [mask]);
359
+ useEffect(function () {
360
+ setSelectedUsers(function (prevSelectedUsers) { return prevSelectedUsers.map(function (selectedUser) { return (__assign(__assign({}, selectedUser), { layoutType: layoutType, isChipsCollapsable: isChipsCollapsable })); }); });
361
+ }, [layoutType, isChipsCollapsable]);
362
+ useEffect(function () {
363
+ if (!isEmpty(selectedEntries)) {
364
+ setSelectedUsers(selectedEntries.map(function (entity) {
365
+ var commonFields = {
366
+ platform: platform,
367
+ layoutType: layoutType,
368
+ isChipsCollapsable: isChipsCollapsable,
369
+ isInputFocused: isInputFocused,
370
+ selectRef: selectRef,
371
+ collapsableChipsCount: collapsableChipsCount,
372
+ lastVisibleChipIndex: lastVisibleChipIndex,
373
+ };
374
+ var generatedNotCorporateEntity = Object.keys(entity).length === 1
375
+ ? generateEnteredByUserOption(__assign({ email: entity.email }, commonFields))
376
+ : generateContactsOption(__assign({ option: entity }, commonFields));
377
+ return 'contacts' in entity ? generateCorporateOption(__assign({ option: entity }, commonFields)) : generatedNotCorporateEntity;
378
+ }));
379
+ }
380
+ // eslint-disable-next-line
381
+ }, [selectedEntries]);
382
+ var OptionComponent = useCallback(function (props) { return _jsx(Option, __assign({}, props, { children: props.children })); }, []);
383
+ var MenuListComponent = useCallback(function (props) { return (_jsx(MenuList, __assign({}, props, { children: props.children, appTheme: theme, selectRef: selectRef, scrollFromTop: menuScrollFromTop, hasNextPage: hasNextPage, isLoading: isLoading, isUserTyping: isUserTyping, isNextPageLoading: isNextPageLoading, onLoadNextPage: function (inputValue) { return onLoadNextPage && onLoadNextPage(inputValue); } }))); }, [hasNextPage, isLoading, isNextPageLoading, isUserTyping, onLoadNextPage, theme]);
384
+ return (_jsxs("div", __assign({ id: userDropdownId, className: "smartapp-user-dropdown" }, { children: [renderTitle(), _jsxs("div", __assign({ className: "smartapp-user-dropdown__container" }, { children: [renderMask(), _jsx(Select, { ref: selectRef, isMulti: true, openMenuOnFocus: true, blurInputOnSelect: false, captureMenuScroll: false, isSearchable: isSearchable, menuPlacement: menuPosition, controlShouldRenderValue: isChipsVisible, backspaceRemovesValue: isChipsVisible, isDisabled: isDisabled, closeMenuOnSelect: isMenuCloseOnSelect, isLoading: isLoading, isClearable: false, styles: generateStyles(), placeholder: placeholder || '', noOptionsMessage: generateNoOptionsMessage, loadingMessage: function () { return _jsx(LoadingMessage, { theme: theme }); }, value: selectedUsers, options: !isNull(corporateEntries) || !isNull(myContactsEntries) ? generateOptions() : undefined, filterOption: handleFilterOption, onInputChange: handleInputChange, onChange: handleChange, onMenuClose: handleMenuClose, onMenuOpen: onMenuOpen, onKeyDown: handleKeyDown, onBlur: handleBlur, onFocus: handleFocus, components: {
385
+ Input: Input,
386
+ MultiValueLabel: MultiValueLabel,
387
+ MultiValueRemove: MultiValueRemove,
388
+ Option: OptionComponent,
389
+ IndicatorSeparator: IndicatorSeparator,
390
+ DropdownIndicator: DropdownIndicator,
391
+ LoadingIndicator: LoadingIndicator,
392
+ MenuList: MenuListComponent,
393
+ } })] })), renderHint(), _jsx(Modal, { isModalOpen: !isNull(modalData), platform: platform, content: modalContent, contentStyles: { borderRadius: '28px 28px 0px 0px', paddingLeft: '16px', paddingRight: '16px' }, backgroundColor: "var(--color-bg-blackout-transparent)", handleCloseModal: handleCloseModal })] })));
394
+ };
395
+ export default UserDropdown;
396
+ //# sourceMappingURL=UserDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserDropdown.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/UserDropdown.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACxF,OAAO,MAAM,EAAE,EAAc,UAAU,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7E,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,O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