@appcues/web-sdk 7.24.4 → 7.25.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/CHANGELOG.md +18 -0
- package/build/bind-interface.d.ts.map +1 -1
- package/build/{bootstrap.npm.CiSiv5u_.js → bootstrap.npm.DDGKlJWw.js} +902 -823
- package/build/index.npm.js +1 -1
- package/build/main.d.ts.map +1 -1
- package/build/{open-builder.D24FICI0.js → open-builder.CVa1Uu2s.js} +33 -33
- package/build/sagas/experiences-sagas.d.ts.map +1 -1
- package/build/snippets/context.d.ts +13 -0
- package/build/snippets/context.d.ts.map +1 -0
- package/build/snippets/error.d.ts +11 -0
- package/build/snippets/error.d.ts.map +1 -0
- package/build/snippets/load-snippets.d.ts +21 -0
- package/build/snippets/load-snippets.d.ts.map +1 -0
- package/build/snippets/register.d.ts +16 -0
- package/build/snippets/register.d.ts.map +1 -0
- package/package.json +1 -1
- /package/build/{checklist.83dbbf9fa2a479d079b6d58adf2b2172e8685dd4.css → checklist.7382849d2ae897a1629360cfe8e459f8f639cf7b.css} +0 -0
- /package/build/{container.83dbbf9fa2a479d079b6d58adf2b2172e8685dd4.css → container.7382849d2ae897a1629360cfe8e459f8f639cf7b.css} +0 -0
- /package/build/{debugger.83dbbf9fa2a479d079b6d58adf2b2172e8685dd4.css → debugger.7382849d2ae897a1629360cfe8e459f8f639cf7b.css} +0 -0
- /package/build/{modal-step-legacy-render.83dbbf9fa2a479d079b6d58adf2b2172e8685dd4.css → modal-step-legacy-render.7382849d2ae897a1629360cfe8e459f8f639cf7b.css} +0 -0
- /package/build/{modal.83dbbf9fa2a479d079b6d58adf2b2172e8685dd4.css → modal.7382849d2ae897a1629360cfe8e459f8f639cf7b.css} +0 -0
- /package/build/{satisfaction-survey.83dbbf9fa2a479d079b6d58adf2b2172e8685dd4.css → satisfaction-survey.7382849d2ae897a1629360cfe8e459f8f639cf7b.css} +0 -0
- /package/build/{test-mode.83dbbf9fa2a479d079b6d58adf2b2172e8685dd4.css → test-mode.7382849d2ae897a1629360cfe8e459f8f639cf7b.css} +0 -0
- /package/build/{tooltip.83dbbf9fa2a479d079b6d58adf2b2172e8685dd4.css → tooltip.7382849d2ae897a1629360cfe8e459f8f639cf7b.css} +0 -0
package/build/index.npm.js
CHANGED
package/build/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/scripts/main.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/scripts/main.js"],"names":[],"mappings":";AA6JA,uCAA8C"}
|
|
@@ -8102,55 +8102,55 @@ var rd = "appcues-cutout-backdrop", id = "appcues-custom-backdrop", ad = "apc-sp
|
|
|
8102
8102
|
};
|
|
8103
8103
|
};
|
|
8104
8104
|
Q("@appcues/dialog", ({ addHook: e }, t) => {
|
|
8105
|
-
let { backdrop: n, variables: r, customBackdrop: i,
|
|
8105
|
+
let { backdrop: n, variables: r, customBackdrop: i, inlineBackdrop: a = !1, target: o, autoFocus: s = !0 } = t, { dialogZIndex: c, backdropZIndex: l, backdropBlur: u, backdropColor: d } = r || {}, f = {
|
|
8106
8106
|
backdrop: null,
|
|
8107
8107
|
dialog: null
|
|
8108
|
-
},
|
|
8109
|
-
|
|
8108
|
+
}, p, m, h, g, _, v, y = (e, t, n) => {
|
|
8109
|
+
f[e]?.remove();
|
|
8110
8110
|
let r = n.document.createElement("style");
|
|
8111
|
-
r.textContent = t,
|
|
8112
|
-
},
|
|
8113
|
-
|
|
8111
|
+
r.textContent = t, p.prepend(r), f[e] = r;
|
|
8112
|
+
}, b = () => {
|
|
8113
|
+
g && _ && (g.removeEventListener("scroll", _, !0), g.removeEventListener("resize", _));
|
|
8114
8114
|
};
|
|
8115
|
-
if (n === !0 && !i && !
|
|
8115
|
+
if (n === !0 && !i && !o) {
|
|
8116
8116
|
let t = ({ getTraitConfig: e, updateRootStyle: t }) => {
|
|
8117
8117
|
let { variables: n } = e();
|
|
8118
8118
|
t(cd(n || {}), { forceUpdate: !0 });
|
|
8119
8119
|
};
|
|
8120
8120
|
e("step.begin", t), e("step.container_change", t);
|
|
8121
8121
|
}
|
|
8122
|
-
e("step.postrender", ({ step: e, getWindowReference: t, getTraitConfig:
|
|
8123
|
-
let
|
|
8124
|
-
[
|
|
8125
|
-
let
|
|
8126
|
-
if (
|
|
8127
|
-
|
|
8122
|
+
e("step.postrender", ({ step: e, getWindowReference: t, getTraitConfig: x }) => {
|
|
8123
|
+
let S = x(), C = S.backdrop ?? n, w = S.customBackdrop ?? i, T = S.target ?? o, E = S.autoFocus ?? s, D = S.inlineBackdrop ?? a, O = S.variables ?? r ?? {}, k = O.dialogZIndex ?? c, A = O.backdropZIndex ?? l, j = O.backdropBlur ?? u, M = O.backdropColor ?? d;
|
|
8124
|
+
[p] = e.querySelector("dialog") ?? [];
|
|
8125
|
+
let N = t();
|
|
8126
|
+
if (p) {
|
|
8127
|
+
C === !0 && w ? (m?.remove(), m = ld({
|
|
8128
8128
|
getWindowReference: t,
|
|
8129
|
-
backdropZIndex:
|
|
8130
|
-
backdropBlur:
|
|
8131
|
-
backdropColor:
|
|
8132
|
-
}),
|
|
8133
|
-
let e =
|
|
8134
|
-
if (e === "show" && !
|
|
8129
|
+
backdropZIndex: A,
|
|
8130
|
+
backdropBlur: j,
|
|
8131
|
+
backdropColor: M
|
|
8132
|
+
}), m && (D && p.parentNode ? p.parentNode.insertBefore(m, p) : N.document.body.append(m))) : (m?.remove(), m = void 0), C === !0 && !w && !T ? y("backdrop", sd, N) : (f.backdrop?.remove(), f.backdrop = null), y("dialog", od, N), p.style.zIndex = k, p.removeAttribute("autofocus");
|
|
8133
|
+
let e = C === !0 && !w && !T ? "showModal" : "show";
|
|
8134
|
+
if (e === "show" && !T) return;
|
|
8135
8135
|
let n = e === "show" ? {
|
|
8136
|
-
x:
|
|
8137
|
-
y:
|
|
8138
|
-
} : null, r =
|
|
8139
|
-
|
|
8136
|
+
x: N.scrollX,
|
|
8137
|
+
y: N.scrollY
|
|
8138
|
+
} : null, r = p.open;
|
|
8139
|
+
p[e](), n && (N.scrollX !== n.x || N.scrollY !== n.y) && N.scrollTo(n.x, n.y), e === "show" && E && !r && p.focus({ preventScroll: !0 });
|
|
8140
8140
|
}
|
|
8141
|
-
|
|
8141
|
+
b(), v?.(), h?.remove(), h = void 0, T && Ed(C) && (g = t(), h = Dd({
|
|
8142
8142
|
getWindowReference: t,
|
|
8143
|
-
target:
|
|
8144
|
-
backdropType:
|
|
8145
|
-
zIndex: (
|
|
8146
|
-
}),
|
|
8147
|
-
container:
|
|
8143
|
+
target: T,
|
|
8144
|
+
backdropType: C,
|
|
8145
|
+
zIndex: (k ?? 2) - 1
|
|
8146
|
+
}), h && (g.document.body.append(h), _ = () => Od({
|
|
8147
|
+
container: h,
|
|
8148
8148
|
getWindowReference: t,
|
|
8149
|
-
target:
|
|
8150
|
-
backdropType:
|
|
8151
|
-
}),
|
|
8149
|
+
target: T,
|
|
8150
|
+
backdropType: C
|
|
8151
|
+
}), g.addEventListener("scroll", _, !0), g.addEventListener("resize", _), C === "hard" && (v = Md(g, { targetSelector: T }))));
|
|
8152
8152
|
}), e("step.end", () => {
|
|
8153
|
-
|
|
8153
|
+
p?.close(), f.backdrop?.remove(), f.dialog?.remove(), m?.remove(), h?.remove(), b(), v?.();
|
|
8154
8154
|
});
|
|
8155
8155
|
}), Q("@appcues/experienceTheme", ({ addHook: e }) => {
|
|
8156
8156
|
let t = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experiences-sagas.d.ts","sourceRoot":"","sources":["../../src/scripts/sagas/experiences-sagas.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"experiences-sagas.d.ts","sourceRoot":"","sources":["../../src/scripts/sagas/experiences-sagas.js"],"names":[],"mappings":"AAyDA,iMA4BC;AA6HD,qJAWC;AAwFD,oGAoCC;AA5ID,mDAGG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets up `Appcues.__createSnippetContext` on the public API object.
|
|
3
|
+
*
|
|
4
|
+
* Bridges open-builder's internal hook/action context to the simplified
|
|
5
|
+
* SnippetContext API that snippet authors interact with. Closes over the
|
|
6
|
+
* Redux store so that `context.user` and `context.group` always reflect
|
|
7
|
+
* the latest WebSocket-delivered snippet context at execution time.
|
|
8
|
+
*
|
|
9
|
+
* @param {object} appcues - The Appcues public API object (window.Appcues).
|
|
10
|
+
* @param {Function} getState - The Redux store's getState function.
|
|
11
|
+
*/
|
|
12
|
+
export function setupSnippetContext(appcues: object, getState: Function): void;
|
|
13
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/scripts/snippets/context.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,6CAHW,MAAM,4BAuEhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets up `Appcues.__reportSnippetError` on the public API object.
|
|
3
|
+
*
|
|
4
|
+
* Called from generated snippet trait code (and from context.reportError) when
|
|
5
|
+
* a hook or action throws. Reports to open-builder's error system and emits an
|
|
6
|
+
* appcues:v2:step_error event for analytics tracking.
|
|
7
|
+
*
|
|
8
|
+
* @param {object} appcues - The Appcues public API object (window.Appcues).
|
|
9
|
+
*/
|
|
10
|
+
export function setupSnippetErrorReporting(appcues: object): void;
|
|
11
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/scripts/snippets/error.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oDAFW,MAAM,QAyBhB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads the account's compiled snippet bundle with SRI verification.
|
|
3
|
+
*
|
|
4
|
+
* Creates a <script integrity="sha384-..." crossorigin="anonymous"> element.
|
|
5
|
+
* The browser natively refuses to execute the script if its content does not
|
|
6
|
+
* match the integrity hash — protecting against CDN/cache tampering.
|
|
7
|
+
*
|
|
8
|
+
* This is a no-op if no published bundle exists (i.e.
|
|
9
|
+
* `snippetsConfig.integrity` is absent). Experience rendering is not blocked
|
|
10
|
+
* by snippet load failures.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} accountId - The Appcues account ID.
|
|
13
|
+
* @param {object} snippetsConfig - The `snippets` field from account settings.
|
|
14
|
+
* @param {number} snippetsConfig.version
|
|
15
|
+
* @param {string} snippetsConfig.integrity - SRI hash (e.g. "sha384-...")
|
|
16
|
+
*/
|
|
17
|
+
export function loadSnippets(accountId: string, snippetsConfig: {
|
|
18
|
+
version: number;
|
|
19
|
+
integrity: string;
|
|
20
|
+
}): void;
|
|
21
|
+
//# sourceMappingURL=load-snippets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-snippets.d.ts","sourceRoot":"","sources":["../../src/scripts/snippets/load-snippets.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wCALW,MAAM,kBAEd;IAAgC,OAAO,EAA/B,MAAM;IACkB,SAAS,EAAjC,MAAM;CAChB,QA8BA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attaches `registerTrait` and `registerAction` to the Appcues public API
|
|
3
|
+
* object. Should be called from bindInterface before snippets load.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} appcues - The Appcues public API object (window.Appcues).
|
|
6
|
+
*/
|
|
7
|
+
export function setupRegistrationBridge(appcues: object): void;
|
|
8
|
+
/**
|
|
9
|
+
* Forwards all pending trait and action registrations to a newly-created
|
|
10
|
+
* open-builder core() instance. Should be called immediately after
|
|
11
|
+
* createAppcues() returns in the experiences saga.
|
|
12
|
+
*
|
|
13
|
+
* @param {object} coreInstance - The open-builder core() instance.
|
|
14
|
+
*/
|
|
15
|
+
export function flushRegistrations(coreInstance: object): void;
|
|
16
|
+
//# sourceMappingURL=register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/scripts/snippets/register.js"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,iDAFW,MAAM,QAUhB;AAED;;;;;;GAMG;AACH,iDAFW,MAAM,QAShB"}
|
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
|