Created
July 12, 2017 11:48
-
-
Save buschtoens/29fbaec09b4d9c94443d3c175f4701ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('ember-decorators-es6-classes/components/es6-component', ['exports', 'ember-decorators/object', 'ember-decorators/object/evented'], function (exports, _object, _evented) { | |
'use strict'; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = undefined; | |
function _classCallCheck(instance, Constructor) { | |
if (!(instance instanceof Constructor)) { | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
} | |
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 _possibleConstructorReturn(self, call) { | |
if (!self) { | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
} | |
return call && (typeof call === "object" || typeof call === "function") ? call : self; | |
} | |
function _inherits(subClass, superClass) { | |
if (typeof superClass !== "function" && superClass !== null) { | |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); | |
} | |
subClass.prototype = Object.create(superClass && superClass.prototype, { | |
constructor: { | |
value: subClass, | |
enumerable: false, | |
writable: true, | |
configurable: true | |
} | |
}); | |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; | |
} | |
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; | |
} | |
var _dec, _dec2, _dec3, _desc, _value, _class, _class2, _temp2; | |
var Component = Ember.Component; | |
var set = Ember.set; | |
var _default = (_dec = (0, _object.computed)('foo', 'setOnInit'), _dec2 = (0, _evented.on)('init'), _dec3 = (0, _evented.on)('didReceiveAttrs'), (_class = (_temp2 = _class2 = function (_Component) { | |
_inherits(_default, _Component); | |
function _default() { | |
var _ref; | |
var _temp, _this, _ret; | |
_classCallCheck(this, _default); | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = _default.__proto__ || Object.getPrototypeOf(_default)).call.apply(_ref, [this].concat(args))), _this), _this.params = null, _this.foo = 'bar', _this.setOnInit = null, _this.setOnDidReceiveAttrs = null, _temp), _possibleConstructorReturn(_this, _ret); | |
} | |
_createClass(_default, [{ | |
key: 'computed', | |
value: function computed(foo, setOnInit) { | |
return foo + ' - ' + setOnInit; | |
} | |
}, { | |
key: 'eventedInit', | |
value: function eventedInit() { | |
set(this, 'setOnInit', Date.now()); | |
} | |
}, { | |
key: 'eventedDidReceiveAttrs', | |
value: function eventedDidReceiveAttrs() { | |
set(this, 'setOnDidReceiveAttrs', Date.now()); | |
} | |
}]); | |
return _default; | |
}(Component), _class2.positionalParams = 'params', _temp2), (_applyDecoratedDescriptor(_class.prototype, 'computed', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'computed'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'eventedInit', [_dec2], Object.getOwnPropertyDescriptor(_class.prototype, 'eventedInit'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'eventedDidReceiveAttrs', [_dec3], Object.getOwnPropertyDescriptor(_class.prototype, 'eventedDidReceiveAttrs'), _class.prototype)), _class)); | |
exports.default = _default; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment