@acorex/platform 20.0.11 → 20.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/common/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { InjectionToken, OnChanges, ElementRef, Renderer2, SimpleChanges, EventE
3
3
  import { AXStyleColorType, AXDataSourceOperator, AXDataSourceFilterOption } from '@acorex/cdk/common';
4
4
  import * as i2 from '@acorex/components/popup';
5
5
  import { AXPopupSizeType, AXPopupService } from '@acorex/components/popup';
6
- import { AXPNavigateActionCommand, AXPExecuteCommand, AXPMetaData, AXPValueTransformerFunctions, AXPValidationRules, AXPPlatformScope, AXPPlatformScopeKey, AXPOptionsData, AXPWidgetTriggers, AXPAppStartUpService, AXPLogoConfig, AXPUserReference, AXPApplicationUserReference } from '@acorex/platform/core';
6
+ import { AXPNavigateActionCommand, AXPExecuteCommand, AXPMetaData, AXPValueTransformerFunctions, AXPValidationRules, AXPPlatformScope, AXPPlatformScopeKey, AXPOptionsData, AXPWidgetTriggers, AXPAppStartUpService, AXPLogoConfig, AXPUserReference, AXPApplicationUserReference, AXPExportOptions, AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviderContext } from '@acorex/platform/core';
7
7
  import { AXPWidgetTypesMap, AXPWidgetNode, AXPMetaDataDefinition } from '@acorex/platform/layout/builder';
8
8
  import * as i5 from '@angular/router';
9
9
  import { Route, Routes } from '@angular/router';
@@ -1282,6 +1282,7 @@ declare abstract class AXPLockService {
1282
1282
  static ɵprov: i0.ɵɵInjectableDeclaration<AXPLockService>;
1283
1283
  }
1284
1284
 
1285
+ type AXPReportLayoutType = 'table' | 'chart' | 'cards' | 'custom';
1285
1286
  interface AXPReportCategory {
1286
1287
  id: string;
1287
1288
  title: string;
@@ -1296,6 +1297,10 @@ interface AXPReportDefinition {
1296
1297
  description?: string;
1297
1298
  categoryIds: string[];
1298
1299
  parameterGroups: AXPReportParameterGroup[];
1300
+ permissions?: string[];
1301
+ export?: AXPExportOptions;
1302
+ layout: AXPReportLayout;
1303
+ dataSource: AXPReportDataSource;
1299
1304
  }
1300
1305
  interface AXPReportParameterGroup {
1301
1306
  name: string;
@@ -1309,6 +1314,136 @@ interface AXPReportParameter {
1309
1314
  description?: string;
1310
1315
  widget: AXPWidgetNode;
1311
1316
  }
1317
+ type AXPReportDataSource = AXPQueryDataSource | AXPCommandDataSource | AXPCustomDataSource;
1318
+ /**
1319
+ * Query Data Source - Used for executing predefined queries (AXPQuery)
1320
+ */
1321
+ interface AXPQueryDataSource {
1322
+ type: 'query';
1323
+ name: string;
1324
+ description?: string;
1325
+ inputs?: AXPReportParameterBinding[];
1326
+ sortFields?: AXPQuerySort[];
1327
+ pagination?: boolean;
1328
+ }
1329
+ /**
1330
+ * Command Data Source - Used for running complex or logic-heavy reports via AXPCommand
1331
+ */
1332
+ interface AXPCommandDataSource {
1333
+ type: 'command';
1334
+ name: string;
1335
+ description?: string;
1336
+ inputs?: AXPReportParameterBinding[];
1337
+ }
1338
+ /**
1339
+ * Custom Data Source - Used for fetching data from custom providers like REST APIs or external services
1340
+ */
1341
+ interface AXPCustomDataSource {
1342
+ type: 'custom';
1343
+ provider: string;
1344
+ description?: string;
1345
+ inputs?: AXPReportParameterBinding[];
1346
+ options?: {
1347
+ [key: string]: any;
1348
+ };
1349
+ }
1350
+ /**
1351
+ * Parameter Binding - Maps report-level parameters to actual query/command input structure
1352
+ */
1353
+ interface AXPReportParameterBinding {
1354
+ parameterKey: string;
1355
+ bindTo: string;
1356
+ }
1357
+ type AXPReportLayout = AXPTableLayout | AXPChartLayout | AXPCardsLayout | AXPCustomLayout;
1358
+ /**
1359
+ * Table Layout - Displays data in tabular format
1360
+ */
1361
+ interface AXPTableLayout {
1362
+ type: 'table';
1363
+ columns: AXPReportColumn[];
1364
+ options?: AXPTableOptions;
1365
+ groupBy?: string[];
1366
+ summary?: AXPReportSummaryOptions[];
1367
+ conditionalFormatting?: AXPConditionalFormatRule[];
1368
+ header?: AXPReportHeaderFooter;
1369
+ footer?: AXPReportHeaderFooter;
1370
+ }
1371
+ interface AXPTableOptions {
1372
+ pagination?: boolean;
1373
+ stickyHeader?: boolean;
1374
+ stripedRows?: boolean;
1375
+ sorting?: AXPQuerySort[];
1376
+ }
1377
+ /**
1378
+ * Chart Layout - Displays data in various chart formats
1379
+ */
1380
+ interface AXPChartLayout {
1381
+ type: 'chart';
1382
+ options: AXPReportChartOptions;
1383
+ header?: AXPReportHeaderFooter;
1384
+ footer?: AXPReportHeaderFooter;
1385
+ }
1386
+ interface AXPReportChartOptions {
1387
+ chartType: 'bar' | 'line' | 'pie' | 'doughnut' | 'area';
1388
+ xField: string;
1389
+ yField: string | string[];
1390
+ groupBy?: string;
1391
+ }
1392
+ /**
1393
+ * Cards Layout - Displays data in card format
1394
+ */
1395
+ interface AXPCardsLayout {
1396
+ type: 'cards';
1397
+ options: AXPCardsOptions;
1398
+ header?: AXPReportHeaderFooter;
1399
+ footer?: AXPReportHeaderFooter;
1400
+ }
1401
+ interface AXPCardsOptions {
1402
+ cardFields: string[];
1403
+ layoutMode?: 'grid' | 'list';
1404
+ }
1405
+ /**
1406
+ * Custom Layout - For custom report layouts
1407
+ */
1408
+ interface AXPCustomLayout {
1409
+ type: 'custom';
1410
+ options: AXPOptionsData;
1411
+ header?: AXPReportHeaderFooter;
1412
+ footer?: AXPReportHeaderFooter;
1413
+ }
1414
+ interface AXPReportColumn {
1415
+ field: string;
1416
+ title?: string;
1417
+ visible?: boolean;
1418
+ width?: number;
1419
+ align?: 'left' | 'center' | 'right';
1420
+ widget?: {
1421
+ type: string;
1422
+ options?: AXPOptionsData;
1423
+ };
1424
+ }
1425
+ interface AXPReportSummaryOptions {
1426
+ field: string;
1427
+ operation: 'sum' | 'avg' | 'count' | 'min' | 'max';
1428
+ displayIn: 'groupFooter' | 'reportFooter';
1429
+ }
1430
+ interface AXPConditionalFormatRule {
1431
+ field: string;
1432
+ condition: '>' | '<' | '=' | '!=' | 'contains';
1433
+ value: any;
1434
+ style: {
1435
+ color?: string;
1436
+ backgroundColor?: string;
1437
+ fontWeight?: 'normal' | 'bold';
1438
+ };
1439
+ }
1440
+ interface AXPReportHeaderFooter {
1441
+ title?: string;
1442
+ logoUrl?: string;
1443
+ showDate?: boolean;
1444
+ showParameters?: boolean;
1445
+ customHtml?: string;
1446
+ }
1312
1447
 
1313
1448
  type AXPReportDefinitionProviderToken = AXPReportDefinitionProvider | Promise<AXPReportDefinitionProvider>;
1314
1449
  declare const AXP_REPORT_DEFINITION_PROVIDER: InjectionToken<AXPReportDefinitionProviderToken[]>;
@@ -1382,6 +1517,45 @@ declare class AXPReportDefinitionService {
1382
1517
  static ɵprov: i0.ɵɵInjectableDeclaration<AXPReportDefinitionService>;
1383
1518
  }
1384
1519
 
1520
+ interface AXPGlobalVariableDefinition {
1521
+ name: string;
1522
+ execute: () => Promise<any> | any;
1523
+ }
1524
+
1525
+ type AXPGlobalVariableDefinitionProviderToken = AXPGlobalVariableDefinitionProvider | Promise<AXPGlobalVariableDefinitionProvider>;
1526
+ declare const AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER: InjectionToken<AXPGlobalVariableDefinitionProviderToken[]>;
1527
+ interface AXPGlobalVariableDefinitionProvider<T = any> {
1528
+ name: string;
1529
+ title: string;
1530
+ description?: string;
1531
+ icon?: string;
1532
+ order?: number;
1533
+ execute(): Promise<T> | T;
1534
+ }
1535
+
1536
+ declare class AXPGlobalVariableDefinitionService {
1537
+ private readonly definitionProviders;
1538
+ /** Cache for definitions by name. */
1539
+ private definitionsByName;
1540
+ /**
1541
+ * Returns a report definition by its id.
1542
+ * First checks the cache, then queries all providers if not found.
1543
+ * @param name The global variable name.
1544
+ * @returns The global variable definition if found, undefined otherwise.
1545
+ */
1546
+ getByName(name: string): Promise<AXPGlobalVariableDefinition | undefined>;
1547
+ execute(name: string): Promise<any>;
1548
+ /** Clears the definitions by name cache. */
1549
+ clearDefinitionsCache(): void;
1550
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXPGlobalVariableDefinitionService, never>;
1551
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXPGlobalVariableDefinitionService>;
1552
+ }
1553
+
1554
+ declare class AXPGlobalVariableEvaluatorScopeProvider implements AXPExpressionEvaluatorScopeProvider {
1555
+ protected globalVariableService: AXPGlobalVariableDefinitionService;
1556
+ provide(context: AXPExpressionEvaluatorScopeProviderContext): Promise<void>;
1557
+ }
1558
+
1385
1559
  declare class AXPClipBoardService {
1386
1560
  private toast;
1387
1561
  copy(title: string, value: string): void;
@@ -1544,5 +1718,5 @@ declare class AXMWorkflowErrorHandler implements AXPErrorHandler {
1544
1718
  static ɵprov: i0.ɵɵInjectableDeclaration<AXMWorkflowErrorHandler>;
1545
1719
  }
1546
1720
 
1547
- export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPLogoComponent, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalService, AXPRelationshipCardinality, AXPRelationshipKind, AXPReportDefinitionService, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingService, AXPStickyDirective, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_REPORT_CATEGORY_PROVIDER, AXP_REPORT_DEFINITION_PROVIDER, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createQueryView, getEntityInfo, provideDynamicHomePage, resolveActionLook };
1548
- export type { AXEntityPropertyWidget, AXPAggregate, AXPAppVersion, AXPAppVersionProvider, AXPApplication, AXPCategoryEntity, AXPCity, AXPCommandActionCallback, AXPCommandActionDisplay, AXPCommandActionLook, AXPCommandActionPriority, AXPCommandActionType, AXPCommonModuleConfigs, AXPCountry, AXPCurrency, AXPDomToImageOptions, AXPEntity, AXPEntityAction, AXPEntityCommand, AXPEntityDetailListView, AXPEntityMasterCreateLayoutView, AXPEntityMasterLayoutView, AXPEntityMasterListView, AXPEntityMasterSingleLayoutView, AXPEntityMasterUpdateLayoutView, AXPEntityProperty, AXPEntityPropertyCreateView, AXPEntityPropertyGroup, AXPEntityPropertyLayoutConfig, AXPEntityPropertyUpdateView, AXPEntityPropertyView, AXPEntityQuery, AXPEntitySectionView, AXPEntityTableColumn, AXPEntityVersionHistory, AXPErrorHandler, AXPFileExtension, AXPFileStorageCreateRequest, AXPFileStorageFindRequest, AXPFileStorageInfo, AXPFileStorageUpdateRequest, AXPFileType, AXPFileTypeInfoProvider, AXPFilterOperator, AXPGeoLocation, AXPGridLayoutOptions, AXPGridLayoutPositions, AXPGroupSearchResult, AXPHomePageDefinition, AXPLanguage, AXPLocaleProfile, AXPLockGetInfoRequest, AXPLockInfo, AXPLockRequest, AXPLockType, AXPMenuFinderResult, AXPMenuInsertion, AXPMenuItem, AXPMenuItemCommand, AXPMenuItemWithParent, AXPMenuProvider, AXPMenuProviderContext, AXPMenuType, AXPModule, AXPPlatformConfigs, AXPProvince, AXPQueryFilter, AXPQuerySort, AXPQueryView, AXPRelatedEntity, AXPRelationship, AXPReportCategory, AXPReportCategoryProvider, AXPReportCategoryProviderToken, AXPReportDefinition, AXPReportDefinitionProvider, AXPReportDefinitionProviderToken, AXPReportParameter, AXPReportParameterGroup, AXPRootConfigs, AXPSearchAction, AXPSearchDefinition, AXPSearchDefinitionDisplayFormat, AXPSearchDefinitionProvider, AXPSearchDisplayGroupResult, AXPSearchDisplayResult, AXPSearchDisplayResultForSave, AXPSearchParentResult, AXPSearchProvider, AXPSearchResult, AXPSettingChangedEvent, AXPSettingDefinition, AXPSettingDefinitionGroup, AXPSettingDefinitionProvider, AXPSettingDefinitionSection, AXPSettingServiceInterface, AXPSettingValue, AXPSettingValueProvider, AXPTimeZone, AXPUnLockRequest };
1721
+ export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGlobalVariableDefinitionService, AXPGlobalVariableEvaluatorScopeProvider, AXPGridLayoutDirective, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPLogoComponent, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalService, AXPRelationshipCardinality, AXPRelationshipKind, AXPReportDefinitionService, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingService, AXPStickyDirective, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_REPORT_CATEGORY_PROVIDER, AXP_REPORT_DEFINITION_PROVIDER, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createQueryView, getEntityInfo, provideDynamicHomePage, resolveActionLook };
1722
+ export type { AXEntityPropertyWidget, AXPAggregate, AXPAppVersion, AXPAppVersionProvider, AXPApplication, AXPCardsLayout, AXPCardsOptions, AXPCategoryEntity, AXPChartLayout, AXPCity, AXPCommandActionCallback, AXPCommandActionDisplay, AXPCommandActionLook, AXPCommandActionPriority, AXPCommandActionType, AXPCommandDataSource, AXPCommonModuleConfigs, AXPConditionalFormatRule, AXPCountry, AXPCurrency, AXPCustomDataSource, AXPCustomLayout, AXPDomToImageOptions, AXPEntity, AXPEntityAction, AXPEntityCommand, AXPEntityDetailListView, AXPEntityMasterCreateLayoutView, AXPEntityMasterLayoutView, AXPEntityMasterListView, AXPEntityMasterSingleLayoutView, AXPEntityMasterUpdateLayoutView, AXPEntityProperty, AXPEntityPropertyCreateView, AXPEntityPropertyGroup, AXPEntityPropertyLayoutConfig, AXPEntityPropertyUpdateView, AXPEntityPropertyView, AXPEntityQuery, AXPEntitySectionView, AXPEntityTableColumn, AXPEntityVersionHistory, AXPErrorHandler, AXPFileExtension, AXPFileStorageCreateRequest, AXPFileStorageFindRequest, AXPFileStorageInfo, AXPFileStorageUpdateRequest, AXPFileType, AXPFileTypeInfoProvider, AXPFilterOperator, AXPGeoLocation, AXPGlobalVariableDefinition, AXPGlobalVariableDefinitionProvider, AXPGlobalVariableDefinitionProviderToken, AXPGridLayoutOptions, AXPGridLayoutPositions, AXPGroupSearchResult, AXPHomePageDefinition, AXPLanguage, AXPLocaleProfile, AXPLockGetInfoRequest, AXPLockInfo, AXPLockRequest, AXPLockType, AXPMenuFinderResult, AXPMenuInsertion, AXPMenuItem, AXPMenuItemCommand, AXPMenuItemWithParent, AXPMenuProvider, AXPMenuProviderContext, AXPMenuType, AXPModule, AXPPlatformConfigs, AXPProvince, AXPQueryDataSource, AXPQueryFilter, AXPQuerySort, AXPQueryView, AXPRelatedEntity, AXPRelationship, AXPReportCategory, AXPReportCategoryProvider, AXPReportCategoryProviderToken, AXPReportChartOptions, AXPReportColumn, AXPReportDataSource, AXPReportDefinition, AXPReportDefinitionProvider, AXPReportDefinitionProviderToken, AXPReportHeaderFooter, AXPReportLayout, AXPReportLayoutType, AXPReportParameter, AXPReportParameterBinding, AXPReportParameterGroup, AXPReportSummaryOptions, AXPRootConfigs, AXPSearchAction, AXPSearchDefinition, AXPSearchDefinitionDisplayFormat, AXPSearchDefinitionProvider, AXPSearchDisplayGroupResult, AXPSearchDisplayResult, AXPSearchDisplayResultForSave, AXPSearchParentResult, AXPSearchProvider, AXPSearchResult, AXPSettingChangedEvent, AXPSettingDefinition, AXPSettingDefinitionGroup, AXPSettingDefinitionProvider, AXPSettingDefinitionSection, AXPSettingServiceInterface, AXPSettingValue, AXPSettingValueProvider, AXPTableLayout, AXPTableOptions, AXPTimeZone, AXPUnLockRequest };
package/core/index.d.ts CHANGED
@@ -106,7 +106,8 @@ declare enum AXPSystemActionType {
106
106
  Copy = "copy",
107
107
  Move = "move",
108
108
  Rename = "rename",
109
- Restore = "restore"
109
+ Restore = "restore",
110
+ Manage = "manage"
110
111
  }
111
112
  interface AXPSystemAction {
112
113
  key: string;
@@ -1043,6 +1044,70 @@ interface AXPViewFieldDefinition {
1043
1044
  widget?: string;
1044
1045
  }
1045
1046
 
1047
+ interface AXPExportOptions {
1048
+ fileNameTemplate?: string;
1049
+ pdf?: AXPExportPdfOptions;
1050
+ excel?: AXPExportExcelOptions;
1051
+ csv?: AXPExportCsvOptions;
1052
+ print?: AXPExportPrintOptions;
1053
+ }
1054
+ interface AXPExportPdfOptions {
1055
+ enabled: boolean;
1056
+ pageSize?: 'A4' | 'A3' | 'Letter' | 'Legal';
1057
+ orientation?: 'portrait' | 'landscape';
1058
+ margin?: number | {
1059
+ top: number;
1060
+ bottom: number;
1061
+ left: number;
1062
+ right: number;
1063
+ };
1064
+ font?: string;
1065
+ fontSize?: number;
1066
+ headerEnabled?: boolean;
1067
+ footerEnabled?: boolean;
1068
+ showPageNumbers?: boolean;
1069
+ watermarkText?: string;
1070
+ watermarkOpacity?: number;
1071
+ compression?: boolean;
1072
+ embedImages?: boolean;
1073
+ }
1074
+ interface AXPExportExcelOptions {
1075
+ enabled: boolean;
1076
+ sheetName?: string;
1077
+ includeFilters?: boolean;
1078
+ freezeHeader?: boolean;
1079
+ autoFitColumns?: boolean;
1080
+ style?: {
1081
+ headerColor?: string;
1082
+ font?: string;
1083
+ fontSize?: number;
1084
+ numberFormat?: 'auto' | 'currency' | 'percent' | 'decimal';
1085
+ };
1086
+ summaryRowEnabled?: boolean;
1087
+ exportHiddenColumns?: boolean;
1088
+ }
1089
+ interface AXPExportCsvOptions {
1090
+ enabled: boolean;
1091
+ delimiter?: ',' | ';' | '\t';
1092
+ includeHeaders?: boolean;
1093
+ quoteValues?: boolean;
1094
+ encoding?: 'utf-8' | 'utf-16' | 'iso-8859-1';
1095
+ }
1096
+ interface AXPExportPrintOptions {
1097
+ enabled: boolean;
1098
+ includeHeader?: boolean;
1099
+ includeFooter?: boolean;
1100
+ showPageBreaks?: boolean;
1101
+ customCssUrl?: string;
1102
+ }
1103
+ declare enum AXPExportTemplateToken {
1104
+ Date = "{date}",
1105
+ Time = "{time}",
1106
+ User = "{user}",
1107
+ ReportTitle = "{title}",
1108
+ UUID = "{uuid}"
1109
+ }
1110
+
1046
1111
  interface AXPDataSourceDefinition<T = any> {
1047
1112
  name: string;
1048
1113
  title: string;
@@ -1331,5 +1396,5 @@ declare class AXPActivityLogService {
1331
1396
  static ɵprov: i0.ɵɵInjectableDeclaration<AXPActivityLogService>;
1332
1397
  }
1333
1398
 
1334
- export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPElementDataDirective, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPGridLayoutDirective, AXPImageUrlLogoConfig, AXPPlatformScope, AXPSystemActionType, AXPSystemActions, AXP_ACTIVITY_LOG_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, applyFilterArray, applyPagination, applyQueryArray, applySortArray, cleanDeep, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, getNestedKeys, getSmart, getSystemActions, objectKeyValueTransforms, resolvePlatformScopeKey, resolvePlatformScopeName, setSmart };
1335
- export type { AXPActionMenuItem, AXPActivityLog, AXPActivityLogChange, AXPApplicationUserReference, AXPBackButton, AXPBreadcrumbItem, AXPContent, AXPContentDirection, AXPContentType, AXPContextData, AXPContextState, AXPDataSource, AXPDataSourceDefinition, AXPDataSourceDefinitionProvider, AXPDataType, AXPEntityReference, AXPEqualValidationRule, AXPExecuteCommand, AXPExecuteCommandResult, AXPExpression, AXPExpressionEvaluatorScope, AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviders, AXPFileListItem, AXPFileSource, AXPFileStatus, AXPFilterDefinition, AXPFilterLogic, AXPFilterOperation, AXPFilterQuery, AXPFlowDirection, AXPGridLayoutOptions, AXPGridPlacement, AXPLayoutFlexStyles, AXPLogoConfig, AXPMaxLengthValidationRule, AXPMetaData, AXPMinLengthValidationRule, AXPNavigateActionCommand, AXPNavigateActionOptions, AXPOptionsData, AXPPagedListResult, AXPPartialNested, AXPPlatformScopeKey, AXPQueryFetchResult, AXPQueryRequest, AXPReqexValidationRule, AXPRequiredValidationRule, AXPStartUpTask, AXPStringValidationRules, AXPSystemAction, AXPUserReference, AXPValidationRule, AXPValidationRules, AXPValueTransformerFunction, AXPValueTransformerFunctions, AXPValueUnit, AXPValueUnits, AXPViewBlockDefinition, AXPViewDefinition, AXPViewFieldDefinition, AXPWidgetTrigger, AXPWidgetTriggers };
1399
+ export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPGridLayoutDirective, AXPImageUrlLogoConfig, AXPPlatformScope, AXPSystemActionType, AXPSystemActions, AXP_ACTIVITY_LOG_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, applyFilterArray, applyPagination, applyQueryArray, applySortArray, cleanDeep, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, getNestedKeys, getSmart, getSystemActions, objectKeyValueTransforms, resolvePlatformScopeKey, resolvePlatformScopeName, setSmart };
1400
+ export type { AXPActionMenuItem, AXPActivityLog, AXPActivityLogChange, AXPApplicationUserReference, AXPBackButton, AXPBreadcrumbItem, AXPContent, AXPContentDirection, AXPContentType, AXPContextData, AXPContextState, AXPDataSource, AXPDataSourceDefinition, AXPDataSourceDefinitionProvider, AXPDataType, AXPEntityReference, AXPEqualValidationRule, AXPExecuteCommand, AXPExecuteCommandResult, AXPExportCsvOptions, AXPExportExcelOptions, AXPExportOptions, AXPExportPdfOptions, AXPExportPrintOptions, AXPExpression, AXPExpressionEvaluatorScope, AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviders, AXPFileListItem, AXPFileSource, AXPFileStatus, AXPFilterDefinition, AXPFilterLogic, AXPFilterOperation, AXPFilterQuery, AXPFlowDirection, AXPGridLayoutOptions, AXPGridPlacement, AXPLayoutFlexStyles, AXPLogoConfig, AXPMaxLengthValidationRule, AXPMetaData, AXPMinLengthValidationRule, AXPNavigateActionCommand, AXPNavigateActionOptions, AXPOptionsData, AXPPagedListResult, AXPPartialNested, AXPPlatformScopeKey, AXPQueryFetchResult, AXPQueryRequest, AXPReqexValidationRule, AXPRequiredValidationRule, AXPStartUpTask, AXPStringValidationRules, AXPSystemAction, AXPUserReference, AXPValidationRule, AXPValidationRules, AXPValueTransformerFunction, AXPValueTransformerFunctions, AXPValueUnit, AXPValueUnits, AXPViewBlockDefinition, AXPViewDefinition, AXPViewFieldDefinition, AXPWidgetTrigger, AXPWidgetTriggers };
@@ -5,7 +5,7 @@ import { Router, ROUTES, RouterModule } from '@angular/router';
5
5
  import { AXPSessionService, AXPSessionStatus } from '@acorex/platform/auth';
6
6
  import { Subject, distinctUntilChanged, merge as merge$1 } from 'rxjs';
7
7
  import * as i1$1 from '@acorex/platform/core';
8
- import { AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPComponentLogoConfig, AXPImageUrlLogoConfig, AXPAppStartUpProvider } from '@acorex/platform/core';
8
+ import { AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPComponentLogoConfig, AXPImageUrlLogoConfig, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from '@acorex/platform/core';
9
9
  import { AXTranslationService } from '@acorex/core/translation';
10
10
  import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
11
11
  import { AXPopupModule, AXPopupService } from '@acorex/components/popup';
@@ -2020,6 +2020,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
2020
2020
  type: Injectable
2021
2021
  }] });
