type Component = { component: string; scripts?: string[]; styles?: string[]; [key: string]: any; }; type ComponentMap = { [key: string]: Component; }; declare class ComponentsRegistry { customComponentLazyMap: ComponentMap; componentMap: ComponentMap; overrideMap: ComponentMap; lazyMap: ComponentMap; constructor(); /** * Registers the component with core so that renderer can * get the right component while rendering. * * @param componentName Name of the component eq., Currency * @param component component object example * { * component: "Currency", * scripts: ["components/Currency/index.js"] * } * @example PCore.getComponentsRegistry().register(componentName, component) * PCore.getComponentsRegistry().register("Currency", { * component: "Currency", * scripts: ["components/Currency/index.js"] * }); * * @memberof ComponentsRegistry */ register(componentName: string, component: Component): void; /** * Registers the component with core so that renderer can * get the right component while rendering. * * @param componentName Name of the component eq., Currency * @param component component object example * { * component: "Currency", * scripts: ["components/Currency/index.js"] * } * @example PCore.getComponentsRegistry().register(componentName, component) * PCore.getComponentsRegistry().register("Currency", { * component: "Currency", * scripts: ["components/Currency/index.js"] * }); * * @memberof ComponentsRegistry */ registerLazyMap(componentName: string, component: Component): void; /** * Registers the component with core so that renderer can * get the right component while rendering. * * @param componentName Name of the component eq., Currency * @param component component object example * { * component: "Currency", * scripts: ["components/Currency/index.js"] * } * @example PCore.getComponentsRegistry().register(componentName, component) * PCore.getComponentsRegistry().register("Currency", { * component: "Currency", * scripts: ["components/Currency/index.js"] * }); * * @memberof ComponentsRegistry */ registerCustomComponentLazyMap(componentName: string, component: Component): void; /** * Gets the component object registered with core. * * @param componentName Name of the component eq., Currency * @example PCore.getComponentsRegistry().getComponent(componentName) * const component = PCore.getComponentsRegistry().getComponent("Currency"); * @returns component object example * { * component: "Currency", * scripts: ["components/Currency/index.js"] * } * @memberof ComponentsRegistry */ getComponent(componentName: string): Component | undefined; /** * Gets the component object registered with core. * * @param componentName Name of the component eq., Currency * @example PCore.getComponentsRegistry().getComponent(componentName) * const component = PCore.getComponentsRegistry().getComponent("Currency"); * @returns component object example * { * component: "Currency", * scripts: ["components/Currency/index.js"] * } * @memberof ComponentsRegistry */ getLazyComponent(componentName: string): Component | undefined; /** * Gets the component object registered with core. * * @param componentName Name of the component eq., Currency * @example PCore.getComponentsRegistry().getComponent(componentName) * const component = PCore.getComponentsRegistry().getComponent("Currency"); * @returns component object example * { * component: "Currency", * scripts: ["components/Currency/index.js"] * } * @memberof ComponentsRegistry */ getCustomComponent(componentName: string): Component | undefined; /** * Merges the componentMap to registry. * * @example PCore.getComponentsRegistry().mergeComponentsMap(componentsMap) * const component = PCore.getComponentsRegistry().mergeComponentsMap(reactComponentsMap); * @param componentsMap object which holds component definitions eq., * const reactComponentsMap = { * Renderer: { * renderer: "PegaReactRenderer", * scripts: ["renderer/react_renderer.js"] * }, * Currency: { * component: "Currency", * scripts: ["components/Currency/index.js"] * } * } * @memberof ComponentsRegistry */ mergeComponentsMap(componentsMap?: ComponentMap): void; /** * Merges override map * @param overrideMap object that holds override map. * @memberof ComponentsRegistry */ mergeOverrideMap(overrideMap?: ComponentMap): void; /** * returns override map * @memberof ComponentsRegistry */ getOverrideMap(): ComponentMap; /** * returns Lazy map * @memberof ComponentsRegistry */ getLazyMap(): ComponentMap; } declare const _default: ComponentsRegistry; export default _default;