@veloceapps/sdk 4.0.14 → 4.0.16

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.
@@ -13,7 +13,7 @@ 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, EntityUtil } from '@veloce/core';
16
+ import { UITemplateComponentType, UITemplateType, ConfigurationContextMode, SalesforceIdUtils, EntityUtil } 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';
@@ -21,19 +21,20 @@ import * as i9 from 'primeng/splitbutton';
21
21
  import { SplitButtonModule } from 'primeng/splitbutton';
22
22
  import * as i12 from 'primeng/tooltip';
23
23
  import { TooltipModule } from 'primeng/tooltip';
24
- import * as i7 from '@angular/forms';
24
+ import * as i6$1 from '@angular/forms';
25
25
  import { FormGroup, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
26
- import * as i5$1 from 'primeng/inputnumber';
26
+ import * as i6 from 'primeng/inputnumber';
27
27
  import { InputNumberModule } from 'primeng/inputnumber';
28
+ import * as i4 from 'primeng/virtualscroller';
29
+ import { VirtualScrollerModule } from 'primeng/virtualscroller';
28
30
  import * as i1$1 from '@angular/router';
29
31
  import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
30
32
  import * as i2$3 from 'primeng/api';
31
33
  import { HttpErrorResponse } from '@angular/common/http';
32
- import * as i4 from 'primeng/dropdown';
33
34
  import { DropdownModule } from 'primeng/dropdown';
34
- import * as i8 from 'primeng/inputtext';
35
+ import * as i7 from 'primeng/inputtext';
35
36
  import { InputTextModule } from 'primeng/inputtext';
36
- import * as i6 from 'primeng/radiobutton';
37
+ import * as i5$1 from 'primeng/radiobutton';
37
38
  import { RadioButtonModule } from 'primeng/radiobutton';
38
39
  import { first as first$1, takeUntil as takeUntil$1, take, map as map$1, switchMap as switchMap$1 } from 'rxjs/operators';
39
40
  import * as i4$1 from '@veloce/sdk/runtime';
@@ -344,10 +345,12 @@ class CartPreviewComponent {
344
345
  this.routerService = routerService;
345
346
  this.productImagesService = productImagesService;
346
347
  this.quoteDraftService = quoteDraftService;
348
+ this.productRowHeight = 97;
347
349
  this.form = new FormGroup({});
350
+ this.hasTermInProducts = false;
351
+ this.scrollHeight = 0;
348
352
  this.shouldUpdate$ = new BehaviorSubject(true);
349
353
  this.destroyed$ = new Subject();
350
- this.hasTermInProducts = false;
351
354
  this.lockedProductId$ = combineLatest([this.routerService.route$, this.routerService.isConfigurationRoute$()]).pipe(map(([route, isConfigurationRoute]) => {
352
355
  if (!isConfigurationRoute) {
353
356
  return null;
@@ -360,6 +363,7 @@ class CartPreviewComponent {
360
363
  const { products } = changes;
361
364
  if (products) {
362
365
  this.shouldUpdate$.next(true);
366
+ this.scrollHeight = Math.min(this.products.length * this.productRowHeight, 460);
363
367
  }
364
368
  }
365
369
  ngAfterViewInit() {
@@ -426,7 +430,7 @@ class CartPreviewComponent {
426
430
  }
427
431
  }
428
432
  CartPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, deps: [{ token: i2$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i2$1.ProductImagesService }, { token: i2$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
429
- 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 <div class=\"scrollable-wrapper\">\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 <div class=\"product-wrapper\" *ngFor=\"let product of products\">\n <div\n class=\"product\"\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 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 pl-0 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 </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3 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: [".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}.scrollable-wrapper{overflow:auto}.product-wrapper{border-bottom:1px solid var(--vl-border-color)}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px}.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}.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:0 16px 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: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$1.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i11.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
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$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.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": i11.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
430
434
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewComponent, decorators: [{
431
435
  type: Component,
432
436
  args: [{
@@ -445,13 +449,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
445
449
  class CartPreviewModule {
446
450
  }
447
451
  CartPreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
448
- CartPreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewModule, declarations: [CartPreviewComponent], imports: [CommonModule, ReactiveFormsModule, ButtonModule, OverlayPanelModule, LetDirectiveModule, InputNumberModule], exports: [CartPreviewComponent] });
449
- CartPreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewModule, imports: [[CommonModule, ReactiveFormsModule, ButtonModule, OverlayPanelModule, LetDirectiveModule, InputNumberModule]] });
452
+ CartPreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewModule, declarations: [CartPreviewComponent], imports: [CommonModule,
453
+ ReactiveFormsModule,
454
+ ButtonModule,
455
+ OverlayPanelModule,
456
+ LetDirectiveModule,
457
+ InputNumberModule,
458
+ VirtualScrollerModule], exports: [CartPreviewComponent] });
459
+ CartPreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewModule, imports: [[
460
+ CommonModule,
461
+ ReactiveFormsModule,
462
+ ButtonModule,
463
+ OverlayPanelModule,
464
+ LetDirectiveModule,
465
+ InputNumberModule,
466
+ VirtualScrollerModule,
467
+ ]] });
450
468
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CartPreviewModule, decorators: [{
451
469
  type: NgModule,
452
470
  args: [{
453
471
  declarations: [CartPreviewComponent],
454
- imports: [CommonModule, ReactiveFormsModule, ButtonModule, OverlayPanelModule, LetDirectiveModule, InputNumberModule],
472
+ imports: [
473
+ CommonModule,
474
+ ReactiveFormsModule,
475
+ ButtonModule,
476
+ OverlayPanelModule,
477
+ LetDirectiveModule,
478
+ InputNumberModule,
479
+ VirtualScrollerModule,
480
+ ],
455
481
  exports: [CartPreviewComponent],
456
482
  }]
457
483
  }] });
