@builder.io/sdk 2.2.8 → 2.2.9
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 +6 -0
- package/dist/index.browser.js +50 -40
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.js +50 -40
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +50 -40
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +50 -40
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +2 -3
- package/dist/src/builder.class.js +49 -39
- package/dist/src/builder.class.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -3
package/dist/index.esm.js
CHANGED
|
@@ -118,7 +118,7 @@ function assertAllowedPropertyName(name) {
|
|
|
118
118
|
throw new Error("Property name \"".concat(name, "\" is not allowed"));
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
var version = "2.2.
|
|
121
|
+
var version = "2.2.9";
|
|
122
122
|
|
|
123
123
|
var Subscription = /** @class */ (function () {
|
|
124
124
|
function Subscription(listeners, listener) {
|
|
@@ -1748,15 +1748,20 @@ var Builder = /** @class */ (function () {
|
|
|
1748
1748
|
};
|
|
1749
1749
|
Builder.prototype.setTestsFromUrl = function () {
|
|
1750
1750
|
var search = this.getLocation().search;
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1751
|
+
try {
|
|
1752
|
+
var params = QueryString.parseDeep(this.modifySearch(search || '').substr(1));
|
|
1753
|
+
var tests = params.builder && params.builder.tests;
|
|
1754
|
+
if (tests && typeof tests === 'object') {
|
|
1755
|
+
for (var key in tests) {
|
|
1756
|
+
if (tests.hasOwnProperty(key)) {
|
|
1757
|
+
this.setTestCookie(key, tests[key]);
|
|
1758
|
+
}
|
|
1757
1759
|
}
|
|
1758
1760
|
}
|
|
1759
1761
|
}
|
|
1762
|
+
catch (e) {
|
|
1763
|
+
console.debug('Error parsing tests from URL', e);
|
|
1764
|
+
}
|
|
1760
1765
|
};
|
|
1761
1766
|
Builder.prototype.resetOverrides = function () {
|
|
1762
1767
|
// Ugly - pass down instances per request instead using react context
|
|
@@ -1774,41 +1779,46 @@ var Builder = /** @class */ (function () {
|
|
|
1774
1779
|
};
|
|
1775
1780
|
Builder.prototype.getOverridesFromQueryString = function () {
|
|
1776
1781
|
var location = this.getLocation();
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1782
|
+
try {
|
|
1783
|
+
var params = QueryString.parseDeep(this.modifySearch(location.search || '').substr(1));
|
|
1784
|
+
var builder = params.builder;
|
|
1785
|
+
if (builder) {
|
|
1786
|
+
var userAttributes = builder.userAttributes, overrides = builder.overrides, env = builder.env, host = builder.host, api = builder.api, cachebust = builder.cachebust, noCache = builder.noCache, preview = builder.preview, editing = builder.editing, frameEditing = builder.frameEditing, options = builder.options, overrideParams = builder.params;
|
|
1787
|
+
if (userAttributes) {
|
|
1788
|
+
this.setUserAttributes(userAttributes);
|
|
1789
|
+
}
|
|
1790
|
+
if (options) {
|
|
1791
|
+
// picking only locale, includeRefs, and enrich for now
|
|
1792
|
+
this.queryOptions = __assign(__assign(__assign({}, (options.locale && { locale: options.locale })), (options.includeRefs && { includeRefs: options.includeRefs })), (options.enrich && { enrich: options.enrich }));
|
|
1793
|
+
}
|
|
1794
|
+
if (overrides) {
|
|
1795
|
+
this.overrides = overrides;
|
|
1796
|
+
}
|
|
1797
|
+
if (validEnvList.indexOf(env || api) > -1) {
|
|
1798
|
+
this.env = env || api;
|
|
1799
|
+
}
|
|
1800
|
+
if (Builder.isEditing) {
|
|
1801
|
+
var editingModel = frameEditing || editing || preview;
|
|
1802
|
+
if (editingModel && editingModel !== 'true') {
|
|
1803
|
+
this.editingModel = editingModel;
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
if (cachebust) {
|
|
1807
|
+
this.cachebust = true;
|
|
1808
|
+
}
|
|
1809
|
+
if (noCache) {
|
|
1810
|
+
this.noCache = true;
|
|
1811
|
+
}
|
|
1812
|
+
if (preview) {
|
|
1813
|
+
this.preview = true;
|
|
1814
|
+
}
|
|
1815
|
+
if (params) {
|
|
1816
|
+
this.overrideParams = overrideParams;
|
|
1798
1817
|
}
|
|
1799
1818
|
}
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
if (noCache) {
|
|
1804
|
-
this.noCache = true;
|
|
1805
|
-
}
|
|
1806
|
-
if (preview) {
|
|
1807
|
-
this.preview = true;
|
|
1808
|
-
}
|
|
1809
|
-
if (params) {
|
|
1810
|
-
this.overrideParams = overrideParams;
|
|
1811
|
-
}
|
|
1819
|
+
}
|
|
1820
|
+
catch (e) {
|
|
1821
|
+
console.debug('Error parsing overrides from URL', e);
|
|
1812
1822
|
}
|
|
1813
1823
|
};
|
|
1814
1824
|
Builder.prototype.messageFrameLoaded = function () {
|