carriera-intern-components 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/avatar/avatar.component.d.ts +30 -0
- package/app/components/avatar/models/avatar.model.d.ts +21 -0
- package/app/components/avatar/models/index.d.ts +1 -0
- package/app/components/avatar/pipes/initials.pipe.d.ts +7 -0
- package/app/components/document-preview/document-preview.component.d.ts +15 -4
- package/app/components/drop-zone/drop-zone.component.d.ts +4 -0
- package/app/components/input/input.component.d.ts +55 -11
- package/app/components/input/models/index.d.ts +1 -0
- package/app/components/input/models/input.model.d.ts +6 -0
- package/app/components/input/models/planner.model.d.ts +78 -0
- package/app/components/input/pipes/highlight-search.d.ts +13 -0
- package/app/models/appFile.model.d.ts +1 -0
- package/fesm2022/carriera-intern-components.mjs +297 -40
- package/fesm2022/carriera-intern-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public/assets/icons/Driver.svg +3 -0
- package/public/assets/icons/LTL.svg +3 -0
- package/public/assets/icons/PrimaryArrowUp.svg +3 -0
- package/public/assets/icons/trailers/ic_trailer_bottom-dump.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_carhauler-stinger.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_carhauler.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_chassis.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_conestoga.svg +13 -0
- package/public/assets/icons/trailers/ic_trailer_container.svg +6 -0
- package/public/assets/icons/trailers/ic_trailer_dryvan.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_end-dump.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_flatbed.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_hopper.svg +6 -0
- package/public/assets/icons/trailers/ic_trailer_low-boy.svg +6 -0
- package/public/assets/icons/trailers/ic_trailer_reefer.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_side-kit.svg +6 -0
- package/public/assets/icons/trailers/ic_trailer_step-deck.svg +7 -0
- package/public/assets/icons/trailers/ic_trailer_tanker-pneumatic.svg +5 -0
- package/public/assets/icons/trailers/ic_trailer_tanker.svg +5 -0
- package/public/assets/icons/trucks/ic_truck_box-truck.svg +7 -0
- package/public/assets/icons/trucks/ic_truck_car-hauler.svg +7 -0
- package/public/assets/icons/trucks/ic_truck_cargo-van.svg +5 -0
- package/public/assets/icons/trucks/ic_truck_cement.svg +8 -0
- package/public/assets/icons/trucks/ic_truck_dump.svg +8 -0
- package/public/assets/icons/trucks/ic_truck_garbage.svg +10 -0
- package/public/assets/icons/trucks/ic_truck_reefer.svg +6 -0
- package/public/assets/icons/trucks/ic_truck_semi-truck.svg +8 -0
- package/public/assets/icons/trucks/ic_truck_semi-wSleeper.svg +8 -0
- package/public/assets/icons/trucks/ic_truck_spotter.svg +6 -0
- package/public/assets/icons/trucks/ic_truck_tow-truck.svg +8 -0
- package/public/assets/json/icons.json +12 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Driver } from './models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a user avatar component.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AvatarComponent {
|
|
7
|
+
/**
|
|
8
|
+
* The driver object containing information to display in the avatar.
|
|
9
|
+
* This input is required.
|
|
10
|
+
* @type {Driver}
|
|
11
|
+
*/
|
|
12
|
+
driver: import("@angular/core").InputSignal<Driver>;
|
|
13
|
+
/**
|
|
14
|
+
* The size of the avatar in pixels.
|
|
15
|
+
* @type {Size}
|
|
16
|
+
*/
|
|
17
|
+
size: import("@angular/core").InputSignal<18 | 22 | 32 | 74 | 160>;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the avatar should be rounded or not at sizes of 74px and 160px.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
*/
|
|
22
|
+
rounded: import("@angular/core").InputSignal<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the owner element should be dark or light
|
|
25
|
+
* @type {boolean}
|
|
26
|
+
*/
|
|
27
|
+
inverse: import("@angular/core").InputSignal<boolean>;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "cai-avatar", never, { "driver": { "alias": "driver"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "inverse": { "alias": "inverse"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Driver {
|
|
2
|
+
id: number;
|
|
3
|
+
firstName: string;
|
|
4
|
+
lastName: string;
|
|
5
|
+
owner?: boolean | null;
|
|
6
|
+
avatarFile?: AvatarFile | null;
|
|
7
|
+
colorFlag?: AvatarColor | null;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export type AvatarFile = {
|
|
11
|
+
fileId: number;
|
|
12
|
+
fileName: string;
|
|
13
|
+
url: string;
|
|
14
|
+
fileSize: number;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
declare const colors: readonly ["Blue", "Green", "Red", "Yellow", "Purple", "Gold", "Light Green", "Orange", "Light Blue", "Pink", "Brown", "Gray"];
|
|
18
|
+
export type AvatarColor = (typeof colors)[number];
|
|
19
|
+
declare const sizes: readonly [18, 22, 32, 74, 160];
|
|
20
|
+
export type Size = typeof sizes[number];
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './avatar.model';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class InitialsPipe implements PipeTransform {
|
|
4
|
+
transform(firstName: string | null | undefined, lastName: string | null | undefined): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InitialsPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<InitialsPipe, "initials", true>;
|
|
7
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppFile } from '../../models/appFile.model';
|
|
2
|
+
import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* This component displays a preview of a document, including its name, size,
|
|
@@ -6,6 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
6
7
|
*/
|
|
7
8
|
export declare class DocumentPreviewComponent {
|
|
8
9
|
showDeleteModal: import("@angular/core").WritableSignal<boolean>;
|
|
10
|
+
showTagModal: import("@angular/core").WritableSignal<boolean>;
|
|
9
11
|
/**
|
|
10
12
|
* The application file to be displayed in the preview. This is a required input.
|
|
11
13
|
* @type {InputSignal<AppFile>}
|
|
@@ -25,6 +27,8 @@ export declare class DocumentPreviewComponent {
|
|
|
25
27
|
* Handles the delete action. Emits the `fileName` of the current `file` via the `onDelete` output.
|
|
26
28
|
*/
|
|
27
29
|
handleDelete(): void;
|
|
30
|
+
cancelDelete(): void;
|
|
31
|
+
confirmDelete(): void;
|
|
28
32
|
/**
|
|
29
33
|
* Handles the download action. Emits the `fileName` of the current `file` via the `onDownload` output.
|
|
30
34
|
*/
|
|
@@ -33,9 +37,16 @@ export declare class DocumentPreviewComponent {
|
|
|
33
37
|
* Handles the tag action. Currently, it logs a message to the console.
|
|
34
38
|
* A "TODO" indicates that further logic for tagging needs to be implemented here.
|
|
35
39
|
*/
|
|
36
|
-
handleTag(): void;
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
handleTag(popover: NgbPopover): void;
|
|
41
|
+
tags: string[];
|
|
42
|
+
onOutsideClick(event: MouseEvent): void;
|
|
43
|
+
selectedTag: string;
|
|
44
|
+
onTagChange: import("@angular/core").OutputEmitterRef<{
|
|
45
|
+
fileName: string;
|
|
46
|
+
tag: string;
|
|
47
|
+
}>;
|
|
48
|
+
getTag(newTag: string): void;
|
|
49
|
+
removeTag(): void;
|
|
39
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentPreviewComponent, never>;
|
|
40
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentPreviewComponent, "app-document-preview", never, { "file": { "alias": "file"; "required": true; "isSignal": true; }; }, { "onDelete": "onDelete"; "onDownload": "onDownload"; }, never, never, true, never>;
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentPreviewComponent, "app-document-preview", never, { "file": { "alias": "file"; "required": true; "isSignal": true; }; }, { "onDelete": "onDelete"; "onDownload": "onDownload"; "onTagChange": "onTagChange"; }, never, never, true, never>;
|
|
41
52
|
}
|
|
@@ -115,6 +115,10 @@ export declare class DropZoneComponent {
|
|
|
115
115
|
* based on the number of documents.
|
|
116
116
|
*/
|
|
117
117
|
carouselRight(): void;
|
|
118
|
+
handleTagChange(event: {
|
|
119
|
+
fileName: string;
|
|
120
|
+
tag: string;
|
|
121
|
+
}): void;
|
|
118
122
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropZoneComponent, never>;
|
|
119
123
|
static ɵcmp: i0.ɵɵComponentDeclaration<DropZoneComponent, "app-drop-zone", never, { "excludedFileTypes": { "alias": "excludedFileTypes"; "required": false; "isSignal": true; }; "fileTypes": { "alias": "fileTypes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
120
124
|
}
|
|
@@ -3,7 +3,8 @@ import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
|
3
3
|
import { PasswordDirective } from '../../directives/password.directive';
|
|
4
4
|
import { NumberFormatDirective } from '../../directives/number-format.directive';
|
|
5
5
|
import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
|
|
6
|
-
import { CaiInputConfig } from './models/input.model';
|
|
6
|
+
import { CaiInputConfig, DropdownOption } from './models/input.model';
|
|
7
|
+
import { Dispatch, DispatchBoard } from './models';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* A reusable input component that integrates with Angular Forms and supports
|
|
@@ -168,6 +169,12 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
168
169
|
* @param isDisabled - True if the control should be disabled, false otherwise.
|
|
169
170
|
*/
|
|
170
171
|
setDisabledState(isDisabled: boolean): void;
|
|
172
|
+
/**
|
|
173
|
+
* Called when the input element receives focus (focus event).
|
|
174
|
+
* Triggers the `onTouched` callback to notify Angular Forms that the
|
|
175
|
+
* input has been interacted with.
|
|
176
|
+
*/
|
|
177
|
+
onFocus(event: FocusEvent): void;
|
|
171
178
|
/**
|
|
172
179
|
* Called when the input element loses focus (blur event).
|
|
173
180
|
* Triggers the `onTouched` callback to notify Angular Forms that the
|
|
@@ -184,7 +191,17 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
184
191
|
* This is an input signal, meaning its value can be set from a parent component.
|
|
185
192
|
* @type {Signal<string[]>}
|
|
186
193
|
*/
|
|
187
|
-
dropdownOptions: import("@angular/core").InputSignal<
|
|
194
|
+
dropdownOptions: import("@angular/core").InputSignal<DropdownOption[]>;
|
|
195
|
+
/**
|
|
196
|
+
* A signal that holds the locally added options.
|
|
197
|
+
* @type {Signal<DropdownOption[]>}
|
|
198
|
+
*/
|
|
199
|
+
localOptions: import("@angular/core").WritableSignal<DropdownOption[]>;
|
|
200
|
+
/**
|
|
201
|
+
* A signal that holds the currently selected option from the dropdown.
|
|
202
|
+
* @type {Signal<DropdownOption | null>}
|
|
203
|
+
*/
|
|
204
|
+
selectedOption: import("@angular/core").WritableSignal<DropdownOption | null>;
|
|
188
205
|
/**
|
|
189
206
|
* A computed signal that provides the current list of options to display in the dropdown.
|
|
190
207
|
*
|
|
@@ -194,19 +211,46 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
194
211
|
*
|
|
195
212
|
* @type {Signal<string[]>}
|
|
196
213
|
*/
|
|
197
|
-
options: import("@angular/core").Signal<
|
|
198
|
-
/**
|
|
199
|
-
* Formats an option for the dropdown by highlighting the search value if it exists in the option.
|
|
200
|
-
* @param option - The option to format.
|
|
201
|
-
* @returns The formatted option.
|
|
202
|
-
*/
|
|
203
|
-
formatOption(option: string): string;
|
|
214
|
+
options: import("@angular/core").Signal<DropdownOption[]>;
|
|
204
215
|
/**
|
|
205
216
|
* Handles when an option is selected from the dropdown.
|
|
206
217
|
* @param option - The selected option.
|
|
207
218
|
* @param event - The MouseEvent that initiated the selection action.
|
|
208
219
|
*/
|
|
209
|
-
handleOption(option:
|
|
220
|
+
handleOption(option: DropdownOption, event: MouseEvent): void;
|
|
221
|
+
/**
|
|
222
|
+
* An output signal that emits the value of the added option.
|
|
223
|
+
* @type {Output<string>}
|
|
224
|
+
*/
|
|
225
|
+
onConfirm: import("@angular/core").OutputEmitterRef<string>;
|
|
226
|
+
/**
|
|
227
|
+
* Adds a new option to the dropdown.
|
|
228
|
+
* @param option - The option to add.
|
|
229
|
+
*/
|
|
230
|
+
addOption(): void;
|
|
231
|
+
/**
|
|
232
|
+
* Handles when the user clicks on the "ADD NEW" button in the dropdown.
|
|
233
|
+
* It sets the `isAdding` signal to `true`, closes the dropdown, and focuses the input.
|
|
234
|
+
* @param event - The MouseEvent that initiated the action.
|
|
235
|
+
*/
|
|
236
|
+
handleAddOption(event: MouseEvent): void;
|
|
237
|
+
/**
|
|
238
|
+
* A signal that indicates whether a new option is being added.
|
|
239
|
+
* @type {Signal<boolean>}
|
|
240
|
+
*/
|
|
241
|
+
isAdding: import("@angular/core").WritableSignal<boolean>;
|
|
242
|
+
/**
|
|
243
|
+
* A signal that indicates whether the placeholder selected option should be shown.
|
|
244
|
+
* @type {Signal<boolean>}
|
|
245
|
+
*/
|
|
246
|
+
hasText: import("@angular/core").Signal<boolean>;
|
|
247
|
+
dispatches: import("@angular/core").InputSignal<DispatchBoard[] | undefined>;
|
|
248
|
+
dispatchCount: import("@angular/core").Signal<number>;
|
|
249
|
+
filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
|
|
250
|
+
handlePlannerOption(option: Dispatch, event: MouseEvent): void;
|
|
251
|
+
selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
|
|
252
|
+
foldedBoards: import("@angular/core").WritableSignal<number[]>;
|
|
253
|
+
fold(boardId: number, event: MouseEvent): void;
|
|
210
254
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; self: true; }]>;
|
|
211
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cai-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "dropdownOptions": { "alias": "dropdownOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
255
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cai-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "dropdownOptions": { "alias": "dropdownOptions"; "required": false; "isSignal": true; }; "dispatches": { "alias": "dispatches"; "required": false; "isSignal": true; }; }, { "onConfirm": "onConfirm"; }, never, never, true, never>;
|
|
212
256
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { AvatarColor, AvatarFile } from "../../avatar/models";
|
|
2
|
+
export type Dispatch = {
|
|
3
|
+
id: number;
|
|
4
|
+
dispatchBoardId: number;
|
|
5
|
+
dispatcherId: number;
|
|
6
|
+
truck: Truck;
|
|
7
|
+
trailer?: Trailer | null;
|
|
8
|
+
driver: Driver;
|
|
9
|
+
coDriver?: Driver | null;
|
|
10
|
+
payType: string;
|
|
11
|
+
status?: any | null;
|
|
12
|
+
currentLocationCoordinates?: {
|
|
13
|
+
latitude: number;
|
|
14
|
+
longitude: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type DispatchBoard = {
|
|
18
|
+
teamBoard: boolean;
|
|
19
|
+
id: number;
|
|
20
|
+
dispatcher: string | null;
|
|
21
|
+
count: number;
|
|
22
|
+
dispatches: Dispatch[];
|
|
23
|
+
};
|
|
24
|
+
export type Driver = {
|
|
25
|
+
id: number;
|
|
26
|
+
firstName: string;
|
|
27
|
+
lastName: string;
|
|
28
|
+
owner?: boolean | null;
|
|
29
|
+
avatarFile?: AvatarFile | null;
|
|
30
|
+
colorFlag?: AvatarColor | null;
|
|
31
|
+
status?: number;
|
|
32
|
+
address: string | null;
|
|
33
|
+
payType: {
|
|
34
|
+
name: string;
|
|
35
|
+
id: number;
|
|
36
|
+
};
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
};
|
|
39
|
+
export type Truck = {
|
|
40
|
+
id: number;
|
|
41
|
+
truckNumber: string;
|
|
42
|
+
status: number;
|
|
43
|
+
owner: string;
|
|
44
|
+
color: TruckColor;
|
|
45
|
+
truckType: TruckType;
|
|
46
|
+
truckMakeName?: string | null;
|
|
47
|
+
model?: string | null;
|
|
48
|
+
year: number;
|
|
49
|
+
};
|
|
50
|
+
export type TruckColor = {
|
|
51
|
+
id: number;
|
|
52
|
+
companyId?: number | null;
|
|
53
|
+
name: string;
|
|
54
|
+
code: string;
|
|
55
|
+
};
|
|
56
|
+
export type TruckType = {
|
|
57
|
+
id: number;
|
|
58
|
+
companyId?: number | null;
|
|
59
|
+
name: string;
|
|
60
|
+
logoName: string;
|
|
61
|
+
};
|
|
62
|
+
export type Trailer = {
|
|
63
|
+
id: number;
|
|
64
|
+
trailerNumber: string;
|
|
65
|
+
status: number;
|
|
66
|
+
owner: string | null;
|
|
67
|
+
trailerType: TrailerType;
|
|
68
|
+
trailerMakeName?: string | null;
|
|
69
|
+
model?: string | null;
|
|
70
|
+
year: number;
|
|
71
|
+
};
|
|
72
|
+
export type TrailerType = {
|
|
73
|
+
id: number;
|
|
74
|
+
companyId?: number | null;
|
|
75
|
+
name: string;
|
|
76
|
+
logoName: string;
|
|
77
|
+
hasVolume?: boolean | null;
|
|
78
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class HighlightSearchPipe implements PipeTransform {
|
|
4
|
+
/**
|
|
5
|
+
* Formats an option for the dropdown by highlighting the search value if it exists in the option.
|
|
6
|
+
* @param option - The option to format.
|
|
7
|
+
* @param searchValue - The value to search and highlight within the option.
|
|
8
|
+
* @returns The formatted option.
|
|
9
|
+
*/
|
|
10
|
+
transform(option: string, searchValue: string | undefined | null): string;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HighlightSearchPipe, never>;
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<HighlightSearchPipe, "highlightSearch", true>;
|
|
13
|
+
}
|