@o3r/configuration
Version:
This module contains configuration-related features such as CMS compatibility, Configuration override, store and debugging. It enables your application runtime configuration and comes with an integrated ng builder to help you generate configurations suppo
66 lines • 3.39 kB
TypeScript
import type { Configuration, CustomConfig, DevtoolsServiceInterface } from '@o3r/core';
import { ConfigurationContextualizationDevtools, ConfigurationDevtoolsServiceOptions } from './configuration-devtools.interface';
import { OtterConfigurationDevtools } from './configuration-devtools.service';
import * as i0 from "@angular/core";
export declare class ConfigurationDevtoolsConsoleService implements DevtoolsServiceInterface, ConfigurationContextualizationDevtools {
private readonly configurationDevtools;
private readonly options;
/** Name of the Window property to access to the devtools */
static readonly windowModuleName = "configuration";
constructor(configurationDevtools: OtterConfigurationDevtools, options: ConfigurationDevtoolsServiceOptions);
private downloadJSON;
private copyElementToClipboard;
/**
* Set a specified value of a component configuration
* @param selector Selector for a component configuration
* @param configProperty Name of the configuration property to set
* @param configValue Value of the configuration property to set
*/
setDynamicConfig(selector: string | {
library?: string;
componentName: string;
}, configProperty: string, configValue: any): void;
/** @inheritDoc */
activate(): void;
/**
* Display the list of configurations loaded in the store and the library they originate from
* @returns array with the configurations and libraries for example: ["LibComponentsCommonRuntimeConfig from @my-lib/shared-common"]
*/
displayComponentsWithConfiguration(): Promise<void>;
/**
* Display the configuration for a specific component
* @param selector Selector for a component configuration. It can be a string in the form library#configurationName (i.e: '@my-lib/shared-components#HeaderContConfig')
* or an object with the configuration and library names (i.e: {library:"@my-lib/shared-components", componentName:'HeaderContConfig'}).
* Note the object input componentName expects a configuration name not a component name.
* @returns Configuration object (i.e: {airlineLogoPath: "img/airlines/icon-BH.svg", displayLanguageSelector: false})
*/
displayCurrentConfigurationFor(selector: string | {
library?: string;
componentName: string;
}): Promise<void>;
/**
* Download the JSON file of the whole configuration
* @param fileName Name of the file to download
*/
saveConfiguration(fileName?: string): Promise<void>;
/**
* Display the whole configuration of the application
*/
displayConfiguration(): Promise<void>;
/**
* Display a bookmark to generate the current configuration
*/
displayConfigurationBookmark(): Promise<void>;
/**
* Copy the whole configuration to the clipboard
*/
copyConfigurationToClipboard(): Promise<void>;
/**
* Replace N configurations in one shot
* @param configurations array of configurations to update
*/
updateConfigurations(configurations: string | CustomConfig<Configuration>[]): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationDevtoolsConsoleService, [null, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationDevtoolsConsoleService>;
}
//# sourceMappingURL=configuration-devtools.console.service.d.ts.map