From d4d88030de84ff8624a121e9b54e7146e1344e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 2 Jan 2023 21:33:35 +0100 Subject: [PATCH] implementation of consumeAllContext from umb ele --- .../modal/layouts/modal-layout-current-user.element.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/core/services/modal/layouts/modal-layout-current-user.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/core/services/modal/layouts/modal-layout-current-user.element.ts index 499554a617..2a12d4792f 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/core/services/modal/layouts/modal-layout-current-user.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/core/services/modal/layouts/modal-layout-current-user.element.ts @@ -1,11 +1,9 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; -import { css, CSSResultGroup, html, LitElement, nothing } from 'lit'; +import { css, CSSResultGroup, html, nothing } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; import { UmbModalHandler, UmbModalService } from '..'; import { umbCurrentUserService } from 'src/auth/current-user/current-user.service'; import type { ManifestExternalLoginProvider, ManifestUserDashboard, UserDetails } from '@umbraco-cms/models'; -import { UmbObserverMixin } from '@umbraco-cms/observable-api'; -import { UmbContextConsumerMixin } from '@umbraco-cms/context-api'; import { umbExtensionsRegistry } from '@umbraco-cms/extensions-registry'; import '../../../../../auth/external-login-providers/external-login-provider-extension.element'; import '../../../../../auth/current-user/user-dashboards/user-dashboard-extension.element'; @@ -13,9 +11,10 @@ import { UmbCurrentUserHistoryStore, UmbCurrentUserHistoryItem, } from 'src/auth/current-user/current-user-history.store'; +import { UmbLitElement } from 'src/core/element/lit-element.element'; @customElement('umb-modal-layout-current-user') -export class UmbModalLayoutCurrentUserElement extends UmbContextConsumerMixin(UmbObserverMixin(LitElement)) { +export class UmbModalLayoutCurrentUserElement extends UmbLitElement { static styles: CSSResultGroup = [ UUITextStyles, css` @@ -102,6 +101,7 @@ export class UmbModalLayoutCurrentUserElement extends UmbContextConsumerMixin(Um constructor() { super(); + this.consumeAllContexts(['umbModalService', 'umbCurrentUserHistoryStore'], (instances) => { this._modalService = instances['umbModalService']; this._currentUserHistoryStore = instances['umbCurrentUserHistoryStore'];