carriera-intern-components 0.0.9 → 0.0.92
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.
- package/app/components/drop-zone/drop-zone.component.d.ts +18 -5
- package/app/components/input/input.component.d.ts +106 -139
- package/app/components/input/models/dispatch.model.d.ts +10 -2
- package/app/components/input/models/input.model.d.ts +62 -3
- package/app/pipes/currency.pipe.d.ts +28 -0
- package/fesm2022/carriera-intern-components.mjs +916 -459
- package/fesm2022/carriera-intern-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public/assets/icons/cai-edit.svg +3 -3
- package/public/assets/icons/cai-edit2.svg +3 -0
- package/public/assets/icons/cai-expand.svg +3 -0
- package/public/assets/icons/cai-illustration-drop-zone-cover.svg +34 -0
- package/public/assets/icons/cai-illustration-drop-zone-profile.svg +58 -0
- package/public/assets/icons/cai-load.svg +5 -0
- package/public/assets/icons/cai-status-warning-lite.svg +3 -0
- package/public/assets/json/icons.json +27 -3
|
@@ -2,6 +2,7 @@ import { ElementRef } from '@angular/core';
|
|
|
2
2
|
import { AppFile } from '../../models/appFile.model';
|
|
3
3
|
import { ImageCroppedEvent, LoadedImage, ImageTransform } from 'ngx-image-cropper';
|
|
4
4
|
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
|
|
5
|
+
import { Driver } from '../avatar/models';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* A component that provides a user interface for file uploading via
|
|
@@ -17,14 +18,26 @@ export declare class DropZoneComponent {
|
|
|
17
18
|
croppedImage: SafeUrl | null;
|
|
18
19
|
showCropper: import("@angular/core").WritableSignal<boolean>;
|
|
19
20
|
isCropperReady: import("@angular/core").WritableSignal<boolean>;
|
|
21
|
+
coverUrl: string;
|
|
22
|
+
profileUrl: string;
|
|
23
|
+
logoUrl: string;
|
|
24
|
+
size: import("@angular/core").InputSignal<string | undefined>;
|
|
25
|
+
rounded: import("@angular/core").InputSignal<boolean>;
|
|
26
|
+
cropHeight: import("@angular/core").WritableSignal<number>;
|
|
27
|
+
cropWidth: import("@angular/core").WritableSignal<number>;
|
|
28
|
+
driver: import("@angular/core").WritableSignal<Driver>;
|
|
20
29
|
constructor(sanitizer: DomSanitizer);
|
|
30
|
+
ngOnInit(): void;
|
|
21
31
|
updateRangeBackground(input: HTMLInputElement): void;
|
|
32
|
+
cropDimensions(): void;
|
|
33
|
+
ratioHelper(): number;
|
|
22
34
|
onZoomChange(event: Event): void;
|
|
23
35
|
fileChangeEvent(event: Event): void;
|
|
24
36
|
imageCropped(event: ImageCroppedEvent): void;
|
|
25
37
|
imageLoaded(image: LoadedImage): void;
|
|
26
38
|
cropperReady(): void;
|
|
27
39
|
loadImageFailed(): void;
|
|
40
|
+
smallView: import("@angular/core").WritableSignal<boolean>;
|
|
28
41
|
cancelCrop(): void;
|
|
29
42
|
submitCrop(): void;
|
|
30
43
|
/**
|
|
@@ -60,10 +73,10 @@ export declare class DropZoneComponent {
|
|
|
60
73
|
*/
|
|
61
74
|
docs: import("@angular/core").WritableSignal<AppFile[]>;
|
|
62
75
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
76
|
+
* A signal that holds an array of `AppFile` objects representing the files
|
|
77
|
+
* that have been selected or dropped by the user.
|
|
78
|
+
|
|
79
|
+
*/
|
|
67
80
|
variant: import("@angular/core").InputSignal<string>;
|
|
68
81
|
/**
|
|
69
82
|
* A signal that acts as a boolean flag. It is set to `true` when the user
|
|
@@ -146,5 +159,5 @@ export declare class DropZoneComponent {
|
|
|
146
159
|
tag: string;
|
|
147
160
|
}): void;
|
|
148
161
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropZoneComponent, never>;
|
|
149
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DropZoneComponent, "app-drop-zone", never, { "crop": { "alias": "crop"; "required": false; "isSignal": true; }; "excludedFileTypes": { "alias": "excludedFileTypes"; "required": false; "isSignal": true; }; "fileTypes": { "alias": "fileTypes"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
162
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropZoneComponent, "app-drop-zone", never, { "crop": { "alias": "crop"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "excludedFileTypes": { "alias": "excludedFileTypes"; "required": false; "isSignal": true; }; "fileTypes": { "alias": "fileTypes"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
150
163
|
}
|
|
@@ -2,10 +2,10 @@ 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 { 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
11
|
* A reusable input component that integrates with Angular Forms and supports
|
|
@@ -31,60 +31,117 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
31
31
|
- `reveal`: For password inputs, the number of characters to reveal from the end.
|
|
32
32
|
- `icon`: Name of an icon to display (e.g., `'cai-email'`).
|
|
33
33
|
- `iconColor`: Color of the displayed icon (e.g., `'#FF0000'`).
|
|
34
|
-
- `dropdown`: If `true`, the input is associated with a dropdown.
|
|
34
|
+
- `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'ftl-dispatch'`, `'broker'`, `'contact'`, `'shipper'` or `'label'` variants.
|
|
35
|
+
- `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]` | `DepartmentContactsPair[]` | `Shipper[]`.
|
|
36
|
+
- `labelColors`: An array of label colors for the label picker.
|
|
35
37
|
- `search`: Enables search within the dropdown.
|
|
36
38
|
- `add`: Enables 'add new' functionality in the dropdown.
|
|
37
|
-
- `dispatch`: If `true`, shows the dispatch modal as a dropdown.
|
|
38
39
|
- `placeholderBehavior`: Defines placeholder animation (`'dynamic'` , `'fade'`, `'static'`).
|
|
39
40
|
- `label`: An `aria-label` for accessibility.
|
|
40
|
-
- `labelPicker`: If `true`, the input is associated with a label picker.
|
|
41
41
|
- `list`: If `true`, the input is associated with a list.
|
|
42
|
-
- `labels`: An array of label options for the label picker.
|
|
43
|
-
- `labelColors`: An array of label colors for the label picker.
|
|
44
42
|
- `mask`: A pattern string for input masking (e.g., `'(000) 000-0000'`).
|
|
45
43
|
- `min`: Minimum value for number inputs.
|
|
46
44
|
- `max`: Maximum value for number inputs or maximum length for text inputs.
|
|
47
45
|
- `withButtons`: If `true`, adds increment/decrement buttons for number inputs.
|
|
48
46
|
- `autocomplete`: The HTML `autocomplete` attribute.
|
|
49
47
|
- `disabled`: If `true`, the input is disabled (for use without reactive form).
|
|
48
|
+
- `passwordRequirements`: If `true`, shows password requirements for password inputs.
|
|
49
|
+
- `optionValue`: The value to use in the formControl for the selected option in the dropdown.
|
|
50
50
|
*/
|
|
51
51
|
config: import("@angular/core").InputSignal<CaiInputConfig>;
|
|
52
|
+
/**
|
|
53
|
+
* Input property to hold the dropdown options.
|
|
54
|
+
*/
|
|
55
|
+
options: import("@angular/core").InputSignal<Dispatch[] | DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[] | DepartmentContactsPair[] | Shipper[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Input property to hold the label colors for the label picker.
|
|
58
|
+
*/
|
|
59
|
+
labelColors: import("@angular/core").InputSignal<LabelColor[] | undefined>;
|
|
52
60
|
/**
|
|
53
61
|
* Internal signal to track the disabled state of the input.
|
|
54
|
-
* This state is managed by the `ControlValueAccessor`'s `setDisabledState`
|
|
55
|
-
* method, which is called by Angular's Forms API when the associated
|
|
56
|
-
* form control's status changes. Defaults to `false`.
|
|
57
62
|
*/
|
|
58
63
|
disabled: import("@angular/core").WritableSignal<boolean>;
|
|
59
64
|
/**
|
|
60
65
|
* Holds the internal, unmasked, and unformatted value of the input.
|
|
61
|
-
* This signal represents the component's "source of truth" for its value.
|
|
62
|
-
* It is updated by user input (via `onInput` or `onRealValueChange`) and
|
|
63
|
-
* programmatically by the `ControlValueAccessor`'s `writeValue` method.
|
|
64
|
-
* The value from this signal is what is propagated back to the parent `FormControl`.
|
|
65
66
|
*/
|
|
66
67
|
value: import("@angular/core").WritableSignal<string>;
|
|
67
68
|
/**
|
|
68
69
|
* Tracks the visibility state for inputs of `type='password'`.
|
|
69
|
-
* When `true`, the password's characters are shown; when `false`, they are
|
|
70
|
-
* masked. This is toggled by the `toggleVisibility` method.
|
|
71
|
-
* Defaults to `false`.
|
|
72
70
|
*/
|
|
73
71
|
visible: import("@angular/core").WritableSignal<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* A signal that holds the locally added options.
|
|
74
|
+
*/
|
|
75
|
+
localOptions: import("@angular/core").WritableSignal<Dispatch[] | DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[] | DepartmentContactsPair[] | Shipper[]>;
|
|
76
|
+
/**
|
|
77
|
+
* A signal that holds the currently selected option from the dropdown.
|
|
78
|
+
* @type {Signal<DropdownOption | null>}
|
|
79
|
+
*/
|
|
80
|
+
selectedOption: import("@angular/core").WritableSignal<DropdownOption | null>;
|
|
81
|
+
/**
|
|
82
|
+
* A signal that indicates whether a new option is being added.
|
|
83
|
+
*/
|
|
84
|
+
isAdding: import("@angular/core").WritableSignal<boolean>;
|
|
85
|
+
selectedLabel: import("@angular/core").WritableSignal<LabelOption | null>;
|
|
86
|
+
selectedColor: import("@angular/core").WritableSignal<LabelColor>;
|
|
87
|
+
isPickingColor: import("@angular/core").WritableSignal<boolean>;
|
|
88
|
+
selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
|
|
89
|
+
foldedBoards: import("@angular/core").WritableSignal<number[]>;
|
|
90
|
+
selectedBroker: import("@angular/core").WritableSignal<Broker | null>;
|
|
91
|
+
selectedContact: import("@angular/core").WritableSignal<Contact | null>;
|
|
92
|
+
selectedShipper: import("@angular/core").WritableSignal<Shipper | null>;
|
|
93
|
+
/**
|
|
94
|
+
* A computed signal that indicates whether the placeholder selected option should be shown.
|
|
95
|
+
*/
|
|
96
|
+
hasText: import("@angular/core").Signal<boolean>;
|
|
74
97
|
/**
|
|
75
98
|
* A computed signal that dynamically calculates the step value for number inputs.
|
|
76
|
-
* The step value changes based on the magnitude of the current `value()`.
|
|
77
|
-
* This allows for more intuitive incrementing and decrementing (e.g., smaller
|
|
78
|
-
* steps for smaller numbers, larger steps for larger numbers). It derives its
|
|
79
|
-
* value from the `getStepValue` method and automatically updates when the
|
|
80
|
-
* input's `value` signal changes.
|
|
81
99
|
*/
|
|
82
|
-
step: import("@angular/core").Signal<
|
|
100
|
+
step: import("@angular/core").Signal<1000 | 5000 | 10000 | 20000>;
|
|
101
|
+
dispatchCount: import("@angular/core").Signal<number>;
|
|
102
|
+
filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
|
|
103
|
+
/**
|
|
104
|
+
* A computed signal that provides the current list of options to display in the dropdown.
|
|
105
|
+
*
|
|
106
|
+
* If `search` is `false`, it returns the full `dropdownOptions`.
|
|
107
|
+
* If `search` is `true`, it filters `dropdownOptions` based on the `value` signal,
|
|
108
|
+
* performing a case-insensitive partial text match.
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
filteredOptions: import("@angular/core").Signal<DropdownOption[]>;
|
|
112
|
+
filteredLabels: import("@angular/core").Signal<LabelOption[]>;
|
|
113
|
+
filteredBrokers: import("@angular/core").Signal<Broker[]>;
|
|
114
|
+
filteredContacts: import("@angular/core").Signal<DepartmentContactsPair[]>;
|
|
115
|
+
filteredShippers: import("@angular/core").Signal<Shipper[]>;
|
|
116
|
+
/**
|
|
117
|
+
* An output signal that emits the value of the added option.
|
|
118
|
+
*/
|
|
119
|
+
onOptionAdded: import("@angular/core").OutputEmitterRef<DropdownOption | LabelOption>;
|
|
120
|
+
/**
|
|
121
|
+
* An output signal that emits when the user clicks on the "ADD NEW" button in the dropdown.
|
|
122
|
+
*/
|
|
123
|
+
onAdd: import("@angular/core").OutputEmitterRef<void>;
|
|
124
|
+
/**
|
|
125
|
+
* An output signal that emits the value of the changed dropdown option.
|
|
126
|
+
*/
|
|
127
|
+
onSelectionChange: import("@angular/core").OutputEmitterRef<any>;
|
|
83
128
|
inputRef: ElementRef<HTMLInputElement>;
|
|
129
|
+
dropdown: NgbPopover;
|
|
84
130
|
PasswordDirective: PasswordDirective;
|
|
85
131
|
NumberFormatDirective: NumberFormatDirective;
|
|
86
132
|
MaskDirective: MaskDirective;
|
|
87
|
-
|
|
133
|
+
dropdownOptionsRef: any;
|
|
134
|
+
dispatchesRef: any;
|
|
135
|
+
ftlDispatchRef: any;
|
|
136
|
+
labelPickerRef: any;
|
|
137
|
+
brokerRef: any;
|
|
138
|
+
contactRef: any;
|
|
139
|
+
shipperRef: any;
|
|
140
|
+
selectedDispatchRef: any;
|
|
141
|
+
selectedLabelRef: any;
|
|
142
|
+
selectedBrokerRef: any;
|
|
143
|
+
selectedContactRef: any;
|
|
144
|
+
selectedShipperRef: any;
|
|
88
145
|
/**
|
|
89
146
|
* Constructor for the InputComponent.
|
|
90
147
|
* It injects NgControl to integrate with Angular's forms API.
|
|
@@ -97,10 +154,6 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
97
154
|
* Handles the native 'input' event from the HTMLInputElement.
|
|
98
155
|
* Updates the component's internal value and notifies Angular forms
|
|
99
156
|
* about the change.
|
|
100
|
-
* For 'password' type (when not visible) and 'number' type, it relies
|
|
101
|
-
* on associated directives (PasswordDirective, NumberFormatDirective)
|
|
102
|
-
* to get the real value, as the displayed value might be
|
|
103
|
-
* masked or formatted.
|
|
104
157
|
* @param event - The input event object.
|
|
105
158
|
*/
|
|
106
159
|
onInput(event: Event): void;
|
|
@@ -112,45 +165,31 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
112
165
|
* @param event - A CustomEvent containing the new real value in `event.detail`.
|
|
113
166
|
*/
|
|
114
167
|
onRealValueChange(event: CustomEvent): void;
|
|
168
|
+
onChange: (_: any) => void;
|
|
169
|
+
onTouched: () => void;
|
|
170
|
+
registerOnChange(fn: any): void;
|
|
171
|
+
registerOnTouched(fn: any): void;
|
|
172
|
+
setDisabledState(isDisabled: boolean): void;
|
|
173
|
+
/**
|
|
174
|
+
* Writes a new value to the element. (ControlValueAccessor)
|
|
175
|
+
*/
|
|
176
|
+
writeValue(value: string): void;
|
|
115
177
|
/**
|
|
116
178
|
* Increments the value of a number input by the current step.
|
|
117
|
-
* If the current value is not a valid number, it starts from the `min` input.
|
|
118
|
-
* After updating, it notifies forms, updates the view, and focuses the input.
|
|
119
|
-
* @param event - The MouseEvent that triggered the increment.
|
|
120
179
|
*/
|
|
121
180
|
increment(event: MouseEvent): void;
|
|
122
181
|
/**
|
|
123
182
|
* Decrements the value of a number input by the current step.
|
|
124
|
-
* If the current value is not a valid number, it starts from the `min` input.
|
|
125
|
-
* The value will not go below the minimum value.
|
|
126
|
-
* After updating, it notifies forms, updates the view, and focuses the input.
|
|
127
|
-
* @param event - The MouseEvent that triggered the decrement.
|
|
128
183
|
*/
|
|
129
184
|
decrement(event: MouseEvent): void;
|
|
130
|
-
/**
|
|
131
|
-
* Calculates the step value for number inputs based on the current value.
|
|
132
|
-
* The step dynamically adjusts:
|
|
133
|
-
* - 1000 if value < 20000
|
|
134
|
-
* - 5000 if value < 50000
|
|
135
|
-
* - 10000 if value < 100000
|
|
136
|
-
* - 20000 otherwise
|
|
137
|
-
* Uses `min()` as a fallback if the current value is not a valid number.
|
|
138
|
-
* @returns The calculated step value.
|
|
139
|
-
*/
|
|
140
|
-
getStepValue(): number;
|
|
141
185
|
/**
|
|
142
186
|
* Toggles the visibility of the password input.
|
|
143
|
-
* Toggles the `visible` state and updates the input's displayed value.
|
|
144
187
|
* @param event - The MouseEvent that triggered the toggle.
|
|
145
188
|
*/
|
|
146
189
|
toggleVisibility(event: MouseEvent): void;
|
|
147
190
|
/**
|
|
148
191
|
* Sets the value in the actual HTML input element or updates the
|
|
149
192
|
* "real" value in the associated directive.
|
|
150
|
-
* - For 'password' type: If not visible, it updates the PasswordDirective's real value.
|
|
151
|
-
* If visible, it falls through to the default behavior.
|
|
152
|
-
* - For 'number' type: It updates the NumberFormatDirective's real value.
|
|
153
|
-
* - For other types (or visible password): It sets the `value` property of the native input element.
|
|
154
193
|
*/
|
|
155
194
|
setValue(): void;
|
|
156
195
|
/**
|
|
@@ -160,91 +199,39 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
160
199
|
* @param event - The MouseEvent that initiated the focus action.
|
|
161
200
|
*/
|
|
162
201
|
focus(event: MouseEvent): void;
|
|
163
|
-
onChange: (_: any) => void;
|
|
164
|
-
onTouched: () => void;
|
|
165
|
-
/**
|
|
166
|
-
* Writes a new value to the element. (ControlValueAccessor)
|
|
167
|
-
* This method is called by the Forms API to update the view when
|
|
168
|
-
* the form control's value changes programmatically.
|
|
169
|
-
* Uses `setTimeout` to ensure that `setValue` is called after the
|
|
170
|
-
* view (and potentially child directives) has been initialized,
|
|
171
|
-
* especially relevant if `writeValue` is called early in the component lifecycle.
|
|
172
|
-
* @param value - The new value to write.
|
|
173
|
-
*/
|
|
174
|
-
writeValue(value: string): void;
|
|
175
|
-
/**
|
|
176
|
-
* Registers a callback function that should be called when the
|
|
177
|
-
* control's value changes in the UI. (ControlValueAccessor)
|
|
178
|
-
* @param fn - The callback function to register.
|
|
179
|
-
*/
|
|
180
|
-
registerOnChange(fn: any): void;
|
|
181
|
-
/**
|
|
182
|
-
* Registers a callback function that should be called when the
|
|
183
|
-
* control receives a blur event. (ControlValueAccessor)
|
|
184
|
-
* @param fn - The callback function to register.
|
|
185
|
-
*/
|
|
186
|
-
registerOnTouched(fn: any): void;
|
|
187
|
-
/**
|
|
188
|
-
* This function is called by the Forms API when the control's disabled
|
|
189
|
-
* state changes. (ControlValueAccessor)
|
|
190
|
-
* @param isDisabled - True if the control should be disabled, false otherwise.
|
|
191
|
-
*/
|
|
192
|
-
setDisabledState(isDisabled: boolean): void;
|
|
193
202
|
/**
|
|
194
203
|
* Called when the input element receives focus (focus event).
|
|
195
|
-
* Triggers the `onTouched` callback to notify Angular Forms that the
|
|
196
|
-
* input has been interacted with.
|
|
197
204
|
*/
|
|
198
205
|
onFocus(event: FocusEvent): void;
|
|
199
206
|
/**
|
|
200
207
|
* Called when the input element loses focus (blur event).
|
|
201
|
-
* Triggers the `onTouched` callback to notify Angular Forms that the
|
|
202
|
-
* input has been interacted with.
|
|
203
208
|
*/
|
|
204
209
|
onBlur(): void;
|
|
205
210
|
/**
|
|
206
211
|
* Resets the input field's value to an empty string.
|
|
207
|
-
* Notifies Angular Forms of the change and updates the view.
|
|
208
212
|
*/
|
|
209
213
|
reset(): void;
|
|
210
214
|
/**
|
|
211
|
-
*
|
|
212
|
-
* This is an input signal, meaning its value can be set from a parent component.
|
|
213
|
-
* @type {Signal<string[]>}
|
|
215
|
+
* Returns the reference to the dropdown element based on the dropdown type.
|
|
214
216
|
*/
|
|
215
|
-
|
|
217
|
+
getDropdownRef(): any;
|
|
216
218
|
/**
|
|
217
|
-
*
|
|
218
|
-
* @type {Signal<DropdownOption[]>}
|
|
219
|
+
* Returns the reference to the selected element based on the dropdown type.
|
|
219
220
|
*/
|
|
220
|
-
|
|
221
|
+
getSelectedRef(): any;
|
|
221
222
|
/**
|
|
222
|
-
*
|
|
223
|
-
* @
|
|
223
|
+
* Type guard that checks if a given property exists on an object.
|
|
224
|
+
* @param obj The object to check.
|
|
225
|
+
* @param prop The property to check for.
|
|
226
|
+
* @returns `true` if `prop` exists on `obj`, `false` otherwise.
|
|
224
227
|
*/
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* A computed signal that provides the current list of options to display in the dropdown.
|
|
228
|
-
*
|
|
229
|
-
* If `search` is `false`, it returns the full `dropdownOptions`.
|
|
230
|
-
* If `search` is `true`, it filters `dropdownOptions` based on the `value` signal,
|
|
231
|
-
* performing a case-insensitive partial text match.
|
|
232
|
-
*
|
|
233
|
-
* @type {Signal<string[]>}
|
|
234
|
-
*/
|
|
235
|
-
options: import("@angular/core").Signal<DropdownOption[]>;
|
|
228
|
+
hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T;
|
|
236
229
|
/**
|
|
237
230
|
* Handles when an option is selected from the dropdown.
|
|
238
231
|
* @param option - The selected option.
|
|
239
232
|
* @param event - The MouseEvent that initiated the selection action.
|
|
240
233
|
*/
|
|
241
|
-
handleOption(option: DropdownOption, event?: MouseEvent): void;
|
|
242
|
-
/**
|
|
243
|
-
* An output signal that emits the value of the added option.
|
|
244
|
-
* @type {Output<string>}
|
|
245
|
-
*/
|
|
246
|
-
onOptionAdded: import("@angular/core").OutputEmitterRef<DropdownOption>;
|
|
247
|
-
onLabelAdded: import("@angular/core").OutputEmitterRef<LabelOption>;
|
|
234
|
+
handleOption(option: DropdownOption | LabelOption | Dispatch | Broker | Contact, event?: MouseEvent): void;
|
|
248
235
|
/**
|
|
249
236
|
* Adds a new option to the dropdown.
|
|
250
237
|
* @param option - The option to add.
|
|
@@ -255,33 +242,13 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
255
242
|
* It sets the `isAdding` signal to `true`, closes the dropdown, and focuses the input.
|
|
256
243
|
* @param event - The MouseEvent that initiated the action.
|
|
257
244
|
*/
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* A signal that indicates whether a new option is being added.
|
|
261
|
-
* @type {Signal<boolean>}
|
|
262
|
-
*/
|
|
263
|
-
isAdding: import("@angular/core").WritableSignal<boolean>;
|
|
264
|
-
/**
|
|
265
|
-
* A signal that indicates whether the placeholder selected option should be shown.
|
|
266
|
-
* @type {Signal<boolean>}
|
|
267
|
-
*/
|
|
268
|
-
hasText: import("@angular/core").Signal<boolean>;
|
|
269
|
-
dispatches: import("@angular/core").InputSignal<DispatchBoard[] | undefined>;
|
|
270
|
-
dispatchCount: import("@angular/core").Signal<number>;
|
|
271
|
-
filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
|
|
272
|
-
handleDispatchOption(option: Dispatch, event?: MouseEvent): void;
|
|
273
|
-
selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
|
|
274
|
-
foldedBoards: import("@angular/core").WritableSignal<number[]>;
|
|
245
|
+
handleAddingOption(event?: MouseEvent): void;
|
|
275
246
|
fold(boardId: number, event: MouseEvent): void;
|
|
276
|
-
labels: import("@angular/core").InputSignal<LabelOption[] | undefined>;
|
|
277
|
-
labelColors: import("@angular/core").InputSignal<LabelColor[] | undefined>;
|
|
278
|
-
localLabels: import("@angular/core").WritableSignal<LabelOption[]>;
|
|
279
|
-
filteredLabels: import("@angular/core").Signal<LabelOption[]>;
|
|
280
|
-
selectedLabel: import("@angular/core").WritableSignal<LabelOption | null>;
|
|
281
|
-
selectedColor: import("@angular/core").WritableSignal<LabelColor>;
|
|
282
|
-
handleLabelOption(option: LabelOption, event?: MouseEvent): void;
|
|
283
|
-
isPickingColor: import("@angular/core").WritableSignal<boolean>;
|
|
284
247
|
handleSelectColor(color: LabelColor, event?: MouseEvent): void;
|
|
248
|
+
getBrokerProgress(broker: Broker, disable?: boolean): {
|
|
249
|
+
activePercentageOfPaid: number;
|
|
250
|
+
status: string | null;
|
|
251
|
+
};
|
|
285
252
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; self: true; }]>;
|
|
286
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cai-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "
|
|
253
|
+
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>;
|
|
287
254
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AvatarColor, AvatarFile } from
|
|
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?:
|
|
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,11 +7,9 @@ export interface CaiInputConfig {
|
|
|
7
7
|
reveal?: number;
|
|
8
8
|
icon?: string | null;
|
|
9
9
|
iconColor?: string;
|
|
10
|
-
dropdown?: boolean;
|
|
10
|
+
dropdown?: boolean | 'dispatch' | 'ftl-dispatch' | 'label' | 'broker' | 'contact' | 'shipper';
|
|
11
11
|
search?: boolean;
|
|
12
12
|
add?: boolean;
|
|
13
|
-
dispatch?: boolean;
|
|
14
|
-
labelPicker?: boolean;
|
|
15
13
|
placeholderBehavior?: 'dynamic' | 'fade' | 'static';
|
|
16
14
|
label?: string;
|
|
17
15
|
mask?: string;
|
|
@@ -21,6 +19,8 @@ export interface CaiInputConfig {
|
|
|
21
19
|
autocomplete?: string;
|
|
22
20
|
list?: boolean;
|
|
23
21
|
disabled?: boolean;
|
|
22
|
+
passwordRequirements?: boolean;
|
|
23
|
+
optionValue?: string;
|
|
24
24
|
}
|
|
25
25
|
export type DropdownOption = {
|
|
26
26
|
id: string;
|
|
@@ -44,3 +44,62 @@ export type LabelColor = {
|
|
|
44
44
|
hoverCode?: string | null;
|
|
45
45
|
count?: number;
|
|
46
46
|
};
|
|
47
|
+
export type Broker = {
|
|
48
|
+
id?: number;
|
|
49
|
+
businessName?: string | null;
|
|
50
|
+
availableCredit?: number | null;
|
|
51
|
+
creditLimit?: number | null;
|
|
52
|
+
availableCreditType?: any | null;
|
|
53
|
+
payTerm?: any | null;
|
|
54
|
+
dnu?: boolean;
|
|
55
|
+
ban?: boolean;
|
|
56
|
+
status?: number;
|
|
57
|
+
loadsCount?: number;
|
|
58
|
+
revenue?: number | null;
|
|
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
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* @ngdoc pipe
|
|
5
|
+
* @name currencyPipe
|
|
6
|
+
* @description
|
|
7
|
+
* Formats a given dollar amount into a compact string (e.g., $35.21K, $1.23M).
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* {{ value | currency }}
|
|
11
|
+
*
|
|
12
|
+
* Example:
|
|
13
|
+
* {{ 35210 | currency }} // outputs: $35.21K
|
|
14
|
+
* {{ 1234567 | currency }} // outputs: $1.23M
|
|
15
|
+
* {{ 999 | currency }} // outputs: $999
|
|
16
|
+
* {{ 1234567890 | currency }} // outputs: $1.23B
|
|
17
|
+
*/
|
|
18
|
+
export declare class CurrencyPipe implements PipeTransform {
|
|
19
|
+
/**
|
|
20
|
+
* Transforms a numeric value into a formatted currency string.
|
|
21
|
+
*
|
|
22
|
+
* @param {number | string} value The dollar amount to format. Can be a number or a string that can be parsed to a number.
|
|
23
|
+
* @returns {string} The formatted currency string, or '$0.00' if the input is invalid.
|
|
24
|
+
*/
|
|
25
|
+
transform(value: number | string): string;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyPipe, never>;
|
|
27
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyPipe, "currency", true>;
|
|
28
|
+
}
|