@builder.io/sdk 1.1.28-6 → 1.1.28

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
@@ -1204,6 +1204,7 @@
1204
1204
  this.observersByKey = {};
1205
1205
  this.noEditorUpdates = {};
1206
1206
  this.overrides = {};
1207
+ this.queryOptions = {};
1207
1208
  this.getContentQueue = null;
1208
1209
  this.priorContentQueue = null;
1209
1210
  this.testCookiePrefix = 'builder.tests';
@@ -1815,10 +1816,14 @@
1815
1816
  var params = QueryString.parseDeep(this.modifySearch(location.search || '').substr(1));
1816
1817
  var builder = params.builder;
1817
1818
  if (builder) {
1818
- 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, overrideParams = builder.params;
1819
+ 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;
1819
1820
  if (userAttributes) {
1820
1821
  this.setUserAttributes(userAttributes);
1821
1822
  }
1823
+ if (options) {
1824
+ // picking only locale and includeRefs
1825
+ this.queryOptions = __assign(__assign({}, (options.locale && { locale: options.locale })), (options.includeRefs && { includeRefs: options.includeRefs }));
1826
+ }
1822
1827
  if (overrides) {
1823
1828
  this.overrides = overrides;
1824
1829
  }
@@ -2290,9 +2295,9 @@
2290
2295
  var queue = useQueue || (usePastQueue ? this.priorContentQueue : this.getContentQueue) || [];
2291
2296
  // TODO: do this on every request send?
2292
2297
  this.getOverridesFromQueryString();
2293
- var queryParams = __assign({
2298
+ var queryParams = __assign(__assign({
2294
2299
  // TODO: way to force a request to be in a separate queue. or just lower queue limit to be 1 by default
2295
- omit: queue[0].omit || 'meta.componentsUsed', apiKey: this.apiKey }, queue[0].options);
2300
+ omit: queue[0].omit || 'meta.componentsUsed', apiKey: this.apiKey }, queue[0].options), this.queryOptions);
2296
2301
  if (queue[0].fields) {
2297
2302
  queryParams.fields = queue[0].fields;
2298
2303
  }