carriera-intern-components 1.1.1 → 1.1.12

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.
@@ -4,7 +4,7 @@ import { PasswordDirective } from './directives/password.directive';
4
4
  import { NumberFormatDirective } from './directives/number-format.directive';
5
5
  import { MaskDirective } from './directives/mask.directive';
6
6
  import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
7
- import { Bank, Broker, CaiInputConfig, Contact, Dispatcher, DropdownOption, LabelColor, LabelOption, Shipper, Dispatch, DropdownArrays, DropdownOptions, TruckType, TrailerType, Hazardous, State, Owner, FuelCard } from './models';
7
+ import { Bank, Broker, CaiInputConfig, Contact, Dispatcher, DropdownOption, LabelColor, LabelOption, Shipper, Dispatch, DropdownArrays, DropdownOptions, TruckType, TrailerType, Hazardous, State, Owner, FuelCard, PMOption } from './models';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
10
  * This component is a generic input component that can be used to create various types of inputs.
@@ -35,6 +35,8 @@ export declare class InputComponent implements ControlValueAccessor, AfterViewIn
35
35
  stateRef: any;
36
36
  ownerRef: any;
37
37
  fuelcardRef: any;
38
+ pmRef: any;
39
+ selectedPmRef: any;
38
40
  selectedOwnerRef: any;
39
41
  selectedHazardousRef: any;
40
42
  selectedDispatchRef: any;
@@ -64,8 +66,8 @@ export declare class InputComponent implements ControlValueAccessor, AfterViewIn
64
66
  - `reveal`: For password inputs, the number of characters to reveal from the end.
65
67
  - `icon`: Name of an icon to display (e.g., `'cai-email'`).
66
68
  - `iconColor`: Color of the displayed icon (e.g., `'#FF0000'`).
67
- - `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'ftl-dispatch'`, `'broker'`, `'contact'`, `'shipper'`, `'dispatcher'`, `'truck'`, `'trailer'`, `'bank'`, `'label'`, `'state'`, `'owner'`, `'fuelcard'`, or `'subcontent'` variants.
68
- - `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]` | `DepartmentContactsPair[]` | `Shipper[]` | `Bank[]` | `Dispatcher[]` | `TruckOption[]` | `TrailerOption[]` | `Hazardous[]` | `State[]` | `Owner[]` | `FuelCard[]`.
69
+ - `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'ftl-dispatch'`, `'broker'`, `'contact'`, `'shipper'`, `'dispatcher'`, `'truck'`, `'trailer'`, `'bank'`, `'label'`, `'state'`, `'owner'`, `'fuelcard'`, `'pm'`, or `'subcontent'` variants.
70
+ - `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]` | `DepartmentContactsPair[]` | `Shipper[]` | `Bank[]` | `Dispatcher[]` | `TruckOption[]` | `TrailerOption[]` | `Hazardous[]` | `State[]` | `Owner[]` | `FuelCard[]` | `PMOption[]`.
69
71
  - `labelColors`: An array of label colors for the label picker.
70
72
  - `search`: Enables search within the dropdown.
71
73
  - `add`: Enables 'add new' functionality in the dropdown.
@@ -168,7 +170,7 @@ export declare class InputComponent implements ControlValueAccessor, AfterViewIn
168
170
  /**
169
171
  * An output signal that emits the value of the added option.
170
172
  */
171
- onOptionAdded: import("@angular/core").OutputEmitterRef<DropdownOption | LabelOption>;
173
+ onOptionAdded: import("@angular/core").OutputEmitterRef<string | LabelOption>;
172
174
  /**
173
175
  * An output signal that emits when the user clicks on the "ADD NEW" button in the dropdown.
174
176
  */
@@ -181,6 +183,10 @@ export declare class InputComponent implements ControlValueAccessor, AfterViewIn
181
183
  * An output signal that emits when the user clicks on the "CLEAR" button.
182
184
  */
183
185
  onClear: import("@angular/core").OutputEmitterRef<void>;
186
+ /**
187
+ * An output signal that emits when the user clicks on the "AUTOFILL" button.
188
+ */
189
+ onAutofill: import("@angular/core").OutputEmitterRef<void>;
184
190
  /**
185
191
  * Constructor for the InputComponent.
186
192
  * It injects NgControl to integrate with Angular's forms API.
@@ -194,7 +200,7 @@ export declare class InputComponent implements ControlValueAccessor, AfterViewIn
194
200
  * Handles autofill detection from Chrome's autofill animation.
195
201
  * Marks the control as autofilled and updates validity.
196
202
  */
