Skip to content

Instantly share code, notes, and snippets.

@mrmeku
Created October 29, 2019 04:08
Show Gist options
  • Save mrmeku/8a03eb2944dfe0c6e8af99fa2db163fd to your computer and use it in GitHub Desktop.
Save mrmeku/8a03eb2944dfe0c6e8af99fa2db163fd to your computer and use it in GitHub Desktop.
import { BehaviorSubject, Subject } from 'rxjs';
export interface Breadcrumb {
title: string;
}
export interface MenuOption {
name: string;
image: string;
invoke: () => void;
}
export interface NonContextualAction {
name: string;
description: string;
icon: string;
options: Array<MenuOption>;
}
export interface ContextualAction {
name: string;
invoke: Subject<void>;
disabled: Subject<boolean>;
}
export interface ContextualActions {
contextTitle: string;
actions: Array<ContextualAction>;
}
export interface ContextualTab {
name: string;
icon: string;
routerLink: any[] | string;
}
export interface ContextualTabs {
tabs: Array<ContextualTab>;
}
export declare class ContextualActionBarService {
readonly breadcrumbs$: BehaviorSubject<Breadcrumb[]>;
readonly nonContextualActions$: BehaviorSubject<NonContextualAction[]>;
readonly contextualActions$: Subject<ContextualActions | null>;
readonly contextualTabs$: BehaviorSubject<ContextualTabs | null>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment