@acvl/frontend-components 0.0.70 → 0.0.71
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/cjs/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +99 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -953,17 +953,17 @@ declare const LoadingComponent: React__default.FC<LoadingComponentProps>;
|
|
|
953
953
|
/**
|
|
954
954
|
* Muestra el logo de la empresa
|
|
955
955
|
*
|
|
956
|
-
* El archivo de marca es un
|
|
957
|
-
*
|
|
958
|
-
*
|
|
956
|
+
* El archivo de marca es un PNG con fondo transparente, bola roja y letras
|
|
957
|
+
* negras. En claro va tal cual; en oscuro las letras negras desaparecerían
|
|
958
|
+
* contra el fondo, así que se recolorea por CSS a blanco.
|
|
959
959
|
**/
|
|
960
960
|
interface LogoProps {
|
|
961
961
|
/** Altura máxima en px. */
|
|
962
962
|
maxHeight?: number;
|
|
963
963
|
/**
|
|
964
|
-
* Logo alternativo para modo oscuro. Lo suyo es
|
|
965
|
-
*
|
|
966
|
-
*
|
|
964
|
+
* Logo alternativo para modo oscuro. Lo suyo es una versión blanca de la
|
|
965
|
+
* marca: en cuanto exista, pasarla aquí sustituye el recoloreado por el
|
|
966
|
+
* archivo de verdad sin tocar nada más.
|
|
967
967
|
*/
|
|
968
968
|
darkSrc?: string;
|
|
969
969
|
}
|
|
@@ -1373,6 +1373,12 @@ interface CustomFilterDef {
|
|
|
1373
1373
|
defaultValue?: any;
|
|
1374
1374
|
}
|
|
1375
1375
|
|
|
1376
|
+
/**
|
|
1377
|
+
* Where the filter panel renders. `"drawer"` (the default) docks it to the right of the rows;
|
|
1378
|
+
* `"popper"` floats it off the toolbar button, the way it used to.
|
|
1379
|
+
*/
|
|
1380
|
+
type FiltersVariant = "drawer" | "popper";
|
|
1381
|
+
|
|
1376
1382
|
/**
|
|
1377
1383
|
* What the grid hands its RTK lazy query — the corrected `GridArgs`.
|
|
1378
1384
|
*
|
|
@@ -1499,6 +1505,30 @@ interface ServerGridProps {
|
|
|
1499
1505
|
* filter. The grid has no notion of who is looking at it.
|
|
1500
1506
|
*/
|
|
1501
1507
|
customFilters?: CustomFilterDef[];
|
|
1508
|
+
/**
|
|
1509
|
+
* Where the filters panel goes. Defaults to `"drawer"`: docked to the right of the
|
|
1510
|
+
* rows, taking its own column, so a filter and what it did to the list are on screen
|
|
1511
|
+
* together and the panel survives being used — applying no longer dismisses it.
|
|
1512
|
+
*
|
|
1513
|
+
* `"popper"` is the old floating panel, hanging off the toolbar button.
|
|
1514
|
+
*
|
|
1515
|
+
* A grid too narrow to dock into falls back to the popper on its own, so this rarely
|
|
1516
|
+
* needs setting for width's sake alone — see `filtersMinGridWidth`.
|
|
1517
|
+
*/
|
|
1518
|
+
filtersVariant?: FiltersVariant;
|
|
1519
|
+
/** Width of the docked filters panel, in px. Defaults to `340`. Ignored by the popper. */
|
|
1520
|
+
filtersWidth?: number;
|
|
1521
|
+
/**
|
|
1522
|
+
* How much room the rows must keep for the panel to dock at all, in px. Defaults to
|
|
1523
|
+
* `480`.
|
|
1524
|
+
*
|
|
1525
|
+
* The grid measures itself — not the window, since the same grid is a full page on one
|
|
1526
|
+
* route and a panel inside a drawer on the next — and falls back to the popper whenever
|
|
1527
|
+
* `filtersWidth` wouldn't leave this much behind. Raise it for grids with wide columns
|
|
1528
|
+
* that need more room before the trade is worth it; `0` turns the fallback off and
|
|
1529
|
+
* docks at any width.
|
|
1530
|
+
*/
|
|
1531
|
+
filtersMinGridWidth?: number;
|
|
1502
1532
|
/** Skip session persistence entirely. */
|
|
1503
1533
|
dontSaveState?: boolean;
|
|
1504
1534
|
/**
|
|
@@ -1624,6 +1654,13 @@ interface ServerGridState {
|
|
|
1624
1654
|
/** Toolbar collapse, hoisted here so shortcuts can reopen a collapsed toolbar. */
|
|
1625
1655
|
toolbarExpanded: boolean;
|
|
1626
1656
|
setToolbarExpanded: Dispatch<SetStateAction<boolean>>;
|
|
1657
|
+
/**
|
|
1658
|
+
* Whether the filter panel is showing. Up here rather than in the toolbar because the
|
|
1659
|
+
* docked panel is a sibling of the grid, not a child of the button that opens it — and
|
|
1660
|
+
* because Ctrl+Shift+F has to reach it from a collapsed toolbar either way.
|
|
1661
|
+
*/
|
|
1662
|
+
filtersOpen: boolean;
|
|
1663
|
+
setFiltersOpen: Dispatch<SetStateAction<boolean>>;
|
|
1627
1664
|
/** Exactly what was last sent to the server. Also feeds the CSV export. */
|
|
1628
1665
|
args: ServerGridArgs;
|
|
1629
1666
|
refetch: () => void;
|
|
@@ -2169,6 +2206,27 @@ interface DetailFormProps {
|
|
|
2169
2206
|
*/
|
|
2170
2207
|
declare function DetailForm({ controller, formId, storageKey, loadingHeight, responsiveTo, containerBreakpoints, slotProps, }: DetailFormProps): react_jsx_runtime.JSX.Element;
|
|
2171
2208
|
|
|
2209
|
+
/**
|
|
2210
|
+
* An action the consumer hangs off a record's chrome — cerrar, revertir, descargar el PDF —
|
|
2211
|
+
* next to the ones the shell provides on its own (editar, eliminar, historial).
|
|
2212
|
+
*
|
|
2213
|
+
* The same shape drives every shell that shows a record, so the buttons of a full page can be
|
|
2214
|
+
* handed to its drawer without rewriting them (see `resolveExtraButtons`).
|
|
2215
|
+
*/
|
|
2216
|
+
interface DetailExtraButton {
|
|
2217
|
+
/** Mode the action belongs to. `"all"` shows it in every one. */
|
|
2218
|
+
pageType: PageType | "all";
|
|
2219
|
+
title: string;
|
|
2220
|
+
icon: ReactNode;
|
|
2221
|
+
/** Receives the loaded record — `undefined` in create mode, where there is none yet. */
|
|
2222
|
+
onClick: (data: any) => void;
|
|
2223
|
+
/**
|
|
2224
|
+
* Condition on top of `pageType`, checked against the loaded record. Typically one of its
|
|
2225
|
+
* own flags (`puede_cerrar`), so what the backend allows is what the user sees.
|
|
2226
|
+
*/
|
|
2227
|
+
display?: (data: any) => boolean;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2172
2230
|
interface DetailFormDrawerNavigation {
|
|
2173
2231
|
/** Open the previous record of the list the drawer is walking. */
|
|
2174
2232
|
onPrev: () => void;
|
|
@@ -2207,6 +2265,18 @@ interface DetailFormDrawerProps {
|
|
|
2207
2265
|
permissionsPath?: string;
|
|
2208
2266
|
/** Runs after a successful mutation, before the drawer closes. Receives the response. */
|
|
2209
2267
|
onSuccess?: (response: any) => void;
|
|
2268
|
+
/**
|
|
2269
|
+
* Acciones propias del registro —cerrar, revertir, descargar su PDF—, las mismas que
|
|
2270
|
+
* `DetailPage_v2` recibe en `slots.extraButtons` y con la misma forma, para que un registro
|
|
2271
|
+
* traiga sus acciones se abra en su página o en el cajón.
|
|
2272
|
+
*
|
|
2273
|
+
* Van en un menú "⋮" de la cabecera —no como iconos sueltos— porque la cabecera del cajón
|
|
2274
|
+
* es angosta y ya carga Editar, Eliminar y lo que venga en `slots.headerActions`; el menú
|
|
2275
|
+
* además las nombra, igual que el de la página completa. Se filtran contra el modo que el
|
|
2276
|
+
* cajón muestra *en ese momento*: entrar a editar esconde las de `"detail"`, como en la
|
|
2277
|
+
* página. `display` y `onClick` reciben el registro cargado.
|
|
2278
|
+
*/
|
|
2279
|
+
extraButtons?: DetailExtraButton[];
|
|
2210
2280
|
/**
|
|
2211
2281
|
* Footer record navigator: prev/next arrows (Alt+↑ / Alt+↓) that step through a list of
|
|
2212
2282
|
* sibling records — e.g. the rows of the grid the drawer was opened from — without
|
|
@@ -2277,14 +2347,16 @@ interface DetailFormDrawerProps {
|
|
|
2277
2347
|
* A record form inside a side drawer. Reuses the same `useDetailForm` engine and
|
|
2278
2348
|
* `DetailForm` body as `DetailPage_v2`, and `MainDrawer_v2` for the chrome — so it frames
|
|
2279
2349
|
* the form exactly like every other v2 drawer. What it adds on top is the per-record
|
|
2280
|
-
* furniture: edit/delete in the header
|
|
2350
|
+
* furniture: edit/delete in the header — plus the record's own actions, when the consumer
|
|
2351
|
+
* hands them over in `extraButtons`, in a "⋮" menu beside them — and a footer holding the
|
|
2352
|
+
* form actions and, when
|
|
2281
2353
|
* `navigation` is given, a prev/next record navigator (Alt+↑ / Alt+↓) plus "Guardar ↓"
|
|
2282
2354
|
* (Alt+Shift+↓) — a save that steps to the next record instead of closing, so a column can be
|
|
2283
2355
|
* captured down a list in one pass without the hands leaving the keyboard. Rename it with
|
|
2284
2356
|
* `labels.saveAndNext`. Guardar sits outside the `<form>` and submits via the native
|
|
2285
2357
|
* `form={formId}` attribute; Guardar ↓ submits by hand, so the implicit Enter stays Guardar.
|
|
2286
2358
|
*/
|
|
2287
|
-
declare function DetailFormDrawer({ open, onClose, title, api, form, sections, pageType, startInEdit, recordKey, permissionsPath, onSuccess, navigation, width, anchor, variant, resizable, minWidth, maxWidth, widthStorageKey, onWidthChange, responsiveTo, containerBreakpoints, labels, slots, slotProps, }: DetailFormDrawerProps): react_jsx_runtime.JSX.Element;
|
|
2359
|
+
declare function DetailFormDrawer({ open, onClose, title, api, form, sections, pageType, startInEdit, recordKey, permissionsPath, onSuccess, extraButtons, navigation, width, anchor, variant, resizable, minWidth, maxWidth, widthStorageKey, onWidthChange, responsiveTo, containerBreakpoints, labels, slots, slotProps, }: DetailFormDrawerProps): react_jsx_runtime.JSX.Element;
|
|
2288
2360
|
|
|
2289
2361
|
interface DrawerGridDrawerConfig {
|
|
2290
2362
|
/** Shared field layout, used by every mode. Same shape as `DetailPage_v2`'s `form`/`sections`. */
|
|
@@ -2358,6 +2430,14 @@ interface DrawerGridDrawerConfig {
|
|
|
2358
2430
|
mutation: any;
|
|
2359
2431
|
};
|
|
2360
2432
|
};
|
|
2433
|
+
/**
|
|
2434
|
+
* Acciones propias del registro —las mismas que su página completa recibe en
|
|
2435
|
+
* `DetailPage_v2`'s `slots.extraButtons`, y con la misma forma—, en un menú "⋮" de la
|
|
2436
|
+
* cabecera del cajón. Se filtran por modo y por `display(registro)`, así que las de la
|
|
2437
|
+
* página se pasan tal cual: abrir el renglón en el cajón deja de ser una versión recortada
|
|
2438
|
+
* de abrirlo en su página.
|
|
2439
|
+
*/
|
|
2440
|
+
extraButtons?: DetailExtraButton[];
|
|
2361
2441
|
/** Runs after any successful create/edit (e.g. side effects; the grid refetches via RTK tag invalidation). */
|
|
2362
2442
|
onSaved?: (response: any) => void;
|
|
2363
2443
|
/**
|
|
@@ -2484,6 +2564,8 @@ interface ActionsMenuProps {
|
|
|
2484
2564
|
icon: ReactNode;
|
|
2485
2565
|
onClick: () => void;
|
|
2486
2566
|
}[];
|
|
2567
|
+
/** Tamaño del botón que abre el menú. `"small"` para las cabeceras del cajón. */
|
|
2568
|
+
size?: "small" | "medium";
|
|
2487
2569
|
}
|
|
2488
2570
|
|
|
2489
2571
|
interface DetailPageV2Props {
|
|
@@ -2508,13 +2590,14 @@ interface DetailPageV2Props {
|
|
|
2508
2590
|
containerBreakpoints?: DetailFormProps["containerBreakpoints"];
|
|
2509
2591
|
slots?: {
|
|
2510
2592
|
button?: ReactNode;
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2593
|
+
/**
|
|
2594
|
+
* Acciones propias del registro, junto a las del armazón. En `"detail"` viven dentro
|
|
2595
|
+
* del menú de acciones; en alta y edición, como iconos al lado de Guardar.
|
|
2596
|
+
*
|
|
2597
|
+
* Las mismas se le pueden pasar al cajón de `DrawerGrid_v2` (`drawer.extraButtons`),
|
|
2598
|
+
* para que el registro traiga sus acciones se abra donde se abra.
|
|
2599
|
+
*/
|
|
2600
|
+
extraButtons?: DetailExtraButton[];
|
|
2518
2601
|
badge?: string;
|
|
2519
2602
|
};
|
|
2520
2603
|
slotProps?: {
|
|
@@ -2866,4 +2949,4 @@ interface PulseDotProps {
|
|
|
2866
2949
|
declare function PulseDot({ active, inactiveColor, size, title }: PulseDotProps): react_jsx_runtime.JSX.Element;
|
|
2867
2950
|
|
|
2868
2951
|
export { APIContext, APIProvider, ActiveCell, ActiveIcon, Base, ButtonWithDrawer, COLOR_SCHEME_SELECTOR, CSVUpload, ChipCell, ConfirmDialog, ContentLayout, ControlledAddressAutocomplete, ControlledAmountWithCurrency, ControlledColor, ControlledDate$1 as ControlledDate, ControlledDate as ControlledDate_v2, ControlledDropdown, ControlledFileField$1 as ControlledFileField, ControlledFileField as ControlledFileField_v2, FileUploadBox as ControlledFileUploadBox, ControlledNumber, ControlledPhoneNumber, ControlledSelect$1 as ControlledSelect, ControlledSelect as ControlledSelect_v2, ControlledSlider as ControlledSimpleSlider, ControlledSlider$1 as ControlledSlider, ControlledSwitch, ControlledText, ControlledTimePicker, ControlledToggleButtons, CoverPage, CreateButtonBase, CreateButtonWithMenuOptions, CrudDropdown, CustomNoRows, DEFAULT_FORM_BREAKPOINTS, DEFAULT_PAGINATION, DeleteButton, DeleteConfirmationDialog, DetailFormDialog as DetailFormDialog_v2, DetailFormDrawer as DetailFormDrawer_v2, DetailForm as DetailForm_v2, DetailPage$1 as DetailPage, DetailPage as DetailPage_v2, DrawerGrid as DrawerGrid_v2, EditButton, ExportCSV, ExtraButtons, FORM_CONTAINER_NAME, HistorialDrawer, KpiCard, LAYER_ORDER, ListPage, Loadable, LoadingComponent, Logo, MainDrawer, MainDrawer$1 as MainDrawer_v2, MainLayout, MenuItemWithLoading, ModuleCard, MoreOptions, MyGridEditSingleSelect, NavigationContext, NavigationProvider, NormalOrIcon, NotAllowed, NotFound, ObjectProgressStack, PAGE_SIZE_OPTIONS, Panel, PollingCountdownChip, PulseDot, SIDE_PANEL_WIDTH_VAR, SaveCancelButton, ServerGrid as ServerGrid_v2, SidePanelHostContext, StatusBadge, StyledMenu, Tabs, Transitions, TrueFalse, UncontrolledText, changeTitle, closeProgressSnack, composeGridProps, deleteColumn$1 as deleteColumn, deleteColumn as deleteColumn_v2, editColumn, filterQuery, formContainerSx, formGridSx, formParser, _default as headerReducer, manualCacheRefresh, mergeSettings, openProgressSnack, query, renderChipCell, renderEditCellWithErrorTooltip, resolveChipOption, resolveInitialState, setErrors, _default$1 as snackProgressReducer, tags, theme, togglableFields, updateProgressSnackData, useAPI, useColorMode, useDetailForm, useHasPermission, useHasPermission_v2, useKeyboardShortcut, useMutationHandler, useNavigation, useServerGrid, useSidePanelHost, valueLabel };
|
|
2869
|
-
export type { APIcontextProps, AddressValue, AppTheme, ChipCellProps, ChipColor, ChipOption, ColorMode, ComoOpcionesProps, ConfirmDialogProps, ControlledInput, CustomFilterDef, CustomToolbarProps, DeleteGridColumnsProps$1 as DeleteGridColumnsProps, DetachedPage, DetailFormApi, DetailFormConfig, DetailFormController, DetailFormDialogProps, DetailFormDrawerNavigation, DetailFormDrawerProps, DetailFormProps, DetailFormStatus, DetailPageV2Props, DetailRenderProps, DrawerGridDrawerConfig, DrawerGridEditConfig, DrawerGridProps, EditGridColumnsProps, EditReadOnlyFields, FieldFilter, FieldProps$1 as FieldProps, FieldValidationProps, FilterInput, FormBreakpoint, FormGridSxOptions, GridArgs, GridColDefPropsOverrides, GridLayerContribution, GridLayerId, GridLayerMap, JSONFormProps, JSONParserProps, KeyboardShortcut, KpiCardProps, MainDrawerV2Props, MainLayoutPageHeaderProps, MainLayoutProps, MainLayoutSidebarFooterProps, MyDataGridProps, MyGridFilterModel, MyTab, MyTabProps, PageType, PanelProps, PollingCountdownChipProps, ProgressStatusProps, PulseDotProps, RowsSnapshot, ServerGridArgs, ServerGridCreateApi, ServerGridDataApi, ServerGridDeleteApi, ServerGridEditApi, ServerGridEditToggleApi, ServerGridHandle, ServerGridProps, ServerGridSnapshot, ServerGridState, SidePanelHost, UseColorModeResult, UseServerGridOptions };
|
|
2952
|
+
export type { APIcontextProps, AddressValue, AppTheme, ChipCellProps, ChipColor, ChipOption, ColorMode, ComoOpcionesProps, ConfirmDialogProps, ControlledInput, CustomFilterDef, CustomToolbarProps, DeleteGridColumnsProps$1 as DeleteGridColumnsProps, DetachedPage, DetailExtraButton, DetailFormApi, DetailFormConfig, DetailFormController, DetailFormDialogProps, DetailFormDrawerNavigation, DetailFormDrawerProps, DetailFormProps, DetailFormStatus, DetailPageV2Props, DetailRenderProps, DrawerGridDrawerConfig, DrawerGridEditConfig, DrawerGridProps, EditGridColumnsProps, EditReadOnlyFields, FieldFilter, FieldProps$1 as FieldProps, FieldValidationProps, FilterInput, FormBreakpoint, FormGridSxOptions, GridArgs, GridColDefPropsOverrides, GridLayerContribution, GridLayerId, GridLayerMap, JSONFormProps, JSONParserProps, KeyboardShortcut, KpiCardProps, MainDrawerV2Props, MainLayoutPageHeaderProps, MainLayoutProps, MainLayoutSidebarFooterProps, MyDataGridProps, MyGridFilterModel, MyTab, MyTabProps, PageType, PanelProps, PollingCountdownChipProps, ProgressStatusProps, PulseDotProps, RowsSnapshot, ServerGridArgs, ServerGridCreateApi, ServerGridDataApi, ServerGridDeleteApi, ServerGridEditApi, ServerGridEditToggleApi, ServerGridHandle, ServerGridProps, ServerGridSnapshot, ServerGridState, SidePanelHost, UseColorModeResult, UseServerGridOptions };
|
package/package.json
CHANGED