@firebase/firestore 3.4.4-canary.0482aa5b7 → 3.4.4-canary.3e9f3e253
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/firestore/src/api/credentials.d.ts +1 -0
- package/dist/firestore/src/local/document_overlay_cache.d.ts +72 -0
- package/dist/firestore/src/local/indexeddb_document_overlay_cache.d.ts +45 -0
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +10 -2
- package/dist/firestore/src/local/indexeddb_persistence.d.ts +6 -4
- package/dist/firestore/src/local/indexeddb_remote_document_cache.d.ts +2 -8
- package/dist/firestore/src/local/indexeddb_schema.d.ts +81 -9
- package/dist/firestore/src/local/local_documents_view.d.ts +0 -1
- package/dist/firestore/src/local/local_serializer.d.ts +18 -2
- package/dist/firestore/src/local/memory_document_overlay_cache.d.ts +37 -0
- package/dist/firestore/src/local/memory_persistence.d.ts +6 -2
- package/dist/firestore/src/local/memory_remote_document_cache.d.ts +1 -3
- package/dist/firestore/src/local/persistence.d.ts +8 -2
- package/dist/firestore/src/local/remote_document_cache.d.ts +7 -9
- package/dist/firestore/src/local/simple_db.d.ts +1 -0
- package/dist/firestore/src/model/document_key.d.ts +4 -0
- package/dist/firestore/src/model/field_index.d.ts +2 -2
- package/dist/firestore/src/model/overlay.d.ts +32 -0
- package/dist/firestore/src/model/target_index_matcher.d.ts +70 -0
- package/dist/firestore/test/unit/local/counting_query_engine.d.ts +3 -3
- package/dist/firestore/test/unit/local/document_overlay_cache.test.d.ts +1 -0
- package/dist/firestore/test/unit/local/persistence_test_helpers.d.ts +1 -0
- package/dist/firestore/test/unit/local/test_document_overlay_cache.d.ts +38 -0
- package/dist/firestore/test/unit/local/test_index_manager.d.ts +11 -0
- package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +4 -2
- package/dist/firestore/test/unit/local/test_remote_document_change_buffer.d.ts +1 -1
- package/dist/firestore/test/unit/model/target_index_matcher.test.d.ts +17 -0
- package/dist/index.esm2017.js +3497 -3134
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +3448 -3123
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +639 -154
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +639 -154
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +3586 -3227
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +83 -12
- package/dist/lite/firestore/src/api/credentials.d.ts +1 -0
- package/dist/lite/firestore/src/local/document_overlay_cache.d.ts +72 -0
- package/dist/lite/firestore/src/local/indexeddb_document_overlay_cache.d.ts +45 -0
- package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +10 -2
- package/dist/lite/firestore/src/local/indexeddb_persistence.d.ts +6 -4
- package/dist/lite/firestore/src/local/indexeddb_remote_document_cache.d.ts +2 -8
- package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +81 -9
- package/dist/lite/firestore/src/local/local_documents_view.d.ts +0 -1
- package/dist/lite/firestore/src/local/local_serializer.d.ts +18 -2
- package/dist/lite/firestore/src/local/memory_document_overlay_cache.d.ts +37 -0
- package/dist/lite/firestore/src/local/memory_persistence.d.ts +6 -2
- package/dist/lite/firestore/src/local/memory_remote_document_cache.d.ts +1 -3
- package/dist/lite/firestore/src/local/persistence.d.ts +8 -2
- package/dist/lite/firestore/src/local/remote_document_cache.d.ts +7 -9
- package/dist/lite/firestore/src/local/simple_db.d.ts +1 -0
- package/dist/lite/firestore/src/model/document_key.d.ts +4 -0
- package/dist/lite/firestore/src/model/field_index.d.ts +2 -2
- package/dist/lite/firestore/src/model/overlay.d.ts +32 -0
- package/dist/lite/firestore/src/model/target_index_matcher.d.ts +70 -0
- package/dist/lite/firestore/test/unit/local/counting_query_engine.d.ts +3 -3
- package/dist/lite/firestore/test/unit/local/document_overlay_cache.test.d.ts +1 -0
- package/dist/lite/firestore/test/unit/local/persistence_test_helpers.d.ts +1 -0
- package/dist/lite/firestore/test/unit/local/test_document_overlay_cache.d.ts +38 -0
- package/dist/lite/firestore/test/unit/local/test_index_manager.d.ts +11 -0
- package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +4 -2
- package/dist/lite/firestore/test/unit/local/test_remote_document_change_buffer.d.ts +1 -1
- package/dist/lite/firestore/test/unit/model/target_index_matcher.test.d.ts +17 -0
- package/dist/lite/index.browser.esm2017.js +1118 -1112
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +53 -47
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +10 -2
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +10 -2
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +1134 -1128
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +4 -0
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +112 -112
- package/dist/lite/packages/firestore/src/api/credentials.d.ts +1 -0
- package/dist/lite/packages/firestore/src/local/document_overlay_cache.d.ts +72 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_document_overlay_cache.d.ts +45 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +10 -2
- package/dist/lite/packages/firestore/src/local/indexeddb_persistence.d.ts +6 -4
- package/dist/lite/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +2 -8
- package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +81 -9
- package/dist/lite/packages/firestore/src/local/local_documents_view.d.ts +0 -1
- package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +18 -2
- package/dist/lite/packages/firestore/src/local/memory_document_overlay_cache.d.ts +37 -0
- package/dist/lite/packages/firestore/src/local/memory_persistence.d.ts +6 -2
- package/dist/lite/packages/firestore/src/local/memory_remote_document_cache.d.ts +1 -3
- package/dist/lite/packages/firestore/src/local/persistence.d.ts +8 -2
- package/dist/lite/packages/firestore/src/local/remote_document_cache.d.ts +7 -9
- package/dist/lite/packages/firestore/src/local/simple_db.d.ts +1 -0
- package/dist/lite/packages/firestore/src/model/document_key.d.ts +4 -0
- package/dist/lite/packages/firestore/src/model/field_index.d.ts +2 -2
- package/dist/lite/packages/firestore/src/model/overlay.d.ts +32 -0
- package/dist/lite/packages/firestore/src/model/target_index_matcher.d.ts +70 -0
- package/dist/lite/packages/firestore/test/unit/local/counting_query_engine.d.ts +3 -3
- package/dist/lite/packages/firestore/test/unit/local/document_overlay_cache.test.d.ts +1 -0
- package/dist/lite/packages/firestore/test/unit/local/persistence_test_helpers.d.ts +1 -0
- package/dist/lite/packages/firestore/test/unit/local/test_document_overlay_cache.d.ts +38 -0
- package/dist/lite/packages/firestore/test/unit/local/test_index_manager.d.ts +11 -0
- package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +4 -2
- package/dist/lite/packages/firestore/test/unit/local/test_remote_document_change_buffer.d.ts +1 -1
- package/dist/lite/packages/firestore/test/unit/model/target_index_matcher.test.d.ts +17 -0
- package/dist/packages/firestore/dist/index.esm2017.d.ts +181 -179
- package/dist/packages/firestore/src/api/credentials.d.ts +1 -0
- package/dist/packages/firestore/src/local/document_overlay_cache.d.ts +72 -0
- package/dist/packages/firestore/src/local/indexeddb_document_overlay_cache.d.ts +45 -0
- package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +10 -2
- package/dist/packages/firestore/src/local/indexeddb_persistence.d.ts +6 -4
- package/dist/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +2 -8
- package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +81 -9
- package/dist/packages/firestore/src/local/local_documents_view.d.ts +0 -1
- package/dist/packages/firestore/src/local/local_serializer.d.ts +18 -2
- package/dist/packages/firestore/src/local/memory_document_overlay_cache.d.ts +37 -0
- package/dist/packages/firestore/src/local/memory_persistence.d.ts +6 -2
- package/dist/packages/firestore/src/local/memory_remote_document_cache.d.ts +1 -3
- package/dist/packages/firestore/src/local/persistence.d.ts +8 -2
- package/dist/packages/firestore/src/local/remote_document_cache.d.ts +7 -9
- package/dist/packages/firestore/src/local/simple_db.d.ts +1 -0
- package/dist/packages/firestore/src/model/document_key.d.ts +4 -0
- package/dist/packages/firestore/src/model/field_index.d.ts +2 -2
- package/dist/packages/firestore/src/model/overlay.d.ts +32 -0
- package/dist/packages/firestore/src/model/target_index_matcher.d.ts +70 -0
- package/dist/packages/firestore/test/unit/local/counting_query_engine.d.ts +3 -3
- package/dist/packages/firestore/test/unit/local/document_overlay_cache.test.d.ts +1 -0
- package/dist/packages/firestore/test/unit/local/persistence_test_helpers.d.ts +1 -0
- package/dist/packages/firestore/test/unit/local/test_document_overlay_cache.d.ts +38 -0
- package/dist/packages/firestore/test/unit/local/test_index_manager.d.ts +11 -0
- package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +4 -2
- package/dist/packages/firestore/test/unit/local/test_remote_document_change_buffer.d.ts +1 -1
- package/dist/packages/firestore/test/unit/model/target_index_matcher.test.d.ts +17 -0
- package/dist/private.d.ts +79 -12
- package/package.json +9 -9
|
@@ -67,7 +67,7 @@ m.MOCK_USER = new m("mock-user");
|
|
|
67
67
|
* See the License for the specific language governing permissions and
|
|
68
68
|
* limitations under the License.
|
|
69
69
|
*/
|
|
70
|
-
var y = "9.6.
|
|
70
|
+
var y = "9.6.6-canary.3e9f3e253", v = new l("@firebase/firestore");
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
@@ -225,7 +225,7 @@ e) {
|
|
|
225
225
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
226
226
|
* See the License for the specific language governing permissions and
|
|
227
227
|
* limitations under the License.
|
|
228
|
-
*/ var A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded", P = "not-found", N = "permission-denied", q = "unauthenticated", F = "resource-exhausted", O = "failed-precondition", C = "aborted",
|
|
228
|
+
*/ var A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded", P = "not-found", N = "permission-denied", q = "unauthenticated", F = "resource-exhausted", O = "failed-precondition", C = "aborted", L = "out-of-range", j = "unimplemented", R = "internal", M = "unavailable", U = /** @class */ function(e) {
|
|
229
229
|
/** @hideconstructor */
|
|
230
230
|
function n(
|
|
231
231
|
/**
|
|
@@ -530,6 +530,12 @@ function(t, e, n, r, i, o, a, s) {
|
|
|
530
530
|
},
|
|
531
531
|
/** Returns true if the document is in the specified collectionId. */ t.prototype.hasCollectionId = function(t) {
|
|
532
532
|
return this.path.length >= 2 && this.path.get(this.path.length - 2) === t;
|
|
533
|
+
},
|
|
534
|
+
/** Returns the collection group (i.e. the name of the parent collection) for this key. */ t.prototype.getCollectionGroup = function() {
|
|
535
|
+
return this.path.get(this.path.length - 2);
|
|
536
|
+
},
|
|
537
|
+
/** Returns the fully qualified path to the parent collection. */ t.prototype.getCollectionPath = function() {
|
|
538
|
+
return this.path.popLast();
|
|
533
539
|
}, t.prototype.isEqual = function(t) {
|
|
534
540
|
return null !== t && 0 === Z.comparator(this.path, t.path);
|
|
535
541
|
}, t.prototype.toString = function() {
|
|
@@ -759,7 +765,7 @@ function dt(t) {
|
|
|
759
765
|
// return Code.ALREADY_EXISTS;
|
|
760
766
|
case 416:
|
|
761
767
|
// Range Not Satisfiable
|
|
762
|
-
return
|
|
768
|
+
return L;
|
|
763
769
|
|
|
764
770
|
case 429:
|
|
765
771
|
// Too Many Requests
|
|
@@ -778,7 +784,7 @@ function dt(t) {
|
|
|
778
784
|
// return Code.DATA_LOSS;
|
|
779
785
|
case 501:
|
|
780
786
|
// Unimplemented
|
|
781
|
-
return
|
|
787
|
+
return j;
|
|
782
788
|
|
|
783
789
|
case 503:
|
|
784
790
|
// Service Unavailable
|
|
@@ -1535,7 +1541,7 @@ function Ct(t, e) {
|
|
|
1535
1541
|
}));
|
|
1536
1542
|
}
|
|
1537
1543
|
|
|
1538
|
-
function
|
|
1544
|
+
function Lt(t, e) {
|
|
1539
1545
|
if (t === e) return 0;
|
|
1540
1546
|
var n = Ft(t), r = Ft(e);
|
|
1541
1547
|
if (n !== r) return gt(n, r);
|
|
@@ -1555,10 +1561,10 @@ function jt(t, e) {
|
|
|
1555
1561
|
}(t, e);
|
|
1556
1562
|
|
|
1557
1563
|
case 3 /* TimestampValue */ :
|
|
1558
|
-
return
|
|
1564
|
+
return jt(t.timestampValue, e.timestampValue);
|
|
1559
1565
|
|
|
1560
1566
|
case 4 /* ServerTimestampValue */ :
|
|
1561
|
-
return
|
|
1567
|
+
return jt(qt(t), qt(e));
|
|
1562
1568
|
|
|
1563
1569
|
case 5 /* StringValue */ :
|
|
1564
1570
|
return gt(t.stringValue, e.stringValue);
|
|
@@ -1587,7 +1593,7 @@ function jt(t, e) {
|
|
|
1587
1593
|
case 9 /* ArrayValue */ :
|
|
1588
1594
|
return function(t, e) {
|
|
1589
1595
|
for (var n = t.values || [], r = e.values || [], i = 0; i < n.length && i < r.length; ++i) {
|
|
1590
|
-
var o =
|
|
1596
|
+
var o = Lt(n[i], r[i]);
|
|
1591
1597
|
if (o) return o;
|
|
1592
1598
|
}
|
|
1593
1599
|
return gt(n.length, r.length);
|
|
@@ -1604,7 +1610,7 @@ function jt(t, e) {
|
|
|
1604
1610
|
for (var a = 0; a < r.length && a < o.length; ++a) {
|
|
1605
1611
|
var s = gt(r[a], o[a]);
|
|
1606
1612
|
if (0 !== s) return s;
|
|
1607
|
-
var u =
|
|
1613
|
+
var u = Lt(n[r[a]], i[o[a]]);
|
|
1608
1614
|
if (0 !== u) return u;
|
|
1609
1615
|
}
|
|
1610
1616
|
return gt(r.length, o.length);
|
|
@@ -1615,7 +1621,7 @@ function jt(t, e) {
|
|
|
1615
1621
|
}
|
|
1616
1622
|
}
|
|
1617
1623
|
|
|
1618
|
-
function
|
|
1624
|
+
function jt(t, e) {
|
|
1619
1625
|
if ("string" == typeof t && "string" == typeof e && t.length === e.length) return gt(t, e);
|
|
1620
1626
|
var n = kt(t), r = kt(e), i = gt(n.seconds, r.seconds);
|
|
1621
1627
|
return 0 !== i ? i : gt(n.nanos, r.nanos);
|
|
@@ -1937,7 +1943,7 @@ var Wt = /** @class */ function(e) {
|
|
|
1937
1943
|
}, n.prototype.matches = function(t) {
|
|
1938
1944
|
var e = t.data.field(this.field);
|
|
1939
1945
|
// Types do not have to match in NOT_EQUAL filters.
|
|
1940
|
-
return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.D(
|
|
1946
|
+
return "!=" /* NOT_EQUAL */ === this.op ? null !== e && this.D(Lt(e, this.value)) : null !== e && Ft(this.value) === Ft(e) && this.D(Lt(e, this.value));
|
|
1941
1947
|
// Only compare types with matching backend order (such as double and int).
|
|
1942
1948
|
}, n.prototype.D = function(t) {
|
|
1943
1949
|
switch (this.op) {
|
|
@@ -2390,7 +2396,7 @@ function Ce(t, e) {
|
|
|
2390
2396
|
return Oe(t.databaseId, e.path);
|
|
2391
2397
|
}
|
|
2392
2398
|
|
|
2393
|
-
function
|
|
2399
|
+
function Le(t, e) {
|
|
2394
2400
|
var n, r = function(t) {
|
|
2395
2401
|
var e = Z.fromString(t);
|
|
2396
2402
|
return E(ze(e)), e;
|
|
@@ -2400,7 +2406,7 @@ function je(t, e) {
|
|
|
2400
2406
|
return new nt((E((n = r).length > 4 && "documents" === n.get(4)), n.popFirst(5)));
|
|
2401
2407
|
}
|
|
2402
2408
|
|
|
2403
|
-
function
|
|
2409
|
+
function je(t, e) {
|
|
2404
2410
|
return Oe(t.databaseId, e);
|
|
2405
2411
|
}
|
|
2406
2412
|
|
|
@@ -2704,7 +2710,7 @@ function Ye(t, r) {
|
|
|
2704
2710
|
var n = function(t, e) {
|
|
2705
2711
|
return "found" in e ? function(t, e) {
|
|
2706
2712
|
E(!!e.found), e.found.name, e.found.updateTime;
|
|
2707
|
-
var n =
|
|
2713
|
+
var n = Le(t, e.found.name), r = Fe(e.found.updateTime), i = new zt({
|
|
2708
2714
|
mapValue: {
|
|
2709
2715
|
fields: e.found.fields
|
|
2710
2716
|
}
|
|
@@ -2712,7 +2718,7 @@ function Ye(t, r) {
|
|
|
2712
2718
|
return Qt.newFoundDocument(n, r, i);
|
|
2713
2719
|
}(t, e) : "missing" in e ? function(t, e) {
|
|
2714
2720
|
E(!!e.missing), E(!!e.readTime);
|
|
2715
|
-
var n =
|
|
2721
|
+
var n = Le(t, e.missing), r = Fe(e.readTime);
|
|
2716
2722
|
return Qt.newNoDocument(n, r);
|
|
2717
2723
|
}(t, e) : S();
|
|
2718
2724
|
}(e.q, t);
|
|
@@ -2737,10 +2743,10 @@ function $e(t, r) {
|
|
|
2737
2743
|
var n = {
|
|
2738
2744
|
structuredQuery: {}
|
|
2739
2745
|
}, r = e.path;
|
|
2740
|
-
null !== e.collectionGroup ? (n.parent =
|
|
2746
|
+
null !== e.collectionGroup ? (n.parent = je(t, r), n.structuredQuery.from = [ {
|
|
2741
2747
|
collectionId: e.collectionGroup,
|
|
2742
2748
|
allDescendants: !0
|
|
2743
|
-
} ]) : (n.parent =
|
|
2749
|
+
} ]) : (n.parent = je(t, r.popLast()), n.structuredQuery.from = [ {
|
|
2744
2750
|
collectionId: r.lastSegment()
|
|
2745
2751
|
} ]);
|
|
2746
2752
|
var i = function(t) {
|
|
@@ -2828,7 +2834,7 @@ function $e(t, r) {
|
|
|
2828
2834
|
return !!t.document;
|
|
2829
2835
|
})).map((function(t) {
|
|
2830
2836
|
return function(t, e, n) {
|
|
2831
|
-
var r =
|
|
2837
|
+
var r = Le(t, e.name), i = Fe(e.updateTime), o = new zt({
|
|
2832
2838
|
mapValue: {
|
|
2833
2839
|
fields: e.fields
|
|
2834
2840
|
}
|
|
@@ -3618,16 +3624,16 @@ function(t) {
|
|
|
3618
3624
|
enumerable: !1,
|
|
3619
3625
|
configurable: !0
|
|
3620
3626
|
}),
|
|
3621
|
-
/** Returns a new context with the specified settings overwritten. */ t.prototype.
|
|
3627
|
+
/** Returns a new context with the specified settings overwritten. */ t.prototype.et = function(e) {
|
|
3622
3628
|
return new t(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.q, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
|
|
3623
|
-
}, t.prototype.
|
|
3624
|
-
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.
|
|
3629
|
+
}, t.prototype.nt = function(t) {
|
|
3630
|
+
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.et({
|
|
3625
3631
|
path: n,
|
|
3626
3632
|
rt: !1
|
|
3627
3633
|
});
|
|
3628
3634
|
return r.st(t), r;
|
|
3629
3635
|
}, t.prototype.it = function(t) {
|
|
3630
|
-
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.
|
|
3636
|
+
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.et({
|
|
3631
3637
|
path: n,
|
|
3632
3638
|
rt: !1
|
|
3633
3639
|
});
|
|
@@ -3635,7 +3641,7 @@ function(t) {
|
|
|
3635
3641
|
}, t.prototype.ot = function(t) {
|
|
3636
3642
|
// TODO(b/34871131): We don't support array paths right now; so make path
|
|
3637
3643
|
// undefined.
|
|
3638
|
-
return this.
|
|
3644
|
+
return this.et({
|
|
3639
3645
|
path: void 0,
|
|
3640
3646
|
rt: !0
|
|
3641
3647
|
});
|
|
@@ -3685,7 +3691,7 @@ function(t) {
|
|
|
3685
3691
|
void 0 === o && (o = {});
|
|
3686
3692
|
var a = t.ht(o.merge || o.mergeFields ? 2 /* MergeSet */ : 0 /* Set */ , e, n, i);
|
|
3687
3693
|
Mn("Data must be an object, but it was:", a, r);
|
|
3688
|
-
var s, u, c =
|
|
3694
|
+
var s, u, c = jn(r, a);
|
|
3689
3695
|
if (o.merge) s = new Et(a.fieldMask), u = a.fieldTransforms; else if (o.mergeFields) {
|
|
3690
3696
|
for (var l = [], f = 0, h = o.mergeFields; f < h.length; f++) {
|
|
3691
3697
|
var p = Un(e, h[f], n);
|
|
@@ -3754,7 +3760,7 @@ var Dn = /** @class */ function(e) {
|
|
|
3754
3760
|
return t(n, e), n.prototype._toFieldTransform = function(t) {
|
|
3755
3761
|
var e = Vn(this, t,
|
|
3756
3762
|
/*array=*/ !0), n = this.lt.map((function(t) {
|
|
3757
|
-
return
|
|
3763
|
+
return Ln(t, e);
|
|
3758
3764
|
})), r = new ve(n);
|
|
3759
3765
|
return new be(t.path, r);
|
|
3760
3766
|
}, n.prototype.isEqual = function(t) {
|
|
@@ -3769,7 +3775,7 @@ var Dn = /** @class */ function(e) {
|
|
|
3769
3775
|
return t(n, e), n.prototype._toFieldTransform = function(t) {
|
|
3770
3776
|
var e = Vn(this, t,
|
|
3771
3777
|
/*array=*/ !0), n = this.lt.map((function(t) {
|
|
3772
|
-
return
|
|
3778
|
+
return Ln(t, e);
|
|
3773
3779
|
})), r = new ge(n);
|
|
3774
3780
|
return new be(t.path, r);
|
|
3775
3781
|
}, n.prototype.isEqual = function(t) {
|
|
@@ -3803,7 +3809,7 @@ var Dn = /** @class */ function(e) {
|
|
|
3803
3809
|
if (r instanceof kn)
|
|
3804
3810
|
// Add it to the field mask, but don't add anything to updateData.
|
|
3805
3811
|
o.push(s); else {
|
|
3806
|
-
var c =
|
|
3812
|
+
var c = Ln(r, u);
|
|
3807
3813
|
null != c && (o.push(s), a.set(s, c));
|
|
3808
3814
|
}
|
|
3809
3815
|
}));
|
|
@@ -3826,7 +3832,7 @@ var Dn = /** @class */ function(e) {
|
|
|
3826
3832
|
if (m instanceof kn)
|
|
3827
3833
|
// Add it to the field mask, but don't add anything to updateData.
|
|
3828
3834
|
l.push(d); else {
|
|
3829
|
-
var v =
|
|
3835
|
+
var v = Ln(m, y);
|
|
3830
3836
|
null != v && (l.push(d), f.set(d, v));
|
|
3831
3837
|
}
|
|
3832
3838
|
}
|
|
@@ -3841,7 +3847,7 @@ var Dn = /** @class */ function(e) {
|
|
|
3841
3847
|
* @param allowArrays - Whether the query value is an array that may directly
|
|
3842
3848
|
* contain additional arrays (e.g. the operand of an `in` query).
|
|
3843
3849
|
*/ function Cn(t, e, n, r) {
|
|
3844
|
-
return void 0 === r && (r = !1),
|
|
3850
|
+
return void 0 === r && (r = !1), Ln(n, t.ht(r ? 4 /* ArrayArgument */ : 3 /* Argument */ , e));
|
|
3845
3851
|
}
|
|
3846
3852
|
|
|
3847
3853
|
/**
|
|
@@ -3852,11 +3858,11 @@ var Dn = /** @class */ function(e) {
|
|
|
3852
3858
|
* the source of the data being parsed, etc.
|
|
3853
3859
|
* @returns The parsed value, or null if the value was a FieldValue sentinel
|
|
3854
3860
|
* that should not be included in the resulting parsed data.
|
|
3855
|
-
*/ function
|
|
3861
|
+
*/ function Ln(t, e) {
|
|
3856
3862
|
if (Rn(
|
|
3857
3863
|
// Unwrap the API type from the Compat SDK. This will return the API type
|
|
3858
3864
|
// from firestore-exp.
|
|
3859
|
-
t = p(t))) return Mn("Unsupported field value:", e, t),
|
|
3865
|
+
t = p(t))) return Mn("Unsupported field value:", e, t), jn(t, e);
|
|
3860
3866
|
if (t instanceof vn)
|
|
3861
3867
|
// FieldValues usually parse into transforms (except deleteField())
|
|
3862
3868
|
// in which case we do not want to include this field in our parsed data
|
|
@@ -3892,7 +3898,7 @@ var Dn = /** @class */ function(e) {
|
|
|
3892
3898
|
if (e.settings.rt && 4 /* ArrayArgument */ !== e.tt) throw e.ut("Nested arrays are not supported");
|
|
3893
3899
|
return function(t, e) {
|
|
3894
3900
|
for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
|
|
3895
|
-
var a =
|
|
3901
|
+
var a = Ln(o[i], e.ot(r));
|
|
3896
3902
|
null == a && (
|
|
3897
3903
|
// Just include nulls in the array for fields being replaced with a
|
|
3898
3904
|
// sentinel.
|
|
@@ -3953,7 +3959,7 @@ var Dn = /** @class */ function(e) {
|
|
|
3953
3959
|
}(t, e);
|
|
3954
3960
|
}
|
|
3955
3961
|
|
|
3956
|
-
function
|
|
3962
|
+
function jn(t, e) {
|
|
3957
3963
|
var n = {};
|
|
3958
3964
|
return function(t) {
|
|
3959
3965
|
for (var e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;
|
|
@@ -3962,7 +3968,7 @@ function Ln(t, e) {
|
|
|
3962
3968
|
// If we encounter an empty object, we explicitly add it to the update
|
|
3963
3969
|
// mask to ensure that the server creates a map entry.
|
|
3964
3970
|
e.path && e.path.length > 0 && e.fieldMask.push(e.path) : St(t, (function(t, r) {
|
|
3965
|
-
var i =
|
|
3971
|
+
var i = Ln(r, e.nt(t));
|
|
3966
3972
|
null != i && (n[t] = i);
|
|
3967
3973
|
})), {
|
|
3968
3974
|
mapValue: {
|
|
@@ -4394,12 +4400,12 @@ var tr = /** @class */ function(e) {
|
|
|
4394
4400
|
var nr = /** @class */ function(e) {
|
|
4395
4401
|
function n(t, n, r) {
|
|
4396
4402
|
var i = this;
|
|
4397
|
-
return (i = e.call(this) || this).type = t, i.gt = n, i.
|
|
4403
|
+
return (i = e.call(this) || this).type = t, i.gt = n, i.vt = r, i;
|
|
4398
4404
|
}
|
|
4399
4405
|
return t(n, e), n.prototype._apply = function(t) {
|
|
4400
4406
|
return new sn(t.firestore, t.converter, function(t, e, n) {
|
|
4401
4407
|
return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
|
|
4402
|
-
}(t._query, this.gt, this.
|
|
4408
|
+
}(t._query, this.gt, this.vt));
|
|
4403
4409
|
}, n;
|
|
4404
4410
|
}($n);
|
|
4405
4411
|
|
|
@@ -4428,10 +4434,10 @@ function ir(t) {
|
|
|
4428
4434
|
var or = /** @class */ function(e) {
|
|
4429
4435
|
function n(t, n, r) {
|
|
4430
4436
|
var i = this;
|
|
4431
|
-
return (i = e.call(this) || this).type = t, i.
|
|
4437
|
+
return (i = e.call(this) || this).type = t, i.bt = n, i.Et = r, i;
|
|
4432
4438
|
}
|
|
4433
4439
|
return t(n, e), n.prototype._apply = function(t) {
|
|
4434
|
-
var e = fr(t, this.type, this.
|
|
4440
|
+
var e = fr(t, this.type, this.bt, this.Et);
|
|
4435
4441
|
return new sn(t.firestore, t.converter, function(t, e) {
|
|
4436
4442
|
return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
|
|
4437
4443
|
}(t._query, e));
|
|
@@ -4453,10 +4459,10 @@ function sr() {
|
|
|
4453
4459
|
var ur = /** @class */ function(e) {
|
|
4454
4460
|
function n(t, n, r) {
|
|
4455
4461
|
var i = this;
|
|
4456
|
-
return (i = e.call(this) || this).type = t, i.
|
|
4462
|
+
return (i = e.call(this) || this).type = t, i.bt = n, i.Et = r, i;
|
|
4457
4463
|
}
|
|
4458
4464
|
return t(n, e), n.prototype._apply = function(t) {
|
|
4459
|
-
var e = fr(t, this.type, this.
|
|
4465
|
+
var e = fr(t, this.type, this.bt, this.Et);
|
|
4460
4466
|
return new sn(t.firestore, t.converter, function(t, e) {
|
|
4461
4467
|
return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
|
|
4462
4468
|
}(t._query, e));
|
|
@@ -4721,7 +4727,7 @@ var yr = /** @class */ function(e) {
|
|
|
4721
4727
|
* @returns A Promise that will be resolved with the results of the query.
|
|
4722
4728
|
*/ function gr(t) {
|
|
4723
4729
|
!function(t) {
|
|
4724
|
-
if (ue(t) && 0 === t.explicitOrderBy.length) throw new U(
|
|
4730
|
+
if (ue(t) && 0 === t.explicitOrderBy.length) throw new U(j, "limitToLast() queries require specifying at least one orderBy() clause");
|
|
4725
4731
|
}((t = st(t, sn))._query);
|
|
4726
4732
|
var e = Je(t.firestore), n = new yr(t.firestore);
|
|
4727
4733
|
return $e(e, t._query).then((function(e) {
|
|
@@ -5187,8 +5193,8 @@ function Dr(t, e) {
|
|
|
5187
5193
|
// the context and should handled individually by the calling code.
|
|
5188
5194
|
// See https://cloud.google.com/apis/design/errors.
|
|
5189
5195
|
case C:
|
|
5190
|
-
case j:
|
|
5191
5196
|
case L:
|
|
5197
|
+
case j:
|
|
5192
5198
|
case "data-loss":
|
|
5193
5199
|
return !0;
|
|
5194
5200
|
}
|
|
@@ -5559,7 +5565,7 @@ function Dr(t, e) {
|
|
|
5559
5565
|
var e = this.St.indexOf(t);
|
|
5560
5566
|
this.St.splice(e, 1);
|
|
5561
5567
|
}, t;
|
|
5562
|
-
}(),
|
|
5568
|
+
}(), Lr = /** @class */ function() {
|
|
5563
5569
|
/** @hideconstructor */
|
|
5564
5570
|
function t(t, e) {
|
|
5565
5571
|
this._firestore = t, this._transaction = e, this._dataReader = In(t)
|
|
@@ -5635,10 +5641,10 @@ function Dr(t, e) {
|
|
|
5635
5641
|
* `updateFunction `is returned here. Otherwise, if the transaction failed, a
|
|
5636
5642
|
* rejected promise with the corresponding failure error is returned.
|
|
5637
5643
|
*/
|
|
5638
|
-
function
|
|
5644
|
+
function jr(t, e) {
|
|
5639
5645
|
var n = Je(t = st(t, tn)), r = new x;
|
|
5640
5646
|
return new qr(new Cr, n, (function(n) {
|
|
5641
|
-
return e(new
|
|
5647
|
+
return e(new Lr(t, n));
|
|
5642
5648
|
}), r).run(), r.promise
|
|
5643
5649
|
/**
|
|
5644
5650
|
* Firestore Lite
|
|
@@ -5655,7 +5661,7 @@ y = i + "_lite", o(new c("firestore/lite", (function(t, e) {
|
|
|
5655
5661
|
return n && i._setSettings(n), i;
|
|
5656
5662
|
}), "PUBLIC")),
|
|
5657
5663
|
// RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
|
|
5658
|
-
a("firestore-lite", "3.4.4-canary.
|
|
5664
|
+
a("firestore-lite", "3.4.4-canary.3e9f3e253", ""), a("firestore-lite", "3.4.4-canary.3e9f3e253", "esm5");
|
|
5659
5665
|
|
|
5660
|
-
export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, U as FirestoreError, gn as GeoPoint, sn as Query, $n as QueryConstraint, Kn as QueryDocumentSnapshot, Hn as QuerySnapshot, bt as Timestamp,
|
|
5666
|
+
export { yn as Bytes, un as CollectionReference, an as DocumentReference, Qn as DocumentSnapshot, dn as FieldPath, vn as FieldValue, tn as Firestore, U as FirestoreError, gn as GeoPoint, sn as Query, $n as QueryConstraint, Kn as QueryDocumentSnapshot, Hn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Vr as WriteBatch, Tr as addDoc, Ar as arrayRemove, Ir as arrayUnion, cn as collection, ln as collectionGroup, rn as connectFirestoreEmulator, _r as deleteDoc, Sr as deleteField, fn as doc, mn as documentId, lr as endAt, cr as endBefore, vr as getDoc, gr as getDocs, nn as getFirestore, kr as increment, en as initializeFirestore, rr as limit, ir as limitToLast, er as orderBy, Xn as query, pn as queryEqual, hn as refEqual, jr as runTransaction, Er as serverTimestamp, wr as setDoc, g as setLogLevel, Wn as snapshotEqual, sr as startAfter, ar as startAt, on as terminate, br as updateDoc, Zn as where, Pr as writeBatch };
|
|
5661
5667
|
//# sourceMappingURL=index.browser.esm5.js.map
|