Skip to content

Commit

Permalink
chore(prepare-release): release 0.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenVinke committed Aug 17, 2016
1 parent 25fedf2 commit eca0672
Show file tree
Hide file tree
Showing 15 changed files with 232 additions and 409 deletions.
32 changes: 6 additions & 26 deletions dist/amd/aurelia-kendoui-bridge.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
declare module 'aurelia-binding' {
export class Lexer {}
export class ParserImplementation {}
}
declare module 'aurelia-kendoui-bridge' {
import 'jquery';
import * as LogManager from 'aurelia-logging';
Expand Down Expand Up @@ -32,9 +28,7 @@ declare module 'aurelia-kendoui-bridge' {
import {
bindingMode,
EventManager,
createOverrideContext,
Lexer,
ParserImplementation
createOverrideContext
} from 'aurelia-binding';
import {
TaskQueue
Expand Down Expand Up @@ -117,8 +111,8 @@ declare module 'aurelia-kendoui-bridge' {
import 'kendo.slider.min';
import 'kendo.sortable.min';
import 'kendo.splitter.min';
import 'kendo.spreadsheet.min';
import 'kendo.mobile.switch.min';
import 'kendo.spreadsheet.min';
import 'kendo.tabstrip.min';
import 'kendo.timepicker.min';
import 'kendo.toolbar.min';
Expand Down Expand Up @@ -453,20 +447,6 @@ declare module 'aurelia-kendoui-bridge' {
*/
cleanupView(element?: any): any;
}
export class TemplateGatherer {
controlProperties: ControlProperties;
constructor(controlProperties: ControlProperties, util: Util, config: KendoConfigBuilder);

/***
* parses array of ak-template view-models (@children)
* <ak-template for='test'>
* this function sets the property 'test' on the viewmodel to the template
* @param target the viewModel with template properties
* @param kendoGrid or GridColumn, properties are retrieved from bindables.js
* @param templates array of ak-template view-models
*/
useTemplates(target?: any, controlName?: any, templates?: any): any;
}
export class Template {
template: any;
for: any;
Expand Down Expand Up @@ -935,20 +915,20 @@ declare module 'aurelia-kendoui-bridge' {
recreate(): any;
detached(): any;
}
export class Spreadsheet {
export class Switch {
kEnabled: any;
constructor(element?: any, widgetBase?: any);
bind(ctx?: any): any;
attached(): any;
recreate(): any;
propertyChanged(property?: any, newValue?: any, oldValue?: any): any;
detached(): any;
}
export class Switch {
kEnabled: any;
export class Spreadsheet {
constructor(element?: any, widgetBase?: any);
bind(ctx?: any): any;
attached(): any;
recreate(): any;
propertyChanged(property?: any, newValue?: any, oldValue?: any): any;
detached(): any;
}
export class TabStrip {
Expand Down
28 changes: 6 additions & 22 deletions dist/aurelia-kendoui-bridge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ declare module 'aurelia-kendoui-bridge' {
import {
bindingMode,
EventManager,
createOverrideContext,
Lexer,
ParserImplementation
createOverrideContext
} from 'aurelia-binding';
import {
TaskQueue
Expand Down Expand Up @@ -113,8 +111,8 @@ declare module 'aurelia-kendoui-bridge' {
import 'kendo.slider.min';
import 'kendo.sortable.min';
import 'kendo.splitter.min';
import 'kendo.spreadsheet.min';
import 'kendo.mobile.switch.min';
import 'kendo.spreadsheet.min';
import 'kendo.tabstrip.min';
import 'kendo.timepicker.min';
import 'kendo.toolbar.min';
Expand Down Expand Up @@ -449,20 +447,6 @@ declare module 'aurelia-kendoui-bridge' {
*/
cleanupView(element?: any): any;
}
export class TemplateGatherer {
controlProperties: ControlProperties;
constructor(controlProperties: ControlProperties, util: Util, config: KendoConfigBuilder);

/***
* parses array of ak-template view-models (@children)
* <ak-template for='test'>
* this function sets the property 'test' on the viewmodel to the template
* @param target the viewModel with template properties
* @param kendoGrid or GridColumn, properties are retrieved from bindables.js
* @param templates array of ak-template view-models
*/
useTemplates(target?: any, controlName?: any, templates?: any): any;
}
export class Template {
template: any;
for: any;
Expand Down Expand Up @@ -931,20 +915,20 @@ declare module 'aurelia-kendoui-bridge' {
recreate(): any;
detached(): any;
}
export class Spreadsheet {
export class Switch {
kEnabled: any;
constructor(element?: any, widgetBase?: any);
bind(ctx?: any): any;
attached(): any;
recreate(): any;
propertyChanged(property?: any, newValue?: any, oldValue?: any): any;
detached(): any;
}
export class Switch {
kEnabled: any;
export class Spreadsheet {
constructor(element?: any, widgetBase?: any);
bind(ctx?: any): any;
attached(): any;
recreate(): any;
propertyChanged(property?: any, newValue?: any, oldValue?: any): any;
detached(): any;
}
export class TabStrip {
Expand Down
113 changes: 21 additions & 92 deletions dist/aurelia-kendoui-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {RepeatStrategyLocator,ArrayRepeatStrategy} from 'aurelia-templating-reso
import {inject,Container,transient} from 'aurelia-dependency-injection';
import {customElement,ViewResources,customAttribute,bindable,BindableProperty,HtmlBehaviorResource,TemplatingEngine,noView,processContent,TargetInstruction} from 'aurelia-templating';
import {metadata} from 'aurelia-metadata';
import {bindingMode,EventManager,createOverrideContext,Lexer,ParserImplementation} from 'aurelia-binding';
import {bindingMode,EventManager,createOverrideContext} from 'aurelia-binding';
import {TaskQueue} from 'aurelia-task-queue';

/**
Expand Down Expand Up @@ -1360,77 +1360,6 @@ export class TemplateCompiler {
}
}

@inject(ControlProperties, Util, KendoConfigBuilder)
export class TemplateGatherer {

controlProperties: ControlProperties;

constructor(controlProperties: ControlProperties, util: Util, config: KendoConfigBuilder) {
this.controlProperties = controlProperties;
this.config = config;
this.util = util;
}

/***
* parses array of ak-template view-models (@children)
* <ak-template for='test'>
* this function sets the property 'test' on the viewmodel to the template
* @param target the viewModel with template properties
* @param kendoGrid or GridColumn, properties are retrieved from bindables.js
* @param templates array of ak-template view-models
*/
useTemplates(target, controlName, templates) {
let templateProps = this.controlProperties.getTemplateProperties(controlName);

if (!templates) {
templates = [];
}

templates.forEach(c => {
if (!c.for) {
throw new Error('Templating support is not enabled. Call .kendoTemplateSupport() in main.js or import common/template via require');
}

if (templateProps.indexOf(c.for) === -1) {
if (c.for.indexOf('.') === -1) {
throw new Error('Invalid template property name: "' + c.for + '", valid values are: ' + templateProps.join(', '));
}
}

if (this.util.hasValue(c.template)) {
let template = c.template;

if (this.config.templateCallback) {
template = this.config.templateCallback(target, c, c.template);
}

// now we must parse the expression inside for="" on the ak-template
// and set the template on the wrapper object
// get a ParserImplementation for the expression inside for="editable.template"
let parser = new ParserImplementation(new Lexer(), c.for);
// get the expression (generates a tree of AccessMembers)
let expression = parser.parseExpression();
// when the user uses "editable.template" it must be set as "kEditable.template"
// so here we iterate through the tree until we get to the last object (the first part of the expression)
let iterator = expression;
while (iterator) {
if (!iterator.object) {
// convert "editable" to "kEditable"
iterator.name = this.util.getBindablePropertyName(iterator.name);
}
iterator = iterator.object;
}
// get the scope of the widget instance
let scope = createOverrideContext(target, {});
// set the value on the object based on the expression
// so if the expression is "a.b.c" and the template is "abcd"
// it will set { a: { b: { c: 'abcd' }}}
expression.assign(scope, c.kendoTemplate ? template : () => template);
}
});
}
}

@customElement(`${constants.elementPrefix}template`)
@noView()
@processContent((compiler, resources, element, instruction) => {
Expand Down Expand Up @@ -3478,18 +3407,22 @@ export class Splitter {
}
}

import 'kendo.spreadsheet.min';
import 'kendo.mobile.switch.min';

@customElement(`${constants.elementPrefix}spreadsheet`)
@generateBindables('kendoSpreadsheet')
@customAttribute(`${constants.attributePrefix}switch`)
@generateBindables('kendoMobileSwitch')
@inject(Element, WidgetBase)
export class Spreadsheet {
export class Switch {

@bindable kEnabled;

constructor(element, widgetBase) {
this.element = element;
this.widgetBase = widgetBase
.control('kendoSpreadsheet')
.linkViewModel(this);
.control('kendoMobileSwitch')
.linkViewModel(this)
.bindToKendo('kEnabled', 'enable')
.useValueBinding('kChecked', 'check');
}

bind(ctx) {
Expand All @@ -3509,27 +3442,27 @@ export class Spreadsheet {
});
}

propertyChanged(property, newValue, oldValue) {
this.widgetBase.handlePropertyChanged(this.kWidget, property, newValue, oldValue);
}

detached() {
this.widgetBase.destroy(this.kWidget);
}
}

import 'kendo.mobile.switch.min';
import 'kendo.spreadsheet.min';

@customAttribute(`${constants.attributePrefix}switch`)
@generateBindables('kendoMobileSwitch')
@customElement(`${constants.elementPrefix}spreadsheet`)
@generateBindables('kendoSpreadsheet')
@inject(Element, WidgetBase)
export class Switch {

@bindable kEnabled;
export class Spreadsheet {

constructor(element, widgetBase) {
this.element = element;
this.widgetBase = widgetBase
.control('kendoMobileSwitch')
.linkViewModel(this)
.bindToKendo('kEnabled', 'enable')
.useValueBinding('kChecked', 'check');
.control('kendoSpreadsheet')
.linkViewModel(this);
}

bind(ctx) {
Expand All @@ -3549,10 +3482,6 @@ export class Switch {
});
}

propertyChanged(property, newValue, oldValue) {
this.widgetBase.handlePropertyChanged(this.kWidget, property, newValue, oldValue);
}

detached() {
this.widgetBase.destroy(this.kWidget);
}
Expand Down
32 changes: 6 additions & 26 deletions dist/commonjs/aurelia-kendoui-bridge.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
declare module 'aurelia-binding' {
export class Lexer {}
export class ParserImplementation {}
}
declare module 'aurelia-kendoui-bridge' {
import 'jquery';
import * as LogManager from 'aurelia-logging';
Expand Down Expand Up @@ -32,9 +28,7 @@ declare module 'aurelia-kendoui-bridge' {
import {
bindingMode,
EventManager,
createOverrideContext,
Lexer,
ParserImplementation
createOverrideContext
} from 'aurelia-binding';
import {
TaskQueue
Expand Down Expand Up @@ -117,8 +111,8 @@ declare module 'aurelia-kendoui-bridge' {
import 'kendo.slider.min';
import 'kendo.sortable.min';
import 'kendo.splitter.min';
import 'kendo.spreadsheet.min';
import 'kendo.mobile.switch.min';
import 'kendo.spreadsheet.min';
import 'kendo.tabstrip.min';
import 'kendo.timepicker.min';
import 'kendo.toolbar.min';
Expand Down Expand Up @@ -453,20 +447,6 @@ declare module 'aurelia-kendoui-bridge' {
*/
cleanupView(element?: any): any;
}
export class TemplateGatherer {
controlProperties: ControlProperties;
constructor(controlProperties: ControlProperties, util: Util, config: KendoConfigBuilder);

/***
* parses array of ak-template view-models (@children)
* <ak-template for='test'>
* this function sets the property 'test' on the viewmodel to the template
* @param target the viewModel with template properties
* @param kendoGrid or GridColumn, properties are retrieved from bindables.js
* @param templates array of ak-template view-models
*/
useTemplates(target?: any, controlName?: any, templates?: any): any;
}
export class Template {
template: any;
for: any;
Expand Down Expand Up @@ -935,20 +915,20 @@ declare module 'aurelia-kendoui-bridge' {
recreate(): any;
detached(): any;
}
export class Spreadsheet {
export class Switch {
kEnabled: any;
constructor(element?: any, widgetBase?: any);
bind(ctx?: any): any;
attached(): any;
recreate(): any;
propertyChanged(property?: any, newValue?: any, oldValue?: any): any;
detached(): any;
}
export class Switch {
kEnabled: any;
export class Spreadsheet {
constructor(element?: any, widgetBase?: any);
bind(ctx?: any): any;
attached(): any;
recreate(): any;
propertyChanged(property?: any, newValue?: any, oldValue?: any): any;
detached(): any;
}
export class TabStrip {
Expand Down
Loading

0 comments on commit eca0672

Please sign in to comment.