@allsorter/ui-components 0.0.400 → 0.0.402

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.
@@ -23,6 +23,20 @@ export declare class NewResumeHeaderComponent implements OnInit, OnDestroy, Afte
23
23
  * 2. Otherwise, fall back to `hiddenSection.headerSectionHidden` for backward compatibility.
24
24
  */
25
25
  get isSectionHidden(): boolean;
26
+ /**
27
+ * Returns dynamic styles based on field visibility.
28
+ * Used by extra sections to apply template-driven background colors.
29
+ *
30
+ * Only applies custom styles when fieldVisibility is configured.
31
+ * When section is hidden without fieldVisibility: no custom styles (CSS handles opacity)
32
+ * When field is visible: light background (#ECEDF1)
33
+ * When field is hidden: dark background (#4B4F62)
34
+ *
35
+ * @returns Object with CSS properties for ngStyle binding, or empty object for default CSS
36
+ */
37
+ getDynamicStyles(): {
38
+ [key: string]: string;
39
+ };
26
40
  buttonConfig: HeaderButton[];
27
41
  isLargeScreen: boolean;
28
42
  private resizeListener?;
@@ -33,6 +47,20 @@ export declare class NewResumeHeaderComponent implements OnInit, OnDestroy, Afte
33
47
  showPopOutPanel: boolean;
34
48
  popOutMessage: string;
35
49
  dataTestId?: string;
50
+ /**
51
+ * Field visibility configuration for extra sections.
52
+ * Controls dynamic background color and padding based on template field visibility.
53
+ * When not provided, defaults to visible state (light background).
54
+ */
55
+ fieldVisibility: {
56
+ isVisible: boolean;
57
+ fieldIdentifier?: string;
58
+ };
59
+ /**
60
+ * Index for indexed field checks (e.g., extra-section with esd1, esd2, etc.)
61
+ * Optional - only needed when using indexed field identifiers
62
+ */
63
+ index?: number;
36
64
  get shouldShowPopOut(): boolean;
