structra-ui 0.1.93 → 0.1.94

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.
@@ -6297,6 +6297,8 @@ class ImagePreviewPanelComponent {
6297
6297
  /** Só `image` local ou `imageUrl` remota. */
6298
6298
  this.displaySrc = null;
6299
6299
  this.imageLoadError = false;
6300
+ /** Remote URL só entra como "imagem visível" após evento de load. */
6301
+ this.imageLoaded = false;
6300
6302
  /** PDF a partir de `File` (URL sanitizada). */
6301
6303
  this.safePdfUrl = null;
6302
6304
  this.pdfLoadError = false;
@@ -6307,6 +6309,7 @@ class ImagePreviewPanelComponent {
6307
6309
  if (c['file'] || c['imageUrl']) {
6308
6310
  this.revokeFileObjectUrl();
6309
6311
  this.imageLoadError = false;
6312
+ this.imageLoaded = false;
6310
6313
  this.pdfLoadError = false;
6311
6314
  this.fileKind = 'remote';
6312
6315
  this.displaySrc = null;
@@ -6319,10 +6322,12 @@ class ImagePreviewPanelComponent {
6319
6322
  }
6320
6323
  onImgError() {
6321
6324
  this.imageLoadError = true;
6325
+ this.imageLoaded = false;
6322
6326
  this.cdr.markForCheck();
6323
6327
  }
6324
6328
  onImgLoad() {
6325
6329
  this.imageLoadError = false;
6330
+ this.imageLoaded = true;
6326
6331
  this.cdr.markForCheck();
6327
6332
  }
6328
6333
  onPdfFrameError() {
@@ -6336,10 +6341,13 @@ class ImagePreviewPanelComponent {
6336
6341
  this.remove.emit();
6337
6342
  }
6338
6343
  get showImage() {
6339
- return (!this.loading &&
6340
- (this.fileKind === 'image' || this.fileKind === 'remote') &&
6341
- !!this.displaySrc &&
6342
- !this.imageLoadError);
6344
+ if (this.loading || !this.displaySrc || this.imageLoadError) {
6345
+ return false;
6346
+ }
6347
+ if (this.fileKind === 'remote') {
6348
+ return this.imageLoaded;
6349
+ }
6350
+ return (this.fileKind === 'image');
6343
6351
  }
6344
6352
  get showPdf() {
6345
6353
  return (!this.loading &&