Skip to content

Commit

Permalink
and include the build...
Browse files Browse the repository at this point in the history
  • Loading branch information
simonfox committed Sep 3, 2015
1 parent 48281d2 commit 36747e2
Show file tree
Hide file tree
Showing 16 changed files with 270 additions and 12 deletions.
8 changes: 8 additions & 0 deletions dist/amd/combo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div class="form-group">
<label for="lookupField" class="control-label">${title}</label>
<select class="form-control">
<option repeat.for="option of options" value="${option.value}" selected.one-time="$parent.selected === option.value">${option.description}</option>
</select>
</div>
</template>
60 changes: 60 additions & 0 deletions dist/amd/combo.js
Original file line number Diff line number Diff line change
@@ -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;
});
2 changes: 1 addition & 1 deletion dist/amd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
});
4 changes: 2 additions & 2 deletions dist/amd/lookup-widget.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>

<div class="form-group">
<label for="lookupField" class="control-label">${title}</label>
<input type="text" id="lookupField">

</div>
</template>
8 changes: 8 additions & 0 deletions dist/commonjs/combo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div class="form-group">
<label for="lookupField" class="control-label">${title}</label>
<select class="form-control">
<option repeat.for="option of options" value="${option.value}" selected.one-time="$parent.selected === option.value">${option.description}</option>
</select>
</div>
</template>
60 changes: 60 additions & 0 deletions dist/commonjs/combo.js
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion dist/commonjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
4 changes: 2 additions & 2 deletions dist/commonjs/lookup-widget.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>

<div class="form-group">
<label for="lookupField" class="control-label">${title}</label>
<input type="text" id="lookupField">

</div>
</template>
8 changes: 8 additions & 0 deletions dist/es6/combo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div class="form-group">
<label for="lookupField" class="control-label">${title}</label>
<select class="form-control">
<option repeat.for="option of options" value="${option.value}" selected.one-time="$parent.selected === option.value">${option.description}</option>
</select>
</div>
</template>
38 changes: 38 additions & 0 deletions dist/es6/combo.js
Original file line number Diff line number Diff line change
@@ -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;
}
}
2 changes: 1 addition & 1 deletion dist/es6/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function configure(aurelia) {
aurelia.globalResources(['lookup-widget','autocomplete-widget']);
aurelia.globalResources(['lookup-widget','autocomplete-widget', 'combo']);
}
4 changes: 2 additions & 2 deletions dist/es6/lookup-widget.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>

<div class="form-group">
<label for="lookupField" class="control-label">${title}</label>
<input type="text" id="lookupField">

</div>
</template>
8 changes: 8 additions & 0 deletions dist/system/combo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div class="form-group">
<label for="lookupField" class="control-label">${title}</label>
<select class="form-control">
<option repeat.for="option of options" value="${option.value}" selected.one-time="$parent.selected === option.value">${option.description}</option>
</select>
</div>
</template>
68 changes: 68 additions & 0 deletions dist/system/combo.js
Original file line number Diff line number Diff line change
@@ -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);
}
};
});
2 changes: 1 addition & 1 deletion dist/system/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions dist/system/lookup-widget.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>

<div class="form-group">
<label for="lookupField" class="control-label">${title}</label>
<input type="text" id="lookupField">

</div>
</template>

0 comments on commit 36747e2

Please sign in to comment.