carriera-intern-components 0.0.1

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/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # CarrieraInternComponents
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+
9
+ ```bash
10
+ ng generate component component-name
11
+ ```
12
+
13
+ For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
+
15
+ ```bash
16
+ ng generate --help
17
+ ```
18
+
19
+ ## Building
20
+
21
+ To build the library, run:
22
+
23
+ ```bash
24
+ ng build carriera-intern-components
25
+ ```
26
+
27
+ This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
+
29
+ ### Publishing the Library
30
+
31
+ Once the project is built, you can publish your library by following these steps:
32
+
33
+ 1. Navigate to the `dist` directory:
34
+ ```bash
35
+ cd dist/carriera-intern-components
36
+ ```
37
+
38
+ 2. Run the `npm publish` command to publish your library to the npm registry:
39
+ ```bash
40
+ npm publish
41
+ ```
42
+
43
+ ## Running unit tests
44
+
45
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46
+
47
+ ```bash
48
+ ng test
49
+ ```
50
+
51
+ ## Running end-to-end tests
52
+
53
+ For end-to-end (e2e) testing, run:
54
+
55
+ ```bash
56
+ ng e2e
57
+ ```
58
+
59
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
60
+
61
+ ## Additional Resources
62
+
63
+ For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -0,0 +1,41 @@
1
+ import { AppFile } from '../../models/appFile.model';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * This component displays a preview of a document, including its name, size,
5
+ * and provides actions to delete, download, and tag the document.
6
+ */
7
+ export declare class DocumentPreviewComponent {
8
+ showDeleteModal: import("@angular/core").WritableSignal<boolean>;
9
+ /**
10
+ * The application file to be displayed in the preview. This is a required input.
11
+ * @type {InputSignal<AppFile>}
12
+ */
13
+ file: import("@angular/core").InputSignal<AppFile>;
14
+ /**
15
+ * An output event that emits the file name when the delete action is triggered.
16
+ * @type {OutputEmitterRef<string>}
17
+ */
18
+ onDelete: import("@angular/core").OutputEmitterRef<string>;
19
+ /**
20
+ * An output event that emits the file name when the download action is triggered.
21
+ * @type {OutputEmitterRef<string>}
22
+ */
23
+ onDownload: import("@angular/core").OutputEmitterRef<string>;
24
+ /**
25
+ * Handles the delete action. Emits the `fileName` of the current `file` via the `onDelete` output.
26
+ */
27
+ handleDelete(): void;
28
+ /**
29
+ * Handles the download action. Emits the `fileName` of the current `file` via the `onDownload` output.
30
+ */
31
+ handleDownload(): void;
32
+ /**
33
+ * Handles the tag action. Currently, it logs a message to the console.
34
+ * A "TODO" indicates that further logic for tagging needs to be implemented here.
35
+ */
36
+ handleTag(): void;
37
+ cancelDelete(): void;
38
+ confirmDelete(): void;
39
+ 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>;
41
+ }
@@ -0,0 +1,120 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { AppFile } from '../../models/appFile.model';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * A component that provides a user interface for file uploading via
6
+ * drag-and-drop or a file input dialog. It displays previews of the
7
+ * selected files in a carousel.
8
+ */
9
+ export declare class DropZoneComponent {
10
+ /**
11
+ * Injects the DocumentService for file processing tasks like
12
+ * thumbnail generation and PDF page counting.
13
+ * @private
14
+ */
15
+ private documentService;
16
+ /**
17
+ * An array of file extensions that should be excluded from the supported list.
18
+ * @defaultValue `[]` (an empty array)
19
+ * @type {FileExtension[]}
20
+ */
21
+ excludedFileTypes: import("@angular/core").InputSignal<("mp4" | "mov" | "avi" | "pdf" | "jpg" | "jpeg" | "png" | "gif")[]>;
22
+ /**
23
+ * The base array of all file extensions that are generally allowed.
24
+ * Supported file types will be derived from this list, after excluding
25
+ * any types specified in `excludedFileTypes`.
26
+ *
27
+ * @defaultValue `['avi', 'mov', 'mp4', 'pdf', 'gif', 'png', 'jpg', 'jpeg']`
28
+ * @type {FileExtension[]}
29
+ */
30
+ fileTypes: import("@angular/core").InputSignal<("mp4" | "mov" | "avi" | "pdf" | "jpg" | "jpeg" | "png" | "gif")[]>;
31
+ /**
32
+ * A computed signal that derives the list of currently supported file extensions.
33
+ * It filters the base `fileTypes` array, removing any extensions present
34
+ * in the `excludedFileTypes` input.
35
+ */
36
+ supportedFileTypes: import("@angular/core").Signal<("mp4" | "mov" | "avi" | "pdf" | "jpg" | "jpeg" | "png" | "gif")[]>;
37
+ /**
38
+ * A signal that holds an array of `AppFile` objects representing the files
39
+ * that have been selected or dropped by the user.
40
+ */
41
+ docs: import("@angular/core").WritableSignal<AppFile[]>;
42
+ /**
43
+ * A signal that acts as a boolean flag. It is set to `true` when the user
44
+ * attempts to upload a file with an unsupported extension.
45
+ */
46
+ unsupported: import("@angular/core").WritableSignal<boolean>;
47
+ /**
48
+ * Handles the 'change' event from the hidden file input. It extracts the
49
+ * selected files and passes them to the `processFiles` method.
50
+ * @param event The `Event` object from the file input element.
51
+ */
52
+ onInput(event: Event): void;
53
+ /**
54
+ * Handles the 'drop' event on the component. It prevents the browser's
55
+ * default file handling, extracts the dropped files, and passes them to
56
+ * the `processFiles` method.
57
+ * @param event The `DragEvent` object containing the dropped files.
58
+ */
59
+ onDrop(event: DragEvent): void;
60
+ /**
61
+ * Asynchronously processes a list of files. For each file, it validates
62
+ * the extension against `supportedFileTypes`. If valid, it generates a
63
+ * thumbnail, counts pages for PDFs, creates an `AppFile` object, and adds
64
+ * it to the `docs` signal. If any file is unsupported, the `unsupported`
65
+ * flag is set.
66
+ * @param files The `FileList` object to be processed.
67
+ */
68
+ processFiles(files: FileList): Promise<void>;
69
+ /**
70
+ * Handles the download action for a specific file.
71
+ * Note: This is a placeholder and currently only logs the file name.
72
+ * @param fileName The name of the file to be downloaded.
73
+ */
74
+ handleDownload(fileName: string): void;
75
+ /**
76
+ * A ViewChild reference to the native `<input type='file'>` element.
77
+ * Used to programmatically trigger the file selection dialog.
78
+ */
79
+ inputRef: ElementRef<HTMLInputElement>;
80
+ /**
81
+ * Resets the component's state after an unsupported file type error
82
+ * by setting the `unsupported` signal to `false`.
83
+ */
84
+ cancel(): void;
85
+ /**
86
+ * Programmatically triggers a click on the hidden file input element,
87
+ * which opens the system's file selection dialog.
88
+ */
89
+ handleClickToAdd(): void;
90
+ /**
91
+ * Deletes a file from the preview list. It filters the `docs` array to
92
+ * remove the specified file and adjusts the carousel position.
93
+ * @param fileName The name of the file to be deleted.
94
+ */
95
+ handleDelete(fileName: string): void;
96
+ /**
97
+ * A signal that stores the current index for the file preview carousel.
98
+ * This determines which part of the carousel is visible.
99
+ */
100
+ carouselIndex: import("@angular/core").WritableSignal<number>;
101
+ /**
102
+ * A computed signal that calculates the CSS `translateX` value for the
103
+ * carousel container. This creates the sliding effect based on the
104
+ * `carouselIndex`.
105
+ */
106
+ carouselTransform: import("@angular/core").Signal<string>;
107
+ /**
108
+ * Navigates the carousel one step to the left by decrementing the
109
+ * `carouselIndex`. The index will not go below 0.
110
+ */
111
+ carouselLeft(): void;
112
+ /**
113
+ * Navigates the carousel one step to the right by incrementing the
114
+ * `carouselIndex`. The index will not exceed the maximum possible value
115
+ * based on the number of documents.
116
+ */
117
+ carouselRight(): void;
118
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropZoneComponent, never>;
119
+ 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
+ }
@@ -0,0 +1,222 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
+ import { PasswordDirective } from '../../directives/password.directive';
4
+ import { NumberFormatDirective } from '../../directives/number-format.directive';
5
+ import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
6
+ import * as i0 from "@angular/core";
7
+ export interface InputConfig {
8
+ type?: 'text' | 'password' | 'number';
9
+ name?: string;
10
+ required?: boolean;
11
+ alignment?: 'left' | 'right';
12
+ inverse?: boolean;
13
+ reveal?: number;
14
+ icon?: string | null;
15
+ dropdown?: boolean;
16
+ search?: boolean;
17
+ }
18
+ /**
19
+ * A reusable input component that integrates with Angular Forms and supports
20
+ * various input types, including text, password (with reveal functionality),
21
+ * and numbers (with formatting and step controls). It also provides error
22
+ * message display and icon support.
23
+ */
24
+ export declare class InputComponent implements ControlValueAccessor {
25
+ ngControl: NgControl | null;
26
+ /**
27
+ * Defines the unique identifier for the input element.
28
+ * This ID is crucial for accessibility, linking the `<label>` to the
29
+ * native `<input>` via the `for` attribute.
30
+ * It is provided by the parent component as an Angular `input()` signal.
31
+ */
32
+ id: import("@angular/core").InputSignal<string>;
33
+ /**
34
+ * Configuration object for the input's behavior and appearance.
35
+ * This `input()` signal accepts an `InputConfig` object to customize
36
+ * properties like the input type (`text`, `password`, `number`),
37
+ * placeholder/label text (`name`), validation (`required`), and other
38
+ * special behaviors.
39
+ */
40
+ config: import("@angular/core").InputSignal<InputConfig>;
41
+ /**
42
+ * Internal signal to track the disabled state of the input.
43
+ * This state is managed by the `ControlValueAccessor`'s `setDisabledState`
44
+ * method, which is called by Angular's Forms API when the associated
45
+ * form control's status changes. Defaults to `false`.
46
+ */
47
+ disabled: import("@angular/core").WritableSignal<boolean>;
48
+ /**
49
+ * Holds the internal, unmasked, and unformatted value of the input.
50
+ * This signal represents the component's "source of truth" for its value.
51
+ * It is updated by user input (via `onInput` or `onRealValueChange`) and
52
+ * programmatically by the `ControlValueAccessor`'s `writeValue` method.
53
+ * The value from this signal is what is propagated back to the parent `FormControl`.
54
+ */
55
+ value: import("@angular/core").WritableSignal<string>;
56
+ /**
57
+ * Tracks the visibility state for inputs of `type='password'`.
58
+ * When `true`, the password's characters are shown; when `false`, they are
59
+ * masked. This is toggled by the `toggleVisibility` method.
60
+ * Defaults to `false`.
61
+ */
62
+ visible: import("@angular/core").WritableSignal<boolean>;
63
+ /**
64
+ * A computed signal that dynamically calculates the step value for number inputs.
65
+ * The step value changes based on the magnitude of the current `value()`.
66
+ * This allows for more intuitive incrementing and decrementing (e.g., smaller
67
+ * steps for smaller numbers, larger steps for larger numbers). It derives its
68
+ * value from the `getStepValue` method and automatically updates when the
69
+ * input's `value` signal changes.
70
+ */
71
+ step: import("@angular/core").Signal<number>;
72
+ inputRef: ElementRef<HTMLInputElement>;
73
+ PasswordDirective: PasswordDirective;
74
+ NumberFormatDirective: NumberFormatDirective;
75
+ dropdown: NgbPopover;
76
+ /**
77
+ * Constructor for the InputComponent.
78
+ * It injects NgControl to integrate with Angular's forms API.
79
+ * If NgControl is present, it sets this component as the value accessor
80
+ * for the form control.
81
+ * @param ngControl - Optional NgControl instance for form integration.
82
+ */
83
+ constructor(ngControl: NgControl | null);
84
+ /**
85
+ * Handles the native 'input' event from the HTMLInputElement.
86
+ * Updates the component's internal value and notifies Angular forms
87
+ * about the change.
88
+ * For 'password' type (when not visible) and 'number' type, it relies
89
+ * on associated directives (PasswordDirective, NumberFormatDirective)
90
+ * to get the real value, as the displayed value might be
91
+ * masked or formatted.
92
+ * @param event - The input event object.
93
+ */
94
+ onInput(event: Event): void;
95
+ /**
96
+ * Listens for a custom 'realValueChange' event.
97
+ * This event is expected to be emitted by child directives (PasswordDirective, NumberFormatDirective)
98
+ * when their internal "real" value changes, allowing the parent input component
99
+ * to stay in sync.
100
+ * @param event - A CustomEvent containing the new real value in `event.detail`.
101
+ */
102
+ onRealValueChange(event: CustomEvent): void;
103
+ /**
104
+ * Increments the value of a number input by the current step.
105
+ * If the current value is not a valid number, it starts from the `min` input.
106
+ * After updating, it notifies forms, updates the view, and focuses the input.
107
+ * @param event - The MouseEvent that triggered the increment.
108
+ */
109
+ increment(event: MouseEvent): void;
110
+ /**
111
+ * Decrements the value of a number input by the current step.
112
+ * If the current value is not a valid number, it starts from the `min` input.
113
+ * The value will not go below the minimum value.
114
+ * After updating, it notifies forms, updates the view, and focuses the input.
115
+ * @param event - The MouseEvent that triggered the decrement.
116
+ */
117
+ decrement(event: MouseEvent): void;
118
+ /**
119
+ * Calculates the step value for number inputs based on the current value.
120
+ * The step dynamically adjusts:
121
+ * - 1000 if value < 20000
122
+ * - 5000 if value < 50000
123
+ * - 10000 if value < 100000
124
+ * - 20000 otherwise
125
+ * Uses `min()` as a fallback if the current value is not a valid number.
126
+ * @returns The calculated step value.
127
+ */
128
+ getStepValue(): number;
129
+ /**
130
+ * Toggles the visibility of the password input.
131
+ * Toggles the `visible` state and updates the input's displayed value.
132
+ * @param event - The MouseEvent that triggered the toggle.
133
+ */
134
+ toggleVisibility(event: MouseEvent): void;
135
+ /**
136
+ * Sets the value in the actual HTML input element or updates the
137
+ * "real" value in the associated directive.
138
+ * - For 'password' type: If not visible, it updates the PasswordDirective's real value.
139
+ * If visible, it falls through to the default behavior.
140
+ * - For 'number' type: It updates the NumberFormatDirective's real value.
141
+ * - For other types (or visible password): It sets the `value` property of the native input element.
142
+ */
143
+ setValue(): void;
144
+ /**
145
+ * Focuses the input element.
146
+ * Prevents the default action of the mouse event to avoid unintended behaviors
147
+ * like double focus or focus loss.
148
+ * @param event - The MouseEvent that initiated the focus action.
149
+ */
150
+ focus(event: MouseEvent): void;
151
+ onChange: (_: any) => void;
152
+ onTouched: () => void;
153
+ /**
154
+ * Writes a new value to the element. (ControlValueAccessor)
155
+ * This method is called by the Forms API to update the view when
156
+ * the form control's value changes programmatically.
157
+ * Uses `setTimeout` to ensure that `setValue` is called after the
158
+ * view (and potentially child directives) has been initialized,
159
+ * especially relevant if `writeValue` is called early in the component lifecycle.
160
+ * @param value - The new value to write.
161
+ */
162
+ writeValue(value: string): void;
163
+ /**
164
+ * Registers a callback function that should be called when the
165
+ * control's value changes in the UI. (ControlValueAccessor)
166
+ * @param fn - The callback function to register.
167
+ */
168
+ registerOnChange(fn: any): void;
169
+ /**
170
+ * Registers a callback function that should be called when the
171
+ * control receives a blur event. (ControlValueAccessor)
172
+ * @param fn - The callback function to register.
173
+ */
174
+ registerOnTouched(fn: any): void;
175
+ /**
176
+ * This function is called by the Forms API when the control's disabled
177
+ * state changes. (ControlValueAccessor)
178
+ * @param isDisabled - True if the control should be disabled, false otherwise.
179
+ */
180
+ setDisabledState(isDisabled: boolean): void;
181
+ /**
182
+ * Called when the input element loses focus (blur event).
183
+ * Triggers the `onTouched` callback to notify Angular Forms that the
184
+ * input has been interacted with.
185
+ */
186
+ onBlur(): void;
187
+ /**
188
+ * Resets the input field's value to an empty string.
189
+ * Notifies Angular Forms of the change and updates the view.
190
+ */
191
+ reset(): void;
192
+ /**
193
+ * Represents the base list of options available for the dropdown.
194
+ * This is an input signal, meaning its value can be set from a parent component.
195
+ * @type {Signal<string[]>}
196
+ */
197
+ dropdownOptions: import("@angular/core").InputSignal<string[]>;
198
+ /**
199
+ * A computed signal that provides the current list of options to display in the dropdown.
200
+ *
201
+ * If `search` is `false`, it returns the full `dropdownOptions`.
202
+ * If `search` is `true`, it filters `dropdownOptions` based on the `value` signal,
203
+ * performing a case-insensitive partial text match.
204
+ *
205
+ * @type {Signal<string[]>}
206
+ */
207
+ options: import("@angular/core").Signal<string[]>;
208
+ /**
209
+ * Formats an option for the dropdown by highlighting the search value if it exists in the option.
210
+ * @param option - The option to format.
211
+ * @returns The formatted option.
212
+ */
213
+ formatOption(option: string): string;
214
+ /**
215
+ * Handles when an option is selected from the dropdown.
216
+ * @param option - The selected option.
217
+ * @param event - The MouseEvent that initiated the selection action.
218
+ */
219
+ handleOption(option: string, event: MouseEvent): void;
220
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; self: true; }]>;
221
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "app-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>;
222
+ }
@@ -0,0 +1,105 @@
1
+ import { ElementRef, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NumberFormatDirective implements OnInit {
4
+ private el;
5
+ /**
6
+ * Input property to enable or disable the number formatting.
7
+ * Defaults to true, meaning formatting is active by default.
8
+ */
9
+ appNumberFormat: import("@angular/core").InputSignal<boolean>;
10
+ /**
11
+ * Stores the unformatted, "real" numeric value of the input.
12
+ * This is the value that should be used for calculations or form submissions,
13
+ * as opposed to the formatted display value.
14
+ */
15
+ private realValue;
16
+ constructor(el: ElementRef<HTMLInputElement>);
17
+ /**
18
+ * Lifecycle hook that is called after Angular has initialized all data-bound
19
+ * properties of a directive.
20
+ * If number formatting is enabled, it sets up the initial formatting.
21
+ */
22
+ ngOnInit(): void;
23
+ /**
24
+ * Initializes the number formatting on the input element.
25
+ * It extracts the initial numeric value from the input's current value
26
+ * and then updates the display with the formatted version.
27
+ */
28
+ private setupNumberFormatting;
29
+ /**
30
+ * HostListener for the 'input' event on the host element.
31
+ * This triggers whenever the user types or pastes content into the input.
32
+ * It extracts the numeric value from the current input, updates the
33
+ * display with the formatted number, moves the cursor to the end,
34
+ * and dispatches a 'realValueChange' event with the unformatted numeric value.
35
+ * @param event - The InputEvent object.
36
+ */
37
+ onInput(event: InputEvent): void;
38
+ /**
39
+ * HostListener for the 'cut' event.
40
+ * Prevents the default cut behavior to manually handle the value change.
41
+ * It reconstructs the value after the cut, extracts the numeric part,
42
+ * updates the display, sets the cursor, and dispatches the real value.
43
+ * @param event - The ClipboardEvent object.
44
+ */
45
+ onCut(event: ClipboardEvent): void;
46
+ /**
47
+ * HostListener for the 'copy' event.
48
+ * Prevents the default copy behavior if there's a selection to ensure
49
+ * that the copied text is the unformatted numeric value of the selection,
50
+ * rather than the potentially formatted display text.
51
+ * @param event - The ClipboardEvent object.
52
+ */
53
+ onCopy(event: ClipboardEvent): void;
54
+ /**
55
+ * HostListener for the 'keydown' event.
56
+ * Filters key presses to allow only digits, a single decimal point,
57
+ * and control keys (Backspace, Arrows, Tab, etc.).
58
+ * This helps maintain a valid numeric input format before the 'input' event fires.
59
+ * @param event - The KeyboardEvent object.
60
+ */
61
+ onKeydown(event: KeyboardEvent): void;
62
+ /**
63
+ * Extracts a clean numeric string from a given value.
64
+ * It removes any non-digit characters except for a single decimal point.
65
+ * It also ensures that there's only one decimal point and limits
66
+ * the decimal part to two digits.
67
+ * @param value - The string value to clean.
68
+ * @returns A string representing the extracted numeric value.
69
+ */
70
+ private extractNumericValue;
71
+ /**
72
+ * Updates the input element's display value with the formatted version
73
+ * of the current `realValue`.
74
+ * It uses the `NumberFormatPipe` for formatting.
75
+ */
76
+ private updateDisplayValue;
77
+ /**
78
+ * Sets the cursor position to the end of the input field.
79
+ * This is typically called after the input value is reformatted to prevent
80
+ * the cursor from jumping to an unexpected position.
81
+ * Uses `setTimeout` to ensure the operation occurs after Angular's view update.
82
+ */
83
+ private setCursorToEnd;
84
+ /**
85
+ * Dispatches a custom event named 'realValueChange' from the host element.
86
+ * The event's `detail` property contains the unformatted `realValue`.
87
+ * This allows parent components or other directives to listen for changes
88
+ * to the underlying numeric value.
89
+ */
90
+ private dispatchRealValueChange;
91
+ /**
92
+ * Public method to get the current unformatted "real" numeric value.
93
+ * @returns The real numeric value as a string.
94
+ */
95
+ getRealValue(): string;
96
+ /**
97
+ * Public method to set the "real" numeric value from outside the directive.
98
+ * It extracts the numeric part from the provided value and updates the
99
+ * input's display with the formatted version.
100
+ * @param value - The new value to set (can be formatted or unformatted).
101
+ */
102
+ setRealValue(value: string): void;
103
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumberFormatDirective, never>;
104
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NumberFormatDirective, "[appNumberFormat]", never, { "appNumberFormat": { "alias": "appNumberFormat"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
105
+ }
@@ -0,0 +1,94 @@
1
+ import { ElementRef, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PasswordDirective implements OnInit {
4
+ private el;
5
+ /**
6
+ * Input property to enable or disable the password masking behavior.
7
+ */
8
+ appPassword: import("@angular/core").InputSignal<boolean>;
9
+ /**
10
+ * Input property to hide or show the password
11
+ */
12
+ visible: import("@angular/core").InputSignal<boolean>;
13
+ /**
14
+ * Input property to specify how many characters from the end of the
15
+ * password should be revealed. Defaults to 0 (fully masked).
16
+ */
17
+ reveal: import("@angular/core").InputSignal<number>;
18
+ /**
19
+ * Stores the actual, unmasked password value,
20
+ * while the input element displays a masked version.
21
+ */
22
+ private realValue;
23
+ constructor(el: ElementRef<HTMLInputElement>);
24
+ /**
25
+ * Lifecycle hook called after Angular initializes the directive's data-bound properties.
26
+ * If password masking is enabled, it sets up the initial masking.
27
+ */
28
+ ngOnInit(): void;
29
+ /**
30
+ * Sets up the initial state for password masking.
31
+ * It reads the initial value from the input (if any) as the `realValue`
32
+ * and then updates the input's display to show the masked version.
33
+ */
34
+ private setupPasswordMasking;
35
+ /**
36
+ * HostListener for the 'input' event on the host element.
37
+ * This is the core logic for synchronizing `realValue` with user input
38
+ * on the masked field. It infers changes to `realValue`
39
+ * based on `event.data`, cursor position, and the difference in length
40
+ * between the input's current display value and the previous `realValue`.
41
+ * @param event - The InputEvent object.
42
+ */
43
+ onInput(event: InputEvent): void;
44
+ /**
45
+ * HostListener for the 'cut' event.
46
+ * Prevents default cut behavior to operate on `realValue`.
47
+ * It copies the corresponding part of `realValue` to the clipboard
48
+ * and updates `realValue` and the display.
49
+ * @param event - The ClipboardEvent object.
50
+ */
51
+ onCut(event: ClipboardEvent): void;
52
+ /**
53
+ * HostListener for the 'copy' event.
54
+ * Prevents default copy behavior to ensure the unmasked `realValue` segment is copied.
55
+ * @param event - The ClipboardEvent object.
56
+ */
57
+ onCopy(event: ClipboardEvent): void;
58
+ /**
59
+ * Updates the input element's display value with a masked version of `realValue`.
60
+ * Uses '•' for masked characters. Respects the `reveal` input to show
61
+ * a specified number of characters from the end of the password.
62
+ * This method is responsible for creating the visual masking.
63
+ */
64
+ private updateDisplayValue;
65
+ /**
66
+ * Sets the cursor position within the input field.
67
+ * This is crucial after `updateDisplayValue` changes the entire input value,
68
+ * to maintain a natural cursor behavior for the user.
69
+ * Uses `setTimeout` to ensure the operation occurs after Angular's view update.
70
+ * @param position - The desired cursor position.
71
+ */
72
+ private setCursorPosition;
73
+ /**
74
+ * Dispatches a custom event named 'realValueChange' from the host element.
75
+ * The event's `detail` property contains the unmasked `realValue`.
76
+ * This allows parent components (like your `InputComponent`) to listen for
77
+ * changes to the actual password.
78
+ */
79
+ private dispatchRealValueChange;
80
+ /**
81
+ * Public method to get the current unmasked "real" password value.
82
+ * @returns The real password value as a string.
83
+ */
84
+ getRealValue(): string;
85
+ /**
86
+ * Public method to set the "real" password value from outside the directive
87
+ * (e.g., when the parent form control's value is changed programmatically).
88
+ * It updates the internal `realValue` and then refreshes the masked display.
89
+ * @param value - The new real password value to set.
90
+ */
91
+ setRealValue(value: string): void;
92
+ static ɵfac: i0.ɵɵFactoryDeclaration<PasswordDirective, never>;
93
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PasswordDirective, "[appPassword]", never, { "appPassword": { "alias": "appPassword"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "reveal": { "alias": "reveal"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
94
+ }
@@ -0,0 +1,12 @@
1
+ declare const supportedFileTypes: readonly ["mp4", "mov", "avi", "pdf", "jpg", "jpeg", "png", "gif"];
2
+ export type FileExtension = (typeof supportedFileTypes)[number];
3
+ export interface AppFile {
4
+ fileName: string;
5
+ baseName: string;
6
+ type: FileExtension;
7
+ size: number;
8
+ imagePreviewUrl?: string;
9
+ pageCount?: number;
10
+ file: File;
11
+ }
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class BytesToHumanReadablePipe implements PipeTransform {
4
+ transform(bytes: number | null | undefined, precision?: number): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<BytesToHumanReadablePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<BytesToHumanReadablePipe, "bytesToHumanReadable", true>;
7
+ }