UNPKG

@thoughtspot/visual-embed-sdk

Version:
26 lines 980 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setEmbedConfig = exports.getEmbedConfig = void 0; const utils_1 = require("../utils"); const configKey = 'embedConfig'; /** * Gets the configuration embed was initialized with. * @returns {@link EmbedConfig} The configuration embed was initialized with. * @version SDK: 1.19.0 | ThoughtSpot: * * @group Global methods */ const getEmbedConfig = () => (0, utils_1.getValueFromWindow)(configKey) || {}; exports.getEmbedConfig = getEmbedConfig; /** * Sets the configuration embed was initialized with. * And returns the new configuration. * @param newConfig The configuration to set. * @version SDK: 1.27.0 | ThoughtSpot: * * @group Global methods */ const setEmbedConfig = (newConfig) => { (0, utils_1.storeValueInWindow)(configKey, newConfig); return (0, utils_1.getValueFromWindow)(configKey); }; exports.setEmbedConfig = setEmbedConfig; //# sourceMappingURL=embedConfig.js.map