()
| 151 | } |
| 152 | |
| 153 | function handleArrowLeft() { |
| 154 | const isTransitioning = getState("__transitionCallback"); |
| 155 | if (isTransitioning) { |
| 156 | return; |
| 157 | } |
| 158 | |
| 159 | const activeIndex = getState("activeIndex"); |
| 160 | const activeStep = getState("__activeStep"); |
| 161 | const activeElement = getState("__activeElement"); |
| 162 | if (typeof activeIndex === "undefined" || typeof activeStep === "undefined") { |
| 163 | return; |
| 164 | } |
| 165 | |
| 166 | const steps = getConfig("steps") || []; |
| 167 | if (!steps[activeIndex - 1]) { |
| 168 | return; |
| 169 | } |
| 170 | |
| 171 | const onPrevClick = activeStep.popover?.onPrevClick || getConfig("onPrevClick"); |
| 172 | if (onPrevClick) { |
| 173 | return onPrevClick(activeElement, activeStep, { |
| 174 | config: getConfig(), |
| 175 | state: getState(), |
| 176 | driver: getCurrentDriver(), |
| 177 | }); |
| 178 | } |
| 179 | |
| 180 | movePrevious(); |
| 181 | } |
| 182 | |
| 183 | function handleArrowRight() { |
| 184 | const isTransitioning = getState("__transitionCallback"); |
nothing calls this directly
no test coverage detected
searching dependent graphs…