Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_encodeQuery: function (params) {
var _params = utils.deepExtend({}, params.where);
_params.select = params.select;
_params.gapfilling = params.gapfilling;
// todo: WS doesn't support value `*` for geo parameter
// remove this condition when geo will be removed from params.where (when you need all geo props)
if (_params.geo && _params.geo.length === 1 && _params.geo[0] === '*') {
delete _params.geo;
}
// todo: formatting date according to precision (year, month, etc)
if (_params.time) {
_params.time[0] = _params.time[0].map(function (year) {
return typeof year === 'object' ? year.getFullYear() : year;
});
}
getActiveProfile(profiles, presentationProfileChanges) {
// get layout values
const layoutProfile = this.getLayoutProfile();
const presentationMode = this.getPresentationMode();
const activeProfile = utils.deepClone(profiles[layoutProfile]); // clone so it can be extended without changing the original profile
// extend the profile with presentation mode values
if (presentationMode && (presentationProfileChanges || {})[layoutProfile]) {
utils.deepExtend(activeProfile, presentationProfileChanges[layoutProfile]);
}
return activeProfile;
},
_encodeQuery: function (params) {
var _params = utils.deepExtend({}, params.where);
_params.select = params.select;
_params.gapfilling = params.gapfilling;
// todo: WS doesn't support value `*` for geo parameter
// remove this condition when geo will be removed from params.where (when you need all geo props)
if (_params.geo && _params.geo.length === 1 && _params.geo[0] === '*') {
delete _params.geo;
}
var result = [];
// create `key=value` pairs for url query string
Object.keys(_params).map(function (key) {
var value = QueryEncoder.encodeQuery(_params[key]);
if (value) {
result.push(key + '=' + value);
getClassDefaults() {
const defaults = {
use: null,
which: null
};
return utils.deepExtend(this._super(), defaults);
},
getClassDefaults() {
const defaults = {
show: {},
showFallback: {},
showItemsMaxCount: null,
filter: {},
dim: null,
skipFilter: false
};
return utils.deepExtend(this._super(), defaults);
},
getPersistentMinimalModel(diffModel) {
const defaultModel = this.model.getDefaults();
const currentPersistentModel = this.getPersistentModel();
const redundantModel = utils.deepExtend(defaultModel, diffModel);
return utils.diffObject(currentPersistentModel, redundantModel);
},
getClassDefaults() {
const defaults = {
reader: "csv"
};
return utils.deepExtend(this._super(), defaults);
},
utils.forEach(this.model.marker._root._data, m => {
if (m._type === "data") utils.deepExtend(indicatorsDB, m.getConceptprops());
});
getClassDefaults() {
const defaults = {
use: null,
which: null,
domainMin: null,
domainMax: null,
zoomedMin: null,
zoomedMax: null,
extent: [0, 0.85],
scaleType: null,
allow: {
scales: ["ordinal", "linear", "log", "genericLog", "pow"]
}
};
return utils.deepExtend(this._super(), defaults);
},
getDefaults() {
return utils.deepExtend({}, this.getClassDefaults(), this.getSubmodelDefaults());
},