helppeople-ui 1.4.2 → 1.6.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.
@@ -0,0 +1,5 @@
1
+ import { PaginationProps as AntPaginationProps } from 'antd';
2
+ export interface CustomPaginationProps extends AntPaginationProps {
3
+ }
4
+ declare const CustomPagination: React.FC<CustomPaginationProps>;
5
+ export default CustomPagination;
@@ -0,0 +1,84 @@
1
+ import { default as React } from 'react';
2
+ import { TimelineProps } from 'antd';
3
+ /**
4
+ * Item del Timeline renderizado
5
+ */
6
+ export interface TimelineItem {
7
+ label?: React.ReactNode;
8
+ children: React.ReactNode;
9
+ color?: string;
10
+ dot?: React.ReactNode;
11
+ }
12
+ /**
13
+ * Estructura de datos específica para expedientes (ejemplo)
14
+ * Puedes usar esta interfaz o definir tu propia estructura
15
+ */
16
+ export interface TimelineItemData {
17
+ /** Código del expediente */
18
+ CodigoExpediente?: string;
19
+ /** ID del flujo de orden de trabajo */
20
+ IDFlujoOrdenTrabajo?: number;
21
+ /** Descripción del flujo */
22
+ DescripcionFlujo?: string;
23
+ /** Nombre del usuario */
24
+ NombreUsuario?: string;
25
+ /** Mensaje o descripción del evento */
26
+ Mensaje: string;
27
+ /** Fecha del evento */
28
+ Fecha: string;
29
+ /** Color del punto del timeline */
30
+ color?: string;
31
+ /** Icono personalizado para el punto */
32
+ dot?: React.ReactNode;
33
+ }
34
+ /**
35
+ * Props del componente CustomTimeline
36
+ * @template T - Tipo de datos que se pasarán al timeline
37
+ */
38
+ export interface CustomTimelineProps<T = TimelineItemData> extends Omit<TimelineProps, "items"> {
39
+ /** Array de datos para el timeline */
40
+ data: T[];
41
+ /** Modo del timeline: izquierda, derecha o alternado */
42
+ mode?: "left" | "right" | "alternate";
43
+ /** Si se muestra en orden inverso */
44
+ reverse?: boolean;
45
+ /** Si hay un elemento pendiente */
46
+ pending?: React.ReactNode;
47
+ /**
48
+ * Función para renderizar cada item del timeline
49
+ * @param item - El item de datos
50
+ * @param index - El índice del item en el array
51
+ * @returns Objeto con las propiedades del item renderizado
52
+ */
53
+ renderItem: (item: T, index: number) => TimelineItem;
54
+ /** Estilo personalizado para el contenedor */
55
+ style?: React.CSSProperties;
56
+ /** Clase CSS personalizada */
57
+ className?: string;
58
+ }
59
+ /**
60
+ * Props específicas para TimelineItemData con opciones predefinidas
61
+ */
62
+ export interface TimelineItemDataProps extends Omit<CustomTimelineProps<TimelineItemData>, "renderItem"> {
63
+ /** Renderizado personalizado opcional para TimelineItemData */
64
+ renderItem?: (item: TimelineItemData, index: number) => TimelineItem;
65
+ /** Mostrar el código de expediente */
66
+ showExpediente?: boolean;
67
+ /** Mostrar el nombre del usuario */
68
+ showUsuario?: boolean;
69
+ /** Mostrar la descripción del flujo */
70
+ showFlujo?: boolean;
71
+ /** Formato de fecha personalizado */
72
+ dateFormatter?: (fecha: string) => string;
73
+ }
74
+ /**
75
+ * Componente Timeline genérico
76
+ * Acepta cualquier tipo de datos y requiere una función renderItem
77
+ */
78
+ declare function CustomTimeline<T = TimelineItemData>({ data, mode, reverse, pending, renderItem, style, className, ...timelineProps }: CustomTimelineProps<T>): import("react/jsx-runtime").JSX.Element;
79
+ /**
80
+ * Timeline con renderizado por defecto para TimelineItemData
81
+ * Incluye opciones para mostrar/ocultar campos específicos
82
+ */
83
+ export declare const TimelineWithDefaults: React.FC<TimelineItemDataProps>;
84
+ export default CustomTimeline;
@@ -0,0 +1,2 @@
1
+ export { default, TimelineWithDefaults } from './CustomTimeline';
2
+ export type { CustomTimelineProps, TimelineItemData, TimelineItem, TimelineItemDataProps, } from './CustomTimeline';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const ExampleCustomPagination: React.FC;
3
+ export default ExampleCustomPagination;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const CustomTimelineExample: React.FC;
3
+ export default CustomTimelineExample;
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export { default as RadioGroup } from './components/CustomRadioGroup/CustomRadio
14
14
  export { default as Select } from './components/CustomSelect/CustomSelect';
15
15
  export { default as Skeleton } from './components/CustomSkeleton/CustomSkeleton';
16
16
  export { default as Spin } from './components/CustomSpin/CustomSpin';
17
+ export { default as Pagination } from './components/CustomPagination/CustomPagination';
17
18
  export { default as Table } from './components/CustomTable/CustomTable';
18
19
  export { default as Tabs } from './components/CustomTabs/CustomTabs';
19
20
  export { default as Toolbar } from './components/CustomToolbar/CustomToolbar';
@@ -45,6 +46,7 @@ export { default as TableTransfer } from './components/CustomTableTransfer/Custo
45
46
  export { default as RelationSelector } from './components/CustomRelationSelector/CustomRelationSelector';
46
47
  export { default as NotificationBadge } from './components/CustomNotificationBadge/CustomNotificationBadge';
47
48
  export { default as NotificationDropdown } from './components/CustomNotificationDropdown/CustomNotificationDropdown';
49
+ export { default as Timeline, TimelineWithDefaults, } from './components/CustomTimeline/CustomTimeline';
48
50
  export type { AccordionItem, CustomAccordionProps, } from './components/CustomAccordion/CustomAccordion';
49
51
  export type { TransferDataItem, CustomTransferProps, } from './components/CustomTransfer/CustomTransfer';
50
52
  export type { CustomTableTransferProps, RemotePaginationConfig, PagerState, PagerPosition, } from './components/CustomTableTransfer/CustomTableTransfer';
@@ -52,8 +54,10 @@ export type { CustomRelationSelectorProps, LeftPanelConfig, RightPanelConfig, }
52
54
  export type { DragAndDropItem } from './components/CustomDragAndDrop/CustomDragAndDrop';
53
55
  export type { CustomNotificationBadgeProps } from './components/CustomNotificationBadge/CustomNotificationBadge';
54
56
  export type { CustomNotificationDropdownProps, NotificationItem, NotificationAction, } from './components/CustomNotificationDropdown/CustomNotificationDropdown';
57
+ export type { CustomTimelineProps, TimelineItemData, TimelineItem, TimelineItemDataProps, } from './components/CustomTimeline/CustomTimeline';
55
58
  export { default as Empty } from './components/CustomEmpty/CustomEmpty';
56
59
  export { default as List } from './components/CustomList/CustomList';
57
60
  export { default as LibraryThemeProvider } from './theme/LibraryThemeProvider';
58
61
  export { default as Message } from './components/CustomMessage/CustomMessage';
59
62
  export * from './components/Icons/CustomIcon';
63
+ export type { CustomPaginationProps } from './components/CustomPagination/CustomPagination';