@expressms/smartapp-ui 3.0.0-alpha.2 → 3.0.0-alpha.200

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 (209) hide show
  1. package/build/main/assets/icons/accepted-invite-status.svg +4 -0
  2. package/build/main/assets/icons/calendar-arrow-next.svg +3 -0
  3. package/build/main/assets/icons/calendar-arrow-prev.svg +3 -0
  4. package/build/main/assets/icons/chevron.svg +3 -0
  5. package/build/main/assets/icons/close-modal.svg +1 -1
  6. package/build/main/assets/icons/copy.svg +3 -0
  7. package/build/main/assets/icons/declined-invite-status.svg +4 -0
  8. package/build/main/assets/icons/department.svg +3 -0
  9. package/build/main/assets/icons/doc-small.svg +5 -5
  10. package/build/main/assets/icons/download.svg +3 -0
  11. package/build/main/assets/icons/file-small.svg +5 -5
  12. package/build/main/assets/icons/file.svg +1 -1
  13. package/build/main/assets/icons/image-no-preview-small.svg +11 -0
  14. package/build/main/assets/icons/image-no-preview.svg +11 -0
  15. package/build/main/assets/icons/job-position.svg +3 -0
  16. package/build/main/assets/icons/needs-action-invite-status.svg +4 -0
  17. package/build/main/assets/icons/notification-close.svg +1 -1
  18. package/build/main/assets/icons/notification-error.svg +5 -0
  19. package/build/main/assets/icons/notification-failure-filled.svg +3 -0
  20. package/build/main/assets/icons/notification-info-filled.svg +5 -0
  21. package/build/main/assets/icons/notification-success-filled.svg +4 -0
  22. package/build/main/assets/icons/office.svg +3 -0
  23. package/build/main/assets/icons/pdf-small.svg +5 -5
  24. package/build/main/assets/icons/ppt-small.svg +5 -5
  25. package/build/main/assets/icons/private.svg +4 -11
  26. package/build/main/assets/icons/search.svg +1 -1
  27. package/build/main/assets/icons/select-arrow-down.svg +3 -0
  28. package/build/main/assets/icons/select-arrow-up.svg +3 -0
  29. package/build/main/assets/icons/server.svg +3 -0
  30. package/build/main/assets/icons/txt-small.svg +5 -5
  31. package/build/main/assets/icons/video-no-preview-small.svg +11 -0
  32. package/build/main/assets/icons/video-no-preview.svg +11 -0
  33. package/build/main/assets/icons/xls-small.svg +5 -5
  34. package/build/main/assets/storybook/index.d.ts +4 -0
  35. package/build/main/assets/storybook/index.js +4 -0
  36. package/build/main/assets/storybook/index.js.map +1 -1
  37. package/build/main/constants/constants.d.ts +95 -47
  38. package/build/main/constants/constants.js +136 -50
  39. package/build/main/constants/constants.js.map +1 -1
  40. package/build/main/constants/types.d.ts +11 -1
  41. package/build/main/helpers/index.d.ts +3 -1
  42. package/build/main/helpers/index.js +21 -2
  43. package/build/main/helpers/index.js.map +1 -1
  44. package/build/main/hooks/useCharHintDisplay.d.ts +9 -0
  45. package/build/main/hooks/useCharHintDisplay.js +35 -0
  46. package/build/main/hooks/useCharHintDisplay.js.map +1 -0
  47. package/build/main/hooks/useMobileLongTap.d.ts +16 -0
  48. package/build/main/hooks/useMobileLongTap.js +65 -0
  49. package/build/main/hooks/useMobileLongTap.js.map +1 -0
  50. package/build/main/hooks/useModal.d.ts +18 -10
  51. package/build/main/hooks/useModal.js +235 -14
  52. package/build/main/hooks/useModal.js.map +1 -1
  53. package/build/main/index.d.ts +2 -0
  54. package/build/main/index.js +2 -0
  55. package/build/main/index.js.map +1 -1
  56. package/build/main/styles/styles.scss +2 -2
  57. package/build/main//321/201omponents/ActionModal/ActionModal.js +1 -1
  58. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -1
  59. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +1 -1
  60. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +133 -28
  61. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -1
  62. package/build/main//321/201omponents/AttachedFile/types.d.ts +7 -5
  63. package/build/main//321/201omponents/Avatar/Avatar.d.ts +3 -2
  64. package/build/main//321/201omponents/Avatar/Avatar.js +56 -27
  65. package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -1
  66. package/build/main//321/201omponents/Avatar/types.d.ts +9 -5
  67. package/build/main//321/201omponents/Avatar/types.js +5 -2
  68. package/build/main//321/201omponents/Avatar/types.js.map +1 -1
  69. package/build/main//321/201omponents/Button/Button.d.ts +1 -1
  70. package/build/main//321/201omponents/Button/Button.js +22 -11
  71. package/build/main//321/201omponents/Button/Button.js.map +1 -1
  72. package/build/main//321/201omponents/Button/types.d.ts +9 -2
  73. package/build/main//321/201omponents/Button/types.js +3 -0
  74. package/build/main//321/201omponents/Button/types.js.map +1 -1
  75. package/build/main//321/201omponents/Calendar/Calendar.d.ts +14 -2
  76. package/build/main//321/201omponents/Calendar/Calendar.js +238 -45
  77. package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -1
  78. package/build/main//321/201omponents/Calendar/types.d.ts +22 -8
  79. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +1 -1
  80. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +1 -1
  81. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +1 -1
  82. package/build/main//321/201omponents/Chip/Chip.d.ts +3 -2
  83. package/build/main//321/201omponents/Chip/Chip.js +198 -45
  84. package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
  85. package/build/main//321/201omponents/Chip/types.d.ts +15 -5
  86. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.d.ts +13 -0
  87. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js +76 -0
  88. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js.map +1 -0
  89. package/build/main//321/201omponents/ChipDndContext/index.d.ts +1 -0
  90. package/build/main//321/201omponents/ChipDndContext/index.js +2 -0
  91. package/build/main//321/201omponents/ChipDndContext/index.js.map +1 -0
  92. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +1 -1
  93. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +3 -2
  94. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -1
  95. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +5 -2
  96. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +1 -1
  97. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +68 -27
  98. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
  99. package/build/main//321/201omponents/ContextMenu/types.d.ts +14 -7
  100. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.d.ts +4 -0
  101. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js +49 -0
  102. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js.map +1 -0
  103. package/build/main//321/201omponents/ContextMenuItem/index.d.ts +1 -0
  104. package/build/main//321/201omponents/ContextMenuItem/index.js +2 -0
  105. package/build/main//321/201omponents/ContextMenuItem/index.js.map +1 -0
  106. package/build/main//321/201omponents/ContextMenuItem/types.d.ts +28 -0
  107. package/build/main//321/201omponents/ContextMenuItem/types.js +6 -0
  108. package/build/main//321/201omponents/ContextMenuItem/types.js.map +1 -0
  109. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +1 -1
  110. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +57 -23
  111. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -1
  112. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +2 -2
  113. package/build/main//321/201omponents/CustomSelect/selectStyles.js +35 -28
  114. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -1
  115. package/build/main//321/201omponents/CustomSelect/types.d.ts +23 -4
  116. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +1 -1
  117. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +33 -24
  118. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -1
  119. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.d.ts +11 -0
  120. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js +39 -0
  121. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js.map +1 -0
  122. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +6 -5
  123. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +2 -2
  124. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -1
  125. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +1 -1
  126. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +25 -20
  127. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -1
  128. package/build/main//321/201omponents/DraggablePopup/types.d.ts +13 -11
  129. package/build/main//321/201omponents/Flex/Flex.d.ts +1 -1
  130. package/build/main//321/201omponents/Flex/Flex.js +2 -2
  131. package/build/main//321/201omponents/Flex/Flex.js.map +1 -1
  132. package/build/main//321/201omponents/Flex/types.d.ts +2 -0
  133. package/build/main//321/201omponents/Input/Input.d.ts +1 -1
  134. package/build/main//321/201omponents/Input/Input.js +90 -33
  135. package/build/main//321/201omponents/Input/Input.js.map +1 -1
  136. package/build/main//321/201omponents/Input/types.d.ts +10 -3
  137. package/build/main//321/201omponents/ListItem/ListItem.js +26 -20
  138. package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -1
  139. package/build/main//321/201omponents/ListItem/types.d.ts +9 -4
  140. package/build/main//321/201omponents/Modal/Modal.d.ts +3 -2
  141. package/build/main//321/201omponents/Modal/Modal.js +276 -61
  142. package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
  143. package/build/main//321/201omponents/Modal/types.d.ts +44 -2
  144. package/build/main//321/201omponents/Notification/Notification.d.ts +4 -6
  145. package/build/main//321/201omponents/Notification/Notification.js +88 -30
  146. package/build/main//321/201omponents/Notification/Notification.js.map +1 -1
  147. package/build/main//321/201omponents/Notification/types.d.ts +23 -5
  148. package/build/main//321/201omponents/Skeleton/Skeleton.js +1 -1
  149. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -1
  150. package/build/main//321/201omponents/Stories/Stories.js +72 -4
  151. package/build/main//321/201omponents/Stories/Stories.js.map +1 -1
  152. package/build/main//321/201omponents/Textarea/Textarea.d.ts +1 -1
  153. package/build/main//321/201omponents/Textarea/Textarea.js +9 -6
  154. package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -1
  155. package/build/main//321/201omponents/Textarea/types.d.ts +6 -3
  156. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +1 -1
  157. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +12 -2
  158. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -1
  159. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +28 -12
  160. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -1
  161. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +2 -1
  162. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +4 -3
  163. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -1
  164. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +35 -59
  165. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -1
  166. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -2
  167. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +33 -24
  168. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -1
  169. package/build/main//321/201omponents/UserDropdown/Option/Option.js +16 -11
  170. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -1
  171. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +1 -1
  172. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +7 -9
  173. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -1
  174. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +3 -3
  175. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +239 -262
  176. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -1
  177. package/build/main//321/201omponents/UserDropdown/components/Delimiter.d.ts +8 -0
  178. package/build/main//321/201omponents/UserDropdown/components/Delimiter.js +10 -0
  179. package/build/main//321/201omponents/UserDropdown/components/Delimiter.js.map +1 -0
  180. package/build/main//321/201omponents/UserDropdown/components/Hint.d.ts +6 -0
  181. package/build/main//321/201omponents/UserDropdown/components/Hint.js +21 -0
  182. package/build/main//321/201omponents/UserDropdown/components/Hint.js.map +1 -0
  183. package/build/main//321/201omponents/UserDropdown/components/Input.d.ts +2 -0
  184. package/build/main//321/201omponents/UserDropdown/components/Input.js +24 -0
  185. package/build/main//321/201omponents/UserDropdown/components/Input.js.map +1 -0
  186. package/build/main//321/201omponents/UserDropdown/components/Mask.d.ts +7 -0
  187. package/build/main//321/201omponents/UserDropdown/components/Mask.js +18 -0
  188. package/build/main//321/201omponents/UserDropdown/components/Mask.js.map +1 -0
  189. package/build/main//321/201omponents/UserDropdown/components/Title.d.ts +5 -0
  190. package/build/main//321/201omponents/UserDropdown/components/Title.js +18 -0
  191. package/build/main//321/201omponents/UserDropdown/components/Title.js.map +1 -0
  192. package/build/main//321/201omponents/UserDropdown/constants.d.ts +57 -0
  193. package/build/main//321/201omponents/UserDropdown/constants.js +73 -0
  194. package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -1
  195. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +84 -41
  196. package/build/main//321/201omponents/UserDropdown/helpers.js +184 -14
  197. package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -1
  198. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +1 -1
  199. package/build/main//321/201omponents/UserDropdown/selectStyles.js +58 -27
  200. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -1
  201. package/build/main//321/201omponents/UserDropdown/types.d.ts +146 -60
  202. package/build/main//321/201omponents/UserDropdown/types.js +1 -8
  203. package/build/main//321/201omponents/UserDropdown/types.js.map +1 -1
  204. package/package.json +12 -7
  205. package/build/main/assets/icons/avatar-arrow-down.svg +0 -3
  206. package/build/main/assets/icons/avatar-arrow-up.svg +0 -3
  207. package/build/main/hooks/useLongTap.d.ts +0 -12
  208. package/build/main/hooks/useLongTap.js +0 -29
  209. package/build/main/hooks/useLongTap.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../../src/сomponents/Textarea/Textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,0BAA0B,CAAA;AAEjC,IAAM,QAAQ,GAAG,UAAC,EAUD;IATf,IAAA,UAAU,gBAAA,EACV,4BAA4B,EAA5B,oBAAoB,mBAAG,KAAK,KAAA,EAC5B,KAAK,WAAA,EACL,KAAK,WAAA,EACL,kBAAkB,wBAAA,EAClB,SAAS,eAAA,EACT,eAAe,qBAAA,EACf,QAAQ,cAAA,EACL,KAAK,cATQ,0HAUjB,CADS;IAER,IAAM,WAAW,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAA;IAErD,IAAM,WAAW,GAAG;QAClB,IAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,CAAA;QAE9C,IAAI,kBAAkB,IAAI,oBAAoB,EAAE;YAC9C,kBAAkB,CAAC,KAAK,CAAC,MAAM,GAAG,mBAAmB,CAAA;YACrD,kBAAkB,CAAC,KAAK,CAAC,MAAM,GAAG,UAAG,kBAAkB,CAAC,YAAY,GAAG,CAAC,OAAI,CAAA;SAC7E;IACH,CAAC,CAAA;IAED,IAAM,Y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AA"}
