carriera-intern-components 0.0.6 → 0.0.7

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.
Files changed (46) hide show
  1. package/app/components/avatar/avatar.component.d.ts +30 -0
  2. package/app/components/avatar/models/avatar.model.d.ts +21 -0
  3. package/app/components/avatar/models/index.d.ts +1 -0
  4. package/app/components/avatar/pipes/initials.pipe.d.ts +7 -0
  5. package/app/components/document-preview/document-preview.component.d.ts +15 -4
  6. package/app/components/drop-zone/drop-zone.component.d.ts +4 -0
  7. package/app/components/input/input.component.d.ts +55 -11
  8. package/app/components/input/models/index.d.ts +1 -0
  9. package/app/components/input/models/input.model.d.ts +6 -0
  10. package/app/components/input/models/planner.model.d.ts +78 -0
  11. package/app/components/input/pipes/highlight-search.d.ts +13 -0
  12. package/app/models/appFile.model.d.ts +1 -0
  13. package/fesm2022/carriera-intern-components.mjs +297 -40
  14. package/fesm2022/carriera-intern-components.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/public/assets/icons/Driver.svg +3 -0
  17. package/public/assets/icons/LTL.svg +3 -0
  18. package/public/assets/icons/PrimaryArrowUp.svg +3 -0
  19. package/public/assets/icons/trailers/ic_trailer_bottom-dump.svg +5 -0
  20. package/public/assets/icons/trailers/ic_trailer_carhauler-stinger.svg +5 -0
  21. package/public/assets/icons/trailers/ic_trailer_carhauler.svg +5 -0
  22. package/public/assets/icons/trailers/ic_trailer_chassis.svg +5 -0
  23. package/public/assets/icons/trailers/ic_trailer_conestoga.svg +13 -0
  24. package/public/assets/icons/trailers/ic_trailer_container.svg +6 -0
  25. package/public/assets/icons/trailers/ic_trailer_dryvan.svg +5 -0
  26. package/public/assets/icons/trailers/ic_trailer_end-dump.svg +5 -0
  27. package/public/assets/icons/trailers/ic_trailer_flatbed.svg +5 -0
  28. package/public/assets/icons/trailers/ic_trailer_hopper.svg +6 -0
  29. package/public/assets/icons/trailers/ic_trailer_low-boy.svg +6 -0
  30. package/public/assets/icons/trailers/ic_trailer_reefer.svg +5 -0
  31. package/public/assets/icons/trailers/ic_trailer_side-kit.svg +6 -0
  32. package/public/assets/icons/trailers/ic_trailer_step-deck.svg +7 -0
  33. package/public/assets/icons/trailers/ic_trailer_tanker-pneumatic.svg +5 -0
  34. package/public/assets/icons/trailers/ic_trailer_tanker.svg +5 -0
  35. package/public/assets/icons/trucks/ic_truck_box-truck.svg +7 -0
  36. package/public/assets/icons/trucks/ic_truck_car-hauler.svg +7 -0
  37. package/public/assets/icons/trucks/ic_truck_cargo-van.svg +5 -0
  38. package/public/assets/icons/trucks/ic_truck_cement.svg +8 -0
  39. package/public/assets/icons/trucks/ic_truck_dump.svg +8 -0
  40. package/public/assets/icons/trucks/ic_truck_garbage.svg +10 -0
  41. package/public/assets/icons/trucks/ic_truck_reefer.svg +6 -0
  42. package/public/assets/icons/trucks/ic_truck_semi-truck.svg +8 -0
  43. package/public/assets/icons/trucks/ic_truck_semi-wSleeper.svg +8 -0
  44. package/public/assets/icons/trucks/ic_truck_spotter.svg +6 -0
  45. package/public/assets/icons/trucks/ic_truck_tow-truck.svg +8 -0
  46. package/public/assets/json/icons.json +12 -0
