mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: replaces tag-chooser/tag-group-chooser with select-kit component
These component were also the last using select2. As a consequence select2 is removed from Discourse in this commit.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{{#component headerComponent
|
||||
tabindex=tabindex
|
||||
isFocused=isFocused
|
||||
isExpanded=isExpanded
|
||||
computedContent=headerComputedContent
|
||||
deselect=(action "deselect")
|
||||
toggle=(action "toggle")
|
||||
clearSelection=(action "clearSelection")
|
||||
options=headerComponentOptions
|
||||
}}
|
||||
{{component filterComponent
|
||||
icon=filterIcon
|
||||
placeholder=filterPlaceholder
|
||||
filter=filter
|
||||
hasSelection=hasSelection
|
||||
isLoading=isLoading
|
||||
shouldDisplayFilter=shouldDisplayFilter
|
||||
isFocused=isFocused
|
||||
filterComputedContent=(action "filterComputedContent")
|
||||
}}
|
||||
{{/component}}
|
||||
|
||||
<div class="select-kit-body">
|
||||
{{#if renderedBodyOnce}}
|
||||
{{component collectionComponent
|
||||
collectionHeaderComputedContent=collectionHeaderComputedContent
|
||||
hasSelection=hasSelection
|
||||
noneRowComputedContent=noneRowComputedContent
|
||||
createRowComputedContent=createRowComputedContent
|
||||
collectionComputedContent=collectionComputedContent
|
||||
rowComponent=rowComponent
|
||||
noneRowComponent=noneRowComponent
|
||||
createRowComponent=createRowComponent
|
||||
templateForRow=templateForRow
|
||||
templateForNoneRow=templateForNoneRow
|
||||
templateForCreateRow=templateForCreateRow
|
||||
clearSelection=(action "clearSelection")
|
||||
select=(action "select")
|
||||
highlight=(action "highlight")
|
||||
create=(action "create")
|
||||
highlightedValue=highlightedValue
|
||||
computedValue=computedValue
|
||||
rowComponentOptions=rowComponentOptions
|
||||
noContentRow=noContentRow
|
||||
maxContentRow=maxContentRow
|
||||
}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="select-kit-wrapper"></div>
|
||||
@@ -5,11 +5,6 @@
|
||||
computedContent=selectedComputedContent}}
|
||||
{{/each}}
|
||||
<span class="filter choice" tabindex="-1">
|
||||
{{component "select-kit/select-kit-filter"
|
||||
filterComputedContent=filterComputedContent
|
||||
shouldDisplayFilter=shouldDisplayFilter
|
||||
isFocused=isFocused
|
||||
filter=filter
|
||||
}}
|
||||
{{yield}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
<div class="body">
|
||||
<span class="delete-icon" {{action deselect computedContent bubbles=false}}>
|
||||
{{d-icon "times"}}
|
||||
</span>
|
||||
|
||||
{{badge}}
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
{{#if headerContent}}<div class="header">{{headerContent}}</div>{{/if}}
|
||||
|
||||
<div class="body">
|
||||
{{#if isLocked}}
|
||||
<span class="delete-icon">
|
||||
{{d-icon "lock"}}
|
||||
</span>
|
||||
{{else}}
|
||||
<span class="locked-icon" {{action deselect computedContent bubbles=false}}>
|
||||
{{d-icon "times"}}
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<span class="name">
|
||||
{{{label}}}
|
||||
</span>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
{{noContentRow}}
|
||||
</li>
|
||||
{{else}}
|
||||
{{#each filteredComputedContent as |computedContent|}}
|
||||
{{#each collectionComputedContent as |computedContent|}}
|
||||
{{component rowComponent
|
||||
computedContent=computedContent
|
||||
highlightedValue=highlightedValue
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{input
|
||||
tabindex=-1
|
||||
class="filter-input"
|
||||
placeholder=placeholder
|
||||
placeholder=computedPlaceholder
|
||||
key-up=filterComputedContent
|
||||
autocomplete="off"
|
||||
autocorrect="off"
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
{{component headerComponent
|
||||
tabindex=tabindex
|
||||
shouldDisplayFilter=shouldDisplayFilter
|
||||
isFocused=isFocused
|
||||
isExpanded=isExpanded
|
||||
computedContent=headerComputedContent
|
||||
deselect=(action "deselect")
|
||||
toggle=(action "toggle")
|
||||
isLoading=isLoading
|
||||
filterComputedContent=(action "filterComputedContent")
|
||||
clearSelection=(action "clearSelection")
|
||||
options=headerComponentOptions
|
||||
}}
|
||||
@@ -17,8 +14,9 @@
|
||||
filter=filter
|
||||
isLoading=isLoading
|
||||
icon=filterIcon
|
||||
hasSelection=hasSelection
|
||||
shouldDisplayFilter=shouldDisplayFilter
|
||||
placeholder=(i18n filterPlaceholder)
|
||||
placeholder=filterPlaceholder
|
||||
isFocused=isFocused
|
||||
filterComputedContent=(action "filterComputedContent")
|
||||
}}
|
||||
@@ -29,7 +27,7 @@
|
||||
hasSelection=hasSelection
|
||||
noneRowComputedContent=noneRowComputedContent
|
||||
createRowComputedContent=createRowComputedContent
|
||||
filteredComputedContent=filteredComputedContent
|
||||
collectionComputedContent=collectionComputedContent
|
||||
rowComponent=rowComponent
|
||||
noneRowComponent=noneRowComponent
|
||||
createRowComponent=createRowComponent
|
||||
Reference in New Issue
Block a user