kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
188 lines (142 loc) • 17.1 kB
JavaScript
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 _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 _switch = _interopRequireDefault(require("../../common/switch"));
var _brushConfig = _interopRequireDefault(require("./brush-config"));
var _tooltipConfig = _interopRequireDefault(require("./tooltip-config"));
var _styledComponents2 = require("../../common/styled-components");
var _reactIntl = require("react-intl");
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 _templateObject2() {
var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-bottom: 6px;\n"]);
_templateObject2 = function _templateObject2() {
return data;
};
return data;
}
function _templateObject() {
var data = (0, _taggedTemplateLiteral2["default"])(["\n border-top: 1px solid ", ";\n"]);
_templateObject = function _templateObject() {
return data;
};
return data;
}
var StyledPanelContent = (0, _styledComponents["default"])(_styledComponents2.PanelContent)(_templateObject(), function (props) {
return props.theme.panelBorderColor;
});
var StyledInteractionPanel = _styledComponents["default"].div(_templateObject2());
InteractionPanelFactory.deps = [_tooltipConfig["default"], _brushConfig["default"]];
function InteractionPanelFactory(TooltipConfig, BrushConfig) {
var _class, _temp;
return _temp = _class =
/*#__PURE__*/
function (_Component) {
(0, _inherits2["default"])(InteractionPanel, _Component);
function InteractionPanel() {
var _getPrototypeOf2;
var _this;
(0, _classCallCheck2["default"])(this, InteractionPanel);
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"])(InteractionPanel)).call.apply(_getPrototypeOf2, [this].concat(args)));
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
isConfigActive: false
});
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_updateConfig", function (newProp) {
_this.props.onConfigChange(_objectSpread({}, _this.props.config, {}, newProp));
});
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_enableConfig", function () {
_this.setState({
isConfigActive: !_this.state.isConfigActive
});
});
return _this;
}
(0, _createClass2["default"])(InteractionPanel, [{
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
config = _this$props.config,
datasets = _this$props.datasets;
var onChange = function onChange(newConfig) {
return _this2._updateConfig({
config: newConfig
});
};
var template = null;
switch (config.id) {
case 'tooltip':
template = _react["default"].createElement(TooltipConfig, {
datasets: datasets,
config: config.config,
onChange: onChange
});
break;
case 'brush':
template = _react["default"].createElement(BrushConfig, {
config: config.config,
onChange: onChange
});
break;
default:
break;
}
return _react["default"].createElement(StyledInteractionPanel, {
className: "interaction-panel"
}, _react["default"].createElement(_styledComponents2.StyledPanelHeader, {
className: "interaction-panel__header",
onClick: this._enableConfig
}, _react["default"].createElement(_styledComponents2.PanelHeaderContent, {
className: "interaction-panel__header__content"
}, _react["default"].createElement("div", {
className: "interaction-panel__header__icon icon"
}, _react["default"].createElement(config.iconComponent, {
height: "12px"
})), _react["default"].createElement("div", {
className: "interaction-panel__header__title"
}, _react["default"].createElement(_styledComponents2.PanelHeaderTitle, null, _react["default"].createElement(_reactIntl.FormattedMessage, {
id: config.label
})))), _react["default"].createElement("div", {
className: "interaction-panel__header__actions"
}, _react["default"].createElement(_switch["default"], {
checked: config.enabled,
id: "".concat(config.id, "-toggle"),
onChange: function onChange() {
return _this2._updateConfig({
enabled: !config.enabled
});
},
secondary: true
}))), config.enabled && template && _react["default"].createElement(StyledPanelContent, {
className: "interaction-panel__content"
}, template));
}
}]);
return InteractionPanel;
}(_react.Component), (0, _defineProperty2["default"])(_class, "propTypes", {
datasets: _propTypes["default"].object.isRequired,
config: _propTypes["default"].object.isRequired,
onConfigChange: _propTypes["default"].func.isRequired
}), _temp;
}
var _default = InteractionPanelFactory;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL3NpZGUtcGFuZWwvaW50ZXJhY3Rpb24tcGFuZWwvaW50ZXJhY3Rpb24tcGFuZWwuanMiXSwibmFtZXMiOlsiU3R5bGVkUGFuZWxDb250ZW50IiwiUGFuZWxDb250ZW50IiwicHJvcHMiLCJ0aGVtZSIsInBhbmVsQm9yZGV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9XCJpbnRlcmFjdGlvbi1wYW5lbF9faGVhZGVyX19hY3Rpb25zXCI+XG4gICAgICAgICAgICAgIDxTd2l0Y2hcbiAgICAgICAgICAgICAgICBjaGVja2VkPXtjb25maWcuZW5hYmxlZH1cbiAgICAgICAgICAgICAgICBpZD17YCR7Y29uZmlnLmlkfS10b2dnbGVgfVxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXsoKSA9PiB0aGlzLl91cGRhdGVDb25maWcoe2VuYWJsZWQ6ICFjb25maWcuZW5hYmxlZH0pfVxuICAgICAgICAgICAgICAgIHNlY29uZGFyeVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9TdHlsZWRQYW5lbEhlYWRlcj5cbiAgICAgICAgICB7Y29uZmlnLmVuYWJsZWQgJiYgdGVtcGxhdGUgJiYgKFxuICAgICAgICAgICAgPFN0eWxlZFBhbmVsQ29udGVudCBjbGFzc05hbWU9XCJpbnRlcmFjdGlvbi1wYW5lbF9fY29udGVudFwiPlxuICAgICAgICAgICAgICB7dGVtcGxhdGV9XG4gICAgICAgICAgICA8L1N0eWxlZFBhbmVsQ29udGVudD5cbiAgICAgICAgICApfVxuICAgICAgICA8L1N0eWxlZEludGVyYWN0aW9uUGFuZWw+XG4gICAgICApO1xuICAgIH1cbiAgfTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgSW50ZXJhY3Rpb25QYW5lbEZhY3Rvcnk7XG4iXX0=
;