@allsorter/ui-components 0.0.372 → 0.0.376

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.
@@ -28,7 +28,10 @@ export declare class AiApplyBarComponent {
28
28
  closeClick: EventEmitter<void>;
29
29
  /** Emitted when the chevron icon button is clicked */
30
30
  chevronClick: EventEmitter<void>;
31
+ isVisible: boolean;
31
32
  onValueChange(v: string): void;
33
+ toggleBar(): void;
34
+ onClose(): void;
32
35
  static ɵfac: i0.ɵɵFactoryDeclaration<AiApplyBarComponent, never>;
33
36
  static ɵcmp: i0.ɵɵComponentDeclaration<AiApplyBarComponent, "al-ai-apply-bar", never, { "dataTestId": { "alias": "dataTestId"; "required": false; }; "showChevron": { "alias": "showChevron"; "required": false; }; "showChevronButton": { "alias": "showChevronButton"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "applyLabel": { "alias": "applyLabel"; "required": false; }; "applyDisabled": { "alias": "applyDisabled"; "required": false; }; "showClose": { "alias": "showClose"; "required": false; }; "iconOutlined": { "alias": "iconOutlined"; "required": false; }; "closeButtonTooltip": { "alias": "closeButtonTooltip"; "required": false; }; "closeButtonTooltipPosition": { "alias": "closeButtonTooltipPosition"; "required": false; }; "showHelperText": { "alias": "showHelperText"; "required": false; }; "helperText": { "alias": "helperText"; "required": false; }; }, { "valueChange": "valueChange"; "applyClick": "applyClick"; "closeClick": "closeClick"; "chevronClick": "chevronClick"; }, never, never, true, never>;
34
37
  }
@@ -0,0 +1,92 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { MatIconRegistry } from '@angular/material/icon';
3
+ import { DomSanitizer } from '@angular/platform-browser';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * AI Wrapper Component
7
+ *
8
+ * A presentational component that displays a clock-hand style toolbar
9
+ * that rotates between vertical (tools) and horizontal (AI input) states.
10
+ *
11
+ * This component has no internal logic - all state is controlled via inputs
12
+ * and user interactions emit events.
13
+ */
14
+ export declare class AiWrapperComponent implements OnInit {
15
+ private iconRegistry;
16
+ private sanitizer;
17
+ /** Whether the component is in AI mode (horizontal) or tools mode (vertical) */
18
+ isAI: boolean;
19
+ /** Placeholder text for the AI input field (dropdown) */
20
+ inputPlaceholder: string;
21
+ /** Options for the dropdown input */
22
+ inputOptions: string[];
23
+ /** Current value of the AI input field */
24
+ inputValue: string;
25
+ /** Whether the input is disabled */
26
+ inputDisabled: boolean;
27
+ /** Whether to show the close (X) button */
28
+ showCloseButton: boolean;
29
+ /** Whether to show the hide button in vertical mode */
30
+ showHideButton: boolean;
31
+ /** Whether to show the sub role button in vertical mode */
32
+ showSubRoleButton: boolean;
33
+ /** Whether to show the year month button in vertical mode */
34
+ showYearMonthButton: boolean;
35
+ /** Whether to show the move button in vertical mode */
36
+ showMoveButton: boolean;
37
+ /** Whether to show the delete button in vertical mode */
38
+ showDeleteButton: boolean;
39
+ /** Whether to show the Apply AI button in AI mode */
40
+ showApplyButton: boolean;
41
+ /** Label for the Apply AI button */
42
+ applyLabel: string;
43
+ /** Whether the Apply AI button is disabled */
44
+ applyDisabled: boolean;
45
+ /** Whether to show the chevron button */
46
+ showChevronButton: boolean;
47
+ /** Whether to show helper text */
48
+ showHelperText: boolean;
49
+ /** Helper text content */
50
+ helperText: string;
51
+ /** Event emitted when the close (X) button is clicked */
52
+ closeClick: EventEmitter<void>;
53
+ /** Event emitted when the AI trigger button (Sparkles) is clicked */
54
+ aiTriggerClick: EventEmitter<void>;
55
+ /** Event emitted when the AI input value changes */
56
+ inputValueChange: EventEmitter<string>;
57
+ /** Event emitted when the hide button is clicked */
58
+ hideClick: EventEmitter<void>;
59
+ /** Event emitted when the sub role button is clicked */
60
+ subRoleClick: EventEmitter<void>;
61
+ /** Event emitted when the year month button is clicked */
62
+ yearMonthClick: EventEmitter<void>;
63
+ /** Event emitted when the move button is clicked */
64
+ moveClick: EventEmitter<void>;
65
+ /** Event emitted when the delete button is clicked */
66
+ deleteClick: EventEmitter<void>;
67
+ /** Event emitted when the Apply AI button is clicked */
68
+ applyClick: EventEmitter<void>;
69
+ /** Event emitted when the chevron button is clicked */
70
+ chevronClick: EventEmitter<void>;
71
+ /** Event emitted when the input field is focused */
72
+ inputFocus: EventEmitter<void>;
73
+ /** Event emitted when the input field loses focus */
74
+ inputBlur: EventEmitter<void>;
75
+ constructor(iconRegistry: MatIconRegistry, sanitizer: DomSanitizer);
76
+ ngOnInit(): void;
77
+ private registerIcons;
78
+ onCloseClick(): void;
79
+ onAITriggerClick(event: Event): void;
80
+ onInputChange(value: string): void;
81
+ onHideClick(): void;
82
+ onSubRoleClick(): void;
83
+ onYearMonthClick(): void;
84
+ onMoveClick(): void;
85
+ onDeleteClick(): void;
86
+ onApplyClick(): void;
87
+ onChevronClick(): void;
88
+ onInputFocus(): void;
89
+ onInputBlur(): void;
90
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiWrapperComponent, never>;
91
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiWrapperComponent, "al-ai-wrapper", never, { "isAI": { "alias": "isAI"; "required": false; }; "inputPlaceholder": { "alias": "inputPlaceholder"; "required": false; }; "inputOptions": { "alias": "inputOptions"; "required": false; }; "inputValue": { "alias": "inputValue"; "required": false; }; "inputDisabled": { "alias": "inputDisabled"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "showHideButton": { "alias": "showHideButton"; "required": false; }; "showSubRoleButton": { "alias": "showSubRoleButton"; "required": false; }; "showYearMonthButton": { "alias": "showYearMonthButton"; "required": false; }; "showMoveButton": { "alias": "showMoveButton"; "required": false; }; "showDeleteButton": { "alias": "showDeleteButton"; "required": false; }; "showApplyButton": { "alias": "showApplyButton"; "required": false; }; "applyLabel": { "alias": "applyLabel"; "required": false; }; "applyDisabled": { "alias": "applyDisabled"; "required": false; }; "showChevronButton": { "alias": "showChevronButton"; "required": false; }; "showHelperText": { "alias": "showHelperText"; "required": false; }; "helperText": { "alias": "helperText"; "required": false; }; }, { "closeClick": "closeClick"; "aiTriggerClick": "aiTriggerClick"; "inputValueChange": "inputValueChange"; "hideClick": "hideClick"; "subRoleClick": "subRoleClick"; "yearMonthClick": "yearMonthClick"; "moveClick": "moveClick"; "deleteClick": "deleteClick"; "applyClick": "applyClick"; "chevronClick": "chevronClick"; "inputFocus": "inputFocus"; "inputBlur": "inputBlur"; }, never, ["*"], true, never>;
92
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./ai-wrapper.component";
3
+ /**
4
+ * Module for AI Wrapper Component
5
+ * Note: This component is standalone, so this module is optional.
6
+ * It can be used if you need to import the component in a non-standalone module.
7
+ */
8
+ export declare class AiWrapperModule {
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiWrapperModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AiWrapperModule, never, [typeof i1.AiWrapperComponent], [typeof i1.AiWrapperComponent]>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<AiWrapperModule>;
12
+ }
@@ -50,7 +50,10 @@ export declare class NewResumeHeaderComponent implements OnInit, OnDestroy, Afte
50
50
  isMenuVisible: boolean;
51
51
  isPopOutDismissed: boolean;
52
52
  private clickOutsideListener?;
53
+ private resizeObserver?;
53
54
  titleInput?: ElementRef<HTMLInputElement>;
55
+ accordionHeader?: ElementRef<HTMLElement>;
56
+ generalContainer?: ElementRef<HTMLElement>;
54
57
  constructor(sanitizer: DomSanitizer, cdr: ChangeDetectorRef, iconRegistry: MatIconRegistry);
55
58
  private registerIcons;
56
59
  toggleAccordion(accordionItem: any): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allsorter/ui-components",
3
- "version": "0.0.372",
3
+ "version": "0.0.376",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",
package/public-api.d.ts CHANGED
@@ -51,3 +51,5 @@ export * from './lib/toolbar-right/toolbar-right.component';
51
51
  export * from './lib/toolbar-right/toolbar-right.module';
52
52
  export * from './lib/side-action-bar-wrapper/side-action-bar-wrapper.component';
53
53
  export * from './lib/side-action-bar-wrapper/side-action-bar-wrapper.module';
54
+ export * from './lib/ai-wrapper/ai-wrapper.component';
55
+ export * from './lib/ai-wrapper/ai-wrapper.module';
@@ -1,43 +1,45 @@
1
- <div class="ai-apply-wrap" [attr.data-test-id]="dataTestId">
2
- <div class="ai-apply-rail">
3
- <div class="ai-apply-row">
4
- <div class="ai-apply-input">
5
- <al-input
6
- [labelText]="''"
7
- [placeholder]="placeholder"
8
- [value]="value"
9
- [type]="'text'"
10
- [disabled]="disabled"
11
- [helperText]="false"
12
- [leftIcon]="''"
13
- [rightIcon]="'expand_more'"
14
- [hasDropDown]="true"
15
- [searchfilter]="true"
16
- [multipleSelect]="false"
17
- [options]="options"
18
- [size]="'base'"
19
- [types]="'plain'"
20
- (change)="onValueChange($event)">
21
- </al-input>
22
- </div>
1
+ <div class="ai-apply-container" [attr.data-test-id]="dataTestId">
2
+
3
+ <!-- Toggle Button - AI Trigger or Close Button (Fixed Position) -->
4
+ <div class="ai-toggle-button">
5
+ <!-- AI Trigger Button - Show when bar is hidden -->
6
+ <al-button *ngIf="!isVisible" [iconOnly]="true" [buttonType]="'icon-circle'" [icon]="'auto_fix_high'"
7
+ [color]="'gradient'" [size]="'base'" aria-label="AI Trigger" (onClick)="toggleBar()">
8
+ </al-button>
9
+
10
+ <!-- Close Button - Show when bar is visible -->
11
+ <al-button *ngIf="isVisible && showClose" [iconOnly]="true" [buttonType]="'icon-circle'" [icon]="'close'"
12
+ [color]="'grey'" [size]="'base'" aria-label="Close" (onClick)="toggleBar()">
13
+ </al-button>
14
+ </div>
15
+
16
+ <!-- AI Apply Bar - Expands to the LEFT of button -->
17
+ <div class="ai-apply-wrap" [class.visible]="isVisible" [class.hidden]="!isVisible">
18
+ <div class="ai-apply-rail">
19
+ <div class="ai-apply-row">
20
+ <div class="ai-apply-input">
21
+ <al-input [labelText]="''" [placeholder]="placeholder" [value]="value" [type]="'text'" [disabled]="disabled"
22
+ [helperText]="false" [leftIcon]="''" [rightIcon]="'expand_more'" [hasDropDown]="true" [searchfilter]="true"
23
+ [multipleSelect]="false" [options]="options" [size]="'base'" [types]="'plain'"
24
+ (change)="onValueChange($event)">
25
+ </al-input>
26
+ </div>
23
27
 
24
- <div class="ai-apply-button">
25
- <al-button [label]="applyLabel" [buttonType]="'icon-label'" [category]="'gradient'" [size]="'base'"
26
- [state]="applyDisabled ? 'disabled' : 'default'" (onClick)="applyClick.emit()">
27
- </al-button>
28
- <al-icon-button *ngIf="showChevronButton" icon="chevron_right" [iconOutlined]="true" [customColour]="'#ffffff'"
29
- [size]="'xl'" [disabled]="applyDisabled" (onClick)="chevronClick.emit()"
30
- [dataTestId]="'icon-btn_Uwofs4q_3kWU'"></al-icon-button>
28
+ <div class="ai-apply-button">
29
+ <al-button [label]="applyLabel" [buttonType]="'icon-label'" [category]="'gradient'" [size]="'base'"
30
+ [state]="applyDisabled ? 'disabled' : 'default'" (onClick)="applyClick.emit()">
31
+ </al-button>
32
+ <al-icon-button *ngIf="showChevronButton" icon="chevron_right" [iconOutlined]="true"
33
+ [customColour]="'#ffffff'" [size]="'xl'" [disabled]="applyDisabled" (onClick)="chevronClick.emit()"
34
+ [dataTestId]="'icon-btn_Uwofs4q_3kWU'">
35
+ </al-icon-button>
36
+ </div>
31
37
  </div>
32
- </div>
33
38
 
34
- <div class="ai-apply-helper" *ngIf="showHelperText">
35
- {{ helperText }}
39
+ <div class="ai-apply-helper" *ngIf="showHelperText">
40
+ {{ helperText }}
41
+ </div>
36
42
  </div>
37
43
  </div>
38
- <div class="ai-apply-close" *ngIf="showClose">
39
- <al-button [buttonType]="'icon-circle'" [color]="'grey'" [outline]="false" [size]="'base'" [iconOnly]="true"
40
- [iconOutlined]="iconOutlined" [icon]="'close'" [tooltip]="closeButtonTooltip"
41
- [tooltipPosition]="closeButtonTooltipPosition" aria-label="Close" (onClick)="closeClick.emit()"></al-button>
42
- </div>
43
- </div>
44
+
45
+ </div>
@@ -8,14 +8,48 @@
8
8
  display: none !important;
9
9
  }
10
10
 
11
- /* Outer container to allow floating close button */
12
- .ai-apply-wrap {
11
+ /* Main container - positioned relative for absolute children */
12
+ .ai-apply-container {
13
13
  position: relative;
14
- display: inline-flex;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: flex-end;
17
+ }
18
+
19
+ /* Toggle Button - AI Trigger or Close Button (Fixed Position) */
20
+ .ai-toggle-button {
21
+ position: relative;
22
+ z-index: 50;
23
+ flex-shrink: 0;
24
+ }
25
+
26
+ /* Expanding Bar - Positioned absolute, expands to the LEFT of button */
27
+ .ai-apply-wrap {
28
+ position: absolute;
29
+ right: 40px;
30
+ /* 48px (button width) + 12px (gap) = 60px from right */
31
+ display: flex;
15
32
  align-items: stretch;
16
- width: 100%;
17
33
  overflow: hidden;
18
- gap: 8px;
34
+ transform-origin: right center;
35
+ transition: width 500ms cubic-bezier(0.2, 0.8, 0.2, 1),
36
+ opacity 300ms ease-out 200ms;
37
+
38
+ /* Hidden state - collapsed */
39
+ &.hidden {
40
+ width: 0;
41
+ opacity: 0;
42
+ pointer-events: none;
43
+ transition: width 500ms cubic-bezier(0.2, 0.8, 0.2, 1),
44
+ opacity 300ms ease-out;
45
+ }
46
+
47
+ /* Visible state - expanded */
48
+ &.visible {
49
+ width: 350px;
50
+ opacity: 1;
51
+ pointer-events: auto;
52
+ }
19
53
  }
20
54
 
21
55
  /* Dark rail with rounded corners */
@@ -28,6 +62,18 @@
28
62
  gap: $space-4;
29
63
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
30
64
  backdrop-filter: blur(2px);
65
+ transition: opacity 300ms ease-out;
66
+ white-space: nowrap;
67
+ }
68
+
69
+ /* Inner content fade-in animation - matching React */
70
+ .ai-apply-wrap.hidden .ai-apply-rail {
71
+ opacity: 0;
72
+ }
73
+
74
+ .ai-apply-wrap.visible .ai-apply-rail {
75
+ opacity: 1;
76
+ transition-delay: 200ms;
31
77
  }
32
78
 
33
79
  .ai-apply-row {
@@ -167,4 +213,4 @@
167
213
  box-shadow: none !important;
168
214
  border: none !important;
169
215
  }
170
- }
216
+ }
@@ -0,0 +1,38 @@
1
+ <div class="al-ai-wrapper">
2
+ <div class="al-ai-wrapper__center">
3
+ <div *ngIf="showCloseButton" class="al-ai-wrapper__close-button-wrapper" [class.is-ai-mode]="isAI"><al-button
4
+ [buttonType]="'icon-circle'" [color]="isAI ? 'grey' : 'grey'" [outline]="false" [size]="'base'"
5
+ [iconOnly]="true" [iconOutlined]="false" [icon]="'close'" [disabled]="false" [tooltip]="''"
6
+ [tooltipPosition]="'above'" aria-label="Close" (onClick)="onCloseClick()"></al-button></div>
7
+ <div class="al-ai-wrapper__hand-wrapper" [class.is-ai-mode]="isAI">
8
+ <div class="al-ai-wrapper__gap">
9
+ <div class="al-ai-wrapper__toolbar" [class.is-ai-mode]="isAI" [class.no-helper-text]="isAI && !showHelperText">
10
+ <div class="al-ai-wrapper__content" [class.is-ai-mode]="isAI">
11
+ <div *ngIf="!isAI" class="al-ai-wrapper__vertical-tools">
12
+ <ng-content></ng-content>
13
+ </div>
14
+ <div *ngIf="isAI" class="al-ai-wrapper__horizontal-ai">
15
+ <div class="al-ai-wrapper__ai-row">
16
+ <div class="al-ai-wrapper__input-container"><al-input [labelText]="''" [placeholder]="inputPlaceholder"
17
+ [value]="inputValue" [type]="'text'" [disabled]="inputDisabled" [helperText]="false" [leftIcon]="''"
18
+ [rightIcon]="'expand_more'" [hasDropDown]="true" [searchfilter]="true" [multipleSelect]="false"
19
+ [options]="inputOptions" [size]="'base'" [types]="'plain'"
20
+ (change)="onInputChange($event)"></al-input></div>
21
+ <div class="al-ai-wrapper__ai-actions"><al-button *ngIf="showApplyButton" [buttonType]="'icon-label'"
22
+ [color]="'gradient'" [outline]="false" [size]="'base'" [labelText]="applyLabel"
23
+ [disabled]="applyDisabled" aria-label="Apply AI"
24
+ (onClick)="onApplyClick()"></al-button><al-icon-button *ngIf="showChevronButton"
25
+ icon="chevron_right" [iconOutlined]="true" [customColour]="'#ffffff'" [size]="'xl'"
26
+ [disabled]="applyDisabled" (onClick)="onChevronClick()"
27
+ [dataTestId]="'icon-btn_Uwofs4q_3kWU'"></al-icon-button></div>
28
+ </div>
29
+ <div class="al-ai-wrapper__helper-text" *ngIf="showHelperText">
30
+ {{ helperText }}
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>