carriera-intern-components 0.0.8 → 0.0.91
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 +40 -1
- package/app/components/input/input.component.d.ts +43 -31
- package/app/components/input/models/index.d.ts +1 -1
- package/app/components/input/models/input.model.d.ts +36 -2
- package/app/pipes/currency.pipe.d.ts +28 -0
- package/fesm2022/carriera-intern-components.mjs +568 -77
- package/fesm2022/carriera-intern-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public/assets/icons/Thumb.svg +3 -0
- package/public/assets/icons/cai-edit.svg +3 -3
- 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-illustration-drop-zone-video.svg +41 -0
- package/public/assets/icons/cai-load.svg +5 -0
- package/public/assets/icons/cai-people.svg +3 -0
- package/public/assets/icons/cai-status-warning-lite.svg +3 -0
- package/public/assets/json/icons.json +31 -4
- /package/app/components/input/models/{planner.model.d.ts → dispatch.model.d.ts} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { AppFile } from '../../models/appFile.model';
|
|
3
|
+
import { ImageCroppedEvent, LoadedImage, ImageTransform } from 'ngx-image-cropper';
|
|
4
|
+
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
|
|
5
|
+
import { Driver } from '../avatar/models';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
4
7
|
/**
|
|
5
8
|
* A component that provides a user interface for file uploading via
|
|
@@ -7,6 +10,36 @@ import * as i0 from "@angular/core";
|
|
|
7
10
|
* selected files in a carousel.
|
|
8
11
|
*/
|
|
9
12
|
export declare class DropZoneComponent {
|
|
13
|
+
private sanitizer;
|
|
14
|
+
zoomValue: import("@angular/core").WritableSignal<number>;
|
|
15
|
+
transform: ImageTransform;
|
|
16
|
+
crop: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
imageChangedEvent: Event | null;
|
|
18
|
+
croppedImage: SafeUrl | null;
|
|
19
|
+
showCropper: import("@angular/core").WritableSignal<boolean>;
|
|
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>;
|
|
29
|
+
constructor(sanitizer: DomSanitizer);
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
updateRangeBackground(input: HTMLInputElement): void;
|
|
32
|
+
cropDimensions(): void;
|
|
33
|
+
ratioHelper(): number;
|
|
34
|
+
onZoomChange(event: Event): void;
|
|
35
|
+
fileChangeEvent(event: Event): void;
|
|
36
|
+
imageCropped(event: ImageCroppedEvent): void;
|
|
37
|
+
imageLoaded(image: LoadedImage): void;
|
|
38
|
+
cropperReady(): void;
|
|
39
|
+
loadImageFailed(): void;
|
|
40
|
+
smallView: import("@angular/core").WritableSignal<boolean>;
|
|
41
|
+
cancelCrop(): void;
|
|
42
|
+
submitCrop(): void;
|
|
10
43
|
/**
|
|
11
44
|
* Injects the DocumentService for file processing tasks like
|
|
12
45
|
* thumbnail generation and PDF page counting.
|
|
@@ -39,6 +72,12 @@ export declare class DropZoneComponent {
|
|
|
39
72
|
* that have been selected or dropped by the user.
|
|
40
73
|
*/
|
|
41
74
|
docs: import("@angular/core").WritableSignal<AppFile[]>;
|
|
75
|
+
/**
|
|
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
|
+
*/
|
|
80
|
+
variant: import("@angular/core").InputSignal<string>;
|
|
42
81
|
/**
|
|
43
82
|
* A signal that acts as a boolean flag. It is set to `true` when the user
|
|
44
83
|
* attempts to upload a file with an unsupported extension.
|
|
@@ -120,5 +159,5 @@ export declare class DropZoneComponent {
|
|
|
120
159
|
tag: string;
|
|
121
160
|
}): void;
|
|
122
161
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropZoneComponent, never>;
|
|
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>;
|
|
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>;
|
|
124
163
|
}
|
|
@@ -3,7 +3,7 @@ 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, DropdownOption } from './models/input.model';
|
|
6
|
+
import { Broker, CaiInputConfig, DropdownOption, LabelColor, LabelOption } from './models/input.model';
|
|
7
7
|
import { Dispatch, DispatchBoard } from './models';
|
|
8
8
|
import { MaskDirective } from './directives/mask.directive';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
@@ -31,17 +31,23 @@ 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'`, `'broker'` or `'label'` variants.
|
|
35
|
+
- `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]`.
|
|
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.
|
|
41
|
+
- `list`: If `true`, the input is associated with a list.
|
|
40
42
|
- `mask`: A pattern string for input masking (e.g., `'(000) 000-0000'`).
|
|
41
43
|
- `min`: Minimum value for number inputs.
|
|
42
44
|
- `max`: Maximum value for number inputs or maximum length for text inputs.
|
|
43
45
|
- `withButtons`: If `true`, adds increment/decrement buttons for number inputs.
|
|
44
46
|
- `autocomplete`: The HTML `autocomplete` attribute.
|
|
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
|
+
|
|
45
51
|
*/
|
|
46
52
|
config: import("@angular/core").InputSignal<CaiInputConfig>;
|
|
47
53
|
/**
|
|
@@ -70,11 +76,9 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
70
76
|
* A computed signal that dynamically calculates the step value for number inputs.
|
|
71
77
|
* The step value changes based on the magnitude of the current `value()`.
|
|
72
78
|
* This allows for more intuitive incrementing and decrementing (e.g., smaller
|
|
73
|
-
* steps for smaller numbers, larger steps for larger numbers).
|
|
74
|
-
* value from the `getStepValue` method and automatically updates when the
|
|
75
|
-
* input's `value` signal changes.
|
|
79
|
+
* steps for smaller numbers, larger steps for larger numbers).
|
|
76
80
|
*/
|
|
77
|
-
step: import("@angular/core").Signal<
|
|
81
|
+
step: import("@angular/core").Signal<1000 | 5000 | 10000 | 20000>;
|
|
78
82
|
inputRef: ElementRef<HTMLInputElement>;
|
|
79
83
|
PasswordDirective: PasswordDirective;
|
|
80
84
|
NumberFormatDirective: NumberFormatDirective;
|
|
@@ -122,17 +126,6 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
122
126
|
* @param event - The MouseEvent that triggered the decrement.
|
|
123
127
|
*/
|
|
124
128
|
decrement(event: MouseEvent): void;
|
|
125
|
-
/**
|
|
126
|
-
* Calculates the step value for number inputs based on the current value.
|
|
127
|
-
* The step dynamically adjusts:
|
|
128
|
-
* - 1000 if value < 20000
|
|
129
|
-
* - 5000 if value < 50000
|
|
130
|
-
* - 10000 if value < 100000
|
|
131
|
-
* - 20000 otherwise
|
|
132
|
-
* Uses `min()` as a fallback if the current value is not a valid number.
|
|
133
|
-
* @returns The calculated step value.
|
|
134
|
-
*/
|
|
135
|
-
getStepValue(): number;
|
|
136
129
|
/**
|
|
137
130
|
* Toggles the visibility of the password input.
|
|
138
131
|
* Toggles the `visible` state and updates the input's displayed value.
|
|
@@ -202,17 +195,19 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
202
195
|
* Notifies Angular Forms of the change and updates the view.
|
|
203
196
|
*/
|
|
204
197
|
reset(): void;
|
|
198
|
+
dropdownOptionsRef: any;
|
|
199
|
+
dispatchesRef: any;
|
|
200
|
+
labelPickerRef: any;
|
|
201
|
+
brokerRef: any;
|
|
202
|
+
getDropdownRef(): any;
|
|
205
203
|
/**
|
|
206
|
-
*
|
|
207
|
-
* This is an input signal, meaning its value can be set from a parent component.
|
|
208
|
-
* @type {Signal<string[]>}
|
|
204
|
+
* Input property to hold the dropdown options.
|
|
209
205
|
*/
|
|
210
|
-
|
|
206
|
+
options: import("@angular/core").InputSignal<DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[]>;
|
|
211
207
|
/**
|
|
212
208
|
* A signal that holds the locally added options.
|
|
213
|
-
* @type {Signal<DropdownOption[]>}
|
|
214
209
|
*/
|
|
215
|
-
localOptions: import("@angular/core").WritableSignal<DropdownOption[]>;
|
|
210
|
+
localOptions: import("@angular/core").WritableSignal<DropdownOption[] | LabelOption[]>;
|
|
216
211
|
/**
|
|
217
212
|
* A signal that holds the currently selected option from the dropdown.
|
|
218
213
|
* @type {Signal<DropdownOption | null>}
|
|
@@ -227,29 +222,36 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
227
222
|
*
|
|
228
223
|
* @type {Signal<string[]>}
|
|
229
224
|
*/
|
|
230
|
-
|
|
225
|
+
filteredOptions: import("@angular/core").Signal<DropdownOption[]>;
|
|
226
|
+
hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T;
|
|
231
227
|
/**
|
|
232
228
|
* Handles when an option is selected from the dropdown.
|
|
233
229
|
* @param option - The selected option.
|
|
234
230
|
* @param event - The MouseEvent that initiated the selection action.
|
|
235
231
|
*/
|
|
236
|
-
handleOption(option: DropdownOption, event
|
|
232
|
+
handleOption(option: DropdownOption | LabelOption | Dispatch | Broker, event?: MouseEvent): void;
|
|
237
233
|
/**
|
|
238
234
|
* An output signal that emits the value of the added option.
|
|
239
235
|
* @type {Output<string>}
|
|
240
236
|
*/
|
|
241
|
-
|
|
237
|
+
onOptionAdded: import("@angular/core").OutputEmitterRef<DropdownOption>;
|
|
238
|
+
onLabelAdded: import("@angular/core").OutputEmitterRef<LabelOption>;
|
|
242
239
|
/**
|
|
243
240
|
* Adds a new option to the dropdown.
|
|
244
241
|
* @param option - The option to add.
|
|
245
242
|
*/
|
|
246
243
|
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>;
|
|
247
249
|
/**
|
|
248
250
|
* Handles when the user clicks on the "ADD NEW" button in the dropdown.
|
|
249
251
|
* It sets the `isAdding` signal to `true`, closes the dropdown, and focuses the input.
|
|
250
252
|
* @param event - The MouseEvent that initiated the action.
|
|
251
253
|
*/
|
|
252
|
-
handleAddOption(event
|
|
254
|
+
handleAddOption(event?: MouseEvent): void;
|
|
253
255
|
/**
|
|
254
256
|
* A signal that indicates whether a new option is being added.
|
|
255
257
|
* @type {Signal<boolean>}
|
|
@@ -260,13 +262,23 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
260
262
|
* @type {Signal<boolean>}
|
|
261
263
|
*/
|
|
262
264
|
hasText: import("@angular/core").Signal<boolean>;
|
|
263
|
-
dispatches: import("@angular/core").InputSignal<DispatchBoard[] | undefined>;
|
|
264
265
|
dispatchCount: import("@angular/core").Signal<number>;
|
|
265
266
|
filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
|
|
266
|
-
handleDispatchOption(option: Dispatch, event: MouseEvent): void;
|
|
267
267
|
selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
|
|
268
268
|
foldedBoards: import("@angular/core").WritableSignal<number[]>;
|
|
269
269
|
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
|
+
handleSelectColor(color: LabelColor, event?: MouseEvent): void;
|
|
276
|
+
filteredBrokers: import("@angular/core").Signal<Broker[]>;
|
|
277
|
+
selectedBroker: import("@angular/core").WritableSignal<Broker | null>;
|
|
278
|
+
getBrokerProgress(broker: Broker, disable?: boolean): {
|
|
279
|
+
activePercentageOfPaid: number;
|
|
280
|
+
status: string | null;
|
|
281
|
+
};
|
|
270
282
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; self: true; }]>;
|
|
271
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cai-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": 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>;
|
|
272
284
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './input.model';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './dispatch.model';
|
|
@@ -7,10 +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' | 'label' | 'broker';
|
|
11
11
|
search?: boolean;
|
|
12
12
|
add?: boolean;
|
|
13
|
-
dispatch?: boolean;
|
|
14
13
|
placeholderBehavior?: 'dynamic' | 'fade' | 'static';
|
|
15
14
|
label?: string;
|
|
16
15
|
mask?: string;
|
|
@@ -18,8 +17,43 @@ export interface CaiInputConfig {
|
|
|
18
17
|
max?: number;
|
|
19
18
|
withButtons?: boolean;
|
|
20
19
|
autocomplete?: string;
|
|
20
|
+
list?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
passwordRequirements?: boolean;
|
|
23
|
+
optionValue?: string;
|
|
21
24
|
}
|
|
22
25
|
export type DropdownOption = {
|
|
23
26
|
id: string;
|
|
24
27
|
label: string;
|
|
25
28
|
};
|
|
29
|
+
export type LabelOption = {
|
|
30
|
+
id?: number;
|
|
31
|
+
name?: string | null;
|
|
32
|
+
colorId?: number;
|
|
33
|
+
color?: string | null;
|
|
34
|
+
code?: string | null;
|
|
35
|
+
hoverCode?: string | null;
|
|
36
|
+
count?: number;
|
|
37
|
+
createdAt?: string;
|
|
38
|
+
updatedAt?: string;
|
|
39
|
+
};
|
|
40
|
+
export type LabelColor = {
|
|
41
|
+
id?: number;
|
|
42
|
+
name?: string | null;
|
|
43
|
+
code?: string | null;
|
|
44
|
+
hoverCode?: string | null;
|
|
45
|
+
count?: number;
|
|
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
|
+
};
|
|
@@ -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
|
+
}
|