ctt-puro 0.46.4 → 0.46.6

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.
@@ -4669,11 +4669,25 @@ class MapperService {
4669
4669
  }));
4670
4670
  }
4671
4671
  else if (posts) {
4672
- items = posts?.map((item) => ({
4673
- description: item?.translations?.[1].title,
4674
- img: this.getImageResponsive(item?.multimedia?.[0]),
4675
- link: Utils.mapButtons(this.siteId(), item?.buttons || [])[0],
4676
- }));
4672
+ items = posts?.map((item) => {
4673
+ const identifier = item?.blogs?.[0]?.nameIdentifier?.toLowerCase() || '';
4674
+ let prefix = '';
4675
+ if (identifier.includes('puro beach')) {
4676
+ prefix = '/purobeach';
4677
+ }
4678
+ else if (identifier.includes('puro hotel')) {
4679
+ prefix = '/purohotels';
4680
+ }
4681
+ const button = Utils.mapButtons(this.siteId(), item?.buttons || [])?.[0];
4682
+ if (button?.url) {
4683
+ button.url = prefix + button.url;
4684
+ }
4685
+ return {
4686
+ description: item?.texts?.title,
4687
+ img: this.getImageResponsive(item?.multimedia?.[0]),
4688
+ link: button,
4689
+ };
4690
+ });
4677
4691
  }
