UNPKG

kepler.gl

Version:

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

111 lines (85 loc) 10.2 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.UploadAnimation = void 0; var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral")); var _react = _interopRequireDefault(require("react")); var _styledComponents = _interopRequireDefault(require("styled-components")); var _icons = require("../common/icons"); var _styledComponents2 = require("../common/styled-components"); var _errorDisplay = _interopRequireDefault(require("./error-display")); var _reactIntl = require("react-intl"); function _templateObject3() { var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: 16px;\n\n line {\n stroke: ", ";\n stroke-width: 4;\n stroke-linecap: square;\n stroke-dasharray: 5 12;\n animation: dash-animation 25s infinite linear;\n }\n circle {\n fill: ", ";\n }\n\n @keyframes dash-animation {\n to {\n stroke-dashoffset: -1000;\n }\n }\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n margin-right: 16px;\n margin-top: 4px;\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"]); _templateObject = function _templateObject() { return data; }; return data; } var StyledUploader = _styledComponents["default"].div(_templateObject()); var StyledMapIcon = _styledComponents["default"].div(_templateObject2(), function (props) { return props.theme.textColorLT; }); var StyledSvg = _styledComponents["default"].svg(_templateObject3(), function (props) { return props.theme.selectBorderColorLT; }, function (props) { return props.theme.selectBorderColorLT; }); var Line = function Line() { return _react["default"].createElement(StyledSvg, { height: "5px", width: "150px" }, _react["default"].createElement("line", { x1: "0", y1: "4", x2: "150", y2: "4" })); }; var UploadAnimation = function UploadAnimation(props) { return _react["default"].createElement(StyledUploader, null, _react["default"].createElement(StyledMapIcon, null, _react["default"].createElement(_icons.MapIcon, { height: "48px" })), _react["default"].createElement(Line, null), props.icon && _react["default"].createElement(props.icon, { height: "64px" })); }; exports.UploadAnimation = UploadAnimation; var StatusPanel = function StatusPanel(_ref) { var error = _ref.error, isLoading = _ref.isLoading, providerIcon = _ref.providerIcon; return _react["default"].createElement(_styledComponents2.StyledExportSection, null, _react["default"].createElement("div", { className: "description" }, _react["default"].createElement("div", { className: "title" }, isLoading ? _react["default"].createElement(_reactIntl.FormattedMessage, { id: 'modal.statusPanel.mapUploading' }) : error ? _react["default"].createElement(_reactIntl.FormattedMessage, { id: 'modal.statusPanel.error' }) : null)), _react["default"].createElement("div", { className: "selection" }, isLoading && _react["default"].createElement(UploadAnimation, { icon: providerIcon }), error && _react["default"].createElement(_errorDisplay["default"], { error: error }))); }; var _default = StatusPanel; exports["default"] = _default; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL21vZGFscy9zdGF0dXMtcGFuZWwuanMiXSwibmFtZXMiOlsiU3R5bGVkVXBsb2FkZXIiLCJzdHlsZWQiLCJkaXYiLCJTdHlsZWRNYXBJY29uIiwicHJvcHMiLCJ0aGVtZSIsInRleHRDb2xvckxUIiwiU3R5bGVkU3ZnIiwic3ZnIiwic2VsZWN0Qm9yZGVyQ29sb3JMVCIsIkxpbmUiLCJVcGxvYWRBbmltYXRpb24iLCJpY29uIiwiU3RhdHVzUGFuZWwiLCJlcnJvciIsImlzTG9hZGluZyIsInByb3ZpZGVySWNvbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFvQkE7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBQ0E7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRUEsSUFBTUEsY0FBYyxHQUFHQyw2QkFBT0MsR0FBVixtQkFBcEI7O0FBTUEsSUFBTUMs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