@firebase/firestore 3.8.0-canary.d8af08feb → 3.8.0-canary.e9bcd4c43

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.
Files changed (38) hide show
  1. package/dist/firestore/src/lite-api/query.d.ts +14 -12
  2. package/dist/firestore/src/local/overlayed_document.d.ts +8 -4
  3. package/dist/firestore/test/unit/local/counting_query_engine.d.ts +12 -21
  4. package/dist/index.esm2017.js +34 -19
  5. package/dist/index.esm2017.js.map +1 -1
  6. package/dist/index.esm5.js +36 -19
  7. package/dist/index.esm5.js.map +1 -1
  8. package/dist/index.node.cjs.js +34 -16
  9. package/dist/index.node.cjs.js.map +1 -1
  10. package/dist/index.node.mjs +34 -16
  11. package/dist/index.node.mjs.map +1 -1
  12. package/dist/index.rn.js +34 -19
  13. package/dist/index.rn.js.map +1 -1
  14. package/dist/internal.d.ts +23 -17
  15. package/dist/lite/firestore/src/lite-api/query.d.ts +14 -12
  16. package/dist/lite/firestore/src/local/overlayed_document.d.ts +8 -4
  17. package/dist/lite/firestore/test/unit/local/counting_query_engine.d.ts +12 -21
  18. package/dist/lite/index.browser.esm2017.js +16 -14
  19. package/dist/lite/index.browser.esm2017.js.map +1 -1
  20. package/dist/lite/index.browser.esm5.js +17 -15
  21. package/dist/lite/index.browser.esm5.js.map +1 -1
  22. package/dist/lite/index.node.cjs.js +16 -14
  23. package/dist/lite/index.node.cjs.js.map +1 -1
  24. package/dist/lite/index.node.mjs +16 -14
  25. package/dist/lite/index.node.mjs.map +1 -1
  26. package/dist/lite/index.rn.esm2017.js +16 -14
  27. package/dist/lite/index.rn.esm2017.js.map +1 -1
  28. package/dist/lite/internal.d.ts +15 -13
  29. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +15 -13
  30. package/dist/lite/packages/firestore/src/lite-api/query.d.ts +14 -12
  31. package/dist/lite/packages/firestore/src/local/overlayed_document.d.ts +8 -4
  32. package/dist/lite/packages/firestore/test/unit/local/counting_query_engine.d.ts +12 -21
  33. package/dist/packages/firestore/dist/index.esm2017.d.ts +15 -13
  34. package/dist/packages/firestore/src/lite-api/query.d.ts +14 -12
  35. package/dist/packages/firestore/src/local/overlayed_document.d.ts +8 -4
  36. package/dist/packages/firestore/test/unit/local/counting_query_engine.d.ts +12 -21
  37. package/dist/private.d.ts +8 -4
  38. package/package.json +9 -9
