@solcre-org/core-ui 2.11.37 → 2.11.38

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.
@@ -1004,7 +1004,10 @@ class FileFieldComponent extends BaseFieldComponent {
1004
1004
  const existing = this.existingFiles();
1005
1005
  const selected = this.selectedFiles();
1006
1006
  const blobs = this.previewBlobs();
1007
- return [...existing, ...selected, ...blobs];
1007
+ if (blobs.length > 0) {
1008
+ return [...selected, ...blobs];
1009
+ }
1010
+ return [...existing, ...selected];
1008
1011
  });
1009
1012
  previewUrlsEffect = effect(() => {
1010
1013
  const previewUrls = this.getPreviewUrls();
@@ -1106,7 +1109,10 @@ class FileFieldComponent extends BaseFieldComponent {
1106
1109
  }
1107
1110
  initializeFiles() {
1108
1111
  const currentValue = this.value();
1109
- if (currentValue) {
1112
+ const field = this.field();
1113
+ const hasPreviewUrls = field.previewUrls && ((Array.isArray(field.previewUrls) && field.previewUrls.length > 0) ||
1114
+ (typeof field.previewUrls === 'function'));
1115
+ if (currentValue && !hasPreviewUrls) {
1110
1116
  if (currentValue instanceof File) {
1111
1117
  this.selectedFiles.set([currentValue]);
1112
1118
  this.generatePreviews([currentValue]);
@@ -1122,6 +1128,10 @@ class FileFieldComponent extends BaseFieldComponent {
1122
1128
  this.existingFiles.set([currentValue]);
1123
1129
  }
1124
1130
  }
1131
+ else if (hasPreviewUrls) {
1132
+ this.selectedFiles.set([]);
1133
+ this.existingFiles.set([]);
1134
+ }
1125
1135
  }
1126
1136
  isServerFile(value) {
1127
1137
  return value && typeof value === 'object' && 'id' in value && 'filename' in value;
@@ -10666,11 +10676,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
10666
10676
  // Este archivo es generado automáticamente por scripts/update-version.js
10667
10677
  // No edites manualmente este archivo
10668
10678
  const VERSION = {
10669
- full: '2.11.37',
10679
+ full: '2.11.38',
10670
10680
  major: 2,
10671
10681
  minor: 11,
10672
- patch: 37,
10673
- timestamp: '2025-09-02T14:51:40.418Z',
10682
+ patch: 38,
10683
+ timestamp: '2025-09-02T15:04:58.415Z',
10674
10684
  buildDate: '2/9/2025'
10675
10685
  };
10676
10686