diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/file-system-tree.store.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/file-system-tree.store.ts deleted file mode 100644 index ae678e9464..0000000000 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/file-system-tree.store.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { UmbTreeStore } from './tree-store.interface.js'; -import type { UmbFileSystemTreeItemModel } from './types.js'; -import { UmbStoreBase } from '@umbraco-cms/backoffice/store'; -import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api'; -import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api'; - -/** - * @export - * @class UmbFileSystemTreeStore - * @extends {UmbStoreBase} - * @description - File System Tree Store - */ -export class UmbFileSystemTreeStore - extends UmbStoreBase - implements UmbTreeStore -{ - constructor(host: UmbControllerHostElement, storeAlias: string) { - super(host, storeAlias, new UmbArrayState([], (x) => x.path)); - } - - /** - * An observable to observe the root items - * @memberof UmbFileSystemTreeStore - */ - rootItems = this._data.asObservablePart((items) => items.filter((item) => item.path?.includes('/') === false)); - - /** - * Returns an observable to observe the children of a given parent - * @param {(string | null)} parentPath - * @return {*} - * @memberof UmbFileSystemTreeStore - */ - childrenOf(parentPath: string | null) { - if (parentPath === null) { - return this.rootItems; - } - - return this._data.asObservablePart((items) => - items.filter((item) => { - const pathCut = item.path?.substring(0, item.path?.lastIndexOf('/')); - return parentPath === pathCut; - }), - ); - } - - /** - * Returns an observable to observe the items with the given ids - * @param {Array} paths - * @return {*} - * @memberof UmbFileSystemTreeStore - */ - items(paths: Array) { - return this._data.asObservablePart((items) => items.filter((item) => paths.includes(item.path ?? ''))); - } -} diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/index.ts index c502da8f77..f71d89fdc4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/index.ts @@ -10,7 +10,6 @@ export * from './types.js'; export * from './tree-repository.interface.js'; export * from './tree-store.interface.js'; export * from './entity-tree-store.js'; -export * from './file-system-tree.store.js'; // Unique export * from './unique-tree-store.js';