2022-07-05 13:41:31 -04:00
|
|
|
{{#unless this.selectKit.isHidden}}
|
|
|
|
{{component this.selectKit.options.headerComponent
|
|
|
|
tabindex=this.tabindex
|
|
|
|
value=this.value
|
|
|
|
selectedContent=this.selectedContent
|
|
|
|
selectKit=this.selectKit
|
|
|
|
id=(concat this.selectKit.uniqueID "-header")
|
2017-10-19 15:51:08 -04:00
|
|
|
}}
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
<SelectKit::SelectKitBody @selectKit={{this.selectKit}} @id={{concat this.selectKit.uniqueID "-body"}}>
|
|
|
|
{{component this.selectKit.options.filterComponent
|
|
|
|
selectKit=this.selectKit
|
|
|
|
id=(concat this.selectKit.uniqueID "-filter")
|
2021-08-23 04:44:19 -04:00
|
|
|
}}
|
2020-02-03 08:22:14 -05:00
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.selectKit.isLoading}}
|
2020-03-09 08:44:34 -04:00
|
|
|
<span class="is-loading">
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.site}}
|
2020-03-09 08:44:34 -04:00
|
|
|
{{loading-spinner size="small"}}
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#each this.collections as |collection|}}
|
|
|
|
{{component (component-for-collection collection.identifier this.selectKit)
|
2020-02-03 08:22:14 -05:00
|
|
|
collection=collection
|
2022-07-05 13:41:31 -04:00
|
|
|
selectKit=this.selectKit
|
|
|
|
value=this.value
|
2020-02-03 08:22:14 -05:00
|
|
|
}}
|
|
|
|
{{/each}}
|
2021-08-23 04:44:19 -04:00
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.selectKit.filter}}
|
|
|
|
{{#if this.selectKit.hasNoContent}}
|
2021-08-23 04:44:19 -04:00
|
|
|
<span class="no-content" role="alert">
|
|
|
|
{{i18n "select_kit.no_content"}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
<span class="results-count" role="alert">
|
2022-07-05 13:41:31 -04:00
|
|
|
{{i18n "select_kit.results_count" count=this.mainCollection.length}}
|
2021-08-23 04:44:19 -04:00
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2020-03-09 08:44:34 -04:00
|
|
|
{{/if}}
|
2022-06-30 06:30:50 -04:00
|
|
|
</SelectKit::SelectKitBody>
|
2020-02-03 08:22:14 -05:00
|
|
|
{{/unless}}
|