Skip to content

Commit

Permalink
Update packages (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
shisama authored Nov 4, 2018
1 parent 4fae1d6 commit 3d38dc7
Show file tree
Hide file tree
Showing 23 changed files with 6,530 additions and 9,468 deletions.
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ rules:
react/jsx-uses-vars: error
react/jsx-uses-react: error
valid-jsdoc: off
no-mixed-operators: off
prettier/prettier:
- error
-
trailingComma: all
singleQuote: true
bracketSpacing: false
bracketSpacing: false
no-mixed-operators: off
2 changes: 1 addition & 1 deletion demo/slideshow.js

Large diffs are not rendered by default.

49 changes: 25 additions & 24 deletions demo/vendor.dll.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dll/vendor-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"vendor","content":{"./node_modules/fbjs/lib/emptyFunction.js":{"id":0,"buildMeta":{"providedExports":true}},"./node_modules/fbjs/lib/emptyObject.js":{"id":1,"buildMeta":{"providedExports":true}},"./node_modules/fbjs/lib/invariant.js":{"id":2,"buildMeta":{"providedExports":true}},"./node_modules/object-assign/index.js":{"id":3,"buildMeta":{"providedExports":true}},"./node_modules/react/index.js":{"id":4,"buildMeta":{"providedExports":true}},"./node_modules/webpack/buildin/global.js":{"id":6,"buildMeta":{"providedExports":true}},"./node_modules/process/browser.js":{"id":7,"buildMeta":{"providedExports":true}},"./node_modules/es6-promise/dist/es6-promise.js":{"id":8,"buildMeta":{"providedExports":true}},"./node_modules/toggle-fullscreen/lib/toggleFullscreen.js":{"id":9,"buildMeta":{"providedExports":true}},"./node_modules/toggle-fullscreen/index.js":{"id":10,"buildMeta":{"providedExports":true}},"./node_modules/fbjs/lib/isNode.js":{"id":11,"buildMeta":{"providedExports":true}},"./node_modules/fbjs/lib/isTextNode.js":{"id":12,"buildMeta":{"providedExports":true}},"./node_modules/fbjs/lib/containsNode.js":{"id":13,"buildMeta":{"providedExports":true}},"./node_modules/fbjs/lib/shallowEqual.js":{"id":14,"buildMeta":{"providedExports":true}},"./node_modules/fbjs/lib/getActiveElement.js":{"id":15,"buildMeta":{"providedExports":true}},"./node_modules/fbjs/lib/ExecutionEnvironment.js":{"id":16,"buildMeta":{"providedExports":true}},"./node_modules/react-dom/cjs/react-dom.production.min.js":{"id":17,"buildMeta":{"providedExports":true}},"./node_modules/react-dom/index.js":{"id":18,"buildMeta":{"providedExports":true}},"./node_modules/react/cjs/react.production.min.js":{"id":19,"buildMeta":{"providedExports":true}}}}
{"name":"vendor","content":{"./node_modules/react/index.js":{"id":0,"buildMeta":{"providedExports":true}},"./node_modules/object-assign/index.js":{"id":1,"buildMeta":{"providedExports":true}},"./node_modules/react/cjs/react.production.min.js":{"id":3,"buildMeta":{"providedExports":true}},"./node_modules/react-dom/index.js":{"id":4,"buildMeta":{"providedExports":true}},"./node_modules/react-dom/cjs/react-dom.production.min.js":{"id":5,"buildMeta":{"providedExports":true}},"./node_modules/scheduler/index.js":{"id":6,"buildMeta":{"providedExports":true}},"./node_modules/scheduler/cjs/scheduler.production.min.js":{"id":7,"buildMeta":{"providedExports":true}},"./node_modules/toggle-fullscreen/index.js":{"id":8,"buildMeta":{"providedExports":true}},"./node_modules/toggle-fullscreen/lib/toggleFullscreen.js":{"id":9,"buildMeta":{"providedExports":true}},"./node_modules/es6-promise/dist/es6-promise.js":{"id":10,"buildMeta":{"providedExports":true}},"./node_modules/node-libs-browser/node_modules/process/browser.js":{"id":11,"buildMeta":{"providedExports":true}},"./node_modules/webpack/buildin/global.js":{"id":12,"buildMeta":{"providedExports":true}}}}
44 changes: 18 additions & 26 deletions lib/FullscreenButton.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
'use strict';
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

