AdminUiExtension
AdminUiExtension
Defines extensions to the Admin UI application by specifying additional Angular NgModules which are compiled into the application.
See Extending the Admin UI for detailed instructions.
Signature
interface AdminUiExtension extends Partial<TranslationExtension>,
Partial<StaticAssetExtension>,
Partial<GlobalStylesExtension> {
id?: string;
extensionPath: string;
ngModules: Array<AdminUiExtensionSharedModule | AdminUiExtensionLazyModule>;
}
Extends
- Partial<TranslationExtension>
- Partial<StaticAssetExtension>
- Partial<GlobalStylesExtension>
Members
id
string
extensionPath
string
ngModules
Array<AdminUiExtensionSharedModule | AdminUiExtensionLazyModule>
TranslationExtension
Defines extensions to the Admin UI translations. Can be used as a stand-alone extension definition which only adds translations without adding new UI functionality, or as part of a full AdminUiExtension.
Signature
interface TranslationExtension {
translations: { [languageCode in LanguageCode]?: string };
}
Members
translations
{ [languageCode in LanguageCode]?: string }
Optional object defining any translation files for the Admin UI. The value should be an object with the key as a 2-character ISO 639-1 language code, and the value being a glob for any relevant translation files in JSON format.
Example
translations: {
en: path.join(__dirname, 'translations/*.en.json'),
de: path.join(__dirname, 'translations/*.de.json'),
}
StaticAssetExtension
Defines extensions which copy static assets to the custom Admin UI application source asset directory.
Signature
interface StaticAssetExtension {
staticAssets: StaticAssetDefinition[];
}
Members
staticAssets
StaticAssetDefinition[]
/static
directory.
GlobalStylesExtension
Defines extensions which add global styles to the custom Admin UI application.
Signature
interface GlobalStylesExtension {
globalStyles: string[] | string;
}
Members
globalStyles
string[] | string
SassVariableOverridesExtension
Defines an extension which allows overriding Clarity Design System’s Sass variables used in styles on the Admin UI.
Signature
interface SassVariableOverridesExtension {
sassVariableOverrides: string;
}
Members
sassVariableOverrides
string
StaticAssetDefinition
A static asset can be provided as a path to the asset, or as an object containing a path and a new name, which will cause the compiler to copy and then rename the asset.
Signature
type StaticAssetDefinition = string | { path: string; rename: string }
AdminUiExtensionSharedModule
Configuration defining a single NgModule with which to extend the Admin UI.
Signature
interface AdminUiExtensionSharedModule {
type: 'shared';
ngModuleFileName: string;
ngModuleName: string;
}
Members
type
'shared'
ngModuleFileName
string
ngModuleName
string
AdminUiExtensionLazyModule
Configuration defining a single NgModule with which to extend the Admin UI.
Signature
interface AdminUiExtensionLazyModule {
type: 'lazy';
route: string;
ngModuleFileName: string;
ngModuleName: string;
}
Members
type
'lazy'
/extensions/
route and should be used for
modules which define new views for the Admin UI.
route
string
'foo'
will cause the module to lazy-load when the /extensions/foo
route
is activated.
ngModuleFileName
string
ngModuleName
string