tinybase 9.0.0-beta.0 → 9.0.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/@types/mergeable-store/index.d.ts +4 -4
- package/@types/mergeable-store/with-schemas/index.d.ts +41 -17
- package/@types/persisters/index.d.ts +2 -1
- package/@types/persisters/with-schemas/index.d.ts +16 -10
- package/@types/queries/index.d.ts +4 -0
- package/@types/queries/with-schemas/index.d.ts +4 -0
- 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-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-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 +46 -6
- package/mergeable-store/index.js +46 -6
- package/mergeable-store/with-schemas/index.js +46 -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/persisters/index.js +1 -1
- package/min/persisters/index.js.gz +0 -0
- package/min/persisters/persister-automerge/index.js +1 -1
- package/min/persisters/persister-automerge/index.js.gz +0 -0
- package/min/persisters/persister-automerge/with-schemas/index.js +1 -1
- package/min/persisters/persister-automerge/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-browser/index.js +1 -1
- package/min/persisters/persister-browser/index.js.gz +0 -0
- package/min/persisters/persister-browser/with-schemas/index.js +1 -1
- package/min/persisters/persister-browser/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-cr-sqlite-wasm/index.js +1 -1
- package/min/persisters/persister-cr-sqlite-wasm/index.js.gz +0 -0
- package/min/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +1 -1
- package/min/persisters/persister-cr-sqlite-wasm/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-sql-storage/index.js +1 -1
- package/min/persisters/persister-durable-object-sql-storage/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js +1 -1
- package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-storage/index.js +1 -1
- package/min/persisters/persister-durable-object-storage/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-storage/with-schemas/index.js +1 -1
- package/min/persisters/persister-durable-object-storage/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-electric-sql/index.js +1 -1
- package/min/persisters/persister-electric-sql/index.js.gz +0 -0
- package/min/persisters/persister-electric-sql/with-schemas/index.js +1 -1
- package/min/persisters/persister-electric-sql/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-expo-sqlite/index.js +1 -1
- package/min/persisters/persister-expo-sqlite/index.js.gz +0 -0
- package/min/persisters/persister-expo-sqlite/with-schemas/index.js +1 -1
- package/min/persisters/persister-expo-sqlite/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-file/index.js +1 -1
- package/min/persisters/persister-file/index.js.gz +0 -0
- package/min/persisters/persister-file/with-schemas/index.js +1 -1
- package/min/persisters/persister-file/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-indexed-db/index.js +1 -1
- package/min/persisters/persister-indexed-db/index.js.gz +0 -0
- package/min/persisters/persister-indexed-db/with-schemas/index.js +1 -1
- package/min/persisters/persister-indexed-db/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-libsql/index.js +1 -1
- package/min/persisters/persister-libsql/index.js.gz +0 -0
- package/min/persisters/persister-libsql/with-schemas/index.js +1 -1
- package/min/persisters/persister-libsql/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-partykit-client/index.js +1 -1
- package/min/persisters/persister-partykit-client/index.js.gz +0 -0
- package/min/persisters/persister-partykit-client/with-schemas/index.js +1 -1
- package/min/persisters/persister-partykit-client/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-pglite/index.js +1 -1
- package/min/persisters/persister-pglite/index.js.gz +0 -0
- package/min/persisters/persister-pglite/with-schemas/index.js +1 -1
- package/min/persisters/persister-pglite/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-postgres/index.js +1 -1
- package/min/persisters/persister-postgres/index.js.gz +0 -0
- package/min/persisters/persister-postgres/with-schemas/index.js +1 -1
- package/min/persisters/persister-postgres/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-powersync/index.js +1 -1
- package/min/persisters/persister-powersync/index.js.gz +0 -0
- package/min/persisters/persister-powersync/with-schemas/index.js +1 -1
- package/min/persisters/persister-powersync/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-react-native-mmkv/index.js +1 -1
- package/min/persisters/persister-react-native-mmkv/index.js.gz +0 -0
- package/min/persisters/persister-react-native-mmkv/with-schemas/index.js +1 -1
- package/min/persisters/persister-react-native-mmkv/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-react-native-sqlite/index.js +1 -1
- package/min/persisters/persister-react-native-sqlite/index.js.gz +0 -0
- package/min/persisters/persister-react-native-sqlite/with-schemas/index.js +1 -1
- package/min/persisters/persister-react-native-sqlite/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-remote/index.js +1 -1
- package/min/persisters/persister-remote/index.js.gz +0 -0
- package/min/persisters/persister-remote/with-schemas/index.js +1 -1
- package/min/persisters/persister-remote/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-bun/index.js +1 -1
- package/min/persisters/persister-sqlite-bun/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-bun/with-schemas/index.js +1 -1
- package/min/persisters/persister-sqlite-bun/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-wasm/index.js +1 -1
- package/min/persisters/persister-sqlite-wasm/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-wasm/with-schemas/index.js +1 -1
- package/min/persisters/persister-sqlite-wasm/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-sqlite3/index.js +1 -1
- package/min/persisters/persister-sqlite3/index.js.gz +0 -0
- package/min/persisters/persister-sqlite3/with-schemas/index.js +1 -1
- package/min/persisters/persister-sqlite3/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-yjs/index.js +1 -1
- package/min/persisters/persister-yjs/index.js.gz +0 -0
- package/min/persisters/persister-yjs/with-schemas/index.js +1 -1
- package/min/persisters/persister-yjs/with-schemas/index.js.gz +0 -0
- package/min/persisters/with-schemas/index.js +1 -1
- package/min/persisters/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/synchronizers/index.js +1 -1
- package/min/synchronizers/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -1
- package/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-local/index.js +1 -1
- package/min/synchronizers/synchronizer-local/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/with-schemas/index.js +1 -1
- package/min/synchronizers/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-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-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 +53 -14
- package/omni/with-schemas/index.js +53 -14
- package/package.json +7 -7
- package/persisters/index.js +4 -3
- package/persisters/persister-automerge/index.js +4 -3
- package/persisters/persister-automerge/with-schemas/index.js +4 -3
- package/persisters/persister-browser/index.js +4 -3
- package/persisters/persister-browser/with-schemas/index.js +4 -3
- package/persisters/persister-cr-sqlite-wasm/index.js +4 -3
- package/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +4 -3
- package/persisters/persister-durable-object-sql-storage/index.js +4 -3
- package/persisters/persister-durable-object-sql-storage/with-schemas/index.js +4 -3
- package/persisters/persister-durable-object-storage/index.js +4 -3
- package/persisters/persister-durable-object-storage/with-schemas/index.js +4 -3
- package/persisters/persister-electric-sql/index.js +4 -3
- package/persisters/persister-electric-sql/with-schemas/index.js +4 -3
- package/persisters/persister-expo-sqlite/index.js +4 -3
- package/persisters/persister-expo-sqlite/with-schemas/index.js +4 -3
- package/persisters/persister-file/index.js +4 -3
- package/persisters/persister-file/with-schemas/index.js +4 -3
- package/persisters/persister-indexed-db/index.js +4 -3
- package/persisters/persister-indexed-db/with-schemas/index.js +4 -3
- package/persisters/persister-libsql/index.js +4 -3
- package/persisters/persister-libsql/with-schemas/index.js +4 -3
- package/persisters/persister-partykit-client/index.js +4 -3
- package/persisters/persister-partykit-client/with-schemas/index.js +4 -3
- package/persisters/persister-pglite/index.js +4 -3
- package/persisters/persister-pglite/with-schemas/index.js +4 -3
- package/persisters/persister-postgres/index.js +4 -3
- package/persisters/persister-postgres/with-schemas/index.js +4 -3
- package/persisters/persister-powersync/index.js +4 -3
- package/persisters/persister-powersync/with-schemas/index.js +4 -3
- package/persisters/persister-react-native-mmkv/index.js +4 -3
- package/persisters/persister-react-native-mmkv/with-schemas/index.js +4 -3
- package/persisters/persister-react-native-sqlite/index.js +4 -3
- package/persisters/persister-react-native-sqlite/with-schemas/index.js +4 -3
- package/persisters/persister-remote/index.js +4 -3
- package/persisters/persister-remote/with-schemas/index.js +4 -3
- package/persisters/persister-sqlite-bun/index.js +4 -3
- package/persisters/persister-sqlite-bun/with-schemas/index.js +4 -3
- package/persisters/persister-sqlite-wasm/index.js +4 -3
- package/persisters/persister-sqlite-wasm/with-schemas/index.js +4 -3
- package/persisters/persister-sqlite3/index.js +4 -3
- package/persisters/persister-sqlite3/with-schemas/index.js +4 -3
- package/persisters/persister-yjs/index.js +4 -3
- package/persisters/persister-yjs/with-schemas/index.js +4 -3
- package/persisters/with-schemas/index.js +4 -3
- package/readme.md +3 -3
- package/releases.md +17 -1
- package/store/index.js +33 -2
- package/store/with-schemas/index.js +33 -2
- package/synchronizers/index.js +4 -3
- package/synchronizers/synchronizer-broadcast-channel/index.js +4 -3
- package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +4 -3
- package/synchronizers/synchronizer-local/index.js +4 -3
- package/synchronizers/synchronizer-local/with-schemas/index.js +4 -3
- package/synchronizers/synchronizer-ws-client/index.js +4 -3
- package/synchronizers/synchronizer-ws-client/with-schemas/index.js +4 -3
- package/synchronizers/synchronizer-ws-server/index.js +7 -8
- package/synchronizers/synchronizer-ws-server/with-schemas/index.js +7 -8
- package/synchronizers/synchronizer-ws-server-durable-object/index.js +3 -3
- package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +3 -3
- package/synchronizers/with-schemas/index.js +4 -3
- package/ui-react-inspector/index.js +36 -5
- package/ui-react-inspector/with-schemas/index.js +36 -5
- package/ui-solid-inspector/index.js +36 -5
- package/ui-solid-inspector/with-schemas/index.js +36 -5
- package/ui-svelte-inspector/index.js +36 -5
- package/ui-svelte-inspector/with-schemas/index.js +36 -5
- package/with-schemas/index.js +46 -6
|
@@ -1097,19 +1097,19 @@ export interface MergeableStore extends Store {
|
|
|
1097
1097
|
* {
|
|
1098
1098
|
* fido: [
|
|
1099
1099
|
* {
|
|
1100
|
-
* sold: [false, '
|
|
1100
|
+
* sold: [false, '', 3177411910],
|
|
1101
1101
|
* species: ['dog', 'Nn1JUF----1FnHIC', 2817056260],
|
|
1102
1102
|
* },
|
|
1103
1103
|
* '',
|
|
1104
|
-
*
|
|
1104
|
+
* 3078067457,
|
|
1105
1105
|
* ],
|
|
1106
1106
|
* },
|
|
1107
1107
|
* '',
|
|
1108
|
-
*
|
|
1108
|
+
* 1137907280,
|
|
1109
1109
|
* ],
|
|
1110
1110
|
* },
|
|
1111
1111
|
* '',
|
|
1112
|
-
*
|
|
1112
|
+
* 401719767,
|
|
1113
1113
|
* ],
|
|
1114
1114
|
* [{}, '', 0],
|
|
1115
1115
|
* ];
|
|
@@ -91,12 +91,14 @@ export type ContentHashes = [tablesHash: Hash, valuesHash: Hash];
|
|
|
91
91
|
export type TablesStamp<
|
|
92
92
|
Schema extends OptionalTablesSchema,
|
|
93
93
|
Hashed extends boolean = false,
|
|
94
|
+
WhenSet extends boolean = false,
|
|
94
95
|
> = Stamp<
|
|
95
96
|
{
|
|
96
97
|
[TableId in TableIdFromSchema<Schema>]?: TableStamp<
|
|
97
98
|
Schema,
|
|
98
99
|
TableId,
|
|
99
|
-
Hashed
|
|
100
|
+
Hashed,
|
|
101
|
+
WhenSet
|
|
100
102
|
>;
|
|
101
103
|
},
|
|
102
104
|
Hashed
|
|
@@ -146,7 +148,8 @@ export type TableStamp<
|
|
|
146
148
|
Schema extends OptionalTablesSchema,
|
|
147
149
|
TableId extends TableIdFromSchema<Schema>,
|
|
148
150
|
Hashed extends boolean = false,
|
|
149
|
-
|
|
151
|
+
WhenSet extends boolean = false,
|
|
152
|
+
> = Stamp<{[rowId: Id]: RowStamp<Schema, TableId, Hashed, WhenSet>}, Hashed>;
|
|
150
153
|
|
|
151
154
|
/**
|
|
152
155
|
* The RowHashes type is used to quickly compare the content of two sets of Row
|
|
@@ -192,13 +195,15 @@ export type RowStamp<
|
|
|
192
195
|
Schema extends OptionalTablesSchema,
|
|
193
196
|
TableId extends TableIdFromSchema<Schema>,
|
|
194
197
|
Hashed extends boolean = false,
|
|
198
|
+
WhenSet extends boolean = false,
|
|
195
199
|
> = Stamp<
|
|
196
200
|
{
|
|
197
201
|
[CellId in CellIdFromSchema<Schema, TableId>]?: CellStamp<
|
|
198
202
|
Schema,
|
|
199
203
|
TableId,
|
|
200
204
|
CellId,
|
|
201
|
-
Hashed
|
|
205
|
+
Hashed,
|
|
206
|
+
WhenSet
|
|
202
207
|
>;
|
|
203
208
|
},
|
|
204
209
|
Hashed
|
|
@@ -251,7 +256,13 @@ export type CellStamp<
|
|
|
251
256
|
TableId extends TableIdFromSchema<Schema>,
|
|
252
257
|
CellId extends CellIdFromSchema<Schema, TableId>,
|
|
253
258
|
Hashed extends boolean = false,
|
|
254
|
-
|
|
259
|
+
WhenSet extends boolean = false,
|
|
260
|
+
> = Stamp<
|
|
261
|
+
WhenSet extends true
|
|
262
|
+
? CellOrUndefined<Schema, TableId, CellId>
|
|
263
|
+
: CellOrUndefined<Schema, TableId, CellId>,
|
|
264
|
+
Hashed
|
|
265
|
+
>;
|
|
255
266
|
|
|
256
267
|
/**
|
|
257
268
|
* The ValuesStamp type is used as metadata to decide how to merge two different
|
|
@@ -274,12 +285,14 @@ export type CellStamp<
|
|
|
274
285
|
export type ValuesStamp<
|
|
275
286
|
Schema extends OptionalValuesSchema,
|
|
276
287
|
Hashed extends boolean = false,
|
|
288
|
+
WhenSet extends boolean = false,
|
|
277
289
|
> = Stamp<
|
|
278
290
|
{
|
|
279
291
|
[ValueId in ValueIdFromSchema<Schema>]?: ValueStamp<
|
|
280
292
|
Schema,
|
|
281
293
|
ValueId,
|
|
282
|
-
Hashed
|
|
294
|
+
Hashed,
|
|
295
|
+
WhenSet
|
|
283
296
|
>;
|
|
284
297
|
},
|
|
285
298
|
Hashed
|
|
@@ -329,7 +342,13 @@ export type ValueStamp<
|
|
|
329
342
|
Schema extends OptionalValuesSchema,
|
|
330
343
|
ValueId extends ValueIdFromSchema<Schema>,
|
|
331
344
|
Hashed extends boolean = false,
|
|
332
|
-
|
|
345
|
+
WhenSet extends boolean = false,
|
|
346
|
+
> = Stamp<
|
|
347
|
+
WhenSet extends true
|
|
348
|
+
? ValueOrUndefined<Schema, ValueId>
|
|
349
|
+
: ValueOrUndefined<Schema, ValueId>,
|
|
350
|
+
Hashed
|
|
351
|
+
>;
|
|
333
352
|
|
|
334
353
|
/**
|
|
335
354
|
* The MergeableContent type represents the content of a MergeableStore and the
|
|
@@ -352,9 +371,12 @@ export type ValueStamp<
|
|
|
352
371
|
* @category Mergeable
|
|
353
372
|
* @since v5.0.0
|
|
354
373
|
*/
|
|
355
|
-
export type MergeableContent<
|
|
356
|
-
|
|
357
|
-
|
|
374
|
+
export type MergeableContent<
|
|
375
|
+
Schemas extends OptionalSchemas,
|
|
376
|
+
WhenSet extends boolean = false,
|
|
377
|
+
> = [
|
|
378
|
+
mergeableTables: TablesStamp<Schemas[0], true, WhenSet>,
|
|
379
|
+
mergeableValues: ValuesStamp<Schemas[1], true, WhenSet>,
|
|
358
380
|
];
|
|
359
381
|
|
|
360
382
|
/**
|
|
@@ -384,9 +406,10 @@ export type MergeableContent<Schemas extends OptionalSchemas> = [
|
|
|
384
406
|
export type MergeableChanges<
|
|
385
407
|
Schemas extends OptionalSchemas,
|
|
386
408
|
Hashed extends boolean = false,
|
|
409
|
+
WhenSet extends boolean = false,
|
|
387
410
|
> = [
|
|
388
|
-
mergeableTables: TablesStamp<Schemas[0], Hashed>,
|
|
389
|
-
mergeableValues: ValuesStamp<Schemas[1], Hashed>,
|
|
411
|
+
mergeableTables: TablesStamp<Schemas[0], Hashed, WhenSet>,
|
|
412
|
+
mergeableValues: ValuesStamp<Schemas[1], Hashed, WhenSet>,
|
|
390
413
|
isChanges: 1,
|
|
391
414
|
];
|
|
392
415
|
|
|
@@ -1017,7 +1040,7 @@ export interface MergeableStore<
|
|
|
1017
1040
|
* @since v5.0.0
|
|
1018
1041
|
*/
|
|
1019
1042
|
setMergeableContent(
|
|
1020
|
-
mergeableContent: MergeableContent<Schemas>,
|
|
1043
|
+
mergeableContent: MergeableContent<Schemas, true>,
|
|
1021
1044
|
): MergeableStore<Schemas>;
|
|
1022
1045
|
|
|
1023
1046
|
/**
|
|
@@ -1161,7 +1184,8 @@ export interface MergeableStore<
|
|
|
1161
1184
|
* @since v5.0.0
|
|
1162
1185
|
*/
|
|
1163
1186
|
applyMergeableChanges(
|
|
1164
|
-
mergeableChanges:
|
|
1187
|
+
mergeableChanges:
|
|
1188
|
+
MergeableChanges<Schemas, false, true> | MergeableContent<Schemas, true>,
|
|
1165
1189
|
): MergeableStore<Schemas>;
|
|
1166
1190
|
|
|
1167
1191
|
/**
|
|
@@ -1590,19 +1614,19 @@ export interface MergeableStore<
|
|
|
1590
1614
|
* {
|
|
1591
1615
|
* fido: [
|
|
1592
1616
|
* {
|
|
1593
|
-
* sold: [false, '
|
|
1617
|
+
* sold: [false, '', 3177411910],
|
|
1594
1618
|
* species: ['dog', 'Nn1JUF----1FnHIC', 2817056260],
|
|
1595
1619
|
* },
|
|
1596
1620
|
* '',
|
|
1597
|
-
*
|
|
1621
|
+
* 3078067457,
|
|
1598
1622
|
* ],
|
|
1599
1623
|
* },
|
|
1600
1624
|
* '',
|
|
1601
|
-
*
|
|
1625
|
+
* 1137907280,
|
|
1602
1626
|
* ],
|
|
1603
1627
|
* },
|
|
1604
1628
|
* '',
|
|
1605
|
-
*
|
|
1629
|
+
* 401719767,
|
|
1606
1630
|
* ],
|
|
1607
1631
|
* [{}, '', 0],
|
|
1608
1632
|
* ];
|
|
@@ -1760,7 +1760,8 @@ export type DatabaseChangeListener = (tableName: string) => void;
|
|
|
1760
1760
|
* `stopListeningToPersisted` has been renamed `delPersisterListener`.
|
|
1761
1761
|
* @param store The Store to persist.
|
|
1762
1762
|
* @param getPersisted An asynchronous function which will fetch content from
|
|
1763
|
-
* the persistence layer
|
|
1763
|
+
* the persistence layer. If it returns `undefined`, the load will use the
|
|
1764
|
+
* provided initial content if present, and otherwise leave the Store unchanged.
|
|
1764
1765
|
* @param setPersisted An asynchronous function which will send content to the
|
|
1765
1766
|
* persistence layer. Since v4.0, it receives functions for getting the Store
|
|
1766
1767
|
* content and information about the changes made during a transaction. Since
|
|
@@ -202,11 +202,12 @@ export type PersistedStore<
|
|
|
202
202
|
export type PersistedContent<
|
|
203
203
|
Schemas extends OptionalSchemas,
|
|
204
204
|
Persist extends Persists = Persists.StoreOnly,
|
|
205
|
+
WhenSet extends boolean = false,
|
|
205
206
|
> = Persist extends Persists.StoreOrMergeableStore
|
|
206
|
-
? Content<Schemas> | MergeableContent<Schemas>
|
|
207
|
+
? Content<Schemas, WhenSet> | MergeableContent<Schemas, WhenSet>
|
|
207
208
|
: Persist extends Persists.MergeableStoreOnly
|
|
208
|
-
? MergeableContent<Schemas>
|
|
209
|
-
: Content<Schemas>;
|
|
209
|
+
? MergeableContent<Schemas, WhenSet>
|
|
210
|
+
: Content<Schemas, WhenSet>;
|
|
210
211
|
|
|
211
212
|
/**
|
|
212
213
|
* The PersistedChanges type is a generic representation of changes made to the
|
|
@@ -235,10 +236,11 @@ export type PersistedContent<
|
|
|
235
236
|
export type PersistedChanges<
|
|
236
237
|
Schemas extends OptionalSchemas,
|
|
237
238
|
Persist extends Persists = Persists.StoreOnly,
|
|
239
|
+
WhenSet extends boolean = false,
|
|
238
240
|
> = Persist extends Persists.StoreOrMergeableStore
|
|
239
|
-
? Changes<Schemas> | MergeableChanges<Schemas>
|
|
241
|
+
? Changes<Schemas> | MergeableChanges<Schemas, false, WhenSet>
|
|
240
242
|
: Persist extends Persists.MergeableStoreOnly
|
|
241
|
-
? MergeableChanges<Schemas>
|
|
243
|
+
? MergeableChanges<Schemas, false, WhenSet>
|
|
242
244
|
: Changes<Schemas>;
|
|
243
245
|
|
|
244
246
|
/**
|
|
@@ -275,9 +277,10 @@ export type PersistedChanges<
|
|
|
275
277
|
export type PersisterListener<
|
|
276
278
|
Schemas extends OptionalSchemas,
|
|
277
279
|
Persist extends Persists = Persists.StoreOnly,
|
|
280
|
+
WhenSet extends boolean = false,
|
|
278
281
|
> = (
|
|
279
|
-
content?: PersistedContent<Schemas, Persist>,
|
|
280
|
-
changes?: PersistedChanges<Schemas, Persist>,
|
|
282
|
+
content?: PersistedContent<Schemas, Persist, WhenSet>,
|
|
283
|
+
changes?: PersistedChanges<Schemas, Persist, WhenSet>,
|
|
281
284
|
) => void;
|
|
282
285
|
|
|
283
286
|
/**
|
|
@@ -1916,7 +1919,8 @@ export type DatabaseChangeListener = (tableName: string) => void;
|
|
|
1916
1919
|
* `stopListeningToPersisted` has been renamed `delPersisterListener`.
|
|
1917
1920
|
* @param store The Store to persist.
|
|
1918
1921
|
* @param getPersisted An asynchronous function which will fetch content from
|
|
1919
|
-
* the persistence layer
|
|
1922
|
+
* the persistence layer. If it returns `undefined`, the load will use the
|
|
1923
|
+
* provided initial content if present, and otherwise leave the Store unchanged.
|
|
1920
1924
|
* @param setPersisted An asynchronous function which will send content to the
|
|
1921
1925
|
* persistence layer. Since v4.0, it receives functions for getting the Store
|
|
1922
1926
|
* content and information about the changes made during a transaction. Since
|
|
@@ -2052,13 +2056,15 @@ export function createCustomPersister<
|
|
|
2052
2056
|
Persist extends Persists = Persists.StoreOnly,
|
|
2053
2057
|
>(
|
|
2054
2058
|
store: PersistedStore<Schemas, Persist>,
|
|
2055
|
-
getPersisted: () => Promise<
|
|
2059
|
+
getPersisted: () => Promise<
|
|
2060
|
+
PersistedContent<Schemas, Persist, true> | undefined
|
|
2061
|
+
>,
|
|
2056
2062
|
setPersisted: (
|
|
2057
2063
|
getContent: () => PersistedContent<Schemas, Persist>,
|
|
2058
2064
|
changes?: PersistedChanges<Schemas, Persist>,
|
|
2059
2065
|
) => Promise<void>,
|
|
2060
2066
|
addPersisterListener: (
|
|
2061
|
-
listener: PersisterListener<Schemas, Persist>,
|
|
2067
|
+
listener: PersisterListener<Schemas, Persist, true>,
|
|
2062
2068
|
) => ListenerHandle | Promise<ListenerHandle>,
|
|
2063
2069
|
delPersisterListener: (
|
|
2064
2070
|
listenerHandle: ListenerHandle,
|
|
@@ -855,6 +855,10 @@ export type Param = (paramId: Id) => ParamValue | undefined;
|
|
|
855
855
|
* The Select function is provided to the third `query` parameter of the
|
|
856
856
|
* setQueryDefinition method. A query definition must call the Select function
|
|
857
857
|
* at least once, otherwise it will be meaningless and return no data.
|
|
858
|
+
*
|
|
859
|
+
* A Row will only appear in the ResultTable if at least one Select clause
|
|
860
|
+
* produces a defined value for it. If all selected Cells or calculated values
|
|
861
|
+
* resolve to `undefined`, no ResultRow is created for that Row.
|
|
858
862
|
* @example
|
|
859
863
|
* This example shows a query that selects two Cells from the main query Table.
|
|
860
864
|
*
|
|
@@ -991,6 +991,10 @@ export type Param = (paramId: Id) => ParamValue | undefined;
|
|
|
991
991
|
* The Select function is provided to the third `query` parameter of the
|
|
992
992
|
* setQueryDefinition method. A query definition must call the Select function
|
|
993
993
|
* at least once, otherwise it will be meaningless and return no data.
|
|
994
|
+
*
|
|
995
|
+
* A Row will only appear in the ResultTable if at least one Select clause
|
|
996
|
+
* produces a defined value for it. If all selected Cells or calculated values
|
|
997
|
+
* resolve to `undefined`, no ResultRow is created for that Row.
|
|
994
998
|
* @example
|
|
995
999
|
* This example shows a query that selects two Cells from the main query Table.
|
|
996
1000
|
*
|
|
@@ -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
|
|
@@ -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
|