@onecx/angular-integration-interface 7.0.0-rc.9 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,10 +30,10 @@ class AppConfigServiceMock {
30
30
  getConfig() {
31
31
  return this.config$.getValue();
32
32
  }
33
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppConfigServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
34
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppConfigServiceMock }); }
33
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
34
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigServiceMock }); }
35
35
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppConfigServiceMock, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigServiceMock, decorators: [{
37
37
  type: Injectable
38
38
  }] });
39
39
 
@@ -71,10 +71,10 @@ class AppStateServiceMock {
71
71
  });
72
72
  this.isAuthenticated$ = new FakeTopic(null);
73
73
  }
74
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppStateServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
75
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppStateServiceMock }); }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
75
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateServiceMock }); }
76
76
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppStateServiceMock, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateServiceMock, decorators: [{
78
78
  type: Injectable
79
79
  }] });
80
80
 
@@ -108,10 +108,10 @@ class ConfigurationServiceMock {
108
108
  getConfig() {
109
109
  return firstValueFrom(this.config$.asObservable());
110
110
  }
111
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ConfigurationServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
112
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ConfigurationServiceMock, providedIn: 'root' }); }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
112
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationServiceMock, providedIn: 'root' }); }
113
113
  }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ConfigurationServiceMock, decorators: [{
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationServiceMock, decorators: [{
115
115
  type: Injectable,
116
116
  args: [{ providedIn: 'root' }]
117
117
  }], ctorParameters: () => [] });
@@ -142,10 +142,10 @@ class PortalMessageServiceMock {
142
142
  severity: severity,
143
143
  });
144
144
  }
145
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PortalMessageServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
146
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PortalMessageServiceMock, providedIn: 'any' }); }
145
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
146
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageServiceMock, providedIn: 'any' }); }
147
147
  }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PortalMessageServiceMock, decorators: [{
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageServiceMock, decorators: [{
149
149
  type: Injectable,
150
150
  args: [{ providedIn: 'any' }]
151
151
  }] });
@@ -157,10 +157,10 @@ class RemoteComponentsServiceMock {
157
157
  constructor() {
158
158
  this.remoteComponents$ = new FakeTopic();
159
159
  }
160
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteComponentsServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
161
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteComponentsServiceMock, providedIn: 'root' }); }
160
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
161
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsServiceMock, providedIn: 'root' }); }
162
162
  }
163
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteComponentsServiceMock, decorators: [{
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsServiceMock, decorators: [{
164
164
  type: Injectable,
165
165
  args: [{ providedIn: 'root' }]
166
166
  }] });
@@ -197,10 +197,10 @@ class UserServiceMock {
197
197
  get isInitialized() {
198
198
  return Promise.resolve();
199
199
  }
200
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: UserServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
201
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: UserServiceMock, providedIn: 'root' }); }
200
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
201
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserServiceMock, providedIn: 'root' }); }
202
202
  }
203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: UserServiceMock, decorators: [{
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserServiceMock, decorators: [{
204
204
  type: Injectable,
205
205
  args: [{ providedIn: 'root' }]
206
206
  }] });
@@ -216,10 +216,10 @@ class ShellCapabilityServiceMock {
216
216
  hasCapability(capability) {
217
217
  return ShellCapabilityServiceMock.capabilities?.includes(capability) ?? false;
218
218
  }
219
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ShellCapabilityServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
220
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ShellCapabilityServiceMock }); }
219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityServiceMock, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
220
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityServiceMock }); }
221
221
  }
222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ShellCapabilityServiceMock, decorators: [{
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityServiceMock, decorators: [{
223
223
  type: Injectable
224
224
  }] });
225
225
 
