@decaf-ts/for-angular 0.0.96 → 0.0.97
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/index.d.ts
CHANGED
|
@@ -7933,7 +7933,15 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
|
|
|
7933
7933
|
* @default HTML5InputTypes.FILE
|
|
7934
7934
|
*/
|
|
7935
7935
|
type: PossibleInputTypes;
|
|
7936
|
-
|
|
7936
|
+
/**
|
|
7937
|
+
* @description Specifies the value type for the file upload.
|
|
7938
|
+
* @summary Determines the format in which the uploaded file's value is returned.
|
|
7939
|
+
* Options include 'base64' for base64-encoded strings or 'files' for File objects.
|
|
7940
|
+
*
|
|
7941
|
+
* @type {'base64' | 'files'}
|
|
7942
|
+
* @default 'base64'
|
|
7943
|
+
*/
|
|
7944
|
+
valueType: 'base64' | 'files';
|
|
7937
7945
|
/**
|
|
7938
7946
|
* @description Label for the upload button.
|
|
7939
7947
|
* @summary Specifies the text displayed on the file upload button.
|
|
@@ -8041,6 +8049,15 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
|
|
|
8041
8049
|
* @default 0
|
|
8042
8050
|
*/
|
|
8043
8051
|
private dragCounter;
|
|
8052
|
+
/**
|
|
8053
|
+
* @description Specifies the subtype of the file upload.
|
|
8054
|
+
* @summary Lock subtype to 'text' to ensure that the value is processed as a JSON string containing data URLs or Files.
|
|
8055
|
+
* This property will be used to avoid validation errors and to determine how the value is processed and emitted.
|
|
8056
|
+
*
|
|
8057
|
+
* @type {string}
|
|
8058
|
+
* @default 'text'
|
|
8059
|
+
*/
|
|
8060
|
+
subType: string;
|
|
8044
8061
|
constructor();
|
|
8045
8062
|
/**
|
|
8046
8063
|
* @description Lifecycle hook that is called after Angular has initialized all data-bound properties of a directive.
|
|
@@ -8120,6 +8137,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
|
|
|
8120
8137
|
* @returns {Promise<void>}
|
|
8121
8138
|
*/
|
|
8122
8139
|
private handleSelectionConfirm;
|
|
8140
|
+
parseValue(revert?: boolean): Promise<string | void>;
|
|
8123
8141
|
/**
|
|
8124
8142
|
* @description Validates a single file against the component's constraints.
|
|
8125
8143
|
* @summary Checks the file type and size against the accepted values and limits.
|
|
@@ -8147,6 +8165,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
|
|
|
8147
8165
|
* @returns {boolean} - True if the file is an image, false otherwise.
|
|
8148
8166
|
*/
|
|
8149
8167
|
isImageFile(file: File): boolean;
|
|
8168
|
+
isBase64String(value: string): boolean;
|
|
8150
8169
|
getFileMime(base64: string): string;
|
|
8151
8170
|
/**
|
|
8152
8171
|
* @description Removes a file from the selection.
|
|
@@ -8183,7 +8202,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
|
|
|
8183
8202
|
*
|
|
8184
8203
|
* @returns {Promise<string[] | undefined>} - A promise that resolves to an array of data URLs, or undefined if an error occurs.
|
|
8185
8204
|
*/
|
|
8186
|
-
getDataURLs(files?: File[] | File): Promise<string[] | undefined>;
|
|
8205
|
+
getDataURLs(files?: File[] | File): Promise<string | string[] | undefined>;
|
|
8187
8206
|
/**
|
|
8188
8207
|
* @description Validates the format of a data URL.
|
|
8189
8208
|
* @summary Checks if the data URL is a non-empty string and matches the expected pattern
|
|
@@ -8210,7 +8229,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
|
|
|
8210
8229
|
*/
|
|
8211
8230
|
private readFile;
|
|
8212
8231
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
|
8213
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ngx-decaf-file-upload", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "name": { "alias": "name"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "type": { "alias": "type"; "required": false; }; "
|
|
8232
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ngx-decaf-file-upload", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "name": { "alias": "name"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "type": { "alias": "type"; "required": false; }; "valueType": { "alias": "valueType"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "size": { "alias": "size"; "required": false; }; "position": { "alias": "position"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "enableDirectoryMode": { "alias": "enableDirectoryMode"; "required": false; }; "previewHandler": { "alias": "previewHandler"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "subType": { "alias": "subType"; "required": false; }; }, { "changeEvent": "changeEvent"; }, never, never, true, never>;
|
|
8214
8233
|
}
|
|
8215
8234
|
|
|
8216
8235
|
/**
|