ctt-babylon 0.12.37 → 0.13.1

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.
Files changed (32) hide show
  1. package/esm2022/lib/components/core/babylon-lis-c2-img-vid/babylon-lis-c2-img-vid.component.mjs +3 -8
  2. package/esm2022/lib/components/core/babylon-lis-c2-txt/babylon-lis-c2-txt.component.mjs +26 -260
  3. package/esm2022/lib/components/core/babylon-lis-c4-txt-img-pdf/babylon-lis-c4-txt-img-pdf.component.mjs +62 -0
  4. package/esm2022/lib/components/core/babylon-lis-c4-txt-img-pdf/index.mjs +2 -0
  5. package/esm2022/lib/components/core/babylon-lis-c5-txt-img-svg/babylon-lis-c5-txt-img-svg.component.mjs +55 -0
  6. package/esm2022/lib/components/core/babylon-lis-c5-txt-img-svg/index.mjs +2 -0
  7. package/esm2022/lib/components/core/babylon-mod-c2-img-txt-cta/babylon-mod-c2-img-txt-cta.component.mjs +29 -0
  8. package/esm2022/lib/components/core/babylon-mod-c2-img-txt-cta/index.mjs +2 -0
  9. package/esm2022/lib/components/core/index.mjs +4 -1
  10. package/esm2022/lib/components/external/core/c2-img-txt-svg/c2-img-txt-svg.component.mjs +19 -3
  11. package/esm2022/lib/components/external/core/lis-c2-txt-img/lis-c2-txt-img.component.mjs +149 -71
  12. package/esm2022/lib/interfaces/babylon-global.interface.mjs +1 -1
  13. package/esm2022/lib/interfaces/babylon-globals-gallery-filters.mjs +2 -0
  14. package/esm2022/lib/interfaces/babylon-text-info.interface.mjs +1 -1
  15. package/esm2022/lib/services/mapper/mapper.service.mjs +40 -1
  16. package/fesm2022/ctt-babylon.mjs +362 -1175
  17. package/fesm2022/ctt-babylon.mjs.map +1 -1
  18. package/lib/components/core/babylon-lis-c2-txt/babylon-lis-c2-txt.component.d.ts +12 -14
  19. package/lib/components/core/babylon-lis-c4-txt-img-pdf/babylon-lis-c4-txt-img-pdf.component.d.ts +31 -0
  20. package/lib/components/core/babylon-lis-c4-txt-img-pdf/index.d.ts +1 -0
  21. package/lib/components/core/babylon-lis-c5-txt-img-svg/babylon-lis-c5-txt-img-svg.component.d.ts +28 -0
  22. package/lib/components/core/babylon-lis-c5-txt-img-svg/index.d.ts +1 -0
  23. package/lib/components/core/babylon-mod-c2-img-txt-cta/babylon-mod-c2-img-txt-cta.component.d.ts +18 -0
  24. package/lib/components/core/babylon-mod-c2-img-txt-cta/index.d.ts +1 -0
  25. package/lib/components/core/index.d.ts +3 -0
  26. package/lib/components/external/core/c2-img-txt-svg/c2-img-txt-svg.component.d.ts +10 -1
  27. package/lib/components/external/core/lis-c2-txt-img/lis-c2-txt-img.component.d.ts +52 -31
  28. package/lib/interfaces/babylon-global.interface.d.ts +2 -0
  29. package/lib/interfaces/babylon-globals-gallery-filters.d.ts +5 -0
  30. package/lib/interfaces/babylon-text-info.interface.d.ts +4 -0
  31. package/lib/services/mapper/mapper.service.d.ts +2 -0
  32. package/package.json +1 -1
@@ -1,33 +1,31 @@
1
1
  import { AfterViewInit, ElementRef, QueryList } from '@angular/core';
2
- import { BabylonTextInfoI } from '../../../interfaces';
2
+ import { BabylonItemI, BabylonTextInfoI } from '../../../interfaces';
3
3
  import { BabylonDestinationI } from '../../../interfaces/babylon-destination.interface';
4
4
  import { BabylonHotelGlobalItem } from '../../../interfaces/babylon-hotel.interface';
5
5
  import * as i0 from "@angular/core";
