cloud-ide-element 1.0.68 → 1.0.69
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.
|
@@ -3154,7 +3154,7 @@ class CideEleFileInputComponent {
|
|
|
3154
3154
|
placeholderIcon = '📷';
|
|
3155
3155
|
autoUpload = false;
|
|
3156
3156
|
uploadData = {};
|
|
3157
|
-
|
|
3157
|
+
multi = false; // New property for multiple file upload mode
|
|
3158
3158
|
// Traditional @Output() decorators
|
|
3159
3159
|
fileChange = new EventEmitter();
|
|
3160
3160
|
uploadSuccess = new EventEmitter();
|
|
@@ -3177,7 +3177,7 @@ class CideEleFileInputComponent {
|
|
|
3177
3177
|
placeholderIconSignal = signal(this.placeholderIcon, ...(ngDevMode ? [{ debugName: "placeholderIconSignal" }] : []));
|
|
3178
3178
|
autoUploadSignal = signal(this.autoUpload, ...(ngDevMode ? [{ debugName: "autoUploadSignal" }] : []));
|
|
3179
3179
|
uploadDataSignal = signal(this.uploadData, ...(ngDevMode ? [{ debugName: "uploadDataSignal" }] : []));
|
|
3180
|
-
|
|
3180
|
+
multiSignal = signal(this.multi, ...(ngDevMode ? [{ debugName: "multiSignal" }] : []));
|
|
3181
3181
|
// Reactive state with signals
|
|
3182
3182
|
id = signal(Math.random().toString(36).substring(2, 10), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
3183
3183
|
isUploading = signal(false, ...(ngDevMode ? [{ debugName: "isUploading" }] : []));
|
|
@@ -3251,7 +3251,7 @@ class CideEleFileInputComponent {
|
|
|
3251
3251
|
this.placeholderIconSignal.set(this.placeholderIcon);
|
|
3252
3252
|
this.autoUploadSignal.set(this.autoUpload);
|
|
3253
3253
|
this.uploadDataSignal.set(this.uploadData);
|
|
3254
|
-
this.
|
|
3254
|
+
this.multiSignal.set(this.multi);
|
|
3255
3255
|
}
|
|
3256
3256
|
ngOnChanges(changes) {
|
|
3257
3257
|
// Angular 20: Update signals when @Input() values change
|
|
@@ -3287,8 +3287,8 @@ class CideEleFileInputComponent {
|
|
|
3287
3287
|
this.autoUploadSignal.set(this.autoUpload);
|
|
3288
3288
|
if (changes['uploadData'])
|
|
3289
3289
|
this.uploadDataSignal.set(this.uploadData);
|
|
3290
|
-
if (changes['
|
|
3291
|
-
this.
|
|
3290
|
+
if (changes['multi'])
|
|
3291
|
+
this.multiSignal.set(this.multi);
|
|
3292
3292
|
}
|
|
3293
3293
|
writeValue(value) {
|
|
3294
3294
|
console.log('📝 [FileInput] writeValue called with:', value);
|
|
@@ -3346,7 +3346,7 @@ class CideEleFileInputComponent {
|
|
|
3346
3346
|
this.onTouched();
|
|
3347
3347
|
// Auto upload if enabled
|
|
3348
3348
|
if (this.autoUploadSignal() && selectedFiles && selectedFiles.length > 0) {
|
|
3349
|
-
if (this.
|
|
3349
|
+
if (this.multiSignal() && this.multipleSignal()) {
|
|
3350
3350
|
console.log('🚀 [FileInput] Auto upload enabled for multiple files:', selectedFiles.length);
|
|
3351
3351
|
this.uploadMultipleFiles(Array.from(selectedFiles));
|
|
3352
3352
|
}
|
|
@@ -3505,7 +3505,7 @@ class CideEleFileInputComponent {
|
|
|
3505
3505
|
if (existingGroupId) {
|
|
3506
3506
|
console.log('🆔 [FileInput] Using existing group ID:', existingGroupId);
|
|
3507
3507
|
this.groupId.set(existingGroupId);
|
|
3508
|
-
this.
|
|
3508
|
+
this.startMulti(files, existingGroupId);
|
|
3509
3509
|
}
|
|
3510
3510
|
else {
|
|
3511
3511
|
console.log('🆔 [FileInput] No group ID provided, generating new one...');
|
|
@@ -3515,7 +3515,7 @@ class CideEleFileInputComponent {
|
|
|
3515
3515
|
const newGroupId = response.objectId;
|
|
3516
3516
|
console.log('🆔 [FileInput] Generated new group ID:', newGroupId);
|
|
3517
3517
|
this.groupId.set(newGroupId);
|
|
3518
|
-
this.
|
|
3518
|
+
this.startMulti(files, newGroupId);
|
|
3519
3519
|
},
|
|
3520
3520
|
error: (error) => {
|
|
3521
3521
|
console.error('❌ [FileInput] Failed to generate group ID:', error);
|
|
@@ -3535,7 +3535,7 @@ class CideEleFileInputComponent {
|
|
|
3535
3535
|
/**
|
|
3536
3536
|
* Start uploading multiple files with the provided group ID
|
|
3537
3537
|
*/
|
|
3538
|
-
|
|
3538
|
+
startMulti(files, groupId) {
|
|
3539
3539
|
console.log('🚀 [FileInput] Starting upload for', files.length, 'files with group ID:', groupId);
|
|
3540
3540
|
let completedUploads = 0;
|
|
3541
3541
|
let failedUploads = 0;
|
|
@@ -3921,7 +3921,7 @@ class CideEleFileInputComponent {
|
|
|
3921
3921
|
return null; // No validation errors
|
|
3922
3922
|
}
|
|
3923
3923
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideEleFileInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3924
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideEleFileInputComponent, isStandalone: true, selector: "cide-ele-file-input", inputs: { label: "label", accept: "accept", multiple: "multiple", disabled: "disabled", required: "required", helperText: "helperText", errorText: "errorText", showPreview: "showPreview", previewWidth: "previewWidth", previewHeight: "previewHeight", previewBoxMode: "previewBoxMode", showFileName: "showFileName", placeholderText: "placeholderText", placeholderIcon: "placeholderIcon", autoUpload: "autoUpload", uploadData: "uploadData",
|
|
3924
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideEleFileInputComponent, isStandalone: true, selector: "cide-ele-file-input", inputs: { label: "label", accept: "accept", multiple: "multiple", disabled: "disabled", required: "required", helperText: "helperText", errorText: "errorText", showPreview: "showPreview", previewWidth: "previewWidth", previewHeight: "previewHeight", previewBoxMode: "previewBoxMode", showFileName: "showFileName", placeholderText: "placeholderText", placeholderIcon: "placeholderIcon", autoUpload: "autoUpload", uploadData: "uploadData", multi: "multi" }, outputs: { fileChange: "fileChange", uploadSuccess: "uploadSuccess", uploadError: "uploadError", uploadProgressChange: "uploadProgressChange" }, providers: [
|
|
3925
3925
|
{
|
|
3926
3926
|
provide: NG_VALUE_ACCESSOR,
|
|
3927
3927
|
useExisting: CideEleFileInputComponent,
|
|
@@ -3980,7 +3980,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3980
3980
|
type: Input
|
|
3981
3981
|
}], uploadData: [{
|
|
3982
3982
|
type: Input
|
|
3983
|
-
}],
|
|
3983
|
+
}], multi: [{
|
|
3984
3984
|
type: Input
|
|
3985
3985
|
}], fileChange: [{
|
|
3986
3986
|
type: Output
|