@wildebeest/boxlayout
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -82,8 +82,8 @@ "use strict"; | ||
BoxLayout.prototype.addVerticalDeviderDrag = function (deviderName) { | ||
var bulder = this.deviderBuilderFactory('vertical'); | ||
var builder = this.deviderBuilderFactory('vertical'); | ||
var devider = this.layout.getDevider(deviderName); | ||
var deviderElement = bulder.build({ | ||
var deviderElement = builder.build({ | ||
'devider': devider | ||
}); | ||
deviderElement.getEmitter().on('drag', function (event) { | ||
deviderElement.getEmitter().on('wbDrag', function (event) { | ||
devider.changePositionBy(event.horizontal); | ||
@@ -96,8 +96,8 @@ }); | ||
BoxLayout.prototype.addHorizontalDeviderDrag = function (deviderName) { | ||
var bulder = this.deviderBuilderFactory('horizontal'); | ||
var builder = this.deviderBuilderFactory('horizontal'); | ||
var devider = this.layout.getDevider(deviderName); | ||
var deviderElement = bulder.build({ | ||
var deviderElement = builder.build({ | ||
'devider': devider | ||
}); | ||
deviderElement.getEmitter().on('drag', function (event) { | ||
deviderElement.getEmitter().on('wbDrag', function (event) { | ||
devider.changePositionBy(event.vertical); | ||
@@ -104,0 +104,0 @@ }); |
@@ -13,2 +13,3 @@ "use strict"; | ||
var BindageService_1 = require("./BindageService"); | ||
var component_1 = require("@wildebeest/component"); | ||
var BoxLayoutModule = (function () { | ||
@@ -18,3 +19,3 @@ function BoxLayoutModule() { | ||
BoxLayoutModule.prototype.getDependencies = function () { | ||
return [common_1.CommonModule, scroll_1.ScrollModule, drag_1.DragModule]; | ||
return [common_1.CommonModule, component_1.ComponentModule, scroll_1.ScrollModule, drag_1.DragModule]; | ||
}; | ||
@@ -39,3 +40,3 @@ BoxLayoutModule.prototype.register = function (container) { | ||
return function (name) { | ||
var builder = context.container.getNamed('Builder', 'devider'); | ||
var builder = context.container.getNamed('ComponentBuilder', 'devider'); | ||
builder.setTemplate(templates[name]); | ||
@@ -45,3 +46,3 @@ return builder; | ||
}); | ||
container.bind('Builder').to(DeviderElementBuilder_1.DeviderElementBuilder).inSingletonScope().whenTargetNamed('devider'); | ||
container.bind('ComponentBuilder').to(DeviderElementBuilder_1.DeviderElementBuilder).inSingletonScope().whenTargetNamed('devider'); | ||
}; | ||
@@ -48,0 +49,0 @@ BoxLayoutModule.prototype.boot = function (container) { }; |
@@ -9,3 +9,3 @@ "use strict"; | ||
this.emitter = emitter; | ||
new drag_1.DragableElement(this.element, this.emitter); | ||
new drag_1.DragableComponent(this.element, this.emitter); | ||
} | ||
@@ -12,0 +12,0 @@ DeviderElement.prototype.getEmitter = function () { |
@@ -1,4 +0,4 @@ | ||
import { Builder } from "@wildebeest/scroll"; | ||
import { DomService, EmitterService } from "@wildebeest/common"; | ||
export declare class DeviderElementBuilder implements Builder { | ||
import { ComponentBuilder } from "@wildebeest/component"; | ||
export declare class DeviderElementBuilder implements ComponentBuilder { | ||
protected template: string; | ||
@@ -5,0 +5,0 @@ protected domService: DomService; |
{ | ||
"name": "@wildebeest/boxlayout", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Box Layout module for creating fullscreen admin enviroments", | ||
@@ -18,5 +18,6 @@ "main": "dist/index.js", | ||
"@wildebeest/common": "^0.2.0", | ||
"@wildebeest/drag": "^0.2.0", | ||
"@wildebeest/drag": "^0.3.0", | ||
"@wildebeest/js-modules": "^0.1.0", | ||
"@wildebeest/scroll": "^0.2.0" | ||
"@wildebeest/scroll": "^0.3.0", | ||
"@wildebeest/component": "^0.1.0" | ||
}, | ||
@@ -23,0 +24,0 @@ "devDependencies": { |
import { injectable, inject } from "inversify"; | ||
import { EmitterService, Emitter, ViewportService, DomService } from "@wildebeest/common"; | ||
import { Builder } from "@wildebeest/scroll"; | ||
import { EmptyLayout } from "./EmptyLayout"; | ||
@@ -9,3 +8,3 @@ import { LayoutDevider } from "./LayoutDevider"; | ||
import { BindageService } from "./BindageService"; | ||
import { DeviderElement } from "./DeviderElement"; | ||
import { ComponentBuilder } from "@wildebeest/component"; | ||
@@ -93,8 +92,8 @@ @injectable() | ||
{ | ||
let bulder: Builder = this.deviderBuilderFactory('vertical'); | ||
let builder: ComponentBuilder = this.deviderBuilderFactory('vertical'); | ||
let devider: LayoutDevider = this.layout.getDevider(deviderName); | ||
let deviderElement: any = bulder.build({ | ||
let deviderElement: any = builder.build({ | ||
'devider': devider | ||
}); | ||
deviderElement.getEmitter().on('drag', (event: any) => { | ||
deviderElement.getEmitter().on('wbDrag', (event: any) => { | ||
devider.changePositionBy(event.horizontal); | ||
@@ -109,8 +108,8 @@ }); | ||
{ | ||
let bulder: Builder = this.deviderBuilderFactory('horizontal'); | ||
let builder: ComponentBuilder = this.deviderBuilderFactory('horizontal'); | ||
let devider: LayoutDevider = this.layout.getDevider(deviderName); | ||
let deviderElement: any = bulder.build({ | ||
let deviderElement: any = builder.build({ | ||
'devider': devider | ||
}); | ||
deviderElement.getEmitter().on('drag', (event: any) => { | ||
deviderElement.getEmitter().on('wbDrag', (event: any) => { | ||
devider.changePositionBy(event.vertical); | ||
@@ -117,0 +116,0 @@ }); |
import { Module } from "@wildebeest/js-modules"; | ||
import { CommonModule } from "@wildebeest/common"; | ||
import { ScrollModule, Builder } from "@wildebeest/scroll"; | ||
import { ScrollModule } from "@wildebeest/scroll"; | ||
import { DragModule } from "@wildebeest/drag"; | ||
@@ -14,2 +14,3 @@ import { Container, interfaces } from "inversify"; | ||
import { BindageService } from "./BindageService"; | ||
import { ComponentModule, ComponentBuilder } from "@wildebeest/component"; | ||
@@ -20,3 +21,3 @@ export class BoxLayoutModule implements Module | ||
{ | ||
return [CommonModule, ScrollModule, DragModule]; | ||
return [CommonModule, ComponentModule, ScrollModule, DragModule]; | ||
} | ||
@@ -45,3 +46,3 @@ | ||
return (name: string) => { | ||
let builder: any = context.container.getNamed('Builder', 'devider'); | ||
let builder: any = context.container.getNamed('ComponentBuilder', 'devider'); | ||
builder.setTemplate(templates[name]); | ||
@@ -51,3 +52,3 @@ return builder; | ||
}); | ||
container.bind<Builder>('Builder').to(DeviderElementBuilder).inSingletonScope().whenTargetNamed('devider'); | ||
container.bind<ComponentBuilder>('ComponentBuilder').to(DeviderElementBuilder).inSingletonScope().whenTargetNamed('devider'); | ||
} | ||
@@ -54,0 +55,0 @@ |
import { Devider } from "./Devider"; | ||
import { DragableElement } from "@wildebeest/drag"; | ||
import { DragableComponent } from "@wildebeest/drag"; | ||
import { Emitter } from "@wildebeest/common"; | ||
@@ -17,3 +17,3 @@ | ||
new DragableElement(this.element, this.emitter); | ||
new DragableComponent(this.element, this.emitter); | ||
} | ||
@@ -20,0 +20,0 @@ |
@@ -1,8 +0,8 @@ | ||
import { Builder } from "@wildebeest/scroll"; | ||
import { DeviderElement } from "./DeviderElement"; | ||
import { DomService, EmitterService } from "@wildebeest/common"; | ||
import { inject, injectable } from "inversify"; | ||
import { ComponentBuilder } from "@wildebeest/component"; | ||
@injectable() | ||
export class DeviderElementBuilder implements Builder | ||
export class DeviderElementBuilder implements ComponentBuilder | ||
{ | ||
@@ -9,0 +9,0 @@ protected template: string; |
@@ -33,3 +33,3 @@ import 'ts-jest'; | ||
expect(factory('horizontal')).toBeInstanceOf(DeviderElementBuilder); | ||
expect(app.getContainer().getNamed('Builder', 'devider')).toBeInstanceOf(DeviderElementBuilder); | ||
expect(app.getContainer().getNamed('ComponentBuilder', 'devider')).toBeInstanceOf(DeviderElementBuilder); | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74573
1284
5
+ Added@wildebeest/component@^0.1.0
+ Added@wildebeest/component@0.1.30.2.2(transitive)
+ Added@wildebeest/drag@0.3.3(transitive)
+ Added@wildebeest/scroll@0.3.17(transitive)
+ Added@wildebeest/touch@0.3.2(transitive)
- Removed@wildebeest/drag@0.2.0(transitive)
- Removed@wildebeest/scroll@0.2.4(transitive)
- Removed@wildebeest/touch@0.2.1(transitive)
Updated@wildebeest/drag@^0.3.0
Updated@wildebeest/scroll@^0.3.0