@acorex-platform/module-report-management-client 2.0.0-next.36 → 2.0.0-next.38

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 (17) 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-BhVA6aSx.mjs} +6 -6
  2. package/fesm2022/{acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-eSjEqt5D.mjs.map → acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-BhVA6aSx.mjs.map} +1 -1
  3. package/fesm2022/acorex-platform-module-report-management-client-contracts.mjs.map +1 -1
  4. 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-J3sTTtDy.mjs} +3 -3
  5. 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-J3sTTtDy.mjs.map} +1 -1
  6. package/fesm2022/{acorex-platform-module-report-management-client-entity-reports-page.component-CK5bCQhm.mjs → acorex-platform-module-report-management-client-entity-reports-page.component-CeTs168h.mjs} +2 -2
  7. 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-CeTs168h.mjs.map} +1 -1
  8. package/fesm2022/{acorex-platform-module-report-management-client-report-layout-switcher.util-C3OVIaEz.mjs → acorex-platform-module-report-management-client-report-layout-switcher.util-BWa8bBRu.mjs} +94 -4
  9. package/fesm2022/acorex-platform-module-report-management-client-report-layout-switcher.util-BWa8bBRu.mjs.map +1 -0
  10. package/fesm2022/{acorex-platform-module-report-management-client-report-popup-viewer.component-CKE8NG5T.mjs → acorex-platform-module-report-management-client-report-popup-viewer.component-rVFfy_z0.mjs} +3 -3
  11. 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-rVFfy_z0.mjs.map} +1 -1
  12. package/fesm2022/{acorex-platform-module-report-management-client-report-viewer-page.component-CPlbhBa_.mjs → acorex-platform-module-report-management-client-report-viewer-page.component-w5x4X_Jm.mjs} +3 -3
  13. package/fesm2022/{acorex-platform-module-report-management-client-report-viewer-page.component-CPlbhBa_.mjs.map → acorex-platform-module-report-management-client-report-viewer-page.component-w5x4X_Jm.mjs.map} +1 -1
  14. package/fesm2022/acorex-platform-module-report-management-client.mjs +1 -1
  15. package/package.json +1 -1
  16. package/types/acorex-platform-module-report-management-client-contracts.d.ts +13 -1
  17. package/fesm2022/acorex-platform-module-report-management-client-report-layout-switcher.util-C3OVIaEz.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-report-management-client-contracts.mjs","sources":["../../../../libs/modules/report-management/contracts/src/commands.keys.ts","../../../../libs/modules/report-management/contracts/src/features.keys.ts","../../../../libs/modules/report-management/contracts/src/menu.keys.ts","../../../../libs/modules/report-management/contracts/src/permission.keys.ts","../../../../libs/modules/report-management/contracts/src/settings.keys.ts","../../../../libs/modules/report-management/contracts/src/root-config.ts","../../../../libs/modules/report-management/contracts/src/manifest.ts","../../../../libs/modules/report-management/contracts/src/report.types.ts","../../../../libs/modules/report-management/contracts/src/report-generation.types.ts","../../../../libs/modules/report-management/contracts/src/runtime.keys.ts","../../../../libs/modules/report-management/contracts/src/entities/query-snapshot-policy/query-snapshot-policy.types.ts","../../../../libs/modules/report-management/contracts/src/entities/query-snapshot/query-snapshot.types.ts","../../../../libs/modules/report-management/contracts/src/index.ts","../../../../libs/modules/report-management/contracts/src/acorex-platform-module-report-management-client-contracts.ts"],"sourcesContent":["//#region ---- Report management command keys ----\n\nexport const AXMReportManagementCommandKeys = {\n RecalculateQuerySnapshots: 'ReportManagement:RecalculateQuerySnapshots',\n RefreshQuerySnapshots: 'ReportManagement:RefreshQuerySnapshots',\n ReportGeneration: {\n Create: 'ReportManagement:ReportGeneration:Create',\n Execute: 'ReportManagement:ReportGeneration:Execute',\n ReleaseInlineWatch: 'ReportManagement:ReportGeneration:ReleaseInlineWatch',\n },\n} as const;\n\nexport const AXM_RECALCULATE_QUERY_SNAPSHOTS_COMMAND_KEY =\n AXMReportManagementCommandKeys.RecalculateQuerySnapshots;\n\nexport const AXM_REFRESH_QUERY_SNAPSHOTS_COMMAND_KEY =\n AXMReportManagementCommandKeys.RefreshQuerySnapshots;\n\n//#endregion\n","export const AXPReportManagementFeatureKeys = {\n ReportBuilder: 'ReportManagement:Feature:ReportBuilder',\n SavedReports: 'ReportManagement:Feature:SavedReports',\n ScheduledReports: 'ReportManagement:Feature:ScheduledReports',\n BackgroundReports: 'ReportManagement:Feature:BackgroundReports',\n} as const;\n\n","export const AXPReportManagementMenuKeys = {\n Root: 'report-management:menu',\n Reports: 'report-management:menu:reports',\n Categories: 'report-management:menu:categories',\n DataSets: 'report-management:menu:data-sets',\n} as const;\n\n","/**\n * Insights & Reporting capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPInsightsReportingPermissionKeys = {\n Access: 'InsightsReporting:Permission:Access',\n MaintainReports: 'InsightsReporting:Permission:MaintainReports',\n MaintainData: 'InsightsReporting:Permission:MaintainData',\n ViewActivityInsight: 'InsightsReporting:Permission:ViewActivityInsight',\n ManageActivityInsight: 'InsightsReporting:Permission:ManageActivityInsight',\n Setup: 'InsightsReporting:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPInsightsReportingPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPermissionsKeys = {\n ReportManagement: {\n Management: AXPInsightsReportingPermissionKeys.MaintainReports,\n Report: {\n Management: AXPInsightsReportingPermissionKeys.MaintainReports,\n View: AXPInsightsReportingPermissionKeys.MaintainReports,\n Create: AXPInsightsReportingPermissionKeys.MaintainReports,\n Update: AXPInsightsReportingPermissionKeys.MaintainReports,\n Delete: AXPInsightsReportingPermissionKeys.MaintainReports,\n },\n Category: {\n Management: AXPInsightsReportingPermissionKeys.Setup,\n View: AXPInsightsReportingPermissionKeys.Setup,\n Create: AXPInsightsReportingPermissionKeys.Setup,\n Update: AXPInsightsReportingPermissionKeys.Setup,\n Delete: AXPInsightsReportingPermissionKeys.Setup,\n },\n },\n} as const;\n","//#region ----- Report management settings -----\n\nimport type { AXPReportGenerationDedupePolicy } from './report.types';\n\nexport enum AXPReportManagementSettings {\n GenerationDedupePolicy = 'ReportManagement:Setting:Generation.Dedupe.Policy',\n GenerationDedupeCooldownMinutes = 'ReportManagement:Setting:Generation.Dedupe.CooldownMinutes',\n GenerationMaxConcurrentPerUser = 'ReportManagement:Setting:Generation.MaxConcurrentPerUser',\n}\n\nexport const AXP_REPORT_MANAGEMENT_GENERATION_SETTING_DEFAULTS = {\n [AXPReportManagementSettings.GenerationDedupePolicy]: 'in-flight' as AXPReportGenerationDedupePolicy,\n [AXPReportManagementSettings.GenerationDedupeCooldownMinutes]: 0,\n [AXPReportManagementSettings.GenerationMaxConcurrentPerUser]: 3,\n} as const;\n\n//#endregion\n","const config = {\n i18n: 'report-management',\n module: 'ReportManagement',\n};\n\nexport const RootConfig = {\n config,\n module: {\n route: 'report-management',\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-chart-bar',\n },\n entities: {\n dataSet: {\n name: 'DataSet',\n title: `t(\"dataSet\", { scope: \"${config.i18n}\" })`,\n titlePlural: `t(\"dataSetPlural\", { scope: \"${config.i18n}\" })`,\n icon: 'fa-light fa-default',\n },\n category: {\n name: 'ReportCategory',\n fullName: `${config.module}.ReportCategory`,\n title: `@${config.i18n}:reports.entities.category.title`,\n titlePlural: `@${config.i18n}:reports.entities.category.plural`,\n icon: 'fa-light fa-folder',\n },\n report: {\n name: 'Report',\n fullName: `${config.module}.Report`,\n title: `@${config.i18n}:reports.entities.report.title`,\n titlePlural: `@${config.i18n}:reports.entities.report.plural`,\n icon: 'fa-light fa-file-chart-pie',\n },\n querySnapshotPolicy: {\n name: 'QuerySnapshotPolicy',\n fullName: `${config.module}.QuerySnapshotPolicy`,\n title: `@${config.i18n}:query-snapshots.entities.policy.title`,\n titlePlural: `@${config.i18n}:query-snapshots.entities.policy.plural`,\n icon: 'fa-light fa-sliders',\n },\n querySnapshot: {\n name: 'QuerySnapshot',\n fullName: `${config.module}.QuerySnapshot`,\n title: `@${config.i18n}:query-snapshots.entities.snapshot.title`,\n titlePlural: `@${config.i18n}:query-snapshots.entities.snapshot.plural`,\n icon: 'fa-light fa-camera',\n },\n reportGenerationRequest: {\n name: 'ReportGenerationRequest',\n fullName: `${config.module}.ReportGenerationRequest`,\n title: `@${config.i18n}:report-generation.entities.request.title`,\n titlePlural: `@${config.i18n}:report-generation.entities.request.plural`,\n icon: 'fa-light fa-file-export',\n },\n },\n} as const;\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Report Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const ReportManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'data',\n required : true,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport { AXPWidgetColumnNode } from '@acorex-platform/framework-shared/widget-core';\nimport { AXPQuerySort } from '@acorex-platform/framework-shared/entity';\nimport { AXPActionMenuItem, AXPCategoryEntity, AXPExportOptions, AXPFilterClause, AXPSystemActionType, type AXPMultiLanguageString, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\n\n//#endregion\n\n//#region ---- Core Report Types and Interfaces ----\n\nexport type AXPReportLayoutType = 'table' | 'chart' | 'cards' | 'custom' | 'pdf';\n\n/**\n * Report Category - Extends AXPCategoryEntity for consistency and performance\n *\n * Inherited properties from AXPCategoryEntity:\n * - id: string - Unique identifier\n * - title: string - Display name\n * - description?: string - Category description\n * - parentId?: string - Parent category ID\n * - childrenCount: number - Direct child categories count (enables lazy loading)\n * - itemsCount?: number - Direct reports count (replaces hasReport boolean)\n * - totalChildrenCount?: number - Total nested categories (optional, for analytics)\n * - totalItemsCount?: number - Total reports in tree (optional, for analytics)\n *\n * Performance benefits:\n * - Lazy loading support (childrenCount > 0 shows expand icon)\n * - Report count display (itemsCount shows \"5 reports\" badge)\n * - Efficient queries (no need to query to know if expandable)\n */\nexport interface AXPReportCategory extends AXPCategoryEntity {\n // No additional properties needed - all inherited from AXPCategoryEntity\n // Use: childrenCount instead of hasChild\n // Use: itemsCount instead of hasReport\n}\n\n/** How an entity-bound report is surfaced on the host entity UI. */\nexport type AXPReportEntityDisplay = 'action' | 'page' | 'popup';\n\n/**\n * Parameter value on an entity binding:\n * - field path / expression string (e.g. `id`)\n * - `'today'` → local calendar day `{ from, to }`\n * - explicit `{ from, to }` date range\n */\nexport type AXPReportEntityParameterValue = string | { from: string; to: string };\n\n/** Binds a report to a host entity type for Reports page discovery. */\nexport interface AXPReportEntityBinding {\n /** Fully qualified entity type, e.g. `SecurityManagement.User`. */\n entity: string;\n /** Optional list title (i18n key or plain text). Falls back to report title. */\n title?: string;\n /** Optional list description (i18n key or plain text). Falls back to report description. */\n description?: string;\n layoutId?: string;\n /**\n * Where to surface the report. Defaults to `['page']` (Reports side-menu page).\n * `action` / `popup` are retained for data compatibility but are not contributed as entity Actions.\n */\n display?: AXPReportEntityDisplay | AXPReportEntityDisplay[];\n /**\n * Map report parameter path → entity field / expression / date token.\n * Example: `{ userId: 'id', dateRange: 'today' }`\n */\n parameters?: Record<string, AXPReportEntityParameterValue>;\n order?: number;\n}\n\nexport interface AXPReportDefinition {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n categoryIds: string[];\n parameterGroups: AXPReportParameterGroup[];\n permissions?: string[];\n layouts: AXPReportLayoutDefinition[]; // Changed to support multiple layouts\n defaultLayoutId: string; // Which layout to show by default\n /** Optional host-entity bindings for the entity `reports` plugin. */\n entities?: AXPReportEntityBinding[];\n /** Background / choose / interactive generation options. Omitted = interactive. */\n generation?: AXPReportGenerationOptions;\n}\n\nexport type AXPReportGenerationMode = 'interactive' | 'background' | 'choose';\n\nexport type AXPReportArtifactKind = 'viewer' | 'pdf' | 'excel' | 'csv';\n\nexport type AXPReportFreezeLayouts = 'current' | 'all';\n\nexport type AXPReportGenerationDedupePolicy =\n | 'none'\n | 'in-flight'\n | 'in-flight-or-cooldown';\n\nexport interface AXPReportGenerationDedupeOptions {\n /** Omitted → inherit platform `ReportManagement:Setting:Generation.Dedupe.Policy`. */\n policy?: AXPReportGenerationDedupePolicy;\n /** Omitted → inherit platform `ReportManagement:Setting:Generation.Dedupe.CooldownMinutes`. */\n cooldownMs?: number;\n}\n\nexport interface AXPReportGenerationOptions {\n /** Omitted = interactive (today’s viewer). */\n mode?: AXPReportGenerationMode;\n /** Default `['viewer']` when mode is background or choose. */\n formats?: AXPReportArtifactKind[];\n executionTimeoutMs?: number;\n /** Default 30. Used to set `expiresAt` when the run finishes. */\n retentionDays?: number;\n /** Default `'all'` query layouts. `'current'` freezes only the layout the user ran. */\n freezeLayouts?: AXPReportFreezeLayouts;\n /** Default true. Store layout/title/parameter snapshot in the viewer freeze file. */\n pinDefinition?: boolean;\n /** Demo/local only. Worker waits this long after marking the run running. */\n simulateDelayMs?: number;\n /** Omitted → dedupe behavior comes from platform settings. */\n dedupe?: AXPReportGenerationDedupeOptions;\n /**\n * When true (default for background/choose), completed jobs stay in the footer tray until dismissed.\n * Set false to remove from tray as soon as the job completes.\n */\n keepInTray?: boolean;\n}\n\nexport type AXPReportLayoutAction = AXPActionMenuItem & {\n priority: 'primary' | 'secondary';\n};\n\n/**\n * Layout Definition - Associates a layout with metadata\n */\nexport interface AXPReportLayoutDefinition {\n id: string; // Unique identifier for this layout\n title: AXPMultiLanguageString; // Display name (e.g., \"Table View\", \"Chart View\")\n description?: AXPMultiLanguageString; // Optional description\n icon?: string; // Icon for layout switcher UI\n layout: AXPReportLayout; // The actual layout configuration\n dataSource?: AXPReportDataSource; // Optional layout-specific dataSource (overrides report-level)\n isDefault?: boolean; // Alternative to defaultLayoutId\n actions?: AXPReportLayoutAction[];\n export?: AXPExportOptions;\n}\n\nexport interface AXPReportParameterGroup {\n name: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n parameters: AXPReportParameter[];\n}\n\nexport interface AXPReportParameter {\n path: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n /**\n * Boolean or expression (e.g. `{{ permission.check(\"…\") }}` / `{{ feature.check(\"…\") }}`).\n * Omitted / `true` means visible. Evaluated by the Report Viewer layout renderer.\n */\n visible?: boolean | string;\n widget: AXPWidgetNode;\n}\n\n//#endregion\n\n//#region ---- Data Source Types ----\n\nexport type AXPReportDataSource =\n | AXPQueryDataSource\n | AXPCustomDataSource\n | AXPAggregatedDataSource\n | AXPTransformedDataSource;\n\n/**\n * Query Data Source - Used for executing predefined queries (AXPQuery)\n */\nexport interface AXPQueryDataSource {\n type: 'query';\n name: string; // The registered query name, e.g., 'getProductList'\n description?: string;\n\n inputs?: AXPReportParameterBinding[]; // Maps report parameters to query inputs\n sortFields?: AXPQuerySort[]; // Default sorting applied by the backend\n pagination?: boolean; // Enables paging in result set\n}\n\n/**\n * Custom Data Source - Used for fetching data from custom providers like REST APIs or external services\n */\nexport interface AXPCustomDataSource {\n type: 'custom';\n provider: string; // Example: 'http://api/report' or 'custom:MyHandler'\n description?: string;\n\n inputs?: AXPReportParameterBinding[]; // Maps report parameters to payload\n options?: { [key: string]: any }; // Additional options for the custom handler\n}\n\n/**\n * Parameter Binding - Maps report-level parameters to actual query/command input structure\n */\nexport interface AXPReportParameterBinding {\n parameterKey: string; // Report parameter key, e.g., 'startDate'\n bindTo: string; // Input key in the query/command payload, e.g., 'filters.from'\n}\n\n/**\n * Aggregated Data Source - Used for pre-aggregated data optimized for charts\n */\nexport interface AXPAggregatedDataSource {\n type: 'aggregated';\n baseQuery: string; // Base query to aggregate from\n description?: string;\n\n groupBy: string[]; // Fields to group by\n aggregations: AXPAggregation[]; // Aggregation operations\n inputs?: AXPReportParameterBinding[];\n}\n\n/**\n * Transformed Data Source - Applies transformations to existing data sources\n */\nexport interface AXPTransformedDataSource {\n type: 'transformed';\n baseDataSource: AXPReportDataSource; // Source to transform\n description?: string;\n\n transformations: AXPDataTransformation[]; // List of transformations\n inputs?: AXPReportParameterBinding[];\n}\n\n/**\n * Aggregation operation for aggregated data sources\n */\nexport interface AXPAggregation {\n field: string;\n operation: 'sum' | 'avg' | 'count' | 'min' | 'max' | 'distinct';\n alias?: string; // Output field name\n}\n\n/**\n * Data transformation operation\n */\nexport interface AXPDataTransformation {\n type: 'filter' | 'sort' | 'group' | 'pivot' | 'format';\n config: Record<string, any>; // Transformation-specific configuration\n}\n\n//#endregion\n\n//#region ---- Group By & Drill Down ----\n\n/**\n * Drill-down target for a grouped report row.\n * When reportId is omitted, the current report is used.\n */\nexport interface AXPReportDrillDownConfig {\n reportId?: string;\n layoutId?: string;\n title?: string;\n parameters?: Record<string, string>;\n}\n\n/**\n * Declares how a summary report is grouped and which detail view opens on drill-down.\n * Multiple definitions allow alternative drill paths (e.g. by brand vs by category).\n */\nexport interface AXPReportGroupByDefinition {\n fields: string[];\n displayField?: string;\n /** When true (default), `displayField` renders as a link instead of a row command column. */\n linkDisplay?: boolean;\n title?: string;\n default?: boolean;\n priority?: 'primary' | 'secondary';\n drillDown: AXPReportDrillDownConfig;\n}\n\n//#endregion\n\n//#region ---- Layout Types ----\n\nexport type AXPReportLayout = AXPReportTableLayout | AXPReportChartLayout | AXPReportPdfLayout;\n\n/**\n * Table Layout - Displays data in tabular format\n */\n\nexport interface AXPReportTableLayoutRowAction extends AXPActionMenuItem {\n priority: 'primary' | 'secondary';\n type: AXPSystemActionType | string;\n default?: boolean;\n}\n\nexport interface AXPReportTableLayout {\n type: 'table';\n columns: AXPReportColumn[];\n actions?: AXPReportTableLayoutRowAction[];\n options?: AXPTableOptions;\n groupBy?: AXPReportGroupByDefinition[];\n conditionalFormatting?: AXPConditionalFormatRule[];\n summary?: AXPReportSummaryOptions[];\n header?: AXPReportHeaderFooter;\n footer?: AXPReportHeaderFooter;\n}\n\nexport interface AXPTableOptions {\n pagination?: boolean;\n stickyHeader?: boolean;\n stripedRows?: boolean;\n sorting?: AXPQuerySort[];\n selectable?: {\n mode: 'single' | 'multiple' | 'none';\n };\n}\n\n/**\n * Chart Layout - Displays data in various chart formats\n */\nexport interface AXPReportChartLayout {\n type: 'chart';\n options: AXPReportChartOptions;\n header?: AXPReportHeaderFooter;\n footer?: AXPReportHeaderFooter;\n}\n\nexport interface AXPReportChartOptions {\n chartType: 'bar' | 'line' | 'pie' | 'doughnut' | 'area' | 'scatter' | 'radar' | 'mixed';\n dataMapping: AXPChartDataMapping;\n styling?: AXPChartStyling;\n interactivity?: AXPChartInteractivity;\n}\n\n/**\n * Chart Data Mapping Configuration\n */\nexport interface AXPChartDataMapping {\n // Core fields\n xField: string; // X-axis data field\n yFields: string | string[]; // Y-axis data field(s) for multiple series\n\n // Grouping and categorization\n groupBy?: string; // Group data by this field\n seriesField?: string; // Field to create multiple series\n\n // Special fields for specific chart types\n sizeField?: string; // For bubble charts\n colorField?: string; // For gradient/conditional coloring\n labelField?: string; // Custom label field\n\n // Data aggregation\n aggregation?: {\n method: 'sum' | 'avg' | 'count' | 'min' | 'max';\n field: string;\n };\n}\n\n/**\n * Chart Visual Styling Configuration\n */\nexport interface AXPChartStyling {\n // Theme and colors\n colorScheme?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'custom';\n /** Palette applied by series index when `seriesColors` is not set. */\n customColors?: string[];\n /**\n * Per-series fill colors keyed by chart category id/label\n * (e.g. Online → success, Away → warning, Busy → danger).\n */\n seriesColors?: Record<string, string>;\n\n // Chart appearance\n gridLines?: boolean;\n legend?: {\n show: boolean;\n position: 'top' | 'bottom' | 'left' | 'right';\n };\n\n // Axes configuration\n xAxis?: AXPChartAxisConfig;\n yAxis?: AXPChartAxisConfig;\n\n // Animation\n animation?: {\n enabled: boolean;\n duration?: number;\n };\n\n // Chart-specific styling\n chartSpecific?: {\n // Bar chart options\n bar?: {\n orientation: 'vertical' | 'horizontal';\n mode: 'grouped' | 'stacked';\n barWidth?: number;\n };\n\n // Line chart options\n line?: {\n style: 'straight' | 'curved' | 'stepped';\n showPoints?: boolean;\n tension?: number;\n };\n\n // Area chart options\n area?: {\n mode: 'normal' | 'stacked' | 'percentage';\n opacity?: number;\n };\n\n // Pie/Doughnut options\n pie?: {\n startAngle?: number;\n innerRadius?: number; // For doughnut charts\n showLabels?: boolean;\n };\n };\n}\n\n/**\n * Chart Axis Configuration\n */\nexport interface AXPChartAxisConfig {\n title?: string;\n show?: boolean;\n type?: 'linear' | 'logarithmic' | 'datetime' | 'category';\n min?: number | string;\n max?: number | string;\n format?: string;\n gridLines?: boolean;\n tickInterval?: number;\n}\n\n/**\n * Chart Interactivity Configuration\n */\nexport interface AXPChartInteractivity {\n // Zoom and pan\n zoom?: {\n enabled: boolean;\n mode?: 'x' | 'y' | 'xy';\n };\n\n // Tooltips\n tooltips?: {\n enabled: boolean;\n format?: string;\n showOnHover?: boolean;\n };\n\n // Click events\n onClick?: {\n enabled: boolean;\n action?: 'drill-down' | 'filter' | 'custom';\n };\n\n // Selection\n selection?: {\n enabled: boolean;\n mode?: 'single' | 'multiple';\n };\n\n // Export\n export?: {\n enabled: boolean;\n formats?: ('png' | 'jpg' | 'pdf' | 'svg')[];\n };\n}\n\n/**\n * PDF Layout - Displays PDF documents\n */\nexport interface AXPReportPdfLayout {\n type: 'pdf';\n options?: AXPReportPdfOptions;\n header?: AXPReportHeaderFooter;\n footer?: AXPReportHeaderFooter;\n}\n\n/**\n * PDF Layout Options\n */\nexport interface AXPReportPdfOptions {\n showDownloadButton?: boolean;\n showPrintButton?: boolean;\n showZoomControls?: boolean;\n showFullscreenButton?: boolean;\n defaultZoom?: number; // Percentage (e.g., 100, 150, 200)\n height?: string; // CSS height (e.g., '100%', '600px')\n}\n\n//#region ---- Shared Models ----\n\nexport interface AXPReportColumn {\n field: string;\n title?: string;\n /**\n * Boolean or expression (e.g. `{{ permission.check(\"…\") }}`).\n * Omitted / `true` means visible. Evaluated when building the table view.\n */\n visible?: boolean | string;\n width?: number | 'auto';\n align?: 'left' | 'center' | 'right';\n /** When true, column header supports interactive sort (opt-in). */\n sortable?: boolean;\n /** Pin column to the start or end of the table (definition-only). */\n pin?: 'start' | 'end';\n widget?: AXPWidgetColumnNode;\n /**\n * Optional cell interactivity. When omitted, group-by `displayField` columns\n * can still render as drill links automatically in report table view.\n */\n interactivity?: AXPReportColumnInteractivity;\n}\n\n/**\n * Column cell interaction — link triggers a command with the current row as context.\n * Platform widgets may mirror this via column `options.displayAs: 'link'` in the future.\n */\nexport interface AXPReportColumnInteractivity {\n type: 'link';\n command: {\n name: string;\n options?: Record<string, unknown>;\n };\n}\n\n/** Server-computed report footer totals keyed by column field. */\nexport type AXPReportTableSummaryResult = Record<string, number | null>;\n\nexport interface AXPReportSummaryOptions {\n field: string;\n operation: 'sum' | 'avg' | 'count' | 'min' | 'max';\n displayIn: 'groupFooter' | 'reportFooter';\n}\n\nexport interface AXPConditionalFormatRule {\n field: string;\n condition: '>' | '<' | '=' | '!=' | 'contains';\n value: any;\n style: {\n color?: string;\n backgroundColor?: string;\n fontWeight?: 'normal' | 'bold';\n };\n}\n\nexport interface AXPReportHeaderFooter {\n title?: string;\n logoUrl?: string;\n showDate?: boolean;\n showParameters?: boolean;\n customHtml?: string;\n}\n\n/**\n * Layout switcher options for UI components\n */\nexport interface AXPLayoutSwitcherOption {\n id: string;\n title: AXPMultiLanguageString;\n icon?: string;\n type: AXPReportLayoutType;\n}\n\n/**\n * Runtime layout selection state\n */\nexport interface AXPReportLayoutState {\n reportId: string;\n activeLayoutId: string;\n availableLayouts: AXPLayoutSwitcherOption[];\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { AXPMultiLanguageString, AXPRuntimeQueryResult } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport type {\n AXPReportArtifactKind,\n AXPReportLayoutDefinition,\n} from './report.types';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type AXPReportGenerationStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';\n\nexport type AXPReportGenerationTrigger = 'manual' | 'schedule' | 'export';\n\nexport interface AXPReportGenerationArtifact {\n kind: AXPReportArtifactKind;\n fileId?: string;\n contentType?: string;\n fileName?: string;\n rowCount?: number;\n byteLength?: number;\n lastError?: string;\n}\n\nexport const REPORT_GENERATION_NOTIFICATION_DEFINITION_KEY = 'ReportManagement:ReportGeneration';\n\nexport const REPORT_GENERATION_OPEN_FROZEN_COMMAND = 'ReportManagement.Report:OpenViewer';\n\n/** In-app inbox correlation id for a completed report generation run. */\nexport function buildReportGenerationNotificationCorrelationId(runId: string): string {\n const normalized = runId.trim();\n return normalized ? `report-generation:${normalized}` : 'report-generation:';\n}\n\nexport interface AXMReportGenerationRequest extends AXPEntityModel<string> {\n reportId: string;\n layoutId?: string;\n layoutIds?: string[];\n parameters?: Record<string, unknown>;\n formats: AXPReportArtifactKind[];\n trigger: AXPReportGenerationTrigger;\n status: AXPReportGenerationStatus;\n requestedBy?: string;\n jobId?: string;\n scheduleId?: string;\n scheduledOccurrence?: string;\n startedAt?: string;\n completedAt?: string;\n durationMs?: number;\n lastError?: string;\n expiresAt?: string;\n sourceRequestId?: string;\n /** When true, skip in-app notification because the report viewer is watching this run inline. */\n suppressNotificationOnComplete?: boolean;\n artifacts: AXPReportGenerationArtifact[];\n}\n\nexport interface AXPReportViewerFreeze {\n version: 1;\n reportId: string;\n generatedAt: string;\n parameters: Record<string, unknown>;\n definition?: {\n title: AXPMultiLanguageString;\n defaultLayoutId: string;\n layouts: AXPReportLayoutDefinition[];\n };\n dataSources: Array<{\n layoutId: string;\n queryName: string;\n result: AXPRuntimeQueryResult;\n }>;\n}\n\nexport interface AXPReportGenerationCreateInput {\n reportId: string;\n layoutId?: string;\n layoutIds?: string[];\n parameters?: Record<string, unknown>;\n formats?: AXPReportArtifactKind[];\n trigger?: AXPReportGenerationTrigger;\n sourceRequestId?: string;\n scheduleId?: string;\n scheduledOccurrence?: string;\n /** Set when the report viewer will poll and show the result inline. */\n suppressNotificationOnComplete?: boolean;\n}\n\nexport interface AXPReportGenerationReleaseInlineWatchInput {\n id: string;\n}\n\nexport interface AXPReportGenerationCreateResult {\n id: string;\n jobId?: string;\n status: AXPReportGenerationStatus;\n /** True when an existing run was returned instead of creating a new row. */\n deduplicated?: boolean;\n}\n\nexport interface AXPReportGenerationExecuteInput {\n reportRequestId: string;\n}\n\nexport interface AXPReportGenerationExecuteResult {\n reportRequestId: string;\n fileIds: string[];\n rowCount?: number;\n}\n\nexport interface AXPReportGenerationGetInput {\n id: string;\n}\n\nexport interface AXPReportGenerationGetViewerFreezeInput {\n id: string;\n}\n\nexport interface AXPReportGenerationListMineInput {\n skip?: number;\n take?: number;\n}\n\n//#endregion\n","//#region ---- Report management runtime keys ----\n\nexport const AXMReportManagementQueryKeys = {\n Category: {\n ListRoot: 'ReportManagement:Category:ListRoot',\n GetById: 'ReportManagement:Category:GetById',\n },\n Report: {\n GetDefinition: 'ReportManagement:Report:GetDefinition',\n },\n ReportGeneration: {\n Get: 'ReportManagement:ReportGeneration:Get',\n ListMine: 'ReportManagement:ReportGeneration:ListMine',\n GetViewerFreeze: 'ReportManagement:ReportGeneration:GetViewerFreeze',\n },\n} as const;\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type AXMQuerySnapshotTriggerOperation = 'create' | 'update' | 'delete';\n\nexport interface AXMQuerySnapshotPolicyTriggers {\n entities: string[];\n operations: AXMQuerySnapshotTriggerOperation[];\n debounceMs: number;\n}\n\nexport interface AXMQuerySnapshotPolicyEntityModel extends AXPEntityModel<string> {\n queryName: string;\n enabled: boolean;\n schedule: string;\n staleAfterMs: number;\n triggers: AXMQuerySnapshotPolicyTriggers;\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { AXPRuntimeCollectionData } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type AXMQuerySnapshotStatus = 'ready' | 'stale' | 'failed';\n\nexport type AXMQuerySnapshotPayload =\n | { success: true; kind: 'value'; data: unknown }\n | { success: true; kind: 'object'; data: unknown }\n | { success: true; kind: 'collection'; data: AXPRuntimeCollectionData };\n\nexport interface AXMQuerySnapshotEntityModel extends AXPEntityModel<string> {\n key: string;\n status: AXMQuerySnapshotStatus;\n calculatedAt: string;\n durationMs: number;\n lastError?: string;\n payload: AXMQuerySnapshotPayload;\n}\n\nexport interface AXMRecalculateQuerySnapshotsInput {\n tenantId?: string;\n applicationId?: string;\n queryKeys?: string[];\n /** When true, a full run ignores catch-up skips (manual refresh all). */\n force?: boolean;\n}\n\nexport interface AXMRefreshQuerySnapshotsInput {\n queryKeys?: string[];\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './commands.keys';\nexport * from './features.keys';\nexport * from './menu.keys';\nexport * from './permission.keys';\nexport * from './settings.keys';\n\nexport * from './root-config';\nexport * from './manifest';\nexport * from './report.types';\nexport * from './report-generation.types';\nexport * from './runtime.keys';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEO,MAAM,8BAA8B,GAAG;AAC5C,IAAA,yBAAyB,EAAE,4CAA4C;AACvE,IAAA,qBAAqB,EAAE,wCAAwC;AAC/D,IAAA,gB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R,QAAA,QAAQ,EAAE,oCAAoC;AAC9C,QAAA,OAAO,EAAE,mCAAmC;AAC7C,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,aAAa,EAAE,uCAAuC;AACvD,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA,GAAG,EAAE,uCAAuC;AAC5C,QAAA,QAAQ,EAAE,4CAA4C;AACtD,QAAA,eAAe,EAAE,mDAAmD;AACrE,KAAA;;AAGH;;ACjBA;AAwBA;;ACxBA;AAqCA;;ACrCA;;ACAA;;AAEG;;"}
