Ghost/ghost/admin/app/components/gh-token-input.hbs
Kevin Ansfield 3dc4126397 Dropped use of @classic decorator in <GhTokenInput>
no issue

- updated component to be a glimmer component and use full "Octane" syntax
2021-07-12 14:03:48 +01:00

68 lines
2.5 KiB
Handlebars

<GhTokenInput::SelectMultiple
class={{concat "gh-token-input " @class}}
@triggerRole={{@triggerRole}}
@ariaDescribedBy={{@ariaDescribedBy}}
@ariaInvalid={{@ariaInvalid}}
@ariaLabel={{@ariaLabel}}
@ariaLabelledBy={{@ariaLabelledBy}}
@afterOptionsComponent={{@afterOptionsComponent}}
@allowClear={{@allowClear}}
@beforeOptionsComponent={{@beforeOptionsComponent}}
@buildSelection={{@buildSelection}}
@calculatePosition={{@calculatePosition}}
@closeOnSelect={{or @closeOnSelect false}}
@defaultHighlighted={{this.defaultHighlighted}}
@destination={{@destination}}
@disabled={{@disabled}}
@dropdownClass={{@dropdownClass}}
@extra={{@extra}}
@groupComponent={{or @groupComponent "power-select/power-select-group"}}
@horizontalPosition={{@horizontalPosition}}
@initiallyOpened={{@initiallyOpened}}
@loadingMessage={{@loadingMessage}}
@matcher={{this.matcher}}
@matchTriggerWidth={{@matchTriggerWidth}}
@noMatchesMessage={{@noMatchesMessage}}
@onBlur={{this.handleBlur}}
@onChange={{this.selectOrCreate}}
@onClose={{@onClose}}
@onFocus={{this.handleFocus}}
@onInput={{@onInput}}
@onKeydown={{this.handleKeydown}}
@onOpen={{@onOpen}}
@options={{this.optionsWithoutSelected}}
@optionsComponent={{or @optionsComponent "power-select-vertical-collection-options"}}
@placeholder={{@placeholder}}
@placeholderComponent={{@placeholderComponent}}
@preventScroll={{@preventScroll}}
@registerAPI={{@registerAPI}}
@renderInPlace={{@renderInPlace}}
@required={{@required}}
@scrollTo={{@scrollTo}}
@search={{this.searchAndSuggest}}
@searchEnabled={{true}}
@searchField={{this.searchField}}
@searchMessage={{@searchMessage}}
@searchPlaceholder={{@searchPlaceholder}}
@selected={{@selected}}
@selectedItemComponent={{@selectedItemComponent}}
@eventType={{@eventType}}
@title={{@title}}
@triggerClass={{@triggerClass}}
@triggerComponent={{or @triggerComponent "gh-token-input/trigger"}}
@triggerId={{@triggerId}}
@verticalPosition={{@verticalPosition}}
@tabindex={{@tabindex}}
data-test-token-input="true"
as |option|
>
{{#if option.__isSuggestion__}}
<GhTokenInput::SuggestedOption @option={{option}} />
{{else}}
{{#if (has-block)}}
{{yield option}}
{{else}}
{{get option (or @labelField "name")}}
{{/if}}
{{/if}}
</GhTokenInput::SelectMultiple>