1
- import { Config , IConfigGenerator } from 'igniteui-live-editing'
1
+ import { Config , IConfigGenerator } from 'igniteui-live-editing'
2
2
import { BaseAppConfig } from './BaseConfig' ;
3
3
export class QueryBuilderConfigGenerator implements IConfigGenerator {
4
4
public generateConfigs ( ) : Config [ ] {
5
5
const configs = new Array < Config > ( ) ;
6
6
7
+ const HTTPConfig = structuredClone ( BaseAppConfig ) ;
8
+ HTTPConfig . providers . push ( { 'provider' : 'provideHttpClient(),' , 'import' : '@angular/common/http' } ) ;
9
+
7
10
configs . push ( new Config ( {
8
11
component : 'QueryBuilderSample1Component' ,
9
12
appConfig : BaseAppConfig ,
@@ -23,12 +26,19 @@ export class QueryBuilderConfigGenerator implements IConfigGenerator {
23
26
shortenComponentPathBy : "/interactions/query-builder/"
24
27
} ) ) ;
25
28
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
+ } ) ) ;
32
42
33
43
return configs ;
34
44
}
0 commit comments