@@ -1 +1 @@
1
- {"version":3,"file":"onecx-angular-integration-interface-mocks.mjs","sources":["../../../../libs/angular-integration-interface/mocks/app-config-service-mock.ts","../../../../libs/angular-integration-interface/mocks/app-state-service-mock.ts","../../../../libs/angular-integration-interface/mocks/configuration-service-mock.ts","../../../../libs/angular-integration-interface/mocks/portal-message-service-mock.ts","../../../../libs/angular-integration-interface/mocks/remote-components-service-mock.ts","../../../../libs/angular-integration-interface/mocks/user-service-mock.ts","../../../../libs/angular-integration-interface/mocks/shell-capability-service-mock.ts","../../../../libs/angular-integration-interface/mocks/onecx-angular-integration-interface-mocks.ts"],"sourcesContent":["import { Injectable } from '@angular/core'\nimport { BehaviorSubject } from 'rxjs'\nimport { Config } from '@onecx/integration-interface'\nimport { AppConfigService } from '@onecx/angular-integration-interface'\n\nexport function provideAppConfigServiceMock() {\n return [AppConfigServiceMock, { provide: AppConfigService, useExisting: AppConfigServiceMock }]\n}\n@Injectable()\nexport class AppConfigServiceMock {\n config$ = new BehaviorSubject<{ [key: string]: string }>({})\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public init(baseUrl: string): Promise<void> {\n return new Promise((resolve) => {\n const mockConfig: Config = { key: 'config' }\n this.config$.next(mockConfig)\n resolve()\n })\n }\n\n public getProperty(key: string): string | undefined {\n return this.config$.getValue()?.[key]\n }\n\n public setProperty(key: string, val: string) {\n this.config$.next({ ...this.config$.value, [key]: val })\n }\n\n public getConfig(): { [key: string]: string } {\n return this.config$.getValue()\n }\n}\n","import { Injectable } from '@angular/core'\nimport { CurrentLocationTopicPayload, MfeInfo, PageInfo, Workspace } from '@onecx/integration-interface'\n// eslint-disable-next-line\nimport { AppStateService } from '@onecx/angular-integration-interface'\nimport { FakeTopic } from '@onecx/accelerator'\n\nexport function provideAppStateServiceMock() {\n return [AppStateServiceMock, { provide: AppStateService, useExisting: AppStateServiceMock }]\n}\n\n@Injectable()\nexport class AppStateServiceMock {\n globalError$ = new FakeTopic()\n globalLoading$ = new FakeTopic(false)\n currentMfe$ = new FakeTopic<MfeInfo>({\n mountPath: '/',\n remoteBaseUrl: '.',\n baseHref: '/',\n shellName: 'test',\n appId: 'test',\n productName: 'test',\n })\n currentPage$ = new FakeTopic<PageInfo | undefined>(undefined)\n currentPortal$ = new FakeTopic<Workspace>({\n baseUrl: '/',\n microfrontendRegistrations: [],\n portalName: 'Test portal',\n workspaceName: 'Test portal',\n })\n currentWorkspace$ = new FakeTopic<Workspace>({\n baseUrl: '/',\n microfrontendRegistrations: [],\n portalName: 'Test workspace',\n workspaceName: 'Test workspace',\n })\n currentLocation$ = new FakeTopic<CurrentLocationTopicPayload>({\n url: '/',\n isFirst: true,\n })\n isAuthenticated$ = new FakeTopic<null>(null)\n}\n","import { Injectable } from '@angular/core'\nimport { Config } from '@onecx/integration-interface'\nimport { CONFIG_KEY } from '@onecx/angular-integration-interface'\nimport { firstValueFrom } from 'rxjs/internal/firstValueFrom'\nimport { ConfigurationService } from '@onecx/angular-integration-interface'\nimport { FakeTopic } from '@onecx/accelerator'\n\nexport function provideConfigurationServiceMock() {\n return [ConfigurationServiceMock, { provide: ConfigurationService, useExisting: ConfigurationServiceMock }]\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ConfigurationServiceMock {\n config$ = new FakeTopic<Config>({})\n\n private resolveInitPromise!: (value: void | PromiseLike<void>) => void\n private isInitializedPromise: Promise<void>\n\n constructor() {\n this.isInitializedPromise = new Promise<void>((resolve) => {\n this.resolveInitPromise = resolve\n })\n }\n\n public init(config?: Config): Promise<boolean> {\n return this.config$.publish(config ?? {}).then(() => {\n this.resolveInitPromise()\n return true\n })\n }\n\n get isInitialized(): Promise<void> {\n return this.isInitializedPromise\n }\n\n public getProperty(key: CONFIG_KEY): Promise<string | undefined> {\n return firstValueFrom(this.config$.asObservable()).then((config) => config[key])\n }\n\n public async setProperty(key: string, val: string): Promise<void> {\n const currentValues = await firstValueFrom(this.config$.asObservable())\n currentValues[key] = val\n await this.config$.publish(currentValues)\n }\n\n public getConfig(): Promise<Config | undefined> {\n return firstValueFrom(this.config$.asObservable())\n }\n}\n","import { Injectable } from '@angular/core'\nimport { FakeTopic } from '@onecx/accelerator'\nimport { Message as PortalMessage, PortalMessageService } from '@onecx/angular-integration-interface'\nimport { Message } from '@onecx/integration-interface'\n\nexport function providePortalMessageServiceMock() {\n return [PortalMessageServiceMock, { provide: PortalMessageService, useExisting: PortalMessageServiceMock }]\n}\n@Injectable({ providedIn: 'any' })\nexport class PortalMessageServiceMock {\n message$ = new FakeTopic<Message>()\n\n success(msg: PortalMessage) {\n this.addTranslated('success', msg)\n }\n\n info(msg: PortalMessage) {\n this.addTranslated('info', msg)\n }\n\n error(msg: PortalMessage) {\n this.addTranslated('error', msg)\n }\n\n warning(msg: PortalMessage) {\n this.addTranslated('warning', msg)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private addTranslated(severity: string, msg: PortalMessage) {\n this.message$.publish({\n ...msg,\n severity: severity,\n })\n }\n}\n","import { Injectable } from '@angular/core'\nimport { RemoteComponentsInfo } from '@onecx/integration-interface'\nimport { RemoteComponentsService } from '@onecx/angular-integration-interface'\nimport { FakeTopic } from '@onecx/accelerator'\n\nexport function provideRemoteComponentsServiceMock() {\n return [RemoteComponentsServiceMock, { provide: RemoteComponentsService, useExisting: RemoteComponentsServiceMock }]\n}\n@Injectable({ providedIn: 'root' })\nexport class RemoteComponentsServiceMock {\n remoteComponents$ = new FakeTopic<RemoteComponentsInfo>()\n}\n","import { Injectable } from '@angular/core'\nimport { BehaviorSubject, Observable } from 'rxjs'\nimport { UserProfile } from '@onecx/integration-interface'\nimport { UserService } from '@onecx/angular-integration-interface'\nimport { FakeTopic } from '@onecx/accelerator'\n\nexport function provideUserServiceMock() {\n return [UserServiceMock, { provide: UserService, useExisting: UserServiceMock }]\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UserServiceMock {\n profile$ = new FakeTopic<UserProfile>()\n permissionsTopic$ = new FakeTopic<string[]>(['mocked-permission'])\n lang$ = new BehaviorSubject('en')\n\n async hasPermission(permissionKey: string | string[]): Promise<boolean> {\n if (Array.isArray(permissionKey)) {\n return permissionKey.every(async (key) => await this.hasPermission(key))\n }\n\n const result = this.permissionsTopic$.getValue()?.includes(permissionKey)\n if (!result) {\n console.log(`👮‍♀️ No permission for: ${permissionKey}`)\n }\n return !!result\n }\n\n getPermissions(): Observable<string[]> {\n return this.permissionsTopic$.asObservable()\n }\n\n determineLanguage(): string | undefined {\n return 'mocked-lang'\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n extractPermissions(userProfile: UserProfile): string[] | null {\n return ['mocked-permission']\n }\n\n get isInitialized(): Promise<void> {\n return Promise.resolve()\n }\n}\n\nexport type MockUserService = UserServiceMock\n","import { Injectable } from '@angular/core'\nimport { Capability, ShellCapabilityService } from '@onecx/angular-integration-interface'\n\nexport function provideShellCapabilityServiceMock() {\n return [ShellCapabilityServiceMock, { provide: ShellCapabilityService, useExisting: ShellCapabilityServiceMock }]\n}\n\n@Injectable()\nexport class ShellCapabilityServiceMock {\n static capabilities: Capability[] = []\n\n static setCapabilities(capabilities: Capability[]): void {\n ShellCapabilityServiceMock.capabilities = capabilities\n }\n\n hasCapability(capability: Capability): boolean {\n return ShellCapabilityServiceMock.capabilities?.includes(capability) ?? false\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;SAKgB,2BAA2B,GAAA;AACzC,IAAA,OAAO,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;AACjG;MAEa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAA4B,EAAE,CAAC;AAsB7D;;AAnBQ,IAAA,IAAI,CAAC,OAAe,EAAA;AACzB,QAAA,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,KAAI;AAC7B,YAAA,MAAM,UAAU,GAAW,EAAE,GAAG,EAAE,QAAQ,EAAE;AAC5C,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;AAC7B,YAAA,OAAO,EAAE;AACX,SAAC,CAAC;;AAGG,IAAA,WAAW,CAAC,GAAW,EAAA;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC;;IAGhC,WAAW,CAAC,GAAW,EAAE,GAAW,EAAA;QACzC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;;IAGnD,SAAS,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;;+GArBrB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAApB,oBAAoB,EAAA,C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EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA;;4FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;SCPlB,iCAAiC,GAAA;AAC/C,IAAA,OAAO,CAAC,0BAA0B,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;AACnH;MAGa,0BAA0B,CAAA;aAC9B,IAAY,CAAA,YAAA,GAAiB,EAAjB,CAAmB;IAEtC,OAAO,eAAe,CAAC,YAA0B,EAAA;AAC/C,QAAA,0BAA0B,CAAC,YAAY,GAAG,YAAY;;AAGxD,IAAA,aAAa,CAAC,UAAsB,EAAA;QAClC,OAAO,0BAA0B,CAAC,YAAY,EAAE,QAAQ,CAAC,UAAU,CAAC,IAAI,KAAK;;+GARpE,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAA1B,0BAA0B,EAAA,CAAA,CAAA;;4FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"onecx-angular-integration-interface-mocks.mjs","sources":["../../../../libs/angular-integration-interface/mocks/app-config-service-mock.ts","../../../../libs/angular-integration-interface/mocks/app-state-service-mock.ts","../../../../libs/angular-integration-interface/mocks/configuration-service-mock.ts","../../../../libs/angular-integration-interface/mocks/portal-message-service-mock.ts","../../../../libs/angular-integration-interface/mocks/remote-components-service-mock.ts","../../../../libs/angular-integration-interface/mocks/user-service-mock.ts","../../../../libs/angular-integration-interface/mocks/shell-capability-service-mock.ts","../../../../libs/angular-integration-interface/mocks/onecx-angular-integration-interface-mocks.ts"],"sourcesContent":["import { Injectable } from '@angular/core'\nimport { BehaviorSubject } from 'rxjs'\nimport { Config } from '@onecx/integration-interface'\nimport { AppConfigService } from '@onecx/angular-integration-interface'\n\nexport function provideAppConfigServiceMock() {\n return [AppConfigServiceMock, { provide: AppConfigService, useExisting: AppConfigServiceMock }]\n}\n@Injectable()\nexport class AppConfigServiceMock {\n config$ = new BehaviorSubject<{ [key: string]: string }>({})\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public init(baseUrl: string): Promise<void> {\n return new Promise((resolve) => {\n const mockConfig: Config = { key: 'config' }\n this.config$.next(mockConfig)\n resolve()\n })\n }\n\n public getProperty(key: string): string | undefined {\n return this.config$.getValue()?.[key]\n }\n\n public setProperty(key: string, val: string) {\n this.config$.next({ ...this.config$.value, [key]: val })\n }\n\n public getConfig(): { [key: string]: string } {\n return this.config$.getValue()\n }\n}\n","import { Injectable } from '@angular/core'\nimport { CurrentLocationTopicPayload, MfeInfo, PageInfo, Workspace } from '@onecx/integration-interface'\n// eslint-disable-next-line\nimport { AppStateService } from '@onecx/angular-integration-interface'\nimport { FakeTopic } from '@onecx/accelerator'\n\nexport function provideAppStateServiceMock() {\n return [AppStateServiceMock, { provide: AppStateService, useExisting: AppStateServiceMock }]\n}\n\n@Injectable()\nexport class AppStateServiceMock {\n globalError$ = new FakeTopic()\n globalLoading$ = new FakeTopic(false)\n currentMfe$ = new FakeTopic<MfeInfo>({\n mountPath: '/',\n remoteBaseUrl: '.',\n baseHref: '/',\n shellName: 'test',\n appId: 'test',\n productName: 'test',\n })\n currentPage$ = new FakeTopic<PageInfo | undefined>(undefined)\n currentPortal$ = new FakeTopic<Workspace>({\n baseUrl: '/',\n microfrontendRegistrations: [],\n portalName: 'Test portal',\n workspaceName: 'Test portal',\n })\n currentWorkspace$ = new FakeTopic<Workspace>({\n baseUrl: '/',\n microfrontendRegistrations: [],\n portalName: 'Test workspace',\n workspaceName: 'Test workspace',\n })\n currentLocation$ = new FakeTopic<CurrentLocationTopicPayload>({\n url: '/',\n isFirst: true,\n })\n isAuthenticated$ = new FakeTopic<null>(null)\n}\n","import { Injectable } from '@angular/core'\nimport { Config } from '@onecx/integration-interface'\nimport { CONFIG_KEY } from '@onecx/angular-integration-interface'\nimport { firstValueFrom } from 'rxjs/internal/firstValueFrom'\nimport { ConfigurationService } from '@onecx/angular-integration-interface'\nimport { FakeTopic } from '@onecx/accelerator'\n\nexport function provideConfigurationServiceMock() {\n return [ConfigurationServiceMock, { provide: ConfigurationService, useExisting: ConfigurationServiceMock }]\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ConfigurationServiceMock {\n config$ = new FakeTopic<Config>({})\n\n private resolveInitPromise!: (value: void | PromiseLike<void>) => void\n private isInitializedPromise: Promise<void>\n\n constructor() {\n this.isInitializedPromise = new Promise<void>((resolve) => {\n this.resolveInitPromise = resolve\n })\n }\n\n public init(config?: Config): Promise<boolean> {\n return this.config$.publish(config ?? {}).then(() => {\n this.resolveInitPromise()\n return true\n })\n }\n\n get isInitialized(): Promise<void> {\n return this.isInitializedPromise\n }\n\n public getProperty(key: CONFIG_KEY): Promise<string | undefined> {\n return firstValueFrom(this.config$.asObservable()).then((config) => config[key])\n }\n\n public async setProperty(key: string, val: string): Promise<void> {\n const currentValues = await firstValueFrom(this.config$.asObservable())\n currentValues[key] = val\n await this.config$.publish(currentValues)\n }\n\n public getConfig(): Promise<Config | undefined> {\n return firstValueFrom(this.config$.asObservable())\n }\n}\n","import { Injectable } from '@angular/core'\nimport { FakeTopic } from '@onecx/accelerator'\nimport { Message as PortalMessage, PortalMessageService } from '@onecx/angular-integration-interface'\nimport { Message } from '@onecx/integration-interface'\n\nexport function providePortalMessageServiceMock() {\n return [PortalMessageServiceMock, { provide: PortalMessageService, useExisting: PortalMessageServiceMock }]\n}\n@Injectable({ providedIn: 'any' })\nexport class PortalMessageServiceMock {\n message$ = new FakeTopic<Message>()\n\n success(msg: PortalMessage) {\n this.addTranslated('success', msg)\n }\n\n info(msg: PortalMessage) {\n this.addTranslated('info', msg)\n }\n\n error(msg: PortalMessage) {\n this.addTranslated('error', msg)\n }\n\n warning(msg: PortalMessage) {\n this.addTranslated('warning', msg)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private addTranslated(severity: string, msg: PortalMessage) {\n this.message$.publish({\n ...msg,\n severity: severity,\n })\n }\n}\n","import { Injectable } from '@angular/core'\nimport { RemoteComponentsInfo } from '@onecx/integration-interface'\nimport { RemoteComponentsService } from '@onecx/angular-integration-interface'\nimport { FakeTopic } from '@onecx/accelerator'\n\nexport function provideRemoteComponentsServiceMock() {\n return [RemoteComponentsServiceMock, { provide: RemoteComponentsService, useExisting: RemoteComponentsServiceMock }]\n}\n@Injectable({ providedIn: 'root' })\nexport class RemoteComponentsServiceMock {\n remoteComponents$ = new FakeTopic<RemoteComponentsInfo>()\n}\n","import { Injectable } from '@angular/core'\nimport { BehaviorSubject, Observable } from 'rxjs'\nimport { UserProfile } from '@onecx/integration-interface'\nimport { UserService } from '@onecx/angular-integration-interface'\nimport { FakeTopic } from '@onecx/accelerator'\n\nexport function provideUserServiceMock() {\n return [UserServiceMock, { provide: UserService, useExisting: UserServiceMock }]\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UserServiceMock {\n profile$ = new FakeTopic<UserProfile>()\n permissionsTopic$ = new FakeTopic<string[]>(['mocked-permission'])\n lang$ = new BehaviorSubject('en')\n\n async hasPermission(permissionKey: string | string[]): Promise<boolean> {\n if (Array.isArray(permissionKey)) {\n return permissionKey.every(async (key) => await this.hasPermission(key))\n }\n\n const result = this.permissionsTopic$.getValue()?.includes(permissionKey)\n if (!result) {\n console.log(`👮‍♀️ No permission for: ${permissionKey}`)\n }\n return !!result\n }\n\n getPermissions(): Observable<string[]> {\n return this.permissionsTopic$.asObservable()\n }\n\n determineLanguage(): string | undefined {\n return 'mocked-lang'\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n extractPermissions(userProfile: UserProfile): string[] | null {\n return ['mocked-permission']\n }\n\n get isInitialized(): Promise<void> {\n return Promise.resolve()\n }\n}\n\nexport type MockUserService = UserServiceMock\n","import { Injectable } from '@angular/core'\nimport { Capability, ShellCapabilityService } from '@onecx/angular-integration-interface'\n\nexport function provideShellCapabilityServiceMock() {\n return [ShellCapabilityServiceMock, { provide: ShellCapabilityService, useExisting: ShellCapabilityServiceMock }]\n}\n\n@Injectable()\nexport class ShellCapabilityServiceMock {\n static capabilities: Capability[] = []\n\n static setCapabilities(capabilities: Capability[]): void {\n ShellCapabilityServiceMock.capabilities = capabilities\n }\n\n hasCapability(capability: Capability): boolean {\n return ShellCapabilityServiceMock.capabilities?.includes(capability) ?? false\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;SAKgB,2BAA2B,GAAA;AACzC,IAAA,OAAO,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;AACjG;MAEa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAA4B,EAAE,CAAC;AAsB7D,IAAA;;AAnBQ,IAAA,IAAI,CAAC,OAAe,EAAA;AACzB,QAAA,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,KAAI;AAC7B,YAAA,MAAM,UAAU,GAAW,EAAE,GAAG,EAAE,QAAQ,EAAE;AAC5C,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;AAC7B,YAAA,OAAO,EAAE;AACX,QAAA,CAAC,CAAC;IACJ;AAEO,IAAA,WAAW,CAAC,GAAW,EAAA;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC;IACvC;IAEO,WAAW,CAAC,GAAW,EAAE,GAAW,EAAA;QACzC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;IA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ACzC,OAAO,CAAC,mBAAmB,CAAC;IAC9B;AAEA,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,OAAO,CAAC,OAAO,EAAE;IAC1B;+GAhCW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA;;4FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;SCPlB,iCAAiC,GAAA;AAC/C,IAAA,OAAO,CAAC,0BAA0B,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;AACnH;MAGa,0BAA0B,CAAA;aAC9B,IAAA,CAAA,YAAY,GAAiB,EAAjB,CAAmB;IAEtC,OAAO,eAAe,CAAC,YAA0B,EAAA;AAC/C,QAAA,0BAA0B,CAAC,YAAY,GAAG,YAAY;IACxD;AAEA,IAAA,aAAa,CAAC,UAAsB,EAAA;QAClC,OAAO,0BAA0B,CAAC,YAAY,EAAE,QAAQ,CAAC,UAAU,CAAC,IAAI,KAAK;IAC/E;+GATW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAA1B,0BAA0B,EAAA,CAAA,CAAA;;4FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC;;;ACPD;;AAEG;;;;"}
@@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http';
3
3
  import * as i0 from '@angular/core';
4
4
  import { inject, Injectable, InjectionToken } from '@angular/core';
5
5
  import { BehaviorSubject, firstValueFrom, map, combineLatest, of, first } from 'rxjs';
6
- import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentLocationTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic, ConfigurationTopic, UserProfileTopic, PermissionsTopic, MessageTopic, CurrentThemeTopic, RemoteComponentsTopic } from '@onecx/integration-interface';
6
+ import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentLocationTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic, ConfigurationTopic, PermissionsTopic, UserProfileTopic, MessageTopic, CurrentThemeTopic, RemoteComponentsTopic, ImageRepositoryService as ImageRepositoryService$1 } from '@onecx/integration-interface';
7
7
  import Semaphore from 'ts-semaphore';
