ctt-babylon 0.10.38 → 0.11.0

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.
@@ -0,0 +1,64 @@
1
+ import { AfterViewInit, ElementRef, NgZone, OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ declare global {
4
+ interface Window {
5
+ WidgetSearch: any;
6
+ }
7
+ }
8
+ export type BookingWidgetType = 'chain' | 'hotel';
9
+ export type BookingWidgetTheme = 'light' | 'dark';
10
+ export type BookingWidgetLayout = 'inline' | 'popup' | string;
11
+ export interface BookingWidgetConfig {
12
+ bookId?: string;
13
+ type?: BookingWidgetType | string;
14
+ theme?: BookingWidgetTheme | string;
15
+ currency?: string;
16
+ locale?: string;
17
+ layout?: BookingWidgetLayout;
18
+ defaultAdults?: number;
19
+ defaultChildren?: number;
20
+ showPrice?: boolean;
21
+ showHotelSelector?: boolean;
22
+ showPromoCode?: boolean;
23
+ showChildAges?: boolean;
24
+ maxChildren?: number;
25
+ baseUrl?: string;
26
+ urlChain?: string;
27
+ urlHotel?: string;
28
+ buttonText?: string;
29
+ }
30
+ export declare class BabylonBookingWidgetComponent implements AfterViewInit, OnDestroy {
31
+ private platformId;
32
+ private zone;
33
+ widgetId: string;
34
+ hotelId: string;
35
+ type: BookingWidgetType | string;
36
+ theme: BookingWidgetTheme | string;
37
+ currency: string;
38
+ locale: string;
39
+ layout: BookingWidgetLayout;
40
+ defaultAdults: number;
41
+ defaultChildren: number;
42
+ showPrice: boolean;
43
+ showHotelSelector: boolean;
44
+ showPromoCode: boolean;
45
+ showChildAges: boolean;
46
+ maxChildren: number;
47
+ baseUrl?: string;
48
+ urlChain?: string;
49
+ urlHotel?: string;
50
+ buttonText?: string;
51
+ /**
52
+ * Por si algún día quieres sobreescribir todo de golpe desde CMS:
53
+ * <lib-babylon-booking-widget [configOverride]="{ currency:'USD', showPrice:true }" />
54
+ */
55
+ configOverride: Partial<BookingWidgetConfig>;
56
+ widgetContainer: ElementRef<HTMLElement>;
57
+ private initialized;
58
+ constructor(platformId: object, zone: NgZone);
59
+ ngAfterViewInit(): void;
60
+ private initWidget;
61
+ ngOnDestroy(): void;
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<BabylonBookingWidgetComponent, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<BabylonBookingWidgetComponent, "lib-babylon-booking-widget", never, { "widgetId": { "alias": "widgetId"; "required": false; }; "hotelId": { "alias": "hotelId"; "required": false; }; "type": { "alias": "type"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "defaultAdults": { "alias": "defaultAdults"; "required": false; }; "defaultChildren": { "alias": "defaultChildren"; "required": false; }; "showPrice": { "alias": "showPrice"; "required": false; }; "showHotelSelector": { "alias": "showHotelSelector"; "required": false; }; "showPromoCode": { "alias": "showPromoCode"; "required": false; }; "showChildAges": { "alias": "showChildAges"; "required": false; }; "maxChildren": { "alias": "maxChildren"; "required": false; }; "baseUrl": { "alias": "baseUrl"; "required": false; }; "urlChain": { "alias": "urlChain"; "required": false; }; "urlHotel": { "alias": "urlHotel"; "required": false; }; "buttonText": { "alias": "buttonText"; "required": false; }; "configOverride": { "alias": "configOverride"; "required": false; }; }, {}, never, never, true, never>;
64
+ }
@@ -0,0 +1 @@
1
+ export * from './babylon-booking-widget.component';
@@ -0,0 +1,44 @@
1
+ import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
+ import { FormControl, FormGroup } from '@angular/forms';
3
+ import { Calendar } from 'primeng/calendar';
4
+ import { guestsValue } from '../babylon-guests-popup/babylon-guests-popup.component';
5
+ import * as i0 from "@angular/core";
6
+ export declare class BabylonEngineModalV2Component implements OnInit {
7
+ private cdr;
8
+ datepicker: Calendar;
9
+ datepickerIn: Calendar;
10
+ datepickerOut: Calendar;
11
+ modal?: boolean;
12
+ close: EventEmitter<void>;
13
+ datepickerValue: string;
14
+ form: FormGroup<{
15
+ dates: FormControl<Date[] | null>;
16
+ guests: FormControl<string | null>;
17
+ promo: FormControl<string | null>;
18
+ }>;
19
+ formModal: FormGroup<{
20
+ dateIn: FormControl<Date | null>;
21
+ dateOut: FormControl<Date | null>;
22
+ guests: FormControl<string | null>;
23
+ promo: FormControl<string | null>;
24
+ }>;
25
+ guestsValue: string;
26
+ showingGuests: boolean;
27
+ showSubfields: boolean;
28
+ showChildrenAges: boolean;
29
+ showBabiesAges: boolean;
30
+ finalizedGuests: boolean;
31
+ constructor(cdr: ChangeDetectorRef);
32
+ ngOnInit(): void;
33
+ openCalendar(): void;
34
+ openCalendarIn(): void;
35
+ openCalendarOut(): void;
36
+ toggleShowingGuests(): void;
37
+ guestsChange(data: guestsValue): void;
38
+ closeModal(): void;
39
+ togglePersonas(): void;
40
+ toggleAgeGroup(kind: 'children' | 'babies'): void;
41
+ applyGuests(adults: string | number, children: string | number, babies: string | number): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<BabylonEngineModalV2Component, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<BabylonEngineModalV2Component, "lib-babylon-engine-modal", never, { "modal": { "alias": "modal"; "required": false; }; }, { "close": "close"; }, never, never, true, never>;
44
+ }
@@ -12,6 +12,7 @@ export * from './babylon-banner-info';
12
12
  export * from './babylon-banner-newsletter';
13
13
  export * from './babylon-blog-details';
14
14
  export * from './babylon-blog-list';
15
+ export * from './babylon-booking-widget';
15
16
  export * from './babylon-breadcrumb';
16
17
  export * from './babylon-color-picker';
17
18
  export * from './babylon-comingsoon';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctt-babylon",
3
- "version": "0.10.38",
3
+ "version": "0.11.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.8",
6
6
  "@angular/core": "^17.3.8",