@trii/components 3.1.8 → 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 (101) hide show
  1. package/dist/cjs/index.js +199 -45
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/theme.js +84 -5
  4. package/dist/cjs/theme.js.map +1 -1
  5. package/dist/esm/index.js +200 -46
  6. package/dist/esm/index.js.map +1 -1
  7. package/dist/esm/theme.js +84 -5
  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/asyncState/__tests__/asyncState.test.d.ts +1 -0
  28. package/dist/types/asyncState/__tests__/useAsyncData.test.d.ts +1 -0
  29. package/dist/types/components/AsyncContent/__tests__/AsyncContent.test.d.ts +1 -0
  30. package/dist/types/components/AsyncContent/__tests__/AsyncContentI18n.test.d.ts +1 -0
  31. package/dist/types/components/ContactInfoPopup/ContactInfoPopup.stories.d.ts +9 -0
  32. package/dist/types/components/ContactSidebar/ContactSidebar.stories.d.ts +58 -0
  33. package/dist/types/components/ContactSidebar/SidebarContent.d.ts +2 -2
  34. package/dist/types/components/ContactSidebar/components/MediaViewer/MediaViewer.d.ts +2 -1
  35. package/dist/types/components/ContactSidebar/components/PanelView/PanelView.d.ts +2 -1
  36. package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/BotsInfo.d.ts +2 -2
  37. package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/components/DataItem/DataItem.d.ts +3 -3
  38. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/ButtonsListItem/ButtonsListItem.d.ts +1 -1
  39. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/TemplateRenderer/TemplateRenderer.d.ts +1 -1
  40. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactConversation/styles.d.ts +1 -1
  41. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/AddressCard.d.ts +19 -0
  42. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/Contact.d.ts +3 -2
  43. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/CopyAddress.d.ts +3 -0
  44. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Properties/Properties.d.ts +2 -1
  45. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactDataDetails/ContactDataDetails.d.ts +1 -4
  46. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/components/AddEvent/styles.d.ts +1 -1
  47. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/ContactMedia.d.ts +2 -3
  48. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/AudioMessage.d.ts +5 -7
  49. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/utils/getNewWaveSurfer.d.ts +1 -1
  50. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/Image/Image.d.ts +5 -10
  51. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/mediaEntries.d.ts +10 -0
  52. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTask/components/AddTask/styles.d.ts +1 -1
  53. package/dist/types/components/ContactSidebar/components/PanelView/components/IntegrationButtonSearch/IntegrationButtonSearch.d.ts +4 -0
  54. package/dist/types/components/ContactSidebar/components/SidebarLoadError.d.ts +3 -0
  55. package/dist/types/components/ContactSidebar/components/referencePanelStyles.d.ts +4 -0
  56. package/dist/types/components/ContactSidebar/components/verticalTabsStyles.d.ts +11 -0
  57. package/dist/types/components/ContactSidebar/context/MediaViewerContext.d.ts +1 -1
  58. package/dist/types/components/ContactSidebar/context/SidebarDataContext.d.ts +6 -15
  59. package/dist/types/components/ContactSidebar/context/SidebarPropsContext.d.ts +2 -0
  60. package/dist/types/components/ContactSidebar/hooks/useConversationHistory.d.ts +16 -0
  61. package/dist/types/components/ContactSidebar/hooks/useSidebarScope.d.ts +5 -0
  62. package/dist/types/components/ContactSidebar/i18n/useMediaText.d.ts +2 -0
  63. package/dist/types/components/ContactSidebar/i18n/useReferenceText.d.ts +3 -0
  64. package/dist/types/components/ContactSidebar/services/buttonsApi.d.ts +1 -1
  65. package/dist/types/components/ContactSidebar/utils/contactChannels.d.ts +52 -0
  66. package/dist/types/components/ContactSidebar/utils/conversationPresentation.d.ts +8 -0
  67. package/dist/types/components/EditContactModal/EditContactModal.stories.d.ts +9 -0
  68. package/dist/types/components/EditContactModal/components/SearchLocation/SearchLocationEditor.d.ts +2 -1
  69. package/dist/types/components/EditContactModal/components/Section/AddressInformation/AddressInformation.d.ts +2 -3
  70. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/ContactMethod.d.ts +5 -8
  71. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/SubscriptionDialog.d.ts +11 -0
  72. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/style.d.ts +5 -3
  73. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemInputsContainer/style.d.ts +11 -3
  74. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/NoteDeleteButton/style.d.ts +5 -5
  75. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/SubsectionBodyContainer/style.d.ts +3 -6
  76. package/dist/types/components/EditContactModal/components/TagsEditor/TagsEditor.d.ts +6 -6
  77. package/dist/types/components/EditContactModal/context/EditContactApiContext.d.ts +8 -0
  78. package/dist/types/components/EditContactModal/layout/EditorSections.d.ts +16 -0
  79. package/dist/types/components/EditContactModal/services/api.d.ts +2 -0
  80. package/dist/types/components/EventsDialog/components/LinkContactsSelect/styles.d.ts +6 -0
  81. package/dist/types/components/EventsDialog/components/LocationTextField/MapLocationPicker.d.ts +8 -0
  82. package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/GoogleMap/index.d.ts +1 -0
  83. package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/index.d.ts +1 -0
  84. package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/index.d.ts +3 -0
  85. package/dist/types/components/EventsDialog/hooks/index.d.ts +9 -0
  86. package/dist/types/components/EventsDialog/hooks/useSelect.d.ts +14 -0
  87. package/dist/types/components/EventsDialog/utils/eventValidation.d.ts +37 -0
  88. package/dist/types/components/EventsDialog/utils/googleMapsUtils.d.ts +5 -0
  89. package/dist/types/components/EventsDialog/utils/keyboardNavigation.d.ts +24 -0
  90. package/dist/types/components/IntegrationButtonIcon/IntegrationButtonIcon.d.ts +8 -0
  91. package/dist/types/components/IntegrationButtonIcon/catalog.d.ts +14 -0
  92. package/dist/types/components/IntegrationButtonIcon/colors.d.ts +5 -0
  93. package/dist/types/components/IntegrationButtonIcon/index.d.ts +6 -0
  94. package/dist/types/components/PanelErrorBoundary/__tests__/PanelErrorBoundary.test.d.ts +1 -0
  95. package/dist/types/components/index.d.ts +1 -0
  96. package/dist/types/theme/MuiComponentsConfig.test.d.ts +1 -0
  97. package/dist/types/theme/selectThemeComponents.d.ts +3 -0
  98. package/dist/types/theme/themePreference.test.d.ts +1 -0
  99. package/dist/types/theme/themeProvider.test.d.ts +1 -0
  100. package/dist/types/utils/contactOwner.d.ts +3 -0
  101. package/package.json +3 -2
