ember-cli-notifications
ember-cli-notifications copied to clipboard
Fallback behaviours has been deprecated, using `this`
Hi, after upgrading ember, ECN shows deprecation warning with the latest 7.0 package.
this reference needs to be appended into templates of node module

This should be fixed by 7.0.0
It's not ;)
{{! template-lint-disable no-action no-curly-component-invocation no-implicit-this no-invalid-interactive no-triple-curlies }}
<div
class="c-notification {{this.dismissClass}} {{this.clickableClass}} {{this.processedType}} {{this.notification.cssClasses}}"
data-test-notification-message={{notification.type}}
{{on "mouseenter" (action "handleMouseEnter")}}
{{on "mouseleave" (action "handleMouseLeave")}}
>
<div class="c-notification__icon">
{{#if this.notificationSVGPath}}
<svg class="c-notification__svg" fill="#FFFFFF" viewBox="0 0 24 24" height="48" width="48" xmlns="http://www.w3.org/2000/svg">
<path d={{this.notificationSVGPath}}></path>
</svg>
{{/if}}
</div>
<div class="c-notification__content" {{action "handleOnClick"}}>
{{#if notification.htmlContent}}
{{{notification.message}}}
{{else}}
{{notification.message}}
{{/if}}
<div class="c-notification__close" {{action "removeNotification" bubbles=false}} title="Dismiss this notification">
<svg class="c-notification__svg" name="close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" width="1024" height="1024" fill="#FFF"><path d="M21.734 19.64l-2.097 2.094a.983.983 0 0 1-1.395 0L13 16.496l-5.238 5.238a.988.988 0 0 1-1.399 0l-2.097-2.093a.988.988 0 0 1 0-1.399L9.504 13 4.266 7.762a.995.995 0 0 1 0-1.399l2.097-2.097a.988.988 0 0 1 1.399 0L13 9.508l5.242-5.242a.983.983 0 0 1 1.395 0l2.097 2.093a.996.996 0 0 1 .004 1.403L16.496 13l5.238 5.242a.988.988 0 0 1 0 1.399z"/></svg>
</div>
</div>
{{#if notification.autoClear}}
<div class="c-notification__countdown" style={{this.notificationClearDuration}}></div>
{{/if}}
</div>
I believe this is fixed in 8.x (i.e. #314 listed in https://github.com/mansona/ember-cli-notifications/blob/master/CHANGELOG.md#800--2022-01-28)