@acorex-platform/module-integration-management-client 2.0.0-next.6 → 2.0.0-next.61
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.
- package/fesm2022/{acorex-platform-module-integration-management-client-connect-with-credentials.command-DO_zqjHV.mjs → acorex-platform-module-integration-management-client-connect-with-credentials.command-i8HJe3MA.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-connect-with-credentials.command-DO_zqjHV.mjs.map → acorex-platform-module-integration-management-client-connect-with-credentials.command-i8HJe3MA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-acorex-platform-module-integration-management-client-contracts-entity-catalog-k3HR1biJ.mjs → acorex-platform-module-integration-management-client-contracts-entity-catalog-acorex-platform-module-integration-management-client-contracts-entity-catalog-uUrGq-Wk.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-acorex-platform-module-integration-management-client-contracts-entity-catalog-k3HR1biJ.mjs.map → acorex-platform-module-integration-management-client-contracts-entity-catalog-acorex-platform-module-integration-management-client-contracts-entity-catalog-uUrGq-Wk.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-application.entity-DhOHTht5.mjs → acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-application.entity-BVOP8fyI.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-application.entity-DhOHTht5.mjs.map → acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-application.entity-BVOP8fyI.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-connection.entity-BAM1TCdS.mjs → acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-connection.entity-FkDRq6vX.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-connection.entity-BAM1TCdS.mjs.map → acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-connection.entity-FkDRq6vX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-oauth-state.entity-CHsVwNda.mjs → acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-oauth-state.entity-ra2IuHDf.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-oauth-state.entity-CHsVwNda.mjs.map → acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-oauth-state.entity-ra2IuHDf.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-remote-record.entity-D9oTVEHF.mjs → acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-remote-record.entity-BgVz3A-n.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-remote-record.entity-D9oTVEHF.mjs.map → acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-remote-record.entity-BgVz3A-n.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-integration-management-client-contracts.mjs +5 -1
- package/fesm2022/acorex-platform-module-integration-management-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-delete-connection.command-CCMZwP4W.mjs → acorex-platform-module-integration-management-client-delete-connection.command-DXxr1N1S.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-delete-connection.command-CCMZwP4W.mjs.map → acorex-platform-module-integration-management-client-delete-connection.command-DXxr1N1S.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-disconnect-connection.command-DpVoXBdW.mjs → acorex-platform-module-integration-management-client-disconnect-connection.command-DwgAYZvz.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-disconnect-connection.command-DpVoXBdW.mjs.map → acorex-platform-module-integration-management-client-disconnect-connection.command-DwgAYZvz.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-get-provider.query-Ds10RwnU.mjs → acorex-platform-module-integration-management-client-get-provider.query-C6OAU1vi.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-get-provider.query-Ds10RwnU.mjs.map → acorex-platform-module-integration-management-client-get-provider.query-C6OAU1vi.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DRWR9ysx.mjs → acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DjSMX8af.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DRWR9ysx.mjs.map → acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DjSMX8af.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CY0tOlNi.mjs → acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-iBh2QP2t.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-CY0tOlNi.mjs.map → acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-iBh2QP2t.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-display.service-CP818xou.mjs → acorex-platform-module-integration-management-client-integration-ref-display.service-BMhSRuGH.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-display.service-CP818xou.mjs.map → acorex-platform-module-integration-management-client-integration-ref-display.service-BMhSRuGH.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-zVURpFT4.mjs → acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-Dy9tVipC.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-zVURpFT4.mjs.map → acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-Dy9tVipC.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-page.component-C131H4e1.mjs → acorex-platform-module-integration-management-client-integration-ref-page.component-BwvqmRou.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-page.component-C131H4e1.mjs.map → acorex-platform-module-integration-management-client-integration-ref-page.component-BwvqmRou.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-widget-column.component-ClPcvcUW.mjs → acorex-platform-module-integration-management-client-integration-ref-widget-column.component-DoLD_v28.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-widget-column.component-ClPcvcUW.mjs.map → acorex-platform-module-integration-management-client-integration-ref-widget-column.component-DoLD_v28.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-widget-view.component-BRpGpWHZ.mjs → acorex-platform-module-integration-management-client-integration-ref-widget-view.component-CP2UnG1M.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-widget-view.component-BRpGpWHZ.mjs.map → acorex-platform-module-integration-management-client-integration-ref-widget-view.component-CP2UnG1M.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integrations-page.component-B_YdPi2k.mjs → acorex-platform-module-integration-management-client-integrations-page.component-BUQG6o29.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-integration-management-client-integrations-page.component-B_YdPi2k.mjs.map → acorex-platform-module-integration-management-client-integrations-page.component-BUQG6o29.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-list-domains.query--GGD6J46.mjs → acorex-platform-module-integration-management-client-list-domains.query-Ca1m9f4f.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-list-domains.query--GGD6J46.mjs.map → acorex-platform-module-integration-management-client-list-domains.query-Ca1m9f4f.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-list-my-connections.query-CmHu1qFm.mjs → acorex-platform-module-integration-management-client-list-my-connections.query-DSeVnGtV.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-list-my-connections.query-CmHu1qFm.mjs.map → acorex-platform-module-integration-management-client-list-my-connections.query-DSeVnGtV.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-list-providers.query-ODKJ_UhI.mjs → acorex-platform-module-integration-management-client-list-providers.query-J5DtFS0C.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-list-providers.query-ODKJ_UhI.mjs.map → acorex-platform-module-integration-management-client-list-providers.query-J5DtFS0C.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-update-connection.command-Kqir73pA.mjs → acorex-platform-module-integration-management-client-update-connection.command-B-WPsT5j.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-integration-management-client-update-connection.command-Kqir73pA.mjs.map → acorex-platform-module-integration-management-client-update-connection.command-B-WPsT5j.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-validate-connection.command-D4RZ6WPP.mjs → acorex-platform-module-integration-management-client-validate-connection.command-D2QgFRTV.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-validate-connection.command-D4RZ6WPP.mjs.map → acorex-platform-module-integration-management-client-validate-connection.command-D2QgFRTV.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-integration-management-client.mjs +80 -38
- package/fesm2022/acorex-platform-module-integration-management-client.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-module-integration-management-client-contracts.d.ts +6 -2
- package/types/acorex-platform-module-integration-management-client.d.ts +8 -1
|
@@ -2,7 +2,7 @@ import { AXP_INTEGRATION_CONNECTION_STATUS } from '@acorex-platform/framework-sh
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, Injectable } from '@angular/core';
|
|
4
4
|
import { AXMIntegrationConnectionManager, scrubDisconnectedConnectionConfig, toSafeIntegrationConnectionDto } from './acorex-platform-module-integration-management-client.mjs';
|
|
5
|
-
import { A as AXMIntegrationConnectionLifecycleDispatcher } from './acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-
|
|
5
|
+
import { A as AXMIntegrationConnectionLifecycleDispatcher } from './acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DjSMX8af.mjs';
|
|
6
6
|
import { AXP_INTEGRATION_SECRET_STORE } from '@acorex-platform/framework-client/common';
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
@@ -60,4 +60,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
60
60
|
}] });
|
|
61
61
|
|
|
62
62
|
export { DisconnectConnectionCommand };
|
|
63
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-disconnect-connection.command-
|
|
63
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-disconnect-connection.command-DwgAYZvz.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-management-client-disconnect-connection.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-disconnect-connection.command-DwgAYZvz.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/commands/disconnect-connection.command.ts"],"sourcesContent":["\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXP_INTEGRATION_CONNECTION_STATUS, type AXPSafeIntegrationConnectionDto } from '@acorex-platform/framework-shared/core';\n\nimport { Injectable, inject } from '@angular/core';\nimport {\n AXMIntegrationConnectionManager,\n scrubDisconnectedConnectionConfig,\n toSafeIntegrationConnectionDto,\n} from '../shared/integration-connection.manager';\nimport { AXMIntegrationConnectionLifecycleDispatcher } from '../shared/integration-connection-lifecycle.dispatcher';\n\nimport { AXP_INTEGRATION_SECRET_STORE } from '@acorex-platform/framework-client/common';\n\n//#region ---- Types ----\n\nexport interface DisconnectConnectionCommandInput {\n connectionId: string;\n}\n\n//#endregion\n\n@Injectable({ providedIn: 'root' })\nexport class DisconnectConnectionCommand\n implements AXPCommand<DisconnectConnectionCommandInput, AXPSafeIntegrationConnectionDto>\n{\n private readonly connectionManager = inject(AXMIntegrationConnectionManager);\n private readonly secretStore = inject(AXP_INTEGRATION_SECRET_STORE);\n private readonly lifecycle = inject(AXMIntegrationConnectionLifecycleDispatcher);\n\n async execute(\n input: DisconnectConnectionCommandInput,\n ): AXPCommandExecuteResultPromise<AXPSafeIntegrationConnectionDto> {\n try {\n const connection = await this.connectionManager.getByIdForCurrentUser(input.connectionId);\n if (!connection) {\n return {\n success: false,\n message: { text: '@integration-management:commands.connection.errors.not-found-or-denied' },\n };\n }\n\n const { tenantId, applicationId, userId } = this.connectionManager.getSessionContext();\n if (connection.secretRef) {\n await this.secretStore.delete(connection.secretRef, {\n tenantId,\n applicationId,\n userId,\n connectionId: connection.id,\n providerId: connection.providerId,\n connectionScope: connection.connectionScope,\n connectionKey: connection.connectionKey,\n authMethodType: connection.authMethodType,\n });\n }\n\n const updated = await this.connectionManager.updateConnection(connection.id, {\n secretRef: null,\n config: scrubDisconnectedConnectionConfig(\n (connection.config ?? null) as Record<string, unknown> | null,\n ),\n status: AXP_INTEGRATION_CONNECTION_STATUS.NotConnected,\n isRevoked: false,\n lastErrorCode: null,\n lastErrorMessage: null,\n });\n\n const safe = toSafeIntegrationConnectionDto(updated);\n await this.lifecycle.dispatchDisconnected(safe);\n\n return { success: true, kind: 'object', data: safe };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to disconnect integration.';\n return { success: false, message: { text: message } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAoBA;MAGa,2BAA2B,CAAA;AADxC,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,+BAA+B,CAAC;AAC3D,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAClD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,2CAA2C,CAAC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,CAAC,oBAAoB,CAAC,IAAI,CAAC;AAE/C,YAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;QACtD;QAAE,OAAO,KAAc,EAAE;AACvB,YAAA,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,mCAAmC;AAC5F,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QACvD;IACF;8GApDW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,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,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -27,4 +27,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
27
27
|
}] });
|
|
28
28
|
|
|
29
29
|
export { GetProviderQuery };
|
|
30
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-get-provider.query-
|
|
30
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-get-provider.query-C6OAU1vi.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-management-client-get-provider.query-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-get-provider.query-C6OAU1vi.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/queries/get-provider.query.ts"],"sourcesContent":["import { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPIntegrationProviderRegistryService } from '@acorex-platform/framework-client/common';\nimport {\n runtimeQuerySuccessObject,\n type AXPIntegrationProviderDefinition,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\n\nimport { Injectable, inject } from '@angular/core';\n\n//#region ---- Types ----\n\nexport interface GetProviderQueryInput {\n providerId: string;\n}\n\n//#endregion\n\n//#region ---- Query ----\n\n@Injectable({ providedIn: 'root' })\nexport class GetProviderQuery implements AXPQuery<GetProviderQueryInput, AXPIntegrationProviderDefinition | null> {\n private readonly registry = inject(AXPIntegrationProviderRegistryService);\n private readonly sessionService = inject(AXPSessionService);\n\n async fetch(\n input: GetProviderQueryInput,\n ): AXPQueryFetchResultPromise<AXPIntegrationProviderDefinition | null> {\n const provider = await this.registry.get(input.providerId);\n if (!provider?.module || !this.sessionService.isModuleEnabled(provider.module)) {\n return runtimeQuerySuccessObject(null);\n }\n return runtimeQuerySuccessObject(provider);\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AAgBA;AAEA;MAGa,gBAAgB,CAAA;AAD7B,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,qCAAqC,CAAC;AACxD,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAW5D,IAAA;IATC,MAAM,KAAK,CACT,KAA4B,EAAA;AAE5B,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC;AAC1D,QAAA,IAAI,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC9E,YAAA,OAAO,yBAAyB,CAAC,IAAI,CAAC;QACxC;AACA,QAAA,OAAO,yBAAyB,CAAC,QAAQ,CAAC;IAC5C;8GAZW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,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,gBAAgB,cADH,MAAM,EAAA,CAAA,CAAA;;2FACnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -42,4 +42,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
42
42
|
}] });
|
|
43
43
|
|
|
44
44
|
export { AXMIntegrationConnectionLifecycleDispatcher as A };
|
|
45
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-
|
|
45
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DjSMX8af.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-connection-lifecycle.dispatcher-DjSMX8af.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,QAAA,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,OAAO,KAAI;AAC9D,YAAA,MAAM,OAAO,CAAC,cAAc,GAAG,UAAU,CAAC;AAC5C,QAAA,CAAC,CAAC;IACJ;IAEA,MAAM,eAAe,CAAC,UAA2C,EAAA;AAC/D,QAAA,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,U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
|
|
|
175
175
|
export { AXMIntegrationOAuthCallbackPageComponent };
|
|
176
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-
|
|
176
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-iBh2QP2t.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-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,Q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,IAAA,EAAA,UAAA,EAAA,IAAA,EACd,mBAAmB,iHACnB,wBAAwB,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,aAAA,EAAA,aAAA,EAAA,mBAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,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
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-iBh2QP2t.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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|
|
@@ -123,4 +123,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
123
123
|
}] });
|
|
124
124
|
|
|
125
125
|
export { AXMIntegrationRefDisplayService as A };
|
|
126
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-display.service-
|
|
126
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-display.service-BMhSRuGH.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-display.service-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-display.service-BMhSRuGH.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;AACf,YAAA,OAAO,IAAI;QACb;QAEA,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC;AAChD,QAAA,IAA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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;;;"}
|
|
@@ -145,7 +145,7 @@ class AXMIntegrationRefFilterWidgetEditComponent extends AXPValueWidgetComponent
|
|
|
145
145
|
return [];
|
|
146
146
|
}
|
|
147
147
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationRefFilterWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
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 }); }
|
|
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", "leafOnly", "highlightSearch", "allowSelectAll", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "value", "valueItems", "prefetch"], 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 }); }
|
|
149
149
|
}
|
|
150
150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationRefFilterWidgetEditComponent, decorators: [{
|
|
151
151
|
type: Component,
|
|
@@ -160,4 +160,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
160
160
|
}], propDecorators: { lookup: [{ type: i0.ViewChild, args: ['lookup', { isSignal: true }] }] } });
|
|
161
161
|
|
|
162
162
|
export { AXMIntegrationRefFilterWidgetEditComponent };
|
|
163
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-
|
|
163
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-Dy9tVipC.mjs.map
|
|
@@ -1 +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,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AA,EAAA,mBAAA,EAAA,SAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,MAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,uBAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,SAAA,EAAA,QAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACjB,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,gBAAgB,qGALhB,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQA,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBAbtD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wCAAwC,EAAA,eAAA,EAEjC,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,SAAS;wBACT,WAAW;wBACX,iBAAiB;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
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-Dy9tVipC.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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AAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,MAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,uBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,YAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,SAAA,EAAA,QAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACjB,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,gBAAgB,qGALhB,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQA,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBAbtD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wCAAwC,EAAA,eAAA,EAEjC,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,SAAS;wBACT,WAAW;wBACX,iBAAiB;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;;"}
|
|
@@ -12,7 +12,7 @@ import { AsyncPipe } from '@angular/common';
|
|
|
12
12
|
import * as i0 from '@angular/core';
|
|
13
13
|
import { input, inject, signal, computed, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
14
14
|
import { trim, isPlainObject, isString } from 'lodash';
|
|
15
|
-
import { A as AXMIntegrationRefDisplayService } from './acorex-platform-module-integration-management-client-integration-ref-display.service-
|
|
15
|
+
import { A as AXMIntegrationRefDisplayService } from './acorex-platform-module-integration-management-client-integration-ref-display.service-BMhSRuGH.mjs';
|
|
16
16
|
|
|
17
17
|
//#region ----- Imports -----
|
|
18
18
|
//#endregion
|
|
@@ -148,4 +148,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
148
148
|
}], ctorParameters: () => [], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
149
149
|
|
|
150
150
|
export { AXMIntegrationRefPageComponent };
|
|
151
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-page.component-
|
|
151
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-page.component-BwvqmRou.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-page.component-C131H4e1.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 /** Required by page-component-renderer (create/update wizard + detail tabs). */\n options = 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 op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mRou.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 /** Required by page-component-renderer (create/update wizard + detail tabs). */\n options = 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;;;AAqC5E,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAnCT,IAAA,CAAA,WAAW,GAAG,KAAK,CAA0B,EAAE;wFAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;;QAE7C,IAAA,CAAA,OAAO,GAAG,KAAK,CAA0B,EAAE;oFAAC;;;QAMzB,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;iFAAC;;;AAMlD,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MAAK;YAChD,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,gBAAgB,CAAC;AAClD,YAA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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;;;"}
|
|
@@ -13,7 +13,7 @@ import { AsyncPipe } from '@angular/common';
|
|
|
13
13
|
import * as i0 from '@angular/core';
|
|
14
14
|
import { inject, viewChild, signal, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
15
15
|
import { trim } from 'lodash';
|
|
16
|
-
import { A as AXMIntegrationRefDisplayService } from './acorex-platform-module-integration-management-client-integration-ref-display.service-
|
|
16
|
+
import { A as AXMIntegrationRefDisplayService } from './acorex-platform-module-integration-management-client-integration-ref-display.service-BMhSRuGH.mjs';
|
|
17
17
|
|
|
18
18
|
//#region ----- Imports -----
|
|
19
19
|
//#endregion
|
|
@@ -115,7 +115,7 @@ class AXMIntegrationRefWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationRefWidgetColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
118
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMIntegrationRefWidgetColumnComponent, isStandalone: true, selector: "axm-integration-ref-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, host: { listeners: { "click": "onHostClick($event)", "mousedown": "onHostClick($event)", "dblclick": "onHostClick($event)" }, classAttribute: "inline-flex min-w-0 items-center" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["infoTrigger"], descendants: true, isSignal: true }, { propertyName: "infoPopover", first: true, predicate: ["infoPopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- ----- 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", dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "closeOnNavigation", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["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 }); }
|
|
118
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMIntegrationRefWidgetColumnComponent, isStandalone: true, selector: "axm-integration-ref-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, host: { listeners: { "click": "onHostClick($event)", "mousedown": "onHostClick($event)", "dblclick": "onHostClick($event)" }, classAttribute: "inline-flex min-w-0 items-center" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["infoTrigger"], descendants: true, isSignal: true }, { propertyName: "infoPopover", first: true, predicate: ["infoPopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- ----- 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", dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "restoreFocusOnClose", "openAfter", "closeAfter", "closeOnScroll", "closeOnNavigation", "backdropClass", "panelClass", "adaptivityEnabled", "draggable"], outputs: ["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 }); }
|
|
119
119
|
}
|
|
120
120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationRefWidgetColumnComponent, decorators: [{
|
|
121
121
|
type: Component,
|
|
@@ -134,4 +134,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
134
134
|
}], ctorParameters: () => [], propDecorators: { trigger: [{ type: i0.ViewChild, args: ['infoTrigger', { isSignal: true }] }], infoPopover: [{ type: i0.ViewChild, args: ['infoPopover', { isSignal: true }] }] } });
|
|
135
135
|
|
|
136
136
|
export { AXMIntegrationRefWidgetColumnComponent };
|
|
137
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-widget-column.component-
|
|
137
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-widget-column.component-DoLD_v28.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-widget-column.component-ClPcvcUW.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;;;AA0B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,CAAA,CAAA;;2FAcA,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAnBlD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mCAAmC,EAAA,eAAA,EAE5B,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,SAAS;wBACT,eAAe;wBACf,eAAe;wBACf,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA,EAAA,MAAA,EACO,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,IAAA,EACzB;AACJ,wBAAA,KAAK,EAAE,kCAAkC;AACzC,wBAAA,SAAS,EAAE,qBAAqB;AAChC,wBAAA,aAAa,EAAE,qBAAqB;AACpC,wBAAA,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-DoLD_v28.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,e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OAAA,EACtC;wBACP,SAAS;wBACT,eAAe;wBACf,eAAe;wBACf,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA,EAAA,MAAA,EACO,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,IAAA,EACzB;AACJ,wBAAA,KAAK,EAAE,kCAAkC;AACzC,wBAAA,SAAS,EAAE,qBAAqB;AAChC,wBAAA,aAAa,EAAE,qBAAqB;AACpC,wBAAA,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;;"}
|
|
@@ -6,7 +6,7 @@ import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layou
|
|
|
6
6
|
import { AsyncPipe } from '@angular/common';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
8
|
import { inject, signal, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
9
|
-
import { A as AXMIntegrationRefDisplayService } from './acorex-platform-module-integration-management-client-integration-ref-display.service-
|
|
9
|
+
import { A as AXMIntegrationRefDisplayService } from './acorex-platform-module-integration-management-client-integration-ref-display.service-BMhSRuGH.mjs';
|
|
10
10
|
|
|
11
11
|
//#region ----- Imports -----
|
|
12
12
|
//#endregion
|
|
@@ -43,4 +43,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
43
43
|
}], ctorParameters: () => [] });
|
|
44
44
|
|
|
45
45
|
export { AXMIntegrationRefWidgetViewComponent };
|
|
46
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-widget-view.component-
|
|
46
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-widget-view.component-CP2UnG1M.mjs.map
|