@veloceapps/sdk 3.1.25 → 3.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/veloce-sdk-core.umd.js +0 -2
- package/bundles/veloce-sdk-core.umd.js.map +1 -1
- package/bundles/veloce-sdk.umd.js +18 -9
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/core/services/quote-draft.service.d.ts +1 -1
- package/esm2015/core/services/quote-draft.service.js +1 -3
- package/esm2015/src/components/doc-gen/doc-gen.component.js +3 -3
- package/esm2015/src/components/header/cart-overlay/cart-preview.component.js +2 -2
- package/esm2015/src/components/header/header.component.js +15 -8
- package/esm2015/src/components/header/header.types.js +1 -1
- package/esm2015/src/resolvers/quote.resolver.js +3 -3
- package/fesm2015/veloce-sdk-core.js +0 -2
- package/fesm2015/veloce-sdk-core.js.map +1 -1
- package/fesm2015/veloce-sdk.js +17 -10
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/components/header/header.component.d.ts +3 -0
- package/src/components/header/header.types.d.ts +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"veloce-sdk-core.js","sources":["../../../../libs/sdk/core/modules/configuration/helpers.ts","../../../../libs/sdk/core/types/runtime.types.ts","../../../../libs/sdk/core/services/context.service.ts","../../../../libs/sdk/core/services/product-images.service.ts","../../../../libs/sdk/core/services/quote-draft.service.ts","../../../../libs/sdk/core/modules/configuration/services/runtime-context.service.ts","../../../../libs/sdk/core/modules/configuration/services/configuration-runtime.service.ts","../../../../libs/sdk/core/utils/line-item.utils.ts","../../../../libs/sdk/core/utils/line-item.worker.ts","../../../../libs/sdk/core/modules/configuration/services/configuration.service.ts","../../../../libs/sdk/core/modules/flow-configuration/services/flow-update.service.ts","../../../../libs/sdk/core/modules/flow-configuration/services/flow-configuration.service.ts","../../../../libs/sdk/core/modules/flow-configuration/flow-configuration.module.ts","../../../../libs/sdk/core/modules/configuration/configuration.module.ts","../../../../libs/sdk/core/core.module.ts","../../../../libs/sdk/core/veloce-sdk-core.ts"],"sourcesContent":["import { LineItem, UUID } from '@veloce/core';\nimport { RuntimeContext, UIDefinitionProps } from '../../types';\n\nexport const getDefaultLineItem = (\n context: RuntimeContext,\n uiDefinitionProperties: UIDefinitionProps,\n qty = 1,\n): LineItem => {\n const id = UUID.UUID();\n\n const lineItem: LineItem = {\n id,\n type: uiDefinitionProperties.rootType ?? '',\n cfgStatus: 'Default',\n actionCode: 'ADD',\n qty,\n productName: context.properties?.displayName || context.productName,\n productId: context.productId ?? '',\n ...(context.offeringId\n ? { offeringId: context.offeringId, offeringInstanceId: context.offeringInstanceId || id }\n : {}),\n } as LineItem;\n\n return lineItem;\n};\n","import { ContextProperties, RuntimeModel } from '@veloce/core';\nimport { UIDefinition } from './ui-definition.types';\n\nexport enum RuntimeMode {\n TEST,\n PROD,\n}\n\nexport enum RuntimeOperation {\n INIT = 'INIT',\n UPDATE = 'UPDATE',\n}\n\nexport enum RuntimeStep {\n START = 'START',\n UPDATE = 'UPDATE',\n}\n\nexport interface InvocationContext {\n runtimeOperation?: RuntimeOperation;\n runtimeStep?: RuntimeStep;\n}\n\nexport interface RuntimeContext {\n modelId: string;\n runtimeMode: RuntimeMode;\n runtimeModel: RuntimeModel;\n uiDefinition?: UIDefinition;\n productId?: string;\n productName?: string;\n productType?: string;\n properties?: ContextProperties;\n offeringId?: string;\n offeringInstanceId?: string;\n invocationContext?: InvocationContext;\n}\n","import { Injectable } from '@angular/core';\nimport { ContextApiService } from '@veloce/api';\nimport { ConfigurationContext, ConfigurationContextMode } from '@veloce/core';\nimport { merge } from 'lodash';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { filter, map, tap } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class ContextService {\n private context = new BehaviorSubject<ConfigurationContext | null>(null);\n\n constructor(private contextApiService: ContextApiService) {}\n\n get isInitialized(): boolean {\n return Boolean(this.context.value);\n }\n\n resolve(): ConfigurationContext {\n if (!this.context.value) {\n throw new Error('Context is not initialized yet!');\n }\n\n return { ...this.context.value };\n }\n\n resolve$(): Observable<ConfigurationContext> {\n return this.context.pipe(filter((ctx): ctx is ConfigurationContext => Boolean(ctx)));\n }\n\n create(headerId: string, mode: ConfigurationContextMode): Observable<ConfigurationContext> {\n return this.contextApiService.getContext(headerId, mode).pipe(\n tap(context => this.context.next(merge(new ConfigurationContext(headerId, mode), context))),\n map(() => this.resolve() as ConfigurationContext),\n );\n }\n\n public update(partialContext: Partial<ConfigurationContext>): ConfigurationContext {\n const originalContext = this.resolve();\n\n const updatedContext: ConfigurationContext = {\n ...originalContext,\n ...(partialContext as ConfigurationContext),\n properties: {\n ...originalContext.properties,\n ...partialContext.properties,\n },\n };\n\n this.context.next(updatedContext);\n\n return updatedContext;\n }\n\n public delete(): void {\n this.context.next(null);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ProductApiService } from '@veloce/api';\nimport { Dictionary } from 'lodash';\nimport { BehaviorSubject, catchError, distinctUntilChanged, map, Observable, of, tap } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class ProductImagesService {\n private imagesMap$ = new BehaviorSubject<Dictionary<string>>({});\n\n constructor(private productApiService: ProductApiService) {}\n\n public getImageUrl$(productId: string): Observable<string | null> {\n if (this.imagesMap$.value[productId] == null) {\n this.imagesMap$.next({ ...this.imagesMap$.value, [productId]: '' });\n this.fetchProductImage(productId);\n }\n\n return this.imagesMap$.pipe(\n map(imagesMap => imagesMap[productId]),\n distinctUntilChanged(),\n );\n }\n\n private fetchProductImage(productId: string): void {\n this.productApiService\n .fetchImage$(productId)\n .pipe(\n map(file => URL.createObjectURL(file)),\n catchError(() => of('')),\n tap(url => this.imagesMap$.next({ ...this.imagesMap$.value, [productId]: url })),\n )\n .subscribe();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { PriceApiService, QuoteApiService } from '@veloce/api';\nimport { ConfigurationContextMode, LineItem, PriceList, PriceSummary, QuoteDraft } from '@veloce/core';\nimport { Dictionary } from 'lodash';\nimport { BehaviorSubject, combineLatest, noop, Observable, zip } from 'rxjs';\nimport { filter, map, shareReplay, take, tap } from 'rxjs/operators';\nimport { ContextService } from './context.service';\n\n@Injectable({ providedIn: 'root' })\nexport class QuoteDraftService {\n private quoteSubj$ = new BehaviorSubject<QuoteDraft | null>(null);\n private resetSubj$ = new BehaviorSubject(true);\n private isInitialized = false;\n\n public allPriceLists: PriceList[] = [];\n public assetPriceLists: PriceList[] = [];\n public hasUnsavedChanges = false;\n public reset$ = this.resetSubj$.asObservable();\n public activePriceList$: Observable<PriceList | null>;\n\n constructor(\n private context: ContextService,\n private quoteApiService: QuoteApiService,\n private priceApiService: PriceApiService,\n ) {\n this.activePriceList$ = this.context.resolve$().pipe(\n map(ctx => this.allPriceLists.find(priceList => priceList.id === ctx.properties.PriceListId)),\n map(priceList => priceList ?? null),\n );\n }\n\n public reset() {\n this.resetSubj$.next(true);\n this.quoteSubj$.next(null);\n }\n\n public init(quoteId: string, params: Dictionary<string>): Observable<void> {\n return zip(\n this.context.resolve$(),\n this.quoteApiService.getQuoteDraft(quoteId, params),\n this.priceApiService.getPriceLists(),\n ).pipe(\n tap(([context, quote, allPriceLists]) => {\n this.allPriceLists = allPriceLists;\n this.quoteSubj$.next(quote);\n\n this.context.update({\n ...context,\n ...quote.context,\n properties: {\n ...context.properties,\n ...quote.context.properties,\n },\n });\n }),\n tap(() => {\n this.populateActivePriceLists$();\n this.isInitialized = true;\n }),\n map(() => noop()),\n take(1),\n );\n }\n\n public setCurrentLineItemState(lineItems: LineItem[]): void {\n const quoteDraft = this.quoteSubj$.value;\n\n if (!quoteDraft) {\n return;\n }\n\n this.quoteSubj$.next({\n ...quoteDraft,\n currentState: lineItems,\n });\n\n this.markAsUpdated();\n }\n\n public updateQuoteDraft(update: Partial<QuoteDraft>): void {\n const quoteDraft = this.quoteSubj$.value;\n\n if (!quoteDraft) {\n return;\n }\n\n if (update.context) {\n this.context.update(update.context);\n }\n\n this.quoteSubj$.next({\n ...quoteDraft,\n ...update,\n });\n }\n\n public updateByPriceSummary(priceSummary: PriceSummary): void {\n const quoteDraft = this.quoteSubj$.value;\n\n if (!quoteDraft) {\n return;\n }\n\n const updatedCurrentState = this.currentState.map(lineItem => {\n const updated = priceSummary.lineItems.find(li => li.id === lineItem.id);\n return updated ?? lineItem;\n });\n\n this.quoteSubj$.next({\n ...quoteDraft,\n currentState: updatedCurrentState,\n totalPrices: priceSummary.totalPrices,\n approvalItems: priceSummary.approvalItems,\n });\n\n this.markAsUpdated();\n }\n\n get quoteDraft$(): Observable<QuoteDraft> {\n return combineLatest([this.quoteSubj$, this.context.resolve$()]).pipe(\n map(() => this.quoteDraft),\n filter((quote): quote is QuoteDraft => Boolean(quote)),\n shareReplay(),\n );\n }\n\n get quoteDraft(): QuoteDraft | null {\n const quote = this.quoteSubj$.value;\n\n if (!quote) {\n return null;\n }\n\n return {\n ...quote,\n context: this.context.resolve(),\n };\n }\n\n get currentState$(): Observable<LineItem[]> {\n return this.quoteDraft$.pipe(map(quote => quote.currentState));\n }\n\n get currentState(): LineItem[] {\n return this.quoteDraft?.currentState ?? [];\n }\n\n /**\n * Stream of activeCurrentState\n */\n get activeCurrentState$(): Observable<LineItem[]> {\n return this.quoteDraft$.pipe(map(() => this.activeCurrentState));\n }\n\n /**\n * activeCurrentState is currentState passed through additional filters\n */\n get activeCurrentState(): LineItem[] {\n const ctx = this.context.resolve();\n let currentState = this.quoteDraft?.currentState ?? [];\n\n if (ctx.mode === ConfigurationContextMode.ACCOUNT) {\n currentState = this.filterByActivePriceList(currentState);\n }\n\n return currentState;\n }\n\n /**\n * Stream of activeInitialState\n */\n get activeInitialState$(): Observable<LineItem[]> {\n return this.quoteDraft$.pipe(map(() => this.activeInitialState));\n }\n\n /**\n * activeInitialState is initialState passed through additional filters\n */\n get activeInitialState(): LineItem[] {\n const ctx = this.context.resolve();\n let initialState = this.quoteDraft?.initialState ?? [];\n\n if (ctx.mode === ConfigurationContextMode.ACCOUNT) {\n initialState = this.filterByActivePriceList(initialState);\n }\n\n return initialState;\n }\n\n get isStandalone() {\n return this.context.resolve().properties.standalone === 'true';\n }\n\n public isEditMode$(): Observable<boolean> {\n return this.context.resolve$().pipe(map(() => this.isEditMode()));\n }\n\n public isEditMode(): boolean {\n const context = this.context.resolve();\n\n if (context.mode === ConfigurationContextMode.ACCOUNT) {\n return true;\n }\n\n if (context.mode === ConfigurationContextMode.QUOTE) {\n return context.properties.Status === 'Draft';\n }\n\n return false;\n }\n\n public updateActivePriceList(priceListId: string): void {\n this.context.update({ properties: { PriceListId: priceListId } });\n }\n\n private populateActivePriceLists$(): void {\n const ctx = this.context.resolve();\n const quoteDraft = this.quoteDraft;\n\n if (!quoteDraft) {\n return;\n }\n\n // In ACCOUNT mode populate price lists from related assets\n if (ctx.mode === ConfigurationContextMode.ACCOUNT) {\n // Populate list of price lists\n this.assetPriceLists = quoteDraft.currentState\n .map(({ priceListId }) => priceListId)\n .reduce<PriceList[]>((trunk, priceListId) => {\n if (!priceListId || trunk.some(item => item.id === priceListId)) {\n return trunk;\n }\n\n return [\n ...trunk,\n { id: priceListId, name: this.allPriceLists.find(item => item.id === priceListId)?.name ?? '' },\n ];\n }, []);\n\n const activePriceList = this.assetPriceLists[0];\n\n this.updateActivePriceList(activePriceList?.id);\n\n // Update PriceListId in context properties\n // TODO: remove it when backend will have such logic\n this.context.update({ properties: { PriceListId: activePriceList.id } });\n }\n }\n\n private filterByActivePriceList(lineItems: LineItem[]): LineItem[] {\n const ctx = this.context.resolve();\n\n return lineItems.filter(li => !li.priceListId || li.priceListId === ctx.properties.PriceListId);\n }\n\n private markAsUpdated(): void {\n if (this.isInitialized && !this.hasUnsavedChanges) {\n this.hasUnsavedChanges = true;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigurationApiService } from '@veloce/api';\nimport { RuntimeData, RuntimeModel, UIDefinition as LegacyUiDefinition } from '@veloce/core';\nimport { MessageService } from 'primeng/api';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { RuntimeContext, RuntimeMode, UIDefinition } from '../../../types';\n\n@Injectable()\nexport class RuntimeContextService {\n constructor(private configurationApiService: ConfigurationApiService, private messageService: MessageService) {}\n\n getRuntimeContext(productId: string, offeringId?: string): Observable<RuntimeContext> {\n return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(\n map(runtimeData => {\n const uiDefinition = this.getUIDefinition(runtimeData);\n const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);\n const { productName, properties } =\n Array.from(runtimeModel.components.values()).find(c => c.productId === productId) ?? {};\n\n return {\n modelId: runtimeData.modelId,\n uiDefinition: uiDefinition,\n runtimeModel: runtimeModel,\n runtimeMode: RuntimeMode.PROD,\n productId: productId,\n productType: properties?.displayName || productName,\n offeringId: offeringId,\n properties: {\n PricingEnabled: uiDefinition?.properties?.pricingEnabled ? 'true' : 'false',\n PriceListId: uiDefinition?.properties?.priceList,\n },\n };\n }),\n );\n }\n\n private getUIDefinition(runtimeData: RuntimeData): UIDefinition | undefined {\n let rawUiDefinitions: Array<UIDefinition | LegacyUiDefinition>;\n try {\n rawUiDefinitions = JSON.parse(runtimeData.uiDefinitionsSource);\n } catch (e) {\n return;\n }\n\n const uiDefinitions = rawUiDefinitions.filter(uiDef => (uiDef as UIDefinition).version) as UIDefinition[];\n const uiDefinition = uiDefinitions.find(uiDef => uiDef.primary) ?? uiDefinitions[0];\n\n if (!uiDefinition) {\n const errMsg = `Unable to find Default UI`;\n\n this.messageService.add({\n severity: 'error',\n summary: 'ERROR',\n });\n throw new Error(errMsg);\n }\n\n return uiDefinition;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigurationApiService } from '@veloce/api';\nimport { ConfigurationContextMode, LineItem, RuntimeModel, SalesforceIdUtils } from '@veloce/core';\nimport { Dictionary } from 'lodash';\nimport { combineLatest, Observable } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\nimport { ContextService } from '../../../services';\nimport { RuntimeContext, RuntimeMode, UIDefinition, UIDefinitionProps } from '../../../types';\nimport { RuntimeInitializationProps } from '../types/configuration-runtime.types';\nimport { RuntimeContextService } from './runtime-context.service';\n\n@Injectable()\nexport class ConfigurationRuntimeService {\n private _runtimeContext?: RuntimeContext;\n private _assets?: LineItem[];\n private _isInitialized = false;\n\n public initializationProps?: RuntimeInitializationProps;\n public uiDefinitionProperties: UIDefinitionProps = {};\n\n constructor(\n private apiService: ConfigurationApiService,\n private contextService: ContextService,\n private runtimeContextService: RuntimeContextService,\n ) {}\n\n public reset() {\n this._isInitialized = false;\n this._runtimeContext = undefined;\n this._assets = undefined;\n this.initializationProps = undefined;\n this.uiDefinitionProperties = {};\n }\n\n public initTestMode(modelId: string, uiDefinition: UIDefinition) {\n this.uiDefinitionProperties = uiDefinition.properties ?? {};\n const uiDefinitionExternals = uiDefinition.externals ?? {};\n\n return combineLatest([\n this.apiService.getRuntimeDataByModelId(modelId),\n this.contextService.create('TestId', ConfigurationContextMode.TEST),\n ]).pipe(\n first(),\n tap(([runtimeData, context]) => {\n this._runtimeContext = {\n modelId: modelId,\n runtimeModel: RuntimeModel.create(runtimeData.types, runtimeData.products),\n runtimeMode: RuntimeMode.TEST,\n };\n\n this.contextService.update({\n properties: {\n ...this.runtimeContext?.properties,\n ...context.properties,\n ModelId: modelId,\n RuntimeMode: ConfigurationContextMode.TEST,\n PricingEnabled: this.uiDefinitionProperties.pricingEnabled ? 'true' : 'false',\n StartDate: new Date().toISOString().substring(0, 10),\n PriceListId: this.uiDefinitionProperties.priceList,\n standalone: 'true',\n ...uiDefinitionExternals,\n },\n });\n\n this._isInitialized = true;\n }),\n );\n }\n\n public init(props: RuntimeInitializationProps): Observable<RuntimeContext | undefined> {\n this.initializationProps = props;\n this._assets = props.assets;\n const context = this.contextService.resolve();\n\n return this.runtimeContextService.getRuntimeContext(props.productId, props.offeringId).pipe(\n tap(runtimeContext => {\n this.uiDefinitionProperties = runtimeContext.uiDefinition?.properties ?? {};\n const { PriceListId } = context.properties ?? {};\n\n const mergeContext: RuntimeContext = {\n ...runtimeContext,\n properties: {\n ...runtimeContext.properties,\n ...context.properties,\n PricingEnabled: PriceListId ? 'true' : 'false',\n },\n };\n\n this.id15to18('AccountId', mergeContext.properties);\n this._runtimeContext = mergeContext;\n\n if (context.properties && this._runtimeContext.properties?.StartDate) {\n this.contextService.update({\n properties: {\n ...this._runtimeContext.properties,\n ...context.properties,\n },\n });\n }\n\n this._isInitialized = true;\n }),\n );\n }\n\n private id15to18(propertyName: string, source?: Dictionary<any>) {\n if (!source) {\n return;\n }\n\n const value = source[propertyName];\n\n if (typeof value === 'string' && value.length === 15) {\n source[propertyName] = SalesforceIdUtils.generateId18FromId15(value);\n }\n }\n\n public getAsset(lineItem: LineItem): LineItem | undefined {\n return this._assets && this._assets.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);\n }\n\n public get isInitialized() {\n return this._isInitialized;\n }\n\n public get runtimeModel() {\n return this.runtimeContext?.runtimeModel;\n }\n\n public get runtimeContext() {\n return this._runtimeContext;\n }\n}\n","import { Attribute, CfgStatus, LineItem, PortDomain, UUID } from '@veloce/core';\nimport { Dictionary, flatten, sortBy } from 'lodash';\n\nexport const findLineItem = (id: string, lineItems: LineItem[]): LineItem | undefined => {\n return findLineItemWithComparator(lineItems, (li: LineItem) => li.id === id);\n};\n\nexport const findLineItemWithComparator = (\n lineItems: LineItem[],\n comparator: (li: LineItem) => boolean,\n): LineItem | undefined => {\n let currentLevel = lineItems;\n\n while (currentLevel.length) {\n const found = currentLevel.find(comparator);\n\n if (found) {\n return found;\n }\n\n currentLevel = flatten(currentLevel.map(parent => parent.lineItems));\n }\n\n return;\n};\n\nexport const insertLineItem = (lineItem: LineItem, parentId: string, toInsert: LineItem): LineItem => {\n const insertData = lineItem.id === parentId ? [toInsert] : [];\n return {\n ...lineItem,\n lineItems: [\n ...insertData,\n ...lineItem.lineItems.map(li => {\n return insertLineItem(li, parentId, toInsert);\n }),\n ],\n };\n};\n\nexport const removeLineItem = (lineItem: LineItem, idToRemove: string): LineItem => {\n return {\n ...lineItem,\n lineItems: lineItem.lineItems\n .map(li => {\n if (li.id === idToRemove) {\n return;\n } else if (li.lineItems.length) {\n return removeLineItem(li, idToRemove);\n }\n return li;\n })\n .filter(r => !!r) as LineItem[],\n };\n};\n\nexport const replaceLineItem = (lineItem: LineItem, replaceTo: LineItem): LineItem => {\n if (lineItem.id === replaceTo.id) {\n return { ...replaceTo };\n }\n\n return {\n ...lineItem,\n lineItems: lineItem.lineItems.map(li => {\n if (li.id === replaceTo.id) {\n return replaceTo;\n } else if (li.lineItems.length) {\n return replaceLineItem(li, replaceTo);\n }\n return li;\n }),\n };\n};\n\nexport const mapAttributes = (attributes: Attribute[]): Dictionary<any> => {\n return attributes.reduce((acc, { name, value }) => ({ ...acc, [name]: value }), {});\n};\n\nexport const getAttributes = (attributes: Attribute[], names: string[] = []) => {\n const filtered = attributes.filter(({ name }) => names.includes(name));\n return sortBy(filtered, [({ name }) => names.indexOf(name)]);\n};\n\nexport const upsertAttributes = (\n originalAttributes: Attribute[],\n attributesToUpsert: { name: string; value: any }[],\n) => {\n return attributesToUpsert.reduce((acc, { name, value }) => {\n const [origAttr] = getAttributes(acc, [name]);\n return [\n ...acc.filter(attr => attr.name !== name),\n { ...(origAttr ?? { name }), cfgStatus: 'User' as CfgStatus, value },\n ];\n }, originalAttributes);\n};\n\nexport const patchAttributes = (rootLineItem: LineItem, id: string, attrs: { name: string; value: any }[]) => {\n const lineItem = findLineItem(id, [rootLineItem]);\n\n if (!lineItem) {\n return rootLineItem;\n }\n\n const attributes = upsertAttributes(lineItem.attributes, attrs);\n return replaceLineItem(rootLineItem, { ...lineItem, attributes });\n};\n\nexport const getAttributeValue = (attributes: Attribute[], name: string): any =>\n attributes.find(attr => attr.name === name)?.value;\n\nexport const generateLineItem = (\n port: string,\n type: string,\n parentId: string,\n attributes: { name: string; value: any }[] = [],\n lineItems: LineItem[] = [],\n): LineItem => {\n return {\n id: UUID.UUID(),\n port,\n type,\n actionCode: 'ADD',\n cfgStatus: 'New',\n attributes: attributes.map(({ name, value }) => ({ cfgStatus: 'User', name, value })),\n lineItems,\n parentId,\n qty: 1,\n } as LineItem;\n};\n\nexport const getRecommendedPrices = (portDomain: PortDomain, type: string): { net: number; list: number } => {\n const domainType = portDomain.domainTypes.find(({ name }) => name === type);\n\n const [net, list] = domainType?.recommendedPrices\n ?.filter(({ chargeMethod }) => chargeMethod === 'ONE_TIME')\n .reduce(\n (acc, rp) => {\n const [netPrice, listPrice] = acc;\n return [netPrice + rp.netPrice, listPrice + rp.listPrice];\n },\n [0, 0],\n ) ?? [0, 0];\n\n return { net, list };\n};\n","import { LineItem } from '@veloce/core';\nimport { insertLineItem, patchAttributes, removeLineItem, replaceLineItem } from './line-item.utils';\n\nexport class LineItemWorker {\n public li: LineItem;\n\n constructor(src: LineItem) {\n this.li = { ...src };\n }\n\n public insert(parentId: string, toInsert: LineItem): LineItemWorker {\n return new LineItemWorker(insertLineItem(this.li, parentId, toInsert));\n }\n\n public remove(id: string): LineItemWorker {\n return new LineItemWorker(removeLineItem(this.li, id));\n }\n\n public replace(toReplace: LineItem): LineItemWorker {\n return new LineItemWorker(replaceLineItem(this.li, toReplace));\n }\n\n public patchAttribute(attrs: { name: string; value: any }[], id?: string): LineItemWorker {\n return new LineItemWorker(patchAttributes(this.li, id ?? this.li.id, attrs));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigurationApiService } from '@veloce/api';\nimport { ConfirmationComponent, ToastType } from '@veloce/components';\nimport {\n ConfigurationContext,\n ConfigurationMode,\n ConfigurationRequest,\n LineItem,\n PricePlanCharge,\n RuntimeModel,\n VlWindow,\n} from '@veloce/core';\nimport { Dictionary } from 'lodash';\nimport { MessageService } from 'primeng/api';\nimport { DialogService } from 'primeng/dynamicdialog';\nimport { BehaviorSubject, Observable, shareReplay, throwError } from 'rxjs';\nimport { catchError, finalize, first, map, switchMap, tap } from 'rxjs/operators';\nimport { ContextService, QuoteDraftService } from '../../../services';\nimport { QuoteStates, RuntimeContext, RuntimeStep } from '../../../types';\nimport { LineItemWorker } from '../../../utils';\nimport { getDefaultLineItem } from '../helpers';\nimport { ConfigurationRuntimeService } from './configuration-runtime.service';\n\ndeclare const window: VlWindow;\n\n@Injectable()\nexport class ConfigurationService {\n private mode = ConfigurationMode.SEARCH;\n private states: QuoteStates = {};\n\n private lineItem = new BehaviorSubject<LineItem | undefined>(undefined);\n private charges = new BehaviorSubject<Dictionary<PricePlanCharge>>({});\n\n public hasUnsavedChanges = false;\n\n constructor(\n private quoteDraftService: QuoteDraftService,\n private runtimeService: ConfigurationRuntimeService,\n private contextService: ContextService,\n private configurationApiService: ConfigurationApiService,\n private messageService: MessageService,\n private dialogService: DialogService,\n ) {}\n\n public reset() {\n this.hasUnsavedChanges = false;\n this.runtimeService.reset();\n\n this.states = {};\n this.lineItem.next(undefined);\n this.charges.next({});\n }\n\n public patch$(lineItem: LineItem): Observable<LineItem> {\n if (!this.lineItem.value) {\n return throwError(() => new Error(`Source LineItem not found`));\n }\n\n this.states.configurableRamp = new LineItemWorker(this.lineItem.value).replace(lineItem).li;\n this.states.asset = this.states.configurableRamp\n ? this.runtimeService.getAsset(this.states.configurableRamp)\n : undefined;\n\n return this.configure().pipe(\n catchError(error => {\n console.error(error);\n\n if (!this.runtimeService.uiDefinitionProperties.suppressToastMessages) {\n this.messageService.add({ severity: 'error', summary: error });\n }\n\n // bounce back if configuration call has failed\n this.lineItem.next(this.lineItem.value ? { ...this.lineItem.value } : undefined);\n\n return throwError(() => error);\n }),\n tap(() => {\n if (!this.hasUnsavedChanges) {\n this.hasUnsavedChanges = true;\n }\n }),\n );\n }\n\n public patch(lineItem: LineItem): void {\n this.patch$(lineItem).subscribe();\n }\n\n public updateCurrentStates(update: Partial<QuoteStates>) {\n this.states = {\n ...this.states,\n ...update,\n };\n }\n\n public get(): Observable<LineItem | undefined> {\n return this.lineItem.asObservable().pipe(shareReplay());\n }\n\n public getSnapshot(): LineItem | undefined {\n return this.lineItem.value ? { ...this.lineItem.value } : undefined;\n }\n\n public getRuntimeModel(): RuntimeModel | undefined {\n return this.runtimeService.runtimeModel;\n }\n\n public getRuntimeContext(): RuntimeContext | undefined {\n return this.runtimeService.runtimeContext;\n }\n\n public get contextSnapshot(): ConfigurationContext {\n return this.contextService.resolve();\n }\n\n public get context$(): Observable<ConfigurationContext> {\n return this.contextService.resolve$();\n }\n\n public get charges$(): Observable<Dictionary<PricePlanCharge>> {\n return this.charges.asObservable();\n }\n\n public get chargesSnapshot(): Dictionary<PricePlanCharge> {\n return this.charges.value;\n }\n\n public configure(): Observable<LineItem> {\n const runtimeContext = this.getRuntimeContext();\n const runtimeModel = this.getRuntimeModel();\n if (!runtimeContext || !runtimeModel) {\n return throwError(() => new Error('Runtime context/model not initialized'));\n }\n\n const uiDefinitionProperties = {\n ...(runtimeContext.uiDefinition?.properties ?? {}),\n ...(this.runtimeService.uiDefinitionProperties ?? {}),\n };\n const qty = this.runtimeService.initializationProps?.defaultQty;\n const lineItem = this.states.configurableRamp ?? getDefaultLineItem(runtimeContext, uiDefinitionProperties, qty);\n const configurationRequest = this.createRequest(lineItem);\n\n const mainPricingEnabled = runtimeContext.properties?.PricingEnabled;\n const pricingEnabled = mainPricingEnabled ? mainPricingEnabled === 'true' : uiDefinitionProperties.pricingEnabled;\n\n return this.configurationApiService\n .configureLineItem({ configurationRequest, runtimeModel, pricingEnabled })\n .pipe(\n map(({ lineItem, context, charges, deletedLineItems }) => {\n this.contextService.update(context ?? {});\n this.charges.next(charges ?? {});\n if (deletedLineItems?.length) {\n this.showInactiveProductsConfirmation();\n }\n return lineItem;\n }),\n )\n .pipe(\n tap(lineItem => lineItem && this.lineItem.next(lineItem)),\n catchError(error =>\n throwError(() => new Error(error.error?.message || error.message || JSON.stringify(error))),\n ),\n );\n }\n\n public configureExternal$(productId: string, qty?: number): Observable<LineItem> {\n this.updateCurrentStates({\n currentState: this.quoteDraftService.currentState,\n });\n\n return this.runtimeService.init({ productId, defaultQty: qty }).pipe(\n switchMap(() => this.configure()),\n first(),\n catchError(error => {\n this.messageService.add({ severity: ToastType.error, summary: error });\n throw error;\n }),\n finalize(() => this.reset()),\n );\n }\n\n private createRequest(lineItem: LineItem): ConfigurationRequest {\n return {\n lineItem,\n mode: this.mode,\n step: !this.lineItem.value ? RuntimeStep.START : RuntimeStep.UPDATE,\n attributeDomainMode: 'ALL',\n context: this.contextService.resolve(),\n lineItems: this.states.currentState || [],\n asset: this.states.asset,\n };\n }\n\n private showInactiveProductsConfirmation() {\n this.dialogService\n .open(ConfirmationComponent, {\n dismissableMask: false,\n closeOnEscape: false,\n closable: false,\n showHeader: true,\n header: `Inactive Products in Quote`,\n width: '440px',\n data: {\n confirmationConfig: {\n title: ' ',\n description: 'This quote contains inactive products. Do you want to remove them?',\n submitBtn: 'Remove products',\n cancelBtn: 'Back to Quote',\n },\n },\n })\n .onClose.subscribe(result => {\n if (!result) {\n const context = this.contextService.resolve();\n window['VELO_BACK_FN'].apply(null, [context.headerId]);\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { LineItem } from '@veloce/core';\nimport { flatten } from 'lodash';\nimport moment from 'moment';\nimport { LineItemWorker } from '../../../utils';\nimport { FlowUpdateParams } from '../types/update.types';\n\n@Injectable()\nexport class FlowUpdateService {\n public update(rootLineItems: LineItem[], updates: FlowUpdateParams[]) {\n let remainingUpdates = [...updates];\n let currentLevel = rootLineItems;\n\n while (currentLevel.length && remainingUpdates.length) {\n currentLevel.forEach(li => {\n const unhandledUpdates: FlowUpdateParams[] = [];\n\n remainingUpdates.forEach(update => {\n let updated = false;\n\n switch (update.dataType) {\n case 'LINEITEM':\n updated = this.applyLineItemUpdate(li, update);\n break;\n case 'CHARGE':\n updated = this.applyChargeUpdate(li, update);\n break;\n case 'GROUP_CHARGE':\n updated = this.applyChargeGroupUpdate(li, update);\n break;\n default:\n // Unknown dataType. Do not try to handle it anymore\n updated = true;\n }\n\n if (!updated) {\n unhandledUpdates.push(update);\n }\n });\n\n remainingUpdates = unhandledUpdates;\n });\n\n currentLevel = flatten(currentLevel.map(parent => parent.lineItems));\n }\n }\n\n public delete(lineItems: LineItem[], id: string): LineItem[] {\n const idsToRemove: string[] = [id];\n const topLevelLineItem = lineItems.find(li => li.id === id);\n\n if (topLevelLineItem) {\n // find term-related line items (which are only top level)\n // expired term line items won't be deleted\n let foundTermLineItem: LineItem | undefined = topLevelLineItem;\n\n while (foundTermLineItem) {\n foundTermLineItem = lineItems.find(li => foundTermLineItem && li.rampInstanceId === foundTermLineItem.id);\n if (foundTermLineItem) {\n idsToRemove.push(foundTermLineItem.id);\n }\n }\n }\n\n const filtered = lineItems.filter(lineItem => !idsToRemove.includes(lineItem.id));\n return filtered.map(lineItem => new LineItemWorker(lineItem).remove(id).li);\n }\n\n private applyLineItemUpdate(lineItem: LineItem, update: FlowUpdateParams): boolean {\n if (lineItem.id !== update.id) {\n return false;\n }\n\n switch (update.attributeType) {\n case 'QTY':\n lineItem.qty = update.newValue;\n break;\n case 'EFFECTIVE_START_DATE':\n lineItem.properties.StartDate = moment(update.newValue).format('YYYY-MM-DD');\n break;\n case 'END_DATE':\n lineItem.properties.EndDate = moment(update.newValue).format('YYYY-MM-DD');\n break;\n case 'PRICE_ADJUSTMENT':\n {\n const [charge] = lineItem.chargeItems;\n if (charge) {\n charge.priceAdjustment = update.newValue;\n }\n }\n break;\n default:\n throw new Error(`Not suppored AttributeType for LineItem update: ${update.attributeType}`);\n }\n\n return true;\n }\n\n private applyChargeUpdate(lineItem: LineItem, update: FlowUpdateParams): boolean {\n const foundCharge = lineItem.chargeItems.find(({ id }) => id === update.id);\n if (!foundCharge) {\n return false;\n }\n\n if (update.attributeType === 'PRICE_ADJUSTMENT') {\n foundCharge.priceAdjustment = update.newValue;\n } else {\n throw new Error(`Not suppored AttributeType for Charge Item update: ${update.attributeType}`);\n }\n\n return true;\n }\n\n private applyChargeGroupUpdate(lineItem: LineItem, update: FlowUpdateParams): boolean {\n const foundChargeGroup = lineItem.chargeGroupItems.find(({ id }) => id === update.id);\n if (!foundChargeGroup) {\n return false;\n }\n\n if (update.attributeType === 'PRICE_ADJUSTMENT') {\n foundChargeGroup.priceAdjustment = update.newValue;\n } else {\n throw new Error(`Not suppored AttributeType for Charge Group Item update: ${update.attributeType}`);\n }\n\n return true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ProceduresApiService } from '@veloce/api';\nimport { ConfigurationContext, LineItem, PricePlanCharge, QuoteDraft } from '@veloce/core';\nimport { cloneDeep, Dictionary } from 'lodash';\nimport { catchError, map, noop, Observable, of, shareReplay, switchMap, tap, throwError } from 'rxjs';\nimport { ContextService, QuoteDraftService } from '../../../services';\nimport { ConfigurationService } from '../../configuration';\nimport { FlowUpdateParams } from '../types/update.types';\nimport { FlowUpdateService } from './flow-update.service';\n\n@Injectable()\nexport class FlowConfigurationService {\n constructor(\n private proceduresApiService: ProceduresApiService,\n private contextService: ContextService,\n private quoteDraftService: QuoteDraftService,\n private updateService: FlowUpdateService,\n private configurationService: ConfigurationService,\n ) {}\n\n public calculate$(): Observable<void> {\n const quoteDraft = this.quoteDraftService.quoteDraft;\n\n if (!quoteDraft || !quoteDraft.currentState.length) {\n return of(undefined);\n }\n\n return this.proceduresApiService.apply$(quoteDraft).pipe(\n tap(result => this.quoteDraftService.updateQuoteDraft(result)),\n map(noop),\n );\n }\n\n public calculate(): void {\n this.calculate$().subscribe();\n }\n\n public update$(updates: FlowUpdateParams[]): Observable<QuoteDraft | null> {\n const currentState = this.quoteDraftService.currentState;\n\n return of([]).pipe(\n tap(() => {\n const updatedState = cloneDeep(currentState);\n this.updateService.update(updatedState, updates);\n this.quoteDraftService.setCurrentLineItemState(updatedState);\n }),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public update(updates: FlowUpdateParams[]): void {\n this.update$(updates).subscribe();\n }\n\n public revert$(lineItemId: string): Observable<QuoteDraft | null> {\n const initialState = this.quoteDraftService.activeInitialState;\n const currentState = this.quoteDraftService.activeCurrentState;\n\n const currentLineItemIndex = currentState.findIndex(({ id }) => id === lineItemId);\n const currentLineItem = currentState[currentLineItemIndex];\n\n const initialLineItem = initialState.find(({ integrationId }) => integrationId === currentLineItem?.integrationId);\n\n if (!currentLineItem || !initialLineItem) {\n return of(null);\n }\n\n const updatedState = cloneDeep(currentState);\n updatedState.splice(currentLineItemIndex, 1, initialLineItem);\n\n return of([]).pipe(\n tap(() => {\n this.quoteDraftService.setCurrentLineItemState(updatedState);\n }),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public revert(lineItemId: string): void {\n this.revert$(lineItemId).subscribe();\n }\n\n public delete$(ids: string[]): Observable<QuoteDraft | null> {\n const currentState = this.quoteDraftService.currentState;\n\n return of([]).pipe(\n tap(() => {\n const updatedState = ids.reduce((result, id) => this.updateService.delete(result, id), currentState);\n this.quoteDraftService.setCurrentLineItemState(updatedState);\n }),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public delete(ids: string[]): void {\n this.delete$(ids).subscribe();\n }\n\n public addTerm$(term: LineItem): Observable<QuoteDraft | null> {\n const currentState = this.quoteDraftService.currentState;\n\n return of([]).pipe(\n tap(() => this.quoteDraftService.setCurrentLineItemState([...currentState, term])),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public addToCart$(productId: string, qty?: number): Observable<QuoteDraft | null> {\n const currentState = this.quoteDraftService.currentState;\n\n return this.configurationService.configureExternal$(productId, qty).pipe(\n tap(lineItem => this.quoteDraftService.setCurrentLineItemState([...currentState, lineItem])),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public get(): Observable<LineItem[]> {\n return this.quoteDraftService.quoteDraft$.pipe(\n map(() => this.quoteDraftService.activeCurrentState),\n shareReplay(),\n );\n }\n\n public getSnapshot(): LineItem[] {\n return this.quoteDraftService?.currentState.slice() ?? [];\n }\n\n public get charges$(): Observable<Dictionary<PricePlanCharge>> {\n return this.quoteDraftService.quoteDraft$.pipe(map(({ charges }) => charges));\n }\n\n public get chargesSnapshot(): Dictionary<PricePlanCharge> {\n return this.quoteDraftService.quoteDraft?.charges ?? {};\n }\n\n public get contextSnapshot(): ConfigurationContext {\n return this.contextService.resolve();\n }\n\n public get context$(): Observable<ConfigurationContext> {\n return this.contextService.resolve$();\n }\n\n private handleErrorAndBounceBack(stateToRestore: LineItem[]) {\n return <T>(source$: Observable<T>): Observable<T> => {\n return source$.pipe(\n catchError(error => {\n console.error(error);\n\n // bounce back if configuration call has failed\n this.quoteDraftService.setCurrentLineItemState(stateToRestore);\n\n return throwError(() => error);\n }),\n );\n };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { PriceApiService } from '@veloce/api';\nimport { FlowConfigurationService } from './services/flow-configuration.service';\nimport { FlowUpdateService } from './services/flow-update.service';\n\n@NgModule({\n imports: [],\n providers: [FlowConfigurationService, FlowUpdateService, PriceApiService],\n})\nexport class FlowConfigurationModule {}\n","import { NgModule } from '@angular/core';\nimport { ConfigurationApiService, ContextApiService, ProductModelApiService } from '@veloce/api';\nimport { ConfirmationDialogModule } from '@veloce/components';\nimport { ConfigurationRuntimeService } from './services/configuration-runtime.service';\nimport { ConfigurationService } from './services/configuration.service';\nimport { RuntimeContextService } from './services/runtime-context.service';\n\n@NgModule({\n imports: [ConfirmationDialogModule],\n providers: [\n ContextApiService,\n ProductModelApiService,\n ConfigurationApiService,\n ConfigurationRuntimeService,\n RuntimeContextService,\n ConfigurationService,\n ],\n})\nexport class ConfigurationModule {}\n","import { NgModule } from '@angular/core';\nimport { FlowConfigurationModule } from './modules';\nimport { ConfigurationModule } from './modules/configuration/configuration.module';\nimport { ContextService, ProductImagesService, QuoteDraftService } from './services';\n\n@NgModule({\n imports: [ConfigurationModule, FlowConfigurationModule],\n providers: [ContextService, QuoteDraftService, ProductImagesService],\n})\nexport class SdkCoreModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map","tap","catchError","shareReplay","switchMap"],"mappings":";;;;;;;;;;;;;MAGa,kBAAkB,GAAG,CAChC,OAAuB,EACvB,sBAAyC,EACzC,GAAG,GAAG,CAAC;;IAEP,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAEvB,MAAM,QAAQ,GAAa,gBACzB,EAAE,EACF,IAAI,EAAE,MAAA,sBAAsB,CAAC,QAAQ,mCAAI,EAAE,EAC3C,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,KAAK,EACjB,GAAG,EACH,WAAW,EAAE,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,WAAW,KAAI,OAAO,CAAC,WAAW,EACnE,SAAS,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI,EAAE,KAC9B,OAAO,CAAC,UAAU;UAClB,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAAI,EAAE,EAAE;UACxF,EAAE,EACK,CAAC;IAEd,OAAO,QAAQ,CAAC;AAClB;;ICrBY;AAAZ,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,6CAAI,CAAA;AACN,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;IAEW;AAAZ,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;IAEW;AAAZ,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,KAAX,WAAW;;MCLV,cAAc;IAGzB,YAAoB,iBAAoC;QAApC,sBAAiB,GAAjB,i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;qBACrB;iBACF;;;MCRY,aAAa;;2GAAb,aAAa;4GAAb,aAAa,YAHd,mBAAmB,EAAE,uBAAuB;4GAG3C,aAAa,aAFb,CAAC,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,YAD3D,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;4FAG5C,aAAa;kBAJzB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;oBACvD,SAAS,EAAE,CAAC,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,CAAC;iBACrE;;;ACRD;;;;;;"}
|
1
|
+
{"version":3,"file":"veloce-sdk-core.js","sources":["../../../../libs/sdk/core/modules/configuration/helpers.ts","../../../../libs/sdk/core/types/runtime.types.ts","../../../../libs/sdk/core/services/context.service.ts","../../../../libs/sdk/core/services/product-images.service.ts","../../../../libs/sdk/core/services/quote-draft.service.ts","../../../../libs/sdk/core/modules/configuration/services/runtime-context.service.ts","../../../../libs/sdk/core/modules/configuration/services/configuration-runtime.service.ts","../../../../libs/sdk/core/utils/line-item.utils.ts","../../../../libs/sdk/core/utils/line-item.worker.ts","../../../../libs/sdk/core/modules/configuration/services/configuration.service.ts","../../../../libs/sdk/core/modules/flow-configuration/services/flow-update.service.ts","../../../../libs/sdk/core/modules/flow-configuration/services/flow-configuration.service.ts","../../../../libs/sdk/core/modules/flow-configuration/flow-configuration.module.ts","../../../../libs/sdk/core/modules/configuration/configuration.module.ts","../../../../libs/sdk/core/core.module.ts","../../../../libs/sdk/core/veloce-sdk-core.ts"],"sourcesContent":["import { LineItem, UUID } from '@veloce/core';\nimport { RuntimeContext, UIDefinitionProps } from '../../types';\n\nexport const getDefaultLineItem = (\n context: RuntimeContext,\n uiDefinitionProperties: UIDefinitionProps,\n qty = 1,\n): LineItem => {\n const id = UUID.UUID();\n\n const lineItem: LineItem = {\n id,\n type: uiDefinitionProperties.rootType ?? '',\n cfgStatus: 'Default',\n actionCode: 'ADD',\n qty,\n productName: context.properties?.displayName || context.productName,\n productId: context.productId ?? '',\n ...(context.offeringId\n ? { offeringId: context.offeringId, offeringInstanceId: context.offeringInstanceId || id }\n : {}),\n } as LineItem;\n\n return lineItem;\n};\n","import { ContextProperties, RuntimeModel } from '@veloce/core';\nimport { UIDefinition } from './ui-definition.types';\n\nexport enum RuntimeMode {\n TEST,\n PROD,\n}\n\nexport enum RuntimeOperation {\n INIT = 'INIT',\n UPDATE = 'UPDATE',\n}\n\nexport enum RuntimeStep {\n START = 'START',\n UPDATE = 'UPDATE',\n}\n\nexport interface InvocationContext {\n runtimeOperation?: RuntimeOperation;\n runtimeStep?: RuntimeStep;\n}\n\nexport interface RuntimeContext {\n modelId: string;\n runtimeMode: RuntimeMode;\n runtimeModel: RuntimeModel;\n uiDefinition?: UIDefinition;\n productId?: string;\n productName?: string;\n productType?: string;\n properties?: ContextProperties;\n offeringId?: string;\n offeringInstanceId?: string;\n invocationContext?: InvocationContext;\n}\n","import { Injectable } from '@angular/core';\nimport { ContextApiService } from '@veloce/api';\nimport { ConfigurationContext, ConfigurationContextMode } from '@veloce/core';\nimport { merge } from 'lodash';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { filter, map, tap } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class ContextService {\n private context = new BehaviorSubject<ConfigurationContext | null>(null);\n\n constructor(private contextApiService: ContextApiService) {}\n\n get isInitialized(): boolean {\n return Boolean(this.context.value);\n }\n\n resolve(): ConfigurationContext {\n if (!this.context.value) {\n throw new Error('Context is not initialized yet!');\n }\n\n return { ...this.context.value };\n }\n\n resolve$(): Observable<ConfigurationContext> {\n return this.context.pipe(filter((ctx): ctx is ConfigurationContext => Boolean(ctx)));\n }\n\n create(headerId: string, mode: ConfigurationContextMode): Observable<ConfigurationContext> {\n return this.contextApiService.getContext(headerId, mode).pipe(\n tap(context => this.context.next(merge(new ConfigurationContext(headerId, mode), context))),\n map(() => this.resolve() as ConfigurationContext),\n );\n }\n\n public update(partialContext: Partial<ConfigurationContext>): ConfigurationContext {\n const originalContext = this.resolve();\n\n const updatedContext: ConfigurationContext = {\n ...originalContext,\n ...(partialContext as ConfigurationContext),\n properties: {\n ...originalContext.properties,\n ...partialContext.properties,\n },\n };\n\n this.context.next(updatedContext);\n\n return updatedContext;\n }\n\n public delete(): void {\n this.context.next(null);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ProductApiService } from '@veloce/api';\nimport { Dictionary } from 'lodash';\nimport { BehaviorSubject, catchError, distinctUntilChanged, map, Observable, of, tap } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class ProductImagesService {\n private imagesMap$ = new BehaviorSubject<Dictionary<string>>({});\n\n constructor(private productApiService: ProductApiService) {}\n\n public getImageUrl$(productId: string): Observable<string | null> {\n if (this.imagesMap$.value[productId] == null) {\n this.imagesMap$.next({ ...this.imagesMap$.value, [productId]: '' });\n this.fetchProductImage(productId);\n }\n\n return this.imagesMap$.pipe(\n map(imagesMap => imagesMap[productId]),\n distinctUntilChanged(),\n );\n }\n\n private fetchProductImage(productId: string): void {\n this.productApiService\n .fetchImage$(productId)\n .pipe(\n map(file => URL.createObjectURL(file)),\n catchError(() => of('')),\n tap(url => this.imagesMap$.next({ ...this.imagesMap$.value, [productId]: url })),\n )\n .subscribe();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { PriceApiService, QuoteApiService } from '@veloce/api';\nimport { ConfigurationContextMode, LineItem, PriceList, PriceSummary, QuoteDraft } from '@veloce/core';\nimport { Dictionary } from 'lodash';\nimport { BehaviorSubject, combineLatest, noop, Observable, zip } from 'rxjs';\nimport { filter, map, shareReplay, take, tap } from 'rxjs/operators';\nimport { ContextService } from './context.service';\n\n@Injectable({ providedIn: 'root' })\nexport class QuoteDraftService {\n private quoteSubj$ = new BehaviorSubject<QuoteDraft | null>(null);\n private resetSubj$ = new BehaviorSubject(true);\n\n public isInitialized = false;\n public allPriceLists: PriceList[] = [];\n public assetPriceLists: PriceList[] = [];\n public hasUnsavedChanges = false;\n public reset$ = this.resetSubj$.asObservable();\n public activePriceList$: Observable<PriceList | null>;\n\n constructor(\n private context: ContextService,\n private quoteApiService: QuoteApiService,\n private priceApiService: PriceApiService,\n ) {\n this.activePriceList$ = this.context.resolve$().pipe(\n map(ctx => this.allPriceLists.find(priceList => priceList.id === ctx.properties.PriceListId)),\n map(priceList => priceList ?? null),\n );\n }\n\n public reset() {\n this.resetSubj$.next(true);\n this.quoteSubj$.next(null);\n }\n\n public init(quoteId: string, params: Dictionary<string>): Observable<void> {\n return zip(\n this.context.resolve$(),\n this.quoteApiService.getQuoteDraft(quoteId, params),\n this.priceApiService.getPriceLists(),\n ).pipe(\n tap(([context, quote, allPriceLists]) => {\n this.allPriceLists = allPriceLists;\n this.quoteSubj$.next(quote);\n\n this.context.update({\n ...context,\n ...quote.context,\n properties: {\n ...context.properties,\n ...quote.context.properties,\n },\n });\n\n this.populateActivePriceLists$();\n }),\n map(() => noop()),\n take(1),\n );\n }\n\n public setCurrentLineItemState(lineItems: LineItem[]): void {\n const quoteDraft = this.quoteSubj$.value;\n\n if (!quoteDraft) {\n return;\n }\n\n this.quoteSubj$.next({\n ...quoteDraft,\n currentState: lineItems,\n });\n\n this.markAsUpdated();\n }\n\n public updateQuoteDraft(update: Partial<QuoteDraft>): void {\n const quoteDraft = this.quoteSubj$.value;\n\n if (!quoteDraft) {\n return;\n }\n\n if (update.context) {\n this.context.update(update.context);\n }\n\n this.quoteSubj$.next({\n ...quoteDraft,\n ...update,\n });\n }\n\n public updateByPriceSummary(priceSummary: PriceSummary): void {\n const quoteDraft = this.quoteSubj$.value;\n\n if (!quoteDraft) {\n return;\n }\n\n const updatedCurrentState = this.currentState.map(lineItem => {\n const updated = priceSummary.lineItems.find(li => li.id === lineItem.id);\n return updated ?? lineItem;\n });\n\n this.quoteSubj$.next({\n ...quoteDraft,\n currentState: updatedCurrentState,\n totalPrices: priceSummary.totalPrices,\n approvalItems: priceSummary.approvalItems,\n });\n\n this.markAsUpdated();\n }\n\n get quoteDraft$(): Observable<QuoteDraft> {\n return combineLatest([this.quoteSubj$, this.context.resolve$()]).pipe(\n map(() => this.quoteDraft),\n filter((quote): quote is QuoteDraft => Boolean(quote)),\n shareReplay(),\n );\n }\n\n get quoteDraft(): QuoteDraft | null {\n const quote = this.quoteSubj$.value;\n\n if (!quote) {\n return null;\n }\n\n return {\n ...quote,\n context: this.context.resolve(),\n };\n }\n\n get currentState$(): Observable<LineItem[]> {\n return this.quoteDraft$.pipe(map(quote => quote.currentState));\n }\n\n get currentState(): LineItem[] {\n return this.quoteDraft?.currentState ?? [];\n }\n\n /**\n * Stream of activeCurrentState\n */\n get activeCurrentState$(): Observable<LineItem[]> {\n return this.quoteDraft$.pipe(map(() => this.activeCurrentState));\n }\n\n /**\n * activeCurrentState is currentState passed through additional filters\n */\n get activeCurrentState(): LineItem[] {\n const ctx = this.context.resolve();\n let currentState = this.quoteDraft?.currentState ?? [];\n\n if (ctx.mode === ConfigurationContextMode.ACCOUNT) {\n currentState = this.filterByActivePriceList(currentState);\n }\n\n return currentState;\n }\n\n /**\n * Stream of activeInitialState\n */\n get activeInitialState$(): Observable<LineItem[]> {\n return this.quoteDraft$.pipe(map(() => this.activeInitialState));\n }\n\n /**\n * activeInitialState is initialState passed through additional filters\n */\n get activeInitialState(): LineItem[] {\n const ctx = this.context.resolve();\n let initialState = this.quoteDraft?.initialState ?? [];\n\n if (ctx.mode === ConfigurationContextMode.ACCOUNT) {\n initialState = this.filterByActivePriceList(initialState);\n }\n\n return initialState;\n }\n\n get isStandalone() {\n return this.context.resolve().properties.standalone === 'true';\n }\n\n public isEditMode$(): Observable<boolean> {\n return this.context.resolve$().pipe(map(() => this.isEditMode()));\n }\n\n public isEditMode(): boolean {\n const context = this.context.resolve();\n\n if (context.mode === ConfigurationContextMode.ACCOUNT) {\n return true;\n }\n\n if (context.mode === ConfigurationContextMode.QUOTE) {\n return context.properties.Status === 'Draft';\n }\n\n return false;\n }\n\n public updateActivePriceList(priceListId: string): void {\n this.context.update({ properties: { PriceListId: priceListId } });\n }\n\n private populateActivePriceLists$(): void {\n const ctx = this.context.resolve();\n const quoteDraft = this.quoteDraft;\n\n if (!quoteDraft) {\n return;\n }\n\n // In ACCOUNT mode populate price lists from related assets\n if (ctx.mode === ConfigurationContextMode.ACCOUNT) {\n // Populate list of price lists\n this.assetPriceLists = quoteDraft.currentState\n .map(({ priceListId }) => priceListId)\n .reduce<PriceList[]>((trunk, priceListId) => {\n if (!priceListId || trunk.some(item => item.id === priceListId)) {\n return trunk;\n }\n\n return [\n ...trunk,\n { id: priceListId, name: this.allPriceLists.find(item => item.id === priceListId)?.name ?? '' },\n ];\n }, []);\n\n const activePriceList = this.assetPriceLists[0];\n\n this.updateActivePriceList(activePriceList?.id);\n\n // Update PriceListId in context properties\n // TODO: remove it when backend will have such logic\n this.context.update({ properties: { PriceListId: activePriceList.id } });\n }\n }\n\n private filterByActivePriceList(lineItems: LineItem[]): LineItem[] {\n const ctx = this.context.resolve();\n\n return lineItems.filter(li => !li.priceListId || li.priceListId === ctx.properties.PriceListId);\n }\n\n private markAsUpdated(): void {\n if (this.isInitialized && !this.hasUnsavedChanges) {\n this.hasUnsavedChanges = true;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigurationApiService } from '@veloce/api';\nimport { RuntimeData, RuntimeModel, UIDefinition as LegacyUiDefinition } from '@veloce/core';\nimport { MessageService } from 'primeng/api';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { RuntimeContext, RuntimeMode, UIDefinition } from '../../../types';\n\n@Injectable()\nexport class RuntimeContextService {\n constructor(private configurationApiService: ConfigurationApiService, private messageService: MessageService) {}\n\n getRuntimeContext(productId: string, offeringId?: string): Observable<RuntimeContext> {\n return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(\n map(runtimeData => {\n const uiDefinition = this.getUIDefinition(runtimeData);\n const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);\n const { productName, properties } =\n Array.from(runtimeModel.components.values()).find(c => c.productId === productId) ?? {};\n\n return {\n modelId: runtimeData.modelId,\n uiDefinition: uiDefinition,\n runtimeModel: runtimeModel,\n runtimeMode: RuntimeMode.PROD,\n productId: productId,\n productType: properties?.displayName || productName,\n offeringId: offeringId,\n properties: {\n PricingEnabled: uiDefinition?.properties?.pricingEnabled ? 'true' : 'false',\n PriceListId: uiDefinition?.properties?.priceList,\n },\n };\n }),\n );\n }\n\n private getUIDefinition(runtimeData: RuntimeData): UIDefinition | undefined {\n let rawUiDefinitions: Array<UIDefinition | LegacyUiDefinition>;\n try {\n rawUiDefinitions = JSON.parse(runtimeData.uiDefinitionsSource);\n } catch (e) {\n return;\n }\n\n const uiDefinitions = rawUiDefinitions.filter(uiDef => (uiDef as UIDefinition).version) as UIDefinition[];\n const uiDefinition = uiDefinitions.find(uiDef => uiDef.primary) ?? uiDefinitions[0];\n\n if (!uiDefinition) {\n const errMsg = `Unable to find Default UI`;\n\n this.messageService.add({\n severity: 'error',\n summary: 'ERROR',\n });\n throw new Error(errMsg);\n }\n\n return uiDefinition;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigurationApiService } from '@veloce/api';\nimport { ConfigurationContextMode, LineItem, RuntimeModel, SalesforceIdUtils } from '@veloce/core';\nimport { Dictionary } from 'lodash';\nimport { combineLatest, Observable } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\nimport { ContextService } from '../../../services';\nimport { RuntimeContext, RuntimeMode, UIDefinition, UIDefinitionProps } from '../../../types';\nimport { RuntimeInitializationProps } from '../types/configuration-runtime.types';\nimport { RuntimeContextService } from './runtime-context.service';\n\n@Injectable()\nexport class ConfigurationRuntimeService {\n private _runtimeContext?: RuntimeContext;\n private _assets?: LineItem[];\n private _isInitialized = false;\n\n public initializationProps?: RuntimeInitializationProps;\n public uiDefinitionProperties: UIDefinitionProps = {};\n\n constructor(\n private apiService: ConfigurationApiService,\n private contextService: ContextService,\n private runtimeContextService: RuntimeContextService,\n ) {}\n\n public reset() {\n this._isInitialized = false;\n this._runtimeContext = undefined;\n this._assets = undefined;\n this.initializationProps = undefined;\n this.uiDefinitionProperties = {};\n }\n\n public initTestMode(modelId: string, uiDefinition: UIDefinition) {\n this.uiDefinitionProperties = uiDefinition.properties ?? {};\n const uiDefinitionExternals = uiDefinition.externals ?? {};\n\n return combineLatest([\n this.apiService.getRuntimeDataByModelId(modelId),\n this.contextService.create('TestId', ConfigurationContextMode.TEST),\n ]).pipe(\n first(),\n tap(([runtimeData, context]) => {\n this._runtimeContext = {\n modelId: modelId,\n runtimeModel: RuntimeModel.create(runtimeData.types, runtimeData.products),\n runtimeMode: RuntimeMode.TEST,\n };\n\n this.contextService.update({\n properties: {\n ...this.runtimeContext?.properties,\n ...context.properties,\n ModelId: modelId,\n RuntimeMode: ConfigurationContextMode.TEST,\n PricingEnabled: this.uiDefinitionProperties.pricingEnabled ? 'true' : 'false',\n StartDate: new Date().toISOString().substring(0, 10),\n PriceListId: this.uiDefinitionProperties.priceList,\n standalone: 'true',\n ...uiDefinitionExternals,\n },\n });\n\n this._isInitialized = true;\n }),\n );\n }\n\n public init(props: RuntimeInitializationProps): Observable<RuntimeContext | undefined> {\n this.initializationProps = props;\n this._assets = props.assets;\n const context = this.contextService.resolve();\n\n return this.runtimeContextService.getRuntimeContext(props.productId, props.offeringId).pipe(\n tap(runtimeContext => {\n this.uiDefinitionProperties = runtimeContext.uiDefinition?.properties ?? {};\n const { PriceListId } = context.properties ?? {};\n\n const mergeContext: RuntimeContext = {\n ...runtimeContext,\n properties: {\n ...runtimeContext.properties,\n ...context.properties,\n PricingEnabled: PriceListId ? 'true' : 'false',\n },\n };\n\n this.id15to18('AccountId', mergeContext.properties);\n this._runtimeContext = mergeContext;\n\n if (context.properties && this._runtimeContext.properties?.StartDate) {\n this.contextService.update({\n properties: {\n ...this._runtimeContext.properties,\n ...context.properties,\n },\n });\n }\n\n this._isInitialized = true;\n }),\n );\n }\n\n private id15to18(propertyName: string, source?: Dictionary<any>) {\n if (!source) {\n return;\n }\n\n const value = source[propertyName];\n\n if (typeof value === 'string' && value.length === 15) {\n source[propertyName] = SalesforceIdUtils.generateId18FromId15(value);\n }\n }\n\n public getAsset(lineItem: LineItem): LineItem | undefined {\n return this._assets && this._assets.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);\n }\n\n public get isInitialized() {\n return this._isInitialized;\n }\n\n public get runtimeModel() {\n return this.runtimeContext?.runtimeModel;\n }\n\n public get runtimeContext() {\n return this._runtimeContext;\n }\n}\n","import { Attribute, CfgStatus, LineItem, PortDomain, UUID } from '@veloce/core';\nimport { Dictionary, flatten, sortBy } from 'lodash';\n\nexport const findLineItem = (id: string, lineItems: LineItem[]): LineItem | undefined => {\n return findLineItemWithComparator(lineItems, (li: LineItem) => li.id === id);\n};\n\nexport const findLineItemWithComparator = (\n lineItems: LineItem[],\n comparator: (li: LineItem) => boolean,\n): LineItem | undefined => {\n let currentLevel = lineItems;\n\n while (currentLevel.length) {\n const found = currentLevel.find(comparator);\n\n if (found) {\n return found;\n }\n\n currentLevel = flatten(currentLevel.map(parent => parent.lineItems));\n }\n\n return;\n};\n\nexport const insertLineItem = (lineItem: LineItem, parentId: string, toInsert: LineItem): LineItem => {\n const insertData = lineItem.id === parentId ? [toInsert] : [];\n return {\n ...lineItem,\n lineItems: [\n ...insertData,\n ...lineItem.lineItems.map(li => {\n return insertLineItem(li, parentId, toInsert);\n }),\n ],\n };\n};\n\nexport const removeLineItem = (lineItem: LineItem, idToRemove: string): LineItem => {\n return {\n ...lineItem,\n lineItems: lineItem.lineItems\n .map(li => {\n if (li.id === idToRemove) {\n return;\n } else if (li.lineItems.length) {\n return removeLineItem(li, idToRemove);\n }\n return li;\n })\n .filter(r => !!r) as LineItem[],\n };\n};\n\nexport const replaceLineItem = (lineItem: LineItem, replaceTo: LineItem): LineItem => {\n if (lineItem.id === replaceTo.id) {\n return { ...replaceTo };\n }\n\n return {\n ...lineItem,\n lineItems: lineItem.lineItems.map(li => {\n if (li.id === replaceTo.id) {\n return replaceTo;\n } else if (li.lineItems.length) {\n return replaceLineItem(li, replaceTo);\n }\n return li;\n }),\n };\n};\n\nexport const mapAttributes = (attributes: Attribute[]): Dictionary<any> => {\n return attributes.reduce((acc, { name, value }) => ({ ...acc, [name]: value }), {});\n};\n\nexport const getAttributes = (attributes: Attribute[], names: string[] = []) => {\n const filtered = attributes.filter(({ name }) => names.includes(name));\n return sortBy(filtered, [({ name }) => names.indexOf(name)]);\n};\n\nexport const upsertAttributes = (\n originalAttributes: Attribute[],\n attributesToUpsert: { name: string; value: any }[],\n) => {\n return attributesToUpsert.reduce((acc, { name, value }) => {\n const [origAttr] = getAttributes(acc, [name]);\n return [\n ...acc.filter(attr => attr.name !== name),\n { ...(origAttr ?? { name }), cfgStatus: 'User' as CfgStatus, value },\n ];\n }, originalAttributes);\n};\n\nexport const patchAttributes = (rootLineItem: LineItem, id: string, attrs: { name: string; value: any }[]) => {\n const lineItem = findLineItem(id, [rootLineItem]);\n\n if (!lineItem) {\n return rootLineItem;\n }\n\n const attributes = upsertAttributes(lineItem.attributes, attrs);\n return replaceLineItem(rootLineItem, { ...lineItem, attributes });\n};\n\nexport const getAttributeValue = (attributes: Attribute[], name: string): any =>\n attributes.find(attr => attr.name === name)?.value;\n\nexport const generateLineItem = (\n port: string,\n type: string,\n parentId: string,\n attributes: { name: string; value: any }[] = [],\n lineItems: LineItem[] = [],\n): LineItem => {\n return {\n id: UUID.UUID(),\n port,\n type,\n actionCode: 'ADD',\n cfgStatus: 'New',\n attributes: attributes.map(({ name, value }) => ({ cfgStatus: 'User', name, value })),\n lineItems,\n parentId,\n qty: 1,\n } as LineItem;\n};\n\nexport const getRecommendedPrices = (portDomain: PortDomain, type: string): { net: number; list: number } => {\n const domainType = portDomain.domainTypes.find(({ name }) => name === type);\n\n const [net, list] = domainType?.recommendedPrices\n ?.filter(({ chargeMethod }) => chargeMethod === 'ONE_TIME')\n .reduce(\n (acc, rp) => {\n const [netPrice, listPrice] = acc;\n return [netPrice + rp.netPrice, listPrice + rp.listPrice];\n },\n [0, 0],\n ) ?? [0, 0];\n\n return { net, list };\n};\n","import { LineItem } from '@veloce/core';\nimport { insertLineItem, patchAttributes, removeLineItem, replaceLineItem } from './line-item.utils';\n\nexport class LineItemWorker {\n public li: LineItem;\n\n constructor(src: LineItem) {\n this.li = { ...src };\n }\n\n public insert(parentId: string, toInsert: LineItem): LineItemWorker {\n return new LineItemWorker(insertLineItem(this.li, parentId, toInsert));\n }\n\n public remove(id: string): LineItemWorker {\n return new LineItemWorker(removeLineItem(this.li, id));\n }\n\n public replace(toReplace: LineItem): LineItemWorker {\n return new LineItemWorker(replaceLineItem(this.li, toReplace));\n }\n\n public patchAttribute(attrs: { name: string; value: any }[], id?: string): LineItemWorker {\n return new LineItemWorker(patchAttributes(this.li, id ?? this.li.id, attrs));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigurationApiService } from '@veloce/api';\nimport { ConfirmationComponent, ToastType } from '@veloce/components';\nimport {\n ConfigurationContext,\n ConfigurationMode,\n ConfigurationRequest,\n LineItem,\n PricePlanCharge,\n RuntimeModel,\n VlWindow,\n} from '@veloce/core';\nimport { Dictionary } from 'lodash';\nimport { MessageService } from 'primeng/api';\nimport { DialogService } from 'primeng/dynamicdialog';\nimport { BehaviorSubject, Observable, shareReplay, throwError } from 'rxjs';\nimport { catchError, finalize, first, map, switchMap, tap } from 'rxjs/operators';\nimport { ContextService, QuoteDraftService } from '../../../services';\nimport { QuoteStates, RuntimeContext, RuntimeStep } from '../../../types';\nimport { LineItemWorker } from '../../../utils';\nimport { getDefaultLineItem } from '../helpers';\nimport { ConfigurationRuntimeService } from './configuration-runtime.service';\n\ndeclare const window: VlWindow;\n\n@Injectable()\nexport class ConfigurationService {\n private mode = ConfigurationMode.SEARCH;\n private states: QuoteStates = {};\n\n private lineItem = new BehaviorSubject<LineItem | undefined>(undefined);\n private charges = new BehaviorSubject<Dictionary<PricePlanCharge>>({});\n\n public hasUnsavedChanges = false;\n\n constructor(\n private quoteDraftService: QuoteDraftService,\n private runtimeService: ConfigurationRuntimeService,\n private contextService: ContextService,\n private configurationApiService: ConfigurationApiService,\n private messageService: MessageService,\n private dialogService: DialogService,\n ) {}\n\n public reset() {\n this.hasUnsavedChanges = false;\n this.runtimeService.reset();\n\n this.states = {};\n this.lineItem.next(undefined);\n this.charges.next({});\n }\n\n public patch$(lineItem: LineItem): Observable<LineItem> {\n if (!this.lineItem.value) {\n return throwError(() => new Error(`Source LineItem not found`));\n }\n\n this.states.configurableRamp = new LineItemWorker(this.lineItem.value).replace(lineItem).li;\n this.states.asset = this.states.configurableRamp\n ? this.runtimeService.getAsset(this.states.configurableRamp)\n : undefined;\n\n return this.configure().pipe(\n catchError(error => {\n console.error(error);\n\n if (!this.runtimeService.uiDefinitionProperties.suppressToastMessages) {\n this.messageService.add({ severity: 'error', summary: error });\n }\n\n // bounce back if configuration call has failed\n this.lineItem.next(this.lineItem.value ? { ...this.lineItem.value } : undefined);\n\n return throwError(() => error);\n }),\n tap(() => {\n if (!this.hasUnsavedChanges) {\n this.hasUnsavedChanges = true;\n }\n }),\n );\n }\n\n public patch(lineItem: LineItem): void {\n this.patch$(lineItem).subscribe();\n }\n\n public updateCurrentStates(update: Partial<QuoteStates>) {\n this.states = {\n ...this.states,\n ...update,\n };\n }\n\n public get(): Observable<LineItem | undefined> {\n return this.lineItem.asObservable().pipe(shareReplay());\n }\n\n public getSnapshot(): LineItem | undefined {\n return this.lineItem.value ? { ...this.lineItem.value } : undefined;\n }\n\n public getRuntimeModel(): RuntimeModel | undefined {\n return this.runtimeService.runtimeModel;\n }\n\n public getRuntimeContext(): RuntimeContext | undefined {\n return this.runtimeService.runtimeContext;\n }\n\n public get contextSnapshot(): ConfigurationContext {\n return this.contextService.resolve();\n }\n\n public get context$(): Observable<ConfigurationContext> {\n return this.contextService.resolve$();\n }\n\n public get charges$(): Observable<Dictionary<PricePlanCharge>> {\n return this.charges.asObservable();\n }\n\n public get chargesSnapshot(): Dictionary<PricePlanCharge> {\n return this.charges.value;\n }\n\n public configure(): Observable<LineItem> {\n const runtimeContext = this.getRuntimeContext();\n const runtimeModel = this.getRuntimeModel();\n if (!runtimeContext || !runtimeModel) {\n return throwError(() => new Error('Runtime context/model not initialized'));\n }\n\n const uiDefinitionProperties = {\n ...(runtimeContext.uiDefinition?.properties ?? {}),\n ...(this.runtimeService.uiDefinitionProperties ?? {}),\n };\n const qty = this.runtimeService.initializationProps?.defaultQty;\n const lineItem = this.states.configurableRamp ?? getDefaultLineItem(runtimeContext, uiDefinitionProperties, qty);\n const configurationRequest = this.createRequest(lineItem);\n\n const mainPricingEnabled = runtimeContext.properties?.PricingEnabled;\n const pricingEnabled = mainPricingEnabled ? mainPricingEnabled === 'true' : uiDefinitionProperties.pricingEnabled;\n\n return this.configurationApiService\n .configureLineItem({ configurationRequest, runtimeModel, pricingEnabled })\n .pipe(\n map(({ lineItem, context, charges, deletedLineItems }) => {\n this.contextService.update(context ?? {});\n this.charges.next(charges ?? {});\n if (deletedLineItems?.length) {\n this.showInactiveProductsConfirmation();\n }\n return lineItem;\n }),\n )\n .pipe(\n tap(lineItem => lineItem && this.lineItem.next(lineItem)),\n catchError(error =>\n throwError(() => new Error(error.error?.message || error.message || JSON.stringify(error))),\n ),\n );\n }\n\n public configureExternal$(productId: string, qty?: number): Observable<LineItem> {\n this.updateCurrentStates({\n currentState: this.quoteDraftService.currentState,\n });\n\n return this.runtimeService.init({ productId, defaultQty: qty }).pipe(\n switchMap(() => this.configure()),\n first(),\n catchError(error => {\n this.messageService.add({ severity: ToastType.error, summary: error });\n throw error;\n }),\n finalize(() => this.reset()),\n );\n }\n\n private createRequest(lineItem: LineItem): ConfigurationRequest {\n return {\n lineItem,\n mode: this.mode,\n step: !this.lineItem.value ? RuntimeStep.START : RuntimeStep.UPDATE,\n attributeDomainMode: 'ALL',\n context: this.contextService.resolve(),\n lineItems: this.states.currentState || [],\n asset: this.states.asset,\n };\n }\n\n private showInactiveProductsConfirmation() {\n this.dialogService\n .open(ConfirmationComponent, {\n dismissableMask: false,\n closeOnEscape: false,\n closable: false,\n showHeader: true,\n header: `Inactive Products in Quote`,\n width: '440px',\n data: {\n confirmationConfig: {\n title: ' ',\n description: 'This quote contains inactive products. Do you want to remove them?',\n submitBtn: 'Remove products',\n cancelBtn: 'Back to Quote',\n },\n },\n })\n .onClose.subscribe(result => {\n if (!result) {\n const context = this.contextService.resolve();\n window['VELO_BACK_FN'].apply(null, [context.headerId]);\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { LineItem } from '@veloce/core';\nimport { flatten } from 'lodash';\nimport moment from 'moment';\nimport { LineItemWorker } from '../../../utils';\nimport { FlowUpdateParams } from '../types/update.types';\n\n@Injectable()\nexport class FlowUpdateService {\n public update(rootLineItems: LineItem[], updates: FlowUpdateParams[]) {\n let remainingUpdates = [...updates];\n let currentLevel = rootLineItems;\n\n while (currentLevel.length && remainingUpdates.length) {\n currentLevel.forEach(li => {\n const unhandledUpdates: FlowUpdateParams[] = [];\n\n remainingUpdates.forEach(update => {\n let updated = false;\n\n switch (update.dataType) {\n case 'LINEITEM':\n updated = this.applyLineItemUpdate(li, update);\n break;\n case 'CHARGE':\n updated = this.applyChargeUpdate(li, update);\n break;\n case 'GROUP_CHARGE':\n updated = this.applyChargeGroupUpdate(li, update);\n break;\n default:\n // Unknown dataType. Do not try to handle it anymore\n updated = true;\n }\n\n if (!updated) {\n unhandledUpdates.push(update);\n }\n });\n\n remainingUpdates = unhandledUpdates;\n });\n\n currentLevel = flatten(currentLevel.map(parent => parent.lineItems));\n }\n }\n\n public delete(lineItems: LineItem[], id: string): LineItem[] {\n const idsToRemove: string[] = [id];\n const topLevelLineItem = lineItems.find(li => li.id === id);\n\n if (topLevelLineItem) {\n // find term-related line items (which are only top level)\n // expired term line items won't be deleted\n let foundTermLineItem: LineItem | undefined = topLevelLineItem;\n\n while (foundTermLineItem) {\n foundTermLineItem = lineItems.find(li => foundTermLineItem && li.rampInstanceId === foundTermLineItem.id);\n if (foundTermLineItem) {\n idsToRemove.push(foundTermLineItem.id);\n }\n }\n }\n\n const filtered = lineItems.filter(lineItem => !idsToRemove.includes(lineItem.id));\n return filtered.map(lineItem => new LineItemWorker(lineItem).remove(id).li);\n }\n\n private applyLineItemUpdate(lineItem: LineItem, update: FlowUpdateParams): boolean {\n if (lineItem.id !== update.id) {\n return false;\n }\n\n switch (update.attributeType) {\n case 'QTY':\n lineItem.qty = update.newValue;\n break;\n case 'EFFECTIVE_START_DATE':\n lineItem.properties.StartDate = moment(update.newValue).format('YYYY-MM-DD');\n break;\n case 'END_DATE':\n lineItem.properties.EndDate = moment(update.newValue).format('YYYY-MM-DD');\n break;\n case 'PRICE_ADJUSTMENT':\n {\n const [charge] = lineItem.chargeItems;\n if (charge) {\n charge.priceAdjustment = update.newValue;\n }\n }\n break;\n default:\n throw new Error(`Not suppored AttributeType for LineItem update: ${update.attributeType}`);\n }\n\n return true;\n }\n\n private applyChargeUpdate(lineItem: LineItem, update: FlowUpdateParams): boolean {\n const foundCharge = lineItem.chargeItems.find(({ id }) => id === update.id);\n if (!foundCharge) {\n return false;\n }\n\n if (update.attributeType === 'PRICE_ADJUSTMENT') {\n foundCharge.priceAdjustment = update.newValue;\n } else {\n throw new Error(`Not suppored AttributeType for Charge Item update: ${update.attributeType}`);\n }\n\n return true;\n }\n\n private applyChargeGroupUpdate(lineItem: LineItem, update: FlowUpdateParams): boolean {\n const foundChargeGroup = lineItem.chargeGroupItems.find(({ id }) => id === update.id);\n if (!foundChargeGroup) {\n return false;\n }\n\n if (update.attributeType === 'PRICE_ADJUSTMENT') {\n foundChargeGroup.priceAdjustment = update.newValue;\n } else {\n throw new Error(`Not suppored AttributeType for Charge Group Item update: ${update.attributeType}`);\n }\n\n return true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ProceduresApiService } from '@veloce/api';\nimport { ConfigurationContext, LineItem, PricePlanCharge, QuoteDraft } from '@veloce/core';\nimport { cloneDeep, Dictionary } from 'lodash';\nimport { catchError, map, noop, Observable, of, shareReplay, switchMap, tap, throwError } from 'rxjs';\nimport { ContextService, QuoteDraftService } from '../../../services';\nimport { ConfigurationService } from '../../configuration';\nimport { FlowUpdateParams } from '../types/update.types';\nimport { FlowUpdateService } from './flow-update.service';\n\n@Injectable()\nexport class FlowConfigurationService {\n constructor(\n private proceduresApiService: ProceduresApiService,\n private contextService: ContextService,\n private quoteDraftService: QuoteDraftService,\n private updateService: FlowUpdateService,\n private configurationService: ConfigurationService,\n ) {}\n\n public calculate$(): Observable<void> {\n const quoteDraft = this.quoteDraftService.quoteDraft;\n\n if (!quoteDraft || !quoteDraft.currentState.length) {\n return of(undefined);\n }\n\n return this.proceduresApiService.apply$(quoteDraft).pipe(\n tap(result => this.quoteDraftService.updateQuoteDraft(result)),\n map(noop),\n );\n }\n\n public calculate(): void {\n this.calculate$().subscribe();\n }\n\n public update$(updates: FlowUpdateParams[]): Observable<QuoteDraft | null> {\n const currentState = this.quoteDraftService.currentState;\n\n return of([]).pipe(\n tap(() => {\n const updatedState = cloneDeep(currentState);\n this.updateService.update(updatedState, updates);\n this.quoteDraftService.setCurrentLineItemState(updatedState);\n }),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public update(updates: FlowUpdateParams[]): void {\n this.update$(updates).subscribe();\n }\n\n public revert$(lineItemId: string): Observable<QuoteDraft | null> {\n const initialState = this.quoteDraftService.activeInitialState;\n const currentState = this.quoteDraftService.activeCurrentState;\n\n const currentLineItemIndex = currentState.findIndex(({ id }) => id === lineItemId);\n const currentLineItem = currentState[currentLineItemIndex];\n\n const initialLineItem = initialState.find(({ integrationId }) => integrationId === currentLineItem?.integrationId);\n\n if (!currentLineItem || !initialLineItem) {\n return of(null);\n }\n\n const updatedState = cloneDeep(currentState);\n updatedState.splice(currentLineItemIndex, 1, initialLineItem);\n\n return of([]).pipe(\n tap(() => {\n this.quoteDraftService.setCurrentLineItemState(updatedState);\n }),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public revert(lineItemId: string): void {\n this.revert$(lineItemId).subscribe();\n }\n\n public delete$(ids: string[]): Observable<QuoteDraft | null> {\n const currentState = this.quoteDraftService.currentState;\n\n return of([]).pipe(\n tap(() => {\n const updatedState = ids.reduce((result, id) => this.updateService.delete(result, id), currentState);\n this.quoteDraftService.setCurrentLineItemState(updatedState);\n }),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public delete(ids: string[]): void {\n this.delete$(ids).subscribe();\n }\n\n public addTerm$(term: LineItem): Observable<QuoteDraft | null> {\n const currentState = this.quoteDraftService.currentState;\n\n return of([]).pipe(\n tap(() => this.quoteDraftService.setCurrentLineItemState([...currentState, term])),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public addToCart$(productId: string, qty?: number): Observable<QuoteDraft | null> {\n const currentState = this.quoteDraftService.currentState;\n\n return this.configurationService.configureExternal$(productId, qty).pipe(\n tap(lineItem => this.quoteDraftService.setCurrentLineItemState([...currentState, lineItem])),\n switchMap(() => this.calculate$()),\n map(() => this.quoteDraftService.quoteDraft),\n this.handleErrorAndBounceBack(currentState),\n );\n }\n\n public get(): Observable<LineItem[]> {\n return this.quoteDraftService.quoteDraft$.pipe(\n map(() => this.quoteDraftService.activeCurrentState),\n shareReplay(),\n );\n }\n\n public getSnapshot(): LineItem[] {\n return this.quoteDraftService?.currentState.slice() ?? [];\n }\n\n public get charges$(): Observable<Dictionary<PricePlanCharge>> {\n return this.quoteDraftService.quoteDraft$.pipe(map(({ charges }) => charges));\n }\n\n public get chargesSnapshot(): Dictionary<PricePlanCharge> {\n return this.quoteDraftService.quoteDraft?.charges ?? {};\n }\n\n public get contextSnapshot(): ConfigurationContext {\n return this.contextService.resolve();\n }\n\n public get context$(): Observable<ConfigurationContext> {\n return this.contextService.resolve$();\n }\n\n private handleErrorAndBounceBack(stateToRestore: LineItem[]) {\n return <T>(source$: Observable<T>): Observable<T> => {\n return source$.pipe(\n catchError(error => {\n console.error(error);\n\n // bounce back if configuration call has failed\n this.quoteDraftService.setCurrentLineItemState(stateToRestore);\n\n return throwError(() => error);\n }),\n );\n };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { PriceApiService } from '@veloce/api';\nimport { FlowConfigurationService } from './services/flow-configuration.service';\nimport { FlowUpdateService } from './services/flow-update.service';\n\n@NgModule({\n imports: [],\n providers: [FlowConfigurationService, FlowUpdateService, PriceApiService],\n})\nexport class FlowConfigurationModule {}\n","import { NgModule } from '@angular/core';\nimport { ConfigurationApiService, ContextApiService, ProductModelApiService } from '@veloce/api';\nimport { ConfirmationDialogModule } from '@veloce/components';\nimport { ConfigurationRuntimeService } from './services/configuration-runtime.service';\nimport { ConfigurationService } from './services/configuration.service';\nimport { RuntimeContextService } from './services/runtime-context.service';\n\n@NgModule({\n imports: [ConfirmationDialogModule],\n providers: [\n ContextApiService,\n ProductModelApiService,\n ConfigurationApiService,\n ConfigurationRuntimeService,\n RuntimeContextService,\n ConfigurationService,\n ],\n})\nexport class ConfigurationModule {}\n","import { NgModule } from '@angular/core';\nimport { FlowConfigurationModule } from './modules';\nimport { ConfigurationModule } from './modules/configuration/configuration.module';\nimport { ContextService, ProductImagesService, QuoteDraftService } from './services';\n\n@NgModule({\n imports: [ConfigurationModule, FlowConfigurationModule],\n providers: [ContextService, QuoteDraftService, ProductImagesService],\n})\nexport class SdkCoreModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map","tap","catchError","shareReplay","switchMap"],"mappings":";;;;;;;;;;;;;MAGa,kBAAkB,GAAG,CAChC,OAAuB,EACvB,sBAAyC,EACzC,GAAG,GAAG,CAAC;;IAEP,MAAM,EAAE,GAAG,IAAI,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+14,7 @@ import * as i2 from 'primeng/button';
|
|
14
14
|
import { ButtonModule } from 'primeng/button';
|
15
15
|
import * as i1 from 'primeng/dynamicdialog';
|
16
16
|
import { UITemplateComponentType, UITemplateType, ConfigurationContextMode, EntityUtil } from '@veloce/core';
|
17
|
-
import { Subject, BehaviorSubject, tap, takeUntil, catchError, of, map, switchMap, filter, shareReplay, startWith, distinctUntilChanged, combineLatest,
|
17
|
+
import { Subject, BehaviorSubject, tap, takeUntil, first, catchError, of, map, switchMap, filter, shareReplay, startWith, distinctUntilChanged, combineLatest, finalize, noop, from } from 'rxjs';
|
18
18
|
import * as i3$1 from 'primeng/overlaypanel';
|
19
19
|
import { OverlayPanel, OverlayPanelModule } from 'primeng/overlaypanel';
|
20
20
|
import * as i11 from 'primeng/tooltip';
|
@@ -121,7 +121,7 @@ class DocGenComponent {
|
|
121
121
|
this.isVisible$ = this.docGenService.isVisible$;
|
122
122
|
// initialize when quote draft requested
|
123
123
|
this.quoteDraftService.quoteDraft$
|
124
|
-
.pipe(tap(() => this.initialize()), takeUntil(this.destroy$))
|
124
|
+
.pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
125
125
|
.subscribe();
|
126
126
|
}
|
127
127
|
ngOnDestroy() {
|
@@ -424,7 +424,7 @@ class CartPreviewComponent {
|
|
424
424
|
}
|
425
425
|
}
|
426
426
|
CartPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, deps: [{ token: i2$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i2$1.ProductImagesService }, { token: i2$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
|
427
|
-
CartPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *vlLet=\"isEditMode$ | async as isEditMode\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!isEditMode || !product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"!isEditMode || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n [disabled]=\"!isEditMode\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">$
|
427
|
+
CartPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *vlLet=\"isEditMode$ | async as isEditMode\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!isEditMode || !product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"!isEditMode || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n [disabled]=\"!isEditMode\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">${{ product.mrr }}</span>\n <span class=\"text-right pt-3\">${{ product.nrr }}</span>\n </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"!isEditMode || readonlyProductId\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: [".flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.empty-state{color:var(--vl-text-color-deep-accent)}.scrollable-wrapper{overflow:auto}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px 0}.product:not(.header){border-bottom:1px solid var(--vl-border-color)}.product.header{color:var(--vl-text-color-deep-accent)}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;width:100%}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i3$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
428
428
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, decorators: [{
|
429
429
|
type: Component,
|
430
430
|
args: [{
|
@@ -578,6 +578,8 @@ class FlowHeaderComponent {
|
|
578
578
|
this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
|
579
579
|
this.isCartRoute$ = this.routerService.isCartRoute$();
|
580
580
|
this.isCatalogRoute$ = this.routerService.isCatalogRoute$();
|
581
|
+
this.totalMRR$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties.VDM_Total_MRR), distinctUntilChanged(), map(mrr => this.formatMetric(mrr)));
|
582
|
+
this.totalNRR$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties.VDM_Total_NRR), distinctUntilChanged(), map(nrr => this.formatMetric(nrr)));
|
581
583
|
}
|
582
584
|
ngOnInit() {
|
583
585
|
this.populateObjectDetails();
|
@@ -626,7 +628,7 @@ class FlowHeaderComponent {
|
|
626
628
|
}
|
627
629
|
let observable = of(true);
|
628
630
|
if (this.quoteDraftService.hasUnsavedChanges) {
|
629
|
-
observable = this.dialogService.showDocgenUnsavedChangesDialog().pipe(switchMap(confirmed => (confirmed ? this.saveQuote$() : of(true))), map(() => true));
|
631
|
+
observable = this.dialogService.showDocgenUnsavedChangesDialog().pipe(switchMap(confirmed => (confirmed ? this.saveQuote$(true) : of(true))), map(() => true));
|
630
632
|
}
|
631
633
|
observable
|
632
634
|
.pipe(first(), tap(() => this.integrationState.dispatch(OpenDocGenAction())))
|
@@ -678,7 +680,7 @@ class FlowHeaderComponent {
|
|
678
680
|
selectPriceList(priceListId) {
|
679
681
|
this.quoteDraftService.updateActivePriceList(priceListId);
|
680
682
|
}
|
681
|
-
saveQuote$() {
|
683
|
+
saveQuote$(stayOnPage = false) {
|
682
684
|
const quoteDraft = this.quoteDraftService.quoteDraft;
|
683
685
|
if (!quoteDraft) {
|
684
686
|
return of(undefined);
|
@@ -686,7 +688,9 @@ class FlowHeaderComponent {
|
|
686
688
|
this.isSaveInProgress$.next(true);
|
687
689
|
return this.quoteApiService.upsertQuote(quoteDraft).pipe(tap(({ quoteId }) => {
|
688
690
|
this.quoteDraftService.hasUnsavedChanges = false;
|
689
|
-
|
691
|
+
if (!stayOnPage) {
|
692
|
+
this.back(quoteId);
|
693
|
+
}
|
690
694
|
}), finalize(() => this.isSaveInProgress$.next(false)), map(noop), takeUntil(this.destroyed$));
|
691
695
|
}
|
692
696
|
queryName$(objectName, id) {
|
@@ -715,6 +719,9 @@ class FlowHeaderComponent {
|
|
715
719
|
this.queryName$('Account', accountId).subscribe(accountName => this.objectDetails$.next(Object.assign(Object.assign({}, this.objectDetails$.value), { accountName })));
|
716
720
|
this.queryName$('Opportunity', opportunityId).subscribe(opportunityName => this.objectDetails$.next(Object.assign(Object.assign({}, this.objectDetails$.value), { opportunityName })));
|
717
721
|
}
|
722
|
+
formatMetric(value) {
|
723
|
+
return (value ? Number(value) : 0).toFixed(2);
|
724
|
+
}
|
718
725
|
generateProducts(lineItems) {
|
719
726
|
const date = new Date();
|
720
727
|
date.setHours(0, 0, 0, 0);
|
@@ -738,8 +745,8 @@ class FlowHeaderComponent {
|
|
738
745
|
name: target.name,
|
739
746
|
configurable: target.properties['#configurable'] === 'true',
|
740
747
|
qty: target.qty,
|
741
|
-
mrr:
|
742
|
-
nrr:
|
748
|
+
mrr: this.formatMetric(target.properties.VDM_Total_MRR),
|
749
|
+
nrr: this.formatMetric(target.properties.VDM_Total_NRR),
|
743
750
|
},
|
744
751
|
];
|
745
752
|
}
|
@@ -748,7 +755,7 @@ class FlowHeaderComponent {
|
|
748
755
|
}
|
749
756
|
}
|
750
757
|
FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i2$1.ContextService }, { token: i2$1.QuoteDraftService }, { token: i2$2.QuoteApiService }, { token: i2$2.SalesforceApiService }, { token: i2$1.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }, { token: i1$1.IntegrationState }], target: i0.ɵɵFactoryTarget.Component });
|
751
|
-
FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\"> To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\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\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ status$ | async }}</span>\n\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 center\" #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\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n <span>{{ details.accountName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n <span>{{ details.opportunityName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n <span>{{ details.quoteName }}</span>\n </a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCatalogRoute$ | async }\" (click)=\"navigateToCatalog()\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-cart-preview #cart [products]=\"products\"></vl-cart-preview>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <ng-container *ngIf=\"isAccountMode && assetPriceLists.length > 1\">\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList?.name }}</span>\n <i *ngIf=\"!priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"price-list-overlay\" #priceListsOverlay>\n <ng-template pTemplate>\n <span\n *ngFor=\"let option of assetPriceLists\"\n class=\"price-list-option\"\n [class.active]=\"priceList?.id === option.id\"\n (click)=\"selectPriceList(option.id); priceListsOverlay.hide()\"\n >{{ option.name }}</span\n >\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span>{{ priceList?.name }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span>MRR: <span class=\"font-semibold\">$0.00</span></span>\n <span>NRR: <span class=\"font-semibold\">$0.00</span></span>\n </ng-container>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <p-button\n styleClass=\"p-button-outlined\"\n label=\"Generate Doc\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n (onClick)=\"docGenButtonClickHandler()\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button-outlined\"\n [label]=\"isSaveInProgress ? 'Saving' : 'Save to Quote'\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"isSaveInProgress\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n [label]=\"isSubmitInProgress ? 'Submitting' : 'Submit For Approval'\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n (onClick)=\"submitButtonClickHandler()\"\n [loading]=\"isSubmitInProgress\"\n ></p-button>\n </ng-container>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}::ng-deep .p-overlaypanel.price-list-overlay .p-overlaypanel-content{border-radius:5px;border-color:var(--vl-border-color);padding:0;display:flex;flex-direction:column;max-height:140px;overflow:auto}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button .p-button-label{white-space:nowrap}:host ::ng-deep .save-button .p-button{width:120px}:host ::ng-deep .submit-button .p-button{width:160px}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__wrapper .info-list__row a{text-align:right}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.flow-navigation{flex-grow:1;display:flex;grid-gap:16px;gap:16px;justify-content:center;font-weight:600}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:-14px}.flow-navigation .nav-item,.flow-navigation .nav-popover-toggle{opacity:.6}.flow-navigation .nav-item.active,.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active,.flow-navigation .nav-popover-toggle:not(.disabled):hover{opacity:1}.price-list-option{padding:8px;color:var(--vl-primary-color);cursor:pointer}.price-list-option.active,.price-list-option:hover{background:var(--vl-secondary-nav-bg)}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i3$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: CartPreviewComponent, selector: "vl-cart-preview", inputs: ["products"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i8.AsyncPipe, "date": i8.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
758
|
+
FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\"> To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\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\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ status$ | async }}</span>\n\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 center\" #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\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n <span>{{ details.accountName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n <span>{{ details.opportunityName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n <span>{{ details.quoteName }}</span>\n </a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCatalogRoute$ | async }\" (click)=\"navigateToCatalog()\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-cart-preview #cart [products]=\"products\"></vl-cart-preview>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <ng-container *ngIf=\"isAccountMode && assetPriceLists.length > 1\">\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList?.name }}</span>\n <i *ngIf=\"!priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"price-list-overlay\" #priceListsOverlay>\n <ng-template pTemplate>\n <span\n *ngFor=\"let option of assetPriceLists\"\n class=\"price-list-option\"\n [class.active]=\"priceList?.id === option.id\"\n (click)=\"selectPriceList(option.id); priceListsOverlay.hide()\"\n >{{ option.name }}</span\n >\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span>{{ priceList?.name }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span class=\"metrics\">\n <div class=\"metrics__row\">\n MRR: <span class=\"font-semibold\">${{ totalMRR$ | async }}</span>\n </div>\n <div class=\"metrics__row\">\n NRR: <span class=\"font-semibold\">${{ totalNRR$ | async }}</span>\n </div>\n </span>\n </ng-container>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <p-button\n styleClass=\"p-button-outlined\"\n label=\"Generate Doc\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n (onClick)=\"docGenButtonClickHandler()\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button-outlined\"\n [label]=\"isSaveInProgress ? 'Saving' : 'Save to Quote'\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"isSaveInProgress\"\n ></p-button>\n\n <p-button\n *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n [label]=\"isSubmitInProgress ? 'Submitting' : 'Submit For Approval'\"\n [disabled]=\"!isCartRoute\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"300\"\n [pTooltip]=\"isCartRoute ? '' : disabledActionButtonTooltip\"\n (onClick)=\"submitButtonClickHandler()\"\n [loading]=\"isSubmitInProgress\"\n ></p-button>\n </ng-container>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}::ng-deep .p-overlaypanel.price-list-overlay .p-overlaypanel-content{border-radius:5px;border-color:var(--vl-border-color);padding:0;display:flex;flex-direction:column;max-height:140px;overflow:auto}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button .p-button-label{white-space:nowrap}:host ::ng-deep .save-button .p-button{width:120px}:host ::ng-deep .submit-button .p-button{width:160px}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__wrapper .info-list__row a{text-align:right}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.flow-navigation{flex-grow:1;display:flex;grid-gap:16px;gap:16px;justify-content:center;font-weight:600}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:-14px}.flow-navigation .nav-item,.flow-navigation .nav-popover-toggle{opacity:.6}.flow-navigation .nav-item.active,.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active,.flow-navigation .nav-popover-toggle:not(.disabled):hover{opacity:1}.price-list-option{padding:8px;color:var(--vl-primary-color);cursor:pointer}.price-list-option.active,.price-list-option:hover{background:var(--vl-secondary-nav-bg)}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i3$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: CartPreviewComponent, selector: "vl-cart-preview", inputs: ["products"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i8.AsyncPipe, "date": i8.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
752
759
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
753
760
|
type: Component,
|
754
761
|
args: [{
|
@@ -1689,7 +1696,7 @@ class QuoteResolver {
|
|
1689
1696
|
return of(true);
|
1690
1697
|
}
|
1691
1698
|
const { queryParams } = route;
|
1692
|
-
return this.quoteDraftService.init(headerId, queryParams).pipe(catchError(e => {
|
1699
|
+
return this.quoteDraftService.init(headerId, queryParams).pipe(switchMap(() => this.flowConfiguration.calculate$()), tap(() => (this.quoteDraftService.isInitialized = true)), catchError(e => {
|
1693
1700
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1694
1701
|
return this.handleError(route, message);
|
1695
1702
|
}));
|