@@ -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';\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: 'cai-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;;AAG1E,YAAA,IAAI,WAAW,KAAK,SAAS,EAAE;AAC7B,gBAAA,OAAO,CAAG,EAAA,gBAAgB,CAAI,CAAA,EAAA,iBAAiB,EAAE;;;YAInD,OAAO,CAAA,EAAG,gBAAgB,CAAA,CAAA,CAAG;;QAG/B,OAAO,KA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LAAE,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/pipes/highlight-search.ts","../../../projects/carriera-intern-components/src/app/components/avatar/pipes/initials.pipe.ts","../../../projects/carriera-intern-components/src/app/components/avatar/avatar.component.ts","../../../projects/carriera-intern-components/src/app/components/avatar/avatar.component.html","../../../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 { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'highlightSearch'\n})\nexport class HighlightSearchPipe implements PipeTransform {\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 * @param searchValue - The value to search and highlight within the option.\n * @returns The formatted option.\n */\n transform(option: string, searchValue: string | undefined | null): string {\n if (!searchValue || typeof searchValue !== 'string' || 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}","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'initials',\n})\nexport class InitialsPipe implements PipeTransform {\n transform(\n firstName: string | null | undefined,\n lastName: string | null | undefined\n ): string {\n let initials = '';\n\n if (firstName) {\n initials += firstName.charAt(0).toUpperCase();\n }\n\n if (lastName) {\n initials += lastName.charAt(0).toUpperCase();\n }\n\n return initials;\n }\n}\n","import { Component, input } from '@angular/core';\nimport { Driver, Size } from './models';\nimport { InitialsPipe } from './pipes/initials.pipe';\n\n/**\n * Represents a user avatar component.\n */\n@Component({\n selector: 'cai-avatar',\n imports: [InitialsPipe],\n templateUrl: './avatar.component.html',\n styleUrl: './avatar.component.scss'\n})\nexport class AvatarComponent {\n /**\n * The driver object containing information to display in the avatar.\n * This input is required.\n * @type {Driver}\n */\n driver = input.required<Driver>()\n\n /**\n * The size of the avatar in pixels.\n * @type {Size}\n */\n size = input<Size>(18)\n\n /**\n * Whether the avatar should be rounded or not at sizes of 74px and 160px.\n * @type {boolean}\n */\n rounded = input<boolean>(false)\n\n /**\n * Whether the owner element should be dark or light\n * @type {boolean}\n */\n inverse = input<boolean>(false)\n}\n","@let firstName = driver().firstName; @let lastName = driver().lastName; @let\nisOwner = driver().owner; @let color = driver().colorFlag; @let avatarFile =\ndriver().avatarFile;\n\n<div\n class=\"avatar\"\n [class]=\"{\n 'is-owner': isOwner,\n\n xs: size() === 18,\n sm: size() === 22,\n md: size() === 32,\n lg: size() === 74,\n xl: size() === 160,\n\n blue: color === 'Blue',\n green: color === 'Green',\n red: color === 'Red',\n yellow: color === 'Yellow',\n purple: color === 'Purple',\n gold: color === 'Gold',\n 'light-green': color === 'Light Green',\n orange: color === 'Orange',\n 'light-blue': color === 'Light Blue',\n pink: color === 'Pink',\n brown: color === 'Brown',\n gray: color === 'Gray',\n\n inverse: inverse(),\n rounded: rounded()\n }\"\n>\n @if( avatarFile ){\n <img class=\"avatar-image\" src=\"{{ avatarFile.url }}\" />\n }\n <p class=\"avatar-initials\">{{ firstName | initials : lastName }}</p>\n</div>\n","import {\n Component,\n computed,\n ElementRef,\n HostListener,\n input,\n Optional,\n output,\n Self,\n signal,\n ViewChild,\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, DropdownOption } from './models/input.model';\nimport { HighlightSearchPipe } from './pipes/highlight-search';\nimport { Dispatch, DispatchBoard } from './models';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AvatarComponent } from '../avatar/avatar.component';\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: 'cai-input',\n imports: [\n ErrorMessagePipe,\n SvgIconComponent,\n PasswordDirective,\n NumberFormatDirective,\n NgbDropdownModule,\n HighlightSearchPipe,\n NgTemplateOutlet,\n AvatarComponent,\n ],\n templateUrl: './input.component.html',\n styleUrl: './input.component.scss',\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.stopPropagation();\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 receives focus (focus event).\n * Triggers the `onTouched` callback to notify Angular Forms that the\n * input has been interacted with.\n */\n onFocus(event: FocusEvent): void {\n if (!this.config().add && !this.config().planner && !this.config().search)\n return;\n if (this.isAdding()) return;\n\n if (this.config().search) {\n this.value.set('');\n this.inputRef.nativeElement.value = this.value();\n }\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 if (!this.config().add && !this.config().planner && !this.config().search)\n return;\n if (this.isAdding()) return;\n\n setTimeout(() => {\n this.value.set('');\n this.inputRef.nativeElement.value = this.value();\n }, 0);\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 if (this.isAdding()) this.isAdding.set(false);\n\n this.value.set('');\n this.onChange(''); // Notify form control of the change\n this.setValue(); // Update the actual input element\n\n this.selectedOption.set(null);\n this.selectedDispatch.set(null);\n this.dropdown.close();\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<DropdownOption[]>([]);\n\n /**\n * A signal that holds the locally added options.\n * @type {Signal<DropdownOption[]>}\n */\n localOptions = signal<DropdownOption[]>(this.dropdownOptions());\n\n /**\n * A signal that holds the currently selected option from the dropdown.\n * @type {Signal<DropdownOption | null>}\n */\n selectedOption = signal<DropdownOption | null>(null);\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 const options = [...this.dropdownOptions(), ...this.localOptions()];\n\n if (!this.config().search) {\n return options;\n }\n\n const searchValue = this.value();\n const filteredOptions = options.filter((option) =>\n option.label.toLowerCase().includes(searchValue.toLowerCase())\n );\n if (filteredOptions.length > 0) {\n return filteredOptions;\n }\n\n return [];\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: DropdownOption, event: MouseEvent) {\n this.focus(event);\n this.onChange(option.id);\n if (this.config().search || this.config().planner || this.config().add) {\n this.value.set('');\n } else {\n this.value.set(option.label);\n }\n this.setValue();\n this.dropdown.close();\n\n this.selectedOption.set(option);\n }\n\n // With add\n\n /**\n * An output signal that emits the value of the added option.\n * @type {Output<string>}\n */\n onConfirm = output<string>();\n\n /**\n * Adds a new option to the dropdown.\n * @param option - The option to add.\n */\n addOption() {\n const option: DropdownOption = {\n id: this.inputRef.nativeElement.value,\n label: this.inputRef.nativeElement.value,\n };\n\n console.log(option);\n\n this.localOptions.update((options) => [...options, option]);\n this.isAdding.set(false);\n\n this.value.set(option.label);\n this.onChange(option.id);\n this.setValue();\n\n this.selectedOption.set(option);\n this.onConfirm.emit(option.label);\n }\n\n /**\n * Handles when the user clicks on the \"ADD NEW\" button in the dropdown.\n * It sets the `isAdding` signal to `true`, closes the dropdown, and focuses the input.\n * @param event - The MouseEvent that initiated the action.\n */\n handleAddOption(event: MouseEvent) {\n this.isAdding.set(true);\n this.dropdown.close();\n this.focus(event);\n }\n\n /**\n * A signal that indicates whether a new option is being added.\n * @type {Signal<boolean>}\n */\n isAdding = signal<boolean>(false);\n\n /**\n * A signal that indicates whether the placeholder selected option should be shown.\n * @type {Signal<boolean>}\n */\n hasText = computed<boolean>(() => {\n return Boolean(\n this.value() ||\n this.selectedOption()?.label ||\n this.selectedDispatch()?.id\n );\n });\n\n dispatches = input<DispatchBoard[]>();\n\n dispatchCount = computed<number>(() => {\n if (!this.dispatches()) return 0;\n return this.dispatches()!.reduce((acc, board) => acc + board.count, 0);\n });\n\n filteredDispatches = computed<DispatchBoard[]>(() => {\n if (!this.dispatches()) return [];\n\n const folded = this.foldedBoards();\n let dispatches = this.dispatches() || [];\n\n const searchValue = this.value()?.trim().toLowerCase();\n\n if (searchValue) {\n dispatches = dispatches.map((board) => {\n const newBoard = { ...board };\n\n newBoard.dispatches = board.dispatches.filter((dispatch) => {\n const truckIdMatch = dispatch.truck.truckNumber\n ?.toString()\n .toLowerCase()\n .includes(searchValue);\n const trailerIdMatch = dispatch.trailer?.trailerNumber\n ?.toString()\n .toLowerCase()\n .includes(searchValue);\n const driverNameMatch = (\n dispatch.driver?.firstName?.toLowerCase() +\n ' ' +\n dispatch.driver?.lastName?.toLowerCase()\n ).includes(searchValue);\n\n return truckIdMatch || trailerIdMatch || driverNameMatch;\n });\n\n return newBoard;\n });\n }\n\n if (folded.length && !searchValue) {\n dispatches = dispatches.map((board) => {\n if (folded.includes(board.id)) {\n const { dispatches, ...rest } = board;\n\n return rest as DispatchBoard;\n }\n return board;\n });\n }\n\n return dispatches;\n });\n\n handlePlannerOption(option: Dispatch, event: MouseEvent) {\n this.focus(event);\n this.onChange(option.id);\n this.value.set('');\n this.setValue();\n this.dropdown.close();\n\n this.selectedDispatch.set(option);\n }\n\n selectedDispatch = signal<Dispatch | null>(null);\n\n foldedBoards = signal<number[]>([]);\n\n fold(boardId: number, event: MouseEvent) {\n this.focus(event);\n if (this.foldedBoards().includes(boardId)) {\n this.foldedBoards.update((boards) =>\n boards.filter((id) => id !== boardId)\n );\n return;\n }\n this.foldedBoards.update((boards) => [...boards, boardId]);\n }\n}\n","@let valid = ngControl?.valid && (ngControl?.touched || ngControl?.dirty) &&\n!isAdding(); @let invalid = ngControl?.invalid && (ngControl?.touched ||\nngControl?.dirty) && !isAdding(); @let type = config().type; @let icon =\nconfig().icon; @let alignment = config().alignment; @let inverse =\nconfig().inverse; @let name = config().name; @let required = config().required;\n@let reveal = config().reveal; @let password = type === 'password'; @let number\n= type === 'number'; @let ariaLabel = type === 'password' ? 'Password' :\nconfig().name; @let hasDropdown = config().dropdown; @let add = config().add;\n@let search = config().search; @let planner = config().planner;\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 'is-adding': add && isAdding(),\n 'has-planner': planner\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)=\"!isAdding() && dropdown.open(); onFocus($event)\"\n (click)=\"!isAdding() && hasDropdown && dropdown.open()\"\n [class]=\"{\n 'has-text': hasText(),\n 'is-empty': !hasText(),\n }\"\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 @if(add && isAdding()){\n <button\n type=\"button\"\n class=\"app-input-icon button-icon bg-icon accept-button\"\n (click)=\"addOption()\"\n [tabIndex]=\"-1\"\n >\n <svg-icon name=\"checkmark\"></svg-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"app-input-icon button-icon bg-icon cancel-button\"\n (click)=\"reset()\"\n [tabIndex]=\"-1\"\n >\n <svg-icon name=\"cancel\"></svg-icon>\n </button>\n\n @if(hasDropdown) {\n <div class=\"dropdown-menu\" ngbDropdownMenu>\n @if(add && !planner){\n <button class=\"dropdown-item add-new\" (mousedown)=\"handleAddOption($event)\">\n <p>ADD NEW</p>\n <svg-icon name=\"plus\" class=\"dropdown-item-icon\"></svg-icon>\n </button>\n }\n <ng-container\n *ngTemplateOutlet=\"planner ? dispatchesRef : dropdownOptionsRef\"\n ></ng-container>\n </div>\n\n <div class=\"dropdown-icon-container\">\n <svg-icon name=\"arrow-down\" class=\"dropdown-icon icon\"></svg-icon>\n </div>\n\n @if(planner && !inputRef.value && !this.isAdding()){ @if(selectedDispatch()){\n <div class=\"dropdown-selected planner-item\">\n <div class=\"planner-subitem truck-item\">\n <svg-icon\n class=\"truck-icon\"\n [src]=\"\n 'assets/icons/trucks/' + selectedDispatch()!.truck.truckType.logoName\n \"\n ></svg-icon>\n <p>{{ selectedDispatch()!.truck.truckNumber }}</p>\n </div>\n <div class=\"planner-subitem trailer-item\">\n @if(selectedDispatch()!.trailer){\n <svg-icon\n class=\"trailer-icon\"\n [src]=\"\n 'assets/icons/trailers/' +\n selectedDispatch()!.trailer?.trailerType?.logoName\n \"\n ></svg-icon>\n <p>{{ selectedDispatch()!.trailer?.trailerNumber }}</p>\n }\n </div>\n <div class=\"planner-subitem\">\n <cai-avatar\n [driver]=\"selectedDispatch()!.driver\"\n [size]=\"18\"\n ></cai-avatar>\n <p>\n {{\n selectedDispatch()!.driver.firstName +\n \" \" +\n selectedDispatch()!.driver.lastName\n }}\n </p>\n </div>\n <p class=\"selected-rate\">{{ selectedDispatch()!.payType }}</p>\n </div>\n } @else {\n <p class=\"dropdown-selected\">Unassigned</p>\n } } @else if ((add || search) && !inputRef.value && !this.isAdding()){\n <p class=\"dropdown-selected\">{{ selectedOption()?.label }}</p>\n } }\n</div>\n\n<ng-template #dropdownOptionsRef>\n @if(options().length){ @for(option of options(); track $index ){\n <button\n class=\"dropdown-item\"\n (mousedown)=\"handleOption(option, $event)\"\n [class]=\"{\n 'selected': selectedOption()?.id === option.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search ? (option.label | highlightSearch : value()) : option.label\n \"\n ></p>\n <svg-icon name=\"checkmark\" class=\"dropdown-item-icon\"></svg-icon>\n </button>\n } } @else {\n <p class=\"dropdown-item no-results\">No results</p>\n }\n</ng-template>\n\n<ng-template #dispatchesRef>\n <button\n class=\"dropdown-item planner-item\"\n (mousedown)=\"reset()\"\n [class]=\"{\n 'selected': !selectedDispatch(),\n }\"\n >\n <p>Unassigned</p>\n <div class=\"unassigned-ltl\">\n <p>{{ dispatchCount() }}</p>\n <svg-icon name=\"ltl\"></svg-icon>\n </div>\n </button>\n @if(filteredDispatches().length){ @for(dispatchBoard of filteredDispatches();\n track dispatchBoard.id){ @if(dispatchBoard.count > 0){\n <button\n class=\"dropdown-item planner-item group-item\"\n (mousedown)=\"fold(dispatchBoard.id, $event)\"\n [class]=\"{\n 'unfolded': dispatchBoard.dispatches?.length || 0 > 0,\n }\"\n >\n <p>\n {{ dispatchBoard.teamBoard ? \"Team Board\" : dispatchBoard.dispatcher }}\n </p>\n <p class=\"counter\">{{ dispatchBoard.count }}</p>\n <svg-icon name=\"primary-up\" class=\"group-icon icon\"></svg-icon>\n </button>\n @for(dispatch of dispatchBoard.dispatches; track dispatch.id ){\n <button\n class=\"dropdown-item planner-item\"\n (mousedown)=\"handlePlannerOption(dispatch, $event)\"\n [class]=\"{\n 'selected': selectedDispatch()?.id === dispatch.id,\n }\"\n >\n <div class=\"planner-subitem truck-item\">\n <svg-icon\n class=\"truck-icon\"\n [style.--truck-color]=\"dispatch.truck.color?.code || ''\"\n [src]=\"'assets/icons/trucks/' + dispatch.truck.truckType.logoName\"\n ></svg-icon>\n <p\n [innerHTML]=\"dispatch.truck.truckNumber | highlightSearch : value()\"\n ></p>\n </div>\n <div class=\"planner-subitem trailer-item\">\n @if(dispatch.trailer) {\n <svg-icon\n class=\"trailer-icon\"\n [src]=\"'assets/icons/trailers/' + dispatch.trailer.trailerType.logoName\"\n ></svg-icon>\n <p\n [innerHTML]=\"dispatch.trailer.trailerNumber | highlightSearch : value()\"\n ></p>\n }\n </div>\n <div class=\"planner-subitem\">\n <cai-avatar\n [driver]=\"dispatch.driver\"\n [size]=\"18\"\n [inverse]=\"true\"\n ></cai-avatar>\n <p\n [innerHTML]=\"\n dispatch.driver.firstName + ' ' + dispatch.driver.lastName\n | highlightSearch : value()\n \"\n ></p>\n </div>\n <div class=\"planner-end\">\n <div class=\"planner-rate\">\n <p>{{ dispatch.payType }}</p>\n <svg-icon name=\"driver\"></svg-icon>\n </div>\n <div class=\"planner-ltl\">\n <p>{{ dispatch.dispatcherId }}</p>\n <svg-icon name=\"ltl\"></svg-icon>\n </div>\n </div>\n </button>\n } } } }@else {\n <p class=\"dropdown-item no-results\">No results</p>\n }\n</ng-template>\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, HostListener, input, Output, output, signal, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { SvgIconComponent } from 'angular-svg-icon';\nimport { AppFile } from '../../models/appFile.model';\nimport { BytesToHumanReadablePipe } from '../../pipes/bytes-to-human-readable.pipe';\nimport { NgbPopover, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';\nimport { NgModule } from '@angular/core';\n\n\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, NgbPopoverModule],\n templateUrl: './document-preview.component.html',\n styleUrl: './document-preview.component.scss',\n})\nexport class DocumentPreviewComponent {\n\n showDeleteModal = signal<boolean>(false);\n showTagModal = signal<boolean>(false);\n\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 this.showTagModal.set(false);\n\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\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 this.showTagModal.set(false);\n\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(popover: NgbPopover) {\n if (!popover.isOpen()) {\n popover.open();\n this.showTagModal.set(true);\n } else {\n popover.close();\n this.showTagModal.set(false);\n }\n }\n\n tags: string[] = [\"Article of Incorporation\", \"IFTA Licence\", \"EIN\", \"W9\", \"Setup Packet\", \"MC Certificate\", \"Other\"]\n\n \n @HostListener('document:click', ['$event'])\n onOutsideClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const isInside = target.closest('.tagPopover, .document-actions-button');\n if (!isInside) {\n this.showTagModal.set(false);\n }\n }\n\n selectedTag: string = \"\";\n onTagChange = output<{fileName: string; tag: string }>();\n\n getTag(newTag: string)\n {\n this.selectedTag = newTag;\n this.onTagChange.emit({fileName: this.file().fileName, tag: newTag});\n\n }\n\n removeTag()\n {\n this.selectedTag = \"\";\n }\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; @let showTagModal = this.showTagModal();\n@let selected = this.selectedTag !== \"\";\n\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 @if(!selected){\n <div class=\"badges\">\n <p class=\"tag\">No Tag</p>\n </div>\n }\n @if(selected) {\n <div class=\"badges\">\n <p class=\"tag\">{{selectedTag}}</p>\n </div>\n }\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\n class=\"document-actions-button\"\n [class.tagIcon]=\"showTagModal\"\n [ngbPopover]=\"tagPopover\"\n popoverClass=\"tag-popover\"\n triggers=\"manual\"\n #p=\"ngbPopover\"\n (click)=\"handleTag(p)\" \n container=\"body\"\n placement=\"right\"\n \n >\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 \n <ng-template #tagPopover class=\"tag-popover\">\n <div class=\"tag-header\" #tagHeader (click)=\"removeTag()\">\n <svg-icon name=\"minus\" class=\"minus-icon\"></svg-icon>\n <span class=\"tag-header-text\">REMOVE TAG</span>\n <div class=\"divider\"></div>\n </div>\n <div class=\"tag-list\">\n @for (tag of tags; track $index) {\n <div\n class=\"tag-item\"\n (click)=\"getTag(tag)\"\n [class.selectedDesign]=\"selectedTag === tag\"\n >\n <svg-icon name=\"checkmark\" class=\"checkmark-icon\"></svg-icon>\n <span class=\"tag-text\">{{ tag }}</span>\n </div>\n }\n </div>\n </ng-template>\n</div>\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 tag: \"\"\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 handleTagChange(event: {fileName: string; tag: string})\n {\n this.docs().forEach((doc)=> {\n if(doc.fileName === event.fileName)\n doc.tag = event.tag;\n })\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 (onTagChange)=\"handleTagChange($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":["i1"],"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;;AAG1E,YAAA,IAAI,WAAW,KAAK,SAAS,EAAE;AAC7B,gBAAA,OAAO,CAAG,EAAA,gBAAgB,CAAI,CAAA,EAAA,iBAAiB,EAAE;;;YAInD,OAAO,CAAA,EAAG,gBAAgB,CAAA,CAAA,CAAG;;QAG/B,OAAO,KAAK,CAAC,OAAO,CAAC,uBAAuB,EAAE,GAAG,CAAC;;wGAtBzC,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,cAAc;AACrB,iBAAA;;;MCGY,gBAAgB,CAAA;AAC3B,IAAA,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,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,o9EAqFA,EDhEY,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,EAAA,aAAA,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,o9EAAA,EAAA,MAAA,EAAA,CAAA,g3EAAA,CAAA,EAAA;8BAyJ9B,QAAQ,EAAA,CAAA;sBAA9B,SAAS;uBAAC,UAAU;;;AE9KvB;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carriera-intern-components",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0"
@@ -0,0 +1,3 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.99961 0.351563C5.68437 0.351563 4.39866 0.741578 3.30507 1.47229C2.21148 2.203 1.35914 3.24159 0.855814 4.45672C0.352491 5.67185 0.220799 7.00894 0.47739 8.29891C0.733982 9.58889 1.36733 10.7738 2.29735 11.7038C3.22737 12.6338 4.41229 13.2672 5.70226 13.5238C6.99224 13.7804 8.32933 13.6487 9.54446 13.1454C10.7596 12.642 11.7982 11.7897 12.5289 10.6961C13.2596 9.60252 13.6496 8.31681 13.6496 7.00156C13.6497 6.12824 13.4778 5.26346 13.1436 4.4566C12.8095 3.64974 12.3196 2.9166 11.7021 2.29907C11.0846 1.68154 10.3514 1.19171 9.54458 0.857556C8.73772 0.523398 7.87293 0.35146 6.99961 0.351563ZM6.99961 2.06812C8.1583 2.07002 9.27943 2.4793 10.1668 3.22436C11.0542 3.96942 11.6513 5.00279 11.8537 6.14367H9.33606C9.18622 5.88415 8.97086 5.66853 8.71152 5.51838C8.45218 5.36824 8.15795 5.28883 7.85828 5.28812H6.1425C5.84283 5.28883 5.54861 5.36824 5.28926 5.51838C5.02992 5.66853 4.81456 5.88415 4.66472 6.14367H2.1455C2.34775 5.00273 2.94484 3.96926 3.83226 3.22418C4.71968 2.47909 5.84088 2.06986 6.99961 2.06812ZM2.1455 7.85945H4.86072L6.14406 9.57601V11.8565C5.14924 11.6789 4.23278 11.2006 3.51822 10.4861C2.80367 9.77151 2.32538 8.85504 2.14783 7.86023M7.85983 11.8565V9.57601L9.1385 7.85945H11.8498C11.6723 8.85427 11.194 9.77073 10.4794 10.4853C9.76489 11.1998 8.84843 11.6781 7.85361 11.8557" fill="currentColor"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.53646 12.7356V11.0432H1.44727C1.24692 11.0354 1.05705 10.9511 0.917101 10.8075C0.777149 10.664 0.697953 10.4722 0.695312 10.2717C0.699196 10.0753 0.780092 9.88845 0.920898 9.75157C1.0617 9.6147 1.2509 9.53874 1.44727 9.54042H9.53646V7.84966C9.53656 7.7399 9.56814 7.63249 9.62836 7.54072C9.68859 7.44895 9.77455 7.37675 9.87522 7.33298C9.97588 7.28921 10.0868 7.2757 10.195 7.29424C10.3032 7.31279 10.404 7.36263 10.4844 7.43742L13.117 9.87804C13.1271 9.88582 13.1364 9.89831 13.1489 9.90842C13.2498 10.0184 13.303 10.1636 13.297 10.3127C13.291 10.4618 13.2263 10.6025 13.117 10.704L10.4844 13.1462C10.404 13.2211 10.3033 13.2711 10.195 13.2897C10.0867 13.3084 9.97529 13.295 9.87446 13.2512C9.77363 13.2074 9.68797 13.1351 9.6276 13.0433C9.56724 12.9514 9.5351 12.844 9.53494 12.7341L9.53646 12.7356ZM9.53646 6.14694V4.45619H1.44727C1.24692 4.44843 1.05705 4.36411 0.917101 4.22054C0.777149 4.07697 0.697953 3.88516 0.695312 3.68468C0.699597 3.48848 0.78094 3.30175 0.921658 3.16496C1.06238 3.02817 1.25102 2.95215 1.44727 2.95342H9.53646V1.26495C9.5361 1.15498 9.56755 1.04736 9.6276 0.955241C9.68765 0.863118 9.7737 0.79042 9.87446 0.746365C9.97521 0.70231 10.0866 0.688782 10.195 0.707248C10.3034 0.725715 10.4039 0.775494 10.4844 0.850423L13.117 3.28876C13.127 3.30073 13.1376 3.31211 13.1489 3.32294C13.2499 3.43252 13.303 3.57775 13.297 3.72664C13.291 3.87554 13.2264 4.01592 13.117 4.11705L10.4844 6.55919C10.404 6.63413 10.3033 6.68411 10.195 6.70274C10.0867 6.72138 9.97529 6.70796 9.87446 6.6642C9.77363 6.62043 9.68797 6.54813 9.6276 6.45627C9.56724 6.36441 9.5351 6.25686 9.53494 6.14694H9.53646Z" fill="currentColor"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M2.75977 9.1L11.241 9.1C11.3714 9.10009 11.4989 9.0612 11.6073 8.98826C11.7158 8.91533 11.8003 8.81162 11.8502 8.69026C11.9001 8.56891 11.9132 8.43537 11.8877 8.30654C11.8622 8.17771 11.7994 8.05939 11.7072 7.96655L7.46655 3.69443C7.34289 3.56993 7.17521 3.5 7.00039 3.5C6.82557 3.5 6.6579 3.56993 6.53423 3.69443L2.29361 7.96655C2.20137 8.05939 2.13854 8.17771 2.11308 8.30654C2.08761 8.43537 2.10066 8.56891 2.15057 8.69027C2.20048 8.81162 2.28501 8.91533 2.39345 8.98826C2.50189 9.0612 2.62938 9.10009 2.75977 9.1Z" fill="#919191"/>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="42" height="18" viewBox="0 0 42 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M36 17C34.8954 17 34 16.1046 34 15C34 13.8954 34.8954 13 36 13C37.1046 13 38 13.8954 38 15C38 16.1046 37.1046 17 36 17Z" fill="#919191"/>
3
+ <path d="M31 17C29.8954 17 29 16.1046 29 15C29 13.8954 29.8954 13 31 13C32.1046 13 33 13.8954 33 15C33 16.1046 32.1046 17 31 17Z" fill="#919191"/>
4
+ <path d="M7 3H35L41 11.5V15C41 15.552 40.552 16 40 16V14L39.5 13H39V14H38.291C37.904 13.118 37.023 12.5 36 12.5C34.977 12.5 34.096 13.118 33.709 14H33.29C32.903 13.118 32.022 12.5 30.999 12.5C29.976 12.5 29.095 13.118 28.708 14H27.999V12.5H26.499L25.499 13.5V15H16.499V13.5L15.499 12.5H13.999V16.5C14.275 16.5 14.499 16.724 14.499 17H12.499C12.499 16.724 12.723 16.5 12.999 16.5V13.501L9.999 12.501H1.999C1.447 12.501 1 12.052 1 11.5L6.999 3.001L7 3ZM39.776 11.5L38.385 9.529L36.414 11.5H39.776ZM35 11.5L37.8 8.7L34.697 4.304L31.251 7.75L35.001 11.5H35ZM33.585 11.5L30.542 8.457L27.999 11H13.999L11.456 8.457L8.413 11.5H33.585ZM7.304 4.304L4.201 8.701L7.001 11.501L10.751 7.751L7.304 4.304ZM5.586 11.5L3.615 9.529L2.224 11.5H5.586Z" fill="currentColor"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="42" height="18" viewBox="0 0 42 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 12H6.021L2.021 8H1C0.448001 8 0 7.552 0 7H12.33L13 5.84V4C12.448 4 12 3.552 12 3H13V1H14V3H24V1H25V3H35V1H36V3H37C37 3.552 36.552 4 36 4V9H41C41 9.552 40.552 10 40 10H39L36 13L37.5 14.5H41V15C41 15.552 40.552 16 40 16H36V15.25C36 14.472 35.603 13.784 35 13.38V10H29.479L31.5 13.5H32.338C31.888 13.863 31.581 14.396 31.514 15H30.486C30.419 14.396 30.112 13.863 29.662 13.5H30.345L28.325 10H25V14.5L26 13.5H26.838C26.327 13.913 26 14.544 26 15.25V16H14V16.5C14.276 16.5 14.5 16.724 14.5 17H12.5C12.5 16.724 12.724 16.5 13 16.5V16H1.5C0.672 16 0 15.329 0 14.5H8L8.866 13H1C0.448001 13 0 12.552 0 12ZM36 11.586L37.586 10H36V11.586ZM28.902 9H35V4H26.015L28.902 9ZM25 9H27.747L25 4.242V9ZM14 14.5H24V10.414L21.414 13H14V14.5ZM14 12H21L24 9V4H14V12ZM13 7.84L10.598 12H13V7.84ZM13 14.5V13H10.021L9.155 14.5H13ZM9.443 12L11.753 8H3.436L7.436 12H9.443Z" fill="currentColor"/>
3
+ <path d="M33.75 17C32.7835 17 32 16.2165 32 15.25C32 14.2835 32.7835 13.5 33.75 13.5C34.7165 13.5 35.5 14.2835 35.5 15.25C35.5 16.2165 34.7165 17 33.75 17Z" fill="currentColor"/>
4
+ <path d="M28.25 17C27.2835 17 26.5 16.2165 26.5 15.25C26.5 14.2835 27.2835 13.5 28.25 13.5C29.2165 13.5 30 14.2835 30 15.25C30 16.2165 29.2165 17 28.25 17Z" fill="currentColor"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="42" height="18" viewBox="0 0 42 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M36.25 17C35.2835 17 34.5 16.2165 34.5 15.25C34.5 14.2835 35.2835 13.5 36.25 13.5C37.2165 13.5 38 14.2835 38 15.25C38 16.2165 37.2165 17 36.25 17Z" fill="currentColor"/>
3
+ <path d="M30.75 17C29.7835 17 29 16.2165 29 15.25C29 14.2835 29.7835 13.5 30.75 13.5C31.7165 13.5 32.5 14.2835 32.5 15.25C32.5 16.2165 31.7165 17 30.75 17Z" fill="currentColor"/>
4
+ <path d="M22 5L26 1L40.489 4.882C40.346 5.415 39.798 5.732 39.264 5.589L38.5 5.384V13L40 14.499H41V14.999C41 15.551 40.552 15.999 40 15.999H38.5V15.249C38.5 14.471 38.103 13.783 37.5 13.379V5.117L36.363 4.812L34.035 13.5H34.838C34.388 13.863 34.081 14.396 34.014 15H32.986C32.919 14.396 32.612 13.863 32.162 13.5H33L35.397 4.553L30.634 3.277L28.179 7.528L29.499 8V13.38C28.896 13.784 28.499 14.471 28.499 15.25V16H13.999V16.5C14.275 16.5 14.499 16.724 14.499 17H12.499C12.499 16.724 12.723 16.5 12.999 16.5V14L11.499 12.5H0.998999C0.447 12.5 0 12.052 0 11.5V8.25L12.999 5H22ZM29.634 3.009L26.299 2.115L22.805 5.609L27.222 7.187L29.634 3.01V3.009ZM27 14.5L28.5 13V8.705L27.671 8.409L24.154 14.5H27ZM22.5 14.5H23L26.714 8.067L22.5 6.562V14.5ZM21.5 14.5V6H14V14.5H21.5ZM13 12.586V6.031L7.756 7.342L13 12.586ZM1 11.5H10.5L6.625 7.625L1 9.031V11.5Z" fill="currentColor"/>
5
+ </svg>