ng-easycommerce 0.0.414 → 0.0.415

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 CHANGED
@@ -1,3 +1,8 @@
1
+ # version: 0.0.415
2
+ - Actualización de share-block-ec. Se usa el servicio de parametros para poder elegir que elementos mostrar.
3
+ --El parametro debe ser cargado con la palabra "share" y tambien la red por la que se lo quiere compartir.
4
+ --Ejemplo: "share_whatsapp" o "facebook_share" ...
5
+
1
6
  # version: 0.0.414
2
7
  - Actualización de la interfaz de Seller Dashboard
3
8
 
@@ -11261,15 +11261,17 @@
11261
11261
  };
11262
11262
  var ShareBlockEcComponent = /** @class */ (function (_super) {
11263
11263
  __extends$T(ShareBlockEcComponent, _super);
11264
- function ShareBlockEcComponent(consts, renderer, meta, title) {
11264
+ function ShareBlockEcComponent(consts, paramsService, renderer, meta, title) {
11265
11265
  var _this = _super.call(this) || this;
11266
11266
  _this.consts = consts;
11267
+ _this.paramsService = paramsService;
11267
11268
  _this.renderer = renderer;
11268
11269
  _this.meta = meta;
11269
11270
  _this.title = title;
11270
11271
  _this.url = '';
11271
11272
  _this.mediaimg = '';
11272
11273
  _this.description = '';
11274
+ _this.params = {};
11273
11275
  _this.toShareFacebook = function () {
11274
11276
  //return `https://www.facebook.com/share.php?u=${encodeURIComponent(this.url)}`
11275
11277
  return "https://www.facebook.com/share.php?u=" + _this.url;
@@ -11282,6 +11284,12 @@
11282
11284
  //return `https://pinterest.com/pin/create/button/?url=${encodeURIComponent(this.url)}&media=${encodeURIComponent(this.mediaimg)}&description=${encodeURIComponent(this.description)}`
11283
11285
  return "https://pinterest.com/pin/create/button/?url=" + _this.url + "&media=" + (_this.consts.mediaUrl() + _this.mediaimg) + "&description=" + _this.description;
11284
11286
  };
11287
+ _this.toShareWhatsapp = function (wsp) {
11288
+ return "https://wa.me/" + wsp.value + "?text=Me%20interesa%20este%20producto.%20" + _this.url;
11289
+ };
11290
+ _this.toShareEmail = function (mail) {
11291
+ return "mailto:" + mail.value + "?subject=Consulta%20sobre%20el%20producto:%20" + _this.description + "&body=Art\u00EDculo:%20" + _this.url;
11292
+ };
11285
11293
  _this.createMetadata = function () {
11286
11294
  // <meta name="description" content="Cojín JOY, en algodón rústico súper soft, tonos frescos y naturales, y con detalles de borlas para darle un toque divertido.">
11287
11295
  // <meta property="og:site_name" content="MYC HOME LINENS">
@@ -11306,6 +11314,7 @@
11306
11314
  return _this;
11307
11315
  }
11308
11316
  ShareBlockEcComponent.prototype.ngOnInit = function () {
11317
+ var _this = this;
11309
11318
  this.url = window.location.href;
11310
11319
  this.mediaimg = this.product.picturesdefault && this.product.picturesdefault[0];
11311
11320
  this.description = this.product.name;
@@ -11365,10 +11374,15 @@
11365
11374
  }
11366
11375
  ], true);
11367
11376
  }
11377
+ this.paramsService.parameters.subscribe(function (res) {
11378
+ var _a;
11379
+ _this.params = res != null ? (_a = res) === null || _a === void 0 ? void 0 : _a.filter(function (elem) { return elem.code.includes('share'); }) : [];
11380
+ });
11368
11381
  this.ecOnInit();
11369
11382
  };
