kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
44 lines (40 loc) • 7.47 kB
JavaScript
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.RootContext = exports.FeatureFlagsContextProvider = exports.FeatureFlagsContext = exports.CloudProviderContext = void 0;
var _react = _interopRequireWildcard(require("react"));
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; }
// SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
var identity = function identity(state) {
return state;
};
// New Context API only supported after 16.3
var KeplerGlContext = /*#__PURE__*/(0, _react.createContext)({
selector: identity,
id: 'map'
});
// TODO: breakdown this file into multiple files
var FeatureFlagsContext = exports.FeatureFlagsContext = /*#__PURE__*/(0, _react.createContext)({});
var FeatureFlagsContextProvider = exports.FeatureFlagsContextProvider = function FeatureFlagsContextProvider(props) {
return /*#__PURE__*/_react["default"].createElement(FeatureFlagsContext.Provider, {
value: props.featureFlags || null
}, props.children);
};
/**
* This provides keeps track of the ist cloud providers
* and the current selected one
*/
var CloudProviderContext = exports.CloudProviderContext = /*#__PURE__*/(0, _react.createContext)({
provider: null,
setProvider: function setProvider() {
return;
},
cloudProviders: []
});
var RootContext = exports.RootContext = /*#__PURE__*/(0, _react.createContext)(null);
var _default = exports["default"] = Kepl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