()
| 181 | } |
| 182 | |
| 183 | function handleArrowRight() { |
| 184 | const isTransitioning = getState("__transitionCallback"); |
| 185 | if (isTransitioning) { |
| 186 | return; |
| 187 | } |
| 188 | |
| 189 | const activeIndex = getState("activeIndex"); |
| 190 | const activeStep = getState("__activeStep"); |
| 191 | const activeElement = getState("__activeElement"); |
| 192 | if (typeof activeIndex === "undefined" || typeof activeStep === "undefined") { |
| 193 | return; |
| 194 | } |
| 195 | |
| 196 | const steps = getConfig("steps") || []; |
| 197 | const isLastStep = activeIndex === steps.length - 1; |
| 198 | const onDoneClick = activeStep.popover?.onDoneClick || getConfig("onDoneClick"); |
| 199 | if (isLastStep && onDoneClick) { |
| 200 | return onDoneClick(activeElement, activeStep, { |
| 201 | config: getConfig(), |
| 202 | state: getState(), |
| 203 | driver: getCurrentDriver(), |
| 204 | }); |
| 205 | } |
| 206 | |
| 207 | const onNextClick = activeStep.popover?.onNextClick || getConfig("onNextClick"); |
| 208 | if (onNextClick) { |
| 209 | return onNextClick(activeElement, activeStep, { |
| 210 | config: getConfig(), |
| 211 | state: getState(), |
| 212 | driver: getCurrentDriver(), |
| 213 | }); |
| 214 | } |
| 215 | |
| 216 | moveNext(); |
| 217 | } |
| 218 | |
| 219 | function init() { |
| 220 | if (getState("isInitialized")) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…