@dcupl/bundle 2.0.0-beta.17 → 2.0.0-beta.19

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.
@@ -5747,7 +5747,8 @@
5747
5747
  e = Object.assign({}, a, e);
5748
5748
  }
5749
5749
  const t = this.filter.cacheCtrl.generateContext({
5750
- options: e
5750
+ options: e,
5751
+ query: this.filter.queryBuilder.getQuery()
5751
5752
  });
5752
5753
  if (this.filter.cacheCtrl.has("query", t))
5753
5754
  return this.filter.cacheCtrl.get("query", t);
@@ -7673,7 +7674,7 @@
7673
7674
  */
7674
7675
  recordDataChange(e) {
7675
7676
  const t = e.model;
7676
- if (!(!e.data || e.data.length === 0))
7677
+ if (!(e.type !== "set" && (!e.data || e.data.length === 0)))
7677
7678
  if (e.type === "set")
7678
7679
  this.state === "clean" ? this.state = "full-reset" : this.state === "tracking" && (this.state = "full-reset", this.changedAttributes.delete(t), this.changedItems.delete(t), this.deletedItems.delete(t)), this.modelFullReset.add(t);
7679
7680
  else {
@@ -10008,8 +10009,16 @@ These attributes will default to Step 1 processing which may be incorrect. This
10008
10009
  autoGenerateKey: t.autoGenerateKey
10009
10010
  });
10010
10011
  },
10012
+ /**
10013
+ * Stages the removal of every row of a model. Like the other data verbs
10014
+ * it is applied by the next `update()`/`init()`, is folded in call order
10015
+ * with mutations staged after it, and invalidates the affected lists
10016
+ * through the normal update path. Equivalent to `data.set([], { model })`.
10017
+ * Used to clear the built model directly, which the next apply undid by
10018
+ * replaying the data log (#257).
10019
+ */
10011
10020
  reset: (e) => {
10012
- e.model && (this.modelParser.models.get(e.model)?.resetData(), this.modelParser.models.get(e.model)?.resetIndexMap());
10021
+ e.model && this.modelParser.addData({ data: [], model: e.model, type: "set" });
10013
10022
  },
10014
10023
  apply: (e) => this.modelParser.addData(e)
10015
10024
  };