@@ -0,0 +1,58 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ /**
3
+ * El componente es SOLO el panel de contacto (sin el header de vistas
4
+ * Contacto/Interacción/Asistente, que vive en el host) y su root es un
5
+ * Fragment: el decorator provee el contenedor flex `position: relative`
6
+ * contra el que se posicionan el overlay y el skeleton.
7
+ *
8
+ * El panel resuelve todo contra la API con `baseUrl` + `spaceId`, así que en
9
+ * Storybook hay que apuntarlo a un espacio real (y estar logueado, porque el
10
+ * token lo inyecta el interceptor del anfitrión).
11
+ *
12
+ * Ver README.md para el detalle de cada prop.
13
+ */
14
+ declare const meta: {
15
+ component: (props: import("./ChatDetailsSidebar").ChatDetailsSidebarProps) => import("react/jsx-runtime").JSX.Element;
16
+ parameters: {
17
+ layout: string;
18
+ };
19
+ tags: string[];
20
+ decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
21
+ baseUrl: string;
22
+ spaceId: string;
23
+ onEntityUpdated?: ((entity: import("@trii/types/dist/Contacts").IContact | import("@trii/types/dist/Contacts").IBusiness) => void) | undefined;
24
+ chat?: import("./ChatDetailsSidebar").SidebarChatIntegration | undefined;
25
+ googleMapsApiKey?: string | undefined;
26
+ navigate?: ((path: string) => void) | undefined;
27
+ language?: string | undefined;
28
+ active?: boolean | undefined;
29
+ contactId: string | null;
30
+ entityType: "contact" | "business";
31
+ initialEntity?: (import("@trii/types/dist/Contacts").IContact | import("@trii/types/dist/Contacts").IBusiness | null) | undefined;
32
+ entity?: never | undefined;
33
+ } | {
34
+ baseUrl: string;
35
+ spaceId: string;
36
+ onEntityUpdated?: ((entity: import("@trii/types/dist/Contacts").IContact | import("@trii/types/dist/Contacts").IBusiness) => void) | undefined;
37
+ chat?: import("./ChatDetailsSidebar").SidebarChatIntegration | undefined;
38
+ googleMapsApiKey?: string | undefined;
39
+ navigate?: ((path: string) => void) | undefined;
40
+ language?: string | undefined;
41
+ active?: boolean | undefined;
42
+ entity: import("@trii/types/dist/Contacts").IContact | import("@trii/types/dist/Contacts").IBusiness;
43
+ contactId?: never | undefined;
44
+ entityType?: never | undefined;
45
+ initialEntity?: never | undefined;
46
+ }>) => import("react/jsx-runtime").JSX.Element)[];
47
+ };
48
+ export default meta;
49
+ type Story = StoryObj<typeof meta>;
50
+ /**
51
+ * Forma A (recomendada): se le pasa la ficha completa y de ahí deduce el id y
52
+ * el tipo. Sin `chat`, o sea en modo ficha.
53
+ */
54
+ export declare const ConEntidad: Story;
55
+ /** Forma B: solo el id, declarando el tipo a mano. */
56
+ export declare const ConId: Story;
57
+ /** Empresa: el tipo sale del `isBusiness` de la entidad. */
58
+ export declare const Empresa: Story;
@@ -5,11 +5,11 @@ export interface SidebarContentProps {
5
5
  active: boolean;
6
6
  }
