@veloceapps/sdk 9.0.0-9 → 10.0.0-1
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/core/modules/configuration/services/configuration-state.service.d.ts +5 -3
- package/core/services/flow-info.service.d.ts +1 -1
- package/core/services/quote-draft.service.d.ts +3 -1
- package/esm2020/cms/components/preview/preview.component.mjs +3 -4
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +67 -37
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +8 -3
- package/esm2020/core/services/flow-info.service.mjs +6 -8
- package/esm2020/core/services/quote-draft.service.mjs +13 -8
- package/esm2020/src/flow.component.mjs +4 -1
- package/esm2020/src/guards/flow.guard.mjs +2 -3
- package/esm2020/src/pages/product/product.component.mjs +2 -2
- package/fesm2015/veloceapps-sdk-cms.mjs +2 -4
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +97 -54
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +6 -3
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +2 -3
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +89 -52
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +5 -3
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +4 -4
- package/src/flow.component.d.ts +3 -1
@@ -926,6 +926,9 @@ class FlowComponent {
|
|
926
926
|
this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
|
927
927
|
this.flowService.initSubscriptions();
|
928
928
|
}
|
929
|
+
ngOnDestroy() {
|
930
|
+
this.flowService.cleanup();
|
931
|
+
}
|
929
932
|
}
|
930
933
|
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token: i2.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
|
931
934
|
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\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\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$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: DocGenComponent, selector: "vl-flow-doc-gen" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
@@ -1055,8 +1058,7 @@ const keepFlowInitialized = (route) => {
|
|
1055
1058
|
if (!flowId) {
|
1056
1059
|
return true;
|
1057
1060
|
}
|
1058
|
-
|
1059
|
-
return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => {
|
1061
|
+
return flowInfoService.init$(flowId, route.queryParams).pipe(map(() => true), catchError(e => {
|
1060
1062
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1061
1063
|
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
1062
1064
|
return routerService.showErrorPage$(message, errorDetails);
|
@@ -1480,8 +1482,9 @@ class ProductComponent {
|
|
1480
1482
|
quoteDraft$ = of(undefined);
|
1481
1483
|
}
|
1482
1484
|
return quoteDraft$.pipe(first(), switchMap(quote => {
|
1485
|
+
var _a, _b;
|
1483
1486
|
const contextProperties = this.contextService.resolve().properties;
|
1484
|
-
const productId = contextProperties.productId;
|
1487
|
+
const productId = (_a = contextProperties.productId) !== null && _a !== void 0 ? _a : (_b = this.flowInfoService.flow) === null || _b === void 0 ? void 0 : _b.properties.queryParams['productId'];
|
1485
1488
|
if (!productId) {
|
1486
1489
|
throw new Error(`Unable to start configuration for 'productId == null'`);
|
1487
1490
|
}
|