carriera-intern-components 0.0.6 → 0.0.8
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 +22 -4
- package/app/components/drop-zone/drop-zone.component.d.ts +4 -0
- package/app/components/input/directives/mask.directive.d.ts +81 -0
- package/app/components/input/input.component.d.ts +77 -17
- package/app/components/input/models/index.d.ts +1 -0
- package/app/components/input/models/input.model.d.ts +14 -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 +614 -58
- package/fesm2022/carriera-intern-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public/assets/examplelargeview.png +0 -0
- package/public/assets/icons/cai-arrow-primary-up.svg +3 -0
- package/public/assets/icons/cai-date.svg +3 -0
- package/public/assets/icons/cai-dislike.svg +3 -0
- package/public/assets/icons/cai-driver.svg +3 -0
- package/public/assets/icons/cai-edit.svg +4 -0
- package/public/assets/icons/cai-illustration-dark.svg +4 -0
- package/public/assets/icons/cai-illustration.svg +18 -0
- package/public/assets/icons/cai-like.svg +3 -0
- package/public/assets/icons/cai-ltl-single.svg +3 -0
- package/public/assets/icons/cai-money.svg +3 -0
- package/public/assets/icons/cai-phone.svg +3 -0
- package/public/assets/icons/cai-search.svg +3 -0
- package/public/assets/icons/cai-share.svg +3 -0
- package/public/assets/icons/cai-sort-by.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 +200 -34
- /package/public/assets/icons/{ArrowDown.svg → cai-arrow-secondary-down.svg} +0 -0
- /package/public/assets/icons/{ArrowLeft.svg → cai-arrow-secondary-left.svg} +0 -0
- /package/public/assets/icons/{ArrowRight.svg → cai-arrow-secondary-right.svg} +0 -0
- /package/public/assets/icons/{Cancel.svg → cai-cancel.svg} +0 -0
- /package/public/assets/icons/{Checkmark.svg → cai-checkmark.svg} +0 -0
- /package/public/assets/icons/{Delete.svg → cai-delete.svg} +0 -0
- /package/public/assets/icons/{Download.svg → cai-download.svg} +0 -0
- /package/public/assets/icons/{Email.svg → cai-email.svg} +0 -0
- /package/public/assets/icons/{drop-zone.svg → cai-illustration-drop-zone.svg} +0 -0
- /package/public/assets/icons/{Label.svg → cai-label.svg} +0 -0
- /package/public/assets/icons/{Minus.svg → cai-minus.svg} +0 -0
- /package/public/assets/icons/{PasswordHidden.svg → cai-password-hidden.svg} +0 -0
- /package/public/assets/icons/{PasswordKey.svg → cai-password-key.svg} +0 -0
- /package/public/assets/icons/{PasswordShown.svg → cai-password-shown.svg} +0 -0
- /package/public/assets/icons/{Plus.svg → cai-plus.svg} +0 -0
- /package/public/assets/icons/{Reset.svg → cai-reset.svg} +0 -0
- /package/public/assets/icons/{Warning.svg → cai-status-warning.svg} +0 -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,11 +7,18 @@ 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>}
|
|
12
14
|
*/
|
|
13
15
|
file: import("@angular/core").InputSignal<AppFile>;
|
|
16
|
+
/**
|
|
17
|
+
* /**
|
|
18
|
+
* The view mode in whic the file is displayed. This is a required input.
|
|
19
|
+
* @type {InputSignal<string>}
|
|
20
|
+
*/
|
|
21
|
+
viewMode: import("@angular/core").InputSignal<string>;
|
|
14
22
|
/**
|
|
15
23
|
* An output event that emits the file name when the delete action is triggered.
|
|
16
24
|
* @type {OutputEmitterRef<string>}
|
|
@@ -25,6 +33,8 @@ export declare class DocumentPreviewComponent {
|
|
|
25
33
|
* Handles the delete action. Emits the `fileName` of the current `file` via the `onDelete` output.
|
|
26
34
|
*/
|
|
27
35
|
handleDelete(): void;
|
|
36
|
+
cancelDelete(): void;
|
|
37
|
+
confirmDelete(): void;
|
|
28
38
|
/**
|
|
29
39
|
* Handles the download action. Emits the `fileName` of the current `file` via the `onDownload` output.
|
|
30
40
|
*/
|
|
@@ -33,9 +43,17 @@ export declare class DocumentPreviewComponent {
|
|
|
33
43
|
* Handles the tag action. Currently, it logs a message to the console.
|
|
34
44
|
* A "TODO" indicates that further logic for tagging needs to be implemented here.
|
|
35
45
|
*/
|
|
36
|
-
handleTag(): void;
|
|
37
|
-
|
|
38
|
-
|
|
46
|
+
handleTag(popover: NgbPopover): void;
|
|
47
|
+
tags: string[];
|
|
48
|
+
onOutsideClick(event: MouseEvent): void;
|
|
49
|
+
selectedTag: string;
|
|
50
|
+
onTagChange: import("@angular/core").OutputEmitterRef<{
|
|
51
|
+
fileName: string;
|
|
52
|
+
tag: string;
|
|
53
|
+
}>;
|
|
54
|
+
getTag(newTag: string): void;
|
|
55
|
+
removeTag(): void;
|
|
56
|
+
handleShare(): void;
|
|
39
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentPreviewComponent, never>;
|
|
40
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentPreviewComponent, "
|
|
58
|
+
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>;
|
|
41
59
|
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ElementRef, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MaskDirective implements OnInit {
|
|
4
|
+
private el;
|
|
5
|
+
/**
|
|
6
|
+
* The mask pattern to apply.
|
|
7
|
+
* Placeholders:
|
|
8
|
+
* '0' - Digit (0-9)
|
|
9
|
+
* 'a' - Letter (a-z, A-Z)
|
|
10
|
+
* '*' - Alphanumeric (0-9, a-z, A-Z)
|
|
11
|
+
* @example '(000) 000-0000' for a phone number.
|
|
12
|
+
*/
|
|
13
|
+
appMask: import("@angular/core").InputSignal<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Stores the unmasked, "real" value of the input, containing only
|
|
16
|
+
* the characters entered by the user that fit the mask placeholders.
|
|
17
|
+
*/
|
|
18
|
+
private realValue;
|
|
19
|
+
constructor(el: ElementRef<HTMLInputElement>);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
/**
|
|
22
|
+
* HostListener for the 'input' event. This is the primary handler for
|
|
23
|
+
* formatting the value as the user types or pastes.
|
|
24
|
+
*/
|
|
25
|
+
onInput(event: InputEvent): void;
|
|
26
|
+
/**
|
|
27
|
+
* HostListener for the 'paste' event. It intercepts pasted content,
|
|
28
|
+
* cleans it, and integrates it into the masked value.
|
|
29
|
+
*/
|
|
30
|
+
onPaste(event: ClipboardEvent): void;
|
|
31
|
+
/**
|
|
32
|
+
* HostListener for the 'copy' event. Ensures that copying a selection
|
|
33
|
+
* from the input copies the unmasked, "real" value.
|
|
34
|
+
*/
|
|
35
|
+
onCopy(event: ClipboardEvent): void;
|
|
36
|
+
/**
|
|
37
|
+
* HostListener for the 'cut' event. Ensures cutting a selection removes
|
|
38
|
+
* the corresponding part from the real value and reformats the input.
|
|
39
|
+
*/
|
|
40
|
+
onCut(event: ClipboardEvent): void;
|
|
41
|
+
/**
|
|
42
|
+
* HostListener for the 'keydown' event. It validates key presses against
|
|
43
|
+
* the mask pattern, preventing invalid characters from being entered.
|
|
44
|
+
*/
|
|
45
|
+
onKeydown(event: KeyboardEvent): void;
|
|
46
|
+
/**
|
|
47
|
+
* The core formatting logic. It takes a value, extracts the valid user
|
|
48
|
+
* input, applies the mask, updates the display, and dispatches the change.
|
|
49
|
+
* @param value The current value from the input field.
|
|
50
|
+
*/
|
|
51
|
+
private formatValue;
|
|
52
|
+
/**
|
|
53
|
+
* Applies the mask to a given string of user input.
|
|
54
|
+
* @param realValue The clean user input.
|
|
55
|
+
* @param mask The mask pattern.
|
|
56
|
+
* @returns An object with the formatted value and the final real value.
|
|
57
|
+
*/
|
|
58
|
+
private applyMask;
|
|
59
|
+
/**
|
|
60
|
+
* Extracts valid user input characters from a string.
|
|
61
|
+
* @param value The string to clean.
|
|
62
|
+
* @returns A string containing only valid mask characters (digits/letters).
|
|
63
|
+
*/
|
|
64
|
+
private extractUserInput;
|
|
65
|
+
private isPlaceholder;
|
|
66
|
+
private charMatchesPlaceholder;
|
|
67
|
+
private setCursorToEnd;
|
|
68
|
+
private dispatchRealValueChange;
|
|
69
|
+
/**
|
|
70
|
+
* Public method to get the current unmasked "real" value.
|
|
71
|
+
* @returns The real value as a string.
|
|
72
|
+
*/
|
|
73
|
+
getRealValue(): string;
|
|
74
|
+
/**
|
|
75
|
+
* Public method to set the "real" value from outside the directive.
|
|
76
|
+
* @param value The new value to set.
|
|
77
|
+
*/
|
|
78
|
+
setRealValue(value: string): void;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MaskDirective, never>;
|
|
80
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MaskDirective, "[appMask]", never, { "appMask": { "alias": "appMask"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
81
|
+
}
|
|
@@ -3,7 +3,9 @@ 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';
|
|
8
|
+
import { MaskDirective } from './directives/mask.directive';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
10
|
/**
|
|
9
11
|
* A reusable input component that integrates with Angular Forms and supports
|
|
@@ -15,17 +17,31 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
15
17
|
ngControl: NgControl | null;
|
|
16
18
|
/**
|
|
17
19
|
* Defines the unique identifier for the input element.
|
|
18
|
-
* This ID is crucial for accessibility, linking the `<label>` to the
|
|
19
|
-
* native `<input>` via the `for` attribute.
|
|
20
20
|
* It is provided by the parent component as an Angular `input()` signal.
|
|
21
21
|
*/
|
|
22
22
|
id: import("@angular/core").InputSignal<string>;
|
|
23
23
|
/**
|
|
24
24
|
* Configuration object for the input's behavior and appearance.
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
* It is provided by the parent component as an Angular `input()` signal.
|
|
26
|
+
- `type`: HTML input type (`'text'`, `'password'`, `'number'`).
|
|
27
|
+
- `name`: The HTML `name` attribute.
|
|
28
|
+
- `required`: If `true`, the input is required for form submission.
|
|
29
|
+
- `alignment`: Text alignment within the input (`'left'` or `'right'`).
|
|
30
|
+
- `inverse`: If `true`, renders the input in a dark mode style.
|
|
31
|
+
- `reveal`: For password inputs, the number of characters to reveal from the end.
|
|
32
|
+
- `icon`: Name of an icon to display (e.g., `'cai-email'`).
|
|
33
|
+
- `iconColor`: Color of the displayed icon (e.g., `'#FF0000'`).
|
|
34
|
+
- `dropdown`: If `true`, the input is associated with a dropdown.
|
|
35
|
+
- `search`: Enables search within the dropdown.
|
|
36
|
+
- `add`: Enables 'add new' functionality in the dropdown.
|
|
37
|
+
- `dispatch`: If `true`, shows the dispatch modal as a dropdown.
|
|
38
|
+
- `placeholderBehavior`: Defines placeholder animation (`'dynamic'` , `'fade'`, `'static'`).
|
|
39
|
+
- `label`: An `aria-label` for accessibility.
|
|
40
|
+
- `mask`: A pattern string for input masking (e.g., `'(000) 000-0000'`).
|
|
41
|
+
- `min`: Minimum value for number inputs.
|
|
42
|
+
- `max`: Maximum value for number inputs or maximum length for text inputs.
|
|
43
|
+
- `withButtons`: If `true`, adds increment/decrement buttons for number inputs.
|
|
44
|
+
- `autocomplete`: The HTML `autocomplete` attribute.
|
|
29
45
|
*/
|
|
30
46
|
config: import("@angular/core").InputSignal<CaiInputConfig>;
|
|
31
47
|
/**
|
|
@@ -62,6 +78,7 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
62
78
|
inputRef: ElementRef<HTMLInputElement>;
|
|
63
79
|
PasswordDirective: PasswordDirective;
|
|
64
80
|
NumberFormatDirective: NumberFormatDirective;
|
|
81
|
+
MaskDirective: MaskDirective;
|
|
65
82
|
dropdown: NgbPopover;
|
|
66
83
|
/**
|
|
67
84
|
* Constructor for the InputComponent.
|
|
@@ -168,6 +185,12 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
168
185
|
* @param isDisabled - True if the control should be disabled, false otherwise.
|
|
169
186
|
*/
|
|
170
187
|
setDisabledState(isDisabled: boolean): void;
|
|
188
|
+
/**
|
|
189
|
+
* Called when the input element receives focus (focus event).
|
|
190
|
+
* Triggers the `onTouched` callback to notify Angular Forms that the
|
|
191
|
+
* input has been interacted with.
|
|
192
|
+
*/
|
|
193
|
+
onFocus(event: FocusEvent): void;
|
|
171
194
|
/**
|
|
172
195
|
* Called when the input element loses focus (blur event).
|
|
173
196
|
* Triggers the `onTouched` callback to notify Angular Forms that the
|
|
@@ -184,7 +207,17 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
184
207
|
* This is an input signal, meaning its value can be set from a parent component.
|
|
185
208
|
* @type {Signal<string[]>}
|
|
186
209
|
*/
|
|
187
|
-
dropdownOptions: import("@angular/core").InputSignal<
|
|
210
|
+
dropdownOptions: import("@angular/core").InputSignal<DropdownOption[]>;
|
|
211
|
+
/**
|
|
212
|
+
* A signal that holds the locally added options.
|
|
213
|
+
* @type {Signal<DropdownOption[]>}
|
|
214
|
+
*/
|
|
215
|
+
localOptions: import("@angular/core").WritableSignal<DropdownOption[]>;
|
|
216
|
+
/**
|
|
217
|
+
* A signal that holds the currently selected option from the dropdown.
|
|
218
|
+
* @type {Signal<DropdownOption | null>}
|
|
219
|
+
*/
|
|
220
|
+
selectedOption: import("@angular/core").WritableSignal<DropdownOption | null>;
|
|
188
221
|
/**
|
|
189
222
|
* A computed signal that provides the current list of options to display in the dropdown.
|
|
190
223
|
*
|
|
@@ -194,19 +227,46 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
194
227
|
*
|
|
195
228
|
* @type {Signal<string[]>}
|
|
196
229
|
*/
|
|
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;
|
|
230
|
+
options: import("@angular/core").Signal<DropdownOption[]>;
|
|
204
231
|
/**
|
|
205
232
|
* Handles when an option is selected from the dropdown.
|
|
206
233
|
* @param option - The selected option.
|
|
207
234
|
* @param event - The MouseEvent that initiated the selection action.
|
|
208
235
|
*/
|
|
209
|
-
handleOption(option:
|
|
236
|
+
handleOption(option: DropdownOption, event: MouseEvent): void;
|
|
237
|
+
/**
|
|
238
|
+
* An output signal that emits the value of the added option.
|
|
239
|
+
* @type {Output<string>}
|
|
240
|
+
*/
|
|
241
|
+
onConfirm: import("@angular/core").OutputEmitterRef<string>;
|
|
242
|
+
/**
|
|
243
|
+
* Adds a new option to the dropdown.
|
|
244
|
+
* @param option - The option to add.
|
|
245
|
+
*/
|
|
246
|
+
addOption(): void;
|
|
247
|
+
/**
|
|
248
|
+
* Handles when the user clicks on the "ADD NEW" button in the dropdown.
|
|
249
|
+
* It sets the `isAdding` signal to `true`, closes the dropdown, and focuses the input.
|
|
250
|
+
* @param event - The MouseEvent that initiated the action.
|
|
251
|
+
*/
|
|
252
|
+
handleAddOption(event: MouseEvent): void;
|
|
253
|
+
/**
|
|
254
|
+
* A signal that indicates whether a new option is being added.
|
|
255
|
+
* @type {Signal<boolean>}
|
|
256
|
+
*/
|
|
257
|
+
isAdding: import("@angular/core").WritableSignal<boolean>;
|
|
258
|
+
/**
|
|
259
|
+
* A signal that indicates whether the placeholder selected option should be shown.
|
|
260
|
+
* @type {Signal<boolean>}
|
|
261
|
+
*/
|
|
262
|
+
hasText: import("@angular/core").Signal<boolean>;
|
|
263
|
+
dispatches: import("@angular/core").InputSignal<DispatchBoard[] | undefined>;
|
|
264
|
+
dispatchCount: import("@angular/core").Signal<number>;
|
|
265
|
+
filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
|
|
266
|
+
handleDispatchOption(option: Dispatch, event: MouseEvent): void;
|
|
267
|
+
selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
|
|
268
|
+
foldedBoards: import("@angular/core").WritableSignal<number[]>;
|
|
269
|
+
fold(boardId: number, event: MouseEvent): void;
|
|
210
270
|
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>;
|
|
271
|
+
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
272
|
}
|
|
@@ -6,6 +6,20 @@ export interface CaiInputConfig {
|
|
|
6
6
|
inverse?: boolean;
|
|
7
7
|
reveal?: number;
|
|
8
8
|
icon?: string | null;
|
|
9
|
+
iconColor?: string;
|
|
9
10
|
dropdown?: boolean;
|
|
10
11
|
search?: boolean;
|
|
12
|
+
add?: boolean;
|
|
13
|
+
dispatch?: boolean;
|
|
14
|
+
placeholderBehavior?: 'dynamic' | 'fade' | 'static';
|
|
15
|
+
label?: string;
|
|
16
|
+
mask?: string;
|
|
17
|
+
min?: number;
|
|
18
|
+
max?: number;
|
|
19
|
+
withButtons?: boolean;
|
|
20
|
+
autocomplete?: string;
|
|
11
21
|
}
|
|
22
|
+
export type DropdownOption = {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
};
|
|
@@ -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
|
+
}
|