@veloceapps/sdk 11.0.0-16 → 11.0.0-17
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/cms/cms.actions.d.ts +98 -22
- package/cms/components/element-renderer/element-renderer.component.d.ts +3 -10
- package/cms/services/element-context.service.d.ts +0 -1
- package/cms/types/common.types.d.ts +2 -0
- package/cms/types/index.d.ts +0 -1
- package/cms/utils/path.utils.d.ts +1 -2
- package/cms/vendor-map.d.ts +4 -27
- package/core/index.d.ts +0 -1
- package/core/modules/configuration/index.d.ts +1 -4
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +3 -20
- package/core/modules/configuration/services/configuration-state.service.d.ts +3 -3
- package/core/modules/configuration/services/configuration.service.d.ts +23 -46
- package/core/modules/flow-configuration/index.d.ts +0 -3
- package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +5 -13
- package/core/services/flow-info.service.d.ts +3 -2
- package/core/services/flow-state-configuration.service.d.ts +2 -8
- package/core/services/flow-state.service.d.ts +6 -12
- package/core/services/index.d.ts +0 -1
- package/core/services/integration.state.d.ts +1 -1
- package/core/services/sales-transaction.service.d.ts +4 -2
- package/core/types/index.d.ts +0 -1
- package/core/utils/index.d.ts +2 -2
- package/core/utils/transaction-item.utils.d.ts +7 -0
- package/core/utils/transaction-item.worker.d.ts +8 -0
- package/esm2020/cms/cms.actions.mjs +99 -65
- package/esm2020/cms/cms.default.mjs +2 -3
- package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +7 -64
- package/esm2020/cms/components/preview/preview.component.mjs +3 -3
- package/esm2020/cms/services/element-context.service.mjs +1 -1
- package/esm2020/cms/types/common.types.mjs +1 -1
- package/esm2020/cms/types/index.mjs +1 -2
- package/esm2020/cms/utils/element.utils.mjs +3 -3
- package/esm2020/cms/utils/path.utils.mjs +1 -10
- package/esm2020/cms/vendor-map.mjs +4 -5
- package/esm2020/core/core.module.mjs +4 -5
- package/esm2020/core/index.mjs +1 -2
- package/esm2020/core/modules/configuration/configuration.module.mjs +3 -4
- package/esm2020/core/modules/configuration/index.mjs +2 -5
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +9 -67
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +46 -54
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +96 -226
- package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +3 -4
- package/esm2020/core/modules/flow-configuration/index.mjs +1 -4
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +15 -32
- package/esm2020/core/services/flow-info.service.mjs +9 -3
- package/esm2020/core/services/flow-state-configuration.service.mjs +10 -25
- package/esm2020/core/services/flow-state.service.mjs +25 -58
- package/esm2020/core/services/index.mjs +1 -2
- package/esm2020/core/services/integration.state.mjs +2 -2
- package/esm2020/core/services/sales-transaction.service.mjs +11 -5
- package/esm2020/core/types/index.mjs +1 -2
- package/esm2020/core/utils/index.mjs +3 -3
- package/esm2020/core/utils/transaction-item.utils.mjs +60 -0
- package/esm2020/core/utils/transaction-item.worker.mjs +16 -0
- package/esm2020/src/flow-routing.module.mjs +8 -8
- package/esm2020/src/guards/flow.guard.mjs +5 -7
- package/esm2020/src/guards/product-unload.guard.mjs +7 -7
- package/esm2020/src/index.mjs +1 -2
- package/esm2020/src/pages/debug/debug.component.mjs +10 -15
- package/esm2020/src/pages/product/product.component.mjs +11 -14
- package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +5 -6
- package/esm2020/src/resolvers/sales-transaction.resolver.mjs +83 -0
- package/esm2020/src/resolvers/ui-definition.resolver.mjs +5 -4
- package/esm2020/src/services/flow-dialog.service.mjs +1 -1
- package/esm2020/src/services/flow-router.service.mjs +17 -24
- package/esm2020/src/services/flow.service.mjs +5 -13
- package/esm2020/src/types/index.mjs +2 -3
- package/esm2020/src/types/route.types.mjs +1 -1
- package/fesm2015/veloceapps-sdk-cms.mjs +116 -252
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +318 -1116
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +87 -120
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +112 -244
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +366 -1162
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +87 -120
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/guards/product-unload.guard.d.ts +3 -3
- package/src/index.d.ts +0 -1
- package/src/pages/debug/debug.component.d.ts +1 -3
- package/src/pages/product/product.component.d.ts +3 -4
- package/src/pages/record-not-found/record-not-found.component.d.ts +2 -3
- package/src/resolvers/sales-transaction.resolver.d.ts +18 -0
- package/src/services/flow-dialog.service.d.ts +2 -1
- package/src/services/flow-router.service.d.ts +5 -5
- package/src/services/flow.service.d.ts +0 -1
- package/src/types/index.d.ts +1 -2
- package/src/types/route.types.d.ts +0 -5
- package/cms/plugins/configuration.plugin.d.ts +0 -23
- package/cms/types/configuration.types.d.ts +0 -21
- package/core/modules/configuration/helpers.d.ts +0 -7
- package/core/modules/configuration/services/runtime-context.service.d.ts +0 -12
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +0 -8
- package/core/modules/flow-configuration/services/flow-update.service.d.ts +0 -13
- package/core/modules/flow-configuration/types/update.types.d.ts +0 -12
- package/core/services/quote-draft.service.d.ts +0 -50
- package/core/types/runtime.types.d.ts +0 -30
- package/core/utils/line-item.utils.d.ts +0 -25
- package/core/utils/line-item.worker.d.ts +0 -9
- package/esm2020/cms/plugins/configuration.plugin.mjs +0 -109
- package/esm2020/cms/types/configuration.types.mjs +0 -2
- package/esm2020/core/modules/configuration/helpers.mjs +0 -67
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +0 -45
- package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +0 -2
- package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +0 -138
- package/esm2020/core/modules/flow-configuration/types/update.types.mjs +0 -2
- package/esm2020/core/services/quote-draft.service.mjs +0 -174
- package/esm2020/core/types/runtime.types.mjs +0 -16
- package/esm2020/core/utils/line-item.utils.mjs +0 -187
- package/esm2020/core/utils/line-item.worker.mjs +0 -19
- package/esm2020/src/resolvers/quote.resolver.mjs +0 -82
- package/esm2020/src/types/context-route.types.mjs +0 -2
- package/esm2020/src/types/metrics.types.mjs +0 -2
- package/esm2020/src/utils/flow.utils.mjs +0 -14
- package/esm2020/src/utils/index.mjs +0 -2
- package/src/resolvers/quote.resolver.d.ts +0 -18
- package/src/types/context-route.types.d.ts +0 -5
- package/src/types/metrics.types.d.ts +0 -5
- package/src/utils/flow.utils.d.ts +0 -1
- package/src/utils/index.d.ts +0 -1
|
@@ -4,12 +4,12 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { Component, ChangeDetectionStrategy, NgModule, Optional, Inject, Injectable, inject } from '@angular/core';
|
|
5
5
|
import * as i1$3 from '@veloceapps/api';
|
|
6
6
|
import { ApiModule } from '@veloceapps/api';
|
|
7
|
-
import * as i2
|
|
7
|
+
import * as i2 from '@veloceapps/components';
|
|
8
8
|
import { ToastType, LoaderModule, LetDirectiveModule } from '@veloceapps/components';
|
|
9
9
|
import * as i5 from '@veloceapps/sdk/cms';
|
|
10
10
|
import { btoaSafe, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
|
|
11
|
-
import * as
|
|
12
|
-
import { FLOW_CUSTOMIZATION, RuntimeSettingsService, FlowStateService, FlowInfoService,
|
|
11
|
+
import * as i3$1 from '@veloceapps/sdk/core';
|
|
12
|
+
import { FLOW_CUSTOMIZATION, RuntimeSettingsService, FlowStateService, FlowInfoService, SalesTransactionService, ConfigurationService, IntegrationState, ConfigurationRuntimeService, SdkCoreModule } from '@veloceapps/sdk/core';
|
|
13
13
|
import * as i3 from 'primeng/button';
|
|
14
14
|
import { ButtonModule } from 'primeng/button';
|
|
15
15
|
import * as i1 from 'primeng/dynamicdialog';
|
|
@@ -19,14 +19,14 @@ import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of
|
|
|
19
19
|
import { DomHandler } from 'primeng/dom';
|
|
20
20
|
import * as i1$2 from '@angular/router';
|
|
21
21
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
|
22
|
-
import { mapShoppingCartSettings, getMaxRenewalTermsValue,
|
|
22
|
+
import { mapShoppingCartSettings, getMaxRenewalTermsValue, SalesforceIdUtils, UITemplateType, isVeloceError, extractErrorDetails } from '@veloceapps/core';
|
|
23
23
|
import { HttpErrorResponse, HttpParams } from '@angular/common/http';
|
|
24
|
-
import * as
|
|
24
|
+
import * as i4$1 from '@angular/forms';
|
|
25
25
|
import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
26
26
|
import { DropdownModule } from 'primeng/dropdown';
|
|
27
|
-
import * as
|
|
27
|
+
import * as i7 from 'primeng/inputtext';
|
|
28
28
|
import { InputTextModule } from 'primeng/inputtext';
|
|
29
|
-
import * as
|
|
29
|
+
import * as i5$1 from 'primeng/radiobutton';
|
|
30
30
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
31
31
|
import { catchError as catchError$1 } from 'rxjs/operators';
|
|
32
32
|
|
|
@@ -160,12 +160,12 @@ class FlowHeaderComponent {
|
|
|
160
160
|
}));
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token:
|
|
163
|
+
FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i3$1.FlowStateService }, { token: i3$1.FlowInfoService }, { token: i2.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
164
164
|
FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowHeaderComponent, selector: "vl-flow-new-header", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
165
165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
|
166
166
|
type: Component,
|
|
167
167
|
args: [{ selector: 'vl-flow-new-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
|
168
|
-
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type:
|
|
168
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i3$1.FlowStateService }, { type: i3$1.FlowInfoService }, { type: i2.ToastService }, { type: undefined, decorators: [{
|
|
169
169
|
type: Optional
|
|
170
170
|
}, {
|
|
171
171
|
type: Inject,
|
|
@@ -270,12 +270,12 @@ class GuidedSellingComponent {
|
|
|
270
270
|
}));
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token:
|
|
273
|
+
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i3$1.FlowStateService }, { token: i3$1.FlowInfoService }, { token: i2.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
274
274
|
GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: GuidedSellingComponent, selector: "vl-flow-guided-selling", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
275
275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
|
|
276
276
|
type: Component,
|
|
277
277
|
args: [{ selector: 'vl-flow-guided-selling', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
|
278
|
-
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type:
|
|
278
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i3$1.FlowStateService }, { type: i3$1.FlowInfoService }, { type: i2.ToastService }, { type: undefined, decorators: [{
|
|
279
279
|
type: Optional
|
|
280
280
|
}, {
|
|
281
281
|
type: Inject,
|
|
@@ -426,18 +426,18 @@ class FlowDialogService {
|
|
|
426
426
|
return dialogFunction(dialog);
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token:
|
|
429
|
+
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i3$1.RuntimeSettingsService }, { token: i3$1.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
430
430
|
FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
|
|
431
431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
|
|
432
432
|
type: Injectable
|
|
433
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type:
|
|
433
|
+
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i3$1.RuntimeSettingsService }, { type: i3$1.FlowInfoService }]; } });
|
|
434
434
|
|
|
435
435
|
class FlowRouterService {
|
|
436
|
-
constructor(router, route, integrationState,
|
|
436
|
+
constructor(router, route, integrationState, flowInfoService) {
|
|
437
437
|
this.router = router;
|
|
438
438
|
this.route = route;
|
|
439
439
|
this.integrationState = integrationState;
|
|
440
|
-
this.
|
|
440
|
+
this.flowInfoService = flowInfoService;
|
|
441
441
|
this.urlHistory = [];
|
|
442
442
|
this.getLastChildRoute = (route) => {
|
|
443
443
|
return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;
|
|
@@ -531,7 +531,7 @@ class FlowRouterService {
|
|
|
531
531
|
this.router.navigateByUrl(prevUrl);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
navigateTo(path, productId,
|
|
534
|
+
navigateTo(path, productId, transactionItemId) {
|
|
535
535
|
if (path === 'shopping-cart') {
|
|
536
536
|
this.navigateToShoppingCart();
|
|
537
537
|
}
|
|
@@ -542,23 +542,16 @@ class FlowRouterService {
|
|
|
542
542
|
this.navigateToAssets();
|
|
543
543
|
}
|
|
544
544
|
else if (path === 'product' && productId) {
|
|
545
|
-
this.navigateToProductConfiguration(productId,
|
|
545
|
+
this.navigateToProductConfiguration(productId, transactionItemId);
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
navigateToProductConfiguration(productId,
|
|
549
|
-
this.
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
|
556
|
-
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
|
557
|
-
this.router.navigate([flowRouteUrl, 'product'], {
|
|
558
|
-
queryParams: { ...routeSnapshot.queryParams, productId },
|
|
559
|
-
});
|
|
560
|
-
}))
|
|
561
|
-
.subscribe();
|
|
548
|
+
navigateToProductConfiguration(productId, transactionItemId) {
|
|
549
|
+
this.flowInfoService.updateContext({ productId, transactionItemId });
|
|
550
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
|
551
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
|
552
|
+
this.router.navigate([flowRouteUrl, 'product'], {
|
|
553
|
+
queryParams: { ...routeSnapshot.queryParams, productId, transactionItemId },
|
|
554
|
+
});
|
|
562
555
|
}
|
|
563
556
|
navigateToShoppingCart() {
|
|
564
557
|
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
|
@@ -595,12 +588,12 @@ class FlowRouterService {
|
|
|
595
588
|
this.router.navigate([], { relativeTo: route, queryParams: { ...routeSnapshot.queryParams, ...queryParams } });
|
|
596
589
|
}
|
|
597
590
|
}
|
|
598
|
-
FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token:
|
|
591
|
+
FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i3$1.IntegrationState }, { token: i3$1.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
599
592
|
FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
|
|
600
593
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, decorators: [{
|
|
601
594
|
type: Injectable,
|
|
602
595
|
args: [{ providedIn: 'root' }]
|
|
603
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type:
|
|
596
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i3$1.IntegrationState }, { type: i3$1.FlowInfoService }]; } });
|
|
604
597
|
|
|
605
598
|
class FlowService {
|
|
606
599
|
constructor(integrationState, flowRouterService, configurationService, configurationStateService, flowDialogService, flowStateService) {
|
|
@@ -618,9 +611,9 @@ class FlowService {
|
|
|
618
611
|
initSubscriptions() {
|
|
619
612
|
this.integrationState
|
|
620
613
|
.listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
|
|
621
|
-
.pipe(
|
|
614
|
+
.pipe(tap(payload => {
|
|
622
615
|
if (payload.productId) {
|
|
623
|
-
this.flowRouterService.navigateToProductConfiguration(payload.productId, payload.
|
|
616
|
+
this.flowRouterService.navigateToProductConfiguration(payload.productId, payload.transactionItemId);
|
|
624
617
|
}
|
|
625
618
|
else {
|
|
626
619
|
console.warn("Parameter 'productId' is needed to start configuration");
|
|
@@ -644,7 +637,7 @@ class FlowService {
|
|
|
644
637
|
this.integrationState.dispatch(FlowAction.ConfigureProductAction(payload));
|
|
645
638
|
}
|
|
646
639
|
else {
|
|
647
|
-
this.flowRouterService.navigateTo(payload.path, payload.productId, payload.
|
|
640
|
+
this.flowRouterService.navigateTo(payload.path, payload.productId, payload.transactionItemId);
|
|
648
641
|
}
|
|
649
642
|
}), takeUntil(this.cleanup$))
|
|
650
643
|
.subscribe();
|
|
@@ -683,20 +676,12 @@ class FlowService {
|
|
|
683
676
|
.pipe(map(path => path.queryParams['productId']), takeUntil(this.cleanup$))
|
|
684
677
|
.subscribe(productId => this.integrationState.patchState({ productId }));
|
|
685
678
|
}
|
|
686
|
-
prepareConfiguration$(lineItemId) {
|
|
687
|
-
if (!lineItemId) {
|
|
688
|
-
return of(undefined);
|
|
689
|
-
}
|
|
690
|
-
return this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_PRICE_LIST', {
|
|
691
|
-
lineItemId,
|
|
692
|
-
});
|
|
693
|
-
}
|
|
694
679
|
}
|
|
695
|
-
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i5.IntegrationState }, { token: FlowRouterService }, { token:
|
|
680
|
+
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i5.IntegrationState }, { token: FlowRouterService }, { token: i3$1.ConfigurationService }, { token: i3$1.ConfigurationStateService }, { token: FlowDialogService }, { token: i3$1.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
696
681
|
FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
|
|
697
682
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
|
|
698
683
|
type: Injectable
|
|
699
|
-
}], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type:
|
|
684
|
+
}], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i3$1.ConfigurationService }, { type: i3$1.ConfigurationStateService }, { type: FlowDialogService }, { type: i3$1.FlowStateService }]; } });
|
|
700
685
|
|
|
701
686
|
class FlowGuidedSellingService {
|
|
702
687
|
constructor(integrationState) {
|
|
@@ -720,11 +705,11 @@ class FlowGuidedSellingService {
|
|
|
720
705
|
.subscribe();
|
|
721
706
|
}
|
|
722
707
|
}
|
|
723
|
-
FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token:
|
|
708
|
+
FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i3$1.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
724
709
|
FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
|
|
725
710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
|
|
726
711
|
type: Injectable
|
|
727
|
-
}], ctorParameters: function () { return [{ type:
|
|
712
|
+
}], ctorParameters: function () { return [{ type: i3$1.IntegrationState }]; } });
|
|
728
713
|
|
|
729
714
|
class FlowComponent {
|
|
730
715
|
constructor(routerService, flowService, flowInfoService, guidedSellingService) {
|
|
@@ -742,19 +727,18 @@ class FlowComponent {
|
|
|
742
727
|
this.flowService.cleanup();
|
|
743
728
|
}
|
|
744
729
|
}
|
|
745
|
-
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token:
|
|
746
|
-
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-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\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2
|
|
730
|
+
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token: i3$1.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
731
|
+
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-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\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
747
732
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
|
|
748
733
|
type: Component,
|
|
749
734
|
args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-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\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"] }]
|
|
750
|
-
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type:
|
|
735
|
+
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i3$1.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
|
|
751
736
|
|
|
752
737
|
const keepFlowInitialized = (route) => {
|
|
753
738
|
const routerService = inject(FlowRouterService);
|
|
754
739
|
const runtimeSettingsService = inject(RuntimeSettingsService);
|
|
755
740
|
const flowState = inject(FlowStateService);
|
|
756
741
|
const flowInfoService = inject(FlowInfoService);
|
|
757
|
-
const quoteDraft = inject(QuoteDraftService);
|
|
758
742
|
const salesTrasnsactionService = inject(SalesTransactionService);
|
|
759
743
|
const configurationService = inject(ConfigurationService);
|
|
760
744
|
const integrationState = inject(IntegrationState);
|
|
@@ -763,12 +747,11 @@ const keepFlowInitialized = (route) => {
|
|
|
763
747
|
return true;
|
|
764
748
|
}
|
|
765
749
|
// Cleanup
|
|
766
|
-
flowState.
|
|
767
|
-
quoteDraft.reset();
|
|
750
|
+
flowState.reset();
|
|
768
751
|
salesTrasnsactionService.reset();
|
|
769
752
|
configurationService.reset();
|
|
770
|
-
integrationState.
|
|
771
|
-
flowInfoService.
|
|
753
|
+
integrationState.reset();
|
|
754
|
+
flowInfoService.reset();
|
|
772
755
|
if (!flowId) {
|
|
773
756
|
return true;
|
|
774
757
|
}
|
|
@@ -781,15 +764,15 @@ const keepFlowInitialized = (route) => {
|
|
|
781
764
|
};
|
|
782
765
|
|
|
783
766
|
class ProductUnloadGuard {
|
|
784
|
-
constructor(router,
|
|
767
|
+
constructor(router, flowInfoService, configurationService, flowDialogService) {
|
|
785
768
|
this.router = router;
|
|
786
|
-
this.
|
|
769
|
+
this.flowInfoService = flowInfoService;
|
|
787
770
|
this.configurationService = configurationService;
|
|
788
771
|
this.flowDialogService = flowDialogService;
|
|
789
772
|
}
|
|
790
773
|
canDeactivate(_, route, currentState, nextState) {
|
|
791
774
|
let observable = of(true);
|
|
792
|
-
if (!this.
|
|
775
|
+
if (!this.flowInfoService.flow.properties.standalone && this.configurationService.hasUnsavedChanges) {
|
|
793
776
|
observable = this.flowDialogService.showUnsavedChangesDialog();
|
|
794
777
|
}
|
|
795
778
|
return observable.pipe(map(unload => {
|
|
@@ -812,11 +795,11 @@ class ProductUnloadGuard {
|
|
|
812
795
|
}));
|
|
813
796
|
}
|
|
814
797
|
}
|
|
815
|
-
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token:
|
|
798
|
+
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i3$1.FlowInfoService }, { token: i3$1.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
816
799
|
ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard });
|
|
817
800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, decorators: [{
|
|
818
801
|
type: Injectable
|
|
819
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type:
|
|
802
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i3$1.FlowInfoService }, { type: i3$1.ConfigurationService }, { type: FlowDialogService }]; } });
|
|
820
803
|
|
|
821
804
|
class RootGuard {
|
|
822
805
|
constructor(router, routerService) {
|
|
@@ -941,12 +924,12 @@ class AssetsComponent {
|
|
|
941
924
|
}));
|
|
942
925
|
}
|
|
943
926
|
}
|
|
944
|
-
AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2
|
|
945
|
-
AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2
|
|
927
|
+
AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: i3$1.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
928
|
+
AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
946
929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, decorators: [{
|
|
947
930
|
type: Component,
|
|
948
931
|
args: [{ selector: 'vl-flow-assets', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
949
|
-
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2
|
|
932
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: i3$1.FlowInfoService }, { type: undefined, decorators: [{
|
|
950
933
|
type: Optional
|
|
951
934
|
}, {
|
|
952
935
|
type: Inject,
|
|
@@ -1050,12 +1033,12 @@ class CatalogComponent {
|
|
|
1050
1033
|
}));
|
|
1051
1034
|
}
|
|
1052
1035
|
}
|
|
1053
|
-
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2
|
|
1054
|
-
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2
|
|
1036
|
+
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: i3$1.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1037
|
+
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1055
1038
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, decorators: [{
|
|
1056
1039
|
type: Component,
|
|
1057
1040
|
args: [{ selector: 'vl-flow-catalog', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
1058
|
-
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2
|
|
1041
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: i3$1.FlowInfoService }, { type: undefined, decorators: [{
|
|
1059
1042
|
type: Optional
|
|
1060
1043
|
}, {
|
|
1061
1044
|
type: Inject,
|
|
@@ -1077,11 +1060,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1077
1060
|
}] });
|
|
1078
1061
|
|
|
1079
1062
|
class DebugComponent {
|
|
1080
|
-
constructor(flowsApiService, router, activatedRoute
|
|
1063
|
+
constructor(flowsApiService, router, activatedRoute) {
|
|
1081
1064
|
this.flowsApiService = flowsApiService;
|
|
1082
1065
|
this.router = router;
|
|
1083
1066
|
this.activatedRoute = activatedRoute;
|
|
1084
|
-
this.quoteDraftService = quoteDraftService;
|
|
1085
1067
|
this.form = new FormGroup({
|
|
1086
1068
|
id: new FormControl(''),
|
|
1087
1069
|
});
|
|
@@ -1092,8 +1074,6 @@ class DebugComponent {
|
|
|
1092
1074
|
if (!id || !this.selectedFlow) {
|
|
1093
1075
|
return;
|
|
1094
1076
|
}
|
|
1095
|
-
// Delete context before starting a new flow
|
|
1096
|
-
this.quoteDraftService.reset();
|
|
1097
1077
|
this.router.navigate(['..', 'flows'], {
|
|
1098
1078
|
queryParams: {
|
|
1099
1079
|
flowId: this.selectedFlow.id,
|
|
@@ -1107,12 +1087,12 @@ class DebugComponent {
|
|
|
1107
1087
|
return new HttpParams({ fromObject: params }).toString();
|
|
1108
1088
|
}
|
|
1109
1089
|
}
|
|
1110
|
-
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i1$3.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }
|
|
1111
|
-
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</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.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</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;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;table-layout:fixed}tbody>tr{cursor:pointer}tbody>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;line-height:18px}.cell-query-params{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type:
|
|
1090
|
+
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i1$3.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
1091
|
+
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</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.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</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;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;table-layout:fixed}tbody>tr{cursor:pointer}tbody>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;line-height:18px}.cell-query-params{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$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]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i7.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1112
1092
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, decorators: [{
|
|
1113
1093
|
type: Component,
|
|
1114
1094
|
args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, 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 <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</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.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</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;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;table-layout:fixed}tbody>tr{cursor:pointer}tbody>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;line-height:18px}.cell-query-params{word-break:break-all}\n"] }]
|
|
1115
|
-
}], ctorParameters: function () { return [{ type: i1$3.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }
|
|
1095
|
+
}], ctorParameters: function () { return [{ type: i1$3.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
|
|
1116
1096
|
|
|
1117
1097
|
const routes$1 = [{ path: '', component: DebugComponent }];
|
|
1118
1098
|
class DebugModule {
|
|
@@ -1150,12 +1130,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1150
1130
|
}] });
|
|
1151
1131
|
|
|
1152
1132
|
class ProductComponent {
|
|
1153
|
-
constructor(
|
|
1154
|
-
this.
|
|
1133
|
+
constructor(configurationRuntimeService, configurationStateService) {
|
|
1134
|
+
this.configurationRuntimeService = configurationRuntimeService;
|
|
1155
1135
|
this.configurationStateService = configurationStateService;
|
|
1156
1136
|
this.uiDefinitionContainer$ = new BehaviorSubject(null);
|
|
1157
|
-
|
|
1158
|
-
this.uiDefinitionContainer$.next(uiDefContainer);
|
|
1137
|
+
this.uiDefinitionContainer$.next(this.configurationRuntimeService.uiDefinitionContainer);
|
|
1159
1138
|
this.config = {
|
|
1160
1139
|
init$: () => this.init$(),
|
|
1161
1140
|
};
|
|
@@ -1164,12 +1143,12 @@ class ProductComponent {
|
|
|
1164
1143
|
return this.configurationStateService.init$();
|
|
1165
1144
|
}
|
|
1166
1145
|
}
|
|
1167
|
-
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token:
|
|
1146
|
+
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token: i3$1.ConfigurationRuntimeService }, { token: i3$1.ConfigurationStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1168
1147
|
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<vl-cms-preview [uiDefinition]=\"(uiDefinitionContainer$ | async)?.source\" [config]=\"config\"></vl-cms-preview>\n", styles: [""], dependencies: [{ kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1169
1148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, decorators: [{
|
|
1170
1149
|
type: Component,
|
|
1171
1150
|
args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"(uiDefinitionContainer$ | async)?.source\" [config]=\"config\"></vl-cms-preview>\n" }]
|
|
1172
|
-
}], ctorParameters: function () { return [{ type:
|
|
1151
|
+
}], ctorParameters: function () { return [{ type: i3$1.ConfigurationRuntimeService }, { type: i3$1.ConfigurationStateService }]; } });
|
|
1173
1152
|
|
|
1174
1153
|
class ProductModule {
|
|
1175
1154
|
}
|
|
@@ -1186,9 +1165,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1186
1165
|
}] });
|
|
1187
1166
|
|
|
1188
1167
|
class RecordNotFoundComponent {
|
|
1189
|
-
constructor(router
|
|
1168
|
+
constructor(router) {
|
|
1190
1169
|
this.router = router;
|
|
1191
|
-
this.route = route;
|
|
1192
1170
|
this.subMessage = '';
|
|
1193
1171
|
this.type = '';
|
|
1194
1172
|
const navigation = this.router.getCurrentNavigation();
|
|
@@ -1201,12 +1179,12 @@ class RecordNotFoundComponent {
|
|
|
1201
1179
|
}
|
|
1202
1180
|
}
|
|
1203
1181
|
}
|
|
1204
|
-
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }
|
|
1182
|
+
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
1205
1183
|
RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1206
1184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
|
|
1207
1185
|
type: Component,
|
|
1208
1186
|
args: [{ selector: 'vl-flow-record-not-found', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"] }]
|
|
1209
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }
|
|
1187
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }]; } });
|
|
1210
1188
|
|
|
1211
1189
|
const routes = [{ path: '', component: RecordNotFoundComponent }];
|
|
1212
1190
|
class RecordNotFoundModule {
|
|
@@ -1305,12 +1283,12 @@ class ShoppingCartComponent {
|
|
|
1305
1283
|
}));
|
|
1306
1284
|
}
|
|
1307
1285
|
}
|
|
1308
|
-
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2
|
|
1309
|
-
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2
|
|
1286
|
+
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2.ToastService }, { token: i3$1.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1287
|
+
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1310
1288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, decorators: [{
|
|
1311
1289
|
type: Component,
|
|
1312
1290
|
args: [{ selector: 'vl-flow-shopping-cart', changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
1313
|
-
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2
|
|
1291
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2.ToastService }, { type: i3$1.FlowInfoService }, { type: undefined, decorators: [{
|
|
1314
1292
|
type: Optional
|
|
1315
1293
|
}, {
|
|
1316
1294
|
type: Inject,
|
|
@@ -1363,19 +1341,19 @@ class FlowResolver {
|
|
|
1363
1341
|
}));
|
|
1364
1342
|
}
|
|
1365
1343
|
}
|
|
1366
|
-
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token:
|
|
1344
|
+
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i3$1.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1367
1345
|
FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver });
|
|
1368
1346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, decorators: [{
|
|
1369
1347
|
type: Injectable
|
|
1370
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type:
|
|
1348
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i3$1.FlowInfoService }]; } });
|
|
1371
1349
|
|
|
1372
|
-
class
|
|
1373
|
-
constructor(router,
|
|
1350
|
+
class SalesTransactionResolver {
|
|
1351
|
+
constructor(router, routerService, flowInfoService, flowStateService, salesTransactionService) {
|
|
1374
1352
|
this.router = router;
|
|
1375
|
-
this.quoteDraftService = quoteDraftService;
|
|
1376
1353
|
this.routerService = routerService;
|
|
1377
1354
|
this.flowInfoService = flowInfoService;
|
|
1378
1355
|
this.flowStateService = flowStateService;
|
|
1356
|
+
this.salesTransactionService = salesTransactionService;
|
|
1379
1357
|
}
|
|
1380
1358
|
resolve(route) {
|
|
1381
1359
|
const flow = this.flowInfoService.flow;
|
|
@@ -1423,27 +1401,29 @@ class QuoteResolver {
|
|
|
1423
1401
|
}));
|
|
1424
1402
|
}
|
|
1425
1403
|
else {
|
|
1426
|
-
const isAccountMode = this.flowInfoService.context.mode ===
|
|
1427
|
-
|
|
1404
|
+
const isAccountMode = this.flowInfoService.context.mode === 'ACCOUNT';
|
|
1405
|
+
const { hasAssets, hasProducts } = this.salesTransactionService;
|
|
1406
|
+
if (isAccountMode || hasAssets) {
|
|
1428
1407
|
navigateTo = '/assets';
|
|
1429
1408
|
}
|
|
1430
|
-
else if (
|
|
1409
|
+
else if (hasProducts) {
|
|
1431
1410
|
navigateTo = '/cart';
|
|
1432
1411
|
}
|
|
1433
1412
|
}
|
|
1434
1413
|
return of(navigateTo);
|
|
1435
1414
|
}
|
|
1436
1415
|
}
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
1416
|
+
SalesTransactionResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i3$1.FlowInfoService }, { token: i3$1.FlowStateService }, { token: i3$1.SalesTransactionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1417
|
+
SalesTransactionResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionResolver });
|
|
1418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionResolver, decorators: [{
|
|
1440
1419
|
type: Injectable
|
|
1441
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type:
|
|
1420
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i3$1.FlowInfoService }, { type: i3$1.FlowStateService }, { type: i3$1.SalesTransactionService }]; } });
|
|
1442
1421
|
|
|
1443
1422
|
const resolveUIDefinition = () => {
|
|
1444
1423
|
const customizationService = inject(FLOW_CUSTOMIZATION, { optional: true });
|
|
1445
1424
|
const flowInfoService = inject(FlowInfoService);
|
|
1446
1425
|
const uiDefinitionsApiService = inject(UIDefinitionsApiService);
|
|
1426
|
+
const configurationRuntimeService = inject(ConfigurationRuntimeService);
|
|
1447
1427
|
const { productId } = flowInfoService.context;
|
|
1448
1428
|
if (!productId) {
|
|
1449
1429
|
throw new Error(`Unable to start configuration for 'productId == null'`);
|
|
@@ -1474,7 +1454,7 @@ const resolveUIDefinition = () => {
|
|
|
1474
1454
|
}
|
|
1475
1455
|
return uiDefContainer;
|
|
1476
1456
|
}));
|
|
1477
|
-
}));
|
|
1457
|
+
}), tap(uiDefContainer => (configurationRuntimeService.uiDefinitionContainer = uiDefContainer)));
|
|
1478
1458
|
};
|
|
1479
1459
|
|
|
1480
1460
|
const rootRoute = {
|
|
@@ -1499,7 +1479,7 @@ const rootRoute = {
|
|
|
1499
1479
|
path: 'product',
|
|
1500
1480
|
component: ProductComponent,
|
|
1501
1481
|
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1502
|
-
resolve: {
|
|
1482
|
+
resolve: { salesTransaction: SalesTransactionResolver, uiDef: resolveUIDefinition },
|
|
1503
1483
|
canDeactivate: [ProductUnloadGuard],
|
|
1504
1484
|
data: { showHeader: true },
|
|
1505
1485
|
},
|
|
@@ -1507,21 +1487,21 @@ const rootRoute = {
|
|
|
1507
1487
|
path: 'cart',
|
|
1508
1488
|
component: ShoppingCartComponent,
|
|
1509
1489
|
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1510
|
-
resolve: {
|
|
1490
|
+
resolve: { salesTransaction: SalesTransactionResolver },
|
|
1511
1491
|
data: { showHeader: true },
|
|
1512
1492
|
},
|
|
1513
1493
|
{
|
|
1514
1494
|
path: 'catalog',
|
|
1515
1495
|
component: CatalogComponent,
|
|
1516
1496
|
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1517
|
-
resolve: {
|
|
1497
|
+
resolve: { salesTransaction: SalesTransactionResolver },
|
|
1518
1498
|
data: { showHeader: true },
|
|
1519
1499
|
},
|
|
1520
1500
|
{
|
|
1521
1501
|
path: 'assets',
|
|
1522
1502
|
component: AssetsComponent,
|
|
1523
1503
|
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1524
|
-
resolve: {
|
|
1504
|
+
resolve: { salesTransaction: SalesTransactionResolver },
|
|
1525
1505
|
data: { showHeader: true },
|
|
1526
1506
|
},
|
|
1527
1507
|
{
|
|
@@ -1540,13 +1520,13 @@ class FlowRoutingModule {
|
|
|
1540
1520
|
}
|
|
1541
1521
|
FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1542
1522
|
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule, ShoppingCartModule, CatalogModule, AssetsModule], exports: [RouterModule] });
|
|
1543
|
-
FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ProductUnloadGuard, FlowResolver,
|
|
1523
|
+
FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ProductUnloadGuard, FlowResolver, SalesTransactionResolver], imports: [RouterModule.forChild([rootRoute]), ProductModule, ShoppingCartModule, CatalogModule, AssetsModule, RouterModule] });
|
|
1544
1524
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, decorators: [{
|
|
1545
1525
|
type: NgModule,
|
|
1546
1526
|
args: [{
|
|
1547
1527
|
imports: [RouterModule.forChild([rootRoute]), ProductModule, ShoppingCartModule, CatalogModule, AssetsModule],
|
|
1548
1528
|
exports: [RouterModule],
|
|
1549
|
-
providers: [FlowRouterService, RootGuard, ProductUnloadGuard, FlowResolver,
|
|
1529
|
+
providers: [FlowRouterService, RootGuard, ProductUnloadGuard, FlowResolver, SalesTransactionResolver],
|
|
1550
1530
|
}]
|
|
1551
1531
|
}] });
|
|
1552
1532
|
|
|
@@ -1594,22 +1574,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1594
1574
|
}]
|
|
1595
1575
|
}] });
|
|
1596
1576
|
|
|
1597
|
-
const getFlowObjectIdPropertyName = (id) => {
|
|
1598
|
-
const objectName = SalesforceIdUtils.getSfObjectNameById(id);
|
|
1599
|
-
switch (objectName) {
|
|
1600
|
-
case 'Account':
|
|
1601
|
-
return 'accountId';
|
|
1602
|
-
case 'Order':
|
|
1603
|
-
return 'orderId';
|
|
1604
|
-
case 'Quote':
|
|
1605
|
-
default:
|
|
1606
|
-
return 'quoteId';
|
|
1607
|
-
}
|
|
1608
|
-
};
|
|
1609
|
-
|
|
1610
1577
|
/**
|
|
1611
1578
|
* Generated bundle index. Do not edit.
|
|
1612
1579
|
*/
|
|
1613
1580
|
|
|
1614
|
-
export { FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE
|
|
1581
|
+
export { FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE };
|
|
1615
1582
|
//# sourceMappingURL=veloceapps-sdk.mjs.map
|