PoC: Make @alfresco/js-api to be compatible with angular's http client

This commit is contained in:
Andras Popovics
2022-02-25 15:33:31 +01:00
parent a0c7631abb
commit e432ba6d37
14 changed files with 574 additions and 12 deletions

View File

@@ -20,7 +20,7 @@ import { APP_INITIALIZER, NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ChartsModule } from 'ng2-charts';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
import { TranslateModule } from '@ngx-translate/core';
import {
@@ -28,8 +28,7 @@ import {
TRANSLATION_PROVIDER,
DebugAppConfigService,
CoreModule,
CoreAutomationService,
AuthBearerInterceptor
CoreAutomationService
} from '@alfresco/adf-core';
import { ExtensionsModule } from '@alfresco/adf-extensions';
import { AppComponent } from './app.component';
@@ -115,6 +114,7 @@ import localeSv from '@angular/common/locales/sv';
import { setupAppNotifications } from './services/app-notifications-factory';
import { AppNotificationsService } from './services/app-notifications.service';
import { SearchFilterChipsComponent } from './components/search/search-filter-chips.component';
import { AlfrescoApiModule } from '@alfresco/adf-core/alfresco-api';
registerLocaleData(localeFr);
registerLocaleData(localeDe);
@@ -153,6 +153,7 @@ registerLocaleData(localeSv);
ThemePickerModule,
ChartsModule,
AppCloudSharedModule,
AlfrescoApiModule,
MonacoEditorModule.forRoot()
],
declarations: [
@@ -209,10 +210,6 @@ registerLocaleData(localeSv);
SearchFilterChipsComponent
],
providers: [
{
provide: HTTP_INTERCEPTORS, useClass:
AuthBearerInterceptor, multi: true
},
{ provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production
{
provide: TRANSLATION_PROVIDER,