@paperbits/core
Advanced tools
Comparing version 0.1.35 to 0.1.36
@@ -9,7 +9,4 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
injector.bind("buttonEditor", ButtonEditor); | ||
injector.bindSingleton("buttonHandler", ButtonHandlers); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<ButtonHandlers>("buttonHandler")); | ||
injector.bindToCollection("widgetHandlers", ButtonHandlers, "buttonHandler"); | ||
} | ||
} |
@@ -9,7 +9,4 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
injector.bind("cardEditor", CardEditor); | ||
injector.bind("cardHandler", CardHandlers); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<CardHandlers>("cardHandler")); | ||
// injector.bindToCollection<IWidgetHandler>("widgetHandlers", CardHandlers, "cardHandler"); | ||
} | ||
} |
@@ -9,7 +9,4 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
injector.bind("columnEditor", ColumnEditor); | ||
injector.bind("columnHandler", ColumnHandlers); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<ColumnHandlers>("columnHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", ColumnHandlers, "columnHandler"); | ||
} | ||
} |
@@ -49,2 +49,3 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
public register(injector: IInjector): void { | ||
injector.bindCollection("dropHandlers"); | ||
// injector.bindSingleton("settingsProvider", SettingsProvider); | ||
@@ -88,9 +89,2 @@ // injector.bindSingleton("routeHandler", DefaultRouteHandler); | ||
injector.bindSingleton("htmlEditorProvider", HtmlEditorProvider); | ||
injector.bindSingletonFactory<IContentDropHandler[]>("dropHandlers", () => { | ||
return new Array<IContentDropHandler>(); | ||
}); | ||
injector.bindSingletonFactory<IWidgetHandler[]>("widgetHandlers", () => { | ||
return new Array<IWidgetHandler>(); | ||
}); | ||
injector.bindSingleton("mediaHandler", MediaHandlers); | ||
@@ -97,0 +91,0 @@ |
@@ -47,2 +47,8 @@ import { PageHost } from "./workshops/page/ko/pageHost"; | ||
public register(injector: IInjector): void { | ||
injector.bindCollection("widgetHandlers"); | ||
injector.bindCollection("modelBinders"); | ||
injector.bindCollection("viewModelBinders"); | ||
/*** Core ***/ | ||
@@ -74,5 +80,2 @@ injector.bindSingleton("httpClient", XmlHttpRequestClient); | ||
injector.bindCollection("modelBinders"); | ||
injector.bindCollection("viewModelBinders"); | ||
injector.bind("modelBinderSelector", ModelBinderSelector); | ||
@@ -79,0 +82,0 @@ injector.bind("viewModelBinderSelector", ViewModelBinderSelector); |
@@ -7,7 +7,4 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
public register(injector: IInjector): void { | ||
injector.bind("layoutHandler", LayoutHandlers); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<LayoutHandlers>("layoutHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", LayoutHandlers, "layoutHandler"); | ||
} | ||
} |
@@ -109,4 +109,4 @@ import { LayoutViewModel } from "./layoutViewModel"; | ||
const url = this.routeHandler.getCurrentUrl(); | ||
const layoutNode = await this.layoutService.getLayoutByRoute(url); | ||
const layoutModel = await this.layoutModelBinder.contractToModel(layoutNode); | ||
const layoutContract = await this.layoutService.getLayoutByRoute(url); | ||
const layoutModel = await this.layoutModelBinder.contractToModel(layoutContract); | ||
const layoutViewModel = this.modelToViewModel(layoutModel); | ||
@@ -113,0 +113,0 @@ |
@@ -9,10 +9,5 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
injector.bind("mapEditor", MapEditor); | ||
injector.bindSingleton("mapDropHandler", MapHandlers); | ||
const dropHandlers: IContentDropHandler[] = injector.resolve("dropHandlers"); | ||
dropHandlers.push(injector.resolve<MapHandlers>("mapDropHandler")); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<MapHandlers>("mapDropHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", MapHandlers, "mapHandler"); | ||
injector.bindToCollection<IContentDropHandler>("dropHandlers", MapHandlers, "mapHandler"); | ||
} | ||
} |
@@ -7,9 +7,6 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
export class NavbarEditorModule implements IInjectorModule { | ||
register(injector: IInjector): void { | ||
public register(injector: IInjector): void { | ||
injector.bind("navbarEditor", NavbarEditor); | ||
injector.bindSingleton("navbarHandler", NavbarHandlers); | ||
const widgetHandlers:Array<IWidgetHandler> = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<NavbarHandlers>("navbarHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", NavbarHandlers, "navbarHandler"); | ||
} | ||
} |
{ | ||
"name": "@paperbits/core", | ||
"version": "0.1.35", | ||
"version": "0.1.36", | ||
"description": "Paperbits core components.", | ||
@@ -23,4 +23,4 @@ "author": "Paperbits", | ||
"dependencies": { | ||
"@paperbits/common": "0.1.35", | ||
"@paperbits/styles": "0.1.35", | ||
"@paperbits/common": "0.1.36", | ||
"@paperbits/styles": "0.1.36", | ||
"cropperjs": "^1.4.0", | ||
@@ -27,0 +27,0 @@ "file-saver": "^2.0.0", |
@@ -7,7 +7,4 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
public register(injector: IInjector): void { | ||
injector.bind("pageHandler", PageHandlers); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<PageHandlers>("pageHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", PageHandlers, "pageHandler"); | ||
} | ||
} |
@@ -9,10 +9,5 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
injector.bind("pictureEditor", PictureEditor); | ||
injector.bindSingleton("pictureDropHandler", PictureHandlers); | ||
const dropHandlers: IContentDropHandler[] = injector.resolve("dropHandlers"); | ||
dropHandlers.push(injector.resolve<PictureHandlers>("pictureDropHandler")); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<PictureHandlers>("pictureDropHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", PictureHandlers, "pictureWidgetHandler"); | ||
injector.bindToCollection<IContentDropHandler>("dropHandlers", PictureHandlers, "pictureDropHandler"); | ||
} | ||
} |
@@ -10,7 +10,4 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
injector.bind("rowLayoutSelector", RowLayoutSelector); | ||
injector.bind("rowHandler", RowHandlers); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<RowHandlers>("rowHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", RowHandlers, "rowHandler"); | ||
} | ||
} |
import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
import { IWidgetHandler, IContentDropHandler } from "@paperbits/common/editing"; | ||
import { IWidgetHandler } from "@paperbits/common/editing"; | ||
import { SearchResultsHandlers } from "../searchResultsHandlers"; | ||
export class SearchResultsEditorModule implements IInjectorModule { | ||
register(injector: IInjector): void { | ||
injector.bindSingleton("searchResultsHandlers", SearchResultsHandlers); | ||
const widgetHandlers:Array<IWidgetHandler> = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<SearchResultsHandlers>("searchResultsHandlers")); | ||
public register(injector: IInjector): void { | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", SearchResultsHandlers, "searchResultsHandler"); | ||
} | ||
} |
@@ -12,7 +12,4 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
injector.bind("sectionEditor", SectionEditor); | ||
injector.bind("sectionHandler", SectionHandlers); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<SectionHandlers>("sectionHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", SectionHandlers, "sectionHandler"); | ||
} | ||
} |
@@ -0,1 +1,2 @@ | ||
import { IWidgetHandler } from "@paperbits/common/editing"; | ||
import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
@@ -6,10 +7,6 @@ import { SliderEditor } from "./sliderEditor"; | ||
export class SliderEditorModule implements IInjectorModule { | ||
register(injector: IInjector): void { | ||
public register(injector: IInjector): void { | ||
injector.bind("sliderEditor", SliderEditor); | ||
injector.bindSingleton("sliderHandler", SliderHandlers); | ||
// const widgetHandlers:Array<IWidgetHandler> = injector.resolve("widgetHandlers"); | ||
// widgetHandlers.push(injector.resolve<SliderHandlers>("sliderHandler")); | ||
// injector.bindToCollection<IWidgetHandler>("widgetHandlers", SliderHandlers, "sliderHandler"); | ||
} | ||
} |
@@ -1,5 +0,5 @@ | ||
import { IWidgetOrder } from '@paperbits/common/editing'; | ||
import { IWidgetHandler } from '@paperbits/common/editing'; | ||
import { IWidgetOrder } from "@paperbits/common/editing"; | ||
import { IWidgetHandler } from "@paperbits/common/editing"; | ||
import { Contract } from "@paperbits/common/contract"; | ||
import { SliderModelBinder } from './sliderModelBinder'; | ||
import { SliderModelBinder } from "./sliderModelBinder"; | ||
@@ -21,3 +21,3 @@ export class SliderHandlers implements IWidgetHandler { | ||
} | ||
} | ||
}; | ||
@@ -33,3 +33,3 @@ return widgetOrder; | ||
style: "default" | ||
} | ||
}; | ||
return await this.prepareWidgetOrder(config); | ||
@@ -36,0 +36,0 @@ } |
@@ -7,9 +7,6 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
export class TableOfContentsEditorModule implements IInjectorModule { | ||
register(injector: IInjector): void { | ||
public register(injector: IInjector): void { | ||
injector.bind("tableOfContentsEditor", TableOfContentsEditor); | ||
injector.bindSingleton("tableOfContentsHandlers", TableOfContentsHandlers); | ||
const widgetHandlers:Array<IWidgetHandler> = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<TableOfContentsHandlers>("tableOfContentsHandlers")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", TableOfContentsHandlers, "tableOfContentsHandler"); | ||
} | ||
} |
@@ -7,10 +7,6 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
export class TestimonialsEditorModule implements IInjectorModule { | ||
register(injector: IInjector): void { | ||
public register(injector: IInjector): void { | ||
injector.bind("testimonialsEditor", TestimonialsEditor); | ||
injector.bindSingleton("testimonialsHandler", TestimonialsHandlers); | ||
const widgetHandlers:Array<IWidgetHandler> = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<TestimonialsHandlers>("testimonialsHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", TestimonialsHandlers, "testimonialsHandler"); | ||
} | ||
} |
@@ -12,11 +12,6 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
public register(injector: IInjector): void { | ||
injector.bindSingleton("textblockHandler", TextblockHandlers); | ||
const widgetHandlers: IWidgetHandler[] = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<TextblockHandlers>("textblockHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", TextblockHandlers, "textblockHandler"); | ||
injector.bind("formattingTools", FormattingTools); | ||
injector.bind("hyperlinkEditor", HyperlinkEditor); | ||
injector.bind("textblockEditor", TextblockEditor); | ||
injector.bind("blockStyleSelector", BlockStyleSelector); | ||
@@ -23,0 +18,0 @@ // injector.bind("fontSelector", FontSelector); |
@@ -7,12 +7,7 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
export class VideoPlayerEditorModule implements IInjectorModule { | ||
register(injector: IInjector): void { | ||
public register(injector: IInjector): void { | ||
injector.bind("videoPlayerEditor", VideoEditor); | ||
injector.bindSingleton("videoDropHandler", VideoHandlers); | ||
const dropHandlers:Array<IContentDropHandler> = injector.resolve("dropHandlers"); | ||
dropHandlers.push(injector.resolve<VideoHandlers>("videoDropHandler")); | ||
const widgetHandlers:Array<IWidgetHandler> = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<VideoHandlers>("videoDropHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", VideoHandlers, "videoHandler"); | ||
injector.bindToCollection<IContentDropHandler>("dropHandlers", VideoHandlers, "videoHandler"); | ||
} | ||
} |
@@ -5,5 +5,5 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
export class DropbucketModule implements IInjectorModule { | ||
register(injector: IInjector): void { | ||
public register(injector: IInjector): void { | ||
injector.bind("dropbucket", DropBucket); | ||
} | ||
} |
@@ -7,13 +7,7 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; | ||
export class YoutubePlayerEditorModule implements IInjectorModule { | ||
register(injector: IInjector): void { | ||
public register(injector: IInjector): void { | ||
injector.bind("youtubeEditor", YoutubeEditor); | ||
injector.bindSingleton("youtubeDropHandler", YoutubeHandlers); | ||
const dropHandlers:Array<IContentDropHandler> = injector.resolve("dropHandlers"); | ||
dropHandlers.push(injector.resolve<YoutubeHandlers>("youtubeDropHandler")); | ||
const widgetHandlers:Array<IWidgetHandler> = injector.resolve("widgetHandlers"); | ||
widgetHandlers.push(injector.resolve<YoutubeHandlers>("youtubeDropHandler")); | ||
injector.bindToCollection<IWidgetHandler>("widgetHandlers", YoutubeHandlers, "youtubeHandler"); | ||
injector.bindToCollection<IContentDropHandler>("dropHandlers", YoutubeHandlers, "youtubeHandler"); | ||
} | ||
} |
631208
11793
+ Added@paperbits/common@0.1.36(transitive)
+ Added@paperbits/styles@0.1.36(transitive)
- Removed@paperbits/common@0.1.35(transitive)
- Removed@paperbits/styles@0.1.35(transitive)
Updated@paperbits/common@0.1.36
Updated@paperbits/styles@0.1.36