Skip to content

Commit

Permalink
chore(all): dist build
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanood committed Apr 12, 2016
1 parent 9802761 commit 7abc2ab
Show file tree
Hide file tree
Showing 81 changed files with 1,735 additions and 630 deletions.
41 changes: 27 additions & 14 deletions dist/amd/aurelia-materialize-bridge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ declare module 'aurelia-materialize-bridge' {
} from 'aurelia-dependency-injection';
import {
bindingMode,
observable,
ObserverLocator
} from 'aurelia-binding';
import {
Expand All @@ -33,6 +34,7 @@ declare module 'aurelia-materialize-bridge' {
*/
export class ConfigBuilder {
useGlobalResources: boolean;
useScrollfirePatch: boolean;
globalResources: any;
useAll(): ConfigBuilder;
useBadge(): ConfigBuilder;
Expand Down Expand Up @@ -91,6 +93,7 @@ declare module 'aurelia-materialize-bridge' {
* Allows you to import yourself via <require></require>
*/
withoutGlobalResources(): ConfigBuilder;
withScrollfirePatch(): ConfigBuilder;
}
export function configure(aurelia: any, configCallback: any): any;
export class MdBadge {
Expand Down Expand Up @@ -181,7 +184,14 @@ declare module 'aurelia-materialize-bridge' {

}
export class MdCollection {

constructor(element: any);
getSelected(): any;
}
export class MdlListSelector {
item: any;
isSelected: any;
constructor(element: any);
isSelectedChanged(newValue: any): any;
}

/* eslint-enable */
Expand Down Expand Up @@ -318,11 +328,19 @@ declare module 'aurelia-materialize-bridge' {
mdValueChanged(): any;
}
export class MdModalTrigger {
dismissible: any;
constructor(element: any);
attached(): any;
detached(): any;
onComplete(): any;
}
export class MdNavbar {
mdFixed: any;
fixedAttributeManager: any;
constructor(element: any);
attached(): any;
detached(): any;
}
export class MdPagination {
mdActivePage: any;
mdPages: any;
Expand All @@ -336,13 +354,6 @@ declare module 'aurelia-materialize-bridge' {
setPreviousPage(): any;
setNextPage(): any;
}
export class MdNavbar {
mdFixed: any;
fixedAttributeManager: any;
constructor(element: any);
attached(): any;
detached(): any;
}
export class MdParallax {
constructor(element: any);
attached(): any;
Expand Down Expand Up @@ -408,7 +419,7 @@ declare module 'aurelia-materialize-bridge' {

/* eslint no-new-func:0 */
export class ScrollfirePatch {
patched: any;
static patched: any;
patch(): any;
}
export class MdScrollfireTarget {
Expand All @@ -418,7 +429,7 @@ declare module 'aurelia-materialize-bridge' {
}
export class MdScrollfire {
targetId: any;
constructor(element: any, scrollfirePatch: any);
constructor(element: any);
attached(): any;
}
export class MdScrollSpy {
Expand Down Expand Up @@ -512,18 +523,17 @@ declare module 'aurelia-materialize-bridge' {
mdCheckedChanged(newValue: any): any;
}
export class MdTabs {
constructor(element: any);
constructor(element: any, taskQueue: any);
attached(): any;

// });
detached(): any;
fireTabSelectedEvent(e: any): any;
selectTab(id: any): any;

// FIXME: probably bad
selectedTab: any;
}
export class MdToastService {
show(message: any, displayLength: any, className?: any): any;
}

// @customAttribute('md-tooltip')
export class MdTooltip {
Expand All @@ -534,6 +544,9 @@ declare module 'aurelia-materialize-bridge' {
attached(): any;
detached(): any;
}
export class MdToastService {
show(message: any, displayLength: any, className?: any): any;
}
export class MdFadeinImage {
ref: any;
constructor(element: any);
Expand Down
3 changes: 3 additions & 0 deletions dist/amd/card/card.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
md-card {
display: block;
}
1 change: 1 addition & 0 deletions dist/amd/card/card.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<require from="./card.css"></require>
<div class="card ${ mdSize || '' }">
<div if.bind="mdImage !== null" md-waves="color: light; block: true;" class="card-image">
<img class="${ mdReveal === true ? 'activator' : '' }" src.bind="mdImage" />
Expand Down
1 change: 1 addition & 0 deletions dist/amd/collection/collection-item.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template class="collection-item">
<require from="./collection-item.css"></require>
<content></content>
<content select=".secondary-content"></content>
</template>
25 changes: 20 additions & 5 deletions dist/amd/collection/collection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['exports', 'aurelia-templating'], function (exports, _aureliaTemplating) {
define(['exports', 'aurelia-templating', 'aurelia-dependency-injection'], function (exports, _aureliaTemplating, _aureliaDependencyInjection) {
'use strict';

Object.defineProperty(exports, "__esModule", {
Expand All @@ -12,9 +12,24 @@ define(['exports', 'aurelia-templating'], function (exports, _aureliaTemplating)
}
}

var _dec, _class;
var _dec, _dec2, _class;

var MdCollection = exports.MdCollection = (_dec = (0, _aureliaTemplating.customElement)('md-collection'), _dec(_class = function MdCollection() {
_classCallCheck(this, MdCollection);
}) || _class);
var MdCollection = exports.MdCollection = (_dec = (0, _aureliaTemplating.customElement)('md-collection'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec(_class = _dec2(_class = function () {
function MdCollection(element) {
_classCallCheck(this, MdCollection);

this.element = element;
}

MdCollection.prototype.getSelected = function getSelected() {
var items = [].slice.call(this.element.querySelectorAll('md-collection-selector'));
return items.filter(function (i) {
return i.au['md-collection-selector'].viewModel.isSelected;
}).map(function (i) {
return i.au['md-collection-selector'].viewModel.item;
});
};

return MdCollection;
}()) || _class) || _class);
});
36 changes: 36 additions & 0 deletions dist/amd/collection/md-collection-selector.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
md-collection-selector .md-collection-selector__hover {
display: inline-block;
}
md-collection-selector:hover .md-collection-selector__hover, md-collection-item.selected md-collection-selector .md-collection-selector__hover {
display: none !important;
}
md-collection-selector .md-collection-selector__checkbox div {
margin-left: 5px;
display: inline-block;
position: absolute;
left: 20px;
top: 20px;
margin-right: 11px;
height: 42px;
width: 42px;
line-height: 42px;
text-align: center;
}
md-collection-selector .md-collection-selector__checkbox .md-collection-selector__hover ~ div {
display: none;
}

md-collection-selector:hover .md-collection-selector__checkbox .md-collection-selector__hover ~ div, md-collection-item.selected md-collection-selector .md-collection-selector__checkbox .md-collection-selector__hover ~ div {
display: inline-block;
}

md-collection-item.selected {
background-color: #eee;
}

md-collection-selector md-checkbox {
display: inline-block;
}
md-collection-selector md-collection md-checkbox .md-checkbox.is-upgraded {
padding-left: 16px;
}
8 changes: 8 additions & 0 deletions dist/amd/collection/md-collection-selector.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<require from="./md-collection-selector.css"></require>
<div class="md-collection-selector__checkbox">
<content select=".md-collection-selector__hover"></content>
<div>
<md-checkbox md-checked.two-way="isSelected"></mdl-checkbox>
</div>
</template>
85 changes: 85 additions & 0 deletions dist/amd/collection/md-collection-selector.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
define(['exports', 'aurelia-templating', 'aurelia-dependency-injection', 'aurelia-binding', '../common/events'], function (exports, _aureliaTemplating, _aureliaDependencyInjection, _aureliaBinding, _events) {
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MdlListSelector = undefined;

function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
Object.defineProperty(target, property, {
enumerable: descriptor.enumerable,
configurable: descriptor.configurable,
writable: descriptor.writable,
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
});
}

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

function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object['ke' + 'ys'](descriptor).forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;

if ('value' in desc || desc.initializer) {
desc.writable = true;
}

desc = decorators.slice().reverse().reduce(function (desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);

if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}

if (desc.initializer === void 0) {
Object['define' + 'Property'](target, property, desc);
desc = null;
}

return desc;
}

function _initializerWarningHelper(descriptor, context) {
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2;

var MdlListSelector = exports.MdlListSelector = (_dec = (0, _aureliaTemplating.customElement)('md-collection-selector'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec3 = (0, _aureliaTemplating.bindable)(), _dec4 = (0, _aureliaBinding.observable)(), _dec(_class = _dec2(_class = (_class2 = function () {
function MdlListSelector(element) {
_classCallCheck(this, MdlListSelector);

_initDefineProp(this, 'item', _descriptor, this);

_initDefineProp(this, 'isSelected', _descriptor2, this);

this.element = element;
}

MdlListSelector.prototype.isSelectedChanged = function isSelectedChanged(newValue) {
(0, _events.fireMaterializeEvent)(this.element, 'selection-changed', { item: this.item, isSelected: this.isSelected });
};

return MdlListSelector;
}(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'item', [_dec3], {
enumerable: true,
initializer: null
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'isSelected', [_dec4], {
enumerable: true,
initializer: function initializer() {
return false;
}
})), _class2)) || _class) || _class);
});
7 changes: 7 additions & 0 deletions dist/amd/config-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ define(['exports'], function (exports) {
_classCallCheck(this, ConfigBuilder);

this.useGlobalResources = true;
this.useScrollfirePatch = false;
this.globalResources = [];
}

Expand Down Expand Up @@ -82,6 +83,7 @@ define(['exports'], function (exports) {
ConfigBuilder.prototype.useCollection = function useCollection() {
this.globalResources.push('./collection/collection');
this.globalResources.push('./collection/collection-item');
this.globalResources.push('./collection/md-collection-selector');
return this;
};

Expand Down Expand Up @@ -225,6 +227,11 @@ define(['exports'], function (exports) {
return this;
};

ConfigBuilder.prototype.withScrollfirePatch = function withScrollfirePatch() {
this.useScrollfirePatch = true;
return this;
};

return ConfigBuilder;
}();
});
5 changes: 4 additions & 1 deletion dist/amd/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['exports', './toast/toastService', './config-builder', 'materialize'], function (exports, _toastService, _configBuilder) {
define(['exports', './toast/toastService', './config-builder', './scrollfire/scrollfire-patch', 'materialize'], function (exports, _toastService, _configBuilder, _scrollfirePatch) {
'use strict';

Object.defineProperty(exports, "__esModule", {
Expand All @@ -24,5 +24,8 @@ define(['exports', './toast/toastService', './config-builder', 'materialize'], f
if (builder.useGlobalResources) {
aurelia.globalResources(builder.globalResources);
}
if (builder.useScrollfirePatch) {
new _scrollfirePatch.ScrollfirePatch().patch();
}
}
});
Loading

0 comments on commit 7abc2ab

Please sign in to comment.