@@ -1235,7 +1261,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1235
1261
  }]
1236
1262
  }] });
1237
1263
 
1238
- const getFlowObjectIdPropertyName = (objectName) => {
1264
+ const getFlowObjectIdPropertyName = (id) => {
1265
+ const objectName = SalesforceIdUtils.getSfObjectNameById(id);
1239
1266
  switch (objectName) {
1240
1267
  case 'Account':
1241
1268
  return 'accountId';
@@ -1248,17 +1275,14 @@ const getFlowObjectIdPropertyName = (objectName) => {
1248
1275
  };
1249
1276
 
1250
1277
  class DebugComponent {
1251
- constructor(flowsApiService, router, activatedRoute, context, flowConfiguration, quoteDraftService) {
1278
+ constructor(flowsApiService, router, activatedRoute, context, quoteDraftService) {
1252
1279
  this.flowsApiService = flowsApiService;
1253
1280
  this.router = router;
1254
1281
  this.activatedRoute = activatedRoute;
1255
1282
  this.context = context;
1256
- this.flowConfiguration = flowConfiguration;
1257
1283
  this.quoteDraftService = quoteDraftService;
1258
- this.objectNames = ['Account', 'Quote', 'Order'];
1259
1284
  this.form = new FormGroup({
1260
1285
  id: new FormControl(''),
1261
- name: new FormControl('Quote'),
1262
1286
  });
1263
1287
  this.flows$ = this.flowsApiService.fetchFlows().pipe(map(flows => flows.map(flow => {
1264
1288
  var _a, _b, _c;
@@ -1272,8 +1296,8 @@ class DebugComponent {
1272
1296
  })), shareReplay());
1273
1297
  }
1274
1298
  runFlow() {
1275
- const { id, name } = this.form.value;
1276
- const objectPropertyName = getFlowObjectIdPropertyName(name);
1299
+ const { id } = this.form.value;
1300
+ const objectPropertyName = getFlowObjectIdPropertyName(id);
1277
1301
  if (!id || !this.selectedFlow) {
1278
1302
  return;
1279
1303
  }
@@ -1286,8 +1310,8 @@ class DebugComponent {
1286
1310
  });
1287
1311
  }
1288
1312
  }
1289
- DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, deps: [{ token: i2$2.FlowsApiService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2$1.ContextService }, { token: i2$1.FlowConfigurationService }, { token: i2$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
1290
- 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\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", 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: i4.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8.InputText, selector: "[pInputText]" }, { type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i11.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1313
+ DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, deps: [{ token: i2$2.FlowsApiService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2$1.ContextService }, { token: i2$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
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: i11.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": i11.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1291
1315
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DebugComponent, decorators: [{
1292
1316
  type: Component,
1293
1317
  args: [{
@@ -1296,7 +1320,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1296
1320
  styleUrls: ['./debug.component.scss'],
1297
1321
  changeDetection: ChangeDetectionStrategy.OnPush,
1298
1322
  }]
1299
- }], ctorParameters: function () { return [{ type: i2$2.FlowsApiService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2$1.ContextService }, { type: i2$1.FlowConfigurationService }, { type: i2$1.QuoteDraftService }]; } });
1323
+ }], ctorParameters: function () { return [{ type: i2$2.FlowsApiService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2$1.ContextService }, { type: i2$1.QuoteDraftService }]; } });
1300
1324
 
1301
1325
  const routes$1 = [{ path: '', component: DebugComponent }];
1302
1326
  class DebugModule {