@dcupl/bundle 2.0.0-beta.15 → 2.0.0-beta.16

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.
@@ -544,10 +544,10 @@
544
544
  return r != null && typeof r == "object";
545
545
  }
546
546
  var vr$1 = "[object Symbol]";
547
- function P$2(r) {
547
+ function P$1(r) {
548
548
  return typeof r == "symbol" || T$4(r) && N$2(r) == vr$1;
549
549
  }
550
- function z$2(r, e) {
550
+ function z$3(r, e) {
551
551
  for (var t = -1, n = r == null ? 0 : r.length, s = Array(n); ++t < n; )
552
552
  s[t] = e(r[t], t, r);
553
553
  return s;
@@ -557,8 +557,8 @@
557
557
  if (typeof r == "string")
558
558
  return r;
559
559
  if (v$2(r))
560
- return z$2(r, ce$1) + "";
561
- if (P$2(r))
560
+ return z$3(r, ce$1) + "";
561
+ if (P$1(r))
562
562
  return ze$2 ? ze$2.call(r) : "";
563
563
  var e = r + "";
564
564
  return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
@@ -581,7 +581,7 @@
581
581
  function Mr$1(r) {
582
582
  if (typeof r == "number")
583
583
  return r;
584
- if (P$2(r))
584
+ if (P$1(r))
585
585
  return Be$2;
586
586
  if (E$3(r)) {
587
587
  var e = typeof r.valueOf == "function" ? r.valueOf() : r;
@@ -650,11 +650,11 @@
650
650
  function Ur$1(r, e) {
651
651
  return r?.[e];
652
652
  }
653
- function q$2(r, e) {
653
+ function q$1(r, e) {
654
654
  var t = Ur$1(r, e);
655
655
  return Br$1(t) ? t : void 0;
656
656
  }
657
- var we$2 = q$2(O$1, "WeakMap"), We$2 = Object.create, Hr$1 = /* @__PURE__ */ (function() {
657
+ var we$2 = q$1(O$1, "WeakMap"), We$2 = Object.create, Hr$1 = /* @__PURE__ */ (function() {
658
658
  function r() {
659
659
  }
660
660
  return function(e) {
@@ -700,7 +700,7 @@
700
700
  }
701
701
  var oe$1 = (function() {
702
702
  try {
703
- var r = q$2(Object, "defineProperty");
703
+ var r = q$1(Object, "defineProperty");
704
704
  return r({}, "", {}), r;
705
705
  } catch {
706
706
  }
@@ -853,9 +853,9 @@
853
853
  if (v$2(r))
854
854
  return false;
855
855
  var t = typeof r;
856
- return t == "number" || t == "symbol" || t == "boolean" || r == null || P$2(r) ? true : ss$1.test(r) || !ns$1.test(r) || e != null && r in Object(e);
856
+ return t == "number" || t == "symbol" || t == "boolean" || r == null || P$1(r) ? true : ss$1.test(r) || !ns$1.test(r) || e != null && r in Object(e);
857
857
  }
858
- var U$2 = q$2(Object, "create");
858
+ var U$2 = q$1(Object, "create");
859
859
  function is$1() {
860
860
  this.__data__ = U$2 ? U$2(null) : {}, this.size = 0;
861
861
  }
@@ -934,7 +934,7 @@
934
934
  $$2.prototype.get = ws$1;
935
935
  $$2.prototype.has = As$1;
936
936
  $$2.prototype.set = xs$1;
937
- var H$2 = q$2(O$1, "Map");
937
+ var H$2 = q$1(O$1, "Map");
938
938
  function Ss$1() {
939
939
  this.size = 0, this.__data__ = {
940
940
  hash: new Q$4(),
@@ -1010,7 +1010,7 @@
1010
1010
  return v$2(r) ? r : Ne$2(r, e) ? [r] : Ns$1(qe$3(r));
1011
1011
  }
1012
1012
  function pe$1(r) {
1013
- if (typeof r == "string" || P$2(r))
1013
+ if (typeof r == "string" || P$1(r))
1014
1014
  return r;
1015
1015
  var e = r + "";
1016
1016
  return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
@@ -1111,7 +1111,7 @@
1111
1111
  function Ae$2(r) {
1112
1112
  return oi(r, le$1, ii);
1113
1113
  }
1114
- var xe$2 = q$2(O$1, "DataView"), Se$2 = q$2(O$1, "Promise"), Te$2 = q$2(O$1, "Set"), it$2 = "[object Map]", ai = "[object Object]", ot$3 = "[object Promise]", at$2 = "[object Set]", ut$2 = "[object WeakMap]", ct$2 = "[object DataView]", ui = j$2(xe$2), ci = j$2(H$2), fi = j$2(Se$2), li = j$2(Te$2), di = j$2(we$2), w = N$2;
1114
+ var xe$2 = q$1(O$1, "DataView"), Se$2 = q$1(O$1, "Promise"), Te$2 = q$1(O$1, "Set"), it$2 = "[object Map]", ai = "[object Object]", ot$3 = "[object Promise]", at$2 = "[object Set]", ut$2 = "[object WeakMap]", ct$2 = "[object DataView]", ui = j$2(xe$2), ci = j$2(H$2), fi = j$2(Se$2), li = j$2(Te$2), di = j$2(we$2), w = N$2;
1115
1115
  (xe$2 && w(new xe$2(new ArrayBuffer(1))) != ct$2 || H$2 && w(new H$2()) != it$2 || Se$2 && w(Se$2.resolve()) != ot$3 || Te$2 && w(new Te$2()) != at$2 || we$2 && w(new we$2()) != ut$2) && (w = function(r) {
1116
1116
  var e = N$2(r), t = e == ai ? r.constructor : void 0, n = t ? j$2(t) : "";
1117
1117
  if (n)
@@ -1240,7 +1240,7 @@
1240
1240
  }), o;
1241
1241
  }
1242
1242
  var vo$1 = 1, wo$1 = 4;
1243
- function C$1(r) {
1243
+ function C$2(r) {
1244
1244
  return ie(r, vo$1 | wo$1);
1245
1245
  }
1246
1246
  var Ao$1 = "__lodash_hash_undefined__";
@@ -1522,7 +1522,7 @@
1522
1522
  var s = -1, i = an$1, o = true, a = r.length, u = [], c = e.length;
1523
1523
  if (!a)
1524
1524
  return u;
1525
- t && (e = z$2(e, X$2(t))), e.length >= la && (i = zt$1, o = false, e = new Z$3(e));
1525
+ t && (e = z$3(e, X$2(t))), e.length >= la && (i = zt$1, o = false, e = new Z$3(e));
1526
1526
  e:
1527
1527
  for (; ++s < a; ) {
1528
1528
  var f = r[s], l = t == null ? f : t(f);
@@ -1617,7 +1617,7 @@
1617
1617
  }
1618
1618
  function Oa(r, e) {
1619
1619
  if (r !== e) {
1620
- var t = r !== void 0, n = r === null, s = r === r, i = P$2(r), o = e !== void 0, a = e === null, u = e === e, c = P$2(e);
1620
+ var t = r !== void 0, n = r === null, s = r === r, i = P$1(r), o = e !== void 0, a = e === null, u = e === e, c = P$1(e);
1621
1621
  if (!a && !c && !i && r > e || i && o && u && !a && !c || n && o && u || !t && u || !s)
1622
1622
  return 1;
1623
1623
  if (!n && !i && !c && r < e || c && t && s && !n && !i || a && t && s || !o && s || !u)
@@ -1638,15 +1638,15 @@
1638
1638
  return r.index - e.index;
1639
1639
  }
1640
1640
  function _a(r, e, t) {
1641
- e.length ? e = z$2(e, function(i) {
1641
+ e.length ? e = z$3(e, function(i) {
1642
1642
  return v$2(i) ? function(o) {
1643
1643
  return Ke$2(o, i.length === 1 ? i[0] : i);
1644
1644
  } : i;
1645
1645
  }) : e = [fe];
1646
1646
  var n = -1;
1647
- e = z$2(e, X$2(Y$3));
1647
+ e = z$3(e, X$2(Y$3));
1648
1648
  var s = wa(r, function(i, o, a) {
1649
- var u = z$2(e, function(c) {
1649
+ var u = z$3(e, function(c) {
1650
1650
  return c(i);
1651
1651
  });
1652
1652
  return { criteria: u, index: ++n, value: i };
@@ -2596,7 +2596,7 @@
2596
2596
  }
2597
2597
  generateContext(e) {
2598
2598
  try {
2599
- return C$1(e);
2599
+ return C$2(e);
2600
2600
  } catch (t) {
2601
2601
  return this.log.error("Error in cache generateContext", t), e;
2602
2602
  }
@@ -2662,7 +2662,7 @@
2662
2662
  };
2663
2663
  }
2664
2664
  }
2665
- const or$1 = (r, e) => e ? typeof structuredClone < "u" ? structuredClone(r) : C$1(r) : r, xt$1 = (r, e, t, n, s, i) => {
2665
+ const or$1 = (r, e) => e ? typeof structuredClone < "u" ? structuredClone(r) : C$2(r) : r, xt$1 = (r, e, t, n, s, i) => {
2666
2666
  try {
2667
2667
  const o = !!e.dcuplInitOptions.performance?.clone?.enabled && !!t.cloneResult, a = or$1(i, o);
2668
2668
  if (t.scope === "list" && (t.listKey = r.cdRef?.key || r.key, t.modelKey = r.model?.key || r.modelKey), t.type === "list_created" && t.args[0].listKey.startsWith("__global_list__") || t.listKey?.startsWith("__global_list__"))
@@ -3257,7 +3257,7 @@
3257
3257
  queries: []
3258
3258
  };
3259
3259
  _initOptions;
3260
- currentQuery = C$1(this._defaultQueryOptions);
3260
+ currentQuery = C$2(this._defaultQueryOptions);
3261
3261
  deepQueryService;
3262
3262
  constructor(e) {
3263
3263
  this.deepQueryService = e || x$1;
@@ -3286,7 +3286,7 @@
3286
3286
  * });
3287
3287
  */
3288
3288
  init(e) {
3289
- this._initOptions = C$1(e), this.currentQuery = C$1(this._defaultQueryOptions), this.currentQuery.modelKey = e.modelKey, "queries" in e && Array.isArray(e.queries) && (e.groupType && (this.currentQuery.groupType = e.groupType), e.queries && (this.currentQuery.queries = C$1(e.queries)), e.count !== void 0 && (this.currentQuery.count = e.count), e.start !== void 0 && (this.currentQuery.start = e.start), e.sort && (this.currentQuery.sort = e.sort), e.projection && (this.currentQuery.projection = e.projection));
3289
+ this._initOptions = C$2(e), this.currentQuery = C$2(this._defaultQueryOptions), this.currentQuery.modelKey = e.modelKey, "queries" in e && Array.isArray(e.queries) && (e.groupType && (this.currentQuery.groupType = e.groupType), e.queries && (this.currentQuery.queries = C$2(e.queries)), e.count !== void 0 && (this.currentQuery.count = e.count), e.start !== void 0 && (this.currentQuery.start = e.start), e.sort && (this.currentQuery.sort = e.sort), e.projection && (this.currentQuery.projection = e.projection));
3290
3290
  }
3291
3291
  reset() {
3292
3292
  return this.init(this._initOptions), this.getQuery();
@@ -3304,7 +3304,7 @@
3304
3304
  return this.currentQuery.queries.find((t) => this.isQueryGroup(t) && t.groupKey === e);
3305
3305
  }
3306
3306
  getQuery() {
3307
- return C$1(this.currentQuery);
3307
+ return C$2(this.currentQuery);
3308
3308
  }
3309
3309
  hasQueryGroup(e) {
3310
3310
  return this.currentQuery.queries.some((t) => this.isQueryGroup(t) && t.groupKey === e);
@@ -3932,7 +3932,7 @@
3932
3932
  };
3933
3933
  const Ce$2 = new ar$1();
3934
3934
  function ju(r, e, t, n, s, i, o) {
3935
- const a = Ce$2.removeQuery({ groupKey: s }, C$1(n)), u = o.queryData(r, a, false, i), c = e ? [...e.keys()] : [], f = new Set(c), l = i.get(s) ?? /* @__PURE__ */ new Map();
3935
+ const a = Ce$2.removeQuery({ groupKey: s }, C$2(n)), u = o.queryData(r, a, false, i), c = e ? [...e.keys()] : [], f = new Set(c), l = i.get(s) ?? /* @__PURE__ */ new Map();
3936
3936
  if (!t.excludeUnresolved)
3937
3937
  for (const h of l.keys())
3938
3938
  f.add(h);
@@ -4724,7 +4724,7 @@
4724
4724
  var T$3 = gn$1(function(A2, e) {
4725
4725
  return be$1(A2) ? da(A2, qs$1(e, 1, be$1)) : [];
4726
4726
  });
4727
- let z$1 = class z {
4727
+ let z$2 = class z {
4728
4728
  constructor(e, t, r, i, n) {
4729
4729
  this.modelParser = e, this.cdRef = t, this.item = r, this.indicesController = i, this.queryManager = n, this.cacheCtrl = new Du(!!this.cdRef.dcuplInitOptions.performance?.cache?.enabled);
4730
4730
  }
@@ -5387,7 +5387,7 @@
5387
5387
  }), i;
5388
5388
  }
5389
5389
  };
5390
- var U$1 = Object.defineProperty, $$1 = Object.getOwnPropertyDescriptor, C = (A2, e, t, r) => {
5390
+ var U$1 = Object.defineProperty, $$1 = Object.getOwnPropertyDescriptor, C$1 = (A2, e, t, r) => {
5391
5391
  for (var i = $$1(e, t), n = A2.length - 1, s; n >= 0; n--)
5392
5392
  (s = A2[n]) && (i = s(e, t, i) || i);
5393
5393
  return i && U$1(e, t, i), i;
@@ -5397,7 +5397,7 @@
5397
5397
  this.dcuplApi = e, this.cdRef = t, this.indicesController = r, this.itemService = new K$3(
5398
5398
  this.dcuplApi.modelParser,
5399
5399
  this.dcuplApi.scriptController
5400
- ), this.filter = new z$1(
5400
+ ), this.filter = new z$2(
5401
5401
  this.dcuplApi.modelParser,
5402
5402
  this.cdRef,
5403
5403
  this.itemService,
@@ -5925,7 +5925,7 @@
5925
5925
  return this.filter.cacheCtrl.set("pivot", t, o), o;
5926
5926
  }
5927
5927
  };
5928
- C([
5928
+ C$1([
5929
5929
  Eu({
5930
5930
  scope: "list",
5931
5931
  type: "fn_metadata",
@@ -5934,7 +5934,7 @@
5934
5934
  connectMessageResult: true
5935
5935
  })
5936
5936
  ], p$3.prototype, "_getMetadata");
5937
- C([
5937
+ C$1([
5938
5938
  Eu({
5939
5939
  scope: "list",
5940
5940
  type: "filter_many",
@@ -5943,7 +5943,7 @@
5943
5943
  connectMessageResult: true
5944
5944
  })
5945
5945
  ], p$3.prototype, "_getFilters");
5946
- C([
5946
+ C$1([
5947
5947
  Eu({
5948
5948
  scope: "list",
5949
5949
  type: "filter_one",
@@ -5952,20 +5952,20 @@
5952
5952
  connectMessageResult: true
5953
5953
  })
5954
5954
  ], p$3.prototype, "_getFilter");
5955
- C([
5955
+ C$1([
5956
5956
  Eu({
5957
5957
  scope: "list",
5958
5958
  type: "query_get",
5959
5959
  cloneResult: true
5960
5960
  })
5961
5961
  ], p$3.prototype, "getQuery");
5962
- C([
5962
+ C$1([
5963
5963
  Eu({
5964
5964
  scope: "list",
5965
5965
  type: "query_has"
5966
5966
  })
5967
5967
  ], p$3.prototype, "hasGroupOrQueryKey");
5968
- C([
5968
+ C$1([
5969
5969
  Eu({
5970
5970
  scope: "list",
5971
5971
  type: "query_apply",
@@ -5974,7 +5974,7 @@
5974
5974
  connectMessageResult: true
5975
5975
  })
5976
5976
  ], p$3.prototype, "applyQuery");
5977
- C([
5977
+ C$1([
5978
5978
  Eu({
5979
5979
  scope: "list",
5980
5980
  type: "query_apply_options",
@@ -5983,7 +5983,7 @@
5983
5983
  connectMessageResult: true
5984
5984
  })
5985
5985
  ], p$3.prototype, "applyOptions");
5986
- C([
5986
+ C$1([
5987
5987
  Eu({
5988
5988
  scope: "list",
5989
5989
  type: "query_remove",
@@ -5992,7 +5992,7 @@
5992
5992
  connectMessageResult: true
5993
5993
  })
5994
5994
  ], p$3.prototype, "removeQuery");
5995
- C([
5995
+ C$1([
5996
5996
  Eu({
5997
5997
  scope: "list",
5998
5998
  type: "query_reset",
@@ -6001,7 +6001,7 @@
6001
6001
  connectMessageResult: true
6002
6002
  })
6003
6003
  ], p$3.prototype, "resetQuery");
6004
- C([
6004
+ C$1([
6005
6005
  Eu({
6006
6006
  scope: "list",
6007
6007
  type: "query_execute",
@@ -6010,7 +6010,7 @@
6010
6010
  connectMessageResult: true
6011
6011
  })
6012
6012
  ], p$3.prototype, "executeQuery");
6013
- C([
6013
+ C$1([
6014
6014
  Eu({
6015
6015
  scope: "list",
6016
6016
  type: "fn_groupBy",
@@ -6019,7 +6019,7 @@
6019
6019
  connectMessageResult: true
6020
6020
  })
6021
6021
  ], p$3.prototype, "_getSections");
6022
- C([
6022
+ C$1([
6023
6023
  Eu({
6024
6024
  scope: "list",
6025
6025
  type: "query_one",
@@ -6028,7 +6028,7 @@
6028
6028
  connectMessageResult: true
6029
6029
  })
6030
6030
  ], p$3.prototype, "_getItem");
6031
- C([
6031
+ C$1([
6032
6032
  Eu({
6033
6033
  scope: "list",
6034
6034
  type: "query_many",
@@ -6037,7 +6037,7 @@
6037
6037
  connectMessageResult: true
6038
6038
  })
6039
6039
  ], p$3.prototype, "_getManyItems");
6040
- C([
6040
+ C$1([
6041
6041
  Eu({
6042
6042
  scope: "list",
6043
6043
  type: "fn_suggest",
@@ -6046,7 +6046,7 @@
6046
6046
  connectMessageResult: true
6047
6047
  })
6048
6048
  ], p$3.prototype, "_getSuggestions");
6049
- C([
6049
+ C$1([
6050
6050
  Eu({
6051
6051
  scope: "list",
6052
6052
  type: "fn_facets",
@@ -6055,7 +6055,7 @@
6055
6055
  connectMessageResult: true
6056
6056
  })
6057
6057
  ], p$3.prototype, "_getFacets");
6058
- C([
6058
+ C$1([
6059
6059
  Eu({
6060
6060
  scope: "list",
6061
6061
  type: "fn_aggregate",
@@ -6064,7 +6064,7 @@
6064
6064
  connectMessageResult: true
6065
6065
  })
6066
6066
  ], p$3.prototype, "getAggregate");
6067
- C([
6067
+ C$1([
6068
6068
  Eu({
6069
6069
  scope: "list",
6070
6070
  type: "fn_pivot",
@@ -6138,7 +6138,7 @@
6138
6138
  function Q$3(d) {
6139
6139
  return F$2(d) ? Yn$1(d, true) : xe$1(d);
6140
6140
  }
6141
- var Ge = "[object Object]", Te$1 = Function.prototype, Ke$1 = Object.prototype, z = Te$1.toString, _e$1 = Ke$1.hasOwnProperty, we$1 = z.call(Object);
6141
+ var Ge = "[object Object]", Te$1 = Function.prototype, Ke$1 = Object.prototype, z$1 = Te$1.toString, _e$1 = Ke$1.hasOwnProperty, we$1 = z$1.call(Object);
6142
6142
  function $e$1(d) {
6143
6143
  if (!T$4(d) || N$2(d) != Ge)
6144
6144
  return false;
@@ -6146,7 +6146,7 @@
6146
6146
  if (e === null)
6147
6147
  return true;
6148
6148
  var t = _e$1.call(e, "constructor") && e.constructor;
6149
- return typeof t == "function" && t instanceof t && z.call(t) == we$1;
6149
+ return typeof t == "function" && t instanceof t && z$1.call(t) == we$1;
6150
6150
  }
6151
6151
  function Fe$1(d, e, t, s) {
6152
6152
  for (var r = -1, i = d == null ? 0 : d.length; ++r < i; ) {
@@ -7673,7 +7673,7 @@
7673
7673
  */
7674
7674
  recordDataChange(e) {
7675
7675
  const t = e.model;
7676
- if (!(!e.data || e.data.length === 0))
7676
+ if (!(e.type !== "set" && (!e.data || e.data.length === 0)))
7677
7677
  if (e.type === "set")
7678
7678
  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
7679
  else {
@@ -8872,23 +8872,23 @@ These attributes will default to Step 1 processing which may be incorrect. This
8872
8872
  type: "dcupl_handle_datacontainer"
8873
8873
  })
8874
8874
  ], M$2.prototype, "handleDataContainer");
8875
- function q$1(d, e) {
8876
- return z$2(e, function(t) {
8877
- return d[t];
8875
+ function F$1(u, e) {
8876
+ return z$3(e, function(t) {
8877
+ return u[t];
8878
8878
  });
8879
8879
  }
8880
- function F$1(d) {
8881
- return d == null ? [] : q$1(d, le$1(d));
8880
+ function z(u) {
8881
+ return u == null ? [] : F$1(u, le$1(u));
8882
8882
  }
8883
8883
  var B$1 = Math.max;
8884
- function W$1(d, e, t, r) {
8885
- d = F$2(d) ? d : F$1(d), t = t ? De$2(t) : 0;
8886
- var s = d.length;
8887
- return t < 0 && (t = B$1(s + t, 0)), xa(d) ? t <= s && d.indexOf(e, t) > -1 : !!s && on$1(d, e, t) > -1;
8888
- }
8889
- var Q$2 = Object.defineProperty, j = Object.getOwnPropertyDescriptor, M$1 = (d, e, t, r) => {
8890
- for (var s = j(e, t), o = d.length - 1, i; o >= 0; o--)
8891
- (i = d[o]) && (s = i(e, t, s) || s);
8884
+ function W$1(u, e, t, r) {
8885
+ u = F$2(u) ? u : z(u), t = t ? De$2(t) : 0;
8886
+ var s = u.length;
8887
+ return t < 0 && (t = B$1(s + t, 0)), xa(u) ? t <= s && u.indexOf(e, t) > -1 : !!s && on$1(u, e, t) > -1;
8888
+ }
8889
+ var Q$2 = Object.defineProperty, j = Object.getOwnPropertyDescriptor, M$1 = (u, e, t, r) => {
8890
+ for (var s = j(e, t), o = u.length - 1, i; o >= 0; o--)
8891
+ (i = u[o]) && (s = i(e, t, s) || s);
8892
8892
  return s && Q$2(e, t, s), s;
8893
8893
  };
8894
8894
  let E$1 = class E {
@@ -8945,7 +8945,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
8945
8945
  // }
8946
8946
  // @trigger({ scope: 'global', name: 'list:create', type: 'list_created' })
8947
8947
  init(e) {
8948
- this.options = C$1(e), this.key = this.options.listKey, this.modelKey = this.options.modelKey, this.setup(this.options);
8948
+ this.options = C$2(e), this.key = this.options.listKey, this.modelKey = this.options.modelKey, this.setup(this.options);
8949
8949
  }
8950
8950
  initFromItemKeys(e, t) {
8951
8951
  const r = /* @__PURE__ */ new Map();
@@ -8998,12 +8998,12 @@ These attributes will default to Step 1 processing which may be incorrect. This
8998
8998
  connectMessage: true
8999
8999
  })
9000
9000
  ], E$1.prototype, "update");
9001
- var N$1 = Object.defineProperty, Z$2 = Object.getOwnPropertyDescriptor, H = (d, e, t, r) => {
9002
- for (var s = Z$2(e, t), o = d.length - 1, i; o >= 0; o--)
9003
- (i = d[o]) && (s = i(e, t, s) || s);
9001
+ var N$1 = Object.defineProperty, Z$2 = Object.getOwnPropertyDescriptor, H = (u, e, t, r) => {
9002
+ for (var s = Z$2(e, t), o = u.length - 1, i; o >= 0; o--)
9003
+ (i = u[o]) && (s = i(e, t, s) || s);
9004
9004
  return s && N$1(e, t, s), s;
9005
9005
  };
9006
- let P$1 = class P {
9006
+ class C {
9007
9007
  constructor(e, t) {
9008
9008
  this.dcuplInstance = e, this.cdRef = t;
9009
9009
  }
@@ -9037,14 +9037,14 @@ These attributes will default to Step 1 processing which may be incorrect. This
9037
9037
  const r = new E$1(this.dcuplInstance, t);
9038
9038
  return r.init(e), this.lists.push(r), r;
9039
9039
  }
9040
- };
9040
+ }
9041
9041
  H([
9042
9042
  Eu({
9043
9043
  scope: "global",
9044
9044
  type: "list_created",
9045
9045
  connectMessage: true
9046
9046
  })
9047
- ], P$1.prototype, "create");
9047
+ ], C.prototype, "create");
9048
9048
  let J$1 = class J {
9049
9049
  constructor(e) {
9050
9050
  this.scriptsController = e;
@@ -9121,6 +9121,48 @@ These attributes will default to Step 1 processing which may be incorrect. This
9121
9121
  count: s
9122
9122
  }));
9123
9123
  }
9124
+ /**
9125
+ * One entry per (model, attribute, errorType) group with the exact
9126
+ * occurrence count and how many error objects were actually retained under
9127
+ * the `maxErrorsPerGroup` cap (#204). Sized by group count, not error count,
9128
+ * so it stays small no matter how many errors a dataset produces.
9129
+ */
9130
+ getErrorSummary() {
9131
+ const e = /* @__PURE__ */ new Map();
9132
+ for (const r of this.errors.values()) {
9133
+ const s = this.getErrorGroupKey(r);
9134
+ e.set(s, (e.get(s) ?? 0) + 1);
9135
+ }
9136
+ const t = [];
9137
+ for (const [r, s] of this.errorCounts) {
9138
+ const o = e.get(r) ?? 0;
9139
+ t.push({
9140
+ key: r,
9141
+ model: s.model,
9142
+ attribute: s.attribute,
9143
+ errorGroup: s.errorGroup,
9144
+ errorType: s.errorType,
9145
+ type: s.type,
9146
+ totalCount: s.count,
9147
+ storedCount: o,
9148
+ truncated: s.count > o
9149
+ });
9150
+ }
9151
+ return t;
9152
+ }
9153
+ /**
9154
+ * Stamps `groupTotal` / `truncated` onto every retained error object so the
9155
+ * `$DcuplErrorTrackingErrors` rows themselves reveal when their group was
9156
+ * capped (#204). Mutates in place: bounded by the number of stored errors,
9157
+ * no per-error allocation.
9158
+ */
9159
+ stampGroupTotals(e) {
9160
+ const t = new Map(e.map((r) => [r.key, r]));
9161
+ for (const r of this.errors.values()) {
9162
+ const s = t.get(this.getErrorGroupKey(r));
9163
+ r.groupTotal = s?.totalCount ?? 1, r.truncated = s?.truncated ?? false;
9164
+ }
9165
+ }
9124
9166
  removeError(e) {
9125
9167
  const t = this.errors.get(e);
9126
9168
  if (t) {
@@ -9205,8 +9247,8 @@ These attributes will default to Step 1 processing which may be incorrect. This
9205
9247
  for (const a of o) {
9206
9248
  const l = this.getGroupCount(s, a, "UndefinedValue");
9207
9249
  if (l > 0 && l === t.data.length) {
9208
- for (const u of this.getModelErrors(s))
9209
- u.attribute === a && u.itemKey != null && u.errorType === "UndefinedValue" && this.removeError(u.key);
9250
+ for (const d of this.getModelErrors(s))
9251
+ d.attribute === a && d.itemKey != null && d.errorType === "UndefinedValue" && this.removeError(d.key);
9210
9252
  this.setError(this.buildAbsentColumnError(s, a));
9211
9253
  }
9212
9254
  }
@@ -9217,11 +9259,11 @@ These attributes will default to Step 1 processing which may be incorrect. This
9217
9259
  const l = n[a];
9218
9260
  if (!l?.length)
9219
9261
  continue;
9220
- const u = l[0].meta, h = e.properties.get(a)?.type ?? u?.expected ?? "unknown";
9262
+ const d = l[0].meta, h = e.properties.get(a)?.type ?? d?.expected ?? "unknown";
9221
9263
  for (const f of l)
9222
9264
  this.removeError(f.key);
9223
9265
  this.setError(
9224
- this.buildColumnCoercionError(s, a, String(u?.rawValue ?? ""), h, l.length)
9266
+ this.buildColumnCoercionError(s, a, String(d?.rawValue ?? ""), h, l.length)
9225
9267
  );
9226
9268
  }
9227
9269
  }
@@ -9302,12 +9344,12 @@ These attributes will default to Step 1 processing which may be incorrect. This
9302
9344
  const a = n.quality?.validators;
9303
9345
  if (a)
9304
9346
  for (const l of t) {
9305
- const u = o.get(l);
9306
- if (!u)
9347
+ const d = o.get(l);
9348
+ if (!d)
9307
9349
  continue;
9308
- const h = u[n.key], f = this.validateAttribute(h, a, n.key);
9350
+ const h = d[n.key], f = this.validateAttribute(h, a, n.key);
9309
9351
  for (const g2 of f)
9310
- g2.model = e.key, g2.itemKey = u.key, s.push(g2);
9352
+ g2.model = e.key, g2.itemKey = d.key, s.push(g2);
9311
9353
  }
9312
9354
  }
9313
9355
  return s;
@@ -9315,17 +9357,26 @@ These attributes will default to Step 1 processing which may be incorrect. This
9315
9357
  async initData() {
9316
9358
  if (!this.modelParser)
9317
9359
  return;
9360
+ const e = ["$DcuplErrorTrackingErrors", "$DcuplErrorTrackingSummary"];
9318
9361
  this.modelParser.unprocessedData = this.modelParser.unprocessedData.filter(
9319
- (r) => r.model !== "$DcuplErrorTrackingErrors"
9362
+ (s) => !e.includes(s.model)
9320
9363
  );
9321
- const e = this.modelParser.models.get("$DcuplErrorTrackingErrors");
9322
- e?.resetData(), e?.resetIndexMap(), this.modelParser.addData({
9364
+ for (const s of e) {
9365
+ const o = this.modelParser.models.get(s);
9366
+ o?.resetData(), o?.resetIndexMap();
9367
+ }
9368
+ const t = this.getErrorSummary();
9369
+ this.stampGroupTotals(t), this.modelParser.addData({
9323
9370
  data: this.getErrors(),
9324
9371
  model: "$DcuplErrorTrackingErrors",
9325
9372
  type: "set"
9373
+ }), this.modelParser.addData({
9374
+ data: t,
9375
+ model: "$DcuplErrorTrackingSummary",
9376
+ type: "set"
9326
9377
  });
9327
- const t = this.modelParser.unprocessedData.find((r) => r.model === "$DcuplErrorTrackingErrors");
9328
- t && await this.modelParser.handleDataContainer([t]);
9378
+ const r = this.modelParser.unprocessedData.filter((s) => e.includes(s.model));
9379
+ r.length > 0 && await this.modelParser.handleDataContainer(r);
9329
9380
  }
9330
9381
  initErrorTrackingModels() {
9331
9382
  this.modelParser?.addModel({
@@ -9381,6 +9432,73 @@ These attributes will default to Step 1 processing which may be incorrect. This
9381
9432
  {
9382
9433
  key: "meta",
9383
9434
  type: "json"
9435
+ },
9436
+ {
9437
+ key: "groupTotal",
9438
+ type: "int"
9439
+ },
9440
+ {
9441
+ key: "truncated",
9442
+ type: "boolean",
9443
+ filter: true
9444
+ }
9445
+ ],
9446
+ quality: {
9447
+ enabled: false
9448
+ }
9449
+ }), this.modelParser?.addModel({
9450
+ key: "$DcuplErrorTrackingSummary",
9451
+ supportsAutoCreation: true,
9452
+ references: [
9453
+ {
9454
+ key: "model",
9455
+ type: "singleValued",
9456
+ model: "$DcuplErrorTrackingModel",
9457
+ filter: {
9458
+ calculateFacets: true
9459
+ }
9460
+ },
9461
+ {
9462
+ key: "errorGroup",
9463
+ type: "singleValued",
9464
+ model: "$DcuplErrorTrackingGroup",
9465
+ filter: {
9466
+ calculateFacets: true
9467
+ }
9468
+ },
9469
+ {
9470
+ key: "errorType",
9471
+ type: "singleValued",
9472
+ model: "$DcuplErrorTrackingType",
9473
+ filter: {
9474
+ calculateFacets: true
9475
+ }
9476
+ }
9477
+ ],
9478
+ properties: [
9479
+ {
9480
+ key: "attribute",
9481
+ type: "string",
9482
+ filter: true
9483
+ },
9484
+ {
9485
+ key: "type",
9486
+ type: "string",
9487
+ filter: true
9488
+ },
9489
+ {
9490
+ key: "totalCount",
9491
+ type: "int",
9492
+ filter: true
9493
+ },
9494
+ {
9495
+ key: "storedCount",
9496
+ type: "int"
9497
+ },
9498
+ {
9499
+ key: "truncated",
9500
+ type: "boolean",
9501
+ filter: true
9384
9502
  }
9385
9503
  ],
9386
9504
  quality: {
@@ -9450,8 +9568,8 @@ These attributes will default to Step 1 processing which may be incorrect. This
9450
9568
  return;
9451
9569
  const i = o?.getBasicProperties() || [], n = o?.getBasicReferences() || [], a = i.length + n.length;
9452
9570
  t += a;
9453
- const u = o.data?.size || 0;
9454
- e += u, r += a * u;
9571
+ const d = o.data?.size || 0;
9572
+ e += d, r += a * d;
9455
9573
  }), this.values.counts.rows = e, this.values.counts.attributes = t, this.values.counts.dataEntries = r;
9456
9574
  }
9457
9575
  calculateTiming() {
@@ -9472,14 +9590,19 @@ These attributes will default to Step 1 processing which may be incorrect. This
9472
9590
  try {
9473
9591
  if (!this.enabled)
9474
9592
  return;
9475
- const e = this.dcupl.lists.create({ modelKey: "$DcuplErrorTrackingErrors" }), t = e.catalog.fn.facets({
9476
- attribute: "errorType",
9477
- calculateResults: true,
9478
- excludeUndefineds: false,
9479
- excludeUnresolved: false,
9480
- excludeZeros: false
9481
- });
9482
- this.values.errors = {}, t && (this.values.errors.size = e.catalog.fn.metadata().currentSize, this.values.errors.UndefinedValue = t.find((r) => r.key === "UndefinedValue")?.size || 0, this.values.errors.UndefinedAttribute = t.find((r) => r.key === "UndefinedAttribute")?.size || 0, this.values.errors.WrongDataType = t.find((r) => r.key === "WrongDataType")?.size || 0, this.values.errors.MissingModel = t.find((r) => r.key === "MissingModel")?.size || 0, this.values.errors.InvalidModelDescription = t.find((r) => r.key === "InvalidModelDescription")?.size || 0, this.values.errors.RemoteReferenceKeyNotFound = t.find((r) => r.key === "RemoteReferenceKeyNotFound")?.size || 0);
9593
+ const e = /* @__PURE__ */ new Map();
9594
+ let t = 0;
9595
+ for (const r of this.errorCounts.values())
9596
+ e.set(r.errorType, (e.get(r.errorType) ?? 0) + r.count), t += r.count;
9597
+ this.values.errors = {
9598
+ size: t,
9599
+ UndefinedValue: e.get("UndefinedValue") ?? 0,
9600
+ UndefinedAttribute: e.get("UndefinedAttribute") ?? 0,
9601
+ WrongDataType: e.get("WrongDataType") ?? 0,
9602
+ MissingModel: e.get("MissingModel") ?? 0,
9603
+ InvalidModelDescription: e.get("InvalidModelDescription") ?? 0,
9604
+ RemoteReferenceKeyNotFound: e.get("RemoteReferenceKeyNotFound") ?? 0
9605
+ };
9483
9606
  } catch (e) {
9484
9607
  this.log.error("Error calculating error tracking facet", e);
9485
9608
  }
@@ -9488,11 +9611,11 @@ These attributes will default to Step 1 processing which may be incorrect. This
9488
9611
  const t = this.dcupl.analyticsController.getByType("resource").filter((o) => o.value?.type === "data"), r = We$1(t, (o) => o.value?.model);
9489
9612
  return Object.keys(r).map((o) => {
9490
9613
  const i = r[o]?.reduce((a, l) => {
9491
- const u = l.value.encodedBodySize;
9492
- return a + u;
9614
+ const d = l.value.encodedBodySize;
9615
+ return a + d;
9493
9616
  }, 0), n = r[o]?.reduce((a, l) => {
9494
- const u = l.value.decodedBodySize;
9495
- return a + u;
9617
+ const d = l.value.decodedBodySize;
9618
+ return a + d;
9496
9619
  }, 0);
9497
9620
  return {
9498
9621
  model: o,
@@ -9596,7 +9719,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
9596
9719
  for (const a of e) {
9597
9720
  const l = a[t];
9598
9721
  if (o.has(l)) {
9599
- const u = {
9722
+ const d = {
9600
9723
  title: "Validator Error - Unique",
9601
9724
  type: "model",
9602
9725
  errorGroup: "PropertyDataError",
@@ -9606,7 +9729,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
9606
9729
  itemKey: a.key,
9607
9730
  description: `The value "${l}" is not unique`
9608
9731
  };
9609
- s.push(u), n && delete a[t];
9732
+ s.push(d), n && delete a[t];
9610
9733
  } else
9611
9734
  o.add(l);
9612
9735
  }
@@ -9753,9 +9876,9 @@ These attributes will default to Step 1 processing which may be incorrect. This
9753
9876
  }
9754
9877
  }
9755
9878
  };
9756
- var Y$2 = Object.defineProperty, X$1 = Object.getOwnPropertyDescriptor, y = (d, e, t, r) => {
9757
- for (var s = X$1(e, t), o = d.length - 1, i; o >= 0; o--)
9758
- (i = d[o]) && (s = i(e, t, s) || s);
9879
+ var Y$2 = Object.defineProperty, X$1 = Object.getOwnPropertyDescriptor, y = (u, e, t, r) => {
9880
+ for (var s = X$1(e, t), o = u.length - 1, i; o >= 0; o--)
9881
+ (i = u[o]) && (s = i(e, t, s) || s);
9759
9882
  return s && Y$2(e, t, s), s;
9760
9883
  };
9761
9884
  let p$1 = class p {
@@ -9808,7 +9931,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
9808
9931
  }
9809
9932
  };
9810
9933
  initOptions;
9811
- lists = new P$1(this, this.cdRef);
9934
+ lists = new C(this, this.cdRef);
9812
9935
  busy = false;
9813
9936
  // Tracks if the class is busy
9814
9937
  updateQueue = [];
@@ -9829,6 +9952,16 @@ These attributes will default to Step 1 processing which may be incorrect. This
9829
9952
  },
9830
9953
  keys: () => this.modelParser._getModelKeys()
9831
9954
  };
9955
+ quality = {
9956
+ errors: {
9957
+ /**
9958
+ * Exact error totals per (model, attribute, errorType) group, including
9959
+ * how many records were retained under `maxErrorsPerGroup` and whether
9960
+ * the group was truncated. Also queryable as `$DcuplErrorTrackingSummary`.
9961
+ */
9962
+ summary: () => this.qualityController.getErrorSummary()
9963
+ }
9964
+ };
9832
9965
  views = {
9833
9966
  get: (e) => this.modelParser.views.get(e),
9834
9967
  keys: (e) => this.modelParser._getViewKeys(e),
@@ -9875,8 +10008,16 @@ These attributes will default to Step 1 processing which may be incorrect. This
9875
10008
  autoGenerateKey: t.autoGenerateKey
9876
10009
  });
9877
10010
  },
10011
+ /**
10012
+ * Stages the removal of every row of a model. Like the other data verbs
10013
+ * it is applied by the next `update()`/`init()`, is folded in call order
10014
+ * with mutations staged after it, and invalidates the affected lists
10015
+ * through the normal update path. Equivalent to `data.set([], { model })`.
10016
+ * Used to clear the built model directly, which the next apply undid by
10017
+ * replaying the data log (#257).
10018
+ */
9878
10019
  reset: (e) => {
9879
- e.model && (this.modelParser.models.get(e.model)?.resetData(), this.modelParser.models.get(e.model)?.resetIndexMap());
10020
+ e.model && this.modelParser.addData({ data: [], model: e.model, type: "set" });
9880
10021
  },
9881
10022
  apply: (e) => this.modelParser.addData(e)
9882
10023
  };