@apia/components 4.0.19 → 4.0.24

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/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, Ref, RefObject, DetailedHTMLProps, TextareaHTMLAttributes, ChangeEventHandler, MouseEvent as MouseEvent$1, KeyboardEvent, FC, PropsWithChildren, FunctionComponent, ForwardedRef, ComponentType, ReactElement } from 'react';
2
+ import React__default, { ReactNode, Ref, RefObject, DetailedHTMLProps, TextareaHTMLAttributes, ChangeEventHandler, FocusEvent, MouseEvent as MouseEvent$1, KeyboardEvent, FC, PropsWithChildren, FunctionComponent, ForwardedRef, ComponentType, ReactElement } from 'react';
3
3
  import * as _apia_util from '@apia/util';
4
4
  import { IOnFocusConfiguration, TFocusRetriever, TId as TId$1, EventEmitter, StatefulEmitter, TModify, TApiaFilter, TApiaFilterValue } from '@apia/util';
5
- import { BoxProps, TPalette, ThemeUIStyleObject, IconButtonProps, ButtonProps, ThemeUICSSObject, InputProps, SelectProps } from '@apia/theme';
5
+ import { BoxProps, TPalette, InputProps, ThemeUIStyleObject, IconButtonProps, ButtonProps, ThemeUICSSObject, SelectProps } from '@apia/theme';
6
6
  import { TIconName, TIconType } from '@apia/icons';
7
7
  import { MenuItemProps, ControlledMenuProps } from '@szhsin/react-menu';
8
8
  export { ControlledMenuProps, MenuItemProps } from '@szhsin/react-menu';
@@ -115,67 +115,67 @@ type TModal = {
115
115
  variant?: string;
116
116
  } & Pick<IDialogHeader, 'hideCloseButton'>;
117
117
  declare const Modal: React__default.ForwardRefExoticComponent<{
118
- animationDuration?: number | undefined;
118
+ animationDuration?: number;
119
119
  /**
120
120
  * Aplica solamente para modales que tengan draggable=true.
121
121
  */
122
122
  defaultPosition?: {
123
- left?: string | undefined;
124
- right?: string | undefined;
125
- top?: string | undefined;
126
- bottom?: string | undefined;
127
- } | undefined;
123
+ left?: string;
124
+ right?: string;
125
+ top?: string;
126
+ bottom?: string;
127
+ };
128
128
  /**
129
129
  * Si esta variable está en true, el modal se comportará más como una ventana
130
130
  * que como un modal
131
131
  */
132
- draggable?: boolean | undefined;
133
- dragBounded?: boolean | undefined;
132
+ draggable?: boolean;
133
+ dragBounded?: boolean;
134
134
  children?: React__default.ReactNode;
135
- className?: string | undefined;
136
- id?: string | undefined;
137
- initialFocusConfiguration?: IOnFocusConfiguration | undefined;
135
+ className?: string;
136
+ id?: string;
137
+ initialFocusConfiguration?: IOnFocusConfiguration;
138
138
  /**
139
139
  * Este retriever será pasado al método focus.on para realizar el foco en el
140
140
  * elemento inicial del modal.
141
141
  *
142
142
  * @see focus
143
143
  */
144
- initialFocusGetter?: ((modalInnerRef: HTMLElement) => ReturnType<TFocusRetriever>) | undefined;
144
+ initialFocusGetter?: (modalInnerRef: HTMLElement) => ReturnType<TFocusRetriever>;
145
145
  /**
146
146
  * Si se pasa un ref, el modal hará foco sobre el elemento una vez que haya
147
147
  * abierto.
148
148
  */
149
- initialFocusRef?: React__default.RefObject<unknown> | undefined;
149
+ initialFocusRef?: React__default.RefObject<unknown>;
150
150
  /**
151
151
  * Controla el estado del modal, indicando a la transición de apertura o
152
152
  * cierre que debe comenzar, dependiendo de si cambia a true o false
153
153
  * respectivamente.
154
154
  */
155
- isOpen?: boolean | undefined;
156
- maxWidth?: string | number | undefined;
155
+ isOpen?: boolean;
156
+ maxWidth?: number | string;
157
157
  /**
158
158
  * Permite pasar un componente React que se mostrará a la derecha del título,
159
159
  * con el fin de incorporar botones en el header del modal.
160
160
  */
161
161
  NavBar?: React__default.ReactNode;
162
- noFocus?: boolean | undefined;
163
- noHeader?: boolean | undefined;
162
+ noFocus?: boolean;
163
+ noHeader?: boolean;
164
164
  /**
165
165
  * Permite definir un callback que será llamado solamente cuando el modal se
166
166
  * cierre por medio del click en el overlay, al presionar escape o mediante
167
167
  * el botón cerrar del header (La X).
168
168
  */
