Skip to content

Commit

Permalink
dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
nielslyngsoe committed Dec 3, 2024
1 parent a436d3f commit 9cd4c86
Show file tree
Hide file tree
Showing 26 changed files with 52 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const UMB_DICTIONARY_COLLECTION_ALIAS = 'Umb.Collection.Dictionary';
export * from './repository/constants.js';
export * from './views/constants.js';
10 changes: 10 additions & 0 deletions src/Umbraco.Web.UI.Client/src/packages/dictionary/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export * from './collection/constants.js';
export * from './dashboard/constants.js';
export * from './entity-action/constants.js';
export * from './modals/constants.js';
export * from './repository/constants.js';
export * from './search/constants.js';
export * from './tree/constants.js';
export * from './workspace/constants.js';

export { UMB_DICTIONARY_ROOT_ENTITY_TYPE, UMB_DICTIONARY_ENTITY_TYPE } from './entity.js';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './paths.js';
export * from './constants.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { UMB_EXPORT_DICTIONARY_MODAL } from './export/export-dictionary-modal.token.js';
export { UMB_IMPORT_DICTIONARY_MODAL } from './import/import-dictionary-modal.token.js';
export * from './move-to/constants.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './repository/constants.js';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { UmbMoveDictionaryRepository, UMB_MOVE_DICTIONARY_REPOSITORY_ALIAS } from './repository/index.js';
export { UmbMoveDictionaryRepository } from './repository/index.js';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UMB_DICTIONARY_ENTITY_TYPE } from '../../entity.js';
import { UMB_DICTIONARY_TREE_ALIAS, UMB_DICTIONARY_TREE_REPOSITORY_ALIAS } from '../../tree/index.js';
import { UMB_MOVE_DICTIONARY_REPOSITORY_ALIAS } from './repository/index.js';
import { UMB_MOVE_DICTIONARY_REPOSITORY_ALIAS } from './constants.js';
import { manifests as repositoryManifests } from './repository/manifests.js';

export const manifests: Array<UmbExtensionManifest> = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { UmbMoveDictionaryRepository } from './dictionary-move.repository.js';
export { UMB_MOVE_DICTIONARY_REPOSITORY_ALIAS } from './constants.js';
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI.Client/src/packages/dictionary/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './constants.js';
export * from './repository/index.js';
export * from './tree/index.js';
export * from './modals/dictionary-picker-modal.token.js';
export * from './entity.js';
export * from './components/index.js';
export * from './workspace/paths.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { UMB_DICTIONARY_PICKER_MODAL } from './dictionary-picker-modal.token.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './detail/constants.js';
export * from './export/constants.js';
export * from './import/constants.js';
export * from './item/constants.js';
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export const UMB_DICTIONARY_DETAIL_REPOSITORY_ALIAS = 'Umb.Repository.Dictionary.Detail';
export const UMB_DICTIONARY_DETAIL_STORE_ALIAS = 'Umb.Store.Dictionary.Detail';
export { UMB_DICTIONARY_DETAIL_STORE_CONTEXT } from './dictionary-detail.store.context-token.js';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { UmbDictionaryDetailModel } from '../../types.js';
import { UmbDictionaryServerDataSource } from './dictionary-detail.server.data-source.js';
import { UMB_DICTIONARY_DETAIL_STORE_CONTEXT } from './dictionary-detail.store.js';
import { UMB_DICTIONARY_DETAIL_STORE_CONTEXT } from './dictionary-detail.store.context-token.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbDetailRepositoryBase } from '@umbraco-cms/backoffice/repository';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { UmbDictionaryDetailStore } from './dictionary-detail.store.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';

export const UMB_DICTIONARY_DETAIL_STORE_CONTEXT = new UmbContextToken<UmbDictionaryDetailStore>(
'UmbDictionaryDetailStore',
);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { UmbDictionaryDetailModel } from '../../types.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UMB_DICTIONARY_DETAIL_STORE_CONTEXT } from './dictionary-detail.store.context-token.js';
import { UmbDetailStoreBase } from '@umbraco-cms/backoffice/store';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';

Expand All @@ -19,8 +19,4 @@ export class UmbDictionaryDetailStore extends UmbDetailStoreBase<UmbDictionaryDe
}
}

export const UMB_DICTIONARY_DETAIL_STORE_CONTEXT = new UmbContextToken<UmbDictionaryDetailStore>(
'UmbDictionaryDetailStore',
);

