dexie 3.2.3 → 3.2.4
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/dist/dexie.d.ts +12 -4
- package/dist/dexie.js +11 -3
- package/dist/dexie.js.map +1 -1
- package/dist/dexie.min.js +2 -1
- package/dist/dexie.min.js.map +1 -1
- package/dist/dexie.mjs +11 -3
- package/dist/dexie.mjs.map +1 -1
- package/dist/modern/dexie.min.mjs +2 -1
- package/dist/modern/dexie.min.mjs.map +1 -1
- package/dist/modern/dexie.mjs +11 -3
- package/dist/modern/dexie.mjs.map +1 -1
- package/import-wrapper-prod.d.mts +2 -0
- package/import-wrapper.d.mts +2 -0
- package/package.json +3 -3
package/dist/modern/dexie.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* By David Fahlander, david.fahlander@gmail.com
|
|
6
6
|
*
|
|
7
|
-
* Version 3.2.
|
|
7
|
+
* Version 3.2.4, Tue May 30 2023
|
|
8
8
|
*
|
|
9
9
|
* https://dexie.org
|
|
10
10
|
*
|
|
@@ -1242,7 +1242,7 @@ function tempTransaction(db, mode, storeNames, fn) {
|
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
1244
|
|
|
1245
|
-
const DEXIE_VERSION = '3.2.
|
|
1245
|
+
const DEXIE_VERSION = '3.2.4';
|
|
1246
1246
|
const maxString = String.fromCharCode(65535);
|
|
1247
1247
|
const minKey = -Infinity;
|
|
1248
1248
|
const INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
|
|
@@ -4811,7 +4811,9 @@ function extendObservabilitySet(target, newSet) {
|
|
|
4811
4811
|
}
|
|
4812
4812
|
|
|
4813
4813
|
function liveQuery(querier) {
|
|
4814
|
-
|
|
4814
|
+
let hasValue = false;
|
|
4815
|
+
let currentValue = undefined;
|
|
4816
|
+
const observable = new Observable((observer) => {
|
|
4815
4817
|
const scopeFuncIsAsync = isAsyncFunction(querier);
|
|
4816
4818
|
function execute(subscr) {
|
|
4817
4819
|
if (scopeFuncIsAsync) {
|
|
@@ -4862,6 +4864,8 @@ function liveQuery(querier) {
|
|
|
4862
4864
|
}
|
|
4863
4865
|
querying = true;
|
|
4864
4866
|
Promise.resolve(ret).then((result) => {
|
|
4867
|
+
hasValue = true;
|
|
4868
|
+
currentValue = result;
|
|
4865
4869
|
querying = false;
|
|
4866
4870
|
if (closed)
|
|
4867
4871
|
return;
|
|
@@ -4875,6 +4879,7 @@ function liveQuery(querier) {
|
|
|
4875
4879
|
}
|
|
4876
4880
|
}, (err) => {
|
|
4877
4881
|
querying = false;
|
|
4882
|
+
hasValue = false;
|
|
4878
4883
|
observer.error && observer.error(err);
|
|
4879
4884
|
subscription.unsubscribe();
|
|
4880
4885
|
});
|
|
@@ -4882,6 +4887,9 @@ function liveQuery(querier) {
|
|
|
4882
4887
|
doQuery();
|
|
4883
4888
|
return subscription;
|
|
4884
4889
|
});
|
|
4890
|
+
observable.hasValue = () => hasValue;
|
|
4891
|
+
observable.getValue = () => currentValue;
|
|
4892
|
+
return observable;
|
|
4885
4893
|
}
|
|
4886
4894
|
|
|
4887
4895
|
let domDeps;
|