carriera-intern-components 0.0.992 → 0.0.993

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.
@@ -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/components/input/pipes/highlight-search.ts","../../../projects/carriera-intern-components/src/app/pipes/currency.pipe.ts","../../../projects/carriera-intern-components/src/app/components/input/pipes/filter-by-search.pipe.ts","../../../projects/carriera-intern-components/src/app/components/input/directives/password.directive.ts","../../../projects/carriera-intern-components/src/app/components/input/directives/number-format.directive.ts","../../../projects/carriera-intern-components/src/app/components/input/directives/mask.directive.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/app/components/input/models/input.model.ts","../../../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) =>\n `Minimum value is ${this.numberFormatPipe.transform(\n String(value.min)\n )}`,\n max: (value: any) =>\n `Maximum value is ${this.numberFormatPipe.transform(\n String(value.max)\n )}`,\n email: () => 'Invalid email format',\n pattern: () => 'Invalid format',\n hasUppercase: () => 'Must contain at least one uppercase letter',\n hasNumber: () => 'Must contain at least one number',\n hasSymbol: () => 'Must contain at least one symbol',\n passwordDontMatch: () => \"Passwords don't match\",\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","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/**\n * @ngdoc pipe\n * @name currencyPipe\n * @description\n * Formats a given dollar amount into a compact string (e.g., $35.21K, $1.23M).\n *\n * Usage:\n * {{ value | currency }}\n *\n * Example:\n * {{ 35210 | currency }} // outputs: $35.21K\n * {{ 1234567 | currency }} // outputs: $1.23M\n * {{ 999 | currency }} // outputs: $999\n * {{ 1234567890 | currency }} // outputs: $1.23B\n */\n@Pipe({\n name: 'currency',\n})\nexport class CurrencyPipe implements PipeTransform {\n /**\n * Transforms a numeric value into a formatted currency string.\n *\n * @param {number | string} value The dollar amount to format. Can be a number or a string that can be parsed to a number.\n * @returns {string} The formatted currency string, or '$0.00' if the input is invalid.\n */\n transform(value: number | string): string {\n let amount: number;\n if (typeof value === 'string') {\n amount = parseFloat(value);\n } else if (typeof value === 'number') {\n amount = value;\n } else {\n console.error(\n 'Invalid input for currencyPipe: value must be a number or a string convertible to a number.'\n );\n return '$0.00';\n }\n\n if (isNaN(amount)) {\n console.error('Invalid number provided to currencyPipe.');\n return '$0.00';\n }\n\n const suffixes = ['', 'K', 'M', 'B', 'T']; // K = Thousand, M = Million, B = Billion, T = Trillion\n const absAmount = Math.abs(amount);\n\n let suffixIndex = 0;\n let divisor = 1;\n\n while (absAmount >= 1000 * divisor && suffixIndex < suffixes.length - 1) {\n divisor *= 1000;\n suffixIndex++;\n }\n\n let formattedNumber = (amount / divisor).toFixed(2);\n\n return `$${formattedNumber}${suffixes[suffixIndex]}`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n Bank,\n Broker,\n CaiInputConfig,\n DepartmentContactsPair,\n Dispatch,\n DispatchBoard,\n Dispatcher,\n DropdownArrays,\n LabelOption,\n Shipper,\n TrailerType,\n TruckType,\n} from '../models';\n\n@Pipe({\n name: 'filterBySearch',\n})\nexport class FilterBySearchPipe implements PipeTransform {\n hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T {\n return prop in obj;\n }\n\n transform(\n options: DropdownArrays,\n value: string | undefined | null,\n type: CaiInputConfig['dropdown'],\n shouldSearch?: boolean,\n foldedBoards?: number[],\n label?: string\n ): any[] {\n const optionLabel = label || 'label';\n\n if (!Array.isArray(options)) {\n return [];\n }\n\n if (!options.length) {\n return [];\n }\n\n if (typeof value !== 'string') {\n return options;\n }\n\n const searchValue = value?.trim().toLowerCase();\n\n switch (type) {\n case 'dispatch':\n case 'ftl-dispatch':\n if (!(options as DispatchBoard[]) || !(options as Dispatch[]))\n return [];\n\n // TODO: Leave only board variant once backend is fixed\n let dispatches = (options as DispatchBoard[]) || [];\n\n if (!this.hasProperty(dispatches[0], 'dispatches')) {\n dispatches = [\n {\n dispatcher: 'NOBOARDSVARIANT',\n count: options.length,\n id: 0,\n dispatches: options as Dispatch[],\n teamBoard: false,\n },\n ];\n }\n\n if (!shouldSearch) {\n return dispatches as DispatchBoard[];\n }\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\n let driverNameMatch = (\n dispatch.driver?.firstName?.toLowerCase() +\n ' ' +\n dispatch.driver?.lastName?.toLowerCase()\n ).includes(searchValue);\n\n if (dispatch.coDriver) {\n driverNameMatch = (\n dispatch.driver.firstName.toLowerCase() +\n ' & ' +\n dispatch.coDriver.firstName.toLowerCase()\n ).includes(searchValue);\n }\n\n return truckIdMatch || trailerIdMatch || driverNameMatch;\n });\n\n return newBoard;\n });\n }\n\n if (foldedBoards?.length && !searchValue) {\n dispatches = dispatches.map((board) => {\n if (foldedBoards.includes(board.id)) {\n const { dispatches, ...rest } = board;\n\n return rest as DispatchBoard;\n }\n return board;\n });\n }\n\n return dispatches as DispatchBoard[];\n case 'broker':\n const brokers = (options as Broker[]) || [];\n\n if (!shouldSearch) {\n return brokers as Broker[];\n }\n\n if (searchValue) {\n return brokers.filter((broker) =>\n (broker.businessName || '').toLowerCase().includes(searchValue)\n );\n }\n return brokers;\n case 'contact':\n const contacts =\n (options as DepartmentContactsPair[]).sort(\n (a, b) => (a.department?.id || 0) - (b.department?.id || 0)\n ) || [];\n\n if (!shouldSearch) {\n return contacts;\n }\n\n if (searchValue) {\n return contacts.map((contact) => {\n return {\n ...contact,\n contacts: contact.contacts?.filter((contact) =>\n (contact.contactName || '').toLowerCase().includes(searchValue)\n ),\n };\n });\n }\n return contacts;\n case 'shipper':\n const shippers = (options as Shipper[]) || [];\n\n if (!shouldSearch) {\n return shippers;\n }\n\n if (searchValue) {\n return shippers.filter((shipper) =>\n (shipper.businessName + ' ' + shipper.address?.address || '')\n .toLowerCase()\n .includes(searchValue)\n );\n }\n return shippers;\n case 'label':\n const labels = (options as LabelOption[]) || [];\n\n if (!shouldSearch) {\n return labels;\n }\n\n if (searchValue) {\n return labels.filter((label) =>\n label.name?.toLowerCase().includes(searchValue)\n );\n }\n return labels;\n case 'bank':\n const banks = (options as Bank[]) || [];\n\n if (!shouldSearch) {\n return banks;\n }\n\n if (searchValue) {\n return banks.filter((bank) =>\n bank.name?.toLowerCase().includes(searchValue)\n );\n }\n return banks;\n case 'dispatcher':\n const dispatcher = (options as Dispatcher[]) || [];\n\n if (!shouldSearch) {\n return dispatcher;\n }\n\n if (searchValue) {\n return dispatcher.filter((bank) =>\n bank.fullName?.toLowerCase().includes(searchValue)\n );\n }\n return dispatcher;\n case 'truck':\n const trucks = (options as TruckType[]) || [];\n\n if (!shouldSearch) {\n return trucks;\n }\n\n if (searchValue) {\n return trucks.filter((truck) =>\n (truck.name || '').toLowerCase().includes(searchValue)\n );\n }\n return trucks;\n case 'trailer':\n const trailers = (options as TrailerType[]) || [];\n\n if (!shouldSearch) {\n return trailers;\n }\n\n if (searchValue) {\n return trailers.filter((trailer) =>\n (trailer.name || '').toLowerCase().includes(searchValue)\n );\n }\n return trailers;\n default:\n const dropdownOptions = options as any[];\n\n if (!shouldSearch) {\n return options;\n }\n\n if (searchValue) {\n return dropdownOptions.filter((option) =>\n option[optionLabel]?.toLowerCase().includes(searchValue)\n );\n }\n\n return options;\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() && this.reveal() > 0) {\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() || !this.reveal()) 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() || !this.reveal()) 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() || !this.reveal()) 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.appPassword() || !this.reveal()) return;\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 *\n */\n max = input<number>();\n\n prefix = input<string>('');\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 if (this.max()) {\n if (Number(this.realValue) > (this.max() || 0)) {\n this.realValue = this.realValue.slice(0, -1);\n }\n }\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 value = value.toString();\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 number = Number(this.realValue);\n const formattedValue = new NumberFormatPipe().transform(\n number !== 0 ? number + '' : ''\n );\n this.el.nativeElement.value =\n (formattedValue && this.prefix() ? this.prefix() : '') + 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 number = Number(this.realValue);\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: number !== 0 ? number : null,\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 Directive,\n ElementRef,\n HostListener,\n input,\n OnInit,\n} from '@angular/core';\n\n@Directive({\n selector: '[appMask]',\n})\nexport class MaskDirective implements OnInit {\n /**\n * The mask pattern to apply.\n * Placeholders:\n * '0' - Digit (0-9)\n * 'a' - Letter (a-z, A-Z)\n * '*' - Alphanumeric (0-9, a-z, A-Z)\n * @example '(000) 000-0000' for a phone number.\n */\n appMask = input<string>('');\n\n /**\n * Stores the unmasked, \"real\" value of the input, containing only\n * the characters entered by the user that fit the mask placeholders.\n */\n private realValue: string = '';\n\n constructor(private el: ElementRef<HTMLInputElement>) {}\n\n ngOnInit(): void {\n if (this.appMask() && this.el.nativeElement.value) {\n this.formatValue(this.el.nativeElement.value);\n }\n }\n\n /**\n * HostListener for the 'input' event. This is the primary handler for\n * formatting the value as the user types or pastes.\n */\n @HostListener('input', ['$event'])\n onInput(event: InputEvent): void {\n if (!this.appMask()) return;\n this.formatValue(this.el.nativeElement.value);\n //this.dispatchRealValueChange();\n }\n\n /**\n * HostListener for the 'paste' event. It intercepts pasted content,\n * cleans it, and integrates it into the masked value.\n */\n @HostListener('paste', ['$event'])\n onPaste(event: ClipboardEvent): void {\n if (!this.appMask()) return;\n event.preventDefault();\n const pastedData = event.clipboardData?.getData('text') || '';\n this.formatValue(this.realValue + pastedData);\n //this.dispatchRealValueChange();\n }\n\n /**\n * HostListener for the 'copy' event. Ensures that copying a selection\n * from the input copies the unmasked, \"real\" value.\n */\n @HostListener('copy', ['$event'])\n onCopy(event: ClipboardEvent): void {\n if (!this.appMask()) return;\n const selection = this.el.nativeElement.value.substring(\n this.el.nativeElement.selectionStart || 0,\n this.el.nativeElement.selectionEnd || 0\n );\n if (selection) {\n event.preventDefault();\n const unmaskedSelection = this.extractUserInput(selection);\n //event.clipboardData?.setData('text/plain', unmaskedSelection);\n event.clipboardData?.setData('text/plain', selection);\n }\n }\n\n /**\n * HostListener for the 'cut' event. Ensures cutting a selection removes\n * the corresponding part from the real value and reformats the input.\n */\n @HostListener('cut', ['$event'])\n onCut(event: ClipboardEvent): void {\n if (!this.appMask()) return;\n const start = this.el.nativeElement.selectionStart || 0;\n const end = this.el.nativeElement.selectionEnd || 0;\n if (start !== end) {\n event.preventDefault();\n const selection = this.el.nativeElement.value.substring(start, end);\n const unmaskedSelection = this.extractUserInput(selection);\n //event.clipboardData?.setData('text/plain', unmaskedSelection);\n event.clipboardData?.setData('text/plain', selection);\n\n const valueBefore = this.extractUserInput(\n this.el.nativeElement.value.substring(0, start)\n );\n const valueAfter = this.extractUserInput(\n this.el.nativeElement.value.substring(end)\n );\n this.formatValue(valueBefore + valueAfter);\n //this.dispatchRealValueChange();\n }\n }\n\n /**\n * HostListener for the 'keydown' event. It validates key presses against\n * the mask pattern, preventing invalid characters from being entered.\n */\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n const mask = this.appMask();\n if (!mask) return;\n\n const controlKeys = [\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Tab',\n 'Enter',\n 'Escape',\n 'Home',\n 'End',\n ];\n if (controlKeys.includes(event.key) || event.metaKey || event.ctrlKey) {\n return;\n }\n\n const placeholders = mask.replace(/[^0a*]/g, '');\n if (this.realValue.length >= placeholders.length) {\n event.preventDefault();\n return;\n }\n\n const nextPlaceholder = placeholders[this.realValue.length];\n if (!this.charMatchesPlaceholder(event.key, nextPlaceholder)) {\n event.preventDefault();\n }\n }\n\n /**\n * The core formatting logic. It takes a value, extracts the valid user\n * input, applies the mask, updates the display, and dispatches the change.\n * @param value The current value from the input field.\n */\n private formatValue(value: string): void {\n const mask = this.appMask();\n if (!mask) return;\n\n const extractedValue = this.extractUserInput(value);\n\n const { formattedValue, finalRealValue } = this.applyMask(\n extractedValue,\n mask\n );\n this.realValue = finalRealValue;\n\n this.el.nativeElement.value = formattedValue;\n this.setCursorToEnd();\n }\n\n /**\n * Applies the mask to a given string of user input.\n * @param realValue The clean user input.\n * @param mask The mask pattern.\n * @returns An object with the formatted value and the final real value.\n */\n private applyMask(\n realValue: string,\n mask: string\n ): { formattedValue: string; finalRealValue: string } {\n let formatted = '';\n let realValueIndex = 0;\n let maskIndex = 0;\n let newRealValue = '';\n\n while (realValueIndex < realValue.length && maskIndex < mask.length) {\n const maskChar = mask[maskIndex];\n const realChar = realValue[realValueIndex];\n\n if (this.isPlaceholder(maskChar)) {\n if (this.charMatchesPlaceholder(realChar, maskChar)) {\n formatted += realChar;\n newRealValue += realChar;\n maskIndex++;\n realValueIndex++;\n } else {\n break;\n }\n } else {\n formatted += maskChar;\n maskIndex++;\n }\n }\n return { formattedValue: formatted, finalRealValue: newRealValue };\n }\n\n /**\n * Extracts valid user input characters from a string.\n * @param value The string to clean.\n * @returns A string containing only valid mask characters (digits/letters).\n */\n private extractUserInput(value: string): string {\n return value.replace(/[^a-zA-Z0-9]/g, '');\n }\n\n private isPlaceholder(char: string): boolean {\n return char === '0' || char === 'a' || char === '*';\n }\n\n private charMatchesPlaceholder(char: string, placeholder: string): boolean {\n if (placeholder === '0') return /^\\d$/.test(char);\n if (placeholder === 'a') return /^[a-zA-Z]$/.test(char);\n if (placeholder === '*') return /^[a-zA-Z0-9]$/.test(char);\n return false;\n }\n\n private setCursorToEnd(): void {\n setTimeout(() => {\n const len = this.el.nativeElement.value.length;\n this.el.nativeElement.setSelectionRange(len, len);\n }, 0);\n }\n\n private dispatchRealValueChange(): void {\n const customEvent = new CustomEvent('realValueChange', {\n bubbles: true,\n composed: true,\n detail: this.realValue,\n });\n this.el.nativeElement.dispatchEvent(customEvent);\n }\n\n /**\n * Public method to get the current unmasked \"real\" value.\n * @returns The real value as a string.\n */\n public getRealValue(): string {\n return this.realValue;\n }\n\n /**\n * Public method to set the \"real\" value from outside the directive.\n * @param value The new value to set.\n */\n public setRealValue(value: string): void {\n if (this.appMask()) {\n this.formatValue(value || '');\n } else {\n this.el.nativeElement.value = value || '';\n }\n }\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","// Angular\nimport {\n AfterViewInit,\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 { NgTemplateOutlet } from '@angular/common';\n\n// Pipes\nimport { ErrorMessagePipe } from '../../pipes/error-message.pipe';\nimport { HighlightSearchPipe } from './pipes/highlight-search';\nimport { CurrencyPipe } from '../../pipes/currency.pipe';\nimport { FilterBySearchPipe } from './pipes/filter-by-search.pipe';\n\n// Directives\nimport { PasswordDirective } from './directives/password.directive';\nimport { NumberFormatDirective } from './directives/number-format.directive';\nimport { MaskDirective } from './directives/mask.directive';\n\n// Bootstrap\nimport {\n NgbDropdownModule,\n NgbPopover,\n NgbTooltip,\n} from '@ng-bootstrap/ng-bootstrap';\n\n// Models\nimport {\n Bank,\n Broker,\n CaiInputConfig,\n Contact,\n DepartmentContactsPair,\n Dispatcher,\n DropdownOption,\n LabelColor,\n LabelOption,\n Shipper,\n Dispatch,\n DispatchBoard,\n DropdownArrays,\n DropdownOptions,\n DropdownKeys,\n TruckType,\n TrailerType,\n} from './models';\n\n// Components\nimport { AvatarComponent } from '../avatar/avatar.component';\nimport { SvgIconComponent } from 'angular-svg-icon';\n\n/**\n * This component is a generic input component that can be used to create various types of inputs.\n */\n@Component({\n selector: 'cai-input',\n imports: [\n // Pipes\n ErrorMessagePipe,\n CurrencyPipe,\n HighlightSearchPipe,\n FilterBySearchPipe,\n // Directives\n PasswordDirective,\n NumberFormatDirective,\n MaskDirective,\n // Bootstrap\n NgbDropdownModule,\n NgbTooltip,\n NgTemplateOutlet,\n // Components\n SvgIconComponent,\n AvatarComponent,\n ],\n templateUrl: './input.component.html',\n styleUrl: './input.component.scss',\n})\nexport class InputComponent implements ControlValueAccessor, AfterViewInit {\n // Refs\n @ViewChild('inputRef') inputRef!: ElementRef<HTMLInputElement>;\n @ViewChild('containerRef') containerRef!: ElementRef<HTMLInputElement>;\n @ViewChild('dropdown') dropdown!: NgbPopover;\n @ViewChild('closeTooltip') closeTooltip!: NgbPopover;\n\n // Directive refs\n @ViewChild(PasswordDirective) PasswordDirective!: PasswordDirective;\n @ViewChild(NumberFormatDirective)\n NumberFormatDirective!: NumberFormatDirective;\n @ViewChild(MaskDirective)\n MaskDirective!: MaskDirective;\n\n // Template refs\n @ViewChild('dropdownOptionsRef') dropdownOptionsRef: any;\n @ViewChild('dispatchesRef') dispatchesRef: any;\n @ViewChild('ftlDispatchRef') ftlDispatchRef: any;\n @ViewChild('labelPickerRef') labelPickerRef: any;\n @ViewChild('brokerRef') brokerRef: any;\n @ViewChild('contactRef') contactRef: any;\n @ViewChild('shipperRef') shipperRef: any;\n @ViewChild('bankRef') bankRef: any;\n @ViewChild('dispatcherRef') dispatcherRef: any;\n @ViewChild('truckRef') truckRef: any;\n @ViewChild('trailerRef') trailerRef: any;\n\n @ViewChild('selectedDispatchRef') selectedDispatchRef: any;\n @ViewChild('selectedLabelRef') selectedLabelRef: any;\n @ViewChild('selectedBrokerRef') selectedBrokerRef: any;\n @ViewChild('selectedContactRef') selectedContactRef: any;\n @ViewChild('selectedShipperRef') selectedShipperRef: any;\n @ViewChild('selectedBankRef') selectedBankRef: any;\n @ViewChild('selectedDispatcherRef') selectedDispatcherRef: any;\n @ViewChild('selectedTruckRef') selectedTruckRef: any;\n @ViewChild('selectedTrailerRef') selectedTrailerRef: any;\n\n // Inputs\n\n /**\n * Defines the unique identifier for the input element.\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 * It is provided by the parent component as an Angular `input()` signal.\n - `type`: HTML input type (`'text'`, `'password'`, `'number'`).\n - `name`: The HTML `name` attribute.\n - `required`: If `true`, the input is required for form submission.\n - `alignment`: Text alignment within the input (`'left'` or `'right'`).\n - `inverse`: If `true`, renders the input in a dark mode style.\n - `reveal`: For password inputs, the number of characters to reveal from the end.\n - `icon`: Name of an icon to display (e.g., `'cai-email'`).\n - `iconColor`: Color of the displayed icon (e.g., `'#FF0000'`).\n - `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'ftl-dispatch'`, `'broker'`, `'contact'`, `'shipper'`, `'dispatcher'`, `'truck'`, `'trailer'`, `'bank'` or `'label'` variants.\n - `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]` | `DepartmentContactsPair[]` | `Shipper[]` | `Bank[]` | `Dispatcher[]`.\n - `labelColors`: An array of label colors for the label picker.\n - `search`: Enables search within the dropdown.\n - `add`: Enables 'add new' functionality in the dropdown.\n - `placeholderBehavior`: Defines placeholder animation (`'dynamic'` , `'fade'`, `'static'`).\n - `errorBehavior`: Defines error animation (`'static'`, `'dynamic'`, `'floating'`).\n - `label`: An `aria-label` for accessibility.\n - `list`: If `true`, the input has no validation, no background and no separators for icons\n - `inTable`: If `true`, has in-table styles\n - `mask`: A pattern string for input masking (e.g., `'(000) 000-0000'`).\n - `min`: Minimum value for number inputs.\n - `max`: Maximum value for number inputs (e.g., `999` meaning 3 characters) or maximum length for text inputs in characters.\n - `textTransform`: Text transformation for text inputs (`'capitalize'`, `'uppercase'`, `'lowercase'`).\n - `textColor`: Text color for text inputs (`'positive'`).\n - `step`: Step value for number inputs. Can also be `automatic` for automatic step calculation.\n - `withButtons`: If `true`, adds increment/decrement buttons for number inputs.\n - `autocomplete`: The HTML `autocomplete` attribute.\n - `disabled`: If `true`, the input is disabled (for use without reactive form).\n - `passwordRequirements`: If `true`, shows password requirements for password inputs.\n - `optionValue`: The key of the option to use in the formControl for the selected option in the dropdown.\n - `optionLabel`: The key of the option to use as the label in the dropdown.\n - `subContent`: An optional slot for additional content to be displayed next to the content the user is entering. (ex. lbs, months, etc.)\n - `removable`: If `true`, displays `cai-delete` icon over clear button.\n - `autofocus`: If `true`, the input will be focused when the component is initialized.\n */\n config = input<CaiInputConfig>({});\n\n /**\n * Input property to hold the dropdown options.\n */\n options = input<DropdownArrays>([]);\n\n /**\n * Input property to hold the label colors for the label picker.\n */\n labelColors = input<LabelColor[]>();\n\n // Signals\n\n /**\n * Internal signal to track the disabled state of the input.\n */\n disabled = signal<boolean>(false);\n\n /**\n * Holds the internal, unmasked, and unformatted value of the input.\n */\n value = signal<string>('');\n\n /**\n * Tracks the visibility state for inputs of `type='password'`.\n */\n visible = signal<boolean>(false);\n\n /**\n * A signal that holds the locally added options.\n */\n localOptions = signal(this.options());\n\n /**\n * A signal that holds the currently selected option from the dropdown.\n */\n selectedOption = signal<DropdownOptions | null>(null);\n\n /**\n * A signal that indicates whether a new option is being added.\n */\n isAdding = signal<boolean>(false);\n\n // Label picker signals\n\n /**\n * A signal that holds the currently selected color from the label picker.\n */\n selectedColor = signal<LabelColor>({});\n\n isPickingColor = signal<boolean>(false);\n\n // Dispatch board signals\n\n /**\n * A signal that holds the currently selected dispatch board from the dispatch board picker.\n */\n\n foldedBoards = signal<number[]>([]);\n\n // Computed signals\n\n /**\n * A computed signal that indicates whether the placeholder selected option should be shown.\n */\n hasText = computed<boolean>(() => {\n return Boolean(\n this.value() ||\n this.selectedOption() ||\n this.isAdding() ||\n this.isPickingColor()\n );\n });\n\n /**\n * A computed signal that dynamically calculates the step value for number inputs.\n */\n step = computed(() => {\n const numericValue = parseFloat(this.value() || '0');\n const value = numericValue || 0;\n if (this.config().step === 'automatic') {\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 } else if (this.config().step) return this.config().step as number;\n else {\n return 1;\n }\n });\n\n combinedOptions = computed(() => {\n if (!this.options()) return [];\n if (!this.localOptions()) return this.options();\n return [...this.options(), ...this.localOptions()] as DropdownArrays;\n });\n\n // Dispatch board\n\n dispatchCount = computed<number>(() => {\n if (!(this.options() as DispatchBoard[])) return 0;\n return (this.options() as DispatchBoard[])!.reduce(\n (acc, board) => acc + board.count,\n 0\n );\n });\n\n // Outputs\n\n /**\n * An output signal that emits the value of the added option.\n */\n onOptionAdded = output<DropdownOption | LabelOption>();\n\n /**\n * An output signal that emits when the user clicks on the \"ADD NEW\" button in the dropdown.\n */\n onAdd = output();\n\n /**\n * An output signal that emits the `optionValue` or `id` of the changed dropdown option.\n */\n onSelectionChange = output<DropdownKeys | null>();\n\n /**\n * An output signal that emits when the user clicks on the \"CLEAR\" button.\n */\n onClear = output();\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 ngAfterViewInit(): void {\n setTimeout(() => {\n if (this.config().autofocus) {\n this.focus();\n }\n }, 0);\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 * @param event - The input event object.\n */\n onInput(event: Event): void {\n const inputElement = event.target as HTMLInputElement;\n const max = this.config().max;\n\n // Handle inputs normally for all inputs other than password and number\n if (\n (this.config().type === 'password' && this.config().reveal) ||\n this.config().type === 'number' //||\n //!!this.config().mask\n ) {\n return;\n }\n\n if (max && inputElement.value.length > max) {\n inputElement.value = inputElement.value.slice(0, max);\n return;\n }\n\n if (this.config().textTransform) {\n switch (this.config().textTransform) {\n case 'capitalize':\n let words = inputElement.value.split(' ');\n inputElement.value = words\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n break;\n case 'uppercase':\n inputElement.value = inputElement.value.toUpperCase();\n break;\n case 'lowercase':\n inputElement.value = inputElement.value.toLowerCase();\n break;\n }\n }\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 // ControlValueAccessor methods\n onChange = (_: any) => {};\n onTouched = () => {};\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n /**\n * Writes a new value to the element. (ControlValueAccessor)\n */\n writeValue(value: string): void {\n if (value && this.config().textTransform && typeof value === 'string') {\n switch (this.config().textTransform) {\n case 'capitalize':\n let words = value.split(' ');\n value = words\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n break;\n case 'uppercase':\n value = value.toUpperCase();\n break;\n case 'lowercase':\n value = value.toLowerCase();\n break;\n }\n }\n this.value.set(value);\n\n const optionValue = this.config().optionValue;\n\n setTimeout(() => {\n if (value) {\n this.onTouched();\n } else {\n this.selectedOption.set(null);\n this.setValue();\n return;\n }\n\n if (!this.config().dropdown) {\n this.setValue();\n }\n\n if (!this.options()) {\n return;\n }\n\n if (!this.options().length) {\n return;\n }\n\n switch (this.config().dropdown) {\n case 'dispatch':\n case 'ftl-dispatch':\n // TODO: Leave only board variant once backend is fixed\n if (this.hasProperty(this.options()[0], 'dispatches')) {\n for (const board of (this.options() as DispatchBoard[])!) {\n const dispatch = board.dispatches.find((dispatch) => {\n if (optionValue && this.hasProperty(dispatch, optionValue)) {\n return (\n dispatch[optionValue]?.toString() === value?.toString()\n );\n } else {\n return dispatch.id?.toString() === value?.toString();\n }\n });\n if (dispatch) {\n this.selectedOption.set(dispatch);\n this.value.set('');\n }\n }\n } else {\n const dispatch = (this.options() as Dispatch[])!.find(\n (dispatch) => {\n if (optionValue && this.hasProperty(dispatch, optionValue)) {\n return (\n dispatch[optionValue]?.toString() === value?.toString()\n );\n } else {\n return dispatch.id?.toString() === value?.toString();\n }\n }\n );\n if (dispatch) {\n this.selectedOption.set(dispatch);\n this.value.set('');\n }\n }\n break;\n case 'label':\n const label = (this.options() as LabelOption[])!.find((label) => {\n if (optionValue && this.hasProperty(label, optionValue)) {\n return label[optionValue]?.toString() === value?.toString();\n } else {\n return label.id?.toString() === value?.toString();\n }\n });\n if (label) {\n this.selectedOption.set(label);\n this.value.set('');\n }\n break;\n case 'broker':\n const broker = (this.options() as Broker[])!.find((broker) => {\n if (optionValue && this.hasProperty(broker, optionValue)) {\n return broker[optionValue]?.toString() === value?.toString();\n } else {\n return broker.id?.toString() === value?.toString();\n }\n });\n if (broker) {\n this.selectedOption.set(broker);\n this.value.set('');\n }\n break;\n case 'contact':\n for (const departmentContactsPair of this.options() as DepartmentContactsPair[]) {\n const contact = departmentContactsPair.contacts?.find((contact) => {\n if (optionValue && this.hasProperty(contact, optionValue)) {\n return contact[optionValue]?.toString() === value?.toString();\n } else {\n return contact.id?.toString() === value?.toString();\n }\n });\n if (contact) {\n this.selectedOption.set(contact);\n this.value.set('');\n }\n }\n break;\n case 'shipper':\n const shipper = (this.options() as Shipper[])!.find((shipper) => {\n if (optionValue && this.hasProperty(shipper, optionValue)) {\n return shipper[optionValue]?.toString() === value?.toString();\n } else {\n return shipper.id?.toString() === value?.toString();\n }\n });\n if (shipper) {\n this.selectedOption.set(shipper);\n this.value.set('');\n }\n break;\n case 'bank':\n const bank = (this.options() as Bank[])!.find((bank) => {\n if (optionValue && this.hasProperty(bank, optionValue)) {\n return bank[optionValue]?.toString() === value?.toString();\n } else {\n return bank.id?.toString() === value?.toString();\n }\n });\n if (bank) {\n this.selectedOption.set(bank);\n this.value.set('');\n }\n break;\n\n case 'dispatcher':\n const dispatcher = (this.options() as Dispatcher[])!.find(\n (dispatcher) => {\n if (optionValue && this.hasProperty(dispatcher, optionValue)) {\n return (\n dispatcher[optionValue]?.toString() === value?.toString()\n );\n } else {\n return dispatcher.id?.toString() === value?.toString();\n }\n }\n );\n if (dispatcher) {\n this.selectedOption.set(dispatcher);\n this.value.set('');\n }\n break;\n case 'truck':\n const truck = (this.options() as TruckType[])!.find((truck) => {\n if (optionValue && this.hasProperty(truck, optionValue)) {\n return truck[optionValue]?.toString() === value?.toString();\n } else {\n return truck.id?.toString() === value?.toString();\n }\n });\n if (truck) {\n this.selectedOption.set(truck);\n this.value.set('');\n }\n break;\n case 'trailer':\n const trailer = (this.options() as TrailerType[])!.find((trailer) => {\n if (optionValue && this.hasProperty(trailer, optionValue)) {\n return trailer[optionValue]?.toString() === value?.toString();\n } else {\n return trailer.id?.toString() === value?.toString();\n }\n });\n if (trailer) {\n this.selectedOption.set(trailer);\n this.value.set('');\n }\n break;\n case true:\n const option = (this.options() as DropdownOption[])!.find(\n (option) => {\n if (optionValue && this.hasProperty(option, optionValue)) {\n return option[optionValue]?.toString() === value?.toString();\n } else {\n return option.id?.toString() === value?.toString();\n }\n }\n );\n if (option) {\n this.selectedOption.set(option);\n if (this.config().search || this.config().add) {\n this.value.set('');\n } else {\n this.value.set(option[this.config().optionLabel || 'label']);\n }\n }\n break;\n default:\n break;\n }\n this.setValue();\n });\n }\n\n /**\n * Increments the value of a number input by the current step.\n */\n increment(event: MouseEvent): void {\n const max = this.config().max;\n if (max && Number(this.value()) + this.step() > max) {\n this.value.set(String(max));\n } else {\n this.value.update((v) =>\n String(\n (parseFloat(v) ? parseFloat(v) : this.config().min || 0) + this.step()\n )\n );\n }\n this.onChange(this.value());\n this.setValue();\n this.focus(event);\n }\n\n /**\n * Decrements the value of a number input by the current step.\n */\n decrement(event: MouseEvent): void {\n const min = this.config().min;\n if (min && Number(this.value()) - this.step() < min) {\n this.value.set(String(min));\n } else {\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 }\n this.onChange(this.value());\n this.setValue();\n this.focus(event);\n }\n\n /**\n * Toggles the visibility of the password input.\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 */\n setValue(): void {\n if (!this.inputRef || !this.inputRef.nativeElement) {\n return;\n }\n\n let type = !!this.config().mask ? 'masked' : this.config().type;\n\n if (type === 'password' && !this.config().reveal) {\n type = 'text';\n }\n\n switch (type) {\n case 'password':\n if (this.PasswordDirective) {\n this.PasswordDirective.setRealValue(this.value());\n } else {\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n case 'number':\n if (this.NumberFormatDirective) {\n this.NumberFormatDirective.setRealValue(this.value());\n } else {\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n case 'masked':\n if (this.MaskDirective) {\n this.MaskDirective.setRealValue(this.value());\n } else {\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n default:\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 if (event) {\n event.stopPropagation();\n event.preventDefault();\n }\n if (this.inputRef && this.inputRef.nativeElement) {\n this.inputRef.nativeElement.focus();\n }\n }\n\n /**\n * Called when the input element receives focus (focus event).\n */\n onFocus(event: FocusEvent): void {\n if (\n !this.config().add &&\n !(this.config().dropdown === 'dispatch') &&\n !this.config().search\n )\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 */\n onBlur(): void {\n this.onTouched();\n this.dropdown.close();\n\n if (\n !this.config().add &&\n !(this.config().dropdown === 'dispatch') &&\n !this.config().search\n )\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 */\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.onSelectionChange.emit(null);\n this.onClear.emit();\n this.closeTooltip.close();\n\n this.dropdown.close();\n }\n\n /**\n * Returns the reference to the dropdown element based on the dropdown type.\n */\n getDropdownRef() {\n switch (this.config().dropdown) {\n case 'dispatch':\n return this.dispatchesRef;\n case 'ftl-dispatch':\n return this.ftlDispatchRef;\n case 'label':\n return this.labelPickerRef;\n case 'broker':\n return this.brokerRef;\n case 'contact':\n return this.contactRef;\n case 'shipper':\n return this.shipperRef;\n case 'bank':\n return this.bankRef;\n case 'dispatcher':\n return this.dispatcherRef;\n case 'trailer':\n return this.trailerRef;\n case 'truck':\n return this.truckRef;\n default:\n return this.dropdownOptionsRef;\n }\n }\n\n /**\n * Returns the reference to the selected element based on the dropdown type.\n */\n getSelectedRef() {\n switch (this.config().dropdown) {\n case 'dispatch':\n case 'ftl-dispatch':\n return this.selectedDispatchRef;\n case 'label':\n return this.selectedLabelRef;\n case 'broker':\n return this.selectedBrokerRef;\n case 'contact':\n return this.selectedContactRef;\n case 'shipper':\n return this.selectedShipperRef;\n case 'bank':\n return this.selectedBankRef;\n case 'dispatcher':\n return this.selectedDispatcherRef;\n case 'trailer':\n return this.selectedTrailerRef;\n case 'truck':\n return this.selectedTruckRef;\n default:\n return;\n }\n }\n\n /**\n * Type guard that checks if a given property exists on an object.\n * @param obj The object to check.\n * @param prop The property to check for.\n * @returns `true` if `prop` exists on `obj`, `false` otherwise.\n */\n hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T {\n return prop in obj;\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: DropdownOptions) {\n const optionValue = this.config().optionValue;\n\n if (optionValue && this.hasProperty(option, optionValue)) {\n this.onChange(option[optionValue]);\n this.onSelectionChange.emit(option[optionValue]);\n } else {\n this.onChange(option.id);\n this.onSelectionChange.emit(option.id);\n }\n\n this.selectedOption.set(option);\n\n if (typeof this.config().dropdown === 'string') {\n this.value.set('');\n } else {\n this.selectedOption.set(option as DropdownOption);\n if (this.config().search || this.config().add) {\n this.value.set('');\n } else {\n this.value.set(\n (option as DropdownOption)[this.config().optionLabel || 'label']\n );\n }\n }\n\n this.setValue();\n this.dropdown.close();\n }\n\n /**\n * Adds a new option to the dropdown.\n * @param option - The option to add.\n */\n addOption() {\n if (!this.inputRef.nativeElement.value) {\n this.isAdding.set(false);\n this.reset();\n }\n\n // Label picker add option logic\n if (this.config().dropdown === 'label') {\n let labels = [...this.options(), ...this.localOptions()] as LabelOption[];\n let id = labels.length + 1;\n while (labels.find((label) => label.id === id)) {\n id++;\n }\n const label: LabelOption = {\n id: id,\n name: this.inputRef.nativeElement.value,\n color: this.selectedColor().name,\n colorId: this.selectedColor().id,\n code: this.selectedColor().code,\n hoverCode: this.selectedColor().hoverCode,\n };\n\n this.localOptions.update((labels) => [\n ...(labels as LabelOption[]),\n label as LabelOption,\n ]);\n this.isAdding.set(false);\n\n this.value.set('');\n this.onChange(label.id);\n this.setValue();\n\n this.selectedOption.set(label);\n this.onOptionAdded.emit(label);\n return;\n }\n\n const option: DropdownOption = {\n id: this.options.length + 1,\n label: this.inputRef.nativeElement.value,\n };\n\n this.localOptions.update((options) => [\n ...(options as DropdownOption[]),\n option as DropdownOption,\n ]);\n this.isAdding.set(false);\n\n this.value.set(option[this.config().optionValue || 'label']);\n this.onChange(option.id);\n this.setValue();\n\n this.selectedOption.set(option);\n this.onOptionAdded.emit(option);\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 handleAddingOption(event?: MouseEvent) {\n this.onAdd.emit();\n\n if (!this.config().add) return;\n if (\n typeof this.config().dropdown === 'string' &&\n this.config().dropdown !== 'label'\n ) {\n this.dropdown.close();\n return;\n }\n // Color picker logic for label input\n if (this.config().dropdown === 'label') {\n if (this.isPickingColor()) {\n this.isAdding.set(true);\n this.isPickingColor.set(false);\n this.dropdown.close();\n if (event) this.focus(event);\n return;\n }\n this.isPickingColor.set(true);\n if (event) this.focus(event);\n this.dropdown.open();\n this.value.set('');\n this.setValue();\n return;\n }\n\n this.isAdding.set(true);\n this.dropdown.close();\n if (event) this.focus(event);\n }\n\n // Dispatch modal\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 // Label picker\n\n handleSelectColor(color: LabelColor, event?: MouseEvent) {\n this.value.set('');\n this.setValue();\n this.selectedColor.set(color);\n this.handleAddingOption(event);\n }\n\n // Broker modal\n\n getBrokerProgress(broker: Broker, disable?: boolean) {\n let activePercentageOfPaid;\n let status;\n let availableCredit = broker.availableCredit || 0;\n let creditLimit = broker.creditLimit || 0;\n if (broker.availableCredit === 0) {\n activePercentageOfPaid = 100;\n status = disable ? 'disable' : 'high';\n return { activePercentageOfPaid, status };\n } else {\n activePercentageOfPaid = (+availableCredit / +creditLimit) * 100;\n }\n\n if (activePercentageOfPaid >= 0 && activePercentageOfPaid < 30) {\n status = disable ? 'disable' : 'low';\n } else if (activePercentageOfPaid > 30 && activePercentageOfPaid < 60) {\n status = disable ? 'disable' : 'medium';\n } else if (activePercentageOfPaid > 60 && activePercentageOfPaid <= 100) {\n status = disable ? 'disable' : 'high';\n } else {\n status = null;\n }\n\n return { activePercentageOfPaid, status };\n }\n\n // Casting methods for template\n\n castAsDispatch(value: unknown): Dispatch | null {\n return value as Dispatch;\n }\n\n castAsLabelOption(value: unknown): LabelOption | null {\n return value as LabelOption;\n }\n\n castAsBroker(value: unknown): Broker | null {\n return value as Broker;\n }\n\n castAsContact(value: unknown): Contact | null {\n return value as Contact;\n }\n\n castAsShipper(value: unknown): Shipper | null {\n return value as Shipper;\n }\n\n castAsBank(value: unknown): Bank | null {\n return value as Bank;\n }\n\n castAsDispatcher(value: unknown): Dispatcher | null {\n return value as Dispatcher;\n }\n\n castAsDropdownOption(value: unknown): DropdownOption | null {\n return value as DropdownOption;\n }\n\n castAsTruckOption(value: unknown): TruckType | null {\n return value as TruckType;\n }\n\n castAsTrailerOption(value: unknown): TrailerType | null {\n return value as TrailerType;\n }\n}\n","@let valid = ngControl?.valid && (ngControl?.touched || ngControl?.dirty) &&\n!isAdding();\n<!---->\n@let invalid = ngControl?.invalid && (ngControl?.touched || ngControl?.dirty) &&\n!isAdding(); @let type = config().type;\n<!---->\n@let icon = config().icon;\n<!---->\n@let alignment = config().alignment;\n<!---->\n@let inverse = config().inverse;\n<!---->\n@let name = config().name;\n<!---->\n@let required = config().required;\n<!---->\n@let reveal = config().reveal;\n<!---->\n@let password = type === 'password';\n<!---->\n@let number = type === 'number';\n<!---->\n@let ariaLabel = config().label;\n<!---->\n@let hasDropdown = config().dropdown;\n<!---->\n@let add = config().add;\n<!---->\n@let search = config().search;\n<!---->\n@let placeholderBehavior = config().placeholderBehavior;\n<!---->\n@let errorBehavior = config().errorBehavior;\n<!---->\n@let mask = this.config().mask;\n<!---->\n@let autocomplete = this.config().autocomplete;\n<!---->\n@let withButtons = this.config().withButtons;\n<!---->\n@let iconColor = this.config().iconColor;\n<!---->\n@let list = this.config().list;\n<!---->\n@let passwordRequirements = this.config().passwordRequirements;\n<!---->\n@let dispatch = config().dropdown === 'dispatch';\n<!---->\n@let ftlDispatch = config().dropdown === 'ftl-dispatch';\n<!---->\n@let labelPicker = this.config().dropdown === 'label';\n<!---->\n@let broker = this.config().dropdown === 'broker';\n<!---->\n@let contact = this.config().dropdown === 'contact';\n<!---->\n@let shipper = this.config().dropdown === 'shipper';\n<!---->\n@let subcontent = this.config().subcontent;\n<!---->\n@let bank = this.config().dropdown === 'bank';\n<!---->\n@let optionLabel = this.config().optionLabel || 'label';\n<!---->\n@let dispatcher = this.config().dropdown === 'dispatcher';\n<!---->\n@let trailer = this.config().dropdown === 'trailer';\n<!---->\n@let truck = this.config().dropdown === 'truck';\n<!---->\n@let removable = this.config().removable;\n<!---->\n@let inTable = this.config().inTable;\n<!---->\n@let textColor = this.config().textColor;\n\n<div\n class=\"app-input-container\"\n [class]=\"{\n 'has-text': hasText(),\n 'is-empty': !hasText(),\n 'has-error': invalid && !list,\n 'has-valid': valid && !list,\n 'has-icon': icon,\n 'has-password': password,\n 'has-visible': password && visible(),\n 'has-number': number && withButtons,\n 'has-right': alignment === 'right',\n inverse: inverse,\n 'has-dropdown': hasDropdown,\n 'is-adding': add && isAdding(),\n 'has-ftl-dispatch': ftlDispatch,\n 'has-dispatch': dispatch,\n 'fade-placeholder': placeholderBehavior === 'fade' || inTable,\n 'static-placeholder': placeholderBehavior === 'static',\n 'floating-error': errorBehavior === 'floating' || inTable,\n 'static-error': errorBehavior === 'static',\n 'has-selected': selectedOption(),\n 'list-view': list,\n 'has-end-item': broker || contact || dispatch || ftlDispatch || shipper,\n removable: removable,\n 'in-table': inTable,\n 'text-color-positive': textColor === 'positive',\n }\"\n ngbDropdown\n [autoClose]=\"'outside'\"\n [container]=\"'body'\"\n #dropdown=\"ngbDropdown\"\n dropdownClass=\"cai-dropdown\"\n #containerRef\n ngbTooltip=\"{{\n (errorBehavior === 'floating' || (errorBehavior === 'static' && hasText()) || inTable) && invalid\n ? (ngControl?.errors | errorMessage)[0]\n : ''\n }}\"\n tooltipClass=\"tooltip error-tooltip\"\n>\n @if (config().icon && !password && !withButtons) {\n <div\n class=\"icon-container\"\n (mousedown)=\"focus($event)\"\n [class]=\"{\n 'colored-icon': iconColor\n }\"\n [style.--icon-color]=\"iconColor || ''\"\n >\n @if(hasDropdown && placeholderBehavior === 'static'){\n <div class=\"separator separator-static-dropdown\"></div>\n }\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\n class=\"password-icons\"\n ngbTooltip=\"{{ visible() ? 'Hide' : 'Show' }}\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n >\n <svg-icon class=\"icon password-key\" name=\"cai-password-key\"></svg-icon>\n <svg-icon\n class=\"icon password-shown\"\n name=\"cai-password-shown\"\n ></svg-icon>\n <svg-icon\n class=\"icon password-hidden\"\n name=\"cai-password-hidden\"\n ></svg-icon>\n </div>\n <div class=\"separator\"></div>\n </div>\n }\n \n <input\n class=\"app-input\"\n [type]=\"password && !reveal ? (visible() ? 'text' : 'password') : 'text'\"\n [name]=\"name\"\n [required]=\"required\"\n [disabled]=\"disabled() || this.config().disabled\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabel\"\n placeholder=\"\"\n [autocomplete]=\"autocomplete ? autocomplete : 'off'\"\n #inputRef\n [appPassword]=\"password\"\n [appMask]=\"mask || ''\"\n [reveal]=\"reveal || 0\"\n [visible]=\"visible()\"\n [appNumberFormat]=\"number\"\n [prefix]=\"this.config().prefix || ''\"\n [max]=\"this.config().max\"\n (focus)=\"!isAdding() && (hasDropdown && dropdown.open()); onFocus($event)\"\n (click)=\"!isAdding() && hasDropdown && dropdown.open()\"\n />\n <label class=\"app-input-label\">\n @if(dispatch || ftlDispatch){\n <p class=\"truck-item app-input-name\">Truck</p>\n <p class=\"trailer-item\">Trailer</p>\n <p>Driver</p>\n <p class=\"sub-label\">Rate</p>\n } @else if(broker){\n <p class=\"app-input-name\">{{ name }}</p>\n <p class=\"sub-label\">Credit</p>\n }@else if(contact){\n <p class=\"app-input-name\">{{ name }}</p>\n <p class=\"sub-label\">Phone</p>\n }@else if(shipper){\n <p class=\"app-input-name\">{{ name }}</p>\n <p class=\"sub-label\">Address</p>\n } @else {\n <span class=\"app-input-name\">{{ name }}</span>\n }\n </label>\n @if(number && withButtons) {\n <div class=\"number-container\">\n <div class=\"number-buttons\">\n <div class=\"separator\"></div>\n <svg-icon\n ngbTooltip=\"Add\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n name=\"cai-plus\"\n class=\"bg-icon plus-icon\"\n (mousedown)=\"increment($event)\"\n ></svg-icon>\n <svg-icon\n ngbTooltip=\"Remove\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n name=\"cai-minus\"\n class=\"bg-icon minus-icon\"\n (mousedown)=\"decrement($event)\"\n ></svg-icon>\n </div>\n </div>\n }\n\n @if(!inTable){\n <svg-icon\n name=\"cai-checkmark\"\n class=\"app-input-icon positive-icon\"\n ></svg-icon>\n <svg-icon\n name=\"cai-status-warning\"\n class=\"app-input-icon warning-icon\"\n ></svg-icon>\n\n @if (invalid) {\n <div class=\"app-input-error\">\n {{ (ngControl?.errors | errorMessage)[0] || \"Invalid field.\" }}\n </div>\n }\n }\n\n <!-- Accept button -->\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 ngbTooltip=\"Accept\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n >\n <svg-icon name=\"cai-checkmark\"></svg-icon>\n </button>\n }\n\n <!-- Cancel button -->\n <button\n type=\"button\"\n class=\"app-input-icon button-icon bg-icon cancel-button\"\n (click)=\"reset()\"\n [tabIndex]=\"-1\"\n ngbTooltip=\"{{ hasText() && isAdding() ? 'Cancel' : 'Delete' }}\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n #closeTooltip = 'ngbTooltip'\n >\n <svg-icon name=\"{{ removable ? 'cai-delete' : 'cai-cancel' }}\"></svg-icon>\n </button>\n\n <div class=\"dropdown-anchor\" \n ngbDropdownAnchor\n ></div>\n <!-- Dropdown menu -->\n @if(hasDropdown) {\n <div class=\"dropdown-menu\" ngbDropdownMenu [style.width.px]=\"containerRef.offsetWidth\">\n @if(add && !dispatch && !ftlDispatch){\n <button\n class=\"dropdown-item add-new\"\n (mousedown)=\"handleAddingOption($event)\"\n >\n <p>ADD NEW</p>\n <svg-icon name=\"cai-plus\" class=\"dropdown-item-icon\"></svg-icon>\n </button>\n }\n <ng-container *ngTemplateOutlet=\"getDropdownRef()\"></ng-container>\n </div>\n\n <div class=\"dropdown-icon-container\"\n (mousedown)=\"focus($event)\"\n >\n <svg-icon\n name=\"cai-arrow-secondary-down\"\n class=\"dropdown-icon icon\"\n ></svg-icon>\n </div>\n\n <!-- Placeholder -->\n @if(dispatch || ftlDispatch || broker || labelPicker || contact || shipper ||\n bank || dispatcher || truck || trailer){\n <ng-container *ngTemplateOutlet=\"getSelectedRef()\"></ng-container>\n } @else if ((add || search) && !inputRef.value && !this.isAdding()){\n <p class=\"dropdown-selected\">\n @if(placeholderBehavior === 'static'){\n <p class=\"selected-label-hidden\">{{ name + (required ? ' *' : '' )}}</p>\n <p class=\"selected-text\">{{selectedOption() &&\n castAsDropdownOption(selectedOption())![optionLabel || \"label\"]}}</p>\n }\n @else {\n {{\n selectedOption() &&\n castAsDropdownOption(selectedOption())![optionLabel || \"label\"]\n }}\n }\n </p>\n } } @if(passwordRequirements){\n <div class=\"dropdown-menu password-requirement\" ngbDropdownMenu>\n <ng-container *ngTemplateOutlet=\"passwordRequirementsRef\"></ng-container>\n </div>\n } @if(subcontent){\n <p class=\"subcontent\">\n @if(!(alignment === 'right')){\n <span class=\"subcontent-hide\">{{ inputRef.value }} </span>\n }\n {{ subcontent }}\n </p>\n }\n</div>\n\n<!-- Templates -->\n\n<!-- dropdowns -->\n@let dropdownOptions = (combinedOptions() | filterBySearch: value() :\nthis.config().dropdown : search: this.foldedBoards() : optionLabel) || [];\n\n<!-- Password requirements -->\n<ng-template #passwordRequirementsRef>\n <p>Password Requirement</p>\n <ul>\n <li>\n <svg-icon\n [name]=\"\n !this.ngControl?.errors?.['minlength'] && this.value()\n ? 'cai-checkmark'\n : 'cai-cancel'\n \"\n class=\"icon\"\n ></svg-icon\n ><span>Minimum 8 characters</span>\n </li>\n <li>\n <svg-icon\n class=\"icon\"\n [name]=\"\n !this.ngControl?.errors?.['hasNumber'] && this.value() ? 'cai-checkmark' : 'cai-cancel'\n \"\n ></svg-icon\n ><span>One number</span>\n </li>\n <li>\n <svg-icon\n class=\"icon\"\n [name]=\"\n !this.ngControl?.errors?.['hasSymbol'] && this.value() ? 'cai-checkmark' : 'cai-cancel'\n \"\n ></svg-icon\n ><span>One symbol</span>\n </li>\n <li>\n <svg-icon\n class=\"icon\"\n [name]=\"\n !this.ngControl?.errors?.['hasUppercase'] && this.value()\n ? 'cai-checkmark'\n : 'cai-cancel'\n \"\n ></svg-icon\n ><span>One upper-case letter</span>\n </li>\n </ul>\n</ng-template>\n\n<!-- Standard dropdown -->\n<ng-template #dropdownOptionsRef>\n @if(dropdownOptions.length){ @for(option of dropdownOptions; track $index ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ option.id }}\"\n (mousedown)=\"handleOption(option)\"\n [class]=\"{\n 'selected': castAsDropdownOption(selectedOption())?.id === option.id,\n }\"\n >\n @if(option[optionLabel] === \"Hazardous\"){\n <svg-icon name=\"cai-violation-hazmat\" class=\"icon\"></svg-icon>\n }\n <p\n class=\"dropdown-content-with-icon\"\n [innerHTML]=\"\n search\n ? (option[optionLabel] | highlightSearch : value())\n : option[optionLabel]\n \"\n ></p>\n <svg-icon name=\"cai-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 #bankRef>\n @if(dropdownOptions.length){ @for(bank of dropdownOptions; track $index ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ bank.id }}\"\n (mousedown)=\"handleOption(bank)\"\n [class]=\"{\n 'selected': castAsBank(selectedOption())?.id === bank.id,\n }\"\n >\n @if(bank.logoName){\n <svg-icon class=\"bank-icon\" [name]=\"bank.logoName.slice(0, -4)\"></svg-icon>\n }@else{\n <p\n class=\"dropdown-content-with-icon\"\n [innerHTML]=\"search ? (bank.name | highlightSearch : value()) : bank.name\"\n ></p>\n\n }\n <svg-icon name=\"cai-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<!-- Broker -->\n<ng-template #brokerRef>\n @if(dropdownOptions.length){ @for(broker of dropdownOptions; track $index ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"broker-{{ broker.id }}\"\n (mousedown)=\"!(broker.dnu || broker.ban) && handleOption(broker)\"\n [class]=\"{\n selected: castAsBroker(selectedOption())?.id === broker.id,\n banned: broker.dnu || broker.ban,\n dnu: broker.dnu\n }\"\n >\n @if(broker.dnu || broker.ban){\n <svg-icon name=\"cai-minus\" class=\"round-icon\"></svg-icon>\n } @else if((broker.availableCredit || 0) < 0){\n <svg-icon name=\"cai-status-warning-lite\" class=\"icon fraud\"></svg-icon>\n }\n <p\n class=\"dropdown-content\"\n [innerHTML]=\"\n search\n ? (broker.businessName || '' | highlightSearch : value())\n : broker.businessName\n \"\n ></p>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-base\">\n @if(!broker.creditLimit){\n <p>Unlimited</p>\n } @else {\n <p>{{ broker.availableCredit || 0 | currency }}</p>\n <div\n class=\"progress-bar\"\n [style.--progress]=\"\n getBrokerProgress(broker, broker.dnu || broker.ban)\n .activePercentageOfPaid + '%'\n \"\n [class]=\"getBrokerProgress(broker, broker.dnu || broker.ban).status\"\n ></div>\n }\n </div>\n <div class=\"end-item-hover\">\n <p>\n {{ broker.loadsCount }} | {{ broker.availableCredit || 0 | currency }}\n </p>\n <svg-icon name=\"cai-load\" class=\"icon\"></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\n<!-- Contact dropdown -->\n<ng-template #contactRef>\n @if(dropdownOptions.length){ @for(departmentContactsPair of dropdownOptions;\n track $index ){ @for(contact of departmentContactsPair.contacts; track\n $index){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"contact-{{ contact.id }}\"\n (mousedown)=\"handleOption(contact)\"\n [class]=\"{\n selected: castAsContact(selectedOption())?.id === contact.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search\n ? (contact.contactName || '' | highlightSearch : value())\n : contact.contactName\n \"\n ></p>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-base\">\n <p>{{ departmentContactsPair.department?.name }}</p>\n </div>\n <div class=\"end-item-hover\">\n <p>\n {{ contact.phone }}\n </p>\n </div>\n </div>\n </button>\n } } } @else {\n <p class=\"dropdown-item no-results\">No results</p>\n }\n</ng-template>\n\n<!-- Shipper dropdown -->\n<ng-template #shipperRef>\n @if(dropdownOptions.length){ @for(shipper of dropdownOptions; track $index ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"shipper-{{ shipper.id }}\"\n (mousedown)=\"handleOption(shipper)\"\n [class]=\"{\n selected: castAsShipper(selectedOption())?.id === shipper.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search\n ? (shipper.businessName || '' | highlightSearch : value())\n : shipper.businessName\n \"\n ></p>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-base\">\n <p\n [innerHTML]=\"\n search\n ? (shipper.address?.address || '' | highlightSearch : value())\n : shipper.address?.address\n \"\n ></p>\n </div>\n <div class=\"end-item-hover\">\n <p>\n {{ shipper.pickupCount }} Pickup |\n {{ shipper.deliveryCount }} Delivery\n </p>\n <svg-icon name=\"cai-load\" class=\"icon\"></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\n<!-- Dispatch dropdown -->\n<ng-template #dispatchesRef>\n @if(dropdownOptions.length){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n (mousedown)=\"reset()\"\n [class]=\"{\n 'selected': !selectedOption(),\n }\"\n >\n <p>Unassigned</p>\n <div class=\"unassigned-ltl\">\n <p>{{ dispatchCount() || 0}}</p>\n <svg-icon name=\"cai-ltl-single\" class=\"icon-sm\"></svg-icon>\n </div>\n </button> @for(dispatchBoard of dropdownOptions; track\n dispatchBoard.id){ @if(dispatchBoard.count > 0){ @if(dispatchBoard.dispatcher\n !== \"NOBOARDSVARIANT\"){\n <button\n tabindex=\"-1\"\n class=\"dropdown-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=\"cai-arrow-primary-up\" class=\"group-icon icon\"></svg-icon>\n </button>}\n @for(dispatch of dispatchBoard.dispatches; track dispatch.id ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n (mousedown)=\"handleOption(dispatch)\"\n [class]=\"{\n 'selected': castAsDispatch(selectedOption())?.id === dispatch.id,\n }\"\n >\n <div class=\"dropdown-subitem truck-item\">\n <svg-icon\n class=\"truck-icon\"\n [style.--truck-color]=\"dispatch.truck.color?.code || ''\"\n [name]=\"dispatch.truck.truckType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p\n class=\"truck-number\"\n [innerHTML]=\"dispatch.truck.truckNumber | highlightSearch : value()\"\n ></p>\n </div>\n <div class=\"dropdown-subitem trailer-item\">\n @if(dispatch.trailer) {\n <svg-icon\n class=\"trailer-icon\"\n [name]=\"dispatch.trailer.trailerType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p\n class=\"trailer-number\"\n [innerHTML]=\"dispatch.trailer.trailerNumber | highlightSearch : value()\"\n ></p>\n }\n </div>\n <div class=\"dropdown-subitem\">\n @if(dispatch.coDriver){\n <svg-icon class=\"dispatch-icon\" name=\"cai-people\"></svg-icon>\n <p\n class=\"driver-name\"\n [innerHTML]=\"\n dispatch.driver.firstName + ' & ' + dispatch.coDriver.firstName\n | highlightSearch : value()\n \"\n ></p>\n } @else{\n <cai-avatar\n [driver]=\"dispatch.driver\"\n [size]=\"18\"\n [inverse]=\"true\"\n ></cai-avatar>\n <p\n class=\"driver-name\"\n [innerHTML]=\"\n dispatch.driver.firstName + ' ' + dispatch.driver.lastName\n | highlightSearch : value()\n \"\n ></p>\n }\n </div>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-hover\">\n <p>{{ dispatch.payType }}</p>\n <svg-icon name=\"cai-driver\" class=\"icon-sm\"></svg-icon>\n </div>\n <div class=\"end-item-base dispatch-ltl\">\n <p>{{ dispatch.dispatcherId }}</p>\n <svg-icon name=\"cai-ltl-single\" class=\"icon-sm\"></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\n<!-- ftl dispatch dropdown -->\n<ng-template #ftlDispatchRef>\n @if(dropdownOptions.length){ @for(dispatchBoard of dropdownOptions; track\n dispatchBoard.id){ @if(dispatchBoard.count > 0){ @if(dispatchBoard.dispatcher\n !== \"NOBOARDSVARIANT\"){\n <button\n tabindex=\"-1\"\n class=\"dropdown-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=\"cai-arrow-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\"\n (mousedown)=\"handleOption(dispatch)\"\n [class]=\"{\n 'selected': castAsDispatch(selectedOption())?.id === dispatch.id,\n }\"\n >\n <div class=\"dropdown-subitem truck-item\">\n <svg-icon\n class=\"truck-icon\"\n [style.--truck-color]=\"dispatch.truck.color?.code || ''\"\n [name]=\"dispatch.truck.truckType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p\n class=\"truck-number\"\n [innerHTML]=\"dispatch.truck.truckNumber | highlightSearch : value()\"\n ></p>\n </div>\n <div class=\"dropdown-subitem trailer-item\">\n @if(dispatch.trailer) {\n <svg-icon\n class=\"trailer-icon\"\n [name]=\"dispatch.trailer.trailerType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p\n class=\"trailer-number\"\n [innerHTML]=\"dispatch.trailer.trailerNumber | highlightSearch : value()\"\n ></p>\n }\n </div>\n <div class=\"dropdown-subitem\">\n @if(dispatch.coDriver){\n <svg-icon class=\"dispatch-icon\" name=\"cai-people\"></svg-icon>\n <p\n class=\"driver-name\"\n [innerHTML]=\"\n dispatch.driver.firstName + ' & ' + dispatch.coDriver.firstName\n | highlightSearch : value()\n \"\n ></p>\n } @else{\n <cai-avatar\n [driver]=\"dispatch.driver\"\n [size]=\"18\"\n [inverse]=\"true\"\n ></cai-avatar>\n <p\n class=\"driver-name\"\n [innerHTML]=\"\n dispatch.driver.firstName + ' ' + dispatch.driver.lastName\n | highlightSearch : value()\n \"\n ></p>\n }\n </div>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-hover\">\n @if(dispatch.status?.statusString){\n <div\n class=\"dispatch-status\"\n [class]=\"\n 'status-' +\n dispatch.status?.statusString\n ?.toLowerCase()\n ?.replaceAll(' ', '')\n ?.replaceAll('.', '')\n \"\n >\n @if(dispatch.status?.statusString?.toLowerCase() === \"repair\"){\n <p class=\"status-block blue\">D</p>\n <p class=\"status-block green\">L</p>\n }\n {{ dispatch.status?.statusString }}\n @if(dispatch.status?.statusString?.toLowerCase() === \"repair\"){\n <p class=\"status-block green\">P</p>\n <p class=\"status-block orange\">D</p>\n } @if(dispatch.status?.statusCheckInNumber){\n <p class=\"status-block\">\n {{ dispatch.status?.statusCheckInNumber }}\n </p>\n }\n </div>\n <p class=\"dispatch-separator\">|</p>\n }\n <p class=\"dispatch-load-count\">{{ dispatch.driver.status }}</p>\n <svg-icon name=\"cai-load\" class=\"icon-sm\"></svg-icon>\n </div>\n <div class=\"end-item-base\">\n <p>{{ dispatch.payType }}</p>\n <svg-icon name=\"cai-driver\" class=\"icon-sm\"></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\n<!-- Label dropdown -->\n<ng-template #labelPickerRef>\n @if(dropdownOptions.length && !isPickingColor()){ @for(label of\n dropdownOptions; track label.id ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item label-item\"\n (mousedown)=\"handleOption(label)\"\n [class]=\"{\n 'selected': castAsLabelOption(selectedOption())?.id === label.id,\n }\"\n >\n <svg-icon\n name=\"cai-label\"\n class=\"icon label-color\"\n [style.--label-color]=\"label.code\"\n [style.--label-hover-color]=\"label.hoverCode\"\n ></svg-icon>\n <p\n [innerHTML]=\"\n search ? (label.name || '' | highlightSearch : value()) : label.name\n \"\n ></p>\n <p class=\"dropdown-item-count\">{{ label.count || 0 }}</p>\n </button>\n } } @else if(isPickingColor()){ @for(color of labelColors(); track color.id){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item label-item\"\n (mousedown)=\"handleSelectColor(color, $event)\"\n [class]=\"{\n 'selected': selectedColor().id === color.id,\n }\"\n >\n <svg-icon\n name=\"cai-label\"\n class=\"icon label-color\"\n [style.--label-color]=\"color.code\"\n [style.--label-hover-color]=\"color.hoverCode\"\n ></svg-icon>\n <p\n [innerHTML]=\"\n search ? (color.name || '' | highlightSearch : value()) : color.name\n \"\n ></p>\n <svg-icon name=\"cai-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<!-- Dispatcher dropdown -->\n\n<ng-template #dispatcherRef>\n @if(dropdownOptions.length){ @for(dispatcher of dropdownOptions; track $index\n ){ @let dispatcherOption = castAsDispatcher(dispatcher)!;\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ dispatcherOption.id }}\"\n (mousedown)=\"handleOption(dispatcherOption)\"\n [class]=\"{\n 'selected': castAsDispatcher(selectedOption())?.id === dispatcherOption.id,\n }\"\n >\n <cai-avatar\n [driver]=\"{\n id: dispatcherOption?.id || 0,\n firstName: (dispatcherOption?.fullName || ' ').split(' ')[0] || '',\n lastName: (dispatcherOption?.fullName || ' ').split(' ')[1] || '',\n avatarFile: dispatcherOption?.avatarFile,\n }\"\n [rounded]=\"true\"\n ></cai-avatar>\n <p\n [innerHTML]=\"\n search\n ? (dispatcherOption.fullName || '' | highlightSearch : value())\n : dispatcherOption.fullName\n \"\n ></p>\n <svg-icon name=\"cai-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 #truckRef>\n @if(dropdownOptions.length){ @for(truck of dropdownOptions; track $index ){\n @let truckOption = castAsTruckOption(truck)!;\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ truckOption.id }}\"\n (mousedown)=\"handleOption(truckOption)\"\n [class]=\"{\n 'selected': castAsTruckOption(selectedOption())?.id === truckOption.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search\n ? (truckOption.name || '' | highlightSearch : value())\n : truckOption.name\n \"\n ></p>\n <svg-icon\n class=\"truck-trailer-option\"\n [name]=\"truckOption.logoName.slice(0, -4)\"\n ></svg-icon>\n <svg-icon\n name=\"cai-checkmark\"\n class=\"dropdown-item-icon no-margin\"\n ></svg-icon>\n </button>\n } } @else {\n <p class=\"dropdown-item no-results\">No results</p>\n }\n</ng-template>\n\n<ng-template #trailerRef>\n @if(dropdownOptions.length){ @for(truck of dropdownOptions; track $index ){\n @let trailerOption = castAsTrailerOption(truck)!;\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ trailerOption.id }}\"\n (mousedown)=\"handleOption(trailerOption)\"\n [class]=\"{\n 'selected': castAsTrailerOption(selectedOption())?.id === trailerOption.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search\n ? (trailerOption.name || '' | highlightSearch : value())\n : trailerOption.name\n \"\n ></p>\n\n <svg-icon\n class=\"truck-trailer-option\"\n [name]=\"trailerOption.logoName.slice(0, -4)\"\n ></svg-icon>\n <svg-icon\n name=\"cai-checkmark\"\n class=\"dropdown-item-icon no-margin\"\n ></svg-icon>\n </button>\n } } @else {\n <p class=\"dropdown-item no-results\">No results</p>\n }\n</ng-template>\n\n<!-- Selected options -->\n\n<!-- selected dispatch -->\n<ng-template #selectedDispatchRef>\n @let dispatchOption = castAsDispatch(selectedOption()); @if(dispatchOption){\n <div class=\"dropdown-selected\">\n <div class=\"dropdown-subitem truck-item\">\n <svg-icon\n class=\"truck-icon\"\n [name]=\"dispatchOption!.truck.truckType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p class=\"truck-number\">\n {{ dispatchOption!.truck.truckNumber }}\n </p>\n </div>\n <div class=\"dropdown-subitem trailer-item\">\n @if(dispatchOption!.trailer){\n <svg-icon\n class=\"trailer-icon\"\n [name]=\"\n castAsDispatch(\n selectedOption()\n )!.trailer?.trailerType?.logoName?.slice(0, -4)\n \"\n ></svg-icon>\n <p class=\"trailer-number\">\n {{ dispatchOption!.trailer?.trailerNumber }}\n </p>\n }\n </div>\n <div class=\"dropdown-subitem\">\n @if(dispatchOption!.coDriver){\n <svg-icon class=\"dispatch-icon\" name=\"cai-people\"></svg-icon>\n <p class=\"driver-name\">\n {{\n dispatchOption!.driver.firstName +\n \" & \" +\n dispatchOption!.coDriver?.firstName\n }}\n </p>\n } @else{\n <cai-avatar [driver]=\"dispatchOption!.driver\" [size]=\"18\"></cai-avatar>\n <p class=\"driver-name\">\n {{\n dispatchOption!.driver.firstName +\n \" \" +\n dispatchOption!.driver.lastName\n }}\n </p>\n }\n </div>\n <p class=\"selected-end-item\">\n {{ dispatchOption!.payType }}\n </p>\n </div>\n } @else { @if(!inputRef.value && this.config().dropdown == 'dispatch'){\n <p class=\"dropdown-selected\">Unassigned</p>\n } }\n</ng-template>\n\n<!-- selected label -->\n<ng-template #selectedLabelRef>\n @let labelOption = castAsLabelOption(selectedOption()); @if(labelOption &&\n !inputRef.value && !isPickingColor() && !isAdding()){\n <div class=\"dropdown-selected label-item\">\n <svg-icon\n name=\"cai-label\"\n class=\"icon label-color\"\n [style.--label-color]=\"labelOption!.code\"\n [style.--label-hover-color]=\"labelOption!.hoverCode\"\n ></svg-icon>\n <p>{{ labelOption!.name }}</p>\n </div>\n } @else if(isPickingColor() && !inputRef.value){\n <div class=\"dropdown-selected label-item\">\n <svg-icon name=\"cai-label\" class=\"icon\"></svg-icon>\n <p>Label Color</p>\n </div>\n } @else if(isAdding() && !inputRef.value){\n <div class=\"dropdown-selected label-item\">\n <svg-icon\n name=\"cai-label\"\n class=\"icon label-color\"\n [style.--label-color]=\"selectedColor()!.code\"\n [style.--label-hover-color]=\"selectedColor()!.hoverCode\"\n ></svg-icon>\n <p>Label Name</p>\n </div>\n }\n</ng-template>\n\n<!-- selected broker -->\n<ng-template #selectedBrokerRef>\n @let brokerOption = castAsBroker(selectedOption()); @if(brokerOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n @if((brokerOption!.availableCredit || 0) < 0){\n <svg-icon name=\"cai-status-warning-lite\" class=\"icon fraud\"></svg-icon>\n }\n <p>{{ brokerOption!.businessName }}</p>\n <div class=\"selected-end-item\">\n @if(!brokerOption!.creditLimit){\n <p>Unlimited</p>\n } @else {\n <p>\n {{ brokerOption!.availableCredit || 0 | currency }}\n </p>\n <div\n class=\"progress-bar\"\n [style.--progress]=\"\n getBrokerProgress(\n brokerOption!,\n brokerOption!.dnu || brokerOption!.ban\n ).activePercentageOfPaid + '%'\n \"\n [class]=\"\n getBrokerProgress(\n brokerOption!,\n brokerOption!.dnu || brokerOption!.ban\n ).status\n \"\n ></div>\n }\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedContactRef>\n @let contactOption = castAsContact(selectedOption()); @if(contactOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n <p>{{ contactOption?.contactName }}</p>\n <div class=\"selected-end-item\">\n <p>{{ contactOption?.phone }}</p>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedShipperRef>\n @let shipperOption = castAsShipper(selectedOption()); @if(shipperOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n <p>{{ shipperOption?.businessName }}</p>\n <div class=\"selected-end-item\">\n <p>{{ shipperOption?.address?.address }}</p>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedBankRef>\n @let bankOption = castAsBank(selectedOption()); @if(bankOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n @if(bankOption?.logoName){\n <svg-icon\n class=\"option-icon\"\n [name]=\"bankOption?.logoName?.slice(0, -4) || ''\"\n ></svg-icon>\n }@else {\n <p>{{ bankOption?.name }}</p>\n }\n </div>\n }\n</ng-template>\n\n<ng-template #selectedDispatcherRef>\n @let dispatcherOption = castAsDispatcher(selectedOption());\n @if(dispatcherOption && !inputRef.value){\n <div class=\"dropdown-selected\">\n <cai-avatar\n [driver]=\"{\n id: dispatcherOption?.id || 0,\n firstName: (dispatcherOption?.fullName || ' ').split(' ')[0] || '',\n lastName: (dispatcherOption?.fullName || ' ').split(' ')[1] || '',\n avatarFile: dispatcherOption?.avatarFile,\n }\"\n [rounded]=\"true\"\n ></cai-avatar>\n <p>{{ dispatcherOption?.fullName }}</p>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedTruckRef>\n @let truckOption = castAsTruckOption(selectedOption()); @if(truckOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n <svg-icon\n class=\"option-icon\"\n [name]=\"truckOption?.logoName?.slice(0, -4)\"\n ></svg-icon>\n <p>{{ truckOption?.name }}</p>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedTrailerRef>\n @let trailerOption = castAsTrailerOption(selectedOption()); @if(trailerOption\n && !inputRef.value){\n <div class=\"dropdown-selected\">\n <svg-icon\n class=\"option-icon\"\n [name]=\"trailerOption?.logoName?.slice(0, -4)\"\n ></svg-icon>\n <p>{{ trailerOption?.name }}</p>\n </div>\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 {\n Component,\n ElementRef,\n HostListener,\n input,\n OnChanges,\n Output,\n output,\n signal,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n//Components\nimport { SvgIconComponent } from 'angular-svg-icon';\n\n//Models\nimport { AppFile } from '../../models/appFile.model';\n\n//Pipes\nimport { BytesToHumanReadablePipe } from '../../pipes/bytes-to-human-readable.pipe';\n\n//Bootstrap\nimport { NgbPopover, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';\n\n//Modules\nimport { NgModule } from '@angular/core';\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: 'cai-document-preview',\n imports: [\n //Components\n SvgIconComponent,\n //Pipes\n BytesToHumanReadablePipe,\n //Bootstrap\n NgbPopoverModule,\n ],\n templateUrl: './document-preview.component.html',\n styleUrl: './document-preview.component.scss',\n})\nexport class DocumentPreviewComponent implements OnChanges {\n coverMinimalMod = input<boolean>(false);\n\n isCrop = signal<boolean>(false);\n\n constructor() {\n if (!this.coverMinimalMod) {\n this.isCrop.set(false);\n } else {\n this.isCrop.set(true);\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['coverMinimalMode']) {\n this.isCrop.set(true);\n }\n }\n\n /**\n * Signal that controls whether the delete modal is visible.Used to confirm the file deletion.\n */\n showDeleteModal = signal<boolean>(false);\n\n /**\n * Boolean flag indicating whether the tag popover is visible.Used to apply conditional styling or behavior.\n */\n showTag: boolean = false;\n\n /**\n * Currently selected tag for the document.\n */\n selectedTag: string = '';\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 * /**\n * The view mode in whic the file is displayed. This is a required input.\n * @type {InputSignal<string>}\n */\n viewMode = input.required<string>();\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 * Cancels the delete operation and hides the confirmation modal.\n */\n cancelDelete() {\n this.showDeleteModal.set(false);\n }\n\n /**\n * Confirms the deletion and emits the `onDelete` event.\n */\n confirmDelete() {\n this.onDelete.emit(this.file().fileName);\n this.showDeleteModal.set(false);\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 * Callback triggered when the tag popover is shown. Used to update internal state.\n */\n onTagShown() {\n this.showTag = true;\n }\n\n /**\n * Callback triggered when the tag popover is hidden. Used to update internal state.\n */\n onTagHidden() {\n this.showTag = false;\n }\n\n /**\n * List of available tags for labeling the document. These are selectable within the tag popover.\n */\n tags: string[] = [\n 'Article of Incorporation',\n 'IFTA Licence',\n 'EIN',\n 'W9',\n 'Setup Packet',\n 'MC Certificate',\n 'Other',\n ];\n\n /**\n * Emits when a tag is selected or removed for the file.\n * Contains the file name and the selected tag.\n * @type {OutputEmitterRef<{ fileName: string; tag: string }>}\n */\n onTagChange = output<{ fileName: string; tag: string }>();\n\n /**\n * Selects a tag and emits the `onTagChange` output.\n * @param newTag The newly selected tag string.\n */\n getTag(newTag: string) {\n this.selectedTag = newTag;\n this.onTagChange.emit({ fileName: this.file().fileName, tag: newTag });\n }\n\n /**\n * Removes the currently selected tag. Does not emit an event — must be called manually.\n */\n removeTag() {\n this.selectedTag = '';\n }\n\n /**\n * Placeholder for handling document sharing. Currently logs the file name to the console.\n */\n handleShare() {\n console.log(this.file().fileName);\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 = showTag === true;\n@let selected = this.selectedTag !== \"\"; @let largeView = viewMode() ===\n\"large\";\n@let coverMode = isCrop() === true;\n<div\n class=\"document\"\n [class.noTouch]=\"showDeleteModal()\"\n [class.buttonsVisibility]=\"showTagModal\"\n [class.large-view]=\"largeView\"\n [class.croppedVariant]=\"coverMode\"\n>\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 } @if(selected) {\n <div class=\"badges\">\n <p class=\"tag\">{{ selectedTag }}</p>\n </div>\n }\n <div class=\"badges\" [class.bottomTags]=\"largeView\">\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 page-count\">\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 @if(!largeView){\n <div class=\"document-actions-container label\">\n <button\n class=\"document-actions-button\"\n [class.tagIcon]=\"showTagModal\"\n [ngbPopover]=\"tagPopover\"\n autoClose=\"outside inside\"\n container=\"body\"\n [openDelay]=\"20\"\n (shown)=\"onTagShown()\"\n (hidden)=\"onTagHidden()\"\n placement=\"right-top left-top\"\n >\n <svg-icon name=\"cai-label\" class=\"icon\"></svg-icon>\n </button>\n </div>\n <div class=\"document-actions-container\">\n <button class=\"document-actions-button download\" (click)=\"handleDownload()\">\n <svg-icon name=\"cai-download\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button\" (click)=\"handleDelete()\">\n <svg-icon name=\"cai-delete\" class=\"icon\"></svg-icon>\n </button>\n </div>\n } @if(largeView) {\n <div #buttonsContainer class=\"document-actions-container label\">\n <button\n class=\"document-actions-button\"\n [class.tagIcon]=\"showTagModal\"\n [ngbPopover]=\"tagPopover\"\n autoClose=\"outside inside\"\n container=\"body\"\n [positionTarget]=\"buttonsContainer\"\n [openDelay]=\"20\"\n (shown)=\"onTagShown()\"\n (hidden)=\"onTagHidden()\"\n placement=\"right-top left-top\"\n >\n <svg-icon name=\"cai-label\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button share\" (click)=\"handleShare()\">\n <svg-icon name=\"cai-share\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button download\" (click)=\"handleDownload()\">\n <svg-icon name=\"cai-download\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button delete\" (click)=\"handleDelete()\">\n <svg-icon name=\"cai-delete\" class=\"icon\"></svg-icon>\n </button>\n </div>\n }\n </div>\n <div class=\"delete-modal\">\n @if(largeView){\n <div class=\"delete-header\">\n <p>Are you sure you want to delete this file?</p>\n </div>\n }\n\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 class=\"tag-popover\" #tagPopover>\n <div class=\"tag-header\" (click)=\"removeTag()\">\n <div class=\"header\">\n <svg-icon name=\"cai-minus\" class=\"minus-icon\"></svg-icon>\n <span class=\"tag-header-text\">REMOVE TAG</span>\n </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=\"cai-checkmark\" class=\"checkmark-icon\"></svg-icon>\n <span class=\"tag-text\">{{ tag }}</span>\n </div>\n }\n </div>\n </ng-template>\n</div>\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\n .split('.')\n .pop()\n ?.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({\n canvasContext: context,\n 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}\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';\nimport {\n ImageCropperComponent,\n ImageCroppedEvent,\n LoadedImage,\n ImageTransform,\n} from 'ngx-image-cropper';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { AvatarComponent } from '../avatar/avatar.component';\nimport { AvatarColor, AvatarFile, Driver } from '../avatar/models';\nimport { AsyncValidatorFn } from '@angular/forms';\nimport { background } from 'storybook/internal/theming';\nimport { string32 } from 'pdfjs-dist/types/src/shared/util';\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: [\n SvgIconComponent,\n DocumentPreviewComponent,\n ImageCropperComponent,\n AvatarComponent,\n ],\n templateUrl: './drop-zone.component.html',\n styleUrl: './drop-zone.component.scss',\n})\nexport class DropZoneComponent {\n zoomValue = signal<number>(5.8);\n transform: ImageTransform = {\n scale: this.zoomValue(),\n };\n crop = input<boolean>(false);\n imageChangedEvent: Event | null = null;\n croppedImage: SafeUrl | null = '';\n showCropper = signal<boolean>(false);\n isCropperReady = signal<boolean>(false);\n originalImageWidth = 0;\n originalImageHeight = 0;\n\n smallView = signal<boolean>(false);\n\n coverUrl: string = '';\n profileUrl: string = '';\n logoUrl: string = '';\n size = input<string>();\n rounded = input<boolean>(false);\n cropHeight = signal<number>(0);\n cropWidth = signal<number>(0);\n\n driver = signal<Driver>({\n id: 0,\n firstName: '',\n lastName: '',\n avatarFile: null,\n colorFlag: 'Blue',\n });\n\n @ViewChild('inputRange') inputRange!: ElementRef<HTMLInputElement>;\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnInit() {\n this.cropDimensions();\n }\n\n ngAfterViewInit() {\n this.updateRangeBackground(this.inputRange?.nativeElement);\n }\n\n updateRangeBackground(input: HTMLInputElement) {\n const min = Number(input.min);\n const max = Number(input.max);\n var value;\n value = ((this.zoomValue() - min) / (max - min)) * 100;\n input.style.background = `linear-gradient(to right, #6692f1 0%, #6692f1 ${value}%, #eeeeee ${value}%, #eeeeee 100%)`;\n }\n\n cropDimensions() {\n const variant = this.variant();\n const rounded = this.rounded();\n let width = 0;\n let height = 0;\n switch (variant) {\n case 'profile':\n if (rounded) {\n width = 178;\n height = 178;\n } else {\n width = 160;\n height = 178;\n }\n break;\n case 'logo':\n width = 628;\n height = 214;\n break;\n case 'cover':\n width = 267;\n height = 178;\n break;\n }\n\n this.cropWidth.set(width);\n this.cropHeight.set(height);\n }\n\n ratioHelper(): number {\n const width = this.cropWidth();\n const height = this.cropHeight();\n\n return width && height ? width / height : 1;\n }\n\n onZoomChange(event: Event) {\n const input = event.target as HTMLInputElement;\n const zoom = Number(input.value);\n this.zoomValue.set(zoom);\n\n this.transform = {\n scale: zoom,\n };\n console.log(this.transform);\n console.log('Event', event);\n this.updateRangeBackground(event.target as HTMLInputElement);\n }\n\n fileChangeEvent(event: Event): void {\n this.imageChangedEvent = event;\n this.isCropperReady.set(false);\n const target = event.target as HTMLInputElement;\n const file = target.files?.[0];\n\n this.zoomValue.set(5.8);\n this.transform = { scale: this.zoomValue() };\n\n const fileExtension = file?.name.split('.').pop()?.toLowerCase();\n const isSupportedImage =\n file &&\n file.type.startsWith('image/') &&\n fileExtension &&\n this.supportedFileTypes().includes(fileExtension as FileExtension);\n if (isSupportedImage) {\n this.showCropper.set(true);\n } else {\n this.showCropper.set(false);\n }\n\n this.zoomValue.set(5.8);\n }\n\n imageCropped(event: ImageCroppedEvent) {\n if (event.objectUrl) {\n this.croppedImage = this.sanitizer.bypassSecurityTrustUrl(\n event.objectUrl\n );\n } else {\n this.croppedImage = null;\n }\n }\n\n imageLoaded(image: LoadedImage) {}\n\n cropperReady() {\n this.isCropperReady.set(true);\n }\n\n loadImageFailed() {\n // show message\n }\n\n onTransformChange(event: ImageTransform) {\n const scale = event?.scale as number;\n this.zoomValue.set(scale);\n }\n\n cancelCrop() {\n this.showCropper.set(false);\n }\n submitCrop() {\n const newPreviewUrl = this.croppedImage as string;\n console.log(newPreviewUrl);\n const lastIndex = this.docs().length - 1;\n if (lastIndex >= 0) {\n const updatedDocs = [...this.docs()];\n const lastDoc = { ...updatedDocs[lastIndex] };\n lastDoc.imagePreviewUrl = newPreviewUrl;\n updatedDocs[lastIndex] = lastDoc;\n this.docs.set(updatedDocs);\n\n this.showCropper.set(false);\n }\n\n if (this.variant() === 'profile' && this.croppedImage) {\n this.profileUrl = this.croppedImage as string;\n }\n if (this.variant() === 'cover' && this.croppedImage) {\n this.coverUrl = newPreviewUrl;\n if (this.size() === '480px' && this.coverUrl) {\n this.smallView.set(true);\n }\n }\n if (this.variant() === 'logo' && this.croppedImage) {\n this.logoUrl = this.croppedImage as string;\n }\n this.cropDimensions();\n }\n\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 holds an array of `AppFile` objects representing the files\n * that have been selected or dropped by the user.\n\n */\n variant = input<string>('document');\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 const visibleCount = this.size() === '480px' ? 2 : 3;\n const total = this.docs().length;\n\n if (total > visibleCount) {\n this.carouselIndex.set(total - visibleCount);\n } else {\n this.carouselIndex.set(0);\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 this.coverUrl = \"\";\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 visibleCount = this.size() === '480px' ? 2 : 3;\n const maxIndex = Math.max(0, this.docs().length - visibleCount);\n this.carouselIndex.update((i) => Math.min(maxIndex, i + 1));\n }\n\n handleTagChange(event: { fileName: string; tag: string }) {\n this.docs().forEach((doc) => {\n if (doc.fileName === event.fileName) doc.tag = event.tag;\n });\n }\n}\n","@let docCount = docs().length; @let cropFile = crop() === true; @let showCrop =\nshowCropper() === true; @let documentVariant = variant() === \"document\"; @let\nvideoVariant = variant() === \"video\"; @let profileVariant = variant() ===\n\"profile\"; @let coverVariant = variant() === \"cover\"; @let logoVariant =\nvariant() === \"logo\"; @let roundedBorder = rounded() === true; @let coverPreview\n= coverUrl !== \"\"; @let profilePreview = profileUrl !== \"\"; @let logoPreview =\nlogoUrl !== \"\"; @let smallSize = size() === \"480px\";\n\n<div\n class=\"container\"\n [class]=\"{\n smallContainer: smallSize,\n largeContainer: !smallSize,\n logoVar: logoVariant\n }\"\n>\n @if(coverVariant && coverPreview){\n <cai-document-preview\n class=\"cover-container\"\n [file]=\"{\n fileName: 'cover.png',\n imagePreviewUrl: coverUrl,\n type: 'png',\n size: 0,\n file: null,\n baseName: 'cover',\n pageCount: undefined,\n tag: ''\n }\"\n viewMode=\"small\"\n coverMinimalMode=\"true\"\n (onDelete)=\"handleDelete('cover.png')\"\n ></cai-document-preview>\n }\n \n @if (profileVariant) { @if(!profilePreview) {\n <div>\n <cai-avatar\n [driver]=\"driver()\"\n [size]=\"160\"\n [rounded]=\"rounded()\"\n ></cai-avatar>\n </div>\n } @else if(profilePreview) {\n <div class=\"profile-container\">\n <img\n [class]=\"{\n 'profile-rounded-image': rounded(),\n 'profile-square-image': !rounded()\n }\"\n [src]=\"profileUrl\"\n />\n </div>\n } }\n <!--Image Cropper-->\n @if(cropFile && showCrop){ @if (!isCropperReady()) {\n <div class=\"cropper-loader\">\n <div class=\"spinner\"></div>\n </div>\n }\n <div class=\"cropper-overlay\">\n <image-cropper\n #cropper\n class=\"img-cropper\"\n [class.logoBorder]=\"logoVariant\"\n [roundCropper]=\"roundedBorder ? true : false\"\n [hideResizeSquares]=\"true\"\n [allowMoveImage]=\"true\"\n [transform]=\"transform\"\n (transformChange)=\"onTransformChange($event)\"\n format=\"png\"\n [aspectRatio]=\"ratioHelper()\"\n [resizeToWidth]=\"cropWidth()\"\n [resizeToHeight]=\"cropHeight()\"\n [containWithinAspectRatio]=\"true\"\n [imageChangedEvent]=\"imageChangedEvent\"\n (imageCropped)=\"imageCropped($event)\"\n (imageLoaded)=\"imageLoaded($event)\"\n (cropperReady)=\"cropperReady()\"\n (loadImageFailed)=\"loadImageFailed()\"\n ></image-cropper>\n @if(isCropperReady()){\n <div class=\"lower-part\">\n <div class=\"range\">\n <input\n #inputRange\n type=\"range\"\n class=\"custom-range\"\n min=\"1\"\n max=\"10\"\n step=\"0.1\"\n [value]=\"zoomValue()\"\n (input)=\"onZoomChange($event)\"\n />\n </div>\n <div class=\"cropper-buttons\">\n <button class=\"cancel-button\" (click)=\"cancelCrop()\">Cancel</button>\n <button class=\"submit-button\" (click)=\"submitCrop()\">Submit</button>\n </div>\n </div>\n }\n </div>\n }\n <!-- Carousel -->\n @if(docCount > 0 && (documentVariant || videoVariant)) {\n <div class=\"docs\">\n <div class=\"doc-container\" [style.transform]=\"carouselTransform()\">\n @for (doc of docs(); track $index) {\n <cai-document-preview\n class=\"doc\"\n [file]=\"doc\"\n (onDelete)=\"handleDelete($event)\"\n (onDownload)=\"handleDownload($event)\"\n (onTagChange)=\"handleTagChange($event)\"\n viewMode=\"small\"\n ></cai-document-preview>\n }\n </div>\n @if((docCount >= 3 && !smallSize) || (docCount >= 2 && smallSize) ) {\n <button class=\"carousel-button carousel-left\" (click)=\"carouselLeft()\">\n <svg-icon name=\"cai-arrow-secondary-left\" class=\"arrow\"></svg-icon>\n </button>\n <button class=\"carousel-button carousel-right\" (click)=\"carouselRight()\">\n <svg-icon name=\"cai-arrow-secondary-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 >= 3,\n unsupported: unsupported(),\n smallView: smallView()\n }\"\n >\n <!-- Drop Zone -->\n <div class=\"drop-zone\" (click)=\"handleClickToAdd()\">\n @if(logoVariant && logoPreview){\n <div class=\"logo-container\">\n <img class=\"logo-image\" [src]=\"logoUrl\" />\n </div>\n } @if(coverVariant || logoVariant){\n <svg-icon\n name=\"cai-illustration-drop-zone-cover\"\n class=\"illustration\"\n ></svg-icon>\n } @if(profileVariant){\n <svg-icon\n name=\"cai-illustration-drop-zone-profile\"\n class=\"illustration\"\n ></svg-icon>\n } @if(documentVariant){\n <svg-icon\n name=\"cai-illustration-drop-zone\"\n class=\"illustration\"\n ></svg-icon>\n } @if(videoVariant){\n <svg-icon\n name=\"cai-illustration-drop-zone-video\"\n class=\"illustration\"\n ></svg-icon>\n }\n <div class=\"drop-zone-text\">\n <p class=\"heading\">\n DRAG FILES @if (docCount < 1) {\n <span>HERE</span>\n }\n </p>\n @if(!coverPreview && !profilePreview){\n <p class=\"subtext\">OR CLICK TO ADD</p>\n } @if(coverPreview || profilePreview){\n <p class=\"subtext\">OR CLICK TO REPLACE</p>\n }\n </div>\n\n <input\n type=\"file\"\n aria-hidden=\"true\"\n multiple\n class=\"drop-zone-input\"\n #inputRef\n (input)=\"onInput($event)\"\n (change)=\"fileChangeEvent($event)\"\n />\n </div>\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=\"cai-cancel\" (click)=\"cancel()\"></svg-icon>\n </button>\n </div>\n </div>\n</div>\n","import {\n Bank,\n Broker,\n Contact,\n DepartmentContactsPair,\n Dispatch,\n DispatchBoard,\n Dispatcher,\n DropdownOption,\n LabelOption,\n Shipper,\n TrailerOption,\n TruckOption,\n} from './dropdown.model';\n\nexport interface CaiInputConfig {\n type?: 'text' | 'password' | 'number';\n name?: string;\n required?: boolean;\n alignment?: 'left' | 'right';\n inverse?: boolean; // dark mode\n reveal?: number; // Revealed character count from the end of the password\n icon?: string | null; // icon name ex. 'cai-email'\n iconColor?: string; // color code for icons ex. #F89B2E\n dropdown?: boolean | DropdownType; // dropdown menu\n search?: boolean; // dropdown search functionality\n add?: boolean; // dropdown add new functionality\n subcontent?: string; // ex. months, years, lbs, gallons\n textTransform?: 'capitalize' | 'uppercase' | 'lowercase';\n textColor?: 'positive';\n\n placeholderBehavior?: 'dynamic' | 'fade' | 'static';\n errorBehavior?: 'dynamic' | 'static' | 'floating';\n\n label?: string; // aria label\n mask?: string; // mask pattern ex. (000) 000-0000\n min?: number; // min value for number inputs\n max?: number; // max value for number inputs or max length for text inputs\n step?: number | 'automatic'; // step value for number inputs\n prefix?: string; // ex. $\n withButtons?: boolean; // + - buttons\n autocomplete?: string; // autocomplete\n list?: boolean; // list view (disables validation animations and shows different initial state)\n inTable?: boolean;\n disabled?: boolean; // disabled?\n passwordRequirements?: boolean; // password requirements\n\n optionValue?: string; // option value (key)\n optionLabel?: string; // option label (key)\n\n removable?: boolean;\n autofocus?: boolean;\n}\n\nexport const DropdownTypes = [\n 'dispatch',\n 'ftl-dispatch',\n 'label',\n 'broker',\n 'contact',\n 'shipper',\n 'bank',\n 'dispatcher',\n 'truck',\n 'trailer',\n] as const;\n\nexport type DropdownType = (typeof DropdownTypes)[number];\n\nexport type DropdownArrays =\n | DropdownOption[]\n | LabelOption[]\n | Broker[]\n | DispatchBoard[]\n | DepartmentContactsPair[]\n | Shipper[]\n | Dispatch[]\n | Bank[]\n | Dispatcher[]\n | TruckOption[]\n | TrailerOption[];\n\nexport type DropdownOptions =\n | DropdownOption\n | LabelOption\n | Broker\n | Contact\n | Shipper\n | Dispatch\n | Bank\n | Dispatcher\n | TruckOption\n | TrailerOption;\n\nexport type DropdownKeys =\n | DropdownOption[keyof DropdownOption]\n | LabelOption[keyof LabelOption]\n | Dispatch[keyof Dispatch]\n | Broker[keyof Broker]\n | Contact[keyof Contact]\n | Shipper[keyof Shipper]\n | Bank[keyof Bank]\n | Dispatcher[keyof Dispatcher]\n | TruckOption[keyof TruckOption]\n | TrailerOption[keyof TrailerOption];\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,IA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+ {"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/components/input/pipes/highlight-search.ts","../../../projects/carriera-intern-components/src/app/pipes/currency.pipe.ts","../../../projects/carriera-intern-components/src/app/components/input/pipes/filter-by-search.pipe.ts","../../../projects/carriera-intern-components/src/app/components/input/directives/password.directive.ts","../../../projects/carriera-intern-components/src/app/components/input/directives/number-format.directive.ts","../../../projects/carriera-intern-components/src/app/components/input/directives/mask.directive.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/app/components/input/models/input.model.ts","../../../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) =>\n `Minimum value is ${this.numberFormatPipe.transform(\n String(value.min)\n )}`,\n max: (value: any) =>\n `Maximum value is ${this.numberFormatPipe.transform(\n String(value.max)\n )}`,\n email: () => 'Invalid email format',\n pattern: () => 'Invalid format',\n hasUppercase: () => 'Must contain at least one uppercase letter',\n hasNumber: () => 'Must contain at least one number',\n hasSymbol: () => 'Must contain at least one symbol',\n passwordDontMatch: () => \"Passwords don't match\",\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","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/**\n * @ngdoc pipe\n * @name currencyPipe\n * @description\n * Formats a given dollar amount into a compact string (e.g., $35.21K, $1.23M).\n *\n * Usage:\n * {{ value | currency }}\n *\n * Example:\n * {{ 35210 | currency }} // outputs: $35.21K\n * {{ 1234567 | currency }} // outputs: $1.23M\n * {{ 999 | currency }} // outputs: $999\n * {{ 1234567890 | currency }} // outputs: $1.23B\n */\n@Pipe({\n name: 'currency',\n})\nexport class CurrencyPipe implements PipeTransform {\n /**\n * Transforms a numeric value into a formatted currency string.\n *\n * @param {number | string} value The dollar amount to format. Can be a number or a string that can be parsed to a number.\n * @returns {string} The formatted currency string, or '$0.00' if the input is invalid.\n */\n transform(value: number | string): string {\n let amount: number;\n if (typeof value === 'string') {\n amount = parseFloat(value);\n } else if (typeof value === 'number') {\n amount = value;\n } else {\n console.error(\n 'Invalid input for currencyPipe: value must be a number or a string convertible to a number.'\n );\n return '$0.00';\n }\n\n if (isNaN(amount)) {\n console.error('Invalid number provided to currencyPipe.');\n return '$0.00';\n }\n\n const suffixes = ['', 'K', 'M', 'B', 'T']; // K = Thousand, M = Million, B = Billion, T = Trillion\n const absAmount = Math.abs(amount);\n\n let suffixIndex = 0;\n let divisor = 1;\n\n while (absAmount >= 1000 * divisor && suffixIndex < suffixes.length - 1) {\n divisor *= 1000;\n suffixIndex++;\n }\n\n let formattedNumber = (amount / divisor).toFixed(2);\n\n return `$${formattedNumber}${suffixes[suffixIndex]}`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {\n Bank,\n Broker,\n CaiInputConfig,\n DepartmentContactsPair,\n Dispatch,\n DispatchBoard,\n Dispatcher,\n DropdownArrays,\n LabelOption,\n Shipper,\n TrailerType,\n TruckType,\n} from '../models';\n\n@Pipe({\n name: 'filterBySearch',\n})\nexport class FilterBySearchPipe implements PipeTransform {\n hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T {\n return prop in obj;\n }\n\n transform(\n options: DropdownArrays,\n value: string | undefined | null,\n type: CaiInputConfig['dropdown'],\n shouldSearch?: boolean,\n foldedBoards?: number[],\n label?: string\n ): any[] {\n const optionLabel = label || 'label';\n\n if (!Array.isArray(options)) {\n return [];\n }\n\n if (!options.length) {\n return [];\n }\n\n if (typeof value !== 'string') {\n return options;\n }\n\n const searchValue = value?.trim().toLowerCase();\n\n switch (type) {\n case 'dispatch':\n case 'ftl-dispatch':\n if (!(options as DispatchBoard[]) || !(options as Dispatch[]))\n return [];\n\n // TODO: Leave only board variant once backend is fixed\n let dispatches = (options as DispatchBoard[]) || [];\n\n if (!this.hasProperty(dispatches[0], 'dispatches')) {\n dispatches = [\n {\n dispatcher: 'NOBOARDSVARIANT',\n count: options.length,\n id: 0,\n dispatches: options as Dispatch[],\n teamBoard: false,\n },\n ];\n }\n\n if (!shouldSearch) {\n return dispatches as DispatchBoard[];\n }\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\n let driverNameMatch = (\n dispatch.driver?.firstName?.toLowerCase() +\n ' ' +\n dispatch.driver?.lastName?.toLowerCase()\n ).includes(searchValue);\n\n if (dispatch.coDriver) {\n driverNameMatch = (\n dispatch.driver.firstName.toLowerCase() +\n ' & ' +\n dispatch.coDriver.firstName.toLowerCase()\n ).includes(searchValue);\n }\n\n return truckIdMatch || trailerIdMatch || driverNameMatch;\n });\n\n return newBoard;\n });\n }\n\n if (foldedBoards?.length && !searchValue) {\n dispatches = dispatches.map((board) => {\n if (foldedBoards.includes(board.id)) {\n const { dispatches, ...rest } = board;\n\n return rest as DispatchBoard;\n }\n return board;\n });\n }\n\n return dispatches as DispatchBoard[];\n case 'broker':\n const brokers = (options as Broker[]) || [];\n\n if (!shouldSearch) {\n return brokers as Broker[];\n }\n\n if (searchValue) {\n return brokers.filter((broker) =>\n (broker.businessName || '').toLowerCase().includes(searchValue)\n );\n }\n return brokers;\n case 'contact':\n const contacts =\n (options as DepartmentContactsPair[]).sort(\n (a, b) => (a.department?.id || 0) - (b.department?.id || 0)\n ) || [];\n\n if (!shouldSearch) {\n return contacts;\n }\n\n if (searchValue) {\n return contacts.map((contact) => {\n return {\n ...contact,\n contacts: contact.contacts?.filter((contact) =>\n (contact.contactName || '').toLowerCase().includes(searchValue)\n ),\n };\n });\n }\n return contacts;\n case 'shipper':\n const shippers = (options as Shipper[]) || [];\n\n if (!shouldSearch) {\n return shippers;\n }\n\n if (searchValue) {\n return shippers.filter((shipper) =>\n (shipper.businessName + ' ' + shipper.address?.address || '')\n .toLowerCase()\n .includes(searchValue)\n );\n }\n return shippers;\n case 'label':\n const labels = (options as LabelOption[]) || [];\n\n if (!shouldSearch) {\n return labels;\n }\n\n if (searchValue) {\n return labels.filter((label) =>\n label.name?.toLowerCase().includes(searchValue)\n );\n }\n return labels;\n case 'bank':\n const banks = (options as Bank[]) || [];\n\n if (!shouldSearch) {\n return banks;\n }\n\n if (searchValue) {\n return banks.filter((bank) =>\n bank.name?.toLowerCase().includes(searchValue)\n );\n }\n return banks;\n case 'dispatcher':\n const dispatcher = (options as Dispatcher[]) || [];\n\n if (!shouldSearch) {\n return dispatcher;\n }\n\n if (searchValue) {\n return dispatcher.filter((bank) =>\n bank.fullName?.toLowerCase().includes(searchValue)\n );\n }\n return dispatcher;\n case 'truck':\n const trucks = (options as TruckType[]) || [];\n\n if (!shouldSearch) {\n return trucks;\n }\n\n if (searchValue) {\n return trucks.filter((truck) =>\n (truck.name || '').toLowerCase().includes(searchValue)\n );\n }\n return trucks;\n case 'trailer':\n const trailers = (options as TrailerType[]) || [];\n\n if (!shouldSearch) {\n return trailers;\n }\n\n if (searchValue) {\n return trailers.filter((trailer) =>\n (trailer.name || '').toLowerCase().includes(searchValue)\n );\n }\n return trailers;\n default:\n const dropdownOptions = options as any[];\n\n if (!shouldSearch) {\n return options;\n }\n\n if (searchValue) {\n return dropdownOptions.filter((option) =>\n option[optionLabel]?.toLowerCase().includes(searchValue)\n );\n }\n\n return options;\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() && this.reveal() > 0) {\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() || !this.reveal()) 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() || !this.reveal()) 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() || !this.reveal()) 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.appPassword() || !this.reveal()) return;\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 *\n */\n max = input<number>();\n\n prefix = input<string>('');\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 if (this.max()) {\n if (Number(this.realValue) > (this.max() || 0)) {\n this.realValue = this.realValue.slice(0, -1);\n }\n }\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 value = value.toString();\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 number = Number(this.realValue);\n const formattedValue = new NumberFormatPipe().transform(\n number !== 0 ? number + '' : ''\n );\n this.el.nativeElement.value =\n (formattedValue && this.prefix() ? this.prefix() : '') + 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 number = Number(this.realValue);\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: number !== 0 ? number : null,\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 Directive,\n ElementRef,\n HostListener,\n input,\n OnInit,\n} from '@angular/core';\n\n@Directive({\n selector: '[appMask]',\n})\nexport class MaskDirective implements OnInit {\n /**\n * The mask pattern to apply.\n * Placeholders:\n * '0' - Digit (0-9)\n * 'a' - Letter (a-z, A-Z)\n * '*' - Alphanumeric (0-9, a-z, A-Z)\n * @example '(000) 000-0000' for a phone number.\n */\n appMask = input<string>('');\n\n /**\n * Stores the unmasked, \"real\" value of the input, containing only\n * the characters entered by the user that fit the mask placeholders.\n */\n private realValue: string = '';\n\n constructor(private el: ElementRef<HTMLInputElement>) {}\n\n ngOnInit(): void {\n if (this.appMask() && this.el.nativeElement.value) {\n this.formatValue(this.el.nativeElement.value);\n }\n }\n\n /**\n * HostListener for the 'input' event. This is the primary handler for\n * formatting the value as the user types or pastes.\n */\n @HostListener('input', ['$event'])\n onInput(event: InputEvent): void {\n if (!this.appMask()) return;\n this.formatValue(this.el.nativeElement.value);\n //this.dispatchRealValueChange();\n }\n\n /**\n * HostListener for the 'paste' event. It intercepts pasted content,\n * cleans it, and integrates it into the masked value.\n */\n @HostListener('paste', ['$event'])\n onPaste(event: ClipboardEvent): void {\n if (!this.appMask()) return;\n event.preventDefault();\n const pastedData = event.clipboardData?.getData('text') || '';\n this.formatValue(this.realValue + pastedData);\n //this.dispatchRealValueChange();\n }\n\n /**\n * HostListener for the 'copy' event. Ensures that copying a selection\n * from the input copies the unmasked, \"real\" value.\n */\n @HostListener('copy', ['$event'])\n onCopy(event: ClipboardEvent): void {\n if (!this.appMask()) return;\n const selection = this.el.nativeElement.value.substring(\n this.el.nativeElement.selectionStart || 0,\n this.el.nativeElement.selectionEnd || 0\n );\n if (selection) {\n event.preventDefault();\n const unmaskedSelection = this.extractUserInput(selection);\n //event.clipboardData?.setData('text/plain', unmaskedSelection);\n event.clipboardData?.setData('text/plain', selection);\n }\n }\n\n /**\n * HostListener for the 'cut' event. Ensures cutting a selection removes\n * the corresponding part from the real value and reformats the input.\n */\n @HostListener('cut', ['$event'])\n onCut(event: ClipboardEvent): void {\n if (!this.appMask()) return;\n const start = this.el.nativeElement.selectionStart || 0;\n const end = this.el.nativeElement.selectionEnd || 0;\n if (start !== end) {\n event.preventDefault();\n const selection = this.el.nativeElement.value.substring(start, end);\n const unmaskedSelection = this.extractUserInput(selection);\n //event.clipboardData?.setData('text/plain', unmaskedSelection);\n event.clipboardData?.setData('text/plain', selection);\n\n const valueBefore = this.extractUserInput(\n this.el.nativeElement.value.substring(0, start)\n );\n const valueAfter = this.extractUserInput(\n this.el.nativeElement.value.substring(end)\n );\n this.formatValue(valueBefore + valueAfter);\n //this.dispatchRealValueChange();\n }\n }\n\n /**\n * HostListener for the 'keydown' event. It validates key presses against\n * the mask pattern, preventing invalid characters from being entered.\n */\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n const mask = this.appMask();\n if (!mask) return;\n\n const controlKeys = [\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Tab',\n 'Enter',\n 'Escape',\n 'Home',\n 'End',\n ];\n if (controlKeys.includes(event.key) || event.metaKey || event.ctrlKey) {\n return;\n }\n\n const placeholders = mask.replace(/[^0a*]/g, '');\n if (this.realValue.length >= placeholders.length) {\n event.preventDefault();\n return;\n }\n\n const nextPlaceholder = placeholders[this.realValue.length];\n if (!this.charMatchesPlaceholder(event.key, nextPlaceholder)) {\n event.preventDefault();\n }\n }\n\n /**\n * The core formatting logic. It takes a value, extracts the valid user\n * input, applies the mask, updates the display, and dispatches the change.\n * @param value The current value from the input field.\n */\n private formatValue(value: string): void {\n const mask = this.appMask();\n if (!mask) return;\n\n const extractedValue = this.extractUserInput(value);\n\n const { formattedValue, finalRealValue } = this.applyMask(\n extractedValue,\n mask\n );\n this.realValue = finalRealValue;\n\n this.el.nativeElement.value = formattedValue;\n this.setCursorToEnd();\n }\n\n /**\n * Applies the mask to a given string of user input.\n * @param realValue The clean user input.\n * @param mask The mask pattern.\n * @returns An object with the formatted value and the final real value.\n */\n private applyMask(\n realValue: string,\n mask: string\n ): { formattedValue: string; finalRealValue: string } {\n let formatted = '';\n let realValueIndex = 0;\n let maskIndex = 0;\n let newRealValue = '';\n\n while (realValueIndex < realValue.length && maskIndex < mask.length) {\n const maskChar = mask[maskIndex];\n const realChar = realValue[realValueIndex];\n\n if (this.isPlaceholder(maskChar)) {\n if (this.charMatchesPlaceholder(realChar, maskChar)) {\n formatted += realChar;\n newRealValue += realChar;\n maskIndex++;\n realValueIndex++;\n } else {\n break;\n }\n } else {\n formatted += maskChar;\n maskIndex++;\n }\n }\n return { formattedValue: formatted, finalRealValue: newRealValue };\n }\n\n /**\n * Extracts valid user input characters from a string.\n * @param value The string to clean.\n * @returns A string containing only valid mask characters (digits/letters).\n */\n private extractUserInput(value: string): string {\n return value.replace(/[^a-zA-Z0-9]/g, '');\n }\n\n private isPlaceholder(char: string): boolean {\n return char === '0' || char === 'a' || char === '*';\n }\n\n private charMatchesPlaceholder(char: string, placeholder: string): boolean {\n if (placeholder === '0') return /^\\d$/.test(char);\n if (placeholder === 'a') return /^[a-zA-Z]$/.test(char);\n if (placeholder === '*') return /^[a-zA-Z0-9]$/.test(char);\n return false;\n }\n\n private setCursorToEnd(): void {\n setTimeout(() => {\n const len = this.el.nativeElement.value.length;\n this.el.nativeElement.setSelectionRange(len, len);\n }, 0);\n }\n\n private dispatchRealValueChange(): void {\n const customEvent = new CustomEvent('realValueChange', {\n bubbles: true,\n composed: true,\n detail: this.realValue,\n });\n this.el.nativeElement.dispatchEvent(customEvent);\n }\n\n /**\n * Public method to get the current unmasked \"real\" value.\n * @returns The real value as a string.\n */\n public getRealValue(): string {\n return this.realValue;\n }\n\n /**\n * Public method to set the \"real\" value from outside the directive.\n * @param value The new value to set.\n */\n public setRealValue(value: string): void {\n if (this.appMask()) {\n this.formatValue(value || '');\n } else {\n this.el.nativeElement.value = value || '';\n }\n }\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","// Angular\nimport {\n AfterViewInit,\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 { NgTemplateOutlet } from '@angular/common';\n\n// Pipes\nimport { ErrorMessagePipe } from '../../pipes/error-message.pipe';\nimport { HighlightSearchPipe } from './pipes/highlight-search';\nimport { CurrencyPipe } from '../../pipes/currency.pipe';\nimport { FilterBySearchPipe } from './pipes/filter-by-search.pipe';\n\n// Directives\nimport { PasswordDirective } from './directives/password.directive';\nimport { NumberFormatDirective } from './directives/number-format.directive';\nimport { MaskDirective } from './directives/mask.directive';\n\n// Bootstrap\nimport {\n NgbDropdownModule,\n NgbPopover,\n NgbTooltip,\n} from '@ng-bootstrap/ng-bootstrap';\n\n// Models\nimport {\n Bank,\n Broker,\n CaiInputConfig,\n Contact,\n DepartmentContactsPair,\n Dispatcher,\n DropdownOption,\n LabelColor,\n LabelOption,\n Shipper,\n Dispatch,\n DispatchBoard,\n DropdownArrays,\n DropdownOptions,\n DropdownKeys,\n TruckType,\n TrailerType,\n} from './models';\n\n// Components\nimport { AvatarComponent } from '../avatar/avatar.component';\nimport { SvgIconComponent } from 'angular-svg-icon';\n\n/**\n * This component is a generic input component that can be used to create various types of inputs.\n */\n@Component({\n selector: 'cai-input',\n imports: [\n // Pipes\n ErrorMessagePipe,\n CurrencyPipe,\n HighlightSearchPipe,\n FilterBySearchPipe,\n // Directives\n PasswordDirective,\n NumberFormatDirective,\n MaskDirective,\n // Bootstrap\n NgbDropdownModule,\n NgbTooltip,\n NgTemplateOutlet,\n // Components\n SvgIconComponent,\n AvatarComponent,\n ],\n templateUrl: './input.component.html',\n styleUrl: './input.component.scss',\n})\nexport class InputComponent implements ControlValueAccessor, AfterViewInit {\n // Refs\n @ViewChild('inputRef') inputRef!: ElementRef<HTMLInputElement>;\n @ViewChild('containerRef') containerRef!: ElementRef<HTMLInputElement>;\n @ViewChild('dropdown') dropdown!: NgbPopover;\n @ViewChild('closeTooltip') closeTooltip!: NgbPopover;\n\n // Directive refs\n @ViewChild(PasswordDirective) PasswordDirective!: PasswordDirective;\n @ViewChild(NumberFormatDirective)\n NumberFormatDirective!: NumberFormatDirective;\n @ViewChild(MaskDirective)\n MaskDirective!: MaskDirective;\n\n // Template refs\n @ViewChild('dropdownOptionsRef') dropdownOptionsRef: any;\n @ViewChild('dispatchesRef') dispatchesRef: any;\n @ViewChild('ftlDispatchRef') ftlDispatchRef: any;\n @ViewChild('labelPickerRef') labelPickerRef: any;\n @ViewChild('brokerRef') brokerRef: any;\n @ViewChild('contactRef') contactRef: any;\n @ViewChild('shipperRef') shipperRef: any;\n @ViewChild('bankRef') bankRef: any;\n @ViewChild('dispatcherRef') dispatcherRef: any;\n @ViewChild('truckRef') truckRef: any;\n @ViewChild('trailerRef') trailerRef: any;\n\n @ViewChild('selectedDispatchRef') selectedDispatchRef: any;\n @ViewChild('selectedLabelRef') selectedLabelRef: any;\n @ViewChild('selectedBrokerRef') selectedBrokerRef: any;\n @ViewChild('selectedContactRef') selectedContactRef: any;\n @ViewChild('selectedShipperRef') selectedShipperRef: any;\n @ViewChild('selectedBankRef') selectedBankRef: any;\n @ViewChild('selectedDispatcherRef') selectedDispatcherRef: any;\n @ViewChild('selectedTruckRef') selectedTruckRef: any;\n @ViewChild('selectedTrailerRef') selectedTrailerRef: any;\n\n // Inputs\n\n /**\n * Defines the unique identifier for the input element.\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 * It is provided by the parent component as an Angular `input()` signal.\n - `type`: HTML input type (`'text'`, `'password'`, `'number'`).\n - `name`: The HTML `name` attribute.\n - `required`: If `true`, the input is required for form submission.\n - `alignment`: Text alignment within the input (`'left'` or `'right'`).\n - `inverse`: If `true`, renders the input in a dark mode style.\n - `reveal`: For password inputs, the number of characters to reveal from the end.\n - `icon`: Name of an icon to display (e.g., `'cai-email'`).\n - `iconColor`: Color of the displayed icon (e.g., `'#FF0000'`).\n - `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'ftl-dispatch'`, `'broker'`, `'contact'`, `'shipper'`, `'dispatcher'`, `'truck'`, `'trailer'`, `'bank'` or `'label'` variants.\n - `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]` | `DepartmentContactsPair[]` | `Shipper[]` | `Bank[]` | `Dispatcher[]`.\n - `labelColors`: An array of label colors for the label picker.\n - `search`: Enables search within the dropdown.\n - `add`: Enables 'add new' functionality in the dropdown.\n - `placeholderBehavior`: Defines placeholder animation (`'dynamic'` , `'fade'`, `'static'`).\n - `errorBehavior`: Defines error animation (`'static'`, `'dynamic'`, `'floating'`).\n - `label`: An `aria-label` for accessibility.\n - `list`: If `true`, the input has no validation, no background and no separators for icons\n - `inTable`: If `true`, has in-table styles\n - `mask`: A pattern string for input masking (e.g., `'(000) 000-0000'`).\n - `min`: Minimum value for number inputs.\n - `max`: Maximum value for number inputs (e.g., `999` meaning 3 characters) or maximum length for text inputs in characters.\n - `textTransform`: Text transformation for text inputs (`'capitalize'`, `'uppercase'`, `'lowercase'`).\n - `textColor`: Text color for text inputs (`'positive'`).\n - `step`: Step value for number inputs. Can also be `automatic` for automatic step calculation.\n - `withButtons`: If `true`, adds increment/decrement buttons for number inputs.\n - `autocomplete`: The HTML `autocomplete` attribute.\n - `disabled`: If `true`, the input is disabled (for use without reactive form).\n - `passwordRequirements`: If `true`, shows password requirements for password inputs.\n - `optionValue`: The key of the option to use in the formControl for the selected option in the dropdown.\n - `optionLabel`: The key of the option to use as the label in the dropdown.\n - `subContent`: An optional slot for additional content to be displayed next to the content the user is entering. (ex. lbs, months, etc.)\n - `removable`: If `true`, displays `cai-delete` icon over clear button.\n - `autofocus`: If `true`, the input will be focused when the component is initialized.\n */\n config = input<CaiInputConfig>({});\n\n /**\n * Input property to hold the dropdown options.\n */\n options = input<DropdownArrays>([]);\n\n /**\n * Input property to hold the label colors for the label picker.\n */\n labelColors = input<LabelColor[]>();\n\n // Signals\n\n /**\n * Internal signal to track the disabled state of the input.\n */\n disabled = signal<boolean>(false);\n\n /**\n * Holds the internal, unmasked, and unformatted value of the input.\n */\n value = signal<string>('');\n\n /**\n * Tracks the visibility state for inputs of `type='password'`.\n */\n visible = signal<boolean>(false);\n\n /**\n * A signal that holds the locally added options.\n */\n localOptions = signal(this.options());\n\n /**\n * A signal that holds the currently selected option from the dropdown.\n */\n selectedOption = signal<DropdownOptions | null>(null);\n\n /**\n * A signal that indicates whether a new option is being added.\n */\n isAdding = signal<boolean>(false);\n\n // Label picker signals\n\n /**\n * A signal that holds the currently selected color from the label picker.\n */\n selectedColor = signal<LabelColor>({});\n\n isPickingColor = signal<boolean>(false);\n\n // Dispatch board signals\n\n /**\n * A signal that holds the currently selected dispatch board from the dispatch board picker.\n */\n\n foldedBoards = signal<number[]>([]);\n\n // Computed signals\n\n /**\n * A computed signal that indicates whether the placeholder selected option should be shown.\n */\n hasText = computed<boolean>(() => {\n return Boolean(\n this.value() ||\n this.selectedOption() ||\n this.isAdding() ||\n this.isPickingColor()\n );\n });\n\n /**\n * A computed signal that dynamically calculates the step value for number inputs.\n */\n step = computed(() => {\n const numericValue = parseFloat(this.value() || '0');\n const value = numericValue || 0;\n if (this.config().step === 'automatic') {\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 } else if (this.config().step) return this.config().step as number;\n else {\n return 1;\n }\n });\n\n combinedOptions = computed(() => {\n if (!this.options()) return [];\n if (!this.localOptions()) return this.options();\n return [...this.options(), ...this.localOptions()] as DropdownArrays;\n });\n\n // Dispatch board\n\n dispatchCount = computed<number>(() => {\n if (!(this.options() as DispatchBoard[])) return 0;\n return (this.options() as DispatchBoard[])!.reduce(\n (acc, board) => acc + board.count,\n 0\n );\n });\n\n // Outputs\n\n /**\n * An output signal that emits the value of the added option.\n */\n onOptionAdded = output<DropdownOption | LabelOption>();\n\n /**\n * An output signal that emits when the user clicks on the \"ADD NEW\" button in the dropdown.\n */\n onAdd = output();\n\n /**\n * An output signal that emits the `optionValue` or `id` of the changed dropdown option.\n */\n onSelectionChange = output<DropdownKeys | null>();\n\n /**\n * An output signal that emits when the user clicks on the \"CLEAR\" button.\n */\n onClear = output();\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 ngAfterViewInit(): void {\n setTimeout(() => {\n if (this.config().autofocus) {\n this.focus();\n }\n }, 0);\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 * @param event - The input event object.\n */\n onInput(event: Event): void {\n const inputElement = event.target as HTMLInputElement;\n const max = this.config().max;\n\n // Handle inputs normally for all inputs other than password and number\n if (\n (this.config().type === 'password' && this.config().reveal) ||\n this.config().type === 'number' //||\n //!!this.config().mask\n ) {\n return;\n }\n\n if (max && inputElement.value.length > max) {\n inputElement.value = inputElement.value.slice(0, max);\n return;\n }\n\n if (this.config().textTransform) {\n switch (this.config().textTransform) {\n case 'capitalize':\n let words = inputElement.value.split(' ');\n inputElement.value = words\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n break;\n case 'uppercase':\n inputElement.value = inputElement.value.toUpperCase();\n break;\n case 'lowercase':\n inputElement.value = inputElement.value.toLowerCase();\n break;\n }\n }\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 // ControlValueAccessor methods\n onChange = (_: any) => {};\n onTouched = () => {};\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n /**\n * Writes a new value to the element. (ControlValueAccessor)\n */\n writeValue(value: string): void {\n if (value && this.config().textTransform && typeof value === 'string') {\n switch (this.config().textTransform) {\n case 'capitalize':\n let words = value.split(' ');\n value = words\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n break;\n case 'uppercase':\n value = value.toUpperCase();\n break;\n case 'lowercase':\n value = value.toLowerCase();\n break;\n }\n }\n this.value.set(value);\n\n const optionValue = this.config().optionValue;\n\n setTimeout(() => {\n if (value) {\n this.onTouched();\n } else {\n this.selectedOption.set(null);\n this.setValue();\n return;\n }\n\n if (!this.config().dropdown) {\n this.setValue();\n }\n\n if (!this.options()) {\n return;\n }\n\n if (!this.options().length) {\n return;\n }\n\n switch (this.config().dropdown) {\n case 'dispatch':\n case 'ftl-dispatch':\n // TODO: Leave only board variant once backend is fixed\n if (this.hasProperty(this.options()[0], 'dispatches')) {\n for (const board of (this.options() as DispatchBoard[])!) {\n const dispatch = board.dispatches.find((dispatch) => {\n if (optionValue && this.hasProperty(dispatch, optionValue)) {\n return (\n dispatch[optionValue]?.toString() === value?.toString()\n );\n } else {\n return dispatch.id?.toString() === value?.toString();\n }\n });\n if (dispatch) {\n this.selectedOption.set(dispatch);\n this.value.set('');\n }\n }\n } else {\n const dispatch = (this.options() as Dispatch[])!.find(\n (dispatch) => {\n if (optionValue && this.hasProperty(dispatch, optionValue)) {\n return (\n dispatch[optionValue]?.toString() === value?.toString()\n );\n } else {\n return dispatch.id?.toString() === value?.toString();\n }\n }\n );\n if (dispatch) {\n this.selectedOption.set(dispatch);\n this.value.set('');\n }\n }\n break;\n case 'label':\n const label = (this.options() as LabelOption[])!.find((label) => {\n if (optionValue && this.hasProperty(label, optionValue)) {\n return label[optionValue]?.toString() === value?.toString();\n } else {\n return label.id?.toString() === value?.toString();\n }\n });\n if (label) {\n this.selectedOption.set(label);\n this.value.set('');\n }\n break;\n case 'broker':\n const broker = (this.options() as Broker[])!.find((broker) => {\n if (optionValue && this.hasProperty(broker, optionValue)) {\n return broker[optionValue]?.toString() === value?.toString();\n } else {\n return broker.id?.toString() === value?.toString();\n }\n });\n if (broker) {\n this.selectedOption.set(broker);\n this.value.set('');\n }\n break;\n case 'contact':\n for (const departmentContactsPair of this.options() as DepartmentContactsPair[]) {\n const contact = departmentContactsPair.contacts?.find((contact) => {\n if (optionValue && this.hasProperty(contact, optionValue)) {\n return contact[optionValue]?.toString() === value?.toString();\n } else {\n return contact.id?.toString() === value?.toString();\n }\n });\n if (contact) {\n this.selectedOption.set(contact);\n this.value.set('');\n }\n }\n break;\n case 'shipper':\n const shipper = (this.options() as Shipper[])!.find((shipper) => {\n if (optionValue && this.hasProperty(shipper, optionValue)) {\n return shipper[optionValue]?.toString() === value?.toString();\n } else {\n return shipper.id?.toString() === value?.toString();\n }\n });\n if (shipper) {\n this.selectedOption.set(shipper);\n this.value.set('');\n }\n break;\n case 'bank':\n const bank = (this.options() as Bank[])!.find((bank) => {\n if (optionValue && this.hasProperty(bank, optionValue)) {\n return bank[optionValue]?.toString() === value?.toString();\n } else {\n return bank.id?.toString() === value?.toString();\n }\n });\n if (bank) {\n this.selectedOption.set(bank);\n this.value.set('');\n }\n break;\n\n case 'dispatcher':\n const dispatcher = (this.options() as Dispatcher[])!.find(\n (dispatcher) => {\n if (optionValue && this.hasProperty(dispatcher, optionValue)) {\n return (\n dispatcher[optionValue]?.toString() === value?.toString()\n );\n } else {\n return dispatcher.id?.toString() === value?.toString();\n }\n }\n );\n if (dispatcher) {\n this.selectedOption.set(dispatcher);\n this.value.set('');\n }\n break;\n case 'truck':\n const truck = (this.options() as TruckType[])!.find((truck) => {\n if (optionValue && this.hasProperty(truck, optionValue)) {\n return truck[optionValue]?.toString() === value?.toString();\n } else {\n return truck.id?.toString() === value?.toString();\n }\n });\n if (truck) {\n this.selectedOption.set(truck);\n this.value.set('');\n }\n break;\n case 'trailer':\n const trailer = (this.options() as TrailerType[])!.find((trailer) => {\n if (optionValue && this.hasProperty(trailer, optionValue)) {\n return trailer[optionValue]?.toString() === value?.toString();\n } else {\n return trailer.id?.toString() === value?.toString();\n }\n });\n if (trailer) {\n this.selectedOption.set(trailer);\n this.value.set('');\n }\n break;\n case true:\n const option = (this.options() as DropdownOption[])!.find(\n (option) => {\n if (optionValue && this.hasProperty(option, optionValue)) {\n return option[optionValue]?.toString() === value?.toString();\n } else {\n return option.id?.toString() === value?.toString();\n }\n }\n );\n if (option) {\n this.selectedOption.set(option);\n if (this.config().search || this.config().add) {\n this.value.set('');\n } else {\n this.value.set(option[this.config().optionLabel || 'label']);\n }\n }\n break;\n default:\n break;\n }\n this.setValue();\n });\n }\n\n /**\n * Increments the value of a number input by the current step.\n */\n increment(event: MouseEvent): void {\n const max = this.config().max;\n if (max && Number(this.value()) + this.step() > max) {\n this.value.set(String(max));\n } else {\n this.value.update((v) =>\n String(\n (parseFloat(v) ? parseFloat(v) : this.config().min || 0) + this.step()\n )\n );\n }\n this.onChange(this.value());\n this.setValue();\n this.focus(event);\n }\n\n /**\n * Decrements the value of a number input by the current step.\n */\n decrement(event: MouseEvent): void {\n const min = this.config().min;\n if (min && Number(this.value()) - this.step() < min) {\n this.value.set(String(min));\n } else {\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 }\n this.onChange(this.value());\n this.setValue();\n this.focus(event);\n }\n\n /**\n * Toggles the visibility of the password input.\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 */\n setValue(): void {\n if (!this.inputRef || !this.inputRef.nativeElement) {\n return;\n }\n\n let type = !!this.config().mask ? 'masked' : this.config().type;\n\n if (type === 'password' && !this.config().reveal) {\n type = 'text';\n }\n\n switch (type) {\n case 'password':\n if (this.PasswordDirective) {\n this.PasswordDirective.setRealValue(this.value());\n } else {\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n case 'number':\n if (this.NumberFormatDirective) {\n this.NumberFormatDirective.setRealValue(this.value());\n } else {\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n case 'masked':\n if (this.MaskDirective) {\n this.MaskDirective.setRealValue(this.value());\n } else {\n this.inputRef.nativeElement.value = this.value();\n }\n break;\n default:\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 if (event) {\n event.stopPropagation();\n event.preventDefault();\n }\n if (this.inputRef && this.inputRef.nativeElement) {\n this.inputRef.nativeElement.focus();\n }\n }\n\n /**\n * Called when the input element receives focus (focus event).\n */\n onFocus(event: FocusEvent): void {\n if (\n !this.config().add &&\n !(this.config().dropdown === 'dispatch') &&\n !this.config().search\n )\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 */\n onBlur(): void {\n this.onTouched();\n this.dropdown.close();\n\n if (\n !this.config().add &&\n !(this.config().dropdown === 'dispatch') &&\n !this.config().search\n )\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 */\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.onSelectionChange.emit(null);\n this.onClear.emit();\n this.closeTooltip.close();\n\n this.dropdown.close();\n }\n\n /**\n * Returns the reference to the dropdown element based on the dropdown type.\n */\n getDropdownRef() {\n switch (this.config().dropdown) {\n case 'dispatch':\n return this.dispatchesRef;\n case 'ftl-dispatch':\n return this.ftlDispatchRef;\n case 'label':\n return this.labelPickerRef;\n case 'broker':\n return this.brokerRef;\n case 'contact':\n return this.contactRef;\n case 'shipper':\n return this.shipperRef;\n case 'bank':\n return this.bankRef;\n case 'dispatcher':\n return this.dispatcherRef;\n case 'trailer':\n return this.trailerRef;\n case 'truck':\n return this.truckRef;\n default:\n return this.dropdownOptionsRef;\n }\n }\n\n /**\n * Returns the reference to the selected element based on the dropdown type.\n */\n getSelectedRef() {\n switch (this.config().dropdown) {\n case 'dispatch':\n case 'ftl-dispatch':\n return this.selectedDispatchRef;\n case 'label':\n return this.selectedLabelRef;\n case 'broker':\n return this.selectedBrokerRef;\n case 'contact':\n return this.selectedContactRef;\n case 'shipper':\n return this.selectedShipperRef;\n case 'bank':\n return this.selectedBankRef;\n case 'dispatcher':\n return this.selectedDispatcherRef;\n case 'trailer':\n return this.selectedTrailerRef;\n case 'truck':\n return this.selectedTruckRef;\n default:\n return;\n }\n }\n\n /**\n * Type guard that checks if a given property exists on an object.\n * @param obj The object to check.\n * @param prop The property to check for.\n * @returns `true` if `prop` exists on `obj`, `false` otherwise.\n */\n hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T {\n return prop in obj;\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: DropdownOptions) {\n const optionValue = this.config().optionValue;\n\n if (optionValue && this.hasProperty(option, optionValue)) {\n this.onChange(option[optionValue]);\n this.onSelectionChange.emit(option[optionValue]);\n } else {\n this.onChange(option.id);\n this.onSelectionChange.emit(option.id);\n }\n\n this.selectedOption.set(option);\n\n if (typeof this.config().dropdown === 'string') {\n this.value.set('');\n } else {\n this.selectedOption.set(option as DropdownOption);\n if (this.config().search || this.config().add) {\n this.value.set('');\n } else {\n this.value.set(\n (option as DropdownOption)[this.config().optionLabel || 'label']\n );\n }\n }\n\n this.setValue();\n this.dropdown.close();\n }\n\n /**\n * Adds a new option to the dropdown.\n * @param option - The option to add.\n */\n addOption() {\n if (!this.inputRef.nativeElement.value) {\n this.isAdding.set(false);\n this.reset();\n }\n\n // Label picker add option logic\n if (this.config().dropdown === 'label') {\n let labels = [...this.options(), ...this.localOptions()] as LabelOption[];\n let id = labels.length + 1;\n while (labels.find((label) => label.id === id)) {\n id++;\n }\n const label: LabelOption = {\n id: id,\n name: this.inputRef.nativeElement.value,\n color: this.selectedColor().name,\n colorId: this.selectedColor().id,\n code: this.selectedColor().code,\n hoverCode: this.selectedColor().hoverCode,\n };\n\n this.localOptions.update((labels) => [\n ...(labels as LabelOption[]),\n label as LabelOption,\n ]);\n this.isAdding.set(false);\n\n this.value.set('');\n this.onChange(label.id);\n this.setValue();\n\n this.selectedOption.set(label);\n this.onOptionAdded.emit(label);\n return;\n }\n\n const option: DropdownOption = {\n id: this.options.length + 1,\n label: this.inputRef.nativeElement.value,\n };\n\n this.localOptions.update((options) => [\n ...(options as DropdownOption[]),\n option as DropdownOption,\n ]);\n this.isAdding.set(false);\n\n this.value.set(option[this.config().optionValue || 'label']);\n this.onChange(option.id);\n this.setValue();\n\n this.selectedOption.set(option);\n this.onOptionAdded.emit(option);\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 handleAddingOption(event?: MouseEvent) {\n this.onAdd.emit();\n\n if (!this.config().add) return;\n if (\n typeof this.config().dropdown === 'string' &&\n this.config().dropdown !== 'label'\n ) {\n this.dropdown.close();\n return;\n }\n // Color picker logic for label input\n if (this.config().dropdown === 'label') {\n if (this.isPickingColor()) {\n this.isAdding.set(true);\n this.isPickingColor.set(false);\n this.dropdown.close();\n if (event) this.focus(event);\n return;\n }\n this.isPickingColor.set(true);\n if (event) this.focus(event);\n this.dropdown.open();\n this.value.set('');\n this.setValue();\n return;\n }\n\n this.isAdding.set(true);\n this.dropdown.close();\n if (event) this.focus(event);\n }\n\n // Dispatch modal\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 // Label picker\n\n handleSelectColor(color: LabelColor, event?: MouseEvent) {\n this.value.set('');\n this.setValue();\n this.selectedColor.set(color);\n this.handleAddingOption(event);\n }\n\n // Broker modal\n\n getBrokerProgress(broker: Broker, disable?: boolean) {\n let activePercentageOfPaid;\n let status;\n let availableCredit = broker.availableCredit || 0;\n let creditLimit = broker.creditLimit || 0;\n if (broker.availableCredit === 0) {\n activePercentageOfPaid = 100;\n status = disable ? 'disable' : 'high';\n return { activePercentageOfPaid, status };\n } else {\n activePercentageOfPaid = (+availableCredit / +creditLimit) * 100;\n }\n\n if (activePercentageOfPaid >= 0 && activePercentageOfPaid < 30) {\n status = disable ? 'disable' : 'low';\n } else if (activePercentageOfPaid > 30 && activePercentageOfPaid < 60) {\n status = disable ? 'disable' : 'medium';\n } else if (activePercentageOfPaid > 60 && activePercentageOfPaid <= 100) {\n status = disable ? 'disable' : 'high';\n } else {\n status = null;\n }\n\n return { activePercentageOfPaid, status };\n }\n\n // Casting methods for template\n\n castAsDispatch(value: unknown): Dispatch | null {\n return value as Dispatch;\n }\n\n castAsLabelOption(value: unknown): LabelOption | null {\n return value as LabelOption;\n }\n\n castAsBroker(value: unknown): Broker | null {\n return value as Broker;\n }\n\n castAsContact(value: unknown): Contact | null {\n return value as Contact;\n }\n\n castAsShipper(value: unknown): Shipper | null {\n return value as Shipper;\n }\n\n castAsBank(value: unknown): Bank | null {\n return value as Bank;\n }\n\n castAsDispatcher(value: unknown): Dispatcher | null {\n return value as Dispatcher;\n }\n\n castAsDropdownOption(value: unknown): DropdownOption | null {\n return value as DropdownOption;\n }\n\n castAsTruckOption(value: unknown): TruckType | null {\n return value as TruckType;\n }\n\n castAsTrailerOption(value: unknown): TrailerType | null {\n return value as TrailerType;\n }\n}\n","@let valid = ngControl?.valid && (ngControl?.touched || ngControl?.dirty) &&\n!isAdding();\n<!---->\n@let invalid = ngControl?.invalid && (ngControl?.touched || ngControl?.dirty) &&\n!isAdding(); @let type = config().type;\n<!---->\n@let icon = config().icon;\n<!---->\n@let alignment = config().alignment;\n<!---->\n@let inverse = config().inverse;\n<!---->\n@let name = config().name;\n<!---->\n@let required = config().required;\n<!---->\n@let reveal = config().reveal;\n<!---->\n@let password = type === 'password';\n<!---->\n@let number = type === 'number';\n<!---->\n@let ariaLabel = config().label;\n<!---->\n@let hasDropdown = config().dropdown;\n<!---->\n@let add = config().add;\n<!---->\n@let search = config().search;\n<!---->\n@let placeholderBehavior = config().placeholderBehavior;\n<!---->\n@let errorBehavior = config().errorBehavior;\n<!---->\n@let mask = this.config().mask;\n<!---->\n@let autocomplete = this.config().autocomplete;\n<!---->\n@let withButtons = this.config().withButtons;\n<!---->\n@let iconColor = this.config().iconColor;\n<!---->\n@let list = this.config().list;\n<!---->\n@let passwordRequirements = this.config().passwordRequirements;\n<!---->\n@let dispatch = config().dropdown === 'dispatch';\n<!---->\n@let ftlDispatch = config().dropdown === 'ftl-dispatch';\n<!---->\n@let labelPicker = this.config().dropdown === 'label';\n<!---->\n@let broker = this.config().dropdown === 'broker';\n<!---->\n@let contact = this.config().dropdown === 'contact';\n<!---->\n@let shipper = this.config().dropdown === 'shipper';\n<!---->\n@let subcontent = this.config().subcontent;\n<!---->\n@let bank = this.config().dropdown === 'bank';\n<!---->\n@let optionLabel = this.config().optionLabel || 'label';\n<!---->\n@let dispatcher = this.config().dropdown === 'dispatcher';\n<!---->\n@let trailer = this.config().dropdown === 'trailer';\n<!---->\n@let truck = this.config().dropdown === 'truck';\n<!---->\n@let removable = this.config().removable;\n<!---->\n@let inTable = this.config().inTable;\n<!---->\n@let textColor = this.config().textColor;\n\n<div\n class=\"app-input-container\"\n [class]=\"{\n 'has-text': hasText(),\n 'is-empty': !hasText(),\n 'has-error': invalid && !list,\n 'has-valid': valid && !list,\n 'has-icon': icon,\n 'has-password': password,\n 'has-visible': password && visible(),\n 'has-number': number && withButtons,\n 'has-right': alignment === 'right',\n inverse: inverse,\n 'has-dropdown': hasDropdown,\n 'is-adding': add && isAdding(),\n 'has-ftl-dispatch': ftlDispatch,\n 'has-dispatch': dispatch,\n 'fade-placeholder': placeholderBehavior === 'fade' || inTable,\n 'static-placeholder': placeholderBehavior === 'static',\n 'floating-error': errorBehavior === 'floating' || inTable,\n 'static-error': errorBehavior === 'static',\n 'has-selected': selectedOption(),\n 'list-view': list,\n 'has-end-item': broker || contact || dispatch || ftlDispatch || shipper,\n removable: removable,\n 'in-table': inTable,\n 'text-color-positive': textColor === 'positive',\n }\"\n ngbDropdown\n [autoClose]=\"'outside'\"\n [container]=\"'body'\"\n #dropdown=\"ngbDropdown\"\n dropdownClass=\"cai-dropdown\"\n #containerRef\n ngbTooltip=\"{{\n (errorBehavior === 'floating' || (errorBehavior === 'static' && hasText()) || inTable) && invalid\n ? (ngControl?.errors | errorMessage)[0]\n : ''\n }}\"\n tooltipClass=\"tooltip error-tooltip\"\n>\n @if (config().icon && !password && !withButtons) {\n <div\n class=\"icon-container\"\n (mousedown)=\"focus($event)\"\n [class]=\"{\n 'colored-icon': iconColor\n }\"\n [style.--icon-color]=\"iconColor || ''\"\n >\n @if(hasDropdown && placeholderBehavior === 'static'){\n <div class=\"separator separator-static-dropdown\"></div>\n }\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\n class=\"password-icons\"\n ngbTooltip=\"{{ visible() ? 'Hide' : 'Show' }}\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n >\n <svg-icon class=\"icon password-key\" name=\"cai-password-key\"></svg-icon>\n <svg-icon\n class=\"icon password-shown\"\n name=\"cai-password-shown\"\n ></svg-icon>\n <svg-icon\n class=\"icon password-hidden\"\n name=\"cai-password-hidden\"\n ></svg-icon>\n </div>\n <div class=\"separator\"></div>\n </div>\n }\n \n <input\n class=\"app-input\"\n [type]=\"password && !reveal ? (visible() ? 'text' : 'password') : 'text'\"\n [name]=\"name\"\n [required]=\"required\"\n [disabled]=\"disabled() || this.config().disabled\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [id]=\"id()\"\n [attr.aria-label]=\"ariaLabel\"\n placeholder=\"\"\n [autocomplete]=\"autocomplete ? autocomplete : 'one-time-code'\"\n #inputRef\n [appPassword]=\"password\"\n [appMask]=\"mask || ''\"\n [reveal]=\"reveal || 0\"\n [visible]=\"visible()\"\n [appNumberFormat]=\"number\"\n [prefix]=\"this.config().prefix || ''\"\n [max]=\"this.config().max\"\n (focus)=\"!isAdding() && ((hasDropdown || passwordRequirements) && dropdown.open()); onFocus($event)\"\n (click)=\"!isAdding() && hasDropdown && dropdown.open()\"\n />\n <label class=\"app-input-label\">\n @if(dispatch || ftlDispatch){\n <p class=\"truck-item app-input-name\">Truck</p>\n <p class=\"trailer-item\">Trailer</p>\n <p>Driver</p>\n <p class=\"sub-label\">Rate</p>\n } @else if(broker){\n <p class=\"app-input-name\">{{ name }}</p>\n <p class=\"sub-label\">Credit</p>\n }@else if(contact){\n <p class=\"app-input-name\">{{ name }}</p>\n <p class=\"sub-label\">Phone</p>\n }@else if(shipper){\n <p class=\"app-input-name\">{{ name }}</p>\n <p class=\"sub-label\">Address</p>\n } @else {\n <span class=\"app-input-name\">{{ name }}</span>\n }\n </label>\n @if(number && withButtons) {\n <div class=\"number-container\">\n <div class=\"number-buttons\">\n <div class=\"separator\"></div>\n <svg-icon\n ngbTooltip=\"Add\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n name=\"cai-plus\"\n class=\"bg-icon plus-icon\"\n (mousedown)=\"increment($event)\"\n ></svg-icon>\n <svg-icon\n ngbTooltip=\"Remove\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n name=\"cai-minus\"\n class=\"bg-icon minus-icon\"\n (mousedown)=\"decrement($event)\"\n ></svg-icon>\n </div>\n </div>\n }\n\n @if(!inTable){\n <svg-icon\n name=\"cai-checkmark\"\n class=\"app-input-icon positive-icon\"\n ></svg-icon>\n <svg-icon\n name=\"cai-status-warning\"\n class=\"app-input-icon warning-icon\"\n ></svg-icon>\n\n @if (invalid) {\n <div class=\"app-input-error\">\n {{ (ngControl?.errors | errorMessage)[0] || \"Invalid field.\" }}\n </div>\n }\n }\n\n <!-- Accept button -->\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 ngbTooltip=\"Accept\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n >\n <svg-icon name=\"cai-checkmark\"></svg-icon>\n </button>\n }\n\n <!-- Cancel button -->\n <button\n type=\"button\"\n class=\"app-input-icon button-icon bg-icon cancel-button\"\n (click)=\"reset()\"\n [tabIndex]=\"-1\"\n ngbTooltip=\"{{ hasText() && isAdding() ? 'Cancel' : 'Delete' }}\"\n tooltipClass=\"tooltip\"\n [autoClose]=\"true\"\n #closeTooltip = 'ngbTooltip'\n >\n <svg-icon name=\"{{ removable ? 'cai-delete' : 'cai-cancel' }}\"></svg-icon>\n </button>\n\n <div class=\"dropdown-anchor\" \n ngbDropdownAnchor\n ></div>\n <!-- Dropdown menu -->\n @if(hasDropdown) {\n <div class=\"dropdown-menu\" ngbDropdownMenu [style.width.px]=\"containerRef.offsetWidth\">\n @if(add && !dispatch && !ftlDispatch){\n <button\n class=\"dropdown-item add-new\"\n (mousedown)=\"handleAddingOption($event)\"\n >\n <p>ADD NEW</p>\n <svg-icon name=\"cai-plus\" class=\"dropdown-item-icon\"></svg-icon>\n </button>\n }\n <ng-container *ngTemplateOutlet=\"getDropdownRef()\"></ng-container>\n </div>\n\n <div class=\"dropdown-icon-container\"\n (mousedown)=\"focus($event)\"\n >\n <svg-icon\n name=\"cai-arrow-secondary-down\"\n class=\"dropdown-icon icon\"\n ></svg-icon>\n </div>\n\n <!-- Placeholder -->\n @if(dispatch || ftlDispatch || broker || labelPicker || contact || shipper ||\n bank || dispatcher || truck || trailer){\n <ng-container *ngTemplateOutlet=\"getSelectedRef()\"></ng-container>\n } @else if ((add || search) && !inputRef.value && !this.isAdding()){\n <p class=\"dropdown-selected\">\n @if(placeholderBehavior === 'static'){\n <p class=\"selected-label-hidden\">{{ name + (required ? ' *' : '' )}}</p>\n <p class=\"selected-text\">{{selectedOption() &&\n castAsDropdownOption(selectedOption())![optionLabel || \"label\"]}}</p>\n }\n @else {\n {{\n selectedOption() &&\n castAsDropdownOption(selectedOption())![optionLabel || \"label\"]\n }}\n }\n </p>\n } } @if(passwordRequirements){\n <div class=\"dropdown-menu password-requirement\" ngbDropdownMenu [style.width.px]=\"containerRef.offsetWidth\">\n <ng-container *ngTemplateOutlet=\"passwordRequirementsRef\" ></ng-container>\n </div>\n } @if(subcontent){\n <p class=\"subcontent\">\n @if(!(alignment === 'right')){\n <span class=\"subcontent-hide\">{{ inputRef.value }} </span>\n }\n {{ subcontent }}\n </p>\n }\n</div>\n\n<!-- Templates -->\n\n<!-- dropdowns -->\n@let dropdownOptions = (combinedOptions() | filterBySearch: value() :\nthis.config().dropdown : search: this.foldedBoards() : optionLabel) || [];\n\n<!-- Password requirements -->\n<ng-template #passwordRequirementsRef>\n <p>Password Requirement</p>\n <ul>\n <li>\n <svg-icon\n [name]=\"\n !this.ngControl?.errors?.['minlength'] && this.value()\n ? 'cai-checkmark'\n : 'cai-cancel'\n \"\n class=\"icon\"\n ></svg-icon\n ><span>Minimum 8 characters</span>\n </li>\n <li>\n <svg-icon\n class=\"icon\"\n [name]=\"\n !this.ngControl?.errors?.['hasNumber'] && this.value() ? 'cai-checkmark' : 'cai-cancel'\n \"\n ></svg-icon\n ><span>One number</span>\n </li>\n <li>\n <svg-icon\n class=\"icon\"\n [name]=\"\n !this.ngControl?.errors?.['hasSymbol'] && this.value() ? 'cai-checkmark' : 'cai-cancel'\n \"\n ></svg-icon\n ><span>One symbol</span>\n </li>\n <li>\n <svg-icon\n class=\"icon\"\n [name]=\"\n !this.ngControl?.errors?.['hasUppercase'] && this.value()\n ? 'cai-checkmark'\n : 'cai-cancel'\n \"\n ></svg-icon\n ><span>One upper-case letter</span>\n </li>\n </ul>\n</ng-template>\n\n<!-- Standard dropdown -->\n<ng-template #dropdownOptionsRef>\n @if(dropdownOptions.length){ @for(option of dropdownOptions; track $index ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ option.id }}\"\n (mousedown)=\"handleOption(option)\"\n [class]=\"{\n 'selected': castAsDropdownOption(selectedOption())?.id === option.id,\n }\"\n >\n @if(option[optionLabel] === \"Hazardous\"){\n <svg-icon name=\"cai-violation-hazmat\" class=\"icon\"></svg-icon>\n }\n <p\n class=\"dropdown-content-with-icon\"\n [innerHTML]=\"\n search\n ? (option[optionLabel] | highlightSearch : value())\n : option[optionLabel]\n \"\n ></p>\n <svg-icon name=\"cai-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 #bankRef>\n @if(dropdownOptions.length){ @for(bank of dropdownOptions; track $index ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ bank.id }}\"\n (mousedown)=\"handleOption(bank)\"\n [class]=\"{\n 'selected': castAsBank(selectedOption())?.id === bank.id,\n }\"\n >\n @if(bank.logoName){\n <svg-icon class=\"bank-icon\" [name]=\"bank.logoName.slice(0, -4)\"></svg-icon>\n }@else{\n <p\n class=\"dropdown-content-with-icon\"\n [innerHTML]=\"search ? (bank.name | highlightSearch : value()) : bank.name\"\n ></p>\n\n }\n <svg-icon name=\"cai-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<!-- Broker -->\n<ng-template #brokerRef>\n @if(dropdownOptions.length){ @for(broker of dropdownOptions; track $index ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"broker-{{ broker.id }}\"\n (mousedown)=\"!(broker.dnu || broker.ban) && handleOption(broker)\"\n [class]=\"{\n selected: castAsBroker(selectedOption())?.id === broker.id,\n banned: broker.dnu || broker.ban,\n dnu: broker.dnu\n }\"\n >\n @if(broker.dnu || broker.ban){\n <svg-icon name=\"cai-minus\" class=\"round-icon\"></svg-icon>\n } @else if((broker.availableCredit || 0) < 0){\n <svg-icon name=\"cai-status-warning-lite\" class=\"icon fraud\"></svg-icon>\n }\n <p\n class=\"dropdown-content\"\n [innerHTML]=\"\n search\n ? (broker.businessName || '' | highlightSearch : value())\n : broker.businessName\n \"\n ></p>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-base\">\n @if(!broker.creditLimit){\n <p>Unlimited</p>\n } @else {\n <p>{{ broker.availableCredit || 0 | currency }}</p>\n <div\n class=\"progress-bar\"\n [style.--progress]=\"\n getBrokerProgress(broker, broker.dnu || broker.ban)\n .activePercentageOfPaid + '%'\n \"\n [class]=\"getBrokerProgress(broker, broker.dnu || broker.ban).status\"\n ></div>\n }\n </div>\n <div class=\"end-item-hover\">\n <p>\n {{ broker.loadsCount }} | {{ broker.availableCredit || 0 | currency }}\n </p>\n <svg-icon name=\"cai-load\" class=\"icon\"></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\n<!-- Contact dropdown -->\n<ng-template #contactRef>\n @if(dropdownOptions.length){ @for(departmentContactsPair of dropdownOptions;\n track $index ){ @for(contact of departmentContactsPair.contacts; track\n $index){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"contact-{{ contact.id }}\"\n (mousedown)=\"handleOption(contact)\"\n [class]=\"{\n selected: castAsContact(selectedOption())?.id === contact.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search\n ? (contact.contactName || '' | highlightSearch : value())\n : contact.contactName\n \"\n ></p>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-base\">\n <p>{{ departmentContactsPair.department?.name }}</p>\n </div>\n <div class=\"end-item-hover\">\n <p>\n {{ contact.phone }}\n </p>\n </div>\n </div>\n </button>\n } } } @else {\n <p class=\"dropdown-item no-results\">No results</p>\n }\n</ng-template>\n\n<!-- Shipper dropdown -->\n<ng-template #shipperRef>\n @if(dropdownOptions.length){ @for(shipper of dropdownOptions; track $index ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"shipper-{{ shipper.id }}\"\n (mousedown)=\"handleOption(shipper)\"\n [class]=\"{\n selected: castAsShipper(selectedOption())?.id === shipper.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search\n ? (shipper.businessName || '' | highlightSearch : value())\n : shipper.businessName\n \"\n ></p>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-base\">\n <p\n [innerHTML]=\"\n search\n ? (shipper.address?.address || '' | highlightSearch : value())\n : shipper.address?.address\n \"\n ></p>\n </div>\n <div class=\"end-item-hover\">\n <p>\n {{ shipper.pickupCount }} Pickup |\n {{ shipper.deliveryCount }} Delivery\n </p>\n <svg-icon name=\"cai-load\" class=\"icon\"></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\n<!-- Dispatch dropdown -->\n<ng-template #dispatchesRef>\n @if(dropdownOptions.length){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n (mousedown)=\"reset()\"\n [class]=\"{\n 'selected': !selectedOption(),\n }\"\n >\n <p>Unassigned</p>\n <div class=\"unassigned-ltl\">\n <p>{{ dispatchCount() || 0}}</p>\n <svg-icon name=\"cai-ltl-single\" class=\"icon-sm\"></svg-icon>\n </div>\n </button> @for(dispatchBoard of dropdownOptions; track\n dispatchBoard.id){ @if(dispatchBoard.count > 0){ @if(dispatchBoard.dispatcher\n !== \"NOBOARDSVARIANT\"){\n <button\n tabindex=\"-1\"\n class=\"dropdown-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=\"cai-arrow-primary-up\" class=\"group-icon icon\"></svg-icon>\n </button>}\n @for(dispatch of dispatchBoard.dispatches; track dispatch.id ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n (mousedown)=\"handleOption(dispatch)\"\n [class]=\"{\n 'selected': castAsDispatch(selectedOption())?.id === dispatch.id,\n }\"\n >\n <div class=\"dropdown-subitem truck-item\">\n <svg-icon\n class=\"truck-icon\"\n [style.--truck-color]=\"dispatch.truck.color?.code || ''\"\n [name]=\"dispatch.truck.truckType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p\n class=\"truck-number\"\n [innerHTML]=\"dispatch.truck.truckNumber | highlightSearch : value()\"\n ></p>\n </div>\n <div class=\"dropdown-subitem trailer-item\">\n @if(dispatch.trailer) {\n <svg-icon\n class=\"trailer-icon\"\n [name]=\"dispatch.trailer.trailerType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p\n class=\"trailer-number\"\n [innerHTML]=\"dispatch.trailer.trailerNumber | highlightSearch : value()\"\n ></p>\n }\n </div>\n <div class=\"dropdown-subitem\">\n @if(dispatch.coDriver){\n <svg-icon class=\"dispatch-icon\" name=\"cai-people\"></svg-icon>\n <p\n class=\"driver-name\"\n [innerHTML]=\"\n dispatch.driver.firstName + ' & ' + dispatch.coDriver.firstName\n | highlightSearch : value()\n \"\n ></p>\n } @else{\n <cai-avatar\n [driver]=\"dispatch.driver\"\n [size]=\"18\"\n [inverse]=\"true\"\n ></cai-avatar>\n <p\n class=\"driver-name\"\n [innerHTML]=\"\n dispatch.driver.firstName + ' ' + dispatch.driver.lastName\n | highlightSearch : value()\n \"\n ></p>\n }\n </div>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-hover\">\n <p>{{ dispatch.payType }}</p>\n <svg-icon name=\"cai-driver\" class=\"icon-sm\"></svg-icon>\n </div>\n <div class=\"end-item-base dispatch-ltl\">\n <p>{{ dispatch.dispatcherId }}</p>\n <svg-icon name=\"cai-ltl-single\" class=\"icon-sm\"></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\n<!-- ftl dispatch dropdown -->\n<ng-template #ftlDispatchRef>\n @if(dropdownOptions.length){ @for(dispatchBoard of dropdownOptions; track\n dispatchBoard.id){ @if(dispatchBoard.count > 0){ @if(dispatchBoard.dispatcher\n !== \"NOBOARDSVARIANT\"){\n <button\n tabindex=\"-1\"\n class=\"dropdown-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=\"cai-arrow-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\"\n (mousedown)=\"handleOption(dispatch)\"\n [class]=\"{\n 'selected': castAsDispatch(selectedOption())?.id === dispatch.id,\n }\"\n >\n <div class=\"dropdown-subitem truck-item\">\n <svg-icon\n class=\"truck-icon\"\n [style.--truck-color]=\"dispatch.truck.color?.code || ''\"\n [name]=\"dispatch.truck.truckType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p\n class=\"truck-number\"\n [innerHTML]=\"dispatch.truck.truckNumber | highlightSearch : value()\"\n ></p>\n </div>\n <div class=\"dropdown-subitem trailer-item\">\n @if(dispatch.trailer) {\n <svg-icon\n class=\"trailer-icon\"\n [name]=\"dispatch.trailer.trailerType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p\n class=\"trailer-number\"\n [innerHTML]=\"dispatch.trailer.trailerNumber | highlightSearch : value()\"\n ></p>\n }\n </div>\n <div class=\"dropdown-subitem\">\n @if(dispatch.coDriver){\n <svg-icon class=\"dispatch-icon\" name=\"cai-people\"></svg-icon>\n <p\n class=\"driver-name\"\n [innerHTML]=\"\n dispatch.driver.firstName + ' & ' + dispatch.coDriver.firstName\n | highlightSearch : value()\n \"\n ></p>\n } @else{\n <cai-avatar\n [driver]=\"dispatch.driver\"\n [size]=\"18\"\n [inverse]=\"true\"\n ></cai-avatar>\n <p\n class=\"driver-name\"\n [innerHTML]=\"\n dispatch.driver.firstName + ' ' + dispatch.driver.lastName\n | highlightSearch : value()\n \"\n ></p>\n }\n </div>\n <div class=\"dropdown-subitem-end\">\n <div class=\"end-item-hover\">\n @if(dispatch.status?.statusString){\n <div\n class=\"dispatch-status\"\n [class]=\"\n 'status-' +\n dispatch.status?.statusString\n ?.toLowerCase()\n ?.replaceAll(' ', '')\n ?.replaceAll('.', '')\n \"\n >\n @if(dispatch.status?.statusString?.toLowerCase() === \"repair\"){\n <p class=\"status-block blue\">D</p>\n <p class=\"status-block green\">L</p>\n }\n {{ dispatch.status?.statusString }}\n @if(dispatch.status?.statusString?.toLowerCase() === \"repair\"){\n <p class=\"status-block green\">P</p>\n <p class=\"status-block orange\">D</p>\n } @if(dispatch.status?.statusCheckInNumber){\n <p class=\"status-block\">\n {{ dispatch.status?.statusCheckInNumber }}\n </p>\n }\n </div>\n <p class=\"dispatch-separator\">|</p>\n }\n <p class=\"dispatch-load-count\">{{ dispatch.driver.status }}</p>\n <svg-icon name=\"cai-load\" class=\"icon-sm\"></svg-icon>\n </div>\n <div class=\"end-item-base\">\n <p>{{ dispatch.payType }}</p>\n <svg-icon name=\"cai-driver\" class=\"icon-sm\"></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\n<!-- Label dropdown -->\n<ng-template #labelPickerRef>\n @if(dropdownOptions.length && !isPickingColor()){ @for(label of\n dropdownOptions; track label.id ){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item label-item\"\n (mousedown)=\"handleOption(label)\"\n [class]=\"{\n 'selected': castAsLabelOption(selectedOption())?.id === label.id,\n }\"\n >\n <svg-icon\n name=\"cai-label\"\n class=\"icon label-color\"\n [style.--label-color]=\"label.code\"\n [style.--label-hover-color]=\"label.hoverCode\"\n ></svg-icon>\n <p\n [innerHTML]=\"\n search ? (label.name || '' | highlightSearch : value()) : label.name\n \"\n ></p>\n <p class=\"dropdown-item-count\">{{ label.count || 0 }}</p>\n </button>\n } } @else if(isPickingColor()){ @for(color of labelColors(); track color.id){\n <button\n tabindex=\"-1\"\n class=\"dropdown-item label-item\"\n (mousedown)=\"handleSelectColor(color, $event)\"\n [class]=\"{\n 'selected': selectedColor().id === color.id,\n }\"\n >\n <svg-icon\n name=\"cai-label\"\n class=\"icon label-color\"\n [style.--label-color]=\"color.code\"\n [style.--label-hover-color]=\"color.hoverCode\"\n ></svg-icon>\n <p\n [innerHTML]=\"\n search ? (color.name || '' | highlightSearch : value()) : color.name\n \"\n ></p>\n <svg-icon name=\"cai-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<!-- Dispatcher dropdown -->\n\n<ng-template #dispatcherRef>\n @if(dropdownOptions.length){ @for(dispatcher of dropdownOptions; track $index\n ){ @let dispatcherOption = castAsDispatcher(dispatcher)!;\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ dispatcherOption.id }}\"\n (mousedown)=\"handleOption(dispatcherOption)\"\n [class]=\"{\n 'selected': castAsDispatcher(selectedOption())?.id === dispatcherOption.id,\n }\"\n >\n <cai-avatar\n [driver]=\"{\n id: dispatcherOption?.id || 0,\n firstName: (dispatcherOption?.fullName || ' ').split(' ')[0] || '',\n lastName: (dispatcherOption?.fullName || ' ').split(' ')[1] || '',\n avatarFile: dispatcherOption?.avatarFile,\n }\"\n [rounded]=\"true\"\n ></cai-avatar>\n <p\n [innerHTML]=\"\n search\n ? (dispatcherOption.fullName || '' | highlightSearch : value())\n : dispatcherOption.fullName\n \"\n ></p>\n <svg-icon name=\"cai-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 #truckRef>\n @if(dropdownOptions.length){ @for(truck of dropdownOptions; track $index ){\n @let truckOption = castAsTruckOption(truck)!;\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ truckOption.id }}\"\n (mousedown)=\"handleOption(truckOption)\"\n [class]=\"{\n 'selected': castAsTruckOption(selectedOption())?.id === truckOption.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search\n ? (truckOption.name || '' | highlightSearch : value())\n : truckOption.name\n \"\n ></p>\n <svg-icon\n class=\"truck-trailer-option\"\n [name]=\"truckOption.logoName.slice(0, -4)\"\n ></svg-icon>\n <svg-icon\n name=\"cai-checkmark\"\n class=\"dropdown-item-icon no-margin\"\n ></svg-icon>\n </button>\n } } @else {\n <p class=\"dropdown-item no-results\">No results</p>\n }\n</ng-template>\n\n<ng-template #trailerRef>\n @if(dropdownOptions.length){ @for(truck of dropdownOptions; track $index ){\n @let trailerOption = castAsTrailerOption(truck)!;\n <button\n tabindex=\"-1\"\n class=\"dropdown-item\"\n id=\"option-{{ trailerOption.id }}\"\n (mousedown)=\"handleOption(trailerOption)\"\n [class]=\"{\n 'selected': castAsTrailerOption(selectedOption())?.id === trailerOption.id,\n }\"\n >\n <p\n [innerHTML]=\"\n search\n ? (trailerOption.name || '' | highlightSearch : value())\n : trailerOption.name\n \"\n ></p>\n\n <svg-icon\n class=\"truck-trailer-option\"\n [name]=\"trailerOption.logoName.slice(0, -4)\"\n ></svg-icon>\n <svg-icon\n name=\"cai-checkmark\"\n class=\"dropdown-item-icon no-margin\"\n ></svg-icon>\n </button>\n } } @else {\n <p class=\"dropdown-item no-results\">No results</p>\n }\n</ng-template>\n\n<!-- Selected options -->\n\n<!-- selected dispatch -->\n<ng-template #selectedDispatchRef>\n @let dispatchOption = castAsDispatch(selectedOption()); @if(dispatchOption){\n <div class=\"dropdown-selected\">\n <div class=\"dropdown-subitem truck-item\">\n <svg-icon\n class=\"truck-icon\"\n [name]=\"dispatchOption!.truck.truckType.logoName.slice(0, -4)\"\n ></svg-icon>\n <p class=\"truck-number\">\n {{ dispatchOption!.truck.truckNumber }}\n </p>\n </div>\n <div class=\"dropdown-subitem trailer-item\">\n @if(dispatchOption!.trailer){\n <svg-icon\n class=\"trailer-icon\"\n [name]=\"\n castAsDispatch(\n selectedOption()\n )!.trailer?.trailerType?.logoName?.slice(0, -4)\n \"\n ></svg-icon>\n <p class=\"trailer-number\">\n {{ dispatchOption!.trailer?.trailerNumber }}\n </p>\n }\n </div>\n <div class=\"dropdown-subitem\">\n @if(dispatchOption!.coDriver){\n <svg-icon class=\"dispatch-icon\" name=\"cai-people\"></svg-icon>\n <p class=\"driver-name\">\n {{\n dispatchOption!.driver.firstName +\n \" & \" +\n dispatchOption!.coDriver?.firstName\n }}\n </p>\n } @else{\n <cai-avatar [driver]=\"dispatchOption!.driver\" [size]=\"18\"></cai-avatar>\n <p class=\"driver-name\">\n {{\n dispatchOption!.driver.firstName +\n \" \" +\n dispatchOption!.driver.lastName\n }}\n </p>\n }\n </div>\n <p class=\"selected-end-item\">\n {{ dispatchOption!.payType }}\n </p>\n </div>\n } @else { @if(!inputRef.value && this.config().dropdown == 'dispatch'){\n <p class=\"dropdown-selected\">Unassigned</p>\n } }\n</ng-template>\n\n<!-- selected label -->\n<ng-template #selectedLabelRef>\n @let labelOption = castAsLabelOption(selectedOption()); @if(labelOption &&\n !inputRef.value && !isPickingColor() && !isAdding()){\n <div class=\"dropdown-selected label-item\">\n <svg-icon\n name=\"cai-label\"\n class=\"icon label-color\"\n [style.--label-color]=\"labelOption!.code\"\n [style.--label-hover-color]=\"labelOption!.hoverCode\"\n ></svg-icon>\n <p>{{ labelOption!.name }}</p>\n </div>\n } @else if(isPickingColor() && !inputRef.value){\n <div class=\"dropdown-selected label-item\">\n <svg-icon name=\"cai-label\" class=\"icon\"></svg-icon>\n <p>Label Color</p>\n </div>\n } @else if(isAdding() && !inputRef.value){\n <div class=\"dropdown-selected label-item\">\n <svg-icon\n name=\"cai-label\"\n class=\"icon label-color\"\n [style.--label-color]=\"selectedColor()!.code\"\n [style.--label-hover-color]=\"selectedColor()!.hoverCode\"\n ></svg-icon>\n <p>Label Name</p>\n </div>\n }\n</ng-template>\n\n<!-- selected broker -->\n<ng-template #selectedBrokerRef>\n @let brokerOption = castAsBroker(selectedOption()); @if(brokerOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n @if((brokerOption!.availableCredit || 0) < 0){\n <svg-icon name=\"cai-status-warning-lite\" class=\"icon fraud\"></svg-icon>\n }\n <p>{{ brokerOption!.businessName }}</p>\n <div class=\"selected-end-item\">\n @if(!brokerOption!.creditLimit){\n <p>Unlimited</p>\n } @else {\n <p>\n {{ brokerOption!.availableCredit || 0 | currency }}\n </p>\n <div\n class=\"progress-bar\"\n [style.--progress]=\"\n getBrokerProgress(\n brokerOption!,\n brokerOption!.dnu || brokerOption!.ban\n ).activePercentageOfPaid + '%'\n \"\n [class]=\"\n getBrokerProgress(\n brokerOption!,\n brokerOption!.dnu || brokerOption!.ban\n ).status\n \"\n ></div>\n }\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedContactRef>\n @let contactOption = castAsContact(selectedOption()); @if(contactOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n <p>{{ contactOption?.contactName }}</p>\n <div class=\"selected-end-item\">\n <p>{{ contactOption?.phone }}</p>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedShipperRef>\n @let shipperOption = castAsShipper(selectedOption()); @if(shipperOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n <p>{{ shipperOption?.businessName }}</p>\n <div class=\"selected-end-item\">\n <p>{{ shipperOption?.address?.address }}</p>\n </div>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedBankRef>\n @let bankOption = castAsBank(selectedOption()); @if(bankOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n @if(bankOption?.logoName){\n <svg-icon\n class=\"option-icon\"\n [name]=\"bankOption?.logoName?.slice(0, -4) || ''\"\n ></svg-icon>\n }@else {\n <p>{{ bankOption?.name }}</p>\n }\n </div>\n }\n</ng-template>\n\n<ng-template #selectedDispatcherRef>\n @let dispatcherOption = castAsDispatcher(selectedOption());\n @if(dispatcherOption && !inputRef.value){\n <div class=\"dropdown-selected\">\n <cai-avatar\n [driver]=\"{\n id: dispatcherOption?.id || 0,\n firstName: (dispatcherOption?.fullName || ' ').split(' ')[0] || '',\n lastName: (dispatcherOption?.fullName || ' ').split(' ')[1] || '',\n avatarFile: dispatcherOption?.avatarFile,\n }\"\n [rounded]=\"true\"\n ></cai-avatar>\n <p>{{ dispatcherOption?.fullName }}</p>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedTruckRef>\n @let truckOption = castAsTruckOption(selectedOption()); @if(truckOption &&\n !inputRef.value){\n <div class=\"dropdown-selected\">\n <svg-icon\n class=\"option-icon\"\n [name]=\"truckOption?.logoName?.slice(0, -4)\"\n ></svg-icon>\n <p>{{ truckOption?.name }}</p>\n </div>\n }\n</ng-template>\n\n<ng-template #selectedTrailerRef>\n @let trailerOption = castAsTrailerOption(selectedOption()); @if(trailerOption\n && !inputRef.value){\n <div class=\"dropdown-selected\">\n <svg-icon\n class=\"option-icon\"\n [name]=\"trailerOption?.logoName?.slice(0, -4)\"\n ></svg-icon>\n <p>{{ trailerOption?.name }}</p>\n </div>\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 {\n Component,\n ElementRef,\n HostListener,\n input,\n OnChanges,\n Output,\n output,\n signal,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n//Components\nimport { SvgIconComponent } from 'angular-svg-icon';\n\n//Models\nimport { AppFile } from '../../models/appFile.model';\n\n//Pipes\nimport { BytesToHumanReadablePipe } from '../../pipes/bytes-to-human-readable.pipe';\n\n//Bootstrap\nimport { NgbPopover, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';\n\n//Modules\nimport { NgModule } from '@angular/core';\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: 'cai-document-preview',\n imports: [\n //Components\n SvgIconComponent,\n //Pipes\n BytesToHumanReadablePipe,\n //Bootstrap\n NgbPopoverModule,\n ],\n templateUrl: './document-preview.component.html',\n styleUrl: './document-preview.component.scss',\n})\nexport class DocumentPreviewComponent implements OnChanges {\n coverMinimalMod = input<boolean>(false);\n\n isCrop = signal<boolean>(false);\n\n constructor() {\n if (!this.coverMinimalMod) {\n this.isCrop.set(false);\n } else {\n this.isCrop.set(true);\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['coverMinimalMode']) {\n this.isCrop.set(true);\n }\n }\n\n /**\n * Signal that controls whether the delete modal is visible.Used to confirm the file deletion.\n */\n showDeleteModal = signal<boolean>(false);\n\n /**\n * Boolean flag indicating whether the tag popover is visible.Used to apply conditional styling or behavior.\n */\n showTag: boolean = false;\n\n /**\n * Currently selected tag for the document.\n */\n selectedTag: string = '';\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 * /**\n * The view mode in whic the file is displayed. This is a required input.\n * @type {InputSignal<string>}\n */\n viewMode = input.required<string>();\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 * Cancels the delete operation and hides the confirmation modal.\n */\n cancelDelete() {\n this.showDeleteModal.set(false);\n }\n\n /**\n * Confirms the deletion and emits the `onDelete` event.\n */\n confirmDelete() {\n this.onDelete.emit(this.file().fileName);\n this.showDeleteModal.set(false);\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 * Callback triggered when the tag popover is shown. Used to update internal state.\n */\n onTagShown() {\n this.showTag = true;\n }\n\n /**\n * Callback triggered when the tag popover is hidden. Used to update internal state.\n */\n onTagHidden() {\n this.showTag = false;\n }\n\n /**\n * List of available tags for labeling the document. These are selectable within the tag popover.\n */\n tags: string[] = [\n 'Article of Incorporation',\n 'IFTA Licence',\n 'EIN',\n 'W9',\n 'Setup Packet',\n 'MC Certificate',\n 'Other',\n ];\n\n /**\n * Emits when a tag is selected or removed for the file.\n * Contains the file name and the selected tag.\n * @type {OutputEmitterRef<{ fileName: string; tag: string }>}\n */\n onTagChange = output<{ fileName: string; tag: string }>();\n\n /**\n * Selects a tag and emits the `onTagChange` output.\n * @param newTag The newly selected tag string.\n */\n getTag(newTag: string) {\n this.selectedTag = newTag;\n this.onTagChange.emit({ fileName: this.file().fileName, tag: newTag });\n }\n\n /**\n * Removes the currently selected tag. Does not emit an event — must be called manually.\n */\n removeTag() {\n this.selectedTag = '';\n }\n\n /**\n * Placeholder for handling document sharing. Currently logs the file name to the console.\n */\n handleShare() {\n console.log(this.file().fileName);\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 = showTag === true;\n@let selected = this.selectedTag !== \"\"; @let largeView = viewMode() ===\n\"large\";\n@let coverMode = isCrop() === true;\n<div\n class=\"document\"\n [class.noTouch]=\"showDeleteModal()\"\n [class.buttonsVisibility]=\"showTagModal\"\n [class.large-view]=\"largeView\"\n [class.croppedVariant]=\"coverMode\"\n>\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 } @if(selected) {\n <div class=\"badges\">\n <p class=\"tag\">{{ selectedTag }}</p>\n </div>\n }\n <div class=\"badges\" [class.bottomTags]=\"largeView\">\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 page-count\">\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 @if(!largeView){\n <div class=\"document-actions-container label\">\n <button\n class=\"document-actions-button\"\n [class.tagIcon]=\"showTagModal\"\n [ngbPopover]=\"tagPopover\"\n autoClose=\"outside inside\"\n container=\"body\"\n [openDelay]=\"20\"\n (shown)=\"onTagShown()\"\n (hidden)=\"onTagHidden()\"\n placement=\"right-top left-top\"\n >\n <svg-icon name=\"cai-label\" class=\"icon\"></svg-icon>\n </button>\n </div>\n <div class=\"document-actions-container\">\n <button class=\"document-actions-button download\" (click)=\"handleDownload()\">\n <svg-icon name=\"cai-download\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button\" (click)=\"handleDelete()\">\n <svg-icon name=\"cai-delete\" class=\"icon\"></svg-icon>\n </button>\n </div>\n } @if(largeView) {\n <div #buttonsContainer class=\"document-actions-container label\">\n <button\n class=\"document-actions-button\"\n [class.tagIcon]=\"showTagModal\"\n [ngbPopover]=\"tagPopover\"\n autoClose=\"outside inside\"\n container=\"body\"\n [positionTarget]=\"buttonsContainer\"\n [openDelay]=\"20\"\n (shown)=\"onTagShown()\"\n (hidden)=\"onTagHidden()\"\n placement=\"right-top left-top\"\n >\n <svg-icon name=\"cai-label\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button share\" (click)=\"handleShare()\">\n <svg-icon name=\"cai-share\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button download\" (click)=\"handleDownload()\">\n <svg-icon name=\"cai-download\" class=\"icon\"></svg-icon>\n </button>\n <button class=\"document-actions-button delete\" (click)=\"handleDelete()\">\n <svg-icon name=\"cai-delete\" class=\"icon\"></svg-icon>\n </button>\n </div>\n }\n </div>\n <div class=\"delete-modal\">\n @if(largeView){\n <div class=\"delete-header\">\n <p>Are you sure you want to delete this file?</p>\n </div>\n }\n\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 class=\"tag-popover\" #tagPopover>\n <div class=\"tag-header\" (click)=\"removeTag()\">\n <div class=\"header\">\n <svg-icon name=\"cai-minus\" class=\"minus-icon\"></svg-icon>\n <span class=\"tag-header-text\">REMOVE TAG</span>\n </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=\"cai-checkmark\" class=\"checkmark-icon\"></svg-icon>\n <span class=\"tag-text\">{{ tag }}</span>\n </div>\n }\n </div>\n </ng-template>\n</div>\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\n .split('.')\n .pop()\n ?.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({\n canvasContext: context,\n 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}\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';\nimport {\n ImageCropperComponent,\n ImageCroppedEvent,\n LoadedImage,\n ImageTransform,\n} from 'ngx-image-cropper';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { AvatarComponent } from '../avatar/avatar.component';\nimport { AvatarColor, AvatarFile, Driver } from '../avatar/models';\nimport { AsyncValidatorFn } from '@angular/forms';\nimport { background } from 'storybook/internal/theming';\nimport { string32 } from 'pdfjs-dist/types/src/shared/util';\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: [\n SvgIconComponent,\n DocumentPreviewComponent,\n ImageCropperComponent,\n AvatarComponent,\n ],\n templateUrl: './drop-zone.component.html',\n styleUrl: './drop-zone.component.scss',\n})\nexport class DropZoneComponent {\n zoomValue = signal<number>(5.8);\n transform: ImageTransform = {\n scale: this.zoomValue(),\n };\n crop = input<boolean>(false);\n imageChangedEvent: Event | null = null;\n croppedImage: SafeUrl | null = '';\n showCropper = signal<boolean>(false);\n isCropperReady = signal<boolean>(false);\n originalImageWidth = 0;\n originalImageHeight = 0;\n\n smallView = signal<boolean>(false);\n\n coverUrl: string = '';\n profileUrl: string = '';\n logoUrl: string = '';\n size = input<string>();\n rounded = input<boolean>(false);\n cropHeight = signal<number>(0);\n cropWidth = signal<number>(0);\n\n driver = signal<Driver>({\n id: 0,\n firstName: '',\n lastName: '',\n avatarFile: null,\n colorFlag: 'Blue',\n });\n\n @ViewChild('inputRange') inputRange!: ElementRef<HTMLInputElement>;\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnInit() {\n this.cropDimensions();\n }\n\n ngAfterViewInit() {\n this.updateRangeBackground(this.inputRange?.nativeElement);\n }\n\n updateRangeBackground(input: HTMLInputElement) {\n const min = Number(input.min);\n const max = Number(input.max);\n var value;\n value = ((this.zoomValue() - min) / (max - min)) * 100;\n input.style.background = `linear-gradient(to right, #6692f1 0%, #6692f1 ${value}%, #eeeeee ${value}%, #eeeeee 100%)`;\n }\n\n cropDimensions() {\n const variant = this.variant();\n const rounded = this.rounded();\n let width = 0;\n let height = 0;\n switch (variant) {\n case 'profile':\n if (rounded) {\n width = 178;\n height = 178;\n } else {\n width = 160;\n height = 178;\n }\n break;\n case 'logo':\n width = 628;\n height = 214;\n break;\n case 'cover':\n width = 267;\n height = 178;\n break;\n }\n\n this.cropWidth.set(width);\n this.cropHeight.set(height);\n }\n\n ratioHelper(): number {\n const width = this.cropWidth();\n const height = this.cropHeight();\n\n return width && height ? width / height : 1;\n }\n\n onZoomChange(event: Event) {\n const input = event.target as HTMLInputElement;\n const zoom = Number(input.value);\n this.zoomValue.set(zoom);\n\n this.transform = {\n scale: zoom,\n };\n console.log(this.transform);\n console.log('Event', event);\n this.updateRangeBackground(event.target as HTMLInputElement);\n }\n\n fileChangeEvent(event: Event): void {\n this.imageChangedEvent = event;\n this.isCropperReady.set(false);\n const target = event.target as HTMLInputElement;\n const file = target.files?.[0];\n\n this.zoomValue.set(5.8);\n this.transform = { scale: this.zoomValue() };\n\n const fileExtension = file?.name.split('.').pop()?.toLowerCase();\n const isSupportedImage =\n file &&\n file.type.startsWith('image/') &&\n fileExtension &&\n this.supportedFileTypes().includes(fileExtension as FileExtension);\n if (isSupportedImage) {\n this.showCropper.set(true);\n } else {\n this.showCropper.set(false);\n }\n\n this.zoomValue.set(5.8);\n }\n\n imageCropped(event: ImageCroppedEvent) {\n if (event.objectUrl) {\n this.croppedImage = this.sanitizer.bypassSecurityTrustUrl(\n event.objectUrl\n );\n } else {\n this.croppedImage = null;\n }\n }\n\n imageLoaded(image: LoadedImage) {}\n\n cropperReady() {\n this.isCropperReady.set(true);\n }\n\n loadImageFailed() {\n // show message\n }\n\n onTransformChange(event: ImageTransform) {\n const scale = event?.scale as number;\n this.zoomValue.set(scale);\n }\n\n cancelCrop() {\n this.showCropper.set(false);\n }\n submitCrop() {\n const newPreviewUrl = this.croppedImage as string;\n console.log(newPreviewUrl);\n const lastIndex = this.docs().length - 1;\n if (lastIndex >= 0) {\n const updatedDocs = [...this.docs()];\n const lastDoc = { ...updatedDocs[lastIndex] };\n lastDoc.imagePreviewUrl = newPreviewUrl;\n updatedDocs[lastIndex] = lastDoc;\n this.docs.set(updatedDocs);\n\n this.showCropper.set(false);\n }\n\n if (this.variant() === 'profile' && this.croppedImage) {\n this.profileUrl = this.croppedImage as string;\n }\n if (this.variant() === 'cover' && this.croppedImage) {\n this.coverUrl = newPreviewUrl;\n if (this.size() === '480px' && this.coverUrl) {\n this.smallView.set(true);\n }\n }\n if (this.variant() === 'logo' && this.croppedImage) {\n this.logoUrl = this.croppedImage as string;\n }\n this.cropDimensions();\n }\n\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 holds an array of `AppFile` objects representing the files\n * that have been selected or dropped by the user.\n\n */\n variant = input<string>('document');\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 const visibleCount = this.size() === '480px' ? 2 : 3;\n const total = this.docs().length;\n\n if (total > visibleCount) {\n this.carouselIndex.set(total - visibleCount);\n } else {\n this.carouselIndex.set(0);\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 this.coverUrl = \"\";\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 visibleCount = this.size() === '480px' ? 2 : 3;\n const maxIndex = Math.max(0, this.docs().length - visibleCount);\n this.carouselIndex.update((i) => Math.min(maxIndex, i + 1));\n }\n\n handleTagChange(event: { fileName: string; tag: string }) {\n this.docs().forEach((doc) => {\n if (doc.fileName === event.fileName) doc.tag = event.tag;\n });\n }\n}\n","@let docCount = docs().length; @let cropFile = crop() === true; @let showCrop =\nshowCropper() === true; @let documentVariant = variant() === \"document\"; @let\nvideoVariant = variant() === \"video\"; @let profileVariant = variant() ===\n\"profile\"; @let coverVariant = variant() === \"cover\"; @let logoVariant =\nvariant() === \"logo\"; @let roundedBorder = rounded() === true; @let coverPreview\n= coverUrl !== \"\"; @let profilePreview = profileUrl !== \"\"; @let logoPreview =\nlogoUrl !== \"\"; @let smallSize = size() === \"480px\";\n\n<div\n class=\"container\"\n [class]=\"{\n smallContainer: smallSize,\n largeContainer: !smallSize,\n logoVar: logoVariant\n }\"\n>\n @if(coverVariant && coverPreview){\n <cai-document-preview\n class=\"cover-container\"\n [file]=\"{\n fileName: 'cover.png',\n imagePreviewUrl: coverUrl,\n type: 'png',\n size: 0,\n file: null,\n baseName: 'cover',\n pageCount: undefined,\n tag: ''\n }\"\n viewMode=\"small\"\n coverMinimalMode=\"true\"\n (onDelete)=\"handleDelete('cover.png')\"\n ></cai-document-preview>\n }\n \n @if (profileVariant) { @if(!profilePreview) {\n <div>\n <cai-avatar\n [driver]=\"driver()\"\n [size]=\"160\"\n [rounded]=\"rounded()\"\n ></cai-avatar>\n </div>\n } @else if(profilePreview) {\n <div class=\"profile-container\">\n <img\n [class]=\"{\n 'profile-rounded-image': rounded(),\n 'profile-square-image': !rounded()\n }\"\n [src]=\"profileUrl\"\n />\n </div>\n } }\n <!--Image Cropper-->\n @if(cropFile && showCrop){ @if (!isCropperReady()) {\n <div class=\"cropper-loader\">\n <div class=\"spinner\"></div>\n </div>\n }\n <div class=\"cropper-overlay\">\n <image-cropper\n #cropper\n class=\"img-cropper\"\n [class.logoBorder]=\"logoVariant\"\n [roundCropper]=\"roundedBorder ? true : false\"\n [hideResizeSquares]=\"true\"\n [allowMoveImage]=\"true\"\n [transform]=\"transform\"\n (transformChange)=\"onTransformChange($event)\"\n format=\"png\"\n [aspectRatio]=\"ratioHelper()\"\n [resizeToWidth]=\"cropWidth()\"\n [resizeToHeight]=\"cropHeight()\"\n [containWithinAspectRatio]=\"true\"\n [imageChangedEvent]=\"imageChangedEvent\"\n (imageCropped)=\"imageCropped($event)\"\n (imageLoaded)=\"imageLoaded($event)\"\n (cropperReady)=\"cropperReady()\"\n (loadImageFailed)=\"loadImageFailed()\"\n ></image-cropper>\n @if(isCropperReady()){\n <div class=\"lower-part\">\n <div class=\"range\">\n <input\n #inputRange\n type=\"range\"\n class=\"custom-range\"\n min=\"1\"\n max=\"10\"\n step=\"0.1\"\n [value]=\"zoomValue()\"\n (input)=\"onZoomChange($event)\"\n />\n </div>\n <div class=\"cropper-buttons\">\n <button class=\"cancel-button\" (click)=\"cancelCrop()\">Cancel</button>\n <button class=\"submit-button\" (click)=\"submitCrop()\">Submit</button>\n </div>\n </div>\n }\n </div>\n }\n <!-- Carousel -->\n @if(docCount > 0 && (documentVariant || videoVariant)) {\n <div class=\"docs\">\n <div class=\"doc-container\" [style.transform]=\"carouselTransform()\">\n @for (doc of docs(); track $index) {\n <cai-document-preview\n class=\"doc\"\n [file]=\"doc\"\n (onDelete)=\"handleDelete($event)\"\n (onDownload)=\"handleDownload($event)\"\n (onTagChange)=\"handleTagChange($event)\"\n viewMode=\"small\"\n ></cai-document-preview>\n }\n </div>\n @if((docCount >= 3 && !smallSize) || (docCount >= 2 && smallSize) ) {\n <button class=\"carousel-button carousel-left\" (click)=\"carouselLeft()\">\n <svg-icon name=\"cai-arrow-secondary-left\" class=\"arrow\"></svg-icon>\n </button>\n <button class=\"carousel-button carousel-right\" (click)=\"carouselRight()\">\n <svg-icon name=\"cai-arrow-secondary-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 >= 3,\n unsupported: unsupported(),\n smallView: smallView()\n }\"\n >\n <!-- Drop Zone -->\n <div class=\"drop-zone\" (click)=\"handleClickToAdd()\">\n @if(logoVariant && logoPreview){\n <div class=\"logo-container\">\n <img class=\"logo-image\" [src]=\"logoUrl\" />\n </div>\n } @if(coverVariant || logoVariant){\n <svg-icon\n name=\"cai-illustration-drop-zone-cover\"\n class=\"illustration\"\n ></svg-icon>\n } @if(profileVariant){\n <svg-icon\n name=\"cai-illustration-drop-zone-profile\"\n class=\"illustration\"\n ></svg-icon>\n } @if(documentVariant){\n <svg-icon\n name=\"cai-illustration-drop-zone\"\n class=\"illustration\"\n ></svg-icon>\n } @if(videoVariant){\n <svg-icon\n name=\"cai-illustration-drop-zone-video\"\n class=\"illustration\"\n ></svg-icon>\n }\n <div class=\"drop-zone-text\">\n <p class=\"heading\">\n DRAG FILES @if (docCount < 1) {\n <span>HERE</span>\n }\n </p>\n @if(!coverPreview && !profilePreview){\n <p class=\"subtext\">OR CLICK TO ADD</p>\n } @if(coverPreview || profilePreview){\n <p class=\"subtext\">OR CLICK TO REPLACE</p>\n }\n </div>\n\n <input\n type=\"file\"\n aria-hidden=\"true\"\n multiple\n class=\"drop-zone-input\"\n #inputRef\n (input)=\"onInput($event)\"\n (change)=\"fileChangeEvent($event)\"\n />\n </div>\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=\"cai-cancel\" (click)=\"cancel()\"></svg-icon>\n </button>\n </div>\n </div>\n</div>\n","import {\n Bank,\n Broker,\n Contact,\n DepartmentContactsPair,\n Dispatch,\n DispatchBoard,\n Dispatcher,\n DropdownOption,\n LabelOption,\n Shipper,\n TrailerOption,\n TruckOption,\n} from './dropdown.model';\n\nexport interface CaiInputConfig {\n type?: 'text' | 'password' | 'number';\n name?: string;\n required?: boolean;\n alignment?: 'left' | 'right';\n inverse?: boolean; // dark mode\n reveal?: number; // Revealed character count from the end of the password\n icon?: string | null; // icon name ex. 'cai-email'\n iconColor?: string; // color code for icons ex. #F89B2E\n dropdown?: boolean | DropdownType; // dropdown menu\n search?: boolean; // dropdown search functionality\n add?: boolean; // dropdown add new functionality\n subcontent?: string; // ex. months, years, lbs, gallons\n textTransform?: 'capitalize' | 'uppercase' | 'lowercase';\n textColor?: 'positive';\n\n placeholderBehavior?: 'dynamic' | 'fade' | 'static';\n errorBehavior?: 'dynamic' | 'static' | 'floating';\n\n label?: string; // aria label\n mask?: string; // mask pattern ex. (000) 000-0000\n min?: number; // min value for number inputs\n max?: number; // max value for number inputs or max length for text inputs\n step?: number | 'automatic'; // step value for number inputs\n prefix?: string; // ex. $\n withButtons?: boolean; // + - buttons\n autocomplete?: string; // autocomplete\n list?: boolean; // list view (disables validation animations and shows different initial state)\n inTable?: boolean;\n disabled?: boolean; // disabled?\n passwordRequirements?: boolean; // password requirements\n\n optionValue?: string; // option value (key)\n optionLabel?: string; // option label (key)\n\n removable?: boolean;\n autofocus?: boolean;\n}\n\nexport const DropdownTypes = [\n 'dispatch',\n 'ftl-dispatch',\n 'label',\n 'broker',\n 'contact',\n 'shipper',\n 'bank',\n 'dispatcher',\n 'truck',\n 'trailer',\n] as const;\n\nexport type DropdownType = (typeof DropdownTypes)[number];\n\nexport type DropdownArrays =\n | DropdownOption[]\n | LabelOption[]\n | Broker[]\n | DispatchBoard[]\n | DepartmentContactsPair[]\n | Shipper[]\n | Dispatch[]\n | Bank[]\n | Dispatcher[]\n | TruckOption[]\n | TrailerOption[];\n\nexport type DropdownOptions =\n | DropdownOption\n | LabelOption\n | Broker\n | Contact\n | Shipper\n | Dispatch\n | Bank\n | Dispatcher\n | TruckOption\n | TrailerOption;\n\nexport type DropdownKeys =\n | DropdownOption[keyof DropdownOption]\n | LabelOption[keyof LabelOption]\n | Dispatch[keyof Dispatch]\n | Broker[keyof Broker]\n | Contact[keyof Contact]\n | Shipper[keyof Shipper]\n | Bank[keyof Bank]\n | Dispatcher[keyof Dispatcher]\n | TruckOption[keyof TruckOption]\n | TrailerOption[keyof TrailerOption];\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,gBAAgB,GAAG,IAAI,gBAAgB,EAAE;AAEzC,IAAA,SAAS,CAAC,MAA2C,EAAA;AACnD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