@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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloce/api'), require('@veloce/components'), require('@veloce/sdk/cms'), require('@veloce/sdk/core'), require('primeng/button'), require('primeng/dynamicdialog'), require('@veloce/core'), require('rxjs'), require('primeng/overlaypanel'), require('primeng/splitbutton'), require('primeng/tooltip'), require('@angular/forms'), require('primeng/inputnumber'), require('@angular/router'), require('primeng/api'), require('@angular/common/http'), require('primeng/dropdown'), require('primeng/inputtext'), require('primeng/radiobutton'), require('rxjs/operators'), require('@veloce/sdk/runtime'), require('ngx-bootstrap/tooltip')) :
3
- typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/core', 'primeng/button', 'primeng/dynamicdialog', '@veloce/core', 'rxjs', 'primeng/overlaypanel', 'primeng/splitbutton', 'primeng/tooltip', '@angular/forms', 'primeng/inputnumber', '@angular/router', 'primeng/api', '@angular/common/http', 'primeng/dropdown', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', '@veloce/sdk/runtime', 'ngx-bootstrap/tooltip'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = {}), global.ng.common, global.ng.core, global["@veloce/api"], global["@veloce/components"], global.veloce.sdk.cms, global.veloce.sdk.core, global["primeng/button"], global["primeng/dynamicdialog"], global["@veloce/core"], global.rxjs, global["primeng/overlaypanel"], global.i9, global["primeng/tooltip"], global.ng.forms, global["primeng/inputnumber"], global.ng.router, global["primeng/api"], global.ng.common.http, global["primeng/dropdown"], global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global.veloce.sdk.runtime, global["ngx-bootstrap/tooltip"]));
5
- })(this, (function (exports, i11, i0, i2$2, i3, i5, i2$1, i2, i1, core, rxjs, i3$1, i9, i12, i7, i5$1, i1$1, i2$3, http, i4, i8, i6, operators, i4$1, i1$2) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloce/api'), require('@veloce/components'), require('@veloce/sdk/cms'), require('@veloce/sdk/core'), require('primeng/button'), require('primeng/dynamicdialog'), require('@veloce/core'), require('rxjs'), require('primeng/overlaypanel'), require('primeng/splitbutton'), require('primeng/tooltip'), require('@angular/forms'), require('primeng/inputnumber'), require('primeng/virtualscroller'), require('@angular/router'), require('primeng/api'), require('@angular/common/http'), require('primeng/dropdown'), require('primeng/inputtext'), require('primeng/radiobutton'), require('rxjs/operators'), require('@veloce/sdk/runtime'), require('ngx-bootstrap/tooltip')) :
3
+ typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/core', 'primeng/button', 'primeng/dynamicdialog', '@veloce/core', 'rxjs', 'primeng/overlaypanel', 'primeng/splitbutton', 'primeng/tooltip', '@angular/forms', 'primeng/inputnumber', 'primeng/virtualscroller', '@angular/router', 'primeng/api', '@angular/common/http', 'primeng/dropdown', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', '@veloce/sdk/runtime', 'ngx-bootstrap/tooltip'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = {}), global.ng.common, global.ng.core, global["@veloce/api"], global["@veloce/components"], global.veloce.sdk.cms, global.veloce.sdk.core, global["primeng/button"], global["primeng/dynamicdialog"], global["@veloce/core"], global.rxjs, global["primeng/overlaypanel"], global.i9, global["primeng/tooltip"], global.ng.forms, global["primeng/inputnumber"], global.i4, global.ng.router, global["primeng/api"], global.ng.common.http, global["primeng/dropdown"], global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global.veloce.sdk.runtime, global["ngx-bootstrap/tooltip"]));
5
+ })(this, (function (exports, i11, i0, i2$2, i3, i5, i2$1, i2, i1, core, rxjs, i3$1, i9, i12, i6, i6$1, i4, i1$1, i2$3, http, dropdown, i7, i5$1, operators, i4$1, i1$2) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -33,13 +33,13 @@
33
33
  var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
34
34
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
35
35
  var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
36
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
37
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
36
+ var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6);
37
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6$1);
38
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
38
39
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
39
40
  var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
