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.
Files changed (93) hide show
  1. package/dist/components/atoms/chat/Icon/Icon.d.ts +4 -0
  2. package/dist/components/atoms/lumi/Button/Button.d.ts +2 -0
  3. package/dist/components/atoms/lumi/Card/Card.d.ts +12 -0
  4. package/dist/components/atoms/lumi/Card/index.d.ts +3 -0
  5. package/dist/components/atoms/lumi/Card/types.d.ts +32 -0
  6. package/dist/components/atoms/lumi/Icon/Icon.d.ts +3 -0
  7. package/dist/components/atoms/lumi/Input/Input.d.ts +2 -0
  8. package/dist/components/atoms/lumi/index.d.ts +1 -0
  9. package/dist/components/molecules/chat/ChatFloatingActions/ChatFloatingActions.d.ts +42 -0
  10. package/dist/components/molecules/chat/ChatFloatingActions/index.d.ts +2 -0
  11. package/dist/components/molecules/chat/FileViewer/FileViewer.d.ts +2 -1
  12. package/dist/components/molecules/chat/FullscreenViewer/FullscreenViewer.d.ts +2 -1
  13. package/dist/components/molecules/chat/NewMessageDivider/NewMessageDivider.d.ts +6 -0
  14. package/dist/components/molecules/chat/StructuredContent/components/ActionMenu/ActionMenu.d.ts +3 -0
  15. package/dist/components/molecules/chat/StructuredContent/components/Cart/Cart.d.ts +3 -0
  16. package/dist/components/molecules/chat/StructuredContent/components/ChatNavigator/ChatNavigator.d.ts +8 -0
  17. package/dist/components/molecules/chat/StructuredContent/components/ChatNavigator/ChatNavigatorChat.d.ts +3 -0
  18. package/dist/components/molecules/chat/StructuredContent/components/ChatNavigator/chatNavigatorChips.d.ts +7 -0
  19. package/dist/components/molecules/chat/StructuredContent/components/ChatNavigator/types.d.ts +88 -0
  20. package/dist/components/molecules/chat/StructuredContent/components/FileField/FileField.d.ts +4 -0
  21. package/dist/components/molecules/chat/StructuredContent/components/FileField/types.d.ts +19 -0
  22. package/dist/components/molecules/chat/StructuredContent/components/LocationField/LocationField.d.ts +4 -0
  23. package/dist/components/molecules/chat/StructuredContent/components/LocationField/types.d.ts +32 -0
  24. package/dist/components/molecules/chat/StructuredContent/components/LocationField/usePlaces.d.ts +19 -0
  25. package/dist/components/molecules/chat/StructuredContent/components/MapView/MapView.d.ts +4 -0
  26. package/dist/components/molecules/chat/StructuredContent/components/MapView/MapViewChat.d.ts +3 -0
  27. package/dist/components/molecules/chat/StructuredContent/components/MapView/markerIcons.d.ts +9 -0
  28. package/dist/components/molecules/chat/StructuredContent/components/MapView/types.d.ts +90 -0
  29. package/dist/components/molecules/chat/StructuredContent/components/MapView/useGoogleMaps.d.ts +8 -0
  30. package/dist/components/molecules/chat/StructuredContent/components/ProductCard/ProductCard.d.ts +3 -0
  31. package/dist/components/molecules/chat/StructuredContent/components/ProductCarousel/ProductCarousel.d.ts +3 -0
  32. package/dist/components/molecules/chat/StructuredContent/components/ProductManager/ProductManager.d.ts +3 -0
  33. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/ActionFormDrawer.d.ts +12 -0
  34. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/DetailDrawer.d.ts +18 -0
  35. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/PriceNegotiationChat.d.ts +4 -0
  36. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/ReactiveCrud.d.ts +20 -0
  37. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/ReactiveCrudChat.d.ts +4 -0
  38. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/ReactiveCrudItemChat.d.ts +4 -0
  39. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/buildCrudYupSchema.d.ts +3 -0
  40. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/formatters.d.ts +4 -0
  41. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/optionsLoader.d.ts +5 -0
  42. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/types.d.ts +148 -0
  43. package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/useReactiveCrud.d.ts +19 -0
  44. package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/ReactiveMap.d.ts +12 -0
  45. package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/ReactiveMapChat.d.ts +3 -0
  46. package/dist/components/molecules/chat/StructuredContent/components/ReactiveMap/types.d.ts +36 -0
  47. package/dist/components/molecules/chat/StructuredContent/components/ServiceShortcuts/ServiceShortcuts.d.ts +21 -0
  48. package/dist/components/molecules/chat/StructuredContent/components/ServiceShortcuts/ServiceShortcutsChat.d.ts +3 -0
  49. package/dist/components/molecules/chat/StructuredContent/components/ServicesMap/ServicesMap.d.ts +14 -0
  50. package/dist/components/molecules/chat/StructuredContent/components/ServicesMap/ServicesMapChat.d.ts +3 -0
  51. package/dist/components/molecules/chat/StructuredContent/components/ServicesMap/outliers.d.ts +14 -0
  52. package/dist/components/molecules/chat/StructuredContent/components/ServicesMap/types.d.ts +54 -0
  53. package/dist/components/molecules/chat/StructuredContent/components/UserTools/UserTools.d.ts +10 -0
  54. package/dist/components/molecules/chat/StructuredContent/components/UserTools/UserToolsChat.d.ts +3 -0
  55. package/dist/components/molecules/chat/StructuredContent/components/UserTools/types.d.ts +17 -0
  56. package/dist/components/molecules/chat/StructuredContent/components/index.d.ts +22 -0
  57. package/dist/components/molecules/chat/StructuredContent/helpers/types.d.ts +2 -0
  58. package/dist/components/molecules/chat/StructuredContent/helpers/uploadViaEventBus.d.ts +2 -0
  59. package/dist/components/molecules/lumi/BottomSheet/BottomSheet.d.ts +29 -0
  60. package/dist/components/molecules/lumi/BottomSheet/index.d.ts +1 -0
  61. package/dist/components/molecules/lumi/Drawer/useDrawerKeyboardLock.d.ts +18 -0
  62. package/dist/components/molecules/lumi/Filter/types.d.ts +4 -0
  63. package/dist/components/molecules/lumi/LiveIndicator/LiveIndicator.d.ts +28 -0
  64. package/dist/components/molecules/lumi/LiveIndicator/index.d.ts +1 -0
  65. package/dist/components/molecules/lumi/Menu/types.d.ts +5 -0
  66. package/dist/components/molecules/lumi/SessionExpiryPrompt/SessionExpiryPrompt.d.ts +25 -0
  67. package/dist/components/molecules/lumi/SessionExpiryPrompt/index.d.ts +1 -0
  68. package/dist/components/molecules/lumi/index.d.ts +2 -0
  69. package/dist/components/organisms/chat/Chat/hooks/useAutoScroll.d.ts +6 -0
  70. package/dist/components/organisms/chat/Chat/hooks/useChatHandlers.d.ts +1 -2
  71. package/dist/components/organisms/chat/Chat/hooks/useInputFocus.d.ts +1 -0
  72. package/dist/components/organisms/lumi/DashboardSidebar/types.d.ts +13 -0
  73. package/dist/components/organisms/lumi/SessionExpiryPrompt/SessionExpiryPrompt.d.ts +24 -0
  74. package/dist/components/organisms/lumi/SessionExpiryPrompt/index.d.ts +1 -0
  75. package/dist/components/organisms/lumi/index.d.ts +1 -0
  76. package/dist/components/templates/lumi/Crud/Crud.d.ts +1 -1
  77. package/dist/components/templates/lumi/Crud/types.d.ts +27 -0
  78. package/dist/core/chat/ChatConfigContext.d.ts +18 -0
  79. package/dist/core/chat/chatMessage.d.ts +3 -0
  80. package/dist/core/constants/chat.d.ts +1 -0
  81. package/dist/core/constants/lumi.d.ts +4 -0
  82. package/dist/core/eventBus/chatEventBus.d.ts +84 -0
  83. package/dist/core/eventBus/fleetCache.d.ts +3 -0
  84. package/dist/core/eventBus/index.d.ts +2 -1
  85. package/dist/core/types.d.ts +7 -0
  86. package/dist/index.d.ts +24 -1
  87. package/dist/index.esm.js +17281 -13767
  88. package/dist/index.js +17294 -13765
  89. package/dist/styles.css +1 -1
  90. package/dist/styles.css.map +1 -1
  91. package/package.json +1 -1
  92. package/src/styles/domains/_chat.scss +10 -0
  93. package/src/styles/index.scss +20 -0
