@trii/components 3.1.9 → 3.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/cjs/index.js +198 -43
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/theme.js +13 -0
  4. package/dist/cjs/theme.js.map +1 -1
  5. package/dist/esm/index.js +199 -44
  6. package/dist/esm/index.js.map +1 -1
  7. package/dist/esm/theme.js +13 -0
  8. package/dist/esm/theme.js.map +1 -1
  9. package/dist/index.d.ts +30 -2
  10. package/dist/integration-button-icons-build.log +36 -0
  11. package/dist/integration-button-icons-bundle.log +24 -0
  12. package/dist/integration-button-icons-types.log +29 -0
  13. package/dist/sidebar-fixes-all-tests.log +261 -0
  14. package/dist/sidebar-fixes-baseline.log +29 -0
  15. package/dist/sidebar-fixes-build.log +32 -0
  16. package/dist/sidebar-fixes-tests.log +57 -0
  17. package/dist/sidebar-fixes-types.log +4 -0
  18. package/dist/sidebar-panel-tests.log +356 -0
  19. package/dist/tab-scroll-build.log +32 -0
  20. package/dist/tab-scroll-tests.log +58 -0
  21. package/dist/tabs-all-tests.log +330 -0
  22. package/dist/tabs-build.log +32 -0
  23. package/dist/tabs-format.log +24 -0
  24. package/dist/tabs-tests.log +85 -0
  25. package/dist/tabs-types.log +4 -0
  26. package/dist/tabs-ui-tests.log +84 -0
  27. package/dist/types/components/ContactSidebar/SidebarContent.d.ts +2 -2
  28. package/dist/types/components/ContactSidebar/components/MediaViewer/MediaViewer.d.ts +2 -1
  29. package/dist/types/components/ContactSidebar/components/PanelView/PanelView.d.ts +2 -1
  30. package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/BotsInfo.d.ts +2 -2
  31. package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/components/DataItem/DataItem.d.ts +3 -3
  32. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/ButtonsListItem/ButtonsListItem.d.ts +1 -1
  33. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/TemplateRenderer/TemplateRenderer.d.ts +1 -1
  34. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactConversation/styles.d.ts +1 -1
  35. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/AddressCard.d.ts +19 -0
  36. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/Contact.d.ts +3 -2
  37. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/CopyAddress.d.ts +3 -0
  38. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Properties/Properties.d.ts +2 -1
  39. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactDataDetails/ContactDataDetails.d.ts +1 -4
  40. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/components/AddEvent/styles.d.ts +1 -1
  41. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/ContactMedia.d.ts +2 -3
  42. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/AudioMessage.d.ts +5 -7
  43. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/utils/getNewWaveSurfer.d.ts +1 -1
  44. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/Image/Image.d.ts +5 -10
  45. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/mediaEntries.d.ts +10 -0
  46. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTask/components/AddTask/styles.d.ts +1 -1
  47. package/dist/types/components/ContactSidebar/components/PanelView/components/IntegrationButtonSearch/IntegrationButtonSearch.d.ts +4 -0
  48. package/dist/types/components/ContactSidebar/components/SidebarLoadError.d.ts +3 -0
  49. package/dist/types/components/ContactSidebar/components/referencePanelStyles.d.ts +4 -0
  50. package/dist/types/components/ContactSidebar/components/verticalTabsStyles.d.ts +11 -0
  51. package/dist/types/components/ContactSidebar/context/MediaViewerContext.d.ts +1 -1
  52. package/dist/types/components/ContactSidebar/context/SidebarDataContext.d.ts +6 -15
  53. package/dist/types/components/ContactSidebar/context/SidebarPropsContext.d.ts +2 -0
  54. package/dist/types/components/ContactSidebar/hooks/useConversationHistory.d.ts +16 -0
  55. package/dist/types/components/ContactSidebar/hooks/useSidebarScope.d.ts +5 -0
  56. package/dist/types/components/ContactSidebar/i18n/useMediaText.d.ts +2 -0
  57. package/dist/types/components/ContactSidebar/i18n/useReferenceText.d.ts +3 -0
  58. package/dist/types/components/ContactSidebar/services/buttonsApi.d.ts +1 -1
  59. package/dist/types/components/ContactSidebar/utils/contactChannels.d.ts +52 -0
  60. package/dist/types/components/ContactSidebar/utils/conversationPresentation.d.ts +8 -0
  61. package/dist/types/components/EditContactModal/components/SearchLocation/SearchLocationEditor.d.ts +2 -1
  62. package/dist/types/components/EditContactModal/components/Section/AddressInformation/AddressInformation.d.ts +2 -3
  63. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/ContactMethod.d.ts +5 -8
  64. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/SubscriptionDialog.d.ts +11 -0
  65. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/style.d.ts +5 -3
  66. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemInputsContainer/style.d.ts +11 -3
  67. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/NoteDeleteButton/style.d.ts +5 -5
  68. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/SubsectionBodyContainer/style.d.ts +3 -6
  69. package/dist/types/components/EditContactModal/components/TagsEditor/TagsEditor.d.ts +6 -6
  70. package/dist/types/components/EditContactModal/context/EditContactApiContext.d.ts +8 -0
  71. package/dist/types/components/EditContactModal/layout/EditorSections.d.ts +16 -0
  72. package/dist/types/components/EditContactModal/services/api.d.ts +2 -0
  73. package/dist/types/components/IntegrationButtonIcon/IntegrationButtonIcon.d.ts +8 -0
  74. package/dist/types/components/IntegrationButtonIcon/catalog.d.ts +14 -0
  75. package/dist/types/components/IntegrationButtonIcon/colors.d.ts +5 -0
  76. package/dist/types/components/IntegrationButtonIcon/index.d.ts +6 -0
  77. package/dist/types/components/index.d.ts +1 -0
  78. package/dist/types/utils/contactOwner.d.ts +3 -0
  79. package/package.json +3 -2