8
8
  import { getNormalizedBrowserLocales } from '@onecx/accelerator';
9
9
  import { TranslateService } from '@ngx-translate/core';
@@ -38,43 +38,80 @@ class AppConfigService {
38
38
  getConfig() {
39
39
  return this.config$.getValue();
40
40
  }
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
42
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppConfigService }); }
41
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
42
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigService }); }
43
43
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppConfigService, decorators: [{
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfigService, decorators: [{
45
45
  type: Injectable
46
46
  }] });
47
47
 
48
48
  class AppStateService {
49
- constructor() {
50
- this.globalError$ = new GlobalErrorTopic();
51
- this.globalLoading$ = new GlobalLoadingTopic();
52
- this.currentMfe$ = new CurrentMfeTopic();
53
- this.currentLocation$ = new CurrentLocationTopic();
54
- /**
55
- * This topic will only fire when pageInfo.path matches document.location.pathname,
56
- * if not it will fire undefined.
57
- */
58
- this.currentPage$ = new CurrentPageTopic();
59
- this.currentWorkspace$ = new CurrentWorkspaceTopic();
60
- /**
61
- * This Topic is initialized as soon as the authentication is done
62
- */
63
- this.isAuthenticated$ = new IsAuthenticatedTopic();
49
+ get globalError$() {
50
+ this._globalError$ ??= new GlobalErrorTopic();
51
+ return this._globalError$;
52
+ }
53
+ set globalError$(source) {
54
+ this._globalError$ = source;
55
+ }
56
+ get globalLoading$() {
57
+ this._globalLoading$ ??= new GlobalLoadingTopic();
58
+ return this._globalLoading$;
59
+ }
60
+ set globalLoading$(source) {
61
+ this._globalLoading$ = source;
62
+ }
63
+ get currentMfe$() {
64
+ this._currentMfe$ ??= new CurrentMfeTopic();
65
+ return this._currentMfe$;
66
+ }
67
+ set currentMfe$(source) {
68
+ this._currentMfe$ = source;
69
+ }
70
+ get currentLocation$() {
71
+ this._currentLocation$ ??= new CurrentLocationTopic();
72
+ return this._currentLocation$;
73
+ }
74
+ set currentLocation$(source) {
75
+ this._currentLocation$ = source;
76
+ }
77
+ /**
78
+ * This topic will only fire when pageInfo.path matches document.location.pathname,
79
+ * if not it will fire undefined.
80
+ */
81
+ get currentPage$() {
82
+ this._currentPage$ ??= new CurrentPageTopic();
83
+ return this._currentPage$;
84
+ }
85
+ set currentPage$(source) {
86
+ this._currentPage$ = source;
87
+ }
88
+ get currentWorkspace$() {
89
+ this._currentWorkspace$ ??= new CurrentWorkspaceTopic();
90
+ return this._currentWorkspace$;
91
+ }
92
+ set currentWorkspace$(source) {
93
+ this._currentWorkspace$ = source;
94
+ }
95
+ get isAuthenticated$() {
96
+ this._isAuthenticated$ ??= new IsAuthenticatedTopic();
97
+ return this._isAuthenticated$;
98
+ }
99
+ set isAuthenticated$(source) {
100
+ this._isAuthenticated$ = source;
64
101
  }
65
102
  ngOnDestroy() {
66
- this.globalError$.destroy();
67
- this.globalLoading$.destroy();
68
- this.currentMfe$.destroy();
69
- this.currentPage$.destroy();
70
- this.currentLocation$.destroy();
71
- this.currentWorkspace$.destroy();
72
- this.isAuthenticated$.destroy();
73
- }
74
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
75
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppStateService, providedIn: 'root' }); }
103
+ this._globalError$?.destroy();
104
+ this._globalLoading$?.destroy();
105
+ this._currentMfe$?.destroy();
106
+ this._currentPage$?.destroy();
107
+ this._currentLocation$?.destroy();
108
+ this._currentWorkspace$?.destroy();
109
+ this._isAuthenticated$?.destroy();
110
+ }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
112
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateService, providedIn: 'root' }); }
76
113
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppStateService, decorators: [{
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppStateService, decorators: [{
78
115
  type: Injectable,
79
116
  args: [{ providedIn: 'root' }]
80
117
  }] });
