@expressms/smartapp-ui 3.0.0-alpha.21 → 3.0.0-alpha.210
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/chevron.svg +3 -0
- package/build/main/assets/icons/close-modal.svg +1 -1
- package/build/main/assets/icons/copy.svg +3 -0
- package/build/main/assets/icons/declined-invite-status.svg +4 -0
- package/build/main/assets/icons/department.svg +3 -0
- package/build/main/assets/icons/doc-small.svg +5 -5
- package/build/main/assets/icons/download.svg +3 -0
- package/build/main/assets/icons/file-small.svg +5 -5
- package/build/main/assets/icons/file.svg +1 -1
- package/build/main/assets/icons/image-no-preview-small.svg +11 -0
- package/build/main/assets/icons/image-no-preview.svg +11 -0
- package/build/main/assets/icons/job-position.svg +3 -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/office.svg +3 -0
- package/build/main/assets/icons/pdf-small.svg +5 -5
- package/build/main/assets/icons/ppt-small.svg +5 -5
- package/build/main/assets/icons/private.svg +4 -11
- package/build/main/assets/icons/search.svg +1 -1
- 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/icons/server.svg +3 -0
- package/build/main/assets/icons/txt-small.svg +5 -5
- package/build/main/assets/icons/video-no-preview-small.svg +11 -0
- package/build/main/assets/icons/video-no-preview.svg +11 -0
- package/build/main/assets/icons/xls-small.svg +5 -5
- package/build/main/assets/storybook/index.d.ts +3 -0
- package/build/main/assets/storybook/index.js +3 -0
- package/build/main/assets/storybook/index.js.map +1 -1
- package/build/main/constants/constants.d.ts +92 -47
- package/build/main/constants/constants.js +132 -49
- package/build/main/constants/constants.js.map +1 -1
- package/build/main/constants/types.d.ts +13 -2
- package/build/main/helpers/index.d.ts +7 -5
- package/build/main/helpers/index.js +28 -7
- 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 +65 -0
- package/build/main/hooks/useMobileLongTap.js.map +1 -0
- package/build/main/hooks/useModal.d.ts +18 -10
- package/build/main/hooks/useModal.js +226 -13
- 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/main.js +0 -6
- package/build/main/styles/styles.scss +2 -2
- package/build/main//321/201omponents/ActionModal/ActionModal.js +1 -1
- package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -1
- package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +1 -1
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js +81 -26
- package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -1
- package/build/main//321/201omponents/AttachedFile/types.d.ts +1 -0
- package/build/main//321/201omponents/Avatar/Avatar.d.ts +3 -2
- package/build/main//321/201omponents/Avatar/Avatar.js +55 -27
- 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 +16 -10
- package/build/main//321/201omponents/Button/Button.js.map +1 -1
- package/build/main//321/201omponents/Button/types.d.ts +9 -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 +14 -2
- package/build/main//321/201omponents/Calendar/Calendar.js +201 -52
- package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -1
- package/build/main//321/201omponents/Calendar/types.d.ts +16 -3
- 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 +211 -47
- package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
- package/build/main//321/201omponents/Chip/types.d.ts +15 -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 +68 -27
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
- package/build/main//321/201omponents/ContextMenu/types.d.ts +14 -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.d.ts +1 -1
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +55 -22
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -1
- package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +1 -1
- package/build/main//321/201omponents/CustomSelect/selectStyles.js +33 -26
- package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/CustomSelect/types.d.ts +21 -4
- 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 +12 -0
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js +41 -0
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js.map +1 -0
- package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +6 -5
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +2 -2
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -1
- 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 +92 -31
- package/build/main//321/201omponents/Input/Input.js.map +1 -1
- package/build/main//321/201omponents/Input/types.d.ts +13 -3
- package/build/main//321/201omponents/ListItem/ListItem.js +21 -10
- package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -1
- package/build/main//321/201omponents/ListItem/types.d.ts +8 -2
- package/build/main//321/201omponents/Modal/Modal.d.ts +3 -2
- package/build/main//321/201omponents/Modal/Modal.js +219 -81
- package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
- package/build/main//321/201omponents/Modal/types.d.ts +38 -2
- package/build/main//321/201omponents/Notification/Notification.d.ts +4 -6
- package/build/main//321/201omponents/Notification/Notification.js +88 -30
- package/build/main//321/201omponents/Notification/Notification.js.map +1 -1
- package/build/main//321/201omponents/Notification/types.d.ts +23 -5
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js +2 -2
- package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -1
- package/build/main//321/201omponents/Skeleton/Skeleton.js +1 -1
- package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -1
- package/build/main//321/201omponents/Stories/Stories.js +76 -8
- package/build/main//321/201omponents/Stories/Stories.js.map +1 -1
- package/build/main//321/201omponents/Textarea/Textarea.d.ts +1 -1
- package/build/main//321/201omponents/Textarea/Textarea.js +2 -2
- package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -1
- package/build/main//321/201omponents/Textarea/types.d.ts +2 -2
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +1 -1
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +12 -3
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +23 -13
- 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 +37 -60
- 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 -38
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/Option/Option.js +18 -13
- package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +1 -1
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +6 -9
- package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +3 -3
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +245 -266
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/components/Delimiter.d.ts +8 -0
- package/build/main//321/201omponents/UserDropdown/components/Delimiter.js +10 -0
- package/build/main//321/201omponents/UserDropdown/components/Delimiter.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Hint.d.ts +6 -0
- package/build/main//321/201omponents/UserDropdown/components/Hint.js +21 -0
- package/build/main//321/201omponents/UserDropdown/components/Hint.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Input.d.ts +2 -0
- package/build/main//321/201omponents/UserDropdown/components/Input.js +24 -0
- package/build/main//321/201omponents/UserDropdown/components/Input.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Mask.d.ts +8 -0
- package/build/main//321/201omponents/UserDropdown/components/Mask.js +19 -0
- package/build/main//321/201omponents/UserDropdown/components/Mask.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/components/Title.d.ts +5 -0
- package/build/main//321/201omponents/UserDropdown/components/Title.js +18 -0
- package/build/main//321/201omponents/UserDropdown/components/Title.js.map +1 -0
- package/build/main//321/201omponents/UserDropdown/constants.d.ts +57 -0
- package/build/main//321/201omponents/UserDropdown/constants.js +73 -0
- package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/helpers.d.ts +84 -41
- package/build/main//321/201omponents/UserDropdown/helpers.js +184 -14
- 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 +58 -27
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/types.d.ts +146 -62
- package/build/main//321/201omponents/UserDropdown/types.js +1 -8
- package/build/main//321/201omponents/UserDropdown/types.js.map +1 -1
- package/package.json +13 -8
- 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,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,23 +26,31 @@ 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
|
-
type TData = ILanguageProps & {
|
|
53
|
+
type TData = Required<IPlatformProps> & ILanguageProps & {
|
|
43
54
|
label: string;
|
|
44
55
|
avatar: string | null;
|
|
45
56
|
email: string;
|
|
@@ -48,7 +59,9 @@ type TData = ILanguageProps & {
|
|
|
48
59
|
department: string | null;
|
|
49
60
|
companyPosition: string | null;
|
|
50
61
|
isMyContacts: boolean;
|
|
51
|
-
|
|
62
|
+
isLocalContact: boolean;
|
|
63
|
+
isCachedContact: boolean;
|
|
64
|
+
isAlreadyAdded: boolean;
|
|
52
65
|
fontFamily: string;
|
|
53
66
|
setIsSearchable: (isSearchable: boolean) => void;
|
|
54
67
|
setModalData: (modalData: TModalData | null) => void;
|
|
@@ -56,12 +69,14 @@ type TData = ILanguageProps & {
|
|
|
56
69
|
uid?: string;
|
|
57
70
|
};
|
|
58
71
|
export interface IOptionProps extends OptionProps {
|
|
72
|
+
isMenuShadowless: boolean;
|
|
59
73
|
data: TData;
|
|
60
74
|
}
|
|
61
75
|
export interface ISearchInCatalogButtonProps {
|
|
62
76
|
width?: number;
|
|
63
77
|
language: string;
|
|
64
78
|
isOnlyButtonInList?: boolean;
|
|
79
|
+
isMenuShadowless?: boolean;
|
|
65
80
|
noOptionText?: string | null;
|
|
66
81
|
onShowCatalogSearchButtonClick?: () => void;
|
|
67
82
|
}
|
|
@@ -90,36 +105,80 @@ export type TGenerateCorporateOptionsToSelect = TGenerateCommonOption & {
|
|
|
90
105
|
setIsSearchable: (isSearchable: boolean) => void;
|
|
91
106
|
setModalData: (modalData: TModalData | null) => void;
|
|
92
107
|
};
|
|
108
|
+
type TMyContactsEntriesOption = TMyContactsEntries & {
|
|
109
|
+
contacts?: Omit<TContacts, 'userKind'>[];
|
|
110
|
+
};
|
|
93
111
|
export type TGenerateContactsOption = TGenerateCommonOption & {
|
|
94
|
-
option:
|
|
112
|
+
option: TMyContactsEntriesOption | TLocalEntity;
|
|
113
|
+
isMyContacts?: boolean;
|
|
114
|
+
isLocalContact?: boolean;
|
|
95
115
|
};
|
|
96
116
|
export type TGenerateContactsOptionsToSelect = TGenerateCommonOption & {
|
|
97
|
-
options:
|
|
117
|
+
options: TMyContactsEntriesOption[] | TLocalEntity[];
|
|
118
|
+
isMyContacts?: boolean;
|
|
119
|
+
isLocalContact?: boolean;
|
|
98
120
|
};
|
|
99
121
|
export type TGenerateEnteredByUserOption = TGenerateCommonOption & {
|
|
100
122
|
email: string;
|
|
101
123
|
};
|
|
124
|
+
export type TCollapseChips = {
|
|
125
|
+
userDropdownId: string;
|
|
126
|
+
maxRowsCountToCollapseChips: number;
|
|
127
|
+
maskWidth: number;
|
|
128
|
+
suffixWidth: number;
|
|
129
|
+
chips: HTMLDivElement[];
|
|
130
|
+
};
|
|
131
|
+
export type TApplyFilteringToOption = {
|
|
132
|
+
isFilteringDisabled: boolean;
|
|
133
|
+
isSelectedOptionsHidden: boolean;
|
|
134
|
+
inputValue: string;
|
|
135
|
+
data: MultiOptionType;
|
|
136
|
+
selectedUsers: readonly MultiOptionType[];
|
|
137
|
+
};
|
|
102
138
|
export type TSelectStyles = {
|
|
103
139
|
isChipsVisible: boolean;
|
|
104
140
|
isMaxMembersAdded: boolean;
|
|
105
141
|
isDisabled: boolean;
|
|
106
142
|
isError: boolean;
|
|
143
|
+
isInputPlaceholderVisible: boolean;
|
|
107
144
|
lastRowNumber: number;
|
|
108
145
|
paddingLeft: string;
|
|
146
|
+
paddingRight: string;
|
|
109
147
|
platform: string;
|
|
110
148
|
layoutType: string;
|
|
111
149
|
isInputHidden: boolean;
|
|
112
150
|
isDisabledMenuOffsetAtFullscreen: boolean;
|
|
151
|
+
isInputFocused?: boolean;
|
|
113
152
|
isMaskRepresented: boolean;
|
|
153
|
+
isSuffixRepresented: boolean;
|
|
154
|
+
isMenuShadowless: boolean;
|
|
155
|
+
isShowCatalogSearchButton: boolean;
|
|
114
156
|
fontFamilyStyle: TFontFamilyStyle;
|
|
115
157
|
containerPadding?: string;
|
|
158
|
+
isDraggable?: boolean;
|
|
159
|
+
isChipsCollapsed?: boolean;
|
|
160
|
+
menuListMaxHeight: number;
|
|
161
|
+
maxRowsCountToCollapseChips: number;
|
|
116
162
|
};
|
|
117
163
|
export type TGenerateNoOptionsMessage = {
|
|
118
164
|
inputValue: string;
|
|
119
165
|
};
|
|
120
|
-
export type
|
|
166
|
+
export type TOptionData = {
|
|
121
167
|
data: MultiOptionType;
|
|
122
168
|
};
|
|
169
|
+
export type TCheckIsContainsValue = {
|
|
170
|
+
label: string;
|
|
171
|
+
email: string;
|
|
172
|
+
value: string;
|
|
173
|
+
};
|
|
174
|
+
export type TAdditionalInfo = {
|
|
175
|
+
action: string;
|
|
176
|
+
prevInputValue: string;
|
|
177
|
+
};
|
|
178
|
+
export type TCorporateContacts = {
|
|
179
|
+
corporateContacts: TCorporateEntity[];
|
|
180
|
+
corporateContactsSet: Set<string>;
|
|
181
|
+
};
|
|
123
182
|
export type TSelectProps = {
|
|
124
183
|
options: MultiOptionType[];
|
|
125
184
|
inputValue: string;
|
|
@@ -145,39 +204,37 @@ export interface MultiOptionType {
|
|
|
145
204
|
isMyContacts?: boolean;
|
|
146
205
|
isEnteredByUser?: boolean;
|
|
147
206
|
isNotRemovable?: boolean;
|
|
207
|
+
isAlreadyAdded?: boolean;
|
|
148
208
|
}
|
|
149
|
-
|
|
209
|
+
type TContactEntity = {
|
|
210
|
+
isLoading?: boolean;
|
|
211
|
+
isWarning?: boolean;
|
|
150
212
|
isBusyAtSelectedTime?: boolean;
|
|
151
213
|
isPrivateSchedule?: boolean;
|
|
152
214
|
isNotRemovable?: boolean;
|
|
153
|
-
|
|
215
|
+
isOrganizerShort?: boolean;
|
|
216
|
+
isResetChipsToInputValue?: boolean;
|
|
217
|
+
isAlreadyAdded?: boolean;
|
|
218
|
+
uid?: string;
|
|
219
|
+
userType?: CONTACT_TYPES;
|
|
220
|
+
organizerName?: string | null;
|
|
221
|
+
contextMenuItems?: MenuItem[];
|
|
222
|
+
styles?: TStyles;
|
|
223
|
+
};
|
|
224
|
+
export type TMyContactsEntries = TContactEntity & {
|
|
154
225
|
name: string | null;
|
|
155
226
|
email: string;
|
|
156
227
|
avatar: string | null;
|
|
157
|
-
isLoading?: boolean;
|
|
158
|
-
userType?: CONTACT_TYPES;
|
|
159
|
-
isWarning?: boolean;
|
|
160
|
-
uid?: string;
|
|
161
|
-
isResetChipsToInputValue?: boolean;
|
|
162
|
-
contextMenuItems?: MenuItem[];
|
|
163
228
|
};
|
|
164
229
|
type TContacts = {
|
|
165
230
|
userHuid: string;
|
|
166
231
|
contact: string;
|
|
167
232
|
contactType: string;
|
|
233
|
+
userKind?: string;
|
|
168
234
|
};
|
|
169
|
-
export type TCorporateEntity = {
|
|
170
|
-
|
|
171
|
-
isPrivateSchedule?: boolean;
|
|
172
|
-
isNotRemovable?: boolean;
|
|
173
|
-
isOrganizer?: boolean;
|
|
235
|
+
export type TCorporateEntity = TContactEntity & {
|
|
236
|
+
isCachedContact?: boolean;
|
|
174
237
|
avatar: string | null;
|
|
175
|
-
uid?: string;
|
|
176
|
-
isResetChipsToInputValue?: boolean;
|
|
177
|
-
contextMenuItems?: MenuItem[];
|
|
178
|
-
userType?: CONTACT_TYPES;
|
|
179
|
-
isLoading?: boolean;
|
|
180
|
-
isWarning?: boolean;
|
|
181
238
|
name: string;
|
|
182
239
|
email: string | null;
|
|
183
240
|
serverName: string | null;
|
|
@@ -186,27 +243,58 @@ export type TCorporateEntity = {
|
|
|
186
243
|
companyPosition: string | null;
|
|
187
244
|
contacts: TContacts[];
|
|
188
245
|
};
|
|
189
|
-
type
|
|
246
|
+
export type TLocalEntity = TContactEntity & {
|
|
247
|
+
avatar: string | null;
|
|
248
|
+
name: string | null;
|
|
249
|
+
email: string | null;
|
|
250
|
+
contacts: Omit<TContacts, 'userHuid'>[];
|
|
251
|
+
};
|
|
252
|
+
export type TCorporateEntries = {
|
|
190
253
|
corpPhonebookEntries: TCorporateEntity[];
|
|
191
254
|
trustSearchEntries: TCorporateEntity[];
|
|
255
|
+
cachedSearchEntries: TCorporateEntity[];
|
|
256
|
+
localPhonebookEntries?: TLocalEntity[];
|
|
192
257
|
};
|
|
193
|
-
export type TUser = TCorporateEntity | TMyContactsEntries | {
|
|
258
|
+
export type TUser = TCorporateEntity | TLocalEntity | TMyContactsEntries | (TContactEntity & {
|
|
194
259
|
email: string;
|
|
195
260
|
name?: string | null;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
261
|
+
isLocalContact?: boolean;
|
|
262
|
+
});
|
|
263
|
+
export type TFocusHandle = {
|
|
264
|
+
focus: () => void;
|
|
265
|
+
blur: () => void;
|
|
266
|
+
};
|
|
267
|
+
export type TQueryVariants = {
|
|
268
|
+
origin: string;
|
|
269
|
+
translit: string;
|
|
270
|
+
toEng: string;
|
|
271
|
+
fromEng: string;
|
|
206
272
|
};
|
|
273
|
+
export type TContactMatchScore = {
|
|
274
|
+
emailScore: number;
|
|
275
|
+
nameScore: number;
|
|
276
|
+
originalName: string;
|
|
277
|
+
};
|
|
278
|
+
export type TMatchers = {
|
|
279
|
+
startsWith: (text: string) => boolean;
|
|
280
|
+
includes: (text: string) => boolean;
|
|
281
|
+
anyWordStartsWith: (text: string) => boolean;
|
|
282
|
+
};
|
|
283
|
+
export type TRetrieveFilteredContacts = {
|
|
284
|
+
query: string;
|
|
285
|
+
corporateEntries: TCorporateEntries | null;
|
|
286
|
+
myContactsEntries: TMyContactsEntries[] | null;
|
|
287
|
+
checkIsEmailToExclude: (email: string | null) => boolean;
|
|
288
|
+
};
|
|
289
|
+
export type TDragUser = {
|
|
290
|
+
avatar: string;
|
|
291
|
+
label: string;
|
|
292
|
+
dropdownId?: string;
|
|
293
|
+
} & TUser;
|
|
207
294
|
export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IFontFamilyProps, ILanguageProps {
|
|
208
295
|
isDisabled?: boolean;
|
|
209
296
|
isLoading?: boolean;
|
|
297
|
+
isError?: boolean;
|
|
210
298
|
isChipsOutline?: boolean;
|
|
211
299
|
isChipsVisible?: boolean;
|
|
212
300
|
isChipsCollapsable?: boolean;
|
|
@@ -217,53 +305,49 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
|
|
|
217
305
|
isBackspaceChipToInput?: boolean;
|
|
218
306
|
isInputHidden?: boolean;
|
|
219
307
|
isDisabledMenuOffsetAtFullscreen?: boolean;
|
|
308
|
+
isDisabledCheckUniqueEmails?: boolean;
|
|
309
|
+
isMenuShadowless?: boolean;
|
|
310
|
+
isStateless?: boolean;
|
|
311
|
+
isSelectedOptionsHidden?: boolean;
|
|
312
|
+
isMaskHiddenOnFocus?: boolean;
|
|
220
313
|
hasNextPage?: boolean;
|
|
221
314
|
isNextPageLoading?: boolean;
|
|
315
|
+
isInputValueClearedOnBlur?: boolean;
|
|
222
316
|
title?: string;
|
|
223
|
-
|
|
317
|
+
contactInfoTitle?: string;
|
|
318
|
+
mask?: ReactNode;
|
|
319
|
+
suffix?: ReactNode;
|
|
224
320
|
placeholder?: string;
|
|
321
|
+
focusPlaceholder?: string;
|
|
225
322
|
hint?: ReactElement | string;
|
|
226
323
|
noOptionsMessage?: string;
|
|
227
324
|
maxMembersCount?: number;
|
|
325
|
+
skeletonRowsCount?: number;
|
|
326
|
+
maxRowsCountToCollapseChips?: number;
|
|
327
|
+
menuListMaxHeight?: number;
|
|
228
328
|
menuPosition?: 'bottom' | 'auto' | 'top';
|
|
329
|
+
menuLocation?: 'absolute' | 'fixed';
|
|
330
|
+
menuPortalTarget?: RefObject<HTMLDivElement | null>;
|
|
229
331
|
autoFocus?: boolean;
|
|
230
332
|
externalInputValue?: string;
|
|
231
333
|
containerClassName?: string;
|
|
334
|
+
charHintClassName?: string;
|
|
232
335
|
containerPadding?: string;
|
|
233
336
|
containerStyles?: TStyles;
|
|
234
337
|
selectedEntries?: TUser[];
|
|
235
338
|
corporateEntries: TCorporateEntries | null;
|
|
236
339
|
myContactsEntries: TMyContactsEntries[] | null;
|
|
237
340
|
emailsToExclude?: string[];
|
|
341
|
+
userDropdownId?: string;
|
|
342
|
+
focusRef?: RefObject<TFocusHandle | null>;
|
|
238
343
|
onInputChange: (inputValue: string) => void;
|
|
344
|
+
onImmediateInputChange?: (inputValue: string) => void;
|
|
239
345
|
onChange: (users: TUser[]) => void;
|
|
240
346
|
onMenuOpen?: () => void;
|
|
241
347
|
onMenuClose?: () => void;
|
|
242
348
|
onLoadNextPage?: (inputValue: string) => void;
|
|
243
349
|
onShowCatalogSearchButtonClick?: () => void;
|
|
350
|
+
onClickContactInfoCopyEmail?: () => void;
|
|
351
|
+
onFocus?: () => void;
|
|
244
352
|
}
|
|
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
353
|
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":""}
|
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.210",
|
|
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
|
-
"
|
|
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": "
|
|
27
|
-
"react-draggable": "
|
|
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,10 +41,12 @@
|
|
|
36
41
|
"react-window": "^1.8.10",
|
|
37
42
|
"reactjs-popup": "^2.0.5",
|
|
38
43
|
"styled-components": "^6.1.11",
|
|
39
|
-
"transliteration": "
|
|
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",
|
|
49
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
43
50
|
"juice/cheerio": "1.0.0-rc.12"
|
|
44
51
|
},
|
|
45
52
|
"scripts": {
|
|
@@ -102,7 +109,7 @@
|
|
|
102
109
|
"@storybook/react-webpack5": "^8.5.1",
|
|
103
110
|
"@storybook/test": "^8.5.1",
|
|
104
111
|
"@svgr/webpack": "^8.1.0",
|
|
105
|
-
"@testing-library/jest-dom": "
|
|
112
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
106
113
|
"@types/color": "^3.0.6",
|
|
107
114
|
"@types/convert-layout": "^0.5.3",
|
|
108
115
|
"@types/dompurify": "^3.0.5",
|
|
@@ -112,7 +119,6 @@
|
|
|
112
119
|
"@types/node": "^16.18.11",
|
|
113
120
|
"@types/react": "^19.0.2",
|
|
114
121
|
"@types/react-beautiful-dnd": "^13.1.4",
|
|
115
|
-
"@types/react-datepicker": "^4.8.0",
|
|
116
122
|
"@types/react-dom": "^18.0.10",
|
|
117
123
|
"@types/react-slick": "^0.23.10",
|
|
118
124
|
"@types/react-virtualized": "^9.21.30",
|
|
@@ -120,7 +126,6 @@
|
|
|
120
126
|
"@types/uuid": "^9.0.8",
|
|
121
127
|
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
122
128
|
"@typescript-eslint/parser": "^6.6.0",
|
|
123
|
-
"alex.chus-react-spring-bottom-sheet": "^0.0.2",
|
|
124
129
|
"animate.css": "^4.1.1",
|
|
125
130
|
"babel-jest": "^18.0.0",
|
|
126
131
|
"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"}
|