@acorex-platform/module-report-management-client 1.0.1 → 2.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/fesm2022/{acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-eSjEqt5D.mjs → acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-DKnaOM7_.mjs} +36 -53
  2. package/fesm2022/acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-DKnaOM7_.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report-category.mjs +0 -14
  4. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report-category.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report-generation-request.mjs +2 -16
  6. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report-generation-request.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report.mjs +179 -25
  8. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-report.mjs.map +1 -1
  9. package/fesm2022/{acorex-platform-module-report-management-client-contracts-entity-catalog-acorex-platform-module-report-management-client-contracts-entity-catalog-CboBAIna.mjs → acorex-platform-module-report-management-client-contracts-entity-catalog-acorex-platform-module-report-management-client-contracts-entity-catalog-CSABQXeE.mjs} +4 -20
  10. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-acorex-platform-module-report-management-client-contracts-entity-catalog-CSABQXeE.mjs.map +1 -0
  11. package/fesm2022/{acorex-platform-module-report-management-client-contracts-entity-catalog-report-category.entity-BQFdNXAm.mjs → acorex-platform-module-report-management-client-contracts-entity-catalog-report-category.entity-GPDKYKW_.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-report-management-client-contracts-entity-catalog-report-category.entity-BQFdNXAm.mjs.map → acorex-platform-module-report-management-client-contracts-entity-catalog-report-category.entity-GPDKYKW_.mjs.map} +1 -1
  13. package/fesm2022/{acorex-platform-module-report-management-client-contracts-entity-catalog-report-generation-request.entity-D381cWLE.mjs → acorex-platform-module-report-management-client-contracts-entity-catalog-report-generation-request.entity-B3cCnjKO.mjs} +4 -4
  14. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report-generation-request.entity-B3cCnjKO.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report.entity-B_BWJu1a.mjs +292 -0
  16. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report.entity-B_BWJu1a.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog.mjs +1 -1
  18. package/fesm2022/acorex-platform-module-report-management-client-contracts.mjs +1866 -25
  19. package/fesm2022/acorex-platform-module-report-management-client-contracts.mjs.map +1 -1
  20. package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page-component.provider-CaxletoS.mjs → acorex-platform-module-report-management-client-entity-reports-page-component.provider-BqgxvuLq.mjs} +3 -3
  21. package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page-component.provider-CaxletoS.mjs.map → acorex-platform-module-report-management-client-entity-reports-page-component.provider-BqgxvuLq.mjs.map} +1 -1
  22. package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page.component-CK5bCQhm.mjs → acorex-platform-module-report-management-client-entity-reports-page.component-D9AfxSeN.mjs} +2 -2
  23. package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page.component-CK5bCQhm.mjs.map → acorex-platform-module-report-management-client-entity-reports-page.component-D9AfxSeN.mjs.map} +1 -1
  24. package/fesm2022/acorex-platform-module-report-management-client-local-entities.mjs +0 -2
  25. package/fesm2022/acorex-platform-module-report-management-client-local-entities.mjs.map +1 -1
  26. package/fesm2022/acorex-platform-module-report-management-client-report-definition-access.service-DUpwky68.mjs +67 -0
  27. package/fesm2022/acorex-platform-module-report-management-client-report-definition-access.service-DUpwky68.mjs.map +1 -0
  28. package/fesm2022/acorex-platform-module-report-management-client-report-filter-page.component-C8XSGSdz.mjs +255 -0
  29. package/fesm2022/acorex-platform-module-report-management-client-report-filter-page.component-C8XSGSdz.mjs.map +1 -0
  30. package/fesm2022/acorex-platform-module-report-management-client-report-layout-page-component.provider-BfBckWsh.mjs +28 -0
  31. package/fesm2022/acorex-platform-module-report-management-client-report-layout-page-component.provider-BfBckWsh.mjs.map +1 -0
  32. package/fesm2022/acorex-platform-module-report-management-client-report-layout-page.component-DFmdGIY9.mjs +876 -0
  33. package/fesm2022/acorex-platform-module-report-management-client-report-layout-page.component-DFmdGIY9.mjs.map +1 -0
  34. package/fesm2022/{acorex-platform-module-report-management-client-report-layout-switcher.util-C3OVIaEz.mjs → acorex-platform-module-report-management-client-report-layout-switcher.util-DRG-8RcA.mjs} +258 -41
  35. package/fesm2022/acorex-platform-module-report-management-client-report-layout-switcher.util-DRG-8RcA.mjs.map +1 -0
  36. package/fesm2022/{acorex-platform-module-report-management-client-report-popup-viewer.component-CKE8NG5T.mjs → acorex-platform-module-report-management-client-report-popup-viewer.component-BVI1z7F3.mjs} +6 -6
  37. package/fesm2022/{acorex-platform-module-report-management-client-report-popup-viewer.component-CKE8NG5T.mjs.map → acorex-platform-module-report-management-client-report-popup-viewer.component-BVI1z7F3.mjs.map} +1 -1
  38. package/fesm2022/{acorex-platform-module-report-management-client-report-viewer-page.component-CPlbhBa_.mjs → acorex-platform-module-report-management-client-report-viewer-page.component-CPHO4vlQ.mjs} +84 -26
  39. package/fesm2022/acorex-platform-module-report-management-client-report-viewer-page.component-CPHO4vlQ.mjs.map +1 -0
  40. package/fesm2022/acorex-platform-module-report-management-client.mjs +1 -1
  41. package/i18n/en-AU/report-management.json +260 -35
  42. package/i18n/en-US/report-management.json +260 -35
  43. package/i18n/fa-IR/report-management.json +260 -35
  44. package/package.json +2 -9
  45. package/types/acorex-platform-module-report-management-client-contracts.d.ts +395 -109
  46. package/types/acorex-platform-module-report-management-client.d.ts +5 -5
  47. package/fesm2022/acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-eSjEqt5D.mjs.map +0 -1
  48. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-query-snapshot-policy.mjs +0 -157
  49. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-query-snapshot-policy.mjs.map +0 -1
  50. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-query-snapshot.mjs +0 -197
  51. package/fesm2022/acorex-platform-module-report-management-client-contracts-entities-query-snapshot.mjs.map +0 -1
  52. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-acorex-platform-module-report-management-client-contracts-entity-catalog-CboBAIna.mjs.map +0 -1
  53. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-query-snapshot-policy.entity-BUY06Dz0.mjs +0 -97
  54. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-query-snapshot-policy.entity-BUY06Dz0.mjs.map +0 -1
  55. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-query-snapshot.entity-CnnX3xZt.mjs +0 -137
  56. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-query-snapshot.entity-CnnX3xZt.mjs.map +0 -1
  57. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report-generation-request.entity-D381cWLE.mjs.map +0 -1
  58. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report.entity-Bwui0M8X.mjs +0 -124
  59. package/fesm2022/acorex-platform-module-report-management-client-contracts-entity-catalog-report.entity-Bwui0M8X.mjs.map +0 -1
  60. package/fesm2022/acorex-platform-module-report-management-client-report-layout-switcher.util-C3OVIaEz.mjs.map +0 -1
  61. package/fesm2022/acorex-platform-module-report-management-client-report-viewer-page.component-CPlbhBa_.mjs.map +0 -1
  62. package/types/acorex-platform-module-report-management-client-contracts-entities-query-snapshot-policy.d.ts +0 -5
  63. package/types/acorex-platform-module-report-management-client-contracts-entities-query-snapshot.d.ts +0 -5
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable } from '@angular/core';
3
- import { E as ENTITY_REPORTS_PAGE_COMPONENT_KEY } from './acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-eSjEqt5D.mjs';
3
+ import { E as ENTITY_REPORTS_PAGE_COMPONENT_KEY } from './acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-DKnaOM7_.mjs';
4
4
 
5
5
  //#endregion
6
6
  //#region ----- Provider -----
@@ -9,7 +9,7 @@ class AXMEntityReportsPageComponentProvider {
9
9
  return [
10
10
  {
11
11
  key: ENTITY_REPORTS_PAGE_COMPONENT_KEY,
12
- loader: () => import('./acorex-platform-module-report-management-client-entity-reports-page.component-CK5bCQhm.mjs').then((c) => c.AXMEntityReportsPageComponent),
12
+ loader: () => import('./acorex-platform-module-report-management-client-entity-reports-page.component-D9AfxSeN.mjs').then((c) => c.AXMEntityReportsPageComponent),
13
13
  },
14
14
  ];
15
15
  }