37
65
  /**
38
66
  * Combined state for expand/collapse animation.
@@ -123,5 +151,5 @@ export declare class NewResumeHeaderComponent implements OnInit, OnDestroy, Afte
123
151
  ngAfterViewInit(): void;
124
152
  ngOnDestroy(): void;
125
153
  static ɵfac: i0.ɵɵFactoryDeclaration<NewResumeHeaderComponent, never>;
126
- static ɵcmp: i0.ɵɵComponentDeclaration<NewResumeHeaderComponent, "al-newresumeheader", never, { "title": { "alias": "title"; "required": false; }; "showHeaderCheckbox": { "alias": "showHeaderCheckbox"; "required": false; }; "headerCheckboxChecked": { "alias": "headerCheckboxChecked"; "required": false; }; "configEyeToggle": { "alias": "configEyeToggle"; "required": false; }; "hiddenSection": { "alias": "hiddenSection"; "required": false; }; "buttonConfig": { "alias": "buttonConfig"; "required": false; }; "isLargeScreen": { "alias": "isLargeScreen"; "required": false; }; "popOutButtonLabel": { "alias": "popOutButtonLabel"; "required": false; }; "popOutButtonIcon": { "alias": "popOutButtonIcon"; "required": false; }; "popOutButtonTooltip": { "alias": "popOutButtonTooltip"; "required": false; }; "popOutButtonTooltipPosition": { "alias": "popOutButtonTooltipPosition"; "required": false; }; "showPopOutPanel": { "alias": "showPopOutPanel"; "required": false; }; "popOutMessage": { "alias": "popOutMessage"; "required": false; }; "dataTestId": { "alias": "dataTestId"; "required": false; }; }, { "titleChange": "titleChange"; "sectionToggled": "sectionToggled"; "headerCheckboxChange": "headerCheckboxChange"; "showHideToggleSection": "showHideToggleSection"; "buttonClicked": "buttonClicked"; "popOutButtonClick": "popOutButtonClick"; }, never, ["[header-left]", "[header-center-left]", "[header-center-center]", "[header-center-right]", "[header-right]", "[header-left]", "[header-center-right]", "[header-right]", "*"], true, never>;
154
+ static ɵcmp: i0.ɵɵComponentDeclaration<NewResumeHeaderComponent, "al-newresumeheader", never, { "title": { "alias": "title"; "required": false; }; "showHeaderCheckbox": { "alias": "showHeaderCheckbox"; "required": false; }; "headerCheckboxChecked": { "alias": "headerCheckboxChecked"; "required": false; }; "configEyeToggle": { "alias": "configEyeToggle"; "required": false; }; "hiddenSection": { "alias": "hiddenSection"; "required": false; }; "buttonConfig": { "alias": "buttonConfig"; "required": false; }; "isLargeScreen": { "alias": "isLargeScreen"; "required": false; }; "popOutButtonLabel": { "alias": "popOutButtonLabel"; "required": false; }; "popOutButtonIcon": { "alias": "popOutButtonIcon"; "required": false; }; "popOutButtonTooltip": { "alias": "popOutButtonTooltip"; "required": false; }; "popOutButtonTooltipPosition": { "alias": "popOutButtonTooltipPosition"; "required": false; }; "showPopOutPanel": { "alias": "showPopOutPanel"; "required": false; }; "popOutMessage": { "alias": "popOutMessage"; "required": false; }; "dataTestId": { "alias": "dataTestId"; "required": false; }; "fieldVisibility": { "alias": "fieldVisibility"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, { "titleChange": "titleChange"; "sectionToggled": "sectionToggled"; "headerCheckboxChange": "headerCheckboxChange"; "showHideToggleSection": "showHideToggleSection"; "buttonClicked": "buttonClicked"; "popOutButtonClick": "popOutButtonClick"; }, never, ["[header-left]", "[header-center-left]", "[header-center-center]", "[header-center-right]", "[header-right]", "[header-left]", "[header-center-right]", "[header-right]", "*"], true, never>;
127
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allsorter/ui-components",
3
- "version": "0.0.400",
3
+ "version": "0.0.402",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",
@@ -2,7 +2,14 @@
2
2
  [padding]="'0'" [width]="'100%'"><cdk-accordion class="example-accordion"><cdk-accordion-item
3
3
  #accordionItem="cdkAccordionItem" [expanded]="true" class="example-accordion-item">
4
4
  <div class="example-accordion-item-header" #accordionHeader
5
- [ngClass]="{'header-hidden': isSectionHidden, 'header-with-bottom-margin': !showPopOutPanel}">
5
+ [ngClass]="{
6
+ 'header-hidden': isSectionHidden,
7
+ 'header-hide-sb': (fieldVisibility?.isVisible === false),
8
+ 'header-visible-sb': (fieldVisibility?.isVisible !== false),
9
+ 'header-with-bottom-margin': !showPopOutPanel
10
+ }"
11
+ [ngStyle]="getDynamicStyles()"
12
+ [attr.data-test-id]="dataTestId">
6
13
  <!-- Normal header layout (shows when section is NOT hidden) --><ng-container
7
14
  *ngIf="!isSectionHidden; else hiddenHeaderLayout"><al-responsive-columns [stackAt]="0" [gap]="'12px'"
8
15
  [padding]="'8px 12px'">
@@ -26,6 +33,7 @@
26
33
  <div left>
27
34
  <div class="edit-input-group" [ngClass]="{'input-focused': isInputFocused}">
28
35
  <div class="content_width"><span *ngIf="!isTitleEditing" class="title-text"
36
+ [ngClass]="{ 'title-text-white': fieldVisibility?.isVisible === false }"
29
37
  (click)="onTitleClick()">
30
38
  {{ title || 'Click to edit' }}
31
39
  </span><input *ngIf="isTitleEditing" #titleInput type="text" [(ngModel)]="editedTitle"
@@ -71,13 +79,14 @@
71
79
  [rightWidth]="'32px'">
72
80
  <div left>
73
81
  <div class="edit-input-group hide-header-title">
74
- <div class="content_width"><span class="title-text header-text-turncate">
82
+ <div class="content_width"><span class="title-text header-text-turncate"
83
+ [ngClass]="{ 'title-text-white': fieldVisibility?.isVisible === false }">
75
84
  {{ title }}
76
85
  </span></div>
77
86
  </div>
78
87
  </div>
79
88
  <div center>
80
- <div class="hidden-write">Section hidden</div>
89
+ <div class="hidden-write-sb" [ngClass]="{ 'hidden-write-white-sb': fieldVisibility?.isVisible === false }">Section hidden</div>
81
90
  </div>
82
91
  <div right><ng-content select="[header-center-right]"></ng-content>
83
92
  <!-- Eye icon - uses actual isHidden value from config, always visible --><ng-container
@@ -123,12 +132,13 @@
123
132
  <div class="mat-checkbox-margin align-center"
124
133
  [attr.data-test-id]="isHidden ? 'section-show-eye-div' : 'section-hide-eye-div'"
125
134
  style="display: flex; align-items: center; justify-content: center;"><mat-icon
126
- class="delete-multiple mat-fab.mat-accent eye-icon" [svgIcon]="isHidden ? 'visibility' : 'visibility_off'"
135
+ class="delete-multiple mat-fab.mat-accent eye-icon" [svgIcon]="isHidden ? (fieldVisibility?.isVisible === false ? 'visibility_white' : 'visibility') : (fieldVisibility?.isVisible === false ? 'visibility_off_white' : 'visibility_off')"
127
136
  [matTooltip]="configEyeToggle?.tooltips?.[isHidden ? 'collapse' : 'expand'] || (isHidden ? 'Show Section' : 'Hide Section')"
128
137
  [matTooltipPosition]="configEyeToggle?.tooltips?.position || 'above'"
129
138
  [attr.aria-label]="configEyeToggle?.ariaLabels?.[isHidden ? 'collapsed' : 'expanded'] || (isHidden ? 'Show section' : 'Hide section')"
130
139
  (click)="onEyeIconClick(isHidden, accordionItem, configEyeToggle)"
131
140
  [attr.data-test-id]="isHidden ? 'section-show-eye-icon' : 'section-hide-eye-icon'"
132
- style="cursor: pointer; display: inline-block; width: 24px; height: 24px; font-size: 24px; color: #717793;"
141
+ [style.color]="fieldVisibility?.isVisible === false ? '#fff' : '#717793'"
142
+ style="cursor: pointer; display: inline-block; width: 24px; height: 24px; font-size: 24px;"
133
143
  [style.opacity]="1" [style.visibility]="'visible'"></mat-icon></div>
134
144
  </ng-template>
@@ -474,6 +474,11 @@
474
474
  cursor: pointer;
475
475
  }
476
476
 
477
+ /* White text for dark background */
478
+ .title-text-white {
479
+ color: #fff;
480
+ }
481
+
477
482
  .title-input {
478
483
  font-size: 16px;
479
484
  font-weight: 400;
@@ -588,18 +593,39 @@
588
593
  flex-shrink: 0;
589
594
  }