var _react = require('react');
var React = _interopRequireWildcard(require("react"));

var React = _interopRequireWildcard(_react);
var _recompose = require("recompose");

var _recompose = require('recompose');
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

exports.default = (0, _recompose.onlyUpdateForKeys)(['children'])(function (_ref) {
var _default = (0, _recompose.onlyUpdateForKeys)(['children'])(function (_ref) {
var onClick = _ref.onClick,
children = _ref.children;
return React.createElement("div", null, React.createElement("button", {
style: {
backgroundColor: 'transparent',
borderStyle: 'none',
position: 'absolute',
right: 10,
top: 5
},
onClick: onClick
}, children));
});

return React.createElement(
'div',
null,
React.createElement(
'button',
{
style: {
backgroundColor: 'transparent',
borderStyle: 'none',
position: 'absolute',
right: 10,
top: 5
},
onClick: onClick
},
children
)
);
});
exports.default = _default;
70 changes: 32 additions & 38 deletions lib/FullscreenIcon.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
'use strict';
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

var _react = require('react');
var React = _interopRequireWildcard(require("react"));

var React = _interopRequireWildcard(_react);
var _recompose = require("recompose");

var _recompose = require('recompose');
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

exports.default = (0, _recompose.pure)(function (_ref) {
var _default = (0, _recompose.pure)(function (_ref) {
var isFullScreen = _ref.isFullScreen;

if (isFullScreen) {
return React.createElement(
'svg',
{ id: 'no-fullscreen', width: '15', height: '15', viewBox: '0 0 612 612' },
React.createElement(
'g',
null,
React.createElement(
'g',
{ id: '_x36_' },
React.createElement(
'g',
null,
React.createElement('path', {
d: 'M260.655,351.173c-3.615-4.016-8.721-6.636-14.554-6.655l-164.915-0.229c-10.92-0.019-19.756,8.816-19.737,19.737 c0.019,10.92,12.756,23.198,18.226,28.668l41.711,41.712L0,554.625L57.375,612l119.608-121.979l41.711,41.712 c9.027,9.027,18.188,18.628,29.108,18.646c10.92,0.02,19.756-8.816,19.737-19.736l-0.229-164.915 C267.291,359.895,264.671,354.788,260.655,351.173z M493.119,175.472L612,57.375L554.625,0L436.566,118.556l-42.419-42.687 c-9.181-9.238-18.494-19.068-29.587-19.087c-11.111-0.019-20.081,9.027-20.081,20.196l0.229,168.797 c0,5.967,2.678,11.188,6.771,14.898c3.69,4.112,8.874,6.789,14.803,6.809l167.726,0.229c11.093,0.019,20.082-9.027,20.082-20.196 c-0.02-11.169-12.967-23.753-18.532-29.338L493.119,175.472z',
fill: '#FFFFFF'
})
)
)
)
);
return React.createElement("svg", {
id: "no-fullscreen",
width: "15",
height: "15",
viewBox: "0 0 612 612"
}, React.createElement("g", null, React.createElement("g", {
id: "_x36_"
}, React.createElement("g", null, React.createElement("path", {
d: "M260.655,351.173c-3.615-4.016-8.721-6.636-14.554-6.655l-164.915-0.229c-10.92-0.019-19.756,8.816-19.737,19.737 c0.019,10.92,12.756,23.198,18.226,28.668l41.711,41.712L0,554.625L57.375,612l119.608-121.979l41.711,41.712 c9.027,9.027,18.188,18.628,29.108,18.646c10.92,0.02,19.756-8.816,19.737-19.736l-0.229-164.915 C267.291,359.895,264.671,354.788,260.655,351.173z M493.119,175.472L612,57.375L554.625,0L436.566,118.556l-42.419-42.687 c-9.181-9.238-18.494-19.068-29.587-19.087c-11.111-0.019-20.081,9.027-20.081,20.196l0.229,168.797 c0,5.967,2.678,11.188,6.771,14.898c3.69,4.112,8.874,6.789,14.803,6.809l167.726,0.229c11.093,0.019,20.082-9.027,20.082-20.196 c-0.02-11.169-12.967-23.753-18.532-29.338L493.119,175.472z",
fill: "#FFFFFF"
})))));
} else {
return React.createElement(
'svg',
{ id: 'fullscreen', width: '15', height: '15', viewBox: '0 0 438.529 438.529' },
React.createElement(
'g',
{ fill: '#fff' },
React.createElement('path', { d: 'M180.156,225.828c-1.903-1.902-4.093-2.854-6.567-2.854c-2.475,0-4.665,0.951-6.567,2.854l-94.787,94.787l-41.112-41.117 c-3.617-3.61-7.895-5.421-12.847-5.421c-4.952,0-9.235,1.811-12.851,5.421c-3.617,3.621-5.424,7.905-5.424,12.854v127.907 c0,4.948,1.807,9.229,5.424,12.847c3.619,3.613,7.902,5.424,12.851,5.424h127.906c4.949,0,9.23-1.811,12.847-5.424 c3.615-3.617,5.424-7.898,5.424-12.847s-1.809-9.233-5.424-12.854l-41.112-41.104l94.787-94.793 c1.902-1.903,2.853-4.086,2.853-6.564c0-2.478-0.953-4.66-2.853-6.57L180.156,225.828z' }),
React.createElement('path', { d: 'M433.11,5.424C429.496,1.807,425.212,0,420.263,0H292.356c-4.948,0-9.227,1.807-12.847,5.424 c-3.614,3.615-5.421,7.898-5.421,12.847s1.807,9.233,5.421,12.847l41.106,41.112l-94.786,94.787 c-1.901,1.906-2.854,4.093-2.854,6.567s0.953,4.665,2.854,6.567l32.552,32.548c1.902,1.903,4.086,2.853,6.563,2.853 s4.661-0.95,6.563-2.853l94.794-94.787l41.104,41.109c3.62,3.616,7.905,5.428,12.854,5.428s9.229-1.812,12.847-5.428 c3.614-3.614,5.421-7.898,5.421-12.847V18.268C438.53,13.315,436.734,9.04,433.11,5.424z' })
)
);
return React.createElement("svg", {
id: "fullscreen",
width: "15",
height: "15",
viewBox: "0 0 438.529 438.529"
}, React.createElement("g", {
fill: "#fff"
}, React.createElement("path", {
d: "M180.156,225.828c-1.903-1.902-4.093-2.854-6.567-2.854c-2.475,0-4.665,0.951-6.567,2.854l-94.787,94.787l-41.112-41.117 c-3.617-3.61-7.895-5.421-12.847-5.421c-4.952,0-9.235,1.811-12.851,5.421c-3.617,3.621-5.424,7.905-5.424,12.854v127.907 c0,4.948,1.807,9.229,5.424,12.847c3.619,3.613,7.902,5.424,12.851,5.424h127.906c4.949,0,9.23-1.811,12.847-5.424 c3.615-3.617,5.424-7.898,5.424-12.847s-1.809-9.233-5.424-12.854l-41.112-41.104l94.787-94.793 c1.902-1.903,2.853-4.086,2.853-6.564c0-2.478-0.953-4.66-2.853-6.57L180.156,225.828z"
}), React.createElement("path", {
d: "M433.11,5.424C429.496,1.807,425.212,0,420.263,0H292.356c-4.948,0-9.227,1.807-12.847,5.424 c-3.614,3.615-5.421,7.898-5.421,12.847s1.807,9.233,5.421,12.847l41.106,41.112l-94.786,94.787 c-1.901,1.906-2.854,4.093-2.854,6.567s0.953,4.665,2.854,6.567l32.552,32.548c1.902,1.903,4.086,2.853,6.563,2.853 s4.661-0.95,6.563-2.853l94.794-94.787l41.104,41.109c3.62,3.616,7.905,5.428,12.854,5.428s9.229-1.812,12.847-5.428 c3.614-3.614,5.421-7.898,5.421-12.847V18.268C438.53,13.315,436.734,9.04,433.11,5.424z"
})));
}
});
});

