fix imports

This commit is contained in:
Mads Rasmussen
2023-11-16 18:56:19 +01:00
parent 5a73b226f9
commit d035b61d1a
3 changed files with 22 additions and 29 deletions

View File

@@ -1,10 +1,10 @@
import {
PARTIAL_VIEW_ENTITY_TYPE,
PARTIAL_VIEW_FOLDER_EMPTY_ENTITY_TYPE,
PARTIAL_VIEW_FOLDER_ENTITY_TYPE,
PARTIAL_VIEW_REPOSITORY_ALIAS,
PARTIAL_VIEW_ROOT_ENTITY_TYPE,
} from '../config.js';
UMB_PARTIAL_VIEW_ENTITY_TYPE,
UMB_PARTIAL_VIEW_FOLDER_EMPTY_ENTITY_TYPE,
UMB_PARTIAL_VIEW_FOLDER_ENTITY_TYPE,
UMB_PARTIAL_VIEW_REPOSITORY_ALIAS,
UMB_PARTIAL_VIEW_ROOT_ENTITY_TYPE,
} from '../entity.js';
import { UmbCreateFromSnippetPartialViewAction } from './create/create-from-snippet.action.js';
import { UmbCreateEmptyPartialViewAction } from './create/create-empty.action.js';
import {
@@ -26,8 +26,8 @@ const partialViewActions: Array<ManifestEntityAction> = [
meta: {
icon: 'icon-trash',
label: 'Delete',
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [PARTIAL_VIEW_ENTITY_TYPE],
repositoryAlias: UMB_PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [UMB_PARTIAL_VIEW_ENTITY_TYPE],
},
},
];
@@ -43,8 +43,8 @@ const partialViewFolderActions: Array<ManifestEntityAction> = [
meta: {
icon: 'icon-article',
label: 'New empty partial view',
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [PARTIAL_VIEW_FOLDER_ENTITY_TYPE, PARTIAL_VIEW_ROOT_ENTITY_TYPE],
repositoryAlias: UMB_PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [UMB_PARTIAL_VIEW_FOLDER_ENTITY_TYPE, UMB_PARTIAL_VIEW_ROOT_ENTITY_TYPE],
},
},
{
@@ -55,8 +55,8 @@ const partialViewFolderActions: Array<ManifestEntityAction> = [
meta: {
icon: 'icon-article',
label: 'New partial view from snippet...',
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [PARTIAL_VIEW_FOLDER_ENTITY_TYPE, PARTIAL_VIEW_ROOT_ENTITY_TYPE],
repositoryAlias: UMB_PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [UMB_PARTIAL_VIEW_FOLDER_ENTITY_TYPE, UMB_PARTIAL_VIEW_ROOT_ENTITY_TYPE],
},
},
{
@@ -67,8 +67,8 @@ const partialViewFolderActions: Array<ManifestEntityAction> = [
meta: {
icon: 'icon-trash',
label: 'Remove folder',
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [PARTIAL_VIEW_FOLDER_EMPTY_ENTITY_TYPE],
repositoryAlias: UMB_PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [UMB_PARTIAL_VIEW_FOLDER_EMPTY_ENTITY_TYPE],
},
},
{
@@ -79,11 +79,11 @@ const partialViewFolderActions: Array<ManifestEntityAction> = [
meta: {
icon: 'icon-add',
label: 'Create folder',
repositoryAlias: PARTIAL_VIEW_REPOSITORY_ALIAS,
repositoryAlias: UMB_PARTIAL_VIEW_REPOSITORY_ALIAS,
entityTypes: [
PARTIAL_VIEW_FOLDER_EMPTY_ENTITY_TYPE,
PARTIAL_VIEW_FOLDER_ENTITY_TYPE,
PARTIAL_VIEW_ROOT_ENTITY_TYPE,
UMB_PARTIAL_VIEW_FOLDER_EMPTY_ENTITY_TYPE,
UMB_PARTIAL_VIEW_FOLDER_ENTITY_TYPE,
UMB_PARTIAL_VIEW_ROOT_ENTITY_TYPE,
],
},
},

View File

@@ -1,4 +1,3 @@
import { UMB_PARTIAL_VIEW_STORE_CONTEXT_TOKEN_ALIAS } from '../config.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api';
import { UmbStoreBase } from '@umbraco-cms/backoffice/store';
@@ -18,11 +17,7 @@ export class UmbPartialViewStore extends UmbStoreBase {
* @memberof UmbPartialViewStore
*/
constructor(host: UmbControllerHostElement) {
super(
host,
UMB_PARTIAL_VIEWS_STORE_CONTEXT_TOKEN.toString(),
new UmbArrayState<TemplateResponseModel>([], (x) => x.id),
);
super(host, UMB_PARTIAL_VIEWS_STORE_CONTEXT.toString(), new UmbArrayState<TemplateResponseModel>([], (x) => x.id));
}
/**
@@ -44,6 +39,4 @@ export class UmbPartialViewStore extends UmbStoreBase {
}
}
export const UMB_PARTIAL_VIEWS_STORE_CONTEXT_TOKEN = new UmbContextToken<UmbPartialViewStore>(
UMB_PARTIAL_VIEW_STORE_CONTEXT_TOKEN_ALIAS,
);
export const UMB_PARTIAL_VIEWS_STORE_CONTEXT = new UmbContextToken<UmbPartialViewStore>('UmbPartialViewStore');

View File

@@ -1,5 +1,5 @@
import { UmbPartialViewRepository } from '../repository/partial-view.repository.js';
import { PartialViewDetails } from '../config.js';
import { UmbPartialViewDetailModel } from '../types.js';
import { UmbBooleanState, UmbDeepState } from '@umbraco-cms/backoffice/observable-api';
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
import { UmbSaveableWorkspaceContextInterface, UmbWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
@@ -8,7 +8,7 @@ import { UpdatePartialViewRequestModel } from '@umbraco-cms/backoffice/backend-a
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
export class UmbPartialViewWorkspaceContext
extends UmbWorkspaceContext<UmbPartialViewRepository, PartialViewDetails>
extends UmbWorkspaceContext<UmbPartialViewRepository, UmbPartialViewDetailModel>
implements UmbSaveableWorkspaceContextInterface
{
getEntityId(): string | undefined {