@@ -124,11 +161,17 @@ class ConfigurationService {
124
161
  constructor() {
125
162
  this.http = inject(HttpClient);
126
163
  this.defaultConfig = inject(APP_CONFIG, { optional: true });
127
- this.config$ = new ConfigurationTopic();
128
164
  this.semaphore = new Semaphore(1);
129
165
  }
166
+ get config$() {
167
+ this._config$ ??= new ConfigurationTopic();
168
+ return this._config$;
169
+ }
170
+ set config$(source) {
171
+ this._config$ = source;
172
+ }
130
173
  ngOnDestroy() {
131
- this.config$.destroy();
174
+ this._config$?.destroy();
132
175
  }
133
176
  init() {
134
177
  return new Promise((resolve, reject) => {
@@ -179,10 +222,10 @@ class ConfigurationService {
179
222
  async getConfig() {
180
223
  return firstValueFrom(this.config$.asObservable());
181
224
  }
182
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
183
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ConfigurationService, providedIn: 'root' }); }
225
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
226
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationService, providedIn: 'root' }); }
184
227
  }
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ConfigurationService, decorators: [{
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigurationService, decorators: [{
186
229
  type: Injectable,
187
230
  args: [{ providedIn: 'root' }]
188
231
  }] });
@@ -191,10 +234,16 @@ const API_PREFIX = 'portal-api';
191
234
  const DEFAULT_LANG = 'en';
