kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
998 lines (987 loc) • 123 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.visStateSchemaV1 = exports.visStateSchemaV0 = exports.visStateSchema = exports.propertiesV1 = exports.propertiesV0 = exports.layerPropsV1 = exports.layerPropsV0 = exports.filterPropsV1 = exports.filterPropsV0 = exports.effectPropsV1 = exports.dimensionPropsV0 = exports["default"] = exports.VisStateSchemaV1 = exports.SplitMapsSchema = exports.PlotTypeSchema = exports.LayerSchemaV0 = exports.InteractionSchemaV1 = exports.FilterSchemaV0 = exports.EffectsSchema = exports.DimensionFieldSchema = void 0;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _lodash = _interopRequireDefault(require("lodash.pick"));
var _versions = require("./versions");
var _constants = require("@kepler.gl/constants");
var _utils = require("@kepler.gl/utils");
var _commonUtils = require("@kepler.gl/common-utils");
var _schema = _interopRequireDefault(require("./schema"));
var _lodash2 = _interopRequireDefault(require("lodash.clonedeep"));
var _excluded = ["enlarged", "view"];
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; }
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
/**
* V0 Schema
*/
var dimensionPropsV0 = exports.dimensionPropsV0 = ['name', 'type'];
// in v0 geojson there is only sizeField
// in v1 geojson
// stroke base on -> sizeField
// height based on -> heightField
// radius based on -> radiusField
// here we make our wiredst guess on which channel sizeField belongs to
function geojsonSizeFieldV0ToV1(config) {
var defaultRaiuds = 10;
var defaultRadiusRange = [0, 50];
// if extruded, sizeField is most likely used for height
if (config.visConfig.extruded) {
return 'heightField';
}
// if show stroke enabled, sizeField is most likely used for stroke
if (config.visConfig.stroked) {
return 'sizeField';
}
// if radius changed, or radius Range Changed, sizeField is most likely used for radius
// this is the most unreliable guess, that's why we put it in the end
if (config.visConfig.radius !== defaultRaiuds || config.visConfig.radiusRange.some(function (d, i) {
return d !== defaultRadiusRange[i];
})) {
return 'radiusField';
}
return 'sizeField';
}
// convert v0 to v1 layer config
var DimensionFieldSchemaV0 = /*#__PURE__*/function (_Schema) {
function DimensionFieldSchemaV0() {
var _this;
(0, _classCallCheck2["default"])(this, DimensionFieldSchemaV0);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _callSuper(this, DimensionFieldSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this, "version", _versions.VERSIONS.v0);
return _this;
}
(0, _inherits2["default"])(DimensionFieldSchemaV0, _Schema);
return (0, _createClass2["default"])(DimensionFieldSchemaV0, [{
key: "save",
value: function save(field) {
// should not be called anymore
return (0, _defineProperty2["default"])({}, this.key, field !== null ? this.savePropertiesOrApplySchema(field)[this.key] : null);
}
}, {
key: "load",
value: function load(field, parents, accumulated) {
var _parents$slice = parents.slice(-1),
_parents$slice2 = (0, _slicedToArray2["default"])(_parents$slice, 1),
config = _parents$slice2[0];
var fieldName = this.key;
if (config.type === 'geojson' && this.key === 'sizeField' && field) {
fieldName = geojsonSizeFieldV0ToV1(config);
}
// fold into visualChannels to be load by VisualChannelSchemaV1
return {
visualChannels: _objectSpread(_objectSpread({}, accumulated.visualChannels || {}), {}, (0, _defineProperty2["default"])({}, fieldName, field))
};
}
}]);
}(_schema["default"]);
var DimensionScaleSchemaV0 = /*#__PURE__*/function (_Schema2) {
function DimensionScaleSchemaV0() {
var _this2;
(0, _classCallCheck2["default"])(this, DimensionScaleSchemaV0);
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
_this2 = _callSuper(this, DimensionScaleSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this2, "version", _versions.VERSIONS.v0);
return _this2;
}
(0, _inherits2["default"])(DimensionScaleSchemaV0, _Schema2);
return (0, _createClass2["default"])(DimensionScaleSchemaV0, [{
key: "save",
value: function save(scale) {
return (0, _defineProperty2["default"])({}, this.key, scale);
}
}, {
key: "load",
value: function load(scale, parents, accumulated) {
var _parents$slice3 = parents.slice(-1),
_parents$slice4 = (0, _slicedToArray2["default"])(_parents$slice3, 1),
config = _parents$slice4[0];
// fold into visualChannels to be load by VisualChannelSchemaV1
if (this.key === 'sizeScale' && config.type === 'geojson') {
// sizeScale now split into radiusScale, heightScale
// no user customization, just use default
return {};
}
return {
visualChannels: _objectSpread(_objectSpread({}, accumulated.visualChannels || {}), {}, (0, _defineProperty2["default"])({}, this.key, scale))
};
}
}]);
}(_schema["default"]); // used to convert v0 to v1 layer config
var LayerConfigSchemaV0 = /*#__PURE__*/function (_Schema3) {
function LayerConfigSchemaV0() {
var _this3;
(0, _classCallCheck2["default"])(this, LayerConfigSchemaV0);
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
_this3 = _callSuper(this, LayerConfigSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this3, "version", _versions.VERSIONS.v0);
return _this3;
}
(0, _inherits2["default"])(LayerConfigSchemaV0, _Schema3);
return (0, _createClass2["default"])(LayerConfigSchemaV0, [{
key: "load",
value: function load(saved, parents, accumulated) {
// fold v0 layer property into config.key
return {
config: _objectSpread(_objectSpread({}, accumulated.config || {}), {}, (0, _defineProperty2["default"])({}, this.key, saved))
};
}
}]);
}(_schema["default"]); // used to convert v0 to v1 layer columns
// only return column value for each column
var LayerColumnsSchemaV0 = /*#__PURE__*/function (_Schema4) {
function LayerColumnsSchemaV0() {
var _this4;
(0, _classCallCheck2["default"])(this, LayerColumnsSchemaV0);
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
_this4 = _callSuper(this, LayerColumnsSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this4, "version", _versions.VERSIONS.v0);
return _this4;
}
(0, _inherits2["default"])(LayerColumnsSchemaV0, _Schema4);
return (0, _createClass2["default"])(LayerColumnsSchemaV0, [{
key: "load",
value: function load(saved, parents, accumulated) {
// fold v0 layer property into config.key, flatten columns
return {
config: _objectSpread(_objectSpread({}, accumulated.config || {}), {}, {
columns: Object.keys(saved).reduce(function (accu, key) {
return _objectSpread(_objectSpread({}, accu), {}, (0, _defineProperty2["default"])({}, key, saved[key].value));
}, {})
})
};
}
}]);
}(_schema["default"]); // used to convert v0 to v1 layer config.visConfig
var LayerConfigToVisConfigSchemaV0 = /*#__PURE__*/function (_Schema5) {
function LayerConfigToVisConfigSchemaV0() {
var _this5;
(0, _classCallCheck2["default"])(this, LayerConfigToVisConfigSchemaV0);
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
args[_key5] = arguments[_key5];
}
_this5 = _callSuper(this, LayerConfigToVisConfigSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this5, "version", _versions.VERSIONS.v0);
return _this5;
}
(0, _inherits2["default"])(LayerConfigToVisConfigSchemaV0, _Schema5);
return (0, _createClass2["default"])(LayerConfigToVisConfigSchemaV0, [{
key: "load",
value: function load(saved, parents, accumulated) {
// fold v0 layer property into config.visConfig
var accumulatedConfig = accumulated.config || {};
return {
config: _objectSpread(_objectSpread({}, accumulatedConfig), {}, {
visConfig: _objectSpread(_objectSpread({}, accumulatedConfig.visConfig || {}), {}, (0, _defineProperty2["default"])({}, this.key, saved))
})
};
}
}]);
}(_schema["default"]);
var LayerVisConfigSchemaV0 = /*#__PURE__*/function (_Schema6) {
function LayerVisConfigSchemaV0() {
var _this6;
(0, _classCallCheck2["default"])(this, LayerVisConfigSchemaV0);
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
args[_key6] = arguments[_key6];
}
_this6 = _callSuper(this, LayerVisConfigSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this6, "version", _versions.VERSIONS.v0);
(0, _defineProperty2["default"])(_this6, "key", 'visConfig');
return _this6;
}
(0, _inherits2["default"])(LayerVisConfigSchemaV0, _Schema6);
return (0, _createClass2["default"])(LayerVisConfigSchemaV0, [{
key: "load",
value: function load(visConfig, parents, accumulator) {
var _parents$slice5 = parents.slice(-1),
_parents$slice6 = (0, _slicedToArray2["default"])(_parents$slice5, 1),
config = _parents$slice6[0];
var rename = {
geojson: {
extruded: 'enable3d',
elevationRange: 'heightRange'
}
};
if (config.type in rename) {
var propToRename = rename[config.type];
return {
config: _objectSpread(_objectSpread({}, accumulator.config || {}), {}, {
visConfig: Object.keys(visConfig).reduce(function (accu, key) {
return _objectSpread(_objectSpread({}, accu), propToRename[key] ? (0, _defineProperty2["default"])({}, propToRename[key], visConfig[key]) : (0, _defineProperty2["default"])({}, key, visConfig[key]));
}, {})
})
};
}
return {
config: _objectSpread(_objectSpread({}, accumulator.config || {}), {}, {
visConfig: visConfig
})
};
}
}]);
}(_schema["default"]);
var LayerConfigSchemaDeleteV0 = /*#__PURE__*/function (_Schema7) {
function LayerConfigSchemaDeleteV0() {
var _this7;
(0, _classCallCheck2["default"])(this, LayerConfigSchemaDeleteV0);
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
args[_key7] = arguments[_key7];
}
_this7 = _callSuper(this, LayerConfigSchemaDeleteV0, [].concat(args));
(0, _defineProperty2["default"])(_this7, "version", _versions.VERSIONS.v0);
return _this7;
}
(0, _inherits2["default"])(LayerConfigSchemaDeleteV0, _Schema7);
return (0, _createClass2["default"])(LayerConfigSchemaDeleteV0, [{
key: "load",
value: function load() {
return {};
}
}]);
}(_schema["default"]);
/**
* V0 -> V1 Changes
* - layer is now a class
* - config saved in a config object
* - id, type, isAggregated is outside layer.config
* - visualChannels is outside config, it defines available visual channel and
* property names for field, scale, domain and range of each visual chanel.
* - enable3d, colorAggregation and sizeAggregation are moved into visConfig
* - GeojsonLayer - added height, radius specific properties
*/
var layerPropsV0 = exports.layerPropsV0 = {
id: null,
type: null,
// move into layer.config
dataId: new LayerConfigSchemaV0({
key: 'dataId'
}),
label: new LayerConfigSchemaV0({
key: 'label'
}),
color: new LayerConfigSchemaV0({
key: 'color'
}),
isVisible: new LayerConfigSchemaV0({
key: 'isVisible'
}),
hidden: new LayerConfigSchemaV0({
key: 'hidden'
}),
// convert visConfig
visConfig: new LayerVisConfigSchemaV0({
key: 'visConfig'
}),
// move into layer.config
// flatten
columns: new LayerColumnsSchemaV0(),
// save into visualChannels
colorField: new DimensionFieldSchemaV0({
properties: dimensionPropsV0,
key: 'colorField'
}),
colorScale: new DimensionScaleSchemaV0({
key: 'colorScale'
}),
sizeField: new DimensionFieldSchemaV0({
properties: dimensionPropsV0,
key: 'sizeField'
}),
sizeScale: new DimensionScaleSchemaV0({
key: 'sizeScale'
}),
// move into config.visConfig
enable3d: new LayerConfigToVisConfigSchemaV0({
key: 'enable3d'
}),
colorAggregation: new LayerConfigToVisConfigSchemaV0({
key: 'colorAggregation'
}),
sizeAggregation: new LayerConfigToVisConfigSchemaV0({
key: 'sizeAggregation'
}),
// delete
isAggregated: new LayerConfigSchemaDeleteV0()
};
/**
* V1 Schema
*/
var ColumnSchemaV1 = /*#__PURE__*/function (_Schema8) {
function ColumnSchemaV1() {
(0, _classCallCheck2["default"])(this, ColumnSchemaV1);
return _callSuper(this, ColumnSchemaV1, arguments);
}
(0, _inherits2["default"])(ColumnSchemaV1, _Schema8);
return (0, _createClass2["default"])(ColumnSchemaV1, [{
key: "save",
value: function save(columns) {
// starting from v1, only save column value
// fieldIdx will be calculated during merge
return (0, _defineProperty2["default"])({}, this.key, Object.keys(columns).reduce(function (accu, ckey) {
var _columns$ckey;
return _objectSpread(_objectSpread({}, accu), (_columns$ckey = columns[ckey]) !== null && _columns$ckey !== void 0 && _columns$ckey.value ? (0, _defineProperty2["default"])({}, ckey, columns[ckey].value) : {});
}, {}));
}
}, {
key: "load",
value: function load(columns) {
return {
columns: columns
};
}
}]);
}(_schema["default"]);
var TextLabelSchemaV1 = /*#__PURE__*/function (_Schema9) {
function TextLabelSchemaV1() {
(0, _classCallCheck2["default"])(this, TextLabelSchemaV1);
return _callSuper(this, TextLabelSchemaV1, arguments);
}
(0, _inherits2["default"])(TextLabelSchemaV1, _Schema9);
return (0, _createClass2["default"])(TextLabelSchemaV1, [{
key: "save",
value: function save(textLabel) {
return (0, _defineProperty2["default"])({}, this.key, textLabel.map(function (tl) {
return _objectSpread(_objectSpread({}, tl), {}, {
field: tl.field ? (0, _lodash["default"])(tl.field, ['name', 'type']) : null
});
}));
}
}, {
key: "load",
value: function load(textLabel) {
return {
textLabel: Array.isArray(textLabel) ? textLabel : [textLabel]
};
}
}]);
}(_schema["default"]);
var visualChannelModificationV1 = {
geojson: function geojson(vc, parents) {
var _LAYER_VIS_CONFIGS$ra;
var _parents$slice7 = parents.slice(-1),
_parents$slice8 = (0, _slicedToArray2["default"])(_parents$slice7, 1),
layer = _parents$slice8[0];
var isOld = !Object.prototype.hasOwnProperty.call(vc, 'strokeColorField');
// make our best guess if this geojson layer contains point
var isPoint = vc.radiusField || layer.config.visConfig.radius !== ((_LAYER_VIS_CONFIGS$ra = _constants.LAYER_VIS_CONFIGS.radius) === null || _LAYER_VIS_CONFIGS$ra === void 0 ? void 0 : _LAYER_VIS_CONFIGS$ra.defaultValue);
if (isOld && !isPoint && layer.config.visConfig.stroked) {
// if stroked is true, copy color config to stroke color config
return {
strokeColorField: vc.colorField,
strokeColorScale: vc.colorScale
};
}
return {};
}
};
/**
* V1: save [field]: {name, type}, [scale]: '' for each channel
*/
var VisualChannelSchemaV1 = /*#__PURE__*/function (_Schema10) {
function VisualChannelSchemaV1() {
(0, _classCallCheck2["default"])(this, VisualChannelSchemaV1);
return _callSuper(this, VisualChannelSchemaV1, arguments);
}
(0, _inherits2["default"])(VisualChannelSchemaV1, _Schema10);
return (0, _createClass2["default"])(VisualChannelSchemaV1, [{
key: "save",
value: function save(visualChannels, parents) {
// only save field and scale of each channel
var _parents$slice9 = parents.slice(-1),
_parents$slice10 = (0, _slicedToArray2["default"])(_parents$slice9, 1),
layer = _parents$slice10[0];
return (0, _defineProperty2["default"])({}, this.key, Object.keys(visualChannels).reduce(
// save channel to null if didn't select any field
function (accu, key) {
return _objectSpread(_objectSpread({}, accu), {}, (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, visualChannels[key].field, layer.config[visualChannels[key].field] ? (0, _lodash["default"])(layer.config[visualChannels[key].field], ['name', 'type']) : null), visualChannels[key].scale, layer.config[visualChannels[key].scale]));
}, {}));
}
}, {
key: "load",
value: function load(vc, parents, accumulator) {
// fold channels into config
var _parents$slice11 = parents.slice(-1),
_parents$slice12 = (0, _slicedToArray2["default"])(_parents$slice11, 1),
layer = _parents$slice12[0];
var modified = visualChannelModificationV1[layer.type] ? visualChannelModificationV1[layer.type](vc, parents, accumulator) : {};
return _objectSpread(_objectSpread({}, accumulator), {}, {
config: _objectSpread(_objectSpread(_objectSpread({}, accumulator.config || {}), vc), modified)
});
}
}]);
}(_schema["default"]);
var visConfigModificationV1 = {
point: function point(visConfig, parents) {
var modified = {};
var _parents$slice13 = parents.slice(-2, -1),
_parents$slice14 = (0, _slicedToArray2["default"])(_parents$slice13, 1),
layer = _parents$slice14[0];
var isOld = !Object.prototype.hasOwnProperty.call(visConfig, 'filled') && !visConfig.strokeColor && !visConfig.strokeColorRange;
if (isOld) {
// color color & color range to stroke color
modified.strokeColor = layer.config.color;
modified.strokeColorRange = (0, _lodash2["default"])(visConfig.colorRange);
if (visConfig.outline) {
// point layer now supports both outline and fill
// for older schema where filled has not been added to point layer
// set it to false
modified.filled = false;
}
}
return modified;
},
geojson: function geojson(visConfig, parents) {
var _LAYER_VIS_CONFIGS$ra2;
// is points?
var modified = {};
var _parents$slice15 = parents.slice(-2, -1),
_parents$slice16 = (0, _slicedToArray2["default"])(_parents$slice15, 1),
layer = _parents$slice16[0];
var isOld = layer.visualChannels && !Object.prototype.hasOwnProperty.call(layer.visualChannels, 'strokeColorField') && !visConfig.strokeColor && !visConfig.strokeColorRange;
// make our best guess if this geojson layer contains point
var isPoint = layer.visualChannels && layer.visualChannels.radiusField || visConfig && visConfig.radius !== ((_LAYER_VIS_CONFIGS$ra2 = _constants.LAYER_VIS_CONFIGS.radius) === null || _LAYER_VIS_CONFIGS$ra2 === void 0 ? void 0 : _LAYER_VIS_CONFIGS$ra2.defaultValue);
if (isOld) {
// color color & color range to stroke color
modified.strokeColor = layer.config.color;
modified.strokeColorRange = (0, _lodash2["default"])(visConfig.colorRange);
if (isPoint) {
// if is point, set stroke to false
modified.filled = true;
modified.stroked = false;
}
}
return modified;
}
};
var VisConfigSchemaV1 = /*#__PURE__*/function (_Schema11) {
function VisConfigSchemaV1() {
var _this8;
(0, _classCallCheck2["default"])(this, VisConfigSchemaV1);
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
args[_key8] = arguments[_key8];
}
_this8 = _callSuper(this, VisConfigSchemaV1, [].concat(args));
(0, _defineProperty2["default"])(_this8, "key", 'visConfig');
return _this8;
}
(0, _inherits2["default"])(VisConfigSchemaV1, _Schema11);
return (0, _createClass2["default"])(VisConfigSchemaV1, [{
key: "load",
value:
// layer.config.visConfig
// colorRange
function load(visConfig, parents, accumulated) {
var _parents$slice17 = parents.slice(-2, -1),
_parents$slice18 = (0, _slicedToArray2["default"])(_parents$slice17, 1),
layer = _parents$slice18[0];
var modified = visConfigModificationV1[layer.type] ? visConfigModificationV1[layer.type](visConfig, parents, accumulated) : {};
var loadedVisConfig = _objectSpread(_objectSpread({}, visConfig), modified);
// backward compatibility, load colorRange and change the name to match new color Palette
['colorRange', 'strokeColorRange'].forEach(function (prop) {
if (loadedVisConfig !== null && loadedVisConfig !== void 0 && loadedVisConfig[prop]) {
loadedVisConfig[prop] = (0, _utils.colorRangeBackwardCompatibility)(loadedVisConfig[prop]);
}
});
return {
visConfig: loadedVisConfig
};
}
}]);
}(_schema["default"]);
var layerPropsV1 = exports.layerPropsV1 = {
id: null,
type: null,
config: new _schema["default"]({
version: _versions.VERSIONS.v1,
key: 'config',
properties: {
dataId: null,
columnMode: null,
label: null,
color: null,
highlightColor: null,
columns: new ColumnSchemaV1({
version: _versions.VERSIONS.v1,
key: 'columns'
}),
isVisible: null,
visConfig: new VisConfigSchemaV1({
version: _versions.VERSIONS.v1
}),
hidden: null,
textLabel: new TextLabelSchemaV1({
version: _versions.VERSIONS.v1,
key: 'textLabel'
})
}
}),
visualChannels: new VisualChannelSchemaV1({
version: _versions.VERSIONS.v1,
key: 'visualChannels'
})
};
var LayerSchemaV0 = exports.LayerSchemaV0 = /*#__PURE__*/function (_Schema12) {
function LayerSchemaV0() {
var _this9;
(0, _classCallCheck2["default"])(this, LayerSchemaV0);
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
args[_key9] = arguments[_key9];
}
_this9 = _callSuper(this, LayerSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this9, "key", 'layers');
return _this9;
}
(0, _inherits2["default"])(LayerSchemaV0, _Schema12);
return (0, _createClass2["default"])(LayerSchemaV0, [{
key: "save",
value: function save(layers, parents) {
var _this10 = this;
var _parents$slice19 = parents.slice(-1),
_parents$slice20 = (0, _slicedToArray2["default"])(_parents$slice19, 1),
visState = _parents$slice20[0];
return (0, _defineProperty2["default"])({}, this.key, visState.layerOrder.reduce(function (saved, layerId) {
// save layers according to their rendering order
var layer = (0, _utils.findById)(layerId)(layers);
if (layer !== null && layer !== void 0 && layer.isValidToSave()) {
saved.push(_this10.savePropertiesOrApplySchema(layer).layers);
}
return saved;
}, []));
}
}, {
key: "load",
value: function load(layers) {
var _this11 = this;
return (0, _defineProperty2["default"])({}, this.key, layers ? layers.map(function (layer) {
return _this11.loadPropertiesOrApplySchema(layer, layers).layers;
}) : []);
}
}]);
}(_schema["default"]);
var FilterSchemaV0 = exports.FilterSchemaV0 = /*#__PURE__*/function (_Schema13) {
function FilterSchemaV0() {
var _this12;
(0, _classCallCheck2["default"])(this, FilterSchemaV0);
for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
args[_key10] = arguments[_key10];
}
_this12 = _callSuper(this, FilterSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this12, "key", 'filters');
return _this12;
}
(0, _inherits2["default"])(FilterSchemaV0, _Schema13);
return (0, _createClass2["default"])(FilterSchemaV0, [{
key: "save",
value: function save(filters) {
var _this13 = this;
return {
filters: filters.filter(_utils.isFilterValidToSave).map(function (filter) {
return _this13.savePropertiesOrApplySchema(filter).filters;
})
};
}
}, {
key: "load",
value: function load(filters) {
var _this14 = this;
return {
filters: filters === null || filters === void 0 ? void 0 : filters.map(function (filter) {
return _this14.loadPropertiesOrApplySchema(filter).filters;
})
// backward compatible convert enlarged to view
.map(function (filter) {
var enlarged = filter.enlarged,
view = filter.view,
filterProps = (0, _objectWithoutProperties2["default"])(filter, _excluded);
var newFilter = _objectSpread(_objectSpread({}, filterProps), {}, {
// if view exist use it otherwise check for enlarged
view: view ? view : enlarged ? _constants.FILTER_VIEW_TYPES.enlarged : _constants.FILTER_VIEW_TYPES.side
});
return newFilter;
})
};
}
}]);
}(_schema["default"]);
var interactionPropsV0 = ['tooltip', 'brush'];
var InteractionSchemaV0 = /*#__PURE__*/function (_Schema14) {
function InteractionSchemaV0() {
var _this15;
(0, _classCallCheck2["default"])(this, InteractionSchemaV0);
for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
args[_key11] = arguments[_key11];
}
_this15 = _callSuper(this, InteractionSchemaV0, [].concat(args));
(0, _defineProperty2["default"])(_this15, "key", 'interactionConfig');
return _this15;
}
(0, _inherits2["default"])(InteractionSchemaV0, _Schema14);
return (0, _createClass2["default"])(InteractionSchemaV0, [{
key: "save",
value: function save(interactionConfig) {
return Array.isArray(this.properties) ? (0, _defineProperty2["default"])({}, this.key, this.properties.reduce(function (accu, key) {
return _objectSpread(_objectSpread({}, accu), interactionConfig[key].enabled ? (0, _defineProperty2["default"])({}, key, interactionConfig[key].config) : {});
}, {})) : {};
}
}, {
key: "load",
value: function load(interactionConfig) {
// convert v0 -> v1
// return enabled: false if disabled,
return Array.isArray(this.properties) ? (0, _defineProperty2["default"])({}, this.key, this.properties.reduce(function (accu, key) {
return _objectSpread(_objectSpread({}, accu), (0, _defineProperty2["default"])({}, key, _objectSpread(_objectSpread({}, interactionConfig[key] || {}), {}, {
enabled: Boolean(interactionConfig[key])
})));
}, {})) : {};
}
}]);
}(_schema["default"]);
var interactionPropsV1 = [].concat(interactionPropsV0, ['geocoder', 'coordinate']);
var InteractionSchemaV1 = exports.InteractionSchemaV1 = /*#__PURE__*/function (_Schema15) {
function InteractionSchemaV1() {
var _this16;
(0, _classCallCheck2["default"])(this, InteractionSchemaV1);
for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
args[_key12] = arguments[_key12];
}
_this16 = _callSuper(this, InteractionSchemaV1, [].concat(args));
(0, _defineProperty2["default"])(_this16, "key", 'interactionConfig');
return _this16;
}
(0, _inherits2["default"])(InteractionSchemaV1, _Schema15);
return (0, _createClass2["default"])(InteractionSchemaV1, [{
key: "save",
value: function save(interactionConfig) {
// save config even if disabled,
return Array.isArray(this.properties) ? (0, _defineProperty2["default"])({}, this.key, this.properties.reduce(function (accu, key) {
return _objectSpread(_objectSpread({}, accu), {}, (0, _defineProperty2["default"])({}, key, _objectSpread(_objectSpread({}, interactionConfig[key].config), {}, {
enabled: interactionConfig[key].enabled
})));
}, {})) : {};
}
}, {
key: "load",
value: function load(interactionConfig) {
var _this17 = this;
var modifiedConfig = interactionConfig;
Object.keys(interactionConfig).forEach(function (configType) {
if (configType === 'tooltip') {
var fieldsToShow = modifiedConfig[configType].fieldsToShow;
if (!(0, _commonUtils.notNullorUndefined)(fieldsToShow)) {
return (0, _defineProperty2["default"])({}, _this17.key, modifiedConfig);
}
Object.keys(fieldsToShow).forEach(function (key) {
// @ts-expect-error name: fieldData should be string
fieldsToShow[key] = fieldsToShow[key].map(function (fieldData) {
if (!fieldData.name) {
return {
name: fieldData,
format: null
};
}
return fieldData;
});
});
}
return;
});
return (0, _defineProperty2["default"])({}, this.key, modifiedConfig);
}
}]);
}(_schema["default"]);
var filterPropsV0 = exports.filterPropsV0 = {
dataId: null,
id: null,
name: null,
type: null,
value: null,
// deprecated
enlarged: null
};
var DimensionFieldSchema = exports.DimensionFieldSchema = /*#__PURE__*/function (_Schema16) {
function DimensionFieldSchema() {
(0, _classCallCheck2["default"])(this, DimensionFieldSchema);
return _callSuper(this, DimensionFieldSchema, arguments);
}
(0, _inherits2["default"])(DimensionFieldSchema, _Schema16);
return (0, _createClass2["default"])(DimensionFieldSchema, [{
key: "save",
value: function save(field) {
return (0, _defineProperty2["default"])({}, this.key, field ? this.savePropertiesOrApplySchema(field)[this.key] : null);
}
}, {
key: "load",
value: function load(field) {
return (0, _defineProperty2["default"])({}, this.key, field);
}
}]);
}(_schema["default"]);
var SplitMapsSchema = exports.SplitMapsSchema = /*#__PURE__*/function (_Schema17) {
function SplitMapsSchema() {
(0, _classCallCheck2["default"])(this, SplitMapsSchema);
return _callSuper(this, SplitMapsSchema, arguments);
}
(0, _inherits2["default"])(SplitMapsSchema, _Schema17);
return (0, _createClass2["default"])(SplitMapsSchema, [{
key: "convertLayerSettings",
value: function convertLayerSettings(accu, _ref19) {
var _ref20 = (0, _slicedToArray2["default"])(_ref19, 2),
key = _ref20[0],
value = _ref20[1];
if (typeof value === 'boolean') {
return _objectSpread(_objectSpread({}, accu), {}, (0, _defineProperty2["default"])({}, key, value));
} else if (value && (0, _typeof2["default"])(value) === 'object' && value.isAvailable) {
return _objectSpread(_objectSpread({}, accu), {}, (0, _defineProperty2["default"])({}, key, Boolean(value.isVisible)));
}
return accu;
}
}, {
key: "load",
value: function load(splitMaps) {
var _this18 = this;
// previous splitMaps Schema {layers: {layerId: {isVisible, isAvailable}}}
if (!Array.isArray(splitMaps) || !splitMaps.length) {
return {
splitMaps: []
};
}
return {
splitMaps: splitMaps.map(function (settings) {
return _objectSpread(_objectSpread({}, settings), {}, {
layers: Object.entries(settings.layers || {}).reduce(_this18.convertLayerSettings, {})
});
})
};
}
}]);
}(_schema["default"]);
var PlotTypeSchema = exports.PlotTypeSchema = /*#__PURE__*/function (_Schema18) {
function PlotTypeSchema() {
var _this19;
(0, _classCallCheck2["default"])(this, PlotTypeSchema);
for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
args[_key13] = arguments[_key13];
}
_this19 = _callSuper(this, PlotTypeSchema, [].concat(args));
(0, _defineProperty2["default"])(_this19, "key", 'plotType');
return _this19;
}
(0, _inherits2["default"])(PlotTypeSchema, _Schema18);
return (0, _createClass2["default"])(PlotTypeSchema, [{
key: "load",
value: function load(plotType) {
if (typeof plotType === 'string') {
return {
plotType: {
type: plotType
}
};
}
return {
plotType: plotType
};
}
}]);
}(_schema["default"]);
var effectPropsV1 = exports.effectPropsV1 = {
id: null,
type: null,
isEnabled: null,
parameters: null
};
var EffectsSchema = exports.EffectsSchema = /*#__PURE__*/function (_Schema19) {
function EffectsSchema() {
var _this20;
(0, _classCallCheck2["default"])(this, EffectsSchema);
for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
args[_key14] = arguments[_key14];
}
_this20 = _callSuper(this, EffectsSchema, [].concat(args));
(0, _defineProperty2["default"])(_this20, "key", 'effects');
return _this20;
}
(0, _inherits2["default"])(EffectsSchema, _Schema19);
return (0, _createClass2["default"])(EffectsSchema, [{
key: "save",
value: function save(effects, parents) {
var _this21 = this;
var _parents$slice21 = parents.slice(-1),
_parents$slice22 = (0, _slicedToArray2["default"])(_parents$slice21, 1),
visState = _parents$slice22[0];
return (0, _defineProperty2["default"])({}, this.key, visState.effectOrder.reduce(function (saved, effectId) {
// save effects according to their rendering order
/**
* @type {Effect | undefined}
*/
var effect = (0, _utils.findById)(effectId)(effects);
if (effect !== null && effect !== void 0 && effect.isValidToSave()) {
saved.push(_this21.savePropertiesOrApplySchema(effect).effects);
}
return saved;
}, []));
}
}, {
key: "load",
value: function load(effects) {
var _this22 = this;
return (0, _defineProperty2["default"])({}, this.key, effects.map(function (effect) {
// handle older configs
var outEffect = effect.config ? _objectSpread(_objectSpread({
id: effect.id
}, effect.config), {}, {
parameters: _objectSpread({}, effect.config.params || {})
}) : effect;
return _this22.loadPropertiesOrApplySchema(outEffect, effects).effects;
}));
}
}]);
}(_schema["default"]);
var filterPropsV1 = exports.filterPropsV1 = _objectSpread(_objectSpread({}, filterPropsV0), {}, {
plotType: new PlotTypeSchema({
version: _versions.VERSIONS.v1
}),
animationWindow: null,
yAxis: new DimensionFieldSchema({
version: _versions.VERSIONS.v1,
key: 'yAxis',
properties: {
name: null,
type: null
}
}),
// this replaced enlarged
view: null,
// polygon filter properties
layerId: null,
speed: null,
// layer timeline
syncedWithLayerTimeline: null,
syncTimelineMode: null,
enabled: null,
invertTrendColor: null,
timezone: null
});
var propertiesV0 = exports.propertiesV0 = {
filters: new FilterSchemaV0({
version: _versions.VERSIONS.v0,
properties: filterPropsV0
}),
layers: new LayerSchemaV0({
version: _versions.VERSIONS.v0,
properties: layerPropsV0
}),
interactionConfig: new InteractionSchemaV0({
version: _versions.VERSIONS.v0,
properties: interactionPropsV0
}),
layerBlending: null,
overlayBlending: null
};
var propertiesV1 = exports.propertiesV1 = {
filters: new FilterSchemaV0({
version: _versions.VERSIONS.v1,
properties: filterPropsV1
}),
layers: new LayerSchemaV0({
version: _versions.VERSIONS.v1,
properties: layerPropsV1
}),
effects: new EffectsSchema({
version: _versions.VERSIONS.v1,
properties: effectPropsV1
}),
interactionConfig: new InteractionSchemaV1({
version: _versions.VERSIONS.v1,
properties: interactionPropsV1
}),
layerBlending: null,
overlayBlending: null,
splitMaps: new SplitMapsSchema({
key: 'splitMaps',
version: _versions.VERSIONS.v1
}),
animationConfig: new _schema["default"]({
version: _versions.VERSIONS.v1,
properties: {
currentTime: null,
speed: null
},
key: 'animationConfig'
}),
editor: new _schema["default"]({
version: _versions.VERSIONS.v1,
properties: {
features: null,
visible: null
},
key: 'editor'
})
};
var VisStateSchemaV1 = exports.VisStateSchemaV1 = /*#__PURE__*/function (_Schema20) {
function VisStateSchemaV1() {
(0, _classCallCheck2["default"])(this, VisStateSchemaV1);
return _callSuper(this, VisStateSchemaV1, arguments);
}
(0, _inherits2["default"])(VisStateSchemaV1, _Schema20);
return (0, _createClass2["default"])(VisStateSchemaV1, [{
key: "save",
value: function save(node) {
var parents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var accumulator = arguments.length > 2 ? arguments[2] : undefined;
// @ts-expect-error
return this.savePropertiesOrApplySchema(node, parents, accumulator);
}
}, {
key: "load",
value: function load(node) {
// @ts-expect-error
return this.loadPropertiesOrApplySchema(node);
}
}]);
}(_schema["default"]);
var visStateSchemaV0 = exports.visStateSchemaV0 = new _schema["default"]({
version: _versions.VERSIONS.v0,
properties: propertiesV0,
key: 'visState'
});
var visStateSchemaV1 = exports.visStateSchemaV1 = new VisStateSchemaV1({
version: _versions.VERSIONS.v1,
properties: propertiesV1,
key: 'visState'
});
var visStateSchema = exports.visStateSchema = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _versions.VERSIONS.v0, {
save: function save(toSave) {
return visStateSchemaV0.save(toSave);
},
load: function load(toLoad) {
var _visStateSchemaV0$loa;
return visStateSchemaV1.load((_visStateSchemaV0$loa = visStateSchemaV0.load(toLoad)) === null || _visStateSchemaV0$loa === void 0 ? void 0 : _visStateSchemaV0$loa.visState);
}
}), _versions.VERSIONS.v1, visStateSchemaV1);
// test load v0
var _default = exports["default"] = visStateSchema;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfdmVyc2lvbnMiLCJfY29uc3RhbnRzIiwiX3V0aWxzIiwiX2NvbW1vblV0aWxzIiwiX3NjaGVtYSIsIl9sb2Rhc2gyIiwiX2V4Y2x1ZGVkIiwib3duS2V5cyIsImUiLCJyIiwidCIsIk9iamVjdCIsImtleXMiLCJnZXRPd25Qcm9wZXJ0eVN5bWJvbHMiLCJvIiwiZmlsdGVyIiwiZ2V0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