@acorex-platform/module-platform-management-client 2.0.0-next.50 → 2.0.0-next.54
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-platform-management-client-acorex-platform-module-platform-management-client-mS8l_Uk1.mjs → acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs} +50 -50
- package/fesm2022/{acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-mS8l_Uk1.mjs.map → acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-CbzyYYWN.mjs} +9 -9
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-CbzyYYWN.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-DwENR7lZ.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-DwENR7lZ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-CXqUxond.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-CXqUxond.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-NWCJQrKZ.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-NWCJQrKZ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-CPv52ji_.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-CPv52ji_.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-C0RT988C.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-C0RT988C.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DOIP7h0R.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DOIP7h0R.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-CgEWIzYU.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-CgEWIzYU.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-CYeauxBL.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-CYeauxBL.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs → acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs.map → acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query.command-CvUgyzEk.mjs → acorex-platform-module-platform-management-client-create-user-query.command-BgG5SEjW.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query.command-CvUgyzEk.mjs.map → acorex-platform-module-platform-management-client-create-user-query.command-BgG5SEjW.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-customize-menu.command-B_Ld4IRz.mjs → acorex-platform-module-platform-management-client-customize-menu.command-DLLZuS10.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-customize-menu.command-B_Ld4IRz.mjs.map → acorex-platform-module-platform-management-client-customize-menu.command-DLLZuS10.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs → acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-BSYxNi74.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs.map → acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-BSYxNi74.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.component-BB3e3REg.mjs → acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.component-BB3e3REg.mjs.map → acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.provider-CZYT6Trb.mjs → acorex-platform-module-platform-management-client-entity-definition-form-page.provider-DO3W-Hx1.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.provider-CZYT6Trb.mjs.map → acorex-platform-module-platform-management-client-entity-definition-form-page.provider-DO3W-Hx1.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs → acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs.map → acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-execute-token.command-B_xwW9lb.mjs → acorex-platform-module-platform-management-client-execute-token.command-D-6zPkdc.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-execute-token.command-B_xwW9lb.mjs.map → acorex-platform-module-platform-management-client-execute-token.command-D-6zPkdc.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs → acorex-platform-module-platform-management-client-list-catalog-scopes.query-BXoGbG82.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs.map → acorex-platform-module-platform-management-client-list-catalog-scopes.query-BXoGbG82.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs → acorex-platform-module-platform-management-client-list-editor-widgets.query-Bmzf4dYS.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs.map → acorex-platform-module-platform-management-client-list-editor-widgets.query-Bmzf4dYS.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs → acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-7_-GTKQw.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs.map → acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-7_-GTKQw.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs → acorex-platform-module-platform-management-client-list-registered-entities.query-01gokkyo.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs.map → acorex-platform-module-platform-management-client-list-registered-entities.query-01gokkyo.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs → acorex-platform-module-platform-management-client-list-registered-queries.query-CqpTep6_.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs.map → acorex-platform-module-platform-management-client-list-registered-queries.query-CqpTep6_.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-SnvQ2KbJ.mjs → acorex-platform-module-platform-management-client-menu-list.component-CZf5cHCK.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-SnvQ2KbJ.mjs.map → acorex-platform-module-platform-management-client-menu-list.component-CZf5cHCK.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs → acorex-platform-module-platform-management-client-platform-console-charts.queries-CXoMSE_r.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs.map → acorex-platform-module-platform-management-client-platform-console-charts.queries-CXoMSE_r.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs → acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs.map → acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs → acorex-platform-module-platform-management-client-platform-console-kpi.queries-BfjJfn8V.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs.map → acorex-platform-module-platform-management-client-platform-console-kpi.queries-BfjJfn8V.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs → acorex-platform-module-platform-management-client-query-contract-widget-column.component-2W2BHT3F.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-column.component-2W2BHT3F.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-edit.component-DJDUE6lF.mjs → acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-edit.component-DJDUE6lF.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs → acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DCfCyide.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DCfCyide.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BIhejA5a.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-DMivRLvp.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BIhejA5a.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-DMivRLvp.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-TMZbJDMf.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DAEUuDBa.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-TMZbJDMf.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DAEUuDBa.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs → acorex-platform-module-platform-management-client-run-user-query.command-CmO6zxh8.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs.map → acorex-platform-module-platform-management-client-run-user-query.command-CmO6zxh8.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client.mjs +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ import { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';
|
|
|
3
3
|
import { runtimeQuerySuccessObject, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { inject, Injectable } from '@angular/core';
|
|
6
|
-
import { a as queryEntityItems, P as PLATFORM_CHART_COLORS, t as titleCaseStatus, r as resolveDisplayTitle, c as countInsightErrors } from './acorex-platform-module-platform-management-client-platform-console-data.util-
|
|
6
|
+
import { a as queryEntityItems, P as PLATFORM_CHART_COLORS, t as titleCaseStatus, r as resolveDisplayTitle, c as countInsightErrors } from './acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs';
|
|
7
7
|
|
|
8
8
|
//#region ----- Imports -----
|
|
9
9
|
//#endregion
|
|
@@ -213,4 +213,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
213
213
|
}] });
|
|
214
214
|
|
|
215
215
|
export { AXMPlatformApplicationsByEditionDonutQuery, AXMPlatformErrorsTrendLineQuery, AXMPlatformJobsByStatusBarQuery, AXMPlatformTenantsByStatusBarQuery };
|
|
216
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-charts.queries-
|
|
216
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-charts.queries-CXoMSE_r.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/dashboard/queries/platform-console-charts.queries.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type {\n AXPBarChartQueryResult,\n AXPDonutChartQueryResult,\n AXPLineChartQueryResult,\n} from '@acorex-platform/module-dashboard-management-client/contracts';\n\nimport { Injectable, inject } from '@angular/core';\nimport {\n PLATFORM_CHART_COLORS,\n countInsightErrors,\n queryEntityItems,\n resolveDisplayTitle,\n titleCaseStatus,\n} from './platform-console-data.util';\n\n//#endregion\n\n//#region ----- Tenants by status (bar) -----\n\n/** Live bar series: TenantManagement.Tenant grouped by statusId. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformTenantsByStatusBarQuery implements AXPQuery<void, AXPBarChartQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPBarChartQueryResult> {\n try {\n const tenants = await queryEntityItems(this.entityService, 'TenantManagement', 'Tenant');\n const counts = new Map<string, number>();\n for (const tenant of tenants) {\n const status = String(tenant['statusId'] ?? 'unknown');\n counts.set(status, (counts.get(status) ?? 0) + 1);\n }\n\n // Stable order for known statuses, then any extras.\n const preferred = ['active', 'pending', 'inactive', 'suspended', 'archived'];\n const keys = [\n ...preferred.filter((k) => counts.has(k)),\n ...[...counts.keys()].filter((k) => !preferred.includes(k)).sort(),\n ];\n\n return runtimeQuerySuccessObject({\n items: keys.map((status, index) => ({\n id: status,\n label: titleCaseStatus(status),\n value: counts.get(status) ?? 0,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n })),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load tenants by status',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Applications by edition (donut) -----\n\n/** Live donut series: ApplicationManagement.Application exploded by editionIds. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformApplicationsByEditionDonutQuery\n implements AXPQuery<void, AXPDonutChartQueryResult>\n{\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPDonutChartQueryResult> {\n try {\n const [apps, editions] = await Promise.all([\n queryEntityItems(this.entityService, 'ApplicationManagement', 'Application'),\n queryEntityItems(this.entityService, 'ApplicationManagement', 'Edition'),\n ]);\n\n const editionTitleById = new Map<string, string>();\n for (const edition of editions) {\n const id = String(edition['id'] ?? '');\n if (id) {\n editionTitleById.set(id, resolveDisplayTitle(edition['title']) || id);\n }\n }\n\n const counts = new Map<string, { label: string; value: number }>();\n for (const app of apps) {\n const editionIds = Array.isArray(app['editionIds']) ? (app['editionIds'] as string[]) : [];\n if (editionIds.length === 0) {\n const key = 'unassigned';\n const current = counts.get(key) ?? { label: 'Unassigned', value: 0 };\n current.value += 1;\n counts.set(key, current);\n continue;\n }\n for (const editionId of editionIds) {\n const key = String(editionId);\n const current = counts.get(key) ?? {\n label: editionTitleById.get(key) || key,\n value: 0,\n };\n current.value += 1;\n counts.set(key, current);\n }\n }\n\n const items = [...counts.entries()]\n .sort((a, b) => b[1].value - a[1].value || a[1].label.localeCompare(b[1].label))\n .map(([id, row], index) => ({\n id,\n label: row.label,\n value: row.value,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n }));\n\n return runtimeQuerySuccessObject({ items });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load applications by edition',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Errors trend (line) -----\n\n/** Live line series: SystemInsight error counts per day for the last 7 days. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformErrorsTrendLineQuery implements AXPQuery<void, AXPLineChartQueryResult> {\n private readonly queryExecutor = inject(AXPQueryExecutor);\n\n async fetch(): AXPQueryFetchResultPromise<AXPLineChartQueryResult> {\n try {\n const now = new Date();\n const dayMs = 24 * 60 * 60 * 1000;\n const dayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n const points: Array<{ x: string; y: number }> = [];\n\n const dayWindows = Array.from({ length: 7 }, (_, index) => {\n const offset = 6 - index;\n const dayEnd = new Date(now.getTime() - offset * dayMs);\n const dayStart = new Date(dayEnd.getTime() - dayMs);\n return { dayEnd, dayStart };\n });\n const counts = await Promise.all(\n dayWindows.map(({ dayStart, dayEnd }) => countInsightErrors(this.queryExecutor, dayStart, dayEnd)),\n );\n for (let i = 0; i < dayWindows.length; i++) {\n points.push({\n x: dayLabels[dayWindows[i].dayEnd.getDay()],\n y: counts[i],\n });\n }\n\n return runtimeQuerySuccessObject({\n series: [\n {\n id: 'errors',\n label: 'Errors',\n lineColor: '#ef4444',\n fillColor: '#ef444420',\n data: points,\n },\n ],\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load errors trend',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Jobs by status (bar) -----\n\nconst JOB_STATUS_ORDER = [\n 'completed',\n 'failed',\n 'running',\n 'queued',\n 'scheduled',\n 'created',\n 'paused',\n 'cancelled',\n 'dead-lettered',\n] as const;\n\n/** Live bar series: BackgroundJobManagement.BackgroundJob grouped by status. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformJobsByStatusBarQuery implements AXPQuery<void, AXPBarChartQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPBarChartQueryResult> {\n try {\n const jobs = await queryEntityItems(\n this.entityService,\n 'BackgroundJobManagement',\n 'BackgroundJob',\n );\n const counts = new Map<string, number>();\n for (const job of jobs) {\n const status = String(job['status'] ?? 'unknown');\n counts.set(status, (counts.get(status) ?? 0) + 1);\n }\n\n const keys = [\n ...JOB_STATUS_ORDER.filter((k) => counts.has(k)),\n ...[...counts.keys()].filter((k) => !(JOB_STATUS_ORDER as readonly string[]).includes(k)).sort(),\n ];\n\n // Always show the common statuses even when empty so the chart stays readable.\n const displayKeys =\n keys.length > 0\n ? keys\n : (['completed', 'failed', 'running', 'queued'] as string[]);\n\n return runtimeQuerySuccessObject({\n items: displayKeys.map((status, index) => ({\n id: status,\n label: titleCaseStatus(status),\n value: counts.get(status) ?? 0,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n })),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load jobs by status',\n );\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAwBA;AAEA;AAEA;MAEa,kCAAkC,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAgC1D,IAAA;AA9BC,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,IAAI;AACF,YAAA,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,kBAAkB,EAAE,QAAQ,CAAC;AACxF,YAAA,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB;AACxC,YAAA,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC;AACtD,gBAAA,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD;;AAGA,YAAA,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;AAC5E,YAAA,MAAM,IAAI,GAAG;AACX,gBAAA,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBACzC,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CA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,EAAE,eAAe,CAAC,MAAM,CAAC;oBAC9B,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;oBAC9B,KAAK,EAAE,qBAAqB,CAAC,KAAK,GAAG,qBAAqB,CAAC,MAAM,CAAC;AACnE,iBAAA,CAAC,CAAC;AACJ,aAAA,CAAC;QACJ;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,+BAA+B,CACzE;QACH;IACF;8GAxCW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-charts.queries-CXoMSE_r.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/dashboard/queries/platform-console-charts.queries.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type {\n AXPBarChartQueryResult,\n AXPDonutChartQueryResult,\n AXPLineChartQueryResult,\n} from '@acorex-platform/module-dashboard-management-client/contracts';\n\nimport { Injectable, inject } from '@angular/core';\nimport {\n PLATFORM_CHART_COLORS,\n countInsightErrors,\n queryEntityItems,\n resolveDisplayTitle,\n titleCaseStatus,\n} from './platform-console-data.util';\n\n//#endregion\n\n//#region ----- Tenants by status (bar) -----\n\n/** Live bar series: TenantManagement.Tenant grouped by statusId. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformTenantsByStatusBarQuery implements AXPQuery<void, AXPBarChartQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPBarChartQueryResult> {\n try {\n const tenants = await queryEntityItems(this.entityService, 'TenantManagement', 'Tenant');\n const counts = new Map<string, number>();\n for (const tenant of tenants) {\n const status = String(tenant['statusId'] ?? 'unknown');\n counts.set(status, (counts.get(status) ?? 0) + 1);\n }\n\n // Stable order for known statuses, then any extras.\n const preferred = ['active', 'pending', 'inactive', 'suspended', 'archived'];\n const keys = [\n ...preferred.filter((k) => counts.has(k)),\n ...[...counts.keys()].filter((k) => !preferred.includes(k)).sort(),\n ];\n\n return runtimeQuerySuccessObject({\n items: keys.map((status, index) => ({\n id: status,\n label: titleCaseStatus(status),\n value: counts.get(status) ?? 0,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n })),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load tenants by status',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Applications by edition (donut) -----\n\n/** Live donut series: ApplicationManagement.Application exploded by editionIds. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformApplicationsByEditionDonutQuery\n implements AXPQuery<void, AXPDonutChartQueryResult>\n{\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPDonutChartQueryResult> {\n try {\n const [apps, editions] = await Promise.all([\n queryEntityItems(this.entityService, 'ApplicationManagement', 'Application'),\n queryEntityItems(this.entityService, 'ApplicationManagement', 'Edition'),\n ]);\n\n const editionTitleById = new Map<string, string>();\n for (const edition of editions) {\n const id = String(edition['id'] ?? '');\n if (id) {\n editionTitleById.set(id, resolveDisplayTitle(edition['title']) || id);\n }\n }\n\n const counts = new Map<string, { label: string; value: number }>();\n for (const app of apps) {\n const editionIds = Array.isArray(app['editionIds']) ? (app['editionIds'] as string[]) : [];\n if (editionIds.length === 0) {\n const key = 'unassigned';\n const current = counts.get(key) ?? { label: 'Unassigned', value: 0 };\n current.value += 1;\n counts.set(key, current);\n continue;\n }\n for (const editionId of editionIds) {\n const key = String(editionId);\n const current = counts.get(key) ?? {\n label: editionTitleById.get(key) || key,\n value: 0,\n };\n current.value += 1;\n counts.set(key, current);\n }\n }\n\n const items = [...counts.entries()]\n .sort((a, b) => b[1].value - a[1].value || a[1].label.localeCompare(b[1].label))\n .map(([id, row], index) => ({\n id,\n label: row.label,\n value: row.value,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n }));\n\n return runtimeQuerySuccessObject({ items });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load applications by edition',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Errors trend (line) -----\n\n/** Live line series: SystemInsight error counts per day for the last 7 days. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformErrorsTrendLineQuery implements AXPQuery<void, AXPLineChartQueryResult> {\n private readonly queryExecutor = inject(AXPQueryExecutor);\n\n async fetch(): AXPQueryFetchResultPromise<AXPLineChartQueryResult> {\n try {\n const now = new Date();\n const dayMs = 24 * 60 * 60 * 1000;\n const dayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n const points: Array<{ x: string; y: number }> = [];\n\n const dayWindows = Array.from({ length: 7 }, (_, index) => {\n const offset = 6 - index;\n const dayEnd = new Date(now.getTime() - offset * dayMs);\n const dayStart = new Date(dayEnd.getTime() - dayMs);\n return { dayEnd, dayStart };\n });\n const counts = await Promise.all(\n dayWindows.map(({ dayStart, dayEnd }) => countInsightErrors(this.queryExecutor, dayStart, dayEnd)),\n );\n for (let i = 0; i < dayWindows.length; i++) {\n points.push({\n x: dayLabels[dayWindows[i].dayEnd.getDay()],\n y: counts[i],\n });\n }\n\n return runtimeQuerySuccessObject({\n series: [\n {\n id: 'errors',\n label: 'Errors',\n lineColor: '#ef4444',\n fillColor: '#ef444420',\n data: points,\n },\n ],\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load errors trend',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Jobs by status (bar) -----\n\nconst JOB_STATUS_ORDER = [\n 'completed',\n 'failed',\n 'running',\n 'queued',\n 'scheduled',\n 'created',\n 'paused',\n 'cancelled',\n 'dead-lettered',\n] as const;\n\n/** Live bar series: BackgroundJobManagement.BackgroundJob grouped by status. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformJobsByStatusBarQuery implements AXPQuery<void, AXPBarChartQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPBarChartQueryResult> {\n try {\n const jobs = await queryEntityItems(\n this.entityService,\n 'BackgroundJobManagement',\n 'BackgroundJob',\n );\n const counts = new Map<string, number>();\n for (const job of jobs) {\n const status = String(job['status'] ?? 'unknown');\n counts.set(status, (counts.get(status) ?? 0) + 1);\n }\n\n const keys = [\n ...JOB_STATUS_ORDER.filter((k) => counts.has(k)),\n ...[...counts.keys()].filter((k) => !(JOB_STATUS_ORDER as readonly string[]).includes(k)).sort(),\n ];\n\n // Always show the common statuses even when empty so the chart stays readable.\n const displayKeys =\n keys.length > 0\n ? keys\n : (['completed', 'failed', 'running', 'queued'] as string[]);\n\n return runtimeQuerySuccessObject({\n items: displayKeys.map((status, index) => ({\n id: status,\n label: titleCaseStatus(status),\n value: counts.get(status) ?? 0,\n color: PLATFORM_CHART_COLORS[index % PLATFORM_CHART_COLORS.length],\n })),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : '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OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,+BAA+B,CACzE;QACH;IACF;8GAxCW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -78,4 +78,4 @@ const PLATFORM_CHART_COLORS = [
|
|
|
78
78
|
//#endregion
|
|
79
79
|
|
|
80
80
|
export { PLATFORM_CHART_COLORS as P, queryEntityItems as a, countInsightErrors as c, queryEntityTotal as q, resolveDisplayTitle as r, titleCaseStatus as t };
|
|
81
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-data.util-
|
|
81
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-data.util-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/dashboard/queries/platform-console-data.util.ts"],"sourcesContent":["/**\n * Shared helpers for Platform Console dashboard queries (entity counts + insight windows).\n */\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { runtimeQueryCollectionData } from '@acorex-platform/framework-shared/core';\nimport { AXMSystemInsightQueryKeys } from '@acorex-platform/module-system-insight-client/contracts';\n\n//#region ----- Entity helpers -----\n\nexport async function queryEntityTotal(\n entityService: AXPEntityService,\n moduleName: string,\n entityName: string,\n): Promise<number> {\n const data = entityService.withEntity(moduleName, entityName).data();\n const result = await data.query({ skip: 0, take: 1 });\n return typeof result.total === 'number' ? result.total : (result.items?.length ?? 0);\n}\n\nexport async function queryEntityItems(\n entityService: AXPEntityService,\n moduleName: string,\n entityName: string,\n take = 5000,\n): Promise<Record<string, unknown>[]> {\n const data = entityService.withEntity(moduleName, entityName).data();\n const result = await data.query({ skip: 0, take });\n return (result.items ?? []) as unknown as Record<string, unknown>[];\n}\n\nexport function resolveDisplayTitle(value: unknown): string {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n if (typeof value === 'object' && !Array.isArray(value)) {\n const map = value as Record<string, string>;\n return map['en-US'] || map['fa-IR'] || Object.values(map).find((v) => typeof v === 'string' && v) || '';\n }\n return String(value);\n}\n\nexport function titleCaseStatus(statusId: string): string {\n if (!statusId) {\n return 'Unknown';\n }\n return statusId\n .split(/[-_]/)\n .filter(Boolean)\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(' ');\n}\n\n//#endregion\n\n//#region ----- System insight errors -----\n\nfunction insightTimeFilter(from: Date, to: Date): Record<string, unknown> {\n return {\n logic: 'and',\n filters: [\n { field: 'from', operator: { type: 'equal' }, value: from.toISOString() },\n { field: 'to', operator: { type: 'equal' }, value: to.toISOString() },\n ],\n };\n}\n\n/** Counts SystemInsight error events in `[from, to)` via the remote ErrorEvent:List query. */\nexport async function countInsightErrors(\n queryExecutor: AXPQueryExecutor,\n from: Date,\n to: Date,\n): Promise<number> {\n try {\n const result = await queryExecutor.fetch<Record<string, unknown>, unknown>(\n AXMSystemInsightQueryKeys.ErrorEvent.List,\n {\n skip: 0,\n take: 1,\n filter: insightTimeFilter(from, to),\n },\n );\n const page = runtimeQueryCollectionData(result);\n return typeof page?.total === 'number' ? page.total : (page?.items?.length ?? 0);\n } catch {\n return 0;\n }\n}\n\n//#endregion\n\n//#region ----- Chart colors -----\n\nexport const PLATFORM_CHART_COLORS = [\n '#43b57f',\n '#3b82f6',\n '#f59e0b',\n '#ef4444',\n '#8b5cf6',\n '#0ea5e9',\n '#64748b',\n] as const;\n\n//#endregion\n"],"names":[],"mappings":";;;AAAA;;AAEG;AAOH;AAEO,eAAe,gBAAgB,CACpC,aAA+B,EAC/B,UAAkB,EAClB,UAAkB,EAAA;AAElB,IAAA,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE;AACpE,IAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACrD,OAAO,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC;AACtF;AAEO,eAAe,gBAAgB,CACpC,aAA+B,EAC/B,UAAkB,EAClB,UAAkB,EAClB,IAAI,GAAG,IAAI,EAAA;AAEX,IAAA,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE;AACpE,IAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;AAClD,IAAA,QAAQ,MAAM,CAAC,KAAK,IAAI,EAAE;AAC5B;AAEM,SAAU,mBAAmB,CAAC,KAAc,EAAA;AAChD,IAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,QAAA,OAAO,EAAE;IACX;AACA,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI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C,yBAAyB,CAAC,UAAU,CAAC,IAAI,EACzC;AACE,YAAA,IAAI,EAAE,CAAC;AACP,YAAA,IAAI,EAAE,CAAC;AACP,YAAA,MAAM,EAAE,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC;AACpC,SAAA,CACF;AACD,QAAA,MAAM,IAAI,GAAG,0BAA0B,CAAC,MAAM,CAAC;QAC/C,OAAO,OAAO,IAAI,EAAE,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC;IAClF;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,CAAC;IACV;AACF;AAEA;AAEA;AAEO,MAAM,qBAAqB,GAAG;IACnC,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;;AAGX;;"}
|
|
@@ -3,7 +3,7 @@ import { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';
|
|
|
3
3
|
import { runtimeQuerySuccessObject, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { inject, Injectable } from '@angular/core';
|
|
6
|
-
import { q as queryEntityTotal, c as countInsightErrors } from './acorex-platform-module-platform-management-client-platform-console-data.util-
|
|
6
|
+
import { q as queryEntityTotal, c as countInsightErrors } from './acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs';
|
|
7
7
|
|
|
8
8
|
//#region ----- Imports -----
|
|
9
9
|
//#endregion
|
|
@@ -134,4 +134,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
134
134
|
}] });
|
|
135
135
|
|
|
136
136
|
export { AXMPlatformApplicationsKpiQuery, AXMPlatformErrorsKpiQuery, AXMPlatformTenantsKpiQuery, AXMPlatformUsersKpiQuery };
|
|
137
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-kpi.queries-
|
|
137
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-platform-console-kpi.queries-BfjJfn8V.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-kpi.queries-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-platform-console-kpi.queries-BfjJfn8V.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/dashboard/queries/platform-console-kpi.queries.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPKpiStatCardQueryResult } from '@acorex-platform/module-dashboard-management-client/contracts';\n\nimport { Injectable, inject } from '@angular/core';\nimport { countInsightErrors, queryEntityTotal } from './platform-console-data.util';\n\n//#endregion\n\n//#region ----- Tenants KPI -----\n\n/** Live KPI: total rows in TenantManagement.Tenant. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformTenantsKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'TenantManagement', 'Tenant');\n return runtimeQuerySuccessObject({\n title: 'Tenants',\n value,\n icon: 'fa-light fa-building',\n iconTone: 'primary',\n });\n } catch (error) {\n return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load tenants KPI');\n }\n }\n}\n\n//#endregion\n\n//#region ----- Users KPI -----\n\n/** Live KPI: total memberships in TenantManagement.TenantUser (platform-wide). */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformUsersKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'TenantManagement', 'TenantUser');\n return runtimeQuerySuccessObject({\n title: 'Users',\n value,\n icon: 'fa-light fa-users',\n iconTone: 'info',\n });\n } catch (error) {\n return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load users KPI');\n }\n }\n}\n\n//#endregion\n\n//#region ----- Applications KPI -----\n\n/** Live KPI: total rows in ApplicationManagement.Application. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformApplicationsKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'ApplicationManagement', 'Application');\n return runtimeQuerySuccessObject({\n title: 'Applications',\n value,\n icon: 'fa-light fa-grid-2',\n iconTone: 'secondary',\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load applications KPI',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Errors KPI -----\n\n/** Live KPI: SystemInsight error events in the last 24 hours vs prior 24 hours. */\n@Injectable({ providedIn: 'root' })\nexport class AXMPlatformErrorsKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly queryExecutor = inject(AXPQueryExecutor);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const now = new Date();\n const dayMs = 24 * 60 * 60 * 1000;\n const from24h = new Date(now.getTime() - dayMs);\n const from48h = new Date(now.getTime() - 2 * dayMs);\n\n const [current, previous] = await Promise.all([\n countInsightErrors(this.queryExecutor, from24h, now),\n countInsightErrors(this.queryExecutor, from48h, from24h),\n ]);\n\n const delta = current - previous;\n const trendValue = delta === 0 ? '0' : delta > 0 ? `+${delta}` : String(delta);\n\n return runtimeQuerySuccessObject({\n title: 'Errors (24h)',\n value: current,\n icon: 'fa-light fa-triangle-exclamation',\n iconTone: current > 0 ? 'danger' : 'success',\n trendValue,\n trendLabel: 'vs prior day',\n trendStatus: delta > 0 ? 'danger' : delta < 0 ? 'success' : 'neutral',\n titleBadgeText: '24h',\n titleBadgeTone: 'warning',\n });\n } catch (error) {\n return runtimeQueryFailure(error instanceof Error ? error.message : 'Failed to load errors KPI');\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAcA;AAEA;AAEA;MAEa,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAe1D,IAAA;AAbC,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,IAAI;AACF,YAAA,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,kBAAkB,EAAE,QAAQ,CAAC;AACtF,YAAA,OAAO,yBAAyB,CAAC;AAC/B,gBAAA,KAAK,EAAE,SAAS;gBAChB,KAAK;AACL,gBAAA,IAAI,EAAE,sBAAsB;AAC5B,gBAAA,QAAQ,EAAE,SAAS;AACpB,aAAA,CAAC;QACJ;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CAAC,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,4BAA4B,CAAC;QACnG;IACF;8GAfW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,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,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EA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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
import { q as formatContractCapabilitiesSummary } from './acorex-platform-module-platform-management-client-create-user-query-contract.util-
|
|
4
|
+
import { q as formatContractCapabilitiesSummary } from './acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs';
|
|
5
5
|
|
|
6
6
|
//#region ----- Imports -----
|
|
7
7
|
//#endregion
|
|
@@ -42,4 +42,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
42
42
|
}] });
|
|
43
43
|
|
|
44
44
|
export { AXMQueryContractWidgetColumnComponent };
|
|
45
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-query-contract-widget-column.component-
|
|
45
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-query-contract-widget-column.component-2W2BHT3F.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-column.component-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-column.component-2W2BHT3F.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-column.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatContractCapabilitiesSummary } from '../query-definition/create-user-query-contract.util';\nimport type { AXPUserQueryContractCapabilities } from '../query-definition/create-user-query.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-query-contract-widget-column',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty contract capabilities ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMQueryContractWidgetColumnComponent extends AXPValueWidgetComponent<AXPUserQueryContractCapabilities> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatContractCapabilitiesSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,qCAAsC,SAAQ,uBAAyD,CAAA;AAbpH,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,iCAAiC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGhG,IAAA;8GANY,qCAAqC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qCAAqC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXtC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBAbjD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
|
|
@@ -14,8 +14,8 @@ import { signal, computed, effect, untracked, ChangeDetectionStrategy, Component
|
|
|
14
14
|
import * as i1 from '@angular/forms';
|
|
15
15
|
import { FormsModule } from '@angular/forms';
|
|
16
16
|
import { isEqual } from 'lodash-es';
|
|
17
|
-
import { a as resolveAvailableContractFields, s as selectedFieldPathsFromGroups, i as pathsFromFilterSection, j as pathsFromSortSection, k as isCollectionQueryKind, l as reconcileContractCapabilities, t as toFilterSection, m as toSortSection, D as DEFAULT_USER_QUERY_PAGING, o as createDefaultContractCapabilities } from './acorex-platform-module-platform-management-client-create-user-query-contract.util-
|
|
18
|
-
import { C as CREATE_USER_QUERY_I18N } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-
|
|
17
|
+
import { a as resolveAvailableContractFields, s as selectedFieldPathsFromGroups, i as pathsFromFilterSection, j as pathsFromSortSection, k as isCollectionQueryKind, l as reconcileContractCapabilities, t as toFilterSection, m as toSortSection, D as DEFAULT_USER_QUERY_PAGING, o as createDefaultContractCapabilities } from './acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs';
|
|
18
|
+
import { C as CREATE_USER_QUERY_I18N } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs';
|
|
19
19
|
|
|
20
20
|
//#region ----- Imports -----
|
|
21
21
|
//#endregion
|
|
@@ -153,14 +153,14 @@ class AXMQueryContractWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMQueryContractWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
156
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMQueryContractWidgetEditComponent, isStandalone: true, selector: "axm-query-contract-widget-edit", host: { classAttribute: "block w-full" }, usesInheritance: true, ngImport: i0, template: "<!-- ----- Filterable fields callers may send (all kinds) ----- -->\n<div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.filterableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.filterableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"filterPaths()\"\n (ngModelChange)=\"onFilterPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.filterableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n</div>\n\n@if (isCollection()) {\n <!-- ----- Collection sort, paging, and lookup binding ----- -->\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.sortableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.sortableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"sortPaths()\"\n (ngModelChange)=\"onSortPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.sortableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n\n <!-- ----- Paging skip/take contract ----- -->\n <div class=\"axm-query-contract-widget__section axm-query-contract-widget__section--row\">\n <div class=\"axm-query-contract-widget__paging-copy\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.paging | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.paging | translate | async }}\n </p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"pagingEnabled()\"\n (ngModelChange)=\"onPagingChange($event)\"\n ></ax-switch>\n </div>\n\n <!-- ----- Lookup binding value and text fields ----- -->\n <div class=\"axm-query-contract-widget__binding\">\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.valueField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"valueField()\"\n (ngModelChange)=\"onValueFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.textField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"textField()\"\n (ngModelChange)=\"onTextFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n </div>\n}\n", styles: ["@layer properties;.axm-query-contract-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-query-contract-widget__section{display:flex;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axm-query-contract-widget__section--row{flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 4)}.axm-query-contract-widget__paging-copy{display:flex;min-width:0px;flex-direction:column;gap:var(--spacing, .25rem)}.axm-query-contract-widget__title{margin:0;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-query-contract-widget__hint{margin:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-query-contract-widget__hint{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-query-contract-widget__binding{display:grid;width:100%;grid-template-columns:repeat(1,minmax(0,1fr));gap:calc(var(--spacing, .25rem) * 4)}@media(width>=48rem){.axm-query-contract-widget__binding{grid-template-columns:repeat(2,minmax(0,1fr))}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim:
|
|
156
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMQueryContractWidgetEditComponent, isStandalone: true, selector: "axm-query-contract-widget-edit", host: { classAttribute: "block w-full" }, usesInheritance: true, ngImport: i0, template: "<!-- ----- Filterable fields callers may send (all kinds) ----- -->\n<div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.filterableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.filterableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"filterPaths()\"\n (ngModelChange)=\"onFilterPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.filterableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n</div>\n\n@if (isCollection()) {\n <!-- ----- Collection sort, paging, and lookup binding ----- -->\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.sortableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.sortableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"sortPaths()\"\n (ngModelChange)=\"onSortPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.sortableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n\n <!-- ----- Paging skip/take contract ----- -->\n <div class=\"axm-query-contract-widget__section axm-query-contract-widget__section--row\">\n <div class=\"axm-query-contract-widget__paging-copy\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.paging | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.paging | translate | async }}\n </p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"pagingEnabled()\"\n (ngModelChange)=\"onPagingChange($event)\"\n ></ax-switch>\n </div>\n\n <!-- ----- Lookup binding value and text fields ----- -->\n <div class=\"axm-query-contract-widget__binding\">\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.valueField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"valueField()\"\n (ngModelChange)=\"onValueFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.textField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"textField()\"\n (ngModelChange)=\"onTextFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n </div>\n}\n", styles: ["@layer properties;.axm-query-contract-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-query-contract-widget__section{display:flex;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axm-query-contract-widget__section--row{flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 4)}.axm-query-contract-widget__paging-copy{display:flex;min-width:0px;flex-direction:column;gap:var(--spacing, .25rem)}.axm-query-contract-widget__title{margin:0;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-query-contract-widget__hint{margin:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-query-contract-widget__hint{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-query-contract-widget__binding{display:grid;width:100%;grid-template-columns:repeat(1,minmax(0,1fr));gap:calc(var(--spacing, .25rem) * 4)}@media(width>=48rem){.axm-query-contract-widget__binding{grid-template-columns:repeat(2,minmax(0,1fr))}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: AXLabelModule }, { kind: "component", type: i2.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { 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: AXSwitchModule }, { kind: "component", type: i3.AXSwitchComponent, selector: "ax-switch", inputs: ["disabled", "readonly", "color", "tabIndex", "value", "name", "isLoading"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
157
157
|
}
|
|
158
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMQueryContractWidgetEditComponent, decorators: [{
|
|
159
159
|
type: Component,
|
|
160
160
|
args: [{ selector: 'axm-query-contract-widget-edit', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
161
161
|
class: 'block w-full',
|
|
162
|
-
}, imports: [CommonModule, FormsModule, AXLabelModule, AXLookupComponent, AXSwitchModule, AXTranslationModule], template: "<!-- ----- Filterable fields callers may send (all kinds) ----- -->\n<div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.filterableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.filterableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"filterPaths()\"\n (ngModelChange)=\"onFilterPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.filterableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n</div>\n\n@if (isCollection()) {\n <!-- ----- Collection sort, paging, and lookup binding ----- -->\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.sortableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.sortableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"sortPaths()\"\n (ngModelChange)=\"onSortPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.sortableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n\n <!-- ----- Paging skip/take contract ----- -->\n <div class=\"axm-query-contract-widget__section axm-query-contract-widget__section--row\">\n <div class=\"axm-query-contract-widget__paging-copy\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.paging | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.paging | translate | async }}\n </p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"pagingEnabled()\"\n (ngModelChange)=\"onPagingChange($event)\"\n ></ax-switch>\n </div>\n\n <!-- ----- Lookup binding value and text fields ----- -->\n <div class=\"axm-query-contract-widget__binding\">\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.valueField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"valueField()\"\n (ngModelChange)=\"onValueFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.textField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"textField()\"\n (ngModelChange)=\"onTextFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n </div>\n}\n", styles: ["@layer properties;.axm-query-contract-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-query-contract-widget__section{display:flex;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axm-query-contract-widget__section--row{flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 4)}.axm-query-contract-widget__paging-copy{display:flex;min-width:0px;flex-direction:column;gap:var(--spacing, .25rem)}.axm-query-contract-widget__title{margin:0;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-query-contract-widget__hint{margin:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-query-contract-widget__hint{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-query-contract-widget__binding{display:grid;width:100%;grid-template-columns:repeat(1,minmax(0,1fr));gap:calc(var(--spacing, .25rem) * 4)}@media(width>=48rem){.axm-query-contract-widget__binding{grid-template-columns:repeat(2,minmax(0,1fr))}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim:
|
|
162
|
+
}, imports: [CommonModule, FormsModule, AXLabelModule, AXLookupComponent, AXSwitchModule, AXTranslationModule], template: "<!-- ----- Filterable fields callers may send (all kinds) ----- -->\n<div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.filterableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.filterableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"filterPaths()\"\n (ngModelChange)=\"onFilterPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.filterableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n</div>\n\n@if (isCollection()) {\n <!-- ----- Collection sort, paging, and lookup binding ----- -->\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.sortableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.sortableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"sortPaths()\"\n (ngModelChange)=\"onSortPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.sortableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n\n <!-- ----- Paging skip/take contract ----- -->\n <div class=\"axm-query-contract-widget__section axm-query-contract-widget__section--row\">\n <div class=\"axm-query-contract-widget__paging-copy\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.paging | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.paging | translate | async }}\n </p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"pagingEnabled()\"\n (ngModelChange)=\"onPagingChange($event)\"\n ></ax-switch>\n </div>\n\n <!-- ----- Lookup binding value and text fields ----- -->\n <div class=\"axm-query-contract-widget__binding\">\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.valueField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"valueField()\"\n (ngModelChange)=\"onValueFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.textField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"textField()\"\n (ngModelChange)=\"onTextFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n </div>\n}\n", styles: ["@layer properties;.axm-query-contract-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-query-contract-widget__section{display:flex;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axm-query-contract-widget__section--row{flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 4)}.axm-query-contract-widget__paging-copy{display:flex;min-width:0px;flex-direction:column;gap:var(--spacing, .25rem)}.axm-query-contract-widget__title{margin:0;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-query-contract-widget__hint{margin:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-query-contract-widget__hint{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-query-contract-widget__binding{display:grid;width:100%;grid-template-columns:repeat(1,minmax(0,1fr));gap:calc(var(--spacing, .25rem) * 4)}@media(width>=48rem){.axm-query-contract-widget__binding{grid-template-columns:repeat(2,minmax(0,1fr))}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"] }]
|
|
163
163
|
}], ctorParameters: () => [] });
|
|
164
164
|
|
|
165
165
|
export { AXMQueryContractWidgetEditComponent };
|
|
166
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-query-contract-widget-edit.component-
|
|
166
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-edit.component-DJDUE6lF.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-edit.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-edit.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXDataSource } from '@acorex/cdk/common';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLookupComponent } from '@acorex/components/lookup';\nimport { AXSwitchModule } from '@acorex/components/switch';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isEqual } from 'lodash-es';\n\nimport {\n createDefaultContractCapabilities,\n DEFAULT_USER_QUERY_PAGING,\n isCollectionQueryKind,\n pathsFromFilterSection,\n pathsFromSortSection,\n reconcileContractCapabilities,\n resolveAvailableContractFields,\n selectedFieldPathsFromGroups,\n toFilterSection,\n toSortSection,\n} from '../query-definition/create-user-query-contract.util';\nimport {\n CREATE_USER_QUERY_I18N as i18n,\n type AXPUserQueryContractCapabilities,\n type AXPUserQueryEntityFieldItem,\n} from '../query-definition/create-user-query.types';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXPQueryContractFieldOption {\n value: string;\n text: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-query-contract-widget-edit',\n templateUrl: './query-contract-widget-edit.component.html',\n styleUrl: './query-contract-widget-edit.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'block w-full',\n },\n imports: [CommonModule, FormsModule, AXLabelModule, AXLookupComponent, AXSwitchModule, AXTranslationModule],\n})\nexport class AXMQueryContractWidgetEditComponent extends AXPValueWidgetComponent<AXPUserQueryContractCapabilities> {\n //#region ----- Constants -----\n\n protected readonly fieldsI18n = i18n.fields;\n protected readonly placeholdersI18n = i18n.placeholders;\n\n //#endregion\n\n //#region ----- State Signals -----\n\n private readonly lastAvailablePaths = signal<string[]>([]);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly catalogFields = computed<AXPUserQueryEntityFieldItem[]>(() => {\n const raw = this.options()['fields'];\n return Array.isArray(raw) ? (raw as AXPUserQueryEntityFieldItem[]) : [];\n });\n\n protected readonly availableFields = computed<AXPUserQueryEntityFieldItem[]>(() => {\n this.contextService.data();\n const fieldGroups = this.contextService.getValue('source.entity.fieldGroups') as\n | Record<string, string[]>\n | undefined;\n return resolveAvailableContractFields(this.catalogFields(), selectedFieldPathsFromGroups(fieldGroups));\n });\n\n protected readonly fieldDataSource = computed(\n () => this.createFieldDataSource(this.availableFields()),\n { equal: isEqual },\n );\n\n protected readonly filterPaths = computed(() => pathsFromFilterSection(this.getValue()?.filter));\n protected readonly sortPaths = computed(() => pathsFromSortSection(this.getValue()?.sort));\n protected readonly pagingEnabled = computed(() => this.getValue()?.paging?.enabled === true);\n protected readonly valueField = computed(() => this.getValue()?.binding?.valueField ?? '');\n protected readonly textField = computed(() => this.getValue()?.binding?.textField ?? '');\n protected readonly isCollection = computed(() => {\n this.contextService.data();\n return isCollectionQueryKind(this.contextService.getValue('contract.kind'));\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const available = this.availableFields();\n const paths = available.map((field) => field.path);\n const boundPath = this.fullPath();\n untracked(() => {\n if (!boundPath) {\n return;\n }\n const current = this.getValue() ?? undefined;\n const previous = this.lastAvailablePaths();\n const next = reconcileContractCapabilities(current, available, previous);\n this.lastAvailablePaths.set(paths);\n if (!current) {\n this.setValue(next);\n return;\n }\n if (!isEqual(current, next)) {\n this.setValue(next);\n }\n });\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onFilterPathsChange(paths: string[] | null | undefined): void {\n this.patchCapabilities({ filter: toFilterSection(this.fieldsByPaths(paths ?? [])) });\n }\n\n protected onSortPathsChange(paths: string[] | null | undefined): void {\n this.patchCapabilities({ sort: toSortSection(this.fieldsByPaths(paths ?? [])) });\n }\n\n protected onPagingChange(enabled: boolean): void {\n const current = this.currentCapabilities();\n this.patchCapabilities({\n paging: enabled\n ? {\n enabled: true,\n definition: {\n ...DEFAULT_USER_QUERY_PAGING.definition,\n ...(current.paging.enabled ? current.paging.definition : {}),\n },\n }\n : { enabled: false },\n });\n }\n\n protected onValueFieldChange(valueField: string | null | undefined): void {\n const current = this.currentCapabilities();\n const next = String(valueField ?? '').trim() || current.binding.valueField;\n this.patchCapabilities({\n binding: { ...current.binding, valueField: next },\n });\n }\n\n protected onTextFieldChange(textField: string | null | undefined): void {\n const current = this.currentCapabilities();\n const next = String(textField ?? '').trim() || current.binding.textField;\n this.patchCapabilities({\n binding: { ...current.binding, textField: next },\n });\n }\n\n //#endregion\n\n //#region ----- Private helpers -----\n\n private currentCapabilities(): AXPUserQueryContractCapabilities {\n return this.getValue() ?? createDefaultContractCapabilities(this.availableFields());\n }\n\n private patchCapabilities(patch: Partial<AXPUserQueryContractCapabilities>): void {\n this.setValue({\n ...this.currentCapabilities(),\n ...patch,\n });\n }\n\n private fieldsByPaths(paths: string[]): AXPUserQueryEntityFieldItem[] {\n const byPath = new Map(this.availableFields().map((field) => [field.path, field]));\n return paths\n .map((path) => String(path ?? '').trim())\n .filter((path) => path.length > 0)\n .map((path) => byPath.get(path) ?? { path, text: path });\n }\n\n private createFieldDataSource(fields: AXPUserQueryEntityFieldItem[]): AXDataSource<AXPQueryContractFieldOption> {\n const items: AXPQueryContractFieldOption[] = fields.map((field) => ({\n value: field.path,\n text: field.text || field.path,\n }));\n\n return new AXDataSource<AXPQueryContractFieldOption>({\n load: () => Promise.resolve({ items, total: items.length }),\n byKey: (key: unknown) => {\n const value = String(key ?? '');\n return items.find((row) => row.value === value) ?? { value, text: value };\n },\n pageSize: 1000,\n key: 'value',\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Filterable fields callers may send (all kinds) ----- -->\n<div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.filterableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.filterableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"filterPaths()\"\n (ngModelChange)=\"onFilterPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.filterableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n</div>\n\n@if (isCollection()) {\n <!-- ----- Collection sort, paging, and lookup binding ----- -->\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.sortableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.sortableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"sortPaths()\"\n (ngModelChange)=\"onSortPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.sortableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n\n <!-- ----- Paging skip/take contract ----- -->\n <div class=\"axm-query-contract-widget__section axm-query-contract-widget__section--row\">\n <div class=\"axm-query-contract-widget__paging-copy\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.paging | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.paging | translate | async }}\n </p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"pagingEnabled()\"\n (ngModelChange)=\"onPagingChange($event)\"\n ></ax-switch>\n </div>\n\n <!-- ----- Lookup binding value and text fields ----- -->\n <div class=\"axm-query-contract-widget__binding\">\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.valueField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"valueField()\"\n (ngModelChange)=\"onValueFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.textField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"textField()\"\n (ngModelChange)=\"onTextFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n </div>\n}\n"],"names":["i18n","i4"],"mappings":";;;;;;;;;;;;;;;;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AA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,SAAA,EAAA,QAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,cAAc,kSAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAE/F,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAV/C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gCAAgC,EAAA,eAAA,EAGzB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,cAAc;AACtB,qBAAA,EAAA,OAAA,EACQ,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,wyGAAA,EAAA,MAAA,EAAA,CAAA,opDAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-edit.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-edit.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXDataSource } from '@acorex/cdk/common';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLookupComponent } from '@acorex/components/lookup';\nimport { AXSwitchModule } from '@acorex/components/switch';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isEqual } from 'lodash-es';\n\nimport {\n createDefaultContractCapabilities,\n DEFAULT_USER_QUERY_PAGING,\n isCollectionQueryKind,\n pathsFromFilterSection,\n pathsFromSortSection,\n reconcileContractCapabilities,\n resolveAvailableContractFields,\n selectedFieldPathsFromGroups,\n toFilterSection,\n toSortSection,\n} from '../query-definition/create-user-query-contract.util';\nimport {\n CREATE_USER_QUERY_I18N as i18n,\n type AXPUserQueryContractCapabilities,\n type AXPUserQueryEntityFieldItem,\n} from '../query-definition/create-user-query.types';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXPQueryContractFieldOption {\n value: string;\n text: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-query-contract-widget-edit',\n templateUrl: './query-contract-widget-edit.component.html',\n styleUrl: './query-contract-widget-edit.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'block w-full',\n },\n imports: [CommonModule, FormsModule, AXLabelModule, AXLookupComponent, AXSwitchModule, AXTranslationModule],\n})\nexport class AXMQueryContractWidgetEditComponent extends AXPValueWidgetComponent<AXPUserQueryContractCapabilities> {\n //#region ----- Constants -----\n\n protected readonly fieldsI18n = i18n.fields;\n protected readonly placeholdersI18n = i18n.placeholders;\n\n //#endregion\n\n //#region ----- State Signals -----\n\n private readonly lastAvailablePaths = signal<string[]>([]);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly catalogFields = computed<AXPUserQueryEntityFieldItem[]>(() => {\n const raw = this.options()['fields'];\n return Array.isArray(raw) ? (raw as AXPUserQueryEntityFieldItem[]) : [];\n });\n\n protected readonly availableFields = computed<AXPUserQueryEntityFieldItem[]>(() => {\n this.contextService.data();\n const fieldGroups = this.contextService.getValue('source.entity.fieldGroups') as\n | Record<string, string[]>\n | undefined;\n return resolveAvailableContractFields(this.catalogFields(), selectedFieldPathsFromGroups(fieldGroups));\n });\n\n protected readonly fieldDataSource = computed(\n () => this.createFieldDataSource(this.availableFields()),\n { equal: isEqual },\n );\n\n protected readonly filterPaths = computed(() => pathsFromFilterSection(this.getValue()?.filter));\n protected readonly sortPaths = computed(() => pathsFromSortSection(this.getValue()?.sort));\n protected readonly pagingEnabled = computed(() => this.getValue()?.paging?.enabled === true);\n protected readonly valueField = computed(() => this.getValue()?.binding?.valueField ?? '');\n protected readonly textField = computed(() => this.getValue()?.binding?.textField ?? '');\n protected readonly isCollection = computed(() => {\n this.contextService.data();\n return isCollectionQueryKind(this.contextService.getValue('contract.kind'));\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const available = this.availableFields();\n const paths = available.map((field) => field.path);\n const boundPath = this.fullPath();\n untracked(() => {\n if (!boundPath) {\n return;\n }\n const current = this.getValue() ?? undefined;\n const previous = this.lastAvailablePaths();\n const next = reconcileContractCapabilities(current, available, previous);\n this.lastAvailablePaths.set(paths);\n if (!current) {\n this.setValue(next);\n return;\n }\n if (!isEqual(current, next)) {\n this.setValue(next);\n }\n });\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onFilterPathsChange(paths: string[] | null | undefined): void {\n this.patchCapabilities({ filter: toFilterSection(this.fieldsByPaths(paths ?? [])) });\n }\n\n protected onSortPathsChange(paths: string[] | null | undefined): void {\n this.patchCapabilities({ sort: toSortSection(this.fieldsByPaths(paths ?? [])) });\n }\n\n protected onPagingChange(enabled: boolean): void {\n const current = this.currentCapabilities();\n this.patchCapabilities({\n paging: enabled\n ? {\n enabled: true,\n definition: {\n ...DEFAULT_USER_QUERY_PAGING.definition,\n ...(current.paging.enabled ? current.paging.definition : {}),\n },\n }\n : { enabled: false },\n });\n }\n\n protected onValueFieldChange(valueField: string | null | undefined): void {\n const current = this.currentCapabilities();\n const next = String(valueField ?? '').trim() || current.binding.valueField;\n this.patchCapabilities({\n binding: { ...current.binding, valueField: next },\n });\n }\n\n protected onTextFieldChange(textField: string | null | undefined): void {\n const current = this.currentCapabilities();\n const next = String(textField ?? '').trim() || current.binding.textField;\n this.patchCapabilities({\n binding: { ...current.binding, textField: next },\n });\n }\n\n //#endregion\n\n //#region ----- Private helpers -----\n\n private currentCapabilities(): AXPUserQueryContractCapabilities {\n return this.getValue() ?? createDefaultContractCapabilities(this.availableFields());\n }\n\n private patchCapabilities(patch: Partial<AXPUserQueryContractCapabilities>): void {\n this.setValue({\n ...this.currentCapabilities(),\n ...patch,\n });\n }\n\n private fieldsByPaths(paths: string[]): AXPUserQueryEntityFieldItem[] {\n const byPath = new Map(this.availableFields().map((field) => [field.path, field]));\n return paths\n .map((path) => String(path ?? '').trim())\n .filter((path) => path.length > 0)\n .map((path) => byPath.get(path) ?? { path, text: path });\n }\n\n private createFieldDataSource(fields: AXPUserQueryEntityFieldItem[]): AXDataSource<AXPQueryContractFieldOption> {\n const items: AXPQueryContractFieldOption[] = fields.map((field) => ({\n value: field.path,\n text: field.text || field.path,\n }));\n\n return new AXDataSource<AXPQueryContractFieldOption>({\n load: () => Promise.resolve({ items, total: items.length }),\n byKey: (key: unknown) => {\n const value = String(key ?? '');\n return items.find((row) => row.value === value) ?? { value, text: value };\n },\n pageSize: 1000,\n key: 'value',\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Filterable fields callers may send (all kinds) ----- -->\n<div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.filterableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.filterableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"filterPaths()\"\n (ngModelChange)=\"onFilterPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.filterableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n</div>\n\n@if (isCollection()) {\n <!-- ----- Collection sort, paging, and lookup binding ----- -->\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.sortableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.sortableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"sortPaths()\"\n (ngModelChange)=\"onSortPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.sortableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n\n <!-- ----- Paging skip/take contract ----- -->\n <div class=\"axm-query-contract-widget__section axm-query-contract-widget__section--row\">\n <div class=\"axm-query-contract-widget__paging-copy\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.paging | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.paging | translate | async }}\n </p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"pagingEnabled()\"\n (ngModelChange)=\"onPagingChange($event)\"\n ></ax-switch>\n </div>\n\n <!-- ----- Lookup binding value and text fields ----- -->\n <div class=\"axm-query-contract-widget__binding\">\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.valueField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"valueField()\"\n (ngModelChange)=\"onValueFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.textField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"textField()\"\n (ngModelChange)=\"onTextFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n </div>\n}\n"],"names":["i18n","i4"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAwCA;AAEA;AAYM,MAAO,mCAAoC,SAAQ,uBAAyD,CAAA;;;AAgDhH,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AA9CU,QAAA,IAAA,CAAA,UAAU,GAAGA,sBAAI,CAAC,MAAM;AACxB,QAAA,IAAA,CAAA,gBAAgB,GAAGA,sBAAI,CAAC,YAAY;;;QAMtC,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAW,EAAE;+FAAC;;;AAMvC,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAgC,MAAK;YAC9E,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;AACpC,YAAA,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAI,GAAqC,GAAG,EAAE;QACzE,CAAC;0FAAC;AAEiB,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAgC,MAAK;AAChF,YAAA,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;YAC1B,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,2BAA2B,CAE/D;AACb,YAAA,OAAO,8BAA8B,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;QACxG,CAAC;4FAAC;QAEiB,IAAA,CAAA,eAAe,GAAG,QAAQ,CAC3C,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,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1,7 +1,7 @@
|
|
|
1
1
|
import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
import { q as formatContractCapabilitiesSummary } from './acorex-platform-module-platform-management-client-create-user-query-contract.util-
|
|
4
|
+
import { q as formatContractCapabilitiesSummary } from './acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs';
|
|
5
5
|
|
|
6
6
|
//#region ----- Imports -----
|
|
7
7
|
//#endregion
|
|
@@ -42,4 +42,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
42
42
|
}] });
|
|
43
43
|
|
|
44
44
|
export { AXMQueryContractWidgetViewComponent };
|
|
45
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-query-contract-widget-view.component-
|
|
45
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-view.component-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-view.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatContractCapabilitiesSummary } from '../query-definition/create-user-query-contract.util';\nimport type { AXPUserQueryContractCapabilities } from '../query-definition/create-user-query.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-query-contract-widget-view',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty contract capabilities ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMQueryContractWidgetViewComponent extends AXPValueWidgetComponent<AXPUserQueryContractCapabilities> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatContractCapabilitiesSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,mCAAoC,SAAQ,uBAAyD,CAAA;AAblH,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,iCAAiC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGhG,IAAA;8GANY,mCAAmC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mCAAmC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXpC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAb/C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gCAAgC;AAC1C,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
-
import { g as formatRestApiSummary } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-
|
|
4
|
+
import { g as formatRestApiSummary } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs';
|
|
5
5
|
|
|
6
6
|
//#region ----- Imports -----
|
|
7
7
|
//#endregion
|
|
@@ -42,4 +42,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
42
42
|
}] });
|
|
43
43
|
|
|
44
44
|
export { AXMRestApiGeneratorWidgetColumnComponent };
|
|
45
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-
|
|
45
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-column.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport type { AXRestApiOutput } from '@acorex/components/rest-api-generator';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatRestApiSummary } from './parse-http-request.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-rest-api-generator-widget-column',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty request ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMRestApiGeneratorWidgetColumnComponent extends AXPValueWidgetComponent<AXRestApiOutput> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatRestApiSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,wCAAyC,SAAQ,uBAAwC,CAAA;AAbtG,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGnF,IAAA;8GANY,wCAAwC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wCAAwC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXzC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAbpD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sCAAsC;AAChD,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
|
|
@@ -13,7 +13,7 @@ import * as i0 from '@angular/core';
|
|
|
13
13
|
import { inject, DestroyRef, signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
14
14
|
import * as i1 from '@angular/forms';
|
|
15
15
|
import { FormsModule } from '@angular/forms';
|
|
16
|
-
import { C as CREATE_USER_QUERY_I18N, c as createEmptyRestApiOutput, n as normalizeRestApiOutput, h as hasParsedContent, f as REST_API_GENERATOR_IMPORT_DEBOUNCE_MS, p as parseHttpRequest } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-
|
|
16
|
+
import { C as CREATE_USER_QUERY_I18N, c as createEmptyRestApiOutput, n as normalizeRestApiOutput, h as hasParsedContent, f as REST_API_GENERATOR_IMPORT_DEBOUNCE_MS, p as parseHttpRequest } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs';
|
|
17
17
|
|
|
18
18
|
//#region ----- Imports -----
|
|
19
19
|
//#endregion
|
|
@@ -157,7 +157,7 @@ class AXMRestApiGeneratorWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRestApiGeneratorWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
160
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMRestApiGeneratorWidgetEditComponent, isStandalone: true, selector: "axm-rest-api-generator-widget-edit", host: { classAttribute: "block w-full" }, usesInheritance: true, ngImport: i0, template: "<div class=\"axm-rest-api-generator-widget\">\n <!-- ----- Import from cURL, fetch, HTTP, JSON, or URL ----- -->\n <div class=\"axm-rest-api-generator-widget__import\">\n <div class=\"axm-rest-api-generator-widget__import-header\">\n <span class=\"axm-rest-api-generator-widget__import-title\">\n {{ importI18n.title | translate | async }}\n </span>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n class=\"ax-sm\"\n [text]=\"(importI18n.apply | translate | async) ?? ''\"\n (onClick)=\"onApplyImport()\"\n ></ax-button>\n </div>\n <ax-text-area\n [ngModel]=\"importText()\"\n (ngModelChange)=\"onImportModelChange($event)\"\n (onValueChanged)=\"onImportTextChanged($event)\"\n [rows]=\"4\"\n [placeholder]=\"(importI18n.placeholder | translate | async) ?? ''\"\n ></ax-text-area>\n </div>\n\n <!-- ----- Visual REST request builder ----- -->\n @for (rev of revisionKeys(); track rev) {\n <ax-rest-api-generator [value]=\"boundRequest()\" (onValueChange)=\"onGeneratorChange($event)\">\n </ax-rest-api-generator>\n }\n</div>\n", styles: ["@layer properties;.axm-rest-api-generator-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-rest-api-generator-widget__import{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim:
|
|
160
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMRestApiGeneratorWidgetEditComponent, isStandalone: true, selector: "axm-rest-api-generator-widget-edit", host: { classAttribute: "block w-full" }, usesInheritance: true, ngImport: i0, template: "<div class=\"axm-rest-api-generator-widget\">\n <!-- ----- Import from cURL, fetch, HTTP, JSON, or URL ----- -->\n <div class=\"axm-rest-api-generator-widget__import\">\n <div class=\"axm-rest-api-generator-widget__import-header\">\n <span class=\"axm-rest-api-generator-widget__import-title\">\n {{ importI18n.title | translate | async }}\n </span>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n class=\"ax-sm\"\n [text]=\"(importI18n.apply | translate | async) ?? ''\"\n (onClick)=\"onApplyImport()\"\n ></ax-button>\n </div>\n <ax-text-area\n [ngModel]=\"importText()\"\n (ngModelChange)=\"onImportModelChange($event)\"\n (onValueChanged)=\"onImportTextChanged($event)\"\n [rows]=\"4\"\n [placeholder]=\"(importI18n.placeholder | translate | async) ?? ''\"\n ></ax-text-area>\n </div>\n\n <!-- ----- Visual REST request builder ----- -->\n @for (rev of revisionKeys(); track rev) {\n <ax-rest-api-generator [value]=\"boundRequest()\" (onValueChange)=\"onGeneratorChange($event)\">\n </ax-rest-api-generator>\n }\n</div>\n", styles: ["@layer properties;.axm-rest-api-generator-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-rest-api-generator-widget__import{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTextAreaModule }, { kind: "component", type: i3.AXTextAreaComponent, selector: "ax-text-area", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "placeholder", "maxLength", "look", "rows", "allowResize", "showCounter", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXRestApiGeneratorComponent, selector: "ax-rest-api-generator", inputs: ["value"], outputs: ["onValueChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
161
161
|
}
|
|
162
162
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRestApiGeneratorWidgetEditComponent, decorators: [{
|
|
163
163
|
type: Component,
|
|
@@ -170,8 +170,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
170
170
|
AXTextAreaModule,
|
|
171
171
|
AXTranslationModule,
|
|
172
172
|
AXRestApiGeneratorComponent,
|
|
173
|
-
], template: "<div class=\"axm-rest-api-generator-widget\">\n <!-- ----- Import from cURL, fetch, HTTP, JSON, or URL ----- -->\n <div class=\"axm-rest-api-generator-widget__import\">\n <div class=\"axm-rest-api-generator-widget__import-header\">\n <span class=\"axm-rest-api-generator-widget__import-title\">\n {{ importI18n.title | translate | async }}\n </span>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n class=\"ax-sm\"\n [text]=\"(importI18n.apply | translate | async) ?? ''\"\n (onClick)=\"onApplyImport()\"\n ></ax-button>\n </div>\n <ax-text-area\n [ngModel]=\"importText()\"\n (ngModelChange)=\"onImportModelChange($event)\"\n (onValueChanged)=\"onImportTextChanged($event)\"\n [rows]=\"4\"\n [placeholder]=\"(importI18n.placeholder | translate | async) ?? ''\"\n ></ax-text-area>\n </div>\n\n <!-- ----- Visual REST request builder ----- -->\n @for (rev of revisionKeys(); track rev) {\n <ax-rest-api-generator [value]=\"boundRequest()\" (onValueChange)=\"onGeneratorChange($event)\">\n </ax-rest-api-generator>\n }\n</div>\n", styles: ["@layer properties;.axm-rest-api-generator-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-rest-api-generator-widget__import{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim:
|
|
173
|
+
], template: "<div class=\"axm-rest-api-generator-widget\">\n <!-- ----- Import from cURL, fetch, HTTP, JSON, or URL ----- -->\n <div class=\"axm-rest-api-generator-widget__import\">\n <div class=\"axm-rest-api-generator-widget__import-header\">\n <span class=\"axm-rest-api-generator-widget__import-title\">\n {{ importI18n.title | translate | async }}\n </span>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n class=\"ax-sm\"\n [text]=\"(importI18n.apply | translate | async) ?? ''\"\n (onClick)=\"onApplyImport()\"\n ></ax-button>\n </div>\n <ax-text-area\n [ngModel]=\"importText()\"\n (ngModelChange)=\"onImportModelChange($event)\"\n (onValueChanged)=\"onImportTextChanged($event)\"\n [rows]=\"4\"\n [placeholder]=\"(importI18n.placeholder | translate | async) ?? ''\"\n ></ax-text-area>\n </div>\n\n <!-- ----- Visual REST request builder ----- -->\n @for (rev of revisionKeys(); track rev) {\n <ax-rest-api-generator [value]=\"boundRequest()\" (onValueChange)=\"onGeneratorChange($event)\">\n </ax-rest-api-generator>\n }\n</div>\n", styles: ["@layer properties;.axm-rest-api-generator-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-rest-api-generator-widget__import{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"] }]
|
|
174
174
|
}], ctorParameters: () => [] });
|
|
175
175
|
|
|
176
176
|
export { AXMRestApiGeneratorWidgetEditComponent };
|
|
177
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-
|
|
177
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-DMivRLvp.mjs.map
|