jupiter-dynamic-forms 1.16.9 → 1.17.1

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
@@ -1658,7 +1658,10 @@ const filter$1 = {
1658
1658
  advancedFilter: "Advanced Filter",
1659
1659
  backToFilterRoles: "← Back",
1660
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."
1661
+ showFactsOnlyDescription: "Hide all blank rows and sections. Only roles and rows with at least one filled value will be shown.",
1662
+ searchByConcept: "Search by concept",
1663
+ searchByConceptDescription: "Type concept name or label to filter roles and rows. Press Apply Filter to apply.",
1664
+ searchByConceptPlaceholder: "Type concept name or label and press Apply Filter..."
1662
1665
  };
1663
1666
  const column$1 = {
1664
1667
  addColumn: "Add Column",
@@ -1808,7 +1811,10 @@ const filter = {
1808
1811
  advancedFilter: "Geavanceerd filter",
1809
1812
  backToFilterRoles: "← Terug",
1810
1813
  showFactsOnly: "Alleen feiten weergeven",
1811
- showFactsOnlyDescription: "Verberg alle lege rijen en secties. Alleen rollen en rijen met minimaal één ingevulde waarde worden weergegeven."
1814
+ showFactsOnlyDescription: "Verberg alle lege rijen en secties. Alleen rollen en rijen met minimaal één ingevulde waarde worden weergegeven.",
1815
+ searchByConcept: "Zoeken op concept",
1816
+ searchByConceptDescription: "Typ een conceptnaam of label om rollen en rijen te filteren. Druk op Filter toepassen om te activeren.",
1817
+ searchByConceptPlaceholder: "Typ conceptnaam of label en druk op Filter toepassen..."
1812
1818
  };
1813
1819
  const column = {
1814
1820
  addColumn: "Kolom toevoegen",
@@ -3529,31 +3535,49 @@ let JupiterFormField = class extends LitElement {
3529
3535
  return html`
3530
3536
  <div class="period-controls">
3531
3537
  <label>Date:</label>
3532
- <input
3533
- type="date"
3534
- .value="${this.periodInstantDate || this.field.periodInstantDate || ""}"
3535
- @change="${(e2) => this._handlePeriodChange(e2, "instant")}"
3536
- ?disabled="${this.disabled}"
3537
- />
3538
+ <div class="date-wrapper">
3539
+ <input
3540
+ type="date"
3541
+ .value="${this.periodInstantDate || this.field.periodInstantDate || ""}"
3542
+ @change="${(e2) => this._handlePeriodChange(e2, "instant")}"
3543
+ ?disabled="${this.disabled}"
3544
+ />
3545
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
3546
+ <path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5
3547
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
3548
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
3549
+ </div>
3538
3550
  </div>
3539
3551
  `;
3540
3552
  } else if (this.field.periodType === "duration") {
3541
3553
  return html`
3542
3554
  <div class="period-controls">
3543
3555
  <label>From:</label>
3544
- <input
3545
- type="date"
3546
- .value="${this.periodStartDate || this.field.periodStartDate || ""}"
3547
- @change="${(e2) => this._handlePeriodChange(e2, "start")}"
3548
- ?disabled="${this.disabled}"
3549
- />
3556
+ <div class="date-wrapper">
3557
+ <input
3558
+ type="date"
3559
+ .value="${this.periodStartDate || this.field.periodStartDate || ""}"
3560
+ @change="${(e2) => this._handlePeriodChange(e2, "start")}"
3561
+ ?disabled="${this.disabled}"
3562
+ />
3563
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
3564
+ <path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5
3565
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
3566
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
3567
+ </div>
3550
3568
  <label>To:</label>
3551
- <input
3552
- type="date"
3553
- .value="${this.periodEndDate || this.field.periodEndDate || ""}"
3554
- @change="${(e2) => this._handlePeriodChange(e2, "end")}"
3555
- ?disabled="${this.disabled}"
3556
- />
3569
+ <div class="date-wrapper">
3570
+ <input
3571
+ type="date"
3572
+ .value="${this.periodEndDate || this.field.periodEndDate || ""}"
3573
+ @change="${(e2) => this._handlePeriodChange(e2, "end")}"
3574
+ ?disabled="${this.disabled}"
3575
+ />
3576
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
3577
+ <path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5
3578
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
3579
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
3580
+ </div>
3557
3581
  </div>
3558
3582
  `;
3559
3583
  }
@@ -3574,31 +3598,51 @@ let JupiterFormField = class extends LitElement {
3574
3598
  ${this.field.periodType === "instant" ? html`
3575
3599
  <div class="period-controls">
3576
3600
  <label>Date:</label>
3577
- <input
3578
- type="date"
3579
- .value="${this.periodInstantDate || this.field.periodInstantDate || ""}"
3580
- @change="${(e2) => this._handlePeriodChange(e2, "instant")}"
3581
- ?disabled="${this.disabled}"
3582
- />
3601
+ <div class="date-wrapper">
3602
+ <input
3603
+ type="date"
3604
+ .value="${this.periodInstantDate || this.field.periodInstantDate || ""}"
3605
+ @change="${(e2) => this._handlePeriodChange(e2, "instant")}"
3606
+ ?disabled="${this.disabled}"
3607
+ />
3608
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
3609
+ <path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5
3610
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
3611
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
3612
+ </div>
3583
3613
  </div>
3584
3614
  ` : html`
3585
3615
  <div class="period-controls">
3586
3616
  <label>From:</label>
3587
- <input
3588
- type="date"
3589
- .value="${this.periodStartDate || this.field.periodStartDate || ""}"
3590
- @change="${(e2) => this._handlePeriodChange(e2, "start")}"
3591
- ?disabled="${this.disabled}"
3592
- />
3617
+ <div class="date-wrapper">
3618
+ <input
3619
+ type="date"
3620
+ .value="${this.periodStartDate || this.field.periodStartDate || ""}"
3621
+ @change="${(e2) => this._handlePeriodChange(e2, "start")}"
3622
+ ?disabled="${this.disabled}"
3623
+ />
3624
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
3625
+ <path
3626
+ fill="currentColor"
3627
+ d="M19 4h-1V2h-2v2H8V2H6v2H5
3628
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
3629
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
3630
+ </div>
3593
3631
  </div>
3594
3632
  <div class="period-controls">
3595
3633
  <label>To:</label>
3596
- <input
3597
- type="date"
3598
- .value="${this.periodEndDate || this.field.periodEndDate || ""}"
3599
- @change="${(e2) => this._handlePeriodChange(e2, "end")}"
3600
- ?disabled="${this.disabled}"
3601
- />
3634
+ <div class="date-wrapper">
3635
+ <input
3636
+ type="date"
3637
+ .value="${this.periodEndDate || this.field.periodEndDate || ""}"
3638
+ @change="${(e2) => this._handlePeriodChange(e2, "end")}"
3639
+ ?disabled="${this.disabled}"
3640
+ />
3641
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
3642
+ <path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5
3643
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
3644
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
3645
+ </div>
3602
3646
  </div>
3603
3647
  `}
3604
3648
 
@@ -3819,7 +3863,7 @@ JupiterFormField.styles = css`
3819
3863
  }
3820
3864
 
3821
3865
  .period-popup {
3822
- background: white;
3866
+ background: var(--bg-color-2, var(--jupiter-card-background, #fff));
3823
3867
  border-radius: 8px;
3824
3868
  padding: 24px;
3825
3869
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
@@ -3837,10 +3881,11 @@ JupiterFormField.styles = css`
3837
3881
  .period-popup-title {
3838
3882
  font-size: 18px;
3839
3883
  font-weight: 600;
3840
- color: var(--jupiter-text-primary, #333);
3884
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
3841
3885
  }
3842
3886
 
3843
3887
  .period-popup-close {
3888
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
3844
3889
  background: transparent;
3845
3890
  border: none;
3846
3891
  font-size: 24px;
@@ -3856,7 +3901,7 @@ JupiterFormField.styles = css`
3856
3901
  }
3857
3902
 
3858
3903
  .period-popup-close:hover {
3859
- background-color: rgba(0, 0, 0, 0.05);
3904
+ opacity: 0.9;
3860
3905
  }
3861
3906
 
3862
3907
  .period-popup-content {
@@ -3876,17 +3921,45 @@ JupiterFormField.styles = css`
3876
3921
  .period-popup-content .period-controls label {
3877
3922
  font-size: 14px;
3878
3923
  font-weight: 500;
3879
- color: var(--jupiter-text-primary, #333);
3924
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
3880
3925
  text-align: right;
3881
3926
  white-space: normal;
3882
3927
  word-break: break-word;
3883
3928
  }
3884
3929
 
3930
+ .date-wrapper {
3931
+ position: relative;
3932
+ width: min-content;
3933
+ }
3934
+
3935
+ /* hide native icon */
3936
+ input[type="date"]::-webkit-calendar-picker-indicator {
3937
+ opacity: 0;
3938
+ position: absolute;
3939
+ right: 10px;
3940
+ width: 20px;
3941
+ height: 20px;
3942
+ cursor: pointer;
3943
+ }
3944
+
3945
+ .calendar-icon-svg {
3946
+ position: absolute;
3947
+ right: 3px;
3948
+ top: 18px;
3949
+ transform: translateY(-50%);
3950
+ width: 20px;
3951
+ height: 20px;
3952
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
3953
+ pointer-events: none;
3954
+ }
3955
+
3885
3956
  .period-popup-content .period-controls input[type="date"] {
3886
3957
  padding: 8px 10px;
3887
3958
  font-size: 14px;
3888
- border: 1px solid var(--jupiter-border-color, #ddd);
3959
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
3960
+ border: 1px solid var(--primaryTextColor, var(--jupiter-border-color, #ddd));
3889
3961
  border-radius: 4px;
3962
+ background: var(--bg-color-2, var(--jupiter-card-background, #fff));
3890
3963
  }
3891
3964
 
3892
3965
  .period-popup-content .period-controls input[type="date"]:focus {
@@ -3898,16 +3971,15 @@ JupiterFormField.styles = css`
3898
3971
  .period-popup-content .period-controls .unit-select {
3899
3972
  padding: 8px 10px;
3900
3973
  font-size: 14px;
3901
- border: 1px solid var(--jupiter-border-color, #ddd);
3974
+ border: 1px solid var(--primaryTextColor, var(--jupiter-border-color, #ddd));
3902
3975
  border-radius: 4px;
3903
- background: var(--jupiter-input-background, #fff);
3904
- color: var(--jupiter-text-primary, #333);
3976
+ background: var(--bg-color-2, var(--jupiter-input-background, #fff));
3977
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
3905
3978
  cursor: pointer;
3906
3979
  }
3907
3980
 
3908
3981
  .period-popup-content .period-controls .unit-select:focus {
3909
3982
  outline: none;
3910
- border-color: var(--jupiter-primary-color, #1976d2);
3911
3983
  box-shadow: 0 0 0 2px var(--jupiter-primary-color-light, rgba(25, 118, 210, 0.2));
3912
3984
  }
3913
3985
 
@@ -4043,6 +4115,10 @@ JupiterFormField.styles = css`
4043
4115
  width: auto;
4044
4116
  }
4045
4117
 
4118
+
4119
+
4120
+
4121
+
4046
4122
  .period-controls {
4047
4123
  margin-top: 4px;
4048
4124
  display: flex;
@@ -4716,35 +4792,53 @@ let JupiterAddColumnDialog = class extends LitElement {
4716
4792
  ${this.periodType === "instant" ? html`
4717
4793
  <div class="form-group">
4718
4794
  <label class="form-label required">${I18n.t("column.instantDate")}</label>
4719
- <input
4720
- type="date"
4721
- class="form-input"
4722
- .value="${this._instantDate}"
4723
- @change="${this._handleInstantDateChange}"
4724
- required
4725
- />
4726
- </div>
4727
- ` : html`
4728
- <div class="form-group date-row">
4729
- <div class="date-field">
4730
- <label class="form-label required">${I18n.t("column.startPeriodDate")}</label>
4795
+ <div class="date-wrapper">
4731
4796
  <input
4732
4797
  type="date"
4733
4798
  class="form-input"
4734
- .value="${this._startDate}"
4735
- @change="${this._handleStartDateChange}"
4799
+ .value="${this._instantDate}"
4800
+ @change="${this._handleInstantDateChange}"
4736
4801
  required
4737
4802
  />
4803
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
4804
+ <path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5
4805
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
4806
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
4807
+ </div>
4808
+ </div>
4809
+ ` : html`
4810
+ <div class="form-group date-row">
4811
+ <div class="date-field">
4812
+ <label class="form-label required">${I18n.t("column.startPeriodDate")}</label>
4813
+ <div class="date-wrapper">
4814
+ <input
4815
+ type="date"
4816
+ class="form-input"
4817
+ .value="${this._startDate}"
4818
+ @change="${this._handleStartDateChange}"
4819
+ required
4820
+ />
4821
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
4822
+ <path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5
4823
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
4824
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
4825
+ </div>
4738
4826
  </div>
4739
4827
  <div class="date-field">
4740
4828
  <label class="form-label required">${I18n.t("column.endPeriodDate")}</label>
4741
- <input
4742
- type="date"
4743
- class="form-input"
4744
- .value="${this._endDate}"
4745
- @change="${this._handleEndDateChange}"
4746
- required
4747
- />
4829
+ <div class="date-wrapper">
4830
+ <input
4831
+ type="date"
4832
+ class="form-input"
4833
+ .value="${this._endDate}"
4834
+ @change="${this._handleEndDateChange}"
4835
+ required
4836
+ />
4837
+ <svg class="calendar-icon-svg" viewBox="0 0 24 24">
4838
+ <path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5
4839
+ a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14
4840
+ a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V9h14z"/>
4841
+ </div>
4748
4842
  </div>
4749
4843
  </div>
4750
4844
  `}
@@ -4904,6 +4998,32 @@ JupiterAddColumnDialog.styles = css`
4904
4998
  max-height: calc(90vh - 160px);
4905
4999
  }
4906
5000
 
5001
+ .date-wrapper {
5002
+ position: relative;
5003
+ width: min-content;
5004
+ }
5005
+
5006
+ /* hide native icon */
5007
+ input[type="date"]::-webkit-calendar-picker-indicator {
5008
+ opacity: 0;
5009
+ position: absolute;
5010
+ right: 10px;
5011
+ width: 20px;
5012
+ height: 20px;
5013
+ cursor: pointer;
5014
+ }
5015
+
5016
+ .calendar-icon-svg {
5017
+ position: absolute;
5018
+ right: 3px;
5019
+ top: 18px;
5020
+ transform: translateY(-50%);
5021
+ width: 20px;
5022
+ height: 20px;
5023
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
5024
+ pointer-events: none;
5025
+ }
5026
+
4907
5027
  .form-group {
4908
5028
  margin-bottom: 16px;
4909
5029
  }
@@ -4980,18 +5100,18 @@ JupiterAddColumnDialog.styles = css`
4980
5100
  background: transparent;
4981
5101
  }
4982
5102
 
4983
- // .btn-cancel:hover {
4984
- // background: var(--jupiter-neutral-background-hover, #e0e0e0);
4985
- // }
5103
+ .btn-cancel:hover {
5104
+ opacity: 0.9;
5105
+ }
4986
5106
 
4987
5107
  .btn-primary {
4988
5108
  background: var(--buttonBgColor, var(--jupiter-primary-color, #1976d2));
4989
5109
  color: var(--buttonTextColor, white);
4990
5110
  }
4991
5111
 
4992
- // .btn-primary:hover {
4993
- // background: var(--jupiter-primary-color-dark, #5a6fd8);
4994
- // }
5112
+ .btn-primary:hover {
5113
+ opacity: 0.9;
5114
+ }
4995
5115
 
4996
5116
  // .btn-primary:disabled {
4997
5117
  // background: var(--jupiter-disabled-background, #ccc);
@@ -5727,7 +5847,14 @@ let JupiterFormSection = class extends LitElement {
5727
5847
  </tr>
5728
5848
  </thead>
5729
5849
  <tbody class="table-body">
5730
- ${this._flattenConcepts(this.section.concepts, this._expandedConcepts).filter((concept) => this.mode !== "readonly" && !this.showFactsOnly || !this._isConceptRowBlank(concept)).flatMap((concept) => this._renderConceptRows(concept))}
5850
+ ${this._flattenConcepts(this.section.concepts, this._expandedConcepts).filter((concept) => {
5851
+ var _a;
5852
+ if (((_a = this.conceptMatchIds) == null ? void 0 : _a.size) && !this.conceptMatchIds.has(concept.originalConceptId))
5853
+ return false;
5854
+ if (this.mode === "readonly" || this.showFactsOnly)
5855
+ return !this._isConceptRowBlank(concept);
5856
+ return true;
5857
+ }).flatMap((concept) => this._renderConceptRows(concept))}
5731
5858
  </tbody>
5732
5859
  </table>
5733
5860
  </div>
@@ -5914,10 +6041,10 @@ JupiterFormSection.styles = css`
5914
6041
  position: absolute;
5915
6042
  top: 32px;
5916
6043
  right: 4px;
5917
- background: white;
5918
- border: 1px solid var(--jupiter-border-color, #ddd);
6044
+ background: var(--bg-color-2, var(--jupiter-card-background, #fff));
6045
+ border: 1px solid var(--primaryTextColor, var(--jupiter-border-color, #ddd));
5919
6046
  border-radius: 4px;
5920
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
6047
+ // box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
5921
6048
  z-index: 1000;
5922
6049
  min-width: 150px;
5923
6050
  padding: 4px 0;
@@ -5927,7 +6054,7 @@ JupiterFormSection.styles = css`
5927
6054
  padding: 8px 16px;
5928
6055
  cursor: pointer;
5929
6056
  font-size: 14px;
5930
- color: var(--jupiter-text-primary, #333);
6057
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
5931
6058
  transition: background 0.2s ease;
5932
6059
  border: none;
5933
6060
  background: transparent;
@@ -5937,7 +6064,7 @@ JupiterFormSection.styles = css`
5937
6064
  }
5938
6065
 
5939
6066
  .column-context-menu-item:hover {
5940
- background: var(--jupiter-background-light, #f5f5f5);
6067
+ opacity: 0.9;
5941
6068
  }
5942
6069
 
5943
6070
  .column-context-menu-item.remove {
@@ -6063,6 +6190,9 @@ __decorateClass$3([
6063
6190
  __decorateClass$3([
6064
6191
  n2({ type: Boolean })
6065
6192
  ], JupiterFormSection.prototype, "showFactsOnly", 2);
6193
+ __decorateClass$3([
6194
+ n2({ type: Object })
6195
+ ], JupiterFormSection.prototype, "conceptMatchIds", 2);
6066
6196
  __decorateClass$3([
6067
6197
  n2({ type: Object })
6068
6198
  ], JupiterFormSection.prototype, "masterData", 2);
@@ -6117,11 +6247,40 @@ let JupiterAdvancedFilter = class extends LitElement {
6117
6247
  constructor() {
6118
6248
  super(...arguments);
6119
6249
  this.showFactsOnly = false;
6250
+ this.conceptSearchText = "";
6251
+ this._localConceptSearchText = "";
6252
+ }
6253
+ updated(changedProperties) {
6254
+ if (changedProperties.has("conceptSearchText") && this.conceptSearchText !== this._localConceptSearchText) {
6255
+ this._localConceptSearchText = this.conceptSearchText;
6256
+ }
6120
6257
  }
6121
6258
  _handleShowFactsOnlyChange(e2) {
6122
6259
  const checked = e2.target.checked;
6123
- this.dispatchEvent(new CustomEvent("facts-filter-change", {
6124
- detail: { showFactsOnly: checked },
6260
+ this.dispatchEvent(new CustomEvent("filter-change", {
6261
+ detail: { showFactsOnly: checked, conceptSearchText: this._localConceptSearchText },
6262
+ bubbles: true,
6263
+ composed: true
6264
+ }));
6265
+ }
6266
+ _handleConceptSearchInput(e2) {
6267
+ this._localConceptSearchText = e2.target.value;
6268
+ this.dispatchEvent(new CustomEvent("filter-change", {
6269
+ detail: { showFactsOnly: this.showFactsOnly, conceptSearchText: this._localConceptSearchText },
6270
+ bubbles: true,
6271
+ composed: true
6272
+ }));
6273
+ }
6274
+ _clearConceptSearch() {
6275
+ var _a;
6276
+ this._localConceptSearchText = "";
6277
+ const input = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".concept-search-input");
6278
+ if (input) {
6279
+ input.value = "";
6280
+ input.focus();
6281
+ }
6282
+ this.dispatchEvent(new CustomEvent("filter-change", {
6283
+ detail: { showFactsOnly: this.showFactsOnly, conceptSearchText: "" },
6125
6284
  bubbles: true,
6126
6285
  composed: true
6127
6286
  }));
@@ -6129,7 +6288,7 @@ let JupiterAdvancedFilter = class extends LitElement {
6129
6288
  render() {
6130
6289
  return html`
6131
6290
  <div class="filter-options">
6132
- <label class="filter-option">
6291
+ <label class="filter-option clickable">
6133
6292
  <input
6134
6293
  type="checkbox"
6135
6294
  .checked="${this.showFactsOnly}"
@@ -6140,6 +6299,29 @@ let JupiterAdvancedFilter = class extends LitElement {
6140
6299
  <p class="filter-option-description">${I18n.t("filter.showFactsOnlyDescription")}</p>
6141
6300
  </div>
6142
6301
  </label>
6302
+
6303
+ <div class="filter-option">
6304
+ <div class="filter-option-body">
6305
+ <div class="filter-option-label">${I18n.t("filter.searchByConcept")}</div>
6306
+ <p class="filter-option-description">${I18n.t("filter.searchByConceptDescription")}</p>
6307
+ <div class="concept-search-input-wrapper">
6308
+ <input
6309
+ type="text"
6310
+ class="concept-search-input"
6311
+ placeholder="${I18n.t("filter.searchByConceptPlaceholder")}"
6312
+ .value="${this._localConceptSearchText}"
6313
+ @input="${this._handleConceptSearchInput}"
6314
+ />
6315
+ ${this._localConceptSearchText ? html`
6316
+ <button
6317
+ class="concept-search-clear"
6318
+ @click="${this._clearConceptSearch}"
6319
+ title="${I18n.t("filter.clearSearch")}"
6320
+ >×</button>
6321
+ ` : ""}
6322
+ </div>
6323
+ </div>
6324
+ </div>
6143
6325
  </div>
6144
6326
  `;
6145
6327
  }
@@ -6152,6 +6334,9 @@ JupiterAdvancedFilter.styles = css`
6152
6334
 
6153
6335
  .filter-options {
6154
6336
  padding: 24px;
6337
+ display: flex;
6338
+ flex-direction: column;
6339
+ gap: 12px;
6155
6340
  }
6156
6341
 
6157
6342
  .filter-option {
@@ -6161,11 +6346,14 @@ JupiterAdvancedFilter.styles = css`
6161
6346
  padding: 16px;
6162
6347
  border: 1px solid var(--primaryTextColor, var(--jupiter-border-color, #ddd));
6163
6348
  border-radius: 6px;
6164
- cursor: pointer;
6165
6349
  transition: background-color 0.2s ease;
6166
6350
  }
6167
6351
 
6168
- .filter-option:hover {
6352
+ .filter-option.clickable {
6353
+ cursor: pointer;
6354
+ }
6355
+
6356
+ .filter-option.clickable:hover {
6169
6357
  background: var(--menuBgColorLighter, var(--jupiter-hover-background, #f5f5f5));
6170
6358
  }
6171
6359
 
@@ -6195,10 +6383,58 @@ JupiterAdvancedFilter.styles = css`
6195
6383
  margin: 4px 0 0 0;
6196
6384
  line-height: 1.5;
6197
6385
  }
6386
+
6387
+ .concept-search-input-wrapper {
6388
+ position: relative;
6389
+ margin-top: 10px;
6390
+ }
6391
+
6392
+ .concept-search-input {
6393
+ width: 100%;
6394
+ box-sizing: border-box;
6395
+ padding: 8px 36px 8px 10px;
6396
+ border: 1px solid var(--primaryTextColor, var(--jupiter-border-color, #ddd));
6397
+ border-radius: 4px;
6398
+ font-size: 13px;
6399
+ font-family: inherit;
6400
+ background: transparent;
6401
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
6402
+ transition: border-color 0.2s ease;
6403
+ }
6404
+
6405
+ .concept-search-input::placeholder {
6406
+ color: var(--primaryTextColor, var(--jupiter-text-secondary, #999));
6407
+ }
6408
+
6409
+ .concept-search-clear {
6410
+ position: absolute;
6411
+ right: 8px;
6412
+ top: 50%;
6413
+ transform: translateY(-50%);
6414
+ background: none;
6415
+ border: none;
6416
+ cursor: pointer;
6417
+ padding: 2px 4px;
6418
+ border-radius: 2px;
6419
+ color: var(--jupiter-text-secondary, #666);
6420
+ font-size: 16px;
6421
+ line-height: 1;
6422
+ transition: color 0.2s ease;
6423
+ }
6424
+
6425
+ .concept-search-clear:hover {
6426
+ color: var(--primaryTextColor, var(--jupiter-text-primary, #333));
6427
+ }
6198
6428
  `;
6199
6429
  __decorateClass$2([
6200
6430
  n2({ type: Boolean })
6201
6431
  ], JupiterAdvancedFilter.prototype, "showFactsOnly", 2);
6432
+ __decorateClass$2([
6433
+ n2({ type: String })
6434
+ ], JupiterAdvancedFilter.prototype, "conceptSearchText", 2);
6435
+ __decorateClass$2([
6436
+ r()
6437
+ ], JupiterAdvancedFilter.prototype, "_localConceptSearchText", 2);
6202
6438
  JupiterAdvancedFilter = __decorateClass$2([
6203
6439
  t$1("jupiter-advanced-filter")
6204
6440
  ], JupiterAdvancedFilter);
@@ -6223,6 +6459,7 @@ let JupiterFilterRolesDialog = class extends LitElement {
6223
6459
  this.mode = "inputForm";
6224
6460
  this.hypercubeData = null;
6225
6461
  this.showFactsOnly = false;
6462
+ this.conceptSearchText = "";
6226
6463
  this._tempSelectedRoles = /* @__PURE__ */ new Set();
6227
6464
  this._searchQuery = "";
6228
6465
  this._filteredRoles = [];
@@ -6235,6 +6472,7 @@ let JupiterFilterRolesDialog = class extends LitElement {
6235
6472
  this._chosenRoleOrder = [];
6236
6473
  this._showAdvancedFilter = false;
6237
6474
  this._showFactsOnly = false;
6475
+ this._conceptSearchText = "";
6238
6476
  }
6239
6477
  connectedCallback() {
6240
6478
  super.connectedCallback();
@@ -6256,6 +6494,7 @@ let JupiterFilterRolesDialog = class extends LitElement {
6256
6494
  this._showAdvancedFilter = false;
6257
6495
  } else {
6258
6496
  this._showFactsOnly = this.showFactsOnly;
6497
+ this._conceptSearchText = this.conceptSearchText;
6259
6498
  }
6260
6499
  }
6261
6500
  }
@@ -6680,12 +6919,13 @@ let JupiterFilterRolesDialog = class extends LitElement {
6680
6919
  _switchToFilterRoles() {
6681
6920
  this._showAdvancedFilter = false;
6682
6921
  }
6683
- _handleFactsFilterChange(e2) {
6922
+ _handleFilterChange(e2) {
6684
6923
  this._showFactsOnly = e2.detail.showFactsOnly;
6924
+ this._conceptSearchText = e2.detail.conceptSearchText ?? "";
6685
6925
  }
6686
6926
  _handleAdvancedFilterApply() {
6687
6927
  this.dispatchEvent(new CustomEvent("advanced-filter-apply", {
6688
- detail: { showFactsOnly: this._showFactsOnly },
6928
+ detail: { showFactsOnly: this._showFactsOnly, conceptSearchText: this._conceptSearchText },
6689
6929
  bubbles: true
6690
6930
  }));
6691
6931
  }
@@ -6982,7 +7222,8 @@ let JupiterFilterRolesDialog = class extends LitElement {
6982
7222
  ` : this._showAdvancedFilter ? html`
6983
7223
  <jupiter-advanced-filter
6984
7224
  .showFactsOnly="${this._showFactsOnly}"
6985
- @facts-filter-change="${this._handleFactsFilterChange}"
7225
+ .conceptSearchText="${this._conceptSearchText}"
7226
+ @filter-change="${this._handleFilterChange}"
6986
7227
  ></jupiter-advanced-filter>
6987
7228
  ` : html`
6988
7229
  <p class="description">
@@ -7257,9 +7498,9 @@ JupiterFilterRolesDialog.styles = css`
7257
7498
  transition: background-color 0.2s ease;
7258
7499
  }
7259
7500
 
7260
- // .close-button:hover {
7261
- // background: var(--jupiter-hover-background, #f5f5f5);
7262
- // }
7501
+ .close-button:hover {
7502
+ opacity: 0.9;
7503
+ }
7263
7504
 
7264
7505
  .dialog-content {
7265
7506
  background: var(--bg-color-2, var(--jupiter-form-content-background, #fff));
@@ -7373,10 +7614,9 @@ JupiterFilterRolesDialog.styles = css`
7373
7614
  transition: all 0.2s ease;
7374
7615
  }
7375
7616
 
7376
- // .selection-control:hover {
7377
- // background: var(--menuBgColorLighter, var(--jupiter-primary-color, #1976d2));
7378
- // color: white;
7379
- // }
7617
+ .selection-control:hover {
7618
+ opacity: 0.9;
7619
+ }
7380
7620
 
7381
7621
  .roles-list {
7382
7622
  display: flex;
@@ -7597,9 +7837,9 @@ JupiterFilterRolesDialog.styles = css`
7597
7837
  color: var(--buttonTextColor, white);
7598
7838
  }
7599
7839
 
7600
- // .btn-primary:hover:not(:disabled) {
7601
- // background: var(--jupiter-primary-color-dark, #1565c0);
7602
- // }
7840
+ .btn-primary:hover:not(:disabled) {
7841
+ opacity: 0.9;
7842
+ }
7603
7843
 
7604
7844
  .btn-secondary {
7605
7845
  color: var(--buttonBgColor, var(--jupiter-primary-color, #1976d2));
@@ -7607,9 +7847,9 @@ JupiterFilterRolesDialog.styles = css`
7607
7847
  background: transparent;
7608
7848
  }
7609
7849
 
7610
- // .btn-secondary:hover:not(:disabled) {
7611
- // background: var(--jupiter-hover-background, #f5f5f5);
7612
- // }
7850
+ .btn-secondary:hover:not(:disabled) {
7851
+ opacity: 0.9;
7852
+ }
7613
7853
 
7614
7854
  button:disabled {
7615
7855
  opacity: 0.6;
@@ -7775,6 +8015,9 @@ __decorateClass$1([
7775
8015
  __decorateClass$1([
7776
8016
  n2({ type: Boolean })
7777
8017
  ], JupiterFilterRolesDialog.prototype, "showFactsOnly", 2);
8018
+ __decorateClass$1([
8019
+ n2({ type: String })
8020
+ ], JupiterFilterRolesDialog.prototype, "conceptSearchText", 2);
7778
8021
  __decorateClass$1([
7779
8022
  r()
7780
8023
  ], JupiterFilterRolesDialog.prototype, "_tempSelectedRoles", 2);
@@ -7811,6 +8054,9 @@ __decorateClass$1([
7811
8054
  __decorateClass$1([
7812
8055
  r()
7813
8056
  ], JupiterFilterRolesDialog.prototype, "_showFactsOnly", 2);
8057
+ __decorateClass$1([
8058
+ r()
8059
+ ], JupiterFilterRolesDialog.prototype, "_conceptSearchText", 2);
7814
8060
  JupiterFilterRolesDialog = __decorateClass$1([
7815
8061
  t$1("jupiter-filter-roles-dialog")
7816
8062
  ], JupiterFilterRolesDialog);
@@ -7865,6 +8111,7 @@ let JupiterDynamicForm = class extends LitElement {
7865
8111
  this._selectedRoleIds = [];
7866
8112
  this._showFilterDialog = false;
7867
8113
  this._showFactsOnly = false;
8114
+ this._conceptSearchText = "";
7868
8115
  this._periodPreferences = {};
7869
8116
  this._activeSidePanelRoleId = null;
7870
8117
  this._sidePanelSearchQuery = "";
@@ -8556,6 +8803,7 @@ let JupiterDynamicForm = class extends LitElement {
8556
8803
  }
8557
8804
  _handleAdvancedFilterApply(event) {
8558
8805
  this._showFactsOnly = event.detail.showFactsOnly;
8806
+ this._conceptSearchText = event.detail.conceptSearchText ?? "";
8559
8807
  this._showFilterDialog = false;
8560
8808
  }
8561
8809
  _handleFilterDialogCancel() {
@@ -10722,6 +10970,53 @@ let JupiterDynamicForm = class extends LitElement {
10722
10970
  };
10723
10971
  return !hasValue(section2.concepts);
10724
10972
  }
10973
+ _getConceptSearchMatchIds(searchText) {
10974
+ var _a, _b, _c;
10975
+ const result = /* @__PURE__ */ new Set();
10976
+ if (!searchText.trim() || !((_b = (_a = this.xbrlInput) == null ? void 0 : _a.presentation) == null ? void 0 : _b.length)) {
10977
+ return result;
10978
+ }
10979
+ const query = searchText.toLowerCase().trim();
10980
+ const walkConcepts = (concepts) => {
10981
+ var _a2, _b2, _c2;
10982
+ for (const concept of concepts) {
10983
+ let matches = ((_a2 = concept.conceptName) == null ? void 0 : _a2.toLowerCase().includes(query)) || ((_b2 = concept.id) == null ? void 0 : _b2.toLowerCase().includes(query));
10984
+ if (!matches && Array.isArray(concept.labels)) {
10985
+ matches = concept.labels.some((l2) => {
10986
+ var _a3;
10987
+ return (_a3 = l2.label) == null ? void 0 : _a3.toLowerCase().includes(query);
10988
+ });
10989
+ }
10990
+ if (matches) {
10991
+ result.add(concept.id);
10992
+ }
10993
+ if ((_c2 = concept.children) == null ? void 0 : _c2.length) {
10994
+ walkConcepts(concept.children);
10995
+ }
10996
+ }
10997
+ };
10998
+ for (const presentationData of this.xbrlInput.presentation) {
10999
+ for (const role of presentationData.roles || []) {
11000
+ walkConcepts(((_c = role.presentationLinkbase) == null ? void 0 : _c.concepts) || []);
11001
+ }
11002
+ }
11003
+ return result;
11004
+ }
11005
+ _isSectionConceptSearchMatch(section2, matchIds) {
11006
+ if (matchIds.size === 0)
11007
+ return false;
11008
+ const checkConcepts = (concepts) => {
11009
+ var _a;
11010
+ for (const concept of concepts) {
11011
+ if (matchIds.has(concept.originalConceptId))
11012
+ return true;
11013
+ if (((_a = concept.children) == null ? void 0 : _a.length) && checkConcepts(concept.children))
11014
+ return true;
11015
+ }
11016
+ return false;
11017
+ };
11018
+ return checkConcepts(section2.concepts);
11019
+ }
10725
11020
  _filterSidePanelSections(sections) {
10726
11021
  if (!this._sidePanelSearchQuery.trim()) {
10727
11022
  return sections;
@@ -11114,9 +11409,19 @@ let JupiterDynamicForm = class extends LitElement {
11114
11409
  <p>${I18n.t("filter.selectRoles")}</p>
11115
11410
  <p>${I18n.t("filter.roles")}: ${this._allSections.length}</p>
11116
11411
  </div>
11117
- ` : (this.mode === "readonly" || this._showFactsOnly ? schema.sections.filter((s2) => !this._isSectionBlank(s2)) : schema.sections).map((section2, index) => {
11118
- var _a;
11119
- return html`
11412
+ ` : (() => {
11413
+ const conceptMatchIds = this._getConceptSearchMatchIds(this._conceptSearchText);
11414
+ const hasConceptSearch = this._conceptSearchText.trim().length > 0;
11415
+ let sections = schema.sections;
11416
+ if (this.mode === "readonly" || this._showFactsOnly) {
11417
+ sections = sections.filter((s2) => !this._isSectionBlank(s2));
11418
+ }
11419
+ if (hasConceptSearch) {
11420
+ sections = sections.filter((s2) => this._isSectionConceptSearchMatch(s2, conceptMatchIds));
11421
+ }
11422
+ return sections.map((section2, index) => {
11423
+ var _a;
11424
+ return html`
11120
11425
  <jupiter-form-section
11121
11426
  section-id="${section2.id}"
11122
11427
  .section="${section2}"
@@ -11135,6 +11440,7 @@ let JupiterDynamicForm = class extends LitElement {
11135
11440
  .availableDimensions="${this._getAvailableDimensionsForSection(section2.id)}"
11136
11441
  .mode="${this.mode}"
11137
11442
  .showFactsOnly="${this._showFactsOnly}"
11443
+ .conceptMatchIds="${hasConceptSearch ? conceptMatchIds : void 0}"
11138
11444
  .masterData="${this.masterData}"
11139
11445
  .periodStartDate="${this.periodStartDate}"
11140
11446
  .periodEndDate="${this.periodEndDate}"
@@ -11149,13 +11455,19 @@ let JupiterDynamicForm = class extends LitElement {
11149
11455
  @column-add-request="${this._handleColumnAddRequest}"
11150
11456
  ></jupiter-form-section>
11151
11457
  `;
11152
- })}
11458
+ });
11459
+ })()}
11153
11460
  </div>
11154
11461
  `;
11155
11462
  }
11156
11463
  _renderSidePanelLayout(schema, config, showValidationSummary, errorCount) {
11157
11464
  var _a;
11158
- const visibleSections = this.mode === "readonly" || this._showFactsOnly ? schema.sections.filter((s2) => !this._isSectionBlank(s2)) : schema.sections;
11465
+ const conceptMatchIds = this._getConceptSearchMatchIds(this._conceptSearchText);
11466
+ const hasConceptSearch = this._conceptSearchText.trim().length > 0;
11467
+ let visibleSections = this.mode === "readonly" || this._showFactsOnly ? schema.sections.filter((s2) => !this._isSectionBlank(s2)) : schema.sections;
11468
+ if (hasConceptSearch) {
11469
+ visibleSections = visibleSections.filter((s2) => this._isSectionConceptSearchMatch(s2, conceptMatchIds));
11470
+ }
11159
11471
  const filteredSections = this._filterSidePanelSections(visibleSections);
11160
11472
  if (!this._activeSidePanelRoleId || !filteredSections.find((s2) => s2.id === this._activeSidePanelRoleId)) {
11161
11473
  this._activeSidePanelRoleId = filteredSections.length > 0 ? filteredSections[0].id : null;
@@ -11269,6 +11581,7 @@ let JupiterDynamicForm = class extends LitElement {
11269
11581
  .availableDimensions="${this._getAvailableDimensionsForSection(activeSection.id)}"
11270
11582
  .mode="${this.mode}"
11271
11583
  .showFactsOnly="${this._showFactsOnly}"
11584
+ .conceptMatchIds="${hasConceptSearch ? conceptMatchIds : void 0}"
11272
11585
  .masterData="${this.masterData}"
11273
11586
  .periodStartDate="${this.periodStartDate}"
11274
11587
  .periodEndDate="${this.periodEndDate}"
@@ -11422,6 +11735,7 @@ let JupiterDynamicForm = class extends LitElement {
11422
11735
  .hypercubeData="${(_a = this.xbrlInput) == null ? void 0 : _a.hypercubes}"
11423
11736
  .mode="${this.mode}"
11424
11737
  .showFactsOnly="${this._showFactsOnly}"
11738
+ .conceptSearchText="${this._conceptSearchText}"
11425
11739
  @dialog-cancel="${this._handleFilterDialogCancel}"
11426
11740
  @roles-filter-apply="${this._handleRoleFilterApply}"
11427
11741
  @advanced-filter-apply="${this._handleAdvancedFilterApply}"
@@ -11610,9 +11924,9 @@ JupiterDynamicForm.styles = css`
11610
11924
  background: transparent;
11611
11925
  }
11612
11926
 
11613
- // .btn-secondary:hover:not(:disabled) {
11614
- // background: var(--jupiter-secondary-color-dark, #616161);
11615
- // }
11927
+ .btn-secondary:hover:not(:disabled) {
11928
+ opacity: 0.9;
11929
+ }
11616
11930
 
11617
11931
  .btn-outline {
11618
11932
  background: transparent;
@@ -11691,10 +12005,9 @@ JupiterDynamicForm.styles = css`
11691
12005
  margin-right: auto;
11692
12006
  }
11693
12007
 
11694
- // .filter-roles-button:hover:not(:disabled) {
11695
- // background: var(--jupiter-primary-color, #1976d2);
11696
- // color: white;
11697
- // }
12008
+ .filter-roles-button:hover:not(:disabled) {
12009
+ opacity: 0.9;
12010
+ }
11698
12011
 
11699
12012
  .filter-roles-button .filter-icon {
11700
12013
  width: 16px;
@@ -11888,9 +12201,9 @@ JupiterDynamicForm.styles = css`
11888
12201
  line-height: 1.4;
11889
12202
  }
11890
12203
 
11891
- // .side-panel-role-item:hover {
11892
- // background: var(--jupiter-hover-background, #e8e8e8);
11893
- // }
12204
+ .side-panel-role-item:hover {
12205
+ opacity: 0.9;
12206
+ }
11894
12207
 
11895
12208
  .side-panel-role-item.active {
11896
12209
  background: var(--light-color-1, var(--jupiter-primary-color, #1976d2));
@@ -12387,6 +12700,9 @@ __decorateClass([
12387
12700
  __decorateClass([
12388
12701
  r()
12389
12702
  ], JupiterDynamicForm.prototype, "_showFactsOnly", 2);
12703
+ __decorateClass([
12704
+ r()
12705
+ ], JupiterDynamicForm.prototype, "_conceptSearchText", 2);
12390
12706
  __decorateClass([
12391
12707
  r()
12392
12708
  ], JupiterDynamicForm.prototype, "_periodPreferences", 2);