UNPKG

@omnia/fx-models

Version:
60 lines (59 loc) 1.6 kB
import { BladeSizes } from "."; export interface Blade { id: string; content: () => JSX.Element; size?: BladeSizes; disabled?: boolean; isSubJourney?: boolean; } export interface JourneyInstance { /** * @param blade the blade to add or update to the existing journey */ addOrUpdateBlade(blade: Blade): any; /** * @param bladeId the blade id to remove from the existing journey */ removeBlade(bladeId: string): any; /** * @param bladeId the id of the blade to check if it exists in the journey */ hasBlade(bladeId: string): boolean; /** * @param bladeIds the id of the blades to travel to */ travelTo(bladeIds: Array<string>): any; /** * @param bladeId the id of the next blade to travel to */ travelToNext(bladeId: string): any; /** * @param bladeId the id of the blade to travel back to */ travelBackTo(bladeId: string): any; /** * travels back to last blade */ travelBack(): any; /** * travels back to first blade */ travelBackToFirstBlade(): any; /** * @param bladeId the id of a visible blade to scroll to */ scrollToVisibleBlade(bladeId: string): any; /** * @param visibleBlades the currently visible blades */ visibleBlades: Array<Blade>; /** * Trigger to close journey - only works if onInstanceClosed is defined in the parent component */ closeJourney: () => void; /** * Return blade width in px * @param size blade size */ getBladeWidth(size: BladeSizes): string; }