@braze/web-sdk 6.10.2 → 6.11.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.
- package/index.d.ts +28 -4
- package/package.json +1 -1
- package/shared-lib/encoding-utils.js +3 -3
- package/shared-lib/event-types.js +10 -10
- package/shared-lib/indexed-db-adapter.js +51 -51
- package/shared-lib/logger.js +7 -7
- package/shared-lib/supported-options.js +9 -9
- package/src/Core/logout.js +2 -2
- package/src/InAppMessage/constants.js +39 -47
- package/src/InAppMessage/display/html-message-to-html.js +1 -1
- package/src/InAppMessage/display/in-app-message-to-html.js +38 -36
- package/src/InAppMessage/in-app-message-factory.js +4 -4
- package/src/InAppMessage/in-app-message-manager.js +89 -68
- package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
- package/src/InAppMessage/log-in-app-message-click.js +1 -1
- package/src/InAppMessage/log-in-app-message-html-click.js +2 -2
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/full-screen-message.js +22 -22
- package/src/InAppMessage/models/html-message.js +13 -13
- package/src/InAppMessage/models/in-app-message-button.js +2 -2
- package/src/InAppMessage/models/in-app-message.js +68 -66
- package/src/InAppMessage/models/modal-message.js +20 -20
- package/src/InAppMessage/models/slide-up-message.js +25 -25
- package/src/InAppMessage/models/templated-in-app-message.js +6 -6
- package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
- package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
- package/src/InAppMessage/ui/show-in-app-message.js +27 -25
- package/src/Push/index.js +1 -0
- package/src/Push/push-manager-factory.js +4 -4
- package/src/Push/push-manager.js +222 -179
- package/src/Push/register-push.js +9 -0
- package/src/Push/unregister-push-token-on-server.js +4 -4
- package/src/Push/utils/push-utils.js +8 -8
- package/src/User/user-manager.js +19 -19
- package/src/User/user.js +35 -35
- package/src/common/constants.js +1 -1
- package/src/common/content-cards-display.js +5 -5
- package/src/l10n/l10n-manager-factory.js +1 -1
- package/src/l10n/l10n-manager.js +1 -1
- package/src/managers/braze-instance.js +42 -38
- package/src/managers/device-manager.js +20 -20
- package/src/managers/network-manager.js +122 -122
- package/src/managers/server-config-manager.js +76 -76
- package/src/managers/session-manager.js +8 -8
- package/src/managers/storage-manager.js +127 -127
- package/src/managers/utils.js +1 -1
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +2 -2
- package/src/models/device.js +3 -3
- package/src/models/identifier.js +6 -6
- package/src/models/push-token.js +6 -6
- package/src/models/server-config.js +24 -24
- package/src/request-controller.js +85 -85
- package/src/triggers/models/trigger-condition.js +27 -27
- package/src/triggers/models/trigger.js +2 -2
- package/src/triggers/triggers-provider-factory.js +1 -1
- package/src/triggers/triggers-provider.js +37 -29
- package/src/types.js +2 -2
- package/src/ui/js/attach-css.js +1 -1
- package/src/util/base-device-parser.js +1 -1
- package/src/util/braze-actions.js +4 -4
- package/src/util/browser-detector.js +5 -5
- package/src/util/client-hints-parser.js +1 -1
- package/src/util/dom-utils.js +2 -2
- package/src/util/ecommerce-event-validation.js +1 -1
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +3 -3
- package/src/util/request-header-utils.js +15 -15
- package/src/util/user-agent-parser.js +4 -4
- package/src/util/validation-utils.js +5 -5
- package/src/util/window-utils.js +2 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Type definitions for @braze/web-sdk v6.
|
|
2
|
+
* Type definitions for @braze/web-sdk v6.11.0
|
|
3
3
|
* Project: https://github.com/braze-inc/braze-web-sdk
|
|
4
4
|
* (c) Braze, Inc. 2026 - http://braze.com
|
|
5
5
|
* License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
|
|
@@ -2537,7 +2537,7 @@ export function openSession(): void;
|
|
|
2537
2537
|
|
|
2538
2538
|
/**
|
|
2539
2539
|
* Logs out the current user. This unregisters push for this browser via `unregisterPush`, and on success
|
|
2540
|
-
*
|
|
2540
|
+
* disables the SDK (see `disableSDK`) and wipes all locally stored SDK data (see `wipeData`).
|
|
2541
2541
|
*
|
|
2542
2542
|
* @param successCallback - When the user is successfully logged out, this callback will be invoked.
|
|
2543
2543
|
* @param errorCallback - If the logout fails for unknown reasons, this callback will be invoked.
|
|
@@ -2559,7 +2559,7 @@ export function logout(
|
|
|
2559
2559
|
* - Create a `service-worker.js` file with the content below and place it in the root directory of your website:
|
|
2560
2560
|
*
|
|
2561
2561
|
* ```
|
|
2562
|
-
* self.importScripts('https://js.appboycdn.com/web-sdk/6.
|
|
2562
|
+
* self.importScripts('https://js.appboycdn.com/web-sdk/6.11/service-worker.js');
|
|
2563
2563
|
* ```
|
|
2564
2564
|
*
|
|
2565
2565
|
* For more details, see [Our Product Documentation](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/push_notifications/integration).
|
|
@@ -2579,6 +2579,30 @@ export function requestPushPermission(
|
|
|
2579
2579
|
deniedCallback?: (temporaryDenial: boolean) => void,
|
|
2580
2580
|
): void;
|
|
2581
2581
|
|
|
2582
|
+
/**
|
|
2583
|
+
* Registers this browser environment to receive web push for the current user, performing the same registration
|
|
2584
|
+
* steps as `requestPushPermission` but without ever prompting for permission.
|
|
2585
|
+
*
|
|
2586
|
+
* Because it never prompts, it only registers users who have already granted push permission; otherwise it logs a
|
|
2587
|
+
* message and no-ops. Use it to safely (re-)register already-subscribed users with no risk of a permission
|
|
2588
|
+
* prompt. To prompt users who have not yet granted permission, use `requestPushPermission` instead.
|
|
2589
|
+
*
|
|
2590
|
+
* The same integration steps as `requestPushPermission` apply (https site, service worker).
|
|
2591
|
+
*
|
|
2592
|
+
* @param successCallback - Invoked when the user is registered for push successfully, with the user's endpoint,
|
|
2593
|
+
* public key, and user auth key (endpoint, publicKey, userAuth).
|
|
2594
|
+
* @param errorCallback - Invoked if push is blocked, unsupported, or an error occurs while registering. Called with
|
|
2595
|
+
* `true` if the failure is temporary, or `false` if it is permanent.
|
|
2596
|
+
*/
|
|
2597
|
+
export function registerPush(
|
|
2598
|
+
successCallback?: (
|
|
2599
|
+
endpoint: string,
|
|
2600
|
+
publicKey: string,
|
|
2601
|
+
userAuth: string,
|
|
2602
|
+
) => void,
|
|
2603
|
+
errorCallback?: (temporaryFailure: boolean) => void,
|
|
2604
|
+
): void;
|
|
2605
|
+
|
|
2582
2606
|
/**
|
|
2583
2607
|
* Remove all event subscriptions.
|
|
2584
2608
|
*/
|
|
@@ -2981,7 +3005,7 @@ export type InitializationOptions = {
|
|
|
2981
3005
|
* lifecycle of, set this option to true and the Braze SDK will not register or unregister a service worker. If you set this
|
|
2982
3006
|
* option to true, in order for push to function correctly you must register the service worker yourself BEFORE calling
|
|
2983
3007
|
* `requestPushPermission`, and ensure that it contains Braze's service worker code, either with
|
|
2984
|
-
* `self.importScripts('https://js.appboycdn.com/web-sdk/6.
|
|
3008
|
+
* `self.importScripts('https://js.appboycdn.com/web-sdk/6.11/service-worker.js');` or by including the content
|
|
2985
3009
|
* of that file directly. When this option is true, the `serviceWorkerLocation` option is irrelevant and is ignored.
|
|
2986
3010
|
*/
|
|
2987
3011
|
manageServiceWorkerExternally?: boolean;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const oi = {
|
|
2
|
+
Tu: function (t) {
|
|
3
3
|
const r = (t + "=".repeat((4 - (t.length % 4)) % 4))
|
|
4
4
|
.replace(/\-/g, "+")
|
|
5
5
|
.replace(/_/g, "/"),
|
|
@@ -9,4 +9,4 @@ const ai = {
|
|
|
9
9
|
return o;
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
|
-
export default
|
|
12
|
+
export default oi;
|
|
@@ -3,28 +3,28 @@ const p = {
|
|
|
3
3
|
Pr: "p",
|
|
4
4
|
$c: "pc",
|
|
5
5
|
Fc: "ca",
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
kl: "i",
|
|
7
|
+
fl: "ie",
|
|
8
8
|
vs: "cci",
|
|
9
9
|
ws: "ccic",
|
|
10
10
|
us: "ccc",
|
|
11
11
|
gs: "ccd",
|
|
12
12
|
wm: "ss",
|
|
13
13
|
hm: "se",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
On: "si",
|
|
15
|
+
Hn: "sc",
|
|
16
|
+
Jn: "sbc",
|
|
17
17
|
Lc: "sfe",
|
|
18
18
|
om: "iec",
|
|
19
19
|
Dc: "lr",
|
|
20
20
|
Ac: "uae",
|
|
21
21
|
Mc: "lcaa",
|
|
22
22
|
Cc: "lcar",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
Na: "inc",
|
|
24
|
+
Xu: "add",
|
|
25
|
+
Zu: "rem",
|
|
26
|
+
Vu: "set",
|
|
27
|
+
Qu: "ncam",
|
|
28
28
|
Tc: "sgu",
|
|
29
29
|
xo: "ffi",
|
|
30
30
|
ro: "bi",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export default class et {
|
|
2
2
|
constructor(t, e) {
|
|
3
3
|
(this.database = t),
|
|
4
|
-
(this.
|
|
4
|
+
(this.kd = e),
|
|
5
5
|
(this.parent = "undefined" == typeof window ? self : window),
|
|
6
6
|
(this.database = t),
|
|
7
|
-
(this.
|
|
7
|
+
(this.kd = e);
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
Kd() {
|
|
10
10
|
if ("indexedDB" in this.parent) return this.parent.indexedDB;
|
|
11
11
|
}
|
|
12
12
|
isSupported() {
|
|
13
13
|
var t;
|
|
14
14
|
try {
|
|
15
|
-
if (null == this.
|
|
15
|
+
if (null == this.Kd()) return !1;
|
|
16
16
|
{
|
|
17
17
|
const e =
|
|
18
|
-
null === (t = this.
|
|
18
|
+
null === (t = this.Kd()) || void 0 === t
|
|
19
19
|
? void 0
|
|
20
20
|
: t.open("Braze IndexedDB Support Test");
|
|
21
21
|
if (
|
|
@@ -25,10 +25,10 @@ export default class et {
|
|
|
25
25
|
"undefined" != typeof window)
|
|
26
26
|
) {
|
|
27
27
|
const t = window,
|
|
28
|
-
e = t.chrome || t.browser || t.
|
|
28
|
+
e = t.chrome || t.browser || t.Gd;
|
|
29
29
|
if (e && e.runtime && e.runtime.id)
|
|
30
30
|
return (
|
|
31
|
-
this.
|
|
31
|
+
this.kd.info(
|
|
32
32
|
"Not using IndexedDB for storage because we are running inside an extension",
|
|
33
33
|
),
|
|
34
34
|
!1
|
|
@@ -38,27 +38,27 @@ export default class et {
|
|
|
38
38
|
}
|
|
39
39
|
} catch (t) {
|
|
40
40
|
return (
|
|
41
|
-
this.
|
|
41
|
+
this.kd.info(
|
|
42
42
|
"Not using IndexedDB for storage due to following error: " + t,
|
|
43
43
|
),
|
|
44
44
|
!1
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
Wd(t, e) {
|
|
49
49
|
var n;
|
|
50
50
|
const o =
|
|
51
|
-
null === (n = this.
|
|
51
|
+
null === (n = this.Kd()) || void 0 === n
|
|
52
52
|
? void 0
|
|
53
|
-
: n.open(this.database.
|
|
53
|
+
: n.open(this.database.Jd, this.database.VERSION);
|
|
54
54
|
if (null == o) return "function" == typeof e && e(), !1;
|
|
55
55
|
const i = this;
|
|
56
56
|
return (
|
|
57
57
|
(o.onupgradeneeded = (t) => {
|
|
58
58
|
var e;
|
|
59
|
-
i.
|
|
59
|
+
i.kd.info(
|
|
60
60
|
"Upgrading indexedDB " +
|
|
61
|
-
i.database.
|
|
61
|
+
i.database.Jd +
|
|
62
62
|
" to v" +
|
|
63
63
|
i.database.VERSION +
|
|
64
64
|
"...",
|
|
@@ -77,7 +77,7 @@ export default class et {
|
|
|
77
77
|
(r.onversionchange = () => {
|
|
78
78
|
r.close(),
|
|
79
79
|
"function" == typeof e && e(),
|
|
80
|
-
i.
|
|
80
|
+
i.kd.error(
|
|
81
81
|
"Needed to close the database unexpectedly because of an upgrade in another tab",
|
|
82
82
|
);
|
|
83
83
|
}),
|
|
@@ -87,9 +87,9 @@ export default class et {
|
|
|
87
87
|
var n;
|
|
88
88
|
const o = t;
|
|
89
89
|
return (
|
|
90
|
-
i.
|
|
90
|
+
i.kd.info(
|
|
91
91
|
"Could not open indexedDB " +
|
|
92
|
-
i.database.
|
|
92
|
+
i.database.Jd +
|
|
93
93
|
" v" +
|
|
94
94
|
i.database.VERSION +
|
|
95
95
|
": " +
|
|
@@ -105,16 +105,16 @@ export default class et {
|
|
|
105
105
|
setItem(t, e, n, o, i) {
|
|
106
106
|
if (!this.isSupported()) return "function" == typeof i && i(), !1;
|
|
107
107
|
const r = this;
|
|
108
|
-
return this.
|
|
108
|
+
return this.Wd((d) => {
|
|
109
109
|
if (!d.objectStoreNames.contains(t))
|
|
110
110
|
return (
|
|
111
|
-
r.
|
|
111
|
+
r.kd.error(
|
|
112
112
|
"Could not store object " +
|
|
113
113
|
e +
|
|
114
114
|
" in " +
|
|
115
115
|
t +
|
|
116
116
|
" on indexedDB " +
|
|
117
|
-
r.database.
|
|
117
|
+
r.database.Jd +
|
|
118
118
|
" - " +
|
|
119
119
|
t +
|
|
120
120
|
" is not a valid objectStore",
|
|
@@ -126,13 +126,13 @@ export default class et {
|
|
|
126
126
|
s.oncomplete = () => d.close();
|
|
127
127
|
const u = s.objectStore(t).put(n, e);
|
|
128
128
|
(u.onerror = () => {
|
|
129
|
-
r.
|
|
129
|
+
r.kd.error(
|
|
130
130
|
"Could not store object " +
|
|
131
131
|
e +
|
|
132
132
|
" in " +
|
|
133
133
|
t +
|
|
134
134
|
" on indexedDB " +
|
|
135
|
-
r.database.
|
|
135
|
+
r.database.Jd,
|
|
136
136
|
),
|
|
137
137
|
"function" == typeof i && i();
|
|
138
138
|
}),
|
|
@@ -144,16 +144,16 @@ export default class et {
|
|
|
144
144
|
getItem(t, e, n) {
|
|
145
145
|
if (!this.isSupported()) return !1;
|
|
146
146
|
const o = this;
|
|
147
|
-
return this.
|
|
147
|
+
return this.Wd((i) => {
|
|
148
148
|
if (!i.objectStoreNames.contains(t))
|
|
149
149
|
return (
|
|
150
|
-
o.
|
|
150
|
+
o.kd.error(
|
|
151
151
|
"Could not retrieve object " +
|
|
152
152
|
e +
|
|
153
153
|
" in " +
|
|
154
154
|
t +
|
|
155
155
|
" on indexedDB " +
|
|
156
|
-
o.database.
|
|
156
|
+
o.database.Jd +
|
|
157
157
|
" - " +
|
|
158
158
|
t +
|
|
159
159
|
" is not a valid objectStore",
|
|
@@ -164,13 +164,13 @@ export default class et {
|
|
|
164
164
|
r.oncomplete = () => i.close();
|
|
165
165
|
const d = r.objectStore(t).get(e);
|
|
166
166
|
(d.onerror = () => {
|
|
167
|
-
o.
|
|
167
|
+
o.kd.error(
|
|
168
168
|
"Could not retrieve object " +
|
|
169
169
|
e +
|
|
170
170
|
" in " +
|
|
171
171
|
t +
|
|
172
172
|
" on indexedDB " +
|
|
173
|
-
o.database.
|
|
173
|
+
o.database.Jd,
|
|
174
174
|
);
|
|
175
175
|
}),
|
|
176
176
|
(d.onsuccess = (t) => {
|
|
@@ -183,14 +183,14 @@ export default class et {
|
|
|
183
183
|
kr(t, e, n) {
|
|
184
184
|
if (!this.isSupported()) return "function" == typeof n && n(), !1;
|
|
185
185
|
const o = this;
|
|
186
|
-
return this.
|
|
186
|
+
return this.Wd((i) => {
|
|
187
187
|
if (!i.objectStoreNames.contains(t))
|
|
188
188
|
return (
|
|
189
|
-
o.
|
|
189
|
+
o.kd.error(
|
|
190
190
|
"Could not retrieve last record from " +
|
|
191
191
|
t +
|
|
192
192
|
" on indexedDB " +
|
|
193
|
-
o.database.
|
|
193
|
+
o.database.Jd +
|
|
194
194
|
" - " +
|
|
195
195
|
t +
|
|
196
196
|
" is not a valid objectStore",
|
|
@@ -202,8 +202,8 @@ export default class et {
|
|
|
202
202
|
r.oncomplete = () => i.close();
|
|
203
203
|
const d = r.objectStore(t).openCursor(null, "prev");
|
|
204
204
|
(d.onerror = () => {
|
|
205
|
-
o.
|
|
206
|
-
"Could not open cursor for " + t + " on indexedDB " + o.database.
|
|
205
|
+
o.kd.error(
|
|
206
|
+
"Could not open cursor for " + t + " on indexedDB " + o.database.Jd,
|
|
207
207
|
),
|
|
208
208
|
"function" == typeof n && n();
|
|
209
209
|
}),
|
|
@@ -219,16 +219,16 @@ export default class et {
|
|
|
219
219
|
ge(t, e) {
|
|
220
220
|
if (!this.isSupported()) return !1;
|
|
221
221
|
const n = this;
|
|
222
|
-
return this.
|
|
222
|
+
return this.Wd((o) => {
|
|
223
223
|
if (!o.objectStoreNames.contains(t))
|
|
224
224
|
return (
|
|
225
|
-
n.
|
|
225
|
+
n.kd.error(
|
|
226
226
|
"Could not delete record " +
|
|
227
227
|
e +
|
|
228
228
|
" from " +
|
|
229
229
|
t +
|
|
230
230
|
" on indexedDB " +
|
|
231
|
-
n.database.
|
|
231
|
+
n.database.Jd +
|
|
232
232
|
" - " +
|
|
233
233
|
t +
|
|
234
234
|
" is not a valid objectStore",
|
|
@@ -238,13 +238,13 @@ export default class et {
|
|
|
238
238
|
const i = o.transaction([t], "readwrite");
|
|
239
239
|
i.oncomplete = () => o.close();
|
|
240
240
|
i.objectStore(t).delete(e).onerror = () => {
|
|
241
|
-
n.
|
|
241
|
+
n.kd.error(
|
|
242
242
|
"Could not delete record " +
|
|
243
243
|
e +
|
|
244
244
|
" from " +
|
|
245
245
|
t +
|
|
246
246
|
" on indexedDB " +
|
|
247
|
-
n.database.
|
|
247
|
+
n.database.Jd,
|
|
248
248
|
);
|
|
249
249
|
};
|
|
250
250
|
});
|
|
@@ -252,14 +252,14 @@ export default class et {
|
|
|
252
252
|
Qs(t, e) {
|
|
253
253
|
if (!this.isSupported()) return !1;
|
|
254
254
|
const n = this;
|
|
255
|
-
return this.
|
|
255
|
+
return this.Wd((o) => {
|
|
256
256
|
if (!o.objectStoreNames.contains(t))
|
|
257
257
|
return (
|
|
258
|
-
n.
|
|
258
|
+
n.kd.error(
|
|
259
259
|
"Could not retrieve objects from " +
|
|
260
260
|
t +
|
|
261
261
|
" on indexedDB " +
|
|
262
|
-
n.database.
|
|
262
|
+
n.database.Jd +
|
|
263
263
|
" - " +
|
|
264
264
|
t +
|
|
265
265
|
" is not a valid objectStore",
|
|
@@ -273,18 +273,18 @@ export default class et {
|
|
|
273
273
|
s = [];
|
|
274
274
|
(d.onerror = () => {
|
|
275
275
|
s.length > 0
|
|
276
|
-
? (n.
|
|
276
|
+
? (n.kd.info(
|
|
277
277
|
"Cursor closed midway through for " +
|
|
278
278
|
t +
|
|
279
279
|
" on indexedDB " +
|
|
280
|
-
n.database.
|
|
280
|
+
n.database.Jd,
|
|
281
281
|
),
|
|
282
282
|
e(s))
|
|
283
|
-
: n.
|
|
283
|
+
: n.kd.error(
|
|
284
284
|
"Could not open cursor for " +
|
|
285
285
|
t +
|
|
286
286
|
" on indexedDB " +
|
|
287
|
-
n.database.
|
|
287
|
+
n.database.Jd,
|
|
288
288
|
);
|
|
289
289
|
}),
|
|
290
290
|
(d.onsuccess = (t) => {
|
|
@@ -311,23 +311,23 @@ export default class et {
|
|
|
311
311
|
t.push(this.database.Ws[n]);
|
|
312
312
|
}
|
|
313
313
|
const e = this;
|
|
314
|
-
return this.
|
|
314
|
+
return this.Wd(function (n) {
|
|
315
315
|
const o = n.transaction(t, "readwrite");
|
|
316
316
|
o.oncomplete = () => n.close();
|
|
317
317
|
for (let n = 0; n < t.length; n++) {
|
|
318
318
|
const i = t[n];
|
|
319
319
|
o.objectStore(i).clear().onerror = function () {
|
|
320
|
-
e.
|
|
320
|
+
e.kd.error(
|
|
321
321
|
"Could not clear " +
|
|
322
322
|
this.source.name +
|
|
323
323
|
" on indexedDB " +
|
|
324
|
-
e.database.
|
|
324
|
+
e.database.Jd,
|
|
325
325
|
);
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
328
|
o.onerror = function () {
|
|
329
|
-
e.
|
|
330
|
-
"Could not clear object stores on indexedDB " + e.database.
|
|
329
|
+
e.kd.error(
|
|
330
|
+
"Could not clear object stores on indexedDB " + e.database.Jd,
|
|
331
331
|
);
|
|
332
332
|
};
|
|
333
333
|
});
|
|
@@ -335,13 +335,13 @@ export default class et {
|
|
|
335
335
|
}
|
|
336
336
|
et._s = {
|
|
337
337
|
Xs: {
|
|
338
|
-
|
|
338
|
+
Jd: "AppboyServiceWorkerAsyncStorage",
|
|
339
339
|
VERSION: 6,
|
|
340
340
|
Ws: {
|
|
341
341
|
pn: "data",
|
|
342
342
|
yr: "pushClicks",
|
|
343
|
-
|
|
344
|
-
|
|
343
|
+
Gu: "pushSubscribed",
|
|
344
|
+
qd: "fallbackDevice",
|
|
345
345
|
Vs: "cardUpdates",
|
|
346
346
|
pe: "optOut",
|
|
347
347
|
Br: "pendingData",
|
package/shared-lib/logger.js
CHANGED
|
@@ -3,11 +3,11 @@ const b = {
|
|
|
3
3
|
(void 0 === n && void 0 !== b.zg) || (b.zg = !!n), b.i || (b.i = !0);
|
|
4
4
|
},
|
|
5
5
|
destroy: function () {
|
|
6
|
-
(b.i = !1), (b.zg = void 0), (b.
|
|
6
|
+
(b.i = !1), (b.zg = void 0), (b.kd = void 0);
|
|
7
7
|
},
|
|
8
8
|
setLogger: function (n) {
|
|
9
9
|
"function" == typeof n
|
|
10
|
-
? (b.init(), (b.
|
|
10
|
+
? (b.init(), (b.kd = n))
|
|
11
11
|
: b.info("Ignoring setLogger call since logger is not a function");
|
|
12
12
|
},
|
|
13
13
|
toggleLogging: function () {
|
|
@@ -19,19 +19,19 @@ const b = {
|
|
|
19
19
|
info: function (n) {
|
|
20
20
|
if (b.zg) {
|
|
21
21
|
const o = "Braze: " + n;
|
|
22
|
-
null != b.
|
|
22
|
+
null != b.kd ? b.kd(o) : console.log(o);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
warn: function (n) {
|
|
26
26
|
if (b.zg) {
|
|
27
|
-
const o = "Braze SDK Warning: " + n + " (v6.
|
|
28
|
-
null != b.
|
|
27
|
+
const o = "Braze SDK Warning: " + n + " (v6.11.0)";
|
|
28
|
+
null != b.kd ? b.kd(o) : console.warn(o);
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
error: function (n) {
|
|
32
32
|
if (b.zg) {
|
|
33
|
-
const o = "Braze SDK Error: " + n + " (v6.
|
|
34
|
-
null != b.
|
|
33
|
+
const o = "Braze SDK Error: " + n + " (v6.11.0)";
|
|
34
|
+
null != b.kd ? b.kd(o) : console.error(o);
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
};
|
|
@@ -4,25 +4,25 @@ export default {
|
|
|
4
4
|
se: "cookieExpiryInDays",
|
|
5
5
|
Oh: "noCookies",
|
|
6
6
|
Th: "devicePropertyAllowlist",
|
|
7
|
-
|
|
7
|
+
Aa: "disablePushTokenMaintenance",
|
|
8
8
|
Rh: "enableLogging",
|
|
9
9
|
Ph: "enableSdkAuthentication",
|
|
10
|
-
|
|
10
|
+
qa: "manageServiceWorkerExternally",
|
|
11
11
|
Dh: "minimumIntervalBetweenTriggerActionsInSeconds",
|
|
12
12
|
Lh: "sessionTimeoutInSeconds",
|
|
13
13
|
yh: "appVersion",
|
|
14
14
|
Mh: "appVersionNumber",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
Ma: "serviceWorkerLocation",
|
|
16
|
+
ka: "safariWebsitePushId",
|
|
17
|
+
Ba: "localization",
|
|
18
18
|
sr: "contentSecurityNonce",
|
|
19
19
|
nr: "allowUserSuppliedJavascript",
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
va: "inAppMessageZIndex",
|
|
21
|
+
ya: "openInAppMessagesInNewTab",
|
|
22
|
+
lh: "requireExplicitInAppMessageDismissal",
|
|
23
23
|
Uh: "doNotLoadFontAwesome",
|
|
24
24
|
Wh: "deviceId",
|
|
25
|
-
|
|
25
|
+
_a: "serviceWorkerScope",
|
|
26
26
|
Ye: "dustHost",
|
|
27
27
|
Bh: "sdkFlavor",
|
|
28
28
|
tn: "openCardsInNewTab",
|
package/src/Core/logout.js
CHANGED
|
@@ -11,8 +11,8 @@ export function logout(e, o) {
|
|
|
11
11
|
r.rr() &&
|
|
12
12
|
logoutDependencies.unregisterPush(
|
|
13
13
|
() => {
|
|
14
|
-
logoutDependencies.
|
|
15
|
-
logoutDependencies.
|
|
14
|
+
logoutDependencies.disableSDK(),
|
|
15
|
+
logoutDependencies.wipeData(),
|
|
16
16
|
"function" == typeof e && e();
|
|
17
17
|
},
|
|
18
18
|
() => {
|
|
@@ -6,20 +6,11 @@ export const IamColors = {
|
|
|
6
6
|
IE: 4281545523,
|
|
7
7
|
AE: 4294967295,
|
|
8
8
|
_E: 4278219733,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
SE: 4293914607,
|
|
10
|
+
OE: 4283782485,
|
|
11
|
+
LE: 3224580915,
|
|
12
12
|
NE: 4288387995,
|
|
13
13
|
};
|
|
14
|
-
export const IamDisplayFailures = {
|
|
15
|
-
RE: "hd",
|
|
16
|
-
tE: "ias",
|
|
17
|
-
ME: "of",
|
|
18
|
-
eE: "do",
|
|
19
|
-
oE: "umt",
|
|
20
|
-
CE: "tf",
|
|
21
|
-
DE: "te",
|
|
22
|
-
};
|
|
23
14
|
export const IamSlideFrom = { TOP: "TOP", BOTTOM: "BOTTOM" };
|
|
24
15
|
export const IamClickAction = { URI: "URI", NONE: "NONE" };
|
|
25
16
|
export const IamDismissType = { AUTO_DISMISS: "AUTO_DISMISS", MANUAL: "SWIPE" };
|
|
@@ -36,50 +27,51 @@ export const IamCropType = {
|
|
|
36
27
|
FIT_CENTER: "FIT_CENTER",
|
|
37
28
|
};
|
|
38
29
|
export const IamServerTypes = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
RE: "SLIDEUP",
|
|
31
|
+
tE: "MODAL",
|
|
32
|
+
eE: "MODAL_STYLED",
|
|
33
|
+
oE: "FULL",
|
|
34
|
+
ME: "WEB_HTML",
|
|
35
|
+
CE: "HTML",
|
|
36
|
+
DE: "HTML_FULL",
|
|
46
37
|
};
|
|
47
|
-
export const IamTiming = { gr: 500,
|
|
38
|
+
export const IamTiming = { gr: 500, sE: 200, aE: 2e3 };
|
|
48
39
|
export const IAM_SHOW_CLASS = "ab-show";
|
|
49
40
|
export const IAM_HIDE_CLASS = "ab-hide";
|
|
41
|
+
export const IAM_SHOWING_CLASS = "ab-iam-showing";
|
|
50
42
|
export const IamSerializationKeys = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
UE: "m",
|
|
44
|
+
cE: "ma",
|
|
45
|
+
nE: "sf",
|
|
54
46
|
Is: "e",
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
PE: "ti",
|
|
48
|
+
iE: "ca",
|
|
57
49
|
URI: "u",
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
pE: "oa",
|
|
51
|
+
rE: "dt",
|
|
52
|
+
mE: "d",
|
|
53
|
+
GE: "i",
|
|
62
54
|
Bs: "iu",
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
xE: "is",
|
|
56
|
+
HE: "ic",
|
|
57
|
+
FE: "ibc",
|
|
58
|
+
BE: "bc",
|
|
59
|
+
bE: "tc",
|
|
60
|
+
gE: "cbc",
|
|
61
|
+
lE: "ai",
|
|
62
|
+
YE: "ao",
|
|
63
|
+
hE: "h",
|
|
64
|
+
KE: "ha",
|
|
65
|
+
WE: "htc",
|
|
66
|
+
XE: "fc",
|
|
67
|
+
yE: "b",
|
|
68
|
+
dE: "ct",
|
|
69
|
+
uE: "o",
|
|
70
|
+
fE: "hi",
|
|
79
71
|
CSS: "css",
|
|
80
72
|
xs: "type",
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
wE: "messageFields",
|
|
74
|
+
jE: "me",
|
|
83
75
|
LANGUAGE: "l",
|
|
84
76
|
Ns: "ia",
|
|
85
77
|
};
|
|
@@ -42,7 +42,7 @@ export default function ft(t, o, s, e, n) {
|
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
);
|
|
45
|
-
if (((e.appboyBridge = r), (e.brazeBridge = r), t.ko !== dt.
|
|
45
|
+
if (((e.appboyBridge = r), (e.brazeBridge = r), t.ko !== dt.CE)) {
|
|
46
46
|
const o = e.document.getElementsByTagName("a");
|
|
47
47
|
for (let e = 0; e < o.length; e++) o[e].onclick = ct(t, i, o[e], s);
|
|
48
48
|
const n = e.document.getElementsByTagName("button");
|