carriera-intern-components 0.0.9 → 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.
@@ -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
- * A signal that holds an array of `AppFile` objects representing the files
64
- * that have been selected or dropped by the user.
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
  }
@@ -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, LabelColor, LabelOption } 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,22 +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.
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
52
  config: import("@angular/core").InputSignal<CaiInputConfig>;
52
53
  /**
@@ -75,11 +76,9 @@ export declare class InputComponent implements ControlValueAccessor {
75
76
  * A computed signal that dynamically calculates the step value for number inputs.
76
77
  * The step value changes based on the magnitude of the current `value()`.
77
78
  * 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.
79
+ * steps for smaller numbers, larger steps for larger numbers).
81
80
  */
82
- step: import("@angular/core").Signal<number>;
81
+ step: import("@angular/core").Signal<1000 | 5000 | 10000 | 20000>;
83
82
  inputRef: ElementRef<HTMLInputElement>;
84
83
  PasswordDirective: PasswordDirective;
85
84
  NumberFormatDirective: NumberFormatDirective;
@@ -127,17 +126,6 @@ export declare class InputComponent implements ControlValueAccessor {
127
126
  * @param event - The MouseEvent that triggered the decrement.
128
127
  */
129
128
  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
129
  /**
142
130
  * Toggles the visibility of the password input.
143
131
  * Toggles the `visible` state and updates the input's displayed value.
@@ -207,17 +195,19 @@ export declare class InputComponent implements ControlValueAccessor {
207
195
  * Notifies Angular Forms of the change and updates the view.
208
196
  */
209
197
  reset(): void;
198
+ dropdownOptionsRef: any;
199
+ dispatchesRef: any;
200
+ labelPickerRef: any;
201
+ brokerRef: any;
202
+ getDropdownRef(): any;
210
203
  /**
211
- * Represents the base list of options available for the dropdown.
212
- * This is an input signal, meaning its value can be set from a parent component.
213
- * @type {Signal<string[]>}
204
+ * Input property to hold the dropdown options.
214
205
  */
215
- dropdownOptions: import("@angular/core").InputSignal<DropdownOption[]>;
206
+ options: import("@angular/core").InputSignal<DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[]>;
216
207
  /**
217
208
  * A signal that holds the locally added options.
218
- * @type {Signal<DropdownOption[]>}
219
209
  */
220
- localOptions: import("@angular/core").WritableSignal<DropdownOption[]>;
210
+ localOptions: import("@angular/core").WritableSignal<DropdownOption[] | LabelOption[]>;
221
211
  /**
222
212
  * A signal that holds the currently selected option from the dropdown.
223
213
  * @type {Signal<DropdownOption | null>}
@@ -232,13 +222,14 @@ export declare class InputComponent implements ControlValueAccessor {
232
222
  *
233
223
  * @type {Signal<string[]>}
234
224
  */
235
- options: import("@angular/core").Signal<DropdownOption[]>;
225
+ filteredOptions: import("@angular/core").Signal<DropdownOption[]>;
226
+ hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T;
236
227
  /**
237
228
  * Handles when an option is selected from the dropdown.
238
229
  * @param option - The selected option.
239
230
  * @param event - The MouseEvent that initiated the selection action.
240
231
  */
241
- handleOption(option: DropdownOption, event?: MouseEvent): void;
232
+ handleOption(option: DropdownOption | LabelOption | Dispatch | Broker, event?: MouseEvent): void;
242
233
  /**
243
234
  * An output signal that emits the value of the added option.
244
235
  * @type {Output<string>}
@@ -250,6 +241,11 @@ export declare class InputComponent implements ControlValueAccessor {
250
241
  * @param option - The option to add.
251
242
  */
252
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>;
253
249
  /**
254
250
  * Handles when the user clicks on the "ADD NEW" button in the dropdown.
255
251
  * It sets the `isAdding` signal to `true`, closes the dropdown, and focuses the input.
@@ -266,22 +262,23 @@ export declare class InputComponent implements ControlValueAccessor {
266
262
  * @type {Signal<boolean>}
267
263
  */
268
264
  hasText: import("@angular/core").Signal<boolean>;
269
- dispatches: import("@angular/core").InputSignal<DispatchBoard[] | undefined>;
270
265
  dispatchCount: import("@angular/core").Signal<number>;
271
266
  filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
272
- handleDispatchOption(option: Dispatch, event?: MouseEvent): void;
273
267
  selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
274
268
  foldedBoards: import("@angular/core").WritableSignal<number[]>;
275
269
  fold(boardId: number, event: MouseEvent): void;
276
- labels: import("@angular/core").InputSignal<LabelOption[] | undefined>;
277
270
  labelColors: import("@angular/core").InputSignal<LabelColor[] | undefined>;
278
- localLabels: import("@angular/core").WritableSignal<LabelOption[]>;
279
271
  filteredLabels: import("@angular/core").Signal<LabelOption[]>;
280
272
  selectedLabel: import("@angular/core").WritableSignal<LabelOption | null>;
281
273
  selectedColor: import("@angular/core").WritableSignal<LabelColor>;
282
- handleLabelOption(option: LabelOption, event?: MouseEvent): void;
283
274
  isPickingColor: import("@angular/core").WritableSignal<boolean>;
284
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
+ };
285
282
  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; }; "dropdownOptions": { "alias": "dropdownOptions"; "required": false; "isSignal": true; }; "dispatches": { "alias": "dispatches"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "labelColors": { "alias": "labelColors"; "required": false; "isSignal": true; }; }, { "onOptionAdded": "onOptionAdded"; "onLabelAdded": "onLabelAdded"; }, never, never, true, never>;
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>;
287
284
  }
@@ -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' | 'label' | 'broker';
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,16 @@ 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
+ };
@@ -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
+ }