@apia/components 4.0.44 → 4.0.46
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 +73 -55
- package/dist/index.js +705 -665
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
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, FocusEvent, MouseEvent as MouseEvent$1, KeyboardEvent, FC, FunctionComponent, ForwardedRef, ComponentType, ReactElement } from 'react';
|
|
2
|
+
import React__default, { ReactNode, Ref, RefObject, DetailedHTMLProps, TextareaHTMLAttributes, ChangeEventHandler, FocusEvent, MutableRefObject, 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
|
-
import { BoxProps, TPalette, InputProps, ThemeUIStyleObject, IconButtonProps, ButtonProps, ThemeUICSSObject, SelectProps, LabelProps } from '@apia/theme';
|
|
5
|
+
import { BoxProps, TPalette, InputProps, ThemeUIStyleObject, IconButtonProps, ButtonProps, ThemeUICSSObject, SelectProps, SwitchProps, LabelProps } from '@apia/theme';
|
|
6
6
|
import { TIconName, TIconType } from '@apia/icons';
|
|
7
7
|
import { Args } from 'react-cool-portal';
|
|
8
8
|
import * as _apia_notifications from '@apia/notifications';
|
|
@@ -281,6 +281,8 @@ declare class ApiaUtilModals {
|
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
declare class ApiaUtilNotifications {
|
|
284
|
+
protected util: ApiaUtil;
|
|
285
|
+
constructor(util: ApiaUtil);
|
|
284
286
|
close: (id: TNotificationId | INotification) => void;
|
|
285
287
|
closeAll: () => void;
|
|
286
288
|
notify: (notification: TDispatchedNotification) => void;
|
|
@@ -357,7 +359,7 @@ type TabsControllerProps<TabType extends TTab> = {
|
|
|
357
359
|
id: string;
|
|
358
360
|
initialTabs?: TabType[];
|
|
359
361
|
getController?: (controller: TabsController) => unknown;
|
|
360
|
-
initialState?: Pick<Partial<TTabsListState<TabType>>, 'isMultiple'
|
|
362
|
+
initialState?: Pick<Partial<TTabsListState<TabType>>, 'isMultiple'>;
|
|
361
363
|
onCloseTab?: (tan: Tab) => void;
|
|
362
364
|
orientation: TOrientation;
|
|
363
365
|
};
|
|
@@ -538,8 +540,6 @@ declare class ApiaUtilParsers {
|
|
|
538
540
|
* Toma un número en formato Apia y lo devuelve como float en javascript.
|
|
539
541
|
*/
|
|
540
542
|
jsNumber(value: string): number;
|
|
541
|
-
dateToApiaString(value: Date): string | undefined;
|
|
542
|
-
dateFromApiaString(value: string): Date | null;
|
|
543
543
|
/**
|
|
544
544
|
* Hay muchos valores que podrían querer ser interpretados como booleano
|
|
545
545
|
*
|
|
@@ -1052,11 +1052,30 @@ type TCheckbox = TModify<ButtonProps, {
|
|
|
1052
1052
|
}>;
|
|
1053
1053
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<TCheckbox, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1054
1054
|
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1055
|
+
type TDateProps = {
|
|
1056
|
+
className?: string;
|
|
1057
|
+
disabled?: boolean;
|
|
1058
|
+
id?: string;
|
|
1059
|
+
readonly?: boolean;
|
|
1060
|
+
onBlur?: (date: string | null, ev?: FocusEvent<HTMLElement>) => unknown;
|
|
1061
|
+
/**
|
|
1062
|
+
* If a Promise<false> is returned, the value change is not accepted
|
|
1063
|
+
* and a msgInvalidDate error message is emitted.
|
|
1064
|
+
*/
|
|
1065
|
+
onChange?: (date: string | null) => void | Promise<string | null>;
|
|
1066
|
+
onError?: (error: string) => unknown;
|
|
1067
|
+
value?: string;
|
|
1068
|
+
inputRef?: MutableRefObject<any>;
|
|
1069
|
+
};
|
|
1070
|
+
declare const DateInput: (({ className, disabled, id: outerId, inputRef, onBlur, onChange, onError, readonly, value: outerValue, }: TDateProps) => React$1.JSX.Element) & {
|
|
1071
|
+
displayName: string;
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1074
|
+
interface IFieldErrorMessage {
|
|
1075
|
+
children: React$1.ReactNode | string;
|
|
1076
|
+
name?: string;
|
|
1059
1077
|
}
|
|
1078
|
+
declare const FieldErrorMessage: ({ children, name }: IFieldErrorMessage) => React$1.JSX.Element | null;
|
|
1060
1079
|
|
|
1061
1080
|
interface IField {
|
|
1062
1081
|
className?: string;
|
|
@@ -1080,46 +1099,6 @@ interface IIconInput extends IField {
|
|
|
1080
1099
|
}
|
|
1081
1100
|
declare const IconInput: ({ additionalButtons, additionalButtonsPosition, buttonProps, buttonRef, className, disabled, hideButton, icon, inputProps, inputRef, isLoading, mask, onClick, onBlur, readOnly, ...rest }: IIconInput) => React__default.JSX.Element;
|
|
1082
1101
|
|
|
1083
|
-
type TDateProps = TModify<InputProps, {
|
|
1084
|
-
allowPickBeforeToday?: boolean;
|
|
1085
|
-
avoidErrorMessage?: boolean;
|
|
1086
|
-
CalModalRenderer?: (props: ICalModal & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1087
|
-
deleteFiltersTimestamp?: number;
|
|
1088
|
-
error?: string | null;
|
|
1089
|
-
/**
|
|
1090
|
-
* Con esta propiedad se puede proveer una función que será utilizada para
|
|
1091
|
-
* determinar qué máscara debe utilizar el input
|
|
1092
|
-
*/
|
|
1093
|
-
getCustomMask?: () => string;
|
|
1094
|
-
inputClassName?: string;
|
|
1095
|
-
isLoading?: boolean;
|
|
1096
|
-
onBlur?: (ev: FocusEvent<HTMLInputElement>) => void | boolean | string | Promise<boolean | string>;
|
|
1097
|
-
/**
|
|
1098
|
-
* Recibe la nueva fecha. En caso de devolver
|
|
1099
|
-
* false desde este método, el nuevo valor no
|
|
1100
|
-
* se persistirá.
|
|
1101
|
-
*/
|
|
1102
|
-
onChange?: (newValue: string) => boolean | string | void;
|
|
1103
|
-
/**
|
|
1104
|
-
* Es llamado cada vez que alguien presiona el botón de eliminar fecha.
|
|
1105
|
-
*/
|
|
1106
|
-
onDelete?: () => void;
|
|
1107
|
-
onError?: (error: string | null) => unknown;
|
|
1108
|
-
/**
|
|
1109
|
-
* Con esta propiedad se puede proveer una función que recibirá como
|
|
1110
|
-
* parámetro el valor actual del cmapo y debe devolver el valor a mostrar.
|
|
1111
|
-
*/
|
|
1112
|
-
renderLabel?: (value: string) => string;
|
|
1113
|
-
value?: string;
|
|
1114
|
-
}> & Pick<IIconInput, 'buttonProps'>;
|
|
1115
|
-
declare const DateInput: React__default.ForwardRefExoticComponent<Omit<TDateProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
1116
|
-
|
|
1117
|
-
interface IFieldErrorMessage {
|
|
1118
|
-
children: React$1.ReactNode | string;
|
|
1119
|
-
name?: string;
|
|
1120
|
-
}
|
|
1121
|
-
declare const FieldErrorMessage: ({ children, name }: IFieldErrorMessage) => React$1.JSX.Element | null;
|
|
1122
|
-
|
|
1123
1102
|
/**
|
|
1124
1103
|
* El NumberInput respeta los parámetros de ambiente:
|
|
1125
1104
|
* - AMOUNT_DECIMAL_SEPARATOR
|
|
@@ -1745,7 +1724,6 @@ type TIconsList<P = Record<string, unknown>> = {
|
|
|
1745
1724
|
* Listado de íconos
|
|
1746
1725
|
*/
|
|
1747
1726
|
icons: TIcon<P>[];
|
|
1748
|
-
iconsPerRow?: number;
|
|
1749
1727
|
iconRenderer?: TIconRenderer<P>;
|
|
1750
1728
|
/**
|
|
1751
1729
|
* Por defecto se usa iconWidth=100.
|
|
@@ -2047,6 +2025,50 @@ declare const _default: React$1.MemoExoticComponent<({ str }: {
|
|
|
2047
2025
|
str: string;
|
|
2048
2026
|
}) => React$1.JSX.Element>;
|
|
2049
2027
|
|
|
2028
|
+
interface ISwitchBox {
|
|
2029
|
+
align?: 'right' | 'left';
|
|
2030
|
+
className?: string;
|
|
2031
|
+
disabled?: boolean;
|
|
2032
|
+
icon?: TIconName;
|
|
2033
|
+
label: string;
|
|
2034
|
+
notSwitchedLabel?: boolean;
|
|
2035
|
+
onClose?: () => unknown;
|
|
2036
|
+
onSwitch?: (switched: boolean) => unknown;
|
|
2037
|
+
switchedLabel?: string;
|
|
2038
|
+
switchProps?: SwitchProps;
|
|
2039
|
+
value?: boolean;
|
|
2040
|
+
}
|
|
2041
|
+
declare const SwitchCard: (({ align, icon, label, notSwitchedLabel, onClose, onSwitch, switchedLabel, switchProps, value, disabled, }: ISwitchBox) => React$1.JSX.Element) & {
|
|
2042
|
+
displayName: string;
|
|
2043
|
+
};
|
|
2044
|
+
|
|
2045
|
+
type TPickUserForPermissions = {
|
|
2046
|
+
userId: string;
|
|
2047
|
+
userLogin: string;
|
|
2048
|
+
canUpdate: boolean;
|
|
2049
|
+
};
|
|
2050
|
+
type TPickPoolForPermissions = {
|
|
2051
|
+
poolId: string;
|
|
2052
|
+
poolName: string;
|
|
2053
|
+
canUpdate: boolean;
|
|
2054
|
+
};
|
|
2055
|
+
type TPermissionsContext = {
|
|
2056
|
+
disabled?: boolean;
|
|
2057
|
+
onChangePools: (u: TPickPoolForPermissions[]) => unknown;
|
|
2058
|
+
onChangeUsers: (u: TPickUserForPermissions[]) => unknown;
|
|
2059
|
+
permissions: {
|
|
2060
|
+
pools: TPickPoolForPermissions[];
|
|
2061
|
+
users: TPickUserForPermissions[];
|
|
2062
|
+
};
|
|
2063
|
+
};
|
|
2064
|
+
declare const Permissions: (({ everyonePermissionsValue, collapsePermissions, disabled, onChangeEveryonePermissions, onChangeUsers, onChangePools, permissions, }: TPermissionsContext & {
|
|
2065
|
+
everyonePermissionsValue: "R" | "M" | "";
|
|
2066
|
+
collapsePermissions?: boolean;
|
|
2067
|
+
onChangeEveryonePermissions: (value: "R" | "M" | "") => unknown;
|
|
2068
|
+
}) => React$1.JSX.Element) & {
|
|
2069
|
+
displayName: string;
|
|
2070
|
+
};
|
|
2071
|
+
|
|
2050
2072
|
interface IAsidePanel {
|
|
2051
2073
|
title?: string;
|
|
2052
2074
|
toolTip?: string;
|
|
@@ -2112,8 +2134,6 @@ declare function useMenu(breakPoints?: number[], initialMenu?: IMenuDefinition):
|
|
|
2112
2134
|
*/
|
|
2113
2135
|
declare const FooterButtons: (props: BoxProps) => React$1.JSX.Element;
|
|
2114
2136
|
|
|
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
|
-
|
|
2117
2137
|
/**
|
|
2118
2138
|
* Este aside aparece en la vista twoColumnList en los
|
|
2119
2139
|
* breakpoints de vista móvil.
|
|
@@ -2181,8 +2201,6 @@ declare const ShowResponsive: ({ show, children, display, }: {
|
|
|
2181
2201
|
|
|
2182
2202
|
declare const CenteredHeaderButtons: () => React__default.JSX.Element;
|
|
2183
2203
|
|
|
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
|
-
|
|
2186
2204
|
declare class TableParameter extends Parameter<ITableParameterProps> {
|
|
2187
2205
|
constructor(params: ITableParameterProps);
|
|
2188
2206
|
}
|
|
@@ -2569,5 +2587,5 @@ declare class Templater {
|
|
|
2569
2587
|
parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
|
|
2570
2588
|
}
|
|
2571
2589
|
|
|
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,
|
|
2590
|
+
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, Permissions, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, SwitchCard, 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 TPickPoolForPermissions, type TPickUserForPermissions, 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, getFieldErrorStyles, getFieldTouchedStyles, importComponent, isFavoriteIcon, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
2573
2591
|
//# sourceMappingURL=index.d.ts.map
|