@builder.io/sdk 2.2.7-0 → 2.2.7

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/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.6";
155
+ var version = "2.2.7";
156
156
 
157
157
  var Subscription = /** @class */ (function () {
158
158
  function Subscription(listeners, listener) {
@@ -1861,20 +1861,15 @@
1861
1861
  };
1862
1862
  Builder.prototype.setTestsFromUrl = function () {
1863
1863
  var search = this.getLocation().search;
1864
- try {
1865
- var params = QueryString.parseDeep(this.modifySearch(search || '').substr(1));
1866
- var tests = params.builder && params.builder.tests;
1867
- if (tests && typeof tests === 'object') {
1868
- for (var key in tests) {
1869
- if (tests.hasOwnProperty(key)) {
1870
- this.setTestCookie(key, tests[key]);
1871
- }
1864
+ var params = QueryString.parseDeep(this.modifySearch(search || '').substr(1));
1865
+ var tests = params.builder && params.builder.tests;
1866
+ if (tests && typeof tests === 'object') {
1867
+ for (var key in tests) {
1868
+ if (tests.hasOwnProperty(key)) {
1869
+ this.setTestCookie(key, tests[key]);
1872
1870
  }
1873
1871
  }
1874
1872
  }
1875
- catch (e) {
1876
- console.debug('Error parsing tests from URL', e);
1877
- }
1878
1873
  };
1879
1874
  Builder.prototype.resetOverrides = function () {
1880
1875
  // Ugly - pass down instances per request instead using react context
@@ -1892,46 +1887,41 @@
1892
1887
  };
1893
1888
  Builder.prototype.getOverridesFromQueryString = function () {
1894
1889
  var location = this.getLocation();
1895
- try {
1896
- var params = QueryString.parseDeep(this.modifySearch(location.search || '').substr(1));
1897
- var builder = params.builder;
1898
- if (builder) {
1899
- 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;
1900
- if (userAttributes) {
1901
- this.setUserAttributes(userAttributes);
1902
- }
1903
- if (options) {
1904
- // picking only locale, includeRefs, and enrich for now
1905
- this.queryOptions = __assign(__assign(__assign({}, (options.locale && { locale: options.locale })), (options.includeRefs && { includeRefs: options.includeRefs })), (options.enrich && { enrich: options.enrich }));
1906
- }
1907
- if (overrides) {
1908
- this.overrides = overrides;
1909
- }
1910
- if (validEnvList.indexOf(env || api) > -1) {
1911
- this.env = env || api;
1912
- }
1913
- if (Builder.isEditing) {
1914
- var editingModel = frameEditing || editing || preview;
1915
- if (editingModel && editingModel !== 'true') {
1916
- this.editingModel = editingModel;
1917
- }
1918
- }
1919
- if (cachebust) {
1920
- this.cachebust = true;
1921
- }
1922
- if (noCache) {
1923
- this.noCache = true;
1924
- }
1925
- if (preview) {
1926
- this.preview = true;
1927
- }
1928
- if (params) {
1929
- this.overrideParams = overrideParams;
1890
+ var params = QueryString.parseDeep(this.modifySearch(location.search || '').substr(1));
1891
+ var builder = params.builder;
1892
+ if (builder) {
1893
+ var userAttributes = builder.userAttributes, overrides = builder.overrides, env = builder.env; builder.host; var api = builder.api, cachebust = builder.cachebust, noCache = builder.noCache, preview = builder.preview, editing = builder.editing, frameEditing = builder.frameEditing, options = builder.options, overrideParams = builder.params;
1894
+ if (userAttributes) {
1895
+ this.setUserAttributes(userAttributes);
1896
+ }
1897
+ if (options) {
1898
+ // picking only locale, includeRefs, and enrich for now
1899
+ this.queryOptions = __assign(__assign(__assign({}, (options.locale && { locale: options.locale })), (options.includeRefs && { includeRefs: options.includeRefs })), (options.enrich && { enrich: options.enrich }));
1900
+ }
1901
+ if (overrides) {
1902
+ this.overrides = overrides;
1903
+ }
1904
+ if (validEnvList.indexOf(env || api) > -1) {
1905
+ this.env = env || api;
1906
+ }
1907
+ if (Builder.isEditing) {
1908
+ var editingModel = frameEditing || editing || preview;
1909
+ if (editingModel && editingModel !== 'true') {
1910
+ this.editingModel = editingModel;
1930
1911
  }
1931
1912
  }
1932
- }
1933
- catch (e) {
1934
- console.debug('Error parsing overrides from URL', e);
1913
+ if (cachebust) {
1914
+ this.cachebust = true;
1915
+ }
1916
+ if (noCache) {
1917
+ this.noCache = true;
1918
+ }
1919
+ if (preview) {
1920
+ this.preview = true;
1921
+ }
1922
+ if (params) {
1923
+ this.overrideParams = overrideParams;
1924
+ }
1935
1925
  }
1936
1926
  };
1937
1927
  Builder.prototype.messageFrameLoaded = function () {