UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

196 lines (153 loc) 17.5 kB
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.CollapseButtonFactory = void 0; var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral")); var _react = _interopRequireWildcard(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); var _styledComponents = _interopRequireDefault(require("styled-components")); var _icons = require("../common/icons"); function _templateObject4() { var data = (0, _taggedTemplateLiteral2["default"])(["\n align-items: center;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);\n justify-content: center;\n background-color: ", ";\n border-radius: 1px;\n color: ", ";\n display: flex;\n height: 20px;\n position: absolute;\n right: -8px;\n top: ", "px;\n width: 20px;\n\n :hover {\n cursor: pointer;\n box-shadow: none;\n background-color: ", ";\n }\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n border-radius: 1px;\n display: flex;\n flex-direction: column;\n height: 100%;\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = (0, _taggedTemplateLiteral2["default"])(["\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);\n transition: left 250ms, right 250ms;\n left: ", "px;\n align-items: stretch;\n flex-grow: 1;\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 99;\n height: 100%;\n width: ", "px;\n display: flex;\n transition: width 250ms;\n position: absolute;\n padding-top: ", "px;\n padding-right: ", "px;\n padding-bottom: ", "px;\n padding-left: ", "px;\n"]); _templateObject = function _templateObject() { return data; }; return data; } var StyledSidePanelContainer = _styledComponents["default"].div(_templateObject(), function (props) { return props.width + 2 * props.theme.sidePanel.margin.left; }, function (props) { return props.theme.sidePanel.margin.top; }, function (props) { return props.theme.sidePanel.margin.right; }, function (props) { return props.theme.sidePanel.margin.bottom; }, function (props) { return props.theme.sidePanel.margin.left; }); var SideBarContainer = _styledComponents["default"].div(_templateObject2(), function (props) { return props.left; }); var SideBarInner = _styledComponents["default"].div(_templateObject3(), function (props) { return props.theme.sidePanelBg; }); var StyledCollapseButton = _styledComponents["default"].div(_templateObject4(), function (props) { return props.theme.sideBarCloseBtnBgd; }, function (props) { return props.theme.sideBarCloseBtnColor; }, function (props) { return props.theme.sidePanel.margin.top; }, function (props) { return props.theme.sideBarCloseBtnBgdHover; }); var CollapseButtonFactory = function CollapseButtonFactory() { var CollapseButton = function CollapseButton(_ref) { var onClick = _ref.onClick, isOpen = _ref.isOpen; return _react["default"].createElement(StyledCollapseButton, { className: "side-bar__close", onClick: onClick }, _react["default"].createElement(_icons.ArrowRight, { height: "12px", style: { transform: "rotate(".concat(isOpen ? 180 : 0, "deg)") } })); }; return CollapseButton; }; exports.CollapseButtonFactory = CollapseButtonFactory; SidebarFactory.deps = [CollapseButtonFactory]; function SidebarFactory(CollapseButton) { var _class, _temp; return _temp = _class = /*#__PURE__*/ function (_Component) { (0, _inherits2["default"])(SideBar, _Component); function SideBar() { var _getPrototypeOf2; var _this; (0, _classCallCheck2["default"])(this, SideBar); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = (0, _possibleConstructorReturn2["default"])(this, (_getPrototypeOf2 = (0, _getPrototypeOf3["default"])(SideBar)).call.apply(_getPrototypeOf2, [this].concat(args))); (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_onOpenOrClose", function () { _this.props.onOpenOrClose({ isOpen: !_this.props.isOpen }); }); return _this; } (0, _createClass2["default"])(SideBar, [{ key: "render", value: function render() { var _this$props = this.props, isOpen = _this$props.isOpen, minifiedWidth = _this$props.minifiedWidth, width = _this$props.width; var horizontalOffset = isOpen ? 0 : minifiedWidth - width; return _react["default"].createElement(StyledSidePanelContainer, { width: isOpen ? width : 0, className: "side-panel--container" }, _react["default"].createElement(SideBarContainer, { className: "side-bar", style: { width: "".concat(width, "px") }, left: horizontalOffset }, isOpen ? _react["default"].createElement(SideBarInner, { className: "side-bar__inner" }, this.props.children) : null, _react["default"].createElement(CollapseButton, { isOpen: isOpen, onClick: this._onOpenOrClose }))); } }]); return SideBar; }(_react.Component), (0, _defineProperty2["default"])(_class, "propTypes", { width: _propTypes["default"].number, isOpen: _propTypes["default"].bool, minifiedWidth: _propTypes["default"].number, onOpenOrClose: _propTypes["default"].func }), (0, _defineProperty2["default"])(_class, "defaultProps", { width: 300, minifiedWidth: 0, isOpen: true, onOpenOrClose: function noop() {} }), _temp; } var _default = SidebarFactory; exports["default"] = _default; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3NpZGUtcGFuZWwvc2lkZS1iYXIuanMiXSwibmFtZXMiOlsiU3R5bGVkU2lkZVBhbmVsQ29udGFpbmVyIiwic3R5bGVkIiwiZGl2IiwicHJvcHMiLCJ3aWR0aCIsInRoZW1lIiwic2lkZVBhbmVsIiwibWFyZ2luIiwibGVmdCIsInRvcCIsInJpZ2h0IiwiYm90dG9tIiwiU2lkZUJhckNvbn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