pixelon 0.3.30 → 0.3.74
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/components/atoms/chat/Icon/Icon.d.ts +4 -0
- package/dist/components/atoms/lumi/Button/Button.d.ts +2 -0
- package/dist/components/atoms/lumi/Card/Card.d.ts +12 -0
- package/dist/components/atoms/lumi/Card/index.d.ts +3 -0
- package/dist/components/atoms/lumi/Card/types.d.ts +32 -0
- package/dist/components/atoms/lumi/Icon/Icon.d.ts +3 -0
- package/dist/components/atoms/lumi/Input/Input.d.ts +2 -0
- package/dist/components/atoms/lumi/index.d.ts +1 -0
- package/dist/components/molecules/chat/ChatFloatingActions/ChatFloatingActions.d.ts +42 -0
- package/dist/components/molecules/chat/ChatFloatingActions/index.d.ts +2 -0
- package/dist/components/molecules/chat/FileViewer/FileViewer.d.ts +2 -1
- package/dist/components/molecules/chat/FullscreenViewer/FullscreenViewer.d.ts +2 -1
- package/dist/components/molecules/chat/NewMessageDivider/NewMessageDivider.d.ts +6 -0
- package/dist/components/molecules/chat/StructuredContent/components/ActionMenu/ActionMenu.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/Cart/Cart.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ChatNavigator/ChatNavigator.d.ts +8 -0
- package/dist/components/molecules/chat/StructuredContent/components/ChatNavigator/ChatNavigatorChat.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ChatNavigator/chatNavigatorChips.d.ts +7 -0
- package/dist/components/molecules/chat/StructuredContent/components/ChatNavigator/types.d.ts +88 -0
- package/dist/components/molecules/chat/StructuredContent/components/FileField/FileField.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/FileField/types.d.ts +19 -0
- package/dist/components/molecules/chat/StructuredContent/components/LocationField/LocationField.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/LocationField/types.d.ts +32 -0
- package/dist/components/molecules/chat/StructuredContent/components/LocationField/usePlaces.d.ts +19 -0
- package/dist/components/molecules/chat/StructuredContent/components/MapView/MapView.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/MapView/MapViewChat.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/MapView/markerIcons.d.ts +9 -0
- package/dist/components/molecules/chat/StructuredContent/components/MapView/types.d.ts +90 -0
- package/dist/components/molecules/chat/StructuredContent/components/MapView/useGoogleMaps.d.ts +8 -0
- package/dist/components/molecules/chat/StructuredContent/components/ProductCard/ProductCard.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ProductCarousel/ProductCarousel.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ProductManager/ProductManager.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/ActionFormDrawer.d.ts +12 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/DetailDrawer.d.ts +18 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/PriceNegotiationChat.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/ReactiveCrud.d.ts +20 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/ReactiveCrudChat.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/ReactiveCrudItemChat.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/buildCrudYupSchema.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/formatters.d.ts +4 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/optionsLoader.d.ts +5 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/types.d.ts +148 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/useReactiveCrud.d.ts +19 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/ReactiveMap.d.ts +12 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/ReactiveMapChat.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/types.d.ts +36 -0
- package/dist/components/molecules/chat/StructuredContent/components/ServiceShortcuts/ServiceShortcuts.d.ts +21 -0
- package/dist/components/molecules/chat/StructuredContent/components/ServiceShortcuts/ServiceShortcutsChat.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ServicesMap/ServicesMap.d.ts +14 -0
- package/dist/components/molecules/chat/StructuredContent/components/ServicesMap/ServicesMapChat.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/ServicesMap/outliers.d.ts +14 -0
- package/dist/components/molecules/chat/StructuredContent/components/ServicesMap/types.d.ts +54 -0
- package/dist/components/molecules/chat/StructuredContent/components/UserTools/UserTools.d.ts +10 -0
- package/dist/components/molecules/chat/StructuredContent/components/UserTools/UserToolsChat.d.ts +3 -0
- package/dist/components/molecules/chat/StructuredContent/components/UserTools/types.d.ts +17 -0
- package/dist/components/molecules/chat/StructuredContent/components/index.d.ts +22 -0
- package/dist/components/molecules/chat/StructuredContent/helpers/types.d.ts +2 -0
- package/dist/components/molecules/chat/StructuredContent/helpers/uploadViaEventBus.d.ts +2 -0
- package/dist/components/molecules/lumi/BottomSheet/BottomSheet.d.ts +29 -0
- package/dist/components/molecules/lumi/BottomSheet/index.d.ts +1 -0
- package/dist/components/molecules/lumi/Drawer/useDrawerKeyboardLock.d.ts +18 -0
- package/dist/components/molecules/lumi/Filter/types.d.ts +4 -0
- package/dist/components/molecules/lumi/LiveIndicator/LiveIndicator.d.ts +28 -0
- package/dist/components/molecules/lumi/LiveIndicator/index.d.ts +1 -0
- package/dist/components/molecules/lumi/Menu/types.d.ts +5 -0
- package/dist/components/molecules/lumi/SessionExpiryPrompt/SessionExpiryPrompt.d.ts +25 -0
- package/dist/components/molecules/lumi/SessionExpiryPrompt/index.d.ts +1 -0
- package/dist/components/molecules/lumi/index.d.ts +2 -0
- package/dist/components/organisms/chat/Chat/hooks/useAutoScroll.d.ts +6 -0
- package/dist/components/organisms/chat/Chat/hooks/useChatHandlers.d.ts +1 -2
- package/dist/components/organisms/chat/Chat/hooks/useInputFocus.d.ts +1 -0
- package/dist/components/organisms/lumi/DashboardSidebar/types.d.ts +13 -0
- package/dist/components/organisms/lumi/SessionExpiryPrompt/SessionExpiryPrompt.d.ts +24 -0
- package/dist/components/organisms/lumi/SessionExpiryPrompt/index.d.ts +1 -0
- package/dist/components/organisms/lumi/index.d.ts +1 -0
- package/dist/components/templates/lumi/Crud/Crud.d.ts +1 -1
- package/dist/components/templates/lumi/Crud/types.d.ts +27 -0
- package/dist/core/chat/ChatConfigContext.d.ts +18 -0
- package/dist/core/chat/chatMessage.d.ts +3 -0
- package/dist/core/constants/chat.d.ts +1 -0
- package/dist/core/constants/lumi.d.ts +4 -0
- package/dist/core/eventBus/chatEventBus.d.ts +84 -0
- package/dist/core/eventBus/fleetCache.d.ts +3 -0
- package/dist/core/eventBus/index.d.ts +2 -1
- package/dist/core/types.d.ts +7 -0
- package/dist/index.d.ts +24 -1
- package/dist/index.esm.js +17281 -13767
- package/dist/index.js +17294 -13765
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/src/styles/domains/_chat.scss +10 -0
- package/src/styles/index.scss +20 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SessionExpiryPromptProps {
|
|
3
|
+
/** Controlado por el consumidor: este componente no decide cuándo aparecer. */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Segundos que quedan; se muestran para que la urgencia sea un dato, no una sensación. */
|
|
6
|
+
secondsLeft?: number;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
continueLabel?: string;
|
|
10
|
+
endLabel?: string;
|
|
11
|
+
onContinue: () => void;
|
|
12
|
+
onEnd: () => void;
|
|
13
|
+
}
|
|
14
|
+
/** SPEC-029 B2 — aviso de sesión por expirar.
|
|
15
|
+
*
|
|
16
|
+
* ORGANISMO — no inventa nada visual: compone la molécula `BottomSheet` (la hoja y su capa) y
|
|
17
|
+
* el átomo `Button` (las dos salidas). Lo único suyo es el CONTENIDO y la jerarquía de las
|
|
18
|
+
* decisiones. Si mañana el sistema cambia sus botones o sus hojas, este aviso cambia solo.
|
|
19
|
+
*
|
|
20
|
+
* Y es tonto: no sabe qué es un token, ni cuándo vence, ni a quién hay que preguntarle. Recibe
|
|
21
|
+
* `open` y devuelve dos decisiones; quién decide mostrarlo es el host, que conoce la política.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SessionExpiryPrompt: React.FC<SessionExpiryPromptProps>;
|
|
24
|
+
export default SessionExpiryPrompt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SessionExpiryPrompt, type SessionExpiryPromptProps } from './SessionExpiryPrompt';
|
|
@@ -8,3 +8,4 @@ export { BaseNavbar, type BaseNavbarProps, } from './BaseNavbar';
|
|
|
8
8
|
export { BaseWorkspace, type BaseWorkspaceProps, } from './BaseWorkspace';
|
|
9
9
|
export { Calendar, type CalendarProps, type CalendarEvent, type CalendarView, type SlotInfo, type EventColorConfig, } from './Calendar';
|
|
10
10
|
export { Stepper, StepIndicator, type StepperProps, type StepConfig, type StepStatus, type StepperHeaderRenderProps, type StepperFooterRenderProps, } from './Stepper';
|
|
11
|
+
export { SessionExpiryPrompt, type SessionExpiryPromptProps } from './SessionExpiryPrompt';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CrudProps } from './types';
|
|
2
2
|
import './Crud.scss';
|
|
3
|
-
export declare function Crud<T extends Record<string, unknown>>({ size, showActionBar, actionBarMode, renderByFields, dataSource, filters, total, onCreate, onEdit, onDelete, onView, onPaginationChange, onFilterChange, validationSchema, getRowKey, labels, disabledActions, loading, filterFields, defaultFilters, tableHeight, hidePagination, formDrawerWidth, formColumns, showRowActions, rowActionTypes, rowActions, customActions, customDrawers, onCustomAction, className, 'data-testid': testId, }: CrudProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function Crud<T extends Record<string, unknown>>({ size, showActionBar, actionBarMode, autoOpenCreate, formOnly, createDefaults, onCreateClose, renderByFields, dataSource, filters, total, onCreate, onEdit, onDelete, onView, onPaginationChange, onFilterChange, validationSchema, getRowKey, labels, disabledActions, loading, filterFields, defaultFilters, tableHeight, tableScroll, hidePagination, formDrawerWidth, formColumns, showRowActions, rowActionTypes, rowActions, customActions, customDrawers, onCustomAction, className, 'data-testid': testId, }: CrudProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare namespace Crud {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
|
@@ -77,6 +77,12 @@ export interface CrudLabels {
|
|
|
77
77
|
editTitle?: string;
|
|
78
78
|
viewTitle?: string;
|
|
79
79
|
emptyText?: string;
|
|
80
|
+
confirmTitle?: string;
|
|
81
|
+
confirmCreate?: string;
|
|
82
|
+
confirmEdit?: string;
|
|
83
|
+
/** Botón que confirma de verdad. Separado de `saveButton` (el del formulario) porque son dos
|
|
84
|
+
* pasos distintos: uno propone, el otro envía. */
|
|
85
|
+
confirmButton?: string;
|
|
80
86
|
}
|
|
81
87
|
/**
|
|
82
88
|
* Configuración de una acción personalizada para el ActionBar
|
|
@@ -141,6 +147,17 @@ export interface CrudProps<T extends Record<string, unknown>> {
|
|
|
141
147
|
showActionBar?: boolean;
|
|
142
148
|
/** Modo del ActionBar: 'full' muestra todos los botones, 'minimal' solo Filtro + Crear */
|
|
143
149
|
actionBarMode?: 'full' | 'minimal';
|
|
150
|
+
/** SPEC-015 — abre directo el drawer de "crear" al montar (home del aliado: solicitar servicio). */
|
|
151
|
+
autoOpenCreate?: boolean;
|
|
152
|
+
/** SPEC-077 — monta el CRUD SOLO para su formulario: sin tabla, sin barra de acciones y sin
|
|
153
|
+
* paginación. Quien llega por el chat a pedir una grúa no pidió una tabla. */
|
|
154
|
+
formOnly?: boolean;
|
|
155
|
+
/** SPEC-073 — valores con los que abrir el formulario de CREAR. Solo lo que el usuario ya dijo;
|
|
156
|
+
* el formulario sigue siendo suyo: los ve, los corrige y pulsa Guardar él. */
|
|
157
|
+
createDefaults?: Record<string, unknown>;
|
|
158
|
+
/** SPEC-016 — en modo autoOpenCreate, se invoca cuando el usuario CIERRA/cancela el form de crear sin
|
|
159
|
+
* crear. Permite al consumidor cerrar todo el overlay (volver al chat) en vez de dejar ver la tabla. */
|
|
160
|
+
onCreateClose?: () => void;
|
|
144
161
|
/** Configuración de los campos a renderizar en la tabla y formulario */
|
|
145
162
|
renderByFields: RenderFieldConfig[];
|
|
146
163
|
/** Fuente de datos para la tabla */
|
|
@@ -183,6 +200,16 @@ export interface CrudProps<T extends Record<string, unknown>> {
|
|
|
183
200
|
defaultFilters?: FilterManager[];
|
|
184
201
|
/** Altura de la tabla (se aplica directamente a la molécula Table) */
|
|
185
202
|
tableHeight?: number | string;
|
|
203
|
+
/**
|
|
204
|
+
* Scroll de la tabla (se pasa tal cual a la molécula Table).
|
|
205
|
+
* `x` es OBLIGATORIO para que funcionen las columnas `fixed` y para el
|
|
206
|
+
* scroll horizontal responsive (si el contenedor es más angosto que `x`,
|
|
207
|
+
* aparece scroll; si es más ancho, la tabla se estira). Ej: `{ x: 1100 }`.
|
|
208
|
+
*/
|
|
209
|
+
tableScroll?: {
|
|
210
|
+
x?: number | string;
|
|
211
|
+
y?: number | string;
|
|
212
|
+
};
|
|
186
213
|
/** Ocultar paginación incluso si all_data es false */
|
|
187
214
|
hidePagination?: boolean;
|
|
188
215
|
/** Ancho del drawer de formulario */
|
|
@@ -24,6 +24,11 @@ export interface ChatConfig {
|
|
|
24
24
|
showCloseButton: boolean;
|
|
25
25
|
/** Whether to show role labels ("User", "Assistant") on messages */
|
|
26
26
|
showRoleLabels: boolean;
|
|
27
|
+
/** Textos de los labels de rol (permite localizar). Default: "User" / "Assistant". */
|
|
28
|
+
roleLabels?: {
|
|
29
|
+
user?: string;
|
|
30
|
+
assistant?: string;
|
|
31
|
+
};
|
|
27
32
|
/** Whether to show the attachment button */
|
|
28
33
|
showAttachmentButton: boolean;
|
|
29
34
|
/** Whether to show the microphone button */
|
|
@@ -34,6 +39,19 @@ export interface ChatConfig {
|
|
|
34
39
|
enableStreamingEffect: boolean;
|
|
35
40
|
/** Whether the chat should fit its container (true) or use full viewport height (false) */
|
|
36
41
|
contained: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* SPEC-001: resuelve la config de un módulo `ReactiveCrud` por su key. Lo provee el host
|
|
44
|
+
* (el front, p.ej. towing-web) leyendo su registro de módulos — fuente única de la config.
|
|
45
|
+
* Permite que el LLM emita `{type:'reactive_crud', props:{module:'services'}}` y el front hidrate.
|
|
46
|
+
* Se tipa como bag genérico para no acoplar `core` a los tipos del componente.
|
|
47
|
+
*/
|
|
48
|
+
resolveModuleConfig?: (module: string) => Record<string, unknown> | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* SPEC-022: clave de Google Maps JavaScript API para el componente `map_view`. La provee el
|
|
51
|
+
* HOST desde su entorno; no viaja en el payload del LLM (es configuración de despliegue, y el
|
|
52
|
+
* agente no tiene por qué conocerla). Sin ella, `map_view` muestra su estado de error.
|
|
53
|
+
*/
|
|
54
|
+
googleMapsApiKey?: string;
|
|
37
55
|
}
|
|
38
56
|
export declare const CHAT_CONFIG_DEFAULTS: ChatConfig;
|
|
39
57
|
export interface ChatConfigProviderProps {
|
|
@@ -8,4 +8,7 @@ export interface ChatMessage {
|
|
|
8
8
|
date: Date;
|
|
9
9
|
status?: MessageStatusType;
|
|
10
10
|
files?: CoreFile[];
|
|
11
|
+
/** SPEC-004 — mensaje proactivo (llegó sin que el usuario enviara nada): muestra el divider
|
|
12
|
+
* "Nuevo mensaje" encima que se desvanece a los ~4s (manteniendo el espacio, sin brincar). */
|
|
13
|
+
proactive?: boolean;
|
|
11
14
|
}
|
|
@@ -26,6 +26,7 @@ export declare const COMPONENT_TYPES: {
|
|
|
26
26
|
readonly AVATAR: "avatar";
|
|
27
27
|
readonly LINK: "link";
|
|
28
28
|
readonly SELECT: "select";
|
|
29
|
+
readonly SELECT_MENU: "select-menu";
|
|
29
30
|
readonly TEXTAREA: "textarea";
|
|
30
31
|
readonly ICON: "icon";
|
|
31
32
|
readonly AUDIO_WAVES: "audio-waves";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const COMPONENT_PREFIX = "px-lumi-";
|
|
2
2
|
export declare const getPrefixedClass: (baseClass: string) => string;
|
|
3
|
+
export declare const NATIVE_SCROLL_ATTR = "data-native-scroll";
|
|
3
4
|
export declare const SIZES: {
|
|
4
5
|
readonly SMALL: "small";
|
|
5
6
|
readonly MEDIUM: "medium";
|
|
@@ -10,6 +11,7 @@ export declare const VARIANTS: {
|
|
|
10
11
|
readonly SECONDARY: "secondary";
|
|
11
12
|
readonly GHOST: "ghost";
|
|
12
13
|
readonly ICON: "icon";
|
|
14
|
+
readonly DANGER: "danger";
|
|
13
15
|
};
|
|
14
16
|
export declare const STATES: {
|
|
15
17
|
readonly LOADING: "loading";
|
|
@@ -164,6 +166,7 @@ export declare const FILTER_INPUT_TYPES: {
|
|
|
164
166
|
readonly TIME: "time";
|
|
165
167
|
readonly DATETIME: "datetime";
|
|
166
168
|
readonly SELECT: "select";
|
|
169
|
+
readonly DATERANGE: "daterange";
|
|
167
170
|
};
|
|
168
171
|
/**
|
|
169
172
|
* Tipos de condición soportados (del backend FilterManager)
|
|
@@ -178,6 +181,7 @@ export declare const FILTER_CONDITION_TYPES: {
|
|
|
178
181
|
readonly LIKE: "like";
|
|
179
182
|
readonly IN: "in";
|
|
180
183
|
readonly DATE_EQUALS: "date==";
|
|
184
|
+
readonly BETWEEN: "between";
|
|
181
185
|
};
|
|
182
186
|
export type LumiPresetSize = (typeof SIZES)[keyof typeof SIZES];
|
|
183
187
|
export type LumiSize = LumiPresetSize | (string & {});
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import type { ChatMessage } from '../chat/chatMessage';
|
|
2
2
|
import type { CoreFile } from '../types';
|
|
3
|
+
/** SPEC-025 — dónde está un conductor ahora mismo, y qué servicios lo justifican.
|
|
4
|
+
* `source` distingue una posición real de una simulada: si no se pudiera, algún día se
|
|
5
|
+
* despacharía una grúa creyendo en un punto inventado. */
|
|
6
|
+
export interface FleetPosition {
|
|
7
|
+
driver_id: string;
|
|
8
|
+
lat: number;
|
|
9
|
+
lng: number;
|
|
10
|
+
heading?: number | null;
|
|
11
|
+
speed_mps?: number | null;
|
|
12
|
+
source?: 'GPS' | 'SIMULATED' | string;
|
|
13
|
+
recorded_at?: string | null;
|
|
14
|
+
services?: Array<{
|
|
15
|
+
id: string;
|
|
16
|
+
service_number?: string;
|
|
17
|
+
status?: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
3
20
|
export declare const CHAT_EVENT: {
|
|
4
21
|
readonly COMPONENT_INTERACTION: "componentInteraction";
|
|
5
22
|
readonly MESSAGES_UPDATED: "messagesUpdated";
|
|
@@ -12,11 +29,25 @@ export declare const CHAT_EVENT: {
|
|
|
12
29
|
readonly CLOSE: "close";
|
|
13
30
|
readonly FETCH_REQUEST: "fetchRequest";
|
|
14
31
|
readonly FETCH_RESPONSE: "fetchResponse";
|
|
32
|
+
readonly MEDIA_UPLOAD_REQUEST: "mediaUploadRequest";
|
|
33
|
+
readonly MEDIA_UPLOAD_RESPONSE: "mediaUploadResponse";
|
|
15
34
|
readonly FORM_SUBMIT: "formSubmit";
|
|
16
35
|
readonly FORM_TRACE: "formTrace";
|
|
17
36
|
readonly AGENT_EVENT: "agentEvent";
|
|
18
37
|
readonly STREAM_CHUNK: "streamChunk";
|
|
19
38
|
readonly MESSAGE_SAVED: "messageSaved";
|
|
39
|
+
readonly NEW_CHAT: "newChat";
|
|
40
|
+
readonly OPEN_CHAT: "openChat";
|
|
41
|
+
readonly NAVIGATE: "navigate";
|
|
42
|
+
readonly FLEET_POSITIONS: "fleetPositions";
|
|
43
|
+
readonly DATA_CHANGED: "dataChanged";
|
|
44
|
+
readonly MENU_TOGGLE: "menuToggle";
|
|
45
|
+
readonly NOTIFICATIONS_TOGGLE: "notificationsToggle";
|
|
46
|
+
readonly SETTINGS_TOGGLE: "settingsToggle";
|
|
47
|
+
readonly CHAT_CLOSED: "chatClosed";
|
|
48
|
+
readonly REOPEN_CHAT: "reopenChat";
|
|
49
|
+
readonly CHAT_STATUS: "chatStatus";
|
|
50
|
+
readonly CONVERSATIONS_UPDATED: "conversationsUpdated";
|
|
20
51
|
};
|
|
21
52
|
export type ChatEvents = {
|
|
22
53
|
/** UI component interaction (select, confirm, etc.) */
|
|
@@ -77,6 +108,18 @@ export type ChatEvents = {
|
|
|
77
108
|
data: unknown;
|
|
78
109
|
httpError?: string;
|
|
79
110
|
};
|
|
111
|
+
/** SPEC-002: ReactiveCrud -> Consumer: sube un binario al media/file-manager */
|
|
112
|
+
mediaUploadRequest: {
|
|
113
|
+
requestId: string;
|
|
114
|
+
file: File;
|
|
115
|
+
fileType: string;
|
|
116
|
+
};
|
|
117
|
+
/** SPEC-002: Consumer -> ReactiveCrud: media_file_id resultante (o error) */
|
|
118
|
+
mediaUploadResponse: {
|
|
119
|
+
requestId: string;
|
|
120
|
+
mediaId?: string;
|
|
121
|
+
httpError?: string;
|
|
122
|
+
};
|
|
80
123
|
/** ReactiveForm -> Consumer: form was submitted */
|
|
81
124
|
formSubmit: {
|
|
82
125
|
formType: string;
|
|
@@ -108,6 +151,47 @@ export type ChatEvents = {
|
|
|
108
151
|
chatId: string;
|
|
109
152
|
messageId?: string;
|
|
110
153
|
};
|
|
154
|
+
/** SPEC-003 T0: ChatFloatingActions -> Consumer: crear un chat nuevo */
|
|
155
|
+
newChat: null;
|
|
156
|
+
/** SPEC-003 T0: ChatFloatingActions/ChatNavigator -> Consumer: abrir un chat existente (SPEC-028).
|
|
157
|
+
* `closed` lo propaga el ChatNavigator para que el host sepa si debe abrir en modo cerrado. */
|
|
158
|
+
openChat: {
|
|
159
|
+
chatId: string;
|
|
160
|
+
closed?: boolean;
|
|
161
|
+
};
|
|
162
|
+
navigate: {
|
|
163
|
+
route: string;
|
|
164
|
+
};
|
|
165
|
+
fleetPositions: {
|
|
166
|
+
positions: FleetPosition[];
|
|
167
|
+
};
|
|
168
|
+
/** SPEC-064: Host -> componentes: «algo cambió, vuelve a pedir». Sin carga útil a propósito —
|
|
169
|
+
* el que escucha recarga por su propio endpoint, ya scopeado. */
|
|
170
|
+
dataChanged: null;
|
|
171
|
+
/** SPEC-003 T0: ChatFloatingActions -> Consumer: toggle del drawer de menú (☰) */
|
|
172
|
+
menuToggle: null;
|
|
173
|
+
/** SPEC-003 T0: ChatFloatingActions -> Consumer: toggle del panel de notificaciones (🔔) */
|
|
174
|
+
notificationsToggle: null;
|
|
175
|
+
/** SPEC-003 T0: ChatFloatingActions -> Consumer: toggle del panel de configuración (⚙️) */
|
|
176
|
+
settingsToggle: null;
|
|
177
|
+
/** SPEC-028 T7: Consumer -> Chat: el chat activo está cerrado/abierto (input off + Continuar) */
|
|
178
|
+
chatClosed: {
|
|
179
|
+
closed: boolean;
|
|
180
|
+
};
|
|
181
|
+
/** SPEC-028 T7: Chat -> Consumer: el usuario pidió reabrir el chat cerrado (Continuar) */
|
|
182
|
+
reopenChat: null;
|
|
183
|
+
/** SPEC-029 B1: Consumer -> Chat: estado de escritura del chat activo (derivado de `chat_status`
|
|
184
|
+
* del snapshot). `readOnly` deshabilita SOLO el input de texto; las cards siguen clickeables.
|
|
185
|
+
* `reason`: 'system' (panel operativo, chat del sistema) | 'not_owner' (chat ajeno, solo lectura). */
|
|
186
|
+
chatStatus: {
|
|
187
|
+
readOnly: boolean;
|
|
188
|
+
reason?: 'system' | 'not_owner' | 'closed' | null;
|
|
189
|
+
};
|
|
190
|
+
/** SPEC-005: Backend(host) -> ChatNavigator: snapshot en vivo de la lista de conversaciones
|
|
191
|
+
* (incluye unread_proactive_count). El host abre el WS; el navegador solo escucha. */
|
|
192
|
+
conversationsUpdated: {
|
|
193
|
+
items: unknown[];
|
|
194
|
+
};
|
|
111
195
|
/** ReactiveForm -> Consumer: trace info for observability */
|
|
112
196
|
formTrace: {
|
|
113
197
|
chatId: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { createEventBus } from './createEventBus';
|
|
2
2
|
export { chatEventBus, CHAT_EVENT } from './chatEventBus';
|
|
3
|
-
export type { ChatEvents, ChatEventBus } from './chatEventBus';
|
|
3
|
+
export type { ChatEvents, ChatEventBus, FleetPosition } from './chatEventBus';
|
|
4
|
+
export { setLastFleetSnapshot, getLastFleetSnapshot } from './fleetCache';
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export interface CoreFile extends File {
|
|
2
|
+
/** URL personalizada para archivos remotos (presigned S3, CDN, etc.). */
|
|
2
3
|
url?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Callback opcional para re-resolver la URL cuando expiró (típico en presigned
|
|
6
|
+
* S3 con TTL). Si el <img> falla al cargar, FileViewer llama esta función y
|
|
7
|
+
* usa la nueva URL. Se invoca UNA VEZ por file para evitar loops.
|
|
8
|
+
*/
|
|
9
|
+
refetchUrl?: () => Promise<string>;
|
|
3
10
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export { Select as ChatSelect, type SelectProps as ChatSelectProps, type SelectO
|
|
|
15
15
|
export { default as ChatAssistantMessage } from './components/molecules/chat/AssistantMessage/AssistantMessage';
|
|
16
16
|
export { default as ChatAssistantThinkingIndicator } from './components/molecules/chat/AssistantThinkingIndicator/AssistantThinkingIndicator';
|
|
17
17
|
export { default as ChatHeaderComponent } from './components/molecules/chat/ChatHeader/ChatHeader';
|
|
18
|
+
export { ChatFloatingActions } from './components/molecules/chat/ChatFloatingActions';
|
|
19
|
+
export type { ChatFloatingActionsProps, ChatFloatingButton } from './components/molecules/chat/ChatFloatingActions';
|
|
18
20
|
export { default as ChatInputComponent } from './components/molecules/chat/ChatInput/ChatInput';
|
|
19
21
|
export { default as ChatFileViewer } from './components/molecules/chat/FileViewer/FileViewer';
|
|
20
22
|
export { default as ChatFullscreenViewer } from './components/molecules/chat/FullscreenViewer/FullscreenViewer';
|
|
@@ -23,6 +25,22 @@ export { default as ChatModal } from './components/molecules/chat/Modal/Modal';
|
|
|
23
25
|
export { default as ChatUserAttachments } from './components/molecules/chat/UserAttachments/UserAttachments';
|
|
24
26
|
export { default as ChatUserMessage } from './components/molecules/chat/UserMessage/UserMessage';
|
|
25
27
|
export { StructuredContent as ChatStructuredContent, type StructuredContentProps as ChatStructuredContentProps } from './components/molecules/chat/StructuredContent';
|
|
28
|
+
export { ServiceShortcuts } from './components/molecules/chat/StructuredContent/components/ServiceShortcuts/ServiceShortcuts';
|
|
29
|
+
export type { ServiceShortcut, ServiceShortcutsProps } from './components/molecules/chat/StructuredContent/components/ServiceShortcuts/ServiceShortcuts';
|
|
30
|
+
export { ServicesMap } from './components/molecules/chat/StructuredContent/components/ServicesMap/ServicesMap';
|
|
31
|
+
export type { ServicesMapConfig } from './components/molecules/chat/StructuredContent/components/ServicesMap/types';
|
|
32
|
+
export { LocationField } from './components/molecules/chat/StructuredContent/components/LocationField/LocationField';
|
|
33
|
+
export type { LocationValue, LocationSource } from './components/molecules/chat/StructuredContent/components/LocationField/types';
|
|
34
|
+
export { FileField } from './components/molecules/chat/StructuredContent/components/FileField/FileField';
|
|
35
|
+
export type { FileEntry, FileEntryStatus } from './components/molecules/chat/StructuredContent/components/FileField/types';
|
|
36
|
+
export { MapView } from './components/molecules/chat/StructuredContent/components/MapView/MapView';
|
|
37
|
+
export type { MapPoint, MapViewProps, MapViewLabels } from './components/molecules/chat/StructuredContent/components/MapView/types';
|
|
38
|
+
export { ChatNavigator } from './components/molecules/chat/StructuredContent/components/ChatNavigator/ChatNavigator';
|
|
39
|
+
export type { ChatNavigatorConfig, ChatNavigatorItem, ChatNavigatorEndpoint } from './components/molecules/chat/StructuredContent/components/ChatNavigator/types';
|
|
40
|
+
export { UserTools } from './components/molecules/chat/StructuredContent/components/UserTools/UserTools';
|
|
41
|
+
export type { UserToolsConfig, UserToolItem } from './components/molecules/chat/StructuredContent/components/UserTools/types';
|
|
42
|
+
export { ReactiveCrud } from './components/molecules/chat/StructuredContent/components/ReactiveCrud/ReactiveCrud';
|
|
43
|
+
export type { ReactiveCrudConfig, ReactiveCrudField, RowActionDef, EndpointRef, CrudMolecule, CrudFieldOptionsEndpoint, RowActionVisibleWhen, } from './components/molecules/chat/StructuredContent/components/ReactiveCrud/types';
|
|
26
44
|
export { Chat } from './components/organisms/chat/Chat';
|
|
27
45
|
export type { ChatProps } from './components/organisms/chat/Chat';
|
|
28
46
|
export type { ChatMessage } from './core/chat';
|
|
@@ -45,6 +63,10 @@ export { Loader as LumiLoader, type LoaderProps as LumiLoaderProps } from './com
|
|
|
45
63
|
export { TextArea as LumiTextArea, type TextAreaProps as LumiTextAreaProps, type TextAreaSize as LumiTextAreaSize, type TextAreaVariant as LumiTextAreaVariant, type TextAreaResize as LumiTextAreaResize, } from './components/atoms/lumi/TextArea';
|
|
46
64
|
export { Checkbox as LumiFormCheckbox, type FormCheckboxProps, Input as LumiFormInput, type FormInputProps, Select as LumiFormSelect, type FormSelectProps, DateInput as LumiFormDateInput, type DateInputProps as LumiFormDateInputProps, TimeInput as LumiFormTimeInput, type TimeInputProps as LumiFormTimeInputProps, } from './components/molecules/lumi';
|
|
47
65
|
export { Drawer as LumiDrawer, type DrawerProps as LumiDrawerProps, } from './components/molecules/lumi';
|
|
66
|
+
export { Card as LumiCard, type CardProps as LumiCardProps } from './components/atoms/lumi';
|
|
67
|
+
export { BottomSheet, type BottomSheetProps } from './components/molecules/lumi';
|
|
68
|
+
export { LiveIndicator, type LiveIndicatorProps, type LiveIndicatorTone } from './components/molecules/lumi';
|
|
69
|
+
export { SessionExpiryPrompt, type SessionExpiryPromptProps, } from './components/organisms/lumi';
|
|
48
70
|
export { Table as LumiTable, type TableProps as LumiTableProps, type ColumnUI as LumiColumnUI, type ChangeInfo as LumiChangeInfo, } from './components/molecules/lumi';
|
|
49
71
|
export { Menu as LumiMenu, MenuItem as LumiMenuItem, SubMenu as LumiSubMenu, MenuItemGroup as LumiMenuItemGroup, type MenuProps as LumiMenuProps, type MenuItemProps as LumiMenuItemProps, type SubMenuProps as LumiSubMenuProps, type MenuItemGroupProps as LumiMenuItemGroupProps, type MenuItemData as LumiMenuItemData, type SelectInfo as LumiMenuSelectInfo, } from './components/molecules/lumi';
|
|
50
72
|
export { Breadcrumb as LumiBreadcrumb, BreadcrumbItem as LumiBreadcrumbItem, BreadcrumbSeparator as LumiBreadcrumbSeparator, type BreadcrumbProps as LumiBreadcrumbProps, type BreadcrumbItemProps as LumiBreadcrumbItemProps, type BreadcrumbSeparatorProps as LumiBreadcrumbSeparatorProps, type BreadcrumbItemType as LumiBreadcrumbItemType, type BreadcrumbSize as LumiBreadcrumbSize, type BreadcrumbItemMenu as LumiBreadcrumbItemMenu, type BreadcrumbItemDropdownItem as LumiBreadcrumbItemDropdownItem, } from './components/molecules/lumi';
|
|
@@ -65,6 +87,7 @@ export { Dashboard as LumiDashboard, type DashboardProps as LumiDashboardProps,
|
|
|
65
87
|
export { Base as LumiBase, type BaseProps as LumiBaseProps, } from './components/templates/lumi';
|
|
66
88
|
export { createStore, createStoreMerger, createDeepPropertySubscriber, deepMerge } from './core/store';
|
|
67
89
|
export { createEventBus, chatEventBus, CHAT_EVENT } from './core/eventBus';
|
|
68
|
-
export
|
|
90
|
+
export { setLastFleetSnapshot, getLastFleetSnapshot } from './core/eventBus';
|
|
91
|
+
export type { ChatEvents, ChatEventBus, FleetPosition } from './core/eventBus';
|
|
69
92
|
export { ChatConfigProvider, useChatConfig, CHAT_CONFIG_DEFAULTS } from './core/chat';
|
|
70
93
|
export type { ChatConfig } from './core/chat';
|