cloud-ide-element 1.0.69 → 1.0.71

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,6 @@ class CideEleFileInputComponent {
3154
3154
  placeholderIcon = '📷';
3155
3155
  autoUpload = false;
3156
3156
  uploadData = {};
3157
- multi = false; // New property for multiple file upload mode
3158
3157
  // Traditional @Output() decorators
3159
3158
  fileChange = new EventEmitter();
3160
3159
  uploadSuccess = new EventEmitter();
@@ -3177,7 +3176,6 @@ class CideEleFileInputComponent {
3177
3176
  placeholderIconSignal = signal(this.placeholderIcon, ...(ngDevMode ? [{ debugName: "placeholderIconSignal" }] : []));
3178
3177
  autoUploadSignal = signal(this.autoUpload, ...(ngDevMode ? [{ debugName: "autoUploadSignal" }] : []));
3179
3178
  uploadDataSignal = signal(this.uploadData, ...(ngDevMode ? [{ debugName: "uploadDataSignal" }] : []));
3180
- multiSignal = signal(this.multi, ...(ngDevMode ? [{ debugName: "multiSignal" }] : []));
3181
3179
  // Reactive state with signals
3182
3180
  id = signal(Math.random().toString(36).substring(2, 10), ...(ngDevMode ? [{ debugName: "id" }] : []));
3183
3181
  isUploading = signal(false, ...(ngDevMode ? [{ debugName: "isUploading" }] : []));
@@ -3189,6 +3187,7 @@ class CideEleFileInputComponent {
3189
3187
  uploadNotificationId = signal(null, ...(ngDevMode ? [{ debugName: "uploadNotificationId" }] : []));
3190
3188
  isDragOver = signal(false, ...(ngDevMode ? [{ debugName: "isDragOver" }] : []));
3191
3189
  groupId = signal(null, ...(ngDevMode ? [{ debugName: "groupId" }] : [])); // Group ID for multiple file uploads
3190
+ isMultipleUploadMode = signal(false, ...(ngDevMode ? [{ debugName: "isMultipleUploadMode" }] : [])); // Flag to track if we're in multiple upload mode
3192
3191
  // Computed signals for better relationships
3193
3192
  hasFiles = computed(() => this.files() !== null && this.files().length > 0, ...(ngDevMode ? [{ debugName: "hasFiles" }] : []));
3194
3193
  canUpload = computed(() => this.hasFiles() && !this.isUploading() && !this.disabledSignal(), ...(ngDevMode ? [{ debugName: "canUpload" }] : []));
@@ -3251,7 +3250,6 @@ class CideEleFileInputComponent {
3251
3250
  this.placeholderIconSignal.set(this.placeholderIcon);
3252
3251
  this.autoUploadSignal.set(this.autoUpload);
3253
3252
  this.uploadDataSignal.set(this.uploadData);
3254
- this.multiSignal.set(this.multi);
3255
3253
  }
3256
3254
  ngOnChanges(changes) {
3257
3255
  // Angular 20: Update signals when @Input() values change
@@ -3287,8 +3285,6 @@ class CideEleFileInputComponent {
3287
3285
  this.autoUploadSignal.set(this.autoUpload);
3288
3286
  if (changes['uploadData'])
3289
3287
  this.uploadDataSignal.set(this.uploadData);
3290
- if (changes['multi'])
3291
- this.multiSignal.set(this.multi);
3292
3288
  }
3293
3289
  writeValue(value) {
3294
3290
  console.log('📝 [FileInput] writeValue called with:', value);
@@ -3346,7 +3342,7 @@ class CideEleFileInputComponent {
3346
3342
  this.onTouched();
3347
3343
  // Auto upload if enabled
3348
3344
  if (this.autoUploadSignal() && selectedFiles && selectedFiles.length > 0) {
3349
- if (this.multiSignal() && this.multipleSignal()) {
3345
+ if (this.multipleSignal() && selectedFiles.length > 1) {
3350
3346
  console.log('🚀 [FileInput] Auto upload enabled for multiple files:', selectedFiles.length);
3351
3347
  this.uploadMultipleFiles(Array.from(selectedFiles));
3352
3348
  }
@@ -3450,8 +3446,14 @@ class CideEleFileInputComponent {
3450
3446
  // Set the uploaded ID as the form control value
3451
3447
  this.onChange(uploadedId);
3452
3448
  console.log('📝 [FileInput] Form control value set to uploaded ID:', uploadedId);
3453
- this.uploadSuccess.emit(uploadedId);
3454
- console.log('📝 [FileInput] Upload success event emitted with file ID:', uploadedId);
3449
+ // Only emit individual uploadSuccess if not in multiple upload mode
3450
+ if (!this.isMultipleUploadMode()) {
3451
+ this.uploadSuccess.emit(uploadedId);
3452
+ console.log('📝 [FileInput] Upload success event emitted with file ID:', uploadedId);
3453
+ }
3454
+ else {
3455
+ console.log('📝 [FileInput] Individual upload success suppressed (multiple upload mode) - file ID:', uploadedId);
3456
+ }
3455
3457
  }
3456
3458
  else {
3457
3459
  console.error('❌ [FileInput] Upload successful but no ID returned:', response);
@@ -3490,6 +3492,8 @@ class CideEleFileInputComponent {
3490
3492
  */
3491
3493
  uploadMultipleFiles(files) {
3492
3494
  console.log('📤 [FileInput] uploadMultipleFiles called for:', files.length, 'files');
3495
+ // Set multiple upload mode flag
3496
+ this.isMultipleUploadMode.set(true);
3493
3497
  // Set upload status to 'start' before starting upload
3494
3498
  this.uploadStatus.set('start');
3495
3499
  this.isUploading.set(true);
@@ -3613,6 +3617,8 @@ class CideEleFileInputComponent {
3613
3617
  this.notificationService.error(`❌ All ${total} files failed to upload.`, { duration: 0 });
3614
3618
  this.uploadError.emit('All files failed to upload');
3615
3619
  }
3620
+ // Reset multiple upload mode flag
3621
+ this.isMultipleUploadMode.set(false);
3616
3622
  }
3617
3623
  generatePreviews() {
3618
3624
  // Clear existing previews
@@ -3921,7 +3927,7 @@ class CideEleFileInputComponent {
3921
3927
  return null; // No validation errors
3922
3928
  }
3923
3929
  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", multi: "multi" }, outputs: { fileChange: "fileChange", uploadSuccess: "uploadSuccess", uploadError: "uploadError", uploadProgressChange: "uploadProgressChange" }, providers: [
3930
+ 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" }, outputs: { fileChange: "fileChange", uploadSuccess: "uploadSuccess", uploadError: "uploadError", uploadProgressChange: "uploadProgressChange" }, providers: [
3925
3931
  {
3926
3932
  provide: NG_VALUE_ACCESSOR,
3927
3933
  useExisting: CideEleFileInputComponent,
@@ -3980,8 +3986,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
3980
3986
  type: Input
3981
3987
  }], uploadData: [{
3982
3988
  type: Input
3983
- }], multi: [{
3984
- type: Input
3985
3989
  }], fileChange: [{
3986
3990
  type: Output
3987
3991
  }], uploadSuccess: [{