@appcues/web-sdk 7.24.0 → 7.24.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/CHANGELOG.md +6 -0
- package/build/{bootstrap.npm.DYhiH7lm.js → bootstrap.npm.DOAXwcKF.js} +8 -8
- package/build/index.npm.js +1 -1
- package/build/{open-builder.Djam6tRm.js → open-builder.D0GqutyR.js} +135 -93
- package/package.json +1 -1
- /package/build/{checklist.c1e77dbbb641eec1fd5ab36b9a1474de41efcf5f.css → checklist.337650133924744b50ef043c4a91c308ad019cdb.css} +0 -0
- /package/build/{container.c1e77dbbb641eec1fd5ab36b9a1474de41efcf5f.css → container.337650133924744b50ef043c4a91c308ad019cdb.css} +0 -0
- /package/build/{debugger.c1e77dbbb641eec1fd5ab36b9a1474de41efcf5f.css → debugger.337650133924744b50ef043c4a91c308ad019cdb.css} +0 -0
- /package/build/{modal-step-legacy-render.c1e77dbbb641eec1fd5ab36b9a1474de41efcf5f.css → modal-step-legacy-render.337650133924744b50ef043c4a91c308ad019cdb.css} +0 -0
- /package/build/{modal.c1e77dbbb641eec1fd5ab36b9a1474de41efcf5f.css → modal.337650133924744b50ef043c4a91c308ad019cdb.css} +0 -0
- /package/build/{satisfaction-survey.c1e77dbbb641eec1fd5ab36b9a1474de41efcf5f.css → satisfaction-survey.337650133924744b50ef043c4a91c308ad019cdb.css} +0 -0
- /package/build/{test-mode.c1e77dbbb641eec1fd5ab36b9a1474de41efcf5f.css → test-mode.337650133924744b50ef043c4a91c308ad019cdb.css} +0 -0
- /package/build/{tooltip.c1e77dbbb641eec1fd5ab36b9a1474de41efcf5f.css → tooltip.337650133924744b50ef043c4a91c308ad019cdb.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @appcues/web-sdk
|
|
2
2
|
|
|
3
|
+
## 7.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c1e77db: Include campaignId and tacticId on all flow and experience analytics events. When an experience or flow is triggered by another, the child inherits the parent's campaign/tactic IDs. IDs are also preserved across page navigations.
|
|
8
|
+
|
|
3
9
|
## 7.23.13
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1946,7 +1946,7 @@ function ys(e) {
|
|
|
1946
1946
|
}
|
|
1947
1947
|
//#endregion
|
|
1948
1948
|
//#region src/styles/checklist.css?url
|
|
1949
|
-
var bs = "/generic/main/7.24.
|
|
1949
|
+
var bs = "/generic/main/7.24.1/checklist.337650133924744b50ef043c4a91c308ad019cdb.css", xs = "sha256-V0XysNBfj4XuJbDIW5aWcjP7IedHdnAvCi8DeLwGv2o=", Ss = ys(bs), Cs = 30, ws = -300, Ts = "//cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/", Es = null, Ds = null, Os = null, ks = null, As = (e) => {
|
|
1950
1950
|
let { id: t, name: n, styles: r, text_tokens: i, items: a, is_checklist_expanded: o, is_first_view: s, frameHeight: c, beaconWidth: l, onBeaconClicked: u, onItemClicked: d, onOutsideClicked: f, onDismissClicked: p, onDismissCanceled: m, onDismissConfirmed: h, onCSSLoaded: g, onMinimizedClicked: _, shouldShowConfirmDismiss: v, onExpandChecklistResize: y, onCollapseBeaconResize: b, status: x, progress_state: S, is_sequential: C, is_dismissable: ee, showBadge: te, collisionMode: ne, collisionCoordinates: re, isInjectableSDK: ie, styling: ae } = e, oe = (e) => {
|
|
1951
1951
|
ie || setTimeout(() => {
|
|
1952
1952
|
as(e.elm);
|
|
@@ -5296,7 +5296,7 @@ function vf(e, t, n, r) {
|
|
|
5296
5296
|
}
|
|
5297
5297
|
//#endregion
|
|
5298
5298
|
//#region src/styles/modal.css?url
|
|
5299
|
-
var yf = "/generic/main/7.24.
|
|
5299
|
+
var yf = "/generic/main/7.24.1/modal.337650133924744b50ef043c4a91c308ad019cdb.css", bf = "/generic/main/7.24.1/modal-step-legacy-render.337650133924744b50ef043c4a91c308ad019cdb.css", xf = "sha256-Ull2pU6HfREgLRggKNNGV6AHaWBAw5OeIuetlkHnUZY=", Sf = "sha256-Ea5gC5g6QacVSWApI6ApmuZheqr4EDl50hD7GyRsaz0=", Cf = ys(bf), wf = ys(yf), Tf = new Set(["shorty", "slideout"]);
|
|
5300
5300
|
function Ef(e) {
|
|
5301
5301
|
if (!e) return;
|
|
5302
5302
|
let { style: t } = e;
|
|
@@ -5493,7 +5493,7 @@ function Mf({ patternType: e, hidden: t }) {
|
|
|
5493
5493
|
}
|
|
5494
5494
|
//#endregion
|
|
5495
5495
|
//#region src/styles/tooltip.css?url
|
|
5496
|
-
var Nf = "/generic/main/7.24.
|
|
5496
|
+
var Nf = "/generic/main/7.24.1/tooltip.337650133924744b50ef043c4a91c308ad019cdb.css", Pf = "sha256-r4KmO5sl5F5wxrVA5ANjinquA8nBo4ZaSoFboEJwvzs=", Ff = ys(Nf), If = "//twemoji.maxcdn.com/2/svg/", Lf = "//cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/", Rf = "pattern-title", zf = "Hide these tips";
|
|
5497
5497
|
function Bf(e, t) {
|
|
5498
5498
|
return {
|
|
5499
5499
|
skippable: e.skippable,
|
|
@@ -6415,7 +6415,7 @@ function Ep(e) {
|
|
|
6415
6415
|
}
|
|
6416
6416
|
//#endregion
|
|
6417
6417
|
//#region src/styles/satisfaction-survey.css?url
|
|
6418
|
-
var Dp = "/generic/main/7.24.
|
|
6418
|
+
var Dp = "/generic/main/7.24.1/satisfaction-survey.337650133924744b50ef043c4a91c308ad019cdb.css", Op = "sha256-sj4TgtPXrfHc+Sox7I2a7KJr+2zaoe/PhcBrvvCXAEw=", kp = ys(Dp), Ap, jp;
|
|
6419
6419
|
function Mp(e) {
|
|
6420
6420
|
let t = L(e), n = hr(e), r = mr(e), i = Sr(e), a = xr(e, br(e)), o = i[a], s = t.attributes.pattern_type, { position: c } = t.attributes, l = e.views.callbacks[w.SATISFACTION_SURVEY], u = n.cssLoaded, d = Ns(e.settings), f = r !== T.SHOWING, p = {}, m = u && P.inArray([T.SHOWING, T.WILL_CLOSE], r);
|
|
6421
6421
|
m || (p = { display: "none" }), p = {
|
|
@@ -8291,7 +8291,7 @@ var h_ = "v2", g_ = (e) => {
|
|
|
8291
8291
|
return window.createAppcues(n);
|
|
8292
8292
|
}, __ = async () => {
|
|
8293
8293
|
if (typeof window.createAppcues != "function") {
|
|
8294
|
-
let e = await import("./open-builder.
|
|
8294
|
+
let e = await import("./open-builder.D0GqutyR.js");
|
|
8295
8295
|
window.createAppcues = e.default;
|
|
8296
8296
|
}
|
|
8297
8297
|
}, v_ = async () => (await __(), g_), y_ = "EVENTS_TRIGGERED", b_ = q(y_), x_ = q(uc.SET_SESSION), S_ = q(uc.START_SESSION), C_ = q(uc.SESSION_STARTED);
|
|
@@ -10468,7 +10468,7 @@ function Vb({ user: e }) {
|
|
|
10468
10468
|
}
|
|
10469
10469
|
//#endregion
|
|
10470
10470
|
//#region src/styles/debugger.css?url
|
|
10471
|
-
var Hb = "/generic/main/7.24.
|
|
10471
|
+
var Hb = "/generic/main/7.24.1/debugger.337650133924744b50ef043c4a91c308ad019cdb.css";
|
|
10472
10472
|
//#endregion
|
|
10473
10473
|
//#region src/scripts/views/renderers/render-debugger.jsx
|
|
10474
10474
|
qa();
|
|
@@ -10551,7 +10551,7 @@ var Xb = "https://docs.appcues.com/user-experiences-faq/faq-test-mode", Zb = (e)
|
|
|
10551
10551
|
"class-clickable": !0,
|
|
10552
10552
|
"on-click": t.onCancelClicked
|
|
10553
10553
|
}, "End Test"))));
|
|
10554
|
-
}, Qb = "/generic/main/7.24.
|
|
10554
|
+
}, Qb = "/generic/main/7.24.1/test-mode.337650133924744b50ef043c4a91c308ad019cdb.css";
|
|
10555
10555
|
//#endregion
|
|
10556
10556
|
//#region src/scripts/views/renderers/render-test-mode-banner.jsx
|
|
10557
10557
|
qa();
|
|
@@ -11971,7 +11971,7 @@ function* jC() {
|
|
|
11971
11971
|
}
|
|
11972
11972
|
//#endregion
|
|
11973
11973
|
//#region src/styles/container.css?url
|
|
11974
|
-
var MC = "/generic/main/7.24.
|
|
11974
|
+
var MC = "/generic/main/7.24.1/container.337650133924744b50ef043c4a91c308ad019cdb.css", NC = "sha256-lSNoLP5iR6z+5ZIuDIIBsSUCzS4XW0jHmE9J8Qsp1ao=";
|
|
11975
11975
|
window.performance && window.performance.mark && window.performance.mark("apc-init"), wg();
|
|
11976
11976
|
var PC = window.AppcuesBundleSettings;
|
|
11977
11977
|
[...document.documentElement.querySelectorAll("link")].forEach((e) => {
|
package/build/index.npm.js
CHANGED
|
@@ -2973,7 +2973,8 @@ var vn = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
|
|
|
2973
2973
|
})))(), 1), yn = "EXPERIENCE_STARTED", bn = "SHOW", xn = "STOP_EXPERIENCE", Sn = {
|
|
2974
2974
|
NAVIGATION: "navigation",
|
|
2975
2975
|
COMPLETED: "completed",
|
|
2976
|
-
DISMISSED: "dismissed"
|
|
2976
|
+
DISMISSED: "dismissed",
|
|
2977
|
+
ERROR: "error"
|
|
2977
2978
|
}, Cn = "EXTENDED_EVENT", wn = "START_STEP", Tn = "STOP_STEP", En = "UPDATE_STEP", Dn = "SET_STEP_CONTAINER_TARGET", On = "UPDATE_STEP_CONTENT", kn = "RECOVER_STEP", An = "AUTO_RECOVER_STEP", jn = "PARENT_RECOVER_STEP", Mn = "ERROR", Nn = "STEP_INTERACTION", Pn = "STEP_SEEN", Fn = "UPDATE_ROOT_STYLE", In = "RELOAD", Ln = "STEP_STOPPED", Rn = "EXPERIENCE_DISMISSED", zn = "EXPERIENCE_SNOOZED", Bn = "FORWARD_TO_PARENT", Vn = "TRANSITION_TO_END", Hn = "ACTIONS_STARTED", Un = "ACTIONS_FINISHED", Wn = "experience.begin", Gn = "experience.end", Kn = "step.prebegin", qn = "step.begin", Jn = "step.prerender", Yn = "step.postrender", Xn = "step.end", Zn = "step.error", Qn = "step.container_change", $n = "RUN_HOOKS", er = "RUN_HOOKS_DONE", tr = "START_THEME_REMOVAL_LISTENER", nr = "STOP_THEME_REMOVAL_LISTENER", rr = "GLOBAL_CONTAINER_REMOVED", ir = "STEP_CONTAINER_REMOVED", ar = "appcues-experience-container", or = "APPCUES-EXPERIENCE-CONTAINER", sr = "APPCUES-EXPERIENCE-CONTAINER-BUILDER", cr = "data-appcues-container-id", lr = "RUN_TRAITS_DONE", ur = "RUN_TRAITS_ERROR", dr = "BIND_ACTIONS_ERROR", fr = (() => {
|
|
2978
2979
|
let e = /* @__PURE__ */ new Map(), t = (t) => {
|
|
2979
2980
|
let { observerInstance: n } = e.get(t);
|
|
@@ -3727,9 +3728,10 @@ var qr = (0, zr.default)((e, t) => {
|
|
|
3727
3728
|
...e,
|
|
3728
3729
|
...t.stepConfig
|
|
3729
3730
|
})
|
|
3730
|
-
}), ti = X(yn), ni = X(({ step: e }) => ({
|
|
3731
|
+
}), ti = X(yn), ni = X(({ step: e, stopReason: t }) => ({
|
|
3731
3732
|
type: Ln,
|
|
3732
|
-
id: e.id
|
|
3733
|
+
id: e.id,
|
|
3734
|
+
reason: t
|
|
3733
3735
|
})), ri = (e, { styles: t, getRoot: n }) => {
|
|
3734
3736
|
let r = n();
|
|
3735
3737
|
r && Object.entries(t).forEach(([e, t]) => {
|
|
@@ -3771,16 +3773,16 @@ var qr = (0, zr.default)((e, t) => {
|
|
|
3771
3773
|
}, pi = ({ getTrait: e, trait: t, ...n }) => {
|
|
3772
3774
|
let r = e(t.type);
|
|
3773
3775
|
r && r(n, t.config ?? {});
|
|
3774
|
-
}, { getCallback: mi, registerCallback: Q } = fi(), hi = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += "-" : e += "_", e), ""), gi = ({ experience: e, callback: t, step: n, findId: r, getContainer: i, getWindowReference: a }) => {
|
|
3775
|
-
let
|
|
3776
|
-
let
|
|
3776
|
+
}, { getCallback: mi, registerCallback: Q } = fi(), hi = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += "-" : e += "_", e), ""), gi = ({ experience: e, callback: t, step: n, findId: r, getContainer: i, getWindowReference: a, sendToExperience: o }) => {
|
|
3777
|
+
let s = (e, { forwardToParent: r = !1 } = {}) => {
|
|
3778
|
+
let s = ({ type: e, ...n }) => t(r ? {
|
|
3777
3779
|
...n,
|
|
3778
3780
|
eventType: e,
|
|
3779
3781
|
type: Bn
|
|
3780
3782
|
} : {
|
|
3781
3783
|
type: e,
|
|
3782
3784
|
...n
|
|
3783
|
-
});
|
|
3785
|
+
}), c = (e) => r && o ? o(e) : s(e);
|
|
3784
3786
|
return {
|
|
3785
3787
|
querySelector: (e) => Tr(e, {
|
|
3786
3788
|
step: n,
|
|
@@ -3788,76 +3790,78 @@ var qr = (0, zr.default)((e, t) => {
|
|
|
3788
3790
|
stepContainer: i(),
|
|
3789
3791
|
getWindowReference: a
|
|
3790
3792
|
}),
|
|
3791
|
-
start: () =>
|
|
3793
|
+
start: () => c({
|
|
3792
3794
|
type: wn,
|
|
3793
3795
|
id: e.id
|
|
3794
3796
|
}),
|
|
3795
|
-
stop: (t) => {
|
|
3796
|
-
|
|
3797
|
+
stop: (t, n) => {
|
|
3798
|
+
c({
|
|
3797
3799
|
type: Tn,
|
|
3798
3800
|
id: e.id,
|
|
3799
|
-
onStopped: t
|
|
3801
|
+
onStopped: t,
|
|
3802
|
+
reason: n
|
|
3800
3803
|
});
|
|
3801
3804
|
},
|
|
3802
3805
|
setStepContainerTarget: (t) => {
|
|
3803
|
-
|
|
3806
|
+
s({
|
|
3804
3807
|
type: Dn,
|
|
3805
3808
|
id: e.id,
|
|
3806
3809
|
container: t
|
|
3807
3810
|
});
|
|
3808
3811
|
},
|
|
3809
3812
|
recover: ({ errorId: t }) => {
|
|
3810
|
-
|
|
3813
|
+
s({
|
|
3811
3814
|
type: kn,
|
|
3812
3815
|
id: e.id,
|
|
3813
3816
|
errorId: t
|
|
3814
3817
|
});
|
|
3815
3818
|
},
|
|
3816
|
-
dismissExperience: () =>
|
|
3817
|
-
snoozeExperience: () =>
|
|
3818
|
-
seen: () =>
|
|
3819
|
+
dismissExperience: () => s({ type: Rn }),
|
|
3820
|
+
snoozeExperience: () => s({ type: zn }),
|
|
3821
|
+
seen: () => s({
|
|
3819
3822
|
type: Pn,
|
|
3820
3823
|
id: e.id
|
|
3821
3824
|
}),
|
|
3822
3825
|
getConfig: () => e,
|
|
3823
|
-
interaction: (t, n) =>
|
|
3826
|
+
interaction: (t, n) => s({
|
|
3824
3827
|
type: Nn,
|
|
3825
3828
|
id: e.id,
|
|
3826
3829
|
interactionType: t,
|
|
3827
3830
|
interactionData: n
|
|
3828
3831
|
}),
|
|
3829
|
-
extendedEvent: (t, n) =>
|
|
3832
|
+
extendedEvent: (t, n) => s({
|
|
3830
3833
|
type: Cn,
|
|
3831
3834
|
id: e.id,
|
|
3832
3835
|
name: t,
|
|
3833
3836
|
...n
|
|
3834
3837
|
})
|
|
3835
3838
|
};
|
|
3836
|
-
},
|
|
3839
|
+
}, c = e.steps.map((e) => s(e, { forwardToParent: !!n }));
|
|
3837
3840
|
return n ? {
|
|
3838
3841
|
getRootNodeId: () => r(n.virtualizedContent),
|
|
3839
|
-
steps:
|
|
3840
|
-
step:
|
|
3842
|
+
steps: c,
|
|
3843
|
+
step: s(n, { forwardToParent: !1 })
|
|
3841
3844
|
} : {
|
|
3842
3845
|
getRootNodeId: () => r(n.virtualizedContent),
|
|
3843
|
-
steps:
|
|
3846
|
+
steps: c
|
|
3844
3847
|
};
|
|
3845
3848
|
}, _i = ({ experience: e, step: t, overrideStyle: n, getContainer: r, getRoot: i, callback: a, get: o, getAction: s = () => null, handleNavigation: c }) => {
|
|
3846
|
-
let { findId: l } = o("vNodeHandlers"), u = o("getWindowReference"), d = gi({
|
|
3849
|
+
let { findId: l } = o("vNodeHandlers"), u = o("getWindowReference"), d = o("getExperienceSend"), f = gi({
|
|
3847
3850
|
experience: e,
|
|
3848
3851
|
step: t,
|
|
3849
3852
|
callback: a,
|
|
3850
3853
|
findId: l,
|
|
3851
3854
|
getContainer: r,
|
|
3852
|
-
getWindowReference: u
|
|
3853
|
-
|
|
3855
|
+
getWindowReference: u,
|
|
3856
|
+
sendToExperience: typeof d == "function" ? d(e.id) : void 0
|
|
3857
|
+
}), p = (e) => {
|
|
3854
3858
|
let t = hi();
|
|
3855
3859
|
return console.info("error reported:", e), a({
|
|
3856
3860
|
type: Mn,
|
|
3857
3861
|
message: e,
|
|
3858
3862
|
errorId: t
|
|
3859
3863
|
}), t;
|
|
3860
|
-
},
|
|
3864
|
+
}, m = () => a(xn), h = () => e.id, g = {
|
|
3861
3865
|
getContainer: r,
|
|
3862
3866
|
querySelector: (e) => Tr(e, {
|
|
3863
3867
|
step: t,
|
|
@@ -3865,7 +3869,7 @@ var qr = (0, zr.default)((e, t) => {
|
|
|
3865
3869
|
stepContainer: r(),
|
|
3866
3870
|
getWindowReference: u
|
|
3867
3871
|
}),
|
|
3868
|
-
reportError:
|
|
3872
|
+
reportError: p,
|
|
3869
3873
|
onElementInserted: (e) => xr({
|
|
3870
3874
|
...e,
|
|
3871
3875
|
getWindowReference: u
|
|
@@ -3874,9 +3878,9 @@ var qr = (0, zr.default)((e, t) => {
|
|
|
3874
3878
|
...e,
|
|
3875
3879
|
getWindowReference: u
|
|
3876
3880
|
}),
|
|
3877
|
-
...
|
|
3878
|
-
stopExperience:
|
|
3879
|
-
getExperienceId:
|
|
3881
|
+
...f,
|
|
3882
|
+
stopExperience: m,
|
|
3883
|
+
getExperienceId: h,
|
|
3880
3884
|
getWindowReference: u,
|
|
3881
3885
|
sendEvent: o("sendEvent"),
|
|
3882
3886
|
sendCustomEvent: o("sendCustomEvent"),
|
|
@@ -3910,8 +3914,8 @@ var qr = (0, zr.default)((e, t) => {
|
|
|
3910
3914
|
getRoot: i
|
|
3911
3915
|
});
|
|
3912
3916
|
},
|
|
3913
|
-
...
|
|
3914
|
-
} :
|
|
3917
|
+
...g
|
|
3918
|
+
} : g;
|
|
3915
3919
|
}, vi = "formData.", yi = "a, button, video, input, textarea, select, form", bi = (e, t) => {
|
|
3916
3920
|
if (t.startsWith(vi)) {
|
|
3917
3921
|
let n = t.replace(vi, "");
|
|
@@ -4859,7 +4863,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
4859
4863
|
actions: ["saveStopReason", "addStoppedCallback"]
|
|
4860
4864
|
}],
|
|
4861
4865
|
PARENT_RECOVER_STEP: {
|
|
4862
|
-
actions: ["stepRecovered"],
|
|
4866
|
+
actions: ["stepRecovered", "clearStepErrorEmitted"],
|
|
4863
4867
|
target: "rendering",
|
|
4864
4868
|
internal: !0
|
|
4865
4869
|
},
|
|
@@ -5025,7 +5029,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5025
5029
|
ERROR: {
|
|
5026
5030
|
target: "error",
|
|
5027
5031
|
internal: !0,
|
|
5028
|
-
actions: "
|
|
5032
|
+
actions: "reportStepErrorOnce"
|
|
5029
5033
|
},
|
|
5030
5034
|
RUN_HOOKS_DONE: {
|
|
5031
5035
|
target: "begin",
|
|
@@ -5039,7 +5043,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5039
5043
|
ERROR: {
|
|
5040
5044
|
target: "error",
|
|
5041
5045
|
internal: !0,
|
|
5042
|
-
actions: "
|
|
5046
|
+
actions: "reportStepErrorOnce"
|
|
5043
5047
|
},
|
|
5044
5048
|
RUN_HOOKS_DONE: {
|
|
5045
5049
|
target: "rendering",
|
|
@@ -5088,7 +5092,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5088
5092
|
target: "",
|
|
5089
5093
|
actions: [
|
|
5090
5094
|
Jt("postRenderAsyncEventsHandler"),
|
|
5091
|
-
"
|
|
5095
|
+
"reportStepErrorOnce",
|
|
5092
5096
|
"markErrorReported"
|
|
5093
5097
|
]
|
|
5094
5098
|
},
|
|
@@ -5163,16 +5167,20 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5163
5167
|
},
|
|
5164
5168
|
FORCE_RECOVER: {
|
|
5165
5169
|
target: "pre_begin",
|
|
5166
|
-
actions: [
|
|
5170
|
+
actions: [
|
|
5171
|
+
"resetRender",
|
|
5172
|
+
"stepRecovered",
|
|
5173
|
+
"clearStepErrorEmitted"
|
|
5174
|
+
]
|
|
5167
5175
|
},
|
|
5168
5176
|
AUTO_RECOVER_STEP: {
|
|
5169
5177
|
target: "pre_begin",
|
|
5170
|
-
actions: "resetRender",
|
|
5178
|
+
actions: ["resetRender", "clearStepErrorEmitted"],
|
|
5171
5179
|
cond: "isAutoRecoverEvent"
|
|
5172
5180
|
}
|
|
5173
5181
|
}
|
|
5174
5182
|
},
|
|
5175
|
-
destroyed: { entry: ["
|
|
5183
|
+
destroyed: { entry: ["reportStepErrorOnce", "unmount"] },
|
|
5176
5184
|
waitingPendingActions: { on: { ACTIONS_FINISHED: {
|
|
5177
5185
|
target: "running_end_hooks",
|
|
5178
5186
|
actions: "setActionsFinished"
|
|
@@ -5213,6 +5221,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5213
5221
|
blockedEvents: {},
|
|
5214
5222
|
pendingStepSeen: !1,
|
|
5215
5223
|
errorReported: !1,
|
|
5224
|
+
stepErrorEmitted: !1,
|
|
5216
5225
|
actionsRunning: !1,
|
|
5217
5226
|
experienceInstanceId: a,
|
|
5218
5227
|
stopReason: null,
|
|
@@ -5255,6 +5264,12 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5255
5264
|
blockEvent: R.helpers.blockEvent,
|
|
5256
5265
|
queueStepSeen: Y({ pendingStepSeen: !0 }),
|
|
5257
5266
|
markErrorReported: Y({ errorReported: !0 }),
|
|
5267
|
+
markStepErrorEmitted: Y({ stepErrorEmitted: !0 }),
|
|
5268
|
+
clearStepErrorEmitted: Y({ stepErrorEmitted: !1 }),
|
|
5269
|
+
reportStepErrorOnce: Xe([{
|
|
5270
|
+
cond: (e) => !e.stepErrorEmitted,
|
|
5271
|
+
actions: ["stepError", "markStepErrorEmitted"]
|
|
5272
|
+
}]),
|
|
5258
5273
|
commitPendingStepSeen: Y((e) => (e.pendingStepSeen && !e.errorReported && R.stepActions.stepSeen(e), { pendingStepSeen: !1 })),
|
|
5259
5274
|
autoRecover: oi,
|
|
5260
5275
|
setActionsRunning: si,
|
|
@@ -5294,7 +5309,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5294
5309
|
isHooksDoneEventErrorType: (e, t) => t.hookType === Zn,
|
|
5295
5310
|
isHooksDoneEventEndType: (e, t) => t.hookType === Xn,
|
|
5296
5311
|
hasPendingActions: (e) => e.actionsRunning,
|
|
5297
|
-
shouldFireStepCompletedEvent: (e, t) => t.hookType === "step.end" && e.blockedEvents.STEP_SEEN && e.stopReason !== Sn.NAVIGATION && e.stopReason !== Sn.DISMISSED
|
|
5312
|
+
shouldFireStepCompletedEvent: (e, t) => t.hookType === "step.end" && e.blockedEvents.STEP_SEEN && e.stopReason !== Sn.NAVIGATION && e.stopReason !== Sn.DISMISSED && e.stopReason !== Sn.ERROR
|
|
5298
5313
|
}
|
|
5299
5314
|
});
|
|
5300
5315
|
}, Oo = ({ createStepHooks: e, createHooksService: t, get: n }) => Y({ stepMachines: ({ experience: r, experienceInstanceId: i }) => {
|
|
@@ -5557,18 +5572,26 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5557
5572
|
target: "",
|
|
5558
5573
|
actions: ["reloadSteps"]
|
|
5559
5574
|
},
|
|
5560
|
-
STEP_STOPPED: [
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
"
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5575
|
+
STEP_STOPPED: [
|
|
5576
|
+
{
|
|
5577
|
+
target: "end-final",
|
|
5578
|
+
cond: "areAllStepsStoppedFromError",
|
|
5579
|
+
actions: ["removeGlobalThemeComponent", "runExperienceEndHooks"]
|
|
5580
|
+
},
|
|
5581
|
+
{
|
|
5582
|
+
target: "end-final",
|
|
5583
|
+
cond: "areAllStepsStopped",
|
|
5584
|
+
actions: [
|
|
5585
|
+
"experienceCompleted",
|
|
5586
|
+
"removeGlobalThemeComponent",
|
|
5587
|
+
"runExperienceEndHooks"
|
|
5588
|
+
]
|
|
5589
|
+
},
|
|
5590
|
+
{
|
|
5591
|
+
target: "",
|
|
5592
|
+
actions: ["cleanStepMachines", "cleanRunOnceTraits"]
|
|
5593
|
+
}
|
|
5594
|
+
]
|
|
5572
5595
|
},
|
|
5573
5596
|
entry: [
|
|
5574
5597
|
"createGlobalThemeComponent",
|
|
@@ -5639,6 +5662,7 @@ var mo = (...e) => (t) => e.reduce((e, t) => t(e), t), ho = (e) => e.reduce((e,
|
|
|
5639
5662
|
guards: {
|
|
5640
5663
|
isEventEnabled: d.helpers.isEventEnabled,
|
|
5641
5664
|
areAllStepsStopped: (e) => Object.values(e.stepMachines).every((e) => e.state.done),
|
|
5665
|
+
areAllStepsStoppedFromError: (e, t) => t.reason === Sn.ERROR && Object.values(e.stepMachines).every((e) => e.state.done),
|
|
5642
5666
|
doesStepInstanceExist: (e, t) => e.stepMachines?.[t.id] !== void 0,
|
|
5643
5667
|
shouldFireCompletedEvent: (e, t) => t.reason !== Sn.NAVIGATION && t.reason !== Sn.DISMISSED
|
|
5644
5668
|
}
|
|
@@ -7872,7 +7896,19 @@ Q(Yu, ({ addHook: e, registerAction: t }, n) => {
|
|
|
7872
7896
|
});
|
|
7873
7897
|
var Zu = "@appcues/sequential", Qu = (e, t) => e.findIndex((e) => e.getConfig()?.id === t);
|
|
7874
7898
|
Q(Zu, ({ addHook: e, registerAction: t }) => {
|
|
7875
|
-
let n
|
|
7899
|
+
let n, r = "forward", i = (e, { steps: t }, i) => {
|
|
7900
|
+
r = "backward", n !== 0 && t[n].stop(() => {
|
|
7901
|
+
--n, t[n].start();
|
|
7902
|
+
}, i);
|
|
7903
|
+
}, a = (e, { steps: t }, i) => {
|
|
7904
|
+
if (r = "forward", n === t.length - 1) {
|
|
7905
|
+
t[n].stop(void 0, i);
|
|
7906
|
+
return;
|
|
7907
|
+
}
|
|
7908
|
+
t[n].stop(() => {
|
|
7909
|
+
n += 1, t[n].start();
|
|
7910
|
+
}, i);
|
|
7911
|
+
};
|
|
7876
7912
|
e("experience.begin", ({ steps: e, getTraitConfig: t, reportError: r }) => {
|
|
7877
7913
|
let { startStepId: i } = t() ?? {};
|
|
7878
7914
|
if (i) {
|
|
@@ -7880,24 +7916,12 @@ Q(Zu, ({ addHook: e, registerAction: t }) => {
|
|
|
7880
7916
|
t === -1 && r(`startStepId "${i}" did not match any step; starting at 0`), n = t === -1 ? 0 : t;
|
|
7881
7917
|
} else n = 0;
|
|
7882
7918
|
e[n].start();
|
|
7883
|
-
}), t("next", (e, {
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
}
|
|
7888
|
-
|
|
7889
|
-
n += 1, t[n].start();
|
|
7890
|
-
});
|
|
7891
|
-
}), t("prev", (e, { steps: t }) => {
|
|
7892
|
-
n !== 0 && t[n].stop(() => {
|
|
7893
|
-
--n, t[n].start();
|
|
7894
|
-
});
|
|
7895
|
-
}), t("goTo", (e, { step: t, steps: r }) => {
|
|
7896
|
-
let i = Qu(r, e.stepId);
|
|
7897
|
-
i !== -1 && t.stop(() => {
|
|
7898
|
-
n = i, r[n].start();
|
|
7899
|
-
});
|
|
7900
|
-
});
|
|
7919
|
+
}), t("next", a), t("prev", i), t("goTo", (e, { step: t, steps: i }, a) => {
|
|
7920
|
+
let o = Qu(i, e.stepId);
|
|
7921
|
+
o !== -1 && (r = "forward", t.stop(() => {
|
|
7922
|
+
n = o, i[n].start();
|
|
7923
|
+
}, a));
|
|
7924
|
+
}), t("skip", (e, t, n) => r === "backward" ? i(e, t, n) : a(e, t, n));
|
|
7901
7925
|
});
|
|
7902
7926
|
var $u = "@appcues/delay", ed = 3e5;
|
|
7903
7927
|
Q($u, ({ addHook: e }, t) => {
|
|
@@ -8162,7 +8186,22 @@ Q("@appcues/dialog", ({ addHook: e }, t) => {
|
|
|
8162
8186
|
t = !1;
|
|
8163
8187
|
});
|
|
8164
8188
|
});
|
|
8165
|
-
var jd = (e) =>
|
|
8189
|
+
var jd = "@appcues/advance-on-error", Md = 3e5, Nd = "@appcues/sequential.next", Pd = "@appcues/sequential.skip", Fd = (e) => e === Nd ? Pd : e;
|
|
8190
|
+
Q(jd, ({ addHook: e }, t) => {
|
|
8191
|
+
let n = null, r = () => {
|
|
8192
|
+
n !== null && (clearTimeout(n), n = null);
|
|
8193
|
+
};
|
|
8194
|
+
e("step.error", (e) => {
|
|
8195
|
+
r();
|
|
8196
|
+
let { getAction: i } = e, a = Number(t?.duration ?? 500), o = Number.isFinite(a) ? a : 500, s = t?.action;
|
|
8197
|
+
s?.type && (n = setTimeout(() => {
|
|
8198
|
+
n = null;
|
|
8199
|
+
let t = i(Fd(s.type));
|
|
8200
|
+
t && t(s.config ?? {}, e, Sn.ERROR);
|
|
8201
|
+
}, Math.min(Math.max(o, 0), Md)));
|
|
8202
|
+
}), e("step.prebegin", r), e("step.end", r);
|
|
8203
|
+
});
|
|
8204
|
+
var Id = (e) => class extends e.HTMLElement {
|
|
8166
8205
|
constructor() {
|
|
8167
8206
|
super();
|
|
8168
8207
|
let t = this.ownerDocument || e.document;
|
|
@@ -8175,19 +8214,19 @@ var jd = (e) => class extends e.HTMLElement {
|
|
|
8175
8214
|
async connectedCallback() {
|
|
8176
8215
|
this.shadowRoot.append(this.hideContentStyles), this.shadowRoot.append(...this.childNodes), this.getAttribute("themeId") && await Xr(this), this.shadowRoot.prepend(this.webComponentStyles), this.hideContentStyles.remove();
|
|
8177
8216
|
}
|
|
8178
|
-
},
|
|
8217
|
+
}, Ld = /* @__PURE__ */ new WeakMap(), Rd = (e = () => window) => {
|
|
8179
8218
|
let t = e();
|
|
8180
|
-
if (
|
|
8219
|
+
if (Ld.has(t)) return Ld.get(t);
|
|
8181
8220
|
if (!t.customElements.get("appcues-experience-container")) {
|
|
8182
|
-
let e =
|
|
8221
|
+
let e = Id(t);
|
|
8183
8222
|
t.customElements.define(ar, e);
|
|
8184
8223
|
}
|
|
8185
8224
|
let n = t.customElements.whenDefined(ar);
|
|
8186
|
-
return
|
|
8187
|
-
},
|
|
8188
|
-
function
|
|
8225
|
+
return Ld.set(t, n), n;
|
|
8226
|
+
}, zd = !1;
|
|
8227
|
+
function Bd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t = () => {}, sendCustomEvent: n = () => {}, showFlow: r = () => {}, updateUserProfile: i = () => {}, handleNavigation: a = () => {}, createRenderListener: o = ss, vNodeHandlers: s = ms, accessibilityHandlers: c = Os, getWindowReference: l = () => window, apiOverrides: u = {} } = {}) {
|
|
8189
8228
|
Ur(u);
|
|
8190
|
-
let d = /* @__PURE__ */ new Map(), f = {
|
|
8229
|
+
let d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = {
|
|
8191
8230
|
sendEvent: t,
|
|
8192
8231
|
sendCustomEvent: n,
|
|
8193
8232
|
showFlow: r,
|
|
@@ -8197,10 +8236,13 @@ function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t =
|
|
|
8197
8236
|
vNodeHandlers: s,
|
|
8198
8237
|
accessibilityHandlers: c,
|
|
8199
8238
|
getWindowReference: l,
|
|
8200
|
-
apiOverrides: u
|
|
8201
|
-
|
|
8239
|
+
apiOverrides: u,
|
|
8240
|
+
getExperienceSend: (e) => f.get(e)
|
|
8241
|
+
}, m = (e) => e ? p?.[e] ? p[e] : () => {
|
|
8202
8242
|
throw Error(`can't find external dependency called ${e}`);
|
|
8203
|
-
} :
|
|
8243
|
+
} : p, h = (e, t) => {
|
|
8244
|
+
f.set(e, (e) => t.send(e));
|
|
8245
|
+
}, g = ({ reason: t = Sn.NAVIGATION } = {}) => {
|
|
8204
8246
|
e.forEach((e) => {
|
|
8205
8247
|
e.experienceService.send({
|
|
8206
8248
|
type: xn,
|
|
@@ -8208,26 +8250,26 @@ function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t =
|
|
|
8208
8250
|
}), e.experienceService.subscribe((t) => {
|
|
8209
8251
|
t.matches("end-final") && e.experienceService.stop();
|
|
8210
8252
|
});
|
|
8211
|
-
}), e.clear();
|
|
8212
|
-
},
|
|
8253
|
+
}), e.clear(), f.clear();
|
|
8254
|
+
}, _ = (t, { reason: n = Sn.NAVIGATION } = {}) => {
|
|
8213
8255
|
e.has(t) && (e.get(t).experienceService.send({
|
|
8214
8256
|
type: xn,
|
|
8215
8257
|
reason: n
|
|
8216
|
-
}), e.delete(t));
|
|
8258
|
+
}), e.delete(t), f.delete(t));
|
|
8217
8259
|
};
|
|
8218
8260
|
return {
|
|
8219
8261
|
registerAction: Si,
|
|
8220
8262
|
registerTrait: Q,
|
|
8221
8263
|
show: async (t) => {
|
|
8222
|
-
|
|
8264
|
+
Rd(l), await l().customElements.whenDefined(ar);
|
|
8223
8265
|
let n = dn(dn(t, "traits", (e) => (e ?? []).map((e, t) => ({
|
|
8224
8266
|
...e,
|
|
8225
8267
|
id: e.id || `${e.type}:${t}`
|
|
8226
8268
|
}))), "steps", (e) => (e ?? []).map((e) => dn(e, "traits", (e) => (e ?? []).map((e, t) => ({
|
|
8227
8269
|
...e,
|
|
8228
8270
|
id: e.id || `${e.type}:${t}`
|
|
8229
|
-
}))))), r = e.get(t.id)?.experienceService ?? It(is(n,
|
|
8230
|
-
r.send({
|
|
8271
|
+
}))))), r = e.get(t.id)?.experienceService ?? It(is(n, m), { devTools: zd }).start();
|
|
8272
|
+
h(t.id, r), r.send({
|
|
8231
8273
|
type: bn,
|
|
8232
8274
|
experience: n
|
|
8233
8275
|
}), e.set(t.id, {
|
|
@@ -8235,12 +8277,12 @@ function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t =
|
|
|
8235
8277
|
experience: n
|
|
8236
8278
|
});
|
|
8237
8279
|
},
|
|
8238
|
-
stopAll:
|
|
8239
|
-
stop:
|
|
8280
|
+
stopAll: g,
|
|
8281
|
+
stop: _,
|
|
8240
8282
|
pause: (t) => {
|
|
8241
8283
|
if (d.get(t)) return;
|
|
8242
8284
|
let n = e.get(t);
|
|
8243
|
-
n && (
|
|
8285
|
+
n && (_(t), d.set(t, {
|
|
8244
8286
|
experienceService: n.experienceService,
|
|
8245
8287
|
experience: n.experience
|
|
8246
8288
|
}));
|
|
@@ -8250,11 +8292,11 @@ function Fd({ runningExperiences: e = /* @__PURE__ */ new Map(), sendEvent: t =
|
|
|
8250
8292
|
n && (n.experienceService.send({ type: bn }), e.set(t, {
|
|
8251
8293
|
experienceService: n.experienceService,
|
|
8252
8294
|
experience: n.experience
|
|
8253
|
-
}), d.delete(t));
|
|
8295
|
+
}), h(t, n.experienceService), d.delete(t));
|
|
8254
8296
|
},
|
|
8255
8297
|
getRunningExperiences: () => [...e].map(([, { experience: e }]) => e),
|
|
8256
8298
|
isExperiencePaused: (e) => d.has(e)
|
|
8257
8299
|
};
|
|
8258
8300
|
}
|
|
8259
8301
|
//#endregion
|
|
8260
|
-
export {
|
|
8302
|
+
export { Bd as default };
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|