@vectoriox/iox-ui 4.17.2 → 4.17.3

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.
@@ -871,13 +871,26 @@ class BuilderImageComponent {
871
871
  this.alt = 'Image';
872
872
  this.nodeId = '';
873
873
  }
874
+ /**
875
+ * The `src` attribute value, or `null` to OMIT the attribute entirely when there is no image.
876
+ *
877
+ * `src=""` is not "no image": the browser resolves the empty string against the document URL and
878
+ * re-requests the PAGE itself as an image — a broken-image icon plus a wasted round trip. Angular
879
+ * removes an attribute bound to `null`, which is the only way to render a genuinely src-less img.
880
+ *
881
+ * An empty src is a normal state, not a mistake: a context slot starts empty on purpose and is
882
+ * filled when the visitor interacts (see element-context-state-plan.md).
883
+ */
884
+ get srcAttr() {
885
+ return this.src || null;
886
+ }
874
887
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BuilderImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
875
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: BuilderImageComponent, isStandalone: false, selector: "img[iox-img]", inputs: { src: "src", alt: "alt", nodeId: "nodeId" }, host: { properties: { "attr.src": "src", "attr.alt": "alt", "class": "'iox-node-' + nodeId" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;max-width:100%}\n"] }); }
888
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: BuilderImageComponent, isStandalone: false, selector: "img[iox-img]", inputs: { src: "src", alt: "alt", nodeId: "nodeId" }, host: { properties: { "attr.src": "srcAttr", "attr.alt": "alt", "class": "'iox-node-' + nodeId" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;max-width:100%}\n"] }); }
876
889
  }
877
890
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BuilderImageComponent, decorators: [{
878
891
  type: Component,
879
892
  args: [{ selector: 'img[iox-img]', template: '', host: {
880
- '[attr.src]': 'src',
893
+ '[attr.src]': 'srcAttr',
881
894
  '[attr.alt]': 'alt',
882
895
  '[class]': "'iox-node-' + nodeId",
883
896
  }, standalone: false, styles: [":host{display:block;max-width:100%}\n"] }]