config Class
Config module holds SDK configuration variables
Currently its only custom domain - which enabled using sdk from different domain (using CORS)
Never set properties directly - always use setter methods
createModule
-
configStorage
Config factory
Parameters
-
configStorage
Object | Nullconfig object
Returns
SDK config module
getBootstrapData
()
Returns information about currently logged in user from bootstrap resource
getCustomDomain
()
Returns current domain
getJsPackage
()
Object
private
Returns JS package and version info
Returns
with 'name' and 'version' properties
getMapboxToken
-
bootstrapData
Returns the mapboxToken for using GeoPushpinChart
Parameters
-
bootstrapData
Any- data from bootstrap resource
sanitizeConfig
()
Object | Undefined
Returns sanitized config
Returns
config with sanitized domain
setCustomDomain
-
domain
Sets custom domain. Parameter is url which has always to be https:// (if you don't provide it, we will do it for you).
RegExp inspired taken from https://github.com/jarib/google-closure-library/blob/master/closure/goog/string/linkify.js
Parameters
-
domain
String | Nullvalid domain starting with https:// or null for removing
setJsPackage
-
name
-
version
Sets JS package and version info
Parameters
-
name
Stringpackage name
-
version
Stringpackage version (semver)