From 36747e2b3fd997ed7276eca8af24117f324a8677 Mon Sep 17 00:00:00 2001 From: Simon Fox Date: Thu, 3 Sep 2015 12:24:20 +1200 Subject: [PATCH] and include the build... --- dist/amd/combo.html | 8 ++++ dist/amd/combo.js | 60 ++++++++++++++++++++++++++++ dist/amd/index.js | 2 +- dist/amd/lookup-widget.html | 4 +- dist/commonjs/combo.html | 8 ++++ dist/commonjs/combo.js | 60 ++++++++++++++++++++++++++++ dist/commonjs/index.js | 2 +- dist/commonjs/lookup-widget.html | 4 +- dist/es6/combo.html | 8 ++++ dist/es6/combo.js | 38 ++++++++++++++++++ dist/es6/index.js | 2 +- dist/es6/lookup-widget.html | 4 +- dist/system/combo.html | 8 ++++ dist/system/combo.js | 68 ++++++++++++++++++++++++++++++++ dist/system/index.js | 2 +- dist/system/lookup-widget.html | 4 +- 16 files changed, 270 insertions(+), 12 deletions(-) create mode 100644 dist/amd/combo.html create mode 100644 dist/amd/combo.js create mode 100644 dist/commonjs/combo.html create mode 100644 dist/commonjs/combo.js create mode 100644 dist/es6/combo.html create mode 100644 dist/es6/combo.js create mode 100644 dist/system/combo.html create mode 100644 dist/system/combo.js diff --git a/dist/amd/combo.html b/dist/amd/combo.html new file mode 100644 index 0000000..817168a --- /dev/null +++ b/dist/amd/combo.html @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/dist/amd/combo.js b/dist/amd/combo.js new file mode 100644 index 0000000..3ee0021 --- /dev/null +++ b/dist/amd/combo.js @@ -0,0 +1,60 @@ +define(['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var Combo = (function () { + function Combo(element) { + _classCallCheck(this, _Combo); + + this.element = element; + this._boundChange = this._change.bind(this); + } + + _createClass(Combo, [{ + key: 'attached', + value: function attached() { + this.combo = this.element.querySelector('select'); + this.combo.addEventListener('change', this._boundChange); + } + }, { + key: 'detached', + value: function detached() { + this.combo.removeEventListener('change', this._boundChange); + } + }, { + key: '_change', + value: function _change(change) { + this.selected = change.target.value; + } + }]); + + var _Combo = Combo; + Combo = (0, _aureliaFramework.inject)(Element)(Combo) || Combo; + Combo = (0, _aureliaFramework.bindable)({ + name: 'selected', + attribute: 'selected', + defaultBindingMode: _aureliaFramework.bindingMode.twoWay + })(Combo) || Combo; + Combo = (0, _aureliaFramework.bindable)({ + name: 'options', + attribute: 'options', + defaultBindingMode: _aureliaFramework.bindingMode.oneTime + })(Combo) || Combo; + Combo = (0, _aureliaFramework.bindable)({ + name: 'title', + attribute: 'title', + defaultBindingMode: _aureliaFramework.bindingMode.oneTime + })(Combo) || Combo; + Combo = (0, _aureliaFramework.customElement)('combo')(Combo) || Combo; + return Combo; + })(); + + exports.Combo = Combo; +}); \ No newline at end of file diff --git a/dist/amd/index.js b/dist/amd/index.js index d174bb7..60ea5de 100644 --- a/dist/amd/index.js +++ b/dist/amd/index.js @@ -7,6 +7,6 @@ define(['exports'], function (exports) { exports.configure = configure; function configure(aurelia) { - aurelia.globalResources(['lookup-widget', 'autocomplete-widget']); + aurelia.globalResources(['lookup-widget', 'autocomplete-widget', 'combo']); } }); \ No newline at end of file diff --git a/dist/amd/lookup-widget.html b/dist/amd/lookup-widget.html index 70b027f..8c74db7 100644 --- a/dist/amd/lookup-widget.html +++ b/dist/amd/lookup-widget.html @@ -1,6 +1,6 @@ diff --git a/dist/commonjs/combo.html b/dist/commonjs/combo.html new file mode 100644 index 0000000..817168a --- /dev/null +++ b/dist/commonjs/combo.html @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/dist/commonjs/combo.js b/dist/commonjs/combo.js new file mode 100644 index 0000000..e53a97a --- /dev/null +++ b/dist/commonjs/combo.js @@ -0,0 +1,60 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +var _aureliaFramework = require('aurelia-framework'); + +var Combo = (function () { + function Combo(element) { + _classCallCheck(this, _Combo); + + this.element = element; + this._boundChange = this._change.bind(this); + } + + _createClass(Combo, [{ + key: 'attached', + value: function attached() { + this.combo = this.element.querySelector('select'); + this.combo.addEventListener('change', this._boundChange); + } + }, { + key: 'detached', + value: function detached() { + this.combo.removeEventListener('change', this._boundChange); + } + }, { + key: '_change', + value: function _change(change) { + this.selected = change.target.value; + } + }]); + + var _Combo = Combo; + Combo = (0, _aureliaFramework.inject)(Element)(Combo) || Combo; + Combo = (0, _aureliaFramework.bindable)({ + name: 'selected', + attribute: 'selected', + defaultBindingMode: _aureliaFramework.bindingMode.twoWay + })(Combo) || Combo; + Combo = (0, _aureliaFramework.bindable)({ + name: 'options', + attribute: 'options', + defaultBindingMode: _aureliaFramework.bindingMode.oneTime + })(Combo) || Combo; + Combo = (0, _aureliaFramework.bindable)({ + name: 'title', + attribute: 'title', + defaultBindingMode: _aureliaFramework.bindingMode.oneTime + })(Combo) || Combo; + Combo = (0, _aureliaFramework.customElement)('combo')(Combo) || Combo; + return Combo; +})(); + +exports.Combo = Combo; \ No newline at end of file diff --git a/dist/commonjs/index.js b/dist/commonjs/index.js index 81adc21..bad7827 100644 --- a/dist/commonjs/index.js +++ b/dist/commonjs/index.js @@ -6,5 +6,5 @@ Object.defineProperty(exports, '__esModule', { exports.configure = configure; function configure(aurelia) { - aurelia.globalResources(['lookup-widget', 'autocomplete-widget']); + aurelia.globalResources(['lookup-widget', 'autocomplete-widget', 'combo']); } \ No newline at end of file diff --git a/dist/commonjs/lookup-widget.html b/dist/commonjs/lookup-widget.html index 70b027f..8c74db7 100644 --- a/dist/commonjs/lookup-widget.html +++ b/dist/commonjs/lookup-widget.html @@ -1,6 +1,6 @@ diff --git a/dist/es6/combo.html b/dist/es6/combo.html new file mode 100644 index 0000000..817168a --- /dev/null +++ b/dist/es6/combo.html @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/dist/es6/combo.js b/dist/es6/combo.js new file mode 100644 index 0000000..b451a2d --- /dev/null +++ b/dist/es6/combo.js @@ -0,0 +1,38 @@ +import {customElement, inject, bindable, bindingMode} from 'aurelia-framework'; + +@customElement('combo') +@bindable({ + name:'title', + attribute:'title', + defaultBindingMode: bindingMode.oneTime +}) +@bindable({ + name:'options', + attribute:'options', + defaultBindingMode: bindingMode.oneTime +}) +@bindable({ + name:'selected', + attribute:'selected', + defaultBindingMode: bindingMode.twoWay +}) +@inject(Element) +export class Combo { + constructor(element) { + this.element = element; + this._boundChange = this._change.bind(this); + } + + attached() { + this.combo = this.element.querySelector('select'); + this.combo.addEventListener('change', this._boundChange); + } + + detached() { + this.combo.removeEventListener('change', this._boundChange); + } + + _change(change) { + this.selected = change.target.value; + } +} \ No newline at end of file diff --git a/dist/es6/index.js b/dist/es6/index.js index 0578bc1..3a4bddc 100644 --- a/dist/es6/index.js +++ b/dist/es6/index.js @@ -1,3 +1,3 @@ export function configure(aurelia) { - aurelia.globalResources(['lookup-widget','autocomplete-widget']); + aurelia.globalResources(['lookup-widget','autocomplete-widget', 'combo']); } diff --git a/dist/es6/lookup-widget.html b/dist/es6/lookup-widget.html index 70b027f..8c74db7 100644 --- a/dist/es6/lookup-widget.html +++ b/dist/es6/lookup-widget.html @@ -1,6 +1,6 @@ diff --git a/dist/system/combo.html b/dist/system/combo.html new file mode 100644 index 0000000..817168a --- /dev/null +++ b/dist/system/combo.html @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/dist/system/combo.js b/dist/system/combo.js new file mode 100644 index 0000000..cb27372 --- /dev/null +++ b/dist/system/combo.js @@ -0,0 +1,68 @@ +System.register(['aurelia-framework'], function (_export) { + 'use strict'; + + var customElement, inject, bindable, bindingMode, Combo; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + return { + setters: [function (_aureliaFramework) { + customElement = _aureliaFramework.customElement; + inject = _aureliaFramework.inject; + bindable = _aureliaFramework.bindable; + bindingMode = _aureliaFramework.bindingMode; + }], + execute: function () { + Combo = (function () { + function Combo(element) { + _classCallCheck(this, _Combo); + + this.element = element; + this._boundChange = this._change.bind(this); + } + + _createClass(Combo, [{ + key: 'attached', + value: function attached() { + this.combo = this.element.querySelector('select'); + this.combo.addEventListener('change', this._boundChange); + } + }, { + key: 'detached', + value: function detached() { + this.combo.removeEventListener('change', this._boundChange); + } + }, { + key: '_change', + value: function _change(change) { + this.selected = change.target.value; + } + }]); + + var _Combo = Combo; + Combo = inject(Element)(Combo) || Combo; + Combo = bindable({ + name: 'selected', + attribute: 'selected', + defaultBindingMode: bindingMode.twoWay + })(Combo) || Combo; + Combo = bindable({ + name: 'options', + attribute: 'options', + defaultBindingMode: bindingMode.oneTime + })(Combo) || Combo; + Combo = bindable({ + name: 'title', + attribute: 'title', + defaultBindingMode: bindingMode.oneTime + })(Combo) || Combo; + Combo = customElement('combo')(Combo) || Combo; + return Combo; + })(); + + _export('Combo', Combo); + } + }; +}); \ No newline at end of file diff --git a/dist/system/index.js b/dist/system/index.js index 03e0708..4ffed72 100644 --- a/dist/system/index.js +++ b/dist/system/index.js @@ -4,7 +4,7 @@ System.register([], function (_export) { _export('configure', configure); function configure(aurelia) { - aurelia.globalResources(['lookup-widget', 'autocomplete-widget']); + aurelia.globalResources(['lookup-widget', 'autocomplete-widget', 'combo']); } return { diff --git a/dist/system/lookup-widget.html b/dist/system/lookup-widget.html index 70b027f..8c74db7 100644 --- a/dist/system/lookup-widget.html +++ b/dist/system/lookup-widget.html @@ -1,6 +1,6 @@