@archbase/components 4.0.19 → 4.0.20

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.
Files changed (55) hide show
  1. package/dist/archbase-components-4.0.20.tgz +0 -0
  2. package/dist/datagrid/ag-grid/ag-grid-locale-ptbr.d.ts +7 -0
  3. package/dist/datagrid/ag-grid/ag-grid-mantine-theme.d.ts +24 -0
  4. package/dist/datagrid/ag-grid/archbase-data-grid-ag-formatters.d.ts +88 -0
  5. package/dist/datagrid/ag-grid/archbase-data-grid-ag-types.d.ts +329 -0
  6. package/dist/datagrid/ag-grid/archbase-data-grid-ag-utils.d.ts +71 -0
  7. package/dist/datagrid/ag-grid/archbase-data-grid-ag.d.ts +14 -0
  8. package/dist/datagrid/ag-grid/index.d.ts +14 -0
  9. package/dist/datagrid/index.d.ts +9 -1
  10. package/dist/index.js +11175 -10592
  11. package/package.json +6 -4
  12. package/src/datagrid/ag-grid/ag-grid-locale-ptbr.ts +432 -0
  13. package/src/datagrid/ag-grid/ag-grid-mantine-theme.ts +176 -0
  14. package/src/datagrid/ag-grid/archbase-data-grid-ag-formatters.tsx +470 -0
  15. package/src/datagrid/ag-grid/archbase-data-grid-ag-types.tsx +413 -0
  16. package/src/datagrid/ag-grid/archbase-data-grid-ag-utils.ts +394 -0
  17. package/src/datagrid/ag-grid/archbase-data-grid-ag.tsx +1241 -0
  18. package/src/datagrid/ag-grid/index.tsx +84 -0
  19. package/src/datagrid/index.tsx +59 -8
  20. package/src/datagrid/main/archbase-data-grid-pagination.tsx +1 -2
  21. package/src/datagrid/main/archbase-data-grid-toolbar.tsx +1 -2
  22. package/src/editors/ArchbaseAsyncMultiSelect.tsx +2 -1
  23. package/src/editors/ArchbaseAsyncSelect.tsx +2 -1
  24. package/src/editors/ArchbaseAvatarEdit.tsx +1 -0
  25. package/src/editors/ArchbaseCheckbox.tsx +1 -0
  26. package/src/editors/ArchbaseChip.tsx +1 -0
  27. package/src/editors/ArchbaseChipGroup.tsx +1 -0
  28. package/src/editors/ArchbaseColorGradientPicker.tsx +2 -1
  29. package/src/editors/ArchbaseDatePickerEdit.tsx +1 -0
  30. package/src/editors/ArchbaseDateTimePickerEdit.tsx +1 -0
  31. package/src/editors/ArchbaseDualListbox.tsx +1 -0
  32. package/src/editors/ArchbaseEdit.tsx +1 -0
  33. package/src/editors/ArchbaseImageEdit.tsx +1 -0
  34. package/src/editors/ArchbaseJsonEdit.tsx +1 -0
  35. package/src/editors/ArchbaseLookupEdit.tsx +2 -1
  36. package/src/editors/ArchbaseLookupNumber.tsx +2 -1
  37. package/src/editors/ArchbaseLookupSelect.tsx +2 -1
  38. package/src/editors/ArchbaseMarkdownEdit.tsx +1 -0
  39. package/src/editors/ArchbaseMaskEdit.tsx +1 -0
  40. package/src/editors/ArchbaseMentionInput.tsx +1 -0
  41. package/src/editors/ArchbaseMultiEmail.tsx +1 -0
  42. package/src/editors/ArchbaseMultiSelect.tsx +2 -1
  43. package/src/editors/ArchbaseNumberEdit.tsx +1 -0
  44. package/src/editors/ArchbaseNumberStepper.tsx +2 -1
  45. package/src/editors/ArchbasePasswordEdit.tsx +1 -0
  46. package/src/editors/ArchbaseRadioGroup.tsx +1 -0
  47. package/src/editors/ArchbaseRating.tsx +1 -0
  48. package/src/editors/ArchbaseRichTextEdit.tsx +1 -0
  49. package/src/editors/ArchbaseSelect.tsx +2 -1
  50. package/src/editors/ArchbaseSignaturePad.tsx +1 -0
  51. package/src/editors/ArchbaseSwitch.tsx +1 -0
  52. package/src/editors/ArchbaseTagInputEdit.tsx +1 -0
  53. package/src/editors/ArchbaseTextArea.tsx +1 -0
  54. package/src/editors/ArchbaseTimeEdit.tsx +1 -0
  55. package/dist/archbase-components-4.0.19.tgz +0 -0