@@ -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" | "fullWidth" | "startIcon" | "endIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
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;
@@ -0,0 +1,3 @@
1
+ export default function CopyAddress({ address }: {
2
+ address: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -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
- /// <reference types="react" />
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" | "fullWidth" | "startIcon" | "endIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
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
- type ContactProps = {
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
- interface AudioMessageProps {
2
- messageId?: string;
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
- handleTryAgainAudio?: () => void;
5
- timestamp?: number | string;
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
- import { MessageHeaderType } from '@trii/types/dist/Common/Messages';
3
- type PhotoProps = {
4
- files: MediaFile[];
5
- handleTryAgain?: () => void;
6
- messageId?: string;
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" | "fullWidth" | "startIcon" | "endIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
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
+ export default function IntegrationButtonSearch({ value, handleChange, }: {
2
+ value: number;
3
+ handleChange: (value: number) => void;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export default function SidebarLoadError({ onRetry }: {
2
+ onRetry?: () => void;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -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, Dispatch, ReactNode, SetStateAction } from 'react';
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
- /** Cola de subidas en curso (filas transitorias de la lista). */
31
+ /** Filas transitorias, administradas enteramente por el proveedor. */
38
32
  toUpload: IFile[];
39
- setToUpload: Dispatch<SetStateAction<IFile[]>>;
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: number;
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: number, buttonContactId: string) => Promise<void>;
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
+ };
@@ -0,0 +1,5 @@
1
+ /** Una generación por selección, incluso para A → B → A. */
2
+ export declare function useSidebarScope(resetKey?: string | null): {
3
+ scope: {};
4
+ isCurrent: () => boolean;
5
+ };
@@ -0,0 +1,2 @@
1
+ import es from './locales/es.json';
2
+ export declare function useMediaText(): (key: keyof typeof es.mediaBrowser, values?: Record<string, string | number>) => string;
@@ -0,0 +1,3 @@
1
+ import es from './locales/es.json';
2
+ /** Labels introduced by the reference panel, on the sidebar's own i18n instance. */
3
+ export declare function useReferenceText(): (key: keyof typeof es.referencePanel, values?: Record<string, string | number>) => string;
@@ -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: number;
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
+ };
@@ -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
- declare const AddressInformation: ({ entityType, entityData, baseUrl, spaceId, onEntityUpdated, onDirectionSearchClick, }: AddressInformationProps) => import("react/jsx-runtime").JSX.Element;
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
- import { IBusiness, IContact } from '@trii/types/dist/Contacts/contacts';
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
- handleEdit: () => void;
8
- owner?: IBusiness | IContact;
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,12 +1,14 @@
1
- declare const informationItemContainerStyle: {
1
+ declare const _default: {
2
2
  container: {
3
- border: string;
3
+ border: number;
4
+ borderColor: string;
4
5
  borderRadius: number;
5
6
  p: number;
6
7
  width: string;
7
8
  display: string;
8
9
  flexDirection: string;
9
10
  gap: number;
11
+ bgcolor: string;
10
12
  };
11
13
  };
12
- export default informationItemContainerStyle;
14
+ export default _default;
@@ -1,8 +1,16 @@
1
- declare const informationItemInputsContainerStyle: {
1
+ declare const _default: {
2
2
  container: {
3
3
  display: string;
4
- gap: string;
4
+ gridTemplateColumns: {
5
+ xs: string;
6
+ sm: string;
7
+ };
8
+ gap: number;
5
9
  alignItems: string;
10
+ '& > *': {
11
+ width: string;
12
+ minWidth: number;
13
+ };
6
14
  };
7
15
  };
8
- export default informationItemInputsContainerStyle;
16
+ export default _default;
@@ -1,13 +1,13 @@
1
- declare const noteDeleteButtonStyle: {
1
+ declare const _default: {
2
2
  container: {
3
3
  display: string;
4
4
  width: string;
5
5
  alignItems: string;
6
- justifyContent: string;
6
+ gap: number;
7
7
  };
8
8
  noteTextField: {
9
- width: string;
10
- marginRight: string;
9
+ flex: number;
10
+ minWidth: number;
11
11
  };
12
12
  };
13
- export default noteDeleteButtonStyle;
13
+ export default _default;
@@ -1,14 +1,11 @@
1
- declare const subsectionBodyContainerStyle: {
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 subsectionBodyContainerStyle;
11
+ export default _default;
@@ -1,14 +1,14 @@
1
- import { ILabel } from '@trii/types/dist/Contacts';
2
- type TagsEditorProps = {
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
- declare const TagsEditor: ({ value, options, onChange, onBack, onSave, isSaving, onCreateNew, isCreatingNew, popperContainer, }: TagsEditorProps) => import("react/jsx-runtime").JSX.Element;
14
- export default TagsEditor;
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;
@@ -175,6 +175,8 @@ type UpdateContactAddressBoundArgs = WithSignal & {
175
175
  data: UpdateContactAddressData;
176
176
  };
177
177
  export declare const createEditContactApi: (baseUrl: string, spaceId: string) => {
178
+ fetchSubscriptions: ({ signal }?: WithSignal) => Promise<unknown[]>;
179
+ unsubscribeAddress: (contactAddressId: string, subscriptionId: string, signal?: AbortSignal) => Promise<unknown>;
178
180
  fetchLabels: ({ signal }?: WithSignal) => Promise<ILabel[]>;
179
181
  createLabel: ({ name, signal }: CreateLabelBoundArgs) => Promise<ILabel>;
180
182
  fetchContact: ({ contactId, signal }: FetchContactBoundArgs) => Promise<IContact | IBusiness>;
@@ -0,0 +1,8 @@
1
+ import type { IIntegrationButton } from '@trii/types/dist/Contacts';
2
+ export type IntegrationButtonIconProps = {
3
+ button: Pick<IIntegrationButton, 'icon_class' | 'icon_color_mode' | 'icon_color_light' | 'icon_color_dark'>;
4
+ size?: number;
5
+ className?: string;
6
+ };
7
+ /** Decorative icon: its accessible name comes from the surrounding button/tab. */
8
+ export default function IntegrationButtonIcon({ button, size, className }: IntegrationButtonIconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ export type ButtonIconCategory = "general" | "people" | "documents" | "finance" | "communication" | "operations" | "technology";
3
+ export type ButtonIconDefinition = {
4
+ id: `lucide:${string}`;
5
+ name: string;
6
+ category: ButtonIconCategory;
7
+ Component: LucideIcon;
8
+ keywords: string;
9
+ };
10
+ export declare const BUTTON_ICON_CATEGORIES: ButtonIconCategory[];
11
+ export declare const BUTTON_ICONS: ButtonIconDefinition[];
12
+ export declare const DEFAULT_BUTTON_ICON = "lucide:mouse-pointer-click";
13
+ export declare const findButtonIcon: (id: string | null | undefined) => ButtonIconDefinition;
14
+ export declare const normalizeIconSearch: (value: string) => string;
@@ -0,0 +1,5 @@
1
+ import type { IIntegrationButton } from "@trii/types/dist/Contacts";
2
+ export type ButtonIconColors = Pick<IIntegrationButton, "icon_color_mode" | "icon_color_light" | "icon_color_dark">;
3
+ export declare const DEFAULT_LIGHT_ICON_COLOR = "#334155";
4
+ export declare const DEFAULT_DARK_ICON_COLOR = "#e2e8f0";
5
+ export declare function resolveButtonIconColor(colors: ButtonIconColors, mode: "light" | "dark"): string | undefined;
@@ -0,0 +1,6 @@
1
+ export { default as IntegrationButtonIcon } from './IntegrationButtonIcon';
2
+ export type { IntegrationButtonIconProps } from './IntegrationButtonIcon';
3
+ export { BUTTON_ICONS, BUTTON_ICON_CATEGORIES, DEFAULT_BUTTON_ICON, findButtonIcon, normalizeIconSearch } from './catalog';
4
+ export type { ButtonIconDefinition, ButtonIconCategory } from './catalog';
5
+ export { resolveButtonIconColor, DEFAULT_LIGHT_ICON_COLOR, DEFAULT_DARK_ICON_COLOR } from './colors';
6
+ export type { ButtonIconColors } from './colors';