UNPKG

kepler.gl

Version:

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

137 lines (136 loc) 25.4 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = 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 _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); 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("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/react")); var _classnames = _interopRequireDefault(require("classnames")); var _styledComponents = _interopRequireDefault(require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/styled-components")); var _mouseEvent = _interopRequireDefault(require("./mouse-event")); var _templateObject, _templateObject2; // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } var StyledSliderHandle = _styledComponents["default"].span.attrs(function (props) { return { className: (0, _classnames["default"])('kg-range-slider__handle', props.className) }; })(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n z-index: 10;\n ", ": -", "px;\n\n height: ", "px;\n width: ", "px;\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n\n border-width: 1px;\n border-radius: ", ";\n border-style: solid;\n border-color: ", ";\n\n &:hover {\n background-color: ", ";\n cursor: pointer;\n }\n\n line-height: 10px;\n font-size: 6px;\n padding: 0 3px;\n letter-spacing: 1px;\n &:after {\n content: '", "';\n }\n"])), function (props) { return props.$vertical ? 'margin-left' : 'margin-top'; }, function (props) { return (props.$sliderHandleWidth - props.theme.sliderBarHeight) / 2; }, function (props) { return Number.isFinite(props.$sliderHandleWidth) ? props.$sliderHandleWidth : props.theme.sliderHandleHeight; }, function (props) { return Number.isFinite(props.$sliderHandleWidth) ? props.$sliderHandleWidth : props.theme.sliderHandleHeight; }, function (props) { return props.theme.sliderHandleShadow; }, function (props) { return props.theme.sliderHandleColor; }, function (props) { return props.theme.sliderHandleTextColor; }, function (props) { return props.theme.sliderBorderRadius; }, function (props) { return props.$active ? props.theme.selectBorderColor : props.theme.sliderInactiveBorderColor; }, function (props) { return props.theme.sliderHandleHoverColor; }, function (props) { return props.theme.sliderHandleAfterContent; }); var StyledSliderTooltip = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n border-radius: 3px;\n display: inline-block;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n z-index: 999;\n margin-left: ", "px;\n font-size: 9.5px;\n font-weight: 500;\n padding: 7px 10px;\n background-color: ", ";\n color: ", ";\n margin-bottom: -6px;\n width: 50px;\n\n &:before,\n &:after {\n content: '';\n width: 0;\n height: 0;\n position: absolute;\n }\n\n &:before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n left: -8px;\n top: 50%;\n }\n\n &:after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ", ";\n border-right-style: solid;\n border-right-width: 6px;\n }\n"])), function (props) { return props.$sliderHandleWidth + 12; }, function (props) { return props.theme.tooltipBg; }, function (props) { return props.theme.tooltipColor; }, function (props) { return props.theme.tooltipBg; }); var SliderTooltip = function SliderTooltip(_ref) { var value = _ref.value, _ref$format = _ref.format, format = _ref$format === void 0 ? function (val) { return val; } : _ref$format, style = _ref.style, sliderHandleWidth = _ref.sliderHandleWidth; return /*#__PURE__*/_react["default"].createElement(StyledSliderTooltip, { $sliderHandleWidth: sliderHandleWidth, style: style }, format(value)); }; var SliderHandle = exports["default"] = /*#__PURE__*/function (_Component) { function SliderHandle(props) { var _this; (0, _classCallCheck2["default"])(this, SliderHandle); _this = _callSuper(this, SliderHandle, [props]); (0, _defineProperty2["default"])(_this, "mouseEvent", void 0); (0, _defineProperty2["default"])(_this, "state", { mouseOver: false }); (0, _defineProperty2["default"])(_this, "ref", (0, _react.createRef)()); (0, _defineProperty2["default"])(_this, "toggleMouseOver", function () { _this.setState({ mouseOver: !_this.state.mouseOver }); }); _this.props = props; _this.mouseEvent = new _mouseEvent["default"]({ vertical: props.vertical, valueListener: props.valueListener, toggleMouseOver: _this.toggleMouseOver, track: props.track }); return _this; } (0, _inherits2["default"])(SliderHandle, _Component); return (0, _createClass2["default"])(SliderHandle, [{ key: "render", value: function render() { var style = (0, _defineProperty2["default"])({}, this.props.vertical ? 'bottom' : 'left', this.props.left); return /*#__PURE__*/_react["default"].createElement("div", { style: { display: this.props.display ? 'block' : 'none' } }, this.props.showTooltip && this.state.mouseOver ? /*#__PURE__*/_react["default"].createElement(SliderTooltip, { style: style, sliderHandleWidth: this.props.sliderHandleWidth, value: Number.isFinite(this.props.value) ? this.props.value : null }) : null, /*#__PURE__*/_react["default"].createElement(StyledSliderHandle, { className: (0, _classnames["default"])({ 'kg-range-slider__handle--active': this.state.mouseOver }), ref: this.ref, $sliderHandleWidth: this.props.sliderHandleWidth, $active: this.state.mouseOver, $vertical: this.props.vertical, style: style, onMouseDown: this.mouseEvent.handleMouseDown, onTouchStart: this.mouseEvent.handleTouchStart })); } }]); }(_react.Component); (0, _defineProperty2["default"])(SliderHandle, "defaultProps", { sliderHandleWidth: 12, left: '50%', display: true, vertical: false, valueListener: function valueListenerFn() { return; }, showTooltip: false }); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVXaWxkY2FyZCIsInJlcXVpcmUiLCJfY2xhc3NuYW1lcyIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJfc3R5bGVkQ29tcG9uZW50cyIsIl9tb3VzZUV2ZW50IiwiX3RlbXBsYXRlT2JqZWN0IiwiX3RlbXBsYXRlT2JqZWN0MiIsIl9nZXRSZXF1aXJlV2lsZGNhcmRDYWNoZSIsImUiLCJXZWFrTWFwIiwiciIsInQiLCJfX2VzTW9kdWxlIiwiX3R5cGVvZiIsImhhcyIsImdldCIsIm4iLCJfX3Byb3RvX18iLCJhIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IiLCJ1IiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwiaSIsInNldCIsIl9jYWxsU3VwZXIiLCJvIiwiX2dldFByb3RvdHlwZU9mMi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