169
- onClose?: (() => void) | undefined;
169
+ onClose?: () => void;
170
170
  /**
171
171
  * Este método recibe el evento del mousedown utilizado para controllar el dragstart. Si el usuario devuelve false, el drag no será realizado.
172
172
  */
173
- onDragStart?: ((ev: MouseEvent) => boolean) | undefined;
173
+ onDragStart?: (ev: MouseEvent) => boolean;
174
174
  /**
175
175
  * Permite definir un callback que será llamado siempre que el modal se
176
176
  * cierre, una vez que la animación haya terminado.
177
177
  */
178
- onExited?: (() => unknown) | undefined;
178
+ onExited?: () => unknown;
179
179
  /**
180
180
  * Al pasar un Portal, el modal se abrirá dentro de éste y no directamente en
181
181
  * la posición actual dentro del árbol de componentes. Normalmente, este
@@ -186,19 +186,19 @@ declare const Modal: React__default.ForwardRefExoticComponent<{
186
186
  */
187
187
  Portal?: React__default.FC<{
188
188
  children: React__default.ReactNode;
189
- }> | undefined;
189
+ }>;
190
190
  /**
191
191
  * Si es true, el modal será cerrado al presionar escape.
192
192
  */
193
- shouldCloseOnEsc?: boolean | undefined;
193
+ shouldCloseOnEsc?: boolean;
194
194
  /**
195
195
  * Si es true, el modal será cerrado al hacer clic en el overlay.
196
196
  */
197
- shouldCloseOnOverlayClick?: boolean | undefined;
198
- size?: TModalSize | undefined;
199
- stretch?: boolean | undefined;
200
- title?: string | undefined;
201
- variant?: string | undefined;
197
+ shouldCloseOnOverlayClick?: boolean;
198
+ size?: TModalSize;
199
+ stretch?: boolean;
200
+ title?: string;
201
+ variant?: string;
202
202
  } & Pick<IDialogHeader, "hideCloseButton"> & React__default.RefAttributes<HTMLDivElement>>;
203
203
 