exports.default = _default;
33 changes: 13 additions & 20 deletions lib/PagingButton.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
'use strict';
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

var _react = require('react');
var React = _interopRequireWildcard(require("react"));

var React = _interopRequireWildcard(_react);
var _recompose = require("recompose");

var _recompose = require('recompose');

var _styles = require('./styles');

var _styles2 = _interopRequireDefault(_styles);
var _styles = _interopRequireDefault(require("./styles"));

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

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

exports.default = (0, _recompose.pure)(function (_ref) {
var _default = (0, _recompose.pure)(function (_ref) {
var onClick = _ref.onClick,
children = _ref.children;
return React.createElement(React.Fragment, null, React.createElement("button", {
onClick: onClick,
style: _styles.default.BUTTON
}, children));
});

return React.createElement(
React.Fragment,
null,
React.createElement(
'button',
{ onClick: onClick, style: _styles2.default.BUTTON },
children
)
);
});
exports.default = _default;
53 changes: 30 additions & 23 deletions lib/Preview.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
'use strict';
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

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 = _interopRequireWildcard(require("react"));

var _react = require('react');
var _recompose = require("recompose");

var React = _interopRequireWildcard(_react);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

var _recompose = require('recompose');

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _extends() { _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; }; return _extends.apply(this, arguments); }

