jupiter-dynamic-forms 1.17.1 → 1.17.3

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/index.mjs CHANGED
@@ -5291,9 +5291,6 @@ let JupiterFormSection = class extends LitElement {
5291
5291
  this._insertAfterColumnId = null;
5292
5292
  this._boundFieldBlur = (e2) => {
5293
5293
  this._clearHighlights();
5294
- const { conceptId, columnId } = e2.detail || {};
5295
- if (conceptId && columnId)
5296
- this._runCalculationCheck(conceptId, columnId);
5297
5294
  };
5298
5295
  this._expandedConcepts = /* @__PURE__ */ new Set();
5299
5296
  this._allTreeExpanded = false;
@@ -5542,18 +5539,39 @@ let JupiterFormSection = class extends LitElement {
5542
5539
  this._traverseTotalGroups(concepts);
5543
5540
  }
5544
5541
  _traverseTotalGroups(concepts) {
5545
- var _a, _b, _c;
5546
- for (const concept of concepts) {
5547
- if (((_a = concept.preferredLabel) == null ? void 0 : _a.includes("totalLabel")) && ((_b = concept.children) == null ? void 0 : _b.length)) {
5548
- const childIds = concept.children.map((c2) => c2.id);
5549
- this._totalChildrenMap.set(concept.id, childIds);
5550
- this._totalConceptMap.set(concept.id, concept);
5551
- this._totalChildConceptsMap.set(concept.id, concept.children);
5552
- for (const childId of childIds) {
5553
- this._memberParentMap.set(childId, concept.id);
5542
+ var _a, _b, _c, _d;
5543
+ for (let i2 = 0; i2 < concepts.length; i2++) {
5544
+ const concept = concepts[i2];
5545
+ if ((_a = concept.preferredLabel) == null ? void 0 : _a.includes("totalLabel")) {
5546
+ if ((_b = concept.children) == null ? void 0 : _b.length) {
5547
+ const childIds = concept.children.map((c2) => c2.id);
5548
+ this._totalChildrenMap.set(concept.id, childIds);
5549
+ this._totalConceptMap.set(concept.id, concept);
5550
+ this._totalChildConceptsMap.set(concept.id, concept.children);
5551
+ for (const childId of childIds) {
5552
+ this._memberParentMap.set(childId, concept.id);
5553
+ }
5554
+ } else {
5555
+ let lastTotalIdx = -1;
5556
+ for (let j = i2 - 1; j >= 0; j--) {
5557
+ if ((_c = concepts[j].preferredLabel) == null ? void 0 : _c.includes("totalLabel")) {
5558
+ lastTotalIdx = j;
5559
+ break;
5560
+ }
5561
+ }
5562
+ const siblings = concepts.slice(lastTotalIdx + 1, i2);
5563
+ if (siblings.length > 0) {
5564
+ const siblingIds = siblings.map((s2) => s2.id);
5565
+ this._totalChildrenMap.set(concept.id, siblingIds);
5566
+ this._totalConceptMap.set(concept.id, concept);
5567
+ this._totalChildConceptsMap.set(concept.id, siblings);
5568
+ for (const siblingId of siblingIds) {
5569
+ this._memberParentMap.set(siblingId, concept.id);
5570
+ }
5571
+ }
5554
5572
  }
5555
5573
  }
5556
- if ((_c = concept.children) == null ? void 0 : _c.length) {
5574
+ if ((_d = concept.children) == null ? void 0 : _d.length) {
5557
5575
  this._traverseTotalGroups(concept.children);
5558
5576
  }
5559
5577
  }