@acorex-platform/module-integration-management-client 0.0.32 → 0.0.37

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.
Files changed (48) hide show
  1. package/fesm2022/acorex-platform-module-integration-management-client-connect-with-credentials.command-DO_zqjHV.mjs.map +1 -1
  2. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entities-integration-application.mjs +153 -0
  3. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entities-integration-application.mjs.map +1 -0
  4. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entities-integration-connection.mjs +191 -0
  5. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entities-integration-connection.mjs.map +1 -0
  6. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entities-integration-oauth-state.mjs +127 -0
  7. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entities-integration-oauth-state.mjs.map +1 -0
  8. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-acorex-platform-module-integration-management-client-contracts-entity-catalog-BT3-xrGZ.mjs +69 -0
  9. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-acorex-platform-module-integration-management-client-contracts-entity-catalog-BT3-xrGZ.mjs.map +1 -0
  10. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-application.entity-BGZKCUt8.mjs +105 -0
  11. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-application.entity-BGZKCUt8.mjs.map +1 -0
  12. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-connection.entity-CYQq6jv2.mjs +143 -0
  13. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-connection.entity-CYQq6jv2.mjs.map +1 -0
  14. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-oauth-state.entity-BPvTE55S.mjs +79 -0
  15. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-oauth-state.entity-BPvTE55S.mjs.map +1 -0
  16. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog.mjs +2 -0
  17. package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog.mjs.map +1 -0
  18. package/fesm2022/acorex-platform-module-integration-management-client-contracts.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-module-integration-management-client-delete-connection.command-DQ_kn8dH.mjs.map +1 -1
  20. package/fesm2022/acorex-platform-module-integration-management-client-disconnect-connection.command-B4HeDA1n.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-module-integration-management-client-get-provider.query-Ds10RwnU.mjs.map +1 -1
  22. package/fesm2022/acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DRWR9ysx.mjs.map +1 -1
  23. package/fesm2022/{acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CZu5mKUA.mjs → acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CY0tOlNi.mjs} +2 -2
  24. package/fesm2022/{acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CZu5mKUA.mjs.map → acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CY0tOlNi.mjs.map} +1 -1
  25. package/fesm2022/acorex-platform-module-integration-management-client-integration-ref-display.service-CP818xou.mjs.map +1 -1
  26. package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-DeED5cU5.mjs → acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-zVURpFT4.mjs} +10 -11
  27. package/fesm2022/acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-zVURpFT4.mjs.map +1 -0
  28. package/fesm2022/acorex-platform-module-integration-management-client-integration-ref-page.component-D9hdpnQq.mjs.map +1 -1
  29. package/fesm2022/acorex-platform-module-integration-management-client-integration-ref-widget-column.component-CPLhmHOe.mjs.map +1 -1
  30. package/fesm2022/acorex-platform-module-integration-management-client-integration-ref-widget-view.component-BRpGpWHZ.mjs.map +1 -1
  31. package/fesm2022/{acorex-platform-module-integration-management-client-integrations-page.component-iH0DqEak.mjs → acorex-platform-module-integration-management-client-integrations-page.component-BIDqAXx3.mjs} +2 -2
  32. package/fesm2022/{acorex-platform-module-integration-management-client-integrations-page.component-iH0DqEak.mjs.map → acorex-platform-module-integration-management-client-integrations-page.component-BIDqAXx3.mjs.map} +1 -1
  33. package/fesm2022/acorex-platform-module-integration-management-client-list-domains.query--GGD6J46.mjs.map +1 -1
  34. package/fesm2022/acorex-platform-module-integration-management-client-list-my-connections.query-CmHu1qFm.mjs.map +1 -1
  35. package/fesm2022/acorex-platform-module-integration-management-client-list-providers.query-ODKJ_UhI.mjs.map +1 -1
  36. package/fesm2022/acorex-platform-module-integration-management-client-local-entities.mjs +31 -0
  37. package/fesm2022/acorex-platform-module-integration-management-client-local-entities.mjs.map +1 -0
  38. package/fesm2022/acorex-platform-module-integration-management-client-update-connection.command-BNMR-t12.mjs.map +1 -1
  39. package/fesm2022/acorex-platform-module-integration-management-client-validate-connection.command-CGtb_GPX.mjs.map +1 -1
  40. package/fesm2022/acorex-platform-module-integration-management-client.mjs +4 -4
  41. package/fesm2022/acorex-platform-module-integration-management-client.mjs.map +1 -1
  42. package/package.json +21 -1
  43. package/types/acorex-platform-module-integration-management-client-contracts-entities-integration-application.d.ts +5 -0
  44. package/types/acorex-platform-module-integration-management-client-contracts-entities-integration-connection.d.ts +5 -0
  45. package/types/acorex-platform-module-integration-management-client-contracts-entities-integration-oauth-state.d.ts +5 -0
  46. package/types/acorex-platform-module-integration-management-client-contracts-entity-catalog.d.ts +10 -0
  47. package/types/acorex-platform-module-integration-management-client-local-entities.d.ts +12 -0
  48. package/fesm2022/acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-DeED5cU5.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DRWR9ysx.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/shared/integration-connection-lifecycle.dispatcher.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { Injectable, inject } from '@angular/core';\nimport { AXP_INTEGRATION_CONNECTION_LIFECYCLE } from '@acorex-platform/framework-client/common';\nimport type { AXPSafeIntegrationConnectionDto } from '@acorex-platform/framework-shared/core';\n\n//#endregion\n\n//#region ---- Service ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMIntegrationConnectionLifecycleDispatcher {\n private readonly handlers = inject(AXP_INTEGRATION_CONNECTION_LIFECYCLE, { optional: true });\n\n async dispatchDisconnected(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n await this.forProvider(connection.providerId, async (handler) => {\n await handler.onDisconnected?.(connection);\n });\n }\n\n async dispatchDeleted(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n await this.forProvider(connection.providerId, async (handler) => {\n await handler.onDeleted?.(connection);\n });\n }\n\n async dispatchEnabledChanged(\n connection: AXPSafeIntegrationConnectionDto,\n enabled: boolean,\n ): Promise<void> {\n await this.forProvider(connection.providerId, async (handler) => {\n await handler.onEnabledChanged?.(connection, enabled);\n });\n }\n\n private async forProvider(\n providerId: string,\n run: (handler: {\n providerId: string;\n onDisconnected?(connection: AXPSafeIntegrationConnectionDto): Promise<void>;\n onDeleted?(connection: AXPSafeIntegrationConnectionDto): Promise<void>;\n onEnabledChanged?(connection: AXPSafeIntegrationConnectionDto, enabled: boolean): Promise<void>;\n }) => Promise<void>,\n ): Promise<void> {\n const list = this.handlers ?? [];\n for (const handler of list) {\n const resolved = handler instanceof Promise ? await handler : handler;\n if (resolved.providerId === providerId) {\n await run(resolved);\n }\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAAA;AAMA;AAEA;MAGa,2CAA2C,CAAA;AADxD,IAAA,WAAA,GAAA;QAEmB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oCAAoC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAwC7F,IAAA;IAtCC,MAAM,oBAAoB,CAAC,UAA2C,EAAA;AACpE,Q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AAA,EAAA,2CAA2C,cAD9B,MAAM,EAAA,CAAA,CAAA;;2FACnB,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBADvD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DRWR9ysx.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/shared/integration-connection-lifecycle.dispatcher.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { Injectable, inject } from '@angular/core';\nimport { AXP_INTEGRATION_CONNECTION_LIFECYCLE } from '@acorex-platform/framework-client/common';\nimport type { AXPSafeIntegrationConnectionDto } from '@acorex-platform/framework-shared/core';\n\n//#endregion\n\n//#region ---- Service ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMIntegrationConnectionLifecycleDispatcher {\n private readonly handlers = inject(AXP_INTEGRATION_CONNECTION_LIFECYCLE, { optional: true });\n\n async dispatchDisconnected(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n await this.forProvider(connection.providerId, async (handler) => {\n await handler.onDisconnected?.(connection);\n });\n }\n\n async dispatchDeleted(connection: AXPSafeIntegrationConnectionDto): Promise<void> {\n await this.forProvider(connection.providerId, async (handler) => {\n await handler.onDeleted?.(connection);\n });\n }\n\n async dispatchEnabledChanged(\n connection: AXPSafeIntegrationConnectionDto,\n enabled: boolean,\n ): Promise<void> {\n await this.forProvider(connection.providerId, async (handler) => {\n await handler.onEnabledChanged?.(connection, enabled);\n });\n }\n\n private async forProvider(\n providerId: string,\n run: (handler: {\n providerId: string;\n onDisconnected?(connection: AXPSafeIntegrationConnectionDto): Promise<void>;\n onDeleted?(connection: AXPSafeIntegrationConnectionDto): Promise<void>;\n onEnabledChanged?(connection: AXPSafeIntegrationConnectionDto, enabled: boolean): Promise<void>;\n }) => Promise<void>,\n ): Promise<void> {\n const list = this.handlers ?? [];\n for (const handler of list) {\n const resolved = handler instanceof Promise ? await handler : handler;\n if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GAAG,CAAC,QAAQ,CAAC;YACrB;QACF;IACF;8GAxCW,2CAA2C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3C,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2CAA2C,cAD9B,MAAM,EAAA,CAAA,CAAA;;2FACnB,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBADvD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -125,7 +125,7 @@ class AXMIntegrationOAuthCallbackPageComponent {
125
125
  </div>
126
126
  </div>
127
127
  </ng-container>
128
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i3$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "pipe", type: i3$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
128
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i3$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "pipe", type: i3$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
129
129
  }
130
130
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationOAuthCallbackPageComponent, decorators: [{
131
131
  type: Component,
@@ -173,4 +173,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
173
173
  }] });
174
174
 
175
175
  export { AXMIntegrationOAuthCallbackPageComponent };
