@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.umd.js
CHANGED
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
throw new Error("Property name \"".concat(name, "\" is not allowed"));
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
var version = "2.2.
|
|
155
|
+
var version = "2.2.9";
|
|
156
156
|
|
|
157
157
|
var Subscription = /** @class */ (function () {
|
|
158
158
|
function Subscription(listeners, listener) {
|
|
@@ -1850,15 +1850,20 @@
|
|
|
1850
1850
|
};
|
|
1851
1851
|
Builder.prototype.setTestsFromUrl = function () {
|
|
1852
1852
|
var search = this.getLocation().search;
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1853
|
+
try {
|
|
1854
|
+
var params = QueryString.parseDeep(this.modifySearch(search || '').substr(1));
|
|
1855
|
+
var tests = params.builder && params.builder.tests;
|
|
1856
|
+
if (tests && typeof tests === 'object') {
|
|
1857
|
+
for (var key in tests) {
|
|
1858
|
+
if (tests.hasOwnProperty(key)) {
|
|
1859
|
+
this.setTestCookie(key, tests[key]);
|
|
1860
|
+
}
|
|
1859
1861
|
}
|
|
1860
1862
|
}
|
|
1861
1863
|
}
|
|
1864
|
+
catch (e) {
|
|
1865
|
+
console.debug('Error parsing tests from URL', e);
|
|
1866
|
+
}
|
|
1862
1867
|
};
|
|
1863
1868
|
Builder.prototype.resetOverrides = function () {
|
|
1864
1869
|
// Ugly - pass down instances per request instead using react context
|
|
@@ -1876,41 +1881,46 @@
|
|
|
1876
1881
|
};
|
|
1877
1882
|
Builder.prototype.getOverridesFromQueryString = function () {
|
|
1878
1883
|
var location = this.getLocation();
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1884
|
+
try {
|
|
1885
|
+
var params = QueryString.parseDeep(this.modifySearch(location.search || '').substr(1));
|
|
1886
|
+
var builder = params.builder;
|
|
1887
|
+
if (builder) {
|
|
1888
|
+
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;
|
|
1889
|
+
if (userAttributes) {
|
|
1890
|
+
this.setUserAttributes(userAttributes);
|
|
1891
|
+
}
|
|
1892
|
+
if (options) {
|
|
1893
|
+
// picking only locale, includeRefs, and enrich for now
|
|
1894
|
+
this.queryOptions = __assign(__assign(__assign({}, (options.locale && { locale: options.locale })), (options.includeRefs && { includeRefs: options.includeRefs })), (options.enrich && { enrich: options.enrich }));
|
|
1895
|
+
}
|
|
1896
|
+
if (overrides) {
|
|
1897
|
+
this.overrides = overrides;
|
|
1898
|
+
}
|
|
1899
|
+
if (validEnvList.indexOf(env || api) > -1) {
|
|
1900
|
+
this.env = env || api;
|
|
1901
|
+
}
|
|
1902
|
+
if (Builder.isEditing) {
|
|
1903
|
+
var editingModel = frameEditing || editing || preview;
|
|
1904
|
+
if (editingModel && editingModel !== 'true') {
|
|
1905
|
+
this.editingModel = editingModel;
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
if (cachebust) {
|
|
1909
|
+
this.cachebust = true;
|
|
1910
|
+
}
|
|
1911
|
+
if (noCache) {
|
|
1912
|
+
this.noCache = true;
|
|
1913
|
+
}
|
|
1914
|
+
if (preview) {
|
|
1915
|
+
this.preview = true;
|
|
1916
|
+
}
|
|
1917
|
+
if (params) {
|
|
1918
|
+
this.overrideParams = overrideParams;
|
|
1900
1919
|
}
|
|
1901
1920
|
}
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
if (noCache) {
|
|
1906
|
-
this.noCache = true;
|
|
1907
|
-
}
|
|
1908
|
-
if (preview) {
|
|
1909
|
-
this.preview = true;
|
|
1910
|
-
}
|
|
1911
|
-
if (params) {
|
|
1912
|
-
this.overrideParams = overrideParams;
|
|
1913
|
-
}
|
|
1921
|
+
}
|
|
1922
|
+
catch (e) {
|
|
1923
|
+
console.debug('Error parsing overrides from URL', e);
|
|
1914
1924
|
}
|
|
1915
1925
|
};
|
|
1916
1926
|
Builder.prototype.messageFrameLoaded = function () {
|