@braze/web-sdk 5.4.0 → 5.5.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 +3 -3
- package/package.json +1 -1
- package/shared-lib/event-types.js +12 -12
- package/shared-lib/indexed-db-adapter.js +14 -14
- package/shared-lib/logger.js +2 -2
- package/shared-lib/supported-options.js +5 -5
- package/src/Card/card-manager.js +46 -42
- package/src/Card/models/card.js +61 -55
- package/src/Card/models/classic-card.js +1 -1
- package/src/Card/models/control-card.js +1 -1
- package/src/Card/models/image-only.js +1 -1
- package/src/Card/util/card-factory.js +20 -20
- package/src/ContentCards/content-cards-provider.js +140 -140
- 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 +4 -4
- package/src/ContentCards/ui/show-content-cards.js +3 -3
- package/src/Core/disable-sdk.js +2 -2
- package/src/Core/enable-sdk.js +2 -2
- package/src/Core/log-custom-event.js +14 -14
- package/src/Core/log-purchase.js +8 -8
- package/src/Core/open-session.js +4 -4
- package/src/Core/wipe-data.js +2 -2
- package/src/FeatureFlags/feature-flag-factory.js +5 -5
- package/src/FeatureFlags/feature-flag.js +1 -1
- package/src/FeatureFlags/feature-flags-provider.js +74 -74
- 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 +12 -12
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
- package/src/Feed/feed-provider.js +29 -29
- package/src/Feed/get-cached-feed.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/in-app-message-manager.js +63 -63
- package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
- package/src/InAppMessage/log-in-app-message-click.js +2 -2
- 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 +10 -10
- package/src/InAppMessage/models/html-message.js +13 -13
- package/src/InAppMessage/models/in-app-message-button.js +4 -4
- package/src/InAppMessage/models/in-app-message.js +59 -59
- package/src/InAppMessage/models/modal-message.js +9 -9
- package/src/InAppMessage/models/slide-up-message.js +11 -11
- package/src/InAppMessage/models/templated-in-app-message.js +8 -8
- package/src/Push/push-manager-factory.js +4 -4
- package/src/Push/push-manager.js +6 -6
- package/src/Push/utils/push-utils.js +1 -1
- package/src/User/user-manager.js +6 -6
- package/src/User/user.js +27 -27
- package/src/common/base-provider.js +1 -1
- package/src/common/event-logger.js +7 -7
- package/src/common/feed-display.js +1 -1
- package/src/managers/auth-manager.js +9 -9
- package/src/managers/braze-instance.js +44 -44
- package/src/managers/network-manager.js +100 -100
- package/src/managers/server-config-manager.js +24 -24
- package/src/managers/session-manager.js +10 -10
- package/src/managers/storage-manager.js +20 -20
- package/src/managers/subscription-manager.js +2 -2
- package/src/models/backend-errors.js +4 -4
- package/src/models/braze-event.js +1 -1
- package/src/models/device.js +1 -1
- package/src/models/request-result.js +1 -1
- package/src/models/server-config.js +5 -5
- package/src/request-controller.js +121 -121
- package/src/triggers/models/filter.js +9 -9
- package/src/triggers/models/trigger-condition.js +26 -26
- package/src/triggers/models/trigger-events.js +1 -1
- package/src/triggers/models/trigger.js +7 -7
- package/src/triggers/triggers-provider.js +27 -27
- package/src/ui/js/attach-css.js +1 -1
- package/src/util/braze-actions.js +4 -4
- package/src/util/net.js +4 -4
- package/src/util/request-header-utils.js +17 -17
|
@@ -4,10 +4,10 @@ import ControlMessage from "./models/control-message.js";
|
|
|
4
4
|
import HtmlMessage from "./models/html-message.js";
|
|
5
5
|
import InAppMessage from "./models/in-app-message.js";
|
|
6
6
|
import InAppMessageButton from "./models/in-app-message-button.js";
|
|
7
|
-
import
|
|
7
|
+
import t from "../common/event-logger.js";
|
|
8
8
|
import { newInAppMessageFromJson as pt } from "./in-app-message-factory.js";
|
|
9
9
|
import { randomInclusive as U } from "../util/math.js";
|
|
10
|
-
import
|
|
10
|
+
import s from "../models/request-result.js";
|
|
11
11
|
import { logger as r, EventTypes as i } from "../../shared-lib/index.js";
|
|
12
12
|
import T from "../managers/subscription-manager.js";
|
|
13
13
|
import gt from "../triggers/models/trigger.js";
|
|
@@ -25,16 +25,16 @@ import { STORAGE_KEYS as o } from "../managers/storage-manager.js";
|
|
|
25
25
|
import { FullScreenMessage, ModalMessage, SlideUpMessage } from "./index.js";
|
|
26
26
|
export default class aa {
|
|
27
27
|
constructor(t, s, i, r) {
|
|
28
|
-
(this
|
|
29
|
-
(this.
|
|
28
|
+
(this.$t = t),
|
|
29
|
+
(this.oi = s),
|
|
30
30
|
(this.u = i),
|
|
31
|
-
(this.
|
|
32
|
-
(this
|
|
33
|
-
(this.
|
|
31
|
+
(this.yt = r),
|
|
32
|
+
(this.$t = t),
|
|
33
|
+
(this.oi = s),
|
|
34
34
|
(this.u = i),
|
|
35
|
-
(this.
|
|
35
|
+
(this.yt = r),
|
|
36
36
|
(this._e = new T()),
|
|
37
|
-
e
|
|
37
|
+
e.Ht(this._e),
|
|
38
38
|
(this.Xe = 1e3),
|
|
39
39
|
(this.We = 6e4),
|
|
40
40
|
(this.Ye = null);
|
|
@@ -43,7 +43,7 @@ export default class aa {
|
|
|
43
43
|
return this._e;
|
|
44
44
|
}
|
|
45
45
|
Mi(t) {
|
|
46
|
-
return this._e.
|
|
46
|
+
return this._e.Nt(t);
|
|
47
47
|
}
|
|
48
48
|
_i() {
|
|
49
49
|
return this.Ye;
|
|
@@ -52,11 +52,11 @@ export default class aa {
|
|
|
52
52
|
this.Ye = t;
|
|
53
53
|
}
|
|
54
54
|
q(e, n, o, a) {
|
|
55
|
-
const l = new
|
|
55
|
+
const l = new s();
|
|
56
56
|
let u;
|
|
57
57
|
if (e instanceof ControlMessage) u = { trigger_ids: [e.triggerId] };
|
|
58
58
|
else {
|
|
59
|
-
if (n === i.$i || (e instanceof HtmlMessage && n === i.
|
|
59
|
+
if (n === i.$i || (e instanceof HtmlMessage && n === i.Oi)) {
|
|
60
60
|
if (!e.p(a))
|
|
61
61
|
return (
|
|
62
62
|
r.info(
|
|
@@ -64,7 +64,7 @@ export default class aa {
|
|
|
64
64
|
),
|
|
65
65
|
l
|
|
66
66
|
);
|
|
67
|
-
} else if (n === i.
|
|
67
|
+
} else if (n === i.Xi) {
|
|
68
68
|
if (!e.K())
|
|
69
69
|
return (
|
|
70
70
|
r.info(
|
|
@@ -73,16 +73,16 @@ export default class aa {
|
|
|
73
73
|
l
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
-
u = this.
|
|
76
|
+
u = this.Hi(e);
|
|
77
77
|
}
|
|
78
78
|
return null == u
|
|
79
79
|
? l
|
|
80
80
|
: (e.messageExtras && (u.message_extras = e.messageExtras),
|
|
81
81
|
null != o && (u.bid = o),
|
|
82
|
-
|
|
82
|
+
t.q(n, u));
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
const o = new
|
|
84
|
+
Ji(e, n) {
|
|
85
|
+
const o = new s();
|
|
86
86
|
if (!e.p())
|
|
87
87
|
return (
|
|
88
88
|
r.info(
|
|
@@ -90,32 +90,32 @@ export default class aa {
|
|
|
90
90
|
),
|
|
91
91
|
o
|
|
92
92
|
);
|
|
93
|
-
const a = this.
|
|
93
|
+
const a = this.Hi(n);
|
|
94
94
|
return null == a
|
|
95
95
|
? o
|
|
96
|
-
: e.id === InAppMessageButton.
|
|
96
|
+
: e.id === InAppMessageButton.Ki
|
|
97
97
|
? (r.info(
|
|
98
98
|
"This in-app message button does not have a tracking id. Not logging event to Braze servers.",
|
|
99
99
|
),
|
|
100
100
|
o)
|
|
101
|
-
: (null != e.id && (a.bid = e.id),
|
|
101
|
+
: (null != e.id && (a.bid = e.id), t.q(i.Oi, a));
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
Li(t) {
|
|
104
104
|
const e = t.messageFields;
|
|
105
105
|
return (null != e && e.is_push_primer) || !1;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
Qi(t) {
|
|
108
108
|
if (!(t instanceof InAppMessage)) return;
|
|
109
109
|
const e = (t) => {
|
|
110
110
|
if (!t) return;
|
|
111
111
|
const e = W(t);
|
|
112
112
|
return jt(e)
|
|
113
|
-
? vt(bt.Li, "In-App Message")
|
|
114
|
-
: ft(e) && !yt.Qi()
|
|
115
113
|
? vt(bt.Vi, "In-App Message")
|
|
114
|
+
: ft(e) && !yt.Wi()
|
|
115
|
+
? vt(bt.Yi, "In-App Message")
|
|
116
116
|
: void 0;
|
|
117
117
|
};
|
|
118
|
-
if (this.
|
|
118
|
+
if (this.Li(t) && !yt.Wi())
|
|
119
119
|
return "In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.";
|
|
120
120
|
const s = t.buttons || [];
|
|
121
121
|
let i;
|
|
@@ -133,60 +133,60 @@ export default class aa {
|
|
|
133
133
|
? e(t.uri)
|
|
134
134
|
: void 0;
|
|
135
135
|
}
|
|
136
|
-
|
|
137
|
-
const n = this
|
|
136
|
+
Zi(t, e, s, i) {
|
|
137
|
+
const n = this.$t;
|
|
138
138
|
if (!n) return;
|
|
139
|
-
const o = n.
|
|
140
|
-
a = n
|
|
139
|
+
const o = n.Ir(!1, !1),
|
|
140
|
+
a = n.$s(o);
|
|
141
141
|
(a.template = { trigger_id: t.triggerId, trigger_event_type: e }),
|
|
142
|
-
null != s && (a.template.data = s.
|
|
143
|
-
const l = n
|
|
144
|
-
n.
|
|
142
|
+
null != s && (a.template.data = s.Mr());
|
|
143
|
+
const l = n.Ps(a, D._s.Tr);
|
|
144
|
+
n.Gs(
|
|
145
145
|
a,
|
|
146
146
|
(n = -1) => {
|
|
147
|
-
if (!this
|
|
147
|
+
if (!this.$t) return;
|
|
148
148
|
const o = new Date().valueOf();
|
|
149
|
-
D.
|
|
149
|
+
D.Hs(this.u, D._s.Tr, o),
|
|
150
150
|
-1 !== n && l.push(["X-Braze-Req-Tokens-Remaining", n.toString()]),
|
|
151
|
-
C.
|
|
152
|
-
url: `${this.
|
|
151
|
+
C.Ks({
|
|
152
|
+
url: `${this.$t.Os()}/template/`,
|
|
153
153
|
data: a,
|
|
154
154
|
headers: l,
|
|
155
155
|
L: (e) => {
|
|
156
|
-
if ((D.
|
|
157
|
-
return void ("function" == typeof t.
|
|
158
|
-
if ((this.
|
|
156
|
+
if ((D.Ws(this.u, D._s.Tr, 1), !this.$t.Qs(a, e, l)))
|
|
157
|
+
return void ("function" == typeof t.Br && t.Br());
|
|
158
|
+
if ((this.$t.Vs(), null == e || null == e.templated_message))
|
|
159
159
|
return;
|
|
160
160
|
const s = e.templated_message;
|
|
161
|
-
if (s.type !== gt.
|
|
161
|
+
if (s.type !== gt.Er._r) return;
|
|
162
162
|
const i = pt(s.data);
|
|
163
163
|
if (null == i) return;
|
|
164
|
-
const n = this.
|
|
164
|
+
const n = this.Qi(i);
|
|
165
165
|
if (n)
|
|
166
|
-
return r.error(n), void ("function" == typeof t.
|
|
167
|
-
"function" == typeof t.
|
|
166
|
+
return r.error(n), void ("function" == typeof t.Br && t.Br());
|
|
167
|
+
"function" == typeof t.Gr && t.Gr(i);
|
|
168
168
|
},
|
|
169
169
|
error: (r) => {
|
|
170
170
|
let n = `getting user personalization for message ${t.triggerId}`;
|
|
171
|
-
if (new Date().valueOf() - t.
|
|
172
|
-
D.
|
|
173
|
-
const r = Math.min(t.
|
|
171
|
+
if (new Date().valueOf() - t.Nr < t.Or) {
|
|
172
|
+
D.ti(this.u, D._s.Tr);
|
|
173
|
+
const r = Math.min(t.Or, this.We),
|
|
174
174
|
o = this.Xe;
|
|
175
175
|
null == i && (i = o);
|
|
176
176
|
const a = Math.min(r, U(o, 3 * i));
|
|
177
177
|
(n += `. Retrying in ${a} ms`),
|
|
178
178
|
setTimeout(() => {
|
|
179
|
-
this.
|
|
179
|
+
this.Zi(t, e, s, a);
|
|
180
180
|
}, a);
|
|
181
181
|
}
|
|
182
|
-
this.
|
|
182
|
+
this.$t.Ys(r, n);
|
|
183
183
|
},
|
|
184
184
|
});
|
|
185
185
|
},
|
|
186
|
-
D.
|
|
186
|
+
D._s.Tr,
|
|
187
187
|
);
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
Hi(t) {
|
|
190
190
|
if (null == t.triggerId)
|
|
191
191
|
return (
|
|
192
192
|
r.info(
|
|
@@ -204,33 +204,33 @@ export default class aa {
|
|
|
204
204
|
!(t && t instanceof InAppMessage && t.constructor !== InAppMessage) ||
|
|
205
205
|
t instanceof ControlMessage
|
|
206
206
|
) &&
|
|
207
|
-
this.u.
|
|
207
|
+
this.u.I(o.C.Xr, t.Y())
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
210
|
Se() {
|
|
211
211
|
if (!this.u) return null;
|
|
212
|
-
const t = this.u.j(o.C.
|
|
212
|
+
const t = this.u.j(o.C.Xr);
|
|
213
213
|
if (!t) return null;
|
|
214
214
|
let e;
|
|
215
215
|
switch (t.type) {
|
|
216
|
-
case InAppMessage.Be.Or:
|
|
217
|
-
e = FullScreenMessage.Xr(t);
|
|
218
|
-
break;
|
|
219
216
|
case InAppMessage.Be.Hr:
|
|
217
|
+
e = FullScreenMessage.Jr(t);
|
|
218
|
+
break;
|
|
219
|
+
case InAppMessage.Be.Kr:
|
|
220
220
|
case InAppMessage.Be.Me:
|
|
221
221
|
case InAppMessage.Be.Ve:
|
|
222
|
-
e = HtmlMessage.
|
|
222
|
+
e = HtmlMessage.Jr(t);
|
|
223
223
|
break;
|
|
224
|
-
case InAppMessage.Be.
|
|
224
|
+
case InAppMessage.Be.Lr:
|
|
225
225
|
case InAppMessage.Be.Ue:
|
|
226
|
-
e = ModalMessage.
|
|
226
|
+
e = ModalMessage.Jr(t);
|
|
227
227
|
break;
|
|
228
|
-
case InAppMessage.Be.
|
|
229
|
-
e = SlideUpMessage.
|
|
228
|
+
case InAppMessage.Be.Qr:
|
|
229
|
+
e = SlideUpMessage.Jr(t);
|
|
230
230
|
}
|
|
231
|
-
return e && this.
|
|
231
|
+
return e && this.Ur(), e;
|
|
232
232
|
}
|
|
233
|
-
|
|
234
|
-
this.u && this.u.
|
|
233
|
+
Ur() {
|
|
234
|
+
this.u && this.u.ii(o.C.Xr);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
@@ -12,11 +12,11 @@ export function logInAppMessageButtonClick(o, t) {
|
|
|
12
12
|
if (!(o instanceof InAppMessageButton))
|
|
13
13
|
return r.error("button must be an InAppMessageButton object"), !1;
|
|
14
14
|
if (!(t instanceof InAppMessage)) return r.error(sr), !1;
|
|
15
|
-
const n = se.m().
|
|
15
|
+
const n = se.m().Ji(o, t);
|
|
16
16
|
if (n.L)
|
|
17
17
|
for (let r = 0; r < n.ge.length; r++)
|
|
18
18
|
et.rr().fe(
|
|
19
|
-
tt.
|
|
19
|
+
tt.Vr,
|
|
20
20
|
[
|
|
21
21
|
t.triggerId,
|
|
22
22
|
null === (s = o.id) || void 0 === s ? void 0 : s.toString(),
|
|
@@ -11,9 +11,9 @@ export function logInAppMessageClick(o) {
|
|
|
11
11
|
if (!(o instanceof InAppMessage)) return r.error(sr), !1;
|
|
12
12
|
const s = se.m().q(o, i.$i);
|
|
13
13
|
if (s) {
|
|
14
|
-
o.
|
|
14
|
+
o.Wr() || logInAppMessageImpression(o);
|
|
15
15
|
for (let r = 0; r < s.ge.length; r++)
|
|
16
|
-
et.rr().fe(tt.
|
|
16
|
+
et.rr().fe(tt.Vr, [o.triggerId], s.ge[r]);
|
|
17
17
|
}
|
|
18
18
|
return s.L;
|
|
19
19
|
}
|
|
@@ -14,10 +14,10 @@ export function logInAppMessageHtmlClick(t, s, o) {
|
|
|
14
14
|
!1
|
|
15
15
|
);
|
|
16
16
|
let m = i.$i;
|
|
17
|
-
null != s && (m = i.
|
|
17
|
+
null != s && (m = i.Oi);
|
|
18
18
|
const n = se.m().q(t, m, s, o);
|
|
19
19
|
if (n.L)
|
|
20
20
|
for (let e = 0; e < n.ge.length; e++)
|
|
21
|
-
et.rr().fe(tt.
|
|
21
|
+
et.rr().fe(tt.Vr, [t.triggerId, s], n.ge[e]);
|
|
22
22
|
return n.L;
|
|
23
23
|
}
|
|
@@ -8,6 +8,6 @@ export function logInAppMessageImpression(o) {
|
|
|
8
8
|
if (!e.X()) return !1;
|
|
9
9
|
if (!(o instanceof InAppMessage || o instanceof ControlMessage))
|
|
10
10
|
return r.error(sr), !1;
|
|
11
|
-
const s = o instanceof ControlMessage ? i.mo : i.
|
|
11
|
+
const s = o instanceof ControlMessage ? i.mo : i.Xi;
|
|
12
12
|
return se.m().q(o, s).L;
|
|
13
13
|
}
|
|
@@ -71,21 +71,19 @@ export default class FullScreenMessage extends InAppMessage {
|
|
|
71
71
|
Y() {
|
|
72
72
|
return super.Y(FullScreenMessage.it);
|
|
73
73
|
}
|
|
74
|
-
static
|
|
74
|
+
static Jr(e) {
|
|
75
75
|
return new FullScreenMessage(
|
|
76
|
-
e[InAppMessage.tt.Vr],
|
|
77
|
-
e[InAppMessage.tt.Wr],
|
|
78
|
-
e[InAppMessage.tt.bt],
|
|
79
76
|
e[InAppMessage.tt.Yr],
|
|
80
77
|
e[InAppMessage.tt.Zr],
|
|
81
|
-
e[InAppMessage.tt.
|
|
78
|
+
e[InAppMessage.tt.bt],
|
|
82
79
|
e[InAppMessage.tt.ea],
|
|
83
80
|
e[InAppMessage.tt.ra],
|
|
81
|
+
e[InAppMessage.tt.URI],
|
|
84
82
|
e[InAppMessage.tt.sa],
|
|
85
83
|
e[InAppMessage.tt.ta],
|
|
86
|
-
e[InAppMessage.tt.ot],
|
|
87
84
|
e[InAppMessage.tt.ia],
|
|
88
85
|
e[InAppMessage.tt.aa],
|
|
86
|
+
e[InAppMessage.tt.ot],
|
|
89
87
|
e[InAppMessage.tt.oa],
|
|
90
88
|
e[InAppMessage.tt.pa],
|
|
91
89
|
e[InAppMessage.tt.ma],
|
|
@@ -96,13 +94,15 @@ export default class FullScreenMessage extends InAppMessage {
|
|
|
96
94
|
e[InAppMessage.tt.da],
|
|
97
95
|
e[InAppMessage.tt.la],
|
|
98
96
|
e[InAppMessage.tt.ga],
|
|
99
|
-
|
|
97
|
+
e[InAppMessage.tt.ja],
|
|
100
98
|
e[InAppMessage.tt.xa],
|
|
101
|
-
e[InAppMessage.tt.za],
|
|
99
|
+
pe(e[InAppMessage.tt.za]),
|
|
102
100
|
e[InAppMessage.tt.ha],
|
|
103
|
-
e[InAppMessage.tt.CSS],
|
|
104
101
|
e[InAppMessage.tt.va],
|
|
102
|
+
e[InAppMessage.tt.wa],
|
|
103
|
+
e[InAppMessage.tt.CSS],
|
|
104
|
+
e[InAppMessage.tt.ya],
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
FullScreenMessage.it = InAppMessage.Be.
|
|
108
|
+
FullScreenMessage.it = InAppMessage.Be.Hr;
|
|
@@ -40,31 +40,31 @@ export default class HtmlMessage extends InAppMessage {
|
|
|
40
40
|
return !1;
|
|
41
41
|
}
|
|
42
42
|
p(i) {
|
|
43
|
-
if (this.xe === InAppMessage.Be.
|
|
43
|
+
if (this.xe === InAppMessage.Be.Kr) {
|
|
44
44
|
if (this.vo) return !1;
|
|
45
45
|
this.vo = !0;
|
|
46
46
|
}
|
|
47
|
-
return this.Et.
|
|
47
|
+
return this.Et.Rt(i), !0;
|
|
48
48
|
}
|
|
49
49
|
Y() {
|
|
50
50
|
const i = super.Y(HtmlMessage.it);
|
|
51
51
|
return (i[InAppMessage.tt.uo] = this.messageFields), i;
|
|
52
52
|
}
|
|
53
|
-
static
|
|
53
|
+
static Jr(i) {
|
|
54
54
|
return new HtmlMessage(
|
|
55
|
-
i[InAppMessage.tt.Vr],
|
|
56
|
-
i[InAppMessage.tt.bt],
|
|
57
55
|
i[InAppMessage.tt.Yr],
|
|
58
|
-
i[InAppMessage.tt.
|
|
59
|
-
i[InAppMessage.tt.
|
|
60
|
-
i[InAppMessage.tt.
|
|
61
|
-
i[InAppMessage.tt.
|
|
62
|
-
i[InAppMessage.tt.
|
|
63
|
-
i[InAppMessage.tt.
|
|
56
|
+
i[InAppMessage.tt.bt],
|
|
57
|
+
i[InAppMessage.tt.ea],
|
|
58
|
+
i[InAppMessage.tt.ta],
|
|
59
|
+
i[InAppMessage.tt.ia],
|
|
60
|
+
i[InAppMessage.tt.fa],
|
|
61
|
+
i[InAppMessage.tt.da],
|
|
62
|
+
i[InAppMessage.tt.xa],
|
|
63
|
+
i[InAppMessage.tt.wa],
|
|
64
64
|
i[InAppMessage.tt.CSS],
|
|
65
65
|
i[InAppMessage.tt.uo],
|
|
66
|
-
i[InAppMessage.tt.
|
|
66
|
+
i[InAppMessage.tt.ya],
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
HtmlMessage.it = InAppMessage.Be.
|
|
70
|
+
HtmlMessage.it = InAppMessage.Be.Kr;
|
|
@@ -15,13 +15,13 @@ export default class InAppMessageButton {
|
|
|
15
15
|
(this.borderColor = r || this.backgroundColor),
|
|
16
16
|
(this.clickAction = h || InAppMessage.ClickAction.NONE),
|
|
17
17
|
(this.uri = e),
|
|
18
|
-
null == n && (n = InAppMessageButton.
|
|
18
|
+
null == n && (n = InAppMessageButton.Ki),
|
|
19
19
|
(this.id = n),
|
|
20
20
|
(this.vo = !1),
|
|
21
21
|
(this.Et = new T());
|
|
22
22
|
}
|
|
23
23
|
subscribeToClickedEvent(s) {
|
|
24
|
-
return this.Et.
|
|
24
|
+
return this.Et.Nt(s);
|
|
25
25
|
}
|
|
26
26
|
removeSubscription(s) {
|
|
27
27
|
this.Et.removeSubscription(s);
|
|
@@ -30,7 +30,7 @@ export default class InAppMessageButton {
|
|
|
30
30
|
this.Et.removeAllSubscriptions();
|
|
31
31
|
}
|
|
32
32
|
p() {
|
|
33
|
-
return !this.vo && ((this.vo = !0), this.Et.
|
|
33
|
+
return !this.vo && ((this.vo = !0), this.Et.Rt(), !0);
|
|
34
34
|
}
|
|
35
35
|
static fromJson(s) {
|
|
36
36
|
return new InAppMessageButton(
|
|
@@ -44,4 +44,4 @@ export default class InAppMessageButton {
|
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
InAppMessageButton.
|
|
47
|
+
InAppMessageButton.Ki = -1;
|
|
@@ -114,10 +114,10 @@ export default class InAppMessage {
|
|
|
114
114
|
(this.qe = InAppMessage.TextAlignment.CENTER);
|
|
115
115
|
}
|
|
116
116
|
subscribeToClickedEvent(t) {
|
|
117
|
-
return this.Et.
|
|
117
|
+
return this.Et.Nt(t);
|
|
118
118
|
}
|
|
119
119
|
subscribeToDismissedEvent(t) {
|
|
120
|
-
return this.rh.
|
|
120
|
+
return this.rh.Nt(t);
|
|
121
121
|
}
|
|
122
122
|
removeSubscription(t) {
|
|
123
123
|
this.Et.removeSubscription(t), this.rh.removeSubscription(t);
|
|
@@ -146,14 +146,14 @@ export default class InAppMessage {
|
|
|
146
146
|
K() {
|
|
147
147
|
return !this.Th && ((this.Th = !0), !0);
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
Wr() {
|
|
150
150
|
return this.Th;
|
|
151
151
|
}
|
|
152
152
|
p(t) {
|
|
153
|
-
return !this.vo && ((this.vo = !0), this.Et.
|
|
153
|
+
return !this.vo && ((this.vo = !0), this.Et.Rt(), !0);
|
|
154
154
|
}
|
|
155
155
|
N() {
|
|
156
|
-
return !this.oh && ((this.oh = !0), this.rh.
|
|
156
|
+
return !this.oh && ((this.oh = !0), this.rh.Rt(), !0);
|
|
157
157
|
}
|
|
158
158
|
hide(t) {
|
|
159
159
|
if (t && t.parentNode) {
|
|
@@ -264,37 +264,37 @@ export default class InAppMessage {
|
|
|
264
264
|
Y(t) {
|
|
265
265
|
const s = {};
|
|
266
266
|
return t
|
|
267
|
-
? ((s[InAppMessage.tt.
|
|
268
|
-
(s[InAppMessage.tt.
|
|
267
|
+
? ((s[InAppMessage.tt.Yr] = this.message),
|
|
268
|
+
(s[InAppMessage.tt.Zr] = this.messageAlignment),
|
|
269
269
|
(s[InAppMessage.tt.Rh] = this.slideFrom),
|
|
270
270
|
(s[InAppMessage.tt.bt] = this.extras),
|
|
271
|
-
(s[InAppMessage.tt.
|
|
272
|
-
(s[InAppMessage.tt.
|
|
271
|
+
(s[InAppMessage.tt.ea] = this.triggerId),
|
|
272
|
+
(s[InAppMessage.tt.ra] = this.clickAction),
|
|
273
273
|
(s[InAppMessage.tt.URI] = this.uri),
|
|
274
|
-
(s[InAppMessage.tt.
|
|
275
|
-
(s[InAppMessage.tt.
|
|
276
|
-
(s[InAppMessage.tt.
|
|
277
|
-
(s[InAppMessage.tt.
|
|
274
|
+
(s[InAppMessage.tt.sa] = this.openTarget),
|
|
275
|
+
(s[InAppMessage.tt.ta] = this.dismissType),
|
|
276
|
+
(s[InAppMessage.tt.ia] = this.duration),
|
|
277
|
+
(s[InAppMessage.tt.aa] = this.icon),
|
|
278
278
|
(s[InAppMessage.tt.ot] = this.imageUrl),
|
|
279
|
-
(s[InAppMessage.tt.
|
|
280
|
-
(s[InAppMessage.tt.
|
|
281
|
-
(s[InAppMessage.tt.
|
|
282
|
-
(s[InAppMessage.tt.
|
|
283
|
-
(s[InAppMessage.tt.
|
|
284
|
-
(s[InAppMessage.tt.
|
|
285
|
-
(s[InAppMessage.tt.
|
|
286
|
-
(s[InAppMessage.tt.
|
|
287
|
-
(s[InAppMessage.tt.
|
|
288
|
-
(s[InAppMessage.tt.
|
|
289
|
-
(s[InAppMessage.tt.
|
|
290
|
-
(s[InAppMessage.tt.
|
|
291
|
-
(s[InAppMessage.tt.
|
|
292
|
-
(s[InAppMessage.tt.
|
|
293
|
-
(s[InAppMessage.tt.
|
|
294
|
-
(s[InAppMessage.tt.
|
|
279
|
+
(s[InAppMessage.tt.oa] = this.imageStyle),
|
|
280
|
+
(s[InAppMessage.tt.pa] = this.iconColor),
|
|
281
|
+
(s[InAppMessage.tt.ma] = this.iconBackgroundColor),
|
|
282
|
+
(s[InAppMessage.tt.na] = this.backgroundColor),
|
|
283
|
+
(s[InAppMessage.tt.ua] = this.textColor),
|
|
284
|
+
(s[InAppMessage.tt.ca] = this.closeButtonColor),
|
|
285
|
+
(s[InAppMessage.tt.fa] = this.animateIn),
|
|
286
|
+
(s[InAppMessage.tt.da] = this.animateOut),
|
|
287
|
+
(s[InAppMessage.tt.la] = this.header),
|
|
288
|
+
(s[InAppMessage.tt.ga] = this.headerAlignment),
|
|
289
|
+
(s[InAppMessage.tt.ja] = this.headerTextColor),
|
|
290
|
+
(s[InAppMessage.tt.xa] = this.frameColor),
|
|
291
|
+
(s[InAppMessage.tt.za] = this.buttons),
|
|
292
|
+
(s[InAppMessage.tt.ha] = this.cropType),
|
|
293
|
+
(s[InAppMessage.tt.va] = this.orientation),
|
|
294
|
+
(s[InAppMessage.tt.wa] = this.htmlId),
|
|
295
295
|
(s[InAppMessage.tt.CSS] = this.css),
|
|
296
296
|
(s[InAppMessage.tt.Z] = t),
|
|
297
|
-
(s[InAppMessage.tt.
|
|
297
|
+
(s[InAppMessage.tt.ya] = this.messageExtras),
|
|
298
298
|
s)
|
|
299
299
|
: s;
|
|
300
300
|
}
|
|
@@ -340,11 +340,11 @@ export default class InAppMessage {
|
|
|
340
340
|
FIT_CENTER: "FIT_CENTER",
|
|
341
341
|
}),
|
|
342
342
|
(InAppMessage.Be = {
|
|
343
|
-
|
|
344
|
-
|
|
343
|
+
Qr: "SLIDEUP",
|
|
344
|
+
Lr: "MODAL",
|
|
345
345
|
Ue: "MODAL_STYLED",
|
|
346
|
-
|
|
347
|
-
|
|
346
|
+
Hr: "FULL",
|
|
347
|
+
Kr: "WEB_HTML",
|
|
348
348
|
Me: "HTML",
|
|
349
349
|
Ve: "HTML_FULL",
|
|
350
350
|
}),
|
|
@@ -354,36 +354,36 @@ export default class InAppMessage {
|
|
|
354
354
|
(InAppMessage.Ih = "ab-hide"),
|
|
355
355
|
(InAppMessage.lh = "ab-pause-scrolling"),
|
|
356
356
|
(InAppMessage.tt = {
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
Yr: "m",
|
|
358
|
+
Zr: "ma",
|
|
359
359
|
Rh: "sf",
|
|
360
360
|
bt: "e",
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
ea: "ti",
|
|
362
|
+
ra: "ca",
|
|
363
363
|
URI: "u",
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
364
|
+
sa: "oa",
|
|
365
|
+
ta: "dt",
|
|
366
|
+
ia: "d",
|
|
367
|
+
aa: "i",
|
|
368
368
|
ot: "iu",
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
369
|
+
oa: "is",
|
|
370
|
+
pa: "ic",
|
|
371
|
+
ma: "ibc",
|
|
372
|
+
na: "bc",
|
|
373
|
+
ua: "tc",
|
|
374
|
+
ca: "cbc",
|
|
375
|
+
fa: "ai",
|
|
376
|
+
da: "ao",
|
|
377
|
+
la: "h",
|
|
378
|
+
ga: "ha",
|
|
379
|
+
ja: "htc",
|
|
380
|
+
xa: "fc",
|
|
381
|
+
za: "b",
|
|
382
|
+
ha: "ct",
|
|
383
|
+
va: "o",
|
|
384
|
+
wa: "hi",
|
|
385
385
|
CSS: "css",
|
|
386
386
|
Z: "type",
|
|
387
387
|
uo: "messageFields",
|
|
388
|
-
|
|
388
|
+
ya: "me",
|
|
389
389
|
});
|
|
@@ -68,21 +68,19 @@ export default class ModalMessage extends InAppMessage {
|
|
|
68
68
|
Y() {
|
|
69
69
|
return super.Y(ModalMessage.it);
|
|
70
70
|
}
|
|
71
|
-
static
|
|
71
|
+
static Jr(e) {
|
|
72
72
|
return new ModalMessage(
|
|
73
|
-
e[InAppMessage.tt.Vr],
|
|
74
|
-
e[InAppMessage.tt.Wr],
|
|
75
|
-
e[InAppMessage.tt.bt],
|
|
76
73
|
e[InAppMessage.tt.Yr],
|
|
77
74
|
e[InAppMessage.tt.Zr],
|
|
78
|
-
e[InAppMessage.tt.
|
|
75
|
+
e[InAppMessage.tt.bt],
|
|
79
76
|
e[InAppMessage.tt.ea],
|
|
80
77
|
e[InAppMessage.tt.ra],
|
|
78
|
+
e[InAppMessage.tt.URI],
|
|
81
79
|
e[InAppMessage.tt.sa],
|
|
82
80
|
e[InAppMessage.tt.ta],
|
|
83
|
-
e[InAppMessage.tt.ot],
|
|
84
81
|
e[InAppMessage.tt.ia],
|
|
85
82
|
e[InAppMessage.tt.aa],
|
|
83
|
+
e[InAppMessage.tt.ot],
|
|
86
84
|
e[InAppMessage.tt.oa],
|
|
87
85
|
e[InAppMessage.tt.pa],
|
|
88
86
|
e[InAppMessage.tt.ma],
|
|
@@ -93,12 +91,14 @@ export default class ModalMessage extends InAppMessage {
|
|
|
93
91
|
e[InAppMessage.tt.da],
|
|
94
92
|
e[InAppMessage.tt.la],
|
|
95
93
|
e[InAppMessage.tt.ga],
|
|
96
|
-
|
|
94
|
+
e[InAppMessage.tt.ja],
|
|
97
95
|
e[InAppMessage.tt.xa],
|
|
96
|
+
pe(e[InAppMessage.tt.za]),
|
|
98
97
|
e[InAppMessage.tt.ha],
|
|
98
|
+
e[InAppMessage.tt.wa],
|
|
99
99
|
e[InAppMessage.tt.CSS],
|
|
100
|
-
e[InAppMessage.tt.
|
|
100
|
+
e[InAppMessage.tt.ya],
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
ModalMessage.it = InAppMessage.Be.
|
|
104
|
+
ModalMessage.it = InAppMessage.Be.Lr;
|