import * as MJ from './interface.js'; import { Observable } from 'rxjs'; import { ClassFactory } from './ClassFactory.js'; import { ObjectCache } from './ObjectCache.js'; import { BaseSingleton } from './BaseSingleton.js'; /** * Global class used for coordinating events, creating class instances, and managing components across MemberJunction */ export declare class MJGlobal extends BaseSingleton { private _eventsSubject; private _eventsReplaySubject; private _events$; private _eventsReplay$; private _components; private _classFactory; private _properties; private _processUUID; /** * Returns the global instance of the MJGlobal class. This is a singleton class, so there is only one instance of it in the application. Do not directly create new instances of MJGlobal, always use this method to get the instance. */ static get Instance(): MJGlobal; /** * A unique identifier for this process instance, generated once on first access * using a v4 UUID. Used to distinguish this server from others in distributed * cache invalidation scenarios (e.g., Redis pub/sub). The value persists for * the lifetime of the process and is stable across multiple accesses. * * @example * ```typescript * const serverId = MJGlobal.Instance.ProcessUUID; * // e.g., "a1b2c3d4-e5f6-7890-abcd-ef1234567890" * ``` */ get ProcessUUID(): string; RegisterComponent(component: MJ.IMJComponent): void; /** * Resets the class to its initial state. Use very carefully and sparingly. */ Reset(): void; /** * Use this method to raise an event to all component who are listening for the event. * @param event */ RaiseEvent(event: MJ.MJEvent): void; /** * Use this method to get an observable that will fire when an event is raised. * @param withReplay * @returns */ GetEventListener(withReplay?: boolean): Observable; /** * Returns the instance of ClassFactory you should use in your application. Access this via the MJGlobal.Instance.ClassFactory property. */ get ClassFactory(): ClassFactory; /** * Global property bag */ get Properties(): MJ.MJGlobalProperty[]; private _objectCache; /** * ObjectCache can be used to cache objects as needed by any application in memory. These objects are NOT persisted to disk or any other storage medium, so they are only good for the lifetime of the application */ get ObjectCache(): ObjectCache; } /** * This utility function sends a message to all components that are listening requesting a window resize. This is a cross-platform method of requesting a resize and is loosely coupled from * the actual implementation on a specific device/browser/etc. * @param delay * @param component */ export declare function InvokeManualResize(delay?: number, component?: MJ.IMJComponent | null): void; //# sourceMappingURL=Global.d.ts.map