tinybase 8.4.0-beta.0 → 8.4.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.
Files changed (31) hide show
  1. package/@types/ui-solid-dom/index.d.ts +2013 -0
  2. package/@types/ui-solid-dom/with-schemas/index.d.ts +2064 -0
  3. package/@types/ui-solid-inspector/index.d.ts +73 -0
  4. package/@types/ui-solid-inspector/with-schemas/index.d.ts +73 -0
  5. package/min/ui-solid/index.js +1 -1
  6. package/min/ui-solid/index.js.gz +0 -0
  7. package/min/ui-solid/with-schemas/index.js +1 -1
  8. package/min/ui-solid/with-schemas/index.js.gz +0 -0
  9. package/min/ui-solid-dom/index.js +1 -0
  10. package/min/ui-solid-dom/index.js.gz +0 -0
  11. package/min/ui-solid-dom/with-schemas/index.js +1 -0
  12. package/min/ui-solid-dom/with-schemas/index.js.gz +0 -0
  13. package/min/ui-solid-inspector/index.js +1 -0
  14. package/min/ui-solid-inspector/index.js.gz +0 -0
  15. package/min/ui-solid-inspector/with-schemas/index.js +1 -0
  16. package/min/ui-solid-inspector/with-schemas/index.js.gz +0 -0
  17. package/min/ui-svelte-inspector/index.js +1 -1
  18. package/min/ui-svelte-inspector/index.js.gz +0 -0
  19. package/min/ui-svelte-inspector/with-schemas/index.js +1 -1
  20. package/min/ui-svelte-inspector/with-schemas/index.js.gz +0 -0
  21. package/package.json +73 -1
  22. package/readme.md +14 -14
  23. package/releases.md +98 -62
  24. package/ui-solid/index.js +208 -104
  25. package/ui-solid/with-schemas/index.js +208 -104
  26. package/ui-solid-dom/index.js +1575 -0
  27. package/ui-solid-dom/with-schemas/index.js +1575 -0
  28. package/ui-solid-inspector/index.js +5621 -0
  29. package/ui-solid-inspector/with-schemas/index.js +5621 -0
  30. package/ui-svelte-inspector/index.js +6 -2
  31. package/ui-svelte-inspector/with-schemas/index.js +6 -2
