fix(core): Remove SelectionDimension functionality

This commit is contained in:
2024-10-06 07:34:38 +02:00
parent 60b9ad563c
commit fb974c3a0f
4 changed files with 7 additions and 67 deletions

View File

@@ -1,7 +1,6 @@
import * as plugins from './smartrouter.plugins.js';
import { QueryParams } from './smartrouter.classes.queryparams.js';
import { type ISelectionOption, SelectionDimension } from './smartrouter.classes.selectiondimension.js';
const routeLog = (message: string) => {
console.log(`%c[Router]%c ${message}`, 'color: rgb(255, 105, 100);', 'color: inherit');
@@ -102,19 +101,4 @@ export class SmartRouter {
} as IRouteInfo); // not waiting here
}
}
public selectionDimensionsMap = new plugins.lik.ObjectMap<SelectionDimension>();
public async createSelectionDimension(optionsArg: {
routeArg: string,
keyArg: string,
options: ISelectionOption[],
peers?: SelectionDimension[],
}) {
const selectionDimension = new SelectionDimension();
selectionDimension.dimensionKey = optionsArg.keyArg;
selectionDimension.dimensionPeers = optionsArg.peers;
selectionDimension.selectionOptions = optionsArg.options;
await this.selectionDimensionsMap.findOneAndRemove(async dimensionArg => dimensionArg.dimensionKey === optionsArg.keyArg);
this.selectionDimensionsMap.addMappedUnique(optionsArg.keyArg, selectionDimension);
}
}