@arsedizioni/ars-utils 22.6.85 → 22.6.88
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/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
- package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
- package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
- package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
- package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
- package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
- package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
- package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
- package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
- package/types/arsedizioni-ars-utils.d.ts +1 -3
|
@@ -1,287 +1,339 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { DoCheck, ElementRef, OnDestroy } from "@angular/core";
|
|
3
|
+
import { ControlValueAccessor, NgControl } from "@angular/forms";
|
|
4
|
+
import { SignalsUtils } from "@arsedizioni/ars-utils/core.validators";
|
|
5
|
+
import { MatFormFieldControl } from "@angular/material/form-field";
|
|
6
|
+
import { FileInfo } from "@arsedizioni/ars-utils/core";
|
|
7
|
+
import { Subject } from "rxjs";
|
|
8
|
+
import { SelectFile, SelectFileDialogData, SelectPictureFileDialogData } from "@arsedizioni/ars-utils/ui";
|
|
9
|
+
export declare class FileInputComponent implements OnDestroy, DoCheck, MatFormFieldControl<FileInfo>, ControlValueAccessor {
|
|
10
|
+
ngControl: NgControl;
|
|
11
|
+
/** Error text of a field: the message declared in the schema, or the shared fallback. */
|
|
12
|
+
protected readonly getErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
|
|
13
|
+
/** Reference to the hidden native file input element. */
|
|
14
|
+
protected readonly __file: import("@angular/core").Signal<ElementRef<any>>;
|
|
15
|
+
private readonly renderer;
|
|
16
|
+
private readonly uiService;
|
|
17
|
+
static nextId: number;
|
|
18
|
+
readonly stateChanges: Subject<void>;
|
|
19
|
+
private previousNativeValue;
|
|
20
|
+
controlType: string;
|
|
21
|
+
focused: boolean;
|
|
22
|
+
/** Whether the device supports camera capture. */
|
|
23
|
+
protected readonly canCapture: import("@angular/core").WritableSignal<boolean>;
|
|
24
|
+
/** Size in MB of the currently selected file. */
|
|
25
|
+
protected readonly fileSize: import("@angular/core").WritableSignal<number>;
|
|
26
|
+
private readonly _placeholder;
|
|
27
|
+
private _value;
|
|
28
|
+
set value(value: FileInfo);
|
|
29
|
+
/**
|
|
30
|
+
* Updates the internal state. Form propagation is skipped for model->view
|
|
31
|
+
* writes (writeValue) to avoid the CVA echo loop, and performed for
|
|
32
|
+
* user-driven changes (selectFile/clearFile) and the public value setter.
|
|
33
|
+
* @param value - The new file info to store and display.
|
|
34
|
+
* @param propagate - When `true`, notifies the registered onChange callback.
|
|
35
|
+
*/
|
|
36
|
+
private setValue;
|
|
37
|
+
get value(): FileInfo;
|
|
38
|
+
get size(): any;
|
|
39
|
+
/** Backing signal so the internal form schema reacts to `required` changes. */
|
|
40
|
+
private readonly _required;
|
|
41
|
+
get required(): boolean;
|
|
42
|
+
set required(value: boolean);
|
|
43
|
+
/** Backing signal so the internal form schema reacts to `disabled` changes. */
|
|
44
|
+
private readonly _disabled;
|
|
45
|
+
get disabled(): boolean;
|
|
46
|
+
set disabled(value: boolean);
|
|
47
|
+
get placeholder(): string;
|
|
48
|
+
set placeholder(value: string);
|
|
49
|
+
/** The currently displayed file name. Can be bound two-way from outside or updated on file selection. */
|
|
50
|
+
readonly fileName: import("@angular/core").ModelSignal<string>;
|
|
51
|
+
readonly maxSizeMb: import("@angular/core").InputSignal<number>;
|
|
52
|
+
readonly minSizeMb: import("@angular/core").InputSignal<number>;
|
|
53
|
+
readonly isNew: import("@angular/core").InputSignal<boolean>;
|
|
54
|
+
readonly canPreview: import("@angular/core").InputSignal<boolean>;
|
|
55
|
+
readonly appearance: import("@angular/core").InputSignal<"fill" | "outline">;
|
|
56
|
+
readonly accept: import("@angular/core").InputSignal<string>;
|
|
57
|
+
get empty(): boolean;
|
|
58
|
+
/** True when the control has validation errors and has been touched. */
|
|
59
|
+
get errorState(): boolean;
|
|
60
|
+
id: string;
|
|
61
|
+
/** True when the label should float above the field. */
|
|
62
|
+
get shouldLabelFloat(): boolean;
|
|
63
|
+
describedBy: string;
|
|
64
|
+
readonly changed: import("@angular/core").OutputEmitterRef<FileInfo>;
|
|
65
|
+
readonly download: import("@angular/core").OutputEmitterRef<void>;
|
|
66
|
+
readonly preview: import("@angular/core").OutputEmitterRef<void>;
|
|
67
|
+
/** Model backing the internal display form: the (readonly) file-name text. */
|
|
68
|
+
private readonly nameModel;
|
|
69
|
+
/**
|
|
70
|
+
* Internal signal form for the file-name input. It reproduces the previous
|
|
71
|
+
* template-driven validators: `required` follows the `required` input and the
|
|
72
|
+
* size rule mirrors FileSizeValidatorDirective (empty name is left to `required`).
|
|
73
|
+
*/
|
|
74
|
+
protected readonly nameForm: import("@angular/forms/signals").FieldTree<{
|
|
75
|
+
name: string;
|
|
76
|
+
}, string | number, "writable">;
|
|
77
|
+
private propagateChange;
|
|
78
|
+
private propagateTouched;
|
|
79
|
+
constructor(ngControl: NgControl);
|
|
80
|
+
/**
|
|
81
|
+
* Detects camera availability and updates the placeholder accordingly.
|
|
82
|
+
*/
|
|
83
|
+
private setupDevices;
|
|
84
|
+
ngOnDestroy(): void;
|
|
85
|
+
ngDoCheck(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Writes a new value to the component (called by the form layer).
|
|
88
|
+
* @param value - The new file info to display.
|
|
89
|
+
*/
|
|
90
|
+
writeValue(value: any): void;
|
|
91
|
+
/**
|
|
92
|
+
* Registers the on-change callback (called by the form layer).
|
|
93
|
+
* @param fn - Callback to invoke whenever the value changes.
|
|
94
|
+
*/
|
|
95
|
+
registerOnChange(fn: any): void;
|
|
96
|
+
/**
|
|
97
|
+
* Registers the on-touched callback (called by the form layer).
|
|
98
|
+
* @param fn - Callback to invoke when the control is touched.
|
|
99
|
+
*/
|
|
100
|
+
registerOnTouched(fn: any): void;
|
|
101
|
+
/**
|
|
102
|
+
* Sets the ARIA describedby attribute from the given element IDs.
|
|
103
|
+
* @param ids - Array of element IDs that describe this control.
|
|
104
|
+
*/
|
|
105
|
+
setDescribedByIds(ids: string[]): void;
|
|
106
|
+
/**
|
|
107
|
+
* Updates the disabled state of the underlying native element.
|
|
108
|
+
* @param isDisabled - Whether the control should be disabled.
|
|
109
|
+
*/
|
|
110
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
111
|
+
/** Focuses the native input element and marks the control as touched. */
|
|
112
|
+
onContainerClick(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Checks whether the value has changed since the last dirty check and emits `stateChanges` if needed.
|
|
115
|
+
*/
|
|
116
|
+
protected updateInputDirtyCheck(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Handles file selection from the native input element.
|
|
119
|
+
* @param e - The DOM change event from the file input.
|
|
120
|
+
*/
|
|
121
|
+
protected selectFile(e: Event): void;
|
|
122
|
+
/**
|
|
123
|
+
* Checks whether a file is currently selected.
|
|
124
|
+
* @returns `true` if a file is attached to the current value.
|
|
125
|
+
*/
|
|
126
|
+
protected hasFile(): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Clears the currently selected file and resets the control.
|
|
129
|
+
*/
|
|
130
|
+
protected clearFile(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Emits the `download` output event if the file is not newly added.
|
|
133
|
+
*/
|
|
134
|
+
protected downloadFile(): void;
|
|
135
|
+
/**
|
|
136
|
+
* Emits the `preview` output event if the file is not new and preview is enabled.
|
|
137
|
+
*/
|
|
138
|
+
protected previewFile(): void;
|
|
139
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileInputComponent, [{
|
|
140
|
+
optional: true;
|
|
141
|
+
self: true;
|
|
142
|
+
}]>;
|
|
143
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent, "file-input", never, {
|
|
144
|
+
"required": {
|
|
145
|
+
"alias": "required";
|
|
146
|
+
"required": false;
|
|
147
|
+
};
|
|
148
|
+
"disabled": {
|
|
149
|
+
"alias": "disabled";
|
|
150
|
+
"required": false;
|
|
151
|
+
};
|
|
152
|
+
"placeholder": {
|
|
153
|
+
"alias": "placeholder";
|
|
154
|
+
"required": false;
|
|
155
|
+
};
|
|
156
|
+
"fileName": {
|
|
157
|
+
"alias": "fileName";
|
|
158
|
+
"required": false;
|
|
159
|
+
"isSignal": true;
|
|
160
|
+
};
|
|
161
|
+
"maxSizeMb": {
|
|
162
|
+
"alias": "maxSizeMb";
|
|
163
|
+
"required": false;
|
|
164
|
+
"isSignal": true;
|
|
165
|
+
};
|
|
166
|
+
"minSizeMb": {
|
|
167
|
+
"alias": "minSizeMb";
|
|
168
|
+
"required": false;
|
|
169
|
+
"isSignal": true;
|
|
170
|
+
};
|
|
171
|
+
"isNew": {
|
|
172
|
+
"alias": "isNew";
|
|
173
|
+
"required": false;
|
|
174
|
+
"isSignal": true;
|
|
175
|
+
};
|
|
176
|
+
"canPreview": {
|
|
177
|
+
"alias": "canPreview";
|
|
178
|
+
"required": false;
|
|
179
|
+
"isSignal": true;
|
|
180
|
+
};
|
|
181
|
+
"appearance": {
|
|
182
|
+
"alias": "appearance";
|
|
183
|
+
"required": false;
|
|
184
|
+
"isSignal": true;
|
|
185
|
+
};
|
|
186
|
+
"accept": {
|
|
187
|
+
"alias": "accept";
|
|
188
|
+
"required": false;
|
|
189
|
+
"isSignal": true;
|
|
190
|
+
};
|
|
191
|
+
}, {
|
|
192
|
+
"fileName": "fileNameChange";
|
|
193
|
+
"changed": "changed";
|
|
194
|
+
"download": "download";
|
|
195
|
+
"preview": "preview";
|
|
196
|
+
}, never, never, true, never>;
|
|
143
197
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
authToken?: string;
|
|
198
|
+
export interface FilePreviewDialogData {
|
|
199
|
+
url?: string;
|
|
200
|
+
embed?: boolean;
|
|
201
|
+
authToken?: string;
|
|
149
202
|
}
|
|
150
|
-
declare class FilePreviewComponent {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
203
|
+
export declare class FilePreviewComponent {
|
|
204
|
+
readonly iframe: import("@angular/core").Signal<ElementRef<any>>;
|
|
205
|
+
private readonly httpClient;
|
|
206
|
+
private readonly dialogService;
|
|
207
|
+
protected readonly dialogData: FilePreviewDialogData;
|
|
208
|
+
protected readonly url: import("@angular/core").WritableSignal<string>;
|
|
209
|
+
constructor();
|
|
210
|
+
/**
|
|
211
|
+
* Handles the iframe load event: scrolls to the top and centers a single image when present.
|
|
212
|
+
*/
|
|
213
|
+
protected loaded(): void;
|
|
214
|
+
/**
|
|
215
|
+
* Opens the current file URL in a new browser tab for manual download.
|
|
216
|
+
*/
|
|
217
|
+
protected download(): void;
|
|
218
|
+
/**
|
|
219
|
+
* Displays a help dialog with browser-specific instructions for enabling PDF preview.
|
|
220
|
+
*/
|
|
221
|
+
protected troubles(): void;
|
|
222
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilePreviewComponent, never>;
|
|
223
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilePreviewComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
171
224
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
export declare class SelectFileDialogComponent {
|
|
226
|
+
readonly done: import("@angular/core").OutputEmitterRef<SelectFile>;
|
|
227
|
+
private readonly dialogService;
|
|
228
|
+
private readonly dialogRef;
|
|
229
|
+
protected readonly dialogData: import("@angular/core").WritableSignal<SelectFileDialogData>;
|
|
230
|
+
protected readonly file: import("@angular/core").WritableSignal<File>;
|
|
231
|
+
protected fileClass: import("@angular/core").WritableSignal<"selectfile-file" | "selectfile-file-drop">;
|
|
232
|
+
/**
|
|
233
|
+
* Handles the native file input change event and delegates to `selectFile`.
|
|
234
|
+
* @param e - The DOM change event from the file input.
|
|
235
|
+
*/
|
|
236
|
+
protected update(e: Event): void;
|
|
237
|
+
/**
|
|
238
|
+
* Validates and sets the selected file, showing an error if size or type constraints are violated.
|
|
239
|
+
* @param file - The `File` object to validate and store.
|
|
240
|
+
*/
|
|
241
|
+
private selectFile;
|
|
242
|
+
/**
|
|
243
|
+
* Formats a byte count into a human-readable size string.
|
|
244
|
+
* @param size - File size in bytes.
|
|
245
|
+
* @returns A formatted size string (e.g. "1.2 MB").
|
|
246
|
+
*/
|
|
247
|
+
protected size(size: number): string;
|
|
248
|
+
/** Emits the selected file and options, then closes the dialog. */
|
|
249
|
+
protected ok(): void;
|
|
250
|
+
/** Highlights the drop zone when a drag enters the area.
|
|
251
|
+
* @param e - The drag event.
|
|
252
|
+
*/
|
|
253
|
+
protected onDragOver(e: DragEvent): void;
|
|
254
|
+
/** Highlights the drop zone when a dragged item enters.
|
|
255
|
+
* @param e - The drag event.
|
|
256
|
+
*/
|
|
257
|
+
protected onDragEnter(e: DragEvent): void;
|
|
258
|
+
/** Resets the drop zone style when dragging ends.
|
|
259
|
+
* @param e - The drag event.
|
|
260
|
+
*/
|
|
261
|
+
protected onDragEnd(e: DragEvent): void;
|
|
262
|
+
/** Resets the drop zone style when a dragged item leaves the area.
|
|
263
|
+
* @param e - The drag event.
|
|
264
|
+
*/
|
|
265
|
+
protected onDragLeave(e: DragEvent): void;
|
|
266
|
+
/**
|
|
267
|
+
* Handles a file drop event, extracting and processing the dropped files.
|
|
268
|
+
* @param e - The drop event.
|
|
269
|
+
*/
|
|
270
|
+
protected onDrop(e: DragEvent): void;
|
|
271
|
+
/**
|
|
272
|
+
* Picks the first file from the list and passes it to `selectFile`.
|
|
273
|
+
* @param files - The `FileList` from the drag-and-drop event.
|
|
274
|
+
*/
|
|
275
|
+
private addFiles;
|
|
276
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectFileDialogComponent, never>;
|
|
277
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectFileDialogComponent, "ng-component", never, {}, {
|
|
278
|
+
"done": "done";
|
|
279
|
+
}, never, never, true, never>;
|
|
226
280
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
export { FileInputComponent, FilePreviewComponent, SelectFileDialogComponent, SelectPictureDialogComponent };
|
|
287
|
-
export type { FilePreviewDialogData };
|
|
281
|
+
export declare class SelectPictureDialogComponent {
|
|
282
|
+
readonly done: import("@angular/core").OutputEmitterRef<SelectFile>;
|
|
283
|
+
private readonly dialogService;
|
|
284
|
+
private readonly dialogRef;
|
|
285
|
+
protected readonly dialogData: import("@angular/core").WritableSignal<SelectPictureFileDialogData>;
|
|
286
|
+
protected readonly file: import("@angular/core").WritableSignal<File>;
|
|
287
|
+
protected fileClass: import("@angular/core").WritableSignal<"selectpicture-file" | "selectpicture-file-drop">;
|
|
288
|
+
protected pictureWidth: import("@angular/core").WritableSignal<number>;
|
|
289
|
+
protected pictureHeight: import("@angular/core").WritableSignal<number>;
|
|
290
|
+
protected picturePreview: import("@angular/core").WritableSignal<any>;
|
|
291
|
+
/**
|
|
292
|
+
* Handles the native file input change event and delegates to `selectFile`.
|
|
293
|
+
* @param e - The DOM change event from the file input.
|
|
294
|
+
*/
|
|
295
|
+
protected update(e: Event): void;
|
|
296
|
+
/**
|
|
297
|
+
* Validates the file size and type, then reads it as a data URL to generate a preview.
|
|
298
|
+
* @param file - The `File` object to validate and preview.
|
|
299
|
+
*/
|
|
300
|
+
private selectFile;
|
|
301
|
+
/**
|
|
302
|
+
* Formats a byte count into a human-readable size string.
|
|
303
|
+
* @param size - File size in bytes.
|
|
304
|
+
* @returns A formatted size string (e.g. "1.2 MB").
|
|
305
|
+
*/
|
|
306
|
+
protected size(size: number): string;
|
|
307
|
+
/** Emits the selected file and options, then closes the dialog. */
|
|
308
|
+
protected ok(): void;
|
|
309
|
+
/** Highlights the drop zone when a dragged item is over it.
|
|
310
|
+
* @param e - The drag event.
|
|
311
|
+
*/
|
|
312
|
+
protected onDragOver(e: DragEvent): void;
|
|
313
|
+
/** Highlights the drop zone when a dragged item enters.
|
|
314
|
+
* @param e - The drag event.
|
|
315
|
+
*/
|
|
316
|
+
protected onDragEnter(e: DragEvent): void;
|
|
317
|
+
/** Resets the drop zone style when dragging ends.
|
|
318
|
+
* @param e - The drag event.
|
|
319
|
+
*/
|
|
320
|
+
protected onDragEnd(e: DragEvent): void;
|
|
321
|
+
/** Resets the drop zone style when a dragged item leaves.
|
|
322
|
+
* @param e - The drag event.
|
|
323
|
+
*/
|
|
324
|
+
protected onDragLeave(e: DragEvent): void;
|
|
325
|
+
/**
|
|
326
|
+
* Handles a file drop event, extracting and processing the dropped image.
|
|
327
|
+
* @param e - The drop event.
|
|
328
|
+
*/
|
|
329
|
+
protected onDrop(e: DragEvent): void;
|
|
330
|
+
/**
|
|
331
|
+
* Picks the first file from the list and passes it to `selectFile`.
|
|
332
|
+
* @param files - The `FileList` from the drag-and-drop event.
|
|
333
|
+
*/
|
|
334
|
+
private addFiles;
|
|
335
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectPictureDialogComponent, never>;
|
|
336
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectPictureDialogComponent, "ng-component", never, {}, {
|
|
337
|
+
"done": "done";
|
|
338
|
+
}, never, never, true, never>;
|
|
339
|
+
}
|