Ghost/ghost/admin/app/templates/components/gh-token-input.hbs
Kevin Ansfield 0106a21e3c New tags input, drop selectize & jquery-ui deps (#892)
closes https://github.com/TryGhost/Ghost/issues/6458
- swap `ember-sortable` for `ember-drag-drop` in navigation UI
- extract PSM tag input into new `{{gh-psm-tags-input}}`
- add new `{{gh-token-input}}` that wraps `ember-power-select` and `ember-drag-drop` to replicate the previous selectize based tags input
- enhance `{{gh-psm-tags-input}}` behaviour to highlight selected primary tag and show "primary/internal" in selected tag titles
- 🔥 remove `selectize`
- 🔥 remove `jquery-ui`
- 🔥 remove unused `{{gh-navigation}}` component
2017-10-31 09:10:49 +00:00

55 lines
1.7 KiB
Handlebars

{{#gh-token-input/select-multiple
afterOptionsComponent=afterOptionsComponent
allowClear=allowClear
ariaDescribedBy=ariaDescribedBy
ariaInvalid=ariaInvalid
ariaLabel=ariaLabel
ariaLabelledBy=ariaLabelledBy
beforeOptionsComponent=beforeOptionsComponent
class=(concat "gh-token-input " class)
closeOnSelect=closeOnSelect
defaultHighlighted=defaultHighlighted
destination=destination
dir=dir
disabled=disabled
dropdownClass=dropdownClass
extra=extra
horizontalPosition=horizontalPosition
initiallyOpened=initiallyOpened
loadingMessage=loadingMessage
matcher=matcher
matchTriggerWidth=matchTriggerWidth
noMatchesMessage=noMatchesMessage
onblur=(action "onblur")
onchange=(action selectOrCreate)
onclose=onclose
onfocus=(action "onfocus")
oninput=oninput
onkeydown=(action "handleKeydown")
onopen=onopen
options=optionsWithoutSelected
optionsComponent=(or optionsComponent "power-select-vertical-collection-options")
placeholder=placeholder
registerAPI=registerAPI
renderInPlace=renderInPlace
search=(action searchAndSuggest)
searchEnabled=searchEnabled
searchField=searchField
searchMessage=searchMessage
searchPlaceholder=searchPlaceholder
selected=selected
selectedItemComponent=selectedItemComponent
tabindex=tabindex
triggerClass=triggerClass
triggerComponent=triggerComponent
triggerId=triggerId
verticalPosition=verticalPosition
as |option term|
}}
{{#if option.__isSuggestion__}}
{{gh-token-input/suggested-option option=option term=term}}
{{else}}
{{get option labelField}}
{{/if}}
{{/gh-token-input/select-multiple}}