@@ -23,6 +23,10 @@ export declare const ICON_TYPES: {
23
23
  readonly CHEVRON_UP: "chevron-up";
24
24
  readonly CHEVRON_DOWN: "chevron-down";
25
25
  readonly CHECK: "check";
26
+ readonly CHECK_CIRCLE: "check-circle";
27
+ readonly MENU: "menu";
28
+ readonly BELL: "bell";
29
+ readonly SETTINGS: "settings";
26
30
  };
27
31
  export type IconType = (typeof ICON_TYPES)[keyof typeof ICON_TYPES];
28
32
  export interface IconProps extends React.SVGProps<SVGSVGElement> {
@@ -12,6 +12,8 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
12
12
  fullWidth?: boolean;
13
13
  /** Icono a mostrar en el botón */
14
14
  icon?: React.ReactNode;
15
+ /** Lado en el que se muestra el icono (por defecto a la izquierda) */
16
+ iconPosition?: 'left' | 'right';
15
17
  }
16
18
  export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
17
19
  export default Button;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { CardProps } from './types';
3
+ /**
4
+ * Superficie del sistema: fondo, radio, relieve y respiración.
5
+ *
6
+ * ÁTOMO — no sabe qué contiene ni cómo se coloca. Quien la usa decide el ancho, la posición y
7
+ * el contenido; la Card solo garantiza que todas las superficies de la aplicación se vean como
8
+ * la misma familia. Antes de existir, cada sitio se pintaba su propio fondo y su propia sombra,
9
+ * que es como los sistemas de diseño se van descosiendo sin que nadie lo note.
10
+ */
11
+ export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
12
+ export default Card;
@@ -0,0 +1,3 @@
1
+ export { Card, Card as LumiCard } from './Card';
2
+ export type { CardProps, CardVariant, CardPadding, CardRadius } from './types';
3
+ export { CARD_VARIANTS, CARD_PADDINGS, CARD_RADII } from './types';
@@ -0,0 +1,32 @@
1
+ import type React from 'react';
2
+ /** Cuánto se despega la tarjeta del fondo. */
3
+ export declare const CARD_VARIANTS: {
4
+ /** Con sombra: flota sobre el contenido (hojas, diálogos, paneles). */
5
+ readonly ELEVATED: "elevated";
6
+ /** Con borde y sin sombra: agrupa dentro de una página que ya es plana. */
7
+ readonly OUTLINED: "outlined";
8
+ /** Solo la superficie: para cuando el contenedor ya aporta el relieve. */
9
+ readonly FLAT: "flat";
10
+ };
11
+ export type CardVariant = (typeof CARD_VARIANTS)[keyof typeof CARD_VARIANTS];
12
+ export declare const CARD_PADDINGS: {
13
+ readonly NONE: "none";
14
+ readonly SMALL: "small";
15
+ readonly MEDIUM: "medium";
16
+ readonly LARGE: "large";
17
+ };
18
+ export type CardPadding = (typeof CARD_PADDINGS)[keyof typeof CARD_PADDINGS];
19
+ export declare const CARD_RADII: {
20
+ readonly NONE: "none";
21
+ readonly MEDIUM: "medium";
22
+ readonly LARGE: "large";
23
+ };
24
+ export type CardRadius = (typeof CARD_RADII)[keyof typeof CARD_RADII];
25
+ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
26
+ variant?: CardVariant;
27
+ padding?: CardPadding;
28
+ radius?: CardRadius;
29
+ /** Ocupa todo el ancho disponible. */
30
+ fullWidth?: boolean;
31
+ children?: React.ReactNode;
32
+ }
@@ -36,11 +36,14 @@ export declare const LUMI_ICON_TYPES: {
36
36
  readonly EYE: "eye";
37
37
  readonly MENU: "menu";
38
38
  readonly ARROW_UP: "arrow-up";
39
+ readonly ARROW_RIGHT: "arrow-right";
39
40
  readonly BUILDING: "building";
40
41
  readonly MAP_PIN: "map-pin";
41
42
  readonly USER_X: "user-x";
42
43
  readonly REFRESH: "refresh";
43
44
  readonly MESSAGE_SQUARE: "message-square";
45
+ readonly MESSAGE_CIRCLE: "message-circle";
46
+ readonly MAP: "map";
44
47
  };
