@veloceapps/sdk 3.0.3 → 3.0.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"veloce-sdk.js","sources":["../../../../libs/sdk/src/constants.ts","../../../../libs/sdk/src/components/header/header.component.ts","../../../../libs/sdk/src/components/header/header.component.html","../../../../libs/sdk/src/components/header/header.module.ts","../../../../libs/sdk/src/services/router.service.ts","../../../../libs/sdk/src/flow.component.ts","../../../../libs/sdk/src/flow.component.html","../../../../libs/sdk/src/guards/context.guard.ts","../../../../libs/sdk/src/guards/root.guard.ts","../../../../libs/sdk/src/services/flow.service.ts","../../../../libs/sdk/src/pages/debug/debug.component.ts","../../../../libs/sdk/src/pages/debug/debug.component.html","../../../../libs/sdk/src/pages/debug/debug.module.ts","../../../../libs/sdk/src/types/flow-customization.types.ts","../../../../libs/sdk/src/pages/legacy-product/legacy-product.component.ts","../../../../libs/sdk/src/pages/legacy-product/legacy-product.component.html","../../../../libs/sdk/src/pages/legacy-product/legacy-product.module.ts","../../../../libs/sdk/src/pages/product/product.component.ts","../../../../libs/sdk/src/pages/product/product.component.html","../../../../libs/sdk/src/pages/product/product.module.ts","../../../../libs/sdk/src/pages/record-not-found/record-not-found.component.ts","../../../../libs/sdk/src/pages/record-not-found/record-not-found.component.html","../../../../libs/sdk/src/pages/record-not-found/record-not-found.module.ts","../../../../libs/sdk/src/pages/shopping-cart/shopping-cart.component.ts","../../../../libs/sdk/src/pages/shopping-cart/shopping-cart.component.html","../../../../libs/sdk/src/pages/shopping-cart/product.module.ts","../../../../libs/sdk/src/resolvers/context.resolver.ts","../../../../libs/sdk/src/resolvers/flow.resolver.ts","../../../../libs/sdk/src/resolvers/quote.resolver.ts","../../../../libs/sdk/src/flow-routing.module.ts","../../../../libs/sdk/src/flow.module.ts","../../../../libs/sdk/veloce-sdk.ts"],"sourcesContent":["export const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'vl-flow-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlowHeaderComponent {}\n","Flow Header\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FlowHeaderComponent } from './header.component';\n\n@NgModule({\n declarations: [FlowHeaderComponent],\n imports: [CommonModule],\n exports: [FlowHeaderComponent],\n})\nexport class FlowHeaderModule {}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRoute,\n ActivatedRouteSnapshot,\n Event,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationStart,\n Params,\n Router,\n} from '@angular/router';\nimport { distinctUntilChanged, filter, map, Observable, shareReplay, startWith } from 'rxjs';\nimport { VELOCE_FLOW_ROOT_ROUTE } from '../constants';\nimport { RouteWithId } from '../types/route.types';\n\n@Injectable({ providedIn: 'root' })\nexport class RouterService {\n private routeChange$: Observable<Event>;\n private lastChildParams$: Observable<Params>;\n private lastChildRoute$: Observable<ActivatedRouteSnapshot>;\n\n public loading$: Observable<boolean>;\n\n constructor(private router: Router, private route: ActivatedRoute) {\n this.routeChange$ = this.router.events.pipe(\n filter(e => e instanceof NavigationEnd),\n shareReplay(),\n );\n\n this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(\n startWith(this.getLastChildParams(this.route.snapshot)),\n shareReplay(),\n );\n this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(\n startWith(this.getLastChildRouteSnapshot(this.route.snapshot)),\n shareReplay(),\n );\n\n this.loading$ = this.router.events.pipe(\n filter(\n e =>\n e instanceof NavigationStart ||\n e instanceof NavigationCancel ||\n e instanceof NavigationEnd ||\n e instanceof NavigationError,\n ),\n map(e => e instanceof NavigationStart),\n startWith(false),\n distinctUntilChanged(),\n );\n }\n\n getFlowRootRoute(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot | undefined {\n const path = [...route.pathFromRoot];\n\n while (path.length) {\n const parent = path.pop();\n\n if (!parent) {\n break;\n }\n\n if ((parent.routeConfig as RouteWithId)?.id === VELOCE_FLOW_ROOT_ROUTE) {\n return parent;\n }\n }\n\n return;\n }\n\n getFlowRootPath(route: ActivatedRouteSnapshot): string {\n const rootRoute = this.getFlowRootRoute(route);\n if (!rootRoute) {\n return '';\n }\n\n const path = rootRoute.pathFromRoot\n .map(r => r.routeConfig?.path)\n .filter(Boolean)\n .join('/');\n\n return '/' + path;\n }\n\n get route$(): Observable<ActivatedRouteSnapshot> {\n return this.lastChildRoute$;\n }\n\n get params$(): Observable<Params> {\n return this.lastChildParams$;\n }\n\n public getLastChildRoute = (route: ActivatedRoute): ActivatedRoute => {\n return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;\n };\n\n public getNthChildRoute = (route: ActivatedRoute, index: number): ActivatedRoute => {\n if (index <= 0) {\n return route;\n }\n\n return route.firstChild ? this.getNthChildRoute(route.firstChild, index - 1) : route;\n };\n\n public getLastChildRouteSnapshot = (route: ActivatedRouteSnapshot): ActivatedRouteSnapshot => {\n return route.firstChild ? this.getLastChildRouteSnapshot(route.firstChild) : route;\n };\n\n public watchLastChildRoute$ = (route: ActivatedRoute): Observable<ActivatedRouteSnapshot> => {\n return this.routeChange$.pipe(map(() => this.getLastChildRouteSnapshot(route.snapshot)));\n };\n\n public getLastChildParams = (route: ActivatedRouteSnapshot): Params => {\n return route.firstChild ? this.getLastChildParams(route.firstChild) : route.params;\n };\n\n public watchLastChildParams$ = (route: ActivatedRoute): Observable<Params> => {\n return this.routeChange$.pipe(map(() => this.getLastChildParams(route.snapshot)));\n };\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { map, Observable } from 'rxjs';\nimport { RouterService } from './services/router.service';\n\n@Component({\n selector: 'vl-flow',\n templateUrl: './flow.component.html',\n styleUrls: ['./flow.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlowComponent {\n public isLoading$: Observable<boolean>;\n public showHeader$: Observable<boolean>;\n\n constructor(private routerService: RouterService, private context: ContextService) {\n this.isLoading$ = this.routerService.loading$;\n\n this.showHeader$ = this.routerService.route$.pipe(\n map(route => {\n const showHeader = this.context.resolve()?.properties.standalone !== 'true';\n return route.data.showHeader && showHeader;\n }),\n );\n }\n}\n","<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router } from '@angular/router';\nimport { ConfigurationContextMode, VlWindow } from '@veloce/core';\nimport { Observable } from 'rxjs';\nimport { RouterService } from '../services/router.service';\nimport { ContextRouteData } from '../types/context-route.types';\n\ndeclare const window: VlWindow;\n\n@Injectable()\nexport class ContextGuard implements CanActivate, CanActivateChild {\n constructor(private router: Router, private routerService: RouterService) {}\n\n private getConfigurationContextMode(\n accountId: string,\n quoteId: string,\n orderId: string,\n rpcMessage: string,\n ): ConfigurationContextMode | undefined {\n if (accountId) {\n return ConfigurationContextMode.ACCOUNT;\n }\n\n if (quoteId) {\n return ConfigurationContextMode.QUOTE;\n }\n\n if (orderId) {\n return ConfigurationContextMode.ORDER;\n }\n\n if (rpcMessage) {\n return ConfigurationContextMode.REMOTE;\n }\n\n return;\n }\n\n checkActivation(route: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {\n const { queryParams } = route;\n const { accountId, quoteId, orderId } = queryParams;\n const rpcMessage = window['RPC_MESSAGE'];\n const rpcMessageId: string = rpcMessage && JSON.parse(rpcMessage)?.quote?.Id;\n\n const headerId = accountId || quoteId || orderId || rpcMessageId || 'empty-for-test-mode';\n const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);\n\n if (mode === void 0) {\n return this.reject(route, 'Mode is undefined');\n }\n\n const contextRouteData: ContextRouteData = {\n headerId,\n mode,\n };\n\n route.data = {\n ...route.data,\n ...contextRouteData,\n };\n\n return true;\n }\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {\n return this.checkActivation(route);\n }\n\n canActivateChild(childRoute: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {\n return this.checkActivation(childRoute);\n }\n\n private reject(route: ActivatedRouteSnapshot, message: string): boolean {\n const parentUrl = this.routerService.getFlowRootPath(route);\n this.router.navigate([parentUrl, '404'], {\n state: { message },\n });\n\n return false;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanDeactivate, Navigation, Router } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { RouterService } from '../services/router.service';\n\n@Injectable({ providedIn: 'root' })\nexport class RootGuard implements CanActivate, CanDeactivate<any> {\n private initialized = false;\n private navToRestore: Navigation | null = null;\n\n constructor(private router: Router, private routerService: RouterService) {}\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {\n // We always need to initialize root component first, and only then start checking guards/resolvers\n\n if (!this.initialized) {\n this.initialized = true;\n this.navToRestore = this.router.getCurrentNavigation();\n\n const rootUrl = this.routerService.getFlowRootPath(route);\n this.router.navigate([rootUrl], { replaceUrl: !this.navToRestore?.previousNavigation });\n } else if (this.navToRestore) {\n const nav = this.navToRestore;\n setTimeout(() => {\n this.router.navigateByUrl(nav.extractedUrl, nav.extras);\n\n this.navToRestore = null;\n });\n }\n\n return true;\n }\n\n canDeactivate() {\n this.initialized = false;\n return true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigurationSettingsApiService } from '@veloce/api';\nimport { Flow } from '@veloce/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Injectable()\nexport class FlowService {\n private readonly flowsKey = 'flows';\n\n constructor(private configurationSettingsApiService: ConfigurationSettingsApiService) {}\n\n public getFlow(id: string): Observable<Flow | undefined> {\n return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)));\n }\n\n public fetchFlows(): Observable<Flow[]> {\n return this.configurationSettingsApiService\n .fetchSetting(this.flowsKey)\n .pipe(map(({ value }): Flow[] => (value ? JSON.parse(value) : [])));\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\nimport { FlowProperties } from '@veloce/core';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { map, Observable, shareReplay } from 'rxjs';\nimport { FlowService } from '../../services';\n\ninterface FlowPropertiesExt extends FlowProperties {\n queryParamsStr: string;\n}\n\n@Component({\n selector: 'vl-flow-debug',\n templateUrl: './debug.component.html',\n styleUrls: ['./debug.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DebugComponent {\n public form = new FormGroup({\n id: new FormControl(''),\n });\n\n public selectedFlow?: FlowPropertiesExt;\n public flows$: Observable<FlowPropertiesExt[]>;\n\n constructor(\n private flowService: FlowService,\n private router: Router,\n private activatedRoute: ActivatedRoute,\n private context: ContextService,\n ) {\n this.flows$ = this.flowService.fetchFlows().pipe(\n map(flows =>\n flows.map<FlowPropertiesExt>(flow => {\n const queryParams: Params = flow?.properties?.queryParams ?? {};\n return {\n id: flow.id,\n entryPath: flow?.properties?.entryPath,\n queryParams,\n queryParamsStr: JSON.stringify(queryParams),\n };\n }),\n ),\n shareReplay(),\n );\n }\n\n runFlow() {\n const { id } = this.form.value;\n\n if (!id || !this.selectedFlow) {\n return;\n }\n\n // Delete context before starting a new flow\n this.context.delete();\n\n this.router.navigate(['..', 'flows'], {\n queryParams: {\n flowId: this.selectedFlow.id,\n quoteId: id,\n ...this.selectedFlow.queryParams,\n },\n relativeTo: this.activatedRoute,\n });\n }\n}\n","<form [formGroup]=\"form\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule, Routes } from '@angular/router';\nimport { ButtonModule } from 'primeng/button';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { RadioButtonModule } from 'primeng/radiobutton';\nimport { DebugComponent } from './debug.component';\n\nconst routes: Routes = [{ path: '', component: DebugComponent }];\n\n@NgModule({\n declarations: [DebugComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(routes),\n RadioButtonModule,\n ButtonModule,\n InputTextModule,\n ],\n})\nexport class DebugModule {}\n","import { InjectionToken } from '@angular/core';\nimport { TemplateComponentWithAttachments, UIDefinition as LegacyUIDefinition } from '@veloce/core';\nimport { UIDefinition } from '@veloce/sdk/cms';\nimport { Observable } from 'rxjs';\n\nexport const FLOW_CUSTOMIZATION = new InjectionToken<FlowCustomization>('FLOW_CUSTOMIZATION');\n\nexport interface FlowCustomization {\n getUiDefinition?(productId: string): Observable<UIDefinition | null>;\n getLegacyUiDefinition?(productId: string): Observable<LegacyUIDefinition | null>;\n getShoppingCartComponent?(): Observable<TemplateComponentWithAttachments | null>;\n}\n","import { Component, Inject, OnDestroy, OnInit, Optional } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { QuoteApiService } from '@veloce/api';\nimport { ConfigurationContext, EntityUtil, LineItem, QuoteDraft, VlWindow } from '@veloce/core';\nimport {\n ContextService,\n CurrentStateService,\n QuoteService,\n QuoteStates,\n RuntimeContext,\n RuntimeContextService,\n RuntimeOperation,\n RuntimeService,\n SolutionReadyAware,\n SolutionUpdatedAware,\n} from '@veloce/sdk/runtime';\nimport { Observable, of, Subject } from 'rxjs';\nimport { first, map, switchMap, take, takeUntil } from 'rxjs/operators';\nimport { FlowCustomization, FLOW_CUSTOMIZATION } from '../../types';\n\ndeclare const window: VlWindow;\n\n@Component({\n templateUrl: './legacy-product.component.html',\n styleUrls: ['./legacy-product.component.scss'],\n})\nexport class LegacyProductComponent implements OnInit, OnDestroy, SolutionUpdatedAware, SolutionReadyAware {\n private destroyed$ = new Subject<void>();\n\n private assets?: LineItem[];\n\n constructor(\n private route: ActivatedRoute,\n private quoteService: QuoteService,\n private quoteApiService: QuoteApiService,\n private contextService: ContextService,\n private runtimeContextService: RuntimeContextService,\n private runtimeService: RuntimeService,\n private currentStateService: CurrentStateService,\n @Optional() @Inject(FLOW_CUSTOMIZATION) private customizationService?: FlowCustomization,\n ) {}\n\n ngOnInit(): void {\n this.quoteService.quote$\n .pipe(first(), takeUntil(this.destroyed$))\n .subscribe(quote => this.init(quote, this.route.snapshot.queryParams));\n\n this.runtimeService.onSolutionStopEvent.pipe(take(1)).subscribe(lineItem => this.onSolutionStop(lineItem));\n\n this.runtimeService.onSolutionReadyEvent.pipe(take(1)).subscribe(event => this.onSolutionReady(event));\n\n this.runtimeService.onSolutionCancelEvent.pipe(take(1)).subscribe(() => this.onSolutionCancel());\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n onSolutionReady(lineItem: LineItem): void {\n lineItem.actionCode = lineItem.actionCode ?? 'ADD';\n }\n\n onSolutionCancel(): void {\n this.quoteService.quote$.pipe(first(), takeUntil(this.destroyed$)).subscribe(quote => {\n window['VELO_BACK_FN'].apply(null, [quote.quoteId]);\n });\n }\n\n onSolutionUpdated(lineItem: LineItem): void {\n const states: QuoteStates = {\n configurableRamp: lineItem,\n currentState: this.currentStateService.currentState,\n asset: this.getAsset(lineItem),\n };\n\n this.runtimeService.updateRuntime(states);\n }\n\n onSolutionStop(lineItem: LineItem): void {\n this.quoteService.quote$.pipe(first(), takeUntil(this.destroyed$)).subscribe(quote => {\n const quoteToUpsert: QuoteDraft = {\n ...quote,\n context: this.contextService.resolve() as ConfigurationContext,\n currentState: [...(this.currentStateService.currentState || []).filter(li => li.id !== lineItem.id), lineItem],\n };\n\n this.quoteApiService\n .upsertQuote(quoteToUpsert)\n .pipe(take(1))\n .subscribe(quote => {\n window['VELO_BACK_FN'].apply(null, [quote.quoteId]);\n });\n });\n }\n\n private init(quote: QuoteDraft, queryParams: Params): void {\n const productId = queryParams['productId'];\n const lineItemId = this.getLineItemId(quote, queryParams);\n this.assets = quote.initialState;\n\n lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);\n }\n\n private getLineItemId(quote: QuoteDraft, queryParams: Params): string | undefined {\n if (EntityUtil.isPresent(queryParams['lineItemId'])) {\n return queryParams['lineItemId'];\n }\n\n return quote.currentState\n .filter(lineItem => lineItem.productId === queryParams['productId'])\n .map(lineItem => lineItem.id)\n .find(id => id);\n }\n\n private configure(productId: string): void {\n const runtimeContext = this.getRuntimeContext(productId, '', RuntimeOperation.INIT);\n\n this.startRuntime({}, runtimeContext);\n }\n\n private reConfigure(lineItemId: string, currentState: LineItem[]): void {\n const currentStateItem = EntityUtil.findById(lineItemId, currentState);\n const runtimeContext = this.getRuntimeContext(\n currentStateItem.productId,\n currentStateItem.offeringId,\n RuntimeOperation.UPDATE,\n );\n\n const states: QuoteStates = {\n configurableRamp: currentStateItem,\n currentState,\n asset: this.getAsset(currentStateItem),\n };\n\n this.currentStateService.update(currentState);\n this.startRuntime(states, runtimeContext);\n }\n\n private getAsset(lineItem: LineItem): LineItem | undefined {\n return this.assets && this.assets.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);\n }\n\n private startRuntime(states: QuoteStates, runtimeContext$: Observable<RuntimeContext>): void {\n runtimeContext$\n .pipe(\n take(1),\n map(runtimeContext => {\n this.runtimeService.startRuntime(runtimeContext, states);\n }),\n )\n .subscribe();\n }\n\n private customizeContext(productId: string, context: RuntimeContext): Observable<RuntimeContext> {\n if (!this.customizationService?.getLegacyUiDefinition) {\n return of(context);\n }\n\n return this.customizationService.getLegacyUiDefinition(productId).pipe(\n map(uiDef => ({\n ...context,\n uiDefinition: uiDef ?? context.uiDefinition,\n })),\n );\n }\n\n private getRuntimeContext(\n productId: string,\n offeringId: string,\n runtimeOperation: RuntimeOperation,\n ): Observable<RuntimeContext> {\n return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(\n map(runtimeContext => {\n runtimeContext.invocationContext = { runtimeOperation: RuntimeOperation[runtimeOperation] };\n return runtimeContext;\n }),\n switchMap(runtimeContext => this.customizeContext(productId, runtimeContext)),\n );\n }\n}\n","<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RuntimeModule } from '@veloce/sdk/runtime';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { LegacyProductComponent } from './legacy-product.component';\n\n@NgModule({\n declarations: [LegacyProductComponent],\n imports: [CommonModule, RuntimeModule, TooltipModule.forRoot()],\n exports: [LegacyProductComponent],\n})\nexport class LegacyProductModule {}\n","import { ChangeDetectionStrategy, Component, Inject, OnDestroy, OnInit, Optional } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { EntityUtil, LineItem, QuoteDraft } from '@veloce/core';\nimport { ConfigurationRuntimeService, ConfigurationService, UIDefinition } from '@veloce/sdk/cms';\nimport { QuoteService } from '@veloce/sdk/runtime';\nimport { MessageService } from 'primeng/api';\nimport { BehaviorSubject, catchError, first, Observable, of, Subject, switchMap, takeUntil, tap } from 'rxjs';\nimport { FlowCustomization, FLOW_CUSTOMIZATION } from '../../types/flow-customization.types';\n\ninterface State {\n loading: boolean;\n failure: boolean;\n}\n\n@Component({\n selector: 'vl-flow-product',\n templateUrl: './product.component.html',\n styleUrls: ['./product.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ProductComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject<void>();\n\n public uiDefinition?: UIDefinition;\n public state$ = new BehaviorSubject<State>({ loading: true, failure: false });\n\n constructor(\n private runtimeService: ConfigurationRuntimeService,\n private conigurationService: ConfigurationService,\n private quoteService: QuoteService,\n private route: ActivatedRoute,\n private messageService: MessageService,\n @Optional() @Inject(FLOW_CUSTOMIZATION) private customizationService?: FlowCustomization,\n ) {}\n\n ngOnInit(): void {\n this.quoteService.quote$\n .pipe(first(), takeUntil(this.destroy$))\n .subscribe(quote => this.init(quote, this.route.snapshot.queryParams));\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private customize(productId: string): Observable<any> {\n if (!this.customizationService?.getUiDefinition) {\n return of(null);\n }\n\n return this.customizationService.getUiDefinition(productId).pipe(\n tap(uiDef => {\n if (uiDef) {\n this.uiDefinition = uiDef;\n this.runtimeService.uiDefinitionProperties = uiDef.properties ?? {};\n }\n }),\n );\n }\n\n private init(quote: QuoteDraft, queryParams: Params): void {\n const lineItemId = this.getLineItemId(quote, queryParams);\n const currentStateItem: LineItem | undefined = EntityUtil.findById(lineItemId, quote.currentState);\n const productId = currentStateItem?.productId ?? queryParams['productId'];\n const { offeringId } = currentStateItem ?? {};\n\n if (currentStateItem) {\n this.conigurationService.updateCurrentStates({\n configurableRamp: currentStateItem,\n currentState: quote.currentState,\n });\n }\n\n this.runtimeService\n .init({ productId, offeringId })\n .pipe(\n tap(context => (this.uiDefinition = context?.uiDefinition)),\n switchMap(() => this.customize(productId)),\n switchMap(() => this.conigurationService.configure()),\n tap(() => this.state$.next({ loading: false, failure: false })),\n catchError(error => {\n if (!this.uiDefinition?.properties?.suppressToastMessages) {\n this.messageService.add({ severity: 'error', summary: error });\n }\n\n this.state$.next({ loading: false, failure: true });\n return of();\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n private getLineItemId(quote: QuoteDraft, queryParams: Params): string | undefined {\n if (EntityUtil.isPresent(queryParams['lineItemId'])) {\n return queryParams['lineItemId'];\n }\n\n return quote.currentState\n .filter(lineItem => lineItem.productId === queryParams['productId'])\n .map(lineItem => lineItem.id)\n .find(id => id);\n }\n}\n","<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { LoaderModule } from '@veloce/components';\nimport { PreviewModule } from '@veloce/sdk/cms';\nimport { ProductComponent } from './product.component';\n\n@NgModule({\n declarations: [ProductComponent],\n imports: [CommonModule, PreviewModule, LoaderModule],\n exports: [ProductComponent],\n})\nexport class ProductModule {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\n@Component({\n selector: 'vl-flow-record-not-found',\n templateUrl: './record-not-found.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RecordNotFoundComponent {\n message: string;\n subMessage = '';\n\n constructor(private router: Router, private route: ActivatedRoute) {\n const navigation = this.router.getCurrentNavigation();\n const { state } = navigation?.extras || {};\n\n this.message = state?.message;\n if (typeof this.message === 'string') {\n this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';\n }\n }\n}\n","<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { RecordNotFoundComponent } from './record-not-found.component';\n\nconst routes: Routes = [{ path: '', component: RecordNotFoundComponent }];\n\n@NgModule({\n declarations: [RecordNotFoundComponent],\n imports: [CommonModule, RouterModule.forChild(routes)],\n})\nexport class RecordNotFoundModule {}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnDestroy,\n OnInit,\n Optional,\n} from '@angular/core';\nimport { UITemplatesApiService } from '@veloce/api';\nimport { ToastService, ToastType } from '@veloce/components';\nimport {\n ComponentAttachments,\n TemplateComponent,\n UITemplate,\n UITemplateComponentType,\n UITemplateType,\n} from '@veloce/core';\nimport { UIDefinition } from '@veloce/sdk/cms';\nimport { BehaviorSubject, catchError, map, Observable, of, Subject, switchMap, takeUntil, tap } from 'rxjs';\nimport { FlowCustomization, FLOW_CUSTOMIZATION } from '../../types';\n\ninterface State {\n loading: boolean;\n failure: boolean;\n}\n\n@Component({\n selector: 'vl-flow-shopping-cart',\n templateUrl: './shopping-cart.component.html',\n styleUrls: ['./shopping-cart.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ShoppingCartComponent implements OnInit, OnDestroy {\n public uiDefinition?: UIDefinition = undefined;\n public state$ = new BehaviorSubject<State>({ loading: true, failure: false });\n\n private destroyed$ = new Subject<void>();\n\n constructor(\n private templatesApi: UITemplatesApiService,\n private cdr: ChangeDetectorRef,\n private toastService: ToastService,\n @Optional() @Inject(FLOW_CUSTOMIZATION) private customizationService?: FlowCustomization,\n ) {}\n\n ngOnInit(): void {\n this.generateUIDefinition$()\n .pipe(\n tap(uiDef => {\n if (!uiDef) {\n throw 'Not found';\n }\n\n this.uiDefinition = uiDef;\n this.state$.next({ loading: false, failure: false });\n }),\n catchError(err => {\n this.uiDefinition = undefined;\n this.toastService.add({ severity: ToastType.error, summary: 'Failed to resolve Shopping Cart component' });\n this.state$.next({ loading: false, failure: true });\n throw err;\n }),\n takeUntil(this.destroyed$),\n )\n .subscribe(() => this.cdr.detectChanges());\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n private getTemplateRootComponent$(template: UITemplate): Observable<TemplateComponent | undefined> {\n return this.templatesApi\n .fetchComponents$(template.id)\n .pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));\n }\n\n private getShoppingCartComponentMeta$() {\n if (this.customizationService?.getShoppingCartComponent) {\n return this.customizationService?.getShoppingCartComponent().pipe(\n map(\n component =>\n <ComponentAttachments>{\n html: component?.html,\n css: component?.css,\n js: component?.js,\n json: component?.json,\n },\n ),\n );\n }\n\n return this.templatesApi.fetchTemplates$().pipe(\n map<UITemplate[], UITemplate | undefined>(\n templates => templates.filter(template => template.type === UITemplateType.SHOPPING_CART).reverse()[0],\n ),\n switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))),\n switchMap(component =>\n component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined),\n ),\n );\n }\n\n private generateUIDefinition$(): Observable<UIDefinition | undefined> {\n return this.getShoppingCartComponentMeta$().pipe(\n map(meta => {\n if (!meta) {\n return;\n }\n\n const uiDef: UIDefinition = {\n name: '',\n createdTimestamp: 0,\n primary: true,\n type: 'DEFAULT',\n version: 2,\n children: [\n {\n children: [],\n template: meta.html && btoa(meta.html),\n script: meta.js && btoa(meta.js),\n styles: meta.css && btoa(meta.css),\n },\n ],\n };\n\n return uiDef;\n }),\n );\n }\n}\n","<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { LoaderModule } from '@veloce/components';\nimport { PreviewModule } from '@veloce/sdk/cms';\nimport { ShoppingCartComponent } from './shopping-cart.component';\n\n@NgModule({\n declarations: [ShoppingCartComponent],\n imports: [CommonModule, PreviewModule, LoaderModule],\n exports: [ShoppingCartComponent],\n})\nexport class ShoppingCartModule {}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';\nimport { ConfigurationContext } from '@veloce/core';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { from, Observable, of } from 'rxjs';\nimport { catchError, tap } from 'rxjs/operators';\nimport { RouterService } from '../services/router.service';\n\n@Injectable()\nexport class ContextResolver implements Resolve<ConfigurationContext | null> {\n constructor(private contextService: ContextService, private router: Router, private routerService: RouterService) {}\n\n private handleError(route: ActivatedRouteSnapshot, message: string): Observable<boolean> {\n this.contextService.delete();\n const parentUrl = this.routerService.getFlowRootPath(route);\n return from(this.router.navigate([parentUrl, '404'], { state: { message } }));\n }\n\n resolve(route: ActivatedRouteSnapshot): Observable<ConfigurationContext | null> {\n const { queryParams, data } = route;\n const { uiDefinitionId } = queryParams;\n const { headerId, mode } = data ?? {};\n const currentContext = this.contextService.resolve();\n\n if (headerId && currentContext?.headerId === headerId) {\n return of(currentContext);\n }\n\n return this.contextService.create(headerId, mode).pipe(\n tap((context: ConfigurationContext) => {\n this.contextService.update({\n ...context,\n uiDefinitionId,\n properties: {\n ...currentContext?.properties,\n ...context.properties,\n ...(queryParams ?? {}),\n },\n });\n }),\n catchError(e => {\n const message = e instanceof HttpErrorResponse ? e.error.message : e;\n this.handleError(route, message);\n return of(null);\n }),\n );\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';\nimport { FlowQueryParams } from '@veloce/core';\nimport { Dictionary } from 'lodash';\nimport { map } from 'rxjs/operators';\nimport { FlowService } from '../services/flow.service';\nimport { RouterService } from '../services/router.service';\n\n@Injectable()\nexport class FlowResolver implements Resolve<Promise<boolean>> {\n constructor(private router: Router, private flowService: FlowService, private routerService: RouterService) {}\n\n private handleError(\n route: ActivatedRouteSnapshot,\n message?: string,\n queryParams?: Dictionary<any>,\n ): Promise<boolean> {\n const parentUrl = this.routerService.getFlowRootPath(route);\n return this.router.navigate([parentUrl, '404'], {\n queryParams,\n state: {\n message: message,\n },\n });\n }\n\n resolve(route: ActivatedRouteSnapshot) {\n const { queryParams } = route;\n const { flowId } = queryParams;\n\n if (!flowId) {\n return this.handleError(route);\n }\n\n return this.flowService.getFlow(flowId).pipe(\n map(flow => {\n if (!flow) {\n return this.handleError(route, `Flow with flowId=${flowId} is not defined`);\n }\n\n const { properties } = flow;\n const { queryParams: flowQueryParams, entryPath } = properties;\n const isProductFlow = entryPath.includes('/product');\n const mergedParams = {\n ...queryParams,\n ...flowQueryParams,\n ...(<FlowQueryParams>{\n ...(isProductFlow && { standalone: true }),\n }),\n };\n\n const parentUrl = this.routerService.getFlowRootPath(route);\n const entryUrl = String(entryPath ?? '')\n .split('/')\n .filter(Boolean);\n\n return this.router\n .navigate([parentUrl, ...entryUrl], {\n queryParams: mergedParams,\n replaceUrl: true,\n })\n .catch(e => {\n const message = e instanceof HttpErrorResponse ? e.error.message : e;\n return this.handleError(route, message, mergedParams);\n });\n }),\n );\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';\nimport { QuoteService } from '@veloce/sdk/runtime';\nimport { catchError, from, Observable, of } from 'rxjs';\nimport { RouterService } from '../services/router.service';\n\n@Injectable()\nexport class QuoteResolver implements Resolve<void | boolean> {\n constructor(private router: Router, private quoteService: QuoteService, private routerService: RouterService) {}\n\n private handleError(route: ActivatedRouteSnapshot, message: string): Observable<boolean> {\n const parentUrl = this.routerService.getFlowRootPath(route);\n return from(this.router.navigate([parentUrl, '404'], { state: { message } }));\n }\n\n resolve(route: ActivatedRouteSnapshot): Observable<void | boolean> {\n const { headerId } = route.data;\n const quote = this.quoteService.getQuote();\n\n if (quote && quote.quoteId === headerId) {\n return of(true);\n }\n\n const { queryParams } = route;\n return this.quoteService.init(headerId, queryParams).pipe(\n catchError(e => {\n const message = e instanceof HttpErrorResponse ? e.error.message : e;\n return this.handleError(route, message);\n }),\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { VELOCE_FLOW_ROOT_ROUTE } from './constants';\nimport { FlowComponent } from './flow.component';\nimport { ContextGuard } from './guards/context.guard';\nimport { RootGuard } from './guards/root.guard';\nimport { DebugModule } from './pages/debug/debug.module';\nimport { LegacyProductComponent } from './pages/legacy-product/legacy-product.component';\nimport { LegacyProductModule } from './pages/legacy-product/legacy-product.module';\nimport { ProductComponent } from './pages/product/product.component';\nimport { ProductModule } from './pages/product/product.module';\nimport { RecordNotFoundModule } from './pages/record-not-found/record-not-found.module';\nimport { ShoppingCartModule } from './pages/shopping-cart/product.module';\nimport { ShoppingCartComponent } from './pages/shopping-cart/shopping-cart.component';\nimport { ContextResolver } from './resolvers/context.resolver';\nimport { FlowResolver } from './resolvers/flow.resolver';\nimport { QuoteResolver } from './resolvers/quote.resolver';\nimport { RouterService } from './services/router.service';\nimport { RouteWithId } from './types/route.types';\n\nconst rootRoute: RouteWithId = {\n id: VELOCE_FLOW_ROOT_ROUTE,\n path: '',\n component: FlowComponent,\n canActivate: [RootGuard],\n canDeactivate: [RootGuard],\n children: [\n {\n path: 'flows',\n runGuardsAndResolvers: 'paramsOrQueryParamsChange',\n resolve: { quote: FlowResolver },\n canActivate: [ContextGuard],\n children: [],\n },\n {\n path: 'legacy',\n children: [\n {\n path: 'product',\n component: LegacyProductComponent,\n runGuardsAndResolvers: 'paramsOrQueryParamsChange',\n resolve: { context: ContextResolver, quote: QuoteResolver },\n canActivate: [ContextGuard],\n },\n ],\n },\n {\n path: 'product',\n component: ProductComponent,\n runGuardsAndResolvers: 'paramsOrQueryParamsChange',\n resolve: { context: ContextResolver, quote: QuoteResolver },\n canActivate: [ContextGuard],\n data: { showHeader: true },\n },\n {\n path: 'cart',\n component: ShoppingCartComponent,\n runGuardsAndResolvers: 'paramsOrQueryParamsChange',\n resolve: { context: ContextResolver, quote: QuoteResolver },\n canActivate: [ContextGuard],\n data: { showHeader: true },\n },\n {\n path: 'debug',\n loadChildren: () => DebugModule,\n },\n {\n path: '404',\n loadChildren: () => RecordNotFoundModule,\n },\n ],\n};\n\n@NgModule({\n imports: [RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule],\n exports: [RouterModule],\n providers: [RouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],\n})\nexport class FlowRoutingModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ApiModule } from '@veloce/api';\nimport { LoaderModule } from '@veloce/components';\nimport { LauncherModule } from '@veloce/sdk/cms';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { FlowHeaderModule } from './components/header/header.module';\nimport { FlowRoutingModule } from './flow-routing.module';\nimport { FlowComponent } from './flow.component';\nimport { FlowService } from './services';\n\n@NgModule({\n declarations: [FlowComponent],\n imports: [CommonModule, FlowRoutingModule, ApiModule, LauncherModule, LoaderModule, FlowHeaderModule],\n providers: [FlowService, ContextService],\n})\nexport class FlowModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map","routes","first","takeUntil","switchMap","tap","catchError"],"m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libs/sdk/src/constants.ts","../../../../libs/sdk/src/components/header/header.component.ts","../../../../libs/sdk/src/components/header/header.component.html","../../../../libs/sdk/src/components/header/header.module.ts","../../../../libs/sdk/src/services/router.service.ts","../../../../libs/sdk/src/flow.component.ts","../../../../libs/sdk/src/flow.component.html","../../../../libs/sdk/src/guards/context.guard.ts","../../../../libs/sdk/src/guards/root.guard.ts","../../../../libs/sdk/src/utils/flow.utils.ts","../../../../libs/sdk/src/services/flow.service.ts","../../../../libs/sdk/src/pages/debug/debug.component.ts","../../../../libs/sdk/src/pages/debug/debug.component.html","../../../../libs/sdk/src/pages/debug/debug.module.ts","../../../../libs/sdk/src/types/flow-customization.types.ts","../../../../libs/sdk/src/pages/legacy-product/legacy-product.component.ts","../../../../libs/sdk/src/pages/legacy-product/legacy-product.component.html","../../../../libs/sdk/src/pages/legacy-product/legacy-product.module.ts","../../../../libs/sdk/src/pages/product/product.component.ts","../../../../libs/sdk/src/pages/product/product.component.html","../../../../libs/sdk/src/pages/product/product.module.ts","../../../../libs/sdk/src/pages/record-not-found/record-not-found.component.ts","../../../../libs/sdk/src/pages/record-not-found/record-not-found.component.html","../../../../libs/sdk/src/pages/record-not-found/record-not-found.module.ts","../../../../libs/sdk/src/pages/shopping-cart/shopping-cart.component.ts","../../../../libs/sdk/src/pages/shopping-cart/shopping-cart.component.html","../../../../libs/sdk/src/pages/shopping-cart/product.module.ts","../../../../libs/sdk/src/resolvers/context.resolver.ts","../../../../libs/sdk/src/resolvers/flow.resolver.ts","../../../../libs/sdk/src/resolvers/quote.resolver.ts","../../../../libs/sdk/src/flow-routing.module.ts","../../../../libs/sdk/src/flow.module.ts","../../../../libs/sdk/veloce-sdk.ts"],"sourcesContent":["export const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';\n","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit } from '@angular/core';\nimport { SalesforceApiService } from '@veloce/api';\nimport { ConfigurationContextMode, ConfigurationContextProperties, SearchRequest, VlWindow } from '@veloce/core';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { BehaviorSubject, map, Observable, of, Subject, takeUntil } from 'rxjs';\nimport { HeaderObjectDetails } from './header.types';\n\ndeclare const window: VlWindow;\n\n@Component({\n selector: 'vl-flow-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlowHeaderComponent implements OnInit, OnDestroy {\n public objectName: string;\n public contextProperties: ConfigurationContextProperties;\n public objectDetails$ = new BehaviorSubject<HeaderObjectDetails>({});\n\n private mode?: ConfigurationContextMode;\n private destroyed$ = new Subject<void>();\n\n constructor(private context: ContextService, private sfApiService: SalesforceApiService) {\n const ctx = this.context.resolve();\n\n this.mode = ctx?.mode;\n this.objectName = ctx?.mode?.toLowerCase() ?? '';\n this.contextProperties = ctx?.properties ?? {};\n }\n\n ngOnInit() {\n this.populateObjectDetails();\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n public get isAccountMode() {\n return this.mode === ConfigurationContextMode.ACCOUNT;\n }\n\n public get isQuoteMode() {\n return this.mode === ConfigurationContextMode.QUOTE;\n }\n\n public back(): void {\n const objectId = this.context.resolve()?.headerId;\n\n if (objectId) {\n window.VELO_BACK_FN.apply(null, [objectId]);\n }\n }\n\n public getSalesforceObjectLink(objectId?: string): string {\n if (!objectId) {\n return '';\n }\n\n return `${window.location.origin}/${objectId}`;\n }\n\n private queryName$(objectName: string, id?: string): Observable<string> {\n if (!id) {\n return of('');\n }\n\n const searchRequest: SearchRequest = {\n count: 1,\n rawCondition: `Id = '${id}'`,\n fields: ['Name'],\n };\n\n return this.sfApiService.query<any>(searchRequest, objectName).pipe(\n map(result => result[0]?.Name ?? ''),\n takeUntil(this.destroyed$),\n );\n }\n\n private populateObjectDetails(): void {\n const accountId = this.isAccountMode ? this.contextProperties.Id : this.contextProperties.AccountId;\n const opportunityId = this.contextProperties.OpportunityId;\n const quoteId = this.isQuoteMode ? this.contextProperties.Id : undefined;\n const quoteName = this.isQuoteMode ? this.contextProperties.Name : undefined;\n\n this.objectDetails$.next({\n ...this.objectDetails$.value,\n accountId,\n opportunityId,\n quoteId,\n quoteName,\n });\n\n this.queryName$('Account', accountId).subscribe(accountName =>\n this.objectDetails$.next({\n ...this.objectDetails$.value,\n accountName,\n }),\n );\n this.queryName$('Opportunity', opportunityId).subscribe(opportunityName =>\n this.objectDetails$.next({\n ...this.objectDetails$.value,\n opportunityName,\n }),\n );\n }\n}\n","<nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\">&nbsp;To {{ objectName }}</span>\n</nav>\n\n<ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n Account name\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n</ng-container>\n\n<ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n Quote #{{ contextProperties.QuoteNumber }}\n <span class=\"dot-separator\"></span>\n <nav (click)=\"quoteDetails.toggle($event)\">\n {{ contextProperties.Status }}\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay left\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\" *vlLet=\"objectDetails$ | async as details\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">{{ details.accountName }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">{{ details.opportunityName }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">{{ details.quoteName }}</a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { LetDirectiveModule } from '@veloce/components';\nimport { OverlayPanelModule } from 'primeng/overlaypanel';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { FlowHeaderComponent } from './header.component';\n\n@NgModule({\n declarations: [FlowHeaderComponent],\n imports: [CommonModule, OverlayPanelModule, LetDirectiveModule, TooltipModule],\n exports: [FlowHeaderComponent],\n})\nexport class FlowHeaderModule {}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRoute,\n ActivatedRouteSnapshot,\n Event,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationStart,\n Params,\n Router,\n} from '@angular/router';\nimport { distinctUntilChanged, filter, map, Observable, shareReplay, startWith } from 'rxjs';\nimport { VELOCE_FLOW_ROOT_ROUTE } from '../constants';\nimport { RouteWithId } from '../types/route.types';\n\n@Injectable({ providedIn: 'root' })\nexport class RouterService {\n private routeChange$: Observable<Event>;\n private lastChildParams$: Observable<Params>;\n private lastChildRoute$: Observable<ActivatedRouteSnapshot>;\n\n public loading$: Observable<boolean>;\n\n constructor(private router: Router, private route: ActivatedRoute) {\n this.routeChange$ = this.router.events.pipe(\n filter(e => e instanceof NavigationEnd),\n shareReplay(),\n );\n\n this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(\n startWith(this.getLastChildParams(this.route.snapshot)),\n shareReplay(),\n );\n this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(\n startWith(this.getLastChildRouteSnapshot(this.route.snapshot)),\n shareReplay(),\n );\n\n this.loading$ = this.router.events.pipe(\n filter(\n e =>\n e instanceof NavigationStart ||\n e instanceof NavigationCancel ||\n e instanceof NavigationEnd ||\n e instanceof NavigationError,\n ),\n map(e => e instanceof NavigationStart),\n startWith(false),\n distinctUntilChanged(),\n );\n }\n\n getFlowRootRoute(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot | undefined {\n const path = [...route.pathFromRoot];\n\n while (path.length) {\n const parent = path.pop();\n\n if (!parent) {\n break;\n }\n\n if ((parent.routeConfig as RouteWithId)?.id === VELOCE_FLOW_ROOT_ROUTE) {\n return parent;\n }\n }\n\n return;\n }\n\n getFlowRootPath(route: ActivatedRouteSnapshot): string {\n const rootRoute = this.getFlowRootRoute(route);\n if (!rootRoute) {\n return '';\n }\n\n const path = rootRoute.pathFromRoot\n .map(r => r.routeConfig?.path)\n .filter(Boolean)\n .join('/');\n\n return '/' + path;\n }\n\n get route$(): Observable<ActivatedRouteSnapshot> {\n return this.lastChildRoute$;\n }\n\n get params$(): Observable<Params> {\n return this.lastChildParams$;\n }\n\n public getLastChildRoute = (route: ActivatedRoute): ActivatedRoute => {\n return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;\n };\n\n public getNthChildRoute = (route: ActivatedRoute, index: number): ActivatedRoute => {\n if (index <= 0) {\n return route;\n }\n\n return route.firstChild ? this.getNthChildRoute(route.firstChild, index - 1) : route;\n };\n\n public getLastChildRouteSnapshot = (route: ActivatedRouteSnapshot): ActivatedRouteSnapshot => {\n return route.firstChild ? this.getLastChildRouteSnapshot(route.firstChild) : route;\n };\n\n public watchLastChildRoute$ = (route: ActivatedRoute): Observable<ActivatedRouteSnapshot> => {\n return this.routeChange$.pipe(map(() => this.getLastChildRouteSnapshot(route.snapshot)));\n };\n\n public getLastChildParams = (route: ActivatedRouteSnapshot): Params => {\n return route.firstChild ? this.getLastChildParams(route.firstChild) : route.params;\n };\n\n public watchLastChildParams$ = (route: ActivatedRoute): Observable<Params> => {\n return this.routeChange$.pipe(map(() => this.getLastChildParams(route.snapshot)));\n };\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { map, Observable } from 'rxjs';\nimport { RouterService } from './services/router.service';\n\n@Component({\n selector: 'vl-flow',\n templateUrl: './flow.component.html',\n styleUrls: ['./flow.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlowComponent {\n public isLoading$: Observable<boolean>;\n public showHeader$: Observable<boolean>;\n\n constructor(private routerService: RouterService, private context: ContextService) {\n this.isLoading$ = this.routerService.loading$;\n\n this.showHeader$ = this.routerService.route$.pipe(\n map(route => {\n const showHeader = this.context.resolve()?.properties.standalone !== 'true';\n return route.data.showHeader && showHeader;\n }),\n );\n }\n}\n","<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router } from '@angular/router';\nimport { ConfigurationContextMode, VlWindow } from '@veloce/core';\nimport { Observable } from 'rxjs';\nimport { RouterService } from '../services/router.service';\nimport { ContextRouteData } from '../types/context-route.types';\n\ndeclare const window: VlWindow;\n\n@Injectable()\nexport class ContextGuard implements CanActivate, CanActivateChild {\n constructor(private router: Router, private routerService: RouterService) {}\n\n private getConfigurationContextMode(\n accountId: string,\n quoteId: string,\n orderId: string,\n rpcMessage: string,\n ): ConfigurationContextMode | undefined {\n if (accountId) {\n return ConfigurationContextMode.ACCOUNT;\n }\n\n if (quoteId) {\n return ConfigurationContextMode.QUOTE;\n }\n\n if (orderId) {\n return ConfigurationContextMode.ORDER;\n }\n\n if (rpcMessage) {\n return ConfigurationContextMode.REMOTE;\n }\n\n return;\n }\n\n checkActivation(route: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {\n const { queryParams } = route;\n const { accountId, quoteId, orderId } = queryParams;\n const rpcMessage = window['RPC_MESSAGE'];\n const rpcMessageId: string = rpcMessage && JSON.parse(rpcMessage)?.quote?.Id;\n\n const headerId = accountId || quoteId || orderId || rpcMessageId || 'empty-for-test-mode';\n const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);\n\n if (mode === void 0) {\n return this.reject(route, 'Mode is undefined');\n }\n\n const contextRouteData: ContextRouteData = {\n headerId,\n mode,\n };\n\n route.data = {\n ...route.data,\n ...contextRouteData,\n };\n\n return true;\n }\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {\n return this.checkActivation(route);\n }\n\n canActivateChild(childRoute: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {\n return this.checkActivation(childRoute);\n }\n\n private reject(route: ActivatedRouteSnapshot, message: string): boolean {\n const parentUrl = this.routerService.getFlowRootPath(route);\n this.router.navigate([parentUrl, '404'], {\n state: { message },\n });\n\n return false;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanDeactivate, Navigation, Router } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { RouterService } from '../services/router.service';\n\n@Injectable({ providedIn: 'root' })\nexport class RootGuard implements CanActivate, CanDeactivate<any> {\n private initialized = false;\n private navToRestore: Navigation | null = null;\n\n constructor(private router: Router, private routerService: RouterService) {}\n\n canActivate(route: ActivatedRouteSnapshot): Observable<boolean> | Promise<boolean> | boolean {\n // We always need to initialize root component first, and only then start checking guards/resolvers\n\n if (!this.initialized) {\n this.initialized = true;\n this.navToRestore = this.router.getCurrentNavigation();\n\n const rootUrl = this.routerService.getFlowRootPath(route);\n this.router.navigate([rootUrl], { replaceUrl: !this.navToRestore?.previousNavigation });\n } else if (this.navToRestore) {\n const nav = this.navToRestore;\n setTimeout(() => {\n this.router.navigateByUrl(nav.extractedUrl, nav.extras);\n\n this.navToRestore = null;\n });\n }\n\n return true;\n }\n\n canDeactivate() {\n this.initialized = false;\n return true;\n }\n}\n","export const getFlowObjectIdPropertyName = (objectName?: string) => {\n switch (objectName) {\n case 'Account':\n return 'accountId';\n case 'Order':\n return 'orderId';\n case 'Quote':\n default:\n return 'quoteId';\n }\n};\n","import { Injectable } from '@angular/core';\nimport { ConfigurationSettingsApiService } from '@veloce/api';\nimport { Flow } from '@veloce/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Injectable()\nexport class FlowService {\n private readonly flowsKey = 'flows';\n\n constructor(private configurationSettingsApiService: ConfigurationSettingsApiService) {}\n\n public getFlow(id: string): Observable<Flow | undefined> {\n return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)));\n }\n\n public fetchFlows(): Observable<Flow[]> {\n return this.configurationSettingsApiService\n .fetchSetting(this.flowsKey)\n .pipe(map(({ value }): Flow[] => (value ? JSON.parse(value) : [])));\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\nimport { FlowProperties } from '@veloce/core';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { map, Observable, shareReplay } from 'rxjs';\nimport { FlowService } from '../../services';\nimport { getFlowObjectIdPropertyName } from '../../utils';\n\ninterface FlowPropertiesExt extends FlowProperties {\n queryParamsStr: string;\n}\n\n@Component({\n selector: 'vl-flow-debug',\n templateUrl: './debug.component.html',\n styleUrls: ['./debug.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DebugComponent {\n public readonly objectNames = ['Account', 'Quote', 'Order'];\n public form = new FormGroup({\n id: new FormControl(''),\n name: new FormControl('Quote'),\n });\n\n public selectedFlow?: FlowPropertiesExt;\n public flows$: Observable<FlowPropertiesExt[]>;\n\n constructor(\n private flowService: FlowService,\n private router: Router,\n private activatedRoute: ActivatedRoute,\n private context: ContextService,\n ) {\n this.flows$ = this.flowService.fetchFlows().pipe(\n map(flows =>\n flows.map<FlowPropertiesExt>(flow => {\n const queryParams: Params = flow?.properties?.queryParams ?? {};\n return {\n id: flow.id,\n entryPath: flow?.properties?.entryPath,\n queryParams,\n queryParamsStr: JSON.stringify(queryParams),\n };\n }),\n ),\n shareReplay(),\n );\n }\n\n runFlow() {\n const { id, name } = this.form.value;\n const objectPropertyName = getFlowObjectIdPropertyName(name);\n\n if (!id || !this.selectedFlow) {\n return;\n }\n\n // Delete context before starting a new flow\n this.context.delete();\n\n this.router.navigate(['..', 'flows'], {\n queryParams: {\n flowId: this.selectedFlow.id,\n [objectPropertyName]: id,\n ...this.selectedFlow.queryParams,\n },\n relativeTo: this.activatedRoute,\n });\n }\n}\n","<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule, Routes } from '@angular/router';\nimport { ButtonModule } from 'primeng/button';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { RadioButtonModule } from 'primeng/radiobutton';\nimport { DebugComponent } from './debug.component';\n\nconst routes: Routes = [{ path: '', component: DebugComponent }];\n\n@NgModule({\n declarations: [DebugComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule.forChild(routes),\n RadioButtonModule,\n ButtonModule,\n InputTextModule,\n DropdownModule,\n ],\n})\nexport class DebugModule {}\n","import { InjectionToken } from '@angular/core';\nimport { TemplateComponentWithAttachments, UIDefinition as LegacyUIDefinition } from '@veloce/core';\nimport { UIDefinition } from '@veloce/sdk/cms';\nimport { Observable } from 'rxjs';\n\nexport const FLOW_CUSTOMIZATION = new InjectionToken<FlowCustomization>('FLOW_CUSTOMIZATION');\n\nexport interface FlowCustomization {\n getUiDefinition?(productId: string): Observable<UIDefinition | null>;\n getLegacyUiDefinition?(productId: string): Observable<LegacyUIDefinition | null>;\n getShoppingCartComponent?(): Observable<TemplateComponentWithAttachments | null>;\n}\n","import { Component, Inject, OnDestroy, OnInit, Optional } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { QuoteApiService } from '@veloce/api';\nimport { ConfigurationContext, EntityUtil, LineItem, QuoteDraft, VlWindow } from '@veloce/core';\nimport {\n ContextService,\n CurrentStateService,\n QuoteService,\n QuoteStates,\n RuntimeContext,\n RuntimeContextService,\n RuntimeOperation,\n RuntimeService,\n SolutionReadyAware,\n SolutionUpdatedAware,\n} from '@veloce/sdk/runtime';\nimport { Observable, of, Subject } from 'rxjs';\nimport { first, map, switchMap, take, takeUntil } from 'rxjs/operators';\nimport { FlowCustomization, FLOW_CUSTOMIZATION } from '../../types';\n\ndeclare const window: VlWindow;\n\n@Component({\n templateUrl: './legacy-product.component.html',\n styleUrls: ['./legacy-product.component.scss'],\n})\nexport class LegacyProductComponent implements OnInit, OnDestroy, SolutionUpdatedAware, SolutionReadyAware {\n private destroyed$ = new Subject<void>();\n\n private assets?: LineItem[];\n\n constructor(\n private route: ActivatedRoute,\n private quoteService: QuoteService,\n private quoteApiService: QuoteApiService,\n private contextService: ContextService,\n private runtimeContextService: RuntimeContextService,\n private runtimeService: RuntimeService,\n private currentStateService: CurrentStateService,\n @Optional() @Inject(FLOW_CUSTOMIZATION) private customizationService?: FlowCustomization,\n ) {}\n\n ngOnInit(): void {\n this.quoteService.quote$\n .pipe(first(), takeUntil(this.destroyed$))\n .subscribe(quote => this.init(quote, this.route.snapshot.queryParams));\n\n this.runtimeService.onSolutionStopEvent.pipe(take(1)).subscribe(lineItem => this.onSolutionStop(lineItem));\n\n this.runtimeService.onSolutionReadyEvent.pipe(take(1)).subscribe(event => this.onSolutionReady(event));\n\n this.runtimeService.onSolutionCancelEvent.pipe(take(1)).subscribe(() => this.onSolutionCancel());\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n onSolutionReady(lineItem: LineItem): void {\n lineItem.actionCode = lineItem.actionCode ?? 'ADD';\n }\n\n onSolutionCancel(): void {\n this.quoteService.quote$.pipe(first(), takeUntil(this.destroyed$)).subscribe(quote => {\n window['VELO_BACK_FN'].apply(null, [quote.quoteId]);\n });\n }\n\n onSolutionUpdated(lineItem: LineItem): void {\n const states: QuoteStates = {\n configurableRamp: lineItem,\n currentState: this.currentStateService.currentState,\n asset: this.getAsset(lineItem),\n };\n\n this.runtimeService.updateRuntime(states);\n }\n\n onSolutionStop(lineItem: LineItem): void {\n this.quoteService.quote$.pipe(first(), takeUntil(this.destroyed$)).subscribe(quote => {\n const quoteToUpsert: QuoteDraft = {\n ...quote,\n context: this.contextService.resolve() as ConfigurationContext,\n currentState: [...(this.currentStateService.currentState || []).filter(li => li.id !== lineItem.id), lineItem],\n };\n\n this.quoteApiService\n .upsertQuote(quoteToUpsert)\n .pipe(take(1))\n .subscribe(quote => {\n window['VELO_BACK_FN'].apply(null, [quote.quoteId]);\n });\n });\n }\n\n private init(quote: QuoteDraft, queryParams: Params): void {\n const productId = queryParams['productId'];\n const lineItemId = this.getLineItemId(quote, queryParams);\n this.assets = quote.initialState;\n\n lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);\n }\n\n private getLineItemId(quote: QuoteDraft, queryParams: Params): string | undefined {\n if (EntityUtil.isPresent(queryParams['lineItemId'])) {\n return queryParams['lineItemId'];\n }\n\n return quote.currentState\n .filter(lineItem => lineItem.productId === queryParams['productId'])\n .map(lineItem => lineItem.id)\n .find(id => id);\n }\n\n private configure(productId: string): void {\n const runtimeContext = this.getRuntimeContext(productId, '', RuntimeOperation.INIT);\n\n this.startRuntime({}, runtimeContext);\n }\n\n private reConfigure(lineItemId: string, currentState: LineItem[]): void {\n const currentStateItem = EntityUtil.findById(lineItemId, currentState);\n const runtimeContext = this.getRuntimeContext(\n currentStateItem.productId,\n currentStateItem.offeringId,\n RuntimeOperation.UPDATE,\n );\n\n const states: QuoteStates = {\n configurableRamp: currentStateItem,\n currentState,\n asset: this.getAsset(currentStateItem),\n };\n\n this.currentStateService.update(currentState);\n this.startRuntime(states, runtimeContext);\n }\n\n private getAsset(lineItem: LineItem): LineItem | undefined {\n return this.assets && this.assets.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);\n }\n\n private startRuntime(states: QuoteStates, runtimeContext$: Observable<RuntimeContext>): void {\n runtimeContext$\n .pipe(\n take(1),\n map(runtimeContext => {\n this.runtimeService.startRuntime(runtimeContext, states);\n }),\n )\n .subscribe();\n }\n\n private customizeContext(productId: string, context: RuntimeContext): Observable<RuntimeContext> {\n if (!this.customizationService?.getLegacyUiDefinition) {\n return of(context);\n }\n\n return this.customizationService.getLegacyUiDefinition(productId).pipe(\n map(uiDef => ({\n ...context,\n uiDefinition: uiDef ?? context.uiDefinition,\n })),\n );\n }\n\n private getRuntimeContext(\n productId: string,\n offeringId: string,\n runtimeOperation: RuntimeOperation,\n ): Observable<RuntimeContext> {\n return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(\n map(runtimeContext => {\n runtimeContext.invocationContext = { runtimeOperation: RuntimeOperation[runtimeOperation] };\n return runtimeContext;\n }),\n switchMap(runtimeContext => this.customizeContext(productId, runtimeContext)),\n );\n }\n}\n","<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RuntimeModule } from '@veloce/sdk/runtime';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { LegacyProductComponent } from './legacy-product.component';\n\n@NgModule({\n declarations: [LegacyProductComponent],\n imports: [CommonModule, RuntimeModule, TooltipModule.forRoot()],\n exports: [LegacyProductComponent],\n})\nexport class LegacyProductModule {}\n","import { ChangeDetectionStrategy, Component, Inject, OnDestroy, OnInit, Optional } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { EntityUtil, LineItem, QuoteDraft } from '@veloce/core';\nimport { ConfigurationRuntimeService, ConfigurationService, UIDefinition } from '@veloce/sdk/cms';\nimport { QuoteService } from '@veloce/sdk/runtime';\nimport { MessageService } from 'primeng/api';\nimport { BehaviorSubject, catchError, first, Observable, of, Subject, switchMap, takeUntil, tap } from 'rxjs';\nimport { FlowCustomization, FLOW_CUSTOMIZATION } from '../../types/flow-customization.types';\n\ninterface State {\n loading: boolean;\n failure: boolean;\n}\n\n@Component({\n selector: 'vl-flow-product',\n templateUrl: './product.component.html',\n styleUrls: ['./product.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ProductComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject<void>();\n\n public uiDefinition?: UIDefinition;\n public state$ = new BehaviorSubject<State>({ loading: true, failure: false });\n\n constructor(\n private runtimeService: ConfigurationRuntimeService,\n private conigurationService: ConfigurationService,\n private quoteService: QuoteService,\n private route: ActivatedRoute,\n private messageService: MessageService,\n @Optional() @Inject(FLOW_CUSTOMIZATION) private customizationService?: FlowCustomization,\n ) {}\n\n ngOnInit(): void {\n this.quoteService.quote$\n .pipe(first(), takeUntil(this.destroy$))\n .subscribe(quote => this.init(quote, this.route.snapshot.queryParams));\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private customize(productId: string): Observable<any> {\n if (!this.customizationService?.getUiDefinition) {\n return of(null);\n }\n\n return this.customizationService.getUiDefinition(productId).pipe(\n tap(uiDef => {\n if (uiDef) {\n this.uiDefinition = uiDef;\n this.runtimeService.uiDefinitionProperties = uiDef.properties ?? {};\n }\n }),\n );\n }\n\n private init(quote: QuoteDraft, queryParams: Params): void {\n const lineItemId = this.getLineItemId(quote, queryParams);\n const currentStateItem: LineItem | undefined = EntityUtil.findById(lineItemId, quote.currentState);\n const productId = currentStateItem?.productId ?? queryParams['productId'];\n const { offeringId } = currentStateItem ?? {};\n\n if (currentStateItem) {\n this.conigurationService.updateCurrentStates({\n configurableRamp: currentStateItem,\n currentState: quote.currentState,\n });\n }\n\n this.runtimeService\n .init({ productId, offeringId })\n .pipe(\n tap(context => (this.uiDefinition = context?.uiDefinition)),\n switchMap(() => this.customize(productId)),\n switchMap(() => this.conigurationService.configure()),\n tap(() => this.state$.next({ loading: false, failure: false })),\n catchError(error => {\n if (!this.uiDefinition?.properties?.suppressToastMessages) {\n this.messageService.add({ severity: 'error', summary: error });\n }\n\n this.state$.next({ loading: false, failure: true });\n return of();\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n private getLineItemId(quote: QuoteDraft, queryParams: Params): string | undefined {\n if (EntityUtil.isPresent(queryParams['lineItemId'])) {\n return queryParams['lineItemId'];\n }\n\n return quote.currentState\n .filter(lineItem => lineItem.productId === queryParams['productId'])\n .map(lineItem => lineItem.id)\n .find(id => id);\n }\n}\n","<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { LoaderModule } from '@veloce/components';\nimport { PreviewModule } from '@veloce/sdk/cms';\nimport { ProductComponent } from './product.component';\n\n@NgModule({\n declarations: [ProductComponent],\n imports: [CommonModule, PreviewModule, LoaderModule],\n exports: [ProductComponent],\n})\nexport class ProductModule {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\n@Component({\n selector: 'vl-flow-record-not-found',\n templateUrl: './record-not-found.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RecordNotFoundComponent {\n message: string;\n subMessage = '';\n\n constructor(private router: Router, private route: ActivatedRoute) {\n const navigation = this.router.getCurrentNavigation();\n const { state } = navigation?.extras || {};\n\n this.message = state?.message;\n if (typeof this.message === 'string') {\n this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';\n }\n }\n}\n","<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { RecordNotFoundComponent } from './record-not-found.component';\n\nconst routes: Routes = [{ path: '', component: RecordNotFoundComponent }];\n\n@NgModule({\n declarations: [RecordNotFoundComponent],\n imports: [CommonModule, RouterModule.forChild(routes)],\n})\nexport class RecordNotFoundModule {}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n OnDestroy,\n OnInit,\n Optional,\n} from '@angular/core';\nimport { UITemplatesApiService } from '@veloce/api';\nimport { ToastService, ToastType } from '@veloce/components';\nimport {\n ComponentAttachments,\n TemplateComponent,\n UITemplate,\n UITemplateComponentType,\n UITemplateType,\n} from '@veloce/core';\nimport { UIDefinition } from '@veloce/sdk/cms';\nimport { BehaviorSubject, catchError, map, Observable, of, Subject, switchMap, takeUntil, tap } from 'rxjs';\nimport { FlowCustomization, FLOW_CUSTOMIZATION } from '../../types';\n\ninterface State {\n loading: boolean;\n failure: boolean;\n}\n\n@Component({\n selector: 'vl-flow-shopping-cart',\n templateUrl: './shopping-cart.component.html',\n styleUrls: ['./shopping-cart.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ShoppingCartComponent implements OnInit, OnDestroy {\n public uiDefinition?: UIDefinition = undefined;\n public state$ = new BehaviorSubject<State>({ loading: true, failure: false });\n\n private destroyed$ = new Subject<void>();\n\n constructor(\n private templatesApi: UITemplatesApiService,\n private cdr: ChangeDetectorRef,\n private toastService: ToastService,\n @Optional() @Inject(FLOW_CUSTOMIZATION) private customizationService?: FlowCustomization,\n ) {}\n\n ngOnInit(): void {\n this.generateUIDefinition$()\n .pipe(\n tap(uiDef => {\n if (!uiDef) {\n throw 'Not found';\n }\n\n this.uiDefinition = uiDef;\n this.state$.next({ loading: false, failure: false });\n }),\n catchError(err => {\n this.uiDefinition = undefined;\n this.toastService.add({ severity: ToastType.error, summary: 'Failed to resolve Shopping Cart component' });\n this.state$.next({ loading: false, failure: true });\n throw err;\n }),\n takeUntil(this.destroyed$),\n )\n .subscribe(() => this.cdr.detectChanges());\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n private getTemplateRootComponent$(template: UITemplate): Observable<TemplateComponent | undefined> {\n return this.templatesApi\n .fetchComponents$(template.id)\n .pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));\n }\n\n private getShoppingCartComponentMeta$() {\n if (this.customizationService?.getShoppingCartComponent) {\n return this.customizationService?.getShoppingCartComponent().pipe(\n map(\n component =>\n <ComponentAttachments>{\n html: component?.html,\n css: component?.css,\n js: component?.js,\n json: component?.json,\n },\n ),\n );\n }\n\n return this.templatesApi.fetchTemplates$().pipe(\n map<UITemplate[], UITemplate | undefined>(\n templates => templates.filter(template => template.type === UITemplateType.SHOPPING_CART).reverse()[0],\n ),\n switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))),\n switchMap(component =>\n component ? this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : of(undefined),\n ),\n );\n }\n\n private generateUIDefinition$(): Observable<UIDefinition | undefined> {\n return this.getShoppingCartComponentMeta$().pipe(\n map(meta => {\n if (!meta) {\n return;\n }\n\n const uiDef: UIDefinition = {\n name: '',\n createdTimestamp: 0,\n primary: true,\n type: 'DEFAULT',\n version: 2,\n children: [\n {\n children: [],\n template: meta.html && btoa(meta.html),\n script: meta.js && btoa(meta.js),\n styles: meta.css && btoa(meta.css),\n },\n ],\n };\n\n return uiDef;\n }),\n );\n }\n}\n","<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { LoaderModule } from '@veloce/components';\nimport { PreviewModule } from '@veloce/sdk/cms';\nimport { ShoppingCartComponent } from './shopping-cart.component';\n\n@NgModule({\n declarations: [ShoppingCartComponent],\n imports: [CommonModule, PreviewModule, LoaderModule],\n exports: [ShoppingCartComponent],\n})\nexport class ShoppingCartModule {}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';\nimport { ConfigurationContext } from '@veloce/core';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { from, Observable, of } from 'rxjs';\nimport { catchError, tap } from 'rxjs/operators';\nimport { RouterService } from '../services/router.service';\n\n@Injectable()\nexport class ContextResolver implements Resolve<ConfigurationContext | null> {\n constructor(private contextService: ContextService, private router: Router, private routerService: RouterService) {}\n\n private handleError(route: ActivatedRouteSnapshot, message: string): Observable<boolean> {\n this.contextService.delete();\n const parentUrl = this.routerService.getFlowRootPath(route);\n return from(this.router.navigate([parentUrl, '404'], { state: { message } }));\n }\n\n resolve(route: ActivatedRouteSnapshot): Observable<ConfigurationContext | null> {\n const { queryParams, data } = route;\n const { uiDefinitionId } = queryParams;\n const { headerId, mode } = data ?? {};\n const currentContext = this.contextService.resolve();\n\n if (headerId && currentContext?.headerId === headerId) {\n return of(currentContext);\n }\n\n return this.contextService.create(headerId, mode).pipe(\n tap((context: ConfigurationContext) => {\n this.contextService.update({\n ...context,\n uiDefinitionId,\n properties: {\n ...currentContext?.properties,\n ...context.properties,\n ...(queryParams ?? {}),\n },\n });\n }),\n catchError(e => {\n const message = e instanceof HttpErrorResponse ? e.error.message : e;\n this.handleError(route, message);\n return of(null);\n }),\n );\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';\nimport { FlowQueryParams } from '@veloce/core';\nimport { Dictionary } from 'lodash';\nimport { map } from 'rxjs/operators';\nimport { FlowService } from '../services/flow.service';\nimport { RouterService } from '../services/router.service';\n\n@Injectable()\nexport class FlowResolver implements Resolve<Promise<boolean>> {\n constructor(private router: Router, private flowService: FlowService, private routerService: RouterService) {}\n\n private handleError(\n route: ActivatedRouteSnapshot,\n message?: string,\n queryParams?: Dictionary<any>,\n ): Promise<boolean> {\n const parentUrl = this.routerService.getFlowRootPath(route);\n return this.router.navigate([parentUrl, '404'], {\n queryParams,\n state: {\n message: message,\n },\n });\n }\n\n resolve(route: ActivatedRouteSnapshot) {\n const { queryParams } = route;\n const { flowId } = queryParams;\n\n if (!flowId) {\n return this.handleError(route);\n }\n\n return this.flowService.getFlow(flowId).pipe(\n map(flow => {\n if (!flow) {\n return this.handleError(route, `Flow with flowId=${flowId} is not defined`);\n }\n\n const { properties } = flow;\n const { queryParams: flowQueryParams, entryPath } = properties;\n const isProductFlow = entryPath.includes('/product');\n const mergedParams = {\n ...queryParams,\n ...flowQueryParams,\n ...(<FlowQueryParams>{\n ...(isProductFlow && { standalone: true }),\n }),\n };\n\n const parentUrl = this.routerService.getFlowRootPath(route);\n const entryUrl = String(entryPath ?? '')\n .split('/')\n .filter(Boolean);\n\n return this.router\n .navigate([parentUrl, ...entryUrl], {\n queryParams: mergedParams,\n replaceUrl: true,\n })\n .catch(e => {\n const message = e instanceof HttpErrorResponse ? e.error.message : e;\n return this.handleError(route, message, mergedParams);\n });\n }),\n );\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';\nimport { QuoteService } from '@veloce/sdk/runtime';\nimport { catchError, from, Observable, of } from 'rxjs';\nimport { RouterService } from '../services/router.service';\n\n@Injectable()\nexport class QuoteResolver implements Resolve<void | boolean> {\n constructor(private router: Router, private quoteService: QuoteService, private routerService: RouterService) {}\n\n private handleError(route: ActivatedRouteSnapshot, message: string): Observable<boolean> {\n const parentUrl = this.routerService.getFlowRootPath(route);\n return from(this.router.navigate([parentUrl, '404'], { state: { message } }));\n }\n\n resolve(route: ActivatedRouteSnapshot): Observable<void | boolean> {\n const { headerId } = route.data;\n const quote = this.quoteService.getQuote();\n\n if (quote && quote.quoteId === headerId) {\n return of(true);\n }\n\n const { queryParams } = route;\n return this.quoteService.init(headerId, queryParams).pipe(\n catchError(e => {\n const message = e instanceof HttpErrorResponse ? e.error.message : e;\n return this.handleError(route, message);\n }),\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { VELOCE_FLOW_ROOT_ROUTE } from './constants';\nimport { FlowComponent } from './flow.component';\nimport { ContextGuard } from './guards/context.guard';\nimport { RootGuard } from './guards/root.guard';\nimport { DebugModule } from './pages/debug/debug.module';\nimport { LegacyProductComponent } from './pages/legacy-product/legacy-product.component';\nimport { LegacyProductModule } from './pages/legacy-product/legacy-product.module';\nimport { ProductComponent } from './pages/product/product.component';\nimport { ProductModule } from './pages/product/product.module';\nimport { RecordNotFoundModule } from './pages/record-not-found/record-not-found.module';\nimport { ShoppingCartModule } from './pages/shopping-cart/product.module';\nimport { ShoppingCartComponent } from './pages/shopping-cart/shopping-cart.component';\nimport { ContextResolver } from './resolvers/context.resolver';\nimport { FlowResolver } from './resolvers/flow.resolver';\nimport { QuoteResolver } from './resolvers/quote.resolver';\nimport { RouterService } from './services/router.service';\nimport { RouteWithId } from './types/route.types';\n\nconst rootRoute: RouteWithId = {\n id: VELOCE_FLOW_ROOT_ROUTE,\n path: '',\n component: FlowComponent,\n canActivate: [RootGuard],\n canDeactivate: [RootGuard],\n children: [\n {\n path: 'flows',\n runGuardsAndResolvers: 'paramsOrQueryParamsChange',\n resolve: { quote: FlowResolver },\n canActivate: [ContextGuard],\n children: [],\n },\n {\n path: 'legacy',\n children: [\n {\n path: 'product',\n component: LegacyProductComponent,\n runGuardsAndResolvers: 'paramsOrQueryParamsChange',\n resolve: { context: ContextResolver, quote: QuoteResolver },\n canActivate: [ContextGuard],\n },\n ],\n },\n {\n path: 'product',\n component: ProductComponent,\n runGuardsAndResolvers: 'paramsOrQueryParamsChange',\n resolve: { context: ContextResolver, quote: QuoteResolver },\n canActivate: [ContextGuard],\n data: { showHeader: true },\n },\n {\n path: 'cart',\n component: ShoppingCartComponent,\n runGuardsAndResolvers: 'paramsOrQueryParamsChange',\n resolve: { context: ContextResolver, quote: QuoteResolver },\n canActivate: [ContextGuard],\n data: { showHeader: true },\n },\n {\n path: 'debug',\n loadChildren: () => DebugModule,\n },\n {\n path: '404',\n loadChildren: () => RecordNotFoundModule,\n },\n ],\n};\n\n@NgModule({\n imports: [RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule],\n exports: [RouterModule],\n providers: [RouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],\n})\nexport class FlowRoutingModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ApiModule } from '@veloce/api';\nimport { LoaderModule } from '@veloce/components';\nimport { LauncherModule } from '@veloce/sdk/cms';\nimport { ContextService } from '@veloce/sdk/runtime';\nimport { FlowHeaderModule } from './components/header/header.module';\nimport { FlowRoutingModule } from './flow-routing.module';\nimport { FlowComponent } from './flow.component';\nimport { FlowService } from './services';\n\n@NgModule({\n declarations: [FlowComponent],\n imports: [CommonModule, FlowRoutingModule, ApiModule, LauncherModule, LoaderModule, FlowHeaderModule],\n providers: [FlowService, ContextService],\n})\nexport class FlowModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map","routes","takeUntil","TooltipModule","first","switchMap","tap","catchError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAa,sBAAsB,GAAG;;MCezB,mBAAmB;IAQ9B,YAAoB,OAAuB,EAAU,YAAkC;;QAAnE,YAAO,GAAP,OAAO,CAAgB;QAAU,iBAAY,GAAZ,YAAY,CAAsB;QALhF,mBAAc,GAAG,IAAI,eAAe,CAAsB,EAAE,CAAC,CAAC;QAG7D,eAAU,GAAG,IAAI,OAAO,EAAQ,CAAC;QAGvC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAEnC,IAAI,CAAC,IAAI,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAC;QACtB,IAAI,CAAC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B,CAAC,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,CAAC;4FAG1F,UAAU;kBALtB,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,aAAa,CAAC;oBAC7B,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,CAAC;oBACrG,SAAS,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC;iBACzC;;;ACfD;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloceapps/sdk",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^12.2.0",
6
6
  "@angular/common": "^12.2.0",
@@ -1,5 +1,27 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { SalesforceApiService } from '@veloce/api';
3
+ import { ConfigurationContextProperties } from '@veloce/core';
4
+ import { ContextService } from '@veloce/sdk/runtime';
5
+ import { BehaviorSubject } from 'rxjs';
6
+ import { HeaderObjectDetails } from './header.types';
1
7
  import * as i0 from "@angular/core";
2
- export declare class FlowHeaderComponent {
8
+ export declare class FlowHeaderComponent implements OnInit, OnDestroy {
9
+ private context;
10
+ private sfApiService;
11
+ objectName: string;
12
+ contextProperties: ConfigurationContextProperties;
13
+ objectDetails$: BehaviorSubject<HeaderObjectDetails>;
14
+ private mode?;
15
+ private destroyed$;
16
+ constructor(context: ContextService, sfApiService: SalesforceApiService);
17
+ ngOnInit(): void;
18
+ ngOnDestroy(): void;
19
+ get isAccountMode(): boolean;
20
+ get isQuoteMode(): boolean;
21
+ back(): void;
22
+ getSalesforceObjectLink(objectId?: string): string;
23
+ private queryName$;
24
+ private populateObjectDetails;
3
25
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowHeaderComponent, never>;
4
26
  static ɵcmp: i0.ɵɵComponentDeclaration<FlowHeaderComponent, "vl-flow-header", never, {}, {}, never, never>;
5
27
  }
@@ -1,8 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./header.component";
3
3
  import * as i2 from "@angular/common";
4
+ import * as i3 from "primeng/overlaypanel";
5
+ import * as i4 from "@veloce/components";
6
+ import * as i5 from "primeng/tooltip";
4
7
  export declare class FlowHeaderModule {
5
8
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowHeaderModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<FlowHeaderModule, [typeof i1.FlowHeaderComponent], [typeof i2.CommonModule], [typeof i1.FlowHeaderComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FlowHeaderModule, [typeof i1.FlowHeaderComponent], [typeof i2.CommonModule, typeof i3.OverlayPanelModule, typeof i4.LetDirectiveModule, typeof i5.TooltipModule], [typeof i1.FlowHeaderComponent]>;
7
10
  static ɵinj: i0.ɵɵInjectorDeclaration<FlowHeaderModule>;
8
11
  }
@@ -0,0 +1,8 @@
1
+ export interface HeaderObjectDetails {
2
+ accountId?: string;
3
+ accountName?: string;
4
+ opportunityId?: string;
5
+ opportunityName?: string;
6
+ quoteId?: string;
7
+ quoteName?: string;
8
+ }
package/src/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from './flow.module';
3
3
  export * from './guards';
4
4
  export * from './services';
5
5
  export * from './types';
6
+ export * from './utils';
@@ -13,6 +13,7 @@ export declare class DebugComponent {
13
13
  private router;
14
14
  private activatedRoute;
15
15
  private context;
16
+ readonly objectNames: string[];
16
17
  form: FormGroup;
17
18
  selectedFlow?: FlowPropertiesExt;
18
19
  flows$: Observable<FlowPropertiesExt[]>;
@@ -6,8 +6,9 @@ import * as i4 from "@angular/router";
6
6
  import * as i5 from "primeng/radiobutton";
7
7
  import * as i6 from "primeng/button";
8
8
  import * as i7 from "primeng/inputtext";
9
+ import * as i8 from "primeng/dropdown";
9
10
  export declare class DebugModule {
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DebugModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<DebugModule, [typeof i1.DebugComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.RouterModule, typeof i5.RadioButtonModule, typeof i6.ButtonModule, typeof i7.InputTextModule], never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DebugModule, [typeof i1.DebugComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.RouterModule, typeof i5.RadioButtonModule, typeof i6.ButtonModule, typeof i7.InputTextModule, typeof i8.DropdownModule], never>;
12
13
  static ɵinj: i0.ɵɵInjectorDeclaration<DebugModule>;
13
14
  }
@@ -1,4 +1,9 @@
1
1
  import { Route } from '@angular/router';
2
+ export interface FlowObjectIdProperties {
3
+ accountId?: string;
4
+ quoteId?: string;
5
+ orderId?: string;
6
+ }
2
7
  export interface RouteWithId extends Route {
3
8
  id?: string;
4
9
  }
@@ -0,0 +1 @@
1
+ export declare const getFlowObjectIdPropertyName: (objectName?: string | undefined) => "accountId" | "orderId" | "quoteId";
@@ -0,0 +1 @@
1
+ export * from './flow.utils';