UNPKG

kepler.gl

Version:

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

63 lines (48 loc) 6.06 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.DeleteDatasetModal = void 0; var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral")); var _react = _interopRequireDefault(require("react")); var _styledComponents = _interopRequireDefault(require("styled-components")); var _datasetLabel = _interopRequireDefault(require("../common/dataset-label")); var _reactIntl = require("react-intl"); function _templateObject() { var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-top: 24px;\n"]); _templateObject = function _templateObject() { return data; }; return data; } var StyledMsg = _styledComponents["default"].div(_templateObject()); var DeleteDatasetModal = function DeleteDatasetModal(_ref) { var _ref$dataset = _ref.dataset, dataset = _ref$dataset === void 0 ? {} : _ref$dataset, _ref$layers = _ref.layers, layers = _ref$layers === void 0 ? [] : _ref$layers; // retrieve only layers related to the current dataset var currDatasetLayers = layers.filter(function (layer) { return layer.config.dataId === dataset.id; }); return _react["default"].createElement("div", { className: "delete-dataset-modal" }, _react["default"].createElement(_datasetLabel["default"], { dataset: dataset }), _react["default"].createElement(StyledMsg, { className: "delete-dataset-msg" }, _react["default"].createElement(_reactIntl.FormattedMessage, { id: 'modal.deleteData.warning', values: { length: currDatasetLayers.length } }))); }; exports.DeleteDatasetModal = DeleteDatasetModal; var DeleteDatasetModalFactory = function DeleteDatasetModalFactory() { return DeleteDatasetModal; }; var _default = DeleteDatasetModalFactory; exports["default"] = _default; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL21vZGFscy9kZWxldGUtZGF0YS1tb2RhbC5qcyJdLCJuYW1lcyI6WyJTdHlsZWRNc2ciLCJzdHlsZWQiLCJkaXYiLCJEZWxldGVEYXRhc2V0TW9kYWwiLC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