@bagelink/vue 1.15.468 → 1.15.474
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/dist/core.css +1 -1
- package/dist/form-flow/FormFlowPlayer.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.mjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/form-flow/FormFlowPlayer.vue +4 -2
package/package.json
CHANGED
|
@@ -222,8 +222,9 @@ async function onPrimary() {
|
|
|
222
222
|
if (!step?.skipSubmit) await props.onComplete?.(submittedData)
|
|
223
223
|
// Emit formComplete with standardised payload before completing.
|
|
224
224
|
if (currentKey.value) emit('formComplete', buildPayload(currentKey.value))
|
|
225
|
-
|
|
226
|
-
//
|
|
225
|
+
// Redirect before the generic completion event. Hosts commonly
|
|
226
|
+
// replace the player with success UI on `complete`; emitting it first
|
|
227
|
+
// can unmount this component before navigation executes.
|
|
227
228
|
const url = step?.redirectUrl?.trim()
|
|
228
229
|
if (url) {
|
|
229
230
|
emit('redirect', url)
|
|
@@ -231,6 +232,7 @@ async function onPrimary() {
|
|
|
231
232
|
window.location.assign(url)
|
|
232
233
|
}
|
|
233
234
|
}
|
|
235
|
+
emit('complete', { ...formData.value })
|
|
234
236
|
}
|
|
235
237
|
finally {
|
|
236
238
|
submitting.value = false
|