176
- //# sourceMappingURL=acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CZu5mKUA.mjs.map
176
+ //# sourceMappingURL=acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CY0tOlNi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CZu5mKUA.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/oauth-callback/integration-oauth-callback-page.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPIntegrationProviderRegistryService } from '@acorex-platform/framework-client/common';\nimport { AXPStateMessageComponent } from '@acorex-platform/framework-client/layout/components';\nimport { commandMessageTextForError } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport {\n buildTenantIntegrationsPagePath,\n resolveAppRouteName,\n} from '@acorex-platform/module-integration-management-client/contracts';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n OnInit,\n} from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\n\n@Component({\n standalone: true,\n imports: [\n CommonModule,\n AXButtonModule,\n AXTranslationModule,\n AXPStateMessageComponent,\n ],\n template: `\n <ng-container *translate=\"let t\">\n <div class=\"h-full flex flex-col items-center justify-center p-8\">\n <div class=\"w-96 text-center\">\n @if (isLoading$ | async) {\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-solid fa-spinner fa-spin\"\n title=\"Completing authorization...\"\n description=\"Please wait while we finish connecting your integration.\"\n ></axp-state-message>\n } @else if (error$ | async; as error) {\n <axp-state-message\n mode=\"error\"\n icon=\"fa-solid fa-exclamation-triangle\"\n title=\"Authorization failed\"\n [description]=\"error\"\n >\n <div slot=\"actions\" class=\"flex justify-center\">\n <ax-button\n color=\"primary\"\n text=\"Back to integrations\"\n (onClick)=\"goToIntegrations()\"\n ></ax-button>\n </div>\n </axp-state-message>\n }\n </div>\n </div>\n </ng-container>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMIntegrationOAuthCallbackPageComponent implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly providerRegistry = inject(AXPIntegrationProviderRegistryService);\n\n protected readonly isLoading$ = new BehaviorSubject<boolean>(true);\n protected readonly error$ = new BehaviorSubject<string | null>(null);\n\n async ngOnInit(): Promise<void> {\n const sessionReady = await this.ensureSessionReady();\n if (!sessionReady) {\n return;\n }\n\n await this.completeCallback();\n }\n\n /** Wait for app init + persisted session (user, tenant, app, permissions) before OAuth completion. */\n private async ensureSessionReady(): Promise<boolean> {\n let authorized = await firstValueFrom(\n this.sessionService.isAuthorizedWithLoading$,\n );\n if (!authorized) {\n await this.sessionService.restoreSession();\n authorized = await firstValueFrom(\n this.sessionService.isAuthorizedWithLoading$,\n );\n }\n\n if (!authorized) {\n this.isLoading$.next(false);\n this.error$.next(\n 'Session is not ready. Please sign in again and retry the connection.',\n );\n return false;\n }\n\n return true;\n }\n\n private async completeCallback(): Promise<void> {\n const providerId = this.route.snapshot.paramMap.get('providerId') ?? '';\n const state = this.route.snapshot.queryParamMap.get('state') ?? '';\n const code = this.route.snapshot.queryParamMap.get('code') ?? '';\n const oauthError = this.route.snapshot.queryParamMap.get('error') ?? '';\n\n if (oauthError) {\n this.isLoading$.next(false);\n this.error$.next(oauthError);\n return;\n }\n\n if (!providerId || !state || !code) {\n this.isLoading$.next(false);\n this.error$.next('Missing OAuth callback parameters.');\n return;\n }\n\n const provider = await this.providerRegistry.get(providerId);\n const commandKey = provider?.completeOAuthCommandKey;\n if (!commandKey) {\n this.isLoading$.next(false);\n this.error$.next(`OAuth callback is not configured for provider '${providerId}'.`);\n return;\n }\n\n try {\n const result = await this.commandService.execute(commandKey, { state, code });\n\n if (!result?.success) {\n this.error$.next(\n commandMessageTextForError(result?.message?.text) ||\n 'OAuth callback failed.',\n );\n return;\n }\n\n await this.goToIntegrations();\n } catch (error: unknown) {\n const message =\n error instanceof Error ? error.message : 'OAuth callback failed.';\n this.error$.next(message);\n } finally {\n this.isLoading$.next(false);\n }\n }\n\n protected async goToIntegrations(): Promise<void> {\n // Prefer session app slug — callback URLs are often app-agnostic or legacy `/demo/...`.\n const appName = resolveAppRouteName(\n this.sessionService.application?.name,\n this.route.snapshot.paramMap.get('appName'),\n );\n if (!appName) {\n this.error$.next('Unable to determine the current application after authorization.');\n return;\n }\n await this.router.navigateByUrl(buildTenantIntegrationsPagePath(appName));\n }\n}\n\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;;;;;;;;MA8Da,wCAAwC,CAAA;AAzCrD,IAAA,WAAA,GAAA;AA0CmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,C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-management-client-integration-oauth-callback-page.component-CY0tOlNi.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/oauth-callback/integration-oauth-callback-page.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPIntegrationProviderRegistryService } from '@acorex-platform/framework-client/common';\nimport { AXPStateMessageComponent } from '@acorex-platform/framework-client/layout/components';\nimport { commandMessageTextForError } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport {\n buildTenantIntegrationsPagePath,\n resolveAppRouteName,\n} from '@acorex-platform/module-integration-management-client/contracts';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n OnInit,\n} from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\n\n@Component({\n standalone: true,\n imports: [\n CommonModule,\n AXButtonModule,\n AXTranslationModule,\n AXPStateMessageComponent,\n ],\n template: `\n <ng-container *translate=\"let t\">\n <div class=\"h-full flex flex-col items-center justify-center p-8\">\n <div class=\"w-96 text-center\">\n @if (isLoading$ | async) {\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-solid fa-spinner fa-spin\"\n title=\"Completing authorization...\"\n description=\"Please wait while we finish connecting your integration.\"\n ></axp-state-message>\n } @else if (error$ | async; as error) {\n <axp-state-message\n mode=\"error\"\n icon=\"fa-solid fa-exclamation-triangle\"\n title=\"Authorization failed\"\n [description]=\"error\"\n >\n <div slot=\"actions\" class=\"flex justify-center\">\n <ax-button\n color=\"primary\"\n text=\"Back to integrations\"\n (onClick)=\"goToIntegrations()\"\n ></ax-button>\n </div>\n </axp-state-message>\n }\n </div>\n </div>\n </ng-container>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMIntegrationOAuthCallbackPageComponent implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly providerRegistry = inject(AXPIntegrationProviderRegistryService);\n\n protected readonly isLoading$ = new BehaviorSubject<boolean>(true);\n protected readonly error$ = new BehaviorSubject<string | null>(null);\n\n async ngOnInit(): Promise<void> {\n const sessionReady = await this.ensureSessionReady();\n if (!sessionReady) {\n return;\n }\n\n await this.completeCallback();\n }\n\n /** Wait for app init + persisted session (user, tenant, app, permissions) before OAuth completion. */\n private async ensureSessionReady(): Promise<boolean> {\n let authorized = await firstValueFrom(\n this.sessionService.isAuthorizedWithLoading$,\n );\n if (!authorized) {\n await this.sessionService.restoreSession();\n authorized = await firstValueFrom(\n this.sessionService.isAuthorizedWithLoading$,\n );\n }\n\n if (!authorized) {\n this.isLoading$.next(false);\n this.error$.next(\n 'Session is not ready. Please sign in again and retry the connection.',\n );\n return false;\n }\n\n return true;\n }\n\n private async completeCallback(): Promise<void> {\n const providerId = this.route.snapshot.paramMap.get('providerId') ?? '';\n const state = this.route.snapshot.queryParamMap.get('state') ?? '';\n const code = this.route.snapshot.queryParamMap.get('code') ?? '';\n const oauthError = this.route.snapshot.queryParamMap.get('error') ?? '';\n\n if (oauthError) {\n this.isLoading$.next(false);\n this.error$.next(oauthError);\n return;\n }\n\n if (!providerId || !state || !code) {\n this.isLoading$.next(false);\n this.error$.next('Missing OAuth callback parameters.');\n return;\n }\n\n const provider = await this.providerRegistry.get(providerId);\n const commandKey = provider?.completeOAuthCommandKey;\n if (!commandKey) {\n this.isLoading$.next(false);\n this.error$.next(`OAuth callback is not configured for provider '${providerId}'.`);\n return;\n }\n\n try {\n const result = await this.commandService.execute(commandKey, { state, code });\n\n if (!result?.success) {\n this.error$.next(\n commandMessageTextForError(result?.message?.text) ||\n 'OAuth callback failed.',\n );\n return;\n }\n\n await this.goToIntegrations();\n } catch (error: unknown) {\n const message =\n error instanceof Error ? error.message : 'OAuth callback failed.';\n this.error$.next(message);\n } finally {\n this.isLoading$.next(false);\n }\n }\n\n protected async goToIntegrations(): Promise<void> {\n // Prefer session app slug — callback URLs are often app-agnostic or legacy `/demo/...`.\n const appName = resolveAppRouteName(\n this.sessionService.application?.name,\n this.route.snapshot.paramMap.get('appName'),\n );\n if (!appName) {\n this.error$.next('Unable to determine the current application after authorization.');\n return;\n }\n await this.router.navigateByUrl(buildTenantIntegrationsPagePath(appName));\n }\n}\n\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;;;;;;;;MA8Da,wCAAwC,CAAA;AAzCrD,IAAA,WAAA,GAAA;AA0CmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,qCAAqC,CAAC;AAE9D,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC;AAC/C,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe,CAAgB,IAAI,CAAC;AA6FrE,IAAA;AA3FC,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE;QACpD,IAAI,CAAC,YAAY,EAAE;YACjB;QACF;AAEA,QAAA,MAAM,IAAI,CAAC,gBAAgB,EAAE;IAC/B;;AAGQ,IAAA,MAAM,kBAAkB,GAAA;QAC9B,IAAI,UAAU,GAAG,MAAM,cAAc,CACnC,IAAI,CAAC,cAAc,CAAC,wBAAwB,CAC7C;QACD,IAAI,CAAC,UAAU,EAAE;AACf,YAAA,MAAM,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE;YA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AC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAmCf,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAzCpD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,mBAAmB;wBACnB,wBAAwB;AACzB,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-display.service-CP818xou.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-display.service.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPIntegrationDomainRegistryService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPIntegrationReference } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from '@acorex-platform/module-integration-management-client/contracts';\nimport type { AXMIntegrationManagementIntegrationConnectionEntityModel } from '@acorex-platform/module-integration-management-client/contracts';\nimport { Injectable, inject } from '@angular/core';\nimport { isPlainObject, isString, trim } from 'lodash';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMIntegrationRefDisplay {\n providerId: string;\n displayName: string;\n logoKey?: string;\n icon?: string;\n}\n\n//#endregion\n\n//#region ----- Service -----\n\n/**\n * Resolves provider logo/icon for an entity `integrationRef`\n * via `source` (provider id) or `connectionId` → IntegrationConnection.providerId.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMIntegrationRefDisplayService {\n //#region ----- Services & Dependencies -----\n\n private readonly domainRegistry = inject(AXPIntegrationDomainRegistryService);\n private readonly entityService = inject(AXPEntityService);\n\n //#endregion\n\n //#region ----- State -----\n\n private readonly connectionProviderCache = new Map<string, string | null>();\n private readonly connectionCache = new Map<\n string,\n AXMIntegrationManagementIntegrationConnectionEntityModel | null\n >();\n private readonly displayCache = new Map<string, AXMIntegrationRefDisplay | null>();\n\n //#endregion\n\n //#region ----- Public API -----\n\n parseIntegrationRef(value: unknown): AXPIntegrationReference | null {\n return this.asIntegrationRef(value);\n }\n\n async resolve(value: unknown): Promise<AXMIntegrationRefDisplay | null> {\n const ref = this.asIntegrationRef(value);\n if (!ref) {\n return null;\n }\n\n const providerId = await this.resolveProviderId(ref);\n if (!providerId) {\n return null;\n }\n\n const cached = this.displayCache.get(providerId);\n if (cached !== undefined) {\n return cached;\n }\n\n const provider = await this.domainRegistry.getProvider(providerId);\n if (!provider) {\n this.displayCache.set(providerId, null);\n return null;\n }\n\n const display: AXMIntegrationRefDisplay = {\n providerId: provider.id,\n displayName: provider.displayName,\n logoKey: provider.logoKey,\n icon: provider.icon,\n };\n this.displayCache.set(providerId, display);\n return display;\n }\n\n async getConnectionById(\n connectionId: string,\n ): Promise<AXMIntegrationManagementIntegrationConnectionEntityModel | null> {\n const id = trim(connectionId);\n if (!id) {\n return null;\n }\n\n const cached = this.connectionCache.get(id);\n if (cached !== undefined) {\n return cached;\n }\n\n try {\n const connection = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.integrationConnection.name)\n .data<string, AXMIntegrationManagementIntegrationConnectionEntityModel>()\n .byKey(id);\n const resolved = connection ?? null;\n this.connectionCache.set(id, resolved);\n if (resolved?.providerId) {\n this.connectionProviderCache.set(id, trim(resolved.providerId) || null);\n }\n return resolved;\n } catch {\n this.connectionCache.set(id, null);\n return null;\n }\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private asIntegrationRef(value: unknown): AXPIntegrationReference | null {\n if (!isPlainObject(value)) {\n return null;\n }\n const record = value as Record<string, unknown>;\n const source = isString(record['source']) ? trim(record['source']) : '';\n const connectionId = isString(record['connectionId']) ? trim(record['connectionId']) : '';\n if (!source && !connectionId) {\n return null;\n }\n return record as unknown as AXPIntegrationReference;\n }\n\n private async resolveProviderId(ref: AXPIntegrationReference): Promise<string | null> {\n const source = trim(ref.source ?? '');\n if (source) {\n return source;\n }\n\n const connectionId = trim(ref.connectionId ?? '');\n if (!connectionId) {\n return null;\n }\n\n const cached = this.connectionProviderCache.get(connectionId);\n if (cached !== undefined) {\n return cached;\n }\n\n const connection = await this.getConnectionById(connectionId);\n const providerId = connection?.providerId ? trim(connection.providerId) : '';\n const resolved = providerId || null;\n this.connectionProviderCache.set(connectionId, resolved);\n return resolved;\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAqBA;AAEA;AAEA;;;AAGG;MAEU,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mCAAmC,CAAC;AAC5D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;;;AAMxC,QAAA,IAAA,CAAA,uBAAuB,GAAG,IAAI,GAAG,EAAyB;AAC1D,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,GAAG,EAGvC;AACc,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,GAAG,EAA2C;AAiHnF,IAAA;;;AA3GC,IAAA,mBAAmB,CAAC,KAAc,EAAA;AAChC,QAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACrC;IAEA,MAAM,OAAO,CAAC,KAAc,EAAA;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;QACxC,IAAI,CAAC,GAAG,EAAE;AACR,YAAA,OAAO,IAAI;QACb;QAEA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;QACpD,IAAI,CAAC,UAAU,EAAE;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AI,CAAC,uBAAuB,CAAC,GAAG,CAAC,YAAY,CAAC;AAC7D,QAAA,IAAI,MAAM,KAAK,SAAS,EAAE;AACxB,YAAA,OAAO,MAAM;QACf;QAEA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC;AAC7D,QAAA,MAAM,UAAU,GAAG,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE;AAC5E,QAAA,MAAM,QAAQ,GAAG,UAAU,IAAI,IAAI;QACnC,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC;AACxD,QAAA,OAAO,QAAQ;IACjB;8GA7HW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-display.service-CP818xou.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-display.service.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPIntegrationDomainRegistryService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPIntegrationReference } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from '@acorex-platform/module-integration-management-client/contracts';\nimport type { AXMIntegrationManagementIntegrationConnectionEntityModel } from '@acorex-platform/module-integration-management-client/contracts';\nimport { Injectable, inject } from '@angular/core';\nimport { isPlainObject, isString, trim } from 'lodash';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMIntegrationRefDisplay {\n providerId: string;\n displayName: string;\n logoKey?: string;\n icon?: string;\n}\n\n//#endregion\n\n//#region ----- Service -----\n\n/**\n * Resolves provider logo/icon for an entity `integrationRef`\n * via `source` (provider id) or `connectionId` → IntegrationConnection.providerId.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMIntegrationRefDisplayService {\n //#region ----- Services & Dependencies -----\n\n private readonly domainRegistry = inject(AXPIntegrationDomainRegistryService);\n private readonly entityService = inject(AXPEntityService);\n\n //#endregion\n\n //#region ----- State -----\n\n private readonly connectionProviderCache = new Map<string, string | null>();\n private readonly connectionCache = new Map<\n string,\n AXMIntegrationManagementIntegrationConnectionEntityModel | null\n >();\n private readonly displayCache = new Map<string, AXMIntegrationRefDisplay | null>();\n\n //#endregion\n\n //#region ----- Public API -----\n\n parseIntegrationRef(value: unknown): AXPIntegrationReference | null {\n return this.asIntegrationRef(value);\n }\n\n async resolve(value: unknown): Promise<AXMIntegrationRefDisplay | null> {\n const ref = this.asIntegrationRef(value);\n if (!ref) {\n return null;\n }\n\n const providerId = await this.resolveProviderId(ref);\n if (!providerId) {\n return null;\n }\n\n const cached = this.displayCache.get(providerId);\n if (cached !== undefined) {\n return cached;\n }\n\n const provider = await this.domainRegistry.getProvider(providerId);\n if (!provider) {\n this.displayCache.set(providerId, null);\n return null;\n }\n\n const display: AXMIntegrationRefDisplay = {\n providerId: provider.id,\n displayName: provider.displayName,\n logoKey: provider.logoKey,\n icon: provider.icon,\n };\n this.displayCache.set(providerId, display);\n return display;\n }\n\n async getConnectionById(\n connectionId: string,\n ): Promise<AXMIntegrationManagementIntegrationConnectionEntityModel | null> {\n const id = trim(connectionId);\n if (!id) {\n return null;\n }\n\n const cached = this.connectionCache.get(id);\n if (cached !== undefined) {\n return cached;\n }\n\n try {\n const connection = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.integrationConnection.name)\n .data<string, AXMIntegrationManagementIntegrationConnectionEntityModel>()\n .byKey(id);\n const resolved = connection ?? null;\n this.connectionCache.set(id, resolved);\n if (resolved?.providerId) {\n this.connectionProviderCache.set(id, trim(resolved.providerId) || null);\n }\n return resolved;\n } catch {\n this.connectionCache.set(id, null);\n return null;\n }\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private asIntegrationRef(value: unknown): AXPIntegrationReference | null {\n if (!isPlainObject(value)) {\n return null;\n }\n const record = value as Record<string, unknown>;\n const source = isString(record['source']) ? trim(record['source']) : '';\n const connectionId = isString(record['connectionId']) ? trim(record['connectionId']) : '';\n if (!source && !connectionId) {\n return null;\n }\n return record as unknown as AXPIntegrationReference;\n }\n\n private async resolveProviderId(ref: AXPIntegrationReference): Promise<string | null> {\n const source = trim(ref.source ?? '');\n if (source) {\n return source;\n }\n\n const connectionId = trim(ref.connectionId ?? '');\n if (!connectionId) {\n return null;\n }\n\n const cached = this.connectionProviderCache.get(connectionId);\n if (cached !== undefined) {\n return cached;\n }\n\n const connection = await this.getConnectionById(connectionId);\n const providerId = connection?.providerId ? trim(connection.providerId) : '';\n const resolved = providerId || null;\n this.connectionProviderCache.set(connectionId, resolved);\n return resolved;\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAqBA;AAEA;AAEA;;;AAGG;MAEU,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mCAAmC,CAAC;AAC5D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;;;AAMxC,QAAA,IAAA,CAAA,uBAAuB,GAAG,IAAI,GAAG,EAAyB;AAC1D,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,GAAG,EAGvC;AACc,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,GAAG,EAA2C;AAiHnF,IAAA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
  import { AXDataSource } from '@acorex/cdk/common';
