jupiter-dynamic-forms 1.17.1 → 1.17.2

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
@@ -5543,14 +5543,28 @@ let JupiterFormSection = class extends LitElement {
5543
5543
  }
5544
5544
  _traverseTotalGroups(concepts) {
5545
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);
5546
+ for (let i2 = 0; i2 < concepts.length; i2++) {
5547
+ const concept = concepts[i2];
5548
+ if ((_a = concept.preferredLabel) == null ? void 0 : _a.includes("totalLabel")) {
5549
+ if ((_b = concept.children) == null ? void 0 : _b.length) {
5550
+ const childIds = concept.children.map((c2) => c2.id);
5551
+ this._totalChildrenMap.set(concept.id, childIds);
5552
+ this._totalConceptMap.set(concept.id, concept);
5553
+ this._totalChildConceptsMap.set(concept.id, concept.children);
5554
+ for (const childId of childIds) {
5555
+ this._memberParentMap.set(childId, concept.id);
5556
+ }
5557
+ } else {
5558
+ const siblings = concepts.slice(0, i2);
5559
+ if (siblings.length > 0) {
5560
+ const siblingIds = siblings.map((s2) => s2.id);
5561
+ this._totalChildrenMap.set(concept.id, siblingIds);
5562
+ this._totalConceptMap.set(concept.id, concept);
5563
+ this._totalChildConceptsMap.set(concept.id, siblings);
5564
+ for (const siblingId of siblingIds) {
5565
+ this._memberParentMap.set(siblingId, concept.id);
5566
+ }
5567
+ }
5554
5568
  }
5555
5569
  }
5556
5570
  if ((_c = concept.children) == null ? void 0 : _c.length) {