@scmlatam/web-ui 0.2.37 → 0.2.39
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/src/components/rb.d.ts +4 -4
- package/dist/src/pages/home/rb/components/VirtualTreePlayground.d.ts +1 -0
- package/dist/src/pages/home/rb/data/virtualTreeData.d.ts +6 -0
- package/dist/src/pages/home/rb/sections/TabPanelSection.d.ts +1 -0
- package/dist/src/rb-components/navigation/TabPanel.d.ts +49 -0
- package/dist/src/rb-components/navigation/index.d.ts +3 -0
- package/dist/src/rb-components/table/types.d.ts +12 -0
- package/dist/src/rb-components/tree-panel/VirtualTree.d.ts +3 -0
- package/dist/src/rb-components/tree-panel/index.d.ts +6 -1
- package/dist/src/rb-components/tree-panel/useVirtualTreeState.d.ts +27 -0
- package/dist/src/rb-components/tree-panel/virtualTree.types.d.ts +70 -0
- package/dist/src/rb-components/tree-panel/virtualTree.utils.d.ts +17 -0
- package/dist/src/rb-components/tree-panel/virtualTree.utils.test.d.ts +1 -0
- package/dist/src/rb-components/ui/primitives/AutoCustomCompleteField.d.ts +21 -0
- package/dist/src/rb-components/ui/primitives/date-fields/CustomDatePicker.d.ts +3 -1
- package/dist/web-ui.js +8893 -8623
- package/dist/web-ui.umd.cjs +85 -85
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ export { FormField, FormGrid, FormShell } from '../rb-components/form';
|
|
|
8
8
|
export type { FormFieldProps, FormFieldSpan, FormGridColumnGap, FormGridProps, FormGridRowGap, FormShellProps, FormShellSize, } from '../rb-components/form';
|
|
9
9
|
export { RbList, RbListItem } from '../rb-components/list';
|
|
10
10
|
export type { RbListItemProps, RbListProps, RbListSize, RbListVariant, } from '../rb-components/list';
|
|
11
|
-
export { PillsTabs, PillsTabs as RbPillsTabs, } from '../rb-components/navigation';
|
|
12
|
-
export type { PillsTabItem, PillsTabsProps } from '../rb-components/navigation';
|
|
11
|
+
export { PillsTabs, PillsTabs as RbPillsTabs, TabPanel, TabPanel as RbTabPanel, } from '../rb-components/navigation';
|
|
12
|
+
export type { PillsTabItem, PillsTabsProps, TabPanelItem, TabPanelProps, } from '../rb-components/navigation';
|
|
13
13
|
export { Button as RBButton, Input, AutoCustomCompleteField, CustomDatefield, CustomDatePicker, CustomTimefield, CustomDateRangefield, CustomDateRangePicker, CustomDateRangeCalendar, CustomIndefiniteDatePicker, RbInlineChipField, CalendarChipIcon, ClockChipIcon, Card, CardHeader, CardTitle, CardContent, CardFooter, IconButton as RbIconButton, Tooltip, Portal, ConfirmDialog, RbContextMenu, Checkbox, Radio, RbStepper, cn, } from '../rb-components/ui';
|
|
14
14
|
export type { AutoValueItem, ButtonProps as RBButtonProps, InputProps, CustomAutoCompleteFieldProps, CustomDatefieldProps, CustomDatePickerProps, CustomTimefieldProps, CustomDateRangefieldProps, CustomDateRangePickerProps, CustomDateRangeCalendarProps, CustomIndefiniteDatePickerProps, RbInlineChipFieldProps, RbInlineChipFieldAction, RbContextMenuAlign, RbContextMenuItem, RbContextMenuPosition, RbContextMenuProps, RbContextMenuVariant, CardProps, IconButtonProps as RbIconButtonProps, CheckboxProps, CheckboxSize, RadioProps, RbStepperProps, RbStepperStep, PortalProps, TooltipProps, ConfirmDialogProps, ConfirmDialogInitialFocus, ConfirmDialogIconType, } from '../rb-components/ui';
|
|
15
15
|
export { RbTable, RbExcelTable, RbTableToolbar, RbToolbarActionButton, RbToolbarActions, RbToolbarDateRangeField, RbToolbarMultiSelectField, RbToolbarSearchField, RbToolbarSelectField, formatRbExcelDate, formatRbExcelTime, getRbExcelValueAtPath, isRbExcelEmptyValue, isValidRbExcelDate, isValidRbExcelNumber, isValidRbExcelTime, parseRbExcelValue, setRbExcelValueAtPath, } from '../rb-components/table';
|
|
@@ -17,8 +17,8 @@ export type { RbExcelCellContext, RbExcelCreateRowContext, RbExcelEditorContext,
|
|
|
17
17
|
export { DashboardShell, ShellContent } from '../rb-components/shell';
|
|
18
18
|
export { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, } from '../rb-components/sidebar';
|
|
19
19
|
export { TopBar, TopBarUserMenu } from '../rb-components/topbar';
|
|
20
|
-
export { TreePanel, findNodeById, flattenTree, getExpandableNodeIds, getNodeSelectionState, getSelectableDescendantIds, getSelectableSubtreeIds, hasNodeChildren, isNodeSelectable, isNodeSelectionMutable, normalizeHierarchicalSelection, toggleExpandedNode, toggleNodeSelection, } from '../rb-components/tree-panel';
|
|
21
|
-
export type { GetSelectableSubtreeOptions, TreePanelExpandedChangeDetails, TreePanelIdCollection, TreePanelNode, TreePanelNodeId, TreePanelProps, TreePanelRenderNodeParams, TreePanelSelectionChangeDetails, TreePanelSelectionState, } from '../rb-components/tree-panel';
|
|
20
|
+
export { TreePanel, VirtualTree, findNodeById, flattenTree, getExpandableNodeIds, getNodeSelectionState, getSelectableDescendantIds, getSelectableSubtreeIds, hasNodeChildren, isNodeSelectable, isNodeSelectionMutable, normalizeHierarchicalSelection, toggleExpandedNode, toggleNodeSelection, buildVirtualTreeIndex, filterVirtualTreeItems, getVirtualTreeAncestorIds, getVisibleVirtualTreeItems, normalizeVirtualTreeSearch, normalizeVirtualTreeSelection, toggleVirtualTreeSelection, useVirtualTreeState, } from '../rb-components/tree-panel';
|
|
21
|
+
export type { GetSelectableSubtreeOptions, TreePanelExpandedChangeDetails, TreePanelIdCollection, TreePanelNode, TreePanelNodeId, TreePanelProps, TreePanelRenderNodeParams, TreePanelSelectionChangeDetails, TreePanelSelectionState, VirtualTreeApiRef, VirtualTreeExpandedChangeDetails, VirtualTreeFlatItem, VirtualTreeIdCollection, VirtualTreeIndex, VirtualTreeNode, VirtualTreeNodeId, VirtualTreeNodeType, VirtualTreeProps, VirtualTreeSelectionChangeDetails, VirtualTreeSelectionMode, } from '../rb-components/tree-panel';
|
|
22
22
|
export { getRbImageUrl, rbImages } from '../rb-components/images';
|
|
23
23
|
export type { RbImageName } from '../rb-components/images';
|
|
24
24
|
export { Timeline } from '../rb-components/timeline';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function VirtualTreePlayground(): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VirtualTreeNode } from '../../../../rb-components/tree-panel';
|
|
2
|
+
export interface VirtualTreeDemoValue {
|
|
3
|
+
code: string;
|
|
4
|
+
category: "subcompany" | "area" | "work_position";
|
|
5
|
+
}
|
|
6
|
+
export declare const VIRTUAL_TREE_DEMO_ITEMS: VirtualTreeNode<VirtualTreeDemoValue>[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TabPanelSection(): import("react").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ----------------------------------------------------------------------------
|
|
4
|
+
* TAB PANEL
|
|
5
|
+
* ----------------------------------------------------------------------------
|
|
6
|
+
*
|
|
7
|
+
* Tarjeta blanca con pestañas tipo píldora sueltas (fondo gris claro y la
|
|
8
|
+
* pestaña activa en base-dark) y un botón opcional para cerrar el panel.
|
|
9
|
+
*
|
|
10
|
+
* Objetivo:
|
|
11
|
+
* - No depende de MUI.
|
|
12
|
+
* - No decide qué contenido renderizar debajo de las pestañas.
|
|
13
|
+
* - Solo renderiza las pestañas, notifica el tab activo con onChange y
|
|
14
|
+
* expone onClose para el botón de cierre.
|
|
15
|
+
*
|
|
16
|
+
* Uso:
|
|
17
|
+
*
|
|
18
|
+
* const [tab, setTab] = useState("auditoria");
|
|
19
|
+
*
|
|
20
|
+
* <TabPanel
|
|
21
|
+
* value={tab}
|
|
22
|
+
* onChange={setTab}
|
|
23
|
+
* onClose={() => setOpen(false)}
|
|
24
|
+
* items={[
|
|
25
|
+
* { value: "totales", label: "Totales" },
|
|
26
|
+
* { value: "auditoria", label: "Auditoria" },
|
|
27
|
+
* { value: "acumulaciones", label: "Acumulaciones" },
|
|
28
|
+
* ]}
|
|
29
|
+
* >
|
|
30
|
+
* Contenido del tab activo.
|
|
31
|
+
* </TabPanel>
|
|
32
|
+
*/
|
|
33
|
+
export type TabPanelItem<Value extends string = string> = {
|
|
34
|
+
value: Value;
|
|
35
|
+
label: React.ReactNode;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type TabPanelProps<Value extends string = string> = {
|
|
39
|
+
value: Value;
|
|
40
|
+
items: TabPanelItem<Value>[];
|
|
41
|
+
onChange: (value: Value) => void;
|
|
42
|
+
onClose?: () => void;
|
|
43
|
+
closeLabel?: string;
|
|
44
|
+
ariaLabel?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
};
|
|
48
|
+
export declare function TabPanel<Value extends string = string>({ value, items, onChange, onClose, closeLabel, ariaLabel, className, children, }: TabPanelProps<Value>): React.JSX.Element;
|
|
49
|
+
export default TabPanel;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { PillsTabs } from './PillsTabs';
|
|
2
2
|
export { PillsTabs as RbPillsTabs } from './PillsTabs';
|
|
3
3
|
export type { PillsTabItem, PillsTabsProps } from './PillsTabs';
|
|
4
|
+
export { TabPanel } from './TabPanel';
|
|
5
|
+
export { TabPanel as RbTabPanel } from './TabPanel';
|
|
6
|
+
export type { TabPanelItem, TabPanelProps } from './TabPanel';
|
|
@@ -100,6 +100,14 @@ export type RbTableColumn<Row extends RbTableBaseRow = RbTableBaseRow> = {
|
|
|
100
100
|
*/
|
|
101
101
|
maxWidth?: number;
|
|
102
102
|
align?: RbTableAlign;
|
|
103
|
+
/**
|
|
104
|
+
* Cuando es true, el contenido de `render` ocupa todo el ancho y alto
|
|
105
|
+
* disponibles de la celda y define su propia alineación (por ejemplo,
|
|
106
|
+
* mediante flex/justify o text-align dentro del propio render).
|
|
107
|
+
*
|
|
108
|
+
* En ese caso la celda ignora `align` y no aplica el truncado con tooltip.
|
|
109
|
+
*/
|
|
110
|
+
fullWidthRender?: boolean;
|
|
103
111
|
render?: (row: Row, index: number) => React.ReactNode;
|
|
104
112
|
renderHeader?: () => React.ReactNode;
|
|
105
113
|
truncate?: boolean;
|
|
@@ -128,6 +136,10 @@ export type RbLegacyGridColumn<Row extends RbTableBaseRow = RbTableBaseRow> = {
|
|
|
128
136
|
flex?: number;
|
|
129
137
|
align?: RbTableAlign;
|
|
130
138
|
headerAlign?: RbTableAlign;
|
|
139
|
+
/**
|
|
140
|
+
* Ver RbTableColumn.fullWidthRender.
|
|
141
|
+
*/
|
|
142
|
+
fullWidthRender?: boolean;
|
|
131
143
|
sortable?: boolean;
|
|
132
144
|
filterable?: boolean;
|
|
133
145
|
headerClassName?: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VirtualTreeApiRef, VirtualTreeProps } from './virtualTree.types';
|
|
3
|
+
export declare const VirtualTree: <TValue = unknown>(props: VirtualTreeProps<TValue> & React.RefAttributes<VirtualTreeApiRef<TValue>>) => React.ReactElement;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export { default as TreePanel } from './TreePanel';
|
|
2
|
+
export { VirtualTree } from './VirtualTree';
|
|
3
|
+
export { useVirtualTreeState } from './useVirtualTreeState';
|
|
2
4
|
export type { TreePanelExpandedChangeDetails, TreePanelIdCollection, TreePanelNode, TreePanelNodeId, TreePanelProps, TreePanelRenderNodeParams, TreePanelSelectionChangeDetails, TreePanelSelectionState, } from './treePanel.types';
|
|
3
5
|
export { findNodeById, flattenTree, getExpandableNodeIds, getNodeSelectionState, getSelectableDescendantIds, getSelectableSubtreeIds, hasNodeChildren, isNodeSelectable, isNodeSelectionMutable, normalizeHierarchicalSelection, toggleExpandedNode, toggleNodeSelection, } from './treePanel.utils';
|
|
4
|
-
export type { GetSelectableSubtreeOptions
|
|
6
|
+
export type { GetSelectableSubtreeOptions } from './treePanel.utils';
|
|
7
|
+
export type { VirtualTreeApiRef, VirtualTreeExpandedChangeDetails, VirtualTreeFlatItem, VirtualTreeIdCollection, VirtualTreeNode, VirtualTreeNodeId, VirtualTreeNodeType, VirtualTreeProps, VirtualTreeSelectionChangeDetails, VirtualTreeSelectionMode, } from './virtualTree.types';
|
|
8
|
+
export { buildVirtualTreeIndex, filterVirtualTreeItems, getVirtualTreeAncestorIds, getVisibleVirtualTreeItems, normalizeVirtualTreeSearch, normalizeVirtualTreeSelection, toggleVirtualTreeSelection, } from './virtualTree.utils';
|
|
9
|
+
export type { VirtualTreeIndex } from './virtualTree.utils';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { VirtualTreeIdCollection, VirtualTreeNode, VirtualTreeNodeId, VirtualTreeProps, VirtualTreeSelectionMode } from './virtualTree.types';
|
|
2
|
+
interface UseVirtualTreeStateOptions<TValue> {
|
|
3
|
+
items: readonly VirtualTreeNode<TValue>[];
|
|
4
|
+
selectionMode: VirtualTreeSelectionMode;
|
|
5
|
+
selectedIds?: VirtualTreeIdCollection;
|
|
6
|
+
defaultSelectedIds?: VirtualTreeIdCollection;
|
|
7
|
+
onSelectionChange?: VirtualTreeProps<TValue>["onSelectionChange"];
|
|
8
|
+
expandedIds?: VirtualTreeIdCollection;
|
|
9
|
+
defaultExpandedIds?: VirtualTreeIdCollection;
|
|
10
|
+
defaultExpandAll?: boolean;
|
|
11
|
+
onExpandedChange?: VirtualTreeProps<TValue>["onExpandedChange"];
|
|
12
|
+
}
|
|
13
|
+
export declare function useVirtualTreeState<TValue>({ items, selectionMode, selectedIds, defaultSelectedIds, onSelectionChange, expandedIds, defaultExpandedIds, defaultExpandAll, onExpandedChange, }: UseVirtualTreeStateOptions<TValue>): {
|
|
14
|
+
index: import('./virtualTree.utils').VirtualTreeIndex<TValue>;
|
|
15
|
+
visibleItems: import('./virtualTree.types').VirtualTreeFlatItem<TValue>[];
|
|
16
|
+
expandedSet: Set<VirtualTreeNodeId>;
|
|
17
|
+
selectedSet: Set<VirtualTreeNodeId>;
|
|
18
|
+
selectedIds: VirtualTreeNodeId[];
|
|
19
|
+
toggleExpansion: (nodeId: VirtualTreeNodeId) => void;
|
|
20
|
+
setItemExpansion: (nodeId: VirtualTreeNodeId, expanded: boolean) => void;
|
|
21
|
+
expandItems: (nodeIds: readonly VirtualTreeNodeId[]) => void;
|
|
22
|
+
expandAll: () => void;
|
|
23
|
+
collapseAll: () => void;
|
|
24
|
+
expandAncestors: (nodeId: VirtualTreeNodeId) => void;
|
|
25
|
+
toggleSelection: (nodeId: VirtualTreeNodeId) => void;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type VirtualTreeNodeId = string | number;
|
|
3
|
+
export type VirtualTreeNodeType = "subcompany" | "area" | "work_position";
|
|
4
|
+
export type VirtualTreeSelectionMode = "single" | "multiple";
|
|
5
|
+
export type VirtualTreeIdCollection = readonly VirtualTreeNodeId[] | ReadonlySet<VirtualTreeNodeId>;
|
|
6
|
+
export interface VirtualTreeNode<TValue = unknown> {
|
|
7
|
+
id: VirtualTreeNodeId;
|
|
8
|
+
label: string;
|
|
9
|
+
type: VirtualTreeNodeType;
|
|
10
|
+
children?: readonly VirtualTreeNode<TValue>[];
|
|
11
|
+
value?: TValue;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface VirtualTreeFlatItem<TValue = unknown> {
|
|
16
|
+
id: VirtualTreeNodeId;
|
|
17
|
+
node: VirtualTreeNode<TValue>;
|
|
18
|
+
parentId: VirtualTreeNodeId | null;
|
|
19
|
+
depth: number;
|
|
20
|
+
hasChildren: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface VirtualTreeSelectionChangeDetails<TValue = unknown> {
|
|
23
|
+
nodeId: VirtualTreeNodeId;
|
|
24
|
+
node: VirtualTreeNode<TValue> | null;
|
|
25
|
+
}
|
|
26
|
+
export interface VirtualTreeExpandedChangeDetails<TValue = unknown> {
|
|
27
|
+
nodeId: VirtualTreeNodeId;
|
|
28
|
+
node: VirtualTreeNode<TValue> | null;
|
|
29
|
+
}
|
|
30
|
+
export interface VirtualTreeApiRef<TValue = unknown> {
|
|
31
|
+
expandAll: () => void;
|
|
32
|
+
collapseAll: () => void;
|
|
33
|
+
setItemExpansion: (itemId: VirtualTreeNodeId, expanded: boolean) => void;
|
|
34
|
+
focusItem: (itemId: VirtualTreeNodeId) => void;
|
|
35
|
+
getItem: (itemId: VirtualTreeNodeId) => VirtualTreeNode<TValue> | undefined;
|
|
36
|
+
scrollToItem: (itemId: VirtualTreeNodeId) => void;
|
|
37
|
+
}
|
|
38
|
+
export interface VirtualTreeProps<TValue = unknown> {
|
|
39
|
+
title: React.ReactNode;
|
|
40
|
+
ariaLabel?: string;
|
|
41
|
+
items?: readonly VirtualTreeNode<TValue>[];
|
|
42
|
+
selectionMode?: VirtualTreeSelectionMode;
|
|
43
|
+
selectedIds?: VirtualTreeIdCollection;
|
|
44
|
+
defaultSelectedIds?: VirtualTreeIdCollection;
|
|
45
|
+
onSelectionChange?: (selectedIds: VirtualTreeNodeId[], details: VirtualTreeSelectionChangeDetails<TValue>) => void;
|
|
46
|
+
expandedIds?: VirtualTreeIdCollection;
|
|
47
|
+
defaultExpandedIds?: VirtualTreeIdCollection;
|
|
48
|
+
defaultExpandAll?: boolean;
|
|
49
|
+
onExpandedChange?: (expandedIds: VirtualTreeNodeId[], details: VirtualTreeExpandedChangeDetails<TValue>) => void;
|
|
50
|
+
selectionDisabled?: boolean;
|
|
51
|
+
filterTypeLabel?: string;
|
|
52
|
+
searchLabel?: string;
|
|
53
|
+
searchPlaceholder?: string;
|
|
54
|
+
clearSearchLabel?: string;
|
|
55
|
+
subcompanyLabel?: string;
|
|
56
|
+
areaLabel?: string;
|
|
57
|
+
workPositionLabel?: string;
|
|
58
|
+
emptyText?: React.ReactNode;
|
|
59
|
+
noResultsText?: React.ReactNode;
|
|
60
|
+
expandLabel?: string;
|
|
61
|
+
collapseLabel?: string;
|
|
62
|
+
height?: number;
|
|
63
|
+
rowHeight?: number;
|
|
64
|
+
overscanCount?: number;
|
|
65
|
+
loading?: boolean;
|
|
66
|
+
loadingLabel?: string;
|
|
67
|
+
className?: string;
|
|
68
|
+
headerClassName?: string;
|
|
69
|
+
bodyClassName?: string;
|
|
70
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VirtualTreeFlatItem, VirtualTreeIdCollection, VirtualTreeNode, VirtualTreeNodeId, VirtualTreeNodeType, VirtualTreeSelectionMode } from './virtualTree.types';
|
|
2
|
+
export interface VirtualTreeIndex<TValue = unknown> {
|
|
3
|
+
allItems: VirtualTreeFlatItem<TValue>[];
|
|
4
|
+
itemsById: Map<VirtualTreeNodeId, VirtualTreeFlatItem<TValue>>;
|
|
5
|
+
expandableIds: Set<VirtualTreeNodeId>;
|
|
6
|
+
rootIds: VirtualTreeNodeId[];
|
|
7
|
+
}
|
|
8
|
+
export declare function toVirtualTreeIdArray(value?: VirtualTreeIdCollection): VirtualTreeNodeId[];
|
|
9
|
+
export declare function buildVirtualTreeIndex<TValue>(items: readonly VirtualTreeNode<TValue>[]): VirtualTreeIndex<TValue>;
|
|
10
|
+
export declare function getVirtualTreeAncestorIds<TValue>(index: VirtualTreeIndex<TValue>, nodeId: VirtualTreeNodeId): VirtualTreeNodeId[];
|
|
11
|
+
export declare function getVisibleVirtualTreeItems<TValue>(index: VirtualTreeIndex<TValue>, expandedIds: ReadonlySet<VirtualTreeNodeId>): VirtualTreeFlatItem<TValue>[];
|
|
12
|
+
export declare function normalizeVirtualTreeSearch(value: string): string;
|
|
13
|
+
export declare function filterVirtualTreeItems<TValue>(index: VirtualTreeIndex<TValue>, filterType: VirtualTreeNodeType, query: string): VirtualTreeFlatItem<TValue>[];
|
|
14
|
+
export declare function getVirtualTreeBranchIds<TValue>(items: readonly VirtualTreeFlatItem<TValue>[]): Set<VirtualTreeNodeId>;
|
|
15
|
+
export declare function getVisibleFilteredVirtualTreeItems<TValue>(index: VirtualTreeIndex<TValue>, items: readonly VirtualTreeFlatItem<TValue>[], expandedIds: ReadonlySet<VirtualTreeNodeId>): VirtualTreeFlatItem<TValue>[];
|
|
16
|
+
export declare function normalizeVirtualTreeSelection<TValue>(index: VirtualTreeIndex<TValue>, selectedIds: VirtualTreeIdCollection | undefined, mode: VirtualTreeSelectionMode): VirtualTreeNodeId[];
|
|
17
|
+
export declare function toggleVirtualTreeSelection<TValue>(index: VirtualTreeIndex<TValue>, selectedIds: VirtualTreeIdCollection | undefined, nodeId: VirtualTreeNodeId, mode: VirtualTreeSelectionMode): VirtualTreeNodeId[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -42,6 +42,22 @@ export interface AutoCompleteSearchConfig {
|
|
|
42
42
|
* values. El componente no vuelve a filtrarlas.
|
|
43
43
|
*/
|
|
44
44
|
mode?: AutoCompleteSearchMode;
|
|
45
|
+
/**
|
|
46
|
+
* Si se define, permite crear una opción nueva
|
|
47
|
+
* directamente desde el texto de búsqueda, sin
|
|
48
|
+
* necesidad de un botón externo.
|
|
49
|
+
*
|
|
50
|
+
* Se muestra como un ítem adicional dentro del
|
|
51
|
+
* listado cuando el texto ingresado no coincide
|
|
52
|
+
* exactamente con ninguna opción existente.
|
|
53
|
+
*/
|
|
54
|
+
onCreateOption?: (value: string) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Personaliza la etiqueta del ítem de creación.
|
|
57
|
+
*
|
|
58
|
+
* Por defecto: `Crear "<value>"`.
|
|
59
|
+
*/
|
|
60
|
+
createOptionLabel?: (value: string) => string;
|
|
45
61
|
}
|
|
46
62
|
interface CustomAutoCompleteBaseProps {
|
|
47
63
|
id?: string;
|
|
@@ -54,6 +70,11 @@ interface CustomAutoCompleteBaseProps {
|
|
|
54
70
|
helperText?: ReactNode;
|
|
55
71
|
emptyText?: ReactNode;
|
|
56
72
|
clearLabel?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Controla la visibilidad del botón para limpiar
|
|
75
|
+
* los elementos seleccionados.
|
|
76
|
+
*/
|
|
77
|
+
showClearButton?: boolean;
|
|
57
78
|
/**
|
|
58
79
|
* Habilita el buscador dentro del listado.
|
|
59
80
|
*/
|
|
@@ -16,6 +16,8 @@ export interface CustomDatePickerProps {
|
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
captionLayout?: "label" | "dropdown";
|
|
18
18
|
locale?: DatePickerLocale | null;
|
|
19
|
+
minDate?: Dayjs | Date;
|
|
20
|
+
maxDate?: Dayjs | Date;
|
|
19
21
|
/**
|
|
20
22
|
* Activa el estado visual y accesible de error.
|
|
21
23
|
*/
|
|
@@ -26,5 +28,5 @@ export interface CustomDatePickerProps {
|
|
|
26
28
|
*/
|
|
27
29
|
helperText?: React.ReactNode;
|
|
28
30
|
}
|
|
29
|
-
declare const CustomDatePicker: ({ label, initialValue, value, setValue, disabled, white, fullWidth, placeholder, captionLayout, error, helperText, locale, }: CustomDatePickerProps) => React.JSX.Element;
|
|
31
|
+
declare const CustomDatePicker: ({ label, initialValue, value, setValue, disabled, white, fullWidth, placeholder, captionLayout, error, helperText, locale, minDate: minDateProp, maxDate: maxDateProp, }: CustomDatePickerProps) => React.JSX.Element;
|
|
30
32
|
export { CustomDatePicker };
|