remove file-system item store

This commit is contained in:
Mads Rasmussen
2024-02-08 15:31:58 +01:00
parent 224d60742b
commit 25f8925db8
2 changed files with 0 additions and 27 deletions

View File

@@ -1,26 +0,0 @@
import { UmbStoreBase } from './store-base.js';
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
/**
* @export
* @class UmbFileSystemItemStore
* @extends {UmbStoreBase}
* @description - Data Store for File system items
*/
export class UmbFileSystemItemStore<T extends { path: string }> extends UmbStoreBase<T> {
constructor(host: UmbControllerHost, storeAlias: string) {
super(host, storeAlias, new UmbArrayState<T>([], (x) => x.path));
}
/**
* Return an observable to observe file system items
* @param {Array<string>} paths
* @return {*}
* @memberof UmbFileSystemItemStore
*/
items(paths: Array<string>) {
return this._data.asObservablePart((items) => items.filter((item) => paths.includes(item.path ?? '')));
}
}

View File

@@ -2,7 +2,6 @@ export * from './store-base.js';
export * from './store.interface.js';
export * from './store.js';
export * from './entity-item.store.js';
export * from './file-system-item.store.js';
export { UmbDetailStoreBase } from './detail-store-base.js';
export type { UmbDetailStore } from './detail-store.interface.js';