@expressms/smartapp-ui 2.9.1 → 2.9.3

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 (68) hide show
  1. package/build/main/assets/icons/distribution.svg +12 -0
  2. package/build/main/assets/icons/group.svg +3 -0
  3. package/build/main/assets/icons/loader.svg +1 -1
  4. package/build/main/assets/icons/meeting-room.svg +3 -0
  5. package/build/main/assets/icons/meeting-rooms-list.svg +5 -0
  6. package/build/main/assets/icons/search.svg +3 -0
  7. package/build/main/assets/icons/warning-avatar.svg +4 -0
  8. package/build/main/constants/constants.d.ts +6 -0
  9. package/build/main/constants/constants.js +6 -0
  10. package/build/main/constants/constants.js.map +1 -1
  11. package/build/main/constants/types.d.ts +5 -0
  12. package/build/main/helpers/index.d.ts +3 -0
  13. package/build/main/helpers/index.js +24 -0
  14. package/build/main/helpers/index.js.map +1 -1
  15. package/build/main/hooks/useLongTap.d.ts +12 -0
  16. package/build/main/hooks/useLongTap.js +29 -0
  17. package/build/main/hooks/useLongTap.js.map +1 -0
  18. package/build/main/styles/styles.scss +2 -2
  19. package/build/main//321/201omponents/Avatar/Avatar.d.ts +1 -1
  20. package/build/main//321/201omponents/Avatar/Avatar.js +18 -3
  21. package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -1
  22. package/build/main//321/201omponents/Avatar/types.d.ts +3 -2
  23. package/build/main//321/201omponents/Avatar/types.js.map +1 -1
  24. package/build/main//321/201omponents/Chip/Chip.d.ts +1 -1
  25. package/build/main//321/201omponents/Chip/Chip.js +35 -5
  26. package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
  27. package/build/main//321/201omponents/Chip/types.d.ts +10 -2
  28. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +1 -1
  29. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +4 -5
  30. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
  31. package/build/main//321/201omponents/ContextMenu/types.d.ts +6 -4
  32. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +3 -2
  33. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -1
  34. package/build/main//321/201omponents/Header/Header.js +2 -1
  35. package/build/main//321/201omponents/Header/Header.js.map +1 -1
  36. package/build/main//321/201omponents/Modal/Modal.d.ts +1 -1
  37. package/build/main//321/201omponents/Modal/Modal.js +8 -5
  38. package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
  39. package/build/main//321/201omponents/Modal/types.d.ts +1 -0
  40. package/build/main//321/201omponents/Notification/Notification.js +2 -1
  41. package/build/main//321/201omponents/Notification/Notification.js.map +1 -1
  42. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +2 -1
  43. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -1
  44. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +21 -10
  45. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -1
  46. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +5 -8
  47. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -1
  48. package/build/main//321/201omponents/UserDropdown/Option/Option.js +12 -10
  49. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -1
  50. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +4 -0
  51. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +43 -0
  52. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -0
  53. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +1 -1
  54. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +61 -24
  55. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -1
  56. package/build/main//321/201omponents/UserDropdown/constants.d.ts +7 -0
  57. package/build/main//321/201omponents/UserDropdown/constants.js +9 -0
  58. package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -0
  59. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +2 -2
  60. package/build/main//321/201omponents/UserDropdown/helpers.js +86 -33
  61. package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -1
  62. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +1 -1
  63. package/build/main//321/201omponents/UserDropdown/selectStyles.js +2 -2
  64. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -1
  65. package/build/main//321/201omponents/UserDropdown/types.d.ts +56 -5
  66. package/build/main//321/201omponents/UserDropdown/types.js +8 -1
  67. package/build/main//321/201omponents/UserDropdown/types.js.map +1 -1
  68. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import { RefObject } from 'react';
2
2
  import { MenuListProps, OptionProps } from 'react-select';
3
3
  import { ICommonProps, ILayoutTypeProps, TStyles } from '../../constants';