@@ -21,4 +21,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
21
21
  }] });
22
22
 
23
23
  export { AXMEntityReportsPageComponentProvider };
24
- //# sourceMappingURL=acorex-platform-module-report-management-client-entity-reports-page-component.provider-CaxletoS.mjs.map
24
+ //# sourceMappingURL=acorex-platform-module-report-management-client-entity-reports-page-component.provider-BqgxvuLq.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-report-management-client-entity-reports-page-component.provider-CaxletoS.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/features/entity-reports/entity-reports-page-component.provider.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport { ENTITY_REPORTS_PAGE_COMPONENT_KEY } from './entity-reports.util';\n\n//#endregion\n\n//#region ----- Provider -----\n\n@Injectable()\nexport class AXMEntityReportsPageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: ENTITY_REPORTS_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./entity-reports-page.component').then((c) => c.AXMEntityReportsPageComponent),\n },\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AASA;AAEA;MAGa,qCAAqC,CAAA;AAChD,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,iCAAiC;AACtC,gBAAA,MAAM,EAAE,MACN,OAAO,8FAAiC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,6BAA6B,CAAC;AACzF,aAAA;SACF;IACH;8GATW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAArC,qCAAqC,EAAA,CAAA,CAAA;;2FAArC,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD;;;"}
1
+ {"version":3,"file":"acorex-platform-module-report-management-client-entity-reports-page-component.provider-BqgxvuLq.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/features/entity-reports/entity-reports-page-component.provider.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport { ENTITY_REPORTS_PAGE_COMPONENT_KEY } from './entity-reports.util';\n\n//#endregion\n\n//#region ----- Provider -----\n\n@Injectable()\nexport class AXMEntityReportsPageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: ENTITY_REPORTS_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./entity-reports-page.component').then((c) => c.AXMEntityReportsPageComponent),\n },\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AASA;AAEA;MAGa,qCAAqC,CAAA;AAChD,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,iCAAiC;AACtC,gBAAA,MAAM,EAAE,MACN,OAAO,8FAAiC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,6BAA6B,CAAC;AACzF,aAAA;SACF;IACH;8GATW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAArC,qCAAqC,EAAA,CAAA,CAAA;;2FAArC,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD;;;"}
@@ -13,7 +13,7 @@ import { AsyncPipe } from '@angular/common';
13
13
  import * as i0 from '@angular/core';