2
2
  import * as i6 from '@acorex/components/decorators';
3
3
  import { AXDecoratorModule } from '@acorex/components/decorators';
4
- import * as i3 from '@acorex/components/select-box';
5
- import { AXSelectBoxModule } from '@acorex/components/select-box';
6
- import * as i3$1 from '@acorex/core/translation';
4
+ import { AXLookupComponent } from '@acorex/components/lookup';
5
+ import * as i3 from '@acorex/core/translation';
7
6
  import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
8
7
  import { AXPIntegrationDomainRegistryService } from '@acorex-platform/framework-client/common';
9
8
  import { AXPLogoComponent } from '@acorex-platform/framework-client/core';
@@ -26,8 +25,8 @@ class AXMIntegrationRefFilterWidgetEditComponent extends AXPValueWidgetComponent
26
25
  this.translateService = inject(AXTranslationService);
27
26
  //#endregion
28
27
  //#region ----- View Children -----
29
- this.selectBox = viewChild('selectBox', /* @ts-ignore */
30
- ...(ngDevMode ? [{ debugName: "selectBox" }] : /* istanbul ignore next */ []));
28
+ this.lookup = viewChild('lookup', /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "lookup" }] : /* istanbul ignore next */ []));
31
30
  //#endregion
32
31
  //#region ----- Computed Properties -----
