@expressms/smartapp-ui 3.0.0-alpha.12 → 3.0.0-alpha.120
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.
- package/build/main/assets/icons/accepted-invite-status.svg +4 -0
- package/build/main/assets/icons/calendar-arrow-next.svg +3 -0
- package/build/main/assets/icons/calendar-arrow-prev.svg +3 -0
- package/build/main/assets/icons/chevron.svg +3 -0
- package/build/main/assets/icons/declined-invite-status.svg +4 -0
- package/build/main/assets/icons/needs-action-invite-status.svg +4 -0
- package/build/main/assets/icons/notification-close.svg +1 -1
- package/build/main/assets/icons/notification-error.svg +5 -0
- package/build/main/assets/icons/notification-failure-filled.svg +3 -0
- package/build/main/assets/icons/notification-info-filled.svg +5 -0
- package/build/main/assets/icons/notification-success-filled.svg +4 -0
- package/build/main/assets/icons/select-arrow-down.svg +3 -0
- package/build/main/assets/icons/select-arrow-up.svg +3 -0
- package/build/main/assets/storybook/index.d.ts +2 -0
- package/build/main/assets/storybook/index.js +2 -0
- package/build/main/assets/storybook/index.js.map +1 -1
- package/build/main/constants/constants.d.ts +81 -43
- package/build/main/constants/constants.js +119 -47
- package/build/main/constants/constants.js.map +1 -1
- package/build/main/constants/types.d.ts +10 -1
- package/build/main/helpers/index.d.ts +3 -1
- package/build/main/helpers/index.js +8 -2
- package/build/main/helpers/index.js.map +1 -1
- package/build/main/hooks/useCharHintDisplay.d.ts +9 -0
- package/build/main/hooks/useCharHintDisplay.js +35 -0
- package/build/main/hooks/useCharHintDisplay.js.map +1 -0
- package/build/main/hooks/useMobileLongTap.d.ts +16 -0
- package/build/main/hooks/useMobileLongTap.js +55 -0
- package/build/main/hooks/useMobileLongTap.js.map +1 -0
- package/build/main/hooks/useModal.d.ts +17 -10
- package/build/main/hooks/useModal.js +173 -12
- package/build/main/hooks/useModal.js.map +1 -1
- package/build/main/index.d.ts +2 -0
- package/build/main/index.js +2 -0
- package/build/main/index.js.map +1 -1
- package/build/main/styles/styles.scss +2 -2
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +3 -0
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -1
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +3 -2
- package/build/main//321/201omponents/Avatar/Avatar.js +52 -23
- package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -1
- package/build/main//321/201omponents/Avatar/types.d.ts +9 -5
- package/build/main//321/201omponents/Avatar/types.js +5 -2
- package/build/main//321/201omponents/Avatar/types.js.map +1 -1
- package/build/main//321/201omponents/Button/Button.d.ts +1 -1
- package/build/main//321/201omponents/Button/Button.js +21 -9
- package/build/main//321/201omponents/Button/Button.js.map +1 -1
- package/build/main//321/201omponents/Button/types.d.ts +8 -2
- package/build/main//321/201omponents/Button/types.js +3 -0
- package/build/main//321/201omponents/Button/types.js.map +1 -1
- package/build/main//321/201omponents/Calendar/Calendar.d.ts +2 -2
- package/build/main//321/201omponents/Calendar/Calendar.js +88 -41
- package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -1
- package/build/main//321/201omponents/Calendar/types.d.ts +18 -8
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +1 -1
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +1 -1
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +1 -1
- package/build/main//321/201omponents/Chip/Chip.d.ts +3 -2
- package/build/main//321/201omponents/Chip/Chip.js +158 -26
- package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
- package/build/main//321/201omponents/Chip/types.d.ts +13 -4
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.d.ts +13 -0
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js +76 -0
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js.map +1 -0
- package/build/main//321/201omponents/ChipDndContext/index.d.ts +1 -0
- package/build/main//321/201omponents/ChipDndContext/index.js +2 -0
- package/build/main//321/201omponents/ChipDndContext/index.js.map +1 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +1 -1
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +3 -2
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -1
- package/build/main//321/201omponents/ConfirmationModal/types.d.ts +5 -2
- package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +1 -1
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js +66 -26
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
- package/build/main//321/201omponents/ContextMenu/types.d.ts +12 -7
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.d.ts +4 -0
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js +49 -0
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js.map +1 -0
- package/build/main//321/201omponents/ContextMenuItem/index.d.ts +1 -0
- package/build/main//321/201omponents/ContextMenuItem/index.js +2 -0
- package/build/main//321/201omponents/ContextMenuItem/index.js.map +1 -0
- package/build/main//321/201omponents/ContextMenuItem/types.d.ts +28 -0
- package/build/main//321/201omponents/ContextMenuItem/types.js +6 -0
- package/build/main//321/201omponents/ContextMenuItem/types.js.map +1 -0
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +7 -6
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -1
- package/build/main//321/201omponents/CustomSelect/selectStyles.js +20 -21
- package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/CustomSelect/types.d.ts +7 -1
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +1 -1
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +33 -24
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -1
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.d.ts +11 -0
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js +38 -0
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +4 -5
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +1 -1
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +24 -18
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -1
- package/build/main//321/201omponents/DraggablePopup/types.d.ts +8 -8
- package/build/main//321/201omponents/Flex/Flex.d.ts +1 -1
- package/build/main//321/201omponents/Flex/Flex.js +2 -2
- package/build/main//321/201omponents/Flex/Flex.js.map +1 -1
- package/build/main//321/201omponents/Flex/types.d.ts +2 -0
- package/build/main//321/201omponents/Input/Input.d.ts +1 -1
- package/build/main//321/201omponents/Input/Input.js +75 -33
- package/build/main//321/201omponents/Input/Input.js.map +1 -1
- package/build/main//321/201omponents/Input/types.d.ts +10 -3
- package/build/main//321/201omponents/ListItem/ListItem.js +21 -17
- package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -1
- package/build/main//321/201omponents/ListItem/types.d.ts +7 -3
- package/build/main//321/201omponents/Modal/Modal.d.ts +3 -2
- package/build/main//321/201omponents/Modal/Modal.js +116 -48
- package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
- package/build/main//321/201omponents/Modal/types.d.ts +36 -2
- package/build/main//321/201omponents/Notification/Notification.d.ts +4 -6
- package/build/main//321/201omponents/Notification/Notification.js +72 -25
- package/build/main//321/201omponents/Notification/Notification.js.map +1 -1
- package/build/main//321/201omponents/Notification/types.d.ts +17 -2
- package/build/main//321/201omponents/Stories/Stories.js +72 -4
- package/build/main//321/201omponents/Stories/Stories.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +6 -0
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +2 -1
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +4 -3
- package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +21 -50
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -2
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +34 -37
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/Option/Option.js +2 -2
- package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +1 -0
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +4 -3
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +221 -79
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/helpers.d.ts +7 -3
- package/build/main//321/201omponents/UserDropdown/helpers.js +4 -2
- package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +1 -1
- package/build/main//321/201omponents/UserDropdown/selectStyles.js +35 -21
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/types.d.ts +91 -58
- package/build/main//321/201omponents/UserDropdown/types.js.map +1 -1
- package/package.json +10 -7
- package/build/main/assets/icons/avatar-arrow-down.svg +0 -3
- package/build/main/assets/icons/avatar-arrow-up.svg +0 -3
- package/build/main/hooks/useLongTap.d.ts +0 -12
- package/build/main/hooks/useLongTap.js +0 -29
- 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';
|
|
@@ -25,19 +25,24 @@ export type TRenderInfoItem = {
|
|
|
25
25
|
info: string;
|
|
26
26
|
};
|
|
27
27
|
export interface ILoadingMessage {
|
|
28
|
+
isMenuShadowless?: boolean;
|
|
28
29
|
skeletonRowsCount?: number;
|
|
29
30
|
}
|
|
30
31
|
export interface IMenuListProps extends MenuListProps {
|
|
31
32
|
selectRef: RefObject<any>;
|
|
32
33
|
scrollFromTop: RefObject<number>;
|
|
33
34
|
language: string;
|
|
35
|
+
menuListMaxHeight: number;
|
|
34
36
|
hasNextPage: boolean;
|
|
35
37
|
isLoading: boolean;
|
|
36
38
|
isUserTyping: boolean;
|
|
39
|
+
isCharHintVisible: boolean;
|
|
37
40
|
isShowCatalogSearchButton?: boolean;
|
|
41
|
+
isMenuShadowless: boolean;
|
|
38
42
|
isNextPageLoading: boolean;
|
|
39
43
|
onLoadNextPage: (inputValue: string) => void;
|
|
40
44
|
onShowCatalogSearchButtonClick?: () => void;
|
|
45
|
+
setIsDelimiterVisible: Dispatch<SetStateAction<boolean>>;
|
|
41
46
|
}
|
|
42
47
|
type TData = ILanguageProps & {
|
|
43
48
|
label: string;
|
|
@@ -48,6 +53,7 @@ type TData = ILanguageProps & {
|
|
|
48
53
|
department: string | null;
|
|
49
54
|
companyPosition: string | null;
|
|
50
55
|
isMyContacts: boolean;
|
|
56
|
+
isLocalContact: boolean;
|
|
51
57
|
platform: 'web' | 'ios' | 'android';
|
|
52
58
|
fontFamily: string;
|
|
53
59
|
setIsSearchable: (isSearchable: boolean) => void;
|
|
@@ -56,6 +62,7 @@ type TData = ILanguageProps & {
|
|
|
56
62
|
uid?: string;
|
|
57
63
|
};
|
|
58
64
|
export interface IOptionProps extends OptionProps {
|
|
65
|
+
isMenuShadowless: boolean;
|
|
59
66
|
data: TData;
|
|
60
67
|
}
|
|
61
68
|
export interface ISearchInCatalogButtonProps {
|
|
@@ -90,11 +97,18 @@ export type TGenerateCorporateOptionsToSelect = TGenerateCommonOption & {
|
|
|
90
97
|
setIsSearchable: (isSearchable: boolean) => void;
|
|
91
98
|
setModalData: (modalData: TModalData | null) => void;
|
|
92
99
|
};
|
|
100
|
+
type TMyContactsEntriesOption = TMyContactsEntries & {
|
|
101
|
+
contacts?: Omit<TContacts, 'userKind'>[];
|
|
102
|
+
};
|
|
93
103
|
export type TGenerateContactsOption = TGenerateCommonOption & {
|
|
94
|
-
option:
|
|
104
|
+
option: TMyContactsEntriesOption | TLocalEntity;
|
|
105
|
+
isMyContacts?: boolean;
|
|
106
|
+
isLocalContact?: boolean;
|
|
95
107
|
};
|
|
96
108
|
export type TGenerateContactsOptionsToSelect = TGenerateCommonOption & {
|
|
97
|
-
options:
|
|
109
|
+
options: TMyContactsEntriesOption[] | TLocalEntity[];
|
|
110
|
+
isMyContacts?: boolean;
|
|
111
|
+
isLocalContact?: boolean;
|
|
98
112
|
};
|
|
99
113
|
export type TGenerateEnteredByUserOption = TGenerateCommonOption & {
|
|
100
114
|
email: string;
|
|
@@ -103,16 +117,23 @@ export type TSelectStyles = {
|
|
|
103
117
|
isChipsVisible: boolean;
|
|
104
118
|
isMaxMembersAdded: boolean;
|
|
105
119
|
isDisabled: boolean;
|
|
106
|
-
|
|
120
|
+
isInputPlaceholderVisible: boolean;
|
|
107
121
|
lastRowNumber: number;
|
|
108
122
|
paddingLeft: string;
|
|
123
|
+
paddingRight: string;
|
|
109
124
|
platform: string;
|
|
110
125
|
layoutType: string;
|
|
111
126
|
isInputHidden: boolean;
|
|
112
127
|
isDisabledMenuOffsetAtFullscreen: boolean;
|
|
128
|
+
isInputFocused?: boolean;
|
|
113
129
|
isMaskRepresented: boolean;
|
|
130
|
+
isSuffixRepresented: boolean;
|
|
131
|
+
isMenuShadowless: boolean;
|
|
114
132
|
fontFamilyStyle: TFontFamilyStyle;
|
|
115
133
|
containerPadding?: string;
|
|
134
|
+
isDraggable?: boolean;
|
|
135
|
+
isChipsCollapsed?: boolean;
|
|
136
|
+
menuListMaxHeight: number;
|
|
116
137
|
};
|
|
117
138
|
export type TGenerateNoOptionsMessage = {
|
|
118
139
|
inputValue: string;
|
|
@@ -146,38 +167,32 @@ export interface MultiOptionType {
|
|
|
146
167
|
isEnteredByUser?: boolean;
|
|
147
168
|
isNotRemovable?: boolean;
|
|
148
169
|
}
|
|
149
|
-
|
|
170
|
+
type TContactEntity = {
|
|
171
|
+
isLoading?: boolean;
|
|
172
|
+
isWarning?: boolean;
|
|
150
173
|
isBusyAtSelectedTime?: boolean;
|
|
151
174
|
isPrivateSchedule?: boolean;
|
|
152
175
|
isNotRemovable?: boolean;
|
|
153
|
-
|
|
176
|
+
isOrganizerShort?: boolean;
|
|
177
|
+
isResetChipsToInputValue?: boolean;
|
|
178
|
+
uid?: string;
|
|
179
|
+
userType?: CONTACT_TYPES;
|
|
180
|
+
organizerName?: string | null;
|
|
181
|
+
contextMenuItems?: MenuItem[];
|
|
182
|
+
};
|
|
183
|
+
export type TMyContactsEntries = TContactEntity & {
|
|
154
184
|
name: string | null;
|
|
155
185
|
email: string;
|
|
156
186
|
avatar: string | null;
|
|
157
|
-
isLoading?: boolean;
|
|
158
|
-
userType?: CONTACT_TYPES;
|
|
159
|
-
isWarning?: boolean;
|
|
160
|
-
uid?: string;
|
|
161
|
-
isResetChipsToInputValue?: boolean;
|
|
162
|
-
contextMenuItems?: MenuItem[];
|
|
163
187
|
};
|
|
164
188
|
type TContacts = {
|
|
165
189
|
userHuid: string;
|
|
166
190
|
contact: string;
|
|
167
191
|
contactType: string;
|
|
192
|
+
userKind?: string;
|
|
168
193
|
};
|
|
169
|
-
export type TCorporateEntity = {
|
|
170
|
-
isBusyAtSelectedTime?: boolean;
|
|
171
|
-
isPrivateSchedule?: boolean;
|
|
172
|
-
isNotRemovable?: boolean;
|
|
173
|
-
isOrganizer?: boolean;
|
|
194
|
+
export type TCorporateEntity = TContactEntity & {
|
|
174
195
|
avatar: string | null;
|
|
175
|
-
uid?: string;
|
|
176
|
-
isResetChipsToInputValue?: boolean;
|
|
177
|
-
contextMenuItems?: MenuItem[];
|
|
178
|
-
userType?: CONTACT_TYPES;
|
|
179
|
-
isLoading?: boolean;
|
|
180
|
-
isWarning?: boolean;
|
|
181
196
|
name: string;
|
|
182
197
|
email: string | null;
|
|
183
198
|
serverName: string | null;
|
|
@@ -186,24 +201,55 @@ export type TCorporateEntity = {
|
|
|
186
201
|
companyPosition: string | null;
|
|
187
202
|
contacts: TContacts[];
|
|
188
203
|
};
|
|
204
|
+
export type TLocalEntity = TContactEntity & {
|
|
205
|
+
avatar: string | null;
|
|
206
|
+
name: string | null;
|
|
207
|
+
email: string | null;
|
|
208
|
+
contacts: Omit<TContacts, 'userHuid'>[];
|
|
209
|
+
};
|
|
189
210
|
type TCorporateEntries = {
|
|
190
211
|
corpPhonebookEntries: TCorporateEntity[];
|
|
191
212
|
trustSearchEntries: TCorporateEntity[];
|
|
213
|
+
localPhonebookEntries?: TLocalEntity[];
|
|
192
214
|
};
|
|
193
|
-
export type TUser = TCorporateEntity | TMyContactsEntries | {
|
|
215
|
+
export type TUser = TCorporateEntity | TLocalEntity | TMyContactsEntries | (TContactEntity & {
|
|
194
216
|
email: string;
|
|
195
217
|
name?: string | null;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
218
|
+
isLocalContact?: boolean;
|
|
219
|
+
});
|
|
220
|
+
export type TFocusHandle = {
|
|
221
|
+
focus: () => void;
|
|
222
|
+
blur: () => void;
|
|
223
|
+
};
|
|
224
|
+
export type TQueryVariants = {
|
|
225
|
+
origin: string;
|
|
226
|
+
translit: string;
|
|
227
|
+
toEng: string;
|
|
228
|
+
fromEng: string;
|
|
206
229
|
};
|
|
230
|
+
export type TContactMatchScore = {
|
|
231
|
+
emailScore: number;
|
|
232
|
+
nameScore: number;
|
|
233
|
+
originalName: string;
|
|
234
|
+
};
|
|
235
|
+
export declare const MATCH_SCORES: {
|
|
236
|
+
readonly EMAIL_STARTS_WITH: 6;
|
|
237
|
+
readonly EMAIL_CONTAINS: 5;
|
|
238
|
+
readonly NAME_FIRST_WORD_STARTS_WITH: 4;
|
|
239
|
+
readonly NAME_ANY_WORD_STARTS_WITH: 3;
|
|
240
|
+
readonly NAME_CONTAINS: 2;
|
|
241
|
+
readonly NO_MATCH: 0;
|
|
242
|
+
};
|
|
243
|
+
export type TMatchers = {
|
|
244
|
+
startsWith: (text: string) => boolean;
|
|
245
|
+
includes: (text: string) => boolean;
|
|
246
|
+
anyWordStartsWith: (text: string) => boolean;
|
|
247
|
+
};
|
|
248
|
+
export type TDragUser = {
|
|
249
|
+
avatar: string;
|
|
250
|
+
label: string;
|
|
251
|
+
dropdownId?: string;
|
|
252
|
+
} & TUser;
|
|
207
253
|
export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IFontFamilyProps, ILanguageProps {
|
|
208
254
|
isDisabled?: boolean;
|
|
209
255
|
isLoading?: boolean;
|
|
@@ -217,15 +263,22 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
|
|
|
217
263
|
isBackspaceChipToInput?: boolean;
|
|
218
264
|
isInputHidden?: boolean;
|
|
219
265
|
isDisabledMenuOffsetAtFullscreen?: boolean;
|
|
266
|
+
isDisabledCheckUniqueEmails?: boolean;
|
|
267
|
+
isMenuShadowless?: boolean;
|
|
220
268
|
hasNextPage?: boolean;
|
|
221
269
|
isNextPageLoading?: boolean;
|
|
222
270
|
title?: string;
|
|
223
271
|
mask?: string;
|
|
272
|
+
suffix?: ReactNode;
|
|
224
273
|
placeholder?: string;
|
|
225
274
|
hint?: ReactElement | string;
|
|
226
275
|
noOptionsMessage?: string;
|
|
227
276
|
maxMembersCount?: number;
|
|
277
|
+
skeletonRowsCount?: number;
|
|
278
|
+
menuListMaxHeight?: number;
|
|
228
279
|
menuPosition?: 'bottom' | 'auto' | 'top';
|
|
280
|
+
menuLocation?: 'absolute' | 'fixed';
|
|
281
|
+
menuPortalTarget?: RefObject<HTMLDivElement | null>;
|
|
229
282
|
autoFocus?: boolean;
|
|
230
283
|
externalInputValue?: string;
|
|
231
284
|
containerClassName?: string;
|
|
@@ -235,35 +288,15 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
|
|
|
235
288
|
corporateEntries: TCorporateEntries | null;
|
|
236
289
|
myContactsEntries: TMyContactsEntries[] | null;
|
|
237
290
|
emailsToExclude?: string[];
|
|
291
|
+
userDropdownId?: string;
|
|
292
|
+
focusRef?: RefObject<TFocusHandle | null>;
|
|
238
293
|
onInputChange: (inputValue: string) => void;
|
|
294
|
+
onImmediateInputChange?: (inputValue: string) => void;
|
|
239
295
|
onChange: (users: TUser[]) => void;
|
|
240
296
|
onMenuOpen?: () => void;
|
|
241
297
|
onMenuClose?: () => void;
|
|
242
298
|
onLoadNextPage?: (inputValue: string) => void;
|
|
243
299
|
onShowCatalogSearchButtonClick?: () => void;
|
|
300
|
+
onFocus?: () => void;
|
|
244
301
|
}
|
|
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
302
|
export {};
|
|
@@ -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":"AAkPA,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": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.120",
|
|
4
4
|
"description": "SmartApp UI library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "build/main/index.js",
|
|
@@ -12,20 +12,24 @@
|
|
|
12
12
|
"registry": "https://registry.npmjs.org/"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"
|
|
15
|
+
"@dnd-kit/core": "^6.3.1",
|
|
16
16
|
"camelcase": "^6.2.1",
|
|
17
17
|
"classnames": "^2.3.2",
|
|
18
18
|
"color": "^4.2.3",
|
|
19
19
|
"color-blend": "^4.0.0",
|
|
20
20
|
"convert-layout": "^0.11.1",
|
|
21
|
+
"date-fns": "^4.1.0",
|
|
21
22
|
"dompurify": "^3.2.6",
|
|
22
23
|
"echarts": "^5.5.0",
|
|
23
24
|
"echarts-for-react": "^3.0.2",
|
|
24
25
|
"juice": "^10.0.0",
|
|
26
|
+
"motion": "^12.26.2",
|
|
25
27
|
"react-beautiful-dnd": "^13.1.1",
|
|
26
|
-
"react-datepicker": "
|
|
27
|
-
"react-draggable": "
|
|
28
|
+
"react-datepicker": "8.10.0",
|
|
29
|
+
"react-draggable": "4.4.6",
|
|
30
|
+
"react-hook-form": "^7.60.0",
|
|
28
31
|
"react-insta-stories": "^2.6.2",
|
|
32
|
+
"react-modal-sheet": "^5.4.1",
|
|
29
33
|
"react-router-dom": "^6.7.0",
|
|
30
34
|
"react-scrollbars-custom": "^4.1.1",
|
|
31
35
|
"react-select": "^5.8.0",
|
|
@@ -36,7 +40,8 @@
|
|
|
36
40
|
"react-window": "^1.8.10",
|
|
37
41
|
"reactjs-popup": "^2.0.5",
|
|
38
42
|
"styled-components": "^6.1.11",
|
|
39
|
-
"transliteration": "
|
|
43
|
+
"transliteration": "~2.3.5",
|
|
44
|
+
"use-detect-keyboard-open": "^0.4.0"
|
|
40
45
|
},
|
|
41
46
|
"resolutions": {
|
|
42
47
|
"@typescript-eslint/utils": "6.21.0",
|
|
@@ -112,7 +117,6 @@
|
|
|
112
117
|
"@types/node": "^16.18.11",
|
|
113
118
|
"@types/react": "^19.0.2",
|
|
114
119
|
"@types/react-beautiful-dnd": "^13.1.4",
|
|
115
|
-
"@types/react-datepicker": "^4.8.0",
|
|
116
120
|
"@types/react-dom": "^18.0.10",
|
|
117
121
|
"@types/react-slick": "^0.23.10",
|
|
118
122
|
"@types/react-virtualized": "^9.21.30",
|
|
@@ -120,7 +124,6 @@
|
|
|
120
124
|
"@types/uuid": "^9.0.8",
|
|
121
125
|
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
122
126
|
"@typescript-eslint/parser": "^6.6.0",
|
|
123
|
-
"alex.chus-react-spring-bottom-sheet": "^0.0.2",
|
|
124
127
|
"animate.css": "^4.1.1",
|
|
125
128
|
"babel-jest": "^18.0.0",
|
|
126
129
|
"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"}
|