@olvnck/ingrid 0.0.0-stage → 0.15.21

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 (220) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +5535 -2
  4. package/THIRD_PARTY_NOTICES.md +10 -0
  5. package/dist/engine/clipboard/copy.d.ts +40 -0
  6. package/dist/engine/clipboard/options.d.ts +16 -0
  7. package/dist/engine/clipboard/text.d.ts +32 -0
  8. package/dist/engine/columns/autosize.d.ts +43 -0
  9. package/dist/engine/columns/dataType.d.ts +30 -0
  10. package/dist/engine/columns/fold.d.ts +48 -0
  11. package/dist/engine/columns/layout.d.ts +150 -0
  12. package/dist/engine/columns/model.d.ts +369 -0
  13. package/dist/engine/columns/query.d.ts +16 -0
  14. package/dist/engine/columns/tooltips.d.ts +27 -0
  15. package/dist/engine/data/client/clientSource.d.ts +151 -0
  16. package/dist/engine/data/client/columnFilters.d.ts +106 -0
  17. package/dist/engine/data/client/descendants.d.ts +35 -0
  18. package/dist/engine/data/client/diff.d.ts +23 -0
  19. package/dist/engine/data/client/fields.d.ts +70 -0
  20. package/dist/engine/data/client/filter.d.ts +95 -0
  21. package/dist/engine/data/client/flatten.d.ts +141 -0
  22. package/dist/engine/data/client/groupSize.d.ts +14 -0
  23. package/dist/engine/data/client/hierarchy.d.ts +85 -0
  24. package/dist/engine/data/client/order.d.ts +32 -0
  25. package/dist/engine/data/client/pipeline.d.ts +277 -0
  26. package/dist/engine/data/client/remap.d.ts +33 -0
  27. package/dist/engine/data/client/trees.d.ts +41 -0
  28. package/dist/engine/data/client/types.d.ts +173 -0
  29. package/dist/engine/data/memory/generate.d.ts +36 -0
  30. package/dist/engine/data/memory/memoryDatasource.d.ts +46 -0
  31. package/dist/engine/data/rowKey.d.ts +15 -0
  32. package/dist/engine/data/server/contract.d.ts +64 -0
  33. package/dist/engine/data/server/expansion.d.ts +35 -0
  34. package/dist/engine/data/server/levelStore.d.ts +99 -0
  35. package/dist/engine/data/server/loader.d.ts +128 -0
  36. package/dist/engine/data/server/reader.d.ts +88 -0
  37. package/dist/engine/data/server/response.d.ts +31 -0
  38. package/dist/engine/data/server/serverSource.d.ts +130 -0
  39. package/dist/engine/data/shared/aggregate.d.ts +12 -0
  40. package/dist/engine/data/shared/columnFilter.d.ts +19 -0
  41. package/dist/engine/data/shared/compare.d.ts +12 -0
  42. package/dist/engine/data/shared/dateParts.d.ts +19 -0
  43. package/dist/engine/data/shared/distinct.d.ts +30 -0
  44. package/dist/engine/data/shared/filterRecord.d.ts +7 -0
  45. package/dist/engine/data/shared/keys.d.ts +17 -0
  46. package/dist/engine/data/shared/quickFilter.d.ts +17 -0
  47. package/dist/engine/data/shared/sourceUtils.d.ts +11 -0
  48. package/dist/engine/data/shared/splice.d.ts +9 -0
  49. package/dist/engine/detail/builds.d.ts +26 -0
  50. package/dist/engine/detail/content.d.ts +24 -0
  51. package/dist/engine/detail/controller.d.ts +176 -0
  52. package/dist/engine/detail/events.d.ts +11 -0
  53. package/dist/engine/detail/follow.d.ts +56 -0
  54. package/dist/engine/detail/layer.d.ts +119 -0
  55. package/dist/engine/detail/live.d.ts +96 -0
  56. package/dist/engine/detail/options.d.ts +53 -0
  57. package/dist/engine/detail/state.d.ts +140 -0
  58. package/dist/engine/edit/clear.d.ts +20 -0
  59. package/dist/engine/edit/editing.d.ts +4 -0
  60. package/dist/engine/edit/editors/date.d.ts +3 -0
  61. package/dist/engine/edit/editors/index.d.ts +23 -0
  62. package/dist/engine/edit/editors/internals.d.ts +25 -0
  63. package/dist/engine/edit/editors/largeText.d.ts +2 -0
  64. package/dist/engine/edit/editors/number.d.ts +4 -0
  65. package/dist/engine/edit/editors/select.d.ts +2 -0
  66. package/dist/engine/edit/editors/text.d.ts +15 -0
  67. package/dist/engine/edit/fill.d.ts +47 -0
  68. package/dist/engine/edit/fillHandle.d.ts +66 -0
  69. package/dist/engine/edit/fillValues.d.ts +15 -0
  70. package/dist/engine/edit/operations.d.ts +68 -0
  71. package/dist/engine/edit/paste.d.ts +23 -0
  72. package/dist/engine/edit/pastePlan.d.ts +17 -0
  73. package/dist/engine/edit/popupHost.d.ts +63 -0
  74. package/dist/engine/edit/session.d.ts +52 -0
  75. package/dist/engine/edit/types.d.ts +234 -0
  76. package/dist/engine/edit/undo.d.ts +38 -0
  77. package/dist/engine/edit/validation.d.ts +10 -0
  78. package/dist/engine/edit/values.d.ts +38 -0
  79. package/dist/engine/export/columns.d.ts +19 -0
  80. package/dist/engine/export/deliver.d.ts +47 -0
  81. package/dist/engine/export/dsv.d.ts +2 -0
  82. package/dist/engine/export/expanded.d.ts +69 -0
  83. package/dist/engine/export/export.d.ts +25 -0
  84. package/dist/engine/export/headers.d.ts +15 -0
  85. package/dist/engine/export/options.d.ts +19 -0
  86. package/dist/engine/export/plan.d.ts +43 -0
  87. package/dist/engine/export/values.d.ts +33 -0
  88. package/dist/engine/export/walk.d.ts +31 -0
  89. package/dist/engine/export/writer.d.ts +62 -0
  90. package/dist/engine/export/xlsx/cells.d.ts +31 -0
  91. package/dist/engine/export/xlsx/index.d.ts +12 -0
  92. package/dist/engine/export/xlsx/parts.d.ts +36 -0
  93. package/dist/engine/export/xlsx/sheet.d.ts +30 -0
  94. package/dist/engine/export/xlsx/styles.d.ts +15 -0
  95. package/dist/engine/export/xlsx/table.d.ts +8 -0
  96. package/dist/engine/export/xlsx/zip.d.ts +24 -0
  97. package/dist/engine/filter/groupFilter.d.ts +28 -0
  98. package/dist/engine/filter/model.d.ts +235 -0
  99. package/dist/engine/filter/shorthand.d.ts +36 -0
  100. package/dist/engine/filter/state.d.ts +76 -0
  101. package/dist/engine/filter/summary.d.ts +16 -0
  102. package/dist/engine/filter/values.d.ts +40 -0
  103. package/dist/engine/find/index.d.ts +94 -0
  104. package/dist/engine/find/match.d.ts +38 -0
  105. package/dist/engine/find/model.d.ts +115 -0
  106. package/dist/engine/grid.d.ts +42 -0
  107. package/dist/engine/i18n/numbers.d.ts +34 -0
  108. package/dist/engine/i18n/texts.d.ts +306 -0
  109. package/dist/engine/interact/autoScroll.d.ts +11 -0
  110. package/dist/engine/interact/body.d.ts +41 -0
  111. package/dist/engine/interact/focus.d.ts +158 -0
  112. package/dist/engine/interact/header.d.ts +216 -0
  113. package/dist/engine/interact/host.d.ts +400 -0
  114. package/dist/engine/interact/keyboard.d.ts +20 -0
  115. package/dist/engine/interact/menuKey.d.ts +7 -0
  116. package/dist/engine/interact/own.d.ts +2 -0
  117. package/dist/engine/interact/ranges.d.ts +68 -0
  118. package/dist/engine/interact/rowSelection.d.ts +53 -0
  119. package/dist/engine/interact/shortcut.d.ts +21 -0
  120. package/dist/engine/interact/tooltips.d.ts +63 -0
  121. package/dist/engine/measure.d.ts +30 -0
  122. package/dist/engine/render/cells.d.ts +322 -0
  123. package/dist/engine/render/columns.d.ts +28 -0
  124. package/dist/engine/render/dom.d.ts +24 -0
  125. package/dist/engine/render/flash.d.ts +74 -0
  126. package/dist/engine/render/groupCell.d.ts +50 -0
  127. package/dist/engine/render/groupPanel.d.ts +21 -0
  128. package/dist/engine/render/header.d.ts +162 -0
  129. package/dist/engine/render/overlay.d.ts +15 -0
  130. package/dist/engine/render/pinnedRows.d.ts +106 -0
  131. package/dist/engine/render/rowPool.d.ts +3 -0
  132. package/dist/engine/render/scrollbars.d.ts +77 -0
  133. package/dist/engine/render/strategy.d.ts +397 -0
  134. package/dist/engine/reportError.d.ts +7 -0
  135. package/dist/engine/rowdrag/controller.d.ts +80 -0
  136. package/dist/engine/rowdrag/events.d.ts +17 -0
  137. package/dist/engine/rowdrag/gesture.d.ts +33 -0
  138. package/dist/engine/rowdrag/keys.d.ts +21 -0
  139. package/dist/engine/rowdrag/model.d.ts +67 -0
  140. package/dist/engine/rowdrag/options.d.ts +34 -0
  141. package/dist/engine/rowdrag/rows.d.ts +61 -0
  142. package/dist/engine/rowdrag/target.d.ts +59 -0
  143. package/dist/engine/rowdrag/zones.d.ts +79 -0
  144. package/dist/engine/schedule.d.ts +29 -0
  145. package/dist/engine/selection/aggregate.d.ts +30 -0
  146. package/dist/engine/selection/options.d.ts +7 -0
  147. package/dist/engine/selection/rangeRows.d.ts +19 -0
  148. package/dist/engine/selection/ranges.d.ts +114 -0
  149. package/dist/engine/selection/rows.d.ts +207 -0
  150. package/dist/engine/source.d.ts +225 -0
  151. package/dist/engine/synthetic.d.ts +28 -0
  152. package/dist/engine/table/cells.d.ts +52 -0
  153. package/dist/engine/table/headers.d.ts +20 -0
  154. package/dist/engine/table/host.d.ts +65 -0
  155. package/dist/engine/table/job.d.ts +21 -0
  156. package/dist/engine/table/rows.d.ts +99 -0
  157. package/dist/engine/table/slicer.d.ts +54 -0
  158. package/dist/engine/table/takes.d.ts +145 -0
  159. package/dist/engine/types.d.ts +2950 -0
  160. package/dist/engine/ui/announce.d.ts +7 -0
  161. package/dist/engine/ui/chooser.d.ts +19 -0
  162. package/dist/engine/ui/columnList.d.ts +41 -0
  163. package/dist/engine/ui/columnMenu.d.ts +96 -0
  164. package/dist/engine/ui/columnsPanel.d.ts +16 -0
  165. package/dist/engine/ui/contextMenu.d.ts +48 -0
  166. package/dist/engine/ui/controller.d.ts +295 -0
  167. package/dist/engine/ui/filters/apply.d.ts +53 -0
  168. package/dist/engine/ui/filters/custom.d.ts +3 -0
  169. package/dist/engine/ui/filters/date.d.ts +12 -0
  170. package/dist/engine/ui/filters/host.d.ts +102 -0
  171. package/dist/engine/ui/filters/multi.d.ts +6 -0
  172. package/dist/engine/ui/filters/number.d.ts +15 -0
  173. package/dist/engine/ui/filters/numberMask.d.ts +15 -0
  174. package/dist/engine/ui/filters/set.d.ts +3 -0
  175. package/dist/engine/ui/filters/simple.d.ts +52 -0
  176. package/dist/engine/ui/filters/text.d.ts +5 -0
  177. package/dist/engine/ui/filtersPanel.d.ts +18 -0
  178. package/dist/engine/ui/floating.d.ts +66 -0
  179. package/dist/engine/ui/floatingShorthand.d.ts +20 -0
  180. package/dist/engine/ui/floatingTypes.d.ts +82 -0
  181. package/dist/engine/ui/icons.d.ts +25 -0
  182. package/dist/engine/ui/menu.d.ts +45 -0
  183. package/dist/engine/ui/overlayHost.d.ts +7 -0
  184. package/dist/engine/ui/place.d.ts +37 -0
  185. package/dist/engine/ui/popup.d.ts +97 -0
  186. package/dist/engine/ui/sideBar.d.ts +26 -0
  187. package/dist/engine/ui/statusBar.d.ts +29 -0
  188. package/dist/engine/ui/toolbar/buttons.d.ts +21 -0
  189. package/dist/engine/ui/toolbar/chipState.d.ts +52 -0
  190. package/dist/engine/ui/toolbar/chips.d.ts +23 -0
  191. package/dist/engine/ui/toolbar/findBox.d.ts +10 -0
  192. package/dist/engine/ui/toolbar/quickFilterBox.d.ts +12 -0
  193. package/dist/engine/ui/toolbar/registry.d.ts +5 -0
  194. package/dist/engine/ui/toolbar/toolbar.d.ts +31 -0
  195. package/dist/engine/ui/toolbar/types.d.ts +23 -0
  196. package/dist/engine/ui/tooltip.d.ts +34 -0
  197. package/dist/engine/ui/virtualList.d.ts +35 -0
  198. package/dist/engine/viewport/heightView.d.ts +62 -0
  199. package/dist/engine/viewport/heights.d.ts +39 -0
  200. package/dist/engine/viewport/intervals.d.ts +19 -0
  201. package/dist/engine/viewport/range.d.ts +51 -0
  202. package/dist/engine/viewport/scroll.d.ts +45 -0
  203. package/dist/engine/viewport/stack.d.ts +160 -0
  204. package/dist/grid-C34VEap6.js +32310 -0
  205. package/dist/index.d.ts +19 -0
  206. package/dist/index.js +1273 -0
  207. package/dist/ingrid.css +1 -0
  208. package/dist/internal.d.ts +13 -0
  209. package/dist/internal.js +1 -0
  210. package/dist/locale/de.d.ts +4 -0
  211. package/dist/locale/de.js +222 -0
  212. package/dist/themes/primevue.css +63 -0
  213. package/dist/themes/tailwind.css +68 -0
  214. package/dist/vue/InGrid.vue.d.ts +263 -0
  215. package/dist/vue/stableOptions.d.ts +8 -0
  216. package/dist/vue/useClientSource.d.ts +28 -0
  217. package/dist/vue/useServerSource.d.ts +8 -0
  218. package/dist/vue/vueRenderer.d.ts +164 -0
  219. package/dist/xlsx-59umS_n_.js +325 -0
  220. package/package.json +78 -5
