UNPKG

kepler.gl

Version:

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

114 lines (86 loc) 11 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.OverwriteMapModal = void 0; var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral")); var _react = _interopRequireDefault(require("react")); var _styledComponents = _interopRequireDefault(require("styled-components")); var _styledComponents2 = require("../common/styled-components"); var _statusPanel = require("./status-panel"); var _imageModalContainer = _interopRequireDefault(require("./image-modal-container")); var _reactIntl = require("react-intl"); function _templateObject4() { var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: 24px 12px;\n min-height: 220px;\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-top: 24px;\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: 600;\n color: black;\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-top: 24px;\n font-size: 14px;\n"]); _templateObject = function _templateObject() { return data; }; return data; } var StyledMsg = _styledComponents["default"].div(_templateObject()); var StyledTitle = _styledComponents["default"].span(_templateObject2()); var StyledIcon = _styledComponents["default"].div(_templateObject3()); var StyledOverwriteMapModal = (0, _styledComponents["default"])(_styledComponents2.CenterVerticalFlexbox)(_templateObject4()); var OverwriteMapModalFactory = function OverwriteMapModalFactory() { var OverwriteMapModal = function OverwriteMapModal(_ref) { var mapSaved = _ref.mapSaved, title = _ref.title, currentProvider = _ref.currentProvider, cloudProviders = _ref.cloudProviders, isProviderLoading = _ref.isProviderLoading, onUpdateImageSetting = _ref.onUpdateImageSetting, onSetCloudProvider = _ref.onSetCloudProvider; var provider = cloudProviders.find(function (cp) { return cp.name === currentProvider; }); return _react["default"].createElement(_imageModalContainer["default"], { currentProvider: currentProvider, cloudProviders: cloudProviders, onUpdateImageSetting: onUpdateImageSetting, onSetCloudProvider: onSetCloudProvider }, _react["default"].createElement(StyledOverwriteMapModal, { className: "overwrite-map-modal" }, isProviderLoading ? _react["default"].createElement(StyledMsg, null, _react["default"].createElement(StyledTitle, null, _react["default"].createElement(_reactIntl.FormattedMessage, { id: 'modal.overwriteMap.title' })), _react["default"].createElement(_statusPanel.UploadAnimation, { icon: provider && provider.icon })) : _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(StyledIcon, null, provider && provider.icon ? _react["default"].createElement(provider.icon, { height: "64px" }) : null), _react["default"].createElement(StyledMsg, { className: "overwrite-map-msg" }, _react["default"].createElement(StyledTitle, null, title), _react["default"].createElement(_reactIntl.FormattedMessage, { id: 'modal.overwriteMap.alreadyExists', values: { mapSaved: mapSaved } }))))); }; return OverwriteMapModal; }; var OverwriteMapModal = OverwriteMapModalFactory(); exports.OverwriteMapModal = OverwriteMapModal; var _default = OverwriteMapModalFactory; exports["default"] = _default; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL21vZGFscy9vdmVyd3JpdGUtbWFwLW1vZGFsLmpzIl0sIm5hbWVzIjpbIlN0eWxlZE1zZyIsInN0eWxlZCIsImRpdiIsIlN0eWxlZFRpdGxlIiwic3BhbiIsIlN0eWxlZEljb24iLCJTdHlsZWRPdmVyd3JpdGVNYXBNb2RhbCIsIkNlbnRlclZlcnRpY2FsRmxleGJveCIsIk92ZXJ3cml0ZU1hcE1vZGFsRmFjdG9yeSIsIk92ZXJ3cml0ZU1hcE1vZGFsIiwibWFwU2F2ZWQiLCJ0aXRsZSIsImN1cnJlbnRQcm92aWRlciIsImNsb3VkUHJvdmlkZXJzIiwiaXNQcm92aWRlckxvYWRpbmciLCJvblVwZGF0ZUltYWdlU2V0dGluZyIsIm9uU2V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