@@ -70,7 +70,7 @@ N.MOCK_USER = new N("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- var k = "9.15.0-canary.d8af08feb", F = new l("@firebase/firestore");
73
+ var k = "9.15.0-canary.e9bcd4c43", F = new l("@firebase/firestore");
74
74
 
75
75
  /**
76
76
  * @license
@@ -2905,6 +2905,16 @@ function Re(t) {
2905
2905
  // the same description, such as the int 3 and the string "3". So we should
2906
2906
  // add the types in here somehow, too.
2907
2907
  return t.field.canonicalString() + t.op.toString() + le(t.value);
2908
+ if (Fe(t))
2909
+ // Older SDK versions use an implicit AND operation between their filters.
2910
+ // In the new SDK versions, the developer may use an explicit AND filter.
2911
+ // To stay consistent with the old usages, we add a special case to ensure
2912
+ // the canonical ID for these two are the same. For example:
2913
+ // `col.whereEquals("a", 1).whereEquals("b", 2)` should have the same
2914
+ // canonical ID as `col.where(and(equals("a",1), equals("b",2)))`.
2915
+ return t.filters.map((function(t) {
2916
+ return Re(t);
2917
+ })).join(",");
2908
2918
  // filter instanceof CompositeFilter
2909
2919
  var e = t.filters.map((function(t) {
2910
2920
  return Re(t);
@@ -9434,8 +9444,10 @@ function pu(t, e) {
9434
9444
  * locally mutated.
9435
9445
  */ var vu = function(t,
9436
9446
  /**
9437
- * The fields that are locally mutated by patch mutations. If the overlayed
9438
- * document is from set or delete mutations, this returns null.
9447
+ * The fields that are locally mutated by patch mutations.
9448
+ *
9449
+ * If the overlayed document is from set or delete mutations, this is `null`.
9450
+ * If there is no overlay (mutation) for the document, this is an empty `FieldMask`.
9439
9451
  */
9440
9452
  e) {
9441
9453
  this.overlayedDocument = t, this.mutatedFields = e;
@@ -9543,8 +9555,11 @@ e) {
9543
9555
  // NOTE: we recalculate when `overlay` is undefined as well, because there
9544
9556
  // might be a patch mutation whose precondition does not match before the
9545
9557
  // change (hence overlay is undefined), but would now match.
9546
- r.has(e.key) && (void 0 === u || u.mutation instanceof rr) ? i = i.insert(e.key, e) : void 0 !== u && (o.set(e.key, u.mutation.getFieldMask()),
9547
- $n(u.mutation, e, u.mutation.getFieldMask(), ut.now()));
9558
+ r.has(e.key) && (void 0 === u || u.mutation instanceof rr) ? i = i.insert(e.key, e) : void 0 !== u ? (o.set(e.key, u.mutation.getFieldMask()),
9559
+ $n(u.mutation, e, u.mutation.getFieldMask(), ut.now())) :
9560
+ // no overlay exists
9561
+ // Using EMPTY to indicate there is no overlay for the document.
9562
+ o.set(e.key, tn.empty());
9548
9563
  })), this.recalculateAndSaveOverlays(t, i).next((function(t) {
9549
9564
  return t.forEach((function(t, e) {
9550
9565
  return o.set(t, e);
@@ -19525,13 +19540,14 @@ function Bl(t, e) {
19525
19540
  }(Kl);
19526
19541
 
19527
19542
  /**
19528
- * Creates a {@link QueryCompositeFilterConstraint} that performs a logical OR
19529
- * of all the provided {@link QueryFilterConstraint}s.
19543
+ * Creates a new {@link QueryCompositeFilterConstraint} that is a disjunction of
19544
+ * the given filter constraints. A disjunction filter includes a document if it
19545
+ * satisfies any of the given filters.
19530
19546
  *
19531
- * @param queryConstraints - Optional. The {@link QueryFilterConstraint}s
19532
- * for OR operation. These must be created with calls to {@link where},
19533
- * {@link or}, or {@link and}.
19534
- * @returns The created {@link QueryCompositeFilterConstraint}.
19547
+ * @param queryConstraints - Optional. The list of
19548
+ * {@link QueryFilterConstraint}s to perform a disjunction for. These must be
19549
+ * created with calls to {@link where}, {@link or}, or {@link and}.
19550
+ * @returns The newly created {@link QueryCompositeFilterConstraint}.
19535
19551
  * @internal TODO remove this internal tag with OR Query support in the server
19536
19552
  */ function Yl() {
19537
19553
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
@@ -19540,13 +19556,14 @@ function Bl(t, e) {
19540
19556
  return dh("or", t);
19541
19557
  })), Hl._create("or" /* CompositeOperator.OR */ , t)
19542
19558
  /**
19543
- * Creates a {@link QueryCompositeFilterConstraint} that performs a logical AND
19544
- * of all the provided {@link QueryFilterConstraint}s.
19559
+ * Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of
19560
+ * the given filter constraints. A conjunction filter includes a document if it
19561
+ * satisfies all of the given filters.
19545
19562
  *
19546
- * @param queryConstraints - Optional. The {@link QueryFilterConstraint}s
19547
- * for AND operation. These must be created with calls to {@link where},
19548
- * {@link or}, or {@link and}.
19549
- * @returns The created {@link QueryCompositeFilterConstraint}.
19563
+ * @param queryConstraints - Optional. The list of
19564
+ * {@link QueryFilterConstraint}s to perform a conjunction for. These must be
19565
+ * created with calls to {@link where}, {@link or}, or {@link and}.
19566
+ * @returns The newly created {@link QueryCompositeFilterConstraint}.
19550
19567
  * @internal TODO remove this internal tag with OR Query support in the server
19551
19568
  */;
19552
19569
  }
@@ -21175,9 +21192,9 @@ function $h(t, e) {
21175
21192
  return r = Object.assign({
21176
21193
  useFetchStreams: Kh
21177
21194
  }, r), o._setSettings(r), o;
21178
- }), "PUBLIC").setMultipleInstances(!0)), u(C, "3.8.0-canary.d8af08feb", void 0),
21195
+ }), "PUBLIC").setMultipleInstances(!0)), u(C, "3.8.0-canary.e9bcd4c43", void 0),
21179
21196
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21180
- u(C, "3.8.0-canary.d8af08feb", "esm5");
21197
+ u(C, "3.8.0-canary.e9bcd4c43", "esm5");
21181
21198
 