2022
2022
 
2023
+ const AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER = new InjectionToken('AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER', {
2024
+ factory: () => [],
2025
+ });
2026
+
2027
+ //#region ---- Imports ----
2028
+ //#endregion
2029
+ class AXPGlobalVariableDefinitionService {
2030
+ constructor() {
2031
+ //#region ---- Providers & Caches ----
2032
+ this.definitionProviders = inject(AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER, { optional: true }) || [];
2033
+ /** Cache for definitions by name. */
2034
+ this.definitionsByName = new Map();
2035
+ }
2036
+ //#endregion
2037
+ //#region ---- Public API ----
2038
+ /**
2039
+ * Returns a report definition by its id.
2040
+ * First checks the cache, then queries all providers if not found.
2041
+ * @param name The global variable name.
2042
+ * @returns The global variable definition if found, undefined otherwise.
2043
+ */
2044
+ async getByName(name) {
2045
+ // Check cache first
2046
+ if (this.definitionsByName.has(name)) {
2047
+ return this.definitionsByName.get(name);
2048
+ }
2049
+ // Not in cache, query providers (each provider is itself a global variable definition)
2050
+ const resolvedProviders = await Promise.all(this.definitionProviders);
2051
+ const match = resolvedProviders.find(def => def?.name === name);
2052
+ if (match) {
2053
+ this.definitionsByName.set(name, match);
2054
+ return match;
2055
+ }
2056
+ return undefined;
2057
+ }
2058
+ async execute(name) {
2059
+ const definition = await this.getByName(name);
2060
+ if (definition) {
2061
+ return await definition.execute();
2062
+ }
2063
+ return undefined;
2064
+ }
2065
+ //#endregion
2066
+ //#region ---- Cache Management ----
2067
+ /** Clears the definitions by name cache. */
2068
+ clearDefinitionsCache() {
2069
+ this.definitionsByName.clear();
2070
+ }
2071
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPGlobalVariableDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2072
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPGlobalVariableDefinitionService, providedIn: 'root' }); }
2073
+ }
2074
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPGlobalVariableDefinitionService, decorators: [{
2075
+ type: Injectable,
2076
+ args: [{
2077
+ providedIn: 'root',
2078
+ }]
2079
+ }] });
2080
+
2081
+ class AXPGlobalVariableEvaluatorScopeProvider {
2082
+ constructor() {
2083
+ this.globalVariableService = inject(AXPGlobalVariableDefinitionService);
2084
+ }
2085
+ async provide(context) {
2086
+ context.addScope('variables', {
2087
+ execute: async (name) => {
2088
+ return await this.globalVariableService.execute(name);
2089
+ }
2090
+ });
2091
+ }
2092
+ }
2093
+
2023
2094
  class AXPCommonModule {
2024
2095
  static forRoot(configs) {
2025
2096
  return {
@@ -2097,6 +2168,11 @@ class AXPCommonModule {
2097
2168
  useClass: AXPMenuSearchDefinitionProvider,
2098
2169
  multi: true,
2099
2170
  },
2171
+ {
2172
+ provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
2173
+ useClass: AXPGlobalVariableEvaluatorScopeProvider,
2174
+ multi: true,
2175
+ },
2100
2176
  ], imports: [AXPWorkflowModule.forChild({
2101
2177
  actions: {
2102
2178
  'navigate-router': AXPWorkflowRouterNavigateAction,
@@ -2154,6 +2230,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
2154
2230
  useClass: AXPMenuSearchDefinitionProvider,
2155
2231
  multi: true,
2156
2232
  },
2233
+ {
2234
+ provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
2235
+ useClass: AXPGlobalVariableEvaluatorScopeProvider,
2236
+ multi: true,
2237
+ },
2157
2238
  ],
2158
2239
  }]
2159
2240
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -2231,6 +2312,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
2231
2312
  type: Injectable
2232
2313
  }] });
