UNPKG

908 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var BootstrapModule = /** @class */ (function () {
4 function BootstrapModule(xhr) {
5 this.xhr = xhr;
6 }
7 /**
8 * Returns information about currently logged in user from bootstrap resource
9 * @method getBootstrapData
10 */
11 BootstrapModule.prototype.getBootstrapData = function () {
12 return this.xhr.get("/gdc/app/account/bootstrap").then(function (result) { return result.getData(); });
13 };
14 /**
15 * Returns the mapboxToken for using GeoPushpinChart
16 * @method getMapboxToken
17 * @param {any} bootstrapData - data from bootstrap resource
18 */
19 BootstrapModule.prototype.getMapboxToken = function (bootstrapData) {
20 return bootstrapData.bootstrapResource.current.mapboxToken || null;
21 };
22 return BootstrapModule;
23}());
24exports.BootstrapModule = BootstrapModule;