|
|
@ -14,8 +14,6 @@ |
|
|
/// limitations under the License.
|
|
|
/// limitations under the License.
|
|
|
///
|
|
|
///
|
|
|
|
|
|
|
|
|
/* eslint-disable max-len */ |
|
|
|
|
|
|
|
|
|
|
|
import * as AngularAnimations from '@angular/animations'; |
|
|
import * as AngularAnimations from '@angular/animations'; |
|
|
import * as AngularCore from '@angular/core'; |
|
|
import * as AngularCore from '@angular/core'; |
|
|
import * as AngularCommon from '@angular/common'; |
|
|
import * as AngularCommon from '@angular/common'; |
|
|
@ -348,10 +346,7 @@ class ModulesMap implements IModulesMap { |
|
|
|
|
|
|
|
|
private modulesMap: {[key: string]: any} = { |
|
|
private modulesMap: {[key: string]: any} = { |
|
|
'@angular/animations': AngularAnimations, |
|
|
'@angular/animations': AngularAnimations, |
|
|
'@angular/core': {...AngularCore, ɵɵStandaloneFeature: () => {}, ɵɵInputTransformsFeature: () => {}, ɵɵpropertyInterpolate: (...args) => { |
|
|
'@angular/core': this.angularCoreModule20to18Patch(AngularCore), |
|
|
// @ts-ignore
|
|
|
|
|
|
return AngularCore.ɵɵproperty(...args); |
|
|
|
|
|
}}, |
|
|
|
|
|
'@angular/common': AngularCommon, |
|
|
'@angular/common': AngularCommon, |
|
|
'@angular/common/http': HttpClientModule, |
|
|
'@angular/common/http': HttpClientModule, |
|
|
'@angular/forms': AngularForms, |
|
|
'@angular/forms': AngularForms, |
|
|
@ -405,7 +400,7 @@ class ModulesMap implements IModulesMap { |
|
|
'@ngrx/store': NgrxStore, |
|
|
'@ngrx/store': NgrxStore, |
|
|
rxjs: RxJs, |
|
|
rxjs: RxJs, |
|
|
'rxjs/operators': RxJsOperators, |
|
|
'rxjs/operators': RxJsOperators, |
|
|
'@ngx-translate/core': TranslateCore, |
|
|
'@ngx-translate/core': this.translateModule20to18Patch(TranslateCore), |
|
|
'@mat-datetimepicker/core': MatDateTimePicker, |
|
|
'@mat-datetimepicker/core': MatDateTimePicker, |
|
|
moment: _moment, |
|
|
moment: _moment, |
|
|
tslib, |
|
|
tslib, |
|
|
@ -703,6 +698,28 @@ class ModulesMap implements IModulesMap { |
|
|
} |
|
|
} |
|
|
return of(null); |
|
|
return of(null); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private angularCoreModule20to18Patch(module: typeof AngularCore): typeof AngularCore { |
|
|
|
|
|
const result = {...module}; |
|
|
|
|
|
(result as any).ɵɵStandaloneFeature = () => {}; |
|
|
|
|
|
(result as any).ɵɵInputTransformsFeature = () => {}; |
|
|
|
|
|
(result as any).ɵɵpropertyInterpolate = (propName: string, v0: any, sanitizer?: any) => { |
|
|
|
|
|
return result.ɵɵproperty(propName, v0, sanitizer); |
|
|
|
|
|
}; |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private translateModule20to18Patch(module: typeof TranslateCore): typeof TranslateCore { |
|
|
|
|
|
const translateServiceCls = module.TranslateService; |
|
|
|
|
|
Object.defineProperty(translateServiceCls.prototype, 'translations', { |
|
|
|
|
|
get: function() { |
|
|
|
|
|
return this.store.translations; |
|
|
|
|
|
}, |
|
|
|
|
|
enumerable: true, |
|
|
|
|
|
configurable: true |
|
|
|
|
|
}); |
|
|
|
|
|
return module; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export const modulesMap = new ModulesMap(); |
|
|
export const modulesMap = new ModulesMap(); |
|
|
|