@bagelink/vue 1.15.425 → 1.15.429
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 +5 -4
package/package.json
CHANGED
|
@@ -234,8 +234,9 @@ async function onPrimary() {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// ─── Auto-advance ────────────────────────────────────────────────────────────
|
|
237
|
-
// A qualifying step (single required choice — see stepAutoAdvances)
|
|
238
|
-
//
|
|
237
|
+
// A qualifying step (single required choice — see stepAutoAdvances) invokes its
|
|
238
|
+
// primary action once answered. That advances non-terminal steps and submits (or
|
|
239
|
+
// runs the host's redirect handling for) terminal steps.
|
|
239
240
|
// We watch that step's one field and, when it gains a value, fire the primary
|
|
240
241
|
// action after a short delay (lets the radio/select paint its selected state).
|
|
241
242
|
const autoAdvances = computed(() => props.autoAdvance && stepAutoAdvances(currentStep.value))
|
|
@@ -263,7 +264,7 @@ watch(currentKey, () => {
|
|
|
263
264
|
watch(
|
|
264
265
|
() => (autoField.value ? formData.value[autoField.value] : undefined),
|
|
265
266
|
(val) => {
|
|
266
|
-
if (!autoAdvances.value
|
|
267
|
+
if (!autoAdvances.value) return
|
|
267
268
|
if (autoAdvancedFrom.value === currentKey.value) return
|
|
268
269
|
const answered = val !== undefined && val !== null && val !== ''
|
|
269
270
|
// Only advance on a fresh pick — not when the pre-existing answer is
|
|
@@ -272,7 +273,7 @@ watch(
|
|
|
272
273
|
clearAutoTimer()
|
|
273
274
|
autoTimer = setTimeout(() => {
|
|
274
275
|
// Re-check on fire — the answer may have been cleared meanwhile.
|
|
275
|
-
if (!autoAdvances.value
|
|
276
|
+
if (!autoAdvances.value) return
|
|
276
277
|
autoAdvancedFrom.value = currentKey.value ?? null
|
|
277
278
|
onPrimary()
|
|
278
279
|
}, props.autoAdvanceDelay)
|