OpenSlides/client/src/app/slides/slide-manifest.ts

38 lines
951 B
TypeScript
Raw Normal View History

import { InjectionToken } from '@angular/core';
2019-02-14 16:02:18 +01:00
import { IdentifiableProjectorElement, ProjectorElement } from 'app/shared/models/core/projector';
type BooleanOrFunction = boolean | ((element: ProjectorElement) => boolean);
export interface Slide {
slide: string;
}
/**
* Slides can have these options.
*/
2019-02-14 16:02:18 +01:00
export interface SlideDynamicConfiguration {
/**
* Should this slide be scrollable?
*/
2019-02-14 16:02:18 +01:00
scrollable: BooleanOrFunction;
/**
* Should this slide be scaleable?
*/
2019-02-14 16:02:18 +01:00
scaleable: BooleanOrFunction;
}
/**
* Is similar to router entries, so we can trick the router. Keep slideName and
* path in sync.
*/
2019-02-14 16:02:18 +01:00
export interface SlideManifest extends Slide {
path: string;
loadChildren: string;
verboseName: string;
elementIdentifiers: (keyof IdentifiableProjectorElement)[];
canBeMappedToModel: boolean;
}
export const SLIDE_MANIFESTS = new InjectionToken<SlideManifest[]>('SLIDE_MANIFEST');