()
| 34 | } |
| 35 | |
| 36 | function onClick() { |
| 37 | if (highlight) { |
| 38 | const driverObj = driver({ |
| 39 | ...config, |
| 40 | }); |
| 41 | |
| 42 | window.driverObj = driverObj; |
| 43 | driverObj.highlight(highlight); |
| 44 | } else if (tour) { |
| 45 | if (id === "confirm-destroy") { |
| 46 | config!.onDestroyStarted = () => { |
| 47 | if (!driverObj.hasNextStep() || confirm("Are you sure?")) { |
| 48 | driverObj.destroy(); |
| 49 | } |
| 50 | }; |
| 51 | } |
| 52 | |
| 53 | if (id === "logger-events") { |
| 54 | config!.onNextClick = () => { |
| 55 | console.log("next clicked"); |
| 56 | }; |
| 57 | |
| 58 | config!.onNextClick = () => { |
| 59 | console.log("Next Button Clicked"); |
| 60 | // Implement your own functionality here |
| 61 | driverObj.moveNext(); |
| 62 | }; |
| 63 | config!.onPrevClick = () => { |
| 64 | console.log("Previous Button Clicked"); |
| 65 | // Implement your own functionality here |
| 66 | driverObj.movePrevious(); |
| 67 | }; |
| 68 | config!.onCloseClick = () => { |
| 69 | console.log("Close Button Clicked"); |
| 70 | // Implement your own functionality here |
| 71 | driverObj.destroy(); |
| 72 | }; |
| 73 | } |
| 74 | |
| 75 | if (tour?.[2]?.popover?.title === "Next Step is Async") { |
| 76 | tour[2].popover.onNextClick = () => { |
| 77 | mountDummyElement(); |
| 78 | driverObj.moveNext(); |
| 79 | }; |
| 80 | |
| 81 | if (tour?.[3]?.element === ".dynamic-el") { |
| 82 | tour[3].onDeselected = () => { |
| 83 | removeDummyElement(); |
| 84 | }; |
| 85 | |
| 86 | // @ts-ignore |
| 87 | tour[4].popover.onPrevClick = () => { |
| 88 | mountDummyElement(); |
| 89 | driverObj.movePrevious(); |
| 90 | }; |
| 91 | |
| 92 | // @ts-ignore |
| 93 | tour[3].popover.onPrevClick = () => { |
nothing calls this directly
no test coverage detected
searching dependent graphs…