2023-03-14 13:18:55 +00:00
|
|
|
{{!
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
}}
|
|
|
|
|
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)))
|
|
|
|
''
|
|
|
|
)
|
|
|
|
)}}
|