21182
21199
  export { ph as AbstractUserDataWriter, Sc as AggregateField, _c as AggregateQuerySnapshot, sl as Bytes, Qc as CACHE_SIZE_UNLIMITED, yc as CollectionReference, dc as DocumentReference, gh as DocumentSnapshot, cl as FieldPath, hl as FieldValue, zc as Firestore, j as FirestoreError, fl as GeoPoint, jc as LoadBundleTask, pc as Query, Hl as QueryCompositeFilterConstraint, jl as QueryConstraint, wh as QueryDocumentSnapshot, oh as QueryEndAtConstraint, zl as QueryFieldFilterConstraint, $l as QueryLimitConstraint, Zl as QueryOrderByConstraint, bh as QuerySnapshot, nh as QueryStartAtConstraint, mh as SnapshotMetadata, ut as Timestamp, jh as Transaction, Bh as WriteBatch, Bt as _DatabaseId, ft as _DocumentKey, tt as _EmptyAppCheckTokenProvider, W as _EmptyAuthCredentialsProvider, ht as _FieldPath, ac as _cast, B as _debugAssert, Ht as _isBase64Available, L as _logWarn, rc as _validateIsNotUsedTogether, Oh as addDoc, Ph as aggregateQuerySnapshotEqual, Xl as and, Yh as arrayRemove, Hh as arrayUnion, tl as clearIndexedDbPersistence, vc as collection, mc as collectionGroup, fc as connectFirestoreEmulator, Fh as deleteDoc, zh as deleteField, rl as disableNetwork, gc as doc, ll as documentId, Zc as enableIndexedDbPersistence, Jc as enableMultiTabIndexedDbPersistence, nl as enableNetwork, ah as endAt, uh as endBefore, Yc as ensureFirestoreConfigured, Mh as executeWrite, qh as getCountFromServer, Eh as getDoc, _h as getDocFromCache, Dh as getDocFromServer, xh as getDocs, Ah as getDocsFromCache, Ch as getDocsFromServer, Hc as getFirestore, Xh as increment, Wc as initializeFirestore, th as limit, eh as limitToLast, ol as loadBundle, ul as namedQuery, Rh as onSnapshot, Vh as onSnapshotsInSync, Yl as or, Jl as orderBy, Ql as query, bc as queryEqual, wc as refEqual, Qh as runTransaction, Wh as serverTimestamp, Nh as setDoc, Jh as setIndexConfiguration, R as setLogLevel, Th as snapshotEqual, ih as startAfter, rh as startAt, il as terminate, kh as updateDoc, el as waitForPendingWrites, Wl as where, Zh as writeBatch };
21183
21200
  //# sourceMappingURL=index.esm5.js.map