@@ -0,0 +1,2013 @@
1
+ /**
2
+ * The ui-solid-dom module of the TinyBase project provides components to make
3
+ * it easy to create web-based reactive apps with Store objects.
4
+ *
5
+ * The components in this module use the Solid DOM module and so are not
6
+ * appropriate for environments like Solid Native (although those in the
7
+ * lower-level ui-solid module are).
8
+ * @see UI Components (Solid) demos
9
+ * @packageDocumentation
10
+ * @module ui-solid-dom
11
+ * @since v8.4.0
12
+ */
13
+ import type {Component} from 'solid-js';
14
+ import type {Id, Ids} from '../common/index.d.ts';
15
+ import type {
16
+ CellProps,
17
+ ComponentReturnType,
18
+ ExtraProps,
19
+ IndexesOrIndexesId,
20
+ QueriesOrQueriesId,
21
+ RelationshipsOrRelationshipsId,
22
+ ResultCellProps,
23
+ RowProps,
24
+ StoreOrStoreId,
25
+ ValueProps,
26
+ } from '../ui-solid/index.d.ts';
27
+
28
+ /**
29
+ * The CustomCell object is used to configure custom cell rendering in an HTML
30
+ * table.
31
+ * @category Configuration
32
+ * @since v8.4.0
33
+ */
34
+ export type CustomCell = {
35
+ /**
36
+ * An optional string that will be used as the label at the top of the table
37
+ * column for this Cell.
38
+ * @category Prop
39
+ * @since v8.4.0
40
+ */
41
+ label?: string;
42
+ /**
43
+ * An optional custom component for rendering each Cell in the Table (to
44
+ * override the default CellView component).
45
+ * @category Prop
46
+ * @since v8.4.0
47
+ */
48
+ component?: Component<CellProps>;
49
+ /**
50
+ * An optional function for generating extra props for each custom Cell
51
+ * component based on Row and Cell Id.
52
+ * @category Prop
53
+ * @since v8.4.0
54
+ */
55
+ getComponentProps?: (rowId: Id, cellId: Id) => ExtraProps;
56
+ };
57
+
58
+ /**
59
+ * The CustomResultCell object is used to configure custom cell rendering for
60
+ * query results in an HTML table.
61
+ * @category Configuration
62
+ * @since v8.4.0
63
+ */
64
+ export type CustomResultCell = {
65
+ /**
66
+ * An optional string that will be used as the label at the top of the table
67
+ * column for this Cell.
68
+ * @category Prop
69
+ * @since v8.4.0
70
+ */
71
+ label?: string;
72
+ /**
73
+ * An optional custom component for rendering each Cell in the ResultTable (to
74
+ * override the default ResultCellView component).
75
+ * @category Prop
76
+ * @since v8.4.0
77
+ */
78
+ component?: Component<ResultCellProps>;
79
+ /**
80
+ * An optional function for generating extra props for each custom Cell
81
+ * component based on Row and Cell Id.
82
+ * @category Prop
83
+ * @since v8.4.0
84
+ */
85
+ getComponentProps?: (rowId: Id, cellId: Id) => ExtraProps;
86
+ };
87
+
88
+ /**
89
+ * The ExtraRowCell object is used to configure the rendering of extra cells in
90
+ * an HTML table that's displaying a ResultTable or Table - before or after the
91
+ * regular data cells.
92
+ * @category Configuration
93
+ * @since v8.4.0
94
+ */
95
+ export type ExtraRowCell = {
96
+ /**
97
+ * A string that will be used as the label at the top of the column for this
98
+ * Cell.
99
+ * @category Prop
100
+ * @since v8.4.0
101
+ */
102
+ label: string;
103
+ /**
104
+ * A custom component for rendering each extra Cell in the table, and which
105
+ * will be passed props for the Row with which it is placed.
106
+ * @category Prop
107
+ * @since v8.4.0
108
+ */
109
+ component: Component<RowProps>;
110
+ };
111
+
112
+ /**
113
+ * The ExtraValueCell object is used to configure the rendering of extra cells
114
+ * in an HTML table that's displaying Values - before or after the regular data
115
+ * cells.
116
+ * @category Configuration
117
+ * @since v8.4.0
118
+ */
119
+ export type ExtraValueCell = {
120
+ /**
121
+ * A string that will be used as the label at the top of the column for this
122
+ * Cell.
123
+ * @category Prop
124
+ * @since v8.4.0
125
+ */
126
+ label: string;
127
+ /**
128
+ * A custom component for rendering each extra Cell in the table, and which
129
+ * will be passed props for the Value with which it is placed.
130
+ * @category Prop
131
+ * @since v8.4.0
132
+ */
133
+ component: Component<ValueProps>;
134
+ };
135
+
136
+ /**
137
+ * HtmlTableProps props are used for components that will render in an HTML
138
+ * table, such as the TableInHtmlTable component or SortedTableInHtmlTable
139
+ * component.
140
+ * @category Props
141
+ * @since v8.4.0
142
+ */
143
+ export type HtmlTableProps = {
144
+ /**
145
+ * A string className to use on the root of the resulting element.
146
+ * @category Prop
147
+ * @since v8.4.0
148
+ */
149
+ readonly className?: string;
150
+ /**
151
+ * Whether a header row should be rendered at the top of the table, defaulting
152
+ * to `true`.
153
+ * @category Prop
154
+ * @since v8.4.0
155
+ */
156
+ readonly headerRow?: boolean;
157
+ /**
158
+ * Whether an Id column should be rendered on the left of the table,
159
+ * defaulting to `true`.
160
+ * @category Prop
161
+ * @since v8.4.0
162
+ */
163
+ readonly idColumn?: boolean;
164
+ };
165
+
166
+ /**
167
+ * TableInHtmlTableProps props are used for components that will render a Table
168
+ * in an HTML table, such as the TableInHtmlTable component.
169
+ * @category Props
170
+ * @since v8.4.0
171
+ */
172
+ export type TableInHtmlTableProps = {
173
+ /**
174
+ * The Id of the Table in the Store to be rendered.
175
+ * @category Prop
176
+ * @since v8.4.0
177
+ */
178
+ readonly tableId: Id;
179
+ /**
180
+ * The Store to be accessed: omit for the default context Store, provide an Id
181
+ * for a named context Store, or provide an explicit reference.
182
+ * @category Prop
183
+ * @since v8.4.0
184
+ */
185
+ readonly store?: StoreOrStoreId;
186
+ /**
187
+ * Whether the Cells should be editable. This affects the default CellView
188
+ * component (to use the EditableCellView component instead) but of course
189
+ * will not affect custom Cell components if you have set them.
190
+ * @category Prop
191
+ * @since v8.4.0
192
+ */
193
+ readonly editable?: boolean;
194
+ /**
195
+ * An optional list of Cell Ids to use for rendering a prescribed set of the
196
+ * Table's Cells in a given order. This can also be an object with the desired
197
+ * Cell Ids as keys, and with a value that can either be a string label to
198
+ * show in the column header, or a CustomCell object to further configure the
199
+ * column.
200
+ * @category Prop
201
+ * @since v8.4.0
202
+ */
203
+ readonly customCells?: Ids | {[cellId: Id]: string | CustomCell};
204
+ /**
205
+ * An optional list of extra Cells to render before the main table Cells.
206
+ * @category Prop
207
+ * @since v8.4.0
208
+ */
209
+ readonly extraCellsBefore?: ExtraRowCell[];
210
+ /**
211
+ * An optional list of extra Cells to render after the main table Cells.
212
+ * @category Prop
213
+ * @since v8.4.0
214
+ */
215
+ readonly extraCellsAfter?: ExtraRowCell[];
216
+ };
217
+
218
+ /**
219
+ * SortedTableInHtmlTableProps props are used for components that will render a
220
+ * sorted Table in an HTML table, such as the SortedTableInHtmlTable component.
221
+ * @category Props
222
+ * @since v8.4.0
223
+ */
224
+ export type SortedTableInHtmlTableProps = {
225
+ /**
226
+ * The Id of the Table in the Store to be rendered.
227
+ * @category Prop
228
+ * @since v8.4.0
229
+ */
230
+ readonly tableId: Id;
231
+ /**
232
+ * The Id of the Cell whose values are used for the sorting. If omitted, the
233
+ * view will sort the Row Id itself.
234
+ * @category Prop
235
+ * @since v8.4.0
236
+ */
237
+ readonly cellId?: Id;
238
+ /**
239
+ * Whether the sorting should be in descending order.
240
+ * @category Prop
241
+ * @since v8.4.0
242
+ */
243
+ readonly descending?: boolean;
244
+ /**
245
+ * The number of Row Ids to skip for pagination purposes.
246
+ * @category Prop
247
+ * @since v8.4.0
248
+ */
249
+ readonly offset?: number;
250
+ /**
251
+ * The maximum number of Row Ids to return.
252
+ * @category Prop
253
+ * @since v8.4.0
254
+ */
255
+ readonly limit?: number;
256
+ /**
257
+ * The Store to be accessed: omit for the default context Store, provide an Id
258
+ * for a named context Store, or provide an explicit reference.
259
+ * @category Prop
260
+ * @since v8.4.0
261
+ */
262
+ readonly store?: StoreOrStoreId;
263
+ /**
264
+ * Whether the Cells should be editable. This affects the default CellView
265
+ * component (to use the EditableCellView component instead) but of course
266
+ * will not affect custom Cell components if you have set them.
267
+ * @category Prop
268
+ * @since v8.4.0
269
+ */
270
+ readonly editable?: boolean;
271
+ /**
272
+ * An optional list of Cell Ids to use for rendering a prescribed set of the
273
+ * Table's Cells in a given order. This can also be an object with the desired
274
+ * Cell Ids as keys, and with a value that can either be a string label to
275
+ * show in the column header, or a CustomCell object to further configure the
276
+ * column.
277
+ * @category Prop
278
+ * @since v8.4.0
279
+ */
280
+ readonly customCells?: Ids | {[cellId: Id]: string | CustomCell};
281
+ /**
282
+ * An optional list of extra Cells to render before the main table Cells.
283
+ * @category Prop
284
+ * @since v8.4.0
285
+ */
286
+ readonly extraCellsBefore?: ExtraRowCell[];
287
+ /**
288
+ * An optional list of extra Cells to render after the main table Cells.
289
+ * @category Prop
290
+ * @since v8.4.0
291
+ */
292
+ readonly extraCellsAfter?: ExtraRowCell[];
293
+ /**
294
+ * Whether the table should be interactive such that clicking a header changes
295
+ * the sorting and/or direction.
296
+ * @category Prop
297
+ * @since v8.4.0
298
+ */
299
+ readonly sortOnClick?: boolean;
300
+ /**
301
+ * Either `true` to show the default SortedTablePaginator for the Table, or
302
+ * provide your own paginator component that takes SortedTablePaginatorProps.
303
+ * @category Prop
304
+ * @since v8.4.0
305
+ */
306
+ readonly paginator?: boolean | Component<SortedTablePaginatorProps>;
307
+ /**
308
+ * A function that is called whenever the sorting or pagination of the Table
309
+ * is changed by the user, invoked with the sorted Cell Id, whether descending
310
+ * or not, and the offset of the pagination.
311
+ * @category Prop
312
+ * @since v8.4.0
313
+ */
314
+ readonly onChange?: (
315
+ sortAndOffset: [
316
+ cellId: Id | undefined,
317
+ descending: boolean,
318
+ offset: number,
319
+ ],
320
+ ) => void;
321
+ };
322
+
323
+ /**
324
+ * ValuesInHtmlTableProps props are used for components that will render Values
325
+ * in an HTML table, such as the ValuesInHtmlTable component.
326
+ * @category Props
327
+ * @since v8.4.0
328
+ */
329
+ export type ValuesInHtmlTableProps = {
330
+ /**
331
+ * The Store to be accessed: omit for the default context Store, provide an Id
332
+ * for a named context Store, or provide an explicit reference.
333
+ * @category Prop
334
+ * @since v8.4.0
335
+ */
336
+ readonly store?: StoreOrStoreId;
337
+ /**
338
+ * Whether the Values should be editable. This affects the default ValueView
339
+ * component (to use the EditableValueView component instead) but of course
340
+ * will not affect a custom valueComponent if you have set one.
341
+ * @category Prop
342
+ * @since v8.4.0
343
+ */
344
+ readonly editable?: boolean;
345
+ /**
346
+ * A custom component for rendering each Value in the Store (to override the
347
+ * default ValueView component).
348
+ * @category Prop
349
+ * @since v8.4.0
350
+ */
351
+ readonly valueComponent?: Component<ValueProps>;
352
+ /**
353
+ * A function for generating extra props for each custom Value component based
354
+ * on its Id.
355
+ * @category Prop
356
+ * @since v8.4.0
357
+ */
358
+ readonly getValueComponentProps?: (valueId: Id) => ExtraProps;
359
+ /**
360
+ * An optional list of extra Cells to render before the main table Cells.
361
+ * @category Prop
362
+ * @since v8.4.0
363
+ */
364
+ readonly extraCellsBefore?: ExtraValueCell[];
365
+ /**
366
+ * An optional list of extra Cells to render after the main table Cells.
367
+ * @category Prop
368
+ * @since v8.4.0
369
+ */
370
+ readonly extraCellsAfter?: ExtraValueCell[];
371
+ };
372
+
373
+ /**
374
+ * SliceInHtmlTableProps props are used for components that will render an Index
375
+ * Slice in an HTML table, such as the SliceInHtmlTable component.
376
+ * @category Props
377
+ * @since v8.4.0
378
+ */
379
+ export type SliceInHtmlTableProps = {
380
+ /**
381
+ * The Id of the Index in the Indexes object.
382
+ * @category Prop
383
+ * @since v8.4.0
384
+ */
385
+ readonly indexId: Id;
386
+ /**
387
+ * The Id of the Slice in the Index to be rendered.
388
+ * @category Prop
389
+ * @since v8.4.0
390
+ */
391
+ readonly sliceId: Id;
392
+ /**
393
+ * The Indexes object to be accessed: omit for the default context Indexes
394
+ * object, provide an Id for a named context Indexes object, or provide an
395
+ * explicit reference.
396
+ * @category Prop
397
+ * @since v8.4.0
398
+ */
399
+ readonly indexes?: IndexesOrIndexesId;
400
+ /**
401
+ * Whether the Cells should be editable. This affects the default CellView
402
+ * component (to use the EditableCellView component instead) but of course
403
+ * will not affect custom Cell components if you have set them.
404
+ * @category Prop
405
+ * @since v8.4.0
406
+ */
407
+ readonly editable?: boolean;
408
+ /**
409
+ * An optional list of Cell Ids to use for rendering a prescribed set of the
410
+ * Slice's Cells in a given order. This can also be an object with the desired
411
+ * Cell Ids as keys, and with a value that can either be a string label to
412
+ * show in the column header, or a CustomCell object to further configure the
413
+ * column.
414
+ * @category Prop
415
+ * @since v8.4.0
416
+ */
417
+ readonly customCells?: Ids | {[cellId: Id]: string | CustomCell};
418
+ /**
419
+ * An optional list of extra Cells to render before the main table Cells.
420
+ * @category Prop
421
+ * @since v8.4.0
422
+ */
423
+ readonly extraCellsBefore?: ExtraRowCell[];
424
+ /**
425
+ * An optional list of extra Cells to render after the main table Cells.
426
+ * @category Prop
427
+ * @since v8.4.0
428
+ */
429
+ readonly extraCellsAfter?: ExtraRowCell[];
430
+ };
431
+
432
+ /**
433
+ * RelationshipInHtmlTableProps props are used for components that will render
434
+ * the contents of the two Tables linked by a Relationship as an HTML table,
435
+ * such as the RelationshipInHtmlTable component.
436
+ *
437
+ * Note the use of dotted 'tableId.cellId' string pairs when specifying custom
438
+ * rendering for the cells in this table, since Cells from both the
439
+ * relationship's 'local' and 'remote' Table objects can be rendered and need to
440
+ * be distinguished.
441
+ * @category Props
442
+ * @since v8.4.0
443
+ */
444
+ export type RelationshipInHtmlTableProps = {
445
+ /**
446
+ * The Id of the relationship in the Relationships object for which the
447
+ * relationship Table Rows will be rendered.
448
+ * @category Prop
449
+ * @since v8.4.0
450
+ */
451
+ readonly relationshipId: Id;
452
+ /**
453
+ * The Relationships object to be accessed: omit for the default context
454
+ * Relationships object, provide an Id for a named context Relationships
455
+ * object, or provide an explicit reference.
456
+ * @category Prop
457
+ * @since v8.4.0
458
+ */
459
+ readonly relationships?: RelationshipsOrRelationshipsId;
460
+ /**
461
+ * Whether the Cells should be editable. This affects the default CellView
462
+ * component (to use the EditableCellView component instead) but of course
463
+ * will not affect custom Cell components if you have set them.
464
+ * @category Prop
465
+ * @since v8.4.0
466
+ */
467
+ readonly editable?: boolean;
468
+ /**
469
+ * An optional list of dotted 'tableId.cellId' string pairs to use for
470
+ * rendering a prescribed set of the relationship Tables' Cells in a given
471
+ * order. This can also be an object with the desired 'tableId.cellId' string
472
+ * pairs as keys, and with a value that can either be a string label to show
473
+ * in the column header, or a CustomCell object to further configure the
474
+ * column.
475
+ * @category Prop
476
+ * @since v8.4.0
477
+ */
478
+ readonly customCells?: Ids | {[cellId: Id]: string | CustomCell};
479
+ /**
480
+ * An optional list of extra Cells to render before the main table Cells.
481
+ * @category Prop
482
+ * @since v8.4.0
483
+ */
484
+ readonly extraCellsBefore?: ExtraRowCell[];
485
+ /**
486
+ * An optional list of extra Cells to render after the main table Cells.
487
+ * @category Prop
488
+ * @since v8.4.0
489
+ */
490
+ readonly extraCellsAfter?: ExtraRowCell[];
491
+ };
492
+
493
+ /**
494
+ * ResultTableInHtmlTableProps props are used for components that will render a
495
+ * ResultTable in an HTML table, such as the ResultTableInHtmlTable component.
496
+ * @category Props
497
+ * @since v8.4.0
498
+ */
499
+ export type ResultTableInHtmlTableProps = {
500
+ /**
501
+ * The Id of the query in the Queries object for which the ResultTable will be
502
+ * rendered.
503
+ * @category Prop
504
+ * @since v8.4.0
505
+ */
506
+ readonly queryId: Id;
507
+ /**
508
+ * The Queries object to be accessed: omit for the default context Queries
509
+ * object, provide an Id for a named context Queries object, or provide an
510
+ * explicit reference.
511
+ * @category Prop
512
+ * @since v8.4.0
513
+ */
514
+ readonly queries?: QueriesOrQueriesId;
515
+ /**
516
+ * An optional list of Cell Ids to use for rendering a prescribed set of the
517
+ * ResultTable's Cells in a given order. This can also be an object with the
518
+ * desired Cell Ids as keys, and with a value that can either be a string
519
+ * label to show in the column header, or a ResultCustomCell object to further
520
+ * configure the column.
521
+ * @category Prop
522
+ * @since v8.4.0
523
+ */
524
+ readonly customCells?: Ids | {[cellId: Id]: string | CustomResultCell};
525
+ /**
526
+ * An optional list of extra Cells to render before the main table Cells.
527
+ * @category Prop
528
+ * @since v8.4.0
529
+ */
530
+ readonly extraCellsBefore?: ExtraRowCell[];
531
+ /**
532
+ * An optional list of extra Cells to render after the main table Cells.
533
+ * @category Prop
534
+ * @since v8.4.0
535
+ */
536
+ readonly extraCellsAfter?: ExtraRowCell[];
537
+ };
538
+
539
+ /**
540
+ * ResultSortedTableInHtmlTableProps props are used for components that will
541
+ * render a sorted Table in an HTML table, such as the SortedTableInHtmlTable
542
+ * component.
543
+ * @category Props
544
+ * @since v8.4.0
545
+ */
546
+ export type ResultSortedTableInHtmlTableProps = {
547
+ /**
548
+ * The Id of the query in the Queries object for which the ResultTable will be
549
+ * rendered.
550
+ * @category Prop
551
+ * @since v8.4.0
552
+ */
553
+ readonly queryId: Id;
554
+ /**
555
+ * The Id of the Cell whose values are used for the sorting. If omitted, the
556
+ * view will sort the Row Id itself.
557
+ * @category Prop
558
+ * @since v8.4.0
559
+ */
560
+ readonly cellId?: Id;
561
+ /**
562
+ * Whether the sorting should be in descending order.
563
+ * @category Prop
564
+ * @since v8.4.0
565
+ */
566
+ readonly descending?: boolean;
567
+ /**
568
+ * The number of Row Ids to skip for pagination purposes.
569
+ * @category Prop
570
+ * @since v8.4.0
571
+ */
572
+ readonly offset?: number;
573
+ /**
574
+ * The maximum number of Row Ids to return.
575
+ * @category Prop
576
+ * @since v8.4.0
577
+ */
578
+ readonly limit?: number;
579
+ /**
580
+ * The Queries object to be accessed: omit for the default context Queries
581
+ * object, provide an Id for a named context Queries object, or provide an
582
+ * explicit reference.
583
+ * @category Prop
584
+ * @since v8.4.0
585
+ */
586
+ readonly queries?: QueriesOrQueriesId;
587
+ /**
588
+ * An optional list of Cell Ids to use for rendering a prescribed set of the
589
+ * ResultTable's Cells in a given order. This can also be an object with the
590
+ * desired Cell Ids as keys, and with a value that can either be a string
591
+ * label to show in the column header, or a ResultCustomCell object to further
592
+ * configure the column.
593
+ * @category Prop
594
+ * @since v8.4.0
595
+ */
596
+ readonly customCells?: Ids | {[cellId: Id]: string | CustomResultCell};
597
+ /**
598
+ * An optional list of extra Cells to render before the main table Cells.
599
+ * @category Prop
600
+ * @since v8.4.0
601
+ */
602
+ readonly extraCellsBefore?: ExtraRowCell[];
603
+ /**
604
+ * An optional list of extra Cells to render after the main table Cells.
605
+ * @category Prop
606
+ * @since v8.4.0
607
+ */
608
+ readonly extraCellsAfter?: ExtraRowCell[];
609
+ /**
610
+ * Whether the table should be interactive such that clicking a header changes
611
+ * the sorting and/or direction.
612
+ * @category Prop
613
+ * @since v8.4.0
614
+ */
615
+ readonly sortOnClick?: boolean;
616
+ /**
617
+ * Either `true` to show the default SortedTablePaginator for the ResultTable,
618
+ * or provide your own paginator component that takes
619
+ * SortedTablePaginatorProps.
620
+ * @category Prop
621
+ * @since v8.4.0
622
+ */
623
+ readonly paginator?: boolean | Component<SortedTablePaginatorProps>;
624
+ /**
625
+ * A function that is called whenever the sorting or pagination of the
626
+ * ResultTable is changed by the user, invoked with the sorted Cell Id,
627
+ * whether descending or not, and the offset of the pagination.
628
+ * @category Prop
629
+ * @since v8.4.0
630
+ */
631
+ readonly onChange?: (
632
+ sortAndOffset: [
633
+ cellId: Id | undefined,
634
+ descending: boolean,
635
+ offset: number,
636
+ ],
637
+ ) => void;
638
+ };
639
+
640
+ /**
641
+ * SortedTablePaginatorProps props are used for components that will be used as
642
+ * a table paginator, such as the SortedTablePaginator component.
643
+ * @category Props
644
+ * @since v8.4.0
645
+ */
646
+ export type SortedTablePaginatorProps = {
647
+ /**
648
+ * An event that will fire when the offset is updated, called with the new
649
+ * offset.
650
+ * @category Prop
651
+ * @since v8.4.0
652
+ */
653
+ readonly onChange: (offset: number) => void;
654
+ /**
655
+ * The number of Row Ids to skip for pagination.
656
+ * @category Prop
657
+ * @since v8.4.0
658
+ */
659
+ readonly offset?: number;
660
+ /**
661
+ * The maximum number of Row Ids being returned.
662
+ * @category Prop
663
+ * @since v8.4.0
664
+ */
665
+ readonly limit?: number;
666
+ /**
667
+ * The total number of Row Ids in the paginated table.
668
+ * @category Prop
669
+ * @since v8.4.0
670
+ */
671
+ readonly total: number;
672
+ /**
673
+ * A noun to use in the pagination label for a single row, defaulting to
674
+ * 'row'.
675
+ * @category Prop
676
+ * @since v8.4.0
677
+ */
678
+ readonly singular?: string;
679
+ /**
680
+ * A noun to use in the pagination label for multiple rows, defaulting to the
681
+ * value of the singular noun suffixed with the letter 's'.
682
+ * @category Prop
683
+ * @since v8.4.0
684
+ */
685
+ readonly plural?: string;
686
+ };
687
+
688
+ /**
689
+ * The TableInHtmlTable component renders the contents of a single Table in a
690
+ * Store as an HTML <table> element, and registers a listener so that any
691
+ * changes to that result will cause a re-render.
692
+ *
693
+ * See the <TableInHtmlTable /> (Solid) demo for this component in action:
694
+ *
695
+ * ![TableInHtmlTable example](https://beta.tinybase.org/shots/tableinhtmltable-solid-demo.png
696
+ * "TableInHtmlTable example")
697
+ *
698
+ * The component's props identify which Table to render based on Table Id, and
699
+ * Store (which is either the default context Store, a named context Store, or
700
+ * by explicit reference).
701
+ *
702
+ * This component renders a Table by iterating over its Row objects. By default
703
+ * the Cells are in turn rendered with the CellView component, but you can
704
+ * override this behavior by providing a `component` for each Cell in the
705
+ * `customCells` prop. You can pass additional props to that custom component
706
+ * with the `getComponentProps` callback. See the CustomCell type for more
707
+ * details.
708
+ *
709
+ * This component uses the useRowIds hook under the covers, which means that any
710
+ * changes to the structure of the Table will cause a re-render.
711
+ *
712
+ * You can use the `headerRow` and `idColumn` props to control whether the Ids
713
+ * appear in a <th> element at the top of the table, and the start of each row.
714
+ * @param props The props for this component.
715
+ * @returns A rendering of the Table in a <table> element.
716
+ * @example
717
+ * This example creates a Provider context into which a default Store is
718
+ * provided. The TableInHtmlTable component within it then renders the Table in
719
+ * a <table> element with a CSS class.
720
+ *
721
+ * ```jsx
722
+ * import {render} from 'solid-js/web';
723
+ * import {createStore} from 'tinybase';
724
+ * import {Provider} from 'tinybase/ui-solid';
725
+ * import {TableInHtmlTable} from 'tinybase/ui-solid-dom';
726
+ *
727
+ * const App = ({store}) => (
728
+ * <Provider store={store}>
729
+ * <Pane />
730
+ * </Provider>
731
+ * );
732
+ * const Pane = () => <TableInHtmlTable tableId="pets" className="table" />;
733
+ *
734
+ * const store = createStore().setTable('pets', {
735
+ * fido: {species: 'dog'},
736
+ * felix: {species: 'cat'},
737
+ * });
738
+ * const app = document.createElement('div');
739
+ * render(() => <App store={store} />, app); // !act
740
+ * console.log(app.innerHTML);
741
+ * // ->
742
+ * `
743
+ * <table class="table">
744
+ * <thead>
745
+ * <tr>
746
+ * <th>Id</th>
747
+ * <th>species</th>
748
+ * </tr>
749
+ * </thead>
750
+ * <tbody>
751
+ * <tr>
752
+ * <th title="fido">fido</th>
753
+ * <td>dog</td>
754
+ * </tr>
755
+ * <tr>
756
+ * <th title="felix">felix</th>
757
+ * <td>cat</td>
758
+ * </tr>
759
+ * </tbody>
760
+ * </table>
761
+ * `;
762
+ * ```
763
+ * @example
764
+ * This example creates a Provider context into which a default Store is
765
+ * provided. The TableInHtmlTable component within it then renders the Table
766
+ * with a custom component and a custom props callback for the `species` Cell.
767
+ * The header row at the top of the table and the Id column at the start of each
768
+ * row is removed.
769
+ *
770
+ * ```jsx
771
+ * import {render} from 'solid-js/web';
772
+ * import {createStore} from 'tinybase';
773
+ * import {CellView, Provider} from 'tinybase/ui-solid';
774
+ * import {TableInHtmlTable} from 'tinybase/ui-solid-dom';
775
+ *
776
+ * const App = ({store}) => (
777
+ * <Provider store={store}>
778
+ * <Pane />
779
+ * </Provider>
780
+ * );
781
+ * const Pane = () => (
782
+ * <TableInHtmlTable
783
+ * tableId="pets"
784
+ * customCells={customCells}
785
+ * headerRow={false}
786
+ * idColumn={false}
787
+ * />
788
+ * );
789
+ *
790
+ * const FormattedCellView = ({tableId, rowId, cellId, bold}) => (
791
+ * <>
792
+ * {bold ? <b>{rowId}</b> : rowId}:
793
+ * <CellView tableId={tableId} rowId={rowId} cellId={cellId} />
794
+ * </>
795
+ * );
796
+ * const customCells = {
797
+ * species: {
798
+ * component: FormattedCellView,
799
+ * getComponentProps: (rowId) => ({bold: rowId == 'fido'}),
800
+ * },
801
+ * };
802
+ *
803
+ * const store = createStore().setTable('pets', {
804
+ * fido: {species: 'dog'},
805
+ * felix: {species: 'cat'},
806
+ * });
807
+ * const app = document.createElement('div');
808
+ * render(() => <App store={store} />, app); // !act
809
+ * console.log(app.innerHTML);
810
+ * // ->
811
+ * `
812
+ * <table>
813
+ * <tbody>
814
+ * <tr>
815
+ * <td><b>fido</b>:dog</td>
816
+ * </tr>
817
+ * <tr>
818
+ * <td>felix:cat</td>
819
+ * </tr>
820
+ * </tbody>
821
+ * </table>
822
+ * `;
823
+ * ```
824
+ * @category Store components
825
+ * @since v8.4.0
826
+ */
827
+ export function TableInHtmlTable(
828
+ props: TableInHtmlTableProps & HtmlTableProps,
829
+ ): ComponentReturnType;
830
+
831
+ /**
832
+ * The SortedTableInHtmlTable component renders the contents of a single sorted
833
+ * Table in a Store, as an HTML <table> element, and registers a listener so
834
+ * that any changes to that result will cause a re-render.
835
+ *
836
+ * See the <SortedTableInHtmlTable /> (Solid) demo for this component in
837
+ * action:
838
+ *
839
+ * ![SortedTableInHtmlTable example](https://beta.tinybase.org/shots/sortedtableinhtmltable-solid-demo.png
840
+ * "SortedTableInHtmlTable example")
841
+ *
842
+ * The component's props identify which Table to render based on Table Id, and
843
+ * Store (which is either the default context Store, a named context Store, or
844
+ * by explicit reference). It also takes a Cell Id to sort by and a boolean to
845
+ * indicate that the sorting should be in descending order. The `offset` and
846
+ * `limit` props are used to paginate results, but default to `0` and
847
+ * `undefined` to return all available Row Ids if not specified.
848
+ *
849
+ * This component renders a ResultTable by iterating over its Row objects, in
850
+ * the order dictated by the sort parameters. By default the Cells are in turn
851
+ * rendered with the CellView component, but you can override this behavior by
852
+ * providing a `component` for each Cell in the `customCells` prop. You can pass
853
+ * additional props to that custom component with the `getComponentProps`
854
+ * callback. See the CustomCell type for more details.
855
+ *
856
+ * This component uses the useSortedRowIds hook under the covers, which means
857
+ * that any changes to the structure or sorting of the Table will cause a
858
+ * re-render.
859
+ *
860
+ * You can use the `headerRow` and `idColumn` props to control whether the Ids
861
+ * appear in a <th> element at the top of the table, and the start of each row.
862
+ *
863
+ * The `sortOnClick` prop makes the table's sorting interactive such that the
864
+ * user can click on a column heading to sort by that column. The style classes
865
+ * `sorted` and `ascending` (or `descending`) are added so that you can provide
866
+ * hints to the user how the sorting is being applied.
867
+ *
868
+ * Provide a paginator component for the Table with the `paginator` prop. Set to
869
+ * `true` to use the default SortedTablePaginator, or provide your own component
870
+ * that accepts SortedTablePaginatorProps.
871
+ *
872
+ * Finally, the `onChange` prop lets you listen to a user's changes to the
873
+ * Table's sorting or pagination.
874
+ * @param props The props for this component.
875
+ * @returns A rendering of the Table in a <table> element.
876
+ * @example
877
+ * This example creates a Provider context into which a default Store is
878
+ * provided. The SortedTableInHtmlTable component within it then renders the
879
+ * Table in a <table> element with a CSS class.
880
+ *
881
+ * ```jsx
882
+ * import {render} from 'solid-js/web';
883
+ * import {createStore} from 'tinybase';
884
+ * import {Provider} from 'tinybase/ui-solid';
885
+ * import {SortedTableInHtmlTable} from 'tinybase/ui-solid-dom';
886
+ *
887
+ * const App = ({store}) => (
888
+ * <Provider store={store}>
889
+ * <Pane />
890
+ * </Provider>
891
+ * );
892
+ * const Pane = () => (
893
+ * <SortedTableInHtmlTable
894
+ * tableId="pets"
895
+ * cellId="species"
896
+ * className="table"
897
+ * />
898
+ * );
899
+ *
900
+ * const store = createStore().setTables({
901
+ * pets: {
902
+ * fido: {species: 'dog'},
903
+ * felix: {species: 'cat'},
904
+ * },
905
+ * });
906
+ * const app = document.createElement('div');
907
+ * render(() => <App store={store} />, app); // !act
908
+ * console.log(app.innerHTML);
909
+ * // ->
910
+ * `
911
+ * <table class="table">
912
+ * <thead>
913
+ * <tr>
914
+ * <th>Id</th>
915
+ * <th class="sorted ascending">↑ species</th>
916
+ * </tr>
917
+ * </thead>
918
+ * <tbody>
919
+ * <tr>
920
+ * <th title="felix">felix</th>
921
+ * <td>cat</td>
922
+ * </tr>
923
+ * <tr>
924
+ * <th title="fido">fido</th>
925
+ * <td>dog</td>
926
+ * </tr>
927
+ * </tbody>
928
+ * </table>
929
+ * `;
930
+ * ```
931
+ * @example
932
+ * This example creates a Provider context into which a default Store is
933
+ * provided. The SortedTableInHtmlTable component within it then renders the
934
+ * Table with a custom component and a custom props callback for the `species`
935
+ * Cell. The header row at the top of the table and the Id column at the start
936
+ * of each row is removed.
937
+ *
938
+ * ```jsx
939
+ * import {render} from 'solid-js/web';
940
+ * import {createStore} from 'tinybase';
941
+ * import {CellView, Provider} from 'tinybase/ui-solid';
942
+ * import {SortedTableInHtmlTable} from 'tinybase/ui-solid-dom';
943
+ *
944
+ * const App = ({store}) => (
945
+ * <Provider store={store}>
946
+ * <Pane />
947
+ * </Provider>
948
+ * );
949
+ *
950
+ * const Pane = () => (
951
+ * <SortedTableInHtmlTable
952
+ * tableId="pets"
953
+ * cellId="species"
954
+ * customCells={customCells}
955
+ * headerRow={false}
956
+ * idColumn={false}
957
+ * />
958
+ * );
959
+ *
960
+ * const FormattedCellView = ({tableId, rowId, cellId, bold}) => (
961
+ * <>
962
+ * {bold ? <b>{rowId}</b> : rowId}:
963
+ * <CellView tableId={tableId} rowId={rowId} cellId={cellId} />
964
+ * </>
965
+ * );
966
+ * const customCells = {
967
+ * species: {
968
+ * component: FormattedCellView,
969
+ * getComponentProps: (rowId) => ({bold: rowId == 'fido'}),
970
+ * },
971
+ * };
972
+ *
973
+ * const store = createStore().setTables({
974
+ * pets: {
975
+ * fido: {species: 'dog'},
976
+ * felix: {species: 'cat'},
977
+ * },
978
+ * });
979
+ * const app = document.createElement('div');
980
+ * render(() => <App store={store} />, app); // !act
981
+ * console.log(app.innerHTML);
982
+ * // ->
983
+ * `
984
+ * <table>
985
+ * <tbody>
986
+ * <tr>
987
+ * <td>felix:cat</td>
988
+ * </tr>
989
+ * <tr>
990
+ * <td><b>fido</b>:dog</td>
991
+ * </tr>
992
+ * </tbody>
993
+ * </table>
994
+ * `;
995
+ * ```
996
+ * @category Store components
997
+ * @since v8.4.0
998
+ */
999
+ export function SortedTableInHtmlTable(
1000
+ props: SortedTableInHtmlTableProps & HtmlTableProps,
1001
+ ): ComponentReturnType;
1002
+
1003
+ /**
1004
+ * The ValuesInHtmlTable component renders the keyed value contents of a Store
1005
+ * as an HTML <table> element, and registers a listener so that any changes to
1006
+ * that result will cause a re-render.
1007
+ *
1008
+ * See the <ValuesInHtmlTable /> (Solid) demo for this component in action:
1009
+ *
1010
+ * ![ValuesInHtmlTable example](https://beta.tinybase.org/shots/valuesinhtmltable-solid-demo.png
1011
+ * "ValuesInHtmlTable example")
1012
+ *
1013
+ * The component's props identify which Row to render based on Table Id, Row Id,
1014
+ * and Store (which is either the default context Store, a named context Store,
1015
+ * or an explicit reference).
1016
+ *
1017
+ * This component renders a Store by iterating over its Value objects. By
1018
+ * default the Values are in turn rendered with the ValueView component, but you
1019
+ * can override this behavior by providing a `valueComponent` prop, a custom
1020
+ * component of your own that will render a Value based on ValueProps. You can
1021
+ * also pass additional props to your custom component with the
1022
+ * `getValueComponentProps` callback prop.
1023
+ *
1024
+ * This component uses the useValueIds hook under the covers, which means that
1025
+ * any changes to the structure of the Values in the Store will cause a
1026
+ * re-render.
1027
+ *
1028
+ * You can use the `headerRow` and `idColumn` props to control whether labels
1029
+ * and Ids appear in a <th> element at the top of the table, and the start of
1030
+ * each row.
1031
+ * @param props The props for this component.
1032
+ * @returns A rendering of the Values in a <table> element.
1033
+ * @example
1034
+ * This example creates a Provider context into which a default Store is
1035
+ * provided. The ValuesInHtmlTable component within it then renders the Values
1036
+ * in a <table> element with a CSS class.
1037
+ *
1038
+ * ```jsx
1039
+ * import {render} from 'solid-js/web';
1040
+ * import {createStore} from 'tinybase';
1041
+ * import {Provider} from 'tinybase/ui-solid';
1042
+ * import {ValuesInHtmlTable} from 'tinybase/ui-solid-dom';
1043
+ *
1044
+ * const App = ({store}) => (
1045
+ * <Provider store={store}>
1046
+ * <Pane />
1047
+ * </Provider>
1048
+ * );
1049
+ * const Pane = () => <ValuesInHtmlTable className="values" />;
1050
+ *
1051
+ * const store = createStore().setValues({open: true, employees: 3});
1052
+ * const app = document.createElement('div');
1053
+ * render(() => <App store={store} />, app); // !act
1054
+ * console.log(app.innerHTML);
1055
+ * // ->
1056
+ * `
1057
+ * <table class="values">
1058
+ * <thead>
1059
+ * <tr>
1060
+ * <th>Id</th>
1061
+ * <th>Value</th>
1062
+ * </tr>
1063
+ * </thead>
1064
+ * <tbody>
1065
+ * <tr>
1066
+ * <th title="open">open</th>
1067
+ * <td>true</td>
1068
+ * </tr>
1069
+ * <tr>
1070
+ * <th title="employees">employees</th>
1071
+ * <td>3</td>
1072
+ * </tr>
1073
+ * </tbody>
1074
+ * </table>
1075
+ * `;
1076
+ * ```
1077
+ * @example
1078
+ * This example creates a Provider context into which a default Store is
1079
+ * provided. The ValuesInHtmlTable component within it then renders the Row
1080
+ * with a custom Cell component and a custom props callback. The header row at
1081
+ * the top of the table and the Id column at the start of each row is removed.
1082
+ *
1083
+ * ```jsx
1084
+ * import {render} from 'solid-js/web';
1085
+ * import {createStore} from 'tinybase';
1086
+ * import {Provider, ValueView} from 'tinybase/ui-solid';
1087
+ * import {ValuesInHtmlTable} from 'tinybase/ui-solid-dom';
1088
+ *
1089
+ * const App = ({store}) => (
1090
+ * <Provider store={store}>
1091
+ * <Pane />
1092
+ * </Provider>
1093
+ * );
1094
+ * const getBoldProp = (valueId) => ({bold: valueId == 'open'});
1095
+ * const Pane = () => (
1096
+ * <ValuesInHtmlTable
1097
+ * valueComponent={FormattedValueView}
1098
+ * getValueComponentProps={getBoldProp}
1099
+ * headerRow={false}
1100
+ * idColumn={false}
1101
+ * />
1102
+ * );
1103
+ * const FormattedValueView = ({valueId, bold}) => (
1104
+ * <>
1105
+ * {bold ? <b>{valueId}</b> : valueId}
1106
+ * {': '}
1107
+ * <ValueView valueId={valueId} />
1108
+ * </>
1109
+ * );
1110
+ *
1111
+ * const store = createStore().setValues({open: true, employees: 3});
1112
+ * const app = document.createElement('div');
1113
+ * render(() => <App store={store} />, app); // !act
1114
+ * console.log(app.innerHTML);
1115
+ * // ->
1116
+ * `
1117
+ * <table>
1118
+ * <tbody>
1119
+ * <tr><td><b>open</b>: true</td></tr>
1120
+ * <tr><td>employees: 3</td></tr>
1121
+ * </tbody>
1122
+ * </table>
1123
+ * `;
1124
+ * ```
1125
+ * @category Store components
1126
+ * @since v8.4.0
1127
+ */
1128
+ export function ValuesInHtmlTable(
1129
+ props: ValuesInHtmlTableProps & HtmlTableProps,
1130
+ ): ComponentReturnType;
1131
+
1132
+ /**
1133
+ * The SliceInHtmlTable component renders the contents of a Slice as an HTML
1134
+ * <table> element, and registers a listener so that any changes to that result
1135
+ * will cause a re-render.
1136
+ *
1137
+ * See the <SliceInHtmlTable /> (Solid) demo for this component in action:
1138
+ *
1139
+ * ![SliceInHtmlTable example](https://beta.tinybase.org/shots/sliceinhtmltable-solid-demo.png
1140
+ * "SliceInHtmlTable example")
1141
+ *
1142
+ * The component's props identify which Slice to render based on Index Id, Slice
1143
+ * Id, and Indexes object (which is either the default context Indexes object, a
1144
+ * named context Indexes object, or an explicit reference).
1145
+ *
1146
+ * This component renders a Slice by iterating over its Row objects. By default
1147
+ * the Cells are in turn rendered with the CellView component, but you can
1148
+ * override this behavior by providing a `component` for each Cell in the
1149
+ * `customCells` prop. You can pass additional props to that custom component
1150
+ * with the `getComponentProps` callback. See the CustomCell type for more
1151
+ * details.
1152
+ *
1153
+ * This component uses the useSliceRowIds hook under the covers, which means
1154
+ * that any changes to the structure of the Slice will cause a re-render.
1155
+ *
1156
+ * You can use the `headerRow` and `idColumn` props to control whether labels
1157
+ * and Ids appear in a <th> element at the top of the table, and the start of
1158
+ * each row.
1159
+ * @param props The props for this component.
1160
+ * @returns A rendering of the Slice in a <table> element.
1161
+ * @example
1162
+ * This example creates a Provider context into which a default Indexes object
1163
+ * is provided. The SliceInHtmlTable component within it then renders the Slice
1164
+ * in a <table> element with a CSS class.
1165
+ *
1166
+ * ```jsx
1167
+ * import {render} from 'solid-js/web';
1168
+ * import {createIndexes, createStore} from 'tinybase';
1169
+ * import {Provider} from 'tinybase/ui-solid';
1170
+ * import {SliceInHtmlTable} from 'tinybase/ui-solid-dom';
1171
+ *
1172
+ * const App = ({indexes}) => (
1173
+ * <Provider indexes={indexes}>
1174
+ * <Pane />
1175
+ * </Provider>
1176
+ * );
1177
+ * const Pane = () => (
1178
+ * <SliceInHtmlTable indexId="bySpecies" sliceId="dog" className="slice" />
1179
+ * );
1180
+ *
1181
+ * const store = createStore().setTable('pets', {
1182
+ * fido: {species: 'dog'},
1183
+ * felix: {species: 'cat'},
1184
+ * cujo: {species: 'dog'},
1185
+ * });
1186
+ * const indexes = createIndexes(store);
1187
+ * indexes.setIndexDefinition('bySpecies', 'pets', 'species');
1188
+ *
1189
+ * const app = document.createElement('div');
1190
+ * render(() => <App indexes={indexes} />, app); // !act
1191
+ * console.log(app.innerHTML);
1192
+ * // ->
1193
+ * `
1194
+ * <table class="slice">
1195
+ * <thead>
1196
+ * <tr>
1197
+ * <th>Id</th>
1198
+ * <th>species</th>
1199
+ * </tr>
1200
+ * </thead>
1201
+ * <tbody>
1202
+ * <tr>
1203
+ * <th title="fido">fido</th>
1204
+ * <td>dog</td>
1205
+ * </tr>
1206
+ * <tr>
1207
+ * <th title="cujo">cujo</th>
1208
+ * <td>dog</td>
1209
+ * </tr>
1210
+ * </tbody>
1211
+ * </table>
1212
+ * `;
1213
+ * ```
1214
+ * @example
1215
+ * This example creates a Provider context into which a default Indexes object
1216
+ * is provided. The SliceInHtmlTable component within it then renders the Slice
1217
+ * with a custom component and a custom props callback for the `species` Cell.
1218
+ * The header row at the top of the table and the Id column at the start of each
1219
+ * row is removed.
1220
+ *
1221
+ * ```jsx
1222
+ * import {render} from 'solid-js/web';
1223
+ * import {createIndexes, createStore} from 'tinybase';
1224
+ * import {CellView, Provider} from 'tinybase/ui-solid';
1225
+ * import {SliceInHtmlTable} from 'tinybase/ui-solid-dom';
1226
+ *
1227
+ * const App = ({indexes}) => (
1228
+ * <Provider indexes={indexes}>
1229
+ * <Pane />
1230
+ * </Provider>
1231
+ * );
1232
+ * const Pane = () => (
1233
+ * <SliceInHtmlTable
1234
+ * indexId="bySpecies"
1235
+ * sliceId="dog"
1236
+ * customCells={customCells}
1237
+ * headerRow={false}
1238
+ * idColumn={false}
1239
+ * />
1240
+ * );
1241
+ *
1242
+ * const FormattedCellView = ({tableId, rowId, cellId, bold}) => (
1243
+ * <>
1244
+ * {bold ? <b>{rowId}</b> : rowId}:
1245
+ * <CellView tableId={tableId} rowId={rowId} cellId={cellId} />
1246
+ * </>
1247
+ * );
1248
+ * const customCells = {
1249
+ * species: {
1250
+ * component: FormattedCellView,
1251
+ * getComponentProps: (rowId) => ({bold: rowId == 'fido'}),
1252
+ * },
1253
+ * };
1254
+ *
1255
+ * const store = createStore().setTable('pets', {
1256
+ * fido: {species: 'dog', color: 'brown'},
1257
+ * felix: {species: 'cat'},
1258
+ * cujo: {species: 'dog'},
1259
+ * });
1260
+ * const indexes = createIndexes(store);
1261
+ * indexes.setIndexDefinition('bySpecies', 'pets', 'species');
1262
+ *
1263
+ * const app = document.createElement('div');
1264
+ * render(() => <App indexes={indexes} />, app); // !act
1265
+ * console.log(app.innerHTML);
1266
+ * // ->
1267
+ * `
1268
+ * <table>
1269
+ * <tbody>
1270
+ * <tr>
1271
+ * <td><b>fido</b>:</td>
1272
+ * </tr>
1273
+ * <tr>
1274
+ * <td>cujo:</td>
1275
+ * </tr>
1276
+ * </tbody>
1277
+ * </table>
1278
+ * `;
1279
+ * ```
1280
+ * @category Other components
1281
+ * @since v8.4.0
1282
+ */
1283
+ export function SliceInHtmlTable(
1284
+ props: SliceInHtmlTableProps & HtmlTableProps,
1285
+ ): ComponentReturnType;
1286
+
1287
+ /**
1288
+ * The RelationshipInHtmlTable component renders the contents of the two Tables
1289
+ * linked by a Relationship as an HTML <table> element, and registers a listener
1290
+ * so that any changes to that result will cause a re-render.
1291
+ *
1292
+ * See the <RelationshipInHtmlTable /> (Solid) demo for this component in
1293
+ * action:
1294
+ *
1295
+ * ![RelationshipInHtmlTable example](https://beta.tinybase.org/shots/relationshipinhtmltable-solid-demo.png
1296
+ * "RelationshipInHtmlTable example")
1297
+ *
1298
+ * The component's props identify which Relationship to render based on
1299
+ * Relationship Id and Relationships object (which is either the default context
1300
+ * Relationships object, a named context Relationships object, or an explicit
1301
+ * reference).
1302
+ *
1303
+ * This component renders the two Table objects by iterating over their related
1304
+ * Row objects. By default the Cells are in turn rendered with the CellView
1305
+ * component, but you can override this behavior by providing a `component` for
1306
+ * each Cell in the `customCells` prop. You can pass additional props to that
1307
+ * custom component with the `getComponentProps` callback. See the CustomCell
1308
+ * type for more details.
1309
+ *
1310
+ * Note the use of dotted 'tableId.cellId' string pairs when specifying custom
1311
+ * rendering for the cells in this table, since Cells from both the
1312
+ * relationship's 'local' and 'remote' Table objects can be rendered and need to
1313
+ * be distinguished.
1314
+ *
1315
+ * This component uses the useRowIds and useRemoteRowId hooks under the covers,
1316
+ * which means that any changes to the structure of either Table resulting in a
1317
+ * change to the relationship will cause a re-render.
1318
+ *
1319
+ * You can use the `headerRow` and `idColumn` props to control whether labels
1320
+ * and Ids appear in a <th> element at the top of the table, and the start of
1321
+ * each row.
1322
+ * @param props The props for this component.
1323
+ * @returns A rendering of the two Tables linked by a Relationship in a
1324
+ * <table> element.
1325
+ * @example
1326
+ * This example creates a Provider context into which a default Relationships
1327
+ * object is provided. The RelationshipInHtmlTable component within it then
1328
+ * renders the two Tables linked by a relationship in a <table> element with a
1329
+ * CSS class. Note the dotted pairs that are used as column headings.
1330
+ *
1331
+ * ```jsx
1332
+ * import {render} from 'solid-js/web';
1333
+ * import {createRelationships, createStore} from 'tinybase';
1334
+ * import {Provider} from 'tinybase/ui-solid';
1335
+ * import {RelationshipInHtmlTable} from 'tinybase/ui-solid-dom';
1336
+ *
1337
+ * const App = ({relationships}) => (
1338
+ * <Provider relationships={relationships}>
1339
+ * <Pane />
1340
+ * </Provider>
1341
+ * );
1342
+ * const Pane = () => (
1343
+ * <RelationshipInHtmlTable
1344
+ * relationshipId="petSpecies"
1345
+ * className="relationship"
1346
+ * />
1347
+ * );
1348
+ *
1349
+ * const relationships = createRelationships(
1350
+ * createStore()
1351
+ * .setTable('pets', {fido: {species: 'dog'}, cujo: {species: 'dog'}})
1352
+ * .setTable('species', {wolf: {price: 10}, dog: {price: 5}}),
1353
+ * ).setRelationshipDefinition('petSpecies', 'pets', 'species', 'species');
1354
+ *
1355
+ * const app = document.createElement('div');
1356
+ * render(() => <App relationships={relationships} />, app); // !act
1357
+ * console.log(app.innerHTML);
1358
+ * // ->
1359
+ * `
1360
+ * <table class="relationship">
1361
+ * <thead>
1362
+ * <tr>
1363
+ * <th>pets.Id</th>
1364
+ * <th>species.Id</th>
1365
+ * <th>pets.species</th>
1366
+ * <th>species.price</th>
1367
+ * </tr>
1368
+ * </thead>
1369
+ * <tbody>
1370
+ * <tr>
1371
+ * <th title="fido">fido</th>
1372
+ * <th title="dog">dog</th>
1373
+ * <td>dog</td>
1374
+ * <td>5</td>
1375
+ * </tr>
1376
+ * <tr>
1377
+ * <th title="cujo">cujo</th>
1378
+ * <th title="dog">dog</th>
1379
+ * <td>dog</td>
1380
+ * <td>5</td>
1381
+ * </tr>
1382
+ * </tbody>
1383
+ * </table>
1384
+ * `;
1385
+ * ```
1386
+ * @example
1387
+ * This example creates a Provider context into which a default Relationships
1388
+ * object is provided. The RelationshipInHtmlTable component within it then
1389
+ * renders the two Tables linked by a relationship with a custom component and a
1390
+ * custom props callback for the `species` Cell. The header row at the top of
1391
+ * the table and the Id column at the start of each row is removed.
1392
+ *
1393
+ * ```jsx
1394
+ * import {render} from 'solid-js/web';
1395
+ * import {createRelationships, createStore} from 'tinybase';
1396
+ * import {CellView, Provider} from 'tinybase/ui-solid';
1397
+ * import {RelationshipInHtmlTable} from 'tinybase/ui-solid-dom';
1398
+ *
1399
+ * const App = ({relationships}) => (
1400
+ * <Provider relationships={relationships}>
1401
+ * <Pane />
1402
+ * </Provider>
1403
+ * );
1404
+ * const Pane = () => (
1405
+ * <RelationshipInHtmlTable
1406
+ * relationshipId="petSpecies"
1407
+ * customCells={customCells}
1408
+ * idColumn={false}
1409
+ * headerRow={false}
1410
+ * />
1411
+ * );
1412
+ *
1413
+ * const FormattedCellView = ({tableId, rowId, cellId, store, bold}) => (
1414
+ * <>
1415
+ * {bold ? <b>{rowId}</b> : rowId}:
1416
+ * <CellView
1417
+ * tableId={tableId}
1418
+ * rowId={rowId}
1419
+ * cellId={cellId}
1420
+ * store={store}
1421
+ * />
1422
+ * </>
1423
+ * );
1424
+ * const customCells = {
1425
+ * 'species.price': {
1426
+ * component: FormattedCellView,
1427
+ * getComponentProps: (rowId) => ({bold: rowId == 'dog'}),
1428
+ * },
1429
+ * };
1430
+ *
1431
+ * const relationships = createRelationships(
1432
+ * createStore()
1433
+ * .setTable('pets', {fido: {species: 'dog'}, cujo: {species: 'wolf'}})
1434
+ * .setTable('species', {wolf: {price: 10}, dog: {price: 5}}),
1435
+ * ).setRelationshipDefinition('petSpecies', 'pets', 'species', 'species');
1436
+ *
1437
+ * const app = document.createElement('div');
1438
+ * render(() => <App relationships={relationships} />, app); // !act
1439
+ * console.log(app.innerHTML);
1440
+ * // ->
1441
+ * `
1442
+ * <table>
1443
+ * <tbody>
1444
+ * <tr>
1445
+ * <td><b>dog</b>:5</td>
1446
+ * </tr>
1447
+ * <tr>
1448
+ * <td>wolf:10</td>
1449
+ * </tr>
1450
+ * </tbody>
1451
+ * </table>
1452
+ * `;
1453
+ * ```
1454
+ * @category Other components
1455
+ * @since v8.4.0
1456
+ */
1457
+ export function RelationshipInHtmlTable(
1458
+ props: RelationshipInHtmlTableProps & HtmlTableProps,
1459
+ ): ComponentReturnType;
1460
+
1461
+ /**
1462
+ * The ResultTableInHtmlTable component renders the contents of a single query's
1463
+ * ResultTable in a Queries object as an HTML <table> element, and registers a
1464
+ * listener so that any changes to that result will cause a re-render.
1465
+ *
1466
+ * See the <ResultTableInHtmlTable /> (Solid) demo for this component in
1467
+ * action:
1468
+ *
1469
+ * ![ResultTableInHtmlTable example](https://beta.tinybase.org/shots/resulttableinhtmltable-solid-demo.png
1470
+ * "ResultTableInHtmlTable example")
1471
+ *
1472
+ * The component's props identify which ResultTable to render based on query Id,
1473
+ * and Queries object (which is either the default context Queries object, a
1474
+ * named context Queries object, or by explicit reference).
1475
+ *
1476
+ * This component renders a ResultTable by iterating over its Row objects. By
1477
+ * default the Cells are in turn rendered with the CellView component, but you
1478
+ * can override this behavior by providing a `component` for each Cell in the
1479
+ * `customCells` prop. You can pass additional props to that custom component
1480
+ * with the `getComponentProps` callback. See the ResultCustomCell type for more
1481
+ * details.
1482
+ *
1483
+ * This component uses the useRowIds hook under the covers, which means that any
1484
+ * changes to the structure of the Table will cause a re-render.
1485
+ *
1486
+ * You can use the `headerRow` and `idColumn` props to control whether the Ids
1487
+ * appear in a <th> element at the top of the table, and the start of each row.
1488
+ * @param props The props for this component.
1489
+ * @returns A rendering of the ResultTable in a <table> element.
1490
+ * @example
1491
+ * This example creates a Provider context into which a default Queries object
1492
+ * is provided. The ResultTableInHtmlTable component within it then renders the
1493
+ * ResultTable in a <table> element with a CSS class.
1494
+ *
1495
+ * ```jsx
1496
+ * import {render} from 'solid-js/web';
1497
+ * import {createQueries, createStore} from 'tinybase';
1498
+ * import {Provider} from 'tinybase/ui-solid';
1499
+ * import {ResultTableInHtmlTable} from 'tinybase/ui-solid-dom';
1500
+ *
1501
+ * const App = ({queries}) => (
1502
+ * <Provider queries={queries}>
1503
+ * <Pane />
1504
+ * </Provider>
1505
+ * );
1506
+ * const Pane = () => (
1507
+ * <ResultTableInHtmlTable queryId="petColors" className="table" />
1508
+ * );
1509
+ *
1510
+ * const queries = createQueries(
1511
+ * createStore().setTable('pets', {
1512
+ * fido: {species: 'dog', color: 'brown'},
1513
+ * felix: {species: 'cat', color: 'black'},
1514
+ * }),
1515
+ * ).setQueryDefinition('petColors', 'pets', ({select}) => select('color'));
1516
+ * const app = document.createElement('div');
1517
+ * render(() => <App queries={queries} />, app); // !act
1518
+ * console.log(app.innerHTML);
1519
+ * // ->
1520
+ * `
1521
+ * <table class="table">
1522
+ * <thead>
1523
+ * <tr>
1524
+ * <th>Id</th>
1525
+ * <th>color</th>
1526
+ * </tr>
1527
+ * </thead>
1528
+ * <tbody>
1529
+ * <tr>
1530
+ * <th title="fido">fido</th>
1531
+ * <td>brown</td>
1532
+ * </tr>
1533
+ * <tr>
1534
+ * <th title="felix">felix</th>
1535
+ * <td>black</td>
1536
+ * </tr>
1537
+ * </tbody>
1538
+ * </table>
1539
+ * `;
1540
+ * ```
1541
+ * @example
1542
+ * This example creates a Provider context into which a default Queries object
1543
+ * is provided. The ResultTableInHtmlTable component within it then renders the
1544
+ * ResultTable with a custom component and a custom props callback for the
1545
+ * `color` Cell. The header row at the top of the table and the Id column at
1546
+ * the start of each row is removed.
1547
+ *
1548
+ * ```jsx
1549
+ * import {render} from 'solid-js/web';
1550
+ * import {createQueries, createStore} from 'tinybase';
1551
+ * import {Provider, ResultCellView} from 'tinybase/ui-solid';
1552
+ * import {ResultTableInHtmlTable} from 'tinybase/ui-solid-dom';
1553
+ *
1554
+ * const App = ({queries}) => (
1555
+ * <Provider queries={queries}>
1556
+ * <Pane />
1557
+ * </Provider>
1558
+ * );
1559
+ * const Pane = () => (
1560
+ * <ResultTableInHtmlTable
1561
+ * queryId="petColors"
1562
+ * customCells={customCells}
1563
+ * headerRow={false}
1564
+ * idColumn={false}
1565
+ * />
1566
+ * );
1567
+ *
1568
+ * const FormattedResultCellView = ({queryId, rowId, cellId, bold}) => (
1569
+ * <>
1570
+ * {bold ? <b>{rowId}</b> : rowId}:
1571
+ * <ResultCellView queryId={queryId} rowId={rowId} cellId={cellId} />
1572
+ * </>
1573
+ * );
1574
+ * const customCells = {
1575
+ * color: {
1576
+ * component: FormattedResultCellView,
1577
+ * getComponentProps: (rowId) => ({bold: rowId == 'fido'}),
1578
+ * },
1579
+ * };
1580
+ *
1581
+ * const queries = createQueries(
1582
+ * createStore().setTable('pets', {
1583
+ * fido: {species: 'dog', color: 'brown'},
1584
+ * felix: {species: 'cat', color: 'black'},
1585
+ * }),
1586
+ * ).setQueryDefinition('petColors', 'pets', ({select}) => select('color'));
1587
+ * const app = document.createElement('div');
1588
+ * render(() => <App queries={queries} />, app); // !act
1589
+ * console.log(app.innerHTML);
1590
+ * // ->
1591
+ * `
1592
+ * <table>
1593
+ * <tbody>
1594
+ * <tr>
1595
+ * <td><b>fido</b>:brown</td>
1596
+ * </tr>
1597
+ * <tr>
1598
+ * <td>felix:black</td>
1599
+ * </tr>
1600
+ * </tbody>
1601
+ * </table>
1602
+ * `;
1603
+ * ```
1604
+ * @category Queries components
1605
+ * @since v8.4.0
1606
+ */
1607
+ export function ResultTableInHtmlTable(
1608
+ props: ResultTableInHtmlTableProps & HtmlTableProps,
1609
+ ): ComponentReturnType;
1610
+
1611
+ /**
1612
+ * The SortedTableInHtmlTable component renders the contents of a single query's
1613
+ * sorted ResultTable in a Queries object as an HTML <table> element, and
1614
+ * registers a listener so that any changes to that result will cause a
1615
+ * re-render.
1616
+ *
1617
+ * See the <ResultSortedTableInHtmlTable /> (Solid) demo for this component in
1618
+ * action:
1619
+ *
1620
+ * ![ResultSortedTableInHtmlTable example](https://beta.tinybase.org/shots/resultsortedtableinhtmltable-solid-demo.png
1621
+ * "ResultSortedTableInHtmlTable example")
1622
+ *
1623
+ * The component's props identify which ResultTable to render based on query Id,
1624
+ * and Queries object (which is either the default context Queries object, a
1625
+ * named context Queries object, or by explicit reference). It also takes a Cell
1626
+ * Id to sort by and a boolean to indicate that the sorting should be in
1627
+ * descending order. The `offset` and `limit` props are used to paginate
1628
+ * results, but default to `0` and `undefined` to return all available Row Ids
1629
+ * if not specified.
1630
+ *
1631
+ * This component renders a ResultTable by iterating over its Row objects, in
1632
+ * the order dictated by the sort parameters. By default the Cells are in turn
1633
+ * rendered with the CellView component, but you can override this behavior by
1634
+ * providing a `component` for each Cell in the `customCells` prop. You can pass
1635
+ * additional props to that custom component with the `getComponentProps`
1636
+ * callback. See the ResultCustomCell type for more details.
1637
+ *
1638
+ * This component uses the useSortedRowIds hook under the covers, which means
1639
+ * that any changes to the structure or sorting of the ResultTable will cause a
1640
+ * re-render.
1641
+ *
1642
+ * You can use the `headerRow` and `idColumn` props to control whether the Ids
1643
+ * appear in a <th> element at the top of the table, and the start of each row.
1644
+ *
1645
+ * The `sortOnClick` prop makes the table's sorting interactive such that the
1646
+ * user can click on a column heading to sort by that column. The style classes
1647
+ * `sorted` and `ascending` (or `descending`) are added so that you can provide
1648
+ * hints to the user how the sorting is being applied.
1649
+ *
1650
+ * Provide a paginator component for the ResultTable with the `paginator` prop.
1651
+ * Set to `true` to use the default SortedTablePaginator, or provide your own
1652
+ * component that accepts SortedTablePaginatorProps.
1653
+ *
1654
+ * Finally, the `onChange` prop lets you listen to a user's changes to the
1655
+ * ResultTable's sorting or pagination.
1656
+ * @param props The props for this component.
1657
+ * @returns A rendering of the ResultTable in a <table> element.
1658
+ * @example
1659
+ * This example creates a Provider context into which a default Queries object
1660
+ * is provided. The ResultSortedTableInHtmlTable component within it then
1661
+ * renders the ResultTable in a <table> element with a CSS class.
1662
+ *
1663
+ * ```jsx
1664
+ * import {render} from 'solid-js/web';
1665
+ * import {createQueries, createStore} from 'tinybase';
1666
+ * import {Provider} from 'tinybase/ui-solid';
1667
+ * import {ResultSortedTableInHtmlTable} from 'tinybase/ui-solid-dom';
1668
+ *
1669
+ * const App = ({queries}) => (
1670
+ * <Provider queries={queries}>
1671
+ * <Pane />
1672
+ * </Provider>
1673
+ * );
1674
+ * const Pane = () => (
1675
+ * <ResultSortedTableInHtmlTable
1676
+ * queryId="petColors"
1677
+ * cellId="color"
1678
+ * className="table"
1679
+ * />
1680
+ * );
1681
+ *
1682
+ * const queries = createQueries(
1683
+ * createStore().setTable('pets', {
1684
+ * fido: {species: 'dog', color: 'brown'},
1685
+ * felix: {species: 'cat', color: 'black'},
1686
+ * }),
1687
+ * ).setQueryDefinition('petColors', 'pets', ({select}) => select('color'));
1688
+ * const app = document.createElement('div');
1689
+ * render(() => <App queries={queries} />, app); // !act
1690
+ * console.log(app.innerHTML);
1691
+ * // ->
1692
+ * `
1693
+ * <table class="table">
1694
+ * <thead>
1695
+ * <tr>
1696
+ * <th>Id</th>
1697
+ * <th class="sorted ascending">↑ color</th>
1698
+ * </tr>
1699
+ * </thead>
1700
+ * <tbody>
1701
+ * <tr>
1702
+ * <th title="felix">felix</th>
1703
+ * <td>black</td>
1704
+ * </tr>
1705
+ * <tr>
1706
+ * <th title="fido">fido</th>
1707
+ * <td>brown</td>
1708
+ * </tr>
1709
+ * </tbody>
1710
+ * </table>
1711
+ * `;
1712
+ * ```
1713
+ * @example
1714
+ * This example creates a Provider context into which a default Queries object
1715
+ * is provided. The ResultSortedTableInHtmlTable component within it then
1716
+ * renders the ResultTable with a custom component and a custom props callback
1717
+ * for the `color` Cell. The header row at the top of the table and the Id
1718
+ * column at the start of each row is removed.
1719
+ *
1720
+ * ```jsx
1721
+ * import {render} from 'solid-js/web';
1722
+ * import {createQueries, createStore} from 'tinybase';
1723
+ * import {Provider, ResultCellView} from 'tinybase/ui-solid';
1724
+ * import {ResultSortedTableInHtmlTable} from 'tinybase/ui-solid-dom';
1725
+ *
1726
+ * const App = ({queries}) => (
1727
+ * <Provider queries={queries}>
1728
+ * <Pane />
1729
+ * </Provider>
1730
+ * );
1731
+ *
1732
+ * const Pane = () => (
1733
+ * <ResultSortedTableInHtmlTable
1734
+ * queryId="petColors"
1735
+ * cellId="color"
1736
+ * customCells={customCells}
1737
+ * headerRow={false}
1738
+ * idColumn={false}
1739
+ * />
1740
+ * );
1741
+ *
1742
+ * const FormattedResultCellView = ({queryId, rowId, cellId, bold}) => (
1743
+ * <>
1744
+ * {bold ? <b>{rowId}</b> : rowId}:
1745
+ * <ResultCellView queryId={queryId} rowId={rowId} cellId={cellId} />
1746
+ * </>
1747
+ * );
1748
+ * const customCells = {
1749
+ * color: {
1750
+ * component: FormattedResultCellView,
1751
+ * getComponentProps: (rowId) => ({bold: rowId == 'fido'}),
1752
+ * },
1753
+ * };
1754
+ *
1755
+ * const queries = createQueries(
1756
+ * createStore().setTable('pets', {
1757
+ * fido: {species: 'dog', color: 'brown'},
1758
+ * felix: {species: 'cat', color: 'black'},
1759
+ * }),
1760
+ * ).setQueryDefinition('petColors', 'pets', ({select}) => select('color'));
1761
+ * const app = document.createElement('div');
1762
+ * render(() => <App queries={queries} />, app); // !act
1763
+ * console.log(app.innerHTML);
1764
+ * // ->
1765
+ * `
1766
+ * <table>
1767
+ * <tbody>
1768
+ * <tr>
1769
+ * <td>felix:black</td>
1770
+ * </tr>
1771
+ * <tr>
1772
+ * <td><b>fido</b>:brown</td>
1773
+ * </tr>
1774
+ * </tbody>
1775
+ * </table>
1776
+ * `;
1777
+ * ```
1778
+ * @category Queries components
1779
+ * @since v8.4.0
1780
+ */
1781
+ export function ResultSortedTableInHtmlTable(
1782
+ props: ResultSortedTableInHtmlTableProps & HtmlTableProps,
1783
+ ): ComponentReturnType;
1784
+
1785
+ /**
1786
+ * The EditableCellView component renders the value of a single Cell in a way
1787
+ * that can be edited in a web browser, and registers a listener so that any
1788
+ * changes to that result will cause a re-render.
1789
+ *
1790
+ * See the <EditableCellView /> (Solid) demo for this component in action:
1791
+ *
1792
+ * ![EditableCellView example](https://beta.tinybase.org/shots/editablecellview-solid-demo.png
1793
+ * "EditableCellView example")
1794
+ *
1795
+ * The component's props identify which Cell to render based on Table Id, Row
1796
+ * Id, Cell Id, and Store (which is either the default context Store, a named
1797
+ * context Store, or an explicit reference).
1798
+ *
1799
+ * A Cell contains a string, number, boolean, object or array (since v8.0) so
1800
+ * the value is rendered in an appropriate <input> tag, possibly as JSON and a
1801
+ * button lets the user cycle through the types.
1802
+ *
1803
+ * Set the `showType` prop to false to remove the ability for the user to see or
1804
+ * change the Cell type. They will also not be able to change the type if there
1805
+ * is a TablesSchema applied to the Store.
1806
+ *
1807
+ * This component uses the useCell hook under the covers, which means that any
1808
+ * changes to the specified Cell outside of this component will cause a
1809
+ * re-render.
1810
+ *
1811
+ * You can provide a custom className prop which well be used on the root of the
1812
+ * resulting element. If omitted the element's class will be `editableCell`. The
1813
+ * debugIds prop has no effect on this component.
1814
+ * @param props The props for this component.
1815
+ * @returns An editable rendering of the Cell.
1816
+ * @example
1817
+ * This example creates a Provider context into which a default Store is
1818
+ * provided. The EditableCellView component within it then renders an editable
1819
+ * Cell.
1820
+ *
1821
+ * ```jsx
1822
+ * import {render} from 'solid-js/web';
1823
+ * import {createStore} from 'tinybase';
1824
+ * import {Provider} from 'tinybase/ui-solid';
1825
+ * import {EditableCellView} from 'tinybase/ui-solid-dom';
1826
+ *
1827
+ * const App = ({store}) => (
1828
+ * <Provider store={store}>
1829
+ * <Pane />
1830
+ * </Provider>
1831
+ * );
1832
+ * const Pane = () => (
1833
+ * <EditableCellView tableId="pets" rowId="fido" cellId="color" />
1834
+ * );
1835
+ *
1836
+ * const store = createStore().setCell('pets', 'fido', 'color', 'brown');
1837
+ * const app = document.createElement('div');
1838
+ * render(() => <App store={store} />, app); // !act
1839
+ * console.log(app.innerHTML);
1840
+ * // ->
1841
+ * `
1842
+ * <div class="editableCell">
1843
+ * <button title="string" class="string">string</button>
1844
+ * <input value="brown">
1845
+ * </div>
1846
+ * `;
1847
+ * ```
1848
+ * @category Store components
1849
+ * @since v8.4.0
1850
+ */
1851
+ export function EditableCellView(
1852
+ props: CellProps & {readonly className?: string; readonly showType?: boolean},
1853
+ ): ComponentReturnType;
1854
+
1855
+ /**
1856
+ * The EditableValueView component renders the value of a single Value in a way
1857
+ * that can be edited in a web browser, and registers a listener so that any
1858
+ * changes to that result will cause a re-render.
1859
+ *
1860
+ * See the <EditableValueView /> (Solid) demo for this component in action:
1861
+ *
1862
+ * ![EditableValueView example](https://beta.tinybase.org/shots/editablevalueview-solid-demo.png
1863
+ * "EditableValueView example")
1864
+ *
1865
+ * The component's props identify which Value to render based on Table Id, Row
1866
+ * Id, Value Id, and Store (which is either the default context Store, a named
1867
+ * context Store, or an explicit reference).
1868
+ *
1869
+ * A Value contains a string, number, boolean, object or array (since v8.0) so
1870
+ * the value is rendered in an appropriate <input> tag, possibly as JSON and a
1871
+ * button lets the user cycle through the types.
1872
+ *
1873
+ * Set the `showType` prop to false to remove the ability for the user to see or
1874
+ * change the Value type. They will also not be able to change the type if there
1875
+ * is a ValuesSchema applied to the Store.
1876
+ *
1877
+ * This component uses the useValue hook under the covers, which means that any
1878
+ * changes to the specified Value outside of this component will cause a
1879
+ * re-render.
1880
+ *
1881
+ * You can provide a custom className prop which well be used on the root of the
1882
+ * resulting element. If omitted the element's class will be `editableValue`.
1883
+ * The debugIds prop has no effect on this component.
1884
+ * @param props The props for this component.
1885
+ * @returns An editable rendering of the Value.
1886
+ * @example
1887
+ * This example creates a Provider context into which a default Store is
1888
+ * provided. The EditableValueView component within it then renders an editable
1889
+ * Value.
1890
+ *
1891
+ * ```jsx
1892
+ * import {render} from 'solid-js/web';
1893
+ * import {createStore} from 'tinybase';
1894
+ * import {Provider} from 'tinybase/ui-solid';
1895
+ * import {EditableValueView} from 'tinybase/ui-solid-dom';
1896
+ *
1897
+ * const App = ({store}) => (
1898
+ * <Provider store={store}>
1899
+ * <Pane />
1900
+ * </Provider>
1901
+ * );
1902
+ * const Pane = () => <EditableValueView valueId="employees" />;
1903
+ *
1904
+ * const store = createStore().setValue('employees', 3);
1905
+ * const app = document.createElement('div');
1906
+ * render(() => <App store={store} />, app); // !act
1907
+ * console.log(app.innerHTML);
1908
+ * // ->
1909
+ * `
1910
+ * <div class="editableValue">
1911
+ * <button title="number" class="number">number</button>
1912
+ * <input type="number" value="3">
1913
+ * </div>
1914
+ * `;
1915
+ * ```
1916
+ * @category Store components
1917
+ * @since v8.4.0
1918
+ */
1919
+ export function EditableValueView(
1920
+ props: ValueProps & {
1921
+ readonly className?: string;
1922
+ readonly showType?: boolean;
1923
+ },
1924
+ ): ComponentReturnType;
1925
+
1926
+ /**
1927
+ * The SortedTablePaginator component renders a paginator for a sorted table.
1928
+ *
1929
+ * See the <SortedTableInHtmlTable /> (Solid) demo for this component in
1930
+ * action:
1931
+ *
1932
+ * ![SortedTablePaginator example](https://beta.tinybase.org/shots/sortedtablepaginator-solid-demo.png
1933
+ * "SortedTablePaginator example")
1934
+ *
1935
+ * The component displays 'previous' and 'next' buttons for paging through the
1936
+ * Table if there are more Row Ids than fit in each page. The component will
1937
+ * also display a label that shows which Row Ids are being displayed.
1938
+ *
1939
+ * The component's props identify initial pagination settings, and it will fire
1940
+ * an event when the pagination changes.
1941
+ * @param props The props for this component.
1942
+ * @returns The rendering of a paginator control with a label, and next and
1943
+ * previous buttons, where appropriate.
1944
+ * @example
1945
+ * This example creates a Provider context into which a default Store is
1946
+ * provided. The SortedTableInHtmlTable component within it then renders the
1947
+ * Table in a <table> element with a SortedTablePaginator (the default).
1948
+ *
1949
+ * ```jsx
1950
+ * import {render} from 'solid-js/web';
1951
+ * import {createStore} from 'tinybase';
1952
+ * import {Provider} from 'tinybase/ui-solid';
1953
+ * import {SortedTableInHtmlTable} from 'tinybase/ui-solid-dom';
1954
+ *
1955
+ * const App = ({store}) => (
1956
+ * <Provider store={store}>
1957
+ * <Pane />
1958
+ * </Provider>
1959
+ * );
1960
+ * const Pane = () => (
1961
+ * <SortedTableInHtmlTable
1962
+ * tableId="pets"
1963
+ * cellId="species"
1964
+ * limit={2}
1965
+ * paginator={true}
1966
+ * />
1967
+ * );
1968
+ *
1969
+ * const store = createStore().setTables({
1970
+ * pets: {
1971
+ * fido: {species: 'dog'},
1972
+ * felix: {species: 'cat'},
1973
+ * cujo: {species: 'wolf'},
1974
+ * lowly: {species: 'worm'},
1975
+ * polly: {species: 'parrot'},
1976
+ * },
1977
+ * });
1978
+ * const app = document.createElement('div');
1979
+ * render(() => <App store={store} />, app); // !act
1980
+ * console.log(app.innerHTML);
1981
+ * // ->
1982
+ * `
1983
+ * <table>
1984
+ * <caption>
1985
+ * <button class="previous" disabled="">←</button>
1986
+ * <button class="next">→</button>
1987
+ * 1 to 2 of 5 rows
1988
+ * </caption>
1989
+ * <thead>
1990
+ * <tr>
1991
+ * <th>Id</th>
1992
+ * <th class="sorted ascending">↑ species</th>
1993
+ * </tr>
1994
+ * </thead>
1995
+ * <tbody>
1996
+ * <tr>
1997
+ * <th title="felix">felix</th>
1998
+ * <td>cat</td>
1999
+ * </tr>
2000
+ * <tr>
2001
+ * <th title="fido">fido</th>
2002
+ * <td>dog</td>
2003
+ * </tr>
2004
+ * </tbody>
2005
+ * </table>
2006
+ * `;
2007
+ * ```
2008
+ * @category Store components
2009
+ * @since v8.4.0
2010
+ */
2011
+ export function SortedTablePaginator(
2012
+ props: SortedTablePaginatorProps,
2013
+ ): ComponentReturnType;