204
204
  type TOpenModal = Pick<TModal, 'NavBar' | 'Portal' | 'children' | 'className' | 'hideCloseButton' | 'initialFocusGetter' | 'initialFocusConfiguration' | 'maxWidth' | 'noHeader' | 'onExited' | 'shouldCloseOnEsc' | 'shouldCloseOnOverlayClick' | 'size' | 'stretch' | 'title' | 'variant' | 'draggable' | 'onClose' | 'onDragStart' | 'defaultPosition' | 'dragBounded'> & {
@@ -284,8 +284,9 @@ declare class ApiaUtilNotifications {
284
284
  Component: () => React$1.JSX.Element;
285
285
  }
286
286
 
287
- declare const TabsList: (({ arrowsBehavior }: {
288
- arrowsBehavior?: "open" | "focus" | undefined;
287
+ declare const TabsList: (({ arrowsBehavior, children, }: {
288
+ arrowsBehavior?: "open" | "focus";
289
+ children?: Record<"beforeFixedTabs", ReactNode>;
289
290
  }) => React__default.JSX.Element | null) & {
290
291
  displayName: string;
291
292
  };
@@ -300,8 +301,13 @@ declare class Tab<TabType extends TTab = TTab> {
300
301
  */
301
302
  close(force?: boolean): Promise<boolean>;
302
303
  open(closeOthers?: boolean): void;
304
+ remove(): void;
303
305
  toggle(isShown?: boolean): void;
304
306
  }
307
+ type TAppendBehavior = Partial<{
308
+ closeOthers: boolean;
309
+ insertAfterId: string;
310
+ }>;
305
311
  declare class TabsController<TabType extends TTab = TTab> {
306
312
  #private;
307
313
  id: string;
@@ -318,7 +324,7 @@ declare class TabsController<TabType extends TTab = TTab> {
318
324
  /**
319
325
  * Obviamente agrega un tab al listado de tabs
320
326
  */
321
- append(tab: TabType, closeOthers?: boolean): void;
327
+ append(tab: TabType, behavior?: TAppendBehavior): void;
322
328
  closeAll(closeFixedTabsAsWell?: boolean, force?: boolean): Promise<void>;
323
329
  closeOpenTab(force?: boolean): void;
324
330
  closeToRight(targetId: string, force?: boolean): Promise<void>;
@@ -326,6 +332,7 @@ declare class TabsController<TabType extends TTab = TTab> {
326
332
  closeOthers(targetId: string, force?: boolean): Promise<void>;
327
333
  closeTab(tabId: string, force?: boolean): Promise<boolean>;
328
334
  private checkAtLeastOneOpen;
335
+ remove(tabId: string): void;
329
336
  toggleTab(tabId: string, isShown?: boolean): Promise<void>;
330
337
  focusNextTab(): Tab<TabType> | null;
331
338
  focusPreviousTab(): Tab<TabType> | null;
@@ -428,13 +435,15 @@ type TTabsListState<TabType extends TTab> = {
428
435
 
429
436
  declare const DefaultTabsLabelRenderer: TTabLabelRenderer;
430
437
 
431
- declare const TabsContent: ((props: Omit<BoxProps, 'children'>) => React$1.JSX.Element | null) & {
438
+ declare const TabsContent: ((props: Omit<BoxProps, "children">) => React$1.JSX.Element | null) & {
432
439
  displayName: string;
433
440
  };
434
441
 
435
442
  declare function useTabsContext(): TabsController<TTab> | null;
443
+ declare function useCurrentTab(): Tab<TTab> | null;
436
444
 
437
- declare const Tabs: ({ id, getController, initialTabs, orientation, initialState, ...props }: TabsControllerProps<TTab> & Omit<BoxProps, 'id' | 'as' | 'role'>, ref: React__default.ForwardedRef<HTMLDivElement>) => React__default.JSX.Element | null;
445
+ declare const NonForwardedTabs: ({ id, getController, initialTabs, orientation, initialState, ...props }: TabsControllerProps<TTab> & Omit<BoxProps, "id" | "as" | "role">, ref: React__default.ForwardedRef<HTMLDivElement>) => React__default.JSX.Element | null;
446
+ declare const Tabs: typeof NonForwardedTabs;
438
447
 
439
448
  declare class ApiaUtilTabsController {
440
449
  get currentTab(): Tab<TTab>;
@@ -647,9 +656,9 @@ declare class AutomaticTooltip {
647
656
  #private;
648
657
  private handler;
649
658
  ref: (el: HTMLElement | null) => void;
650
- constructor(tooltip: (Partial<TTooltip> & {
651
- timeout?: number | undefined;
652
- }) | null | undefined, handler: ApiaUtilTooltips);
659
+ constructor(tooltip: ((Partial<TTooltip> & {
660
+ timeout?: number;
661
+ }) | null) | undefined, handler: ApiaUtilTooltips);
653
662
  update: (tooltip: Partial<TTooltip>) => void;
654
663
  }
655
664
 
@@ -879,7 +888,9 @@ declare class AutocompleteController {
879
888
  toggleOpen(): void;
880
889
  search(str: string): void;
881
890
  selectFocused(): void;
882
- setValue(value: string): Promise<void>;
891
+ setValue(value: string, props?: {
892
+ fireOnChange?: boolean;
893
+ }): Promise<void>;
883
894
  tooltipRef: ApiaUtilTooltip | null;
884
895
  }
885
896
 
@@ -887,6 +898,7 @@ type AutocompleteCmpProps = {
887
898
  handler?: AutocompleteController;
888
899
  getHandler?: (handler: AutocompleteController) => unknown;
889
900
  properties?: AutocompleteProps;
901
+ inputProps?: InputProps;
890
902
  };
891
903
  declare const Autocomplete: (props: AutocompleteCmpProps) => React$1.JSX.Element | null;
892
904
 
@@ -986,7 +998,7 @@ declare function useOtherTagButton(props?: Partial<{
986
998
 
987
999
  declare const Captcha: ({ name, imageUrl, onChange, value, className, }: {
988
1000
  name: string;
989
- className?: string | undefined;
1001
+ className?: string;
990
1002
  imageUrl: string;
991
1003
  onChange: React.ChangeEventHandler<HTMLInputElement>;
992
1004
  value: string;
@@ -1007,6 +1019,12 @@ type TCheckbox = TModify<ButtonProps, {
1007
1019
  }>;
1008
1020
  declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<TCheckbox, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1009
1021
 
1022
+ interface ICalModal {
1023
+ handleClickDay: (date: Date) => void;
1024
+ calValue?: Date;
1025
+ locale: string;
1026
+ }
1027
+
1010
1028
  interface IField {
1011
1029
  className?: string;
1012
1030
  disabled?: boolean;
@@ -1029,23 +1047,19 @@ interface IIconInput extends IField {
1029
1047
  }
1030
1048
  declare const IconInput: ({ additionalButtons, additionalButtonsPosition, buttonProps, buttonRef, className, disabled, hideButton, icon, inputProps, inputRef, isLoading, mask, onClick, onBlur, readOnly, ...rest }: IIconInput) => React__default.JSX.Element;
1031
1049
 
1032
- declare global {
1033
- interface Window {
1034
- LANG_CODE: string;
1035
- MSG_INVALID_DATE: string;
1036
- MSG_FEC_FIN_MAY_FEC_INI: string;
1037
- LBL_PICK_DATE: string;
1038
- }
1039
- }
1040
1050
  type TDateProps = TModify<InputProps, {
1041
1051
  allowPickBeforeToday?: boolean;
1052
+ CalModalRenderer?: (props: ICalModal & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
1053
+ deleteFiltersTimestamp?: number;
1042
1054
  error?: string | null;
1043
1055
  /**
1044
1056
  * Con esta propiedad se puede proveer una función que será utilizada para
1045
1057
  * determinar qué máscara debe utilizar el input
1046
1058
  */
1047
1059
  getCustomMask?: () => string;
1060
+ inputClassName?: string;
1048
1061
  isLoading?: boolean;
1062
+ onBlur?: (ev: FocusEvent<HTMLInputElement>) => void | boolean | string | Promise<boolean | string>;
1049
1063
  /**
1050
1064
  * Recibe la nueva fecha. En caso de devolver
1051
1065
  * false desde este método, el nuevo valor no
@@ -1127,12 +1141,12 @@ type TFieldLabel = {
1127
1141
  requiredMarkPosition?: 'before' | 'after';
1128
1142
  } & BoxProps;
1129
1143
  declare const FieldLabel: React$1.ForwardRefExoticComponent<{
1130
- avoidSemicolon?: boolean | undefined;
1144
+ avoidSemicolon?: boolean;
1131
1145
  /**
1132
1146
  * Permite mostrar un mensaje de error debajo del campo
1133
1147
  */
1134
- error?: string | undefined;
1135
- hideRequiredMark?: boolean | undefined;
1148
+ error?: string;
1149
+ hideRequiredMark?: boolean;
1136
1150
  label: string;
1137
1151
  /**
1138
1152
  * La propiedad required se utiliza para mostrar el * de requerido.
@@ -1140,8 +1154,8 @@ declare const FieldLabel: React$1.ForwardRefExoticComponent<{
1140
1154
  * @see requiredMarkPosition
1141
1155
  * @see hideRequiredMark
1142
1156
  */
1143
- required?: boolean | undefined;
1144
- requiredMarkPosition?: "after" | "before" | undefined;
1157
+ required?: boolean;
1158
+ requiredMarkPosition?: "before" | "after";
1145
1159
  } & BoxProps & React$1.RefAttributes<HTMLDivElement>>;
1146
1160
 
1147
1161
  interface IAccordionItemButton {
@@ -1228,7 +1242,7 @@ declare class AccordionHandler {
1228
1242
  useItemId: () => TId$1;
1229
1243
  useItemStateSelector: <T>(selector: (props: TItemState) => T, comparator?: TSelectionComparator<T>) => T;
1230
1244
  useItemStateUpdate: (cb: TItemStateListener) => void;
1231
- usePropsSelector: <T_1>(selector: (props: IAccordionProps) => T_1, comparator?: TSelectionComparator<T_1>) => T_1;
1245
+ usePropsSelector: <T>(selector: (props: IAccordionProps) => T, comparator?: TSelectionComparator<T>) => T;
1232
1246
  usePropsUpdate: (cb: TPropsListener) => void;
1233
1247
  };
1234
1248
  }
@@ -1267,15 +1281,17 @@ interface IApiaFilter {
1267
1281
  }
1268
1282
  declare const ApiaFilter: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<IApiaFilter & React$1.RefAttributes<HTMLInputElement | HTMLSelectElement>>>;
1269
1283
 
1284
+ type TLabelBoxVariant = 'normal' | 'selected';
1270
1285
  interface ILabelBox {
1271
1286
  className?: string;
1272
1287
  label: string;
1273
1288
  tooltip?: string;
1274
1289
  closeTooltip?: string;
1275
1290
  onClose?: () => unknown;
1291
+ variant?: TLabelBoxVariant;
1276
1292
  }
1277
1293
  type TLabelBox = ILabelBox & BoxProps;
1278
- declare const LabelBox: ({ className, label, tooltip, closeTooltip, onClose, ...props }: TLabelBox) => React__default.JSX.Element;
1294
+ declare const LabelBox: ({ className, label, tooltip, closeTooltip, onClose, variant, ...props }: TLabelBox) => React$1.JSX.Element;
1279
1295
 
1280
1296
  type TMessageType = 'user' | 'system' | 'warning' | 'error' | 'information' | 'response' | 'multipleChoice' | 'customMessage';
1281
1297
  interface IAttachment {
@@ -1322,6 +1338,7 @@ declare const AutoscrollContainer: React__default.FC<PropsWithChildren<Autoscrol
1322
1338
  declare class ChatController<T extends Record<string, unknown> = Record<string, unknown>> {
1323
1339
  private onMessageSubmit;
1324
1340
  private additionalOptions?;
1341
+ private classNames?;
1325
1342
  currentIndex: number;
1326
1343
  state: TChatControllerState & T;
1327
1344
  private internalAudioRecorder;
@@ -1334,7 +1351,11 @@ declare class ChatController<T extends Record<string, unknown> = Record<string,
1334
1351
  record: number;
1335
1352
  state: _apia_util.AudioRecorderState;
1336
1353
  };
1337
- constructor(props: Partial<TChatControllerState & T>, onMessageSubmit: MessageSubmitCallback, additionalOptions?: TMenuItem[] | undefined);
1354
+ constructor(props: Partial<TChatControllerState & T>, onMessageSubmit: MessageSubmitCallback, additionalOptions?: TMenuItem[] | undefined, classNames?: {
1355
+ history?: string;
1356
+ textarea?: string;
1357
+ attachments?: string;
1358
+ } | undefined);
1338
1359
  removeMessage(idx: number): void;
1339
1360
  addMessage(message: ChatMessage): void;
1340
1361
  clearHistory(): void;
@@ -1370,6 +1391,11 @@ declare class FloatingChatController extends ChatController<{
1370
1391
  onMessageSubmit: MessageSubmitCallback;
1371
1392
  modalTitle?: string;
1372
1393
  additionalOptions?: TMenuItem[];
1394
+ classNames?: {
1395
+ history?: string;
1396
+ textarea?: string;
1397
+ attachments?: string;
1398
+ };
1373
1399
  });
1374
1400
  getModalTitle(): string | undefined;
1375
1401
  setModalTitle(title: string): void;
@@ -1389,7 +1415,7 @@ declare const ContainerWithHeader: ({ title, children, footerChildren, onClose,
1389
1415
  children: ReactNode;
1390
1416
  footerChildren?: ReactNode;
1391
1417
  additionalButtons?: ReactNode;
1392
- onClose?: (() => void) | undefined;
1418
+ onClose?: () => void;
1393
1419
  }) => React$1.JSX.Element;
1394
1420
 
1395
1421
  interface ICollapsiblePanel {
@@ -1530,7 +1556,7 @@ interface IProgressBar {
1530
1556
  declare const ProgressBar: FC<IProgressBar>;
1531
1557
 
1532
1558
  declare const LoaderSpinner: ((props: {
1533
- className?: string | undefined;
1559
+ className?: string;
1534
1560
  }) => React$1.JSX.Element) & {
1535
1561
  displayName: string;
1536
1562
  };
@@ -1645,7 +1671,7 @@ declare function useModal(configuration?: TUseModalConfiguration): {
1645
1671
  show: () => void;
1646
1672
  };
1647
1673
 
1648
- declare const Confirm: ({ children, additionalButtons, additionalButtonsOnRight, cancelButtonText: cancelText, className, confirmButtonText: confirmText, confirmButtonVariant, contentRef, disabled, hideCancelButton, hideConfirmButton, isLoading, onCancel, onConfirm, variant, }: Omit<IConfirm, 'title'>) => React$1.JSX.Element;
1674
+ declare const Confirm: ({ children, additionalButtons, additionalButtonsOnRight, cancelButtonText: cancelText, className, confirmButtonText: confirmText, confirmButtonVariant, contentRef, disabled, hideCancelButton, hideConfirmButton, isLoading, onCancel, onConfirm, variant, }: Omit<IConfirm, "title">) => React$1.JSX.Element;
1649
1675
 
1650
1676
  interface IDialogButtonBar {
1651
1677
  children: React$1.ReactNode;
@@ -1676,13 +1702,13 @@ declare const AutoEllipsis: ({ children, findParent, overrideStyles, }: {
1676
1702
  * para dar control sobre cuál es el elemento al que se le clonarán los
1677
1703
  * estilos.
1678
1704
  */
1679
- findParent?: ((currentElement: HTMLElement) => HTMLElement) | undefined;
1705
+ findParent?: (currentElement: HTMLElement) => HTMLElement;
1680
1706
  /**
1681
1707
  * Si se pasa overrideStyles, será invocado con el nodo actual de
1682
1708
  * AutoEllipsis para tomar decisiones acerca de cuáles estilos serán
1683
1709
  * aplicados.
1684
1710
  */
1685
- overrideStyles?: ((currentElement: HTMLElement) => Partial<CSSStyleDeclaration>) | undefined;
1711
+ overrideStyles?: (currentElement: HTMLElement) => Partial<CSSStyleDeclaration>;
1686
1712
  }) => React$1.JSX.Element;
1687
1713
 
1688
1714
  interface IMakeResponsiveComponent<P extends Record<string, unknown>> {
@@ -1716,7 +1742,7 @@ interface IResponsiveComponent<P> extends FC<P> {
1716
1742
  * pantalla sino del espacio donde se encuentra.
1717
1743
  */
1718
1744
  declare const makeResponsiveComponent: <P extends Record<string, unknown>>({ breakPoints, Component, defaultBreakpoint, }: IMakeResponsiveComponent<P>) => IResponsiveComponent<P & {
1719
- breakPoints?: number[] | undefined;
1745
+ breakPoints?: number[];
1720
1746
  }>;
1721
1747
 
1722
1748
  /**
@@ -1853,10 +1879,11 @@ type TIconRenderer<P = Record<string, unknown>> = FunctionComponent<TIcon<P>>;
1853
1879
 
1854
1880
  declare const DefaultIconRenderer: React$1.NamedExoticComponent<TIcon<Record<string, unknown>>>;
1855
1881
 
1856
- declare const IconsList: {
1882
+ declare const IconsListNonForwarded: {
1857
1883
  <P extends Record<string, unknown>>(props: TIconsList<P>, ref: ForwardedRef<HTMLDivElement>): React$1.JSX.Element;
1858
1884
  displayName: string;
1859
1885
  };
1886
+ declare const IconsList: typeof IconsListNonForwarded;
1860
1887
 
1861
1888
  /**
1862
1889
  * Permite importar un componente en forma dinámica con ruta relativa a
@@ -1931,7 +1958,7 @@ declare const Toolbar: ({ children, getController, }: {
1931
1958
  * El controlador permite gestionar el estado de los distintos elementos de
1932
1959
  * la toolbar
1933
1960
  */
1934
- getController?: ((newController: ToolbarController) => unknown) | undefined;
1961
+ getController?: (newController: ToolbarController) => unknown;
1935
1962
  }) => React$1.JSX.Element;
1936
1963
 
1937
1964
  type TSortableListItem = {
@@ -1943,41 +1970,92 @@ type TSortableListItem = {
1943
1970
  declare const SortableListItem: React$1.MemoExoticComponent<({ boxProps, id, children }: TSortableListItem) => React$1.JSX.Element>;
1944
1971
 
1945
1972
  declare const UnstyledSortableList: ({ boxProps, children, onSortChange, }: {
1946
- boxProps?: BoxProps | undefined;
1973
+ boxProps?: BoxProps;
1947
1974
  children: ReactNode;
1948
- onSortChange?: ((items: ReactElement<TSortableListItem>[]) => unknown) | undefined;
1975
+ onSortChange?: (items: ReactElement<TSortableListItem>[]) => unknown;
1949
1976
  }) => React$1.JSX.Element;
1950
1977
  declare const SortableList: ((props: {
1951
- boxProps?: BoxProps | undefined;
1978
+ boxProps?: BoxProps;
1952
1979
  children: ReactNode;
1953
- onSortChange?: ((items: ReactElement<TSortableListItem>[]) => unknown) | undefined;
1980
+ onSortChange?: (items: ReactElement<TSortableListItem>[]) => unknown;
1954
1981
  }) => React$1.JSX.Element) & {
1955
1982
  displayName: string;
1956
1983
  };
1957
1984
 
1958
1985
  declare const FileCard: React$1.ForwardRefExoticComponent<{
1959
1986
  name: string;
1960
- iconsSize?: "sm" | "md" | "lg" | "xl" | undefined;
1961
- additionalButtons?: TIconButton[] | undefined;
1962
- className?: string | undefined;
1963
- sx?: ThemeUIStyleObject | undefined;
1964
- width?: string | undefined;
1965
- handleClose?: ((f: string) => void) | undefined;
1966
- onDoubleClick?: (() => void) | undefined;
1967
- onClick?: ((e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
1987
+ iconsSize?: "sm" | "md" | "lg" | "xl";
1988
+ additionalButtons?: TIconButton[];
1989
+ className?: string;
1990
+ sx?: ThemeUIStyleObject;
1991
+ width?: string;
1992
+ handleClose?: (f: string) => void;
1993
+ onDoubleClick?: () => void;
1994
+ onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
1968
1995
  } & React$1.RefAttributes<unknown>>;
1969
1996
 
1970
- declare const Dropzone: ({ sx, className, messageError, progress, defaultLabel, draggingLabel, onClick, onChange, }: {
1971
- sx?: ThemeUIStyleObject | undefined;
1972
- className?: string | undefined;
1973
- messageError?: string | undefined;
1974
- progress?: number | undefined;
1975
- defaultLabel?: string | undefined;
1976
- draggingLabel?: string | undefined;
1977
- onClick?: ((e: MouseEvent$1) => void) | undefined;
1978
- onChange?: ((e: File[]) => any) | undefined;
1997
+ declare const Dropzone: ({ sx, className, messageError, progress, defaultLabel, draggingLabel, onClick, onChange, handleInfoButton, }: {
1998
+ sx?: ThemeUIStyleObject;
1999
+ className?: string;
2000
+ messageError?: string;
2001
+ progress?: number;
2002
+ defaultLabel?: string;
2003
+ draggingLabel?: string;
2004
+ onClick?: (e: MouseEvent$1) => void;
2005
+ onChange?: (e: File[]) => any;
2006
+ handleInfoButton?: (e: MouseEvent$1) => void;
1979
2007
  }) => React__default.JSX.Element;
1980
2008
 
2009
+ type TUploadedFile = {
2010
+ id: string | number;
2011
+ name: string;
2012
+ };
2013
+ type TUploadInProgress = {
2014
+ abortController?: AbortController;
2015
+ error?: string;
2016
+ id: string;
2017
+ file: File;
2018
+ progress: number;
2019
+ };
2020
+ type TUploadHandlerState = {
2021
+ inProgressFiles: TUploadInProgress[];
2022
+ uploadedFiles: TUploadedFile[];
2023
+ };
2024
+ type TUploadHandlerProps = {
2025
+ initialFiles: TUploadedFile[];
2026
+ isMultiple?: boolean;
2027
+ /**
2028
+ * Must return the uploaded file instance if everything went ok.
2029
+ *
2030
+ * Must return a string if an error message must be placed in the uploading file to mark it
2031
+ * as with error.
2032
+ *
2033
+ * Must return null to remove the upload in progress without adding it to uploaded fiels.
2034
+ */
2035
+ onUpload(file: TUploadInProgress): Promise<TUploadedFile | string | null>;
2036
+ /**
2037
+ * Must return true if the file was deleted in the remote server.
2038
+ *
2039
+ * Must return a string containing an error message if something went wrong. This message
2040
+ * will be thrown as a notification.
2041
+ *
2042
+ * Must return null if nothing has to be done.
2043
+ */
2044
+ onDelete(file: TUploadedFile): Promise<true | string | null>;
2045
+ };
2046
+ declare class UploadHandler {
2047
+ props: TUploadHandlerProps;
2048
+ state: TUploadHandlerState;
2049
+ constructor(props: TUploadHandlerProps);
2050
+ delete(file: TUploadedFile): void;
2051
+ start(files: File[]): void;
2052
+ }
2053
+ declare const Uploader: (({ handler }: {
2054
+ handler: UploadHandler;
2055
+ }) => React$1.JSX.Element) & {
2056
+ displayName: string;
2057
+ };
2058
+
1981
2059
  declare class TableParameter extends Parameter<ITableParameterProps> {
1982
2060
  constructor(params: ITableParameterProps);
1983
2061
  }
@@ -2017,10 +2095,10 @@ declare class FilterDTO<T extends IFilterDTOState = IFilterDTOState> {
2017
2095
  Component: (({ renderers, multipleInputBoxProps, }: {
2018
2096
  renderers?: {
2019
2097
  input?: FC<InputProps & {
2020
- label?: string | undefined;
2021
- }> | undefined;
2022
- } | undefined;
2023
- multipleInputBoxProps?: BoxProps | undefined;
2098
+ label?: string;
2099
+ }>;
2100
+ };
2101
+ multipleInputBoxProps?: BoxProps;
2024
2102
  }) => React$1.JSX.Element) & {
2025
2103
  displayName: string;
2026
2104
  };
@@ -2147,7 +2225,7 @@ declare class Parameter<T extends IParameter = IParameter> implements ParameterO
2147
2225
 
2148
2226
  declare const ParameterRender: (({ index, omitLabel, parameter, }: {
2149
2227
  index: number;
2150
- omitLabel?: boolean | undefined;
2228
+ omitLabel?: boolean;
2151
2229
  parameter: Parameter;
2152
2230
  }) => React$1.JSX.Element | null) & {
2153
2231
  displayName: string;
@@ -2156,8 +2234,8 @@ declare const ParameterRender: (({ index, omitLabel, parameter, }: {
2156
2234
  type ParametersMap = Record<string, ParameterObject>;
2157
2235
  declare const Parameters: (({ label, ownerName, parameters, }: {
2158
2236
  label?: ReactNode;
2159
- ownerName?: string | undefined;
2160
- parameters?: ParametersMap | undefined;
2237
+ ownerName?: string;
2238
+ parameters?: ParametersMap;
2161
2239
  }) => React$1.JSX.Element | undefined) & {
2162
2240
  displayName: string;
2163
2241
  };
@@ -2364,5 +2442,5 @@ declare class Templater {
2364
2442
  parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
2365
2443
  }
2366
2444
 
2367
- export { Accordion, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, AutoEllipsis, Autocomplete, type AutocompleteCmpProps, AutocompleteController, type AutocompleteOption, type AutocompleteProps, AutogrowTextarea, AutoscrollContainer, BaseButton, CalendarModal, Captcha, ChatController, ChatMessage, Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingChatController, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAttachment, type ICalendarModal, type IConfirm, type IDialogButtonBar, type IDialogHeader, type IField, type IFieldErrorMessage, type IFilterCondition, type IFilterDTOState, type IFilterValue, type IIconInput, type IOverlay, type IParameter, type IParametersGroup, type IRequiredMark, type IResponsiveComponent, type ISimpleButton, type ITableParameterProps, IconButton, IconInput, IconsList, LabelBox, LinearLoader, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, type MessageCallbackProps, type MessageSubmitCallback, Modal, NumberInput, Overlay, Parameter, type ParameterObject, type ParameterPossibleValue, ParameterRender, type ParameterRenderer, type ParameterRendererProps, type ParameterType, Parameters, type ParametersDefinition, ParametersGroup, type ParametersGroupRenderer, ParametersStore, ParametersTable, type Payload, ProgressBar, RequiredMark, ScreenLocker, SimpleButton, SortableList, SortableListItem, type TAccordionHandler, type TAccordionItemButton, type TApiaButtonType, type TApiaIconButton, type TChatControllerState, type TCheckbox, type TCssProps, type TDateProps, type TFieldLabel, type TFilterOp, type TFilterPayload, type TFilterType, type TFilterValue, type TFilterValueType, type TGetTabsController, type TIcon, type TIconButton, type TIconRenderer, type TIconSize, type TIconsList, type TListbox, type TMenuItem, type TMessageType, type TModal, type TModalSize, type TNumberInput, type TNumberInputChangeEvent, type TOnClickNode, type TOnConfirmSelection, type TOnSelectionChange, type TOpenModal, type TParameterType, type TSubmenu, type TTab, type TTabLabelRenderer as TTabRenderer, type TToolbarIconButton as TToolDefinition, type TTooltip, type TUseModalConfiguration, type TVisualizationType, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isImage, isParametersGroup, makeResponsiveComponent, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useModal, useModalContext, useOtherTagButton, useTabsContext };
2445
+ export { Accordion, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, AutoEllipsis, Autocomplete, type AutocompleteCmpProps, AutocompleteController, type AutocompleteOption, type AutocompleteProps, AutogrowTextarea, AutoscrollContainer, BaseButton, CalendarModal, Captcha, ChatController, ChatMessage, Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingChatController, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAttachment, type ICalendarModal, type IConfirm, type IDialogButtonBar, type IDialogHeader, type IField, type IFieldErrorMessage, type IFilterCondition, type IFilterDTOState, type IFilterValue, type IIconInput, type IOverlay, type IParameter, type IParametersGroup, type IRequiredMark, type IResponsiveComponent, type ISimpleButton, type ITableParameterProps, IconButton, IconInput, IconsList, LabelBox, LinearLoader, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, type MessageCallbackProps, type MessageSubmitCallback, Modal, NumberInput, Overlay, Parameter, type ParameterObject, type ParameterPossibleValue, ParameterRender, type ParameterRenderer, type ParameterRendererProps, type ParameterType, Parameters, type ParametersDefinition, ParametersGroup, type ParametersGroupRenderer, ParametersStore, ParametersTable, type Payload, ProgressBar, RequiredMark, ScreenLocker, SimpleButton, SortableList, SortableListItem, type TAccordionHandler, type TAccordionItemButton, type TApiaButtonType, type TApiaIconButton, type TChatControllerState, type TCheckbox, type TCssProps, type TDateProps, type TFieldLabel, type TFilterOp, type TFilterPayload, type TFilterType, type TFilterValue, type TFilterValueType, type TGetTabsController, type TIcon, type TIconButton, type TIconRenderer, type TIconSize, type TIconsList, type TListbox, type TMenuItem, type TMessageType, type TModal, type TModalSize, type TNumberInput, type TNumberInputChangeEvent, type TOnClickNode, type TOnConfirmSelection, type TOnSelectionChange, type TOpenModal, type TParameterType, type TSubmenu, type TTab, type TTabLabelRenderer as TTabRenderer, type TToolbarIconButton as TToolDefinition, type TTooltip, type TUploadHandlerProps, type TUploadInProgress, type TUploadedFile, type TUseModalConfiguration, type TVisualizationType, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isImage, isParametersGroup, makeResponsiveComponent, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useModal, useModalContext, useOtherTagButton, useTabsContext };
2368
2446
  //# sourceMappingURL=index.d.ts.map