-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Registered operationDetails widget (#2323)
- Loading branch information
1 parent
73bb8aa
commit b02619a
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/components/operations/operation-details/operationDetails.publish.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}); | ||
} | ||
} |