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