register member type stores
This commit is contained in:
@@ -15,8 +15,6 @@ import {
|
||||
UmbBackofficeContext,
|
||||
UMB_BACKOFFICE_CONTEXT_TOKEN,
|
||||
} from './shared/components/backoffice-frame/backoffice.context';
|
||||
import { UmbMemberTypeDetailStore } from './members/member-types/repository/member-type.detail.store';
|
||||
import { UmbMemberTypeTreeStore } from './members/member-types/repository/member-type.tree.store';
|
||||
import { UmbMemberDetailStore } from './members/members/member.detail.store';
|
||||
import { UmbMemberTreeStore } from './members/members/repository/member.tree.store';
|
||||
import { UmbDictionaryDetailStore } from './translation/dictionary/repository/dictionary.detail.store';
|
||||
@@ -82,8 +80,6 @@ export class UmbBackofficeElement extends UmbLitElement {
|
||||
new UmbDataTypeStore(this);
|
||||
new UmbDataTypeTreeStore(this);
|
||||
new UmbUserStore(this);
|
||||
new UmbMemberTypeDetailStore(this);
|
||||
new UmbMemberTypeTreeStore(this);
|
||||
new UmbUserGroupStore(this);
|
||||
new UmbMemberDetailStore(this);
|
||||
new UmbMemberTreeStore(this);
|
||||
|
||||
@@ -14,7 +14,7 @@ const repository: ManifestRepository = {
|
||||
};
|
||||
|
||||
export const MEMBER_GROUP_STORE_ALIAS = 'Umb.Store.MemberGroup';
|
||||
export const MEMBER_GROUP_TREE_STORE_ALIAS = 'Umb.Store.MediaGroupTree';
|
||||
export const MEMBER_GROUP_TREE_STORE_ALIAS = 'Umb.Store.MemberGroupTree';
|
||||
|
||||
const store: ManifestStore = {
|
||||
type: 'store',
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { UmbMemberTypeRepository } from './member-type.repository';
|
||||
import { ManifestRepository } from 'libs/extensions-registry/repository.models';
|
||||
import { UmbMemberTypeStore } from './member-type.store';
|
||||
import { UmbMemberTypeTreeStore } from './member-type.tree.store';
|
||||
import type { ManifestRepository, ManifestStore, ManifestTreeStore } from '@umbraco-cms/extensions-registry';
|
||||
|
||||
export const MEMBER_TYPES_REPOSITORY_ALIAS = 'Umb.Repository.MemberTypes';
|
||||
|
||||
@@ -10,4 +12,21 @@ const repository: ManifestRepository = {
|
||||
class: UmbMemberTypeRepository,
|
||||
};
|
||||
|
||||
export const manifests = [repository];
|
||||
export const MEMBER_TYPE_STORE_ALIAS = 'Umb.Store.MemberType';
|
||||
export const MEMBER_TYPE_TREE_STORE_ALIAS = 'Umb.Store.MemberTypeTree';
|
||||
|
||||
const store: ManifestStore = {
|
||||
type: 'store',
|
||||
alias: MEMBER_TYPE_STORE_ALIAS,
|
||||
name: 'Member Type Store',
|
||||
class: UmbMemberTypeStore,
|
||||
};
|
||||
|
||||
const treeStore: ManifestTreeStore = {
|
||||
type: 'treeStore',
|
||||
alias: MEMBER_TYPE_TREE_STORE_ALIAS,
|
||||
name: 'Member Type Tree Store',
|
||||
class: UmbMemberTypeTreeStore,
|
||||
};
|
||||
|
||||
export const manifests = [store, treeStore, repository];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { MemberTypeTreeServerDataSource } from './sources/member-type.tree.server.data';
|
||||
import { UmbMemberTypeTreeStore, UMB_MEMBER_TYPE_TREE_STORE_CONTEXT_TOKEN } from './member-type.tree.store';
|
||||
import { UmbMemberTypeDetailStore, UMB_MEMBER_TYPE_DETAIL_STORE_CONTEXT_TOKEN } from './member-type.detail.store';
|
||||
import { UmbMemberTypeStore, UMB_MEMBER_TYPE_DETAIL_STORE_CONTEXT_TOKEN } from './member-type.store';
|
||||
import { UmbMemberTypeDetailServerDataSource } from './sources/member-type.detail.server.data';
|
||||
import { UmbControllerHostInterface } from '@umbraco-cms/controller';
|
||||
import { UmbContextConsumerController } from '@umbraco-cms/context-api';
|
||||
@@ -21,7 +21,7 @@ export class UmbMemberTypeRepository implements UmbTreeRepository, UmbDetailRepo
|
||||
#treeStore?: UmbMemberTypeTreeStore;
|
||||
|
||||
#detailSource: UmbMemberTypeDetailServerDataSource;
|
||||
#detailStore?: UmbMemberTypeDetailStore;
|
||||
#detailStore?: UmbMemberTypeStore;
|
||||
|
||||
#notificationContext?: UmbNotificationContext;
|
||||
|
||||
|
||||
@@ -6,17 +6,15 @@ import type { MemberTypeDetails } from '@umbraco-cms/models';
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @class UmbMemberTypeDetailStore
|
||||
* @class UmbMemberTypeStore
|
||||
* @extends {UmbStoreBase}
|
||||
* @description - Details Data Store for Member Types
|
||||
* @description - Data Store for Member Types
|
||||
*/
|
||||
export class UmbMemberTypeDetailStore
|
||||
extends UmbStoreBase
|
||||
{
|
||||
export class UmbMemberTypeStore extends UmbStoreBase {
|
||||
#data = new ArrayState<MemberTypeDetails>([], (x) => x.key);
|
||||
|
||||
constructor(host: UmbControllerHostInterface) {
|
||||
super(host, UmbMemberTypeDetailStore.name);
|
||||
super(host, UmbMemberTypeStore.name);
|
||||
}
|
||||
|
||||
append(MemberType: MemberTypeDetails) {
|
||||
@@ -25,9 +23,9 @@ export class UmbMemberTypeDetailStore
|
||||
|
||||
remove(uniques: string[]) {
|
||||
this.#data.remove(uniques);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const UMB_MEMBER_TYPE_DETAIL_STORE_CONTEXT_TOKEN = new UmbContextToken<UmbMemberTypeDetailStore>(
|
||||
UmbMemberTypeDetailStore.name
|
||||
);
|
||||
export const UMB_MEMBER_TYPE_DETAIL_STORE_CONTEXT_TOKEN = new UmbContextToken<UmbMemberTypeStore>(
|
||||
UmbMemberTypeStore.name
|
||||
);
|
||||
@@ -9,7 +9,6 @@ import type { UmbControllerHostInterface } from '@umbraco-cms/controller';
|
||||
* @description - Tree Data Store for Member Types
|
||||
*/
|
||||
export class UmbMemberTypeTreeStore extends UmbTreeStoreBase {
|
||||
|
||||
constructor(host: UmbControllerHostInterface) {
|
||||
super(host, UMB_MEMBER_TYPE_TREE_STORE_CONTEXT_TOKEN.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user