@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
52 lines • 2.31 kB
TypeScript
import { Injector } from '@angular/core';
import { OptionsService } from '../common/options.service';
import { AppStateService } from '../common/ui-state.service';
import { DocLink } from './docs.models';
import { ExtensionPointWithoutStateForPlugins } from '../common/extension-hooks';
import { Observable } from 'rxjs';
import { Router } from '@angular/router';
import { PluginsResolveService } from '../plugins/plugins-resolve.service';
import * as i0 from "@angular/core";
export declare class DocsService extends ExtensionPointWithoutStateForPlugins<DocLink> {
private options;
private app;
private router;
/**
* Default documentation URL.
*/
readonly DEFAULT_DOCS_BASE_URL = "https://cumulocity.com";
constructor(options: OptionsService, app: AppStateService, rootInjector: Injector, router: Router, plugins: PluginsResolveService);
getBaseUrl(uiVersion?: string | {
ngx: string;
}): string;
/**
* Takes a URL and replaces all `{{ version }}` placeholders with the relevant docs version
* (the version is derived from the app state or from the provided parameter).
* @param url Any URL that contains `{{ version }}` placeholders.
* @param uiVersion A version string or object, defaults to the app state version.
* @returns The URL with replaced `{{ version }}` placeholders.
*/
getUrlWithDocsVersion(url: string, uiVersion?: string | {
ngx: string;
}): string;
get templateStr(): string;
getUserGuideLink(link: any): any;
list(): Promise<DocLink[]>;
get(): DocLink[];
getItemsFromHookDocs(): DocLink[];
protected setupItemsObservable(): Observable<DocLink[]>;
private getLink;
private prefixWithSlash;
/**
* Returns the most relevant version of documentation for the given version of UI.
* For maintenance versions, it's the first version in the line, e.g. 1017.0.123 -> 10.17.0.
* For develop versions, it's the next minor one, e.g. 1017.123.0-SNAPSHOT -> 10.18.0.
*
* @param uiVersion The version of UI.
* @private
*/
private getDocsVersionForUiVersion;
static ɵfac: i0.ɵɵFactoryDeclaration<DocsService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DocsService>;
}
//# sourceMappingURL=docs.service.d.ts.map