@veloceapps/sdk 6.0.0-23 → 6.0.0-24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/veloceapps-sdk-core.umd.js +19 -22
- package/bundles/veloceapps-sdk-core.umd.js.map +1 -1
- package/bundles/veloceapps-sdk-runtime.umd.js.map +1 -1
- package/bundles/veloceapps-sdk.umd.js +6 -16
- package/bundles/veloceapps-sdk.umd.js.map +1 -1
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +1 -3
- package/core/modules/configuration/services/configuration.service.d.ts +4 -3
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +0 -2
- package/core/services/quote-draft.service.d.ts +2 -2
- package/core/types/index.d.ts +0 -1
- package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +1 -6
- package/esm2015/core/modules/configuration/services/configuration.service.js +17 -15
- package/esm2015/core/modules/configuration/types/configuration-runtime.types.js +1 -1
- package/esm2015/core/services/quote-draft.service.js +4 -4
- package/esm2015/core/types/index.js +1 -2
- package/esm2015/runtime/execution/directives/vl-quote.directive.js +1 -1
- package/esm2015/runtime/services/configuration.service.js +1 -1
- package/esm2015/runtime/services/runtime.service.js +1 -1
- package/esm2015/runtime/types/index.js +2 -1
- package/esm2015/runtime/types/quote-states.types.js +2 -0
- package/esm2015/src/components/header/header.component.js +3 -3
- package/esm2015/src/pages/legacy-product/legacy-product.component.js +1 -1
- package/esm2015/src/pages/product/product.component.js +2 -9
- package/esm2015/src/pages/remote/remote.component.js +2 -5
- package/esm2015/src/resolvers/quote.resolver.js +3 -3
- package/fesm2015/veloceapps-sdk-core.js +19 -22
- package/fesm2015/veloceapps-sdk-core.js.map +1 -1
- package/fesm2015/veloceapps-sdk-runtime.js.map +1 -1
- package/fesm2015/veloceapps-sdk.js +6 -16
- package/fesm2015/veloceapps-sdk.js.map +1 -1
- package/package.json +1 -1
- package/runtime/services/configuration.service.d.ts +2 -1
- package/runtime/services/runtime.service.d.ts +2 -1
- package/runtime/types/index.d.ts +1 -0
- package/{core → runtime}/types/quote-states.types.d.ts +0 -0
- package/src/pages/product/product.component.d.ts +0 -1
- package/esm2015/core/types/quote-states.types.js +0 -2
@@ -849,7 +849,7 @@ class FlowHeaderComponent {
|
|
849
849
|
this.contextProperties$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties));
|
850
850
|
this.objectName$ = this.mode$.pipe(map(mode => { var _a; return (_a = mode === null || mode === void 0 ? void 0 : mode.toLocaleLowerCase()) !== null && _a !== void 0 ? _a : ''; }));
|
851
851
|
this.activePriceList$ = this.quoteDraftService.activePriceList$;
|
852
|
-
this.isReadonlyMode$ = this.quoteDraftService.
|
852
|
+
this.isReadonlyMode$ = this.quoteDraftService.hasProducts$.pipe(map(() => this.isReadonlyMode()));
|
853
853
|
this.status$ = this.contextService.resolve$().pipe(map(context => { var _a; return (_a = context.properties.Status) !== null && _a !== void 0 ? _a : ''; }));
|
854
854
|
this.isEditMode$ = this.quoteDraftService.isEditMode$();
|
855
855
|
this.products$ = this.flowConfiguration.get().pipe(map(lineItems => this.generateProducts(lineItems)));
|
@@ -1102,7 +1102,7 @@ class FlowHeaderComponent {
|
|
1102
1102
|
isReadonlyMode() {
|
1103
1103
|
var _a;
|
1104
1104
|
return (((_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.context.properties.mode) === ConfigurationContextMode.ACCOUNT &&
|
1105
|
-
!this.quoteDraftService.
|
1105
|
+
!this.quoteDraftService.hasProducts);
|
1106
1106
|
}
|
1107
1107
|
isUpsellQuoteWithoutChanges() {
|
1108
1108
|
const noUpdates = this.quoteDraftService.activeCurrentState.every(lineItem => lineItem.actionCode === 'EXIST');
|
@@ -1897,11 +1897,7 @@ class ProductComponent {
|
|
1897
1897
|
const lineItemId = this.getLineItemId(quote, productId, contextProperties.lineItemId);
|
1898
1898
|
const currentStateItem = quote.currentState.find(({ id }) => id === lineItemId);
|
1899
1899
|
if (currentStateItem) {
|
1900
|
-
this.configurationService.
|
1901
|
-
configurableRamp: currentStateItem,
|
1902
|
-
currentState: quote.currentState,
|
1903
|
-
asset: this.getAsset(quote, currentStateItem),
|
1904
|
-
});
|
1900
|
+
this.configurationService.setConfigurableRamp(currentStateItem);
|
1905
1901
|
}
|
1906
1902
|
const { offeringId } = currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {};
|
1907
1903
|
this.runtimeService
|
@@ -1935,9 +1931,6 @@ class ProductComponent {
|
|
1935
1931
|
}
|
1936
1932
|
return id;
|
1937
1933
|
}
|
1938
|
-
getAsset(quote, lineItem) {
|
1939
|
-
return quote.initialState.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
|
1940
|
-
}
|
1941
1934
|
}
|
1942
1935
|
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ProductComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.ConfigurationRuntimeService }, { token: i1$1.ConfigurationService }, { token: i1$1.QuoteDraftService }, { token: i2$1.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1943
1936
|
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
@@ -2071,10 +2064,7 @@ class RemoteComponent {
|
|
2071
2064
|
},
|
2072
2065
|
});
|
2073
2066
|
this.uiDefinition = context === null || context === void 0 ? void 0 : context.uiDefinition;
|
2074
|
-
this.configurationService.
|
2075
|
-
configurableRamp: this.createLineItem(),
|
2076
|
-
currentState: quote.currentState,
|
2077
|
-
});
|
2067
|
+
this.configurationService.setConfigurableRamp(this.createLineItem());
|
2078
2068
|
}), this.throwIfNoUIDefinition(), switchMap(() => this.configurationService.configure()), tap(() => this.state$.next({ loading: false, failure: false })), catchError(error => {
|
2079
2069
|
var _a, _b;
|
2080
2070
|
if (!((_b = (_a = this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
|
@@ -2569,7 +2559,7 @@ class QuoteResolver {
|
|
2569
2559
|
if (this.accountHasNotAssets()) {
|
2570
2560
|
this.changeNavigation('/empty', route);
|
2571
2561
|
}
|
2572
|
-
else if (!this.quoteDraftService.isInitialized && this.quoteDraftService.
|
2562
|
+
else if (!this.quoteDraftService.isInitialized && this.quoteDraftService.hasProducts) {
|
2573
2563
|
this.changeNavigation('/cart', route);
|
2574
2564
|
}
|
2575
2565
|
}
|
@@ -2595,7 +2585,7 @@ class QuoteResolver {
|
|
2595
2585
|
accountHasNotAssets() {
|
2596
2586
|
var _a;
|
2597
2587
|
return (((_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.context.properties.mode) === ConfigurationContextMode.ACCOUNT &&
|
2598
|
-
!this.quoteDraftService.
|
2588
|
+
!this.quoteDraftService.hasProducts);
|
2599
2589
|
}
|
2600
2590
|
}
|
2601
2591
|
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i1$1.QuoteDraftService }, { token: FlowRouterService }, { token: i1$1.ContextService }, { token: i1$1.FlowConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
|