@builder.io/sdk 3.0.2-2 → 3.0.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/.yarnrc.yml +1 -0
- package/CHANGELOG.md +6 -0
- package/dist/index.browser.js +13 -5
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.js +13 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +13 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -49
- package/dist/index.umd.js +13 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +3 -3
- package/dist/src/builder.class.js +12 -4
- package/dist/src/builder.class.js.map +1 -1
- package/dist/src/builder.class.test.js +153 -171
- package/dist/src/classes/animator.class.js +195 -218
- package/dist/src/classes/observable.class.js +97 -102
- 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/constants/builder.js +4 -4
- 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/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/content.js +3 -3
- package/dist/src/types/element.js +3 -3
- package/dist/src/url.js +42 -41
- package/dist/src/url.test.js +118 -222
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -6
- package/dist/src/functions/get-top-level-domain.d.ts +0 -6
- package/dist/src/functions/get-top-level-domain.js +0 -17
- package/dist/src/functions/get-top-level-domain.js.map +0 -1
package/.yarnrc.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npmPublishAccess: "public"
|
package/CHANGELOG.md
CHANGED
package/dist/index.browser.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 = "3.0.2
|
|
155
|
+
var version = "3.0.2";
|
|
156
156
|
|
|
157
157
|
var Subscription = /** @class */ (function () {
|
|
158
158
|
function Subscription(listeners, listener) {
|
|
@@ -1302,6 +1302,17 @@
|
|
|
1302
1302
|
this.setTestsFromUrl();
|
|
1303
1303
|
// TODO: do this on every request send?
|
|
1304
1304
|
this.getOverridesFromQueryString();
|
|
1305
|
+
// cookies used in personalization container script, so need to set before hydration to match script result
|
|
1306
|
+
var userAttrCookie = this.getCookie(Builder.attributesCookieName);
|
|
1307
|
+
if (userAttrCookie) {
|
|
1308
|
+
try {
|
|
1309
|
+
var attributes = JSON.parse(userAttrCookie);
|
|
1310
|
+
this.setUserAttributes(attributes);
|
|
1311
|
+
}
|
|
1312
|
+
catch (err) {
|
|
1313
|
+
console.debug('Error parsing user attributes cookie', err);
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1305
1316
|
}
|
|
1306
1317
|
}
|
|
1307
1318
|
Builder.register = function (type, info) {
|
|
@@ -2191,12 +2202,9 @@
|
|
|
2191
2202
|
};
|
|
2192
2203
|
Builder.prototype.setUserAttributes = function (options) {
|
|
2193
2204
|
assign(Builder.overrideUserAttributes, options);
|
|
2194
|
-
|
|
2205
|
+
if (this.canTrack) {
|
|
2195
2206
|
this.setCookie(Builder.attributesCookieName, JSON.stringify(this.getUserAttributes()));
|
|
2196
2207
|
}
|
|
2197
|
-
catch (_a) {
|
|
2198
|
-
// Ignore
|
|
2199
|
-
}
|
|
2200
2208
|
this.userAttributesChanged.next(options);
|
|
2201
2209
|
};
|
|
2202
2210
|
/**
|