jupiter-dynamic-forms 1.20.8 → 1.21.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/confirm-dialog.d.ts +28 -0
- package/dist/core/confirm-dialog.d.ts.map +1 -0
- package/dist/core/dynamic-form.d.ts +15 -3
- package/dist/core/dynamic-form.d.ts.map +1 -1
- package/dist/core/form-section.d.ts +8 -0
- package/dist/core/form-section.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +252 -138
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +779 -276
- package/dist/index.mjs.map +1 -1
- package/dist/schema/types.d.ts +11 -0
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/utils/role-resolver.d.ts +39 -0
- package/dist/utils/role-resolver.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1850,6 +1850,14 @@ const formulaValidation$1 = {
|
|
|
1850
1850
|
severityError: "Error",
|
|
1851
1851
|
close: "Close"
|
|
1852
1852
|
};
|
|
1853
|
+
const scrollToConcept$1 = {
|
|
1854
|
+
revealRole: {
|
|
1855
|
+
title: "Role not in your filtered list",
|
|
1856
|
+
message: 'This field is in the role "{{role}}", which is not in your filtered list of roles. Do you want to make this role visible?',
|
|
1857
|
+
confirm: "Yes, show role",
|
|
1858
|
+
cancel: "No"
|
|
1859
|
+
}
|
|
1860
|
+
};
|
|
1853
1861
|
const enTranslations = {
|
|
1854
1862
|
conceptInfo: conceptInfo$1,
|
|
1855
1863
|
form: form$1,
|
|
@@ -1862,7 +1870,8 @@ const enTranslations = {
|
|
|
1862
1870
|
xbrlValidation: xbrlValidation$1,
|
|
1863
1871
|
error: error$1,
|
|
1864
1872
|
calculationWarning: calculationWarning$1,
|
|
1865
|
-
formulaValidation: formulaValidation$1
|
|
1873
|
+
formulaValidation: formulaValidation$1,
|
|
1874
|
+
scrollToConcept: scrollToConcept$1
|
|
1866
1875
|
};
|
|
1867
1876
|
const conceptInfo = {
|
|
1868
1877
|
title: "Conceptinformatie",
|
|
@@ -2057,6 +2066,14 @@ const formulaValidation = {
|
|
|
2057
2066
|
severityError: "Fout",
|
|
2058
2067
|
close: "Sluiten"
|
|
2059
2068
|
};
|
|
2069
|
+
const scrollToConcept = {
|
|
2070
|
+
revealRole: {
|
|
2071
|
+
title: "Rol niet in uw gefilterde lijst",
|
|
2072
|
+
message: 'Dit veld staat in de rol "{{role}}", die niet in uw gefilterde lijst met rollen staat. Wilt u deze rol zichtbaar maken?',
|
|
2073
|
+
confirm: "Ja, rol tonen",
|
|
2074
|
+
cancel: "Nee"
|
|
2075
|
+
}
|
|
2076
|
+
};
|
|
2060
2077
|
const nlTranslations = {
|
|
2061
2078
|
conceptInfo,
|
|
2062
2079
|
form,
|
|
@@ -2069,7 +2086,8 @@ const nlTranslations = {
|
|
|
2069
2086
|
xbrlValidation,
|
|
2070
2087
|
error,
|
|
2071
2088
|
calculationWarning,
|
|
2072
|
-
formulaValidation
|
|
2089
|
+
formulaValidation,
|
|
2090
|
+
scrollToConcept
|
|
2073
2091
|
};
|
|
2074
2092
|
const translations = {
|
|
2075
2093
|
en: enTranslations,
|
|
@@ -2360,7 +2378,7 @@ class FormulaExpressionError extends Error {
|
|
|
2360
2378
|
}
|
|
2361
2379
|
}
|
|
2362
2380
|
const TOKEN_PATTERN = /\s*(?:(\$[A-Za-z_][\w-]*)|(-?\d+(?:\.\d+)?)|([A-Za-z][\w:-]*)|('[^']*')|(\()|(\))|(\+)|(-)|(=))/y;
|
|
2363
|
-
function tokenize(test) {
|
|
2381
|
+
function tokenize$1(test) {
|
|
2364
2382
|
const tokens = [];
|
|
2365
2383
|
TOKEN_PATTERN.lastIndex = 0;
|
|
2366
2384
|
let index = 0;
|
|
@@ -2638,7 +2656,7 @@ function evalBool(node, bindings, test, fallbackUsage) {
|
|
|
2638
2656
|
}
|
|
2639
2657
|
}
|
|
2640
2658
|
function evaluateFormulaTest(test, bindings, fallbackUsage = /* @__PURE__ */ new Map()) {
|
|
2641
|
-
const tokens = tokenize(test);
|
|
2659
|
+
const tokens = tokenize$1(test);
|
|
2642
2660
|
const ast = new Parser(tokens, test).parseBoolExpr();
|
|
2643
2661
|
return evalBool(ast, bindings, test, fallbackUsage);
|
|
2644
2662
|
}
|
|
@@ -3887,6 +3905,70 @@ class FactMatcher {
|
|
|
3887
3905
|
console.log(" Match Result:", match ? match.value : "No match");
|
|
3888
3906
|
}
|
|
3889
3907
|
}
|
|
3908
|
+
const ROLE_MATCH_TIER = {
|
|
3909
|
+
/** Full `id`/`roleURI` equals the query. */
|
|
3910
|
+
EXACT_ID: 1,
|
|
3911
|
+
/** Local name (segment after the last `:`, `/` or `#`) of `id`/`roleURI` equals the query's. */
|
|
3912
|
+
EXACT_LOCAL_NAME: 2,
|
|
3913
|
+
/** `title`/`description`/`metadata.originalRole` equals the query. */
|
|
3914
|
+
EXACT_LABEL: 3,
|
|
3915
|
+
/** Contiguous substring match, in either direction, against a local name or label. */
|
|
3916
|
+
SUBSTRING: 4,
|
|
3917
|
+
/** Every word of the query appears in a local name or label, in any order. */
|
|
3918
|
+
TOKEN_SUBSET: 5
|
|
3919
|
+
};
|
|
3920
|
+
const normalize = (value) => typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
3921
|
+
const tokenize = (value) => value.split(/[^\p{L}\p{N}]+/u).filter(Boolean);
|
|
3922
|
+
function roleLocalName(value) {
|
|
3923
|
+
const trimmed = value.replace(/[/#:]+$/, "");
|
|
3924
|
+
const cut = Math.max(trimmed.lastIndexOf(":"), trimmed.lastIndexOf("/"), trimmed.lastIndexOf("#"));
|
|
3925
|
+
return cut >= 0 ? trimmed.slice(cut + 1) : trimmed;
|
|
3926
|
+
}
|
|
3927
|
+
function scoreSection(query, section2) {
|
|
3928
|
+
var _a, _b;
|
|
3929
|
+
const identifiers = [section2.id, (_a = section2.metadata) == null ? void 0 : _a.roleURI].map(normalize).filter(Boolean);
|
|
3930
|
+
const labels = [section2.title, section2.description, (_b = section2.metadata) == null ? void 0 : _b.originalRole].map(normalize).filter(Boolean);
|
|
3931
|
+
const localNames = identifiers.map(roleLocalName);
|
|
3932
|
+
const queryLocal = /\s/.test(query) ? null : roleLocalName(query);
|
|
3933
|
+
if (identifiers.includes(query))
|
|
3934
|
+
return { tier: ROLE_MATCH_TIER.EXACT_ID, looseness: 0 };
|
|
3935
|
+
if (queryLocal && localNames.includes(queryLocal))
|
|
3936
|
+
return { tier: ROLE_MATCH_TIER.EXACT_LOCAL_NAME, looseness: 0 };
|
|
3937
|
+
if (labels.includes(query))
|
|
3938
|
+
return { tier: ROLE_MATCH_TIER.EXACT_LABEL, looseness: 0 };
|
|
3939
|
+
const needle = queryLocal ?? query;
|
|
3940
|
+
const fields = [...localNames, ...labels];
|
|
3941
|
+
let best = null;
|
|
3942
|
+
for (const field2 of fields) {
|
|
3943
|
+
if (field2.includes(needle) || needle.includes(field2)) {
|
|
3944
|
+
const looseness = Math.abs(field2.length - needle.length);
|
|
3945
|
+
if (best === null || looseness < best)
|
|
3946
|
+
best = looseness;
|
|
3947
|
+
}
|
|
3948
|
+
}
|
|
3949
|
+
if (best !== null)
|
|
3950
|
+
return { tier: ROLE_MATCH_TIER.SUBSTRING, looseness: best };
|
|
3951
|
+
const queryTokens = new Set(tokenize(needle));
|
|
3952
|
+
if (!queryTokens.size)
|
|
3953
|
+
return null;
|
|
3954
|
+
for (const field2 of fields) {
|
|
3955
|
+
const fieldTokens = new Set(tokenize(field2));
|
|
3956
|
+
if ([...queryTokens].every((t2) => fieldTokens.has(t2))) {
|
|
3957
|
+
const looseness = fieldTokens.size - queryTokens.size;
|
|
3958
|
+
if (best === null || looseness < best)
|
|
3959
|
+
best = looseness;
|
|
3960
|
+
}
|
|
3961
|
+
}
|
|
3962
|
+
if (best !== null)
|
|
3963
|
+
return { tier: ROLE_MATCH_TIER.TOKEN_SUBSET, looseness: best };
|
|
3964
|
+
return null;
|
|
3965
|
+
}
|
|
3966
|
+
function rankMatchingSections(roleQuery, sections) {
|
|
3967
|
+
const query = normalize(roleQuery);
|
|
3968
|
+
if (!query)
|
|
3969
|
+
return [];
|
|
3970
|
+
return sections.map((section2, index) => ({ section: section2, index, score: scoreSection(query, section2) })).filter((entry) => entry.score !== null).sort((a2, b2) => a2.score.tier - b2.score.tier || a2.score.looseness - b2.score.looseness || a2.index - b2.index).map(({ section: section2, score }) => ({ section: section2, tier: score.tier }));
|
|
3971
|
+
}
|
|
3890
3972
|
const TYPE_INPUT_MAP = {
|
|
3891
3973
|
// ==========================================
|
|
3892
3974
|
// Dutch XBRL Types (nl-types namespace)
|
|
@@ -4536,15 +4618,15 @@ class XBRLValidator {
|
|
|
4536
4618
|
return rules;
|
|
4537
4619
|
}
|
|
4538
4620
|
}
|
|
4539
|
-
var __defProp$
|
|
4540
|
-
var __getOwnPropDesc$
|
|
4541
|
-
var __decorateClass$
|
|
4542
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
4621
|
+
var __defProp$8 = Object.defineProperty;
|
|
4622
|
+
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
|
|
4623
|
+
var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
4624
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
|
|
4543
4625
|
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
4544
4626
|
if (decorator = decorators[i2])
|
|
4545
4627
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
4546
4628
|
if (kind && result)
|
|
4547
|
-
__defProp$
|
|
4629
|
+
__defProp$8(target, key, result);
|
|
4548
4630
|
return result;
|
|
4549
4631
|
};
|
|
4550
4632
|
let JupiterFormField = class extends LitElement {
|
|
@@ -6111,99 +6193,99 @@ JupiterFormField.styles = css`
|
|
|
6111
6193
|
animation: concept-highlight-pulse 10s ease-out forwards;
|
|
6112
6194
|
}
|
|
6113
6195
|
`;
|
|
6114
|
-
__decorateClass$
|
|
6196
|
+
__decorateClass$8([
|
|
6115
6197
|
n2({ type: Object })
|
|
6116
6198
|
], JupiterFormField.prototype, "field", 2);
|
|
6117
|
-
__decorateClass$
|
|
6199
|
+
__decorateClass$8([
|
|
6118
6200
|
n2({ type: String })
|
|
6119
6201
|
], JupiterFormField.prototype, "conceptId", 2);
|
|
6120
|
-
__decorateClass$
|
|
6202
|
+
__decorateClass$8([
|
|
6121
6203
|
n2({ type: String })
|
|
6122
6204
|
], JupiterFormField.prototype, "conceptType", 2);
|
|
6123
|
-
__decorateClass$
|
|
6205
|
+
__decorateClass$8([
|
|
6124
6206
|
n2({ type: Array })
|
|
6125
6207
|
], JupiterFormField.prototype, "datatypes", 2);
|
|
6126
|
-
__decorateClass$
|
|
6208
|
+
__decorateClass$8([
|
|
6127
6209
|
n2({ type: Array })
|
|
6128
6210
|
], JupiterFormField.prototype, "defaultUnits", 2);
|
|
6129
|
-
__decorateClass$
|
|
6211
|
+
__decorateClass$8([
|
|
6130
6212
|
n2({ type: String })
|
|
6131
6213
|
], JupiterFormField.prototype, "columnId", 2);
|
|
6132
|
-
__decorateClass$
|
|
6214
|
+
__decorateClass$8([
|
|
6133
6215
|
n2()
|
|
6134
6216
|
], JupiterFormField.prototype, "value", 2);
|
|
6135
|
-
__decorateClass$
|
|
6217
|
+
__decorateClass$8([
|
|
6136
6218
|
n2({ type: Boolean })
|
|
6137
6219
|
], JupiterFormField.prototype, "disabled", 2);
|
|
6138
|
-
__decorateClass$
|
|
6220
|
+
__decorateClass$8([
|
|
6139
6221
|
n2({ type: String })
|
|
6140
6222
|
], JupiterFormField.prototype, "locale", 2);
|
|
6141
|
-
__decorateClass$
|
|
6223
|
+
__decorateClass$8([
|
|
6142
6224
|
n2({ type: Boolean })
|
|
6143
6225
|
], JupiterFormField.prototype, "hideLabel", 2);
|
|
6144
|
-
__decorateClass$
|
|
6226
|
+
__decorateClass$8([
|
|
6145
6227
|
n2({ type: String })
|
|
6146
6228
|
], JupiterFormField.prototype, "mode", 2);
|
|
6147
|
-
__decorateClass$
|
|
6229
|
+
__decorateClass$8([
|
|
6148
6230
|
n2({ type: Object })
|
|
6149
6231
|
], JupiterFormField.prototype, "masterData", 2);
|
|
6150
|
-
__decorateClass$
|
|
6232
|
+
__decorateClass$8([
|
|
6151
6233
|
n2({ type: Array })
|
|
6152
6234
|
], JupiterFormField.prototype, "facts", 2);
|
|
6153
|
-
__decorateClass$
|
|
6235
|
+
__decorateClass$8([
|
|
6154
6236
|
n2({ type: Object })
|
|
6155
6237
|
], JupiterFormField.prototype, "column", 2);
|
|
6156
|
-
__decorateClass$
|
|
6238
|
+
__decorateClass$8([
|
|
6157
6239
|
n2({ type: String })
|
|
6158
6240
|
], JupiterFormField.prototype, "periodStartDate", 2);
|
|
6159
|
-
__decorateClass$
|
|
6241
|
+
__decorateClass$8([
|
|
6160
6242
|
n2({ type: String })
|
|
6161
6243
|
], JupiterFormField.prototype, "periodEndDate", 2);
|
|
6162
|
-
__decorateClass$
|
|
6244
|
+
__decorateClass$8([
|
|
6163
6245
|
n2({ type: String })
|
|
6164
6246
|
], JupiterFormField.prototype, "periodInstantDate", 2);
|
|
6165
|
-
__decorateClass$
|
|
6247
|
+
__decorateClass$8([
|
|
6166
6248
|
n2({ type: String })
|
|
6167
6249
|
], JupiterFormField.prototype, "unit", 2);
|
|
6168
|
-
__decorateClass$
|
|
6250
|
+
__decorateClass$8([
|
|
6169
6251
|
n2({ type: String })
|
|
6170
6252
|
], JupiterFormField.prototype, "decimals", 2);
|
|
6171
|
-
__decorateClass$
|
|
6253
|
+
__decorateClass$8([
|
|
6172
6254
|
n2({ type: String })
|
|
6173
6255
|
], JupiterFormField.prototype, "globalDecimals", 2);
|
|
6174
|
-
__decorateClass$
|
|
6256
|
+
__decorateClass$8([
|
|
6175
6257
|
n2({ type: Object })
|
|
6176
6258
|
], JupiterFormField.prototype, "typedMemberValues", 2);
|
|
6177
|
-
__decorateClass$
|
|
6259
|
+
__decorateClass$8([
|
|
6178
6260
|
r()
|
|
6179
6261
|
], JupiterFormField.prototype, "_errors", 2);
|
|
6180
|
-
__decorateClass$
|
|
6262
|
+
__decorateClass$8([
|
|
6181
6263
|
r()
|
|
6182
6264
|
], JupiterFormField.prototype, "_xbrlErrors", 2);
|
|
6183
|
-
__decorateClass$
|
|
6265
|
+
__decorateClass$8([
|
|
6184
6266
|
r()
|
|
6185
6267
|
], JupiterFormField.prototype, "_touched", 2);
|
|
6186
|
-
__decorateClass$
|
|
6268
|
+
__decorateClass$8([
|
|
6187
6269
|
r()
|
|
6188
6270
|
], JupiterFormField.prototype, "_showPeriodPopup", 2);
|
|
6189
|
-
__decorateClass$
|
|
6271
|
+
__decorateClass$8([
|
|
6190
6272
|
r()
|
|
6191
6273
|
], JupiterFormField.prototype, "_availableUnits", 2);
|
|
6192
|
-
__decorateClass$
|
|
6274
|
+
__decorateClass$8([
|
|
6193
6275
|
r()
|
|
6194
6276
|
], JupiterFormField.prototype, "_numericDraftValue", 2);
|
|
6195
|
-
JupiterFormField = __decorateClass$
|
|
6277
|
+
JupiterFormField = __decorateClass$8([
|
|
6196
6278
|
t$1("jupiter-form-field")
|
|
6197
6279
|
], JupiterFormField);
|
|
6198
|
-
var __defProp$
|
|
6199
|
-
var __getOwnPropDesc$
|
|
6200
|
-
var __decorateClass$
|
|
6201
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
6280
|
+
var __defProp$7 = Object.defineProperty;
|
|
6281
|
+
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
|
|
6282
|
+
var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
6283
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
|
|
6202
6284
|
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
6203
6285
|
if (decorator = decorators[i2])
|
|
6204
6286
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6205
6287
|
if (kind && result)
|
|
6206
|
-
__defProp$
|
|
6288
|
+
__defProp$7(target, key, result);
|
|
6207
6289
|
return result;
|
|
6208
6290
|
};
|
|
6209
6291
|
let JupiterConceptTree = class extends LitElement {
|
|
@@ -6860,90 +6942,90 @@ JupiterConceptTree.styles = css`
|
|
|
6860
6942
|
}
|
|
6861
6943
|
|
|
6862
6944
|
`;
|
|
6863
|
-
__decorateClass$
|
|
6945
|
+
__decorateClass$7([
|
|
6864
6946
|
n2({ type: Object })
|
|
6865
6947
|
], JupiterConceptTree.prototype, "concept", 2);
|
|
6866
|
-
__decorateClass$
|
|
6948
|
+
__decorateClass$7([
|
|
6867
6949
|
n2({ type: Array })
|
|
6868
6950
|
], JupiterConceptTree.prototype, "columns", 2);
|
|
6869
|
-
__decorateClass$
|
|
6951
|
+
__decorateClass$7([
|
|
6870
6952
|
n2({ type: Object })
|
|
6871
6953
|
], JupiterConceptTree.prototype, "formData", 2);
|
|
6872
|
-
__decorateClass$
|
|
6954
|
+
__decorateClass$7([
|
|
6873
6955
|
n2({ type: Object })
|
|
6874
6956
|
], JupiterConceptTree.prototype, "periodData", 2);
|
|
6875
|
-
__decorateClass$
|
|
6957
|
+
__decorateClass$7([
|
|
6876
6958
|
n2({ type: Object })
|
|
6877
6959
|
], JupiterConceptTree.prototype, "unitData", 2);
|
|
6878
|
-
__decorateClass$
|
|
6960
|
+
__decorateClass$7([
|
|
6879
6961
|
n2({ type: Object })
|
|
6880
6962
|
], JupiterConceptTree.prototype, "decimalsData", 2);
|
|
6881
|
-
__decorateClass$
|
|
6963
|
+
__decorateClass$7([
|
|
6882
6964
|
n2({ type: String })
|
|
6883
6965
|
], JupiterConceptTree.prototype, "globalDecimals", 2);
|
|
6884
|
-
__decorateClass$
|
|
6966
|
+
__decorateClass$7([
|
|
6885
6967
|
n2({ type: Array })
|
|
6886
6968
|
], JupiterConceptTree.prototype, "defaultUnits", 2);
|
|
6887
|
-
__decorateClass$
|
|
6969
|
+
__decorateClass$7([
|
|
6888
6970
|
n2({ type: Boolean })
|
|
6889
6971
|
], JupiterConceptTree.prototype, "disabled", 2);
|
|
6890
|
-
__decorateClass$
|
|
6972
|
+
__decorateClass$7([
|
|
6891
6973
|
n2({ type: String })
|
|
6892
6974
|
], JupiterConceptTree.prototype, "locale", 2);
|
|
6893
|
-
__decorateClass$
|
|
6975
|
+
__decorateClass$7([
|
|
6894
6976
|
n2({ type: Set })
|
|
6895
6977
|
], JupiterConceptTree.prototype, "expandedConcepts", 2);
|
|
6896
|
-
__decorateClass$
|
|
6978
|
+
__decorateClass$7([
|
|
6897
6979
|
n2({ type: Array })
|
|
6898
6980
|
], JupiterConceptTree.prototype, "datatypes", 2);
|
|
6899
|
-
__decorateClass$
|
|
6981
|
+
__decorateClass$7([
|
|
6900
6982
|
n2({ type: String })
|
|
6901
6983
|
], JupiterConceptTree.prototype, "mode", 2);
|
|
6902
|
-
__decorateClass$
|
|
6984
|
+
__decorateClass$7([
|
|
6903
6985
|
n2({ type: Object })
|
|
6904
6986
|
], JupiterConceptTree.prototype, "masterData", 2);
|
|
6905
|
-
__decorateClass$
|
|
6987
|
+
__decorateClass$7([
|
|
6906
6988
|
n2({ type: Array })
|
|
6907
6989
|
], JupiterConceptTree.prototype, "facts", 2);
|
|
6908
|
-
__decorateClass$
|
|
6990
|
+
__decorateClass$7([
|
|
6909
6991
|
n2({ type: Object })
|
|
6910
6992
|
], JupiterConceptTree.prototype, "typedMemberData", 2);
|
|
6911
|
-
__decorateClass$
|
|
6993
|
+
__decorateClass$7([
|
|
6912
6994
|
n2({ type: Boolean })
|
|
6913
6995
|
], JupiterConceptTree.prototype, "showAddButton", 2);
|
|
6914
|
-
__decorateClass$
|
|
6996
|
+
__decorateClass$7([
|
|
6915
6997
|
n2({ type: Boolean })
|
|
6916
6998
|
], JupiterConceptTree.prototype, "showRemoveButton", 2);
|
|
6917
|
-
__decorateClass$
|
|
6999
|
+
__decorateClass$7([
|
|
6918
7000
|
n2({ type: String })
|
|
6919
7001
|
], JupiterConceptTree.prototype, "highlightType", 2);
|
|
6920
|
-
__decorateClass$
|
|
7002
|
+
__decorateClass$7([
|
|
6921
7003
|
n2({ type: String })
|
|
6922
7004
|
], JupiterConceptTree.prototype, "highlightColumnId", 2);
|
|
6923
|
-
__decorateClass$
|
|
7005
|
+
__decorateClass$7([
|
|
6924
7006
|
n2({ type: Object })
|
|
6925
7007
|
], JupiterConceptTree.prototype, "calculationMismatches", 2);
|
|
6926
|
-
__decorateClass$
|
|
7008
|
+
__decorateClass$7([
|
|
6927
7009
|
n2({ type: String })
|
|
6928
7010
|
], JupiterConceptTree.prototype, "language", 2);
|
|
6929
|
-
__decorateClass$
|
|
7011
|
+
__decorateClass$7([
|
|
6930
7012
|
n2({ type: Boolean })
|
|
6931
7013
|
], JupiterConceptTree.prototype, "rowFocused", 2);
|
|
6932
|
-
__decorateClass$
|
|
7014
|
+
__decorateClass$7([
|
|
6933
7015
|
r()
|
|
6934
7016
|
], JupiterConceptTree.prototype, "_expanded", 2);
|
|
6935
|
-
JupiterConceptTree = __decorateClass$
|
|
7017
|
+
JupiterConceptTree = __decorateClass$7([
|
|
6936
7018
|
t$1("jupiter-concept-tree")
|
|
6937
7019
|
], JupiterConceptTree);
|
|
6938
|
-
var __defProp$
|
|
6939
|
-
var __getOwnPropDesc$
|
|
6940
|
-
var __decorateClass$
|
|
6941
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7020
|
+
var __defProp$6 = Object.defineProperty;
|
|
7021
|
+
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
|
|
7022
|
+
var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
7023
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
|
|
6942
7024
|
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
6943
7025
|
if (decorator = decorators[i2])
|
|
6944
7026
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
6945
7027
|
if (kind && result)
|
|
6946
|
-
__defProp$
|
|
7028
|
+
__defProp$6(target, key, result);
|
|
6947
7029
|
return result;
|
|
6948
7030
|
};
|
|
6949
7031
|
let JupiterAddColumnDialog = class extends LitElement {
|
|
@@ -7680,54 +7762,54 @@ JupiterAddColumnDialog.styles = css`
|
|
|
7680
7762
|
line-height: 1.4;
|
|
7681
7763
|
}
|
|
7682
7764
|
`;
|
|
7683
|
-
__decorateClass$
|
|
7765
|
+
__decorateClass$6([
|
|
7684
7766
|
n2({ type: String })
|
|
7685
7767
|
], JupiterAddColumnDialog.prototype, "periodType", 2);
|
|
7686
|
-
__decorateClass$
|
|
7768
|
+
__decorateClass$6([
|
|
7687
7769
|
n2({ type: Boolean })
|
|
7688
7770
|
], JupiterAddColumnDialog.prototype, "open", 2);
|
|
7689
|
-
__decorateClass$
|
|
7771
|
+
__decorateClass$6([
|
|
7690
7772
|
n2({ type: Array })
|
|
7691
7773
|
], JupiterAddColumnDialog.prototype, "availableDimensions", 2);
|
|
7692
|
-
__decorateClass$
|
|
7774
|
+
__decorateClass$6([
|
|
7693
7775
|
n2({ type: String })
|
|
7694
7776
|
], JupiterAddColumnDialog.prototype, "periodStartDate", 2);
|
|
7695
|
-
__decorateClass$
|
|
7777
|
+
__decorateClass$6([
|
|
7696
7778
|
n2({ type: String })
|
|
7697
7779
|
], JupiterAddColumnDialog.prototype, "periodEndDate", 2);
|
|
7698
|
-
__decorateClass$
|
|
7780
|
+
__decorateClass$6([
|
|
7699
7781
|
n2({ type: Array })
|
|
7700
7782
|
], JupiterAddColumnDialog.prototype, "datatypes", 2);
|
|
7701
|
-
__decorateClass$
|
|
7783
|
+
__decorateClass$6([
|
|
7702
7784
|
r()
|
|
7703
7785
|
], JupiterAddColumnDialog.prototype, "_startDate", 2);
|
|
7704
|
-
__decorateClass$
|
|
7786
|
+
__decorateClass$6([
|
|
7705
7787
|
r()
|
|
7706
7788
|
], JupiterAddColumnDialog.prototype, "_endDate", 2);
|
|
7707
|
-
__decorateClass$
|
|
7789
|
+
__decorateClass$6([
|
|
7708
7790
|
r()
|
|
7709
7791
|
], JupiterAddColumnDialog.prototype, "_instantDate", 2);
|
|
7710
|
-
__decorateClass$
|
|
7792
|
+
__decorateClass$6([
|
|
7711
7793
|
r()
|
|
7712
7794
|
], JupiterAddColumnDialog.prototype, "_selectedType", 2);
|
|
7713
|
-
__decorateClass$
|
|
7795
|
+
__decorateClass$6([
|
|
7714
7796
|
r()
|
|
7715
7797
|
], JupiterAddColumnDialog.prototype, "_selectedDimensions", 2);
|
|
7716
|
-
__decorateClass$
|
|
7798
|
+
__decorateClass$6([
|
|
7717
7799
|
r()
|
|
7718
7800
|
], JupiterAddColumnDialog.prototype, "_typedValueErrors", 2);
|
|
7719
|
-
JupiterAddColumnDialog = __decorateClass$
|
|
7801
|
+
JupiterAddColumnDialog = __decorateClass$6([
|
|
7720
7802
|
t$1("jupiter-add-column-dialog")
|
|
7721
7803
|
], JupiterAddColumnDialog);
|
|
7722
|
-
var __defProp$
|
|
7723
|
-
var __getOwnPropDesc$
|
|
7724
|
-
var __decorateClass$
|
|
7725
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
7804
|
+
var __defProp$5 = Object.defineProperty;
|
|
7805
|
+
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
|
|
7806
|
+
var __decorateClass$5 = (decorators, target, key, kind) => {
|
|
7807
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
|
|
7726
7808
|
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
7727
7809
|
if (decorator = decorators[i2])
|
|
7728
7810
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
7729
7811
|
if (kind && result)
|
|
7730
|
-
__defProp$
|
|
7812
|
+
__defProp$5(target, key, result);
|
|
7731
7813
|
return result;
|
|
7732
7814
|
};
|
|
7733
7815
|
let JupiterFormSection = class extends LitElement {
|
|
@@ -7865,6 +7947,47 @@ let JupiterFormSection = class extends LitElement {
|
|
|
7865
7947
|
bubbles: true
|
|
7866
7948
|
}));
|
|
7867
7949
|
}
|
|
7950
|
+
/**
|
|
7951
|
+
* Makes `conceptId`'s row render: opens this section (as clicking its header would) and expands
|
|
7952
|
+
* every ancestor of the row in the tree. A row only renders while all its ancestors are expanded,
|
|
7953
|
+
* and only the first section expands its tree on its own, so dynamic-form's scrollToConcept calls
|
|
7954
|
+
* this before looking the row up. Resolves false if the concept isn't in this section.
|
|
7955
|
+
*/
|
|
7956
|
+
async revealConcept(conceptId) {
|
|
7957
|
+
var _a;
|
|
7958
|
+
const ancestors = this._findAncestorIds(((_a = this.section) == null ? void 0 : _a.concepts) ?? [], conceptId);
|
|
7959
|
+
if (!ancestors)
|
|
7960
|
+
return false;
|
|
7961
|
+
if (!this._expanded) {
|
|
7962
|
+
this._expanded = true;
|
|
7963
|
+
this._expandAllTrees();
|
|
7964
|
+
this.dispatchEvent(new CustomEvent("section-expand", {
|
|
7965
|
+
detail: { sectionId: this.section.id, expanded: true },
|
|
7966
|
+
bubbles: true
|
|
7967
|
+
}));
|
|
7968
|
+
}
|
|
7969
|
+
const next = /* @__PURE__ */ new Set([...this._expandedConcepts, ...ancestors]);
|
|
7970
|
+
if (next.size !== this._expandedConcepts.size) {
|
|
7971
|
+
this._expandedConcepts = next;
|
|
7972
|
+
const allConceptIds = this._getAllConceptIds(this.section.concepts || []);
|
|
7973
|
+
this._allTreeExpanded = allConceptIds.length > 0 && allConceptIds.every((id) => next.has(id));
|
|
7974
|
+
}
|
|
7975
|
+
await this.updateComplete;
|
|
7976
|
+
return true;
|
|
7977
|
+
}
|
|
7978
|
+
_findAncestorIds(concepts, conceptId, trail = []) {
|
|
7979
|
+
var _a;
|
|
7980
|
+
for (const concept of concepts) {
|
|
7981
|
+
if (concept.id === conceptId)
|
|
7982
|
+
return trail;
|
|
7983
|
+
if ((_a = concept.children) == null ? void 0 : _a.length) {
|
|
7984
|
+
const found = this._findAncestorIds(concept.children, conceptId, [...trail, concept.id]);
|
|
7985
|
+
if (found)
|
|
7986
|
+
return found;
|
|
7987
|
+
}
|
|
7988
|
+
}
|
|
7989
|
+
return null;
|
|
7990
|
+
}
|
|
7868
7991
|
_handleRemoveColumn(columnId) {
|
|
7869
7992
|
this._openMenuColumnId = null;
|
|
7870
7993
|
this.dispatchEvent(new CustomEvent("column-remove", {
|
|
@@ -9071,129 +9194,129 @@ JupiterFormSection.styles = css`
|
|
|
9071
9194
|
font-style: italic;
|
|
9072
9195
|
}
|
|
9073
9196
|
`;
|
|
9074
|
-
__decorateClass$
|
|
9197
|
+
__decorateClass$5([
|
|
9075
9198
|
n2({ type: Object })
|
|
9076
9199
|
], JupiterFormSection.prototype, "section", 2);
|
|
9077
|
-
__decorateClass$
|
|
9200
|
+
__decorateClass$5([
|
|
9078
9201
|
n2({ type: Array })
|
|
9079
9202
|
], JupiterFormSection.prototype, "columns", 2);
|
|
9080
|
-
__decorateClass$
|
|
9203
|
+
__decorateClass$5([
|
|
9081
9204
|
n2({ type: Array })
|
|
9082
9205
|
], JupiterFormSection.prototype, "datatypes", 2);
|
|
9083
|
-
__decorateClass$
|
|
9206
|
+
__decorateClass$5([
|
|
9084
9207
|
n2({ type: Object })
|
|
9085
9208
|
], JupiterFormSection.prototype, "formData", 2);
|
|
9086
|
-
__decorateClass$
|
|
9209
|
+
__decorateClass$5([
|
|
9087
9210
|
n2({ type: Object })
|
|
9088
9211
|
], JupiterFormSection.prototype, "periodData", 2);
|
|
9089
|
-
__decorateClass$
|
|
9212
|
+
__decorateClass$5([
|
|
9090
9213
|
n2({ type: Object })
|
|
9091
9214
|
], JupiterFormSection.prototype, "unitData", 2);
|
|
9092
|
-
__decorateClass$
|
|
9215
|
+
__decorateClass$5([
|
|
9093
9216
|
n2({ type: Object })
|
|
9094
9217
|
], JupiterFormSection.prototype, "decimalsData", 2);
|
|
9095
|
-
__decorateClass$
|
|
9218
|
+
__decorateClass$5([
|
|
9096
9219
|
n2({ type: String })
|
|
9097
9220
|
], JupiterFormSection.prototype, "globalDecimals", 2);
|
|
9098
|
-
__decorateClass$
|
|
9221
|
+
__decorateClass$5([
|
|
9099
9222
|
n2({ type: Object })
|
|
9100
9223
|
], JupiterFormSection.prototype, "typedMemberData", 2);
|
|
9101
|
-
__decorateClass$
|
|
9224
|
+
__decorateClass$5([
|
|
9102
9225
|
n2({ type: Object })
|
|
9103
9226
|
], JupiterFormSection.prototype, "repeatCounts", 2);
|
|
9104
|
-
__decorateClass$
|
|
9227
|
+
__decorateClass$5([
|
|
9105
9228
|
n2({ type: Array })
|
|
9106
9229
|
], JupiterFormSection.prototype, "defaultUnits", 2);
|
|
9107
|
-
__decorateClass$
|
|
9230
|
+
__decorateClass$5([
|
|
9108
9231
|
n2({ type: Boolean })
|
|
9109
9232
|
], JupiterFormSection.prototype, "disabled", 2);
|
|
9110
|
-
__decorateClass$
|
|
9233
|
+
__decorateClass$5([
|
|
9111
9234
|
n2({ type: Boolean })
|
|
9112
9235
|
], JupiterFormSection.prototype, "collapsible", 2);
|
|
9113
|
-
__decorateClass$
|
|
9236
|
+
__decorateClass$5([
|
|
9114
9237
|
n2({ type: String })
|
|
9115
9238
|
], JupiterFormSection.prototype, "locale", 2);
|
|
9116
|
-
__decorateClass$
|
|
9239
|
+
__decorateClass$5([
|
|
9117
9240
|
n2({ type: Boolean })
|
|
9118
9241
|
], JupiterFormSection.prototype, "isFirstSection", 2);
|
|
9119
|
-
__decorateClass$
|
|
9242
|
+
__decorateClass$5([
|
|
9120
9243
|
n2({ type: Array })
|
|
9121
9244
|
], JupiterFormSection.prototype, "availableDimensions", 2);
|
|
9122
|
-
__decorateClass$
|
|
9245
|
+
__decorateClass$5([
|
|
9123
9246
|
n2({ type: Boolean })
|
|
9124
9247
|
], JupiterFormSection.prototype, "hideHeader", 2);
|
|
9125
|
-
__decorateClass$
|
|
9248
|
+
__decorateClass$5([
|
|
9126
9249
|
n2({ type: String })
|
|
9127
9250
|
], JupiterFormSection.prototype, "mode", 2);
|
|
9128
|
-
__decorateClass$
|
|
9251
|
+
__decorateClass$5([
|
|
9129
9252
|
n2({ type: Boolean })
|
|
9130
9253
|
], JupiterFormSection.prototype, "showFactsOnly", 2);
|
|
9131
|
-
__decorateClass$
|
|
9254
|
+
__decorateClass$5([
|
|
9132
9255
|
n2({ type: Object })
|
|
9133
9256
|
], JupiterFormSection.prototype, "conceptMatchIds", 2);
|
|
9134
|
-
__decorateClass$
|
|
9257
|
+
__decorateClass$5([
|
|
9135
9258
|
n2({ type: Object })
|
|
9136
9259
|
], JupiterFormSection.prototype, "masterData", 2);
|
|
9137
|
-
__decorateClass$
|
|
9260
|
+
__decorateClass$5([
|
|
9138
9261
|
n2({ type: String })
|
|
9139
9262
|
], JupiterFormSection.prototype, "periodStartDate", 2);
|
|
9140
|
-
__decorateClass$
|
|
9263
|
+
__decorateClass$5([
|
|
9141
9264
|
n2({ type: String })
|
|
9142
9265
|
], JupiterFormSection.prototype, "periodEndDate", 2);
|
|
9143
|
-
__decorateClass$
|
|
9266
|
+
__decorateClass$5([
|
|
9144
9267
|
n2({ type: String })
|
|
9145
9268
|
], JupiterFormSection.prototype, "language", 2);
|
|
9146
|
-
__decorateClass$
|
|
9269
|
+
__decorateClass$5([
|
|
9147
9270
|
n2({ type: Boolean })
|
|
9148
9271
|
], JupiterFormSection.prototype, "calculationEnabled", 2);
|
|
9149
|
-
__decorateClass$
|
|
9272
|
+
__decorateClass$5([
|
|
9150
9273
|
n2({ type: Object })
|
|
9151
9274
|
], JupiterFormSection.prototype, "totalManuallyEditedData", 2);
|
|
9152
|
-
__decorateClass$
|
|
9275
|
+
__decorateClass$5([
|
|
9153
9276
|
r()
|
|
9154
9277
|
], JupiterFormSection.prototype, "_expanded", 2);
|
|
9155
|
-
__decorateClass$
|
|
9278
|
+
__decorateClass$5([
|
|
9156
9279
|
r()
|
|
9157
9280
|
], JupiterFormSection.prototype, "_showAddColumnDialog", 2);
|
|
9158
|
-
__decorateClass$
|
|
9281
|
+
__decorateClass$5([
|
|
9159
9282
|
r()
|
|
9160
9283
|
], JupiterFormSection.prototype, "_sectionPeriodType", 2);
|
|
9161
|
-
__decorateClass$
|
|
9284
|
+
__decorateClass$5([
|
|
9162
9285
|
r()
|
|
9163
9286
|
], JupiterFormSection.prototype, "_openMenuColumnId", 2);
|
|
9164
|
-
__decorateClass$
|
|
9287
|
+
__decorateClass$5([
|
|
9165
9288
|
r()
|
|
9166
9289
|
], JupiterFormSection.prototype, "_insertAfterColumnId", 2);
|
|
9167
|
-
__decorateClass$
|
|
9290
|
+
__decorateClass$5([
|
|
9168
9291
|
r()
|
|
9169
9292
|
], JupiterFormSection.prototype, "_typedMemberErrors", 2);
|
|
9170
|
-
__decorateClass$
|
|
9293
|
+
__decorateClass$5([
|
|
9171
9294
|
r()
|
|
9172
9295
|
], JupiterFormSection.prototype, "_expandedConcepts", 2);
|
|
9173
|
-
__decorateClass$
|
|
9296
|
+
__decorateClass$5([
|
|
9174
9297
|
r()
|
|
9175
9298
|
], JupiterFormSection.prototype, "_allTreeExpanded", 2);
|
|
9176
|
-
__decorateClass$
|
|
9299
|
+
__decorateClass$5([
|
|
9177
9300
|
r()
|
|
9178
9301
|
], JupiterFormSection.prototype, "_highlightMap", 2);
|
|
9179
|
-
__decorateClass$
|
|
9302
|
+
__decorateClass$5([
|
|
9180
9303
|
r()
|
|
9181
9304
|
], JupiterFormSection.prototype, "_focusedConceptId", 2);
|
|
9182
|
-
__decorateClass$
|
|
9305
|
+
__decorateClass$5([
|
|
9183
9306
|
r()
|
|
9184
9307
|
], JupiterFormSection.prototype, "_calculationMismatches", 2);
|
|
9185
|
-
JupiterFormSection = __decorateClass$
|
|
9308
|
+
JupiterFormSection = __decorateClass$5([
|
|
9186
9309
|
t$1("jupiter-form-section")
|
|
9187
9310
|
], JupiterFormSection);
|
|
9188
|
-
var __defProp$
|
|
9189
|
-
var __getOwnPropDesc$
|
|
9190
|
-
var __decorateClass$
|
|
9191
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
9311
|
+
var __defProp$4 = Object.defineProperty;
|
|
9312
|
+
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
|
|
9313
|
+
var __decorateClass$4 = (decorators, target, key, kind) => {
|
|
9314
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
|
|
9192
9315
|
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
9193
9316
|
if (decorator = decorators[i2])
|
|
9194
9317
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9195
9318
|
if (kind && result)
|
|
9196
|
-
__defProp$
|
|
9319
|
+
__defProp$4(target, key, result);
|
|
9197
9320
|
return result;
|
|
9198
9321
|
};
|
|
9199
9322
|
let JupiterAdvancedFilter = class extends LitElement {
|
|
@@ -9382,27 +9505,27 @@ JupiterAdvancedFilter.styles = css`
|
|
|
9382
9505
|
color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
|
|
9383
9506
|
}
|
|
9384
9507
|
`;
|
|
9385
|
-
__decorateClass$
|
|
9508
|
+
__decorateClass$4([
|
|
9386
9509
|
n2({ type: Boolean })
|
|
9387
9510
|
], JupiterAdvancedFilter.prototype, "showFactsOnly", 2);
|
|
9388
|
-
__decorateClass$
|
|
9511
|
+
__decorateClass$4([
|
|
9389
9512
|
n2({ type: String })
|
|
9390
9513
|
], JupiterAdvancedFilter.prototype, "conceptSearchText", 2);
|
|
9391
|
-
__decorateClass$
|
|
9514
|
+
__decorateClass$4([
|
|
9392
9515
|
r()
|
|
9393
9516
|
], JupiterAdvancedFilter.prototype, "_localConceptSearchText", 2);
|
|
9394
|
-
JupiterAdvancedFilter = __decorateClass$
|
|
9517
|
+
JupiterAdvancedFilter = __decorateClass$4([
|
|
9395
9518
|
t$1("jupiter-advanced-filter")
|
|
9396
9519
|
], JupiterAdvancedFilter);
|
|
9397
|
-
var __defProp$
|
|
9398
|
-
var __getOwnPropDesc$
|
|
9399
|
-
var __decorateClass$
|
|
9400
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
9520
|
+
var __defProp$3 = Object.defineProperty;
|
|
9521
|
+
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
9522
|
+
var __decorateClass$3 = (decorators, target, key, kind) => {
|
|
9523
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
|
|
9401
9524
|
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
9402
9525
|
if (decorator = decorators[i2])
|
|
9403
9526
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9404
9527
|
if (kind && result)
|
|
9405
|
-
__defProp$
|
|
9528
|
+
__defProp$3(target, key, result);
|
|
9406
9529
|
return result;
|
|
9407
9530
|
};
|
|
9408
9531
|
let _lastViewWasAdvancedFilter = false;
|
|
@@ -11106,84 +11229,84 @@ JupiterFilterRolesDialog.styles = css`
|
|
|
11106
11229
|
background: var(--menuBgColorLighter, var(--jupiter-hover-background, #f5f5f5));
|
|
11107
11230
|
}
|
|
11108
11231
|
`;
|
|
11109
|
-
__decorateClass$
|
|
11232
|
+
__decorateClass$3([
|
|
11110
11233
|
n2({ type: Boolean, reflect: true })
|
|
11111
11234
|
], JupiterFilterRolesDialog.prototype, "open", 2);
|
|
11112
|
-
__decorateClass$
|
|
11235
|
+
__decorateClass$3([
|
|
11113
11236
|
n2({ type: Array })
|
|
11114
11237
|
], JupiterFilterRolesDialog.prototype, "availableRoles", 2);
|
|
11115
|
-
__decorateClass$
|
|
11238
|
+
__decorateClass$3([
|
|
11116
11239
|
n2({ type: Array })
|
|
11117
11240
|
], JupiterFilterRolesDialog.prototype, "selectedRoleIds", 2);
|
|
11118
|
-
__decorateClass$
|
|
11241
|
+
__decorateClass$3([
|
|
11119
11242
|
n2({ type: Object })
|
|
11120
11243
|
], JupiterFilterRolesDialog.prototype, "periodPreferences", 2);
|
|
11121
|
-
__decorateClass$
|
|
11244
|
+
__decorateClass$3([
|
|
11122
11245
|
n2({ type: String })
|
|
11123
11246
|
], JupiterFilterRolesDialog.prototype, "mode", 2);
|
|
11124
|
-
__decorateClass$
|
|
11247
|
+
__decorateClass$3([
|
|
11125
11248
|
n2({ type: Object })
|
|
11126
11249
|
], JupiterFilterRolesDialog.prototype, "hypercubeData", 2);
|
|
11127
|
-
__decorateClass$
|
|
11250
|
+
__decorateClass$3([
|
|
11128
11251
|
n2({ type: Boolean })
|
|
11129
11252
|
], JupiterFilterRolesDialog.prototype, "showFactsOnly", 2);
|
|
11130
|
-
__decorateClass$
|
|
11253
|
+
__decorateClass$3([
|
|
11131
11254
|
n2({ type: String })
|
|
11132
11255
|
], JupiterFilterRolesDialog.prototype, "conceptSearchText", 2);
|
|
11133
|
-
__decorateClass$
|
|
11256
|
+
__decorateClass$3([
|
|
11134
11257
|
r()
|
|
11135
11258
|
], JupiterFilterRolesDialog.prototype, "_tempSelectedRoles", 2);
|
|
11136
|
-
__decorateClass$
|
|
11259
|
+
__decorateClass$3([
|
|
11137
11260
|
r()
|
|
11138
11261
|
], JupiterFilterRolesDialog.prototype, "_searchQuery", 2);
|
|
11139
|
-
__decorateClass$
|
|
11262
|
+
__decorateClass$3([
|
|
11140
11263
|
r()
|
|
11141
11264
|
], JupiterFilterRolesDialog.prototype, "_filteredRoles", 2);
|
|
11142
|
-
__decorateClass$
|
|
11265
|
+
__decorateClass$3([
|
|
11143
11266
|
r()
|
|
11144
11267
|
], JupiterFilterRolesDialog.prototype, "_tempPeriodPreferences", 2);
|
|
11145
|
-
__decorateClass$
|
|
11268
|
+
__decorateClass$3([
|
|
11146
11269
|
r()
|
|
11147
11270
|
], JupiterFilterRolesDialog.prototype, "_selectedAvailableRole", 2);
|
|
11148
|
-
__decorateClass$
|
|
11271
|
+
__decorateClass$3([
|
|
11149
11272
|
r()
|
|
11150
11273
|
], JupiterFilterRolesDialog.prototype, "_selectedChosenRole", 2);
|
|
11151
|
-
__decorateClass$
|
|
11274
|
+
__decorateClass$3([
|
|
11152
11275
|
r()
|
|
11153
11276
|
], JupiterFilterRolesDialog.prototype, "_chosenSearchQuery", 2);
|
|
11154
|
-
__decorateClass$
|
|
11277
|
+
__decorateClass$3([
|
|
11155
11278
|
r()
|
|
11156
11279
|
], JupiterFilterRolesDialog.prototype, "_draggedRoleId", 2);
|
|
11157
|
-
__decorateClass$
|
|
11280
|
+
__decorateClass$3([
|
|
11158
11281
|
r()
|
|
11159
11282
|
], JupiterFilterRolesDialog.prototype, "_dragOverRoleId", 2);
|
|
11160
|
-
__decorateClass$
|
|
11283
|
+
__decorateClass$3([
|
|
11161
11284
|
r()
|
|
11162
11285
|
], JupiterFilterRolesDialog.prototype, "_chosenRoleOrder", 2);
|
|
11163
|
-
__decorateClass$
|
|
11286
|
+
__decorateClass$3([
|
|
11164
11287
|
r()
|
|
11165
11288
|
], JupiterFilterRolesDialog.prototype, "_showAdvancedFilter", 2);
|
|
11166
|
-
__decorateClass$
|
|
11289
|
+
__decorateClass$3([
|
|
11167
11290
|
r()
|
|
11168
11291
|
], JupiterFilterRolesDialog.prototype, "_showFactsOnly", 2);
|
|
11169
|
-
__decorateClass$
|
|
11292
|
+
__decorateClass$3([
|
|
11170
11293
|
r()
|
|
11171
11294
|
], JupiterFilterRolesDialog.prototype, "_conceptSearchText", 2);
|
|
11172
|
-
__decorateClass$
|
|
11295
|
+
__decorateClass$3([
|
|
11173
11296
|
r()
|
|
11174
11297
|
], JupiterFilterRolesDialog.prototype, "_collapsedRoles", 2);
|
|
11175
|
-
JupiterFilterRolesDialog = __decorateClass$
|
|
11298
|
+
JupiterFilterRolesDialog = __decorateClass$3([
|
|
11176
11299
|
t$1("jupiter-filter-roles-dialog")
|
|
11177
11300
|
], JupiterFilterRolesDialog);
|
|
11178
|
-
var __defProp$
|
|
11179
|
-
var __getOwnPropDesc$
|
|
11180
|
-
var __decorateClass$
|
|
11181
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
|
11301
|
+
var __defProp$2 = Object.defineProperty;
|
|
11302
|
+
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
11303
|
+
var __decorateClass$2 = (decorators, target, key, kind) => {
|
|
11304
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
|
|
11182
11305
|
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
11183
11306
|
if (decorator = decorators[i2])
|
|
11184
11307
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11185
11308
|
if (kind && result)
|
|
11186
|
-
__defProp$
|
|
11309
|
+
__defProp$2(target, key, result);
|
|
11187
11310
|
return result;
|
|
11188
11311
|
};
|
|
11189
11312
|
let JupiterFormulaValidationDialog = class extends LitElement {
|
|
@@ -11537,21 +11660,194 @@ JupiterFormulaValidationDialog.styles = css`
|
|
|
11537
11660
|
opacity: 0.9;
|
|
11538
11661
|
}
|
|
11539
11662
|
`;
|
|
11540
|
-
__decorateClass$
|
|
11663
|
+
__decorateClass$2([
|
|
11541
11664
|
n2({ type: Array })
|
|
11542
11665
|
], JupiterFormulaValidationDialog.prototype, "results", 2);
|
|
11543
|
-
__decorateClass$
|
|
11666
|
+
__decorateClass$2([
|
|
11544
11667
|
n2({ type: Object })
|
|
11545
11668
|
], JupiterFormulaValidationDialog.prototype, "summary", 2);
|
|
11546
|
-
__decorateClass$
|
|
11669
|
+
__decorateClass$2([
|
|
11547
11670
|
n2({ type: Boolean, reflect: true })
|
|
11548
11671
|
], JupiterFormulaValidationDialog.prototype, "open", 2);
|
|
11549
|
-
__decorateClass$
|
|
11672
|
+
__decorateClass$2([
|
|
11550
11673
|
r()
|
|
11551
11674
|
], JupiterFormulaValidationDialog.prototype, "_collapsedGroups", 2);
|
|
11552
|
-
JupiterFormulaValidationDialog = __decorateClass$
|
|
11675
|
+
JupiterFormulaValidationDialog = __decorateClass$2([
|
|
11553
11676
|
t$1("jupiter-formula-validation-dialog")
|
|
11554
11677
|
], JupiterFormulaValidationDialog);
|
|
11678
|
+
var __defProp$1 = Object.defineProperty;
|
|
11679
|
+
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
11680
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
11681
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
11682
|
+
for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
|
|
11683
|
+
if (decorator = decorators[i2])
|
|
11684
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11685
|
+
if (kind && result)
|
|
11686
|
+
__defProp$1(target, key, result);
|
|
11687
|
+
return result;
|
|
11688
|
+
};
|
|
11689
|
+
let JupiterConfirmDialog = class extends LitElement {
|
|
11690
|
+
constructor() {
|
|
11691
|
+
super(...arguments);
|
|
11692
|
+
this.open = false;
|
|
11693
|
+
this.heading = "";
|
|
11694
|
+
this.message = "";
|
|
11695
|
+
this.confirmLabel = "OK";
|
|
11696
|
+
this.cancelLabel = "Cancel";
|
|
11697
|
+
this._boundHandleKeydown = this._handleKeydown.bind(this);
|
|
11698
|
+
}
|
|
11699
|
+
connectedCallback() {
|
|
11700
|
+
super.connectedCallback();
|
|
11701
|
+
window.addEventListener("keydown", this._boundHandleKeydown);
|
|
11702
|
+
}
|
|
11703
|
+
disconnectedCallback() {
|
|
11704
|
+
window.removeEventListener("keydown", this._boundHandleKeydown);
|
|
11705
|
+
super.disconnectedCallback();
|
|
11706
|
+
}
|
|
11707
|
+
updated(changed) {
|
|
11708
|
+
var _a, _b;
|
|
11709
|
+
if (changed.has("open") && this.open) {
|
|
11710
|
+
(_b = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".btn-primary")) == null ? void 0 : _b.focus();
|
|
11711
|
+
}
|
|
11712
|
+
}
|
|
11713
|
+
_handleKeydown(event) {
|
|
11714
|
+
if (this.open && event.key === "Escape") {
|
|
11715
|
+
this._handleCancel();
|
|
11716
|
+
}
|
|
11717
|
+
}
|
|
11718
|
+
_handleConfirm() {
|
|
11719
|
+
this.open = false;
|
|
11720
|
+
this.dispatchEvent(new CustomEvent("dialog-confirm", { bubbles: true }));
|
|
11721
|
+
}
|
|
11722
|
+
_handleCancel() {
|
|
11723
|
+
this.open = false;
|
|
11724
|
+
this.dispatchEvent(new CustomEvent("dialog-cancel", { bubbles: true }));
|
|
11725
|
+
}
|
|
11726
|
+
render() {
|
|
11727
|
+
if (!this.open)
|
|
11728
|
+
return html``;
|
|
11729
|
+
return html`
|
|
11730
|
+
<div class="dialog" role="alertdialog" aria-modal="true" aria-labelledby="title" aria-describedby="message"
|
|
11731
|
+
@click="${(e2) => e2.stopPropagation()}">
|
|
11732
|
+
<h2 class="dialog-title" id="title">${this.heading}</h2>
|
|
11733
|
+
<p class="dialog-message" id="message">${this.message}</p>
|
|
11734
|
+
<div class="dialog-actions">
|
|
11735
|
+
<button type="button" class="btn btn-secondary" @click="${this._handleCancel}">${this.cancelLabel}</button>
|
|
11736
|
+
<button type="button" class="btn btn-primary" @click="${this._handleConfirm}">${this.confirmLabel}</button>
|
|
11737
|
+
</div>
|
|
11738
|
+
</div>
|
|
11739
|
+
`;
|
|
11740
|
+
}
|
|
11741
|
+
};
|
|
11742
|
+
JupiterConfirmDialog.styles = css`
|
|
11743
|
+
:host {
|
|
11744
|
+
position: fixed;
|
|
11745
|
+
top: 0;
|
|
11746
|
+
left: 0;
|
|
11747
|
+
width: 100%;
|
|
11748
|
+
height: 100%;
|
|
11749
|
+
background: rgba(0, 0, 0, 0.5);
|
|
11750
|
+
z-index: 1100;
|
|
11751
|
+
display: flex;
|
|
11752
|
+
align-items: center;
|
|
11753
|
+
justify-content: center;
|
|
11754
|
+
opacity: 0;
|
|
11755
|
+
visibility: hidden;
|
|
11756
|
+
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
11757
|
+
}
|
|
11758
|
+
|
|
11759
|
+
:host([open]) {
|
|
11760
|
+
opacity: 1;
|
|
11761
|
+
visibility: visible;
|
|
11762
|
+
}
|
|
11763
|
+
|
|
11764
|
+
.dialog {
|
|
11765
|
+
background: var(--bg-color-2, var(--jupiter-card-background, #fff));
|
|
11766
|
+
border-radius: 8px;
|
|
11767
|
+
padding: 24px;
|
|
11768
|
+
min-width: 360px;
|
|
11769
|
+
max-width: 520px;
|
|
11770
|
+
width: 90vw;
|
|
11771
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
11772
|
+
transform: scale(0.9);
|
|
11773
|
+
transition: transform 0.3s ease;
|
|
11774
|
+
}
|
|
11775
|
+
|
|
11776
|
+
:host([open]) .dialog {
|
|
11777
|
+
transform: scale(1);
|
|
11778
|
+
}
|
|
11779
|
+
|
|
11780
|
+
.dialog-title {
|
|
11781
|
+
font-size: 20px;
|
|
11782
|
+
font-weight: 600;
|
|
11783
|
+
color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
|
|
11784
|
+
margin: 0 0 12px 0;
|
|
11785
|
+
}
|
|
11786
|
+
|
|
11787
|
+
.dialog-message {
|
|
11788
|
+
font-size: 14px;
|
|
11789
|
+
line-height: 1.5;
|
|
11790
|
+
color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
|
|
11791
|
+
margin: 0;
|
|
11792
|
+
overflow-wrap: anywhere;
|
|
11793
|
+
}
|
|
11794
|
+
|
|
11795
|
+
.dialog-actions {
|
|
11796
|
+
display: flex;
|
|
11797
|
+
gap: 12px;
|
|
11798
|
+
justify-content: flex-end;
|
|
11799
|
+
border-top: 1px solid var(--jupiter-border-color, #ddd);
|
|
11800
|
+
padding-top: 16px;
|
|
11801
|
+
margin-top: 20px;
|
|
11802
|
+
}
|
|
11803
|
+
|
|
11804
|
+
.btn {
|
|
11805
|
+
padding: 10px 20px;
|
|
11806
|
+
border-radius: 4px;
|
|
11807
|
+
font-size: 14px;
|
|
11808
|
+
font-weight: 500;
|
|
11809
|
+
cursor: pointer;
|
|
11810
|
+
transition: background-color 0.2s ease;
|
|
11811
|
+
}
|
|
11812
|
+
|
|
11813
|
+
.btn-primary {
|
|
11814
|
+
border: none;
|
|
11815
|
+
background: var(--buttonBgColor, var(--jupiter-primary-color, #1976d2));
|
|
11816
|
+
color: var(--buttonTextColor, white);
|
|
11817
|
+
}
|
|
11818
|
+
|
|
11819
|
+
.btn-primary:hover {
|
|
11820
|
+
opacity: 0.9;
|
|
11821
|
+
}
|
|
11822
|
+
|
|
11823
|
+
.btn-secondary {
|
|
11824
|
+
border: 1px solid var(--jupiter-border-color, #ddd);
|
|
11825
|
+
background: transparent;
|
|
11826
|
+
color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
|
|
11827
|
+
}
|
|
11828
|
+
|
|
11829
|
+
.btn-secondary:hover {
|
|
11830
|
+
background: var(--jupiter-hover-background, #f5f5f5);
|
|
11831
|
+
}
|
|
11832
|
+
`;
|
|
11833
|
+
__decorateClass$1([
|
|
11834
|
+
n2({ type: Boolean, reflect: true })
|
|
11835
|
+
], JupiterConfirmDialog.prototype, "open", 2);
|
|
11836
|
+
__decorateClass$1([
|
|
11837
|
+
n2({ type: String })
|
|
11838
|
+
], JupiterConfirmDialog.prototype, "heading", 2);
|
|
11839
|
+
__decorateClass$1([
|
|
11840
|
+
n2({ type: String })
|
|
11841
|
+
], JupiterConfirmDialog.prototype, "message", 2);
|
|
11842
|
+
__decorateClass$1([
|
|
11843
|
+
n2({ type: String })
|
|
11844
|
+
], JupiterConfirmDialog.prototype, "confirmLabel", 2);
|
|
11845
|
+
__decorateClass$1([
|
|
11846
|
+
n2({ type: String })
|
|
11847
|
+
], JupiterConfirmDialog.prototype, "cancelLabel", 2);
|
|
11848
|
+
JupiterConfirmDialog = __decorateClass$1([
|
|
11849
|
+
t$1("jupiter-confirm-dialog")
|
|
11850
|
+
], JupiterConfirmDialog);
|
|
11555
11851
|
var __defProp = Object.defineProperty;
|
|
11556
11852
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11557
11853
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -11612,6 +11908,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
11612
11908
|
this._allSections = [];
|
|
11613
11909
|
this._selectedRoleIds = [];
|
|
11614
11910
|
this._showFilterDialog = false;
|
|
11911
|
+
this._revealRolePrompt = null;
|
|
11615
11912
|
this._showFactsOnly = false;
|
|
11616
11913
|
this._conceptSearchText = "";
|
|
11617
11914
|
this._periodPreferences = {};
|
|
@@ -11709,6 +12006,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
11709
12006
|
clearInterval(this._autoSaveTimer);
|
|
11710
12007
|
this._autoSaveTimer = null;
|
|
11711
12008
|
}
|
|
12009
|
+
this._settleRevealRolePrompt(false);
|
|
11712
12010
|
}
|
|
11713
12011
|
/**
|
|
11714
12012
|
* Capture the current _formData as the auto-save baseline.
|
|
@@ -12405,8 +12703,14 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
12405
12703
|
this.scrollToConcept(event.detail.conceptQName, void 0, void 0, event.detail.columnId, event.detail.conceptId);
|
|
12406
12704
|
}
|
|
12407
12705
|
_handleRoleFilterApply(event) {
|
|
12408
|
-
var _a, _b;
|
|
12409
12706
|
const { selectedRoleIds, periodPreferences } = event.detail;
|
|
12707
|
+
this._applyRoleSelection(selectedRoleIds, periodPreferences, "filterDialog");
|
|
12708
|
+
}
|
|
12709
|
+
// Applies a new role selection: preserves entered data through a draft, rebuilds the form, and
|
|
12710
|
+
// restores the data. Shared by the Filter Roles dialog and scrollToConcept's reveal (JDF-086).
|
|
12711
|
+
// Resolves once the draft has been restored into the rebuilt form.
|
|
12712
|
+
_applyRoleSelection(selectedRoleIds, periodPreferences, source) {
|
|
12713
|
+
var _a, _b;
|
|
12410
12714
|
console.log("🎯 Filter apply triggered");
|
|
12411
12715
|
console.log("📊 Old _selectedRoleIds:", this._selectedRoleIds);
|
|
12412
12716
|
console.log("📊 New selectedRoleIds from dialog:", selectedRoleIds);
|
|
@@ -12447,7 +12751,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
12447
12751
|
console.log("📊 After _initializeForm, _currentSchema.sections.length:", (_a = this._currentSchema) == null ? void 0 : _a.sections.length);
|
|
12448
12752
|
console.log("📊 Section IDs:", (_b = this._currentSchema) == null ? void 0 : _b.sections.map((s2) => s2.id));
|
|
12449
12753
|
console.log("📥 Restoring form data from draft after reinitialization...");
|
|
12450
|
-
this._loadDraftIfExists().then(() => {
|
|
12754
|
+
const restored = this._loadDraftIfExists().then(() => {
|
|
12451
12755
|
this._seedAutoSaveBaseline();
|
|
12452
12756
|
console.log("✅ Form data restored successfully after reinitialization");
|
|
12453
12757
|
}).catch((error2) => {
|
|
@@ -12463,10 +12767,43 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
12463
12767
|
// Enhanced structure with roleURI and order
|
|
12464
12768
|
totalRoles: this._allSections.length,
|
|
12465
12769
|
visibleRoles: roleCount,
|
|
12466
|
-
periodPreferences
|
|
12770
|
+
periodPreferences,
|
|
12771
|
+
source
|
|
12467
12772
|
},
|
|
12468
12773
|
bubbles: true
|
|
12469
12774
|
}));
|
|
12775
|
+
return restored;
|
|
12776
|
+
}
|
|
12777
|
+
// JDF-086: scrollToConcept found its target in a role the user has filtered out of the left
|
|
12778
|
+
// panel. Resolves true if the user agrees to show that role. A newer call replaces a prompt
|
|
12779
|
+
// that is still open; the older call then resolves false.
|
|
12780
|
+
_confirmRevealHiddenRole(section2) {
|
|
12781
|
+
var _a;
|
|
12782
|
+
(_a = this._revealRolePrompt) == null ? void 0 : _a.resolve(false);
|
|
12783
|
+
return new Promise((resolve) => {
|
|
12784
|
+
this._revealRolePrompt = { section: section2, resolve };
|
|
12785
|
+
});
|
|
12786
|
+
}
|
|
12787
|
+
_settleRevealRolePrompt(confirmed) {
|
|
12788
|
+
const prompt = this._revealRolePrompt;
|
|
12789
|
+
this._revealRolePrompt = null;
|
|
12790
|
+
prompt == null ? void 0 : prompt.resolve(confirmed);
|
|
12791
|
+
}
|
|
12792
|
+
// JDF-086: add one role to the current filter, exactly as if it had been ticked in the Filter
|
|
12793
|
+
// Roles dialog. The user's custom order is kept and the role is appended, as the dialog does
|
|
12794
|
+
// for newly ticked roles.
|
|
12795
|
+
_revealRole(section2) {
|
|
12796
|
+
var _a;
|
|
12797
|
+
const current = this._selectedRoleIds;
|
|
12798
|
+
let selected;
|
|
12799
|
+
if (current.length > 0 && typeof current[0] === "object") {
|
|
12800
|
+
const enhanced = current;
|
|
12801
|
+
const nextOrder = Math.max(-1, ...enhanced.map((r2) => r2.order)) + 1;
|
|
12802
|
+
selected = [...enhanced, { roleId: section2.id, roleURI: ((_a = section2.metadata) == null ? void 0 : _a.roleURI) || "", order: nextOrder }];
|
|
12803
|
+
} else {
|
|
12804
|
+
selected = [...current, section2.id];
|
|
12805
|
+
}
|
|
12806
|
+
return this._applyRoleSelection(selected, this._periodPreferences, "scrollToConcept");
|
|
12470
12807
|
}
|
|
12471
12808
|
/**
|
|
12472
12809
|
* Check if dimension selections have changed for any role
|
|
@@ -12916,11 +13253,21 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
12916
13253
|
return this._xbrlFormErrors.some((error2) => error2.sectionId === roleId);
|
|
12917
13254
|
}
|
|
12918
13255
|
async _handleErrorFieldClick(conceptId, columnId, sectionId) {
|
|
12919
|
-
var _a, _b, _c, _d;
|
|
13256
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
12920
13257
|
console.log(`🎯 [Error Click] Attempting to focus field: ${conceptId}__${columnId} in section: ${sectionId}`);
|
|
12921
13258
|
this._showErrorPopup = false;
|
|
12922
13259
|
this.requestUpdate();
|
|
12923
13260
|
await this.updateComplete;
|
|
13261
|
+
if (!((_a = this._currentSchema) == null ? void 0 : _a.sections.some((s2) => s2.id === sectionId))) {
|
|
13262
|
+
const section2 = this._allSections.find((s2) => s2.id === sectionId);
|
|
13263
|
+
if (!section2 || !await this._confirmRevealHiddenRole(section2))
|
|
13264
|
+
return;
|
|
13265
|
+
await this._revealRole(section2);
|
|
13266
|
+
}
|
|
13267
|
+
if ((_b = this._hiddenColumnIds.get(sectionId)) == null ? void 0 : _b.has(columnId)) {
|
|
13268
|
+
this._showColumn(sectionId, columnId);
|
|
13269
|
+
await this.updateComplete;
|
|
13270
|
+
}
|
|
12924
13271
|
if (this.display === "sidePanel" && this._activeSidePanelRoleId !== sectionId) {
|
|
12925
13272
|
console.log(`🔀 Switching to section: ${sectionId} (currently on: ${this._activeSidePanelRoleId})`);
|
|
12926
13273
|
this._activeSidePanelRoleId = sectionId;
|
|
@@ -12928,7 +13275,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
12928
13275
|
await this.updateComplete;
|
|
12929
13276
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
12930
13277
|
}
|
|
12931
|
-
const sectionElements = (
|
|
13278
|
+
const sectionElements = (_c = this.shadowRoot) == null ? void 0 : _c.querySelectorAll("jupiter-form-section");
|
|
12932
13279
|
let targetSection = null;
|
|
12933
13280
|
sectionElements == null ? void 0 : sectionElements.forEach((sectionEl) => {
|
|
12934
13281
|
var _a2;
|
|
@@ -12941,19 +13288,14 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
12941
13288
|
return;
|
|
12942
13289
|
}
|
|
12943
13290
|
console.log(`✅ Found section element:`, targetSection);
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
targetSection.requestUpdate();
|
|
12948
|
-
await targetSection.updateComplete;
|
|
12949
|
-
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
12950
|
-
} else {
|
|
12951
|
-
await targetSection.updateComplete;
|
|
12952
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
13291
|
+
await targetSection.updateComplete;
|
|
13292
|
+
if (await ((_d = targetSection.revealConcept) == null ? void 0 : _d.call(targetSection, conceptId))) {
|
|
13293
|
+
await Promise.all(Array.from(((_e = targetSection.shadowRoot) == null ? void 0 : _e.querySelectorAll("jupiter-concept-tree")) ?? []).map((ct) => ct.updateComplete));
|
|
12953
13294
|
}
|
|
13295
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
12954
13296
|
console.log(`🔍 Section shadow DOM exists: ${!!targetSection.shadowRoot}`);
|
|
12955
13297
|
if (targetSection.shadowRoot) {
|
|
12956
|
-
console.log(`🔍 Shadow DOM innerHTML length: ${((
|
|
13298
|
+
console.log(`🔍 Shadow DOM innerHTML length: ${((_f = targetSection.shadowRoot.innerHTML) == null ? void 0 : _f.length) || 0}`);
|
|
12957
13299
|
const allElements = targetSection.shadowRoot.querySelectorAll("*");
|
|
12958
13300
|
console.log(`🔍 Total elements in shadow DOM: ${allElements.length}`);
|
|
12959
13301
|
const customElements2 = Array.from(allElements).filter((el) => {
|
|
@@ -12965,7 +13307,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
12965
13307
|
const fieldId = `${conceptId}_${columnId}_field`;
|
|
12966
13308
|
console.log(`🔍 Looking for input with fieldId: ${fieldId}`);
|
|
12967
13309
|
console.log(`🔍 Looking for field with conceptId: ${conceptId} AND columnId: ${columnId}`);
|
|
12968
|
-
const conceptTrees = (
|
|
13310
|
+
const conceptTrees = (_g = targetSection.shadowRoot) == null ? void 0 : _g.querySelectorAll("jupiter-concept-tree");
|
|
12969
13311
|
let targetInput = null;
|
|
12970
13312
|
console.log(`🔍 Found ${(conceptTrees == null ? void 0 : conceptTrees.length) || 0} concept-tree elements`);
|
|
12971
13313
|
if (conceptTrees) {
|
|
@@ -13064,10 +13406,15 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
13064
13406
|
}));
|
|
13065
13407
|
}
|
|
13066
13408
|
_handleColumnShow(event) {
|
|
13067
|
-
var _a;
|
|
13068
13409
|
const { columnId, sectionId } = event.detail;
|
|
13069
13410
|
if (!sectionId || !columnId)
|
|
13070
13411
|
return;
|
|
13412
|
+
this._showColumn(sectionId, columnId);
|
|
13413
|
+
}
|
|
13414
|
+
// Un-hides a column the user collapsed. Shared by the collapsed header's double-click and by
|
|
13415
|
+
// navigation to a field in that column (scrollToConcept, the error popup — JDF-088).
|
|
13416
|
+
_showColumn(sectionId, columnId) {
|
|
13417
|
+
var _a;
|
|
13071
13418
|
(_a = this._hiddenColumnIds.get(sectionId)) == null ? void 0 : _a.delete(columnId);
|
|
13072
13419
|
this._dirty = true;
|
|
13073
13420
|
this.hasUnsavedChanges = true;
|
|
@@ -15838,9 +16185,10 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
15838
16185
|
}
|
|
15839
16186
|
return false;
|
|
15840
16187
|
}
|
|
15841
|
-
|
|
15842
|
-
|
|
15843
|
-
|
|
16188
|
+
// Every column carrying all of `dims`. More than one is normal: a previous-year column copies
|
|
16189
|
+
// its current-year column's dimensions and differs only in period, which callers don't pass.
|
|
16190
|
+
_findColumnsByDimensions(columns, dims) {
|
|
16191
|
+
return columns.filter((col) => {
|
|
15844
16192
|
if (col.type !== "dimension" || !col.dimensionData)
|
|
15845
16193
|
return false;
|
|
15846
16194
|
const combos = col.dimensionData.combinations;
|
|
@@ -15852,13 +16200,61 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
15852
16200
|
);
|
|
15853
16201
|
}
|
|
15854
16202
|
return dims.length === 1 && this._normalizeAxisId(col.dimensionData.axisId ?? "") === this._normalizeAxisId(dims[0].axis) && this._normalizeMemberId(col.dimensionData.memberId ?? "") === this._normalizeMemberId(dims[0].member);
|
|
15855
|
-
})
|
|
16203
|
+
});
|
|
15856
16204
|
}
|
|
15857
|
-
|
|
15858
|
-
|
|
15859
|
-
|
|
15860
|
-
|
|
15861
|
-
|
|
16205
|
+
// Which of `candidates` a scrollToConcept call points at in one row. Narrowed first by
|
|
16206
|
+
// `period` (the columns whose fact has that period), then by `targetValue` (the column whose
|
|
16207
|
+
// stored fact equals it — exactly before up-to-scale, visible before hidden); a step that
|
|
16208
|
+
// singles nothing out is skipped. Else the first candidate.
|
|
16209
|
+
_pickColumn(section2, concept, candidates, targetValue, period, hiddenColumnIds) {
|
|
16210
|
+
var _a;
|
|
16211
|
+
let pool = candidates;
|
|
16212
|
+
if (period && pool.length > 1) {
|
|
16213
|
+
const inPeriod = pool.filter((c2) => this._periodMatches(this._cellPeriod(section2, concept, c2.id), period));
|
|
16214
|
+
if (inPeriod.length)
|
|
16215
|
+
pool = inPeriod;
|
|
16216
|
+
}
|
|
16217
|
+
const rowData = this._formData[concept.id];
|
|
16218
|
+
if (pool.length > 1 && targetValue !== null && rowData) {
|
|
16219
|
+
const filled = pool.filter((c2) => rowData[c2.id] !== void 0 && rowData[c2.id] !== null && rowData[c2.id] !== "");
|
|
16220
|
+
const exact = filled.filter((c2) => String(rowData[c2.id]) === targetValue || Number(rowData[c2.id]) === Number(targetValue));
|
|
16221
|
+
const holders = exact.length ? exact : filled.filter((c2) => this._valueLooselyMatches(rowData[c2.id], targetValue));
|
|
16222
|
+
const holder = holders.find((c2) => !(hiddenColumnIds == null ? void 0 : hiddenColumnIds.has(c2.id))) ?? holders[0];
|
|
16223
|
+
if (holder)
|
|
16224
|
+
return holder.id;
|
|
16225
|
+
}
|
|
16226
|
+
return (_a = pool[0]) == null ? void 0 : _a.id;
|
|
16227
|
+
}
|
|
16228
|
+
// The period Save Draft/Submit write for this cell's fact (same fallback chain as
|
|
16229
|
+
// _processConceptsForSubmission), so a period the host read off a saved fact compares equal —
|
|
16230
|
+
// including user-edited periods and periodStartLabel rows' "day before start" instants.
|
|
16231
|
+
_cellPeriod(section2, concept, columnId) {
|
|
16232
|
+
var _a, _b;
|
|
16233
|
+
const column2 = this._findColumnByIdInSection(columnId, section2);
|
|
16234
|
+
const field2 = ((_a = concept.fields) == null ? void 0 : _a.find((f2) => f2.columnId === columnId)) ?? { columnId };
|
|
16235
|
+
const fieldPeriodData = (_b = this._periodData[concept.id]) == null ? void 0 : _b[columnId];
|
|
16236
|
+
if (concept.periodType === "instant") {
|
|
16237
|
+
return { instant: this._resolveSubmissionInstantDate(concept, field2, fieldPeriodData, column2) };
|
|
16238
|
+
}
|
|
16239
|
+
return {
|
|
16240
|
+
startDate: (fieldPeriodData == null ? void 0 : fieldPeriodData.startDate) || (column2 == null ? void 0 : column2.periodStartDate) || field2.periodStartDate || this.periodStartDate,
|
|
16241
|
+
endDate: (fieldPeriodData == null ? void 0 : fieldPeriodData.endDate) || (column2 == null ? void 0 : column2.periodEndDate) || field2.periodEndDate || this.periodEndDate
|
|
16242
|
+
};
|
|
16243
|
+
}
|
|
16244
|
+
// Every date the host gave equals the cell's; an instant only matches an instant cell, a
|
|
16245
|
+
// start/end only a duration cell. Compared as YYYY-MM-DD so a time part doesn't matter.
|
|
16246
|
+
_periodMatches(cell, period) {
|
|
16247
|
+
const day = (d2) => d2 == null ? void 0 : d2.slice(0, 10);
|
|
16248
|
+
const instant = period.instant ?? period.date;
|
|
16249
|
+
if (instant)
|
|
16250
|
+
return day(cell.instant) === day(instant);
|
|
16251
|
+
return !cell.instant && (!period.startDate || day(cell.startDate) === day(period.startDate)) && (!period.endDate || day(cell.endDate) === day(period.endDate));
|
|
16252
|
+
}
|
|
16253
|
+
// Step 1 of scrollToConcept: pick the section + concept row to navigate to. Precedence:
|
|
16254
|
+
// exactConceptId (caller resolved the row) → role (JDF-087: caller named the role) → the
|
|
16255
|
+
// original whole-form search (visible sections first, then the rest).
|
|
16256
|
+
_resolveScrollTarget(conceptName, dimensions, columnId, exactConceptId, role, targetValue, period) {
|
|
16257
|
+
var _a;
|
|
15862
16258
|
const sectionsToSearch = [
|
|
15863
16259
|
...((_a = this._currentSchema) == null ? void 0 : _a.sections) ?? [],
|
|
15864
16260
|
...this._allSections.filter((s2) => {
|
|
@@ -15867,101 +16263,172 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
15867
16263
|
})
|
|
15868
16264
|
];
|
|
15869
16265
|
console.log(`[scrollToConcept] Searching ${sectionsToSearch.length} sections`);
|
|
15870
|
-
const hasValueMatch = (match == null ? void 0 : match.value) !== void 0 && (match == null ? void 0 : match.value) !== null;
|
|
15871
|
-
const targetValue = hasValueMatch ? String(match.value) : null;
|
|
15872
16266
|
if (exactConceptId) {
|
|
15873
16267
|
for (const section2 of sectionsToSearch) {
|
|
15874
16268
|
const found = this._findConceptById(section2.concepts, exactConceptId);
|
|
15875
16269
|
if (found) {
|
|
15876
16270
|
console.log(`[scrollToConcept] Section "${section2.id}" matched exactConceptId="${exactConceptId}"`);
|
|
15877
|
-
|
|
15878
|
-
targetConcept = found;
|
|
15879
|
-
break;
|
|
16271
|
+
return { section: section2, concept: found, viaRole: false };
|
|
15880
16272
|
}
|
|
15881
16273
|
}
|
|
15882
16274
|
}
|
|
15883
|
-
if (
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
|
|
16275
|
+
if (role) {
|
|
16276
|
+
const matches = rankMatchingSections(role, sectionsToSearch);
|
|
16277
|
+
console.log(`[scrollToConcept] role="${role}" matched ${matches.length} section(s): ${matches.slice(0, 5).map((m) => `${m.section.id} (tier ${m.tier})`).join(", ")}`);
|
|
16278
|
+
for (const { section: section2, tier } of matches) {
|
|
16279
|
+
const hit = this._resolveConceptInSection(section2, conceptName, dimensions, columnId, targetValue, period);
|
|
16280
|
+
if (!hit)
|
|
15887
16281
|
continue;
|
|
15888
|
-
|
|
15889
|
-
|
|
15890
|
-
let picked;
|
|
15891
|
-
if (candidates.length > 1) {
|
|
15892
|
-
picked = candidates.find((c2) => {
|
|
15893
|
-
const rowData = this._formData[c2.id];
|
|
15894
|
-
if (!rowData)
|
|
15895
|
-
return false;
|
|
15896
|
-
if (resolvedColumnId) {
|
|
15897
|
-
const cellValue = rowData[resolvedColumnId];
|
|
15898
|
-
if (cellValue === void 0 || cellValue === null || cellValue === "")
|
|
15899
|
-
return false;
|
|
15900
|
-
return !hasValueMatch || this._valueLooselyMatches(cellValue, targetValue);
|
|
15901
|
-
}
|
|
15902
|
-
if (hasValueMatch) {
|
|
15903
|
-
return Object.values(rowData).some(
|
|
15904
|
-
(v) => v !== void 0 && v !== null && v !== "" && this._valueLooselyMatches(v, targetValue)
|
|
15905
|
-
);
|
|
15906
|
-
}
|
|
15907
|
-
return false;
|
|
15908
|
-
});
|
|
15909
|
-
console.log(`[scrollToConcept] Section "${section2.id}" has ${candidates.length} rows named "${conceptName}" | disambiguated=${(picked == null ? void 0 : picked.id) ?? "none (using first)"}`);
|
|
15910
|
-
}
|
|
15911
|
-
const found = picked ?? candidates[0];
|
|
15912
|
-
if (columnId) {
|
|
15913
|
-
const hasColumn = cols.some((c2) => c2.id === columnId);
|
|
15914
|
-
console.log(`[scrollToConcept] Section "${section2.id}" has concept "${found.id}" | columnId="${columnId}" present=${hasColumn}`);
|
|
15915
|
-
if (hasColumn) {
|
|
15916
|
-
targetSection = section2;
|
|
15917
|
-
targetConcept = found;
|
|
15918
|
-
break;
|
|
15919
|
-
} else if (!targetSection) {
|
|
15920
|
-
targetSection = section2;
|
|
15921
|
-
targetConcept = found;
|
|
15922
|
-
}
|
|
15923
|
-
} else if (dimensions == null ? void 0 : dimensions.length) {
|
|
15924
|
-
console.log(`[scrollToConcept] Section "${section2.id}" has concept "${found.id}" | colMatch=${resolvedColumnId ?? "null"} | cols=${cols.map((c2) => c2.id).join(",")}`);
|
|
15925
|
-
if (resolvedColumnId) {
|
|
15926
|
-
targetSection = section2;
|
|
15927
|
-
targetConcept = found;
|
|
15928
|
-
break;
|
|
15929
|
-
} else if (!targetSection) {
|
|
15930
|
-
targetSection = section2;
|
|
15931
|
-
targetConcept = found;
|
|
15932
|
-
}
|
|
15933
|
-
} else {
|
|
15934
|
-
console.log(`[scrollToConcept] Section "${section2.id}" has concept "${found.id}" (no dims, taking first)`);
|
|
15935
|
-
targetSection = section2;
|
|
15936
|
-
targetConcept = found;
|
|
15937
|
-
break;
|
|
16282
|
+
if (tier >= ROLE_MATCH_TIER.SUBSTRING) {
|
|
16283
|
+
console.warn(`[scrollToConcept] role="${role}" only fuzzily matched "${section2.id}" (tier ${tier}) — pass the role's id or local name for an exact match`);
|
|
15938
16284
|
}
|
|
16285
|
+
return { section: section2, concept: hit.concept, viaRole: true };
|
|
15939
16286
|
}
|
|
16287
|
+
console.warn(`[scrollToConcept] "${conceptName}" not found in any section matching role="${role}" — falling back to whole-form search`);
|
|
15940
16288
|
}
|
|
15941
|
-
|
|
16289
|
+
let columnOnly = null;
|
|
16290
|
+
let tentative = null;
|
|
16291
|
+
for (const section2 of sectionsToSearch) {
|
|
16292
|
+
const hit = this._resolveConceptInSection(section2, conceptName, dimensions, columnId, targetValue, period);
|
|
16293
|
+
if (!hit)
|
|
16294
|
+
continue;
|
|
16295
|
+
if (hit.strong && hit.inPeriod)
|
|
16296
|
+
return { section: section2, concept: hit.concept, viaRole: false };
|
|
16297
|
+
if (hit.strong)
|
|
16298
|
+
columnOnly ?? (columnOnly = { section: section2, concept: hit.concept });
|
|
16299
|
+
else
|
|
16300
|
+
tentative ?? (tentative = { section: section2, concept: hit.concept });
|
|
16301
|
+
}
|
|
16302
|
+
const fallback = columnOnly ?? tentative;
|
|
16303
|
+
return fallback ? { ...fallback, viaRole: false } : null;
|
|
16304
|
+
}
|
|
16305
|
+
// Finds conceptName's row in one section. `strong` is false when the concept is there but the
|
|
16306
|
+
// requested column (columnId, or one matching `dimensions`) isn't — the whole-form search keeps
|
|
16307
|
+
// such a hit only as a fallback while it looks for a section where the column is present.
|
|
16308
|
+
// `inPeriod` is false when `period` was given but none of those columns has it (same idea).
|
|
16309
|
+
_resolveConceptInSection(section2, conceptName, dimensions, columnId, targetValue, period) {
|
|
16310
|
+
const candidates = this._findAllConceptsByName(section2.concepts, conceptName);
|
|
16311
|
+
if (!candidates.length)
|
|
16312
|
+
return null;
|
|
16313
|
+
const hasValueMatch = targetValue !== null;
|
|
16314
|
+
const cols = section2.columns ?? this._columns;
|
|
16315
|
+
const resolvedColumnIds = columnId ? [columnId] : (dimensions == null ? void 0 : dimensions.length) ? this._findColumnsByDimensions(cols, dimensions).map((c2) => c2.id) : [];
|
|
16316
|
+
const cellMatches = (row, id, usePeriod) => {
|
|
16317
|
+
var _a;
|
|
16318
|
+
const cellValue = (_a = this._formData[row.id]) == null ? void 0 : _a[id];
|
|
16319
|
+
if (cellValue === void 0 || cellValue === null || cellValue === "")
|
|
16320
|
+
return false;
|
|
16321
|
+
if (hasValueMatch && !this._valueLooselyMatches(cellValue, targetValue))
|
|
16322
|
+
return false;
|
|
16323
|
+
return !usePeriod || this._periodMatches(this._cellPeriod(section2, row, id), period);
|
|
16324
|
+
};
|
|
16325
|
+
const rowMatches = (row, usePeriod) => {
|
|
16326
|
+
if (resolvedColumnIds.length)
|
|
16327
|
+
return resolvedColumnIds.some((id) => cellMatches(row, id, usePeriod));
|
|
16328
|
+
if (!hasValueMatch && !usePeriod)
|
|
16329
|
+
return false;
|
|
16330
|
+
return Object.keys(this._formData[row.id] ?? {}).some((id) => cellMatches(row, id, usePeriod));
|
|
16331
|
+
};
|
|
16332
|
+
let picked;
|
|
16333
|
+
if (candidates.length > 1) {
|
|
16334
|
+
picked = (period ? candidates.find((c2) => rowMatches(c2, true)) : void 0) ?? candidates.find((c2) => rowMatches(c2, false));
|
|
16335
|
+
console.log(`[scrollToConcept] Section "${section2.id}" has ${candidates.length} rows named "${conceptName}" | disambiguated=${(picked == null ? void 0 : picked.id) ?? "none (using first)"}`);
|
|
16336
|
+
}
|
|
16337
|
+
const found = picked ?? candidates[0];
|
|
16338
|
+
const inPeriod = (ids) => !period || ids.some((id) => this._periodMatches(this._cellPeriod(section2, found, id), period));
|
|
16339
|
+
if (columnId) {
|
|
16340
|
+
const hasColumn = cols.some((c2) => c2.id === columnId);
|
|
16341
|
+
console.log(`[scrollToConcept] Section "${section2.id}" has concept "${found.id}" | columnId="${columnId}" present=${hasColumn}`);
|
|
16342
|
+
return { concept: found, strong: hasColumn, inPeriod: inPeriod(hasColumn ? [columnId] : []) };
|
|
16343
|
+
}
|
|
16344
|
+
if (dimensions == null ? void 0 : dimensions.length) {
|
|
16345
|
+
console.log(`[scrollToConcept] Section "${section2.id}" has concept "${found.id}" | colMatch=${resolvedColumnIds.join(",") || "null"} | cols=${cols.map((c2) => c2.id).join(",")}`);
|
|
16346
|
+
return { concept: found, strong: resolvedColumnIds.length > 0, inPeriod: inPeriod(resolvedColumnIds) };
|
|
16347
|
+
}
|
|
16348
|
+
console.log(`[scrollToConcept] Section "${section2.id}" has concept "${found.id}" (no dims, taking first)`);
|
|
16349
|
+
return { concept: found, strong: true, inPeriod: inPeriod(cols.map((c2) => c2.id)) };
|
|
16350
|
+
}
|
|
16351
|
+
async scrollToConcept(conceptName, dimensions, match, columnId, exactConceptId, role) {
|
|
16352
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
16353
|
+
console.log(`[scrollToConcept] ▶ START conceptName=${conceptName} value=${match == null ? void 0 : match.value} period=${JSON.stringify(match == null ? void 0 : match.period)} dims=${JSON.stringify(dimensions)} columnId=${columnId} exactConceptId=${exactConceptId} role=${role}`);
|
|
16354
|
+
const hasValueMatch = (match == null ? void 0 : match.value) !== void 0 && (match == null ? void 0 : match.value) !== null;
|
|
16355
|
+
const targetValue = hasValueMatch ? String(match.value) : null;
|
|
16356
|
+
const period = (match == null ? void 0 : match.period) && (match.period.instant || match.period.date || match.period.startDate || match.period.endDate) ? match.period : void 0;
|
|
16357
|
+
const resolved = this._resolveScrollTarget(conceptName, dimensions, columnId, exactConceptId, role, targetValue, period);
|
|
16358
|
+
if (!resolved) {
|
|
15942
16359
|
console.warn(`[scrollToConcept] Concept not found: ${conceptName}`);
|
|
15943
16360
|
return;
|
|
15944
16361
|
}
|
|
15945
|
-
|
|
16362
|
+
let { section: targetSection, concept: targetConcept } = resolved;
|
|
16363
|
+
const { viaRole } = resolved;
|
|
16364
|
+
console.log(`[scrollToConcept] → targetSection="${targetSection.id}" targetConceptId="${targetConcept.id}" viaRole=${viaRole}`);
|
|
16365
|
+
if (!((_a = this._currentSchema) == null ? void 0 : _a.sections.some((s2) => s2.id === targetSection.id))) {
|
|
16366
|
+
console.log(`[scrollToConcept] Role "${targetSection.id}" is filtered out — asking to show it`);
|
|
16367
|
+
if (!await this._confirmRevealHiddenRole(targetSection)) {
|
|
16368
|
+
console.log("[scrollToConcept] Reveal declined — not navigating");
|
|
16369
|
+
return;
|
|
16370
|
+
}
|
|
16371
|
+
await this._revealRole(targetSection);
|
|
16372
|
+
const revealedSection = (_b = this._currentSchema) == null ? void 0 : _b.sections.find((s2) => s2.id === targetSection.id);
|
|
16373
|
+
const revealedConcept = revealedSection && this._findConceptById(revealedSection.concepts, targetConcept.id);
|
|
16374
|
+
if (!revealedSection || !revealedConcept) {
|
|
16375
|
+
console.warn(`[scrollToConcept] Revealed role "${targetSection.id}" but could not find row "${targetConcept.id}" in it`);
|
|
16376
|
+
return;
|
|
16377
|
+
}
|
|
16378
|
+
targetSection = revealedSection;
|
|
16379
|
+
targetConcept = revealedConcept;
|
|
16380
|
+
}
|
|
15946
16381
|
targetSection.expanded = true;
|
|
15947
16382
|
if (this.display === "sidePanel" && this._activeSidePanelRoleId !== targetSection.id) {
|
|
15948
16383
|
this._activeSidePanelRoleId = targetSection.id;
|
|
15949
16384
|
}
|
|
15950
16385
|
const columns = targetSection.columns ?? this._columns;
|
|
16386
|
+
const hiddenColumnIds = this._hiddenColumnIds.get(targetSection.id);
|
|
15951
16387
|
let targetColumnId = null;
|
|
15952
16388
|
if (columnId) {
|
|
15953
16389
|
targetColumnId = columnId;
|
|
15954
16390
|
} else if (dimensions == null ? void 0 : dimensions.length) {
|
|
15955
|
-
targetColumnId = this.
|
|
16391
|
+
targetColumnId = this._pickColumn(
|
|
16392
|
+
targetSection,
|
|
16393
|
+
targetConcept,
|
|
16394
|
+
this._findColumnsByDimensions(columns, dimensions),
|
|
16395
|
+
targetValue,
|
|
16396
|
+
period,
|
|
16397
|
+
hiddenColumnIds
|
|
16398
|
+
) ?? null;
|
|
16399
|
+
} else if (period && columns.some((c2) => this._periodMatches(this._cellPeriod(targetSection, targetConcept, c2.id), period))) {
|
|
16400
|
+
targetColumnId = this._pickColumn(targetSection, targetConcept, columns, targetValue, period, hiddenColumnIds) ?? null;
|
|
15956
16401
|
} else if (!hasValueMatch) {
|
|
15957
|
-
targetColumnId = ((
|
|
16402
|
+
targetColumnId = ((_c = columns.find((c2) => !(hiddenColumnIds == null ? void 0 : hiddenColumnIds.has(c2.id))) ?? columns[0]) == null ? void 0 : _c.id) ?? null;
|
|
16403
|
+
}
|
|
16404
|
+
if (hiddenColumnIds == null ? void 0 : hiddenColumnIds.size) {
|
|
16405
|
+
let columnToShow;
|
|
16406
|
+
if (targetColumnId) {
|
|
16407
|
+
if (hiddenColumnIds.has(targetColumnId))
|
|
16408
|
+
columnToShow = targetColumnId;
|
|
16409
|
+
} else if (hasValueMatch) {
|
|
16410
|
+
const rowData = this._formData[targetConcept.id] ?? {};
|
|
16411
|
+
const holders = columns.filter((c2) => {
|
|
16412
|
+
const v = rowData[c2.id];
|
|
16413
|
+
return v !== void 0 && v !== null && v !== "" && this._valueLooselyMatches(v, targetValue);
|
|
16414
|
+
});
|
|
16415
|
+
if (holders.length && holders.every((c2) => hiddenColumnIds.has(c2.id))) {
|
|
16416
|
+
columnToShow = holders[0].id;
|
|
16417
|
+
targetColumnId = columnToShow;
|
|
16418
|
+
}
|
|
16419
|
+
}
|
|
16420
|
+
if (columnToShow) {
|
|
16421
|
+
console.log(`[scrollToConcept] Column "${columnToShow}" is hidden in "${targetSection.id}" — showing it`);
|
|
16422
|
+
this._showColumn(targetSection.id, columnToShow);
|
|
16423
|
+
}
|
|
15958
16424
|
}
|
|
15959
|
-
|
|
16425
|
+
const periodPinned = !!period && !!targetColumnId && this._periodMatches(this._cellPeriod(targetSection, targetConcept, targetColumnId), period);
|
|
16426
|
+
console.log(`[scrollToConcept] targetColumnId=${targetColumnId} hasValueMatch=${hasValueMatch} targetValue=${targetValue} periodPinned=${periodPinned}`);
|
|
15960
16427
|
this._conceptSearchText = conceptName.includes(":") ? conceptName.split(":").pop() : conceptName;
|
|
15961
16428
|
this.requestUpdate();
|
|
15962
16429
|
await this.updateComplete;
|
|
15963
16430
|
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
15964
|
-
const sectionElements = (
|
|
16431
|
+
const sectionElements = (_d = this.shadowRoot) == null ? void 0 : _d.querySelectorAll("jupiter-form-section");
|
|
15965
16432
|
console.log(`[scrollToConcept] DOM: found ${(sectionElements == null ? void 0 : sectionElements.length) ?? 0} jupiter-form-section elements`);
|
|
15966
16433
|
let targetSectionEl = null;
|
|
15967
16434
|
sectionElements == null ? void 0 : sectionElements.forEach((el) => {
|
|
@@ -15974,7 +16441,10 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
15974
16441
|
return;
|
|
15975
16442
|
}
|
|
15976
16443
|
await targetSectionEl.updateComplete;
|
|
15977
|
-
|
|
16444
|
+
if (await ((_e = targetSectionEl.revealConcept) == null ? void 0 : _e.call(targetSectionEl, targetConcept.id))) {
|
|
16445
|
+
await Promise.all(Array.from(((_f = targetSectionEl.shadowRoot) == null ? void 0 : _f.querySelectorAll("jupiter-concept-tree")) ?? []).map((ct) => ct.updateComplete));
|
|
16446
|
+
}
|
|
16447
|
+
const conceptTrees = (_g = targetSectionEl.shadowRoot) == null ? void 0 : _g.querySelectorAll("jupiter-concept-tree");
|
|
15978
16448
|
console.log(`[scrollToConcept] conceptTrees in targetSection: ${(conceptTrees == null ? void 0 : conceptTrees.length) ?? 0}`);
|
|
15979
16449
|
let targetFieldEl = null;
|
|
15980
16450
|
const conceptId = targetConcept.id;
|
|
@@ -16014,7 +16484,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
16014
16484
|
if (targetFieldEl)
|
|
16015
16485
|
return;
|
|
16016
16486
|
const columnMatch = targetColumnId ? fieldEl.conceptId === conceptId && fieldEl.columnId === targetColumnId : fieldEl.conceptId === conceptId;
|
|
16017
|
-
const valueMatch = !hasValueMatch || valueMatchesTarget(fieldEl, targetValue);
|
|
16487
|
+
const valueMatch = !hasValueMatch || periodPinned || valueMatchesTarget(fieldEl, targetValue);
|
|
16018
16488
|
if (columnMatch) {
|
|
16019
16489
|
phase1FieldCount++;
|
|
16020
16490
|
console.log(`[scrollToConcept] Phase1 candidate: conceptId=${fieldEl.conceptId} columnId=${fieldEl.columnId} value=${fieldEl.value} scale=${getFieldScaleFactor(fieldEl)} valueMatch=${valueMatch}`);
|
|
@@ -16024,17 +16494,32 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
16024
16494
|
});
|
|
16025
16495
|
});
|
|
16026
16496
|
console.log(`[scrollToConcept] Phase1: scanned ${phase1FieldCount} candidates, found=${!!targetFieldEl}`);
|
|
16497
|
+
if (!targetFieldEl && viaRole) {
|
|
16498
|
+
const rowFields = [];
|
|
16499
|
+
conceptTrees == null ? void 0 : conceptTrees.forEach((ct) => {
|
|
16500
|
+
var _a2;
|
|
16501
|
+
(_a2 = ct.shadowRoot) == null ? void 0 : _a2.querySelectorAll("jupiter-form-field").forEach((fieldEl) => {
|
|
16502
|
+
if (fieldEl.conceptId === conceptId)
|
|
16503
|
+
rowFields.push(fieldEl);
|
|
16504
|
+
});
|
|
16505
|
+
});
|
|
16506
|
+
targetFieldEl = targetColumnId && rowFields.find((f2) => f2.columnId === targetColumnId) || rowFields[0] || null;
|
|
16507
|
+
if (targetFieldEl && targetColumnId && targetFieldEl.columnId !== targetColumnId) {
|
|
16508
|
+
console.warn(`[scrollToConcept] Phase1b: column "${targetColumnId}" not rendered in row "${conceptId}" — using column "${targetFieldEl.columnId}"`);
|
|
16509
|
+
}
|
|
16510
|
+
console.log(`[scrollToConcept] Phase1b (role-scoped): ${rowFields.length} fields in row "${conceptId}", found=${!!targetFieldEl}`);
|
|
16511
|
+
}
|
|
16027
16512
|
if (!targetFieldEl && hasValueMatch) {
|
|
16028
16513
|
console.log(`[scrollToConcept] Phase2: searching ALL sections by base concept name + value`);
|
|
16029
|
-
const allSectionEls = ((
|
|
16514
|
+
const allSectionEls = ((_h = this.shadowRoot) == null ? void 0 : _h.querySelectorAll("jupiter-form-section")) ?? [];
|
|
16030
16515
|
for (const secEl of Array.from(allSectionEls)) {
|
|
16031
16516
|
if (targetFieldEl)
|
|
16032
16517
|
break;
|
|
16033
|
-
const cts = ((
|
|
16518
|
+
const cts = ((_i = secEl.shadowRoot) == null ? void 0 : _i.querySelectorAll("jupiter-concept-tree")) ?? [];
|
|
16034
16519
|
for (const ct of Array.from(cts)) {
|
|
16035
16520
|
if (targetFieldEl)
|
|
16036
16521
|
break;
|
|
16037
|
-
const fields = ((
|
|
16522
|
+
const fields = ((_j = ct.shadowRoot) == null ? void 0 : _j.querySelectorAll("jupiter-form-field")) ?? [];
|
|
16038
16523
|
fields.forEach((fieldEl) => {
|
|
16039
16524
|
if (targetFieldEl)
|
|
16040
16525
|
return;
|
|
@@ -16052,15 +16537,15 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
16052
16537
|
}
|
|
16053
16538
|
}
|
|
16054
16539
|
if (!targetFieldEl) {
|
|
16055
|
-
const allSectionEls = ((
|
|
16540
|
+
const allSectionEls = ((_k = this.shadowRoot) == null ? void 0 : _k.querySelectorAll("jupiter-form-section")) ?? [];
|
|
16056
16541
|
for (const secEl of Array.from(allSectionEls)) {
|
|
16057
16542
|
if (targetFieldEl)
|
|
16058
16543
|
break;
|
|
16059
|
-
const cts = ((
|
|
16544
|
+
const cts = ((_l = secEl.shadowRoot) == null ? void 0 : _l.querySelectorAll("jupiter-concept-tree")) ?? [];
|
|
16060
16545
|
for (const ct of Array.from(cts)) {
|
|
16061
16546
|
if (targetFieldEl)
|
|
16062
16547
|
break;
|
|
16063
|
-
const fields = ((
|
|
16548
|
+
const fields = ((_m = ct.shadowRoot) == null ? void 0 : _m.querySelectorAll("jupiter-form-field")) ?? [];
|
|
16064
16549
|
fields.forEach((fieldEl) => {
|
|
16065
16550
|
if (targetFieldEl)
|
|
16066
16551
|
return;
|
|
@@ -16092,7 +16577,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
16092
16577
|
} else {
|
|
16093
16578
|
targetFieldEl.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
16094
16579
|
}
|
|
16095
|
-
const tableContainer = (
|
|
16580
|
+
const tableContainer = (_n = targetSectionEl == null ? void 0 : targetSectionEl.shadowRoot) == null ? void 0 : _n.querySelector(".table-container");
|
|
16096
16581
|
if (tableContainer && tableContainer.scrollWidth > tableContainer.clientWidth) {
|
|
16097
16582
|
const tableRect = tableContainer.getBoundingClientRect();
|
|
16098
16583
|
const targetScrollLeft = Math.max(
|
|
@@ -16105,7 +16590,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
16105
16590
|
const rowHost = rootNode instanceof ShadowRoot ? rootNode.host : null;
|
|
16106
16591
|
const highlightEl = rowHost ?? targetFieldEl;
|
|
16107
16592
|
highlightEl.classList.add("concept-highlight");
|
|
16108
|
-
const focusTarget = (
|
|
16593
|
+
const focusTarget = (_o = targetFieldEl.shadowRoot) == null ? void 0 : _o.querySelector(
|
|
16109
16594
|
'input:not([type="hidden"]), select, textarea, button, [tabindex]:not([tabindex="-1"])'
|
|
16110
16595
|
);
|
|
16111
16596
|
if (focusTarget) {
|
|
@@ -16248,6 +16733,20 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
16248
16733
|
></jupiter-formula-validation-dialog>
|
|
16249
16734
|
` : ""}
|
|
16250
16735
|
|
|
16736
|
+
<!-- Show filtered-out role? (JDF-086, from scrollToConcept) -->
|
|
16737
|
+
${this._revealRolePrompt ? html`
|
|
16738
|
+
<jupiter-confirm-dialog
|
|
16739
|
+
open
|
|
16740
|
+
.heading="${I18n.t("scrollToConcept.revealRole.title")}"
|
|
16741
|
+
.message="${I18n.t("scrollToConcept.revealRole.message", { role: this._revealRolePrompt.section.title })}"
|
|
16742
|
+
.confirmLabel="${I18n.t("scrollToConcept.revealRole.confirm")}"
|
|
16743
|
+
.cancelLabel="${I18n.t("scrollToConcept.revealRole.cancel")}"
|
|
16744
|
+
@dialog-confirm="${() => this._settleRevealRolePrompt(true)}"
|
|
16745
|
+
@dialog-cancel="${() => this._settleRevealRolePrompt(false)}"
|
|
16746
|
+
@click="${() => this._settleRevealRolePrompt(false)}"
|
|
16747
|
+
></jupiter-confirm-dialog>
|
|
16748
|
+
` : ""}
|
|
16749
|
+
|
|
16251
16750
|
<!-- Validation Error Popup -->
|
|
16252
16751
|
${this._showErrorPopup ? html`
|
|
16253
16752
|
<div class="error-popup-overlay" @click="${() => {
|
|
@@ -17305,6 +17804,9 @@ __decorateClass([
|
|
|
17305
17804
|
__decorateClass([
|
|
17306
17805
|
r()
|
|
17307
17806
|
], JupiterDynamicForm.prototype, "_showFilterDialog", 2);
|
|
17807
|
+
__decorateClass([
|
|
17808
|
+
r()
|
|
17809
|
+
], JupiterDynamicForm.prototype, "_revealRolePrompt", 2);
|
|
17308
17810
|
__decorateClass([
|
|
17309
17811
|
r()
|
|
17310
17812
|
], JupiterDynamicForm.prototype, "_showFactsOnly", 2);
|
|
@@ -17366,6 +17868,7 @@ export {
|
|
|
17366
17868
|
JupiterAddColumnDialog,
|
|
17367
17869
|
JupiterAdvancedFilter,
|
|
17368
17870
|
JupiterConceptTree,
|
|
17871
|
+
JupiterConfirmDialog,
|
|
17369
17872
|
JupiterDynamicForm,
|
|
17370
17873
|
JupiterFilterRolesDialog,
|
|
17371
17874
|
JupiterFormField,
|