4678
4692
  return {
4679
4693
  title: texts?.title,
@@ -5229,7 +5243,10 @@ class MapperService {
5229
5243
  description: props?.texts?.description,
5230
5244
  moreinfo: props?.texts?.additional1,
5231
5245
  images: this.getArrayImageResponsive(props?.multimedia?.imagenes || []),
5232
- buttons: Utils.mapButtons(this.siteId(), props?.buttons.reverse()),
5246
+ // buttons: Utils.mapButtons(this.siteId(), props?.buttons.reverse()),
5247
+ buttons: Utils.mapButtons(this.siteId(), props?.buttons
5248
+ ?.filter((btn) => btn?.linkType !== 'self_link')
5249
+ .reverse()),
5233
5250
  advantages: props?.equipment?.map((item) => ({
5234
5251
  title: item?.name,
5235
5252
  icon: 'icon-' + item?.class,
@@ -8286,7 +8303,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
8286
8303
 
8287
8304
  class PuroSlider3colRoundComponent {
8288
8305
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PuroSlider3colRoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8289
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: PuroSlider3colRoundComponent, isStandalone: true, selector: "lib-puro-slider3col-round", inputs: { title: "title", subtitle: "subtitle", items: "items", button: "button" }, ngImport: i0, template: "<section\n class=\"news js-active-slider generalMargin\"\n [puroSlider]=\"items\"\n data-slides_infinite=\"true\"\n data-slider_name=\"js-news-slider\"\n data-slider_showbtns=\"true\"\n data-slider_showdots=\"false\"\n data-slider_fade=\"false\"\n data-slider_autoplay=\"true\"\n data-slides_pc=\"3\"\n data-slides_laptop=\"3\"\n data-slides_tablet=\"1\"\n data-slides_mobile=\"1\"\n data-slides_mobile_small=\"1\"\n data-slides_mobile_xsmall=\"1\"\n>\n @if (title) {\n <h2 class=\"news__heading\">{{ title }}</h2>\n }\n @if (subtitle) {\n <p class=\"news__subHeading\">{{ subtitle }}</p>\n }\n <div class=\"news__inner relative\">\n <div class=\"news__container\">\n <div class=\"js-news-slider news__slider\">\n @for (item of items || []; track $index) {\n <div>\n <a\n href=\"\"\n class=\"news__box\"\n [attr.aria-label]=\"item.description\"\n >\n <div class=\"news__graphic\">\n @if (item.img) {\n <img\n [ngSrc]=\"item.img.src\"\n width=\"391\"\n height=\"552\"\n class=\"news__graphic--img\"\n [alt]=\"item.img.alt\"\n decoding=\"async\"\n />\n }\n </div>\n <div class=\"news__content\">\n @if (item.description) {\n <p class=\"news__paragraph\">{{ item.description }}</p>\n }\n </div>\n </a>\n </div>\n }\n </div>\n <div class=\"js-slider-arrows\"></div>\n </div>\n </div>\n @if (button) {\n <div class=\"btn__group\">\n <a\n [linkType]=\"button.linkType\"\n [href]=\"button.url\"\n [attr.aria-label]=\"button.label\"\n class=\"btn btn__primary--outline\"\n ><span>{{ button.label }}</span></a\n >\n </div>\n }\n</section>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: PuroLinkTypeDirective, selector: "[linkType]", inputs: ["linkType", "href", "modalClick"], outputs: ["bookClick", "anchorClicked"] }, { kind: "directive", type: PuroSliderDirective, selector: "[puroSlider]", inputs: ["puroSlider"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }] }); }
8306
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: PuroSlider3colRoundComponent, isStandalone: true, selector: "lib-puro-slider3col-round", inputs: { title: "title", subtitle: "subtitle", items: "items", button: "button" }, ngImport: i0, template: "<section\n class=\"news js-active-slider generalMargin\"\n [puroSlider]=\"items\"\n data-slides_infinite=\"true\"\n data-slider_name=\"js-news-slider\"\n data-slider_showbtns=\"true\"\n data-slider_showdots=\"false\"\n data-slider_fade=\"false\"\n data-slider_autoplay=\"true\"\n data-slides_pc=\"3\"\n data-slides_laptop=\"3\"\n data-slides_tablet=\"1\"\n data-slides_mobile=\"1\"\n data-slides_mobile_small=\"1\"\n data-slides_mobile_xsmall=\"1\"\n>\n @if (title) {\n <h2 class=\"news__heading\">{{ title }}</h2>\n }\n @if (subtitle) {\n <p class=\"news__subHeading\">{{ subtitle }}</p>\n }\n <div class=\"news__inner relative\">\n <div class=\"news__container\">\n <div class=\"js-news-slider news__slider\">\n @for (item of items || []; track $index) {\n <div>\n <a\n [href]=\"item.link?.url\"\n [linkType]=\"item.link?.linkType\"\n class=\"news__box\"\n [attr.aria-label]=\"item.description\"\n >\n <div class=\"news__graphic\">\n @if (item.img) {\n <img\n [ngSrc]=\"item.img.src\"\n width=\"391\"\n height=\"552\"\n class=\"news__graphic--img\"\n [alt]=\"item.img.alt\"\n decoding=\"async\"\n />\n }\n </div>\n <div class=\"news__content\">\n @if (item.description) {\n <p class=\"news__paragraph\">{{ item.description }}</p>\n }\n </div>\n </a>\n </div>\n }\n </div>\n <div class=\"js-slider-arrows\"></div>\n </div>\n </div>\n @if (button) {\n <div class=\"btn__group\">\n <a\n [linkType]=\"button.linkType\"\n [href]=\"button.url\"\n [attr.aria-label]=\"button.label\"\n class=\"btn btn__primary--outline\"\n ><span>{{ button.label }}</span></a\n >\n </div>\n }\n</section>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: PuroLinkTypeDirective, selector: "[linkType]", inputs: ["linkType", "href", "modalClick"], outputs: ["bookClick", "anchorClicked"] }, { kind: "directive", type: PuroSliderDirective, selector: "[puroSlider]", inputs: ["puroSlider"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }] }); }
8290
8307
  }
8291
8308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PuroSlider3colRoundComponent, decorators: [{
8292
8309
  type: Component,
@@ -8295,7 +8312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
8295
8312
  PuroLinkTypeDirective,
8296
8313
  PuroSliderDirective,
8297
8314
  NgOptimizedImage,
8298
- ], template: "<section\n class=\"news js-active-slider generalMargin\"\n [puroSlider]=\"items\"\n data-slides_infinite=\"true\"\n data-slider_name=\"js-news-slider\"\n data-slider_showbtns=\"true\"\n data-slider_showdots=\"false\"\n data-slider_fade=\"false\"\n data-slider_autoplay=\"true\"\n data-slides_pc=\"3\"\n data-slides_laptop=\"3\"\n data-slides_tablet=\"1\"\n data-slides_mobile=\"1\"\n data-slides_mobile_small=\"1\"\n data-slides_mobile_xsmall=\"1\"\n>\n @if (title) {\n <h2 class=\"news__heading\">{{ title }}</h2>\n }\n @if (subtitle) {\n <p class=\"news__subHeading\">{{ subtitle }}</p>\n }\n <div class=\"news__inner relative\">\n <div class=\"news__container\">\n <div class=\"js-news-slider news__slider\">\n @for (item of items || []; track $index) {\n <div>\n <a\n href=\"\"\n class=\"news__box\"\n [attr.aria-label]=\"item.description\"\n >\n <div class=\"news__graphic\">\n @if (item.img) {\n <img\n [ngSrc]=\"item.img.src\"\n width=\"391\"\n height=\"552\"\n class=\"news__graphic--img\"\n [alt]=\"item.img.alt\"\n decoding=\"async\"\n />\n }\n </div>\n <div class=\"news__content\">\n @if (item.description) {\n <p class=\"news__paragraph\">{{ item.description }}</p>\n }\n </div>\n </a>\n </div>\n }\n </div>\n <div class=\"js-slider-arrows\"></div>\n </div>\n </div>\n @if (button) {\n <div class=\"btn__group\">\n <a\n [linkType]=\"button.linkType\"\n [href]=\"button.url\"\n [attr.aria-label]=\"button.label\"\n class=\"btn btn__primary--outline\"\n ><span>{{ button.label }}</span></a\n >\n </div>\n }\n</section>\n" }]
8315
+ ], template: "<section\n class=\"news js-active-slider generalMargin\"\n [puroSlider]=\"items\"\n data-slides_infinite=\"true\"\n data-slider_name=\"js-news-slider\"\n data-slider_showbtns=\"true\"\n data-slider_showdots=\"false\"\n data-slider_fade=\"false\"\n data-slider_autoplay=\"true\"\n data-slides_pc=\"3\"\n data-slides_laptop=\"3\"\n data-slides_tablet=\"1\"\n data-slides_mobile=\"1\"\n data-slides_mobile_small=\"1\"\n data-slides_mobile_xsmall=\"1\"\n>\n @if (title) {\n <h2 class=\"news__heading\">{{ title }}</h2>\n }\n @if (subtitle) {\n <p class=\"news__subHeading\">{{ subtitle }}</p>\n }\n <div class=\"news__inner relative\">\n <div class=\"news__container\">\n <div class=\"js-news-slider news__slider\">\n @for (item of items || []; track $index) {\n <div>\n <a\n [href]=\"item.link?.url\"\n [linkType]=\"item.link?.linkType\"\n class=\"news__box\"\n [attr.aria-label]=\"item.description\"\n >\n <div class=\"news__graphic\">\n @if (item.img) {\n <img\n [ngSrc]=\"item.img.src\"\n width=\"391\"\n height=\"552\"\n class=\"news__graphic--img\"\n [alt]=\"item.img.alt\"\n decoding=\"async\"\n />\n }\n </div>\n <div class=\"news__content\">\n @if (item.description) {\n <p class=\"news__paragraph\">{{ item.description }}</p>\n }\n </div>\n </a>\n </div>\n }\n </div>\n <div class=\"js-slider-arrows\"></div>\n </div>\n </div>\n @if (button) {\n <div class=\"btn__group\">\n <a\n [linkType]=\"button.linkType\"\n [href]=\"button.url\"\n [attr.aria-label]=\"button.label\"\n class=\"btn btn__primary--outline\"\n ><span>{{ button.label }}</span></a\n >\n </div>\n }\n</section>\n" }]
8299
8316
  }], propDecorators: { title: [{
8300
8317
  type: Input
8301
8318
  }], subtitle: [{