From e5aac96896233efd3e1487374caaa6cafe1e4f3a Mon Sep 17 00:00:00 2001 From: markuczy <129275100+markuczy@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:08:18 +0100 Subject: [PATCH] feat: angular integration interface init (#178) * feat: configuration service moved * feat: theme service moved * feat: message service moved * feat: removed PIA references from keycloak-auth * fix: keycloak imports * fix: IAuthService moved --- libs/angular-accelerator/src/index.ts | 2 -- .../src/lib/mock-auth/mock-auth.module.ts | 2 +- .../src/lib/mock-auth/mock-auth.service.ts | 2 +- .../src/index.ts | 14 +++++++++++++ .../src/lib/api/iauth.service.ts | 0 .../src/lib/api/injection-tokens.ts | 2 +- .../src/lib/model/config-key.model.ts | 0 .../src/lib/services/configuration.service.ts | 4 ++-- .../services/portal-message.service.spec.ts | 2 +- .../lib/services/portal-message.service.ts | 2 +- .../src/lib/services/theme.service.ts | 10 ++++----- libs/keycloak-auth/package.json | 1 - .../src/lib/keycloak-auth.module.ts | 6 +++--- .../src/lib/keycloak-auth.service.ts | 3 +-- .../src/lib/token.interceptor.ts | 2 +- .../mocks/portal-message-service-mock.ts | 4 ++-- libs/portal-integration-angular/src/index.ts | 7 ------- .../announcement-banner.component.spec.ts | 7 +++---- .../announcement-banner.component.ts | 3 +-- .../help-item-editor.component.spec.ts | 17 +++++++++------ .../help-item-editor.component.ts | 2 +- .../inline-profile.component.ts | 7 +++---- .../portal-footer.component.spec.ts | 3 +-- .../portal-footer/portal-footer.component.ts | 7 ++----- .../portal-header/header.component.spec.ts | 12 +++++------ .../portal-header/header.component.ts | 20 +++++++++++------- .../portal-menu-horizontal.component.spec.ts | 4 ++-- .../portal-menu/portal-menu.component.spec.ts | 4 ++-- .../portal-viewport.component.spec.ts | 21 +++++++++---------- .../portal-viewport.component.ts | 17 +++++++-------- .../search-criteria.component.spec.ts | 7 +++---- .../search-criteria.component.stories.ts | 5 ++--- .../initializer/standalone.initializer.ts | 16 +++++++------- .../src/lib/core/portal-core.module.ts | 19 ++++++++++------- .../add-initialize-module-guard.utils.spec.ts | 4 +--- .../utils/portal-api-configuration.utils.ts | 3 +-- .../src/lib/mock-auth/mock-auth.module.ts | 2 +- .../src/lib/mock-auth/mock-auth.service.ts | 2 +- .../src/lib/model/portal-wrapper.ts | 2 +- .../src/lib/model/theme.ts | 12 ----------- .../src/lib/services/app.menu.service.ts | 6 ++---- .../initialize-module-guard.service.ts | 3 +-- 42 files changed, 127 insertions(+), 141 deletions(-) rename libs/{angular-accelerator => angular-integration-interface}/src/lib/api/iauth.service.ts (100%) rename libs/{angular-accelerator => angular-integration-interface}/src/lib/api/injection-tokens.ts (97%) rename libs/{portal-integration-angular => angular-integration-interface}/src/lib/model/config-key.model.ts (100%) rename libs/{portal-integration-angular => angular-integration-interface}/src/lib/services/configuration.service.ts (97%) rename libs/{portal-integration-angular => angular-integration-interface}/src/lib/services/portal-message.service.spec.ts (100%) rename libs/{portal-integration-angular => angular-integration-interface}/src/lib/services/portal-message.service.ts (100%) rename libs/{portal-integration-angular => angular-integration-interface}/src/lib/services/theme.service.ts (85%) delete mode 100644 libs/portal-integration-angular/src/lib/model/theme.ts diff --git a/libs/angular-accelerator/src/index.ts b/libs/angular-accelerator/src/index.ts index f4ab743c..15966e1f 100644 --- a/libs/angular-accelerator/src/index.ts +++ b/libs/angular-accelerator/src/index.ts @@ -38,8 +38,6 @@ export * from './lib/model/diagram-type' export * from './lib/model/search-config-info' // core -export * from './lib/api/iauth.service' -export * from './lib/api/injection-tokens' export * from './lib/angular-accelerator.module' export * from './lib/angular-accelerator-primeng.module' diff --git a/libs/angular-accelerator/src/lib/mock-auth/mock-auth.module.ts b/libs/angular-accelerator/src/lib/mock-auth/mock-auth.module.ts index 4dbfafc0..78a473ec 100644 --- a/libs/angular-accelerator/src/lib/mock-auth/mock-auth.module.ts +++ b/libs/angular-accelerator/src/lib/mock-auth/mock-auth.module.ts @@ -1,6 +1,6 @@ import { CommonModule } from '@angular/common' import { APP_INITIALIZER, NgModule } from '@angular/core' -import { AUTH_SERVICE } from '../api/injection-tokens' +import { AUTH_SERVICE } from '@onecx/angular-integration-interface' import { MockAuthService } from './mock-auth.service' function initializer(authService: MockAuthService): () => Promise { diff --git a/libs/angular-accelerator/src/lib/mock-auth/mock-auth.service.ts b/libs/angular-accelerator/src/lib/mock-auth/mock-auth.service.ts index 4454b40f..e87814f3 100644 --- a/libs/angular-accelerator/src/lib/mock-auth/mock-auth.service.ts +++ b/libs/angular-accelerator/src/lib/mock-auth/mock-auth.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core' import { BehaviorSubject } from 'rxjs' import { UserProfile } from '@onecx/integration-interface' -import { IAuthService } from '../api/iauth.service' +import { IAuthService } from '@onecx/angular-integration-interface' @Injectable() export class MockAuthService implements IAuthService { diff --git a/libs/angular-integration-interface/src/index.ts b/libs/angular-integration-interface/src/index.ts index 2db372f6..a1c7915b 100644 --- a/libs/angular-integration-interface/src/index.ts +++ b/libs/angular-integration-interface/src/index.ts @@ -1,3 +1,17 @@ // services export * from './lib/services/app-state.service' +export * from './lib/services/configuration.service' export * from './lib/services/user.service' +export * from './lib/services/portal-message.service' +export * from './lib/services/theme.service' + +// models +export * from './lib/model/config-key.model' + +// core +export * from './lib/api/iauth.service' +export * from './lib/api/injection-tokens' + +// utils + +export { MfeInfo, Theme } from '@onecx/integration-interface' diff --git a/libs/angular-accelerator/src/lib/api/iauth.service.ts b/libs/angular-integration-interface/src/lib/api/iauth.service.ts similarity index 100% rename from libs/angular-accelerator/src/lib/api/iauth.service.ts rename to libs/angular-integration-interface/src/lib/api/iauth.service.ts diff --git a/libs/angular-accelerator/src/lib/api/injection-tokens.ts b/libs/angular-integration-interface/src/lib/api/injection-tokens.ts similarity index 97% rename from libs/angular-accelerator/src/lib/api/injection-tokens.ts rename to libs/angular-integration-interface/src/lib/api/injection-tokens.ts index cc285230..17a2a49f 100644 --- a/libs/angular-accelerator/src/lib/api/injection-tokens.ts +++ b/libs/angular-integration-interface/src/lib/api/injection-tokens.ts @@ -19,4 +19,4 @@ export const AUTH_SERVICE = new InjectionToken('AUTH_SERVICE') export const SANITY_CHECK = new InjectionToken('OCXSANITY_CHECK') -export const APPLICATION_NAME = new InjectionToken('APPLICATION_NAME') \ No newline at end of file +export const APPLICATION_NAME = new InjectionToken('APPLICATION_NAME') diff --git a/libs/portal-integration-angular/src/lib/model/config-key.model.ts b/libs/angular-integration-interface/src/lib/model/config-key.model.ts similarity index 100% rename from libs/portal-integration-angular/src/lib/model/config-key.model.ts rename to libs/angular-integration-interface/src/lib/model/config-key.model.ts diff --git a/libs/portal-integration-angular/src/lib/services/configuration.service.ts b/libs/angular-integration-interface/src/lib/services/configuration.service.ts similarity index 97% rename from libs/portal-integration-angular/src/lib/services/configuration.service.ts rename to libs/angular-integration-interface/src/lib/services/configuration.service.ts index 3d7b775a..49a024a3 100644 --- a/libs/portal-integration-angular/src/lib/services/configuration.service.ts +++ b/libs/angular-integration-interface/src/lib/services/configuration.service.ts @@ -1,8 +1,8 @@ import { HttpClient } from '@angular/common/http' import { Inject, Injectable, OnDestroy, Optional } from '@angular/core' -import { Config, ConfigurationTopic } from '@onecx/integration-interface' import { firstValueFrom } from 'rxjs' -import { APP_CONFIG } from '@onecx/angular-accelerator' +import { Config, ConfigurationTopic } from '@onecx/integration-interface' +import { APP_CONFIG } from '../api/injection-tokens' import { CONFIG_KEY } from '../model/config-key.model' @Injectable({ providedIn: 'root' }) diff --git a/libs/portal-integration-angular/src/lib/services/portal-message.service.spec.ts b/libs/angular-integration-interface/src/lib/services/portal-message.service.spec.ts similarity index 100% rename from libs/portal-integration-angular/src/lib/services/portal-message.service.spec.ts rename to libs/angular-integration-interface/src/lib/services/portal-message.service.spec.ts index 7aaaced4..724f612a 100644 --- a/libs/portal-integration-angular/src/lib/services/portal-message.service.spec.ts +++ b/libs/angular-integration-interface/src/lib/services/portal-message.service.spec.ts @@ -1,7 +1,7 @@ import { TestBed, fakeAsync } from '@angular/core/testing' -import { PortalMessageService } from './portal-message.service' import { TranslateTestingModule } from 'ngx-translate-testing' import { Message } from '@onecx/integration-interface' +import { PortalMessageService } from './portal-message.service' describe('PortalMessageService', () => { const origAddEventListener = window.addEventListener diff --git a/libs/portal-integration-angular/src/lib/services/portal-message.service.ts b/libs/angular-integration-interface/src/lib/services/portal-message.service.ts similarity index 100% rename from libs/portal-integration-angular/src/lib/services/portal-message.service.ts rename to libs/angular-integration-interface/src/lib/services/portal-message.service.ts index ac3bf25d..b4e60a9a 100644 --- a/libs/portal-integration-angular/src/lib/services/portal-message.service.ts +++ b/libs/angular-integration-interface/src/lib/services/portal-message.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core' import { TranslateService } from '@ngx-translate/core' -import { MessageTopic } from '@onecx/integration-interface' import { combineLatest, of } from 'rxjs' +import { MessageTopic } from '@onecx/integration-interface' export type Message = { summaryKey?: string diff --git a/libs/portal-integration-angular/src/lib/services/theme.service.ts b/libs/angular-integration-interface/src/lib/services/theme.service.ts similarity index 85% rename from libs/portal-integration-angular/src/lib/services/theme.service.ts rename to libs/angular-integration-interface/src/lib/services/theme.service.ts index 78d85dcc..b11d2582 100644 --- a/libs/portal-integration-angular/src/lib/services/theme.service.ts +++ b/libs/angular-integration-interface/src/lib/services/theme.service.ts @@ -1,10 +1,9 @@ import { HttpClient } from '@angular/common/http' import { Injectable, OnDestroy } from '@angular/core' -import { CurrentThemeTopic } from '@onecx/integration-interface' import { from, map, mergeMap } from 'rxjs' -import { CONFIG_KEY } from '../model/config-key.model' -import { Theme } from '../model/theme' +import { CurrentThemeTopic, Theme } from '@onecx/integration-interface' import { ConfigurationService } from './configuration.service' +import { CONFIG_KEY } from '../model/config-key.model' const defaultThemeServerUrl = 'http://portal-theme-management:8080' @@ -13,12 +12,11 @@ export class ThemeService implements OnDestroy { baseUrlV1 = './portal-api' currentTheme$ = new CurrentThemeTopic() - constructor(private configService: ConfigurationService, private http: HttpClient) { - } + constructor(private configService: ConfigurationService, private http: HttpClient) {} getThemeHref(themeId: string): string { const themeServerUrl = - this.configService.getProperty(CONFIG_KEY.TKIT_PORTAL_THEME_SERVER_URL) || defaultThemeServerUrl + this.configService.getProperty(CONFIG_KEY.TKIT_PORTAL_THEME_SERVER_URL) || defaultThemeServerUrl return `${themeServerUrl}/themes/${themeId}/${themeId}.min.css` } diff --git a/libs/keycloak-auth/package.json b/libs/keycloak-auth/package.json index dc60297a..555f64ea 100644 --- a/libs/keycloak-auth/package.json +++ b/libs/keycloak-auth/package.json @@ -4,7 +4,6 @@ "peerDependencies": { "@angular/common": ">=15.2.7", "@angular/core": ">=15.2.7", - "@onecx/portal-integration-angular": "~4", "@onecx/angular-integration-interface": "~4", "keycloak-angular": "^13.0.0", "keycloak-js": "^18.0.0", diff --git a/libs/keycloak-auth/src/lib/keycloak-auth.module.ts b/libs/keycloak-auth/src/lib/keycloak-auth.module.ts index 8f45a333..11843574 100644 --- a/libs/keycloak-auth/src/lib/keycloak-auth.module.ts +++ b/libs/keycloak-auth/src/lib/keycloak-auth.module.ts @@ -1,9 +1,9 @@ import { NgModule, ModuleWithProviders } from '@angular/core' import { CommonModule } from '@angular/common' -import { AUTH_SERVICE } from '@onecx/portal-integration-angular' +import { HTTP_INTERCEPTORS } from '@angular/common/http' +import { AUTH_SERVICE } from '@onecx/angular-integration-interface' import { KeycloakAuthService } from './keycloak-auth.service' import { KeycloakAngularModule } from 'keycloak-angular' -import { HTTP_INTERCEPTORS } from '@angular/common/http' import { TokenInterceptor } from './token.interceptor' import { KEYCLOAK_AUTH_CONFIG } from './keycloak-injection-token' @@ -11,7 +11,7 @@ export interface KeycloakAuthModuleConfig { tokenInterceptorWhitelist?: string[] } /** - * Authentication module for keycloak. Requires @onecx/portal-integration-angular and keycloak-js to work. + * Authentication module for keycloak. Requires @onecx/angular-integration-interfacer and keycloak-js to work. */ @NgModule({ imports: [CommonModule, KeycloakAngularModule], diff --git a/libs/keycloak-auth/src/lib/keycloak-auth.service.ts b/libs/keycloak-auth/src/lib/keycloak-auth.service.ts index 7733a45b..7b887cfa 100644 --- a/libs/keycloak-auth/src/lib/keycloak-auth.service.ts +++ b/libs/keycloak-auth/src/lib/keycloak-auth.service.ts @@ -1,6 +1,5 @@ import { Injectable } from '@angular/core' -import { ConfigurationService, CONFIG_KEY, IAuthService } from '@onecx/portal-integration-angular' -import { AppStateService } from '@onecx/angular-integration-interface' +import { AppStateService, ConfigurationService, CONFIG_KEY, IAuthService } from '@onecx/angular-integration-interface' import { KeycloakEventType, KeycloakOptions, KeycloakService } from 'keycloak-angular' import { KeycloakConfig } from 'keycloak-js' diff --git a/libs/keycloak-auth/src/lib/token.interceptor.ts b/libs/keycloak-auth/src/lib/token.interceptor.ts index 205461c0..0033e80e 100644 --- a/libs/keycloak-auth/src/lib/token.interceptor.ts +++ b/libs/keycloak-auth/src/lib/token.interceptor.ts @@ -1,7 +1,7 @@ import { Inject, Injectable, Optional } from '@angular/core' import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http' +import { AUTH_SERVICE, IAuthService } from '@onecx/angular-integration-interface' import { Observable } from 'rxjs' -import { AUTH_SERVICE, IAuthService } from '@onecx/portal-integration-angular' import { KeycloakAuthModuleConfig } from './keycloak-auth.module' import { KEYCLOAK_AUTH_CONFIG } from './keycloak-injection-token' diff --git a/libs/portal-integration-angular/mocks/portal-message-service-mock.ts b/libs/portal-integration-angular/mocks/portal-message-service-mock.ts index 1630c1f3..3b0ad82c 100644 --- a/libs/portal-integration-angular/mocks/portal-message-service-mock.ts +++ b/libs/portal-integration-angular/mocks/portal-message-service-mock.ts @@ -2,9 +2,9 @@ import { Injectable, Optional } from '@angular/core' import { TranslateService } from '@ngx-translate/core' import { combineLatest, of } from 'rxjs' // eslint-disable-next-line -import { Message, PortalMessageService } from '@onecx/portal-integration-angular' -import { FakeTopic } from './fake-topic' +import { Message, PortalMessageService } from '@onecx/angular-integration-interface' import { Message as TopicMessage } from '@onecx/integration-interface' +import { FakeTopic } from './fake-topic' export function providePortalMessageServiceMock() { return [ diff --git a/libs/portal-integration-angular/src/index.ts b/libs/portal-integration-angular/src/index.ts index 19c60fdf..7de698e7 100644 --- a/libs/portal-integration-angular/src/index.ts +++ b/libs/portal-integration-angular/src/index.ts @@ -45,11 +45,8 @@ export * from './lib/core/components/lifecycle/lifecycle.component' // services export * from './lib/services/app.menu.service' -export * from './lib/services/configuration.service' export * from './lib/services/menu-api.service' export * from './lib/services/portal-api.service' -export * from './lib/services/portal-message.service' -export * from './lib/services/theme.service' export * from './lib/services/initialize-module-guard.service' export * from './lib/services/userprofile-api.service' export * from './lib/services/portal-dialog.service' @@ -62,7 +59,6 @@ export * from './lib/mock-auth/mock-auth.module' export * from './lib/model/avatar-info.model' export * from './lib/model/microfrontend' export * from './lib/model/portal-wrapper' -export * from './lib/model/theme' export * from './lib/model/column' export * from './lib/model/column-view-template' export * from './lib/model/menu-item.model' @@ -72,7 +68,6 @@ export * from './lib/model/page-info.model' export * from './lib/model/portal' export * from './lib/model/user-profile.model' export * from './lib/model/button-dialog' -export * from './lib/model/config-key.model' // core export * from './lib/api/constants' @@ -87,7 +82,5 @@ export * from './lib/core/utils/add-initialize-module-guard.utils' export * from './lib/core/utils/translate-service-initializer.utils' export * from './lib/core/utils/portal-api-configuration.utils' -export { MfeInfo } from '@onecx/integration-interface' - export * from '@onecx/angular-accelerator' export * from '@onecx/angular-integration-interface' diff --git a/libs/portal-integration-angular/src/lib/core/components/announcement-banner/announcement-banner.component.spec.ts b/libs/portal-integration-angular/src/lib/core/components/announcement-banner/announcement-banner.component.spec.ts index ad433d5d..c9f2d390 100644 --- a/libs/portal-integration-angular/src/lib/core/components/announcement-banner/announcement-banner.component.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/components/announcement-banner/announcement-banner.component.spec.ts @@ -1,12 +1,11 @@ /* tslint:disable:no-unused-variable */ import { ComponentFixture, TestBed, getTestBed } from '@angular/core/testing' +import { HttpClientTestingModule } from '@angular/common/http/testing' +import { Subject } from 'rxjs' +import { AppStateService, ConfigurationService } from '@onecx/angular-integration-interface' import { AnnouncementBannerComponent } from './announcement-banner.component' -import { ConfigurationService } from '../../../services/configuration.service' -import { AppStateService } from '@onecx/angular-integration-interface' -import { HttpClientTestingModule } from '@angular/common/http/testing' import { AnnouncementsApiService } from '../../../services/announcements-api.service' -import { Subject } from 'rxjs' import { AnnouncementItem, AnnouncementPriorityType } from '../../../model/announcement-item' describe('AnnouncementBannerComponent', () => { diff --git a/libs/portal-integration-angular/src/lib/core/components/announcement-banner/announcement-banner.component.ts b/libs/portal-integration-angular/src/lib/core/components/announcement-banner/announcement-banner.component.ts index 1edb27d3..8c4c3336 100644 --- a/libs/portal-integration-angular/src/lib/core/components/announcement-banner/announcement-banner.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/announcement-banner/announcement-banner.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core' import { catchError, map, Observable, of, switchMap, tap, throwError, EMPTY, mergeMap } from 'rxjs' +import { AppStateService, ConfigurationService } from '@onecx/angular-integration-interface' import { AnnouncementItem, AnnouncementPriorityType } from '../../../model/announcement-item' import { AnnouncementsApiService } from '../../../services/announcements-api.service' -import { AppStateService } from '@onecx/angular-integration-interface' -import { ConfigurationService } from '../../../services/configuration.service' @Component({ selector: 'ocx-announcement-banner', diff --git a/libs/portal-integration-angular/src/lib/core/components/help-item-editor/help-item-editor.component.spec.ts b/libs/portal-integration-angular/src/lib/core/components/help-item-editor/help-item-editor.component.spec.ts index 35ac24ac..524f287a 100644 --- a/libs/portal-integration-angular/src/lib/core/components/help-item-editor/help-item-editor.component.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/components/help-item-editor/help-item-editor.component.spec.ts @@ -1,12 +1,11 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' - -import { HelpItemEditorComponent } from './help-item-editor.component' -import { ConfigurationService } from '../../../services/configuration.service' -import { DialogModule } from 'primeng/dialog' import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { NoopAnimationsModule } from '@angular/platform-browser/animations' import { TranslateTestingModule } from 'ngx-translate-testing' -import { PortalMessageService } from '../../../services/portal-message.service' +import { DialogModule } from 'primeng/dialog' + +import { ConfigurationService, PortalMessageService } from '@onecx/angular-integration-interface' +import { HelpItemEditorComponent } from './help-item-editor.component' describe('HelpItemEditorComponent', () => { let component: HelpItemEditorComponent @@ -16,7 +15,13 @@ describe('HelpItemEditorComponent', () => { await TestBed.configureTestingModule({ declarations: [HelpItemEditorComponent], providers: [ConfigurationService, PortalMessageService], - imports: [DialogModule, FormsModule, ReactiveFormsModule, NoopAnimationsModule, TranslateTestingModule.withTranslations({}),], + imports: [ + DialogModule, + FormsModule, + ReactiveFormsModule, + NoopAnimationsModule, + TranslateTestingModule.withTranslations({}), + ], }).compileComponents() fixture = TestBed.createComponent(HelpItemEditorComponent) diff --git a/libs/portal-integration-angular/src/lib/core/components/help-item-editor/help-item-editor.component.ts b/libs/portal-integration-angular/src/lib/core/components/help-item-editor/help-item-editor.component.ts index 6371fca0..e90a9b51 100644 --- a/libs/portal-integration-angular/src/lib/core/components/help-item-editor/help-item-editor.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/help-item-editor/help-item-editor.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core' import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms' +import { PortalMessageService } from '@onecx/angular-integration-interface' import { HelpData } from '../../../model/help-data' -import { PortalMessageService } from '../../../services/portal-message.service' @Component({ selector: 'ocx-help-item-editor', diff --git a/libs/portal-integration-angular/src/lib/core/components/inline-profile/inline-profile.component.ts b/libs/portal-integration-angular/src/lib/core/components/inline-profile/inline-profile.component.ts index 638ed63e..870bd51d 100644 --- a/libs/portal-integration-angular/src/lib/core/components/inline-profile/inline-profile.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/inline-profile/inline-profile.component.ts @@ -1,11 +1,10 @@ import { animate, state, style, transition, trigger } from '@angular/animations' import { Component, EventEmitter, Inject, Input, OnInit, Output } from '@angular/core' -import { AUTH_SERVICE, IAuthService } from '@onecx/angular-accelerator' -import { MenuService } from '../../../services/app.menu.service' -import { MenuItem } from 'primeng/api' import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' -import { UserService } from '@onecx/angular-integration-interface' import { map, Observable } from 'rxjs' +import { MenuItem } from 'primeng/api' +import { UserService, AUTH_SERVICE, IAuthService } from '@onecx/angular-integration-interface' +import { MenuService } from '../../../services/app.menu.service' import { UserProfile } from '../../../model/user-profile.model' @Component({ diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-footer/portal-footer.component.spec.ts b/libs/portal-integration-angular/src/lib/core/components/portal-footer/portal-footer.component.spec.ts index f2d0f731..d31e20ce 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-footer/portal-footer.component.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-footer/portal-footer.component.spec.ts @@ -1,8 +1,7 @@ import { ComponentFixture, TestBed, getTestBed, waitForAsync } from '@angular/core/testing' import { HttpClientTestingModule } from '@angular/common/http/testing' +import { AppStateService, ConfigurationService } from '@onecx/angular-integration-interface' import { PortalFooterComponent } from './portal-footer.component' -import { ConfigurationService } from '../../../services/configuration.service' -import { AppStateService } from '@onecx/angular-integration-interface' describe('PortalFooterComponent', () => { const origAddEventListener = window.addEventListener diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-footer/portal-footer.component.ts b/libs/portal-integration-angular/src/lib/core/components/portal-footer/portal-footer.component.ts index c96661fb..4c1843e9 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-footer/portal-footer.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-footer/portal-footer.component.ts @@ -1,13 +1,10 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core' -import { ConfigurationService } from '../../../services/configuration.service' import { Router } from '@angular/router' +import { combineLatest, concat, map, Observable, of, withLatestFrom } from 'rxjs' import { MenuItem } from 'primeng/api' +import { AppStateService, ConfigurationService, ThemeService, CONFIG_KEY } from '@onecx/angular-integration-interface' import { MenuService } from '../../../services/app.menu.service' -import { AppStateService } from '@onecx/angular-integration-interface' -import { combineLatest, concat, map, Observable, of, withLatestFrom } from 'rxjs' -import { ThemeService } from '../../../services/theme.service' import { API_PREFIX } from '../../../api/constants' -import { CONFIG_KEY } from '../../../model/config-key.model' import { ImageLogoUrlUtils } from '../../utils/image-logo-url.utils' @Component({ selector: 'ocx-footer', diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-header/header.component.spec.ts b/libs/portal-integration-angular/src/lib/core/components/portal-header/header.component.spec.ts index 12350af5..7d9d3cdf 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-header/header.component.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-header/header.component.spec.ts @@ -1,13 +1,13 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing' -import { HeaderComponent } from './header.component' -import { AUTH_SERVICE, IfBreakpointDirective } from '@onecx/angular-accelerator' -import { MockAuthService } from '../../../mock-auth/mock-auth.service' -import { ConfigurationService } from '../../../services/configuration.service' import { HttpClientTestingModule } from '@angular/common/http/testing' -import { UserAvatarComponent } from '../user-avatar/user-avatar.component' import { ActivatedRoute, RouterModule } from '@angular/router' -import { TooltipModule } from 'primeng/tooltip' import { TranslateTestingModule } from 'ngx-translate-testing' +import { TooltipModule } from 'primeng/tooltip' +import { IfBreakpointDirective } from '@onecx/angular-accelerator' +import { ConfigurationService, AUTH_SERVICE } from '@onecx/angular-integration-interface' +import { HeaderComponent } from './header.component' +import { MockAuthService } from '../../../mock-auth/mock-auth.service' +import { UserAvatarComponent } from '../user-avatar/user-avatar.component' describe('HeaderComponent', () => { let component: HeaderComponent diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-header/header.component.ts b/libs/portal-integration-angular/src/lib/core/components/portal-header/header.component.ts index 26db7fd4..0ff067b2 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-header/header.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-header/header.component.ts @@ -1,19 +1,23 @@ import { animate, style, transition, trigger } from '@angular/animations' import { Component, ElementRef, EventEmitter, Inject, Input, OnInit, Output, ViewChild } from '@angular/core' +import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' import { combineLatest, filter, map, Observable } from 'rxjs' import { MenuItem } from 'primeng/api/menuitem' +import { PrimeIcons } from 'primeng/api' + +import { + AppStateService, + UserService, + ThemeService, + AUTH_SERVICE, + ConfigurationService, + CONFIG_KEY, + IAuthService, +} from '@onecx/angular-integration-interface' -import { AUTH_SERVICE, IAuthService } from '@onecx/angular-accelerator' import { UserProfile } from '../../../model/user-profile.model' -import { ConfigurationService } from '../../../services/configuration.service' import { MenuService } from '../../../services/app.menu.service' -import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' -import { CONFIG_KEY } from '../../../model/config-key.model' -import { ThemeService } from '../../../services/theme.service' import { ImageLogoUrlUtils } from '../../utils/image-logo-url.utils' -import { UserService } from '@onecx/angular-integration-interface' -import { AppStateService } from '@onecx/angular-integration-interface' -import { PrimeIcons } from 'primeng/api' type MenuItemPerm = MenuItem & { permission: string } @Component({ diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-menu-horizontal/portal-menu-horizontal.component.spec.ts b/libs/portal-integration-angular/src/lib/core/components/portal-menu-horizontal/portal-menu-horizontal.component.spec.ts index f6f48abb..efaec466 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-menu-horizontal/portal-menu-horizontal.component.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-menu-horizontal/portal-menu-horizontal.component.spec.ts @@ -1,9 +1,9 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' -import { PortalMenuHorizontalComponent } from './portal-menu-horizontal.component' import { HttpClientTestingModule } from '@angular/common/http/testing' -import { ConfigurationService } from '../../../services/configuration.service' import { MenubarModule } from 'primeng/menubar' +import { ConfigurationService } from '@onecx/angular-integration-interface' +import { PortalMenuHorizontalComponent } from './portal-menu-horizontal.component' describe('PortalMenuHorizontalComponent', () => { let component: PortalMenuHorizontalComponent diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-menu/portal-menu.component.spec.ts b/libs/portal-integration-angular/src/lib/core/components/portal-menu/portal-menu.component.spec.ts index 0e1522e0..9f0cd808 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-menu/portal-menu.component.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-menu/portal-menu.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' -import { PortalMenuComponent } from './portal-menu.component' import { HttpClientTestingModule } from '@angular/common/http/testing' -import { ConfigurationService } from '../../../services/configuration.service' +import { ConfigurationService } from '@onecx/angular-integration-interface' +import { PortalMenuComponent } from './portal-menu.component' describe('PortalMenuComponent', () => { let component: PortalMenuComponent diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.spec.ts b/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.spec.ts index 7ccc0dd2..00e69813 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.spec.ts @@ -1,26 +1,25 @@ /* tslint:disable:no-unused-variable */ import { ComponentFixture, getTestBed, TestBed } from '@angular/core/testing' -import { PortalViewportComponent } from './portal-viewport.component' import { HttpClientTestingModule } from '@angular/common/http/testing' -import { ConfigurationService } from '../../../services/configuration.service' +import { ActivatedRoute, RouterModule } from '@angular/router' +import { NoopAnimationsModule } from '@angular/platform-browser/animations' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { MessageService } from 'primeng/api' +import { ToastModule } from 'primeng/toast' +import { DialogModule } from 'primeng/dialog' +import { TooltipModule } from 'primeng/tooltip' +import { TranslateTestingModule } from 'ngx-translate-testing' +import { ConfigurationService, AUTH_SERVICE, AppStateService } from '@onecx/angular-integration-interface' +import { PortalViewportComponent } from './portal-viewport.component' import { SupportTicketComponent } from '../support-ticket/support-ticket.component' import { HelpItemEditorComponent } from '../help-item-editor/help-item-editor.component' import { HeaderComponent } from '../portal-header/header.component' -import { ToastModule } from 'primeng/toast' import { AnnouncementBannerComponent } from '../announcement-banner/announcement-banner.component' -import { DialogModule } from 'primeng/dialog' -import { ActivatedRoute, RouterModule } from '@angular/router' import { PortalFooterComponent } from '../portal-footer/portal-footer.component' import { UserAvatarComponent } from '../user-avatar/user-avatar.component' import { PortalMenuComponent } from '../portal-menu/portal-menu.component' import { AppInlineProfileComponent } from '../inline-profile/inline-profile.component' -import { NoopAnimationsModule } from '@angular/platform-browser/animations' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' -import { TooltipModule } from 'primeng/tooltip' -import { TranslateTestingModule } from 'ngx-translate-testing' -import { AppStateService } from '@onecx/angular-integration-interface' -import { AUTH_SERVICE, IfBreakpointDirective } from '@onecx/angular-accelerator' +import { IfBreakpointDirective } from '@onecx/angular-accelerator' import { MockAuthService } from '../../../mock-auth/mock-auth.service' import { PortalCoreModule } from '../../portal-core.module' diff --git a/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.ts b/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.ts index 3039431b..a01ecac1 100644 --- a/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/portal-viewport/portal-viewport.component.ts @@ -1,20 +1,17 @@ -import { SupportTicketApiService } from './../../../services/support-ticket-api.service' import { AfterViewInit, Component, HostListener, Input, OnDestroy, OnInit, Renderer2 } from '@angular/core' +import { HttpResponse } from '@angular/common/http' +import { NavigationEnd, Router } from '@angular/router' +import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' +import { catchError, combineLatest, filter, first, map, mergeMap, Observable, of, withLatestFrom } from 'rxjs' import { MenuItem, MessageService, PrimeNGConfig } from 'primeng/api' +import { DialogService } from 'primeng/dynamicdialog' +import { AppStateService, UserService, ThemeService, PortalMessageService } from '@onecx/angular-integration-interface' +import { SupportTicketApiService } from './../../../services/support-ticket-api.service' import { PortalUIService } from '../../../services/portal-ui.service' -import { catchError, combineLatest, filter, first, map, mergeMap, Observable, of, withLatestFrom } from 'rxjs' -import { ThemeService } from '../../../services/theme.service' -import { AppStateService } from '@onecx/angular-integration-interface' import { SupportTicket } from '../../../model/support-ticket' import { HelpData } from '../../../model/help-data' -import { DialogService } from 'primeng/dynamicdialog' import { NoHelpItemComponent } from '../no-help-item/no-help-item.component' -import { NavigationEnd, Router } from '@angular/router' import { HelpPageAPIService } from '../../../services/help-api-service' -import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' -import { HttpResponse } from '@angular/common/http' -import { UserService } from '@onecx/angular-integration-interface' -import { PortalMessageService } from '../../../services/portal-message.service' @Component({ selector: 'ocx-portal-viewport', diff --git a/libs/portal-integration-angular/src/lib/core/components/search-criteria/search-criteria.component.spec.ts b/libs/portal-integration-angular/src/lib/core/components/search-criteria/search-criteria.component.spec.ts index 23ed1ef1..9210c847 100644 --- a/libs/portal-integration-angular/src/lib/core/components/search-criteria/search-criteria.component.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/components/search-criteria/search-criteria.component.spec.ts @@ -1,13 +1,12 @@ -import { InputSwitchModule } from 'primeng/inputswitch' import { ComponentFixture, TestBed, getTestBed } from '@angular/core/testing' import { RouterTestingModule } from '@angular/router/testing' -import { SearchCriteriaComponent } from './search-criteria.component' import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core' -import { ConfigurationService } from '../../../services/configuration.service' import { HttpClientTestingModule } from '@angular/common/http/testing' +import { InputSwitchModule } from 'primeng/inputswitch' +import { AppStateService, ConfigurationService } from '@onecx/angular-integration-interface' +import { SearchCriteriaComponent } from './search-criteria.component' import { MockAuthModule } from '../../../mock-auth/mock-auth.module' import { TranslateTestingModule } from 'ngx-translate-testing' -import { AppStateService } from '@onecx/angular-integration-interface' describe('SearchCriteriaComponent', () => { const origAddEventListener = window.addEventListener diff --git a/libs/portal-integration-angular/src/lib/core/components/search-criteria/search-criteria.component.stories.ts b/libs/portal-integration-angular/src/lib/core/components/search-criteria/search-criteria.component.stories.ts index 6c5d6c09..5d6f7619 100644 --- a/libs/portal-integration-angular/src/lib/core/components/search-criteria/search-criteria.component.stories.ts +++ b/libs/portal-integration-angular/src/lib/core/components/search-criteria/search-criteria.component.stories.ts @@ -12,11 +12,10 @@ import { InputSwitchModule } from 'primeng/inputswitch' import { InputTextModule } from 'primeng/inputtext' import { MenuModule } from 'primeng/menu' import { SkeletonModule } from 'primeng/skeleton' -import { APP_CONFIG } from '@onecx/angular-accelerator' +import { PageHeaderComponent } from '@onecx/angular-accelerator' +import { ConfigurationService, APP_CONFIG } from '@onecx/angular-integration-interface' import { MockAuthModule } from '../../../mock-auth/mock-auth.module' -import { ConfigurationService } from '../../../services/configuration.service' import { StorybookTranslateModule } from '../../storybook-translate.module' -import { PageHeaderComponent } from '@onecx/angular-accelerator' import { CriteriaTemplateComponent } from './criteria-template/criteria-template.component' import { SearchCriteriaComponent } from './search-criteria.component' diff --git a/libs/portal-integration-angular/src/lib/core/initializer/standalone.initializer.ts b/libs/portal-integration-angular/src/lib/core/initializer/standalone.initializer.ts index 7f16f1bd..972d8911 100644 --- a/libs/portal-integration-angular/src/lib/core/initializer/standalone.initializer.ts +++ b/libs/portal-integration-angular/src/lib/core/initializer/standalone.initializer.ts @@ -1,13 +1,15 @@ import { firstValueFrom } from 'rxjs' -import { IAuthService } from '@onecx/angular-accelerator' -import { ConfigurationService } from '../../services/configuration.service' +import { + AppStateService, + UserService, + ThemeService, + ConfigurationService, + CONFIG_KEY, + IAuthService, +} from '@onecx/angular-integration-interface' +import { MfeInfo } from '@onecx/integration-interface' import { PortalApiService } from '../../services/portal-api.service' -import { ThemeService } from '../../services/theme.service' -import { AppStateService } from '@onecx/angular-integration-interface' -import { CONFIG_KEY } from '../../model/config-key.model' -import { UserService } from '@onecx/angular-integration-interface' import { UserProfileAPIService } from '../../services/userprofile-api.service' -import { MfeInfo } from '@onecx/integration-interface' const CONFIG_INIT_ERR = 'CONFIG_INIT_ERR' const AUTH_INIT_ERR = 'AUTH_INIT_ERR' diff --git a/libs/portal-integration-angular/src/lib/core/portal-core.module.ts b/libs/portal-integration-angular/src/lib/core/portal-core.module.ts index c1631991..eda80f81 100644 --- a/libs/portal-integration-angular/src/lib/core/portal-core.module.ts +++ b/libs/portal-integration-angular/src/lib/core/portal-core.module.ts @@ -12,13 +12,15 @@ import { import { HttpClient } from '@angular/common/http' import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { RouterModule } from '@angular/router' +import de from '@angular/common/locales/de' import { MissingTranslationHandler, MissingTranslationHandlerParams, TranslateLoader, TranslateModule, } from '@ngx-translate/core' -import { APPLICATION_NAME, AUTH_SERVICE, SANITY_CHECK } from '@onecx/angular-accelerator' +import { MessageService } from 'primeng/api' +import { ConfirmDialogModule } from 'primeng/confirmdialog' import { AutofocusDirective } from './directives/autofocus.directive' import { AppInlineProfileComponent } from './components/inline-profile/inline-profile.component' import { LoadingComponent } from './components/loading/loading.component' @@ -34,25 +36,29 @@ import { PortalPageComponent } from './components/portal-page/portal-page.compon import { DeleteDialogComponent } from './components/delete-dialog/delete-dialog.component' import { PortalViewportComponent } from './components/portal-viewport/portal-viewport.component' import { UserAvatarComponent } from './components/user-avatar/user-avatar.component' -import { ConfigurationService } from '../services/configuration.service' import { DataViewControlsComponent } from './components/data-view-controls/data-view-controls.component' import { SearchCriteriaComponent } from './components/search-criteria/search-criteria.component' import { ColumnTogglerComponent } from './components/data-view-controls/column-toggler-component/column-toggler.component' import { standaloneInitializer } from './initializer/standalone.initializer' import { PortalApiService } from '../services/portal-api.service' import { CriteriaTemplateComponent } from './components/search-criteria/criteria-template/criteria-template.component' -import { ThemeService } from '../services/theme.service' import { GlobalErrorComponent } from './components/error-component/global-error.component' import { AngularAcceleratorModule, TranslationCacheService, createTranslateLoader } from '@onecx/angular-accelerator' -import { UserService, AppStateService } from '@onecx/angular-integration-interface' +import { + UserService, + AppStateService, + ConfigurationService, + APPLICATION_NAME, + AUTH_SERVICE, + SANITY_CHECK, + ThemeService, +} from '@onecx/angular-integration-interface' import { AnnouncementBannerComponent } from './components/announcement-banner/announcement-banner.component' import { ViewTemplatePickerComponent } from './components/data-view-controls/view-template-picker/view-template-picker.component' import { SupportTicketComponent } from './components/support-ticket/support-ticket.component' import { HelpItemEditorComponent } from './components/help-item-editor/help-item-editor.component' import { NoHelpItemComponent } from './components/no-help-item/no-help-item.component' import { PrimeNgModule } from './primeng.module' -import { ConfirmDialogModule } from 'primeng/confirmdialog' -import de from '@angular/common/locales/de' import { AdvancedDirective } from './directives/advanced.directive' import { BasicDirective } from './directives/basic.directive' import { PatchFormGroupValuesDirective } from './directives/patch-form-group-values.driective' @@ -66,7 +72,6 @@ import { OcxContentComponent } from './components/content/content.component' import { OcxContentContainerComponent } from './components/content-container/content-container.component' import { OcxContentContainerDirective } from './directives/content-container.directive' import { UserProfileAPIService } from '../services/userprofile-api.service' -import { MessageService } from 'primeng/api' import { CreateOrEditSearchConfigDialogComponent } from './components/create-or-edit-search-config-dialog/create-or-edit-search-config-dialog.component' import { LifecycleComponent } from './components/lifecycle/lifecycle.component' diff --git a/libs/portal-integration-angular/src/lib/core/utils/add-initialize-module-guard.utils.spec.ts b/libs/portal-integration-angular/src/lib/core/utils/add-initialize-module-guard.utils.spec.ts index 96a68403..47ad1546 100644 --- a/libs/portal-integration-angular/src/lib/core/utils/add-initialize-module-guard.utils.spec.ts +++ b/libs/portal-integration-angular/src/lib/core/utils/add-initialize-module-guard.utils.spec.ts @@ -1,8 +1,6 @@ import { TranslateService } from '@ngx-translate/core' -import { AppStateService } from '@onecx/angular-integration-interface' -import { ConfigurationService } from '../../services/configuration.service' +import { AppStateService, UserService, ConfigurationService } from '@onecx/angular-integration-interface' import { InitializeModuleGuard } from '../../services/initialize-module-guard.service' -import { UserService } from '@onecx/angular-integration-interface' import { addInitializeModuleGuard } from './add-initialize-module-guard.utils' class MockInitializeModuleGuard extends InitializeModuleGuard { diff --git a/libs/portal-integration-angular/src/lib/core/utils/portal-api-configuration.utils.ts b/libs/portal-integration-angular/src/lib/core/utils/portal-api-configuration.utils.ts index 3df2e0d8..c2d855bd 100644 --- a/libs/portal-integration-angular/src/lib/core/utils/portal-api-configuration.utils.ts +++ b/libs/portal-integration-angular/src/lib/core/utils/portal-api-configuration.utils.ts @@ -1,7 +1,6 @@ import { Location } from '@angular/common' import { BehaviorSubject, first, map } from 'rxjs' -import { AppStateService } from '@onecx/angular-integration-interface' -import { ConfigurationService } from '../../services/configuration.service' +import { AppStateService, ConfigurationService } from '@onecx/angular-integration-interface' type Config = { credentials: { [key: string]: string | (() => string | undefined) } diff --git a/libs/portal-integration-angular/src/lib/mock-auth/mock-auth.module.ts b/libs/portal-integration-angular/src/lib/mock-auth/mock-auth.module.ts index 3f6e8995..78a473ec 100644 --- a/libs/portal-integration-angular/src/lib/mock-auth/mock-auth.module.ts +++ b/libs/portal-integration-angular/src/lib/mock-auth/mock-auth.module.ts @@ -1,6 +1,6 @@ import { CommonModule } from '@angular/common' import { APP_INITIALIZER, NgModule } from '@angular/core' -import { AUTH_SERVICE } from '@onecx/angular-accelerator' +import { AUTH_SERVICE } from '@onecx/angular-integration-interface' import { MockAuthService } from './mock-auth.service' function initializer(authService: MockAuthService): () => Promise { diff --git a/libs/portal-integration-angular/src/lib/mock-auth/mock-auth.service.ts b/libs/portal-integration-angular/src/lib/mock-auth/mock-auth.service.ts index 11b375be..9e51ec13 100644 --- a/libs/portal-integration-angular/src/lib/mock-auth/mock-auth.service.ts +++ b/libs/portal-integration-angular/src/lib/mock-auth/mock-auth.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core' import { BehaviorSubject } from 'rxjs' -import { IAuthService } from '@onecx/angular-accelerator' +import { IAuthService } from '@onecx/angular-integration-interface' import { UserProfile } from '../model/user-profile.model' @Injectable() diff --git a/libs/portal-integration-angular/src/lib/model/portal-wrapper.ts b/libs/portal-integration-angular/src/lib/model/portal-wrapper.ts index 10a93db8..db45a040 100644 --- a/libs/portal-integration-angular/src/lib/model/portal-wrapper.ts +++ b/libs/portal-integration-angular/src/lib/model/portal-wrapper.ts @@ -1,7 +1,7 @@ +import { Theme } from '@onecx/angular-integration-interface' import { Portal } from './portal' import { PortalMenuItem } from './menu-item.model' import { MicroFrontend } from './microfrontend' -import { Theme } from './theme' export interface PortalWrapper { portalDTO: Portal diff --git a/libs/portal-integration-angular/src/lib/model/theme.ts b/libs/portal-integration-angular/src/lib/model/theme.ts deleted file mode 100644 index 5f1a8c1a..00000000 --- a/libs/portal-integration-angular/src/lib/model/theme.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface Theme { - id?: string - assetsUpdateDate?: string - assetsUrl?: string - logoUrl?: string - faviconUrl?: string - cssFile?: string - description?: string - name?: string - previewImageUrl?: string - properties?: { [key: string]: { [key: string]: string } } -} diff --git a/libs/portal-integration-angular/src/lib/services/app.menu.service.ts b/libs/portal-integration-angular/src/lib/services/app.menu.service.ts index 5e7ee77f..690d0046 100644 --- a/libs/portal-integration-angular/src/lib/services/app.menu.service.ts +++ b/libs/portal-integration-angular/src/lib/services/app.menu.service.ts @@ -1,13 +1,11 @@ import { Inject, Injectable, Optional } from '@angular/core' import { Router } from '@angular/router' +import { APP_BASE_HREF, PlatformLocation } from '@angular/common' import { MenuItem } from 'primeng/api' import { map, Observable, of, shareReplay, Subject, withLatestFrom } from 'rxjs' +import { UserService, ConfigurationService, CONFIG_KEY } from '@onecx/angular-integration-interface' import { PortalMenuItem } from '../model/menu-item.model' -import { ConfigurationService } from './configuration.service' import { MenuApiService } from './menu-api.service' -import { APP_BASE_HREF, PlatformLocation } from '@angular/common' -import { CONFIG_KEY } from '../model/config-key.model' -import { UserService } from '@onecx/angular-integration-interface' @Injectable({ providedIn: 'root' }) export class MenuService { diff --git a/libs/portal-integration-angular/src/lib/services/initialize-module-guard.service.ts b/libs/portal-integration-angular/src/lib/services/initialize-module-guard.service.ts index 39f6af0b..b30c9f2e 100644 --- a/libs/portal-integration-angular/src/lib/services/initialize-module-guard.service.ts +++ b/libs/portal-integration-angular/src/lib/services/initialize-module-guard.service.ts @@ -2,8 +2,7 @@ import { Injectable } from '@angular/core' import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router' import { TranslateService } from '@ngx-translate/core' import { filter, from, isObservable, map, mergeMap, Observable, of, tap, zip } from 'rxjs' -import { AppStateService } from '@onecx/angular-integration-interface' -import { ConfigurationService } from './configuration.service' +import { AppStateService, ConfigurationService } from '@onecx/angular-integration-interface' import { UserService } from '@onecx/angular-integration-interface' @Injectable({ providedIn: 'any' })