@solcre-org/core-ui 2.11.38 → 2.11.39
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.
|
@@ -1218,12 +1218,24 @@ class FileFieldComponent extends BaseFieldComponent {
|
|
|
1218
1218
|
removeFile(index) {
|
|
1219
1219
|
const all = this.allFiles();
|
|
1220
1220
|
const fileToRemove = all[index];
|
|
1221
|
+
const config = this.fieldConfig();
|
|
1222
|
+
let fileType;
|
|
1221
1223
|
if (this.isServerFile(fileToRemove)) {
|
|
1222
1224
|
const existing = [...this.existingFiles()];
|
|
1223
1225
|
const idx = existing.findIndex(f => f.id === fileToRemove.id);
|
|
1224
1226
|
if (idx !== -1) {
|
|
1225
1227
|
existing.splice(idx, 1);
|
|
1226
1228
|
this.existingFiles.set(existing);
|
|
1229
|
+
fileType = 'existing';
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
else if (this.isPreviewFile(fileToRemove)) {
|
|
1233
|
+
const blobs = [...this.previewBlobs()];
|
|
1234
|
+
const idx = blobs.indexOf(fileToRemove);
|
|
1235
|
+
if (idx !== -1) {
|
|
1236
|
+
blobs.splice(idx, 1);
|
|
1237
|
+
this.previewBlobs.set(blobs);
|
|
1238
|
+
fileType = 'preview';
|
|
1227
1239
|
}
|
|
1228
1240
|
}
|
|
1229
1241
|
else {
|
|
@@ -1233,8 +1245,12 @@ class FileFieldComponent extends BaseFieldComponent {
|
|
|
1233
1245
|
selected.splice(idx, 1);
|
|
1234
1246
|
this.selectedFiles.set(selected);
|
|
1235
1247
|
this.generatePreviews(selected);
|
|
1248
|
+
fileType = 'selected';
|
|
1236
1249
|
}
|
|
1237
1250
|
}
|
|
1251
|
+
if (config.onFileRemoved && fileType) {
|
|
1252
|
+
config.onFileRemoved(fileToRemove, index, fileType);
|
|
1253
|
+
}
|
|
1238
1254
|
this.validateCurrentState();
|
|
1239
1255
|
this.formControl().markAsTouched();
|
|
1240
1256
|
this.emitCurrentValue();
|
|
@@ -10676,11 +10692,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
10676
10692
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
10677
10693
|
// No edites manualmente este archivo
|
|
10678
10694
|
const VERSION = {
|
|
10679
|
-
full: '2.11.
|
|
10695
|
+
full: '2.11.39',
|
|
10680
10696
|
major: 2,
|
|
10681
10697
|
minor: 11,
|
|
10682
|
-
patch:
|
|
10683
|
-
timestamp: '2025-09-02T15:
|
|
10698
|
+
patch: 39,
|
|
10699
|
+
timestamp: '2025-09-02T15:20:12.868Z',
|
|
10684
10700
|
buildDate: '2/9/2025'
|
|
10685
10701
|
};
|
|
10686
10702
|
|