mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 06:12:03 +03:00
3c851293c1
no issue We were in a part-way state where some touched files had been (sometimes partially) migrated to explicit `this`. The codemod that was available has now fixed the formatting issues it had so it was a good time to run it. https://github.com/ember-codemods/ember-no-implicit-this-codemod - part of the migration path for https://github.com/emberjs/rfcs/pull/308 - starts to make template resolution rules more explicit - `<MyComponent />` - always a component - `{{my-component}}` - component or helper (components _must_ have a `-`. This style of component will go away once fully migrated to angle bracket components) - `{{value}}` - a helper or local template variable - `{{this.value}}` - reference to a property on the backing context (either a controller or a component JS file)
104 lines
3.9 KiB
Handlebars
104 lines
3.9 KiB
Handlebars
{{!--
|
|
NOTE: the only thing changed here is `eventType="click"` on dropdown.trigger
|
|
so it doesn't interfere with the drag-n-drop sorting
|
|
|
|
When upgrading ember-power-select ensure the full component template is
|
|
copied across here
|
|
--}}
|
|
{{#basic-dropdown
|
|
classNames=(readonly this.classNames)
|
|
horizontalPosition=(readonly this.horizontalPosition)
|
|
calculatePosition=this.calculatePosition
|
|
destination=(readonly destination)
|
|
initiallyOpened=(readonly this.initiallyOpened)
|
|
matchTriggerWidth=(readonly this.matchTriggerWidth)
|
|
onClose=(action "onClose")
|
|
onOpen=(action "onOpen")
|
|
registerAPI=(action "registerAPI")
|
|
renderInPlace=(readonly this.renderInPlace)
|
|
verticalPosition=(readonly this.verticalPosition)
|
|
disabled=(readonly this.disabled)
|
|
as |dropdown|}}
|
|
|
|
{{#dropdown.trigger
|
|
tagName=(readonly this._triggerTagName)
|
|
ariaDescribedBy=(readonly this.ariaDescribedBy)
|
|
ariaInvalid=(readonly this.ariaInvalid)
|
|
ariaLabel=(readonly this.ariaLabel)
|
|
ariaLabelledBy=(readonly this.ariaLabelledBy)
|
|
ariaRequired=(readonly this.required)
|
|
class=(readonly this.concatenatedTriggerClasses)
|
|
id=(readonly this.triggerId)
|
|
eventType="click"
|
|
onKeyDown=(action "onTriggerKeydown")
|
|
onFocus=(action "onTriggerFocus")
|
|
onBlur=(action "onTriggerBlur")
|
|
tabindex=(readonly this.tabindex)}}
|
|
{{#component this.triggerComponent
|
|
allowClear=(readonly this.allowClear)
|
|
buildSelection=(readonly this.buildSelection)
|
|
extra=(readonly this.extra)
|
|
listboxId=(readonly this.optionsId)
|
|
loadingMessage=(readonly this.loadingMessage)
|
|
onFocus=(action "onFocus")
|
|
onBlur=(action "onBlur")
|
|
onInput=(action "onInput")
|
|
placeholder=(readonly placeholder)
|
|
placeholderComponent=(readonly this.placeholderComponent)
|
|
onKeydown=(action "onKeydown")
|
|
searchEnabled=(readonly this.searchEnabled)
|
|
searchField=(readonly this.searchField)
|
|
select=(readonly this.publicAPI)
|
|
selectedItemComponent=(readonly this.selectedItemComponent)
|
|
as |opt term|}}
|
|
{{yield opt term}}
|
|
{{/component}}
|
|
{{/dropdown.trigger}}
|
|
|
|
{{#dropdown.content _contentTagName=this._contentTagName class=(readonly this.concatenatedDropdownClasses)}}
|
|
{{component this.beforeOptionsComponent
|
|
extra=(readonly this.extra)
|
|
listboxId=(readonly this.optionsId)
|
|
onInput=(action "onInput")
|
|
onKeydown=(action "onKeydown")
|
|
searchEnabled=(readonly this.searchEnabled)
|
|
onFocus=(action "onFocus")
|
|
onBlur=(action "onBlur")
|
|
placeholder=(readonly placeholder)
|
|
placeholderComponent=(readonly this.placeholderComponent)
|
|
searchPlaceholder=(readonly this.searchPlaceholder)
|
|
select=(readonly this.publicAPI)}}
|
|
{{#if this.mustShowSearchMessage}}
|
|
{{component this.searchMessageComponent
|
|
searchMessage=(readonly this.searchMessage)
|
|
select=(readonly this.publicAPI)
|
|
}}
|
|
{{else if this.mustShowNoMessages}}
|
|
{{#if (hasBlock "inverse")}}
|
|
{{yield to="inverse"}}
|
|
{{else if this.noMatchesMessage}}
|
|
<ul class="ember-power-select-options" role="listbox">
|
|
<li class="ember-power-select-option ember-power-select-option--no-matches-message" role="option">
|
|
{{this.noMatchesMessage}}
|
|
</li>
|
|
</ul>
|
|
{{/if}}
|
|
{{else}}
|
|
{{#component this.optionsComponent
|
|
class="ember-power-select-options"
|
|
extra=(readonly this.extra)
|
|
groupIndex=""
|
|
loadingMessage=(readonly this.loadingMessage)
|
|
id=(readonly this.optionsId)
|
|
options=(readonly this.publicAPI.results)
|
|
optionsComponent=(readonly this.optionsComponent)
|
|
groupComponent=(readonly this.groupComponent)
|
|
select=(readonly this.publicAPI)
|
|
as |option term|}}
|
|
{{yield option term}}
|
|
{{/component}}
|
|
{{/if}}
|
|
{{component this.afterOptionsComponent select=(readonly this.publicAPI) extra=(readonly this.extra)}}
|
|
{{/dropdown.content}}
|
|
{{/basic-dropdown}}
|