UNPKG

kepler.gl

Version:

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

56 lines (55 loc) 12.1 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral")); var _react = _interopRequireDefault(require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/react")); var _reactIntl = require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/react-intl"); var _styledComponents = _interopRequireWildcard(require("/Users/ihordykhta/Desktop/unfolded/kepler.gl/node_modules/styled-components")); var _common = require("../../common"); var _loadingSpinner = _interopRequireDefault(require("../../common/loading-spinner")); var _templateObject, _templateObject2, _templateObject3; // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } var AddDataButton = (0, _styledComponents["default"])(_common.Button)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: inline-flex;\n align-items: center;\n opacity: ", ";\n height: 40px;\n padding: 9px 32px;\n width: ", ";\n\n svg {\n margin-right: ", ";\n }\n"])), function (props) { return props.disabled ? 0.6 : 1; }, function (props) { return props.width; }, function (props) { return props.isLoading ? '0' : '6px'; }); var LoadDataFooterContainer = _styledComponents["default"].div.attrs({ className: 'load-data-footer' })(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n /* position: absolute; */\n width: 100%;\n bottom: 0;\n\n display: flex;\n justify-content: space-between;\n padding: 21px 21px 0px 72px;\n margin: 24px -72px 0;\n align-items: center;\n"]))); var ErrorContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n color: red;\n padding-left: 15px;\n display: inline-block;\n"]))); var LoadDataFooter = function LoadDataFooter(_ref) { var disabled = _ref.disabled, intl = _ref.intl, isLoading = _ref.isLoading, onConfirm = _ref.onConfirm, confirmText = _ref.confirmText, _ref$prependText = _ref.prependText, prependText = _ref$prependText === void 0 ? '' : _ref$prependText, _ref$errorText = _ref.errorText, errorText = _ref$errorText === void 0 ? '' : _ref$errorText, theme = _ref.theme; return /*#__PURE__*/_react["default"].createElement(LoadDataFooterContainer, null, /*#__PURE__*/_react["default"].createElement("div", null, prependText, /*#__PURE__*/_react["default"].createElement(AddDataButton, { disabled: disabled, isLoading: isLoading, onClick: onConfirm, width: "130px", cta: true }, isLoading && /*#__PURE__*/_react["default"].createElement(_loadingSpinner["default"], { color: theme.borderColorLT, borderColor: "transparent", size: 24 }), isLoading ? null : intl.formatMessage({ id: confirmText })), errorText && /*#__PURE__*/_react["default"].createElement(ErrorContainer, null, errorText))); }; var _default = exports["default"] = (0, _styledComponents.withTheme)((0, _reactIntl.injectIntl)(LoadDataFooter)); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9yZWFjdEludGwiLCJfc3R5bGVkQ29tcG9uZW50cyIsIl9pbnRlcm9wUmVxdWlyZVdpbGRjYXJkIiwiX2NvbW1vbiIsIl9sb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