@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,10 +1,11 @@
1
- import { ReactElement, RefObject } from 'react';
1
+ import { Dispatch, ReactElement, ReactNode, RefObject, SetStateAction } from 'react';
2
2
  import { MenuListProps, OptionProps } from 'react-select';
3
3
  import { IFontFamilyProps, ILanguageProps, ILayoutTypeProps, IPlatformProps, TFontFamilyStyle, TStyles } from '../../constants';
4
4
  import { CONTACT_TYPES } from './constants';
5
5
  import { MenuItem } from '../ContextMenu/types';
6
6
  export interface IContactBottomSheet extends ILanguageProps {
7
7
  fontFamily?: string;
8
+ contactInfoTitle?: string;
8
9
  avatar: string | null;
9
10
  name: string;
10
11
  email: string;
@@ -12,6 +13,8 @@ export interface IContactBottomSheet extends ILanguageProps {
12
13
  company: string | null;
13
14
  department: string | null;
14
15
  companyPosition: string | null;
16
+ handleCloseModal: () => void;
17
+ onClickContactInfoCopyEmail?: () => void;
15
18
  }
16
19
  export interface IContactInfo extends ILanguageProps {
17
20
  elementRef?: RefObject<HTMLDivElement | null>;
@@ -23,21 +26,29 @@ export interface IContactInfo extends ILanguageProps {
23
26
  export type TRenderInfoItem = {
24
27
  title: string;
25
28
  info: string;
29
+ icon: ReactElement;
26
30
  };
27
31
  export interface ILoadingMessage {
32
+ isMenuShadowless?: boolean;
28
33
  skeletonRowsCount?: number;
29
34
  }
30
35
  export interface IMenuListProps extends MenuListProps {
31
36
  selectRef: RefObject<any>;
32
37
  scrollFromTop: RefObject<number>;
33
38
  language: string;
39
+ platform: string;
40
+ menuListMaxHeight: number;
41
+ charHintClassName: string;
34
42
  hasNextPage: boolean;
35
43
  isLoading: boolean;
36
44
  isUserTyping: boolean;
45
+ isCharHintVisible: boolean;
37
46
  isShowCatalogSearchButton?: boolean;
47
+ isMenuShadowless: boolean;
38
48
  isNextPageLoading: boolean;
39
49
  onLoadNextPage: (inputValue: string) => void;
40
50
  onShowCatalogSearchButtonClick?: () => void;
51
+ setIsDelimiterVisible: Dispatch<SetStateAction<boolean>>;
41
52
  }
42
53
  type TData = ILanguageProps & {
43
54
  label: string;
@@ -48,6 +59,9 @@ type TData = ILanguageProps & {
48
59
  department: string | null;
49
60
  companyPosition: string | null;
50
61
  isMyContacts: boolean;
62
+ isLocalContact: boolean;
63
+ isCachedContact: boolean;
64
+ isAlreadyAdded: boolean;
51
65
  platform: 'web' | 'ios' | 'android';
52
66
  fontFamily: string;
53
67
  setIsSearchable: (isSearchable: boolean) => void;
@@ -56,12 +70,14 @@ type TData = ILanguageProps & {
56
70
  uid?: string;
57
71
  };
58
72
  export interface IOptionProps extends OptionProps {
73
+ isMenuShadowless: boolean;
59
74
  data: TData;
60
75
  }
61
76
  export interface ISearchInCatalogButtonProps {
62
77
  width?: number;
63
78
  language: string;
64
79
  isOnlyButtonInList?: boolean;
80
+ isMenuShadowless?: boolean;
65
81
  noOptionText?: string | null;
66
82
  onShowCatalogSearchButtonClick?: () => void;
67
83
  }
@@ -90,35 +106,80 @@ export type TGenerateCorporateOptionsToSelect = TGenerateCommonOption & {
90
106
  setIsSearchable: (isSearchable: boolean) => void;
91
107
  setModalData: (modalData: TModalData | null) => void;
92
108
  };
109
+ type TMyContactsEntriesOption = TMyContactsEntries & {
110
+ contacts?: Omit<TContacts, 'userKind'>[];
111
+ };
93
112
  export type TGenerateContactsOption = TGenerateCommonOption & {
94
- option: TMyContactsEntries;
113
+ option: TMyContactsEntriesOption | TLocalEntity;
114
+ isMyContacts?: boolean;
115
+ isLocalContact?: boolean;
95
116
  };
96
117
  export type TGenerateContactsOptionsToSelect = TGenerateCommonOption & {
97
- options: TMyContactsEntries[];
118
+ options: TMyContactsEntriesOption[] | TLocalEntity[];
119
+ isMyContacts?: boolean;
120
+ isLocalContact?: boolean;
98
121
  };
99
122
  export type TGenerateEnteredByUserOption = TGenerateCommonOption & {
100
123
  email: string;
101
124
  };
125
+ export type TCollapseChips = {
126
+ userDropdownId: string;
127
+ maxRowsCountToCollapseChips: number;
128
+ maskWidth: number;
129
+ suffixWidth: number;
130
+ chips: HTMLDivElement[];
131
+ };
132
+ export type TApplyFilteringToOption = {
133
+ isFilteringDisabled: boolean;
134
+ isSelectedOptionsHidden: boolean;
135
+ inputValue: string;
136
+ data: MultiOptionType;
137
+ selectedUsers: readonly MultiOptionType[];
138
+ };
102
139
  export type TSelectStyles = {
103
140
  isChipsVisible: boolean;
104
141
  isMaxMembersAdded: boolean;
105
142
  isDisabled: boolean;
106
143
  isError: boolean;
144
+ isInputPlaceholderVisible: boolean;
107
145
  lastRowNumber: number;
108
146
  paddingLeft: string;
147
+ paddingRight: string;
109
148
  platform: string;
110
149
  layoutType: string;
111
150
  isInputHidden: boolean;
112
151
  isDisabledMenuOffsetAtFullscreen: boolean;
152
+ isInputFocused?: boolean;
113
153
  isMaskRepresented: boolean;
154
+ isSuffixRepresented: boolean;
155
+ isMenuShadowless: boolean;
156
+ isShowCatalogSearchButton: boolean;
114
157
  fontFamilyStyle: TFontFamilyStyle;
158
+ containerPadding?: string;
159
+ isDraggable?: boolean;
160
+ isChipsCollapsed?: boolean;
161
+ menuListMaxHeight: number;
162
+ maxRowsCountToCollapseChips: number;
115
163
  };
116
164
  export type TGenerateNoOptionsMessage = {
117
165
  inputValue: string;
118
166
  };
119
- export type THandleFilterOption = {
167
+ export type TOptionData = {
120
168
  data: MultiOptionType;
121
169
  };
170
+ export type TCheckIsContainsValue = {
171
+ label: string;
172
+ email: string;
173
+ value: string;
174
+ };
175
+ export type TAdditionalInfo = {
176
+ action: string;
177
+ prevInputValue: string;
178
+ };
179
+ export type TCorporateContacts = {
180
+ corporateContacts: TCorporateEntity[];
181
+ corporateContactsSet: Set<string>;
182
+ };
122
183
  export type TSelectProps = {
123
184
  options: MultiOptionType[];
124
185
  inputValue: string;
@@ -144,39 +205,37 @@ export interface MultiOptionType {
144
205
  isMyContacts?: boolean;
145
206
  isEnteredByUser?: boolean;
146
207
  isNotRemovable?: boolean;
208
+ isAlreadyAdded?: boolean;
147
209
  }
148
- export type TMyContactsEntries = {
210
+ type TContactEntity = {
211
+ isLoading?: boolean;
212
+ isWarning?: boolean;
149
213
  isBusyAtSelectedTime?: boolean;
150
214
  isPrivateSchedule?: boolean;
151
215
  isNotRemovable?: boolean;
152
- isOrganizer?: boolean;
216
+ isOrganizerShort?: boolean;
217
+ isResetChipsToInputValue?: boolean;
218
+ isAlreadyAdded?: boolean;
219
+ uid?: string;
220
+ userType?: CONTACT_TYPES;
221
+ organizerName?: string | null;
222
+ contextMenuItems?: MenuItem[];
223
+ styles?: TStyles;
224
+ };
225
+ export type TMyContactsEntries = TContactEntity & {
153
226
  name: string | null;
154
227
  email: string;
155
228
  avatar: string | null;
156
- isLoading?: boolean;
157
- userType?: CONTACT_TYPES;
158
- isWarning?: boolean;
159
- uid?: string;
160
- isResetChipsToInputValue?: boolean;
161
- contextMenuItems?: MenuItem[];
162
229
  };
163
230
  type TContacts = {
164
231
  userHuid: string;
165
232
  contact: string;
166
233
  contactType: string;
234
+ userKind?: string;
167
235
  };
168
- export type TCorporateEntity = {
169
- isBusyAtSelectedTime?: boolean;
170
- isPrivateSchedule?: boolean;
171
- isNotRemovable?: boolean;
172
- isOrganizer?: boolean;
236
+ export type TCorporateEntity = TContactEntity & {
237
+ isCachedContact?: boolean;
173
238
  avatar: string | null;
174
- uid?: string;
175
- isResetChipsToInputValue?: boolean;
176
- contextMenuItems?: MenuItem[];
177
- userType?: CONTACT_TYPES;
178
- isLoading?: boolean;
179
- isWarning?: boolean;
180
239
  name: string;
181
240
  email: string | null;
182
241
  serverName: string | null;
@@ -185,27 +244,58 @@ export type TCorporateEntity = {
185
244
  companyPosition: string | null;
186
245
  contacts: TContacts[];
187
246
  };
188
- type TCorporateEntries = {
247
+ export type TLocalEntity = TContactEntity & {
248
+ avatar: string | null;
249
+ name: string | null;
250
+ email: string | null;
251
+ contacts: Omit<TContacts, 'userHuid'>[];
252
+ };
253
+ export type TCorporateEntries = {
189
254
  corpPhonebookEntries: TCorporateEntity[];
190
255
  trustSearchEntries: TCorporateEntity[];
256
+ cachedSearchEntries: TCorporateEntity[];
257
+ localPhonebookEntries?: TLocalEntity[];
191
258
  };
192
- export type TUser = TCorporateEntity | TMyContactsEntries | {
259
+ export type TUser = TCorporateEntity | TLocalEntity | TMyContactsEntries | (TContactEntity & {
193
260
  email: string;
194
261
  name?: string | null;
195
- isBusyAtSelectedTime?: boolean;
196
- uid?: string;
197
- isResetChipsToInputValue?: boolean;
198
- isPrivateSchedule?: boolean;
199
- isNotRemovable?: boolean;
200
- isOrganizer?: boolean;
201
- isWarning?: boolean;
202
- isLoading?: boolean;
203
- userType?: CONTACT_TYPES;
204
- contextMenuItems?: MenuItem[];
262
+ isLocalContact?: boolean;
263
+ });
264
+ export type TFocusHandle = {
265
+ focus: () => void;
266
+ blur: () => void;
267
+ };
268
+ export type TQueryVariants = {
269
+ origin: string;
270
+ translit: string;
271
+ toEng: string;
272
+ fromEng: string;
205
273
  };
274
+ export type TContactMatchScore = {
275
+ emailScore: number;
276
+ nameScore: number;
277
+ originalName: string;
278
+ };
279
+ export type TMatchers = {
280
+ startsWith: (text: string) => boolean;
281
+ includes: (text: string) => boolean;
282
+ anyWordStartsWith: (text: string) => boolean;
283
+ };
284
+ export type TRetrieveFilteredContacts = {
285
+ query: string;
286
+ corporateEntries: TCorporateEntries | null;
287
+ myContactsEntries: TMyContactsEntries[] | null;
288
+ checkIsEmailToExclude: (email: string | null) => boolean;
289
+ };
290
+ export type TDragUser = {
291
+ avatar: string;
292
+ label: string;
293
+ dropdownId?: string;
294
+ } & TUser;
206
295
  export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IFontFamilyProps, ILanguageProps {
207
296
  isDisabled?: boolean;
208
297
  isLoading?: boolean;
298
+ isError?: boolean;
209
299
  isChipsOutline?: boolean;
210
300
  isChipsVisible?: boolean;
211
301
  isChipsCollapsable?: boolean;
@@ -216,52 +306,48 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
216
306
  isBackspaceChipToInput?: boolean;
217
307
  isInputHidden?: boolean;
218
308
  isDisabledMenuOffsetAtFullscreen?: boolean;
309
+ isDisabledCheckUniqueEmails?: boolean;
310
+ isMenuShadowless?: boolean;
311
+ isStateless?: boolean;
312
+ isSelectedOptionsHidden?: boolean;
219
313
  hasNextPage?: boolean;
220
314
  isNextPageLoading?: boolean;
315
+ isInputValueClearedOnBlur?: boolean;
221
316
  title?: string;
222
- mask?: string;
317
+ contactInfoTitle?: string;
318
+ mask?: ReactNode;
319
+ suffix?: ReactNode;
223
320
  placeholder?: string;
321
+ focusPlaceholder?: string;
224
322
  hint?: ReactElement | string;
225
323
  noOptionsMessage?: string;
226
324
  maxMembersCount?: number;
325
+ skeletonRowsCount?: number;
326
+ maxRowsCountToCollapseChips?: number;
327
+ menuListMaxHeight?: number;
227
328
  menuPosition?: 'bottom' | 'auto' | 'top';
329
+ menuLocation?: 'absolute' | 'fixed';
330
+ menuPortalTarget?: RefObject<HTMLDivElement | null>;
228
331
  autoFocus?: boolean;
229
332
  externalInputValue?: string;
230
333
  containerClassName?: string;
334
+ charHintClassName?: string;
335
+ containerPadding?: string;
231
336
  containerStyles?: TStyles;
232
337
  selectedEntries?: TUser[];
233
338
  corporateEntries: TCorporateEntries | null;
234
339
  myContactsEntries: TMyContactsEntries[] | null;
235
340
  emailsToExclude?: string[];
341
+ userDropdownId?: string;
342
+ focusRef?: RefObject<TFocusHandle | null>;
236
343
  onInputChange: (inputValue: string) => void;
344
+ onImmediateInputChange?: (inputValue: string) => void;
237
345
  onChange: (users: TUser[]) => void;
238
346
  onMenuOpen?: () => void;
239
347
  onMenuClose?: () => void;
240
348
  onLoadNextPage?: (inputValue: string) => void;
241
349
  onShowCatalogSearchButtonClick?: () => void;
350
+ onClickContactInfoCopyEmail?: () => void;
351
+ onFocus?: () => void;
242
352
  }
243
- export type TQueryVariants = {
244
- origin: string;
245
- translit: string;
246
- toEng: string;
247
- fromEng: string;
248
- };
249
- export type TContactMatchScore = {
250
- emailScore: number;
251
- nameScore: number;
252
- originalName: string;
253
- };
254
- export declare const MATCH_SCORES: {
255
- readonly EMAIL_STARTS_WITH: 6;
256
- readonly EMAIL_CONTAINS: 5;
257
- readonly NAME_FIRST_WORD_STARTS_WITH: 4;
258
- readonly NAME_ANY_WORD_STARTS_WITH: 3;
259
- readonly NAME_CONTAINS: 2;
260
- readonly NO_MATCH: 0;
261
- };
262
- export type TMatchers = {
263
- startsWith: (text: string) => boolean;
264
- includes: (text: string) => boolean;
265
- anyWordStartsWith: (text: string) => boolean;
266
- };
267
353
  export {};
@@ -1,9 +1,2 @@
1
- export var MATCH_SCORES = {
2
- EMAIL_STARTS_WITH: 6,
3
- EMAIL_CONTAINS: 5,
4
- NAME_FIRST_WORD_STARTS_WITH: 4,
5
- NAME_ANY_WORD_STARTS_WITH: 3,
6
- NAME_CONTAINS: 2,
7
- NO_MATCH: 0,
8
- };
1
+ export {};
9
2
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/types.ts"],"names":[],"mappings":"AAgRA,MAAM,CAAC,IAAM,YAAY,GAAG;IAC1B,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,CAAC;IACjB,2BAA2B,EAAE,CAAC;IAC9B,yBAAyB,EAAE,CAAC;IAC5B,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,CAAC;CACH,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressms/smartapp-ui",
3
- "version": "3.0.0-alpha.2",
3
+ "version": "3.0.0-alpha.200",
4
4
  "description": "SmartApp UI library",
5
5
  "license": "MIT",
6
6
  "main": "build/main/index.js",
@@ -12,20 +12,25 @@
12
12
  "registry": "https://registry.npmjs.org/"
13
13
  },
14
14
  "dependencies": {
15
- "alex.chus-react-spring-bottom-sheet": "^0.0.2",
15
+ "@dnd-kit/core": "^6.3.1",
16
+ "@floating-ui/react": "^0.27.15",
16
17
  "camelcase": "^6.2.1",
17
18
  "classnames": "^2.3.2",
18
19
  "color": "^4.2.3",
19
20
  "color-blend": "^4.0.0",
20
21
  "convert-layout": "^0.11.1",
22
+ "date-fns": "^4.2.1",
21
23
  "dompurify": "^3.2.6",
22
24
  "echarts": "^5.5.0",
23
25
  "echarts-for-react": "^3.0.2",
24
26
  "juice": "^10.0.0",
27
+ "motion": "^12.26.2",
25
28
  "react-beautiful-dnd": "^13.1.1",
26
- "react-datepicker": "^4.8.0",
27
- "react-draggable": "^4.4.6",
29
+ "react-datepicker": "8.10.0",
30
+ "react-draggable": "4.4.6",
31
+ "react-hook-form": "^7.60.0",
28
32
  "react-insta-stories": "^2.6.2",
33
+ "react-modal-sheet": "^5.4.1",
29
34
  "react-router-dom": "^6.7.0",
30
35
  "react-scrollbars-custom": "^4.1.1",
31
36
  "react-select": "^5.8.0",
@@ -36,7 +41,8 @@
36
41
  "react-window": "^1.8.10",
37
42
  "reactjs-popup": "^2.0.5",
38
43
  "styled-components": "^6.1.11",
39
- "transliteration": "^2.3.5"
44
+ "transliteration": "~2.3.5",
45
+ "use-detect-keyboard-open": "^0.4.0"
40
46
  },
41
47
  "resolutions": {
42
48
  "@typescript-eslint/utils": "6.21.0",
@@ -112,7 +118,6 @@
112
118
  "@types/node": "^16.18.11",
113
119
  "@types/react": "^19.0.2",
114
120
  "@types/react-beautiful-dnd": "^13.1.4",
115
- "@types/react-datepicker": "^4.8.0",
116
121
  "@types/react-dom": "^18.0.10",
117
122
  "@types/react-slick": "^0.23.10",
118
123
  "@types/react-virtualized": "^9.21.30",
@@ -120,7 +125,6 @@
120
125
  "@types/uuid": "^9.0.8",
121
126
  "@typescript-eslint/eslint-plugin": "^6.6.0",
122
127
  "@typescript-eslint/parser": "^6.6.0",
123
- "alex.chus-react-spring-bottom-sheet": "^0.0.2",
124
128
  "animate.css": "^4.1.1",
125
129
  "babel-jest": "^18.0.0",
126
130
  "babel-loader": "8.2.3",
@@ -149,6 +153,7 @@
149
153
  "postcss-loader": "^6.2.1",
150
154
  "postcss-normalize": "^10.0.1",
151
155
  "postcss-preset-env": "^7.0.1",
156
+ "prettier": "^3.6.2",
152
157
  "react": "^18.2.0",
153
158
  "react-app-polyfill": "^3.0.0",
154
159
  "react-dev-utils": "^12.0.1",
@@ -1,3 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M8.71054 11.71L11.3005 14.3C11.6905 14.69 12.3205 14.69 12.7105 14.3L15.3005 11.71C15.9305 11.08 15.4805 10 14.5905 10H9.41054C8.52054 10 8.08054 11.08 8.71054 11.71Z" fill="currentColor"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M8.71054 12.8823L11.3005 10.2923C11.6905 9.90229 12.3205 9.90229 12.7105 10.2923L15.3005 12.8823C15.9305 13.5123 15.4805 14.5923 14.5905 14.5923H9.41054C8.52054 14.5923 8.08054 13.5123 8.71054 12.8823Z" fill="currentColor"/>
3
- </svg>
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- type TLongTapEvent = React.TouchEvent<HTMLElement> | React.MouseEvent<HTMLElement, MouseEvent>;
3
- type TUseLongTap = {
4
- onLongTap?: (e: TLongTapEvent) => void;
5
- onCancelLongTap?: () => void;
6
- longTapDelay?: number;
7
- };
8
- export declare const useLongTap: ({ onLongTap, onCancelLongTap, longTapDelay }: TUseLongTap) => {
9
- cancelPressTimer: () => void;
10
- startPressTimer: (e: TLongTapEvent) => void;
11
- };
12
- export {};
@@ -1,29 +0,0 @@
1
- import { useEffect, useRef } from 'react';
2
- var DEFAULT_LONG_TAP_DELAY = 500;
3
- export var useLongTap = function (_a) {
4
- var onLongTap = _a.onLongTap, onCancelLongTap = _a.onCancelLongTap, _b = _a.longTapDelay, longTapDelay = _b === void 0 ? DEFAULT_LONG_TAP_DELAY : _b;
5
- var timerRef = useRef(null);
6
- var isLongTapFulfilledRef = useRef(false);
7
- var startPressTimer = function (e) {
8
- e.stopPropagation();
9
- isLongTapFulfilledRef.current = false;
10
- timerRef.current = setTimeout(function () {
11
- onLongTap === null || onLongTap === void 0 ? void 0 : onLongTap(e);
12
- isLongTapFulfilledRef.current = true;
13
- }, longTapDelay);
14
- };
15
- var cancelPressTimer = function () {
16
- if (timerRef.current) {
17
- clearTimeout(timerRef.current);
18
- timerRef.current = null;
19
- if (!isLongTapFulfilledRef.current)
20
- onCancelLongTap === null || onCancelLongTap === void 0 ? void 0 : onCancelLongTap();
21
- }
22
- };
23
- useEffect(function () { return function () {
24
- if (timerRef.current)
25
- clearTimeout(timerRef.current);
26
- }; }, []);
27
- return { cancelPressTimer: cancelPressTimer, startPressTimer: startPressTimer };
28
- };
29
- //# sourceMappingURL=useLongTap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLongTap.js","sourceRoot":"","sources":["../../../src/hooks/useLongTap.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAWhD,IAAM,sBAAsB,GAAG,GAAG,CAAA;AAElC,MAAM,CAAC,IAAM,UAAU,GAAG,UAAC,EAAkF;QAAhF,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAE,oBAAqC,EAArC,YAAY,mBAAG,sBAAsB,KAAA;IAC5F,IAAM,QAAQ,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAA;IAC9C,IAAM,qBAAqB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAE3C,IAAM,eAAe,GAAG,UAAC,CAAgB;QACvC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,qBAAqB,CAAC,OAAO,GAAG,KAAK,CAAA;QACrC,QAAQ,CAAC,OAAO,GAAG,UAAU,CAAC;YAC5B,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,CAAC,CAAC,CAAA;YACd,qBAAqB,CAAC,OAAO,GAAG,IAAI,CAAA;QACtC,CAAC,EAAE,YAAY,CAAC,CAAA;IAClB,CAAC,CAAA;IAED,IAAM,gBAAgB,GAAG;QACvB,IAAI,QAAQ,CAAC,OAAO,EAAE;YACpB,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;YAC9B,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAA;YACvB,IAAI,CAAC,qBAAqB,CAAC,OAAO;gBAAE,eAAe,aAAf,eAAe,uBAAf,eAAe,EAAI,CAAA;SACxD;IACH,CAAC,CAAA;IAED,SAAS,CACP,cAAM,OAAA;QACJ,IAAI,QAAQ,CAAC,OAAO;YAAE,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACtD,CAAC,EAFK,CAEL,EACD,EAAE,CACH,CAAA;IAED,OAAO,EAAE,gBAAgB,kBAAA,EAAE,eAAe,iBAAA,EAAE,CAAA;AAC9C,CAAC,CAAA"}