tinybase 1.3.5 → 2.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/checkpoints.js +1 -1
- package/lib/checkpoints.js.gz +0 -0
- package/lib/debug/checkpoints.js +67 -54
- package/lib/debug/indexes.js +104 -67
- package/lib/debug/metrics.js +185 -129
- package/lib/debug/persisters.js +2 -1
- package/lib/debug/queries.d.ts +3066 -0
- package/lib/debug/queries.js +883 -0
- package/lib/debug/relationships.d.ts +6 -5
- package/lib/debug/relationships.js +102 -66
- package/lib/debug/store.d.ts +128 -65
- package/lib/debug/store.js +215 -119
- package/lib/debug/tinybase.d.ts +1 -0
- package/lib/debug/tinybase.js +895 -175
- package/lib/debug/ui-react.d.ts +49 -2
- package/lib/debug/ui-react.js +85 -74
- 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 +3066 -0
- package/lib/queries.js +1 -0
- package/lib/queries.js.gz +0 -0
- package/lib/relationships.d.ts +6 -5
- package/lib/relationships.js +1 -1
- package/lib/relationships.js.gz +0 -0
- package/lib/store.d.ts +128 -65
- package/lib/store.js +1 -1
- package/lib/store.js.gz +0 -0
- package/lib/tinybase.d.ts +1 -0
- package/lib/tinybase.js +1 -1
- package/lib/tinybase.js.gz +0 -0
- package/lib/ui-react.d.ts +49 -2
- 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 -0
- 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 +1 -1
- package/readme.md +2 -2
package/lib/debug/store.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export type Cell = string | number | boolean;
|
|
|
94
94
|
*
|
|
95
95
|
* This is used when describing a Cell that is present _or_ that is not present
|
|
96
96
|
* - such as when it has been deleted, or when describing a previous state where
|
|
97
|
-
*
|
|
97
|
+
* the Cell value has since been added.
|
|
98
98
|
*
|
|
99
99
|
* @category Store
|
|
100
100
|
*/
|
|
@@ -327,7 +327,6 @@ export type RowListener = (
|
|
|
327
327
|
* @param store A reference to the Store that changed.
|
|
328
328
|
* @param tableId The Id of the Table that changed.
|
|
329
329
|
* @param rowId The Id of the Row that changed.
|
|
330
|
-
* changes.
|
|
331
330
|
* @category Listener
|
|
332
331
|
*/
|
|
333
332
|
export type CellIdsListener = (store: Store, tableId: Id, rowId: Id) => void;
|
|
@@ -421,9 +420,9 @@ export type GetCellChange = (tableId: Id, rowId: Id, cellId: Id) => CellChange;
|
|
|
421
420
|
* The CellChange type describes a Cell's changes during a transaction.
|
|
422
421
|
*
|
|
423
422
|
* This is returned by the GetCellChange function that is provided to every
|
|
424
|
-
* listener when called. This array contains the previous value of a Cell
|
|
425
|
-
*
|
|
426
|
-
*
|
|
423
|
+
* listener when called. This array contains the previous value of a Cell before
|
|
424
|
+
* the current transaction, the new value after it, and a convenience flag that
|
|
425
|
+
* indicates that the value has changed.
|
|
427
426
|
*
|
|
428
427
|
* @category Listener
|
|
429
428
|
*/
|
|
@@ -540,9 +539,9 @@ export type ChangedCells = {
|
|
|
540
539
|
* the transaction method. See that method for specific examples.
|
|
541
540
|
*
|
|
542
541
|
* This type is a nested structure of Table, Row, and Cell objects, much like
|
|
543
|
-
* the Tables object, but one for which Cell values are listed in array
|
|
544
|
-
*
|
|
545
|
-
*
|
|
542
|
+
* the Tables object, but one for which Cell values are listed in array (much
|
|
543
|
+
* like the InvalidCellListener type) so that multiple failed attempts to change
|
|
544
|
+
* a Cell during the transaction are described.
|
|
546
545
|
*
|
|
547
546
|
* @category Transaction
|
|
548
547
|
* @since v1.2.0
|
|
@@ -794,9 +793,9 @@ export interface Store {
|
|
|
794
793
|
* The getTableIds method returns the Ids of every Table in the Store.
|
|
795
794
|
*
|
|
796
795
|
* Note that this returns a copy of, rather than a reference, to the list of
|
|
797
|
-
* Ids, so changes made to the list are not made to the Store itself.
|
|
798
|
-
* the order
|
|
799
|
-
*
|
|
796
|
+
* Ids, so changes made to the list are not made to the Store itself. Since
|
|
797
|
+
* v2.0.0, the order is significant: this method will return the Ids in the
|
|
798
|
+
* order in which each Table was added.
|
|
800
799
|
*
|
|
801
800
|
* @returns An array of the Ids of every Table in the Store.
|
|
802
801
|
* @example
|
|
@@ -861,9 +860,9 @@ export interface Store {
|
|
|
861
860
|
* The getRowIds method returns the Ids of every Row in a given Table.
|
|
862
861
|
*
|
|
863
862
|
* Note that this returns a copy of, rather than a reference, to the list of
|
|
864
|
-
* Ids, so changes made to the list are not made to the Store itself.
|
|
865
|
-
* the order
|
|
866
|
-
*
|
|
863
|
+
* Ids, so changes made to the list are not made to the Store itself. Since
|
|
864
|
+
* v2.0.0, the order is significant: this method will return the Ids in the
|
|
865
|
+
* order in which each Row was added.
|
|
867
866
|
*
|
|
868
867
|
* @param tableId The Id of the Table in the Store.
|
|
869
868
|
* @returns An array of the Ids of every Row in the Table.
|
|
@@ -935,9 +934,9 @@ export interface Store {
|
|
|
935
934
|
* given Table.
|
|
936
935
|
*
|
|
937
936
|
* Note that this returns a copy of, rather than a reference, to the list of
|
|
938
|
-
* Ids, so changes made to the list are not made to the Store itself.
|
|
939
|
-
* the order
|
|
940
|
-
*
|
|
937
|
+
* Ids, so changes made to the list are not made to the Store itself. Since
|
|
938
|
+
* v2.0.0, the order is significant: this method will return the Ids in the
|
|
939
|
+
* order in which each Cell was added.
|
|
941
940
|
*
|
|
942
941
|
* @param tableId The Id of the Table in the Store.
|
|
943
942
|
* @param rowId The Id of the Row in the Table.
|
|
@@ -968,17 +967,13 @@ export interface Store {
|
|
|
968
967
|
getCellIds(tableId: Id, rowId: Id): Ids;
|
|
969
968
|
|
|
970
969
|
/**
|
|
971
|
-
* The getCell method returns
|
|
972
|
-
*
|
|
973
|
-
*
|
|
974
|
-
* Note that this returns a copy of, rather than a reference to the underlying
|
|
975
|
-
* data, so changes made to the returned object are not made to the Store
|
|
976
|
-
* itself.
|
|
970
|
+
* The getCell method returns the value of a single Cell in a given Row, in a
|
|
971
|
+
* given Table.
|
|
977
972
|
*
|
|
978
973
|
* @param tableId The Id of the Table in the Store.
|
|
979
974
|
* @param rowId The Id of the Row in the Table.
|
|
980
975
|
* @param cellId The Id of the Cell in the Row.
|
|
981
|
-
* @returns The value of the Cell
|
|
976
|
+
* @returns The value of the Cell, or `undefined`.
|
|
982
977
|
* @example
|
|
983
978
|
* This example retrieves a single Cell.
|
|
984
979
|
*
|
|
@@ -2100,12 +2095,19 @@ export interface Store {
|
|
|
2100
2095
|
* The addTableIdsListener method registers a listener function with the Store
|
|
2101
2096
|
* that will be called whenever the Table Ids in the Store change.
|
|
2102
2097
|
*
|
|
2103
|
-
* Such a listener is only called when a Table is added or removed. To listen
|
|
2104
|
-
* to all changes in the Store, use the addTablesListener method.
|
|
2105
|
-
*
|
|
2106
2098
|
* The provided listener is a TableIdsListener function, and will be called
|
|
2107
2099
|
* with a reference to the Store.
|
|
2108
2100
|
*
|
|
2101
|
+
* By default, such a listener is only called when a Table is added or
|
|
2102
|
+
* removed. To listen to all changes in the Store, use the addTablesListener
|
|
2103
|
+
* method.
|
|
2104
|
+
*
|
|
2105
|
+
* Since v2.0.0, you can use the optional `trackReorder` parameter to
|
|
2106
|
+
* additionally track when the set of Ids has not changed, but the order has -
|
|
2107
|
+
* for example when a Table from the middle of the Store is removed and then
|
|
2108
|
+
* added back within the same transaction. This behavior is disabled by
|
|
2109
|
+
* default due to the potential performance cost of detecting such changes.
|
|
2110
|
+
*
|
|
2109
2111
|
* Use the optional mutator parameter to indicate that there is code in the
|
|
2110
2112
|
* listener that will mutate Store data. If set to `false` (or omitted), such
|
|
2111
2113
|
* mutations will be silently ignored. All relevant mutator listeners (with
|
|
@@ -2116,6 +2118,9 @@ export interface Store {
|
|
|
2116
2118
|
*
|
|
2117
2119
|
* @param listener The function that will be called whenever the Table Ids in
|
|
2118
2120
|
* the Store change.
|
|
2121
|
+
* @param trackReorder An optional boolean that indicates that the listener
|
|
2122
|
+
* should be called if the set of Ids remains the same but their order
|
|
2123
|
+
* changes.
|
|
2119
2124
|
* @param mutator An optional boolean that indicates that the listener mutates
|
|
2120
2125
|
* Store data.
|
|
2121
2126
|
* @returns A unique Id for the listener that can later be used to call it
|
|
@@ -2145,7 +2150,8 @@ export interface Store {
|
|
|
2145
2150
|
* const store = createStore().setTables({pets: {fido: {species: 'dog'}}});
|
|
2146
2151
|
* const listenerId = store.addTableIdsListener(
|
|
2147
2152
|
* (store) => store.setCell('meta', 'update', 'store', true),
|
|
2148
|
-
*
|
|
2153
|
+
* false, // track reorder
|
|
2154
|
+
* true, // mutator
|
|
2149
2155
|
* );
|
|
2150
2156
|
*
|
|
2151
2157
|
* store.setTable('species', {dog: {price: 5}});
|
|
@@ -2156,21 +2162,25 @@ export interface Store {
|
|
|
2156
2162
|
* ```
|
|
2157
2163
|
* @category Listener
|
|
2158
2164
|
*/
|
|
2159
|
-
addTableIdsListener(
|
|
2165
|
+
addTableIdsListener(
|
|
2166
|
+
listener: TableIdsListener,
|
|
2167
|
+
trackReorder?: boolean,
|
|
2168
|
+
mutator?: boolean,
|
|
2169
|
+
): Id;
|
|
2160
2170
|
|
|
2161
2171
|
/**
|
|
2162
2172
|
* The addTableListener method registers a listener function with the Store
|
|
2163
2173
|
* that will be called whenever data in a Table changes.
|
|
2164
2174
|
*
|
|
2165
|
-
* You can either listen to a single Table (by specifying its Id as the
|
|
2166
|
-
* method's first parameter) or changes to any Table (by providing a `null`
|
|
2167
|
-
* wildcard).
|
|
2168
|
-
*
|
|
2169
2175
|
* The provided listener is a TableListener function, and will be called with
|
|
2170
2176
|
* a reference to the Store, the Id of the Table that changed, and a
|
|
2171
2177
|
* GetCellChange function in case you need to inspect any changes that
|
|
2172
2178
|
* occurred.
|
|
2173
2179
|
*
|
|
2180
|
+
* You can either listen to a single Table (by specifying its Id as the
|
|
2181
|
+
* method's first parameter) or changes to any Table (by providing a `null`
|
|
2182
|
+
* wildcard).
|
|
2183
|
+
*
|
|
2174
2184
|
* Use the optional mutator parameter to indicate that there is code in the
|
|
2175
2185
|
* listener that will mutate Store data. If set to `false` (or omitted), such
|
|
2176
2186
|
* mutations will be silently ignored. All relevant mutator listeners (with
|
|
@@ -2259,14 +2269,21 @@ export interface Store {
|
|
|
2259
2269
|
* The addRowIdsListener method registers a listener function with the Store
|
|
2260
2270
|
* that will be called whenever the Row Ids in a Table change.
|
|
2261
2271
|
*
|
|
2262
|
-
*
|
|
2263
|
-
*
|
|
2272
|
+
* The provided listener is a RowIdsListener function, and will be called with
|
|
2273
|
+
* a reference to the Store and the Id of the Table that changed.
|
|
2274
|
+
*
|
|
2275
|
+
* By default, such a listener is only called when a Row is added or removed.
|
|
2276
|
+
* To listen to all changes in the Table, use the addTableListener method.
|
|
2264
2277
|
*
|
|
2265
2278
|
* You can either listen to a single Table (by specifying its Id as the
|
|
2266
|
-
* method's first parameter) or changes to any Table (by providing `null`
|
|
2279
|
+
* method's first parameter) or changes to any Table (by providing a `null`
|
|
2280
|
+
* wildcard).
|
|
2267
2281
|
*
|
|
2268
|
-
*
|
|
2269
|
-
*
|
|
2282
|
+
* Since v2.0.0, you can use the optional `trackReorder` parameter to
|
|
2283
|
+
* additionally track when the set of Ids has not changed, but the order has -
|
|
2284
|
+
* for example when a Row from the middle of the Table is removed and then
|
|
2285
|
+
* added back within the same transaction. This behavior is disabled by
|
|
2286
|
+
* default due to the potential performance cost of detecting such changes.
|
|
2270
2287
|
*
|
|
2271
2288
|
* Use the optional mutator parameter to indicate that there is code in the
|
|
2272
2289
|
* listener that will mutate Store data. If set to `false` (or omitted), such
|
|
@@ -2279,6 +2296,9 @@ export interface Store {
|
|
|
2279
2296
|
* @param tableId The Id of the Table to listen to, or `null` as a wildcard.
|
|
2280
2297
|
* @param listener The function that will be called whenever the Row Ids in
|
|
2281
2298
|
* the Table change.
|
|
2299
|
+
* @param trackReorder An optional boolean that indicates that the listener
|
|
2300
|
+
* should be called if the set of Ids remains the same but their order
|
|
2301
|
+
* changes.
|
|
2282
2302
|
* @param mutator An optional boolean that indicates that the listener mutates
|
|
2283
2303
|
* Store data.
|
|
2284
2304
|
* @returns A unique Id for the listener that can later be used to call it
|
|
@@ -2301,6 +2321,36 @@ export interface Store {
|
|
|
2301
2321
|
* store.delListener(listenerId);
|
|
2302
2322
|
* ```
|
|
2303
2323
|
* @example
|
|
2324
|
+
* This example registers a listener that responds to a change of order in the
|
|
2325
|
+
* rows of a specific Table, even though the set of Ids themselves has not
|
|
2326
|
+
* changed.
|
|
2327
|
+
*
|
|
2328
|
+
* ```js
|
|
2329
|
+
* const store = createStore().setTables({
|
|
2330
|
+
* pets: {
|
|
2331
|
+
* fido: {species: 'dog'},
|
|
2332
|
+
* felix: {species: 'cat'},
|
|
2333
|
+
* },
|
|
2334
|
+
* });
|
|
2335
|
+
* const listenerId = store.addRowIdsListener(
|
|
2336
|
+
* 'pets',
|
|
2337
|
+
* (store) => {
|
|
2338
|
+
* console.log('Row Ids or order for pets table changed');
|
|
2339
|
+
* console.log(store.getRowIds('pets'));
|
|
2340
|
+
* },
|
|
2341
|
+
* true, // track reorder
|
|
2342
|
+
* );
|
|
2343
|
+
*
|
|
2344
|
+
* store.transaction(() => {
|
|
2345
|
+
* store.delRow('pets', 'fido');
|
|
2346
|
+
* store.setRow('pets', 'fido', {species: 'dog'});
|
|
2347
|
+
* });
|
|
2348
|
+
* // -> 'Row Ids or order for pets table changed'
|
|
2349
|
+
* // -> ['felix', 'fido']
|
|
2350
|
+
*
|
|
2351
|
+
* store.delListener(listenerId);
|
|
2352
|
+
* ```
|
|
2353
|
+
* @example
|
|
2304
2354
|
* This example registers a listener that responds to any change to the Row
|
|
2305
2355
|
* Ids of any Table.
|
|
2306
2356
|
*
|
|
@@ -2329,7 +2379,8 @@ export interface Store {
|
|
|
2329
2379
|
* const listenerId = store.addRowIdsListener(
|
|
2330
2380
|
* 'pets',
|
|
2331
2381
|
* (store, tableId) => store.setCell('meta', 'update', tableId, true),
|
|
2332
|
-
*
|
|
2382
|
+
* false, // track reorder
|
|
2383
|
+
* true, // mutator
|
|
2333
2384
|
* );
|
|
2334
2385
|
*
|
|
2335
2386
|
* store.setRow('pets', 'felix', {species: 'cat'});
|
|
@@ -2343,6 +2394,7 @@ export interface Store {
|
|
|
2343
2394
|
addRowIdsListener(
|
|
2344
2395
|
tableId: IdOrNull,
|
|
2345
2396
|
listener: RowIdsListener,
|
|
2397
|
+
trackReorder?: boolean,
|
|
2346
2398
|
mutator?: boolean,
|
|
2347
2399
|
): Id;
|
|
2348
2400
|
|
|
@@ -2350,6 +2402,11 @@ export interface Store {
|
|
|
2350
2402
|
* The addRowListener method registers a listener function with the Store that
|
|
2351
2403
|
* will be called whenever data in a Row changes.
|
|
2352
2404
|
*
|
|
2405
|
+
* The provided listener is a RowListener function, and will be called with a
|
|
2406
|
+
* reference to the Store, the Id of the Table that changed, the Id of the Row
|
|
2407
|
+
* that changed, and a GetCellChange function in case you need to inspect any
|
|
2408
|
+
* changes that occurred.
|
|
2409
|
+
*
|
|
2353
2410
|
* You can either listen to a single Row (by specifying the Table Id and Row
|
|
2354
2411
|
* Id as the method's first two parameters) or changes to any Row (by
|
|
2355
2412
|
* providing `null` wildcards).
|
|
@@ -2359,11 +2416,6 @@ export interface Store {
|
|
|
2359
2416
|
* Table, any Row in a specific Table, a specific Row in any Table, or any Row
|
|
2360
2417
|
* in any Table.
|
|
2361
2418
|
*
|
|
2362
|
-
* The provided listener is a RowListener function, and will be called with a
|
|
2363
|
-
* reference to the Store, the Id of the Table that changed, the Id of the Row
|
|
2364
|
-
* that changed, and a GetCellChange function in case you need to inspect any
|
|
2365
|
-
* changes that occurred.
|
|
2366
|
-
*
|
|
2367
2419
|
* Use the optional mutator parameter to indicate that there is code in the
|
|
2368
2420
|
* listener that will mutate Store data. If set to `false` (or omitted), such
|
|
2369
2421
|
* mutations will be silently ignored. All relevant mutator listeners (with
|
|
@@ -2460,21 +2512,27 @@ export interface Store {
|
|
|
2460
2512
|
* The addCellIdsListener method registers a listener function with the Store
|
|
2461
2513
|
* that will be called whenever the Cell Ids in a Row change.
|
|
2462
2514
|
*
|
|
2463
|
-
*
|
|
2464
|
-
* to
|
|
2515
|
+
* The provided listener is a CellIdsListener function, and will be called
|
|
2516
|
+
* with a reference to the Store, the Id of the Table, and the Id of the Row
|
|
2517
|
+
* that changed.
|
|
2518
|
+
*
|
|
2519
|
+
* By default, such a listener is only called when a Cell is added or removed.
|
|
2520
|
+
* To listen to all changes in the Row, use the addRowListener method.
|
|
2465
2521
|
*
|
|
2466
2522
|
* You can either listen to a single Row (by specifying the Table Id and Row
|
|
2467
2523
|
* Id as the method's first two parameters) or changes to any Row (by
|
|
2468
|
-
* providing `null`).
|
|
2524
|
+
* providing a `null` wildcard).
|
|
2469
2525
|
*
|
|
2470
2526
|
* Both, either, or neither of the `tableId` and `rowId` parameters can be
|
|
2471
2527
|
* wildcarded with `null`. You can listen to a specific Row in a specific
|
|
2472
2528
|
* Table, any Row in a specific Table, a specific Row in any Table, or any Row
|
|
2473
2529
|
* in any Table.
|
|
2474
2530
|
*
|
|
2475
|
-
*
|
|
2476
|
-
*
|
|
2477
|
-
*
|
|
2531
|
+
* Since v2.0.0, you can use the optional `trackReorder` parameter to
|
|
2532
|
+
* additionally track when the set of Ids has not changed, but the order has -
|
|
2533
|
+
* for example when a Cell from the middle of the Row is removed and then
|
|
2534
|
+
* added back within the same transaction. This behavior is disabled by
|
|
2535
|
+
* default due to the potential performance cost of detecting such changes.
|
|
2478
2536
|
*
|
|
2479
2537
|
* Use the optional mutator parameter to indicate that there is code in the
|
|
2480
2538
|
* listener that will mutate Store data. If set to `false` (or omitted), such
|
|
@@ -2488,6 +2546,9 @@ export interface Store {
|
|
|
2488
2546
|
* @param rowId The Id of the Row to listen to, or `null` as a wildcard.
|
|
2489
2547
|
* @param listener The function that will be called whenever the Cell Ids in
|
|
2490
2548
|
* the Row change.
|
|
2549
|
+
* @param trackReorder An optional boolean that indicates that the listener
|
|
2550
|
+
* should be called if the set of Ids remains the same but their order
|
|
2551
|
+
* changes.
|
|
2491
2552
|
* @param mutator An optional boolean that indicates that the listener mutates
|
|
2492
2553
|
* Store data.
|
|
2493
2554
|
* @returns A unique Id for the listener that can later be used to call it
|
|
@@ -2544,7 +2605,8 @@ export interface Store {
|
|
|
2544
2605
|
* 'fido',
|
|
2545
2606
|
* (store, tableId, rowId) =>
|
|
2546
2607
|
* store.setCell('meta', 'update', `${tableId}_${rowId}`, true),
|
|
2547
|
-
*
|
|
2608
|
+
* false, // track reorder
|
|
2609
|
+
* true, // mutator
|
|
2548
2610
|
* );
|
|
2549
2611
|
*
|
|
2550
2612
|
* store.setCell('pets', 'fido', 'color', 'brown');
|
|
@@ -2559,6 +2621,7 @@ export interface Store {
|
|
|
2559
2621
|
tableId: IdOrNull,
|
|
2560
2622
|
rowId: IdOrNull,
|
|
2561
2623
|
listener: CellIdsListener,
|
|
2624
|
+
trackReorder?: boolean,
|
|
2562
2625
|
mutator?: boolean,
|
|
2563
2626
|
): Id;
|
|
2564
2627
|
|
|
@@ -2566,6 +2629,12 @@ export interface Store {
|
|
|
2566
2629
|
* The addCellListener method registers a listener function with the Store
|
|
2567
2630
|
* that will be called whenever data in a Cell changes.
|
|
2568
2631
|
*
|
|
2632
|
+
* The provided listener is a CellListener function, and will be called with a
|
|
2633
|
+
* reference to the Store, the Id of the Table that changed, the Id of the Row
|
|
2634
|
+
* that changed, the Id of the Cell that changed, the new Cell value, the old
|
|
2635
|
+
* Cell value, and a GetCellChange function in case you need to inspect any
|
|
2636
|
+
* changes that occurred.
|
|
2637
|
+
*
|
|
2569
2638
|
* You can either listen to a single Cell (by specifying the Table Id, Row Id,
|
|
2570
2639
|
* and Cell Id as the method's first three parameters) or changes to any Cell
|
|
2571
2640
|
* (by providing `null` wildcards).
|
|
@@ -2575,12 +2644,6 @@ export interface Store {
|
|
|
2575
2644
|
* Row in a specific Table, any Cell in any Row in any Table, for example - or
|
|
2576
2645
|
* every other combination of wildcards.
|
|
2577
2646
|
*
|
|
2578
|
-
* The provided listener is a CellListener function, and will be called with a
|
|
2579
|
-
* reference to the Store, the Id of the Table that changed, the Id of the Row
|
|
2580
|
-
* that changed, the Id of the Cell that changed, the new Cell value, the old
|
|
2581
|
-
* Cell value, and a GetCellChange function in case you need to inspect any
|
|
2582
|
-
* changes that occurred.
|
|
2583
|
-
*
|
|
2584
2647
|
* Use the optional mutator parameter to indicate that there is code in the
|
|
2585
2648
|
* listener that will mutate Store data. If set to `false` (or omitted), such
|
|
2586
2649
|
* mutations will be silently ignored. All relevant mutator listeners (with
|
|
@@ -2687,6 +2750,14 @@ export interface Store {
|
|
|
2687
2750
|
* Store that will be called whenever invalid data was attempted to be written
|
|
2688
2751
|
* to a Cell.
|
|
2689
2752
|
*
|
|
2753
|
+
* The provided listener is an InvalidCellListener function, and will be
|
|
2754
|
+
* called with a reference to the Store, the Id of the Table, the Id of the
|
|
2755
|
+
* Row, and the Id of Cell that were being attempted to be changed. It is also
|
|
2756
|
+
* given the invalid value of the Cell, which could have been of absolutely
|
|
2757
|
+
* any type. Since there could have been multiple failed attempts to set the
|
|
2758
|
+
* Cell within a single transaction, this is an array containing each attempt,
|
|
2759
|
+
* chronologically.
|
|
2760
|
+
*
|
|
2690
2761
|
* You can either listen to a single Cell (by specifying the Table Id, Row Id,
|
|
2691
2762
|
* and Cell Id as the method's first three parameters) or invalid attempts to
|
|
2692
2763
|
* change any Cell (by providing `null` wildcards).
|
|
@@ -2696,14 +2767,6 @@ export interface Store {
|
|
|
2696
2767
|
* Row in a specific Table, any Cell in any Row in any Table, for example - or
|
|
2697
2768
|
* every other combination of wildcards.
|
|
2698
2769
|
*
|
|
2699
|
-
* The provided listener is an InvalidCellListener function, and will be
|
|
2700
|
-
* called with a reference to the Store, the Id of the Table, the Id of the
|
|
2701
|
-
* Row, and the Id of Cell that were being attempted to be changed. It is also
|
|
2702
|
-
* given the invalid value of the Cell, which could have been of absolutely
|
|
2703
|
-
* any type. Since there could have been multiple failed attempts to set the
|
|
2704
|
-
* Cell within a single transaction, this is an array containing each attempt,
|
|
2705
|
-
* chronologically.
|
|
2706
|
-
*
|
|
2707
2770
|
* Use the optional mutator parameter to indicate that there is code in the
|
|
2708
2771
|
* listener that will mutate Store data. If set to `false` (or omitted), such
|
|
2709
2772
|
* mutations will be silently ignored. All relevant mutator listeners (with
|