kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
65 lines (64 loc) • 10.6 kB
JavaScript
"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 _localization = require("@kepler.gl/localization");
var _templateObject, _templateObject2, _templateObject3; // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
var StyledUploader = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"])));
var StyledMapIcon = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n margin-right: 16px;\n margin-top: 4px;\n"])), function (props) {
return props.theme.textColorLT;
});
var StyledSvg = _styledComponents["default"].svg(_templateObject3 || (_templateObject3 = (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"])), function (props) {
return props.theme.selectBorderColorLT;
}, function (props) {
return props.theme.selectBorderColorLT;
});
var Line = function Line() {
return /*#__PURE__*/_react["default"].createElement(StyledSvg, {
height: "5px",
width: "150px"
}, /*#__PURE__*/_react["default"].createElement("line", {
x1: "0",
y1: "4",
x2: "150",
y2: "4"
}));
};
var UploadAnimation = exports.UploadAnimation = function UploadAnimation(props) {
return /*#__PURE__*/_react["default"].createElement(StyledUploader, null, /*#__PURE__*/_react["default"].createElement(StyledMapIcon, null, /*#__PURE__*/_react["default"].createElement(_icons.MapIcon, {
height: "48px"
})), /*#__PURE__*/_react["default"].createElement(Line, null), props.icon && /*#__PURE__*/_react["default"].createElement(props.icon, {
height: "64px"
}));
};
var StatusPanel = function StatusPanel(_ref) {
var error = _ref.error,
isLoading = _ref.isLoading,
providerIcon = _ref.providerIcon;
return /*#__PURE__*/_react["default"].createElement(_styledComponents2.StyledExportSection, null, /*#__PURE__*/_react["default"].createElement("div", {
className: "description"
}, /*#__PURE__*/_react["default"].createElement("div", {
className: "title"
}, isLoading ? /*#__PURE__*/_react["default"].createElement(_localization.FormattedMessage, {
id: 'modal.statusPanel.mapUploading'
}) : error ? /*#__PURE__*/_react["default"].createElement(_localization.FormattedMessage, {
id: 'modal.statusPanel.error'
}) : null)), /*#__PURE__*/_react["default"].createElement("div", {
className: "selection"
}, isLoading && /*#__PURE__*/_react["default"].createElement(UploadAnimation, {
icon: providerIcon
}), error && /*#__PURE__*/_react["default"].createElement(_errorDisplay["default"], {
error: error
})));
};
var _default = exports["default"] = StatusPanel;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9zdHlsZWRDb21wb25lbnRzIiwiX2ljb25zIiwiX3N0eWxlZENvbXBvbmVudHMyIiwiX2Vycm9yRGlzcGxheSIsIl9sb2NhbGl6YXRpb24iLCJfdGVtcGxhdGVPYmplY3QiLCJfdGVtcGxhdGVPYmplY3QyIiwiX3RlbXBsYXRlT2JqZWN0MyIsIlN0eWxlZFVwbG9hZGVyIiwic3R5bGVkIiwiZGl2IiwiX3RhZ2dlZFRlbXBsYXRlTGl0ZXJhbDIiLCJTdHlsZWRNYXBJY29uIiwicHJvcHMiLCJ0aGVtZSIsInRleHRDb2xvckxUIiwiU3R5bGVkU3ZnI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