@trii/components 3.1.7 → 3.1.8
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 +44 -43
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/theme.js.map +1 -1
- package/dist/esm/index.js +43 -42
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/types/components/ContactSidebar/ChatDetailsSidebar.d.ts +10 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/ContactTickets.d.ts +12 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/components/ContactTicketItem.d.ts +11 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/components/ContactTicketsSection.d.ts +18 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/components/RelativeTime.d.ts +11 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/index.d.ts +1 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/index.d.ts +1 -0
- package/dist/types/components/ContactSidebar/components/tabIndexes.d.ts +7 -0
- package/dist/types/components/ContactSidebar/context/SidebarPropsContext.d.ts +7 -0
- package/dist/types/components/ContactSidebar/context/types/TabName.d.ts +1 -1
- package/dist/types/components/ContactSidebar/hooks/useContactTickets.d.ts +30 -0
- package/dist/types/components/ContactSidebar/hooks/useNow.d.ts +2 -0
- package/dist/types/components/ContactSidebar/hooks/useTicketStatuses.d.ts +8 -0
- package/dist/types/components/ContactSidebar/services/ticketsApi.d.ts +29 -0
- package/dist/types/components/ContactSidebar/services/urls.d.ts +1 -0
- package/dist/types/components/ContactSidebar/types/tickets.d.ts +60 -0
- package/dist/types/components/ContactSidebar/utils/formatRelativeTime.d.ts +9 -0
- package/dist/types/components/ContactSidebar/utils/minuteTicker.d.ts +3 -0
- package/package.json +1 -1
- package/dist/types/asyncState/__tests__/asyncState.test.d.ts +0 -1
- package/dist/types/asyncState/__tests__/useAsyncData.test.d.ts +0 -1
- package/dist/types/components/AsyncContent/__tests__/AsyncContent.test.d.ts +0 -1
- package/dist/types/components/AsyncContent/__tests__/AsyncContentI18n.test.d.ts +0 -1
- package/dist/types/components/ContactInfoPopup/ContactInfoPopup.stories.d.ts +0 -9
- package/dist/types/components/ContactSidebar/ContactSidebar.stories.d.ts +0 -58
- package/dist/types/components/EditContactModal/EditContactModal.stories.d.ts +0 -9
- package/dist/types/components/EventsDialog/components/LinkContactsSelect/styles.d.ts +0 -6
- package/dist/types/components/EventsDialog/components/LocationTextField/MapLocationPicker.d.ts +0 -8
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/GoogleMap/index.d.ts +0 -1
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/index.d.ts +0 -1
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/index.d.ts +0 -3
- package/dist/types/components/EventsDialog/hooks/index.d.ts +0 -9
- package/dist/types/components/EventsDialog/hooks/useSelect.d.ts +0 -14
- package/dist/types/components/EventsDialog/utils/eventValidation.d.ts +0 -37
- package/dist/types/components/EventsDialog/utils/googleMapsUtils.d.ts +0 -5
- package/dist/types/components/EventsDialog/utils/keyboardNavigation.d.ts +0 -24
- package/dist/types/components/PanelErrorBoundary/__tests__/PanelErrorBoundary.test.d.ts +0 -1
- package/dist/types/theme/MuiComponentsConfig.test.d.ts +0 -1
- package/dist/types/theme/themePreference.test.d.ts +0 -1
- package/dist/types/theme/themeProvider.test.d.ts +0 -1
|
@@ -1,58 +0,0 @@
|
|
|
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;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const SelectPrimaryContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/system").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/system").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
|
|
4
|
-
export declare const SelectSecondaryContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/system").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/system").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
|
package/dist/types/components/EventsDialog/components/LocationTextField/MapLocationPicker.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface MapLocationPickerProps {
|
|
3
|
-
onLocationSelect: (address: string, lat: number, lng: number) => void;
|
|
4
|
-
initialAddress?: string;
|
|
5
|
-
onClose?: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const MapLocationPicker: React.FC<MapLocationPickerProps>;
|
|
8
|
-
export default MapLocationPicker;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './GoogleMapStandalone';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as GoogleMapStandalone } from './GoogleMap/GoogleMapStandalone';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { default as useField, useFieldInitialState, type UseFieldType } from './useField';
|
|
2
|
-
export { default as useSelect, type UseSelect } from './useSelect';
|
|
3
|
-
export { default as useDialog, useDialogInitialState, type UseDialog } from './useDialog';
|
|
4
|
-
export { default as useEvent, useEventInitialState, type UseEvent, type UseDateState, type UseLinkContact, } from './useEvent';
|
|
5
|
-
export { type UseNotificationsType } from './useNotifications';
|
|
6
|
-
export { default as useTask, useTaskInitialState, type UseTask } from './useTask';
|
|
7
|
-
export { default as useCalendar, useCalendarInitialState, type UseCalendarType, } from './useCalendar';
|
|
8
|
-
export { default as useCalendarEvents, useCalendarEventsInitialState, type UseCalendarEventsType, type CalendarEvent, } from './useCalendarEvents';
|
|
9
|
-
export { default as useCalendarTasks, useCalendarTasksInitialState, type UseCalendarTasksType, type CalendarTask, } from './useCalendarTasks';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { SelectChangeEvent } from '@mui/material';
|
|
3
|
-
export interface UseSelect {
|
|
4
|
-
actions: {
|
|
5
|
-
resetValue: () => void;
|
|
6
|
-
changeValue: (newValue: string | number) => void;
|
|
7
|
-
};
|
|
8
|
-
attributes: {
|
|
9
|
-
value: string | number;
|
|
10
|
-
onChange: (event: SelectChangeEvent<string>, child: ReactNode) => void;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
declare const useSelect: (initialValue: string | number) => UseSelect;
|
|
14
|
-
export default useSelect;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utilidades para validación de eventos del calendario
|
|
3
|
-
*/
|
|
4
|
-
export interface CalendarItem {
|
|
5
|
-
id?: string;
|
|
6
|
-
start: Date | string;
|
|
7
|
-
end: Date | string;
|
|
8
|
-
title?: string;
|
|
9
|
-
kind?: 'event' | 'task';
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Verifica si dos eventos se solapan en el tiempo
|
|
13
|
-
*/
|
|
14
|
-
export declare const eventsOverlap: (event1: CalendarItem, event2: CalendarItem) => boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Encuentra todos los eventos que se solapan con un evento dado
|
|
17
|
-
*/
|
|
18
|
-
export declare const findOverlappingEvents: (targetEvent: CalendarItem, allEvents: CalendarItem[]) => CalendarItem[];
|
|
19
|
-
/**
|
|
20
|
-
* Valida que un evento tenga fechas válidas
|
|
21
|
-
*/
|
|
22
|
-
export declare const validateEventDates: (event: CalendarItem) => {
|
|
23
|
-
isValid: boolean;
|
|
24
|
-
error?: string;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Genera un mensaje descriptivo sobre eventos solapados
|
|
28
|
-
*/
|
|
29
|
-
export declare const getOverlapWarningMessage: (overlappingEvents: CalendarItem[]) => string;
|
|
30
|
-
/**
|
|
31
|
-
* Calcula la duración de un evento en minutos
|
|
32
|
-
*/
|
|
33
|
-
export declare const getEventDuration: (event: CalendarItem) => number;
|
|
34
|
-
/**
|
|
35
|
-
* Verifica si un evento es de todo el día
|
|
36
|
-
*/
|
|
37
|
-
export declare const isAllDayEvent: (event: CalendarItem) => boolean;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Re-exportaciones de googleMapsLoader para mantener compatibilidad
|
|
3
|
-
* Este archivo actúa como alias para las funciones de Google Maps
|
|
4
|
-
*/
|
|
5
|
-
export { GOOGLE_MAPS_CONFIG, GOOGLE_MAPS_SCRIPT_CONFIG, useGoogleMapsLoader, loadGoogleMapsAsync, getStaticMapUrl, geocodeAddress, } from './googleMapsLoader';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utilidades para navegación por teclado en el calendario
|
|
3
|
-
*/
|
|
4
|
-
type View = 'month' | 'week' | 'day' | 'work_week' | 'agenda';
|
|
5
|
-
export interface KeyboardNavigationConfig {
|
|
6
|
-
onNavigate: (action: 'PREV' | 'NEXT' | 'TODAY' | 'DATE', date?: Date) => void;
|
|
7
|
-
onViewChange: (view: View) => void;
|
|
8
|
-
onCreateEvent?: () => void;
|
|
9
|
-
currentDate: Date;
|
|
10
|
-
currentView: View;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Maneja los eventos de teclado para el calendario
|
|
14
|
-
*/
|
|
15
|
-
export declare const handleCalendarKeyDown: (event: KeyboardEvent, config: KeyboardNavigationConfig) => void;
|
|
16
|
-
/**
|
|
17
|
-
* Genera el mensaje de ayuda para atajos de teclado
|
|
18
|
-
*/
|
|
19
|
-
export declare const getKeyboardShortcutsHelp: () => string;
|
|
20
|
-
/**
|
|
21
|
-
* Genera los atributos ARIA para el calendario
|
|
22
|
-
*/
|
|
23
|
-
export declare const getCalendarAriaAttributes: (currentView: View, currentDate: Date) => Record<string, string>;
|
|
24
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|