@acorex-platform/module-integration-management-client 1.0.2 → 2.0.0-beta.1
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-entities-integration-remote-record.mjs +1 -0
- package/fesm2022/acorex-platform-module-integration-management-client-contracts-entities-integration-remote-record.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-DKHqdjry.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-DKHqdjry.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-CWVIUVfP.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-CWVIUVfP.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-BT7Q1mi2.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-BT7Q1mi2.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-dukBxh7a.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-dukBxh7a.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-CwQDiNRP.mjs} +3 -2
- package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-remote-record.entity-CwQDiNRP.mjs.map +1 -0
- 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-BQVHcUoD.mjs} +7 -43
- package/fesm2022/acorex-platform-module-integration-management-client-integration-ref-display.service-BQVHcUoD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-filter-widget-edit.component-BU72XW6W.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-BU72XW6W.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-DKotZKGJ.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-DKotZKGJ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-widget-column.component-C253nF3T.mjs → acorex-platform-module-integration-management-client-integration-ref-widget-column.component-CNdvygau.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-integration-management-client-integration-ref-widget-column.component-C253nF3T.mjs.map → acorex-platform-module-integration-management-client-integration-ref-widget-column.component-CNdvygau.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-BlO90XqK.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-BlO90XqK.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 +49 -31
- 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 +2 -0
- package/fesm2022/acorex-platform-module-integration-management-client-contracts-entity-catalog-integration-remote-record.entity-D9oTVEHF.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-integration-management-client-integration-ref-display.service-CP818xou.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-management-client-contracts.mjs","sources":["../../../../libs/modules/integration-management/contracts/src/root-config.ts","../../../../libs/modules/integration-management/contracts/src/manifest.ts","../../../../libs/modules/integration-management/contracts/src/permission.keys.ts","../../../../libs/modules/integration-management/contracts/src/commands.keys.ts","../../../../libs/modules/integration-management/contracts/src/queries.keys.ts","../../../../libs/modules/integration-management/contracts/src/menu.keys.ts","../../../../libs/modules/integration-management/contracts/src/route.helpers.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-application/integration-application.types.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-connection/integration-connection.types.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-oauth-state/integration-oauth-state.types.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-remote-record/integration-remote-record.types.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-remote-record/integration-remote-record.constants.ts","../../../../libs/modules/integration-management/contracts/src/acorex-platform-module-integration-management-client-contracts.ts"],"sourcesContent":["//#region ---- Module Config ----\n\nconst config = {\n i18n: 'integration-management',\n module: 'IntegrationManagement',\n route: 'integration-management',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n route: config.route,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-plug',\n },\n entities: {\n integrationConnection: {\n name: 'IntegrationConnection',\n source: `${config.module}.IntegrationConnection`,\n title: `@${config.i18n}:connections.entities.connection.title`,\n titlePlural: `@${config.i18n}:connections.entities.connection.plural`,\n icon: 'fa-light fa-link',\n },\n integrationOAuthState: {\n name: 'IntegrationOAuthState',\n source: `${config.module}.IntegrationOAuthState`,\n title: `@${config.i18n}:oauth-states.entities.oauth-state.title`,\n titlePlural: `@${config.i18n}:oauth-states.entities.oauth-state.plural`,\n icon: 'fa-light fa-key',\n },\n integrationApplication: {\n name: 'IntegrationApplication',\n source: `${config.module}.IntegrationApplication`,\n title: `@${config.i18n}:applications.entities.application.title`,\n titlePlural: `@${config.i18n}:applications.entities.application.plural`,\n icon: 'fa-light fa-shield-keyhole',\n },\n integrationRemoteRecord: {\n name: 'IntegrationRemoteRecord',\n source: `${config.module}.IntegrationRemoteRecord`,\n title: `@${config.i18n}:remote-records.entities.record.title`,\n titlePlural: `@${config.i18n}:remote-records.entities.record.plural`,\n icon: 'fa-light fa-cloud-arrow-down',\n },\n },\n queries: {\n dashboard: {\n integrationsDonut: `${config.module}:Dashboard:IntegrationsDonut`,\n },\n },\n};\n\n//#endregion\n","\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\nexport const IntegrationManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n required: false,\n};\n","/**\n * Administration capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPAdministrationPermissionKeys = {\n Access: 'Administration:Permission:Access',\n MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',\n ManageSessions: 'Administration:Permission:ManageSessions',\n MaintainPolicies: 'Administration:Permission:MaintainPolicies',\n ViewIntegrations: 'Administration:Permission:ViewIntegrations',\n MaintainConnections: 'Administration:Permission:MaintainConnections',\n ManageIntegrationActions: 'Administration:Permission:ManageIntegrationActions',\n MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',\n ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',\n ViewRules: 'Administration:Permission:ViewRules',\n MaintainRules: 'Administration:Permission:MaintainRules',\n ManageRuleActions: 'Administration:Permission:ManageRuleActions',\n MaintainAi: 'Administration:Permission:MaintainAi',\n UseAiAssist: 'Administration:Permission:UseAiAssist',\n MaintainDashboards: 'Administration:Permission:MaintainDashboards',\n ViewJobs: 'Administration:Permission:ViewJobs',\n ManageJobActions: 'Administration:Permission:ManageJobActions',\n ViewObservability: 'Administration:Permission:ViewObservability',\n MaintainObservability: 'Administration:Permission:MaintainObservability',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMIntegrationManagementPermissionKeys = {\n Provider: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n Connection: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n },\n TenantConnection: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n },\n Application: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n },\n ConnectionHealth: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n} as const;\n","//#region ---- Command Keys ----\n\nexport const AXMIntegrationManagementCommandKeys = {\n ConnectionConnectWithCredentials: 'IntegrationManagement.Connection:ConnectWithCredentials',\n ConnectionRefreshAuthorization: 'IntegrationManagement.Connection:RefreshAuthorization',\n ConnectionValidate: 'IntegrationManagement.Connection:Validate',\n ConnectionUpdate: 'IntegrationManagement.Connection:Update',\n ConnectionDisconnect: 'IntegrationManagement.Connection:Disconnect',\n ConnectionRevoke: 'IntegrationManagement.Connection:Revoke',\n ConnectionDelete: 'IntegrationManagement.Connection:Delete',\n ApplicationUpsert: 'IntegrationManagement.Application:Upsert',\n} as const;\n\n//#endregion\n","//#region ---- Query Keys ----\n\nexport const AXMIntegrationManagementQueryKeys = {\n DomainList: 'IntegrationManagement.Domain:List',\n ProviderList: 'IntegrationManagement.Provider:List',\n ProviderGet: 'IntegrationManagement.Provider:Get',\n ConnectionListMine: 'IntegrationManagement.Connection:ListMine',\n ConnectionGetStatus: 'IntegrationManagement.Connection:GetStatus',\n ConnectionGetAuthMethods: 'IntegrationManagement.Connection:GetAuthMethods',\n} as const;\n\n//#endregion\n","//#region ---- Menu Keys ----\n\nexport const AXMIntegrationManagementMenuKeys = {\n Integrations: 'IntegrationManagement:Menu:Integrations',\n} as const;\n\n//#endregion\n","//#region ----- Route helpers -----\n\n/** Tenant integrations admin page: `/{app}/admin/integrations`. */\nexport function buildTenantIntegrationsPagePath(appName: string): string {\n return `/${appName}/admin/integrations`;\n}\n\n/**\n * App-agnostic OAuth callback path.\n * Prefer this for providers with a fixed registered redirect URI (e.g. Simpro).\n */\nexport function buildIntegrationOAuthCallbackPath(providerId: string): string {\n return `/integrations/oauth/callback/${providerId}`;\n}\n\nexport function buildIntegrationOAuthCallbackUrl(origin: string, providerId: string): string {\n return `${origin.replace(/\\/+$/, '')}${buildIntegrationOAuthCallbackPath(providerId)}`;\n}\n\n/** Resolve the current app route slug — session first, then optional route/fallback. */\nexport function resolveAppRouteName(\n applicationName?: string | null,\n ...fallbacks: Array<string | null | undefined>\n): string | null {\n const candidates = [applicationName, ...fallbacks];\n for (const candidate of candidates) {\n const trimmed = String(candidate ?? '').trim();\n if (trimmed) {\n return trimmed;\n }\n }\n return null;\n}\n\n//#endregion\n","import type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- Integration application entity model ----\n\n/**\n * Tenant/app isolation lives on {@link AXPEntityModel.scopeInfo}\n * (`tenantId`, `applicationId`).\n */\nexport interface AXMIntegrationManagementIntegrationApplicationEntityModel\n extends AXPEntityModel<string> {\n providerId: string;\n clientId: string;\n clientSecretRef: string;\n authorizationEndpoint?: string | null;\n tokenEndpoint?: string | null;\n redirectUri?: string | null;\n defaultScopes?: string[] | null;\n environment?: string | null;\n isActive: boolean;\n}\n\n//#endregion\n","import type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport type {\n AXPIntegrationAuthMethodType,\n AXPIntegrationConnectionScope,\n AXPIntegrationConnectionStatus,\n} from '@acorex-platform/framework-shared/core';\n\n//#region ---- Integration connection entity model ----\n\n/**\n * Isolation lives on {@link AXPEntityModel.scopeInfo}:\n * - `tenantId` / `applicationId` always\n * - `userId` only when `connectionScope` is `user`\n */\nexport interface AXMIntegrationManagementIntegrationConnectionEntityModel\n extends AXPEntityModel<string> {\n providerId: string;\n connectionScope: AXPIntegrationConnectionScope;\n connectionKey: string;\n displayName: string;\n authMethodType: AXPIntegrationAuthMethodType;\n status: AXPIntegrationConnectionStatus;\n instanceUrl?: string | null;\n externalAccountId?: string | null;\n externalAccountName?: string | null;\n grantedScopes?: string[] | null;\n secretRef?: string | null;\n expiresAt?: string | null;\n lastConnectedAt?: string | null;\n lastValidatedAt?: string | null;\n lastSyncAt?: string | null;\n lastErrorCode?: string | null;\n lastErrorMessage?: string | null;\n isRevoked: boolean;\n isDisabled: boolean;\n config?: Record<string, unknown> | null;\n}\n\n//#endregion\n","import type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- Integration OAuth state entity model ----\n\n/**\n * Isolation lives on {@link AXPEntityModel.scopeInfo}\n * (`tenantId`, `applicationId`, `userId` = authorizing user).\n */\nexport interface AXMIntegrationManagementIntegrationOAuthStateEntityModel\n extends AXPEntityModel<string> {\n state: string;\n codeVerifier: string;\n providerId: string;\n redirectUri: string;\n connectionScope: string;\n connectionKey: string;\n connectionId?: string | null;\n authMethodType: string;\n expiresAt: string;\n consumedAt?: string | null;\n}\n\n//#endregion\n","//#region ----- Integration remote record (cache entity) -----\n\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n/**\n * Resource / data-type discriminator for cached remote rows.\n * For Simpro multi-connection, `providerId` on the row is the **connection id**\n * (not the integration provider key), and `resourceType` is the data type.\n */\nexport type AXMIntegrationManagementRemoteResourceType =\n | 'job'\n | 'customer'\n | 'site'\n | 'employee'\n | 'project'\n | 'task';\n\nexport interface AXMIntegrationManagementIntegrationRemoteRecordEntityModel\n extends AXPEntityModel<string> {\n /**\n * Cache partition key.\n * Simpro: integration connection id. Other providers may still use provider key (e.g. `servicem8`).\n */\n providerId: string;\n /** Data type: job | customer | site | … */\n resourceType: AXMIntegrationManagementRemoteResourceType | string;\n remoteId: string;\n name: string;\n code?: string | null;\n orderNo?: string | null;\n stage?: string | null;\n customerName?: string | null;\n siteName?: string | null;\n dueDate?: string | null;\n /** Display name of the owning integration connection (Simpro multi-connection lists). */\n connectionDisplayName?: string | null;\n payloadJson?: string | null;\n remoteFetchedAt: string;\n isActive: boolean;\n isLinked: boolean;\n}\n\nexport interface AXMIntegrationManagementIntegrationRemoteRecordUpsertInput {\n remoteId: string;\n name: string;\n code?: string | null;\n orderNo?: string | null;\n stage?: string | null;\n customerName?: string | null;\n siteName?: string | null;\n dueDate?: string | null;\n connectionDisplayName?: string | null;\n payloadJson?: string | null;\n}\n\nexport interface AXMIntegrationManagementIntegrationRemotePullResult {\n upserted: number;\n deactivated: number;\n}\n\n//#endregion\n","//#region ----- Integration remote record resource constants -----\n\nexport const AXM_INTEGRATION_RESOURCE_JOB = 'job';\nexport const AXM_INTEGRATION_RESOURCE_CUSTOMER = 'customer';\nexport const AXM_INTEGRATION_RESOURCE_SITE = 'site';\nexport const AXM_INTEGRATION_RESOURCE_EMPLOYEE = 'employee';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,wBAAwB;AAC9B,IAAA,MAAM,EAAE,uBAAuB;AAC/B,IAAA,KAAK,EAAE,wBAAwB;CAChC;AAEM,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC,MAAM;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;AACnB,QAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,aAAA,CAAe;AACrC,QAAA,IAAI,EAAE,kBAAkB;AACzB,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,qBAAqB,EAAE;AACrB,YAAA,IAAI,EAAE,uBAAuB;AAC7B,YAAA,MAAM,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,sBAAA,CAAwB;AAChD,YAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,sCAAA,CAAwC;AAC9D,YAAA,WAAW,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC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,MAAc,EAAE,UAAkB,EAAA;AACjF,IAAA,OAAO,CAAA,EAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,iCAAiC,CAAC,UAAU,CAAC,EAAE;AACxF;AAEA;SACgB,mBAAmB,CACjC,eAA+B,EAC/B,GAAG,SAA2C,EAAA;IAE9C,MAAM,UAAU,GAAG,CAAC,eAAe,EAAE,GAAG,SAAS,CAAC;AAClD,IAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;QAC9C,IAAI,OAAO,EAAE;AACX,YAAA,OAAO,OAAO;QAChB;IACF;AACA,IAAA,OAAO,IAAI;AACb;AAEA;;ACbA;;ACiBA;;AChBA;;ACtBA;AA4DA;;AC5DA;AAEO,MAAM,4BAA4B,GAAG;AACrC,MAAM,iCAAiC,GAAG;AAC1C,MAAM,6BAA6B,GAAG;AACtC,MAAM,iCAAiC,GAAG;AAEjD;;ACPA;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-contracts.mjs","sources":["../../../../libs/modules/integration-management/contracts/src/root-config.ts","../../../../libs/modules/integration-management/contracts/src/manifest.ts","../../../../libs/modules/integration-management/contracts/src/permission.keys.ts","../../../../libs/modules/integration-management/contracts/src/commands.keys.ts","../../../../libs/modules/integration-management/contracts/src/queries.keys.ts","../../../../libs/modules/integration-management/contracts/src/menu.keys.ts","../../../../libs/modules/integration-management/contracts/src/route.helpers.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-application/integration-application.types.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-connection/integration-connection.types.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-oauth-state/integration-oauth-state.types.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-remote-record/integration-remote-record.types.ts","../../../../libs/modules/integration-management/contracts/src/entities/integration-remote-record/integration-remote-record.constants.ts","../../../../libs/modules/integration-management/contracts/src/acorex-platform-module-integration-management-client-contracts.ts"],"sourcesContent":["//#region ---- Module Config ----\n\nconst config = {\n i18n: 'integration-management',\n module: 'IntegrationManagement',\n route: 'integration-management',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n route: config.route,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-plug',\n },\n entities: {\n integrationConnection: {\n name: 'IntegrationConnection',\n source: `${config.module}.IntegrationConnection`,\n title: `@${config.i18n}:connections.entities.connection.title`,\n titlePlural: `@${config.i18n}:connections.entities.connection.plural`,\n icon: 'fa-light fa-link',\n },\n integrationOAuthState: {\n name: 'IntegrationOAuthState',\n source: `${config.module}.IntegrationOAuthState`,\n title: `@${config.i18n}:oauth-states.entities.oauth-state.title`,\n titlePlural: `@${config.i18n}:oauth-states.entities.oauth-state.plural`,\n icon: 'fa-light fa-key',\n },\n integrationApplication: {\n name: 'IntegrationApplication',\n source: `${config.module}.IntegrationApplication`,\n title: `@${config.i18n}:applications.entities.application.title`,\n titlePlural: `@${config.i18n}:applications.entities.application.plural`,\n icon: 'fa-light fa-shield-keyhole',\n },\n integrationRemoteRecord: {\n name: 'IntegrationRemoteRecord',\n source: `${config.module}.IntegrationRemoteRecord`,\n title: `@${config.i18n}:remote-records.entities.record.title`,\n titlePlural: `@${config.i18n}:remote-records.entities.record.plural`,\n icon: 'fa-light fa-cloud-arrow-down',\n },\n },\n queries: {\n dashboard: {\n integrationsDonut: `${config.module}:Dashboard:IntegrationsDonut`,\n },\n },\n};\n\n//#endregion\n","\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\nexport const IntegrationManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n required: false,\n};\n","/**\n * Administration capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPAdministrationPermissionKeys = {\n Access: 'Administration:Permission:Access',\n MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',\n ManageSessions: 'Administration:Permission:ManageSessions',\n MaintainPolicies: 'Administration:Permission:MaintainPolicies',\n ViewIntegrations: 'Administration:Permission:ViewIntegrations',\n MaintainConnections: 'Administration:Permission:MaintainConnections',\n ManageIntegrationActions: 'Administration:Permission:ManageIntegrationActions',\n MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',\n ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',\n ViewRules: 'Administration:Permission:ViewRules',\n MaintainRules: 'Administration:Permission:MaintainRules',\n ManageRuleActions: 'Administration:Permission:ManageRuleActions',\n MaintainAi: 'Administration:Permission:MaintainAi',\n UseAiAssist: 'Administration:Permission:UseAiAssist',\n MaintainDashboards: 'Administration:Permission:MaintainDashboards',\n ViewJobs: 'Administration:Permission:ViewJobs',\n ManageJobActions: 'Administration:Permission:ManageJobActions',\n ViewObservability: 'Administration:Permission:ViewObservability',\n MaintainObservability: 'Administration:Permission:MaintainObservability',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMIntegrationManagementPermissionKeys = {\n Provider: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n Connection: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n },\n TenantConnection: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n },\n Application: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n },\n ConnectionHealth: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n} as const;\n","//#region ---- Command Keys ----\n\nexport const AXMIntegrationManagementCommandKeys = {\n ConnectionConnectWithCredentials: 'IntegrationManagement.Connection:ConnectWithCredentials',\n ConnectionRefreshAuthorization: 'IntegrationManagement.Connection:RefreshAuthorization',\n ConnectionValidate: 'IntegrationManagement.Connection:Validate',\n ConnectionUpdate: 'IntegrationManagement.Connection:Update',\n ConnectionDisconnect: 'IntegrationManagement.Connection:Disconnect',\n ConnectionRevoke: 'IntegrationManagement.Connection:Revoke',\n ConnectionDelete: 'IntegrationManagement.Connection:Delete',\n ApplicationUpsert: 'IntegrationManagement.Application:Upsert',\n} as const;\n\n//#endregion\n","//#region ---- Query Keys ----\n\nexport const AXMIntegrationManagementQueryKeys = {\n DomainList: 'IntegrationManagement.Domain:List',\n ProviderList: 'IntegrationManagement.Provider:List',\n ProviderGet: 'IntegrationManagement.Provider:Get',\n ConnectionListMine: 'IntegrationManagement.Connection:ListMine',\n ConnectionGetStatus: 'IntegrationManagement.Connection:GetStatus',\n ConnectionGetAuthMethods: 'IntegrationManagement.Connection:GetAuthMethods',\n} as const;\n\n//#endregion\n","//#region ---- Menu Keys ----\n\nexport const AXMIntegrationManagementMenuKeys = {\n Integrations: 'IntegrationManagement:Menu:Integrations',\n} as const;\n\n//#endregion\n","//#region ----- Route helpers -----\n\n/** Tenant integrations admin page: `/{app}/admin/integrations`. */\nexport function buildTenantIntegrationsPagePath(appName: string): string {\n return `/${appName}/admin/integrations`;\n}\n\n/**\n * App-agnostic OAuth callback path.\n * Prefer this for providers with a fixed registered redirect URI (e.g. Simpro).\n */\nexport function buildIntegrationOAuthCallbackPath(providerId: string): string {\n return `/integrations/oauth/callback/${providerId}`;\n}\n\nexport function buildIntegrationOAuthCallbackUrl(origin: string, providerId: string): string {\n return `${origin.replace(/\\/+$/, '')}${buildIntegrationOAuthCallbackPath(providerId)}`;\n}\n\n/** Resolve the current app route slug — session first, then optional route/fallback. */\nexport function resolveAppRouteName(\n applicationName?: string | null,\n ...fallbacks: Array<string | null | undefined>\n): string | null {\n const candidates = [applicationName, ...fallbacks];\n for (const candidate of candidates) {\n const trimmed = String(candidate ?? '').trim();\n if (trimmed) {\n return trimmed;\n }\n }\n return null;\n}\n\n//#endregion\n","import type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- Integration application entity model ----\n\n/**\n * Tenant/app isolation lives on {@link AXPEntityModel.scopeInfo}\n * (`tenantId`, `applicationId`).\n */\nexport interface AXMIntegrationManagementIntegrationApplicationEntityModel\n extends AXPEntityModel<string> {\n providerId: string;\n clientId: string;\n clientSecretRef: string;\n authorizationEndpoint?: string | null;\n tokenEndpoint?: string | null;\n redirectUri?: string | null;\n defaultScopes?: string[] | null;\n environment?: string | null;\n isActive: boolean;\n}\n\n//#endregion\n","import type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport type {\n AXPIntegrationAuthMethodType,\n AXPIntegrationConnectionScope,\n AXPIntegrationConnectionStatus,\n} from '@acorex-platform/framework-shared/core';\n\n//#region ---- Integration connection entity model ----\n\n/**\n * Isolation lives on {@link AXPEntityModel.scopeInfo}:\n * - `tenantId` / `applicationId` always\n * - `userId` only when `connectionScope` is `user`\n */\nexport interface AXMIntegrationManagementIntegrationConnectionEntityModel\n extends AXPEntityModel<string> {\n providerId: string;\n connectionScope: AXPIntegrationConnectionScope;\n connectionKey: string;\n displayName: string;\n authMethodType: AXPIntegrationAuthMethodType;\n status: AXPIntegrationConnectionStatus;\n instanceUrl?: string | null;\n externalAccountId?: string | null;\n externalAccountName?: string | null;\n grantedScopes?: string[] | null;\n secretRef?: string | null;\n expiresAt?: string | null;\n lastConnectedAt?: string | null;\n lastValidatedAt?: string | null;\n lastSyncAt?: string | null;\n lastErrorCode?: string | null;\n lastErrorMessage?: string | null;\n isRevoked: boolean;\n isDisabled: boolean;\n config?: Record<string, unknown> | null;\n}\n\n//#endregion\n","import type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- Integration OAuth state entity model ----\n\n/**\n * Isolation lives on {@link AXPEntityModel.scopeInfo}\n * (`tenantId`, `applicationId`, `userId` = authorizing user).\n */\nexport interface AXMIntegrationManagementIntegrationOAuthStateEntityModel\n extends AXPEntityModel<string> {\n state: string;\n codeVerifier: string;\n providerId: string;\n redirectUri: string;\n connectionScope: string;\n connectionKey: string;\n connectionId?: string | null;\n authMethodType: string;\n expiresAt: string;\n consumedAt?: string | null;\n}\n\n//#endregion\n","//#region ----- Integration remote record (cache entity) -----\n\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n/**\n * Resource / data-type discriminator for cached remote rows.\n * For Simpro multi-connection, `providerId` on the row is the **connection id**\n * (not the integration provider key), and `resourceType` is the data type.\n */\nexport type AXMIntegrationManagementRemoteResourceType =\n | 'job'\n | 'customer'\n | 'site'\n | 'employee'\n | 'contractor'\n | 'scheduleRate'\n | 'activity'\n | 'activitySchedule'\n | 'project'\n | 'task';\n\nexport interface AXMIntegrationManagementIntegrationRemoteRecordEntityModel\n extends AXPEntityModel<string> {\n /**\n * Cache partition key.\n * Simpro: integration connection id. Other providers may still use provider key (e.g. `servicem8`).\n */\n providerId: string;\n /** Data type: job | customer | site | … */\n resourceType: AXMIntegrationManagementRemoteResourceType | string;\n remoteId: string;\n name: string;\n code?: string | null;\n orderNo?: string | null;\n stage?: string | null;\n customerName?: string | null;\n siteName?: string | null;\n dueDate?: string | null;\n /** Display name of the owning integration connection (Simpro multi-connection lists). */\n connectionDisplayName?: string | null;\n payloadJson?: string | null;\n remoteFetchedAt: string;\n isActive: boolean;\n isLinked: boolean;\n}\n\nexport interface AXMIntegrationManagementIntegrationRemoteRecordUpsertInput {\n remoteId: string;\n name: string;\n code?: string | null;\n orderNo?: string | null;\n stage?: string | null;\n customerName?: string | null;\n siteName?: string | null;\n dueDate?: string | null;\n connectionDisplayName?: string | null;\n payloadJson?: string | null;\n}\n\nexport interface AXMIntegrationManagementIntegrationRemotePullResult {\n upserted: number;\n deactivated: number;\n}\n\n//#endregion\n","//#region ----- Integration remote record resource constants -----\n\nexport const AXM_INTEGRATION_RESOURCE_JOB = 'job';\nexport const AXM_INTEGRATION_RESOURCE_CUSTOMER = 'customer';\nexport const AXM_INTEGRATION_RESOURCE_SITE = 'site';\nexport const AXM_INTEGRATION_RESOURCE_EMPLOYEE = 'employee';\nexport const AXM_INTEGRATION_RESOURCE_CONTRACTOR = 'contractor';\nexport const AXM_INTEGRATION_RESOURCE_SCHEDULE_RATE = 'scheduleRate';\nexport const AXM_INTEGRATION_RESOURCE_ACTIVITY = 'activity';\nexport const AXM_INTEGRATION_RESOURCE_ACTIVITY_SCHEDULE = 'activitySchedule';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,wBAAwB;AAC9B,IAAA,MAAM,EAAE,uBAAuB;AAC/B,IAAA,KAAK,EAAE,wBAAwB;CAChC;AAEM,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC,MAAM;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;AACnB,QAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,aAAA,CAAe;AACrC,QAAA,IAAI,EAAE,kBAAkB;AACzB,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,qBAAqB,EAAE;AACrB,YAAA,IAAI,EAAE,uBAAuB;AAC7B,YAAA,MAAM,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,sBAAA,CAAwB;AAChD,YAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,sCAAA,CAAwC;AAC9D,YAAA,WAAW,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,uCAAA,CAAyC;AACrE,YAAA,IAAI,EAAE,kBAAkB;AACzB,SAAA;AACD,QAAA,qBAAqB,EAAE;AACrB,YAAA,IAAI,EAAE,uBAAuB;AAC7B,YAAA,MAAM,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,sBA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,SAA2C,EAAA;IAE9C,MAAM,UAAU,GAAG,CAAC,eAAe,EAAE,GAAG,SAAS,CAAC;AAClD,IAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;QAC9C,IAAI,OAAO,EAAE;AACX,YAAA,OAAO,OAAO;QAChB;IACF;AACA,IAAA,OAAO,IAAI;AACb;AAEA;;ACbA;;ACiBA;;AChBA;;ACtBA;AAgEA;;AChEA;AAEO,MAAM,4BAA4B,GAAG;AACrC,MAAM,iCAAiC,GAAG;AAC1C,MAAM,6BAA6B,GAAG;AACtC,MAAM,iCAAiC,GAAG;AAC1C,MAAM,mCAAmC,GAAG;AAC5C,MAAM,sCAAsC,GAAG;AAC/C,MAAM,iCAAiC,GAAG;AAC1C,MAAM,0CAA0C,GAAG;AAE1D;;ACXA;;AAEG;;"}
|
|
@@ -2,7 +2,7 @@ import { AXP_INTEGRATION_SECRET_STORE } from '@acorex-platform/framework-client/
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, Injectable } from '@angular/core';
|
|
4
4
|
import { AXMIntegrationConnectionManager, 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
|
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region ---- Command ----
|
|
@@ -53,4 +53,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
53
53
|
}] });
|
|
54
54
|
|
|
55
55
|
export { DeleteConnectionCommand };
|
|
56
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-delete-connection.command-
|
|
56
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-delete-connection.command-DXxr1N1S.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-integration-management-client-delete-connection.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-delete-connection.command-DXxr1N1S.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/commands/delete-connection.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXP_INTEGRATION_SECRET_STORE } from '@acorex-platform/framework-client/common';\nimport { Injectable, inject } from '@angular/core';\nimport {\n AXMIntegrationConnectionManager,\n toSafeIntegrationConnectionDto,\n} from '../shared/integration-connection.manager';\nimport { AXMIntegrationConnectionLifecycleDispatcher } from '../shared/integration-connection-lifecycle.dispatcher';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface DeleteConnectionCommandInput {\n connectionId: string;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class DeleteConnectionCommand implements AXPCommand<DeleteConnectionCommandInput, { deleted: true }> {\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: DeleteConnectionCommandInput,\n ): AXPCommandExecuteResultPromise<{ deleted: true }> {\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 safe = toSafeIntegrationConnectionDto(connection);\n await this.connectionManager.deleteConnection(connection.id);\n await this.lifecycle.dispatchDeleted(safe);\n\n return { success: true, kind: 'object', data: { deleted: true } };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to remove integration connection.';\n return { success: false, message: { text: message } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AAmBA;AAEA;MAGa,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;AAEmB,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;AAsCjF,IAAA;IApCC,MAAM,OAAO,CACX,KAAmC,EAAA;AAEnC,QAAA,IAAI;AACF,YAAA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,KAAK,CAAC,YAAY,CAAC;YACzF,IAAI,CAAC,UAAU,EAAE;gBACf,OAAO;AACL,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE,EAAE,IAAI,EAAE,wEAAwE,EAAE;iBAC5F;YACH;AAEA,YAAA,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,EAAE;AACtF,YAAA,IAAI,UAAU,CAAC,SAAS,EAAE;gBACxB,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE;oBAClD,QAAQ;oBACR,aAAa;oBACb,MAAM;oBACN,YAAY,EAAE,UAAU,CAAC,EAAE;oBAC3B,UAAU,EAAE,UAAU,CAAC,UAAU;oBACjC,eAAe,EAAE,UAAU,CAAC,eAAe;oBAC3C,aAAa,EAAE,UAAU,CAAC,aAAa;oBACvC,cAAc,EAAE,UAAU,CAAC,cAAc;AAC1C,iBAAA,CAAC;YACJ;AAEA,YAAA,MAAM,IAAI,GAAG,8BAA8B,CAAC,UAAU,CAAC;YACvD,MAAM,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5D,MAAM,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC;AAE1C,YAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QACnE;QAAE,OAAO,KAAc,EAAE;AACvB,YAAA,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,0CAA0C;AACnG,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QACvD;IACF;8GAxCW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,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,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -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,CA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AI,GAAG,8BAA8B,CAAC,OAAO,CAAC;YACpD,MAAM,IAAI,CAAC,SAAS,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,UAA2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adata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
173
173
|
}] });
|
|
174
174
|
|
|
175
175
|
export { AXMIntegrationOAuthCallbackPageComponent };
|
|
176
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-oauth-callback-page.component-
|
|
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,CAA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AA,EAAA,aAAA,EAAA,gBAAA,EAAA,mBAAA,CAAA,EAAA,EAAA,EAAA,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,G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,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
|
|
@@ -17,11 +17,6 @@ class AXMIntegrationRefDisplayService {
|
|
|
17
17
|
//#region ----- Services & Dependencies -----
|
|
18
18
|
this.domainRegistry = inject(AXPIntegrationDomainRegistryService);
|
|
19
19
|
this.entityService = inject(AXPEntityService);
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region ----- State -----
|
|
22
|
-
this.connectionProviderCache = new Map();
|
|
23
|
-
this.connectionCache = new Map();
|
|
24
|
-
this.displayCache = new Map();
|
|
25
20
|
}
|
|
26
21
|
//#endregion
|
|
27
22
|
//#region ----- Public API -----
|
|
@@ -37,13 +32,8 @@ class AXMIntegrationRefDisplayService {
|
|
|
37
32
|
if (!providerId) {
|
|
38
33
|
return null;
|
|
39
34
|
}
|
|
40
|
-
const cached = this.displayCache.get(providerId);
|
|
41
|
-
if (cached !== undefined) {
|
|
42
|
-
return cached;
|
|
43
|
-
}
|
|
44
35
|
const provider = await this.domainRegistry.getProvider(providerId);
|
|
45
36
|
if (!provider) {
|
|
46
|
-
this.displayCache.set(providerId, null);
|
|
47
37
|
return null;
|
|
48
38
|
}
|
|
49
39
|
const display = {
|
|
@@ -52,32 +42,16 @@ class AXMIntegrationRefDisplayService {
|
|
|
52
42
|
logoKey: provider.logoKey,
|
|
53
43
|
icon: provider.icon,
|
|
54
44
|
};
|
|
55
|
-
this.displayCache.set(providerId, display);
|
|
56
45
|
return display;
|
|
57
46
|
}
|
|
58
47
|
async getConnectionById(connectionId) {
|
|
59
48
|
const id = trim(connectionId);
|
|
60
|
-
if (!id)
|
|
49
|
+
if (!id)
|
|
61
50
|
return null;
|
|
62
|
-
}
|
|
63
|
-
const cached = this.connectionCache.get(id);
|
|
64
|
-
if (cached !== undefined) {
|
|
65
|
-
return cached;
|
|
66
|
-
}
|
|
67
51
|
try {
|
|
68
|
-
|
|
69
|
-
.withEntity(RootConfig.module.name, RootConfig.entities.integrationConnection.name)
|
|
70
|
-
.data()
|
|
71
|
-
.byKey(id);
|
|
72
|
-
const resolved = connection ?? null;
|
|
73
|
-
this.connectionCache.set(id, resolved);
|
|
74
|
-
if (resolved?.providerId) {
|
|
75
|
-
this.connectionProviderCache.set(id, trim(resolved.providerId) || null);
|
|
76
|
-
}
|
|
77
|
-
return resolved;
|
|
52
|
+
return (await this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.integrationConnection.name).data().byKey(id)) ?? null;
|
|
78
53
|
}
|
|
79
54
|
catch {
|
|
80
|
-
this.connectionCache.set(id, null);
|
|
81
55
|
return null;
|
|
82
56
|
}
|
|
83
57
|
}
|
|
@@ -97,22 +71,12 @@ class AXMIntegrationRefDisplayService {
|
|
|
97
71
|
}
|
|
98
72
|
async resolveProviderId(ref) {
|
|
99
73
|
const source = trim(ref.source ?? '');
|
|
100
|
-
if (source)
|
|
74
|
+
if (source)
|
|
101
75
|
return source;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (!connectionId) {
|
|
76
|
+
const id = trim(ref.connectionId ?? '');
|
|
77
|
+
if (!id)
|
|
105
78
|
return null;
|
|
106
|
-
|
|
107
|
-
const cached = this.connectionProviderCache.get(connectionId);
|
|
108
|
-
if (cached !== undefined) {
|
|
109
|
-
return cached;
|
|
110
|
-
}
|
|
111
|
-
const connection = await this.getConnectionById(connectionId);
|
|
112
|
-
const providerId = connection?.providerId ? trim(connection.providerId) : '';
|
|
113
|
-
const resolved = providerId || null;
|
|
114
|
-
this.connectionProviderCache.set(connectionId, resolved);
|
|
115
|
-
return resolved;
|
|
79
|
+
return trim((await this.getConnectionById(id))?.providerId ?? '') || null;
|
|
116
80
|
}
|
|
117
81
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationRefDisplayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
118
82
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMIntegrationRefDisplayService, providedIn: 'root' }); }
|
|
@@ -123,4 +87,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
123
87
|
}] });
|
|
124
88
|
|
|
125
89
|
export { AXMIntegrationRefDisplayService as A };
|
|
126
|
-
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-display.service-
|
|
90
|
+
//# sourceMappingURL=acorex-platform-module-integration-management-client-integration-ref-display.service-BQVHcUoD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-integration-management-client-integration-ref-display.service-BQVHcUoD.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 type { AXMIntegrationManagementIntegrationConnectionEntityModel } from '@acorex-platform/module-integration-management-client/contracts';\nimport { RootConfig } 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 ----- 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 provider = await this.domainRegistry.getProvider(providerId);\n if (!provider) {\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 return display;\n }\n\n async getConnectionById(connectionId: string): Promise<AXMIntegrationManagementIntegrationConnectionEntityModel | null> {\n const id = trim(connectionId);\n if (!id) return null;\n try {\n return (await this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.integrationConnection.name).data<string, AXMIntegrationManagementIntegrationConnectionEntityModel>().byKey(id)) ?? null;\n } catch {\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) return source;\n const id = trim(ref.connectionId ?? '');\n if (!id) return null;\n return trim((await this.getConnectionById(id))?.providerId ?? '') || null;\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;AAuE1D,IAAA;;;AAjEC,IAAA,mBAAmB,CAA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AC,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", "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 }); }
|
|
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-BU72XW6W.mjs","sources":["../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-filter-widget-edit.component.ts","../../../../libs/modules/integration-management/client/src/lib/features/widgets/integration-ref/integration-ref-filter-widget-edit.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXDataSource, AXValueChangedEvent } from '@acorex/cdk/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLookupComponent } from '@acorex/components/lookup';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPIntegrationDomainRegistryService } from '@acorex-platform/framework-client/common';\nimport { AXPLogoComponent } from '@acorex-platform/framework-client/core';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, viewChild } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isArray, isString } from 'lodash';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface IntegrationSourceFilterItem {\n id: string;\n title: string;\n logoKey?: string;\n icon?: string;\n}\n\ninterface IntegrationSourceFilterValue {\n value?: string | string[] | null;\n operation?: { type: string };\n displayText?: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-integration-ref-filter-widget-edit',\n templateUrl: './integration-ref-filter-widget-edit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AsyncPipe,\n FormsModule,\n AXDecoratorModule,\n AXLookupComponent,\n AXTranslationModule,\n AXPLogoComponent,\n ],\n})\nexport class AXMIntegrationRefFilterWidgetEditComponent extends AXPValueWidgetComponent<IntegrationSourceFilterValue | null> {\n //#region ----- Services & Dependencies -----\n\n private readonly domainRegistry = inject(AXPIntegrationDomainRegistryService);\n private readonly translateService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- View Children -----\n\n protected readonly lookup = viewChild<AXLookupComponent>('lookup');\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly value = computed(() => this.getValue()?.value);\n\n //#endregion\n\n //#region ----- Data Source -----\n\n protected readonly dataSource = new AXDataSource<IntegrationSourceFilterItem>({\n load: async () => {\n const items = await this.loadProviderItems();\n return { items, total: items.length };\n },\n byKey: async (id: unknown) => {\n const key = String(id ?? '');\n if (!key) {\n return { id: '', title: '' };\n }\n const items = await this.loadProviderItems();\n return items.find((item) => item.id === key) ?? { id: key, title: key };\n },\n pageSize: 100,\n key: 'id',\n });\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected handleValueChange(event: AXValueChangedEvent): void {\n if (!event.isUserInteraction) {\n return;\n }\n\n const selected = this.normalizeSelectedIds(event.value);\n if (selected.length === 0) {\n this.setValue(null);\n return;\n }\n\n const displayText = this.resolveDisplayTextSync(selected);\n this.setValue({\n value: selected.length === 1 ? selected[0] : selected,\n operation: { type: selected.length === 1 ? 'equal' : 'in' },\n displayText,\n });\n\n if (!displayText) {\n void this.enrichDisplayText(selected);\n }\n }\n\n focus(): void {\n this.lookup()?.focus();\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private providerItemsCache: IntegrationSourceFilterItem[] | null = null;\n\n private async loadProviderItems(): Promise<IntegrationSourceFilterItem[]> {\n if (this.providerItemsCache) {\n return this.providerItemsCache;\n }\n\n const providers = await this.domainRegistry.listProviders();\n const items: IntegrationSourceFilterItem[] = [];\n\n for (const provider of providers) {\n const title = provider.displayName?.startsWith('@')\n ? await this.translateService.translateAsync(provider.displayName)\n : provider.displayName;\n items.push({\n id: provider.id,\n title: title || provider.id,\n logoKey: provider.logoKey,\n icon: provider.icon,\n });\n }\n\n items.sort((a, b) => a.title.localeCompare(b.title));\n this.providerItemsCache = items;\n return items;\n }\n\n private resolveDisplayTextSync(selected: string[]): string {\n const cached = this.providerItemsCache;\n if (!cached) {\n return selected.join(', ');\n }\n return selected.map((id) => cached.find((item) => item.id === id)?.title ?? id).join(', ');\n }\n\n private async enrichDisplayText(selected: string[]): Promise<void> {\n const items = await this.loadProviderItems();\n const current = this.getValue();\n if (!current?.value) {\n return;\n }\n const titles = selected.map((id) => items.find((item) => item.id === id)?.title ?? id).join(', ');\n this.setValue({\n ...current,\n displayText: titles,\n });\n }\n\n private normalizeSelectedIds(raw: unknown): string[] {\n if (raw == null || raw === '') {\n return [];\n }\n if (isArray(raw)) {\n return raw\n .map((item) => {\n if (isString(item)) {\n return item.trim();\n }\n if (item && typeof item === 'object' && 'id' in item) {\n return String((item as { id: unknown }).id ?? '').trim();\n }\n return String(item ?? '').trim();\n })\n .filter((id) => id.length > 0);\n }\n if (isString(raw)) {\n const id = raw.trim();\n return id ? [id] : [];\n }\n if (raw && typeof raw === 'object' && 'id' in raw) {\n const id = String((raw as { id: unknown }).id ?? '').trim();\n return id ? [id] : [];\n }\n return [];\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"flex w-full items-center\">\n <ax-lookup\n #lookup\n class=\"w-full\"\n mode=\"multi-select\"\n textField=\"title\"\n valueField=\"id\"\n [searchable]=\"false\"\n [placeholder]=\"\n ('@integration-management:widgets.integration-ref.filter.placeholder' | translate | async) ?? ''\n \"\n [dataSource]=\"dataSource\"\n [ngModel]=\"value()\"\n (onValueChanged)=\"handleValueChange($event)\"\n [itemTemplate]=\"itemTemplate\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-lookup>\n\n <ng-template #itemTemplate let-item>\n <div class=\"flex w-full items-center gap-2\">\n @if (item.logoKey) {\n <axp-logo [logoKey]=\"item.logoKey\" appearance=\"colored\" [size]=\"16\" />\n }\n <!-- ----- Fallback FA icon when provider has no logoKey ----- -->\n @else if (item.icon) {\n <i [class]=\"item.icon\" class=\"shrink-0 text-sm\"></i>\n }\n <span class=\"truncate\">{{ item.title }}</span>\n </div>\n </ng-template>\n</div>\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;AAAA;AA+BA;AAEA;AAeM,MAAO,0CAA2C,SAAQ,uBAA4D,CAAA;AAb5H,IAAA,WAAA,GAAA;;;AAgBmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mCAAmC,CAAC;AAC5D,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;;;QAM7C,IAAA,CAAA,MAAM,GAAG,SAAS,CAAoB,QAAQ;mFAAC;;;QAM/C,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK;kFAAC;;;QAM9C,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,CAA8B;YAC5E,IAAI,EAAE,YAAW;AACf,gBAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE;gBAC5C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;YACvC,CAAC;AACD,YAAA,KAAK,EAAE,OAAO,EAAW,KAAI;gBAC3B,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;gBAC5B,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE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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;AAC5D,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,oBAAoB,CAAC;;;QAM7C,IAAA,CAAA,MAAM,GAAG,SAAS,CAAoB,QAAQ;mFAAC;;;QAM/C,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK;kFAAC;;;QAM9C,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,CAA8B;YAC5E,IAAI,EAAE,YAAW;AACf,gBAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE;gBAC5C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;YACvC,CAAC;AACD,YAAA,KAAK,EAAE,OAAO,EAAW,KAAI;gBAC3B,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;gBAC5B,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE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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-BQVHcUoD.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-DKotZKGJ.mjs.map
|