40
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
41
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
42
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
41
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
42
+ var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
43
43
  var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
44
44
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
45
45
 
@@ -688,10 +688,12 @@
688
688
  this.routerService = routerService;
689
689
  this.productImagesService = productImagesService;
690
690
  this.quoteDraftService = quoteDraftService;
691
- this.form = new i7.FormGroup({});
691
+ this.productRowHeight = 97;
692
+ this.form = new i6.FormGroup({});
693
+ this.hasTermInProducts = false;
694
+ this.scrollHeight = 0;
692
695
  this.shouldUpdate$ = new rxjs.BehaviorSubject(true);
693
696
  this.destroyed$ = new rxjs.Subject();
694
- this.hasTermInProducts = false;
695
697
  this.lockedProductId$ = rxjs.combineLatest([this.routerService.route$, this.routerService.isConfigurationRoute$()]).pipe(rxjs.map(function (_b) {
696
698
  var _c = __read(_b, 2), route = _c[0], isConfigurationRoute = _c[1];
697
699
  if (!isConfigurationRoute) {
@@ -705,6 +707,7 @@
705
707
  var products = changes.products;
706
708
  if (products) {
707
709
  this.shouldUpdate$.next(true);
710
+ this.scrollHeight = Math.min(this.products.length * this.productRowHeight, 460);
708
711
  }
709
712
  };
710
713
  CartPreviewComponent.prototype.ngAfterViewInit = function () {
@@ -758,7 +761,7 @@
758
761
  }
759
762
  ids.push(item.id);
760
763
  if (!_this.form.controls[item.id]) {
761
- _this.form.addControl(item.id, new i7.FormControl(item.qty, []));
764
+ _this.form.addControl(item.id, new i6.FormControl(item.qty, []));
762
765
  }
763
766
  else {
764
767
  (_a = _this.form.controls[item.id]) === null || _a === void 0 ? void 0 : _a.setValue(item.qty);
@@ -777,7 +780,7 @@
777
780
  return CartPreviewComponent;
778
781
  }());
779
782
  CartPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CartPreviewComponent, deps: [{ token: i2__namespace$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i2__namespace$1.ProductImagesService }, { token: i2__namespace$1.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
780
- CartPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i3$1.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, 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__namespace$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i2__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5__namespace$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__namespace$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i11__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i11__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
783
+ CartPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i3$1.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, 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__namespace$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i4__namespace.VirtualScroller, selector: "p-virtualScroller", inputs: ["value", "itemSize", "style", "styleClass", "scrollHeight", "lazy", "rows", "minBufferPx", "maxBufferPx", "delay", "trackBy", "totalRecords", "first", "cache"], outputs: ["onLazyLoad"] }, { type: i2__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.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__namespace$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i11__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i6__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i11__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
781
784
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CartPreviewComponent, decorators: [{
782
785
  type: i0.Component,
783
786
  args: [{
@@ -799,13 +802,35 @@
799
802
  return CartPreviewModule;
800
803
  }());
801
804
  CartPreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CartPreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
802
- CartPreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CartPreviewModule, declarations: [CartPreviewComponent], imports: [i11.CommonModule, i7.ReactiveFormsModule, i2.ButtonModule, i3$1.OverlayPanelModule, i3.LetDirectiveModule, i5$1.InputNumberModule], exports: [CartPreviewComponent] });
803
- CartPreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CartPreviewModule, imports: [[i11.CommonModule, i7.ReactiveFormsModule, i2.ButtonModule, i3$1.OverlayPanelModule, i3.LetDirectiveModule, i5$1.InputNumberModule]] });
805
+ CartPreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CartPreviewModule, declarations: [CartPreviewComponent], imports: [i11.CommonModule,
806
+ i6.ReactiveFormsModule,
807
+ i2.ButtonModule,
808
+ i3$1.OverlayPanelModule,
809
+ i3.LetDirectiveModule,
810
+ i6$1.InputNumberModule,
811
+ i4.VirtualScrollerModule], exports: [CartPreviewComponent] });
812
+ CartPreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CartPreviewModule, imports: [[
813
+ i11.CommonModule,
814
+ i6.ReactiveFormsModule,
815
+ i2.ButtonModule,
816
+ i3$1.OverlayPanelModule,
817
+ i3.LetDirectiveModule,
818
+ i6$1.InputNumberModule,
819
+ i4.VirtualScrollerModule,
820
+ ]] });
804
821
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CartPreviewModule, decorators: [{
805
822
  type: i0.NgModule,
806
823
  args: [{
807
824
  declarations: [CartPreviewComponent],
808
- imports: [i11.CommonModule, i7.ReactiveFormsModule, i2.ButtonModule, i3$1.OverlayPanelModule, i3.LetDirectiveModule, i5$1.InputNumberModule],
825
+ imports: [
826
+ i11.CommonModule,
827
+ i6.ReactiveFormsModule,
828
+ i2.ButtonModule,
829
+ i3$1.OverlayPanelModule,
830
+ i3.LetDirectiveModule,
831
+ i6$1.InputNumberModule,
832
+ i4.VirtualScrollerModule,
833
+ ],
809
834
  exports: [CartPreviewComponent],
810
835
  }]
811
836
  }] });