var PREVIEW = {
position: 'absolute',
Expand All @@ -27,7 +26,7 @@ var PREVIEW = {
borderRadius: '3px'
};

exports.default = (0, _recompose.pure)(function (_ref) {
var _default = (0, _recompose.pure)(function (_ref) {
var images = _ref.images,
imgClassName = _ref.imgClassName,
isFullScreen = _ref.isFullScreen,
Expand All @@ -37,35 +36,43 @@ exports.default = (0, _recompose.pure)(function (_ref) {
if (!images || images.length === 0) {
return null;
}

var previews = images.map(function (img, index) {
var display = index === previewIndex ? 'inline' : 'none';
var key = 'preview-' + index;
return React.createElement('img', {
var key = "preview-".concat(index);
return React.createElement("img", {
className: key,
style: { display: display, width: 200 },
style: {
display: display,
width: 200
},
src: img,
key: key
});
});

var fullscreenBottom = 120;
var imgView = document.querySelector(imgClassName);

if (imgView) {
fullscreenBottom = window.screen.availHeight - imgView.offsetHeight + 30;
}

var bottom = isFullScreen ? fullscreenBottom : PREVIEW.bottom;

var style = _extends({}, PREVIEW, {
opacity: opacity,
bottom: bottom
});
return React.createElement(
'div',
{ style: style },
previews,
React.createElement(
'p',
{ style: { margin: 0, textAlign: 'center', fontSize: 4 } },
previewIndex + 1 + ' / ' + images.length
)
);
});

return React.createElement("div", {
style: style
}, previews, React.createElement("p", {
style: {
margin: 0,
textAlign: 'center',
fontSize: 4
}
}, "".concat(previewIndex + 1, " / ").concat(images.length)));
});

exports.default = _default;
44 changes: 20 additions & 24 deletions lib/ProgressBar.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
'use strict';
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

var _react = require('react');
var React = _interopRequireWildcard(require("react"));

var React = _interopRequireWildcard(_react);
var _recompose = require("recompose");

var _recompose = require('recompose');
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

exports.default = (0, _recompose.onlyUpdateForKeys)(['progress'])(function (_ref) {
var _default = (0, _recompose.onlyUpdateForKeys)(['progress'])(function (_ref) {
var style = _ref.style,
onClick = _ref.onClick,
onMouseMove = _ref.onMouseMove,
onMouseLeave = _ref.onMouseLeave,
progress = _ref.progress;
return React.createElement("div", {
style: style,
onClick: onClick,
onMouseMove: onMouseMove,
onMouseLeave: onMouseLeave
}, React.createElement("div", {
style: {
backgroundColor: '#007bb6',
height: '100%',
width: "".concat(progress, "%")
}
}));
});

return React.createElement(
'div',
{
style: style,
onClick: onClick,
onMouseMove: onMouseMove,
onMouseLeave: onMouseLeave
},
React.createElement('div', {
style: {
backgroundColor: '#007bb6',
height: '100%',
width: progress + '%'
}
})
);
});
exports.default = _default;
Loading

0 comments on commit 3d38dc7

Please sign in to comment.