1- import { Config , IConfigGenerator } from 'igniteui-live-editing'
1+ import { Config , IConfigGenerator } from 'igniteui-live-editing'
22import { BaseAppConfig } from './BaseConfig' ;
33export class QueryBuilderConfigGenerator implements IConfigGenerator {
44 public generateConfigs ( ) : Config [ ] {
55 const configs = new Array < Config > ( ) ;
66
7+ const HTTPConfig = structuredClone ( BaseAppConfig ) ;
8+ HTTPConfig . providers . push ( { 'provider' : 'provideHttpClient(),' , 'import' : '@angular/common/http' } ) ;
9+
710 configs . push ( new Config ( {
811 component : 'QueryBuilderSample1Component' ,
912 appConfig : BaseAppConfig ,
@@ -23,12 +26,19 @@ export class QueryBuilderConfigGenerator implements IConfigGenerator {
2326 shortenComponentPathBy : "/interactions/query-builder/"
2427 } ) ) ;
2528
26- // configs.push(new Config({
27- // component: 'QueryBuilderSqlSampleComponent',
28- // additionalDependencies: ["sql-formatter"],
29- // appConfig: BaseAppConfig,
30- // shortenComponentPathBy: "/interactions/query-builder/"
31- // })); // sql-formatter is not available in the live editing environment and cannot be enabled per config atm
29+ configs . push ( new Config ( {
30+ component : 'QueryBuilderRequestSampleComponent' ,
31+ additionalFiles : [ "/src/app/interactions/query-builder/query-builder-style/layout.scss" ] ,
32+ appConfig : HTTPConfig ,
33+ shortenComponentPathBy : "/interactions/query-builder/"
34+ } ) ) ;
35+
36+ configs . push ( new Config ( {
37+ component : 'QueryBuilderSqlSampleComponent' ,
38+ additionalDependencies : [ "sql-formatter" ] ,
39+ appConfig : HTTPConfig ,
40+ shortenComponentPathBy : "/interactions/query-builder/"
41+ } ) ) ;
3242
3343 return configs ;
3444 }
0 commit comments