14
14
  import { input, inject, signal, computed, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
15
15
  import { ActivatedRoute } from '@angular/router';
16
- import { A as AXPReportViewerService, h as bindingShowsOnPage, O as OPEN_REPORT_IN_POPUP_COMMAND, i as buildOpenInPopupCommandOptions, j as resolveBindingTitle, k as resolveBindingDescription } from './acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-eSjEqt5D.mjs';
16
+ import { A as AXPReportViewerService, h as bindingShowsOnPage, O as OPEN_REPORT_IN_POPUP_COMMAND, i as buildOpenInPopupCommandOptions, j as resolveBindingTitle, k as resolveBindingDescription } from './acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-DKnaOM7_.mjs';
17
17
 
18
18
  //#region ----- Persisted entity id -----
19
19
  /**
@@ -163,4 +163,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
163
163
  }], ctorParameters: () => [], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
164
164
 
165
165
  export { AXMEntityReportsPageComponent };
166
- //# sourceMappingURL=acorex-platform-module-report-management-client-entity-reports-page.component-CK5bCQhm.mjs.map
166
+ //# sourceMappingURL=acorex-platform-module-report-management-client-entity-reports-page.component-D9AfxSeN.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-report-management-client-entity-reports-page.component-CK5bCQhm.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/features/entity-reports/resolve-entity-record-id.util.ts","../../../../libs/modules/report-management/client/src/lib/features/entity-reports/entity-reports-page.component.ts","../../../../libs/modules/report-management/client/src/lib/features/entity-reports/entity-reports-page.component.html"],"sourcesContent":["//#region ----- Persisted entity id -----\n\n/**\n * Resolves the persisted record id from entity detail page root context.\n */\nexport function resolvePersistedEntityId(\n ctx: Record<string, unknown> | null | undefined,\n): string | undefined {\n if (!ctx) {\n return undefined;\n }\n const raw = ctx['id'] ?? ctx['_id'];\n if (typeof raw === 'string' && raw.length > 0) {\n return raw;\n }\n if (typeof raw === 'number' && !Number.isNaN(raw)) {\n return String(raw);\n }\n return undefined;\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\nimport { AXPStateMessageComponent } from '@acorex-platform/framework-client/layout/components';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { AXPReportViewerService } from '../../reports/report-viewer.service';\nimport {\n bindingShowsOnPage,\n buildOpenInPopupCommandOptions,\n OPEN_REPORT_IN_POPUP_COMMAND,\n resolveBindingDescription,\n resolveBindingTitle,\n type AXPEntityBoundReport,\n} from './entity-reports.util';\nimport { resolvePersistedEntityId } from './resolve-entity-record-id.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-entity-reports-page',\n standalone: true,\n imports: [\n AXPStateMessageComponent,\n AXButtonModule,\n AXDecoratorModule,\n AXSkeletonModule,\n AXTranslationModule,\n AsyncPipe,\n ],\n templateUrl: './entity-reports-page.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMEntityReportsPageComponent,\n },\n ],\n host: {\n class: 'flex h-full min-h-0 flex-1 flex-col overflow-hidden',\n },\n})\nexport class AXMEntityReportsPageComponent extends AXPPageLayoutBaseComponent {\n //#region ----- Inputs -----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n options = input<Record<string, unknown>>({});\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n private readonly reportViewerService = inject(AXPReportViewerService);\n private readonly commandService = inject(AXPCommandService);\n private readonly route = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly isLoading = signal(true);\n protected readonly boundReports = signal<AXPEntityBoundReport[]>([]);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly entityId = computed(() => resolvePersistedEntityId(this.rootContext()));\n\n protected readonly entityType = computed(() => this.resolveEntityType());\n\n protected readonly pageReports = computed(() =>\n this.boundReports().filter(({ binding }) => bindingShowsOnPage(binding)),\n );\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const entityType = this.entityType();\n untracked(() => {\n void this.loadBoundReports(entityType);\n });\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected async openReport(item: AXPEntityBoundReport): Promise<void> {\n const entityId = this.entityId();\n if (!entityId) {\n return;\n }\n\n await this.commandService.execute(OPEN_REPORT_IN_POPUP_COMMAND, {\n data: this.rootContext() ?? { id: entityId },\n options: buildOpenInPopupCommandOptions(item.report, item.binding),\n });\n }\n\n protected reportTitle(item: AXPEntityBoundReport): AXPMultiLanguageString {\n return resolveBindingTitle(item.report, item.binding);\n }\n\n protected reportDescription(item: AXPEntityBoundReport): AXPMultiLanguageString | undefined {\n return resolveBindingDescription(item.report, item.binding);\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private resolveEntityType(): string {\n const fromOptions = this.options()?.['entityType'];\n if (typeof fromOptions === 'string' && fromOptions.trim()) {\n return fromOptions.trim();\n }\n const fromConfig = this.pageConfig()?.['entityType'];\n if (typeof fromConfig === 'string' && fromConfig.trim()) {\n return fromConfig.trim();\n }\n\n const ctx = this.rootContext() ?? {};\n const moduleName = typeof ctx['moduleName'] === 'string' ? ctx['moduleName'] : null;\n const entityName = typeof ctx['entityName'] === 'string' ? ctx['entityName'] : null;\n if (moduleName && entityName) {\n return `${moduleName}.${entityName}`;\n }\n\n const module = this.route.snapshot.parent?.paramMap.get('module');\n const entity = this.route.snapshot.paramMap.get('entity');\n if (module && entity) {\n return `${module}.${entity}`;\n }\n\n return '';\n }\n\n private async loadBoundReports(entityType: string): Promise<void> {\n if (!entityType) {\n this.boundReports.set([]);\n this.isLoading.set(false);\n return;\n }\n\n this.isLoading.set(true);\n try {\n const reports = await this.reportViewerService.getReportsByEntityType(entityType);\n this.boundReports.set(reports);\n } catch {\n this.boundReports.set([]);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","@if (isLoading()) {\n <!-- ----- Skeleton while entity-bound reports load ----- -->\n <div class=\"flex h-full min-h-0 flex-1 flex-col gap-3 overflow-auto p-4\" aria-hidden=\"true\">\n @for (widthClass of ['w-2/3', 'w-1/2', 'w-3/5']; track $index) {\n <div class=\"flex items-center gap-4 rounded-lg border border-default bg-lightest p-4\">\n <div class=\"h-10 w-10 shrink-0 rounded-md overflow-hidden\">\n <ax-skeleton\n [animated]=\"true\"\n style=\"display: block; width: 100%; height: 100%\"\n ></ax-skeleton>\n </div>\n <div class=\"min-w-0 flex-1 flex flex-col gap-2\">\n <div class=\"h-4 max-w-full rounded-md overflow-hidden\" [class]=\"widthClass\">\n <ax-skeleton\n [animated]=\"true\"\n style=\"display: block; width: 100%; height: 100%\"\n ></ax-skeleton>\n </div>\n <div class=\"h-3 w-4/5 rounded-md overflow-hidden\">\n <ax-skeleton\n [animated]=\"true\"\n style=\"display: block; width: 100%; height: 100%\"\n ></ax-skeleton>\n </div>\n </div>\n </div>\n }\n </div>\n}\n<!-- ----- Record must be saved before reports can use its id ----- -->\n@else if (!entityId()) {\n <div class=\"flex h-full min-h-[20rem] items-center justify-center p-6\">\n <axp-state-message\n [title]=\"'@report-management:entity-reports.messages.save-record-first.title'\"\n [description]=\"'@report-management:entity-reports.messages.save-record-first.description'\"\n ></axp-state-message>\n </div>\n}\n<!-- ----- No report definitions bound to this entity type ----- -->\n@else if (pageReports().length === 0) {\n <div class=\"flex h-full min-h-[20rem] items-center justify-center p-6\">\n <axp-state-message\n [title]=\"'@report-management:entity-reports.messages.empty.title'\"\n [description]=\"'@report-management:entity-reports.messages.empty.description'\"\n ></axp-state-message>\n </div>\n}\n<!-- ----- Bound reports list ----- -->\n@else {\n <div class=\"flex h-full min-h-0 flex-1 flex-col gap-3 overflow-auto p-4\">\n <p class=\"text-sm opacity-70\">\n {{ '@report-management:entity-reports.page.description' | translate | async }}\n </p>\n @for (item of pageReports(); track item.report.id) {\n <div class=\"flex items-center gap-4 rounded-lg border border-default bg-lightest p-4\">\n <div\n class=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary text-lg\"\n aria-hidden=\"true\"\n >\n <ax-icon class=\"fa-light fa-file-chart-column\"></ax-icon>\n </div>\n <div class=\"min-w-0 flex-1 flex flex-col gap-1\">\n <span class=\"font-medium truncate\">\n {{ reportTitle(item) | translate | async }}\n </span>\n @if (reportDescription(item); as description) {\n <!-- ----- Optional report description under the title ----- -->\n <span class=\"text-sm opacity-70 line-clamp-2\">\n {{ description | translate | async }}\n </span>\n }\n </div>\n <ax-button\n look=\"solid\"\n color=\"secondary\"\n [text]=\"'@report-management:entity-reports.actions.open.title' | translate | async\"\n (onClick)=\"openReport(item)\">\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-arrow-right\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n }\n </div>\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAEA;;AAEG;AACG,SAAU,wBAAwB,CACtC,GAA+C,EAAA;IAE/C,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,OAAO,SAAS;IAClB;IACA,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC;IACnC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;AAC7C,QAAA,OAAO,GAAG;IACZ;AACA,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AACjD,QAAA,OAAO,MAAM,CAAC,GAAG,CAAC;IACpB;AACA,IAAA,OAAO,SAAS;AAClB;AAEA;;ACrBA;AAiCA;AAEA;AAyBM,MAAO,6BAA8B,SAAQ,0BAA0B,CAAA;;;AAsC3E,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QApCT,IAAA,CAAA,WAAW,GAAG,KAAK,CAA0B,EAAE;wFAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;QAC7C,IAAA,CAAA,OAAO,GAAG,KAAK,CAA0B,EAAE;oFAAC;;;AAM3B,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACpD,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM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,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,2BAAA,EAAA,QAAA,EAAA,8IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACjB,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAChB,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EACnB,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAcA,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAvBzC,SAAS;+BACE,yBAAyB,EAAA,UAAA,EACvB,IAAI,EAAA,OAAA,EACP;wBACP,wBAAwB;wBACxB,cAAc;wBACd,iBAAiB;wBACjB,gBAAgB;wBAChB,mBAAmB;wBACnB,SAAS;qBACV,EAAA,eAAA,EAEgB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,6BAA+B;AAC3C,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,KAAK,EAAE,qDAAqD;AAC7D,qBAAA,EAAA,QAAA,EAAA,mhHAAA,EAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-report-management-client-entity-reports-page.component-D9AfxSeN.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/features/entity-reports/resolve-entity-record-id.util.ts","../../../../libs/modules/report-management/client/src/lib/features/entity-reports/entity-reports-page.component.ts","../../../../libs/modules/report-management/client/src/lib/features/entity-reports/entity-reports-page.component.html"],"sourcesContent":["//#region ----- Persisted entity id -----\n\n/**\n * Resolves the persisted record id from entity detail page root context.\n */\nexport function resolvePersistedEntityId(\n ctx: Record<string, unknown> | null | undefined,\n): string | undefined {\n if (!ctx) {\n return undefined;\n }\n const raw = ctx['id'] ?? ctx['_id'];\n if (typeof raw === 'string' && raw.length > 0) {\n return raw;\n }\n if (typeof raw === 'number' && !Number.isNaN(raw)) {\n return String(raw);\n }\n return undefined;\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\nimport { AXPStateMessageComponent } from '@acorex-platform/framework-client/layout/components';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { AXPReportViewerService } from '../../reports/report-viewer.service';\nimport {\n bindingShowsOnPage,\n buildOpenInPopupCommandOptions,\n OPEN_REPORT_IN_POPUP_COMMAND,\n resolveBindingDescription,\n resolveBindingTitle,\n type AXPEntityBoundReport,\n} from './entity-reports.util';\nimport { resolvePersistedEntityId } from './resolve-entity-record-id.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-entity-reports-page',\n standalone: true,\n imports: [\n AXPStateMessageComponent,\n AXButtonModule,\n AXDecoratorModule,\n AXSkeletonModule,\n AXTranslationModule,\n AsyncPipe,\n ],\n templateUrl: './entity-reports-page.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMEntityReportsPageComponent,\n },\n ],\n host: {\n class: 'flex h-full min-h-0 flex-1 flex-col overflow-hidden',\n },\n})\nexport class AXMEntityReportsPageComponent extends AXPPageLayoutBaseComponent {\n //#region ----- Inputs -----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n options = input<Record<string, unknown>>({});\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n private readonly reportViewerService = inject(AXPReportViewerService);\n private readonly commandService = inject(AXPCommandService);\n private readonly route = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly isLoading = signal(true);\n protected readonly boundReports = signal<AXPEntityBoundReport[]>([]);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly entityId = computed(() => resolvePersistedEntityId(this.rootContext()));\n\n protected readonly entityType = computed(() => this.resolveEntityType());\n\n protected readonly pageReports = computed(() =>\n this.boundReports().filter(({ binding }) => bindingShowsOnPage(binding)),\n );\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const entityType = this.entityType();\n untracked(() => {\n void this.loadBoundReports(entityType);\n });\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected async openReport(item: AXPEntityBoundReport): Promise<void> {\n const entityId = this.entityId();\n if (!entityId) {\n return;\n }\n\n await this.commandService.execute(OPEN_REPORT_IN_POPUP_COMMAND, {\n data: this.rootContext() ?? { id: entityId },\n options: buildOpenInPopupCommandOptions(item.report, item.binding),\n });\n }\n\n protected reportTitle(item: AXPEntityBoundReport): AXPMultiLanguageString {\n return resolveBindingTitle(item.report, item.binding);\n }\n\n protected reportDescription(item: AXPEntityBoundReport): AXPMultiLanguageString | undefined {\n return resolveBindingDescription(item.report, item.binding);\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private resolveEntityType(): string {\n const fromOptions = this.options()?.['entityType'];\n if (typeof fromOptions === 'string' && fromOptions.trim()) {\n return fromOptions.trim();\n }\n const fromConfig = this.pageConfig()?.['entityType'];\n if (typeof fromConfig === 'string' && fromConfig.trim()) {\n return fromConfig.trim();\n }\n\n const ctx = this.rootContext() ?? {};\n const moduleName = typeof ctx['moduleName'] === 'string' ? ctx['moduleName'] : null;\n const entityName = typeof ctx['entityName'] === 'string' ? ctx['entityName'] : null;\n if (moduleName && entityName) {\n return `${moduleName}.${entityName}`;\n }\n\n const module = this.route.snapshot.parent?.paramMap.get('module');\n const entity = this.route.snapshot.paramMap.get('entity');\n if (module && entity) {\n return `${module}.${entity}`;\n }\n\n return '';\n }\n\n private async loadBoundReports(entityType: string): Promise<void> {\n if (!entityType) {\n this.boundReports.set([]);\n this.isLoading.set(false);\n return;\n }\n\n this.isLoading.set(true);\n try {\n const reports = await this.reportViewerService.getReportsByEntityType(entityType);\n this.boundReports.set(reports);\n } catch {\n this.boundReports.set([]);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","@if (isLoading()) {\n <!-- ----- Skeleton while entity-bound reports load ----- -->\n <div class=\"flex h-full min-h-0 flex-1 flex-col gap-3 overflow-auto p-4\" aria-hidden=\"true\">\n @for (widthClass of ['w-2/3', 'w-1/2', 'w-3/5']; track $index) {\n <div class=\"flex items-center gap-4 rounded-lg border border-default bg-lightest p-4\">\n <div class=\"h-10 w-10 shrink-0 rounded-md overflow-hidden\">\n <ax-skeleton\n [animated]=\"true\"\n style=\"display: block; width: 100%; height: 100%\"\n ></ax-skeleton>\n </div>\n <div class=\"min-w-0 flex-1 flex flex-col gap-2\">\n <div class=\"h-4 max-w-full rounded-md overflow-hidden\" [class]=\"widthClass\">\n <ax-skeleton\n [animated]=\"true\"\n style=\"display: block; width: 100%; height: 100%\"\n ></ax-skeleton>\n </div>\n <div class=\"h-3 w-4/5 rounded-md overflow-hidden\">\n <ax-skeleton\n [animated]=\"true\"\n style=\"display: block; width: 100%; height: 100%\"\n ></ax-skeleton>\n </div>\n </div>\n </div>\n }\n </div>\n}\n<!-- ----- Record must be saved before reports can use its id ----- -->\n@else if (!entityId()) {\n <div class=\"flex h-full min-h-[20rem] items-center justify-center p-6\">\n <axp-state-message\n [title]=\"'@report-management:entity-reports.messages.save-record-first.title'\"\n [description]=\"'@report-management:entity-reports.messages.save-record-first.description'\"\n ></axp-state-message>\n </div>\n}\n<!-- ----- No report definitions bound to this entity type ----- -->\n@else if (pageReports().length === 0) {\n <div class=\"flex h-full min-h-[20rem] items-center justify-center p-6\">\n <axp-state-message\n [title]=\"'@report-management:entity-reports.messages.empty.title'\"\n [description]=\"'@report-management:entity-reports.messages.empty.description'\"\n ></axp-state-message>\n </div>\n}\n<!-- ----- Bound reports list ----- -->\n@else {\n <div class=\"flex h-full min-h-0 flex-1 flex-col gap-3 overflow-auto p-4\">\n <p class=\"text-sm opacity-70\">\n {{ '@report-management:entity-reports.page.description' | translate | async }}\n </p>\n @for (item of pageReports(); track item.report.id) {\n <div class=\"flex items-center gap-4 rounded-lg border border-default bg-lightest p-4\">\n <div\n class=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary text-lg\"\n aria-hidden=\"true\"\n >\n <ax-icon class=\"fa-light fa-file-chart-column\"></ax-icon>\n </div>\n <div class=\"min-w-0 flex-1 flex flex-col gap-1\">\n <span class=\"font-medium truncate\">\n {{ reportTitle(item) | translate | async }}\n </span>\n @if (reportDescription(item); as description) {\n <!-- ----- Optional report description under the title ----- -->\n <span class=\"text-sm opacity-70 line-clamp-2\">\n {{ description | translate | async }}\n </span>\n }\n </div>\n <ax-button\n look=\"solid\"\n color=\"secondary\"\n [text]=\"'@report-management:entity-reports.actions.open.title' | translate | async\"\n (onClick)=\"openReport(item)\">\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-arrow-right\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n }\n </div>\n}\n"],"names":[],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,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAChB,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EACnB,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAcA,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAvBzC,SAAS;+BACE,yBAAyB,EAAA,UAAA,EACvB,IAAI,EAAA,OAAA,EACP;wBACP,wBAAwB;wBACxB,cAAc;wBACd,iBAAiB;wBACjB,gBAAgB;wBAChB,mBAAmB;wBACnB,SAAS;qBACV,EAAA,eAAA,EAEgB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,6BAA+B;AAC3C,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,KAAK,EAAE,qDAAqD;AAC7D,qBAAA,EAAA,QAAA,EAAA,mhHAAA,EAAA;;;"}
@@ -15,8 +15,6 @@ function provideReportManagementLocalEntities() {
15
15
  return provideLocalEntityCatalog({
16
16
  moduleName: RootConfig.module.name,
17
17
  loaders: {
18
- [RootConfig.entities.querySnapshot.name]: () => import('@acorex-platform/module-report-management-client/contracts/entities/query-snapshot').then((m) => m.querySnapshotEntityFactory()),
19
- [RootConfig.entities.querySnapshotPolicy.name]: () => import('@acorex-platform/module-report-management-client/contracts/entities/query-snapshot-policy').then((m) => m.querySnapshotPolicyEntityFactory()),
20
18
  [RootConfig.entities.report.name]: () => import('@acorex-platform/module-report-management-client/contracts/entities/report').then((m) => m.reportEntityFactory()),
21
19
  [RootConfig.entities.category.name]: () => import('@acorex-platform/module-report-management-client/contracts/entities/report-category').then((m) => m.reportCategoryEntityFactory()),
22
20
  [RootConfig.entities.reportGenerationRequest.name]: () => import('@acorex-platform/module-report-management-client/contracts/entities/report-generation-request').then((m) => m.reportGenerationRequestEntityFactory()),
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-report-management-client-local-entities.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/provide-local-entities.ts","../../../../libs/modules/report-management/client/src/lib/acorex-platform-module-report-management-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-report-management-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers report-management layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function provideReportManagementLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.querySnapshot.name]: () =>\n import('@acorex-platform/module-report-management-client/contracts/entities/query-snapshot').then((m) => m.querySnapshotEntityFactory()),\n [RootConfig.entities.querySnapshotPolicy.name]: () =>\n import('@acorex-platform/module-report-management-client/contracts/entities/query-snapshot-policy').then((m) => m.querySnapshotPolicyEntityFactory()),\n [RootConfig.entities.report.name]: () =>\n import('@acorex-platform/module-report-management-client/contracts/entities/report').then((m) => m.reportEntityFactory()),\n [RootConfig.entities.category.name]: () =>\n import('@acorex-platform/module-report-management-client/contracts/entities/report-category').then((m) => m.reportCategoryEntityFactory()),\n [RootConfig.entities.reportGenerationRequest.name]: () =>\n import('@acorex-platform/module-report-management-client/contracts/entities/report-generation-request').then((m) => m.reportGenerationRequestEntityFactory()),\n },\n });\n}\n\nexport { reportManagementLocalEntityCatalog } from '@acorex-platform/module-report-management-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,oCAAoC,GAAA;AAClD,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,QAAA,OAAO,EAAE;AACP,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,GAAG,MACxC,OAAO,oFAAoF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,0BAA0B,EAAE,CAAC;AAC1I,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,GAAG,MAC9C,OAAO,2FAA2F,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,gCAAgC,EAAE,CAAC;AACvJ,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,MACjC,OAAO,4EAA4E,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,CAAC;AAC3H,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,MACnC,OAAO,qFAAqF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,2BAA2B,EAAE,CAAC;AAC5I,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,GAAG,MAClD,OAAO,+FAA+F,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oCAAoC,EAAE,CAAC;AAChK,SAAA;AACF,KAAA,CAAC;AACJ;AAIA;;ACnCA;;AAEG;;"}
1
+ {"version":3,"file":"acorex-platform-module-report-management-client-local-entities.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/provide-local-entities.ts","../../../../libs/modules/report-management/client/src/lib/acorex-platform-module-report-management-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-report-management-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers report-management layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function provideReportManagementLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.report.name]: () => import('@acorex-platform/module-report-management-client/contracts/entities/report').then((m) => m.reportEntityFactory()),\n [RootConfig.entities.category.name]: () => import('@acorex-platform/module-report-management-client/contracts/entities/report-category').then((m) => m.reportCategoryEntityFactory()),\n [RootConfig.entities.reportGenerationRequest.name]: () => import('@acorex-platform/module-report-management-client/contracts/entities/report-generation-request').then((m) => m.reportGenerationRequestEntityFactory()),\n },\n });\n}\n\nexport { reportManagementLocalEntityCatalog } from '@acorex-platform/module-report-management-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,oCAAoC,GAAA;AAClD,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,QAAA,OAAO,EAAE;AACP,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,MAAM,OAAO,4EAA4E,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,CAAC;AAClK,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,MAAM,OAAO,qFAAqF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,2BAA2B,EAAE,CAAC;AACrL,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,GAAG,MAAM,OAAO,+FAA+F,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oCAAoC,EAAE,CAAC;AACxN,SAAA;AACF,KAAA,CAAC;AACJ;AAIA;;AC5BA;;AAEG;;"}
@@ -0,0 +1,67 @@
1
+ import { AXPSessionService } from '@acorex-platform/framework-client/auth';
2
+ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, Injectable } from '@angular/core';
5
+
6
+ //#region ----- Constants -----
7
+ const TENANT_MODULE = 'TenantManagement';
8
+ const TENANT_ENTITY = 'Tenant';
9
+ //#endregion
10
+ //#region ----- Service -----
11
+ /**
12
+ * Mirrors the server `catalog-write` policy for report definitions:
13
+ * platform-global rows (no tenantId) are editable by the platform tenant only,
14
+ * tenant-owned rows by the owning tenant. The server stays authoritative.
15
+ */
16
+ class AXMReportDefinitionAccessService {
17
+ constructor() {
18
+ //#region ----- Services & Dependencies -----
19
+ this.session = inject(AXPSessionService);
20
+ this.tenants = inject(AXPEntityService)
21
+ .withEntity(TENANT_MODULE, TENANT_ENTITY)
22
+ .data();
23
+ //#endregion
24
+ //#region ----- State -----
25
+ this.platformByTenant = new Map();
26
+ }
27
+ //#endregion
28
+ //#region ----- Public API -----
29
+ async canEdit(record) {
30
+ const tenantId = this.session.tenant?.id;
31
+ if (!record || !tenantId) {
32
+ return false;
33
+ }
34
+ const owner = ownerTenantId(record);
35
+ if (owner) {
36
+ return owner === tenantId || (await this.isPlatformTenant(tenantId));
37
+ }
38
+ return this.isPlatformTenant(tenantId);
39
+ }
40
+ //#endregion
41
+ //#region ----- Private -----
42
+ isPlatformTenant(tenantId) {
43
+ let cached = this.platformByTenant.get(tenantId);
44
+ if (!cached) {
45
+ cached = this.tenants
46
+ .byKey(tenantId)
47
+ .then((row) => row?.isPlatform === true)
48
+ .catch(() => false);
49
+ this.platformByTenant.set(tenantId, cached);
50
+ }
51
+ return cached;
52
+ }
53
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMReportDefinitionAccessService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
54
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMReportDefinitionAccessService, providedIn: 'root' }); }
55
+ }
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMReportDefinitionAccessService, decorators: [{
57
+ type: Injectable,
58
+ args: [{ providedIn: 'root' }]
59
+ }] });
60
+ function ownerTenantId(record) {
61
+ const scope = record['scopeInfo'];
62
+ const owner = scope != null && typeof scope === 'object' ? scope['tenantId'] : undefined;
63
+ return typeof owner === 'string' ? owner : '';
64
+ }
65
+
66
+ export { AXMReportDefinitionAccessService as A };
67
+ //# sourceMappingURL=acorex-platform-module-report-management-client-report-definition-access.service-DUpwky68.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-report-management-client-report-definition-access.service-DUpwky68.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/features/report-definition/report-definition-access.service.ts"],"sourcesContent":["import { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject, Injectable } from '@angular/core';\n\n//#region ----- Constants -----\n\nconst TENANT_MODULE = 'TenantManagement';\nconst TENANT_ENTITY = 'Tenant';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface TenantRow {\n id: string;\n isPlatform?: boolean;\n}\n\n//#endregion\n\n//#region ----- Service -----\n\n/**\n * Mirrors the server `catalog-write` policy for report definitions:\n * platform-global rows (no tenantId) are editable by the platform tenant only,\n * tenant-owned rows by the owning tenant. The server stays authoritative.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMReportDefinitionAccessService {\n //#region ----- Services & Dependencies -----\n\n private readonly session = inject(AXPSessionService);\n private readonly tenants = inject(AXPEntityService)\n .withEntity(TENANT_MODULE, TENANT_ENTITY)\n .data<string, TenantRow>();\n\n //#endregion\n\n //#region ----- State -----\n\n private readonly platformByTenant = new Map<string, Promise<boolean>>();\n\n //#endregion\n\n //#region ----- Public API -----\n\n async canEdit(record: Record<string, unknown> | null | undefined): Promise<boolean> {\n const tenantId = this.session.tenant?.id;\n if (!record || !tenantId) {\n return false;\n }\n const owner = ownerTenantId(record);\n if (owner) {\n return owner === tenantId || (await this.isPlatformTenant(tenantId));\n }\n return this.isPlatformTenant(tenantId);\n }\n\n //#endregion\n\n //#region ----- Private -----\n\n private isPlatformTenant(tenantId: string): Promise<boolean> {\n let cached = this.platformByTenant.get(tenantId);\n if (!cached) {\n cached = this.tenants\n .byKey(tenantId)\n .then((row) => row?.isPlatform === true)\n .catch(() => false);\n this.platformByTenant.set(tenantId, cached);\n }\n return cached;\n }\n\n //#endregion\n}\n\nfunction ownerTenantId(record: Record<string, unknown>): string {\n const scope = record['scopeInfo'];\n const owner = scope != null && typeof scope === 'object' ? (scope as Record<string, unknown>)['tenantId'] : undefined;\n return typeof owner === 'string' ? owner : '';\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAIA;AAEA,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,aAAa,GAAG,QAAQ;AAW9B;AAEA;AAEA;;;;AAIG;MAEU,gCAAgC,CAAA;AAD7C,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACnC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB;AAC/C,aAAA,UAAU,CAAC,aAAa,EAAE,aAAa;AACvC,aAAA,IAAI,EAAqB;;;AAMX,QAAA,IAAA,CAAA,gBAA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,CAAA;kBAD5C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;AAkDlC,SAAS,aAAa,CAAC,MAA+B,EAAA;AACpD,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC;IACjC,MAAM,KAAK,GAAG,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,GAAI,KAAiC,CAAC,UAAU,CAAC,GAAG,SAAS;AACrH,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,EAAE;AAC/C;;"}
@@ -0,0 +1,255 @@
1
+ import { AXPPageLayoutBaseComponent, AXPPageLayoutBase } from '@acorex-platform/framework-client/layout/views';
2
+ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
3
+ import { AXPMetaDataBuilderGroupsComponent } from '@acorex-platform/module-data-management-client';
4
+ import { RootConfig, readReportFilterForm, sameReportFilterForm, applyReportFilterForm } from '@acorex-platform/module-report-management-client/contracts';
5
+ import * as i0 from '@angular/core';
6
+ import { input, inject, viewChild, signal, computed, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
7
+ import { A as AXMReportDefinitionAccessService } from './acorex-platform-module-report-management-client-report-definition-access.service-DUpwky68.mjs';
8
+
9
+ //#region ----- Imports -----
10
+ //#endregion
11
+ //#region ----- Constants -----
12
+ const SAVE_COMMAND = 'ReportDefinitionFilters:Save';
13
+ const DISCARD_COMMAND = 'ReportDefinitionFilters:Discard';
14
+ const ADD_SECTION_COMMAND = 'ReportDefinitionFilters:AddSection';
15
+ const PREVIEW_COMMAND = 'ReportDefinitionFilters:Preview';
16
+ //#endregion
17
+ //#region ----- Component -----
18
+ /**
19
+ * Filter tab of a report definition. The filters are edited with the metadata builder
20
+ * (the same editor as the document type metadata tab) and stored as the report `parameterGroups`.
21
+ */
22
+ class AXMReportFilterPageComponent extends AXPPageLayoutBaseComponent {
23
+ static { this.pageActionsFromInstance = true; }
24
+ //#endregion
25
+ //#region ----- Lifecycle -----
26
+ constructor() {
27
+ super();
28
+ //#region ----- Inputs -----
29
+ this.rootContext = input({}, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "rootContext" }] : /* istanbul ignore next */ []));
31
+ this.pageConfig = input(/* @ts-ignore */
32
+ ...(ngDevMode ? [undefined, { debugName: "pageConfig" }] : /* istanbul ignore next */ []));
33
+ this.options = input(/* @ts-ignore */
34
+ ...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
35
+ //#endregion
36
+ //#region ----- Services & Dependencies -----
37
+ this.entityService = inject(AXPEntityService);
38
+ this.hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });
39
+ this.access = inject(AXMReportDefinitionAccessService);
40
+ this.reports = this.entityService
41
+ .withEntity(RootConfig.module.name, RootConfig.entities.report.name)
42
+ .data();
43
+ this.groupsRef = viewChild('groupsRef', /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "groupsRef" }] : /* istanbul ignore next */ []));
45
+ //#endregion
46
+ //#region ----- State Signals -----
47
+ this.localForm = signal(null, /* @ts-ignore */
48
+ ...(ngDevMode ? [{ debugName: "localForm" }] : /* istanbul ignore next */ []));
49
+ this.savedGroups = signal(null, /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "savedGroups" }] : /* istanbul ignore next */ []));
51
+ this.isDirty = signal(false, /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "isDirty" }] : /* istanbul ignore next */ []));
53
+ this.isSaving = signal(false, /* @ts-ignore */
54
+ ...(ngDevMode ? [{ debugName: "isSaving" }] : /* istanbul ignore next */ []));
55
+ this.widgetRenderKey = signal(0, /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "widgetRenderKey" }] : /* istanbul ignore next */ []));
57
+ /** Platform-global definitions are read-only for tenants. */
58
+ this.canEdit = signal(false, /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "canEdit" }] : /* istanbul ignore next */ []));
60
+ //#endregion
61
+ //#region ----- Computed Properties -----
62
+ this.reportId = computed(() => {
63
+ const id = this.rootContext()?.['id'];
64
+ return typeof id === 'string' ? id : '';
65
+ }, /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "reportId" }] : /* istanbul ignore next */ []));
67
+ this.baseline = computed(() => readReportFilterForm({ parameterGroups: this.storedGroups() }), /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "baseline" }] : /* istanbul ignore next */ []));
69
+ this.ready = computed(() => this.reportId() !== '', /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
71
+ this.value = computed(() => (this.localForm() ?? this.baseline()).metaDataList, /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
73
+ this.builderOptions = computed(() => ({ hideHeaderActions: true, readonly: !this.canEdit() }), /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "builderOptions" }] : /* istanbul ignore next */ []));
75
+ effect(() => {
76
+ const root = this.rootContext() ?? {};
77
+ untracked(() => {
78
+ void this.access.canEdit(root).then((allowed) => {
79
+ this.canEdit.set(allowed);
80
+ this.recompute();
81
+ });
82
+ });
83
+ });
84
+ }
85
+ //#endregion
86
+ //#region ----- Unsaved Changes -----
87
+ hasUnsavedChanges() {
88
+ return this.isDirty();
89
+ }
90
+ //#endregion
91
+ //#region ----- Event Handlers -----
92
+ async getPrimaryMenuItems() {
93
+ if (!this.canEdit()) {
94
+ return [];
95
+ }
96
+ const dirty = this.isDirty();
97
+ const saving = this.isSaving();
98
+ const addSectionTitle = await this.translateService.translateAsync('@data-management:metadata-definitions.actions.add-group.title');
99
+ const previewTitle = await this.translateService.translateAsync('@data-management:metadata-definitions.actions.preview.title');
100
+ const saveTitle = await this.translateService.translateAsync('@general:actions.save.title');
101
+ const discardTitle = await this.translateService.translateAsync('@general:actions.discard.title');
102
+ return [
103
+ {
104
+ title: addSectionTitle,
105
+ icon: 'fa-light fa-layer-group',
106
+ zone: 'header',
107
+ priority: 'primary',
108
+ color: 'primary',
109
+ command: { name: ADD_SECTION_COMMAND, options: {} },
110
+ },
111
+ {
112
+ title: previewTitle,
113
+ icon: 'fa-light fa-eye',
114
+ zone: 'header',
115
+ priority: 'primary',
116
+ color: 'default',
117
+ command: { name: PREVIEW_COMMAND, options: {} },
118
+ },
119
+ {
120
+ title: discardTitle,
121
+ icon: 'fa-light fa-rotate-left',
122
+ zone: 'footer',
123
+ priority: 'secondary',
124
+ color: 'default',
125
+ visible: dirty,
126
+ disabled: saving,
127
+ command: { name: DISCARD_COMMAND, options: {} },
128
+ },
129
+ {
130
+ title: saveTitle,
131
+ icon: 'fa-light fa-floppy-disk',
132
+ zone: 'footer',
133
+ priority: 'primary',
134
+ color: 'primary',
135
+ visible: dirty,
136
+ disabled: saving,
137
+ command: { name: SAVE_COMMAND, options: {} },
138
+ },
139
+ ];
140
+ }
141
+ onValueChange(metaDataList) {
142
+ if (this.isSaving()) {
143
+ return;
144
+ }
145
+ const next = { metaDataList };
146
+ const current = this.localForm() ?? this.baseline();
147
+ if (sameReportFilterForm(next, current)) {
148
+ return;
149
+ }
150
+ const dirty = !sameReportFilterForm(next, this.baseline());
151
+ this.localForm.set(next);
152
+ if (dirty !== this.isDirty()) {
153
+ this.isDirty.set(dirty);
154
+ this.recompute();
155
+ }
156
+ }
157
+ execute(command) {
158
+ switch (command.name) {
159
+ case ADD_SECTION_COMMAND:
160
+ return this.groupsRef()?.addSection();
161
+ case PREVIEW_COMMAND:
162
+ return this.groupsRef()?.handlePreviewClick();
163
+ case DISCARD_COMMAND:
164
+ this.localForm.set(null);
165
+ this.isDirty.set(false);
166
+ this.widgetRenderKey.update((key) => key + 1);
167
+ this.recompute();
168
+ return;
169
+ case SAVE_COMMAND:
170
+ return this.handleSave();
171
+ default:
172
+ return undefined;
173
+ }
174
+ }
175
+ //#endregion
176
+ //#region ----- Persistence -----
177
+ storedGroups() {
178
+ const saved = this.savedGroups();
179
+ if (saved && saved.id === this.reportId()) {
180
+ return saved.parameterGroups;
181
+ }
182
+ const groups = this.rootContext()?.['parameterGroups'];
183
+ return Array.isArray(groups) ? groups : [];
184
+ }
185
+ async handleSave() {
186
+ const id = this.reportId();
187
+ if (!id) {
188
+ this.toastService.show({
189
+ color: 'danger',
190
+ title: await this.translateService.translateAsync('@general:messages.error.title'),
191
+ content: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),
192
+ });
193
+ return;
194
+ }
195
+ const { parameterGroups } = applyReportFilterForm(this.localForm() ?? this.baseline());
196
+ this.isSaving.set(true);
197
+ this.recompute();
198
+ try {
199
+ await this.reports.update(id, { parameterGroups });
200
+ const root = this.rootContext();
201
+ if (root) {
202
+ root['parameterGroups'] = parameterGroups;
203
+ }
204
+ this.savedGroups.set({ id, parameterGroups });
205
+ this.localForm.set(null);
206
+ this.isDirty.set(false);
207
+ this.toastService.show({
208
+ color: 'success',
209
+ title: await this.translateService.translateAsync('@general:messages.generic.success.title'),
210
+ content: await this.translateService.translateAsync('@general:messages.generic.success.description'),
211
+ location: 'bottom-center',
212
+ closeButton: true,
213
+ timeOut: 3000,
214
+ timeOutProgress: true,
215
+ });
216
+ }
217
+ catch {
218
+ this.toastService.show({
219
+ color: 'danger',
220
+ title: await this.translateService.translateAsync('@general:messages.error.title'),
221
+ content: await this.translateService.translateAsync('@general:messages.entity.update-failed'),
222
+ });
223
+ }
224
+ finally {
225
+ this.isSaving.set(false);
226
+ this.recompute();
227
+ }
228
+ }
229
+ recompute() {
230
+ super.recompute();
231
+ const maybeLayout = this.hostPageLayout;
232
+ maybeLayout?.recompute?.();
233
+ }
234
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMReportFilterPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
235
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMReportFilterPageComponent, isStandalone: true, selector: "axm-report-filter-page", inputs: { rootContext: { classPropertyName: "rootContext", publicName: "rootContext", isSignal: true, isRequired: false, transformFunction: null }, pageConfig: { classPropertyName: "pageConfig", publicName: "pageConfig", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "axp-page-layout-base block h-full min-h-0 overflow-auto" }, providers: [
236
+ {
237
+ provide: AXPPageLayoutBase,
238
+ useExisting: AXMReportFilterPageComponent,
239
+ },
240
+ ], viewQueries: [{ propertyName: "groupsRef", first: true, predicate: ["groupsRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (ready()) {\n <!-- ----- Report filters edited as metadata sections and fields ----- -->\n @for (renderKey of [widgetRenderKey()]; track renderKey) {\n <axp-meta-data-builder-groups\n #groupsRef\n [value]=\"value()\"\n [options]=\"builderOptions()\"\n (valueChange)=\"onValueChange($event)\"\n />\n }\n}\n", dependencies: [{ kind: "component", type: AXPMetaDataBuilderGroupsComponent, selector: "axp-meta-data-builder-groups", inputs: ["value", "options", "contextPath"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
241
+ }
242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMReportFilterPageComponent, decorators: [{
243
+ type: Component,
244
+ args: [{ selector: 'axm-report-filter-page', standalone: true, imports: [AXPMetaDataBuilderGroupsComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
245
+ {
246
+ provide: AXPPageLayoutBase,
247
+ useExisting: AXMReportFilterPageComponent,
248
+ },
249
+ ], host: {
250
+ class: 'axp-page-layout-base block h-full min-h-0 overflow-auto',
251
+ }, template: "@if (ready()) {\n <!-- ----- Report filters edited as metadata sections and fields ----- -->\n @for (renderKey of [widgetRenderKey()]; track renderKey) {\n <axp-meta-data-builder-groups\n #groupsRef\n [value]=\"value()\"\n [options]=\"builderOptions()\"\n (valueChange)=\"onValueChange($event)\"\n />\n }\n}\n" }]
252
+ }], ctorParameters: () => [], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], groupsRef: [{ type: i0.ViewChild, args: ['groupsRef', { isSignal: true }] }] } });
253
+
254
+ export { AXMReportFilterPageComponent };
255
+ //# sourceMappingURL=acorex-platform-module-report-management-client-report-filter-page.component-C8XSGSdz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-report-management-client-report-filter-page.component-C8XSGSdz.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/features/report-definition/report-filter-page.component.ts","../../../../libs/modules/report-management/client/src/lib/features/report-definition/report-filter-page.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n type AXPLayoutDetailsViewAction,\n} from '@acorex-platform/framework-client/layout/views';\nimport type { AXPExecuteCommand } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPMetaDataBuilderGroupsComponent } from '@acorex-platform/module-data-management-client';\nimport type { AXMMetaDataBuilderValue } from '@acorex-platform/module-data-management-client/contracts';\nimport {\n applyReportFilterForm,\n readReportFilterForm,\n RootConfig,\n sameReportFilterForm,\n type AXPReportParameterGroup,\n type ReportFilterFormModel,\n} from '@acorex-platform/module-report-management-client/contracts';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal, untracked, viewChild } from '@angular/core';\nimport { AXMReportDefinitionAccessService } from './report-definition-access.service';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst SAVE_COMMAND = 'ReportDefinitionFilters:Save';\nconst DISCARD_COMMAND = 'ReportDefinitionFilters:Discard';\nconst ADD_SECTION_COMMAND = 'ReportDefinitionFilters:AddSection';\nconst PREVIEW_COMMAND = 'ReportDefinitionFilters:Preview';\n\n//#endregion\n\n//#region ----- Types -----\n\ntype ReportDefinitionRecord = AXPEntityModel<string> & {\n parameterGroups?: AXPReportParameterGroup[];\n};\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Filter tab of a report definition. The filters are edited with the metadata builder\n * (the same editor as the document type metadata tab) and stored as the report `parameterGroups`.\n */\n@Component({\n selector: 'axm-report-filter-page',\n standalone: true,\n imports: [AXPMetaDataBuilderGroupsComponent],\n templateUrl: './report-filter-page.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMReportFilterPageComponent,\n },\n ],\n host: {\n class: 'axp-page-layout-base block h-full min-h-0 overflow-auto',\n },\n})\nexport class AXMReportFilterPageComponent extends AXPPageLayoutBaseComponent {\n static readonly pageActionsFromInstance = true;\n\n //#region ----- Inputs -----\n\n rootContext = input<Record<string, unknown>>({});\n pageConfig = input<Record<string, unknown>>();\n options = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ----- Services & Dependencies -----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });\n private readonly access = inject(AXMReportDefinitionAccessService);\n private readonly reports = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.report.name)\n .data<string, ReportDefinitionRecord>();\n private readonly groupsRef = viewChild<AXPMetaDataBuilderGroupsComponent>('groupsRef');\n\n //#endregion\n\n //#region ----- State Signals -----\n\n private readonly localForm = signal<ReportFilterFormModel | null>(null);\n private readonly savedGroups = signal<{ id: string; parameterGroups: AXPReportParameterGroup[] } | null>(null);\n protected readonly isDirty = signal(false);\n private readonly isSaving = signal(false);\n protected readonly widgetRenderKey = signal(0);\n /** Platform-global definitions are read-only for tenants. */\n protected readonly canEdit = signal(false);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n private readonly reportId = computed(() => {\n const id = this.rootContext()?.['id'];\n return typeof id === 'string' ? id : '';\n });\n\n private readonly baseline = computed(() => readReportFilterForm({ parameterGroups: this.storedGroups() }));\n\n protected readonly ready = computed(() => this.reportId() !== '');\n\n protected readonly value = computed<AXMMetaDataBuilderValue>(() => (this.localForm() ?? this.baseline()).metaDataList);\n\n protected readonly builderOptions = computed(() => ({ hideHeaderActions: true, readonly: !this.canEdit() }));\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const root = this.rootContext() ?? {};\n untracked(() => {\n void this.access.canEdit(root).then((allowed) => {\n this.canEdit.set(allowed);\n this.recompute();\n });\n });\n });\n }\n\n //#endregion\n\n //#region ----- Unsaved Changes -----\n\n override hasUnsavedChanges(): boolean {\n return this.isDirty();\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n override async getPrimaryMenuItems(): Promise<AXPLayoutDetailsViewAction[]> {\n if (!this.canEdit()) {\n return [];\n }\n const dirty = this.isDirty();\n const saving = this.isSaving();\n const addSectionTitle = await this.translateService.translateAsync('@data-management:metadata-definitions.actions.add-group.title');\n const previewTitle = await this.translateService.translateAsync('@data-management:metadata-definitions.actions.preview.title');\n const saveTitle = await this.translateService.translateAsync('@general:actions.save.title');\n const discardTitle = await this.translateService.translateAsync('@general:actions.discard.title');\n return [\n {\n title: addSectionTitle,\n icon: 'fa-light fa-layer-group',\n zone: 'header',\n priority: 'primary',\n color: 'primary',\n command: { name: ADD_SECTION_COMMAND, options: {} },\n },\n {\n title: previewTitle,\n icon: 'fa-light fa-eye',\n zone: 'header',\n priority: 'primary',\n color: 'default',\n command: { name: PREVIEW_COMMAND, options: {} },\n },\n {\n title: discardTitle,\n icon: 'fa-light fa-rotate-left',\n zone: 'footer',\n priority: 'secondary',\n color: 'default',\n visible: dirty,\n disabled: saving,\n command: { name: DISCARD_COMMAND, options: {} },\n },\n {\n title: saveTitle,\n icon: 'fa-light fa-floppy-disk',\n zone: 'footer',\n priority: 'primary',\n color: 'primary',\n visible: dirty,\n disabled: saving,\n command: { name: SAVE_COMMAND, options: {} },\n },\n ];\n }\n\n protected onValueChange(metaDataList: AXMMetaDataBuilderValue): void {\n if (this.isSaving()) {\n return;\n }\n const next: ReportFilterFormModel = { metaDataList };\n const current = this.localForm() ?? this.baseline();\n if (sameReportFilterForm(next, current)) {\n return;\n }\n const dirty = !sameReportFilterForm(next, this.baseline());\n this.localForm.set(next);\n if (dirty !== this.isDirty()) {\n this.isDirty.set(dirty);\n this.recompute();\n }\n }\n\n override execute(command: AXPExecuteCommand): void | Promise<void> {\n switch (command.name) {\n case ADD_SECTION_COMMAND:\n return this.groupsRef()?.addSection();\n case PREVIEW_COMMAND:\n return this.groupsRef()?.handlePreviewClick();\n case DISCARD_COMMAND:\n this.localForm.set(null);\n this.isDirty.set(false);\n this.widgetRenderKey.update((key) => key + 1);\n this.recompute();\n return;\n case SAVE_COMMAND:\n return this.handleSave();\n default:\n return undefined;\n }\n }\n\n //#endregion\n\n //#region ----- Persistence -----\n\n private storedGroups(): AXPReportParameterGroup[] {\n const saved = this.savedGroups();\n if (saved && saved.id === this.reportId()) {\n return saved.parameterGroups;\n }\n const groups = this.rootContext()?.['parameterGroups'];\n return Array.isArray(groups) ? (groups as AXPReportParameterGroup[]) : [];\n }\n\n private async handleSave(): Promise<void> {\n const id = this.reportId();\n if (!id) {\n this.toastService.show({\n color: 'danger',\n title: await this.translateService.translateAsync('@general:messages.error.title'),\n content: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),\n });\n return;\n }\n\n const { parameterGroups } = applyReportFilterForm(this.localForm() ?? this.baseline());\n this.isSaving.set(true);\n this.recompute();\n try {\n await this.reports.update(id, { parameterGroups });\n const root = this.rootContext();\n if (root) {\n root['parameterGroups'] = parameterGroups;\n }\n this.savedGroups.set({ id, parameterGroups });\n this.localForm.set(null);\n this.isDirty.set(false);\n this.toastService.show({\n color: 'success',\n title: await this.translateService.translateAsync('@general:messages.generic.success.title'),\n content: await this.translateService.translateAsync('@general:messages.generic.success.description'),\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n } catch {\n this.toastService.show({\n color: 'danger',\n title: await this.translateService.translateAsync('@general:messages.error.title'),\n content: await this.translateService.translateAsync('@general:messages.entity.update-failed'),\n });\n } finally {\n this.isSaving.set(false);\n this.recompute();\n }\n }\n\n protected override recompute(): void {\n super.recompute();\n const maybeLayout = this.hostPageLayout as { recompute?: () => void } | null;\n maybeLayout?.recompute?.();\n }\n\n //#endregion\n}\n\n//#endregion\n","@if (ready()) {\n <!-- ----- Report filters edited as metadata sections and fields ----- -->\n @for (renderKey of [widgetRenderKey()]; track renderKey) {\n <axp-meta-data-builder-groups\n #groupsRef\n [value]=\"value()\"\n [options]=\"builderOptions()\"\n (valueChange)=\"onValueChange($event)\"\n />\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;AAuBA;AAEA;AAEA,MAAM,YAAY,GAAG,8BAA8B;AACnD,MAAM,eAAe,GAAG,iCAAiC;AACzD,MAAM,mBAAmB,GAAG,oCAAoC;AAChE,MAAM,eAAe,GAAG,iCAAiC;AAUzD;AAEA;AAEA;;;AAGG;AAiBG,MAAO,4BAA6B,SAAQ,0BAA0B,CAAA;aAC1D,IAAA,CAAA,uBAAuB,GAAG,IAAH,CAAQ;;;AAqD/C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAlDT,IAAA,CAAA,WAAW,GAAG,KAAK,CAA0B,EAAE;wFAAC;AAChD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAA2B;AAC7C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAA2B;;;AAMzB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAA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AAC,EAAA,eAAA,EAE3B,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,4BAA8B;AAC1C,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,KAAK,EAAE,yDAAyD;AACjE,qBAAA,EAAA,QAAA,EAAA,oVAAA,EAAA;yYAqByE,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
@@ -0,0 +1,28 @@
1
+ import { AXP_REPORT_LAYOUT_PRESETS } from '@acorex-platform/module-report-management-client/contracts';
2
+ import * as i0 from '@angular/core';
3
+ import { Injectable } from '@angular/core';
4
+
5
+ //#endregion
6
+ //#region ----- Provider -----
7
+ class AXMReportLayoutPageComponentProvider {
8
+ async components() {
9
+ return [
10
+ {
11
+ key: 'report-definition-filters',
12
+ loader: () => import('./acorex-platform-module-report-management-client-report-filter-page.component-C8XSGSdz.mjs').then((m) => m.AXMReportFilterPageComponent),
13
+ },
14
+ ...AXP_REPORT_LAYOUT_PRESETS.map((preset) => ({
15
+ key: preset.componentKey,
16
+ loader: () => import('./acorex-platform-module-report-management-client-report-layout-page.component-DFmdGIY9.mjs').then((m) => m.AXMReportLayoutPageComponent),
17
+ })),
18
+ ];
19
+ }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMReportLayoutPageComponentProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
21
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMReportLayoutPageComponentProvider }); }
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMReportLayoutPageComponentProvider, decorators: [{
24
+ type: Injectable
25
+ }] });
26
+
27
+ export { AXMReportLayoutPageComponentProvider };
28
+ //# sourceMappingURL=acorex-platform-module-report-management-client-report-layout-page-component.provider-BfBckWsh.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-report-management-client-report-layout-page-component.provider-BfBckWsh.mjs","sources":["../../../../libs/modules/report-management/client/src/lib/features/report-definition/report-layout-page-component.provider.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { AXP_REPORT_LAYOUT_PRESETS } from '@acorex-platform/module-report-management-client/contracts';\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Provider -----\n\n@Injectable()\nexport class AXMReportLayoutPageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: 'report-definition-filters',\n loader: () => import('./report-filter-page.component').then((m) => m.AXMReportFilterPageComponent),\n },\n ...AXP_REPORT_LAYOUT_PRESETS.map((preset) => ({\n key: preset.componentKey,\n loader: () => import('./report-layout-page.component').then((m) => m.AXMReportLayoutPageComponent),\n })),\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AASA;AAEA;MAGa,oCAAoC,CAAA;AAC/C,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,2BAA2B;AAChC,gBAAA,MAAM,EAAE,MAAM,OAAO,6FAAgC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,CAAC;AACnG,aAAA;YACD,GAAG,yBAAyB,CAAC,GAAG,CAAC,CAAC,MAAM,MAAM;gBAC5C,GAAG,EAAE,MAAM,CAAC,YAAY;AACxB,gBAAA,MAAM,EAAE,MAAM,OAAO,6FAAgC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,CAAC;AACnG,aAAA,CAAC,CAAC;SACJ;IACH;8GAZW,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAApC,oCAAoC,EAAA,CAAA,CAAA;;2FAApC,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBADhD;;;"}