@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.esm.js CHANGED
@@ -1107,6 +1107,7 @@ var Builder = /** @class */ (function () {
1107
1107
  this.observersByKey = {};
1108
1108
  this.noEditorUpdates = {};
1109
1109
  this.overrides = {};
1110
+ this.queryOptions = {};
1110
1111
  this.getContentQueue = null;
1111
1112
  this.priorContentQueue = null;
1112
1113
  this.testCookiePrefix = 'builder.tests';
@@ -1718,10 +1719,14 @@ var Builder = /** @class */ (function () {
1718
1719
  var params = QueryString.parseDeep(this.modifySearch(location.search || '').substr(1));
1719
1720
  var builder = params.builder;
1720
1721
  if (builder) {
1721
- 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;
1722
+ 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;
1722
1723
  if (userAttributes) {
1723
1724
  this.setUserAttributes(userAttributes);
1724
1725
  }
1726
+ if (options) {
1727
+ // picking only locale and includeRefs
1728
+ this.queryOptions = __assign(__assign({}, (options.locale && { locale: options.locale })), (options.includeRefs && { includeRefs: options.includeRefs }));
1729
+ }
1725
1730
  if (overrides) {
1726
1731
  this.overrides = overrides;
1727
1732
  }
@@ -2193,9 +2198,9 @@ var Builder = /** @class */ (function () {
2193
2198
  var queue = useQueue || (usePastQueue ? this.priorContentQueue : this.getContentQueue) || [];
2194
2199
  // TODO: do this on every request send?
2195
2200
  this.getOverridesFromQueryString();
2196
- var queryParams = __assign({
2201
+ var queryParams = __assign(__assign({
2197
2202
  // TODO: way to force a request to be in a separate queue. or just lower queue limit to be 1 by default
2198
- omit: queue[0].omit || 'meta.componentsUsed', apiKey: this.apiKey }, queue[0].options);
2203
+ omit: queue[0].omit || 'meta.componentsUsed', apiKey: this.apiKey }, queue[0].options), this.queryOptions);
2199
2204
  if (queue[0].fields) {
2200
2205
  queryParams.fields = queue[0].fields;
2201
2206
  }