11370
11383
  ShareBlockEcComponent.ctorParameters = function () { return [
11371
11384
  { type: Constants },
11385
+ { type: ParametersService },
11372
11386
  { type: core.Renderer2 },
11373
11387
  { type: platformBrowser.Meta },
11374
11388
  { type: platformBrowser.Title }
@@ -11379,7 +11393,7 @@
11379
11393
  ShareBlockEcComponent = __decorate$1p([
11380
11394
  core.Component({
11381
11395
  selector: 'app-share-block-ec',
11382
- template: "<div class=\"w-100 d-flex justify-content-around\">\n <a target=\"_blank\" [href]=\"toShareFacebook()\"\n class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a target=\"_blank\"\n [href]=\"toShareTwitter()\"\n class=\"social-sharing__link\" title=\"Tuitear en Twitter\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-twitter\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M31.281 6.733q-1.304 1.924-3.13 3.26 0 .13.033.408t.033.408q0 2.543-.75 5.086t-2.282 4.858-3.635 4.108-5.053 2.869-6.341 1.076q-5.282 0-9.65-2.836.913.065 1.5.065 4.401 0 7.857-2.673-2.054-.033-3.668-1.255t-2.266-3.146q.554.13 1.206.13.88 0 1.663-.261-2.184-.456-3.619-2.184t-1.435-3.977v-.065q1.239.652 2.836.717-1.271-.848-2.021-2.233t-.75-2.983q0-1.63.815-3.195 2.38 2.967 5.754 4.678t7.319 1.907q-.228-.815-.228-1.434 0-2.608 1.858-4.45t4.532-1.842q1.304 0 2.51.522t2.054 1.467q2.152-.424 4.01-1.532-.685 2.217-2.771 3.488 1.989-.261 3.619-.978z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Tuitear</span>\n </a>\n <a target=\"_blank\"\n [href]=\"toSharePinterest()\"\n class=\"social-sharing__link\" title=\"Pinear en Pinterest\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-pinterest\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M27.52 9.6c-.64-5.76-6.4-8.32-12.8-7.68-4.48.64-9.6 4.48-9.6 10.24 0 3.2.64 5.76 3.84 6.4 1.28-2.56-.64-3.2-.64-4.48-1.28-7.04 8.32-12.16 13.44-7.04 3.2 3.84 1.28 14.08-4.48 13.44-5.12-1.28 2.56-9.6-1.92-11.52-3.2-1.28-5.12 4.48-3.84 7.04-1.28 4.48-3.2 8.96-1.92 15.36 2.56-1.92 3.84-5.76 4.48-9.6 1.28.64 1.92 1.92 3.84 1.92 6.4-.64 10.24-7.68 9.6-14.08z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Hacer pin</span>\n </a>\n</div>",
11396
+ template: "<div class=\"w-100 d-flex justify-content-around\">\n <ng-container *ngIf=\"params && params.length > 0; else default\">\n <a *ngIf=\"hasParams(params, 'facebook')\" target=\"_blank\" [href]=\"toShareFacebook()\"\n class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a *ngIf=\"hasParams(params, 'twitter')\" target=\"_blank\" \n [href]=\"toShareTwitter()\"\n class=\"social-sharing__link\" title=\"Tuitear en Twitter\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-twitter\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M31.281 6.733q-1.304 1.924-3.13 3.26 0 .13.033.408t.033.408q0 2.543-.75 5.086t-2.282 4.858-3.635 4.108-5.053 2.869-6.341 1.076q-5.282 0-9.65-2.836.913.065 1.5.065 4.401 0 7.857-2.673-2.054-.033-3.668-1.255t-2.266-3.146q.554.13 1.206.13.88 0 1.663-.261-2.184-.456-3.619-2.184t-1.435-3.977v-.065q1.239.652 2.836.717-1.271-.848-2.021-2.233t-.75-2.983q0-1.63.815-3.195 2.38 2.967 5.754 4.678t7.319 1.907q-.228-.815-.228-1.434 0-2.608 1.858-4.45t4.532-1.842q1.304 0 2.51.522t2.054 1.467q2.152-.424 4.01-1.532-.685 2.217-2.771 3.488 1.989-.261 3.619-.978z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Tuitear</span>\n </a>\n <a *ngIf=\"hasParams(params, 'pinterest')\" target=\"_blank\"\n [href]=\"toSharePinterest()\"\n class=\"social-sharing__link\" title=\"Pinear en Pinterest\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-pinterest\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M27.52 9.6c-.64-5.76-6.4-8.32-12.8-7.68-4.48.64-9.6 4.48-9.6 10.24 0 3.2.64 5.76 3.84 6.4 1.28-2.56-.64-3.2-.64-4.48-1.28-7.04 8.32-12.16 13.44-7.04 3.2 3.84 1.28 14.08-4.48 13.44-5.12-1.28 2.56-9.6-1.92-11.52-3.2-1.28-5.12 4.48-3.84 7.04-1.28 4.48-3.2 8.96-1.92 15.36 2.56-1.92 3.84-5.76 4.48-9.6 1.28.64 1.92 1.92 3.84 1.92 6.4-.64 10.24-7.68 9.6-14.08z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Hacer pin</span>\n </a>\n <a *ngIf=\"hasParams(params, 'whatsapp') as wsp\" target=\"_blank\" [href]=\"toShareWhatsapp(wsp)\" class=\"social-sharing__link\" title=\"Whatsapp\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" fill=\"currentColor\" class=\"bi bi-whatsapp\"\n viewBox=\"0 0 16 16\">\n <path\n d=\"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z\" />\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Whatsapp</span>\n </a>\n <a *ngIf=\"hasParams(params, 'email') as email\" target=\"_blank\" [href]=\"toShareEmail(email)\" class=\"social-sharing__link\"\n title=\"Email\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" fill=\"currentColor\" class=\"bi bi-envelope-fill\"\n viewBox=\"0 0 16 16\">\n <path\n d=\"M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z\" />\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Email</span>\n </a>\n </ng-container>\n</div>\n\n<!-- VISTA DEFAULT CON LINKS QUE NO REQUIEREN PARAMETROS-->\n<ng-template #default>\n <a target=\"_blank\" [href]=\"toShareFacebook()\" class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a target=\"_blank\" [href]=\"toShareTwitter()\" class=\"social-sharing__link\" title=\"Tuitear en Twitter\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-twitter\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M31.281 6.733q-1.304 1.924-3.13 3.26 0 .13.033.408t.033.408q0 2.543-.75 5.086t-2.282 4.858-3.635 4.108-5.053 2.869-6.341 1.076q-5.282 0-9.65-2.836.913.065 1.5.065 4.401 0 7.857-2.673-2.054-.033-3.668-1.255t-2.266-3.146q.554.13 1.206.13.88 0 1.663-.261-2.184-.456-3.619-2.184t-1.435-3.977v-.065q1.239.652 2.836.717-1.271-.848-2.021-2.233t-.75-2.983q0-1.63.815-3.195 2.38 2.967 5.754 4.678t7.319 1.907q-.228-.815-.228-1.434 0-2.608 1.858-4.45t4.532-1.842q1.304 0 2.51.522t2.054 1.467q2.152-.424 4.01-1.532-.685 2.217-2.771 3.488 1.989-.261 3.619-.978z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Tuitear</span>\n </a>\n <a target=\"_blank\" [href]=\"toSharePinterest()\" class=\"social-sharing__link\" title=\"Pinear en Pinterest\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-pinterest\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M27.52 9.6c-.64-5.76-6.4-8.32-12.8-7.68-4.48.64-9.6 4.48-9.6 10.24 0 3.2.64 5.76 3.84 6.4 1.28-2.56-.64-3.2-.64-4.48-1.28-7.04 8.32-12.16 13.44-7.04 3.2 3.84 1.28 14.08-4.48 13.44-5.12-1.28 2.56-9.6-1.92-11.52-3.2-1.28-5.12 4.48-3.84 7.04-1.28 4.48-3.2 8.96-1.92 15.36 2.56-1.92 3.84-5.76 4.48-9.6 1.28.64 1.92 1.92 3.84 1.92 6.4-.64 10.24-7.68 9.6-14.08z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Hacer pin</span>\n </a>\n</ng-template>\n<!-- FIN -->",
11383
11397
  styles: ["a{color:#000}"]
11384
11398
  })
11385
11399
  ], ShareBlockEcComponent);