tinybase 2.0.0-beta.2 → 2.0.0-beta.3
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/lib/checkpoints.js +1 -1
- package/lib/checkpoints.js.gz +0 -0
- package/lib/debug/checkpoints.js +1 -4
- package/lib/debug/indexes.js +1 -3
- package/lib/debug/metrics.js +1 -4
- package/lib/debug/queries.d.ts +61 -296
- package/lib/debug/queries.js +59 -201
- package/lib/debug/relationships.js +1 -4
- package/lib/debug/store.d.ts +112 -90
- package/lib/debug/store.js +90 -149
- package/lib/debug/tinybase.js +130 -333
- package/lib/debug/ui-react.d.ts +81 -81
- package/lib/debug/ui-react.js +138 -173
- package/lib/indexes.js +1 -1
- package/lib/indexes.js.gz +0 -0
- package/lib/metrics.js +1 -1
- package/lib/metrics.js.gz +0 -0
- package/lib/queries.d.ts +61 -296
- package/lib/queries.js +1 -1
- package/lib/queries.js.gz +0 -0
- package/lib/relationships.js +1 -1
- package/lib/relationships.js.gz +0 -0
- package/lib/store.d.ts +112 -90
- package/lib/store.js +1 -1
- package/lib/store.js.gz +0 -0
- package/lib/tinybase.js +1 -1
- package/lib/tinybase.js.gz +0 -0
- package/lib/ui-react.d.ts +81 -81
- package/lib/ui-react.js +1 -1
- package/lib/ui-react.js.gz +0 -0
- package/lib/umd/checkpoints.js +1 -1
- package/lib/umd/checkpoints.js.gz +0 -0
- package/lib/umd/indexes.js +1 -1
- package/lib/umd/indexes.js.gz +0 -0
- package/lib/umd/metrics.js +1 -1
- package/lib/umd/metrics.js.gz +0 -0
- package/lib/umd/queries.js +1 -1
- package/lib/umd/queries.js.gz +0 -0
- package/lib/umd/relationships.js +1 -1
- package/lib/umd/relationships.js.gz +0 -0
- package/lib/umd/store.js +1 -1
- package/lib/umd/store.js.gz +0 -0
- package/lib/umd/tinybase.js +1 -1
- package/lib/umd/tinybase.js.gz +0 -0
- package/lib/umd/ui-react.js +1 -1
- package/lib/umd/ui-react.js.gz +0 -0
- package/package.json +9 -9
- package/readme.md +2 -2
package/lib/debug/ui-react.d.ts
CHANGED
|
@@ -427,9 +427,6 @@ export function useTables(storeOrStoreId?: StoreOrStoreId): Tables;
|
|
|
427
427
|
* @param storeOrStoreId The Store to be accessed: omit for the default context
|
|
428
428
|
* Store, provide an Id for a named context Store, or provide an explicit
|
|
429
429
|
* reference.
|
|
430
|
-
* @param trackReorder Since v2.0.0, an optional boolean that indicates that the
|
|
431
|
-
* listener should be called if the set of Ids remains the same but their order
|
|
432
|
-
* changes. See the addTableIdsListener method for more details.
|
|
433
430
|
* @returns An array of the Ids of every Table in the Store.
|
|
434
431
|
* @example
|
|
435
432
|
* This example creates a Store outside the application, which is used in the
|
|
@@ -487,10 +484,7 @@ export function useTables(storeOrStoreId?: StoreOrStoreId): Tables;
|
|
|
487
484
|
* ```
|
|
488
485
|
* @category Store hooks
|
|
489
486
|
*/
|
|
490
|
-
export function useTableIds(
|
|
491
|
-
storeOrStoreId?: StoreOrStoreId,
|
|
492
|
-
trackReorder?: boolean,
|
|
493
|
-
): Ids;
|
|
487
|
+
export function useTableIds(storeOrStoreId?: StoreOrStoreId): Ids;
|
|
494
488
|
|
|
495
489
|
/**
|
|
496
490
|
* The useTable hook returns an object containing the entire data of a single
|
|
@@ -591,9 +585,6 @@ export function useTable(tableId: Id, storeOrStoreId?: StoreOrStoreId): Table;
|
|
|
591
585
|
* @param storeOrStoreId The Store to be accessed: omit for the default context
|
|
592
586
|
* Store, provide an Id for a named context Store, or provide an explicit
|
|
593
587
|
* reference.
|
|
594
|
-
* @param trackReorder Since v2.0.0, an optional boolean that indicates that the
|
|
595
|
-
* listener should be called if the set of Ids remains the same but their order
|
|
596
|
-
* changes. See the addRowIdsListener method for more details.
|
|
597
588
|
* @returns An array of the Ids of every Row in the Table.
|
|
598
589
|
* @example
|
|
599
590
|
* This example creates a Store outside the application, which is used in the
|
|
@@ -653,16 +644,12 @@ export function useTable(tableId: Id, storeOrStoreId?: StoreOrStoreId): Table;
|
|
|
653
644
|
* ```
|
|
654
645
|
* @category Store hooks
|
|
655
646
|
*/
|
|
656
|
-
export function useRowIds(
|
|
657
|
-
tableId: Id,
|
|
658
|
-
storeOrStoreId?: StoreOrStoreId,
|
|
659
|
-
trackReorder?: boolean,
|
|
660
|
-
): Ids;
|
|
647
|
+
export function useRowIds(tableId: Id, storeOrStoreId?: StoreOrStoreId): Ids;
|
|
661
648
|
|
|
662
649
|
/**
|
|
663
|
-
* The useSortedRowIds hook returns the sorted
|
|
664
|
-
* Table, and registers a listener so that any changes
|
|
665
|
-
* a re-render.
|
|
650
|
+
* The useSortedRowIds hook returns the sorted (and optionally, paginated) Ids
|
|
651
|
+
* of every Row in a given Table, and registers a listener so that any changes
|
|
652
|
+
* to that result will cause a re-render.
|
|
666
653
|
*
|
|
667
654
|
* A Provider component is used to wrap part of an application in a context, and
|
|
668
655
|
* it can contain a default Store or a set of Store objects named by Id. The
|
|
@@ -678,6 +665,8 @@ export function useRowIds(
|
|
|
678
665
|
* @param cellId The Id of the Cell whose values are used for the sorting, or
|
|
679
666
|
* `undefined` to by sort the Row Id itself.
|
|
680
667
|
* @param descending Whether the sorting should be in descending order.
|
|
668
|
+
* @param offset The number of Row Ids to skip for pagination purposes, if any.
|
|
669
|
+
* @param limit The maximum number of Row Ids to return, or `undefined` for all.
|
|
681
670
|
* @param storeOrStoreId The Store to be accessed: omit for the default context
|
|
682
671
|
* Store, provide an Id for a named context Store, or provide an explicit
|
|
683
672
|
* reference.
|
|
@@ -696,7 +685,9 @@ export function useRowIds(
|
|
|
696
685
|
* });
|
|
697
686
|
* const App = () => (
|
|
698
687
|
* <span>
|
|
699
|
-
* {JSON.stringify(
|
|
688
|
+
* {JSON.stringify(
|
|
689
|
+
* useSortedRowIds('pets', 'species', false, 0, undefined, store),
|
|
690
|
+
* )}
|
|
700
691
|
* </span>
|
|
701
692
|
* );
|
|
702
693
|
*
|
|
@@ -744,7 +735,9 @@ export function useRowIds(
|
|
|
744
735
|
* );
|
|
745
736
|
* const Pane = () => (
|
|
746
737
|
* <span>
|
|
747
|
-
* {JSON.stringify(
|
|
738
|
+
* {JSON.stringify(
|
|
739
|
+
* useSortedRowIds('pets', 'species', false, 0, undefined, 'petStore'),
|
|
740
|
+
* )}
|
|
748
741
|
* </span>
|
|
749
742
|
* );
|
|
750
743
|
*
|
|
@@ -766,6 +759,8 @@ export function useSortedRowIds(
|
|
|
766
759
|
tableId: Id,
|
|
767
760
|
cellId?: Id,
|
|
768
761
|
descending?: boolean,
|
|
762
|
+
offset?: number,
|
|
763
|
+
limit?: number,
|
|
769
764
|
storeOrStoreId?: StoreOrStoreId,
|
|
770
765
|
): Ids;
|
|
771
766
|
|
|
@@ -876,9 +871,6 @@ export function useRow(
|
|
|
876
871
|
* @param storeOrStoreId The Store to be accessed: omit for the default context
|
|
877
872
|
* Store, provide an Id for a named context Store, or provide an explicit
|
|
878
873
|
* reference.
|
|
879
|
-
* @param trackReorder Since v2.0.0, an optional boolean that indicates that the
|
|
880
|
-
* listener should be called if the set of Ids remains the same but their order
|
|
881
|
-
* changes. See the addCellIdsListener method for more details.
|
|
882
874
|
* @returns An array of the Ids of every Cell in the Row.
|
|
883
875
|
* @example
|
|
884
876
|
* This example creates a Store outside the application, which is used in the
|
|
@@ -946,7 +938,6 @@ export function useCellIds(
|
|
|
946
938
|
tableId: Id,
|
|
947
939
|
rowId: Id,
|
|
948
940
|
storeOrStoreId?: StoreOrStoreId,
|
|
949
|
-
trackReorder?: boolean,
|
|
950
941
|
): Ids;
|
|
951
942
|
|
|
952
943
|
/**
|
|
@@ -1953,9 +1944,6 @@ export function useTablesListener(
|
|
|
1953
1944
|
* @param listenerDeps An optional array of dependencies for the `listener`
|
|
1954
1945
|
* function, which, if any change, result in the re-registration of the
|
|
1955
1946
|
* listener. This parameter defaults to an empty array.
|
|
1956
|
-
* @param trackReorder Since v2.0.0, an optional boolean that indicates that the
|
|
1957
|
-
* listener should be called if the set of Ids remains the same but their order
|
|
1958
|
-
* changes. See the addTableIdsListener method for more details.
|
|
1959
1947
|
* @param mutator An optional boolean that indicates that the listener mutates
|
|
1960
1948
|
* Store data.
|
|
1961
1949
|
* @param storeOrStoreId The Store to register the listener with: omit for the
|
|
@@ -1995,7 +1983,6 @@ export function useTablesListener(
|
|
|
1995
1983
|
export function useTableIdsListener(
|
|
1996
1984
|
listener: TableIdsListener,
|
|
1997
1985
|
listenerDeps?: React.DependencyList,
|
|
1998
|
-
trackReorder?: boolean,
|
|
1999
1986
|
mutator?: boolean,
|
|
2000
1987
|
storeOrStoreId?: StoreOrStoreId,
|
|
2001
1988
|
): void;
|
|
@@ -2088,9 +2075,6 @@ export function useTableListener(
|
|
|
2088
2075
|
* @param listenerDeps An optional array of dependencies for the `listener`
|
|
2089
2076
|
* function, which, if any change, result in the re-registration of the
|
|
2090
2077
|
* listener. This parameter defaults to an empty array.
|
|
2091
|
-
* @param trackReorder Since v2.0.0, an optional boolean that indicates that the
|
|
2092
|
-
* listener should be called if the set of Ids remains the same but their order
|
|
2093
|
-
* changes. See the addRowIdsListener method for more details.
|
|
2094
2078
|
* @param mutator An optional boolean that indicates that the listener mutates
|
|
2095
2079
|
* Store data.
|
|
2096
2080
|
* @param storeOrStoreId The Store to register the listener with: omit for the
|
|
@@ -2131,14 +2115,14 @@ export function useRowIdsListener(
|
|
|
2131
2115
|
tableId: IdOrNull,
|
|
2132
2116
|
listener: RowIdsListener,
|
|
2133
2117
|
listenerDeps?: React.DependencyList,
|
|
2134
|
-
trackReorder?: boolean,
|
|
2135
2118
|
mutator?: boolean,
|
|
2136
2119
|
storeOrStoreId?: StoreOrStoreId,
|
|
2137
2120
|
): void;
|
|
2138
2121
|
|
|
2139
2122
|
/**
|
|
2140
2123
|
* The useSortedRowIdsListener hook registers a listener function with a Store
|
|
2141
|
-
* that will be called whenever
|
|
2124
|
+
* that will be called whenever sorted (and optionally, paginated) Row Ids in a
|
|
2125
|
+
* Table change.
|
|
2142
2126
|
*
|
|
2143
2127
|
* This hook is useful for situations where a component needs to register its
|
|
2144
2128
|
* own specific listener to do more than simply tracking the value (which is
|
|
@@ -2154,6 +2138,8 @@ export function useRowIdsListener(
|
|
|
2154
2138
|
* @param cellId The Id of the Cell whose values are used for the sorting, or
|
|
2155
2139
|
* `undefined` to by sort the Row Id itself.
|
|
2156
2140
|
* @param descending Whether the sorting should be in descending order.
|
|
2141
|
+
* @param offset The number of Row Ids to skip for pagination purposes, if any.
|
|
2142
|
+
* @param limit The maximum number of Row Ids to return, or `undefined` for all.
|
|
2157
2143
|
* @param listener The function that will be called whenever the sorted Row Ids
|
|
2158
2144
|
* in the Table change.
|
|
2159
2145
|
* @param listenerDeps An optional array of dependencies for the `listener`
|
|
@@ -2176,7 +2162,7 @@ export function useRowIdsListener(
|
|
|
2176
2162
|
* </Provider>
|
|
2177
2163
|
* );
|
|
2178
2164
|
* const Pane = () => {
|
|
2179
|
-
* useSortedRowIdsListener('pets', 'species', false, () =>
|
|
2165
|
+
* useSortedRowIdsListener('pets', 'species', false, 0, undefined, () =>
|
|
2180
2166
|
* console.log('Sorted Row Ids changed'),
|
|
2181
2167
|
* );
|
|
2182
2168
|
* return <span>App</span>;
|
|
@@ -2206,6 +2192,8 @@ export function useSortedRowIdsListener(
|
|
|
2206
2192
|
tableId: Id,
|
|
2207
2193
|
cellId: Id | undefined,
|
|
2208
2194
|
descending: boolean,
|
|
2195
|
+
offset: number,
|
|
2196
|
+
limit: number | undefined,
|
|
2209
2197
|
listener: SortedRowIdsListener,
|
|
2210
2198
|
listenerDeps?: React.DependencyList,
|
|
2211
2199
|
mutator?: boolean,
|
|
@@ -2316,9 +2304,6 @@ export function useRowListener(
|
|
|
2316
2304
|
* @param listenerDeps An optional array of dependencies for the `listener`
|
|
2317
2305
|
* function, which, if any change, result in the re-registration of the
|
|
2318
2306
|
* listener. This parameter defaults to an empty array.
|
|
2319
|
-
* @param trackReorder Since v2.0.0, an optional boolean that indicates that the
|
|
2320
|
-
* listener should be called if the set of Ids remains the same but their order
|
|
2321
|
-
* changes. See the addCellIdsListener method for more details.
|
|
2322
2307
|
* @param mutator An optional boolean that indicates that the listener mutates
|
|
2323
2308
|
* Store data.
|
|
2324
2309
|
* @param storeOrStoreId The Store to register the listener with: omit for the
|
|
@@ -2362,7 +2347,6 @@ export function useCellIdsListener(
|
|
|
2362
2347
|
rowId: IdOrNull,
|
|
2363
2348
|
listener: CellIdsListener,
|
|
2364
2349
|
listenerDeps?: React.DependencyList,
|
|
2365
|
-
trackReorder?: boolean,
|
|
2366
2350
|
mutator?: boolean,
|
|
2367
2351
|
storeOrStoreId?: StoreOrStoreId,
|
|
2368
2352
|
): void;
|
|
@@ -4462,8 +4446,6 @@ export function useResultTable(
|
|
|
4462
4446
|
* @param queriesOrQueriesId The Queries object to be accessed: omit for the
|
|
4463
4447
|
* default context Queries object, provide an Id for a named context Queries
|
|
4464
4448
|
* object, or provide an explicit reference.
|
|
4465
|
-
* @param trackReorder An optional boolean that indicates that the listener
|
|
4466
|
-
* should be called if the set of Ids remains the same but their order changes.
|
|
4467
4449
|
* See the addResultRowIdsListener method for more details.
|
|
4468
4450
|
* @returns An array of the Ids of every Row in the result of the query.
|
|
4469
4451
|
* @example
|
|
@@ -4562,13 +4544,12 @@ export function useResultTable(
|
|
|
4562
4544
|
export function useResultRowIds(
|
|
4563
4545
|
queryId: Id,
|
|
4564
4546
|
queriesOrQueriesId?: QueriesOrQueriesId,
|
|
4565
|
-
trackReorder?: boolean,
|
|
4566
4547
|
): Ids;
|
|
4567
4548
|
|
|
4568
4549
|
/**
|
|
4569
|
-
* The useResultSortedRowIds hook returns the sorted
|
|
4570
|
-
* result Table of the given query, and registers a
|
|
4571
|
-
* to those Ids will cause a re-render.
|
|
4550
|
+
* The useResultSortedRowIds hook returns the sorted (and optionally, paginated)
|
|
4551
|
+
* Ids of every Row in the result Table of the given query, and registers a
|
|
4552
|
+
* listener so that any changes to those Ids will cause a re-render.
|
|
4572
4553
|
*
|
|
4573
4554
|
* A Provider component is used to wrap part of an application in a context, and
|
|
4574
4555
|
* it can contain a default Queries object or a set of Queries objects named by
|
|
@@ -4585,6 +4566,8 @@ export function useResultRowIds(
|
|
|
4585
4566
|
* @param cellId The Id of the result Cell whose values are used for the
|
|
4586
4567
|
* sorting, or `undefined` to by sort the result Row Id itself.
|
|
4587
4568
|
* @param descending Whether the sorting should be in descending order.
|
|
4569
|
+
* @param offset The number of Row Ids to skip for pagination purposes, if any.
|
|
4570
|
+
* @param limit The maximum number of Row Ids to return, or `undefined` for all.
|
|
4588
4571
|
* @param queriesOrQueriesId The Queries object to be accessed: omit for the
|
|
4589
4572
|
* default context Queries object, provide an Id for a named context Queries
|
|
4590
4573
|
* object, or provide an explicit reference.
|
|
@@ -4611,7 +4594,14 @@ export function useResultRowIds(
|
|
|
4611
4594
|
* const App = () => (
|
|
4612
4595
|
* <span>
|
|
4613
4596
|
* {JSON.stringify(
|
|
4614
|
-
* useResultSortedRowIds(
|
|
4597
|
+
* useResultSortedRowIds(
|
|
4598
|
+
* 'dogColors',
|
|
4599
|
+
* 'color',
|
|
4600
|
+
* false,
|
|
4601
|
+
* 0,
|
|
4602
|
+
* undefined,
|
|
4603
|
+
* queries,
|
|
4604
|
+
* ),
|
|
4615
4605
|
* )}
|
|
4616
4606
|
* </span>
|
|
4617
4607
|
* );
|
|
@@ -4637,7 +4627,7 @@ export function useResultRowIds(
|
|
|
4637
4627
|
* );
|
|
4638
4628
|
* const Pane = () => (
|
|
4639
4629
|
* <span>
|
|
4640
|
-
* {JSON.stringify(useResultSortedRowIds('dogColors', 'color'
|
|
4630
|
+
* {JSON.stringify(useResultSortedRowIds('dogColors', 'color'))}
|
|
4641
4631
|
* </span>
|
|
4642
4632
|
* );
|
|
4643
4633
|
*
|
|
@@ -4670,7 +4660,14 @@ export function useResultRowIds(
|
|
|
4670
4660
|
* const Pane = () => (
|
|
4671
4661
|
* <span>
|
|
4672
4662
|
* {JSON.stringify(
|
|
4673
|
-
* useResultSortedRowIds(
|
|
4663
|
+
* useResultSortedRowIds(
|
|
4664
|
+
* 'dogColors',
|
|
4665
|
+
* 'color',
|
|
4666
|
+
* false,
|
|
4667
|
+
* 0,
|
|
4668
|
+
* undefined,
|
|
4669
|
+
* 'petQueries',
|
|
4670
|
+
* ),
|
|
4674
4671
|
* )}
|
|
4675
4672
|
* </span>
|
|
4676
4673
|
* );
|
|
@@ -4696,6 +4693,8 @@ export function useResultSortedRowIds(
|
|
|
4696
4693
|
queryId: Id,
|
|
4697
4694
|
cellId?: Id,
|
|
4698
4695
|
descending?: boolean,
|
|
4696
|
+
offset?: number,
|
|
4697
|
+
limit?: number,
|
|
4699
4698
|
queriesOrQueriesId?: QueriesOrQueriesId,
|
|
4700
4699
|
): Ids;
|
|
4701
4700
|
|
|
@@ -5180,9 +5179,6 @@ export function useResultTableListener(
|
|
|
5180
5179
|
* @param listenerDeps An optional array of dependencies for the `listener`
|
|
5181
5180
|
* function, which, if any change, result in the re-registration of the
|
|
5182
5181
|
* listener. This parameter defaults to an empty array.
|
|
5183
|
-
* @param trackReorder An optional boolean that indicates that the listener
|
|
5184
|
-
* should be called if the set of Ids remains the same but their order changes.
|
|
5185
|
-
* See the addResultRowIdsListener method for more details.
|
|
5186
5182
|
* @param queriesOrQueriesId The Queries object to register the listener with:
|
|
5187
5183
|
* omit for the default context Queries object, provide an Id for a named
|
|
5188
5184
|
* context Queries object, or provide an explicit reference.
|
|
@@ -5232,14 +5228,13 @@ export function useResultRowIdsListener(
|
|
|
5232
5228
|
queryId: IdOrNull,
|
|
5233
5229
|
listener: ResultRowIdsListener,
|
|
5234
5230
|
listenerDeps?: React.DependencyList,
|
|
5235
|
-
trackReorder?: boolean,
|
|
5236
5231
|
queriesOrQueriesId?: QueriesOrQueriesId,
|
|
5237
5232
|
): void;
|
|
5238
5233
|
|
|
5239
5234
|
/**
|
|
5240
5235
|
* The useResultSortedRowIdsListener hook registers a listener function with a
|
|
5241
|
-
* Queries object that will be called whenever the sorted
|
|
5242
|
-
* Table change.
|
|
5236
|
+
* Queries object that will be called whenever the sorted (and optionally,
|
|
5237
|
+
* paginated) Row Ids in a result Table change.
|
|
5243
5238
|
*
|
|
5244
5239
|
* This hook is useful for situations where a component needs to register its
|
|
5245
5240
|
* own specific listener to do more than simply tracking the value (which is
|
|
@@ -5255,6 +5250,8 @@ export function useResultRowIdsListener(
|
|
|
5255
5250
|
* @param cellId The Id of the Cell whose values are used for the sorting, or
|
|
5256
5251
|
* `undefined` to by sort the Row Id itself.
|
|
5257
5252
|
* @param descending Whether the sorting should be in descending order.
|
|
5253
|
+
* @param offset The number of Row Ids to skip for pagination purposes, if any.
|
|
5254
|
+
* @param limit The maximum number of Row Ids to return, or `undefined` for all.
|
|
5258
5255
|
* @param listener The function that will be called whenever the Row Ids in the
|
|
5259
5256
|
* matching result Table change.
|
|
5260
5257
|
* @param listenerDeps An optional array of dependencies for the `listener`
|
|
@@ -5275,8 +5272,13 @@ export function useResultRowIdsListener(
|
|
|
5275
5272
|
* </Provider>
|
|
5276
5273
|
* );
|
|
5277
5274
|
* const Pane = () => {
|
|
5278
|
-
* useResultSortedRowIdsListener(
|
|
5279
|
-
*
|
|
5275
|
+
* useResultSortedRowIdsListener(
|
|
5276
|
+
* 'petColors',
|
|
5277
|
+
* 'color',
|
|
5278
|
+
* false,
|
|
5279
|
+
* 0,
|
|
5280
|
+
* undefined,
|
|
5281
|
+
* () => console.log('Sorted result Row Ids changed'),
|
|
5280
5282
|
* );
|
|
5281
5283
|
* return <span>App</span>;
|
|
5282
5284
|
* };
|
|
@@ -5309,6 +5311,8 @@ export function useResultSortedRowIdsListener(
|
|
|
5309
5311
|
queryId: Id,
|
|
5310
5312
|
cellId: Id | undefined,
|
|
5311
5313
|
descending: boolean,
|
|
5314
|
+
offset: number,
|
|
5315
|
+
limit: number | undefined,
|
|
5312
5316
|
listener: ResultRowIdsListener,
|
|
5313
5317
|
listenerDeps?: React.DependencyList,
|
|
5314
5318
|
queriesOrQueriesId?: QueriesOrQueriesId,
|
|
@@ -6567,12 +6571,6 @@ export type TablesProps = {
|
|
|
6567
6571
|
* for a named context Store, or provide an explicit reference.
|
|
6568
6572
|
*/
|
|
6569
6573
|
readonly store?: StoreOrStoreId;
|
|
6570
|
-
/**
|
|
6571
|
-
* An optional boolean that indicates that the component should re-render if
|
|
6572
|
-
* the set of Table Ids in the Store remains the same but their order changes.
|
|
6573
|
-
* See the addTableIdsListener method for more details.
|
|
6574
|
-
*/
|
|
6575
|
-
readonly trackReorder?: boolean;
|
|
6576
6574
|
/**
|
|
6577
6575
|
* A component for rendering each Table in the Store (to override the default
|
|
6578
6576
|
* TableView component).
|
|
@@ -6610,12 +6608,6 @@ export type TableProps = {
|
|
|
6610
6608
|
* for a named context Store, or provide an explicit reference.
|
|
6611
6609
|
*/
|
|
6612
6610
|
readonly store?: StoreOrStoreId;
|
|
6613
|
-
/**
|
|
6614
|
-
* An optional boolean that indicates that the component should re-render if
|
|
6615
|
-
* the set of Row Ids in the Table remains the same but their order changes.
|
|
6616
|
-
* See the addRowIdsListener method for more details.
|
|
6617
|
-
*/
|
|
6618
|
-
readonly trackReorder?: boolean;
|
|
6619
6611
|
/**
|
|
6620
6612
|
* A custom component for rendering each Row in the Table (to override the
|
|
6621
6613
|
* default RowView component).
|
|
@@ -6658,6 +6650,14 @@ export type SortedTableProps = {
|
|
|
6658
6650
|
* Whether the sorting should be in descending order.
|
|
6659
6651
|
*/
|
|
6660
6652
|
readonly descending?: boolean;
|
|
6653
|
+
/**
|
|
6654
|
+
* The number of Row Ids to skip for pagination purposes.
|
|
6655
|
+
*/
|
|
6656
|
+
readonly offset?: number;
|
|
6657
|
+
/**
|
|
6658
|
+
* The maximum number of Row Ids to return.
|
|
6659
|
+
*/
|
|
6660
|
+
readonly limit?: number;
|
|
6661
6661
|
/**
|
|
6662
6662
|
* The Store to be accessed: omit for the default context Store, provide an Id
|
|
6663
6663
|
* for a named context Store, or provide an explicit reference.
|
|
@@ -6704,12 +6704,6 @@ export type RowProps = {
|
|
|
6704
6704
|
* for a named context Store, or provide an explicit reference.
|
|
6705
6705
|
*/
|
|
6706
6706
|
readonly store?: StoreOrStoreId;
|
|
6707
|
-
/**
|
|
6708
|
-
* An optional boolean that indicates that the component should re-render if
|
|
6709
|
-
* the set of Cell Ids remains the same but their order changes. See the
|
|
6710
|
-
* addCellIdsListener method for more details.
|
|
6711
|
-
*/
|
|
6712
|
-
readonly trackReorder?: boolean;
|
|
6713
6707
|
/**
|
|
6714
6708
|
* A custom component for rendering each Cell in the Row (to override the
|
|
6715
6709
|
* default CellView component).
|
|
@@ -7009,12 +7003,6 @@ export type ResultTableProps = {
|
|
|
7009
7003
|
* explicit reference.
|
|
7010
7004
|
*/
|
|
7011
7005
|
readonly queries?: QueriesOrQueriesId;
|
|
7012
|
-
/**
|
|
7013
|
-
* An optional boolean that indicates that the component should re-render if
|
|
7014
|
-
* the set of Row Ids in the result Table remains the same but their order
|
|
7015
|
-
* changes. See the addResultRowIdsListener method for more details.
|
|
7016
|
-
*/
|
|
7017
|
-
readonly trackReorder?: boolean;
|
|
7018
7006
|
/**
|
|
7019
7007
|
* A custom component for rendering each Row in the Table (to override the
|
|
7020
7008
|
* default ResultRowView component).
|
|
@@ -7058,6 +7046,14 @@ export type ResultSortedTableProps = {
|
|
|
7058
7046
|
* Whether the sorting should be in descending order.
|
|
7059
7047
|
*/
|
|
7060
7048
|
readonly descending?: boolean;
|
|
7049
|
+
/**
|
|
7050
|
+
* The number of Row Ids to skip for pagination purposes.
|
|
7051
|
+
*/
|
|
7052
|
+
readonly offset?: number;
|
|
7053
|
+
/**
|
|
7054
|
+
* The maximum number of Row Ids to return.
|
|
7055
|
+
*/
|
|
7056
|
+
readonly limit?: number;
|
|
7061
7057
|
/**
|
|
7062
7058
|
* The Queries object to be accessed: omit for the default context Queries
|
|
7063
7059
|
* object, provide an Id for a named context Queries object, or provide an
|
|
@@ -7678,7 +7674,9 @@ export function RowView(props: RowProps): ComponentReturnType;
|
|
|
7678
7674
|
* The component's props identify which Table to render based on Table Id, and
|
|
7679
7675
|
* Store (which is either the default context Store, a named context Store, or
|
|
7680
7676
|
* by explicit reference). It also takes a Cell Id to sort by and a boolean to
|
|
7681
|
-
* indicate that the sorting should be in descending order.
|
|
7677
|
+
* indicate that the sorting should be in descending order. The `offset` and
|
|
7678
|
+
* `limit` props are used to paginate results, but default to `0` and
|
|
7679
|
+
* `undefined` to return all available Row Ids if not specified.
|
|
7682
7680
|
*
|
|
7683
7681
|
* This component renders a Table by iterating over its Row objects, in the
|
|
7684
7682
|
* order dictated by the sort parameters. By default these are in turn rendered
|
|
@@ -9048,7 +9046,9 @@ export function ResultRowView(props: ResultRowProps): ComponentReturnType;
|
|
|
9048
9046
|
* Queries object (which is either the default context Queries object, a named
|
|
9049
9047
|
* context Queries object, or by explicit reference). It also takes a Cell Id to
|
|
9050
9048
|
* sort by and a boolean to indicate that the sorting should be in descending
|
|
9051
|
-
* order.
|
|
9049
|
+
* order. The `offset` and `limit` props are used to paginate results, but
|
|
9050
|
+
* default to `0` and `undefined` to return all available Row Ids if not
|
|
9051
|
+
* specified.
|
|
9052
9052
|
*
|
|
9053
9053
|
* This component renders a result Table by iterating over its Row objects, in
|
|
9054
9054
|
* the order dictated by the sort parameters. By default these are in turn
|