UNPKG

aurelia-materialize-bridge

Version:
74 lines 3.78 kB
import { __decorate, __metadata } from "tslib"; import * as au from "../aurelia"; var MdColors = /** @class */ (function () { function MdColors(cs, bindingEngine) { this.cs = cs; this.bindingEngine = bindingEngine; this.primaryColor = this.cs.primaryColor; this.primaryColorLight = this.cs.primaryColorLight; this.primaryColorDark = this.cs.primaryColorDark; this.secondaryColor = this.cs.secondaryColor; this.errorColor = this.cs.errorColor; this.successColor = this.cs.successColor; this.linkColor = this.cs.linkColor; this.subscriptions = []; } MdColors.prototype.primaryColorChanged = function () { this.cs.primaryColor = this.primaryColor; this.cs.updatePrimaryShades(); }; MdColors.prototype.secondaryColorChanged = function () { this.cs.secondaryColor = this.secondaryColor; }; MdColors.prototype.errorColorChanged = function () { this.cs.errorColor = this.errorColor; }; MdColors.prototype.successColorChanged = function () { this.cs.successColor = this.successColor; }; MdColors.prototype.linkColorChanged = function () { this.cs.linkColor = this.linkColor; }; MdColors.prototype.attached = function () { var _this = this; this.subscriptions.push(this.bindingEngine.propertyObserver(this.cs, "primaryColor").subscribe(function () { return _this.primaryColor = _this.cs.primaryColor; })); this.subscriptions.push(this.bindingEngine.propertyObserver(this.cs, "primaryColorLight").subscribe(function () { return _this.primaryColorLight = _this.cs.primaryColorLight; })); this.subscriptions.push(this.bindingEngine.propertyObserver(this.cs, "primaryColorDark").subscribe(function () { return _this.primaryColorDark = _this.cs.primaryColorDark; })); this.subscriptions.push(this.bindingEngine.propertyObserver(this.cs, "secondaryColor").subscribe(function () { return _this.secondaryColor = _this.cs.secondaryColor; })); this.subscriptions.push(this.bindingEngine.propertyObserver(this.cs, "errorColor").subscribe(function () { return _this.errorColor = _this.cs.errorColor; })); this.subscriptions.push(this.bindingEngine.propertyObserver(this.cs, "successColor").subscribe(function () { return _this.successColor = _this.cs.successColor; })); this.subscriptions.push(this.bindingEngine.propertyObserver(this.cs, "linkColor").subscribe(function () { return _this.linkColor = _this.cs.linkColor; })); this.primaryColorLight = this.cs.primaryColorLight; this.primaryColorDark = this.cs.primaryColorDark; }; MdColors.prototype.detached = function () { this.subscriptions.forEach(function (x) { return x.dispose(); }); }; __decorate([ au.bindable, __metadata("design:type", String) ], MdColors.prototype, "primaryColor", void 0); __decorate([ au.bindable, __metadata("design:type", String) ], MdColors.prototype, "secondaryColor", void 0); __decorate([ au.bindable, __metadata("design:type", String) ], MdColors.prototype, "errorColor", void 0); __decorate([ au.bindable, __metadata("design:type", String) ], MdColors.prototype, "successColor", void 0); __decorate([ au.bindable, __metadata("design:type", String) ], MdColors.prototype, "linkColor", void 0); MdColors = __decorate([ au.customElement("md-colors"), __metadata("design:paramtypes", [au.MdColorsService, au.BindingEngine]) ], MdColors); return MdColors; }()); export { MdColors }; //# sourceMappingURL=md-colors.js.map