Make EntitySettingRegistry fully injectable (#6604)

* Make EntitySettingRegistry fully injectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add behavioural tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix lint

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Revert tsconfig change

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Update snapshot

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Improve naming

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-11-28 12:13:15 -05:00
1 parent 8897bfc26b
commit 9589175604
51 files changed
+2103 -540

No files matched your search

@@ -3,7 +3,6 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import type { ExtensionRegistrator } from "../../../../extensions/extension-loader/extension-registrator-injection-token";
import { extensionRegistratorInjectionToken } from "../../../../extensions/extension-loader/extension-registrator-injection-token";
import type { LensRendererExtension } from "../../../../extensions/lens-renderer-extension";
import type { AdditionalCategoryColumnRegistration } from "../custom-category-columns";
@@ -11,12 +10,10 @@ import { customCatalogCategoryColumnInjectionToken } from "./custom-token";
const customCategoryColumnsRegistratorInjectable = getInjectable({
id: "custom-category-columns-registrator",
instantiate: (): ExtensionRegistrator => {
return (ext) => {
const extension = ext as LensRendererExtension;
instantiate: () => (ext) => {
const extension = ext as LensRendererExtension;
return extension.additionalCategoryColumns.map(getInjectableForColumnRegistrationFor(extension));
};
return extension.additionalCategoryColumns.map(getInjectableForColumnRegistrationFor(extension));
},
injectionToken: extensionRegistratorInjectionToken,
});