@apia/components 4.0.44 → 5.0.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.
- package/dist/index.d.ts +75 -66
- package/dist/index.js +617 -451
- 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;
|
|
@@ -933,7 +935,7 @@ type AutocompleteCmpProps = {
|
|
|
933
935
|
inputProps?: InputProps;
|
|
934
936
|
boxProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
935
937
|
};
|
|
936
|
-
declare const Autocomplete:
|
|
938
|
+
declare const Autocomplete: React$1.ForwardRefExoticComponent<AutocompleteCmpProps & React$1.RefAttributes<unknown>>;
|
|
937
939
|
|
|
938
940
|
declare const AutogrowTextarea: ((props: DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> & {
|
|
939
941
|
error?: boolean;
|
|
@@ -1052,11 +1054,30 @@ type TCheckbox = TModify<ButtonProps, {
|
|
|
1052
1054
|
}>;
|
|
1053
1055
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<TCheckbox, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1054
1056
|
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1057
|
+
type TDateProps = {
|
|
1058
|
+
className?: string;
|
|
1059
|
+
disabled?: boolean;
|
|
1060
|
+
id?: string;
|
|
1061
|
+
readonly?: boolean;
|
|
1062
|
+
onBlur?: (date: string | null, ev?: FocusEvent<HTMLElement>) => unknown;
|
|
1063
|
+
/**
|
|
1064
|
+
* If a Promise<false> is returned, the value change is not accepted
|
|
1065
|
+
* and a msgInvalidDate error message is emitted.
|
|
1066
|
+
*/
|
|
1067
|
+
onChange?: (date: string | null) => void | Promise<string | null>;
|
|
1068
|
+
onError?: (error: string | null) => unknown;
|
|
1069
|
+
value?: string;
|
|
1070
|
+
inputRef?: MutableRefObject<any>;
|
|
1071
|
+
};
|
|
1072
|
+
declare const DateInput: (({ className, disabled, id: outerId, inputRef, onBlur, onChange, onError, readonly, value: outerValue, }: TDateProps) => React$1.JSX.Element) & {
|
|
1073
|
+
displayName: string;
|
|
1074
|
+
};
|
|
1075
|
+
|
|
1076
|
+
interface IFieldErrorMessage {
|
|
1077
|
+
children: React$1.ReactNode | string;
|
|
1078
|
+
name?: string;
|
|
1059
1079
|
}
|
|
1080
|
+
declare const FieldErrorMessage: ({ children, name }: IFieldErrorMessage) => React$1.JSX.Element | null;
|
|
1060
1081
|
|
|
1061
1082
|
interface IField {
|
|
1062
1083
|
className?: string;
|
|
@@ -1080,46 +1101,6 @@ interface IIconInput extends IField {
|
|
|
1080
1101
|
}
|
|
1081
1102
|
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
1103
|
|
|
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
1104
|
/**
|
|
1124
1105
|
* El NumberInput respeta los parámetros de ambiente:
|
|
1125
1106
|
* - AMOUNT_DECIMAL_SEPARATOR
|
|
@@ -1173,24 +1154,8 @@ type TFieldLabel = {
|
|
|
1173
1154
|
*/
|
|
1174
1155
|
required?: boolean;
|
|
1175
1156
|
requiredMarkPosition?: 'before' | 'after';
|
|
1176
|
-
}
|
|
1177
|
-
declare const FieldLabel: React$1.ForwardRefExoticComponent<
|
|
1178
|
-
avoidSemicolon?: boolean;
|
|
1179
|
-
/**
|
|
1180
|
-
* Permite mostrar un mensaje de error debajo del campo
|
|
1181
|
-
*/
|
|
1182
|
-
error?: string;
|
|
1183
|
-
hideRequiredMark?: boolean;
|
|
1184
|
-
label: string;
|
|
1185
|
-
/**
|
|
1186
|
-
* La propiedad required se utiliza para mostrar el * de requerido.
|
|
1187
|
-
*
|
|
1188
|
-
* @see requiredMarkPosition
|
|
1189
|
-
* @see hideRequiredMark
|
|
1190
|
-
*/
|
|
1191
|
-
required?: boolean;
|
|
1192
|
-
requiredMarkPosition?: "before" | "after";
|
|
1193
|
-
} & BoxProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1157
|
+
};
|
|
1158
|
+
declare const FieldLabel: React$1.ForwardRefExoticComponent<TFieldLabel & BoxProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1194
1159
|
|
|
1195
1160
|
interface IAccordionItemButton {
|
|
1196
1161
|
ariaLabel: string;
|
|
@@ -2047,6 +2012,50 @@ declare const _default: React$1.MemoExoticComponent<({ str }: {
|
|
|
2047
2012
|
str: string;
|
|
2048
2013
|
}) => React$1.JSX.Element>;
|
|
2049
2014
|
|
|
2015
|
+
interface ISwitchBox {
|
|
2016
|
+
align?: 'right' | 'left';
|
|
2017
|
+
className?: string;
|
|
2018
|
+
disabled?: boolean;
|
|
2019
|
+
icon?: TIconName;
|
|
2020
|
+
label: string;
|
|
2021
|
+
notSwitchedLabel?: boolean;
|
|
2022
|
+
onClose?: () => unknown;
|
|
2023
|
+
onSwitch?: (switched: boolean) => unknown;
|
|
2024
|
+
switchedLabel?: string;
|
|
2025
|
+
switchProps?: SwitchProps;
|
|
2026
|
+
value?: boolean;
|
|
2027
|
+
}
|
|
2028
|
+
declare const SwitchCard: (({ align, icon, label, notSwitchedLabel, onClose, onSwitch, switchedLabel, switchProps, value, disabled, }: ISwitchBox) => React$1.JSX.Element) & {
|
|
2029
|
+
displayName: string;
|
|
2030
|
+
};
|
|
2031
|
+
|
|
2032
|
+
type TPickUserForPermissions = {
|
|
2033
|
+
userId: string;
|
|
2034
|
+
userLogin: string;
|
|
2035
|
+
canUpdate: boolean;
|
|
2036
|
+
};
|
|
2037
|
+
type TPickPoolForPermissions = {
|
|
2038
|
+
poolId: string;
|
|
2039
|
+
poolName: string;
|
|
2040
|
+
canUpdate: boolean;
|
|
2041
|
+
};
|
|
2042
|
+
type TPermissionsContext = {
|
|
2043
|
+
disabled?: boolean;
|
|
2044
|
+
onChangePools: (u: TPickPoolForPermissions[]) => unknown;
|
|
2045
|
+
onChangeUsers: (u: TPickUserForPermissions[]) => unknown;
|
|
2046
|
+
permissions: {
|
|
2047
|
+
pools: TPickPoolForPermissions[];
|
|
2048
|
+
users: TPickUserForPermissions[];
|
|
2049
|
+
};
|
|
2050
|
+
};
|
|
2051
|
+
declare const Permissions: (({ everyonePermissionsValue, collapsePermissions, disabled, onChangeEveryonePermissions, onChangeUsers, onChangePools, permissions, }: TPermissionsContext & {
|
|
2052
|
+
everyonePermissionsValue: "R" | "M" | "";
|
|
2053
|
+
collapsePermissions?: boolean;
|
|
2054
|
+
onChangeEveryonePermissions: (value: "R" | "M" | "") => unknown;
|
|
2055
|
+
}) => React$1.JSX.Element) & {
|
|
2056
|
+
displayName: string;
|
|
2057
|
+
};
|
|
2058
|
+
|
|
2050
2059
|
interface IAsidePanel {
|
|
2051
2060
|
title?: string;
|
|
2052
2061
|
toolTip?: string;
|
|
@@ -2569,5 +2578,5 @@ declare class Templater {
|
|
|
2569
2578
|
parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
|
|
2570
2579
|
}
|
|
2571
2580
|
|
|
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 };
|
|
2581
|
+
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, TwoColumns, TwoColumnsList, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getFieldErrorStyles, getFieldTouchedStyles, importComponent, isFavoriteIcon, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
2573
2582
|
//# sourceMappingURL=index.d.ts.map
|