theme.config.json file
The theme.config.json file contains configuration of a theme part.
This file is optional and can be set in the root folder of theme part; for example, gbc-project-dir/theme/platform/mobile/theme.config.json.
The JSON object provided in this file has two main entries:
conditions
-
A JSON array containing the theme part's conditions.
widgetFactory
- A JSON object that defines overrides to apply in
cls.WidgetFactory
. It replaces registrations made withcls.WidgetFactory.registerBuilder
. Every subsequent widget instantiation uses the class defined by this override instead of the one defined in JavaScript code.
Example
// sample theme/platform/mobile/theme.config.json
{
"conditions": ["isMobile"],
"widgetFactory": {
"DateEdit": "cls.DateEditMobileWidget",
"DateTimeEdit": "cls.DateTimeEditMobileWidget",
"TimeEdit": "cls.TimeEditMobileWidget",
"SpinEdit": "cls.SpinEditMobileWidget"
}
}