DEV: Apply prettier to hbs files

This commit is contained in:
David Taylor
2022-12-28 12:28:11 +00:00
parent 104a16610a
commit c8e2e37fa7
847 changed files with 18124 additions and 4627 deletions

View File

@@ -1,5 +1,6 @@
<div class="select-kit-header-wrapper">
{{component this.selectKit.options.selectedNameComponent
{{component
this.selectKit.options.selectedNameComponent
tabindex=this.tabindex
item=this.selectedContent
selectKit=this.selectKit
@@ -7,4 +8,4 @@
}}
{{d-icon this.caretIcon class="caret-icon"}}
</div>
</div>

View File

@@ -9,8 +9,11 @@
</div>
{{#if this.shouldDisplayDescription}}
<div class="category-desc" aria-hidden="true">{{dir-span this.descriptionText htmlSafe="true"}}</div>
<div class="category-desc" aria-hidden="true">{{dir-span
this.descriptionText
htmlSafe="true"
}}</div>
{{/if}}
{{else}}
{{html-safe this.label}}
{{/if}}
{{/if}}

View File

@@ -6,4 +6,4 @@
<div class="palettes" style={{this.backgroundColor}}>
{{this.palettes}}
</div>
{{/if}}
{{/if}}

View File

@@ -1,15 +1,21 @@
<div class="select-kit-header-wrapper">
{{#each this.icons as |icon|}} {{d-icon icon}} {{/each}}
{{component this.selectKit.options.selectedNameComponent
{{component
this.selectKit.options.selectedNameComponent
tabindex=this.tabindex
item=this.selectedContent
selectKit=this.selectKit
}}
{{#if this.shouldDisplayClearableButton}}
<DButton @class="btn-clear" @icon="times" @action={{this.selectKit.onClearSelection}} @ariaLabel="clear_input" />
<DButton
@class="btn-clear"
@icon="times"
@action={{this.selectKit.onClearSelection}}
@ariaLabel="clear_input"
/>
{{/if}}
{{d-icon this.caretIcon class="caret-icon"}}
</div>
</div>

View File

@@ -1 +1 @@
<span>{{this.label}}</span>
<span>{{this.label}}</span>

View File

@@ -1,7 +1,8 @@
<div class="select-kit-header-wrapper">
{{#each this.icons as |icon|}} {{d-icon icon}} {{/each}}
{{component this.selectKit.options.selectedNameComponent
{{component
this.selectKit.options.selectedNameComponent
tabindex=this.tabindex
item=this.selectedContent
selectKit=this.selectKit
@@ -13,4 +14,4 @@
{{/if}}
&#8203;
{{! Zero-width space character, so icon-only button height = regular button height }}
</div>
</div>

View File

@@ -10,4 +10,4 @@
<div class="texts">
<span class="name">{{html-safe this.label}}</span>
<span class="desc">{{html-safe this.description}}</span>
</div>
</div>

View File

@@ -13,4 +13,4 @@
{{else}}
{{d-icon "envelope"}}
<span class="identifier">{{this.item.id}}</span>
{{/if}}
{{/if}}

View File

@@ -1,5 +1,10 @@
{{#if this.item.url}}
<AvatarFlair @flairName={{this.item.name}} @flairUrl={{this.item.url}} @flairBgColor={{this.item.bgColor}} @flairColor={{this.item.color}} />
<AvatarFlair
@flairName={{this.item.name}}
@flairUrl={{this.item.url}}
@flairBgColor={{this.item.bgColor}}
@flairColor={{this.item.color}}
/>
{{/if}}
<span>{{this.label}}</span>
<span>{{this.label}}</span>

View File

@@ -5,7 +5,8 @@
</div>
{{/if}}
{{component this.selectKit.options.selectedNameComponent
{{component
this.selectKit.options.selectedNameComponent
tabindex=this.tabindex
item=this.selectedContent
selectKit=this.selectKit
@@ -18,4 +19,4 @@
{{/if}}
{{d-icon this.caretIcon class="caret-icon"}}
</div>
</div>

View File

@@ -10,4 +10,4 @@
<span class="future-date-input-selector-datetime">
{{this.item.timeFormatted}}
</span>
{{/if}}
{{/if}}

View File

@@ -1,9 +1,16 @@
{{#if this.tags}}
<div class="mini-tag-chooser-selected-collection selected-tags">
{{#each this.tags as |tag|}}
<DButton @translatedTitle={{tag.value}} @icon="times" @action={{action this.selectKit.deselect}} @actionParam={{tag.value}} @class={{tag.classNames}} @tabindex={{0}}>
<DButton
@translatedTitle={{tag.value}}
@icon="times"
@action={{action this.selectKit.deselect}}
@actionParam={{tag.value}}
@class={{tag.classNames}}
@tabindex={{0}}
>
{{discourse-tag tag.value noHref=true}}
</DButton>
{{/each}}
</div>
{{/if}}
{{/if}}

View File

@@ -1,5 +1,6 @@
{{#unless this.selectKit.isHidden}}
{{component this.selectKit.options.headerComponent
{{component
this.selectKit.options.headerComponent
tabindex=this.tabindex
value=this.value
selectedContent=this.selectedContent
@@ -7,8 +8,12 @@
id=(concat this.selectKit.uniqueID "-header")
}}
<SelectKit::SelectKitBody @selectKit={{this.selectKit}} @id={{concat this.selectKit.uniqueID "-body"}}>
{{component this.selectKit.options.filterComponent
<SelectKit::SelectKitBody
@selectKit={{this.selectKit}}
@id={{concat this.selectKit.uniqueID "-body"}}
>
{{component
this.selectKit.options.filterComponent
selectKit=this.selectKit
id=(concat this.selectKit.uniqueID "-filter")
}}
@@ -16,7 +21,8 @@
{{#if this.selectedContent.length}}
<div class="selected-content">
{{#each this.selectedContent as |item|}}
{{component this.selectKit.options.selectedChoiceComponent
{{component
this.selectKit.options.selectedChoiceComponent
item=item
selectKit=this.selectKit
}}
@@ -32,7 +38,8 @@
</span>
{{else}}
{{#each this.collections as |collection|}}
{{component (component-for-collection collection.identifier this.selectKit)
{{component
(component-for-collection collection.identifier this.selectKit)
collection=collection
selectKit=this.selectKit
value=this.value
@@ -52,4 +59,4 @@
{{/if}}
{{/if}}
</SelectKit::SelectKitBody>
{{/unless}}
{{/unless}}

View File

@@ -1,3 +1,3 @@
<span class="formatted-selection">
{{this.formattedContent}}
</span>
</span>

View File

@@ -3,7 +3,10 @@
{{d-icon icon}}
{{/each}}
<MultiSelect::FormatSelectedContent @content={{or this.selectedContent this.selectKit.noneItem}} @selectKit={{this.selectKit}} />
<MultiSelect::FormatSelectedContent
@content={{or this.selectedContent this.selectKit.noneItem}}
@selectKit={{this.selectKit}}
/>
{{d-icon this.caretIcon class="caret-icon"}}
</div>
</div>

View File

@@ -1,6 +1,13 @@
<div {{on "click" this.onSelectedNameClick}} tabindex="0" title={{this.title}} data-value={{this.value}} data-name={{this.name}} class="select-kit-selected-name selected-name choice">
<div
{{on "click" this.onSelectedNameClick}}
tabindex="0"
title={{this.title}}
data-value={{this.value}}
data-name={{this.name}}
class="select-kit-selected-name selected-name choice"
>
<div class="body">
{{this.badge}}
{{d-icon "times"}}
</div>
</div>
</div>

View File

@@ -6,4 +6,4 @@
{{i18n this.label}}
</span>
{{d-icon this.caretIcon class="caret-icon"}}
</div>
</div>

View File

@@ -1,8 +1,9 @@
<h2 class="selected-name" title={{this.title}} role="option">
{{period-title this.value
{{period-title
this.value
showDateRange=true
fullDay=this.selectKit.options.fullDay
}}
</h2>
{{d-icon this.caretIcon class="caret-icon"}}
{{d-icon this.caretIcon class="caret-icon"}}

View File

@@ -1,8 +1,9 @@
<span class="selection-indicator"></span>
<span class="period-title">
{{period-title this.rowValue
{{period-title
this.rowValue
showDateRange=true
fullDay=this.selectKit.options.fullDay
}}
</span>
</span>

View File

@@ -1,4 +1,4 @@
<p class="reason">
<PinnedOptions @value={{this.pinned}} @topic={{this.topic}} />
<span class="text">{{html-safe this.reasonText}}</span>
</p>
</p>

View File

@@ -4,4 +4,4 @@
<li class="select-kit-error">{{item}}</li>
{{/each}}
</ul>
{{/if}}
{{/if}}

View File

@@ -1,3 +1,3 @@
{{#if this.selectKit.isExpanded}}
{{yield}}
{{/if}}
{{/if}}

View File

@@ -1,11 +1,12 @@
{{#if this.collection.content.length}}
<ul class="select-kit-collection" aria-live="polite" role="menu">
{{#each this.collection.content as |item|}}
{{component (component-for-row this.collection.identifier item this.selectKit)
{{component
(component-for-row this.collection.identifier item this.selectKit)
item=item
value=this.value
selectKit=this.selectKit
}}
{{/each}}
</ul>
{{/if}}
{{/if}}

View File

@@ -1,6 +1,6 @@
{{#unless this.isHidden}}
{{!-- filter-input-search prevents 1password from attempting autocomplete --}}
{{!-- template-lint-disable no-down-event-binding --}}
{{! filter-input-search prevents 1password from attempting autocomplete }}
{{! template-lint-disable no-down-event-binding }}
<Input
tabindex={{0}}
@@ -22,4 +22,4 @@
{{#if this.selectKit.options.filterIcon}}
{{d-icon this.selectKit.options.filterIcon class="filter-icon"}}
{{/if}}
{{/unless}}
{{/unless}}

View File

@@ -4,4 +4,4 @@
<span class="name">
{{this.label}}
</span>
</span>

View File

@@ -1,8 +1,9 @@
<div class="select-kit-header-wrapper">
{{#each this.icons as |icon|}} {{d-icon icon}} {{/each}}
{{component this.selectKit.options.selectedNameComponent
{{component
this.selectKit.options.selectedNameComponent
item=this.selectedContent
selectKit=this.selectKit
}}
</div>
</div>

View File

@@ -1,3 +1,7 @@
<SelectedChoice @item={{this.item}} @selectKit={{this.selectKit}} @extraClass={{this.extraClass}}>
<SelectedChoice
@item={{this.item}}
@selectKit={{this.selectKit}}
@extraClass={{this.extraClass}}
>
{{this.badge}}
</SelectedChoice>
</SelectedChoice>

View File

@@ -1,4 +1,12 @@
<button aria-label={{i18n "select_kit.delete_item" name=this.itemName}} id="{{this.id}}-choice" data-value={{this.itemValue}} data-name={{this.itemName}} type="button" {{on "click" (fn this.selectKit.deselect this.item)}} class="btn btn-default selected-choice {{this.extraClass}}">
<button
aria-label={{i18n "select_kit.delete_item" name=this.itemName}}
id="{{this.id}}-choice"
data-value={{this.itemValue}}
data-name={{this.itemName}}
type="button"
{{on "click" (fn this.selectKit.deselect this.item)}}
class="btn btn-default selected-choice {{this.extraClass}}"
>
{{d-icon "times"}}
{{#if (has-block)}}
{{yield}}
@@ -7,4 +15,4 @@
{{this.itemName}}
</span>
{{/if}}
</button>
</button>

View File

@@ -1,5 +1,12 @@
{{#if this.selectKit.options.showFullTitle}}
<div lang={{this.lang}} title={{this.title}} data-value={{this.value}} data-name={{this.name}} role="option" class="select-kit-selected-name selected-name choice">
<div
lang={{this.lang}}
title={{this.title}}
data-value={{this.value}}
data-name={{this.name}}
role="option"
class="select-kit-selected-name selected-name choice"
>
{{#if this.item.icon}}
{{d-icon this.item.icon}}
{{/if}}
@@ -9,13 +16,23 @@
</span>
{{#if this.shouldDisplayClearableButton}}
<DButton @class="btn-clear" @icon="times" @action={{this.selectKit.deselect}} @actionParam={{this.item}} @ariaLabel="clear_input" />
<DButton
@class="btn-clear"
@icon="times"
@action={{this.selectKit.deselect}}
@actionParam={{this.item}}
@ariaLabel="clear_input"
/>
{{/if}}
</div>
{{else}}
{{#if this.item.icon}}
<div role="option" lang={{this.lang}} class="select-kit-selected-name selected-name choice">
<div
role="option"
lang={{this.lang}}
class="select-kit-selected-name selected-name choice"
>
{{d-icon this.item.icon}}
</div>
{{/if}}
{{/if}}
{{/if}}

View File

@@ -1,5 +1,6 @@
{{#unless this.selectKit.isHidden}}
{{component this.selectKit.options.headerComponent
{{component
this.selectKit.options.headerComponent
tabindex=this.tabindex
value=this.value
selectedContent=this.selectedContent
@@ -7,8 +8,12 @@
id=(concat this.selectKit.uniqueID "-header")
}}
<SelectKit::SelectKitBody @selectKit={{this.selectKit}} @id={{concat this.selectKit.uniqueID "-body"}}>
{{component this.selectKit.options.filterComponent
<SelectKit::SelectKitBody
@selectKit={{this.selectKit}}
@id={{concat this.selectKit.uniqueID "-body"}}
>
{{component
this.selectKit.options.filterComponent
selectKit=this.selectKit
id=(concat this.selectKit.uniqueID "-filter")
}}
@@ -21,7 +26,8 @@
</span>
{{else}}
{{#each this.collections as |collection|}}
{{component (component-for-collection collection.identifier this.selectKit)
{{component
(component-for-collection collection.identifier this.selectKit)
collection=collection
selectKit=this.selectKit
value=this.value
@@ -41,4 +47,4 @@
{{/if}}
{{/if}}
</SelectKit::SelectKitBody>
{{/unless}}
{{/unless}}

View File

@@ -1 +1 @@
{{discourse-tag this.rowValue count=this.item.count noHref=true}}
{{discourse-tag this.rowValue count=this.item.count noHref=true}}

View File

@@ -2,4 +2,4 @@
<div class="more-tags">
{{i18n "select_kit.components.tag_drop.filter_for_more"}}
</div>
{{/if}}
{{/if}}

View File

@@ -1,5 +1,6 @@
<div class="select-kit-header-wrapper">
{{component this.selectKit.options.selectedNameComponent
{{component
this.selectKit.options.selectedNameComponent
tabindex=this.tabindex
item=this.selectedContent
selectKit=this.selectKit
@@ -7,4 +8,4 @@
}}
{{d-icon this.caretIcon class="caret-icon"}}
</div>
</div>

View File

@@ -1,4 +1 @@
{{discourse-tag this.rowValue
noHref=true
count=this.item.count
}}
{{discourse-tag this.rowValue noHref=true count=this.item.count}}

View File

@@ -1,18 +1,28 @@
{{#if this.appendReason}}
<p class="reason">
<TopicNotificationsOptions @value={{this.notificationLevel}} @topic={{this.topic}} @onChange={{action "changeTopicNotificationLevel"}} @options={{hash
<TopicNotificationsOptions
@value={{this.notificationLevel}}
@topic={{this.topic}}
@onChange={{action "changeTopicNotificationLevel"}}
@options={{hash
icon=this.icon
showFullTitle=this.showFullTitle
showCaret=this.showCaret
headerAriaLabel=(i18n "topic.notifications.title")
}} />
}}
/>
<span class="text">{{html-safe this.notificationReasonText}}</span>
</p>
{{else}}
<TopicNotificationsOptions @value={{this.notificationLevel}} @topic={{this.topic}} @onChange={{action "changeTopicNotificationLevel"}} @options={{hash
<TopicNotificationsOptions
@value={{this.notificationLevel}}
@topic={{this.topic}}
@onChange={{action "changeTopicNotificationLevel"}}
@options={{hash
icon=this.icon
showFullTitle=this.showFullTitle
showCaret=this.showCaret
headerAriaLabel=(i18n "topic.notifications.title")
}} />
{{/if}}
}}
/>
{{/if}}

View File

@@ -1,9 +1,10 @@
<TopicStatus @topic={{this.item}} @disableActions={{true}} />
<div class="topic-title">{{replace-emoji this.item.fancy_title}}</div>
<div class="topic-categories">
{{bound-category-link this.item.category
{{bound-category-link
this.item.category
recursive=true
hideParent=true
link=false
}}
</div>
</div>

View File

@@ -4,4 +4,4 @@
{{#if this.item.name}}
<span class="name">{{this.item.name}}</span>
{{/if}}
{{/if}}