forlogic-core 2.1.5 → 2.2.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/README.md +53 -1
- package/dist/action-plans/components/ActionPlanAttachmentsTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanCommentsTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanCostTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanGeneralTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanHistoryTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanPredecessorsTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanProgressDialog.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanProgressTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanStatusBadge.d.ts +3 -0
- package/dist/action-plans/constants.d.ts +24 -0
- package/dist/action-plans/hooks/useActionPlan.d.ts +5 -0
- package/dist/action-plans/hooks/useActionPlanProgress.d.ts +5 -0
- package/dist/action-plans/types.d.ts +60 -0
- package/dist/action-plans/utils/formatTime.d.ts +9 -0
- package/dist/audit-trail/components/AuditTrailDetails.d.ts +10 -0
- package/dist/audit-trail/components/AuditTrailFilter.d.ts +10 -0
- package/dist/audit-trail/components/AuditTrailPage.d.ts +10 -0
- package/dist/audit-trail/types.d.ts +58 -0
- package/dist/audit-trail/utils.d.ts +18 -2
- package/dist/auth/components/EditProfileDialog.d.ts +1 -0
- package/dist/auth/components/ProtectedRoute.d.ts +5 -0
- package/dist/auth/contexts/AuthContext.d.ts +5 -0
- package/dist/auth/pages/CallbackPage.d.ts +5 -0
- package/dist/auth/services/AuthService.d.ts +5 -0
- package/dist/auth/services/TokenManager.d.ts +5 -0
- package/dist/auth/services/TokenService.d.ts +10 -0
- package/dist/auth/utils/ErrorInterceptor.d.ts +5 -0
- package/dist/components/dashboards/dashboard-form.d.ts +15 -0
- package/dist/components/dashboards/dashboard-general-view.d.ts +15 -0
- package/dist/components/dashboards/dashboard-grid.d.ts +25 -0
- package/dist/components/dashboards/dashboard-list.d.ts +10 -0
- package/dist/components/dashboards/dashboard-panel-renderer.d.ts +10 -0
- package/dist/components/dashboards/dashboard-view.d.ts +10 -0
- package/dist/components/dashboards/helpers.d.ts +44 -5
- package/dist/components/dashboards/panels/burndown-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/cartesian-panel.d.ts +20 -0
- package/dist/components/dashboards/panels/list-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/matrix-risk-panel.d.ts +25 -0
- package/dist/components/dashboards/panels/numeric-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-error.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-header.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-loader.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-no-data.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-unavailable.d.ts +10 -0
- package/dist/components/dashboards/panels/pareto-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/performance-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/pie-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/text-panel.d.ts +10 -0
- package/dist/components/dashboards/types.d.ts +230 -0
- package/dist/components/modules/AccessDeniedDialog.d.ts +3 -1
- package/dist/components/modules/ModuleAccessGuard.d.ts +3 -1
- package/dist/components/modules/ModulesContent.d.ts +3 -1
- package/dist/components/modules/ModulesDialog.d.ts +1 -1
- package/dist/components/modules/ModulesFooterCards.d.ts +3 -1
- package/dist/components/modules/types.d.ts +2 -0
- package/dist/components/ui/accordion.d.ts +35 -0
- package/dist/components/ui/action-button.d.ts +5 -0
- package/dist/components/ui/alert-dialog.d.ts +82 -0
- package/dist/components/ui/alert.d.ts +32 -0
- package/dist/components/ui/avatar.d.ts +30 -0
- package/dist/components/ui/badge.d.ts +32 -0
- package/dist/components/ui/breadcrumb.d.ts +54 -0
- package/dist/components/ui/button-group.d.ts +15 -0
- package/dist/components/ui/button.d.ts +55 -0
- package/dist/components/ui/calendar.d.ts +16 -0
- package/dist/components/ui/card.d.ts +49 -0
- package/dist/components/ui/chart.d.ts +35 -0
- package/dist/components/ui/checkbox.d.ts +11 -0
- package/dist/components/ui/collapsible.d.ts +15 -0
- package/dist/components/ui/color-picker.d.ts +5 -0
- package/dist/components/ui/combo-tree.d.ts +23 -0
- package/dist/components/ui/combobox.d.ts +28 -0
- package/dist/components/ui/command.d.ts +66 -0
- package/dist/components/ui/context-menu.d.ts +95 -0
- package/dist/components/ui/date-picker.d.ts +10 -0
- package/dist/components/ui/dialog-wizard.d.ts +22 -4
- package/dist/components/ui/dialog.d.ts +181 -0
- package/dist/components/ui/drawer.d.ts +72 -0
- package/dist/components/ui/dropdown-menu.d.ts +153 -0
- package/dist/components/ui/electronic-signature-dialog.d.ts +10 -0
- package/dist/components/ui/export-dialog.d.ts +20 -0
- package/dist/components/ui/form.d.ts +96 -0
- package/dist/components/ui/hover-card.d.ts +15 -0
- package/dist/components/ui/icon-picker.d.ts +5 -0
- package/dist/components/ui/iframe-dialog.d.ts +10 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/menubar.d.ts +80 -0
- package/dist/components/ui/multiselect-permissions.d.ts +25 -0
- package/dist/components/ui/navigation-menu.d.ts +45 -0
- package/dist/components/ui/onboarding-dialog.d.ts +15 -0
- package/dist/components/ui/online-editor-dialog.d.ts +10 -0
- package/dist/components/ui/pagination.d.ts +53 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/radio-group.d.ts +3 -0
- package/dist/components/ui/report-request-list.d.ts +20 -0
- package/dist/components/ui/resizable.d.ts +15 -0
- package/dist/components/ui/rich-text-editor.d.ts +13 -0
- package/dist/components/ui/scroll-area.d.ts +3 -0
- package/dist/components/ui/select.d.ts +71 -0
- package/dist/components/ui/separator.d.ts +13 -0
- package/dist/components/ui/sheet.d.ts +76 -0
- package/dist/components/ui/sidebar.d.ts +203 -0
- package/dist/components/ui/skeleton-variants.d.ts +25 -0
- package/dist/components/ui/skeleton.d.ts +12 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/spinner.d.ts +5 -0
- package/dist/components/ui/split-button.d.ts +6 -0
- package/dist/components/ui/stack.d.ts +5 -0
- package/dist/components/ui/status-badge.d.ts +3 -0
- package/dist/components/ui/step-selector.d.ts +5 -0
- package/dist/components/ui/stimulsoft-viewer.d.ts +8 -0
- package/dist/components/ui/switch.d.ts +21 -0
- package/dist/components/ui/tab-page-layout.d.ts +33 -0
- package/dist/components/ui/table-resize-handle.d.ts +10 -3
- package/dist/components/ui/table.d.ts +102 -0
- package/dist/components/ui/tabs.d.ts +59 -0
- package/dist/components/ui/terms-of-use-dialog.d.ts +50 -4
- package/dist/components/ui/textarea.d.ts +27 -0
- package/dist/components/ui/timepicker.d.ts +23 -0
- package/dist/components/ui/toggle-group.d.ts +25 -0
- package/dist/components/ui/toggle.d.ts +21 -0
- package/dist/components/ui/tooltip.d.ts +48 -0
- package/dist/components/ui/truncated-cell.d.ts +13 -0
- package/dist/components/ui/typography.d.ts +119 -0
- package/dist/components/ui/updates-notification.d.ts +33 -0
- package/dist/components/ui/users-groups-selector.d.ts +43 -0
- package/dist/components/ui/viewer-dialog.d.ts +107 -0
- package/dist/crud/components/ActionMenuItems.d.ts +5 -0
- package/dist/crud/components/BaseForm.d.ts +46 -0
- package/dist/crud/components/ColumnSettingsPopover.d.ts +10 -0
- package/dist/crud/components/CrudActionBar.d.ts +20 -0
- package/dist/crud/components/CrudGrid.d.ts +10 -0
- package/dist/crud/components/CrudPagination.d.ts +5 -0
- package/dist/crud/components/CrudTable.d.ts +5 -0
- package/dist/crud/components/TableRowActions.d.ts +5 -0
- package/dist/crud/createCrudPage.d.ts +41 -8
- package/dist/crud/generateCrudConfig.d.ts +13 -8
- package/dist/crud/hooks/useBaseForm.d.ts +39 -0
- package/dist/crud/hooks/useColumnManager.d.ts +25 -0
- package/dist/crud/hooks/useCrud.d.ts +35 -0
- package/dist/crud/primitives/ActionMenu.d.ts +41 -0
- package/dist/crud/primitives/FilterBar.d.ts +45 -0
- package/dist/crud/primitives/Pagination.d.ts +5 -0
- package/dist/crud/primitives/Table.d.ts +5 -0
- package/dist/crud/primitives/TreeTable.d.ts +5 -0
- package/dist/crud/primitives/types.d.ts +57 -0
- package/dist/crud/utils/routingHelpers.d.ts +11 -0
- package/dist/custom-form-fields/components/CustomFormFields.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormDateField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormMultiSelectionField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormNumericField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormQuestionsField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormSingleSelectionField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormTextField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormTimeField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormUrlField.d.ts +3 -0
- package/dist/custom-form-fields/fields/ReadOnlyTextField.d.ts +3 -0
- package/dist/custom-form-fields/types.d.ts +84 -21
- package/dist/exports/integrations.d.ts +1 -0
- package/dist/file-upload/components/SingleFileUpload.d.ts +59 -0
- package/dist/file-upload/types.d.ts +15 -0
- package/dist/file-upload/utils/formatBytes.d.ts +5 -0
- package/dist/file-upload/utils/getFileExtension.d.ts +5 -0
- package/dist/hooks/useColumnResize.d.ts +24 -0
- package/dist/hooks/useRowResize.d.ts +18 -0
- package/dist/hooks/useSidebarResize.d.ts +18 -0
- package/dist/hooks/useUpdatesNotification.d.ts +16 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/clarity/clarityTracking.d.ts +31 -0
- package/dist/integrations/clarity/index.d.ts +3 -0
- package/dist/integrations/clarity/types.d.ts +46 -0
- package/dist/integrations/clarity/useClarity.d.ts +34 -0
- package/dist/integrations/index.d.ts +5 -0
- package/dist/providers/CoreProviders.d.ts +16 -1
- package/dist/qualiex/components/QualiexUserField.d.ts +8 -0
- package/dist/qualiex/hooks/useQualiexUsers.d.ts +16 -26
- package/dist/qualiex/services/qualiexApi.d.ts +38 -2
- package/dist/qualiex/utils/QualiexErrorInterceptor.d.ts +5 -0
- package/dist/supabase/SupabaseSingleton.d.ts +34 -0
- package/dist/types.d.ts +51 -2
- package/dist/vite/index.esm.js +4 -1
- package/dist/vite/index.js +4 -1
- package/docs/STORAGE_BUCKETS.md +384 -0
- package/docs/WORKSPACE_KNOWLEDGE.md +1 -0
- package/docs/design-system/README.md +1 -1
- package/docs/design-system/patterns/core-providers.md +2 -0
- package/docs/design-system/selectors.md +4 -0
- package/package.json +7 -1
- package/dist/components/ui/__tests__/status-badge.test.d.ts +0 -1
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
import type { TableProps } from './types';
|
|
24
|
+
/**
|
|
25
|
+
* Função utilitária `Table`.
|
|
26
|
+
* @example
|
|
27
|
+
* Table();
|
|
28
|
+
*/
|
|
24
29
|
export declare function Table<T extends {
|
|
25
30
|
id: string;
|
|
26
31
|
}>({ data, columns, sortField, sortDirection, onSort, onRowClick, renderActions, isLoading, emptyMessage, className, enableSelection, selectedIds, onSelectItem, onSelectAll, isAllSelected, enableColumnResize, onColumnResize, enableColumnReorder, onReorderColumns, storageKey, enableExpandableRows, renderExpandedContent, expandedRowIds: controlledExpandedIds, onToggleExpand: controlledToggleExpand, defaultExpandAll, rowActionsVariant, hideActionsColumn, actionsHeaderContent, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { TreeNode, TreeTableProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Função utilitária `TreeTable`.
|
|
4
|
+
* @example
|
|
5
|
+
* TreeTable();
|
|
6
|
+
*/
|
|
2
7
|
export declare function TreeTable<T extends TreeNode>({ data, columns, nameKey, nameHeader, iconComponent, expandedIds, onToggleExpand, onRowClick, renderActions, actionsHeader, rowActionsVariant, isLoading, emptyMessage, className, enableSelection, selectedIds: selectedIdsArray, onSelectItem, onSelectAll, isAllSelected, enableRowDrag, onMoveNode, onMoveNodes, rootDropLabel, actionsWidth, nameMinWidth, }: TreeTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Definição de coluna do componente primitivo {@link TableProps | Table} (DataTable).
|
|
4
|
+
*
|
|
5
|
+
* Para tabelas CRUD completas, prefira {@link CrudColumn} (suporta `type`, `filterable`, etc).
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const columns: TableColumn<User>[] = [
|
|
9
|
+
* { key: 'name', header: 'Nome', sortable: true, weight: 2 },
|
|
10
|
+
* { key: 'email', header: 'E-mail', sortable: true, resizable: true },
|
|
11
|
+
* {
|
|
12
|
+
* key: 'status',
|
|
13
|
+
* header: 'Status',
|
|
14
|
+
* minWidth: 120,
|
|
15
|
+
* render: (u) => <StatusBadge status={u.status} />,
|
|
16
|
+
* },
|
|
17
|
+
* ];
|
|
18
|
+
*/
|
|
2
19
|
export interface TableColumn<T = any> {
|
|
3
20
|
key: keyof T;
|
|
4
21
|
header: string;
|
|
@@ -11,6 +28,11 @@ export interface TableColumn<T = any> {
|
|
|
11
28
|
width?: number;
|
|
12
29
|
resizable?: boolean;
|
|
13
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Tipo `TableProps` exportado pela lib.
|
|
33
|
+
* @example
|
|
34
|
+
* const value: TableProps = {} as TableProps;
|
|
35
|
+
*/
|
|
14
36
|
export interface TableProps<T> {
|
|
15
37
|
data: T[];
|
|
16
38
|
columns: TableColumn<T>[];
|
|
@@ -50,6 +72,11 @@ export interface TableProps<T> {
|
|
|
50
72
|
/** Conteúdo customizado para o header da coluna de ações (ex: ColumnSettingsPopover) */
|
|
51
73
|
actionsHeaderContent?: React.ReactNode;
|
|
52
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Tipo `ActionItem` exportado pela lib.
|
|
77
|
+
* @example
|
|
78
|
+
* const value: ActionItem = {} as ActionItem;
|
|
79
|
+
*/
|
|
53
80
|
export interface ActionItem {
|
|
54
81
|
label: string;
|
|
55
82
|
icon?: React.ComponentType<{
|
|
@@ -64,6 +91,11 @@ export interface ActionItem {
|
|
|
64
91
|
/** Motivo do bloqueio (exibido em tooltip quando disabled=true) */
|
|
65
92
|
disabledReason?: string;
|
|
66
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Tipo `ActionMenuProps` exportado pela lib.
|
|
96
|
+
* @example
|
|
97
|
+
* const value: ActionMenuProps = {} as ActionMenuProps;
|
|
98
|
+
*/
|
|
67
99
|
export interface ActionMenuProps {
|
|
68
100
|
onEdit?: () => void;
|
|
69
101
|
onDelete?: () => void;
|
|
@@ -75,6 +107,11 @@ export interface ActionMenuProps {
|
|
|
75
107
|
renderAs?: 'dropdown' | 'inline';
|
|
76
108
|
variant?: 'default' | 'compact';
|
|
77
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Tipo `PaginationProps` exportado pela lib.
|
|
112
|
+
* @example
|
|
113
|
+
* const value: PaginationProps = {} as PaginationProps;
|
|
114
|
+
*/
|
|
78
115
|
export interface PaginationProps {
|
|
79
116
|
currentPage: number;
|
|
80
117
|
totalPages: number;
|
|
@@ -84,11 +121,21 @@ export interface PaginationProps {
|
|
|
84
121
|
onItemsPerPageChange: (limit: number) => void;
|
|
85
122
|
variant?: 'full' | 'compact';
|
|
86
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Tipo `TreeNode` exportado pela lib.
|
|
126
|
+
* @example
|
|
127
|
+
* const value: TreeNode = {} as TreeNode;
|
|
128
|
+
*/
|
|
87
129
|
export interface TreeNode {
|
|
88
130
|
id: string;
|
|
89
131
|
children?: TreeNode[];
|
|
90
132
|
[key: string]: any;
|
|
91
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Tipo `TreeTableColumn` exportado pela lib.
|
|
136
|
+
* @example
|
|
137
|
+
* const value: TreeTableColumn = {} as TreeTableColumn;
|
|
138
|
+
*/
|
|
92
139
|
export interface TreeTableColumn<T = any> {
|
|
93
140
|
key: keyof T;
|
|
94
141
|
header: string;
|
|
@@ -98,6 +145,11 @@ export interface TreeTableColumn<T = any> {
|
|
|
98
145
|
/** Conteúdo exibido no HoverCard ao passar o mouse sobre o valor */
|
|
99
146
|
hoverContent?: (item: T) => React.ReactNode;
|
|
100
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Tipo `TreeTableProps` exportado pela lib.
|
|
150
|
+
* @example
|
|
151
|
+
* const value: TreeTableProps = {} as TreeTableProps;
|
|
152
|
+
*/
|
|
101
153
|
export interface TreeTableProps<T extends TreeNode = TreeNode> {
|
|
102
154
|
data: T[];
|
|
103
155
|
columns: TreeTableColumn<T>[];
|
|
@@ -132,6 +184,11 @@ export interface TreeTableProps<T extends TreeNode = TreeNode> {
|
|
|
132
184
|
/** Largura mínima da coluna de nome em px (default: 200) */
|
|
133
185
|
nameMinWidth?: number;
|
|
134
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Tipo `FilterBarProps` exportado pela lib.
|
|
189
|
+
* @example
|
|
190
|
+
* const value: FilterBarProps = {} as FilterBarProps;
|
|
191
|
+
*/
|
|
135
192
|
export interface FilterBarProps {
|
|
136
193
|
searchValue?: string;
|
|
137
194
|
onSearchChange?: (value: string) => void;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { CrudEntity } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Tipo `RoutingConfig` exportado pela lib.
|
|
4
|
+
* @example
|
|
5
|
+
* const value: RoutingConfig = {} as RoutingConfig;
|
|
6
|
+
*/
|
|
2
7
|
export interface RoutingConfig {
|
|
3
8
|
basePath: string;
|
|
4
9
|
newPath?: string;
|
|
@@ -8,6 +13,9 @@ export interface RoutingConfig {
|
|
|
8
13
|
* Creates routing handlers for CRUD operations
|
|
9
14
|
* @param config Configuration for routing paths
|
|
10
15
|
* @returns Object with onNew and onEdit handlers
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* createRoutingHandlers();
|
|
11
19
|
*/
|
|
12
20
|
export declare function createRoutingHandlers<T extends CrudEntity>(config: RoutingConfig): {
|
|
13
21
|
onNew: () => void;
|
|
@@ -18,6 +26,9 @@ export declare function createRoutingHandlers<T extends CrudEntity>(config: Rout
|
|
|
18
26
|
* @param basePath Base path for the CRUD routes (e.g., '/articles')
|
|
19
27
|
* @param config Optional custom paths
|
|
20
28
|
* @returns Configuration object for CrudPageConfig
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* createCrudRoutingConfig();
|
|
21
32
|
*/
|
|
22
33
|
export declare function createCrudRoutingConfig<T extends CrudEntity>(basePath: string, config?: {
|
|
23
34
|
newPath?: string;
|
|
@@ -4,5 +4,8 @@ import type { CustomFormFieldsProps } from '../types';
|
|
|
4
4
|
*
|
|
5
5
|
* Portado de FlcCustomFormFieldsComponent (flc-custom-form-fields).
|
|
6
6
|
* Renderiza campos baseados em FieldAssociation[] e gerencia o state via onChange.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* CustomFormFields();
|
|
7
10
|
*/
|
|
8
11
|
export declare function CustomFormFields({ fields, readOnly, hideInactiveWithoutValue, onChange, onFieldChange, }: CustomFormFieldsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo de data (date).
|
|
4
4
|
* Usa input type="date" nativo.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* FormDateField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function FormDateField({ field, readOnly, onChange }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo de seleção múltipla (multiSelection).
|
|
4
4
|
* Suporta checkbox e chips (dropdown) via config.viewMode.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* FormMultiSelectionField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function FormMultiSelectionField({ field, readOnly, onChange }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo numérico (number).
|
|
4
4
|
* Suporta decimais, min e max via config.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* FormNumericField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function FormNumericField({ field, readOnly, onChange }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo de questões (questions).
|
|
4
4
|
* Grid de perguntas × opções (estilo questionário/matriz).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* FormQuestionsField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function FormQuestionsField({ field, readOnly, onChange }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo de seleção única (singleSelection).
|
|
4
4
|
* Suporta dropdown e radio via config.viewMode.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* FormSingleSelectionField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function FormSingleSelectionField({ field, readOnly, onChange }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo de texto (text).
|
|
4
4
|
* Suporta single-line e multiline via config.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* FormTextField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function FormTextField({ field, readOnly, onChange }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo de hora (time).
|
|
4
4
|
* Usa input type="time" nativo. O valor é armazenado como minutos desde meia-noite.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* FormTimeField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function FormTimeField({ field, readOnly, onChange }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo de URL (url).
|
|
4
4
|
* Suporta múltiplas URLs quando config.multiple = true.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* FormUrlField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function FormUrlField({ field, readOnly, onChange }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,8 @@ import type { BaseFieldProps } from '../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Campo de texto somente leitura (readOnlyText).
|
|
4
4
|
* Exibe o texto configurado sem permitir edição.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ReadOnlyTextField();
|
|
5
8
|
*/
|
|
6
9
|
export declare function ReadOnlyTextField({ field }: BaseFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/** Tipos de campo customizado do formulário
|
|
1
|
+
/** Tipos de campo customizado do formulário *
|
|
2
|
+
* @example
|
|
3
|
+
* const v = ECustomFormFieldType;
|
|
4
|
+
*/
|
|
2
5
|
export declare enum ECustomFormFieldType {
|
|
3
6
|
readOnlyText = 1,
|
|
4
7
|
text = 2,
|
|
@@ -10,20 +13,29 @@ export declare enum ECustomFormFieldType {
|
|
|
10
13
|
multiSelection = 8,
|
|
11
14
|
questions = 9
|
|
12
15
|
}
|
|
13
|
-
/** Modo de visualização de campos de seleção
|
|
16
|
+
/** Modo de visualização de campos de seleção *
|
|
17
|
+
* @example
|
|
18
|
+
* const v = EFieldViewMode;
|
|
19
|
+
*/
|
|
14
20
|
export declare enum EFieldViewMode {
|
|
15
21
|
dropdown = 1,
|
|
16
22
|
buttons = 2,
|
|
17
23
|
radio = 3,
|
|
18
24
|
checkbox = 4
|
|
19
25
|
}
|
|
20
|
-
/** Origem dos dados de campos de seleção
|
|
26
|
+
/** Origem dos dados de campos de seleção *
|
|
27
|
+
* @example
|
|
28
|
+
* const v = ESelectionFieldDataSource;
|
|
29
|
+
*/
|
|
21
30
|
export declare enum ESelectionFieldDataSource {
|
|
22
31
|
custom = 1,
|
|
23
32
|
users = 2,
|
|
24
33
|
usersLists = 3
|
|
25
34
|
}
|
|
26
|
-
/** Item de uma lista de seleção (opção)
|
|
35
|
+
/** Item de uma lista de seleção (opção) *
|
|
36
|
+
* @example
|
|
37
|
+
* const value: RowItem = {} as RowItem;
|
|
38
|
+
*/
|
|
27
39
|
export interface RowItem {
|
|
28
40
|
value: string;
|
|
29
41
|
text: string;
|
|
@@ -33,51 +45,78 @@ export interface RowItem {
|
|
|
33
45
|
/** Tipo do usuário (quando dataSource = users) */
|
|
34
46
|
userType?: number;
|
|
35
47
|
}
|
|
36
|
-
/** Item de resposta de um campo de questões
|
|
48
|
+
/** Item de resposta de um campo de questões *
|
|
49
|
+
* @example
|
|
50
|
+
* const value: QuestionItem = {} as QuestionItem;
|
|
51
|
+
*/
|
|
37
52
|
export interface QuestionItem {
|
|
38
53
|
questionValue: string;
|
|
39
54
|
questionText: string;
|
|
40
55
|
optionValue: string;
|
|
41
56
|
optionText: string;
|
|
42
57
|
}
|
|
43
|
-
/** Configuração base de um campo
|
|
58
|
+
/** Configuração base de um campo *
|
|
59
|
+
* @example
|
|
60
|
+
* const value: FieldConfig = {} as FieldConfig;
|
|
61
|
+
*/
|
|
44
62
|
export interface FieldConfig {
|
|
45
63
|
}
|
|
46
|
-
/** Configuração de campo de texto
|
|
64
|
+
/** Configuração de campo de texto *
|
|
65
|
+
* @example
|
|
66
|
+
* const value: TextFieldConfig = {} as TextFieldConfig;
|
|
67
|
+
*/
|
|
47
68
|
export interface TextFieldConfig extends FieldConfig {
|
|
48
69
|
multiline: boolean;
|
|
49
70
|
}
|
|
50
|
-
/** Configuração de campo numérico
|
|
71
|
+
/** Configuração de campo numérico *
|
|
72
|
+
* @example
|
|
73
|
+
* const value: NumberFieldConfig = {} as NumberFieldConfig;
|
|
74
|
+
*/
|
|
51
75
|
export interface NumberFieldConfig extends FieldConfig {
|
|
52
76
|
decimals: number;
|
|
53
77
|
min?: number;
|
|
54
78
|
max?: number;
|
|
55
79
|
}
|
|
56
|
-
/** Configuração de campo URL
|
|
80
|
+
/** Configuração de campo URL *
|
|
81
|
+
* @example
|
|
82
|
+
* const value: UrlFieldConfig = {} as UrlFieldConfig;
|
|
83
|
+
*/
|
|
57
84
|
export interface UrlFieldConfig extends FieldConfig {
|
|
58
85
|
multiple: boolean;
|
|
59
86
|
}
|
|
60
|
-
/** Configuração de campo de seleção única
|
|
87
|
+
/** Configuração de campo de seleção única *
|
|
88
|
+
* @example
|
|
89
|
+
* const value: SingleSelectionFieldConfig = {} as SingleSelectionFieldConfig;
|
|
90
|
+
*/
|
|
61
91
|
export interface SingleSelectionFieldConfig extends FieldConfig {
|
|
62
92
|
viewMode: EFieldViewMode;
|
|
63
93
|
dataSource: ESelectionFieldDataSource;
|
|
64
94
|
data: RowItem[];
|
|
65
95
|
userListId?: string;
|
|
66
96
|
}
|
|
67
|
-
/** Configuração de campo de seleção múltipla
|
|
97
|
+
/** Configuração de campo de seleção múltipla *
|
|
98
|
+
* @example
|
|
99
|
+
* const value: MultiSelectionFieldConfig = {} as MultiSelectionFieldConfig;
|
|
100
|
+
*/
|
|
68
101
|
export interface MultiSelectionFieldConfig extends FieldConfig {
|
|
69
102
|
viewMode: EFieldViewMode;
|
|
70
103
|
dataSource: ESelectionFieldDataSource;
|
|
71
104
|
data: RowItem[];
|
|
72
105
|
userListId?: string;
|
|
73
106
|
}
|
|
74
|
-
/** Configuração de campo de questões
|
|
107
|
+
/** Configuração de campo de questões *
|
|
108
|
+
* @example
|
|
109
|
+
* const value: QuestionsFieldConfig = {} as QuestionsFieldConfig;
|
|
110
|
+
*/
|
|
75
111
|
export interface QuestionsFieldConfig extends FieldConfig {
|
|
76
112
|
viewMode: EFieldViewMode;
|
|
77
113
|
questions: RowItem[];
|
|
78
114
|
options: RowItem[];
|
|
79
115
|
}
|
|
80
|
-
/** Valor de um campo de formulário
|
|
116
|
+
/** Valor de um campo de formulário *
|
|
117
|
+
* @example
|
|
118
|
+
* const value: FormFieldValue = {} as FormFieldValue;
|
|
119
|
+
*/
|
|
81
120
|
export interface FormFieldValue {
|
|
82
121
|
formFieldAssociationId: string;
|
|
83
122
|
textValue?: string;
|
|
@@ -87,7 +126,10 @@ export interface FormFieldValue {
|
|
|
87
126
|
itemsValue?: RowItem[];
|
|
88
127
|
questionsValue?: QuestionItem[];
|
|
89
128
|
}
|
|
90
|
-
/** Associação de campo com formulário — modelo principal
|
|
129
|
+
/** Associação de campo com formulário — modelo principal *
|
|
130
|
+
* @example
|
|
131
|
+
* const value: FieldAssociation = {} as FieldAssociation;
|
|
132
|
+
*/
|
|
91
133
|
export interface FieldAssociation {
|
|
92
134
|
id: string;
|
|
93
135
|
type: ECustomFormFieldType;
|
|
@@ -106,13 +148,19 @@ export interface FieldAssociation {
|
|
|
106
148
|
itemsValue?: RowItem[];
|
|
107
149
|
questionsValue?: QuestionItem[];
|
|
108
150
|
}
|
|
109
|
-
/** Props compartilhadas por todos os campos individuais
|
|
151
|
+
/** Props compartilhadas por todos os campos individuais *
|
|
152
|
+
* @example
|
|
153
|
+
* const value: BaseFieldProps = {} as BaseFieldProps;
|
|
154
|
+
*/
|
|
110
155
|
export interface BaseFieldProps {
|
|
111
156
|
field: FieldAssociation;
|
|
112
157
|
readOnly?: boolean;
|
|
113
158
|
onChange?: (field: FieldAssociation) => void;
|
|
114
159
|
}
|
|
115
|
-
/** Props do componente container CustomFormFields
|
|
160
|
+
/** Props do componente container CustomFormFields *
|
|
161
|
+
* @example
|
|
162
|
+
* const value: CustomFormFieldsProps = {} as CustomFormFieldsProps;
|
|
163
|
+
*/
|
|
116
164
|
export interface CustomFormFieldsProps {
|
|
117
165
|
fields: FieldAssociation[];
|
|
118
166
|
readOnly?: boolean;
|
|
@@ -128,15 +176,30 @@ export interface CustomFormFieldsProps {
|
|
|
128
176
|
userType?: number;
|
|
129
177
|
}>;
|
|
130
178
|
}
|
|
131
|
-
/** Extrai o valor correto de um FieldAssociation baseado no tipo
|
|
179
|
+
/** Extrai o valor correto de um FieldAssociation baseado no tipo *
|
|
180
|
+
* @example
|
|
181
|
+
* getFieldValue();
|
|
182
|
+
*/
|
|
132
183
|
export declare function getFieldValue(field: FieldAssociation): any;
|
|
133
|
-
/** Verifica se um campo deve ser exibido (campo ativo ou com valor)
|
|
184
|
+
/** Verifica se um campo deve ser exibido (campo ativo ou com valor) *
|
|
185
|
+
* @example
|
|
186
|
+
* shouldShowField();
|
|
187
|
+
*/
|
|
134
188
|
export declare function shouldShowField(field: FieldAssociation, hideInactive: boolean): boolean;
|
|
135
|
-
/** Converte FieldAssociation[] para FormFieldValue[] para envio ao backend
|
|
189
|
+
/** Converte FieldAssociation[] para FormFieldValue[] para envio ao backend *
|
|
190
|
+
* @example
|
|
191
|
+
* getFormFieldValues();
|
|
192
|
+
*/
|
|
136
193
|
export declare function getFormFieldValues(fields: FieldAssociation[]): FormFieldValue[];
|
|
137
|
-
/** Aplica valores salvos a uma lista de FieldAssociation
|
|
194
|
+
/** Aplica valores salvos a uma lista de FieldAssociation *
|
|
195
|
+
* @example
|
|
196
|
+
* setFormFieldValues();
|
|
197
|
+
*/
|
|
138
198
|
export declare function setFormFieldValues(fields: FieldAssociation[], values: FormFieldValue[]): FieldAssociation[];
|
|
139
|
-
/** Valida todos os campos obrigatórios
|
|
199
|
+
/** Valida todos os campos obrigatórios *
|
|
200
|
+
* @example
|
|
201
|
+
* validateFields();
|
|
202
|
+
*/
|
|
140
203
|
export declare function validateFields(fields: FieldAssociation[]): {
|
|
141
204
|
valid: boolean;
|
|
142
205
|
invalidFields: string[];
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { StoredFile } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Props do componente {@link SingleFileUpload}.
|
|
4
|
+
*
|
|
5
|
+
* Combina estado local de upload (drag & drop) com a representação remota (`storedFile`).
|
|
6
|
+
* Use callbacks `onFileSelect` / `onFileRemove` para integrar a um form (react-hook-form, etc).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const props: SingleFileUploadProps = {
|
|
10
|
+
* storedFile: { name: 'contrato.pdf', size: 124000, url: 'https://...' },
|
|
11
|
+
* allowedExtensions: ['pdf', 'doc', 'docx'],
|
|
12
|
+
* maxSizeInBytes: 10 * 1024 * 1024,
|
|
13
|
+
* onFileSelect: (file) => uploadMutation.mutate(file),
|
|
14
|
+
* onFileRemove: () => removeMutation.mutate(),
|
|
15
|
+
* };
|
|
16
|
+
*/
|
|
2
17
|
export interface SingleFileUploadProps {
|
|
3
18
|
/** Pre-existing stored file (server-side) */
|
|
4
19
|
storedFile?: StoredFile | null;
|
|
@@ -40,4 +55,48 @@ export interface SingleFileUploadProps {
|
|
|
40
55
|
onView?: (file: StoredFile) => void;
|
|
41
56
|
className?: string;
|
|
42
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Componente de upload de arquivo único com drag & drop, validação e suporte a arquivos remotos.
|
|
60
|
+
*
|
|
61
|
+
* Renderiza dois estados: **vazio** (área de drag & drop) e **preenchido** (chip do arquivo
|
|
62
|
+
* com botões de download/visualizar/substituir/remover, conforme flags habilitadas).
|
|
63
|
+
*
|
|
64
|
+
* Validações automáticas: tamanho (min/max), extensão permitida e bloqueio de tipos perigosos
|
|
65
|
+
* (`FORBIDDEN_FILE_TYPES`: .exe, .bat, .sh, etc).
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* // Upload simples integrado a uma mutation
|
|
69
|
+
* <SingleFileUpload
|
|
70
|
+
* allowedExtensions={['pdf', 'png', 'jpg']}
|
|
71
|
+
* maxSizeInBytes={5 * 1024 * 1024}
|
|
72
|
+
* onFileSelect={(file) => uploadFile.mutate(file)}
|
|
73
|
+
* />
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* // Exibindo arquivo remoto já enviado, com download customizado
|
|
77
|
+
* <SingleFileUpload
|
|
78
|
+
* storedFile={attachment}
|
|
79
|
+
* showReplaceButton={false}
|
|
80
|
+
* onDownload={async (f) => window.open(await getSignedUrl(f), '_blank')}
|
|
81
|
+
* onView={(f) => openViewerDialog(f)}
|
|
82
|
+
* onFileRemove={() => deleteAttachment.mutate(attachment.id)}
|
|
83
|
+
* />
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* // Integrado com react-hook-form
|
|
87
|
+
* <Controller
|
|
88
|
+
* name="evidence"
|
|
89
|
+
* control={control}
|
|
90
|
+
* render={({ field, fieldState }) => (
|
|
91
|
+
* <SingleFileUpload
|
|
92
|
+
* storedFile={field.value}
|
|
93
|
+
* error={fieldState.error?.message}
|
|
94
|
+
* touched={fieldState.isTouched}
|
|
95
|
+
* required
|
|
96
|
+
* onFileSelect={field.onChange}
|
|
97
|
+
* onFileRemove={() => field.onChange(null)}
|
|
98
|
+
* />
|
|
99
|
+
* )}
|
|
100
|
+
* />
|
|
101
|
+
*/
|
|
43
102
|
export declare function SingleFileUpload({ storedFile, customFileName, allowedExtensions, customExtensionErrorMessage, minSizeInBytes, maxSizeInBytes, showDownloadButton, showViewButton, showReplaceButton, showCloseButton, required, touched, disabled, error: externalError, onFileSelect, onFileRemove, onFileReplace, onDownload, onView, className, }: SingleFileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipo `StoredFile` exportado pela lib.
|
|
3
|
+
* @example
|
|
4
|
+
* const value: StoredFile = {} as StoredFile;
|
|
5
|
+
*/
|
|
1
6
|
export interface StoredFile {
|
|
2
7
|
id: string;
|
|
3
8
|
name: string;
|
|
4
9
|
extension: string;
|
|
5
10
|
size: number;
|
|
6
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Tipo `FileUploadError` exportado pela lib.
|
|
14
|
+
* @example
|
|
15
|
+
* const value: FileUploadError = {} as FileUploadError;
|
|
16
|
+
*/
|
|
7
17
|
export interface FileUploadError {
|
|
8
18
|
type: 'extension' | 'min-size' | 'max-size' | 'forbidden-type' | 'custom';
|
|
9
19
|
message?: string;
|
|
10
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Componente `FORBIDDEN_FILE_TYPES` da lib.
|
|
23
|
+
* @example
|
|
24
|
+
* <FORBIDDEN_FILE_TYPES />
|
|
25
|
+
*/
|
|
11
26
|
export declare const FORBIDDEN_FILE_TYPES: string[];
|
|
@@ -6,16 +6,40 @@ interface ColumnConfig {
|
|
|
6
6
|
}
|
|
7
7
|
interface UseColumnResizeProps {
|
|
8
8
|
columns: ColumnConfig[];
|
|
9
|
+
/**
|
|
10
|
+
* Quando definido, persiste larguras em `localStorage[storageKey]`.
|
|
11
|
+
* Sem `storageKey`, o redimensionamento existe apenas em memória.
|
|
12
|
+
*/
|
|
9
13
|
storageKey?: string;
|
|
10
14
|
onResize?: (widths: Record<string, number>) => void;
|
|
15
|
+
/** `false` desativa o drag (retorna apenas defaults). Default `true`. */
|
|
11
16
|
enabled?: boolean;
|
|
12
17
|
}
|
|
13
18
|
interface UseColumnResizeReturn {
|
|
14
19
|
columnWidths: Record<string, number>;
|
|
15
20
|
isDragging: boolean;
|
|
16
21
|
activeColumn: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Anexar ao `onMouseDown` do **handle** de resize (não no header inteiro)
|
|
24
|
+
* para evitar conflito com sort/click.
|
|
25
|
+
*/
|
|
17
26
|
handleMouseDown: (columnKey: string, e: React.MouseEvent) => void;
|
|
27
|
+
/** Restaura defaults e remove a chave do `localStorage`. */
|
|
18
28
|
resetWidths: () => void;
|
|
19
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Gerencia larguras de colunas com drag-to-resize, persistência opcional em localStorage
|
|
32
|
+
* e clamps por coluna. Usado internamente por `CrudTable` / `Table`.
|
|
33
|
+
*
|
|
34
|
+
* Efeitos colaterais durante o drag: define `cursor: col-resize` e `user-select: none` no `body`.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* const { columnWidths, handleMouseDown, resetWidths } = useColumnResize({
|
|
39
|
+
* columns: [{ key: 'name', minWidth: 100 }, { key: 'email' }],
|
|
40
|
+
* storageKey: 'users-table-widths',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
20
44
|
export declare function useColumnResize({ columns, storageKey, onResize, enabled }: UseColumnResizeProps): UseColumnResizeReturn;
|
|
21
45
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
interface UseRowResizeProps {
|
|
2
2
|
rowIds: string[];
|
|
3
|
+
/** Altura usada quando a linha não tem entrada explícita (fallback "virtual"). Default 48. */
|
|
3
4
|
defaultHeight?: number;
|
|
4
5
|
minHeight?: number;
|
|
5
6
|
maxHeight?: number;
|
|
7
|
+
/** Persiste alturas em `localStorage[storageKey]` se definido. */
|
|
6
8
|
storageKey?: string;
|
|
7
9
|
onResize?: (heights: Record<string, number>) => void;
|
|
8
10
|
enabled?: boolean;
|
|
@@ -13,7 +15,23 @@ interface UseRowResizeReturn {
|
|
|
13
15
|
activeRow: string | null;
|
|
14
16
|
handleMouseDown: (rowId: string, e: React.MouseEvent) => void;
|
|
15
17
|
resetHeights: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Retorna a altura de uma linha. Se a linha não foi redimensionada manualmente,
|
|
20
|
+
* devolve `defaultHeight` (não armazena no estado — comportamento "virtual").
|
|
21
|
+
*/
|
|
16
22
|
getRowHeight: (rowId: string) => number;
|
|
17
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Gerencia alturas de linhas com drag-to-resize. Apenas linhas modificadas são armazenadas;
|
|
26
|
+
* `getRowHeight` devolve `defaultHeight` para as demais.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* const { getRowHeight, handleMouseDown } = useRowResize({
|
|
31
|
+
* rowIds: rows.map(r => r.id),
|
|
32
|
+
* storageKey: 'audit-rows',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
18
36
|
export declare function useRowResize({ rowIds, defaultHeight, minHeight, maxHeight, storageKey, onResize, enabled }: UseRowResizeProps): UseRowResizeReturn;
|
|
19
37
|
export {};
|