jupiter-dynamic-forms 1.14.8 → 1.15.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/dynamic-form.d.ts +23 -8
- package/dist/core/dynamic-form.d.ts.map +1 -1
- package/dist/core/filter-roles-dialog.d.ts.map +1 -1
- package/dist/core/form-field.d.ts +6 -0
- package/dist/core/form-field.d.ts.map +1 -1
- package/dist/index.js +94 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +180 -76
- 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/xbrl-validation.d.ts +1 -1
- package/dist/utils/xbrl-validation.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1593,7 +1593,21 @@ const admin$1 = {
|
|
|
1593
1593
|
};
|
|
1594
1594
|
const validation$1 = {
|
|
1595
1595
|
summary: "Please fix the following errors before submitting:",
|
|
1596
|
-
errorsFound: "errors found"
|
|
1596
|
+
errorsFound: "errors found",
|
|
1597
|
+
unitRequired: "Unit is required. Please select a unit via the period icon."
|
|
1598
|
+
};
|
|
1599
|
+
const xbrlValidation$1 = {
|
|
1600
|
+
patternMismatch: "Value does not match required pattern: {{pattern}}",
|
|
1601
|
+
invalidPattern: "Invalid pattern configuration: {{pattern}}",
|
|
1602
|
+
exactLength: "Value must be exactly {{required}} characters (current: {{current}})",
|
|
1603
|
+
minLength: "Value must be at least {{required}} characters (current: {{current}})",
|
|
1604
|
+
maxLength: "Value must not exceed {{required}} characters (current: {{current}})",
|
|
1605
|
+
totalDigits: "Value must not exceed {{required}} total digits (current: {{current}})",
|
|
1606
|
+
ruleSummaryPattern: "Must match pattern: {{pattern}}",
|
|
1607
|
+
ruleSummaryExactLength: "Must be exactly {{required}} characters",
|
|
1608
|
+
ruleSummaryMinLength: "Minimum {{required}} characters",
|
|
1609
|
+
ruleSummaryMaxLength: "Maximum {{required}} characters",
|
|
1610
|
+
ruleSummaryTotalDigits: "Maximum {{required}} total digits"
|
|
1597
1611
|
};
|
|
1598
1612
|
const error$1 = {
|
|
1599
1613
|
popup: {
|
|
@@ -1614,6 +1628,7 @@ const enTranslations = {
|
|
|
1614
1628
|
field: field$1,
|
|
1615
1629
|
admin: admin$1,
|
|
1616
1630
|
validation: validation$1,
|
|
1631
|
+
xbrlValidation: xbrlValidation$1,
|
|
1617
1632
|
error: error$1
|
|
1618
1633
|
};
|
|
1619
1634
|
const form = {
|
|
@@ -1717,7 +1732,21 @@ const admin = {
|
|
|
1717
1732
|
};
|
|
1718
1733
|
const validation = {
|
|
1719
1734
|
summary: "Corrigeer de volgende fouten voordat u indient:",
|
|
1720
|
-
errorsFound: "fouten gevonden"
|
|
1735
|
+
errorsFound: "fouten gevonden",
|
|
1736
|
+
unitRequired: "Eenheid is verplicht. Selecteer een eenheid via het periodeicoon."
|
|
1737
|
+
};
|
|
1738
|
+
const xbrlValidation = {
|
|
1739
|
+
patternMismatch: "Waarde voldoet niet aan het vereiste patroon: {{pattern}}",
|
|
1740
|
+
invalidPattern: "Ongeldige patternconfiguratie: {{pattern}}",
|
|
1741
|
+
exactLength: "Waarde moet exact {{required}} tekens bevatten (huidig: {{current}})",
|
|
1742
|
+
minLength: "Waarde moet minimaal {{required}} tekens bevatten (huidig: {{current}})",
|
|
1743
|
+
maxLength: "Waarde mag niet meer dan {{required}} tekens bevatten (huidig: {{current}})",
|
|
1744
|
+
totalDigits: "Waarde mag niet meer dan {{required}} cijfers bevatten (huidig: {{current}})",
|
|
1745
|
+
ruleSummaryPattern: "Moet overeenkomen met patroon: {{pattern}}",
|
|
1746
|
+
ruleSummaryExactLength: "Moet exact {{required}} tekens bevatten",
|
|
1747
|
+
ruleSummaryMinLength: "Minimaal {{required}} tekens",
|
|
1748
|
+
ruleSummaryMaxLength: "Maximaal {{required}} tekens",
|
|
1749
|
+
ruleSummaryTotalDigits: "Maximaal {{required}} cijfers"
|
|
1721
1750
|
};
|
|
1722
1751
|
const error = {
|
|
1723
1752
|
popup: {
|
|
@@ -1738,6 +1767,7 @@ const nlTranslations = {
|
|
|
1738
1767
|
field,
|
|
1739
1768
|
admin,
|
|
1740
1769
|
validation,
|
|
1770
|
+
xbrlValidation,
|
|
1741
1771
|
error
|
|
1742
1772
|
};
|
|
1743
1773
|
const translations = {
|
|
@@ -2338,7 +2368,7 @@ class XBRLValidator {
|
|
|
2338
2368
|
if (!regex.test(value)) {
|
|
2339
2369
|
return {
|
|
2340
2370
|
type: "pattern",
|
|
2341
|
-
message:
|
|
2371
|
+
message: I18n.t("xbrlValidation.patternMismatch", { pattern }),
|
|
2342
2372
|
expectedValue: pattern,
|
|
2343
2373
|
actualValue: value
|
|
2344
2374
|
};
|
|
@@ -2347,7 +2377,7 @@ class XBRLValidator {
|
|
|
2347
2377
|
console.error(`Invalid regex pattern: ${pattern}`, error2);
|
|
2348
2378
|
return {
|
|
2349
2379
|
type: "pattern",
|
|
2350
|
-
message:
|
|
2380
|
+
message: I18n.t("xbrlValidation.invalidPattern", { pattern }),
|
|
2351
2381
|
expectedValue: pattern,
|
|
2352
2382
|
actualValue: value
|
|
2353
2383
|
};
|
|
@@ -2361,7 +2391,7 @@ class XBRLValidator {
|
|
|
2361
2391
|
if (value.length !== requiredLength) {
|
|
2362
2392
|
return {
|
|
2363
2393
|
type: "length",
|
|
2364
|
-
message:
|
|
2394
|
+
message: I18n.t("xbrlValidation.exactLength", { required: requiredLength, current: value.length }),
|
|
2365
2395
|
expectedValue: requiredLength,
|
|
2366
2396
|
actualValue: value.length
|
|
2367
2397
|
};
|
|
@@ -2375,7 +2405,7 @@ class XBRLValidator {
|
|
|
2375
2405
|
if (value.length < minLength) {
|
|
2376
2406
|
return {
|
|
2377
2407
|
type: "minLength",
|
|
2378
|
-
message:
|
|
2408
|
+
message: I18n.t("xbrlValidation.minLength", { required: minLength, current: value.length }),
|
|
2379
2409
|
expectedValue: minLength,
|
|
2380
2410
|
actualValue: value.length
|
|
2381
2411
|
};
|
|
@@ -2389,7 +2419,7 @@ class XBRLValidator {
|
|
|
2389
2419
|
if (value.length > maxLength) {
|
|
2390
2420
|
return {
|
|
2391
2421
|
type: "maxLength",
|
|
2392
|
-
message:
|
|
2422
|
+
message: I18n.t("xbrlValidation.maxLength", { required: maxLength, current: value.length }),
|
|
2393
2423
|
expectedValue: maxLength,
|
|
2394
2424
|
actualValue: value.length
|
|
2395
2425
|
};
|
|
@@ -2404,7 +2434,7 @@ class XBRLValidator {
|
|
|
2404
2434
|
if (digitsOnly.length > totalDigits) {
|
|
2405
2435
|
return {
|
|
2406
2436
|
type: "totalDigits",
|
|
2407
|
-
message:
|
|
2437
|
+
message: I18n.t("xbrlValidation.totalDigits", { required: totalDigits, current: digitsOnly.length }),
|
|
2408
2438
|
expectedValue: totalDigits,
|
|
2409
2439
|
actualValue: digitsOnly.length
|
|
2410
2440
|
};
|
|
@@ -2426,19 +2456,19 @@ class XBRLValidator {
|
|
|
2426
2456
|
const validation2 = datatype.validation;
|
|
2427
2457
|
const rules = [];
|
|
2428
2458
|
if (validation2.pattern) {
|
|
2429
|
-
rules.push(
|
|
2459
|
+
rules.push(I18n.t("xbrlValidation.ruleSummaryPattern", { pattern: validation2.pattern }));
|
|
2430
2460
|
}
|
|
2431
2461
|
if (validation2.length !== void 0) {
|
|
2432
|
-
rules.push(
|
|
2462
|
+
rules.push(I18n.t("xbrlValidation.ruleSummaryExactLength", { required: validation2.length }));
|
|
2433
2463
|
}
|
|
2434
2464
|
if (validation2.minLength !== void 0) {
|
|
2435
|
-
rules.push(
|
|
2465
|
+
rules.push(I18n.t("xbrlValidation.ruleSummaryMinLength", { required: validation2.minLength }));
|
|
2436
2466
|
}
|
|
2437
2467
|
if (validation2.maxLength !== void 0) {
|
|
2438
|
-
rules.push(
|
|
2468
|
+
rules.push(I18n.t("xbrlValidation.ruleSummaryMaxLength", { required: validation2.maxLength }));
|
|
2439
2469
|
}
|
|
2440
2470
|
if (validation2.totalDigits !== void 0) {
|
|
2441
|
-
rules.push(
|
|
2471
|
+
rules.push(I18n.t("xbrlValidation.ruleSummaryTotalDigits", { required: validation2.totalDigits }));
|
|
2442
2472
|
}
|
|
2443
2473
|
return rules;
|
|
2444
2474
|
}
|
|
@@ -2931,6 +2961,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
2931
2961
|
_handleBlur() {
|
|
2932
2962
|
this._touched = true;
|
|
2933
2963
|
this._validateXBRLDatatype();
|
|
2964
|
+
this._validateUnitSelection();
|
|
2934
2965
|
console.log(`🟦 [FormField] Blur event - fieldId: ${this.field.id}, conceptId: ${this.conceptId}, columnId: ${this.columnId}`);
|
|
2935
2966
|
console.log(`🟦 [FormField] Current _xbrlErrors:`, this._xbrlErrors);
|
|
2936
2967
|
console.log(`🟦 [FormField] Current value:`, this.value);
|
|
@@ -3029,6 +3060,32 @@ let JupiterFormField = class extends LitElement {
|
|
|
3029
3060
|
console.log(`✅ [FormField] XBRL Validation passed for ${this.conceptId}`);
|
|
3030
3061
|
}
|
|
3031
3062
|
}
|
|
3063
|
+
/**
|
|
3064
|
+
* Validates that a unit is selected when units are available and a value has been entered.
|
|
3065
|
+
* Appends a unit error to _xbrlErrors if validation fails.
|
|
3066
|
+
* Called after _validateXBRLDatatype() so it can append to existing errors.
|
|
3067
|
+
*/
|
|
3068
|
+
_validateUnitSelection() {
|
|
3069
|
+
if (this.value === null || this.value === void 0 || this.value === "") {
|
|
3070
|
+
return;
|
|
3071
|
+
}
|
|
3072
|
+
const availableUnits = this._collectUnitsForConceptType();
|
|
3073
|
+
if (availableUnits.length === 0) {
|
|
3074
|
+
return;
|
|
3075
|
+
}
|
|
3076
|
+
if (!this.unit) {
|
|
3077
|
+
this._xbrlErrors = [
|
|
3078
|
+
...this._xbrlErrors,
|
|
3079
|
+
{
|
|
3080
|
+
type: "unit",
|
|
3081
|
+
message: I18n.t("validation.unitRequired"),
|
|
3082
|
+
expectedValue: availableUnits.map((u2) => u2.label).join(", "),
|
|
3083
|
+
actualValue: ""
|
|
3084
|
+
}
|
|
3085
|
+
];
|
|
3086
|
+
console.log(`❌ [FormField] Unit validation failed for ${this.conceptId}: unit is required but not selected`);
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3032
3089
|
_handlePeriodIconClick() {
|
|
3033
3090
|
this._availableUnits = this._collectUnitsForConceptType();
|
|
3034
3091
|
console.log(`📊 [FormField] Collected ${this._availableUnits.length} units for concept ${this.conceptId}:`, this._availableUnits);
|
|
@@ -6336,6 +6393,9 @@ let JupiterFilterRolesDialog = class extends LitElement {
|
|
|
6336
6393
|
${dimensions.map((dimension) => {
|
|
6337
6394
|
var _a2, _b;
|
|
6338
6395
|
const allMembers = this._getAllDimensionMembers(dimension.members);
|
|
6396
|
+
if (allMembers.length === 0) {
|
|
6397
|
+
return html``;
|
|
6398
|
+
}
|
|
6339
6399
|
const dimensionLabel = ((_b = (_a2 = dimension.labels) == null ? void 0 : _a2.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _b.label) || dimension.conceptName;
|
|
6340
6400
|
const isSingleMember = this._isSingleMemberDimension(dimension);
|
|
6341
6401
|
return html`
|
|
@@ -7019,7 +7079,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7019
7079
|
this.language = "en";
|
|
7020
7080
|
this.display = "accordion";
|
|
7021
7081
|
this.mode = "inputForm";
|
|
7022
|
-
this.
|
|
7082
|
+
this.roleFilterAxes = [];
|
|
7023
7083
|
this.defaultUnits = [];
|
|
7024
7084
|
this._formData = {};
|
|
7025
7085
|
this._draftLoaded = false;
|
|
@@ -7085,13 +7145,10 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7085
7145
|
if (changedProperties.has("language")) {
|
|
7086
7146
|
I18n.setLanguage(this.language);
|
|
7087
7147
|
}
|
|
7088
|
-
if (changedProperties.has("financialStatementsTypeAxis")) {
|
|
7089
|
-
console.log("🔄 financialStatementsTypeAxis changed:", this.financialStatementsTypeAxis);
|
|
7090
|
-
}
|
|
7091
7148
|
if ((changedProperties.has("xbrlInput") || changedProperties.has("defaultUnits")) && this.xbrlInput && this.defaultUnits && this.defaultUnits.length > 0) {
|
|
7092
7149
|
this._applyDefaultUnitsToDatatypes();
|
|
7093
7150
|
}
|
|
7094
|
-
if (changedProperties.has("xbrlInput") || changedProperties.has("schema") || changedProperties.has("language") || changedProperties.has("periodStartDate") || changedProperties.has("periodEndDate") || changedProperties.has("
|
|
7151
|
+
if (changedProperties.has("xbrlInput") || changedProperties.has("schema") || changedProperties.has("language") || changedProperties.has("periodStartDate") || changedProperties.has("periodEndDate") || changedProperties.has("roleFilterAxes")) {
|
|
7095
7152
|
this._initializeForm();
|
|
7096
7153
|
}
|
|
7097
7154
|
}
|
|
@@ -7139,6 +7196,7 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7139
7196
|
console.log("📅 Using period dates:", this.periodStartDate, "to", this.periodEndDate);
|
|
7140
7197
|
console.log("🌐 Using language:", this.language);
|
|
7141
7198
|
this._initializePeriodPreferencesFromData();
|
|
7199
|
+
this._applyAxisFilterToPeriodPreferences();
|
|
7142
7200
|
console.log("⚙️ Using period preferences:", this._periodPreferences);
|
|
7143
7201
|
this._currentSchema = XBRLFormBuilder.buildFormSchema(
|
|
7144
7202
|
this.xbrlInput,
|
|
@@ -7163,11 +7221,8 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7163
7221
|
});
|
|
7164
7222
|
console.log("✅ Custom order applied to _allSections:", this._allSections.map((s2) => s2.title));
|
|
7165
7223
|
}
|
|
7166
|
-
if (this.
|
|
7167
|
-
|
|
7168
|
-
console.log("📊 Sections before filter:", this._allSections.length);
|
|
7169
|
-
this._allSections = this._filterRolesByFinancialStatementsType(this._allSections);
|
|
7170
|
-
console.log("📊 Sections after filter:", this._allSections.length);
|
|
7224
|
+
if (this.roleFilterAxes && this.roleFilterAxes.length > 0) {
|
|
7225
|
+
this._allSections = this._filterRolesByAxisConfig(this._allSections);
|
|
7171
7226
|
}
|
|
7172
7227
|
if (this._selectedRoleIds.length === 0) {
|
|
7173
7228
|
this._selectedRoleIds = this._allSections.map((section2) => section2.id);
|
|
@@ -7431,6 +7486,57 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7431
7486
|
});
|
|
7432
7487
|
this._periodPreferences = preferences;
|
|
7433
7488
|
}
|
|
7489
|
+
/**
|
|
7490
|
+
* Translate roleFilterAxes into dimensionSelections within _periodPreferences so that
|
|
7491
|
+
* buildFormSchema / filterHypercubeDimensionsBySelection picks up the right columns.
|
|
7492
|
+
*
|
|
7493
|
+
* Rules:
|
|
7494
|
+
* - Only runs when roleFilterAxes is non-empty and hypercube data is present.
|
|
7495
|
+
* - For each hypercube role, if no dimensionSelections have been saved yet (fresh start / no
|
|
7496
|
+
* user metadata), derive them from roleFilterAxes: available=true members → selectedMemberIds.
|
|
7497
|
+
* - Skips roles that already have dimensionSelections (user's saved preference takes priority).
|
|
7498
|
+
*/
|
|
7499
|
+
_applyAxisFilterToPeriodPreferences() {
|
|
7500
|
+
var _a, _b, _c, _d;
|
|
7501
|
+
if (!this.roleFilterAxes || this.roleFilterAxes.length === 0)
|
|
7502
|
+
return;
|
|
7503
|
+
if (!((_c = (_b = (_a = this.xbrlInput) == null ? void 0 : _a.hypercubes) == null ? void 0 : _b[0]) == null ? void 0 : _c.roles))
|
|
7504
|
+
return;
|
|
7505
|
+
const hypercubeRoles = this.xbrlInput.hypercubes[0].roles;
|
|
7506
|
+
const preferences = { ...this._periodPreferences };
|
|
7507
|
+
for (const hypercubeRole of hypercubeRoles) {
|
|
7508
|
+
const roleId = hypercubeRole.roleId;
|
|
7509
|
+
const existing = preferences[roleId];
|
|
7510
|
+
if ((existing == null ? void 0 : existing.dimensionSelections) && existing.dimensionSelections.length > 0) {
|
|
7511
|
+
continue;
|
|
7512
|
+
}
|
|
7513
|
+
const dimensionSelections = [];
|
|
7514
|
+
for (const filterAxis of this.roleFilterAxes) {
|
|
7515
|
+
for (const item of hypercubeRole.items || []) {
|
|
7516
|
+
const matchingDim = (_d = item.dimensions) == null ? void 0 : _d.find(
|
|
7517
|
+
(dim) => dim.id === filterAxis.id || filterAxis.conceptName && dim.conceptName === filterAxis.conceptName
|
|
7518
|
+
);
|
|
7519
|
+
if (matchingDim) {
|
|
7520
|
+
dimensionSelections.push({
|
|
7521
|
+
dimensionId: filterAxis.id,
|
|
7522
|
+
dimensionLabel: filterAxis.conceptName || filterAxis.id,
|
|
7523
|
+
selectedMemberIds: filterAxis.members.filter((m) => m.available === true).map((m) => m.id)
|
|
7524
|
+
});
|
|
7525
|
+
break;
|
|
7526
|
+
}
|
|
7527
|
+
}
|
|
7528
|
+
}
|
|
7529
|
+
if (dimensionSelections.length > 0) {
|
|
7530
|
+
preferences[roleId] = {
|
|
7531
|
+
showDuration: (existing == null ? void 0 : existing.showDuration) ?? true,
|
|
7532
|
+
showInstant: (existing == null ? void 0 : existing.showInstant) ?? true,
|
|
7533
|
+
showPreviousYear: (existing == null ? void 0 : existing.showPreviousYear) ?? false,
|
|
7534
|
+
dimensionSelections
|
|
7535
|
+
};
|
|
7536
|
+
}
|
|
7537
|
+
}
|
|
7538
|
+
this._periodPreferences = preferences;
|
|
7539
|
+
}
|
|
7434
7540
|
/**
|
|
7435
7541
|
* Helper method to extract roleIds from _selectedRoleIds
|
|
7436
7542
|
* Handles both legacy string[] and enhanced object[] structure
|
|
@@ -7494,70 +7600,62 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
7494
7600
|
return sections;
|
|
7495
7601
|
}
|
|
7496
7602
|
/**
|
|
7497
|
-
* Filter roles based on
|
|
7498
|
-
*
|
|
7499
|
-
*
|
|
7500
|
-
*
|
|
7501
|
-
*
|
|
7603
|
+
* Filter roles based on roleFilterAxes input property (checkboxes.json format).
|
|
7604
|
+
*
|
|
7605
|
+
* Rules per axis:
|
|
7606
|
+
* 1. If the role has no hypercube entry → always included.
|
|
7607
|
+
* 2. If the axis from the filter config is NOT present in the role's hypercube dimensions → axis is
|
|
7608
|
+
* not applicable to this role → role is not affected by this axis (still included).
|
|
7609
|
+
* 3. If the axis IS present: include the role only if at least one of the role's members for that
|
|
7610
|
+
* axis matches an available=true member in the filter config.
|
|
7611
|
+
* 4. All axes in the config must pass (logical AND). A single failing axis excludes the role.
|
|
7502
7612
|
*/
|
|
7503
|
-
|
|
7613
|
+
_filterRolesByAxisConfig(sections) {
|
|
7504
7614
|
var _a;
|
|
7505
|
-
if (!this.
|
|
7615
|
+
if (!this.roleFilterAxes || this.roleFilterAxes.length === 0) {
|
|
7506
7616
|
return sections;
|
|
7507
7617
|
}
|
|
7508
7618
|
if (!((_a = this.xbrlInput) == null ? void 0 : _a.hypercubes) || this.xbrlInput.hypercubes.length === 0) {
|
|
7509
7619
|
return sections;
|
|
7510
7620
|
}
|
|
7511
7621
|
const hypercubeData = this.xbrlInput.hypercubes[0];
|
|
7512
|
-
const financialStatementsAxisId = "bw2-titel9_FinancialStatementsTypeAxis";
|
|
7513
|
-
console.log("🔍 Filter values:", this.financialStatementsTypeAxis);
|
|
7514
7622
|
return sections.filter((section2) => {
|
|
7515
7623
|
var _a2;
|
|
7516
7624
|
const hypercubeRole = (_a2 = hypercubeData.roles) == null ? void 0 : _a2.find((r2) => r2.roleId === section2.id);
|
|
7517
7625
|
if (!hypercubeRole || !hypercubeRole.items || hypercubeRole.items.length === 0) {
|
|
7518
|
-
console.log(`✅ ${section2.title}: No hypercube entry - INCLUDED`);
|
|
7519
7626
|
return true;
|
|
7520
7627
|
}
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
if (!item.dimensions || item.dimensions.length === 0) {
|
|
7525
|
-
continue;
|
|
7526
|
-
}
|
|
7527
|
-
const financialStatementsTypeDimension = item.dimensions.find(
|
|
7528
|
-
(dim) => {
|
|
7529
|
-
var _a3;
|
|
7530
|
-
return dim.id === financialStatementsAxisId || ((_a3 = dim.conceptName) == null ? void 0 : _a3.includes("FinancialStatementsTypeAxis"));
|
|
7531
|
-
}
|
|
7628
|
+
for (const filterAxis of this.roleFilterAxes) {
|
|
7629
|
+
const availableMemberIds = new Set(
|
|
7630
|
+
filterAxis.members.filter((m) => m.available === true).map((m) => m.id)
|
|
7532
7631
|
);
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7632
|
+
let axisApplicable = false;
|
|
7633
|
+
let rolePassesAxis = false;
|
|
7634
|
+
for (const item of hypercubeRole.items) {
|
|
7635
|
+
if (!item.dimensions || item.dimensions.length === 0)
|
|
7636
|
+
continue;
|
|
7637
|
+
const matchingDim = item.dimensions.find(
|
|
7638
|
+
(dim) => dim.id === filterAxis.id || filterAxis.conceptName && dim.conceptName === filterAxis.conceptName
|
|
7639
|
+
);
|
|
7640
|
+
if (matchingDim) {
|
|
7641
|
+
axisApplicable = true;
|
|
7642
|
+
if (matchingDim.members) {
|
|
7643
|
+
for (const roleMember of matchingDim.members) {
|
|
7644
|
+
if (availableMemberIds.has(roleMember.id)) {
|
|
7645
|
+
rolePassesAxis = true;
|
|
7646
|
+
break;
|
|
7647
|
+
}
|
|
7547
7648
|
}
|
|
7548
|
-
return this.financialStatementsTypeAxis.includes(member.id);
|
|
7549
|
-
});
|
|
7550
|
-
if (itemHasMatch) {
|
|
7551
|
-
hasMatchingMember = true;
|
|
7552
|
-
break;
|
|
7553
7649
|
}
|
|
7650
|
+
if (rolePassesAxis)
|
|
7651
|
+
break;
|
|
7554
7652
|
}
|
|
7555
7653
|
}
|
|
7654
|
+
if (axisApplicable && !rolePassesAxis) {
|
|
7655
|
+
return false;
|
|
7656
|
+
}
|
|
7556
7657
|
}
|
|
7557
|
-
|
|
7558
|
-
return true;
|
|
7559
|
-
}
|
|
7560
|
-
return hasMatchingMember;
|
|
7658
|
+
return true;
|
|
7561
7659
|
});
|
|
7562
7660
|
}
|
|
7563
7661
|
_preserveDataForHiddenSections() {
|
|
@@ -8571,8 +8669,8 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
8571
8669
|
this._periodPreferences
|
|
8572
8670
|
);
|
|
8573
8671
|
this._allSections = [...this._currentSchema.sections];
|
|
8574
|
-
if (this.
|
|
8575
|
-
this._allSections = this.
|
|
8672
|
+
if (this.roleFilterAxes && this.roleFilterAxes.length > 0) {
|
|
8673
|
+
this._allSections = this._filterRolesByAxisConfig(this._allSections);
|
|
8576
8674
|
}
|
|
8577
8675
|
console.log("✅ Schema rebuilt with restored period preferences");
|
|
8578
8676
|
console.log("🔄 Applying custom period data to schema fields...");
|
|
@@ -10262,16 +10360,21 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
10262
10360
|
<div class="error-popup-content">
|
|
10263
10361
|
<p>${I18n.t("error.popup.message")}</p>
|
|
10264
10362
|
<ul class="error-list">
|
|
10265
|
-
${this._xbrlFormErrors.map((error2) =>
|
|
10363
|
+
${this._xbrlFormErrors.map((error2) => {
|
|
10364
|
+
const concept = this._findConceptInAllSections(error2.conceptId);
|
|
10365
|
+
const column2 = this._findColumnById(error2.columnId);
|
|
10366
|
+
const fieldLabel = (concept == null ? void 0 : concept.label) || error2.conceptId;
|
|
10367
|
+
const columnTitle = (column2 == null ? void 0 : column2.title) || error2.columnId;
|
|
10368
|
+
return html`
|
|
10266
10369
|
<li>
|
|
10267
|
-
<strong>${I18n.t("error.popup.field")}</strong>
|
|
10268
|
-
<a
|
|
10269
|
-
href="javascript:void(0)"
|
|
10370
|
+
<strong>${I18n.t("error.popup.field")}</strong>
|
|
10371
|
+
<a
|
|
10372
|
+
href="javascript:void(0)"
|
|
10270
10373
|
class="error-field-link"
|
|
10271
10374
|
@click="${() => this._handleErrorFieldClick(error2.conceptId, error2.columnId, error2.sectionId)}"
|
|
10272
10375
|
title="${I18n.t("error.popup.clickToFocus")}"
|
|
10273
10376
|
>
|
|
10274
|
-
${
|
|
10377
|
+
${fieldLabel} (${columnTitle})
|
|
10275
10378
|
</a><br>
|
|
10276
10379
|
<strong>${I18n.t("error.popup.value")}</strong> ${error2.value}<br>
|
|
10277
10380
|
<strong>${I18n.t("error.popup.errors")}</strong>
|
|
@@ -10279,7 +10382,8 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
10279
10382
|
${error2.errors.map((err) => html`<li>${err.message}</li>`)}
|
|
10280
10383
|
</ul>
|
|
10281
10384
|
</li>
|
|
10282
|
-
|
|
10385
|
+
`;
|
|
10386
|
+
})}
|
|
10283
10387
|
</ul>
|
|
10284
10388
|
</div>
|
|
10285
10389
|
<div class="error-popup-footer">
|
|
@@ -11059,7 +11163,7 @@ __decorateClass([
|
|
|
11059
11163
|
], JupiterDynamicForm.prototype, "submitButtonLabel", 2);
|
|
11060
11164
|
__decorateClass([
|
|
11061
11165
|
n2({ type: Array })
|
|
11062
|
-
], JupiterDynamicForm.prototype, "
|
|
11166
|
+
], JupiterDynamicForm.prototype, "roleFilterAxes", 2);
|
|
11063
11167
|
__decorateClass([
|
|
11064
11168
|
n2({ type: Array })
|
|
11065
11169
|
], JupiterDynamicForm.prototype, "defaultUnits", 2);
|