jupiter-dynamic-forms 1.16.7 → 1.16.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/index.mjs CHANGED
@@ -1654,7 +1654,11 @@ const filter$1 = {
1654
1654
  addSelectedRole: "Add selected role",
1655
1655
  addAllRoles: "Add all roles",
1656
1656
  removeSelectedRole: "Remove selected role",
1657
- removeAllRoles: "Remove all roles"
1657
+ removeAllRoles: "Remove all roles",
1658
+ advancedFilter: "Advanced Filter",
1659
+ backToFilterRoles: "← Back",
1660
+ showFactsOnly: "Show facts only",
1661
+ showFactsOnlyDescription: "Hide all blank rows and sections. Only roles and rows with at least one filled value will be shown."
1658
1662
  };
1659
1663
  const column$1 = {
1660
1664
  addColumn: "Add Column",
@@ -1800,7 +1804,11 @@ const filter = {
1800
1804
  addSelectedRole: "Geselecteerde rol toevoegen",
1801
1805
  addAllRoles: "Alle rollen toevoegen",
1802
1806
  removeSelectedRole: "Geselecteerde rol verwijderen",
1803
- removeAllRoles: "Alle rollen verwijderen"
1807
+ removeAllRoles: "Alle rollen verwijderen",
1808
+ advancedFilter: "Geavanceerd filter",
1809
+ backToFilterRoles: "← Terug",
1810
+ showFactsOnly: "Alleen feiten weergeven",
1811
+ showFactsOnlyDescription: "Verberg alle lege rijen en secties. Alleen rollen en rijen met minimaal één ingevulde waarde worden weergegeven."
1804
1812
  };
1805
1813
  const column = {
1806
1814
  addColumn: "Kolom toevoegen",
@@ -2982,15 +2990,15 @@ function determineInputTypeFromBaseChain(baseTypeChain, datatypes) {
2982
2990
  placeholder: I18n.t("field.enterValue")
2983
2991
  };
2984
2992
  }
2985
- var __defProp$5 = Object.defineProperty;
2986
- var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
2987
- var __decorateClass$5 = (decorators, target, key, kind) => {
2988
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
2993
+ var __defProp$6 = Object.defineProperty;
2994
+ var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
2995
+ var __decorateClass$6 = (decorators, target, key, kind) => {
2996
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
2989
2997
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2990
2998
  if (decorator = decorators[i2])
2991
2999
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2992
3000
  if (kind && result)
2993
- __defProp$5(target, key, result);
3001
+ __defProp$6(target, key, result);
2994
3002
  return result;
2995
3003
  };
2996
3004
  let JupiterFormField = class extends LitElement {
@@ -4063,90 +4071,90 @@ JupiterFormField.styles = css`
4063
4071
  border-color: var(--jupiter-primary-color, #1976d2);
4064
4072
  }
4065
4073
  `;
4066
- __decorateClass$5([
4074
+ __decorateClass$6([
4067
4075
  n2({ type: Object })
4068
4076
  ], JupiterFormField.prototype, "field", 2);
4069
- __decorateClass$5([
4077
+ __decorateClass$6([
4070
4078
  n2({ type: String })
4071
4079
  ], JupiterFormField.prototype, "conceptId", 2);
4072
- __decorateClass$5([
4080
+ __decorateClass$6([
4073
4081
  n2({ type: String })
4074
4082
  ], JupiterFormField.prototype, "conceptType", 2);
4075
- __decorateClass$5([
4083
+ __decorateClass$6([
4076
4084
  n2({ type: Array })
4077
4085
  ], JupiterFormField.prototype, "datatypes", 2);
4078
- __decorateClass$5([
4086
+ __decorateClass$6([
4079
4087
  n2({ type: Array })
4080
4088
  ], JupiterFormField.prototype, "defaultUnits", 2);
4081
- __decorateClass$5([
4089
+ __decorateClass$6([
4082
4090
  n2({ type: String })
4083
4091
  ], JupiterFormField.prototype, "columnId", 2);
4084
- __decorateClass$5([
4092
+ __decorateClass$6([
4085
4093
  n2()
4086
4094
  ], JupiterFormField.prototype, "value", 2);
4087
- __decorateClass$5([
4095
+ __decorateClass$6([
4088
4096
  n2({ type: Boolean })
4089
4097
  ], JupiterFormField.prototype, "disabled", 2);
4090
- __decorateClass$5([
4098
+ __decorateClass$6([
4091
4099
  n2({ type: String })
4092
4100
  ], JupiterFormField.prototype, "locale", 2);
4093
- __decorateClass$5([
4101
+ __decorateClass$6([
4094
4102
  n2({ type: Boolean })
4095
4103
  ], JupiterFormField.prototype, "hideLabel", 2);
4096
- __decorateClass$5([
4104
+ __decorateClass$6([
4097
4105
  n2({ type: String })
4098
4106
  ], JupiterFormField.prototype, "mode", 2);
4099
- __decorateClass$5([
4107
+ __decorateClass$6([
4100
4108
  n2({ type: Object })
4101
4109
  ], JupiterFormField.prototype, "masterData", 2);
4102
- __decorateClass$5([
4110
+ __decorateClass$6([
4103
4111
  n2({ type: Array })
4104
4112
  ], JupiterFormField.prototype, "facts", 2);
4105
- __decorateClass$5([
4113
+ __decorateClass$6([
4106
4114
  n2({ type: Object })
4107
4115
  ], JupiterFormField.prototype, "column", 2);
4108
- __decorateClass$5([
4116
+ __decorateClass$6([
4109
4117
  n2({ type: String })
4110
4118
  ], JupiterFormField.prototype, "periodStartDate", 2);
4111
- __decorateClass$5([
4119
+ __decorateClass$6([
4112
4120
  n2({ type: String })
4113
4121
  ], JupiterFormField.prototype, "periodEndDate", 2);
4114
- __decorateClass$5([
4122
+ __decorateClass$6([
4115
4123
  n2({ type: String })
4116
4124
  ], JupiterFormField.prototype, "periodInstantDate", 2);
4117
- __decorateClass$5([
4125
+ __decorateClass$6([
4118
4126
  n2({ type: String })
4119
4127
  ], JupiterFormField.prototype, "unit", 2);
4120
- __decorateClass$5([
4128
+ __decorateClass$6([
4121
4129
  n2({ type: Object })
4122
4130
  ], JupiterFormField.prototype, "typedMemberValues", 2);
4123
- __decorateClass$5([
4131
+ __decorateClass$6([
4124
4132
  r()
4125
4133
  ], JupiterFormField.prototype, "_errors", 2);
4126
- __decorateClass$5([
4134
+ __decorateClass$6([
4127
4135
  r()
4128
4136
  ], JupiterFormField.prototype, "_xbrlErrors", 2);
4129
- __decorateClass$5([
4137
+ __decorateClass$6([
4130
4138
  r()
4131
4139
  ], JupiterFormField.prototype, "_touched", 2);
4132
- __decorateClass$5([
4140
+ __decorateClass$6([
4133
4141
  r()
4134
4142
  ], JupiterFormField.prototype, "_showPeriodPopup", 2);
4135
- __decorateClass$5([
4143
+ __decorateClass$6([
4136
4144
  r()
4137
4145
  ], JupiterFormField.prototype, "_availableUnits", 2);
4138
- JupiterFormField = __decorateClass$5([
4146
+ JupiterFormField = __decorateClass$6([
4139
4147
  t$1("jupiter-form-field")
4140
4148
  ], JupiterFormField);
4141
- var __defProp$4 = Object.defineProperty;
4142
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
4143
- var __decorateClass$4 = (decorators, target, key, kind) => {
4144
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
4149
+ var __defProp$5 = Object.defineProperty;
4150
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
4151
+ var __decorateClass$5 = (decorators, target, key, kind) => {
4152
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
4145
4153
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
4146
4154
  if (decorator = decorators[i2])
4147
4155
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4148
4156
  if (kind && result)
4149
- __defProp$4(target, key, result);
4157
+ __defProp$5(target, key, result);
4150
4158
  return result;
4151
4159
  };
4152
4160
  let JupiterConceptTree = class extends LitElement {
@@ -4215,6 +4223,13 @@ let JupiterConceptTree = class extends LitElement {
4215
4223
  composed: true
4216
4224
  }));
4217
4225
  }
4226
+ _handleFieldFocus(event) {
4227
+ event.stopPropagation();
4228
+ this.dispatchEvent(new CustomEvent("field-focus", {
4229
+ detail: event.detail,
4230
+ bubbles: true
4231
+ }));
4232
+ }
4218
4233
  _handlePeriodChange(event) {
4219
4234
  console.log(`🌲 [ConceptTree] Received period-change event:`, event.detail);
4220
4235
  event.stopPropagation();
@@ -4260,12 +4275,12 @@ let JupiterConceptTree = class extends LitElement {
4260
4275
 
4261
4276
  <!-- Input Field Cells (Period Columns) - Only for non-abstract concepts -->
4262
4277
  ${this.columns.map((column2) => {
4263
- var _a, _b;
4278
+ var _a, _b, _c;
4264
4279
  const field2 = this._getFieldForColumn(column2.id);
4265
4280
  const shouldShowField = !isAbstract && field2;
4266
4281
  const storedUnit = (_b = (_a = this.unitData) == null ? void 0 : _a[this.concept.id]) == null ? void 0 : _b[column2.id];
4267
4282
  return html`
4268
- <td class="field-cell ${!shouldShowField ? "empty" : ""} ${isAbstract ? "abstract-row" : ""}">
4283
+ <td class="field-cell ${!shouldShowField ? "empty" : ""} ${isAbstract ? "abstract-row" : ""} ${this.highlightType && column2.id === this.highlightColumnId ? "highlight-" + this.highlightType : ""} ${((_c = this.calculationErrorKeys) == null ? void 0 : _c.has(`${this.concept.id}__${column2.id}`)) ? "calc-error" : ""}">
4269
4284
  ${shouldShowField ? html`
4270
4285
  <jupiter-form-field
4271
4286
  .field="${field2}"
@@ -4288,6 +4303,7 @@ let JupiterConceptTree = class extends LitElement {
4288
4303
  .column="${column2}"
4289
4304
  .typedMemberValues="${this.typedMemberData[`${this.concept.id}__${column2.id}`] || {}}"
4290
4305
  @field-change="${this._handleFieldChange}"
4306
+ @field-focus="${this._handleFieldFocus}"
4291
4307
  @period-change="${this._handlePeriodChange}"
4292
4308
  ></jupiter-form-field>
4293
4309
  ` : ""}
@@ -4455,70 +4471,91 @@ JupiterConceptTree.styles = css`
4455
4471
  color: #fff;
4456
4472
  }
4457
4473
 
4474
+ .field-cell.highlight-total {
4475
+ background: rgba(25, 118, 210, 0.15);
4476
+ }
4477
+
4478
+ .field-cell.highlight-member {
4479
+ background: rgba(25, 118, 210, 0.07);
4480
+ }
4481
+
4482
+ .field-cell.calc-error {
4483
+ box-shadow: inset 0 0 0 2px var(--jupiter-error-color, #d32f2f);
4484
+ }
4485
+
4458
4486
  `;
4459
- __decorateClass$4([
4487
+ __decorateClass$5([
4460
4488
  n2({ type: Object })
4461
4489
  ], JupiterConceptTree.prototype, "concept", 2);
4462
- __decorateClass$4([
4490
+ __decorateClass$5([
4463
4491
  n2({ type: Array })
4464
4492
  ], JupiterConceptTree.prototype, "columns", 2);
4465
- __decorateClass$4([
4493
+ __decorateClass$5([
4466
4494
  n2({ type: Object })
4467
4495
  ], JupiterConceptTree.prototype, "formData", 2);
4468
- __decorateClass$4([
4496
+ __decorateClass$5([
4469
4497
  n2({ type: Object })
4470
4498
  ], JupiterConceptTree.prototype, "periodData", 2);
4471
- __decorateClass$4([
4499
+ __decorateClass$5([
4472
4500
  n2({ type: Object })
4473
4501
  ], JupiterConceptTree.prototype, "unitData", 2);
4474
- __decorateClass$4([
4502
+ __decorateClass$5([
4475
4503
  n2({ type: Array })
4476
4504
  ], JupiterConceptTree.prototype, "defaultUnits", 2);
4477
- __decorateClass$4([
4505
+ __decorateClass$5([
4478
4506
  n2({ type: Boolean })
4479
4507
  ], JupiterConceptTree.prototype, "disabled", 2);
4480
- __decorateClass$4([
4508
+ __decorateClass$5([
4481
4509
  n2({ type: String })
4482
4510
  ], JupiterConceptTree.prototype, "locale", 2);
4483
- __decorateClass$4([
4511
+ __decorateClass$5([
4484
4512
  n2({ type: Set })
4485
4513
  ], JupiterConceptTree.prototype, "expandedConcepts", 2);
4486
- __decorateClass$4([
4514
+ __decorateClass$5([
4487
4515
  n2({ type: Array })
4488
4516
  ], JupiterConceptTree.prototype, "datatypes", 2);
4489
- __decorateClass$4([
4517
+ __decorateClass$5([
4490
4518
  n2({ type: String })
4491
4519
  ], JupiterConceptTree.prototype, "mode", 2);
4492
- __decorateClass$4([
4520
+ __decorateClass$5([
4493
4521
  n2({ type: Object })
4494
4522
  ], JupiterConceptTree.prototype, "masterData", 2);
4495
- __decorateClass$4([
4523
+ __decorateClass$5([
4496
4524
  n2({ type: Array })
4497
4525
  ], JupiterConceptTree.prototype, "facts", 2);
4498
- __decorateClass$4([
4526
+ __decorateClass$5([
4499
4527
  n2({ type: Object })
4500
4528
  ], JupiterConceptTree.prototype, "typedMemberData", 2);
4501
- __decorateClass$4([
4529
+ __decorateClass$5([
4502
4530
  n2({ type: Boolean })
4503
4531
  ], JupiterConceptTree.prototype, "showAddButton", 2);
4504
- __decorateClass$4([
4532
+ __decorateClass$5([
4505
4533
  n2({ type: Boolean })
4506
4534
  ], JupiterConceptTree.prototype, "showRemoveButton", 2);
4507
- __decorateClass$4([
4535
+ __decorateClass$5([
4536
+ n2({ type: String })
4537
+ ], JupiterConceptTree.prototype, "highlightType", 2);
4538
+ __decorateClass$5([
4539
+ n2({ type: String })
4540
+ ], JupiterConceptTree.prototype, "highlightColumnId", 2);
4541
+ __decorateClass$5([
4542
+ n2({ type: Object })
4543
+ ], JupiterConceptTree.prototype, "calculationErrorKeys", 2);
4544
+ __decorateClass$5([
4508
4545
  r()
4509
4546
  ], JupiterConceptTree.prototype, "_expanded", 2);
4510
- JupiterConceptTree = __decorateClass$4([
4547
+ JupiterConceptTree = __decorateClass$5([
4511
4548
  t$1("jupiter-concept-tree")
4512
4549
  ], JupiterConceptTree);
4513
- var __defProp$3 = Object.defineProperty;
4514
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
4515
- var __decorateClass$3 = (decorators, target, key, kind) => {
4516
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
4550
+ var __defProp$4 = Object.defineProperty;
4551
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
4552
+ var __decorateClass$4 = (decorators, target, key, kind) => {
4553
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
4517
4554
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
4518
4555
  if (decorator = decorators[i2])
4519
4556
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4520
4557
  if (kind && result)
4521
- __defProp$3(target, key, result);
4558
+ __defProp$4(target, key, result);
4522
4559
  return result;
4523
4560
  };
4524
4561
  let JupiterAddColumnDialog = class extends LitElement {
@@ -5063,48 +5100,48 @@ JupiterAddColumnDialog.styles = css`
5063
5100
  line-height: 1.4;
5064
5101
  }
5065
5102
  `;
5066
- __decorateClass$3([
5103
+ __decorateClass$4([
5067
5104
  n2({ type: String })
5068
5105
  ], JupiterAddColumnDialog.prototype, "periodType", 2);
5069
- __decorateClass$3([
5106
+ __decorateClass$4([
5070
5107
  n2({ type: Boolean })
5071
5108
  ], JupiterAddColumnDialog.prototype, "open", 2);
5072
- __decorateClass$3([
5109
+ __decorateClass$4([
5073
5110
  n2({ type: Array })
5074
5111
  ], JupiterAddColumnDialog.prototype, "availableDimensions", 2);
5075
- __decorateClass$3([
5112
+ __decorateClass$4([
5076
5113
  n2({ type: String })
5077
5114
  ], JupiterAddColumnDialog.prototype, "periodStartDate", 2);
5078
- __decorateClass$3([
5115
+ __decorateClass$4([
5079
5116
  n2({ type: String })
5080
5117
  ], JupiterAddColumnDialog.prototype, "periodEndDate", 2);
5081
- __decorateClass$3([
5118
+ __decorateClass$4([
5082
5119
  r()
5083
5120
  ], JupiterAddColumnDialog.prototype, "_startDate", 2);
5084
- __decorateClass$3([
5121
+ __decorateClass$4([
5085
5122
  r()
5086
5123
  ], JupiterAddColumnDialog.prototype, "_endDate", 2);
5087
- __decorateClass$3([
5124
+ __decorateClass$4([
5088
5125
  r()
5089
5126
  ], JupiterAddColumnDialog.prototype, "_instantDate", 2);
5090
- __decorateClass$3([
5127
+ __decorateClass$4([
5091
5128
  r()
5092
5129
  ], JupiterAddColumnDialog.prototype, "_selectedType", 2);
5093
- __decorateClass$3([
5130
+ __decorateClass$4([
5094
5131
  r()
5095
5132
  ], JupiterAddColumnDialog.prototype, "_selectedDimensions", 2);
5096
- JupiterAddColumnDialog = __decorateClass$3([
5133
+ JupiterAddColumnDialog = __decorateClass$4([
5097
5134
  t$1("jupiter-add-column-dialog")
5098
5135
  ], JupiterAddColumnDialog);
5099
- var __defProp$2 = Object.defineProperty;
5100
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
5101
- var __decorateClass$2 = (decorators, target, key, kind) => {
5102
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
5136
+ var __defProp$3 = Object.defineProperty;
5137
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
5138
+ var __decorateClass$3 = (decorators, target, key, kind) => {
5139
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
5103
5140
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
5104
5141
  if (decorator = decorators[i2])
5105
5142
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5106
5143
  if (kind && result)
5107
- __defProp$2(target, key, result);
5144
+ __defProp$3(target, key, result);
5108
5145
  return result;
5109
5146
  };
5110
5147
  let JupiterFormSection = class extends LitElement {
@@ -5124,6 +5161,7 @@ let JupiterFormSection = class extends LitElement {
5124
5161
  this.availableDimensions = [];
5125
5162
  this.hideHeader = false;
5126
5163
  this.mode = "inputForm";
5164
+ this.showFactsOnly = false;
5127
5165
  this.periodStartDate = "";
5128
5166
  this.periodEndDate = "";
5129
5167
  this._expanded = true;
@@ -5131,8 +5169,20 @@ let JupiterFormSection = class extends LitElement {
5131
5169
  this._sectionPeriodType = "duration";
5132
5170
  this._openMenuColumnId = null;
5133
5171
  this._insertAfterColumnId = null;
5172
+ this._boundFieldBlur = (e2) => {
5173
+ this._clearHighlights();
5174
+ const { conceptId, columnId } = e2.detail || {};
5175
+ if (conceptId && columnId)
5176
+ this._runCalculationCheck(conceptId, columnId);
5177
+ };
5134
5178
  this._expandedConcepts = /* @__PURE__ */ new Set();
5135
5179
  this._allTreeExpanded = false;
5180
+ this._highlightMap = /* @__PURE__ */ new Map();
5181
+ this._calculationErrorKeys = /* @__PURE__ */ new Set();
5182
+ this._totalChildrenMap = /* @__PURE__ */ new Map();
5183
+ this._memberParentMap = /* @__PURE__ */ new Map();
5184
+ this._totalConceptMap = /* @__PURE__ */ new Map();
5185
+ this._totalChildConceptsMap = /* @__PURE__ */ new Map();
5136
5186
  }
5137
5187
  connectedCallback() {
5138
5188
  super.connectedCallback();
@@ -5140,16 +5190,22 @@ let JupiterFormSection = class extends LitElement {
5140
5190
  this._determinePeriodType();
5141
5191
  this._checkAndExpandFirstSection();
5142
5192
  document.addEventListener("click", () => this._closeColumnMenu());
5193
+ this.addEventListener("field-blur", this._boundFieldBlur);
5143
5194
  }
5144
5195
  disconnectedCallback() {
5145
5196
  super.disconnectedCallback();
5146
5197
  document.removeEventListener("click", () => this._closeColumnMenu());
5198
+ this.removeEventListener("field-blur", this._boundFieldBlur);
5147
5199
  }
5148
5200
  updated(changedProperties) {
5201
+ var _a;
5149
5202
  super.updated(changedProperties);
5150
5203
  if (changedProperties.has("isFirstSection") || changedProperties.has("section")) {
5151
5204
  this._checkAndExpandFirstSection();
5152
5205
  }
5206
+ if (changedProperties.has("section") && ((_a = this.section) == null ? void 0 : _a.concepts)) {
5207
+ this._buildTotalMaps(this.section.concepts);
5208
+ }
5153
5209
  }
5154
5210
  _checkAndExpandFirstSection() {
5155
5211
  if (this.isFirstSection && this.section && this.section.concepts) {
@@ -5334,31 +5390,135 @@ let JupiterFormSection = class extends LitElement {
5334
5390
  }
5335
5391
  _expandAllTrees() {
5336
5392
  const allConceptIds = this._getAllConceptIds(this.section.concepts || []);
5337
- allConceptIds.forEach((id) => this._expandedConcepts.add(id));
5393
+ this._expandedConcepts = /* @__PURE__ */ new Set([...this._expandedConcepts, ...allConceptIds]);
5338
5394
  this._allTreeExpanded = true;
5339
- this.requestUpdate();
5340
5395
  }
5341
5396
  _collapseAllTrees() {
5342
- this._expandedConcepts.clear();
5397
+ this._expandedConcepts = /* @__PURE__ */ new Set();
5343
5398
  this._allTreeExpanded = false;
5344
- this.requestUpdate();
5345
5399
  }
5346
5400
  _handleConceptExpand(event) {
5347
5401
  event.stopPropagation();
5348
5402
  const { conceptId, expanded } = event.detail;
5403
+ const next = new Set(this._expandedConcepts);
5349
5404
  if (expanded) {
5350
- this._expandedConcepts.add(conceptId);
5405
+ next.add(conceptId);
5351
5406
  } else {
5352
- this._expandedConcepts.delete(conceptId);
5407
+ next.delete(conceptId);
5353
5408
  }
5409
+ this._expandedConcepts = next;
5354
5410
  const allConceptIds = this._getAllConceptIds(this.section.concepts || []);
5355
- this._allTreeExpanded = allConceptIds.length > 0 && allConceptIds.every((id) => this._expandedConcepts.has(id));
5356
- this.requestUpdate();
5411
+ this._allTreeExpanded = allConceptIds.length > 0 && allConceptIds.every((id) => next.has(id));
5357
5412
  this.dispatchEvent(new CustomEvent("concept-expand", {
5358
5413
  detail: event.detail,
5359
5414
  bubbles: true
5360
5415
  }));
5361
5416
  }
5417
+ _buildTotalMaps(concepts) {
5418
+ this._totalChildrenMap.clear();
5419
+ this._memberParentMap.clear();
5420
+ this._totalConceptMap.clear();
5421
+ this._totalChildConceptsMap.clear();
5422
+ this._traverseTotalGroups(concepts);
5423
+ }
5424
+ _traverseTotalGroups(concepts) {
5425
+ var _a, _b, _c;
5426
+ for (const concept of concepts) {
5427
+ if (((_a = concept.preferredLabel) == null ? void 0 : _a.includes("totalLabel")) && ((_b = concept.children) == null ? void 0 : _b.length)) {
5428
+ const childIds = concept.children.map((c2) => c2.id);
5429
+ this._totalChildrenMap.set(concept.id, childIds);
5430
+ this._totalConceptMap.set(concept.id, concept);
5431
+ this._totalChildConceptsMap.set(concept.id, concept.children);
5432
+ for (const childId of childIds) {
5433
+ this._memberParentMap.set(childId, concept.id);
5434
+ }
5435
+ }
5436
+ if ((_c = concept.children) == null ? void 0 : _c.length) {
5437
+ this._traverseTotalGroups(concept.children);
5438
+ }
5439
+ }
5440
+ }
5441
+ _runCalculationCheck(conceptId, columnId) {
5442
+ var _a;
5443
+ const isSelfTotal = this._totalConceptMap.has(conceptId);
5444
+ const totalConceptId = isSelfTotal ? conceptId : this._memberParentMap.get(conceptId);
5445
+ if (!totalConceptId)
5446
+ return;
5447
+ const totalConcept = this._totalConceptMap.get(totalConceptId);
5448
+ const totalRaw = (_a = this.formData[totalConceptId]) == null ? void 0 : _a[columnId];
5449
+ const errorKey = `${totalConceptId}__${columnId}`;
5450
+ if (totalRaw === null || totalRaw === void 0 || totalRaw === "") {
5451
+ if (this._calculationErrorKeys.has(errorKey)) {
5452
+ const next2 = new Set(this._calculationErrorKeys);
5453
+ next2.delete(errorKey);
5454
+ this._calculationErrorKeys = next2;
5455
+ }
5456
+ return;
5457
+ }
5458
+ const totalValue = parseFloat(totalRaw);
5459
+ if (isNaN(totalValue))
5460
+ return;
5461
+ const children = this._totalChildConceptsMap.get(totalConceptId) || [];
5462
+ const childData = children.map((child) => {
5463
+ var _a2;
5464
+ return {
5465
+ value: (_a2 = this.formData[child.id]) == null ? void 0 : _a2[columnId],
5466
+ balance: child.balance
5467
+ };
5468
+ });
5469
+ const isValid = JupiterFormSection._checkTotal(totalValue, childData, totalConcept.balance);
5470
+ const next = new Set(this._calculationErrorKeys);
5471
+ if (!isValid) {
5472
+ next.add(errorKey);
5473
+ } else {
5474
+ next.delete(errorKey);
5475
+ }
5476
+ this._calculationErrorKeys = next;
5477
+ }
5478
+ static _checkTotal(totalValue, children, totalBalance) {
5479
+ let calculatedSum = 0;
5480
+ let hasAnyValue = false;
5481
+ for (const child of children) {
5482
+ const val = parseFloat(child.value);
5483
+ if (isNaN(val))
5484
+ continue;
5485
+ hasAnyValue = true;
5486
+ const weight = !totalBalance || !child.balance || totalBalance === child.balance ? 1 : -1;
5487
+ calculatedSum += weight * val;
5488
+ }
5489
+ if (!hasAnyValue)
5490
+ return true;
5491
+ return Math.abs(calculatedSum - totalValue) < 0.01;
5492
+ }
5493
+ _handleFieldFocusForHighlight(event) {
5494
+ var _a, _b;
5495
+ const conceptId = (_a = event.detail) == null ? void 0 : _a.conceptId;
5496
+ const columnId = (_b = event.detail) == null ? void 0 : _b.columnId;
5497
+ if (!conceptId || !columnId)
5498
+ return;
5499
+ const newMap = /* @__PURE__ */ new Map();
5500
+ const isSelfTotal = this._totalChildrenMap.has(conceptId);
5501
+ if (isSelfTotal) {
5502
+ newMap.set(conceptId, { type: "total", columnId });
5503
+ for (const childId of this._totalChildrenMap.get(conceptId)) {
5504
+ newMap.set(childId, { type: "member", columnId });
5505
+ }
5506
+ } else {
5507
+ const parentId = this._memberParentMap.get(conceptId);
5508
+ if (parentId) {
5509
+ newMap.set(parentId, { type: "total", columnId });
5510
+ for (const siblingId of this._totalChildrenMap.get(parentId)) {
5511
+ newMap.set(siblingId, { type: "member", columnId });
5512
+ }
5513
+ }
5514
+ }
5515
+ this._highlightMap = newMap;
5516
+ }
5517
+ _clearHighlights() {
5518
+ if (this._highlightMap.size > 0) {
5519
+ this._highlightMap = /* @__PURE__ */ new Map();
5520
+ }
5521
+ }
5362
5522
  _getTypedMemberHeaderValue(columnId, axisId) {
5363
5523
  var _a;
5364
5524
  return ((_a = this.typedMemberData[columnId]) == null ? void 0 : _a[axisId]) || "";
@@ -5398,7 +5558,9 @@ let JupiterFormSection = class extends LitElement {
5398
5558
  return ((_a2 = f2.crossRoleTypedMembers) == null ? void 0 : _a2.length) > 0;
5399
5559
  }));
5400
5560
  const repeatCount = isRepeatable ? this.repeatCounts[concept.id] || 0 : 0;
5401
- const sharedProps = (instanceConcept, opts) => html`
5561
+ const sharedProps = (instanceConcept, opts) => {
5562
+ var _a2, _b;
5563
+ return html`
5402
5564
  <jupiter-concept-tree
5403
5565
  .concept="${instanceConcept}"
5404
5566
  .columns="${this.columns}"
@@ -5416,13 +5578,18 @@ let JupiterFormSection = class extends LitElement {
5416
5578
  .typedMemberData="${this.typedMemberData}"
5417
5579
  .showAddButton="${opts.showAdd || false}"
5418
5580
  .showRemoveButton="${opts.showRemove || false}"
5581
+ .highlightType="${(_a2 = this._highlightMap.get(instanceConcept.id)) == null ? void 0 : _a2.type}"
5582
+ .highlightColumnId="${(_b = this._highlightMap.get(instanceConcept.id)) == null ? void 0 : _b.columnId}"
5583
+ .calculationErrorKeys="${this._calculationErrorKeys}"
5419
5584
  @field-change="${this._handleFieldChange}"
5585
+ @field-focus="${this._handleFieldFocusForHighlight}"
5420
5586
  @period-change="${this._handlePeriodChange}"
5421
5587
  @concept-expand="${this._handleConceptExpand}"
5422
5588
  @add-concept-repeat="${this._handleAddRepeat}"
5423
5589
  @remove-concept-repeat="${this._handleRemoveRepeat}"
5424
5590
  ></jupiter-concept-tree>
5425
5591
  `;
5592
+ };
5426
5593
  const rows = [html`
5427
5594
  <tr>${sharedProps(concept, { showAdd: isRepeatable })}</tr>
5428
5595
  `];
@@ -5560,7 +5727,7 @@ let JupiterFormSection = class extends LitElement {
5560
5727
  </tr>
5561
5728
  </thead>
5562
5729
  <tbody class="table-body">
5563
- ${this._flattenConcepts(this.section.concepts, this._expandedConcepts).filter((concept) => this.mode !== "readonly" || !this._isConceptRowBlank(concept)).flatMap((concept) => this._renderConceptRows(concept))}
5730
+ ${this._flattenConcepts(this.section.concepts, this._expandedConcepts).filter((concept) => this.mode !== "readonly" && !this.showFactsOnly || !this._isConceptRowBlank(concept)).flatMap((concept) => this._renderConceptRows(concept))}
5564
5731
  </tbody>
5565
5732
  </table>
5566
5733
  </div>
@@ -5845,87 +6012,196 @@ JupiterFormSection.styles = css`
5845
6012
  font-style: italic;
5846
6013
  }
5847
6014
  `;
5848
- __decorateClass$2([
6015
+ __decorateClass$3([
5849
6016
  n2({ type: Object })
5850
6017
  ], JupiterFormSection.prototype, "section", 2);
5851
- __decorateClass$2([
6018
+ __decorateClass$3([
5852
6019
  n2({ type: Array })
5853
6020
  ], JupiterFormSection.prototype, "columns", 2);
5854
- __decorateClass$2([
6021
+ __decorateClass$3([
5855
6022
  n2({ type: Array })
5856
6023
  ], JupiterFormSection.prototype, "datatypes", 2);
5857
- __decorateClass$2([
6024
+ __decorateClass$3([
5858
6025
  n2({ type: Object })
5859
6026
  ], JupiterFormSection.prototype, "formData", 2);
5860
- __decorateClass$2([
6027
+ __decorateClass$3([
5861
6028
  n2({ type: Object })
5862
6029
  ], JupiterFormSection.prototype, "periodData", 2);
5863
- __decorateClass$2([
6030
+ __decorateClass$3([
5864
6031
  n2({ type: Object })
5865
6032
  ], JupiterFormSection.prototype, "unitData", 2);
5866
- __decorateClass$2([
6033
+ __decorateClass$3([
5867
6034
  n2({ type: Object })
5868
6035
  ], JupiterFormSection.prototype, "typedMemberData", 2);
5869
- __decorateClass$2([
6036
+ __decorateClass$3([
5870
6037
  n2({ type: Object })
5871
6038
  ], JupiterFormSection.prototype, "repeatCounts", 2);
5872
- __decorateClass$2([
6039
+ __decorateClass$3([
5873
6040
  n2({ type: Array })
5874
6041
  ], JupiterFormSection.prototype, "defaultUnits", 2);
5875
- __decorateClass$2([
6042
+ __decorateClass$3([
5876
6043
  n2({ type: Boolean })
5877
6044
  ], JupiterFormSection.prototype, "disabled", 2);
5878
- __decorateClass$2([
6045
+ __decorateClass$3([
5879
6046
  n2({ type: Boolean })
5880
6047
  ], JupiterFormSection.prototype, "collapsible", 2);
5881
- __decorateClass$2([
6048
+ __decorateClass$3([
5882
6049
  n2({ type: String })
5883
6050
  ], JupiterFormSection.prototype, "locale", 2);
5884
- __decorateClass$2([
6051
+ __decorateClass$3([
5885
6052
  n2({ type: Boolean })
5886
6053
  ], JupiterFormSection.prototype, "isFirstSection", 2);
5887
- __decorateClass$2([
6054
+ __decorateClass$3([
5888
6055
  n2({ type: Array })
5889
6056
  ], JupiterFormSection.prototype, "availableDimensions", 2);
5890
- __decorateClass$2([
6057
+ __decorateClass$3([
5891
6058
  n2({ type: Boolean })
5892
6059
  ], JupiterFormSection.prototype, "hideHeader", 2);
5893
- __decorateClass$2([
6060
+ __decorateClass$3([
5894
6061
  n2({ type: String })
5895
6062
  ], JupiterFormSection.prototype, "mode", 2);
5896
- __decorateClass$2([
6063
+ __decorateClass$3([
6064
+ n2({ type: Boolean })
6065
+ ], JupiterFormSection.prototype, "showFactsOnly", 2);
6066
+ __decorateClass$3([
5897
6067
  n2({ type: Object })
5898
6068
  ], JupiterFormSection.prototype, "masterData", 2);
5899
- __decorateClass$2([
6069
+ __decorateClass$3([
5900
6070
  n2({ type: String })
5901
6071
  ], JupiterFormSection.prototype, "periodStartDate", 2);
5902
- __decorateClass$2([
6072
+ __decorateClass$3([
5903
6073
  n2({ type: String })
5904
6074
  ], JupiterFormSection.prototype, "periodEndDate", 2);
5905
- __decorateClass$2([
6075
+ __decorateClass$3([
5906
6076
  r()
5907
6077
  ], JupiterFormSection.prototype, "_expanded", 2);
5908
- __decorateClass$2([
6078
+ __decorateClass$3([
5909
6079
  r()
5910
6080
  ], JupiterFormSection.prototype, "_showAddColumnDialog", 2);
5911
- __decorateClass$2([
6081
+ __decorateClass$3([
5912
6082
  r()
5913
6083
  ], JupiterFormSection.prototype, "_sectionPeriodType", 2);
5914
- __decorateClass$2([
6084
+ __decorateClass$3([
5915
6085
  r()
5916
6086
  ], JupiterFormSection.prototype, "_openMenuColumnId", 2);
5917
- __decorateClass$2([
6087
+ __decorateClass$3([
5918
6088
  r()
5919
6089
  ], JupiterFormSection.prototype, "_insertAfterColumnId", 2);
5920
- __decorateClass$2([
6090
+ __decorateClass$3([
5921
6091
  r()
5922
6092
  ], JupiterFormSection.prototype, "_expandedConcepts", 2);
5923
- __decorateClass$2([
6093
+ __decorateClass$3([
5924
6094
  r()
5925
6095
  ], JupiterFormSection.prototype, "_allTreeExpanded", 2);
5926
- JupiterFormSection = __decorateClass$2([
6096
+ __decorateClass$3([
6097
+ r()
6098
+ ], JupiterFormSection.prototype, "_highlightMap", 2);
6099
+ __decorateClass$3([
6100
+ r()
6101
+ ], JupiterFormSection.prototype, "_calculationErrorKeys", 2);
6102
+ JupiterFormSection = __decorateClass$3([
5927
6103
  t$1("jupiter-form-section")
5928
6104
  ], JupiterFormSection);
6105
+ var __defProp$2 = Object.defineProperty;
6106
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
6107
+ var __decorateClass$2 = (decorators, target, key, kind) => {
6108
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
6109
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
6110
+ if (decorator = decorators[i2])
6111
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6112
+ if (kind && result)
6113
+ __defProp$2(target, key, result);
6114
+ return result;
6115
+ };
6116
+ let JupiterAdvancedFilter = class extends LitElement {
6117
+ constructor() {
6118
+ super(...arguments);
6119
+ this.showFactsOnly = false;
6120
+ }
6121
+ _handleShowFactsOnlyChange(e2) {
6122
+ const checked = e2.target.checked;
6123
+ this.dispatchEvent(new CustomEvent("facts-filter-change", {
6124
+ detail: { showFactsOnly: checked },
6125
+ bubbles: true,
6126
+ composed: true
6127
+ }));
6128
+ }
6129
+ render() {
6130
+ return html`
6131
+ <div class="filter-options">
6132
+ <label class="filter-option">
6133
+ <input
6134
+ type="checkbox"
6135
+ .checked="${this.showFactsOnly}"
6136
+ @change="${this._handleShowFactsOnlyChange}"
6137
+ />
6138
+ <div class="filter-option-body">
6139
+ <div class="filter-option-label">${I18n.t("filter.showFactsOnly")}</div>
6140
+ <p class="filter-option-description">${I18n.t("filter.showFactsOnlyDescription")}</p>
6141
+ </div>
6142
+ </label>
6143
+ </div>
6144
+ `;
6145
+ }
6146
+ };
6147
+ JupiterAdvancedFilter.styles = css`
6148
+ :host {
6149
+ display: block;
6150
+ font-family: var(--jupiter-font-family, system-ui, -apple-system, sans-serif);
6151
+ }
6152
+
6153
+ .filter-options {
6154
+ padding: 24px;
6155
+ }
6156
+
6157
+ .filter-option {
6158
+ display: flex;
6159
+ align-items: flex-start;
6160
+ gap: 12px;
6161
+ padding: 16px;
6162
+ border: 1px solid var(--primaryTextColor, var(--jupiter-border-color, #ddd));
6163
+ border-radius: 6px;
6164
+ cursor: pointer;
6165
+ transition: background-color 0.2s ease;
6166
+ }
6167
+
6168
+ .filter-option:hover {
6169
+ background: var(--menuBgColorLighter, var(--jupiter-hover-background, #f5f5f5));
6170
+ }
6171
+
6172
+ .filter-option input[type="checkbox"] {
6173
+ margin-top: 2px;
6174
+ width: 16px;
6175
+ height: 16px;
6176
+ cursor: pointer;
6177
+ flex-shrink: 0;
6178
+ }
6179
+
6180
+ .filter-option-body {
6181
+ flex: 1;
6182
+ }
6183
+
6184
+ .filter-option-label {
6185
+ font-size: 14px;
6186
+ font-weight: 600;
6187
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
6188
+ cursor: pointer;
6189
+ user-select: none;
6190
+ }
6191
+
6192
+ .filter-option-description {
6193
+ font-size: 13px;
6194
+ color: var(--primaryTextColor, var(--jupiter-text-secondary, #666));
6195
+ margin: 4px 0 0 0;
6196
+ line-height: 1.5;
6197
+ }
6198
+ `;
6199
+ __decorateClass$2([
6200
+ n2({ type: Boolean })
6201
+ ], JupiterAdvancedFilter.prototype, "showFactsOnly", 2);
6202
+ JupiterAdvancedFilter = __decorateClass$2([
6203
+ t$1("jupiter-advanced-filter")
6204
+ ], JupiterAdvancedFilter);
5929
6205
  var __defProp$1 = Object.defineProperty;
5930
6206
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
5931
6207
  var __decorateClass$1 = (decorators, target, key, kind) => {
@@ -5944,8 +6220,9 @@ let JupiterFilterRolesDialog = class extends LitElement {
5944
6220
  this.availableRoles = [];
5945
6221
  this.selectedRoleIds = [];
5946
6222
  this.periodPreferences = {};
5947
- this.mode = "user";
6223
+ this.mode = "inputForm";
5948
6224
  this.hypercubeData = null;
6225
+ this.showFactsOnly = false;
5949
6226
  this._tempSelectedRoles = /* @__PURE__ */ new Set();
5950
6227
  this._searchQuery = "";
5951
6228
  this._filteredRoles = [];
@@ -5956,6 +6233,8 @@ let JupiterFilterRolesDialog = class extends LitElement {
5956
6233
  this._draggedRoleId = null;
5957
6234
  this._dragOverRoleId = null;
5958
6235
  this._chosenRoleOrder = [];
6236
+ this._showAdvancedFilter = false;
6237
+ this._showFactsOnly = false;
5959
6238
  }
5960
6239
  connectedCallback() {
5961
6240
  super.connectedCallback();
@@ -5972,6 +6251,13 @@ let JupiterFilterRolesDialog = class extends LitElement {
5972
6251
  if (changedProperties.has("availableRoles") || changedProperties.has("periodPreferences") || changedProperties.has("open")) {
5973
6252
  this._initializePeriodPreferences();
5974
6253
  }
6254
+ if (changedProperties.has("open")) {
6255
+ if (!this.open) {
6256
+ this._showAdvancedFilter = false;
6257
+ } else {
6258
+ this._showFactsOnly = this.showFactsOnly;
6259
+ }
6260
+ }
5975
6261
  }
5976
6262
  _updateFilteredRoles() {
5977
6263
  if (!this._searchQuery.trim()) {
@@ -6387,6 +6673,22 @@ let JupiterFilterRolesDialog = class extends LitElement {
6387
6673
  this._tempPeriodPreferences = newPreferences;
6388
6674
  this.requestUpdate();
6389
6675
  }
6676
+ _switchToAdvancedFilter() {
6677
+ this._showAdvancedFilter = true;
6678
+ this._searchQuery = "";
6679
+ }
6680
+ _switchToFilterRoles() {
6681
+ this._showAdvancedFilter = false;
6682
+ }
6683
+ _handleFactsFilterChange(e2) {
6684
+ this._showFactsOnly = e2.detail.showFactsOnly;
6685
+ }
6686
+ _handleAdvancedFilterApply() {
6687
+ this.dispatchEvent(new CustomEvent("advanced-filter-apply", {
6688
+ detail: { showFactsOnly: this._showFactsOnly },
6689
+ bubbles: true
6690
+ }));
6691
+ }
6390
6692
  _handleBackdropClick(event) {
6391
6693
  if (event.target === this) {
6392
6694
  this._handleCancel();
@@ -6677,6 +6979,11 @@ let JupiterFilterRolesDialog = class extends LitElement {
6677
6979
  </div>
6678
6980
  </div>
6679
6981
  </div>
6982
+ ` : this._showAdvancedFilter ? html`
6983
+ <jupiter-advanced-filter
6984
+ .showFactsOnly="${this._showFactsOnly}"
6985
+ @facts-filter-change="${this._handleFactsFilterChange}"
6986
+ ></jupiter-advanced-filter>
6680
6987
  ` : html`
6681
6988
  <p class="description">
6682
6989
  ${I18n.t("filter.description")}
@@ -6853,16 +7160,33 @@ let JupiterFilterRolesDialog = class extends LitElement {
6853
7160
 
6854
7161
  <!-- Dialog Actions -->
6855
7162
  <div class="dialog-actions">
7163
+ ${this.mode !== "admin" && this.mode !== "readonly" ? html`
7164
+ ${this._showAdvancedFilter ? html`
7165
+ <button class="btn-text" @click="${this._switchToFilterRoles}">
7166
+ ${I18n.t("filter.backToFilterRoles")}
7167
+ </button>
7168
+ ` : html`
7169
+ <button class="btn-text" @click="${this._switchToAdvancedFilter}">
7170
+ ${I18n.t("filter.advancedFilter")}
7171
+ </button>
7172
+ `}
7173
+ ` : ""}
6856
7174
  <button class="btn-secondary" @click="${this._handleCancel}">
6857
7175
  ${I18n.t("filter.cancel")}
6858
7176
  </button>
6859
- <button
6860
- class="btn-primary"
6861
- @click="${this._handleApply}"
6862
- ?disabled="${selectedCount === 0}"
6863
- >
6864
- ${I18n.t("filter.applyFilter")} (${selectedCount})
6865
- </button>
7177
+ ${this._showAdvancedFilter ? html`
7178
+ <button class="btn-primary" @click="${this._handleAdvancedFilterApply}">
7179
+ ${I18n.t("filter.applyFilter")}
7180
+ </button>
7181
+ ` : html`
7182
+ <button
7183
+ class="btn-primary"
7184
+ @click="${this._handleApply}"
7185
+ ?disabled="${selectedCount === 0}"
7186
+ >
7187
+ ${I18n.t("filter.applyFilter")} (${selectedCount})
7188
+ </button>
7189
+ `}
6866
7190
  </div>
6867
7191
  </div>
6868
7192
  `;
@@ -7411,6 +7735,24 @@ JupiterFilterRolesDialog.styles = css`
7411
7735
  border-top: 1px solid var(--jupiter-border-color, #ddd);
7412
7736
  text-align: center;
7413
7737
  }
7738
+
7739
+ .btn-text {
7740
+ background: none;
7741
+ border: none;
7742
+ color: var(--buttonBgColor, var(--jupiter-primary-color, #1976d2));
7743
+ padding: 10px 8px;
7744
+ font-size: 14px;
7745
+ font-weight: 500;
7746
+ font-family: inherit;
7747
+ cursor: pointer;
7748
+ margin-right: auto;
7749
+ border-radius: 4px;
7750
+ transition: background-color 0.2s ease;
7751
+ }
7752
+
7753
+ .btn-text:hover {
7754
+ background: var(--menuBgColorLighter, var(--jupiter-hover-background, #f5f5f5));
7755
+ }
7414
7756
  `;
7415
7757
  __decorateClass$1([
7416
7758
  n2({ type: Boolean, reflect: true })
@@ -7430,6 +7772,9 @@ __decorateClass$1([
7430
7772
  __decorateClass$1([
7431
7773
  n2({ type: Object })
7432
7774
  ], JupiterFilterRolesDialog.prototype, "hypercubeData", 2);
7775
+ __decorateClass$1([
7776
+ n2({ type: Boolean })
7777
+ ], JupiterFilterRolesDialog.prototype, "showFactsOnly", 2);
7433
7778
  __decorateClass$1([
7434
7779
  r()
7435
7780
  ], JupiterFilterRolesDialog.prototype, "_tempSelectedRoles", 2);
@@ -7460,6 +7805,12 @@ __decorateClass$1([
7460
7805
  __decorateClass$1([
7461
7806
  r()
7462
7807
  ], JupiterFilterRolesDialog.prototype, "_chosenRoleOrder", 2);
7808
+ __decorateClass$1([
7809
+ r()
7810
+ ], JupiterFilterRolesDialog.prototype, "_showAdvancedFilter", 2);
7811
+ __decorateClass$1([
7812
+ r()
7813
+ ], JupiterFilterRolesDialog.prototype, "_showFactsOnly", 2);
7463
7814
  JupiterFilterRolesDialog = __decorateClass$1([
7464
7815
  t$1("jupiter-filter-roles-dialog")
7465
7816
  ], JupiterFilterRolesDialog);
@@ -7513,6 +7864,7 @@ let JupiterDynamicForm = class extends LitElement {
7513
7864
  this._allSections = [];
7514
7865
  this._selectedRoleIds = [];
7515
7866
  this._showFilterDialog = false;
7867
+ this._showFactsOnly = false;
7516
7868
  this._periodPreferences = {};
7517
7869
  this._activeSidePanelRoleId = null;
7518
7870
  this._sidePanelSearchQuery = "";
@@ -8202,6 +8554,10 @@ let JupiterDynamicForm = class extends LitElement {
8202
8554
  _handleFilterRolesClick() {
8203
8555
  this._showFilterDialog = true;
8204
8556
  }
8557
+ _handleAdvancedFilterApply(event) {
8558
+ this._showFactsOnly = event.detail.showFactsOnly;
8559
+ this._showFilterDialog = false;
8560
+ }
8205
8561
  _handleFilterDialogCancel() {
8206
8562
  this._showFilterDialog = false;
8207
8563
  const roleCount = this._getRoleIdsArray().length;
@@ -10758,7 +11114,7 @@ let JupiterDynamicForm = class extends LitElement {
10758
11114
  <p>${I18n.t("filter.selectRoles")}</p>
10759
11115
  <p>${I18n.t("filter.roles")}: ${this._allSections.length}</p>
10760
11116
  </div>
10761
- ` : (this.mode === "readonly" ? schema.sections.filter((s2) => !this._isSectionBlank(s2)) : schema.sections).map((section2, index) => {
11117
+ ` : (this.mode === "readonly" || this._showFactsOnly ? schema.sections.filter((s2) => !this._isSectionBlank(s2)) : schema.sections).map((section2, index) => {
10762
11118
  var _a;
10763
11119
  return html`
10764
11120
  <jupiter-form-section
@@ -10778,6 +11134,7 @@ let JupiterDynamicForm = class extends LitElement {
10778
11134
  .isFirstSection="${index === 0}"
10779
11135
  .availableDimensions="${this._getAvailableDimensionsForSection(section2.id)}"
10780
11136
  .mode="${this.mode}"
11137
+ .showFactsOnly="${this._showFactsOnly}"
10781
11138
  .masterData="${this.masterData}"
10782
11139
  .periodStartDate="${this.periodStartDate}"
10783
11140
  .periodEndDate="${this.periodEndDate}"
@@ -10798,7 +11155,7 @@ let JupiterDynamicForm = class extends LitElement {
10798
11155
  }
10799
11156
  _renderSidePanelLayout(schema, config, showValidationSummary, errorCount) {
10800
11157
  var _a;
10801
- const visibleSections = this.mode === "readonly" ? schema.sections.filter((s2) => !this._isSectionBlank(s2)) : schema.sections;
11158
+ const visibleSections = this.mode === "readonly" || this._showFactsOnly ? schema.sections.filter((s2) => !this._isSectionBlank(s2)) : schema.sections;
10802
11159
  const filteredSections = this._filterSidePanelSections(visibleSections);
10803
11160
  if (!this._activeSidePanelRoleId || !filteredSections.find((s2) => s2.id === this._activeSidePanelRoleId)) {
10804
11161
  this._activeSidePanelRoleId = filteredSections.length > 0 ? filteredSections[0].id : null;
@@ -10911,6 +11268,7 @@ let JupiterDynamicForm = class extends LitElement {
10911
11268
  .isFirstSection="${true}"
10912
11269
  .availableDimensions="${this._getAvailableDimensionsForSection(activeSection.id)}"
10913
11270
  .mode="${this.mode}"
11271
+ .showFactsOnly="${this._showFactsOnly}"
10914
11272
  .masterData="${this.masterData}"
10915
11273
  .periodStartDate="${this.periodStartDate}"
10916
11274
  .periodEndDate="${this.periodEndDate}"
@@ -11063,8 +11421,10 @@ let JupiterDynamicForm = class extends LitElement {
11063
11421
  .periodPreferences="${this._periodPreferences}"
11064
11422
  .hypercubeData="${(_a = this.xbrlInput) == null ? void 0 : _a.hypercubes}"
11065
11423
  .mode="${this.mode}"
11424
+ .showFactsOnly="${this._showFactsOnly}"
11066
11425
  @dialog-cancel="${this._handleFilterDialogCancel}"
11067
11426
  @roles-filter-apply="${this._handleRoleFilterApply}"
11427
+ @advanced-filter-apply="${this._handleAdvancedFilterApply}"
11068
11428
  @click="${this._handleFilterDialogCancel}"
11069
11429
  ></jupiter-filter-roles-dialog>
11070
11430
  ` : ""}
@@ -12024,6 +12384,9 @@ __decorateClass([
12024
12384
  __decorateClass([
12025
12385
  r()
12026
12386
  ], JupiterDynamicForm.prototype, "_showFilterDialog", 2);
12387
+ __decorateClass([
12388
+ r()
12389
+ ], JupiterDynamicForm.prototype, "_showFactsOnly", 2);
12027
12390
  __decorateClass([
12028
12391
  r()
12029
12392
  ], JupiterDynamicForm.prototype, "_periodPreferences", 2);
@@ -12065,6 +12428,7 @@ export {
12065
12428
  FactMatcher,
12066
12429
  FormValidator,
12067
12430
  JupiterAddColumnDialog,
12431
+ JupiterAdvancedFilter,
12068
12432
  JupiterConceptTree,
12069
12433
  JupiterDynamicForm,
12070
12434
  JupiterFilterRolesDialog,