| 38 | * The options for the step |
| 39 | */ |
| 40 | export interface StepOptions { |
| 41 | /** |
| 42 | * The element the step should be attached to on the page. |
| 43 | * An object with properties `element` and `on`. |
| 44 | * |
| 45 | * ```js |
| 46 | * const step = new Step(tour, { |
| 47 | * attachTo: { element: '.some .selector-path', on: 'left' }, |
| 48 | * ...moreOptions |
| 49 | * }); |
| 50 | * ``` |
| 51 | * |
| 52 | * If you don’t specify an attachTo the element will appear in the middle of the screen. |
| 53 | * If you omit the `on` portion of `attachTo`, the element will still be highlighted, but the tooltip will appear |
| 54 | * in the middle of the screen, without an arrow pointing to the target. |
| 55 | */ |
| 56 | attachTo?: StepOptionsAttachTo; |
| 57 | |
| 58 | /** |
| 59 | * An action on the page which should advance shepherd to the next step. |
| 60 | * It should be an object with a string `selector` and an `event` name |
| 61 | * ```js |
| 62 | * const step = new Step(tour, { |
| 63 | * advanceOn: { selector: '.some .selector-path', event: 'click' }, |
| 64 | * ...moreOptions |
| 65 | * }); |
| 66 | * ``` |
| 67 | * `event` doesn’t have to be an event inside the tour, it can be any event fired on any element on the page. |
| 68 | * You can also always manually advance the Tour by calling `myTour.next()`. |
| 69 | */ |
| 70 | advanceOn?: StepOptionsAdvanceOn; |
| 71 | |
| 72 | /** |
| 73 | * Whether to display the arrow for the tooltip or not, or options for the arrow. |
| 74 | */ |
| 75 | arrow?: boolean | StepOptionsArrow; |
| 76 | |
| 77 | /** |
| 78 | * A function that returns a promise. |
| 79 | * When the promise resolves, the rest of the `show` code for the step will execute. |
| 80 | */ |
| 81 | beforeShowPromise?: () => Promise<unknown>; |
| 82 | |
| 83 | /** |
| 84 | * An array of buttons to add to the step. These will be rendered in a |
| 85 | * footer below the main body text. |
| 86 | */ |
| 87 | buttons?: ReadonlyArray<StepOptionsButton>; |
| 88 | |
| 89 | /** |
| 90 | * Should a cancel “✕” be shown in the header of the step? |
| 91 | */ |
| 92 | cancelIcon?: StepOptionsCancelIcon; |
| 93 | |
| 94 | /** |
| 95 | * A boolean, that when set to false, will set `pointer-events: none` on the target. |
| 96 | */ |
| 97 | canClickTarget?: boolean; |
nothing calls this directly
no outgoing calls
no test coverage detected