@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/.yarnrc.yml +1 -0
- package/CHANGELOG.md +6 -0
- package/dist/index.browser.js +40 -50
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.js +40 -50
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +40 -50
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +40 -50
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/builder.class.js +39 -49
- package/dist/src/builder.class.js.map +1 -1
- package/dist/src/classes/promise.class.js +154 -150
- package/dist/src/classes/query-string.class.js +74 -73
- package/dist/src/classes/query-string.class.test.js +20 -20
- package/dist/src/functions/assign.function.js +19 -19
- package/dist/src/functions/fetch.function.js +75 -97
- package/dist/src/functions/finder.function.js +274 -389
- package/dist/src/functions/get-top-level-domain.js +8 -8
- package/dist/src/functions/next-tick.function.js +23 -26
- package/dist/src/functions/omit.function.js +13 -13
- package/dist/src/functions/server-only-require.function.js +9 -10
- package/dist/src/functions/throttle.function.js +37 -35
- package/dist/src/functions/to-error.js +6 -5
- package/dist/src/functions/uuid.js +8 -9
- package/dist/src/types/api-version.js +3 -3
- package/dist/src/types/element.js +3 -3
- package/dist/src/url.test.js +118 -222
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -4
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.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
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
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
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
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
|
-
|
|
1934
|
-
|
|
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 () {
|