192
235
 
193
236
  class UserService {
237
+ get permissionsTopic$() {
238
+ this._permissionsTopic$ ??= new PermissionsTopic();
239
+ return this._permissionsTopic$;
240
+ }
241
+ set permissionsTopic$(source) {
242
+ this._permissionsTopic$ = source;
243
+ }
194
244
  constructor() {
195
245
  this.profile$ = new UserProfileTopic();
196
246
  this.lang$ = new BehaviorSubject(this.determineLanguage() ?? DEFAULT_LANG);
197
- this.permissionsTopic$ = new PermissionsTopic();
198
247
  this.profile$
199
248
  .pipe(map((profile) => {
200
249
  let locales = profile.settings?.locales;
@@ -214,6 +263,7 @@ class UserService {
214
263
  }
215
264
  ngOnDestroy() {
216
265
  this.profile$.destroy();
266
+ this._permissionsTopic$?.destroy();
217
267
  }
218
268
  useOldLangSetting(profile) {
219
269
  return profile.accountSettings?.localeAndTimeSettings?.locale ?? this.determineLanguage() ?? DEFAULT_LANG;
@@ -260,10 +310,10 @@ class UserService {
260
310
  // eslint-disable-next-line @typescript-eslint/no-empty-function
261
311
  ]).then(() => { });
262
312
  }
263
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
264
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: UserService, providedIn: 'root' }); }
313
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
314
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserService, providedIn: 'root' }); }
265
315
  }
