@braze/web-sdk 4.7.0 → 4.7.1

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Type definitions for @braze/web-sdk v4.7.0
2
+ * Type definitions for @braze/web-sdk v4.7.1
3
3
  * Project: https://github.com/braze-inc/braze-web-sdk
4
4
  * (c) Braze, Inc. 2023 - http://braze.com
5
5
  * License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
@@ -116,8 +116,8 @@
116
116
  /** When this card expires and should stop being shown to the user. */
117
117
  expiresAt: Date | null;
118
118
 
119
- /** Object of string/string key/value pairs. */
120
- extras?: Record<string, any>;
119
+ /** Object of string/string key/value pairs. Defaults to empty object {}. */
120
+ extras: Record<string, string>;
121
121
 
122
122
  /** Whether to pin this card to the top of the view. */
123
123
  pinned: boolean;
@@ -161,7 +161,7 @@
161
161
  url?: string,
162
162
  linkText?: string,
163
163
  aspectRatio?: number,
164
- extras?: Record<string, any>,
164
+ extras?: Record<string, string>,
165
165
  pinned?: boolean,
166
166
  dismissible?: boolean,
167
167
  clicked?: boolean
@@ -238,7 +238,7 @@
238
238
  url?: string,
239
239
  linkText?: string,
240
240
  aspectRatio?: number,
241
- extras?: Record<string, any>,
241
+ extras?: Record<string, string>,
242
242
  pinned?: boolean,
243
243
  dismissible?: boolean,
244
244
  clicked?: boolean
@@ -322,7 +322,7 @@
322
322
  url?: string,
323
323
  linkText?: string,
324
324
  aspectRatio?: number,
325
- extras?: Record<string, any>,
325
+ extras?: Record<string, string>,
326
326
  pinned?: boolean,
327
327
  dismissible?: boolean,
328
328
  clicked?: boolean
@@ -387,7 +387,7 @@
387
387
  viewed?: boolean,
388
388
  updated?: Date,
389
389
  expiresAt?: Date,
390
- extras?: Record<string, any>,
390
+ extras?: Record<string, string>,
391
391
  pinned?: boolean
392
392
  );
393
393
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@braze/web-sdk",
3
- "version": "4.7.0",
3
+ "version": "4.7.1",
4
4
  "description": "Braze SDK for web sites and other JS platforms.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -24,13 +24,13 @@ const Ge = {
24
24
  },
25
25
  warn: function(n) {
26
26
  if (Ge.zg) {
27
- const o = "Braze SDK Warning: " + n + " (v4.7.0)";
27
+ const o = "Braze SDK Warning: " + n + " (v4.7.1)";
28
28
  null != Ge.nd ? Ge.nd(o) : console.warn(o);
29
29
  }
30
30
  },
31
31
  error: function(n) {
32
32
  if (Ge.zg) {
33
- const o = "Braze SDK Error: " + n + " (v4.7.0)";
33
+ const o = "Braze SDK Error: " + n + " (v4.7.1)";
34
34
  null != Ge.nd ? Ge.nd(o) : console.error(o);
35
35
  }
36
36
  }
@@ -3,10 +3,10 @@ export default {
3
3
  Xn: "baseUrl",
4
4
  Zn: "noCookies",
5
5
  ho: "devicePropertyAllowlist",
6
- ta: "disablePushTokenMaintenance",
6
+ ia: "disablePushTokenMaintenance",
7
7
  po: "enableLogging",
8
8
  Eo: "enableSdkAuthentication",
9
- ia: "manageServiceWorkerExternally",
9
+ ta: "manageServiceWorkerExternally",
10
10
  _o: "minimumIntervalBetweenTriggerActionsInSeconds",
11
11
  Io: "sessionTimeoutInSeconds",
12
12
  Ao: "appVersion",
@@ -19,7 +19,7 @@ export default class Card {
19
19
  (this.linkText = T),
20
20
  (o = parseFloat(o)),
21
21
  (this.aspectRatio = isNaN(o) ? null : o),
22
- (this.extras = I),
22
+ (this.extras = I || {}),
23
23
  (this.pinned = a || !1),
24
24
  (this.dismissible = N || !1),
25
25
  (this.dismissed = !1),
@@ -28,10 +28,10 @@ const T = {
28
28
  Xn: "baseUrl",
29
29
  Zn: "noCookies",
30
30
  ho: "devicePropertyAllowlist",
31
- ta: "disablePushTokenMaintenance",
31
+ ia: "disablePushTokenMaintenance",
32
32
  po: "enableLogging",
33
33
  Eo: "enableSdkAuthentication",
34
- ia: "manageServiceWorkerExternally",
34
+ ta: "manageServiceWorkerExternally",
35
35
  _o: "minimumIntervalBetweenTriggerActionsInSeconds",
36
36
  Io: "sessionTimeoutInSeconds",
37
37
  Ao: "appVersion",
@@ -59,7 +59,7 @@ class Bt {
59
59
  (this.Ro = []),
60
60
  (this.Mo = []),
61
61
  (this.Se = []),
62
- (this.jo = "4.7.0");
62
+ (this.jo = "4.7.1");
63
63
  }
64
64
  yo(t) {
65
65
  this.Co.ut(t);
@@ -12,7 +12,7 @@ export default class Kt {
12
12
  }
13
13
  ss() {
14
14
  return {
15
- s: "4.7.0",
15
+ s: "4.7.1",
16
16
  l: this.ol,
17
17
  e: this.fl,
18
18
  a: this.bl,
@@ -26,7 +26,7 @@ export default class Kt {
26
26
  static Pn(t) {
27
27
  let s = t.l;
28
28
  return (
29
- "4.7.0" !== t.s && (s = 0), new Kt(s, t.e, t.a, t.p, t.m, t.v, t.c, t.f)
29
+ "4.7.1" !== t.s && (s = 0), new Kt(s, t.e, t.a, t.p, t.m, t.v, t.c, t.f)
30
30
  );
31
31
  }
32
32
  }
@@ -1,7 +1,7 @@
1
1
  import e, { OPTIONS as T } from "../../managers/braze-instance.js";
2
2
  export function attachCSS(n, t, o) {
3
3
  const c = n || document.querySelector("head"),
4
- s = `ab-${t}-css-definitions-${"4.7.0".replace(/\./g, "-")}`,
4
+ s = `ab-${t}-css-definitions-${"4.7.1".replace(/\./g, "-")}`,
5
5
  a = c.ownerDocument || document;
6
6
  if (null == a.getElementById(s)) {
7
7
  const n = a.createElement("style");