2019-01-10 15:06:10 +01:00
|
|
|
import { InjectionToken } from '@angular/core';
|
2019-07-26 11:46:59 +02:00
|
|
|
|
2019-02-15 12:17:08 +01:00
|
|
|
import { TranslateService } from '@ngx-translate/core';
|
2019-07-26 11:46:59 +02:00
|
|
|
|
2019-02-15 12:17:08 +01:00
|
|
|
import { ViewModelStoreService } from 'app/core/core-services/view-model-store.service';
|
2019-07-26 11:46:59 +02:00
|
|
|
import { IdentifiableProjectorElement, ProjectorElement } from 'app/shared/models/core/projector';
|
2019-02-14 16:02:18 +01:00
|
|
|
|
|
|
|
type BooleanOrFunction = boolean | ((element: ProjectorElement) => boolean);
|
|
|
|
|
|
|
|
export interface Slide {
|
|
|
|
slide: string;
|
|
|
|
}
|
2019-01-10 15:06:10 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Slides can have these options.
|
|
|
|
*/
|
2019-02-14 16:02:18 +01:00
|
|
|
export interface SlideDynamicConfiguration {
|
2019-01-10 15:06:10 +01:00
|
|
|
/**
|
|
|
|
* Should this slide be scrollable?
|
|
|
|
*/
|
2019-02-14 16:02:18 +01:00
|
|
|
scrollable: BooleanOrFunction;
|
2019-01-10 15:06:10 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Should this slide be scaleable?
|
|
|
|
*/
|
2019-02-14 16:02:18 +01:00
|
|
|
scaleable: BooleanOrFunction;
|
2019-02-15 12:17:08 +01:00
|
|
|
|
|
|
|
getSlideTitle?: (
|
|
|
|
element: ProjectorElement,
|
|
|
|
translate: TranslateService,
|
|
|
|
viewModelStore: ViewModelStoreService
|
|
|
|
) => string;
|
2019-01-10 15:06:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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 {
|
2019-01-10 15:06:10 +01:00
|
|
|
path: string;
|
|
|
|
loadChildren: string;
|
2019-01-24 16:25:50 +01:00
|
|
|
verboseName: string;
|
|
|
|
elementIdentifiers: (keyof IdentifiableProjectorElement)[];
|
|
|
|
canBeMappedToModel: boolean;
|
2019-01-10 15:06:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export const SLIDE_MANIFESTS = new InjectionToken<SlideManifest[]>('SLIDE_MANIFEST');
|