jupiter-dynamic-forms 1.19.1 → 1.19.2
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/filter-roles-dialog.d.ts +2 -0
- package/dist/core/filter-roles-dialog.d.ts.map +1 -1
- package/dist/index.js +130 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +168 -92
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1760,7 +1760,14 @@ const field$1 = {
|
|
|
1760
1760
|
editText: "Edit",
|
|
1761
1761
|
save: "Save",
|
|
1762
1762
|
cancel: "Cancel",
|
|
1763
|
-
characters: "characters"
|
|
1763
|
+
characters: "characters",
|
|
1764
|
+
editPeriod: "Edit Period",
|
|
1765
|
+
from: "From",
|
|
1766
|
+
to: "To",
|
|
1767
|
+
date: "Date",
|
|
1768
|
+
unit: "Unit",
|
|
1769
|
+
selectUnit: "Select Unit",
|
|
1770
|
+
leaveBlankForInf: "Leave blank for INF"
|
|
1764
1771
|
};
|
|
1765
1772
|
const admin$1 = {
|
|
1766
1773
|
title: "Configure Roles",
|
|
@@ -1935,7 +1942,14 @@ const field = {
|
|
|
1935
1942
|
editText: "Bewerken",
|
|
1936
1943
|
save: "Opslaan",
|
|
1937
1944
|
cancel: "Annuleren",
|
|
1938
|
-
characters: "tekens"
|
|
1945
|
+
characters: "tekens",
|
|
1946
|
+
editPeriod: "Periode bewerken",
|
|
1947
|
+
from: "Van",
|
|
1948
|
+
to: "Tot",
|
|
1949
|
+
date: "Datum",
|
|
1950
|
+
unit: "Eenheid",
|
|
1951
|
+
selectUnit: "Selecteer eenheid",
|
|
1952
|
+
leaveBlankForInf: "Leeg laten voor INF"
|
|
1939
1953
|
};
|
|
1940
1954
|
const admin = {
|
|
1941
1955
|
title: "Rollen configureren",
|
|
@@ -3882,7 +3896,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
3882
3896
|
if (this.field.periodType === "instant") {
|
|
3883
3897
|
return html`
|
|
3884
3898
|
<div class="period-controls">
|
|
3885
|
-
<label
|
|
3899
|
+
<label>${I18n.t("field.date")}:</label>
|
|
3886
3900
|
<div class="date-wrapper">
|
|
3887
3901
|
<input
|
|
3888
3902
|
type="date"
|
|
@@ -3901,7 +3915,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
3901
3915
|
} else if (this.field.periodType === "duration") {
|
|
3902
3916
|
return html`
|
|
3903
3917
|
<div class="period-controls">
|
|
3904
|
-
<label
|
|
3918
|
+
<label>${I18n.t("field.from")}:</label>
|
|
3905
3919
|
<div class="date-wrapper">
|
|
3906
3920
|
<input
|
|
3907
3921
|
type="date"
|
|
@@ -3915,7 +3929,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
3915
3929
|
a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
|
|
3916
3930
|
</svg>
|
|
3917
3931
|
</div>
|
|
3918
|
-
<label
|
|
3932
|
+
<label>${I18n.t("field.to")}:</label>
|
|
3919
3933
|
<div class="date-wrapper">
|
|
3920
3934
|
<input
|
|
3921
3935
|
type="date"
|
|
@@ -3939,7 +3953,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
3939
3953
|
<div class="period-popup-overlay" @click="${this._handlePopupOverlayClick}">
|
|
3940
3954
|
<div class="period-popup" @click="${(e2) => e2.stopPropagation()}">
|
|
3941
3955
|
<div class="period-popup-header">
|
|
3942
|
-
<div class="period-popup-title"
|
|
3956
|
+
<div class="period-popup-title">${I18n.t("field.editPeriod")}</div>
|
|
3943
3957
|
<button class="period-popup-close" @click="${this._closePeriodPopup}">
|
|
3944
3958
|
×
|
|
3945
3959
|
</button>
|
|
@@ -3948,7 +3962,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
3948
3962
|
<div class="period-popup-content">
|
|
3949
3963
|
${this.field.periodType === "instant" ? html`
|
|
3950
3964
|
<div class="period-controls">
|
|
3951
|
-
<label
|
|
3965
|
+
<label>${I18n.t("field.date")}:</label>
|
|
3952
3966
|
<div class="date-wrapper">
|
|
3953
3967
|
<input
|
|
3954
3968
|
type="date"
|
|
@@ -3965,7 +3979,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
3965
3979
|
</div>
|
|
3966
3980
|
` : html`
|
|
3967
3981
|
<div class="period-controls">
|
|
3968
|
-
<label
|
|
3982
|
+
<label>${I18n.t("field.from")}:</label>
|
|
3969
3983
|
<div class="date-wrapper">
|
|
3970
3984
|
<input
|
|
3971
3985
|
type="date"
|
|
@@ -3983,7 +3997,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
3983
3997
|
</div>
|
|
3984
3998
|
</div>
|
|
3985
3999
|
<div class="period-controls">
|
|
3986
|
-
<label
|
|
4000
|
+
<label>${I18n.t("field.to")}:</label>
|
|
3987
4001
|
<div class="date-wrapper">
|
|
3988
4002
|
<input
|
|
3989
4003
|
type="date"
|
|
@@ -4002,14 +4016,14 @@ let JupiterFormField = class extends LitElement {
|
|
|
4002
4016
|
|
|
4003
4017
|
${this._availableUnits.length > 0 ? html`
|
|
4004
4018
|
<div class="period-controls">
|
|
4005
|
-
<label
|
|
4019
|
+
<label>${I18n.t("field.unit")}:</label>
|
|
4006
4020
|
<select
|
|
4007
4021
|
.value="${this.unit || ""}"
|
|
4008
4022
|
@change="${this._handleUnitChange}"
|
|
4009
4023
|
?disabled="${this.disabled}"
|
|
4010
4024
|
class="unit-select"
|
|
4011
4025
|
>
|
|
4012
|
-
<option value=""
|
|
4026
|
+
<option value="">${I18n.t("field.selectUnit")}</option>
|
|
4013
4027
|
${this._availableUnits.map((unit) => html`
|
|
4014
4028
|
<option value="${unit.id}" ?selected="${this.unit === unit.id}">
|
|
4015
4029
|
${unit.label || unit.id}
|
|
@@ -4026,7 +4040,7 @@ let JupiterFormField = class extends LitElement {
|
|
|
4026
4040
|
type="number"
|
|
4027
4041
|
min="0"
|
|
4028
4042
|
class="typed-member-input"
|
|
4029
|
-
placeholder="
|
|
4043
|
+
placeholder="${I18n.t("field.leaveBlankForInf")}"
|
|
4030
4044
|
.value="${this.decimals !== void 0 && this.decimals !== null && this.decimals !== "" ? this.decimals : this.globalDecimals !== "INF" ? this.globalDecimals : ""}"
|
|
4031
4045
|
@input="${this._handleDecimalsChange}"
|
|
4032
4046
|
?disabled="${this.disabled}"
|
|
@@ -7162,6 +7176,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
|
7162
7176
|
__defProp$1(target, key, result);
|
|
7163
7177
|
return result;
|
|
7164
7178
|
};
|
|
7179
|
+
let _lastViewWasAdvancedFilter = false;
|
|
7165
7180
|
let JupiterFilterRolesDialog = class extends LitElement {
|
|
7166
7181
|
constructor() {
|
|
7167
7182
|
super(...arguments);
|
|
@@ -7186,6 +7201,7 @@ let JupiterFilterRolesDialog = class extends LitElement {
|
|
|
7186
7201
|
this._showAdvancedFilter = false;
|
|
7187
7202
|
this._showFactsOnly = false;
|
|
7188
7203
|
this._conceptSearchText = "";
|
|
7204
|
+
this._collapsedRoles = /* @__PURE__ */ new Set();
|
|
7189
7205
|
}
|
|
7190
7206
|
connectedCallback() {
|
|
7191
7207
|
super.connectedCallback();
|
|
@@ -7203,9 +7219,8 @@ let JupiterFilterRolesDialog = class extends LitElement {
|
|
|
7203
7219
|
this._initializePeriodPreferences();
|
|
7204
7220
|
}
|
|
7205
7221
|
if (changedProperties.has("open")) {
|
|
7206
|
-
if (
|
|
7207
|
-
this._showAdvancedFilter =
|
|
7208
|
-
} else {
|
|
7222
|
+
if (this.open) {
|
|
7223
|
+
this._showAdvancedFilter = _lastViewWasAdvancedFilter;
|
|
7209
7224
|
this._showFactsOnly = this.showFactsOnly;
|
|
7210
7225
|
this._conceptSearchText = this.conceptSearchText;
|
|
7211
7226
|
}
|
|
@@ -7705,11 +7720,22 @@ let JupiterFilterRolesDialog = class extends LitElement {
|
|
|
7705
7720
|
this._tempPeriodPreferences = newPreferences;
|
|
7706
7721
|
this.requestUpdate();
|
|
7707
7722
|
}
|
|
7723
|
+
_toggleRoleCollapse(roleId) {
|
|
7724
|
+
const next = new Set(this._collapsedRoles);
|
|
7725
|
+
if (next.has(roleId)) {
|
|
7726
|
+
next.delete(roleId);
|
|
7727
|
+
} else {
|
|
7728
|
+
next.add(roleId);
|
|
7729
|
+
}
|
|
7730
|
+
this._collapsedRoles = next;
|
|
7731
|
+
}
|
|
7708
7732
|
_switchToAdvancedFilter() {
|
|
7733
|
+
_lastViewWasAdvancedFilter = true;
|
|
7709
7734
|
this._showAdvancedFilter = true;
|
|
7710
7735
|
this._searchQuery = "";
|
|
7711
7736
|
}
|
|
7712
7737
|
_switchToFilterRoles() {
|
|
7738
|
+
_lastViewWasAdvancedFilter = false;
|
|
7713
7739
|
this._showAdvancedFilter = false;
|
|
7714
7740
|
}
|
|
7715
7741
|
_handleFilterChange(e2) {
|
|
@@ -8108,94 +8134,100 @@ let JupiterFilterRolesDialog = class extends LitElement {
|
|
|
8108
8134
|
</div>
|
|
8109
8135
|
` : html`
|
|
8110
8136
|
${this._filteredRoles.map((role) => {
|
|
8111
|
-
var _a;
|
|
8112
8137
|
const isSelected = this._tempSelectedRoles.has(role.id);
|
|
8113
|
-
role.showPeriodControl === true;
|
|
8114
8138
|
const preferences = this._tempPeriodPreferences[role.id] || { showDuration: true, showInstant: true };
|
|
8115
|
-
console.log("🎨 [Render] Processing role:", role.title, "ID:", role.id);
|
|
8116
8139
|
const dimensions = this._getDimensionsForRole(role.id);
|
|
8117
8140
|
const hasDimensions = dimensions.length > 0;
|
|
8118
|
-
|
|
8141
|
+
const isCollapsed = this._collapsedRoles.has(role.id);
|
|
8119
8142
|
return html`
|
|
8120
8143
|
<div class="role-item">
|
|
8121
|
-
<
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
<
|
|
8134
|
-
<
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8144
|
+
<div class="role-item-header" @click="${() => this._toggleRoleCollapse(role.id)}">
|
|
8145
|
+
<input
|
|
8146
|
+
type="checkbox"
|
|
8147
|
+
class="role-checkbox"
|
|
8148
|
+
.checked="${isSelected}"
|
|
8149
|
+
@change="${(e2) => {
|
|
8150
|
+
e2.stopPropagation();
|
|
8151
|
+
this._handleCheckboxChange(e2, role.id);
|
|
8152
|
+
}}"
|
|
8153
|
+
@click="${(e2) => e2.stopPropagation()}"
|
|
8154
|
+
/>
|
|
8155
|
+
<h5 class="role-title">${role.title}</h5>
|
|
8156
|
+
<button class="role-collapse-btn" title="${isCollapsed ? "Expand" : "Collapse"}">
|
|
8157
|
+
<svg class="role-collapse-chevron ${isCollapsed ? "collapsed" : ""}" viewBox="0 0 24 24">
|
|
8158
|
+
<path d="M7 10l5 5 5-5z"/>
|
|
8159
|
+
</svg>
|
|
8160
|
+
</button>
|
|
8161
|
+
</div>
|
|
8162
|
+
|
|
8163
|
+
${!isCollapsed ? html`
|
|
8164
|
+
<div class="role-item-body">
|
|
8165
|
+
<div class="period-controls">
|
|
8166
|
+
<p class="period-controls-label">${I18n.t("filter.additionalOptions")}</p>
|
|
8167
|
+
<div class="period-checkboxes">
|
|
8168
|
+
<label class="period-checkbox-item">
|
|
8169
|
+
<input
|
|
8170
|
+
type="checkbox"
|
|
8171
|
+
class="period-checkbox"
|
|
8172
|
+
.checked="${preferences.showPreviousYear}"
|
|
8173
|
+
@change="${(e2) => this._handlePeriodCheckboxChange(e2, role.id, "previousYear")}"
|
|
8174
|
+
/>
|
|
8175
|
+
<span class="period-checkbox-label">${I18n.t("filter.showPreviousYear")}</span>
|
|
8176
|
+
</label>
|
|
8177
|
+
</div>
|
|
8145
8178
|
</div>
|
|
8146
|
-
</div>
|
|
8147
8179
|
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
var
|
|
8180
|
+
${hasDimensions ? html`
|
|
8181
|
+
<div class="dimension-section">
|
|
8182
|
+
<div class="dimension-header">📊 ${I18n.t("filter.dimensionMemberSelection")}</div>
|
|
8183
|
+
${dimensions.map((dimension) => {
|
|
8184
|
+
var _a, _b;
|
|
8153
8185
|
const allMembers = this._getAllDimensionMembers(dimension.members);
|
|
8154
|
-
if (allMembers.length === 0)
|
|
8186
|
+
if (allMembers.length === 0)
|
|
8155
8187
|
return html``;
|
|
8156
|
-
|
|
8157
|
-
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;
|
|
8188
|
+
const dimensionLabel = ((_b = (_a = dimension.labels) == null ? void 0 : _a.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _b.label) || dimension.conceptName;
|
|
8158
8189
|
return html`
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
var
|
|
8164
|
-
const memberLabel = ((_b2 = (
|
|
8190
|
+
<div class="dimension-group">
|
|
8191
|
+
<div class="dimension-label">${dimensionLabel}</div>
|
|
8192
|
+
<div class="dimension-members">
|
|
8193
|
+
${allMembers.map((member) => {
|
|
8194
|
+
var _a2, _b2;
|
|
8195
|
+
const memberLabel = ((_b2 = (_a2 = member.labels) == null ? void 0 : _a2.find((l2) => l2.role === "http://www.xbrl.org/2003/role/label")) == null ? void 0 : _b2.label) || member.conceptName;
|
|
8165
8196
|
const isChecked = this._isDimensionMemberSelected(role.id, dimension.id, member.id);
|
|
8166
8197
|
return html`
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8198
|
+
<label class="member-checkbox-item">
|
|
8199
|
+
<input
|
|
8200
|
+
type="checkbox"
|
|
8201
|
+
class="member-checkbox"
|
|
8202
|
+
.checked="${isChecked}"
|
|
8203
|
+
@change="${(e2) => this._handleDimensionMemberChange(e2, role.id, dimension.id, member.id)}"
|
|
8204
|
+
/>
|
|
8205
|
+
<span class="member-checkbox-label">${memberLabel}</span>
|
|
8206
|
+
</label>
|
|
8207
|
+
`;
|
|
8177
8208
|
})}
|
|
8209
|
+
</div>
|
|
8210
|
+
<div class="member-select-controls">
|
|
8211
|
+
<button
|
|
8212
|
+
class="member-select-btn"
|
|
8213
|
+
@click="${() => this._selectAllDimensionMembers(role.id, dimension.id)}"
|
|
8214
|
+
>
|
|
8215
|
+
${I18n.t("filter.selectAllMembers")}
|
|
8216
|
+
</button>
|
|
8217
|
+
<button
|
|
8218
|
+
class="member-select-btn"
|
|
8219
|
+
@click="${() => this._deselectAllDimensionMembers(role.id, dimension.id)}"
|
|
8220
|
+
>
|
|
8221
|
+
${I18n.t("filter.clearMembers")}
|
|
8222
|
+
</button>
|
|
8223
|
+
</div>
|
|
8178
8224
|
</div>
|
|
8179
|
-
|
|
8180
|
-
<button
|
|
8181
|
-
class="member-select-btn"
|
|
8182
|
-
@click="${() => this._selectAllDimensionMembers(role.id, dimension.id)}"
|
|
8183
|
-
>
|
|
8184
|
-
${I18n.t("filter.selectAllMembers")}
|
|
8185
|
-
</button>
|
|
8186
|
-
<button
|
|
8187
|
-
class="member-select-btn"
|
|
8188
|
-
@click="${() => this._deselectAllDimensionMembers(role.id, dimension.id)}"
|
|
8189
|
-
>
|
|
8190
|
-
${I18n.t("filter.clearMembers")}
|
|
8191
|
-
</button>
|
|
8192
|
-
</div>
|
|
8193
|
-
</div>
|
|
8194
|
-
`;
|
|
8225
|
+
`;
|
|
8195
8226
|
})}
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8227
|
+
</div>
|
|
8228
|
+
` : ""}
|
|
8229
|
+
</div>
|
|
8230
|
+
` : ""}
|
|
8199
8231
|
</div>
|
|
8200
8232
|
`;
|
|
8201
8233
|
})}
|
|
@@ -8441,8 +8473,7 @@ JupiterFilterRolesDialog.styles = css`
|
|
|
8441
8473
|
|
|
8442
8474
|
.role-item {
|
|
8443
8475
|
display: flex;
|
|
8444
|
-
|
|
8445
|
-
gap: 12px;
|
|
8476
|
+
flex-direction: column;
|
|
8446
8477
|
padding: 8px;
|
|
8447
8478
|
border-radius: 4px;
|
|
8448
8479
|
transition: background-color 0.2s ease;
|
|
@@ -8452,11 +8483,52 @@ JupiterFilterRolesDialog.styles = css`
|
|
|
8452
8483
|
background: var(--menuBgColorLighter, var(--jupiter-hover-background, #f5f5f5));
|
|
8453
8484
|
}
|
|
8454
8485
|
|
|
8486
|
+
.role-item-header {
|
|
8487
|
+
display: flex;
|
|
8488
|
+
align-items: center;
|
|
8489
|
+
gap: 8px;
|
|
8490
|
+
cursor: pointer;
|
|
8491
|
+
user-select: none;
|
|
8492
|
+
}
|
|
8493
|
+
|
|
8494
|
+
.role-item-body {
|
|
8495
|
+
padding-left: 28px;
|
|
8496
|
+
margin-top: 8px;
|
|
8497
|
+
}
|
|
8498
|
+
|
|
8455
8499
|
.role-checkbox {
|
|
8456
|
-
margin-top: 2px;
|
|
8457
8500
|
cursor: pointer;
|
|
8501
|
+
flex-shrink: 0;
|
|
8458
8502
|
}
|
|
8459
|
-
|
|
8503
|
+
|
|
8504
|
+
.role-collapse-btn {
|
|
8505
|
+
background: none;
|
|
8506
|
+
border: none;
|
|
8507
|
+
padding: 2px;
|
|
8508
|
+
cursor: pointer;
|
|
8509
|
+
color: var(--primaryTextColor, var(--jupiter-text-secondary, #666));
|
|
8510
|
+
display: flex;
|
|
8511
|
+
align-items: center;
|
|
8512
|
+
flex-shrink: 0;
|
|
8513
|
+
border-radius: 2px;
|
|
8514
|
+
transition: color 0.15s ease;
|
|
8515
|
+
}
|
|
8516
|
+
|
|
8517
|
+
.role-collapse-btn:hover {
|
|
8518
|
+
color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
|
|
8519
|
+
}
|
|
8520
|
+
|
|
8521
|
+
.role-collapse-chevron {
|
|
8522
|
+
width: 14px;
|
|
8523
|
+
height: 14px;
|
|
8524
|
+
fill: currentColor;
|
|
8525
|
+
transition: transform 0.2s ease;
|
|
8526
|
+
}
|
|
8527
|
+
|
|
8528
|
+
.role-collapse-chevron.collapsed {
|
|
8529
|
+
transform: rotate(-90deg);
|
|
8530
|
+
}
|
|
8531
|
+
|
|
8460
8532
|
.role-info * {
|
|
8461
8533
|
color: var(--primaryTextColor, var(--jupiter-text-primary, #333)) !important;
|
|
8462
8534
|
}
|
|
@@ -8469,9 +8541,10 @@ JupiterFilterRolesDialog.styles = css`
|
|
|
8469
8541
|
.role-title {
|
|
8470
8542
|
font-weight: 500;
|
|
8471
8543
|
color: var(--jupiter-text-primary, #333);
|
|
8472
|
-
margin: 0
|
|
8544
|
+
margin: 0;
|
|
8473
8545
|
word-wrap: break-word;
|
|
8474
8546
|
line-height: 1.3;
|
|
8547
|
+
flex: 1;
|
|
8475
8548
|
}
|
|
8476
8549
|
|
|
8477
8550
|
.role-description {
|
|
@@ -8867,6 +8940,9 @@ __decorateClass$1([
|
|
|
8867
8940
|
__decorateClass$1([
|
|
8868
8941
|
r()
|
|
8869
8942
|
], JupiterFilterRolesDialog.prototype, "_conceptSearchText", 2);
|
|
8943
|
+
__decorateClass$1([
|
|
8944
|
+
r()
|
|
8945
|
+
], JupiterFilterRolesDialog.prototype, "_collapsedRoles", 2);
|
|
8870
8946
|
JupiterFilterRolesDialog = __decorateClass$1([
|
|
8871
8947
|
t$1("jupiter-filter-roles-dialog")
|
|
8872
8948
|
], JupiterFilterRolesDialog);
|