tinybase 8.0.0 → 8.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/ui-svelte/index.d.ts +2248 -0
- package/@types/ui-svelte/with-schemas/index.d.ts +1552 -0
- package/min/ui-svelte/index.js +1 -0
- package/min/ui-svelte/index.js.gz +0 -0
- package/min/ui-svelte/with-schemas/index.js +1 -0
- package/min/ui-svelte/with-schemas/index.js.gz +0 -0
- package/package.json +42 -2
- package/readme.md +3 -3
- package/releases.md +27 -1
- package/ui-svelte/index.js +2015 -0
- package/ui-svelte/with-schemas/index.js +2015 -0
|
@@ -0,0 +1,2248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ui-svelte module of the TinyBase project provides both hooks and
|
|
3
|
+
* components to make it easy to create reactive Svelte 5 apps with Store
|
|
4
|
+
* objects.
|
|
5
|
+
*
|
|
6
|
+
* The hooks in this module provide access to the data and structures exposed by
|
|
7
|
+
* other modules in the project. They return reactive objects with a `current`
|
|
8
|
+
* property. Hooks register listeners such that components using those hooks
|
|
9
|
+
* re-render when data changes.
|
|
10
|
+
*
|
|
11
|
+
* Hook parameters accept either plain values or reactive getter functions
|
|
12
|
+
* (`R<T> = T | (() => T)`), so passing `() => tableId` from a `let`-bound
|
|
13
|
+
* Svelte prop makes the hook re-execute whenever the prop changes.
|
|
14
|
+
*
|
|
15
|
+
* The components in this module provide a further abstraction over those hooks
|
|
16
|
+
* to ease the composition of user interfaces that use TinyBase.
|
|
17
|
+
* @see Building UIs With Svelte guide
|
|
18
|
+
* @packageDocumentation
|
|
19
|
+
* @module ui-svelte
|
|
20
|
+
* @since v8.1.0
|
|
21
|
+
*/
|
|
22
|
+
import type {Component, Snippet} from 'svelte';
|
|
23
|
+
import type {CheckpointIds, Checkpoints} from '../checkpoints/index.d.ts';
|
|
24
|
+
import type {Id, Ids} from '../common/index.d.ts';
|
|
25
|
+
import type {Indexes} from '../indexes/index.d.ts';
|
|
26
|
+
import type {Metrics} from '../metrics/index.d.ts';
|
|
27
|
+
import type {AnyPersister, Status} from '../persisters/index.d.ts';
|
|
28
|
+
import type {Queries} from '../queries/index.d.ts';
|
|
29
|
+
import type {Relationships} from '../relationships/index.d.ts';
|
|
30
|
+
import type {
|
|
31
|
+
Cell,
|
|
32
|
+
CellOrUndefined,
|
|
33
|
+
Row,
|
|
34
|
+
Store,
|
|
35
|
+
Table,
|
|
36
|
+
Tables,
|
|
37
|
+
Value,
|
|
38
|
+
ValueOrUndefined,
|
|
39
|
+
Values,
|
|
40
|
+
} from '../store/index.d.ts';
|
|
41
|
+
import type {Synchronizer} from '../synchronizers/index.d.ts';
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The R type represents a value that can be provided either as a plain value
|
|
45
|
+
* or as a reactive getter function.
|
|
46
|
+
*
|
|
47
|
+
* When a getter function is provided to a hook, the hook's internal `$effect`
|
|
48
|
+
* will re-run whenever the getter's reactive dependencies change. This is the
|
|
49
|
+
* mechanism that makes Svelte 5 props reactive in hooks.
|
|
50
|
+
* @category Identity
|
|
51
|
+
* @since v8.1.0
|
|
52
|
+
*/
|
|
53
|
+
export type R<T> = T | (() => T);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The ProviderProps type describes the props of the Provider component.
|
|
57
|
+
* @category Props
|
|
58
|
+
* @since v8.1.0
|
|
59
|
+
*/
|
|
60
|
+
export type ProviderProps = {
|
|
61
|
+
/**
|
|
62
|
+
* A default single Store object that will be available within the Provider
|
|
63
|
+
* context.
|
|
64
|
+
* @category Prop
|
|
65
|
+
* @since v1.0.0
|
|
66
|
+
*/
|
|
67
|
+
readonly store?: Store;
|
|
68
|
+
/**
|
|
69
|
+
* An object containing multiple Store objects that will be available within
|
|
70
|
+
* the Provider context by their Id.
|
|
71
|
+
* @category Prop
|
|
72
|
+
* @since v1.0.0
|
|
73
|
+
*/
|
|
74
|
+
readonly storesById?: {readonly [id: Id]: Store};
|
|
75
|
+
/**
|
|
76
|
+
* A default single Metrics object that will be available within the Provider
|
|
77
|
+
* context.
|
|
78
|
+
* @category Prop
|
|
79
|
+
* @since v1.0.0
|
|
80
|
+
*/
|
|
81
|
+
readonly metrics?: Metrics;
|
|
82
|
+
/**
|
|
83
|
+
* An object containing multiple Metrics objects that will be available within
|
|
84
|
+
* the Provider context by their Id.
|
|
85
|
+
* @category Prop
|
|
86
|
+
* @since v1.0.0
|
|
87
|
+
*/
|
|
88
|
+
readonly metricsById?: {readonly [id: Id]: Metrics};
|
|
89
|
+
/**
|
|
90
|
+
* A default single Indexes object that will be available within the Provider
|
|
91
|
+
* context.
|
|
92
|
+
* @category Prop
|
|
93
|
+
* @since v1.0.0
|
|
94
|
+
*/
|
|
95
|
+
readonly indexes?: Indexes;
|
|
96
|
+
/**
|
|
97
|
+
* An object containing multiple Indexes objects that will be available within
|
|
98
|
+
* the Provider context by their Id.
|
|
99
|
+
* @category Prop
|
|
100
|
+
* @since v1.0.0
|
|
101
|
+
*/
|
|
102
|
+
readonly indexesById?: {readonly [id: Id]: Indexes};
|
|
103
|
+
/**
|
|
104
|
+
* A default single Relationships object that will be available within the
|
|
105
|
+
* Provider context.
|
|
106
|
+
* @category Prop
|
|
107
|
+
* @since v1.0.0
|
|
108
|
+
*/
|
|
109
|
+
readonly relationships?: Relationships;
|
|
110
|
+
/**
|
|
111
|
+
* An object containing multiple Relationships objects that will be available
|
|
112
|
+
* within the Provider context by their Id.
|
|
113
|
+
* @category Prop
|
|
114
|
+
* @since v1.0.0
|
|
115
|
+
*/
|
|
116
|
+
readonly relationshipsById?: {readonly [id: Id]: Relationships};
|
|
117
|
+
/**
|
|
118
|
+
* A default single Queries object that will be available within the Provider
|
|
119
|
+
* context, since v2.0.
|
|
120
|
+
* @category Prop
|
|
121
|
+
* @since v1.0.0
|
|
122
|
+
*/
|
|
123
|
+
readonly queries?: Queries;
|
|
124
|
+
/**
|
|
125
|
+
* An object containing multiple Queries objects that will be available within
|
|
126
|
+
* the Provider context by their Id, since v2.0.
|
|
127
|
+
* @category Prop
|
|
128
|
+
* @since v1.0.0
|
|
129
|
+
*/
|
|
130
|
+
readonly queriesById?: {readonly [id: Id]: Queries};
|
|
131
|
+
/**
|
|
132
|
+
* A default single Checkpoints object that will be available within the
|
|
133
|
+
* Provider context.
|
|
134
|
+
* @category Prop
|
|
135
|
+
* @since v1.0.0
|
|
136
|
+
*/
|
|
137
|
+
readonly checkpoints?: Checkpoints;
|
|
138
|
+
/**
|
|
139
|
+
* An object containing multiple Checkpoints objects that will be available
|
|
140
|
+
* within the Provider context by their Id.
|
|
141
|
+
* @category Prop
|
|
142
|
+
* @since v1.0.0
|
|
143
|
+
*/
|
|
144
|
+
readonly checkpointsById?: {readonly [id: Id]: Checkpoints};
|
|
145
|
+
/**
|
|
146
|
+
* A default single Persister object that will be available within the
|
|
147
|
+
* Provider context.
|
|
148
|
+
* @category Prop
|
|
149
|
+
* @since v5.3.0
|
|
150
|
+
*/
|
|
151
|
+
readonly persister?: AnyPersister;
|
|
152
|
+
/**
|
|
153
|
+
* An object containing multiple Persister objects that will be available
|
|
154
|
+
* within the Provider context by their Id.
|
|
155
|
+
* @category Prop
|
|
156
|
+
* @since v5.3.0
|
|
157
|
+
*/
|
|
158
|
+
readonly persistersById?: {readonly [id: Id]: AnyPersister};
|
|
159
|
+
/**
|
|
160
|
+
* A default single Synchronizer object that will be available within the
|
|
161
|
+
* Provider context.
|
|
162
|
+
* @category Prop
|
|
163
|
+
* @since v5.3.0
|
|
164
|
+
*/
|
|
165
|
+
readonly synchronizer?: Synchronizer;
|
|
166
|
+
/**
|
|
167
|
+
* An object containing multiple Synchronizer objects that will be available
|
|
168
|
+
* within the Provider context by their Id.
|
|
169
|
+
* @category Prop
|
|
170
|
+
* @since v5.3.0
|
|
171
|
+
*/
|
|
172
|
+
readonly synchronizersById?: {readonly [id: Id]: Synchronizer};
|
|
173
|
+
/**
|
|
174
|
+
* The `children` prop of a ProviderProps object — the app subtree that will
|
|
175
|
+
* have access to the provided context.
|
|
176
|
+
* @category Props
|
|
177
|
+
* @since v8.1.0
|
|
178
|
+
*/
|
|
179
|
+
readonly children: Snippet;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The CellViewProps type describes the props of the CellView component.
|
|
184
|
+
* @category Props
|
|
185
|
+
* @since v8.1.0
|
|
186
|
+
*/
|
|
187
|
+
export type CellViewProps = {
|
|
188
|
+
/**
|
|
189
|
+
* The `tableId` prop of a CellViewProps object.
|
|
190
|
+
* @category Props
|
|
191
|
+
* @since v8.1.0
|
|
192
|
+
*/
|
|
193
|
+
readonly tableId: Id;
|
|
194
|
+
/**
|
|
195
|
+
* The `rowId` prop of a CellViewProps object.
|
|
196
|
+
* @category Props
|
|
197
|
+
* @since v8.1.0
|
|
198
|
+
*/
|
|
199
|
+
readonly rowId: Id;
|
|
200
|
+
/**
|
|
201
|
+
* The `cellId` prop of a CellViewProps object.
|
|
202
|
+
* @category Props
|
|
203
|
+
* @since v8.1.0
|
|
204
|
+
*/
|
|
205
|
+
readonly cellId: Id;
|
|
206
|
+
/**
|
|
207
|
+
* The `store` prop of a CellViewProps object.
|
|
208
|
+
* @category Props
|
|
209
|
+
* @since v8.1.0
|
|
210
|
+
*/
|
|
211
|
+
readonly store?: Store | Id;
|
|
212
|
+
/**
|
|
213
|
+
* The `debugIds` prop of a CellViewProps object.
|
|
214
|
+
* @category Props
|
|
215
|
+
* @since v8.1.0
|
|
216
|
+
*/
|
|
217
|
+
readonly debugIds?: boolean;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The ValueViewProps type describes the props of the ValueView component.
|
|
222
|
+
* @category Props
|
|
223
|
+
* @since v8.1.0
|
|
224
|
+
*/
|
|
225
|
+
export type ValueViewProps = {
|
|
226
|
+
/**
|
|
227
|
+
* The `valueId` prop of a ValueViewProps object.
|
|
228
|
+
* @category Props
|
|
229
|
+
* @since v8.1.0
|
|
230
|
+
*/
|
|
231
|
+
readonly valueId: Id;
|
|
232
|
+
/**
|
|
233
|
+
* The `store` prop of a ValueViewProps object.
|
|
234
|
+
* @category Props
|
|
235
|
+
* @since v8.1.0
|
|
236
|
+
*/
|
|
237
|
+
readonly store?: Store | Id;
|
|
238
|
+
/**
|
|
239
|
+
* The `debugIds` prop of a ValueViewProps object.
|
|
240
|
+
* @category Props
|
|
241
|
+
* @since v8.1.0
|
|
242
|
+
*/
|
|
243
|
+
readonly debugIds?: boolean;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* The MetricViewProps type describes the props of the MetricView component.
|
|
248
|
+
* @category Props
|
|
249
|
+
* @since v8.1.0
|
|
250
|
+
*/
|
|
251
|
+
export type MetricViewProps = {
|
|
252
|
+
/**
|
|
253
|
+
* The `metricId` prop of a MetricViewProps object.
|
|
254
|
+
* @category Props
|
|
255
|
+
* @since v8.1.0
|
|
256
|
+
*/
|
|
257
|
+
readonly metricId: Id;
|
|
258
|
+
/**
|
|
259
|
+
* The `metrics` prop of a MetricViewProps object.
|
|
260
|
+
* @category Props
|
|
261
|
+
* @since v8.1.0
|
|
262
|
+
*/
|
|
263
|
+
readonly metrics?: Metrics | Id;
|
|
264
|
+
/**
|
|
265
|
+
* The `debugIds` prop of a MetricViewProps object.
|
|
266
|
+
* @category Props
|
|
267
|
+
* @since v8.1.0
|
|
268
|
+
*/
|
|
269
|
+
readonly debugIds?: boolean;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* The CheckpointViewProps type describes the props of the CheckpointView
|
|
274
|
+
* component.
|
|
275
|
+
* @category Props
|
|
276
|
+
* @since v8.1.0
|
|
277
|
+
*/
|
|
278
|
+
export type CheckpointViewProps = {
|
|
279
|
+
/**
|
|
280
|
+
* The `checkpointId` prop of a CheckpointViewProps object.
|
|
281
|
+
* @category Props
|
|
282
|
+
* @since v8.1.0
|
|
283
|
+
*/
|
|
284
|
+
readonly checkpointId: Id;
|
|
285
|
+
/**
|
|
286
|
+
* The `checkpoints` prop of a CheckpointViewProps object.
|
|
287
|
+
* @category Props
|
|
288
|
+
* @since v8.1.0
|
|
289
|
+
*/
|
|
290
|
+
readonly checkpoints?: Checkpoints | Id;
|
|
291
|
+
/**
|
|
292
|
+
* The `debugIds` prop of a CheckpointViewProps object.
|
|
293
|
+
* @category Props
|
|
294
|
+
* @since v8.1.0
|
|
295
|
+
*/
|
|
296
|
+
readonly debugIds?: boolean;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* The RowViewProps type describes the props of the RowView component.
|
|
301
|
+
* @category Props
|
|
302
|
+
* @since v8.1.0
|
|
303
|
+
*/
|
|
304
|
+
export type RowViewProps = {
|
|
305
|
+
/**
|
|
306
|
+
* The `tableId` prop of a RowViewProps object.
|
|
307
|
+
* @category Props
|
|
308
|
+
* @since v8.1.0
|
|
309
|
+
*/
|
|
310
|
+
readonly tableId: Id;
|
|
311
|
+
/**
|
|
312
|
+
* The `rowId` prop of a RowViewProps object.
|
|
313
|
+
* @category Props
|
|
314
|
+
* @since v8.1.0
|
|
315
|
+
*/
|
|
316
|
+
readonly rowId: Id;
|
|
317
|
+
/**
|
|
318
|
+
* The `store` prop of a RowViewProps object.
|
|
319
|
+
* @category Props
|
|
320
|
+
* @since v8.1.0
|
|
321
|
+
*/
|
|
322
|
+
readonly store?: Store | Id;
|
|
323
|
+
/**
|
|
324
|
+
* The `customCellIds` prop of a RowViewProps object.
|
|
325
|
+
* @category Props
|
|
326
|
+
* @since v8.1.0
|
|
327
|
+
*/
|
|
328
|
+
readonly customCellIds?: Ids;
|
|
329
|
+
/**
|
|
330
|
+
* The `separator` prop of a RowViewProps object.
|
|
331
|
+
* @category Props
|
|
332
|
+
* @since v8.1.0
|
|
333
|
+
*/
|
|
334
|
+
readonly separator?: Snippet<[]>;
|
|
335
|
+
/**
|
|
336
|
+
* The `debugIds` prop of a RowViewProps object.
|
|
337
|
+
* @category Props
|
|
338
|
+
* @since v8.1.0
|
|
339
|
+
*/
|
|
340
|
+
readonly debugIds?: boolean;
|
|
341
|
+
/**
|
|
342
|
+
* The `cell` snippet prop of a RowViewProps object.
|
|
343
|
+
* @category Props
|
|
344
|
+
* @since v8.1.0
|
|
345
|
+
*/
|
|
346
|
+
readonly cell?: Snippet<[cellId: Id]>;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* The TableViewProps type describes the props of the TableView component.
|
|
351
|
+
* @category Props
|
|
352
|
+
* @since v8.1.0
|
|
353
|
+
*/
|
|
354
|
+
export type TableViewProps = {
|
|
355
|
+
/**
|
|
356
|
+
* The `tableId` prop of a TableViewProps object.
|
|
357
|
+
* @category Props
|
|
358
|
+
* @since v8.1.0
|
|
359
|
+
*/
|
|
360
|
+
readonly tableId: Id;
|
|
361
|
+
/**
|
|
362
|
+
* The `store` prop of a TableViewProps object.
|
|
363
|
+
* @category Props
|
|
364
|
+
* @since v8.1.0
|
|
365
|
+
*/
|
|
366
|
+
readonly store?: Store | Id;
|
|
367
|
+
/**
|
|
368
|
+
* The `customCellIds` prop of a TableViewProps object.
|
|
369
|
+
* @category Props
|
|
370
|
+
* @since v8.1.0
|
|
371
|
+
*/
|
|
372
|
+
readonly customCellIds?: Ids;
|
|
373
|
+
/**
|
|
374
|
+
* The `separator` prop of a TableViewProps object.
|
|
375
|
+
* @category Props
|
|
376
|
+
* @since v8.1.0
|
|
377
|
+
*/
|
|
378
|
+
readonly separator?: Snippet<[]>;
|
|
379
|
+
/**
|
|
380
|
+
* The `debugIds` prop of a TableViewProps object.
|
|
381
|
+
* @category Props
|
|
382
|
+
* @since v8.1.0
|
|
383
|
+
*/
|
|
384
|
+
readonly debugIds?: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* The `row` snippet prop of a TableViewProps object.
|
|
387
|
+
* @category Props
|
|
388
|
+
* @since v8.1.0
|
|
389
|
+
*/
|
|
390
|
+
readonly row?: Snippet<[rowId: Id]>;
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* The SortedTableViewProps type describes the props of the SortedTableView
|
|
395
|
+
* component.
|
|
396
|
+
* @category Props
|
|
397
|
+
* @since v8.1.0
|
|
398
|
+
*/
|
|
399
|
+
export type SortedTableViewProps = {
|
|
400
|
+
/**
|
|
401
|
+
* The `tableId` prop of a SortedTableViewProps object.
|
|
402
|
+
* @category Props
|
|
403
|
+
* @since v8.1.0
|
|
404
|
+
*/
|
|
405
|
+
readonly tableId: Id;
|
|
406
|
+
/**
|
|
407
|
+
* The `cellId` prop of a SortedTableViewProps object.
|
|
408
|
+
* @category Props
|
|
409
|
+
* @since v8.1.0
|
|
410
|
+
*/
|
|
411
|
+
readonly cellId?: Id;
|
|
412
|
+
/**
|
|
413
|
+
* The `descending` prop of a SortedTableViewProps object.
|
|
414
|
+
* @category Props
|
|
415
|
+
* @since v8.1.0
|
|
416
|
+
*/
|
|
417
|
+
readonly descending?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* The `offset` prop of a SortedTableViewProps object.
|
|
420
|
+
* @category Props
|
|
421
|
+
* @since v8.1.0
|
|
422
|
+
*/
|
|
423
|
+
readonly offset?: number;
|
|
424
|
+
/**
|
|
425
|
+
* The `limit` prop of a SortedTableViewProps object.
|
|
426
|
+
* @category Props
|
|
427
|
+
* @since v8.1.0
|
|
428
|
+
*/
|
|
429
|
+
readonly limit?: number;
|
|
430
|
+
/**
|
|
431
|
+
* The `store` prop of a SortedTableViewProps object.
|
|
432
|
+
* @category Props
|
|
433
|
+
* @since v8.1.0
|
|
434
|
+
*/
|
|
435
|
+
readonly store?: Store | Id;
|
|
436
|
+
/**
|
|
437
|
+
* The `customCellIds` prop of a SortedTableViewProps object.
|
|
438
|
+
* @category Props
|
|
439
|
+
* @since v8.1.0
|
|
440
|
+
*/
|
|
441
|
+
readonly customCellIds?: Ids;
|
|
442
|
+
/**
|
|
443
|
+
* The `separator` prop of a SortedTableViewProps object.
|
|
444
|
+
* @category Props
|
|
445
|
+
* @since v8.1.0
|
|
446
|
+
*/
|
|
447
|
+
readonly separator?: Snippet<[]>;
|
|
448
|
+
/**
|
|
449
|
+
* The `debugIds` prop of a SortedTableViewProps object.
|
|
450
|
+
* @category Props
|
|
451
|
+
* @since v8.1.0
|
|
452
|
+
*/
|
|
453
|
+
readonly debugIds?: boolean;
|
|
454
|
+
/**
|
|
455
|
+
* The `row` snippet prop of a SortedTableViewProps object.
|
|
456
|
+
* @category Props
|
|
457
|
+
* @since v8.1.0
|
|
458
|
+
*/
|
|
459
|
+
readonly row?: Snippet<[rowId: Id]>;
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* The TablesViewProps type describes the props of the TablesView component.
|
|
464
|
+
* @category Props
|
|
465
|
+
* @since v8.1.0
|
|
466
|
+
*/
|
|
467
|
+
export type TablesViewProps = {
|
|
468
|
+
/**
|
|
469
|
+
* The `store` prop of a TablesViewProps object.
|
|
470
|
+
* @category Props
|
|
471
|
+
* @since v8.1.0
|
|
472
|
+
*/
|
|
473
|
+
readonly store?: Store | Id;
|
|
474
|
+
/**
|
|
475
|
+
* The `separator` prop of a TablesViewProps object.
|
|
476
|
+
* @category Props
|
|
477
|
+
* @since v8.1.0
|
|
478
|
+
*/
|
|
479
|
+
readonly separator?: Snippet<[]>;
|
|
480
|
+
/**
|
|
481
|
+
* The `debugIds` prop of a TablesViewProps object.
|
|
482
|
+
* @category Props
|
|
483
|
+
* @since v8.1.0
|
|
484
|
+
*/
|
|
485
|
+
readonly debugIds?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* The `table` snippet prop of a TablesViewProps object.
|
|
488
|
+
* @category Props
|
|
489
|
+
* @since v8.1.0
|
|
490
|
+
*/
|
|
491
|
+
readonly table?: Snippet<[tableId: Id]>;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* The ValuesViewProps type describes the props of the ValuesView component.
|
|
496
|
+
* @category Props
|
|
497
|
+
* @since v8.1.0
|
|
498
|
+
*/
|
|
499
|
+
export type ValuesViewProps = {
|
|
500
|
+
/**
|
|
501
|
+
* The `store` prop of a ValuesViewProps object.
|
|
502
|
+
* @category Props
|
|
503
|
+
* @since v8.1.0
|
|
504
|
+
*/
|
|
505
|
+
readonly store?: Store | Id;
|
|
506
|
+
/**
|
|
507
|
+
* The `separator` prop of a ValuesViewProps object.
|
|
508
|
+
* @category Props
|
|
509
|
+
* @since v8.1.0
|
|
510
|
+
*/
|
|
511
|
+
readonly separator?: Snippet<[]>;
|
|
512
|
+
/**
|
|
513
|
+
* The `debugIds` prop of a ValuesViewProps object.
|
|
514
|
+
* @category Props
|
|
515
|
+
* @since v8.1.0
|
|
516
|
+
*/
|
|
517
|
+
readonly debugIds?: boolean;
|
|
518
|
+
/**
|
|
519
|
+
* The `value` snippet prop of a ValuesViewProps object.
|
|
520
|
+
* @category Props
|
|
521
|
+
* @since v8.1.0
|
|
522
|
+
*/
|
|
523
|
+
readonly value?: Snippet<[valueId: Id]>;
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* The IndexViewProps type describes the props of the IndexView component.
|
|
528
|
+
* @category Props
|
|
529
|
+
* @since v8.1.0
|
|
530
|
+
*/
|
|
531
|
+
export type IndexViewProps = {
|
|
532
|
+
/**
|
|
533
|
+
* The `indexId` prop of an IndexViewProps object.
|
|
534
|
+
* @category Props
|
|
535
|
+
* @since v8.1.0
|
|
536
|
+
*/
|
|
537
|
+
readonly indexId: Id;
|
|
538
|
+
/**
|
|
539
|
+
* The `indexes` prop of an IndexViewProps object.
|
|
540
|
+
* @category Props
|
|
541
|
+
* @since v8.1.0
|
|
542
|
+
*/
|
|
543
|
+
readonly indexes?: Indexes | Id;
|
|
544
|
+
/**
|
|
545
|
+
* The `separator` prop of an IndexViewProps object.
|
|
546
|
+
* @category Props
|
|
547
|
+
* @since v8.1.0
|
|
548
|
+
*/
|
|
549
|
+
readonly separator?: Snippet<[]>;
|
|
550
|
+
/**
|
|
551
|
+
* The `debugIds` prop of an IndexViewProps object.
|
|
552
|
+
* @category Props
|
|
553
|
+
* @since v8.1.0
|
|
554
|
+
*/
|
|
555
|
+
readonly debugIds?: boolean;
|
|
556
|
+
/**
|
|
557
|
+
* The `slice` snippet prop of an IndexViewProps object.
|
|
558
|
+
* @category Props
|
|
559
|
+
* @since v8.1.0
|
|
560
|
+
*/
|
|
561
|
+
readonly slice?: Snippet<[sliceId: Id]>;
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* The SliceViewProps type describes the props of the SliceView component.
|
|
566
|
+
* @category Props
|
|
567
|
+
* @since v8.1.0
|
|
568
|
+
*/
|
|
569
|
+
export type SliceViewProps = {
|
|
570
|
+
/**
|
|
571
|
+
* The `indexId` prop of a SliceViewProps object.
|
|
572
|
+
* @category Props
|
|
573
|
+
* @since v8.1.0
|
|
574
|
+
*/
|
|
575
|
+
readonly indexId: Id;
|
|
576
|
+
/**
|
|
577
|
+
* The `sliceId` prop of a SliceViewProps object.
|
|
578
|
+
* @category Props
|
|
579
|
+
* @since v8.1.0
|
|
580
|
+
*/
|
|
581
|
+
readonly sliceId: Id;
|
|
582
|
+
/**
|
|
583
|
+
* The `indexes` prop of a SliceViewProps object.
|
|
584
|
+
* @category Props
|
|
585
|
+
* @since v8.1.0
|
|
586
|
+
*/
|
|
587
|
+
readonly indexes?: Indexes | Id;
|
|
588
|
+
/**
|
|
589
|
+
* The `separator` prop of a SliceViewProps object.
|
|
590
|
+
* @category Props
|
|
591
|
+
* @since v8.1.0
|
|
592
|
+
*/
|
|
593
|
+
readonly separator?: Snippet<[]>;
|
|
594
|
+
/**
|
|
595
|
+
* The `debugIds` prop of a SliceViewProps object.
|
|
596
|
+
* @category Props
|
|
597
|
+
* @since v8.1.0
|
|
598
|
+
*/
|
|
599
|
+
readonly debugIds?: boolean;
|
|
600
|
+
/**
|
|
601
|
+
* The `row` snippet prop of a SliceViewProps object.
|
|
602
|
+
* @category Props
|
|
603
|
+
* @since v8.1.0
|
|
604
|
+
*/
|
|
605
|
+
readonly row?: Snippet<[rowId: Id]>;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* The RemoteRowViewProps type describes the props of the RemoteRowView
|
|
610
|
+
* component.
|
|
611
|
+
* @category Props
|
|
612
|
+
* @since v8.1.0
|
|
613
|
+
*/
|
|
614
|
+
export type RemoteRowViewProps = {
|
|
615
|
+
/**
|
|
616
|
+
* The `relationshipId` prop of a RemoteRowViewProps object.
|
|
617
|
+
* @category Props
|
|
618
|
+
* @since v8.1.0
|
|
619
|
+
*/
|
|
620
|
+
readonly relationshipId: Id;
|
|
621
|
+
/**
|
|
622
|
+
* The `localRowId` prop of a RemoteRowViewProps object.
|
|
623
|
+
* @category Props
|
|
624
|
+
* @since v8.1.0
|
|
625
|
+
*/
|
|
626
|
+
readonly localRowId: Id;
|
|
627
|
+
/**
|
|
628
|
+
* The `relationships` prop of a RemoteRowViewProps object.
|
|
629
|
+
* @category Props
|
|
630
|
+
* @since v8.1.0
|
|
631
|
+
*/
|
|
632
|
+
readonly relationships?: Relationships | Id;
|
|
633
|
+
/**
|
|
634
|
+
* The `debugIds` prop of a RemoteRowViewProps object.
|
|
635
|
+
* @category Props
|
|
636
|
+
* @since v8.1.0
|
|
637
|
+
*/
|
|
638
|
+
readonly debugIds?: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* The `row` snippet prop of a RemoteRowViewProps object.
|
|
641
|
+
* @category Props
|
|
642
|
+
* @since v8.1.0
|
|
643
|
+
*/
|
|
644
|
+
readonly row?: Snippet<[rowId: Id]>;
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* The LocalRowsViewProps type describes the props of the LocalRowsView
|
|
649
|
+
* component.
|
|
650
|
+
* @category Props
|
|
651
|
+
* @since v8.1.0
|
|
652
|
+
*/
|
|
653
|
+
export type LocalRowsViewProps = {
|
|
654
|
+
/**
|
|
655
|
+
* The `relationshipId` prop of a LocalRowsViewProps object.
|
|
656
|
+
* @category Props
|
|
657
|
+
* @since v8.1.0
|
|
658
|
+
*/
|
|
659
|
+
readonly relationshipId: Id;
|
|
660
|
+
/**
|
|
661
|
+
* The `remoteRowId` prop of a LocalRowsViewProps object.
|
|
662
|
+
* @category Props
|
|
663
|
+
* @since v8.1.0
|
|
664
|
+
*/
|
|
665
|
+
readonly remoteRowId: Id;
|
|
666
|
+
/**
|
|
667
|
+
* The `relationships` prop of a LocalRowsViewProps object.
|
|
668
|
+
* @category Props
|
|
669
|
+
* @since v8.1.0
|
|
670
|
+
*/
|
|
671
|
+
readonly relationships?: Relationships | Id;
|
|
672
|
+
/**
|
|
673
|
+
* The `separator` prop of a LocalRowsViewProps object.
|
|
674
|
+
* @category Props
|
|
675
|
+
* @since v8.1.0
|
|
676
|
+
*/
|
|
677
|
+
readonly separator?: Snippet<[]>;
|
|
678
|
+
/**
|
|
679
|
+
* The `debugIds` prop of a LocalRowsViewProps object.
|
|
680
|
+
* @category Props
|
|
681
|
+
* @since v8.1.0
|
|
682
|
+
*/
|
|
683
|
+
readonly debugIds?: boolean;
|
|
684
|
+
/**
|
|
685
|
+
* The `row` snippet prop of a LocalRowsViewProps object.
|
|
686
|
+
* @category Props
|
|
687
|
+
* @since v8.1.0
|
|
688
|
+
*/
|
|
689
|
+
readonly row?: Snippet<[rowId: Id]>;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* The LinkedRowsViewProps type describes the props of the LinkedRowsView
|
|
694
|
+
* component.
|
|
695
|
+
* @category Props
|
|
696
|
+
* @since v8.1.0
|
|
697
|
+
*/
|
|
698
|
+
export type LinkedRowsViewProps = {
|
|
699
|
+
/**
|
|
700
|
+
* The `relationshipId` prop of a LinkedRowsViewProps object.
|
|
701
|
+
* @category Props
|
|
702
|
+
* @since v8.1.0
|
|
703
|
+
*/
|
|
704
|
+
readonly relationshipId: Id;
|
|
705
|
+
/**
|
|
706
|
+
* The `firstRowId` prop of a LinkedRowsViewProps object.
|
|
707
|
+
* @category Props
|
|
708
|
+
* @since v8.1.0
|
|
709
|
+
*/
|
|
710
|
+
readonly firstRowId: Id;
|
|
711
|
+
/**
|
|
712
|
+
* The `relationships` prop of a LinkedRowsViewProps object.
|
|
713
|
+
* @category Props
|
|
714
|
+
* @since v8.1.0
|
|
715
|
+
*/
|
|
716
|
+
readonly relationships?: Relationships | Id;
|
|
717
|
+
/**
|
|
718
|
+
* The `separator` prop of a LinkedRowsViewProps object.
|
|
719
|
+
* @category Props
|
|
720
|
+
* @since v8.1.0
|
|
721
|
+
*/
|
|
722
|
+
readonly separator?: Snippet<[]>;
|
|
723
|
+
/**
|
|
724
|
+
* The `debugIds` prop of a LinkedRowsViewProps object.
|
|
725
|
+
* @category Props
|
|
726
|
+
* @since v8.1.0
|
|
727
|
+
*/
|
|
728
|
+
readonly debugIds?: boolean;
|
|
729
|
+
/**
|
|
730
|
+
* The `row` snippet prop of a LinkedRowsViewProps object.
|
|
731
|
+
* @category Props
|
|
732
|
+
* @since v8.1.0
|
|
733
|
+
*/
|
|
734
|
+
readonly row?: Snippet<[rowId: Id]>;
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* The ResultCellViewProps type describes the props of the ResultCellView
|
|
739
|
+
* component.
|
|
740
|
+
* @category Props
|
|
741
|
+
* @since v8.1.0
|
|
742
|
+
*/
|
|
743
|
+
export type ResultCellViewProps = {
|
|
744
|
+
/**
|
|
745
|
+
* The `queryId` prop of a ResultCellViewProps object.
|
|
746
|
+
* @category Props
|
|
747
|
+
* @since v8.1.0
|
|
748
|
+
*/
|
|
749
|
+
readonly queryId: Id;
|
|
750
|
+
/**
|
|
751
|
+
* The `rowId` prop of a ResultCellViewProps object.
|
|
752
|
+
* @category Props
|
|
753
|
+
* @since v8.1.0
|
|
754
|
+
*/
|
|
755
|
+
readonly rowId: Id;
|
|
756
|
+
/**
|
|
757
|
+
* The `cellId` prop of a ResultCellViewProps object.
|
|
758
|
+
* @category Props
|
|
759
|
+
* @since v8.1.0
|
|
760
|
+
*/
|
|
761
|
+
readonly cellId: Id;
|
|
762
|
+
/**
|
|
763
|
+
* The `queries` prop of a ResultCellViewProps object.
|
|
764
|
+
* @category Props
|
|
765
|
+
* @since v8.1.0
|
|
766
|
+
*/
|
|
767
|
+
readonly queries?: Queries | Id;
|
|
768
|
+
/**
|
|
769
|
+
* The `debugIds` prop of a ResultCellViewProps object.
|
|
770
|
+
* @category Props
|
|
771
|
+
* @since v8.1.0
|
|
772
|
+
*/
|
|
773
|
+
readonly debugIds?: boolean;
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* The ResultRowViewProps type describes the props of the ResultRowView
|
|
778
|
+
* component.
|
|
779
|
+
* @category Props
|
|
780
|
+
* @since v8.1.0
|
|
781
|
+
*/
|
|
782
|
+
export type ResultRowViewProps = {
|
|
783
|
+
/**
|
|
784
|
+
* The `queryId` prop of a ResultRowViewProps object.
|
|
785
|
+
* @category Props
|
|
786
|
+
* @since v8.1.0
|
|
787
|
+
*/
|
|
788
|
+
readonly queryId: Id;
|
|
789
|
+
/**
|
|
790
|
+
* The `rowId` prop of a ResultRowViewProps object.
|
|
791
|
+
* @category Props
|
|
792
|
+
* @since v8.1.0
|
|
793
|
+
*/
|
|
794
|
+
readonly rowId: Id;
|
|
795
|
+
/**
|
|
796
|
+
* The `queries` prop of a ResultRowViewProps object.
|
|
797
|
+
* @category Props
|
|
798
|
+
* @since v8.1.0
|
|
799
|
+
*/
|
|
800
|
+
readonly queries?: Queries | Id;
|
|
801
|
+
/**
|
|
802
|
+
* The `separator` prop of a ResultRowViewProps object.
|
|
803
|
+
* @category Props
|
|
804
|
+
* @since v8.1.0
|
|
805
|
+
*/
|
|
806
|
+
readonly separator?: Snippet<[]>;
|
|
807
|
+
/**
|
|
808
|
+
* The `debugIds` prop of a ResultRowViewProps object.
|
|
809
|
+
* @category Props
|
|
810
|
+
* @since v8.1.0
|
|
811
|
+
*/
|
|
812
|
+
readonly debugIds?: boolean;
|
|
813
|
+
/**
|
|
814
|
+
* The `cell` snippet prop of a ResultRowViewProps object.
|
|
815
|
+
* @category Props
|
|
816
|
+
* @since v8.1.0
|
|
817
|
+
*/
|
|
818
|
+
readonly cell?: Snippet<[cellId: Id]>;
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* The ResultTableViewProps type describes the props of the ResultTableView
|
|
823
|
+
* component.
|
|
824
|
+
* @category Props
|
|
825
|
+
* @since v8.1.0
|
|
826
|
+
*/
|
|
827
|
+
export type ResultTableViewProps = {
|
|
828
|
+
/**
|
|
829
|
+
* The `queryId` prop of a ResultTableViewProps object.
|
|
830
|
+
* @category Props
|
|
831
|
+
* @since v8.1.0
|
|
832
|
+
*/
|
|
833
|
+
readonly queryId: Id;
|
|
834
|
+
/**
|
|
835
|
+
* The `queries` prop of a ResultTableViewProps object.
|
|
836
|
+
* @category Props
|
|
837
|
+
* @since v8.1.0
|
|
838
|
+
*/
|
|
839
|
+
readonly queries?: Queries | Id;
|
|
840
|
+
/**
|
|
841
|
+
* The `separator` prop of a ResultTableViewProps object.
|
|
842
|
+
* @category Props
|
|
843
|
+
* @since v8.1.0
|
|
844
|
+
*/
|
|
845
|
+
readonly separator?: Snippet<[]>;
|
|
846
|
+
/**
|
|
847
|
+
* The `debugIds` prop of a ResultTableViewProps object.
|
|
848
|
+
* @category Props
|
|
849
|
+
* @since v8.1.0
|
|
850
|
+
*/
|
|
851
|
+
readonly debugIds?: boolean;
|
|
852
|
+
/**
|
|
853
|
+
* The `row` snippet prop of a ResultTableViewProps object.
|
|
854
|
+
* @category Props
|
|
855
|
+
* @since v8.1.0
|
|
856
|
+
*/
|
|
857
|
+
readonly row?: Snippet<[rowId: Id]>;
|
|
858
|
+
};
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* The ResultSortedTableViewProps type describes the props of the
|
|
862
|
+
* ResultSortedTableView component.
|
|
863
|
+
* @category Props
|
|
864
|
+
* @since v8.1.0
|
|
865
|
+
*/
|
|
866
|
+
export type ResultSortedTableViewProps = {
|
|
867
|
+
/**
|
|
868
|
+
* The `queryId` prop of a ResultSortedTableViewProps object.
|
|
869
|
+
* @category Props
|
|
870
|
+
* @since v8.1.0
|
|
871
|
+
*/
|
|
872
|
+
readonly queryId: Id;
|
|
873
|
+
/**
|
|
874
|
+
* The `cellId` prop of a ResultSortedTableViewProps object.
|
|
875
|
+
* @category Props
|
|
876
|
+
* @since v8.1.0
|
|
877
|
+
*/
|
|
878
|
+
readonly cellId?: Id;
|
|
879
|
+
/**
|
|
880
|
+
* The `descending` prop of a ResultSortedTableViewProps object.
|
|
881
|
+
* @category Props
|
|
882
|
+
* @since v8.1.0
|
|
883
|
+
*/
|
|
884
|
+
readonly descending?: boolean;
|
|
885
|
+
/**
|
|
886
|
+
* The `offset` prop of a ResultSortedTableViewProps object.
|
|
887
|
+
* @category Props
|
|
888
|
+
* @since v8.1.0
|
|
889
|
+
*/
|
|
890
|
+
readonly offset?: number;
|
|
891
|
+
/**
|
|
892
|
+
* The `limit` prop of a ResultSortedTableViewProps object.
|
|
893
|
+
* @category Props
|
|
894
|
+
* @since v8.1.0
|
|
895
|
+
*/
|
|
896
|
+
readonly limit?: number;
|
|
897
|
+
/**
|
|
898
|
+
* The `queries` prop of a ResultSortedTableViewProps object.
|
|
899
|
+
* @category Props
|
|
900
|
+
* @since v8.1.0
|
|
901
|
+
*/
|
|
902
|
+
readonly queries?: Queries | Id;
|
|
903
|
+
/**
|
|
904
|
+
* The `separator` prop of a ResultSortedTableViewProps object.
|
|
905
|
+
* @category Props
|
|
906
|
+
* @since v8.1.0
|
|
907
|
+
*/
|
|
908
|
+
readonly separator?: Snippet<[]>;
|
|
909
|
+
/**
|
|
910
|
+
* The `debugIds` prop of a ResultSortedTableViewProps object.
|
|
911
|
+
* @category Props
|
|
912
|
+
* @since v8.1.0
|
|
913
|
+
*/
|
|
914
|
+
readonly debugIds?: boolean;
|
|
915
|
+
/**
|
|
916
|
+
* The `row` snippet prop of a ResultSortedTableViewProps object.
|
|
917
|
+
* @category Props
|
|
918
|
+
* @since v8.1.0
|
|
919
|
+
*/
|
|
920
|
+
readonly row?: Snippet<[rowId: Id]>;
|
|
921
|
+
};
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* The BackwardCheckpointsViewProps type describes the props of the
|
|
925
|
+
* BackwardCheckpointsView component.
|
|
926
|
+
* @category Props
|
|
927
|
+
* @since v8.1.0
|
|
928
|
+
*/
|
|
929
|
+
export type BackwardCheckpointsViewProps = {
|
|
930
|
+
/**
|
|
931
|
+
* The `checkpoints` prop of a BackwardCheckpointsViewProps object.
|
|
932
|
+
* @category Props
|
|
933
|
+
* @since v8.1.0
|
|
934
|
+
*/
|
|
935
|
+
readonly checkpoints?: Checkpoints | Id;
|
|
936
|
+
/**
|
|
937
|
+
* The `separator` prop of a BackwardCheckpointsViewProps object.
|
|
938
|
+
* @category Props
|
|
939
|
+
* @since v8.1.0
|
|
940
|
+
*/
|
|
941
|
+
readonly separator?: Snippet<[]>;
|
|
942
|
+
/**
|
|
943
|
+
* The `debugIds` prop of a BackwardCheckpointsViewProps object.
|
|
944
|
+
* @category Props
|
|
945
|
+
* @since v8.1.0
|
|
946
|
+
*/
|
|
947
|
+
readonly debugIds?: boolean;
|
|
948
|
+
/**
|
|
949
|
+
* The `checkpoint` snippet prop of a BackwardCheckpointsViewProps object.
|
|
950
|
+
* @category Props
|
|
951
|
+
* @since v8.1.0
|
|
952
|
+
*/
|
|
953
|
+
readonly checkpoint?: Snippet<[checkpointId: Id]>;
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* The ForwardCheckpointsViewProps type describes the props of the
|
|
958
|
+
* ForwardCheckpointsView component.
|
|
959
|
+
* @category Props
|
|
960
|
+
* @since v8.1.0
|
|
961
|
+
*/
|
|
962
|
+
export type ForwardCheckpointsViewProps = {
|
|
963
|
+
/**
|
|
964
|
+
* The `checkpoints` prop of a ForwardCheckpointsViewProps object.
|
|
965
|
+
* @category Props
|
|
966
|
+
* @since v8.1.0
|
|
967
|
+
*/
|
|
968
|
+
readonly checkpoints?: Checkpoints | Id;
|
|
969
|
+
/**
|
|
970
|
+
* The `separator` prop of a ForwardCheckpointsViewProps object.
|
|
971
|
+
* @category Props
|
|
972
|
+
* @since v8.1.0
|
|
973
|
+
*/
|
|
974
|
+
readonly separator?: Snippet<[]>;
|
|
975
|
+
/**
|
|
976
|
+
* The `debugIds` prop of a ForwardCheckpointsViewProps object.
|
|
977
|
+
* @category Props
|
|
978
|
+
* @since v8.1.0
|
|
979
|
+
*/
|
|
980
|
+
readonly debugIds?: boolean;
|
|
981
|
+
/**
|
|
982
|
+
* The `checkpoint` snippet prop of a ForwardCheckpointsViewProps object.
|
|
983
|
+
* @category Props
|
|
984
|
+
* @since v8.1.0
|
|
985
|
+
*/
|
|
986
|
+
readonly checkpoint?: Snippet<[checkpointId: Id]>;
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* The CurrentCheckpointViewProps type describes the props of the
|
|
991
|
+
* CurrentCheckpointView component.
|
|
992
|
+
* @category Props
|
|
993
|
+
* @since v8.1.0
|
|
994
|
+
*/
|
|
995
|
+
export type CurrentCheckpointViewProps = {
|
|
996
|
+
/**
|
|
997
|
+
* The `checkpoints` prop of a CurrentCheckpointViewProps object.
|
|
998
|
+
* @category Props
|
|
999
|
+
* @since v8.1.0
|
|
1000
|
+
*/
|
|
1001
|
+
readonly checkpoints?: Checkpoints | Id;
|
|
1002
|
+
/**
|
|
1003
|
+
* The `debugIds` prop of a CurrentCheckpointViewProps object.
|
|
1004
|
+
* @category Props
|
|
1005
|
+
* @since v8.1.0
|
|
1006
|
+
*/
|
|
1007
|
+
readonly debugIds?: boolean;
|
|
1008
|
+
/**
|
|
1009
|
+
* The `checkpoint` snippet prop of a CurrentCheckpointViewProps object.
|
|
1010
|
+
* @category Props
|
|
1011
|
+
* @since v8.1.0
|
|
1012
|
+
*/
|
|
1013
|
+
readonly checkpoint?: Snippet<[checkpointId: Id]>;
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* The Provider component wraps part of an application to make TinyBase objects
|
|
1018
|
+
* available throughout its component subtree via Svelte context.
|
|
1019
|
+
*
|
|
1020
|
+
* Store objects, Metrics, Indexes, Relationships, Queries, Checkpoints,
|
|
1021
|
+
* Persisters, and Synchronizers can all be provided both as single defaults and
|
|
1022
|
+
* as named instances in a `*ById` map.
|
|
1023
|
+
* @param props The props for this component.
|
|
1024
|
+
* @example
|
|
1025
|
+
* This example creates a Provider context with a default Store.
|
|
1026
|
+
*
|
|
1027
|
+
* ```ts
|
|
1028
|
+
* // In a .svelte file:
|
|
1029
|
+
* // <Provider store={createStore()}>
|
|
1030
|
+
* // <App />
|
|
1031
|
+
* // </Provider>
|
|
1032
|
+
* ```
|
|
1033
|
+
* @category Component
|
|
1034
|
+
* @since v8.1.0
|
|
1035
|
+
*/
|
|
1036
|
+
export declare const Provider: Component<ProviderProps>;
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* The BackwardCheckpointsView component renders the list of checkpoint Ids that
|
|
1040
|
+
* represent backward checkpoints in a Checkpoints object, and registers a
|
|
1041
|
+
* listener so that any changes to that result will cause a re-render.
|
|
1042
|
+
* @param props The props for this component.
|
|
1043
|
+
* @returns A rendering of the backward checkpoint Ids.
|
|
1044
|
+
* @category Component
|
|
1045
|
+
* @since v8.1.0
|
|
1046
|
+
*/
|
|
1047
|
+
export declare const BackwardCheckpointsView: Component<BackwardCheckpointsViewProps>;
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* The CellView component renders the value of a single Cell in a given Row in
|
|
1051
|
+
* a given Table, and registers a listener so that any changes to that result
|
|
1052
|
+
* will cause a re-render.
|
|
1053
|
+
* @param props The props for this component.
|
|
1054
|
+
* @returns A rendering of the Cell, or nothing if not present.
|
|
1055
|
+
* @category Component
|
|
1056
|
+
* @since v8.1.0
|
|
1057
|
+
*/
|
|
1058
|
+
export declare const CellView: Component<CellViewProps>;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* The CheckpointView component renders the label of a checkpoint in a
|
|
1062
|
+
* Checkpoints object, and registers a listener so that any changes to that
|
|
1063
|
+
* result will cause a re-render.
|
|
1064
|
+
* @param props The props for this component.
|
|
1065
|
+
* @returns A rendering of the checkpoint label.
|
|
1066
|
+
* @category Component
|
|
1067
|
+
* @since v8.1.0
|
|
1068
|
+
*/
|
|
1069
|
+
export declare const CheckpointView: Component<CheckpointViewProps>;
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* The CurrentCheckpointView component renders the current checkpoint in a
|
|
1073
|
+
* Checkpoints object, and registers a listener so that any changes to that
|
|
1074
|
+
* result will cause a re-render.
|
|
1075
|
+
* @param props The props for this component.
|
|
1076
|
+
* @returns A rendering of the current checkpoint.
|
|
1077
|
+
* @category Component
|
|
1078
|
+
* @since v8.1.0
|
|
1079
|
+
*/
|
|
1080
|
+
export declare const CurrentCheckpointView: Component<CurrentCheckpointViewProps>;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* The ForwardCheckpointsView component renders the list of checkpoint Ids that
|
|
1084
|
+
* represent forward checkpoints in a Checkpoints object, and registers a
|
|
1085
|
+
* listener so that any changes to that result will cause a re-render.
|
|
1086
|
+
* @param props The props for this component.
|
|
1087
|
+
* @returns A rendering of the forward checkpoint Ids.
|
|
1088
|
+
* @category Component
|
|
1089
|
+
* @since v8.1.0
|
|
1090
|
+
*/
|
|
1091
|
+
export declare const ForwardCheckpointsView: Component<ForwardCheckpointsViewProps>;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* The IndexView component renders the slices in a named Index, and registers a
|
|
1095
|
+
* listener so that any changes to that result will cause a re-render.
|
|
1096
|
+
* @param props The props for this component.
|
|
1097
|
+
* @returns A rendering of the slices.
|
|
1098
|
+
* @category Component
|
|
1099
|
+
* @since v8.1.0
|
|
1100
|
+
*/
|
|
1101
|
+
export declare const IndexView: Component<IndexViewProps>;
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* The LinkedRowsView component renders the Rows in a linked list Relationship,
|
|
1105
|
+
* and registers a listener so that any changes to that result will cause a
|
|
1106
|
+
* re-render.
|
|
1107
|
+
* @param props The props for this component.
|
|
1108
|
+
* @returns A rendering of the linked Row Ids.
|
|
1109
|
+
* @category Component
|
|
1110
|
+
* @since v8.1.0
|
|
1111
|
+
*/
|
|
1112
|
+
export declare const LinkedRowsView: Component<LinkedRowsViewProps>;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* The LocalRowsView component renders the local Row Ids for a given remote Row
|
|
1116
|
+
* in a Relationship, and registers a listener so that any changes to that
|
|
1117
|
+
* result will cause a re-render.
|
|
1118
|
+
* @param props The props for this component.
|
|
1119
|
+
* @returns A rendering of the local Row Ids.
|
|
1120
|
+
* @category Component
|
|
1121
|
+
* @since v8.1.0
|
|
1122
|
+
*/
|
|
1123
|
+
export declare const LocalRowsView: Component<LocalRowsViewProps>;
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* The MetricView component renders the value of a named Metric in a Metrics
|
|
1127
|
+
* object, and registers a listener so that any changes to that result will
|
|
1128
|
+
* cause a re-render.
|
|
1129
|
+
* @param props The props for this component.
|
|
1130
|
+
* @returns A rendering of the Metric value.
|
|
1131
|
+
* @category Component
|
|
1132
|
+
* @since v8.1.0
|
|
1133
|
+
*/
|
|
1134
|
+
export declare const MetricView: Component<MetricViewProps>;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* The RemoteRowView component renders the remote Row Id for a given local Row
|
|
1138
|
+
* in a Relationship, and registers a listener so that any changes to that
|
|
1139
|
+
* result will cause a re-render.
|
|
1140
|
+
* @param props The props for this component.
|
|
1141
|
+
* @returns A rendering of the remote Row.
|
|
1142
|
+
* @category Component
|
|
1143
|
+
* @since v8.1.0
|
|
1144
|
+
*/
|
|
1145
|
+
export declare const RemoteRowView: Component<RemoteRowViewProps>;
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* The ResultCellView component renders the value of a single Cell in a given
|
|
1149
|
+
* Result Row in a given Result Table of a Queries object, and registers a
|
|
1150
|
+
* listener so that any changes to that result will cause a re-render.
|
|
1151
|
+
* @param props The props for this component.
|
|
1152
|
+
* @returns A rendering of the result Cell.
|
|
1153
|
+
* @category Component
|
|
1154
|
+
* @since v8.1.0
|
|
1155
|
+
*/
|
|
1156
|
+
export declare const ResultCellView: Component<ResultCellViewProps>;
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* The ResultRowView component renders the contents of a single Result Row in a
|
|
1160
|
+
* given Result Table, and registers a listener so that any changes to that
|
|
1161
|
+
* result will cause a re-render.
|
|
1162
|
+
* @param props The props for this component.
|
|
1163
|
+
* @returns A rendering of the result Row.
|
|
1164
|
+
* @category Component
|
|
1165
|
+
* @since v8.1.0
|
|
1166
|
+
*/
|
|
1167
|
+
export declare const ResultRowView: Component<ResultRowViewProps>;
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* The ResultSortedTableView component renders the contents of a single sorted
|
|
1171
|
+
* Result Table in a Queries object, and registers a listener so that any
|
|
1172
|
+
* changes to that result will cause a re-render.
|
|
1173
|
+
* @param props The props for this component.
|
|
1174
|
+
* @returns A rendering of the sorted result Table.
|
|
1175
|
+
* @category Component
|
|
1176
|
+
* @since v8.1.0
|
|
1177
|
+
*/
|
|
1178
|
+
export declare const ResultSortedTableView: Component<ResultSortedTableViewProps>;
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* The ResultTableView component renders the contents of a single Result Table
|
|
1182
|
+
* in a Queries object, and registers a listener so that any changes to that
|
|
1183
|
+
* result will cause a re-render.
|
|
1184
|
+
* @param props The props for this component.
|
|
1185
|
+
* @returns A rendering of the result Table.
|
|
1186
|
+
* @category Component
|
|
1187
|
+
* @since v8.1.0
|
|
1188
|
+
*/
|
|
1189
|
+
export declare const ResultTableView: Component<ResultTableViewProps>;
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* The RowView component renders the contents of a single Row in a given Table,
|
|
1193
|
+
* and registers a listener so that any changes to that result will cause a
|
|
1194
|
+
* re-render.
|
|
1195
|
+
* @param props The props for this component.
|
|
1196
|
+
* @returns A rendering of the Row, or nothing if not present.
|
|
1197
|
+
* @category Component
|
|
1198
|
+
* @since v8.1.0
|
|
1199
|
+
*/
|
|
1200
|
+
export declare const RowView: Component<RowViewProps>;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* The SliceView component renders the Row Ids in a named Slice in an Index,
|
|
1204
|
+
* and registers a listener so that any changes to that result will cause a
|
|
1205
|
+
* re-render.
|
|
1206
|
+
* @param props The props for this component.
|
|
1207
|
+
* @returns A rendering of the Rows in the Slice.
|
|
1208
|
+
* @category Component
|
|
1209
|
+
* @since v8.1.0
|
|
1210
|
+
*/
|
|
1211
|
+
export declare const SliceView: Component<SliceViewProps>;
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* The SortedTableView component renders the contents of a single Table in a
|
|
1215
|
+
* sorted order, and registers a listener so that any changes to that result
|
|
1216
|
+
* will cause a re-render.
|
|
1217
|
+
* @param props The props for this component.
|
|
1218
|
+
* @returns A rendering of the sorted Table.
|
|
1219
|
+
* @category Component
|
|
1220
|
+
* @since v8.1.0
|
|
1221
|
+
*/
|
|
1222
|
+
export declare const SortedTableView: Component<SortedTableViewProps>;
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* The TableView component renders the contents of a single Table, and
|
|
1226
|
+
* registers a listener so that any changes to that result will cause a
|
|
1227
|
+
* re-render.
|
|
1228
|
+
* @param props The props for this component.
|
|
1229
|
+
* @returns A rendering of the Table.
|
|
1230
|
+
* @category Component
|
|
1231
|
+
* @since v8.1.0
|
|
1232
|
+
*/
|
|
1233
|
+
export declare const TableView: Component<TableViewProps>;
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* The TablesView component renders the contents of all Tables in a Store, and
|
|
1237
|
+
* registers a listener so that any changes to that result will cause a
|
|
1238
|
+
* re-render.
|
|
1239
|
+
* @param props The props for this component.
|
|
1240
|
+
* @returns A rendering of all Tables.
|
|
1241
|
+
* @category Component
|
|
1242
|
+
* @since v8.1.0
|
|
1243
|
+
*/
|
|
1244
|
+
export declare const TablesView: Component<TablesViewProps>;
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* The ValueView component renders the value of a single Value in a Store, and
|
|
1248
|
+
* registers a listener so that any changes to that result will cause a
|
|
1249
|
+
* re-render.
|
|
1250
|
+
* @param props The props for this component.
|
|
1251
|
+
* @returns A rendering of the Value, or nothing if not present.
|
|
1252
|
+
* @category Component
|
|
1253
|
+
* @since v8.1.0
|
|
1254
|
+
*/
|
|
1255
|
+
export declare const ValueView: Component<ValueViewProps>;
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* The ValuesView component renders all Values in a Store, and registers a
|
|
1259
|
+
* listener so that any changes to that result will cause a re-render.
|
|
1260
|
+
* @param props The props for this component.
|
|
1261
|
+
* @returns A rendering of all Values.
|
|
1262
|
+
* @category Component
|
|
1263
|
+
* @since v8.1.0
|
|
1264
|
+
*/
|
|
1265
|
+
export declare const ValuesView: Component<ValuesViewProps>;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* The useHasTables hook returns a reactive object indicating whether any Tables
|
|
1269
|
+
* exist in the Store, and registers a listener so that any changes to that
|
|
1270
|
+
* result will update `.current`.
|
|
1271
|
+
* @param storeOrStoreId The Store to use, or its Id in a Provider context.
|
|
1272
|
+
* @returns A reactive object with a `current` boolean property.
|
|
1273
|
+
* @category Hook
|
|
1274
|
+
* @since v8.1.0
|
|
1275
|
+
*/
|
|
1276
|
+
export function useHasTables(storeOrStoreId?: R<Store | Id | undefined>): {
|
|
1277
|
+
readonly current: boolean;
|
|
1278
|
+
};
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* The useTables hook returns a reactive object reflecting the Tables in the
|
|
1282
|
+
* Store, and registers a listener so that any changes to those Tables will
|
|
1283
|
+
* update `.current`.
|
|
1284
|
+
* @param storeOrStoreId The Store to use, or its Id in a Provider context.
|
|
1285
|
+
* @returns A reactive object with a `current` Tables property.
|
|
1286
|
+
* @category Hook
|
|
1287
|
+
* @since v8.1.0
|
|
1288
|
+
*/
|
|
1289
|
+
export function useTables(storeOrStoreId?: R<Store | Id | undefined>): {
|
|
1290
|
+
readonly current: Tables;
|
|
1291
|
+
};
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* The useTableIds hook returns a reactive object reflecting the Ids of the
|
|
1295
|
+
* Tables in a Store, and registers a listener so that any changes to those Ids
|
|
1296
|
+
* will update `.current`.
|
|
1297
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1298
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1299
|
+
* @category Hook
|
|
1300
|
+
* @since v8.1.0
|
|
1301
|
+
*/
|
|
1302
|
+
export function useTableIds(storeOrStoreId?: R<Store | Id | undefined>): {
|
|
1303
|
+
readonly current: Ids;
|
|
1304
|
+
};
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* The useHasTable hook returns a reactive object indicating whether a Table
|
|
1308
|
+
* exists in the Store, and registers a listener so that any changes to that
|
|
1309
|
+
* result will update `.current`.
|
|
1310
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1311
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1312
|
+
* @returns A reactive object with a `current` boolean property.
|
|
1313
|
+
* @category Hook
|
|
1314
|
+
* @since v8.1.0
|
|
1315
|
+
*/
|
|
1316
|
+
export function useHasTable(
|
|
1317
|
+
tableId: R<Id>,
|
|
1318
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1319
|
+
): {readonly current: boolean};
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* The useTable hook returns a reactive object reflecting a Table in a Store,
|
|
1323
|
+
* and registers a listener so that any changes to that Table will update
|
|
1324
|
+
* `.current`.
|
|
1325
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1326
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1327
|
+
* @returns A reactive object with a `current` Table property.
|
|
1328
|
+
* @category Hook
|
|
1329
|
+
* @since v8.1.0
|
|
1330
|
+
*/
|
|
1331
|
+
export function useTable(
|
|
1332
|
+
tableId: R<Id>,
|
|
1333
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1334
|
+
): {readonly current: Table};
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* The useTableCellIds hook returns a reactive object reflecting the Ids of all
|
|
1338
|
+
* Cells used across a Table, and registers a listener so that any changes to
|
|
1339
|
+
* those Ids will update `.current`.
|
|
1340
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1341
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1342
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1343
|
+
* @category Hook
|
|
1344
|
+
* @since v8.1.0
|
|
1345
|
+
*/
|
|
1346
|
+
export function useTableCellIds(
|
|
1347
|
+
tableId: R<Id>,
|
|
1348
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1349
|
+
): {readonly current: Ids};
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* The useHasTableCell hook returns a reactive object indicating whether a
|
|
1353
|
+
* particular Cell is used anywhere in a Table, and registers a listener so
|
|
1354
|
+
* that any changes to that result will update `.current`.
|
|
1355
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1356
|
+
* @param cellId The Id of the Cell (or a getter returning it).
|
|
1357
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1358
|
+
* @returns A reactive object with a `current` boolean property.
|
|
1359
|
+
* @category Hook
|
|
1360
|
+
* @since v8.1.0
|
|
1361
|
+
*/
|
|
1362
|
+
export function useHasTableCell(
|
|
1363
|
+
tableId: R<Id>,
|
|
1364
|
+
cellId: R<Id>,
|
|
1365
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1366
|
+
): {readonly current: boolean};
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* The useRowCount hook returns a reactive object reflecting the number of Rows
|
|
1370
|
+
* in a Table, and registers a listener so that any changes will update
|
|
1371
|
+
* `.current`.
|
|
1372
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1373
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1374
|
+
* @returns A reactive object with a `current` number property.
|
|
1375
|
+
* @category Hook
|
|
1376
|
+
* @since v8.1.0
|
|
1377
|
+
*/
|
|
1378
|
+
export function useRowCount(
|
|
1379
|
+
tableId: R<Id>,
|
|
1380
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1381
|
+
): {readonly current: number};
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* The useRowIds hook returns a reactive object reflecting the Ids of the Rows
|
|
1385
|
+
* in a Table, and registers a listener so that any changes will update
|
|
1386
|
+
* `.current`.
|
|
1387
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1388
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1389
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1390
|
+
* @category Hook
|
|
1391
|
+
* @since v8.1.0
|
|
1392
|
+
*/
|
|
1393
|
+
export function useRowIds(
|
|
1394
|
+
tableId: R<Id>,
|
|
1395
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1396
|
+
): {readonly current: Ids};
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* The useSortedRowIds hook returns a reactive object reflecting the sorted Row
|
|
1400
|
+
* Ids in a Table, and registers a listener so that any changes will update
|
|
1401
|
+
* `.current`.
|
|
1402
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1403
|
+
* @param cellId The Id of the Cell to sort by (or a getter returning it).
|
|
1404
|
+
* @param descending Whether to sort descending (or a getter returning it).
|
|
1405
|
+
* @param offset The starting Row offset (or a getter returning it).
|
|
1406
|
+
* @param limit The maximum number of Rows to return (or a getter returning it).
|
|
1407
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1408
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1409
|
+
* @category Hook
|
|
1410
|
+
* @since v8.1.0
|
|
1411
|
+
*/
|
|
1412
|
+
export function useSortedRowIds(
|
|
1413
|
+
tableId: R<Id>,
|
|
1414
|
+
cellId?: R<Id | undefined>,
|
|
1415
|
+
descending?: R<boolean>,
|
|
1416
|
+
offset?: R<number>,
|
|
1417
|
+
limit?: R<number | undefined>,
|
|
1418
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1419
|
+
): {readonly current: Ids};
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* The useHasRow hook returns a reactive object indicating whether a Row exists
|
|
1423
|
+
* in a Table, and registers a listener so that any changes to that result will
|
|
1424
|
+
* update `.current`.
|
|
1425
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1426
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1427
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1428
|
+
* @returns A reactive object with a `current` boolean property.
|
|
1429
|
+
* @category Hook
|
|
1430
|
+
* @since v8.1.0
|
|
1431
|
+
*/
|
|
1432
|
+
export function useHasRow(
|
|
1433
|
+
tableId: R<Id>,
|
|
1434
|
+
rowId: R<Id>,
|
|
1435
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1436
|
+
): {readonly current: boolean};
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* The useRow hook returns a reactive object reflecting a Row in a Table, and
|
|
1440
|
+
* registers a listener so that any changes to that Row will update `.current`.
|
|
1441
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1442
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1443
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1444
|
+
* @returns A reactive object with a `current` Row property.
|
|
1445
|
+
* @category Hook
|
|
1446
|
+
* @since v8.1.0
|
|
1447
|
+
*/
|
|
1448
|
+
export function useRow(
|
|
1449
|
+
tableId: R<Id>,
|
|
1450
|
+
rowId: R<Id>,
|
|
1451
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1452
|
+
): {readonly current: Row};
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* The useCellIds hook returns a reactive object reflecting the Ids of the
|
|
1456
|
+
* Cells in a Row, and registers a listener so that any changes will update
|
|
1457
|
+
* `.current`.
|
|
1458
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1459
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1460
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1461
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1462
|
+
* @category Hook
|
|
1463
|
+
* @since v8.1.0
|
|
1464
|
+
*/
|
|
1465
|
+
export function useCellIds(
|
|
1466
|
+
tableId: R<Id>,
|
|
1467
|
+
rowId: R<Id>,
|
|
1468
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1469
|
+
): {readonly current: Ids};
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* The useHasCell hook returns a reactive object indicating whether a Cell
|
|
1473
|
+
* exists in a Row in a Table, and registers a listener so that any changes to
|
|
1474
|
+
* that result will update `.current`.
|
|
1475
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1476
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1477
|
+
* @param cellId The Id of the Cell (or a getter returning it).
|
|
1478
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1479
|
+
* @returns A reactive object with a `current` boolean property.
|
|
1480
|
+
* @category Hook
|
|
1481
|
+
* @since v8.1.0
|
|
1482
|
+
*/
|
|
1483
|
+
export function useHasCell(
|
|
1484
|
+
tableId: R<Id>,
|
|
1485
|
+
rowId: R<Id>,
|
|
1486
|
+
cellId: R<Id>,
|
|
1487
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1488
|
+
): {readonly current: boolean};
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
* The useCell hook returns a reactive object reflecting the value of a Cell in
|
|
1492
|
+
* a Row in a Table, and registers a listener so that any changes to that Cell
|
|
1493
|
+
* will update `.current`.
|
|
1494
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1495
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1496
|
+
* @param cellId The Id of the Cell (or a getter returning it).
|
|
1497
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1498
|
+
* @returns A reactive object with a `current` CellOrUndefined property.
|
|
1499
|
+
* @example
|
|
1500
|
+
* This example uses the useCell hook to display a Cell value reactively.
|
|
1501
|
+
*
|
|
1502
|
+
* ```ts
|
|
1503
|
+
* // In a .svelte file:
|
|
1504
|
+
* // const store = createStore().setCell('pets', 'cat', 'name', 'Fido');
|
|
1505
|
+
* // const name = useCell('pets', 'cat', 'name', store);
|
|
1506
|
+
* // $: console.log(name.current); // 'Fido'
|
|
1507
|
+
* ```
|
|
1508
|
+
* @category Hook
|
|
1509
|
+
* @since v8.1.0
|
|
1510
|
+
*/
|
|
1511
|
+
export function useCell(
|
|
1512
|
+
tableId: R<Id>,
|
|
1513
|
+
rowId: R<Id>,
|
|
1514
|
+
cellId: R<Id>,
|
|
1515
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1516
|
+
): {readonly current: CellOrUndefined};
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* The useCellState hook returns a reactive object reflecting the value of a
|
|
1520
|
+
* Cell, with a settable `current` property that writes back to the Store.
|
|
1521
|
+
* @param tableId The Id of the Table (or a getter returning it).
|
|
1522
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1523
|
+
* @param cellId The Id of the Cell (or a getter returning it).
|
|
1524
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1525
|
+
* @returns A reactive object with gettable and settable `current`.
|
|
1526
|
+
* @category Hook
|
|
1527
|
+
* @since v8.1.0
|
|
1528
|
+
*/
|
|
1529
|
+
export function useCellState(
|
|
1530
|
+
tableId: R<Id>,
|
|
1531
|
+
rowId: R<Id>,
|
|
1532
|
+
cellId: R<Id>,
|
|
1533
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1534
|
+
): {get current(): CellOrUndefined; set current(v: Cell)};
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* The useHasValues hook returns a reactive object indicating whether any Values
|
|
1538
|
+
* exist in the Store, and registers a listener so that any changes to that
|
|
1539
|
+
* result will update `.current`.
|
|
1540
|
+
* @param storeOrStoreId The Store to use, or its Id in a Provider context.
|
|
1541
|
+
* @returns A reactive object with a `current` boolean property.
|
|
1542
|
+
* @category Hook
|
|
1543
|
+
* @since v8.1.0
|
|
1544
|
+
*/
|
|
1545
|
+
export function useHasValues(storeOrStoreId?: R<Store | Id | undefined>): {
|
|
1546
|
+
readonly current: boolean;
|
|
1547
|
+
};
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* The useValues hook returns a reactive object reflecting the Values in the
|
|
1551
|
+
* Store, and registers a listener so that any changes will update `.current`.
|
|
1552
|
+
* @param storeOrStoreId The Store to use, or its Id in a Provider context.
|
|
1553
|
+
* @returns A reactive object with a `current` Values property.
|
|
1554
|
+
* @category Hook
|
|
1555
|
+
* @since v8.1.0
|
|
1556
|
+
*/
|
|
1557
|
+
export function useValues(storeOrStoreId?: R<Store | Id | undefined>): {
|
|
1558
|
+
readonly current: Values;
|
|
1559
|
+
};
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* The useValueIds hook returns a reactive object reflecting the Ids of the
|
|
1563
|
+
* Values in a Store, and registers a listener so that any changes will update
|
|
1564
|
+
* `.current`.
|
|
1565
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1566
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1567
|
+
* @category Hook
|
|
1568
|
+
* @since v8.1.0
|
|
1569
|
+
*/
|
|
1570
|
+
export function useValueIds(storeOrStoreId?: R<Store | Id | undefined>): {
|
|
1571
|
+
readonly current: Ids;
|
|
1572
|
+
};
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* The useHasValue hook returns a reactive object indicating whether a Value
|
|
1576
|
+
* exists in the Store, and registers a listener so that any changes to that
|
|
1577
|
+
* result will update `.current`.
|
|
1578
|
+
* @param valueId The Id of the Value (or a getter returning it).
|
|
1579
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1580
|
+
* @returns A reactive object with a `current` boolean property.
|
|
1581
|
+
* @category Hook
|
|
1582
|
+
* @since v8.1.0
|
|
1583
|
+
*/
|
|
1584
|
+
export function useHasValue(
|
|
1585
|
+
valueId: R<Id>,
|
|
1586
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1587
|
+
): {readonly current: boolean};
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* The useValue hook returns a reactive object reflecting the value of a Value
|
|
1591
|
+
* in a Store, and registers a listener so that any changes to that Value will
|
|
1592
|
+
* update `.current`.
|
|
1593
|
+
* @param valueId The Id of the Value (or a getter returning it).
|
|
1594
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1595
|
+
* @returns A reactive object with a `current` ValueOrUndefined property.
|
|
1596
|
+
* @category Hook
|
|
1597
|
+
* @since v8.1.0
|
|
1598
|
+
*/
|
|
1599
|
+
export function useValue(
|
|
1600
|
+
valueId: R<Id>,
|
|
1601
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1602
|
+
): {readonly current: ValueOrUndefined};
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* The useValueState hook returns a reactive object reflecting the value of a
|
|
1606
|
+
* Value, with a settable `current` property that writes back to the Store.
|
|
1607
|
+
* @param valueId The Id of the Value (or a getter returning it).
|
|
1608
|
+
* @param storeOrStoreId The Store to use (plain value or getter), or its Id.
|
|
1609
|
+
* @returns A reactive object with gettable and settable `current`.
|
|
1610
|
+
* @category Hook
|
|
1611
|
+
* @since v8.1.0
|
|
1612
|
+
*/
|
|
1613
|
+
export function useValueState(
|
|
1614
|
+
valueId: R<Id>,
|
|
1615
|
+
storeOrStoreId?: R<Store | Id | undefined>,
|
|
1616
|
+
): {get current(): ValueOrUndefined; set current(v: Value)};
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* The useStore hook returns the default Store from the current Provider context
|
|
1620
|
+
* (or a named Store if an Id is provided).
|
|
1621
|
+
* @param id An optional Id of a named Store in the Provider context.
|
|
1622
|
+
* @returns The Store, or `undefined` if not found.
|
|
1623
|
+
* @category Hook
|
|
1624
|
+
* @since v8.1.0
|
|
1625
|
+
*/
|
|
1626
|
+
export function useStore(id?: Id): Store | undefined;
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* The useStoreIds hook returns a reactive object with the Ids of all Stores
|
|
1630
|
+
* registered in the current Provider context.
|
|
1631
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1632
|
+
* @category Hook
|
|
1633
|
+
* @since v8.1.0
|
|
1634
|
+
*/
|
|
1635
|
+
export function useStoreIds(): {readonly current: Ids};
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* The useMetrics hook returns the default Metrics object from the current
|
|
1639
|
+
* Provider context (or a named one if an Id is provided).
|
|
1640
|
+
* @param id An optional Id of a named Metrics object in the Provider context.
|
|
1641
|
+
* @returns The Metrics object, or `undefined` if not found.
|
|
1642
|
+
* @category Hook
|
|
1643
|
+
* @since v8.1.0
|
|
1644
|
+
*/
|
|
1645
|
+
export function useMetrics(id?: Id): Metrics | undefined;
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* The useMetricsIds hook returns a reactive object with the Ids of all Metrics
|
|
1649
|
+
* objects registered in the current Provider context.
|
|
1650
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1651
|
+
* @category Hook
|
|
1652
|
+
* @since v8.1.0
|
|
1653
|
+
*/
|
|
1654
|
+
export function useMetricsIds(): {readonly current: Ids};
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* The useMetricIds hook returns a reactive object reflecting the Ids of the
|
|
1658
|
+
* Metrics in a Metrics object, and registers a listener so that any changes
|
|
1659
|
+
* will update `.current`.
|
|
1660
|
+
* @param metricsOrMetricsId The Metrics object to use, or its Id.
|
|
1661
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1662
|
+
* @category Hook
|
|
1663
|
+
* @since v8.1.0
|
|
1664
|
+
*/
|
|
1665
|
+
export function useMetricIds(
|
|
1666
|
+
metricsOrMetricsId?: R<Metrics | Id | undefined>,
|
|
1667
|
+
): {
|
|
1668
|
+
readonly current: Ids;
|
|
1669
|
+
};
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* The useMetric hook returns a reactive object reflecting the value of a named
|
|
1673
|
+
* Metric in a Metrics object, and registers a listener so that any changes to
|
|
1674
|
+
* that Metric will update `.current`.
|
|
1675
|
+
* @param metricId The Id of the Metric (or a getter returning it).
|
|
1676
|
+
* @param metricsOrMetricsId The Metrics object to use (plain or getter), or
|
|
1677
|
+
* its Id.
|
|
1678
|
+
* @returns A reactive object with a `current` number | undefined property.
|
|
1679
|
+
* @category Hook
|
|
1680
|
+
* @since v8.1.0
|
|
1681
|
+
*/
|
|
1682
|
+
export function useMetric(
|
|
1683
|
+
metricId: R<Id>,
|
|
1684
|
+
metricsOrMetricsId?: R<Metrics | Id | undefined>,
|
|
1685
|
+
): {readonly current: number | undefined};
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* The useIndexes hook returns the default Indexes object from the current
|
|
1689
|
+
* Provider context (or a named one if an Id is provided).
|
|
1690
|
+
* @param id An optional Id of a named Indexes object in the Provider context.
|
|
1691
|
+
* @returns The Indexes object, or `undefined` if not found.
|
|
1692
|
+
* @category Hook
|
|
1693
|
+
* @since v8.1.0
|
|
1694
|
+
*/
|
|
1695
|
+
export function useIndexes(id?: Id): Indexes | undefined;
|
|
1696
|
+
|
|
1697
|
+
/**
|
|
1698
|
+
* The useIndexesIds hook returns a reactive object with the Ids of all Indexes
|
|
1699
|
+
* objects registered in the current Provider context.
|
|
1700
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1701
|
+
* @category Hook
|
|
1702
|
+
* @since v8.1.0
|
|
1703
|
+
*/
|
|
1704
|
+
export function useIndexesIds(): {readonly current: Ids};
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* The useIndexIds hook returns a reactive object reflecting the Ids of the
|
|
1708
|
+
* Indexes in an Indexes object, and registers a listener so that any changes
|
|
1709
|
+
* will update `.current`.
|
|
1710
|
+
* @param indexesOrIndexesId The Indexes object to use, or its Id.
|
|
1711
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1712
|
+
* @category Hook
|
|
1713
|
+
* @since v8.1.0
|
|
1714
|
+
*/
|
|
1715
|
+
export function useIndexIds(indexesOrIndexesId?: R<Indexes | Id | undefined>): {
|
|
1716
|
+
readonly current: Ids;
|
|
1717
|
+
};
|
|
1718
|
+
|
|
1719
|
+
/**
|
|
1720
|
+
* The useSliceIds hook returns a reactive object reflecting the Ids of the
|
|
1721
|
+
* Slices in an Index, and registers a listener so that any changes will update
|
|
1722
|
+
* `.current`.
|
|
1723
|
+
* @param indexId The Id of the Index (or a getter returning it).
|
|
1724
|
+
* @param indexesOrIndexesId The Indexes object to use (plain or getter), or
|
|
1725
|
+
* its Id.
|
|
1726
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1727
|
+
* @category Hook
|
|
1728
|
+
* @since v8.1.0
|
|
1729
|
+
*/
|
|
1730
|
+
export function useSliceIds(
|
|
1731
|
+
indexId: R<Id>,
|
|
1732
|
+
indexesOrIndexesId?: R<Indexes | Id | undefined>,
|
|
1733
|
+
): {readonly current: Ids};
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* The useSliceRowIds hook returns a reactive object reflecting the Ids of the
|
|
1737
|
+
* Rows in a Slice, and registers a listener so that any changes will update
|
|
1738
|
+
* `.current`.
|
|
1739
|
+
* @param indexId The Id of the Index (or a getter returning it).
|
|
1740
|
+
* @param sliceId The Id of the Slice (or a getter returning it).
|
|
1741
|
+
* @param indexesOrIndexesId The Indexes object to use (plain or getter), or
|
|
1742
|
+
* its Id.
|
|
1743
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1744
|
+
* @category Hook
|
|
1745
|
+
* @since v8.1.0
|
|
1746
|
+
*/
|
|
1747
|
+
export function useSliceRowIds(
|
|
1748
|
+
indexId: R<Id>,
|
|
1749
|
+
sliceId: R<Id>,
|
|
1750
|
+
indexesOrIndexesId?: R<Indexes | Id | undefined>,
|
|
1751
|
+
): {readonly current: Ids};
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* The useQueries hook returns the default Queries object from the current
|
|
1755
|
+
* Provider context (or a named one if an Id is provided).
|
|
1756
|
+
* @param id An optional Id of a named Queries object in the Provider context.
|
|
1757
|
+
* @returns The Queries object, or `undefined` if not found.
|
|
1758
|
+
* @category Hook
|
|
1759
|
+
* @since v8.1.0
|
|
1760
|
+
*/
|
|
1761
|
+
export function useQueries(id?: Id): Queries | undefined;
|
|
1762
|
+
|
|
1763
|
+
/**
|
|
1764
|
+
* The useQueriesIds hook returns a reactive object with the Ids of all Queries
|
|
1765
|
+
* objects registered in the current Provider context.
|
|
1766
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1767
|
+
* @category Hook
|
|
1768
|
+
* @since v8.1.0
|
|
1769
|
+
*/
|
|
1770
|
+
export function useQueriesIds(): {readonly current: Ids};
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* The useQueryIds hook returns a reactive object reflecting the Ids of the
|
|
1774
|
+
* Queries in a Queries object, and registers a listener so that any changes
|
|
1775
|
+
* will update `.current`.
|
|
1776
|
+
* @param queriesOrQueriesId The Queries object to use, or its Id.
|
|
1777
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1778
|
+
* @category Hook
|
|
1779
|
+
* @since v8.1.0
|
|
1780
|
+
*/
|
|
1781
|
+
export function useQueryIds(queriesOrQueriesId?: R<Queries | Id | undefined>): {
|
|
1782
|
+
readonly current: Ids;
|
|
1783
|
+
};
|
|
1784
|
+
|
|
1785
|
+
/**
|
|
1786
|
+
* The useResultTable hook returns a reactive object reflecting a result Table
|
|
1787
|
+
* in a Queries object, and registers a listener so that any changes to that
|
|
1788
|
+
* result will update `.current`.
|
|
1789
|
+
* @param queryId The Id of the Query (or a getter returning it).
|
|
1790
|
+
* @param queriesOrQueriesId The Queries object to use (plain or getter), or
|
|
1791
|
+
* its Id.
|
|
1792
|
+
* @returns A reactive object with a `current` Table property.
|
|
1793
|
+
* @category Hook
|
|
1794
|
+
* @since v8.1.0
|
|
1795
|
+
*/
|
|
1796
|
+
export function useResultTable(
|
|
1797
|
+
queryId: R<Id>,
|
|
1798
|
+
queriesOrQueriesId?: R<Queries | Id | undefined>,
|
|
1799
|
+
): {readonly current: Table};
|
|
1800
|
+
|
|
1801
|
+
/**
|
|
1802
|
+
* The useResultTableCellIds hook returns a reactive object reflecting the Ids
|
|
1803
|
+
* of all Cells used across a result Table, and registers a listener so that
|
|
1804
|
+
* any changes will update `.current`.
|
|
1805
|
+
* @param queryId The Id of the Query (or a getter returning it).
|
|
1806
|
+
* @param queriesOrQueriesId The Queries object to use (plain or getter), or
|
|
1807
|
+
* its Id.
|
|
1808
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1809
|
+
* @category Hook
|
|
1810
|
+
* @since v8.1.0
|
|
1811
|
+
*/
|
|
1812
|
+
export function useResultTableCellIds(
|
|
1813
|
+
queryId: R<Id>,
|
|
1814
|
+
queriesOrQueriesId?: R<Queries | Id | undefined>,
|
|
1815
|
+
): {readonly current: Ids};
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* The useResultRowCount hook returns a reactive object reflecting the number of
|
|
1819
|
+
* Rows in a result Table, and registers a listener so that any changes will
|
|
1820
|
+
* update `.current`.
|
|
1821
|
+
* @param queryId The Id of the Query (or a getter returning it).
|
|
1822
|
+
* @param queriesOrQueriesId The Queries object to use (plain or getter), or
|
|
1823
|
+
* its Id.
|
|
1824
|
+
* @returns A reactive object with a `current` number property.
|
|
1825
|
+
* @category Hook
|
|
1826
|
+
* @since v8.1.0
|
|
1827
|
+
*/
|
|
1828
|
+
export function useResultRowCount(
|
|
1829
|
+
queryId: R<Id>,
|
|
1830
|
+
queriesOrQueriesId?: R<Queries | Id | undefined>,
|
|
1831
|
+
): {readonly current: number};
|
|
1832
|
+
|
|
1833
|
+
/**
|
|
1834
|
+
* The useResultRowIds hook returns a reactive object reflecting the Ids of the
|
|
1835
|
+
* Rows in a result Table, and registers a listener so that any changes will
|
|
1836
|
+
* update `.current`.
|
|
1837
|
+
* @param queryId The Id of the Query (or a getter returning it).
|
|
1838
|
+
* @param queriesOrQueriesId The Queries object to use (plain or getter), or
|
|
1839
|
+
* its Id.
|
|
1840
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1841
|
+
* @category Hook
|
|
1842
|
+
* @since v8.1.0
|
|
1843
|
+
*/
|
|
1844
|
+
export function useResultRowIds(
|
|
1845
|
+
queryId: R<Id>,
|
|
1846
|
+
queriesOrQueriesId?: R<Queries | Id | undefined>,
|
|
1847
|
+
): {readonly current: Ids};
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* The useResultSortedRowIds hook returns a reactive object reflecting the
|
|
1851
|
+
* sorted Row Ids in a result Table, and registers a listener so that any
|
|
1852
|
+
* changes will update `.current`.
|
|
1853
|
+
* @param queryId The Id of the Query (or a getter returning it).
|
|
1854
|
+
* @param cellId The Id of the Cell to sort by (or a getter returning it).
|
|
1855
|
+
* @param descending Whether to sort descending (or a getter returning it).
|
|
1856
|
+
* @param offset The starting Row offset (or a getter returning it).
|
|
1857
|
+
* @param limit The maximum number of Rows (or a getter returning it).
|
|
1858
|
+
* @param queriesOrQueriesId The Queries object to use (plain or getter), or
|
|
1859
|
+
* its Id.
|
|
1860
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1861
|
+
* @category Hook
|
|
1862
|
+
* @since v8.1.0
|
|
1863
|
+
*/
|
|
1864
|
+
export function useResultSortedRowIds(
|
|
1865
|
+
queryId: R<Id>,
|
|
1866
|
+
cellId?: R<Id | undefined>,
|
|
1867
|
+
descending?: R<boolean>,
|
|
1868
|
+
offset?: R<number>,
|
|
1869
|
+
limit?: R<number | undefined>,
|
|
1870
|
+
queriesOrQueriesId?: R<Queries | Id | undefined>,
|
|
1871
|
+
): {readonly current: Ids};
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* The useResultRow hook returns a reactive object reflecting a result Row in a
|
|
1875
|
+
* result Table, and registers a listener so that any changes will update
|
|
1876
|
+
* `.current`.
|
|
1877
|
+
* @param queryId The Id of the Query (or a getter returning it).
|
|
1878
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1879
|
+
* @param queriesOrQueriesId The Queries object to use (plain or getter), or
|
|
1880
|
+
* its Id.
|
|
1881
|
+
* @returns A reactive object with a `current` Row property.
|
|
1882
|
+
* @category Hook
|
|
1883
|
+
* @since v8.1.0
|
|
1884
|
+
*/
|
|
1885
|
+
export function useResultRow(
|
|
1886
|
+
queryId: R<Id>,
|
|
1887
|
+
rowId: R<Id>,
|
|
1888
|
+
queriesOrQueriesId?: R<Queries | Id | undefined>,
|
|
1889
|
+
): {readonly current: Row};
|
|
1890
|
+
|
|
1891
|
+
/**
|
|
1892
|
+
* The useResultCellIds hook returns a reactive object reflecting the Ids of the
|
|
1893
|
+
* Cells in a result Row, and registers a listener so that any changes will
|
|
1894
|
+
* update `.current`.
|
|
1895
|
+
* @param queryId The Id of the Query (or a getter returning it).
|
|
1896
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1897
|
+
* @param queriesOrQueriesId The Queries object to use (plain or getter), or
|
|
1898
|
+
* its Id.
|
|
1899
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1900
|
+
* @category Hook
|
|
1901
|
+
* @since v8.1.0
|
|
1902
|
+
*/
|
|
1903
|
+
export function useResultCellIds(
|
|
1904
|
+
queryId: R<Id>,
|
|
1905
|
+
rowId: R<Id>,
|
|
1906
|
+
queriesOrQueriesId?: R<Queries | Id | undefined>,
|
|
1907
|
+
): {readonly current: Ids};
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* The useResultCell hook returns a reactive object reflecting the value of a
|
|
1911
|
+
* Cell in a result Row, and registers a listener so that any changes will
|
|
1912
|
+
* update `.current`.
|
|
1913
|
+
* @param queryId The Id of the Query (or a getter returning it).
|
|
1914
|
+
* @param rowId The Id of the Row (or a getter returning it).
|
|
1915
|
+
* @param cellId The Id of the Cell (or a getter returning it).
|
|
1916
|
+
* @param queriesOrQueriesId The Queries object to use (plain or getter), or
|
|
1917
|
+
* its Id.
|
|
1918
|
+
* @returns A reactive object with a `current` Cell | undefined property.
|
|
1919
|
+
* @category Hook
|
|
1920
|
+
* @since v8.1.0
|
|
1921
|
+
*/
|
|
1922
|
+
export function useResultCell(
|
|
1923
|
+
queryId: R<Id>,
|
|
1924
|
+
rowId: R<Id>,
|
|
1925
|
+
cellId: R<Id>,
|
|
1926
|
+
queriesOrQueriesId?: R<Queries | Id | undefined>,
|
|
1927
|
+
): {readonly current: CellOrUndefined};
|
|
1928
|
+
|
|
1929
|
+
/**
|
|
1930
|
+
* The useRelationships hook returns the default Relationships object from the
|
|
1931
|
+
* current Provider context (or a named one if an Id is provided).
|
|
1932
|
+
* @param id An optional Id of a named Relationships object in the Provider
|
|
1933
|
+
* context.
|
|
1934
|
+
* @returns The Relationships object, or `undefined` if not found.
|
|
1935
|
+
* @category Hook
|
|
1936
|
+
* @since v8.1.0
|
|
1937
|
+
*/
|
|
1938
|
+
export function useRelationships(id?: Id): Relationships | undefined;
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* The useRelationshipsIds hook returns a reactive object with the Ids of all
|
|
1942
|
+
* Relationships objects registered in the current Provider context.
|
|
1943
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1944
|
+
* @category Hook
|
|
1945
|
+
* @since v8.1.0
|
|
1946
|
+
*/
|
|
1947
|
+
export function useRelationshipsIds(): {readonly current: Ids};
|
|
1948
|
+
|
|
1949
|
+
/**
|
|
1950
|
+
* The useRelationshipIds hook returns a reactive object reflecting the Ids of
|
|
1951
|
+
* the Relationships in a Relationships object, and registers a listener so
|
|
1952
|
+
* that any changes will update `.current`.
|
|
1953
|
+
* @param relationshipsOrRelationshipsId The Relationships object to use, or
|
|
1954
|
+
* its Id.
|
|
1955
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1956
|
+
* @category Hook
|
|
1957
|
+
* @since v8.1.0
|
|
1958
|
+
*/
|
|
1959
|
+
export function useRelationshipIds(
|
|
1960
|
+
relationshipsOrRelationshipsId?: R<Relationships | Id | undefined>,
|
|
1961
|
+
): {readonly current: Ids};
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* The useRemoteRowId hook returns a reactive object reflecting the remote Row
|
|
1965
|
+
* Id for a given local Row in a Relationship, and registers a listener so that
|
|
1966
|
+
* any changes will update `.current`.
|
|
1967
|
+
* @param relationshipId The Id of the Relationship (or a getter returning it).
|
|
1968
|
+
* @param localRowId The Id of the local Row (or a getter returning it).
|
|
1969
|
+
* @param relationshipsOrRelationshipsId The Relationships object to use (plain
|
|
1970
|
+
* or getter), or its Id.
|
|
1971
|
+
* @returns A reactive object with a `current` Id | undefined property.
|
|
1972
|
+
* @category Hook
|
|
1973
|
+
* @since v8.1.0
|
|
1974
|
+
*/
|
|
1975
|
+
export function useRemoteRowId(
|
|
1976
|
+
relationshipId: R<Id>,
|
|
1977
|
+
localRowId: R<Id>,
|
|
1978
|
+
relationshipsOrRelationshipsId?: R<Relationships | Id | undefined>,
|
|
1979
|
+
): {readonly current: Id | undefined};
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* The useLocalRowIds hook returns a reactive object reflecting the local Row
|
|
1983
|
+
* Ids for a given remote Row in a Relationship, and registers a listener so
|
|
1984
|
+
* that any changes will update `.current`.
|
|
1985
|
+
* @param relationshipId The Id of the Relationship (or a getter returning it).
|
|
1986
|
+
* @param remoteRowId The Id of the remote Row (or a getter returning it).
|
|
1987
|
+
* @param relationshipsOrRelationshipsId The Relationships object to use (plain
|
|
1988
|
+
* or getter), or its Id.
|
|
1989
|
+
* @returns A reactive object with a `current` Ids property.
|
|
1990
|
+
* @category Hook
|
|
1991
|
+
* @since v8.1.0
|
|
1992
|
+
*/
|
|
1993
|
+
export function useLocalRowIds(
|
|
1994
|
+
relationshipId: R<Id>,
|
|
1995
|
+
remoteRowId: R<Id>,
|
|
1996
|
+
relationshipsOrRelationshipsId?: R<Relationships | Id | undefined>,
|
|
1997
|
+
): {readonly current: Ids};
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* The useLinkedRowIds hook returns a reactive object reflecting the linked Row
|
|
2001
|
+
* Ids in a Relationship, and registers a listener so that any changes will
|
|
2002
|
+
* update `.current`.
|
|
2003
|
+
* @param relationshipId The Id of the Relationship (or a getter returning it).
|
|
2004
|
+
* @param firstRowId The Id of the first Row (or a getter returning it).
|
|
2005
|
+
* @param relationshipsOrRelationshipsId The Relationships object to use (plain
|
|
2006
|
+
* or getter), or its Id.
|
|
2007
|
+
* @returns A reactive object with a `current` Ids property.
|
|
2008
|
+
* @category Hook
|
|
2009
|
+
* @since v8.1.0
|
|
2010
|
+
*/
|
|
2011
|
+
export function useLinkedRowIds(
|
|
2012
|
+
relationshipId: R<Id>,
|
|
2013
|
+
firstRowId: R<Id>,
|
|
2014
|
+
relationshipsOrRelationshipsId?: R<Relationships | Id | undefined>,
|
|
2015
|
+
): {readonly current: Ids};
|
|
2016
|
+
|
|
2017
|
+
/**
|
|
2018
|
+
* The useCheckpoints hook returns the default Checkpoints object from the
|
|
2019
|
+
* current Provider context (or a named one if an Id is provided).
|
|
2020
|
+
* @param id An optional Id of a named Checkpoints object in the Provider
|
|
2021
|
+
* context.
|
|
2022
|
+
* @returns The Checkpoints object, or `undefined` if not found.
|
|
2023
|
+
* @category Hook
|
|
2024
|
+
* @since v8.1.0
|
|
2025
|
+
*/
|
|
2026
|
+
export function useCheckpoints(id?: Id): Checkpoints | undefined;
|
|
2027
|
+
|
|
2028
|
+
/**
|
|
2029
|
+
* The useCheckpointsIds hook returns a reactive object with the Ids of all
|
|
2030
|
+
* Checkpoints objects registered in the current Provider context.
|
|
2031
|
+
* @returns A reactive object with a `current` Ids property.
|
|
2032
|
+
* @category Hook
|
|
2033
|
+
* @since v8.1.0
|
|
2034
|
+
*/
|
|
2035
|
+
export function useCheckpointsIds(): {readonly current: Ids};
|
|
2036
|
+
|
|
2037
|
+
/**
|
|
2038
|
+
* The useCheckpointIds hook returns a reactive object reflecting the
|
|
2039
|
+
* CheckpointIds (backward, current, forward) in a Checkpoints object, and
|
|
2040
|
+
* registers a listener so that any changes will update `.current`.
|
|
2041
|
+
* @param checkpointsOrCheckpointsId The Checkpoints object to use (plain or
|
|
2042
|
+
* getter), or its Id.
|
|
2043
|
+
* @returns A reactive object with a `current` CheckpointIds property.
|
|
2044
|
+
* @category Hook
|
|
2045
|
+
* @since v8.1.0
|
|
2046
|
+
*/
|
|
2047
|
+
export function useCheckpointIds(
|
|
2048
|
+
checkpointsOrCheckpointsId?: R<Checkpoints | Id | undefined>,
|
|
2049
|
+
): {readonly current: CheckpointIds};
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* The useCheckpoint hook returns a reactive object reflecting the label of a
|
|
2053
|
+
* checkpoint, and registers a listener so that any changes will update
|
|
2054
|
+
* `.current`.
|
|
2055
|
+
* @param checkpointId The Id of the checkpoint (or a getter returning it).
|
|
2056
|
+
* @param checkpointsOrCheckpointsId The Checkpoints object to use (plain or
|
|
2057
|
+
* getter), or its Id.
|
|
2058
|
+
* @returns A reactive object with a `current` string | undefined property.
|
|
2059
|
+
* @category Hook
|
|
2060
|
+
* @since v8.1.0
|
|
2061
|
+
*/
|
|
2062
|
+
export function useCheckpoint(
|
|
2063
|
+
checkpointId: R<Id>,
|
|
2064
|
+
checkpointsOrCheckpointsId?: R<Checkpoints | Id | undefined>,
|
|
2065
|
+
): {readonly current: string | undefined};
|
|
2066
|
+
|
|
2067
|
+
/**
|
|
2068
|
+
* The useGoBackwardCallback hook returns a callback function that, when called,
|
|
2069
|
+
* moves the Checkpoints object backward to the previous checkpoint.
|
|
2070
|
+
* @param checkpointsOrCheckpointsId The Checkpoints object to use, or its Id.
|
|
2071
|
+
* @returns A callback function.
|
|
2072
|
+
* @category Hook
|
|
2073
|
+
* @since v8.1.0
|
|
2074
|
+
*/
|
|
2075
|
+
export function useGoBackwardCallback(
|
|
2076
|
+
checkpointsOrCheckpointsId?: R<Checkpoints | Id | undefined>,
|
|
2077
|
+
): () => void;
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* The useGoForwardCallback hook returns a callback function that, when called,
|
|
2081
|
+
* moves the Checkpoints object forward to the next checkpoint.
|
|
2082
|
+
* @param checkpointsOrCheckpointsId The Checkpoints object to use, or its Id.
|
|
2083
|
+
* @returns A callback function.
|
|
2084
|
+
* @category Hook
|
|
2085
|
+
* @since v8.1.0
|
|
2086
|
+
*/
|
|
2087
|
+
export function useGoForwardCallback(
|
|
2088
|
+
checkpointsOrCheckpointsId?: R<Checkpoints | Id | undefined>,
|
|
2089
|
+
): () => void;
|
|
2090
|
+
|
|
2091
|
+
/**
|
|
2092
|
+
* The usePersister hook returns the default Persister from the current Provider
|
|
2093
|
+
* context (or a named one if an Id is provided).
|
|
2094
|
+
* @param id An optional Id of a named Persister in the Provider context.
|
|
2095
|
+
* @returns The Persister, or `undefined` if not found.
|
|
2096
|
+
* @category Hook
|
|
2097
|
+
* @since v8.1.0
|
|
2098
|
+
*/
|
|
2099
|
+
export function usePersister(id?: Id): AnyPersister | undefined;
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* The usePersisterIds hook returns a reactive object with the Ids of all
|
|
2103
|
+
* Persisters registered in the current Provider context.
|
|
2104
|
+
* @returns A reactive object with a `current` Ids property.
|
|
2105
|
+
* @category Hook
|
|
2106
|
+
* @since v8.1.0
|
|
2107
|
+
*/
|
|
2108
|
+
export function usePersisterIds(): {readonly current: Ids};
|
|
2109
|
+
|
|
2110
|
+
/**
|
|
2111
|
+
* The usePersisterStatus hook returns a reactive object reflecting the status
|
|
2112
|
+
* of a Persister, and registers a listener so that any changes will update
|
|
2113
|
+
* `.current`.
|
|
2114
|
+
* @param persisterOrPersisterId The Persister to use, or its Id.
|
|
2115
|
+
* @returns A reactive object with a `current` Status property.
|
|
2116
|
+
* @category Hook
|
|
2117
|
+
* @since v8.1.0
|
|
2118
|
+
*/
|
|
2119
|
+
export function usePersisterStatus(
|
|
2120
|
+
persisterOrPersisterId?: AnyPersister | Id,
|
|
2121
|
+
): {readonly current: Status};
|
|
2122
|
+
|
|
2123
|
+
/**
|
|
2124
|
+
* The useSynchronizer hook returns the default Synchronizer from the current
|
|
2125
|
+
* Provider context (or a named one if an Id is provided).
|
|
2126
|
+
* @param id An optional Id of a named Synchronizer in the Provider context.
|
|
2127
|
+
* @returns The Synchronizer, or `undefined` if not found.
|
|
2128
|
+
* @category Hook
|
|
2129
|
+
* @since v8.1.0
|
|
2130
|
+
*/
|
|
2131
|
+
export function useSynchronizer(id?: Id): Synchronizer | undefined;
|
|
2132
|
+
|
|
2133
|
+
/**
|
|
2134
|
+
* The useSynchronizerIds hook returns a reactive object with the Ids of all
|
|
2135
|
+
* Synchronizers registered in the current Provider context.
|
|
2136
|
+
* @returns A reactive object with a `current` Ids property.
|
|
2137
|
+
* @category Hook
|
|
2138
|
+
* @since v8.1.0
|
|
2139
|
+
*/
|
|
2140
|
+
export function useSynchronizerIds(): {readonly current: Ids};
|
|
2141
|
+
|
|
2142
|
+
/**
|
|
2143
|
+
* The useSynchronizerStatus hook returns a reactive object reflecting the
|
|
2144
|
+
* status of a Synchronizer, and registers a listener so that any changes will
|
|
2145
|
+
* update `.current`.
|
|
2146
|
+
* @param synchronizerOrSynchronizerId The Synchronizer to use, or its Id.
|
|
2147
|
+
* @returns A reactive object with a `current` Status property.
|
|
2148
|
+
* @category Hook
|
|
2149
|
+
* @since v8.1.0
|
|
2150
|
+
*/
|
|
2151
|
+
export function useSynchronizerStatus(
|
|
2152
|
+
synchronizerOrSynchronizerId?: Synchronizer | Id,
|
|
2153
|
+
): {readonly current: Status};
|
|
2154
|
+
|
|
2155
|
+
/**
|
|
2156
|
+
* The provideStore function registers a Store with a given Id into the current
|
|
2157
|
+
* Provider context, making it available to all descendant components.
|
|
2158
|
+
*
|
|
2159
|
+
* This function must be called inside a Svelte component's `<script>` block
|
|
2160
|
+
* that is a descendant of a Provider component.
|
|
2161
|
+
* @param storeId The Id to register the Store under.
|
|
2162
|
+
* @param store The Store to register.
|
|
2163
|
+
* @category Provider
|
|
2164
|
+
* @since v8.1.0
|
|
2165
|
+
*/
|
|
2166
|
+
export function provideStore(storeId: Id, store: Store): void;
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* The provideMetrics function registers a Metrics object with a given Id into
|
|
2170
|
+
* the current Provider context.
|
|
2171
|
+
* @param metricsId The Id to register the Metrics object under.
|
|
2172
|
+
* @param metrics The Metrics object to register.
|
|
2173
|
+
* @category Provider
|
|
2174
|
+
* @since v8.1.0
|
|
2175
|
+
*/
|
|
2176
|
+
export function provideMetrics(metricsId: Id, metrics: Metrics): void;
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* The provideIndexes function registers an Indexes object with a given Id into
|
|
2180
|
+
* the current Provider context.
|
|
2181
|
+
* @param indexesId The Id to register the Indexes object under.
|
|
2182
|
+
* @param indexes The Indexes object to register.
|
|
2183
|
+
* @category Provider
|
|
2184
|
+
* @since v8.1.0
|
|
2185
|
+
*/
|
|
2186
|
+
export function provideIndexes(indexesId: Id, indexes: Indexes): void;
|
|
2187
|
+
|
|
2188
|
+
/**
|
|
2189
|
+
* The provideRelationships function registers a Relationships object with a
|
|
2190
|
+
* given Id into the current Provider context.
|
|
2191
|
+
* @param relationshipsId The Id to register the Relationships object under.
|
|
2192
|
+
* @param relationships The Relationships object to register.
|
|
2193
|
+
* @category Provider
|
|
2194
|
+
* @since v8.1.0
|
|
2195
|
+
*/
|
|
2196
|
+
export function provideRelationships(
|
|
2197
|
+
relationshipsId: Id,
|
|
2198
|
+
relationships: Relationships,
|
|
2199
|
+
): void;
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* The provideQueries function registers a Queries object with a given Id into
|
|
2203
|
+
* the current Provider context.
|
|
2204
|
+
* @param queriesId The Id to register the Queries object under.
|
|
2205
|
+
* @param queries The Queries object to register.
|
|
2206
|
+
* @category Provider
|
|
2207
|
+
* @since v8.1.0
|
|
2208
|
+
*/
|
|
2209
|
+
export function provideQueries(queriesId: Id, queries: Queries): void;
|
|
2210
|
+
|
|
2211
|
+
/**
|
|
2212
|
+
* The provideCheckpoints function registers a Checkpoints object with a given
|
|
2213
|
+
* Id into the current Provider context.
|
|
2214
|
+
* @param checkpointsId The Id to register the Checkpoints object under.
|
|
2215
|
+
* @param checkpoints The Checkpoints object to register.
|
|
2216
|
+
* @category Provider
|
|
2217
|
+
* @since v8.1.0
|
|
2218
|
+
*/
|
|
2219
|
+
export function provideCheckpoints(
|
|
2220
|
+
checkpointsId: Id,
|
|
2221
|
+
checkpoints: Checkpoints,
|
|
2222
|
+
): void;
|
|
2223
|
+
|
|
2224
|
+
/**
|
|
2225
|
+
* The providePersister function registers a Persister with a given Id into the
|
|
2226
|
+
* current Provider context.
|
|
2227
|
+
* @param persisterId The Id to register the Persister under.
|
|
2228
|
+
* @param persister The Persister to register.
|
|
2229
|
+
* @category Provider
|
|
2230
|
+
* @since v8.1.0
|
|
2231
|
+
*/
|
|
2232
|
+
export function providePersister(
|
|
2233
|
+
persisterId: Id,
|
|
2234
|
+
persister: AnyPersister,
|
|
2235
|
+
): void;
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* The provideSynchronizer function registers a Synchronizer with a given Id
|
|
2239
|
+
* into the current Provider context.
|
|
2240
|
+
* @param synchronizerId The Id to register the Synchronizer under.
|
|
2241
|
+
* @param synchronizer The Synchronizer to register.
|
|
2242
|
+
* @category Provider
|
|
2243
|
+
* @since v8.1.0
|
|
2244
|
+
*/
|
|
2245
|
+
export function provideSynchronizer(
|
|
2246
|
+
synchronizerId: Id,
|
|
2247
|
+
synchronizer: Synchronizer,
|
|
2248
|
+
): void;
|