carriera-intern-components 0.0.91 → 0.0.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/app/components/avatar/avatar.component.d.ts +1 -1
  2. package/app/components/document-preview/document-preview.component.d.ts +41 -7
  3. package/app/components/drop-zone/drop-zone.component.d.ts +6 -0
  4. package/app/components/input/input.component.d.ts +116 -131
  5. package/app/components/input/models/dispatch.model.d.ts +10 -2
  6. package/app/components/input/models/input.model.d.ts +47 -1
  7. package/fesm2022/carriera-intern-components.mjs +804 -523
  8. package/fesm2022/carriera-intern-components.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/public/assets/icons/cai-edit2.svg +3 -0
  11. package/public/assets/icons/general/cai-money-additional.svg +3 -0
  12. package/public/assets/json/icons.json +35 -28
  13. /package/public/assets/icons/{cai-arrow-primary-up.svg → arrows/cai-arrow-primary-up.svg} +0 -0
  14. /package/public/assets/icons/{cai-arrow-secondary-down.svg → arrows/cai-arrow-secondary-down.svg} +0 -0
  15. /package/public/assets/icons/{cai-arrow-secondary-left.svg → arrows/cai-arrow-secondary-left.svg} +0 -0
  16. /package/public/assets/icons/{cai-arrow-secondary-right.svg → arrows/cai-arrow-secondary-right.svg} +0 -0
  17. /package/public/assets/icons/{cai-checkmark.svg → general/cai-checkmark.svg} +0 -0
  18. /package/public/assets/icons/{cai-date.svg → general/cai-date.svg} +0 -0
  19. /package/public/assets/icons/{cai-email.svg → general/cai-email.svg} +0 -0
  20. /package/public/assets/icons/{cai-label.svg → general/cai-label.svg} +0 -0
  21. /package/public/assets/icons/{cai-money.svg → general/cai-money.svg} +0 -0
  22. /package/public/assets/icons/{cai-phone.svg → general/cai-phone.svg} +0 -0
  23. /package/public/assets/icons/{cai-sort-by.svg → general/cai-sort-by.svg} +0 -0
  24. /package/public/assets/icons/{cai-cancel.svg → interaction/cai-cancel.svg} +0 -0
  25. /package/public/assets/icons/{cai-dislike.svg → interaction/cai-dislike.svg} +0 -0
  26. /package/public/assets/icons/{cai-like.svg → interaction/cai-like.svg} +0 -0
  27. /package/public/assets/icons/{cai-minus.svg → interaction/cai-minus.svg} +0 -0
  28. /package/public/assets/icons/{cai-password-hidden.svg → interaction/cai-password-hidden.svg} +0 -0
  29. /package/public/assets/icons/{cai-password-key.svg → interaction/cai-password-key.svg} +0 -0
  30. /package/public/assets/icons/{cai-password-shown.svg → interaction/cai-password-shown.svg} +0 -0
  31. /package/public/assets/icons/{cai-plus.svg → interaction/cai-plus.svg} +0 -0
  32. /package/public/assets/icons/{cai-driver.svg → load/cai-driver.svg} +0 -0
  33. /package/public/assets/icons/{cai-load.svg → load/cai-load.svg} +0 -0
  34. /package/public/assets/icons/{cai-ltl-single.svg → load/cai-ltl-single.svg} +0 -0
  35. /package/public/assets/icons/{cai-delete.svg → menu/cai-delete.svg} +0 -0
  36. /package/public/assets/icons/{cai-download.svg → menu/cai-download.svg} +0 -0
  37. /package/public/assets/icons/{cai-reset.svg → menu/cai-reset.svg} +0 -0
  38. /package/public/assets/icons/{cai-status-warning-lite.svg → status/cai-status-warning-lite.svg} +0 -0
  39. /package/public/assets/icons/{cai-status-warning.svg → status/cai-status-warning.svg} +0 -0
