@apia/components 4.0.42 → 4.0.44
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 +22 -137
- package/dist/index.js +3698 -4481
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { ReactNode, Ref, RefObject, DetailedHTMLProps, TextareaHTMLAttributes, ChangeEventHandler, FocusEvent, MouseEvent as MouseEvent$1, KeyboardEvent, FC,
|
|
2
|
+
import React__default, { ReactNode, Ref, RefObject, DetailedHTMLProps, TextareaHTMLAttributes, ChangeEventHandler, FocusEvent, MouseEvent as MouseEvent$1, KeyboardEvent, FC, 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
5
|
import { BoxProps, TPalette, InputProps, ThemeUIStyleObject, IconButtonProps, ButtonProps, ThemeUICSSObject, SelectProps, LabelProps } from '@apia/theme';
|
|
6
6
|
import { TIconName, TIconType } from '@apia/icons';
|
|
7
|
-
import { MenuItemProps, ControlledMenuProps } from '@szhsin/react-menu';
|
|
8
|
-
export { ControlledMenuProps, MenuItemProps } from '@szhsin/react-menu';
|
|
9
7
|
import { Args } from 'react-cool-portal';
|
|
10
8
|
import * as _apia_notifications from '@apia/notifications';
|
|
11
9
|
import { TNotificationId, INotification, TDispatchedNotification, TNotificationSelector } from '@apia/notifications';
|
|
12
10
|
export { INotification, TDispatchedNotification } from '@apia/notifications';
|
|
11
|
+
import { MenuItemProps, ControlledMenuProps } from '@szhsin/react-menu';
|
|
12
|
+
export { ControlledMenuProps, MenuItemProps } from '@szhsin/react-menu';
|
|
13
13
|
|
|
14
14
|
type TModalSize = 'editGrid' | 'sm' | 'md' | 'md-fixed' | 'lg' | 'lg-fixed' | 'xl' | 'xl-fixed' | 'xxl' | 'xxxl' | 'xxxl-fixed' | 'flex' | 'cal' | 'finder' | 'fileModal';
|
|
15
15
|
type TApiaButtonType = 'primary' | 'primary-sm' | 'secondary' | 'light-secondary' | 'secondary-sm' | 'danger' | 'danger-sm' | 'outline' | 'outline-sm' | 'warning' | 'warning-sm' | 'link';
|
|
@@ -232,7 +232,10 @@ type TOpenModal = Pick<TModal, 'NavBar' | 'Portal' | 'children' | 'className' |
|
|
|
232
232
|
|
|
233
233
|
declare class ApiaUtilModalHandler {
|
|
234
234
|
close: () => void;
|
|
235
|
-
|
|
235
|
+
setProperties: (props: Partial<TOpenModal>) => unknown;
|
|
236
|
+
getProperties: () => TOpenModal;
|
|
237
|
+
constructor(close: () => void, setProperties: (props: Partial<TOpenModal>) => unknown, getProperties: () => TOpenModal);
|
|
238
|
+
setConfirmProps(props: Partial<TOpenModal['confirmProps']>): void;
|
|
236
239
|
}
|
|
237
240
|
declare class ApiaUtilModals {
|
|
238
241
|
#private;
|
|
@@ -354,7 +357,7 @@ type TabsControllerProps<TabType extends TTab> = {
|
|
|
354
357
|
id: string;
|
|
355
358
|
initialTabs?: TabType[];
|
|
356
359
|
getController?: (controller: TabsController) => unknown;
|
|
357
|
-
initialState?: Pick<Partial<TTabsListState<TabType>>, 'isMultiple'>;
|
|
360
|
+
initialState?: Pick<Partial<TTabsListState<TabType>>, 'isMultiple' | 'showAtLeastOneTab'>;
|
|
358
361
|
onCloseTab?: (tan: Tab) => void;
|
|
359
362
|
orientation: TOrientation;
|
|
360
363
|
};
|
|
@@ -410,6 +413,7 @@ type TTab = {
|
|
|
410
413
|
* Es el texto que se va a mostrar en el tab
|
|
411
414
|
*/
|
|
412
415
|
label: string;
|
|
416
|
+
labelIcon?: React__default.ReactElement;
|
|
413
417
|
labelRenderer?: TTabLabelRenderer;
|
|
414
418
|
/**
|
|
415
419
|
* Se pueden pasar propiedades adicionales que serán recibidas en cada
|
|
@@ -417,7 +421,6 @@ type TTab = {
|
|
|
417
421
|
* distintas partes de la aplicación.
|
|
418
422
|
*/
|
|
419
423
|
additionalProps?: any;
|
|
420
|
-
tabId: string;
|
|
421
424
|
title?: string;
|
|
422
425
|
};
|
|
423
426
|
type TTabLabelRenderer = (props: {
|
|
@@ -495,6 +498,7 @@ type TApiaUtilInnerConfirm = TApiaUtilConfirm & {
|
|
|
495
498
|
type TAlert = {
|
|
496
499
|
children: ReactNode;
|
|
497
500
|
title: string;
|
|
501
|
+
confirmButtonText?: string;
|
|
498
502
|
};
|
|
499
503
|
type TApiaUtilInnerAlert = TAlert & {
|
|
500
504
|
onClose: () => unknown;
|
|
@@ -534,6 +538,8 @@ declare class ApiaUtilParsers {
|
|
|
534
538
|
* Toma un número en formato Apia y lo devuelve como float en javascript.
|
|
535
539
|
*/
|
|
536
540
|
jsNumber(value: string): number;
|
|
541
|
+
dateToApiaString(value: Date): string | undefined;
|
|
542
|
+
dateFromApiaString(value: string): Date | null;
|
|
537
543
|
/**
|
|
538
544
|
* Hay muchos valores que podrían querer ser interpretados como booleano
|
|
539
545
|
*
|
|
@@ -915,6 +921,7 @@ declare class AutocompleteController {
|
|
|
915
921
|
selectFocused(): void;
|
|
916
922
|
setValue(value: string, props?: {
|
|
917
923
|
fireOnChange?: boolean;
|
|
924
|
+
force?: true;
|
|
918
925
|
}): Promise<void>;
|
|
919
926
|
tooltipRef: ApiaUtilTooltip | null;
|
|
920
927
|
}
|
|
@@ -1320,135 +1327,6 @@ interface ILabelBox {
|
|
|
1320
1327
|
type TLabelBox = ILabelBox & BoxProps;
|
|
1321
1328
|
declare const LabelBox: ({ className, label, tooltip, closeTooltip, onClose, variant, ...props }: TLabelBox) => React$1.JSX.Element;
|
|
1322
1329
|
|
|
1323
|
-
declare class ChatMessage {
|
|
1324
|
-
message: ReactNode;
|
|
1325
|
-
messageType: TMessageType;
|
|
1326
|
-
attachments: IAttachment[];
|
|
1327
|
-
reference: ReactNode;
|
|
1328
|
-
id: number;
|
|
1329
|
-
constructor(message?: ReactNode, messageType?: TMessageType, attachments?: IAttachment[], reference?: ReactNode);
|
|
1330
|
-
clone: () => ChatMessage;
|
|
1331
|
-
removeAttachment(attachment: IAttachment): void;
|
|
1332
|
-
addAttachmentDescription(attachment: IAttachment, description: string): void;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
type TMessageType = 'user' | 'system' | 'warning' | 'error' | 'information' | 'response' | 'multipleChoice' | 'customMessage';
|
|
1336
|
-
interface IAttachment {
|
|
1337
|
-
name: string;
|
|
1338
|
-
id: string;
|
|
1339
|
-
base64: string;
|
|
1340
|
-
description?: string;
|
|
1341
|
-
}
|
|
1342
|
-
type TChatControllerState = {
|
|
1343
|
-
isLoading: boolean;
|
|
1344
|
-
canRecord: boolean;
|
|
1345
|
-
canAttach: boolean;
|
|
1346
|
-
canAddUserMessage: boolean;
|
|
1347
|
-
canAddSystemMessage: boolean;
|
|
1348
|
-
maxAttachmentsSize: number;
|
|
1349
|
-
messages: ChatMessage[];
|
|
1350
|
-
currentMessage: ChatMessage;
|
|
1351
|
-
};
|
|
1352
|
-
interface MessageCallbackProps {
|
|
1353
|
-
message: ChatMessage;
|
|
1354
|
-
}
|
|
1355
|
-
type MessageSubmitCallback = (props: MessageCallbackProps) => unknown;
|
|
1356
|
-
type TComponentRender = {
|
|
1357
|
-
path: string;
|
|
1358
|
-
args: Record<any, any>;
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
|
-
declare const _default$2: React$1.MemoExoticComponent<({ componentData, }: {
|
|
1362
|
-
componentData: TComponentRender;
|
|
1363
|
-
}) => React$1.JSX.Element>;
|
|
1364
|
-
|
|
1365
|
-
declare const _default$1: React$1.MemoExoticComponent<({ str }: {
|
|
1366
|
-
str: string;
|
|
1367
|
-
}) => React$1.JSX.Element[]>;
|
|
1368
|
-
|
|
1369
|
-
interface AutoscrollContainerProps {
|
|
1370
|
-
/** How close (in px) to the bottom you have to be *when scrolling down*
|
|
1371
|
-
* for auto-scroll to kick back in. */
|
|
1372
|
-
threshold?: number;
|
|
1373
|
-
className?: string;
|
|
1374
|
-
}
|
|
1375
|
-
declare const AutoscrollContainer: React__default.FC<PropsWithChildren<AutoscrollContainerProps>>;
|
|
1376
|
-
|
|
1377
|
-
declare class ChatController<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
1378
|
-
private onMessageSubmit;
|
|
1379
|
-
private additionalOptions?;
|
|
1380
|
-
private classNames?;
|
|
1381
|
-
currentIndex: number;
|
|
1382
|
-
state: TChatControllerState & T;
|
|
1383
|
-
private internalAudioRecorder;
|
|
1384
|
-
private internalCameraRecorder;
|
|
1385
|
-
private maxId;
|
|
1386
|
-
audioRecorder: {
|
|
1387
|
-
cancelOnStop: boolean;
|
|
1388
|
-
start: () => void;
|
|
1389
|
-
stop: () => Promise<void>;
|
|
1390
|
-
record: number;
|
|
1391
|
-
state: _apia_util.AudioRecorderState;
|
|
1392
|
-
};
|
|
1393
|
-
constructor(props: Partial<TChatControllerState & T>, onMessageSubmit: MessageSubmitCallback, additionalOptions?: TMenuItem[] | undefined, classNames?: {
|
|
1394
|
-
history?: string;
|
|
1395
|
-
textarea?: string;
|
|
1396
|
-
attachments?: string;
|
|
1397
|
-
} | undefined);
|
|
1398
|
-
removeMessage(idx: number): void;
|
|
1399
|
-
addMessage(message: ChatMessage): void;
|
|
1400
|
-
clearHistory(): void;
|
|
1401
|
-
clearMessage(): void;
|
|
1402
|
-
removeAttachment(attachment: IAttachment): void;
|
|
1403
|
-
private handleSubmit;
|
|
1404
|
-
private isForHistory;
|
|
1405
|
-
private canGoNext;
|
|
1406
|
-
private canGoPrev;
|
|
1407
|
-
nextMessage(): void;
|
|
1408
|
-
prevMessage(): void;
|
|
1409
|
-
protected getAdditionalProps(): Partial<MessageCallbackProps>;
|
|
1410
|
-
History: (() => React$1.JSX.Element) & {
|
|
1411
|
-
displayName: string;
|
|
1412
|
-
};
|
|
1413
|
-
Attachments: (() => React$1.JSX.Element) & {
|
|
1414
|
-
displayName: string;
|
|
1415
|
-
};
|
|
1416
|
-
TextArea: (() => React$1.JSX.Element) & {
|
|
1417
|
-
displayName: string;
|
|
1418
|
-
};
|
|
1419
|
-
Renderer: () => React$1.JSX.Element;
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
declare class FloatingChatController extends ChatController<{
|
|
1423
|
-
isWindowOpen: boolean;
|
|
1424
|
-
}> {
|
|
1425
|
-
private modalTitle;
|
|
1426
|
-
constructor(props: {
|
|
1427
|
-
props: Partial<TChatControllerState & {
|
|
1428
|
-
isWindowOpen: boolean;
|
|
1429
|
-
}>;
|
|
1430
|
-
onMessageSubmit: MessageSubmitCallback;
|
|
1431
|
-
modalTitle?: string;
|
|
1432
|
-
additionalOptions?: TMenuItem[];
|
|
1433
|
-
classNames?: {
|
|
1434
|
-
history?: string;
|
|
1435
|
-
textarea?: string;
|
|
1436
|
-
attachments?: string;
|
|
1437
|
-
};
|
|
1438
|
-
});
|
|
1439
|
-
getModalTitle(): string | undefined;
|
|
1440
|
-
setModalTitle(title: string): void;
|
|
1441
|
-
open(): void;
|
|
1442
|
-
Window: (() => React$1.JSX.Element | null) & {
|
|
1443
|
-
displayName: string;
|
|
1444
|
-
};
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
declare function getBase64FromFile(f: File): Promise<string>;
|
|
1448
|
-
declare function getBase64FromBlob(b: Blob): Promise<string>;
|
|
1449
|
-
declare function getFileExtension(name: string): string | undefined;
|
|
1450
|
-
declare function isImage(base64: string): boolean;
|
|
1451
|
-
|
|
1452
1330
|
declare const ContainerWithHeader: ({ title, children, footerChildren, onClose, additionalButtons, }: {
|
|
1453
1331
|
title: string;
|
|
1454
1332
|
children: ReactNode;
|
|
@@ -1481,10 +1359,11 @@ declare const CollapsiblePanel: React__default.ForwardRefExoticComponent<ICollap
|
|
|
1481
1359
|
|
|
1482
1360
|
interface IAlert {
|
|
1483
1361
|
children: React.ReactNode;
|
|
1362
|
+
confirmButtonText?: string;
|
|
1484
1363
|
onClose: () => void;
|
|
1485
1364
|
title?: string;
|
|
1486
1365
|
}
|
|
1487
|
-
declare const AlertModal: ({ children, onClose, title }: IAlert) => React$1.JSX.Element;
|
|
1366
|
+
declare const AlertModal: ({ children, confirmButtonText, onClose, title, }: IAlert) => React$1.JSX.Element;
|
|
1488
1367
|
|
|
1489
1368
|
type TListboxItem = {
|
|
1490
1369
|
children?: ReactNode;
|
|
@@ -1617,6 +1496,7 @@ type TModalContext = {
|
|
|
1617
1496
|
close: () => unknown;
|
|
1618
1497
|
descriptionId: string;
|
|
1619
1498
|
};
|
|
1499
|
+
declare const ModalContext: React$1.Context<TModalContext | null>;
|
|
1620
1500
|
declare function useModalContext(): TModalContext;
|
|
1621
1501
|
|
|
1622
1502
|
interface ICalendarModal extends TModal {
|
|
@@ -1865,6 +1745,7 @@ type TIconsList<P = Record<string, unknown>> = {
|
|
|
1865
1745
|
* Listado de íconos
|
|
1866
1746
|
*/
|
|
1867
1747
|
icons: TIcon<P>[];
|
|
1748
|
+
iconsPerRow?: number;
|
|
1868
1749
|
iconRenderer?: TIconRenderer<P>;
|
|
1869
1750
|
/**
|
|
1870
1751
|
* Por defecto se usa iconWidth=100.
|
|
@@ -2231,6 +2112,8 @@ declare function useMenu(breakPoints?: number[], initialMenu?: IMenuDefinition):
|
|
|
2231
2112
|
*/
|
|
2232
2113
|
declare const FooterButtons: (props: BoxProps) => React$1.JSX.Element;
|
|
2233
2114
|
|
|
2115
|
+
declare const TwoColumns: ({ atVeryTop, upperAside, overHeadAside, image, title, subTitle, description, underHeadAside, mainContent, footer, asideContent, footerButtons, }: Partial<Record<"atVeryTop" | "upperAside" | "overHeadAside" | "image" | "title" | "subTitle" | "description" | "underHeadAside" | "mainContent" | "footer" | "asideContent" | "footerButtons", ReactNode>>) => React$1.JSX.Element;
|
|
2116
|
+
|
|
2234
2117
|
/**
|
|
2235
2118
|
* Este aside aparece en la vista twoColumnList en los
|
|
2236
2119
|
* breakpoints de vista móvil.
|
|
@@ -2298,6 +2181,8 @@ declare const ShowResponsive: ({ show, children, display, }: {
|
|
|
2298
2181
|
|
|
2299
2182
|
declare const CenteredHeaderButtons: () => React__default.JSX.Element;
|
|
2300
2183
|
|
|
2184
|
+
declare const TwoColumnsList: ({ image, subTitle, title, description, favoriteIcon, content, headerBottom, contentFooter, footer, asideContent, footerButtons, }: Partial<Record<"image" | "title" | "subTitle" | "description" | "favoriteIcon" | "headerBottom" | "content" | "contentFooter" | "footer" | "asideContent" | "footerButtons", ReactNode>>) => React$1.JSX.Element;
|
|
2185
|
+
|
|
2301
2186
|
declare class TableParameter extends Parameter<ITableParameterProps> {
|
|
2302
2187
|
constructor(params: ITableParameterProps);
|
|
2303
2188
|
}
|
|
@@ -2684,5 +2569,5 @@ declare class Templater {
|
|
|
2684
2569
|
parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
|
|
2685
2570
|
}
|
|
2686
2571
|
|
|
2687
|
-
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, type AutocompleteCmpProps, AutocompleteController, type AutocompleteOption, type AutocompleteProps, AutogrowTextarea,
|
|
2572
|
+
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, type AutocompleteCmpProps, AutocompleteController, type AutocompleteOption, type AutocompleteProps, AutogrowTextarea, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAsidePanel, type ICalendarModal, type IConfirm, type IDialogButtonBar, type IDialogHeader, type IField, type IFieldErrorMessage, type IFilterCondition, type IFilterDTOState, type IFilterValue, type IIconInput, type IMenuDefinition, type IOverlay, type IPagination, type IParameter, type IParametersGroup, type IRequiredMark, type IResponsiveComponent, type ISimpleButton, type ITableParameterProps, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, LinearSpinnerLock, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, _default as MDRenderer, Modal, ModalContext, NumberInput, Overlay, Pagination, 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, ShowResponsive, SimpleButton, SortableList, SortableListItem, type TAccordionHandler, type TAccordionItemButton, type TApiaButtonType, type TApiaIconButton, 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 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, TwoColumns, TwoColumnsList, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getFieldErrorStyles, getFieldTouchedStyles, importComponent, isFavoriteIcon, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
2688
2573
|
//# sourceMappingURL=index.d.ts.map
|