@veloceapps/sdk 2.0.3 → 2.0.4
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 +19 -4
- package/bundles/veloce-sdk-cms.umd.js.map +1 -1
- package/bundles/veloce-sdk-runtime.umd.js +0 -29
- package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
- package/cms/modules/configuration/services/configuration.service.d.ts +5 -1
- package/esm2015/cms/modules/configuration/services/configuration.service.js +12 -5
- package/esm2015/runtime/execution/runtime-execution.module.js +1 -4
- package/esm2015/runtime/runtime.module.js +1 -4
- package/esm2015/runtime/services/index.js +1 -2
- package/esm2015/runtime/types/index.js +1 -2
- package/fesm2015/veloce-sdk-cms.js +11 -4
- package/fesm2015/veloce-sdk-cms.js.map +1 -1
- package/fesm2015/veloce-sdk-runtime.js +1 -25
- package/fesm2015/veloce-sdk-runtime.js.map +1 -1
- package/package.json +1 -1
- package/runtime/services/index.d.ts +0 -1
- package/runtime/types/index.d.ts +0 -1
- package/esm2015/runtime/services/flow.service.js +0 -24
- package/esm2015/runtime/types/flow.types.js +0 -2
- package/runtime/services/flow.service.d.ts +0 -14
- package/runtime/types/flow.types.d.ts +0 -5
|
@@ -571,6 +571,7 @@
|
|
|
571
571
|
this.states = {};
|
|
572
572
|
this.uiDefinitionProperties = {};
|
|
573
573
|
this.lineItem = new rxjs.BehaviorSubject(undefined);
|
|
574
|
+
this.charges = new rxjs.BehaviorSubject({});
|
|
574
575
|
}
|
|
575
576
|
ConfigurationService.prototype.init = function (modelId, uiDefinitionProperties) {
|
|
576
577
|
var _this = this;
|
|
@@ -609,8 +610,7 @@
|
|
|
609
610
|
.subscribe();
|
|
610
611
|
};
|
|
611
612
|
ConfigurationService.prototype.get = function () {
|
|
612
|
-
|
|
613
|
-
return (_a = this.lineItem) === null || _a === void 0 ? void 0 : _a.asObservable().pipe(rxjs.shareReplay());
|
|
613
|
+
return this.lineItem.asObservable().pipe(rxjs.shareReplay());
|
|
614
614
|
};
|
|
615
615
|
ConfigurationService.prototype.getSnapshot = function () {
|
|
616
616
|
return this.lineItem.value ? Object.assign({}, this.lineItem.value) : undefined;
|
|
@@ -621,6 +621,20 @@
|
|
|
621
621
|
ConfigurationService.prototype.getRuntimeContext = function () {
|
|
622
622
|
return this.runtimeContext;
|
|
623
623
|
};
|
|
624
|
+
Object.defineProperty(ConfigurationService.prototype, "charges$", {
|
|
625
|
+
get: function () {
|
|
626
|
+
return this.charges.asObservable();
|
|
627
|
+
},
|
|
628
|
+
enumerable: false,
|
|
629
|
+
configurable: true
|
|
630
|
+
});
|
|
631
|
+
Object.defineProperty(ConfigurationService.prototype, "chargesSnapshot", {
|
|
632
|
+
get: function () {
|
|
633
|
+
return this.charges.value;
|
|
634
|
+
},
|
|
635
|
+
enumerable: false,
|
|
636
|
+
configurable: true
|
|
637
|
+
});
|
|
624
638
|
ConfigurationService.prototype.configure = function () {
|
|
625
639
|
var _this = this;
|
|
626
640
|
var _a, _b;
|
|
@@ -635,17 +649,18 @@
|
|
|
635
649
|
var request$;
|
|
636
650
|
if (this.uiDefinitionProperties.pricingEnabled) {
|
|
637
651
|
request$ = this.configurationApiService.configureAndPriceLineItem(configurationRequest, this.runtimeModel).pipe(rxjsOperators.map(function (_d) {
|
|
638
|
-
var lineItem = _d.lineItem, context = _d.context;
|
|
652
|
+
var lineItem = _d.lineItem, context = _d.context, charges = _d.charges;
|
|
639
653
|
if (context) {
|
|
640
654
|
_this.contextService.update({ properties: context.properties });
|
|
641
655
|
}
|
|
656
|
+
_this.charges.next(charges !== null && charges !== void 0 ? charges : {});
|
|
642
657
|
return lineItem;
|
|
643
658
|
}));
|
|
644
659
|
}
|
|
645
660
|
else {
|
|
646
661
|
request$ = this.configurationApiService.configureLineItem(configurationRequest, runtimeModel);
|
|
647
662
|
}
|
|
648
|
-
return request$.pipe(rxjsOperators.tap(function (lineItem) {
|
|
663
|
+
return request$.pipe(rxjsOperators.tap(function (lineItem) { return lineItem && _this.lineItem.next(lineItem); }), rxjsOperators.catchError(function (error) { return rxjs.throwError(function () { var _a; return new Error(((_a = error.error) === null || _a === void 0 ? void 0 : _a.message) || error.message || JSON.stringify(error)); }); }));
|
|
649
664
|
};
|
|
650
665
|
ConfigurationService.prototype.createRequest = function (lineItem) {
|
|
651
666
|
var _a, _b, _c;
|