2233
2314
 
2315
+ //#region ---- Imports ----
2316
+ //#endregion
2317
+
2234
2318
  const AXP_REPORT_DEFINITION_PROVIDER = new InjectionToken('AXP_REPORT_DEFINITION_PROVIDER', {
2235
2319
  factory: () => [],
2236
2320
  });
@@ -2750,5 +2834,5 @@ class AXPRegionalService {
2750
2834
  * Generated bundle index. Do not edit.
2751
2835
  */
2752
2836
 
2753
- export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPLogoComponent, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalService, AXPRelationshipCardinality, AXPRelationshipKind, AXPReportDefinitionService, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingService, AXPStickyDirective, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_REPORT_CATEGORY_PROVIDER, AXP_REPORT_DEFINITION_PROVIDER, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createQueryView, getEntityInfo, provideDynamicHomePage, resolveActionLook };
2837
+ export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGlobalVariableDefinitionService, AXPGlobalVariableEvaluatorScopeProvider, AXPGridLayoutDirective, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPLogoComponent, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalService, AXPRelationshipCardinality, AXPRelationshipKind, AXPReportDefinitionService, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingService, AXPStickyDirective, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_REPORT_CATEGORY_PROVIDER, AXP_REPORT_DEFINITION_PROVIDER, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createQueryView, getEntityInfo, provideDynamicHomePage, resolveActionLook };
2754
2838
  //# sourceMappingURL=acorex-platform-common.mjs.map