@nouxwell/tabula-vue 0.0.0-stage → 0.4.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.
@@ -0,0 +1,486 @@
1
+ import { RowView, Selection, UndoHistory, type Adjustment, type CellMarkChange, type CellMarks, type FoundCell, type MarkedCell, type ColumnSizing, type ColumnSort, type CellValue, type ColumnLayout, type FieldSchema, type IssueSet, type LookupSearch, type ModuleSchema, type RowResults, type RowStore, type SheetChanges, type ValueSettings } from "@nouxwell/tabula-core";
2
+ import { type PropType } from "vue";
3
+ import { type GridLocale } from "./messages.js";
4
+ import type { ActiveCell, GridMenuItem, GridPosition, GridTheme, SelectedCells } from "./types.js";
5
+ /** Fits a column to its header and its contents, within the automatic limits, as a width the user chose. */
6
+ declare function autoFit(col: number): void;
7
+ /** The cells selected, by row id and field key, row by row. */
8
+ declare function selectedCells(): MarkedCell[];
9
+ /** The keys of the columns the selection spans, as they stand on screen. */
10
+ declare function selectedFields(): string[];
11
+ /** Puts a mark on the cells selected. False when there is nothing selected or no `marks`. */
12
+ declare function markSelection(change: CellMarkChange): boolean;
13
+ /** Bold or italic on the cells selected, or off when every one has it, as Ctrl+B and Ctrl+I. */
14
+ declare function toggleSelection(style: "bold" | "italic"): boolean;
15
+ /** Takes every mark off the cells selected. */
16
+ declare function clearSelectionMarks(): boolean;
17
+ /** Whether a cell may be written: its column takes typing and its row is not locked by a result. */
18
+ declare function canEdit(rowId: string, key: string): boolean;
19
+ /**
20
+ * The grid's keyboard goes to one input that sits on the active cell, invisible until it is needed.
21
+ *
22
+ * Text does not always arrive as a key: an input method composes it, a virtual keyboard or dictation
23
+ * inserts it whole. Reading keys alone loses all of that. Whatever reaches this input, however it got
24
+ * there, starts an edit in the same input, so a composition carries on without a break and no key
25
+ * typed quickly after the first is lost on the way to an editor that is not there yet.
26
+ */
27
+ declare function focusInput(): void;
28
+ /**
29
+ * Goes to a row, and to one of its fields when given: selects the cell, scrolls it into view and
30
+ * gives the grid the keyboard. An issue's rowId and field are what it takes. A row a filter left
31
+ * out is shown, in its place. False when the row is no longer there.
32
+ */
33
+ declare function goTo(rowId: string, field?: string | null): boolean;
34
+ /**
35
+ * Goes to a cell by its address, such as "D9" typed into a formula bar. False when there is no such
36
+ * column on screen or no such row.
37
+ */
38
+ declare function goToAddress(address: string): boolean;
39
+ /**
40
+ * Writes text into a cell, read as typing it there reads it, such as from a formula bar. A bar
41
+ * names the cell it started on: a click elsewhere moves the selection before the bar lets go.
42
+ * False when the cell cannot be changed; the same text as is there writes nothing.
43
+ */
44
+ declare function writeCell(rowId: string, key: string, input: string): boolean;
45
+ /**
46
+ * Changes every number selected by `adjustment`, as one step to undo: a percentage, an amount, or
47
+ * rounding to a step. Cells that cannot be edited, rows a run locked and cells holding no number are
48
+ * passed over. Returns how many cells changed.
49
+ *
50
+ * @throws TabulaError `invalid_argument` for an amount or a step that `adjustValue` refuses
51
+ */
52
+ declare function adjustSelection(adjustment: Adjustment): number;
53
+ /**
54
+ * Takes the rows the selection spans out of the sheet, as one step to undo. A row on its way to the
55
+ * backend stays; one it processed may go, as `removeSucceeded()` takes them. Returns how many went.
56
+ */
57
+ declare function removeRows(): number;
58
+ /**
59
+ * Adds as many empty rows as the selection spans, above it or below it, as one step to undo; they
60
+ * hold the schema's defaults, and are selected. Returns their ids.
61
+ */
62
+ declare function insertRows(where: "above" | "below"): string[];
63
+ /** Where the user is: the active cell by its row's id and field, and how far the sheet is scrolled. */
64
+ declare function position(): GridPosition;
65
+ /**
66
+ * Puts the user back where `position()` said, such as in a grid made again over the same rows: the
67
+ * scroll as it was, and the active cell when its row and column are still shown.
68
+ */
69
+ declare function restorePosition(at: GridPosition): void;
70
+ /**
71
+ * A cell's address as the formula bar writes it, "D8": its column as the columns stand on screen,
72
+ * its row's number in the sheet. Null for a column not shown or a row not in the sheet.
73
+ */
74
+ declare function addressOf(rowId: string, field: string): string | null;
75
+ /** A value written as the grid writes it, in its settings. */
76
+ declare function formatValue(field: FieldSchema, value: CellValue): string;
77
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
78
+ /** The module schema: which columns there are, in which order, and what each may hold. */
79
+ schema: {
80
+ type: PropType<ModuleSchema>;
81
+ required: true;
82
+ };
83
+ /** The rows. The grid writes into it and redraws whenever it changes, whoever changed it. */
84
+ store: {
85
+ type: PropType<RowStore>;
86
+ required: true;
87
+ };
88
+ /** Sizing for every column. Whatever is left out keeps its default. */
89
+ columnSizing: {
90
+ type: PropType<Partial<ColumnSizing>>;
91
+ default: undefined;
92
+ };
93
+ /** Sizing for single columns by field key, over `columnSizing`. */
94
+ columnOverrides: {
95
+ type: PropType<Readonly<Record<string, Partial<ColumnSizing>>>>;
96
+ default: undefined;
97
+ };
98
+ /** No cell can be changed: no typing, pasting, clearing or cutting. */
99
+ readonly: {
100
+ type: BooleanConstructor;
101
+ default: boolean;
102
+ };
103
+ theme: {
104
+ type: PropType<GridTheme>;
105
+ default: string;
106
+ };
107
+ /**
108
+ * How values are written and read: separators, digits, date patterns, the words for yes and no.
109
+ * Turkish by default, as nouxwell/tabula's own defaults are.
110
+ */
111
+ valueSettings: {
112
+ type: PropType<ValueSettings>;
113
+ default: () => ValueSettings;
114
+ };
115
+ /** Pixels. */
116
+ rowHeight: {
117
+ type: NumberConstructor;
118
+ default: number;
119
+ };
120
+ /**
121
+ * The issues to show: a `SheetValidator`, or a `SheetSession`'s `issues` with the backend's in
122
+ * them. Pass what an issue panel shows too, so both tell the same story; left out, the grid checks
123
+ * the sheet against the schema on its own. Issues passed in belong to the host: the grid neither
124
+ * changes their settings nor disposes of them.
125
+ */
126
+ issues: {
127
+ type: PropType<IssueSet>;
128
+ default: undefined;
129
+ };
130
+ /**
131
+ * Each row's result from the backend, such as a `SheetSession`'s `results`: shown by the row's
132
+ * number, and a row it locks cannot be changed.
133
+ */
134
+ results: {
135
+ type: PropType<RowResults>;
136
+ default: undefined;
137
+ };
138
+ /**
139
+ * The rows to show, such as a `RowView` filtered to the rows with issues. Left out, every row is.
140
+ * Row numbers stay the rows' numbers in the sheet, filtered or not.
141
+ */
142
+ view: {
143
+ type: PropType<RowView>;
144
+ default: undefined;
145
+ };
146
+ /**
147
+ * Searches a lookup's records as the user types into one, such as a `LookupResolver`: the editor
148
+ * then lists them to pick from. Left out, a lookup takes only names, matched to records elsewhere.
149
+ */
150
+ lookups: {
151
+ type: PropType<LookupSearch>;
152
+ default: undefined;
153
+ };
154
+ /**
155
+ * Undo and redo for the store. Pass one to show its state elsewhere, such as on toolbar buttons;
156
+ * left out, the grid keeps its own. One passed in belongs to the host, which disposes of it.
157
+ */
158
+ history: {
159
+ type: PropType<UndoHistory>;
160
+ default: undefined;
161
+ };
162
+ /**
163
+ * What the user changed since the sheet was loaded, such as a `SheetChanges`: a changed cell has a
164
+ * mark in its top left corner. Left out, nothing is marked.
165
+ */
166
+ changes: {
167
+ type: PropType<SheetChanges>;
168
+ default: undefined;
169
+ };
170
+ /** Letters over the headers, A, B, C, as the columns stand on screen: the formula bar's addresses. */
171
+ columnLetters: {
172
+ type: BooleanConstructor;
173
+ default: boolean;
174
+ };
175
+ /**
176
+ * The host's own items in the menu a right click opens on a cell or a row's number, after the
177
+ * grid's. Choosing one emits `menu` with its key; one with `children` opens them beside it.
178
+ */
179
+ menuItems: {
180
+ type: PropType<readonly GridMenuItem[]>;
181
+ default: () => never[];
182
+ };
183
+ /** The language of the grid's own words: issue messages and labels. */
184
+ locale: {
185
+ type: PropType<GridLocale>;
186
+ default: string;
187
+ };
188
+ /**
189
+ * What the user put on cells by hand, such as a `CellMarks` kept with the draft: fills, text
190
+ * colours, bold and italic, drawn over the schema's colour rules. Ctrl+B and Ctrl+I put bold and
191
+ * italic on the cells selected. Left out, nothing is marked.
192
+ */
193
+ marks: {
194
+ type: PropType<CellMarks>;
195
+ default: undefined;
196
+ };
197
+ /** Cells found, such as a find's answer: each one tinted, and `current` outlined. */
198
+ found: {
199
+ type: PropType<{
200
+ readonly cells: readonly FoundCell[];
201
+ readonly current?: FoundCell | null;
202
+ }>;
203
+ default: undefined;
204
+ };
205
+ /**
206
+ * Columns narrower together than the sheet share the room left between them, those the user has
207
+ * not sized by hand. Left out, the room on the right stays empty.
208
+ */
209
+ fit: {
210
+ type: BooleanConstructor;
211
+ default: boolean;
212
+ };
213
+ /**
214
+ * A row under the rows, held in place, with each number column's sum, or its average, smallest
215
+ * or largest, over the rows shown.
216
+ */
217
+ totals: {
218
+ type: BooleanConstructor;
219
+ default: boolean;
220
+ };
221
+ /** How large the sheet is drawn, 1 as it is: its text, rows and widths together. */
222
+ zoom: {
223
+ type: NumberConstructor;
224
+ default: number;
225
+ };
226
+ sort: {
227
+ type: PropType<ColumnSort | null>;
228
+ };
229
+ filters: {
230
+ type: PropType<Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>>;
231
+ };
232
+ columnWidths: {
233
+ type: PropType<Readonly<Record<string, number>>>;
234
+ };
235
+ columns: {
236
+ type: PropType<ColumnLayout>;
237
+ };
238
+ }>, {
239
+ /** The selection, in on-screen positions. */
240
+ selection: Selection;
241
+ /** The active cell: its address, field and text. Null before anything is selected. */
242
+ cell: import("vue").ComputedRef<ActiveCell | null>;
243
+ /** The cells selected, with the sum and average of their numbers. Null before anything is selected. */
244
+ selected: import("vue").ComputedRef<SelectedCells | null>;
245
+ /** How many rows are shown, and how many the sheet has. */
246
+ rows: import("vue").ComputedRef<Readonly<{
247
+ shown: number;
248
+ total: number;
249
+ }>>;
250
+ /** The issues counted: errors, warnings, those waiting to be checked again, and rows. */
251
+ issueSummary: import("vue").ComputedRef<import("@nouxwell/tabula-core").IssueSummary>;
252
+ formatValue: typeof formatValue;
253
+ goTo: typeof goTo;
254
+ goToAddress: typeof goToAddress;
255
+ writeCell: typeof writeCell;
256
+ adjustSelection: typeof adjustSelection;
257
+ removeRows: typeof removeRows;
258
+ insertRows: typeof insertRows;
259
+ addressOf: typeof addressOf;
260
+ position: typeof position;
261
+ restorePosition: typeof restorePosition;
262
+ focus: typeof focusInput;
263
+ /** Fits a column to its header and contents, as a double click on its edge does. */
264
+ autoFit: typeof autoFit;
265
+ /** The cells selected, by row id and field key: what a toolbar's marks go on. */
266
+ selectedCells: typeof selectedCells;
267
+ /** The keys of the columns the selection spans: what a toolbar's column formats go on. */
268
+ selectedFields: typeof selectedFields;
269
+ /** Puts a fill, a text colour, bold or italic on the cells selected, into `marks`. */
270
+ markSelection: typeof markSelection;
271
+ /** Bold or italic on the cells selected, or off when every one has it. */
272
+ toggleSelection: typeof toggleSelection;
273
+ /** Takes every mark off the cells selected. */
274
+ clearSelectionMarks: typeof clearSelectionMarks;
275
+ /** Whether a cell may be written: what a find and replace leaves alone. */
276
+ canEdit: typeof canEdit;
277
+ /** Selects a cell and scrolls it into view, leaving the keyboard where it is: a find's Next. */
278
+ showCell: (rowId: string, field?: string | null) => boolean;
279
+ /** The keys of the columns shown, in the order they stand. */
280
+ shownFields: () => string[];
281
+ /** Takes the last step back, as Ctrl+Z does, and gives the grid the keyboard. False when there was none. */
282
+ undo: () => boolean;
283
+ /** Makes the last step taken back again, as Ctrl+Y does. False when there was none. */
284
+ redo: () => boolean;
285
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
286
+ find: () => any;
287
+ menu: (key: string) => any;
288
+ "update:columnWidths": (value: Readonly<Record<string, number>>) => any;
289
+ "update:columns": (value: ColumnLayout) => any;
290
+ "update:filters": (value: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>) => any;
291
+ "update:sort": (value: ColumnSort | null) => any;
292
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
293
+ /** The module schema: which columns there are, in which order, and what each may hold. */
294
+ schema: {
295
+ type: PropType<ModuleSchema>;
296
+ required: true;
297
+ };
298
+ /** The rows. The grid writes into it and redraws whenever it changes, whoever changed it. */
299
+ store: {
300
+ type: PropType<RowStore>;
301
+ required: true;
302
+ };
303
+ /** Sizing for every column. Whatever is left out keeps its default. */
304
+ columnSizing: {
305
+ type: PropType<Partial<ColumnSizing>>;
306
+ default: undefined;
307
+ };
308
+ /** Sizing for single columns by field key, over `columnSizing`. */
309
+ columnOverrides: {
310
+ type: PropType<Readonly<Record<string, Partial<ColumnSizing>>>>;
311
+ default: undefined;
312
+ };
313
+ /** No cell can be changed: no typing, pasting, clearing or cutting. */
314
+ readonly: {
315
+ type: BooleanConstructor;
316
+ default: boolean;
317
+ };
318
+ theme: {
319
+ type: PropType<GridTheme>;
320
+ default: string;
321
+ };
322
+ /**
323
+ * How values are written and read: separators, digits, date patterns, the words for yes and no.
324
+ * Turkish by default, as nouxwell/tabula's own defaults are.
325
+ */
326
+ valueSettings: {
327
+ type: PropType<ValueSettings>;
328
+ default: () => ValueSettings;
329
+ };
330
+ /** Pixels. */
331
+ rowHeight: {
332
+ type: NumberConstructor;
333
+ default: number;
334
+ };
335
+ /**
336
+ * The issues to show: a `SheetValidator`, or a `SheetSession`'s `issues` with the backend's in
337
+ * them. Pass what an issue panel shows too, so both tell the same story; left out, the grid checks
338
+ * the sheet against the schema on its own. Issues passed in belong to the host: the grid neither
339
+ * changes their settings nor disposes of them.
340
+ */
341
+ issues: {
342
+ type: PropType<IssueSet>;
343
+ default: undefined;
344
+ };
345
+ /**
346
+ * Each row's result from the backend, such as a `SheetSession`'s `results`: shown by the row's
347
+ * number, and a row it locks cannot be changed.
348
+ */
349
+ results: {
350
+ type: PropType<RowResults>;
351
+ default: undefined;
352
+ };
353
+ /**
354
+ * The rows to show, such as a `RowView` filtered to the rows with issues. Left out, every row is.
355
+ * Row numbers stay the rows' numbers in the sheet, filtered or not.
356
+ */
357
+ view: {
358
+ type: PropType<RowView>;
359
+ default: undefined;
360
+ };
361
+ /**
362
+ * Searches a lookup's records as the user types into one, such as a `LookupResolver`: the editor
363
+ * then lists them to pick from. Left out, a lookup takes only names, matched to records elsewhere.
364
+ */
365
+ lookups: {
366
+ type: PropType<LookupSearch>;
367
+ default: undefined;
368
+ };
369
+ /**
370
+ * Undo and redo for the store. Pass one to show its state elsewhere, such as on toolbar buttons;
371
+ * left out, the grid keeps its own. One passed in belongs to the host, which disposes of it.
372
+ */
373
+ history: {
374
+ type: PropType<UndoHistory>;
375
+ default: undefined;
376
+ };
377
+ /**
378
+ * What the user changed since the sheet was loaded, such as a `SheetChanges`: a changed cell has a
379
+ * mark in its top left corner. Left out, nothing is marked.
380
+ */
381
+ changes: {
382
+ type: PropType<SheetChanges>;
383
+ default: undefined;
384
+ };
385
+ /** Letters over the headers, A, B, C, as the columns stand on screen: the formula bar's addresses. */
386
+ columnLetters: {
387
+ type: BooleanConstructor;
388
+ default: boolean;
389
+ };
390
+ /**
391
+ * The host's own items in the menu a right click opens on a cell or a row's number, after the
392
+ * grid's. Choosing one emits `menu` with its key; one with `children` opens them beside it.
393
+ */
394
+ menuItems: {
395
+ type: PropType<readonly GridMenuItem[]>;
396
+ default: () => never[];
397
+ };
398
+ /** The language of the grid's own words: issue messages and labels. */
399
+ locale: {
400
+ type: PropType<GridLocale>;
401
+ default: string;
402
+ };
403
+ /**
404
+ * What the user put on cells by hand, such as a `CellMarks` kept with the draft: fills, text
405
+ * colours, bold and italic, drawn over the schema's colour rules. Ctrl+B and Ctrl+I put bold and
406
+ * italic on the cells selected. Left out, nothing is marked.
407
+ */
408
+ marks: {
409
+ type: PropType<CellMarks>;
410
+ default: undefined;
411
+ };
412
+ /** Cells found, such as a find's answer: each one tinted, and `current` outlined. */
413
+ found: {
414
+ type: PropType<{
415
+ readonly cells: readonly FoundCell[];
416
+ readonly current?: FoundCell | null;
417
+ }>;
418
+ default: undefined;
419
+ };
420
+ /**
421
+ * Columns narrower together than the sheet share the room left between them, those the user has
422
+ * not sized by hand. Left out, the room on the right stays empty.
423
+ */
424
+ fit: {
425
+ type: BooleanConstructor;
426
+ default: boolean;
427
+ };
428
+ /**
429
+ * A row under the rows, held in place, with each number column's sum, or its average, smallest
430
+ * or largest, over the rows shown.
431
+ */
432
+ totals: {
433
+ type: BooleanConstructor;
434
+ default: boolean;
435
+ };
436
+ /** How large the sheet is drawn, 1 as it is: its text, rows and widths together. */
437
+ zoom: {
438
+ type: NumberConstructor;
439
+ default: number;
440
+ };
441
+ sort: {
442
+ type: PropType<ColumnSort | null>;
443
+ };
444
+ filters: {
445
+ type: PropType<Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>>;
446
+ };
447
+ columnWidths: {
448
+ type: PropType<Readonly<Record<string, number>>>;
449
+ };
450
+ columns: {
451
+ type: PropType<ColumnLayout>;
452
+ };
453
+ }>> & Readonly<{
454
+ onFind?: (() => any) | undefined;
455
+ onMenu?: ((key: string) => any) | undefined;
456
+ "onUpdate:columnWidths"?: ((value: Readonly<Record<string, number>>) => any) | undefined;
457
+ "onUpdate:columns"?: ((value: ColumnLayout) => any) | undefined;
458
+ "onUpdate:filters"?: ((value: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>) => any) | undefined;
459
+ "onUpdate:sort"?: ((value: ColumnSort | null) => any) | undefined;
460
+ }>, {
461
+ view: RowView;
462
+ results: RowResults;
463
+ zoom: number;
464
+ issues: IssueSet;
465
+ totals: boolean;
466
+ locale: GridLocale;
467
+ valueSettings: ValueSettings;
468
+ theme: GridTheme;
469
+ columnSizing: Partial<ColumnSizing>;
470
+ columnOverrides: Readonly<Record<string, Partial<ColumnSizing>>>;
471
+ readonly: boolean;
472
+ rowHeight: number;
473
+ lookups: LookupSearch;
474
+ history: UndoHistory;
475
+ changes: SheetChanges;
476
+ columnLetters: boolean;
477
+ menuItems: readonly GridMenuItem[];
478
+ marks: CellMarks;
479
+ found: {
480
+ readonly cells: readonly FoundCell[];
481
+ readonly current?: FoundCell | null;
482
+ };
483
+ fit: boolean;
484
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
485
+ declare const _default: typeof __VLS_export;
486
+ export default _default;
@@ -0,0 +1,171 @@
1
+ import { type Issue, type IssueSet, type ModuleSchema, type RowId, type RowStore, type ValueSettings } from "@nouxwell/tabula-core";
2
+ import { type PropType } from "vue";
3
+ import { type GridLocale } from "./messages.js";
4
+ import type { GridTheme } from "./types.js";
5
+ declare const __VLS_template: () => {
6
+ __VLS_Slots: {
7
+ actions?: (props: {}) => any;
8
+ };
9
+ };
10
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
11
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
12
+ /** A `SheetValidator`, or a `SheetSession`'s `issues`: the same the grid is given. */
13
+ issues: {
14
+ type: PropType<IssueSet>;
15
+ required: true;
16
+ };
17
+ schema: {
18
+ type: PropType<ModuleSchema>;
19
+ required: true;
20
+ };
21
+ /** For the row numbers shown, which follow the rows as they stand now. */
22
+ store: {
23
+ type: PropType<RowStore>;
24
+ required: true;
25
+ };
26
+ locale: {
27
+ type: PropType<GridLocale>;
28
+ default: string;
29
+ };
30
+ valueSettings: {
31
+ type: PropType<ValueSettings>;
32
+ default: () => ValueSettings;
33
+ };
34
+ theme: {
35
+ type: PropType<GridTheme>;
36
+ default: string;
37
+ };
38
+ /** How many issues are listed; the rest are counted. Drawing 50,000 of them helps nobody. */
39
+ limit: {
40
+ type: NumberConstructor;
41
+ default: number;
42
+ };
43
+ /**
44
+ * `panel`: the list beside or under the sheet. `sheet`, for a phone: a bar with the counts, which
45
+ * opens the list from the bottom of the screen over the sheet; choosing an issue closes it again.
46
+ */
47
+ variant: {
48
+ type: PropType<"panel" | "sheet">;
49
+ default: string;
50
+ };
51
+ /** The grid's `addressOf`: each issue on a cell then shows the cell's address, "D8". */
52
+ addressOf: {
53
+ type: PropType<(rowId: RowId, field: string) => string | null>;
54
+ default: undefined;
55
+ };
56
+ /** A field that names a row, such as its product, shown on each issue about the row. */
57
+ nameField: {
58
+ type: PropType<string | null>;
59
+ default: null;
60
+ };
61
+ /**
62
+ * A close button in the `panel` variant's head too, as the `sheet` variant has. It emits `close`,
63
+ * for a host that shows the panel only while it is wanted.
64
+ */
65
+ closable: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ open: {
70
+ type: PropType<boolean>;
71
+ };
72
+ onlyIssueRows: {
73
+ type: PropType<boolean>;
74
+ };
75
+ }>, {
76
+ next: () => void;
77
+ previous: () => void;
78
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
79
+ close: () => any;
80
+ select: (issue: Issue) => any;
81
+ "update:open": (value: boolean) => any;
82
+ refreshRows: () => any;
83
+ "update:onlyIssueRows": (value: boolean | undefined) => any;
84
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
85
+ /** A `SheetValidator`, or a `SheetSession`'s `issues`: the same the grid is given. */
86
+ issues: {
87
+ type: PropType<IssueSet>;
88
+ required: true;
89
+ };
90
+ schema: {
91
+ type: PropType<ModuleSchema>;
92
+ required: true;
93
+ };
94
+ /** For the row numbers shown, which follow the rows as they stand now. */
95
+ store: {
96
+ type: PropType<RowStore>;
97
+ required: true;
98
+ };
99
+ locale: {
100
+ type: PropType<GridLocale>;
101
+ default: string;
102
+ };
103
+ valueSettings: {
104
+ type: PropType<ValueSettings>;
105
+ default: () => ValueSettings;
106
+ };
107
+ theme: {
108
+ type: PropType<GridTheme>;
109
+ default: string;
110
+ };
111
+ /** How many issues are listed; the rest are counted. Drawing 50,000 of them helps nobody. */
112
+ limit: {
113
+ type: NumberConstructor;
114
+ default: number;
115
+ };
116
+ /**
117
+ * `panel`: the list beside or under the sheet. `sheet`, for a phone: a bar with the counts, which
118
+ * opens the list from the bottom of the screen over the sheet; choosing an issue closes it again.
119
+ */
120
+ variant: {
121
+ type: PropType<"panel" | "sheet">;
122
+ default: string;
123
+ };
124
+ /** The grid's `addressOf`: each issue on a cell then shows the cell's address, "D8". */
125
+ addressOf: {
126
+ type: PropType<(rowId: RowId, field: string) => string | null>;
127
+ default: undefined;
128
+ };
129
+ /** A field that names a row, such as its product, shown on each issue about the row. */
130
+ nameField: {
131
+ type: PropType<string | null>;
132
+ default: null;
133
+ };
134
+ /**
135
+ * A close button in the `panel` variant's head too, as the `sheet` variant has. It emits `close`,
136
+ * for a host that shows the panel only while it is wanted.
137
+ */
138
+ closable: {
139
+ type: BooleanConstructor;
140
+ default: boolean;
141
+ };
142
+ open: {
143
+ type: PropType<boolean>;
144
+ };
145
+ onlyIssueRows: {
146
+ type: PropType<boolean>;
147
+ };
148
+ }>> & Readonly<{
149
+ onClose?: (() => any) | undefined;
150
+ onSelect?: ((issue: Issue) => any) | undefined;
151
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
152
+ onRefreshRows?: (() => any) | undefined;
153
+ "onUpdate:onlyIssueRows"?: ((value: boolean | undefined) => any) | undefined;
154
+ }>, {
155
+ locale: GridLocale;
156
+ valueSettings: ValueSettings;
157
+ theme: GridTheme;
158
+ addressOf: (rowId: RowId, field: string) => string | null;
159
+ limit: number;
160
+ variant: "sheet" | "panel";
161
+ nameField: string | null;
162
+ closable: boolean;
163
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
164
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
165
+ declare const _default: typeof __VLS_export;
166
+ export default _default;
167
+ type __VLS_WithSlots<T, S> = T & {
168
+ new (): {
169
+ $slots: S;
170
+ };
171
+ };