From 83641a79c58f15331ba4a39b5875d4598e968565 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Thu, 16 May 2024 16:26:14 +0200 Subject: [PATCH] use specific user context token --- .../user/user/collection/user-collection-header.element.ts | 6 +++--- .../views/grid/user-grid-collection-view.element.ts | 6 +++--- .../views/table/user-table-collection-view.element.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/user-collection-header.element.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/user-collection-header.element.ts index c55d9b6352..54c55a01b6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/user-collection-header.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/user-collection-header.element.ts @@ -2,10 +2,10 @@ import type { UmbUserCollectionContext } from './user-collection.context.js'; import type { UmbUserOrderByOption } from './types.js'; import type { UmbUserStateFilterType } from './utils/index.js'; import { UmbUserStateFilter } from './utils/index.js'; +import { UMB_USER_COLLECTION_CONTEXT } from './user-collection.context-token.js'; import type { UUIBooleanInputEvent, UUICheckboxElement } from '@umbraco-cms/backoffice/external/uui'; import { css, html, customElement, state, repeat, ifDefined } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; -import { UMB_COLLECTION_CONTEXT } from '@umbraco-cms/backoffice/collection'; import type { UmbUserGroupDetailModel } from '@umbraco-cms/backoffice/user-group'; import { UmbUserGroupCollectionRepository } from '@umbraco-cms/backoffice/user-group'; import { observeMultiple } from '@umbraco-cms/backoffice/observable-api'; @@ -39,8 +39,8 @@ export class UmbUserCollectionHeaderElement extends UmbLitElement { constructor() { super(); - this.consumeContext(UMB_COLLECTION_CONTEXT, (instance) => { - this.#collectionContext = instance as UmbUserCollectionContext; + this.consumeContext(UMB_USER_COLLECTION_CONTEXT, (instance) => { + this.#collectionContext = instance; this.#observeOrderByOptions(); }); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/views/grid/user-grid-collection-view.element.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/views/grid/user-grid-collection-view.element.ts index eaa00e61ee..5451378b1c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/views/grid/user-grid-collection-view.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/views/grid/user-grid-collection-view.element.ts @@ -1,9 +1,9 @@ import { getDisplayStateFromUserStatus } from '../../../utils.js'; import type { UmbUserCollectionContext } from '../../user-collection.context.js'; import type { UmbUserDetailModel } from '../../../types.js'; +import { UMB_USER_COLLECTION_CONTEXT } from '../../user-collection.context-token.js'; import { css, html, nothing, customElement, state, repeat, ifDefined } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; -import { UMB_COLLECTION_CONTEXT } from '@umbraco-cms/backoffice/collection'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UserStateModel } from '@umbraco-cms/backoffice/external/backend-api'; import type { UmbUserGroupDetailModel } from '@umbraco-cms/backoffice/user-group'; @@ -29,8 +29,8 @@ export class UmbUserGridCollectionViewElement extends UmbLitElement { constructor() { super(); - this.consumeContext(UMB_COLLECTION_CONTEXT, (instance) => { - this.#collectionContext = instance as UmbUserCollectionContext; + this.consumeContext(UMB_USER_COLLECTION_CONTEXT, (instance) => { + this.#collectionContext = instance; this.observe( this.#collectionContext.selection.selection, (selection) => (this._selection = selection), diff --git a/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/views/table/user-table-collection-view.element.ts b/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/views/table/user-table-collection-view.element.ts index b2eab75172..db0ca43c0e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/views/table/user-table-collection-view.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/user/user/collection/views/table/user-table-collection-view.element.ts @@ -1,5 +1,6 @@ import type { UmbUserCollectionContext } from '../../user-collection.context.js'; import type { UmbUserDetailModel } from '../../../types.js'; +import { UMB_USER_COLLECTION_CONTEXT } from '../../user-collection.context-token.js'; import { css, html, customElement, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import type { @@ -11,7 +12,6 @@ import type { UmbTableConfig, UmbTableOrderedEvent, } from '@umbraco-cms/backoffice/components'; -import { UMB_COLLECTION_CONTEXT } from '@umbraco-cms/backoffice/collection'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { UmbUserGroupItemModel } from '@umbraco-cms/backoffice/user-group'; import { UmbUserGroupItemRepository } from '@umbraco-cms/backoffice/user-group'; @@ -68,8 +68,8 @@ export class UmbUserTableCollectionViewElement extends UmbLitElement { constructor() { super(); - this.consumeContext(UMB_COLLECTION_CONTEXT, (instance) => { - this.#collectionContext = instance as UmbUserCollectionContext; + this.consumeContext(UMB_USER_COLLECTION_CONTEXT, (instance) => { + this.#collectionContext = instance; this.observe( this.#collectionContext.selection.selection, (selection) => (this._selection = selection),