@apia/components 4.0.27 → 4.0.29
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 +154 -2
- package/dist/index.js +639 -10
- 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';
|
|
@@ -2061,6 +2061,46 @@ declare const Uploader: (({ handler }: {
|
|
|
2061
2061
|
displayName: string;
|
|
2062
2062
|
};
|
|
2063
2063
|
|
|
2064
|
+
interface IPagination {
|
|
2065
|
+
appliedFilters?: number;
|
|
2066
|
+
/**
|
|
2067
|
+
* 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.
|
|
2068
|
+
*/
|
|
2069
|
+
areAllFiltersApplied?: boolean;
|
|
2070
|
+
className?: string;
|
|
2071
|
+
currentPage: number | string;
|
|
2072
|
+
disabled?: boolean;
|
|
2073
|
+
disableReduced?: boolean;
|
|
2074
|
+
hideInfo?: boolean;
|
|
2075
|
+
hideMaximizeButton?: boolean;
|
|
2076
|
+
hideRefreshButton?: boolean;
|
|
2077
|
+
isLoading?: boolean;
|
|
2078
|
+
/**
|
|
2079
|
+
* Valor obtenido del buttonsSlice para bloquear los botones de la paginacion mientras se estan ejecutando acciones
|
|
2080
|
+
*/
|
|
2081
|
+
isPerforming?: boolean;
|
|
2082
|
+
/**
|
|
2083
|
+
* Si se pasa un método onDeleteFilters, aparece el botón "Eliminar filtros"
|
|
2084
|
+
* cerca del refresh
|
|
2085
|
+
*/
|
|
2086
|
+
onDeleteFilters?: () => unknown;
|
|
2087
|
+
onPageChange: (page: number) => unknown;
|
|
2088
|
+
onRefresh: (page: number) => unknown;
|
|
2089
|
+
pageCount: number | string;
|
|
2090
|
+
reachedMax?: boolean | undefined;
|
|
2091
|
+
hasMore?: boolean | undefined;
|
|
2092
|
+
/**
|
|
2093
|
+
* Si la cantidad de registros se obtiene desde un lugar distinto de Redux,
|
|
2094
|
+
* se puede pasar como number directamente
|
|
2095
|
+
*/
|
|
2096
|
+
recordsCount?: number;
|
|
2097
|
+
showMaximizeOnSmallBreakpoints?: boolean;
|
|
2098
|
+
variant?: 'primary' | 'secondary' | 'datagrid';
|
|
2099
|
+
onMaximize?: () => unknown;
|
|
2100
|
+
isMaximized?: boolean;
|
|
2101
|
+
}
|
|
2102
|
+
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>;
|
|
2103
|
+
|
|
2064
2104
|
interface IAsidePanel {
|
|
2065
2105
|
title?: string;
|
|
2066
2106
|
toolTip?: string;
|
|
@@ -2069,18 +2109,130 @@ interface IAsidePanel {
|
|
|
2069
2109
|
spacer?: boolean;
|
|
2070
2110
|
className?: string;
|
|
2071
2111
|
}
|
|
2112
|
+
declare const AsidePanel: ({ title, toolTip, children, columns, spacer, className, }: IAsidePanel) => React$1.JSX.Element;
|
|
2072
2113
|
|
|
2073
2114
|
declare function isFavoriteIcon(): boolean;
|
|
2115
|
+
declare const FavoriteIcon: () => React$1.JSX.Element;
|
|
2116
|
+
|
|
2117
|
+
declare const Label: ({ variant, ...props }: LabelProps) => React$1.JSX.Element;
|
|
2074
2118
|
|
|
2075
2119
|
interface IMenuDefinition {
|
|
2076
2120
|
menu: React__default.ReactNode;
|
|
2077
2121
|
stage: string;
|
|
2078
2122
|
}
|
|
2123
|
+
type TMenuEvents = {
|
|
2124
|
+
updateMenu: React__default.ReactNode;
|
|
2125
|
+
};
|
|
2126
|
+
declare class MenuController extends EventEmitter<TMenuEvents> {
|
|
2127
|
+
#private;
|
|
2128
|
+
on<K extends keyof TMenuEvents>(eventName: K, fn: (ev: TMenuEvents[K]) => unknown): () => void;
|
|
2129
|
+
getCurrent(): string | number | boolean | React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null;
|
|
2130
|
+
remove(stage: string): void;
|
|
2131
|
+
setMenu(definition: IMenuDefinition): () => void;
|
|
2132
|
+
}
|
|
2133
|
+
/**
|
|
2134
|
+
* El menú controller pretende solucionar el problema de tener múltiples menúes
|
|
2135
|
+
* para distintas pantallas dentro del mismo flujo de trabajo. El problema
|
|
2136
|
+
* original surge en administración de grupos. Al presionar modificar se
|
|
2137
|
+
* cambia de pantalla y por lo tanto de menú, pero se sigue estando en el mismo
|
|
2138
|
+
* flujo y se pretende que al presionar regresar, se restaure el menú original.
|
|
2139
|
+
* Todo esto sin afectar la responsividad de los mismos.
|
|
2140
|
+
*
|
|
2141
|
+
* Para solucionar esta problemática, se introduce este controlador, cuyo
|
|
2142
|
+
* funcionamiento es muy sencillo. Cada vez que un componente quiere setear un
|
|
2143
|
+
* menú para una pantalla particular, hace uso del método
|
|
2144
|
+
* menuController.setMenu.
|
|
2145
|
+
*
|
|
2146
|
+
* Una vez que la pantalla se está desmontando, debe desmontar su menú haciendo
|
|
2147
|
+
* uso del método menuController.remove.
|
|
2148
|
+
*
|
|
2149
|
+
* Mediante el hook useMenu provisto en este documento, se puede hacer uso del
|
|
2150
|
+
* menú actual, sin preocuparse de la existencia de varios elementos que
|
|
2151
|
+
* coincidan.
|
|
2152
|
+
*/
|
|
2153
|
+
declare const menuController: MenuController;
|
|
2079
2154
|
/**
|
|
2080
2155
|
* Este hook permite insertar el menú en un componente.
|
|
2081
2156
|
*/
|
|
2082
2157
|
declare function useMenu(breakPoints?: number[], initialMenu?: IMenuDefinition): React__default.ReactNode;
|
|
2083
2158
|
|
|
2159
|
+
/**
|
|
2160
|
+
* Con el código comentado dentro de FooterButtons se hace
|
|
2161
|
+
* que se muestren los botones cuando se está haciendo scroll
|
|
2162
|
+
* hacia abajo.
|
|
2163
|
+
*/
|
|
2164
|
+
/**
|
|
2165
|
+
*
|
|
2166
|
+
*/
|
|
2167
|
+
declare const FooterButtons: (props: BoxProps) => React$1.JSX.Element;
|
|
2168
|
+
|
|
2169
|
+
/**
|
|
2170
|
+
* Este aside aparece en la vista twoColumnList en los
|
|
2171
|
+
* breakpoints de vista móvil.
|
|
2172
|
+
*/
|
|
2173
|
+
declare const AccordionAside: () => React$1.ReactNode;
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* Este aside aparece por defecto en los breakpoints
|
|
2177
|
+
* de desktop.
|
|
2178
|
+
*/
|
|
2179
|
+
declare const Aside: () => React$1.JSX.Element;
|
|
2180
|
+
|
|
2181
|
+
type TAsideLoader = Partial<IMenuDefinition> & {
|
|
2182
|
+
children: React__default.ReactNode;
|
|
2183
|
+
variant?: string;
|
|
2184
|
+
};
|
|
2185
|
+
declare const AsideLoader: (definition: TAsideLoader) => null;
|
|
2186
|
+
|
|
2187
|
+
/**
|
|
2188
|
+
* Aside del template twoColumns. Breakpoints: 0,1,2.
|
|
2189
|
+
*
|
|
2190
|
+
* Este aside aparece por defecto en la vista móvil del
|
|
2191
|
+
* twoColumns.
|
|
2192
|
+
*/
|
|
2193
|
+
declare const BodyAside: () => React$1.ReactNode;
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* Aside del template twoColumns. Breakpoints: 0,1,2.
|
|
2197
|
+
*
|
|
2198
|
+
* Este aside es el que aparece cuando el usuario hizo scroll
|
|
2199
|
+
* en la vista responsiva, y luego hizo scroll hacia arriba.
|
|
2200
|
+
*/
|
|
2201
|
+
declare const FloatingAside: () => React__default.JSX.Element | null;
|
|
2202
|
+
|
|
2203
|
+
declare const FooterResponsiveButtons: ({ breakpoint, children, className, }: {
|
|
2204
|
+
breakpoint?: number;
|
|
2205
|
+
children: React__default.ReactNode;
|
|
2206
|
+
className?: string;
|
|
2207
|
+
}) => React__default.JSX.Element | null;
|
|
2208
|
+
|
|
2209
|
+
/**
|
|
2210
|
+
* Este aside solamente aparece en el breakpoint 3 y es el que
|
|
2211
|
+
* se muestra en el menú de hamburguesa.
|
|
2212
|
+
*/
|
|
2213
|
+
declare const HamburguerMenu: ({ container, header, forceVisibility, }: {
|
|
2214
|
+
container: string;
|
|
2215
|
+
forceVisibility?: boolean;
|
|
2216
|
+
header: string;
|
|
2217
|
+
}) => React__default.JSX.Element;
|
|
2218
|
+
|
|
2219
|
+
interface IHeader {
|
|
2220
|
+
title: string;
|
|
2221
|
+
description?: string;
|
|
2222
|
+
image?: string;
|
|
2223
|
+
}
|
|
2224
|
+
declare const Header: ({ title, description, image: imageUrl }: IHeader) => React$1.JSX.Element;
|
|
2225
|
+
|
|
2226
|
+
declare const HeaderButtons: () => React$1.JSX.Element;
|
|
2227
|
+
|
|
2228
|
+
declare const ShowResponsive: ({ show, children, display, }: {
|
|
2229
|
+
display?: string;
|
|
2230
|
+
show?: boolean[];
|
|
2231
|
+
children: React$1.ReactNode;
|
|
2232
|
+
}) => React$1.JSX.Element;
|
|
2233
|
+
|
|
2234
|
+
declare const CenteredHeaderButtons: () => React__default.JSX.Element;
|
|
2235
|
+
|
|
2084
2236
|
declare class TableParameter extends Parameter<ITableParameterProps> {
|
|
2085
2237
|
constructor(params: ITableParameterProps);
|
|
2086
2238
|
}
|
|
@@ -2467,5 +2619,5 @@ declare class Templater {
|
|
|
2467
2619
|
parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
|
|
2468
2620
|
}
|
|
2469
2621
|
|
|
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 };
|
|
2622
|
+
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
2623
|
//# sourceMappingURL=index.d.ts.map
|