@trii/components 3.1.9 → 3.1.12
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/dist/cjs/index.js +199 -43
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/theme.js +13 -0
- package/dist/cjs/theme.js.map +1 -1
- package/dist/esm/index.js +200 -44
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme.js +13 -0
- package/dist/esm/theme.js.map +1 -1
- package/dist/index.d.ts +30 -2
- package/dist/integration-button-icons-build.log +36 -0
- package/dist/integration-button-icons-bundle.log +24 -0
- package/dist/integration-button-icons-types.log +29 -0
- package/dist/sidebar-fixes-all-tests.log +261 -0
- package/dist/sidebar-fixes-baseline.log +29 -0
- package/dist/sidebar-fixes-build.log +32 -0
- package/dist/sidebar-fixes-tests.log +57 -0
- package/dist/sidebar-fixes-types.log +4 -0
- package/dist/sidebar-panel-tests.log +356 -0
- package/dist/tab-scroll-build.log +32 -0
- package/dist/tab-scroll-tests.log +58 -0
- package/dist/tabs-all-tests.log +330 -0
- package/dist/tabs-build.log +32 -0
- package/dist/tabs-format.log +24 -0
- package/dist/tabs-tests.log +85 -0
- package/dist/tabs-types.log +4 -0
- package/dist/tabs-ui-tests.log +84 -0
- package/dist/types/components/ContactSidebar/SidebarContent.d.ts +2 -2
- package/dist/types/components/ContactSidebar/components/MediaViewer/MediaViewer.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/PanelView.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/BotsInfo.d.ts +2 -2
- package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/components/DataItem/DataItem.d.ts +3 -3
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/ButtonsListItem/ButtonsListItem.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/TemplateRenderer/TemplateRenderer.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactConversation/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/AddressCard.d.ts +19 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/Contact.d.ts +3 -2
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/CopyAddress.d.ts +3 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Properties/Properties.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactDataDetails/ContactDataDetails.d.ts +1 -4
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/components/AddEvent/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/ContactMedia.d.ts +2 -3
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/AudioMessage.d.ts +5 -7
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/utils/getNewWaveSurfer.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/Image/Image.d.ts +5 -10
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/mediaEntries.d.ts +10 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTask/components/AddTask/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/IntegrationButtonSearch/IntegrationButtonSearch.d.ts +4 -0
- package/dist/types/components/ContactSidebar/components/SidebarLoadError.d.ts +3 -0
- package/dist/types/components/ContactSidebar/components/referencePanelStyles.d.ts +4 -0
- package/dist/types/components/ContactSidebar/components/verticalTabsStyles.d.ts +11 -0
- package/dist/types/components/ContactSidebar/context/MediaViewerContext.d.ts +1 -1
- package/dist/types/components/ContactSidebar/context/SidebarDataContext.d.ts +6 -15
- package/dist/types/components/ContactSidebar/context/SidebarPropsContext.d.ts +2 -0
- package/dist/types/components/ContactSidebar/hooks/useConversationHistory.d.ts +16 -0
- package/dist/types/components/ContactSidebar/hooks/useSidebarScope.d.ts +5 -0
- package/dist/types/components/ContactSidebar/i18n/useMediaText.d.ts +2 -0
- package/dist/types/components/ContactSidebar/i18n/useReferenceText.d.ts +3 -0
- package/dist/types/components/ContactSidebar/services/buttonsApi.d.ts +1 -1
- package/dist/types/components/ContactSidebar/utils/contactChannels.d.ts +52 -0
- package/dist/types/components/ContactSidebar/utils/conversationPresentation.d.ts +8 -0
- package/dist/types/components/EditContactModal/components/SearchLocation/SearchLocationEditor.d.ts +2 -1
- package/dist/types/components/EditContactModal/components/Section/AddressInformation/AddressInformation.d.ts +2 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/ContactMethod.d.ts +5 -8
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/SubscriptionDialog.d.ts +11 -0
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/components/Phones/components/Body/components/Phone/components/OptionsMenu/OptionsMenu.d.ts +2 -1
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/InformationSocialNetworkItem/components/Body/components/Ims/style.d.ts +6 -0
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/InformationItemContainer.d.ts +4 -0
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/style.d.ts +6 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemInputsContainer/style.d.ts +8 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/NoteDeleteButton/style.d.ts +5 -5
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/SubsectionBodyContainer/style.d.ts +3 -6
- package/dist/types/components/EditContactModal/components/TagsEditor/TagsEditor.d.ts +6 -6
- package/dist/types/components/EditContactModal/context/EditContactApiContext.d.ts +8 -0
- package/dist/types/components/EditContactModal/layout/EditorSections.d.ts +16 -0
- package/dist/types/components/EditContactModal/layout/EditorViewPane.d.ts +8 -0
- package/dist/types/components/EditContactModal/services/api.d.ts +2 -0
- package/dist/types/components/IntegrationButtonIcon/IntegrationButtonIcon.d.ts +8 -0
- package/dist/types/components/IntegrationButtonIcon/catalog.d.ts +14 -0
- package/dist/types/components/IntegrationButtonIcon/colors.d.ts +5 -0
- package/dist/types/components/IntegrationButtonIcon/index.d.ts +6 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/utils/contactOwner.d.ts +3 -0
- package/package.json +4 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledContactConversationButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
3
|
ref?: import("react").Ref<HTMLButtonElement>;
|
|
4
|
-
}, "style" | "className" | "tabIndex" | "color" | "children" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableFocusRipple" | "size" | "variant" | "disableElevation" | "
|
|
4
|
+
}, "style" | "className" | "tabIndex" | "color" | "children" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableFocusRipple" | "size" | "variant" | "disableElevation" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChannelType } from '@trii/types/dist/Common/Channels';
|
|
2
|
+
import type { IContactAddress } from '@trii/types/dist/Contacts';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
interface Props {
|
|
5
|
+
contactAddress: IContactAddress;
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
type: ChannelType;
|
|
8
|
+
showCampaign: boolean;
|
|
9
|
+
handleCreateConversation: (id: string) => void;
|
|
10
|
+
handleCallContact: (address: string) => void;
|
|
11
|
+
handleSetFavorite: (id: string, value: boolean) => Promise<void>;
|
|
12
|
+
openModalSubs: (address: IContactAddress) => void;
|
|
13
|
+
}
|
|
14
|
+
export default function AddressCard(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function AddressCardView({ contactAddress: a, icon, type, showCampaign, handleCreateConversation, handleCallContact, handleSetFavorite, openModalSubs, hasChatIntegration, image, }: Props & {
|
|
16
|
+
hasChatIntegration?: boolean;
|
|
17
|
+
image?: string;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IContact, IBusiness, IContactAddress } from '@trii/types/dist/Contacts';
|
|
3
2
|
import { ChannelType } from '@trii/types/dist/Common/Channels';
|
|
3
|
+
import { IBusiness, IContact, IContactAddress } from '@trii/types/dist/Contacts';
|
|
4
4
|
interface ContactProps {
|
|
5
5
|
contactList: IContactAddress[];
|
|
6
|
+
destinationList?: IContactAddress[];
|
|
6
7
|
icon: React.ReactNode;
|
|
7
8
|
title: string;
|
|
8
9
|
showCampaign?: boolean;
|
|
@@ -12,5 +13,5 @@ interface ContactProps {
|
|
|
12
13
|
contactInfo: IContact | IBusiness;
|
|
13
14
|
type: ChannelType;
|
|
14
15
|
}
|
|
15
|
-
declare const Contact: ({ contactList, icon, showCampaign, contactId, setContactInfo, contactInfo, type, }: ContactProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const Contact: ({ contactList, destinationList, icon, showCampaign, contactId, setContactInfo, contactInfo, type, }: ContactProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export default Contact;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Property } from '@trii/types/dist/Contacts';
|
|
2
2
|
interface Props {
|
|
3
3
|
properties: Property[];
|
|
4
|
+
compact?: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare const Properties: ({ properties }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const Properties: ({ properties, compact }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export default Properties;
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ContactProps } from '../../types/ContactProps';
|
|
3
|
-
declare const ContactDataDetails: import("react").ForwardRefExoticComponent<ContactProps & import("react").RefAttributes<HTMLElement>>;
|
|
4
|
-
export default ContactDataDetails;
|
|
1
|
+
export default function ContactDataDetails(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
3
|
ref?: import("react").Ref<HTMLButtonElement>;
|
|
4
|
-
}, "style" | "className" | "tabIndex" | "color" | "children" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableFocusRipple" | "size" | "variant" | "disableElevation" | "
|
|
4
|
+
}, "style" | "className" | "tabIndex" | "color" | "children" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableFocusRipple" | "size" | "variant" | "disableElevation" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
declare const ContactMedia: React.ForwardRefExoticComponent<{
|
|
3
3
|
contactId: string;
|
|
4
4
|
defaultExpanded?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const ContactMedia: React.ForwardRefExoticComponent<ContactProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
7
6
|
export default ContactMedia;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** Only a user play request may create WaveSurfer (which downloads to decode peaks). */
|
|
2
|
+
export default function AudioMessage({ audioUrl, messageId, autoPlay, }: {
|
|
3
3
|
audioUrl: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
declare const AudioMessage: ({ audioUrl, messageId, handleTryAgainAudio, timestamp, }: AudioMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default AudioMessage;
|
|
4
|
+
messageId?: string;
|
|
5
|
+
autoPlay?: boolean;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getNewWaveSurfer: (container: string, progressColor: string) => any;
|
|
1
|
+
export declare const getNewWaveSurfer: (container: string | HTMLElement, progressColor: string) => any;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import MediaFile from '../../../../../../types/MediaFile';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type?: 'sticker' | 'file';
|
|
8
|
-
templateFileType?: MessageHeaderType;
|
|
9
|
-
};
|
|
10
|
-
declare const Image: ({ files, handleTryAgain, messageId, type, templateFileType, }: PhotoProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default Image;
|
|
2
|
+
/** Fixed-size thumbnail. Videos are placeholders: no video request before opening. */
|
|
3
|
+
export default function Image({ file, onOpen }: {
|
|
4
|
+
file: MediaFile;
|
|
5
|
+
onOpen: () => void;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SearchMediaItem, SearchMediaType } from '../../../../services/mediaApi';
|
|
2
|
+
import MediaFile from '../../../../types/MediaFile';
|
|
3
|
+
export interface MediaEntry {
|
|
4
|
+
key: string;
|
|
5
|
+
messageId: string;
|
|
6
|
+
timestamp: SearchMediaItem['timestamp'];
|
|
7
|
+
file: MediaFile;
|
|
8
|
+
}
|
|
9
|
+
/** One row per attachment, never one copy of the whole message per attachment. */
|
|
10
|
+
export declare function mediaEntries(messages: SearchMediaItem[], type: SearchMediaType): MediaEntry[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
3
|
ref?: import("react").Ref<HTMLButtonElement>;
|
|
4
|
-
}, "style" | "className" | "tabIndex" | "color" | "children" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableFocusRipple" | "size" | "variant" | "disableElevation" | "
|
|
4
|
+
}, "style" | "className" | "tabIndex" | "color" | "children" | "sx" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableFocusRipple" | "size" | "variant" | "disableElevation" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ReferencePanelRoot: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
4
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -2,6 +2,17 @@ import type { Theme } from '@mui/material';
|
|
|
2
2
|
/** Estilos compartidos por las barras de tabs verticales del panel lateral. */
|
|
3
3
|
export declare const getVerticalSidebarTabsStyles: (theme: Theme) => {
|
|
4
4
|
height: string;
|
|
5
|
+
maxHeight: string;
|
|
6
|
+
minHeight: number;
|
|
7
|
+
flexShrink: number;
|
|
8
|
+
'& .MuiTabs-scroller': {
|
|
9
|
+
scrollbarWidth: string;
|
|
10
|
+
msOverflowStyle: string;
|
|
11
|
+
'&::-webkit-scrollbar': {
|
|
12
|
+
display: string;
|
|
13
|
+
};
|
|
14
|
+
overscrollBehaviorY: string;
|
|
15
|
+
};
|
|
5
16
|
minWidth: string;
|
|
6
17
|
borderLeft: string;
|
|
7
18
|
bgcolor: string;
|
|
@@ -7,7 +7,7 @@ import { MessageImage } from '@trii/types/dist/Common/Messages';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface MediaViewerValue {
|
|
9
9
|
/** Abre el visor con la lista dada, posicionado en index. */
|
|
10
|
-
openMedia: (files: MessageImage[], index: number) => void;
|
|
10
|
+
openMedia: (files: MessageImage[], index: number, resolveUrls?: boolean) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare const MediaViewerProvider: ({ children }: {
|
|
13
13
|
children: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent,
|
|
1
|
+
import { ChangeEvent, ReactNode } from 'react';
|
|
2
2
|
import { IBusiness, IContact, IContactChangeLog, IContactField, IFile, IIntegrationButton, INote, Relationship } from '@trii/types/dist/Contacts';
|
|
3
3
|
import { IConversation, ILabel } from '@trii/types/dist/Conversations';
|
|
4
4
|
import { IEvent, ITask } from '@trii/types/dist/Calendar';
|
|
@@ -19,12 +19,6 @@ export interface SidebarResource<T> {
|
|
|
19
19
|
/** Aborta y vuelve a idle/null (equivalente a los reset* del slice). */
|
|
20
20
|
reset: () => void;
|
|
21
21
|
}
|
|
22
|
-
/** Resultado de la última subida (antes selectUploadMedia del host). */
|
|
23
|
-
export interface UploadedFileMedia {
|
|
24
|
-
id: string;
|
|
25
|
-
name: string;
|
|
26
|
-
url: string;
|
|
27
|
-
}
|
|
28
22
|
export interface FilesResource extends SidebarResource<IFile[]> {
|
|
29
23
|
/** DELETE + refetch (mismo comportamiento que el deleteFile del provider). */
|
|
30
24
|
remove: (fileId: string) => Promise<void>;
|
|
@@ -34,13 +28,9 @@ export interface FilesResource extends SidebarResource<IFile[]> {
|
|
|
34
28
|
create: (data: contactApi.CreateContactFileData) => Promise<void>;
|
|
35
29
|
/** Sube los archivos del input a media y refetchea la lista. */
|
|
36
30
|
upload: (event: ChangeEvent<HTMLInputElement>, withProgress?: boolean) => void;
|
|
37
|
-
/**
|
|
31
|
+
/** Filas transitorias, administradas enteramente por el proveedor. */
|
|
38
32
|
toUpload: IFile[];
|
|
39
|
-
|
|
40
|
-
/** Última media subida; dispara el registro del archivo en ContactFiles. */
|
|
41
|
-
lastUploaded: UploadedFileMedia | null;
|
|
42
|
-
/** POST /files y devuelve el IFile creado, sin refetch (antes setNewFile). */
|
|
43
|
-
registerUploaded: (data: contactApi.RegisterUploadedFileData) => Promise<IFile>;
|
|
33
|
+
mutationFailed: boolean;
|
|
44
34
|
/** Progreso de la variante withProgress (antes selectores de documentFile*). */
|
|
45
35
|
isUploading: boolean;
|
|
46
36
|
uploadProgress: number;
|
|
@@ -48,6 +38,7 @@ export interface FilesResource extends SidebarResource<IFile[]> {
|
|
|
48
38
|
export interface MediaResource {
|
|
49
39
|
data: mediaApi.SearchMediaItem[];
|
|
50
40
|
status: ResourceStatus;
|
|
41
|
+
hasMore: boolean;
|
|
51
42
|
fetch: (type: mediaApi.SearchMediaType) => Promise<void>;
|
|
52
43
|
/** Paginación por scroll: agrega al final (concat, como el slice). */
|
|
53
44
|
fetchMore: (type: mediaApi.SearchMediaType, pos: string) => Promise<void>;
|
|
@@ -138,14 +129,14 @@ export interface SidebarDataValue {
|
|
|
138
129
|
};
|
|
139
130
|
}
|
|
140
131
|
export interface ButtonDataEntry {
|
|
141
|
-
buttonId:
|
|
132
|
+
buttonId: string;
|
|
142
133
|
contactId: string;
|
|
143
134
|
data: unknown;
|
|
144
135
|
}
|
|
145
136
|
export interface SectionsResource extends SidebarResource<IIntegrationButton[]> {
|
|
146
137
|
/** Cache de datos por botón+contacto (antes jsonButtonData del slice). */
|
|
147
138
|
buttonData: ButtonDataEntry[];
|
|
148
|
-
fetchButtonData: (buttonId:
|
|
139
|
+
fetchButtonData: (buttonId: string, buttonContactId: string) => Promise<void>;
|
|
149
140
|
}
|
|
150
141
|
export interface LabelsResource extends SidebarResource<ILabel[]> {
|
|
151
142
|
/** POST + refetch; devuelve la etiqueta creada. */
|
|
@@ -86,3 +86,5 @@ export interface StartConversationTarget {
|
|
|
86
86
|
}
|
|
87
87
|
export declare const SidebarPropsProvider: import("react").Provider<SidebarProps>;
|
|
88
88
|
export declare function useSidebarProps(): SidebarProps;
|
|
89
|
+
/** Optional integration for editors also mounted outside the sidebar. */
|
|
90
|
+
export declare function useOptionalSidebarProps(): SidebarProps;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IConversation } from '@trii/types/dist/Conversations';
|
|
2
|
+
import type { ResourceStatus } from '../context/SidebarDataContext';
|
|
3
|
+
export declare function useConversationHistory(): {
|
|
4
|
+
fetch: (refresh?: boolean) => Promise<void>;
|
|
5
|
+
refetch: () => Promise<void>;
|
|
6
|
+
scope: object;
|
|
7
|
+
data: IConversation[];
|
|
8
|
+
status: ResourceStatus;
|
|
9
|
+
hasMore: boolean;
|
|
10
|
+
} | {
|
|
11
|
+
fetch: (refresh?: boolean) => Promise<void>;
|
|
12
|
+
refetch: () => Promise<void>;
|
|
13
|
+
data: any[];
|
|
14
|
+
status: "idle";
|
|
15
|
+
hasMore: boolean;
|
|
16
|
+
};
|
|
@@ -9,7 +9,7 @@ type ApiArgs = SidebarApiConfig & {
|
|
|
9
9
|
};
|
|
10
10
|
export declare function fetchButtons({ baseUrl, spaceId, signal, }: ApiArgs): Promise<IIntegrationButton[]>;
|
|
11
11
|
export declare function fetchButtonData({ baseUrl, spaceId, buttonId, contactId, signal, }: ApiArgs & {
|
|
12
|
-
buttonId:
|
|
12
|
+
buttonId: string;
|
|
13
13
|
contactId: string;
|
|
14
14
|
}): Promise<unknown>;
|
|
15
15
|
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IBusiness, IContact } from '@trii/types/dist/Contacts';
|
|
2
|
+
import { ChannelType } from '@trii/types/dist/Common/Channels';
|
|
3
|
+
export declare const contactChannels: readonly [{
|
|
4
|
+
readonly property: "phones";
|
|
5
|
+
readonly type: ChannelType.CALL;
|
|
6
|
+
readonly title: "conversations.contactInfo.phone";
|
|
7
|
+
readonly icon: "PhoneEnabled";
|
|
8
|
+
readonly showCampaign: false;
|
|
9
|
+
}, {
|
|
10
|
+
readonly property: "ims_whatsapp";
|
|
11
|
+
readonly type: ChannelType.WHATSAPP;
|
|
12
|
+
readonly title: "WhatsApp";
|
|
13
|
+
readonly icon: "WhatsApp";
|
|
14
|
+
readonly showCampaign: true;
|
|
15
|
+
}, {
|
|
16
|
+
readonly property: "emails";
|
|
17
|
+
readonly type: ChannelType.EMAIL;
|
|
18
|
+
readonly title: "Email";
|
|
19
|
+
readonly icon: "Email";
|
|
20
|
+
readonly showCampaign: true;
|
|
21
|
+
}, {
|
|
22
|
+
readonly property: "ims_facebook";
|
|
23
|
+
readonly type: ChannelType.FACEBOOK;
|
|
24
|
+
readonly title: "Facebook";
|
|
25
|
+
readonly icon: "Facebook";
|
|
26
|
+
readonly showCampaign: true;
|
|
27
|
+
}, {
|
|
28
|
+
readonly property: "ims_instagram";
|
|
29
|
+
readonly type: ChannelType.INSTAGRAM;
|
|
30
|
+
readonly title: "Instagram";
|
|
31
|
+
readonly icon: "Instagram";
|
|
32
|
+
readonly showCampaign: true;
|
|
33
|
+
}, {
|
|
34
|
+
readonly property: "ims_webchat";
|
|
35
|
+
readonly type: ChannelType.WEBCHAT;
|
|
36
|
+
readonly title: "Webchat";
|
|
37
|
+
readonly icon: "Forum";
|
|
38
|
+
readonly showCampaign: true;
|
|
39
|
+
}, {
|
|
40
|
+
readonly property: "ims_mercadolibre";
|
|
41
|
+
readonly type: ChannelType.MERCADOLIBRE;
|
|
42
|
+
readonly title: "Mercado Libre";
|
|
43
|
+
readonly icon: "Storefront";
|
|
44
|
+
readonly showCampaign: true;
|
|
45
|
+
}, {
|
|
46
|
+
readonly property: "ims_rcs";
|
|
47
|
+
readonly type: ChannelType.RCS;
|
|
48
|
+
readonly title: "RCS";
|
|
49
|
+
readonly icon: "Sms";
|
|
50
|
+
readonly showCampaign: true;
|
|
51
|
+
}];
|
|
52
|
+
export declare function updateChannelFavorite(entity: IContact | IBusiness, type: ChannelType, id: string, value: boolean): IContact | IBusiness;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConversationContextField, IConversation } from '@trii/types/dist/Conversations';
|
|
2
|
+
export type ConversationDisplayField = Pick<ConversationContextField, 'key' | 'label' | 'value'>;
|
|
3
|
+
/** Adaptación de lectura mientras los hosts migran botVars/assignedTo al contrato nuevo. */
|
|
4
|
+
export declare function getConversationFields(conversation: IConversation | null | undefined): ConversationDisplayField[];
|
|
5
|
+
export declare function getAssignmentLabels(conversation: IConversation): {
|
|
6
|
+
userName: string;
|
|
7
|
+
groupName: string;
|
|
8
|
+
};
|
package/dist/types/components/EditContactModal/components/SearchLocation/SearchLocationEditor.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
+
targetAddress?: string;
|
|
2
3
|
baseUrl?: string;
|
|
3
4
|
spaceId?: string;
|
|
4
5
|
entityType: 'contact' | 'business';
|
|
@@ -6,5 +7,5 @@ type Props = {
|
|
|
6
7
|
onBack: () => void;
|
|
7
8
|
onEntityUpdated?: (entity: unknown) => void;
|
|
8
9
|
};
|
|
9
|
-
declare const SearchLocationEditor: ({ baseUrl, spaceId, entityType, entityId, onBack, onEntityUpdated, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const SearchLocationEditor: ({ targetAddress, baseUrl, spaceId, entityType, entityId, onBack, onEntityUpdated, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default SearchLocationEditor;
|
|
@@ -5,7 +5,6 @@ export type AddressInformationProps = {
|
|
|
5
5
|
baseUrl?: string;
|
|
6
6
|
spaceId?: string;
|
|
7
7
|
onEntityUpdated?: (entity: unknown) => void;
|
|
8
|
-
onDirectionSearchClick?: () => void;
|
|
8
|
+
onDirectionSearchClick?: (target?: 'address1' | 'address2') => void;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
export default AddressInformation;
|
|
10
|
+
export default function AddressInformation({ onDirectionSearchClick, ...props }: AddressInformationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { IContactAddress } from '@trii/types/dist/Contacts';
|
|
2
|
-
|
|
3
|
-
interface Props {
|
|
1
|
+
import type { IContactAddress } from '@trii/types/dist/Contacts';
|
|
2
|
+
export default function ContactMethod({ title, methodItems, handleEdit, }: {
|
|
4
3
|
title: string;
|
|
5
4
|
methodItems: IContactAddress[];
|
|
6
5
|
isPhone?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
declare const ContactMethod: ({ title, methodItems, isPhone, handleEdit, owner }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default ContactMethod;
|
|
6
|
+
owner?: unknown;
|
|
7
|
+
handleEdit?: () => void;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { IContactAddress } from '@trii/types/dist/Contacts';
|
|
3
|
+
type Props = {
|
|
4
|
+
openModal: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
contactAddress: IContactAddress;
|
|
8
|
+
onAddressUpdated: (address: IContactAddress) => void;
|
|
9
|
+
};
|
|
10
|
+
export default function SubscriptionDialog({ openModal, onClose, icon, contactAddress, onAddressUpdated, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChannelType } from '@trii/types/dist/Common/Channels';
|
|
2
2
|
type OptionsMenuProps = {
|
|
3
|
+
disabled?: boolean;
|
|
3
4
|
onDelete: () => void;
|
|
4
5
|
addressData: {
|
|
5
6
|
address: string;
|
|
@@ -13,5 +14,5 @@ type ResultContactAddressCheck = {
|
|
|
13
14
|
success: boolean;
|
|
14
15
|
warnings: string[];
|
|
15
16
|
};
|
|
16
|
-
declare const OptionsMenu: ({ onDelete, addressData, handleLinkAccountSave, checked, onCheckContactAddress, }: OptionsMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const OptionsMenu: ({ onDelete, disabled, addressData, handleLinkAccountSave, checked, onCheckContactAddress, }: OptionsMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default OptionsMenu;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: {
|
|
2
2
|
container: {
|
|
3
|
-
|
|
3
|
+
position: string;
|
|
4
|
+
border: number;
|
|
5
|
+
borderColor: string;
|
|
4
6
|
borderRadius: number;
|
|
5
7
|
p: number;
|
|
6
8
|
width: string;
|
|
7
9
|
display: string;
|
|
8
10
|
flexDirection: string;
|
|
9
11
|
gap: number;
|
|
12
|
+
bgcolor: string;
|
|
10
13
|
};
|
|
11
14
|
};
|
|
12
|
-
export default
|
|
15
|
+
export default _default;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: {
|
|
2
2
|
container: {
|
|
3
3
|
display: string;
|
|
4
|
-
|
|
4
|
+
gridTemplateColumns: string;
|
|
5
|
+
gap: number;
|
|
5
6
|
alignItems: string;
|
|
7
|
+
'& > *': {
|
|
8
|
+
width: string;
|
|
9
|
+
minWidth: number;
|
|
10
|
+
};
|
|
6
11
|
};
|
|
7
12
|
};
|
|
8
|
-
export default
|
|
13
|
+
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: {
|
|
2
2
|
container: {
|
|
3
3
|
display: string;
|
|
4
4
|
width: string;
|
|
5
5
|
alignItems: string;
|
|
6
|
-
|
|
6
|
+
gap: number;
|
|
7
7
|
};
|
|
8
8
|
noteTextField: {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
flex: number;
|
|
10
|
+
minWidth: number;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
export default
|
|
13
|
+
export default _default;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: {
|
|
2
2
|
container: {
|
|
3
3
|
width: string;
|
|
4
|
-
borderRadius: number;
|
|
5
|
-
px: number;
|
|
6
|
-
py: number;
|
|
7
4
|
display: string;
|
|
8
5
|
flexDirection: string;
|
|
9
6
|
gap: number;
|
|
7
|
+
py: number;
|
|
10
8
|
overflow: string;
|
|
11
|
-
maxHeight: string;
|
|
12
9
|
};
|
|
13
10
|
};
|
|
14
|
-
export default
|
|
11
|
+
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ILabel } from '@trii/types/dist/Contacts';
|
|
2
|
-
type
|
|
1
|
+
import type { ILabel } from '@trii/types/dist/Contacts';
|
|
2
|
+
type Props = {
|
|
3
3
|
value: ILabel[];
|
|
4
4
|
options: ILabel[];
|
|
5
5
|
onChange: (value: ILabel[]) => void;
|
|
6
6
|
onBack: () => void;
|
|
7
|
-
onSave: () => void
|
|
7
|
+
onSave: () => void | Promise<void>;
|
|
8
8
|
isSaving: boolean;
|
|
9
|
-
onCreateNew: (name: string) => void
|
|
9
|
+
onCreateNew: (name: string) => void | Promise<void>;
|
|
10
10
|
isCreatingNew: boolean;
|
|
11
11
|
popperContainer?: HTMLElement | null;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
export
|
|
13
|
+
export default function TagsEditor({ value, options, onChange, onBack, onSave, isSaving, onCreateNew, isCreatingNew, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const EditContactApiProvider: import("react").Provider<{
|
|
3
|
+
fetchSubscriptions: ({ signal }?: {
|
|
4
|
+
signal?: AbortSignal;
|
|
5
|
+
}) => Promise<unknown[]>;
|
|
6
|
+
unsubscribeAddress: (contactAddressId: string, subscriptionId: string, signal?: AbortSignal) => Promise<unknown>;
|
|
3
7
|
fetchLabels: ({ signal }?: {
|
|
4
8
|
signal?: AbortSignal;
|
|
5
9
|
}) => Promise<import("@trii/types/dist/Contacts").ILabel[]>;
|
|
@@ -101,6 +105,10 @@ export declare const EditContactApiProvider: import("react").Provider<{
|
|
|
101
105
|
}) => Promise<string>;
|
|
102
106
|
}>;
|
|
103
107
|
export declare const useEditContactApi: () => {
|
|
108
|
+
fetchSubscriptions: ({ signal }?: {
|
|
109
|
+
signal?: AbortSignal;
|
|
110
|
+
}) => Promise<unknown[]>;
|
|
111
|
+
unsubscribeAddress: (contactAddressId: string, subscriptionId: string, signal?: AbortSignal) => Promise<unknown>;
|
|
104
112
|
fetchLabels: ({ signal }?: {
|
|
105
113
|
signal?: AbortSignal;
|
|
106
114
|
}) => Promise<import("@trii/types/dist/Contacts").ILabel[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare function CustomFields({ fields, currentUser, baseUrl, spaceId, onEntityUpdated, }: {
|
|
3
|
+
fields: import('@trii/types/dist/Contacts').IContactField[];
|
|
4
|
+
currentUser?: import('@trii/types/dist/Users').UserTrii | null;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
spaceId?: string;
|
|
7
|
+
onEntityUpdated?: (entity: unknown) => void;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function EditorSections({ general, channels, addresses, fields, tagsEditor, mode, }: {
|
|
10
|
+
general: ReactNode;
|
|
11
|
+
channels: ReactNode;
|
|
12
|
+
addresses: ReactNode;
|
|
13
|
+
fields: ReactNode;
|
|
14
|
+
tagsEditor?: ReactNode;
|
|
15
|
+
mode?: 'modal' | 'card';
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Keep the main form and its return position while a nested editor is open. */
|
|
3
|
+
export default function EditorViewPane({ active, mode, keepMounted, children, }: {
|
|
4
|
+
active: boolean;
|
|
5
|
+
mode: 'modal' | 'card';
|
|
6
|
+
keepMounted?: boolean;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|