carriera-intern-components 0.0.4 → 0.0.5

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.
@@ -3,18 +3,8 @@ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { PasswordDirective } from '../../directives/password.directive';
4
4
  import { NumberFormatDirective } from '../../directives/number-format.directive';
5
5
  import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
6
+ import { CaiInputConfig } from './models/input.model';
6
7
  import * as i0 from "@angular/core";
7
- export interface InputConfig {
8
- type?: 'text' | 'password' | 'number';
9
- name?: string;
10
- required?: boolean;
11
- alignment?: 'left' | 'right';
12
- inverse?: boolean;
13
- reveal?: number;
14
- icon?: string | null;
15
- dropdown?: boolean;
16
- search?: boolean;
17
- }
18
8
  /**
19
9
  * A reusable input component that integrates with Angular Forms and supports
20
10
  * various input types, including text, password (with reveal functionality),
@@ -37,7 +27,7 @@ export declare class InputComponent implements ControlValueAccessor {
37
27
  * placeholder/label text (`name`), validation (`required`), and other
38
28
  * special behaviors.
39
29
  */
40
- config: import("@angular/core").InputSignal<InputConfig>;
30
+ config: import("@angular/core").InputSignal<CaiInputConfig>;
41
31
  /**
42
32
  * Internal signal to track the disabled state of the input.
43
33
  * This state is managed by the `ControlValueAccessor`'s `setDisabledState`
@@ -0,0 +1 @@
1
+ export * from './input.model';
@@ -0,0 +1,11 @@
1
+ export interface CaiInputConfig {
2
+ type?: 'text' | 'password' | 'number';
3
+ name?: string;
4
+ required?: boolean;
5
+ alignment?: 'left' | 'right';
6
+ inverse?: boolean;
7
+ reveal?: number;
8
+ icon?: string | null;
9
+ dropdown?: boolean;
10
+ search?: boolean;
11
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"carriera-intern-components.mjs","sources":["../../../projects/carriera-intern-components/src/app/pipes/number-format.pipe.ts","../../../projects/carriera-intern-components/src/app/pipes/error-message.pipe.ts","../../../projects/carriera-intern-components/src/app/directives/password.directive.ts","../../../projects/carriera-intern-components/src/app/directives/number-format.directive.ts","../../../projects/carriera-intern-components/src/app/components/input/input.component.ts","../../../projects/carriera-intern-components/src/app/components/input/input.component.html","../../../projects/carriera-intern-components/src/app/pipes/bytes-to-human-readable.pipe.ts","../../../projects/carriera-intern-components/src/app/components/document-preview/document-preview.component.ts","../../../projects/carriera-intern-components/src/app/components/document-preview/document-preview.component.html","../../../projects/carriera-intern-components/src/app/services/document.service.ts","../../../projects/carriera-intern-components/src/app/components/drop-zone/drop-zone.component.ts","../../../projects/carriera-intern-components/src/app/components/drop-zone/drop-zone.component.html","../../../projects/carriera-intern-components/src/public-api.ts","../../../projects/carriera-intern-components/src/carriera-intern-components.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'numberFormat',\n})\nexport class NumberFormatPipe implements PipeTransform {\n transform(value: string): string {\n if (!value) return '';\n\n if (value.includes('.')) {\n const [integerPart, decimalPart] = value.split('.');\n \n // Cap decimal places to maximum 2\n const cappedDecimalPart = decimalPart ? decimalPart.substring(0, 2) : '';\n \n // Format the integer part with commas\n const formattedInteger = integerPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n \n // If there's a decimal part, show it (capped at 2 places)\n if (decimalPart !== undefined) {\n return `${formattedInteger}.${cappedDecimalPart}`;\n }\n \n // If user just typed a decimal point, show it\n return `${formattedInteger}.`;\n }\n\n return value.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ValidationErrors } from '@angular/forms';\nimport { NumberFormatPipe } from './number-format.pipe';\n\n@Pipe({\n name: 'errorMessage'\n})\nexport class ErrorMessagePipe implements PipeTransform {\n numberFormatPipe = new NumberFormatPipe();\n\n transform(errors: ValidationErrors | null | undefined): string[] {\n if (!errors) return [];\n\n const messages: Record<string, (value?: any) => string> = {\n required: () => 'Required',\n minlength: (value: any) => `Minimum length is ${value.requiredLength}`,\n maxlength: (value: any) => `Maximum length is ${value.requiredLength}`,\n min: (value: any) => `Minimum value is ${this.numberFormatPipe.transform(String(value.min))}` ,\n max: (value: any) => `Maximum value is ${this.numberFormatPipe.transform(String(value.max))}` ,\n email: () => 'Invalid email format',\n pattern: () => 'Invalid format',\n };\n\n return Object.entries(errors).map(([key, value]) => {\n const getMessage = messages[key];\n return getMessage ? getMessage(value) : 'Invalid field.';\n });\n }\n\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n input,\n OnInit,\n} from '@angular/core';\n\n@Directive({\n selector: '[appPassword]',\n})\nexport class PasswordDirective implements OnInit {\n /**\n * Input property to enable or disable the password masking behavior.\n */\n appPassword = input<boolean>(true);\n\n /**\n * Input property to hide or show the password\n */\n visible = input<boolean>(false);\n\n /**\n * Input property to specify how many characters from the end of the\n * password should be revealed. Defaults to 0 (fully masked).\n */\n reveal = input<number>(0);\n\n /**\n * Stores the actual, unmasked password value,\n * while the input element displays a masked version.\n */\n private realValue: string = '';\n\n constructor(private el: ElementRef<HTMLInputElement>) {}\n\n /**\n * Lifecycle hook called after Angular initializes the directive's data-bound properties.\n * If password masking is enabled, it sets up the initial masking.\n */\n ngOnInit(): void {\n if (this.appPassword()) {\n this.setupPasswordMasking();\n }\n }\n\n /**\n * Sets up the initial state for password masking.\n * It reads the initial value from the input (if any) as the `realValue`\n * and then updates the input's display to show the masked version.\n */\n private setupPasswordMasking(): void {\n const input = this.el.nativeElement;\n this.realValue = input.value || ''; // Assume initial value is unmasked or is the real one\n this.updateDisplayValue();\n }\n\n /**\n * HostListener for the 'input' event on the host element.\n * This is the core logic for synchronizing `realValue` with user input\n * on the masked field. It infers changes to `realValue`\n * based on `event.data`, cursor position, and the difference in length\n * between the input's current display value and the previous `realValue`.\n * @param event - The InputEvent object.\n */\n @HostListener('input', ['$event'])\n onInput(event: InputEvent): void {\n if (!this.appPassword()) return;\n\n const input = this.el.nativeElement; // Using el.nativeElement as in original code\n const cursorPosition = input.selectionStart || 0;\n const displayValue = input.value; // Value after browser's immediate processing of input\n\n // Calculate difference from the *previous* realValue length\n const lengthDiff = displayValue.length - this.realValue.length;\n\n if (event.data && lengthDiff <= 0) {\n // Text replacement or complex change: e.g., typing over a selection.\n // `event.data` contains the newly typed character(s).\n // `lengthDiff` helps determine how many characters were replaced.\n const deletedCount = Math.abs(lengthDiff) + event.data.length;\n const replaceStart = cursorPosition - event.data.length;\n\n this.realValue =\n this.realValue.slice(0, Math.max(0, replaceStart)) + // Ensure replaceStart isn't negative\n event.data +\n this.realValue.slice(Math.max(0, replaceStart) + deletedCount);\n } else if (lengthDiff > 0) {\n // Pure addition of characters (typing without prior selection, or pasting).\n // `event.data` contains the added character(s), or we infer from displayValue.\n const addedChars =\n event.data ||\n displayValue.slice(cursorPosition - lengthDiff, cursorPosition);\n const insertPosition = cursorPosition - addedChars.length;\n this.realValue =\n this.realValue.slice(0, Math.max(0, insertPosition)) +\n addedChars +\n this.realValue.slice(Math.max(0, insertPosition));\n } else if (lengthDiff < 0) {\n // Pure deletion (e.g., Backspace, Delete key).\n // `event.data` is null for these operations.\n const deletedCount = Math.abs(lengthDiff);\n // `cursorPosition` is where the cursor is *after* deletion.\n // The deletion happened *before* this `cursorPosition`.\n this.realValue =\n this.realValue.slice(0, cursorPosition) +\n this.realValue.slice(cursorPosition + deletedCount);\n }\n // If lengthDiff is 0 and no event.data (e.g. moving cursor with arrow keys inside text), realValue should not change.\n // The current logic handles this as no branch is taken.\n\n this.updateDisplayValue();\n this.setCursorPosition(cursorPosition); // Restore cursor as displayValue changed\n this.dispatchRealValueChange();\n }\n\n /**\n * HostListener for the 'cut' event.\n * Prevents default cut behavior to operate on `realValue`.\n * It copies the corresponding part of `realValue` to the clipboard\n * and updates `realValue` and the display.\n * @param event - The ClipboardEvent object.\n */\n @HostListener('cut', ['$event'])\n onCut(event: ClipboardEvent): void {\n if (!this.appPassword()) return;\n\n const input = this.el.nativeElement;\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n\n if (start !== end) {\n // If there's a selection\n event.preventDefault(); // Prevent default cut action\n const cutText = this.realValue.slice(start, end); // Cut from realValue\n event.clipboardData?.setData('text/plain', cutText);\n\n this.realValue =\n this.realValue.slice(0, start) + this.realValue.slice(end);\n\n this.updateDisplayValue();\n this.setCursorPosition(start); // Set cursor to the start of the cut area\n this.dispatchRealValueChange();\n }\n }\n\n /**\n * HostListener for the 'copy' event.\n * Prevents default copy behavior to ensure the unmasked `realValue` segment is copied.\n * @param event - The ClipboardEvent object.\n */\n @HostListener('copy', ['$event'])\n onCopy(event: ClipboardEvent): void {\n if (!this.appPassword()) return;\n\n const input = this.el.nativeElement;\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n\n if (start !== end) {\n // If there's a selection\n event.preventDefault(); // Prevent default copy action\n const copiedText = this.realValue.slice(start, end); // Copy from realValue\n event.clipboardData?.setData('text/plain', copiedText);\n }\n }\n\n /**\n * Updates the input element's display value with a masked version of `realValue`.\n * Uses '•' for masked characters. Respects the `reveal` input to show\n * a specified number of characters from the end of the password.\n * This method is responsible for creating the visual masking.\n */\n private updateDisplayValue(): void {\n if (this.visible()) {\n this.el.nativeElement.value = this.realValue;\n return;\n }\n\n const revealCount = this.reveal();\n const realLength = this.realValue.length;\n let displayValue = '';\n\n if (revealCount > 0 && realLength > revealCount) {\n const actualRevealCount = Math.min(revealCount, realLength);\n // Calculate how many characters to mask\n const maskedCharsCount = realLength - actualRevealCount;\n\n if (maskedCharsCount > 0) {\n // Get the part of the real value that should be revealed\n const revealedPart = this.realValue.slice(maskedCharsCount); // Corrected from slice(realLength - actualRevealCount)\n displayValue = '•'.repeat(maskedCharsCount) + revealedPart;\n } else {\n // If all characters are to be revealed (revealCount >= realLength)\n displayValue = this.realValue;\n }\n } else {\n // Fully mask if revealCount is 0 or realValue is lesser than revealCount\n displayValue = '•'.repeat(realLength);\n }\n\n this.el.nativeElement.value = displayValue;\n }\n\n /**\n * Sets the cursor position within the input field.\n * This is crucial after `updateDisplayValue` changes the entire input value,\n * to maintain a natural cursor behavior for the user.\n * Uses `setTimeout` to ensure the operation occurs after Angular's view update.\n * @param position - The desired cursor position.\n */\n private setCursorPosition(position: number): void {\n const input = this.el.nativeElement;\n // setTimeout ensures this runs after the current browser rendering tick\n setTimeout(() => {\n // Clamp position to be within the bounds of the current display value's length\n const currentLength = input.value.length;\n const newPosition = Math.max(0, Math.min(position, currentLength));\n input.setSelectionRange(newPosition, newPosition);\n }, 0);\n }\n\n /**\n * Dispatches a custom event named 'realValueChange' from the host element.\n * The event's `detail` property contains the unmasked `realValue`.\n * This allows parent components (like your `InputComponent`) to listen for\n * changes to the actual password.\n */\n private dispatchRealValueChange(): void {\n const customEvent = new CustomEvent('realValueChange', {\n bubbles: true, // Allows event to bubble up the DOM\n composed: true, // Allows event to cross Shadow DOM boundaries\n detail: this.realValue,\n });\n this.el.nativeElement.dispatchEvent(customEvent);\n }\n\n /**\n * Public method to get the current unmasked \"real\" password value.\n * @returns The real password value as a string.\n */\n getRealValue(): string {\n return this.realValue;\n }\n\n /**\n * Public method to set the \"real\" password value from outside the directive\n * (e.g., when the parent form control's value is changed programmatically).\n * It updates the internal `realValue` and then refreshes the masked display.\n * @param value - The new real password value to set.\n */\n setRealValue(value: string): void {\n this.realValue = value || '';\n this.updateDisplayValue();\n }\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n input,\n OnInit,\n} from '@angular/core';\nimport { NumberFormatPipe } from '../pipes/number-format.pipe';\n\n@Directive({\n selector: '[appNumberFormat]',\n providers: [NumberFormatPipe],\n})\nexport class NumberFormatDirective implements OnInit {\n /**\n * Input property to enable or disable the number formatting.\n * Defaults to true, meaning formatting is active by default.\n */\n appNumberFormat = input<boolean>(true);\n\n /**\n * Stores the unformatted, \"real\" numeric value of the input.\n * This is the value that should be used for calculations or form submissions,\n * as opposed to the formatted display value.\n */\n private realValue: string = '';\n\n constructor(private el: ElementRef<HTMLInputElement>) {}\n\n /**\n * Lifecycle hook that is called after Angular has initialized all data-bound\n * properties of a directive.\n * If number formatting is enabled, it sets up the initial formatting.\n */\n ngOnInit(): void {\n if (this.appNumberFormat()) {\n this.setupNumberFormatting();\n }\n }\n\n /**\n * Initializes the number formatting on the input element.\n * It extracts the initial numeric value from the input's current value\n * and then updates the display with the formatted version.\n */\n private setupNumberFormatting(): void {\n const input = this.el.nativeElement;\n // Extract numeric value from whatever might be in the input initially\n this.realValue = this.extractNumericValue(input.value || '');\n this.updateDisplayValue(); // Format and display it\n }\n\n /**\n * HostListener for the 'input' event on the host element.\n * This triggers whenever the user types or pastes content into the input.\n * It extracts the numeric value from the current input, updates the\n * display with the formatted number, moves the cursor to the end,\n * and dispatches a 'realValueChange' event with the unformatted numeric value.\n * @param event - The InputEvent object.\n */\n @HostListener('input', ['$event'])\n onInput(event: InputEvent): void {\n if (!this.appNumberFormat()) return; // Do nothing if formatting is disabled\n\n const input = this.el.nativeElement;\n const displayValue = input.value;\n\n this.realValue = this.extractNumericValue(displayValue);\n this.updateDisplayValue();\n this.setCursorToEnd(); // Important for UX after reformatting\n this.dispatchRealValueChange(); // Notify parent components of the raw value change\n }\n\n /**\n * HostListener for the 'cut' event.\n * Prevents the default cut behavior to manually handle the value change.\n * It reconstructs the value after the cut, extracts the numeric part,\n * updates the display, sets the cursor, and dispatches the real value.\n * @param event - The ClipboardEvent object.\n */\n @HostListener('cut', ['$event'])\n onCut(event: ClipboardEvent): void {\n if (!this.appNumberFormat()) return;\n\n const input = this.el.nativeElement;\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n\n if (start !== end) {\n // If there's a selection\n event.preventDefault(); // Prevent default cut\n const cutText = input.value.slice(start, end);\n event.clipboardData?.setData('text', this.extractNumericValue(cutText)); // Put numeric part on clipboard\n\n // Reconstruct value without the cut part\n const newValue = input.value.slice(0, start) + input.value.slice(end);\n this.realValue = this.extractNumericValue(newValue);\n\n this.updateDisplayValue();\n this.setCursorToEnd();\n this.dispatchRealValueChange();\n }\n }\n\n /**\n * HostListener for the 'copy' event.\n * Prevents the default copy behavior if there's a selection to ensure\n * that the copied text is the unformatted numeric value of the selection,\n * rather than the potentially formatted display text.\n * @param event - The ClipboardEvent object.\n */\n @HostListener('copy', ['$event'])\n onCopy(event: ClipboardEvent): void {\n if (!this.appNumberFormat()) return;\n\n const input = this.el.nativeElement;\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n\n if (start !== end) {\n // If there's a selection\n event.preventDefault(); // Prevent default copy\n const selectedText = input.value.slice(start, end);\n // Copy the underlying numeric value of the selection\n event.clipboardData?.setData(\n 'text',\n this.extractNumericValue(selectedText)\n );\n }\n }\n\n /**\n * HostListener for the 'keydown' event.\n * Filters key presses to allow only digits, a single decimal point,\n * and control keys (Backspace, Arrows, Tab, etc.).\n * This helps maintain a valid numeric input format before the 'input' event fires.\n * @param event - The KeyboardEvent object.\n */\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (!this.appNumberFormat()) return;\n\n const controlKeys = [\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Tab',\n 'Enter',\n 'Escape',\n 'Home',\n 'End',\n ];\n\n // Allow control keys, and modifier key combinations (Ctrl+A, Ctrl+C, etc.)\n if (\n controlKeys.includes(event.key) ||\n event.ctrlKey ||\n event.metaKey ||\n event.altKey\n ) {\n return; // Don't prevent default for these\n }\n\n // Allow a single decimal point if not already present in the realValue\n if (event.key === '.' && !this.realValue.includes('.')) {\n return;\n }\n\n // Prevent non-digit keys\n if (!/^\\d$/.test(event.key)) {\n event.preventDefault();\n }\n }\n\n /**\n * Extracts a clean numeric string from a given value.\n * It removes any non-digit characters except for a single decimal point.\n * It also ensures that there's only one decimal point and limits\n * the decimal part to two digits.\n * @param value - The string value to clean.\n * @returns A string representing the extracted numeric value.\n */\n private extractNumericValue(value: string): string {\n // Remove all non-digit characters except for the decimal point\n let cleanValue = value.replace(/[^\\d.]/g, '');\n\n // Handle multiple decimal points: keep only the first one\n const parts = cleanValue.split('.');\n if (parts.length > 1) {\n const integerPart = parts[0];\n const decimalPart = parts.slice(1).join(''); // Join back any subsequent parts\n cleanValue = `${integerPart}.${decimalPart}`;\n }\n\n // Limit decimal part to two digits\n if (cleanValue.includes('.')) {\n const [integerPart, decimalPart] = cleanValue.split('.');\n const cappedDecimalPart = decimalPart ? decimalPart.substring(0, 2) : '';\n cleanValue = `${integerPart}.${cappedDecimalPart}`;\n }\n\n return cleanValue;\n }\n\n /**\n * Updates the input element's display value with the formatted version\n * of the current `realValue`.\n * It uses the `NumberFormatPipe` for formatting.\n */\n private updateDisplayValue(): void {\n const input = this.el.nativeElement;\n const formattedValue = new NumberFormatPipe().transform(this.realValue);\n this.el.nativeElement.value = formattedValue;\n }\n\n /**\n * Sets the cursor position to the end of the input field.\n * This is typically called after the input value is reformatted to prevent\n * the cursor from jumping to an unexpected position.\n * Uses `setTimeout` to ensure the operation occurs after Angular's view update.\n */\n private setCursorToEnd(): void {\n const input = this.el.nativeElement;\n // setTimeout ensures this runs after the current browser rendering tick,\n // allowing the value to be fully set in the input before moving the cursor.\n setTimeout(() => {\n const length = input.value.length;\n input.setSelectionRange(length, length);\n }, 0);\n }\n\n /**\n * Dispatches a custom event named 'realValueChange' from the host element.\n * The event's `detail` property contains the unformatted `realValue`.\n * This allows parent components or other directives to listen for changes\n * to the underlying numeric value.\n */\n private dispatchRealValueChange(): void {\n const customEvent = new CustomEvent('realValueChange', {\n bubbles: true, // Allows event to bubble up the DOM\n composed: true, // Allows event to cross Shadow DOM boundaries\n detail: this.realValue,\n });\n this.el.nativeElement.dispatchEvent(customEvent);\n }\n\n /**\n * Public method to get the current unformatted \"real\" numeric value.\n * @returns The real numeric value as a string.\n */\n getRealValue(): string {\n return this.realValue;\n }\n\n /**\n * Public method to set the \"real\" numeric value from outside the directive.\n * It extracts the numeric part from the provided value and updates the\n * input's display with the formatted version.\n * @param value - The new value to set (can be formatted or unformatted).\n */\n setRealValue(value: string): void {\n this.realValue = this.extractNumericValue(value || '');\n this.updateDisplayValue();\n }\n}\n","import {\n Component,\n computed,\n ElementRef,\n HostListener,\n input,\n Optional,\n Self,\n signal,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { ErrorMessagePipe } from '../../pipes/error-message.pipe';\nimport { SvgIconComponent } from 'angular-svg-icon';\nimport { PasswordDirective } from '../../directives/password.directive';\nimport { NumberFormatDirective } from '../../directives/number-format.directive';\nimport { NgbDropdownModule, NgbPopover } from '@ng-bootstrap/ng-bootstrap';\n\nexport interface InputConfig {\n type?: 'text' | 'password' | 'number';\n name?: string;\n required?: boolean;\n alignment?: 'left' | 'right';\n inverse?: boolean;\n reveal?: number; // Revealed character count from the end of the password\n icon?: string | null;\n dropdown?: boolean;\n search?: boolean;\n}\n/**\n * A reusable input component that integrates with Angular Forms and supports\n * various input types, including text, password (with reveal functionality),\n * and numbers (with formatting and step controls). It also provides error\n * message display and icon support.\n */\n@Component({\n selector: 'app-input',\n imports: [\n ErrorMessagePipe,\n SvgIconComponent,\n PasswordDirective,\n NumberFormatDirective,\n NgbDropdownModule,\n ],\n templateUrl: './input.component.html', \n styleUrl: './input.component.scss',\n encapsulation: ViewEncapsulation.ShadowDom\n})\nexport class InputComponent implements ControlValueAccessor {\n /**\n * Defines the unique identifier for the input element.\n * This ID is crucial for accessibility, linking the `<label>` to the\n * native `<input>` via the `for` attribute.\n * It is provided by the parent component as an Angular `input()` signal.\n */\n id = input<string>('');\n\n /**\n * Configuration object for the input's behavior and appearance.\n * This `input()` signal accepts an `InputConfig` object to customize\n * properties like the input type (`text`, `password`, `number`),\n * placeholder/label text (`name`), validation (`required`), and other\n * special behaviors.\n */\n config = input<InputConfig>({});\n\n /**\n * Internal signal to track the disabled state of the input.\n * This state is managed by the `ControlValueAccessor`'s `setDisabledState`\n * method, which is called by Angular's Forms API when the associated\n * form control's status changes. Defaults to `false`.\n */\n disabled = signal<boolean>(false);\n\n /**\n * Holds the internal, unmasked, and unformatted value of the input.\n * This signal represents the component's \"source of truth\" for its value.\n * It is updated by user input (via `onInput` or `onRealValueChange`) and\n * programmatically by the `ControlValueAccessor`'s `writeValue` method.\n * The value from this signal is what is propagated back to the parent `FormControl`.\n */\n value = signal<string>('');\n\n /**\n * Tracks the visibility state for inputs of `type='password'`.\n * When `true`, the password's characters are shown; when `false`, they are\n * masked. This is toggled by the `toggleVisibility` method.\n * Defaults to `false`.\n */\n visible = signal<boolean>(false);\n\n /**\n * A computed signal that dynamically calculates the step value for number inputs.\n * The step value changes based on the magnitude of the current `value()`.\n * This allows for more intuitive incrementing and decrementing (e.g., smaller\n * steps for smaller numbers, larger steps for larger numbers). It derives its\n * value from the `getStepValue` method and automatically updates when the\n * input's `value` signal changes.\n */\n step = computed(() => this.getStepValue());\n\n @ViewChild('inputRef') inputRef!: ElementRef<HTMLInputElement>;\n @ViewChild(PasswordDirective) PasswordDirective!: PasswordDirective;\n @ViewChild(NumberFormatDirective)\n NumberFormatDirective!: NumberFormatDirective;\n\n @ViewChild('dropdown') dropdown!: NgbPopover;\n\n /**\n * Constructor for the InputComponent.\n * It injects NgControl to integrate with Angular's forms API.\n * If NgControl is present, it sets this component as the value accessor\n * for the form control.\n * @param ngControl - Optional NgControl instance for form integration.\n */\n constructor(@Optional() @Self() public ngControl: NgControl | null) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n /**\n * Handles the native 'input' event from the HTMLInputElement.\n * Updates the component's internal value and notifies Angular forms\n * about the change.\n * For 'password' type (when not visible) and 'number' type, it relies\n * on associated directives (PasswordDirective, NumberFormatDirective)\n * to get the real value, as the displayed value might be\n * masked or formatted.\n * @param event - The input event object.\n */\n onInput(event: Event): void {\n const inputElement = event.target as HTMLInputElement;\n\n // Handle inputs normally for all inputs other than password and number\n if (this.config().type === 'password' || this.config().type === 'number') {\n return;\n }\n this.value.set(inputElement.value);\n\n if (this.config().search) {\n return;\n }\n\n this.onChange(this.value());\n }\n\n /**\n * Listens for a custom 'realValueChange' event.\n * This event is expected to be emitted by child directives (PasswordDirective, NumberFormatDirective)\n * when their internal \"real\" value changes, allowing the parent input component\n * to stay in sync.\n * @param event - A CustomEvent containing the new real value in `event.detail`.\n */\n @HostListener('realValueChange', ['$event'])\n onRealValueChange(event: CustomEvent): void {\n this.value.set(event.detail);\n this.onChange(event.detail);\n }\n\n /**\n * Increments the value of a number input by the current step.\n * If the current value is not a valid number, it starts from the `min` input.\n * After updating, it notifies forms, updates the view, and focuses the input.\n * @param event - The MouseEvent that triggered the increment.\n */\n increment(event: MouseEvent): void {\n this.value.update((v) =>\n String((parseFloat(v) ? parseFloat(v) : 0) + this.step())\n );\n this.onChange(this.value());\n this.setValue(); // Ensure the view (e.g., formatted number) is updated\n this.focus(event);\n }\n\n /**\n * Decrements the value of a number input by the current step.\n * If the current value is not a valid number, it starts from the `min` input.\n * The value will not go below the minimum value.\n * After updating, it notifies forms, updates the view, and focuses the input.\n * @param event - The MouseEvent that triggered the decrement.\n */\n decrement(event: MouseEvent): void {\n this.value.update((v) => {\n const currentValue = parseFloat(v) ? parseFloat(v) : 0;\n const nextValue = currentValue - this.step();\n return String(nextValue <= 0 ? 0 : nextValue);\n });\n this.onChange(this.value());\n this.setValue(); // Ensure the view (e.g., formatted number) is updated\n this.focus(event);\n }\n\n /**\n * Calculates the step value for number inputs based on the current value.\n * The step dynamically adjusts:\n * - 1000 if value < 20000\n * - 5000 if value < 50000\n * - 10000 if value < 100000\n * - 20000 otherwise\n * Uses `min()` as a fallback if the current value is not a valid number.\n * @returns The calculated step value.\n */\n getStepValue(): number {\n const numericValue = parseFloat(this.value() || '0');\n const value = numericValue || 0;\n\n if (value < 20000) return 1000;\n else if (value < 50000) return 5000;\n else if (value < 100000) return 10000;\n else return 20000;\n }\n\n /**\n * Toggles the visibility of the password input.\n * Toggles the `visible` state and updates the input's displayed value.\n * @param event - The MouseEvent that triggered the toggle.\n */\n toggleVisibility(event: MouseEvent): void {\n if (this.config().type !== 'password') {\n return;\n }\n\n this.focus(event); // Ensure input remains focused after toggle\n this.visible.update((v) => !v);\n setTimeout(() => this.setValue(), 0);\n }\n\n /**\n * Sets the value in the actual HTML input element or updates the\n * \"real\" value in the associated directive.\n * - For 'password' type: If not visible, it updates the PasswordDirective's real value.\n * If visible, it falls through to the default behavior.\n * - For 'number' type: It updates the NumberFormatDirective's real value.\n * - For other types (or visible password): It sets the `value` property of the native input element.\n */\n setValue(): void {\n // Ensure inputRef is available\n if (!this.inputRef || !this.inputRef.nativeElement) {\n return;\n }\n\n switch (this.config().type) {\n case 'password':\n if (this.PasswordDirective) {\n // When password is not visible, the directive handles the masking.\n // We set the real value on the directive.\n this.PasswordDirective.setRealValue(this.value());\n } else {\n // When password is visible, or no directive, set directly.\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n case 'number':\n if (this.NumberFormatDirective) {\n // NumberFormatDirective handles formatting, so we set the real value on it.\n this.NumberFormatDirective.setRealValue(this.value());\n } else {\n // If no directive, set directly.\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n default:\n // For text, email, etc., set the value directly on the input element.\n this.inputRef.nativeElement.value = this.value();\n break;\n }\n }\n\n /**\n * Focuses the input element.\n * Prevents the default action of the mouse event to avoid unintended behaviors\n * like double focus or focus loss.\n * @param event - The MouseEvent that initiated the focus action.\n */\n focus(event: MouseEvent): void {\n event.preventDefault();\n if (this.inputRef && this.inputRef.nativeElement) {\n this.inputRef.nativeElement.focus();\n }\n }\n\n // ControlValueAccessor methods\n onChange = (_: any) => {};\n onTouched = () => {};\n\n /**\n * Writes a new value to the element. (ControlValueAccessor)\n * This method is called by the Forms API to update the view when\n * the form control's value changes programmatically.\n * Uses `setTimeout` to ensure that `setValue` is called after the\n * view (and potentially child directives) has been initialized,\n * especially relevant if `writeValue` is called early in the component lifecycle.\n * @param value - The new value to write.\n */\n writeValue(value: string): void {\n this.value.set(value || '');\n // Use setTimeout to ensure directives like PasswordDirective or NumberFormatDirective\n // are initialized and ready to receive the value, especially during component init.\n setTimeout(() => {\n this.setValue();\n });\n }\n\n /**\n * Registers a callback function that should be called when the\n * control's value changes in the UI. (ControlValueAccessor)\n * @param fn - The callback function to register.\n */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /**\n * Registers a callback function that should be called when the\n * control receives a blur event. (ControlValueAccessor)\n * @param fn - The callback function to register.\n */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /**\n * This function is called by the Forms API when the control's disabled\n * state changes. (ControlValueAccessor)\n * @param isDisabled - True if the control should be disabled, false otherwise.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n /**\n * Called when the input element loses focus (blur event).\n * Triggers the `onTouched` callback to notify Angular Forms that the\n * input has been interacted with.\n */\n onBlur(): void {\n this.onTouched();\n }\n\n /**\n * Resets the input field's value to an empty string.\n * Notifies Angular Forms of the change and updates the view.\n */\n reset(): void {\n this.value.set('');\n this.onChange(''); // Notify form control of the change\n this.setValue(); // Update the actual input element\n }\n\n /**\n * Represents the base list of options available for the dropdown.\n * This is an input signal, meaning its value can be set from a parent component.\n * @type {Signal<string[]>}\n */\n dropdownOptions = input<string[]>([]);\n\n /**\n * A computed signal that provides the current list of options to display in the dropdown.\n *\n * If `search` is `false`, it returns the full `dropdownOptions`.\n * If `search` is `true`, it filters `dropdownOptions` based on the `value` signal,\n * performing a case-insensitive partial text match.\n *\n * @type {Signal<string[]>}\n */\n options = computed(() => {\n if (!this.config().search) {\n return this.dropdownOptions();\n }\n\n const searchValue = this.value();\n const filteredOptions = this.dropdownOptions().filter((option) =>\n option.toLowerCase().includes(searchValue.toLowerCase())\n );\n if (filteredOptions.length > 0) {\n return filteredOptions;\n }\n\n return [];\n });\n\n /**\n * Formats an option for the dropdown by highlighting the search value if it exists in the option.\n * @param option - The option to format.\n * @returns The formatted option.\n */\n formatOption(option: string): string {\n if (!this.config().search) {\n return option;\n }\n\n const searchValue = this.value();\n\n if (!searchValue || searchValue.trim() === '') {\n return option;\n }\n\n const escapedSearchValue = searchValue.replace(\n /[.*+?^${}()|[\\]\\\\]/g,\n '\\\\$&'\n );\n\n const regex = new RegExp(escapedSearchValue, 'gi');\n\n if (option.toLowerCase().includes(searchValue.toLowerCase())) {\n return option.replace(regex, '<span class=\"highlight\" >$&</span>');\n }\n\n return option;\n }\n\n /**\n * Handles when an option is selected from the dropdown.\n * @param option - The selected option.\n * @param event - The MouseEvent that initiated the selection action.\n */\n handleOption(option: string, event: MouseEvent) {\n this.focus(event);\n this.value.set(option);\n this.onChange(option);\n this.setValue();\n this.dropdown.close();\n }\n}\n","@let valid = ngControl?.valid && ngControl?.touched && ngControl?.dirty; @let\ninvalid = ngControl?.invalid && ngControl?.touched && ngControl?.dirty; @let\ntype = config().type; @let icon = config().icon; @let alignment =\nconfig().alignment; @let inverse = config().inverse; @let name = config().name;\n@let required = config().required; @let reveal = config().reveal; @let password\n= type === 'password'; @let number = type === 'number'; @let ariaLabel = type\n=== 'password' ? 'Password' : config().name; @let hasDropdown =\nconfig().dropdown;\n\n<div\n class=\"app-input-container\"\n [class]=\"{\n 'has-error': invalid,\n 'has-valid': valid,\n 'has-icon': icon,\n 'has-password': password,\n 'has-visible': password && visible(),\n 'has-number': number,\n 'has-right': alignment === 'right',\n inverse: inverse,\n 'has-dropdown': hasDropdown\n }\"\n ngbDropdown\n [autoClose]=\"'outside'\"\n #dropdown=\"ngbDropdown\"\n>\n @if (config().icon && !password && !number) {\n <div class=\"icon-container\" (mousedown)=\"focus($event)\">\n <svg-icon class=\"icon\" name=\"{{ icon }}\"></svg-icon>\n <div class=\"separator\"></div>\n </div>\n } @if (password){\n <div class=\"icon-container\" (mousedown)=\"toggleVisibility($event)\">\n <div class=\"password-icons\">\n <svg-icon class=\"icon password-key\" name=\"password-key\"></svg-icon>\n <svg-icon class=\"icon password-shown\" name=\"password-shown\"></svg-icon>\n <svg-icon class=\"icon password-hidden\" name=\"password-hidden\"></svg-icon>\n </div>\n <div class=\"separator\"></div>\n </div>\n }\n\n <input\n class=\"app-input\"\n [type]=\"'text'\"\n [name]=\"name\"\n [required]=\"required\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabel\"\n placeholder=\"\"\n autocomplete=\"off\"\n #inputRef\n [appPassword]=\"password\"\n [reveal]=\"reveal || 0\"\n [visible]=\"visible()\"\n [appNumberFormat]=\"number\"\n (focus)=\"hasDropdown && dropdown.open()\"\n (click)=\"hasDropdown && dropdown.open()\"\n ngbDropdownAnchor\n />\n <label class=\"app-input-label\">\n {{ name }}\n </label>\n @if(number){\n <div class=\"number-container\">\n <div class=\"number-buttons\">\n <div class=\"separator\"></div>\n <svg-icon\n name=\"plus\"\n class=\"bg-icon plus-icon\"\n (mousedown)=\"increment($event)\"\n ></svg-icon>\n <svg-icon\n name=\"minus\"\n class=\"bg-icon minus-icon\"\n (mousedown)=\"decrement($event)\"\n ></svg-icon>\n </div>\n </div>\n }\n <svg-icon name=\"checkmark\" class=\"app-input-icon positive-icon\"></svg-icon>\n <svg-icon name=\"warning\" class=\"app-input-icon warning-icon\"></svg-icon>\n <div class=\"app-input-error\">\n @if (invalid) { @for (error of ngControl?.errors | errorMessage ; track\n $index) {\n {{ error }}\n } }\n </div>\n <button\n type=\"button\"\n class=\"app-input-icon cancel-icon bg-icon\"\n (click)=\"reset()\"\n [tabIndex]=\"-1\"\n >\n <svg-icon name=\"cancel\"></svg-icon>\n </button>\n @if(hasDropdown) {\n <div class=\"dropdown-menu\" ngbDropdownMenu>\n @if (!options().length) {\n <p class=\"dropdown-item no-results\">No results</p>\n } @for(option of options(); track $index ){\n <button\n class=\"dropdown-item\"\n (click)=\"handleOption(option, $event)\"\n [class]=\"{\n 'selected': value() === option,\n }\"\n >\n <p [innerHTML]=\"formatOption(option)\"></p>\n <svg-icon name=\"checkmark\" class=\"dropdown-item-icon\"></svg-icon>\n </button>\n }\n </div>\n <div class=\"icon-container\">\n <svg-icon name=\"arrow-down\" class=\"dropdown-icon icon\"></svg-icon>\n </div>\n }\n</div>\n","// src/app/bytes-to-human-readable.pipe.ts\n\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bytesToHumanReadable',\n})\nexport class BytesToHumanReadablePipe implements PipeTransform {\n transform(bytes: number | null | undefined, precision: number = 2): string {\n if (bytes === null || bytes === undefined || isNaN(bytes)) {\n return '';\n }\n\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n const units = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n\n const unitIndex = Math.min(i, units.length - 1);\n\n const value = bytes / Math.pow(1024, unitIndex);\n\n const formattedValue = parseFloat(value.toFixed(precision));\n\n return `${formattedValue} ${units[unitIndex]}`;\n }\n}","import { Component, ElementRef, input, output, signal, ViewChild } from '@angular/core';\nimport { SvgIconComponent } from 'angular-svg-icon';\nimport { AppFile } from '../../models/appFile.model';\nimport { BytesToHumanReadablePipe } from '../../pipes/bytes-to-human-readable.pipe';\n/**\n * This component displays a preview of a document, including its name, size,\n * and provides actions to delete, download, and tag the document.\n */\n@Component({\n selector: 'app-document-preview',\n imports: [SvgIconComponent, BytesToHumanReadablePipe],\n templateUrl: './document-preview.component.html',\n styleUrl: './document-preview.component.scss',\n})\nexport class DocumentPreviewComponent {\n\n showDeleteModal = signal<boolean>(false);\n /**\n * The application file to be displayed in the preview. This is a required input.\n * @type {InputSignal<AppFile>}\n */\n file = input.required<AppFile>();\n /**\n * An output event that emits the file name when the delete action is triggered.\n * @type {OutputEmitterRef<string>}\n */\n onDelete = output<string>();\n\n /**\n * An output event that emits the file name when the download action is triggered.\n * @type {OutputEmitterRef<string>}\n */\n onDownload = output<string>();\n\n /**\n * Handles the delete action. Emits the `fileName` of the current `file` via the `onDelete` output.\n */\n handleDelete() {\n this.showDeleteModal.set(true);\n }\n\n /**\n * Handles the download action. Emits the `fileName` of the current `file` via the `onDownload` output.\n */\n handleDownload() {\n this.onDownload.emit(this.file().fileName);\n }\n\n /**\n * Handles the tag action. Currently, it logs a message to the console.\n * A \"TODO\" indicates that further logic for tagging needs to be implemented here.\n */\n handleTag() {\n console.log('Tag event');\n // TODO: Add tag logic\n }\n\n cancelDelete() {\n this.showDeleteModal.set(false);\n }\n\n confirmDelete()\n {\n this.onDelete.emit(this.file().fileName);\n this.showDeleteModal.set(false);\n }\n \n}","@let fileType = file().type; @let documentName = file().baseName; @let fileSize\n= file().size; @let pdf = fileType === 'pdf'; @let video = ['avi', 'mp4',\n'mov'].includes(fileType); @let image = ['jpg', 'png', 'jpeg',\n'gif'].includes(fileType); @let pageCount = file().pageCount; @let\nimagePreviewUrl = file().imagePreviewUrl;\n\n<div class=\"document\" [class.noTouch]=\"showDeleteModal()\"> \n <div class=\"document-image-container\">\n <img src=\"{{ imagePreviewUrl }}\" class=\"document-image\" />\n <div class=\"badge-tag-container\">\n <div class=\"badges\">\n <p class=\"tag\">No Tag</p>\n </div>\n <div class=\"badges\">\n <p\n class=\"badge file-type\"\n [class]=\"{\n pdf: pdf,\n video: video,\n image: image\n }\"\n >\n {{ fileType }}\n </p>\n <p class=\"badge\">\n @if(pdf && pageCount) {\n <span>{{ pageCount }} p.</span>\n }\n <span class=\"file-size\"> {{ fileSize | bytesToHumanReadable }}</span>\n </p>\n </div>\n </div>\n </div>\n <p class=\"document-name\">\n {{ documentName }}\n </p>\n <div class=\"document-actions\">\n <div class=\"document-actions-container\">\n <button class=\"document-actions-button\" (click)=\"handleTag()\">\n <svg-icon name=\"label\" class=\"icon\"></svg-icon>\n </button>\n </div>\n <div class=\"document-actions-container\">\n <button class=\"document-actions-button\" (click)=\"handleDownload()\">\n <svg-icon name=\"download\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button\" (click)=\"handleDelete()\">\n <svg-icon name=\"delete\" class=\"icon\"></svg-icon>\n </button>\n </div>\n </div>\n <div class=\"delete-modal\">\n <div class=\"modal-buttons\">\n <button class=\"delete-button\" (click)=\"confirmDelete()\">Delete</button>\n <button class=\"cancel-button\" (click)=\"cancelDelete()\">Cancel</button>\n </div>\n </div>\n</div>\n\n\n","import { Injectable } from '@angular/core';\nimport * as pdfjsLib from 'pdfjs-dist';\nimport { FileExtension } from '../models/appFile.model';\n\npdfjsLib.GlobalWorkerOptions.workerSrc = '/pdfjs/pdf.worker.min.mjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DocumentService {\n /**\n * Generates a data URL thumbnail for a given file.\n * Handles PDFs, videos, and images.\n * @param file The file to generate a thumbnail for.\n * @returns A promise that resolves to a data URL string for the thumbnail.\n */\n async generateThumbnail(file: File): Promise<string> {\n const extension: FileExtension = file.name.split('.').pop()?.toLowerCase() as FileExtension;\n\n switch (extension) {\n case 'pdf':\n try {\n return await this.generatePdfThumbnail(file);\n } catch (error) {\n console.error('Error generating PDF thumbnail:', error);\n return '/assets/exampledoc.png';\n }\n case 'mp4':\n case 'mov':\n case 'avi':\n try {\n return await this.generateVideoThumbnail(file);\n } catch (error) {\n console.error('Error generating video thumbnail:', error);\n return '/assets/truck.png';\n }\n case 'jpg':\n case 'jpeg':\n case 'png':\n case 'gif':\n return URL.createObjectURL(file);\n default:\n return '/assets/exampledoc.png';\n }\n }\n\n private generatePdfThumbnail(file: Blob): Promise<string> {\n const fileReader = new FileReader();\n return new Promise<string>((resolve, reject) => {\n fileReader.onload = async () => {\n const typedArray = new Uint8Array(fileReader.result as ArrayBuffer);\n try {\n const pdf = await pdfjsLib.getDocument(typedArray).promise;\n const page = await pdf.getPage(1);\n const viewport = page.getViewport({ scale: 1 });\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n const desiredWidth = 280;\n const scale = desiredWidth / viewport.width;\n const scaledViewport = page.getViewport({ scale });\n canvas.height = scaledViewport.height;\n canvas.width = scaledViewport.width;\n\n if (!context) {\n return reject('Could not get canvas context');\n }\n\n await page.render({ canvasContext: context, viewport: scaledViewport })\n .promise;\n resolve(canvas.toDataURL('image/png'));\n } catch (error) {\n reject(error);\n }\n };\n fileReader.onerror = () => reject(fileReader.error);\n fileReader.readAsArrayBuffer(file);\n });\n }\n\n private generateVideoThumbnail(file: Blob): Promise<string> {\n return new Promise((resolve, reject) => {\n const video = document.createElement('video');\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n\n video.autoplay = true;\n video.muted = true;\n video.src = URL.createObjectURL(file);\n\n video.onloadeddata = () => {\n video.currentTime = Math.min(0.1, video.duration / 2);\n };\n\n video.onseeked = () => {\n const desiredWidth = 280;\n const scale = desiredWidth / video.videoWidth;\n canvas.width = desiredWidth;\n canvas.height = video.videoHeight * scale;\n\n if (context) {\n context.drawImage(video, 0, 0, canvas.width, canvas.height);\n video.pause();\n URL.revokeObjectURL(video.src);\n resolve(canvas.toDataURL('image/png'));\n } else {\n reject('Could not get canvas context for video thumbnail');\n }\n };\n\n video.onerror = (e) => {\n URL.revokeObjectURL(video.src);\n reject('Error loading video for thumbnail: ' + e);\n };\n });\n }\n\n /**\n * Reads a PDF file and returns the total number of pages.\n *\n * @param file The PDF Blob or File.\n * @returns A promise that resolves to the page count (number).\n * @throws If the file is not a valid PDF or an error occurs during processing.\n */\n async getPdfPageCount(file: Blob): Promise<number> {\n const fileReader = new FileReader();\n\n return new Promise<number>((resolve, reject) => {\n fileReader.onload = async () => {\n const typedArray = new Uint8Array(fileReader.result as ArrayBuffer);\n try {\n const pdf = await pdfjsLib.getDocument(typedArray).promise;\n resolve(pdf.numPages);\n } catch (error) {\n console.error('Error getting PDF page count:', error);\n reject(new Error('Failed to load PDF or get page count.'));\n }\n };\n fileReader.onerror = () => {\n reject(new Error('FileReader error during PDF page count operation.'));\n };\n fileReader.readAsArrayBuffer(file);\n });\n }\n}","import {\n Component,\n ElementRef,\n signal,\n ViewChild,\n inject,\n computed,\n input,\n} from '@angular/core';\nimport { SvgIconComponent } from 'angular-svg-icon';\nimport { DocumentPreviewComponent } from '../document-preview/document-preview.component';\nimport { AppFile, FileExtension } from '../../models/appFile.model';\nimport { DocumentService } from '../../services/document.service';\n\n/**\n * A component that provides a user interface for file uploading via\n * drag-and-drop or a file input dialog. It displays previews of the\n * selected files in a carousel.\n */\n@Component({\n selector: 'app-drop-zone',\n imports: [SvgIconComponent, DocumentPreviewComponent],\n templateUrl: './drop-zone.component.html',\n styleUrl: './drop-zone.component.scss',\n})\nexport class DropZoneComponent {\n /**\n * Injects the DocumentService for file processing tasks like\n * thumbnail generation and PDF page counting.\n * @private\n */\n private documentService = inject(DocumentService);\n\n /**\n * An array of file extensions that should be excluded from the supported list.\n * @defaultValue `[]` (an empty array)\n * @type {FileExtension[]}\n */\n excludedFileTypes = input<FileExtension[]>([]);\n\n /**\n * The base array of all file extensions that are generally allowed.\n * Supported file types will be derived from this list, after excluding\n * any types specified in `excludedFileTypes`.\n *\n * @defaultValue `['avi', 'mov', 'mp4', 'pdf', 'gif', 'png', 'jpg', 'jpeg']`\n * @type {FileExtension[]}\n */\n fileTypes = input<FileExtension[]>([\n 'pdf',\n 'png',\n 'jpg',\n 'jpeg',\n 'gif',\n 'avi',\n 'mov',\n 'mp4',\n ]);\n\n /**\n * A computed signal that derives the list of currently supported file extensions.\n * It filters the base `fileTypes` array, removing any extensions present\n * in the `excludedFileTypes` input.\n */\n supportedFileTypes = computed(() => [\n ...this.fileTypes().filter(\n (type) => !this.excludedFileTypes().includes(type)\n ),\n ]);\n\n /**\n * A signal that holds an array of `AppFile` objects representing the files\n * that have been selected or dropped by the user.\n */\n docs = signal<AppFile[]>([]);\n\n /**\n * A signal that acts as a boolean flag. It is set to `true` when the user\n * attempts to upload a file with an unsupported extension.\n */\n unsupported = signal(false);\n\n /**\n * Handles the 'change' event from the hidden file input. It extracts the\n * selected files and passes them to the `processFiles` method.\n * @param event The `Event` object from the file input element.\n */\n onInput(event: Event) {\n const target = event.target as HTMLInputElement;\n const files = target.files as FileList;\n this.processFiles(files);\n }\n\n /**\n * Handles the 'drop' event on the component. It prevents the browser's\n * default file handling, extracts the dropped files, and passes them to\n * the `processFiles` method.\n * @param event The `DragEvent` object containing the dropped files.\n */\n onDrop(event: DragEvent) {\n event.preventDefault();\n const files = event.dataTransfer?.files as FileList;\n this.processFiles(files);\n }\n\n /**\n * Asynchronously processes a list of files. For each file, it validates\n * the extension against `supportedFileTypes`. If valid, it generates a\n * thumbnail, counts pages for PDFs, creates an `AppFile` object, and adds\n * it to the `docs` signal. If any file is unsupported, the `unsupported`\n * flag is set.\n * @param files The `FileList` object to be processed.\n */\n async processFiles(files: FileList) {\n this.unsupported.set(false);\n\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const fileExtension = file.name.split('.').pop()?.toLowerCase();\n\n if (\n !fileExtension ||\n !this.supportedFileTypes().includes(fileExtension as FileExtension)\n ) {\n this.unsupported.set(true);\n continue;\n }\n\n let pageCount: number | undefined;\n\n if (fileExtension === 'pdf') {\n try {\n pageCount = await this.documentService.getPdfPageCount(file);\n } catch (error) {\n console.error(`Failed to get page count for ${file.name}:`, error);\n }\n }\n\n const imagePreviewUrl = await this.documentService.generateThumbnail(\n file\n );\n\n const filePreview: AppFile = {\n fileName: file.name,\n baseName: file.name.split('.').slice(0, -1).join('.'),\n type: fileExtension as FileExtension,\n size: file.size,\n imagePreviewUrl: imagePreviewUrl,\n file: file,\n pageCount: pageCount,\n };\n\n this.docs.update((docs) => [...docs, filePreview]);\n\n if (this.docs().length > 2) {\n this.carouselIndex.set(this.docs().length - 2);\n }\n }\n }\n\n /**\n * Handles the download action for a specific file.\n * Note: This is a placeholder and currently only logs the file name.\n * @param fileName The name of the file to be downloaded.\n */\n handleDownload(fileName: string) {\n console.log(fileName);\n }\n\n /**\n * A ViewChild reference to the native `<input type='file'>` element.\n * Used to programmatically trigger the file selection dialog.\n */\n @ViewChild('inputRef') inputRef!: ElementRef<HTMLInputElement>;\n\n /**\n * Resets the component's state after an unsupported file type error\n * by setting the `unsupported` signal to `false`.\n */\n cancel() {\n this.unsupported.set(false);\n }\n\n /**\n * Programmatically triggers a click on the hidden file input element,\n * which opens the system's file selection dialog.\n */\n handleClickToAdd() {\n this.inputRef.nativeElement.click();\n }\n\n /**\n * Deletes a file from the preview list. It filters the `docs` array to\n * remove the specified file and adjusts the carousel position.\n * @param fileName The name of the file to be deleted.\n */\n handleDelete(fileName: string) {\n this.carouselLeft();\n\n this.docs.set(this.docs().filter((doc) => doc.fileName !== fileName));\n\n if (this.docs().length === 0) {\n this.unsupported.set(false);\n }\n }\n\n // Carousel logic\n\n /**\n * A signal that stores the current index for the file preview carousel.\n * This determines which part of the carousel is visible.\n */\n carouselIndex = signal(0);\n\n /**\n * A computed signal that calculates the CSS `translateX` value for the\n * carousel container. This creates the sliding effect based on the\n * `carouselIndex`.\n */\n carouselTransform = computed(() => {\n const offset = (148 + 6) * this.carouselIndex() * -1; // 148px width + 6px gap\n return `translateX(${offset}px)`;\n });\n\n /**\n * Navigates the carousel one step to the left by decrementing the\n * `carouselIndex`. The index will not go below 0.\n */\n carouselLeft() {\n this.carouselIndex.update((i) => Math.max(0, i - 1));\n }\n\n /**\n * Navigates the carousel one step to the right by incrementing the\n * `carouselIndex`. The index will not exceed the maximum possible value\n * based on the number of documents.\n */\n carouselRight() {\n const maxIndex = Math.max(0, this.docs().length - 2);\n this.carouselIndex.update((i) => Math.min(maxIndex, i + 1));\n }\n}\n","@let docCount = docs().length;\n\n<div class=\"container\">\n <!-- Carousel -->\n @if(docCount > 0) {\n <div class=\"docs\">\n <div class=\"doc-container\" [style.transform]=\"carouselTransform()\">\n @for (doc of docs(); track $index) {\n <app-document-preview\n class=\"doc\"\n [file]=\"doc\"\n (onDelete)=\"handleDelete($event)\"\n (onDownload)=\"handleDownload($event)\"\n ></app-document-preview>\n }\n </div>\n @if(docCount > 2) {\n <button class=\"carousel-button carousel-left\" (click)=\"carouselLeft()\">\n <svg-icon name=\"arrow-left\" class=\"arrow\"></svg-icon>\n </button>\n <button class=\"carousel-button carousel-right\" (click)=\"carouselRight()\">\n <svg-icon name=\"arrow-right\" class=\"arrow\"></svg-icon>\n </button>\n }\n </div>\n }\n\n <!-- Drop Zone -->\n <div\n class=\"drop-zone-container\"\n (drop)=\"onDrop($event)\"\n (dragover)=\"$event.preventDefault()\"\n [class]=\"{\n 'more-docs': docCount >= 2,\n unsupported: unsupported()\n }\"\n >\n <!-- Drop Zone -->\n <div class=\"drop-zone\" (click)=\"handleClickToAdd()\">\n <svg-icon name=\"drop-zone\" class=\"illustration\"></svg-icon>\n <div class=\"drop-zone-text\">\n <p class=\"heading\">\n DRAG FILES @if (docCount < 1) {\n <span>HERE</span>\n }\n </p>\n <p class=\"subtext\">OR CLICK TO ADD</p>\n </div>\n <input\n type=\"file\"\n aria-hidden=\"true\"\n multiple\n class=\"drop-zone-input\"\n #inputRef\n (input)=\"onInput($event)\"\n />\n </div>\n\n <!-- Drop Zone Error -->\n <div class=\"drop-zone-error\">\n <div class=\"drop-zone-text\">\n <p class=\"heading invalid\">INVALID FILE TYPE</p>\n <p class=\"subtext\">SUPPORTED FORMATS</p>\n </div>\n <div class=\"file-types\">\n @for (type of supportedFileTypes(); track $index) {\n <p\n class=\"badge\"\n [class]=\"{\n pdf: type === 'pdf',\n video: ['avi', 'mp4', 'mov'].includes(type),\n image: ['jpg', 'png', 'jpeg', 'gif'].includes(type)\n }\"\n >\n {{ type }}\n </p>\n }\n </div>\n <button class=\"cancel-button\">\n <svg-icon name=\"cancel\" (click)=\"cancel()\"></svg-icon>\n </button>\n </div>\n </div>\n</div>\n","/*\n * Public API Surface of ca-components\n */\n\nexport * from './app/components/input/input.component';\nexport * from './app/components/drop-zone/drop-zone.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAKa,gBAAgB,CAAA;AAC3B,IAAA,SAAS,CAAC,KAAa,EAAA;AACrB,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,EAAE;AAErB,QAAA,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACvB,YAAA,MAAM,CAAC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,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,i6EAoFA,ED/DY,MAAA,EAAA,CAAA,g3EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,gBAAgB,kLAAE,wBAAwB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIzC,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAChB,OAAA,EAAA,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,EAAA,QAAA,EAAA,i6EAAA,EAAA,MAAA,EAAA,CAAA,g3EAAA,CAAA,EAAA;8BAwJ9B,QAAQ,EAAA,CAAA;sBAA9B,SAAS;uBAAC,UAAU;;;AE7KvB;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"carriera-intern-components.mjs","sources":["../../../projects/carriera-intern-components/src/app/pipes/number-format.pipe.ts","../../../projects/carriera-intern-components/src/app/pipes/error-message.pipe.ts","../../../projects/carriera-intern-components/src/app/directives/password.directive.ts","../../../projects/carriera-intern-components/src/app/directives/number-format.directive.ts","../../../projects/carriera-intern-components/src/app/components/input/input.component.ts","../../../projects/carriera-intern-components/src/app/components/input/input.component.html","../../../projects/carriera-intern-components/src/app/pipes/bytes-to-human-readable.pipe.ts","../../../projects/carriera-intern-components/src/app/components/document-preview/document-preview.component.ts","../../../projects/carriera-intern-components/src/app/components/document-preview/document-preview.component.html","../../../projects/carriera-intern-components/src/app/services/document.service.ts","../../../projects/carriera-intern-components/src/app/components/drop-zone/drop-zone.component.ts","../../../projects/carriera-intern-components/src/app/components/drop-zone/drop-zone.component.html","../../../projects/carriera-intern-components/src/public-api.ts","../../../projects/carriera-intern-components/src/carriera-intern-components.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'numberFormat',\n})\nexport class NumberFormatPipe implements PipeTransform {\n transform(value: string): string {\n if (!value) return '';\n\n if (value.includes('.')) {\n const [integerPart, decimalPart] = value.split('.');\n \n // Cap decimal places to maximum 2\n const cappedDecimalPart = decimalPart ? decimalPart.substring(0, 2) : '';\n \n // Format the integer part with commas\n const formattedInteger = integerPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n \n // If there's a decimal part, show it (capped at 2 places)\n if (decimalPart !== undefined) {\n return `${formattedInteger}.${cappedDecimalPart}`;\n }\n \n // If user just typed a decimal point, show it\n return `${formattedInteger}.`;\n }\n\n return value.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ValidationErrors } from '@angular/forms';\nimport { NumberFormatPipe } from './number-format.pipe';\n\n@Pipe({\n name: 'errorMessage'\n})\nexport class ErrorMessagePipe implements PipeTransform {\n numberFormatPipe = new NumberFormatPipe();\n\n transform(errors: ValidationErrors | null | undefined): string[] {\n if (!errors) return [];\n\n const messages: Record<string, (value?: any) => string> = {\n required: () => 'Required',\n minlength: (value: any) => `Minimum length is ${value.requiredLength}`,\n maxlength: (value: any) => `Maximum length is ${value.requiredLength}`,\n min: (value: any) => `Minimum value is ${this.numberFormatPipe.transform(String(value.min))}` ,\n max: (value: any) => `Maximum value is ${this.numberFormatPipe.transform(String(value.max))}` ,\n email: () => 'Invalid email format',\n pattern: () => 'Invalid format',\n };\n\n return Object.entries(errors).map(([key, value]) => {\n const getMessage = messages[key];\n return getMessage ? getMessage(value) : 'Invalid field.';\n });\n }\n\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n input,\n OnInit,\n} from '@angular/core';\n\n@Directive({\n selector: '[appPassword]',\n})\nexport class PasswordDirective implements OnInit {\n /**\n * Input property to enable or disable the password masking behavior.\n */\n appPassword = input<boolean>(true);\n\n /**\n * Input property to hide or show the password\n */\n visible = input<boolean>(false);\n\n /**\n * Input property to specify how many characters from the end of the\n * password should be revealed. Defaults to 0 (fully masked).\n */\n reveal = input<number>(0);\n\n /**\n * Stores the actual, unmasked password value,\n * while the input element displays a masked version.\n */\n private realValue: string = '';\n\n constructor(private el: ElementRef<HTMLInputElement>) {}\n\n /**\n * Lifecycle hook called after Angular initializes the directive's data-bound properties.\n * If password masking is enabled, it sets up the initial masking.\n */\n ngOnInit(): void {\n if (this.appPassword()) {\n this.setupPasswordMasking();\n }\n }\n\n /**\n * Sets up the initial state for password masking.\n * It reads the initial value from the input (if any) as the `realValue`\n * and then updates the input's display to show the masked version.\n */\n private setupPasswordMasking(): void {\n const input = this.el.nativeElement;\n this.realValue = input.value || ''; // Assume initial value is unmasked or is the real one\n this.updateDisplayValue();\n }\n\n /**\n * HostListener for the 'input' event on the host element.\n * This is the core logic for synchronizing `realValue` with user input\n * on the masked field. It infers changes to `realValue`\n * based on `event.data`, cursor position, and the difference in length\n * between the input's current display value and the previous `realValue`.\n * @param event - The InputEvent object.\n */\n @HostListener('input', ['$event'])\n onInput(event: InputEvent): void {\n if (!this.appPassword()) return;\n\n const input = this.el.nativeElement; // Using el.nativeElement as in original code\n const cursorPosition = input.selectionStart || 0;\n const displayValue = input.value; // Value after browser's immediate processing of input\n\n // Calculate difference from the *previous* realValue length\n const lengthDiff = displayValue.length - this.realValue.length;\n\n if (event.data && lengthDiff <= 0) {\n // Text replacement or complex change: e.g., typing over a selection.\n // `event.data` contains the newly typed character(s).\n // `lengthDiff` helps determine how many characters were replaced.\n const deletedCount = Math.abs(lengthDiff) + event.data.length;\n const replaceStart = cursorPosition - event.data.length;\n\n this.realValue =\n this.realValue.slice(0, Math.max(0, replaceStart)) + // Ensure replaceStart isn't negative\n event.data +\n this.realValue.slice(Math.max(0, replaceStart) + deletedCount);\n } else if (lengthDiff > 0) {\n // Pure addition of characters (typing without prior selection, or pasting).\n // `event.data` contains the added character(s), or we infer from displayValue.\n const addedChars =\n event.data ||\n displayValue.slice(cursorPosition - lengthDiff, cursorPosition);\n const insertPosition = cursorPosition - addedChars.length;\n this.realValue =\n this.realValue.slice(0, Math.max(0, insertPosition)) +\n addedChars +\n this.realValue.slice(Math.max(0, insertPosition));\n } else if (lengthDiff < 0) {\n // Pure deletion (e.g., Backspace, Delete key).\n // `event.data` is null for these operations.\n const deletedCount = Math.abs(lengthDiff);\n // `cursorPosition` is where the cursor is *after* deletion.\n // The deletion happened *before* this `cursorPosition`.\n this.realValue =\n this.realValue.slice(0, cursorPosition) +\n this.realValue.slice(cursorPosition + deletedCount);\n }\n // If lengthDiff is 0 and no event.data (e.g. moving cursor with arrow keys inside text), realValue should not change.\n // The current logic handles this as no branch is taken.\n\n this.updateDisplayValue();\n this.setCursorPosition(cursorPosition); // Restore cursor as displayValue changed\n this.dispatchRealValueChange();\n }\n\n /**\n * HostListener for the 'cut' event.\n * Prevents default cut behavior to operate on `realValue`.\n * It copies the corresponding part of `realValue` to the clipboard\n * and updates `realValue` and the display.\n * @param event - The ClipboardEvent object.\n */\n @HostListener('cut', ['$event'])\n onCut(event: ClipboardEvent): void {\n if (!this.appPassword()) return;\n\n const input = this.el.nativeElement;\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n\n if (start !== end) {\n // If there's a selection\n event.preventDefault(); // Prevent default cut action\n const cutText = this.realValue.slice(start, end); // Cut from realValue\n event.clipboardData?.setData('text/plain', cutText);\n\n this.realValue =\n this.realValue.slice(0, start) + this.realValue.slice(end);\n\n this.updateDisplayValue();\n this.setCursorPosition(start); // Set cursor to the start of the cut area\n this.dispatchRealValueChange();\n }\n }\n\n /**\n * HostListener for the 'copy' event.\n * Prevents default copy behavior to ensure the unmasked `realValue` segment is copied.\n * @param event - The ClipboardEvent object.\n */\n @HostListener('copy', ['$event'])\n onCopy(event: ClipboardEvent): void {\n if (!this.appPassword()) return;\n\n const input = this.el.nativeElement;\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n\n if (start !== end) {\n // If there's a selection\n event.preventDefault(); // Prevent default copy action\n const copiedText = this.realValue.slice(start, end); // Copy from realValue\n event.clipboardData?.setData('text/plain', copiedText);\n }\n }\n\n /**\n * Updates the input element's display value with a masked version of `realValue`.\n * Uses '•' for masked characters. Respects the `reveal` input to show\n * a specified number of characters from the end of the password.\n * This method is responsible for creating the visual masking.\n */\n private updateDisplayValue(): void {\n if (this.visible()) {\n this.el.nativeElement.value = this.realValue;\n return;\n }\n\n const revealCount = this.reveal();\n const realLength = this.realValue.length;\n let displayValue = '';\n\n if (revealCount > 0 && realLength > revealCount) {\n const actualRevealCount = Math.min(revealCount, realLength);\n // Calculate how many characters to mask\n const maskedCharsCount = realLength - actualRevealCount;\n\n if (maskedCharsCount > 0) {\n // Get the part of the real value that should be revealed\n const revealedPart = this.realValue.slice(maskedCharsCount); // Corrected from slice(realLength - actualRevealCount)\n displayValue = '•'.repeat(maskedCharsCount) + revealedPart;\n } else {\n // If all characters are to be revealed (revealCount >= realLength)\n displayValue = this.realValue;\n }\n } else {\n // Fully mask if revealCount is 0 or realValue is lesser than revealCount\n displayValue = '•'.repeat(realLength);\n }\n\n this.el.nativeElement.value = displayValue;\n }\n\n /**\n * Sets the cursor position within the input field.\n * This is crucial after `updateDisplayValue` changes the entire input value,\n * to maintain a natural cursor behavior for the user.\n * Uses `setTimeout` to ensure the operation occurs after Angular's view update.\n * @param position - The desired cursor position.\n */\n private setCursorPosition(position: number): void {\n const input = this.el.nativeElement;\n // setTimeout ensures this runs after the current browser rendering tick\n setTimeout(() => {\n // Clamp position to be within the bounds of the current display value's length\n const currentLength = input.value.length;\n const newPosition = Math.max(0, Math.min(position, currentLength));\n input.setSelectionRange(newPosition, newPosition);\n }, 0);\n }\n\n /**\n * Dispatches a custom event named 'realValueChange' from the host element.\n * The event's `detail` property contains the unmasked `realValue`.\n * This allows parent components (like your `InputComponent`) to listen for\n * changes to the actual password.\n */\n private dispatchRealValueChange(): void {\n const customEvent = new CustomEvent('realValueChange', {\n bubbles: true, // Allows event to bubble up the DOM\n composed: true, // Allows event to cross Shadow DOM boundaries\n detail: this.realValue,\n });\n this.el.nativeElement.dispatchEvent(customEvent);\n }\n\n /**\n * Public method to get the current unmasked \"real\" password value.\n * @returns The real password value as a string.\n */\n getRealValue(): string {\n return this.realValue;\n }\n\n /**\n * Public method to set the \"real\" password value from outside the directive\n * (e.g., when the parent form control's value is changed programmatically).\n * It updates the internal `realValue` and then refreshes the masked display.\n * @param value - The new real password value to set.\n */\n setRealValue(value: string): void {\n this.realValue = value || '';\n this.updateDisplayValue();\n }\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n input,\n OnInit,\n} from '@angular/core';\nimport { NumberFormatPipe } from '../pipes/number-format.pipe';\n\n@Directive({\n selector: '[appNumberFormat]',\n providers: [NumberFormatPipe],\n})\nexport class NumberFormatDirective implements OnInit {\n /**\n * Input property to enable or disable the number formatting.\n * Defaults to true, meaning formatting is active by default.\n */\n appNumberFormat = input<boolean>(true);\n\n /**\n * Stores the unformatted, \"real\" numeric value of the input.\n * This is the value that should be used for calculations or form submissions,\n * as opposed to the formatted display value.\n */\n private realValue: string = '';\n\n constructor(private el: ElementRef<HTMLInputElement>) {}\n\n /**\n * Lifecycle hook that is called after Angular has initialized all data-bound\n * properties of a directive.\n * If number formatting is enabled, it sets up the initial formatting.\n */\n ngOnInit(): void {\n if (this.appNumberFormat()) {\n this.setupNumberFormatting();\n }\n }\n\n /**\n * Initializes the number formatting on the input element.\n * It extracts the initial numeric value from the input's current value\n * and then updates the display with the formatted version.\n */\n private setupNumberFormatting(): void {\n const input = this.el.nativeElement;\n // Extract numeric value from whatever might be in the input initially\n this.realValue = this.extractNumericValue(input.value || '');\n this.updateDisplayValue(); // Format and display it\n }\n\n /**\n * HostListener for the 'input' event on the host element.\n * This triggers whenever the user types or pastes content into the input.\n * It extracts the numeric value from the current input, updates the\n * display with the formatted number, moves the cursor to the end,\n * and dispatches a 'realValueChange' event with the unformatted numeric value.\n * @param event - The InputEvent object.\n */\n @HostListener('input', ['$event'])\n onInput(event: InputEvent): void {\n if (!this.appNumberFormat()) return; // Do nothing if formatting is disabled\n\n const input = this.el.nativeElement;\n const displayValue = input.value;\n\n this.realValue = this.extractNumericValue(displayValue);\n this.updateDisplayValue();\n this.setCursorToEnd(); // Important for UX after reformatting\n this.dispatchRealValueChange(); // Notify parent components of the raw value change\n }\n\n /**\n * HostListener for the 'cut' event.\n * Prevents the default cut behavior to manually handle the value change.\n * It reconstructs the value after the cut, extracts the numeric part,\n * updates the display, sets the cursor, and dispatches the real value.\n * @param event - The ClipboardEvent object.\n */\n @HostListener('cut', ['$event'])\n onCut(event: ClipboardEvent): void {\n if (!this.appNumberFormat()) return;\n\n const input = this.el.nativeElement;\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n\n if (start !== end) {\n // If there's a selection\n event.preventDefault(); // Prevent default cut\n const cutText = input.value.slice(start, end);\n event.clipboardData?.setData('text', this.extractNumericValue(cutText)); // Put numeric part on clipboard\n\n // Reconstruct value without the cut part\n const newValue = input.value.slice(0, start) + input.value.slice(end);\n this.realValue = this.extractNumericValue(newValue);\n\n this.updateDisplayValue();\n this.setCursorToEnd();\n this.dispatchRealValueChange();\n }\n }\n\n /**\n * HostListener for the 'copy' event.\n * Prevents the default copy behavior if there's a selection to ensure\n * that the copied text is the unformatted numeric value of the selection,\n * rather than the potentially formatted display text.\n * @param event - The ClipboardEvent object.\n */\n @HostListener('copy', ['$event'])\n onCopy(event: ClipboardEvent): void {\n if (!this.appNumberFormat()) return;\n\n const input = this.el.nativeElement;\n const start = input.selectionStart || 0;\n const end = input.selectionEnd || 0;\n\n if (start !== end) {\n // If there's a selection\n event.preventDefault(); // Prevent default copy\n const selectedText = input.value.slice(start, end);\n // Copy the underlying numeric value of the selection\n event.clipboardData?.setData(\n 'text',\n this.extractNumericValue(selectedText)\n );\n }\n }\n\n /**\n * HostListener for the 'keydown' event.\n * Filters key presses to allow only digits, a single decimal point,\n * and control keys (Backspace, Arrows, Tab, etc.).\n * This helps maintain a valid numeric input format before the 'input' event fires.\n * @param event - The KeyboardEvent object.\n */\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (!this.appNumberFormat()) return;\n\n const controlKeys = [\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Tab',\n 'Enter',\n 'Escape',\n 'Home',\n 'End',\n ];\n\n // Allow control keys, and modifier key combinations (Ctrl+A, Ctrl+C, etc.)\n if (\n controlKeys.includes(event.key) ||\n event.ctrlKey ||\n event.metaKey ||\n event.altKey\n ) {\n return; // Don't prevent default for these\n }\n\n // Allow a single decimal point if not already present in the realValue\n if (event.key === '.' && !this.realValue.includes('.')) {\n return;\n }\n\n // Prevent non-digit keys\n if (!/^\\d$/.test(event.key)) {\n event.preventDefault();\n }\n }\n\n /**\n * Extracts a clean numeric string from a given value.\n * It removes any non-digit characters except for a single decimal point.\n * It also ensures that there's only one decimal point and limits\n * the decimal part to two digits.\n * @param value - The string value to clean.\n * @returns A string representing the extracted numeric value.\n */\n private extractNumericValue(value: string): string {\n // Remove all non-digit characters except for the decimal point\n let cleanValue = value.replace(/[^\\d.]/g, '');\n\n // Handle multiple decimal points: keep only the first one\n const parts = cleanValue.split('.');\n if (parts.length > 1) {\n const integerPart = parts[0];\n const decimalPart = parts.slice(1).join(''); // Join back any subsequent parts\n cleanValue = `${integerPart}.${decimalPart}`;\n }\n\n // Limit decimal part to two digits\n if (cleanValue.includes('.')) {\n const [integerPart, decimalPart] = cleanValue.split('.');\n const cappedDecimalPart = decimalPart ? decimalPart.substring(0, 2) : '';\n cleanValue = `${integerPart}.${cappedDecimalPart}`;\n }\n\n return cleanValue;\n }\n\n /**\n * Updates the input element's display value with the formatted version\n * of the current `realValue`.\n * It uses the `NumberFormatPipe` for formatting.\n */\n private updateDisplayValue(): void {\n const input = this.el.nativeElement;\n const formattedValue = new NumberFormatPipe().transform(this.realValue);\n this.el.nativeElement.value = formattedValue;\n }\n\n /**\n * Sets the cursor position to the end of the input field.\n * This is typically called after the input value is reformatted to prevent\n * the cursor from jumping to an unexpected position.\n * Uses `setTimeout` to ensure the operation occurs after Angular's view update.\n */\n private setCursorToEnd(): void {\n const input = this.el.nativeElement;\n // setTimeout ensures this runs after the current browser rendering tick,\n // allowing the value to be fully set in the input before moving the cursor.\n setTimeout(() => {\n const length = input.value.length;\n input.setSelectionRange(length, length);\n }, 0);\n }\n\n /**\n * Dispatches a custom event named 'realValueChange' from the host element.\n * The event's `detail` property contains the unformatted `realValue`.\n * This allows parent components or other directives to listen for changes\n * to the underlying numeric value.\n */\n private dispatchRealValueChange(): void {\n const customEvent = new CustomEvent('realValueChange', {\n bubbles: true, // Allows event to bubble up the DOM\n composed: true, // Allows event to cross Shadow DOM boundaries\n detail: this.realValue,\n });\n this.el.nativeElement.dispatchEvent(customEvent);\n }\n\n /**\n * Public method to get the current unformatted \"real\" numeric value.\n * @returns The real numeric value as a string.\n */\n getRealValue(): string {\n return this.realValue;\n }\n\n /**\n * Public method to set the \"real\" numeric value from outside the directive.\n * It extracts the numeric part from the provided value and updates the\n * input's display with the formatted version.\n * @param value - The new value to set (can be formatted or unformatted).\n */\n setRealValue(value: string): void {\n this.realValue = this.extractNumericValue(value || '');\n this.updateDisplayValue();\n }\n}\n","import {\n Component,\n computed,\n ElementRef,\n HostListener,\n input,\n Optional,\n Self,\n signal,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { ErrorMessagePipe } from '../../pipes/error-message.pipe';\nimport { SvgIconComponent } from 'angular-svg-icon';\nimport { PasswordDirective } from '../../directives/password.directive';\nimport { NumberFormatDirective } from '../../directives/number-format.directive';\nimport { NgbDropdownModule, NgbPopover } from '@ng-bootstrap/ng-bootstrap';\nimport { CaiInputConfig } from './models/input.model';\n\n/**\n * A reusable input component that integrates with Angular Forms and supports\n * various input types, including text, password (with reveal functionality),\n * and numbers (with formatting and step controls). It also provides error\n * message display and icon support.\n */\n@Component({\n selector: 'app-input',\n imports: [\n ErrorMessagePipe,\n SvgIconComponent,\n PasswordDirective,\n NumberFormatDirective,\n NgbDropdownModule,\n ],\n templateUrl: './input.component.html',\n styleUrl: './input.component.scss',\n encapsulation: ViewEncapsulation.ShadowDom,\n})\nexport class InputComponent implements ControlValueAccessor {\n /**\n * Defines the unique identifier for the input element.\n * This ID is crucial for accessibility, linking the `<label>` to the\n * native `<input>` via the `for` attribute.\n * It is provided by the parent component as an Angular `input()` signal.\n */\n id = input<string>('');\n\n /**\n * Configuration object for the input's behavior and appearance.\n * This `input()` signal accepts an `InputConfig` object to customize\n * properties like the input type (`text`, `password`, `number`),\n * placeholder/label text (`name`), validation (`required`), and other\n * special behaviors.\n */\n config = input<CaiInputConfig>({});\n\n /**\n * Internal signal to track the disabled state of the input.\n * This state is managed by the `ControlValueAccessor`'s `setDisabledState`\n * method, which is called by Angular's Forms API when the associated\n * form control's status changes. Defaults to `false`.\n */\n disabled = signal<boolean>(false);\n\n /**\n * Holds the internal, unmasked, and unformatted value of the input.\n * This signal represents the component's \"source of truth\" for its value.\n * It is updated by user input (via `onInput` or `onRealValueChange`) and\n * programmatically by the `ControlValueAccessor`'s `writeValue` method.\n * The value from this signal is what is propagated back to the parent `FormControl`.\n */\n value = signal<string>('');\n\n /**\n * Tracks the visibility state for inputs of `type='password'`.\n * When `true`, the password's characters are shown; when `false`, they are\n * masked. This is toggled by the `toggleVisibility` method.\n * Defaults to `false`.\n */\n visible = signal<boolean>(false);\n\n /**\n * A computed signal that dynamically calculates the step value for number inputs.\n * The step value changes based on the magnitude of the current `value()`.\n * This allows for more intuitive incrementing and decrementing (e.g., smaller\n * steps for smaller numbers, larger steps for larger numbers). It derives its\n * value from the `getStepValue` method and automatically updates when the\n * input's `value` signal changes.\n */\n step = computed(() => this.getStepValue());\n\n @ViewChild('inputRef') inputRef!: ElementRef<HTMLInputElement>;\n @ViewChild(PasswordDirective) PasswordDirective!: PasswordDirective;\n @ViewChild(NumberFormatDirective)\n NumberFormatDirective!: NumberFormatDirective;\n\n @ViewChild('dropdown') dropdown!: NgbPopover;\n\n /**\n * Constructor for the InputComponent.\n * It injects NgControl to integrate with Angular's forms API.\n * If NgControl is present, it sets this component as the value accessor\n * for the form control.\n * @param ngControl - Optional NgControl instance for form integration.\n */\n constructor(@Optional() @Self() public ngControl: NgControl | null) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n /**\n * Handles the native 'input' event from the HTMLInputElement.\n * Updates the component's internal value and notifies Angular forms\n * about the change.\n * For 'password' type (when not visible) and 'number' type, it relies\n * on associated directives (PasswordDirective, NumberFormatDirective)\n * to get the real value, as the displayed value might be\n * masked or formatted.\n * @param event - The input event object.\n */\n onInput(event: Event): void {\n const inputElement = event.target as HTMLInputElement;\n\n // Handle inputs normally for all inputs other than password and number\n if (this.config().type === 'password' || this.config().type === 'number') {\n return;\n }\n this.value.set(inputElement.value);\n\n if (this.config().search) {\n return;\n }\n\n this.onChange(this.value());\n }\n\n /**\n * Listens for a custom 'realValueChange' event.\n * This event is expected to be emitted by child directives (PasswordDirective, NumberFormatDirective)\n * when their internal \"real\" value changes, allowing the parent input component\n * to stay in sync.\n * @param event - A CustomEvent containing the new real value in `event.detail`.\n */\n @HostListener('realValueChange', ['$event'])\n onRealValueChange(event: CustomEvent): void {\n this.value.set(event.detail);\n this.onChange(event.detail);\n }\n\n /**\n * Increments the value of a number input by the current step.\n * If the current value is not a valid number, it starts from the `min` input.\n * After updating, it notifies forms, updates the view, and focuses the input.\n * @param event - The MouseEvent that triggered the increment.\n */\n increment(event: MouseEvent): void {\n this.value.update((v) =>\n String((parseFloat(v) ? parseFloat(v) : 0) + this.step())\n );\n this.onChange(this.value());\n this.setValue(); // Ensure the view (e.g., formatted number) is updated\n this.focus(event);\n }\n\n /**\n * Decrements the value of a number input by the current step.\n * If the current value is not a valid number, it starts from the `min` input.\n * The value will not go below the minimum value.\n * After updating, it notifies forms, updates the view, and focuses the input.\n * @param event - The MouseEvent that triggered the decrement.\n */\n decrement(event: MouseEvent): void {\n this.value.update((v) => {\n const currentValue = parseFloat(v) ? parseFloat(v) : 0;\n const nextValue = currentValue - this.step();\n return String(nextValue <= 0 ? 0 : nextValue);\n });\n this.onChange(this.value());\n this.setValue(); // Ensure the view (e.g., formatted number) is updated\n this.focus(event);\n }\n\n /**\n * Calculates the step value for number inputs based on the current value.\n * The step dynamically adjusts:\n * - 1000 if value < 20000\n * - 5000 if value < 50000\n * - 10000 if value < 100000\n * - 20000 otherwise\n * Uses `min()` as a fallback if the current value is not a valid number.\n * @returns The calculated step value.\n */\n getStepValue(): number {\n const numericValue = parseFloat(this.value() || '0');\n const value = numericValue || 0;\n\n if (value < 20000) return 1000;\n else if (value < 50000) return 5000;\n else if (value < 100000) return 10000;\n else return 20000;\n }\n\n /**\n * Toggles the visibility of the password input.\n * Toggles the `visible` state and updates the input's displayed value.\n * @param event - The MouseEvent that triggered the toggle.\n */\n toggleVisibility(event: MouseEvent): void {\n if (this.config().type !== 'password') {\n return;\n }\n\n this.focus(event); // Ensure input remains focused after toggle\n this.visible.update((v) => !v);\n setTimeout(() => this.setValue(), 0);\n }\n\n /**\n * Sets the value in the actual HTML input element or updates the\n * \"real\" value in the associated directive.\n * - For 'password' type: If not visible, it updates the PasswordDirective's real value.\n * If visible, it falls through to the default behavior.\n * - For 'number' type: It updates the NumberFormatDirective's real value.\n * - For other types (or visible password): It sets the `value` property of the native input element.\n */\n setValue(): void {\n // Ensure inputRef is available\n if (!this.inputRef || !this.inputRef.nativeElement) {\n return;\n }\n\n switch (this.config().type) {\n case 'password':\n if (this.PasswordDirective) {\n // When password is not visible, the directive handles the masking.\n // We set the real value on the directive.\n this.PasswordDirective.setRealValue(this.value());\n } else {\n // When password is visible, or no directive, set directly.\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n case 'number':\n if (this.NumberFormatDirective) {\n // NumberFormatDirective handles formatting, so we set the real value on it.\n this.NumberFormatDirective.setRealValue(this.value());\n } else {\n // If no directive, set directly.\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n default:\n // For text, email, etc., set the value directly on the input element.\n this.inputRef.nativeElement.value = this.value();\n break;\n }\n }\n\n /**\n * Focuses the input element.\n * Prevents the default action of the mouse event to avoid unintended behaviors\n * like double focus or focus loss.\n * @param event - The MouseEvent that initiated the focus action.\n */\n focus(event: MouseEvent): void {\n event.preventDefault();\n if (this.inputRef && this.inputRef.nativeElement) {\n this.inputRef.nativeElement.focus();\n }\n }\n\n // ControlValueAccessor methods\n onChange = (_: any) => {};\n onTouched = () => {};\n\n /**\n * Writes a new value to the element. (ControlValueAccessor)\n * This method is called by the Forms API to update the view when\n * the form control's value changes programmatically.\n * Uses `setTimeout` to ensure that `setValue` is called after the\n * view (and potentially child directives) has been initialized,\n * especially relevant if `writeValue` is called early in the component lifecycle.\n * @param value - The new value to write.\n */\n writeValue(value: string): void {\n this.value.set(value || '');\n // Use setTimeout to ensure directives like PasswordDirective or NumberFormatDirective\n // are initialized and ready to receive the value, especially during component init.\n setTimeout(() => {\n this.setValue();\n });\n }\n\n /**\n * Registers a callback function that should be called when the\n * control's value changes in the UI. (ControlValueAccessor)\n * @param fn - The callback function to register.\n */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /**\n * Registers a callback function that should be called when the\n * control receives a blur event. (ControlValueAccessor)\n * @param fn - The callback function to register.\n */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /**\n * This function is called by the Forms API when the control's disabled\n * state changes. (ControlValueAccessor)\n * @param isDisabled - True if the control should be disabled, false otherwise.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n /**\n * Called when the input element loses focus (blur event).\n * Triggers the `onTouched` callback to notify Angular Forms that the\n * input has been interacted with.\n */\n onBlur(): void {\n this.onTouched();\n }\n\n /**\n * Resets the input field's value to an empty string.\n * Notifies Angular Forms of the change and updates the view.\n */\n reset(): void {\n this.value.set('');\n this.onChange(''); // Notify form control of the change\n this.setValue(); // Update the actual input element\n }\n\n /**\n * Represents the base list of options available for the dropdown.\n * This is an input signal, meaning its value can be set from a parent component.\n * @type {Signal<string[]>}\n */\n dropdownOptions = input<string[]>([]);\n\n /**\n * A computed signal that provides the current list of options to display in the dropdown.\n *\n * If `search` is `false`, it returns the full `dropdownOptions`.\n * If `search` is `true`, it filters `dropdownOptions` based on the `value` signal,\n * performing a case-insensitive partial text match.\n *\n * @type {Signal<string[]>}\n */\n options = computed(() => {\n if (!this.config().search) {\n return this.dropdownOptions();\n }\n\n const searchValue = this.value();\n const filteredOptions = this.dropdownOptions().filter((option) =>\n option.toLowerCase().includes(searchValue.toLowerCase())\n );\n if (filteredOptions.length > 0) {\n return filteredOptions;\n }\n\n return [];\n });\n\n /**\n * Formats an option for the dropdown by highlighting the search value if it exists in the option.\n * @param option - The option to format.\n * @returns The formatted option.\n */\n formatOption(option: string): string {\n if (!this.config().search) {\n return option;\n }\n\n const searchValue = this.value();\n\n if (!searchValue || searchValue.trim() === '') {\n return option;\n }\n\n const escapedSearchValue = searchValue.replace(\n /[.*+?^${}()|[\\]\\\\]/g,\n '\\\\$&'\n );\n\n const regex = new RegExp(escapedSearchValue, 'gi');\n\n if (option.toLowerCase().includes(searchValue.toLowerCase())) {\n return option.replace(regex, '<span class=\"highlight\" >$&</span>');\n }\n\n return option;\n }\n\n /**\n * Handles when an option is selected from the dropdown.\n * @param option - The selected option.\n * @param event - The MouseEvent that initiated the selection action.\n */\n handleOption(option: string, event: MouseEvent) {\n this.focus(event);\n this.value.set(option);\n this.onChange(option);\n this.setValue();\n this.dropdown.close();\n }\n}\n","@let valid = ngControl?.valid && ngControl?.touched && ngControl?.dirty; @let\ninvalid = ngControl?.invalid && ngControl?.touched && ngControl?.dirty; @let\ntype = config().type; @let icon = config().icon; @let alignment =\nconfig().alignment; @let inverse = config().inverse; @let name = config().name;\n@let required = config().required; @let reveal = config().reveal; @let password\n= type === 'password'; @let number = type === 'number'; @let ariaLabel = type\n=== 'password' ? 'Password' : config().name; @let hasDropdown =\nconfig().dropdown;\n\n<div\n class=\"app-input-container\"\n [class]=\"{\n 'has-error': invalid,\n 'has-valid': valid,\n 'has-icon': icon,\n 'has-password': password,\n 'has-visible': password && visible(),\n 'has-number': number,\n 'has-right': alignment === 'right',\n inverse: inverse,\n 'has-dropdown': hasDropdown\n }\"\n ngbDropdown\n [autoClose]=\"'outside'\"\n #dropdown=\"ngbDropdown\"\n>\n @if (config().icon && !password && !number) {\n <div class=\"icon-container\" (mousedown)=\"focus($event)\">\n <svg-icon class=\"icon\" name=\"{{ icon }}\"></svg-icon>\n <div class=\"separator\"></div>\n </div>\n } @if (password){\n <div class=\"icon-container\" (mousedown)=\"toggleVisibility($event)\">\n <div class=\"password-icons\">\n <svg-icon class=\"icon password-key\" name=\"password-key\"></svg-icon>\n <svg-icon class=\"icon password-shown\" name=\"password-shown\"></svg-icon>\n <svg-icon class=\"icon password-hidden\" name=\"password-hidden\"></svg-icon>\n </div>\n <div class=\"separator\"></div>\n </div>\n }\n\n <input\n class=\"app-input\"\n [type]=\"'text'\"\n [name]=\"name\"\n [required]=\"required\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabel\"\n placeholder=\"\"\n autocomplete=\"off\"\n #inputRef\n [appPassword]=\"password\"\n [reveal]=\"reveal || 0\"\n [visible]=\"visible()\"\n [appNumberFormat]=\"number\"\n (focus)=\"hasDropdown && dropdown.open()\"\n (click)=\"hasDropdown && dropdown.open()\"\n ngbDropdownAnchor\n />\n <label class=\"app-input-label\">\n {{ name }}\n </label>\n @if(number){\n <div class=\"number-container\">\n <div class=\"number-buttons\">\n <div class=\"separator\"></div>\n <svg-icon\n name=\"plus\"\n class=\"bg-icon plus-icon\"\n (mousedown)=\"increment($event)\"\n ></svg-icon>\n <svg-icon\n name=\"minus\"\n class=\"bg-icon minus-icon\"\n (mousedown)=\"decrement($event)\"\n ></svg-icon>\n </div>\n </div>\n }\n <svg-icon name=\"checkmark\" class=\"app-input-icon positive-icon\"></svg-icon>\n <svg-icon name=\"warning\" class=\"app-input-icon warning-icon\"></svg-icon>\n <div class=\"app-input-error\">\n @if (invalid) { @for (error of ngControl?.errors | errorMessage ; track\n $index) {\n {{ error }}\n } }\n </div>\n <button\n type=\"button\"\n class=\"app-input-icon cancel-icon bg-icon\"\n (click)=\"reset()\"\n [tabIndex]=\"-1\"\n >\n <svg-icon name=\"cancel\"></svg-icon>\n </button>\n @if(hasDropdown) {\n <div class=\"dropdown-menu\" ngbDropdownMenu>\n @if (!options().length) {\n <p class=\"dropdown-item no-results\">No results</p>\n } @for(option of options(); track $index ){\n <button\n class=\"dropdown-item\"\n (click)=\"handleOption(option, $event)\"\n [class]=\"{\n 'selected': value() === option,\n }\"\n >\n <p [innerHTML]=\"formatOption(option)\"></p>\n <svg-icon name=\"checkmark\" class=\"dropdown-item-icon\"></svg-icon>\n </button>\n }\n </div>\n <div class=\"icon-container\">\n <svg-icon name=\"arrow-down\" class=\"dropdown-icon icon\"></svg-icon>\n </div>\n }\n</div>\n","// src/app/bytes-to-human-readable.pipe.ts\n\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'bytesToHumanReadable',\n})\nexport class BytesToHumanReadablePipe implements PipeTransform {\n transform(bytes: number | null | undefined, precision: number = 2): string {\n if (bytes === null || bytes === undefined || isNaN(bytes)) {\n return '';\n }\n\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n const units = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n\n const unitIndex = Math.min(i, units.length - 1);\n\n const value = bytes / Math.pow(1024, unitIndex);\n\n const formattedValue = parseFloat(value.toFixed(precision));\n\n return `${formattedValue} ${units[unitIndex]}`;\n }\n}","import { Component, ElementRef, input, output, signal, ViewChild } from '@angular/core';\nimport { SvgIconComponent } from 'angular-svg-icon';\nimport { AppFile } from '../../models/appFile.model';\nimport { BytesToHumanReadablePipe } from '../../pipes/bytes-to-human-readable.pipe';\n/**\n * This component displays a preview of a document, including its name, size,\n * and provides actions to delete, download, and tag the document.\n */\n@Component({\n selector: 'app-document-preview',\n imports: [SvgIconComponent, BytesToHumanReadablePipe],\n templateUrl: './document-preview.component.html',\n styleUrl: './document-preview.component.scss',\n})\nexport class DocumentPreviewComponent {\n\n showDeleteModal = signal<boolean>(false);\n /**\n * The application file to be displayed in the preview. This is a required input.\n * @type {InputSignal<AppFile>}\n */\n file = input.required<AppFile>();\n /**\n * An output event that emits the file name when the delete action is triggered.\n * @type {OutputEmitterRef<string>}\n */\n onDelete = output<string>();\n\n /**\n * An output event that emits the file name when the download action is triggered.\n * @type {OutputEmitterRef<string>}\n */\n onDownload = output<string>();\n\n /**\n * Handles the delete action. Emits the `fileName` of the current `file` via the `onDelete` output.\n */\n handleDelete() {\n this.showDeleteModal.set(true);\n }\n\n /**\n * Handles the download action. Emits the `fileName` of the current `file` via the `onDownload` output.\n */\n handleDownload() {\n this.onDownload.emit(this.file().fileName);\n }\n\n /**\n * Handles the tag action. Currently, it logs a message to the console.\n * A \"TODO\" indicates that further logic for tagging needs to be implemented here.\n */\n handleTag() {\n console.log('Tag event');\n // TODO: Add tag logic\n }\n\n cancelDelete() {\n this.showDeleteModal.set(false);\n }\n\n confirmDelete()\n {\n this.onDelete.emit(this.file().fileName);\n this.showDeleteModal.set(false);\n }\n \n}","@let fileType = file().type; @let documentName = file().baseName; @let fileSize\n= file().size; @let pdf = fileType === 'pdf'; @let video = ['avi', 'mp4',\n'mov'].includes(fileType); @let image = ['jpg', 'png', 'jpeg',\n'gif'].includes(fileType); @let pageCount = file().pageCount; @let\nimagePreviewUrl = file().imagePreviewUrl;\n\n<div class=\"document\" [class.noTouch]=\"showDeleteModal()\"> \n <div class=\"document-image-container\">\n <img src=\"{{ imagePreviewUrl }}\" class=\"document-image\" />\n <div class=\"badge-tag-container\">\n <div class=\"badges\">\n <p class=\"tag\">No Tag</p>\n </div>\n <div class=\"badges\">\n <p\n class=\"badge file-type\"\n [class]=\"{\n pdf: pdf,\n video: video,\n image: image\n }\"\n >\n {{ fileType }}\n </p>\n <p class=\"badge\">\n @if(pdf && pageCount) {\n <span>{{ pageCount }} p.</span>\n }\n <span class=\"file-size\"> {{ fileSize | bytesToHumanReadable }}</span>\n </p>\n </div>\n </div>\n </div>\n <p class=\"document-name\">\n {{ documentName }}\n </p>\n <div class=\"document-actions\">\n <div class=\"document-actions-container\">\n <button class=\"document-actions-button\" (click)=\"handleTag()\">\n <svg-icon name=\"label\" class=\"icon\"></svg-icon>\n </button>\n </div>\n <div class=\"document-actions-container\">\n <button class=\"document-actions-button\" (click)=\"handleDownload()\">\n <svg-icon name=\"download\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button\" (click)=\"handleDelete()\">\n <svg-icon name=\"delete\" class=\"icon\"></svg-icon>\n </button>\n </div>\n </div>\n <div class=\"delete-modal\">\n <div class=\"modal-buttons\">\n <button class=\"delete-button\" (click)=\"confirmDelete()\">Delete</button>\n <button class=\"cancel-button\" (click)=\"cancelDelete()\">Cancel</button>\n </div>\n </div>\n</div>\n\n\n","import { Injectable } from '@angular/core';\nimport * as pdfjsLib from 'pdfjs-dist';\nimport { FileExtension } from '../models/appFile.model';\n\npdfjsLib.GlobalWorkerOptions.workerSrc = '/pdfjs/pdf.worker.min.mjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DocumentService {\n /**\n * Generates a data URL thumbnail for a given file.\n * Handles PDFs, videos, and images.\n * @param file The file to generate a thumbnail for.\n * @returns A promise that resolves to a data URL string for the thumbnail.\n */\n async generateThumbnail(file: File): Promise<string> {\n const extension: FileExtension = file.name.split('.').pop()?.toLowerCase() as FileExtension;\n\n switch (extension) {\n case 'pdf':\n try {\n return await this.generatePdfThumbnail(file);\n } catch (error) {\n console.error('Error generating PDF thumbnail:', error);\n return '/assets/exampledoc.png';\n }\n case 'mp4':\n case 'mov':\n case 'avi':\n try {\n return await this.generateVideoThumbnail(file);\n } catch (error) {\n console.error('Error generating video thumbnail:', error);\n return '/assets/truck.png';\n }\n case 'jpg':\n case 'jpeg':\n case 'png':\n case 'gif':\n return URL.createObjectURL(file);\n default:\n return '/assets/exampledoc.png';\n }\n }\n\n private generatePdfThumbnail(file: Blob): Promise<string> {\n const fileReader = new FileReader();\n return new Promise<string>((resolve, reject) => {\n fileReader.onload = async () => {\n const typedArray = new Uint8Array(fileReader.result as ArrayBuffer);\n try {\n const pdf = await pdfjsLib.getDocument(typedArray).promise;\n const page = await pdf.getPage(1);\n const viewport = page.getViewport({ scale: 1 });\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n const desiredWidth = 280;\n const scale = desiredWidth / viewport.width;\n const scaledViewport = page.getViewport({ scale });\n canvas.height = scaledViewport.height;\n canvas.width = scaledViewport.width;\n\n if (!context) {\n return reject('Could not get canvas context');\n }\n\n await page.render({ canvasContext: context, viewport: scaledViewport })\n .promise;\n resolve(canvas.toDataURL('image/png'));\n } catch (error) {\n reject(error);\n }\n };\n fileReader.onerror = () => reject(fileReader.error);\n fileReader.readAsArrayBuffer(file);\n });\n }\n\n private generateVideoThumbnail(file: Blob): Promise<string> {\n return new Promise((resolve, reject) => {\n const video = document.createElement('video');\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n\n video.autoplay = true;\n video.muted = true;\n video.src = URL.createObjectURL(file);\n\n video.onloadeddata = () => {\n video.currentTime = Math.min(0.1, video.duration / 2);\n };\n\n video.onseeked = () => {\n const desiredWidth = 280;\n const scale = desiredWidth / video.videoWidth;\n canvas.width = desiredWidth;\n canvas.height = video.videoHeight * scale;\n\n if (context) {\n context.drawImage(video, 0, 0, canvas.width, canvas.height);\n video.pause();\n URL.revokeObjectURL(video.src);\n resolve(canvas.toDataURL('image/png'));\n } else {\n reject('Could not get canvas context for video thumbnail');\n }\n };\n\n video.onerror = (e) => {\n URL.revokeObjectURL(video.src);\n reject('Error loading video for thumbnail: ' + e);\n };\n });\n }\n\n /**\n * Reads a PDF file and returns the total number of pages.\n *\n * @param file The PDF Blob or File.\n * @returns A promise that resolves to the page count (number).\n * @throws If the file is not a valid PDF or an error occurs during processing.\n */\n async getPdfPageCount(file: Blob): Promise<number> {\n const fileReader = new FileReader();\n\n return new Promise<number>((resolve, reject) => {\n fileReader.onload = async () => {\n const typedArray = new Uint8Array(fileReader.result as ArrayBuffer);\n try {\n const pdf = await pdfjsLib.getDocument(typedArray).promise;\n resolve(pdf.numPages);\n } catch (error) {\n console.error('Error getting PDF page count:', error);\n reject(new Error('Failed to load PDF or get page count.'));\n }\n };\n fileReader.onerror = () => {\n reject(new Error('FileReader error during PDF page count operation.'));\n };\n fileReader.readAsArrayBuffer(file);\n });\n }\n}","import {\n Component,\n ElementRef,\n signal,\n ViewChild,\n inject,\n computed,\n input,\n} from '@angular/core';\nimport { SvgIconComponent } from 'angular-svg-icon';\nimport { DocumentPreviewComponent } from '../document-preview/document-preview.component';\nimport { AppFile, FileExtension } from '../../models/appFile.model';\nimport { DocumentService } from '../../services/document.service';\n\n/**\n * A component that provides a user interface for file uploading via\n * drag-and-drop or a file input dialog. It displays previews of the\n * selected files in a carousel.\n */\n@Component({\n selector: 'app-drop-zone',\n imports: [SvgIconComponent, DocumentPreviewComponent],\n templateUrl: './drop-zone.component.html',\n styleUrl: './drop-zone.component.scss',\n})\nexport class DropZoneComponent {\n /**\n * Injects the DocumentService for file processing tasks like\n * thumbnail generation and PDF page counting.\n * @private\n */\n private documentService = inject(DocumentService);\n\n /**\n * An array of file extensions that should be excluded from the supported list.\n * @defaultValue `[]` (an empty array)\n * @type {FileExtension[]}\n */\n excludedFileTypes = input<FileExtension[]>([]);\n\n /**\n * The base array of all file extensions that are generally allowed.\n * Supported file types will be derived from this list, after excluding\n * any types specified in `excludedFileTypes`.\n *\n * @defaultValue `['avi', 'mov', 'mp4', 'pdf', 'gif', 'png', 'jpg', 'jpeg']`\n * @type {FileExtension[]}\n */\n fileTypes = input<FileExtension[]>([\n 'pdf',\n 'png',\n 'jpg',\n 'jpeg',\n 'gif',\n 'avi',\n 'mov',\n 'mp4',\n ]);\n\n /**\n * A computed signal that derives the list of currently supported file extensions.\n * It filters the base `fileTypes` array, removing any extensions present\n * in the `excludedFileTypes` input.\n */\n supportedFileTypes = computed(() => [\n ...this.fileTypes().filter(\n (type) => !this.excludedFileTypes().includes(type)\n ),\n ]);\n\n /**\n * A signal that holds an array of `AppFile` objects representing the files\n * that have been selected or dropped by the user.\n */\n docs = signal<AppFile[]>([]);\n\n /**\n * A signal that acts as a boolean flag. It is set to `true` when the user\n * attempts to upload a file with an unsupported extension.\n */\n unsupported = signal(false);\n\n /**\n * Handles the 'change' event from the hidden file input. It extracts the\n * selected files and passes them to the `processFiles` method.\n * @param event The `Event` object from the file input element.\n */\n onInput(event: Event) {\n const target = event.target as HTMLInputElement;\n const files = target.files as FileList;\n this.processFiles(files);\n }\n\n /**\n * Handles the 'drop' event on the component. It prevents the browser's\n * default file handling, extracts the dropped files, and passes them to\n * the `processFiles` method.\n * @param event The `DragEvent` object containing the dropped files.\n */\n onDrop(event: DragEvent) {\n event.preventDefault();\n const files = event.dataTransfer?.files as FileList;\n this.processFiles(files);\n }\n\n /**\n * Asynchronously processes a list of files. For each file, it validates\n * the extension against `supportedFileTypes`. If valid, it generates a\n * thumbnail, counts pages for PDFs, creates an `AppFile` object, and adds\n * it to the `docs` signal. If any file is unsupported, the `unsupported`\n * flag is set.\n * @param files The `FileList` object to be processed.\n */\n async processFiles(files: FileList) {\n this.unsupported.set(false);\n\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const fileExtension = file.name.split('.').pop()?.toLowerCase();\n\n if (\n !fileExtension ||\n !this.supportedFileTypes().includes(fileExtension as FileExtension)\n ) {\n this.unsupported.set(true);\n continue;\n }\n\n let pageCount: number | undefined;\n\n if (fileExtension === 'pdf') {\n try {\n pageCount = await this.documentService.getPdfPageCount(file);\n } catch (error) {\n console.error(`Failed to get page count for ${file.name}:`, error);\n }\n }\n\n const imagePreviewUrl = await this.documentService.generateThumbnail(\n file\n );\n\n const filePreview: AppFile = {\n fileName: file.name,\n baseName: file.name.split('.').slice(0, -1).join('.'),\n type: fileExtension as FileExtension,\n size: file.size,\n imagePreviewUrl: imagePreviewUrl,\n file: file,\n pageCount: pageCount,\n };\n\n this.docs.update((docs) => [...docs, filePreview]);\n\n if (this.docs().length > 2) {\n this.carouselIndex.set(this.docs().length - 2);\n }\n }\n }\n\n /**\n * Handles the download action for a specific file.\n * Note: This is a placeholder and currently only logs the file name.\n * @param fileName The name of the file to be downloaded.\n */\n handleDownload(fileName: string) {\n console.log(fileName);\n }\n\n /**\n * A ViewChild reference to the native `<input type='file'>` element.\n * Used to programmatically trigger the file selection dialog.\n */\n @ViewChild('inputRef') inputRef!: ElementRef<HTMLInputElement>;\n\n /**\n * Resets the component's state after an unsupported file type error\n * by setting the `unsupported` signal to `false`.\n */\n cancel() {\n this.unsupported.set(false);\n }\n\n /**\n * Programmatically triggers a click on the hidden file input element,\n * which opens the system's file selection dialog.\n */\n handleClickToAdd() {\n this.inputRef.nativeElement.click();\n }\n\n /**\n * Deletes a file from the preview list. It filters the `docs` array to\n * remove the specified file and adjusts the carousel position.\n * @param fileName The name of the file to be deleted.\n */\n handleDelete(fileName: string) {\n this.carouselLeft();\n\n this.docs.set(this.docs().filter((doc) => doc.fileName !== fileName));\n\n if (this.docs().length === 0) {\n this.unsupported.set(false);\n }\n }\n\n // Carousel logic\n\n /**\n * A signal that stores the current index for the file preview carousel.\n * This determines which part of the carousel is visible.\n */\n carouselIndex = signal(0);\n\n /**\n * A computed signal that calculates the CSS `translateX` value for the\n * carousel container. This creates the sliding effect based on the\n * `carouselIndex`.\n */\n carouselTransform = computed(() => {\n const offset = (148 + 6) * this.carouselIndex() * -1; // 148px width + 6px gap\n return `translateX(${offset}px)`;\n });\n\n /**\n * Navigates the carousel one step to the left by decrementing the\n * `carouselIndex`. The index will not go below 0.\n */\n carouselLeft() {\n this.carouselIndex.update((i) => Math.max(0, i - 1));\n }\n\n /**\n * Navigates the carousel one step to the right by incrementing the\n * `carouselIndex`. The index will not exceed the maximum possible value\n * based on the number of documents.\n */\n carouselRight() {\n const maxIndex = Math.max(0, this.docs().length - 2);\n this.carouselIndex.update((i) => Math.min(maxIndex, i + 1));\n }\n}\n","@let docCount = docs().length;\n\n<div class=\"container\">\n <!-- Carousel -->\n @if(docCount > 0) {\n <div class=\"docs\">\n <div class=\"doc-container\" [style.transform]=\"carouselTransform()\">\n @for (doc of docs(); track $index) {\n <app-document-preview\n class=\"doc\"\n [file]=\"doc\"\n (onDelete)=\"handleDelete($event)\"\n (onDownload)=\"handleDownload($event)\"\n ></app-document-preview>\n }\n </div>\n @if(docCount > 2) {\n <button class=\"carousel-button carousel-left\" (click)=\"carouselLeft()\">\n <svg-icon name=\"arrow-left\" class=\"arrow\"></svg-icon>\n </button>\n <button class=\"carousel-button carousel-right\" (click)=\"carouselRight()\">\n <svg-icon name=\"arrow-right\" class=\"arrow\"></svg-icon>\n </button>\n }\n </div>\n }\n\n <!-- Drop Zone -->\n <div\n class=\"drop-zone-container\"\n (drop)=\"onDrop($event)\"\n (dragover)=\"$event.preventDefault()\"\n [class]=\"{\n 'more-docs': docCount >= 2,\n unsupported: unsupported()\n }\"\n >\n <!-- Drop Zone -->\n <div class=\"drop-zone\" (click)=\"handleClickToAdd()\">\n <svg-icon name=\"drop-zone\" class=\"illustration\"></svg-icon>\n <div class=\"drop-zone-text\">\n <p class=\"heading\">\n DRAG FILES @if (docCount < 1) {\n <span>HERE</span>\n }\n </p>\n <p class=\"subtext\">OR CLICK TO ADD</p>\n </div>\n <input\n type=\"file\"\n aria-hidden=\"true\"\n multiple\n class=\"drop-zone-input\"\n #inputRef\n (input)=\"onInput($event)\"\n />\n </div>\n\n <!-- Drop Zone Error -->\n <div class=\"drop-zone-error\">\n <div class=\"drop-zone-text\">\n <p class=\"heading invalid\">INVALID FILE TYPE</p>\n <p class=\"subtext\">SUPPORTED FORMATS</p>\n </div>\n <div class=\"file-types\">\n @for (type of supportedFileTypes(); track $index) {\n <p\n class=\"badge\"\n [class]=\"{\n pdf: type === 'pdf',\n video: ['avi', 'mp4', 'mov'].includes(type),\n image: ['jpg', 'png', 'jpeg', 'gif'].includes(type)\n }\"\n >\n {{ type }}\n </p>\n }\n </div>\n <button class=\"cancel-button\">\n <svg-icon name=\"cancel\" (click)=\"cancel()\"></svg-icon>\n </button>\n </div>\n </div>\n</div>\n","/*\n * Public API Surface of ca-components\n */\n\nexport * from './app/components/input/input.component';\nexport * from './app/components/drop-zone/drop-zone.component';\nexport * from './app/components/input/models';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAKa,gBAAgB,CAAA;AAC3B,IAAA,SAAS,CAAC,KAAa,EAAA;AACrB,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,EAAE;AAErB,QAAA,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACvB,YAAA,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;;AAGnD,YAAA,MAAM,iBAAiB,GAAG,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE;;YAGxE,MAAM,gBAAgB,GAAG,WAAW,CAAC,OAAO,CAAC,uBAAuB,EAAE,GAAG,CAAC;;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AA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,i6EAoFA,ED/DY,MAAA,EAAA,CAAA,g3EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,gBAAgB,kLAAE,wBAAwB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIzC,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAChB,OAAA,EAAA,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,EAAA,QAAA,EAAA,i6EAAA,EAAA,MAAA,EAAA,CAAA,g3EAAA,CAAA,EAAA;8BAwJ9B,QAAQ,EAAA,CAAA;sBAA9B,SAAS;uBAAC,UAAU;;;AE7KvB;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carriera-intern-components",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0"
package/public-api.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './app/components/input/input.component';
2
2
  export * from './app/components/drop-zone/drop-zone.component';
3
+ export * from './app/components/input/models';