197
- onAutofill(): void;
203
+ onAutofilled(): void;
198
204
  /**
199
205
  * Clears the autofill flag when user manually edits the field.
200
206
  * Re-enables normal validation.
@@ -327,6 +333,7 @@ export declare class InputComponent implements ControlValueAccessor, AfterViewIn
327
333
  castAsState(value: unknown): State | null;
328
334
  castAsOwner(value: unknown): Owner | null;
329
335
  castAsFuelCard(value: unknown): FuelCard | null;
336
+ castAsPMOption(value: unknown): PMOption | null;
330
337
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; self: true; }, null]>;
331
- static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cai-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "labelColors": { "alias": "labelColors"; "required": false; "isSignal": true; }; "preselectedUnit": { "alias": "preselectedUnit"; "required": false; "isSignal": true; }; }, { "onOptionAdded": "onOptionAdded"; "onAdd": "onAdd"; "onSelectionChange": "onSelectionChange"; "onClear": "onClear"; }, never, never, true, never>;
338
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cai-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "labelColors": { "alias": "labelColors"; "required": false; "isSignal": true; }; "preselectedUnit": { "alias": "preselectedUnit"; "required": false; "isSignal": true; }; }, { "onOptionAdded": "onOptionAdded"; "onAdd": "onAdd"; "onSelectionChange": "onSelectionChange"; "onClear": "onClear"; "onAutofill": "onAutofill"; }, never, never, true, never>;
332
339
  }
@@ -222,3 +222,9 @@ export type FuelCard = {
222
222
  brand?: string | null;
223
223
  account?: string | null;
224
224
  };
225
+ export type PMOption = {
226
+ id?: number;
227
+ title?: string | null;
228
+ months?: number | null;
229
+ logoName?: string | null;
230
+ };
@@ -1,4 +1,4 @@
1
- import { Bank, Broker, Contact, DepartmentContactsPair, Dispatch, DispatchBoard, Dispatcher, DropdownOption, LabelOption, Shipper, TrailerOption, TruckOption, Hazardous, State, Owner, FuelCard } from './dropdown.model';
1
+ import { Bank, Broker, Contact, DepartmentContactsPair, Dispatch, DispatchBoard, Dispatcher, DropdownOption, LabelOption, Shipper, TrailerOption, TruckOption, Hazardous, State, Owner, FuelCard, PMOption } from './dropdown.model';
2
2
  export interface CaiInputConfig {
3
3
  type?: 'text' | 'password' | 'number' | 'account';
4
4
  name?: string;
@@ -30,6 +30,7 @@ export interface CaiInputConfig {
30
30
  disabled?: boolean;
31
31
  passwordRequirements?: boolean;
32
32
  canOpenModal?: boolean;
33
+ noSeparator?: boolean;
33
34
  optionValue?: string;
34
35
  optionLabel?: string;
35
36
  removable?: boolean;
@@ -40,8 +41,8 @@ export type CustomError = {
40
41
  name: string;
41
42
  message: string | null;
42
43
  };
43
- export declare const DropdownTypes: readonly ["multiple", "dispatch", "ftl-dispatch", "label", "broker", "contact", "shipper", "bank", "dispatcher", "truck", "trailer", "subcontent", "hazardous", "state", "owner", "fuelcard"];
44
+ export declare const DropdownTypes: readonly ["multiple", "dispatch", "ftl-dispatch", "label", "broker", "contact", "shipper", "bank", "dispatcher", "truck", "trailer", "subcontent", "hazardous", "state", "owner", "fuelcard", "pm"];
44
45
  export type DropdownType = (typeof DropdownTypes)[number];
45
- export type DropdownArrays = DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[] | DepartmentContactsPair[] | Shipper[] | Dispatch[] | Bank[] | Dispatcher[] | TruckOption[] | TrailerOption[] | Hazardous[] | State[] | Owner[] | FuelCard[];
46
- export type DropdownOptions = DropdownOption | LabelOption | Broker | Contact | Shipper | Dispatch | Bank | Dispatcher | TruckOption | TrailerOption | Hazardous | State | Owner | FuelCard;
47
- export type DropdownKeys = DropdownOption[keyof DropdownOption] | LabelOption[keyof LabelOption] | Dispatch[keyof Dispatch] | Broker[keyof Broker] | Contact[keyof Contact] | Shipper[keyof Shipper] | Bank[keyof Bank] | Dispatcher[keyof Dispatcher] | TruckOption[keyof TruckOption] | TrailerOption[keyof TrailerOption] | Hazardous[keyof Hazardous] | State[keyof State] | Owner[keyof Owner] | FuelCard[keyof FuelCard];
46
+ export type DropdownArrays = DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[] | DepartmentContactsPair[] | Shipper[] | Dispatch[] | Bank[] | Dispatcher[] | TruckOption[] | TrailerOption[] | Hazardous[] | State[] | Owner[] | FuelCard[] | PMOption[];
47
+ export type DropdownOptions = DropdownOption | LabelOption | Broker | Contact | Shipper | Dispatch | Bank | Dispatcher | TruckOption | TrailerOption | Hazardous | State | Owner | FuelCard | PMOption;
48
+ export type DropdownKeys = DropdownOption[keyof DropdownOption] | LabelOption[keyof LabelOption] | Dispatch[keyof Dispatch] | Broker[keyof Broker] | Contact[keyof Contact] | Shipper[keyof Shipper] | Bank[keyof Bank] | Dispatcher[keyof Dispatcher] | TruckOption[keyof TruckOption] | TrailerOption[keyof TrailerOption] | Hazardous[keyof Hazardous] | State[keyof State] | Owner[keyof Owner] | FuelCard[keyof FuelCard] | PMOption[keyof PMOption];
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RemapPmIconsPipe implements PipeTransform {
4
+ transform(pm: string | null | undefined): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<RemapPmIconsPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<RemapPmIconsPipe, "remapPmIcons", true>;
7
+ }
@@ -0,0 +1,59 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';
3
+ import { PmItem } from '../../models/pm.model';
4
+ import * as i0 from "@angular/core";
5
+ export declare class PmComponent {
6
+ /**
7
+ * List of PM items passed from the parent component.
8
+ * Used to render all available PM options.
9
+ */
10
+ items: PmItem[];
11
+ /**
12
+ * Event emitted when the "Add new" button is clicked.
13
+ * The parent component can listen to this and perform appropriate actions.
14
+ */
15
+ onAdd: EventEmitter<void>;
16
+ /**
17
+ * Boolean signal indicating whether the PM popover is currently visible.
18
+ * Used to apply conditional styling or behavior when the popover is shown or hidden.
19
+ */
20
+ showPmPopover: import("@angular/core").WritableSignal<boolean>;
21
+ /**
22
+ * The currently selected PM item.
23
+ * Used to track and display the selected item's title and logo.
24
+ */
25
+ selectedPmItem: PmItem;
26
+ /**
27
+ * Called when the "Add new" button is clicked.
28
+ * Emits the `onAdd` event to notify the parent component.
29
+ */
30
+ onAddItem(): void;
31
+ /**
32
+ * Opens the tooltip when hovering over a PM item.
33
+ */
34
+ onShowTooltip(tooltip: NgbTooltip): void;
35
+ /**
36
+ * Closes the tooltip when the mouse leaves a PM item.
37
+ */
38
+ onHideTooltip(tooltip: NgbTooltip): void;
39
+ /**
40
+ * Called when the PM popover becomes visible.
41
+ */
42
+ onPmShown(): void;
43
+ /**
44
+ * Called when the PM popover is hidden.
45
+ */
46
+ onPmHidden(): void;
47
+ /**
48
+ * Called when a PM item is clicked.
49
+ * Sets the `selectedPmItem` with the clicked item's data.
50
+ */
51
+ onPmItemClick(item: PmItem): void;
52
+ /**
53
+ * Clears the selected PM item.
54
+ * Resets id, title and logoName.
55
+ */
56
+ onClear(): void;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<PmComponent, never>;
58
+ static ɵcmp: i0.ɵɵComponentDeclaration<PmComponent, "cai-pm", never, { "items": { "alias": "items"; "required": false; }; }, { "onAdd": "onAdd"; }, never, never, true, never>;
59
+ }
@@ -0,0 +1,5 @@
1
+ export interface PmItem {
2
+ id?: number;
3
+ logoName?: string | null;
4
+ title?: string | null;
5
+ }