@apia/components 4.0.28 → 4.0.30
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 +160 -2
- package/dist/index.js +644 -12
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React$1 from 'react';
|
|
|
2
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, InputProps, ThemeUIStyleObject, IconButtonProps, ButtonProps, ThemeUICSSObject, SelectProps } from '@apia/theme';
|
|
5
|
+
import { BoxProps, TPalette, InputProps, ThemeUIStyleObject, IconButtonProps, ButtonProps, ThemeUICSSObject, SelectProps, LabelProps } 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';
|
|
@@ -423,6 +423,12 @@ type TTabLabelRenderer = (props: {
|
|
|
423
423
|
}) => React__default.ReactElement;
|
|
424
424
|
type TTabsListState<TabType extends TTab> = {
|
|
425
425
|
isMultiple: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* By default, any customEvents.focus occurred inside the tab render will cause the tab to be opened.
|
|
428
|
+
*
|
|
429
|
+
* If listenFocusEvents=false, the customEvents.focus events will be ignored.
|
|
430
|
+
*/
|
|
431
|
+
listenFocusEvents?: boolean;
|
|
426
432
|
openTabsHistory: Set<Tab<TabType>>;
|
|
427
433
|
/**
|
|
428
434
|
* If this property is true, then it could never happen that all tabs are closed.
|
|
@@ -2061,6 +2067,46 @@ declare const Uploader: (({ handler }: {
|
|
|
2061
2067
|
displayName: string;
|
|
2062
2068
|
};
|
|
2063
2069
|
|
|
2070
|
+
interface IPagination {
|
|
2071
|
+
appliedFilters?: number;
|
|
2072
|
+
/**
|
|
2073
|
+
* Este valor determina si el boton de eliminar filtros debe mostrarse como si hubieran filtros sin aplicar (en caso de que haya filtros aplicados por defecto) o si debe mostrarse como si todos los filtros con valor estan aplicados a la busqueda actual. Se deberia verificar con el slice de redux correspondiente a la tabla.
|
|
2074
|
+
*/
|
|
2075
|
+
areAllFiltersApplied?: boolean;
|
|
2076
|
+
className?: string;
|
|
2077
|
+
currentPage: number | string;
|
|
2078
|
+
disabled?: boolean;
|
|
2079
|
+
disableReduced?: boolean;
|
|
2080
|
+
hideInfo?: boolean;
|
|
2081
|
+
hideMaximizeButton?: boolean;
|
|
2082
|
+
hideRefreshButton?: boolean;
|
|
2083
|
+
isLoading?: boolean;
|
|
2084
|
+
/**
|
|
2085
|
+
* Valor obtenido del buttonsSlice para bloquear los botones de la paginacion mientras se estan ejecutando acciones
|
|
2086
|
+
*/
|
|
2087
|
+
isPerforming?: boolean;
|
|
2088
|
+
/**
|
|
2089
|
+
* Si se pasa un método onDeleteFilters, aparece el botón "Eliminar filtros"
|
|
2090
|
+
* cerca del refresh
|
|
2091
|
+
*/
|
|
2092
|
+
onDeleteFilters?: () => unknown;
|
|
2093
|
+
onPageChange: (page: number) => unknown;
|
|
2094
|
+
onRefresh: (page: number) => unknown;
|
|
2095
|
+
pageCount: number | string;
|
|
2096
|
+
reachedMax?: boolean | undefined;
|
|
2097
|
+
hasMore?: boolean | undefined;
|
|
2098
|
+
/**
|
|
2099
|
+
* Si la cantidad de registros se obtiene desde un lugar distinto de Redux,
|
|
2100
|
+
* se puede pasar como number directamente
|
|
2101
|
+
*/
|
|
2102
|
+
recordsCount?: number;
|
|
2103
|
+
showMaximizeOnSmallBreakpoints?: boolean;
|
|
2104
|
+
variant?: 'primary' | 'secondary' | 'datagrid';
|
|
2105
|
+
onMaximize?: () => unknown;
|
|
2106
|
+
isMaximized?: boolean;
|
|
2107
|
+
}
|
|
2108
|
+
declare const Pagination: React__default.MemoExoticComponent<({ appliedFilters, areAllFiltersApplied, className, currentPage, disabled, disableReduced, hasMore, hideInfo, hideMaximizeButton, hideRefreshButton, isLoading, isPerforming, onDeleteFilters, onPageChange, onRefresh, pageCount, recordsCount: outerRecordsCount, reachedMax, showMaximizeOnSmallBreakpoints, variant, isMaximized, onMaximize, }: IPagination) => React__default.JSX.Element>;
|
|
2109
|
+
|
|
2064
2110
|
interface IAsidePanel {
|
|
2065
2111
|
title?: string;
|
|
2066
2112
|
toolTip?: string;
|
|
@@ -2069,18 +2115,130 @@ interface IAsidePanel {
|
|
|
2069
2115
|
spacer?: boolean;
|
|
2070
2116
|
className?: string;
|
|
2071
2117
|
}
|
|
2118
|
+
declare const AsidePanel: ({ title, toolTip, children, columns, spacer, className, }: IAsidePanel) => React$1.JSX.Element;
|
|
2072
2119
|
|
|
2073
2120
|
declare function isFavoriteIcon(): boolean;
|
|
2121
|
+
declare const FavoriteIcon: () => React$1.JSX.Element;
|
|
2122
|
+
|
|
2123
|
+
declare const Label: ({ variant, ...props }: LabelProps) => React$1.JSX.Element;
|
|
2074
2124
|
|
|
2075
2125
|
interface IMenuDefinition {
|
|
2076
2126
|
menu: React__default.ReactNode;
|
|
2077
2127
|
stage: string;
|
|
2078
2128
|
}
|
|
2129
|
+
type TMenuEvents = {
|
|
2130
|
+
updateMenu: React__default.ReactNode;
|
|
2131
|
+
};
|
|
2132
|
+
declare class MenuController extends EventEmitter<TMenuEvents> {
|
|
2133
|
+
#private;
|
|
2134
|
+
on<K extends keyof TMenuEvents>(eventName: K, fn: (ev: TMenuEvents[K]) => unknown): () => void;
|
|
2135
|
+
getCurrent(): string | number | boolean | React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null;
|
|
2136
|
+
remove(stage: string): void;
|
|
2137
|
+
setMenu(definition: IMenuDefinition): () => void;
|
|
2138
|
+
}
|
|
2139
|
+
/**
|
|
2140
|
+
* El menú controller pretende solucionar el problema de tener múltiples menúes
|
|
2141
|
+
* para distintas pantallas dentro del mismo flujo de trabajo. El problema
|
|
2142
|
+
* original surge en administración de grupos. Al presionar modificar se
|
|
2143
|
+
* cambia de pantalla y por lo tanto de menú, pero se sigue estando en el mismo
|
|
2144
|
+
* flujo y se pretende que al presionar regresar, se restaure el menú original.
|
|
2145
|
+
* Todo esto sin afectar la responsividad de los mismos.
|
|
2146
|
+
*
|
|
2147
|
+
* Para solucionar esta problemática, se introduce este controlador, cuyo
|
|
2148
|
+
* funcionamiento es muy sencillo. Cada vez que un componente quiere setear un
|
|
2149
|
+
* menú para una pantalla particular, hace uso del método
|
|
2150
|
+
* menuController.setMenu.
|
|
2151
|
+
*
|
|
2152
|
+
* Una vez que la pantalla se está desmontando, debe desmontar su menú haciendo
|
|
2153
|
+
* uso del método menuController.remove.
|
|
2154
|
+
*
|
|
2155
|
+
* Mediante el hook useMenu provisto en este documento, se puede hacer uso del
|
|
2156
|
+
* menú actual, sin preocuparse de la existencia de varios elementos que
|
|
2157
|
+
* coincidan.
|
|
2158
|
+
*/
|
|
2159
|
+
declare const menuController: MenuController;
|
|
2079
2160
|
/**
|
|
2080
2161
|
* Este hook permite insertar el menú en un componente.
|
|
2081
2162
|
*/
|
|
2082
2163
|
declare function useMenu(breakPoints?: number[], initialMenu?: IMenuDefinition): React__default.ReactNode;
|
|
2083
2164
|
|
|
2165
|
+
/**
|
|
2166
|
+
* Con el código comentado dentro de FooterButtons se hace
|
|
2167
|
+
* que se muestren los botones cuando se está haciendo scroll
|
|
2168
|
+
* hacia abajo.
|
|
2169
|
+
*/
|
|
2170
|
+
/**
|
|
2171
|
+
*
|
|
2172
|
+
*/
|
|
2173
|
+
declare const FooterButtons: (props: BoxProps) => React$1.JSX.Element;
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* Este aside aparece en la vista twoColumnList en los
|
|
2177
|
+
* breakpoints de vista móvil.
|
|
2178
|
+
*/
|
|
2179
|
+
declare const AccordionAside: () => React$1.ReactNode;
|
|
2180
|
+
|
|
2181
|
+
/**
|
|
2182
|
+
* Este aside aparece por defecto en los breakpoints
|
|
2183
|
+
* de desktop.
|
|
2184
|
+
*/
|
|
2185
|
+
declare const Aside: () => React$1.JSX.Element;
|
|
2186
|
+
|
|
2187
|
+
type TAsideLoader = Partial<IMenuDefinition> & {
|
|
2188
|
+
children: React__default.ReactNode;
|
|
2189
|
+
variant?: string;
|
|
2190
|
+
};
|
|
2191
|
+
declare const AsideLoader: (definition: TAsideLoader) => null;
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* Aside del template twoColumns. Breakpoints: 0,1,2.
|
|
2195
|
+
*
|
|
2196
|
+
* Este aside aparece por defecto en la vista móvil del
|
|
2197
|
+
* twoColumns.
|
|
2198
|
+
*/
|
|
2199
|
+
declare const BodyAside: () => React$1.ReactNode;
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* Aside del template twoColumns. Breakpoints: 0,1,2.
|
|
2203
|
+
*
|
|
2204
|
+
* Este aside es el que aparece cuando el usuario hizo scroll
|
|
2205
|
+
* en la vista responsiva, y luego hizo scroll hacia arriba.
|
|
2206
|
+
*/
|
|
2207
|
+
declare const FloatingAside: () => React__default.JSX.Element | null;
|
|
2208
|
+
|
|
2209
|
+
declare const FooterResponsiveButtons: ({ breakpoint, children, className, }: {
|
|
2210
|
+
breakpoint?: number;
|
|
2211
|
+
children: React__default.ReactNode;
|
|
2212
|
+
className?: string;
|
|
2213
|
+
}) => React__default.JSX.Element | null;
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* Este aside solamente aparece en el breakpoint 3 y es el que
|
|
2217
|
+
* se muestra en el menú de hamburguesa.
|
|
2218
|
+
*/
|
|
2219
|
+
declare const HamburguerMenu: ({ container, header, forceVisibility, }: {
|
|
2220
|
+
container: string;
|
|
2221
|
+
forceVisibility?: boolean;
|
|
2222
|
+
header: string;
|
|
2223
|
+
}) => React__default.JSX.Element;
|
|
2224
|
+
|
|
2225
|
+
interface IHeader {
|
|
2226
|
+
title: string;
|
|
2227
|
+
description?: string;
|
|
2228
|
+
image?: string;
|
|
2229
|
+
}
|
|
2230
|
+
declare const Header: ({ title, description, image: imageUrl }: IHeader) => React$1.JSX.Element;
|
|
2231
|
+
|
|
2232
|
+
declare const HeaderButtons: () => React$1.JSX.Element;
|
|
2233
|
+
|
|
2234
|
+
declare const ShowResponsive: ({ show, children, display, }: {
|
|
2235
|
+
display?: string;
|
|
2236
|
+
show?: boolean[];
|
|
2237
|
+
children: React$1.ReactNode;
|
|
2238
|
+
}) => React$1.JSX.Element;
|
|
2239
|
+
|
|
2240
|
+
declare const CenteredHeaderButtons: () => React__default.JSX.Element;
|
|
2241
|
+
|
|
2084
2242
|
declare class TableParameter extends Parameter<ITableParameterProps> {
|
|
2085
2243
|
constructor(params: ITableParameterProps);
|
|
2086
2244
|
}
|
|
@@ -2467,5 +2625,5 @@ declare class Templater {
|
|
|
2467
2625
|
parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
|
|
2468
2626
|
}
|
|
2469
2627
|
|
|
2470
|
-
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, DeadSessionModal, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingChatController, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAsidePanel, type IAttachment, 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 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, isFavoriteIcon, isImage, isParametersGroup, makeResponsiveComponent, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
2628
|
+
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, AutoscrollContainer, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, ChatController, ChatMessage, Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FloatingChatController, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAsidePanel, type IAttachment, 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, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, type MessageCallbackProps, type MessageSubmitCallback, Modal, 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 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, isFavoriteIcon, isImage, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
2471
2629
|
//# sourceMappingURL=index.d.ts.map
|