cloud-ide-element 1.0.113 → 1.0.114
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.
|
@@ -2654,16 +2654,18 @@ class CideEleFileManagerService {
|
|
|
2654
2654
|
// Optimized computed properties for file counting by group
|
|
2655
2655
|
getFileCountByGroup = computed(() => {
|
|
2656
2656
|
const countMap = new Map();
|
|
2657
|
-
// Count
|
|
2657
|
+
// Count files for each group using the same deduplication logic as getAllFilesForGroup
|
|
2658
|
+
this._fetchedFiles().forEach((fetchedFiles, groupId) => {
|
|
2659
|
+
const fileCount = this.getAllFilesForGroup(groupId).length;
|
|
2660
|
+
countMap.set(groupId, fileCount);
|
|
2661
|
+
});
|
|
2662
|
+
// Also count groups that have active uploads but no fetched files yet
|
|
2658
2663
|
this._activeUploads().forEach((upload, fileId) => {
|
|
2659
|
-
if (upload.groupId) {
|
|
2660
|
-
|
|
2664
|
+
if (upload.groupId && !countMap.has(upload.groupId)) {
|
|
2665
|
+
const fileCount = this.getAllFilesForGroup(upload.groupId).length;
|
|
2666
|
+
countMap.set(upload.groupId, fileCount);
|
|
2661
2667
|
}
|
|
2662
2668
|
});
|
|
2663
|
-
// Add fetched files by group
|
|
2664
|
-
this._fetchedFiles().forEach((files, groupId) => {
|
|
2665
|
-
countMap.set(groupId, (countMap.get(groupId) || 0) + files.length);
|
|
2666
|
-
});
|
|
2667
2669
|
return countMap;
|
|
2668
2670
|
}, ...(ngDevMode ? [{ debugName: "getFileCountByGroup" }] : []));
|
|
2669
2671
|
serviceState = computed(() => ({
|
|
@@ -3731,12 +3733,22 @@ class CideEleFileInputComponent {
|
|
|
3731
3733
|
if (existingComponentGroupId) {
|
|
3732
3734
|
// Component already has its own group ID - use it
|
|
3733
3735
|
console.log('🆔 [FileInput] Using existing component group ID:', existingComponentGroupId);
|
|
3736
|
+
// Open floating uploader with existing group ID
|
|
3737
|
+
if (this.showFloatingUploaderSignal()) {
|
|
3738
|
+
console.log('🔄 [FileInput] Opening floating uploader with existing group ID:', existingComponentGroupId);
|
|
3739
|
+
this.fileManagerService.triggerFloatingUploaderShow(existingComponentGroupId);
|
|
3740
|
+
}
|
|
3734
3741
|
this.startMulti(files, existingComponentGroupId);
|
|
3735
3742
|
}
|
|
3736
3743
|
else if (existingUploadDataGroupId) {
|
|
3737
3744
|
// Use group ID from uploadData and set it as component's group ID
|
|
3738
3745
|
console.log('🆔 [FileInput] Using group ID from uploadData:', existingUploadDataGroupId);
|
|
3739
3746
|
this.groupId.set(existingUploadDataGroupId);
|
|
3747
|
+
// Open floating uploader with group ID from uploadData
|
|
3748
|
+
if (this.showFloatingUploaderSignal()) {
|
|
3749
|
+
console.log('🔄 [FileInput] Opening floating uploader with uploadData group ID:', existingUploadDataGroupId);
|
|
3750
|
+
this.fileManagerService.triggerFloatingUploaderShow(existingUploadDataGroupId);
|
|
3751
|
+
}
|
|
3740
3752
|
this.startMulti(files, existingUploadDataGroupId);
|
|
3741
3753
|
}
|
|
3742
3754
|
else {
|
|
@@ -3748,6 +3760,11 @@ class CideEleFileInputComponent {
|
|
|
3748
3760
|
console.log('🆔 [FileInput] Generated new group ID just before upload:', newGroupId);
|
|
3749
3761
|
// Set the group ID to this component so it can track its own files
|
|
3750
3762
|
this.groupId.set(newGroupId);
|
|
3763
|
+
// Open floating uploader with newly generated group ID
|
|
3764
|
+
if (this.showFloatingUploaderSignal()) {
|
|
3765
|
+
console.log('🔄 [FileInput] Opening floating uploader with new group ID:', newGroupId);
|
|
3766
|
+
this.fileManagerService.triggerFloatingUploaderShow(newGroupId);
|
|
3767
|
+
}
|
|
3751
3768
|
this.startMulti(files, newGroupId);
|
|
3752
3769
|
},
|
|
3753
3770
|
error: (error) => {
|
|
@@ -4038,13 +4055,13 @@ class CideEleFileInputComponent {
|
|
|
4038
4055
|
}
|
|
4039
4056
|
const groupId = this.groupId();
|
|
4040
4057
|
if (groupId) {
|
|
4041
|
-
console.log("
|
|
4058
|
+
console.log("✅ [FileInput] Has existing group ID:", groupId);
|
|
4042
4059
|
// Fetch files for the group and trigger floating uploader to show
|
|
4043
4060
|
this.fileManagerService.fetchAndStoreFilesByGroupId(groupId)
|
|
4044
4061
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
4045
4062
|
.subscribe({
|
|
4046
4063
|
next: (files) => {
|
|
4047
|
-
console.log('✅ [FileInput] Files fetched for floating uploader:
|
|
4064
|
+
console.log('✅ [FileInput] Files fetched for floating uploader:', files.length);
|
|
4048
4065
|
// Trigger the floating uploader to show via service with group ID
|
|
4049
4066
|
this.fileManagerService.triggerFloatingUploaderShow(groupId);
|
|
4050
4067
|
},
|
|
@@ -4056,8 +4073,10 @@ class CideEleFileInputComponent {
|
|
|
4056
4073
|
});
|
|
4057
4074
|
}
|
|
4058
4075
|
else {
|
|
4059
|
-
|
|
4060
|
-
|
|
4076
|
+
console.log('⚠️ [FileInput] No group ID yet - floating uploader will open when user uploads files');
|
|
4077
|
+
// No group ID yet - don't open floating uploader now
|
|
4078
|
+
// It will open automatically when user uploads files and group ID is generated
|
|
4079
|
+
// This prevents the "No active files" issue
|
|
4061
4080
|
}
|
|
4062
4081
|
}
|
|
4063
4082
|
/**
|