@expressms/smartapp-ui 3.0.0-alpha.99 → 3.0.0
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/README.md +1 -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/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/mail.svg +2 -2
- 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-info-filled.svg +1 -1
- 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/remove.svg +3 -0
- package/build/main/assets/icons/search.svg +1 -1
- 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 +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 +20 -7
- package/build/main/constants/constants.js +21 -4
- package/build/main/constants/constants.js.map +1 -1
- package/build/main/constants/types.d.ts +5 -2
- package/build/main/helpers/fontScale.d.ts +3 -0
- package/build/main/helpers/fontScale.js +15 -0
- package/build/main/helpers/fontScale.js.map +1 -0
- package/build/main/helpers/index.d.ts +11 -10
- package/build/main/helpers/index.js +24 -6
- package/build/main/helpers/index.js.map +1 -1
- package/build/main/hooks/useCharHintDisplay.d.ts +2 -1
- package/build/main/hooks/useCharHintDisplay.js +28 -6
- package/build/main/hooks/useCharHintDisplay.js.map +1 -1
- package/build/main/hooks/useFontScale.d.ts +1 -0
- package/build/main/hooks/useFontScale.js +29 -0
- package/build/main/hooks/useFontScale.js.map +1 -0
- package/build/main/hooks/useMobileLongTap.d.ts +1 -1
- package/build/main/hooks/useMobileLongTap.js +12 -2
- package/build/main/hooks/useMobileLongTap.js.map +1 -1
- package/build/main/hooks/useModal.d.ts +6 -5
- package/build/main/hooks/useModal.js +79 -25
- package/build/main/hooks/useModal.js.map +1 -1
- package/build/main/index.d.ts +2 -2
- package/build/main/index.js +2 -2
- package/build/main/index.js.map +1 -1
- package/build/main/styles/styles.scss +2 -2
- package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +2 -1
- package/build/main//321/201omponents/ActionModal/ActionModal.js +4 -1
- package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -1
- package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +2 -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 +1 -1
- package/build/main//321/201omponents/Avatar/Avatar.js +16 -13
- package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -1
- package/build/main//321/201omponents/Avatar/types.d.ts +5 -2
- 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 +2 -1
- package/build/main//321/201omponents/Button/Button.js +9 -9
- package/build/main//321/201omponents/Button/Button.js.map +1 -1
- package/build/main//321/201omponents/Button/types.d.ts +1 -0
- package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +2 -1
- package/build/main//321/201omponents/Calendar/Calendar.d.ts +14 -1
- package/build/main//321/201omponents/Calendar/Calendar.js +179 -33
- package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -1
- package/build/main//321/201omponents/Calendar/types.d.ts +5 -1
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +2 -1
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +7 -5
- package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -1
- package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +2 -1
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +2 -1
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +10 -7
- package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -1
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +2 -1
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +7 -5
- package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -1
- package/build/main//321/201omponents/Charts/constants.d.ts +1 -1
- package/build/main//321/201omponents/Charts/constants.js +4 -3
- package/build/main//321/201omponents/Charts/constants.js.map +1 -1
- package/build/main//321/201omponents/Charts/helpers.d.ts +1 -1
- package/build/main//321/201omponents/Charts/helpers.js +3 -2
- package/build/main//321/201omponents/Charts/helpers.js.map +1 -1
- package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +2 -1
- package/build/main//321/201omponents/Chip/Chip.d.ts +1 -1
- package/build/main//321/201omponents/Chip/Chip.js +67 -28
- package/build/main//321/201omponents/Chip/Chip.js.map +1 -1
- package/build/main//321/201omponents/Chip/types.d.ts +4 -0
- package/build/main//321/201omponents/ChipDndContext/ChipDndContext.d.ts +2 -2
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +2 -1
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +3 -0
- package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -1
- package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +2 -1
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js +13 -12
- package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -1
- package/build/main//321/201omponents/ContextMenu/types.d.ts +6 -1
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.d.ts +2 -1
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js +9 -7
- package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js.map +1 -1
- package/build/main//321/201omponents/ContextMenuItem/types.d.ts +5 -1
- package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +1 -1
- package/build/main//321/201omponents/CustomSelect/CustomSelect.js +51 -19
- 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 +24 -15
- package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/CustomSelect/types.d.ts +15 -4
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +2 -1
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +7 -7
- package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -1
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.d.ts +2 -1
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js +9 -5
- package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +2 -0
- package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +2 -1
- 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 +2 -1
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +15 -12
- package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -1
- package/build/main//321/201omponents/DraggablePopup/types.d.ts +2 -0
- package/build/main//321/201omponents/Error/Error.d.ts +2 -1
- package/build/main//321/201omponents/Flex/Flex.d.ts +2 -1
- package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +2 -1
- package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +2 -1
- package/build/main//321/201omponents/Header/Header.d.ts +2 -1
- package/build/main//321/201omponents/Input/Input.d.ts +2 -1
- package/build/main//321/201omponents/Input/Input.js +53 -22
- package/build/main//321/201omponents/Input/Input.js.map +1 -1
- package/build/main//321/201omponents/Input/types.d.ts +3 -0
- package/build/main//321/201omponents/ListItem/ListItem.d.ts +2 -1
- package/build/main//321/201omponents/ListItem/ListItem.js +7 -5
- package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -1
- package/build/main//321/201omponents/ListItem/types.d.ts +3 -2
- package/build/main//321/201omponents/Loader/Loader.d.ts +2 -1
- package/build/main//321/201omponents/Loader/Loader.js +3 -3
- package/build/main//321/201omponents/Loader/Loader.js.map +1 -1
- package/build/main//321/201omponents/Modal/Modal.d.ts +2 -1
- package/build/main//321/201omponents/Modal/Modal.js +191 -111
- package/build/main//321/201omponents/Modal/Modal.js.map +1 -1
- package/build/main//321/201omponents/Modal/types.d.ts +14 -3
- package/build/main//321/201omponents/Notification/Notification.d.ts +3 -4
- package/build/main//321/201omponents/Notification/Notification.js +36 -70
- package/build/main//321/201omponents/Notification/Notification.js.map +1 -1
- package/build/main//321/201omponents/Notification/constants.d.ts +34 -0
- package/build/main//321/201omponents/Notification/constants.js +59 -0
- package/build/main//321/201omponents/Notification/constants.js.map +1 -0
- package/build/main//321/201omponents/Notification/types.d.ts +22 -17
- package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +2 -1
- package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +2 -1
- package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +2 -1
- 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.d.ts +2 -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.d.ts +2 -1
- package/build/main//321/201omponents/Stories/Stories.js +4 -4
- package/build/main//321/201omponents/Stories/Stories.js.map +1 -1
- package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +2 -1
- package/build/main//321/201omponents/Textarea/Textarea.d.ts +2 -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/Toggle/Toggle.d.ts +2 -1
- package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +2 -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.d.ts +2 -1
- package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +34 -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/MenuList/MenuList.d.ts +2 -1
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +20 -15
- package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +1 -1
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +5 -5
- package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +2 -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 +2 -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 +1 -2
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js +150 -275
- package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/components/Delimiter.d.ts +9 -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 +3 -0
- package/build/main//321/201omponents/UserDropdown/components/Input.js +32 -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 +6 -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 +45 -20
- package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -1
- package/build/main//321/201omponents/UserDropdown/types.d.ts +123 -69
- package/build/main//321/201omponents/UserDropdown/types.js +1 -8
- package/build/main//321/201omponents/UserDropdown/types.js.map +1 -1
- package/package.json +5 -5
- package/build/main/assets/icons/logout.svg +0 -4
- package/build/main/assets/icons/plus.svg +0 -4
- package/build/main/assets/icons/unread-mails.svg +0 -4
- package/build/main//321/201omponents/Profile/Profile.d.ts +0 -4
- package/build/main//321/201omponents/Profile/Profile.js +0 -42
- package/build/main//321/201omponents/Profile/Profile.js.map +0 -1
- package/build/main//321/201omponents/Profile/index.d.ts +0 -1
- package/build/main//321/201omponents/Profile/index.js +0 -2
- package/build/main//321/201omponents/Profile/index.js.map +0 -1
- package/build/main//321/201omponents/Profile/types.d.ts +0 -14
- package/build/main//321/201omponents/Profile/types.js +0 -2
- package/build/main//321/201omponents/Profile/types.js.map +0 -1
- package/build/main//321/201omponents/Switcher/Switcher.d.ts +0 -4
- package/build/main//321/201omponents/Switcher/Switcher.js +0 -34
- package/build/main//321/201omponents/Switcher/Switcher.js.map +0 -1
- package/build/main//321/201omponents/Switcher/index.d.ts +0 -1
- package/build/main//321/201omponents/Switcher/index.js +0 -2
- package/build/main//321/201omponents/Switcher/index.js.map +0 -1
- package/build/main//321/201omponents/Switcher/types.d.ts +0 -8
- package/build/main//321/201omponents/Switcher/types.js +0 -2
- package/build/main//321/201omponents/Switcher/types.js.map +0 -1
|
@@ -5,6 +5,7 @@ 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,6 +26,7 @@ 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 {
|
|
28
32
|
isMenuShadowless?: boolean;
|
|
@@ -32,7 +36,9 @@ export interface IMenuListProps extends MenuListProps {
|
|
|
32
36
|
selectRef: RefObject<any>;
|
|
33
37
|
scrollFromTop: RefObject<number>;
|
|
34
38
|
language: string;
|
|
39
|
+
platform: string;
|
|
35
40
|
menuListMaxHeight: number;
|
|
41
|
+
charHintClassName: string;
|
|
36
42
|
hasNextPage: boolean;
|
|
37
43
|
isLoading: boolean;
|
|
38
44
|
isUserTyping: boolean;
|
|
@@ -44,7 +50,7 @@ export interface IMenuListProps extends MenuListProps {
|
|
|
44
50
|
onShowCatalogSearchButtonClick?: () => void;
|
|
45
51
|
setIsDelimiterVisible: Dispatch<SetStateAction<boolean>>;
|
|
46
52
|
}
|
|
47
|
-
type TData = ILanguageProps & {
|
|
53
|
+
type TData = Required<IPlatformProps> & ILanguageProps & {
|
|
48
54
|
label: string;
|
|
49
55
|
avatar: string | null;
|
|
50
56
|
email: string;
|
|
@@ -53,7 +59,9 @@ type TData = ILanguageProps & {
|
|
|
53
59
|
department: string | null;
|
|
54
60
|
companyPosition: string | null;
|
|
55
61
|
isMyContacts: boolean;
|
|
56
|
-
|
|
62
|
+
isLocalContact: boolean;
|
|
63
|
+
isCachedContact: boolean;
|
|
64
|
+
isAlreadyAdded: boolean;
|
|
57
65
|
fontFamily: string;
|
|
58
66
|
setIsSearchable: (isSearchable: boolean) => void;
|
|
59
67
|
setModalData: (modalData: TModalData | null) => void;
|
|
@@ -68,6 +76,7 @@ export interface ISearchInCatalogButtonProps {
|
|
|
68
76
|
width?: number;
|
|
69
77
|
language: string;
|
|
70
78
|
isOnlyButtonInList?: boolean;
|
|
79
|
+
isMenuShadowless?: boolean;
|
|
71
80
|
noOptionText?: string | null;
|
|
72
81
|
onShowCatalogSearchButtonClick?: () => void;
|
|
73
82
|
}
|
|
@@ -96,19 +105,42 @@ export type TGenerateCorporateOptionsToSelect = TGenerateCommonOption & {
|
|
|
96
105
|
setIsSearchable: (isSearchable: boolean) => void;
|
|
97
106
|
setModalData: (modalData: TModalData | null) => void;
|
|
98
107
|
};
|
|
108
|
+
type TMyContactsEntriesOption = TMyContactsEntries & {
|
|
109
|
+
contacts?: Omit<TContacts, 'userKind'>[];
|
|
110
|
+
};
|
|
99
111
|
export type TGenerateContactsOption = TGenerateCommonOption & {
|
|
100
|
-
option:
|
|
112
|
+
option: TMyContactsEntriesOption | TLocalEntity;
|
|
113
|
+
isMyContacts?: boolean;
|
|
114
|
+
isLocalContact?: boolean;
|
|
101
115
|
};
|
|
102
116
|
export type TGenerateContactsOptionsToSelect = TGenerateCommonOption & {
|
|
103
|
-
options:
|
|
117
|
+
options: TMyContactsEntriesOption[] | TLocalEntity[];
|
|
118
|
+
isMyContacts?: boolean;
|
|
119
|
+
isLocalContact?: boolean;
|
|
104
120
|
};
|
|
105
121
|
export type TGenerateEnteredByUserOption = TGenerateCommonOption & {
|
|
106
122
|
email: string;
|
|
107
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
|
+
};
|
|
108
138
|
export type TSelectStyles = {
|
|
109
139
|
isChipsVisible: boolean;
|
|
110
140
|
isMaxMembersAdded: boolean;
|
|
111
141
|
isDisabled: boolean;
|
|
142
|
+
isError: boolean;
|
|
143
|
+
isInputPlaceholderVisible: boolean;
|
|
112
144
|
lastRowNumber: number;
|
|
113
145
|
paddingLeft: string;
|
|
114
146
|
paddingRight: string;
|
|
@@ -120,18 +152,33 @@ export type TSelectStyles = {
|
|
|
120
152
|
isMaskRepresented: boolean;
|
|
121
153
|
isSuffixRepresented: boolean;
|
|
122
154
|
isMenuShadowless: boolean;
|
|
155
|
+
isShowCatalogSearchButton: boolean;
|
|
123
156
|
fontFamilyStyle: TFontFamilyStyle;
|
|
124
157
|
containerPadding?: string;
|
|
125
158
|
isDraggable?: boolean;
|
|
126
159
|
isChipsCollapsed?: boolean;
|
|
127
160
|
menuListMaxHeight: number;
|
|
161
|
+
maxRowsCountToCollapseChips: number;
|
|
128
162
|
};
|
|
129
163
|
export type TGenerateNoOptionsMessage = {
|
|
130
164
|
inputValue: string;
|
|
131
165
|
};
|
|
132
|
-
export type
|
|
166
|
+
export type TOptionData = {
|
|
133
167
|
data: MultiOptionType;
|
|
134
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
|
+
};
|
|
135
182
|
export type TSelectProps = {
|
|
136
183
|
options: MultiOptionType[];
|
|
137
184
|
inputValue: string;
|
|
@@ -157,42 +204,38 @@ export interface MultiOptionType {
|
|
|
157
204
|
isMyContacts?: boolean;
|
|
158
205
|
isEnteredByUser?: boolean;
|
|
159
206
|
isNotRemovable?: boolean;
|
|
207
|
+
isAlreadyAdded?: boolean;
|
|
160
208
|
}
|
|
161
|
-
|
|
209
|
+
type TContactEntity = {
|
|
210
|
+
isLoading?: boolean;
|
|
211
|
+
isWarning?: boolean;
|
|
162
212
|
isBusyAtSelectedTime?: boolean;
|
|
163
213
|
isPrivateSchedule?: boolean;
|
|
164
214
|
isNotRemovable?: boolean;
|
|
165
215
|
isOrganizerShort?: boolean;
|
|
166
|
-
|
|
216
|
+
isResetChipsToInputValue?: boolean;
|
|
217
|
+
isAlreadyAdded?: boolean;
|
|
218
|
+
uid?: string;
|
|
219
|
+
userType?: CONTACT_TYPES;
|
|
167
220
|
organizerName?: string | null;
|
|
221
|
+
contextMenuItems?: MenuItem[];
|
|
222
|
+
styles?: TStyles;
|
|
223
|
+
};
|
|
224
|
+
export type TMyContactsEntries = TContactEntity & {
|
|
225
|
+
name: string | null;
|
|
168
226
|
email: string;
|
|
169
227
|
avatar: string | null;
|
|
170
|
-
isLoading?: boolean;
|
|
171
|
-
userType?: CONTACT_TYPES;
|
|
172
|
-
isWarning?: boolean;
|
|
173
|
-
uid?: string;
|
|
174
|
-
isResetChipsToInputValue?: boolean;
|
|
175
|
-
contextMenuItems?: MenuItem[];
|
|
176
228
|
};
|
|
177
229
|
type TContacts = {
|
|
178
230
|
userHuid: string;
|
|
179
231
|
contact: string;
|
|
180
232
|
contactType: string;
|
|
233
|
+
userKind?: string;
|
|
181
234
|
};
|
|
182
|
-
export type TCorporateEntity = {
|
|
183
|
-
|
|
184
|
-
isPrivateSchedule?: boolean;
|
|
185
|
-
isNotRemovable?: boolean;
|
|
186
|
-
isOrganizerShort?: boolean;
|
|
235
|
+
export type TCorporateEntity = TContactEntity & {
|
|
236
|
+
isCachedContact?: boolean;
|
|
187
237
|
avatar: string | null;
|
|
188
|
-
uid?: string;
|
|
189
|
-
isResetChipsToInputValue?: boolean;
|
|
190
|
-
contextMenuItems?: MenuItem[];
|
|
191
|
-
userType?: CONTACT_TYPES;
|
|
192
|
-
isLoading?: boolean;
|
|
193
|
-
isWarning?: boolean;
|
|
194
238
|
name: string;
|
|
195
|
-
organizerName?: string | null;
|
|
196
239
|
email: string | null;
|
|
197
240
|
serverName: string | null;
|
|
198
241
|
company: string | null;
|
|
@@ -200,36 +243,63 @@ export type TCorporateEntity = {
|
|
|
200
243
|
companyPosition: string | null;
|
|
201
244
|
contacts: TContacts[];
|
|
202
245
|
};
|
|
203
|
-
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 = {
|
|
204
253
|
corpPhonebookEntries: TCorporateEntity[];
|
|
205
254
|
trustSearchEntries: TCorporateEntity[];
|
|
255
|
+
cachedSearchEntries: TCorporateEntity[];
|
|
256
|
+
localPhonebookEntries?: TLocalEntity[];
|
|
206
257
|
};
|
|
207
|
-
export type TUser = TCorporateEntity | TMyContactsEntries | {
|
|
208
|
-
isBusyAtSelectedTime?: boolean;
|
|
209
|
-
isResetChipsToInputValue?: boolean;
|
|
210
|
-
isPrivateSchedule?: boolean;
|
|
211
|
-
isNotRemovable?: boolean;
|
|
212
|
-
isOrganizerShort?: boolean;
|
|
213
|
-
isWarning?: boolean;
|
|
214
|
-
isLoading?: boolean;
|
|
215
|
-
userType?: CONTACT_TYPES;
|
|
216
|
-
uid?: string;
|
|
258
|
+
export type TUser = TCorporateEntity | TLocalEntity | TMyContactsEntries | (TContactEntity & {
|
|
217
259
|
email: string;
|
|
218
260
|
name?: string | null;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
};
|
|
261
|
+
isLocalContact?: boolean;
|
|
262
|
+
});
|
|
222
263
|
export type TFocusHandle = {
|
|
223
264
|
focus: () => void;
|
|
224
265
|
blur: () => void;
|
|
225
266
|
};
|
|
267
|
+
export type TQueryVariants = {
|
|
268
|
+
origin: string;
|
|
269
|
+
translit: string;
|
|
270
|
+
toEng: string;
|
|
271
|
+
fromEng: string;
|
|
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;
|
|
226
294
|
export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IFontFamilyProps, ILanguageProps {
|
|
227
295
|
isDisabled?: boolean;
|
|
228
296
|
isLoading?: boolean;
|
|
297
|
+
isError?: boolean;
|
|
229
298
|
isChipsOutline?: boolean;
|
|
230
299
|
isChipsVisible?: boolean;
|
|
231
300
|
isChipsCollapsable?: boolean;
|
|
232
301
|
isSelectedChipHasTooltip?: boolean;
|
|
302
|
+
isMenuCloseOnBlur?: boolean;
|
|
233
303
|
isMenuCloseOnSelect?: boolean;
|
|
234
304
|
isFilteringDisabled?: boolean;
|
|
235
305
|
isShowCatalogSearchButton?: boolean;
|
|
@@ -238,23 +308,35 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
|
|
|
238
308
|
isDisabledMenuOffsetAtFullscreen?: boolean;
|
|
239
309
|
isDisabledCheckUniqueEmails?: boolean;
|
|
240
310
|
isMenuShadowless?: boolean;
|
|
311
|
+
isStateless?: boolean;
|
|
312
|
+
isSelectedOptionsHidden?: boolean;
|
|
313
|
+
isMaskHiddenOnFocus?: boolean;
|
|
241
314
|
hasNextPage?: boolean;
|
|
242
315
|
isNextPageLoading?: boolean;
|
|
316
|
+
isInputValueClearedOnBlur?: boolean;
|
|
317
|
+
isNotClickable?: boolean;
|
|
318
|
+
isConvertTextToChipOnBlur?: boolean;
|
|
243
319
|
title?: string;
|
|
244
|
-
|
|
320
|
+
contactInfoTitle?: string;
|
|
321
|
+
mask?: ReactNode;
|
|
245
322
|
suffix?: ReactNode;
|
|
246
323
|
placeholder?: string;
|
|
324
|
+
focusPlaceholder?: string;
|
|
247
325
|
hint?: ReactElement | string;
|
|
248
326
|
noOptionsMessage?: string;
|
|
249
327
|
maxMembersCount?: number;
|
|
250
328
|
skeletonRowsCount?: number;
|
|
329
|
+
maxRowsCountToCollapseChips?: number;
|
|
251
330
|
menuListMaxHeight?: number;
|
|
331
|
+
menuShouldScrollIntoView?: boolean;
|
|
252
332
|
menuPosition?: 'bottom' | 'auto' | 'top';
|
|
253
333
|
menuLocation?: 'absolute' | 'fixed';
|
|
254
334
|
menuPortalTarget?: RefObject<HTMLDivElement | null>;
|
|
255
335
|
autoFocus?: boolean;
|
|
256
336
|
externalInputValue?: string;
|
|
257
337
|
containerClassName?: string;
|
|
338
|
+
charHintClassName?: string;
|
|
339
|
+
noOptionsMessageClassName?: string;
|
|
258
340
|
containerPadding?: string;
|
|
259
341
|
containerStyles?: TStyles;
|
|
260
342
|
selectedEntries?: TUser[];
|
|
@@ -270,35 +352,7 @@ export interface IUserDropdownProps extends IPlatformProps, ILayoutTypeProps, IF
|
|
|
270
352
|
onMenuClose?: () => void;
|
|
271
353
|
onLoadNextPage?: (inputValue: string) => void;
|
|
272
354
|
onShowCatalogSearchButtonClick?: () => void;
|
|
355
|
+
onClickContactInfoCopyEmail?: () => void;
|
|
273
356
|
onFocus?: () => void;
|
|
274
357
|
}
|
|
275
|
-
export type TQueryVariants = {
|
|
276
|
-
origin: string;
|
|
277
|
-
translit: string;
|
|
278
|
-
toEng: string;
|
|
279
|
-
fromEng: string;
|
|
280
|
-
};
|
|
281
|
-
export type TContactMatchScore = {
|
|
282
|
-
emailScore: number;
|
|
283
|
-
nameScore: number;
|
|
284
|
-
originalName: string;
|
|
285
|
-
};
|
|
286
|
-
export declare const MATCH_SCORES: {
|
|
287
|
-
readonly EMAIL_STARTS_WITH: 6;
|
|
288
|
-
readonly EMAIL_CONTAINS: 5;
|
|
289
|
-
readonly NAME_FIRST_WORD_STARTS_WITH: 4;
|
|
290
|
-
readonly NAME_ANY_WORD_STARTS_WITH: 3;
|
|
291
|
-
readonly NAME_CONTAINS: 2;
|
|
292
|
-
readonly NO_MATCH: 0;
|
|
293
|
-
};
|
|
294
|
-
export type TMatchers = {
|
|
295
|
-
startsWith: (text: string) => boolean;
|
|
296
|
-
includes: (text: string) => boolean;
|
|
297
|
-
anyWordStartsWith: (text: string) => boolean;
|
|
298
|
-
};
|
|
299
|
-
export type TDragUser = {
|
|
300
|
-
avatar: string;
|
|
301
|
-
label: string;
|
|
302
|
-
dropdownId?: string;
|
|
303
|
-
} & TUser;
|
|
304
358
|
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
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "SmartApp UI library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "build/main/index.js",
|
|
@@ -13,12 +13,13 @@
|
|
|
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",
|
|
21
|
-
"date-fns": "^4.1
|
|
22
|
+
"date-fns": "^4.2.1",
|
|
22
23
|
"dompurify": "^3.2.6",
|
|
23
24
|
"echarts": "^5.5.0",
|
|
24
25
|
"echarts-for-react": "^3.0.2",
|
|
@@ -33,7 +34,6 @@
|
|
|
33
34
|
"react-router-dom": "^6.7.0",
|
|
34
35
|
"react-scrollbars-custom": "^4.1.1",
|
|
35
36
|
"react-select": "^5.8.0",
|
|
36
|
-
"react-slick": "^0.29.0",
|
|
37
37
|
"react-swipeable": "^7.0.1",
|
|
38
38
|
"react-toastify": "9.0.3",
|
|
39
39
|
"react-virtualized": "^9.22.5",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"resolutions": {
|
|
47
47
|
"@typescript-eslint/utils": "6.21.0",
|
|
48
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
48
49
|
"juice/cheerio": "1.0.0-rc.12"
|
|
49
50
|
},
|
|
50
51
|
"scripts": {
|
|
@@ -107,7 +108,7 @@
|
|
|
107
108
|
"@storybook/react-webpack5": "^8.5.1",
|
|
108
109
|
"@storybook/test": "^8.5.1",
|
|
109
110
|
"@svgr/webpack": "^8.1.0",
|
|
110
|
-
"@testing-library/jest-dom": "
|
|
111
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
111
112
|
"@types/color": "^3.0.6",
|
|
112
113
|
"@types/convert-layout": "^0.5.3",
|
|
113
114
|
"@types/dompurify": "^3.0.5",
|
|
@@ -118,7 +119,6 @@
|
|
|
118
119
|
"@types/react": "^19.0.2",
|
|
119
120
|
"@types/react-beautiful-dnd": "^13.1.4",
|
|
120
121
|
"@types/react-dom": "^18.0.10",
|
|
121
|
-
"@types/react-slick": "^0.23.10",
|
|
122
122
|
"@types/react-virtualized": "^9.21.30",
|
|
123
123
|
"@types/react-window": "^1.8.8",
|
|
124
124
|
"@types/uuid": "^9.0.8",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M5.57275 5H11.5728C12.1228 5 12.5728 4.55 12.5728 4C12.5728 3.45 12.1228 3 11.5728 3H5.57275C4.47275 3 3.57275 3.9 3.57275 5V19C3.57275 20.1 4.47275 21 5.57275 21H11.5728C12.1228 21 12.5728 20.55 12.5728 20C12.5728 19.45 12.1228 19 11.5728 19H5.57275V5Z" fill="currentColor"/>
|
|
3
|
-
<path d="M21.2228 11.65L18.4328 8.86C18.1128 8.54 17.5728 8.76 17.5728 9.21V11H10.5728C10.0228 11 9.57275 11.45 9.57275 12C9.57275 12.55 10.0228 13 10.5728 13H17.5728V14.79C17.5728 15.24 18.1128 15.46 18.4228 15.14L21.2128 12.35C21.4128 12.16 21.4128 11.84 21.2228 11.65Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="45" height="44" viewBox="0 0 45 44" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<circle cx="22.5728" cy="22" r="19.5" fill="currentColor" fill-opacity="1" stroke="strokeColor"/>
|
|
3
|
-
<path d="M23.0728 21V21.5H23.5728H29.5728C29.8489 21.5 30.0728 21.7239 30.0728 22C30.0728 22.2761 29.8489 22.5 29.5728 22.5H23.5728H23.0728V23V29C23.0728 29.2761 22.8489 29.5 22.5728 29.5C22.2966 29.5 22.0728 29.2761 22.0728 29V23V22.5H21.5728H15.5728C15.2966 22.5 15.0728 22.2761 15.0728 22C15.0728 21.7239 15.2966 21.5 15.5728 21.5H21.5728H22.0728V21V15C22.0728 14.7239 22.2966 14.5 22.5728 14.5C22.8489 14.5 23.0728 14.7239 23.0728 15V21Z" stroke="strokeColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +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="M5.2 2.83325H13.1115C13.0385 3.15486 13 3.48956 13 3.83325C13 4.07136 13.0185 4.30514 13.0541 4.53325H5.2L12 8.78325L14.522 7.20699C14.9256 7.56347 15.3935 7.84866 15.9063 8.04288L12.901 9.92225C12.3485 10.2708 11.6515 10.2708 11.099 9.92225L5.2 6.23325V13.8833C5.2 14.3508 5.5825 14.7333 6.05 14.7333H17.95C18.4175 14.7333 18.8 14.3508 18.8 13.8833V8.14262C19.4379 7.95045 20.0161 7.62052 20.5 7.18741V14.7333C20.5 15.6683 19.735 16.4333 18.8 16.4333H5.2C4.265 16.4333 3.5 15.6683 3.5 14.7333L3.5085 4.53325C3.5085 3.59825 4.265 2.83325 5.2 2.83325Z" fill="#4799E3"/>
|
|
3
|
-
<path d="M15.7292 5.77083C16.2153 6.25694 16.8056 6.5 17.5 6.5C18.1944 6.5 18.7847 6.25694 19.2708 5.77083C19.7569 5.28472 20 4.69444 20 4C20 3.30556 19.7569 2.71528 19.2708 2.22917C18.7847 1.74306 18.1944 1.5 17.5 1.5C16.8056 1.5 16.2153 1.74306 15.7292 2.22917C15.2431 2.71528 15 3.30556 15 4C15 4.69444 15.2431 5.28472 15.7292 5.77083Z" fill="#4799E3"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IProfileProps } from './types';
|
|
2
|
-
import '../../styles/styles.scss';
|
|
3
|
-
declare const Profile: ({ username, email, isShowProfile, onChange, onClickLogout, isMultipleProfile, onClickAddProfile, width, logoutColor, addProfileColor, addProfileBackgroundColor, }: IProfileProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export default Profile;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useEffect, useRef } from 'react';
|
|
14
|
-
import { generateColor } from '../../helpers';
|
|
15
|
-
import { COLORS } from '../../constants';
|
|
16
|
-
import { ReactComponent as LogoutIcon } from '../../assets/icons/logout.svg';
|
|
17
|
-
import { ReactComponent as AddProfileIcon } from '../../assets/icons/plus.svg';
|
|
18
|
-
import '../../styles/styles.scss';
|
|
19
|
-
var Profile = function (_a) {
|
|
20
|
-
var _b, _c, _d;
|
|
21
|
-
var username = _a.username, email = _a.email, _e = _a.isShowProfile, isShowProfile = _e === void 0 ? false : _e, _f = _a.onChange, onChange = _f === void 0 ? function () { return undefined; } : _f, onClickLogout = _a.onClickLogout, isMultipleProfile = _a.isMultipleProfile, onClickAddProfile = _a.onClickAddProfile, _g = _a.width, width = _g === void 0 ? 100 : _g, logoutColor = _a.logoutColor, addProfileColor = _a.addProfileColor, addProfileBackgroundColor = _a.addProfileBackgroundColor;
|
|
22
|
-
var ref = useRef(null);
|
|
23
|
-
var initials = (_d = (_c = (_b = username === null || username === void 0 ? void 0 : username.split(' ')) === null || _b === void 0 ? void 0 : _b.map(function (n) { return n[0]; })) === null || _c === void 0 ? void 0 : _c.join('.')) === null || _d === void 0 ? void 0 : _d.toUpperCase();
|
|
24
|
-
useEffect(function () {
|
|
25
|
-
var checkIfClickedOutside = function (e) {
|
|
26
|
-
var _a;
|
|
27
|
-
if (isShowProfile && (ref === null || ref === void 0 ? void 0 : ref.current) && !((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.contains(e === null || e === void 0 ? void 0 : e.target))) {
|
|
28
|
-
onChange(false);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
document.addEventListener('mousedown', checkIfClickedOutside);
|
|
32
|
-
return function () {
|
|
33
|
-
document.removeEventListener('mousedown', checkIfClickedOutside);
|
|
34
|
-
};
|
|
35
|
-
}, [isShowProfile, onChange]);
|
|
36
|
-
return (_jsxs("div", __assign({ ref: ref, className: "smartapp-profile__container" }, { children: [_jsx("div", __assign({ onClick: function () { return onChange(!isShowProfile); }, className: "smartapp-profile__avatar" }, { children: initials })), isShowProfile && (_jsxs("div", __assign({ style: { width: "".concat(width, "%") }, className: "smartapp-profile" }, { children: [_jsxs("div", __assign({ className: "smartapp-profile__current-profile" }, { children: [_jsxs("div", __assign({ className: "smartapp-profile__current-profile--info" }, { children: [_jsx("div", __assign({ className: "smartapp-profile__avatar" }, { children: initials })), _jsxs("div", __assign({ className: "smartapp-profile__current-profile--info__data" }, { children: [_jsx("p", __assign({ className: "smartapp-profile__current-profile--info__data--username" }, { children: username })), email && _jsx("p", __assign({ className: "smartapp-profile__current-profile--info__data--email" }, { children: email }))] }))] })), _jsx("div", __assign({ onClick: onClickLogout, className: "smartapp-profile__current-profile--logout" }, { children: _jsx(LogoutIcon, { style: { color: generateColor(logoutColor, COLORS.blue) } }) }))] })), isMultipleProfile && (_jsxs("div", __assign({ onClick: onClickAddProfile, className: "smartapp-profile__add-profile" }, { children: [_jsx("div", __assign({ className: "smartapp-profile__add-profile--icon" }, { children: _jsx(AddProfileIcon, { style: {
|
|
37
|
-
stroke: generateColor(addProfileColor, COLORS.blue),
|
|
38
|
-
color: generateColor(addProfileBackgroundColor, COLORS.lighterBlue),
|
|
39
|
-
} }) })), _jsx("p", __assign({ className: "smartapp-profile__add-profile--title" }, { children: "\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0430\u043A\u043A\u0430\u0443\u043D\u0442" }))] })))] })))] })));
|
|
40
|
-
};
|
|
41
|
-
export default Profile;
|
|
42
|
-
//# sourceMappingURL=Profile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../../src/сomponents/Profile/Profile.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Profile';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IntRange } from '../types';
|
|
2
|
-
export interface IProfileProps {
|
|
3
|
-
username: string;
|
|
4
|
-
email?: string;
|
|
5
|
-
isShowProfile: boolean;
|
|
6
|
-
onChange: (isShowProfile: boolean) => void;
|
|
7
|
-
onClickLogout?: () => void;
|
|
8
|
-
isMultipleProfile?: boolean;
|
|
9
|
-
onClickAddProfile?: () => void;
|
|
10
|
-
width?: IntRange<1, 101>;
|
|
11
|
-
logoutColor?: string;
|
|
12
|
-
addProfileColor?: string;
|
|
13
|
-
addProfileBackgroundColor?: string;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Profile/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { NavLink } from 'react-router-dom';
|
|
14
|
-
import Slider from 'react-slick';
|
|
15
|
-
import '../../styles/styles.scss';
|
|
16
|
-
var Switcher = function (_a) {
|
|
17
|
-
var pages = _a.pages;
|
|
18
|
-
var sliderSettings = {
|
|
19
|
-
variableWidth: true,
|
|
20
|
-
dots: false,
|
|
21
|
-
centerPadding: '60px',
|
|
22
|
-
swipeToSlide: true,
|
|
23
|
-
slidesToShow: 3,
|
|
24
|
-
arrows: false,
|
|
25
|
-
infinite: false,
|
|
26
|
-
speed: 300,
|
|
27
|
-
};
|
|
28
|
-
return (_jsx("div", __assign({ className: "smartapp-switcher" }, { children: _jsx(Slider, __assign({}, sliderSettings, { children: pages.map(function (page) { return (_jsx(NavLink, __assign({ className: function (_a) {
|
|
29
|
-
var isActive = _a.isActive;
|
|
30
|
-
return isActive ? ' smartapp-switcher__instance smartapp-switcher__instance--active' : 'smartapp-switcher__instance';
|
|
31
|
-
}, to: page.route }, { children: page.title }), page.route)); }) })) })));
|
|
32
|
-
};
|
|
33
|
-
export default Switcher;
|
|
34
|
-
//# sourceMappingURL=Switcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Switcher.js","sourceRoot":"","sources":["../../../../src/сomponents/Switcher/Switcher.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,0BAA0B,CAAA;AAEjC,IAAM,QAAQ,GAAG,UAAC,EAAyB;QAAvB,KAAK,WAAA;IACvB,IAAM,cAAc,GAAG;QACrB,aAAa,EAAE,IAAI;QACnB,IAAI,EAAE,KAAK;QACX,aAAa,EAAE,MAAM;QACrB,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,CAAC;QACf,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,GAAG;KACX,CAAA;IAED,OAAO,CACL,uBAAK,SAAS,EAAC,mBAAmB,gBAChC,KAAC,MAAM,eAAK,cAAc,cACvB,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,CACnB,KAAC,OAAO,aAEN,SAAS,EAAE,UAAC,EAAY;wBAAV,QAAQ,cAAA;oBACpB,OAAA,QAAQ,CAAC,CAAC,CAAC,kEAAkE,CAAC,CAAC,CAAC,6BAA6B;gBAA7G,CAA6G,EAE/G,EAAE,EAAE,IAAI,CAAC,KAAK,gBAEb,IAAI,CAAC,KAAK,KANN,IAAI,CAAC,KAAK,CAOP,CACX,EAVoB,CAUpB,CAAC,IACK,IACL,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Switcher';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Switcher/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Switcher/types.ts"],"names":[],"mappings":""}
|