4
+ import { USER_TYPES } from './constants';
5
+ import { MenuItem } from '../ContextMenu/types';
4
6
  export interface IContactBottomSheet {
5
7
  language: string;
6
8
  avatar: string | null;
@@ -33,8 +35,10 @@ export interface IMenuListProps extends MenuListProps {
33
35
  hasNextPage: boolean;
34
36
  isLoading: boolean;
35
37
  isUserTyping: boolean;
38
+ isShowCatalogSearchButton?: boolean;
36
39
  isNextPageLoading: boolean;
37
40
  onLoadNextPage: (inputValue: string) => void;
41
+ onShowCatalogSearchButtonClick?: () => void;
38
42
  }
39
43
  type TData = {
40
44
  label: string;
@@ -49,10 +53,18 @@ type TData = {
49
53
  language: 'ru' | 'en' | 'de' | 'es' | 'fr' | 'ar' | 'ms' | 'tr' | 'id';
50
54
  setIsSearchable: (isSearchable: boolean) => void;
51
55
  setModalData: (modalData: TModalData | null) => void;
56
+ userType?: USER_TYPES;
52
57
  };
53
58
  export interface IOptionProps extends OptionProps {
54
59
  data: TData;
55
60
  }
61
+ export interface ISearchInCatalogButtonProps {
62
+ width?: number;
63
+ language: string;
64
+ isOnlyButtonInList?: boolean;
65
+ noOptionText?: string | null;
66
+ onShowCatalogSearchButtonClick?: () => void;
67
+ }
56
68
  export type TModalData = {
57
69
  avatar: string | null;
58
70
  name: string;
@@ -88,11 +100,6 @@ export type TGenerateEnteredByUserOption = TGenerateCommonOption & {
88
100
  email: string;
89
101
  isError?: boolean;
90
102
  };
91
- export type TSortedContacts = {
92
- contactA: string;
93
- contactB: string;
94
- query: string;
95
- };
96
103
  export type TSelectStyles = {
97
104
  isChipsVisible: boolean;
98
105
  isMaxMembersAdded: boolean;
@@ -103,6 +110,7 @@ export type TSelectStyles = {
103
110
  fillType: string;
104
111
  platform: string;
105
112
  layoutType: string;
113
+ isInputHidden: boolean;
106
114
  };
107
115
  export type TGenerateNoOptionsMessage = {
108
116
  inputValue: string;
@@ -123,6 +131,9 @@ export interface MultiOptionType {
123
131
  email: string;
124
132
  layoutType: string;
125
133
  isChipsCollapsable: boolean;
134
+ isLoading?: boolean;
135
+ isWarning?: boolean;
136
+ userType?: USER_TYPES;
126
137
  platform?: string;
127
138
  serverName?: string | null;
128
139
  company?: string | null;
@@ -139,6 +150,9 @@ export type TMyContactsEntries = {
139
150
  name: string | null;
140
151
  email: string;
141
152
  avatar: string | null;
153
+ userType?: USER_TYPES;
154
+ isLoading?: boolean;
155
+ isWarning?: boolean;
142
156
  };
143
157
  type TContacts = {
144
158
  userHuid: string;
@@ -149,6 +163,9 @@ export type TCorporateEntity = {
149
163
  isPrivateSchedule?: boolean;
150
164
  isNotRemovable?: boolean;
151
165
  avatar: string | null;
166
+ isLoading?: boolean;
167
+ isWarning?: boolean;
168
+ userType?: USER_TYPES;
152
169
  name: string;
153
170
  email: string | null;
154
171
  serverName: string | null;
@@ -163,8 +180,12 @@ type TCorporateEntries = {
163
180
  };
164
181
  export type TUser = TCorporateEntity | TMyContactsEntries | {
165
182
  email: string;
183
+ name?: string | null;
166
184
  isPrivateSchedule?: boolean;
167
185
  isNotRemovable?: boolean;
186
+ isWarning?: boolean;
187
+ isLoading?: boolean;
188
+ userType?: USER_TYPES;
168
189
  };
169
190
  export interface IUserDropdownProps extends ICommonProps, ILayoutTypeProps {
170
191
  isDisabled?: boolean;
@@ -174,6 +195,9 @@ export interface IUserDropdownProps extends ICommonProps, ILayoutTypeProps {
174
195
  isSelectedChipHasTooltip?: boolean;
175
196
  isMenuCloseOnSelect?: boolean;
176
197
  isFilteringDisabled?: boolean;
198
+ isShowCatalogSearchButton?: boolean;
199
+ isBackspaceChipToInput?: boolean;
200
+ isInputHidden?: boolean;
177
201
  hasNextPage?: boolean;
178
202
  isNextPageLoading?: boolean;
179
203
  language?: 'ru' | 'en' | 'de' | 'es' | 'fr' | 'ar' | 'ms' | 'tr' | 'id';
@@ -186,15 +210,42 @@ export interface IUserDropdownProps extends ICommonProps, ILayoutTypeProps {
186
210
  fillType?: 'primary' | 'secondary';
187
211
  menuPosition?: 'bottom' | 'auto' | 'top';
188
212
  autoFocus?: boolean;
213
+ externalInputValue?: string;
189
214
  containerClassName?: string;
190
215
  containerStyles?: TStyles;
191
216
  selectedEntries?: TUser[];
192
217
  corporateEntries: TCorporateEntries | null;
193
218
  myContactsEntries: TMyContactsEntries[] | null;
219
+ chipsContextMenuItems?: MenuItem<string>[];
194
220
  onInputChange: (inputValue: string) => void;
195
221
  onChange: (users: TUser[]) => void;
196
222
  onMenuOpen?: () => void;
197
223
  onMenuClose?: () => void;
198
224
  onLoadNextPage?: (inputValue: string) => void;
225
+ onShowCatalogSearchButtonClick?: () => void;
199
226
  }
227
+ export type TQueryVariants = {
228
+ origin: string;
229
+ translit: string;
230
+ toEng: string;
231
+ fromEng: string;
232
+ };
233
+ export type TContactMatchScore = {
234
+ emailScore: number;
235
+ nameScore: number;
236
+ originalName: string;
237
+ };
238
+ export declare const MATCH_SCORES: {
239
+ readonly EMAIL_STARTS_WITH: 6;
240
+ readonly EMAIL_CONTAINS: 5;
241
+ readonly NAME_FIRST_WORD_STARTS_WITH: 4;
242
+ readonly NAME_ANY_WORD_STARTS_WITH: 3;
243
+ readonly NAME_CONTAINS: 2;
244
+ readonly NO_MATCH: 0;
245
+ };
246
+ export type TMatchers = {
247
+ startsWith: (text: string) => boolean;
248
+ includes: (text: string) => boolean;
249
+ anyWordStartsWith: (text: string) => boolean;
250
+ };
200
251
  export {};
@@ -1,2 +1,9 @@
1
- export {};
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
+ };
2
9
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/UserDropdown/types.ts"],"names":[],"mappings":"AA+PA,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressms/smartapp-ui",
3
- "version": "2.9.1",
3
+ "version": "2.9.3",
4
4
  "description": "SmartApp UI library",
5
5
  "license": "MIT",
6
6
  "main": "build/main/index.js",