SiTourService documentation¶
import { SiTourService } from '@siemens/element-ng/tour'; Attributes and Methods¶
| Name | Type | Default | Description |
|---|---|---|---|
| addSteps() ¶ | Add steps to the tour | ||
| clearSteps() ¶ | () => void | Clear all steps | |
| complete() ¶ | () => void | Finish the tour | |
| (readonly)onTourCancel ¶ | Subject<void> | new Subject<void>() | Event triggered after the tour is cancelled, either through skip button or closing the tour dialog. |
| (readonly)onTourComplete ¶ | Subject<void> | new Subject<void>() | Event triggered after the tour is completed. |
| setOptions() ¶ | (options: TourOptions) => void | Sets options for the whole tour. Parameters | |
| start() ¶ | () => void | Start the tour |
Types Documentation¶
Options for tour Default options applied to all tour steps.import type { TourOptions } from '@siemens/element-ng/tour';
Options for each tour step. The element, the step should be attached to on the page. attachTo ? : A function that returns a promise. When the promise resolves, the next step will be shown. This can be used to 'clean up' action from beforeNextPromise ? : A function that returns a promise. When the promise resolves, the step will be shown. E.g. use this to open dialogs, etc. beforeShowPromise ? : Unique id for the step. Exposed in DOM as Alt text for a provided image. CSS class applied to the image. Sets the image object-fit CSS property. imgObjectFit ? : Optional image source to display. Whether Scroll the element into view. scrollTo ? : Custom handler to perform scrolling. scrollToHandler ? : Body text of the modal. text ? : Title to be displayed on the modal.import type { TourStep } from '@siemens/element-ng/tour';
{ element: string | HTMLElement | (() => string | HTMLElement); } ¶ beforeShowPromise.(() => Promise<any>) Inherited from TourStepCommonOptions ¶ (() => Promise<any>) Inherited from TourStepCommonOptions ¶ data-step-id"fill" | "contain" | "cover" | "none" | "scale-down" = 'scale-down' ¶ boolean | ScrollIntoViewOptions Inherited from TourStepCommonOptions ¶ ((element: HTMLElement) => void) Inherited from TourStepCommonOptions ¶ TranslatableString ¶
Common options for tour step and as default for tour step A function that returns a promise. When the promise resolves, the next step will be shown. This can be used to 'clean up' action from beforeNextPromise ? : A function that returns a promise. When the promise resolves, the step will be shown. E.g. use this to open dialogs, etc. beforeShowPromise ? : Whether Scroll the element into view. Custom handler to perform scrolling. scrollToHandler ? : import type { TourStepCommonOptions } from '@siemens/element-ng/tour';
beforeShowPromise.(() => Promise<any>) ¶ (() => Promise<any>) ¶ ((element: HTMLElement) => void) ¶
Represents a translatable string. This can either be a translation key, e.g. import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.
Except where otherwise noted, content on this site is licensed under MIT License.