ng-easycommerce 0.0.524 → 0.0.526
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/README.md +5 -0
- package/bundles/ng-easycommerce.umd.js +31 -3
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +19 -3
- package/esm2015/lib/services/blocks/blocks-repository.service.js +15 -2
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +19 -3
- package/esm5/lib/services/blocks/blocks-repository.service.js +15 -2
- package/fesm2015/ng-easycommerce.js +31 -3
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +31 -3
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +3 -1
- package/lib/services/blocks/blocks-repository.service.d.ts +1 -0
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# version 0.0.526
|
|
2
|
+
- se añaden etiquetas meta en product-details para probar utm
|
|
3
|
+
|
|
4
|
+
# version 0.0.525
|
|
5
|
+
- se hace un cambio para obtener el section de forma correcta cuando en la url se usa utm en los bloques
|
|
1
6
|
# version 0.0.524
|
|
2
7
|
- se corrige hardcodeo erróneo en account-ec.component.html
|
|
3
8
|
# version 0.0.523
|
|
@@ -5520,7 +5520,7 @@
|
|
|
5520
5520
|
var _this = this;
|
|
5521
5521
|
var _a;
|
|
5522
5522
|
return __generator$7(this, function (_b) {
|
|
5523
|
-
return [2 /*return*/, ((_a = this.hasSectionBlocks(section)) === null || _a === void 0 ? void 0 : _a.blocks) || this.connection.get(this.blocksAPI(section))
|
|
5523
|
+
return [2 /*return*/, ((_a = this.hasSectionBlocks(section)) === null || _a === void 0 ? void 0 : _a.blocks) || this.connection.get(this.blocksAPI(this.getSection(section)))
|
|
5524
5524
|
.toPromise().then(function (res) { return _this.appendBlock(res.items, section) && res.items; }, function (err) { return new Promise(function (resolve, reject) { return reject(); }); } // Va por callback error, el servicio define el valor a setear
|
|
5525
5525
|
).catch(function (err) { return new Promise(function (resolve, reject) { return reject(new Error(null)); }); })];
|
|
5526
5526
|
});
|
|
@@ -5534,6 +5534,19 @@
|
|
|
5534
5534
|
this.restartBlocks = function () { return _this.data = []; };
|
|
5535
5535
|
this.consts.getBlocksCacheTime() && setInterval(this.restartBlocks, this.consts.getBlocksCacheTime());
|
|
5536
5536
|
}
|
|
5537
|
+
BlocksRepositoryService.prototype.getSection = function (section) {
|
|
5538
|
+
// Definir la expresión regular para obtener la palabra antes del primer "?"
|
|
5539
|
+
var patron = /([^?]+)\?/;
|
|
5540
|
+
// Realizar la búsqueda del patrón en la cadena
|
|
5541
|
+
var resultado = section.match(patron);
|
|
5542
|
+
// Devolver la palabra antes del primer "?"
|
|
5543
|
+
if (resultado) {
|
|
5544
|
+
return resultado[1];
|
|
5545
|
+
}
|
|
5546
|
+
else {
|
|
5547
|
+
return section;
|
|
5548
|
+
}
|
|
5549
|
+
};
|
|
5537
5550
|
BlocksRepositoryService.ctorParameters = function () { return [
|
|
5538
5551
|
{ type: Constants },
|
|
5539
5552
|
{ type: ConnectionService }
|
|
@@ -10045,7 +10058,7 @@
|
|
|
10045
10058
|
};
|
|
10046
10059
|
var ProductDetailEcComponent = /** @class */ (function (_super) {
|
|
10047
10060
|
__extends$v(ProductDetailEcComponent, _super);
|
|
10048
|
-
function ProductDetailEcComponent(productService, consts, activedRoute, cartService, optionsService, productsService, analyticsService, router, toastrService) {
|
|
10061
|
+
function ProductDetailEcComponent(productService, consts, activedRoute, cartService, optionsService, productsService, analyticsService, router, toastrService, meta) {
|
|
10049
10062
|
var _this = _super.call(this) || this;
|
|
10050
10063
|
_this.productService = productService;
|
|
10051
10064
|
_this.consts = consts;
|
|
@@ -10056,6 +10069,7 @@
|
|
|
10056
10069
|
_this.analyticsService = analyticsService;
|
|
10057
10070
|
_this.router = router;
|
|
10058
10071
|
_this.toastrService = toastrService;
|
|
10072
|
+
_this.meta = meta;
|
|
10059
10073
|
_this.show = false;
|
|
10060
10074
|
_this.quantity = 1;
|
|
10061
10075
|
_this.breadcrumb = [];
|
|
@@ -10124,6 +10138,19 @@
|
|
|
10124
10138
|
_this.product = res;
|
|
10125
10139
|
window.scroll(0, 0);
|
|
10126
10140
|
_this.breadcrumb = _this.optionsService.getBreadcrumb(_this.product.category);
|
|
10141
|
+
if (_this.product.name) {
|
|
10142
|
+
_this.meta.removeTag('name="og:title"');
|
|
10143
|
+
_this.meta.removeTag('name="og:description"');
|
|
10144
|
+
_this.meta.removeTag('name="og:image"');
|
|
10145
|
+
_this.meta.removeTag('name="og:type"');
|
|
10146
|
+
_this.meta.removeTag('name="og:url"');
|
|
10147
|
+
// console.log(this.product);
|
|
10148
|
+
_this.meta.addTag({ name: 'og:title', content: _this.product.name });
|
|
10149
|
+
_this.meta.addTag({ name: 'og:description', content: _this.product.description });
|
|
10150
|
+
_this.meta.addTag({ name: 'og:image', content: _this.consts.mediaUrl() + _this.product.picturesdefault[0] });
|
|
10151
|
+
_this.meta.addTag({ name: 'og:type', content: 'product' });
|
|
10152
|
+
_this.meta.addTag({ name: 'og:url', content: window.location.href });
|
|
10153
|
+
}
|
|
10127
10154
|
});
|
|
10128
10155
|
_this.productService.product$.pipe(operators.filter(function (data) { return data && data.id && data.id != 0; })).subscribe(function (productParam) {
|
|
10129
10156
|
_this.analyticsService.callEvent('view_item', __assign$o(__assign$o({}, productParam), { currency: _this.consts.currency.code }));
|
|
@@ -10148,7 +10175,8 @@
|
|
|
10148
10175
|
{ type: ProductsService },
|
|
10149
10176
|
{ type: AnalyticsService },
|
|
10150
10177
|
{ type: router.Router },
|
|
10151
|
-
{ type: ToastService }
|
|
10178
|
+
{ type: ToastService },
|
|
10179
|
+
{ type: platformBrowser.Meta }
|
|
10152
10180
|
]; };
|
|
10153
10181
|
__decorate$13([
|
|
10154
10182
|
core.ViewChild('contact')
|