carriera-intern-components 0.0.8 → 0.0.9
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 +27 -1
- package/app/components/input/input.component.d.ts +21 -6
- package/app/components/input/models/index.d.ts +1 -1
- package/app/components/input/models/input.model.d.ts +21 -0
- package/fesm2022/carriera-intern-components.mjs +225 -17
- 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-illustration-drop-zone-video.svg +41 -0
- package/public/assets/icons/cai-people.svg +3 -0
- package/public/assets/json/icons.json +8 -1
- /package/app/components/input/models/{planner.model.d.ts → dispatch.model.d.ts} +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
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';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
/**
|
|
5
7
|
* A component that provides a user interface for file uploading via
|
|
@@ -7,6 +9,24 @@ import * as i0 from "@angular/core";
|
|
|
7
9
|
* selected files in a carousel.
|
|
8
10
|
*/
|
|
9
11
|
export declare class DropZoneComponent {
|
|
12
|
+
private sanitizer;
|
|
13
|
+
zoomValue: import("@angular/core").WritableSignal<number>;
|
|
14
|
+
transform: ImageTransform;
|
|
15
|
+
crop: import("@angular/core").InputSignal<boolean>;
|
|
16
|
+
imageChangedEvent: Event | null;
|
|
17
|
+
croppedImage: SafeUrl | null;
|
|
18
|
+
showCropper: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
+
isCropperReady: import("@angular/core").WritableSignal<boolean>;
|
|
20
|
+
constructor(sanitizer: DomSanitizer);
|
|
21
|
+
updateRangeBackground(input: HTMLInputElement): void;
|
|
22
|
+
onZoomChange(event: Event): void;
|
|
23
|
+
fileChangeEvent(event: Event): void;
|
|
24
|
+
imageCropped(event: ImageCroppedEvent): void;
|
|
25
|
+
imageLoaded(image: LoadedImage): void;
|
|
26
|
+
cropperReady(): void;
|
|
27
|
+
loadImageFailed(): void;
|
|
28
|
+
cancelCrop(): void;
|
|
29
|
+
submitCrop(): void;
|
|
10
30
|
/**
|
|
11
31
|
* Injects the DocumentService for file processing tasks like
|
|
12
32
|
* thumbnail generation and PDF page counting.
|
|
@@ -39,6 +59,12 @@ export declare class DropZoneComponent {
|
|
|
39
59
|
* that have been selected or dropped by the user.
|
|
40
60
|
*/
|
|
41
61
|
docs: import("@angular/core").WritableSignal<AppFile[]>;
|
|
62
|
+
/**
|
|
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
|
+
*/
|
|
67
|
+
variant: import("@angular/core").InputSignal<string>;
|
|
42
68
|
/**
|
|
43
69
|
* A signal that acts as a boolean flag. It is set to `true` when the user
|
|
44
70
|
* attempts to upload a file with an unsupported extension.
|
|
@@ -120,5 +146,5 @@ export declare class DropZoneComponent {
|
|
|
120
146
|
tag: string;
|
|
121
147
|
}): void;
|
|
122
148
|
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>;
|
|
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>;
|
|
124
150
|
}
|
|
@@ -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 { 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";
|
|
@@ -37,11 +37,16 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
37
37
|
- `dispatch`: If `true`, shows the dispatch modal as a dropdown.
|
|
38
38
|
- `placeholderBehavior`: Defines placeholder animation (`'dynamic'` , `'fade'`, `'static'`).
|
|
39
39
|
- `label`: An `aria-label` for accessibility.
|
|
40
|
+
- `labelPicker`: If `true`, the input is associated with a label picker.
|
|
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.
|
|
40
44
|
- `mask`: A pattern string for input masking (e.g., `'(000) 000-0000'`).
|
|
41
45
|
- `min`: Minimum value for number inputs.
|
|
42
46
|
- `max`: Maximum value for number inputs or maximum length for text inputs.
|
|
43
47
|
- `withButtons`: If `true`, adds increment/decrement buttons for number inputs.
|
|
44
48
|
- `autocomplete`: The HTML `autocomplete` attribute.
|
|
49
|
+
- `disabled`: If `true`, the input is disabled (for use without reactive form).
|
|
45
50
|
*/
|
|
46
51
|
config: import("@angular/core").InputSignal<CaiInputConfig>;
|
|
47
52
|
/**
|
|
@@ -233,12 +238,13 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
233
238
|
* @param option - The selected option.
|
|
234
239
|
* @param event - The MouseEvent that initiated the selection action.
|
|
235
240
|
*/
|
|
236
|
-
handleOption(option: DropdownOption, event
|
|
241
|
+
handleOption(option: DropdownOption, event?: MouseEvent): void;
|
|
237
242
|
/**
|
|
238
243
|
* An output signal that emits the value of the added option.
|
|
239
244
|
* @type {Output<string>}
|
|
240
245
|
*/
|
|
241
|
-
|
|
246
|
+
onOptionAdded: import("@angular/core").OutputEmitterRef<DropdownOption>;
|
|
247
|
+
onLabelAdded: import("@angular/core").OutputEmitterRef<LabelOption>;
|
|
242
248
|
/**
|
|
243
249
|
* Adds a new option to the dropdown.
|
|
244
250
|
* @param option - The option to add.
|
|
@@ -249,7 +255,7 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
249
255
|
* It sets the `isAdding` signal to `true`, closes the dropdown, and focuses the input.
|
|
250
256
|
* @param event - The MouseEvent that initiated the action.
|
|
251
257
|
*/
|
|
252
|
-
handleAddOption(event
|
|
258
|
+
handleAddOption(event?: MouseEvent): void;
|
|
253
259
|
/**
|
|
254
260
|
* A signal that indicates whether a new option is being added.
|
|
255
261
|
* @type {Signal<boolean>}
|
|
@@ -263,10 +269,19 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
263
269
|
dispatches: import("@angular/core").InputSignal<DispatchBoard[] | undefined>;
|
|
264
270
|
dispatchCount: import("@angular/core").Signal<number>;
|
|
265
271
|
filteredDispatches: import("@angular/core").Signal<DispatchBoard[]>;
|
|
266
|
-
handleDispatchOption(option: Dispatch, event
|
|
272
|
+
handleDispatchOption(option: Dispatch, event?: MouseEvent): void;
|
|
267
273
|
selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
|
|
268
274
|
foldedBoards: import("@angular/core").WritableSignal<number[]>;
|
|
269
275
|
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
|
+
handleSelectColor(color: LabelColor, event?: MouseEvent): void;
|
|
270
285
|
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; }; "dropdownOptions": { "alias": "dropdownOptions"; "required": false; "isSignal": true; }; "dispatches": { "alias": "dispatches"; "required": false; "isSignal": 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>;
|
|
272
287
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './input.model';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './dispatch.model';
|
|
@@ -11,6 +11,7 @@ export interface CaiInputConfig {
|
|
|
11
11
|
search?: boolean;
|
|
12
12
|
add?: boolean;
|
|
13
13
|
dispatch?: boolean;
|
|
14
|
+
labelPicker?: boolean;
|
|
14
15
|
placeholderBehavior?: 'dynamic' | 'fade' | 'static';
|
|
15
16
|
label?: string;
|
|
16
17
|
mask?: string;
|
|
@@ -18,8 +19,28 @@ export interface CaiInputConfig {
|
|
|
18
19
|
max?: number;
|
|
19
20
|
withButtons?: boolean;
|
|
20
21
|
autocomplete?: string;
|
|
22
|
+
list?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
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
|
+
};
|