@solcre-org/core-ui 2.11.40 → 2.11.41

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.
@@ -1231,13 +1231,20 @@ class FileFieldComponent extends BaseFieldComponent {
1231
1231
  const fileToRemove = all[index];
1232
1232
  const config = this.fieldConfig();
1233
1233
  let fileType;
1234
+ let previewFile;
1234
1235
  if (this.isServerFile(fileToRemove)) {
1236
+ const serverFile = fileToRemove;
1235
1237
  const existing = [...this.existingFiles()];
1236
- const idx = existing.findIndex(f => f.id === fileToRemove.id);
1238
+ const idx = existing.findIndex(f => f.id === serverFile.id);
1237
1239
  if (idx !== -1) {
1238
1240
  existing.splice(idx, 1);
1239
1241
  this.existingFiles.set(existing);
1240
1242
  fileType = 'existing';
1243
+ const currentPreviewUrls = this.getPreviewUrls();
1244
+ const matchingPreview = currentPreviewUrls.find(p => p.id === serverFile.id);
1245
+ if (matchingPreview) {
1246
+ previewFile = matchingPreview;
1247
+ }
1241
1248
  }
1242
1249
  }
1243
1250
  else if (this.isPreviewFile(fileToRemove)) {
@@ -1248,7 +1255,12 @@ class FileFieldComponent extends BaseFieldComponent {
1248
1255
  this.previewBlobs.set(blobs);
1249
1256
  const fileIdMap = this.previewFileIds();
1250
1257
  const previewId = fileToRemove.__previewId || fileIdMap.get(fileToRemove);
1258
+ const originalUrl = fileToRemove.__originalUrl;
1251
1259
  if (previewId) {
1260
+ previewFile = {
1261
+ id: previewId,
1262
+ url: originalUrl || ''
1263
+ };
1252
1264
  const existing = [...this.existingFiles()];
1253
1265
  const existingIdx = existing.findIndex(f => f.id === previewId);
1254
1266
  if (existingIdx !== -1) {
@@ -1273,7 +1285,12 @@ class FileFieldComponent extends BaseFieldComponent {
1273
1285
  }
1274
1286
  }
1275
1287
  if (config.onFileRemoved && fileType) {
1276
- config.onFileRemoved(fileToRemove, index, fileType);
1288
+ config.onFileRemoved({
1289
+ file: fileToRemove,
1290
+ index: index,
1291
+ fileType: fileType,
1292
+ previewFile: previewFile
1293
+ });
1277
1294
  }
1278
1295
  this.validateCurrentState();
1279
1296
  this.formControl().markAsTouched();
@@ -10716,11 +10733,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
10716
10733
  // Este archivo es generado automáticamente por scripts/update-version.js
10717
10734
  // No edites manualmente este archivo
10718
10735
  const VERSION = {
10719
- full: '2.11.40',
10736
+ full: '2.11.41',
10720
10737
  major: 2,
10721
10738
  minor: 11,
10722
- patch: 40,
10723
- timestamp: '2025-09-02T15:56:06.044Z',
10739
+ patch: 41,
10740
+ timestamp: '2025-09-02T16:19:28.934Z',
10724
10741
  buildDate: '2/9/2025'
10725
10742
  };
10726
10743