6
- interface FaqHotelLink {
7
- label: string;
8
- href: string;
9
- ariaLabel?: string;
10
- showBigIcons?: boolean;
11
- showSmallIcons?: boolean;
12
- }
13
- interface FaqItem {
6
+ type NormalizedFaq = {
7
+ kind: 'destination';
14
8
  title: string;
15
- colorClass?: 'green' | 'blue' | 'red' | '';
16
- hotels: FaqHotelLink[];
17
- }
9
+ hotels: BabylonHotelGlobalItem[];
10
+ } | {
11
+ kind: 'item';
12
+ title: string;
13
+ text: string;
14
+ };
18
15
  export declare class BabylonLisC2TxtComponent implements AfterViewInit {
19
16
  activeIndex: number | null;
20
17
  texts?: BabylonTextInfoI;
21
18
  destinations?: BabylonDestinationI[];
22
19
  hotels?: BabylonHotelGlobalItem[];
20
+ items?: BabylonItemI[];
23
21
  answers: QueryList<ElementRef<HTMLDivElement>>;
24
22
  getNumber(text: string): number[];
25
- faqItems: FaqItem[];
23
+ get faqsNormalized(): NormalizedFaq[];
26
24
  ngAfterViewInit(): void;
27
25
  onToggleFaq(index: number): void;
28
26
  isActive(index: number): boolean;
29
27
  getHotelById(id: number | undefined): BabylonHotelGlobalItem | undefined;
30
28
  static ɵfac: i0.ɵɵFactoryDeclaration<BabylonLisC2TxtComponent, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<BabylonLisC2TxtComponent, "lib-babylon-lis-c2-txt", never, { "texts": { "alias": "texts"; "required": false; }; "destinations": { "alias": "destinations"; "required": false; }; "hotels": { "alias": "hotels"; "required": false; }; }, {}, never, never, true, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<BabylonLisC2TxtComponent, "lib-babylon-lis-c2-txt", never, { "texts": { "alias": "texts"; "required": false; }; "destinations": { "alias": "destinations"; "required": false; }; "hotels": { "alias": "hotels"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, {}, never, never, true, never>;
32
30
  }
33
31
  export {};
@@ -0,0 +1,31 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BabylonButtonI, BabylonImageI } from '../../../interfaces';
3
+ import * as i0 from "@angular/core";
4
+ export declare class BabylonLisC4TxtImgPdfComponent implements OnInit {
5
+ title?: string;
6
+ subtitle?: string;
7
+ prev?: string;
8
+ next?: string;
9
+ download?: string;
10
+ items?: BabylonLisC4ImgPdfI[];
11
+ private readonly itemsPerPage;
12
+ currentPage: number;
13
+ totalPages: number;
14
+ currentPress: BabylonLisC4ImgPdfI[] | undefined;
15
+ ngOnInit(): void;
16
+ private updatecurrentPress;
17
+ changePage(newPage: number): void;
18
+ prevPage(): void;
19
+ nextPage(): void;
20
+ get pageNumbers(): number[];
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<BabylonLisC4TxtImgPdfComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<BabylonLisC4TxtImgPdfComponent, "lib-babylon-lis-c4-txt-img-pdf", never, { "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "prev": { "alias": "prev"; "required": false; }; "next": { "alias": "next"; "required": false; }; "download": { "alias": "download"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, {}, never, never, true, never>;
23
+ }
24
+ export interface BabylonLisC4ImgPdfI {
25
+ link?: BabylonButtonI;
26
+ text?: string;
27
+ title?: string;
28
+ magazine?: string;
29
+ year?: string;
30
+ image?: BabylonImageI;
31
+ }
@@ -0,0 +1 @@
1
+ export * from './babylon-lis-c4-txt-img-pdf.component';
@@ -0,0 +1,28 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BabylonImageI } from '../../../interfaces';
3
+ import * as i0 from "@angular/core";
4
+ export declare class BabylonLisC5TxtImgSvgComponent implements OnInit {
5
+ title?: string;
6
+ subtitle?: string;
7
+ prev?: string;
8
+ next?: string;
9
+ items?: BabylonLisC5TxtImgSvgI[];
10
+ private readonly itemsPerPage;
11
+ currentPage: number;
12
+ totalPages: number;
13
+ currentAwards: BabylonLisC5TxtImgSvgI[];
14
+ ngOnInit(): void;
15
+ private updateCurrentAwards;
16
+ changePage(newPage: number): void;
17
+ prevPage(): void;
18
+ nextPage(): void;
19
+ get pageNumbers(): number[];
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<BabylonLisC5TxtImgSvgComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<BabylonLisC5TxtImgSvgComponent, "lib-babylon-lis-c5-txt-img-svg", never, { "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "prev": { "alias": "prev"; "required": false; }; "next": { "alias": "next"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, {}, never, never, true, never>;
22
+ }
23
+ export interface BabylonLisC5TxtImgSvgI {
24
+ title?: string;
25
+ event?: string;
26
+ year?: string;
27
+ image?: BabylonImageI;
28
+ }
@@ -0,0 +1 @@
1
+ export * from './babylon-lis-c5-txt-img-svg.component';
@@ -0,0 +1,18 @@
1
+ import { MatDialogRef } from '@angular/material/dialog';
2
+ import { BabylonButtonI, BabylonImageI } from '../../../interfaces';
3
+ import * as i0 from "@angular/core";
4
+ export declare class BabylonModC2ImgTxtCtaComponent {
5
+ private readonly dialogRef;
6
+ title?: string;
7
+ items?: BabylonModC2ImgTxtCtaI[];
8
+ constructor(dialogRef: MatDialogRef<BabylonModC2ImgTxtCtaComponent>);
9
+ close(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<BabylonModC2ImgTxtCtaComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<BabylonModC2ImgTxtCtaComponent, "lib-babylon-mod-c2-img-txt-cta", never, { "title": { "alias": "title"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, {}, never, never, true, never>;
12
+ }
13
+ export interface BabylonModC2ImgTxtCtaI {
14
+ title?: string;
15
+ subtitle?: string;
16
+ image?: BabylonImageI;
17
+ button?: BabylonButtonI;
18
+ }
@@ -0,0 +1 @@
1
+ export * from './babylon-mod-c2-img-txt-cta.component';
@@ -88,6 +88,8 @@ export * from './babylon-legal';
88
88
  export * from './babylon-lis-c2-img-vid';
89
89
  export * from './babylon-lis-c2-txt';
90
90
  export * from './babylon-lis-c4-txt-ico';
91
+ export * from './babylon-lis-c4-txt-img-pdf';
92
+ export * from './babylon-lis-c5-txt-img-svg';
91
93
  export * from './babylon-lis-svg-txt-cta';
92
94
  export * from './babylon-list-box-info';
93
95
  export * from './babylon-list-c3-img-txt';
@@ -97,6 +99,7 @@ export * from './babylon-list-img';
97
99
  export * from './babylon-list-img-info';
98
100
  export * from './babylon-list-img-v2';
99
101
  export * from './babylon-loyalty-table';
102
+ export * from './babylon-mod-c2-img-txt-cta';
100
103
  export * from './babylon-modal-multiple-motors';
101
104
  export * from './babylon-newsletter';
102
105
  export * from './babylon-newsletter-modal-v2';
@@ -1,3 +1,5 @@
1
+ import { BabylonButtonI, BabylonMultimediaI, BabylonTextInfoI } from '../../../../interfaces';
2
+ import { BabylonStyleGlobalItem } from '../../../../interfaces/babylon-style.interface';
1
3
  import * as i0 from "@angular/core";
2
4
  export interface C2ImgTxtSvgLine {
3
5
  text: string;
@@ -25,8 +27,15 @@ export interface C2ImgTxtSvgContent {
25
27
  export declare class C2ImgTxtSvgComponent {
26
28
  content: C2ImgTxtSvgContent;
27
29
  reverse?: boolean;
30
+ texts?: BabylonTextInfoI;
31
+ multimedia?: BabylonMultimediaI;
32
+ buttons?: BabylonButtonI[];
33
+ links?: BabylonButtonI[];
34
+ styles?: BabylonStyleGlobalItem;
35
+ tagNameMap: string;
28
36
  trackByTitle(index: number, section: C2ImgTxtSvgSection): string;
29
37
  trackByLine(index: number, line: C2ImgTxtSvgLine): string;
38
+ getFirstImageByTag(tagName: string): import("../../../../interfaces").BabylonImageI | undefined;
30
39
  static ɵfac: i0.ɵɵFactoryDeclaration<C2ImgTxtSvgComponent, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<C2ImgTxtSvgComponent, "c2-img-txt-svg", never, { "content": { "alias": "content"; "required": false; }; "reverse": { "alias": "reverse"; "required": false; }; }, {}, never, never, true, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<C2ImgTxtSvgComponent, "c2-img-txt-svg", never, { "content": { "alias": "content"; "required": false; }; "reverse": { "alias": "reverse"; "required": false; }; "texts": { "alias": "texts"; "required": false; }; "multimedia": { "alias": "multimedia"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; "links": { "alias": "links"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; }, {}, never, never, true, never>;
32
41
  }
@@ -1,56 +1,77 @@
1
1
  import { AfterViewInit, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import { BabylonImageI, BabylonTextInfoI } from '../../../../interfaces';
2
3
  import * as i0 from "@angular/core";
3
- export interface LisC2TxtImgCategory {
4
- label: string;
5
- value: string;
4
+ export interface GalleryFilterItem {
5
+ id: number;
6
+ text: string;
7
+ all?: boolean;
8
+ room?: boolean;
9
+ rooms?: boolean;
6
10
  }
7
- export interface LisC2TxtImgRoom {
8
- id: string;
9
- label: string;
11
+ export interface GalleryImageItem {
12
+ filter: number;
13
+ img: BabylonImageI & {
14
+ name?: string;
15
+ };
16
+ title?: string;
10
17
  }
11
- export interface LisC2TxtImgItem {
12
- category: string;
13
- image: string;
14
- link: string;
15
- caption: string;
16
- fancyboxGroup: string;
17
- fancyboxCaption: string;
18
- roomId?: string;
18
+ export interface BabylonGloablsGalleryFilter {
19
+ leftSide?: boolean;
20
+ rightSide?: boolean;
21
+ filters: GalleryFilterItem[];
22
+ images: GalleryImageItem[];
19
23
  }
20
24
  export interface LisC2TxtImgContent {
21
- categories: LisC2TxtImgCategory[];
22
- rooms: LisC2TxtImgRoom[];
23
- items: LisC2TxtImgItem[];
24
- footerHighlight: string;
25
- footerComplement: string;
26
25
  lensIcon: string;
27
26
  }
28
27
  export declare class LisC2TxtImgComponent implements AfterViewInit, OnChanges, OnDestroy {
29
28
  private host;
30
29
  content: LisC2TxtImgContent;
31
- roomsModal?: ElementRef<HTMLElement>;
30
+ filters?: BabylonGloablsGalleryFilter;
31
+ texts?: BabylonTextInfoI;
32
32
  categoriesModal?: ElementRef<HTMLElement>;
33
- selectedCategory: string;
34
- selectedRoomId: string | null;
33
+ roomsModal?: ElementRef<HTMLElement>;
34
+ /** null => Todas */
35
+ selectedFilterId: number | null;
36
+ /** Dentro de habitaciones: '__all__' o una clave concreta */
37
+ selectedRoomKey: string | null;
35
38
  private galleryBound;
36
39
  constructor(host: ElementRef<HTMLElement>);
37
40
  ngAfterViewInit(): void;
38
41
  ngOnChanges(changes: SimpleChanges): void;
39
42
  ngOnDestroy(): void;
40
- get filteredItems(): LisC2TxtImgItem[];
41
- filterByCategory(category: string): void;
42
- filterFromModal(category: string): void;
43
- selectRoom(roomId: string): void;
44
- openRoomsModal(): void;
43
+ /** filtro “Habitaciones” */
44
+ get roomsFilterId(): number | null;
45
+ /** existe filtro habitaciones */
46
+ get hasRoomsFilter(): boolean;
47
+ /** ✅ para marcar “Todas” (si existe) */
48
+ private get allFilterId();
49
+ private setDefaultSelection;
50
+ /** ✅ util: sacar label humano para habitaciones */
51
+ private getRoomLabelFromImage;
52
+ /** ✅ opciones del modal habitaciones (dinámicas) */
53
+ get roomOptions(): {
54
+ id: string;
55
+ label: string;
56
+ }[];
57
+ /** ✅ lista filtrada real */
58
+ get filteredImages(): GalleryImageItem[];
59
+ /** ✅ click filtro (desktop) */
60
+ filterBy(filter: GalleryFilterItem): void;
61
+ /** ✅ click filtro (modal categorías) */
62
+ filterFromModal(filter: GalleryFilterItem): void;
63
+ /** ✅ seleccionar habitación (modal rooms) */
64
+ selectRoom(roomKey: string): void;
45
65
  openCategoriesModal(): void;
66
+ openRoomsModal(): void;
46
67
  closeModals(): void;
47
- isCategoryActive(category: string): boolean;
68
+ isFilterActive(filter: GalleryFilterItem): boolean;
69
+ getFancyboxGroup(): string;
48
70
  trackByIndex(index: number): number;
49
- shouldDisplayItem(item: LisC2TxtImgItem): boolean;
50
- getFancyboxGroup(item: LisC2TxtImgItem): string;
71
+ /** Fancybox */
51
72
  private bindGallery;
52
73
  private unbindGallery;
53
74
  private openInlineModal;
54
75
  static ɵfac: i0.ɵɵFactoryDeclaration<LisC2TxtImgComponent, never>;
55
- static ɵcmp: i0.ɵɵComponentDeclaration<LisC2TxtImgComponent, "lis-c2-txt-img", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, true, never>;
76
+ static ɵcmp: i0.ɵɵComponentDeclaration<LisC2TxtImgComponent, "lis-c2-txt-img", never, { "content": { "alias": "content"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "texts": { "alias": "texts"; "required": false; }; }, {}, never, never, true, never>;
56
77
  }
@@ -1,4 +1,5 @@
1
1
  import { BabylonAdvantagesI } from '../components/core';
2
+ import { BabylonGloablsGalleryFilter } from './babylon-globals-gallery-filters';
2
3
  import { BabylonItemI } from './babylon-item.interface';
3
4
  import { BabylonMultimediaI } from './babylon-multimedia.interface';
4
5
  import { BabylonRoomDetailI } from './babylon-room-detail.interface';
@@ -20,4 +21,5 @@ export interface BabylonGlobal {
20
21
  seeMore: String;
21
22
  seeLess: String;
22
23
  rooms?: BabylonRoomDetailI[];
24
+ filters?: BabylonGloablsGalleryFilter;
23
25
  }
@@ -0,0 +1,5 @@
1
+ import { BabylonGalleryFilter, BabylonGalleryItem } from '../components/core';
2
+ export interface BabylonGloablsGalleryFilter {
3
+ filters?: BabylonGalleryFilter[];
4
+ images?: BabylonGalleryItem[];
5
+ }
@@ -71,4 +71,8 @@ export interface BabylonTextInfoI {
71
71
  inputPlaceholder?: string;
72
72
  newsErrorEmail?: string;
73
73
  successsubscriber?: string;
74
+ mapUrl?: string;
75
+ rooms?: string;
76
+ categories?: string;
77
+ all?: string;
74
78
  }
@@ -7,6 +7,7 @@ import { BabylonStaticFooterV2I } from '../../components/core/babylon-static-foo
7
7
  import { BabylonContactInfoI, BabylonGlobalIconI, BabylonImageI, BabylonMenuInfoI, BabylonOfferItemI, BabylonRoomDetailI, BabylonTextInfoI, BodyComponent, COMPONENTS_EXTRA, ConsultTypeI } from '../../interfaces';
8
8
  import { BabylonAdvantageItemI } from '../../interfaces/babylon-advantages-item.interface';
9
9
  import { BabylonDestinationI } from '../../interfaces/babylon-destination.interface';
10
+ import { BabylonGloablsGalleryFilter } from '../../interfaces/babylon-globals-gallery-filters';
10
11
  import { BabylonHotelGlobalItem } from '../../interfaces/babylon-hotel.interface';
11
12
  import { BabylonItemI } from '../../interfaces/babylon-item.interface';
12
13
  import * as i0 from "@angular/core";
@@ -25,6 +26,7 @@ export declare class MapperService {
25
26
  mapSubmenu(props: any | undefined): BabylonSubmenuI;
26
27
  mapComponents<T>(body: any[], addons?: ComponentsAddons): BodyComponent<T>[];
27
28
  mapGlobals(component: any, ndProps: any | undefined, ndPropsConsult: any | undefined): any;
29
+ mapGlobalsFilters(filters: any | undefined): BabylonGloablsGalleryFilter | undefined;
28
30
  mapGlobalConsultTypes(props: any | undefined, ndPropsConsult: any | undefined): any | undefined;
29
31
  mapGlobalDestinations(destinations: any | undefined): BabylonDestinationI[] | undefined;
30
32
  mapGlobalTexts(texts: any | undefined): BabylonTextInfoI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctt-babylon",
3
- "version": "0.12.37",
3
+ "version": "0.13.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.8",
6
6
  "@angular/core": "^17.3.8",