@trii/components 2.0.104 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +35 -35
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +38 -38
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/types/components/ContactSidebar/ChatDetailsSidebar.d.ts +17 -3
- package/dist/types/components/ContactSidebar/SidebarContent.d.ts +9 -4
- package/dist/types/components/ContactSidebar/components/PanelView/PanelView.d.ts +1 -4
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/ContactMedia.d.ts +0 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/GroupData/GroupData.d.ts +0 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/index.d.ts +0 -3
- package/dist/types/components/ContactSidebar/components/PanelView/layout/SectionCard/SectionCard.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/types/ContactProps.d.ts +0 -1
- package/dist/types/components/ContactSidebar/components/TabsMenu/TabsMenu.d.ts +0 -3
- package/dist/types/components/ContactSidebar/components/index.d.ts +0 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -620,6 +620,12 @@ interface ChatDetailsSidebarBaseProps {
|
|
|
620
620
|
* propia instancia de i18n, así que no sigue solo los cambios del host.
|
|
621
621
|
*/
|
|
622
622
|
language?: string;
|
|
623
|
+
/**
|
|
624
|
+
* Gate de visibilidad (CSS display) del panel. Para hosts que renderizan
|
|
625
|
+
* vistas hermanas alternadas por CSS: el panel queda montado (conserva su
|
|
626
|
+
* estado y sus datos) pero oculto mientras `active` es false. Default: true.
|
|
627
|
+
*/
|
|
628
|
+
active?: boolean;
|
|
623
629
|
}
|
|
624
630
|
/**
|
|
625
631
|
* Qué mostrar. Hay dos formas y son excluyentes; TypeScript falla si no se pasa
|
|
@@ -652,9 +658,17 @@ type ChatDetailsSidebarTarget = {
|
|
|
652
658
|
};
|
|
653
659
|
type ChatDetailsSidebarProps = ChatDetailsSidebarBaseProps & ChatDetailsSidebarTarget;
|
|
654
660
|
/**
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
661
|
+
* Panel de contacto reutilizable: la ficha completa de un contacto/empresa
|
|
662
|
+
* (datos, conversaciones, archivos, media, historial, eventos, tareas, shop,
|
|
663
|
+
* relaciones, grupos de WhatsApp) con su riel vertical de tabs, skeleton y
|
|
664
|
+
* overlay de carga. Recibe las props del contrato y monta los providers
|
|
665
|
+
* internos; la orquestación de tabs vive en SidebarContent.
|
|
666
|
+
*
|
|
667
|
+
* El shell de vistas (header Contacto/Interacción/Asistente) es del host: este
|
|
668
|
+
* componente renderiza SOLO la vista de contacto y expone `active` para que el
|
|
669
|
+
* host lo alterne por CSS con sus vistas hermanas sin desmontarlo. Debe
|
|
670
|
+
* colocarse dentro de un contenedor flex con `position: relative` (el overlay
|
|
671
|
+
* y el skeleton se posicionan contra ese contenedor). Ver README.md.
|
|
658
672
|
*/
|
|
659
673
|
declare const ChatDetailsSidebar: (props: ChatDetailsSidebarProps) => react_jsx_runtime.JSX.Element;
|
|
660
674
|
|
|
@@ -23,6 +23,12 @@ interface ChatDetailsSidebarBaseProps {
|
|
|
23
23
|
* propia instancia de i18n, así que no sigue solo los cambios del host.
|
|
24
24
|
*/
|
|
25
25
|
language?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Gate de visibilidad (CSS display) del panel. Para hosts que renderizan
|
|
28
|
+
* vistas hermanas alternadas por CSS: el panel queda montado (conserva su
|
|
29
|
+
* estado y sus datos) pero oculto mientras `active` es false. Default: true.
|
|
30
|
+
*/
|
|
31
|
+
active?: boolean;
|
|
26
32
|
}
|
|
27
33
|
/**
|
|
28
34
|
* Qué mostrar. Hay dos formas y son excluyentes; TypeScript falla si no se pasa
|
|
@@ -55,9 +61,17 @@ type ChatDetailsSidebarTarget = {
|
|
|
55
61
|
};
|
|
56
62
|
export type ChatDetailsSidebarProps = ChatDetailsSidebarBaseProps & ChatDetailsSidebarTarget;
|
|
57
63
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
64
|
+
* Panel de contacto reutilizable: la ficha completa de un contacto/empresa
|
|
65
|
+
* (datos, conversaciones, archivos, media, historial, eventos, tareas, shop,
|
|
66
|
+
* relaciones, grupos de WhatsApp) con su riel vertical de tabs, skeleton y
|
|
67
|
+
* overlay de carga. Recibe las props del contrato y monta los providers
|
|
68
|
+
* internos; la orquestación de tabs vive en SidebarContent.
|
|
69
|
+
*
|
|
70
|
+
* El shell de vistas (header Contacto/Interacción/Asistente) es del host: este
|
|
71
|
+
* componente renderiza SOLO la vista de contacto y expone `active` para que el
|
|
72
|
+
* host lo alterne por CSS con sus vistas hermanas sin desmontarlo. Debe
|
|
73
|
+
* colocarse dentro de un contenedor flex con `position: relative` (el overlay
|
|
74
|
+
* y el skeleton se posicionan contra ese contenedor). Ver README.md.
|
|
61
75
|
*/
|
|
62
76
|
declare const ChatDetailsSidebar: (props: ChatDetailsSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
63
77
|
export default ChatDetailsSidebar;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { IConversation } from '@trii/types/dist/Conversations';
|
|
2
2
|
export interface SidebarContentProps {
|
|
3
3
|
conversation: IConversation | null;
|
|
4
|
+
/** Gate CSS de visibilidad del panel (ver ChatDetailsSidebar.active). */
|
|
5
|
+
active: boolean;
|
|
4
6
|
}
|
|
5
7
|
/**
|
|
6
|
-
* Orquestación de UI del
|
|
7
|
-
* los providers internos (SidebarProps + SidebarData) para poder
|
|
8
|
-
* los fetches del mini-store sin tocar el store del host.
|
|
8
|
+
* Orquestación de UI del panel de contacto (tabs, overlay, skeleton). Vive
|
|
9
|
+
* dentro de los providers internos (SidebarProps + SidebarData) para poder
|
|
10
|
+
* disparar los fetches del mini-store sin tocar el store del host.
|
|
11
|
+
*
|
|
12
|
+
* El root es un Fragment: skeleton/panel/overlay se posicionan contra el
|
|
13
|
+
* contenedor `position: relative` que provee el host.
|
|
9
14
|
*/
|
|
10
|
-
declare const SidebarContent: ({ conversation }: SidebarContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const SidebarContent: ({ conversation, active }: SidebarContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
16
|
export default SidebarContent;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { SectionRefs } from '../../hooks/useSectionRefs';
|
|
2
1
|
type PanelViewProps = {
|
|
3
|
-
|
|
4
|
-
setValue: (value: number) => void;
|
|
2
|
+
/** Índice del tab activo (lo controla TabsMenu vía SidebarContent). */
|
|
5
3
|
value: number;
|
|
6
|
-
isClicked: boolean;
|
|
7
4
|
};
|
|
8
5
|
declare const PanelView: ({ value }: PanelViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
6
|
export default PanelView;
|
|
@@ -5,13 +5,10 @@ export { default as ContactFiles } from './ContactFiles';
|
|
|
5
5
|
export { default as ContactMedia } from './ContactMedia';
|
|
6
6
|
export { default as ContactHistory } from './ContactHistory';
|
|
7
7
|
export { default as ContactNotes } from './ContactNotes';
|
|
8
|
-
export { default as ContactRepairs } from './ContactRepairs';
|
|
9
8
|
export { default as ContactEvent } from './ContactEvent';
|
|
10
9
|
export { default as ContactTask } from './ContactTask';
|
|
11
|
-
export { default as ContactTicket } from './ContactTicket';
|
|
12
10
|
export { default as ContactButton } from './ContactButton';
|
|
13
11
|
export { default as ContactPanelShop } from './ContactPanelShop';
|
|
14
12
|
export { default as ContactRelations } from './ContactRelations';
|
|
15
13
|
export { default as GroupData } from './GroupData';
|
|
16
14
|
export { default as PremiumContactHeader } from './PremiumContactHeader';
|
|
17
|
-
export { default as ContactHighlights } from './ContactHighlights';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { SectionRefs } from '../../hooks/useSectionRefs';
|
|
2
1
|
type TabsMenuProps = {
|
|
3
2
|
handleChange: (newValue: number) => void;
|
|
4
3
|
value: number;
|
|
5
|
-
sectionRefs: SectionRefs;
|
|
6
|
-
setIsClicked: (isClicked: boolean) => void;
|
|
7
4
|
};
|
|
8
5
|
declare function TabsMenu({ handleChange, value }: TabsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
9
6
|
export default TabsMenu;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
export { default as ContactInfoSkeleton } from './ContactInfoSkeleton';
|
|
2
|
-
export { default as AssistantView } from './AssistantView/AssistantView';
|
|
3
|
-
export { default as InteractionView } from './InteractionView/InteractionView';
|
|
4
2
|
export { default as PanelView } from './PanelView';
|
|
5
|
-
export { default as SidebarViewNavigation, type SidebarView, type SidebarViewDefinition, } from './SidebarViewNavigation/SidebarViewNavigation';
|
|
6
3
|
export { default as TabsMenu } from './TabsMenu';
|