2020-11-30 15:05:16 +00:00
|
|
|
{{#if (not this.disabled)}}
|
|
|
|
{{#if (eq this.loading "lazy")}}
|
|
|
|
{{! in order to use intersection observer we need a DOM element on the page}}
|
|
|
|
<data
|
|
|
|
{{did-insert this.connect}}
|
|
|
|
aria-hidden="true"
|
|
|
|
style="width: 0;height: 0;font-size: 0;padding: 0;margin: 0;"
|
|
|
|
/>
|
|
|
|
{{else}}
|
|
|
|
{{did-insert this.connect}}
|
|
|
|
{{/if}}
|
|
|
|
{{did-update this.attributeChanged 'src' @src}}
|
|
|
|
{{did-update this.attributeChanged 'loading' @loading}}
|
|
|
|
{{will-destroy this.disconnect}}
|
2020-03-19 10:28:21 +00:00
|
|
|
{{/if}}
|
2020-11-30 15:05:16 +00:00
|
|
|
{{did-update this.attributeChanged 'disabled' @disabled}}
|
|
|
|
{{yield (hash
|
|
|
|
data=this.data
|
|
|
|
error=this.error
|
2022-07-14 08:30:35 +00:00
|
|
|
invalidate=this.invalidate
|
2020-11-30 15:05:16 +00:00
|
|
|
Source=(if this.data
|
|
|
|
(component 'data-source' disabled=(not (eq this.error undefined)))
|
|
|
|
''
|
|
|
|
)
|
|
|
|
)}}
|