45
48
  export type LumiIconType = (typeof LUMI_ICON_TYPES)[keyof typeof LUMI_ICON_TYPES];
46
49
  export interface IconProps extends React.SVGProps<SVGSVGElement> {
@@ -6,6 +6,8 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
6
6
  error?: string;
7
7
  prefix?: ReactNode;
8
8
  suffix?: ReactNode;
9
+ onSuffixClick?: React.MouseEventHandler<HTMLButtonElement>;
10
+ suffixAriaLabel?: string;
9
11
  allowClear?: boolean;
10
12
  onClear?: () => void;
11
13
  status?: "error" | "warning";
@@ -1,5 +1,6 @@
1
1
  export * from './Badge';
2
2
  export * from './Button';
3
+ export * from './Card';
3
4
  export * from './Checkbox';
4
5
  export * from './CurrencyDisplay';
5
6
  export * from './DateDisplay';
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import type { ChatEventBus } from '../../../../core/eventBus/chatEventBus';
3
+ export interface ChatFloatingButton {
4
+ id: string;
5
+ /** ReactNode (emoji/SVG) o clave de ICON_TYPES de pixelon */
6
+ icon: React.ReactNode | string;
7
+ ariaLabel: string;
8
+ /** CHAT_EVENT que la molécula EMITE por el eventBus al hacer click */
9
+ event: string;
10
+ /** payload opcional del evento (ej. { chatId } en OPEN_CHAT) */
11
+ payload?: unknown;
12
+ /** dropdown que la molécula POSICIONA debajo del botón cuando open===true */
13
+ panel?: React.ReactNode;
14
+ /** apertura del panel — la controla el CONSUMIDOR (reacciona al evento y setea open) */
15
+ open?: boolean;
16
+ /** contador sobre el botón (ej. campana no leídas) */
17
+ badge?: number | string;
18
+ /** estado visual resaltado */
19
+ active?: boolean;
20
+ disabled?: boolean;
21
+ /** SPEC-037 T1 — nodo propio: la molécula lo POSICIONA en la barra y no lo envuelve en el
22
+ * botón redondo. Para lo que no es un icono (una pastilla de estado, un contador con forma).
23
+ * Envolverlo sería además HTML inválido si el nodo trae su propio botón dentro.
24
+ * Con `custom` presente se ignoran `icon`, `badge` y `event`: manda el consumidor. */
25
+ custom?: React.ReactNode;
26
+ }
27
+ export interface ChatFloatingActionsProps {
28
+ /** canal único de eventos (el mismo del <Chat>) */
29
+ eventBus: ChatEventBus;
30
+ /** arriba-izquierda (orden = array) */
31
+ left?: ChatFloatingButton[];
32
+ /** arriba-derecha */
33
+ right?: ChatFloatingButton[];
34
+ /** separación del borde (default 12px) */
35
+ offset?: number;
36
+ /** SPEC-016 — barra tipo "glass": overlay con blur + gradiente que se desvanece hacia el
37
+ * contenido (el chat scrollea por debajo). Requiere que el consumidor deje pasar el contenido
38
+ * bajo la barra (padding-top en el scroll). Default false → barra transparente que reserva alto. */
39
+ glass?: boolean;
40
+ }
41
+ export declare const ChatFloatingActions: React.FC<ChatFloatingActionsProps>;
42
+ export default ChatFloatingActions;
@@ -0,0 +1,2 @@
1
+ export { ChatFloatingActions, default } from './ChatFloatingActions';
2
+ export type { ChatFloatingActionsProps, ChatFloatingButton } from './ChatFloatingActions';
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
+ import type { CoreFile } from '../../../../core/types';
2
3
  export interface FileViewerProps {
3
- files: File[];
4
+ files: CoreFile[];
4
5
  onClose?: () => void;
5
6
  }
6
7
  export declare const FileViewer: React.FC<FileViewerProps>;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
+ import type { CoreFile } from '../../../../core/types';
2
3
  export interface FullscreenViewerProps {
3
4
  isOpen: boolean;
4
5
  onClose: () => void;
5
- files: File[];
6
+ files: CoreFile[];
6
7
  currentIndex: number;
7
8
  onChangeIndex: (newIndex: number) => void;
8
9
  }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const NewMessageDivider: React.FC<{
3
+ label?: string;
4
+ seenLabel?: string;
5
+ }>;
6
+ export default NewMessageDivider;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { ChatComponentProps } from '../../helpers/types';
3
+ export declare const ActionMenu: React.FC<ChatComponentProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { ChatComponentProps } from '../../helpers/types';
3
+ export declare const Cart: React.FC<ChatComponentProps>;
@@ -0,0 +1,8 @@
1
+ import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
2
+ import type { ChatNavigatorConfig } from './types';
3
+ export interface ChatNavigatorProps {
4
+ config: ChatNavigatorConfig;
5
+ eventBus?: ChatEventBus;
6
+ }
7
+ export declare function ChatNavigator({ config, eventBus }: ChatNavigatorProps): import("react/jsx-runtime").JSX.Element;
8
+ export default ChatNavigator;
@@ -0,0 +1,3 @@
1
+ import type { ChatComponentProps } from '../../helpers/types';
2
+ export declare function ChatNavigatorChat({ component, eventBus }: ChatComponentProps): import("react/jsx-runtime").JSX.Element | null;
3
+ export default ChatNavigatorChat;
@@ -0,0 +1,7 @@
1
+ import type { NavFilter } from './types';
2
+ export interface ChipDef {
3
+ key: string;
4
+ label: string;
5
+ }
6
+ export declare const DATE_CHIPS: ChipDef[];
7
+ export declare function chipFilters(chipKey: string, field: string): NavFilter[];
@@ -0,0 +1,88 @@
1
+ import type { FilterFieldConfig } from '../../../../lumi/Filter/types';
2
+ export interface ChatNavigatorEndpoint {
3
+ service: string;
4
+ url: string;
5
+ method: string;
6
+ body?: Record<string, unknown>;
7
+ }
8
+ export interface NavFilter {
9
+ field: string;
10
+ condition: string;
11
+ value: unknown;
12
+ }
13
+ export interface ChatNavigatorConfig {
14
+ title?: string;
15
+ data: {
16
+ list: ChatNavigatorEndpoint;
17
+ rename?: ChatNavigatorEndpoint;
18
+ };
19
+ labels?: {
20
+ emptyText?: string;
21
+ renameTitle?: string;
22
+ closedBadge?: string;
23
+ searchPlaceholder?: string;
24
+ /** SPEC-009 Fase 2 — texto del botón de filtros avanzados (default 'Filtro'). */
25
+ filterButton?: string;
26
+ };
27
+ /** SPEC-006 — tamaño de página (default 10). */
28
+ pageSize?: number;
29
+ /** SPEC-006 — muestra la caja de búsqueda por palabra (título + contenido). */
30
+ search?: boolean;
31
+ /** SPEC-006 — muestra los chips rápidos de fecha (Hoy/Ayer/7d/Mes/Todo). */
32
+ dateChips?: boolean;
33
+ /** SPEC-006 — campo de fecha usado por chips/rango (default 'updated_date'). */
34
+ dateField?: string;
35
+ /** SPEC-006 — filtro avanzado (icono al inicio de los chips → drawer con lumi/Filter,
36
+ * igual que Servicios). Se declaran los campos filtrables; se combinan con chips/búsqueda. */
37
+ advancedFilters?: FilterFieldConfig[];
38
+ /** SPEC-009 — catálogo (value→label+color) del origen del iniciador (rol_code). El consumer
39
+ * aporta labels/colores; si el item trae rol_code con match, se pinta un pill de color. */
40
+ originActorOptions?: Array<{
41
+ value: string;
42
+ label: string;
43
+ color?: string;
44
+ }>;
45
+ /** SPEC-009 Fase 2 — muestra chips rápidos de origen (uno por originActorOptions, toggle) en la
46
+ * fila de chips; filtran por `originActorField`. Requiere originActorOptions. */
47
+ originChips?: boolean;
48
+ /** SPEC-009 Fase 2 — columna por la que filtran los chips de origen (default 'rol_code'). */
49
+ originActorField?: string;
50
+ /** SPEC-010 — si el item trae este campo con valor (ej. 'allied_company_name'), el pill de
51
+ * origen muestra ese texto (nombre de la empresa aliada) en vez del label del catálogo. */
52
+ originActorNameField?: string;
53
+ /** SPEC-058 — campo del item que lleva un valor a etiquetar (ej. 'service_actor'). Se pinta como
54
+ * un pill más, junto al de origen. Genérico a propósito: el catálogo lo pone el consumer, así
55
+ * que este componente no sabe qué significa el valor. */
56
+ tagField?: string;
57
+ /** SPEC-058 — catálogo (value→label+color) de `tagField`. Sin él no se pinta nada. */
58
+ tagOptions?: Array<{
59
+ value: string;
60
+ label: string;
61
+ color?: string;
62
+ }>;
63
+ /** SPEC-065 — catálogo (value→label+color) de `service_status`. Antes este componente traía el
64
+ * enum de towing hardcodeado; el sistema de diseño no tiene por qué saber qué es un servicio de
65
+ * grúa. A diferencia de `tagOptions`, sin catálogo se pinta el valor crudo: el dato lo trae el
66
+ * item y existe igual, así que ocultarlo sería mentir. */
67
+ serviceStatusOptions?: Array<{
68
+ value: string;
69
+ label: string;
70
+ color?: string;
71
+ }>;
72
+ }
73
+ export interface ChatNavigatorItem {
74
+ id: string;
75
+ title?: string | null;
76
+ agent_name?: string | null;
77
+ closed?: boolean;
78
+ /** SPEC-005 — nº de mensajes proactivos sin ver: badge junto al título (tope "100+") */
79
+ unread_proactive_count?: number;
80
+ /** SPEC-007 — estado del servicio de grúa asociado (traído de towing por HTTP) */
81
+ service_status?: string | null;
82
+ /** SPEC-009 — rol del iniciador del chat (origen transversal, viene de chat) */
83
+ rol_code?: string | null;
84
+ /** SPEC-010 — nombre de la empresa aliada (cuando el iniciador es COLLA), lo pone el BFF */
85
+ allied_company_name?: string | null;
86
+ created_date?: string | null;
87
+ updated_date?: string | null;
88
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { FileFieldProps } from './types';
3
+ export declare const FileField: React.FC<FileFieldProps>;
4
+ export default FileField;
@@ -0,0 +1,19 @@
1
+ export type FileEntryStatus = 'idle' | 'uploading' | 'done' | 'error';
2
+ export interface FileEntry {
3
+ name: string;
4
+ status: FileEntryStatus;
5
+ id?: string;
6
+ size?: number;
7
+ }
8
+ export interface FileFieldProps {
9
+ label: string;
10
+ required?: boolean;
11
+ accept?: string;
12
+ multiple?: boolean;
13
+ entries: FileEntry[];
14
+ disabled?: boolean;
15
+ error?: string;
16
+ onFiles: (files: FileList | null) => void | Promise<void>;
17
+ /** Quitar uno de la lista. Sin esto, elegir la foto equivocada obliga a cerrar y empezar. */
18
+ onRemove?: (index: number) => void;
19
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { LocationFieldProps } from './types';
3
+ export declare const LocationField: React.FC<LocationFieldProps>;
4
+ export default LocationField;
@@ -0,0 +1,32 @@
1
+ /** Procedencia de la coordenada. Espeja los valores de la migración v14 de towing. */
2
+ export type LocationSource = 'GPS' | 'SEARCH' | 'GEOCODED' | 'MANUAL';
3
+ export interface LocationValue {
4
+ address?: string;
5
+ lat?: number;
6
+ lng?: number;
7
+ source?: LocationSource;
8
+ }
9
+ export interface LocationFieldLabels {
10
+ useMyLocation?: string;
11
+ locating?: string;
12
+ searchPlaceholder?: string;
13
+ permissionDenied?: string;
14
+ unavailable?: string;
15
+ noResults?: string;
16
+ confirmHint?: string;
17
+ }
18
+ export interface LocationFieldProps {
19
+ value?: LocationValue;
20
+ onChange: (value: LocationValue) => void;
21
+ /** Clave de Maps JS: la inyecta el host, igual que en MapView. */
22
+ apiKey?: string;
23
+ /** Etiqueta del campo: la pinta el propio componente porque DynamicForm no la pasa a CUSTOM. */
24
+ label?: string;
25
+ required?: boolean;
26
+ placeholder?: string;
27
+ labels?: LocationFieldLabels;
28
+ disabled?: boolean;
29
+ /** SPEC-074 — mensaje de validación. Sin esto el campo pintaba el asterisco y se callaba:
30
+ * el único obligatorio de verdad era el único que no sabía decir que faltaba. */
31
+ error?: string;
32
+ }
@@ -0,0 +1,19 @@
1
+ export interface PlaceSuggestion {
2
+ id: string;
3
+ description: string;
4
+ }
5
+ export declare function usePlaceSuggestions(query: string, enabled: boolean): {
6
+ suggestions: PlaceSuggestion[];
7
+ resolve: (id: string) => Promise<{
8
+ lat: number;
9
+ lng: number;
10
+ address: string;
11
+ } | null>;
12
+ clear: () => void;
13
+ };
14
+ /**
15
+ * Traduce una coordenada a una dirección legible.
16
+ * Requiere Geocoding habilitado en la clave del navegador; si no lo está, devuelve null y el
17
+ * campo cae a un texto con las coordenadas — nunca bloquea al usuario por una config de Google.
18
+ */
19
+ export declare function reverseGeocode(lat: number, lng: number): Promise<string | null>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { MapViewProps } from './types';
3
+ export declare const MapView: React.FC<MapViewProps>;
4
+ export default MapView;
@@ -0,0 +1,3 @@
1
+ import type { ChatComponentProps } from '../../helpers/types';
2
+ export declare function MapViewChat({ component, eventBus }: ChatComponentProps): import("react/jsx-runtime").JSX.Element;
3
+ export default MapViewChat;
@@ -0,0 +1,9 @@
1
+ export type MarkerIconName = 'tow-truck' | 'car' | 'dot' | 'flag';
2
+ /** Los vehículos se anclan al CENTRO; los pines, a su punta. Lo necesita quien crea el marcador. */
3
+ export declare const VEHICLE_ICONS: Set<string>;
4
+ export declare function isVehicleIcon(name?: string): boolean;
5
+ /**
6
+ * Devuelve el icono como data URI.
7
+ * @param heading rumbo en grados (0 = norte). Solo aplica a vehículos.
8
+ */
9
+ export declare function buildMarkerIcon(name: string, color?: string, heading?: number): string;
@@ -0,0 +1,90 @@
1
+ import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
2
+ /** Un punto en el mapa. Genérico a propósito: el componente no sabe qué representa. */
3
+ export interface MapPoint {
4
+ id: string;
5
+ lat: number;
6
+ lng: number;
7
+ /** Texto del tooltip nativo del marcador. */
8
+ label?: string;
9
+ /** SPEC-022 — pictograma del marcador: 'tow-truck' | 'dot' | 'flag'. El significado lo pone
10
+ * el consumidor (una grúa, un incidente, una meta); el mapa solo dibuja. */
11
+ icon?: string;
12
+ /** Color del pin (hex). Default rojo. */
13
+ color?: string;
14
+ /** Rumbo en grados (0 = norte) para orientar un icono de vehículo. */
15
+ heading?: number;
16
+ fit?: boolean;
17
+ }
18
+ /** Textos de los estados, para que el consumidor los localice. */
19
+ export interface MapViewLabels {
20
+ /** No hay marcadores que pintar. */
21
+ emptyText?: string;
22
+ /** El mapa no pudo cargar (sin clave, sin red, script bloqueado). */
23
+ errorText?: string;
24
+ /** Cuota diaria agotada (OVER_QUERY_LIMIT / HTTP 429). */
25
+ quotaText?: string;
26
+ /** Mientras carga el SDK. */
27
+ loadingText?: string;
28
+ /** Pista de que el punto se puede mover (solo aparece con `onPointMove`). */
29
+ moveHint?: string;
30
+ /** Accesibilidad de los botones de la capa a pantalla completa. */
31
+ expandAria?: string;
32
+ closeAria?: string;
33
+ }
34
+ /** SPEC-024 — una ruta ya calculada. El mapa solo la dibuja: no sabe de Routes API. */
35
+ export interface MapRoute {
36
+ id: string;
37
+ path: Array<{
38
+ lat: number;
39
+ lng: number;
40
+ }>;
41
+ color?: string;
42
+ width?: number;
43
+ }
44
+ /** Pide rutas por el chatEventBus (como ReactiveCrud pide sus filas): sin HTTP propio.
45
+ * Permite que el LLM mande solo ids en vez de cientos de coordenadas. */
46
+ export interface MapRoutesRequest {
47
+ service: string;
48
+ url: string;
49
+ method?: string;
50
+ /** Un id por ruta; se pide una a una con `{ service_id }`. */
51
+ ids: string[];
52
+ }
53
+ export interface MapViewProps {
54
+ /** Clave de Maps JavaScript API. La inyecta el HOST; el componente no la conoce ni la guarda. */
55
+ apiKey?: string;
56
+ /** Marcadores. Si vienen, el mapa encuadra para que se vean todos. */
57
+ points?: MapPoint[];
58
+ /** Centro cuando no hay puntos. Default: Bogotá. */
59
+ center?: {
60
+ lat: number;
61
+ lng: number;
62
+ };
63
+ /** Zoom inicial cuando no hay puntos (con puntos manda el encuadre). */
64
+ zoom?: number;
65
+ /** Alto del mapa en px. Default 320 (acotado, para no comerse el chat). */
66
+ height?: number;
67
+ labels?: MapViewLabels;
68
+ /** SPEC-023 — permite REPOSICIONAR un punto: arrastrando el marcador, o tocando el mapa
69
+ * cuando hay uno solo. El componente no interpreta el gesto: avisa la nueva coordenada y
70
+ * quien lo monta decide qué significa. Sin este callback el mapa es de solo lectura. */
71
+ onPointMove?: (id: string, lat: number, lng: number) => void;
72
+ followId?: string;
73
+ /** SPEC-024 — trayectos ya calculados. */
74
+ routes?: MapRoute[];
75
+ /** SPEC-024 — o los ids para que el host los resuelva por el bus. */
76
+ routesRequest?: MapRoutesRequest;
77
+ /** Canal por el que se piden las rutas. Sin él, `routesRequest` se ignora. */
78
+ eventBus?: ChatEventBus;
79
+ /** SPEC-022 — botón para abrir el mapa a pantalla completa. Default `true`: dentro del chat
80
+ * el mapa vive en ~370px de ancho, donde diez servicios repartidos por la ciudad no se leen. */
81
+ expandable?: boolean;
82
+ /** Uso INTERNO: la instancia que vive dentro de la capa a pantalla completa. Llena el
83
+ * contenedor, sin bordes ni radio, y no vuelve a ofrecer expandir. */
84
+ fullBleed?: boolean;
85
+ /** SPEC-025 R7 — milisegundos que tarda un marcador en DESPLAZARSE hasta su nueva posición.
86
+ * Sin esto, salta. Con posiciones que llegan cada pocos segundos, saltar se lee como un
87
+ * punto que parpadea en sitios distintos; desplazarse, como un vehículo que avanza. */
88
+ animateMs?: number;
89
+ className?: string;
90
+ }
@@ -0,0 +1,8 @@
1
+ export type MapsStatus = 'idle' | 'loading' | 'ready' | 'error';
2
+ /**
3
+ * Carga el SDK de Google Maps y reporta en qué estado está.
4
+ * Sin `apiKey` no intenta nada y queda en 'error': es un fallo de configuración del host,
5
+ * no un fallo transitorio, y la UI debe decirlo en vez de quedarse cargando para siempre.
6
+ */
7
+ export declare function useGoogleMaps(apiKey?: string): MapsStatus;
8
+ export declare function useQuotaWatcher(): boolean;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { ChatComponentProps } from '../../helpers/types';
3
+ export declare const ProductCard: React.FC<ChatComponentProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { ChatComponentProps } from '../../helpers/types';
3
+ export declare const ProductCarousel: React.FC<ChatComponentProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { ChatComponentProps } from '../../helpers/types';
3
+ export declare const ProductManager: React.FC<ChatComponentProps>;
@@ -0,0 +1,12 @@
1
+ import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
2
+ import type { RowActionDef } from './types';
3
+ export interface ActionFormDrawerProps {
4
+ action: RowActionDef;
5
+ row: Record<string, unknown>;
6
+ idField: string;
7
+ eventBus?: ChatEventBus;
8
+ onExecute: (ctx: Record<string, unknown>) => Promise<void>;
9
+ onClose: () => void;
10
+ }
11
+ export declare function ActionFormDrawer({ action, row, idField, eventBus, onExecute, onClose }: ActionFormDrawerProps): import("react/jsx-runtime").JSX.Element;
12
+ export default ActionFormDrawer;
@@ -0,0 +1,18 @@
1
+ import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
2
+ import type { ReactiveCrudConfig } from './types';
3
+ type FieldOption = {
4
+ value: string | number;
5
+ label: string;
6
+ color?: string;
7
+ };
8
+ export interface DetailDrawerProps {
9
+ row: Record<string, unknown>;
10
+ config: ReactiveCrudConfig;
11
+ eventBus?: ChatEventBus;
12
+ onClose: () => void;
13
+ /** SPEC-006 — options cargadas por optionsEndpoint (mismo mapa que la tabla), para traducir
14
+ * valores (ej. vehicle_type CAR→Carro) también en el detalle. */
15
+ loadedOptions?: Record<string, FieldOption[]>;
16
+ }
17
+ export declare function DetailDrawer({ row, config, eventBus, onClose, loadedOptions }: DetailDrawerProps): import("react/jsx-runtime").JSX.Element;
18
+ export default DetailDrawer;
@@ -0,0 +1,4 @@
1
+ import type { ChatComponentProps } from '../../helpers/types';
2
+ import './PriceNegotiation.scss';
3
+ export declare function PriceNegotiationChat({ component, eventBus }: ChatComponentProps): import("react/jsx-runtime").JSX.Element | null;
4
+ export default PriceNegotiationChat;
@@ -0,0 +1,20 @@
1
+ import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
2
+ import type { ReactiveCrudConfig, RowActionDef } from './types';
3
+ import './ReactiveCrud.scss';
4
+ export interface ReactiveCrudProps {
5
+ /** SPEC-023 — clave de Maps JS para los campos LOCATION. Necesaria al montar en una RUTA
6
+ * (fuera del chat no hay ChatConfigProvider). Tiene prioridad sobre la del ChatConfig. */
7
+ googleMapsApiKey?: string;
8
+ config: ReactiveCrudConfig;
9
+ eventBus?: ChatEventBus;
10
+ autoOpenCreate?: boolean;
11
+ /** SPEC-073 — valores que el agente extrajo de lo que el usuario ya escribió. */
12
+ prefill?: Record<string, unknown>;
13
+ onCreated?: () => void;
14
+ onCreateClose?: () => void;
15
+ }
16
+ export declare function matchesVisibleWhen(a: RowActionDef, row: Record<string, unknown>): boolean;
17
+ export declare function matchesDisabledWhen(a: RowActionDef, row: Record<string, unknown>): boolean;
18
+ export declare function matchesDoneWhen(a: RowActionDef, row: Record<string, unknown>): boolean;
19
+ export declare function ReactiveCrud({ config, eventBus, autoOpenCreate, prefill, onCreated, onCreateClose, googleMapsApiKey: apiKeyProp }: ReactiveCrudProps): import("react/jsx-runtime").JSX.Element;
20
+ export default ReactiveCrud;
@@ -0,0 +1,4 @@
1
+ import type { ChatComponentProps } from '../../helpers/types';
2
+ import './ReactiveCrudChat.scss';
3
+ export declare function ReactiveCrudChat({ component, eventBus, assistantMessageId }: ChatComponentProps): import("react/jsx-runtime").JSX.Element | null;
4
+ export default ReactiveCrudChat;
@@ -0,0 +1,4 @@
1
+ import type { ChatComponentProps } from '../../helpers/types';
2
+ import './ReactiveCrudItemChat.scss';
3
+ export declare function ReactiveCrudItemChat({ component, eventBus }: ChatComponentProps): import("react/jsx-runtime").JSX.Element | null;
4
+ export default ReactiveCrudItemChat;
@@ -0,0 +1,3 @@
1
+ import * as yup from 'yup';
2
+ import type { ReactiveCrudField } from './types';
3
+ export declare function buildCrudYupSchema(fields: ReactiveCrudField[]): yup.ObjectSchema<Record<string, unknown>>;
@@ -0,0 +1,4 @@
1
+ import type { ReactNode } from 'react';
2
+ export type CrudFormatter = (value: unknown, row: Record<string, unknown>) => ReactNode;
3
+ export declare const CRUD_FORMATTERS: Record<string, CrudFormatter>;
4
+ export declare function getFormatter(key?: string): CrudFormatter | undefined;
@@ -0,0 +1,5 @@
1
+ import type { SelectOption } from '../../../../../organisms/lumi/DynamicForm/types';
2
+ import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
3
+ import type { CrudFieldOptionsEndpoint } from './types';
4
+ export declare function unwrap(raw: unknown): unknown;
5
+ export declare function loadOptions(eventBus: ChatEventBus, ep: CrudFieldOptionsEndpoint): Promise<SelectOption[]>;