@veloceapps/sdk 4.0.7 → 4.0.8

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.
Files changed (27) hide show
  1. package/bundles/veloce-sdk-core.umd.js +34 -4
  2. package/bundles/veloce-sdk-core.umd.js.map +1 -1
  3. package/bundles/veloce-sdk.umd.js +118 -32
  4. package/bundles/veloce-sdk.umd.js.map +1 -1
  5. package/cms/vendor-map.d.ts +116 -124
  6. package/core/modules/flow-configuration/types/update.types.d.ts +1 -1
  7. package/core/services/quote-draft.service.d.ts +3 -1
  8. package/esm2015/core/modules/flow-configuration/services/flow-update.service.js +15 -1
  9. package/esm2015/core/modules/flow-configuration/types/update.types.js +1 -1
  10. package/esm2015/core/services/quote-draft.service.js +12 -5
  11. package/esm2015/src/components/doc-gen/doc-gen.component.js +2 -2
  12. package/esm2015/src/components/header/cart-overlay/cart-preview.component.js +2 -2
  13. package/esm2015/src/components/header/header.component.js +28 -8
  14. package/esm2015/src/flow-routing.module.js +32 -4
  15. package/esm2015/src/pages/empty-account/empty-account.component.js +17 -0
  16. package/esm2015/src/pages/empty-account/empty-account.module.js +20 -0
  17. package/esm2015/src/resolvers/quote.resolver.js +28 -21
  18. package/fesm2015/veloce-sdk-core.js +25 -4
  19. package/fesm2015/veloce-sdk-core.js.map +1 -1
  20. package/fesm2015/veloce-sdk.js +113 -33
  21. package/fesm2015/veloce-sdk.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/components/header/header.component.d.ts +4 -0
  24. package/src/flow-routing.module.d.ts +2 -1
  25. package/src/pages/empty-account/empty-account.component.d.ts +5 -0
  26. package/src/pages/empty-account/empty-account.module.d.ts +10 -0
  27. package/src/resolvers/quote.resolver.d.ts +2 -1
@@ -457,28 +457,44 @@
457
457
  this.priceApiService = priceApiService;
458
458
  this.quoteSubj$ = new rxjs.BehaviorSubject(null);
459
459
  this.resetSubj$ = new rxjs.BehaviorSubject(true);
460
- this.isInitialized$ = new rxjs.BehaviorSubject(false);
460
+ this.isInitializedSubj$ = new rxjs.BehaviorSubject(false);
461
461
  this.allPriceLists = [];
462
462
  this.assetPriceLists = [];
463
463
  this.hasUnsavedChanges = false;
464
464
  this.reset$ = this.resetSubj$.asObservable();
465
465
  this.activePriceList$ = this.context.resolve$().pipe(operators.map(function (ctx) { return _this.allPriceLists.find(function (priceList) { return priceList.id === ctx.properties.PriceListId; }); }), operators.map(function (priceList) { return priceList !== null && priceList !== void 0 ? priceList : null; }));
466
- this.isInitialized$
466
+ this.isInitializedSubj$
467
467
  .pipe(operators.filter(function (isInitialized) { return isInitialized; }), operators.switchMap(function () { return _this.quoteSubj$.asObservable(); }), operators.skip(1), operators.tap(function (quote) { return _this.markAsUpdated(quote); }))
468
468
  .subscribe();
469
469
  }
470
470
  Object.defineProperty(QuoteDraftService.prototype, "isInitialized", {
471
471
  get: function () {
472
- return this.isInitialized$.getValue();
472
+ return this.isInitializedSubj$.getValue();
473
473
  },
474
474
  set: function (value) {
475
475
  if (this.isInitialized !== value) {
476
- this.isInitialized$.next(value);
476
+ this.isInitializedSubj$.next(value);
477
477
  }
478
478
  },
479
479
  enumerable: false,
480
480
  configurable: true
481
481
  });
482
+ Object.defineProperty(QuoteDraftService.prototype, "hasAssets$", {
483
+ get: function () {
484
+ var _this = this;
485
+ return this.quoteSubj$.pipe(operators.map(function () { return _this.hasAssets; }));
486
+ },
487
+ enumerable: false,
488
+ configurable: true
489
+ });
490
+ Object.defineProperty(QuoteDraftService.prototype, "hasAssets", {
491
+ get: function () {
492
+ var quoteDraft = this.quoteSubj$.value;
493
+ return Boolean(quoteDraft && quoteDraft.currentState.length > 0);
494
+ },
495
+ enumerable: false,
496
+ configurable: true
497
+ });
482
498
  QuoteDraftService.prototype.reset = function () {
483
499
  this.resetSubj$.next(true);
484
500
  this.quoteSubj$.next(null);
@@ -1248,6 +1264,14 @@
1248
1264
  }
1249
1265
  }
1250
1266
  break;
1267
+ case 'LIST_PRICE_ADJUSTMENT':
1268
+ {
1269
+ var _b = __read(lineItem.chargeItems, 1), charge = _b[0];
1270
+ if (charge) {
1271
+ charge.listPriceAdjustment = update.newValue;
1272
+ }
1273
+ }
1274
+ break;
1251
1275
  default:
1252
1276
  throw new Error("Not suppored AttributeType for LineItem update: " + update.attributeType);
1253
1277
  }
@@ -1264,6 +1288,9 @@
1264
1288
  if (update.attributeType === 'PRICE_ADJUSTMENT') {
1265
1289
  foundCharge.priceAdjustment = update.newValue;
1266
1290
  }
1291
+ else if (update.attributeType === 'LIST_PRICE_ADJUSTMENT') {
1292
+ foundCharge.listPriceAdjustment = update.newValue;
1293
+ }
1267
1294
  else {
1268
1295
  throw new Error("Not suppored AttributeType for Charge Item update: " + update.attributeType);
1269
1296
  }
@@ -1280,6 +1307,9 @@
1280
1307
  if (update.attributeType === 'PRICE_ADJUSTMENT') {
1281
1308
  foundChargeGroup.priceAdjustment = update.newValue;
1282
1309
  }
1310
+ else if (update.attributeType === 'LIST_PRICE_ADJUSTMENT') {
1311
+ foundChargeGroup.listPriceAdjustment = update.newValue;
1312
+ }
1283
1313
  else {
1284
1314
  throw new Error("Not suppored AttributeType for Charge Group Item update: " + update.attributeType);
1285
1315
  }