@expressms/smartapp-ui 3.0.0-alpha.18 → 3.0.0-alpha.180

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 (203) hide show
  1. package/build/main/assets/icons/accepted-invite-status.svg +4 -0
  2. package/build/main/assets/icons/chevron.svg +3 -0
  3. package/build/main/assets/icons/close-modal.svg +1 -1
  4. package/build/main/assets/icons/declined-invite-status.svg +4 -0
  5. package/build/main/assets/icons/department.svg +3 -0
  6. package/build/main/assets/icons/doc-small.svg +5 -5
  7. package/build/main/assets/icons/download.svg +3 -0
  8. package/build/main/assets/icons/file-small.svg +5 -5
  9. package/build/main/assets/icons/file.svg +1 -1
  10. package/build/main/assets/icons/image-no-preview-small.svg +11 -0
  11. package/build/main/assets/icons/image-no-preview.svg +11 -0
  12. package/build/main/assets/icons/job-position.svg +3 -0
  13. package/build/main/assets/icons/needs-action-invite-status.svg +4 -0
  14. package/build/main/assets/icons/notification-close.svg +1 -1
  15. package/build/main/assets/icons/notification-error.svg +5 -0
  16. package/build/main/assets/icons/notification-failure-filled.svg +3 -0
  17. package/build/main/assets/icons/notification-info-filled.svg +5 -0
  18. package/build/main/assets/icons/notification-success-filled.svg +4 -0
  19. package/build/main/assets/icons/office.svg +3 -0
  20. package/build/main/assets/icons/pdf-small.svg +5 -5
  21. package/build/main/assets/icons/ppt-small.svg +5 -5
  22. package/build/main/assets/icons/private.svg +4 -11
  23. package/build/main/assets/icons/search.svg +1 -1
  24. package/build/main/assets/icons/select-arrow-down.svg +3 -0
  25. package/build/main/assets/icons/select-arrow-up.svg +3 -0
  26. package/build/main/assets/icons/server.svg +3 -0
  27. package/build/main/assets/icons/txt-small.svg +5 -5
  28. package/build/main/assets/icons/video-no-preview-small.svg +11 -0
  29. package/build/main/assets/icons/video-no-preview.svg +11 -0
  30. package/build/main/assets/icons/xls-small.svg +5 -5
  31. package/build/main/assets/storybook/index.d.ts +3 -0
  32. package/build/main/assets/storybook/index.js +3 -0
  33. package/build/main/assets/storybook/index.js.map +1 -1
  34. package/build/main/constants/constants.d.ts +91 -46
  35. package/build/main/constants/constants.js +132 -49
  36. package/build/main/constants/constants.js.map +1 -1
  37. package/build/main/constants/types.d.ts +11 -1
  38. package/build/main/helpers/index.d.ts +3 -1
  39. package/build/main/helpers/index.js +21 -2
  40. package/build/main/helpers/index.js.map +1 -1
  41. package/build/main/hooks/useCharHintDisplay.d.ts +9 -0
  42. package/build/main/hooks/useCharHintDisplay.js +35 -0
  43. package/build/main/hooks/useCharHintDisplay.js.map +1 -0
  44. package/build/main/hooks/useMobileLongTap.d.ts +16 -0
  45. package/build/main/hooks/useMobileLongTap.js +65 -0
  46. package/build/main/hooks/useMobileLongTap.js.map +1 -0
  47. package/build/main/hooks/useModal.d.ts +18 -10
  48. package/build/main/hooks/useModal.js +199 -12
  49. package/build/main/hooks/useModal.js.map +1 -1
  50. package/build/main/index.d.ts +2 -0
  51. package/build/main/index.js +2 -0
  52. package/build/main/index.js.map +1 -1
  53. package/build/main/styles/styles.scss +2 -2
  54. package/build/main//321/201omponents/ActionModal/ActionModal.js +1 -1
  55. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -1
  56. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +1 -1
  57. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +84 -26
  58. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -1
  59. package/build/main//321/201omponents/AttachedFile/types.d.ts +1 -0
  60. package/build/main//321/201omponents/Avatar/Avatar.d.ts +3 -2
  61. package/build/main//321/201omponents/Avatar/Avatar.js +56 -27
  62. package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -1
  63. package/build/main//321/201omponents/Avatar/types.d.ts +9 -5
  64. package/build/main//321/201omponents/Avatar/types.js +5 -2
  65. package/build/main//321/201omponents/Avatar/types.js.map +1 -1
  66. package/build/main//321/201omponents/Button/Button.d.ts +1 -1
  67. package/build/main//321/201omponents/Button/Button.js +16 -10
  68. package/build/main//321/201omponents/Button/Button.js.map +1 -1
  69. package/build/main//321/201omponents/Button/types.d.ts +9 -2
  70. package/build/main//321/201omponents/Button/types.js +3 -0
  71. package/build/main//321/201omponents/Button/types.js.map +1 -1
  72. package/build/main//321/201omponents/Calendar/Calendar.d.ts +14 -2
  73. package/build/main//321/201omponents/Calendar/Calendar.js +203 -61
  74. package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -1
  75. package/build/main//321/201omponents/Calendar/types.d.ts +18 -5
  76. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +1 -1
  77. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +1 -1
  78. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +1 -1
  79. package/build/main//321/201omponents/Chip/Chip.d.ts +3 -2
  80. package/build/main//321/201omponents/Chip/Chip.js +210 -45
  81. package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
  82. package/build/main//321/201omponents/Chip/types.d.ts +14 -4
  83. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.d.ts +13 -0
  84. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js +76 -0
  85. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js.map +1 -0
  86. package/build/main//321/201omponents/ChipDndContext/index.d.ts +1 -0
  87. package/build/main//321/201omponents/ChipDndContext/index.js +2 -0
  88. package/build/main//321/201omponents/ChipDndContext/index.js.map +1 -0
  89. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +1 -1
  90. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +3 -2
  91. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -1
  92. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +5 -2
  93. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +1 -1
  94. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +66 -26
  95. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
  96. package/build/main//321/201omponents/ContextMenu/types.d.ts +13 -7
  97. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.d.ts +4 -0
  98. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js +49 -0
  99. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js.map +1 -0
  100. package/build/main//321/201omponents/ContextMenuItem/index.d.ts +1 -0
  101. package/build/main//321/201omponents/ContextMenuItem/index.js +2 -0
  102. package/build/main//321/201omponents/ContextMenuItem/index.js.map +1 -0
  103. package/build/main//321/201omponents/ContextMenuItem/types.d.ts +28 -0
  104. package/build/main//321/201omponents/ContextMenuItem/types.js +6 -0
  105. package/build/main//321/201omponents/ContextMenuItem/types.js.map +1 -0
  106. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +1 -1
  107. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +21 -17
  108. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -1
  109. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +1 -1
  110. package/build/main//321/201omponents/CustomSelect/selectStyles.js +21 -22
  111. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -1
  112. package/build/main//321/201omponents/CustomSelect/types.d.ts +16 -3
  113. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +1 -1
  114. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +33 -24
  115. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -1
  116. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.d.ts +11 -0
  117. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js +39 -0
  118. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js.map +1 -0
  119. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +6 -5
  120. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +2 -2
  121. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -1
  122. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +1 -1
  123. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +24 -18
  124. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -1
  125. package/build/main//321/201omponents/DraggablePopup/types.d.ts +8 -8
  126. package/build/main//321/201omponents/Flex/Flex.d.ts +1 -1
  127. package/build/main//321/201omponents/Flex/Flex.js +2 -2
  128. package/build/main//321/201omponents/Flex/Flex.js.map +1 -1
  129. package/build/main//321/201omponents/Flex/types.d.ts +2 -0
  130. package/build/main//321/201omponents/Input/Input.d.ts +1 -1
  131. package/build/main//321/201omponents/Input/Input.js +89 -31
  132. package/build/main//321/201omponents/Input/Input.js.map +1 -1
  133. package/build/main//321/201omponents/Input/types.d.ts +10 -3
  134. package/build/main//321/201omponents/ListItem/ListItem.js +21 -10
  135. package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -1
  136. package/build/main//321/201omponents/ListItem/types.d.ts +7 -2
  137. package/build/main//321/201omponents/Modal/Modal.d.ts +3 -2
  138. package/build/main//321/201omponents/Modal/Modal.js +175 -77
  139. package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
  140. package/build/main//321/201omponents/Modal/types.d.ts +35 -2
  141. package/build/main//321/201omponents/Notification/Notification.d.ts +4 -6
  142. package/build/main//321/201omponents/Notification/Notification.js +88 -30
  143. package/build/main//321/201omponents/Notification/Notification.js.map +1 -1
  144. package/build/main//321/201omponents/Notification/types.d.ts +23 -5
  145. package/build/main//321/201omponents/Skeleton/Skeleton.js +1 -1
  146. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -1
  147. package/build/main//321/201omponents/Stories/Stories.js +72 -4
  148. package/build/main//321/201omponents/Stories/Stories.js.map +1 -1
  149. package/build/main//321/201omponents/Textarea/Textarea.d.ts +1 -1
  150. package/build/main//321/201omponents/Textarea/Textarea.js +2 -2
  151. package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -1
  152. package/build/main//321/201omponents/Textarea/types.d.ts +2 -2
  153. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +28 -12
  154. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -1
  155. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +2 -1
  156. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +4 -3
  157. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -1
  158. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +35 -59
  159. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -1
  160. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -2
  161. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +34 -37
  162. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -1
  163. package/build/main//321/201omponents/UserDropdown/Option/Option.js +10 -9
  164. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -1
  165. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +1 -1
  166. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +7 -9
  167. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -1
  168. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +3 -3
  169. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +234 -263
  170. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -1
  171. package/build/main//321/201omponents/UserDropdown/components/Delimiter.d.ts +8 -0
  172. package/build/main//321/201omponents/UserDropdown/components/Delimiter.js +10 -0
  173. package/build/main//321/201omponents/UserDropdown/components/Delimiter.js.map +1 -0
  174. package/build/main//321/201omponents/UserDropdown/components/Hint.d.ts +6 -0
  175. package/build/main//321/201omponents/UserDropdown/components/Hint.js +21 -0
  176. package/build/main//321/201omponents/UserDropdown/components/Hint.js.map +1 -0
  177. package/build/main//321/201omponents/UserDropdown/components/Input.d.ts +2 -0
  178. package/build/main//321/201omponents/UserDropdown/components/Input.js +24 -0
  179. package/build/main//321/201omponents/UserDropdown/components/Input.js.map +1 -0
  180. package/build/main//321/201omponents/UserDropdown/components/Mask.d.ts +7 -0
  181. package/build/main//321/201omponents/UserDropdown/components/Mask.js +18 -0
  182. package/build/main//321/201omponents/UserDropdown/components/Mask.js.map +1 -0
  183. package/build/main//321/201omponents/UserDropdown/components/Title.d.ts +5 -0
  184. package/build/main//321/201omponents/UserDropdown/components/Title.js +18 -0
  185. package/build/main//321/201omponents/UserDropdown/components/Title.js.map +1 -0
  186. package/build/main//321/201omponents/UserDropdown/constants.d.ts +57 -0
  187. package/build/main//321/201omponents/UserDropdown/constants.js +73 -0
  188. package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -1
  189. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +84 -41
  190. package/build/main//321/201omponents/UserDropdown/helpers.js +184 -14
  191. package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -1
  192. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +1 -1
  193. package/build/main//321/201omponents/UserDropdown/selectStyles.js +51 -27
  194. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -1
  195. package/build/main//321/201omponents/UserDropdown/types.d.ts +138 -60
  196. package/build/main//321/201omponents/UserDropdown/types.js +1 -8
  197. package/build/main//321/201omponents/UserDropdown/types.js.map +1 -1
  198. package/package.json +16 -8
  199. package/build/main/assets/icons/avatar-arrow-down.svg +0 -3
  200. package/build/main/assets/icons/avatar-arrow-up.svg +0 -3
  201. package/build/main/hooks/useLongTap.d.ts +0 -12
  202. package/build/main/hooks/useLongTap.js +0 -29
  203. package/build/main/hooks/useLongTap.js.map +0 -1
