Skip to content

Commit

Permalink
chore(prepare-release): release 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenVinke committed May 15, 2016
1 parent 3d93650 commit 66677ee
Show file tree
Hide file tree
Showing 258 changed files with 4,272 additions and 2,392 deletions.
26 changes: 23 additions & 3 deletions dist/amd/aurelia-kendoui-bridge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ declare module 'aurelia-kendoui-bridge' {
import { inject, Container, transient } from 'aurelia-dependency-injection';
import { customElement, bindable, children, ViewResources, customAttribute, BindableProperty, HtmlBehaviorResource, TemplatingEngine, noView, processContent, TargetInstruction } from 'aurelia-templating';
import { metadata } from 'aurelia-metadata';
import { bindingMode, createOverrideContext } from 'aurelia-binding';
import { bindingMode, EventManager, createOverrideContext } from 'aurelia-binding';
import { TaskQueue } from 'aurelia-task-queue';
import 'kendo.data.min';
import 'kendo.autocomplete.min';
Expand Down Expand Up @@ -138,6 +138,16 @@ declare module 'aurelia-kendoui-bridge' {
*/
debug(): KendoConfigBuilder;

/**
* Loads the notify binding behavior
*/
notifyBindingBehavior(): KendoConfigBuilder;

/**
* Custom callback for template modification
*/
withTemplateCallback(callback: any): KendoConfigBuilder;

/**
* Don't register an array repeat strategy for kendo.data.ObservableArray
*/
Expand Down Expand Up @@ -342,6 +352,12 @@ declare module 'aurelia-kendoui-bridge' {
* @param controlName The Kendo control of which the options should be converted into bindable properties
*/
export function generateBindables(controlName: string, extraProperties?: any): any;
export function delayed(targetFunction: any): any;
export class NotifyBindingBehavior {
constructor(eventManager: any);
bind(binding: any, scope: any, target: any, fieldName: any): any;
unbind(binding: any, scope: any): any;
}

/***
* Converts an object with bindable properties (with k- convention)
Expand Down Expand Up @@ -416,7 +432,7 @@ declare module 'aurelia-kendoui-bridge' {
}
export class TemplateGatherer {
controlProperties: ControlProperties;
constructor(controlProperties: ControlProperties, util: Util);
constructor(controlProperties: ControlProperties, util: Util, config: KendoConfigBuilder);

/***
* parses array of ak-template view-models (@children)
Expand Down Expand Up @@ -699,8 +715,12 @@ declare module 'aurelia-kendoui-bridge' {
}
export class Col {
templates: any;
constructor(templateGatherer: any);
columns: any;
constructor(templateGatherer: any, optionsBuilder: any);
bind(): any;

// recursively get options of all nested columns that we can pass to Kendo
afterOptionsBuild(options: any): any;
}
export class GridToolbar {
templates: any;
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/autocomplete/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

AutoComplete.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

AutoComplete.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/barcode/barcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

Barcode.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

Barcode.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

Button.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

Button.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/buttongroup/buttongroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

ButtonGroup.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

ButtonGroup.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

Calendar.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

Calendar.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/chart/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

Chart.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

Chart.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/chart/sparkline.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

Sparkline.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

Sparkline.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/chart/stock.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

Stock.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

Stock.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/chart/treemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

TreeMap.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

TreeMap.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/colorpalette/colorpalette.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

ColorPalette.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

ColorPalette.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/colorpicker/colorpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

ColorPicker.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

ColorPicker.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/combobox/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

ComboBox.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

ComboBox.prototype.recreate = function recreate() {
Expand Down
25 changes: 24 additions & 1 deletion dist/amd/common/decorators.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', 'aurelia-metadata', 'aurelia-binding', './control-properties', './util'], function (exports, _aureliaTemplating, _aureliaDependencyInjection, _aureliaMetadata, _aureliaBinding, _controlProperties, _util) {
define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', 'aurelia-metadata', 'aurelia-binding', 'aurelia-task-queue', './control-properties', './util'], function (exports, _aureliaTemplating, _aureliaDependencyInjection, _aureliaMetadata, _aureliaBinding, _aureliaTaskQueue, _controlProperties, _util) {
'use strict';

exports.__esModule = true;
exports.generateBindables = generateBindables;
exports.delayed = delayed;

function generateBindables(controlName) {
var extraProperties = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];
Expand All @@ -16,6 +17,7 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', 'aureli

optionKeys.push('widget');
optionKeys.push('options');
optionKeys.push('noInit');

for (var i = 0; i < optionKeys.length; i++) {
var option = optionKeys[i];
Expand All @@ -33,4 +35,25 @@ define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', 'aureli
}
};
}

function delayed(targetFunction) {
return function (target, key, descriptor) {
var taskQueue = _aureliaDependencyInjection.Container.instance.get(_aureliaTaskQueue.TaskQueue);
var ptr = descriptor.value;

descriptor.value = function () {
var _this = this;

for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}

taskQueue.queueTask(function () {
return ptr.apply(_this, args);
});
};

return descriptor;
};
}
});
57 changes: 57 additions & 0 deletions dist/amd/common/notify-binding-behavior.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
define(['exports', 'aurelia-binding', 'aurelia-dependency-injection'], function (exports, _aureliaBinding, _aureliaDependencyInjection) {
'use strict';

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

var NotifyBindingBehavior = (function () {
function NotifyBindingBehavior(eventManager) {
_classCallCheck(this, _NotifyBindingBehavior);

this.eventManager = eventManager;
}

NotifyBindingBehavior.prototype.bind = function bind(binding, scope, target, fieldName) {
if (!binding.updateSource) return;

var targetObserver = binding.observerLocator.getObserver(binding.target, binding.targetProperty);
binding.targetObserver = targetObserver;
targetObserver.originalHandler = binding.targetObserver.handler;
var handler = this.eventManager.createElementHandler(['blur']);
targetObserver.handler = handler;

var observable = target || binding.source.bindingContext;
var field = fieldName || binding.sourceExpression.expression.name;
var intercept = binding.updateSource;

binding['intercepted-updateSource'] = intercept;
binding.updateSource = function (value) {
if (observable.set && observable.trigger) {
setTimeout(function () {
return observable.trigger.call(observable, 'change', { field: field });
}, 100);

if (observable.dirty === false) {
observable.dirty = true;
}
}

return intercept.call(binding, value);
};
};

NotifyBindingBehavior.prototype.unbind = function unbind(binding, scope) {
if (!binding['intercepted-updateSource']) return;

binding.updateSource = binding['intercepted-updateSource'];
binding['intercepted-updateSource'] = null;
};

var _NotifyBindingBehavior = NotifyBindingBehavior;
NotifyBindingBehavior = _aureliaDependencyInjection.inject(_aureliaBinding.EventManager)(NotifyBindingBehavior) || NotifyBindingBehavior;
return NotifyBindingBehavior;
})();

exports.NotifyBindingBehavior = NotifyBindingBehavior;
});
4 changes: 4 additions & 0 deletions dist/amd/common/options-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ define(['exports', 'aurelia-dependency-injection', './control-properties', './ut
}
}

if (viewModel.afterOptionsBuild) {
viewModel.afterOptionsBuild(options);
}

return this.util.pruneOptions(options);
};

Expand Down
21 changes: 15 additions & 6 deletions dist/amd/common/template-gatherer.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
define(['exports', './control-properties', './util', 'aurelia-dependency-injection'], function (exports, _controlProperties, _util, _aureliaDependencyInjection) {
define(['exports', './control-properties', './util', 'aurelia-dependency-injection', '../config-builder'], function (exports, _controlProperties, _util, _aureliaDependencyInjection, _configBuilder) {
'use strict';

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

var TemplateGatherer = (function () {
function TemplateGatherer(controlProperties, util) {
function TemplateGatherer(controlProperties, util, config) {
_classCallCheck(this, _TemplateGatherer);

this.controlProperties = controlProperties;
this.config = config;
this.util = util;
}

Expand All @@ -25,9 +26,17 @@ define(['exports', './control-properties', './util', 'aurelia-dependency-injecti
templates.forEach(function (c) {
if (templateProps.indexOf(c['for']) > -1) {
if (_this.util.hasValue(c.template)) {
target[_this.util.getBindablePropertyName(c['for'])] = c.kendoTemplate ? c.template : function () {
return c.template;
};
(function () {
var template = c.template;

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

target[_this.util.getBindablePropertyName(c['for'])] = c.kendoTemplate ? template : function () {
return template;
};
})();
}
} else {
if (!c['for']) {
Expand All @@ -40,7 +49,7 @@ define(['exports', './control-properties', './util', 'aurelia-dependency-injecti
};

var _TemplateGatherer = TemplateGatherer;
TemplateGatherer = _aureliaDependencyInjection.inject(_controlProperties.ControlProperties, _util.Util)(TemplateGatherer) || TemplateGatherer;
TemplateGatherer = _aureliaDependencyInjection.inject(_controlProperties.ControlProperties, _util.Util, _configBuilder.KendoConfigBuilder)(TemplateGatherer) || TemplateGatherer;
return TemplateGatherer;
})();

Expand Down
10 changes: 10 additions & 0 deletions dist/amd/config-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ define(['exports'], function (exports) {
return this;
};

KendoConfigBuilder.prototype.notifyBindingBehavior = function notifyBindingBehavior() {
this.resources.push('./common/notify-binding-behavior');
return this;
};

KendoConfigBuilder.prototype.withTemplateCallback = function withTemplateCallback(callback) {
this.templateCallback = callback;
return this;
};

KendoConfigBuilder.prototype.withoutRepeatStrategy = function withoutRepeatStrategy() {
this.registerRepeatStrategy = false;
};
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/contextmenu/contextmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

ContextMenu.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

ContextMenu.prototype.recreate = function recreate() {
Expand Down
4 changes: 3 additions & 1 deletion dist/amd/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-templating', '../com
};

DatePicker.prototype.attached = function attached() {
this.recreate();
if (!this.kNoInit) {
this.recreate();
}
};

DatePicker.prototype.recreate = function recreate() {
Expand Down
Loading

0 comments on commit 66677ee

Please sign in to comment.