@builder.io/sdk 6.1.1 → 6.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.browser.js +27 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.js +27 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +27 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +27 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/builder.class.d.ts +3 -0
- package/dist/src/builder.class.js +26 -1
- package/dist/src/builder.class.js.map +1 -1
- package/dist/src/builder.class.test.js +34 -0
- package/dist/src/builder.class.test.js.map +1 -1
- package/dist/src/sdk-version.d.ts +1 -1
- package/dist/src/sdk-version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1052,7 +1052,7 @@
|
|
|
1052
1052
|
|
|
1053
1053
|
var DEFAULT_API_VERSION = 'v3';
|
|
1054
1054
|
|
|
1055
|
-
var SDK_VERSION = '6.1.
|
|
1055
|
+
var SDK_VERSION = '6.1.3';
|
|
1056
1056
|
|
|
1057
1057
|
function datePlusMinutes(minutes) {
|
|
1058
1058
|
if (minutes === void 0) { minutes = 30; }
|
|
@@ -1210,6 +1210,7 @@
|
|
|
1210
1210
|
this.hasOverriddenCanTrack = false;
|
|
1211
1211
|
this.apiKey$ = new BehaviorSubject(null);
|
|
1212
1212
|
this.authToken$ = new BehaviorSubject(null);
|
|
1213
|
+
this.contentId$ = new BehaviorSubject(null);
|
|
1213
1214
|
this.userAttributesChanged = new BehaviorSubject(null);
|
|
1214
1215
|
this.editingMode$ = new BehaviorSubject(isIframe);
|
|
1215
1216
|
// TODO: decorator to do this stuff with the get/set (how do with typing too? compiler?)
|
|
@@ -1805,7 +1806,21 @@
|
|
|
1805
1806
|
}
|
|
1806
1807
|
var meta = typeof contentId === 'object' ? contentId : customProperties;
|
|
1807
1808
|
var useContentId = typeof contentId === 'string' ? contentId : undefined;
|
|
1808
|
-
|
|
1809
|
+
if (!useContentId && !contentId && this.contentId) {
|
|
1810
|
+
useContentId = this.contentId;
|
|
1811
|
+
}
|
|
1812
|
+
var useVariationId = variationId;
|
|
1813
|
+
if (!useVariationId && useContentId) {
|
|
1814
|
+
useVariationId = this.getTestCookie(useContentId);
|
|
1815
|
+
}
|
|
1816
|
+
this.track('conversion', {
|
|
1817
|
+
amount: amount,
|
|
1818
|
+
variationId: useVariationId && useContentId && useVariationId !== useContentId
|
|
1819
|
+
? useVariationId
|
|
1820
|
+
: undefined,
|
|
1821
|
+
meta: meta,
|
|
1822
|
+
contentId: useContentId,
|
|
1823
|
+
}, context);
|
|
1809
1824
|
};
|
|
1810
1825
|
Object.defineProperty(Builder.prototype, "isDevelopmentEnv", {
|
|
1811
1826
|
// TODO: set this for QA
|
|
@@ -1883,6 +1898,16 @@
|
|
|
1883
1898
|
enumerable: false,
|
|
1884
1899
|
configurable: true
|
|
1885
1900
|
});
|
|
1901
|
+
Object.defineProperty(Builder.prototype, "contentId", {
|
|
1902
|
+
get: function () {
|
|
1903
|
+
return this.contentId$.value;
|
|
1904
|
+
},
|
|
1905
|
+
set: function (id) {
|
|
1906
|
+
this.contentId$.next(id);
|
|
1907
|
+
},
|
|
1908
|
+
enumerable: false,
|
|
1909
|
+
configurable: true
|
|
1910
|
+
});
|
|
1886
1911
|
Object.defineProperty(Builder.prototype, "authToken", {
|
|
1887
1912
|
get: function () {
|
|
1888
1913
|
return this.authToken$.value;
|