@acorex/platform 0.0.0-ACOREX

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 (116) hide show
  1. package/README.md +7 -0
  2. package/auth/README.md +3 -0
  3. package/common/README.md +3 -0
  4. package/core/README.md +4 -0
  5. package/fesm2022/acorex-platform-auth.mjs +1362 -0
  6. package/fesm2022/acorex-platform-auth.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs +127 -0
  8. package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-common.mjs +4601 -0
  10. package/fesm2022/acorex-platform-common.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-core.mjs +4374 -0
  12. package/fesm2022/acorex-platform-core.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-domain.mjs +3234 -0
  14. package/fesm2022/acorex-platform-domain.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-layout-builder.mjs +2847 -0
  16. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
  18. package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-layout-components.mjs +8583 -0
  20. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-layout-designer.mjs +2474 -0
  22. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-layout-entity.mjs +19150 -0
  24. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-layout-views.mjs +1468 -0
  26. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-layout-widget-core.mjs +2950 -0
  28. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs +72 -0
  30. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs +158 -0
  32. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs +29 -0
  34. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs +172 -0
  36. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs +111 -0
  38. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs +274 -0
  40. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +1 -0
  41. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs +64 -0
  42. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs +34 -0
  44. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
  45. package/fesm2022/acorex-platform-layout-widgets.mjs +29791 -0
  46. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -0
  47. package/fesm2022/acorex-platform-native.mjs +155 -0
  48. package/fesm2022/acorex-platform-native.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-runtime-catalog-command-definition.mjs +20 -0
  50. package/fesm2022/acorex-platform-runtime-catalog-command-definition.mjs.map +1 -0
  51. package/fesm2022/acorex-platform-runtime-catalog-query-definition.mjs +20 -0
  52. package/fesm2022/acorex-platform-runtime-catalog-query-definition.mjs.map +1 -0
  53. package/fesm2022/acorex-platform-runtime.mjs +899 -0
  54. package/fesm2022/acorex-platform-runtime.mjs.map +1 -0
  55. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs +160 -0
  56. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +1 -0
  57. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs +120 -0
  58. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs +237 -0
  60. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs.map +1 -0
  61. package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs +31 -0
  62. package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
  63. package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs +25 -0
  64. package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
  65. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
  66. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
  67. package/fesm2022/acorex-platform-themes-default.mjs +2589 -0
  68. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -0
  69. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs +55 -0
  70. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
  71. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs +57 -0
  72. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
  73. package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs +168 -0
  74. package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -0
  75. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs +65 -0
  76. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +1 -0
  77. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs +64 -0
  78. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +1 -0
  79. package/fesm2022/acorex-platform-themes-shared.mjs +2125 -0
  80. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -0
  81. package/fesm2022/acorex-platform-workflow.mjs +2501 -0
  82. package/fesm2022/acorex-platform-workflow.mjs.map +1 -0
  83. package/fesm2022/acorex-platform.mjs +6 -0
  84. package/fesm2022/acorex-platform.mjs.map +1 -0
  85. package/layout/builder/README.md +1578 -0
  86. package/layout/components/README.md +3 -0
  87. package/layout/designer/README.md +4 -0
  88. package/layout/entity/README.md +4 -0
  89. package/layout/views/README.md +3 -0
  90. package/layout/widget-core/README.md +4 -0
  91. package/layout/widgets/README.md +3 -0
  92. package/native/README.md +4 -0
  93. package/package.json +103 -0
  94. package/runtime/README.md +3 -0
  95. package/themes/default/README.md +3 -0
  96. package/themes/shared/README.md +3 -0
  97. package/types/acorex-platform-auth.d.ts +680 -0
  98. package/types/acorex-platform-common.d.ts +2926 -0
  99. package/types/acorex-platform-core.d.ts +2896 -0
  100. package/types/acorex-platform-domain.d.ts +2353 -0
  101. package/types/acorex-platform-layout-builder.d.ts +926 -0
  102. package/types/acorex-platform-layout-components.d.ts +2903 -0
  103. package/types/acorex-platform-layout-designer.d.ts +422 -0
  104. package/types/acorex-platform-layout-entity.d.ts +3189 -0
  105. package/types/acorex-platform-layout-views.d.ts +667 -0
  106. package/types/acorex-platform-layout-widget-core.d.ts +1086 -0
  107. package/types/acorex-platform-layout-widgets.d.ts +5478 -0
  108. package/types/acorex-platform-native.d.ts +28 -0
  109. package/types/acorex-platform-runtime-catalog-command-definition.d.ts +137 -0
  110. package/types/acorex-platform-runtime-catalog-query-definition.d.ts +125 -0
  111. package/types/acorex-platform-runtime.d.ts +470 -0
  112. package/types/acorex-platform-themes-default.d.ts +573 -0
  113. package/types/acorex-platform-themes-shared.d.ts +170 -0
  114. package/types/acorex-platform-workflow.d.ts +1806 -0
  115. package/types/acorex-platform.d.ts +2 -0
  116. package/workflow/README.md +4 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-auth.mjs","sources":["../../../../libs/platform/auth/src/lib/application/application.loader.ts","../../../../libs/platform/auth/src/lib/tenant/tenant.loader.ts","../../../../libs/platform/auth/src/lib/auth-registry.service.ts","../../../../libs/platform/auth/src/lib/feature/feature.loader.ts","../../../../libs/platform/auth/src/lib/feature/feature.directive.ts","../../../../libs/platform/auth/src/lib/errors.types.ts","../../../../libs/platform/auth/src/lib/feature/feature.guard.ts","../../../../libs/platform/auth/src/lib/feature/feature-checker.token.ts","../../../../libs/platform/auth/src/lib/permission/permission.loader.ts","../../../../libs/platform/auth/src/lib/permission/permission-checker.token.ts","../../../../libs/platform/auth/src/lib/session.types.ts","../../../../libs/platform/auth/src/lib/session.service.ts","../../../../libs/platform/auth/src/lib/permission/permission.directive.ts","../../../../libs/platform/auth/src/lib/permission/permission.guard.ts","../../../../libs/platform/auth/src/lib/permission/permission-definition.builder.ts","../../../../libs/platform/auth/src/lib/permission/permission-definition.service.ts","../../../../libs/platform/auth/src/lib/permission/permission-definitions.datasource.ts","../../../../libs/platform/auth/src/lib/permission/permission-evaluator-scope.provider.ts","../../../../libs/platform/auth/src/lib/auth.guard.ts","../../../../libs/platform/auth/src/lib/auth.module.ts","../../../../libs/platform/auth/src/lib/auth.strategy.ts","../../../../libs/platform/auth/src/lib/auth.utils.ts","../../../../libs/platform/auth/src/lib/challenge/challenge.types.ts","../../../../libs/platform/auth/src/lib/challenge/challenge.provider.ts","../../../../libs/platform/auth/src/lib/challenge/challenge.token.ts","../../../../libs/platform/auth/src/lib/challenge/challenge-component.base.ts","../../../../libs/platform/auth/src/acorex-platform-auth.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { AXPSessionContext } from '../session.types';\nimport { AXPApplication } from './application.types';\n\nexport interface AXPApplicationLoader {\n getList(context: AXPSessionContext): Promise<AXPApplication[]>;\n}\n\nexport const AXP_APPLICATION_LOADER = new InjectionToken<AXPApplicationLoader>('AXP_APPLICATION_LOADER', {\n providedIn: 'root',\n factory: () => {\n return new AXPApplicationDefaultLoader();\n },\n});\n\nclass AXPApplicationDefaultLoader implements AXPApplicationLoader {\n async getList(context: AXPSessionContext): Promise<AXPApplication[]> {\n return [\n {\n id: '1',\n name: 'default-app',\n title: 'Default Application',\n version: '1.0.0',\n edition: {\n id: 'default-edition-1',\n title: 'Standard',\n },\n },\n {\n id: '2',\n name: 'default-app',\n title: 'Default Application',\n version: '1.0.0',\n edition: {\n id: 'default-edition-2',\n title: 'Standard',\n },\n },\n ];\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { AXPTenant } from './tenant.types';\nimport { AXPSessionContext } from '../session.types';\n\nexport interface AXPTenantLoader {\n getList(context: AXPSessionContext): Promise<AXPTenant[]>;\n}\n\nexport const AXP_TENANT_LOADER = new InjectionToken<AXPTenantLoader>('AXP_TENANT_LOADER', {\n providedIn: 'root',\n factory: () => {\n return new AXPTenantDefaultLoader();\n },\n});\n\nclass AXPTenantDefaultLoader implements AXPTenantLoader {\n async getList(context: AXPSessionContext): Promise<AXPTenant[]> {\n return [\n {\n id: '1',\n name: 'default-tenant',\n title: 'Default Tenant',\n },\n ];\n }\n}\n","import { Injectable, Injector } from \"@angular/core\";\nimport { AXPAuthStrategy } from \"./auth.strategy\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AXPAuthStrategyRegistryService {\n private strategies = new Map<string, AXPAuthStrategy>();\n\n private injector: Injector;\n\n constructor(injector: Injector) {\n this.injector = injector;\n }\n\n register(...plugins: (new () => AXPAuthStrategy)[]) {\n plugins.forEach(t => {\n const childInjector = Injector.create({ providers: [{ provide: t, useClass: t, deps: [] }], parent: this.injector });\n const strategy = childInjector.get(t);\n if (strategy) {\n this.strategies.set(strategy.name, strategy);\n }\n })\n }\n\n get(strategyKey: string): AXPAuthStrategy | undefined {\n return this.strategies.get(strategyKey);\n }\n}","import { InjectionToken } from '@angular/core';\nimport { AXPFeature } from './feature.types';\nimport { AXPSessionContext } from '../session.types';\n\nexport interface AXPFeatureLoader {\n getList(context: AXPSessionContext): Promise<AXPFeature[]>;\n}\n\nexport const AXP_FEATURE_LOADER = new InjectionToken<AXPFeatureLoader>('AXP_FEATURE_LOADER', {\n providedIn: 'root',\n factory: () => {\n return new AXPFeatureDefaultLoader();\n },\n});\n\nclass AXPFeatureDefaultLoader implements AXPFeatureLoader {\n async getList(context: AXPSessionContext): Promise<AXPFeature[]> {\n return [];\n }\n}\n","import { Directive, Input, TemplateRef, ViewContainerRef, inject, signal } from '@angular/core';\nimport { Subscription, first } from 'rxjs';\nimport { AXPSessionService } from '../session.service';\n\n@Directive({\n selector: '[feature]',\n standalone: false\n})\nexport class AXPFeatureDirective {\n private hasView = signal(false);\n private subscription!: Subscription;\n private sessionService = inject(AXPSessionService);\n\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef\n ) { }\n\n @Input()\n public set feature(featureKeys: string | string[] | null) {\n const keys: string[] = !featureKeys ? [] : (Array.isArray(featureKeys) ? featureKeys : [featureKeys]);\n if (keys.length == 0) {\n // If featureKey is null or empty, decide the default behavior here\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView.set(true);\n return;\n }\n this.subscription = this.sessionService.features$\n //.pipe(first())\n .subscribe(() => {\n if (this.sessionService.isFeatureEnabled(...keys)) {\n if (!this.hasView()) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView.set(true);\n }\n } else {\n this.viewContainer.clear();\n this.hasView.set(false);\n }\n });\n }\n\n @Input()\n public set featureElse(elseTemplateRef: TemplateRef<any>) {\n if (!this.hasView()) {\n this.viewContainer.createEmbeddedView(elseTemplateRef);\n }\n }\n\n ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n}\n","export class AXPUnauthorizedError extends Error {\n constructor(message?: string, public data?: { redirectUrl?: string }) {\n super(message);\n this.name = 'AXPUnauthorizedError';\n }\n}\n\n\nexport class AXPUnauthenticatedError extends Error {\n constructor(message?: string, public data?: { redirectUrl?: string }) {\n super(message);\n this.name = 'AXPUnauthenticatedError';\n }\n}","import { ActivatedRouteSnapshot, CanActivateFn, RouterStateSnapshot, UrlTree } from \"@angular/router\";\nimport { inject } from \"@angular/core\";\nimport { AXPSessionService } from \"../session.service\";\nimport { Observable, first, map } from \"rxjs\";\nimport { AXPUnauthorizedError } from \"../errors.types\";\n\n\nexport const AXPFeatureGuard: CanActivateFn =\n (route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> => {\n const sessionService = inject(AXPSessionService);\n const requiredFeatures = route.data['requiredFeature'] as (string | string[] | null);\n\n return sessionService.features$.pipe(\n map(() => {\n const keys: string[] = !requiredFeatures ? [] : (Array.isArray(requiredFeatures) ? requiredFeatures : [requiredFeatures]);\n const hasFeature = keys.length == 0 || sessionService.isFeatureEnabled(...keys);\n if (!hasFeature) {\n throw new AXPUnauthorizedError(\n `Access Denied. You do not have access to this feature. Required feature(s): ${keys.join(', ')}. Please contact support if you need access.`,\n {\n redirectUrl: state.url\n }\n );\n }\n return true;\n })\n );\n };\n","import { InjectionToken } from '@angular/core';\nimport { AXPFeatureChecker } from './feature-checker.types';\n\n/**\n * Optional injection token for feature checker.\n * If provided, the checker will be called to potentially override\n * feature enablement results based on custom logic.\n */\nexport const AXP_FEATURE_CHECKER = new InjectionToken<AXPFeatureChecker>(\n 'AXP_FEATURE_CHECKER'\n);\n\n","import { InjectionToken } from \"@angular/core\";\nimport { AXPPermission } from \"./permission.types\";\nimport { AXPSessionContext } from \"../session.types\";\n\nexport interface AXPPermissionLoader {\n getList(context: AXPSessionContext): Promise<AXPPermission[]>;\n}\n\nexport const AXP_PERMISSION_LOADER = new InjectionToken<AXPPermissionLoader>('AXP_PERMISSION_LOADER', {\n providedIn: 'root',\n factory: () => {\n return new AXPPermissionDefaultLoader();\n }\n});\n\n\nclass AXPPermissionDefaultLoader implements AXPPermissionLoader {\n async getList(context: AXPSessionContext): Promise<AXPPermission[]> {\n return [];\n }\n}","import { InjectionToken } from '@angular/core';\nimport { AXPPermissionChecker } from './permission-checker.types';\n\n/**\n * Optional injection token for permission checker.\n * If provided, the checker will be called to potentially override\n * authorization results based on custom logic.\n */\nexport const AXP_PERMISSION_CHECKER = new InjectionToken<AXPPermissionChecker>(\n 'AXP_PERMISSION_CHECKER'\n);\n\n","import { AXPApplication } from \"./application/application.types\";\nimport { AXPTenant } from \"./tenant/tenant.types\";\nimport { AXPUser } from \"./user/user.types\";\n\nexport class AXPSessionContext {\n\n private _user: AXPUser | null = null;\n public get user(): AXPUser | null {\n return this._user;\n }\n\n private _tenant: AXPTenant | null = null;\n public get tenant(): AXPTenant | null {\n return this._tenant;\n }\n\n private _application: AXPApplication | null = null;\n public get application(): AXPApplication | null {\n return this._application;\n }\n\n constructor(context: {\n user: AXPUser | null,\n tenant: AXPTenant | null,\n application: AXPApplication | null,\n }) {\n this._user = context.user;\n this._tenant = context.tenant;\n this._application = context.application;\n }\n}\n\n\nexport enum AXPSessionStatus {\n Authenticated = \"authenticated\",\n Unauthenticated = \"unauthenticated\",\n Unauthorized = \"unauthorized\",\n Authorized = \"authorized\",\n Expired = \"expired\",\n SignedOut = \"signedOut\"\n}","import { AXPBroadcastEventService } from '@acorex/platform/core';\nimport { Injectable, inject, Injector } from '@angular/core';\nimport { isEmpty } from 'lodash-es';\nimport { BehaviorSubject, Observable, defaultIfEmpty, filter, from, map, shareReplay, switchMap } from 'rxjs';\nimport { AXP_APPLICATION_LOADER } from './application/application.loader';\nimport { AXPApplication } from './application/application.types';\nimport { AXPAuthStrategyRegistryService } from './auth-registry.service';\nimport { AXPBaseCredentials, AXPSessionData } from './auth.strategy';\nimport { AXPFeature, AXP_FEATURE_LOADER, AXP_FEATURE_CHECKER } from './feature';\nimport { AXP_PERMISSION_LOADER } from './permission/permission.loader';\nimport { AXP_PERMISSION_CHECKER } from './permission/permission-checker.token';\nimport { AXPPermission } from './permission/permission.types';\nimport { AXPSessionContext, AXPSessionStatus } from './session.types';\nimport { AXP_TENANT_LOADER } from './tenant/tenant.loader';\nimport { AXPTenant } from './tenant/tenant.types';\nimport { AXPUser } from './user/user.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPSessionService {\n private eventService = inject(AXPBroadcastEventService);\n\n private authStrategyRegistry = inject(AXPAuthStrategyRegistryService);\n private readonly injector = inject(Injector);\n public static readonly SESSION_KEY = 'AXP_SESSION';\n\n private readonly permissionLoader = inject(AXP_PERMISSION_LOADER);\n private readonly featureLoader = inject(AXP_FEATURE_LOADER);\n private readonly tenantLoader = inject(AXP_TENANT_LOADER);\n private readonly applicationLoader = inject(AXP_APPLICATION_LOADER);\n private readonly permissionChecker = inject(AXP_PERMISSION_CHECKER, { optional: true });\n private readonly featureChecker = inject(AXP_FEATURE_CHECKER, { optional: true });\n\n\n\n private status = new BehaviorSubject<AXPSessionStatus>(AXPSessionStatus.Unauthenticated);\n public readonly status$ = this.status.asObservable().pipe(shareReplay(1));\n\n // Add loading state to prevent premature redirects\n private isLoading = new BehaviorSubject<boolean>(true);\n public readonly isLoading$ = this.isLoading.asObservable().pipe(shareReplay(1));\n\n private currentUserSubject = new BehaviorSubject<AXPUser | null>(null);\n public readonly user$ = this.currentUserSubject.asObservable().pipe(shareReplay(1));\n public get user(): AXPUser | null {\n const session = this.getSessionData();\n if (session?.user && !this.currentUserSubject.value) {\n this.currentUserSubject.next(session.user);\n }\n return this.currentUserSubject.value;\n }\n\n private currentTenantSubject = new BehaviorSubject<AXPTenant | null>(null);\n public readonly tenant$ = this.currentTenantSubject.asObservable().pipe(shareReplay(1));\n public get tenant(): AXPTenant | null {\n const session = this.getSessionData();\n if (session?.tenant && !this.currentTenantSubject.value) {\n this.currentTenantSubject.next(session.tenant);\n }\n return this.currentTenantSubject.value;\n }\n\n public get tenants$(): Observable<AXPTenant[]> {\n return from(this.tenantLoader.getList(this.getContext()));\n }\n\n private currentApplicationSubject = new BehaviorSubject<AXPApplication | null>(null);\n public readonly application$ = this.currentApplicationSubject.asObservable().pipe(shareReplay(1));\n public get application(): AXPApplication | null {\n const session = this.getSessionData();\n if (session?.application && !this.currentApplicationSubject.value) {\n this.currentApplicationSubject.next(session.application);\n }\n return this.currentApplicationSubject.value;\n }\n\n public get applications$(): Observable<AXPApplication[]> {\n return from(this.applicationLoader.getList(this.getContext()));\n }\n\n private permissionsSubject = new BehaviorSubject<AXPPermission[]>([]);\n public readonly permissions$ = this.permissionsSubject.asObservable().pipe(shareReplay(1), defaultIfEmpty([]));\n public get permissions(): AXPPermission[] {\n return this.permissionsSubject.value ?? [];\n }\n\n private featuresSubject = new BehaviorSubject<AXPFeature[]>([]);\n public readonly features$ = this.featuresSubject.asObservable().pipe(shareReplay(1), defaultIfEmpty([]));\n public get features(): AXPFeature[] {\n return this.featuresSubject.value ?? [];\n }\n\n public readonly isAuthenticated$ = this.status$.pipe(\n map((status) => {\n const isAuth = status === AXPSessionStatus.Authenticated || status === AXPSessionStatus.Authorized;\n return isAuth;\n }),\n shareReplay(1),\n );\n\n // Add a new observable that considers loading state\n public readonly isAuthenticatedWithLoading$ = this.isLoading$.pipe(\n switchMap((loading) => {\n if (loading) {\n // Wait for loading to complete, then return authentication status\n return this.isLoading$.pipe(\n filter((isLoading) => !isLoading),\n switchMap(() => this.isAuthenticated$),\n );\n }\n // If not loading, return current authentication status\n return this.isAuthenticated$;\n }),\n shareReplay(1),\n );\n\n public readonly isAuthorized$ = this.status$.pipe(\n map((status) => status === AXPSessionStatus.Authorized),\n shareReplay(1),\n );\n\n public async restoreSession(): Promise<void> {\n this.isLoading.next(true);\n\n try {\n const sessionData = this.getSessionData();\n if (sessionData) {\n if (sessionData.user) {\n this.currentUserSubject.next(sessionData.user);\n\n // Restore tenant and application from session data\n if (sessionData.tenant) {\n this.currentTenantSubject.next(sessionData.tenant);\n }\n if (sessionData.application) {\n this.currentApplicationSubject.next(sessionData.application);\n }\n\n this.status.next(AXPSessionStatus.Authenticated);\n\n\n\n await this.loadPermissions();\n await this.loadFeatures();\n await this.signInComplete();\n }\n } else {\n this.status.next(AXPSessionStatus.Unauthorized);\n }\n } catch (error) {\n this.status.next(AXPSessionStatus.Unauthorized);\n } finally {\n this.isLoading.next(false);\n }\n }\n\n async signin(credentials: AXPBaseCredentials): Promise<void> {\n this.isLoading.next(true);\n try {\n //\n // this.clearSession();\n //\n const strategy = this.authStrategyRegistry.get(credentials.strategy);\n if (!strategy) {\n throw new Error(`Authentication strategy '${credentials.strategy}' is not supported`);\n }\n const result = await strategy.signin(credentials);\n if (!result) return;\n if (result?.succeed) {\n this.currentUserSubject.next(result.data!.user);\n this.setSession({\n accessToken: result.data!.accessToken,\n refreshToken: result.data!.refreshToken,\n strategy: credentials.strategy,\n user: result.data!.user,\n application: result.data?.application,\n tenant: result.data?.tenant,\n expiresIn: result.data?.expiresIn,\n idToken: result.data?.idToken ?? null,\n });\n } else {\n this.status.next(AXPSessionStatus.Unauthenticated);\n throw new Error(`Invalid Username or Password`);\n }\n } catch (error) {\n console.error('Signin error:', error);\n this.status.next(AXPSessionStatus.Unauthenticated);\n throw error;\n } finally {\n this.isLoading.next(false);\n console.log('Signin process completed');\n }\n }\n\n async updateToken(params?: { [key: string]: any }): Promise<void> {\n this.isLoading.next(true);\n try {\n const strategyName = this.getSessionData()?.strategy!;\n if (!strategyName) {\n throw new Error('Strategy not found');\n }\n const strategy = this.authStrategyRegistry.get(strategyName);\n if (!strategy) {\n throw new Error(`Authentication strategy '${this.getSessionData()?.strategy}' is not supported`);\n }\n const result = await strategy.updateToken(params);\n if (result?.succeed) {\n this.currentUserSubject.next(result.data!.user);\n this.setSession({\n accessToken: result.data!.accessToken,\n refreshToken: result.data!.refreshToken,\n strategy: strategyName,\n user: result.data!.user,\n application: result.data?.application,\n tenant: result.data?.tenant,\n expiresIn: result.data?.expiresIn,\n idToken: result.data?.idToken ?? null,\n });\n this.status.next(AXPSessionStatus.Authenticated);\n\n // If we have both tenant and application, complete the sign-in\n if (this.application && this.tenant) {\n await this.restoreSession();\n }\n } else {\n this.status.next(AXPSessionStatus.Unauthenticated);\n throw new Error(`Invalid Username or Password`);\n }\n } catch (error) {\n console.error('Update token error:', error);\n throw error;\n } finally {\n this.isLoading.next(false);\n console.log('Update token process completed');\n }\n }\n\n async signout(): Promise<void> {\n console.log('Signing out...');\n this.isLoading.next(true);\n\n try {\n const sessionData = this.getSessionData();\n\n if (sessionData?.strategy) {\n const strategy = this.authStrategyRegistry.get(sessionData?.strategy);\n if (strategy) {\n try {\n await strategy.signout();\n } catch (error) { }\n }\n }\n //\n\n const userId = this.user?.id;\n\n\n this.clearSession();\n this.eventService.publish(AXPSessionStatus.SignedOut, { id: userId });\n this.isLoading.next(false);\n this.status.next(AXPSessionStatus.SignedOut);\n } finally {\n this.isLoading.next(false);\n }\n }\n\n async refreshToken(): Promise<any> {\n console.log('Refreshing token...');\n return new Promise(async (resolve, reject) => {\n const sessionData = this.getSessionData();\n if (!sessionData || !sessionData?.refreshToken) {\n console.log('No session data or refresh token found');\n reject(new Error('No refresh token available'));\n return;\n }\n const strategy = this.authStrategyRegistry.get(sessionData.strategy);\n if (!strategy) {\n console.error('Authentication strategy not found:', sessionData.strategy);\n reject(new Error(`Authentication strategy '${sessionData.strategy}' is not found`));\n return;\n }\n try {\n const result = await strategy.refreshToken(this.getContext());\n if (result.succeed) {\n console.log('Token refresh successful');\n this.setSession(result.data as AXPSessionData);\n resolve(result.data?.accessToken);\n } else {\n console.error('Token refresh failed');\n this.clearSession();\n this.status.next(AXPSessionStatus.Expired);\n reject(new Error('Token refresh failed'));\n }\n } catch (error) {\n console.error('Error during token refresh:', error);\n this.clearSession();\n this.status.next(AXPSessionStatus.Expired);\n reject(error);\n }\n });\n }\n\n private async loadPermissions(): Promise<void> {\n try {\n const permissions = await this.permissionLoader.getList(this.getContext());\n this.permissionsSubject.next(permissions ?? []);\n } catch (error) {\n console.error('Error loading permissions:', error);\n this.permissionsSubject.next([]);\n }\n }\n\n private async loadFeatures(): Promise<void> {\n try {\n const features = await this.featureLoader.getList(this.getContext());\n this.featuresSubject.next(features ?? []);\n } catch (error) {\n console.error('Error loading features:', error);\n this.featuresSubject.next([]);\n }\n }\n\n async signInComplete() {\n // Ensure we have the required data\n if (!this.user) {\n this.status.next(AXPSessionStatus.Unauthenticated);\n return;\n }\n\n // Set status to Authorized\n this.status.next(AXPSessionStatus.Authorized);\n\n // Double-check the status was set correctly\n setTimeout(() => {\n console.log('Status after timeout:', this.status.value);\n }, 100);\n }\n\n public setSession(tokens: Partial<AXPSessionData>): void {\n const sessionData: Partial<AXPSessionData> = {\n accessToken: tokens.accessToken,\n refreshToken: tokens.refreshToken,\n strategy: tokens.strategy,\n user: tokens.user,\n application: tokens.application,\n tenant: tokens.tenant,\n expiresIn: tokens.expiresIn,\n idToken: tokens.idToken,\n };\n // Update subjects\n if (tokens.user) {\n this.currentUserSubject.next(tokens.user);\n }\n if (tokens.tenant) {\n this.currentTenantSubject.next(tokens.tenant);\n }\n if (tokens.application) {\n this.currentApplicationSubject.next(tokens.application);\n }\n localStorage.setItem(AXPSessionService.SESSION_KEY, JSON.stringify(sessionData));\n }\n\n public setStrategy(strategy: string): void {\n const sessionData = this.getSessionData();\n const newSessionData = { ...sessionData, strategy };\n this.setSession(newSessionData);\n }\n\n public getSessionData(): AXPSessionData | null {\n try {\n const sessionDataString = localStorage.getItem(AXPSessionService.SESSION_KEY);\n if (sessionDataString) {\n const sessionData = JSON.parse(sessionDataString);\n\n return sessionData;\n } else {\n return null;\n }\n } catch (error) {\n localStorage.removeItem(AXPSessionService.SESSION_KEY);\n return null;\n }\n }\n\n private clearSession(): void {\n //\n this.currentUserSubject.next(null);\n //\n this.currentTenantSubject.next(null);\n //\n this.currentApplicationSubject.next(null);\n //\n this.permissionsSubject.next([]);\n //\n this.featuresSubject.next([]);\n //\n localStorage.removeItem(AXPSessionService.SESSION_KEY);\n }\n\n public authorize(...keys: string[]): boolean {\n // Calculate base result\n const baseResult = keys.every((k) => {\n if (isEmpty(k)) return true;\n\n // Check if user has the permission\n const hasPermission = this.permissions.indexOf(k) > -1;\n if (!hasPermission) return false;\n\n // Check if permission has required features (if permission definition service is available)\n // Note: This is a lightweight check. Full feature validation happens in permission definition service.\n return true;\n });\n\n // If permission checker is provided, use it to potentially override the result\n if (this.permissionChecker) {\n const context = this.getContext();\n return this.permissionChecker.check(keys, context, baseResult);\n }\n\n return baseResult;\n }\n\n public isFeatureEnabled(...keys: string[]): boolean {\n // Calculate base result\n const baseResult = keys.every((k) => isEmpty(k) || this.features.some((c) => c.name == k && c.value == true));\n\n // If feature checker is provided, use it to potentially override the result\n if (this.featureChecker) {\n const context = this.getContext();\n return this.featureChecker.check(keys, context, baseResult);\n }\n\n return baseResult;\n }\n\n /**\n * Checks if a module is enabled for the current tenant/application.\n * Module names are stored as features with value: true when enabled.\n * Module names can be provided in PascalCase (e.g., 'SecurityManagement') or kebab-case (e.g., 'security-management').\n */\n public isModuleEnabled(moduleName: string): boolean {\n if (!moduleName) {\n return false;\n }\n\n // Normalize module name: convert kebab-case to PascalCase if needed\n const normalizedModuleName = moduleName.includes('-')\n ? moduleName.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('')\n : moduleName;\n\n // Module names are stored as features with value: true when enabled\n return this.features.some(f => f.name === normalizedModuleName && f.value === true);\n }\n\n public getToken(): string | undefined {\n const sessionData = this.getSessionData();\n\n return sessionData?.accessToken;\n }\n\n public getContext(): AXPSessionContext {\n return new AXPSessionContext({\n user: this.user,\n tenant: this.tenant,\n application: this.application,\n });\n }\n}\n","import { Directive, Input, TemplateRef, ViewContainerRef, inject, signal } from '@angular/core';\nimport { Subscription, first } from 'rxjs';\nimport { AXPSessionService } from '../session.service';\n\n@Directive({\n selector: '[permission]',\n standalone: false\n})\nexport class AXPPermissionDirective {\n private hasView = signal(false);\n private subscription!: Subscription;\n private sessionService = inject(AXPSessionService);\n\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef\n ) { }\n\n @Input()\n public set permission(permissionKeys: string | string[] | null) {\n const keys: string[] = !permissionKeys ? [] : (Array.isArray(permissionKeys) ? permissionKeys : [permissionKeys]);\n if (keys.length == 0) {\n // If permissionKey is null or empty, decide the default behavior here\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView.set(true);\n return;\n }\n this.subscription = this.sessionService.isAuthorized$\n .subscribe((isAuthorized) => {\n if (isAuthorized && this.sessionService.authorize(...keys)) {\n if (!this.hasView()) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView.set(true);\n }\n } else {\n this.viewContainer.clear();\n this.hasView.set(false);\n }\n });\n }\n\n @Input()\n public set permissionElse(elseTemplateRef: TemplateRef<any>) {\n if (!this.hasView()) {\n this.viewContainer.createEmbeddedView(elseTemplateRef);\n }\n }\n\n ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n}\n","import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivateFn, RouterStateSnapshot } from '@angular/router';\nimport { first, map, tap } from 'rxjs';\nimport { AXPUnauthorizedError } from '../errors.types';\nimport { AXPSessionService } from '../session.service';\n\nexport const AXPPermissionGuard: CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n\n const sessionService = inject(AXPSessionService);\n\n const permissionKeys = route.data['requiredPermission'] as string | string[] | null;\n\n return sessionService.isAuthorized$.pipe(\n first(),\n map((value) => {\n const keys: string[] = !permissionKeys ? [] : Array.isArray(permissionKeys) ? permissionKeys : [permissionKeys];\n const hasPermission = keys.length == 0 || sessionService.authorize(...keys);\n if (!hasPermission) {\n throw new AXPUnauthorizedError(\n `Access denied. Required permissions: ${keys.join(', ')}. Please contact your administrator if you believe this is an error.`,\n {\n redirectUrl: state.url\n }\n );\n }\n return true;\n })\n );\n};\n","import { AXPPermissionDefinition, AXPPermissionGroupDefinition } from \"./permission.types\";\n\n\nexport class AXPPermissionDefinitionProviderContext {\n private builders: Map<string, AXPPermissionDefinitionGroupBuilder> = new Map();\n\n addGroup(name: string, title: string, description?: string): AXPPermissionDefinitionGroupBuilder {\n if (this.isGroupDefined(name)) {\n return this.findGroup(name)!\n }\n const group: AXPPermissionGroupDefinition = {\n name,\n title,\n description,\n permissions: []\n };\n const builder = new AXPPermissionDefinitionGroupBuilder(this, group);\n this.builders.set(name, builder);\n return builder;\n }\n\n getGroupDefinitions(): AXPPermissionGroupDefinition[] {\n return Array.from(this.builders.values()).map(b => b.group);\n }\n\n findGroup(name: string): AXPPermissionDefinitionGroupBuilder | undefined {\n return this.builders.get(name);\n }\n\n isGroupDefined(name: string): boolean {\n return this.builders.has(name);\n }\n}\n\n\n\nexport class AXPPermissionDefinitionGroupBuilder {\n private context: AXPPermissionDefinitionProviderContext;\n private _group: AXPPermissionGroupDefinition;\n\n public get group(): AXPPermissionGroupDefinition {\n return this._group;\n }\n\n constructor(context: AXPPermissionDefinitionProviderContext, group: AXPPermissionGroupDefinition) {\n this.context = context;\n this._group = group;\n }\n\n addPermission(name: string, title: string, description?: string, requiredFeatures?: string[]): AXPPermissionDefinitionBuilder {\n const permission: AXPPermissionDefinition = {\n name,\n title,\n description,\n children: [],\n requiredFeatures\n };\n this._group.permissions.push(permission);\n return new AXPPermissionDefinitionBuilder(this, permission);\n }\n\n\n\n\n endGroup(): AXPPermissionDefinitionProviderContext {\n return this.context;\n }\n\n findPermission(path: string): AXPPermissionDefinition | undefined {\n return undefined;\n }\n\n findGroup(name: string): AXPPermissionDefinitionGroupBuilder | undefined {\n return undefined;\n }\n\n}\n\nexport class AXPPermissionDefinitionBuilder {\n private groupBuilder: AXPPermissionDefinitionGroupBuilder;\n private permission: AXPPermissionDefinition;\n\n constructor(groupBuilder: AXPPermissionDefinitionGroupBuilder, permission: AXPPermissionDefinition) {\n this.groupBuilder = groupBuilder;\n this.permission = permission;\n }\n\n addChild(name: string, title: string, description?: string, requiredFeatures?: string[]): AXPPermissionDefinitionBuilder {\n const permission: AXPPermissionDefinition = {\n name,\n title,\n description,\n children: [],\n requiredFeatures\n };\n this.permission.children.push(permission);\n return this;\n }\n\n /**\n * Set required features for this permission.\n * @param features - Array of feature names (e.g., ['PlatformManagement.menu-customization'])\n */\n requireFeatures(...features: string[]): AXPPermissionDefinitionBuilder {\n this.permission.requiredFeatures = features;\n return this;\n }\n\n\n endPermission(): AXPPermissionDefinitionGroupBuilder {\n return this.groupBuilder;\n }\n}","import { inject, Injectable, InjectionToken } from '@angular/core';\nimport { AXPPermissionDefinition, AXPPermissionGroupDefinition } from './permission.types';\nimport { AXPPermissionDefinitionProviderContext } from './permission-definition.builder';\nimport { AXPSessionService } from '../session.service';\n\n\n\nexport interface AXPPermissionDefinitionProvider {\n define(context: AXPPermissionDefinitionProviderContext): Promise<void>;\n}\n\nexport const AXP_PERMISSION_DEFINITION_PROVIDER = new InjectionToken<AXPPermissionDefinitionProvider[]>('AXP_PERMISSION_DEFINITION_PROVIDER', {\n providedIn: 'root',\n factory: () => {\n return [];\n }\n});\n\n\n@Injectable({ providedIn: 'root' })\nexport class AXPPermissionDefinitionService {\n private providers = inject(AXP_PERMISSION_DEFINITION_PROVIDER, { optional: true });\n private sessionService = inject(AXPSessionService);\n private cache: AXPPermissionGroupDefinition[] | null = null;\n\n\n private async load(): Promise<void> {\n if (this.cache) {\n return\n }\n const context = new AXPPermissionDefinitionProviderContext();\n \n // Load providers from DI tokens\n if (Array.isArray(this.providers)) {\n for (const provider of this.providers) {\n if (provider instanceof Promise) {\n // If provider is a promise, resolve it\n const resolvedProvider = await provider;\n await resolvedProvider.define(context);\n } else {\n // If provider is a direct instance, use it directly\n await provider.define(context);\n }\n }\n }\n\n // Filter permissions based on required features\n const allGroups = context.getGroupDefinitions();\n this.cache = this.filterByFeatures(allGroups);\n }\n\n /**\n * Filter permissions based on required features.\n * Removes permissions that have required features that are not enabled.\n */\n private filterByFeatures(groups: AXPPermissionGroupDefinition[]): AXPPermissionGroupDefinition[] {\n return groups.map(group => ({\n ...group,\n permissions: this.filterPermissions(group.permissions)\n })).filter(group => group.permissions.length > 0);\n }\n\n /**\n * Recursively filter permissions and their children based on required features.\n */\n private filterPermissions(permissions: AXPPermissionDefinition[]): AXPPermissionDefinition[] {\n return permissions\n .filter(permission => {\n // Check if required features are enabled\n if (permission.requiredFeatures && permission.requiredFeatures.length > 0) {\n const allFeaturesEnabled = permission.requiredFeatures.every(featureName =>\n this.sessionService.isFeatureEnabled(featureName)\n );\n if (!allFeaturesEnabled) {\n return false; // Filter out this permission\n }\n }\n return true;\n })\n .map(permission => ({\n ...permission,\n children: this.filterPermissions(permission.children)\n }))\n .filter(permission => {\n // Remove permissions that have no children if they were only containers\n // (This is optional - you might want to keep parent permissions even without children)\n return true;\n });\n }\n\n public async reload(): Promise<void> {\n this.cache = null;\n await this.load();\n }\n\n public async getGroups(): Promise<AXPPermissionGroupDefinition[]> {\n await this.load();\n return this.cache ?? [];\n }\n\n public async getPermissions(): Promise<AXPPermissionDefinition[]> {\n await this.load();\n return this.cache?.flatMap(g => g.permissions) ?? [];\n }\n\n public async getGroup(name: string): Promise<AXPPermissionGroupDefinition | null> {\n await this.load();\n return this.cache?.find(g => g.name === name) ?? null;\n }\n\n public async getPermission(name: string): Promise<AXPPermissionDefinition | null> {\n await this.load();\n return this.cache?.find(g => g.permissions.find(p => p.name === name))?.permissions.find(p => p.name === name) ?? null;\n }\n\n}\n","//#region ---- Imports ----\n\nimport { AXDataSource } from '@acorex/cdk/common';\nimport {\n AXPDataSourceDefinition,\n AXPDataSourceDefinitionProvider,\n AXPFilterDefinition,\n} from '@acorex/platform/core';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';\nimport { inject } from '@angular/core';\nimport { AXPPermissionDefinitionService } from './permission-definition.service';\nimport { AXPPermissionDefinition } from './permission.types';\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction flattenPermissionDefinitions(\n nodes: AXPPermissionDefinition[],\n groupPrefix: string,\n): Array<{ id: string; title: string }> {\n const rows: Array<{ id: string; title: string }> = [];\n for (const node of nodes) {\n const displayTitle = groupPrefix ? `${groupPrefix} / ${node.title}` : node.title;\n if (node.children?.length) {\n rows.push(...flattenPermissionDefinitions(node.children, displayTitle));\n } else {\n rows.push({\n id: String(node.name),\n title: displayTitle,\n });\n }\n }\n return rows;\n}\n\n//#endregion\n\n//#region ---- Permission definitions data source ----\n\n/**\n * Registered permission definitions for select widgets via dataSource name {@link PERMISSION_DEFINITIONS_DATASOURCE_NAME}.\n */\nexport const PERMISSION_DEFINITIONS_DATASOURCE_NAME = 'platform-permission-definitions';\n\n/**\n * Data source definition for leaf permissions from {@link AXPPermissionDefinitionService#getGroups}.\n */\nexport class AXPPermissionDefinitionsDataSourceDefinition implements AXPDataSourceDefinitionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly permissionDefinitionService = inject(AXPPermissionDefinitionService);\n\n //#endregion\n\n //#region ---- Public API ----\n\n async items(): Promise<AXPDataSourceDefinition[]> {\n return [\n {\n name: PERMISSION_DEFINITIONS_DATASOURCE_NAME,\n title: 'Permissions',\n source: () =>\n new AXDataSource({\n key: 'id',\n load: async () => {\n const groups = await this.permissionDefinitionService.getGroups();\n const list: Array<{ id: string; title: string }> = [];\n for (const g of groups) {\n list.push(...flattenPermissionDefinitions(g.permissions, g.title));\n }\n return { items: list, total: list.length };\n },\n byKey: async (key: unknown) => {\n const groups = await this.permissionDefinitionService.getGroups();\n const list: Array<{ id: string; title: string }> = [];\n for (const g of groups) {\n list.push(...flattenPermissionDefinitions(g.permissions, g.title));\n }\n return list.find((item) => item.id === key);\n },\n pageSize: 1000,\n }),\n columns: [\n {\n name: 'id',\n title: 'ID',\n datatype: 'string',\n type: AXPWidgetsCatalog.text,\n },\n {\n name: 'title',\n title: 'Title',\n datatype: 'string',\n type: AXPWidgetsCatalog.text,\n },\n ],\n filters: [\n {\n field: 'title',\n title: 'Title',\n operator: { type: 'equal' },\n widget: { type: AXPWidgetsCatalog.text },\n filterType: { advance: true, inline: true },\n } as AXPFilterDefinition,\n ],\n textField: { name: 'title', title: 'Title' },\n valueField: { name: 'id', title: 'ID' },\n },\n ];\n }\n\n //#endregion\n}\n\n//#endregion\n","import { AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviderContext } from \"@acorex/platform/core\";\nimport { inject } from \"@angular/core\";\nimport { AXPSessionService } from \"../session.service\";\n\nexport class AXPPermissionEvaluatorScopeProvider implements AXPExpressionEvaluatorScopeProvider {\n\n protected sessionService = inject(AXPSessionService);\n\n async provide(context: AXPExpressionEvaluatorScopeProviderContext): Promise<void> {\n context.addScope('permission', {\n /**\n * Check if the current user has all specified permissions\n * @param permissions - Single permission string or array of permission strings\n * @returns boolean - true if user has all permissions, false otherwise\n */\n check: (...permissions: string[]) => {\n return this.sessionService.authorize(...permissions);\n },\n\n /**\n * Check if the current user has any of the specified permissions\n * @param permissions - Array of permission strings\n * @returns boolean - true if user has any of the permissions, false otherwise\n */\n checkAny: (...permissions: string[]) => {\n return permissions.some(p => this.sessionService.authorize(p));\n },\n });\n }\n} ","import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivateFn, RouterStateSnapshot } from '@angular/router';\nimport { first, map } from 'rxjs';\nimport { AXPUnauthenticatedError } from './errors.types';\nimport { AXPSessionService } from './session.service';\n\nexport const AXPAuthGuard: CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const sessionService = inject(AXPSessionService);\n return sessionService.isAuthenticatedWithLoading$.pipe(\n first(),\n map((value) => {\n if (value) {\n return true;\n }\n throw new AXPUnauthenticatedError(\n `Access denied. You are not currently logged in. Please log in to access this page. If you continue to see this message after logging in, please contact support.`,\n {\n redirectUrl: state.url,\n },\n );\n }),\n );\n};\n","import { Inject, ModuleWithProviders, NgModule, Optional, inject, provideAppInitializer } from '@angular/core';\nimport { AXP_SESSION_SERVICE } from '@acorex/platform/core';\nimport { AXPAuthStrategyRegistryService } from './auth-registry.service';\nimport { AXPAuthStrategy } from './auth.strategy';\nimport { AXPFeatureDirective } from './feature';\nimport { AXPPermissionDirective } from './permission/permission.directive';\nimport { AXPSessionService } from './session.service';\n\nexport interface AXPAuthModuleConfigs {\n strategies: (new () => AXPAuthStrategy)[];\n}\n\nexport function initializeAppState(service: AXPSessionService) {\n return async () => {\n try {\n await service.restoreSession();\n } catch (error) {\n console.error(error);\n }\n };\n}\n\n@NgModule({\n imports: [],\n exports: [AXPPermissionDirective, AXPFeatureDirective],\n declarations: [AXPPermissionDirective, AXPFeatureDirective],\n providers: [\n provideAppInitializer(() => {\n const initializerFn = initializeAppState(inject(AXPSessionService));\n return initializerFn();\n }),\n {\n provide: AXP_SESSION_SERVICE,\n useExisting: AXPSessionService,\n },\n ],\n})\nexport class AXPAuthModule {\n static forRoot(configs?: AXPAuthModuleConfigs): ModuleWithProviders<AXPAuthModule> {\n return {\n ngModule: AXPAuthModule,\n providers: [\n ...(configs?.strategies || []),\n {\n provide: 'AXPAuthModuleFactory',\n useFactory: (registry: AXPAuthStrategyRegistryService) => () => {\n registry.register(...(configs?.strategies || []));\n },\n deps: [AXPAuthStrategyRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(configs?: AXPAuthModuleConfigs): ModuleWithProviders<AXPAuthModule> {\n return {\n ngModule: AXPAuthModule,\n providers: [\n ...(configs?.strategies || []),\n {\n provide: 'AXPAuthModuleFactory',\n useFactory: (registry: AXPAuthStrategyRegistryService) => () => {\n registry.register(...(configs?.strategies || []));\n },\n deps: [AXPAuthStrategyRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Optional() @Inject('AXPAuthModuleFactory') instances: any[]) {\n instances?.forEach((f) => {\n f();\n });\n }\n}\n","import { AXPApplication } from './application/application.types';\nimport { AXPSessionContext } from './session.types';\nimport { AXPTenant } from './tenant/tenant.types';\nimport { AXPUser } from './user/user.types';\n\nexport interface AXPBaseCredentials {\n strategy: string;\n [key: string]: string;\n}\n\nexport interface AXPTokenResult {\n accessToken: string;\n expiresIn?: string | null;\n refreshToken?: string;\n idToken?: string;\n tenant?: AXPTenant | null;\n application?: AXPApplication | null;\n}\n\nexport interface AXPSignInResult {\n succeed: boolean;\n data?: {\n accessToken: string;\n idToken?: string | null;\n expiresIn?: string | null;\n refreshToken: string;\n user: AXPUser;\n tenant?: AXPTenant | null;\n application?: AXPApplication | null;\n };\n}\n\nexport abstract class AXPAuthStrategy {\n abstract get name(): string;\n abstract signin(credentials: AXPBaseCredentials): Promise<AXPSignInResult | void>;\n abstract signout(): Promise<void>;\n abstract refreshToken(context: AXPSessionContext): Promise<AXPSignInResult>;\n abstract updateToken(params?: { [key: string]: any }): Promise<AXPSignInResult | void>;\n}\n\nexport interface AXPSessionData {\n accessToken: string;\n refreshToken: string;\n idToken: string | null;\n strategy: string;\n user?: AXPUser | null;\n tenant?: AXPTenant | null;\n application?: AXPApplication | null;\n expiresIn?: string | null;\n}\n","//#region ---- JWT Utility ----\n\n/**\n * Utility class for JWT token operations\n */\nexport class JwtUtil {\n /**\n * Parses a JWT token and returns the payload\n */\n static parseJwt(token: string): any {\n try {\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\n const jsonPayload = decodeURIComponent(\n atob(base64)\n .split('')\n .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\n .join('')\n );\n return JSON.parse(jsonPayload);\n } catch (error) {\n throw new Error('Invalid JWT token');\n }\n }\n}\n\n//#endregion\n\n//#region ---- PKCE Utility ----\n\n/**\n * Utility class for PKCE (Proof Key for Code Exchange) operations\n */\nexport class PkceUtil {\n /**\n * Generates a random string for PKCE code verifier\n */\n static generateRandomString(length: number): string {\n const array = new Uint8Array(length);\n crypto.getRandomValues(array);\n return this.base64UrlEncode(array);\n }\n\n /**\n * Generates PKCE code challenge from verifier\n */\n static async generateCodeChallenge(codeVerifier: string): Promise<string> {\n const encoder = new TextEncoder();\n const data = encoder.encode(codeVerifier);\n const digest = await crypto.subtle.digest('SHA-256', data);\n return this.base64UrlEncode(new Uint8Array(digest));\n }\n\n /**\n * Base64 URL encoding for PKCE\n */\n private static base64UrlEncode(array: Uint8Array): string {\n return btoa(String.fromCharCode(...array))\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '');\n }\n}\n\n//#endregion\n\n//#region ---- Time Utility ----\n\n/**\n * Utility class for time and date operations\n */\nexport class TimeUtil {\n /**\n * Calculates the time difference in milliseconds between a future date and now\n */\n static expiresInMilliseconds(expiresInDate: string): number {\n return new Date(expiresInDate).getTime() - new Date().getTime();\n }\n\n /**\n * Calculates expiration date from seconds\n */\n static calculateExpireInDate(expireInSeconds: number): string {\n return new Date(Date.now() + expireInSeconds * 1000).toISOString();\n }\n}\n\n//#endregion ","//#region ---- Challenge Data Types ----\n\n/**\n * Supported content types for challenge display\n */\nexport type AXPChallengeContentType = 'image-url' | 'image-base64' | 'text' | 'audio-url';\n\n/**\n * Challenge data returned from the server\n * Contains all information needed to display and submit a challenge\n */\nexport interface AXPLoginChallengeData {\n /**\n * Unique identifier for this challenge\n * Must be sent back with credentials when submitting login\n */\n id: string;\n\n /**\n * The challenge content to display\n * Could be an image URL, base64 encoded image, text, or audio URL\n */\n content: string;\n\n /**\n * Type of content for proper rendering\n */\n contentType: AXPChallengeContentType;\n\n /**\n * When this challenge expires (optional)\n * After expiration, a new challenge should be fetched\n */\n expiresAt?: Date;\n\n /**\n * Additional metadata from server (optional)\n */\n metadata?: Record<string, unknown>;\n}\n\n//#endregion\n\n//#region ---- Challenge Check Result ----\n\n/**\n * Result of checking a login error response\n * Determines if a challenge should be displayed\n */\nexport interface AXPChallengeCheckResult {\n /**\n * Whether a challenge is required\n */\n required: boolean;\n\n /**\n * Optional message to display to the user\n */\n message?: string;\n\n /**\n * Additional data from server that may be needed for getChallenge()\n * For example: sessionId, attemptId, etc.\n */\n serverData?: Record<string, unknown>;\n}\n\n//#endregion\n\n","import { Type } from '@angular/core';\nimport { AXPLoginChallengeComponentBase } from './challenge-component.base';\nimport { AXPChallengeCheckResult, AXPLoginChallengeData } from './challenge.types';\n\n//#region ---- Abstract Challenge Provider ----\n\n/**\n * Abstract base class for login challenge providers\n *\n * Implement this class to create custom challenge mechanisms like:\n * - Image CAPTCHA\n * - reCAPTCHA\n * - SMS verification\n * - Email verification\n *\n * @example\n * ```typescript\n * @Injectable()\n * export class MyImageCaptchaProvider extends AXPLoginChallengeProvider {\n * readonly name = 'image-captcha';\n *\n * checkResponse(error: unknown): AXPChallengeCheckResult | null {\n * if (error instanceof HttpErrorResponse) {\n * if (error.error?.requiresCaptcha) {\n * return { required: true };\n * }\n * }\n * return null;\n * }\n *\n * async getChallenge(): Promise<AXPLoginChallengeData> {\n * const response = await this.http.get('/api/captcha').toPromise();\n * return {\n * id: response.id,\n * content: response.image,\n * contentType: 'image-base64'\n * };\n * }\n *\n * async refreshChallenge(): Promise<AXPLoginChallengeData> {\n * return this.getChallenge();\n * }\n *\n * getChallengeComponent(): Type<AXPLoginChallengeComponentBase> {\n * return MyCaptchaChallengeComponent;\n * }\n * }\n * ```\n */\nexport abstract class AXPLoginChallengeProvider {\n\n /**\n * Unique name identifier for this provider\n */\n abstract readonly name: string;\n\n /**\n * Checks the login error response to determine if a challenge is required\n *\n * This method is called after a failed login attempt. The implementation\n * should inspect the error and return a result indicating whether a\n * challenge should be displayed.\n *\n * @param error - The error from the failed login attempt (type varies by implementation)\n * @returns Challenge check result, or null if this provider doesn't handle this error\n */\n abstract checkResponse(error: unknown): AXPChallengeCheckResult | null;\n\n /**\n * Fetches a new challenge from the server\n *\n * Called when checkResponse indicates a challenge is required.\n * Should make an API call to get challenge data (e.g., CAPTCHA image).\n *\n * @param serverData - Optional data from checkResponse result that may be needed\n * @returns Promise resolving to challenge data for display\n */\n abstract getChallenge(serverData?: Record<string, unknown>): Promise<AXPLoginChallengeData>;\n\n /**\n * Fetches a fresh challenge, replacing the current one\n *\n * Called when user requests a new challenge (e.g., clicks \"new image\" button).\n * Typically delegates to getChallenge() but may have different behavior.\n *\n * @returns Promise resolving to new challenge data\n */\n abstract refreshChallenge(): Promise<AXPLoginChallengeData>;\n\n /**\n * Returns the component type for rendering the challenge UI\n *\n * Override this method to provide a custom challenge UI component.\n * If not overridden (returns null), the login component will use\n * a default built-in UI.\n *\n * @returns Component type extending AXPLoginChallengeComponentBase, or null for default UI\n */\n getChallengeComponent(): Type<AXPLoginChallengeComponentBase> | null {\n return null;\n }\n}\n\n//#endregion\n\n","import { InjectionToken } from '@angular/core';\nimport { AXPLoginChallengeProvider } from './challenge.provider';\n\n//#region ---- Injection Token ----\n\n/**\n * Injection token for the login challenge provider\n *\n * This token is optional - if not provided, no challenge mechanism will be used.\n *\n * @example\n * ```typescript\n * // In your app module or provider configuration:\n * providers: [\n * {\n * provide: AXP_LOGIN_CHALLENGE_PROVIDER,\n * useClass: MyImageCaptchaProvider\n * }\n * ]\n *\n * // In a component:\n * private challengeProvider = inject(AXP_LOGIN_CHALLENGE_PROVIDER, { optional: true });\n * ```\n */\nexport const AXP_LOGIN_CHALLENGE_PROVIDER = new InjectionToken<AXPLoginChallengeProvider>(\n 'AXP_LOGIN_CHALLENGE_PROVIDER'\n);\n\n//#endregion\n\n","import { Component, input, output } from '@angular/core';\nimport { AXPLoginChallengeData } from './challenge.types';\n\n//#region ---- Base Challenge Component ----\n\n/**\n * Base class for login challenge UI components\n *\n * Providers can extend this class to create custom challenge UIs.\n * The login component will render this component and listen to its outputs.\n *\n * @example\n * ```typescript\n * @Component({\n * selector: 'my-captcha-challenge',\n * template: `\n * <div class=\"captcha-container\">\n * <img [src]=\"'data:image/png;base64,' + challengeData().content\" />\n * <input\n * type=\"text\"\n * [value]=\"response()\"\n * (input)=\"onResponseChange($event)\"\n * />\n * <button (click)=\"onRefreshClick()\">Refresh</button>\n * </div>\n * `\n * })\n * export class MyCaptchaChallengeComponent extends AXPLoginChallengeComponentBase {\n * response = signal('');\n *\n * onResponseChange(event: Event) {\n * const value = (event.target as HTMLInputElement).value;\n * this.response.set(value);\n * this.responseChange.emit(value);\n * }\n *\n * onRefreshClick() {\n * this.refreshRequest.emit();\n * }\n * }\n * ```\n */\n@Component({\n template: '',\n standalone: true,\n})\nexport abstract class AXPLoginChallengeComponentBase {\n //#region ---- Inputs ----\n\n /**\n * Challenge data to display\n * Contains the image/content and metadata from the server\n */\n challengeData = input.required<AXPLoginChallengeData>();\n\n /**\n * Whether the challenge is currently loading (e.g., refreshing)\n */\n isLoading = input<boolean>(false);\n\n //#endregion\n\n //#region ---- Outputs ----\n\n /**\n * Emits when the user enters or changes their response\n * The login component will capture this value and include it in credentials\n */\n responseChange = output<string>();\n\n /**\n * Emits when the user requests a new challenge (e.g., clicks refresh button)\n * The login component will call provider.refreshChallenge()\n */\n refreshRequest = output<void>();\n\n //#endregion\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAQa,sBAAsB,GAAG,IAAI,cAAc,CAAuB,wBAAwB,EAAE;AACvG,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;QACZ,OAAO,IAAI,2BAA2B,EAAE;IAC1C,CAAC;AACF,CAAA;AAED,MAAM,2BAA2B,CAAA;IAC/B,MAAM,OAAO,CAAC,OAA0B,EAAA;QACtC,OAAO;AACL,YAAA;AACE,gBAAA,EAAE,EAAE,GAAG;AACP,gBAAA,IAAI,EAAE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B,CAAA;AAJpD,IAAA,WAAA,GAAA;;AAOE;;;AAGG;AACH,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,mFAAyB;AAEvD;;AAEG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,KAAK,gFAAC;;;AAMjC;;;AAGG;QACH,IAAA,CAAA,cAAc,GAAG,MAAM,EAAU;AAEjC;;;AAGG;QACH,IAAA,CAAA,cAAc,GAAG,MAAM,EAAQ;AAGhC,IAAA;8GA/BqB,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,wbAHxC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;2FAGQ,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAJnD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACZ,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;AC7CD;;AAEG;;;;"}
@@ -0,0 +1,127 @@
1
+ import { AXTranslationService } from '@acorex/core/translation';
2
+ import { AXPPlatformScope } from '@acorex/platform/core';
3
+ import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable } from '@angular/core';
6
+ import { AXPCommonSettings } from './acorex-platform-common.mjs';
7
+
8
+ class AXPCommonSettingProvider {
9
+ constructor(injector) {
10
+ this.injector = injector;
11
+ this.translateService = this.injector.get(AXTranslationService);
12
+ }
13
+ async provide(context) {
14
+ const trans = async (key) => await this.translateService.translateAsync(`@general:settings.${key}`);
15
+ // Define the 'General Settings' group
16
+ context
17
+ .group('general')
18
+ ?.addSection('notifications', await trans('general.notifications.title'), await trans('general.notifications.description'))
19
+ // Add the 'Enable Operation Toasts' setting
20
+ .addSetting({
21
+ key: AXPCommonSettings.EnableOperationToasts,
22
+ title: await trans('general.notifications.enable-operation-toasts.title'),
23
+ scope: AXPPlatformScope.User,
24
+ isInherited: true,
25
+ defaultValue: true,
26
+ widget: {
27
+ type: AXPWidgetsCatalog.toggle,
28
+ options: {
29
+ label: null,
30
+ },
31
+ },
32
+ description: await trans('general.notifications.enable-operation-toasts.description'),
33
+ })
34
+ // End the 'Notifications' section
35
+ .endSection()
36
+ .addSection('entity', await trans('general.entity.title'), await trans('general.entity.description'))
37
+ // Add the 'Enable Operation Toasts' setting
38
+ .addSetting({
39
+ key: AXPCommonSettings.EntityFilterApplyMode,
40
+ title: await trans('general.entity.filter-apply-mode.title'),
41
+ scope: AXPPlatformScope.User,
42
+ isInherited: true,
43
+ defaultValue: 'auto',
44
+ widget: {
45
+ type: AXPWidgetsCatalog.select,
46
+ options: {
47
+ label: null,
48
+ valueField: 'value',
49
+ textField: 'text',
50
+ dataSource: [
51
+ { value: 'auto', text: await trans('general.entity.filter-apply-mode.options.auto') },
52
+ { value: 'manual', text: await trans('general.entity.filter-apply-mode.options.manual') },
53
+ ],
54
+ },
55
+ },
56
+ description: await trans('general.entity.filter-apply-mode.description'),
57
+ })
58
+ .addSetting({
59
+ key: AXPCommonSettings.ShowCategoryColumnsByDefault,
60
+ title: await trans('general.entity.show-category-columns-by-default.title'),
61
+ scope: AXPPlatformScope.User,
62
+ isInherited: true,
63
+ defaultValue: false,
64
+ widget: {
65
+ type: AXPWidgetsCatalog.toggle,
66
+ options: {
67
+ label: null,
68
+ },
69
+ },
70
+ description: await trans('general.entity.show-category-columns-by-default.description'),
71
+ })
72
+ .addSetting({
73
+ key: AXPCommonSettings.ApplyLayoutOrdering,
74
+ title: await trans('general.entity.apply-layout-ordering.title'),
75
+ scope: AXPPlatformScope.User,
76
+ isInherited: true,
77
+ defaultValue: true,
78
+ widget: {
79
+ type: AXPWidgetsCatalog.toggle,
80
+ options: {
81
+ label: null,
82
+ },
83
+ },
84
+ description: await trans('general.entity.apply-layout-ordering.description'),
85
+ })
86
+ .addSetting({
87
+ key: AXPCommonSettings.RedirectToDetailsAfterCreate,
88
+ title: await trans('general.entity.redirect-to-details-after-create.title'),
89
+ scope: AXPPlatformScope.User,
90
+ isInherited: true,
91
+ defaultValue: true,
92
+ widget: {
93
+ type: AXPWidgetsCatalog.toggle,
94
+ options: {
95
+ label: null,
96
+ },
97
+ },
98
+ description: await trans('general.entity.redirect-to-details-after-create.description'),
99
+ })
100
+ .addSetting({
101
+ key: AXPCommonSettings.ShowPageBadge,
102
+ title: await trans('general.entity.show-page-badge.title'),
103
+ scope: AXPPlatformScope.User,
104
+ isInherited: true,
105
+ defaultValue: true,
106
+ widget: {
107
+ type: AXPWidgetsCatalog.toggle,
108
+ options: {
109
+ label: null,
110
+ },
111
+ },
112
+ description: await trans('general.entity.show-page-badge.description'),
113
+ })
114
+ // End the 'Entity Settings' section
115
+ .endSection()
116
+ // End the 'General Settings' group
117
+ .endGroup();
118
+ }
119
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonSettingProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
120
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonSettingProvider }); }
121
+ }
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonSettingProvider, decorators: [{
123
+ type: Injectable
124
+ }], ctorParameters: () => [{ type: i0.Injector }] });
125
+
126
+ export { AXPCommonSettingProvider };
127
+ //# sourceMappingURL=acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-common-common-settings.provider-G9XcXXOG.mjs","sources":["../../../../libs/platform/common/src/lib/configs/common-settings.provider.ts"],"sourcesContent":["import { AXTranslationService } from '@acorex/core/translation';\nimport { AXPPlatformScope } from '@acorex/platform/core';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';\nimport { Injectable, Injector } from '@angular/core';\nimport { AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '../settings';\nimport { AXPCommonSettings } from './common-settings.key';\n\n@Injectable()\nexport class AXPCommonSettingProvider implements AXPSettingDefinitionProvider {\n private readonly translateService = this.injector.get(AXTranslationService);\n\n constructor(private injector: Injector) { }\n\n async provide(context: AXPSettingDefinitionProviderContext): Promise<void> {\n const trans = async (key: string) => await this.translateService.translateAsync(`@general:settings.${key}`);\n\n // Define the 'General Settings' group\n context\n .group('general')\n ?.addSection(\n 'notifications',\n await trans('general.notifications.title'),\n await trans('general.notifications.description'),\n )\n // Add the 'Enable Operation Toasts' setting\n .addSetting({\n key: AXPCommonSettings.EnableOperationToasts,\n title: await trans('general.notifications.enable-operation-toasts.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: true,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n options: {\n label: null,\n },\n },\n\n description: await trans('general.notifications.enable-operation-toasts.description'),\n })\n\n // End the 'Notifications' section\n .endSection()\n .addSection('entity', await trans('general.entity.title'), await trans('general.entity.description'))\n // Add the 'Enable Operation Toasts' setting\n .addSetting({\n key: AXPCommonSettings.EntityFilterApplyMode,\n title: await trans('general.entity.filter-apply-mode.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'auto',\n widget: {\n type: AXPWidgetsCatalog.select,\n options: {\n label: null,\n valueField: 'value',\n textField: 'text',\n dataSource: [\n { value: 'auto', text: await trans('general.entity.filter-apply-mode.options.auto') },\n { value: 'manual', text: await trans('general.entity.filter-apply-mode.options.manual') },\n ],\n },\n },\n\n description: await trans('general.entity.filter-apply-mode.description'),\n })\n .addSetting({\n key: AXPCommonSettings.ShowCategoryColumnsByDefault,\n title: await trans('general.entity.show-category-columns-by-default.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: false,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n options: {\n label: null,\n },\n },\n description: await trans('general.entity.show-category-columns-by-default.description'),\n })\n .addSetting({\n key: AXPCommonSettings.ApplyLayoutOrdering,\n title: await trans('general.entity.apply-layout-ordering.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: true,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n options: {\n label: null,\n },\n },\n description: await trans('general.entity.apply-layout-ordering.description'),\n })\n .addSetting({\n key: AXPCommonSettings.RedirectToDetailsAfterCreate,\n title: await trans('general.entity.redirect-to-details-after-create.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: true,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n options: {\n label: null,\n },\n },\n description: await trans('general.entity.redirect-to-details-after-create.description'),\n })\n .addSetting({\n key: AXPCommonSettings.ShowPageBadge,\n title: await trans('general.entity.show-page-badge.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: true,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n options: {\n label: null,\n },\n },\n description: await trans('general.entity.show-page-badge.description'),\n })\n\n // End the 'Entity Settings' section\n .endSection()\n // End the 'General Settings' group\n .endGroup();\n }\n}\n"],"names":[],"mappings":";;;;;;;MAQa,wBAAwB,CAAA;AAGnC,IAAA,WAAA,CAAoB,QAAkB,EAAA;QAAlB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QAFX,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAEjC;IAE1C,MAAM,OAAO,CAAC,OAA4C,EAAA;AACxD,QAAA,MAAM,KAAK,GAAG,OAAO,GAAW,KAAK,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,qBAAqB,GAAG,CAAA,CAAE,CAAC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