1
+ {"version":3,"file":"acorex-platform-module-report-management-client-contracts.mjs","sources":["../../../../libs/modules/report-management/contracts/src/commands.keys.ts","../../../../libs/modules/report-management/contracts/src/features.keys.ts","../../../../libs/modules/report-management/contracts/src/menu.keys.ts","../../../../libs/modules/report-management/contracts/src/permission.keys.ts","../../../../libs/modules/report-management/contracts/src/settings.keys.ts","../../../../libs/modules/report-management/contracts/src/root-config.ts","../../../../libs/modules/report-management/contracts/src/manifest.ts","../../../../libs/modules/report-management/contracts/src/report.types.ts","../../../../libs/modules/report-management/contracts/src/report-generation.types.ts","../../../../libs/modules/report-management/contracts/src/runtime.keys.ts","../../../../libs/modules/report-management/contracts/src/entities/query-snapshot-policy/query-snapshot-policy.types.ts","../../../../libs/modules/report-management/contracts/src/entities/query-snapshot/query-snapshot.types.ts","../../../../libs/modules/report-management/contracts/src/index.ts","../../../../libs/modules/report-management/contracts/src/acorex-platform-module-report-management-client-contracts.ts"],"sourcesContent":["//#region ---- Report management command keys ----\n\nexport const AXMReportManagementCommandKeys = {\n RecalculateQuerySnapshots: 'ReportManagement:RecalculateQuerySnapshots',\n RefreshQuerySnapshots: 'ReportManagement:RefreshQuerySnapshots',\n ReportGeneration: {\n Create: 'ReportManagement:ReportGeneration:Create',\n Execute: 'ReportManagement:ReportGeneration:Execute',\n ReleaseInlineWatch: 'ReportManagement:ReportGeneration:ReleaseInlineWatch',\n },\n} as const;\n\nexport const AXM_RECALCULATE_QUERY_SNAPSHOTS_COMMAND_KEY =\n AXMReportManagementCommandKeys.RecalculateQuerySnapshots;\n\nexport const AXM_REFRESH_QUERY_SNAPSHOTS_COMMAND_KEY =\n AXMReportManagementCommandKeys.RefreshQuerySnapshots;\n\n//#endregion\n","export const AXPReportManagementFeatureKeys = {\n ReportBuilder: 'ReportManagement:Feature:ReportBuilder',\n SavedReports: 'ReportManagement:Feature:SavedReports',\n ScheduledReports: 'ReportManagement:Feature:ScheduledReports',\n BackgroundReports: 'ReportManagement:Feature:BackgroundReports',\n} as const;\n\n","export const AXPReportManagementMenuKeys = {\n Root: 'report-management:menu',\n Reports: 'report-management:menu:reports',\n Categories: 'report-management:menu:categories',\n DataSets: 'report-management:menu:data-sets',\n} as const;\n\n","/**\n * Insights & Reporting capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPInsightsReportingPermissionKeys = {\n Access: 'InsightsReporting:Permission:Access',\n MaintainReports: 'InsightsReporting:Permission:MaintainReports',\n MaintainData: 'InsightsReporting:Permission:MaintainData',\n ViewActivityInsight: 'InsightsReporting:Permission:ViewActivityInsight',\n ManageActivityInsight: 'InsightsReporting:Permission:ManageActivityInsight',\n Setup: 'InsightsReporting:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPInsightsReportingPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPermissionsKeys = {\n ReportManagement: {\n Management: AXPInsightsReportingPermissionKeys.MaintainReports,\n Report: {\n Management: AXPInsightsReportingPermissionKeys.MaintainReports,\n View: AXPInsightsReportingPermissionKeys.MaintainReports,\n Create: AXPInsightsReportingPermissionKeys.MaintainReports,\n Update: AXPInsightsReportingPermissionKeys.MaintainReports,\n Delete: AXPInsightsReportingPermissionKeys.MaintainReports,\n },\n Category: {\n Management: AXPInsightsReportingPermissionKeys.Setup,\n View: AXPInsightsReportingPermissionKeys.Setup,\n Create: AXPInsightsReportingPermissionKeys.Setup,\n Update: AXPInsightsReportingPermissionKeys.Setup,\n Delete: AXPInsightsReportingPermissionKeys.Setup,\n },\n },\n} as const;\n","//#region ----- Report management settings -----\n\nimport type { AXPReportGenerationDedupePolicy } from './report.types';\n\nexport enum AXPReportManagementSettings {\n GenerationDedupePolicy = 'ReportManagement:Setting:Generation.Dedupe.Policy',\n GenerationDedupeCooldownMinutes = 'ReportManagement:Setting:Generation.Dedupe.CooldownMinutes',\n GenerationMaxConcurrentPerUser = 'ReportManagement:Setting:Generation.MaxConcurrentPerUser',\n}\n\nexport const AXP_REPORT_MANAGEMENT_GENERATION_SETTING_DEFAULTS = {\n [AXPReportManagementSettings.GenerationDedupePolicy]: 'in-flight' as AXPReportGenerationDedupePolicy,\n [AXPReportManagementSettings.GenerationDedupeCooldownMinutes]: 0,\n [AXPReportManagementSettings.GenerationMaxConcurrentPerUser]: 3,\n} as const;\n\n//#endregion\n","const config = {\n i18n: 'report-management',\n module: 'ReportManagement',\n};\n\nexport const RootConfig = {\n config,\n module: {\n route: 'report-management',\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-chart-bar',\n },\n entities: {\n dataSet: {\n name: 'DataSet',\n title: `t(\"dataSet\", { scope: \"${config.i18n}\" })`,\n titlePlural: `t(\"dataSetPlural\", { scope: \"${config.i18n}\" })`,\n icon: 'fa-light fa-default',\n },\n category: {\n name: 'ReportCategory',\n fullName: `${config.module}.ReportCategory`,\n title: `@${config.i18n}:reports.entities.category.title`,\n titlePlural: `@${config.i18n}:reports.entities.category.plural`,\n icon: 'fa-light fa-folder',\n },\n report: {\n name: 'Report',\n fullName: `${config.module}.Report`,\n title: `@${config.i18n}:reports.entities.report.title`,\n titlePlural: `@${config.i18n}:reports.entities.report.plural`,\n icon: 'fa-light fa-file-chart-pie',\n },\n querySnapshotPolicy: {\n name: 'QuerySnapshotPolicy',\n fullName: `${config.module}.QuerySnapshotPolicy`,\n title: `@${config.i18n}:query-snapshots.entities.policy.title`,\n titlePlural: `@${config.i18n}:query-snapshots.entities.policy.plural`,\n icon: 'fa-light fa-sliders',\n },\n querySnapshot: {\n name: 'QuerySnapshot',\n fullName: `${config.module}.QuerySnapshot`,\n title: `@${config.i18n}:query-snapshots.entities.snapshot.title`,\n titlePlural: `@${config.i18n}:query-snapshots.entities.snapshot.plural`,\n icon: 'fa-light fa-camera',\n },\n reportGenerationRequest: {\n name: 'ReportGenerationRequest',\n fullName: `${config.module}.ReportGenerationRequest`,\n title: `@${config.i18n}:report-generation.entities.request.title`,\n titlePlural: `@${config.i18n}:report-generation.entities.request.plural`,\n icon: 'fa-light fa-file-export',\n },\n },\n} as const;\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Report Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const ReportManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'data',\n required : true,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport { AXPWidgetColumnNode } from '@acorex-platform/framework-shared/widget-core';\nimport { AXPQuerySort } from '@acorex-platform/framework-shared/entity';\nimport { AXPActionMenuItem, AXPCategoryEntity, AXPExportOptions, AXPFilterClause, AXPSystemActionType, type AXPMultiLanguageString, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\n\n//#endregion\n\n//#region ---- Core Report Types and Interfaces ----\n\nexport type AXPReportLayoutType = 'table' | 'chart' | 'cards' | 'custom' | 'pdf';\n\n/**\n * Report Category - Extends AXPCategoryEntity for consistency and performance\n *\n * Inherited properties from AXPCategoryEntity:\n * - id: string - Unique identifier\n * - title: string - Display name\n * - description?: string - Category description\n * - parentId?: string - Parent category ID\n * - childrenCount: number - Direct child categories count (enables lazy loading)\n * - itemsCount?: number - Direct reports count (replaces hasReport boolean)\n * - totalChildrenCount?: number - Total nested categories (optional, for analytics)\n * - totalItemsCount?: number - Total reports in tree (optional, for analytics)\n *\n * Performance benefits:\n * - Lazy loading support (childrenCount > 0 shows expand icon)\n * - Report count display (itemsCount shows \"5 reports\" badge)\n * - Efficient queries (no need to query to know if expandable)\n */\nexport interface AXPReportCategory extends AXPCategoryEntity {\n // No additional properties needed - all inherited from AXPCategoryEntity\n // Use: childrenCount instead of hasChild\n // Use: itemsCount instead of hasReport\n}\n\n/** How an entity-bound report is surfaced on the host entity UI. */\nexport type AXPReportEntityDisplay = 'action' | 'page' | 'popup';\n\n/**\n * Parameter value on an entity binding:\n * - field path / expression string (e.g. `id`)\n * - `'today'` → local calendar day `{ from, to }`\n * - explicit `{ from, to }` date range\n */\nexport type AXPReportEntityParameterValue = string | { from: string; to: string };\n\n/** Binds a report to a host entity type for Reports page discovery. */\nexport interface AXPReportEntityBinding {\n /** Fully qualified entity type, e.g. `SecurityManagement.User`. */\n entity: string;\n /** Optional list title (i18n key or plain text). Falls back to report title. */\n title?: string;\n /** Optional list description (i18n key or plain text). Falls back to report description. */\n description?: string;\n layoutId?: string;\n /**\n * Where to surface the report. Defaults to `['page']` (Reports side-menu page).\n * `action` / `popup` are retained for data compatibility but are not contributed as entity Actions.\n */\n display?: AXPReportEntityDisplay | AXPReportEntityDisplay[];\n /**\n * Map report parameter path → entity field / expression / date token.\n * Example: `{ userId: 'id', dateRange: 'today' }`\n */\n parameters?: Record<string, AXPReportEntityParameterValue>;\n order?: number;\n}\n\nexport interface AXPReportDefinition {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n categoryIds: string[];\n parameterGroups: AXPReportParameterGroup[];\n permissions?: string[];\n layouts: AXPReportLayoutDefinition[]; // Changed to support multiple layouts\n defaultLayoutId: string; // Which layout to show by default\n /** Optional host-entity bindings for the entity `reports` plugin. */\n entities?: AXPReportEntityBinding[];\n /** Background / choose / interactive generation options. Omitted = interactive. */\n generation?: AXPReportGenerationOptions;\n}\n\nexport type AXPReportGenerationMode = 'interactive' | 'background' | 'choose';\n\nexport type AXPReportArtifactKind = 'viewer' | 'pdf' | 'excel' | 'csv';\n\nexport type AXPReportFreezeLayouts = 'current' | 'all';\n\nexport type AXPReportGenerationDedupePolicy =\n | 'none'\n | 'in-flight'\n | 'in-flight-or-cooldown';\n\nexport interface AXPReportGenerationDedupeOptions {\n /** Omitted → inherit platform `ReportManagement:Setting:Generation.Dedupe.Policy`. */\n policy?: AXPReportGenerationDedupePolicy;\n /** Omitted → inherit platform `ReportManagement:Setting:Generation.Dedupe.CooldownMinutes`. */\n cooldownMs?: number;\n}\n\nexport interface AXPReportGenerationOptions {\n /** Omitted = interactive (today’s viewer). */\n mode?: AXPReportGenerationMode;\n /** Default `['viewer']` when mode is background or choose. */\n formats?: AXPReportArtifactKind[];\n executionTimeoutMs?: number;\n /** Default 30. Used to set `expiresAt` when the run finishes. */\n retentionDays?: number;\n /** Default `'all'` query layouts. `'current'` freezes only the layout the user ran. */\n freezeLayouts?: AXPReportFreezeLayouts;\n /** Default true. Store layout/title/parameter snapshot in the viewer freeze file. */\n pinDefinition?: boolean;\n /** Demo/local only. Worker waits this long after marking the run running. */\n simulateDelayMs?: number;\n /** Omitted → dedupe behavior comes from platform settings. */\n dedupe?: AXPReportGenerationDedupeOptions;\n /**\n * When true (default for background/choose), completed jobs stay in the footer tray until dismissed.\n * Set false to remove from tray as soon as the job completes.\n */\n keepInTray?: boolean;\n}\n\nexport type AXPReportLayoutAction = AXPActionMenuItem & {\n priority: 'primary' | 'secondary';\n};\n\n/**\n * Layout Definition - Associates a layout with metadata\n */\nexport interface AXPReportLayoutDefinition {\n id: string; // Unique identifier for this layout\n title: AXPMultiLanguageString; // Display name (e.g., \"Table View\", \"Chart View\")\n description?: AXPMultiLanguageString; // Optional description\n icon?: string; // Icon for layout switcher UI\n layout: AXPReportLayout; // The actual layout configuration\n dataSource?: AXPReportDataSource; // Optional layout-specific dataSource (overrides report-level)\n isDefault?: boolean; // Alternative to defaultLayoutId\n actions?: AXPReportLayoutAction[];\n export?: AXPExportOptions;\n}\n\nexport interface AXPReportParameterGroup {\n name: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n parameters: AXPReportParameter[];\n}\n\nexport interface AXPReportParameter {\n path: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n /**\n * Boolean or expression (e.g. `{{ permission.check(\"…\") }}` / `{{ feature.check(\"…\") }}`).\n * Omitted / `true` means visible. Evaluated by the Report Viewer layout renderer.\n */\n visible?: boolean | string;\n widget: AXPWidgetNode;\n}\n\n//#endregion\n\n//#region ---- Data Source Types ----\n\nexport type AXPReportDataSource =\n | AXPQueryDataSource\n | AXPCustomDataSource\n | AXPAggregatedDataSource\n | AXPTransformedDataSource;\n\n/**\n * Query Data Source - Used for executing predefined queries (AXPQuery)\n */\nexport interface AXPQueryDataSource {\n type: 'query';\n name: string; // The registered query name, e.g., 'getProductList'\n description?: string;\n\n inputs?: AXPReportParameterBinding[]; // Maps report parameters to query inputs\n sortFields?: AXPQuerySort[]; // Default sorting applied by the backend\n pagination?: boolean; // Enables paging in result set\n}\n\n/**\n * Custom Data Source - Used for fetching data from custom providers like REST APIs or external services\n */\nexport interface AXPCustomDataSource {\n type: 'custom';\n provider: string; // Example: 'http://api/report' or 'custom:MyHandler'\n description?: string;\n\n inputs?: AXPReportParameterBinding[]; // Maps report parameters to payload\n options?: { [key: string]: any }; // Additional options for the custom handler\n}\n\n/**\n * Parameter Binding - Maps report-level parameters to actual query/command input structure\n */\nexport interface AXPReportParameterBinding {\n parameterKey: string; // Report parameter key, e.g., 'startDate'\n bindTo: string; // Input key in the query/command payload, e.g., 'filters.from'\n}\n\n/**\n * Aggregated Data Source - Used for pre-aggregated data optimized for charts\n */\nexport interface AXPAggregatedDataSource {\n type: 'aggregated';\n baseQuery: string; // Base query to aggregate from\n description?: string;\n\n groupBy: string[]; // Fields to group by\n aggregations: AXPAggregation[]; // Aggregation operations\n inputs?: AXPReportParameterBinding[];\n}\n\n/**\n * Transformed Data Source - Applies transformations to existing data sources\n */\nexport interface AXPTransformedDataSource {\n type: 'transformed';\n baseDataSource: AXPReportDataSource; // Source to transform\n description?: string;\n\n transformations: AXPDataTransformation[]; // List of transformations\n inputs?: AXPReportParameterBinding[];\n}\n\n/**\n * Aggregation operation for aggregated data sources\n */\nexport interface AXPAggregation {\n field: string;\n operation: 'sum' | 'avg' | 'count' | 'min' | 'max' | 'distinct';\n alias?: string; // Output field name\n}\n\n/**\n * Data transformation operation\n */\nexport interface AXPDataTransformation {\n type: 'filter' | 'sort' | 'group' | 'pivot' | 'format';\n config: Record<string, any>; // Transformation-specific configuration\n}\n\n//#endregion\n\n//#region ---- Group By & Drill Down ----\n\n/**\n * Drill-down target for a grouped report row.\n * When reportId is omitted, the current report is used.\n */\nexport interface AXPReportDrillDownConfig {\n reportId?: string;\n layoutId?: string;\n title?: string;\n parameters?: Record<string, string>;\n}\n\n/**\n * Declares how a summary report is grouped and which detail view opens on drill-down.\n * Multiple definitions allow alternative drill paths (e.g. by brand vs by category).\n */\nexport interface AXPReportGroupByDefinition {\n fields: string[];\n displayField?: string;\n /** When true (default), `displayField` renders as a link instead of a row command column. */\n linkDisplay?: boolean;\n title?: string;\n default?: boolean;\n priority?: 'primary' | 'secondary';\n drillDown: AXPReportDrillDownConfig;\n}\n\n//#endregion\n\n//#region ---- Layout Types ----\n\nexport type AXPReportLayout = AXPReportTableLayout | AXPReportChartLayout | AXPReportPdfLayout;\n\n/**\n * Table Layout - Displays data in tabular format\n */\n\nexport interface AXPReportTableLayoutRowAction extends AXPActionMenuItem {\n priority: 'primary' | 'secondary';\n type: AXPSystemActionType | string;\n default?: boolean;\n}\n\nexport interface AXPReportTableLayout {\n type: 'table';\n columns: AXPReportColumn[];\n actions?: AXPReportTableLayoutRowAction[];\n options?: AXPTableOptions;\n groupBy?: AXPReportGroupByDefinition[];\n conditionalFormatting?: AXPConditionalFormatRule[];\n summary?: AXPReportSummaryOptions[];\n header?: AXPReportHeaderFooter;\n footer?: AXPReportHeaderFooter;\n}\n\n/** Result-grid hierarchy. Omitted reports stay a flat table. */\nexport interface AXPReportTableHierarchy {\n /** Row field that points at the parent row, for example `parentId`. */\n parentField: string;\n /** Row field used as the node id. Defaults to `id`. */\n keyField?: string;\n}\n\nexport interface AXPTableOptions {\n pagination?: boolean;\n stickyHeader?: boolean;\n stripedRows?: boolean;\n sorting?: AXPQuerySort[];\n selectable?: {\n mode: 'single' | 'multiple' | 'none';\n };\n /**\n * When set, the result grid expands rows whose `parentField` links them.\n * Rows with an empty parent are the roots. Other reports leave this unset.\n */\n hierarchy?: AXPReportTableHierarchy;\n}\n\n/**\n * Chart Layout - Displays data in various chart formats\n */\nexport interface AXPReportChartLayout {\n type: 'chart';\n options: AXPReportChartOptions;\n header?: AXPReportHeaderFooter;\n footer?: AXPReportHeaderFooter;\n}\n\nexport interface AXPReportChartOptions {\n chartType: 'bar' | 'line' | 'pie' | 'doughnut' | 'area' | 'scatter' | 'radar' | 'mixed';\n dataMapping: AXPChartDataMapping;\n styling?: AXPChartStyling;\n interactivity?: AXPChartInteractivity;\n}\n\n/**\n * Chart Data Mapping Configuration\n */\nexport interface AXPChartDataMapping {\n // Core fields\n xField: string; // X-axis data field\n yFields: string | string[]; // Y-axis data field(s) for multiple series\n\n // Grouping and categorization\n groupBy?: string; // Group data by this field\n seriesField?: string; // Field to create multiple series\n\n // Special fields for specific chart types\n sizeField?: string; // For bubble charts\n colorField?: string; // For gradient/conditional coloring\n labelField?: string; // Custom label field\n\n // Data aggregation\n aggregation?: {\n method: 'sum' | 'avg' | 'count' | 'min' | 'max';\n field: string;\n };\n}\n\n/**\n * Chart Visual Styling Configuration\n */\nexport interface AXPChartStyling {\n // Theme and colors\n colorScheme?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'custom';\n /** Palette applied by series index when `seriesColors` is not set. */\n customColors?: string[];\n /**\n * Per-series fill colors keyed by chart category id/label\n * (e.g. Online → success, Away → warning, Busy → danger).\n */\n seriesColors?: Record<string, string>;\n\n // Chart appearance\n gridLines?: boolean;\n legend?: {\n show: boolean;\n position: 'top' | 'bottom' | 'left' | 'right';\n };\n\n // Axes configuration\n xAxis?: AXPChartAxisConfig;\n yAxis?: AXPChartAxisConfig;\n\n // Animation\n animation?: {\n enabled: boolean;\n duration?: number;\n };\n\n // Chart-specific styling\n chartSpecific?: {\n // Bar chart options\n bar?: {\n orientation: 'vertical' | 'horizontal';\n mode: 'grouped' | 'stacked';\n barWidth?: number;\n };\n\n // Line chart options\n line?: {\n style: 'straight' | 'curved' | 'stepped';\n showPoints?: boolean;\n tension?: number;\n };\n\n // Area chart options\n area?: {\n mode: 'normal' | 'stacked' | 'percentage';\n opacity?: number;\n };\n\n // Pie/Doughnut options\n pie?: {\n startAngle?: number;\n innerRadius?: number; // For doughnut charts\n showLabels?: boolean;\n };\n };\n}\n\n/**\n * Chart Axis Configuration\n */\nexport interface AXPChartAxisConfig {\n title?: string;\n show?: boolean;\n type?: 'linear' | 'logarithmic' | 'datetime' | 'category';\n min?: number | string;\n max?: number | string;\n format?: string;\n gridLines?: boolean;\n tickInterval?: number;\n}\n\n/**\n * Chart Interactivity Configuration\n */\nexport interface AXPChartInteractivity {\n // Zoom and pan\n zoom?: {\n enabled: boolean;\n mode?: 'x' | 'y' | 'xy';\n };\n\n // Tooltips\n tooltips?: {\n enabled: boolean;\n format?: string;\n showOnHover?: boolean;\n };\n\n // Click events\n onClick?: {\n enabled: boolean;\n action?: 'drill-down' | 'filter' | 'custom';\n };\n\n // Selection\n selection?: {\n enabled: boolean;\n mode?: 'single' | 'multiple';\n };\n\n // Export\n export?: {\n enabled: boolean;\n formats?: ('png' | 'jpg' | 'pdf' | 'svg')[];\n };\n}\n\n/**\n * PDF Layout - Displays PDF documents\n */\nexport interface AXPReportPdfLayout {\n type: 'pdf';\n options?: AXPReportPdfOptions;\n header?: AXPReportHeaderFooter;\n footer?: AXPReportHeaderFooter;\n}\n\n/**\n * PDF Layout Options\n */\nexport interface AXPReportPdfOptions {\n showDownloadButton?: boolean;\n showPrintButton?: boolean;\n showZoomControls?: boolean;\n showFullscreenButton?: boolean;\n defaultZoom?: number; // Percentage (e.g., 100, 150, 200)\n height?: string; // CSS height (e.g., '100%', '600px')\n}\n\n//#region ---- Shared Models ----\n\nexport interface AXPReportColumn {\n field: string;\n title?: string;\n /**\n * Boolean or expression (e.g. `{{ permission.check(\"…\") }}`).\n * Omitted / `true` means visible. Evaluated when building the table view.\n */\n visible?: boolean | string;\n width?: number | 'auto';\n align?: 'left' | 'center' | 'right';\n /** When true, column header supports interactive sort (opt-in). */\n sortable?: boolean;\n /** Pin column to the start or end of the table (definition-only). */\n pin?: 'start' | 'end';\n widget?: AXPWidgetColumnNode;\n /**\n * Optional cell interactivity. When omitted, group-by `displayField` columns\n * can still render as drill links automatically in report table view.\n */\n interactivity?: AXPReportColumnInteractivity;\n}\n\n/**\n * Column cell interaction — link triggers a command with the current row as context.\n * Platform widgets may mirror this via column `options.displayAs: 'link'` in the future.\n */\nexport interface AXPReportColumnInteractivity {\n type: 'link';\n command: {\n name: string;\n options?: Record<string, unknown>;\n };\n}\n\n/** Server-computed report footer totals keyed by column field. */\nexport type AXPReportTableSummaryResult = Record<string, number | null>;\n\nexport interface AXPReportSummaryOptions {\n field: string;\n operation: 'sum' | 'avg' | 'count' | 'min' | 'max';\n displayIn: 'groupFooter' | 'reportFooter';\n}\n\nexport interface AXPConditionalFormatRule {\n field: string;\n condition: '>' | '<' | '=' | '!=' | 'contains';\n value: any;\n style: {\n color?: string;\n backgroundColor?: string;\n fontWeight?: 'normal' | 'bold';\n };\n}\n\nexport interface AXPReportHeaderFooter {\n title?: string;\n logoUrl?: string;\n showDate?: boolean;\n showParameters?: boolean;\n customHtml?: string;\n}\n\n/**\n * Layout switcher options for UI components\n */\nexport interface AXPLayoutSwitcherOption {\n id: string;\n title: AXPMultiLanguageString;\n icon?: string;\n type: AXPReportLayoutType;\n}\n\n/**\n * Runtime layout selection state\n */\nexport interface AXPReportLayoutState {\n reportId: string;\n activeLayoutId: string;\n availableLayouts: AXPLayoutSwitcherOption[];\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { AXPMultiLanguageString, AXPRuntimeQueryResult } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport type {\n AXPReportArtifactKind,\n AXPReportLayoutDefinition,\n} from './report.types';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type AXPReportGenerationStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';\n\nexport type AXPReportGenerationTrigger = 'manual' | 'schedule' | 'export';\n\nexport interface AXPReportGenerationArtifact {\n kind: AXPReportArtifactKind;\n fileId?: string;\n contentType?: string;\n fileName?: string;\n rowCount?: number;\n byteLength?: number;\n lastError?: string;\n}\n\nexport const REPORT_GENERATION_NOTIFICATION_DEFINITION_KEY = 'ReportManagement:ReportGeneration';\n\nexport const REPORT_GENERATION_OPEN_FROZEN_COMMAND = 'ReportManagement.Report:OpenViewer';\n\n/** In-app inbox correlation id for a completed report generation run. */\nexport function buildReportGenerationNotificationCorrelationId(runId: string): string {\n const normalized = runId.trim();\n return normalized ? `report-generation:${normalized}` : 'report-generation:';\n}\n\nexport interface AXMReportGenerationRequest extends AXPEntityModel<string> {\n reportId: string;\n layoutId?: string;\n layoutIds?: string[];\n parameters?: Record<string, unknown>;\n formats: AXPReportArtifactKind[];\n trigger: AXPReportGenerationTrigger;\n status: AXPReportGenerationStatus;\n requestedBy?: string;\n jobId?: string;\n scheduleId?: string;\n scheduledOccurrence?: string;\n startedAt?: string;\n completedAt?: string;\n durationMs?: number;\n lastError?: string;\n expiresAt?: string;\n sourceRequestId?: string;\n /** When true, skip in-app notification because the report viewer is watching this run inline. */\n suppressNotificationOnComplete?: boolean;\n artifacts: AXPReportGenerationArtifact[];\n}\n\nexport interface AXPReportViewerFreeze {\n version: 1;\n reportId: string;\n generatedAt: string;\n parameters: Record<string, unknown>;\n definition?: {\n title: AXPMultiLanguageString;\n defaultLayoutId: string;\n layouts: AXPReportLayoutDefinition[];\n };\n dataSources: Array<{\n layoutId: string;\n queryName: string;\n result: AXPRuntimeQueryResult;\n }>;\n}\n\nexport interface AXPReportGenerationCreateInput {\n reportId: string;\n layoutId?: string;\n layoutIds?: string[];\n parameters?: Record<string, unknown>;\n formats?: AXPReportArtifactKind[];\n trigger?: AXPReportGenerationTrigger;\n sourceRequestId?: string;\n scheduleId?: string;\n scheduledOccurrence?: string;\n /** Set when the report viewer will poll and show the result inline. */\n suppressNotificationOnComplete?: boolean;\n}\n\nexport interface AXPReportGenerationReleaseInlineWatchInput {\n id: string;\n}\n\nexport interface AXPReportGenerationCreateResult {\n id: string;\n jobId?: string;\n status: AXPReportGenerationStatus;\n /** True when an existing run was returned instead of creating a new row. */\n deduplicated?: boolean;\n}\n\nexport interface AXPReportGenerationExecuteInput {\n reportRequestId: string;\n}\n\nexport interface AXPReportGenerationExecuteResult {\n reportRequestId: string;\n fileIds: string[];\n rowCount?: number;\n}\n\nexport interface AXPReportGenerationGetInput {\n id: string;\n}\n\nexport interface AXPReportGenerationGetViewerFreezeInput {\n id: string;\n}\n\nexport interface AXPReportGenerationListMineInput {\n skip?: number;\n take?: number;\n}\n\n//#endregion\n","//#region ---- Report management runtime keys ----\n\nexport const AXMReportManagementQueryKeys = {\n Category: {\n ListRoot: 'ReportManagement:Category:ListRoot',\n GetById: 'ReportManagement:Category:GetById',\n },\n Report: {\n GetDefinition: 'ReportManagement:Report:GetDefinition',\n },\n ReportGeneration: {\n Get: 'ReportManagement:ReportGeneration:Get',\n ListMine: 'ReportManagement:ReportGeneration:ListMine',\n GetViewerFreeze: 'ReportManagement:ReportGeneration:GetViewerFreeze',\n },\n} as const;\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type AXMQuerySnapshotTriggerOperation = 'create' | 'update' | 'delete';\n\nexport interface AXMQuerySnapshotPolicyTriggers {\n entities: string[];\n operations: AXMQuerySnapshotTriggerOperation[];\n debounceMs: number;\n}\n\nexport interface AXMQuerySnapshotPolicyEntityModel extends AXPEntityModel<string> {\n queryName: string;\n enabled: boolean;\n schedule: string;\n staleAfterMs: number;\n triggers: AXMQuerySnapshotPolicyTriggers;\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { AXPRuntimeCollectionData } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport type AXMQuerySnapshotStatus = 'ready' | 'stale' | 'failed';\n\nexport type AXMQuerySnapshotPayload =\n | { success: true; kind: 'value'; data: unknown }\n | { success: true; kind: 'object'; data: unknown }\n | { success: true; kind: 'collection'; data: AXPRuntimeCollectionData };\n\nexport interface AXMQuerySnapshotEntityModel extends AXPEntityModel<string> {\n key: string;\n status: AXMQuerySnapshotStatus;\n calculatedAt: string;\n durationMs: number;\n lastError?: string;\n payload: AXMQuerySnapshotPayload;\n}\n\nexport interface AXMRecalculateQuerySnapshotsInput {\n tenantId?: string;\n applicationId?: string;\n queryKeys?: string[];\n /** When true, a full run ignores catch-up skips (manual refresh all). */\n force?: boolean;\n}\n\nexport interface AXMRefreshQuerySnapshotsInput {\n queryKeys?: string[];\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './commands.keys';\nexport * from './features.keys';\nexport * from './menu.keys';\nexport * from './permission.keys';\nexport * from './settings.keys';\n\nexport * from './root-config';\nexport * from './manifest';\nexport * from './report.types';\nexport * from './report-generation.types';\nexport * from './runtime.keys';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEO,MAAM,8BAA8B,GAAG;AAC5C,IAAA,yBAAyB,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;;AC9HA;AAEO,MAAM,4BAA4B,GAAG;AAC1C,IAAA,QAAQ,EAAE;AACR,QAAA,QAAQ,EAAE,oCAAoC;AAC9C,QAAA,OAAO,EAAE,mCAAmC;AAC7C,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,aAAa,EAAE,uCAAuC;AACvD,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA,GAAG,EAAE,uCAAuC;AAC5C,QAAA,QAAQ,EAAE,4CAA4C;AACtD,QAAA,eAAe,EAAE,mDAAmD;AACrE,KAAA;;AAGH;;ACjBA;AAwBA;;ACxBA;AAqCA;;ACrCA;;ACAA;;AAEG;;"}
@@ -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-BhVA6aSx.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-CeTs168h.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-J3sTTtDy.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-J3sTTtDy.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-BhVA6aSx.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-CeTs168h.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;;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BACd,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-CeTs168h.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,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AqD;AAC7D,qBAAA,EAAA,QAAA,EAAA,mhHAAA,EAAA;;;"}
@@ -12,7 +12,7 @@ import * as i2 from '@angular/common';
12
12
  import { CommonModule } from '@angular/common';
13
13
  import * as i0 from '@angular/core';
14
14
  import { inject, Injectable, computed, effect, untracked, signal, ChangeDetectionStrategy, Component, ViewEncapsulation, viewChild } from '@angular/core';
15
- import { r as resolveReportFilterDefaultValue, c as convertContextDataToFilterClause, b as collectReportParameterDefaults, A as AXPReportViewerService, d as queryResultToChartSeries, e as AXLineChartReportMapper, f as AXPieChartReportMapper, g as AXBarChartReportMapper, q as queryResultToPdfSource } from './acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-eSjEqt5D.mjs';
15
+ import { r as resolveReportFilterDefaultValue, c as convertContextDataToFilterClause, b as collectReportParameterDefaults, A as AXPReportViewerService, d as queryResultToChartSeries, e as AXLineChartReportMapper, f as AXPieChartReportMapper, g as AXBarChartReportMapper, q as queryResultToPdfSource } from './acorex-platform-module-report-management-client-acorex-platform-module-report-management-client-BhVA6aSx.mjs';
16
16
  import { AXButtonModule } from '@acorex/components/button';
17
17
  import { AXDecoratorModule } from '@acorex/components/decorators';
18
18
  import { DomSanitizer } from '@angular/platform-browser';
@@ -1826,6 +1826,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1826
1826
  }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *translate=\"let t\">\n @if (vm.status() === AXPPageStatus.Processing) {\n <!-- Loading State -->\n <div class=\"__loading flex flex-col items-center justify-center h-full gap-6 p-8\">\n <div class=\"spinner spin w-10 h-10\"></div>\n <div class=\"__loading-text text-sm opacity-70\">\n {{ t('@report-management:report-viewer.components.pdf.messages.loading') | async }}\n </div>\n </div>\n } @else if (vm.status() === AXPPageStatus.Error) {\n <!-- Error State -->\n <axp-state-message mode=\"error\" icon=\"fa-light fa-exclamation-triangle\"\n [title]=\"'@report-management:report-viewer.messages.error.fetch-title'\"\n [description]=\"vm.error() || '@report-management:report-viewer.messages.error.fetch-description'\">\n </axp-state-message>\n } @else if (isPdfReady()) {\n <!-- PDF Embed Only -->\n <embed class=\"__pdf-embed w-full h-full\" [src]=\"pdfSource()\" type=\"application/pdf\" />\n } @else {\n <!-- No PDF Data State -->\n <axp-state-message icon=\"fa-light fa-file-pdf\"\n [title]=\"'@report-management:report-viewer.components.pdf.empty-states.no-data.title'\"\n [description]=\"'@report-management:report-viewer.components.pdf.empty-states.no-data.description'\">\n </axp-state-message>\n }\n</ng-container>", styles: [".axp-report-pdf-view .__loading{min-height:400px}.axp-report-pdf-view .__pdf-container{background:var(--ax-color-background)}.axp-report-pdf-view .__pdf-container.__fullscreen{position:fixed;z-index:9999;inset:0;border-radius:0}.axp-report-pdf-view .__pdf-toolbar{background:var(--ax-color-surface)}.axp-report-pdf-view .__pdf-body{background:var(--ax-color-background-secondary)}.axp-report-pdf-view .__pdf-wrapper{min-height:400px}.axp-report-pdf-view .__pdf-embed{--tw-border-style: none;border-style:none;box-shadow:0 2px 8px #0000001a;transition:width .3s ease,height .3s ease}.axp-report-pdf-view .__zoom-level{-webkit-user-select:none;user-select:none}@media(max-width:640px){.axp-report-pdf-view .__zoom-controls{margin-top:calc(var(--spacing, .25rem) * 2);width:100%;justify-content:center;margin-left:0}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
1827
1827
  }] });
