jupiter-dynamic-forms 1.6.1 → 1.7.0
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/core/add-column-dialog.d.ts +29 -1
- package/dist/core/add-column-dialog.d.ts.map +1 -1
- package/dist/core/dynamic-form.d.ts +1 -0
- package/dist/core/dynamic-form.d.ts.map +1 -1
- package/dist/core/filter-roles-dialog.d.ts +1 -0
- package/dist/core/filter-roles-dialog.d.ts.map +1 -1
- package/dist/core/form-section.d.ts +2 -0
- package/dist/core/form-section.d.ts.map +1 -1
- package/dist/index.js +195 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +466 -426
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -2
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$
|
|
7
|
+
const t$1 = (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$3 = (t2) => (e2, o2) => {
|
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const t
|
|
18
|
-
let n$
|
|
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 {
|
|
19
19
|
constructor(t2, e2, o2) {
|
|
20
|
-
if (this._$cssResult$ = true, o2 !== s
|
|
20
|
+
if (this._$cssResult$ = true, o2 !== s)
|
|
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$
|
|
27
|
+
if (e$1 && void 0 === t2) {
|
|
28
28
|
const e2 = void 0 !== s2 && 1 === s2.length;
|
|
29
|
-
e2 && (t2 = o$
|
|
29
|
+
e2 && (t2 = o$2.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && o$2.set(s2, t2));
|
|
30
30
|
}
|
|
31
31
|
return t2;
|
|
32
32
|
}
|
|
@@ -34,29 +34,29 @@ let n$3 = class n {
|
|
|
34
34
|
return this.cssText;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
const r$
|
|
38
|
-
if (e$
|
|
37
|
+
const r$3 = (t2) => new n$2("string" == typeof t2 ? t2 : t2 + "", void 0, s), S = (s2, o2) => {
|
|
38
|
+
if (e$1)
|
|
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
|
|
42
|
+
const o3 = document.createElement("style"), n3 = t.litNonce;
|
|
43
43
|
void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
|
|
44
44
|
}
|
|
45
|
-
}, c$
|
|
45
|
+
}, c$1 = e$1 ? (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$
|
|
49
|
+
return r$3(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
|
|
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) {
|
|
57
57
|
switch (s2) {
|
|
58
58
|
case Boolean:
|
|
59
|
-
t2 = t2 ? l
|
|
59
|
+
t2 = t2 ? l : null;
|
|
60
60
|
break;
|
|
61
61
|
case Object:
|
|
62
62
|
case Array:
|
|
@@ -81,8 +81,8 @@ const { is: i$2, defineProperty: e$3, getOwnPropertyDescriptor: h$1, getOwnPrope
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
return i2;
|
|
84
|
-
} }, f
|
|
85
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a
|
|
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());
|
|
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
|
|
96
|
+
void 0 !== h2 && e(this.prototype, t2, h2);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
static getPropertyDescriptor(t2, s2, i2) {
|
|
100
|
-
const { get: e2, set: r2 } = h
|
|
100
|
+
const { get: e2, set: r2 } = h(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
|
|
114
|
+
if (this.hasOwnProperty(d("elementProperties")))
|
|
115
115
|
return;
|
|
116
|
-
const t2 = n$
|
|
116
|
+
const t2 = n$1(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
|
|
120
|
+
if (this.hasOwnProperty(d("finalized")))
|
|
121
121
|
return;
|
|
122
|
-
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d
|
|
123
|
-
const t3 = this.properties, s2 = [...r$
|
|
122
|
+
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
|
|
123
|
+
const t3 = this.properties, s2 = [...r$2(t3), ...o$1(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$
|
|
146
|
+
i2.unshift(c$1(s3));
|
|
147
147
|
} else
|
|
148
|
-
void 0 !== s2 && i2.push(c$
|
|
148
|
+
void 0 !== s2 && i2.push(c$1(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
|
|
178
|
+
return S(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
|
|
203
|
+
const h2 = (void 0 !== ((_a = i2.converter) == null ? void 0 : _a.toAttribute) ? i2.converter : u).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;
|
|
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
|
|
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))))
|
|
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
|
|
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");
|
|
302
302
|
/**
|
|
303
303
|
* @license
|
|
304
304
|
* Copyright 2017 Google LLC
|
|
305
305
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
306
306
|
*/
|
|
307
|
-
const o
|
|
307
|
+
const o = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f }, r$1 = (t2 = o, 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$2 = { attribute: true, type: String, converter: u$1, reflect: false, has
|
|
|
325
325
|
}
|
|
326
326
|
throw Error("Unsupported decorator location: " + n3);
|
|
327
327
|
};
|
|
328
|
-
function
|
|
329
|
-
return (e2, o2) => "object" == typeof o2 ? r$
|
|
328
|
+
function n2(t2) {
|
|
329
|
+
return (e2, o2) => "object" == typeof o2 ? r$1(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 n$1(t2) {
|
|
|
336
336
|
* Copyright 2017 Google LLC
|
|
337
337
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
338
338
|
*/
|
|
339
|
-
function r
|
|
340
|
-
return
|
|
339
|
+
function r(r2) {
|
|
340
|
+
return n2({ ...r2, state: true, attribute: false });
|
|
341
341
|
}
|
|
342
342
|
class FormValidator {
|
|
343
343
|
/**
|
|
@@ -1826,34 +1826,34 @@ JupiterFormField.styles = css`
|
|
|
1826
1826
|
}
|
|
1827
1827
|
`;
|
|
1828
1828
|
__decorateClass$5([
|
|
1829
|
-
|
|
1829
|
+
n2({ type: Object })
|
|
1830
1830
|
], JupiterFormField.prototype, "field", 2);
|
|
1831
1831
|
__decorateClass$5([
|
|
1832
|
-
|
|
1832
|
+
n2({ type: String })
|
|
1833
1833
|
], JupiterFormField.prototype, "conceptId", 2);
|
|
1834
1834
|
__decorateClass$5([
|
|
1835
|
-
|
|
1835
|
+
n2({ type: String })
|
|
1836
1836
|
], JupiterFormField.prototype, "columnId", 2);
|
|
1837
1837
|
__decorateClass$5([
|
|
1838
|
-
|
|
1838
|
+
n2()
|
|
1839
1839
|
], JupiterFormField.prototype, "value", 2);
|
|
1840
1840
|
__decorateClass$5([
|
|
1841
|
-
|
|
1841
|
+
n2({ type: Boolean })
|
|
1842
1842
|
], JupiterFormField.prototype, "disabled", 2);
|
|
1843
1843
|
__decorateClass$5([
|
|
1844
|
-
|
|
1844
|
+
n2({ type: String })
|
|
1845
1845
|
], JupiterFormField.prototype, "locale", 2);
|
|
1846
1846
|
__decorateClass$5([
|
|
1847
|
-
|
|
1847
|
+
n2({ type: Boolean })
|
|
1848
1848
|
], JupiterFormField.prototype, "hideLabel", 2);
|
|
1849
1849
|
__decorateClass$5([
|
|
1850
|
-
r
|
|
1850
|
+
r()
|
|
1851
1851
|
], JupiterFormField.prototype, "_errors", 2);
|
|
1852
1852
|
__decorateClass$5([
|
|
1853
|
-
r
|
|
1853
|
+
r()
|
|
1854
1854
|
], JupiterFormField.prototype, "_touched", 2);
|
|
1855
1855
|
JupiterFormField = __decorateClass$5([
|
|
1856
|
-
t$
|
|
1856
|
+
t$1("jupiter-form-field")
|
|
1857
1857
|
], JupiterFormField);
|
|
1858
1858
|
var __defProp$4 = Object.defineProperty;
|
|
1859
1859
|
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
@@ -2060,28 +2060,28 @@ JupiterConceptTree.styles = css`
|
|
|
2060
2060
|
|
|
2061
2061
|
`;
|
|
2062
2062
|
__decorateClass$4([
|
|
2063
|
-
|
|
2063
|
+
n2({ type: Object })
|
|
2064
2064
|
], JupiterConceptTree.prototype, "concept", 2);
|
|
2065
2065
|
__decorateClass$4([
|
|
2066
|
-
|
|
2066
|
+
n2({ type: Array })
|
|
2067
2067
|
], JupiterConceptTree.prototype, "columns", 2);
|
|
2068
2068
|
__decorateClass$4([
|
|
2069
|
-
|
|
2069
|
+
n2({ type: Object })
|
|
2070
2070
|
], JupiterConceptTree.prototype, "formData", 2);
|
|
2071
2071
|
__decorateClass$4([
|
|
2072
|
-
|
|
2072
|
+
n2({ type: Boolean })
|
|
2073
2073
|
], JupiterConceptTree.prototype, "disabled", 2);
|
|
2074
2074
|
__decorateClass$4([
|
|
2075
|
-
|
|
2075
|
+
n2({ type: String })
|
|
2076
2076
|
], JupiterConceptTree.prototype, "locale", 2);
|
|
2077
2077
|
__decorateClass$4([
|
|
2078
|
-
|
|
2078
|
+
n2({ type: Set })
|
|
2079
2079
|
], JupiterConceptTree.prototype, "expandedConcepts", 2);
|
|
2080
2080
|
__decorateClass$4([
|
|
2081
|
-
r
|
|
2081
|
+
r()
|
|
2082
2082
|
], JupiterConceptTree.prototype, "_expanded", 2);
|
|
2083
2083
|
JupiterConceptTree = __decorateClass$4([
|
|
2084
|
-
t$
|
|
2084
|
+
t$1("jupiter-concept-tree")
|
|
2085
2085
|
], JupiterConceptTree);
|
|
2086
2086
|
var __defProp$3 = Object.defineProperty;
|
|
2087
2087
|
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
@@ -2099,15 +2099,20 @@ let JupiterAddColumnDialog = class extends LitElement {
|
|
|
2099
2099
|
super(...arguments);
|
|
2100
2100
|
this.periodType = "duration";
|
|
2101
2101
|
this.open = false;
|
|
2102
|
+
this.availableDimensions = [];
|
|
2102
2103
|
this._startDate = "";
|
|
2103
2104
|
this._endDate = "";
|
|
2104
2105
|
this._instantDate = "";
|
|
2105
2106
|
this._selectedType = "duration";
|
|
2107
|
+
this._selectedDimensions = /* @__PURE__ */ new Map();
|
|
2106
2108
|
}
|
|
2107
2109
|
updated(changedProperties) {
|
|
2108
2110
|
if (changedProperties.has("open") && this.open) {
|
|
2109
2111
|
this._resetForm();
|
|
2110
2112
|
}
|
|
2113
|
+
if (changedProperties.has("availableDimensions")) {
|
|
2114
|
+
console.log(`🎯 Add Column Dialog received ${this.availableDimensions.length} dimensions:`, this.availableDimensions.map((d2) => d2.axisLabel));
|
|
2115
|
+
}
|
|
2111
2116
|
}
|
|
2112
2117
|
connectedCallback() {
|
|
2113
2118
|
super.connectedCallback();
|
|
@@ -2119,13 +2124,6 @@ let JupiterAddColumnDialog = class extends LitElement {
|
|
|
2119
2124
|
this._resetForm();
|
|
2120
2125
|
}
|
|
2121
2126
|
}
|
|
2122
|
-
_resetForm() {
|
|
2123
|
-
const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
2124
|
-
this._startDate = today;
|
|
2125
|
-
this._endDate = today;
|
|
2126
|
-
this._instantDate = today;
|
|
2127
|
-
this._selectedType = "duration";
|
|
2128
|
-
}
|
|
2129
2127
|
_handleCancel() {
|
|
2130
2128
|
this.open = false;
|
|
2131
2129
|
this.dispatchEvent(new CustomEvent("dialog-cancel", { bubbles: true }));
|
|
@@ -2142,6 +2140,9 @@ let JupiterAddColumnDialog = class extends LitElement {
|
|
|
2142
2140
|
request.startDate = this._startDate;
|
|
2143
2141
|
request.endDate = this._endDate;
|
|
2144
2142
|
}
|
|
2143
|
+
if (this._selectedDimensions.size > 0) {
|
|
2144
|
+
request.selectedDimensions = Array.from(this._selectedDimensions.values());
|
|
2145
|
+
}
|
|
2145
2146
|
this.dispatchEvent(new CustomEvent("column-add", {
|
|
2146
2147
|
detail: request,
|
|
2147
2148
|
bubbles: true
|
|
@@ -2173,6 +2174,49 @@ let JupiterAddColumnDialog = class extends LitElement {
|
|
|
2173
2174
|
_handleInstantDateChange(e2) {
|
|
2174
2175
|
this._instantDate = e2.target.value;
|
|
2175
2176
|
}
|
|
2177
|
+
_handleDimensionToggle(dimensionId, event) {
|
|
2178
|
+
const checkbox = event.target;
|
|
2179
|
+
if (checkbox.checked) {
|
|
2180
|
+
const dimension = this.availableDimensions.find((d2) => d2.id === dimensionId);
|
|
2181
|
+
if (dimension) {
|
|
2182
|
+
const selection = {
|
|
2183
|
+
axisId: dimension.id,
|
|
2184
|
+
axisLabel: dimension.axisLabel,
|
|
2185
|
+
isTyped: !!(dimension.typedMember && (!dimension.members || dimension.members.length === 0))
|
|
2186
|
+
};
|
|
2187
|
+
this._selectedDimensions.set(dimensionId, selection);
|
|
2188
|
+
}
|
|
2189
|
+
} else {
|
|
2190
|
+
this._selectedDimensions.delete(dimensionId);
|
|
2191
|
+
}
|
|
2192
|
+
this.requestUpdate();
|
|
2193
|
+
}
|
|
2194
|
+
_handleMemberSelection(dimensionId, memberId, memberLabel) {
|
|
2195
|
+
const existing = this._selectedDimensions.get(dimensionId);
|
|
2196
|
+
if (existing) {
|
|
2197
|
+
existing.memberId = memberId;
|
|
2198
|
+
existing.memberLabel = memberLabel;
|
|
2199
|
+
this._selectedDimensions.set(dimensionId, existing);
|
|
2200
|
+
this.requestUpdate();
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
_handleTypedValueChange(dimensionId, event) {
|
|
2204
|
+
const input = event.target;
|
|
2205
|
+
const existing = this._selectedDimensions.get(dimensionId);
|
|
2206
|
+
if (existing) {
|
|
2207
|
+
existing.typedValue = input.value;
|
|
2208
|
+
this._selectedDimensions.set(dimensionId, existing);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
_resetForm() {
|
|
2212
|
+
const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
2213
|
+
this._startDate = today;
|
|
2214
|
+
this._endDate = today;
|
|
2215
|
+
this._instantDate = today;
|
|
2216
|
+
this._selectedType = this.periodType === "instant" ? "instant" : "duration";
|
|
2217
|
+
this._selectedDimensions.clear();
|
|
2218
|
+
this.requestUpdate();
|
|
2219
|
+
}
|
|
2176
2220
|
render() {
|
|
2177
2221
|
if (!this.open)
|
|
2178
2222
|
return html``;
|
|
@@ -2235,6 +2279,79 @@ let JupiterAddColumnDialog = class extends LitElement {
|
|
|
2235
2279
|
/>
|
|
2236
2280
|
</div>
|
|
2237
2281
|
`}
|
|
2282
|
+
|
|
2283
|
+
<!-- Dimensions Section -->
|
|
2284
|
+
${this.availableDimensions.length > 0 ? html`
|
|
2285
|
+
<div class="dimensions-section">
|
|
2286
|
+
<h3>Available Dimensions</h3>
|
|
2287
|
+
<p class="form-description">Select dimensions to include in the column. You can choose specific members or enter typed values.</p>
|
|
2288
|
+
|
|
2289
|
+
${this.availableDimensions.map((dimension) => {
|
|
2290
|
+
const isSelected = this._selectedDimensions.has(dimension.id);
|
|
2291
|
+
const selection = this._selectedDimensions.get(dimension.id);
|
|
2292
|
+
const isTypedDimension = !!(dimension.typedMember && (!dimension.members || dimension.members.length === 0));
|
|
2293
|
+
return html`
|
|
2294
|
+
<div class="dimension-item">
|
|
2295
|
+
<div class="dimension-header">
|
|
2296
|
+
<input
|
|
2297
|
+
type="checkbox"
|
|
2298
|
+
class="dimension-checkbox"
|
|
2299
|
+
.checked="${isSelected}"
|
|
2300
|
+
@change="${(e2) => this._handleDimensionToggle(dimension.id, e2)}"
|
|
2301
|
+
id="dim-${dimension.id}"
|
|
2302
|
+
/>
|
|
2303
|
+
<label for="dim-${dimension.id}" class="dimension-label">
|
|
2304
|
+
${dimension.axisLabel || dimension.conceptName}
|
|
2305
|
+
</label>
|
|
2306
|
+
</div>
|
|
2307
|
+
|
|
2308
|
+
${isSelected ? html`
|
|
2309
|
+
<div class="dimension-details">
|
|
2310
|
+
${isTypedDimension ? html`
|
|
2311
|
+
<!-- Typed Dimension Input -->
|
|
2312
|
+
<div class="member-selection">
|
|
2313
|
+
<label>Enter value for ${dimension.conceptName}:</label>
|
|
2314
|
+
<input
|
|
2315
|
+
type="text"
|
|
2316
|
+
class="typed-input"
|
|
2317
|
+
.value="${(selection == null ? void 0 : selection.typedValue) || ""}"
|
|
2318
|
+
@input="${(e2) => this._handleTypedValueChange(dimension.id, e2)}"
|
|
2319
|
+
placeholder="Enter value..."
|
|
2320
|
+
/>
|
|
2321
|
+
</div>
|
|
2322
|
+
` : html`
|
|
2323
|
+
<!-- Domain Members Selection -->
|
|
2324
|
+
${dimension.members && dimension.members.length > 0 ? html`
|
|
2325
|
+
<div class="member-selection">
|
|
2326
|
+
<label>Select member:</label>
|
|
2327
|
+
<div class="member-list">
|
|
2328
|
+
${dimension.members.map((member) => html`
|
|
2329
|
+
<div class="member-option">
|
|
2330
|
+
<input
|
|
2331
|
+
type="radio"
|
|
2332
|
+
name="member-${dimension.id}"
|
|
2333
|
+
.checked="${(selection == null ? void 0 : selection.memberId) === member.id}"
|
|
2334
|
+
@change="${() => this._handleMemberSelection(dimension.id, member.id, member.label)}"
|
|
2335
|
+
id="member-${dimension.id}-${member.id}"
|
|
2336
|
+
/>
|
|
2337
|
+
<label for="member-${dimension.id}-${member.id}">
|
|
2338
|
+
${member.label}
|
|
2339
|
+
</label>
|
|
2340
|
+
</div>
|
|
2341
|
+
`)}
|
|
2342
|
+
</div>
|
|
2343
|
+
</div>
|
|
2344
|
+
` : html`
|
|
2345
|
+
<p class="form-description">No members available for this dimension</p>
|
|
2346
|
+
`}
|
|
2347
|
+
`}
|
|
2348
|
+
</div>
|
|
2349
|
+
` : ""}
|
|
2350
|
+
</div>
|
|
2351
|
+
`;
|
|
2352
|
+
})}
|
|
2353
|
+
</div>
|
|
2354
|
+
` : ""}
|
|
2238
2355
|
</div>
|
|
2239
2356
|
|
|
2240
2357
|
<div class="dialog-actions">
|
|
@@ -2388,27 +2505,135 @@ JupiterAddColumnDialog.styles = css`
|
|
|
2388
2505
|
background: var(--jupiter-disabled-background, #ccc);
|
|
2389
2506
|
cursor: not-allowed;
|
|
2390
2507
|
}
|
|
2508
|
+
|
|
2509
|
+
/* Dimension Selection Styles */
|
|
2510
|
+
.dimensions-section {
|
|
2511
|
+
margin-top: 20px;
|
|
2512
|
+
padding-top: 20px;
|
|
2513
|
+
border-top: 1px solid var(--jupiter-border-color, #ddd);
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
.dimensions-section h3 {
|
|
2517
|
+
margin: 0 0 16px 0;
|
|
2518
|
+
font-size: 16px;
|
|
2519
|
+
font-weight: 500;
|
|
2520
|
+
color: var(--jupiter-text-primary, #333);
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
.dimension-item {
|
|
2524
|
+
margin-bottom: 16px;
|
|
2525
|
+
padding: 16px;
|
|
2526
|
+
border: 1px solid var(--jupiter-border-color, #ddd);
|
|
2527
|
+
border-radius: 4px;
|
|
2528
|
+
background: var(--jupiter-card-background, #fafafa);
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
.dimension-header {
|
|
2532
|
+
display: flex;
|
|
2533
|
+
align-items: center;
|
|
2534
|
+
gap: 12px;
|
|
2535
|
+
margin-bottom: 12px;
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
.dimension-checkbox {
|
|
2539
|
+
margin: 0;
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
.dimension-label {
|
|
2543
|
+
font-weight: 500;
|
|
2544
|
+
color: var(--jupiter-text-primary, #333);
|
|
2545
|
+
flex: 1;
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
.dimension-details {
|
|
2549
|
+
margin-left: 24px;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
.member-selection {
|
|
2553
|
+
margin-top: 12px;
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
.member-selection label {
|
|
2557
|
+
display: block;
|
|
2558
|
+
margin-bottom: 4px;
|
|
2559
|
+
font-size: 13px;
|
|
2560
|
+
color: var(--jupiter-text-secondary, #666);
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
.typed-input {
|
|
2564
|
+
width: 100%;
|
|
2565
|
+
padding: 8px 12px;
|
|
2566
|
+
border: 1px solid var(--jupiter-border-color, #ddd);
|
|
2567
|
+
border-radius: 4px;
|
|
2568
|
+
font-size: 14px;
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
.member-list {
|
|
2572
|
+
max-height: 120px;
|
|
2573
|
+
overflow-y: auto;
|
|
2574
|
+
border: 1px solid var(--jupiter-border-color, #ddd);
|
|
2575
|
+
border-radius: 4px;
|
|
2576
|
+
padding: 8px;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
.member-option {
|
|
2580
|
+
display: flex;
|
|
2581
|
+
align-items: center;
|
|
2582
|
+
gap: 8px;
|
|
2583
|
+
padding: 4px 0;
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2586
|
+
.member-option input[type="radio"] {
|
|
2587
|
+
margin: 0;
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
.member-option label {
|
|
2591
|
+
margin: 0;
|
|
2592
|
+
font-size: 13px;
|
|
2593
|
+
color: var(--jupiter-text-primary, #333);
|
|
2594
|
+
cursor: pointer;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
.no-dimensions {
|
|
2598
|
+
text-align: center;
|
|
2599
|
+
color: var(--jupiter-text-secondary, #666);
|
|
2600
|
+
font-style: italic;
|
|
2601
|
+
padding: 20px;
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
.form-description {
|
|
2605
|
+
font-size: 13px;
|
|
2606
|
+
color: var(--jupiter-text-secondary, #666);
|
|
2607
|
+
margin: 0 0 12px 0;
|
|
2608
|
+
line-height: 1.4;
|
|
2609
|
+
}
|
|
2391
2610
|
`;
|
|
2392
2611
|
__decorateClass$3([
|
|
2393
|
-
|
|
2612
|
+
n2({ type: String })
|
|
2394
2613
|
], JupiterAddColumnDialog.prototype, "periodType", 2);
|
|
2395
2614
|
__decorateClass$3([
|
|
2396
|
-
|
|
2615
|
+
n2({ type: Boolean })
|
|
2397
2616
|
], JupiterAddColumnDialog.prototype, "open", 2);
|
|
2398
2617
|
__decorateClass$3([
|
|
2399
|
-
|
|
2618
|
+
n2({ type: Array })
|
|
2619
|
+
], JupiterAddColumnDialog.prototype, "availableDimensions", 2);
|
|
2620
|
+
__decorateClass$3([
|
|
2621
|
+
r()
|
|
2400
2622
|
], JupiterAddColumnDialog.prototype, "_startDate", 2);
|
|
2401
2623
|
__decorateClass$3([
|
|
2402
|
-
r
|
|
2624
|
+
r()
|
|
2403
2625
|
], JupiterAddColumnDialog.prototype, "_endDate", 2);
|
|
2404
2626
|
__decorateClass$3([
|
|
2405
|
-
r
|
|
2627
|
+
r()
|
|
2406
2628
|
], JupiterAddColumnDialog.prototype, "_instantDate", 2);
|
|
2407
2629
|
__decorateClass$3([
|
|
2408
|
-
r
|
|
2630
|
+
r()
|
|
2409
2631
|
], JupiterAddColumnDialog.prototype, "_selectedType", 2);
|
|
2632
|
+
__decorateClass$3([
|
|
2633
|
+
r()
|
|
2634
|
+
], JupiterAddColumnDialog.prototype, "_selectedDimensions", 2);
|
|
2410
2635
|
JupiterAddColumnDialog = __decorateClass$3([
|
|
2411
|
-
t$
|
|
2636
|
+
t$1("jupiter-add-column-dialog")
|
|
2412
2637
|
], JupiterAddColumnDialog);
|
|
2413
2638
|
var __defProp$2 = Object.defineProperty;
|
|
2414
2639
|
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
@@ -2430,6 +2655,7 @@ let JupiterFormSection = class extends LitElement {
|
|
|
2430
2655
|
this.disabled = false;
|
|
2431
2656
|
this.collapsible = true;
|
|
2432
2657
|
this.locale = "en-US";
|
|
2658
|
+
this.availableDimensions = [];
|
|
2433
2659
|
this._expanded = true;
|
|
2434
2660
|
this._showAddColumnDialog = false;
|
|
2435
2661
|
this._sectionPeriodType = "duration";
|
|
@@ -2720,6 +2946,7 @@ let JupiterFormSection = class extends LitElement {
|
|
|
2720
2946
|
<jupiter-add-column-dialog
|
|
2721
2947
|
.periodType="${this._sectionPeriodType}"
|
|
2722
2948
|
?open="${this._showAddColumnDialog}"
|
|
2949
|
+
.availableDimensions="${this.availableDimensions}"
|
|
2723
2950
|
@dialog-cancel="${this._handleDialogCancel}"
|
|
2724
2951
|
@column-add="${this._handleColumnAdd}"
|
|
2725
2952
|
></jupiter-add-column-dialog>
|
|
@@ -2949,331 +3176,44 @@ JupiterFormSection.styles = css`
|
|
|
2949
3176
|
}
|
|
2950
3177
|
`;
|
|
2951
3178
|
__decorateClass$2([
|
|
2952
|
-
|
|
3179
|
+
n2({ type: Object })
|
|
2953
3180
|
], JupiterFormSection.prototype, "section", 2);
|
|
2954
3181
|
__decorateClass$2([
|
|
2955
|
-
|
|
3182
|
+
n2({ type: Array })
|
|
2956
3183
|
], JupiterFormSection.prototype, "columns", 2);
|
|
2957
3184
|
__decorateClass$2([
|
|
2958
|
-
|
|
3185
|
+
n2({ type: Object })
|
|
2959
3186
|
], JupiterFormSection.prototype, "formData", 2);
|
|
2960
3187
|
__decorateClass$2([
|
|
2961
|
-
|
|
3188
|
+
n2({ type: Object })
|
|
2962
3189
|
], JupiterFormSection.prototype, "typedMemberData", 2);
|
|
2963
3190
|
__decorateClass$2([
|
|
2964
|
-
|
|
3191
|
+
n2({ type: Boolean })
|
|
2965
3192
|
], JupiterFormSection.prototype, "disabled", 2);
|
|
2966
3193
|
__decorateClass$2([
|
|
2967
|
-
|
|
3194
|
+
n2({ type: Boolean })
|
|
2968
3195
|
], JupiterFormSection.prototype, "collapsible", 2);
|
|
2969
3196
|
__decorateClass$2([
|
|
2970
|
-
|
|
3197
|
+
n2({ type: String })
|
|
2971
3198
|
], JupiterFormSection.prototype, "locale", 2);
|
|
2972
3199
|
__decorateClass$2([
|
|
2973
|
-
|
|
3200
|
+
n2({ type: Array })
|
|
3201
|
+
], JupiterFormSection.prototype, "availableDimensions", 2);
|
|
3202
|
+
__decorateClass$2([
|
|
3203
|
+
r()
|
|
2974
3204
|
], JupiterFormSection.prototype, "_expanded", 2);
|
|
2975
3205
|
__decorateClass$2([
|
|
2976
|
-
r
|
|
3206
|
+
r()
|
|
2977
3207
|
], JupiterFormSection.prototype, "_showAddColumnDialog", 2);
|
|
2978
3208
|
__decorateClass$2([
|
|
2979
|
-
r
|
|
3209
|
+
r()
|
|
2980
3210
|
], JupiterFormSection.prototype, "_sectionPeriodType", 2);
|
|
2981
3211
|
__decorateClass$2([
|
|
2982
|
-
r
|
|
3212
|
+
r()
|
|
2983
3213
|
], JupiterFormSection.prototype, "_expandedConcepts", 2);
|
|
2984
3214
|
JupiterFormSection = __decorateClass$2([
|
|
2985
|
-
t$
|
|
3215
|
+
t$1("jupiter-form-section")
|
|
2986
3216
|
], JupiterFormSection);
|
|
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];
|
|
3011
|
-
};
|
|
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
3217
|
var __defProp$1 = Object.defineProperty;
|
|
3278
3218
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
3279
3219
|
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
@@ -3359,6 +3299,9 @@ let JupiterFilterRolesDialog = class extends LitElement {
|
|
|
3359
3299
|
const regex = new RegExp(`(${query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
|
|
3360
3300
|
return text.replace(regex, "<mark>$1</mark>");
|
|
3361
3301
|
}
|
|
3302
|
+
_renderHighlightedText(text) {
|
|
3303
|
+
return text;
|
|
3304
|
+
}
|
|
3362
3305
|
_getSelectedFilteredCount() {
|
|
3363
3306
|
return this._filteredRoles.filter((role) => this._tempSelectedRoles.has(role.id)).length;
|
|
3364
3307
|
}
|
|
@@ -3521,15 +3464,15 @@ let JupiterFilterRolesDialog = class extends LitElement {
|
|
|
3521
3464
|
@change="${(e2) => this._handleCheckboxChange(e2, role.id)}"
|
|
3522
3465
|
/>
|
|
3523
3466
|
<div class="role-info">
|
|
3524
|
-
<h4 class="role-title">${
|
|
3467
|
+
<h4 class="role-title">${role.title}</h4>
|
|
3525
3468
|
${role.description ? html`
|
|
3526
|
-
<p class="role-description">${
|
|
3469
|
+
<p class="role-description">${role.description}</p>
|
|
3527
3470
|
` : ""}
|
|
3528
3471
|
${role.id !== role.title ? html`
|
|
3529
|
-
<p class="role-description">ID: ${
|
|
3472
|
+
<p class="role-description">ID: ${role.id}</p>
|
|
3530
3473
|
` : ""}
|
|
3531
3474
|
${((_a = role.metadata) == null ? void 0 : _a.roleURI) ? html`
|
|
3532
|
-
<p class="role-description">URI: ${
|
|
3475
|
+
<p class="role-description">URI: ${role.metadata.roleURI}</p>
|
|
3533
3476
|
` : ""}
|
|
3534
3477
|
</div>
|
|
3535
3478
|
</div>
|
|
@@ -3852,25 +3795,25 @@ JupiterFilterRolesDialog.styles = css`
|
|
|
3852
3795
|
}
|
|
3853
3796
|
`;
|
|
3854
3797
|
__decorateClass$1([
|
|
3855
|
-
|
|
3798
|
+
n2({ type: Boolean, reflect: true })
|
|
3856
3799
|
], JupiterFilterRolesDialog.prototype, "open", 2);
|
|
3857
3800
|
__decorateClass$1([
|
|
3858
|
-
|
|
3801
|
+
n2({ type: Array })
|
|
3859
3802
|
], JupiterFilterRolesDialog.prototype, "availableRoles", 2);
|
|
3860
3803
|
__decorateClass$1([
|
|
3861
|
-
|
|
3804
|
+
n2({ type: Array })
|
|
3862
3805
|
], JupiterFilterRolesDialog.prototype, "selectedRoleIds", 2);
|
|
3863
3806
|
__decorateClass$1([
|
|
3864
|
-
r
|
|
3807
|
+
r()
|
|
3865
3808
|
], JupiterFilterRolesDialog.prototype, "_tempSelectedRoles", 2);
|
|
3866
3809
|
__decorateClass$1([
|
|
3867
|
-
r
|
|
3810
|
+
r()
|
|
3868
3811
|
], JupiterFilterRolesDialog.prototype, "_searchQuery", 2);
|
|
3869
3812
|
__decorateClass$1([
|
|
3870
|
-
r
|
|
3813
|
+
r()
|
|
3871
3814
|
], JupiterFilterRolesDialog.prototype, "_filteredRoles", 2);
|
|
3872
3815
|
JupiterFilterRolesDialog = __decorateClass$1([
|
|
3873
|
-
t$
|
|
3816
|
+
t$1("jupiter-filter-roles-dialog")
|
|
3874
3817
|
], JupiterFilterRolesDialog);
|
|
3875
3818
|
var __defProp = Object.defineProperty;
|
|
3876
3819
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -4203,6 +4146,56 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
4203
4146
|
const { sectionId, columnRequest } = event.detail;
|
|
4204
4147
|
this._addColumnFromRequest(columnRequest, sectionId);
|
|
4205
4148
|
}
|
|
4149
|
+
_getAvailableDimensionsForSection(sectionId) {
|
|
4150
|
+
var _a, _b, _c;
|
|
4151
|
+
console.log(`🔍 Getting dimensions for section: ${sectionId}`);
|
|
4152
|
+
if (!((_b = (_a = this.xbrlInput) == null ? void 0 : _a.hypercubes) == null ? void 0 : _b[0])) {
|
|
4153
|
+
console.log("❌ No hypercubes data available");
|
|
4154
|
+
return [];
|
|
4155
|
+
}
|
|
4156
|
+
console.log(`📊 Available hypercube roles:`, this.xbrlInput.hypercubes[0].roles.map((r2) => r2.roleId));
|
|
4157
|
+
const hypercubeRole = this.xbrlInput.hypercubes[0].roles.find((hr) => hr.roleId === sectionId);
|
|
4158
|
+
if (!((_c = hypercubeRole == null ? void 0 : hypercubeRole.items) == null ? void 0 : _c.length)) {
|
|
4159
|
+
console.log(`❌ No hypercube items found for role: ${sectionId}`);
|
|
4160
|
+
return [];
|
|
4161
|
+
}
|
|
4162
|
+
console.log(`✅ Found hypercube role with ${hypercubeRole.items.length} items`);
|
|
4163
|
+
const availableDimensions = [];
|
|
4164
|
+
hypercubeRole.items.forEach((item) => {
|
|
4165
|
+
if (item.dimensions && item.dimensions.length > 0) {
|
|
4166
|
+
item.dimensions.forEach((dimension) => {
|
|
4167
|
+
var _a2;
|
|
4168
|
+
if (!availableDimensions.find((d2) => d2.id === dimension.id)) {
|
|
4169
|
+
const axisLabel = ((_a2 = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _a2.label) || dimension.conceptName;
|
|
4170
|
+
const availableDimension = {
|
|
4171
|
+
id: dimension.id,
|
|
4172
|
+
conceptName: dimension.conceptName,
|
|
4173
|
+
axisLabel
|
|
4174
|
+
};
|
|
4175
|
+
if (dimension.members && dimension.members.length > 0) {
|
|
4176
|
+
availableDimension.members = dimension.members.map((member) => {
|
|
4177
|
+
var _a3, _b2;
|
|
4178
|
+
return {
|
|
4179
|
+
id: member.id,
|
|
4180
|
+
label: ((_b2 = (_a3 = member.labels) == null ? void 0 : _a3.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _b2.label) || member.conceptName || member.id
|
|
4181
|
+
};
|
|
4182
|
+
});
|
|
4183
|
+
}
|
|
4184
|
+
if (dimension.typedMember) {
|
|
4185
|
+
availableDimension.typedMember = {
|
|
4186
|
+
id: dimension.typedMember.id,
|
|
4187
|
+
dataType: "string"
|
|
4188
|
+
// Default to string for now
|
|
4189
|
+
};
|
|
4190
|
+
}
|
|
4191
|
+
availableDimensions.push(availableDimension);
|
|
4192
|
+
}
|
|
4193
|
+
});
|
|
4194
|
+
}
|
|
4195
|
+
});
|
|
4196
|
+
console.log(`📈 Found ${availableDimensions.length} dimensions for section ${sectionId}:`, availableDimensions.map((d2) => d2.axisLabel));
|
|
4197
|
+
return availableDimensions;
|
|
4198
|
+
}
|
|
4206
4199
|
_addColumnFromRequest(request, sectionId) {
|
|
4207
4200
|
var _a, _b, _c, _d, _e;
|
|
4208
4201
|
const timestamp = Date.now();
|
|
@@ -4221,30 +4214,57 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
4221
4214
|
memberValue: request.periodType === "instant" ? `instant-${request.instantDate}` : `duration-${request.startDate}-${request.endDate}`,
|
|
4222
4215
|
memberLabel: title
|
|
4223
4216
|
};
|
|
4224
|
-
if (
|
|
4225
|
-
const
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
if (
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4217
|
+
if (request.selectedDimensions && request.selectedDimensions.length > 0) {
|
|
4218
|
+
const dimensionParts = [];
|
|
4219
|
+
const dimensionKeys = [];
|
|
4220
|
+
for (const dimSelection of request.selectedDimensions) {
|
|
4221
|
+
if (dimSelection.isTyped && dimSelection.typedValue) {
|
|
4222
|
+
dimensionParts.push(`${dimSelection.axisLabel}: ${dimSelection.typedValue}`);
|
|
4223
|
+
dimensionKeys.push(`${dimSelection.axisId}|${dimSelection.typedValue}`);
|
|
4224
|
+
} else if (dimSelection.memberId && dimSelection.memberLabel) {
|
|
4225
|
+
dimensionParts.push(dimSelection.memberLabel);
|
|
4226
|
+
dimensionKeys.push(`${dimSelection.axisId}|${dimSelection.memberId}`);
|
|
4227
|
+
}
|
|
4228
|
+
}
|
|
4229
|
+
const periodPart = request.periodType === "instant" ? `(${request.instantDate})` : `(${request.startDate} / ${request.endDate})`;
|
|
4230
|
+
if (dimensionParts.length > 0) {
|
|
4231
|
+
title = `${dimensionParts.join(" | ")} ${periodPart}`;
|
|
4232
|
+
dimensionData = {
|
|
4233
|
+
dimensionId: newColumnId,
|
|
4234
|
+
memberValue: dimensionParts.join(" | "),
|
|
4235
|
+
memberLabel: dimensionParts.join(" | "),
|
|
4236
|
+
memberKey: dimensionParts.join(" | "),
|
|
4237
|
+
dimensionIdKey: dimensionKeys.join("::"),
|
|
4238
|
+
selectedDimensions: request.selectedDimensions
|
|
4239
|
+
};
|
|
4240
|
+
console.log(`📊 Applied selected dimensions to new column: ${dimensionData.memberKey}`);
|
|
4241
|
+
}
|
|
4242
|
+
} else {
|
|
4243
|
+
if ((_b = (_a = this.xbrlInput) == null ? void 0 : _a.hypercubes) == null ? void 0 : _b[0]) {
|
|
4244
|
+
const hypercubeRole = this.xbrlInput.hypercubes[0].roles.find((hr) => hr.roleId === sectionId);
|
|
4245
|
+
if (((_c = hypercubeRole == null ? void 0 : hypercubeRole.items) == null ? void 0 : _c.length) === 1) {
|
|
4246
|
+
const item = hypercubeRole.items[0];
|
|
4247
|
+
if (item.dimensions.length === 1) {
|
|
4248
|
+
const dimension = item.dimensions[0];
|
|
4249
|
+
if (dimension.members && dimension.members.length > 0) {
|
|
4250
|
+
const axisLabel = ((_d = dimension.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _d.label) || dimension.conceptName;
|
|
4251
|
+
const firstMember = dimension.members[0];
|
|
4252
|
+
const memberLabel = ((_e = firstMember.labels.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _e.label) || firstMember.conceptName;
|
|
4253
|
+
const periodPart = request.periodType === "instant" ? `(${request.instantDate})` : `(${request.startDate} / ${request.endDate})`;
|
|
4254
|
+
title = `${memberLabel} ${periodPart}`;
|
|
4255
|
+
dimensionData = {
|
|
4256
|
+
dimensionId: newColumnId,
|
|
4257
|
+
axisId: dimension.id,
|
|
4258
|
+
memberId: firstMember.id,
|
|
4259
|
+
memberValue: memberLabel,
|
|
4260
|
+
memberLabel,
|
|
4261
|
+
axis: axisLabel,
|
|
4262
|
+
axisLabel,
|
|
4263
|
+
memberKey: `${axisLabel} | ${memberLabel}`,
|
|
4264
|
+
dimensionIdKey: `${dimension.id} | ${firstMember.id}`
|
|
4265
|
+
};
|
|
4266
|
+
console.log(`📊 Applied hypercube dimension to new column: ${dimensionData.memberKey}`);
|
|
4267
|
+
}
|
|
4248
4268
|
}
|
|
4249
4269
|
}
|
|
4250
4270
|
}
|
|
@@ -4399,9 +4419,27 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
4399
4419
|
}));
|
|
4400
4420
|
}
|
|
4401
4421
|
_handleSubmit() {
|
|
4422
|
+
console.log("📝 Form submission started...");
|
|
4402
4423
|
this._submitted = true;
|
|
4403
4424
|
this._validateForm();
|
|
4404
4425
|
const submissionData = this._generateSubmissionData();
|
|
4426
|
+
console.log("📊 Generated submission data:", {
|
|
4427
|
+
formData: this._formData,
|
|
4428
|
+
submissionData,
|
|
4429
|
+
submissionDataCount: submissionData.length,
|
|
4430
|
+
valid: this._valid,
|
|
4431
|
+
errors: this._errors
|
|
4432
|
+
});
|
|
4433
|
+
submissionData.forEach((entry, index) => {
|
|
4434
|
+
console.log(`📋 Submission Entry ${index + 1}:`, {
|
|
4435
|
+
conceptId: entry.conceptId,
|
|
4436
|
+
value: entry.value,
|
|
4437
|
+
period: entry.period,
|
|
4438
|
+
dimension: entry.dimension,
|
|
4439
|
+
typedMembers: entry.typedMembers,
|
|
4440
|
+
hasTypedMembers: !!(entry.typedMembers && Object.keys(entry.typedMembers).length > 0)
|
|
4441
|
+
});
|
|
4442
|
+
});
|
|
4405
4443
|
this.dispatchEvent(new CustomEvent("form-submit", {
|
|
4406
4444
|
detail: {
|
|
4407
4445
|
data: this._formData,
|
|
@@ -4411,6 +4449,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
4411
4449
|
},
|
|
4412
4450
|
bubbles: true
|
|
4413
4451
|
}));
|
|
4452
|
+
console.log("✅ Form submit event dispatched");
|
|
4414
4453
|
}
|
|
4415
4454
|
_handleSaveDraft() {
|
|
4416
4455
|
const draftData = this._generateSubmissionData();
|
|
@@ -4805,6 +4844,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
4805
4844
|
.disabled="${this.disabled || this.readonly}"
|
|
4806
4845
|
.collapsible="${config.collapsibleSections !== false}"
|
|
4807
4846
|
.locale="${config.locale || "en-US"}"
|
|
4847
|
+
.availableDimensions="${this._getAvailableDimensionsForSection(section.id)}"
|
|
4808
4848
|
@field-change="${this._handleFieldChange}"
|
|
4809
4849
|
@typed-member-change="${this._handleTypedMemberChange}"
|
|
4810
4850
|
@section-expand="${this._handleSectionExpand}"
|
|
@@ -5043,73 +5083,73 @@ JupiterDynamicForm.styles = css`
|
|
|
5043
5083
|
}
|
|
5044
5084
|
`;
|
|
5045
5085
|
__decorateClass([
|
|
5046
|
-
|
|
5086
|
+
n2({ type: Object })
|
|
5047
5087
|
], JupiterDynamicForm.prototype, "schema", 2);
|
|
5048
5088
|
__decorateClass([
|
|
5049
|
-
|
|
5089
|
+
n2({ type: Object })
|
|
5050
5090
|
], JupiterDynamicForm.prototype, "xbrlInput", 2);
|
|
5051
5091
|
__decorateClass([
|
|
5052
|
-
|
|
5092
|
+
n2({ type: Object })
|
|
5053
5093
|
], JupiterDynamicForm.prototype, "config", 2);
|
|
5054
5094
|
__decorateClass([
|
|
5055
|
-
|
|
5095
|
+
n2({ type: Object })
|
|
5056
5096
|
], JupiterDynamicForm.prototype, "initialData", 2);
|
|
5057
5097
|
__decorateClass([
|
|
5058
|
-
|
|
5098
|
+
n2({ type: Boolean })
|
|
5059
5099
|
], JupiterDynamicForm.prototype, "disabled", 2);
|
|
5060
5100
|
__decorateClass([
|
|
5061
|
-
|
|
5101
|
+
n2({ type: Boolean })
|
|
5062
5102
|
], JupiterDynamicForm.prototype, "readonly", 2);
|
|
5063
5103
|
__decorateClass([
|
|
5064
|
-
|
|
5104
|
+
n2({ type: String })
|
|
5065
5105
|
], JupiterDynamicForm.prototype, "periodStartDate", 2);
|
|
5066
5106
|
__decorateClass([
|
|
5067
|
-
|
|
5107
|
+
n2({ type: String })
|
|
5068
5108
|
], JupiterDynamicForm.prototype, "periodEndDate", 2);
|
|
5069
5109
|
__decorateClass([
|
|
5070
|
-
r
|
|
5110
|
+
r()
|
|
5071
5111
|
], JupiterDynamicForm.prototype, "_formData", 2);
|
|
5072
5112
|
__decorateClass([
|
|
5073
|
-
r
|
|
5113
|
+
r()
|
|
5074
5114
|
], JupiterDynamicForm.prototype, "_preservedFormData", 2);
|
|
5075
5115
|
__decorateClass([
|
|
5076
|
-
r
|
|
5116
|
+
r()
|
|
5077
5117
|
], JupiterDynamicForm.prototype, "_typedMemberData", 2);
|
|
5078
5118
|
__decorateClass([
|
|
5079
|
-
r
|
|
5119
|
+
r()
|
|
5080
5120
|
], JupiterDynamicForm.prototype, "_preservedTypedMemberData", 2);
|
|
5081
5121
|
__decorateClass([
|
|
5082
|
-
r
|
|
5122
|
+
r()
|
|
5083
5123
|
], JupiterDynamicForm.prototype, "_columns", 2);
|
|
5084
5124
|
__decorateClass([
|
|
5085
|
-
r
|
|
5125
|
+
r()
|
|
5086
5126
|
], JupiterDynamicForm.prototype, "_errors", 2);
|
|
5087
5127
|
__decorateClass([
|
|
5088
|
-
r
|
|
5128
|
+
r()
|
|
5089
5129
|
], JupiterDynamicForm.prototype, "_touched", 2);
|
|
5090
5130
|
__decorateClass([
|
|
5091
|
-
r
|
|
5131
|
+
r()
|
|
5092
5132
|
], JupiterDynamicForm.prototype, "_dirty", 2);
|
|
5093
5133
|
__decorateClass([
|
|
5094
|
-
r
|
|
5134
|
+
r()
|
|
5095
5135
|
], JupiterDynamicForm.prototype, "_valid", 2);
|
|
5096
5136
|
__decorateClass([
|
|
5097
|
-
r
|
|
5137
|
+
r()
|
|
5098
5138
|
], JupiterDynamicForm.prototype, "_submitted", 2);
|
|
5099
5139
|
__decorateClass([
|
|
5100
|
-
r
|
|
5140
|
+
r()
|
|
5101
5141
|
], JupiterDynamicForm.prototype, "_currentSchema", 2);
|
|
5102
5142
|
__decorateClass([
|
|
5103
|
-
r
|
|
5143
|
+
r()
|
|
5104
5144
|
], JupiterDynamicForm.prototype, "_allSections", 2);
|
|
5105
5145
|
__decorateClass([
|
|
5106
|
-
r
|
|
5146
|
+
r()
|
|
5107
5147
|
], JupiterDynamicForm.prototype, "_selectedRoleIds", 2);
|
|
5108
5148
|
__decorateClass([
|
|
5109
|
-
r
|
|
5149
|
+
r()
|
|
5110
5150
|
], JupiterDynamicForm.prototype, "_showFilterDialog", 2);
|
|
5111
5151
|
JupiterDynamicForm = __decorateClass([
|
|
5112
|
-
t$
|
|
5152
|
+
t$1("jupiter-dynamic-form")
|
|
5113
5153
|
], JupiterDynamicForm);
|
|
5114
5154
|
const version = "1.5.0";
|
|
5115
5155
|
export {
|