@dataverse-kit/grid-kit 0.1.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.
Files changed (115) hide show
  1. package/dist/adapters/CalloutCell.d.ts +24 -0
  2. package/dist/adapters/CalloutCell.d.ts.map +1 -0
  3. package/dist/adapters/EditCellWrapper.d.ts +13 -0
  4. package/dist/adapters/EditCellWrapper.d.ts.map +1 -0
  5. package/dist/adapters/context.d.ts +45 -0
  6. package/dist/adapters/context.d.ts.map +1 -0
  7. package/dist/adapters/fromGridCustomizerDefinition.d.ts +43 -0
  8. package/dist/adapters/fromGridCustomizerDefinition.d.ts.map +1 -0
  9. package/dist/adapters/index.d.ts +10 -0
  10. package/dist/adapters/index.d.ts.map +1 -0
  11. package/dist/adapters/resolveGridFromDefinition.d.ts +92 -0
  12. package/dist/adapters/resolveGridFromDefinition.d.ts.map +1 -0
  13. package/dist/adapters/toDetailsListColumns.d.ts +5 -0
  14. package/dist/adapters/toDetailsListColumns.d.ts.map +1 -0
  15. package/dist/adapters/toGridCustomizerOverrides.d.ts +46 -0
  16. package/dist/adapters/toGridCustomizerOverrides.d.ts.map +1 -0
  17. package/dist/core/aggregate.d.ts +35 -0
  18. package/dist/core/aggregate.d.ts.map +1 -0
  19. package/dist/core/coercion.d.ts +9 -0
  20. package/dist/core/coercion.d.ts.map +1 -0
  21. package/dist/core/colorResolver.d.ts +15 -0
  22. package/dist/core/colorResolver.d.ts.map +1 -0
  23. package/dist/core/filter.d.ts +40 -0
  24. package/dist/core/filter.d.ts.map +1 -0
  25. package/dist/core/formatters.d.ts +9 -0
  26. package/dist/core/formatters.d.ts.map +1 -0
  27. package/dist/core/index.d.ts +12 -0
  28. package/dist/core/index.d.ts.map +1 -0
  29. package/dist/core/thresholds.d.ts +15 -0
  30. package/dist/core/thresholds.d.ts.map +1 -0
  31. package/dist/dnd/DroppableCell.d.ts +16 -0
  32. package/dist/dnd/DroppableCell.d.ts.map +1 -0
  33. package/dist/dnd/FileDropCell.d.ts +25 -0
  34. package/dist/dnd/FileDropCell.d.ts.map +1 -0
  35. package/dist/dnd/index.d.ts +7 -0
  36. package/dist/dnd/index.d.ts.map +1 -0
  37. package/dist/dnd/useFileDrop.d.ts +36 -0
  38. package/dist/dnd/useFileDrop.d.ts.map +1 -0
  39. package/dist/export/GridExportDialog.d.ts +29 -0
  40. package/dist/export/GridExportDialog.d.ts.map +1 -0
  41. package/dist/export/exportGrid.d.ts +17 -0
  42. package/dist/export/exportGrid.d.ts.map +1 -0
  43. package/dist/export/index.d.ts +4 -0
  44. package/dist/export/index.d.ts.map +1 -0
  45. package/dist/hosts/CardGrid.d.ts +12 -0
  46. package/dist/hosts/CardGrid.d.ts.map +1 -0
  47. package/dist/hosts/DataGrid.d.ts +10 -0
  48. package/dist/hosts/DataGrid.d.ts.map +1 -0
  49. package/dist/hosts/DetailsGrid.d.ts +3 -0
  50. package/dist/hosts/DetailsGrid.d.ts.map +1 -0
  51. package/dist/hosts/FocusedViewGrid.d.ts +10 -0
  52. package/dist/hosts/FocusedViewGrid.d.ts.map +1 -0
  53. package/dist/hosts/GridAggregateFooter.d.ts +36 -0
  54. package/dist/hosts/GridAggregateFooter.d.ts.map +1 -0
  55. package/dist/hosts/GridColumnChooser.d.ts +27 -0
  56. package/dist/hosts/GridColumnChooser.d.ts.map +1 -0
  57. package/dist/hosts/GridFilterBuilder.d.ts +32 -0
  58. package/dist/hosts/GridFilterBuilder.d.ts.map +1 -0
  59. package/dist/hosts/GridPaginationFooter.d.ts +11 -0
  60. package/dist/hosts/GridPaginationFooter.d.ts.map +1 -0
  61. package/dist/hosts/GroupedGrid.d.ts +9 -0
  62. package/dist/hosts/GroupedGrid.d.ts.map +1 -0
  63. package/dist/hosts/ReadOnlyGrid.d.ts +9 -0
  64. package/dist/hosts/ReadOnlyGrid.d.ts.map +1 -0
  65. package/dist/hosts/buildGroups.d.ts +14 -0
  66. package/dist/hosts/buildGroups.d.ts.map +1 -0
  67. package/dist/hosts/cardLayout.d.ts +22 -0
  68. package/dist/hosts/cardLayout.d.ts.map +1 -0
  69. package/dist/hosts/fill.d.ts +10 -0
  70. package/dist/hosts/fill.d.ts.map +1 -0
  71. package/dist/hosts/index.d.ts +19 -0
  72. package/dist/hosts/index.d.ts.map +1 -0
  73. package/dist/hosts/nested/NestedCardParent.d.ts +23 -0
  74. package/dist/hosts/nested/NestedCardParent.d.ts.map +1 -0
  75. package/dist/hosts/nested/NestedGrid.d.ts +17 -0
  76. package/dist/hosts/nested/NestedGrid.d.ts.map +1 -0
  77. package/dist/hosts/nested/NestedInline.d.ts +18 -0
  78. package/dist/hosts/nested/NestedInline.d.ts.map +1 -0
  79. package/dist/hosts/nested/NestedTriggerCell.d.ts +12 -0
  80. package/dist/hosts/nested/NestedTriggerCell.d.ts.map +1 -0
  81. package/dist/hosts/nested/labels.d.ts +10 -0
  82. package/dist/hosts/nested/labels.d.ts.map +1 -0
  83. package/dist/hosts/nested/useChildren.d.ts +15 -0
  84. package/dist/hosts/nested/useChildren.d.ts.map +1 -0
  85. package/dist/hosts/rowContextMenu.d.ts +11 -0
  86. package/dist/hosts/rowContextMenu.d.ts.map +1 -0
  87. package/dist/hosts/toolbar/GridToolbar.d.ts +9 -0
  88. package/dist/hosts/toolbar/GridToolbar.d.ts.map +1 -0
  89. package/dist/hosts/useEditState.d.ts +25 -0
  90. package/dist/hosts/useEditState.d.ts.map +1 -0
  91. package/dist/hosts/useGridContext.d.ts +15 -0
  92. package/dist/hosts/useGridContext.d.ts.map +1 -0
  93. package/dist/hosts/useRowContextMenu.d.ts +18 -0
  94. package/dist/hosts/useRowContextMenu.d.ts.map +1 -0
  95. package/dist/index.d.ts +22 -0
  96. package/dist/index.d.ts.map +1 -0
  97. package/dist/index.esm.js +2783 -0
  98. package/dist/index.esm.js.map +1 -0
  99. package/dist/index.js +2847 -0
  100. package/dist/index.js.map +1 -0
  101. package/dist/navigation/index.d.ts +3 -0
  102. package/dist/navigation/index.d.ts.map +1 -0
  103. package/dist/navigation/navigateTo.d.ts +71 -0
  104. package/dist/navigation/navigateTo.d.ts.map +1 -0
  105. package/dist/registry/columnMapping.d.ts +15 -0
  106. package/dist/registry/columnMapping.d.ts.map +1 -0
  107. package/dist/registry/createCellRegistry.d.ts +8 -0
  108. package/dist/registry/createCellRegistry.d.ts.map +1 -0
  109. package/dist/registry/index.d.ts +4 -0
  110. package/dist/registry/index.d.ts.map +1 -0
  111. package/dist/registry/renderers.d.ts +15 -0
  112. package/dist/registry/renderers.d.ts.map +1 -0
  113. package/dist/types/index.d.ts +488 -0
  114. package/dist/types/index.d.ts.map +1 -0
  115. package/package.json +51 -0
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import type { ColumnDef } from '../types';
3
+ export interface GridExportDialogProps<T extends Record<string, unknown>> {
4
+ /** Whether the dialog is visible. */
5
+ isOpen: boolean;
6
+ /** Close handler. */
7
+ onClose: () => void;
8
+ /** Rows to export (already scoped — current page / all / selection). */
9
+ items: T[];
10
+ /** Grid columns; the user picks a subset. `fileDrop` columns are excluded. */
11
+ columns: ColumnDef<T>[];
12
+ /** Base filename (a date suffix is added). Default 'grid-export'. */
13
+ defaultFilename?: string;
14
+ /** Formats offered. Default ['csv', 'json']. */
15
+ formats?: Array<'csv' | 'json'>;
16
+ }
17
+ /**
18
+ * The export subset for a column selection: drops `fileDrop` columns (no
19
+ * exportable value) and keeps only columns whose `key` is in `selectedKeys`.
20
+ * Pure — the dialog's column-picker decision, extracted for testability.
21
+ */
22
+ export declare function resolveExportColumns<T = Record<string, unknown>>(columns: ColumnDef<T>[], selectedKeys: ReadonlySet<string>): ColumnDef<T>[];
23
+ /**
24
+ * Export dialog with format choice, a column picker (Select-all / indeterminate),
25
+ * and a filename field. Exports the scoped `items` through `exportGrid`. The
26
+ * turnkey `GridProps.exportConfig` split-button opens this when `dialog: true`.
27
+ */
28
+ export declare function GridExportDialog<T extends Record<string, unknown>>({ isOpen, onClose, items, columns, defaultFilename, formats, }: GridExportDialogProps<T>): JSX.Element;
29
+ //# sourceMappingURL=GridExportDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridExportDialog.d.ts","sourceRoot":"","sources":["../../src/export/GridExportDialog.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACtE,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,qBAAqB;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wEAAwE;IACxE,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,8EAA8E;IAC9E,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gDAAgD;IAChD,OAAO,CAAC,EAAE,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC;CACjC;AAYD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9D,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,EACvB,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,GAChC,SAAS,CAAC,CAAC,CAAC,EAAE,CAEhB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAClE,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,eAA+B,EAC/B,OAAyB,GAC1B,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAmHxC"}
@@ -0,0 +1,17 @@
1
+ import type { ExportColumn, ExportFormat } from '@khester/dynamics-utils';
2
+ import type { ColumnDef } from '../types';
3
+ /**
4
+ * Map grid-kit columns → dynamics-utils `ExportColumn[]`.
5
+ * `ExportColumn.key` is the DATA field (so it reads `item[fieldName]`), and the
6
+ * export formatter expects a canonical field type — reuse `rendererToFieldType`
7
+ * rather than the grid-kit `rendererType` vocabulary. The grid-kit-native
8
+ * `fileDrop` column has no exportable value and is skipped.
9
+ */
10
+ export declare function toExportColumns<T = Record<string, unknown>>(columns: ColumnDef<T>[]): ExportColumn[];
11
+ /**
12
+ * Export grid rows to a CSV or JSON file (CSV = formatted strings, JSON = raw
13
+ * values — see dynamics-utils). The consumer passes exactly the rows to export
14
+ * (current page, all items, or the selection).
15
+ */
16
+ export declare function exportGrid<T extends Record<string, unknown>>(items: T[], columns: ColumnDef<T>[], format?: ExportFormat, filename?: string): void;
17
+ //# sourceMappingURL=exportGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exportGrid.d.ts","sourceRoot":"","sources":["../../src/export/exportGrid.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,YAAY,EAAE,CAQpG;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,KAAK,EAAE,CAAC,EAAE,EACV,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,EACvB,MAAM,GAAE,YAAoB,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI,CAEN"}
@@ -0,0 +1,4 @@
1
+ export { exportGrid, toExportColumns } from './exportGrid';
2
+ export { GridExportDialog, resolveExportColumns } from './GridExportDialog';
3
+ export type { GridExportDialogProps } from './GridExportDialog';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/export/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import type { CardGridProps } from '../types';
3
+ /**
4
+ * Card-view grid host. Renders each row as a card; every field value goes
5
+ * through the SAME cell registry as `<DataGrid>` (so status badges, currency,
6
+ * ratings, etc. look identical). Mirrors the Grid Customizer's "Card List" type.
7
+ *
8
+ * Selection is checkbox-based (manual Set), independent of Fluent's DetailsList
9
+ * Selection.
10
+ */
11
+ export declare function CardGrid<T extends Record<string, unknown>>(props: CardGridProps<T>): JSX.Element;
12
+ //# sourceMappingURL=CardGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardGrid.d.ts","sourceRoot":"","sources":["../../src/hosts/CardGrid.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,UAAU,CAAC;AASzD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA6GhG"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { GridProps } from '../types';
3
+ /**
4
+ * Flat / editable grid host built on Fluent v8 `ShimmeredDetailsList`. Columns
5
+ * come from the registry via `toDetailsListColumns`; inline edit-state from
6
+ * `useEditState` (per-cell click-to-edit by default). Card / grouped / nested
7
+ * layouts are separate hosts that reuse the same registry + render context.
8
+ */
9
+ export declare function DataGrid<T extends Record<string, unknown>>(props: GridProps<T>): JSX.Element;
10
+ //# sourceMappingURL=DataGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../src/hosts/DataGrid.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAe,SAAS,EAA2D,MAAM,UAAU,CAAC;AAiEhH;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA6S5F"}
@@ -0,0 +1,3 @@
1
+ /** `<DetailsGrid>` is a named alias of `<DataGrid>` for call-site readability. */
2
+ export { DataGrid as DetailsGrid } from './DataGrid';
3
+ //# sourceMappingURL=DetailsGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsGrid.d.ts","sourceRoot":"","sources":["../../src/hosts/DetailsGrid.tsx"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { FocusedViewGridProps } from '../types';
3
+ /**
4
+ * Focused-view / master-detail host. A left rail of summary items (each rendered
5
+ * from `focusedView.rows`) drives a right detail pane (the active record's
6
+ * `detailFields`, each value through the registry). When a `nested` config with
7
+ * `mode: 'detail-pane'` is supplied, the child grid renders inside the pane.
8
+ */
9
+ export declare function FocusedViewGrid<T extends Record<string, unknown>>(props: FocusedViewGridProps<T>): JSX.Element;
10
+ //# sourceMappingURL=FocusedViewGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FocusedViewGrid.d.ts","sourceRoot":"","sources":["../../src/hosts/FocusedViewGrid.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAa,oBAAoB,EAAoB,MAAM,UAAU,CAAC;AAyBlF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA+I9G"}
@@ -0,0 +1,36 @@
1
+ /// <reference types="react" />
2
+ import type { ColumnDef } from '../types';
3
+ import type { AggregateResult } from '../core';
4
+ /**
5
+ * Presentational aggregate row: one cell per column (text only for columns that
6
+ * declared an `aggregate`), constrained to each column's min/max width and offset
7
+ * by `leadingSpacer`. Shared by the grid footer and per-group subtotal footers.
8
+ *
9
+ * Column alignment vs the DetailsList's justified layout is approximate (a known
10
+ * visual limitation); `leadingSpacer` offsets leading control columns (selection
11
+ * checkbox, group-expand chevron).
12
+ */
13
+ export declare function AggregateRow<T extends Record<string, unknown>>(props: {
14
+ columns: ColumnDef<T>[];
15
+ aggregates: Record<string, AggregateResult>;
16
+ /** Left offset (px) to align with leading control columns. */
17
+ leadingSpacer?: number;
18
+ /** Row background tint (footer vs. group subtotal). */
19
+ background?: string;
20
+ }): JSX.Element;
21
+ /**
22
+ * Footer row of per-column aggregates, rendered as a sibling Stack BELOW the
23
+ * DetailsList (Fluent v8 has no first-class footer-row API; mirrors how
24
+ * GridPaginationFooter mounts).
25
+ *
26
+ * Aggregates over exactly the `items` passed — the displayed (filtered) page by
27
+ * default, or the full dataset when the host is given `aggregateItems` (cross-page
28
+ * grand totals). `leadingSpacer` offsets a leading selection-check column.
29
+ */
30
+ export declare function GridAggregateFooter<T extends Record<string, unknown>>(props: {
31
+ items: ReadonlyArray<T>;
32
+ columns: ColumnDef<T>[];
33
+ /** Left offset (px) to align with a leading control column (e.g. selection checkbox). */
34
+ leadingSpacer?: number;
35
+ }): JSX.Element;
36
+ //# sourceMappingURL=GridAggregateFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridAggregateFooter.d.ts","sourceRoot":"","sources":["../../src/hosts/GridAggregateFooter.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiC/C;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE;IACrE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,GAAG,CAAC,OAAO,CAoCd;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE;IAC5E,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,GAAG,CAAC,OAAO,CAId"}
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import type { ColumnDef } from '../types';
3
+ export interface GridColumnChooserProps<T extends Record<string, unknown>> {
4
+ /** Whether the panel is open. */
5
+ isOpen: boolean;
6
+ /** Close handler. */
7
+ onClose: () => void;
8
+ /** All grid columns. */
9
+ columns: ColumnDef<T>[];
10
+ /** Currently visible column keys, in display order. */
11
+ visibleOrder: string[];
12
+ /** Apply the new visible-and-ordered column keys. */
13
+ onApply: (visibleOrder: string[]) => void;
14
+ }
15
+ /**
16
+ * Project a column list to its visible, ordered subset per `visibleOrder` (keys
17
+ * not in `columns` are skipped; columns not in `visibleOrder` are hidden). Pure —
18
+ * the chooser's effect on the rendered grid, extracted for testability.
19
+ */
20
+ export declare function orderVisibleColumns<T = Record<string, unknown>>(columns: ColumnDef<T>[], visibleOrder: string[]): ColumnDef<T>[];
21
+ /**
22
+ * Column chooser panel: show/hide grid columns and reorder the shown ones.
23
+ * Edits a working copy and commits on Apply (reset on each open). At least one
24
+ * column must stay shown.
25
+ */
26
+ export declare function GridColumnChooser<T extends Record<string, unknown>>({ isOpen, onClose, columns, visibleOrder, onApply, }: GridColumnChooserProps<T>): JSX.Element;
27
+ //# sourceMappingURL=GridColumnChooser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridColumnChooser.d.ts","sourceRoot":"","sources":["../../src/hosts/GridColumnChooser.tsx"],"names":[],"mappings":";AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvE,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,qBAAqB;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wBAAwB;IACxB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,uDAAuD;IACvD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,qDAAqD;IACrD,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC3C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7D,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,EACvB,YAAY,EAAE,MAAM,EAAE,GACrB,SAAS,CAAC,CAAC,CAAC,EAAE,CAGhB;AAUD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACnE,MAAM,EACN,OAAO,EACP,OAAO,EACP,YAAY,EACZ,OAAO,GACR,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA8GzC"}
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ import type { ColumnDef } from '../types';
3
+ import { type FilterOperator, type GridFilterModel } from '../core/filter';
4
+ /** UI field-type buckets — drive which operators + value editor a column gets. */
5
+ export type FilterFieldType = 'text' | 'number' | 'currency' | 'date' | 'boolean' | 'optionset' | 'lookup';
6
+ /** Map a column's renderer type onto a filter field-type bucket. */
7
+ export declare function fieldTypeForRenderer(rendererType: string): FilterFieldType;
8
+ /** Operators for a field type, with display labels (date relabels gt/lt to After/Before). */
9
+ export declare function getOperatorsForFieldType(t: FilterFieldType): Array<{
10
+ op: FilterOperator;
11
+ label: string;
12
+ }>;
13
+ export interface GridFilterBuilderProps<T extends Record<string, unknown>> {
14
+ /** Whether the panel is open. */
15
+ isOpen: boolean;
16
+ /** Close handler. */
17
+ onClose: () => void;
18
+ /** All grid columns — the field picker offers those with `isFilterable !== false`. */
19
+ columns: ColumnDef<T>[];
20
+ /** The currently applied filter model (the panel resets a working copy to this on open). */
21
+ model: GridFilterModel;
22
+ /** Apply the built filter model. */
23
+ onApply: (model: GridFilterModel) => void;
24
+ }
25
+ /**
26
+ * Filter-builder panel: build field/operator/value conditions combined by All/Any
27
+ * (AND/OR). Edits a working copy and commits on Apply (reset on each open).
28
+ * Incomplete rows are dropped on Apply. The actual row filtering is done by the
29
+ * pure `applyFilters` (src/core/filter.ts); this panel only produces the model.
30
+ */
31
+ export declare function GridFilterBuilder<T extends Record<string, unknown>>({ isOpen, onClose, columns, model, onApply, }: GridFilterBuilderProps<T>): JSX.Element;
32
+ //# sourceMappingURL=GridFilterBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridFilterBuilder.d.ts","sourceRoot":"","sources":["../../src/hosts/GridFilterBuilder.tsx"],"names":[],"mappings":";AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EAIrB,MAAM,gBAAgB,CAAC;AAGxB,kFAAkF;AAClF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE3G,oEAAoE;AACpE,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,CAoB1E;AA+BD,6FAA6F;AAC7F,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,eAAe,GAAG,KAAK,CAAC;IAAE,EAAE,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAKzG;AAyLD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvE,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,qBAAqB;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,sFAAsF;IACtF,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,4FAA4F;IAC5F,KAAK,EAAE,eAAe,CAAC;IACvB,oCAAoC;IACpC,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAC3C;AAWD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACnE,MAAM,EACN,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,GACR,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAiGzC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { GridPaginationState } from '../types';
3
+ /**
4
+ * Presentational pager shared by all hosts. The consumer pre-slices `items` to
5
+ * the page; this only renders the page indicator + prev/next controls.
6
+ */
7
+ export declare const GridPaginationFooter: React.FC<{
8
+ pagination: GridPaginationState;
9
+ onPageChange?: (page: number) => void;
10
+ }>;
11
+ //# sourceMappingURL=GridPaginationFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridPaginationFooter.d.ts","sourceRoot":"","sources":["../../src/hosts/GridPaginationFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1C,UAAU,EAAE,mBAAmB,CAAC;IAChC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CA0BA,CAAC"}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { GroupedGridProps } from '../types';
3
+ /**
4
+ * Grouped grid host. Buckets rows by `group.groupBy` into a contiguous,
5
+ * ordered list and renders a Fluent v8 grouped `DetailsList` (collapsible
6
+ * groups + count badges), reusing the same columns/registry as `<DataGrid>`.
7
+ */
8
+ export declare function GroupedGrid<T extends Record<string, unknown>>(props: GroupedGridProps<T>): JSX.Element;
9
+ //# sourceMappingURL=GroupedGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupedGrid.d.ts","sourceRoot":"","sources":["../../src/hosts/GroupedGrid.tsx"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAqBjD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAwGtG"}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { ReadOnlyGridProps } from '../types';
3
+ /**
4
+ * Read-only grid: `<DataGrid>` with selection off, editing off, and command-bar
5
+ * commands stripped (search is kept). Mirrors the Grid Customizer's "Read-Only
6
+ * Grid" type — a presentation preset, no extra config.
7
+ */
8
+ export declare function ReadOnlyGrid<T extends Record<string, unknown>>(props: ReadOnlyGridProps<T>): JSX.Element;
9
+ //# sourceMappingURL=ReadOnlyGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReadOnlyGrid.d.ts","sourceRoot":"","sources":["../../src/hosts/ReadOnlyGrid.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAMxG"}
@@ -0,0 +1,14 @@
1
+ import type { IGroup } from '@fluentui/react';
2
+ import type { GroupConfig } from '../types';
3
+ /**
4
+ * Bucket rows by `group.groupBy` into a contiguous, ordered array plus the
5
+ * Fluent v8 `IGroup[]` describing each bucket's range. Fluent's grouped
6
+ * DetailsList requires the items array to be ordered so each group's
7
+ * `startIndex`/`count` is contiguous — this guarantees that. Pure + exported so
8
+ * it's unit-testable and reusable.
9
+ */
10
+ export declare function buildGroups<T extends Record<string, unknown>>(items: T[], group: GroupConfig<T>): {
11
+ orderedItems: T[];
12
+ groups: IGroup[];
13
+ };
14
+ //# sourceMappingURL=buildGroups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildGroups.d.ts","sourceRoot":"","sources":["../../src/hosts/buildGroups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GACpB;IAAE,YAAY,EAAE,CAAC,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CA+BzC"}
@@ -0,0 +1,22 @@
1
+ import type { CardConfig, ColumnDef } from '../types';
2
+ export declare const cardClass: string;
3
+ export declare const cardImageClass: string;
4
+ export declare const bodyRowClass: string;
5
+ /** Resolved card layout: which fields drive title/subtitle/image + the body columns. */
6
+ export interface ResolvedCardLayout<T> {
7
+ cardsPerRow: number;
8
+ titleField?: string;
9
+ subtitleField?: string;
10
+ imageField?: string;
11
+ cardHeight?: number;
12
+ byField: Map<string, ColumnDef<T>>;
13
+ bodyColumns: ColumnDef<T>[];
14
+ }
15
+ /**
16
+ * PURE derivation of a card layout from columns + config — no React hooks, so it's
17
+ * directly unit-testable. Hosts wrap the call in their own `useMemo`. titleField
18
+ * defaults to the first column; bodyColumns defaults to all columns except the
19
+ * title/subtitle/image fields (explicit `bodyFields` are honored verbatim).
20
+ */
21
+ export declare function resolveCardLayout<T>(columns: ColumnDef<T>[], card: CardConfig | undefined): ResolvedCardLayout<T>;
22
+ //# sourceMappingURL=cardLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cardLayout.d.ts","sourceRoot":"","sources":["../../src/hosts/cardLayout.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAOtD,eAAO,MAAM,SAAS,QASpB,CAAC;AAEH,eAAO,MAAM,cAAc,QAMzB,CAAC;AAEH,eAAO,MAAM,YAAY,QAMvB,CAAC;AAEH,wFAAwF;AACxF,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,EACvB,IAAI,EAAE,UAAU,GAAG,SAAS,GAC3B,kBAAkB,CAAC,CAAC,CAAC,CAmBvB"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { IStackProps } from '@fluentui/react';
3
+ /** Stack root styles for a host that should fill its container. `undefined` when not filling. */
4
+ export declare function fillStackStyles(fill?: boolean, height?: number | string): IStackProps['styles'];
5
+ /** Wraps the scrollable region (list/cards) so it grows + scrolls inside a `fill` host; passthrough otherwise. */
6
+ export declare const FillRegion: React.FC<{
7
+ fill?: boolean;
8
+ children: React.ReactNode;
9
+ }>;
10
+ //# sourceMappingURL=fill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../src/hosts/fill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAcnD,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAE/F;AAED,kHAAkH;AAClH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CACqB,CAAC"}
@@ -0,0 +1,19 @@
1
+ export { DataGrid } from './DataGrid';
2
+ export { DetailsGrid } from './DetailsGrid';
3
+ export { ReadOnlyGrid } from './ReadOnlyGrid';
4
+ export { CardGrid } from './CardGrid';
5
+ export { GroupedGrid } from './GroupedGrid';
6
+ export { buildGroups } from './buildGroups';
7
+ export { NestedGrid } from './nested/NestedGrid';
8
+ export { FocusedViewGrid } from './FocusedViewGrid';
9
+ export { useChildren } from './nested/useChildren';
10
+ export { GridToolbar } from './toolbar/GridToolbar';
11
+ export { GridColumnChooser, orderVisibleColumns } from './GridColumnChooser';
12
+ export type { GridColumnChooserProps } from './GridColumnChooser';
13
+ export { GridFilterBuilder, getOperatorsForFieldType, fieldTypeForRenderer } from './GridFilterBuilder';
14
+ export type { GridFilterBuilderProps, FilterFieldType } from './GridFilterBuilder';
15
+ export { GridPaginationFooter } from './GridPaginationFooter';
16
+ export { useEditState } from './useEditState';
17
+ export type { EditState } from './useEditState';
18
+ export { useGridContext } from './useGridContext';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hosts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxG,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import type { NestedGridProps } from '../../types';
3
+ import { GridRenderContext } from '../../adapters';
4
+ /**
5
+ * Card-parent nested grid (`parentLayout: 'cards'`): each parent row renders as a
6
+ * card that expands IN PLACE to reveal its child grid below the card fields. Reuses
7
+ * the shared card layout (`resolveCardLayout` + classes) for the card body and the
8
+ * lazy `useChildren` hook for child resolution (grid-kit never fetches). v8-only.
9
+ *
10
+ * `nested.mode` does NOT apply to card parents — `<NestedGrid>` routes here on
11
+ * `parentLayout === 'cards'` BEFORE the mode discriminator, so the side-panel /
12
+ * hover-callout trigger machinery is bypassed.
13
+ *
14
+ * v1 limitation: `childSelectionGating: 'requires-parent'` is unsupported here — cards
15
+ * use a manual checkbox `Set`, not a Fluent DetailsList `Selection` to gate against —
16
+ * so it's treated as `'independent'` with a one-time `console.warn`.
17
+ */
18
+ export declare function NestedCardParent<T extends Record<string, unknown>, C extends Record<string, unknown>>(props: {
19
+ parentProps: NestedGridProps<T, C>;
20
+ ctx: GridRenderContext<T>;
21
+ getKeyFn: (it: T) => string;
22
+ }): JSX.Element;
23
+ //# sourceMappingURL=NestedCardParent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NestedCardParent.d.ts","sourceRoot":"","sources":["../../../src/hosts/nested/NestedCardParent.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAkB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAUnE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,KAAK,EAAE;IACP,WAAW,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC;CAC7B,GAAG,GAAG,CAAC,OAAO,CAwNd"}
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import type { NestedGridProps } from '../../types';
3
+ /**
4
+ * Nested / expandable grid host. Dispatch order:
5
+ * 1. `parentLayout === 'cards'` — each parent is a card that expands in place
6
+ * (`<NestedCardParent>`); `mode` is ignored.
7
+ * Otherwise, parents are rows and child records surface per `nested.mode`:
8
+ * - `inline` — chevron expands the child grid under the row
9
+ * - `side-panel` — a trigger opens a Fluent Panel with the child grid
10
+ * - `hover-callout` — a count badge shows a compact callout of top-N rows
11
+ * - `detail-pane` — falls back to `side-panel` here (use `<FocusedViewGrid>`
12
+ * for true master-detail with a detail-pane child)
13
+ *
14
+ * grid-kit never fetches — `nested.getChildren(parent)` (sync or async) owns it.
15
+ */
16
+ export declare function NestedGrid<T extends Record<string, unknown> = Record<string, unknown>, C extends Record<string, unknown> = Record<string, unknown>>(props: NestedGridProps<T, C>): JSX.Element;
17
+ //# sourceMappingURL=NestedGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NestedGrid.d.ts","sourceRoot":"","sources":["../../../src/hosts/nested/NestedGrid.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,aAAa,CAAC;AAQ9D;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CACxB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,KAAK,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA8B3C"}
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import type { NestedGridProps } from '../../types';
3
+ import { GridRenderContext } from '../../adapters';
4
+ /**
5
+ * Inline nested grid: a chevron column expands each parent row to reveal its
6
+ * child grid indented beneath (Fluent `onRenderRow`). Children resolve lazily on
7
+ * first expand.
8
+ *
9
+ * Known limitation: an expanded row's height varies with its child grid, which
10
+ * defeats Fluent v8 DetailsList row-height virtualization — fine for typical
11
+ * subgrid sizes; for very large parent lists prefer side-panel / hover-callout.
12
+ */
13
+ export declare function NestedInline<T extends Record<string, unknown>, C extends Record<string, unknown>>(props: {
14
+ parentProps: NestedGridProps<T, C>;
15
+ ctx: GridRenderContext<T>;
16
+ getKeyFn: (it: T) => string;
17
+ }): JSX.Element;
18
+ //# sourceMappingURL=NestedInline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NestedInline.d.ts","sourceRoot":"","sources":["../../../src/hosts/nested/NestedInline.tsx"],"names":[],"mappings":";AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAwB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAiBzE;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE;IACxG,WAAW,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC;CAC7B,GAAG,GAAG,CAAC,OAAO,CAyMd"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import type { NestedConfig } from '../../types';
3
+ /**
4
+ * Per-parent-row trigger cell for `side-panel` and `hover-callout` nested modes.
5
+ * Children are resolved **lazily** — on click (panel) or first hover (callout) —
6
+ * so a 50-row page doesn't fire 50 fetches up front.
7
+ */
8
+ export declare function NestedTriggerCell<T extends Record<string, unknown>, C extends Record<string, unknown>>(props: {
9
+ parent: T;
10
+ nested: NestedConfig<T, C>;
11
+ }): JSX.Element;
12
+ //# sourceMappingURL=NestedTriggerCell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NestedTriggerCell.d.ts","sourceRoot":"","sources":["../../../src/hosts/nested/NestedTriggerCell.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAUhD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE;IAC7G,MAAM,EAAE,CAAC,CAAC;IACV,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC5B,GAAG,GAAG,CAAC,OAAO,CAsHd"}
@@ -0,0 +1,10 @@
1
+ import { PanelType } from '@fluentui/react';
2
+ /**
3
+ * Resolve a nested trigger label, substituting the `{count}` token. When the
4
+ * count isn't known yet (children not loaded), the token is dropped and extra
5
+ * whitespace collapsed (e.g. "View {count} related" → "View related").
6
+ */
7
+ export declare function formatTriggerLabel(label: string | undefined, count: number | undefined): string;
8
+ /** Map a side-panel size token to a Fluent v8 `PanelType`. */
9
+ export declare function panelTypeFor(size: 'small' | 'medium' | 'large' | undefined): PanelType;
10
+ //# sourceMappingURL=labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/hosts/nested/labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAM/F;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAEtF"}
@@ -0,0 +1,15 @@
1
+ export interface ChildEntry<C> {
2
+ loading: boolean;
3
+ rows: C[];
4
+ }
5
+ /**
6
+ * Lazily resolves a nested grid's children per parent row. `getChildren` may
7
+ * return a sync array or a promise; results are cached by row key. grid-kit
8
+ * never fetches — this just normalizes the consumer-supplied resolver and tracks
9
+ * loading. Call `ensure(key, parent)` on demand (row expand / panel open / hover).
10
+ */
11
+ export declare function useChildren<T, C>(getChildren: (parent: T) => C[] | Promise<C[]>): {
12
+ get: (key: string) => ChildEntry<C> | undefined;
13
+ ensure: (key: string, parent: T) => void;
14
+ };
15
+ //# sourceMappingURL=useChildren.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChildren.d.ts","sourceRoot":"","sources":["../../../src/hosts/nested/useChildren.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,CAAC,EAAE,CAAC;CACX;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;eA8BhD,MAAM,KAAG,WAAW,CAAC,CAAC,GAAG,SAAS;kBAfxD,MAAM,UAAU,CAAC;EAkB1B"}
@@ -0,0 +1,11 @@
1
+ import type { IContextualMenuItem } from '@fluentui/react';
2
+ import type { RowCommand } from '../types';
3
+ /**
4
+ * Pure projection of a row's `RowCommand[]` → Fluent `ContextualMenu` items for a
5
+ * given row. Commands whose `visible(item)` returns `false` are dropped; `disabled`
6
+ * is resolved per row; `onClick` is bound to the row and chained with `onAfter`
7
+ * (used by the host to dismiss the menu). No React / no rendering — unit-testable in
8
+ * grid-kit's node test env (the type-only Fluent import has no runtime cost).
9
+ */
10
+ export declare function buildRowMenuItems<T>(commands: RowCommand<T>[], item: T, onAfter: () => void): IContextualMenuItem[];
11
+ //# sourceMappingURL=rowContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rowContextMenu.d.ts","sourceRoot":"","sources":["../../src/hosts/rowContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,EACzB,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,MAAM,IAAI,GAClB,mBAAmB,EAAE,CAavB"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { GridToolbarConfig } from '../../types';
3
+ /**
4
+ * Grid toolbar: a command bar (left) + optional search box (right).
5
+ */
6
+ export declare const GridToolbar: React.FC<{
7
+ config: GridToolbarConfig;
8
+ }>;
9
+ //# sourceMappingURL=GridToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridToolbar.d.ts","sourceRoot":"","sources":["../../../src/hosts/toolbar/GridToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAmC/D,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Inline edit-state for the grid: per-cell edited values, dirty flags,
3
+ * validation errors, and the single active edit cell (for per-cell
4
+ * click-to-edit). The dirty/validation pattern mirrors the canonical editable
5
+ * cells (`EditableTextCell` et al.).
6
+ */
7
+ export interface EditState {
8
+ onValueChange: (rowKey: string, fieldName: string, value: unknown, originalValue: unknown) => void;
9
+ onValidationError: (rowKey: string, fieldName: string, message: string | undefined) => void;
10
+ isDirty: (rowKey: string, fieldName: string) => boolean;
11
+ getEditedValue: (rowKey: string, fieldName: string) => unknown;
12
+ getError: (rowKey: string, fieldName: string) => string | undefined;
13
+ /** True when this cell is the one currently being edited (click-to-edit). */
14
+ isActiveCell: (rowKey: string, fieldName: string) => boolean;
15
+ /** Make a cell the active edit cell. */
16
+ setActiveCell: (rowKey: string, fieldName: string) => void;
17
+ /** Exit edit mode (no active cell). */
18
+ clearActiveCell: () => void;
19
+ /** All edits as `{ [rowKey]: { [fieldName]: value } }`. */
20
+ getChanges: () => Record<string, Record<string, unknown>>;
21
+ hasErrors: boolean;
22
+ reset: () => void;
23
+ }
24
+ export declare function useEditState(): EditState;
25
+ //# sourceMappingURL=useEditState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEditState.d.ts","sourceRoot":"","sources":["../../src/hosts/useEditState.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IACnG,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5F,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IACxD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/D,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACpE,6EAA6E;IAC7E,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7D,wCAAwC;IACxC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,uCAAuC;IACvC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,2DAA2D;IAC3D,UAAU,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1D,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAID,wBAAgB,YAAY,IAAI,SAAS,CA4FxC"}
@@ -0,0 +1,15 @@
1
+ import type { GridProps } from '../types';
2
+ import { GridRenderContext } from '../adapters';
3
+ import type { EditState } from './useEditState';
4
+ /**
5
+ * Builds the per-render `GridRenderContext` shared by every grid host
6
+ * (DataGrid, CardGrid, GroupedGrid, …). Resolves the registry + key accessor,
7
+ * threads edit-state, and wires per-cell click-to-edit so all hosts behave
8
+ * identically. Extracted from DataGrid so the hosts don't each re-implement it.
9
+ */
10
+ export declare function useGridContext<T extends Record<string, unknown>>(props: Pick<GridProps<T>, 'registry' | 'editable' | 'editTrigger' | 'sort' | 'onSortChange' | 'getKey' | 'onValueChange' | 'navigateTo'>, edit: EditState): {
11
+ registry: GridRenderContext<T>['registry'];
12
+ getKeyFn: (it: T) => string;
13
+ ctx: GridRenderContext<T>;
14
+ };
15
+ //# sourceMappingURL=useGridContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGridContext.d.ts","sourceRoot":"","sources":["../../src/hosts/useGridContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAiB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9D,KAAK,EAAE,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,EACZ,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,MAAM,GAAG,cAAc,GAAG,QAAQ,GAAG,eAAe,GAAG,YAAY,CAC9G,EACD,IAAI,EAAE,SAAS,GACd;IAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC;IAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;CAAE,CAiCxG"}