266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: UserService, decorators: [{
316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserService, decorators: [{
267
317
  type: Injectable,
268
318
  args: [{ providedIn: 'root' }]
269
319
  }], ctorParameters: () => [] });
@@ -271,7 +321,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
271
321
  class PortalMessageService {
272
322
  constructor() {
273
323
  this.translateService = inject(TranslateService);
274
- this.message$ = new MessageTopic();
324
+ }
325
+ get message$() {
326
+ this._message$ ??= new MessageTopic();
327
+ return this._message$;
328
+ }
329
+ set message$(source) {
330
+ this._message$ = source;
275
331
  }
276
332
  success(msg) {
277
333
  this.addTranslated('success', msg);
@@ -301,42 +357,50 @@ class PortalMessageService {
301
357
  });
302
358
  }
303
359
  ngOnDestroy() {
304
- this.message$.destroy();
360
+ this._message$?.destroy();
305
361
  }
306
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PortalMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
307
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PortalMessageService, providedIn: 'any' }); }
362
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
363
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageService, providedIn: 'any' }); }
308
364
  }
309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PortalMessageService, decorators: [{
365
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PortalMessageService, decorators: [{
310
366
  type: Injectable,
311
367
  args: [{ providedIn: 'any' }]
312
368
  }] });
313
369
 