33
32
  this.value = computed(() => this.getValue()?.value, /* @ts-ignore */
@@ -76,7 +75,7 @@ class AXMIntegrationRefFilterWidgetEditComponent extends AXPValueWidgetComponent
76
75
  }
77
76
  }
78
77
  focus() {
79
- this.selectBox()?.focus();
78
+ this.lookup()?.focus();
80
79
  }
81
80
  async loadProviderItems() {
82
81
  if (this.providerItemsCache) {
@@ -146,7 +145,7 @@ class AXMIntegrationRefFilterWidgetEditComponent extends AXPValueWidgetComponent
146
145
  return [];
147
146
  }
148
147
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationRefFilterWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
149
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMIntegrationRefFilterWidgetEditComponent, isStandalone: true, selector: "axm-integration-ref-filter-widget-edit", viewQueries: [{ propertyName: "selectBox", first: true, predicate: ["selectBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"flex w-full items-center\">\n <ax-select-box\n #selectBox\n class=\"w-full\"\n textField=\"title\"\n valueField=\"id\"\n [multiple]=\"true\"\n [placeholder]=\"\n ('@integration-management:widgets.integration-ref.filter.placeholder' | translate | async) ?? ''\n \"\n [dataSource]=\"dataSource\"\n [ngModel]=\"value()\"\n (onValueChanged)=\"handleValueChange($event)\"\n [itemTemplate]=\"itemTemplate\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n\n <ng-template #itemTemplate let-context>\n @let item = context.data ?? context;\n <div class=\"flex w-full items-center gap-2\">\n @if (item.logoKey) {\n <axp-logo [logoKey]=\"item.logoKey\" appearance=\"colored\" [size]=\"16\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (item.icon) {\n <i [class]=\"item.icon\" class=\"shrink-0 text-sm\"></i>\n }\n <span class=\"truncate\">{{ item.title }}</span>\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i6.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPLogoComponent, selector: "axp-logo", inputs: ["logoKey", "appearance", "size", "format"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
148
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMIntegrationRefFilterWidgetEditComponent, isStandalone: true, selector: "axm-integration-ref-filter-widget-edit", viewQueries: [{ propertyName: "lookup", first: true, predicate: ["lookup"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"flex w-full items-center\">\n <ax-lookup\n #lookup\n class=\"w-full\"\n mode=\"multi-select\"\n textField=\"title\"\n valueField=\"id\"\n [searchable]=\"false\"\n [placeholder]=\"\n ('@integration-management:widgets.integration-ref.filter.placeholder' | translate | async) ?? ''\n \"\n [dataSource]=\"dataSource\"\n [ngModel]=\"value()\"\n (onValueChanged)=\"handleValueChange($event)\"\n [itemTemplate]=\"itemTemplate\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-lookup>\n\n <ng-template #itemTemplate let-item>\n <div class=\"flex w-full items-center gap-2\">\n @if (item.logoKey) {\n <axp-logo [logoKey]=\"item.logoKey\" appearance=\"colored\" [size]=\"16\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (item.icon) {\n <i [class]=\"item.icon\" class=\"shrink-0 text-sm\"></i>\n }\n <span class=\"truncate\">{{ item.title }}</span>\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i6.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: AXLookupComponent, selector: "ax-lookup", inputs: ["name", "mode", "dataSource", "treeDataSource", "valueField", "textField", "disabledField", "columns", "treeParentField", "hasChildrenField", "searchable", "adaptivityEnabled", "caption", "alternate", "searchPlaceholder", "placeholder", "disabled", "readonly", "look", "itemHeight", "maxVisibleItems", "treeSelectionBehavior", "highlightSearch", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "value", "valueItems"], outputs: ["lookChange", "valueChange", "onValueChanged", "onSelectionChanged", "onFocus", "onBlur", "onItemClick", "onItemSelected", "onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPLogoComponent, selector: "axp-logo", inputs: ["logoKey", "appearance", "size", "format"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
150
149
  }
151
150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationRefFilterWidgetEditComponent, decorators: [{
152
151
  type: Component,
@@ -154,11 +153,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
154
153
  AsyncPipe,
155
154
  FormsModule,
156
155
  AXDecoratorModule,
157
- AXSelectBoxModule,
156
+ AXLookupComponent,
158
157
  AXTranslationModule,
159
158
  AXPLogoComponent,
160
- ], template: "<div class=\"flex w-full items-center\">\n <ax-select-box\n #selectBox\n class=\"w-full\"\n textField=\"title\"\n valueField=\"id\"\n [multiple]=\"true\"\n [placeholder]=\"\n ('@integration-management:widgets.integration-ref.filter.placeholder' | translate | async) ?? ''\n \"\n [dataSource]=\"dataSource\"\n [ngModel]=\"value()\"\n (onValueChanged)=\"handleValueChange($event)\"\n [itemTemplate]=\"itemTemplate\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-select-box>\n\n <ng-template #itemTemplate let-context>\n @let item = context.data ?? context;\n <div class=\"flex w-full items-center gap-2\">\n @if (item.logoKey) {\n <axp-logo [logoKey]=\"item.logoKey\" appearance=\"colored\" [size]=\"16\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (item.icon) {\n <i [class]=\"item.icon\" class=\"shrink-0 text-sm\"></i>\n }\n <span class=\"truncate\">{{ item.title }}</span>\n </div>\n </ng-template>\n</div>\n" }]
161
- }], propDecorators: { selectBox: [{ type: i0.ViewChild, args: ['selectBox', { isSignal: true }] }] } });
159
+ ], template: "<div class=\"flex w-full items-center\">\n <ax-lookup\n #lookup\n class=\"w-full\"\n mode=\"multi-select\"\n textField=\"title\"\n valueField=\"id\"\n [searchable]=\"false\"\n [placeholder]=\"\n ('@integration-management:widgets.integration-ref.filter.placeholder' | translate | async) ?? ''\n \"\n [dataSource]=\"dataSource\"\n [ngModel]=\"value()\"\n (onValueChanged)=\"handleValueChange($event)\"\n [itemTemplate]=\"itemTemplate\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-lookup>\n\n <ng-template #itemTemplate let-item>\n <div class=\"flex w-full items-center gap-2\">\n @if (item.logoKey) {\n <axp-logo [logoKey]=\"item.logoKey\" appearance=\"colored\" [size]=\"16\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (item.icon) {\n <i [class]=\"item.icon\" class=\"shrink-0 text-sm\"></i>\n }\n <span class=\"truncate\">{{ item.title }}</span>\n </div>\n </ng-template>\n</div>\n" }]
160
+ }], propDecorators: { lookup: [{ type: i0.ViewChild, args: ['lookup', { isSignal: true }] }] } });
162
161
 
163
162
  export { AXMIntegrationRefFilterWidgetEditComponent };
