jupiter-dynamic-forms 1.9.7 → 1.9.9
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 +1 -0
- package/dist/core/dynamic-form.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4508,22 +4508,25 @@ let JupiterDynamicForm = class extends LitElement {
|
|
|
4508
4508
|
/**
|
|
4509
4509
|
* Initialize period preferences from presentation data
|
|
4510
4510
|
* Reads showPreviousYear, instant, and duration attributes from each role to set initial preferences
|
|
4511
|
+
* Only sets defaults for roles that don't have existing user preferences
|
|
4511
4512
|
*/
|
|
4512
4513
|
_initializePeriodPreferencesFromData() {
|
|
4513
4514
|
var _a, _b, _c;
|
|
4514
4515
|
if (!((_c = (_b = (_a = this.xbrlInput) == null ? void 0 : _a.presentation) == null ? void 0 : _b[0]) == null ? void 0 : _c.roles)) {
|
|
4515
4516
|
return;
|
|
4516
4517
|
}
|
|
4517
|
-
const preferences = {};
|
|
4518
|
+
const preferences = { ...this._periodPreferences };
|
|
4518
4519
|
this.xbrlInput.presentation[0].roles.forEach((role) => {
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4520
|
+
if (!preferences[role.id]) {
|
|
4521
|
+
const showPreviousYear = role.showPreviousYear === true;
|
|
4522
|
+
const instant = role.instant !== void 0 ? role.instant === true : true;
|
|
4523
|
+
const duration = role.duration !== void 0 ? role.duration === true : true;
|
|
4524
|
+
preferences[role.id] = {
|
|
4525
|
+
showDuration: duration,
|
|
4526
|
+
showInstant: instant,
|
|
4527
|
+
showPreviousYear
|
|
4528
|
+
};
|
|
4529
|
+
}
|
|
4527
4530
|
});
|
|
4528
4531
|
this._periodPreferences = preferences;
|
|
4529
4532
|
}
|