jupiter-dynamic-forms 1.6.0 → 1.6.1

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
@@ -4,7 +4,7 @@ import { LitElement, html, css } from "lit";
4
4
  * Copyright 2017 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const t$1 = (t2) => (e2, o2) => {
7
+ const t$3 = (t2) => (e2, o2) => {
8
8
  void 0 !== o2 ? o2.addInitializer(() => {
9
9
  customElements.define(t2, e2);
10
10
  }) : customElements.define(t2, e2);
@@ -14,19 +14,19 @@ const t$1 = (t2) => (e2, o2) => {
14
14
  * Copyright 2019 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- const t = globalThis, e$1 = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s = Symbol(), o$2 = /* @__PURE__ */ new WeakMap();
18
- let n$2 = class n {
17
+ const t$2 = globalThis, e$4 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$1 = Symbol(), o$4 = /* @__PURE__ */ new WeakMap();
18
+ let n$3 = class n {
19
19
  constructor(t2, e2, o2) {
20
- if (this._$cssResult$ = true, o2 !== s)
20
+ if (this._$cssResult$ = true, o2 !== s$1)
21
21
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
22
22
  this.cssText = t2, this.t = e2;
23
23
  }
24
24
  get styleSheet() {
25
25
  let t2 = this.o;
26
26
  const s2 = this.t;
27
- if (e$1 && void 0 === t2) {
27
+ if (e$4 && void 0 === t2) {
28
28
  const e2 = void 0 !== s2 && 1 === s2.length;
29
- e2 && (t2 = o$2.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && o$2.set(s2, t2));
29
+ e2 && (t2 = o$4.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && o$4.set(s2, t2));
30
30
  }
31
31
  return t2;
32
32
  }
@@ -34,29 +34,29 @@ let n$2 = class n {
34
34
  return this.cssText;
35
35
  }
36
36
  };
37
- const r$3 = (t2) => new n$2("string" == typeof t2 ? t2 : t2 + "", void 0, s), S = (s2, o2) => {
38
- if (e$1)
37
+ const r$4 = (t2) => new n$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$1), S$1 = (s2, o2) => {
38
+ if (e$4)
39
39
  s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
40
40
  else
41
41
  for (const e2 of o2) {
42
- const o3 = document.createElement("style"), n3 = t.litNonce;
42
+ const o3 = document.createElement("style"), n3 = t$2.litNonce;
43
43
  void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
44
44
  }
45
- }, c$1 = e$1 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
45
+ }, c$2 = e$4 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
46
46
  let e2 = "";
47
47
  for (const s2 of t3.cssRules)
48
48
  e2 += s2.cssText;
49
- return r$3(e2);
49
+ return r$4(e2);
50
50
  })(t2) : t2;
51
51
  /**
52
52
  * @license
53
53
  * Copyright 2017 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
55
  */
56
- const { is: i, defineProperty: e, getOwnPropertyDescriptor: h, getOwnPropertyNames: r$2, getOwnPropertySymbols: o$1, getPrototypeOf: n$1 } = Object, a = globalThis, c = a.trustedTypes, l = c ? c.emptyScript : "", p = a.reactiveElementPolyfillSupport, d = (t2, s2) => t2, u = { toAttribute(t2, s2) {
56
+ const { is: i$2, defineProperty: e$3, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$3, getOwnPropertySymbols: o$3, getPrototypeOf: n$2 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (t2, s2) => t2, u$1 = { toAttribute(t2, s2) {
57
57
  switch (s2) {
58
58
  case Boolean:
59
- t2 = t2 ? l : null;
59
+ t2 = t2 ? l$1 : null;
60
60
  break;
61
61
  case Object:
62
62
  case Array:
@@ -81,8 +81,8 @@ const { is: i, defineProperty: e, getOwnPropertyDescriptor: h, getOwnPropertyNam
81
81
  }
82
82
  }
83
83
  return i2;
84
- } }, f = (t2, s2) => !i(t2, s2), b = { attribute: true, type: String, converter: u, reflect: false, useDefault: false, hasChanged: f };
85
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a.litPropertyMetadata ?? (a.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
84
+ } }, f$1 = (t2, s2) => !i$2(t2, s2), b = { attribute: true, type: String, converter: u$1, reflect: false, useDefault: false, hasChanged: f$1 };
85
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a$1.litPropertyMetadata ?? (a$1.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
86
86
  class y extends HTMLElement {
87
87
  static addInitializer(t2) {
88
88
  this._$Ei(), (this.l ?? (this.l = [])).push(t2);
@@ -93,11 +93,11 @@ class y extends HTMLElement {
93
93
  static createProperty(t2, s2 = b) {
94
94
  if (s2.state && (s2.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t2) && ((s2 = Object.create(s2)).wrapped = true), this.elementProperties.set(t2, s2), !s2.noAccessor) {
95
95
  const i2 = Symbol(), h2 = this.getPropertyDescriptor(t2, i2, s2);
96
- void 0 !== h2 && e(this.prototype, t2, h2);
96
+ void 0 !== h2 && e$3(this.prototype, t2, h2);
97
97
  }
98
98
  }
99
99
  static getPropertyDescriptor(t2, s2, i2) {
100
- const { get: e2, set: r2 } = h(this.prototype, t2) ?? { get() {
100
+ const { get: e2, set: r2 } = h$1(this.prototype, t2) ?? { get() {
101
101
  return this[s2];
102
102
  }, set(t3) {
103
103
  this[s2] = t3;
@@ -111,16 +111,16 @@ class y extends HTMLElement {
111
111
  return this.elementProperties.get(t2) ?? b;
112
112
  }
113
113
  static _$Ei() {
114
- if (this.hasOwnProperty(d("elementProperties")))
114
+ if (this.hasOwnProperty(d$1("elementProperties")))
115
115
  return;
116
- const t2 = n$1(this);
116
+ const t2 = n$2(this);
117
117
  t2.finalize(), void 0 !== t2.l && (this.l = [...t2.l]), this.elementProperties = new Map(t2.elementProperties);
118
118
  }
119
119
  static finalize() {
120
- if (this.hasOwnProperty(d("finalized")))
120
+ if (this.hasOwnProperty(d$1("finalized")))
121
121
  return;
122
- if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
123
- const t3 = this.properties, s2 = [...r$2(t3), ...o$1(t3)];
122
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
123
+ const t3 = this.properties, s2 = [...r$3(t3), ...o$3(t3)];
124
124
  for (const i2 of s2)
125
125
  this.createProperty(i2, t3[i2]);
126
126
  }
@@ -143,9 +143,9 @@ class y extends HTMLElement {
143
143
  if (Array.isArray(s2)) {
144
144
  const e2 = new Set(s2.flat(1 / 0).reverse());
145
145
  for (const s3 of e2)
146
- i2.unshift(c$1(s3));
146
+ i2.unshift(c$2(s3));
147
147
  } else
148
- void 0 !== s2 && i2.push(c$1(s2));
148
+ void 0 !== s2 && i2.push(c$2(s2));
149
149
  return i2;
150
150
  }
151
151
  static _$Eu(t2, s2) {
@@ -175,7 +175,7 @@ class y extends HTMLElement {
175
175
  }
176
176
  createRenderRoot() {
177
177
  const t2 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
178
- return S(t2, this.constructor.elementStyles), t2;
178
+ return S$1(t2, this.constructor.elementStyles), t2;
179
179
  }
180
180
  connectedCallback() {
181
181
  var _a;
@@ -200,7 +200,7 @@ class y extends HTMLElement {
200
200
  var _a;
201
201
  const i2 = this.constructor.elementProperties.get(t2), e2 = this.constructor._$Eu(t2, i2);
202
202
  if (void 0 !== e2 && true === i2.reflect) {
203
- const h2 = (void 0 !== ((_a = i2.converter) == null ? void 0 : _a.toAttribute) ? i2.converter : u).toAttribute(s2, i2.type);
203
+ const h2 = (void 0 !== ((_a = i2.converter) == null ? void 0 : _a.toAttribute) ? i2.converter : u$1).toAttribute(s2, i2.type);
204
204
  this._$Em = t2, null == h2 ? this.removeAttribute(e2) : this.setAttribute(e2, h2), this._$Em = null;
205
205
  }
206
206
  }
@@ -208,7 +208,7 @@ class y extends HTMLElement {
208
208
  var _a, _b;
209
209
  const i2 = this.constructor, e2 = i2._$Eh.get(t2);
210
210
  if (void 0 !== e2 && this._$Em !== e2) {
211
- const t3 = i2.getPropertyOptions(e2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== ((_a = t3.converter) == null ? void 0 : _a.fromAttribute) ? t3.converter : u;
211
+ const t3 = i2.getPropertyOptions(e2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== ((_a = t3.converter) == null ? void 0 : _a.fromAttribute) ? t3.converter : u$1;
212
212
  this._$Em = e2;
213
213
  const r2 = h2.fromAttribute(s2, t3.type);
214
214
  this[e2] = r2 ?? ((_b = this._$Ej) == null ? void 0 : _b.get(e2)) ?? r2, this._$Em = null;
@@ -218,7 +218,7 @@ class y extends HTMLElement {
218
218
  var _a;
219
219
  if (void 0 !== t2) {
220
220
  const e2 = this.constructor, h2 = this[t2];
221
- if (i2 ?? (i2 = e2.getPropertyOptions(t2)), !((i2.hasChanged ?? f)(h2, s2) || i2.useDefault && i2.reflect && h2 === ((_a = this._$Ej) == null ? void 0 : _a.get(t2)) && !this.hasAttribute(e2._$Eu(t2, i2))))
221
+ if (i2 ?? (i2 = e2.getPropertyOptions(t2)), !((i2.hasChanged ?? f$1)(h2, s2) || i2.useDefault && i2.reflect && h2 === ((_a = this._$Ej) == null ? void 0 : _a.get(t2)) && !this.hasAttribute(e2._$Eu(t2, i2))))
222
222
  return;
223
223
  this.C(t2, s2, i2);
224
224
  }
@@ -298,13 +298,13 @@ class y extends HTMLElement {
298
298
  firstUpdated(t2) {
299
299
  }
300
300
  }
301
- y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d("elementProperties")] = /* @__PURE__ */ new Map(), y[d("finalized")] = /* @__PURE__ */ new Map(), p == null ? void 0 : p({ ReactiveElement: y }), (a.reactiveElementVersions ?? (a.reactiveElementVersions = [])).push("2.1.1");
301
+ y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1 == null ? void 0 : p$1({ ReactiveElement: y }), (a$1.reactiveElementVersions ?? (a$1.reactiveElementVersions = [])).push("2.1.1");
302
302
  /**
303
303
  * @license
304
304
  * Copyright 2017 Google LLC
305
305
  * SPDX-License-Identifier: BSD-3-Clause
306
306
  */
307
- const o = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f }, r$1 = (t2 = o, e2, r2) => {
307
+ const o$2 = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 }, r$2 = (t2 = o$2, e2, r2) => {
308
308
  const { kind: n3, metadata: i2 } = r2;
309
309
  let s2 = globalThis.litPropertyMetadata.get(i2);
310
310
  if (void 0 === s2 && globalThis.litPropertyMetadata.set(i2, s2 = /* @__PURE__ */ new Map()), "setter" === n3 && ((t2 = Object.create(t2)).wrapped = true), s2.set(r2.name, t2), "accessor" === n3) {
@@ -325,8 +325,8 @@ const o = { attribute: true, type: String, converter: u, reflect: false, hasChan
325
325
  }
326
326
  throw Error("Unsupported decorator location: " + n3);
327
327
  };
328
- function n2(t2) {
329
- return (e2, o2) => "object" == typeof o2 ? r$1(t2, e2, o2) : ((t3, e3, o3) => {
328
+ function n$1(t2) {
329
+ return (e2, o2) => "object" == typeof o2 ? r$2(t2, e2, o2) : ((t3, e3, o3) => {
330
330
  const r2 = e3.hasOwnProperty(o3);
331
331
  return e3.constructor.createProperty(o3, t3), r2 ? Object.getOwnPropertyDescriptor(e3, o3) : void 0;
332
332
  })(t2, e2, o2);
@@ -336,8 +336,8 @@ function n2(t2) {
336
336
  * Copyright 2017 Google LLC
337
337
  * SPDX-License-Identifier: BSD-3-Clause
338
338
  */
339
- function r(r2) {
340
- return n2({ ...r2, state: true, attribute: false });
339
+ function r$1(r2) {
340
+ return n$1({ ...r2, state: true, attribute: false });
341
341
  }
342
342
  class FormValidator {
343
343
  /**
@@ -527,13 +527,30 @@ class XBRLFormBuilder {
527
527
  * Create unique concept ID by combining original ID with preferred label suffix
528
528
  * This handles cases where the same concept appears multiple times with different labels
529
529
  */
530
- static createUniqueConceptId(concept) {
530
+ static createUniqueConceptId(concept, sectionId) {
531
+ let baseId = concept.id;
531
532
  if (concept.preferredLabel && concept.preferredLabel.trim() !== "") {
532
533
  const roleMatch = concept.preferredLabel.match(/\/([^\/]+)$/);
533
534
  const roleSuffix = roleMatch ? roleMatch[1] : concept.preferredLabel.replace(/[^a-zA-Z0-9]/g, "_");
534
- return `${concept.id}_${roleSuffix}`;
535
+ baseId = `${concept.id}_${roleSuffix}`;
535
536
  }
536
- return concept.id;
537
+ if (sectionId) {
538
+ const sectionHash = this.createSectionHash(sectionId);
539
+ return `${baseId}__${sectionHash}`;
540
+ }
541
+ return baseId;
542
+ }
543
+ /**
544
+ * Create a short hash from section ID for concept uniqueness
545
+ */
546
+ static createSectionHash(sectionId) {
547
+ let hash = 0;
548
+ for (let i2 = 0; i2 < sectionId.length; i2++) {
549
+ const char = sectionId.charCodeAt(i2);
550
+ hash = (hash << 5) - hash + char;
551
+ hash = hash & hash;
552
+ }
553
+ return Math.abs(hash).toString(36).substr(0, 6);
537
554
  }
538
555
  /**
539
556
  * Build form schema from XBRL input data
@@ -579,11 +596,17 @@ class XBRLFormBuilder {
579
596
  const columns = this.generateDefaultColumnsForRole(role, periodStartDate || "2025-01-01", periodEndDate || "2025-12-31", hypercubeRole, nonAbstractConcepts, periodTypes);
580
597
  const availableColumnIds = columns.map((col) => col.id);
581
598
  console.log(`📋 Available column IDs for role "${role.id}":`, availableColumnIds);
599
+ if (availableColumnIds.some((id) => id.includes("multi_"))) {
600
+ console.log(`🔍 [DEBUG] Multi-dimensional role "${role.role}" - Total columns generated: ${columns.length}`);
601
+ columns.forEach((col, index) => {
602
+ console.log(` Column ${index}: id=${col.id}, title=${col.title}, type=${col.type}`);
603
+ });
604
+ }
582
605
  const roleInfo = { periodTypes, availableColumnIds };
583
606
  const conceptTrees = [];
584
607
  if ((_a = role.presentationLinkbase) == null ? void 0 : _a.concepts) {
585
608
  role.presentationLinkbase.concepts.forEach((concept) => {
586
- const conceptTree = this.buildConceptTree(concept, 0, periodStartDate, periodEndDate, roleInfo);
609
+ const conceptTree = this.buildConceptTree(concept, 0, periodStartDate, periodEndDate, roleInfo, role.id);
587
610
  if (conceptTree) {
588
611
  conceptTrees.push(conceptTree);
589
612
  }
@@ -592,16 +615,20 @@ class XBRLFormBuilder {
592
615
  return {
593
616
  id: role.id,
594
617
  title,
595
- description: ``,
618
+ description: role.description || `Section for ${title}`,
596
619
  concepts: conceptTrees,
597
620
  columns,
598
- expanded: false
621
+ expanded: false,
622
+ metadata: {
623
+ roleURI: role.roleURI,
624
+ originalRole: role.role
625
+ }
599
626
  };
600
627
  }
601
628
  /**
602
629
  * Build concept tree from XBRL presentation concept
603
630
  */
604
- static buildConceptTree(concept, level, periodStartDate, periodEndDate, roleInfo) {
631
+ static buildConceptTree(concept, level, periodStartDate, periodEndDate, roleInfo, sectionId) {
605
632
  const label = this.getPreferredLabel(concept.labels);
606
633
  const fields = [];
607
634
  if (!concept.elementAbstract) {
@@ -645,7 +672,7 @@ class XBRLFormBuilder {
645
672
  const children = [];
646
673
  if (concept.children && concept.children.length > 0) {
647
674
  concept.children.forEach((child) => {
648
- const childTree = this.buildConceptTree(child, level + 1, periodStartDate, periodEndDate, roleInfo);
675
+ const childTree = this.buildConceptTree(child, level + 1, periodStartDate, periodEndDate, roleInfo, sectionId);
649
676
  if (childTree) {
650
677
  children.push(childTree);
651
678
  }
@@ -656,7 +683,7 @@ class XBRLFormBuilder {
656
683
  return null;
657
684
  }
658
685
  return {
659
- id: this.createUniqueConceptId(concept),
686
+ id: this.createUniqueConceptId(concept, sectionId),
660
687
  // Use unique ID for form management
661
688
  originalConceptId: concept.id,
662
689
  // Store original for submission data
@@ -861,7 +888,7 @@ class XBRLFormBuilder {
861
888
  console.log("📅 All concepts are instant type, creating single column");
862
889
  columns.push({
863
890
  id: "instant",
864
- title: `As of ${this.formatDateForDisplay(periodStartDate)}`,
891
+ title: `Current`,
865
892
  description: `Values as of ${periodStartDate}`,
866
893
  type: "base",
867
894
  order: 0,
@@ -871,7 +898,7 @@ class XBRLFormBuilder {
871
898
  console.log("📅 All concepts are duration type, creating single column with period range");
872
899
  columns.push({
873
900
  id: "duration",
874
- title: `${this.formatDateForDisplay(periodStartDate)} / ${this.formatDateForDisplay(periodEndDate)}`,
901
+ title: `Current Period`,
875
902
  description: `Period: ${periodStartDate} to ${periodEndDate}`,
876
903
  type: "base",
877
904
  order: 0,
@@ -881,7 +908,7 @@ class XBRLFormBuilder {
881
908
  console.log("📅 Mixed period types found, creating both duration and instant columns");
882
909
  columns.push({
883
910
  id: "duration",
884
- title: `${this.formatDateForDisplay(periodStartDate)} / ${this.formatDateForDisplay(periodEndDate)}`,
911
+ title: `Current Period`,
885
912
  description: `Period: ${periodStartDate} to ${periodEndDate}`,
886
913
  type: "base",
887
914
  order: 0,
@@ -889,7 +916,7 @@ class XBRLFormBuilder {
889
916
  });
890
917
  columns.push({
891
918
  id: "instant",
892
- title: `As of ${this.formatDateForDisplay(periodStartDate)}`,
919
+ title: `Current`,
893
920
  description: `Values as of ${periodStartDate}`,
894
921
  type: "base",
895
922
  order: 1,
@@ -904,92 +931,172 @@ class XBRLFormBuilder {
904
931
  * Generate columns for single dimension scenarios
905
932
  */
906
933
  static generateSingleDimensionColumns(dimension, periodStartDate, periodEndDate, periodTypes) {
907
- var _a, _b, _c;
908
- if (dimension.typedMember) {
909
- console.log(`📊 Found typed member dimension:`, {
910
- id: dimension.id,
911
- conceptName: dimension.conceptName,
912
- typedMemberId: dimension.typedMember.id
913
- });
914
- const axisLabel2 = ((_a = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _a.label) || dimension.conceptName;
915
- const typedMemberLabel = dimension.typedMember.id.split("_").pop() || "TypedMember";
934
+ var _a, _b, _c, _d, _e;
935
+ console.log(`📊 Processing single dimension:`, {
936
+ id: dimension.id,
937
+ conceptName: dimension.conceptName,
938
+ hasMembers: !!(dimension.members && Array.isArray(dimension.members)),
939
+ membersCount: ((_a = dimension.members) == null ? void 0 : _a.length) || 0,
940
+ hasTypedMember: !!dimension.typedMember,
941
+ typedMemberId: (_b = dimension.typedMember) == null ? void 0 : _b.id
942
+ });
943
+ if (dimension.typedMember && (!dimension.members || dimension.members.length === 0)) {
944
+ console.log(`🔤 Processing typed dimension: ${dimension.id} with typed member: ${dimension.typedMember.id}`);
945
+ const axisLabel2 = ((_c = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _c.label) || dimension.conceptName;
916
946
  const dimensionInfo2 = {
917
947
  axisId: dimension.id,
918
948
  axisLabel: axisLabel2,
919
- memberId: dimension.typedMember.id,
920
- memberLabel: typedMemberLabel,
921
- dimensionKey: `${axisLabel2} | ${typedMemberLabel}`,
922
- dimensionIdKey: `${dimension.id} | ${dimension.typedMember.id}`
949
+ typedMemberId: dimension.typedMember.id,
950
+ dimensionKey: `${axisLabel2} | [Typed Input]`,
951
+ dimensionIdKey: `${dimension.id}|[typed]`
923
952
  };
924
- console.log(`📊 Generated typed dimension info:`, dimensionInfo2);
953
+ console.log(`🔤 Generated typed dimension info:`, dimensionInfo2);
925
954
  const columns2 = [];
926
955
  if (periodTypes.size === 0) {
927
- const column = {
928
- id: "default",
929
- title: dimensionInfo2.memberLabel,
930
- description: "Default typed dimension column",
956
+ columns2.push({
957
+ id: "typed-default",
958
+ title: axisLabel2,
959
+ description: "Typed dimension input column",
931
960
  type: "dimension",
932
961
  dimensionData: {
933
- dimensionId: "default",
962
+ dimensionId: "typed-default",
934
963
  axisId: dimensionInfo2.axisId,
935
- memberId: dimensionInfo2.memberId,
936
- memberValue: dimensionInfo2.memberLabel,
964
+ memberId: "[typed]",
965
+ memberValue: "Typed Input",
966
+ memberLabel: "Typed Input",
967
+ axis: dimensionInfo2.axisLabel,
937
968
  axisLabel: dimensionInfo2.axisLabel,
938
- memberLabel: dimensionInfo2.memberLabel,
939
- isTypedMember: true,
940
- dimensionIdKey: dimensionInfo2.dimensionIdKey
969
+ memberKey: dimensionInfo2.dimensionKey,
970
+ dimensionIdKey: dimensionInfo2.dimensionIdKey,
971
+ hasTypedMembers: true,
972
+ typedMemberId: dimensionInfo2.typedMemberId,
973
+ typedMembers: [{
974
+ axisId: dimensionInfo2.axisId,
975
+ axisLabel: dimensionInfo2.axisLabel,
976
+ typedMemberId: dimensionInfo2.typedMemberId,
977
+ memberLabel: dimensionInfo2.axisLabel
978
+ }]
941
979
  },
942
980
  order: 0,
943
981
  removable: false
944
- };
945
- console.log(`📊 Generated typed member column:`, column);
946
- columns2.push(column);
982
+ });
983
+ } else if (periodTypes.size === 1 && periodTypes.has("instant")) {
984
+ columns2.push({
985
+ id: "typed-instant",
986
+ title: `${axisLabel2} [Typed Input Available]`,
987
+ description: `Typed values as of ${periodStartDate}`,
988
+ type: "dimension",
989
+ dimensionData: {
990
+ dimensionId: "typed-instant",
991
+ axisId: dimensionInfo2.axisId,
992
+ memberId: "[typed]",
993
+ memberValue: "Typed Input",
994
+ memberLabel: "Typed Input",
995
+ axis: dimensionInfo2.axisLabel,
996
+ axisLabel: dimensionInfo2.axisLabel,
997
+ memberKey: dimensionInfo2.dimensionKey,
998
+ dimensionIdKey: dimensionInfo2.dimensionIdKey,
999
+ hasTypedMembers: true,
1000
+ typedMemberId: dimensionInfo2.typedMemberId,
1001
+ typedMembers: [{
1002
+ axisId: dimensionInfo2.axisId,
1003
+ axisLabel: dimensionInfo2.axisLabel,
1004
+ typedMemberId: dimensionInfo2.typedMemberId,
1005
+ memberLabel: dimensionInfo2.axisLabel
1006
+ }]
1007
+ },
1008
+ order: 0,
1009
+ removable: false
1010
+ });
1011
+ } else if (periodTypes.size === 1 && periodTypes.has("duration")) {
1012
+ columns2.push({
1013
+ id: "typed-duration",
1014
+ title: `${axisLabel2} [Typed Input Available]`,
1015
+ description: `Typed values for period ${periodStartDate} to ${periodEndDate}`,
1016
+ type: "dimension",
1017
+ dimensionData: {
1018
+ dimensionId: "typed-duration",
1019
+ axisId: dimensionInfo2.axisId,
1020
+ memberId: "[typed]",
1021
+ memberValue: "Typed Input",
1022
+ memberLabel: "Typed Input",
1023
+ axis: dimensionInfo2.axisLabel,
1024
+ axisLabel: dimensionInfo2.axisLabel,
1025
+ memberKey: dimensionInfo2.dimensionKey,
1026
+ dimensionIdKey: dimensionInfo2.dimensionIdKey,
1027
+ hasTypedMembers: true,
1028
+ typedMemberId: dimensionInfo2.typedMemberId,
1029
+ typedMembers: [{
1030
+ axisId: dimensionInfo2.axisId,
1031
+ axisLabel: dimensionInfo2.axisLabel,
1032
+ typedMemberId: dimensionInfo2.typedMemberId,
1033
+ memberLabel: dimensionInfo2.axisLabel
1034
+ }]
1035
+ },
1036
+ order: 0,
1037
+ removable: false
1038
+ });
947
1039
  } else {
948
- if (periodTypes.has("instant")) {
949
- columns2.push({
950
- id: `instant_${dimensionInfo2.axisId}_${dimensionInfo2.memberId}`,
951
- title: `${dimensionInfo2.memberLabel} (Instant)`,
952
- description: `${periodStartDate}`,
953
- type: "dimension",
954
- dimensionData: {
955
- dimensionId: `instant_${dimensionInfo2.axisId}_${dimensionInfo2.memberId}`,
1040
+ columns2.push({
1041
+ id: "typed-duration",
1042
+ title: `${axisLabel2} [Typed Input Available]`,
1043
+ description: `Typed values for period ${periodStartDate} to ${periodEndDate}`,
1044
+ type: "dimension",
1045
+ dimensionData: {
1046
+ dimensionId: "typed-duration",
1047
+ axisId: dimensionInfo2.axisId,
1048
+ memberId: "[typed]",
1049
+ memberValue: "Typed Input",
1050
+ memberLabel: "Typed Input",
1051
+ axis: dimensionInfo2.axisLabel,
1052
+ axisLabel: dimensionInfo2.axisLabel,
1053
+ memberKey: dimensionInfo2.dimensionKey,
1054
+ dimensionIdKey: dimensionInfo2.dimensionIdKey,
1055
+ hasTypedMembers: true,
1056
+ typedMemberId: dimensionInfo2.typedMemberId,
1057
+ typedMembers: [{
956
1058
  axisId: dimensionInfo2.axisId,
957
- memberId: dimensionInfo2.memberId,
958
- memberValue: dimensionInfo2.memberLabel,
959
1059
  axisLabel: dimensionInfo2.axisLabel,
960
- memberLabel: dimensionInfo2.memberLabel,
961
- isTypedMember: true,
962
- dimensionIdKey: dimensionInfo2.dimensionIdKey
963
- },
964
- order: 0,
965
- removable: false
966
- });
967
- }
968
- if (periodTypes.has("duration")) {
969
- columns2.push({
970
- id: `duration_${dimensionInfo2.axisId}_${dimensionInfo2.memberId}`,
971
- title: `${dimensionInfo2.memberLabel} (Duration)`,
972
- description: `${periodStartDate} / ${periodEndDate}`,
973
- type: "dimension",
974
- dimensionData: {
975
- dimensionId: `duration_${dimensionInfo2.axisId}_${dimensionInfo2.memberId}`,
1060
+ typedMemberId: dimensionInfo2.typedMemberId,
1061
+ memberLabel: dimensionInfo2.axisLabel
1062
+ }]
1063
+ },
1064
+ order: 0,
1065
+ removable: false
1066
+ });
1067
+ columns2.push({
1068
+ id: "typed-instant",
1069
+ title: `${axisLabel2} [Typed Input Available]`,
1070
+ description: `Typed values as of ${periodStartDate}`,
1071
+ type: "dimension",
1072
+ dimensionData: {
1073
+ dimensionId: "typed-instant",
1074
+ axisId: dimensionInfo2.axisId,
1075
+ memberId: "[typed]",
1076
+ memberValue: "Typed Input",
1077
+ memberLabel: "Typed Input",
1078
+ axis: dimensionInfo2.axisLabel,
1079
+ axisLabel: dimensionInfo2.axisLabel,
1080
+ memberKey: dimensionInfo2.dimensionKey,
1081
+ dimensionIdKey: dimensionInfo2.dimensionIdKey,
1082
+ hasTypedMembers: true,
1083
+ typedMemberId: dimensionInfo2.typedMemberId,
1084
+ typedMembers: [{
976
1085
  axisId: dimensionInfo2.axisId,
977
- memberId: dimensionInfo2.memberId,
978
- memberValue: dimensionInfo2.memberLabel,
979
1086
  axisLabel: dimensionInfo2.axisLabel,
980
- memberLabel: dimensionInfo2.memberLabel,
981
- isTypedMember: true,
982
- dimensionIdKey: dimensionInfo2.dimensionIdKey
983
- },
984
- order: 1,
985
- removable: false
986
- });
987
- }
1087
+ typedMemberId: dimensionInfo2.typedMemberId,
1088
+ memberLabel: dimensionInfo2.axisLabel
1089
+ }]
1090
+ },
1091
+ order: 1,
1092
+ removable: false
1093
+ });
988
1094
  }
1095
+ console.log(`🔤 Generated ${columns2.length} typed dimension columns`);
989
1096
  return columns2;
990
1097
  }
991
1098
  if (!dimension.members || !Array.isArray(dimension.members)) {
992
- console.log(`⚠️ Dimension ${dimension.id} has no members defined, skipping column generation`);
1099
+ console.log(`⚠️ Dimension ${dimension.id} has no members defined and no typed member, skipping column generation`);
993
1100
  return [];
994
1101
  }
995
1102
  console.log(`📊 Found single dimension:`, {
@@ -1000,9 +1107,9 @@ class XBRLFormBuilder {
1000
1107
  if (dimension.members.length === 0) {
1001
1108
  return [];
1002
1109
  }
1003
- const axisLabel = ((_b = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _b.label) || dimension.conceptName;
1110
+ const axisLabel = ((_d = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _d.label) || dimension.conceptName;
1004
1111
  const firstMember = dimension.members[0];
1005
- const memberLabel = ((_c = firstMember.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _c.label) || firstMember.conceptName;
1112
+ const memberLabel = ((_e = firstMember.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _e.label) || firstMember.conceptName;
1006
1113
  const dimensionInfo = {
1007
1114
  axisId: dimension.id,
1008
1115
  axisLabel,
@@ -1036,7 +1143,7 @@ class XBRLFormBuilder {
1036
1143
  } else if (periodTypes.size === 1 && periodTypes.has("instant")) {
1037
1144
  columns.push({
1038
1145
  id: "instant",
1039
- title: `${dimensionInfo.memberLabel} (${this.formatDateForDisplay(periodStartDate)})`,
1146
+ title: `${dimensionInfo.memberLabel}`,
1040
1147
  description: `Values as of ${periodStartDate}`,
1041
1148
  type: "dimension",
1042
1149
  dimensionData: {
@@ -1056,7 +1163,7 @@ class XBRLFormBuilder {
1056
1163
  } else if (periodTypes.size === 1 && periodTypes.has("duration")) {
1057
1164
  columns.push({
1058
1165
  id: "duration",
1059
- title: `${dimensionInfo.memberLabel} (${this.formatDateForDisplay(periodStartDate)} / ${this.formatDateForDisplay(periodEndDate)})`,
1166
+ title: `${dimensionInfo.memberLabel}`,
1060
1167
  description: `Period: ${periodStartDate} to ${periodEndDate}`,
1061
1168
  type: "dimension",
1062
1169
  dimensionData: {
@@ -1076,7 +1183,7 @@ class XBRLFormBuilder {
1076
1183
  } else {
1077
1184
  columns.push({
1078
1185
  id: "duration",
1079
- title: `${dimensionInfo.memberLabel} (${this.formatDateForDisplay(periodStartDate)} / ${this.formatDateForDisplay(periodEndDate)})`,
1186
+ title: `${dimensionInfo.memberLabel}`,
1080
1187
  description: `Period: ${periodStartDate} to ${periodEndDate}`,
1081
1188
  type: "dimension",
1082
1189
  dimensionData: {
@@ -1095,7 +1202,7 @@ class XBRLFormBuilder {
1095
1202
  });
1096
1203
  columns.push({
1097
1204
  id: "instant",
1098
- title: `${dimensionInfo.memberLabel} (${this.formatDateForDisplay(periodStartDate)})`,
1205
+ title: `${dimensionInfo.memberLabel}`,
1099
1206
  description: `Values as of ${periodStartDate}`,
1100
1207
  type: "dimension",
1101
1208
  dimensionData: {
@@ -1120,15 +1227,30 @@ class XBRLFormBuilder {
1120
1227
  */
1121
1228
  static generateMultiDimensionColumns(dimensions, periodStartDate, periodEndDate, periodTypes) {
1122
1229
  console.log(`📊 Processing ${dimensions.length} dimensions for multi-dimensional columns`);
1230
+ console.log(`🔍 [DEBUG] Input dimensions:`, dimensions.map((d2) => {
1231
+ var _a, _b, _c;
1232
+ return {
1233
+ id: d2.id,
1234
+ label: (_b = (_a = d2.labels) == null ? void 0 : _a.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _b.label,
1235
+ membersCount: ((_c = d2.members) == null ? void 0 : _c.length) || 0,
1236
+ hasTypedMember: !!d2.typedMember
1237
+ };
1238
+ }));
1239
+ const hasTypedMembers = dimensions.some((dimension) => dimension.typedMember);
1240
+ if (hasTypedMembers) {
1241
+ console.log(`🔤 Found typed members in dimensions - will indicate in column headers`);
1242
+ }
1123
1243
  const validDimensions = dimensions.filter((dimension) => {
1124
1244
  if (dimension.typedMember) {
1245
+ console.log(`🔤 Keeping typed dimension: ${dimension.id} with typed member: ${dimension.typedMember.id}`);
1125
1246
  return true;
1126
1247
  }
1127
- if (!dimension.members || !Array.isArray(dimension.members) || dimension.members.length === 0) {
1128
- console.log(`⚠️ Skipping dimension ${dimension.id} - no members defined`);
1129
- return false;
1248
+ if (dimension.members && Array.isArray(dimension.members) && dimension.members.length > 0) {
1249
+ console.log(`📂 Keeping domain dimension: ${dimension.id} with ${dimension.members.length} members`);
1250
+ return true;
1130
1251
  }
1131
- return true;
1252
+ console.log(`⚠️ Skipping dimension ${dimension.id} - no members or typed member defined`);
1253
+ return false;
1132
1254
  });
1133
1255
  if (validDimensions.length === 0) {
1134
1256
  console.log(`⚠️ No valid dimensions with members found, skipping multi-dimensional column generation`);
@@ -1138,17 +1260,14 @@ class XBRLFormBuilder {
1138
1260
  var _a;
1139
1261
  const axisLabel = ((_a = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _a.label) || dimension.conceptName;
1140
1262
  if (dimension.typedMember) {
1141
- const typedMemberLabel = dimension.typedMember.id.split("_").pop() || "TypedMember";
1142
1263
  return {
1143
1264
  id: dimension.id,
1144
1265
  axisLabel,
1145
- isTypedDimension: true,
1146
- // Flag to track typed dimensions
1266
+ isTyped: true,
1267
+ typedMemberId: dimension.typedMember.id,
1147
1268
  members: [{
1148
- id: dimension.typedMember.id,
1149
- label: typedMemberLabel,
1150
- isTypedMember: true
1151
- // Flag for the member itself
1269
+ id: "[typed]",
1270
+ label: `${axisLabel} [Typed Input Available]`
1152
1271
  }]
1153
1272
  };
1154
1273
  }
@@ -1156,6 +1275,7 @@ class XBRLFormBuilder {
1156
1275
  return {
1157
1276
  id: dimension.id,
1158
1277
  axisLabel,
1278
+ isTyped: false,
1159
1279
  members: allMembers.map((member) => {
1160
1280
  var _a2;
1161
1281
  return {
@@ -1167,32 +1287,63 @@ class XBRLFormBuilder {
1167
1287
  });
1168
1288
  const combinations = this.generateDimensionCombinations(dimensionInfos);
1169
1289
  console.log(`📊 Generated ${combinations.length} dimension combinations`);
1290
+ console.log(`🔍 [DEBUG] Generated combinations:`, combinations.map((combo) => ({
1291
+ memberLabels: combo.map((c2) => c2.memberLabel),
1292
+ axisIds: combo.map((c2) => c2.axisId),
1293
+ memberIds: combo.map((c2) => c2.memberId)
1294
+ })));
1170
1295
  const columns = [];
1171
1296
  combinations.forEach((combination, index) => {
1297
+ var _a, _b;
1172
1298
  const columnTitle = combination.map((c2) => c2.memberLabel).join(" | ");
1173
- const hasTypedMembers = combination.some((c2) => c2.isTypedMember);
1299
+ const typedMembers = combination.filter((c2) => c2.isTyped);
1300
+ const domainMembers = combination.filter((c2) => !c2.isTyped);
1301
+ console.log(`🔍 [Column ${index}] Combination analysis:`, {
1302
+ totalMembers: combination.length,
1303
+ typedMembers: typedMembers.length,
1304
+ domainMembers: domainMembers.length,
1305
+ hasTypedMembers: typedMembers.length > 0,
1306
+ columnTitle,
1307
+ memberLabels: combination.map((c2) => c2.memberLabel),
1308
+ memberIds: combination.map((c2) => c2.memberId)
1309
+ });
1174
1310
  const dimensionData = {
1175
1311
  dimensionId: `multi_${index}`,
1176
1312
  memberValue: columnTitle,
1177
1313
  // Required field
1178
1314
  memberLabel: columnTitle,
1179
1315
  // Required field
1180
- isTypedMember: hasTypedMembers,
1181
- // Flag if any dimension in combination is typed
1182
- combinations: combination.map((c2) => ({
1316
+ combinations: domainMembers.map((c2) => ({
1183
1317
  axisId: c2.axisId,
1184
1318
  axisLabel: c2.axisLabel,
1185
1319
  memberId: c2.memberId,
1186
- memberLabel: c2.memberLabel,
1187
- isTypedMember: c2.isTypedMember || false
1320
+ memberLabel: c2.memberLabel
1188
1321
  })),
1322
+ // Add typed member information for form fields
1323
+ typedMembers: typedMembers.map((c2) => ({
1324
+ axisId: c2.axisId,
1325
+ axisLabel: c2.axisLabel,
1326
+ typedMemberId: c2.typedMemberId,
1327
+ memberLabel: c2.memberLabel
1328
+ })),
1329
+ hasTypedMembers: typedMembers.length > 0,
1189
1330
  memberKey: columnTitle,
1190
- dimensionIdKey: combination.map((c2) => `${c2.axisId}|${c2.memberId}`).join("::")
1331
+ dimensionIdKey: [
1332
+ ...domainMembers.map((c2) => `${c2.axisId}|${c2.memberId}`),
1333
+ ...typedMembers.map((c2) => `${c2.axisId}|[typed]`)
1334
+ ].join("::")
1191
1335
  };
1336
+ console.log(`🔍 [Column ${index}] Final dimension data:`, {
1337
+ dimensionId: dimensionData.dimensionId,
1338
+ memberLabel: dimensionData.memberLabel,
1339
+ dimensionIdKey: dimensionData.dimensionIdKey,
1340
+ combinationsCount: (_a = dimensionData.combinations) == null ? void 0 : _a.length,
1341
+ typedMembersCount: (_b = dimensionData.typedMembers) == null ? void 0 : _b.length
1342
+ });
1192
1343
  if (periodTypes.size === 0 || periodTypes.size === 1 && periodTypes.has("duration")) {
1193
1344
  columns.push({
1194
1345
  id: `duration_${index}`,
1195
- title: `${columnTitle} (${this.formatDateForDisplay(periodStartDate)} / ${this.formatDateForDisplay(periodEndDate)})`,
1346
+ title: `${columnTitle}`,
1196
1347
  description: `Period: ${periodStartDate} to ${periodEndDate}`,
1197
1348
  type: "dimension",
1198
1349
  dimensionData: {
@@ -1205,7 +1356,7 @@ class XBRLFormBuilder {
1205
1356
  } else if (periodTypes.size === 1 && periodTypes.has("instant")) {
1206
1357
  columns.push({
1207
1358
  id: `instant_${index}`,
1208
- title: `${columnTitle} (${this.formatDateForDisplay(periodStartDate)})`,
1359
+ title: `${columnTitle}`,
1209
1360
  description: `Values as of ${periodStartDate}`,
1210
1361
  type: "dimension",
1211
1362
  dimensionData: {
@@ -1218,7 +1369,7 @@ class XBRLFormBuilder {
1218
1369
  } else {
1219
1370
  columns.push({
1220
1371
  id: `duration_${index}`,
1221
- title: `${columnTitle} (${this.formatDateForDisplay(periodStartDate)} / ${this.formatDateForDisplay(periodEndDate)})`,
1372
+ title: `${columnTitle}`,
1222
1373
  description: `Period: ${periodStartDate} to ${periodEndDate}`,
1223
1374
  type: "dimension",
1224
1375
  dimensionData: {
@@ -1230,7 +1381,7 @@ class XBRLFormBuilder {
1230
1381
  });
1231
1382
  columns.push({
1232
1383
  id: `instant_${index}`,
1233
- title: `${columnTitle} (${this.formatDateForDisplay(periodStartDate)})`,
1384
+ title: `${columnTitle}`,
1234
1385
  description: `Values as of ${periodStartDate}`,
1235
1386
  type: "dimension",
1236
1387
  dimensionData: {
@@ -1272,7 +1423,9 @@ class XBRLFormBuilder {
1272
1423
  axisId: dimensionInfos[0].id,
1273
1424
  axisLabel: dimensionInfos[0].axisLabel,
1274
1425
  memberId: member.id,
1275
- memberLabel: member.label
1426
+ memberLabel: member.label,
1427
+ isTyped: dimensionInfos[0].isTyped || false,
1428
+ typedMemberId: dimensionInfos[0].typedMemberId
1276
1429
  }]);
1277
1430
  }
1278
1431
  const [firstDimension, ...restDimensions] = dimensionInfos;
@@ -1284,7 +1437,9 @@ class XBRLFormBuilder {
1284
1437
  axisId: firstDimension.id,
1285
1438
  axisLabel: firstDimension.axisLabel,
1286
1439
  memberId: member.id,
1287
- memberLabel: member.label
1440
+ memberLabel: member.label,
1441
+ isTyped: firstDimension.isTyped || false,
1442
+ typedMemberId: firstDimension.typedMemberId
1288
1443
  }]);
1289
1444
  } else {
1290
1445
  restCombinations.forEach((restCombination) => {
@@ -1293,7 +1448,9 @@ class XBRLFormBuilder {
1293
1448
  axisId: firstDimension.id,
1294
1449
  axisLabel: firstDimension.axisLabel,
1295
1450
  memberId: member.id,
1296
- memberLabel: member.label
1451
+ memberLabel: member.label,
1452
+ isTyped: firstDimension.isTyped || false,
1453
+ typedMemberId: firstDimension.typedMemberId
1297
1454
  },
1298
1455
  ...restCombination
1299
1456
  ]);
@@ -1355,15 +1512,15 @@ class XBRLFormBuilder {
1355
1512
  }];
1356
1513
  }
1357
1514
  }
1358
- var __defProp$4 = Object.defineProperty;
1359
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
1360
- var __decorateClass$4 = (decorators, target, key, kind) => {
1361
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
1515
+ var __defProp$5 = Object.defineProperty;
1516
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
1517
+ var __decorateClass$5 = (decorators, target, key, kind) => {
1518
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
1362
1519
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1363
1520
  if (decorator = decorators[i2])
1364
1521
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1365
1522
  if (kind && result)
1366
- __defProp$4(target, key, result);
1523
+ __defProp$5(target, key, result);
1367
1524
  return result;
1368
1525
  };
1369
1526
  let JupiterFormField = class extends LitElement {
@@ -1668,45 +1825,45 @@ JupiterFormField.styles = css`
1668
1825
  width: auto;
1669
1826
  }
1670
1827
  `;
1671
- __decorateClass$4([
1672
- n2({ type: Object })
1828
+ __decorateClass$5([
1829
+ n$1({ type: Object })
1673
1830
  ], JupiterFormField.prototype, "field", 2);
1674
- __decorateClass$4([
1675
- n2({ type: String })
1831
+ __decorateClass$5([
1832
+ n$1({ type: String })
1676
1833
  ], JupiterFormField.prototype, "conceptId", 2);
1677
- __decorateClass$4([
1678
- n2({ type: String })
1834
+ __decorateClass$5([
1835
+ n$1({ type: String })
1679
1836
  ], JupiterFormField.prototype, "columnId", 2);
1680
- __decorateClass$4([
1681
- n2()
1837
+ __decorateClass$5([
1838
+ n$1()
1682
1839
  ], JupiterFormField.prototype, "value", 2);
1683
- __decorateClass$4([
1684
- n2({ type: Boolean })
1840
+ __decorateClass$5([
1841
+ n$1({ type: Boolean })
1685
1842
  ], JupiterFormField.prototype, "disabled", 2);
1686
- __decorateClass$4([
1687
- n2({ type: String })
1843
+ __decorateClass$5([
1844
+ n$1({ type: String })
1688
1845
  ], JupiterFormField.prototype, "locale", 2);
1689
- __decorateClass$4([
1690
- n2({ type: Boolean })
1846
+ __decorateClass$5([
1847
+ n$1({ type: Boolean })
1691
1848
  ], JupiterFormField.prototype, "hideLabel", 2);
1692
- __decorateClass$4([
1693
- r()
1849
+ __decorateClass$5([
1850
+ r$1()
1694
1851
  ], JupiterFormField.prototype, "_errors", 2);
1695
- __decorateClass$4([
1696
- r()
1852
+ __decorateClass$5([
1853
+ r$1()
1697
1854
  ], JupiterFormField.prototype, "_touched", 2);
1698
- JupiterFormField = __decorateClass$4([
1699
- t$1("jupiter-form-field")
1855
+ JupiterFormField = __decorateClass$5([
1856
+ t$3("jupiter-form-field")
1700
1857
  ], JupiterFormField);
1701
- var __defProp$3 = Object.defineProperty;
1702
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
1703
- var __decorateClass$3 = (decorators, target, key, kind) => {
1704
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
1858
+ var __defProp$4 = Object.defineProperty;
1859
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
1860
+ var __decorateClass$4 = (decorators, target, key, kind) => {
1861
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
1705
1862
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1706
1863
  if (decorator = decorators[i2])
1707
1864
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1708
1865
  if (kind && result)
1709
- __defProp$3(target, key, result);
1866
+ __defProp$4(target, key, result);
1710
1867
  return result;
1711
1868
  };
1712
1869
  let JupiterConceptTree = class extends LitElement {
@@ -1899,40 +2056,42 @@ JupiterConceptTree.styles = css`
1899
2056
  .children-wrapper {
1900
2057
  display: none;
1901
2058
  }
2059
+
2060
+
1902
2061
  `;
1903
- __decorateClass$3([
1904
- n2({ type: Object })
2062
+ __decorateClass$4([
2063
+ n$1({ type: Object })
1905
2064
  ], JupiterConceptTree.prototype, "concept", 2);
1906
- __decorateClass$3([
1907
- n2({ type: Array })
2065
+ __decorateClass$4([
2066
+ n$1({ type: Array })
1908
2067
  ], JupiterConceptTree.prototype, "columns", 2);
1909
- __decorateClass$3([
1910
- n2({ type: Object })
2068
+ __decorateClass$4([
2069
+ n$1({ type: Object })
1911
2070
  ], JupiterConceptTree.prototype, "formData", 2);
1912
- __decorateClass$3([
1913
- n2({ type: Boolean })
2071
+ __decorateClass$4([
2072
+ n$1({ type: Boolean })
1914
2073
  ], JupiterConceptTree.prototype, "disabled", 2);
1915
- __decorateClass$3([
1916
- n2({ type: String })
2074
+ __decorateClass$4([
2075
+ n$1({ type: String })
1917
2076
  ], JupiterConceptTree.prototype, "locale", 2);
1918
- __decorateClass$3([
1919
- n2({ type: Set })
2077
+ __decorateClass$4([
2078
+ n$1({ type: Set })
1920
2079
  ], JupiterConceptTree.prototype, "expandedConcepts", 2);
1921
- __decorateClass$3([
1922
- r()
2080
+ __decorateClass$4([
2081
+ r$1()
1923
2082
  ], JupiterConceptTree.prototype, "_expanded", 2);
1924
- JupiterConceptTree = __decorateClass$3([
1925
- t$1("jupiter-concept-tree")
2083
+ JupiterConceptTree = __decorateClass$4([
2084
+ t$3("jupiter-concept-tree")
1926
2085
  ], JupiterConceptTree);
1927
- var __defProp$2 = Object.defineProperty;
1928
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
1929
- var __decorateClass$2 = (decorators, target, key, kind) => {
1930
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
2086
+ var __defProp$3 = Object.defineProperty;
2087
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
2088
+ var __decorateClass$3 = (decorators, target, key, kind) => {
2089
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
1931
2090
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1932
2091
  if (decorator = decorators[i2])
1933
2092
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1934
2093
  if (kind && result)
1935
- __defProp$2(target, key, result);
2094
+ __defProp$3(target, key, result);
1936
2095
  return result;
1937
2096
  };
1938
2097
  let JupiterAddColumnDialog = class extends LitElement {
@@ -2230,36 +2389,36 @@ JupiterAddColumnDialog.styles = css`
2230
2389
  cursor: not-allowed;
2231
2390
  }
2232
2391
  `;
2233
- __decorateClass$2([
2234
- n2({ type: String })
2392
+ __decorateClass$3([
2393
+ n$1({ type: String })
2235
2394
  ], JupiterAddColumnDialog.prototype, "periodType", 2);
2236
- __decorateClass$2([
2237
- n2({ type: Boolean })
2395
+ __decorateClass$3([
2396
+ n$1({ type: Boolean })
2238
2397
  ], JupiterAddColumnDialog.prototype, "open", 2);
2239
- __decorateClass$2([
2240
- r()
2398
+ __decorateClass$3([
2399
+ r$1()
2241
2400
  ], JupiterAddColumnDialog.prototype, "_startDate", 2);
2242
- __decorateClass$2([
2243
- r()
2401
+ __decorateClass$3([
2402
+ r$1()
2244
2403
  ], JupiterAddColumnDialog.prototype, "_endDate", 2);
2245
- __decorateClass$2([
2246
- r()
2404
+ __decorateClass$3([
2405
+ r$1()
2247
2406
  ], JupiterAddColumnDialog.prototype, "_instantDate", 2);
2248
- __decorateClass$2([
2249
- r()
2407
+ __decorateClass$3([
2408
+ r$1()
2250
2409
  ], JupiterAddColumnDialog.prototype, "_selectedType", 2);
2251
- JupiterAddColumnDialog = __decorateClass$2([
2252
- t$1("jupiter-add-column-dialog")
2410
+ JupiterAddColumnDialog = __decorateClass$3([
2411
+ t$3("jupiter-add-column-dialog")
2253
2412
  ], JupiterAddColumnDialog);
2254
- var __defProp$1 = Object.defineProperty;
2255
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
2256
- var __decorateClass$1 = (decorators, target, key, kind) => {
2257
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
2413
+ var __defProp$2 = Object.defineProperty;
2414
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
2415
+ var __decorateClass$2 = (decorators, target, key, kind) => {
2416
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
2258
2417
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2259
2418
  if (decorator = decorators[i2])
2260
2419
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2261
2420
  if (kind && result)
2262
- __defProp$1(target, key, result);
2421
+ __defProp$2(target, key, result);
2263
2422
  return result;
2264
2423
  };
2265
2424
  let JupiterFormSection = class extends LitElement {
@@ -2267,13 +2426,13 @@ let JupiterFormSection = class extends LitElement {
2267
2426
  super(...arguments);
2268
2427
  this.columns = [];
2269
2428
  this.formData = {};
2429
+ this.typedMemberData = {};
2270
2430
  this.disabled = false;
2271
2431
  this.collapsible = true;
2272
2432
  this.locale = "en-US";
2273
2433
  this._expanded = true;
2274
2434
  this._showAddColumnDialog = false;
2275
2435
  this._sectionPeriodType = "duration";
2276
- this._typedMemberValues = {};
2277
2436
  this._expandedConcepts = /* @__PURE__ */ new Set();
2278
2437
  }
2279
2438
  connectedCallback() {
@@ -2401,14 +2560,6 @@ let JupiterFormSection = class extends LitElement {
2401
2560
  bubbles: true
2402
2561
  }));
2403
2562
  }
2404
- _handleTypedMemberValueChange(columnId, value) {
2405
- this._typedMemberValues[columnId] = value;
2406
- this.dispatchEvent(new CustomEvent("typed-member-change", {
2407
- detail: { columnId, value, sectionId: this.section.id },
2408
- bubbles: true
2409
- }));
2410
- this.requestUpdate();
2411
- }
2412
2563
  _flattenConcepts(concepts, expanded = /* @__PURE__ */ new Set()) {
2413
2564
  const result = [];
2414
2565
  for (const concept of concepts) {
@@ -2434,6 +2585,23 @@ let JupiterFormSection = class extends LitElement {
2434
2585
  bubbles: true
2435
2586
  }));
2436
2587
  }
2588
+ _getTypedMemberHeaderValue(columnId, axisId) {
2589
+ var _a;
2590
+ return ((_a = this.typedMemberData[columnId]) == null ? void 0 : _a[axisId]) || "";
2591
+ }
2592
+ _handleTypedMemberHeaderChange(event, columnId, axisId) {
2593
+ const target = event.target;
2594
+ const value = target.value;
2595
+ console.log(`🔍 [FormSection] Typed member header change: columnId=${columnId}, axisId=${axisId}, value=${value}`);
2596
+ this.dispatchEvent(new CustomEvent("typed-member-change", {
2597
+ detail: {
2598
+ columnId,
2599
+ axisId,
2600
+ value
2601
+ },
2602
+ bubbles: true
2603
+ }));
2604
+ }
2437
2605
  render() {
2438
2606
  if (!this.section.concepts || this.section.concepts.length === 0) {
2439
2607
  return html`
@@ -2478,32 +2646,43 @@ let JupiterFormSection = class extends LitElement {
2478
2646
  <tr class="header-row">
2479
2647
  <th class="header-cell concept-column">Concept</th>
2480
2648
  ${this.columns.map((column) => {
2481
- var _a;
2649
+ var _a, _b, _c;
2482
2650
  return html`
2483
2651
  <th class="header-cell ${column.removable ? "removable" : ""}">
2484
- ${column.title}
2485
- ${column.description ? html`<div style="font-weight: normal; font-size: 12px; color: var(--jupiter-text-secondary, #666);">${column.description}</div>` : ""}
2486
- ${((_a = column.dimensionData) == null ? void 0 : _a.isTypedMember) ? html`
2487
- <div style="margin-top: 8px;">
2488
- <input
2489
- type="text"
2490
- placeholder="Enter typed member value"
2491
- .value="${this._typedMemberValues[column.id] || ""}"
2492
- @input="${(e2) => this._handleTypedMemberValueChange(column.id, e2.target.value)}"
2493
- style="width: 100%; padding: 4px; border: 1px solid #ccc; border-radius: 3px; font-size: 12px;"
2494
- />
2652
+ <div class="column-header-content">
2653
+ <div class="column-title">
2654
+ ${column.title}
2655
+ ${column.description ? html`<div style="font-weight: normal; font-size: 12px; color: var(--jupiter-text-secondary, #666);">${column.description}</div>` : ""}
2495
2656
  </div>
2496
- ` : ""}
2497
- ${column.removable ? html`
2498
- <button
2499
- class="remove-column-btn"
2500
- @click="${(e2) => {
2657
+
2658
+ <!-- Typed member input fields in column header -->
2659
+ ${((_a = column.dimensionData) == null ? void 0 : _a.hasTypedMembers) ? html`
2660
+ <div class="typed-members-header">
2661
+ ${(_c = (_b = column.dimensionData) == null ? void 0 : _b.typedMembers) == null ? void 0 : _c.map((typedMember) => html`
2662
+ <div class="typed-member-header-input">
2663
+ <input
2664
+ type="text"
2665
+ class="typed-member-header-field"
2666
+ placeholder="Enter ${typedMember.axisLabel}"
2667
+ .value="${this._getTypedMemberHeaderValue(column.id, typedMember.axisId)}"
2668
+ @input="${(e2) => this._handleTypedMemberHeaderChange(e2, column.id, typedMember.axisId)}"
2669
+ />
2670
+ </div>
2671
+ `)}
2672
+ </div>
2673
+ ` : ""}
2674
+
2675
+ ${column.removable ? html`
2676
+ <button
2677
+ class="remove-column-btn"
2678
+ @click="${(e2) => {
2501
2679
  e2.stopPropagation();
2502
2680
  this._handleRemoveColumn(column.id);
2503
2681
  }}"
2504
- title="Remove column"
2505
- >×</button>
2506
- ` : ""}
2682
+ title="Remove column"
2683
+ >×</button>
2684
+ ` : ""}
2685
+ </div>
2507
2686
  </th>
2508
2687
  `;
2509
2688
  })}
@@ -2705,6 +2884,63 @@ JupiterFormSection.styles = css`
2705
2884
  background: var(--jupiter-primary-color-dark, #5a6fd8);
2706
2885
  }
2707
2886
 
2887
+ /* Column header content styling */
2888
+ .column-header-content {
2889
+ display: flex;
2890
+ flex-direction: column;
2891
+ gap: 8px;
2892
+ align-items: center;
2893
+ }
2894
+
2895
+ .column-title {
2896
+ text-align: center;
2897
+ }
2898
+
2899
+ /* Typed member header input styles */
2900
+ .typed-members-header {
2901
+ display: flex;
2902
+ flex-direction: column;
2903
+ gap: 4px;
2904
+ width: 100%;
2905
+ padding: 8px;
2906
+ background: var(--jupiter-typed-member-header-background, #f8f9fa);
2907
+ border-radius: 4px;
2908
+ border: 1px solid var(--jupiter-border-color, #e0e0e0);
2909
+ }
2910
+
2911
+ .typed-member-header-input {
2912
+ display: flex;
2913
+ flex-direction: column;
2914
+ gap: 2px;
2915
+ }
2916
+
2917
+ .typed-member-header-label {
2918
+ font-size: 11px;
2919
+ font-weight: 500;
2920
+ color: var(--jupiter-text-secondary, #666);
2921
+ text-align: left;
2922
+ }
2923
+
2924
+ .typed-member-header-field {
2925
+ width: 100%;
2926
+ padding: 4px 6px;
2927
+ border: 1px solid var(--jupiter-border-color, #ddd);
2928
+ border-radius: 3px;
2929
+ font-size: 12px;
2930
+ background: var(--jupiter-input-background, #fff);
2931
+ }
2932
+
2933
+ .typed-member-header-field:focus {
2934
+ outline: none;
2935
+ border-color: var(--jupiter-primary-color, #1976d2);
2936
+ box-shadow: 0 0 0 1px var(--jupiter-primary-color, #1976d2);
2937
+ }
2938
+
2939
+ .typed-member-header-field::placeholder {
2940
+ color: var(--jupiter-text-placeholder, #999);
2941
+ font-size: 11px;
2942
+ }
2943
+
2708
2944
  .empty-section {
2709
2945
  padding: 24px;
2710
2946
  text-align: center;
@@ -2712,71 +2948,964 @@ JupiterFormSection.styles = css`
2712
2948
  font-style: italic;
2713
2949
  }
2714
2950
  `;
2715
- __decorateClass$1([
2716
- n2({ type: Object })
2951
+ __decorateClass$2([
2952
+ n$1({ type: Object })
2717
2953
  ], JupiterFormSection.prototype, "section", 2);
2718
- __decorateClass$1([
2719
- n2({ type: Array })
2954
+ __decorateClass$2([
2955
+ n$1({ type: Array })
2720
2956
  ], JupiterFormSection.prototype, "columns", 2);
2721
- __decorateClass$1([
2722
- n2({ type: Object })
2957
+ __decorateClass$2([
2958
+ n$1({ type: Object })
2723
2959
  ], JupiterFormSection.prototype, "formData", 2);
2724
- __decorateClass$1([
2725
- n2({ type: Boolean })
2960
+ __decorateClass$2([
2961
+ n$1({ type: Object })
2962
+ ], JupiterFormSection.prototype, "typedMemberData", 2);
2963
+ __decorateClass$2([
2964
+ n$1({ type: Boolean })
2726
2965
  ], JupiterFormSection.prototype, "disabled", 2);
2727
- __decorateClass$1([
2728
- n2({ type: Boolean })
2966
+ __decorateClass$2([
2967
+ n$1({ type: Boolean })
2729
2968
  ], JupiterFormSection.prototype, "collapsible", 2);
2730
- __decorateClass$1([
2731
- n2({ type: String })
2969
+ __decorateClass$2([
2970
+ n$1({ type: String })
2732
2971
  ], JupiterFormSection.prototype, "locale", 2);
2733
- __decorateClass$1([
2734
- r()
2972
+ __decorateClass$2([
2973
+ r$1()
2735
2974
  ], JupiterFormSection.prototype, "_expanded", 2);
2736
- __decorateClass$1([
2737
- r()
2975
+ __decorateClass$2([
2976
+ r$1()
2738
2977
  ], JupiterFormSection.prototype, "_showAddColumnDialog", 2);
2739
- __decorateClass$1([
2740
- r()
2978
+ __decorateClass$2([
2979
+ r$1()
2741
2980
  ], JupiterFormSection.prototype, "_sectionPeriodType", 2);
2742
- __decorateClass$1([
2743
- r()
2744
- ], JupiterFormSection.prototype, "_typedMemberValues", 2);
2745
- __decorateClass$1([
2746
- r()
2981
+ __decorateClass$2([
2982
+ r$1()
2747
2983
  ], JupiterFormSection.prototype, "_expandedConcepts", 2);
2748
- JupiterFormSection = __decorateClass$1([
2749
- t$1("jupiter-form-section")
2984
+ JupiterFormSection = __decorateClass$2([
2985
+ t$3("jupiter-form-section")
2750
2986
  ], JupiterFormSection);
2751
- var __defProp = Object.defineProperty;
2752
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2753
- var __decorateClass = (decorators, target, key, kind) => {
2754
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
2755
- for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2756
- if (decorator = decorators[i2])
2757
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2758
- if (kind && result)
2759
- __defProp(target, key, result);
2760
- return result;
2987
+ /**
2988
+ * @license
2989
+ * Copyright 2017 Google LLC
2990
+ * SPDX-License-Identifier: BSD-3-Clause
2991
+ */
2992
+ const t$1 = globalThis, i$1 = t$1.trustedTypes, s = i$1 ? i$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$2 = "$lit$", h = `lit$${Math.random().toFixed(9).slice(2)}$`, o$1 = "?" + h, n2 = `<${o$1}>`, r = document, l = () => r.createComment(""), c = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, a = Array.isArray, u = (t2) => a(t2) || "function" == typeof (t2 == null ? void 0 : t2[Symbol.iterator]), d = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^
2993
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r.createTreeWalker(r, 129);
2994
+ function P(t2, i2) {
2995
+ if (!a(t2) || !t2.hasOwnProperty("raw"))
2996
+ throw Error("invalid template strings array");
2997
+ return void 0 !== s ? s.createHTML(i2) : i2;
2998
+ }
2999
+ const V = (t2, i2) => {
3000
+ const s2 = t2.length - 1, o2 = [];
3001
+ let r2, l2 = 2 === i2 ? "<svg>" : 3 === i2 ? "<math>" : "", c2 = f;
3002
+ for (let i3 = 0; i3 < s2; i3++) {
3003
+ const s3 = t2[i3];
3004
+ let a2, u2, d2 = -1, y2 = 0;
3005
+ for (; y2 < s3.length && (c2.lastIndex = y2, u2 = c2.exec(s3), null !== u2); )
3006
+ y2 = c2.lastIndex, c2 === f ? "!--" === u2[1] ? c2 = v : void 0 !== u2[1] ? c2 = _ : void 0 !== u2[2] ? ($.test(u2[2]) && (r2 = RegExp("</" + u2[2], "g")), c2 = m) : void 0 !== u2[3] && (c2 = m) : c2 === m ? ">" === u2[0] ? (c2 = r2 ?? f, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? m : '"' === u2[3] ? g : p) : c2 === g || c2 === p ? c2 = m : c2 === v || c2 === _ ? c2 = f : (c2 = m, r2 = void 0);
3007
+ const x = c2 === m && t2[i3 + 1].startsWith("/>") ? " " : "";
3008
+ l2 += c2 === f ? s3 + n2 : d2 >= 0 ? (o2.push(a2), s3.slice(0, d2) + e$2 + s3.slice(d2) + h + x) : s3 + h + (-2 === d2 ? i3 : x);
3009
+ }
3010
+ return [P(t2, l2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : 3 === i2 ? "</math>" : "")), o2];
2761
3011
  };
2762
- let JupiterDynamicForm = class extends LitElement {
2763
- constructor() {
2764
- super(...arguments);
2765
- this.config = {};
2766
- this.initialData = {};
2767
- this.disabled = false;
2768
- this.readonly = false;
2769
- this.periodStartDate = "2025-01-01";
2770
- this.periodEndDate = "2025-12-31";
2771
- this._formData = {};
2772
- this._columns = [];
2773
- this._errors = [];
2774
- this._touched = /* @__PURE__ */ new Set();
2775
- this._dirty = false;
2776
- this._valid = true;
2777
- this._submitted = false;
2778
- this._typedMemberValues = {};
2779
- }
3012
+ class N {
3013
+ constructor({ strings: t2, _$litType$: s2 }, n3) {
3014
+ let r2;
3015
+ this.parts = [];
3016
+ let c2 = 0, a2 = 0;
3017
+ const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = V(t2, s2);
3018
+ if (this.el = N.createElement(f2, n3), C.currentNode = this.el.content, 2 === s2 || 3 === s2) {
3019
+ const t3 = this.el.content.firstChild;
3020
+ t3.replaceWith(...t3.childNodes);
3021
+ }
3022
+ for (; null !== (r2 = C.nextNode()) && d2.length < u2; ) {
3023
+ if (1 === r2.nodeType) {
3024
+ if (r2.hasAttributes())
3025
+ for (const t3 of r2.getAttributeNames())
3026
+ if (t3.endsWith(e$2)) {
3027
+ const i2 = v2[a2++], s3 = r2.getAttribute(t3).split(h), e2 = /([.?@])?(.*)/.exec(i2);
3028
+ d2.push({ type: 1, index: c2, name: e2[2], strings: s3, ctor: "." === e2[1] ? H : "?" === e2[1] ? I : "@" === e2[1] ? L : k }), r2.removeAttribute(t3);
3029
+ } else
3030
+ t3.startsWith(h) && (d2.push({ type: 6, index: c2 }), r2.removeAttribute(t3));
3031
+ if ($.test(r2.tagName)) {
3032
+ const t3 = r2.textContent.split(h), s3 = t3.length - 1;
3033
+ if (s3 > 0) {
3034
+ r2.textContent = i$1 ? i$1.emptyScript : "";
3035
+ for (let i2 = 0; i2 < s3; i2++)
3036
+ r2.append(t3[i2], l()), C.nextNode(), d2.push({ type: 2, index: ++c2 });
3037
+ r2.append(t3[s3], l());
3038
+ }
3039
+ }
3040
+ } else if (8 === r2.nodeType)
3041
+ if (r2.data === o$1)
3042
+ d2.push({ type: 2, index: c2 });
3043
+ else {
3044
+ let t3 = -1;
3045
+ for (; -1 !== (t3 = r2.data.indexOf(h, t3 + 1)); )
3046
+ d2.push({ type: 7, index: c2 }), t3 += h.length - 1;
3047
+ }
3048
+ c2++;
3049
+ }
3050
+ }
3051
+ static createElement(t2, i2) {
3052
+ const s2 = r.createElement("template");
3053
+ return s2.innerHTML = t2, s2;
3054
+ }
3055
+ }
3056
+ function S(t2, i2, s2 = t2, e2) {
3057
+ var _a, _b;
3058
+ if (i2 === T)
3059
+ return i2;
3060
+ let h2 = void 0 !== e2 ? (_a = s2._$Co) == null ? void 0 : _a[e2] : s2._$Cl;
3061
+ const o2 = c(i2) ? void 0 : i2._$litDirective$;
3062
+ return (h2 == null ? void 0 : h2.constructor) !== o2 && ((_b = h2 == null ? void 0 : h2._$AO) == null ? void 0 : _b.call(h2, false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ?? (s2._$Co = []))[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i2 = S(t2, h2._$AS(t2, i2.values), h2, e2)), i2;
3063
+ }
3064
+ class M {
3065
+ constructor(t2, i2) {
3066
+ this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
3067
+ }
3068
+ get parentNode() {
3069
+ return this._$AM.parentNode;
3070
+ }
3071
+ get _$AU() {
3072
+ return this._$AM._$AU;
3073
+ }
3074
+ u(t2) {
3075
+ const { el: { content: i2 }, parts: s2 } = this._$AD, e2 = ((t2 == null ? void 0 : t2.creationScope) ?? r).importNode(i2, true);
3076
+ C.currentNode = e2;
3077
+ let h2 = C.nextNode(), o2 = 0, n3 = 0, l2 = s2[0];
3078
+ for (; void 0 !== l2; ) {
3079
+ if (o2 === l2.index) {
3080
+ let i3;
3081
+ 2 === l2.type ? i3 = new R(h2, h2.nextSibling, this, t2) : 1 === l2.type ? i3 = new l2.ctor(h2, l2.name, l2.strings, this, t2) : 6 === l2.type && (i3 = new z(h2, this, t2)), this._$AV.push(i3), l2 = s2[++n3];
3082
+ }
3083
+ o2 !== (l2 == null ? void 0 : l2.index) && (h2 = C.nextNode(), o2++);
3084
+ }
3085
+ return C.currentNode = r, e2;
3086
+ }
3087
+ p(t2) {
3088
+ let i2 = 0;
3089
+ for (const s2 of this._$AV)
3090
+ void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
3091
+ }
3092
+ }
3093
+ class R {
3094
+ get _$AU() {
3095
+ var _a;
3096
+ return ((_a = this._$AM) == null ? void 0 : _a._$AU) ?? this._$Cv;
3097
+ }
3098
+ constructor(t2, i2, s2, e2) {
3099
+ this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cv = (e2 == null ? void 0 : e2.isConnected) ?? true;
3100
+ }
3101
+ get parentNode() {
3102
+ let t2 = this._$AA.parentNode;
3103
+ const i2 = this._$AM;
3104
+ return void 0 !== i2 && 11 === (t2 == null ? void 0 : t2.nodeType) && (t2 = i2.parentNode), t2;
3105
+ }
3106
+ get startNode() {
3107
+ return this._$AA;
3108
+ }
3109
+ get endNode() {
3110
+ return this._$AB;
3111
+ }
3112
+ _$AI(t2, i2 = this) {
3113
+ t2 = S(this, t2, i2), c(t2) ? t2 === E || null == t2 || "" === t2 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t2 !== this._$AH && t2 !== T && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : u(t2) ? this.k(t2) : this._(t2);
3114
+ }
3115
+ O(t2) {
3116
+ return this._$AA.parentNode.insertBefore(t2, this._$AB);
3117
+ }
3118
+ T(t2) {
3119
+ this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
3120
+ }
3121
+ _(t2) {
3122
+ this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(r.createTextNode(t2)), this._$AH = t2;
3123
+ }
3124
+ $(t2) {
3125
+ var _a;
3126
+ const { values: i2, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = N.createElement(P(s2.h, s2.h[0]), this.options)), s2);
3127
+ if (((_a = this._$AH) == null ? void 0 : _a._$AD) === e2)
3128
+ this._$AH.p(i2);
3129
+ else {
3130
+ const t3 = new M(e2, this), s3 = t3.u(this.options);
3131
+ t3.p(i2), this.T(s3), this._$AH = t3;
3132
+ }
3133
+ }
3134
+ _$AC(t2) {
3135
+ let i2 = A.get(t2.strings);
3136
+ return void 0 === i2 && A.set(t2.strings, i2 = new N(t2)), i2;
3137
+ }
3138
+ k(t2) {
3139
+ a(this._$AH) || (this._$AH = [], this._$AR());
3140
+ const i2 = this._$AH;
3141
+ let s2, e2 = 0;
3142
+ for (const h2 of t2)
3143
+ e2 === i2.length ? i2.push(s2 = new R(this.O(l()), this.O(l()), this, this.options)) : s2 = i2[e2], s2._$AI(h2), e2++;
3144
+ e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
3145
+ }
3146
+ _$AR(t2 = this._$AA.nextSibling, i2) {
3147
+ var _a;
3148
+ for ((_a = this._$AP) == null ? void 0 : _a.call(this, false, true, i2); t2 !== this._$AB; ) {
3149
+ const i3 = t2.nextSibling;
3150
+ t2.remove(), t2 = i3;
3151
+ }
3152
+ }
3153
+ setConnected(t2) {
3154
+ var _a;
3155
+ void 0 === this._$AM && (this._$Cv = t2, (_a = this._$AP) == null ? void 0 : _a.call(this, t2));
3156
+ }
3157
+ }
3158
+ class k {
3159
+ get tagName() {
3160
+ return this.element.tagName;
3161
+ }
3162
+ get _$AU() {
3163
+ return this._$AM._$AU;
3164
+ }
3165
+ constructor(t2, i2, s2, e2, h2) {
3166
+ this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = E;
3167
+ }
3168
+ _$AI(t2, i2 = this, s2, e2) {
3169
+ const h2 = this.strings;
3170
+ let o2 = false;
3171
+ if (void 0 === h2)
3172
+ t2 = S(this, t2, i2, 0), o2 = !c(t2) || t2 !== this._$AH && t2 !== T, o2 && (this._$AH = t2);
3173
+ else {
3174
+ const e3 = t2;
3175
+ let n3, r2;
3176
+ for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++)
3177
+ r2 = S(this, e3[s2 + n3], i2, n3), r2 === T && (r2 = this._$AH[n3]), o2 || (o2 = !c(r2) || r2 !== this._$AH[n3]), r2 === E ? t2 = E : t2 !== E && (t2 += (r2 ?? "") + h2[n3 + 1]), this._$AH[n3] = r2;
3178
+ }
3179
+ o2 && !e2 && this.j(t2);
3180
+ }
3181
+ j(t2) {
3182
+ t2 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
3183
+ }
3184
+ }
3185
+ class H extends k {
3186
+ constructor() {
3187
+ super(...arguments), this.type = 3;
3188
+ }
3189
+ j(t2) {
3190
+ this.element[this.name] = t2 === E ? void 0 : t2;
3191
+ }
3192
+ }
3193
+ class I extends k {
3194
+ constructor() {
3195
+ super(...arguments), this.type = 4;
3196
+ }
3197
+ j(t2) {
3198
+ this.element.toggleAttribute(this.name, !!t2 && t2 !== E);
3199
+ }
3200
+ }
3201
+ class L extends k {
3202
+ constructor(t2, i2, s2, e2, h2) {
3203
+ super(t2, i2, s2, e2, h2), this.type = 5;
3204
+ }
3205
+ _$AI(t2, i2 = this) {
3206
+ if ((t2 = S(this, t2, i2, 0) ?? E) === T)
3207
+ return;
3208
+ const s2 = this._$AH, e2 = t2 === E && s2 !== E || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== E && (s2 === E || e2);
3209
+ e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
3210
+ }
3211
+ handleEvent(t2) {
3212
+ var _a;
3213
+ "function" == typeof this._$AH ? this._$AH.call(((_a = this.options) == null ? void 0 : _a.host) ?? this.element, t2) : this._$AH.handleEvent(t2);
3214
+ }
3215
+ }
3216
+ class z {
3217
+ constructor(t2, i2, s2) {
3218
+ this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
3219
+ }
3220
+ get _$AU() {
3221
+ return this._$AM._$AU;
3222
+ }
3223
+ _$AI(t2) {
3224
+ S(this, t2);
3225
+ }
3226
+ }
3227
+ const j = t$1.litHtmlPolyfillSupport;
3228
+ j == null ? void 0 : j(N, R), (t$1.litHtmlVersions ?? (t$1.litHtmlVersions = [])).push("3.3.1");
3229
+ /**
3230
+ * @license
3231
+ * Copyright 2017 Google LLC
3232
+ * SPDX-License-Identifier: BSD-3-Clause
3233
+ */
3234
+ const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e$1 = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
3235
+ class i {
3236
+ constructor(t2) {
3237
+ }
3238
+ get _$AU() {
3239
+ return this._$AM._$AU;
3240
+ }
3241
+ _$AT(t2, e2, i2) {
3242
+ this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
3243
+ }
3244
+ _$AS(t2, e2) {
3245
+ return this.update(t2, e2);
3246
+ }
3247
+ update(t2, e2) {
3248
+ return this.render(...e2);
3249
+ }
3250
+ }
3251
+ /**
3252
+ * @license
3253
+ * Copyright 2017 Google LLC
3254
+ * SPDX-License-Identifier: BSD-3-Clause
3255
+ */
3256
+ class e extends i {
3257
+ constructor(i2) {
3258
+ if (super(i2), this.it = E, i2.type !== t.CHILD)
3259
+ throw Error(this.constructor.directiveName + "() can only be used in child bindings");
3260
+ }
3261
+ render(r2) {
3262
+ if (r2 === E || null == r2)
3263
+ return this._t = void 0, this.it = r2;
3264
+ if (r2 === T)
3265
+ return r2;
3266
+ if ("string" != typeof r2)
3267
+ throw Error(this.constructor.directiveName + "() called with a non-string value");
3268
+ if (r2 === this.it)
3269
+ return this._t;
3270
+ this.it = r2;
3271
+ const s2 = [r2];
3272
+ return s2.raw = s2, this._t = { _$litType$: this.constructor.resultType, strings: s2, values: [] };
3273
+ }
3274
+ }
3275
+ e.directiveName = "unsafeHTML", e.resultType = 1;
3276
+ const o = e$1(e);
3277
+ var __defProp$1 = Object.defineProperty;
3278
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
3279
+ var __decorateClass$1 = (decorators, target, key, kind) => {
3280
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
3281
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
3282
+ if (decorator = decorators[i2])
3283
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
3284
+ if (kind && result)
3285
+ __defProp$1(target, key, result);
3286
+ return result;
3287
+ };
3288
+ let JupiterFilterRolesDialog = class extends LitElement {
3289
+ constructor() {
3290
+ super(...arguments);
3291
+ this.open = false;
3292
+ this.availableRoles = [];
3293
+ this.selectedRoleIds = [];
3294
+ this._tempSelectedRoles = /* @__PURE__ */ new Set();
3295
+ this._searchQuery = "";
3296
+ this._filteredRoles = [];
3297
+ }
3298
+ connectedCallback() {
3299
+ super.connectedCallback();
3300
+ this._initializeTempSelection();
3301
+ }
3302
+ updated(changedProperties) {
3303
+ if (changedProperties.has("selectedRoleIds") || changedProperties.has("open")) {
3304
+ this._initializeTempSelection();
3305
+ }
3306
+ if (changedProperties.has("availableRoles") || changedProperties.has("_searchQuery")) {
3307
+ this._updateFilteredRoles();
3308
+ }
3309
+ }
3310
+ _updateFilteredRoles() {
3311
+ if (!this._searchQuery.trim()) {
3312
+ this._filteredRoles = [...this.availableRoles];
3313
+ return;
3314
+ }
3315
+ const query = this._searchQuery.toLowerCase().trim();
3316
+ this._filteredRoles = this.availableRoles.filter((role) => {
3317
+ var _a;
3318
+ const titleMatch = role.title.toLowerCase().includes(query);
3319
+ const idMatch = role.id.toLowerCase().includes(query);
3320
+ const descriptionMatch = ((_a = role.description) == null ? void 0 : _a.toLowerCase().includes(query)) || false;
3321
+ const uriMatch = this._searchInRoleURI(role, query);
3322
+ return titleMatch || idMatch || descriptionMatch || uriMatch;
3323
+ });
3324
+ }
3325
+ _searchInRoleURI(role, query) {
3326
+ var _a;
3327
+ if ((_a = role.metadata) == null ? void 0 : _a.roleURI) {
3328
+ return role.metadata.roleURI.toLowerCase().includes(query);
3329
+ }
3330
+ const uriPattern = /https?:\/\/[^\s]+/i;
3331
+ const titleHasURI = uriPattern.test(role.title);
3332
+ const idHasURI = uriPattern.test(role.id);
3333
+ if (titleHasURI || idHasURI) {
3334
+ return role.title.toLowerCase().includes(query) || role.id.toLowerCase().includes(query);
3335
+ }
3336
+ if (role.id.includes(".") || role.id.includes("/") || role.id.includes(":")) {
3337
+ return role.id.toLowerCase().includes(query);
3338
+ }
3339
+ return false;
3340
+ }
3341
+ _handleSearchInput(event) {
3342
+ const input = event.target;
3343
+ this._searchQuery = input.value;
3344
+ }
3345
+ _clearSearch() {
3346
+ var _a;
3347
+ this._searchQuery = "";
3348
+ const searchInput = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".search-input");
3349
+ if (searchInput) {
3350
+ searchInput.value = "";
3351
+ searchInput.focus();
3352
+ }
3353
+ }
3354
+ _highlightSearchTerm(text) {
3355
+ if (!this._searchQuery.trim()) {
3356
+ return text;
3357
+ }
3358
+ const query = this._searchQuery.trim();
3359
+ const regex = new RegExp(`(${query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
3360
+ return text.replace(regex, "<mark>$1</mark>");
3361
+ }
3362
+ _getSelectedFilteredCount() {
3363
+ return this._filteredRoles.filter((role) => this._tempSelectedRoles.has(role.id)).length;
3364
+ }
3365
+ _initializeTempSelection() {
3366
+ this._tempSelectedRoles = new Set(this.selectedRoleIds);
3367
+ }
3368
+ _handleCheckboxChange(event, roleId) {
3369
+ const checkbox = event.target;
3370
+ const newSelection = new Set(this._tempSelectedRoles);
3371
+ if (checkbox.checked) {
3372
+ newSelection.add(roleId);
3373
+ } else {
3374
+ newSelection.delete(roleId);
3375
+ }
3376
+ this._tempSelectedRoles = newSelection;
3377
+ this.requestUpdate();
3378
+ }
3379
+ _selectAll() {
3380
+ const newSelection = new Set(this._tempSelectedRoles);
3381
+ this._filteredRoles.forEach((role) => newSelection.add(role.id));
3382
+ this._tempSelectedRoles = newSelection;
3383
+ this.requestUpdate();
3384
+ }
3385
+ _selectNone() {
3386
+ const newSelection = new Set(this._tempSelectedRoles);
3387
+ this._filteredRoles.forEach((role) => newSelection.delete(role.id));
3388
+ this._tempSelectedRoles = newSelection;
3389
+ this.requestUpdate();
3390
+ }
3391
+ _selectAllGlobal() {
3392
+ this._tempSelectedRoles = new Set(this.availableRoles.map((role) => role.id));
3393
+ this.requestUpdate();
3394
+ }
3395
+ _selectNoneGlobal() {
3396
+ this._tempSelectedRoles = /* @__PURE__ */ new Set();
3397
+ this.requestUpdate();
3398
+ }
3399
+ _resetToOriginal() {
3400
+ this._tempSelectedRoles = new Set(this.selectedRoleIds);
3401
+ this.requestUpdate();
3402
+ }
3403
+ _handleCancel() {
3404
+ this._initializeTempSelection();
3405
+ this.dispatchEvent(new CustomEvent("dialog-cancel", {
3406
+ bubbles: true
3407
+ }));
3408
+ }
3409
+ _handleApply() {
3410
+ const selectedRoles = Array.from(this._tempSelectedRoles);
3411
+ this.dispatchEvent(new CustomEvent("roles-filter-apply", {
3412
+ detail: { selectedRoleIds: selectedRoles },
3413
+ bubbles: true
3414
+ }));
3415
+ }
3416
+ _handleBackdropClick(event) {
3417
+ if (event.target === this) {
3418
+ this._handleCancel();
3419
+ }
3420
+ }
3421
+ render() {
3422
+ const selectedCount = this._tempSelectedRoles.size;
3423
+ const totalCount = this.availableRoles.length;
3424
+ const filteredCount = this._filteredRoles.length;
3425
+ const hasSearchQuery = this._searchQuery.trim().length > 0;
3426
+ return html`
3427
+ <div class="dialog" @click="${(e2) => e2.stopPropagation()}">
3428
+ <!-- Dialog Header -->
3429
+ <div class="dialog-header">
3430
+ <svg class="filter-icon" viewBox="0 0 24 24">
3431
+ <path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>
3432
+ </svg>
3433
+ <h2 class="dialog-title">Filter Roles</h2>
3434
+ <button class="close-button" @click="${this._handleCancel}">×</button>
3435
+ </div>
3436
+
3437
+ <!-- Dialog Content -->
3438
+ <div class="dialog-content">
3439
+ <p class="description">
3440
+ Select the roles you want to display in the form. You can search and choose specific roles
3441
+ to focus on or manage all ${totalCount} available roles.
3442
+ </p>
3443
+
3444
+ <!-- Search Input -->
3445
+ <div class="search-container">
3446
+ <input
3447
+ type="text"
3448
+ class="search-input"
3449
+ placeholder="Search roles by name, ID, or URI..."
3450
+ .value="${this._searchQuery}"
3451
+ @input="${this._handleSearchInput}"
3452
+ />
3453
+ ${this._searchQuery ? html`
3454
+ <button class="clear-search" @click="${this._clearSearch}" title="Clear search">
3455
+ ×
3456
+ </button>
3457
+ ` : html`
3458
+ <svg class="search-icon" viewBox="0 0 24 24">
3459
+ <path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
3460
+ </svg>
3461
+ `}
3462
+ </div>
3463
+
3464
+ <!-- Search Results Info -->
3465
+ ${hasSearchQuery ? html`
3466
+ <div class="search-results-info">
3467
+ Showing ${filteredCount} of ${totalCount} roles
3468
+ ${filteredCount !== totalCount ? html`matching "${this._searchQuery}"` : ""}
3469
+ </div>
3470
+ ` : ""}
3471
+
3472
+ <!-- Selection Controls -->
3473
+ <div class="selection-controls">
3474
+ ${hasSearchQuery ? html`
3475
+ <button class="selection-control" @click="${this._selectAll}">
3476
+ Select Filtered (${filteredCount})
3477
+ </button>
3478
+ <button class="selection-control" @click="${this._selectNone}">
3479
+ Deselect Filtered
3480
+ </button>
3481
+ <button class="selection-control" @click="${this._selectAllGlobal}">
3482
+ Select All (${totalCount})
3483
+ </button>
3484
+ <button class="selection-control" @click="${this._selectNoneGlobal}">
3485
+ Deselect All
3486
+ </button>
3487
+ ` : html`
3488
+ <button class="selection-control" @click="${this._selectAll}">
3489
+ Select All
3490
+ </button>
3491
+ <button class="selection-control" @click="${this._selectNone}">
3492
+ Select None
3493
+ </button>
3494
+ `}
3495
+ <button class="selection-control" @click="${this._resetToOriginal}">
3496
+ Reset
3497
+ </button>
3498
+ </div>
3499
+
3500
+ <!-- Roles List -->
3501
+ <div class="roles-list">
3502
+ ${this._filteredRoles.length === 0 ? html`
3503
+ <div class="no-results">
3504
+ ${hasSearchQuery ? html`
3505
+ No roles found matching "${this._searchQuery}".<br>
3506
+ Try a different search term or clear the search.
3507
+ ` : html`
3508
+ No roles available.
3509
+ `}
3510
+ </div>
3511
+ ` : html`
3512
+ ${this._filteredRoles.map((role) => {
3513
+ var _a;
3514
+ const isSelected = this._tempSelectedRoles.has(role.id);
3515
+ return html`
3516
+ <div class="role-item">
3517
+ <input
3518
+ type="checkbox"
3519
+ class="role-checkbox"
3520
+ .checked="${isSelected}"
3521
+ @change="${(e2) => this._handleCheckboxChange(e2, role.id)}"
3522
+ />
3523
+ <div class="role-info">
3524
+ <h4 class="role-title">${o(this._highlightSearchTerm(role.title))}</h4>
3525
+ ${role.description ? html`
3526
+ <p class="role-description">${o(this._highlightSearchTerm(role.description))}</p>
3527
+ ` : ""}
3528
+ ${role.id !== role.title ? html`
3529
+ <p class="role-description">ID: ${o(this._highlightSearchTerm(role.id))}</p>
3530
+ ` : ""}
3531
+ ${((_a = role.metadata) == null ? void 0 : _a.roleURI) ? html`
3532
+ <p class="role-description">URI: ${o(this._highlightSearchTerm(role.metadata.roleURI))}</p>
3533
+ ` : ""}
3534
+ </div>
3535
+ </div>
3536
+ `;
3537
+ })}
3538
+ `}
3539
+ </div>
3540
+
3541
+ <div class="selected-count">
3542
+ ${selectedCount} of ${totalCount} roles selected
3543
+ ${hasSearchQuery && filteredCount !== totalCount ? html`
3544
+ <br><small>(${this._getSelectedFilteredCount()} of ${filteredCount} filtered roles selected)</small>
3545
+ ` : ""}
3546
+ </div>
3547
+ </div>
3548
+
3549
+ <!-- Dialog Actions -->
3550
+ <div class="dialog-actions">
3551
+ <button class="btn-secondary" @click="${this._handleCancel}">
3552
+ Cancel
3553
+ </button>
3554
+ <button
3555
+ class="btn-primary"
3556
+ @click="${this._handleApply}"
3557
+ ?disabled="${selectedCount === 0}"
3558
+ >
3559
+ Apply Filter (${selectedCount})
3560
+ </button>
3561
+ </div>
3562
+ </div>
3563
+ `;
3564
+ }
3565
+ };
3566
+ JupiterFilterRolesDialog.styles = css`
3567
+ :host {
3568
+ position: fixed;
3569
+ top: 0;
3570
+ left: 0;
3571
+ right: 0;
3572
+ bottom: 0;
3573
+ z-index: 10000;
3574
+ display: none;
3575
+ align-items: center;
3576
+ justify-content: center;
3577
+ background: rgba(0, 0, 0, 0.5);
3578
+ font-family: var(--jupiter-font-family, system-ui, -apple-system, sans-serif);
3579
+ }
3580
+
3581
+ :host([open]) {
3582
+ display: flex;
3583
+ }
3584
+
3585
+ .dialog {
3586
+ background: var(--jupiter-background, #fff);
3587
+ border-radius: 8px;
3588
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
3589
+
3590
+ width: 90vw;
3591
+ max-height: 80vh;
3592
+ display: flex;
3593
+ flex-direction: column;
3594
+ overflow: hidden;
3595
+ }
3596
+
3597
+ .dialog-header {
3598
+ padding: 20px 24px 16px;
3599
+ border-bottom: 1px solid var(--jupiter-border-color, #ddd);
3600
+ display: flex;
3601
+ align-items: center;
3602
+ gap: 12px;
3603
+ }
3604
+
3605
+ .dialog-title {
3606
+ font-size: 18px;
3607
+ font-weight: 600;
3608
+ margin: 0;
3609
+ color: var(--jupiter-text-primary, #333);
3610
+ flex: 1;
3611
+ }
3612
+
3613
+ .filter-icon {
3614
+ width: 20px;
3615
+ height: 20px;
3616
+ fill: var(--jupiter-primary-color, #1976d2);
3617
+ }
3618
+
3619
+ .close-button {
3620
+ background: none;
3621
+ border: none;
3622
+ font-size: 24px;
3623
+ cursor: pointer;
3624
+ padding: 4px;
3625
+ color: var(--jupiter-text-secondary, #666);
3626
+ border-radius: 4px;
3627
+ transition: background-color 0.2s ease;
3628
+ }
3629
+
3630
+ .close-button:hover {
3631
+ background: var(--jupiter-hover-background, #f5f5f5);
3632
+ }
3633
+
3634
+ .dialog-content {
3635
+ flex: 1;
3636
+ overflow-y: auto;
3637
+ padding: 20px 24px;
3638
+ }
3639
+
3640
+ .description {
3641
+ color: var(--jupiter-text-secondary, #666);
3642
+ font-size: 14px;
3643
+ margin: 0 0 20px 0;
3644
+ line-height: 1.5;
3645
+ }
3646
+
3647
+ .selection-controls {
3648
+ display: flex;
3649
+ gap: 12px;
3650
+ margin-bottom: 20px;
3651
+ flex-wrap: wrap;
3652
+ }
3653
+
3654
+ .search-container {
3655
+ margin-bottom: 16px;
3656
+ position: relative;
3657
+ }
3658
+
3659
+ .search-input {
3660
+ width: 100%;
3661
+ padding: 10px 40px 10px 12px;
3662
+ border: 1px solid var(--jupiter-border-color, #ddd);
3663
+ border-radius: 4px;
3664
+ font-size: 14px;
3665
+ font-family: inherit;
3666
+ background: var(--jupiter-background, #fff);
3667
+ color: var(--jupiter-text-primary, #333);
3668
+ transition: border-color 0.2s ease;
3669
+ }
3670
+
3671
+ .search-input:focus {
3672
+ outline: none;
3673
+ border-color: var(--jupiter-primary-color, #1976d2);
3674
+ box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
3675
+ }
3676
+
3677
+ .search-input::placeholder {
3678
+ color: var(--jupiter-text-secondary, #666);
3679
+ }
3680
+
3681
+ .search-icon {
3682
+ position: absolute;
3683
+ right: 12px;
3684
+ top: 50%;
3685
+ transform: translateY(-50%);
3686
+ width: 16px;
3687
+ height: 16px;
3688
+ fill: var(--jupiter-text-secondary, #666);
3689
+ pointer-events: none;
3690
+ }
3691
+
3692
+ .clear-search {
3693
+ position: absolute;
3694
+ right: 12px;
3695
+ top: 50%;
3696
+ transform: translateY(-50%);
3697
+ background: none;
3698
+ border: none;
3699
+ cursor: pointer;
3700
+ padding: 2px;
3701
+ border-radius: 2px;
3702
+ color: var(--jupiter-text-secondary, #666);
3703
+ font-size: 16px;
3704
+ line-height: 1;
3705
+ transition: color 0.2s ease;
3706
+ }
3707
+
3708
+ .clear-search:hover {
3709
+ color: var(--jupiter-text-primary, #333);
3710
+ }
3711
+
3712
+ .search-results-info {
3713
+ font-size: 12px;
3714
+ color: var(--jupiter-text-secondary, #666);
3715
+ margin-bottom: 8px;
3716
+ text-align: center;
3717
+ }
3718
+
3719
+ .no-results {
3720
+ text-align: center;
3721
+ padding: 40px 20px;
3722
+ color: var(--jupiter-text-secondary, #666);
3723
+ font-style: italic;
3724
+ }
3725
+
3726
+ mark {
3727
+ background: var(--jupiter-primary-color, #1976d2);
3728
+ color: white;
3729
+ padding: 1px 2px;
3730
+ border-radius: 2px;
3731
+ font-weight: 500;
3732
+ }
3733
+
3734
+ .selection-control {
3735
+ background: none;
3736
+ border: 1px solid var(--jupiter-primary-color, #1976d2);
3737
+ color: var(--jupiter-primary-color, #1976d2);
3738
+ padding: 6px 12px;
3739
+ border-radius: 4px;
3740
+ font-size: 12px;
3741
+ cursor: pointer;
3742
+ transition: all 0.2s ease;
3743
+ }
3744
+
3745
+ .selection-control:hover {
3746
+ background: var(--jupiter-primary-color, #1976d2);
3747
+ color: white;
3748
+ }
3749
+
3750
+ .roles-list {
3751
+ display: flex;
3752
+ flex-direction: column;
3753
+ gap: 8px;
3754
+ max-height: 300px;
3755
+ overflow-y: auto;
3756
+ border: 1px solid var(--jupiter-border-color, #ddd);
3757
+ border-radius: 4px;
3758
+ padding: 12px;
3759
+ }
3760
+
3761
+ .role-item {
3762
+ display: flex;
3763
+ align-items: flex-start;
3764
+ gap: 12px;
3765
+ padding: 8px;
3766
+ border-radius: 4px;
3767
+ transition: background-color 0.2s ease;
3768
+ }
3769
+
3770
+ .role-item:hover {
3771
+ background: var(--jupiter-hover-background, #f5f5f5);
3772
+ }
3773
+
3774
+ .role-checkbox {
3775
+ margin-top: 2px;
3776
+ cursor: pointer;
3777
+ }
3778
+
3779
+ .role-info {
3780
+ flex: 1;
3781
+ min-width: 0;
3782
+ }
3783
+
3784
+ .role-title {
3785
+ font-weight: 500;
3786
+ color: var(--jupiter-text-primary, #333);
3787
+ margin: 0 0 4px 0;
3788
+ word-wrap: break-word;
3789
+ line-height: 1.3;
3790
+ }
3791
+
3792
+ .role-description {
3793
+ font-size: 13px;
3794
+ color: var(--jupiter-text-secondary, #666);
3795
+ margin: 0;
3796
+ line-height: 1.4;
3797
+ word-break: break-all; /* Allow URI breaking */
3798
+ }
3799
+
3800
+ .role-description:last-child {
3801
+ margin-bottom: 4px;
3802
+ }
3803
+
3804
+ .selected-count {
3805
+ font-size: 13px;
3806
+ color: var(--jupiter-text-secondary, #666);
3807
+ margin-top: 16px;
3808
+ text-align: center;
3809
+ }
3810
+
3811
+ .dialog-actions {
3812
+ padding: 16px 24px;
3813
+ border-top: 1px solid var(--jupiter-border-color, #ddd);
3814
+ display: flex;
3815
+ gap: 12px;
3816
+ justify-content: flex-end;
3817
+ background: var(--jupiter-form-actions-background, #f8f9fa);
3818
+ }
3819
+
3820
+ .dialog-actions button {
3821
+ padding: 10px 20px;
3822
+ border: none;
3823
+ border-radius: 4px;
3824
+ font-size: 14px;
3825
+ font-weight: 500;
3826
+ cursor: pointer;
3827
+ transition: background-color 0.2s ease;
3828
+ }
3829
+
3830
+ .btn-primary {
3831
+ background: var(--jupiter-primary-color, #1976d2);
3832
+ color: white;
3833
+ }
3834
+
3835
+ .btn-primary:hover:not(:disabled) {
3836
+ background: var(--jupiter-primary-color-dark, #1565c0);
3837
+ }
3838
+
3839
+ .btn-secondary {
3840
+ background: transparent;
3841
+ color: var(--jupiter-text-secondary, #666);
3842
+ border: 1px solid var(--jupiter-border-color, #ddd);
3843
+ }
3844
+
3845
+ .btn-secondary:hover:not(:disabled) {
3846
+ background: var(--jupiter-hover-background, #f5f5f5);
3847
+ }
3848
+
3849
+ button:disabled {
3850
+ opacity: 0.6;
3851
+ cursor: not-allowed;
3852
+ }
3853
+ `;
3854
+ __decorateClass$1([
3855
+ n$1({ type: Boolean, reflect: true })
3856
+ ], JupiterFilterRolesDialog.prototype, "open", 2);
3857
+ __decorateClass$1([
3858
+ n$1({ type: Array })
3859
+ ], JupiterFilterRolesDialog.prototype, "availableRoles", 2);
3860
+ __decorateClass$1([
3861
+ n$1({ type: Array })
3862
+ ], JupiterFilterRolesDialog.prototype, "selectedRoleIds", 2);
3863
+ __decorateClass$1([
3864
+ r$1()
3865
+ ], JupiterFilterRolesDialog.prototype, "_tempSelectedRoles", 2);
3866
+ __decorateClass$1([
3867
+ r$1()
3868
+ ], JupiterFilterRolesDialog.prototype, "_searchQuery", 2);
3869
+ __decorateClass$1([
3870
+ r$1()
3871
+ ], JupiterFilterRolesDialog.prototype, "_filteredRoles", 2);
3872
+ JupiterFilterRolesDialog = __decorateClass$1([
3873
+ t$3("jupiter-filter-roles-dialog")
3874
+ ], JupiterFilterRolesDialog);
3875
+ var __defProp = Object.defineProperty;
3876
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3877
+ var __decorateClass = (decorators, target, key, kind) => {
3878
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
3879
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
3880
+ if (decorator = decorators[i2])
3881
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
3882
+ if (kind && result)
3883
+ __defProp(target, key, result);
3884
+ return result;
3885
+ };
3886
+ let JupiterDynamicForm = class extends LitElement {
3887
+ constructor() {
3888
+ super(...arguments);
3889
+ this.config = {};
3890
+ this.initialData = {};
3891
+ this.disabled = false;
3892
+ this.readonly = false;
3893
+ this.periodStartDate = "2025-01-01";
3894
+ this.periodEndDate = "2025-12-31";
3895
+ this._formData = {};
3896
+ this._preservedFormData = {};
3897
+ this._typedMemberData = {};
3898
+ this._preservedTypedMemberData = {};
3899
+ this._columns = [];
3900
+ this._errors = [];
3901
+ this._touched = /* @__PURE__ */ new Set();
3902
+ this._dirty = false;
3903
+ this._valid = true;
3904
+ this._submitted = false;
3905
+ this._allSections = [];
3906
+ this._selectedRoleIds = [];
3907
+ this._showFilterDialog = false;
3908
+ }
2780
3909
  connectedCallback() {
2781
3910
  super.connectedCallback();
2782
3911
  this._initializeForm();
@@ -2798,6 +3927,13 @@ let JupiterDynamicForm = class extends LitElement {
2798
3927
  this.periodEndDate
2799
3928
  );
2800
3929
  console.log("✅ Generated schema with sections:", this._currentSchema.sections.length);
3930
+ this._allSections = [...this._currentSchema.sections];
3931
+ if (this._allSections.length > 10 && this._selectedRoleIds.length === 0) {
3932
+ this._selectedRoleIds = this._allSections.slice(0, 10).map((section) => section.id);
3933
+ } else if (this._selectedRoleIds.length === 0) {
3934
+ this._selectedRoleIds = this._allSections.map((section) => section.id);
3935
+ }
3936
+ this._applyRoleFilter();
2801
3937
  this._columns = [
2802
3938
  {
2803
3939
  id: "base",
@@ -2811,13 +3947,19 @@ let JupiterDynamicForm = class extends LitElement {
2811
3947
  } catch (error) {
2812
3948
  console.error("❌ Error building form from XBRL input:", error);
2813
3949
  this._currentSchema = this._getDefaultSchema();
3950
+ this._allSections = [];
3951
+ this._selectedRoleIds = [];
2814
3952
  this._columns = this._getDefaultColumns();
2815
3953
  }
2816
3954
  } else if (this.schema) {
2817
3955
  this._currentSchema = this.schema;
3956
+ this._allSections = [...this.schema.sections];
3957
+ this._selectedRoleIds = this._allSections.map((section) => section.id);
2818
3958
  this._columns = this._getDefaultColumns();
2819
3959
  } else {
2820
3960
  this._currentSchema = this._getDefaultSchema();
3961
+ this._allSections = [];
3962
+ this._selectedRoleIds = [];
2821
3963
  this._columns = this._getDefaultColumns();
2822
3964
  }
2823
3965
  this._formData = { ...this.initialData };
@@ -2847,6 +3989,106 @@ let JupiterDynamicForm = class extends LitElement {
2847
3989
  }
2848
3990
  ];
2849
3991
  }
3992
+ _applyRoleFilter() {
3993
+ if (!this._currentSchema || !this._allSections.length)
3994
+ return;
3995
+ this._preserveDataForHiddenSections();
3996
+ const filteredSections = this._allSections.filter(
3997
+ (section) => this._selectedRoleIds.includes(section.id)
3998
+ );
3999
+ this._restoreDataForVisibleSections(filteredSections);
4000
+ this._currentSchema = {
4001
+ ...this._currentSchema,
4002
+ sections: filteredSections
4003
+ };
4004
+ }
4005
+ _preserveDataForHiddenSections() {
4006
+ var _a;
4007
+ const currentlyVisibleSectionIds = ((_a = this._currentSchema) == null ? void 0 : _a.sections.map((s2) => s2.id)) || [];
4008
+ const sectionsThatWillBeHidden = currentlyVisibleSectionIds.filter(
4009
+ (sectionId) => !this._selectedRoleIds.includes(sectionId)
4010
+ );
4011
+ sectionsThatWillBeHidden.forEach((sectionId) => {
4012
+ const section = this._allSections.find((s2) => s2.id === sectionId);
4013
+ if (section) {
4014
+ this._preserveSectionData(section);
4015
+ }
4016
+ });
4017
+ console.log(`📦 Preserved data for ${sectionsThatWillBeHidden.length} hidden sections:`, sectionsThatWillBeHidden);
4018
+ }
4019
+ _restoreDataForVisibleSections(visibleSections) {
4020
+ visibleSections.forEach((section) => {
4021
+ this._restoreSectionData(section);
4022
+ });
4023
+ console.log(`🔄 Restored data for ${visibleSections.length} visible sections`);
4024
+ }
4025
+ _preserveSectionData(section) {
4026
+ section.concepts.forEach((concept) => {
4027
+ this._preserveConceptData(concept);
4028
+ });
4029
+ }
4030
+ _preserveConceptData(concept) {
4031
+ if (this._formData[concept.id]) {
4032
+ this._preservedFormData[concept.id] = { ...this._formData[concept.id] };
4033
+ console.log(`💾 Preserved form data for concept: ${concept.id}`);
4034
+ }
4035
+ concept.fields.forEach((field) => {
4036
+ if (this._typedMemberData[field.columnId]) {
4037
+ this._preservedTypedMemberData[field.columnId] = { ...this._typedMemberData[field.columnId] };
4038
+ console.log(`💾 Preserved typed data for column: ${field.columnId}`);
4039
+ }
4040
+ });
4041
+ if (concept.children) {
4042
+ concept.children.forEach((child) => {
4043
+ this._preserveConceptData(child);
4044
+ });
4045
+ }
4046
+ }
4047
+ _restoreSectionData(section) {
4048
+ section.concepts.forEach((concept) => {
4049
+ this._restoreConceptData(concept);
4050
+ });
4051
+ }
4052
+ _restoreConceptData(concept) {
4053
+ if (this._preservedFormData[concept.id]) {
4054
+ this._formData[concept.id] = { ...this._preservedFormData[concept.id] };
4055
+ console.log(`🔄 Restored form data for concept: ${concept.id}`);
4056
+ }
4057
+ concept.fields.forEach((field) => {
4058
+ if (this._preservedTypedMemberData[field.columnId]) {
4059
+ this._typedMemberData[field.columnId] = { ...this._preservedTypedMemberData[field.columnId] };
4060
+ console.log(`🔄 Restored typed data for column: ${field.columnId}`);
4061
+ }
4062
+ });
4063
+ if (concept.children) {
4064
+ concept.children.forEach((child) => {
4065
+ this._restoreConceptData(child);
4066
+ });
4067
+ }
4068
+ }
4069
+ _shouldShowFilterButton() {
4070
+ return this._allSections.length > 10;
4071
+ }
4072
+ _handleFilterRolesClick() {
4073
+ this._showFilterDialog = true;
4074
+ }
4075
+ _handleFilterDialogCancel() {
4076
+ this._showFilterDialog = false;
4077
+ }
4078
+ _handleRoleFilterApply(event) {
4079
+ const { selectedRoleIds } = event.detail;
4080
+ this._selectedRoleIds = selectedRoleIds;
4081
+ this._applyRoleFilter();
4082
+ this._showFilterDialog = false;
4083
+ this.dispatchEvent(new CustomEvent("roles-filter-changed", {
4084
+ detail: {
4085
+ selectedRoleIds,
4086
+ totalRoles: this._allSections.length,
4087
+ visibleRoles: selectedRoleIds.length
4088
+ },
4089
+ bubbles: true
4090
+ }));
4091
+ }
2850
4092
  _validateForm() {
2851
4093
  var _a;
2852
4094
  const errors = [];
@@ -2874,11 +4116,13 @@ let JupiterDynamicForm = class extends LitElement {
2874
4116
  }
2875
4117
  _handleFieldChange(event) {
2876
4118
  const { fieldId, conceptId, columnId, value } = event.detail;
2877
- if (!this._formData[conceptId]) {
2878
- this._formData[conceptId] = {};
4119
+ const updatedFormData = { ...this._formData };
4120
+ if (!updatedFormData[conceptId]) {
4121
+ updatedFormData[conceptId] = {};
2879
4122
  }
2880
- const oldValue = this._formData[conceptId][columnId];
2881
- this._formData[conceptId][columnId] = value;
4123
+ const oldValue = updatedFormData[conceptId][columnId];
4124
+ updatedFormData[conceptId] = { ...updatedFormData[conceptId], [columnId]: value };
4125
+ this._formData = updatedFormData;
2882
4126
  this._touched.add(`${conceptId}-${columnId}`);
2883
4127
  this._dirty = true;
2884
4128
  this._validateForm();
@@ -2888,13 +4132,32 @@ let JupiterDynamicForm = class extends LitElement {
2888
4132
  bubbles: true
2889
4133
  }));
2890
4134
  }
4135
+ /**
4136
+ * Generate a unique concept key that includes section context
4137
+ */
4138
+ _generateUniqueConceptKey(sectionId, conceptId) {
4139
+ return `${sectionId}::${conceptId}`;
4140
+ }
4141
+ /**
4142
+ * Extract the original concept ID from a unique concept key
4143
+ */
4144
+ _extractOriginalConceptId(uniqueConceptKey) {
4145
+ const parts = uniqueConceptKey.split("::");
4146
+ return parts.length > 1 ? parts[1] : uniqueConceptKey;
4147
+ }
2891
4148
  _handleTypedMemberChange(event) {
2892
- const { columnId, value, sectionId } = event.detail;
2893
- this._typedMemberValues[columnId] = value;
4149
+ const { columnId, axisId, value } = event.detail;
4150
+ console.log(`🔍 [DynamicForm] Typed member change: columnId=${columnId}, axisId=${axisId}, value=${value}`);
4151
+ const updatedTypedMemberData = { ...this._typedMemberData };
4152
+ if (!updatedTypedMemberData[columnId]) {
4153
+ updatedTypedMemberData[columnId] = {};
4154
+ }
4155
+ updatedTypedMemberData[columnId] = { ...updatedTypedMemberData[columnId], [axisId]: value };
4156
+ this._typedMemberData = updatedTypedMemberData;
2894
4157
  this._dirty = true;
2895
4158
  this.requestUpdate();
2896
4159
  this.dispatchEvent(new CustomEvent("typed-member-change", {
2897
- detail: { columnId, value, sectionId },
4160
+ detail: { columnId, axisId, value },
2898
4161
  bubbles: true
2899
4162
  }));
2900
4163
  }
@@ -2941,17 +4204,17 @@ let JupiterDynamicForm = class extends LitElement {
2941
4204
  this._addColumnFromRequest(columnRequest, sectionId);
2942
4205
  }
2943
4206
  _addColumnFromRequest(request, sectionId) {
2944
- var _a, _b, _c, _d, _e, _f;
4207
+ var _a, _b, _c, _d, _e;
2945
4208
  const timestamp = Date.now();
2946
4209
  const newColumnId = `col-${timestamp}`;
2947
4210
  let title = "";
2948
4211
  let description = "";
2949
4212
  if (request.periodType === "instant") {
2950
- title = request.instantDate || "Instant Date";
2951
- description = `Instant period: ${request.instantDate}`;
4213
+ title = "Current";
4214
+ description = `Values as of ${request.instantDate}`;
2952
4215
  } else if (request.periodType === "duration" || request.periodType === "mixed") {
2953
- title = `${request.startDate} / ${request.endDate}`;
2954
- description = `Duration period: ${request.startDate} to ${request.endDate}`;
4216
+ title = "Current Period";
4217
+ description = `Period: ${request.startDate} to ${request.endDate}`;
2955
4218
  }
2956
4219
  let dimensionData = {
2957
4220
  dimensionId: "period",
@@ -2964,28 +4227,10 @@ let JupiterDynamicForm = class extends LitElement {
2964
4227
  const item = hypercubeRole.items[0];
2965
4228
  if (item.dimensions.length === 1) {
2966
4229
  const dimension = item.dimensions[0];
2967
- if (dimension.typedMember) {
4230
+ if (dimension.members && dimension.members.length > 0) {
2968
4231
  const axisLabel = ((_d = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _d.label) || dimension.conceptName;
2969
- const typedMemberLabel = dimension.typedMember.id.split("_").pop() || "TypedMember";
2970
- const periodPart = request.periodType === "instant" ? `(${request.instantDate})` : `(${request.startDate} / ${request.endDate})`;
2971
- title = `${typedMemberLabel} ${periodPart}`;
2972
- dimensionData = {
2973
- dimensionId: newColumnId,
2974
- axisId: dimension.id,
2975
- memberId: dimension.typedMember.id,
2976
- memberValue: typedMemberLabel,
2977
- memberLabel: typedMemberLabel,
2978
- axis: axisLabel,
2979
- axisLabel,
2980
- memberKey: `${axisLabel} | ${typedMemberLabel}`,
2981
- dimensionIdKey: `${dimension.id} | ${dimension.typedMember.id}`,
2982
- isTypedMember: true
2983
- };
2984
- console.log(`📊 Applied typed member dimension to new column: ${dimensionData.memberKey}`);
2985
- } else if (dimension.members && dimension.members.length > 0) {
2986
- const axisLabel = ((_e = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _e.label) || dimension.conceptName;
2987
4232
  const firstMember = dimension.members[0];
2988
- const memberLabel = ((_f = firstMember.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _f.label) || firstMember.conceptName;
4233
+ const memberLabel = ((_e = firstMember.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _e.label) || firstMember.conceptName;
2989
4234
  const periodPart = request.periodType === "instant" ? `(${request.instantDate})` : `(${request.startDate} / ${request.endDate})`;
2990
4235
  title = `${memberLabel} ${periodPart}`;
2991
4236
  dimensionData = {
@@ -3187,7 +4432,103 @@ let JupiterDynamicForm = class extends LitElement {
3187
4432
  this._currentSchema.sections.forEach((section) => {
3188
4433
  this._processConceptsForSubmission(section.concepts, submissionData, section);
3189
4434
  });
3190
- return submissionData;
4435
+ this._includePreservedDataInSubmission(submissionData);
4436
+ const uniqueSubmissionData = this._removeDuplicateSubmissions(submissionData);
4437
+ return uniqueSubmissionData;
4438
+ }
4439
+ _includePreservedDataInSubmission(submissionData) {
4440
+ Object.keys(this._preservedFormData).forEach((conceptId) => {
4441
+ const conceptData = this._preservedFormData[conceptId];
4442
+ if (conceptData) {
4443
+ Object.keys(conceptData).forEach((columnId) => {
4444
+ const value = conceptData[columnId];
4445
+ if (value !== void 0 && value !== null && value !== "") {
4446
+ const originalConcept = this._findConceptInAllSections(conceptId);
4447
+ if (originalConcept) {
4448
+ const originalSection = this._findSectionForConcept(conceptId);
4449
+ this._addConceptDataToSubmission(originalConcept, columnId, value, submissionData, originalSection || void 0);
4450
+ }
4451
+ }
4452
+ });
4453
+ }
4454
+ });
4455
+ console.log(`📤 Included preserved data in submission. Total entries: ${submissionData.length}`);
4456
+ }
4457
+ _findConceptInAllSections(conceptId) {
4458
+ for (const section of this._allSections) {
4459
+ const concept = this._findConceptInSection(section.concepts, conceptId);
4460
+ if (concept) {
4461
+ return concept;
4462
+ }
4463
+ }
4464
+ return null;
4465
+ }
4466
+ _findConceptInSection(concepts, conceptId) {
4467
+ for (const concept of concepts) {
4468
+ if (concept.id === conceptId) {
4469
+ return concept;
4470
+ }
4471
+ if (concept.children) {
4472
+ const found = this._findConceptInSection(concept.children, conceptId);
4473
+ if (found) {
4474
+ return found;
4475
+ }
4476
+ }
4477
+ }
4478
+ return null;
4479
+ }
4480
+ _findSectionForConcept(conceptId) {
4481
+ for (const section of this._allSections) {
4482
+ const concept = this._findConceptInSection(section.concepts, conceptId);
4483
+ if (concept) {
4484
+ return section;
4485
+ }
4486
+ }
4487
+ return null;
4488
+ }
4489
+ _addConceptDataToSubmission(concept, columnId, value, submissionData, section) {
4490
+ var _a;
4491
+ const field = concept.fields.find((f2) => f2.columnId === columnId);
4492
+ if (!field)
4493
+ return;
4494
+ const isInstant = concept.periodType === "instant";
4495
+ const entry = {
4496
+ conceptId: concept.originalConceptId || concept.id,
4497
+ value,
4498
+ period: {
4499
+ type: concept.periodType || "duration",
4500
+ ...isInstant ? { date: field.periodStartDate || this.periodStartDate } : {
4501
+ startDate: field.periodStartDate || this.periodStartDate,
4502
+ endDate: field.periodEndDate || this.periodEndDate
4503
+ }
4504
+ }
4505
+ };
4506
+ const column = this._findColumnByIdInAllSections(columnId);
4507
+ if ((_a = column == null ? void 0 : column.dimensionData) == null ? void 0 : _a.memberLabel) {
4508
+ entry.dimension = column.dimensionData.memberLabel;
4509
+ }
4510
+ submissionData.push(entry);
4511
+ }
4512
+ _findColumnByIdInAllSections(columnId) {
4513
+ for (const section of this._allSections) {
4514
+ if (section.columns) {
4515
+ const column = section.columns.find((col) => col.id === columnId);
4516
+ if (column) {
4517
+ return column;
4518
+ }
4519
+ }
4520
+ }
4521
+ return void 0;
4522
+ }
4523
+ _removeDuplicateSubmissions(submissionData) {
4524
+ const uniqueEntries = /* @__PURE__ */ new Map();
4525
+ submissionData.forEach((entry) => {
4526
+ const key = `${entry.conceptId}_${entry.value}_${entry.dimension || "no-dimension"}`;
4527
+ if (!uniqueEntries.has(key)) {
4528
+ uniqueEntries.set(key, entry);
4529
+ }
4530
+ });
4531
+ return Array.from(uniqueEntries.values());
3191
4532
  }
3192
4533
  _findColumnById(columnId) {
3193
4534
  if (!this._currentSchema) {
@@ -3203,22 +4544,114 @@ let JupiterDynamicForm = class extends LitElement {
3203
4544
  }
3204
4545
  return void 0;
3205
4546
  }
4547
+ _findColumnByIdInSection(columnId, section) {
4548
+ if (!(section == null ? void 0 : section.columns)) {
4549
+ return void 0;
4550
+ }
4551
+ return section.columns.find((col) => col.id === columnId);
4552
+ }
4553
+ _getTypedMemberNameForAxis(axisId, section) {
4554
+ var _a, _b, _c, _d;
4555
+ if (!((_b = (_a = this.xbrlInput) == null ? void 0 : _a.hypercubes) == null ? void 0 : _b[0])) {
4556
+ return null;
4557
+ }
4558
+ const sectionRoleId = section == null ? void 0 : section.id;
4559
+ if (!sectionRoleId) {
4560
+ return null;
4561
+ }
4562
+ const hypercube = this.xbrlInput.hypercubes[0];
4563
+ const role = (_c = hypercube.roles) == null ? void 0 : _c.find((r2) => r2.roleId === sectionRoleId);
4564
+ if (!(role == null ? void 0 : role.items)) {
4565
+ return null;
4566
+ }
4567
+ for (const item of role.items) {
4568
+ if (item.dimensions) {
4569
+ const dimension = item.dimensions.find((d2) => d2.id === axisId);
4570
+ if ((_d = dimension == null ? void 0 : dimension.typedMember) == null ? void 0 : _d.id) {
4571
+ return dimension.typedMember.id;
4572
+ }
4573
+ }
4574
+ }
4575
+ return null;
4576
+ }
4577
+ _doesConceptApplyToTypedDimension(concept, section, columnId) {
4578
+ var _a, _b, _c;
4579
+ if (!((_b = (_a = this.xbrlInput) == null ? void 0 : _a.hypercubes) == null ? void 0 : _b[0])) {
4580
+ return false;
4581
+ }
4582
+ const sectionRoleId = section == null ? void 0 : section.id;
4583
+ if (!sectionRoleId) {
4584
+ return false;
4585
+ }
4586
+ const hypercubeRole = this.xbrlInput.hypercubes[0].roles.find((hr) => hr.roleId === sectionRoleId);
4587
+ if (!((_c = hypercubeRole == null ? void 0 : hypercubeRole.items) == null ? void 0 : _c.length)) {
4588
+ return false;
4589
+ }
4590
+ for (const item of hypercubeRole.items) {
4591
+ const conceptIdToCheck = concept.originalConceptId || concept.id;
4592
+ if (item.conceptIds && item.conceptIds.includes(conceptIdToCheck)) {
4593
+ const hasTypedDimensions = item.dimensions.some((dim) => dim.typedMember);
4594
+ console.log(`🔍 [DynamicForm] Concept ${conceptIdToCheck} found in hypercube item. Has typed dimensions:`, hasTypedDimensions);
4595
+ return hasTypedDimensions;
4596
+ }
4597
+ }
4598
+ console.log(`🔍 [DynamicForm] Concept ${concept.originalConceptId || concept.id} not found in any hypercube items for role ${sectionRoleId}`);
4599
+ return false;
4600
+ }
4601
+ /**
4602
+ * Get the specific typed dimensions that apply to a concept in its role
4603
+ */
4604
+ _getApplicableTypedDimensions(concept, section) {
4605
+ var _a, _b, _c;
4606
+ if (!((_b = (_a = this.xbrlInput) == null ? void 0 : _a.hypercubes) == null ? void 0 : _b[0]) || !(section == null ? void 0 : section.id)) {
4607
+ return [];
4608
+ }
4609
+ const hypercubeRole = this.xbrlInput.hypercubes[0].roles.find((hr) => hr.roleId === section.id);
4610
+ if (!((_c = hypercubeRole == null ? void 0 : hypercubeRole.items) == null ? void 0 : _c.length)) {
4611
+ return [];
4612
+ }
4613
+ const conceptIdToCheck = concept.originalConceptId || concept.id;
4614
+ for (const item of hypercubeRole.items) {
4615
+ if (item.conceptIds && item.conceptIds.includes(conceptIdToCheck)) {
4616
+ const typedDimensions = item.dimensions.filter((dim) => dim.typedMember).map((dim) => dim.id);
4617
+ console.log(`🔍 [DynamicForm] Found applicable typed dimensions for concept ${conceptIdToCheck}:`, typedDimensions);
4618
+ return typedDimensions;
4619
+ }
4620
+ }
4621
+ return [];
4622
+ }
3206
4623
  _processConceptsForSubmission(concepts, submissionData, section) {
4624
+ const targetRole = "Toelichting op de geconsolideerde jaarrekening - Financiële vaste activa: Deelnemingen: Volledig geconsolideerd: Specificatie";
4625
+ const sectionTitle = (section == null ? void 0 : section.title) || "Unknown";
3207
4626
  concepts.forEach((concept) => {
4627
+ if (sectionTitle === targetRole) {
4628
+ console.warn(`[DUPLICATE DEBUG] Processing concept ${concept.originalConceptId || concept.id} in target role`);
4629
+ if (concept.fields) {
4630
+ console.warn(`[DUPLICATE DEBUG] Concept has ${concept.fields.length} fields`);
4631
+ concept.fields.forEach((field, index) => {
4632
+ var _a;
4633
+ console.warn(`[DUPLICATE DEBUG] Field ${index}: columnId=${field.columnId}, current value=${(_a = this._formData[concept.id]) == null ? void 0 : _a[field.columnId]}`);
4634
+ });
4635
+ }
4636
+ }
4637
+ if (concept.fields && concept.fields.length > 1) {
4638
+ console.log(`🔍 [DEBUG] Processing concept ${concept.originalConceptId}, fields count: ${concept.fields.length}`);
4639
+ concept.fields.forEach((field, index) => {
4640
+ var _a;
4641
+ console.log(` Field ${index}: columnId=${field.columnId}, value=${(_a = this._formData[concept.id]) == null ? void 0 : _a[field.columnId]}`);
4642
+ });
4643
+ }
3208
4644
  if (concept.fields && concept.fields.length > 0) {
3209
4645
  concept.fields.forEach((field) => {
3210
- var _a, _b, _c, _d;
4646
+ var _a, _b;
3211
4647
  const conceptData = this._formData[concept.id];
3212
4648
  const fieldValue = conceptData == null ? void 0 : conceptData[field.columnId];
3213
4649
  if (fieldValue !== void 0 && fieldValue !== null && fieldValue !== "") {
3214
- const column = this._findColumnById(field.columnId);
3215
- console.log(`🔍 Processing field for concept ${concept.id}:`, {
3216
- fieldColumnId: field.columnId,
3217
- foundColumn: column,
3218
- columnType: column == null ? void 0 : column.type,
3219
- dimensionData: column == null ? void 0 : column.dimensionData,
3220
- isTypedMember: (_a = column == null ? void 0 : column.dimensionData) == null ? void 0 : _a.isTypedMember
3221
- });
4650
+ if (sectionTitle === targetRole) {
4651
+ console.warn(`[DUPLICATE DEBUG] Creating submission entry for concept ${concept.originalConceptId || concept.id}, field columnId=${field.columnId}, value=${fieldValue}`);
4652
+ }
4653
+ const column = this._findColumnByIdInSection(field.columnId, section);
4654
+ console.log(`🔍 [DynamicForm] Processing field for concept ${concept.originalConceptId || concept.id}, field columnId: ${field.columnId}, found column in section ${section == null ? void 0 : section.id}: ${!!column}, column title: ${column == null ? void 0 : column.title}`);
3222
4655
  const submissionEntry = {
3223
4656
  conceptId: concept.id,
3224
4657
  value: fieldValue,
@@ -3232,45 +4665,50 @@ let JupiterDynamicForm = class extends LitElement {
3232
4665
  submissionEntry.period.startDate = field.periodStartDate || this.periodStartDate;
3233
4666
  submissionEntry.period.endDate = field.periodEndDate || this.periodEndDate;
3234
4667
  }
3235
- if ((column == null ? void 0 : column.type) === "dimension" && ((_b = column.dimensionData) == null ? void 0 : _b.dimensionIdKey)) {
3236
- console.log(`✅ Found column dimension data:`, column.dimensionData);
3237
- if (column.dimensionData.isTypedMember) {
3238
- submissionEntry.dimension = column.dimensionData.dimensionIdKey;
3239
- submissionEntry.typedDimension = true;
3240
- submissionEntry.typedMemberValue = this._typedMemberValues[column.id] || "";
3241
- } else {
3242
- submissionEntry.dimension = column.dimensionData.dimensionIdKey;
3243
- }
3244
- } else if ((_c = section == null ? void 0 : section.columns) == null ? void 0 : _c.length) {
3245
- console.log(`🔍 Checking section columns for dimension data:`, {
3246
- sectionId: section.id,
3247
- columnsCount: section.columns.length,
3248
- columns: section.columns.map((col) => {
3249
- var _a2, _b2;
3250
- return {
3251
- id: col.id,
3252
- type: col.type,
3253
- hasDimensionData: !!col.dimensionData,
3254
- dimensionIdKey: (_a2 = col.dimensionData) == null ? void 0 : _a2.dimensionIdKey,
3255
- isTypedMember: (_b2 = col.dimensionData) == null ? void 0 : _b2.isTypedMember
3256
- };
3257
- })
3258
- });
3259
- const sectionDimensionColumn = section.columns.find((col) => {
3260
- var _a2;
3261
- return col.type === "dimension" && ((_a2 = col.dimensionData) == null ? void 0 : _a2.dimensionIdKey);
3262
- });
3263
- if ((_d = sectionDimensionColumn == null ? void 0 : sectionDimensionColumn.dimensionData) == null ? void 0 : _d.dimensionIdKey) {
3264
- console.log(`✅ Found section dimension data:`, sectionDimensionColumn.dimensionData);
3265
- if (sectionDimensionColumn.dimensionData.isTypedMember) {
3266
- submissionEntry.dimension = sectionDimensionColumn.dimensionData.dimensionIdKey;
3267
- submissionEntry.typedDimension = true;
3268
- submissionEntry.typedMemberValue = this._typedMemberValues[sectionDimensionColumn.id] || "";
4668
+ if ((column == null ? void 0 : column.type) === "dimension" && ((_a = column.dimensionData) == null ? void 0 : _a.dimensionIdKey)) {
4669
+ submissionEntry.dimension = column.dimensionData.dimensionIdKey;
4670
+ console.log(`🔍 [DynamicForm] Using dimension key from field's column (${field.columnId}):`, column.dimensionData.dimensionIdKey);
4671
+ } else {
4672
+ console.log(`🔍 [DynamicForm] No dimension data found for field column ${field.columnId}. Column type: ${column == null ? void 0 : column.type}, has dimensionData: ${!!(column == null ? void 0 : column.dimensionData)}`);
4673
+ }
4674
+ if (this._typedMemberData[field.columnId]) {
4675
+ const applicableTypedDimensions = this._getApplicableTypedDimensions(concept, section);
4676
+ console.log(`🔍 [DynamicForm] Concept ${concept.id} applicable typed dimensions:`, applicableTypedDimensions);
4677
+ if (applicableTypedDimensions.length > 0) {
4678
+ const filteredTypedMembers = {};
4679
+ const allTypedMemberData = this._typedMemberData[field.columnId];
4680
+ applicableTypedDimensions.forEach((dimensionId) => {
4681
+ if (allTypedMemberData[dimensionId]) {
4682
+ const memberName = this._getTypedMemberNameForAxis(dimensionId, section);
4683
+ filteredTypedMembers[dimensionId] = {
4684
+ value: allTypedMemberData[dimensionId],
4685
+ memberName: memberName || "Unknown"
4686
+ };
4687
+ }
4688
+ });
4689
+ if (Object.keys(filteredTypedMembers).length > 0) {
4690
+ submissionEntry.typedMembers = filteredTypedMembers;
4691
+ console.log(`🔍 [DynamicForm] Adding filtered typed members to submission:`, filteredTypedMembers);
3269
4692
  } else {
3270
- submissionEntry.dimension = sectionDimensionColumn.dimensionData.dimensionIdKey;
4693
+ console.log(`🔍 [DynamicForm] No typed member values found for applicable dimensions:`, applicableTypedDimensions);
3271
4694
  }
4695
+ } else {
4696
+ console.log(`🔍 [DynamicForm] Skipping typed members for concept ${concept.id} - not applicable to this hypercube`);
4697
+ }
4698
+ } else {
4699
+ console.log(`🔍 [DynamicForm] No typed member data found for column ${field.columnId}. Available columns:`, Object.keys(this._typedMemberData));
4700
+ if (column) {
4701
+ console.log(`🔍 [DynamicForm] Column details:`, {
4702
+ id: column.id,
4703
+ type: column.type,
4704
+ hasTypedMembers: (_b = column.dimensionData) == null ? void 0 : _b.hasTypedMembers,
4705
+ dimensionData: column.dimensionData
4706
+ });
3272
4707
  }
3273
4708
  }
4709
+ if (sectionTitle === targetRole) {
4710
+ console.warn(`[DUPLICATE DEBUG] Final submission entry:`, submissionEntry);
4711
+ }
3274
4712
  submissionData.push(submissionEntry);
3275
4713
  }
3276
4714
  });
@@ -3285,6 +4723,9 @@ let JupiterDynamicForm = class extends LitElement {
3285
4723
  this._touched.clear();
3286
4724
  this._dirty = false;
3287
4725
  this._submitted = false;
4726
+ this._preservedFormData = {};
4727
+ this._preservedTypedMemberData = {};
4728
+ console.log("🔄 Form reset - all data and preserved data cleared");
3288
4729
  this._validateForm();
3289
4730
  this.requestUpdate();
3290
4731
  this.dispatchEvent(new CustomEvent("form-reset", {
@@ -3360,6 +4801,7 @@ let JupiterDynamicForm = class extends LitElement {
3360
4801
  .section="${section}"
3361
4802
  .columns="${section.columns || this._columns}"
3362
4803
  .formData="${this._formData}"
4804
+ .typedMemberData="${this._typedMemberData}"
3363
4805
  .disabled="${this.disabled || this.readonly}"
3364
4806
  .collapsible="${config.collapsibleSections !== false}"
3365
4807
  .locale="${config.locale || "en-US"}"
@@ -3375,6 +4817,21 @@ let JupiterDynamicForm = class extends LitElement {
3375
4817
 
3376
4818
  <!-- Form Actions - Fixed Footer -->
3377
4819
  <div class="form-actions">
4820
+ <!-- Filter Roles Button (shown when more than 10 roles) -->
4821
+ ${this._shouldShowFilterButton() ? html`
4822
+ <button
4823
+ class="filter-roles-button"
4824
+ @click="${this._handleFilterRolesClick}"
4825
+ ?disabled="${this.disabled || this.readonly}"
4826
+ >
4827
+ <svg class="filter-icon" viewBox="0 0 24 24">
4828
+ <path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>
4829
+ </svg>
4830
+ Filter Roles
4831
+ <span class="roles-count">${this._selectedRoleIds.length}/${this._allSections.length}</span>
4832
+ </button>
4833
+ ` : ""}
4834
+
3378
4835
  <button
3379
4836
  class="btn-secondary"
3380
4837
  @click="${this._handleSaveDraft}"
@@ -3397,6 +4854,18 @@ let JupiterDynamicForm = class extends LitElement {
3397
4854
  <span>Valid: ${this._valid ? "Yes" : "No"}</span>
3398
4855
  </div>
3399
4856
  </div>
4857
+
4858
+ <!-- Filter Roles Dialog -->
4859
+ ${this._showFilterDialog ? html`
4860
+ <jupiter-filter-roles-dialog
4861
+ ?open="${this._showFilterDialog}"
4862
+ .availableRoles="${this._allSections}"
4863
+ .selectedRoleIds="${this._selectedRoleIds}"
4864
+ @dialog-cancel="${this._handleFilterDialogCancel}"
4865
+ @roles-filter-apply="${this._handleRoleFilterApply}"
4866
+ @click="${this._handleFilterDialogCancel}"
4867
+ ></jupiter-filter-roles-dialog>
4868
+ ` : ""}
3400
4869
  </div>
3401
4870
  `;
3402
4871
  }
@@ -3531,67 +5000,124 @@ JupiterDynamicForm.styles = css`
3531
5000
  color: var(--jupiter-text-secondary, #666);
3532
5001
  margin-left: auto;
3533
5002
  }
5003
+
5004
+ .filter-roles-button {
5005
+ display: flex;
5006
+ align-items: center;
5007
+ gap: 8px;
5008
+ padding: 8px 16px;
5009
+ background: transparent;
5010
+ border: 1px solid var(--jupiter-primary-color, #1976d2);
5011
+ color: var(--jupiter-primary-color, #1976d2);
5012
+ border-radius: 4px;
5013
+ font-size: 13px;
5014
+ font-weight: 500;
5015
+ cursor: pointer;
5016
+ transition: all 0.2s ease;
5017
+ margin-right: auto;
5018
+ }
5019
+
5020
+ .filter-roles-button:hover:not(:disabled) {
5021
+ background: var(--jupiter-primary-color, #1976d2);
5022
+ color: white;
5023
+ }
5024
+
5025
+ .filter-roles-button .filter-icon {
5026
+ width: 16px;
5027
+ height: 16px;
5028
+ fill: currentColor;
5029
+ }
5030
+
5031
+ .roles-count {
5032
+ display: inline-flex;
5033
+ align-items: center;
5034
+ background: var(--jupiter-primary-color, #1976d2);
5035
+ color: white;
5036
+ border-radius: 10px;
5037
+ font-size: 11px;
5038
+ font-weight: 600;
5039
+ padding: 2px 6px;
5040
+ margin-left: 4px;
5041
+ min-width: 18px;
5042
+ justify-content: center;
5043
+ }
3534
5044
  `;
3535
5045
  __decorateClass([
3536
- n2({ type: Object })
5046
+ n$1({ type: Object })
3537
5047
  ], JupiterDynamicForm.prototype, "schema", 2);
3538
5048
  __decorateClass([
3539
- n2({ type: Object })
5049
+ n$1({ type: Object })
3540
5050
  ], JupiterDynamicForm.prototype, "xbrlInput", 2);
3541
5051
  __decorateClass([
3542
- n2({ type: Object })
5052
+ n$1({ type: Object })
3543
5053
  ], JupiterDynamicForm.prototype, "config", 2);
3544
5054
  __decorateClass([
3545
- n2({ type: Object })
5055
+ n$1({ type: Object })
3546
5056
  ], JupiterDynamicForm.prototype, "initialData", 2);
3547
5057
  __decorateClass([
3548
- n2({ type: Boolean })
5058
+ n$1({ type: Boolean })
3549
5059
  ], JupiterDynamicForm.prototype, "disabled", 2);
3550
5060
  __decorateClass([
3551
- n2({ type: Boolean })
5061
+ n$1({ type: Boolean })
3552
5062
  ], JupiterDynamicForm.prototype, "readonly", 2);
3553
5063
  __decorateClass([
3554
- n2({ type: String })
5064
+ n$1({ type: String })
3555
5065
  ], JupiterDynamicForm.prototype, "periodStartDate", 2);
3556
5066
  __decorateClass([
3557
- n2({ type: String })
5067
+ n$1({ type: String })
3558
5068
  ], JupiterDynamicForm.prototype, "periodEndDate", 2);
3559
5069
  __decorateClass([
3560
- r()
5070
+ r$1()
3561
5071
  ], JupiterDynamicForm.prototype, "_formData", 2);
3562
5072
  __decorateClass([
3563
- r()
5073
+ r$1()
5074
+ ], JupiterDynamicForm.prototype, "_preservedFormData", 2);
5075
+ __decorateClass([
5076
+ r$1()
5077
+ ], JupiterDynamicForm.prototype, "_typedMemberData", 2);
5078
+ __decorateClass([
5079
+ r$1()
5080
+ ], JupiterDynamicForm.prototype, "_preservedTypedMemberData", 2);
5081
+ __decorateClass([
5082
+ r$1()
3564
5083
  ], JupiterDynamicForm.prototype, "_columns", 2);
3565
5084
  __decorateClass([
3566
- r()
5085
+ r$1()
3567
5086
  ], JupiterDynamicForm.prototype, "_errors", 2);
3568
5087
  __decorateClass([
3569
- r()
5088
+ r$1()
3570
5089
  ], JupiterDynamicForm.prototype, "_touched", 2);
3571
5090
  __decorateClass([
3572
- r()
5091
+ r$1()
3573
5092
  ], JupiterDynamicForm.prototype, "_dirty", 2);
3574
5093
  __decorateClass([
3575
- r()
5094
+ r$1()
3576
5095
  ], JupiterDynamicForm.prototype, "_valid", 2);
3577
5096
  __decorateClass([
3578
- r()
5097
+ r$1()
3579
5098
  ], JupiterDynamicForm.prototype, "_submitted", 2);
3580
5099
  __decorateClass([
3581
- r()
5100
+ r$1()
3582
5101
  ], JupiterDynamicForm.prototype, "_currentSchema", 2);
3583
5102
  __decorateClass([
3584
- r()
3585
- ], JupiterDynamicForm.prototype, "_typedMemberValues", 2);
5103
+ r$1()
5104
+ ], JupiterDynamicForm.prototype, "_allSections", 2);
5105
+ __decorateClass([
5106
+ r$1()
5107
+ ], JupiterDynamicForm.prototype, "_selectedRoleIds", 2);
5108
+ __decorateClass([
5109
+ r$1()
5110
+ ], JupiterDynamicForm.prototype, "_showFilterDialog", 2);
3586
5111
  JupiterDynamicForm = __decorateClass([
3587
- t$1("jupiter-dynamic-form")
5112
+ t$3("jupiter-dynamic-form")
3588
5113
  ], JupiterDynamicForm);
3589
- const version = "1.0.0";
5114
+ const version = "1.5.0";
3590
5115
  export {
3591
5116
  FormValidator,
3592
5117
  JupiterAddColumnDialog,
3593
5118
  JupiterConceptTree,
3594
5119
  JupiterDynamicForm,
5120
+ JupiterFilterRolesDialog,
3595
5121
  JupiterFormField,
3596
5122
  JupiterFormSection,
3597
5123
  version