@veloceapps/sdk 4.0.10 → 4.0.12
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.umd.js +1 -1
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/cms/services/templates.service.d.ts +6 -1
- package/cms/types/configuration.types.d.ts +3 -0
- package/esm2015/cms/plugins/configuration.plugin.js +7 -3
- package/esm2015/cms/services/templates.service.js +15 -3
- package/esm2015/cms/types/configuration.types.js +1 -1
- package/esm2015/src/components/header/cart-overlay/cart-preview.component.js +2 -2
- package/fesm2015/veloce-sdk-cms.js +19 -4
- package/fesm2015/veloce-sdk-cms.js.map +1 -1
- package/fesm2015/veloce-sdk.js +1 -1
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +1 -1
@@ -628,10 +628,21 @@
|
|
628
628
|
this.templates = {};
|
629
629
|
}
|
630
630
|
TemplatesService.prototype.register = function (name, templateRef) {
|
631
|
-
this.
|
631
|
+
this.ensureStorage(name);
|
632
|
+
this.templates[name].next(templateRef);
|
632
633
|
};
|
633
634
|
TemplatesService.prototype.get = function (name) {
|
634
|
-
|
635
|
+
this.ensureStorage(name);
|
636
|
+
return this.templates[name].value;
|
637
|
+
};
|
638
|
+
TemplatesService.prototype.get$ = function (name) {
|
639
|
+
this.ensureStorage(name);
|
640
|
+
return this.templates[name].asObservable();
|
641
|
+
};
|
642
|
+
TemplatesService.prototype.ensureStorage = function (name) {
|
643
|
+
if (!this.templates[name]) {
|
644
|
+
this.templates[name] = new rxjs.BehaviorSubject(undefined);
|
645
|
+
}
|
635
646
|
};
|
636
647
|
return TemplatesService;
|
637
648
|
}());
|
@@ -1321,6 +1332,9 @@
|
|
1321
1332
|
};
|
1322
1333
|
ConfigurationPlugin.prototype.registerPort = function (name) {
|
1323
1334
|
var _this = this;
|
1335
|
+
var model$ = this.host.model$;
|
1336
|
+
var portItems$ = model$.pipe(rxjs.map(function (model) { return model.lineItems.filter(function (li) { return li.port === _this.host.boundName; }); }));
|
1337
|
+
var portDomain$ = model$.pipe(rxjs.map(function (model) { return model.portDomains[_this.host.boundName]; }));
|
1324
1338
|
var add = function (type, attributes) {
|
1325
1339
|
if (attributes === void 0) { attributes = []; }
|
1326
1340
|
if (!_this.modelSnapshot) {
|
@@ -1333,15 +1347,16 @@
|
|
1333
1347
|
var generated = i2.generateLineItem(portDomain.name, type, _this.modelSnapshot.id, attributes);
|
1334
1348
|
_this.configurationService.patch(new i2.LineItemWorker(_this.modelSnapshot).insert(_this.modelSnapshot.id, generated).li);
|
1335
1349
|
};
|
1350
|
+
this.portHost.portItems$ = portItems$;
|
1351
|
+
this.portHost.portDomain$ = portDomain$;
|
1336
1352
|
this.portHost.addPortItem = add;
|
1337
1353
|
};
|
1338
1354
|
ConfigurationPlugin.prototype.registerAttribute = function (name) {
|
1339
1355
|
var _this = this;
|
1340
|
-
var _a;
|
1341
1356
|
if (!this.host.model$) {
|
1342
1357
|
return;
|
1343
1358
|
}
|
1344
|
-
var value$ =
|
1359
|
+
var value$ = this.host.model$.pipe(rxjs.map(function (model) { var _a; return i2.getAttributeValue((_a = model === null || model === void 0 ? void 0 : model.attributes) !== null && _a !== void 0 ? _a : [], name); }));
|
1345
1360
|
var patch = function (value) {
|
1346
1361
|
if (!_this.modelSnapshot) {
|
1347
1362
|
return;
|