ctt-babylon 0.11.4 → 0.11.5
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/esm2022/lib/components/core/babylon-booking-widget/babylon-booking-widget.component.mjs +100 -56
- package/fesm2022/ctt-babylon.mjs +99 -55
- package/fesm2022/ctt-babylon.mjs.map +1 -1
- package/lib/components/core/babylon-booking-widget/babylon-booking-widget.component.d.ts +10 -39
- package/package.json +1 -1
|
@@ -1,42 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementRef, NgZone } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
declare global {
|
|
4
4
|
interface Window {
|
|
5
5
|
WidgetSearch: any;
|
|
6
|
+
initializeWidgetSearch?: () => void;
|
|
6
7
|
}
|
|
7
8
|
}
|
|
8
|
-
export
|
|
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;
|
|
9
|
+
export declare class BabylonBookingWidgetComponent {
|
|
32
10
|
private zone;
|
|
11
|
+
widgetContainer: ElementRef<HTMLElement>;
|
|
33
12
|
widgetId: string;
|
|
34
13
|
hotelId: string;
|
|
35
|
-
type:
|
|
36
|
-
theme:
|
|
14
|
+
type: 'chain' | 'hotel' | string;
|
|
15
|
+
theme: 'light' | 'dark' | string;
|
|
37
16
|
currency: string;
|
|
38
17
|
locale: string;
|
|
39
|
-
layout:
|
|
18
|
+
layout: 'inline' | 'popup' | string;
|
|
40
19
|
defaultAdults: number;
|
|
41
20
|
defaultChildren: number;
|
|
42
21
|
showPrice: boolean;
|
|
@@ -48,17 +27,9 @@ export declare class BabylonBookingWidgetComponent implements AfterViewInit, OnD
|
|
|
48
27
|
urlChain?: string;
|
|
49
28
|
urlHotel?: string;
|
|
50
29
|
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;
|
|
30
|
+
private mounted;
|
|
58
31
|
constructor(platformId: object, zone: NgZone);
|
|
59
|
-
|
|
60
|
-
private initWidget;
|
|
61
|
-
ngOnDestroy(): void;
|
|
32
|
+
private mount;
|
|
62
33
|
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; };
|
|
34
|
+
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; }; }, {}, never, never, true, never>;
|
|
64
35
|
}
|