UNPKG

kepler.gl

Version:

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

45 lines (43 loc) 6.73 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(require("react")); var _reactIntl = require("react-intl"); var _interactionPanel = _interopRequireDefault(require("./interaction-panel/interaction-panel")); var _panelTitle = _interopRequireDefault(require("./panel-title")); // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project InteractionManagerFactory.deps = [_interactionPanel["default"], _panelTitle["default"]]; function InteractionManagerFactory(InteractionPanel, PanelTitle) { var InteractionManager = function InteractionManager(_ref) { var interactionConfig = _ref.interactionConfig, datasets = _ref.datasets, visStateActions = _ref.visStateActions, panelMetadata = _ref.panelMetadata; var onConfigChange = visStateActions.interactionConfigChange, setColumnDisplayFormat = visStateActions.setColumnDisplayFormat; var intl = (0, _reactIntl.useIntl)(); return /*#__PURE__*/_react["default"].createElement("div", { className: "interaction-manager" }, /*#__PURE__*/_react["default"].createElement(PanelTitle, { className: "interaction-manager-title", title: intl.formatMessage({ id: panelMetadata.label }) }), Object.keys(interactionConfig).map(function (key) { return /*#__PURE__*/_react["default"].createElement(InteractionPanel, { datasets: datasets, config: interactionConfig[key], key: key, onConfigChange: onConfigChange, setColumnDisplayFormat: setColumnDisplayFormat }); })); }; return InteractionManager; } var _default = exports["default"] = InteractionManagerFactory; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9yZWFjdEludGwiLCJfaW50ZXJhY3Rpb25QYW5lbCIsIl9wYW5lbFRpdGxlIiwiSW50ZXJhY3Rpb25NYW5hZ2VyRmFjdG9yeSIsImRlcHMiLCJJbnRlcmFjdGlvblBhbmVsRmFjdG9yeSIsIlBhbmVsVGl0bGVGYWN0b3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