@veloceapps/sdk 3.0.5 → 3.0.7
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/veloce-sdk-cms.umd.js +176 -38
- package/bundles/veloce-sdk-cms.umd.js.map +1 -1
- package/bundles/veloce-sdk-runtime.umd.js +11 -15
- package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
- package/bundles/veloce-sdk.umd.js +205 -123
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/cms/modules/configuration/types/configuration.types.d.ts +2 -3
- package/cms/modules/flow-configuration/index.d.ts +2 -0
- package/cms/modules/flow-configuration/services/flow-configuration.service.d.ts +10 -1
- package/cms/modules/flow-configuration/services/flow-update.service.d.ts +13 -0
- package/cms/modules/flow-configuration/types/update.types.d.ts +12 -0
- package/cms/utils/line-item.utils.d.ts +1 -0
- package/esm2015/cms/modules/configuration/services/configuration-runtime.service.js +10 -11
- package/esm2015/cms/modules/configuration/services/configuration.service.js +4 -3
- package/esm2015/cms/modules/configuration/services/runtime-context.service.js +4 -5
- package/esm2015/cms/modules/configuration/types/configuration.types.js +1 -1
- package/esm2015/cms/modules/flow-configuration/flow-configuration.module.js +4 -3
- package/esm2015/cms/modules/flow-configuration/index.js +3 -1
- package/esm2015/cms/modules/flow-configuration/services/flow-configuration.service.js +31 -12
- package/esm2015/cms/modules/flow-configuration/services/flow-update.service.js +97 -0
- package/esm2015/cms/modules/flow-configuration/types/update.types.js +2 -0
- package/esm2015/cms/utils/line-item.utils.js +14 -4
- package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +2 -10
- package/esm2015/runtime/execution/directives/vl-ramp.directive.js +1 -1
- package/esm2015/runtime/services/quote.service.js +10 -6
- package/esm2015/src/components/header/cart-overlay/cart-overlay.component.js +60 -0
- package/esm2015/src/components/header/cart-overlay/cart-overlay.module.js +21 -0
- package/esm2015/src/components/header/header.component.js +20 -11
- package/esm2015/src/components/header/header.module.js +6 -4
- package/esm2015/src/components/header/header.types.js +1 -1
- package/esm2015/src/flow.component.js +1 -1
- package/esm2015/src/pages/debug/debug.component.js +16 -11
- package/fesm2015/veloce-sdk-cms.js +157 -34
- package/fesm2015/veloce-sdk-cms.js.map +1 -1
- package/fesm2015/veloce-sdk-runtime.js +10 -14
- package/fesm2015/veloce-sdk-runtime.js.map +1 -1
- package/fesm2015/veloce-sdk.js +137 -63
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +1 -1
- package/runtime/execution/directives/vl-ramp.directive.d.ts +1 -1
- package/runtime/services/quote.service.d.ts +4 -3
- package/src/components/header/cart-overlay/cart-overlay.component.d.ts +21 -0
- package/src/components/header/cart-overlay/cart-overlay.module.d.ts +11 -0
- package/src/components/header/header.component.d.ts +9 -5
- package/src/components/header/header.module.d.ts +3 -1
- package/src/components/header/header.types.d.ts +1 -0
- package/src/pages/debug/debug.component.d.ts +5 -2
|
@@ -1373,20 +1373,24 @@
|
|
|
1373
1373
|
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: ContextService }, { type: i3__namespace$1.MessageService }]; } });
|
|
1374
1374
|
|
|
1375
1375
|
var QuoteService = /** @class */ (function () {
|
|
1376
|
-
function QuoteService(
|
|
1377
|
-
this.
|
|
1376
|
+
function QuoteService(context, quoteApiService, priceApiService) {
|
|
1377
|
+
this.context = context;
|
|
1378
1378
|
this.quoteApiService = quoteApiService;
|
|
1379
1379
|
this.priceApiService = priceApiService;
|
|
1380
1380
|
this.quote = new rxjs.BehaviorSubject(null);
|
|
1381
|
+
this.priceLists = [];
|
|
1381
1382
|
}
|
|
1383
|
+
QuoteService.prototype.reset = function () {
|
|
1384
|
+
this.quote.next(null);
|
|
1385
|
+
};
|
|
1382
1386
|
QuoteService.prototype.init = function (quoteId, params) {
|
|
1383
1387
|
var _this = this;
|
|
1384
|
-
return rxjs.zip(this.quoteApiService.getQuoteDraft(quoteId, params), this.priceApiService.getPriceLists(), this.
|
|
1385
|
-
var _b = __read(_a, 3), quote = _b[0], priceLists = _b[1],
|
|
1388
|
+
return rxjs.zip(this.quoteApiService.getQuoteDraft(quoteId, params), this.priceApiService.getPriceLists(), this.context.resolve$().pipe(rxjsOperators.filter(Boolean), rxjsOperators.map(function (context) { return context; }))).pipe(rxjsOperators.tap(function (_a) {
|
|
1389
|
+
var _b = __read(_a, 3), quote = _b[0], priceLists = _b[1], context = _b[2];
|
|
1386
1390
|
_this.quote.next(quote);
|
|
1387
1391
|
_this.priceLists = priceLists;
|
|
1388
|
-
_this.quotePriceList = priceLists.find(function (p) { return p.id ===
|
|
1389
|
-
_this.
|
|
1392
|
+
_this.quotePriceList = priceLists.find(function (p) { return p.id === context.properties.PriceListId; });
|
|
1393
|
+
_this.context.update(Object.assign(Object.assign(Object.assign({}, context), quote.context), { properties: Object.assign(Object.assign({}, context.properties), quote.context.properties) }));
|
|
1390
1394
|
}), rxjsOperators.map(function () { return undefined; }), rxjsOperators.take(1));
|
|
1391
1395
|
};
|
|
1392
1396
|
QuoteService.prototype.setCurrentLineItemState = function (lineItems) {
|
|
@@ -4319,16 +4323,8 @@
|
|
|
4319
4323
|
this.configurationApiService.getRuntimeDataByModelId(this.modelId),
|
|
4320
4324
|
this.contextService.create('TestId', i7.ConfigurationContextMode.TEST),
|
|
4321
4325
|
]).subscribe(function (_c) {
|
|
4322
|
-
var _d = __read(_c,
|
|
4326
|
+
var _d = __read(_c, 1), runtimeData = _d[0];
|
|
4323
4327
|
var _a;
|
|
4324
|
-
if (uiDefinition.pricingEnabled) {
|
|
4325
|
-
// TODO: uncomment when Shopping Cart is added
|
|
4326
|
-
// this.shoppingCartService.resetCart();
|
|
4327
|
-
if (uiDefinition.priceList) {
|
|
4328
|
-
ctx.priceListId = uiDefinition.priceList;
|
|
4329
|
-
}
|
|
4330
|
-
_this.contextService.update(ctx);
|
|
4331
|
-
}
|
|
4332
4328
|
var runtimeModel = i7.RuntimeModel.create(runtimeData.types, runtimeData.products);
|
|
4333
4329
|
var rootType = Array.from(runtimeModel.components.values()).find(function (c) { return uiDefinition.rootType &&
|
|
4334
4330
|
runtimeModel.isEquals(c.typeName, uiDefinition.rootType) &&
|