@@ -1,4 +1,4 @@
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';
@@ -23,21 +23,29 @@ export interface IContactInfo extends ILanguageProps {
23
23
  export type TRenderInfoItem = {
24
24
  title: string;
25
25
  info: string;
26
+ icon: ReactElement;
26
27
  };
27
28
  export interface ILoadingMessage {
29
+ isMenuShadowless?: boolean;
28
30
  skeletonRowsCount?: number;
29
31
  }
30
32
  export interface IMenuListProps extends MenuListProps {
31
33
  selectRef: RefObject<any>;
32
34
  scrollFromTop: RefObject<number>;
33
35
  language: string;
36
+ platform: string;
37
+ menuListMaxHeight: number;
38
+ charHintClassName: string;
34
39
  hasNextPage: boolean;
35
40
  isLoading: boolean;
36
41
  isUserTyping: boolean;
42
+ isCharHintVisible: boolean;
37
43
  isShowCatalogSearchButton?: boolean;
44
+ isMenuShadowless: boolean;
38
45
  isNextPageLoading: boolean;
39
46
  onLoadNextPage: (inputValue: string) => void;
40
47
  onShowCatalogSearchButtonClick?: () => void;
48
+ setIsDelimiterVisible: Dispatch<SetStateAction<boolean>>;
41
49
  }
42
50
  type TData = ILanguageProps & {
43
51
  label: string;
@@ -48,6 +56,9 @@ type TData = ILanguageProps & {
48
56
  department: string | null;
49
57
  companyPosition: string | null;
50
58
  isMyContacts: boolean;
59
+ isLocalContact: boolean;
60
+ isCachedContact: boolean;
61
+ isAlreadyAdded: boolean;
51
62
  platform: 'web' | 'ios' | 'android';
52
63
  fontFamily: string;
53
64
  setIsSearchable: (isSearchable: boolean) => void;
@@ -56,12 +67,14 @@ type TData = ILanguageProps & {
56
67
  uid?: string;
57
68
  };
58
69
  export interface IOptionProps extends OptionProps {
70
+ isMenuShadowless: boolean;
59
71
  data: TData;
60
72
  }
61
73
  export interface ISearchInCatalogButtonProps {
62
74
  width?: number;
63
75
  language: string;
64
76
  isOnlyButtonInList?: boolean;
77
+ isMenuShadowless?: boolean;
65
78
  noOptionText?: string | null;
66
79
  onShowCatalogSearchButtonClick?: () => void;
67
80
  }
@@ -90,36 +103,80 @@ export type TGenerateCorporateOptionsToSelect = TGenerateCommonOption & {
90
103
  setIsSearchable: (isSearchable: boolean) => void;
91
104
  setModalData: (modalData: TModalData | null) => void;
92
105
  };
106
+ type TMyContactsEntriesOption = TMyContactsEntries & {
107
+ contacts?: Omit<TContacts, 'userKind'>[];
108
+ };
93
109
  export type TGenerateContactsOption = TGenerateCommonOption & {
94
- option: TMyContactsEntries;
110
+ option: TMyContactsEntriesOption | TLocalEntity;
111
+ isMyContacts?: boolean;
112
+ isLocalContact?: boolean;
95
113
  };
96
114
  export type TGenerateContactsOptionsToSelect = TGenerateCommonOption & {
97
- options: TMyContactsEntries[];
115
+ options: TMyContactsEntriesOption[] | TLocalEntity[];
116
+ isMyContacts?: boolean;
117
+ isLocalContact?: boolean;
98
118
  };
99
119
  export type TGenerateEnteredByUserOption = TGenerateCommonOption & {
100
120
  email: string;
101
121
  };
122
+ export type TCollapseChips = {
123
+ userDropdownId: string;
124
+ maxRowsCountToCollapseChips: number;
125
+ maskWidth: number;
126
+ suffixWidth: number;
127
+ chips: HTMLDivElement[];
128
+ };
129
+ export type TApplyFilteringToOption = {
130
+ isFilteringDisabled: boolean;
131
+ isSelectedOptionsHidden: boolean;
132
+ inputValue: string;
133
+ data: MultiOptionType;
134
+ selectedUsers: readonly MultiOptionType[];
135
+ };
102
136
  export type TSelectStyles = {
103
137
  isChipsVisible: boolean;
104
138
  isMaxMembersAdded: boolean;
105
139
  isDisabled: boolean;
106
140
  isError: boolean;
141
+ isInputPlaceholderVisible: boolean;
107
142
  lastRowNumber: number;
108
143
  paddingLeft: string;
144
+ paddingRight: string;
109
145
  platform: string;
110
146
  layoutType: string;
111
147
  isInputHidden: boolean;
112
148
  isDisabledMenuOffsetAtFullscreen: boolean;
149
+ isInputFocused?: boolean;
113
150
  isMaskRepresented: boolean;
151
+ isSuffixRepresented: boolean;
152
+ isMenuShadowless: boolean;
153
+ isShowCatalogSearchButton: boolean;
114
154
  fontFamilyStyle: TFontFamilyStyle;
115
155
  containerPadding?: string;
156
+ isDraggable?: boolean;
157
+ isChipsCollapsed?: boolean;
158
+ menuListMaxHeight: number;
159
+ maxRowsCountToCollapseChips: number;
116
160
  };
117
161
  export type TGenerateNoOptionsMessage = {
118
162
  inputValue: string;
119
163
  };
120
- export type THandleFilterOption = {
164
+ export type TOptionData = {
121
165
  data: MultiOptionType;
122
166
  };
167
+ export type TCheckIsContainsValue = {
168
+ label: string;
169
+ email: string;
170
+ value: string;
171
+ };
172
+ export type TAdditionalInfo = {
173
+ action: string;
174
+ prevInputValue: string;
175
+ };
176
+ export type TCorporateContacts = {
177
+ corporateContacts: TCorporateEntity[];
178
+ corporateContactsSet: Set<string>;
179
+ };
123
180
  export type TSelectProps = {
124
181
  options: MultiOptionType[];
125
182
  inputValue: string;
@@ -145,39 +202,37 @@ export interface MultiOptionType {
145
202
  isMyContacts?: boolean;
146
203
  isEnteredByUser?: boolean;
147
204
  isNotRemovable?: boolean;
205
+ isAlreadyAdded?: boolean;
148
206
  }
149
- export type TMyContactsEntries = {
207
+ type TContactEntity = {
208
+ isLoading?: boolean;
209
+ isWarning?: boolean;
150
210
  isBusyAtSelectedTime?: boolean;
151
211
  isPrivateSchedule?: boolean;
152
212
  isNotRemovable?: boolean;
153
- isOrganizer?: boolean;
213
+ isOrganizerShort?: boolean;
214
+ isResetChipsToInputValue?: boolean;
215
+ isAlreadyAdded?: boolean;
216
+ uid?: string;
217
+ userType?: CONTACT_TYPES;
218
+ organizerName?: string | null;
219
+ contextMenuItems?: MenuItem[];
220
+ styles?: TStyles;
221
+ };
222
+ export type TMyContactsEntries = TContactEntity & {
154
223
  name: string | null;
155
224
  email: string;
156
225
  avatar: string | null;
157
- isLoading?: boolean;
158
- userType?: CONTACT_TYPES;
159
- isWarning?: boolean;
160
- uid?: string;
161
- isResetChipsToInputValue?: boolean;
162
- contextMenuItems?: MenuItem[];
163
226
  };
164
227
  type TContacts = {
165
228
  userHuid: string;
166
229
  contact: string;
167
230
  contactType: string;
231
+ userKind?: string;
168
232
  };
169
- export type TCorporateEntity = {
170
- isBusyAtSelectedTime?: boolean;
171
- isPrivateSchedule?: boolean;
172
- isNotRemovable?: boolean;
173
- isOrganizer?: boolean;
233
+ export type TCorporateEntity = TContactEntity & {
234
+ isCachedContact?: boolean;
174
235
  avatar: string | null;
175
- uid?: string;
176
- isResetChipsToInputValue?: boolean;
177
- contextMenuItems?: MenuItem[];
178
- userType?: CONTACT_TYPES;
179
- isLoading?: boolean;
180
- isWarning?: boolean;
181
236
  name: string;
182
237
  email: string | null;
183
238
  serverName: string | null;
@@ -186,27 +241,58 @@ export type TCorporateEntity = {
186
241
  companyPosition: string | null;
187
242
  contacts: TContacts[];
188
243
  };
189
- type TCorporateEntries = {
244
+ export type TLocalEntity = TContactEntity & {
245
+ avatar: string | null;
246
+ name: string | null;
247
+ email: string | null;
248
+ contacts: Omit<TContacts, 'userHuid'>[];
249
+ };
250
+ export type TCorporateEntries = {
190
251
  corpPhonebookEntries: TCorporateEntity[];
191
252
  trustSearchEntries: TCorporateEntity[];
253
+ cachedSearchEntries: TCorporateEntity[];
254
+ localPhonebookEntries?: TLocalEntity[];
192
255
  };
193
- export type TUser = TCorporateEntity | TMyContactsEntries | {
256
+ export type TUser = TCorporateEntity | TLocalEntity | TMyContactsEntries | (TContactEntity & {
194
257
  email: string;
195
258
  name?: string | null;
196
- isBusyAtSelectedTime?: boolean;
197
- uid?: string;
198
- isResetChipsToInputValue?: boolean;
199
- isPrivateSchedule?: boolean;
200
- isNotRemovable?: boolean;
201
- isOrganizer?: boolean;
202
- isWarning?: boolean;
203
- isLoading?: boolean;
204
- userType?: CONTACT_TYPES;
205
- contextMenuItems?: MenuItem[];
259
+ isLocalContact?: boolean;
260
+ });
261
+ export type TFocusHandle = {
262
+ focus: () => void;
263
+ blur: () => void;
264
+ };
265
+ export type TQueryVariants = {
266
+ origin: string;
267
+ translit: string;
268
+ toEng: string;
269
+ fromEng: string;
206
270
  };
271
+ export type TContactMatchScore = {
272
+ emailScore: number;
273
+ nameScore: number;
274
+ originalName: string;
275
+ };
276
+ export type TMatchers = {
277
+ startsWith: (text: string) => boolean;
278
+ includes: (text: string) => boolean;
279
+ anyWordStartsWith: (text: string) => boolean;
280
+ };
281
+ export type TRetrieveFilteredContacts = {
282
+ query: string;
283
+ corporateEntries: TCorporateEntries | null;
284
+ myContactsEntries: TMyContactsEntries[] | null;
285
+ checkIsEmailToExclude: (email: string | null) => boolean;
286
+ };
287
+ export type TDragUser = {
288
+ avatar: string;
289
+ label: string;
290
+ dropdownId?: string;
291
+ } & TUser;
207
292
  export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IFontFamilyProps, ILanguageProps {
208
293
  isDisabled?: boolean;
209
294
  isLoading?: boolean;
295
+ isError?: boolean;
210
296
  isChipsOutline?: boolean;
211
297
  isChipsVisible?: boolean;
212
298
  isChipsCollapsable?: boolean;
@@ -217,53 +303,45 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
217
303
  isBackspaceChipToInput?: boolean;
218
304
  isInputHidden?: boolean;
219
305
  isDisabledMenuOffsetAtFullscreen?: boolean;
306
+ isDisabledCheckUniqueEmails?: boolean;
307
+ isMenuShadowless?: boolean;
308
+ isStateless?: boolean;
309
+ isSelectedOptionsHidden?: boolean;
220
310
  hasNextPage?: boolean;
221
311
  isNextPageLoading?: boolean;
222
312
  title?: string;
223
- mask?: string;
313
+ mask?: ReactNode;
314
+ suffix?: ReactNode;
224
315
  placeholder?: string;
316
+ focusPlaceholder?: string;
225
317
  hint?: ReactElement | string;
226
318
  noOptionsMessage?: string;
227
319
  maxMembersCount?: number;
320
+ skeletonRowsCount?: number;
321
+ maxRowsCountToCollapseChips?: number;
322
+ menuListMaxHeight?: number;
228
323
  menuPosition?: 'bottom' | 'auto' | 'top';
324
+ menuLocation?: 'absolute' | 'fixed';
325
+ menuPortalTarget?: RefObject<HTMLDivElement | null>;
229
326
  autoFocus?: boolean;
230
327
  externalInputValue?: string;
231
328
  containerClassName?: string;
329
+ charHintClassName?: string;
232
330
  containerPadding?: string;
233
331
  containerStyles?: TStyles;
234
332
  selectedEntries?: TUser[];
235
333
  corporateEntries: TCorporateEntries | null;
236
334
  myContactsEntries: TMyContactsEntries[] | null;
237
335
  emailsToExclude?: string[];
336
+ userDropdownId?: string;
337
+ focusRef?: RefObject<TFocusHandle | null>;
238
338
  onInputChange: (inputValue: string) => void;
339
+ onImmediateInputChange?: (inputValue: string) => void;
239
340
  onChange: (users: TUser[]) => void;
240
341
  onMenuOpen?: () => void;
241
342
  onMenuClose?: () => void;
242
343
  onLoadNextPage?: (inputValue: string) => void;
243
344
  onShowCatalogSearchButtonClick?: () => void;
345
+ onFocus?: () => void;
244
346
  }
245
- export type TQueryVariants = {
246
- origin: string;
247
- translit: string;
248
- toEng: string;
249
- fromEng: string;
250
- };
251
- export type TContactMatchScore = {
252
- emailScore: number;
253
- nameScore: number;
254
- originalName: string;
255
- };
256
- export declare const MATCH_SCORES: {
257
- readonly EMAIL_STARTS_WITH: 6;
258
- readonly EMAIL_CONTAINS: 5;
259
- readonly NAME_FIRST_WORD_STARTS_WITH: 4;
260
- readonly NAME_ANY_WORD_STARTS_WITH: 3;
261
- readonly NAME_CONTAINS: 2;
262
- readonly NO_MATCH: 0;
263
- };
264
- export type TMatchers = {
265
- startsWith: (text: string) => boolean;
266
- includes: (text: string) => boolean;
267
- anyWordStartsWith: (text: string) => boolean;
268
- };
269
347
  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":"AAkRA,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,31 +1,40 @@
1
1
  {
2
2
  "name": "@expressms/smartapp-ui",
3
- "version": "3.0.0-alpha.18",
3
+ "version": "3.0.0-alpha.180",
4
4
  "description": "SmartApp UI library",
5
5
  "license": "MIT",
6
6
  "main": "build/main/index.js",
7
7
  "typings": "build/main/index.d.ts",
8
8
  "module": "build/module/index.js",
9
- "sideEffects": false,
9
+ "sideEffects": [
10
+ "**/*.css",
11
+ "**/*.scss",
12
+ "**/*.sass"
13
+ ],
10
14
  "publishConfig": {
11
15
  "access": "public",
12
16
  "registry": "https://registry.npmjs.org/"
13
17
  },
14
18
  "dependencies": {
15
- "alex.chus-react-spring-bottom-sheet": "^0.0.2",
19
+ "@dnd-kit/core": "^6.3.1",
20
+ "@floating-ui/react": "^0.27.15",
16
21
  "camelcase": "^6.2.1",
17
22
  "classnames": "^2.3.2",
18
23
  "color": "^4.2.3",
19
24
  "color-blend": "^4.0.0",
20
25
  "convert-layout": "^0.11.1",
26
+ "date-fns": "^4.2.1",
21
27
  "dompurify": "^3.2.6",
22
28
  "echarts": "^5.5.0",
23
29
  "echarts-for-react": "^3.0.2",
24
30
  "juice": "^10.0.0",
31
+ "motion": "^12.26.2",
25
32
  "react-beautiful-dnd": "^13.1.1",
26
- "react-datepicker": "^4.8.0",
27
- "react-draggable": "^4.4.6",
33
+ "react-datepicker": "8.10.0",
34
+ "react-draggable": "4.4.6",
35
+ "react-hook-form": "^7.60.0",
28
36
  "react-insta-stories": "^2.6.2",
37
+ "react-modal-sheet": "^5.4.1",
29
38
  "react-router-dom": "^6.7.0",
30
39
  "react-scrollbars-custom": "^4.1.1",
31
40
  "react-select": "^5.8.0",
@@ -36,7 +45,8 @@
36
45
  "react-window": "^1.8.10",
37
46
  "reactjs-popup": "^2.0.5",
38
47
  "styled-components": "^6.1.11",
39
- "transliteration": "^2.3.5"
48
+ "transliteration": "~2.3.5",
49
+ "use-detect-keyboard-open": "^0.4.0"
40
50
  },
41
51
  "resolutions": {
42
52
  "@typescript-eslint/utils": "6.21.0",
@@ -112,7 +122,6 @@
112
122
  "@types/node": "^16.18.11",
113
123
  "@types/react": "^19.0.2",
114
124
  "@types/react-beautiful-dnd": "^13.1.4",
115
- "@types/react-datepicker": "^4.8.0",
116
125
  "@types/react-dom": "^18.0.10",
117
126
  "@types/react-slick": "^0.23.10",
118
127
  "@types/react-virtualized": "^9.21.30",
@@ -120,7 +129,6 @@
120
129
  "@types/uuid": "^9.0.8",
121
130
  "@typescript-eslint/eslint-plugin": "^6.6.0",
122
131
  "@typescript-eslint/parser": "^6.6.0",
123
- "alex.chus-react-spring-bottom-sheet": "^0.0.2",
124
132
  "animate.css": "^4.1.1",
125
133
  "babel-jest": "^18.0.0",
126
134
  "babel-loader": "8.2.3",
@@ -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"}