314
370
  class ThemeService {
315
- constructor() {
316
- this.currentTheme$ = new CurrentThemeTopic();
371
+ get currentTheme$() {
372
+ this._currentTheme$ ??= new CurrentThemeTopic();
373
+ return this._currentTheme$;
374
+ }
375
+ set currentTheme$(source) {
376
+ this._currentTheme$ = source;
317
377
  }
318
378
  ngOnDestroy() {
319
- this.currentTheme$.destroy();
379
+ this._currentTheme$?.destroy();
320
380
  }
321
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
322
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
381
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
382
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
323
383
  }
324
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ThemeService, decorators: [{
384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ThemeService, decorators: [{
325
385
  type: Injectable,
326
386
  args: [{ providedIn: 'root' }]
327
387
  }] });
328
388
 
329
389
  class RemoteComponentsService {
330
- constructor() {
331
- this.remoteComponents$ = new RemoteComponentsTopic();
390
+ get remoteComponents$() {
391
+ this._remoteComponents$ ??= new RemoteComponentsTopic();
392
+ return this._remoteComponents$;
393
+ }
394
+ set remoteComponents$(source) {
395
+ this._remoteComponents$ = source;
332
396
  }
333
397
  ngOnDestroy() {
334
- this.remoteComponents$.destroy();
398
+ this._remoteComponents$?.destroy();
335
399
  }
336
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
337
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteComponentsService, providedIn: 'root' }); }
400
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
401
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsService, providedIn: 'root' }); }
338
402
  }
