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

Babel upgrade #25

Merged
merged 6 commits into from
May 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
262 changes: 144 additions & 118 deletions dist/DateRangePicker.js

Large diffs are not rendered by default.

76 changes: 45 additions & 31 deletions dist/Legend.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
"use strict";
var _interopRequire = function (obj) {
return obj && (obj["default"] || obj);
};
'use strict';

var React = _interopRequire(require("react/addons"));
Object.defineProperty(exports, '__esModule', {
value: true
});

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

var _React = require('react/addons');

var _React2 = _interopRequireDefault(_React);

var bemCx = _interopRequire(require("./utils/bemCx"));
var _bemCx = require('./utils/bemCx');

var BemMixin = _interopRequire(require("./utils/BemMixin"));
var _bemCx2 = _interopRequireDefault(_bemCx);

var PureRenderMixin = React.addons.PureRenderMixin;
var cx = React.addons.classSet;
var _BemMixin = require('./utils/BemMixin');

var _BemMixin2 = _interopRequireDefault(_BemMixin);

var Legend = React.createClass({
displayName: "Legend",
mixins: [BemMixin, PureRenderMixin],
'use strict';

var PureRenderMixin = _React2['default'].addons.PureRenderMixin;
var cx = _React2['default'].addons.classSet;

var Legend = _React2['default'].createClass({
displayName: 'Legend',

mixins: [_BemMixin2['default'], PureRenderMixin],

render: function render() {
var selectedLabel = this.props.selectedLabel;
var stateDefinitions = this.props.stateDefinitions;
var _props = this.props;
var selectedLabel = _props.selectedLabel;
var stateDefinitions = _props.stateDefinitions;

var block = this.getBemBlock();
var namespace = this.getBemNamespace();
var items = [];
Expand All @@ -33,29 +46,29 @@ var Legend = React.createClass({
style = {
backgroundColor: def.color
};
items.push(React.createElement(
"li",
{ className: this.cx({ element: "LegendItem" }), key: name },
React.createElement("span", { className: this.cx({ element: "LegendItemColor" }), style: style }),
React.createElement(
"span",
{ className: this.cx({ element: "LegendItemLabel" }) },
items.push(_React2['default'].createElement(
'li',
{ className: this.cx({ element: 'LegendItem' }), key: name },
_React2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor' }), style: style }),
_React2['default'].createElement(
'span',
{ className: this.cx({ element: 'LegendItemLabel' }) },
def.label
)
));
}
}

return React.createElement(
"ul",
return _React2['default'].createElement(
'ul',
{ className: this.cx() },
React.createElement(
"li",
{ className: this.cx({ element: "LegendItem" }) },
React.createElement("span", { className: this.cx({ element: "LegendItemColor", modifiers: { selection: true } }) }),
React.createElement(
"span",
{ className: this.cx({ element: "LegendItemLabel" }) },
_React2['default'].createElement(
'li',
{ className: this.cx({ element: 'LegendItem' }) },
_React2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor', modifiers: { selection: true } }) }),
_React2['default'].createElement(
'span',
{ className: this.cx({ element: 'LegendItemLabel' }) },
selectedLabel
)
),
Expand All @@ -64,4 +77,5 @@ var Legend = React.createClass({
}
});

module.exports = Legend;
exports['default'] = Legend;
module.exports = exports['default'];
71 changes: 34 additions & 37 deletions dist/PaginationArrow.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
"use strict";
var _objectWithoutProperties = function (obj, keys) {
var target = {};

for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
'use strict';

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

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

return target;
};
var _objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; };

var _defineProperty = function (obj, key, value) {
return Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
};
var _defineProperty = function (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); };

var _interopRequire = function (obj) {
return obj && (obj["default"] || obj);
};
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var React = _interopRequire(require("react/addons"));
var _React = require('react/addons');

var BemMixin = _interopRequire(require("./utils/BemMixin"));
var _React2 = _interopRequireDefault(_React);

var PureRenderMixin = React.addons.PureRenderMixin;
var _BemMixin = require('./utils/BemMixin');

var _BemMixin2 = _interopRequireDefault(_BemMixin);

var PaginationArrow = React.createClass({
displayName: "PaginationArrow",
mixins: [BemMixin, PureRenderMixin],
'use strict';

var PureRenderMixin = _React2['default'].addons.PureRenderMixin;

var PaginationArrow = _React2['default'].createClass({
displayName: 'PaginationArrow',

mixins: [_BemMixin2['default'], PureRenderMixin],

render: function render() {
var disabled = this.props.disabled;
var direction = this.props.direction;
var props = _objectWithoutProperties(this.props, ["disabled", "direction"]);
var _props = this.props;
var disabled = _props.disabled;
var direction = _props.direction;

var props = _objectWithoutProperties(_props, ['disabled', 'direction']);

var modifiers = _defineProperty({}, direction, true);
var states = { disabled: disabled };
Expand All @@ -49,17 +45,18 @@ var PaginationArrow = React.createClass({
};

var iconOpts = {
element: "PaginationArrowIcon",
element: 'PaginationArrowIcon',
modifiers: modifiers,
states: states
};

return React.createElement(
"div",
React.__spread({ className: this.cx(elementOpts) }, props),
React.createElement("div", { className: this.cx(iconOpts) })
return _React2['default'].createElement(
'div',
_extends({ className: this.cx(elementOpts) }, props),
_React2['default'].createElement('div', { className: this.cx(iconOpts) })
);
}
});

module.exports = PaginationArrow;
exports['default'] = PaginationArrow;
module.exports = exports['default'];
Loading