kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
35 lines (33 loc) • 11.6 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.providerStateReducerFactory = exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _reduxActions = require("redux-actions");
var providerStateUpdaters = _interopRequireWildcard(require("./provider-state-updaters"));
var _actions = require("@kepler.gl/actions");
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; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
/**
* Important: Do not rename `actionHandler` or the assignment pattern of property value.
* It is used to generate documentation
*/
var actionHandler = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _actions.ProviderActionTypes.EXPORT_FILE_TO_CLOUD, providerStateUpdaters.exportFileToCloudUpdater), _actions.ProviderActionTypes.EXPORT_FILE_SUCCESS, providerStateUpdaters.exportFileSuccessUpdater), _actions.ProviderActionTypes.EXPORT_FILE_ERROR, providerStateUpdaters.exportFileErrorUpdater), _actions.ProviderActionTypes.RESET_PROVIDER_STATUS, providerStateUpdaters.resetProviderStatusUpdater), _actions.ProviderActionTypes.POST_SAVE_LOAD_SUCCESS, providerStateUpdaters.postSaveLoadSuccessUpdater), _actions.ProviderActionTypes.LOAD_CLOUD_MAP, providerStateUpdaters.loadCloudMapUpdater), _actions.ProviderActionTypes.LOAD_CLOUD_MAP_SUCCESS, providerStateUpdaters.loadCloudMapSuccessUpdater), _actions.ProviderActionTypes.LOAD_CLOUD_MAP_SUCCESS_2, providerStateUpdaters.loadCloudMapSuccess2Updater), _actions.ProviderActionTypes.LOAD_CLOUD_MAP_ERROR, providerStateUpdaters.loadCloudMapErrorUpdater);
// construct provider-state reducer
var providerStateReducerFactory = exports.providerStateReducerFactory = function providerStateReducerFactory() {
var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return (
// @ts-expect-error
(0, _reduxActions.handleActions)(actionHandler, _objectSpread(_objectSpread(_objectSpread({}, providerStateUpdaters.INITIAL_PROVIDER_STATE), initialState), {}, {
initialState: initialState
}))
);
};
var _default = exports["default"] = providerStateReducerFactory();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVkdXhBY3Rpb25zIiwicmVxdWlyZSIs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