add reload tree item children to dictionary tree

This commit is contained in:
Mads Rasmussen
2024-01-24 19:24:20 +01:00
parent e5e4ba2034
commit be4a284448
10 changed files with 34 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
import { manifests as folderManifests } from './folder/manifests.js';
import { manifests as reloadManifests } from './reload-tree-item/manifests.js';
import { manifests as reloadManifests } from './reload-tree-item-children/manifests.js';
import { UmbDataTypeTreeRepository } from './data-type-tree.repository.js';
import { UmbDataTypeTreeStore } from './data-type-tree.store.js';
import type {

View File

@@ -12,7 +12,7 @@ export const manifests: Array<ManifestEntityAction> = [
type: 'entityAction',
alias: 'Umb.EntityAction.DataType.Tree.ReloadTreeItemChildren',
name: 'Reload Data Type Tree Item Children Entity Action',
weight: 900,
weight: 10,
api: UmbReloadTreeItemChildrenEntityAction,
meta: {
icon: 'icon-refresh',

View File

@@ -1,2 +0,0 @@
export const UMB_DICTIONARY_ROOT_ENTITY_TYPE = 'dictionary-root';
export const UMB_DICTIONARY_ENTITY_TYPE = 'dictionary-item';

View File

@@ -1,5 +1,5 @@
import { UMB_DICTIONARY_REPOSITORY_ALIAS } from '../repository/manifests.js';
import { UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entities.js';
import { UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entity.js';
import UmbReloadDictionaryEntityAction from './reload.action.js';
import UmbImportDictionaryEntityAction from './import/import.action.js';
import UmbExportDictionaryEntityAction from './export/export.action.js';

View File

@@ -0,0 +1,5 @@
export const UMB_DICTIONARY_ROOT_ENTITY_TYPE = 'dictionary-root';
export const UMB_DICTIONARY_ENTITY_TYPE = 'dictionary-item';
export type UmbDictionaryEntityType = typeof UMB_DICTIONARY_ENTITY_TYPE;
export type UmbDictionaryRootEntityType = typeof UMB_DICTIONARY_ROOT_ENTITY_TYPE;

View File

@@ -1,4 +1,4 @@
import { UMB_DICTIONARY_ENTITY_TYPE } from '../entities.js';
import { UMB_DICTIONARY_ENTITY_TYPE } from '../entity.js';
import { UMB_DICTIONARY_TREE_ALIAS } from '../tree/index.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';

View File

@@ -1,4 +1,4 @@
import { UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entities.js';
import { UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entity.js';
import { UmbDictionaryTreeServerDataSource } from './dictionary-tree.server.data-source.js';
import { UmbDictionaryTreeItemModel, UmbDictionaryTreeRootModel } from './types.js';
import { UMB_DICTIONARY_TREE_STORE_CONTEXT } from './dictionary-tree.store.js';

View File

@@ -1,6 +1,7 @@
import { UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entities.js';
import { UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entity.js';
import { UmbDictionaryTreeRepository } from './dictionary-tree.repository.js';
import { UmbDictionaryTreeStore } from './dictionary-tree.store.js';
import { manifests as reloadTreeItemChildrenManifests } from './reload-tree-item-children/manifests.js';
import type {
ManifestRepository,
ManifestTree,
@@ -45,4 +46,4 @@ const treeItem: ManifestTreeItem = {
},
};
export const manifests = [treeRepository, treeStore, tree, treeItem];
export const manifests = [treeRepository, treeStore, tree, treeItem, ...reloadTreeItemChildrenManifests];

View File

@@ -0,0 +1,20 @@
import { UMB_DICTIONARY_ROOT_ENTITY_TYPE, UMB_DICTIONARY_ENTITY_TYPE } from '../../entity.js';
import { UMB_DICTIONARY_REPOSITORY_ALIAS } from '../../repository/manifests.js';
import { UmbReloadTreeItemChildrenEntityAction } from '@umbraco-cms/backoffice/tree';
import { type ManifestEntityAction } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestEntityAction> = [
{
type: 'entityAction',
alias: 'Umb.EntityAction.Dictionary.Tree.ReloadTreeItemChildren',
name: 'Reload Dictionary Tree Item Children Entity Action',
weight: 10,
api: UmbReloadTreeItemChildrenEntityAction,
meta: {
icon: 'icon-refresh',
label: 'Reload children...',
repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS,
entityTypes: [UMB_DICTIONARY_ROOT_ENTITY_TYPE, UMB_DICTIONARY_ENTITY_TYPE],
},
},
];

View File

@@ -1,4 +1,4 @@
import { UMB_DICTIONARY_ROOT_ENTITY_TYPE } from './dictionary/entities.js';
import { UMB_DICTIONARY_ROOT_ENTITY_TYPE } from './dictionary/entity.js';
import type { ManifestDashboard, ManifestSection, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
const sectionAlias = 'Umb.Section.Dictionary';