cbcore-ts
Version:
CBCore is a library to build web applications using pure Typescript.
45 lines (44 loc) • 1.86 kB
TypeScript
import { UICore, UIObject, UIViewBroadcastEvent } from "../../uicore-ts";
import { CBLocalizedTextObject, CBUserProfile } from "./CBDataInterfaces";
import { CBServerClient } from "./CBServerClient";
import { CBSocketClient } from "./CBSocketClient";
declare interface CBDialogViewShower {
alert(text: string, dismissCallback?: Function): void;
localizedAlert(textObject: CBLocalizedTextObject, dismissCallback?: Function): void;
showActionIndicatorDialog(message: string, dismissCallback?: Function): void;
hideActionIndicatorDialog(): void;
}
export declare class CBCore extends UIObject {
private static _sharedInstance;
viewCores: UICore[];
_isUserLoggedIn: boolean;
_cachedMinimizedChatInquiryIDs: string[];
_socketClient: CBSocketClient;
_serverClient: CBServerClient;
_functionsToCallForEachSocketClient: (() => void)[];
_models: any[];
dialogViewShowerClass: CBDialogViewShower;
constructor();
static initIfNeededWithViewCore(viewCore: UICore): void;
static get sharedInstance(): CBCore;
static broadcastEventName: {
readonly userDidLogIn: "UserDidLogIn";
readonly userDidLogOut: "UserDidLogOut";
};
broadcastMessageInRootViewTree(message: UIViewBroadcastEvent): void;
get socketClient(): CBSocketClient;
get serverClient(): CBServerClient;
set isUserLoggedIn(isUserLoggedIn: boolean);
didSetIsUserLoggedIn(previousValue: boolean): void;
private updateLinkTargets;
get isUserLoggedIn(): boolean;
get userProfile(): CBUserProfile;
set userProfile(userProfile: CBUserProfile);
didSetUserProfile(): void;
set languageKey(languageKey: string);
get languageKey(): string;
didSetLanguageKey(): void;
reloadSocketConnection(): void;
callFunctionForEachSocketClient(functionToCall: () => void): void;
}
export {};