-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Member Type Root Collection View / Workspace #19271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
madsrasmussen
merged 3 commits into
main
from
v16/feature/member-type-root-collection-view
May 8, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/Umbraco.Web.UI.Client/src/packages/members/member-type/constants.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Umbraco.Web.UI.Client/src/packages/members/member-type/entity-actions/manifests.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Umbraco.Web.UI.Client/src/packages/members/member-type/entity.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| export const UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE = 'member-type-root'; | ||
| export const UMB_MEMBER_TYPE_ENTITY_TYPE = 'member-type'; | ||
| export const UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE = 'member-type-root'; | ||
|
|
||
| export type UmbMemberTypeEntityType = typeof UMB_MEMBER_TYPE_ENTITY_TYPE; | ||
| export type UmbMemberTypeRootEntityType = typeof UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/Umbraco.Web.UI.Client/src/packages/members/member-type/manifests.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/Umbraco.Web.UI.Client/src/packages/members/member-type/member-type-root/constants.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export const UMB_MEMBER_TYPE_ROOT_WORKSPACE_ALIAS = 'Umb.Workspace.MemberType.Root'; |
1 change: 1 addition & 0 deletions
1
src/Umbraco.Web.UI.Client/src/packages/members/member-type/member-type-root/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './constants.js'; |
14 changes: 14 additions & 0 deletions
14
src/Umbraco.Web.UI.Client/src/packages/members/member-type/member-type-root/manifests.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE } from '../entity.js'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'workspace', | ||
| kind: 'default', | ||
| alias: 'Umb.Workspace.MemberType.Root', | ||
| name: 'Member Type Root Workspace', | ||
| meta: { | ||
| entityType: UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE, | ||
| headline: '#treeHeaders_memberTypes', | ||
| }, | ||
| }, | ||
| ]; |
3 changes: 3 additions & 0 deletions
3
src/Umbraco.Web.UI.Client/src/packages/members/member-type/tree/constants.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| export const UMB_MEMBER_TYPE_TREE_REPOSITORY_ALIAS = 'Umb.Repository.MemberType.Tree'; | ||
| export const UMB_MEMBER_TYPE_TREE_STORE_ALIAS = 'Umb.Store.MemberType.Tree'; | ||
| export const UMB_MEMBER_TYPE_TREE_ALIAS = 'Umb.Tree.MemberType'; | ||
|
|
||
| export { UMB_MEMBER_TYPE_TREE_STORE_CONTEXT } from './member-type-tree.store.context-token.js'; | ||
|
|
||
| export * from './tree-item-children/constants.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...t/src/packages/members/member-type/tree/tree-item-children/collection/action/manifests.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS } from '../constants.js'; | ||
| import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'collectionAction', | ||
| kind: 'create', | ||
| alias: 'Umb.CollectionAction.MemberTypeTreeItemChildren.Create', | ||
| name: 'Member Type Tree Item Children Collection Create Action', | ||
| conditions: [ | ||
| { | ||
| alias: UMB_COLLECTION_ALIAS_CONDITION, | ||
| match: UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS, | ||
| }, | ||
| ], | ||
| }, | ||
| ]; |
2 changes: 2 additions & 0 deletions
2
...I.Client/src/packages/members/member-type/tree/tree-item-children/collection/constants.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export const UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS = 'Umb.Collection.MemberType.TreeItemChildren'; | ||
| export * from './repository/constants.js'; |
2 changes: 2 additions & 0 deletions
2
...eb.UI.Client/src/packages/members/member-type/tree/tree-item-children/collection/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export * from './constants.js'; | ||
| export * from './repository/index.js'; |
20 changes: 20 additions & 0 deletions
20
...I.Client/src/packages/members/member-type/tree/tree-item-children/collection/manifests.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { manifests as actionManifests } from './action/manifests.js'; | ||
| import { manifests as repositoryManifests } from './repository/manifests.js'; | ||
| import { manifests as viewManifests } from './views/manifests.js'; | ||
| import { UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS } from './constants.js'; | ||
| import { UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_REPOSITORY_ALIAS } from './repository/index.js'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'collection', | ||
| kind: 'default', | ||
| alias: UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS, | ||
| name: 'Member Type Tree Item Children Collection', | ||
| meta: { | ||
| repositoryAlias: UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_REPOSITORY_ALIAS, | ||
| }, | ||
| }, | ||
| ...actionManifests, | ||
| ...repositoryManifests, | ||
| ...viewManifests, | ||
| ]; |
2 changes: 2 additions & 0 deletions
2
...c/packages/members/member-type/tree/tree-item-children/collection/repository/constants.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export const UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_REPOSITORY_ALIAS = | ||
| 'Umb.Repository.MemberType.TreeItemChildrenCollection'; |
1 change: 1 addition & 0 deletions
1
...t/src/packages/members/member-type/tree/tree-item-children/collection/repository/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './constants.js'; |
10 changes: 10 additions & 0 deletions
10
...c/packages/members/member-type/tree/tree-item-children/collection/repository/manifests.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_REPOSITORY_ALIAS } from './constants.js'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'repository', | ||
| alias: UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_REPOSITORY_ALIAS, | ||
| name: 'Member Type Tree Item Children Collection Repository', | ||
| api: () => import('./member-type-tree-item-children-collection.repository.js'), | ||
| }, | ||
| ]; |
33 changes: 33 additions & 0 deletions
33
...em-children/collection/repository/member-type-tree-item-children-collection.repository.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import { UmbMemberTypeTreeRepository } from '../../../member-type-tree.repository.js'; | ||
| import type { UmbCollectionFilterModel, UmbCollectionRepository } from '@umbraco-cms/backoffice/collection'; | ||
| import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository'; | ||
| import { UMB_ENTITY_CONTEXT, type UmbEntityModel } from '@umbraco-cms/backoffice/entity'; | ||
|
|
||
| export class UmbMemberTypeTreeItemChildrenCollectionRepository | ||
| extends UmbRepositoryBase | ||
| implements UmbCollectionRepository | ||
| { | ||
| #treeRepository = new UmbMemberTypeTreeRepository(this); | ||
|
|
||
| async requestCollection(filter: UmbCollectionFilterModel) { | ||
| // TODO: get parent from args | ||
| const entityContext = await this.getContext(UMB_ENTITY_CONTEXT); | ||
| if (!entityContext) throw new Error('Entity context not found'); | ||
|
|
||
| const entityType = entityContext.getEntityType(); | ||
| const unique = entityContext.getUnique(); | ||
|
|
||
| if (!entityType) throw new Error('Entity type not found'); | ||
| if (unique === undefined) throw new Error('Unique not found'); | ||
|
|
||
| const parent: UmbEntityModel = { entityType, unique }; | ||
|
|
||
| if (parent.unique === null) { | ||
| return this.#treeRepository.requestTreeRootItems({ skip: filter.skip, take: filter.take }); | ||
| } else { | ||
| return this.#treeRepository.requestTreeItemsOf({ parent, skip: filter.skip, take: filter.take }); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| export { UmbMemberTypeTreeItemChildrenCollectionRepository as api }; | ||
6 changes: 6 additions & 0 deletions
6
...eb.UI.Client/src/packages/members/member-type/tree/tree-item-children/collection/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import type { UmbCollectionFilterModel } from '@umbraco-cms/backoffice/collection'; | ||
| import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity'; | ||
|
|
||
| export interface UmbMemberTypeTreeItemChildrenCollectionFilterModel extends UmbCollectionFilterModel { | ||
| parent: UmbEntityModel; | ||
| } |
23 changes: 23 additions & 0 deletions
23
...nt/src/packages/members/member-type/tree/tree-item-children/collection/views/manifests.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS } from '../constants.js'; | ||
| import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection'; | ||
|
|
||
| export const manifests: Array<UmbExtensionManifest> = [ | ||
| { | ||
| type: 'collectionView', | ||
| alias: 'Umb.CollectionView.MemberType.TreeItem.Table', | ||
| name: 'Member Type Tree Item Table Collection View', | ||
| element: () => import('./member-type-tree-item-table-collection-view.element.js'), | ||
| weight: 300, | ||
| meta: { | ||
| label: 'Table', | ||
| icon: 'icon-list', | ||
| pathName: 'table', | ||
| }, | ||
| conditions: [ | ||
| { | ||
| alias: UMB_COLLECTION_ALIAS_CONDITION, | ||
| match: UMB_MEMBER_TYPE_TREE_ITEM_CHILDREN_COLLECTION_ALIAS, | ||
| }, | ||
| ], | ||
| }, | ||
| ]; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.