7
7
  /**
8
- * Orquestación de UI del panel de contacto (tabs, overlay, skeleton). Vive
8
+ * Orquestación de UI del panel de contacto (tabs y skeleton). Vive
9
9
  * dentro de los providers internos (SidebarProps + SidebarData) para poder
10
10
  * disparar los fetches del mini-store sin tocar el store del host.
11
11
  *
12
- * El root es un Fragment: skeleton/panel/overlay se posicionan contra el
12
+ * El root es un Fragment: skeleton/panel se posicionan contra el
13
13
  * contenedor `position: relative` que provee el host.
14
14
  */
15
15
  declare const SidebarContent: ({ conversation, active }: SidebarContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,6 +5,7 @@ export interface MediaViewerProps {
5
5
  index: number;
6
6
  onIndexChange: (index: number) => void;
7
7
  onClose: () => void;
8
+ resolveUrl?: (url: string) => Promise<string>;
8
9
  }
9
- declare const MediaViewer: ({ open, files, index, onIndexChange, onClose, }: MediaViewerProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const MediaViewer: ({ open, files, index, onIndexChange, onClose, resolveUrl, }: MediaViewerProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export default MediaViewer;
@@ -1,6 +1,7 @@
1
1
  type PanelViewProps = {
2
2
  /** Índice del tab activo (lo controla TabsMenu vía SidebarContent). */
3
3
  value: number;
4
+ handleChange?: (value: number) => void;
4
5
  };
5
- declare const PanelView: ({ value }: PanelViewProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const PanelView: ({ value, handleChange }: PanelViewProps) => import("react/jsx-runtime").JSX.Element;
6
7
  export default PanelView;
@@ -1,6 +1,6 @@
1
- import { ConversationBotVar } from '@trii/types/dist/Conversations';
1
+ import { ConversationDisplayField } from '../../../../utils/conversationPresentation';
2
2
  type BotsInfoProps = {
3
- conversationBotVars: ConversationBotVar[];
3
+ conversationBotVars: ConversationDisplayField[];
4
4
  };
5
5
  declare const BotsInfo: ({ conversationBotVars }: BotsInfoProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export default BotsInfo;
@@ -1,6 +1,6 @@
1
- import { ConversationBotVar } from '@trii/types/dist/Conversations';
1
+ import { ConversationDisplayField } from '../../../../../../utils/conversationPresentation';
2
2
  type DataItemProps = {
3
- data: ConversationBotVar;
3
+ data: ConversationDisplayField;
4
4
  };
5
- declare const DataItem: ({ data: { title, value } }: DataItemProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const DataItem: ({ data: { label: title, value } }: DataItemProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export default DataItem;
@@ -1,3 +1,3 @@
1
- import { Iprops } from "./types/types";
1
+ import { Iprops } from './types/types';
2
2
  declare const ButtonsListItem: ({ data }: Iprops) => import("react/jsx-runtime").JSX.Element;
3
3
  export default ButtonsListItem;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  interface TemplateRendererProps {
3
3
  template: string;
4
- buttonId: number;
4
+ buttonId: string;
5
5
  contactId: string;
6
6
  }
7
7
  declare const TemplateRenderer: React.FC<TemplateRendererProps>;
@@ -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
+ };
@@ -0,0 +1,9 @@
1
+ declare const meta: {
2
+ title: string;
3
+ component: (props: import("./EditContactModal").EditContactModalProps) => import("react/jsx-runtime").JSX.Element;
4
+ tags: string[];
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ };
9
+ export default meta;
@@ -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;