@braze/web-sdk 6.5.0 → 6.6.0

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.
Files changed (59) hide show
  1. package/index.d.ts +8 -3
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +11 -11
  4. package/shared-lib/indexed-db-adapter.js +4 -4
  5. package/shared-lib/logger.js +2 -2
  6. package/shared-lib/supported-options.js +14 -13
  7. package/src/Core/disable-sdk.js +8 -7
  8. package/src/Core/enable-sdk.js +3 -3
  9. package/src/Core/is-disabled.js +1 -1
  10. package/src/DUST/dust-provider.js +100 -100
  11. package/src/DUST/dust-shared-worker-impl.js +12 -12
  12. package/src/DUST/dust-worker-bridge.js +11 -11
  13. package/src/DUST/subscribe-to-dust.js +5 -5
  14. package/src/InAppMessage/defer-in-app-message.js +1 -1
  15. package/src/InAppMessage/in-app-message-manager.js +68 -68
  16. package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
  17. package/src/InAppMessage/log-in-app-message-click.js +1 -1
  18. package/src/InAppMessage/log-in-app-message-html-click.js +2 -2
  19. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  20. package/src/InAppMessage/models/full-screen-message.js +7 -7
  21. package/src/InAppMessage/models/html-message.js +8 -8
  22. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  23. package/src/InAppMessage/models/in-app-message.js +42 -42
  24. package/src/InAppMessage/models/modal-message.js +8 -8
  25. package/src/InAppMessage/models/slide-up-message.js +6 -6
  26. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  27. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  28. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  29. package/src/Push/push-manager-factory.js +2 -2
  30. package/src/Push/utils/push-utils.js +6 -6
  31. package/src/User/user-manager.js +2 -2
  32. package/src/User/user.js +9 -9
  33. package/src/common/content-cards-display.js +1 -1
  34. package/src/l10n/l10n-manager-factory.js +1 -1
  35. package/src/managers/braze-instance.js +99 -95
  36. package/src/managers/device-manager.js +2 -2
  37. package/src/managers/network-manager.js +116 -116
  38. package/src/managers/server-config-manager.js +33 -33
  39. package/src/managers/session-manager.js +1 -1
  40. package/src/managers/storage-manager-factory.js +8 -8
  41. package/src/managers/storage-manager.js +45 -48
  42. package/src/managers/subscription-manager.js +8 -8
  43. package/src/models/backend-errors.js +5 -5
  44. package/src/models/braze-event.js +1 -1
  45. package/src/models/device.js +1 -1
  46. package/src/models/push-token.js +6 -6
  47. package/src/models/server-config.js +29 -29
  48. package/src/request-controller.js +91 -91
  49. package/src/triggers/models/trigger-condition.js +25 -25
  50. package/src/triggers/models/trigger.js +7 -7
  51. package/src/triggers/triggers-provider-factory.js +1 -1
  52. package/src/triggers/triggers-provider.js +12 -12
  53. package/src/ui/js/attach-css.js +1 -1
  54. package/src/ui/js/load-font-awesome.js +1 -1
  55. package/src/util/braze-actions.js +2 -2
  56. package/src/util/browser-detector.js +1 -1
  57. package/src/util/net.js +2 -2
  58. package/src/util/request-header-utils.js +12 -12
  59. package/src/util/window-utils.js +1 -1
package/src/util/net.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { logger as E } from "../../shared-lib/index.js";
2
- import Xt from "../models/backend-errors.js";
2
+ import qt from "../models/backend-errors.js";
3
3
  import { getErrorMessage as ai } from "./error-utils.js";
4
4
  const l = {
5
5
  O: (t) => {
@@ -27,7 +27,7 @@ const l = {
27
27
  o = JSON.parse(e.responseText);
28
28
  } catch (o) {
29
29
  const n = {
30
- error: "" === e.responseText ? Xt.yl : Xt.Cl,
30
+ error: "" === e.responseText ? qt.wl : qt.Bl,
31
31
  response: e.responseText,
32
32
  };
33
33
  (0, t.W)(n, r);
@@ -2,13 +2,13 @@ import { REQUEST_ATTEMPT_DEFAULT as Ne } from "../common/constants.js";
2
2
  import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
3
3
  const h = {
4
4
  H: {
5
- Ze: "data",
5
+ _e: "data",
6
6
  vi: "content_cards/sync",
7
7
  wo: "feature_flags/sync",
8
- On: "template",
8
+ Xn: "template",
9
9
  G: "banners/sync",
10
10
  },
11
- bc: (t) => (null == t ? void 0 : t.dt(s.ft.lE)),
11
+ qc: (t) => (null == t ? void 0 : t.dt(s.ft.lE)),
12
12
  Am: (t) => (null == t ? void 0 : t.dt(s.ft._E)),
13
13
  Rm: (t, e) => {
14
14
  null == t || t.bt(s.ft.lE, e);
@@ -16,14 +16,14 @@ const h = {
16
16
  qm: (t, e) => {
17
17
  null == t || t.bt(s.ft._E, e);
18
18
  },
19
- Pl: (t, e) => {
19
+ Ul: (t, e) => {
20
20
  if (!t || !e) return -1;
21
- const s = h.bc(t);
21
+ const s = h.qc(t);
22
22
  if (null == s) return -1;
23
23
  const n = s[e];
24
24
  return null == n || isNaN(n) ? -1 : n;
25
25
  },
26
- Ul: (t, e) => {
26
+ xl: (t, e) => {
27
27
  let s = Ne;
28
28
  if (!t || !e) return s;
29
29
  const n = h.Am(t);
@@ -31,21 +31,21 @@ const h = {
31
31
  },
32
32
  K: (t, e, s) => {
33
33
  if (!t || !e) return;
34
- let n = h.bc(t);
34
+ let n = h.qc(t);
35
35
  null == n && (n = {}), (n[e] = s), h.Rm(t, n);
36
36
  },
37
- xl: (t, e, s) => {
37
+ Hl: (t, e, s) => {
38
38
  if (!t || !e) return;
39
39
  let n = h.Am(t);
40
40
  null == n && (n = {}), (n[e] = s), h.qm(t, n);
41
41
  },
42
42
  fi: (t, e) => {
43
- t && e && h.xl(t, e, Ne);
43
+ t && e && h.Hl(t, e, Ne);
44
44
  },
45
- Zl: (t, e) => {
45
+ hc: (t, e) => {
46
46
  if (!t || !e) return;
47
- const s = h.Ul(t, e);
48
- h.xl(t, e, s + 1);
47
+ const s = h.xl(t, e);
48
+ h.Hl(t, e, s + 1);
49
49
  },
50
50
  };
51
51
  export default h;
@@ -30,5 +30,5 @@ export const WindowUtils = {
30
30
  openUri: _openUri,
31
31
  Ua: _isPhone,
32
32
  Ma: _getOrientation,
33
- gl: _getCurrentUrl,
33
+ _l: _getCurrentUrl,
34
34
  };