UNPKG

kepler.gl

Version:

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

186 lines (138 loc) 15.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"] = void 0; var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); 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 _lodash = _interopRequireDefault(require("lodash.pick")); var _classnames = _interopRequireDefault(require("classnames")); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _templateObject4() { var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n min-height: ", ";\n margin-left: ", "px;\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n display: none;\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = (0, _taggedTemplateLiteral2["default"])(["\n ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function noop() {} var StyledSwitchInput = _styledComponents["default"].label(_templateObject(), function (props) { return props.secondary ? props.theme.secondarySwitch : props.theme.inputSwitch; }); var StyledCheckboxInput = _styledComponents["default"].label(_templateObject2(), function (props) { return props.theme.inputCheckbox; }); var HiddenInput = _styledComponents["default"].input(_templateObject3()); var StyledCheckbox = _styledComponents["default"].div(_templateObject4(), function (props) { return props.theme.switchBtnHeight; }, function (props) { return props.theme.switchLabelMargin; }); var Checkbox = /*#__PURE__*/ function (_Component) { (0, _inherits2["default"])(Checkbox, _Component); function Checkbox() { var _getPrototypeOf2; var _this; (0, _classCallCheck2["default"])(this, Checkbox); 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"])(Checkbox)).call.apply(_getPrototypeOf2, [this].concat(_args))); (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", { focused: false }); (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleFocus", function (args) { _this.setState({ focused: true }); _this.props.onFocus(args); }); (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleBlur", function (args) { _this.setState({ focused: false }); _this.props.onBlur(args); }); return _this; } (0, _createClass2["default"])(Checkbox, [{ key: "render", value: function render() { var inputProps = _objectSpread({}, (0, _lodash["default"])(this.props, ['checked', 'disabled', 'id', 'onChange', 'value']), { type: 'checkbox', onFocus: this.handleFocus, onBlur: this.handleBlur }); var labelProps = _objectSpread({}, (0, _lodash["default"])(this.props, ['checked', 'disabled', 'secondary']), { htmlFor: this.props.id }); var LabelElement = this.props.type === 'checkbox' ? StyledCheckboxInput : StyledSwitchInput; return _react["default"].createElement(StyledCheckbox, { className: (0, _classnames["default"])('kg-checkbox', this.props.className) }, _react["default"].createElement(HiddenInput, inputProps), _react["default"].createElement(LabelElement, (0, _extends2["default"])({ className: "kg-checkbox__label" }, labelProps), this.props.label)); } }]); return Checkbox; }(_react.Component); exports["default"] = Checkbox; (0, _defineProperty2["default"])(Checkbox, "propTypes", { id: _propTypes["default"].string.isRequired, label: _propTypes["default"].node, value: _propTypes["default"].oneOf([true, false, 'indeterminate']), checked: _propTypes["default"].bool, disabled: _propTypes["default"].bool, error: _propTypes["default"].string, "switch": _propTypes["default"].bool, activeColor: _propTypes["default"].string, secondary: _propTypes["default"].bool, onBlur: _propTypes["default"].func, onChange: _propTypes["default"].func, onFocus: _propTypes["default"].func }); (0, _defineProperty2["default"])(Checkbox, "defaultProps", { disabled: false, checked: false, onBlur: noop, onChange: noop, onFocus: noop, label: '' }); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL2NvbW1vbi9jaGVja2JveC5qcyJdLCJuYW1lcyI6WyJub29wIiwiU3R5bGVkU3dpdGNoSW5wdXQiLCJzdHlsZWQiLCJsYWJlbCIsInByb3BzIiwic2Vjb25kYXJ5IiwidGhlbWUiLCJzZWNvbmRhcnlTd2l0Y2giLCJpbnB1dFN3aXRjaCIsIlN0eWxlZENoZWNrYm94SW5wdXQiLCJpbnB1dENoZWNrYm94IiwiSGlkZGVuSW5wdXQiLCJpbnB1dC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