import { ApplicationRef, ChangeDetectorRef, InjectionToken, Injector, Type } from "@angular/core"; import { C8oRouter } from "./convertigo.router"; import { LoadingController } from "@ionic/angular"; import { C8o } from "c8osdkangular"; import * as i0 from "@angular/core"; export declare class C8oPageBase { injector: Injector; routerProvider: C8oRouter; loadingCtrl: LoadingController; ref: ChangeDetectorRef; form: {}; local: any; window: Window; router: C8oRouter; global: any; c8o: C8o; appRef: ApplicationRef; didleave: boolean; shown: boolean; private count; loader: any; private imgCache; private prefixId; closing: boolean; private _semaphore; instanceID: string; /** * C8oPageBase: Page Base for C8oPage and app component * * @param {Injector} injector * @param {C8oRouter} routerProvider * @param {LoadingController} loadingCtrl * @param {ChangeDetectorRef} ref */ constructor(injector: Injector, routerProvider: C8oRouter, loadingCtrl: LoadingController, ref: ChangeDetectorRef); ngOnDestroy(): void; /** * Retrieves an instance from the injector based on the provided token. * If not found: * - Throws an error if no `notFoundValue` that is not equal to * Injector.THROW_IF_NOT_FOUND is given * - Returns the `notFoundValue` otherwise * * @param token: Type|InjectionToken, A token with the needed type * @param notFoundValue: T * * @returns An instance of the given token, or an error if not found */ getInstance(token: Type | InjectionToken, notFoundValue?: T): T; /** Gets the data from previous called requestable list. can be used in an Angular 5 directive such as * * *ngFor="let category of listen(['fs://.view']).rows" or * *ngFor="let Page2 of listen(['fs://.view', 'fs://.view#search']).rows" * * @param {string[]} requestables: an array of requestables (string) * @returns {any}: the data for the first requestable to match is returned */ listen(requestables: string[]): any; /** Delete the data from previous called requestable list. can be used in an Angular 5 directive such as * * *ngFor="let category of listen(['fs://.view']).rows" or * *ngFor="let Page2 of listen(['fs://.view', 'fs://.view#search']).rows" * * @param {string[]} requestables: an array of requestables (string) * @returns {boolean}: true if succeed */ deleteListen(requestables: string[]): any; /** * Gets the data from previous called requestable list. can be used in an Angular 2 directive such as * * *ngFor="let category of listen(['fs://.view']).rows" or * *ngFor="let Page2 of listen(['fs://.view', 'fs://.view#search']).rows" * * The data for the first requestable to match is returned * * @return the data for one of the requestables in the list. */ listenNavParams(requestable: string): any; /** * Calls a Convertigo requestable with parameters as Object * * @param requestable: the requestable to call (examples : "Myproject.MySequence" or "fs://MyLocalDataBase.get") * @param data: the data to send to the requestable (for example {"var1" : "value1, ..., "var2" : "value2}) (default value is null) * @param navParams: the navParams to give (default value is null) * @param {number} timeout: The timeout before trigger loading controller (default value is 3000) * @returns {Promise} */ call(requestable: string, data?: any, navParams?: any, timeout?: number, noLaoding?: boolean): Promise; /** * Calls a Convertigo requestable with parameters as Object from a given form * * @param {string} requestable: the requestable to call (examples : "Myproject.MySequence" or "fs://MyLocalDataBase.get") * @param {string} id: the id of the form * @returns {Promise} */ callForm(requestable: string, id: string): Promise; /** * Mark, the current view in to check state, then detect changes and tick the application ref * */ tick(): void; /** * Get attachment data url a requestable response to be displayed * * @param {string} id: the DocumentID to get the attachment from * @param {string} attachmentName: name of the attachment to display (eg: image.jpg) * @param {string} placeholderURL: the url to display while we get the attachment (This is an Async process) * @param {string} databaseName: the Qname of a FS database (ex project.fsdatabase) to get the attachment from. * @returns {Object} */ getAttachmentUrl(id: string, attachmentName: string, placeholderURL: string, databaseName?: string): Object; /** * Reset Image Cache. * * @param {string} cacheEntry: Name of the Entry to clear. If not provided, clears all the entries */ resetImageCache(cacheEntry?: string): void; /** * Handles automatically Errors coming from called promises * * @param {Promise} p The promise returned by a CAF function eg : (click)="resolveError(actionBeans.CallSequenceAction(this,{cacheTtl: 3000, ...},{})) * @returns {Promise} */ resolveError(p: Promise): Promise; /** * Get page definition from it's title * * @param {string} pageTitle * @returns {string} */ getPageByTitle(pageTitle: string): string; /** * Get page definition from it's name * * @param {string} pageName * @returns {string} */ getPageByName(pageName: string): string; /** * Helps to safe eval the value of an path into an object or an array * This is a shortcut to acess to static function of C8oCafUtils * * @param object: the object to eval * @param path: the path to search * @returns {any}: the value fetched or undefined */ resolveArray(object: any, path?: string): any; /** * Concat two words * @param {string} word * @returns {any} */ wordPlusOne(word: string): any; /** * Merge two objects * @param {Object} firstObj * @param secondObj * @returns {Object} */ merge(firstObj: Object, secondObj: any): Object; /** * Creates a new Date Object, useful when called from a template as new operator is not allowed * * @param year * @param month * @param day * @param hours * @param minutes * @param seconds * @param milliseconds * @returns {Date} * @constructor */ Date(year: any, month: any, day: any, hours: any, minutes: any, seconds: any, milliseconds: any): Date; /** * This functions is helpfull to know if a string version is greater than another * @param v1 string version * @param v2 string version * @param separator separator between subversions default value is "." * * @returns true if v1 < v2 otherwise returns false */ compare(v1: string, v2: string, separator?: string): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }