tinybase 9.0.0 → 9.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/common/index.d.ts +17 -2
- package/@types/common/with-schemas/index.d.ts +18 -2
- package/@types/store/index.d.ts +37 -7
- package/@types/store/with-schemas/index.d.ts +38 -7
- package/@types/ui-react/index.d.ts +6 -2
- package/@types/ui-react/with-schemas/index.d.ts +7 -2
- package/@types/ui-react-dom/index.d.ts +10 -10
- package/@types/ui-react-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-react-dom-charts/index.d.ts +7 -7
- package/@types/ui-react-dom-charts/with-schemas/index.d.ts +7 -7
- package/@types/ui-react-inspector/index.d.ts +1 -1
- package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-solid/index.d.ts +9 -2
- package/@types/ui-solid/with-schemas/index.d.ts +10 -2
- package/@types/ui-solid-dom/index.d.ts +10 -10
- package/@types/ui-solid-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-solid-inspector/index.d.ts +1 -1
- package/@types/ui-solid-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-svelte/index.d.ts +50 -2
- package/@types/ui-svelte/with-schemas/index.d.ts +88 -25
- package/@types/ui-svelte-dom/index.d.ts +10 -10
- package/@types/ui-svelte-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-svelte-inspector/index.d.ts +1 -1
- package/@types/ui-svelte-inspector/with-schemas/index.d.ts +1 -1
- package/index.js +34 -6
- package/mergeable-store/index.js +34 -6
- package/mergeable-store/with-schemas/index.js +34 -6
- package/min/index.js +1 -1
- package/min/index.js.gz +0 -0
- package/min/mergeable-store/index.js +1 -1
- package/min/mergeable-store/index.js.gz +0 -0
- package/min/mergeable-store/with-schemas/index.js +1 -1
- package/min/mergeable-store/with-schemas/index.js.gz +0 -0
- package/min/omni/index.js +1 -1
- package/min/omni/index.js.gz +0 -0
- package/min/omni/with-schemas/index.js +1 -1
- package/min/omni/with-schemas/index.js.gz +0 -0
- package/min/store/index.js +1 -1
- package/min/store/index.js.gz +0 -0
- package/min/store/with-schemas/index.js +1 -1
- package/min/store/with-schemas/index.js.gz +0 -0
- package/min/ui-react/index.js +1 -1
- package/min/ui-react/index.js.gz +0 -0
- package/min/ui-react/with-schemas/index.js +1 -1
- package/min/ui-react/with-schemas/index.js.gz +0 -0
- package/min/ui-react-dom/index.js +1 -1
- package/min/ui-react-dom/index.js.gz +0 -0
- package/min/ui-react-dom/with-schemas/index.js +1 -1
- package/min/ui-react-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-react-dom-charts/index.js +1 -1
- package/min/ui-react-dom-charts/index.js.gz +0 -0
- package/min/ui-react-dom-charts/with-schemas/index.js +1 -1
- package/min/ui-react-dom-charts/with-schemas/index.js.gz +0 -0
- package/min/ui-react-inspector/index.js +1 -1
- package/min/ui-react-inspector/index.js.gz +0 -0
- package/min/ui-react-inspector/with-schemas/index.js +1 -1
- package/min/ui-react-inspector/with-schemas/index.js.gz +0 -0
- package/min/ui-solid/index.js +1 -1
- package/min/ui-solid/index.js.gz +0 -0
- package/min/ui-solid/with-schemas/index.js +1 -1
- package/min/ui-solid/with-schemas/index.js.gz +0 -0
- package/min/ui-solid-dom/index.js +1 -1
- package/min/ui-solid-dom/index.js.gz +0 -0
- package/min/ui-solid-dom/with-schemas/index.js +1 -1
- package/min/ui-solid-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-solid-inspector/index.js +1 -1
- package/min/ui-solid-inspector/index.js.gz +0 -0
- package/min/ui-solid-inspector/with-schemas/index.js +1 -1
- package/min/ui-solid-inspector/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte/index.js +1 -1
- package/min/ui-svelte/index.js.gz +0 -0
- package/min/ui-svelte/with-schemas/index.js +1 -1
- package/min/ui-svelte/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte-dom/index.js +1 -1
- package/min/ui-svelte-dom/index.js.gz +0 -0
- package/min/ui-svelte-dom/with-schemas/index.js +1 -1
- package/min/ui-svelte-dom/with-schemas/index.js.gz +0 -0
- package/min/ui-svelte-inspector/index.js +1 -1
- package/min/ui-svelte-inspector/index.js.gz +0 -0
- package/min/ui-svelte-inspector/with-schemas/index.js +1 -1
- package/min/ui-svelte-inspector/with-schemas/index.js.gz +0 -0
- package/min/with-schemas/index.js +1 -1
- package/min/with-schemas/index.js.gz +0 -0
- package/omni/index.js +34 -6
- package/omni/with-schemas/index.js +34 -6
- package/package.json +3 -3
- package/readme.md +14 -14
- package/releases.md +59 -59
- package/store/index.js +34 -6
- package/store/with-schemas/index.js +34 -6
- package/ui-react/index.js +36 -6
- package/ui-react/with-schemas/index.js +36 -6
- package/ui-react-dom/index.js +24 -4
- package/ui-react-dom/with-schemas/index.js +24 -4
- package/ui-react-dom-charts/index.js +24 -4
- package/ui-react-dom-charts/with-schemas/index.js +24 -4
- package/ui-react-inspector/index.js +58 -10
- package/ui-react-inspector/with-schemas/index.js +58 -10
- package/ui-solid/index.js +32 -2
- package/ui-solid/with-schemas/index.js +32 -2
- package/ui-solid-dom/index.js +17 -1
- package/ui-solid-dom/with-schemas/index.js +17 -1
- package/ui-solid-inspector/index.js +51 -7
- package/ui-solid-inspector/with-schemas/index.js +51 -7
- package/ui-svelte/index.js +73 -31
- package/ui-svelte/with-schemas/index.js +73 -31
- package/ui-svelte-dom/index.js +35 -14
- package/ui-svelte-dom/with-schemas/index.js +35 -14
- package/ui-svelte-inspector/index.js +69 -20
- package/ui-svelte-inspector/with-schemas/index.js +69 -20
- package/with-schemas/index.js +34 -6
package/@types/common/index.d.ts
CHANGED
|
@@ -83,11 +83,26 @@ export type ParameterizedCallback<Parameter> = (parameter?: Parameter) => void;
|
|
|
83
83
|
export type Callback = () => void;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* The SortKey type represents a value that can be used by
|
|
86
|
+
* The SortKey type represents a Cell value, or `undefined`, that can be used by
|
|
87
|
+
* a sort function.
|
|
87
88
|
* @category Parameter
|
|
88
89
|
* @since v1.0.0
|
|
89
90
|
*/
|
|
90
|
-
export type SortKey =
|
|
91
|
+
export type SortKey = CellOrUndefined;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The Sorter type represents a function that compares two SortKey values.
|
|
95
|
+
*
|
|
96
|
+
* A Sorter is provided to methods that sort Row Ids when the default
|
|
97
|
+
* alphanumeric ordering is not appropriate. Return a positive or negative
|
|
98
|
+
* number to indicate which of the two SortKey values should be ordered first.
|
|
99
|
+
* @param sortKey1 The first item of the pair to compare.
|
|
100
|
+
* @param sortKey2 The second item of the pair to compare.
|
|
101
|
+
* @returns A number indicating how to sort the pair.
|
|
102
|
+
* @category Parameter
|
|
103
|
+
* @since v9.1.0
|
|
104
|
+
*/
|
|
105
|
+
export type Sorter = (sortKey1: SortKey, sortKey2: SortKey) => number;
|
|
91
106
|
|
|
92
107
|
/**
|
|
93
108
|
* The GetNow type is used to represent a function that returns the current time
|
|
@@ -95,11 +95,27 @@ export type ParameterizedCallback<Parameter> = (parameter?: Parameter) => void;
|
|
|
95
95
|
export type Callback = () => void;
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
* The SortKey type represents a value that can be used by
|
|
98
|
+
* The SortKey type represents a Cell value, or `undefined`, that can be used by
|
|
99
|
+
* a sort function.
|
|
99
100
|
* @category Parameter
|
|
100
101
|
* @since v1.0.0
|
|
101
102
|
*/
|
|
102
|
-
export type SortKey =
|
|
103
|
+
export type SortKey =
|
|
104
|
+
string | number | boolean | null | AnyObject | AnyArray | undefined;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The Sorter type represents a function that compares two SortKey values.
|
|
108
|
+
*
|
|
109
|
+
* A Sorter is provided to methods that sort Row Ids when the default
|
|
110
|
+
* alphanumeric ordering is not appropriate. Return a positive or negative
|
|
111
|
+
* number to indicate which of the two SortKey values should be ordered first.
|
|
112
|
+
* @param sortKey1 The first item of the pair to compare.
|
|
113
|
+
* @param sortKey2 The second item of the pair to compare.
|
|
114
|
+
* @returns A number indicating how to sort the pair.
|
|
115
|
+
* @category Parameter
|
|
116
|
+
* @since v9.1.0
|
|
117
|
+
*/
|
|
118
|
+
export type Sorter = (sortKey1: SortKey, sortKey2: SortKey) => number;
|
|
103
119
|
|
|
104
120
|
/**
|
|
105
121
|
* The GetNow type is used to represent a function that returns the current time
|
package/@types/store/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
IdOrNull,
|
|
19
19
|
Ids,
|
|
20
20
|
Json,
|
|
21
|
+
Sorter,
|
|
21
22
|
} from '../common/index.d.ts';
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -625,7 +626,7 @@ export type DoRollback = (store: Store) => boolean;
|
|
|
625
626
|
* the getSortedRowIds method.
|
|
626
627
|
*
|
|
627
628
|
* It's an object containing the Id of the Table in the Store, and optional
|
|
628
|
-
* `cellId`, `descending`, `offset`, and `
|
|
629
|
+
* `cellId`, `descending`, `offset`, `limit`, and `sorter` parameters. See the
|
|
629
630
|
* getSortedRowIds method for specific examples.
|
|
630
631
|
* @category Store
|
|
631
632
|
* @since v6.1.0
|
|
@@ -662,6 +663,13 @@ export type SortedRowIdsArgs = {
|
|
|
662
663
|
* @since v6.1.0
|
|
663
664
|
*/
|
|
664
665
|
limit?: number;
|
|
666
|
+
/**
|
|
667
|
+
* A custom function for comparing the sorting values, defaulting to the
|
|
668
|
+
* defaultSorter function.
|
|
669
|
+
* @category Argument
|
|
670
|
+
* @since v9.1.0
|
|
671
|
+
*/
|
|
672
|
+
sorter?: Sorter;
|
|
665
673
|
};
|
|
666
674
|
|
|
667
675
|
/**
|
|
@@ -2196,10 +2204,11 @@ export interface Store {
|
|
|
2196
2204
|
* The getSortedRowIds method returns the Ids of every Row in a given Table,
|
|
2197
2205
|
* sorted according to the values in a specified Cell.
|
|
2198
2206
|
*
|
|
2199
|
-
*
|
|
2200
|
-
* should be in descending order. The `offset` and `limit`
|
|
2201
|
-
* to paginate results, but default to `0` and
|
|
2202
|
-
* available Row Ids if not specified.
|
|
2207
|
+
* By default the sorting of the rows is alphanumeric, and you can indicate
|
|
2208
|
+
* whether it should be in descending order. The `offset` and `limit`
|
|
2209
|
+
* parameters are used to paginate results, but default to `0` and
|
|
2210
|
+
* `undefined` to return all available Row Ids if not specified. The `sorter`
|
|
2211
|
+
* parameter can provide a custom comparison function.
|
|
2203
2212
|
*
|
|
2204
2213
|
* Note that every call to this method will perform the sorting afresh - there
|
|
2205
2214
|
* is no caching of the results - and so you are advised to memoize the
|
|
@@ -2216,6 +2225,8 @@ export interface Store {
|
|
|
2216
2225
|
* any.
|
|
2217
2226
|
* @param limit The maximum number of Row Ids to return, or `undefined` for
|
|
2218
2227
|
* all.
|
|
2228
|
+
* @param sorter A custom function for comparing the sorting values, or
|
|
2229
|
+
* `undefined` to use the defaultSorter function.
|
|
2219
2230
|
* @returns An array of the sorted Ids of appropriate Rows in the Table.
|
|
2220
2231
|
* @example
|
|
2221
2232
|
* This example retrieves sorted Row Ids in a Table.
|
|
@@ -2287,6 +2298,24 @@ export interface Store {
|
|
|
2287
2298
|
* // -> ['cujo', 'felix', 'fido']
|
|
2288
2299
|
* ```
|
|
2289
2300
|
* @example
|
|
2301
|
+
* This example retrieves Row Ids sorted numerically by their own value.
|
|
2302
|
+
*
|
|
2303
|
+
* ```js
|
|
2304
|
+
* import {createStore} from 'tinybase';
|
|
2305
|
+
*
|
|
2306
|
+
* const store = createStore();
|
|
2307
|
+
* ['1', '10', '2'].forEach((rowId) =>
|
|
2308
|
+
* store.setRow('pets', rowId, {sold: false}),
|
|
2309
|
+
* );
|
|
2310
|
+
* const numericSorter = (sortKey1, sortKey2) =>
|
|
2311
|
+
* Number(sortKey1) - Number(sortKey2);
|
|
2312
|
+
*
|
|
2313
|
+
* console.log(
|
|
2314
|
+
* store.getSortedRowIds({tableId: 'pets', sorter: numericSorter}),
|
|
2315
|
+
* );
|
|
2316
|
+
* // -> ['1', '2', '10']
|
|
2317
|
+
* ```
|
|
2318
|
+
* @example
|
|
2290
2319
|
* This example retrieves the sorted Row Ids of a Table that does not exist,
|
|
2291
2320
|
* returning an empty array.
|
|
2292
2321
|
*
|
|
@@ -2306,13 +2335,14 @@ export interface Store {
|
|
|
2306
2335
|
descending?: boolean,
|
|
2307
2336
|
offset?: number,
|
|
2308
2337
|
limit?: number,
|
|
2338
|
+
sorter?: Sorter,
|
|
2309
2339
|
): Ids;
|
|
2310
2340
|
|
|
2311
2341
|
/**
|
|
2312
2342
|
* When called with one object argument, the getSortedRowIds method
|
|
2313
2343
|
* destructures it to make it easier to skip optional parameters.
|
|
2314
2344
|
* @param args A SortedRowIdsArgs object containing the Id of the Table in the
|
|
2315
|
-
* Store, and optional `cellId`, `descending`, `offset`, and `
|
|
2345
|
+
* Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
|
|
2316
2346
|
* parameters.
|
|
2317
2347
|
* @returns An array of the sorted Ids of appropriate Rows in the Table.
|
|
2318
2348
|
* @example
|
|
@@ -5813,7 +5843,7 @@ export interface Store {
|
|
|
5813
5843
|
* addSortedRowIdsListener method destructures it to make it easier to skip
|
|
5814
5844
|
* optional parameters.
|
|
5815
5845
|
* @param args A SortedRowIdsArgs object containing the Id of the Table in the
|
|
5816
|
-
* Store, and optional `cellId`, `descending`, `offset`, and `
|
|
5846
|
+
* Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
|
|
5817
5847
|
* parameters.
|
|
5818
5848
|
* @param listener The function that will be called whenever the sorted Row
|
|
5819
5849
|
* Ids in the Table change.
|
|
@@ -29,6 +29,7 @@ import type {
|
|
|
29
29
|
IdOrNull,
|
|
30
30
|
Ids,
|
|
31
31
|
Json,
|
|
32
|
+
Sorter,
|
|
32
33
|
} from '../../common/with-schemas/index.d.ts';
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -947,7 +948,7 @@ export type DoRollback<Schemas extends OptionalSchemas> = (
|
|
|
947
948
|
* the getSortedRowIds method.
|
|
948
949
|
*
|
|
949
950
|
* It's an object containing the Id of the Table in the Store, and optional
|
|
950
|
-
* `cellId`, `descending`, `offset`, and `
|
|
951
|
+
* `cellId`, `descending`, `offset`, `limit`, and `sorter` parameters. See the
|
|
951
952
|
* getSortedRowIds method for specific examples.
|
|
952
953
|
* @category Store
|
|
953
954
|
* @since v6.1.0
|
|
@@ -989,6 +990,13 @@ export type SortedRowIdsArgs<
|
|
|
989
990
|
* @since v6.1.0
|
|
990
991
|
*/
|
|
991
992
|
limit?: number;
|
|
993
|
+
/**
|
|
994
|
+
* A custom function for comparing the sorting values, defaulting to the
|
|
995
|
+
* defaultSorter function.
|
|
996
|
+
* @category Argument
|
|
997
|
+
* @since v9.1.0
|
|
998
|
+
*/
|
|
999
|
+
sorter?: Sorter;
|
|
992
1000
|
};
|
|
993
1001
|
|
|
994
1002
|
/**
|
|
@@ -3216,13 +3224,15 @@ export interface Store<in out Schemas extends OptionalSchemas> {
|
|
|
3216
3224
|
* descending?: boolean,
|
|
3217
3225
|
* offset?: number,
|
|
3218
3226
|
* limit?: number,
|
|
3227
|
+
* sorter?: Sorter,
|
|
3219
3228
|
* ): Ids;
|
|
3220
3229
|
* ```
|
|
3221
3230
|
*
|
|
3222
|
-
*
|
|
3223
|
-
* should be in descending order. The `offset` and `limit`
|
|
3224
|
-
* to paginate results, but default to `0` and
|
|
3225
|
-
* available Row Ids if not specified.
|
|
3231
|
+
* By default the sorting of the rows is alphanumeric, and you can indicate
|
|
3232
|
+
* whether it should be in descending order. The `offset` and `limit`
|
|
3233
|
+
* parameters are used to paginate results, but default to `0` and
|
|
3234
|
+
* `undefined` to return all available Row Ids if not specified. The `sorter`
|
|
3235
|
+
* parameter can provide a custom comparison function.
|
|
3226
3236
|
*
|
|
3227
3237
|
* Note that every call to this method will perform the sorting afresh - there
|
|
3228
3238
|
* is no caching of the results - and so you are advised to memoize the
|
|
@@ -3239,6 +3249,8 @@ export interface Store<in out Schemas extends OptionalSchemas> {
|
|
|
3239
3249
|
* any.
|
|
3240
3250
|
* @param limit The maximum number of Row Ids to return, or `undefined` for
|
|
3241
3251
|
* all.
|
|
3252
|
+
* @param sorter A custom function for comparing the sorting values, or
|
|
3253
|
+
* `undefined` to use the defaultSorter function.
|
|
3242
3254
|
* @returns An array of the sorted Ids of appropriate Rows in the Table.
|
|
3243
3255
|
* @example
|
|
3244
3256
|
* This example retrieves sorted Row Ids in a Table.
|
|
@@ -3310,6 +3322,24 @@ export interface Store<in out Schemas extends OptionalSchemas> {
|
|
|
3310
3322
|
* // -> ['cujo', 'felix', 'fido']
|
|
3311
3323
|
* ```
|
|
3312
3324
|
* @example
|
|
3325
|
+
* This example retrieves Row Ids sorted numerically by their own value.
|
|
3326
|
+
*
|
|
3327
|
+
* ```js
|
|
3328
|
+
* import {createStore} from 'tinybase';
|
|
3329
|
+
*
|
|
3330
|
+
* const store = createStore();
|
|
3331
|
+
* ['1', '10', '2'].forEach((rowId) =>
|
|
3332
|
+
* store.setRow('pets', rowId, {sold: false}),
|
|
3333
|
+
* );
|
|
3334
|
+
* const numericSorter = (sortKey1, sortKey2) =>
|
|
3335
|
+
* Number(sortKey1) - Number(sortKey2);
|
|
3336
|
+
*
|
|
3337
|
+
* console.log(
|
|
3338
|
+
* store.getSortedRowIds({tableId: 'pets', sorter: numericSorter}),
|
|
3339
|
+
* );
|
|
3340
|
+
* // -> ['1', '2', '10']
|
|
3341
|
+
* ```
|
|
3342
|
+
* @example
|
|
3313
3343
|
* This example retrieves the sorted Row Ids of a Table that does not exist,
|
|
3314
3344
|
* returning an empty array.
|
|
3315
3345
|
*
|
|
@@ -3329,13 +3359,14 @@ export interface Store<in out Schemas extends OptionalSchemas> {
|
|
|
3329
3359
|
descending?: boolean,
|
|
3330
3360
|
offset?: number,
|
|
3331
3361
|
limit?: number,
|
|
3362
|
+
sorter?: Sorter,
|
|
3332
3363
|
): Ids;
|
|
3333
3364
|
|
|
3334
3365
|
/**
|
|
3335
3366
|
* When called with one object argument, the getSortedRowIds method
|
|
3336
3367
|
* destructures it to make it easier to skip optional parameters.
|
|
3337
3368
|
* @param args A SortedRowIdsArgs object containing the Id of the Table in the
|
|
3338
|
-
* Store, and optional `cellId`, `descending`, `offset`, and `
|
|
3369
|
+
* Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
|
|
3339
3370
|
* parameters.
|
|
3340
3371
|
* @returns An array of the sorted Ids of appropriate Rows in the Table.
|
|
3341
3372
|
* @example
|
|
@@ -7295,7 +7326,7 @@ export interface Store<in out Schemas extends OptionalSchemas> {
|
|
|
7295
7326
|
* addSortedRowIdsListener method destructures it to make it easier to skip
|
|
7296
7327
|
* optional parameters.
|
|
7297
7328
|
* @param args A SortedRowIdsArgs object containing the Id of the Table in the
|
|
7298
|
-
* Store, and optional `cellId`, `descending`, `offset`, and `
|
|
7329
|
+
* Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
|
|
7299
7330
|
* parameters.
|
|
7300
7331
|
* @param listener The function that will be called whenever the sorted Row
|
|
7301
7332
|
* Ids in the Table change.
|
|
@@ -36,6 +36,7 @@ import type {
|
|
|
36
36
|
IdOrNull,
|
|
37
37
|
Ids,
|
|
38
38
|
ParameterizedCallback,
|
|
39
|
+
Sorter,
|
|
39
40
|
} from '../common/index.d.ts';
|
|
40
41
|
import type {
|
|
41
42
|
Indexes,
|
|
@@ -1797,6 +1798,7 @@ export function useSortedRowIds(
|
|
|
1797
1798
|
descending?: boolean,
|
|
1798
1799
|
offset?: number,
|
|
1799
1800
|
limit?: number,
|
|
1801
|
+
sorterOrStoreOrStoreId?: Sorter | StoreOrStoreId,
|
|
1800
1802
|
storeOrStoreId?: StoreOrStoreId,
|
|
1801
1803
|
): Ids;
|
|
1802
1804
|
|
|
@@ -1804,7 +1806,8 @@ export function useSortedRowIds(
|
|
|
1804
1806
|
* When called with an object as the first argument, the useSortedRowIds method
|
|
1805
1807
|
* destructures it to make it easier to skip optional parameters.
|
|
1806
1808
|
* @param args A SortedRowIdsArgs object containing the Id of the Table in the
|
|
1807
|
-
* Store, and optional `cellId`, `descending`, `offset`, and `
|
|
1809
|
+
* Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
|
|
1810
|
+
* parameters.
|
|
1808
1811
|
* @param storeOrStoreId The Store to be accessed: omit for the default context
|
|
1809
1812
|
* Store, provide an Id for a named context Store, or provide an explicit
|
|
1810
1813
|
* reference.
|
|
@@ -5178,7 +5181,8 @@ export function useSortedRowIdsListener(
|
|
|
5178
5181
|
* When called with an object as the first argument, the useSortedRowIds method
|
|
5179
5182
|
* destructures it to make it easier to skip optional parameters.
|
|
5180
5183
|
* @param args A SortedRowIdsArgs object containing the Id of the Table in the
|
|
5181
|
-
* Store, and optional `cellId`, `descending`, `offset`, and `
|
|
5184
|
+
* Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
|
|
5185
|
+
* parameters.
|
|
5182
5186
|
* @param listener The function that will be called whenever the sorted Row Ids
|
|
5183
5187
|
* in the Table change.
|
|
5184
5188
|
* @param listenerDeps An optional array of dependencies for the `listener`
|
|
@@ -82,6 +82,7 @@ import type {
|
|
|
82
82
|
IdOrNull,
|
|
83
83
|
Ids,
|
|
84
84
|
ParameterizedCallback,
|
|
85
|
+
Sorter,
|
|
85
86
|
} from '../../common/with-schemas/index.d.ts';
|
|
86
87
|
import type {
|
|
87
88
|
Indexes,
|
|
@@ -1901,6 +1902,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1901
1902
|
* descending?: boolean,
|
|
1902
1903
|
* offset?: number,
|
|
1903
1904
|
* limit?: number,
|
|
1905
|
+
* sorterOrStoreOrStoreId?: Sorter | StoreOrStoreId,
|
|
1904
1906
|
* storeOrStoreId?: StoreOrStoreId,
|
|
1905
1907
|
* ): Ids;
|
|
1906
1908
|
* ```
|
|
@@ -2032,6 +2034,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2032
2034
|
descending?: boolean,
|
|
2033
2035
|
offset?: number,
|
|
2034
2036
|
limit?: number,
|
|
2037
|
+
sorterOrStoreOrStoreId?: Sorter | StoreOrStoreId<Schemas>,
|
|
2035
2038
|
storeOrStoreId?: StoreOrStoreId<Schemas>,
|
|
2036
2039
|
): Ids;
|
|
2037
2040
|
|
|
@@ -2039,7 +2042,8 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
2039
2042
|
* When called with an object as the first argument, the useSortedRowIds method
|
|
2040
2043
|
* destructures it to make it easier to skip optional parameters.
|
|
2041
2044
|
* @param args A SortedRowIdsArgs object containing the Id of the Table in the
|
|
2042
|
-
* Store, and optional `cellId`, `descending`, `offset`, and `
|
|
2045
|
+
* Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
|
|
2046
|
+
* parameters.
|
|
2043
2047
|
* @param storeOrStoreId The Store to be accessed: omit for the default context
|
|
2044
2048
|
* Store, provide an Id for a named context Store, or provide an explicit
|
|
2045
2049
|
* reference.
|
|
@@ -5957,7 +5961,8 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
5957
5961
|
* When called with an object as the first argument, the useSortedRowIds method
|
|
5958
5962
|
* destructures it to make it easier to skip optional parameters.
|
|
5959
5963
|
* @param args A SortedRowIdsArgs object containing the Id of the Table in the
|
|
5960
|
-
* Store, and optional `cellId`, `descending`, `offset`, and `
|
|
5964
|
+
* Store, and optional `cellId`, `descending`, `offset`, `limit`, and `sorter`
|
|
5965
|
+
* parameters.
|
|
5961
5966
|
* @param listener The function that will be called whenever the sorted Row Ids
|
|
5962
5967
|
* in the Table change.
|
|
5963
5968
|
* @param listenerDeps An optional array of dependencies for the `listener`
|
|
@@ -692,7 +692,7 @@ export type SortedTablePaginatorProps = {
|
|
|
692
692
|
*
|
|
693
693
|
* See the <TableInHtmlTable /> (React) demo for this component in action:
|
|
694
694
|
*
|
|
695
|
-
* 
|
|
697
697
|
*
|
|
698
698
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -838,7 +838,7 @@ export function TableInHtmlTable(
|
|
|
838
838
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
839
839
|
* action:
|
|
840
840
|
*
|
|
841
|
-
* 
|
|
843
843
|
*
|
|
844
844
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1011,7 +1011,7 @@ export function SortedTableInHtmlTable(
|
|
|
1011
1011
|
*
|
|
1012
1012
|
* See the <ValuesInHtmlTable /> (React) demo for this component in action:
|
|
1013
1013
|
*
|
|
1014
|
-
* 
|
|
1016
1016
|
*
|
|
1017
1017
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1142,7 +1142,7 @@ export function ValuesInHtmlTable(
|
|
|
1142
1142
|
*
|
|
1143
1143
|
* See the <SliceInHtmlTable /> (React) demo for this component in action:
|
|
1144
1144
|
*
|
|
1145
|
-
* 
|
|
1147
1147
|
*
|
|
1148
1148
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1300,7 +1300,7 @@ export function SliceInHtmlTable(
|
|
|
1300
1300
|
* See the <RelationshipInHtmlTable /> (React) demo for this component in
|
|
1301
1301
|
* action:
|
|
1302
1302
|
*
|
|
1303
|
-
* 
|
|
1305
1305
|
*
|
|
1306
1306
|
* The component's props identify which Relationship to render based on
|
|
@@ -1478,7 +1478,7 @@ export function RelationshipInHtmlTable(
|
|
|
1478
1478
|
* See the <ResultTableInHtmlTable /> (React) demo for this component in
|
|
1479
1479
|
* action:
|
|
1480
1480
|
*
|
|
1481
|
-
* 
|
|
1483
1483
|
*
|
|
1484
1484
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1631,7 +1631,7 @@ export function ResultTableInHtmlTable(
|
|
|
1631
1631
|
* See the <ResultSortedTableInHtmlTable /> (React) demo for this component in
|
|
1632
1632
|
* action:
|
|
1633
1633
|
*
|
|
1634
|
-
* 
|
|
1636
1636
|
*
|
|
1637
1637
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1805,7 +1805,7 @@ export function ResultSortedTableInHtmlTable(
|
|
|
1805
1805
|
*
|
|
1806
1806
|
* See the <EditableCellView /> (React) demo for this component in action:
|
|
1807
1807
|
*
|
|
1808
|
-
* 
|
|
1810
1810
|
*
|
|
1811
1811
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1876,7 +1876,7 @@ export function EditableCellView(
|
|
|
1876
1876
|
*
|
|
1877
1877
|
* See the <EditableValueView /> (React) demo for this component in action:
|
|
1878
1878
|
*
|
|
1879
|
-
* 
|
|
1881
1881
|
*
|
|
1882
1882
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -1947,7 +1947,7 @@ export function EditableValueView(
|
|
|
1947
1947
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
1948
1948
|
* action:
|
|
1949
1949
|
*
|
|
1950
|
-
* 
|
|
1952
1952
|
*
|
|
1953
1953
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -668,7 +668,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
668
668
|
*
|
|
669
669
|
* See the <TableInHtmlTable /> (React) demo for this component in action:
|
|
670
670
|
*
|
|
671
|
-
* 
|
|
673
673
|
*
|
|
674
674
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -822,7 +822,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
822
822
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
823
823
|
* action:
|
|
824
824
|
*
|
|
825
|
-
* 
|
|
827
827
|
*
|
|
828
828
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1003,7 +1003,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1003
1003
|
*
|
|
1004
1004
|
* See the <ValuesInHtmlTable /> (React) demo for this component in action:
|
|
1005
1005
|
*
|
|
1006
|
-
* 
|
|
1008
1008
|
*
|
|
1009
1009
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1142,7 +1142,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1142
1142
|
*
|
|
1143
1143
|
* See the <SliceInHtmlTable /> (React) demo for this component in action:
|
|
1144
1144
|
*
|
|
1145
|
-
* 
|
|
1147
1147
|
*
|
|
1148
1148
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1308,7 +1308,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1308
1308
|
* See the <RelationshipInHtmlTable /> (React) demo for this component in
|
|
1309
1309
|
* action:
|
|
1310
1310
|
*
|
|
1311
|
-
* 
|
|
1313
1313
|
*
|
|
1314
1314
|
* The component's props identify which Relationship to render based on
|
|
@@ -1494,7 +1494,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1494
1494
|
* See the <ResultTableInHtmlTable /> (React) demo for this component in
|
|
1495
1495
|
* action:
|
|
1496
1496
|
*
|
|
1497
|
-
* 
|
|
1499
1499
|
*
|
|
1500
1500
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1655,7 +1655,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1655
1655
|
* See the <ResultSortedTableInHtmlTable /> (React) demo for this component in
|
|
1656
1656
|
* action:
|
|
1657
1657
|
*
|
|
1658
|
-
* 
|
|
1660
1660
|
*
|
|
1661
1661
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1837,7 +1837,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1837
1837
|
*
|
|
1838
1838
|
* See the <EditableCellView /> (React) demo for this component in action:
|
|
1839
1839
|
*
|
|
1840
|
-
* 
|
|
1842
1842
|
*
|
|
1843
1843
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1922,7 +1922,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1922
1922
|
*
|
|
1923
1923
|
* See the <EditableValueView /> (React) demo for this component in action:
|
|
1924
1924
|
*
|
|
1925
|
-
* 
|
|
1927
1927
|
*
|
|
1928
1928
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -1993,7 +1993,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1993
1993
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
1994
1994
|
* action:
|
|
1995
1995
|
*
|
|
1996
|
-
* 
|
|
1998
1998
|
*
|
|
1999
1999
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -483,7 +483,7 @@ export type YAxisProps = {
|
|
|
483
483
|
*
|
|
484
484
|
* See the Composing Charts (React) demo for this component in action:
|
|
485
485
|
*
|
|
486
|
-
* 
|
|
488
488
|
*
|
|
489
489
|
* The series children declare their own xCellId and yCellId bindings. The
|
|
@@ -542,7 +542,7 @@ export function CartesianChart(
|
|
|
542
542
|
*
|
|
543
543
|
* See the Axis Overrides (React) demo for this component in action:
|
|
544
544
|
*
|
|
545
|
-
* 
|
|
547
547
|
* @category Store components
|
|
548
548
|
* @since v8.5.0
|
|
@@ -558,7 +558,7 @@ export function XAxis(props: XAxisProps): ComponentReturnType;
|
|
|
558
558
|
*
|
|
559
559
|
* See the Axis Overrides (React) demo for this component in action:
|
|
560
560
|
*
|
|
561
|
-
* 
|
|
563
563
|
* @category Store components
|
|
564
564
|
* @since v8.5.0
|
|
@@ -574,7 +574,7 @@ export function YAxis(props: YAxisProps): ComponentReturnType;
|
|
|
574
574
|
*
|
|
575
575
|
* See the Composing Charts (React) demo for this component in action:
|
|
576
576
|
*
|
|
577
|
-
* 
|
|
579
579
|
* @category Store components
|
|
580
580
|
* @since v8.5.0
|
|
@@ -590,7 +590,7 @@ export function LineSeries(props: SeriesProps): ComponentReturnType;
|
|
|
590
590
|
*
|
|
591
591
|
* See the Composing Charts (React) demo for this component in action:
|
|
592
592
|
*
|
|
593
|
-
* 
|
|
595
595
|
* @category Store components
|
|
596
596
|
* @since v8.5.0
|
|
@@ -607,7 +607,7 @@ export function BarSeries(props: SeriesProps): ComponentReturnType;
|
|
|
607
607
|
*
|
|
608
608
|
* See the <LineChart /> (React) demo for this component in action:
|
|
609
609
|
*
|
|
610
|
-
* 
|
|
612
612
|
* @category Store components
|
|
613
613
|
* @since v8.5.0
|
|
@@ -660,7 +660,7 @@ export function LineChart(
|
|
|
660
660
|
*
|
|
661
661
|
* See the Sorting And Types (React) demo for this component in action:
|
|
662
662
|
*
|
|
663
|
-
* 
|
|
665
665
|
* @category Store components
|
|
666
666
|
* @since v8.5.0
|
|
@@ -544,7 +544,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
544
544
|
*
|
|
545
545
|
* See the Composing Charts (React) demo for this component in action:
|
|
546
546
|
*
|
|
547
|
-
* 
|
|
549
549
|
*
|
|
550
550
|
* The series children declare their own xCellId and yCellId bindings. The
|
|
@@ -609,7 +609,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
609
609
|
*
|
|
610
610
|
* See the Axis Overrides (React) demo for this component in action:
|
|
611
611
|
*
|
|
612
|
-
* 
|
|
614
614
|
* @category Store components
|
|
615
615
|
* @since v8.5.0
|
|
@@ -625,7 +625,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
625
625
|
*
|
|
626
626
|
* See the Axis Overrides (React) demo for this component in action:
|
|
627
627
|
*
|
|
628
|
-
* 
|
|
630
630
|
* @category Store components
|
|
631
631
|
* @since v8.5.0
|
|
@@ -641,7 +641,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
641
641
|
*
|
|
642
642
|
* See the Composing Charts (React) demo for this component in action:
|
|
643
643
|
*
|
|
644
|
-
* 
|
|
646
646
|
* @category Store components
|
|
647
647
|
* @since v8.5.0
|
|
@@ -657,7 +657,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
657
657
|
*
|
|
658
658
|
* See the Composing Charts (React) demo for this component in action:
|
|
659
659
|
*
|
|
660
|
-
* 
|
|
662
662
|
* @category Store components
|
|
663
663
|
* @since v8.5.0
|
|
@@ -684,7 +684,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
684
684
|
*
|
|
685
685
|
* See the <LineChart /> (React) demo for this component in action:
|
|
686
686
|
*
|
|
687
|
-
* 
|
|
689
689
|
* @category Store components
|
|
690
690
|
* @since v8.5.0
|
|
@@ -750,7 +750,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
750
750
|
*
|
|
751
751
|
* See the Sorting And Types (React) demo for this component in action:
|
|
752
752
|
*
|
|
753
|
-
* 
|
|
755
755
|
* @category Store components
|
|
756
756
|
* @since v8.5.0
|
|
@@ -46,7 +46,7 @@ export type InspectorProps = {
|
|
|
46
46
|
*
|
|
47
47
|
* See the <Inspector /> (React) demo for this component in action:
|
|
48
48
|
*
|
|
49
|
-
* 
|
|
51
51
|
*
|
|
52
52
|
* The component displays a nub in the corner of the screen which you may then
|