mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
63b1e4e8ad
no issue - in many places we were passing a string as an argument to a `<PowerSelect>` related component that referred to a component name, that was throwing deprecation warnings because those strings were used dynamically with `{{component}}` later on which isn't statically analyzable - switched to passing a component explicitly with `{{component}}` - https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else
68 lines
2.5 KiB
Handlebars
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 (component "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> |