339
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteComponentsService, decorators: [{
403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RemoteComponentsService, decorators: [{
340
404
  type: Injectable,
341
405
  args: [{ providedIn: 'root' }]
342
406
  }] });
@@ -471,10 +535,10 @@ class WorkspaceService {
471
535
  return String(value);
472
536
  }
473
537
  }
474
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WorkspaceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
475
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WorkspaceService, providedIn: 'root' }); }
538
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WorkspaceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
539
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WorkspaceService, providedIn: 'root' }); }
476
540
  }
477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: WorkspaceService, decorators: [{
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WorkspaceService, decorators: [{
478
542
  type: Injectable,
479
543
  args: [{
480
544
  providedIn: 'root',
@@ -494,10 +558,40 @@ class ShellCapabilityService {
494
558
  hasCapability(capability) {
495
559
  return window['onecx-shell-capabilities']?.includes(capability) ?? false;
496
560
  }
497
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ShellCapabilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
498
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ShellCapabilityService, providedIn: 'root' }); }
561
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
562
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityService, providedIn: 'root' }); }
563
+ }
564
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShellCapabilityService, decorators: [{
565
+ type: Injectable,
566
+ args: [{ providedIn: 'root' }]
567
+ }] });
568
+
569
+ class ImageRepositoryService {
570
+ constructor() {
571
+ this.imageRepositoryInterface = new ImageRepositoryService$1();
572
+ }
573
+ get imageRepositoryTopic() {
574
+ return this.imageRepositoryInterface.imageRepositoryTopic;
575
+ }
576
+ set imageRepositoryTopic(source) {
577
+ this.imageRepositoryInterface.imageRepositoryTopic = source;
578
+ }
579
+ async getUrl(names, fallbackUrl) {
580
+ if (fallbackUrl) {
581
+ return this.imageRepositoryInterface.getUrl(names, fallbackUrl);
582
+ }
583
+ return this.imageRepositoryInterface.getUrl(names);
584
+ }
585
+ ngOnDestroy() {
586
+ this.imageRepositoryInterface.destroy();
587
+ }
588
+ destroy() {
589
+ this.ngOnDestroy();
590
+ }
591
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageRepositoryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
592
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageRepositoryService, providedIn: 'root' }); }
499
593
  }
500
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ShellCapabilityService, decorators: [{
594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ImageRepositoryService, decorators: [{
501
595
  type: Injectable,
502
596
  args: [{ providedIn: 'root' }]
503
597
  }] });
@@ -508,5 +602,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
508
602
  * Generated bundle index. Do not edit.
509
603
  */
510
604
 
511
- export { APPLICATION_NAME, APP_CONFIG, AppConfigService, AppStateService, CONFIG_KEY, Capability, ConfigurationService, POLYFILL_SCOPE_MODE, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ShellCapabilityService, ThemeService, UserService, WorkspaceService };
605
+ export { APPLICATION_NAME, APP_CONFIG, AppConfigService, AppStateService, CONFIG_KEY, Capability, ConfigurationService, ImageRepositoryService, POLYFILL_SCOPE_MODE, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ShellCapabilityService, ThemeService, UserService, WorkspaceService };
512
606
  //# sourceMappingURL=onecx-angular-integration-interface.mjs.map