export { UmbDictionaryDetailStore as api };
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export const UMB_DICTIONARY_ITEM_REPOSITORY_ALIAS = 'Umb.Repository.Dictionary.Item';
export const UMB_DICTIONARY_STORE_ALIAS = 'Umb.Store.Dictionary.Item';
export { UMB_DICTIONARY_ITEM_STORE_CONTEXT } from './dictionary-item.store.context-token.js';
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UmbDictionaryItemServerDataSource } from './dictionary-item.server.data-source.js';
import { UMB_DICTIONARY_ITEM_STORE_CONTEXT } from './dictionary-item.store.js';
import { UMB_DICTIONARY_ITEM_STORE_CONTEXT } from './dictionary-item.store.context-token.js';
import type { UmbDictionaryItemModel } from './types.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbItemRepositoryBase } from '@umbraco-cms/backoffice/repository';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import type { UmbDictionaryItemStore } from './dictionary-item.store.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';

export const UMB_DICTIONARY_ITEM_STORE_CONTEXT = new UmbContextToken<UmbDictionaryItemStore>('UmbDictionaryItemStore');
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { UmbDictionaryItemModel } from './types.js';
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
import { UMB_DICTIONARY_ITEM_STORE_CONTEXT } from './dictionary-item.store.context-token.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbItemStoreBase } from '@umbraco-cms/backoffice/store';

Expand All @@ -20,6 +20,4 @@ export class UmbDictionaryItemStore extends UmbItemStoreBase<UmbDictionaryItemMo
}
}

export const UMB_DICTIONARY_ITEM_STORE_CONTEXT = new UmbContextToken<UmbDictionaryItemStore>('UmbDictionaryItemStore');

export { UmbDictionaryItemStore as api };
2 changes: 2 additions & 0 deletions src/Umbraco.Web.UI.Client/src/packages/dictionary/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { UmbDictionaryEntityType } from '../dictionary/entity.js';

export type * from './entity.js';

export interface UmbDictionaryDetailModel {
entityType: UmbDictionaryEntityType;
unique: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const UMB_DICTIONARY_WORKSPACE_ALIAS = 'Umb.Workspace.Dictionary';
export { UMB_DICTIONARY_WORKSPACE_CONTEXT } from './dictionary-workspace.context-token.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { UmbDictionaryDetailModel } from '../types.js';
import { UMB_DICTIONARY_DETAIL_REPOSITORY_ALIAS, type UmbDictionaryDetailRepository } from '../repository/index.js';
import { UMB_DICTIONARY_ENTITY_TYPE } from '../entity.js';
import { UmbDictionaryWorkspaceEditorElement } from './dictionary-workspace-editor.element.js';
import { UMB_DICTIONARY_WORKSPACE_ALIAS } from './manifests.js';
import { UMB_DICTIONARY_WORKSPACE_ALIAS } from './constants.js';
import {
type UmbSubmittableWorkspaceContext,
UmbWorkspaceIsNewRedirectController,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { UMB_DICTIONARY_ENTITY_TYPE } from '../entity.js';
import { UMB_DICTIONARY_WORKSPACE_ALIAS } from './constants.js';
import { UMB_WORKSPACE_CONDITION_ALIAS, UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace';

export const UMB_DICTIONARY_WORKSPACE_ALIAS = 'Umb.Workspace.Dictionary';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'workspace',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE } from '../../entity.js';
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS } from './repository/index.js';
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS } from './constants.js';
import { manifests as repositoryManifests } from './repository/manifests.js';
import { manifests as workspaceManifests } from './workspace/manifests.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE } from '../../../entity.js';
import {
UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS,
type UmbDocumentBlueprintFolderRepository,
} from '../repository/index.js';
import type { UmbDocumentBlueprintFolderRepository } from '../repository/index.js';
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS } from '../constants.js';
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_WORKSPACE_ALIAS } from './constants.js';
import { UmbDocumentBlueprintFolderWorkspaceEditorElement } from './document-blueprint-folder-editor.element.js';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
Expand Down Expand Up @@ -41,17 +39,15 @@ export class UmbDocumentBlueprintFolderWorkspaceContext

/**
* @description Set the name of the document blueprint folder
* @param {string} value
* @memberof UmbDocumentBlueprintFolderWorkspaceContext
* @param {string} value - The name of the document blueprint folder
*/
public setName(value: string) {
this._data.updateCurrent({ name: value });
}

/**
* @description Get the name of the document blueprint folder
* @returns {string}
* @memberof UmbDocumentBlueprintFolderWorkspaceContext
* @returns {string} The name of the document blueprint folder
*/
public getName() {
return this._data.getCurrent()?.name;
Expand Down

0 comments on commit 9cd4c86

Please sign in to comment.