gooddata
Advanced tools
Comparing version 5.0.0-pavelzgdc-pzb-647-telemetrie-2018-03-02T10-05-36-276Z to 5.0.0-pavelzgdc-pzb-647-telemetrie-2018-03-06T15-10-22-548Z
@@ -391,7 +391,6 @@ // Copyright (C) 2007-2017, GoodData(R) Corporation. All rights reserved. | ||
ajaxSetup(settings: IXhrSettings): void; | ||
setSdkPackage(name: string, version: string): void; | ||
setSdkComponent(component: string, props?: Object): void; | ||
setJsPackage(name: string, version: string): void; | ||
} | ||
export interface ISdk { | ||
export interface ISdk { // TODO extends Clonable? | ||
xhr: IXhr; | ||
@@ -398,0 +397,0 @@ project: IProject; |
@@ -76,2 +76,5 @@ 'use strict'; | ||
// TODO jsdoc for factory | ||
function factory() { | ||
@@ -78,0 +81,0 @@ var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
@@ -142,15 +142,7 @@ 'use strict'; | ||
} | ||
function setSdkPackage(name, version) { | ||
setHeaderIfEmpty('X-GDC-UISDK-PKG', name); | ||
setHeaderIfEmpty('X-GDC-UISDK-PKG-VERSION', version); | ||
function setJsPackage(name, version) { | ||
setHeaderIfEmpty('X-GDC-JS-PKG', name); | ||
setHeaderIfEmpty('X-GDC-JS-PKG-VERSION', version); | ||
} | ||
function setSdkComponent(component) { | ||
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; | ||
setHeaderIfEmpty('X-GDC-UISDK-COMP', component); | ||
if ((0, _lodash.isObject)(props)) { | ||
setHeaderIfEmpty('X-GDC-UISDK-COMP-PROPS', Object.keys(props).sort().join(',')); | ||
} | ||
} | ||
function continueAfterTokenRequest(url, settings) { | ||
@@ -295,6 +287,5 @@ return tokenRequest.then(function (response) { | ||
ajaxSetup: ajaxSetup, | ||
setSdkPackage: setSdkPackage, | ||
setSdkComponent: setSdkComponent, | ||
setJsPackage: setJsPackage, | ||
parseJSON: parseJSON | ||
}; | ||
} |
{ | ||
"name": "gooddata", | ||
"version": "5.0.0-pavelzgdc-pzb-647-telemetrie-2018-03-02T10-05-36-276Z", | ||
"version": "5.0.0-pavelzgdc-pzb-647-telemetrie-2018-03-06T15-10-22-548Z", | ||
"author": "GoodData", | ||
@@ -5,0 +5,0 @@ "description": "GoodData JavaScript SDK", |
@@ -48,2 +48,3 @@ // Copyright (C) 2007-2014, GoodData(R) Corporation. All rights reserved. | ||
// TODO jsdoc for factory | ||
function factory(config = {}) { | ||
@@ -50,0 +51,0 @@ return new SDK(config); |
// Copyright (C) 2007-2013, GoodData(R) Corporation. All rights reserved. | ||
import { | ||
isPlainObject, | ||
isObject, | ||
isFunction, | ||
@@ -140,12 +139,6 @@ has, | ||
} | ||
function setSdkPackage(name, version) { | ||
setHeaderIfEmpty('X-GDC-UISDK-PKG', name); | ||
setHeaderIfEmpty('X-GDC-UISDK-PKG-VERSION', version); | ||
function setJsPackage(name, version) { | ||
setHeaderIfEmpty('X-GDC-JS-PKG', name); | ||
setHeaderIfEmpty('X-GDC-JS-PKG-VERSION', version); | ||
} | ||
function setSdkComponent(component, props = undefined) { | ||
setHeaderIfEmpty('X-GDC-UISDK-COMP', component); | ||
if (isObject(props)) { | ||
setHeaderIfEmpty('X-GDC-UISDK-COMP-PROPS', Object.keys(props).sort().join(',')); | ||
} | ||
} | ||
@@ -198,2 +191,3 @@ function continueAfterTokenRequest(url, settings) { | ||
// TODO refactor to: getRequestParams(originalUrl, customSettings); | ||
@@ -285,6 +279,5 @@ const { url, settings } = enrichSettingWithCustomDomain(originalUrl, firstSettings, configStorage.domain); | ||
ajaxSetup, | ||
setSdkPackage, | ||
setSdkComponent, | ||
setJsPackage, | ||
parseJSON | ||
}; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1174750
27363