remove entity model code duplication
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { UMB_DUPLICATE_TO_MODAL_ALIAS } from './constants.js';
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbDuplicateToModalData {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
export interface UmbDuplicateToModalData extends UmbEntityModel {
|
||||
treeAlias: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { UMB_SORT_CHILDREN_OF_MODAL_ALIAS } from './constants.js';
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbSortChildrenOfModalData {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
export interface UmbSortChildrenOfModalData extends UmbEntityModel {
|
||||
treeRepositoryAlias: string;
|
||||
sortChildrenOfRepositoryAlias: string;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { UmbControllerEvent } from '@umbraco-cms/backoffice/controller-api';
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
|
||||
export interface UmbEntityActionEventArgs {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
}
|
||||
export interface UmbEntityActionEventArgs extends UmbEntityModel {}
|
||||
|
||||
export class UmbEntityActionEvent extends UmbControllerEvent {
|
||||
#args: UmbEntityActionEventArgs;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface UmbEntityActionArgs<MetaArgsType> {
|
||||
entityType: string;
|
||||
unique: string | null;
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
|
||||
export interface UmbEntityActionArgs<MetaArgsType> extends UmbEntityModel {
|
||||
meta: MetaArgsType;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
export interface UmbStructureItemModelBase {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
}
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
|
||||
export interface UmbStructureItemModelBase extends UmbEntityModel {}
|
||||
|
||||
export interface UmbStructureItemModel extends UmbStructureItemModelBase {
|
||||
name: string;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import type { UmbPickerModalData, UmbPickerModalValue } from '@umbraco-cms/backoffice/modal';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
@@ -10,12 +11,7 @@ export interface UmbRestoreFromRecycleBinModalData {
|
||||
}
|
||||
|
||||
export interface UmbRestoreFromRecycleBinModalValue {
|
||||
destination:
|
||||
| {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
}
|
||||
| undefined;
|
||||
destination: UmbEntityModel | undefined;
|
||||
}
|
||||
|
||||
export const UMB_RESTORE_FROM_RECYCLE_BIN_MODAL = new UmbModalToken<
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
|
||||
export interface UmbTreeRootItemsRequestArgs {
|
||||
skip?: number;
|
||||
take?: number;
|
||||
}
|
||||
|
||||
export interface UmbTreeChildrenOfRequestArgs {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
skip?: number;
|
||||
take?: number;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
import type { UmbFolderModel } from '@umbraco-cms/backoffice/tree';
|
||||
|
||||
export interface UmbFolderCreateModalData {
|
||||
folderRepositoryAlias: string;
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export interface UmbFolderCreateModalValue {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbDataTypeCreateOptionsModalData {
|
||||
parent: {
|
||||
entityType: string;
|
||||
unique: string | null;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export const UMB_DATA_TYPE_CREATE_OPTIONS_MODAL = new UmbModalToken<UmbDataTypeCreateOptionsModalData>(
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbDocumentBlueprintOptionsCreateModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export interface UmbDocumentBlueprintOptionsCreateModalValue {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbDocumentTypeCreateOptionsModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export const UMB_DOCUMENT_TYPE_CREATE_OPTIONS_MODAL = new UmbModalToken<UmbDocumentTypeCreateOptionsModalData>(
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbDocumentCreateOptionsModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
documentType: {
|
||||
unique: string;
|
||||
} | null;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { UMB_DUPLICATE_DOCUMENT_MODAL_ALIAS } from './constants.js';
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbDuplicateDocumentModalData {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
}
|
||||
export interface UmbDuplicateDocumentModalData extends UmbEntityModel {}
|
||||
|
||||
export interface UmbDuplicateDocumentModalValue {
|
||||
destination: {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbMediaTypeCreateOptionsModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export const UMB_MEDIA_TYPE_CREATE_OPTIONS_MODAL = new UmbModalToken<UmbMediaTypeCreateOptionsModalData>(
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbMediaCreateOptionsModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
mediaType: {
|
||||
unique: string;
|
||||
} | null;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbPartialViewCreateOptionsModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export const UMB_PARTIAL_VIEW_CREATE_OPTIONS_MODAL = new UmbModalToken<UmbPartialViewCreateOptionsModalData>(
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbCreatePartialViewFromSnippetModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export const UMB_PARTIAL_VIEW_FROM_SNIPPET_MODAL = new UmbModalToken<UmbCreatePartialViewFromSnippetModalData, string>(
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbScriptCreateOptionsModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export const UMB_SCRIPT_CREATE_OPTIONS_MODAL = new UmbModalToken<UmbScriptCreateOptionsModalData>(
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
export interface UmbStylesheetCreateOptionsModalData {
|
||||
parent: {
|
||||
unique: string | null;
|
||||
entityType: string;
|
||||
};
|
||||
parent: UmbEntityModel;
|
||||
}
|
||||
|
||||
export const UMB_STYLESHEET_CREATE_OPTIONS_MODAL = new UmbModalToken<UmbStylesheetCreateOptionsModalData>(
|
||||
|
||||
Reference in New Issue
Block a user