1- import { InjectionToken , Provider } from '@angular/core' ;
2- import { provideRoutes , Routes } from '@angular/router' ;
3- import { TRANSLATIONS } from '@backbase/transactions-journey/internal/shared-data' ;
4- import {
5- TransactionsJourneyConfiguration ,
6- TransactionsRouteTitleResolverService ,
7- } from '@backbase/transactions-journey/internal/data-access' ;
1+ import { InjectionToken } from '@angular/core' ;
82
93export type TransactionsJourneyExtensionsConfig = Record < string , unknown > ;
104export const TRANSACTION_EXTENSIONS_CONFIG =
@@ -15,54 +9,3 @@ export const TRANSACTION_EXTENSIONS_CONFIG =
159 factory : ( ) => ( { } ) ,
1610 }
1711 ) ;
18-
19- // Components are directly imported since the journey is lazy-loaded via loadChildren
20- import { TransactionsViewComponent } from '@backbase/transactions-journey/internal/feature-transaction-view' ;
21- import { TransactionDetailsComponent } from '@backbase/transactions-journey/internal/feature-transaction-details-view' ;
22-
23- export const defaultTransactionsRoutes : Routes = [
24- {
25- path : '' ,
26- component : TransactionsViewComponent ,
27- data : {
28- title : TRANSLATIONS . transactionsTitle ,
29- } ,
30- resolve : {
31- title : TransactionsRouteTitleResolverService ,
32- } ,
33- } ,
34- {
35- path : ':id' ,
36- component : TransactionDetailsComponent ,
37- data : {
38- title : TRANSLATIONS . transactionDetailsTitle ,
39- } ,
40- resolve : {
41- title : TransactionsRouteTitleResolverService ,
42- } ,
43- } ,
44- ] ;
45-
46- export interface TransactionsJourneyConfig {
47- routes ?: Routes ;
48- extensionSlots ?: TransactionsJourneyExtensionsConfig ;
49- }
50-
51- /**
52- * Provides the default configuration for Transactions Journey.
53- * For standalone applications, use provideTransactionsJourney() in app config.
54- */
55- export function provideTransactionsJourney ( {
56- routes,
57- extensionSlots,
58- } : TransactionsJourneyConfig = { } ) : Provider [ ] {
59- return [
60- provideRoutes ( routes || defaultTransactionsRoutes ) ,
61- {
62- provide : TRANSACTION_EXTENSIONS_CONFIG ,
63- useValue : extensionSlots || { } ,
64- } ,
65- TransactionsJourneyConfiguration ,
66- TransactionsRouteTitleResolverService ,
67- ] ;
68- }
0 commit comments