@@ -1,9 +1,12 @@
1
- import { ChangeEvent, TextareaHTMLAttributes } from 'react';
2
- import { IFontFamilyProps, TStyles } from '../../constants';
3
- export interface ITextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, IFontFamilyProps {
1
+ import { ChangeEvent, ReactElement, RefObject, TextareaHTMLAttributes } from 'react';
2
+ import { IFontFamilyProps, IPlatformProps, TStyles } from '../../constants';
3
+ export interface ITextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, IFontFamilyProps, IPlatformProps {
4
4
  isAdjustToTextHeight?: boolean;
5
+ textareaRef?: RefObject<HTMLTextAreaElement | null>;
5
6
  title?: string;
7
+ icon?: ReactElement;
6
8
  error?: string;
9
+ minHeight?: number;
7
10
  containerClassName?: string;
8
11
  containerStyles?: TStyles;
9
12
  onChange: (e: ChangeEvent<HTMLTextAreaElement>) => void;
@@ -1,4 +1,4 @@
1
1
  import { IContactBottomSheet } from '../types';
2
2
  import '../../../styles/styles.scss';
3
- declare const ContactBottomSheet: ({ fontFamily, language, avatar, name, email, serverName, company, department, companyPosition }: IContactBottomSheet) => import("react/jsx-runtime").JSX.Element;
3
+ declare const ContactBottomSheet: ({ fontFamily, language, contactInfoTitle, avatar, name, email, serverName, company, department, companyPosition, handleCloseModal, onClickContactInfoCopyEmail, }: IContactBottomSheet) => import("react/jsx-runtime").JSX.Element;
4
4
  export default ContactBottomSheet;
@@ -11,21 +11,31 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useEffect } from 'react';
14
+ import classNames from 'classnames';
14
15
  import Avatar from '../../Avatar';
15
16
  import ContactInfo from '../ContactInfo/ContactInfo';
16
17
  import { EVENT_LISTENER_TYPES } from '../../../constants';
17
18
  import { AVATAR_SIZES } from '../../Avatar/types';
19
+ import { ReactComponent as CloseIcon } from '../../../assets/icons/close-modal.svg';
20
+ import { ReactComponent as CopyIcon } from '../../../assets/icons/copy.svg';
18
21
  import { ReactComponent as CorporateUserIcon } from '../../../assets/icons/corporate-user.svg';
19
22
  import '../../../styles/styles.scss';
23
+ var ICON_COLOR = 'var(--color-text-secondary)';
24
+ var copyTextToClipboard = function (text) { var _a; return (_a = navigator === null || navigator === void 0 ? void 0 : navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(text); };
20
25
  var ContactBottomSheet = function (_a) {
21
- var fontFamily = _a.fontFamily, language = _a.language, avatar = _a.avatar, name = _a.name, email = _a.email, serverName = _a.serverName, company = _a.company, department = _a.department, companyPosition = _a.companyPosition;
26
+ var fontFamily = _a.fontFamily, language = _a.language, contactInfoTitle = _a.contactInfoTitle, avatar = _a.avatar, name = _a.name, email = _a.email, serverName = _a.serverName, company = _a.company, department = _a.department, companyPosition = _a.companyPosition, handleCloseModal = _a.handleCloseModal, onClickContactInfoCopyEmail = _a.onClickContactInfoCopyEmail;
22
27
  useEffect(function () {
23
28
  var modalContent = document.querySelector('.smartapp-modal__content');
24
29
  var handlePreventDefault = function (event) { return event.preventDefault(); };
25
30
  modalContent === null || modalContent === void 0 ? void 0 : modalContent.addEventListener(EVENT_LISTENER_TYPES.touchend, handlePreventDefault);
26
31
  return function () { return modalContent === null || modalContent === void 0 ? void 0 : modalContent.removeEventListener(EVENT_LISTENER_TYPES.touchend, handlePreventDefault); };
27
32
  }, []);
28
- return (_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet" }, { children: [_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header" }, { children: [_jsx(Avatar, { fontFamily: fontFamily, username: name, avatar: avatar, size: AVATAR_SIZES.size_48 }), _jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text" }, { children: [_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text__name" }, { children: [_jsx(CorporateUserIcon, {}), _jsx("div", { children: name })] })), _jsx("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text__email" }, { children: email }))] }))] })), _jsx(ContactInfo, { language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition })] })));
33
+ var handleCopyEmailClick = function (event) {
34
+ event.stopPropagation();
35
+ copyTextToClipboard(email);
36
+ onClickContactInfoCopyEmail === null || onClickContactInfoCopyEmail === void 0 ? void 0 : onClickContactInfoCopyEmail();
37
+ };
38
+ return (_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet" }, { children: [contactInfoTitle && (_jsxs("div", __assign({ className: classNames('smartapp-contact-bottom-sheet__title', { 'mb-8': !!contactInfoTitle }) }, { children: [_jsx(CloseIcon, { className: "smartapp-contact-bottom-sheet__title--close", color: ICON_COLOR, onClick: handleCloseModal }), _jsx("div", __assign({ className: "smartapp-contact-bottom-sheet__title--text" }, { children: contactInfoTitle }))] }))), _jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header" }, { children: [_jsx(Avatar, { fontFamily: fontFamily, username: name, avatar: avatar, size: AVATAR_SIZES.size_48 }), _jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text" }, { children: [_jsxs("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text__name" }, { children: [_jsx(CorporateUserIcon, {}), _jsx("div", { children: name })] })), _jsx("div", __assign({ className: "smartapp-contact-bottom-sheet__header--text__email" }, { children: email }))] })), _jsx(CopyIcon, { className: "smartapp-contact-bottom-sheet__header--copy", onClick: handleCopyEmailClick })] })), _jsx(ContactInfo, { language: language, serverName: serverName, company: company, department: department, companyPosition: companyPosition })] })));
29
39
  };
30
40
  export default ContactBottomSheet;
31
41
  //# sourceMappingURL=ContactBottomSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContactBottomSheet.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,WAAW,MAAM,4BAA4B,CAAA;AACp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AS,EAAC,oDAAoD,gBAAE,KAAK,IAAO,KAC7E,KACF,EACN,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,GAAI,KACnI,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
1
+ {"version":3,"file":"ContactBottomSheet.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,cAAc,CAAA;AACjC,OAAO,WAAW,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,uCAAuC,CAAA;AACnF,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC9F,OAAO,6BAA6B,CAAA;AAEpC,IAAM,UAAU,GAAG,6BAA6B,CAAA;AAChD,IAAM,mBAAmB,GAAG,UAAC,IAAY,YAAK,OAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,0CAAE,SAAS,CAAC,IAAI,CAAC,CAAA,EAAA,CAAA;AAEnF,IAAM,kBAAkB,GAAG,UAAC,EAaN;QAZpB,UAAU,gBAAA,EACV,QAAQ,cAAA,EACR,gBAAgB,sBAAA,EAChB,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,UAAU,gBAAA,EACV,OA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YAAY,CAAC,OAAO,GAAI,EAC9F,wBAAK,SAAS,EAAC,6CAA6C,iBAC1D,wBAAK,SAAS,EAAC,mDAAmD,iBAChE,KAAC,iBAAiB,KAAG,EACrB,wBAAM,IAAI,GAAO,KACb,EACN,uBAAK,SAAS,EAAC,oDAAoD,gBAAE,KAAK,IAAO,KAC7E,EACN,KAAC,QAAQ,IAAC,SAAS,EAAC,6CAA6C,EAAC,OAAO,EAAE,oBAAoB,GAAI,KAC/F,EACN,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,GAAI,KACnI,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
@@ -12,71 +12,87 @@ var __assign = (this && this.__assign) || function () {
12
12
  var _a;
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import { LANGUAGES } from '../../../constants';
15
+ import { ReactComponent as DepartmentIcon } from '../../../assets/icons/department.svg';
16
+ import { ReactComponent as JobPositionIcon } from '../../../assets/icons/job-position.svg';
17
+ import { ReactComponent as OfficeIcon } from '../../../assets/icons/office.svg';
18
+ import { ReactComponent as ServerIcon } from '../../../assets/icons/server.svg';
15
19
  import '../../../styles/styles.scss';
16
20
  var INFO_TITLE_TEXT = (_a = {},
17
21
  _a[LANGUAGES.ru] = {
18
- server: 'Сервер',
22
+ server: 'Адрес сервера',
19
23
  company: 'Компания',
20
24
  department: 'Отдел',
21
25
  companyPosition: 'Должность',
22
26
  },
23
27
  _a[LANGUAGES.en] = {
24
- server: 'Server',
28
+ server: 'Server address',
25
29
  company: 'Company',
26
30
  department: 'Department',
27
31
  companyPosition: 'Position',
28
32
  },
29
33
  _a[LANGUAGES.de] = {
30
- server: 'Server',
34
+ server: 'Serveradresse',
31
35
  company: 'Firma',
32
36
  department: 'Abteilung',
33
37
  companyPosition: 'Position',
34
38
  },
35
39
  _a[LANGUAGES.es] = {
36
- server: 'Servidor',
40
+ server: 'Dirección del servidor',
37
41
  company: 'Empresa',
38
42
  department: 'Sección',
39
43
  companyPosition: 'Cargo',
40
44
  },
41
45
  _a[LANGUAGES.fr] = {
42
- server: 'Serveur',
46
+ server: 'Adresse du serveur',
43
47
  company: 'Société',
44
48
  department: 'Département',
45
49
  companyPosition: 'Poste',
46
50
  },
47
51
  _a[LANGUAGES.ar] = {
48
- server: 'جهاز الخادم',
52
+ server: 'عنوان جهاز الخادم',
49
53
  company: 'شركة',
50
54
  department: 'الإدارة',
51
55
  companyPosition: 'المنصب',
52
56
  },
53
57
  _a[LANGUAGES.ms] = {
54
- server: 'Pelayan',
58
+ server: 'Alamat pelayan',
55
59
  company: 'Syarikat',
56
60
  department: 'Jabatan',
57
61
  companyPosition: 'Kedudukan',
58
62
  },
59
63
  _a[LANGUAGES.tr] = {
60
- server: 'Sunucu',
64
+ server: 'Sunucu adresi',
61
65
  company: 'Şirket',
62
66
  department: 'Bölüm',
63
67
  companyPosition: 'Pozisyon',
64
68
  },
65
69
  _a[LANGUAGES.id] = {
66
- server: 'Server',
70
+ server: 'Alamat server',
67
71
  company: 'Nama perusahaan',
68
72
  department: 'Departemen',
69
73
  companyPosition: 'Posisi',
70
74
  },
75
+ _a[LANGUAGES.uz] = {
76
+ server: 'Server manzili',
77
+ company: 'Kompaniya',
78
+ department: 'Bo‘lim',
79
+ companyPosition: 'Lavozim',
80
+ },
81
+ _a[LANGUAGES.kk] = {
82
+ server: 'Сервер мекенжайы',
83
+ company: 'Компания',
84
+ department: 'Бөлім',
85
+ companyPosition: 'Лауазым',
86
+ },
71
87
  _a);
72
88
  var ContactInfo = function (_a) {
73
89
  var elementRef = _a.elementRef, language = _a.language, serverName = _a.serverName, company = _a.company, department = _a.department, companyPosition = _a.companyPosition;
74
90
  var _b = INFO_TITLE_TEXT[language], serverTitle = _b.server, companyTitle = _b.company, departmentTitle = _b.department, companyPositionTitle = _b.companyPosition;
75
91
  var renderInfoItem = function (_a) {
76
- var title = _a.title, info = _a.info;
77
- return (_jsxs("div", __assign({ className: "smartapp-contact-info__item" }, { children: [_jsx("div", { children: title }), _jsx("div", { children: info })] })));
92
+ var title = _a.title, info = _a.info, icon = _a.icon;
93
+ return (_jsxs("div", __assign({ className: "smartapp-contact-info__item" }, { children: [_jsx("div", __assign({ className: "smartapp-contact-info__item--icon" }, { children: icon })), _jsxs("div", __assign({ className: "smartapp-contact-info__item--text" }, { children: [_jsx("div", { children: title }), _jsx("div", { children: info })] }))] })));
78
94
  };
79
- return (_jsxs("div", __assign({ ref: elementRef, className: "smartapp-contact-info" }, { children: [serverName && renderInfoItem({ title: serverTitle, info: serverName }), company && renderInfoItem({ title: companyTitle, info: company }), department && renderInfoItem({ title: departmentTitle, info: department }), companyPosition && renderInfoItem({ title: companyPositionTitle, info: companyPosition })] })));
95
+ return (_jsxs("div", __assign({ ref: elementRef, className: "smartapp-contact-info" }, { children: [serverName && renderInfoItem({ title: serverTitle, info: serverName, icon: _jsx(ServerIcon, {}) }), company && renderInfoItem({ title: companyTitle, info: company, icon: _jsx(OfficeIcon, {}) }), department && renderInfoItem({ title: departmentTitle, info: department, icon: _jsx(DepartmentIcon, {}) }), companyPosition && renderInfoItem({ title: companyPositionTitle, info: companyPosition, icon: _jsx(JobPositionIcon, {}) })] })));
80
96
  };
81
97
  export default ContactInfo;
82
98
  //# sourceMappingURL=ContactInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContactInfo.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/ContactInfo/ContactInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,6BAA6B,CAAA;AAKpC,IAAM,eAAe;IACnB,GAAC,SAAS,CAAC,EAAE,IAAG;QACd,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,UAAU;QACnB,UAAU,EAAE,O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F,OAAO,IAAI,cAAc,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAC,UAAU,KAAG,EAAE,CAAC,EACvF,UAAU,IAAI,cAAc,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAC,cAAc,KAAG,EAAE,CAAC,EACpG,eAAe,IAAI,cAAc,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,KAAC,eAAe,KAAG,EAAE,CAAC,KACjH,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { ILoadingMessage } from '../types';
2
2
  import '../../../styles/styles.scss';
3
- declare const LoadingMessage: ({ skeletonRowsCount }: ILoadingMessage) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const LOADING_MESSAGE_ITEMS = 6;
4
+ declare const LoadingMessage: ({ isMenuShadowless, skeletonRowsCount }: ILoadingMessage) => import("react/jsx-runtime").JSX.Element;
4
5
  export default LoadingMessage;
@@ -11,13 +11,14 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useRef } from 'react';
14
+ import classNames from 'classnames';
14
15
  import { Skeleton } from '../../Skeleton';
15
16
  import '../../../styles/styles.scss';
16
- var LOADING_MESSAGE_ITEMS = 6;
17
+ export var LOADING_MESSAGE_ITEMS = 6;
17
18
  var LoadingMessage = function (_a) {
18
- var _b = _a.skeletonRowsCount, skeletonRowsCount = _b === void 0 ? LOADING_MESSAGE_ITEMS : _b;
19
+ var _b = _a.isMenuShadowless, isMenuShadowless = _b === void 0 ? false : _b, _c = _a.skeletonRowsCount, skeletonRowsCount = _c === void 0 ? LOADING_MESSAGE_ITEMS : _c;
19
20
  var ref = useRef(null);
20
- return (_jsx("div", __assign({ ref: ref, className: "smartapp-loading-message" }, { children: Array.from({ length: skeletonRowsCount }, function (_, index) { return (_jsxs("div", __assign({ className: "smartapp-loading-message__item" }, { children: [_jsx(Skeleton, { containerRef: ref, circle: true, className: "smartapp-loading-message__item--circle" }), _jsxs("div", __assign({ className: "smartapp-loading-message__item--ellipse" }, { children: [_jsx(Skeleton, { containerRef: ref, className: "smartapp-loading-message__item--ellipse__first", borderRadius: 600 }), _jsx(Skeleton, { containerRef: ref, className: "smartapp-loading-message__item--ellipse__second", borderRadius: 600 })] }))] }), index)); }) })));
21
+ return (_jsx("div", __assign({ ref: ref, className: classNames('smartapp-loading-message', { 'smartapp-loading-message__reduced-padding': isMenuShadowless }) }, { children: Array.from({ length: skeletonRowsCount }, function (_, index) { return (_jsxs("div", __assign({ className: classNames('smartapp-loading-message__item', { 'ph-0': isMenuShadowless }) }, { children: [_jsx(Skeleton, { containerRef: ref, circle: true, className: "smartapp-loading-message__item--circle" }), _jsxs("div", __assign({ className: "smartapp-loading-message__item--ellipse" }, { children: [_jsx(Skeleton, { containerRef: ref, className: "smartapp-loading-message__item--ellipse__first", borderRadius: 600 }), _jsx(Skeleton, { containerRef: ref, className: "smartapp-loading-message__item--ellipse__second", borderRadius: 600 })] }))] }), index)); }) })));
21
22
  };
22
23
  export default LoadingMessage;
23
24
  //# sourceMappingURL=LoadingMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingMessage.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/LoadingMessage/LoadingMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,6BAA6B,CAAA;AAEpC,IAAM,qBAAqB,GAAG,CAAC,CAAA;AAE/B,IAAM,cAAc,GAAG,UAAC,EAA8D;QAA5D,yBAAyC,EAAzC,iBAAiB,mBAAG,qBAAqB,KAAA;I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OAAO,CACL,uBAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE,EAAE,2CAA2C,EAAE,gBAAgB,EAAE,CAAC,gBAChI,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAE,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,CACvD,wBAAiB,SAAS,EAAE,UAAU,CAAC,gCAAgC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,iBACpG,KAAC,QAAQ,IAAC,YAAY,EAAE,GAAG,EAAE,MAAM,QAAC,SAAS,EAAC,wCAAwC,GAAG,EACzF,wBAAK,SAAS,EAAC,yCAAyC,iBACtD,KAAC,QAAQ,IAAC,YAAY,EAAE,GAAG,EAAE,SAAS,EAAC,gDAAgD,EAAC,YAAY,EAAE,GAAG,GAAI,EAC7G,KAAC,QAAQ,IAAC,YAAY,EAAE,GAAG,EAAE,SAAS,EAAC,iDAAiD,EAAC,YAAY,EAAE,GAAG,GAAI,KAC1G,MALE,KAAK,CAMT,CACP,EARwD,CAQxD,CAAC,IACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -9,71 +9,35 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- var _a;
13
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
14
- import React, { useEffect, useRef, useState } from 'react';
13
+ import React, { useEffect, useLayoutEffect, useRef } from 'react';
15
14
  import { components } from 'react-select';
16
15
  import { AutoSizer } from 'react-virtualized';
17
16
  import { FixedSizeList } from 'react-window';
18
17
  import classNames from 'classnames';
19
18
  import LoadingMessage from '../LoadingMessage/LoadingMessage';
20
19
  import SearchInCatalogButton from '../SearchInCatalogButton/SearchInCatalogButton';
21
- import { LANGUAGES } from '../../../constants';
20
+ import { isMobilePlatform, isWebPlatform } from '../../../helpers';
21
+ import { USER_DROPDOWN_CHAR_HINT as CHAR_HINT, MIN_INPUT_SYMBOLS } from '../../../constants';
22
22
  import '../../../styles/styles.scss';
23
- var MIN_INPUT_SYMBOLS = 3;
24
23
  var SKELETON_ROWS_COUNT = 3;
25
24
  var MENU_ITEM_HEIGHT = 47;
26
- var MAX_MENU_HEIGHT = 220;
27
25
  var LIST_OVER_SCAN_COUNT = 5;
28
26
  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);
27
+ var BUTTON_SIZE = 45;
28
+ var MIN_SCROLL_TOP = 10;
44
29
  var MenuList = function (props) {
45
30
  var _a;
46
- 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;
31
+ var selectRef = props.selectRef, scrollFromTop = props.scrollFromTop, language = props.language, platform = props.platform, menuListMaxHeight = props.menuListMaxHeight, charHintClassName = props.charHintClassName, hasNextPage = props.hasNextPage, isLoading = props.isLoading, isUserTyping = props.isUserTyping, isCharHintVisible = props.isCharHintVisible, isNextPageLoading = props.isNextPageLoading, _b = props.isShowCatalogSearchButton, isShowCatalogSearchButton = _b === void 0 ? false : _b, isMenuShadowless = props.isMenuShadowless, children = props.children, onLoadNextPage = props.onLoadNextPage, onShowCatalogSearchButtonClick = props.onShowCatalogSearchButtonClick, setIsDelimiterVisible = props.setIsDelimiterVisible;
47
32
  var selectRefCurrent = selectRef.current;
48
33
  var inputValue = (_a = selectRefCurrent === null || selectRefCurrent === void 0 ? void 0 : selectRefCurrent.props) === null || _a === void 0 ? void 0 : _a.inputValue;
49
34
  var inputValueLength = inputValue === null || inputValue === void 0 ? void 0 : inputValue.length;
35
+ var isCatalogSearchBtnListedLast = isShowCatalogSearchButton && !isMenuShadowless;
36
+ var isCatalogSearchBtnListedFirst = isShowCatalogSearchButton && isMenuShadowless;
50
37
  var virtualizationListRef = useRef(null);
38
+ var virtualizationListOuterRef = useRef(null);
51
39
  var lastElement = useRef(null);
52
40
  var observer = useRef(new IntersectionObserver(function (entries) { return entries[0].isIntersecting && handleLoadNextPage(); }));
53
- var _c = useState(false), isCharHintVisible = _c[0], setIsCharHintVisible = _c[1];
54
- var _d = useState(null), timeoutId = _d[0], setTimeoutId = _d[1];
55
- useEffect(function () {
56
- if (timeoutId) {
57
- clearTimeout(timeoutId);
58
- setTimeoutId(null);
59
- }
60
- if (inputValueLength >= MIN_INPUT_SYMBOLS) {
61
- setIsCharHintVisible(false);
62
- }
63
- else if (inputValueLength === ONE_CHARACTER || inputValueLength === TWO_CHARACTERS) {
64
- if (!isCharHintVisible) {
65
- var nextTimeoutId = setTimeout(function () { return setIsCharHintVisible(true); }, CHAR_HINT_TIMEOUT);
66
- setTimeoutId(nextTimeoutId);
67
- }
68
- }
69
- else {
70
- setIsCharHintVisible(false);
71
- }
72
- return function () {
73
- timeoutId && clearTimeout(timeoutId);
74
- };
75
- // eslint-disable-next-line
76
- }, [inputValue]);
77
41
  useEffect(function () {
78
42
  var lastElementCurrent = lastElement.current;
79
43
  var observerCurrent = observer.current;
@@ -83,6 +47,11 @@ var MenuList = function (props) {
83
47
  };
84
48
  // eslint-disable-next-line
85
49
  }, [lastElement.current]);
50
+ useLayoutEffect(function () {
51
+ var _a, _b;
52
+ var scrollTop = (_b = (_a = virtualizationListOuterRef.current) === null || _a === void 0 ? void 0 : _a.scrollTop) !== null && _b !== void 0 ? _b : 0;
53
+ setIsDelimiterVisible(scrollTop > MIN_SCROLL_TOP);
54
+ }, [setIsDelimiterVisible]);
86
55
  var handleLoadNextPage = function () {
87
56
  onLoadNextPage(inputValue);
88
57
  if (virtualizationListRef.current) {
@@ -91,36 +60,43 @@ var MenuList = function (props) {
91
60
  }
92
61
  };
93
62
  if (inputValueLength < MIN_INPUT_SYMBOLS)
94
- return isCharHintVisible ? _jsx("div", __assign({ className: "smartapp-menu-list__char-hint" }, { children: CHAR_HINT[language] })) : null;
63
+ return isCharHintVisible ? (_jsx("div", __assign({ className: classNames('smartapp-menu-list__char-hint', charHintClassName, { 'smartapp-menu-list__char-hint--web': isWebPlatform(platform) }) }, { children: CHAR_HINT[language] }))) : null;
95
64
  // For children like: "Loading" or "No Options" provided by 'react-select'
96
65
  if (!Array.isArray(children))
97
66
  return _jsx(_Fragment, { children: children });
98
67
  var childrenLength = children.length;
99
68
  var listChildrenHeight = childrenLength * MENU_ITEM_HEIGHT + PADDING_SIZE;
100
- var maxMenuHeight = isShowCatalogSearchButton ? MAX_MENU_HEIGHT - BUTTON_SIZE : MAX_MENU_HEIGHT;
69
+ var maxMenuHeight = isCatalogSearchBtnListedLast ? menuListMaxHeight - BUTTON_SIZE : menuListMaxHeight;
101
70
  var listHeight = listChildrenHeight > maxMenuHeight ? maxMenuHeight : listChildrenHeight;
102
71
  var itemCount = hasNextPage ? childrenLength + SKELETON_ROWS_COUNT : childrenLength;
103
72
  var isNextPageSkeletonsVisible = hasNextPage && !isNextPageLoading && !isLoading && !isUserTyping;
104
73
  var isDataLoadingSkeletonsVisible = isNextPageLoading || isLoading || (isUserTyping && inputValueLength >= MIN_INPUT_SYMBOLS);
105
74
  var isSkeletonsVisible = isNextPageSkeletonsVisible || isDataLoadingSkeletonsVisible;
106
- var renderSkeletons = function () { return isSkeletonsVisible && _jsx(LoadingMessage, { skeletonRowsCount: SKELETON_ROWS_COUNT }); };
75
+ var handleScroll = function (_a) {
76
+ var scrollOffset = _a.scrollOffset;
77
+ scrollFromTop.current = scrollOffset;
78
+ setIsDelimiterVisible(scrollOffset > MIN_SCROLL_TOP);
79
+ };
80
+ var renderSkeletons = function () { return isSkeletonsVisible && _jsx(LoadingMessage, { isMenuShadowless: isMenuShadowless, skeletonRowsCount: SKELETON_ROWS_COUNT }); };
107
81
  var rowRenderer = function (_a) {
108
82
  var index = _a.index, style = _a.style;
109
83
  var isLastRow = index === childrenLength - 1;
110
84
  var rowRef = isNextPageSkeletonsVisible ? lastElement : null;
111
85
  return (_jsxs("div", __assign({ ref: rowRef, style: style, role: children[index] ? 'option' : '' }, { children: [children[index], isLastRow && renderSkeletons()] }), index));
112
86
  };
113
- return (_jsx(components.MenuList, __assign({}, props, { children: _jsx(AutoSizer, __assign({ disableHeight: true }, { children: function (_a) {
114
- var width = _a.width;
115
- return (_jsxs("div", __assign({ style: {
116
- display: 'flex',
117
- flexDirection: 'column',
118
- height: isShowCatalogSearchButton ? listHeight + BUTTON_SIZE : listHeight,
119
- } }, { children: [_jsx(FixedSizeList, __assign({ ref: virtualizationListRef, height: listHeight, itemCount: itemCount, itemSize: MENU_ITEM_HEIGHT, width: width, overscanCount: LIST_OVER_SCAN_COUNT, onScroll: function (_a) {
120
- var scrollOffset = _a.scrollOffset;
121
- return (scrollFromTop.current = scrollOffset);
122
- }, 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 }))] })));
123
- } })) })));
87
+ return (_jsxs(_Fragment, { children: [isCatalogSearchBtnListedFirst && (_jsx(SearchInCatalogButton, { isMenuShadowless: true, language: language, onShowCatalogSearchButtonClick: onShowCatalogSearchButtonClick })), _jsx(components.MenuList, __assign({}, props, { children: _jsx(AutoSizer, __assign({ disableHeight: true }, { children: function (_a) {
88
+ var width = _a.width;
89
+ return (_jsxs("div", __assign({ style: {
90
+ display: 'flex',
91
+ flexDirection: 'column',
92
+ height: isCatalogSearchBtnListedLast ? listHeight + BUTTON_SIZE : listHeight,
93
+ } }, { children: [_jsx(FixedSizeList, __assign({ outerRef: virtualizationListOuterRef, ref: virtualizationListRef, height: listHeight, itemCount: itemCount, itemSize: MENU_ITEM_HEIGHT, width: width, overscanCount: LIST_OVER_SCAN_COUNT, onScroll: handleScroll, initialScrollOffset: scrollFromTop.current, className: classNames('smartapp-menu-list', {
94
+ 'smartapp-menu-list__with-button': isCatalogSearchBtnListedLast,
95
+ 'smartapp-menu-list__shadowless': isMenuShadowless,
96
+ 'smartapp-menu-list__shadowless--pt-0': isCatalogSearchBtnListedFirst,
97
+ 'smartapp-menu-list__invisible-scroll': isMobilePlatform(platform) && isMenuShadowless,
98
+ }), outerElementType: CustomOuterElement }, { children: rowRenderer })), isCatalogSearchBtnListedLast && (_jsx(SearchInCatalogButton, { language: language, width: width, onShowCatalogSearchButtonClick: onShowCatalogSearchButtonClick }))] })));
99
+ } })) }))] }));
124
100
  };
125
101
  var CustomOuterElement = React.forwardRef(function (props, ref) { return _jsx("div", __assign({ ref: ref }, props, { style: __assign({}, props.style) })); });
126
102
  CustomOuterElement.displayName = 'CustomOuterElement';
@@ -1 +1 @@
1
- {"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../../../../src/сomponents/UserDropdown/Men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KAAC,qBAAqB,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,8BAA8B,EAAE,8BAA8B,GAAI,CAC5H,KACG,CACP;oBAhCe,CAgCf,IACS,IACQ,IACrB,CACJ,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"}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import '../../../styles/styles.scss';
2
- declare const MultiValueLabel: (props: any) => import("react/jsx-runtime").JSX.Element | null;
3
- export default MultiValueLabel;
3
+ declare const _default: React.MemoExoticComponent<(props: any) => import("react/jsx-runtime").JSX.Element | null>;
4
+ export default _default;
@@ -10,14 +10,14 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useEffect, useRef, useState } from 'react';
13
+ import { memo, useEffect, useRef, useState } from 'react';
14
14
  import { components } from 'react-select';
15
15
  import Popup from 'reactjs-popup';
16
16
  import classNames from 'classnames';
17
17
  import { isEqual } from 'lodash';
18
18
  import Avatar from '../../Avatar';
19
19
  import Chip from '../../Chip';
20
- import { generateAvatarIcon, generateFontFamilyStyle, isValueEqualToZero, renderUserIcon } from '../../../helpers';
20
+ import { checkIfContactTypeIsGroup, generateAvatarIcon, generateFontFamilyStyle, isMobilePlatform, isValueEqualToZero, renderUserIcon, } from '../../../helpers';
21
21
  import { COLORS } from '../../../constants';
22
22
  import { AVATAR_SIZES } from '../../Avatar/types';
23
23
  import '../../../styles/styles.scss';
@@ -25,26 +25,30 @@ var POPUP_APPEARANCE_DELAY = 1500;
25
25
  var POPUP_HIDDEN_CLASSNAME = 'multi-value-info-hidden';
26
26
  var POPUP_PADDINGS = 16;
27
27
  var POPUP_MARGINS = 32;
28
- var POPUP_MARGIN_TOP = 1;
28
+ var POPUP_MARGIN_TOP = 4;
29
+ var TOUCH = 'touch';
29
30
  var MultiValueLabel = function (props) {
30
- 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;
31
+ var data = props.data, transformCurrentChipToInputValue = props.transformCurrentChipToInputValue, handleRequestFocus = props.handleRequestFocus, isChipsOutline = props.isChipsOutline, _a = props.selectProps, isDisabled = _a.isDisabled, selectedUsers = _a.value, onChange = _a.onChange, instanceId = _a.instanceId;
32
+ var value = data.value, label = data.label, name = data.name, email = data.email, uid = data.uid, selectRef = data.selectRef, isResetChipsToInputValue = data.isResetChipsToInputValue, avatar = data.avatar, platform = data.platform, contextMenuItems = data.contextMenuItems, language = data.language, userType = data.userType, organizerName = data.organizerName, fontFamily = data.fontFamily, styles = data.styles, isOrganizerShort = data.isOrganizerShort, isMyContacts = data.isMyContacts, isLocalContact = data.isLocalContact, isCachedContact = data.isCachedContact, isPrivateSchedule = data.isPrivateSchedule, isNotRemovable = data.isNotRemovable, isChipsCollapsable = data.isChipsCollapsable, isSelectedChipHasTooltip = data.isSelectedChipHasTooltip, isBusyAtSelectedTime = data.isBusyAtSelectedTime, isLoading = data.isLoading, isWarning = data.isWarning, isInputFocused = data.isInputFocused.current, collapsableChipsCount = data.collapsableChipsCount.current, lastVisibleChipIndex = data.lastVisibleChipIndex.current;
31
33
  var multiValueLabelRef = useRef(null);
32
34
  var popupRef = useRef(null);
33
35
  var popupContentRef = useRef(null);
34
- var _c = useState(-1), left = _c[0], setLeft = _c[1];
35
- var _d = useState(-1), top = _d[0], setTop = _d[1];
36
- var _e = useState(null), timeoutId = _e[0], setTimeoutId = _e[1];
37
- var _f = useState(POPUP_HIDDEN_CLASSNAME), hiddenClassName = _f[0], setHiddenClassName = _f[1];
38
- var _g = useState(false), isOpenContextMenu = _g[0], setIsOpenContextMenu = _g[1];
39
- var _h = useState(false), isChipHovered = _h[0], setIsChipHovered = _h[1];
40
- var _j = useState(false), isShowPopup = _j[0], setIsShowPopup = _j[1];
36
+ var _b = useState(-1), left = _b[0], setLeft = _b[1];
37
+ var _c = useState(-1), top = _c[0], setTop = _c[1];
38
+ var _d = useState(null), timeoutId = _d[0], setTimeoutId = _d[1];
39
+ var _e = useState(POPUP_HIDDEN_CLASSNAME), hiddenClassName = _e[0], setHiddenClassName = _e[1];
40
+ var _f = useState(false), isOpenContextMenu = _f[0], setIsOpenContextMenu = _f[1];
41
+ var _g = useState(false), isChipHovered = _g[0], setIsChipHovered = _g[1];
42
+ var _h = useState(false), isShowPopup = _h[0], setIsShowPopup = _h[1];
41
43
  var isPopupVisible = isChipHovered && !isOpenContextMenu && name && email && isSelectedChipHasTooltip;
42
44
  useEffect(function () {
43
- label && isResetChipsToInputValue && transformCurrentChipToInputValue(label, email);
45
+ label && isResetChipsToInputValue && transformCurrentChipToInputValue(label, checkIfContactTypeIsGroup(userType) ? uid : email);
44
46
  // eslint-disable-next-line
45
47
  }, [isResetChipsToInputValue]);
46
48
  useEffect(function () {
47
49
  var _a;
50
+ if (isMobilePlatform(platform))
51
+ return;
48
52
  if (isPopupVisible) {
49
53
  var timer_1 = setTimeout(function () {
50
54
  if (isChipHovered && !isOpenContextMenu) {
@@ -59,7 +63,7 @@ var MultiValueLabel = function (props) {
59
63
  (_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.close();
60
64
  }
61
65
  // eslint-disable-next-line react-hooks/exhaustive-deps
62
- }, [isPopupVisible, isChipHovered, isOpenContextMenu]);
66
+ }, [isPopupVisible, isChipHovered, isOpenContextMenu, platform]);
63
67
  var windowInnerWidth = window.innerWidth;
64
68
  var popupContentMaxWidth = windowInnerWidth - POPUP_MARGINS - POPUP_PADDINGS;
65
69
  var noChipsCount = isValueEqualToZero(collapsableChipsCount);
@@ -68,20 +72,25 @@ var MultiValueLabel = function (props) {
68
72
  return selectedUserValue === value && selectedUserLabel === label;
69
73
  });
70
74
  var handleDelete = function () { return onChange(selectedUsers.filter(function (user) { return !isEqual(user, props.data); })); };
71
- var handleMouseDown = function (event) {
72
- event.preventDefault();
73
- event.stopPropagation();
74
- };
75
- var handleTouchEnd = function (event) { return event.stopPropagation(); };
76
75
  var handleMouseEnter = function () { return !isOpenContextMenu && setIsChipHovered(true); };
77
76
  var handleMouseLeave = function () { return setIsChipHovered(false); };
78
- var handleContextMenu = function () {
77
+ var handleContextMenu = function (isOpen, shouldFocusDropdown) {
79
78
  var _a;
79
+ if (isOpenContextMenu === isOpen)
80
+ return;
81
+ setIsOpenContextMenu(isOpen);
80
82
  setIsChipHovered(false);
81
83
  setIsShowPopup(false);
82
84
  (_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.close();
85
+ if (shouldFocusDropdown)
86
+ handleRequestFocus === null || handleRequestFocus === void 0 ? void 0 : handleRequestFocus();
87
+ };
88
+ var handlePreventEvent = function (event) {
89
+ var type = event.type;
90
+ event.stopPropagation();
91
+ !type.includes(TOUCH) && event.preventDefault();
83
92
  };
84
- 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 }))] }))] }))); };
93
+ 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, isLocalContact: isLocalContact, isCachedContact: isCachedContact }) })), _jsx("span", { children: name })] })), _jsx("div", __assign({ className: "smartapp-multi-value-label__content--email" }, { children: email }))] }))] }))); };
85
94
  var handleOpenPopup = function () {
86
95
  var popupRefCurrent = popupRef.current;
87
96
  var popupContentRefCurrent = popupContentRef.current;
@@ -102,7 +111,7 @@ var MultiValueLabel = function (props) {
102
111
  if (left !== nextLeftValue) {
103
112
  popupRefCurrent.close();
104
113
  setLeft(nextLeftValue);
105
- setTop(top_1 + height - POPUP_MARGIN_TOP);
114
+ setTop(top_1 + height + POPUP_MARGIN_TOP);
106
115
  var nextTimeoutId = setTimeout(function () { var _a; return (_a = popupRef.current) === null || _a === void 0 ? void 0 : _a.open(); }, 0);
107
116
  setTimeoutId(nextTimeoutId);
108
117
  }
@@ -111,14 +120,14 @@ var MultiValueLabel = function (props) {
111
120
  };
112
121
  var handleClosePopup = function () { return timeoutId && clearTimeout(timeoutId); };
113
122
  if (!isChipsCollapsable || isInputFocused || (!isInputFocused && userIndex < lastVisibleChipIndex) || noChipsCount) {
114
- 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, isOrganizerShort: isOrganizer, 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() })) })));
123
+ return (_jsx(components.MultiValueLabel, __assign({}, props, { innerProps: { ref: multiValueLabelRef } }, { children: _jsx(Popup, __assign({ ref: popupRef, onOpen: handleOpenPopup, onClose: handleClosePopup, arrow: false, open: isShowPopup, disabled: isMobilePlatform(platform), 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: handlePreventEvent, onTouchEnd: isMobilePlatform(platform) ? undefined : handlePreventEvent, onContextMenu: handlePreventEvent, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, { children: _jsx(Chip, { fontFamily: fontFamily, styles: styles, language: language, name: label || email, email: email, uid: uid, setIsOpenContextMenu: handleContextMenu, isMyContacts: isMyContacts, isLocalContact: isLocalContact, isCachedContact: isCachedContact, organizerName: organizerName, isOrganizerShort: isOrganizerShort, isWarning: isWarning, userType: userType, avatar: avatar, isLoading: isLoading, isError: isBusyAtSelectedTime, isDisabled: isDisabled || isNotRemovable, isEye: isPrivateSchedule, isOutline: isChipsOutline, onDelete: handleDelete, contextMenuItems: contextMenuItems, platform: platform, draggableData: __assign(__assign({}, data), { selectRef: selectRef }), dropdownId: instanceId }) }))); } }, { children: renderPopupContent() })) })));
115
124
  }
116
125
  if (isChipsCollapsable && !isInputFocused && userIndex === lastVisibleChipIndex && !noChipsCount) {
117
126
  return (_jsxs("div", __assign({ className: classNames('multi-value-label-counter', "multi-value-label-counter__".concat(platform), {
118
127
  'multi-value-label-counter__outline': isChipsOutline,
119
- }), onTouchEnd: handleTouchEnd }, { children: ["+", collapsableChipsCount] })));
128
+ }), onTouchEnd: handlePreventEvent }, { children: ["+", collapsableChipsCount] })));
120
129
  }
121
130
  return null;
122
131
  };
123
- export default MultiValueLabel;
132
+ export default memo(MultiValueLabel);
124
133
  //# sourceMappingURL=MultiValueLabel.js.map