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
|
|
|
}}
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.selectedContent.length}}
|
2021-08-23 04:44:19 -04:00
|
|
|
<div class="selected-content">
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#each this.selectedContent as |item|}}
|
|
|
|
{{component
|
|
|
|
this.selectKit.options.selectedChoiceComponent
|
2021-08-23 04:44:19 -04:00
|
|
|
item=item
|
2022-07-05 13:41:31 -04:00
|
|
|
selectKit=this.selectKit
|
2021-08-23 04:44:19 -04:00
|
|
|
}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
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}}
|
2021-07-21 07:49:21 -04:00
|
|
|
{{loading-spinner size="small"}}
|
|
|
|
{{/if}}
|
2020-03-09 08:44:34 -04:00
|
|
|
</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}}
|