@@ -0,0 +1,263 @@
1
+ import { type FilterDefaults, type FilterModel } from '../engine/filter/model';
2
+ import type { LocaleOptions } from '../engine/i18n/texts';
3
+ import type { ViewportSource } from '../engine/source';
4
+ import type { CellEditEvent, CellEditRequest, CellEditStopEvent, CellKeyEvent, CellPointerEvent, CellRange, CellValueChange, ColumnDefaults, ColumnGroupState, ColumnGroupToggle, ColumnNode, ColumnState, ColumnStateChange, DetailToggle, DragOutOptions, EditOperation, FilterChange, FindChange, FocusChange, Grid, GridOptions, GroupColumnOptions, PopupChange, RangeChange, RowDragEnd, RowDragMove, RowDragStart, RowDrop, RowNumbersOptions, RowSelectionState, SelectionChange, StatusPanelId } from '../engine/types';
5
+ import { type StatusPanelSlotDef } from './vueRenderer';
6
+ interface Props {
7
+ columns: ColumnNode[];
8
+ rows: ViewportSource;
9
+ /**
10
+ * Computed row height; a new function re-evaluates the heights (the first visible row stays in place). Pass a
11
+ * stable function (defined once), not an inline arrow: an inline arrow is a new function on every parent render
12
+ * and drops every known row height each time.
13
+ */
14
+ rowHeight?: GridOptions['rowHeight'];
15
+ /** Read once at mount: later changes are ignored (Vue dev builds warn once). */
16
+ overscan?: GridOptions['overscan'];
17
+ /** Accessible name of the grid; reactive (e.g. a translated string). */
18
+ ariaLabel?: string;
19
+ /**
20
+ * Merged under every column definition; reactive (a changed value applies, an equal new object does not). Keep
21
+ * function-valued keys stable (`format`, renderer objects built by hand; the `component*` factories' results are
22
+ * memoised): an inline function is a changed value on every parent render and reconfigures the grid each time.
23
+ */
24
+ defaultColumn?: ColumnDefaults;
25
+ /** The grid-owned row-number column; reactive like `defaultColumn` (keep a `value` function stable likewise). */
26
+ rowNumbers?: boolean | RowNumbersOptions;
27
+ /**
28
+ * `v-model:column-state`. Applied at mount and whenever its value changes, with `{ order: true }`; a value equal to
29
+ * the last emitted state (the v-model echo) is not applied again.
30
+ */
31
+ columnState?: ColumnState[];
32
+ /**
33
+ * `v-model:column-group-state`: the column groups' open states. Applied at mount and whenever its value
34
+ * changes, after new `columns` and `columnState` of the same tick; a value equal to the last emitted state (the
35
+ * v-model echo) is not applied again.
36
+ */
37
+ columnGroupState?: ColumnGroupState[];
38
+ /**
39
+ * The grid-owned group column; by value like `defaultColumn` (keep a `renderer` stable likewise).
40
+ * The `#group` slot replaces its label unless a `renderer` is given, `#group-header` its header content unless a
41
+ * `headerRenderer` is; `#group-filter` and `#group-floating-filter` draw its `filter` as for a column.
42
+ */
43
+ groupColumn?: GroupColumnOptions;
44
+ /** The row group panel: `true` always, `'onlyWhenGrouping'` while rows are grouped. */
45
+ groupPanel?: boolean | 'onlyWhenGrouping';
46
+ /**
47
+ * The quick-filter text: words, all of which a row must contain in a column that is not hidden (columns a
48
+ * closed group does not show are still searched); '' or absent: off. `v-model:quick-filter`: the text is
49
+ * emitted as `update:quickFilter` after every change, the toolbar's box included.
50
+ */
51
+ quickFilter?: string;
52
+ /**
53
+ * Find: the cells' shown texts that contain this text are marked; '' or absent: off. The exposed
54
+ * `api` moves the active match (`findNext`, `findPrevious`, `findGoTo`), opening its groups and scrolling it in
55
+ * without taking the focus; `findChange` reports the count. `v-model:find`: `update:find` carries the text,
56
+ * once its count is complete (on a large grid a few frames after the key).
57
+ */
58
+ find?: string;
59
+ /** Find's options (`{ caseSensitive }`, default false); by value. */
60
+ findOptions?: GridOptions['findOptions'];
61
+ /**
62
+ * Class name(s) per body row; a new function re-evaluates the rendered rows. Pass a stable function (defined
63
+ * once), not an inline arrow: an inline arrow is a new function on every parent render and re-binds every rendered
64
+ * row each time.
65
+ */
66
+ rowClass?: GridOptions['rowClass'];
67
+ /**
68
+ * Rows of the app's own objects pinned above the body, under the header: drawn in array order, never
69
+ * sorted, filtered or counted. Watched: a new array draws the section again (an inline literal is a new array on
70
+ * every parent render, drawn again each time); after changing a pinned object or the array in place, pass a new
71
+ * array (or call `api.setPinnedTopRows` with the same one). `[]` or absent: none.
72
+ */
73
+ pinnedTopRows?: readonly object[];
74
+ /** As `pinnedTopRows`, pinned below the body, at the grid's bottom edge. */
75
+ pinnedBottomRows?: readonly object[];
76
+ /**
77
+ * `v-model:filter-model`: column id → applied model, as `Grid.getFilterModel()`. Applied at mount
78
+ * (before the first query) and whenever its value changes, with `setFilterModel` (unlisted columns are cleared:
79
+ * `{}` clears every filter), after new `columns`, `groupColumn`, `filterDefaults` and `columnState` of the same
80
+ * tick; a value equal to the last emitted model (the v-model echo) is not applied again.
81
+ */
82
+ filterModel?: FilterModel;
83
+ /** Merged under every built-in filter definition, e.g. `{ maxConditions: 99 }`; by value. */
84
+ filterDefaults?: FilterDefaults;
85
+ /** The column menu's grid-wide entries and button mode; by value (keep a builder stable). */
86
+ columnMenu?: GridOptions['columnMenu'];
87
+ /** Replacements for the header icons; by value. */
88
+ icons?: GridOptions['icons'];
89
+ /** The styled tooltips' delays and modes; by value. */
90
+ tooltips?: GridOptions['tooltips'];
91
+ /** The context menu; absent = on, as in the grid; by value like `columnMenu`. */
92
+ contextMenu?: GridOptions['contextMenu'];
93
+ /** The side bar; by value. A custom panel without a `renderer` is drawn by `#tool-panel-<id>`. */
94
+ sideBar?: GridOptions['sideBar'];
95
+ /** The status bar; by value. An entry without `panel` is drawn by `#status-panel-<key>`. */
96
+ statusBar?: boolean | {
97
+ panels: readonly (StatusPanelId | StatusPanelSlotDef)[];
98
+ };
99
+ /**
100
+ * The top bar; by value through `setToolbar`, which keeps an item whose key and kind are
101
+ * unchanged. Two functions count as equal: an inline object re-rendered with new functions only applies
102
+ * nothing, and a click calls the newest render's function; renderer objects and components compare by identity.
103
+ * A def without `item` is drawn by `#toolbar-item-<key>` (`ToolbarItemSlotProps`); a slot added after the
104
+ * bar was set is picked up on the prop's next change. Detail grids don't inherit it; a detail's own `toolbar` option
105
+ * takes none of this component's slots.
106
+ */
107
+ toolbar?: GridOptions['toolbar'];
108
+ /** Texts and number format; a changed value re-renders every grid-drawn text. By value. */
109
+ locale?: LocaleOptions;
110
+ /** The body's placeholder, "No rows to show" / "No columns to show"; absent = on, as in the grid. */
111
+ noRowsOverlay?: boolean;
112
+ /** Dragging a header out of the grid hides its columns, `{ distance }` past that distance; by value. */
113
+ dragOutHides?: boolean | DragOutOptions;
114
+ /**
115
+ * Columns slide into place: a move from the header, a group folding, a column hidden or shown; `'always'`
116
+ * even under prefers-reduced-motion; by value.
117
+ */
118
+ animateColumnMoves?: boolean | 'always';
119
+ /** Open group rows stick under the header; by value. */
120
+ stickyGroupRows?: boolean;
121
+ /**
122
+ * Client data: each open group's total row, first (`'top'`) or last (`'bottom'`); a function answers per
123
+ * group. Through `setGroupTotalRow`; keep a function stable: a new one is applied again (the rows run again).
124
+ */
125
+ groupTotalRow?: GridOptions['groupTotalRow'];
126
+ /** Client data: the grand total's place; through `setGrandTotalRow`. */
127
+ grandTotalRow?: GridOptions['grandTotalRow'];
128
+ /** Which total rows stick (default `true`); through `setStickyTotalRows`. */
129
+ stickyTotalRows?: boolean | 'grand' | 'group';
130
+ /** An open group's row keeps its sums beside its total row (default `false`); `setKeepGroupValues`. */
131
+ keepGroupValues?: boolean;
132
+ /** Keys that expand / collapse every group; by value. */
133
+ groupKeys?: boolean | {
134
+ expandAll?: string;
135
+ collapseAll?: string;
136
+ };
137
+ /** When the scrollbars show: `{ vertical: 'always' }` keeps the bar, drawn where the platform's overlay. */
138
+ scrollbars?: GridOptions['scrollbars'];
139
+ /** Row selection; by value through `setRowSelection`. */
140
+ rowSelection?: GridOptions['rowSelection'];
141
+ /**
142
+ * `v-model:selection`: the selected ids, as `Grid.getSelection()`. Applied at mount (creation
143
+ * option) and when its value differs from the previous one, the last emitted one and the grid's current selection:
144
+ * the v-model echo and an equal inline literal re-rendered apply nothing.
145
+ */
146
+ selection?: RowSelectionState;
147
+ /** Cell selection; by value through `setCellSelection`. */
148
+ cellSelection?: GridOptions['cellSelection'];
149
+ /**
150
+ * `v-model:cellRanges`: the ranges, as `Grid.getCellRanges()`. The initial value is the creation option;
151
+ * later values apply when they differ from the previous one, the last emitted one and `getCellRanges()`: the echo
152
+ * of an emitted value and an equal inline literal re-rendered apply nothing.
153
+ */
154
+ cellRanges?: readonly CellRange[];
155
+ /** Copy options; by value. */
156
+ clipboard?: GridOptions['clipboard'];
157
+ /** Export options; by value. */
158
+ export?: GridOptions['export'];
159
+ /** Cell focus: `true`, `false` or `'row'`; absent = the grid's default. */
160
+ cellFocus?: GridOptions['cellFocus'];
161
+ /** Whether header cells take focus; absent = the grid's default. */
162
+ headerFocus?: boolean;
163
+ /** Native text selection in cells; absent = the grid's default. */
164
+ textSelection?: boolean;
165
+ /** Replaces the destination of a navigation key (keep it stable: a new function re-applies). */
166
+ navigate?: GridOptions['navigate'];
167
+ /**
168
+ * Row dragging; by value through `setRowDrag`. New `draggable`, `label` or `canDrop` functions apply
169
+ * from their next call without touching a running drag; an inline arrow is a new value on every parent
170
+ * render and applies the option again each time (keep the functions stable for speed). A changed `handle`, `drop`,
171
+ * `reorder` or `multiple` cancels a running drag. Drop zones are added on the exposed `api` (`rowDropZone`,
172
+ * `addRowDropZone`), once both grids exist.
173
+ */
174
+ rowDrag?: GridOptions['rowDrag'];
175
+ /**
176
+ * Master/detail; by value through `setDetail`, which never touches an open detail's content:
177
+ * an inline object with new functions on every parent render costs a comparison — the new `grid` or `renderer`
178
+ * serves the next build (keep the functions stable for speed). The `#detail` slot draws custom content (its props
179
+ * `DetailSlotProps`) and wins over `grid`; a `renderer` of the options wins over the slot. Absent: off, slot or not.
180
+ */
181
+ detail?: GridOptions['detail'];
182
+ /**
183
+ * Cell editing: how editors open and close, validation's mode, request mode, undo. Columns opt in with
184
+ * `editable`; a column's `#editor-<id>` slot draws its editor (`EditorSlotProps`) unless it has an `editor` of its own.
185
+ * By value through `setEditing`: an equal inline object re-rendered applies nothing.
186
+ */
187
+ editing?: GridOptions['editing'];
188
+ }
189
+ declare const __VLS_export: import("vue").DefineComponent<Props, {
190
+ api: import("vue").ShallowRef<Grid | undefined, Grid | undefined>;
191
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
192
+ detailToggle: (event: DetailToggle) => any;
193
+ cellKeyDown: (event: CellKeyEvent) => any;
194
+ ready: (grid: Grid) => any;
195
+ editOperation: (event: EditOperation) => any;
196
+ "update:columnState": (state: ColumnState[]) => any;
197
+ columnStateChange: (event: ColumnStateChange) => any;
198
+ "update:columnGroupState": (state: ColumnGroupState[]) => any;
199
+ columnGroupToggle: (event: ColumnGroupToggle) => any;
200
+ "update:filterModel": (model: FilterModel) => any;
201
+ filterChange: (event: FilterChange) => any;
202
+ popupChange: (event: PopupChange) => any;
203
+ "update:selection": (state: RowSelectionState) => any;
204
+ "update:cellRanges": (ranges: CellRange[]) => any;
205
+ cellClick: (event: CellPointerEvent) => any;
206
+ cellDoubleClick: (event: CellPointerEvent) => any;
207
+ focusChange: (event: FocusChange) => any;
208
+ selectionChange: (event: SelectionChange) => any;
209
+ rangeChange: (event: RangeChange) => any;
210
+ cellValueChanged: (event: CellValueChange) => any;
211
+ cellEditStart: (event: CellEditEvent) => any;
212
+ cellEditStop: (event: CellEditStopEvent) => any;
213
+ cellEditRequest: (event: CellEditRequest) => any;
214
+ rowDragStart: (event: RowDragStart) => any;
215
+ rowDragMove: (event: RowDragMove) => any;
216
+ rowDragEnd: (event: RowDragEnd) => any;
217
+ rowDrop: (event: RowDrop) => any;
218
+ findChange: (event: FindChange) => any;
219
+ "update:find": (text: string) => any;
220
+ quickFilterChange: (change: {
221
+ text: string;
222
+ source: "toolbar" | "api";
223
+ }) => any;
224
+ rowCountChange: (count: number) => any;
225
+ "update:quickFilter": (text: string) => any;
226
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
227
+ onDetailToggle?: ((event: DetailToggle) => any) | undefined;
228
+ onCellKeyDown?: ((event: CellKeyEvent) => any) | undefined;
229
+ onReady?: ((grid: Grid) => any) | undefined;
230
+ onEditOperation?: ((event: EditOperation) => any) | undefined;
231
+ "onUpdate:columnState"?: ((state: ColumnState[]) => any) | undefined;
232
+ onColumnStateChange?: ((event: ColumnStateChange) => any) | undefined;
233
+ "onUpdate:columnGroupState"?: ((state: ColumnGroupState[]) => any) | undefined;
234
+ onColumnGroupToggle?: ((event: ColumnGroupToggle) => any) | undefined;
235
+ "onUpdate:filterModel"?: ((model: FilterModel) => any) | undefined;
236
+ onFilterChange?: ((event: FilterChange) => any) | undefined;
237
+ onPopupChange?: ((event: PopupChange) => any) | undefined;
238
+ "onUpdate:selection"?: ((state: RowSelectionState) => any) | undefined;
239
+ "onUpdate:cellRanges"?: ((ranges: CellRange[]) => any) | undefined;
240
+ onCellClick?: ((event: CellPointerEvent) => any) | undefined;
241
+ onCellDoubleClick?: ((event: CellPointerEvent) => any) | undefined;
242
+ onFocusChange?: ((event: FocusChange) => any) | undefined;
243
+ onSelectionChange?: ((event: SelectionChange) => any) | undefined;
244
+ onRangeChange?: ((event: RangeChange) => any) | undefined;
245
+ onCellValueChanged?: ((event: CellValueChange) => any) | undefined;
246
+ onCellEditStart?: ((event: CellEditEvent) => any) | undefined;
247
+ onCellEditStop?: ((event: CellEditStopEvent) => any) | undefined;
248
+ onCellEditRequest?: ((event: CellEditRequest) => any) | undefined;
249
+ onRowDragStart?: ((event: RowDragStart) => any) | undefined;
250
+ onRowDragMove?: ((event: RowDragMove) => any) | undefined;
251
+ onRowDragEnd?: ((event: RowDragEnd) => any) | undefined;
252
+ onRowDrop?: ((event: RowDrop) => any) | undefined;
253
+ onFindChange?: ((event: FindChange) => any) | undefined;
254
+ "onUpdate:find"?: ((text: string) => any) | undefined;
255
+ onQuickFilterChange?: ((change: {
256
+ text: string;
257
+ source: "toolbar" | "api";
258
+ }) => any) | undefined;
259
+ onRowCountChange?: ((count: number) => any) | undefined;
260
+ "onUpdate:quickFilter"?: ((text: string) => any) | undefined;
261
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
262
+ declare const _default: typeof __VLS_export;
263
+ export default _default;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Watches an option prop and calls `apply` at once with its initial value (before the grid exists: keep it for the
3
+ * creation options), then on every change that is more than new functions (es-toolkit `isEqualWith`, two functions
4
+ * counting as equal; opaque objects — see `opaque` — by identity). `apply` gets the value with each function replaced
5
+ * by a stable wrapper calling the function at the same path in the newest value; a wrapper keeps its identity across
6
+ * applies while its path holds a function, so an engine keyed by object identity can keep its items.
7
+ */
8
+ export declare function watchOptions<T>(source: () => T, apply: (value: T) => void): void;
@@ -0,0 +1,28 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
2
+ import type { ClientSource, ClientSourceOptions } from '../engine/data/client/types';
3
+ /**
4
+ * A `clientSource` owned by the current component or effect scope: destroyed with the scope. It follows
5
+ * the rows' identity and length: a new array, and a `push` or a removal on a reactive array (`ref([])`,
6
+ * `reactive([])`), reach the source as `setData` — once per tick, however many changes the tick made. Replacing an
7
+ * element in place or changing a property inside a row does not: call the source's `refresh()` then. The source gets
8
+ * the raw array (`toRaw`), and is raw itself (`markRaw`): putting it into reactive state does not proxy it. A tick whose
9
+ * net length change is zero (a pop and a push, a length-neutral splice) is not seen either: call `refresh()` or
10
+ * `setData` then. A `shallowRef` array is followed by identity only: a `push` is ignored, a replaced array is
11
+ * followed. A held update is the app's own call, `source.setData(next, { hold: true })` with the raw array
12
+ * (`toRaw`): when `rows` then becomes that array — before or after the call, within the same tick — the watch leaves
13
+ * it alone; any other array, or that one at another length, is a load as ever. Called outside an effect scope, nothing destroys the source: call its `destroy()` yourself — and the watch
14
+ * on the rows lives as long as the rows do.
15
+ *
16
+ * After a managed row move (`rowDrag: { reorder: true }`) the source holds a new array, `order`.
17
+ * A writable ref (`ref`, `shallowRef`, a writable `computed`) gets it written before any `@row-drop` handler runs, so
18
+ * the ref holds the rows in their new order; a push onto it then (in that handler or later) shows the new row as any
19
+ * push does. A getter, a readonly ref or computed, a `reactive` or plain array is not written: take `order` from
20
+ * `@row-drop` into your own state, or the next identity or length change of your array undoes the move (one console
21
+ * hint on the first move). So is a ref that does not take the write — a prop's ref (`toRef(props, 'rows')`,
22
+ * `toRefs(props).rows`), which Vue's readonly props refuse in development (in production the write would land in the
23
+ * props until the parent's next render): a wrapper component passes `() => props.rows` and hands `order` up, or owns
24
+ * the ref. The echo of the write is skipped exactly when the watch sees the written array at its length, within
25
+ * the tick of the write; a ref set back, in that same tick, to the array it held before the move is not seen (the watch
26
+ * finds nothing changed): refuse a move with `canDrop`, or also call the source's `setData` with that array.
27
+ */
28
+ export declare function useClientSource<T extends object>(rows: MaybeRefOrGetter<readonly T[]>, options?: ClientSourceOptions<T>): ClientSource<T>;
@@ -0,0 +1,8 @@
1
+ import type { ServerDatasource, ServerSourceOptions } from '../engine/data/server/contract';
2
+ import { type ServerSource } from '../engine/data/server/serverSource';
3
+ /**
4
+ * A `serverSource` owned by the current component or effect scope: destroyed with the scope, so the
5
+ * requests in flight are aborted on unmount. Raw: putting it into reactive state does not proxy it. Called outside an
6
+ * effect scope, nothing destroys it: call its `destroy()` yourself.
7
+ */
8
+ export declare function useServerSource(datasource: ServerDatasource, options?: ServerSourceOptions): ServerSource;
@@ -0,0 +1,164 @@
1
+ import { type AppContext, type Component, type Slot } from 'vue';
2
+ import type { CellContext, CellEditor, CellEditorContext, CellRenderer, DetailContext, DetailRenderer, FilterRenderer, FilterUiContext, FloatingFilterContext, FloatingFilterRenderer, HeaderContext, HeaderRenderer, StatusPanelContext, StatusPanelDef, StatusPanelRenderer, ToolbarItemContext, ToolbarItemRenderer, ToolPanelContext, ToolPanelRenderer } from '../engine/types';
3
+ /**
4
+ * Props of a `#cell-<id>` / `#group` slot and of a `componentRenderer` component; `info` on group cells only; `setValue`
5
+ * writes the cell's value; `pinned` in a pinned row's cells only (its section, `row` its
6
+ * index there); `find` holds the cell's find parts while a term is set and it holds a match.
7
+ */
8
+ export type CellSlotProps = Pick<CellContext, 'row' | 'value' | 'text' | 'loaded' | 'column' | 'info' | 'setValue' | 'pinned' | 'find'>;
9
+ /**
10
+ * Props of a `#header-<id>` / `#header` slot and of a `componentHeaderRenderer` component. They change when the
11
+ * column's header text, sort, sort index, pinning, groups or active filter change; a width change alone does not update
12
+ * them (it happens on every resize frame), so `column.width` is the width at the last update.
13
+ */
14
+ export type HeaderSlotProps = Pick<HeaderContext, 'column' | 'text' | 'sort' | 'sortIndex' | 'filterActive'>;
15
+ /**
16
+ * Props of a `#filter-<id>` / `#group-filter` slot and of a `componentFilter` component: a custom
17
+ * filter kind's popup and filters-panel UI. `setModel` applies (with an Apply button: stages); the props change on
18
+ * every model change, from any place.
19
+ */
20
+ export type FilterSlotProps = FilterUiContext;
21
+ /**
22
+ * Props of a `#floating-filter-<id>` / `#group-floating-filter` slot and of a `componentFloatingFilter` component, on
23
+ * any filter kind: `model` is the kind's own model, `setModel` applies it validated as `setColumnFilter` does.
24
+ */
25
+ export type FloatingFilterSlotProps = FloatingFilterContext;
26
+ /** Props of a `#tool-panel-<panelId>` slot and of a `componentToolPanel` component; new each time the panel opens. */
27
+ export type ToolPanelSlotProps = ToolPanelContext;
28
+ /** Props of a `#status-panel-<key>` slot and of a `componentStatusPanel` component. */
29
+ export type StatusPanelSlotProps = StatusPanelContext;
30
+ /**
31
+ * Props of a `#toolbar-item-<key>` slot: the grid, the item's key and the texts; a fresh copy on each
32
+ * refresh of the bar. A `componentToolbarItem` component gets `grid` and `texts` (Vue reserves the prop name `key`).
33
+ */
34
+ export type ToolbarItemSlotProps = ToolbarItemContext;
35
+ /**
36
+ * Props of the `#detail` slot and of a `componentDetail` component: the master's row, id, data
37
+ * and info, the master grid, and `register` — a nested `<InGrid @ready="register">` joins the registry. They
38
+ * change on every refresh of the detail (its master's data changed, `refreshDetails`).
39
+ */
40
+ export type DetailSlotProps = Pick<DetailContext, 'row' | 'id' | 'data' | 'info' | 'grid' | 'register'>;
41
+ /**
42
+ * Props of an `#editor-<id>` slot, and the `ctx` prop of a `componentEditor` component: the
43
+ * editor's context, `CellEditorContext`, read when they are read. `row` and `rowIndex` follow the edited row as it moves or
44
+ * its object is replaced; `value` is the last `setValue` (the start value until then), so a slot drawn again — it
45
+ * reads reactive state of its own — keeps the typed text with `:value="value"`. `pinned` in a pinned row's editor only.
46
+ */
47
+ export interface EditorSlotProps extends CellEditorContext {
48
+ /** The editor's value as last set (`setValue`); the start value, raw, until then. */
49
+ value: unknown;
50
+ }
51
+ /**
52
+ * An entry of `<InGrid>`'s `statusBar` panels: a `StatusPanelDef` whose `panel` may be left out when a
53
+ * `#status-panel-<key>` slot draws the panel.
54
+ */
55
+ export interface StatusPanelSlotDef extends Omit<StatusPanelDef, 'panel'> {
56
+ panel?: StatusPanelDef['panel'];
57
+ }
58
+ /**
59
+ * Renders a slot of `<InGrid>`; the slot is looked up on every render, so slot updates are picked up.
60
+ *
61
+ * Provides scope: cell content sees the app-level provides of `appContext` only, not provides of components between
62
+ * the app and `<InGrid>` (that would need Vue's internal `instance.provides`). Slot expressions still close over the
63
+ * parent component's scope.
64
+ */
65
+ export declare function slotRenderer(getSlot: () => Slot | undefined, appContext: AppContext | null): CellRenderer;
66
+ /**
67
+ * Internal to `<InGrid>`: the header counterpart of `slotRenderer` (`#header-<id>` and `#header` slots). A slot that
68
+ * renders nothing, or is gone (its renderer stays until the columns change), shows the header text: a
69
+ * header cell never goes blank.
70
+ */
71
+ export declare function headerSlotRenderer(getSlot: () => Slot | undefined, appContext: AppContext | null): HeaderRenderer;
72
+ /** Internal to `<InGrid>`: makes the renderer of one slot, which is looked up on every render. */
73
+ export type SlotRendererFactory<R> = (getSlot: () => Slot | undefined, appContext: AppContext | null) => R;
74
+ /** Internal to `<InGrid>`: the `#filter-<id>` / `#group-filter` slots of a custom filter kind. */
75
+ export declare const filterSlotRenderer: SlotRendererFactory<FilterRenderer>;
76
+ /** Internal to `<InGrid>`: the `#floating-filter-<id>` / `#group-floating-filter` slots, on any filter kind. */
77
+ export declare const floatingFilterSlotRenderer: SlotRendererFactory<FloatingFilterRenderer>;
78
+ /** Internal to `<InGrid>`: the `#tool-panel-<panelId>` slots of custom side bar panels. */
79
+ export declare const toolPanelSlotRenderer: SlotRendererFactory<ToolPanelRenderer>;
80
+ /** Internal to `<InGrid>`: the `#status-panel-<key>` slots of status bar entries without a `panel`. */
81
+ export declare const statusPanelSlotRenderer: SlotRendererFactory<StatusPanelRenderer>;
82
+ /**
83
+ * Internal to `<InGrid>`: the `#toolbar-item-<key>` slots of top bar items without an `item`, drawn when the
84
+ * bar builds the item; slot content that renders nothing (a false `v-if`) leaves the item, and so the bar, hidden.
85
+ */
86
+ export declare const toolbarItemSlotRenderer: SlotRendererFactory<ToolbarItemRenderer>;
87
+ /**
88
+ * Internal to `<InGrid>`: the `#detail` slot, drawn when the detail's content is built, so the detail
89
+ * is sized by it at once; a failing slot leaves the panel empty and reports.
90
+ */
91
+ export declare const detailSlotRenderer: SlotRendererFactory<DetailRenderer>;
92
+ /**
93
+ * Internal to `<InGrid>`: the `#editor-<id>` slots, mounted when an edit opens, with `EditorSlotProps`.
94
+ * The instance has no `getValue` (the last `setValue` is written) and no `focus` (the first tabbable element takes it). A
95
+ * slot gone since the columns were set opens nothing.
96
+ */
97
+ export declare const editorSlotRenderer: SlotRendererFactory<CellEditor>;
98
+ /**
99
+ * Renders a component with props `{ row, value, text, loaded, column, info, setValue, pinned, find }` (`CellSlotProps`;
100
+ * `info` on group cells, `pinned` in pinned rows, `find` while the cell holds a find match).
101
+ *
102
+ * Memoised per (component, appContext): the same arguments return the same renderer object, so a `columns` update
103
+ * that calls this again keeps the mounted cell instances. Without an `appContext`, `<InGrid>` binds the renderer to
104
+ * its own app context.
105
+ *
106
+ * Provides scope: the component sees the app-level provides (plugins such as i18n, pinia, router) only, not provides
107
+ * of components between the app and `<InGrid>` (that would need Vue's internal `instance.provides`).
108
+ */
109
+ export declare function componentRenderer(component: Component, appContext?: AppContext | null): CellRenderer;
110
+ /**
111
+ * Renders a component in a header cell with props `{ column, text, sort, sortIndex, filterActive }` (`HeaderSlotProps`). Memoised
112
+ * and bound to `<InGrid>`'s app context like `componentRenderer`, with the same provides scope.
113
+ */
114
+ export declare function componentHeaderRenderer(component: Component, appContext?: AppContext | null): HeaderRenderer;
115
+ /**
116
+ * A custom filter kind's popup and filters-panel UI (`CustomFilterDef.renderer`) from a component with props
117
+ * `FilterSlotProps` (`{ column, model, setModel, close, overlayHost, values, texts }`). Memoised and bound to `<InGrid>`'s app
118
+ * context like `componentRenderer`, with the same provides scope; drawn when the filter UI is created, so a
119
+ * popup focuses its first control.
120
+ */
121
+ export declare function componentFilter(component: Component, appContext?: AppContext | null): FilterRenderer;
122
+ /**
123
+ * A floating-filter cell (`floatingRenderer` of any filter definition, built-in kinds and multi children included)
124
+ * from a component with props `FloatingFilterSlotProps` (`{ column, model, setModel, openFilter, texts }`); memoised and
125
+ * bound like `componentFilter`.
126
+ */
127
+ export declare function componentFloatingFilter(component: Component, appContext?: AppContext | null): FloatingFilterRenderer;
128
+ /**
129
+ * A custom side bar panel (`ToolPanelDef.renderer`) from a component with props `ToolPanelSlotProps`
130
+ * (`{ grid, texts }`); memoised and bound like `componentFilter`.
131
+ */
132
+ export declare function componentToolPanel(component: Component, appContext?: AppContext | null): ToolPanelRenderer;
133
+ /**
134
+ * A custom status bar panel (`StatusPanelDef.panel`) from a component with props `StatusPanelSlotProps`
135
+ * (`{ grid, counts, selection, texts }`); memoised and bound like `componentFilter`.
136
+ */
137
+ export declare function componentStatusPanel(component: Component, appContext?: AppContext | null): StatusPanelRenderer;
138
+ /**
139
+ * A top bar item (`ToolbarItemDef.item`) from a component with props `{ grid, texts }`; memoised and bound
140
+ * like `componentFilter`. That is `ToolbarItemSlotProps` without `key`, a prop name Vue reserves: content that needs its
141
+ * item's key is drawn by a `#toolbar-item-<key>` slot instead. An item whose component renders nothing keeps the bar
142
+ * hidden.
143
+ */
144
+ export declare function componentToolbarItem(component: Component, appContext?: AppContext | null): ToolbarItemRenderer;
145
+ /**
146
+ * Custom detail content (`DetailOptions.renderer`) from a component with props `DetailSlotProps`
147
+ * (`{ row, id, data, info, grid, register }`); memoised and bound like `componentFilter`. The component sizes its detail
148
+ * (`'auto'` heights) and keeps its state across refreshes, which only change its props.
149
+ */
150
+ export declare function componentDetail(component: Component, appContext?: AppContext | null): DetailRenderer;
151
+ /**
152
+ * A custom cell editor (`ColumnDef.editor`) from a component with prop `ctx` (`EditorSlotProps`, the
153
+ * editor's context): mounted when the edit opens, so its content exists when the grid focuses it. It may
154
+ * `defineExpose({ getValue, focus, errors, cancelled })`: without `getValue` the last `ctx.setValue` is written, without
155
+ * `focus` the first tabbable element takes focus. A mount that fails goes to the app's `errorHandler` and opens nothing.
156
+ * Memoised and bound to `<InGrid>`'s app context like `componentRenderer` (also when an `editor` function returns it),
157
+ * with the same provides scope.
158
+ */
159
+ export declare function componentEditor(component: Component, appContext?: AppContext | null): CellEditor;
160
+ /**
161
+ * Internal to `<InGrid>`: a renderer made by one of the `component*` factories without an appContext, bound to
162
+ * `appContext`; every other renderer passes through.
163
+ */
164
+ export declare function bindToApp<R extends object>(renderer: R, appContext: AppContext | null): R;