590
595
 
591
- .hidden-write {
596
+ .hidden-write-sb {
592
597
  color: #a2a6b8;
593
598
  font-weight: 400;
594
599
  font-family: 'Roboto', sans-serif;
595
600
  white-space: nowrap;
596
601
  }
597
602
 
603
+ /* White text for dark background */
604
+ .hidden-write-white-sb {
605
+ color: #fff;
606
+ }
607
+
598
608
  /* Apply reduced opacity to entire header when hidden */
599
609
  .example-accordion-item-header.header-hidden {
600
610
  opacity: 0.7;
601
611
  }
602
612
 
613
+ /**
614
+ * Extra Section Header Styles
615
+ * These classes are used for extra sections to support dynamic background colors
616
+ * based on template field visibility
617
+ */
618
+
619
+ /* Standard header style - visible section with light background */
620
+ .example-accordion-item-header.header-visible-sb {
621
+ transition: background-color 0.2s ease;
622
+ }
623
+
624
+ /* Collapsed header style - hidden section or field with dark background */
625
+ .example-accordion-item-header.header-hide-sb {
626
+ background-color: #4B4F62;
627
+ }
628
+
603
629
  .mat-checkbox-margin {
604
630
  margin-left: 8px;
605
631
  }
@@ -640,4 +666,4 @@
640
666
  // position: relative;
641
667
  // z-index: 1;
642
668
  // }
643
- // }
669
+ // }