Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen van der Heijden committed Apr 6, 2020
1 parent a669c12 commit dd2f092
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
4 changes: 1 addition & 3 deletions lib/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ var _invariant = _interopRequireDefault(require("invariant"));
/* global process */

/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
var Actions =
/*#__PURE__*/
function () {
var Actions = /*#__PURE__*/function () {
function Actions(names) {
var _this = this;

Expand Down
21 changes: 12 additions & 9 deletions lib/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,21 @@ var _states = _interopRequireDefault(require("./states"));

var _invariant = _interopRequireDefault(require("invariant"));

/* global process */
function _createSuper(Derived) { return function () { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var ComponentFactory = function ComponentFactory(SuperClass) {
var Component =
/*#__PURE__*/
function (_SuperClass) {
var Component = /*#__PURE__*/function (_SuperClass) {
(0, _inherits2["default"])(Component, _SuperClass);

var _super = _createSuper(Component);

function Component(props) {
var _this;

(0, _classCallCheck2["default"])(this, Component);
_this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Component).call(this, props));
_this = _super.call(this, props);
_this._vlowStores_ = {};
_this._vlowState_ = _states["default"].init;
_this._vlowTmpState = null;
Expand Down Expand Up @@ -112,14 +115,14 @@ var ComponentFactory = function ComponentFactory(SuperClass) {
return Component;
};

var Component =
/*#__PURE__*/
function (_ComponentFactory) {
var Component = /*#__PURE__*/function (_ComponentFactory) {
(0, _inherits2["default"])(Component, _ComponentFactory);

var _super2 = _createSuper(Component);

function Component() {
(0, _classCallCheck2["default"])(this, Component);
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Component).apply(this, arguments));
return _super2.apply(this, arguments);
}

(0, _createClass2["default"])(Component, null, [{
Expand Down
4 changes: 1 addition & 3 deletions lib/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ var _invariant = _interopRequireDefault(require("invariant"));
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
var _stores = [];

var Store =
/*#__PURE__*/
function () {
var Store = /*#__PURE__*/function () {
function Store() {
var _this = this;

Expand Down
12 changes: 8 additions & 4 deletions lib/withVlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,27 @@ var _react = _interopRequireDefault(require("react"));

var _component = _interopRequireDefault(require("./component"));

function _createSuper(Derived) { return function () { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

var withVlow = function withVlow(stores, WrappedComponent) {
if (WrappedComponent === undefined) {
return function (WrappedComponent) {
return withVlow(stores, WrappedComponent);
};
}

var WithVlow =
/*#__PURE__*/
function (_Component) {
var WithVlow = /*#__PURE__*/function (_Component) {
(0, _inherits2["default"])(WithVlow, _Component);

var _super = _createSuper(WithVlow);

function WithVlow(props) {
var _this;

(0, _classCallCheck2["default"])(this, WithVlow);
_this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(WithVlow).call(this, props));
_this = _super.call(this, props);
Array.isArray(stores) ? _this.mapStores(stores) : _this.mapStore(stores);
return _this;
}
Expand Down

0 comments on commit dd2f092

Please sign in to comment.