@builder.io/sdk 1.1.28-1 → 1.1.28-2

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.cjs.js CHANGED
@@ -129,7 +129,7 @@ function assertAllowedPropertyName(name) {
129
129
  throw new Error("Property name \"".concat(name, "\" is not allowed"));
130
130
  }
131
131
 
132
- var version = "1.1.28-0";
132
+ var version = "1.1.28-1";
133
133
 
134
134
  var Subscription = /** @class */ (function () {
135
135
  function Subscription(listeners, listener) {
@@ -1113,6 +1113,7 @@ var Builder = /** @class */ (function () {
1113
1113
  this.observersByKey = {};
1114
1114
  this.noEditorUpdates = {};
1115
1115
  this.overrides = {};
1116
+ this.queryOptions = {};
1116
1117
  this.getContentQueue = null;
1117
1118
  this.priorContentQueue = null;
1118
1119
  this.testCookiePrefix = 'builder.tests';
@@ -1724,10 +1725,14 @@ var Builder = /** @class */ (function () {
1724
1725
  var params = QueryString.parseDeep(this.modifySearch(location.search || '').substr(1));
1725
1726
  var builder = params.builder;
1726
1727
  if (builder) {
1727
- 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;
1728
+ 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;
1728
1729
  if (userAttributes) {
1729
1730
  this.setUserAttributes(userAttributes);
1730
1731
  }
1732
+ if (options) {
1733
+ // picking only locale and includeRefs
1734
+ this.queryOptions = tslib.__assign(tslib.__assign({}, (options.locale && { locale: options.locale })), (options.includeRefs && { includeRefs: options.includeRefs }));
1735
+ }
1731
1736
  if (overrides) {
1732
1737
  this.overrides = overrides;
1733
1738
  }
@@ -2199,9 +2204,9 @@ var Builder = /** @class */ (function () {
2199
2204
  var queue = useQueue || (usePastQueue ? this.priorContentQueue : this.getContentQueue) || [];
2200
2205
  // TODO: do this on every request send?
2201
2206
  this.getOverridesFromQueryString();
2202
- var queryParams = tslib.__assign({
2207
+ var queryParams = tslib.__assign(tslib.__assign({
2203
2208
  // TODO: way to force a request to be in a separate queue. or just lower queue limit to be 1 by default
2204
- omit: queue[0].omit || 'meta.componentsUsed', apiKey: this.apiKey }, queue[0].options);
2209
+ omit: queue[0].omit || 'meta.componentsUsed', apiKey: this.apiKey }, queue[0].options), this.queryOptions);
2205
2210
  if (queue[0].fields) {
2206
2211
  queryParams.fields = queue[0].fields;
2207
2212
  }