Skip to content

Commit

Permalink
Registered operationDetails widget (#2323)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelJLiu authored Oct 25, 2023
1 parent 73bb8aa commit b02619a
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import { IInjectorModule, IInjector } from "@paperbits/common/injection";
import { OperationDetailsModelBinder } from "./operationDetailsModelBinder";
import { OperationDetailsViewModelBinder } from "./ko/operationDetailsViewModelBinder";
import { OperationDetailsModel } from "./operationDetailsModel";
import { KnockoutComponentBinder } from "@paperbits/core/ko";
import { OperationDetailsViewModel } from "./ko/operationDetailsViewModel";
import { IWidgetService } from "@paperbits/common/widgets";


export class OperationDetailsPublishModule implements IInjectorModule {
public register(injector: IInjector): void {
injector.bindToCollection("modelBinders", OperationDetailsModelBinder);
injector.bindToCollection("viewModelBinders", OperationDetailsViewModelBinder);

const widgetService = injector.resolve<IWidgetService>("widgetService");

widgetService.registerWidget("operationDetails", {
modelDefinition: OperationDetailsModel,
componentBinder: KnockoutComponentBinder,
componentDefinition: OperationDetailsViewModel,
modelBinder: OperationDetailsModelBinder,
viewModelBinder: OperationDetailsViewModelBinder
});
}
}

0 comments on commit b02619a

Please sign in to comment.