@@ -1626,7 +1651,8 @@
1626
1651
  }]
1627
1652
  }] });
1628
1653
 
1629
- var getFlowObjectIdPropertyName = function (objectName) {
1654
+ var getFlowObjectIdPropertyName = function (id) {
1655
+ var objectName = core.SalesforceIdUtils.getSfObjectNameById(id);
1630
1656
  switch (objectName) {
1631
1657
  case 'Account':
1632
1658
  return 'accountId';
@@ -1639,17 +1665,14 @@
1639
1665
  };
1640
1666
 
1641
1667
  var DebugComponent = /** @class */ (function () {
1642
- function DebugComponent(flowsApiService, router, activatedRoute, context, flowConfiguration, quoteDraftService) {
1668
+ function DebugComponent(flowsApiService, router, activatedRoute, context, quoteDraftService) {
1643
1669
  this.flowsApiService = flowsApiService;
1644
1670
  this.router = router;
1645
1671
  this.activatedRoute = activatedRoute;
1646
1672
  this.context = context;
1647
- this.flowConfiguration = flowConfiguration;
1648
1673
  this.quoteDraftService = quoteDraftService;
1649
- this.objectNames = ['Account', 'Quote', 'Order'];
1650
- this.form = new i7.FormGroup({
1651
- id: new i7.FormControl(''),
1652
- name: new i7.FormControl('Quote'),
1674
+ this.form = new i6.FormGroup({
1675
+ id: new i6.FormControl(''),
1653
1676
  });
1654
1677
  this.flows$ = this.flowsApiService.fetchFlows().pipe(rxjs.map(function (flows) { return flows.map(function (flow) {
1655
1678
  var _a, _b, _c;
@@ -1664,8 +1687,8 @@
1664
1687
  }
1665
1688
  DebugComponent.prototype.runFlow = function () {
1666
1689
  var _d;
1667
- var _e = this.form.value, id = _e.id, name = _e.name;
1668
- var objectPropertyName = getFlowObjectIdPropertyName(name);
1690
+ var id = this.form.value.id;
1691
+ var objectPropertyName = getFlowObjectIdPropertyName(id);
1669
1692
  if (!id || !this.selectedFlow) {
1670
1693
  return;
1671
1694
  }
@@ -1679,8 +1702,8 @@
1679
1702
  };
1680
1703
  return DebugComponent;
1681
1704
  }());
1682
- DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i2__namespace$2.FlowsApiService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace$1.ContextService }, { token: i2__namespace$1.FlowConfigurationService }, { token: i2__namespace$1.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1683
- DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, 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__namespace.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__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7__namespace.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__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8__namespace.InputText, selector: "[pInputText]" }, { type: i11__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i11__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1705
+ DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i2__namespace$2.FlowsApiService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace$1.ContextService }, { token: i2__namespace$1.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1706
+ DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, 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__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5__namespace$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__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__namespace$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__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i7__namespace.InputText, selector: "[pInputText]" }, { type: i11__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i11__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1684
1707
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, decorators: [{
1685
1708
  type: i0.Component,
1686
1709
  args: [{
@@ -1689,7 +1712,7 @@
1689
1712
  styleUrls: ['./debug.component.scss'],
1690
1713
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1691
1714
  }]
1692
- }], ctorParameters: function () { return [{ type: i2__namespace$2.FlowsApiService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace$1.ContextService }, { type: i2__namespace$1.FlowConfigurationService }, { type: i2__namespace$1.QuoteDraftService }]; } });
1715
+ }], ctorParameters: function () { return [{ type: i2__namespace$2.FlowsApiService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace$1.ContextService }, { type: i2__namespace$1.QuoteDraftService }]; } });
1693
1716
 
1694
1717
  var routes$1 = [{ path: '', component: DebugComponent }];
1695
1718
  var DebugModule = /** @class */ (function () {
@@ -1699,20 +1722,20 @@
1699
1722
  }());
1700
1723
  DebugModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1701
1724
  DebugModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, declarations: [DebugComponent], imports: [i11.CommonModule,
1702
- i7.FormsModule,
1703
- i7.ReactiveFormsModule, i1__namespace$1.RouterModule, i6.RadioButtonModule,
1725
+ i6.FormsModule,
1726
+ i6.ReactiveFormsModule, i1__namespace$1.RouterModule, i5$1.RadioButtonModule,
1704
1727
  i2.ButtonModule,
1705
- i8.InputTextModule,
1706
- i4.DropdownModule] });
1728
+ i7.InputTextModule,
1729
+ dropdown.DropdownModule] });
1707
1730
  DebugModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, imports: [[
1708
1731
  i11.CommonModule,
1709
- i7.FormsModule,
1710
- i7.ReactiveFormsModule,
1732
+ i6.FormsModule,
1733
+ i6.ReactiveFormsModule,
1711
1734
  i1$1.RouterModule.forChild(routes$1),
1712
- i6.RadioButtonModule,
1735
+ i5$1.RadioButtonModule,
1713
1736
  i2.ButtonModule,
1714
- i8.InputTextModule,
1715
- i4.DropdownModule,
1737
+ i7.InputTextModule,
1738
+ dropdown.DropdownModule,
1716
1739
  ]] });
1717
1740
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, decorators: [{
1718
1741
  type: i0.NgModule,
@@ -1720,13 +1743,13 @@
1720
1743
  declarations: [DebugComponent],
1721
1744
  imports: [
1722
1745
  i11.CommonModule,
1723
- i7.FormsModule,
1724
- i7.ReactiveFormsModule,
1746
+ i6.FormsModule,
1747
+ i6.ReactiveFormsModule,
1725
1748
  i1$1.RouterModule.forChild(routes$1),
1726
- i6.RadioButtonModule,
1749
+ i5$1.RadioButtonModule,
1727
1750
  i2.ButtonModule,
1728
- i8.InputTextModule,
1729
- i4.DropdownModule,
1751
+ i7.InputTextModule,
1752
+ dropdown.DropdownModule,
1730
1753
  ],
1731
1754
  }]
1732
1755
  }] });