@@ -14,7 +14,7 @@ export declare class AvatarComponent {
14
14
  * The size of the avatar in pixels.
15
15
  * @type {Size}
16
16
  */
17
- size: import("@angular/core").InputSignal<18 | 22 | 32 | 74 | 160>;
17
+ size: import("@angular/core").InputSignal<160 | 18 | 22 | 32 | 74>;
18
18
  /**
19
19
  * Whether the avatar should be rounded or not at sizes of 74px and 160px.
20
20
  * @type {boolean}
@@ -1,13 +1,22 @@
1
1
  import { AppFile } from '../../models/appFile.model';
2
- import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
3
2
  import * as i0 from "@angular/core";
4
3
  /**
5
4
  * This component displays a preview of a document, including its name, size,
6
5
  * and provides actions to delete, download, and tag the document.
7
6
  */
8
7
  export declare class DocumentPreviewComponent {
8
+ /**
9
+ * Signal that controls whether the delete modal is visible.Used to confirm the file deletion.
10
+ */
9
11
  showDeleteModal: import("@angular/core").WritableSignal<boolean>;
10
- showTagModal: import("@angular/core").WritableSignal<boolean>;
12
+ /**
13
+ * Boolean flag indicating whether the tag popover is visible.Used to apply conditional styling or behavior.
14
+ */
15
+ showTag: boolean;
16
+ /**
17
+ * Currently selected tag for the document.
18
+ */
19
+ selectedTag: string;
11
20
  /**
12
21
  * The application file to be displayed in the preview. This is a required input.
13
22
  * @type {InputSignal<AppFile>}
@@ -33,26 +42,51 @@ export declare class DocumentPreviewComponent {
33
42
  * Handles the delete action. Emits the `fileName` of the current `file` via the `onDelete` output.
34
43
  */
35
44
  handleDelete(): void;
45
+ /**
46
+ * Cancels the delete operation and hides the confirmation modal.
47
+ */
36
48
  cancelDelete(): void;
49
+ /**
50
+ * Confirms the deletion and emits the `onDelete` event.
51
+ */
37
52
  confirmDelete(): void;
38
53
  /**
39
54
  * Handles the download action. Emits the `fileName` of the current `file` via the `onDownload` output.
40
55
  */
41
56
  handleDownload(): void;
42
57
  /**
43
- * Handles the tag action. Currently, it logs a message to the console.
44
- * A "TODO" indicates that further logic for tagging needs to be implemented here.
58
+ * Callback triggered when the tag popover is shown. Used to update internal state.
59
+ */
60
+ onTagShown(): void;
61
+ /**
62
+ * Callback triggered when the tag popover is hidden. Used to update internal state.
63
+ */
64
+ onTagHidden(): void;
65
+ /**
66
+ * List of available tags for labeling the document. These are selectable within the tag popover.
45
67
  */
46
- handleTag(popover: NgbPopover): void;
47
68
  tags: string[];
48
- onOutsideClick(event: MouseEvent): void;
49
- selectedTag: string;
69
+ /**
70
+ * Emits when a tag is selected or removed for the file.
71
+ * Contains the file name and the selected tag.
72
+ * @type {OutputEmitterRef<{ fileName: string; tag: string }>}
73
+ */
50
74
  onTagChange: import("@angular/core").OutputEmitterRef<{
51
75
  fileName: string;
52
76
  tag: string;
53
77
  }>;
78
+ /**
79
+ * Selects a tag and emits the `onTagChange` output.
80
+ * @param newTag The newly selected tag string.
81
+ */
54
82
  getTag(newTag: string): void;
83
+ /**
84
+ * Removes the currently selected tag. Does not emit an event — must be called manually.
85
+ */
55
86
  removeTag(): void;
87
+ /**
88
+ * Placeholder for handling document sharing. Currently logs the file name to the console.
89
+ */
56
90
  handleShare(): void;
57
91
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentPreviewComponent, never>;
58
92
  static ɵcmp: i0.ɵɵComponentDeclaration<DocumentPreviewComponent, "cai-document-preview", never, { "file": { "alias": "file"; "required": true; "isSignal": true; }; "viewMode": { "alias": "viewMode"; "required": true; "isSignal": true; }; }, { "onDelete": "onDelete"; "onDownload": "onDownload"; "onTagChange": "onTagChange"; }, never, never, true, never>;
@@ -18,6 +18,8 @@ export declare class DropZoneComponent {
18
18
  croppedImage: SafeUrl | null;
19
19
  showCropper: import("@angular/core").WritableSignal<boolean>;
20
20
  isCropperReady: import("@angular/core").WritableSignal<boolean>;
21
+ originalImageWidth: number;
22
+ originalImageHeight: number;
21
23
  coverUrl: string;
22
24
  profileUrl: string;
23
25
  logoUrl: string;
@@ -26,12 +28,16 @@ export declare class DropZoneComponent {
26
28
  cropHeight: import("@angular/core").WritableSignal<number>;
27
29
  cropWidth: import("@angular/core").WritableSignal<number>;
28
30
  driver: import("@angular/core").WritableSignal<Driver>;
31
+ inputRange: ElementRef<HTMLInputElement>;
29
32
  constructor(sanitizer: DomSanitizer);
30
33
  ngOnInit(): void;
34
+ ngAfterViewInit(): void;
31
35
  updateRangeBackground(input: HTMLInputElement): void;
32
36
  cropDimensions(): void;
33
37
  ratioHelper(): number;
34
38
  onZoomChange(event: Event): void;
39
+ onTransformChange(event: ImageTransform): void;
40
+ getLimitedTransform(transform: ImageTransform): ImageTransform;
35
41
  fileChangeEvent(event: Event): void;
36
42
  imageCropped(event: ImageCroppedEvent): void;
37
43
  imageLoaded(image: LoadedImage): void;
@@ -2,16 +2,13 @@ import { ElementRef } from '@angular/core';
2
2
  import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { PasswordDirective } from '../../directives/password.directive';
4
4
  import { NumberFormatDirective } from '../../directives/number-format.directive';
5
+ import { MaskDirective } from './directives/mask.directive';
5
6
  import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
6
- import { Broker, CaiInputConfig, DropdownOption, LabelColor, LabelOption } from './models/input.model';
7
+ import { Broker, CaiInputConfig, Contact, DepartmentContactsPair, DropdownOption, LabelColor, LabelOption, Shipper } from './models/input.model';
7
8
  import { Dispatch, DispatchBoard } from './models';
8
- import { MaskDirective } from './directives/mask.directive';
9
9
  import * as i0 from "@angular/core";
10
10
  /**
11
- * A reusable input component that integrates with Angular Forms and supports
12
- * various input types, including text, password (with reveal functionality),
13
- * and numbers (with formatting and step controls). It also provides error
14
- * message display and icon support.
11
+ * This component is a generic input component that can be used to create various types of inputs.
15
12
  */
16
13
  export declare class InputComponent implements ControlValueAccessor {
17
14
  ngControl: NgControl | null;
@@ -31,8 +28,8 @@ export declare class InputComponent implements ControlValueAccessor {
31
28
  - `reveal`: For password inputs, the number of characters to reveal from the end.
32
29
  - `icon`: Name of an icon to display (e.g., `'cai-email'`).
33
30
  - `iconColor`: Color of the displayed icon (e.g., `'#FF0000'`).
34
- - `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'broker'` or `'label'` variants.
35
- - `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]`.
31
+ - `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'ftl-dispatch'`, `'broker'`, `'contact'`, `'shipper'` or `'label'` variants.
32
+ - `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]` | `DepartmentContactsPair[]` | `Shipper[]`.
36
33
  - `labelColors`: An array of label colors for the label picker.
37
34
  - `search`: Enables search within the dropdown.
38
35
  - `add`: Enables 'add new' functionality in the dropdown.
@@ -47,43 +44,119 @@ export declare class InputComponent implements ControlValueAccessor {
47
44
  - `disabled`: If `true`, the input is disabled (for use without reactive form).
48
45
  - `passwordRequirements`: If `true`, shows password requirements for password inputs.
49
46
  - `optionValue`: The value to use in the formControl for the selected option in the dropdown.
50
-
51
47
  */
52
48
  config: import("@angular/core").InputSignal<CaiInputConfig>;
49
+ /**
50
+ * Input property to hold the dropdown options.
51
+ */
52
+ options: import("@angular/core").InputSignal<DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[] | DepartmentContactsPair[] | Shipper[] | Dispatch[]>;
53
+ /**
54
+ * Input property to hold the label colors for the label picker.
55
+ */
56
+ labelColors: import("@angular/core").InputSignal<LabelColor[] | undefined>;
53
57
  /**
54
58
  * Internal signal to track the disabled state of the input.
55
- * This state is managed by the `ControlValueAccessor`'s `setDisabledState`
56
- * method, which is called by Angular's Forms API when the associated
57
- * form control's status changes. Defaults to `false`.
58
59
  */
59
60
  disabled: import("@angular/core").WritableSignal<boolean>;
60
61
  /**
61
62
  * Holds the internal, unmasked, and unformatted value of the input.
62
- * This signal represents the component's "source of truth" for its value.
63
- * It is updated by user input (via `onInput` or `onRealValueChange`) and
64
- * programmatically by the `ControlValueAccessor`'s `writeValue` method.
65
- * The value from this signal is what is propagated back to the parent `FormControl`.
66
63
  */
67
64
  value: import("@angular/core").WritableSignal<string>;
68
65
  /**
69
66
  * Tracks the visibility state for inputs of `type='password'`.
70
- * When `true`, the password's characters are shown; when `false`, they are
71
- * masked. This is toggled by the `toggleVisibility` method.
72
- * Defaults to `false`.
73
67
  */
74
68
  visible: import("@angular/core").WritableSignal<boolean>;
69
+ /**
70
+ * A signal that holds the locally added options.
71
+ */
72
+ localOptions: import("@angular/core").WritableSignal<DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[] | DepartmentContactsPair[] | Shipper[] | Dispatch[]>;
73
+ /**
74
+ * A signal that holds the currently selected option from the dropdown.
75
+ * @type {Signal<DropdownOption | null>}
76
+ */
77
+ selectedOption: import("@angular/core").WritableSignal<DropdownOption | null>;
78
+ /**
79
+ * A signal that indicates whether a new option is being added.
80
+ */
81
+ isAdding: import("@angular/core").WritableSignal<boolean>;
82
+ /**
83
+ * A signal that holds the currently selected label from the label picker.
84
+ */
85
+ selectedLabel: import("@angular/core").WritableSignal<LabelOption | null>;
86
+ /**
87
+ * A signal that holds the currently selected color from the label picker.
88
+ */
89
+ selectedColor: import("@angular/core").WritableSignal<LabelColor>;
90
+ isPickingColor: import("@angular/core").WritableSignal<boolean>;
91
+ /**
92
+ * A signal that holds the currently selected dispatch board from the dispatch board picker.
93
+ */
94
+ selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
95
+ foldedBoards: import("@angular/core").WritableSignal<number[]>;
96
+ /**
97
+ * A signal that holds the currently selected broker from the broker picker.
98
+ */
99
+ selectedBroker: import("@angular/core").WritableSignal<Broker | null>;
100
+ /**
101
+ * A signal that holds the currently selected contact from the contact picker.
102
+ */
103
+ selectedContact: import("@angular/core").WritableSignal<Contact | null>;
104
+ /**
105
+ * A signal that holds the currently selected shipper from the shipper picker.
106
+ */
107
+ selectedShipper: import("@angular/core").WritableSignal<Shipper | null>;
108
+ /**
109
+ * A computed signal that indicates whether the placeholder selected option should be shown.
110
+ */
111
+ hasText: import("@angular/core").Signal<boolean>;
75
112
  /**
76
113
  * A computed signal that dynamically calculates the step value for number inputs.
77
- * The step value changes based on the magnitude of the current `value()`.
78
- * This allows for more intuitive incrementing and decrementing (e.g., smaller
79
- * steps for smaller numbers, larger steps for larger numbers).
80
114
  */
81
115
  step: import("@angular/core").Signal<1000 | 5000 | 10000 | 20000>;
116
+ dispatchCount: import("@angular/core").Signal<number>;
117
+ filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
118
+ /**
119
+ * A computed signal that provides the current list of options to display in the dropdown.
120
+ *
121
+ * If `search` is `false`, it returns the full `dropdownOptions`.
122
+ * If `search` is `true`, it filters `dropdownOptions` based on the `value` signal,
123
+ * performing a case-insensitive partial text match.
124
+ *
125
+ */
126
+ filteredOptions: import("@angular/core").Signal<DropdownOption[]>;
127
+ filteredLabels: import("@angular/core").Signal<LabelOption[]>;
128
+ filteredBrokers: import("@angular/core").Signal<Broker[]>;
129
+ filteredContacts: import("@angular/core").Signal<DepartmentContactsPair[]>;
130
+ filteredShippers: import("@angular/core").Signal<Shipper[]>;
131
+ /**
132
+ * An output signal that emits the value of the added option.
133
+ */
134
+ onOptionAdded: import("@angular/core").OutputEmitterRef<DropdownOption | LabelOption>;
135
+ /**
136
+ * An output signal that emits when the user clicks on the "ADD NEW" button in the dropdown.
137
+ */
138
+ onAdd: import("@angular/core").OutputEmitterRef<void>;
139
+ /**
140
+ * An output signal that emits the value of the changed dropdown option.
141
+ */
142
+ onSelectionChange: import("@angular/core").OutputEmitterRef<any>;
82
143
  inputRef: ElementRef<HTMLInputElement>;
144
+ dropdown: NgbPopover;
83
145
  PasswordDirective: PasswordDirective;
84
146
  NumberFormatDirective: NumberFormatDirective;
85
147
  MaskDirective: MaskDirective;
86
- dropdown: NgbPopover;
148
+ dropdownOptionsRef: any;
149
+ dispatchesRef: any;
150
+ ftlDispatchRef: any;
151
+ labelPickerRef: any;
152
+ brokerRef: any;
153
+ contactRef: any;
154
+ shipperRef: any;
155
+ selectedDispatchRef: any;
156
+ selectedLabelRef: any;
157
+ selectedBrokerRef: any;
158
+ selectedContactRef: any;
159
+ selectedShipperRef: any;
87
160
  /**
88
161
  * Constructor for the InputComponent.
89
162
  * It injects NgControl to integrate with Angular's forms API.
@@ -96,10 +169,6 @@ export declare class InputComponent implements ControlValueAccessor {
96
169
  * Handles the native 'input' event from the HTMLInputElement.
97
170
  * Updates the component's internal value and notifies Angular forms
98
171
  * about the change.
99
- * For 'password' type (when not visible) and 'number' type, it relies
100
- * on associated directives (PasswordDirective, NumberFormatDirective)
101
- * to get the real value, as the displayed value might be
102
- * masked or formatted.
103
172
  * @param event - The input event object.
104
173
  */
105
174
  onInput(event: Event): void;
@@ -111,34 +180,31 @@ export declare class InputComponent implements ControlValueAccessor {
111
180
  * @param event - A CustomEvent containing the new real value in `event.detail`.
112
181
  */
113
182
  onRealValueChange(event: CustomEvent): void;
183
+ onChange: (_: any) => void;
184
+ onTouched: () => void;
185
+ registerOnChange(fn: any): void;
186
+ registerOnTouched(fn: any): void;
187
+ setDisabledState(isDisabled: boolean): void;
188
+ /**
189
+ * Writes a new value to the element. (ControlValueAccessor)
190
+ */
191
+ writeValue(value: string): void;
114
192
  /**
115
193
  * Increments the value of a number input by the current step.
116
- * If the current value is not a valid number, it starts from the `min` input.
117
- * After updating, it notifies forms, updates the view, and focuses the input.
118
- * @param event - The MouseEvent that triggered the increment.
119
194
  */
120
195
  increment(event: MouseEvent): void;
121
196
  /**
122
197
  * Decrements the value of a number input by the current step.
123
- * If the current value is not a valid number, it starts from the `min` input.
124
- * The value will not go below the minimum value.
125
- * After updating, it notifies forms, updates the view, and focuses the input.
126
- * @param event - The MouseEvent that triggered the decrement.
127
198
  */
128
199
  decrement(event: MouseEvent): void;
129
200
  /**
130
201
  * Toggles the visibility of the password input.
131
- * Toggles the `visible` state and updates the input's displayed value.
132
202
  * @param event - The MouseEvent that triggered the toggle.
133
203
  */
134
204
  toggleVisibility(event: MouseEvent): void;
135
205
  /**
136
206
  * Sets the value in the actual HTML input element or updates the
137
207
  * "real" value in the associated directive.
138
- * - For 'password' type: If not visible, it updates the PasswordDirective's real value.
139
- * If visible, it falls through to the default behavior.
140
- * - For 'number' type: It updates the NumberFormatDirective's real value.
141
- * - For other types (or visible password): It sets the `value` property of the native input element.
142
208
  */
143
209
  setValue(): void;
144
210
  /**
@@ -148,137 +214,56 @@ export declare class InputComponent implements ControlValueAccessor {
148
214
  * @param event - The MouseEvent that initiated the focus action.
149
215
  */
150
216
  focus(event: MouseEvent): void;
151
- onChange: (_: any) => void;
152
- onTouched: () => void;
153
- /**
154
- * Writes a new value to the element. (ControlValueAccessor)
155
- * This method is called by the Forms API to update the view when
156
- * the form control's value changes programmatically.
157
- * Uses `setTimeout` to ensure that `setValue` is called after the
158
- * view (and potentially child directives) has been initialized,
159
- * especially relevant if `writeValue` is called early in the component lifecycle.
160
- * @param value - The new value to write.
161
- */
162
- writeValue(value: string): void;
163
- /**
164
- * Registers a callback function that should be called when the
165
- * control's value changes in the UI. (ControlValueAccessor)
166
- * @param fn - The callback function to register.
167
- */
168
- registerOnChange(fn: any): void;
169
- /**
170
- * Registers a callback function that should be called when the
171
- * control receives a blur event. (ControlValueAccessor)
172
- * @param fn - The callback function to register.
173
- */
174
- registerOnTouched(fn: any): void;
175
- /**
176
- * This function is called by the Forms API when the control's disabled
177
- * state changes. (ControlValueAccessor)
178
- * @param isDisabled - True if the control should be disabled, false otherwise.
179
- */
180
- setDisabledState(isDisabled: boolean): void;
181
217
  /**
182
218
  * Called when the input element receives focus (focus event).
183
- * Triggers the `onTouched` callback to notify Angular Forms that the
184
- * input has been interacted with.
185
219
  */
186
220
  onFocus(event: FocusEvent): void;
187
221
  /**
188
222
  * Called when the input element loses focus (blur event).
189
- * Triggers the `onTouched` callback to notify Angular Forms that the
190
- * input has been interacted with.
191
223
  */
192
224
  onBlur(): void;
193
225
  /**
194
226
  * Resets the input field's value to an empty string.
195
- * Notifies Angular Forms of the change and updates the view.
196
227
  */
197
228
  reset(): void;
198
- dropdownOptionsRef: any;
199
- dispatchesRef: any;
200
- labelPickerRef: any;
201
- brokerRef: any;
202
- getDropdownRef(): any;
203
229
  /**
204
- * Input property to hold the dropdown options.
230
+ * Returns the reference to the dropdown element based on the dropdown type.
205
231
  */
206
- options: import("@angular/core").InputSignal<DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[]>;
232
+ getDropdownRef(): any;
207
233
  /**
208
- * A signal that holds the locally added options.
234
+ * Returns the reference to the selected element based on the dropdown type.
209
235
  */
210
- localOptions: import("@angular/core").WritableSignal<DropdownOption[] | LabelOption[]>;
236
+ getSelectedRef(): any;
211
237
  /**
212
- * A signal that holds the currently selected option from the dropdown.
213
- * @type {Signal<DropdownOption | null>}
238
+ * Type guard that checks if a given property exists on an object.
239
+ * @param obj The object to check.
240
+ * @param prop The property to check for.
241
+ * @returns `true` if `prop` exists on `obj`, `false` otherwise.
214
242
  */
215
- selectedOption: import("@angular/core").WritableSignal<DropdownOption | null>;
216
- /**
217
- * A computed signal that provides the current list of options to display in the dropdown.
218
- *
219
- * If `search` is `false`, it returns the full `dropdownOptions`.
220
- * If `search` is `true`, it filters `dropdownOptions` based on the `value` signal,
221
- * performing a case-insensitive partial text match.
222
- *
223
- * @type {Signal<string[]>}
224
- */
225
- filteredOptions: import("@angular/core").Signal<DropdownOption[]>;
226
243
  hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T;
227
244
  /**
228
245
  * Handles when an option is selected from the dropdown.
229
246
  * @param option - The selected option.
230
247
  * @param event - The MouseEvent that initiated the selection action.
231
248
  */
232
- handleOption(option: DropdownOption | LabelOption | Dispatch | Broker, event?: MouseEvent): void;
233
- /**
234
- * An output signal that emits the value of the added option.
235
- * @type {Output<string>}
236
- */
237
- onOptionAdded: import("@angular/core").OutputEmitterRef<DropdownOption>;
238
- onLabelAdded: import("@angular/core").OutputEmitterRef<LabelOption>;
249
+ handleOption(option: DropdownOption | LabelOption | Dispatch | Broker | Contact, event?: MouseEvent): void;
239
250
  /**
240
251
  * Adds a new option to the dropdown.
241
252
  * @param option - The option to add.
242
253
  */
243
254
  addOption(): void;
244
- /**
245
- * An output signal that emits when the user clicks on the "ADD NEW" button in the dropdown.
246
- * @type {Output<void>}
247
- */
248
- onAdd: import("@angular/core").OutputEmitterRef<void>;
249
255
  /**
250
256
  * Handles when the user clicks on the "ADD NEW" button in the dropdown.
251
257
  * It sets the `isAdding` signal to `true`, closes the dropdown, and focuses the input.
252
258
  * @param event - The MouseEvent that initiated the action.
253
259
  */
254
- handleAddOption(event?: MouseEvent): void;
255
- /**
256
- * A signal that indicates whether a new option is being added.
257
- * @type {Signal<boolean>}
258
- */
259
- isAdding: import("@angular/core").WritableSignal<boolean>;
260
- /**
261
- * A signal that indicates whether the placeholder selected option should be shown.
262
- * @type {Signal<boolean>}
263
- */
264
- hasText: import("@angular/core").Signal<boolean>;
265
- dispatchCount: import("@angular/core").Signal<number>;
266
- filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
267
- selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
268
- foldedBoards: import("@angular/core").WritableSignal<number[]>;
260
+ handleAddingOption(event?: MouseEvent): void;
269
261
  fold(boardId: number, event: MouseEvent): void;
270
- labelColors: import("@angular/core").InputSignal<LabelColor[] | undefined>;
271
- filteredLabels: import("@angular/core").Signal<LabelOption[]>;
272
- selectedLabel: import("@angular/core").WritableSignal<LabelOption | null>;
273
- selectedColor: import("@angular/core").WritableSignal<LabelColor>;
274
- isPickingColor: import("@angular/core").WritableSignal<boolean>;
275
262
  handleSelectColor(color: LabelColor, event?: MouseEvent): void;
276
- filteredBrokers: import("@angular/core").Signal<Broker[]>;
277
- selectedBroker: import("@angular/core").WritableSignal<Broker | null>;
278
263
  getBrokerProgress(broker: Broker, disable?: boolean): {
279
264
  activePercentageOfPaid: number;
280
265
  status: string | null;
281
266
  };
282
267
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; self: true; }]>;
283
- 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; }; }, { "onOptionAdded": "onOptionAdded"; "onLabelAdded": "onLabelAdded"; "onAdd": "onAdd"; }, never, never, true, never>;
268
+ 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; }; }, { "onOptionAdded": "onOptionAdded"; "onAdd": "onAdd"; "onSelectionChange": "onSelectionChange"; }, never, never, true, never>;
284
269
  }
@@ -1,4 +1,4 @@
1
- import { AvatarColor, AvatarFile } from "../../avatar/models";
1
+ import { AvatarColor, AvatarFile } from '../../avatar/models';
2
2
  export type Dispatch = {
3
3
  id: number;
4
4
  dispatchBoardId: number;
@@ -8,7 +8,7 @@ export type Dispatch = {
8
8
  driver: Driver;
9
9
  coDriver?: Driver | null;
10
10
  payType: string;
11
- status?: any | null;
11
+ status?: Status | null;
12
12
  currentLocationCoordinates?: {
13
13
  latitude: number;
14
14
  longitude: number;
@@ -76,3 +76,11 @@ export type TrailerType = {
76
76
  logoName: string;
77
77
  hasVolume?: boolean | null;
78
78
  };
79
+ export type Status = {
80
+ statusValue: {
81
+ name: string;
82
+ id: number;
83
+ };
84
+ statusString: string;
85
+ statusCheckInNumber: string;
86
+ };
@@ -7,7 +7,7 @@ export interface CaiInputConfig {
7
7
  reveal?: number;
8
8
  icon?: string | null;
9
9
  iconColor?: string;
10
- dropdown?: boolean | 'dispatch' | 'label' | 'broker';
10
+ dropdown?: boolean | 'dispatch' | 'ftl-dispatch' | 'label' | 'broker' | 'contact' | 'shipper';
11
11
  search?: boolean;
12
12
  add?: boolean;
13
13
  placeholderBehavior?: 'dynamic' | 'fade' | 'static';
@@ -57,3 +57,49 @@ export type Broker = {
57
57
  loadsCount?: number;
58
58
  revenue?: number | null;
59
59
  };
60
+ export type DepartmentContactsPair = {
61
+ department?: Department;
62
+ contacts?: Contact[];
63
+ };
64
+ export type Department = {
65
+ id?: number;
66
+ name?: string | null;
67
+ count?: number;
68
+ companyUsers?: any | null;
69
+ };
70
+ export type Contact = {
71
+ id?: number;
72
+ brokerId?: number;
73
+ shipperId?: number;
74
+ phone?: string | null;
75
+ contactName?: string | null;
76
+ extensionPhone?: string | null;
77
+ };
78
+ export type Shipper = {
79
+ id?: number;
80
+ businessName?: string | null;
81
+ status?: number | null;
82
+ address?: Address | null;
83
+ longitude?: number | null;
84
+ latitude?: number | null;
85
+ receivingFrom?: string | null;
86
+ receivingTo?: string | null;
87
+ shippingFrom?: string | null;
88
+ shippingTo?: string | null;
89
+ receivingOpenTwentyFourHours?: boolean;
90
+ shippingOpenTwentyFourHours?: boolean;
91
+ pickupCount?: number;
92
+ deliveryCount?: number;
93
+ };
94
+ export type Address = {
95
+ city?: string | null;
96
+ state?: string | null;
97
+ county?: string | null;
98
+ address?: string | null;
99
+ street?: string | null;
100
+ streetNumber?: string | null;
101
+ country?: string | null;
102
+ zipCode?: string | null;
103
+ stateShortName?: string | null;
104
+ addressUnit?: string | null;
105
+ };