@iris-ui-kit/react 0.3.0 → 0.3.1
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/admin.cjs +6 -3
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +1 -1
- package/dist/async.cjs +16 -7
- package/dist/async.cjs.map +1 -1
- package/dist/async.d.cts +7 -6
- package/dist/async.d.ts +7 -6
- package/dist/async.js +1 -1
- package/dist/chunk-3772LKJP.js +942 -0
- package/dist/chunk-3772LKJP.js.map +1 -0
- package/dist/{chunk-TO7YVSAI.js → chunk-3KYNBLRY.js} +18 -9
- package/dist/chunk-3KYNBLRY.js.map +1 -0
- package/dist/{chunk-KRFZ5KL4.js → chunk-TDVRIHE6.js} +8 -5
- package/dist/chunk-TDVRIHE6.js.map +1 -0
- package/dist/{chunk-QZJXMCRR.js → chunk-VLWZSOTH.js} +2 -2
- package/dist/chunk-VLWZSOTH.js.map +1 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.cts +2 -2
- package/dist/data.d.ts +2 -2
- package/dist/data.js +1 -1
- package/dist/grid.cjs +1007 -0
- package/dist/grid.cjs.map +1 -0
- package/dist/grid.d.cts +324 -0
- package/dist/grid.d.ts +324 -0
- package/dist/grid.js +5 -0
- package/dist/grid.js.map +1 -0
- package/dist/index.cjs +6248 -3722
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +293 -8
- package/dist/index.d.ts +293 -8
- package/dist/index.js +4803 -3241
- package/dist/index.js.map +1 -1
- package/package.json +10 -5
- package/dist/chunk-KRFZ5KL4.js.map +0 -1
- package/dist/chunk-QZJXMCRR.js.map +0 -1
- package/dist/chunk-TO7YVSAI.js.map +0 -1
package/dist/grid.d.ts
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { GridCoreOptions, GridFeature, GridCore, GridFilterValues, GridFilteringModel, GridColumnVisibility, GridColumnWidths, GridColumnPinned, GridColumnPin, GridColumnsModel, GridColumnsState, GridExpansionKey, ExpansionMode, ExpansionModel, GridPaginationChange, GridPaginationModel, GridPaginationState, GridRowKey, GridRowsTransaction, GridRowsModel, SelectionKey, SelectionMode, SortState, GridSortingModel, GridClipboardFeatureOptions, GridClipboardModel, GridEditingFeatureOptions, GridEditingKey, GridEditingValidation, GridEditingCommit, GridEditingModel, GridRangeChange, GridRangeModel, GridVirtualRangeChange, GridVirtualModel } from '@iris-ui-kit/core/grid';
|
|
2
|
+
import { FilterRule, SelectionModel, TableCopyFormat, TableClipboardRange, CellEditState, CellRangeState, CellRange } from '@iris-ui-kit/core';
|
|
3
|
+
|
|
4
|
+
interface UseGridCoreOptions<Row extends Record<string, unknown>> extends GridCoreOptions<Row> {
|
|
5
|
+
readonly features?: readonly GridFeature<Row>[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* React lifecycle bridge for one framework-agnostic Grid Core. Features are
|
|
9
|
+
* captured on the first render; use `core.use()` for an explicit late install.
|
|
10
|
+
*/
|
|
11
|
+
declare function useGridCore<Row extends Record<string, unknown> = Record<string, unknown>>(options?: UseGridCoreOptions<Row>): GridCore<Row>;
|
|
12
|
+
|
|
13
|
+
interface GridFilterColumn<Row> {
|
|
14
|
+
key: string;
|
|
15
|
+
filterMethod?: (value: unknown, row: Row, filterValue: string) => boolean;
|
|
16
|
+
}
|
|
17
|
+
interface GridFilterQuery {
|
|
18
|
+
readonly filters: Readonly<Record<string, string>>;
|
|
19
|
+
readonly inValues: Readonly<Record<string, readonly string[]>>;
|
|
20
|
+
readonly rules: readonly FilterRule[];
|
|
21
|
+
}
|
|
22
|
+
interface UseGridFilteringOptions<Row, Column extends GridFilterColumn<Row> = GridFilterColumn<Row>> {
|
|
23
|
+
columns: Column[];
|
|
24
|
+
getValue: (row: Row, column: Column) => unknown;
|
|
25
|
+
filters?: Record<string, string>;
|
|
26
|
+
defaultFilters?: Record<string, string>;
|
|
27
|
+
onFiltersChange?: (filters: Record<string, string>) => void;
|
|
28
|
+
filterValues?: GridFilterValues;
|
|
29
|
+
defaultFilterValues?: GridFilterValues;
|
|
30
|
+
onFilterValuesChange?: (filterValues: GridFilterValues) => void;
|
|
31
|
+
/** Treat missing filter props as controlled empty maps. */
|
|
32
|
+
controlled?: boolean;
|
|
33
|
+
formFilters?: Record<string, string>;
|
|
34
|
+
query?: GridFilterQuery;
|
|
35
|
+
proxy?: boolean;
|
|
36
|
+
remote?: boolean;
|
|
37
|
+
}
|
|
38
|
+
interface UseGridFilteringResult<Row> {
|
|
39
|
+
core: GridCore;
|
|
40
|
+
model: GridFilteringModel;
|
|
41
|
+
filters: Record<string, string>;
|
|
42
|
+
filterValues: GridFilterValues;
|
|
43
|
+
filteredData: Row[];
|
|
44
|
+
}
|
|
45
|
+
/** Installs filtering state in Grid Core and derives the React row view. */
|
|
46
|
+
declare function useGridFiltering<Row extends Record<string, unknown> = Record<string, unknown>, Column extends GridFilterColumn<Row> = GridFilterColumn<Row>>(core: GridCore<Row>, data: Row[], options: UseGridFilteringOptions<Row, Column>): UseGridFilteringResult<Row>;
|
|
47
|
+
|
|
48
|
+
interface UseGridColumnsOptions {
|
|
49
|
+
visibility?: GridColumnVisibility;
|
|
50
|
+
defaultVisibility?: GridColumnVisibility;
|
|
51
|
+
visibilityControlled?: boolean;
|
|
52
|
+
onVisibilityChange?: (visibility: GridColumnVisibility) => void;
|
|
53
|
+
order?: string[];
|
|
54
|
+
defaultOrder?: string[];
|
|
55
|
+
/** Keeps the legacy `undefined` order controlled as an empty source-order override. */
|
|
56
|
+
orderControlled?: boolean;
|
|
57
|
+
onOrderChange?: (order: string[] | undefined) => void;
|
|
58
|
+
widths?: GridColumnWidths;
|
|
59
|
+
defaultWidths?: GridColumnWidths;
|
|
60
|
+
onWidthsChange?: (widths: GridColumnWidths) => void;
|
|
61
|
+
pinned?: GridColumnPinned;
|
|
62
|
+
defaultPinned?: GridColumnPinned;
|
|
63
|
+
onPinnedChange?: (key: string, side: GridColumnPin) => void;
|
|
64
|
+
}
|
|
65
|
+
interface UseGridColumnsResult {
|
|
66
|
+
model: GridColumnsModel;
|
|
67
|
+
state: GridColumnsState;
|
|
68
|
+
controlled: {
|
|
69
|
+
visibility: boolean;
|
|
70
|
+
order: boolean;
|
|
71
|
+
widths: boolean;
|
|
72
|
+
pinned: boolean;
|
|
73
|
+
};
|
|
74
|
+
setVisibility(visibility: GridColumnVisibility): void;
|
|
75
|
+
toggleVisibility(key: string): void;
|
|
76
|
+
setOrder(order: string[] | undefined): void;
|
|
77
|
+
clearOrder(): void;
|
|
78
|
+
setWidths(widths: GridColumnWidths): void;
|
|
79
|
+
setWidth(key: string, width: number): void;
|
|
80
|
+
resetWidths(): void;
|
|
81
|
+
setPinned(key: string, side: GridColumnPin): void;
|
|
82
|
+
}
|
|
83
|
+
/** Installs the four column-state channels and mirrors optional controlled props. */
|
|
84
|
+
declare function useGridColumns<Row extends Record<string, unknown> = Record<string, unknown>>(core: GridCore<Row>, options?: UseGridColumnsOptions): UseGridColumnsResult;
|
|
85
|
+
|
|
86
|
+
interface UseGridExpansionOptions<K extends GridExpansionKey = string> {
|
|
87
|
+
mode?: ExpansionMode;
|
|
88
|
+
defaultValue?: K[];
|
|
89
|
+
onChange?: (keys: K[]) => void;
|
|
90
|
+
getKeys?: () => readonly K[];
|
|
91
|
+
}
|
|
92
|
+
interface UseGridExpansionResult<K extends GridExpansionKey = string> {
|
|
93
|
+
core: GridCore;
|
|
94
|
+
model: ExpansionModel<K>;
|
|
95
|
+
expandedKeys: K[];
|
|
96
|
+
}
|
|
97
|
+
/** Installs one expansion feature and bridges its store into React. */
|
|
98
|
+
declare function useGridExpansion<Row extends Record<string, unknown> = Record<string, unknown>, K extends GridExpansionKey = string>(core: GridCore<Row>, options?: UseGridExpansionOptions<K>): UseGridExpansionResult<K>;
|
|
99
|
+
|
|
100
|
+
interface UseGridPaginationOptions {
|
|
101
|
+
page?: number;
|
|
102
|
+
defaultPage?: number;
|
|
103
|
+
pageSize?: number;
|
|
104
|
+
defaultPageSize?: number;
|
|
105
|
+
total?: number;
|
|
106
|
+
defaultTotal?: number;
|
|
107
|
+
onChange?: (change: GridPaginationChange) => void;
|
|
108
|
+
}
|
|
109
|
+
interface UseGridPaginationResult {
|
|
110
|
+
model: GridPaginationModel;
|
|
111
|
+
pagination: GridPaginationState;
|
|
112
|
+
controlled: boolean;
|
|
113
|
+
setPage(page: number): void;
|
|
114
|
+
setPageSize(pageSize: number): void;
|
|
115
|
+
setPagination(page: number, pageSize: number): void;
|
|
116
|
+
}
|
|
117
|
+
/** Installs pagination in Grid Core and mirrors optional controlled proxy state. */
|
|
118
|
+
declare function useGridPagination<Row extends Record<string, unknown> = Record<string, unknown>>(core: GridCore<Row>, options?: UseGridPaginationOptions): UseGridPaginationResult;
|
|
119
|
+
|
|
120
|
+
interface UseGridRowsOptions<Row extends Record<string, unknown>, Meta = unknown> {
|
|
121
|
+
cloneDefaultRows?: boolean;
|
|
122
|
+
rowKeyField?: string;
|
|
123
|
+
getRowKey?: (row: Row, index: number) => GridRowKey | undefined;
|
|
124
|
+
/** Read nested rows when the source is a tree; omitted keeps flat-row semantics. */
|
|
125
|
+
getChildren?: (row: Row) => readonly Row[] | undefined;
|
|
126
|
+
/** Replace nested rows immutably when `getChildren` is not a direct property. */
|
|
127
|
+
setChildren?: (row: Row, children: Row[]) => Row;
|
|
128
|
+
onBeforeRowsChange?: (transaction: GridRowsTransaction<Row, Meta>) => void;
|
|
129
|
+
onRowsChange?: (transaction: GridRowsTransaction<Row, Meta>) => void;
|
|
130
|
+
}
|
|
131
|
+
interface UseGridRowsResult<Row extends Record<string, unknown>, Meta = unknown> {
|
|
132
|
+
model: GridRowsModel<Row, Meta>;
|
|
133
|
+
rows: Row[];
|
|
134
|
+
}
|
|
135
|
+
/** Installs the single Grid Core row source and bridges it to React rendering. */
|
|
136
|
+
declare function useGridRows<Row extends Record<string, unknown> = Record<string, unknown>, Meta = unknown>(core: GridCore<Row>, initialRows: readonly Row[], options?: UseGridRowsOptions<Row, Meta>): UseGridRowsResult<Row, Meta>;
|
|
137
|
+
|
|
138
|
+
interface UseGridSelectionOptions<K extends SelectionKey = string> {
|
|
139
|
+
mode?: SelectionMode;
|
|
140
|
+
value?: K[];
|
|
141
|
+
defaultValue?: K[];
|
|
142
|
+
onChange?: (keys: K[]) => void;
|
|
143
|
+
getKeys?: () => readonly K[];
|
|
144
|
+
}
|
|
145
|
+
interface UseGridSelectionResult<K extends SelectionKey = string> {
|
|
146
|
+
core: GridCore;
|
|
147
|
+
model: SelectionModel<K>;
|
|
148
|
+
selection: K[];
|
|
149
|
+
controlled: boolean;
|
|
150
|
+
/** Rebase mutations on the latest controlled prop before applying them. */
|
|
151
|
+
rebase(): void;
|
|
152
|
+
}
|
|
153
|
+
/** Selection feature + React controlled/uncontrolled reactivity bridge. */
|
|
154
|
+
declare function useGridSelection<Row extends Record<string, unknown> = Record<string, unknown>, K extends SelectionKey = string>(core: GridCore<Row>, options?: UseGridSelectionOptions<K>): UseGridSelectionResult<K>;
|
|
155
|
+
|
|
156
|
+
interface GridSortColumn<Row> {
|
|
157
|
+
key: string;
|
|
158
|
+
dataIndex?: keyof Row | string;
|
|
159
|
+
formula?: string;
|
|
160
|
+
sortable?: boolean;
|
|
161
|
+
sorter?: (a: Row, b: Row) => number;
|
|
162
|
+
sortBy?: string;
|
|
163
|
+
sortType?: 'number' | 'string' | 'auto';
|
|
164
|
+
}
|
|
165
|
+
interface UseGridSortingOptions<Row> {
|
|
166
|
+
leafColumns: GridSortColumn<Row>[];
|
|
167
|
+
sort?: SortState | null;
|
|
168
|
+
defaultSort?: SortState | null;
|
|
169
|
+
onSortChange?: (next: SortState | null) => void;
|
|
170
|
+
multiSort?: boolean;
|
|
171
|
+
multiSortState?: SortState[];
|
|
172
|
+
defaultMultiSort?: SortState[];
|
|
173
|
+
onMultiSortChange?: (next: SortState[]) => void;
|
|
174
|
+
formulaTables?: Record<string, Row[]>;
|
|
175
|
+
}
|
|
176
|
+
interface UseGridSortingResult<Row> {
|
|
177
|
+
core: GridCore;
|
|
178
|
+
model: GridSortingModel;
|
|
179
|
+
sortState: SortState | null;
|
|
180
|
+
cycleSort: (column: GridSortColumn<Row>) => void;
|
|
181
|
+
setSort: (next: SortState | null) => void;
|
|
182
|
+
sortComparator: ((a: Row, b: Row) => number) | null;
|
|
183
|
+
sortedData: Row[];
|
|
184
|
+
multiSortState: SortState[];
|
|
185
|
+
cycleMultiSort: (column: GridSortColumn<Row>) => void;
|
|
186
|
+
setMultiSort: (next: SortState[]) => void;
|
|
187
|
+
multiSortComparator: ((a: Row, b: Row) => number) | null;
|
|
188
|
+
}
|
|
189
|
+
/** Installs sorting state in Grid Core and derives React column comparators. */
|
|
190
|
+
declare function useGridSorting<Row extends Record<string, unknown> = Record<string, unknown>>(core: GridCore<Row>, data: Row[], options: UseGridSortingOptions<Row>): UseGridSortingResult<Row>;
|
|
191
|
+
|
|
192
|
+
interface LegacyGridRowsProps<Row extends Record<string, unknown>, Meta = unknown> {
|
|
193
|
+
readonly data?: Row[];
|
|
194
|
+
readonly keepSource?: boolean;
|
|
195
|
+
readonly rowKeyField?: string;
|
|
196
|
+
readonly getRowKey?: (row: Row, index: number) => GridRowKey | undefined;
|
|
197
|
+
readonly getChildren?: UseGridRowsOptions<Row, Meta>['getChildren'];
|
|
198
|
+
readonly setChildren?: UseGridRowsOptions<Row, Meta>['setChildren'];
|
|
199
|
+
readonly beforeChange?: UseGridRowsOptions<Row, Meta>['onBeforeRowsChange'];
|
|
200
|
+
readonly onChange?: UseGridRowsOptions<Row, Meta>['onRowsChange'];
|
|
201
|
+
}
|
|
202
|
+
interface LegacyGridColumnsProps {
|
|
203
|
+
readonly columnVisibility?: UseGridColumnsOptions['visibility'];
|
|
204
|
+
readonly onColumnVisibilityChange?: UseGridColumnsOptions['onVisibilityChange'];
|
|
205
|
+
readonly columnOrder?: UseGridColumnsOptions['order'];
|
|
206
|
+
readonly onColumnOrderChange?: UseGridColumnsOptions['onOrderChange'];
|
|
207
|
+
readonly columnWidths?: UseGridColumnsOptions['widths'];
|
|
208
|
+
readonly defaultColumnWidths?: UseGridColumnsOptions['defaultWidths'];
|
|
209
|
+
readonly onColumnWidthsChange?: UseGridColumnsOptions['onWidthsChange'];
|
|
210
|
+
readonly pinnedColumns?: UseGridColumnsOptions['pinned'];
|
|
211
|
+
readonly onColumnPinnedChange?: UseGridColumnsOptions['onPinnedChange'];
|
|
212
|
+
}
|
|
213
|
+
/** Map the four legacy column channels into one feature boundary. */
|
|
214
|
+
declare function toGridColumnsOptions(props: LegacyGridColumnsProps): UseGridColumnsOptions;
|
|
215
|
+
interface LegacyGridRowsOptions<Row extends Record<string, unknown>, Meta = unknown> {
|
|
216
|
+
readonly initialRows: Row[];
|
|
217
|
+
readonly options: UseGridRowsOptions<Row, Meta>;
|
|
218
|
+
}
|
|
219
|
+
/** Map the legacy `data` ownership contract into the rows feature boundary. */
|
|
220
|
+
declare function toGridRowsOptions<Row extends Record<string, unknown>, Meta = unknown>(props: LegacyGridRowsProps<Row, Meta>): LegacyGridRowsOptions<Row, Meta>;
|
|
221
|
+
interface LegacyGridSelectionProps<K extends SelectionKey = string> {
|
|
222
|
+
readonly selectable?: 'none' | 'single' | 'multi';
|
|
223
|
+
readonly selection?: K[];
|
|
224
|
+
readonly defaultSelection?: K[];
|
|
225
|
+
readonly onSelectionChange?: (keys: K[]) => void;
|
|
226
|
+
}
|
|
227
|
+
/** `none` still uses a dormant multiple model, matching the legacy Table. */
|
|
228
|
+
declare function toGridSelectionOptions<K extends SelectionKey = string>(props: LegacyGridSelectionProps<K>): UseGridSelectionOptions<K>;
|
|
229
|
+
interface LegacyGridExpansionProps<K extends GridExpansionKey = string> {
|
|
230
|
+
readonly defaultExpandedRowKeys?: readonly K[];
|
|
231
|
+
readonly onChange?: (keys: string[]) => void;
|
|
232
|
+
}
|
|
233
|
+
declare function toGridExpansionOptions<K extends GridExpansionKey = string>(props: LegacyGridExpansionProps<K>): UseGridExpansionOptions<string>;
|
|
234
|
+
interface LegacyGridPaginationProxyConfig {
|
|
235
|
+
readonly defaultPage?: number;
|
|
236
|
+
readonly pageSize?: number;
|
|
237
|
+
readonly onPageChange?: (page: number, pageSize: number) => void;
|
|
238
|
+
}
|
|
239
|
+
interface LegacyGridPaginationState {
|
|
240
|
+
readonly page: number;
|
|
241
|
+
readonly pageSize: number;
|
|
242
|
+
readonly total: number;
|
|
243
|
+
}
|
|
244
|
+
interface LegacyGridPaginationProps {
|
|
245
|
+
readonly proxyConfig?: LegacyGridPaginationProxyConfig;
|
|
246
|
+
readonly state?: LegacyGridPaginationState;
|
|
247
|
+
readonly request?: (pagination: Pick<LegacyGridPaginationState, 'page' | 'pageSize'>) => void;
|
|
248
|
+
}
|
|
249
|
+
/** Map proxy pagination into a controlled feature; request policy stays outside core. */
|
|
250
|
+
declare function toGridPaginationOptions(props: LegacyGridPaginationProps): UseGridPaginationOptions;
|
|
251
|
+
interface LegacyGridSortingProps<Row extends Record<string, unknown>> {
|
|
252
|
+
readonly columns: GridSortColumn<Row>[];
|
|
253
|
+
readonly sort?: UseGridSortingOptions<Row>['sort'];
|
|
254
|
+
readonly defaultSort?: UseGridSortingOptions<Row>['defaultSort'];
|
|
255
|
+
readonly onSortChange?: UseGridSortingOptions<Row>['onSortChange'];
|
|
256
|
+
readonly multiSort?: boolean;
|
|
257
|
+
readonly multiSortState?: UseGridSortingOptions<Row>['multiSortState'];
|
|
258
|
+
readonly defaultMultiSort?: UseGridSortingOptions<Row>['defaultMultiSort'];
|
|
259
|
+
readonly onMultiSortChange?: UseGridSortingOptions<Row>['onMultiSortChange'];
|
|
260
|
+
readonly formulaTables?: UseGridSortingOptions<Row>['formulaTables'];
|
|
261
|
+
}
|
|
262
|
+
declare function toGridSortingOptions<Row extends Record<string, unknown>>(props: LegacyGridSortingProps<Row>): UseGridSortingOptions<Row>;
|
|
263
|
+
interface LegacyGridFilteringProps<Row extends Record<string, unknown>, Column extends GridFilterColumn<Row>> extends Omit<UseGridFilteringOptions<Row, Column>, 'controlled' | 'proxy' | 'remote'> {
|
|
264
|
+
readonly proxy?: unknown;
|
|
265
|
+
readonly remoteFilter?: boolean;
|
|
266
|
+
}
|
|
267
|
+
declare function toGridFilteringOptions<Row extends Record<string, unknown>, Column extends GridFilterColumn<Row>>(props: LegacyGridFilteringProps<Row, Column>): UseGridFilteringOptions<Row, Column>;
|
|
268
|
+
|
|
269
|
+
type UseGridClipboardOptions<Row extends Record<string, unknown>> = GridClipboardFeatureOptions<Row>;
|
|
270
|
+
interface UseGridClipboardResult<Row extends Record<string, unknown>> {
|
|
271
|
+
core: GridCore<Row>;
|
|
272
|
+
model: GridClipboardModel;
|
|
273
|
+
serialize(format?: TableCopyFormat, copyWithFormat?: boolean): string | null;
|
|
274
|
+
paste(text: string, range?: TableClipboardRange): boolean;
|
|
275
|
+
}
|
|
276
|
+
/** Installs clipboard pure logic while leaving system clipboard I/O in React. */
|
|
277
|
+
declare function useGridClipboard<Row extends Record<string, unknown> = Record<string, unknown>>(core: GridCore<Row>, options: UseGridClipboardOptions<Row>): UseGridClipboardResult<Row>;
|
|
278
|
+
|
|
279
|
+
interface UseGridEditingOptions<Row extends Record<string, unknown>> extends Omit<GridEditingFeatureOptions<Row>, 'onStateChange' | 'onCommit'> {
|
|
280
|
+
onStateChange?: (state: CellEditState<GridEditingKey>) => void;
|
|
281
|
+
onValidation?: (validation: GridEditingValidation) => void;
|
|
282
|
+
onCommit?: (commit: GridEditingCommit<Row>) => void;
|
|
283
|
+
}
|
|
284
|
+
interface UseGridEditingResult<Row extends Record<string, unknown>> {
|
|
285
|
+
core: GridCore<Row>;
|
|
286
|
+
model: GridEditingModel;
|
|
287
|
+
state: CellEditState<GridEditingKey>;
|
|
288
|
+
startCellEdit(rowKey: GridEditingKey, columnKey: string, initialDraft?: unknown): boolean;
|
|
289
|
+
setCellDraft(value: unknown): void;
|
|
290
|
+
cancelCellEdit(): void;
|
|
291
|
+
commitCellEdit(value?: unknown): boolean;
|
|
292
|
+
isCellEditing(rowKey: GridEditingKey, columnKey: string): boolean;
|
|
293
|
+
}
|
|
294
|
+
/** Installs the framework-independent editing feature and bridges its state. */
|
|
295
|
+
declare function useGridEditing<Row extends Record<string, unknown>>(core: GridCore<Row>, options: UseGridEditingOptions<Row>): UseGridEditingResult<Row>;
|
|
296
|
+
|
|
297
|
+
interface UseGridRangeOptions {
|
|
298
|
+
onChange?: (change: GridRangeChange) => void;
|
|
299
|
+
}
|
|
300
|
+
interface UseGridRangeResult<Row extends Record<string, unknown>> {
|
|
301
|
+
core: GridCore<Row>;
|
|
302
|
+
model: GridRangeModel;
|
|
303
|
+
state: CellRangeState;
|
|
304
|
+
range: CellRange | null;
|
|
305
|
+
}
|
|
306
|
+
/** Installs the range feature and bridges its controller snapshot into React. */
|
|
307
|
+
declare function useGridRange<Row extends Record<string, unknown> = Record<string, unknown>>(core: GridCore<Row>, options?: UseGridRangeOptions): UseGridRangeResult<Row>;
|
|
308
|
+
|
|
309
|
+
interface UseGridVirtualOptions<Item> {
|
|
310
|
+
items: readonly Item[];
|
|
311
|
+
estimateSize: number | ((index: number) => number);
|
|
312
|
+
viewportSize?: number;
|
|
313
|
+
scrollOffset?: number;
|
|
314
|
+
buffer?: number;
|
|
315
|
+
getItemKey?: (item: Item, index: number) => string | number;
|
|
316
|
+
onRangeChange?: (change: GridVirtualRangeChange) => void;
|
|
317
|
+
}
|
|
318
|
+
interface UseGridVirtualResult {
|
|
319
|
+
model: GridVirtualModel;
|
|
320
|
+
}
|
|
321
|
+
/** Installs the virtual window controller; the viewport component remains the DOM bridge. */
|
|
322
|
+
declare function useGridVirtual<Row extends Record<string, unknown> = Record<string, unknown>, Item = Row>(core: GridCore<Row>, options: UseGridVirtualOptions<Item>): UseGridVirtualResult;
|
|
323
|
+
|
|
324
|
+
export { type GridFilterColumn, type GridFilterQuery, type GridSortColumn, type LegacyGridColumnsProps, type LegacyGridExpansionProps, type LegacyGridFilteringProps, type LegacyGridPaginationProps, type LegacyGridPaginationProxyConfig, type LegacyGridPaginationState, type LegacyGridRowsOptions, type LegacyGridRowsProps, type LegacyGridSelectionProps, type LegacyGridSortingProps, type UseGridClipboardOptions, type UseGridClipboardResult, type UseGridColumnsOptions, type UseGridColumnsResult, type UseGridCoreOptions, type UseGridEditingOptions, type UseGridEditingResult, type UseGridExpansionOptions, type UseGridExpansionResult, type UseGridFilteringOptions, type UseGridFilteringResult, type UseGridPaginationOptions, type UseGridPaginationResult, type UseGridRangeOptions, type UseGridRangeResult, type UseGridRowsOptions, type UseGridRowsResult, type UseGridSelectionOptions, type UseGridSelectionResult, type UseGridSortingOptions, type UseGridSortingResult, type UseGridVirtualOptions, type UseGridVirtualResult, toGridColumnsOptions, toGridExpansionOptions, toGridFilteringOptions, toGridPaginationOptions, toGridRowsOptions, toGridSelectionOptions, toGridSortingOptions, useGridClipboard, useGridColumns, useGridCore, useGridEditing, useGridExpansion, useGridFiltering, useGridPagination, useGridRange, useGridRows, useGridSelection, useGridSorting, useGridVirtual };
|
package/dist/grid.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
export { toGridColumnsOptions, toGridExpansionOptions, toGridFilteringOptions, toGridPaginationOptions, toGridRowsOptions, toGridSelectionOptions, toGridSortingOptions, useGridClipboard, useGridColumns, useGridCore, useGridEditing, useGridExpansion, useGridFiltering, useGridPagination, useGridRange, useGridRows, useGridSelection, useGridSorting, useGridVirtual } from './chunk-3772LKJP.js';
|
|
3
|
+
import './chunk-RZNYIFV2.js';
|
|
4
|
+
//# sourceMappingURL=grid.js.map
|
|
5
|
+
//# sourceMappingURL=grid.js.map
|
package/dist/grid.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":";","file":"grid.js"}
|