164
- //# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-DeED5cU5.mjs.map
163
+ //# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-zVURpFT4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-zVURpFT4.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-filter-widget-edit.component.ts","../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-filter-widget-edit.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXDataSource, AXValueChangedEvent } from '@acorex/cdk/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLookupComponent } from '@acorex/components/lookup';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPIntegrationDomainRegistryService } from '@acorex-platform/framework-client/common';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, viewChild } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isArray, isString } from 'lodash';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface IntegrationSourceFilterItem {\n id: string;\n title: string;\n logoKey?: string;\n icon?: string;\n}\n\ninterface IntegrationSourceFilterValue {\n value?: string | string[] | null;\n operation?: { type: string };\n displayText?: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-integration-ref-filter-widget-edit',\n templateUrl: './integration-ref-filter-widget-edit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AsyncPipe,\n FormsModule,\n AXDecoratorModule,\n AXLookupComponent,\n AXTranslationModule,\n AXPLogoComponent,\n ],\n})\nexport class AXMIntegrationRefFilterWidgetEditComponent extends AXPValueWidgetComponent<IntegrationSourceFilterValue | null> {\n //#region ----- Services & Dependencies -----\n\n private readonly domainRegistry = inject(AXPIntegrationDomainRegistryService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- View Children -----\n\n protected readonly lookup = viewChild<AXLookupComponent>('lookup');\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly value = computed(() => this.getValue()?.value);\n\n //#endregion\n\n //#region ----- Data Source -----\n\n protected readonly dataSource = new AXDataSource<IntegrationSourceFilterItem>({\n load: async () => {\n const items = await this.loadProviderItems();\n return { items, total: items.length };\n },\n byKey: async (id: unknown) => {\n const key = String(id ?? '');\n if (!key) {\n return { id: '', title: '' };\n }\n const items = await this.loadProviderItems();\n return items.find((item) => item.id === key) ?? { id: key, title: key };\n },\n pageSize: 100,\n key: 'id',\n });\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected handleValueChange(event: AXValueChangedEvent): void {\n if (!event.isUserInteraction) {\n return;\n }\n\n const selected = this.normalizeSelectedIds(event.value);\n if (selected.length === 0) {\n this.setValue(null);\n return;\n }\n\n const displayText = this.resolveDisplayTextSync(selected);\n this.setValue({\n value: selected.length === 1 ? selected[0] : selected,\n operation: { type: selected.length === 1 ? 'equal' : 'in' },\n displayText,\n });\n\n if (!displayText) {\n void this.enrichDisplayText(selected);\n }\n }\n\n focus(): void {\n this.lookup()?.focus();\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private providerItemsCache: IntegrationSourceFilterItem[] | null = null;\n\n private async loadProviderItems(): Promise<IntegrationSourceFilterItem[]> {\n if (this.providerItemsCache) {\n return this.providerItemsCache;\n }\n\n const providers = await this.domainRegistry.listProviders();\n const items: IntegrationSourceFilterItem[] = [];\n\n for (const provider of providers) {\n const title = provider.displayName?.startsWith('@')\n ? await this.translateService.translateAsync(provider.displayName)\n : provider.displayName;\n items.push({\n id: provider.id,\n title: title || provider.id,\n logoKey: provider.logoKey,\n icon: provider.icon,\n });\n }\n\n items.sort((a, b) => a.title.localeCompare(b.title));\n this.providerItemsCache = items;\n return items;\n }\n\n private resolveDisplayTextSync(selected: string[]): string {\n const cached = this.providerItemsCache;\n if (!cached) {\n return selected.join(', ');\n }\n return selected.map((id) => cached.find((item) => item.id === id)?.title ?? id).join(', ');\n }\n\n private async enrichDisplayText(selected: string[]): Promise<void> {\n const items = await this.loadProviderItems();\n const current = this.getValue();\n if (!current?.value) {\n return;\n }\n const titles = selected.map((id) => items.find((item) => item.id === id)?.title ?? id).join(', ');\n this.setValue({\n ...current,\n displayText: titles,\n });\n }\n\n private normalizeSelectedIds(raw: unknown): string[] {\n if (raw == null || raw === '') {\n return [];\n }\n if (isArray(raw)) {\n return raw\n .map((item) => {\n if (isString(item)) {\n return item.trim();\n }\n if (item && typeof item === 'object' && 'id' in item) {\n return String((item as { id: unknown }).id ?? '').trim();\n }\n return String(item ?? '').trim();\n })\n .filter((id) => id.length > 0);\n }\n if (isString(raw)) {\n const id = raw.trim();\n return id ? [id] : [];\n }\n if (raw && typeof raw === 'object' && 'id' in raw) {\n const id = String((raw as { id: unknown }).id ?? '').trim();\n return id ? [id] : [];\n }\n return [];\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"flex w-full items-center\">\n <ax-lookup\n #lookup\n class=\"w-full\"\n mode=\"multi-select\"\n textField=\"title\"\n valueField=\"id\"\n [searchable]=\"false\"\n [placeholder]=\"\n ('@integration-management:widgets.integration-ref.filter.placeholder' | translate | async) ?? ''\n \"\n [dataSource]=\"dataSource\"\n [ngModel]=\"value()\"\n (onValueChanged)=\"handleValueChange($event)\"\n [itemTemplate]=\"itemTemplate\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-lookup>\n\n <ng-template #itemTemplate let-item>\n <div class=\"flex w-full items-center gap-2\">\n @if (item.logoKey) {\n <axp-logo [logoKey]=\"item.logoKey\" appearance=\"colored\" [size]=\"16\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (item.icon) {\n <i [class]=\"item.icon\" class=\"shrink-0 text-sm\"></i>\n }\n <span class=\"truncate\">{{ item.title }}</span>\n </div>\n </ng-template>\n</div>\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;AAAA;AA+BA;AAEA;AAeM,MAAO,0CAA2C,SAAQ,uBAA4D,CAAA;AAb5H,IAAA,WAAA,GAAA;;;AAgBmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mCAAmC,CAAC;AAC5D,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;;;QAM7C,IAAA,CAAA,MAAM,GAAG,SAAS,CAAoB,QAAQ;mFAAC;;;QAM/C,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK;kFAAC;;;QAM9C,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,CAA8B;YAC5E,IAAI,EAAE,YAAW;AACf,gBAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE;gBAC5C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;YACvC,CAAC;AACD,YAAA,KAAK,EAAE,OAAO,EAAW,KAAI;gBAC3B,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;gBAC5B,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;gBAC9B;AACA,gBAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE;gBAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;Y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AiB;wBACjB,iBAAiB;wBACjB,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA,EAAA,QAAA,EAAA,ugCAAA,EAAA;oEAYwD,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-page.component-D9hdpnQq.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-page.component.ts","../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-page.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex-platform/framework-client/layout/views';\nimport { AXPRegionalSetting, type AXPIntegrationReference } from '@acorex-platform/framework-shared/core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport { isPlainObject, isString, trim } from 'lodash';\n\nimport {\n AXMIntegrationRefDisplay,\n AXMIntegrationRefDisplayService,\n} from './integration-ref-display.service';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface IntegrationRefPageView {\n provider: AXMIntegrationRefDisplay | null;\n connectionDisplayName: string;\n linkedAtLabel: string;\n resourceType: string;\n remoteId: string;\n}\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst I18N = '@integration-management:widgets.integration-ref.page';\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Readonly detail tab for entities linked via `integrationRef`.\n * Shows connection display name and linked-at timestamp.\n */\n@Component({\n selector: 'axm-integration-ref-page',\n templateUrl: './integration-ref-page.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AsyncPipe,\n AXBadgeModule,\n AXDecoratorModule,\n AXLoadingModule,\n AXTranslationModule,\n AXPLogoComponent,\n ],\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMIntegrationRefPageComponent,\n },\n ],\n host: { class: 'axm-integration-ref-page block w-full min-h-0' },\n})\nexport class AXMIntegrationRefPageComponent extends AXPPageLayoutBaseComponent {\n //#region ----- Inputs -----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n protected readonly i18n = I18N;\n private readonly displayService = inject(AXMIntegrationRefDisplayService);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly loading = signal(true);\n protected readonly view = signal<IntegrationRefPageView | null>(null);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly integrationRef = computed(() => {\n const raw = this.rootContext()?.['integrationRef'];\n return this.asIntegrationRef(raw);\n });\n\n protected readonly hasLink = computed(() => Boolean(this.integrationRef()));\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const ref = this.integrationRef();\n untracked(() => {\n void this.loadView(ref);\n });\n });\n }\n\n //#endregion\n\n //#region ----- Page metadata -----\n\n override async getPageTitle(): Promise<string> {\n return this.translateService.translateAsync(`${I18N}.title`);\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadView(ref: AXPIntegrationReference | null): Promise<void> {\n if (!ref) {\n this.view.set(null);\n this.loading.set(false);\n return;\n }\n\n this.loading.set(true);\n try {\n const connectionId = trim(ref.connectionId ?? '');\n const [provider, connection] = await Promise.all([\n this.displayService.resolve(ref),\n connectionId ? this.displayService.getConnectionById(connectionId) : Promise.resolve(null),\n ]);\n\n this.view.set({\n provider,\n connectionDisplayName: trim(connection?.displayName ?? '') || '---',\n linkedAtLabel: await this.formatLinkedAt(ref.linkedAt),\n resourceType: trim(ref.resourceType ?? ''),\n remoteId: trim(ref.remoteId ?? ''),\n });\n } finally {\n this.loading.set(false);\n }\n }\n\n private async formatLinkedAt(linkedAt: string | undefined): Promise<string> {\n const value = trim(linkedAt ?? '');\n if (!value) {\n return '---';\n }\n\n try {\n const dateFormat = await this.settingsService.get(AXPRegionalSetting.ShortDate);\n const timeFormat = await this.settingsService.get(AXPRegionalSetting.ShortTime);\n const format = `${dateFormat} ${timeFormat}`.trim();\n return this.formatService.format(new Date(value), 'datetime', { format });\n } catch {\n return '---';\n }\n }\n\n private asIntegrationRef(value: unknown): AXPIntegrationReference | null {\n if (!isPlainObject(value)) {\n return null;\n }\n const record = value as Record<string, unknown>;\n const source = isString(record['source']) ? trim(record['source']) : '';\n const connectionId = isString(record['connectionId']) ? trim(record['connectionId']) : '';\n if (!source && !connectionId) {\n return null;\n }\n return record as unknown as AXPIntegrationReference;\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"flex w-full flex-col gap-4 p-1\">\n <!-- ----- Loading indicator while connection details are fetched ----- -->\n @if (loading()) {\n <div class=\"flex justify-center py-10\">\n <ax-loading></ax-loading>\n </div>\n }\n <!-- ----- Empty state when the record is not linked ----- -->\n @else if (!hasLink()) {\n <section\n class=\"flex flex-col items-center justify-center gap-3 rounded-2xl border border-dashed border-surface bg-lighter-surface px-6 py-12 text-center\"\n >\n <div\n class=\"flex h-14 w-14 items-center justify-center rounded-full bg-surface text-2xl opacity-70\"\n >\n <i class=\"fa-light fa-plug\"></i>\n </div>\n <div class=\"font-medium\">{{ (i18n + '.empty.title' | translate | async) ?? '' }}</div>\n <div class=\"max-w-md text-sm opacity-70\">\n {{ (i18n + '.empty.description' | translate | async) ?? '' }}\n </div>\n </section>\n }\n <!-- ----- Readonly integration link summary card ----- -->\n @else if (view(); as details) {\n <section\n class=\"overflow-hidden rounded-2xl border border-surface bg-lighter-surface shadow-sm\"\n >\n <div\n class=\"flex flex-wrap items-start justify-between gap-4 border-b border-surface bg-gradient-to-br from-surface/40 to-transparent px-5 py-5\"\n >\n <div class=\"flex min-w-0 items-center gap-4\">\n <div\n class=\"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl border border-surface bg-lighter-surface shadow-sm\"\n >\n @if (details.provider?.logoKey) {\n <axp-logo\n [logoKey]=\"details.provider.logoKey\"\n appearance=\"colored\"\n [size]=\"32\"\n />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (details.provider?.icon) {\n <i [class]=\"details.provider.icon\" class=\"text-2xl\"></i>\n }\n <!-- ----- Generic plug icon when provider metadata is missing ----- -->\n @else {\n <i class=\"fa-light fa-plug text-2xl opacity-70\"></i>\n }\n </div>\n\n <div class=\"min-w-0\">\n <div class=\"text-sm opacity-70\">\n {{ (i18n + '.summary' | translate | async) ?? '' }}\n </div>\n <div class=\"mt-1 truncate text-lg font-semibold tracking-tight\">\n @if (details.provider?.displayName) {\n {{ details.provider.displayName | translate | async }}\n }\n <!-- ----- Fallback to connection name when provider title is unavailable ----- -->\n @else {\n {{ details.connectionDisplayName }}\n }\n </div>\n </div>\n </div>\n\n <ax-badge\n size=\"sm\"\n look=\"twotone\"\n color=\"success\"\n [text]=\"(i18n + '.badge.linked' | translate | async) ?? ''\"\n ></ax-badge>\n </div>\n\n <div class=\"grid gap-4 p-5 sm:grid-cols-2\">\n <div\n class=\"rounded-xl border border-surface/80 bg-surface/30 px-4 py-3\"\n >\n <div class=\"mb-1 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide opacity-60\">\n <i class=\"fa-light fa-link\"></i>\n <span>{{ (i18n + '.fields.connection' | translate | async) ?? '' }}</span>\n </div>\n <div class=\"text-sm font-medium\">{{ details.connectionDisplayName }}</div>\n </div>\n\n <div\n class=\"rounded-xl border border-surface/80 bg-surface/30 px-4 py-3\"\n >\n <div class=\"mb-1 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide opacity-60\">\n <i class=\"fa-light fa-calendar-clock\"></i>\n <span>{{ (i18n + '.fields.linked-at' | translate | async) ?? '' }}</span>\n </div>\n <div class=\"text-sm font-medium\" [dir]=\"'ltr'\">{{ details.linkedAtLabel }}</div>\n </div>\n\n <!--->\n <!-- ----- Optional remote resource metadata when present ----- -->\n @if (details.resourceType || details.remoteId) {\n <div\n class=\"rounded-xl border border-surface/80 bg-surface/30 px-4 py-3 sm:col-span-2\"\n >\n <div class=\"mb-1 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide opacity-60\">\n <i class=\"fa-light fa-database\"></i>\n <span>{{ (i18n + '.fields.remote-record' | translate | async) ?? '' }}</span>\n </div>\n <div class=\"flex flex-wrap items-center gap-2 text-sm font-medium\">\n @if (details.resourceType) {\n <span class=\"rounded-md bg-surface px-2 py-0.5 text-xs\">{{ details.resourceType }}</span>\n }\n @if (details.remoteId) {\n <span class=\"font-mono text-xs opacity-80\" [dir]=\"'ltr'\">{{ details.remoteId }}</span>\n }\n </div>\n </div>\n }\n </div>\n\n <div class=\"border-t border-surface px-5 py-3 text-xs opacity-60\">\n {{ (i18n + '.readonly-hint' | translate | async) ?? '' }}\n </div>\n </section>\n }\n</div>\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAAA;AA0CA;AAEA;AAEA,MAAM,IAAI,GAAG,sDAAsD;AAEnE;AAEA;AAEA;;;AAGG;AAqBG,MAAO,8BAA+B,SAAQ,0BAA0B,CAAA;;;AAmC5E,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAjCT,IAAA,CAAA,WAAW,GAAG,KAAK,CAA0B,EAAE;wFAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;;;QAM1B,IAAA,CAAA,IAAI,GAAG,IAAI;AACb,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,+BAA+B,CAAC;;;QAMtD,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,IAAI;oFAAC;QACtB,IAAA,CAAA,IAAI,GAAG,MAAM,CAAgC,IAAI;iF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0B,EAAA,eAAA,EAEnB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,SAAS;wBACT,aAAa;wBACb,iBAAiB;wBACjB,eAAe;wBACf,mBAAmB;wBACnB,gBAAgB;qBACjB,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,8BAAgC;AAC5C,yBAAA;AACF,qBAAA,EAAA,IAAA,EACK,EAAE,KAAK,EAAE,+CAA+C,EAAE,EAAA,QAAA,EAAA,utKAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-page.component-D9hdpnQq.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-page.component.ts","../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-page.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex-platform/framework-client/layout/views';\nimport { AXPRegionalSetting, type AXPIntegrationReference } from '@acorex-platform/framework-shared/core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport { isPlainObject, isString, trim } from 'lodash';\n\nimport {\n AXMIntegrationRefDisplay,\n AXMIntegrationRefDisplayService,\n} from './integration-ref-display.service';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface IntegrationRefPageView {\n provider: AXMIntegrationRefDisplay | null;\n connectionDisplayName: string;\n linkedAtLabel: string;\n resourceType: string;\n remoteId: string;\n}\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst I18N = '@integration-management:widgets.integration-ref.page';\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Readonly detail tab for entities linked via `integrationRef`.\n * Shows connection display name and linked-at timestamp.\n */\n@Component({\n selector: 'axm-integration-ref-page',\n templateUrl: './integration-ref-page.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AsyncPipe,\n AXBadgeModule,\n AXDecoratorModule,\n AXLoadingModule,\n AXTranslationModule,\n AXPLogoComponent,\n ],\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMIntegrationRefPageComponent,\n },\n ],\n host: { class: 'axm-integration-ref-page block w-full min-h-0' },\n})\nexport class AXMIntegrationRefPageComponent extends AXPPageLayoutBaseComponent {\n //#region ----- Inputs -----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n protected readonly i18n = I18N;\n private readonly displayService = inject(AXMIntegrationRefDisplayService);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly loading = signal(true);\n protected readonly view = signal<IntegrationRefPageView | null>(null);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly integrationRef = computed(() => {\n const raw = this.rootContext()?.['integrationRef'];\n return this.asIntegrationRef(raw);\n });\n\n protected readonly hasLink = computed(() => Boolean(this.integrationRef()));\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const ref = this.integrationRef();\n untracked(() => {\n void this.loadView(ref);\n });\n });\n }\n\n //#endregion\n\n //#region ----- Page metadata -----\n\n override async getPageTitle(): Promise<string> {\n return this.translateService.translateAsync(`${I18N}.title`);\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadView(ref: AXPIntegrationReference | null): Promise<void> {\n if (!ref) {\n this.view.set(null);\n this.loading.set(false);\n return;\n }\n\n this.loading.set(true);\n try {\n const connectionId = trim(ref.connectionId ?? '');\n const [provider, connection] = await Promise.all([\n this.displayService.resolve(ref),\n connectionId ? this.displayService.getConnectionById(connectionId) : Promise.resolve(null),\n ]);\n\n this.view.set({\n provider,\n connectionDisplayName: trim(connection?.displayName ?? '') || '---',\n linkedAtLabel: await this.formatLinkedAt(ref.linkedAt),\n resourceType: trim(ref.resourceType ?? ''),\n remoteId: trim(ref.remoteId ?? ''),\n });\n } finally {\n this.loading.set(false);\n }\n }\n\n private async formatLinkedAt(linkedAt: string | undefined): Promise<string> {\n const value = trim(linkedAt ?? '');\n if (!value) {\n return '---';\n }\n\n try {\n const dateFormat = await this.settingsService.get(AXPRegionalSetting.ShortDate);\n const timeFormat = await this.settingsService.get(AXPRegionalSetting.ShortTime);\n const format = `${dateFormat} ${timeFormat}`.trim();\n return this.formatService.format(new Date(value), 'datetime', { format });\n } catch {\n return '---';\n }\n }\n\n private asIntegrationRef(value: unknown): AXPIntegrationReference | null {\n if (!isPlainObject(value)) {\n return null;\n }\n const record = value as Record<string, unknown>;\n const source = isString(record['source']) ? trim(record['source']) : '';\n const connectionId = isString(record['connectionId']) ? trim(record['connectionId']) : '';\n if (!source && !connectionId) {\n return null;\n }\n return record as unknown as AXPIntegrationReference;\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"flex w-full flex-col gap-4 p-1\">\n <!-- ----- Loading indicator while connection details are fetched ----- -->\n @if (loading()) {\n <div class=\"flex justify-center py-10\">\n <ax-loading></ax-loading>\n </div>\n }\n <!-- ----- Empty state when the record is not linked ----- -->\n @else if (!hasLink()) {\n <section\n class=\"flex flex-col items-center justify-center gap-3 rounded-2xl border border-dashed border-surface bg-lighter-surface px-6 py-12 text-center\"\n >\n <div\n class=\"flex h-14 w-14 items-center justify-center rounded-full bg-surface text-2xl opacity-70\"\n >\n <i class=\"fa-light fa-plug\"></i>\n </div>\n <div class=\"font-medium\">{{ (i18n + '.empty.title' | translate | async) ?? '' }}</div>\n <div class=\"max-w-md text-sm opacity-70\">\n {{ (i18n + '.empty.description' | translate | async) ?? '' }}\n </div>\n </section>\n }\n <!-- ----- Readonly integration link summary card ----- -->\n @else if (view(); as details) {\n <section\n class=\"overflow-hidden rounded-2xl border border-surface bg-lighter-surface shadow-sm\"\n >\n <div\n class=\"flex flex-wrap items-start justify-between gap-4 border-b border-surface bg-gradient-to-br from-surface/40 to-transparent px-5 py-5\"\n >\n <div class=\"flex min-w-0 items-center gap-4\">\n <div\n class=\"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl border border-surface bg-lighter-surface shadow-sm\"\n >\n @if (details.provider?.logoKey) {\n <axp-logo\n [logoKey]=\"details.provider.logoKey\"\n appearance=\"colored\"\n [size]=\"32\"\n />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (details.provider?.icon) {\n <i [class]=\"details.provider.icon\" class=\"text-2xl\"></i>\n }\n <!-- ----- Generic plug icon when provider metadata is missing ----- -->\n @else {\n <i class=\"fa-light fa-plug text-2xl opacity-70\"></i>\n }\n </div>\n\n <div class=\"min-w-0\">\n <div class=\"text-sm opacity-70\">\n {{ (i18n + '.summary' | translate | async) ?? '' }}\n </div>\n <div class=\"mt-1 truncate text-lg font-semibold tracking-tight\">\n @if (details.provider?.displayName) {\n {{ details.provider.displayName | translate | async }}\n }\n <!-- ----- Fallback to connection name when provider title is unavailable ----- -->\n @else {\n {{ details.connectionDisplayName }}\n }\n </div>\n </div>\n </div>\n\n <ax-badge\n size=\"sm\"\n look=\"twotone\"\n color=\"success\"\n [text]=\"(i18n + '.badge.linked' | translate | async) ?? ''\"\n ></ax-badge>\n </div>\n\n <div class=\"grid gap-4 p-5 sm:grid-cols-2\">\n <div\n class=\"rounded-xl border border-surface/80 bg-surface/30 px-4 py-3\"\n >\n <div class=\"mb-1 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide opacity-60\">\n <i class=\"fa-light fa-link\"></i>\n <span>{{ (i18n + '.fields.connection' | translate | async) ?? '' }}</span>\n </div>\n <div class=\"text-sm font-medium\">{{ details.connectionDisplayName }}</div>\n </div>\n\n <div\n class=\"rounded-xl border border-surface/80 bg-surface/30 px-4 py-3\"\n >\n <div class=\"mb-1 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide opacity-60\">\n <i class=\"fa-light fa-calendar-clock\"></i>\n <span>{{ (i18n + '.fields.linked-at' | translate | async) ?? '' }}</span>\n </div>\n <div class=\"text-sm font-medium\" [dir]=\"'ltr'\">{{ details.linkedAtLabel }}</div>\n </div>\n\n <!--->\n <!-- ----- Optional remote resource metadata when present ----- -->\n @if (details.resourceType || details.remoteId) {\n <div\n class=\"rounded-xl border border-surface/80 bg-surface/30 px-4 py-3 sm:col-span-2\"\n >\n <div class=\"mb-1 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide opacity-60\">\n <i class=\"fa-light fa-database\"></i>\n <span>{{ (i18n + '.fields.remote-record' | translate | async) ?? '' }}</span>\n </div>\n <div class=\"flex flex-wrap items-center gap-2 text-sm font-medium\">\n @if (details.resourceType) {\n <span class=\"rounded-md bg-surface px-2 py-0.5 text-xs\">{{ details.resourceType }}</span>\n }\n @if (details.remoteId) {\n <span class=\"font-mono text-xs opacity-80\" [dir]=\"'ltr'\">{{ details.remoteId }}</span>\n }\n </div>\n </div>\n }\n </div>\n\n <div class=\"border-t border-surface px-5 py-3 text-xs opacity-60\">\n {{ (i18n + '.readonly-hint' | translate | async) ?? '' }}\n </div>\n </section>\n }\n</div>\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAAA;AA0CA;AAEA;AAEA,MAAM,IAAI,GAAG,sDAAsD;AAEnE;AAEA;AAEA;;;AAGG;AAqBG,MAAO,8BAA+B,SAAQ,0BAA0B,CAAA;;;AAmC5E,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAjCT,IAAA,CAAA,WAAW,GAAG,KAAK,CAA0B,EAAE;wFAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;;;QAM1B,IAAA,CAAA,IAAI,GAAG,IAAI;AACb,QAAA,IA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A,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAeA,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBApB1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,eAAA,EAEnB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,SAAS;wBACT,aAAa;wBACb,iBAAiB;wBACjB,eAAe;wBACf,mBAAmB;wBACnB,gBAAgB;qBACjB,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,8BAAgC;AAC5C,yBAAA;AACF,qBAAA,EAAA,IAAA,EACK,EAAE,KAAK,EAAE,+CAA+C,EAAE,EAAA,QAAA,EAAA,utKAAA,EAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-widget-column.component-CPLhmHOe.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-widget-column.component.ts","../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-widget-column.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPRegionalSetting } from '@acorex-platform/framework-shared/core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n effect,\n inject,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { trim } from 'lodash';\n\nimport {\n AXMIntegrationRefDisplay,\n AXMIntegrationRefDisplayService,\n} from './integration-ref-display.service';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface IntegrationRefCardState {\n connectionDisplayName: string;\n linkedAtLabel: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-integration-ref-widget-column',\n templateUrl: './integration-ref-widget-column.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AsyncPipe,\n AXLoadingModule,\n AXPopoverModule,\n AXTranslationModule,\n AXPLogoComponent,\n ],\n inputs: ['rawValue', 'rowData'],\n host: {\n class: 'inline-flex min-w-0 items-center',\n '(click)': 'onHostClick($event)',\n '(mousedown)': 'onHostClick($event)',\n '(dblclick)': 'onHostClick($event)',\n },\n})\nexport class AXMIntegrationRefWidgetColumnComponent extends AXPColumnWidgetComponent<unknown> {\n //#region ----- Services & Dependencies -----\n\n private readonly displayService = inject(AXMIntegrationRefDisplayService);\n private readonly formatService = inject(AXFormatService);\n private readonly settingsService = inject(AXPSettingsService);\n\n //#endregion\n\n //#region ----- View Children -----\n\n protected readonly trigger = viewChild<ElementRef<HTMLElement>>('infoTrigger');\n protected readonly infoPopover = viewChild<AXPopoverComponent>('infoPopover');\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly display = signal<AXMIntegrationRefDisplay | null>(null);\n protected readonly cardLoading = signal(false);\n protected readonly card = signal<IntegrationRefCardState | null>(null);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const value = this.rawValue;\n untracked(() => {\n void this.resolveDisplay(value);\n });\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n /** Keeps grid row navigation from firing when interacting with this cell. */\n protected onHostClick(event: Event): void {\n if (!this.display()) {\n return;\n }\n event.stopPropagation();\n event.preventDefault();\n }\n\n protected async onTriggerClick(event: Event): Promise<void> {\n event.stopPropagation();\n event.preventDefault();\n await this.openCard();\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async resolveDisplay(value: unknown): Promise<void> {\n this.display.set(await this.displayService.resolve(value));\n }\n\n private async openCard(): Promise<void> {\n const ref = this.displayService.parseIntegrationRef(this.rawValue);\n if (!ref) {\n return;\n }\n\n this.cardLoading.set(true);\n this.card.set(null);\n this.openPopover();\n\n try {\n const connectionId = trim(ref.connectionId ?? '');\n const connection = connectionId\n ? await this.displayService.getConnectionById(connectionId)\n : null;\n\n this.card.set({\n connectionDisplayName: trim(connection?.displayName ?? '') || '---',\n linkedAtLabel: await this.formatLinkedAt(ref.linkedAt),\n });\n } finally {\n this.cardLoading.set(false);\n }\n }\n\n private openPopover(): void {\n const popover = this.infoPopover();\n const trigger = this.trigger();\n if (!popover || !trigger) {\n return;\n }\n popover.target = trigger.nativeElement;\n popover.open();\n }\n\n private async formatLinkedAt(linkedAt: string | undefined): Promise<string> {\n const value = trim(linkedAt ?? '');\n if (!value) {\n return '---';\n }\n\n try {\n const dateFormat = await this.settingsService.get(AXPRegionalSetting.ShortDate);\n const timeFormat = await this.settingsService.get(AXPRegionalSetting.ShortTime);\n const format = `${dateFormat} ${timeFormat}`.trim();\n return this.formatService.format(new Date(value), 'datetime', { format });\n } catch {\n return '---';\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Provider logo/icon with display name label ----- -->\n@if (display(); as info) {\n <span\n #infoTrigger\n class=\"inline-flex min-w-0 cursor-pointer items-center gap-2 hover:opacity-80\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"info.displayName | translate | async\"\n (click)=\"onTriggerClick($event)\"\n (keydown.enter)=\"onTriggerClick($event)\"\n (keydown.space)=\"onTriggerClick($event)\"\n >\n @if (info.logoKey) {\n <axp-logo [logoKey]=\"info.logoKey\" appearance=\"colored\" [size]=\"20\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (info.icon) {\n <i [class]=\"info.icon\" class=\"shrink-0 text-base\"></i>\n }\n <span class=\"truncate text-sm\">{{ info.displayName | translate | async }}</span>\n </span>\n}\n\n<!-- ----- Connection details card opened on click ----- -->\n<ax-popover [openOn]=\"'manual'\" #infoPopover [adaptivityEnabled]=\"true\">\n <div class=\"lightest-surface min-w-[280px] rounded-lg border p-3 shadow-lg\">\n <div class=\"mb-3 border-b pb-2\">\n <h3 class=\"text-sm font-semibold\">\n {{ '@integration-management:widgets.integration-ref.card.title' | translate | async }}\n </h3>\n </div>\n\n @if (cardLoading()) {\n <!-- ----- Loading while connection is fetched ----- -->\n <div class=\"flex justify-center py-3\">\n <ax-loading></ax-loading>\n </div>\n }\n <!-- ----- Connection name + linked-at once loaded ----- -->\n @else if (card(); as details) {\n <div class=\"space-y-2.5\">\n <div>\n <div class=\"mb-1 text-xs font-semibold\">\n {{\n '@integration-management:widgets.integration-ref.card.connection' | translate | async\n }}\n </div>\n <div class=\"text-xs\">{{ details.connectionDisplayName }}</div>\n </div>\n <div>\n <div class=\"mb-1 text-xs font-semibold\">\n {{\n '@integration-management:widgets.integration-ref.card.linked-at' | translate | async\n }}\n </div>\n <div class=\"text-xs\" [dir]=\"'ltr'\">{{ details.linkedAtLabel }}</div>\n </div>\n </div>\n }\n </div>\n</ax-popover>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAqCA;AAEA;AAqBM,MAAO,sCAAuC,SAAQ,wBAAiC,CAAA;;;AA0B3F,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AAxBQ,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,+BAA+B,CAAC;AACxD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;;;QAM1C,IAAA,CAAA,OAAO,GAAG,SAAS,CAA0B,aAAa;oFAAC;QAC3D,IAAA,CAAA,WAAW,GAAG,SAAS,CAAqB,aAAa;wFAAC;;;QAM1D,IAAA,CAAA,OAAO,GAAG,MAAM,CAAkC,IAAI;oFAAC;QACvD,IAAA,C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AA,YAAY,EAAE,qBAAqB;AACpC,qBAAA,EAAA,QAAA,EAAA,+uEAAA,EAAA;AAa+D,SAAA,CAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,aAAa,qEACd,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-widget-column.component-CPLhmHOe.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-widget-column.component.ts","../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-widget-column.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPRegionalSetting } from '@acorex-platform/framework-shared/core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n effect,\n inject,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { trim } from 'lodash';\n\nimport {\n AXMIntegrationRefDisplay,\n AXMIntegrationRefDisplayService,\n} from './integration-ref-display.service';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface IntegrationRefCardState {\n connectionDisplayName: string;\n linkedAtLabel: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-integration-ref-widget-column',\n templateUrl: './integration-ref-widget-column.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AsyncPipe,\n AXLoadingModule,\n AXPopoverModule,\n AXTranslationModule,\n AXPLogoComponent,\n ],\n inputs: ['rawValue', 'rowData'],\n host: {\n class: 'inline-flex min-w-0 items-center',\n '(click)': 'onHostClick($event)',\n '(mousedown)': 'onHostClick($event)',\n '(dblclick)': 'onHostClick($event)',\n },\n})\nexport class AXMIntegrationRefWidgetColumnComponent extends AXPColumnWidgetComponent<unknown> {\n //#region ----- Services & Dependencies -----\n\n private readonly displayService = inject(AXMIntegrationRefDisplayService);\n private readonly formatService = inject(AXFormatService);\n private readonly settingsService = inject(AXPSettingsService);\n\n //#endregion\n\n //#region ----- View Children -----\n\n protected readonly trigger = viewChild<ElementRef<HTMLElement>>('infoTrigger');\n protected readonly infoPopover = viewChild<AXPopoverComponent>('infoPopover');\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly display = signal<AXMIntegrationRefDisplay | null>(null);\n protected readonly cardLoading = signal(false);\n protected readonly card = signal<IntegrationRefCardState | null>(null);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const value = this.rawValue;\n untracked(() => {\n void this.resolveDisplay(value);\n });\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n /** Keeps grid row navigation from firing when interacting with this cell. */\n protected onHostClick(event: Event): void {\n if (!this.display()) {\n return;\n }\n event.stopPropagation();\n event.preventDefault();\n }\n\n protected async onTriggerClick(event: Event): Promise<void> {\n event.stopPropagation();\n event.preventDefault();\n await this.openCard();\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async resolveDisplay(value: unknown): Promise<void> {\n this.display.set(await this.displayService.resolve(value));\n }\n\n private async openCard(): Promise<void> {\n const ref = this.displayService.parseIntegrationRef(this.rawValue);\n if (!ref) {\n return;\n }\n\n this.cardLoading.set(true);\n this.card.set(null);\n this.openPopover();\n\n try {\n const connectionId = trim(ref.connectionId ?? '');\n const connection = connectionId\n ? await this.displayService.getConnectionById(connectionId)\n : null;\n\n this.card.set({\n connectionDisplayName: trim(connection?.displayName ?? '') || '---',\n linkedAtLabel: await this.formatLinkedAt(ref.linkedAt),\n });\n } finally {\n this.cardLoading.set(false);\n }\n }\n\n private openPopover(): void {\n const popover = this.infoPopover();\n const trigger = this.trigger();\n if (!popover || !trigger) {\n return;\n }\n popover.target = trigger.nativeElement;\n popover.open();\n }\n\n private async formatLinkedAt(linkedAt: string | undefined): Promise<string> {\n const value = trim(linkedAt ?? '');\n if (!value) {\n return '---';\n }\n\n try {\n const dateFormat = await this.settingsService.get(AXPRegionalSetting.ShortDate);\n const timeFormat = await this.settingsService.get(AXPRegionalSetting.ShortTime);\n const format = `${dateFormat} ${timeFormat}`.trim();\n return this.formatService.format(new Date(value), 'datetime', { format });\n } catch {\n return '---';\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Provider logo/icon with display name label ----- -->\n@if (display(); as info) {\n <span\n #infoTrigger\n class=\"inline-flex min-w-0 cursor-pointer items-center gap-2 hover:opacity-80\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"info.displayName | translate | async\"\n (click)=\"onTriggerClick($event)\"\n (keydown.enter)=\"onTriggerClick($event)\"\n (keydown.space)=\"onTriggerClick($event)\"\n >\n @if (info.logoKey) {\n <axp-logo [logoKey]=\"info.logoKey\" appearance=\"colored\" [size]=\"20\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (info.icon) {\n <i [class]=\"info.icon\" class=\"shrink-0 text-base\"></i>\n }\n <span class=\"truncate text-sm\">{{ info.displayName | translate | async }}</span>\n </span>\n}\n\n<!-- ----- Connection details card opened on click ----- -->\n<ax-popover [openOn]=\"'manual'\" #infoPopover [adaptivityEnabled]=\"true\">\n <div class=\"lightest-surface min-w-[280px] rounded-lg border p-3 shadow-lg\">\n <div class=\"mb-3 border-b pb-2\">\n <h3 class=\"text-sm font-semibold\">\n {{ '@integration-management:widgets.integration-ref.card.title' | translate | async }}\n </h3>\n </div>\n\n @if (cardLoading()) {\n <!-- ----- Loading while connection is fetched ----- -->\n <div class=\"flex justify-center py-3\">\n <ax-loading></ax-loading>\n </div>\n }\n <!-- ----- Connection name + linked-at once loaded ----- -->\n @else if (card(); as details) {\n <div class=\"space-y-2.5\">\n <div>\n <div class=\"mb-1 text-xs font-semibold\">\n {{\n '@integration-management:widgets.integration-ref.card.connection' | translate | async\n }}\n </div>\n <div class=\"text-xs\">{{ details.connectionDisplayName }}</div>\n </div>\n <div>\n <div class=\"mb-1 text-xs font-semibold\">\n {{\n '@integration-management:widgets.integration-ref.card.linked-at' | translate | async\n }}\n </div>\n <div class=\"text-xs\" [dir]=\"'ltr'\">{{ details.linkedAtLabel }}</div>\n </div>\n </div>\n }\n </div>\n</ax-popover>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAqCA;AAEA;AAqBM,MAAO,sCAAuC,SAAQ,wBAAiC,CAAA;;;AA0B3F,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AAxBQ,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,+BAA+B,CAAC;AACxD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;;;QAM1C,IAAA,CAAA,OAAO,GAAG,SAAS,CAA0B,aAAa;oFAAC;QAC3D,IAAA,CAAA,WAAW,GAAG,SAAS,CAAqB,aAAa;wFAAC;;;QAM1D,IAAA,CAAA,OAAO,GAAG,MAAM,CAAkC,IAAI;oFAAC;QACvD,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK;wFAAC;QAC3B,IAAA,CAAA,IAAI,GAAG,MAAM,CAAiC,IAAI;iFAAC;QAQpE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ;YAC3B,SAAS,CAAC,MAAK;AACb,gBAAA,KA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A,CAAA,aAAa,qEACd,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-widget-view.component-BRpGpWHZ.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-widget-view.component.ts","../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-widget-view.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n signal,\n untracked,\n} from '@angular/core';\n\nimport {\n AXMIntegrationRefDisplay,\n AXMIntegrationRefDisplayService,\n} from './integration-ref-display.service';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-integration-ref-widget-view',\n templateUrl: './integration-ref-widget-view.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, AXDecoratorModule, AXTranslationModule, AXPLogoComponent],\n})\nexport class AXMIntegrationRefWidgetViewComponent extends AXPValueWidgetComponent<unknown> {\n //#region ----- Services & Dependencies -----\n\n private readonly displayService = inject(AXMIntegrationRefDisplayService);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly display = signal<AXMIntegrationRefDisplay | null>(null);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const value = this.getValue();\n untracked(() => {\n void this.resolveDisplay(value);\n });\n });\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async resolveDisplay(value: unknown): Promise<void> {\n this.display.set(await this.displayService.resolve(value));\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Provider identity for integrationRef field (view / detail) ----- -->\n@if (display(); as info) {\n <div class=\"inline-flex items-center gap-2\">\n @if (info.logoKey) {\n <axp-logo [logoKey]=\"info.logoKey\" appearance=\"colored\" [size]=\"24\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (info.icon) {\n <i [class]=\"info.icon\" class=\"text-lg\"></i>\n }\n <span class=\"text-sm\">{{ info.displayName | translate | async }}</span>\n </div>\n}\n<!-- ----- Empty when record is not linked to an integration ----- -->\n@else {\n <span class=\"text-muted\">---</span>\n}\n"],"names":["i1"],"mappings":";;;;;;;;;;AAAA;AAqBA;AAEA;AAQM,MAAO,oCAAqC,SAAQ,uBAAgC,CAAA;;;AAexF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AAbQ,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,+BAA+B,CAAC;;;QAMtD,IAAA,CAAA,OAAO,GAAG,MAAM,CAAkC,IAAI;oFAAC;QAQxE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;YAC7B,SAAS,CAAC,MAAK;AACb,gBAAA,KAAK,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;AACjC,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC,CAAC;IACJ;;;IAMQ,MAAM,cAAc,CAAC,KAAc,EAAA;AACzC,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5D;8GA/BW,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApC,oCAAoC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC/BjD,ipBAiBA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDYuB,iBAAiB,8BAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAnE,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAER,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBANhD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iCAAiC,EAAA,eAAA,EAE1B,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,SAAS,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,ipBAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-widget-view.component-BRpGpWHZ.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-widget-view.component.ts","../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-widget-view.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n effect,\n inject,\n signal,\n untracked,\n} from '@angular/core';\n\nimport {\n AXMIntegrationRefDisplay,\n AXMIntegrationRefDisplayService,\n} from './integration-ref-display.service';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-integration-ref-widget-view',\n templateUrl: './integration-ref-widget-view.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, AXDecoratorModule, AXTranslationModule, AXPLogoComponent],\n})\nexport class AXMIntegrationRefWidgetViewComponent extends AXPValueWidgetComponent<unknown> {\n //#region ----- Services & Dependencies -----\n\n private readonly displayService = inject(AXMIntegrationRefDisplayService);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly display = signal<AXMIntegrationRefDisplay | null>(null);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const value = this.getValue();\n untracked(() => {\n void this.resolveDisplay(value);\n });\n });\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async resolveDisplay(value: unknown): Promise<void> {\n this.display.set(await this.displayService.resolve(value));\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Provider identity for integrationRef field (view / detail) ----- -->\n@if (display(); as info) {\n <div class=\"inline-flex items-center gap-2\">\n @if (info.logoKey) {\n <axp-logo [logoKey]=\"info.logoKey\" appearance=\"colored\" [size]=\"24\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (info.icon) {\n <i [class]=\"info.icon\" class=\"text-lg\"></i>\n }\n <span class=\"text-sm\">{{ info.displayName | translate | async }}</span>\n </div>\n}\n<!-- ----- Empty when record is not linked to an integration ----- -->\n@else {\n <span class=\"text-muted\">---</span>\n}\n"],"names":["i1"],"mappings":";;;;;;;;;;AAAA;AAqBA;AAEA;AAQM,MAAO,oCAAqC,SAAQ,uBAAgC,CAAA;;;AAexF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AAbQ,QAAA,IAAA,CAAA,cAAc,GAAG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