@veloceapps/sdk 4.0.20 → 4.0.21
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-cms.umd.js +13 -1
- package/bundles/veloce-sdk-cms.umd.js.map +1 -1
- package/bundles/veloce-sdk.umd.js +601 -154
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/cms/cms.actions.d.ts +5 -1
- package/cms/vendor-map.d.ts +2 -0
- package/esm2015/cms/cms.actions.js +9 -1
- package/esm2015/src/flow-routing.module.js +13 -1
- package/esm2015/src/guards/context.guard.js +14 -5
- package/esm2015/src/pages/remote/remote.component.js +353 -0
- package/esm2015/src/pages/remote/remote.module.js +20 -0
- package/esm2015/src/pages/remote/remote.types.js +2 -0
- package/esm2015/src/resolvers/flow.resolver.js +3 -3
- package/esm2015/src/utils/flow.utils.js +10 -2
- package/fesm2015/veloce-sdk-cms.js +12 -2
- package/fesm2015/veloce-sdk-cms.js.map +1 -1
- package/fesm2015/veloce-sdk.js +464 -83
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +2 -2
- package/src/flow-routing.module.d.ts +3 -2
- package/src/guards/context.guard.d.ts +1 -0
- package/src/pages/remote/remote.component.d.ts +47 -0
- package/src/pages/remote/remote.module.d.ts +10 -0
- package/src/pages/remote/remote.types.d.ts +4 -0
- package/src/utils/flow.utils.d.ts +7 -0
package/fesm2015/veloce-sdk.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
import * as
|
1
|
+
import * as i5 from '@angular/common';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
4
|
import { Component, ChangeDetectionStrategy, NgModule, Injectable, ViewChild, Input, InjectionToken, Optional, Inject } from '@angular/core';
|
5
|
-
import * as i2$
|
5
|
+
import * as i2$1 from '@veloce/api';
|
6
6
|
import { ApiModule } from '@veloce/api';
|
7
7
|
import * as i3 from '@veloce/components';
|
8
8
|
import { ToastType, LetDirectiveModule, LoaderModule, EmptyStateModule } from '@veloce/components';
|
9
|
-
import * as
|
9
|
+
import * as i4 from '@veloce/sdk/cms';
|
10
10
|
import { FlowAction, extractElementMetadata, extendElementMetadata, PreviewModule, OpenDocGenAction, LauncherModule } from '@veloce/sdk/cms';
|
11
|
-
import * as
|
11
|
+
import * as i1$1 from '@veloce/sdk/core';
|
12
12
|
import { RuntimeOperation, SdkCoreModule } from '@veloce/sdk/core';
|
13
13
|
import * as i2 from 'primeng/button';
|
14
14
|
import { ButtonModule } from 'primeng/button';
|
15
15
|
import * as i1 from 'primeng/dynamicdialog';
|
16
|
-
import { UITemplateComponentType, UITemplateType, ConfigurationContextMode, SalesforceIdUtils, EntityUtil } from '@veloce/core';
|
16
|
+
import { UITemplateComponentType, UITemplateType, ConfigurationContextMode, SalesforceIdUtils, EntityUtil, UUID } from '@veloce/core';
|
17
17
|
import { Subject, BehaviorSubject, tap, takeUntil, first, catchError, of, map, switchMap, filter, shareReplay, startWith, distinctUntilChanged, combineLatest, finalize, noop, from, throwError } from 'rxjs';
|
18
18
|
import * as i3$1 from 'primeng/overlaypanel';
|
19
19
|
import { OverlayPanel, OverlayPanelModule } from 'primeng/overlaypanel';
|
@@ -25,11 +25,11 @@ import * as i6$1 from '@angular/forms';
|
|
25
25
|
import { FormGroup, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
26
26
|
import * as i6 from 'primeng/inputnumber';
|
27
27
|
import { InputNumberModule } from 'primeng/inputnumber';
|
28
|
-
import * as i4 from 'primeng/virtualscroller';
|
28
|
+
import * as i4$1 from 'primeng/virtualscroller';
|
29
29
|
import { VirtualScrollerModule } from 'primeng/virtualscroller';
|
30
|
-
import * as i1$
|
30
|
+
import * as i1$2 from '@angular/router';
|
31
31
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
32
|
-
import * as i2$
|
32
|
+
import * as i2$2 from 'primeng/api';
|
33
33
|
import { HttpErrorResponse } from '@angular/common/http';
|
34
34
|
import { DropdownModule } from 'primeng/dropdown';
|
35
35
|
import * as i7 from 'primeng/inputtext';
|
@@ -37,9 +37,9 @@ import { InputTextModule } from 'primeng/inputtext';
|
|
37
37
|
import * as i5$1 from 'primeng/radiobutton';
|
38
38
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
39
39
|
import { first as first$1, takeUntil as takeUntil$1, take, map as map$1, switchMap as switchMap$1 } from 'rxjs/operators';
|
40
|
-
import * as i4$
|
40
|
+
import * as i4$2 from '@veloce/sdk/runtime';
|
41
41
|
import { RuntimeModule } from '@veloce/sdk/runtime';
|
42
|
-
import * as i1$
|
42
|
+
import * as i1$3 from 'ngx-bootstrap/tooltip';
|
43
43
|
import { TooltipModule as TooltipModule$1 } from 'ngx-bootstrap/tooltip';
|
44
44
|
|
45
45
|
const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
|
@@ -58,7 +58,7 @@ class FlowDialogComponent {
|
|
58
58
|
}
|
59
59
|
}
|
60
60
|
FlowDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogComponent, deps: [{ token: i1.DynamicDialogConfig }, { token: i1.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
61
|
-
FlowDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0, template: "<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .description{flex:1;padding:0 24px 24px;font-weight:400;font-size:12px;line-height:16px;color:var(--vl-text-color-deep-accent)}:host .form-actions{border-top:1px solid var(--vl-border-color);padding:1.5rem 2.2rem;display:flex;justify-content:flex-end;width:100%;grid-gap:10px;gap:10px}\n"], components: [{ type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type:
|
61
|
+
FlowDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0, template: "<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .description{flex:1;padding:0 24px 24px;font-weight:400;font-size:12px;line-height:16px;color:var(--vl-text-color-deep-accent)}:host .form-actions{border-top:1px solid var(--vl-border-color);padding:1.5rem 2.2rem;display:flex;justify-content:flex-end;width:100%;grid-gap:10px;gap:10px}\n"], components: [{ type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
62
62
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogComponent, decorators: [{
|
63
63
|
type: Component,
|
64
64
|
args: [{
|
@@ -105,11 +105,11 @@ class FlowDocGenService {
|
|
105
105
|
.subscribe();
|
106
106
|
}
|
107
107
|
}
|
108
|
-
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDocGenService, deps: [{ token:
|
108
|
+
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDocGenService, deps: [{ token: i4.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
109
109
|
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDocGenService });
|
110
110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDocGenService, decorators: [{
|
111
111
|
type: Injectable
|
112
|
-
}], ctorParameters: function () { return [{ type:
|
112
|
+
}], ctorParameters: function () { return [{ type: i4.IntegrationState }]; } });
|
113
113
|
|
114
114
|
class DocGenComponent {
|
115
115
|
constructor(quoteDraftService, contextService, templatesApi, docGenService, toastService) {
|
@@ -196,8 +196,8 @@ class DocGenComponent {
|
|
196
196
|
}));
|
197
197
|
}
|
198
198
|
}
|
199
|
-
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenComponent, deps: [{ token:
|
200
|
-
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"isVisible$ | async\">\n <ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], components: [{ type:
|
199
|
+
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2$1.UITemplatesApiService }, { token: FlowDocGenService }, { token: i3.ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
200
|
+
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"isVisible$ | async\">\n <ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], components: [{ type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
201
201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocGenComponent, decorators: [{
|
202
202
|
type: Component,
|
203
203
|
args: [{
|
@@ -206,7 +206,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
206
206
|
styleUrls: ['./doc-gen.component.scss'],
|
207
207
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
208
208
|
}]
|
209
|
-
}], ctorParameters: function () { return [{ type:
|
209
|
+
}], ctorParameters: function () { return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2$1.UITemplatesApiService }, { type: FlowDocGenService }, { type: i3.ToastService }]; } });
|
210
210
|
|
211
211
|
class DocGenModule {
|
212
212
|
}
|
@@ -332,12 +332,12 @@ class FlowRouterService {
|
|
332
332
|
this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
|
333
333
|
}
|
334
334
|
}
|
335
|
-
FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$
|
335
|
+
FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i1$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
336
336
|
FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
|
337
337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRouterService, decorators: [{
|
338
338
|
type: Injectable,
|
339
339
|
args: [{ providedIn: 'root' }]
|
340
|
-
}], ctorParameters: function () { return [{ type: i1$
|
340
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i1$1.ContextService }]; } });
|
341
341
|
|
342
342
|
class CartPreviewComponent {
|
343
343
|
constructor(flowConfiguration, routerService, productImagesService, quoteDraftService) {
|
@@ -429,8 +429,8 @@ class CartPreviewComponent {
|
|
429
429
|
this.hasTermInProducts = products.some((item) => item.hasTerm);
|
430
430
|
}
|
431
431
|
}
|
432
|
-
CartPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, deps: [{ token:
|
433
|
-
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 no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"lockedProductId$ | async as lockedProductId\">\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 <p-virtualScroller [value]=\"products\" scrollHeight=\"{{ scrollHeight }}px\" [itemSize]=\"productRowHeight\">\n <ng-template pTemplate=\"header\">\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 </ng-template>\n\n <ng-template pTemplate=\"item\" let-product>\n <div\n class=\"product item\"\n *vlLet=\"!isEditMode || product.deleted as isReadonlyProduct\"\n [class.readonly]=\"isReadonlyProduct\"\n [class.deleted]=\"product.deleted\"\n >\n <ng-container *vlLet=\"lockedProductId === product.productId as isLockedProduct\">\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\" [class.line-through]=\"product.deleted\">{{ product.name }}</div>\n <div *ngIf=\"!isReadonlyProduct\">\n <p-button\n label=\"Configure\"\n [disabled]=\"isLockedProduct || !product.configurable || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-2 pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"isLockedProduct || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-button-danger p-2 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"form.controls[product.id] as control\">\n <span class=\"pt-2\" *ngIf=\"!isReadonlyProduct; else readonlyQty\">\n <p-inputNumber\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <ng-template #readonlyQty\n ><span class=\"text-right\">{{ control.value }}</span></ng-template\n >\n </ng-container>\n\n <span class=\"text-right\" [class.pt-3]=\"!isReadonlyProduct\">${{ product.mrr }}</span>\n <span class=\"text-right\" [class.pt-3]=\"!isReadonlyProduct\">${{ product.nrr }}</span>\n </ng-container>\n </div>\n </ng-template>\n </p-virtualScroller>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n\n <div class=\"flex justify-content-end footer\">\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 || !!lockedProductId || hasTermInProducts\"\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: ["p-virtualscroller ::ng-deep .p-virtualscroller-header{background:none;padding:0;border:none;font-weight:unset}p-virtualscroller ::ng-deep cdk-virtual-scroll-viewport{overflow-y:scroll}.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;padding:16px}.empty-state{color:var(--vl-text-color-deep-accent);padding:0 16px 16px}.product{display:grid;grid-template-columns:auto 60px 70px 70px;padding:16px;border-bottom:1px solid var(--vl-border-color)}.product.readonly{align-items:center}.product.deleted{opacity:.5}.product.header{position:-webkit-sticky;position:sticky;top:0;background-color:var(--surface-card);z-index:1;color:var(--vl-text-color-deep-accent);padding-bottom:0;border-bottom:none;overflow-y:scroll}.product .item{height:97px;overflow:hidden}.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;height:24px;width:100%}.footer{padding:12px 16px}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}:host ::ng-deep .p-overlaypanel.navigation-settings-overlay{margin-top:20px}\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: i4.VirtualScroller, selector: "p-virtualScroller", inputs: ["value", "itemSize", "style", "styleClass", "scrollHeight", "lazy", "rows", "minBufferPx", "maxBufferPx", "delay", "trackBy", "totalRecords", "first", "cache"], outputs: ["onLazyLoad"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6.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$
|
432
|
+
CartPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, deps: [{ token: i1$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i1$1.ProductImagesService }, { token: i1$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
|
433
|
+
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 no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"lockedProductId$ | async as lockedProductId\">\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 <p-virtualScroller [value]=\"products\" scrollHeight=\"{{ scrollHeight }}px\" [itemSize]=\"productRowHeight\">\n <ng-template pTemplate=\"header\">\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 </ng-template>\n\n <ng-template pTemplate=\"item\" let-product>\n <div\n class=\"product item\"\n *vlLet=\"!isEditMode || product.deleted as isReadonlyProduct\"\n [class.readonly]=\"isReadonlyProduct\"\n [class.deleted]=\"product.deleted\"\n >\n <ng-container *vlLet=\"lockedProductId === product.productId as isLockedProduct\">\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\" [class.line-through]=\"product.deleted\">{{ product.name }}</div>\n <div *ngIf=\"!isReadonlyProduct\">\n <p-button\n label=\"Configure\"\n [disabled]=\"isLockedProduct || !product.configurable || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-2 pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"isLockedProduct || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-button-danger p-2 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"form.controls[product.id] as control\">\n <span class=\"pt-2\" *ngIf=\"!isReadonlyProduct; else readonlyQty\">\n <p-inputNumber\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <ng-template #readonlyQty\n ><span class=\"text-right\">{{ control.value }}</span></ng-template\n >\n </ng-container>\n\n <span class=\"text-right\" [class.pt-3]=\"!isReadonlyProduct\">${{ product.mrr }}</span>\n <span class=\"text-right\" [class.pt-3]=\"!isReadonlyProduct\">${{ product.nrr }}</span>\n </ng-container>\n </div>\n </ng-template>\n </p-virtualScroller>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n\n <div class=\"flex justify-content-end footer\">\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 || !!lockedProductId || hasTermInProducts\"\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: ["p-virtualscroller ::ng-deep .p-virtualscroller-header{background:none;padding:0;border:none;font-weight:unset}p-virtualscroller ::ng-deep cdk-virtual-scroll-viewport{overflow-y:scroll}.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;padding:16px}.empty-state{color:var(--vl-text-color-deep-accent);padding:0 16px 16px}.product{display:grid;grid-template-columns:auto 60px 70px 70px;padding:16px;border-bottom:1px solid var(--vl-border-color)}.product.readonly{align-items:center}.product.deleted{opacity:.5}.product.header{position:-webkit-sticky;position:sticky;top:0;background-color:var(--surface-card);z-index:1;color:var(--vl-text-color-deep-accent);padding-bottom:0;border-bottom:none;overflow-y:scroll}.product .item{height:97px;overflow:hidden}.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;height:24px;width:100%}.footer{padding:12px 16px}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}:host ::ng-deep .p-overlaypanel.navigation-settings-overlay{margin-top:20px}\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: i4$1.VirtualScroller, selector: "p-virtualScroller", inputs: ["value", "itemSize", "style", "styleClass", "scrollHeight", "lazy", "rows", "minBufferPx", "maxBufferPx", "delay", "trackBy", "totalRecords", "first", "cache"], outputs: ["onLazyLoad"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6.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$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
434
434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, decorators: [{
|
435
435
|
type: Component,
|
436
436
|
args: [{
|
@@ -439,7 +439,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
439
439
|
styleUrls: ['./cart-preview.component.scss'],
|
440
440
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
441
441
|
}]
|
442
|
-
}], ctorParameters: function () { return [{ type:
|
442
|
+
}], ctorParameters: function () { return [{ type: i1$1.FlowConfigurationService }, { type: FlowRouterService }, { type: i1$1.ProductImagesService }, { type: i1$1.QuoteDraftService }]; }, propDecorators: { overlayPanel: [{
|
443
443
|
type: ViewChild,
|
444
444
|
args: [OverlayPanel]
|
445
445
|
}], products: [{
|
@@ -594,11 +594,11 @@ class FlowDialogService {
|
|
594
594
|
});
|
595
595
|
}
|
596
596
|
}
|
597
|
-
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token:
|
597
|
+
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i1$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
598
598
|
FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogService });
|
599
599
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowDialogService, decorators: [{
|
600
600
|
type: Injectable
|
601
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type:
|
601
|
+
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i1$1.ContextService }]; } });
|
602
602
|
|
603
603
|
class FlowHeaderComponent {
|
604
604
|
constructor(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService, integrationState) {
|
@@ -854,8 +854,8 @@ class FlowHeaderComponent {
|
|
854
854
|
!this.quoteDraftService.hasAssets);
|
855
855
|
}
|
856
856
|
}
|
857
|
-
FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowHeaderComponent, deps: [{ token:
|
858
|
-
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 to {{ objectName | titlecase }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></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 <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCatalogRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToCatalog()\"\n >\n Catalog\n </nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToShoppingCart()\"\n >\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav\n class=\"nav-popover-toggle\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"toggleCartOverlay(cart, $event)\"\n >\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 </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <div>\n <ng-container *ngIf=\"isAccountMode && assetPriceLists.length > 1; else singlePriceList\">\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-template #singlePriceList>\n <div>{{ priceList?.name }}</div>\n </ng-template>\n\n <div *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</div>\n </div>\n </ng-container>\n\n <span class=\"metrics\">\n <div class=\"metrics__row\">\n <span>MRR:</span>\n <span class=\"font-semibold\">${{ totalMRR$ | async }}</span>\n </div>\n <div class=\"metrics__row\">\n <span>NRR:</span>\n <span class=\"font-semibold\">${{ totalNRR$ | async }}</span>\n </div>\n </span>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <p-button\n class=\"doc-gen-button\"\n icon=\"vl-icon vl-icon-doc-gen\"\n [disabled]=\"isReadonlyMode\"\n (onClick)=\"docGenButtonClickHandler(isCartRoute)\"\n ></p-button>\n\n <ng-container *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\">\n <ng-container *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\">\n <p-splitButton\n *ngIf=\"!isSaveInProgress && !isSubmitInProgress\"\n label=\"Save to Quote\"\n (onClick)=\"saveButtonClickHandler(isCartRoute)\"\n [model]=\"getSplitButtonActions(isCartRoute)\"\n [disabled]=\"isReadonlyMode\"\n styleClass=\"p-button-outlined\"\n >\n </p-splitButton>\n\n <p-button\n *ngIf=\"isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button\"\n label=\"Saving\"\n [loading]=\"true\"\n ></p-button>\n\n <p-button\n *ngIf=\"isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n label=\"Submitting\"\n [loading]=\"true\"\n ></p-button>\n </ng-container>\n </ng-container>\n </ng-container>\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.no-padding .p-overlaypanel-content{padding:0}::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-splitButton{height:32px;width:146px;display:flex}:host ::ng-deep p-splitButton .p-splitbutton{display:flex;font-size:12px;border-radius:2px;height:100%;width:100%;-webkit-backface-visibility:hidden}:host ::ng-deep p-splitButton .p-splitbutton .p-button:focus{box-shadow:none}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-defaultbutton{padding:7px 12px 7px 10px}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-defaultbutton:disabled{opacity:.2}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-menubutton:disabled{opacity:.3}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button{background-color:#fff;color:var(--vl-primary-color);border:1px solid #fff}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button:enabled:hover{background-color:var(--vl-secondary-nav-bg);color:var(--vl-primary-color);border:1px solid var(--vl-secondary-nav-bg);outline:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-menubutton{background-color:var(--vl-secondary-nav-bg);border-radius:0 2px 2px 0;border:1px solid var(--vl-secondary-nav-bg);border-left:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-menubutton:hover{background-color:var(--vl-secondary-nav-bg);border:1px solid var(--vl-secondary-nav-bg);border-left:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-defaultbutton{border-radius:2px 0 0 2px}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-defaultbutton .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}:host ::ng-deep p-splitButton .p-splitbutton .p-menu{display:flex;width:auto;margin-top:2px;border-radius:4px;border:1px solid var(--vl-border-color);box-shadow:0 4px 20px #2767c11a}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list{display:flex;flex-direction:column}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem{display:flex;width:100%;height:32px}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link{padding:8px;width:100%;height:100%}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link:not(.p-disabled):hover{background-color:var(--vl-secondary-nav-bg)}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link:not(.p-disabled):hover .p-menuitem-text{color:var(--vl-primary-color)}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link .p-menuitem-text{line-height:16px;font-size:12px;letter-spacing:.3px;white-space:nowrap}:host ::ng-deep .doc-gen-button{height:32px;width:32px;display:inline-flex}:host ::ng-deep .doc-gen-button .p-button{border:1px solid #fff;border-radius:2px;width:100%;height:100%}:host ::ng-deep .doc-gen-button .p-button.p-component:disabled{opacity:.3}:host ::ng-deep .save-button,:host ::ng-deep .submit-button{height:32px;width:146px;display:flex}:host ::ng-deep .save-button .p-button,:host ::ng-deep .submit-button .p-button{border-radius:3px;width:100%;height:100%;background:rgba(255,255,255,.3);opacity:1;border:none}:host ::ng-deep .save-button .p-button .p-button-label,:host ::ng-deep .submit-button .p-button .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.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 .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;height:14px}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}.metrics__row{display:flex;justify-content:space-between;grid-gap:2px;gap:2px}.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:not(.disabled),.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active:not(.disabled),.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:16px;gap:16px}\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"] }, { type: i9.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onClick", "onDropdownClick"] }], directives: [{ type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i12.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: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i11.AsyncPipe, "titlecase": i11.TitleCasePipe, "date": i11.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
857
|
+
FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }, { token: i2$1.QuoteApiService }, { token: i2$1.SalesforceApiService }, { token: i1$1.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }, { token: i4.IntegrationState }], target: i0.ɵɵFactoryTarget.Component });
|
858
|
+
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 to {{ objectName | titlecase }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></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 <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCatalogRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToCatalog()\"\n >\n Catalog\n </nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToShoppingCart()\"\n >\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav\n class=\"nav-popover-toggle\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"toggleCartOverlay(cart, $event)\"\n >\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 </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <div>\n <ng-container *ngIf=\"isAccountMode && assetPriceLists.length > 1; else singlePriceList\">\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-template #singlePriceList>\n <div>{{ priceList?.name }}</div>\n </ng-template>\n\n <div *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</div>\n </div>\n </ng-container>\n\n <span class=\"metrics\">\n <div class=\"metrics__row\">\n <span>MRR:</span>\n <span class=\"font-semibold\">${{ totalMRR$ | async }}</span>\n </div>\n <div class=\"metrics__row\">\n <span>NRR:</span>\n <span class=\"font-semibold\">${{ totalNRR$ | async }}</span>\n </div>\n </span>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <p-button\n class=\"doc-gen-button\"\n icon=\"vl-icon vl-icon-doc-gen\"\n [disabled]=\"isReadonlyMode\"\n (onClick)=\"docGenButtonClickHandler(isCartRoute)\"\n ></p-button>\n\n <ng-container *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\">\n <ng-container *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\">\n <p-splitButton\n *ngIf=\"!isSaveInProgress && !isSubmitInProgress\"\n label=\"Save to Quote\"\n (onClick)=\"saveButtonClickHandler(isCartRoute)\"\n [model]=\"getSplitButtonActions(isCartRoute)\"\n [disabled]=\"isReadonlyMode\"\n styleClass=\"p-button-outlined\"\n >\n </p-splitButton>\n\n <p-button\n *ngIf=\"isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button\"\n label=\"Saving\"\n [loading]=\"true\"\n ></p-button>\n\n <p-button\n *ngIf=\"isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n label=\"Submitting\"\n [loading]=\"true\"\n ></p-button>\n </ng-container>\n </ng-container>\n </ng-container>\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.no-padding .p-overlaypanel-content{padding:0}::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-splitButton{height:32px;width:146px;display:flex}:host ::ng-deep p-splitButton .p-splitbutton{display:flex;font-size:12px;border-radius:2px;height:100%;width:100%;-webkit-backface-visibility:hidden}:host ::ng-deep p-splitButton .p-splitbutton .p-button:focus{box-shadow:none}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-defaultbutton{padding:7px 12px 7px 10px}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-defaultbutton:disabled{opacity:.2}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-menubutton:disabled{opacity:.3}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button{background-color:#fff;color:var(--vl-primary-color);border:1px solid #fff}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button:enabled:hover{background-color:var(--vl-secondary-nav-bg);color:var(--vl-primary-color);border:1px solid var(--vl-secondary-nav-bg);outline:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-menubutton{background-color:var(--vl-secondary-nav-bg);border-radius:0 2px 2px 0;border:1px solid var(--vl-secondary-nav-bg);border-left:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-menubutton:hover{background-color:var(--vl-secondary-nav-bg);border:1px solid var(--vl-secondary-nav-bg);border-left:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-defaultbutton{border-radius:2px 0 0 2px}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-defaultbutton .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}:host ::ng-deep p-splitButton .p-splitbutton .p-menu{display:flex;width:auto;margin-top:2px;border-radius:4px;border:1px solid var(--vl-border-color);box-shadow:0 4px 20px #2767c11a}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list{display:flex;flex-direction:column}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem{display:flex;width:100%;height:32px}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link{padding:8px;width:100%;height:100%}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link:not(.p-disabled):hover{background-color:var(--vl-secondary-nav-bg)}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link:not(.p-disabled):hover .p-menuitem-text{color:var(--vl-primary-color)}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link .p-menuitem-text{line-height:16px;font-size:12px;letter-spacing:.3px;white-space:nowrap}:host ::ng-deep .doc-gen-button{height:32px;width:32px;display:inline-flex}:host ::ng-deep .doc-gen-button .p-button{border:1px solid #fff;border-radius:2px;width:100%;height:100%}:host ::ng-deep .doc-gen-button .p-button.p-component:disabled{opacity:.3}:host ::ng-deep .save-button,:host ::ng-deep .submit-button{height:32px;width:146px;display:flex}:host ::ng-deep .save-button .p-button,:host ::ng-deep .submit-button .p-button{border-radius:3px;width:100%;height:100%;background:rgba(255,255,255,.3);opacity:1;border:none}:host ::ng-deep .save-button .p-button .p-button-label,:host ::ng-deep .submit-button .p-button .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.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 .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;height:14px}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}.metrics__row{display:flex;justify-content:space-between;grid-gap:2px;gap:2px}.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:not(.disabled),.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active:not(.disabled),.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:16px;gap:16px}\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"] }, { type: i9.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onClick", "onDropdownClick"] }], directives: [{ type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i12.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5.AsyncPipe, "titlecase": i5.TitleCasePipe, "date": i5.DatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
859
859
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
860
860
|
type: Component,
|
861
861
|
args: [{
|
@@ -864,7 +864,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
864
864
|
styleUrls: ['./header.component.scss'],
|
865
865
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
866
866
|
}]
|
867
|
-
}], ctorParameters: function () { return [{ type:
|
867
|
+
}], ctorParameters: function () { return [{ type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i2$1.QuoteApiService }, { type: i2$1.SalesforceApiService }, { type: i1$1.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }, { type: i4.IntegrationState }]; } });
|
868
868
|
|
869
869
|
class FlowHeaderModule {
|
870
870
|
}
|
@@ -960,11 +960,11 @@ class FlowService {
|
|
960
960
|
this.cleanup$.next();
|
961
961
|
}
|
962
962
|
}
|
963
|
-
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowService, deps: [{ token:
|
963
|
+
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowService, deps: [{ token: i4.IntegrationState }, { token: FlowRouterService }, { token: i1$1.QuoteDraftService }, { token: i1$1.ConfigurationService }, { token: i1$1.FlowConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
964
964
|
FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowService });
|
965
965
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowService, decorators: [{
|
966
966
|
type: Injectable
|
967
|
-
}], ctorParameters: function () { return [{ type:
|
967
|
+
}], ctorParameters: function () { return [{ type: i4.IntegrationState }, { type: FlowRouterService }, { type: i1$1.QuoteDraftService }, { type: i1$1.ConfigurationService }, { type: i1$1.FlowConfigurationService }]; } });
|
968
968
|
|
969
969
|
class FlowComponent {
|
970
970
|
constructor(routerService, quoteDraftService, flowService, docGenService, integrationState) {
|
@@ -986,8 +986,8 @@ class FlowComponent {
|
|
986
986
|
this.docGenService.cleanup();
|
987
987
|
}
|
988
988
|
}
|
989
|
-
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token:
|
990
|
-
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n\n<ng-container *vlLet=\"isStandalone$ | async as isStandalone\">\n <vl-flow-doc-gen *ngIf=\"!isStandalone\"></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: DocGenComponent, selector: "vl-flow-doc-gen" }], directives: [{ type:
|
989
|
+
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i1$1.QuoteDraftService }, { token: FlowService }, { token: FlowDocGenService }, { token: i4.IntegrationState }], target: i0.ɵɵFactoryTarget.Component });
|
990
|
+
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n\n<ng-container *vlLet=\"isStandalone$ | async as isStandalone\">\n <vl-flow-doc-gen *ngIf=\"!isStandalone\"></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: DocGenComponent, selector: "vl-flow-doc-gen" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
991
991
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowComponent, decorators: [{
|
992
992
|
type: Component,
|
993
993
|
args: [{
|
@@ -996,7 +996,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
996
996
|
styleUrls: ['./flow.component.scss'],
|
997
997
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
998
998
|
}]
|
999
|
-
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type:
|
999
|
+
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i1$1.QuoteDraftService }, { type: FlowService }, { type: FlowDocGenService }, { type: i4.IntegrationState }]; } });
|
1000
|
+
|
1001
|
+
const getFlowObjectIdPropertyName = (id) => {
|
1002
|
+
const objectName = SalesforceIdUtils.getSfObjectNameById(id);
|
1003
|
+
switch (objectName) {
|
1004
|
+
case 'Account':
|
1005
|
+
return 'accountId';
|
1006
|
+
case 'Order':
|
1007
|
+
return 'orderId';
|
1008
|
+
case 'Quote':
|
1009
|
+
default:
|
1010
|
+
return 'quoteId';
|
1011
|
+
}
|
1012
|
+
};
|
1013
|
+
const getDefaultProperties = (params) => {
|
1014
|
+
var _a;
|
1015
|
+
const properties = {};
|
1016
|
+
if (((_a = params.flowParams) === null || _a === void 0 ? void 0 : _a.entryPath.includes('/product')) || params.mode === ConfigurationContextMode.REMOTE) {
|
1017
|
+
properties.standalone = 'true';
|
1018
|
+
}
|
1019
|
+
return properties;
|
1020
|
+
};
|
1000
1021
|
|
1001
1022
|
class ContextGuard {
|
1002
1023
|
constructor(router, routerService, contextService) {
|
@@ -1005,7 +1026,6 @@ class ContextGuard {
|
|
1005
1026
|
this.contextService = contextService;
|
1006
1027
|
}
|
1007
1028
|
checkActivation(route) {
|
1008
|
-
var _a, _b;
|
1009
1029
|
const { queryParams } = route;
|
1010
1030
|
const { accountId, quoteId, orderId } = queryParams;
|
1011
1031
|
const rpcMessage = window.RPC_MESSAGE;
|
@@ -1014,8 +1034,7 @@ class ContextGuard {
|
|
1014
1034
|
if (mode == null) {
|
1015
1035
|
return this.handleError(route, 'Mode is undefined');
|
1016
1036
|
}
|
1017
|
-
const
|
1018
|
-
const headerId = accountId || quoteId || orderId || rpcMessageId || 'empty-for-test-mode';
|
1037
|
+
const headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
|
1019
1038
|
// Allow if context is already initialized with the same headerId
|
1020
1039
|
if (this.contextService.isInitialized) {
|
1021
1040
|
const currentContext = this.contextService.resolve();
|
@@ -1026,7 +1045,7 @@ class ContextGuard {
|
|
1026
1045
|
// Initialize context
|
1027
1046
|
return this.contextService.create(headerId, mode).pipe(tap((context) => {
|
1028
1047
|
// Update context with queryParams
|
1029
|
-
this.contextService.update(Object.assign(Object.assign({}, context), { properties: Object.assign(Object.assign({}, context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})) }));
|
1048
|
+
this.contextService.update(Object.assign(Object.assign({}, context), { properties: Object.assign(Object.assign(Object.assign({}, context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})), getDefaultProperties({ mode })) }));
|
1030
1049
|
}), map(() => true), catchError(e => {
|
1031
1050
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1032
1051
|
return this.handleError(route, message);
|
@@ -1038,6 +1057,16 @@ class ContextGuard {
|
|
1038
1057
|
canActivateChild(childRoute) {
|
1039
1058
|
return this.checkActivation(childRoute);
|
1040
1059
|
}
|
1060
|
+
get rpcMessageId() {
|
1061
|
+
var _a, _b;
|
1062
|
+
if (!window.RPC_MESSAGE) {
|
1063
|
+
return;
|
1064
|
+
}
|
1065
|
+
const rpcMessage = JSON.parse(window.RPC_MESSAGE);
|
1066
|
+
const veloceReferenceId = (_a = rpcMessage.configuration) === null || _a === void 0 ? void 0 : _a.VeloceReferenceId;
|
1067
|
+
const quoteId = (_b = rpcMessage.quote) === null || _b === void 0 ? void 0 : _b.Id;
|
1068
|
+
return veloceReferenceId || quoteId;
|
1069
|
+
}
|
1041
1070
|
getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage) {
|
1042
1071
|
if (accountId) {
|
1043
1072
|
return ConfigurationContextMode.ACCOUNT;
|
@@ -1059,11 +1088,11 @@ class ContextGuard {
|
|
1059
1088
|
return from(this.router.navigate([parentUrl, '404'], { state: { message } })).pipe(map(() => false));
|
1060
1089
|
}
|
1061
1090
|
}
|
1062
|
-
ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextGuard, deps: [{ token: i1$
|
1091
|
+
ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i1$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1063
1092
|
ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextGuard });
|
1064
1093
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextGuard, decorators: [{
|
1065
1094
|
type: Injectable
|
1066
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1095
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i1$1.ContextService }]; } });
|
1067
1096
|
|
1068
1097
|
class ProductUnloadGuard {
|
1069
1098
|
constructor(router, contextService, quoteDraftService, configurationService, flowDialogService) {
|
@@ -1096,11 +1125,11 @@ class ProductUnloadGuard {
|
|
1096
1125
|
}));
|
1097
1126
|
}
|
1098
1127
|
}
|
1099
|
-
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$
|
1128
|
+
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }, { token: i1$1.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1100
1129
|
ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductUnloadGuard });
|
1101
1130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductUnloadGuard, decorators: [{
|
1102
1131
|
type: Injectable
|
1103
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1132
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i1$1.ConfigurationService }, { type: FlowDialogService }]; } });
|
1104
1133
|
|
1105
1134
|
class RootGuard {
|
1106
1135
|
constructor(router, routerService) {
|
@@ -1132,12 +1161,12 @@ class RootGuard {
|
|
1132
1161
|
return true;
|
1133
1162
|
}
|
1134
1163
|
}
|
1135
|
-
RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RootGuard, deps: [{ token: i1$
|
1164
|
+
RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RootGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1136
1165
|
RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RootGuard, providedIn: 'root' });
|
1137
1166
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RootGuard, decorators: [{
|
1138
1167
|
type: Injectable,
|
1139
1168
|
args: [{ providedIn: 'root' }]
|
1140
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1169
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
|
1141
1170
|
|
1142
1171
|
const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
|
1143
1172
|
|
@@ -1230,8 +1259,8 @@ class CatalogComponent {
|
|
1230
1259
|
}));
|
1231
1260
|
}
|
1232
1261
|
}
|
1233
|
-
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CatalogComponent, deps: [{ token: i2$
|
1234
|
-
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type:
|
1262
|
+
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CatalogComponent, deps: [{ token: i2$1.UITemplatesApiService }, { token: i1$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1263
|
+
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1235
1264
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CatalogComponent, decorators: [{
|
1236
1265
|
type: Component,
|
1237
1266
|
args: [{
|
@@ -1240,7 +1269,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1240
1269
|
styleUrls: ['./catalog.component.scss'],
|
1241
1270
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
1242
1271
|
}]
|
1243
|
-
}], ctorParameters: function () { return [{ type: i2$
|
1272
|
+
}], ctorParameters: function () { return [{ type: i2$1.UITemplatesApiService }, { type: i1$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3.ToastService }, { type: undefined, decorators: [{
|
1244
1273
|
type: Optional
|
1245
1274
|
}, {
|
1246
1275
|
type: Inject,
|
@@ -1261,19 +1290,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1261
1290
|
}]
|
1262
1291
|
}] });
|
1263
1292
|
|
1264
|
-
const getFlowObjectIdPropertyName = (id) => {
|
1265
|
-
const objectName = SalesforceIdUtils.getSfObjectNameById(id);
|
1266
|
-
switch (objectName) {
|
1267
|
-
case 'Account':
|
1268
|
-
return 'accountId';
|
1269
|
-
case 'Order':
|
1270
|
-
return 'orderId';
|
1271
|
-
case 'Quote':
|
1272
|
-
default:
|
1273
|
-
return 'quoteId';
|
1274
|
-
}
|
1275
|
-
};
|
1276
|
-
|
1277
1293
|
class DebugComponent {
|
1278
1294
|
constructor(flowsApiService, router, activatedRoute, context, quoteDraftService) {
|
1279
1295
|
this.flowsApiService = flowsApiService;
|
@@ -1310,8 +1326,8 @@ class DebugComponent {
|
|
1310
1326
|
});
|
1311
1327
|
}
|
1312
1328
|
}
|
1313
|
-
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, deps: [{ token: i2$
|
1314
|
-
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i6$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i7.InputText, selector: "[pInputText]" }, { type:
|
1329
|
+
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, deps: [{ token: i2$1.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
|
1330
|
+
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i6$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i7.InputText, selector: "[pInputText]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1315
1331
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, decorators: [{
|
1316
1332
|
type: Component,
|
1317
1333
|
args: [{
|
@@ -1320,7 +1336,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1320
1336
|
styleUrls: ['./debug.component.scss'],
|
1321
1337
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
1322
1338
|
}]
|
1323
|
-
}], ctorParameters: function () { return [{ type: i2$
|
1339
|
+
}], ctorParameters: function () { return [{ type: i2$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }]; } });
|
1324
1340
|
|
1325
1341
|
const routes$1 = [{ path: '', component: DebugComponent }];
|
1326
1342
|
class DebugModule {
|
@@ -1328,7 +1344,7 @@ class DebugModule {
|
|
1328
1344
|
DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1329
1345
|
DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugModule, declarations: [DebugComponent], imports: [CommonModule,
|
1330
1346
|
FormsModule,
|
1331
|
-
ReactiveFormsModule, i1$
|
1347
|
+
ReactiveFormsModule, i1$2.RouterModule, RadioButtonModule,
|
1332
1348
|
ButtonModule,
|
1333
1349
|
InputTextModule,
|
1334
1350
|
DropdownModule] });
|
@@ -1493,15 +1509,15 @@ class LegacyProductComponent {
|
|
1493
1509
|
}), switchMap$1(runtimeContext => this.customizeContext(productId, runtimeContext)));
|
1494
1510
|
}
|
1495
1511
|
}
|
1496
|
-
LegacyProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductComponent, deps: [{ token: i1$
|
1497
|
-
LegacyProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4$
|
1512
|
+
LegacyProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1$1.QuoteDraftService }, { token: i2$1.QuoteApiService }, { token: i1$1.ContextService }, { token: i4$2.RuntimeContextService }, { token: i4$2.RuntimeService }, { token: i4$2.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1513
|
+
LegacyProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4$2.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
|
1498
1514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductComponent, decorators: [{
|
1499
1515
|
type: Component,
|
1500
1516
|
args: [{
|
1501
1517
|
templateUrl: './legacy-product.component.html',
|
1502
1518
|
styleUrls: ['./legacy-product.component.scss'],
|
1503
1519
|
}]
|
1504
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1520
|
+
}], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i1$1.QuoteDraftService }, { type: i2$1.QuoteApiService }, { type: i1$1.ContextService }, { type: i4$2.RuntimeContextService }, { type: i4$2.RuntimeService }, { type: i4$2.CurrentStateService }, { type: undefined, decorators: [{
|
1505
1521
|
type: Optional
|
1506
1522
|
}, {
|
1507
1523
|
type: Inject,
|
@@ -1511,7 +1527,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1511
1527
|
class LegacyProductModule {
|
1512
1528
|
}
|
1513
1529
|
LegacyProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1514
|
-
LegacyProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [CommonModule, RuntimeModule, i1$
|
1530
|
+
LegacyProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [CommonModule, RuntimeModule, i1$3.TooltipModule], exports: [LegacyProductComponent] });
|
1515
1531
|
LegacyProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductModule, imports: [[CommonModule, RuntimeModule, TooltipModule$1.forRoot()]] });
|
1516
1532
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LegacyProductModule, decorators: [{
|
1517
1533
|
type: NgModule,
|
@@ -1604,8 +1620,8 @@ class ProductComponent {
|
|
1604
1620
|
return quote.initialState.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
|
1605
1621
|
}
|
1606
1622
|
}
|
1607
|
-
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductComponent, deps: [{ token:
|
1608
|
-
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type:
|
1623
|
+
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.ConfigurationRuntimeService }, { token: i1$1.ConfigurationService }, { token: i1$1.QuoteDraftService }, { token: i2$2.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1624
|
+
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1609
1625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductComponent, decorators: [{
|
1610
1626
|
type: Component,
|
1611
1627
|
args: [{
|
@@ -1614,7 +1630,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1614
1630
|
styleUrls: ['./product.component.scss'],
|
1615
1631
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
1616
1632
|
}]
|
1617
|
-
}], ctorParameters: function () { return [{ type:
|
1633
|
+
}], ctorParameters: function () { return [{ type: i1$1.ContextService }, { type: i1$1.ConfigurationRuntimeService }, { type: i1$1.ConfigurationService }, { type: i1$1.QuoteDraftService }, { type: i2$2.MessageService }, { type: undefined, decorators: [{
|
1618
1634
|
type: Optional
|
1619
1635
|
}, {
|
1620
1636
|
type: Inject,
|
@@ -1648,8 +1664,8 @@ class RecordNotFoundComponent {
|
|
1648
1664
|
}
|
1649
1665
|
}
|
1650
1666
|
}
|
1651
|
-
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$
|
1652
|
-
RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"], directives: [{ type:
|
1667
|
+
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
1668
|
+
RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1653
1669
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
|
1654
1670
|
type: Component,
|
1655
1671
|
args: [{
|
@@ -1658,13 +1674,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1658
1674
|
styleUrls: ['./record-not-found.component.scss'],
|
1659
1675
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
1660
1676
|
}]
|
1661
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1677
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
|
1662
1678
|
|
1663
1679
|
const routes = [{ path: '', component: RecordNotFoundComponent }];
|
1664
1680
|
class RecordNotFoundModule {
|
1665
1681
|
}
|
1666
1682
|
RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1667
|
-
RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$
|
1683
|
+
RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$2.RouterModule] });
|
1668
1684
|
RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, imports: [[CommonModule, RouterModule.forChild(routes)]] });
|
1669
1685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RecordNotFoundModule, decorators: [{
|
1670
1686
|
type: NgModule,
|
@@ -1674,6 +1690,362 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1674
1690
|
}]
|
1675
1691
|
}] });
|
1676
1692
|
|
1693
|
+
class RemoteComponent {
|
1694
|
+
constructor(contextService, quoteDraftService, quoteApiService, runtimeService, configurationService, messageService, integrationState, location) {
|
1695
|
+
this.contextService = contextService;
|
1696
|
+
this.quoteDraftService = quoteDraftService;
|
1697
|
+
this.quoteApiService = quoteApiService;
|
1698
|
+
this.runtimeService = runtimeService;
|
1699
|
+
this.configurationService = configurationService;
|
1700
|
+
this.messageService = messageService;
|
1701
|
+
this.integrationState = integrationState;
|
1702
|
+
this.location = location;
|
1703
|
+
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
1704
|
+
this.DYNAMIC_OPTION_PRODUCTS_KEY = 'Dynamic';
|
1705
|
+
this.destroyed$ = new Subject();
|
1706
|
+
this.rpcMessage = JSON.parse(window.RPC_MESSAGE);
|
1707
|
+
this.rpcMessage.options.sort((a, b) => { var _a, _b; return ((_a = a.featureNumber) !== null && _a !== void 0 ? _a : 99999) - ((_b = b.featureNumber) !== null && _b !== void 0 ? _b : 99999); });
|
1708
|
+
this.updateHasChildrenFlag(this.rpcMessage.product.configuredProductId);
|
1709
|
+
// update context properties
|
1710
|
+
if (this.rpcMessage.quote) {
|
1711
|
+
const properties = {};
|
1712
|
+
if (this.rpcMessage.quote.SBQQ__Opportunity2__c) {
|
1713
|
+
properties.OpportunityId = this.rpcMessage.quote.SBQQ__Opportunity2__c;
|
1714
|
+
}
|
1715
|
+
Object.entries(this.rpcMessage.quote).forEach(([key, value]) => {
|
1716
|
+
if (value !== undefined && !(value instanceof Object)) {
|
1717
|
+
properties[key] = value;
|
1718
|
+
}
|
1719
|
+
});
|
1720
|
+
this.contextService.update({ properties });
|
1721
|
+
}
|
1722
|
+
this.initSubscriptions();
|
1723
|
+
this.initConfiguration();
|
1724
|
+
}
|
1725
|
+
ngOnDestroy() {
|
1726
|
+
this.destroyed$.next();
|
1727
|
+
this.destroyed$.complete();
|
1728
|
+
}
|
1729
|
+
initConfiguration() {
|
1730
|
+
const productId = this.rpcMessage.product.configuredProductId;
|
1731
|
+
const quote = this.quoteDraftService.quoteDraft;
|
1732
|
+
if (!productId || !quote) {
|
1733
|
+
return;
|
1734
|
+
}
|
1735
|
+
this.runtimeService
|
1736
|
+
.init({ productId })
|
1737
|
+
.pipe(first(), tap(context => {
|
1738
|
+
var _a, _b, _c, _d, _e;
|
1739
|
+
const pricingEnabled = ((_b = (_a = context === null || context === void 0 ? void 0 : context.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.pricingEnabled) ? 'true' : 'false';
|
1740
|
+
const priceListId = (_d = (_c = context === null || context === void 0 ? void 0 : context.uiDefinition) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.priceList;
|
1741
|
+
const runtimeContextProperties = (_e = this.runtimeService.runtimeContext) === null || _e === void 0 ? void 0 : _e.properties;
|
1742
|
+
if (runtimeContextProperties) {
|
1743
|
+
runtimeContextProperties.PriceListId = priceListId;
|
1744
|
+
runtimeContextProperties.PricingEnabled = pricingEnabled;
|
1745
|
+
}
|
1746
|
+
this.contextService.update({
|
1747
|
+
properties: {
|
1748
|
+
ModelId: context === null || context === void 0 ? void 0 : context.modelId,
|
1749
|
+
RuntimeMode: 'TEST',
|
1750
|
+
PricingEnabled: pricingEnabled,
|
1751
|
+
PriceListId: priceListId,
|
1752
|
+
},
|
1753
|
+
});
|
1754
|
+
this.uiDefinition = context === null || context === void 0 ? void 0 : context.uiDefinition;
|
1755
|
+
this.configurationService.updateCurrentStates({
|
1756
|
+
configurableRamp: this.createLineItem(),
|
1757
|
+
currentState: quote.currentState,
|
1758
|
+
});
|
1759
|
+
}), this.throwIfNoUIDefinition(), switchMap(() => this.configurationService.configure()), tap(() => this.state$.next({ loading: false, failure: false })), catchError(error => {
|
1760
|
+
var _a, _b;
|
1761
|
+
if (!((_b = (_a = this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
|
1762
|
+
this.messageService.add({ severity: 'error', summary: error });
|
1763
|
+
}
|
1764
|
+
this.state$.next({ loading: false, failure: true });
|
1765
|
+
return of();
|
1766
|
+
}), takeUntil(this.destroyed$))
|
1767
|
+
.subscribe();
|
1768
|
+
}
|
1769
|
+
throwIfNoUIDefinition() {
|
1770
|
+
return (source$) => {
|
1771
|
+
return source$.pipe(switchMap(() => {
|
1772
|
+
if (!this.uiDefinition) {
|
1773
|
+
return throwError(() => 'Product does not have Configuration UI');
|
1774
|
+
}
|
1775
|
+
return source$;
|
1776
|
+
}));
|
1777
|
+
};
|
1778
|
+
}
|
1779
|
+
initSubscriptions() {
|
1780
|
+
this.integrationState
|
1781
|
+
.listen$(FlowAction.REMOTE_CANCEL)
|
1782
|
+
.pipe(tap(() => this.location.back()), takeUntil(this.destroyed$))
|
1783
|
+
.subscribe();
|
1784
|
+
this.integrationState
|
1785
|
+
.listen$(FlowAction.REMOTE_APPLY)
|
1786
|
+
.pipe(tap(() => this.saveRpcMessage()), takeUntil(this.destroyed$))
|
1787
|
+
.subscribe();
|
1788
|
+
}
|
1789
|
+
createLineItem() {
|
1790
|
+
var _a, _b;
|
1791
|
+
const [quoteDraftLineItem] = (_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState) !== null && _b !== void 0 ? _b : [];
|
1792
|
+
if (quoteDraftLineItem && (quoteDraftLineItem.attributes.length > 0 || quoteDraftLineItem.lineItems.length > 0)) {
|
1793
|
+
return quoteDraftLineItem;
|
1794
|
+
}
|
1795
|
+
const lineItem = this.createRootLineItem();
|
1796
|
+
const dynamicOptionProducts = this.rpcMessage.product.optionConfigurations[this.DYNAMIC_OPTION_PRODUCTS_KEY];
|
1797
|
+
if (dynamicOptionProducts) {
|
1798
|
+
const options = this.toParentChildMap(dynamicOptionProducts);
|
1799
|
+
let items = [lineItem];
|
1800
|
+
for (let i = 0; i < items.length; i++) {
|
1801
|
+
const item = items[i];
|
1802
|
+
const children = options.get(item.id);
|
1803
|
+
if (children) {
|
1804
|
+
item.lineItems = children;
|
1805
|
+
items = items.concat(children);
|
1806
|
+
}
|
1807
|
+
}
|
1808
|
+
}
|
1809
|
+
return lineItem;
|
1810
|
+
}
|
1811
|
+
createRootLineItem() {
|
1812
|
+
var _a, _b, _c, _d;
|
1813
|
+
const product = this.rpcMessage.product;
|
1814
|
+
const runtimeContext = this.runtimeService.runtimeContext;
|
1815
|
+
const veloceInstanceId = product.configurationAttributes.VeloceInstanceId__c;
|
1816
|
+
const quoteId = (_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState[0]) === null || _b === void 0 ? void 0 : _b.id;
|
1817
|
+
return {
|
1818
|
+
id: quoteId || veloceInstanceId || UUID.UUID(),
|
1819
|
+
type: (_c = runtimeContext.productType) !== null && _c !== void 0 ? _c : '',
|
1820
|
+
name: ((_d = runtimeContext.properties) === null || _d === void 0 ? void 0 : _d.displayName) || runtimeContext.productName,
|
1821
|
+
productName: runtimeContext.productName,
|
1822
|
+
productId: runtimeContext.productId,
|
1823
|
+
cfgStatus: 'Default',
|
1824
|
+
actionCode: 'ADD',
|
1825
|
+
qty: 1,
|
1826
|
+
};
|
1827
|
+
}
|
1828
|
+
toParentChildMap(remoteOptionProducts) {
|
1829
|
+
var _a;
|
1830
|
+
const result = new Map();
|
1831
|
+
for (const option of remoteOptionProducts) {
|
1832
|
+
const configurationData = (_a = option === null || option === void 0 ? void 0 : option.readOnly) === null || _a === void 0 ? void 0 : _a.line;
|
1833
|
+
const id = configurationData === null || configurationData === void 0 ? void 0 : configurationData.VeloceInstanceId__c;
|
1834
|
+
const parentId = configurationData === null || configurationData === void 0 ? void 0 : configurationData.VeloceParentInstanceId__c;
|
1835
|
+
if (!option.selected || !configurationData || !id || !parentId) {
|
1836
|
+
continue;
|
1837
|
+
}
|
1838
|
+
const productId = option.productId;
|
1839
|
+
const lineItem = {
|
1840
|
+
id,
|
1841
|
+
productId,
|
1842
|
+
parentId,
|
1843
|
+
type: configurationData.ModelType__c,
|
1844
|
+
port: configurationData.ModelPort__c,
|
1845
|
+
cfgStatus: configurationData.ConfigurationStatus__c,
|
1846
|
+
actionCode: configurationData.ActionCode__c,
|
1847
|
+
qty: option.Quantity,
|
1848
|
+
};
|
1849
|
+
let siblings = result.get(productId);
|
1850
|
+
if (!siblings) {
|
1851
|
+
result.set(parentId, (siblings = []));
|
1852
|
+
}
|
1853
|
+
siblings.push(lineItem);
|
1854
|
+
}
|
1855
|
+
return result;
|
1856
|
+
}
|
1857
|
+
saveRpcMessage() {
|
1858
|
+
var _a;
|
1859
|
+
const quote = this.quoteDraftService.quoteDraft;
|
1860
|
+
const lineItem = this.configurationService.getSnapshot();
|
1861
|
+
if (!quote || !lineItem) {
|
1862
|
+
return;
|
1863
|
+
}
|
1864
|
+
this.rpcMessage.VeloceReferenceId = quote.quoteId;
|
1865
|
+
this.rpcMessage.product.configurationData.VeloceInstanceId__c = lineItem.id;
|
1866
|
+
const childItems = this.flattenChildLineItems(lineItem);
|
1867
|
+
const savingMode = window.SavingMode;
|
1868
|
+
this.updateContentData(this.rpcMessage.product, lineItem);
|
1869
|
+
this.rpcMessage.quote = this.mapAttributesTo('Quote', lineItem);
|
1870
|
+
if (savingMode === 'ALL') {
|
1871
|
+
const optionConfigurations = this.getOptionConfigurations(this.rpcMessage.product);
|
1872
|
+
const rootProductOptions = this.rpcMessage.options.filter(po => po.configuredProductId === lineItem.productId);
|
1873
|
+
childItems.forEach(lineItem => {
|
1874
|
+
var _a, _b, _c;
|
1875
|
+
const rootOption = rootProductOptions.find(po => po.optionalProductId === lineItem.productId);
|
1876
|
+
if (rootOption) {
|
1877
|
+
const featureOptions = (_a = optionConfigurations[rootOption.featureName]) !== null && _a !== void 0 ? _a : (optionConfigurations[rootOption.featureName] = []);
|
1878
|
+
const originOption = !rootOption.hasChildren
|
1879
|
+
? optionConfigurations[rootOption.featureName].find(({ optionId }) => optionId === rootOption.optionId)
|
1880
|
+
: undefined;
|
1881
|
+
const option = originOption !== null && originOption !== void 0 ? originOption : {};
|
1882
|
+
option.optionId = (_b = option.optionId) !== null && _b !== void 0 ? _b : rootOption.optionId;
|
1883
|
+
this.updateContentData(option, lineItem);
|
1884
|
+
option.index = (_c = option.index) !== null && _c !== void 0 ? _c : featureOptions.length;
|
1885
|
+
option.selected = true;
|
1886
|
+
if (!originOption) {
|
1887
|
+
featureOptions.push(option);
|
1888
|
+
}
|
1889
|
+
if (lineItem.parentLineItem) {
|
1890
|
+
const nestedProductOption = this.rpcMessage.options.find(po => {
|
1891
|
+
var _a;
|
1892
|
+
return po.configuredProductId === ((_a = lineItem.parentLineItem) === null || _a === void 0 ? void 0 : _a.productId) &&
|
1893
|
+
po.optionalProductId === lineItem.productId;
|
1894
|
+
});
|
1895
|
+
if (nestedProductOption) {
|
1896
|
+
option.configurationData = Object.assign(Object.assign({}, option.configurationData), { VeloceParentInstanceId__c: lineItem.parentLineItem.id, VeloceNestedOptionId__c: nestedProductOption.optionId, VeloceNestedFeatureId__c: nestedProductOption.featureId });
|
1897
|
+
}
|
1898
|
+
}
|
1899
|
+
}
|
1900
|
+
else {
|
1901
|
+
this.rpcMessage.dynamicFeatures.forEach(feature => {
|
1902
|
+
var _a, _b;
|
1903
|
+
const featureOptions = (_a = optionConfigurations[feature.name]) !== null && _a !== void 0 ? _a : (optionConfigurations[feature.name] = []);
|
1904
|
+
const originOption = featureOptions.find(({ productId }) => productId === lineItem.productId);
|
1905
|
+
const option = originOption !== null && originOption !== void 0 ? originOption : {};
|
1906
|
+
this.updateContentData(option, lineItem);
|
1907
|
+
option.index = (_b = option.index) !== null && _b !== void 0 ? _b : featureOptions.length;
|
1908
|
+
option.selected = true;
|
1909
|
+
if (!originOption) {
|
1910
|
+
featureOptions.push(option);
|
1911
|
+
}
|
1912
|
+
});
|
1913
|
+
}
|
1914
|
+
});
|
1915
|
+
this.rpcMessage.product = Object.assign(Object.assign({}, this.rpcMessage.product), { optionConfigurations });
|
1916
|
+
}
|
1917
|
+
(_a = window.RPC_BROADCAST) === null || _a === void 0 ? void 0 : _a.apply(null, [this.rpcMessage]);
|
1918
|
+
}
|
1919
|
+
updateHasChildrenFlag(bundleProductId) {
|
1920
|
+
const bundleOptionsByOptionId = {};
|
1921
|
+
const notBundleOptions = [];
|
1922
|
+
for (const productOption of this.rpcMessage.options) {
|
1923
|
+
if (productOption.configuredProductId === bundleProductId) {
|
1924
|
+
bundleOptionsByOptionId[productOption.optionalProductId] = productOption;
|
1925
|
+
}
|
1926
|
+
else {
|
1927
|
+
notBundleOptions.push(productOption);
|
1928
|
+
}
|
1929
|
+
}
|
1930
|
+
for (const option of notBundleOptions) {
|
1931
|
+
if (bundleOptionsByOptionId[option.configuredProductId]) {
|
1932
|
+
bundleOptionsByOptionId[option.configuredProductId].hasChildren = true;
|
1933
|
+
}
|
1934
|
+
}
|
1935
|
+
}
|
1936
|
+
flattenChildLineItems(lineItem) {
|
1937
|
+
var _a;
|
1938
|
+
let items = (_a = lineItem.lineItems) !== null && _a !== void 0 ? _a : [];
|
1939
|
+
for (let i = 0; i < items.length; i++) {
|
1940
|
+
const item = items[i];
|
1941
|
+
if (item.lineItems) {
|
1942
|
+
items = items.concat(item.lineItems.map(li => (Object.assign(Object.assign({}, li), { parentLineItem: item }))));
|
1943
|
+
}
|
1944
|
+
}
|
1945
|
+
return items;
|
1946
|
+
}
|
1947
|
+
updateContentData(entity, lineItem) {
|
1948
|
+
var _a, _b;
|
1949
|
+
if (lineItem.productId) {
|
1950
|
+
entity.productId = lineItem.productId;
|
1951
|
+
}
|
1952
|
+
const quantityAttribute = lineItem.properties.quantityAttribute;
|
1953
|
+
entity.Quantity = quantityAttribute
|
1954
|
+
? (_b = (_a = lineItem.attributes.find(attribute => attribute.name === quantityAttribute)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 1
|
1955
|
+
: lineItem.qty;
|
1956
|
+
const totalPrice = this.computeNetPrice(lineItem);
|
1957
|
+
const targetTotalPriceField = lineItem.properties.TargetTotalPriceField || 'TotalPrice__c';
|
1958
|
+
entity.configurationData[targetTotalPriceField] = entity.configurationData[targetTotalPriceField]
|
1959
|
+
? entity.configurationData[targetTotalPriceField] + totalPrice
|
1960
|
+
: totalPrice;
|
1961
|
+
const targetPriceField = lineItem.properties.TargetPriceField || 'SBQQ__ListPrice__c';
|
1962
|
+
const price = entity.Quantity != null ? entity.configurationData[targetTotalPriceField] / entity.Quantity || 0 : 0;
|
1963
|
+
const targetPriceValue = Number(entity.configurationData[targetPriceField]) || 0;
|
1964
|
+
entity.configurationData[targetPriceField] = targetPriceValue
|
1965
|
+
? (targetPriceValue + price).toFixed(2)
|
1966
|
+
: price.toFixed(2);
|
1967
|
+
entity.configurationAttributes = this.mapAttributesTo('Attribute', lineItem);
|
1968
|
+
entity.configurationData = Object.assign(Object.assign(Object.assign(Object.assign({}, entity.configurationData), this.mapAttributesTo('Field', lineItem)), this.mapAttributesTo('', lineItem)), { VeloceInstanceId__c: lineItem.id });
|
1969
|
+
}
|
1970
|
+
computeNetPrice(lineItem) {
|
1971
|
+
if (lineItem.properties.GroupCharges) {
|
1972
|
+
return this.sumNetPrice(lineItem.chargeGroupItems, this.getChargeNameSet(lineItem.properties.GroupCharges));
|
1973
|
+
}
|
1974
|
+
return this.sumNetPrice(lineItem.chargeItems, this.getChargeNameSet(lineItem.properties.Charges));
|
1975
|
+
}
|
1976
|
+
getChargeNameSet(property) {
|
1977
|
+
if (property && property.length > 0) {
|
1978
|
+
return new Set(property.split(','));
|
1979
|
+
}
|
1980
|
+
return new Set();
|
1981
|
+
}
|
1982
|
+
sumNetPrice(chargeItems, charges) {
|
1983
|
+
var _a;
|
1984
|
+
let netPrice = 0;
|
1985
|
+
for (const chargeItem of chargeItems) {
|
1986
|
+
if (!charges || charges.has(chargeItem.chargeType)) {
|
1987
|
+
netPrice += (_a = chargeItem.netPrice) !== null && _a !== void 0 ? _a : 0;
|
1988
|
+
}
|
1989
|
+
}
|
1990
|
+
return netPrice;
|
1991
|
+
}
|
1992
|
+
mapAttributesTo(target, lineItem) {
|
1993
|
+
var _a;
|
1994
|
+
const result = {};
|
1995
|
+
const component = (_a = this.runtimeService.runtimeModel) === null || _a === void 0 ? void 0 : _a.components.get(lineItem.type);
|
1996
|
+
if (!component) {
|
1997
|
+
return result;
|
1998
|
+
}
|
1999
|
+
const propertyName = 'mapTo' + target;
|
2000
|
+
component.attributes
|
2001
|
+
.filter(a => a.properties && a.properties[propertyName])
|
2002
|
+
.forEach(mapping => {
|
2003
|
+
const attribute = lineItem.attributes.find(a => a.name === mapping.name);
|
2004
|
+
if (attribute) {
|
2005
|
+
new Set(mapping.properties[propertyName].split(',')).forEach(k => (result[k] = attribute.value));
|
2006
|
+
}
|
2007
|
+
});
|
2008
|
+
return result;
|
2009
|
+
}
|
2010
|
+
getOptionConfigurations(product) {
|
2011
|
+
var _a;
|
2012
|
+
const optionConfigurations = {};
|
2013
|
+
const requestOptionConfigurations = (_a = product.optionConfigurations) !== null && _a !== void 0 ? _a : {};
|
2014
|
+
Object.keys(requestOptionConfigurations).forEach(k => {
|
2015
|
+
var _a;
|
2016
|
+
optionConfigurations[k] = ((_a = requestOptionConfigurations[k]) !== null && _a !== void 0 ? _a : []).map(opt => {
|
2017
|
+
return Object.assign(Object.assign({}, opt), { selected: false });
|
2018
|
+
});
|
2019
|
+
});
|
2020
|
+
return optionConfigurations;
|
2021
|
+
}
|
2022
|
+
}
|
2023
|
+
RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RemoteComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }, { token: i2$1.QuoteApiService }, { token: i1$1.ConfigurationRuntimeService }, { token: i1$1.ConfigurationService }, { token: i2$2.MessageService }, { token: i4.IntegrationState }, { token: i5.Location }], target: i0.ɵɵFactoryTarget.Component });
|
2024
|
+
RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RemoteComponent, selector: "vl-flow-remote", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RemoteComponent, decorators: [{
|
2026
|
+
type: Component,
|
2027
|
+
args: [{
|
2028
|
+
selector: 'vl-flow-remote',
|
2029
|
+
templateUrl: './remote.component.html',
|
2030
|
+
styleUrls: ['./remote.component.scss'],
|
2031
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
2032
|
+
}]
|
2033
|
+
}], ctorParameters: function () { return [{ type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i2$1.QuoteApiService }, { type: i1$1.ConfigurationRuntimeService }, { type: i1$1.ConfigurationService }, { type: i2$2.MessageService }, { type: i4.IntegrationState }, { type: i5.Location }]; } });
|
2034
|
+
|
2035
|
+
class RemoteModule {
|
2036
|
+
}
|
2037
|
+
RemoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RemoteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2038
|
+
RemoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RemoteModule, declarations: [RemoteComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [RemoteComponent] });
|
2039
|
+
RemoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RemoteModule, imports: [[CommonModule, PreviewModule, LoaderModule]] });
|
2040
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RemoteModule, decorators: [{
|
2041
|
+
type: NgModule,
|
2042
|
+
args: [{
|
2043
|
+
declarations: [RemoteComponent],
|
2044
|
+
imports: [CommonModule, PreviewModule, LoaderModule],
|
2045
|
+
exports: [RemoteComponent],
|
2046
|
+
}]
|
2047
|
+
}] });
|
2048
|
+
|
1677
2049
|
class ShoppingCartComponent {
|
1678
2050
|
constructor(templatesApi, contextService, cdr, toastService, customizationService) {
|
1679
2051
|
var _a;
|
@@ -1763,8 +2135,8 @@ class ShoppingCartComponent {
|
|
1763
2135
|
}));
|
1764
2136
|
}
|
1765
2137
|
}
|
1766
|
-
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i2$
|
1767
|
-
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type:
|
2138
|
+
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i2$1.UITemplatesApiService }, { token: i1$1.ContextService }, { token: i0.ChangeDetectorRef }, { token: i3.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
2139
|
+
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1768
2140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ShoppingCartComponent, decorators: [{
|
1769
2141
|
type: Component,
|
1770
2142
|
args: [{
|
@@ -1773,7 +2145,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1773
2145
|
styleUrls: ['./shopping-cart.component.scss'],
|
1774
2146
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
1775
2147
|
}]
|
1776
|
-
}], ctorParameters: function () { return [{ type: i2$
|
2148
|
+
}], ctorParameters: function () { return [{ type: i2$1.UITemplatesApiService }, { type: i1$1.ContextService }, { type: i0.ChangeDetectorRef }, { type: i3.ToastService }, { type: undefined, decorators: [{
|
1777
2149
|
type: Optional
|
1778
2150
|
}, {
|
1779
2151
|
type: Inject,
|
@@ -1822,8 +2194,7 @@ class FlowResolver {
|
|
1822
2194
|
}
|
1823
2195
|
const { properties } = flow;
|
1824
2196
|
const { queryParams: flowQueryParams, entryPath } = properties;
|
1825
|
-
const
|
1826
|
-
const mergedParams = Object.assign(Object.assign(Object.assign({}, queryParams), flowQueryParams), Object.assign({}, (isProductFlow && { standalone: true })));
|
2197
|
+
const mergedParams = Object.assign(Object.assign(Object.assign({}, queryParams), flowQueryParams), getDefaultProperties({ flowParams: properties }));
|
1827
2198
|
const contextProperties = Object.entries(mergedParams).reduce((trunk, [key, value]) => (Object.assign(Object.assign({}, trunk), { [key]: String(value) })), {});
|
1828
2199
|
this.contextService.update({ properties: contextProperties });
|
1829
2200
|
const parentUrl = this.routerService.getFlowRootPath(route);
|
@@ -1842,11 +2213,11 @@ class FlowResolver {
|
|
1842
2213
|
}));
|
1843
2214
|
}
|
1844
2215
|
}
|
1845
|
-
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowResolver, deps: [{ token: i1$
|
2216
|
+
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: i2$1.FlowsApiService }, { token: FlowRouterService }, { token: i1$1.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1846
2217
|
FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowResolver });
|
1847
2218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowResolver, decorators: [{
|
1848
2219
|
type: Injectable
|
1849
|
-
}], ctorParameters: function () { return [{ type: i1$
|
2220
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2$1.FlowsApiService }, { type: FlowRouterService }, { type: i1$1.ContextService }]; } });
|
1850
2221
|
|
1851
2222
|
class QuoteResolver {
|
1852
2223
|
constructor(router, quoteDraftService, routerService, contextService, flowConfiguration) {
|
@@ -1908,11 +2279,11 @@ class QuoteResolver {
|
|
1908
2279
|
!this.quoteDraftService.hasAssets);
|
1909
2280
|
}
|
1910
2281
|
}
|
1911
|
-
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$
|
2282
|
+
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i1$1.QuoteDraftService }, { token: FlowRouterService }, { token: i1$1.ContextService }, { token: i1$1.FlowConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1912
2283
|
QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteResolver });
|
1913
2284
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteResolver, decorators: [{
|
1914
2285
|
type: Injectable
|
1915
|
-
}], ctorParameters: function () { return [{ type: i1$
|
2286
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$1.QuoteDraftService }, { type: FlowRouterService }, { type: i1$1.ContextService }, { type: i1$1.FlowConfigurationService }]; } });
|
1916
2287
|
|
1917
2288
|
const rootRoute = {
|
1918
2289
|
id: VELOCE_FLOW_ROOT_ROUTE,
|
@@ -1973,6 +2344,13 @@ const rootRoute = {
|
|
1973
2344
|
canActivate: [ContextGuard],
|
1974
2345
|
data: { showHeader: true },
|
1975
2346
|
},
|
2347
|
+
{
|
2348
|
+
path: 'remote',
|
2349
|
+
component: RemoteComponent,
|
2350
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2351
|
+
resolve: { quote: QuoteResolver },
|
2352
|
+
canActivate: [ContextGuard],
|
2353
|
+
},
|
1976
2354
|
{
|
1977
2355
|
path: 'debug',
|
1978
2356
|
loadChildren: () => DebugModule,
|
@@ -1986,10 +2364,11 @@ const rootRoute = {
|
|
1986
2364
|
class FlowRoutingModule {
|
1987
2365
|
}
|
1988
2366
|
FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1989
|
-
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, imports: [i1$
|
2367
|
+
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
|
1990
2368
|
LegacyProductModule,
|
1991
2369
|
ShoppingCartModule,
|
1992
2370
|
CatalogModule,
|
2371
|
+
RemoteModule,
|
1993
2372
|
EmptyAccountModule], exports: [RouterModule] });
|
1994
2373
|
FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver], imports: [[
|
1995
2374
|
RouterModule.forChild([rootRoute]),
|
@@ -1997,6 +2376,7 @@ FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
1997
2376
|
LegacyProductModule,
|
1998
2377
|
ShoppingCartModule,
|
1999
2378
|
CatalogModule,
|
2379
|
+
RemoteModule,
|
2000
2380
|
EmptyAccountModule,
|
2001
2381
|
], RouterModule] });
|
2002
2382
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FlowRoutingModule, decorators: [{
|
@@ -2008,6 +2388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
2008
2388
|
LegacyProductModule,
|
2009
2389
|
ShoppingCartModule,
|
2010
2390
|
CatalogModule,
|
2391
|
+
RemoteModule,
|
2011
2392
|
EmptyAccountModule,
|
2012
2393
|
],
|
2013
2394
|
exports: [RouterModule],
|
@@ -2064,5 +2445,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
2064
2445
|
* Generated bundle index. Do not edit.
|
2065
2446
|
*/
|
2066
2447
|
|
2067
|
-
export { ContextGuard, FLOW_CUSTOMIZATION, FlowModule, FlowService, VELOCE_FLOW_ROOT_ROUTE, getFlowObjectIdPropertyName };
|
2448
|
+
export { ContextGuard, FLOW_CUSTOMIZATION, FlowModule, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
|
2068
2449
|
//# sourceMappingURL=veloce-sdk.js.map
|