@braze/web-sdk 5.2.0 → 5.3.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 +54 -5
- package/package.json +1 -1
- package/shared-lib/event-types.js +14 -14
- package/shared-lib/indexed-db-adapter.js +51 -51
- package/shared-lib/logger.js +7 -7
- package/shared-lib/supported-options.js +7 -7
- package/src/ContentCards/content-cards-provider.js +107 -135
- package/src/ContentCards/get-cached-content-cards.js +1 -1
- package/src/ContentCards/request-content-cards-refresh.js +1 -1
- package/src/ContentCards/subscribe-to-content-cards-updates.js +2 -2
- package/src/ContentCards/ui/show-content-cards.js +1 -1
- package/src/FeatureFlags/feature-flag.js +41 -30
- package/src/FeatureFlags/feature-flags-provider.js +88 -84
- package/src/FeatureFlags/get-all-feature-flags.js +2 -2
- package/src/FeatureFlags/get-feature-flag.js +2 -2
- package/src/FeatureFlags/log-feature-flag-impression.js +3 -3
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
- package/src/Feed/feed-provider.js +24 -24
- package/src/Feed/get-cached-feed.js +1 -1
- package/src/Feed/log-feed-displayed.js +1 -1
- package/src/Feed/request-feed-refresh.js +1 -1
- package/src/Feed/subscribe-to-feed-updates.js +1 -1
- package/src/Feed/ui/show-feed.js +1 -1
- package/src/InAppMessage/defer-in-app-message.js +1 -1
- package/src/InAppMessage/display/html-message-to-html.js +9 -9
- package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
- package/src/InAppMessage/display/modal-utils.js +5 -5
- package/src/InAppMessage/get-deferred-in-app-message.js +1 -1
- package/src/InAppMessage/in-app-message-factory.js +4 -4
- package/src/InAppMessage/in-app-message-manager.js +78 -75
- package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
- package/src/InAppMessage/log-in-app-message-click.js +3 -3
- package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/full-screen-message.js +12 -12
- package/src/InAppMessage/models/html-message.js +9 -9
- package/src/InAppMessage/models/in-app-message-button.js +2 -2
- package/src/InAppMessage/models/in-app-message.js +84 -82
- package/src/InAppMessage/models/modal-message.js +12 -12
- package/src/InAppMessage/models/slide-up-message.js +17 -17
- package/src/InAppMessage/models/templated-in-app-message.js +8 -8
- 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 +17 -17
- package/src/Push/push-manager-factory.js +6 -6
- package/src/Push/push-manager.js +1 -1
- package/src/Push/utils/push-utils.js +1 -1
- package/src/User/user.js +12 -12
- package/src/common/base-provider.js +1 -1
- package/src/common/constants.js +0 -2
- package/src/common/event-logger.js +2 -2
- package/src/common/feed-display.js +1 -1
- package/src/managers/auth-manager.js +3 -3
- package/src/managers/braze-instance.js +73 -73
- package/src/managers/device-manager.js +15 -15
- package/src/managers/network-manager.js +190 -145
- package/src/managers/server-config-manager.js +43 -47
- package/src/managers/session-manager.js +21 -21
- package/src/managers/storage-manager-factory.js +1 -1
- package/src/managers/storage-manager.js +107 -107
- package/src/managers/utils.js +1 -1
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +6 -6
- package/src/models/device.js +2 -2
- package/src/models/identifier.js +8 -8
- package/src/models/server-config.js +25 -25
- package/src/request-controller.js +115 -108
- package/src/triggers/models/custom-event-data.js +2 -2
- package/src/triggers/models/custom-event-property-data.js +4 -4
- package/src/triggers/models/filter-set.js +3 -3
- package/src/triggers/models/filter.js +55 -55
- package/src/triggers/models/in-app-message-click-data.js +8 -8
- package/src/triggers/models/purchase-data.js +2 -2
- package/src/triggers/models/purchase-property-data.js +4 -4
- package/src/triggers/models/push-click-data.js +3 -3
- package/src/triggers/models/trigger-condition.js +40 -40
- package/src/triggers/models/trigger-events.js +1 -1
- package/src/triggers/models/trigger.js +31 -31
- package/src/triggers/triggers-provider-factory.js +1 -1
- package/src/triggers/triggers-provider.js +40 -40
- package/src/ui/js/attach-css.js +2 -2
- package/src/util/base-device-parser.js +7 -7
- package/src/util/braze-actions.js +4 -4
- package/src/util/browser-detector.js +23 -23
- package/src/util/client-hints-parser.js +4 -4
- package/src/util/dom-utils.js +6 -6
- package/src/util/net.js +4 -4
- package/src/util/request-header-utils.js +36 -37
- package/src/util/user-agent-parser.js +7 -7
- package/src/util/window-utils.js +1 -1
|
@@ -3,51 +3,51 @@ import y from "../common/base-provider.js";
|
|
|
3
3
|
import e from "../managers/braze-instance.js";
|
|
4
4
|
import { STORAGE_KEYS as o } from "../managers/storage-manager.js";
|
|
5
5
|
import T from "../managers/subscription-manager.js";
|
|
6
|
-
import { randomInclusive as
|
|
6
|
+
import { randomInclusive as U } from "../util/math.js";
|
|
7
7
|
import C from "../util/net.js";
|
|
8
8
|
import {
|
|
9
9
|
newFeatureFlagFromJson as st,
|
|
10
10
|
newFeatureFlagFromSerializedValue as it,
|
|
11
11
|
} from "./feature-flag-factory.js";
|
|
12
|
-
import
|
|
12
|
+
import D from "../util/request-header-utils.js";
|
|
13
13
|
export default class er extends y {
|
|
14
14
|
constructor(t, s, i, r) {
|
|
15
15
|
super(),
|
|
16
16
|
(this.yt = t),
|
|
17
17
|
(this.qt = s),
|
|
18
18
|
(this.u = i),
|
|
19
|
-
(this.
|
|
20
|
-
(this.
|
|
21
|
-
(this.
|
|
19
|
+
(this.ri = r),
|
|
20
|
+
(this.hi = []),
|
|
21
|
+
(this.oi = 0),
|
|
22
22
|
(this.yt = t),
|
|
23
23
|
(this.qt = s),
|
|
24
24
|
(this.u = i),
|
|
25
|
-
(this.
|
|
26
|
-
(this.
|
|
27
|
-
(this.
|
|
28
|
-
(this.
|
|
29
|
-
(this.
|
|
30
|
-
(this.
|
|
31
|
-
e.$t(this.
|
|
25
|
+
(this.ri = r),
|
|
26
|
+
(this.ai = null),
|
|
27
|
+
(this.ni = new T()),
|
|
28
|
+
(this.li = 10),
|
|
29
|
+
(this.ui = null),
|
|
30
|
+
(this.fi = null),
|
|
31
|
+
e.$t(this.ni);
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
Ns(t) {
|
|
34
34
|
var s;
|
|
35
35
|
if (
|
|
36
|
-
(null === (s = this.yt) || void 0 === s ? void 0 : s.
|
|
36
|
+
(null === (s = this.yt) || void 0 === s ? void 0 : s.ci()) &&
|
|
37
37
|
null != t &&
|
|
38
38
|
t.feature_flags
|
|
39
39
|
) {
|
|
40
|
-
this.
|
|
40
|
+
this.hi = [];
|
|
41
41
|
for (const s of t.feature_flags) {
|
|
42
42
|
const t = st(s);
|
|
43
|
-
t && this.
|
|
43
|
+
t && this.hi.push(t);
|
|
44
44
|
}
|
|
45
|
-
(this.
|
|
45
|
+
(this.oi = new Date().getTime()), this.di(), this.ni.Dt(this.hi);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
mi() {
|
|
49
49
|
let t = {};
|
|
50
|
-
this.u && (t = this.u.j(o.C.
|
|
50
|
+
this.u && (t = this.u.j(o.C.gi));
|
|
51
51
|
const s = {};
|
|
52
52
|
for (const i in t) {
|
|
53
53
|
const e = it(t[i]);
|
|
@@ -55,119 +55,123 @@ export default class er extends y {
|
|
|
55
55
|
}
|
|
56
56
|
return s;
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
Fi() {
|
|
59
59
|
var t;
|
|
60
|
-
return (null === (t = this.u) || void 0 === t ? void 0 : t.j(o.C.
|
|
60
|
+
return (null === (t = this.u) || void 0 === t ? void 0 : t.j(o.C.vi)) || {};
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
this.u && this.u.k(o.C.
|
|
62
|
+
pi(t) {
|
|
63
|
+
this.u && this.u.k(o.C.vi, t);
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
return this.
|
|
65
|
+
Zs(t) {
|
|
66
|
+
return this.ni.It(t);
|
|
67
67
|
}
|
|
68
68
|
refreshFeatureFlags(t, s, i = !1, e = !0) {
|
|
69
69
|
const r = () => {
|
|
70
|
-
"function" == typeof s && s(), this.
|
|
70
|
+
"function" == typeof s && s(), this.ni.Dt(this.hi);
|
|
71
71
|
};
|
|
72
|
-
if (!this.
|
|
72
|
+
if (!this.wi(i))
|
|
73
73
|
return (
|
|
74
|
-
!this.
|
|
74
|
+
!this.ai &&
|
|
75
75
|
this.yt &&
|
|
76
|
-
(this.
|
|
76
|
+
(this.ai = this.yt.ji(() => {
|
|
77
77
|
this.refreshFeatureFlags(t, s);
|
|
78
78
|
})),
|
|
79
79
|
void r()
|
|
80
80
|
);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
81
|
+
const h = this.qt;
|
|
82
|
+
if (!h) return void r();
|
|
83
|
+
e && this.yi();
|
|
84
|
+
const o = h.Js({}, !0),
|
|
85
|
+
a = h.$s(o, D.Ps.bi);
|
|
86
|
+
let n = !1;
|
|
87
|
+
h.Xs(
|
|
88
|
+
o,
|
|
89
|
+
(h = -1) => {
|
|
90
|
+
if (!this.qt) return void r();
|
|
91
|
+
const l = new Date().valueOf();
|
|
92
|
+
D._s(this.u, D.Ps.bi, l),
|
|
93
|
+
-1 !== h && a.push(["X-Braze-Req-Tokens-Remaining", h.toString()]),
|
|
94
|
+
C.Gs({
|
|
95
|
+
url: `${this.qt.Hs()}/feature_flags/sync`,
|
|
96
|
+
headers: a,
|
|
97
|
+
data: o,
|
|
98
|
+
L: (s) => {
|
|
99
|
+
if (!this.qt.Ks(o, s, a)) return (n = !0), void r();
|
|
100
|
+
this.qt.Os(),
|
|
101
|
+
this.Ns(s),
|
|
102
|
+
(n = !1),
|
|
103
|
+
D.Qs(this.u, D.Ps.bi, 1),
|
|
104
|
+
"function" == typeof t && t();
|
|
105
|
+
},
|
|
106
|
+
error: (t) => {
|
|
107
|
+
this.qt.Vs(t, "retrieving feature flags"), (n = !0), r();
|
|
108
|
+
},
|
|
109
|
+
Ws: () => {
|
|
110
|
+
if (e && n && !this.fi) {
|
|
111
|
+
D.Ys(this.u, D.Ps.bi);
|
|
112
|
+
let e = this.ui;
|
|
113
|
+
(null == e || e < 1e3 * this.li) && (e = 1e3 * this.li),
|
|
114
|
+
this.Ci(Math.min(3e5, U(1e3 * this.li, 3 * e)), t, s, i);
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
});
|
|
115
118
|
},
|
|
116
|
-
|
|
119
|
+
D.Ps.bi,
|
|
120
|
+
s,
|
|
117
121
|
);
|
|
118
122
|
}
|
|
119
|
-
|
|
120
|
-
null != this.
|
|
123
|
+
yi() {
|
|
124
|
+
null != this.fi && (clearTimeout(this.fi), (this.fi = null));
|
|
121
125
|
}
|
|
122
|
-
|
|
123
|
-
this.
|
|
124
|
-
(this.
|
|
126
|
+
Ci(t = 1e3 * this.li, s, i, e = !1) {
|
|
127
|
+
this.yi(),
|
|
128
|
+
(this.fi = window.setTimeout(() => {
|
|
125
129
|
this.refreshFeatureFlags(s, i, e);
|
|
126
130
|
}, t)),
|
|
127
|
-
(this.
|
|
131
|
+
(this.ui = t);
|
|
128
132
|
}
|
|
129
|
-
|
|
133
|
+
wi(t) {
|
|
130
134
|
if (!this.yt) return !1;
|
|
131
135
|
if (!t) {
|
|
132
|
-
const t = this.yt.
|
|
136
|
+
const t = this.yt.Ri();
|
|
133
137
|
if (null == t) return !1;
|
|
134
138
|
let s = !1;
|
|
135
139
|
if (!isNaN(t)) {
|
|
136
140
|
if (-1 === t) return r.info("Feature flag refreshes not allowed"), !1;
|
|
137
|
-
s = new Date().getTime() >= (this.
|
|
141
|
+
s = new Date().getTime() >= (this.oi || 0) + 1e3 * t;
|
|
138
142
|
}
|
|
139
143
|
if (!s)
|
|
140
144
|
return (
|
|
141
145
|
r.info(`Feature flag refreshes were rate limited to ${t} seconds`), !1
|
|
142
146
|
);
|
|
143
147
|
}
|
|
144
|
-
return this.yt.
|
|
148
|
+
return this.yt.ci();
|
|
145
149
|
}
|
|
146
|
-
|
|
150
|
+
Ti() {
|
|
147
151
|
var t;
|
|
148
152
|
return (
|
|
149
|
-
(null === (t = this.u) || void 0 === t ? void 0 : t.j(o.C.
|
|
153
|
+
(null === (t = this.u) || void 0 === t ? void 0 : t.j(o.C.Di)) || null
|
|
150
154
|
);
|
|
151
155
|
}
|
|
152
|
-
|
|
156
|
+
Ii() {
|
|
153
157
|
var t, s;
|
|
154
158
|
null === (t = this.u) ||
|
|
155
159
|
void 0 === t ||
|
|
156
|
-
t.k(o.C.
|
|
160
|
+
t.k(o.C.Di, null === (s = this.ri) || void 0 === s ? void 0 : s.Si());
|
|
157
161
|
}
|
|
158
|
-
|
|
162
|
+
qi() {
|
|
159
163
|
var t;
|
|
160
|
-
const s = null === (t = this.
|
|
161
|
-
i = this.
|
|
164
|
+
const s = null === (t = this.ri) || void 0 === t ? void 0 : t.Si(),
|
|
165
|
+
i = this.Ti();
|
|
162
166
|
return null == i || s === i;
|
|
163
167
|
}
|
|
164
|
-
|
|
168
|
+
di() {
|
|
165
169
|
if (!this.u) return;
|
|
166
170
|
const t = {};
|
|
167
|
-
for (const s of this.
|
|
171
|
+
for (const s of this.hi) {
|
|
168
172
|
const i = s.Y();
|
|
169
173
|
t[s.id] = i;
|
|
170
174
|
}
|
|
171
|
-
this.u.k(o.C.
|
|
175
|
+
this.u.k(o.C.gi, t), this.u.k(o.C.xi, this.oi), this.Ii();
|
|
172
176
|
}
|
|
173
177
|
}
|
|
@@ -5,8 +5,8 @@ export function getAllFeatureFlags() {
|
|
|
5
5
|
if (!e.X()) return;
|
|
6
6
|
const t = [],
|
|
7
7
|
n = e.ir();
|
|
8
|
-
if (n && !n.
|
|
9
|
-
const o = ir.rr().
|
|
8
|
+
if (n && !n.ci()) return r.info("Feature flags are not enabled."), t;
|
|
9
|
+
const o = ir.rr().mi();
|
|
10
10
|
for (const r in o) t.push(o[r]);
|
|
11
11
|
return t;
|
|
12
12
|
}
|
|
@@ -4,7 +4,7 @@ import ir from "./feature-flags-provider-factory.js";
|
|
|
4
4
|
export function getFeatureFlag(t) {
|
|
5
5
|
if (!e.X()) return;
|
|
6
6
|
const n = e.ir();
|
|
7
|
-
if (n && !n.
|
|
8
|
-
const a = ir.rr().
|
|
7
|
+
if (n && !n.ci()) return r.info("Feature flags are not enabled."), null;
|
|
8
|
+
const a = ir.rr().mi();
|
|
9
9
|
return a[t] ? a[t] : null;
|
|
10
10
|
}
|
|
@@ -7,11 +7,11 @@ export function logFeatureFlagImpression(t) {
|
|
|
7
7
|
if (!t) return !1;
|
|
8
8
|
const o =
|
|
9
9
|
"Not logging a feature flag impression. The feature flag was not part of any matching experiment.",
|
|
10
|
-
n = ir.rr().
|
|
10
|
+
n = ir.rr().mi();
|
|
11
11
|
if (!n[t]) return r.info(o), !1;
|
|
12
12
|
const a = n[t].trackingString;
|
|
13
13
|
if (!a) return r.info(o), !1;
|
|
14
|
-
const f = ir.rr().
|
|
14
|
+
const f = ir.rr().Fi();
|
|
15
15
|
if (f[a])
|
|
16
16
|
return (
|
|
17
17
|
r.info(
|
|
@@ -19,7 +19,7 @@ export function logFeatureFlagImpression(t) {
|
|
|
19
19
|
),
|
|
20
20
|
!1
|
|
21
21
|
);
|
|
22
|
-
(f[a] = !0), ir.rr().
|
|
22
|
+
(f[a] = !0), ir.rr().pi(f);
|
|
23
23
|
const g = { fid: t, fts: a };
|
|
24
24
|
return s.q(i.Fr, g).L;
|
|
25
25
|
}
|
|
@@ -4,9 +4,9 @@ import { getAllFeatureFlags } from "./get-all-feature-flags.js";
|
|
|
4
4
|
export function subscribeToFeatureFlagsUpdates(r) {
|
|
5
5
|
if (!e.X()) return;
|
|
6
6
|
const t = ir.rr();
|
|
7
|
-
if (t.
|
|
7
|
+
if (t.qi()) {
|
|
8
8
|
const t = getAllFeatureFlags();
|
|
9
9
|
t && "function" == typeof r && r(t);
|
|
10
10
|
}
|
|
11
|
-
return t.
|
|
11
|
+
return t.Zs(r);
|
|
12
12
|
}
|
|
@@ -3,7 +3,7 @@ import e from "../managers/braze-instance.js";
|
|
|
3
3
|
import Feed from "./feed.js";
|
|
4
4
|
import {
|
|
5
5
|
newCardFromFeedJson as ht,
|
|
6
|
-
newCardFromSerializedValue as
|
|
6
|
+
newCardFromSerializedValue as S,
|
|
7
7
|
} from "../Card/util/card-factory.js";
|
|
8
8
|
import { rehydrateDateAfterJsonization as w } from "../util/date-utils.js";
|
|
9
9
|
import { STORAGE_KEYS as o } from "../managers/storage-manager.js";
|
|
@@ -12,26 +12,26 @@ export default class ee extends y {
|
|
|
12
12
|
constructor(t, s) {
|
|
13
13
|
super(),
|
|
14
14
|
(this.u = t),
|
|
15
|
-
(this.
|
|
15
|
+
(this.zi = s),
|
|
16
16
|
(this.cards = []),
|
|
17
|
-
(this.
|
|
17
|
+
(this.Ni = null),
|
|
18
18
|
(this.u = t),
|
|
19
|
-
(this.
|
|
19
|
+
(this.zi = s),
|
|
20
20
|
(this.Jt = new T()),
|
|
21
21
|
e.$t(this.Jt),
|
|
22
22
|
this.Kt();
|
|
23
23
|
}
|
|
24
24
|
Kt() {
|
|
25
25
|
let t = [];
|
|
26
|
-
this.u && (t = this.u.j(o.C.
|
|
26
|
+
this.u && (t = this.u.j(o.C.Ui) || []);
|
|
27
27
|
const s = [];
|
|
28
28
|
for (let i = 0; i < t.length; i++) {
|
|
29
|
-
const e =
|
|
29
|
+
const e = S(t[i]);
|
|
30
30
|
null != e && s.push(e);
|
|
31
31
|
}
|
|
32
|
-
(this.cards = s), this.u && (this.
|
|
32
|
+
(this.cards = s), this.u && (this.Ni = w(this.u.j(o.C.ki)));
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
Ai(t) {
|
|
35
35
|
const s = [];
|
|
36
36
|
let i = null,
|
|
37
37
|
e = {};
|
|
@@ -46,24 +46,24 @@ export default class ee extends y {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
(this.cards = s),
|
|
49
|
-
this.
|
|
50
|
-
(this.
|
|
51
|
-
this.u && (this.u.k(o.C.J, r), this.u.k(o.C.
|
|
49
|
+
this.Rs(),
|
|
50
|
+
(this.Ni = new Date()),
|
|
51
|
+
this.u && (this.u.k(o.C.J, r), this.u.k(o.C.ki, this.Ni));
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
Rs() {
|
|
54
54
|
var t;
|
|
55
55
|
const s = [];
|
|
56
56
|
for (let t = 0; t < this.cards.length; t++) s.push(this.cards[t].Y());
|
|
57
|
-
null === (t = this.u) || void 0 === t || t.k(o.C.
|
|
57
|
+
null === (t = this.u) || void 0 === t || t.k(o.C.Ui, s);
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
Ns(t) {
|
|
60
60
|
null != t &&
|
|
61
61
|
t.feed &&
|
|
62
62
|
(this.Kt(),
|
|
63
|
-
this.
|
|
64
|
-
this.Jt.Dt(new Feed(this.cards.slice(), this.
|
|
63
|
+
this.Ai(t.feed),
|
|
64
|
+
this.Jt.Dt(new Feed(this.cards.slice(), this.Ni)));
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
Bi() {
|
|
67
67
|
this.Kt();
|
|
68
68
|
const t = [],
|
|
69
69
|
s = new Date();
|
|
@@ -72,19 +72,19 @@ export default class ee extends y {
|
|
|
72
72
|
let r = !0;
|
|
73
73
|
null != e && (r = e >= s), r && t.push(this.cards[i]);
|
|
74
74
|
}
|
|
75
|
-
return new Feed(t, this.
|
|
75
|
+
return new Feed(t, this.Ni);
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
this.
|
|
77
|
+
xs() {
|
|
78
|
+
this.zi && this.zi.requestFeedRefresh();
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
Zs(t) {
|
|
81
81
|
return this.Jt.It(t);
|
|
82
82
|
}
|
|
83
83
|
clearData(t) {
|
|
84
84
|
null == t && (t = !1),
|
|
85
85
|
(this.cards = []),
|
|
86
|
-
(this.
|
|
87
|
-
t && this.u && (this.u.
|
|
88
|
-
this.Jt.Dt(new Feed(this.cards.slice(), this.
|
|
86
|
+
(this.Ni = null),
|
|
87
|
+
t && this.u && (this.u.ti(o.C.Ui), this.u.ti(o.C.ki)),
|
|
88
|
+
this.Jt.Dt(new Feed(this.cards.slice(), this.Ni));
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -3,5 +3,5 @@ import { InternalEventTypes as or } from "../../shared-lib/index.js";
|
|
|
3
3
|
export function logFeedDisplayed() {
|
|
4
4
|
var r;
|
|
5
5
|
if (e.X())
|
|
6
|
-
return null === (r = e.nr()) || void 0 === r ? void 0 : r.qr(or.
|
|
6
|
+
return null === (r = e.nr()) || void 0 === r ? void 0 : r.qr(or.Ar).L;
|
|
7
7
|
}
|
package/src/Feed/ui/show-feed.js
CHANGED
|
@@ -8,6 +8,6 @@ export function deferInAppMessage(s) {
|
|
|
8
8
|
return s instanceof ControlMessage
|
|
9
9
|
? (r.info("Not deferring since this is a ControlMessage."), !1)
|
|
10
10
|
: s instanceof InAppMessage
|
|
11
|
-
? se.m().
|
|
11
|
+
? se.m().je(s)
|
|
12
12
|
: (r.info("Not an instance of InAppMessage, ignoring."), !1);
|
|
13
13
|
}
|
|
@@ -31,7 +31,7 @@ export default function at(t, o, n, s, i, u) {
|
|
|
31
31
|
a = () => {
|
|
32
32
|
logInAppMessageHtmlClick(t, i, o), eo.openUri(o, u, r);
|
|
33
33
|
};
|
|
34
|
-
u ? a() : t.
|
|
34
|
+
u ? a() : t.Ae(c, a);
|
|
35
35
|
} else logInAppMessageHtmlClick(t, i, o || void 0);
|
|
36
36
|
return r.stopPropagation(), !1;
|
|
37
37
|
};
|
|
@@ -73,10 +73,10 @@ export default function at(t, o, n, s, i, u) {
|
|
|
73
73
|
l && ((l.innerHTML = s ? s.innerHTML : t.message || ""), ct(l));
|
|
74
74
|
const f = i.document.getElementsByTagName("head")[0];
|
|
75
75
|
if (null != f) {
|
|
76
|
-
if (t.
|
|
76
|
+
if (t.Ce()) {
|
|
77
77
|
const e = document.createElement("style");
|
|
78
78
|
(e.innerHTML = t.css || ""),
|
|
79
|
-
(e.id = t.
|
|
79
|
+
(e.id = t.ve() || ""),
|
|
80
80
|
null != u && e.setAttribute("nonce", u),
|
|
81
81
|
f.appendChild(e);
|
|
82
82
|
}
|
|
@@ -87,7 +87,7 @@ export default function at(t, o, n, s, i, u) {
|
|
|
87
87
|
d && d.length > 0 && c.setAttribute("title", d[0].textContent || "");
|
|
88
88
|
const p = {
|
|
89
89
|
closeMessage: function () {
|
|
90
|
-
t.
|
|
90
|
+
t.Ae(c);
|
|
91
91
|
},
|
|
92
92
|
logClick: function () {
|
|
93
93
|
logInAppMessageHtmlClick(t, ...arguments);
|
|
@@ -197,7 +197,7 @@ export default function at(t, o, n, s, i, u) {
|
|
|
197
197
|
C = function (e) {
|
|
198
198
|
return function () {
|
|
199
199
|
const o = arguments;
|
|
200
|
-
t.
|
|
200
|
+
t.Ae(c, function () {
|
|
201
201
|
j[e](...Array.prototype.slice.call(o));
|
|
202
202
|
});
|
|
203
203
|
};
|
|
@@ -213,7 +213,7 @@ export default function at(t, o, n, s, i, u) {
|
|
|
213
213
|
E = p.web;
|
|
214
214
|
for (const t of to(P)) E[t] = w(t);
|
|
215
215
|
if (
|
|
216
|
-
((i.appboyBridge = p), (i.brazeBridge = p), t.
|
|
216
|
+
((i.appboyBridge = p), (i.brazeBridge = p), t.we !== InAppMessage.qe.$e)
|
|
217
217
|
) {
|
|
218
218
|
const t = i.document.getElementsByTagName("a");
|
|
219
219
|
for (let e = 0; e < t.length; e++) t[e].onclick = a(t[e]);
|
|
@@ -222,7 +222,7 @@ export default function at(t, o, n, s, i, u) {
|
|
|
222
222
|
}
|
|
223
223
|
const $ = i.document.body;
|
|
224
224
|
if (null != $) {
|
|
225
|
-
t.
|
|
225
|
+
t.xe() && ($.id = t.htmlId || "");
|
|
226
226
|
const e = document.createElement("hidden");
|
|
227
227
|
(e.onclick = p.closeMessage),
|
|
228
228
|
(e.className = "ab-programmatic-close-button"),
|
|
@@ -239,8 +239,8 @@ export default function at(t, o, n, s, i, u) {
|
|
|
239
239
|
) {
|
|
240
240
|
const e = document.createElement("div");
|
|
241
241
|
return (
|
|
242
|
-
(e.className = "ab-ios-scroll-wrapper"), e.appendChild(c), (t.
|
|
242
|
+
(e.className = "ab-ios-scroll-wrapper"), e.appendChild(c), (t.Me = e), e
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
|
-
return (t.
|
|
245
|
+
return (t.Me = c), c;
|
|
246
246
|
}
|