@@ -0,0 +1,7 @@
1
+ /**
2
+ * AG Grid Portuguese (Brazil) Locale
3
+ *
4
+ * Complete translation for AG Grid Community in pt-BR
5
+ */
6
+ export declare const AG_GRID_LOCALE_PTBR: Record<string, string>;
7
+ export default AG_GRID_LOCALE_PTBR;
@@ -0,0 +1,24 @@
1
+ import { Theme } from 'ag-grid-community';
2
+ import { MantineTheme } from '@mantine/core';
3
+ /**
4
+ * Options for creating AG Grid theme
5
+ */
6
+ export interface ArchbaseAgGridThemeOptions {
7
+ headerFontWeight?: number | 'normal' | 'bold';
8
+ }
9
+ /**
10
+ * Creates an AG Grid theme integrated with Mantine's theming system
11
+ */
12
+ export declare const createArchbaseAgGridTheme: (theme: MantineTheme, colorScheme: "light" | "dark", options?: ArchbaseAgGridThemeOptions) => Theme;
13
+ /**
14
+ * Get CSS variables for additional styling not covered by theme params
15
+ */
16
+ export declare const getAgGridMantineCssVars: (theme: MantineTheme, colorScheme: "light" | "dark") => Record<string, string>;
17
+ /**
18
+ * Get custom CSS styles for AG Grid cell focus
19
+ */
20
+ export declare const getAgGridCustomStyles: (theme: MantineTheme, colorScheme: "light" | "dark") => string;
21
+ /**
22
+ * Default export for convenience
23
+ */
24
+ export default createArchbaseAgGridTheme;
@@ -0,0 +1,88 @@
1
+ import { ReactNode } from 'react';
2
+ import { MaskOptions } from '@archbase/core';
3
+ import { ICellRendererParams } from 'ag-grid-community';
4
+ import { FieldDataType } from './archbase-data-grid-ag-types';
5
+ /**
6
+ * Text cell renderer with optional mask and auto base64 decoding
7
+ */
8
+ export declare const TextCellRenderer: (params: ICellRendererParams, maskOptions?: MaskOptions) => ReactNode;
9
+ /**
10
+ * Integer cell renderer
11
+ */
12
+ export declare const IntegerCellRenderer: (params: ICellRendererParams) => ReactNode;
13
+ /**
14
+ * Float cell renderer
15
+ */
16
+ export declare const FloatCellRenderer: (params: ICellRendererParams) => ReactNode;
17
+ /**
18
+ * Currency cell renderer (BRL format)
19
+ */
20
+ export declare const CurrencyCellRenderer: (params: ICellRendererParams) => ReactNode;
21
+ /**
22
+ * Percent cell renderer
23
+ */
24
+ export declare const PercentCellRenderer: (params: ICellRendererParams, decimalPlaces?: number) => ReactNode;
25
+ /**
26
+ * Boolean cell renderer with Mantine checkbox
27
+ */
28
+ export declare const BooleanCellRenderer: (params: ICellRendererParams) => ReactNode;
29
+ /**
30
+ * Date cell renderer
31
+ */
32
+ export declare const DateCellRenderer: (params: ICellRendererParams, dateFormat?: string) => ReactNode;
33
+ /**
34
+ * DateTime cell renderer
35
+ */
36
+ export declare const DateTimeCellRenderer: (params: ICellRendererParams, dateTimeFormat?: string) => ReactNode;
37
+ /**
38
+ * Time cell renderer
39
+ */
40
+ export declare const TimeCellRenderer: (params: ICellRendererParams, timeFormat?: string) => ReactNode;
41
+ /**
42
+ * Enum cell renderer
43
+ */
44
+ export declare const EnumCellRenderer: (params: ICellRendererParams, enumValues: Array<{
45
+ label: string;
46
+ value: string;
47
+ }>) => ReactNode;
48
+ /**
49
+ * UUID cell renderer
50
+ */
51
+ export declare const UUIDCellRenderer: (params: ICellRendererParams) => ReactNode;
52
+ /**
53
+ * Image cell renderer
54
+ */
55
+ export declare const ImageCellRenderer: (params: ICellRendererParams, options?: {
56
+ maxWidth?: number;
57
+ maxHeight?: number;
58
+ }) => ReactNode;
59
+ /**
60
+ * Get cell renderer by data type
61
+ */
62
+ export declare const getCellRendererByDataType: (dataType: FieldDataType, customRender?: (params: ICellRendererParams) => ReactNode, options?: {
63
+ maskOptions?: MaskOptions;
64
+ dateFormat?: string;
65
+ dateTimeFormat?: string;
66
+ timeFormat?: string;
67
+ enumValues?: Array<{
68
+ label: string;
69
+ value: string;
70
+ }>;
71
+ decimalPlaces?: number;
72
+ }) => ((params: ICellRendererParams) => ReactNode);
73
+ /**
74
+ * Get recommended alignment by data type
75
+ */
76
+ export declare const getAlignmentByDataType: (dataType: FieldDataType, customAlign?: "left" | "center" | "right") => "left" | "center" | "right";
77
+ /**
78
+ * Create value formatter for AG Grid column
79
+ */
80
+ export declare const createValueFormatter: (dataType: FieldDataType, options?: {
81
+ dateFormat?: string;
82
+ dateTimeFormat?: string;
83
+ timeFormat?: string;
84
+ enumValues?: Array<{
85
+ label: string;
86
+ value: string;
87
+ }>;
88
+ }) => ((params: any) => string) | undefined;
@@ -0,0 +1,329 @@
1
+ import { default as React, MutableRefObject, ReactNode, RefObject } from 'react';
2
+ import { ColDef, GridApi } from 'ag-grid-community';
3
+ import { IArchbaseDataSourceBase } from '@archbase/data';
4
+ import { ArchbaseFilterDefinition, ArchbaseActiveFilter } from '../../filters/ArchbaseCompositeFilters.types';
5
+ /**
6
+ * Reference interface for external grid control
7
+ */
8
+ export interface ArchbaseDataGridAGRef<T = any> {
9
+ /** Get selected rows */
10
+ getSelectedRows: () => T[];
11
+ /** Clear selection */
12
+ clearSelection: () => void;
13
+ /** Refresh grid data */
14
+ refreshData: () => void;
15
+ /** Export grid data */
16
+ exportData: () => void;
17
+ /** Print grid data */
18
+ printData: () => void;
19
+ /** Expand a specific row's detail panel */
20
+ expandRow: (rowId: string | number) => void;
21
+ /** Collapse a specific row's detail panel */
22
+ collapseRow: (rowId: string | number) => void;
23
+ /** Collapse all expanded detail panels */
24
+ collapseAllRows: () => void;
25
+ /** Get all expanded row IDs */
26
+ getExpandedRows: () => (string | number)[];
27
+ /** Get current filter model */
28
+ getFilterModel: () => any;
29
+ /** Get AG Grid API */
30
+ getGridApi: () => GridApi | null;
31
+ /** Auto-size all columns to fit their content */
32
+ autoSizeAllColumns: (skipHeader?: boolean) => void;
33
+ /** Size columns to fit the grid width */
34
+ sizeColumnsToFit: () => void;
35
+ }
36
+ /**
37
+ * Data types supported by grid columns
38
+ */
39
+ export type FieldDataType = 'text' | 'integer' | 'float' | 'currency' | 'boolean' | 'date' | 'datetime' | 'time' | 'enum' | 'image' | 'uuid';
40
+ /**
41
+ * Column props (same API as MUI version)
42
+ */
43
+ export interface ArchbaseDataGridAGColumnProps<T = any> {
44
+ /** Column header text */
45
+ header: string;
46
+ /** Column footer text */
47
+ footer?: string;
48
+ /** Data field to bind */
49
+ dataField: string;
50
+ /** Enable column filtering */
51
+ enableColumnFilter?: boolean;
52
+ /** Enable global filter search on this column */
53
+ enableGlobalFilter?: boolean;
54
+ /** Custom accessor function */
55
+ dataFieldAcessorFn?: (originalRow: T) => any;
56
+ /** Data type for formatting and filtering */
57
+ dataType: FieldDataType;
58
+ /** Mask options for text formatting */
59
+ maskOptions?: any;
60
+ /** Input filter type */
61
+ inputFilterType?: string;
62
+ /** Enum values for select filters */
63
+ enumValues?: Array<{
64
+ label: string;
65
+ value: string;
66
+ }>;
67
+ /** Minimum column width */
68
+ minSize?: number;
69
+ /** Maximum column width */
70
+ maxSize?: number;
71
+ /** Custom cell renderer */
72
+ render?: (data: any) => ReactNode;
73
+ /** Column visibility */
74
+ visible: boolean;
75
+ /** Column width */
76
+ size: number;
77
+ /** Enable click to copy */
78
+ enableClickToCopy: boolean;
79
+ /** Enable sorting */
80
+ enableSorting: boolean;
81
+ /** Cell alignment */
82
+ align?: 'left' | 'center' | 'right';
83
+ /** Header alignment */
84
+ headerAlign?: 'left' | 'center' | 'right';
85
+ /** Footer alignment */
86
+ footerAlign?: 'left' | 'center' | 'right';
87
+ /** Permission name to view this column */
88
+ viewPermission?: string;
89
+ /** Permission name to edit this column */
90
+ editPermission?: string;
91
+ /** Fallback content when no permission */
92
+ fallbackContent?: ReactNode | string;
93
+ /** Hide column completely when no permission */
94
+ hideWhenNoPermission?: boolean;
95
+ /** Auto-register column permission */
96
+ autoRegisterPermission?: boolean;
97
+ }
98
+ /**
99
+ * Default column props
100
+ */
101
+ export declare const defaultColumnProps: Partial<ArchbaseDataGridAGColumnProps>;
102
+ /**
103
+ * Props for toolbar actions
104
+ */
105
+ export interface GridToolBarActionsProps {
106
+ children: ReactNode;
107
+ }
108
+ /**
109
+ * Props for columns wrapper
110
+ */
111
+ export interface GridColumnsProps {
112
+ children: ReactNode;
113
+ }
114
+ /**
115
+ * Cell click event data
116
+ */
117
+ export interface CellClickEvent<T = any> {
118
+ id: string | number;
119
+ columnName: string;
120
+ rowData: T;
121
+ }
122
+ /**
123
+ * Main ArchbaseDataGridAG props
124
+ */
125
+ export interface ArchbaseDataGridAGProps<T extends object = any, ID = any> {
126
+ /** DataSource (V1 or V2 compatible) */
127
+ dataSource: IArchbaseDataSourceBase<T>;
128
+ /** Function to get row ID */
129
+ getRowId?: (row: T) => ID;
130
+ /** Resource name for grid security */
131
+ resourceName?: string;
132
+ /** Resource description */
133
+ resourceDescription?: string;
134
+ /** Column security options */
135
+ columnSecurityOptions?: {
136
+ defaultFallback?: ReactNode | string;
137
+ hideByDefault?: boolean;
138
+ permissionPrefix?: string;
139
+ };
140
+ /** Enable column resizing */
141
+ enableColumnResizing?: boolean;
142
+ /** Enable row numbers */
143
+ enableRowNumbers?: boolean;
144
+ /** Enable row selection with checkboxes */
145
+ enableRowSelection?: boolean;
146
+ /** Enable row actions column */
147
+ enableRowActions?: boolean;
148
+ /** Enable column filter modes */
149
+ enableColumnFilterModes?: boolean;
150
+ /** Enable global filter search */
151
+ enableGlobalFilter?: boolean;
152
+ /** Enable top toolbar */
153
+ enableTopToolbar?: boolean;
154
+ /** Enable toolbar actions */
155
+ enableTopToolbarActions?: boolean;
156
+ /** Show pagination */
157
+ showPagination?: boolean;
158
+ /** Manual filtering (server-side) */
159
+ manualFiltering?: boolean;
160
+ /** Manual pagination (server-side) */
161
+ manualPagination?: boolean;
162
+ /** Manual sorting (server-side) */
163
+ manualSorting?: boolean;
164
+ /** Loading state */
165
+ isLoading?: boolean;
166
+ /** Error state */
167
+ isError?: boolean;
168
+ /** Error object */
169
+ error?: any;
170
+ /** Grid height */
171
+ height?: string | number;
172
+ /** Grid width */
173
+ width?: string | number;
174
+ /** Page size */
175
+ pageSize?: number;
176
+ /** Current page index */
177
+ pageIndex?: number;
178
+ /** Column definitions as children */
179
+ children?: ReactNode;
180
+ /** Render row actions */
181
+ renderRowActions?: (row: T) => ReactNode;
182
+ /** Render toolbar actions */
183
+ renderToolbarActions?: () => ReactNode;
184
+ /** Render internal toolbar actions */
185
+ renderToolbarInternalActions?: (props: {
186
+ table: any;
187
+ }) => ReactNode | null;
188
+ /** Custom top toolbar */
189
+ renderTopToolbar?: ReactNode;
190
+ /** Render detail panel content */
191
+ renderDetailPanel?: (props: {
192
+ row: T;
193
+ }) => ReactNode;
194
+ /** Allow multiple detail panels open */
195
+ allowMultipleDetailPanels?: boolean;
196
+ /** Minimum detail panel height */
197
+ detailPanelMinHeight?: number;
198
+ /** Detail panel style */
199
+ detailPanelStyle?: React.CSSProperties;
200
+ /** Detail panel class name */
201
+ detailPanelClassName?: string;
202
+ /** Callback when detail panels change */
203
+ onDetailPanelChange?: (expandedRowIds: (string | number)[]) => void;
204
+ /** Detail panel display mode */
205
+ detailPanelDisplayMode?: 'auto' | 'inline' | 'modal' | 'drawer';
206
+ /** Detail panel title */
207
+ detailPanelTitle?: string | ((rowId: string | number, rowData: T) => string);
208
+ /** Detail panel position (for drawer) */
209
+ detailPanelPosition?: 'right' | 'left' | 'bottom' | 'top';
210
+ /** Detail panel size (for modal/drawer) */
211
+ detailPanelSize?: string | number;
212
+ /** Allow column filters */
213
+ allowColumnFilters?: boolean;
214
+ /** Allow data export */
215
+ allowExportData?: boolean;
216
+ /** Allow data print */
217
+ allowPrintData?: boolean;
218
+ /** Use ArchbaseCompositeFilters */
219
+ useCompositeFilters?: boolean;
220
+ /** Filter definitions */
221
+ filterDefinitions?: ArchbaseFilterDefinition[];
222
+ /** Active filters */
223
+ activeFilters?: ArchbaseActiveFilter[];
224
+ /** Callback when filters change */
225
+ onFiltersChange?: (filters: ArchbaseActiveFilter[], rsql?: string) => void;
226
+ /** Hide AG Grid native filters */
227
+ hideAgGridFilters?: boolean;
228
+ /** Show border */
229
+ withBorder?: boolean;
230
+ /** Show column borders */
231
+ withColumnBorders?: boolean;
232
+ /** Highlight row on hover */
233
+ highlightOnHover?: boolean;
234
+ /** Striped rows */
235
+ striped?: boolean;
236
+ /** CSS class name */
237
+ className?: string;
238
+ /** Grid variant */
239
+ variant?: 'filled' | 'outlined';
240
+ /** Font size */
241
+ fontSize?: string | number;
242
+ /** Cell padding */
243
+ cellPadding?: string | number;
244
+ /** Table head cell padding */
245
+ tableHeadCellPadding?: string;
246
+ /** Auto column width (flex: 1 for all columns) */
247
+ columnAutoWidth?: boolean;
248
+ /**
249
+ * Auto-size strategy for columns
250
+ * - 'fitCellContents': Auto-size columns to fit their cell contents
251
+ * - 'fitGridWidth': Auto-size columns to fit the grid width
252
+ */
253
+ autoSizeStrategy?: 'fitCellContents' | 'fitGridWidth';
254
+ /** Skip header when calculating auto-size */
255
+ skipHeaderOnAutoSize?: boolean;
256
+ /** Row height */
257
+ rowHeight?: number;
258
+ /** Header font weight (default: 600 = bold) */
259
+ headerFontWeight?: number | 'normal' | 'bold';
260
+ /** Show toolbar border */
261
+ withToolbarBorder?: boolean;
262
+ /** Show pagination border */
263
+ withPaginationBorder?: boolean;
264
+ /** Toolbar padding */
265
+ toolbarPadding?: string | number;
266
+ /** Pagination padding */
267
+ paginationPadding?: string | number;
268
+ /** Print title */
269
+ printTitle?: string;
270
+ /** Print logo */
271
+ logoPrint?: string;
272
+ /** Global date format */
273
+ globalDateFormat?: string;
274
+ /** CSV export options */
275
+ csvOptions?: any;
276
+ /** Toolbar alignment */
277
+ toolbarAlignment?: 'left' | 'right' | 'center';
278
+ /** Actions column position */
279
+ positionActionsColumn?: 'first' | 'last';
280
+ /** Actions column width */
281
+ actionsColumnWidth?: number;
282
+ /** Toolbar left content */
283
+ toolbarLeftContent?: ReactNode;
284
+ /** Bottom toolbar min height */
285
+ bottomToolbarMinHeight?: string | number;
286
+ /** Pagination labels */
287
+ paginationLabels?: Record<string, string>;
288
+ /** Show progress bars */
289
+ showProgressBars?: boolean;
290
+ /** Hide footer */
291
+ hideFooter?: boolean;
292
+ /** Selected rows changed callback */
293
+ onSelectedRowsChanged?: (rows: T[]) => void;
294
+ /** Cell double click callback */
295
+ onCellDoubleClick?: (params: CellClickEvent<T>) => void;
296
+ /** Export callback */
297
+ onExport?: (callback: () => void) => void;
298
+ /** Print callback */
299
+ onPrint?: (callback: () => void) => void;
300
+ /** Filter model change callback */
301
+ onFilterModelChange?: (filterModel: any) => void;
302
+ /** Grid reference */
303
+ gridRef?: RefObject<ArchbaseDataGridAGRef<T>> | MutableRefObject<ArchbaseDataGridAGRef<T> | null>;
304
+ }
305
+ /**
306
+ * Declarative Column component
307
+ */
308
+ export declare function ArchbaseDataGridAGColumn<T>(_props: ArchbaseDataGridAGColumnProps<T>): any;
309
+ export declare namespace ArchbaseDataGridAGColumn {
310
+ var defaultProps: Partial<ArchbaseDataGridAGColumnProps<any>>;
311
+ }
312
+ /**
313
+ * Columns wrapper component
314
+ */
315
+ export declare function Columns(props: GridColumnsProps): import("react/jsx-runtime").JSX.Element;
316
+ export declare namespace Columns {
317
+ var componentName: string;
318
+ }
319
+ /**
320
+ * Toolbar actions wrapper
321
+ */
322
+ export declare function GridToolBarActions(props: GridToolBarActionsProps): import("react/jsx-runtime").JSX.Element;
323
+ /**
324
+ * Internal AG Grid ColDef with extended properties
325
+ */
326
+ export interface ExtendedColDef<TData = any, TValue = any> extends ColDef<TData, TValue> {
327
+ enableGlobalFilter?: boolean;
328
+ dataType?: FieldDataType;
329
+ }
@@ -0,0 +1,71 @@
1
+ import { ColDef, SortModelItem } from 'ag-grid-community';
2
+ import { IArchbaseDataSourceBase } from '@archbase/data';
3
+ import { ArchbaseFilterDefinition, ArchbaseActiveFilter } from '../../filters/ArchbaseCompositeFilters.types';
4
+ /**
5
+ * Maximum page size for MIT license compatibility
6
+ */
7
+ export declare const MAX_PAGE_SIZE = 100;
8
+ /**
9
+ * Safely get row ID from row data
10
+ */
11
+ export declare const safeGetRowId: <T extends object>(row: T, getRowId?: (row: T) => any) => string | number | undefined;
12
+ /**
13
+ * Check if DataSource is V2
14
+ */
15
+ export declare const isDataSourceV2: (ds: any) => boolean;
16
+ /**
17
+ * Get records from DataSource (V1/V2 compatible)
18
+ */
19
+ export declare const getRecordsFromDataSource: <T>(ds: IArchbaseDataSourceBase<T>) => T[];
20
+ /**
21
+ * Get options from DataSource (V1 only)
22
+ */
23
+ export declare const getDataSourceOptions: (ds: any) => any;
24
+ /**
25
+ * Get current page from DataSource
26
+ */
27
+ export declare const getCurrentPageFromDataSource: (ds: any) => number;
28
+ /**
29
+ * Convert hex color to RGB string
30
+ */
31
+ export declare const hexToRgb: (hex: string) => string;
32
+ /**
33
+ * Build global filter RSQL expression
34
+ */
35
+ export declare const buildGlobalFilterExpression: (filterValue: string, columns: ColDef[]) => string | undefined;
36
+ /**
37
+ * Build filter RSQL expression from AG Grid filter model
38
+ */
39
+ export declare const buildFilterExpression: (filterModel: Record<string, any>, columns: ColDef[], quickFilterValue?: string) => string | undefined;
40
+ /**
41
+ * Convert AG Grid sort model to DataSource format
42
+ */
43
+ export declare const convertSortModelToDataSource: (sortModel: SortModelItem[]) => string[];
44
+ /**
45
+ * Get initial sort model from DataSource
46
+ */
47
+ export declare const getInitialSortModel: (dataSource: any) => SortModelItem[];
48
+ /**
49
+ * Convert ArchbaseActiveFilter[] to AG Grid filter model
50
+ */
51
+ export declare const convertActiveFiltersToAgGridModel: (activeFilters: ArchbaseActiveFilter[]) => Record<string, any>;
52
+ /**
53
+ * Convert columns to ArchbaseFilterDefinition[]
54
+ */
55
+ export declare const convertColumnsToFilterDefinitions: (columns: ColDef[], options?: {
56
+ includeColumns?: string[];
57
+ excludeColumns?: string[];
58
+ onlyFilterable?: boolean;
59
+ }) => ArchbaseFilterDefinition[];
60
+ /**
61
+ * Get AG Grid filter type from data type
62
+ */
63
+ export declare const getAgGridFilterType: (dataType: string) => string;
64
+ /**
65
+ * Get alignment class for AG Grid
66
+ */
67
+ export declare const getAlignmentClass: (align?: "left" | "center" | "right") => string;
68
+ /**
69
+ * Get default alignment by data type
70
+ */
71
+ export declare const getDefaultAlignment: (dataType: string) => "left" | "center" | "right";
@@ -0,0 +1,14 @@
1
+ import { ArchbaseDataGridAGProps } from './archbase-data-grid-ag-types';
2
+ /**
3
+ * ArchbaseDataGridAG Component
4
+ *
5
+ * A feature-rich data grid using AG Grid Community with:
6
+ * - Mantine theme integration
7
+ * - DataSource V1/V2 compatibility
8
+ * - Server-side pagination, sorting, filtering
9
+ * - Row selection
10
+ * - Detail panels
11
+ * - Export/Print functionality
12
+ */
13
+ declare function ArchbaseDataGridAG<T extends object = any, ID = any>(props: ArchbaseDataGridAGProps<T, ID>): import("react/jsx-runtime").JSX.Element;
14
+ export default ArchbaseDataGridAG;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * AG Grid Implementation Exports
3
+ *
4
+ * Export all AG Grid related components, types, and utilities.
5
+ * Also exports with original names (ArchbaseDataGrid, etc.) to replace MUI DataGrid implementation.
6
+ */
7
+ export { default as ArchbaseDataGridAG } from './archbase-data-grid-ag';
8
+ export { default as ArchbaseDataGrid } from './archbase-data-grid-ag';
9
+ export type { ArchbaseDataGridAGProps, ArchbaseDataGridAGProps as ArchbaseDataGridProps, ArchbaseDataGridAGRef, ArchbaseDataGridAGRef as ArchbaseDataGridRef, ArchbaseDataGridAGColumnProps, ArchbaseDataGridAGColumnProps as ArchbaseDataGridColumnProps, FieldDataType, CellClickEvent, GridToolBarActionsProps, GridColumnsProps, ExtendedColDef, } from './archbase-data-grid-ag-types';
10
+ export { ArchbaseDataGridAGColumn, ArchbaseDataGridAGColumn as ArchbaseDataGridColumn, Columns as AGColumns, Columns, GridToolBarActions as AGGridToolBarActions, GridToolBarActions, defaultColumnProps as defaultAGColumnProps, defaultColumnProps, } from './archbase-data-grid-ag-types';
11
+ export { createArchbaseAgGridTheme, getAgGridMantineCssVars, } from './ag-grid-mantine-theme';
12
+ export { AG_GRID_LOCALE_PTBR } from './ag-grid-locale-ptbr';
13
+ export { safeGetRowId as agSafeGetRowId, isDataSourceV2 as agIsDataSourceV2, getRecordsFromDataSource as agGetRecordsFromDataSource, getDataSourceOptions as agGetDataSourceOptions, getCurrentPageFromDataSource as agGetCurrentPageFromDataSource, buildFilterExpression as agBuildFilterExpression, buildGlobalFilterExpression as agBuildGlobalFilterExpression, convertSortModelToDataSource as agConvertSortModelToDataSource, getInitialSortModel as agGetInitialSortModel, convertActiveFiltersToAgGridModel, convertColumnsToFilterDefinitions as agConvertColumnsToFilterDefinitions, getAgGridFilterType, getAlignmentClass, getDefaultAlignment, hexToRgb as agHexToRgb, MAX_PAGE_SIZE as AG_MAX_PAGE_SIZE, } from './archbase-data-grid-ag-utils';
14
+ export { TextCellRenderer, IntegerCellRenderer, FloatCellRenderer, CurrencyCellRenderer, PercentCellRenderer, BooleanCellRenderer, DateCellRenderer, DateTimeCellRenderer, TimeCellRenderer, EnumCellRenderer, UUIDCellRenderer, ImageCellRenderer, getCellRendererByDataType, getAlignmentByDataType as agGetAlignmentByDataType, createValueFormatter, } from './archbase-data-grid-ag-formatters';
@@ -1,7 +1,15 @@
1
- export * from './main';
1
+ /**
2
+ * DataGrid Exports
3
+ *
4
+ * A implementação principal agora é AG Grid.
5
+ * Os exports principais (ArchbaseDataGrid, ArchbaseDataGridColumn, etc.) vêm do AG Grid.
6
+ * Utilitários auxiliares da implementação antiga ainda são exportados para compatibilidade.
7
+ */
8
+ export * from './ag-grid';
2
9
  export * from './components';
3
10
  export * from './hooks';
4
11
  export * from './utils';
5
12
  export * from './modals';
6
13
  export * from './types';
7
14
  export * from './export';
15
+ export { ArchbaseDetailPanel, ArchbaseDetailModal, ArchbaseDetailDrawer, ArchbaseDetailPopover, ArchbaseDetailHoverCard, ArchbaseDataGridToolbar, ArchbaseDataGridPagination, ArchbaseExpandButton, createExpandColumn, ArchbaseGridRowActions, createDataTableRowActions, renderText, renderInteger, renderCurrency, renderFloat, renderPercent, renderBoolean, renderDate, renderDateTime, renderTime, renderEnum, renderUUID, getRendererByDataType, safeGetRowId, buildGlobalFilterExpression, buildFilterExpression, getRgbValues, getInitialSortModel, } from './main';