1828
1828
 
1829
+ //#region ---- Report result hierarchy ----
1830
+ const TREE_FETCH_TAKE = 1000;
1831
+ function reportTreeFetchTake() {
1832
+ return TREE_FETCH_TAKE;
1833
+ }
1834
+ /** Parent id when the grid is loading children of an expanded row. */
1835
+ function readHierarchyParentId(filter, parentField) {
1836
+ return findParentEqual(asFilterNode(filter), parentField);
1837
+ }
1838
+ function sliceHierarchyRows(rows, hierarchy, parentId, skip, take) {
1839
+ const parentField = hierarchy.parentField;
1840
+ const keyField = hierarchy.keyField?.trim() || 'id';
1841
+ const matched = parentId
1842
+ ? rows.filter((row) => text(row[parentField]) === parentId)
1843
+ : rows.filter((row) => text(row[parentField]) === '');
1844
+ const page = matched.slice(skip, skip + take).map((row) => ({
1845
+ ...row,
1846
+ hasChild: rowHasChildren(rows, parentField, text(row[keyField])),
1847
+ }));
1848
+ return { items: page, total: matched.length };
1849
+ }
1850
+ function rowHasChildren(rows, parentField, key) {
1851
+ if (!key) {
1852
+ return false;
1853
+ }
1854
+ return rows.some((row) => text(row[parentField]) === key);
1855
+ }
1856
+ function findParentEqual(filter, parentField) {
1857
+ if (!filter) {
1858
+ return undefined;
1859
+ }
1860
+ if (filter.field === parentField && filter.operator?.type === 'equal' && filter.value != null && filter.value !== '') {
1861
+ return String(filter.value);
1862
+ }
1863
+ for (const child of filter.filters ?? []) {
1864
+ const found = findParentEqual(child, parentField);
1865
+ if (found) {
1866
+ return found;
1867
+ }
1868
+ }
1869
+ return undefined;
1870
+ }
1871
+ function asFilterNode(filter) {
1872
+ if (!filter || typeof filter !== 'object') {
1873
+ return undefined;
1874
+ }
1875
+ return filter;
1876
+ }
1877
+ function text(value) {
1878
+ if (value == null) {
1879
+ return '';
1880
+ }
1881
+ return String(value).trim();
1882
+ }
1883
+ //#endregion
1884
+
1829
1885
  class AXPReportTableViewComponent {
1830
1886
  constructor() {
1831
1887
  //#region ---- Dependencies ----
@@ -1844,6 +1900,8 @@ class AXPReportTableViewComponent {
1844
1900
  ...(ngDevMode ? [{ debugName: "tableSummary" }] : /* istanbul ignore next */ []));
1845
1901
  this.handledExecutionRequestId = 0;
1846
1902
  this.lastDataSourcePreferencesKey = null;
1903
+ this.hierarchyRows = null;
1904
+ this.hierarchyCacheKey = '';
1847
1905
  //#endregion
1848
1906
  //#region ---- Effects ----
1849
1907
  this.#resetExecutionHandler = effect(() => {
@@ -1851,6 +1909,8 @@ class AXPReportTableViewComponent {
1851
1909
  untracked(() => {
1852
1910
  this.handledExecutionRequestId = 0;
1853
1911
  this.lastDataSourcePreferencesKey = null;
1912
+ this.hierarchyRows = null;
1913
+ this.hierarchyCacheKey = '';
1854
1914
  void reportId;
1855
1915
  });
1856
1916
  }, /* @ts-ignore */
@@ -1925,8 +1985,13 @@ class AXPReportTableViewComponent {
1925
1985
  load: async (e) => {
1926
1986
  if (!this.vm.allowFetchData()) {
1927
1987
  this.tableSummary.set(null);
1988
+ this.hierarchyRows = null;
1928
1989
  return { items: [], total: 0 };
1929
1990
  }
1991
+ const hierarchy = this.layout()?.options?.hierarchy;
1992
+ if (hierarchy?.parentField) {
1993
+ return this.loadHierarchyPage(e, hierarchy);
1994
+ }
1930
1995
  const result = await this.vm.fetchData(e);
1931
1996
  const page = runtimeQueryCollectionData(result);
1932
1997
  if (!page) {
@@ -1948,6 +2013,11 @@ class AXPReportTableViewComponent {
1948
2013
  return this.layout().options?.pagination !== false;
1949
2014
  }, /* @ts-ignore */
1950
2015
  ...(ngDevMode ? [{ debugName: "paginationEnabled" }] : /* istanbul ignore next */ []));
2016
+ this.hierarchyParentField = computed(() => {
2017
+ const parentField = this.layout()?.options?.hierarchy?.parentField?.trim();
2018
+ return parentField || undefined;
2019
+ }, /* @ts-ignore */
2020
+ ...(ngDevMode ? [{ debugName: "hierarchyParentField" }] : /* istanbul ignore next */ []));
1951
2021
  this.hasReportFooterSummary = computed(() => {
1952
2022
  return ((this.layout().summary?.some((s) => s.displayIn === 'reportFooter') ?? false) &&
1953
2023
  this.tableSummary() !== null);
@@ -2147,6 +2217,26 @@ class AXPReportTableViewComponent {
2147
2217
  }
2148
2218
  return count;
2149
2219
  }
2220
+ async loadHierarchyPage(query, hierarchy) {
2221
+ const cacheKey = `${this.vm.executionRequestId()}:${JSON.stringify(query.sort ?? [])}`;
2222
+ const parentId = readHierarchyParentId(query.filter, hierarchy.parentField);
2223
+ if (this.hierarchyCacheKey !== cacheKey || !this.hierarchyRows) {
2224
+ const result = await this.vm.fetchData({ ...query, skip: 0, take: reportTreeFetchTake() });
2225
+ const page = runtimeQueryCollectionData(result);
2226
+ if (!page) {
2227
+ this.tableSummary.set(null);
2228
+ this.hierarchyRows = [];
2229
+ this.hierarchyCacheKey = cacheKey;
2230
+ return { items: [], total: 0 };
2231
+ }
2232
+ this.tableSummary.set(page.aggregateRows?.[0] ?? null);
2233
+ this.hierarchyRows = (page.items ?? []);
2234
+ this.hierarchyCacheKey = cacheKey;
2235
+ }
2236
+ const skip = query.skip ?? 0;
2237
+ const take = query.take ?? this.hierarchyRows.length;
2238
+ return sliceHierarchyRows(this.hierarchyRows, hierarchy, parentId, skip, take);
2239
+ }
2150
2240
  applySortToDataSource(sorts) {
2151
2241
  const sortOptions = sorts.map((s) => ({ field: s.name, dir: s.dir }));
2152
2242
  this.dataSource.sort(...sortOptions);
@@ -2174,7 +2264,7 @@ class AXPReportTableViewComponent {
2174
2264
  };
2175
2265
  }
2176
2266
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPReportTableViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2177
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPReportTableViewComponent, isStandalone: true, selector: "axp-report-table-view", host: { classAttribute: "axp-report-table-view flex flex-col flex-1 min-h-0 h-full w-full" }, viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-data-table\n #grid\n [dataSource]=\"dataSource\"\n [paging]=\"paginationEnabled()\"\n [showFooter]=\"hasReportFooterSummary()\"\n [allowReordering]=\"true\"\n (onRowDbClick)=\"handleDbRowClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n class=\"flex-1 min-h-0 h-full\"\n>\n @if (vm.showRowIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\n @if (vm.canSelectRows()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (column of columns(); track column.field) {\n @if (column.visible) {\n <ng-template #footerCell>\n <div\n class=\"w-full truncate\"\n [class.text-start]=\"column.align === 'left'\"\n [class.text-center]=\"column.align === 'center'\"\n [class.text-end]=\"column.align === 'right'\"\n >\n @if (isFirstVisibleColumn(column.field) && hasReportFooterSummary()) {\n <span class=\"font-medium\">\n {{ '@report-management:report-viewer.components.table.footer-total' | translate | async }}\n </span>\n } @else if (getSummaryDisplayValue(column.field); as summaryValue) {\n <span>{{ summaryValue }}</span>\n }\n </div>\n </ng-template>\n @if (column.isGroupByDrillLink && column.drillDisplayField) {\n <axp-text-command-column\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [textField]=\"column.drillDisplayField\"\n [columnFixed]=\"column.pin\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n (commandClick)=\"handleGroupByDrill(column.drillDisplayField, $event.data)\"\n ></axp-text-command-column>\n } @else {\n <axp-widget-column-renderer\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [node]=\"column.widget!\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [columnFixed]=\"column.pin\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n ></axp-widget-column-renderer>\n }\n }\n }\n @if (hasPrimaryRowAction()) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"primaryRowAction().length * 70 + 'px'\"\n [items]=\"primaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-command-column>\n }\n @if (hasSecondaryRowAction()) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"secondaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-dropdown-command-column>\n }\n</ax-data-table>\n", styles: ["axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table{height:100%}axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table tbody tr.empty-row{height:100%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "rowCssClass", "cellCssClass", "highlightText", "look", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1.AXRowIndexColumnComponent, selector: "ax-index-column", inputs: ["width", "caption", "fixed", "footerTemplate", "padZero"] }, { kind: "component", type: i1.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed", "advanceSelect"] }, { kind: "component", type: i1.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i1.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "emptyStateTemplate", "emptyStateText", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i2$1.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "columnKey", "node", "footerTemplate", "expandHandler", "sortEnabled", "headerSortDirection", "headerSortPriority", "columnFixed", "cellTemplate", "headerTemplate"], outputs: ["sortToggle"] }, { kind: "component", type: AXPTextCommandColumnComponent, selector: "axp-text-command-column", inputs: ["caption", "textField", "customWidth", "columnFixed", "footerTemplate", "sortEnabled", "headerSortDirection", "headerSortPriority", "disabled", "emptyDisplay"], outputs: ["commandClick", "sortToggle"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2267
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPReportTableViewComponent, isStandalone: true, selector: "axp-report-table-view", host: { classAttribute: "axp-report-table-view flex flex-col flex-1 min-h-0 h-full w-full" }, viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-data-table\n #grid\n [dataSource]=\"dataSource\"\n [parentField]=\"hierarchyParentField()\"\n [paging]=\"paginationEnabled()\"\n [showFooter]=\"hasReportFooterSummary()\"\n [allowReordering]=\"true\"\n (onRowDbClick)=\"handleDbRowClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n class=\"flex-1 min-h-0 h-full\"\n>\n @if (vm.showRowIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\n @if (vm.canSelectRows()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (column of columns(); track column.field) {\n @if (column.visible) {\n <ng-template #footerCell>\n <div\n class=\"w-full truncate\"\n [class.text-start]=\"column.align === 'left'\"\n [class.text-center]=\"column.align === 'center'\"\n [class.text-end]=\"column.align === 'right'\"\n >\n @if (isFirstVisibleColumn(column.field) && hasReportFooterSummary()) {\n <span class=\"font-medium\">\n {{ '@report-management:report-viewer.components.table.footer-total' | translate | async }}\n </span>\n } @else if (getSummaryDisplayValue(column.field); as summaryValue) {\n <span>{{ summaryValue }}</span>\n }\n </div>\n </ng-template>\n @if (column.isGroupByDrillLink && column.drillDisplayField) {\n <axp-text-command-column\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [textField]=\"column.drillDisplayField\"\n [columnFixed]=\"column.pin\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n (commandClick)=\"handleGroupByDrill(column.drillDisplayField, $event.data)\"\n ></axp-text-command-column>\n } @else {\n <axp-widget-column-renderer\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [node]=\"column.widget!\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [columnFixed]=\"column.pin\"\n [expandHandler]=\"!!hierarchyParentField() && isFirstVisibleColumn(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n ></axp-widget-column-renderer>\n }\n }\n }\n @if (hasPrimaryRowAction()) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"primaryRowAction().length * 70 + 'px'\"\n [items]=\"primaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-command-column>\n }\n @if (hasSecondaryRowAction()) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"secondaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-dropdown-command-column>\n }\n</ax-data-table>\n", styles: ["axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table{height:100%}axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table tbody tr.empty-row{height:100%!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "rowCssClass", "cellCssClass", "highlightText", "look", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowPointerDown", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1.AXRowIndexColumnComponent, selector: "ax-index-column", inputs: ["width", "caption", "fixed", "footerTemplate", "padZero", "zeroPadLength"] }, { kind: "component", type: i1.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed", "advanceSelect"] }, { kind: "component", type: i1.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i1.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "emptyStateTemplate", "emptyStateText", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i2$1.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "columnKey", "node", "footerTemplate", "expandHandler", "sortEnabled", "headerSortDirection", "headerSortPriority", "columnFixed", "cellTemplate", "headerTemplate"], outputs: ["sortToggle"] }, { kind: "component", type: AXPTextCommandColumnComponent, selector: "axp-text-command-column", inputs: ["caption", "textField", "customWidth", "columnFixed", "footerTemplate", "sortEnabled", "headerSortDirection", "headerSortPriority", "disabled", "emptyDisplay"], outputs: ["commandClick", "sortToggle"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2178
2268
  }
2179
2269
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPReportTableViewComponent, decorators: [{
2180
2270
  type: Component,
@@ -2188,7 +2278,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2188
2278
  AXPTextCommandColumnComponent,
2189
2279
  ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
2190
2280
  class: 'axp-report-table-view flex flex-col flex-1 min-h-0 h-full w-full',
2191
- }, template: "<ax-data-table\n #grid\n [dataSource]=\"dataSource\"\n [paging]=\"paginationEnabled()\"\n [showFooter]=\"hasReportFooterSummary()\"\n [allowReordering]=\"true\"\n (onRowDbClick)=\"handleDbRowClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n class=\"flex-1 min-h-0 h-full\"\n>\n @if (vm.showRowIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\n @if (vm.canSelectRows()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (column of columns(); track column.field) {\n @if (column.visible) {\n <ng-template #footerCell>\n <div\n class=\"w-full truncate\"\n [class.text-start]=\"column.align === 'left'\"\n [class.text-center]=\"column.align === 'center'\"\n [class.text-end]=\"column.align === 'right'\"\n >\n @if (isFirstVisibleColumn(column.field) && hasReportFooterSummary()) {\n <span class=\"font-medium\">\n {{ '@report-management:report-viewer.components.table.footer-total' | translate | async }}\n </span>\n } @else if (getSummaryDisplayValue(column.field); as summaryValue) {\n <span>{{ summaryValue }}</span>\n }\n </div>\n </ng-template>\n @if (column.isGroupByDrillLink && column.drillDisplayField) {\n <axp-text-command-column\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [textField]=\"column.drillDisplayField\"\n [columnFixed]=\"column.pin\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n (commandClick)=\"handleGroupByDrill(column.drillDisplayField, $event.data)\"\n ></axp-text-command-column>\n } @else {\n <axp-widget-column-renderer\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [node]=\"column.widget!\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [columnFixed]=\"column.pin\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n ></axp-widget-column-renderer>\n }\n }\n }\n @if (hasPrimaryRowAction()) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"primaryRowAction().length * 70 + 'px'\"\n [items]=\"primaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-command-column>\n }\n @if (hasSecondaryRowAction()) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"secondaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-dropdown-command-column>\n }\n</ax-data-table>\n", styles: ["axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table{height:100%}axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table tbody tr.empty-row{height:100%!important}\n"] }]
2281
+ }, template: "<ax-data-table\n #grid\n [dataSource]=\"dataSource\"\n [parentField]=\"hierarchyParentField()\"\n [paging]=\"paginationEnabled()\"\n [showFooter]=\"hasReportFooterSummary()\"\n [allowReordering]=\"true\"\n (onRowDbClick)=\"handleDbRowClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n class=\"flex-1 min-h-0 h-full\"\n>\n @if (vm.showRowIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\n @if (vm.canSelectRows()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (column of columns(); track column.field) {\n @if (column.visible) {\n <ng-template #footerCell>\n <div\n class=\"w-full truncate\"\n [class.text-start]=\"column.align === 'left'\"\n [class.text-center]=\"column.align === 'center'\"\n [class.text-end]=\"column.align === 'right'\"\n >\n @if (isFirstVisibleColumn(column.field) && hasReportFooterSummary()) {\n <span class=\"font-medium\">\n {{ '@report-management:report-viewer.components.table.footer-total' | translate | async }}\n </span>\n } @else if (getSummaryDisplayValue(column.field); as summaryValue) {\n <span>{{ summaryValue }}</span>\n }\n </div>\n </ng-template>\n @if (column.isGroupByDrillLink && column.drillDisplayField) {\n <axp-text-command-column\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [textField]=\"column.drillDisplayField\"\n [columnFixed]=\"column.pin\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n (commandClick)=\"handleGroupByDrill(column.drillDisplayField, $event.data)\"\n ></axp-text-command-column>\n } @else {\n <axp-widget-column-renderer\n [customWidth]=\"column.width == 'auto' ? 'auto' : column.width + 'px'\"\n [caption]=\"(column.title | translate | async)!\"\n [node]=\"column.widget!\"\n [sortEnabled]=\"column.sortable\"\n [headerSortDirection]=\"resolveColumnSortDirection(column.field)\"\n [columnFixed]=\"column.pin\"\n [expandHandler]=\"!!hierarchyParentField() && isFirstVisibleColumn(column.field)\"\n [footerTemplate]=\"footerCell\"\n (sortToggle)=\"handleColumnSort(column.field)\"\n ></axp-widget-column-renderer>\n }\n }\n }\n @if (hasPrimaryRowAction()) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"primaryRowAction().length * 70 + 'px'\"\n [items]=\"primaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-command-column>\n }\n @if (hasSecondaryRowAction()) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"secondaryRowAction()\"\n (onItemClick)=\"handleRowClick($event)\"\n ></ax-dropdown-command-column>\n }\n</ax-data-table>\n", styles: ["axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table{height:100%}axp-report-table-view ax-data-table .ax-data-table-wrapper:has(tfoot) table tbody tr.empty-row{height:100%!important}\n"] }]
2192
2282
  }], propDecorators: { grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
2193
2283
 
2194
2284
  //#region ----- Imports -----
@@ -2263,4 +2353,4 @@ function stripIconStylePrefix(icon) {
2263
2353
  //#endregion
2264
2354
 
2265
2355
  export { AXPReportViewerViewModel as A, reportLayoutTitleKey as a, reportLayoutGlyph as b, AXPReportTableViewComponent as c, AXPReportChartViewComponent as d, AXPReportPdfViewComponent as e, isDistinctLayoutTitle as i, reportLayoutPageIcon as r };
2266
- //# sourceMappingURL=acorex-platform-module-report-management-client-report-layout-switcher.util-C3OVIaEz.mjs.map
2356
+ //# sourceMappingURL=acorex-platform-module-report-management-client-report-layout-switcher.util-BWa8bBRu.mjs.map