UNPKG

kepler.gl

Version:

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

41 lines (40 loc) 5.71 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 _localization = require("@kepler.gl/localization"); var _templateObject; // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project var StyledMsg = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n margin-top: 24px;\n"]))); var DeleteDatasetModal = exports.DeleteDatasetModal = function DeleteDatasetModal(_ref) { var dataset = _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 && dataset.id); }); return /*#__PURE__*/_react["default"].createElement("div", { className: "delete-dataset-modal" }, /*#__PURE__*/_react["default"].createElement(_datasetLabel["default"], { dataset: dataset }), /*#__PURE__*/_react["default"].createElement(StyledMsg, { className: "delete-dataset-msg" }, /*#__PURE__*/_react["default"].createElement(_localization.FormattedMessage, { id: 'modal.deleteData.warning', values: { length: currDatasetLayers.length } }))); }; var DeleteDatasetModalFactory = function DeleteDatasetModalFactory() { return DeleteDatasetModal; }; var _default = exports["default"] = DeleteDatasetModalFactory; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9zdHlsZWRDb21wb25lbnRzIiwiX2RhdGFzZXRMYWJlbCIsIl9sb2NhbGl6YXRpb24iLCJfdGVtcGxhd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