19 lines
694 B
TypeScript
19 lines
694 B
TypeScript
import { Injectable, inject } from '@angular/core';
|
|
import { DocumentSourceApi } from './document-source.api';
|
|
import { FileSourceApi } from './file-source.api';
|
|
import { PdfSourceApi } from './pdf-source.api';
|
|
import { SqlSourceApi } from './sql-source.api';
|
|
|
|
/**
|
|
* The source endpoints, handed to domain objects (`DataConnection.load`,
|
|
* `SourceTable.preview`) so each subclass calls the one it needs and the
|
|
* domain layer stays free of Angular DI.
|
|
*/
|
|
@Injectable({ providedIn: 'root' })
|
|
export class SourceGateway {
|
|
readonly file = inject(FileSourceApi);
|
|
readonly sql = inject(SqlSourceApi);
|
|
readonly pdf = inject(PdfSourceApi);
|
|
readonly document = inject(DocumentSourceApi);
|
|
}
|