Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/st 64 #480

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ node_modules
coverage
.idea
npm-debug.log
dist/
10 changes: 10 additions & 0 deletions dist/actions/BoardActions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';

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

var _reduxActions = require('redux-actions');

var loadBoard = exports.loadBoard = (0, _reduxActions.createAction)('LOAD_BOARD');
16 changes: 16 additions & 0 deletions dist/actions/LaneActions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.moveLane = exports.paginateLane = exports.updateLanes = exports.updateCards = exports.moveCardAcrossLanes = exports.removeCard = exports.addCard = undefined;

var _reduxActions = require('redux-actions');

var addCard = exports.addCard = (0, _reduxActions.createAction)('ADD_CARD');
var removeCard = exports.removeCard = (0, _reduxActions.createAction)('REMOVE_CARD');
var moveCardAcrossLanes = exports.moveCardAcrossLanes = (0, _reduxActions.createAction)('MOVE_CARD');
var updateCards = exports.updateCards = (0, _reduxActions.createAction)('UPDATE_CARDS');
var updateLanes = exports.updateLanes = (0, _reduxActions.createAction)('UPDATE_LANES');
var paginateLane = exports.paginateLane = (0, _reduxActions.createAction)('PAGINATE_LANE');
var moveLane = exports.moveLane = (0, _reduxActions.createAction)('MOVE_LANE');
90 changes: 90 additions & 0 deletions dist/components/Board.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
'use strict';

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

var _extends2 = require('babel-runtime/helpers/extends');

var _extends3 = _interopRequireDefault(_extends2);

var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');

var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _BoardContainer = require('./BoardContainer');

var _BoardContainer2 = _interopRequireDefault(_BoardContainer);

var _reactRedux = require('react-redux');

var _redux = require('redux');

var _BoardReducer = require('../reducers/BoardReducer');

var _BoardReducer2 = _interopRequireDefault(_BoardReducer);

var _reduxLogger = require('redux-logger');

var _reduxLogger2 = _interopRequireDefault(_reduxLogger);

var _v = require('uuid/v1');

var _v2 = _interopRequireDefault(_v);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var middlewares = []; //process.env.NODE_ENV === 'development' ? [logger] : []

var Board = function (_Component) {
(0, _inherits3.default)(Board, _Component);

function Board() {
(0, _classCallCheck3.default)(this, Board);

var _this = (0, _possibleConstructorReturn3.default)(this, (Board.__proto__ || (0, _getPrototypeOf2.default)(Board)).call(this));

_this.getStore = function () {
//When you create multiple boards, unique stores are created for isolation
return (0, _redux.createStore)(_BoardReducer2.default, _redux.applyMiddleware.apply(undefined, middlewares));
};

_this.store = _this.getStore();
_this.id = (0, _v2.default)();
return _this;
}

(0, _createClass3.default)(Board, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
_reactRedux.Provider,
{ store: this.store },
_react2.default.createElement(_BoardContainer2.default, (0, _extends3.default)({}, this.props, { id: this.id }))
);
}
}]);
return Board;
}(_react.Component);

exports.default = Board;
Loading