mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[AAE-7241] fix eslint warnings for Extensions project (#7491)
* fix eslint warnings for Extensions project * fix production mode compilation
This commit is contained in:
@@ -25,32 +25,31 @@ import * as core from '../evaluators/core.evaluators';
|
||||
import { ComponentRegisterService } from './component-register.service';
|
||||
import { RuleService } from './rule.service';
|
||||
import { ExtensionElement } from '../config/extension-element';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
export function extensionJsonsFactory() {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
export const EXTENSION_JSONS = new InjectionToken<string[][]>('extension-jsons', {
|
||||
providedIn: 'root',
|
||||
factory: extensionJsonsFactory
|
||||
});
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
export function provideExtensionConfig(jsons: string[]) {
|
||||
return {
|
||||
provide: EXTENSION_JSONS,
|
||||
useValue: jsons,
|
||||
multi: true
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ExtensionService {
|
||||
|
||||
protected config: ExtensionConfig = null;
|
||||
|
||||
configPath = 'assets/app.extensions.json';
|
||||
pluginsPath = 'assets/plugins';
|
||||
|
||||
@@ -59,8 +58,10 @@ export class ExtensionService {
|
||||
features: Array<any> = [];
|
||||
authGuards: { [key: string]: Type<any> } = {};
|
||||
|
||||
setup$: Observable<ExtensionConfig>;
|
||||
|
||||
protected config: ExtensionConfig = null;
|
||||
protected onSetup$ = new BehaviorSubject<ExtensionConfig>(this.config);
|
||||
setup$ = this.onSetup$.asObservable();
|
||||
|
||||
constructor(
|
||||
protected loader: ExtensionLoaderService,
|
||||
@@ -68,6 +69,7 @@ export class ExtensionService {
|
||||
protected ruleService: RuleService,
|
||||
@Inject(EXTENSION_JSONS) protected extensionJsons: string[]
|
||||
) {
|
||||
this.setup$ = this.onSetup$.asObservable();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user