kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
248 lines (238 loc) • 31.8 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.reducerSchema = exports["default"] = exports.KeplerGLSchema = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _window = require("global/window");
var _datasetSchema = _interopRequireDefault(require("./dataset-schema"));
var _mapStyleSchema = _interopRequireDefault(require("./map-style-schema"));
var _mapStateSchema = _interopRequireDefault(require("./map-state-schema"));
var _visStateSchema = require("./vis-state-schema");
var _uiStateSchema = _interopRequireDefault(require("./ui-state-schema"));
var _versions = require("./versions");
var _utils = require("@kepler.gl/utils");
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
/** Schema for v1 saved configuration */
var reducerSchema = exports.reducerSchema = {
visState: _visStateSchema.visStateSchema,
mapState: _mapStateSchema["default"],
mapStyle: _mapStyleSchema["default"],
uiState: _uiStateSchema["default"]
};
var KeplerGLSchema = exports.KeplerGLSchema = /*#__PURE__*/function () {
function KeplerGLSchema() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref$reducers = _ref.reducers,
reducers = _ref$reducers === void 0 ? reducerSchema : _ref$reducers,
_ref$datasets = _ref.datasets,
datasets = _ref$datasets === void 0 ? _datasetSchema["default"] : _ref$datasets,
_ref$validVersions = _ref.validVersions,
validVersions = _ref$validVersions === void 0 ? _versions.VERSIONS : _ref$validVersions,
_ref$version = _ref.version,
version = _ref$version === void 0 ? _versions.CURRENT_VERSION : _ref$version,
composedReducerSchema = _ref.composedReducerSchema;
(0, _classCallCheck2["default"])(this, KeplerGLSchema);
(0, _defineProperty2["default"])(this, "_validVersions", void 0);
(0, _defineProperty2["default"])(this, "_version", void 0);
(0, _defineProperty2["default"])(this, "_reducerSchemas", void 0);
(0, _defineProperty2["default"])(this, "_datasetSchema", void 0);
(0, _defineProperty2["default"])(this, "_datasetLastSaved", void 0);
(0, _defineProperty2["default"])(this, "_savedDataset", void 0);
(0, _defineProperty2["default"])(this, "_composedReducerSchema", void 0);
this._validVersions = validVersions;
this._version = version;
this._reducerSchemas = reducers;
this._datasetSchema = datasets;
this._composedReducerSchema = composedReducerSchema || null;
this._datasetLastSaved = null;
this._savedDataset = null;
}
/**
* stateToSave = {
* datasets: [
* {
* version: 'v0',
* data: {id, label, color, allData, fields}
* },
* {
* version: 'v0',
* data: {id, label, color, allData, fields}
* }
* ],
* config: {
* version: 'v0',
* config: {}
* },
* info: {
* app: 'kepler.gl',
* create_at: 'Mon May 28 2018 21:04:46 GMT-0700 (PDT)'
* }
* }
*
* Get config and data of current map to save
* @param state
* @returns app state to save
*/
return (0, _createClass2["default"])(KeplerGLSchema, [{
key: "save",
value: function save(state) {
return {
datasets: this.getDatasetToSave(state),
config: this.getConfigToSave(state),
info: _objectSpread({
app: 'kepler.gl',
created_at: new Date().toString()
}, this.getMapInfo(state))
};
}
}, {
key: "getMapInfo",
value: function getMapInfo(state) {
return state.visState.mapInfo;
}
/**
* Load saved map, argument can be (datasets, config) or ({datasets, config})
* @param savedDatasets
* @param savedConfig
*/
}, {
key: "load",
value: function load() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
// if pass dataset and config in as a single object
if (args.length === 1 && (0, _utils.isPlainObject)(args[0]) && (Array.isArray(args[0].datasets) || (0, _utils.isPlainObject)(args[0].config))) {
return this.load(args[0].datasets, args[0].config);
}
return _objectSpread(_objectSpread({}, Array.isArray(args[0]) ? {
datasets: this.parseSavedData(args[0])
} : {}), args[1] ? {
config: this.parseSavedConfig(args[1])
} : {});
}
/**
* Get data to save
* @param state - app state
* @returns - dataset to save
*/
}, {
key: "getDatasetToSave",
value: function getDatasetToSave(state) {
var _this = this;
var dataChangedSinceLastSave = this.hasDataChanged(state);
if (!dataChangedSinceLastSave) {
// @ts-expect-error
return this._savedDataset;
}
var visState = state.visState;
var datasets = Object.values(visState.datasets).map(function (ds) {
return {
version: _this._version,
data: _this._datasetSchema[_this._version].save(ds)
};
});
// keep a copy of formatted datasets to save
this._datasetLastSaved = visState.datasets;
this._savedDataset = datasets;
return datasets;
}
/**
* Get App config to save
* @param state - app state
* @returns - config to save
*/
}, {
key: "getConfigToSave",
value: function getConfigToSave(state) {
var _this$_composedReduce,
_this2 = this;
var toSave = typeof ((_this$_composedReduce = this._composedReducerSchema) === null || _this$_composedReduce === void 0 ? void 0 : _this$_composedReduce.save) === 'function' ? this._composedReducerSchema.save(state) : state;
var config = Object.keys(this._reducerSchemas).reduce(function (accu, key) {
return _objectSpread(_objectSpread({}, accu), toSave[key] ? _this2._reducerSchemas[key][_this2._version].save(toSave[key]) : {});
}, {});
return {
version: this._version,
// @ts-expect-error
config: config
};
}
/**
* Parse saved data
* @param datasets
* @returns - dataset to pass to addDataToMap
*/
}, {
key: "parseSavedData",
value: function parseSavedData(datasets) {
var _this3 = this;
return datasets.reduce(function (accu, ds) {
var validVersion = _this3.validateVersion(ds.version);
if (!validVersion) {
return accu;
}
accu.push(_this3._datasetSchema[validVersion].load(ds.data));
return accu;
}, []);
}
/**
* Parse saved App config
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
}, {
key: "parseSavedConfig",
value: function parseSavedConfig(_ref2) {
var _this$_composedReduce2,
_this4 = this;
var version = _ref2.version,
config = _ref2.config;
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var validVersion = this.validateVersion(version);
if (!validVersion) {
return null;
}
var toLoad = typeof ((_this$_composedReduce2 = this._composedReducerSchema) === null || _this$_composedReduce2 === void 0 ? void 0 : _this$_composedReduce2.load) === 'function' ? this._composedReducerSchema.load(config) : config;
return Object.keys(toLoad).reduce(function (accu, key) {
return _objectSpread(_objectSpread({}, accu), key in _this4._reducerSchemas ? _this4._reducerSchemas[key][validVersion].load(toLoad[key]) : {});
}, {});
}
/**
* Validate version
* @param version
* @returns validVersion
*/
}, {
key: "validateVersion",
value: function validateVersion(version) {
if (!version) {
_window.console.error('There is no version number associated with this saved map');
return null;
}
if (!this._validVersions[version]) {
_window.console.error("".concat(version, " is not a valid version"));
return null;
}
return version;
}
/**
* Check if data has changed since last save
* @param state
* @returns - whether data has changed or not
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
}, {
key: "hasDataChanged",
value: function hasDataChanged(state) {
return true;
}
}]);
}();
var KeplerGLSchemaManager = new KeplerGLSchema();
var _default = exports["default"] = KeplerGLSchemaManager;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfd2luZG93IiwicmVxdWlyZSIsIl9kYXRhc2V0U2NoZW1hIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsIl9tYXBTdHlsZVNjaGVtYSIsIl9tYXBTdGF0ZVNjaGVtYSIsIl92aXNTdGF0ZVNjaGVtYSIsIl91aVN0YXRlU2NoZW1hIiwiX3ZlcnNpb25zIiwiX3V0aWxzIiwib3duS2V5cyIsImUiLCJyIiwidCIsIk9iamVjdCIsImtleXMiLCJnZXRPd25Qcm9wZ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