vhobjects-user 1.0.3 → 1.0.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/fesm2015/vhobjects-user.js +1 -1
- package/fesm2015/vhobjects-user.js.map +1 -1
- package/lib/frames/frame-repeat/user/frame-repeat/frame-repeat.component.d.ts +9 -2
- package/lib/objects/basic/image-detail-repeat/user/image-detail-repeat/image-detail-repeat.component.d.ts +16 -1
- package/lib/objects/basic/image-repeat/user/image-repeat.component.d.ts +0 -1
- package/lib/objects/basic/video-repeat/user/video-repeat/video-repeat.component.d.ts +23 -3
- package/lib/objects/form/button-send-contact/user/send-contact/send-contact.component.d.ts +13 -1
- package/lib/objects/hotel/booking-flow/user/add-ons/booking-flow-add-ons.component.d.ts +60 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow-content.constants.d.ts +5 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow-sample-data.d.ts +128 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow.component.d.ts +162 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow.models.d.ts +5 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow.module.d.ts +16 -0
- package/lib/objects/hotel/booking-flow/user/booking-flow.service.d.ts +111 -0
- package/lib/objects/hotel/booking-flow/user/choose-room/booking-flow-choose-room.component.d.ts +87 -0
- package/lib/objects/hotel/booking-flow/user/payment/booking-flow-payment.component.d.ts +42 -0
- package/lib/objects/hotel/booking-flow/user/summary/booking-flow-summary.component.d.ts +76 -0
- package/lib/objects/hotel/booking-hotel-manage/user/booking-detail/booking-hotel-manage-booking-detail.component.d.ts +65 -0
- package/lib/objects/hotel/booking-hotel-manage/user/booking-hotel-manage.component.d.ts +66 -0
- package/lib/objects/hotel/booking-hotel-manage/user/booking-hotel-manage.module.d.ts +17 -0
- package/lib/objects/hotel/booking-hotel-manage/user/bookings/booking-hotel-manage-bookings.component.d.ts +39 -0
- package/lib/objects/hotel/booking-hotel-manage/user/personal/booking-hotel-manage-personal.component.d.ts +44 -0
- package/lib/objects/hotel/booking-hotel-manage/user/refund-detail/booking-hotel-manage-refund-detail.component.d.ts +16 -0
- package/lib/objects/hotel/booking-hotel-manage/user/refund-requests/booking-hotel-manage-refund-requests.component.d.ts +17 -0
- package/lib/objects/hotel/booking-selector/user/booking-selector.component.d.ts +80 -0
- package/lib/objects/hotel/btn-booking/user/btn-booking.component.d.ts +78 -0
- package/lib/objects/product/customize-newField/user/customize-newField/customize-newField.component.d.ts +2 -1
- package/lib/objects/product/customize-newField/user/customize-newField/newField-ckeditor/newField-ckeditor.component.d.ts +3 -2
- package/lib/objects/review/user/review/review.component.d.ts +55 -6
- package/lib/vhautoweb-objects.module.d.ts +32 -28
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/services/cart.service.d.ts +12 -1
|
@@ -5,6 +5,7 @@ import { Subscription } from 'rxjs';
|
|
|
5
5
|
import { FunctionService } from 'vhobjects-service/src/services';
|
|
6
6
|
import { PipeFrameService } from '../../../../../services/pipe-frame.service';
|
|
7
7
|
import { Router } from '@angular/router';
|
|
8
|
+
import { LanguageService } from 'vhobjects-service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class AtwFrameRepeat implements OnInit {
|
|
10
11
|
private vhQueryAutoWeb;
|
|
@@ -15,6 +16,7 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
15
16
|
vhAlgorithm: VhAlgorithm;
|
|
16
17
|
private platformId;
|
|
17
18
|
router: Router;
|
|
19
|
+
private languageService;
|
|
18
20
|
array_object_selected: any[];
|
|
19
21
|
resolution: any;
|
|
20
22
|
data: any;
|
|
@@ -83,13 +85,14 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
83
85
|
isComponentExist: ElementRef<HTMLDivElement>;
|
|
84
86
|
isItemVisible: boolean;
|
|
85
87
|
constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
86
|
-
vhEventMediator: VhEventMediator, vhAlgorithm: VhAlgorithm, platformId: Object, router: Router);
|
|
88
|
+
vhEventMediator: VhEventMediator, vhAlgorithm: VhAlgorithm, platformId: Object, router: Router, languageService: LanguageService);
|
|
87
89
|
ngOnInit(): void;
|
|
88
90
|
outputs: {
|
|
89
91
|
showToolBarObject: (event: any) => void;
|
|
90
92
|
};
|
|
91
93
|
ngOnChange(): void;
|
|
92
|
-
getDetailObject(): void
|
|
94
|
+
getDetailObject(): Promise<void>;
|
|
95
|
+
private fetchDataList;
|
|
93
96
|
private setHeight;
|
|
94
97
|
private checkResizeOffset;
|
|
95
98
|
/** Hàm này trả về một chuỗi để chia layout cho grid
|
|
@@ -162,6 +165,10 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
162
165
|
*/
|
|
163
166
|
onDrop(event: DragEvent): void;
|
|
164
167
|
get frameProductsStyles(): any;
|
|
168
|
+
/**
|
|
169
|
+
* Trả về URL đầy đủ của trang hiện tại kèm query param page, dùng cho href hiển thị khi hover
|
|
170
|
+
*/
|
|
171
|
+
pageUrl(page: number): string;
|
|
165
172
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameRepeat, never>;
|
|
166
173
|
static ɵcmp: i0.ɵɵComponentDeclaration<AtwFrameRepeat, "atw-frame-repeat", never, { "array_object_selected": "array_object_selected"; "resolution": "resolution"; "data": "data"; "id_subproject": "id_subproject"; "type": "type"; "objectChoosing": "objectChoosing"; "device": "device"; "blockChoosing": "blockChoosing"; "isPressingShift": "isPressingShift"; "isClone": "isClone"; }, { "showToolBarObject": "showToolBarObject"; "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
|
|
167
174
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
5
|
import { Subscription } from 'rxjs';
|
|
5
6
|
import { VhEventMediator, VhImage, VhQueryAutoWeb } from 'vhautowebdb';
|
|
@@ -15,6 +16,7 @@ export declare class AtwImageDetailRepeat implements OnInit {
|
|
|
15
16
|
private element;
|
|
16
17
|
private vhEventMediator;
|
|
17
18
|
private platformId;
|
|
19
|
+
private sanitizer;
|
|
18
20
|
product: any;
|
|
19
21
|
resolution: any;
|
|
20
22
|
data: any;
|
|
@@ -61,8 +63,10 @@ export declare class AtwImageDetailRepeat implements OnInit {
|
|
|
61
63
|
observer: IntersectionObserver;
|
|
62
64
|
subscription: Subscription;
|
|
63
65
|
dataItem: any;
|
|
66
|
+
loadingVideo: boolean;
|
|
67
|
+
srcIframe: any;
|
|
64
68
|
constructor(router: Router, route: ActivatedRoute, vhImage: VhImage, matDialog: MatDialog, functionService: FunctionService, vhQueryAutoWeb: VhQueryAutoWeb, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
65
|
-
vhEventMediator: VhEventMediator, platformId: Object);
|
|
69
|
+
vhEventMediator: VhEventMediator, platformId: Object, sanitizer: DomSanitizer);
|
|
66
70
|
ngOnInit(): void;
|
|
67
71
|
ngOnChanges(change: SimpleChanges): void;
|
|
68
72
|
ngAfterViewInit(): void;
|
|
@@ -101,6 +105,17 @@ export declare class AtwImageDetailRepeat implements OnInit {
|
|
|
101
105
|
* Hàm chờ khối xuất hiện và cuộn đến
|
|
102
106
|
* */
|
|
103
107
|
private scrollToBlockWhenAvailable;
|
|
108
|
+
/** Định nghĩa pattern lấy ID từ link embed (hỗ trợ cả nocookie) */
|
|
109
|
+
private youtubeEmbedPattern;
|
|
110
|
+
isYoutubeLink(src: string): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Lấy link ảnh
|
|
113
|
+
* - Nếu là ảnh thật thì trực tiếp trả về chính nó không cần xử lý thêm
|
|
114
|
+
* - Nếu là link youtube thì xử lý lấy id và dùng với link thumbnail
|
|
115
|
+
* @param src link ảnh/link youtube
|
|
116
|
+
*/
|
|
117
|
+
getUrlImage(src: string): string;
|
|
118
|
+
private initVideoIframe;
|
|
104
119
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwImageDetailRepeat, never>;
|
|
105
120
|
static ɵcmp: i0.ɵɵComponentDeclaration<AtwImageDetailRepeat, "atw-image-detail-repeat", never, { "product": "product"; "resolution": "resolution"; "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; "index": "index"; }, { "onSomething": "onSomething"; "addObjectDuplicate": "addObjectDuplicate"; "save": "save"; "deleteTools": "deleteTools"; }, never, never>;
|
|
106
121
|
}
|
|
@@ -87,7 +87,6 @@ export declare class AtwImageRepeat implements OnInit {
|
|
|
87
87
|
* - Tối ưu LCP trong SEO
|
|
88
88
|
*/
|
|
89
89
|
private addPreload;
|
|
90
|
-
private handleSrcImg;
|
|
91
90
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwImageRepeat, never>;
|
|
92
91
|
static ɵcmp: i0.ɵɵComponentDeclaration<AtwImageRepeat, "atw-image-repeat", never, { "data": "data"; "type": "type"; "device": "device"; "index": "index"; "id_subproject": "id_subproject"; "product": "product"; }, {}, never, never>;
|
|
93
92
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
1
|
+
import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
3
|
import { FunctionService } from 'vhobjects-service/src/services';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
5
|
+
declare type EmbedPlatform = 'tiktok' | 'instagram';
|
|
6
|
+
export declare class AtwVideoRepeat implements OnInit, OnChanges {
|
|
6
7
|
private sanitizer;
|
|
7
8
|
functionService: FunctionService;
|
|
8
9
|
device: any;
|
|
@@ -16,10 +17,29 @@ export declare class AtwVideoRepeat implements OnInit {
|
|
|
16
17
|
loading: boolean;
|
|
17
18
|
private staticdata;
|
|
18
19
|
SrcIframe: any;
|
|
20
|
+
safeHtmlContent: SafeHtml;
|
|
19
21
|
dataItem: any;
|
|
22
|
+
typeVideo: string;
|
|
20
23
|
constructor(sanitizer: DomSanitizer, functionService: FunctionService);
|
|
21
24
|
ngOnInit(): void;
|
|
25
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
22
26
|
private getDetailObject;
|
|
27
|
+
/** Phát hiện value có phải HTML embed (tiktok/instagram) đã dựng sẵn hay không */
|
|
28
|
+
private detectEmbedHtmlPlatform;
|
|
29
|
+
/** Nhận link gốc (youtube/facebook/instagram), trả về link embed phù hợp */
|
|
30
|
+
private formatEmbedUrl;
|
|
31
|
+
private toYoutubeEmbed;
|
|
32
|
+
private toFacebookEmbed;
|
|
33
|
+
private toInstagramEmbed;
|
|
34
|
+
/** TikTok: dùng oEmbed API để lấy HTML embed chính thức khi value chỉ là URL thuần */
|
|
35
|
+
private loadTiktokEmbed;
|
|
36
|
+
private embedScriptId;
|
|
37
|
+
/**
|
|
38
|
+
* Nhận HTML embed sẵn (tiktok hoặc instagram), gán qua innerHTML rồi tự tạo lại thẻ script
|
|
39
|
+
* tương ứng vì script nằm trong chuỗi HTML gán qua innerHTML sẽ không tự thực thi.
|
|
40
|
+
*/
|
|
41
|
+
receiveEmbedHtml(rawHtmlFromConfig: string, platform: EmbedPlatform): void;
|
|
23
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwVideoRepeat, never>;
|
|
24
43
|
static ɵcmp: i0.ɵɵComponentDeclaration<AtwVideoRepeat, "atw-video-repeat", never, { "device": "device"; "data": "data"; "type": "type"; "product": "product"; "index": "index"; }, {}, never, never>;
|
|
25
44
|
}
|
|
45
|
+
export {};
|
|
@@ -4,8 +4,10 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
4
4
|
import { LanguageService } from 'vhobjects-service/src/services';
|
|
5
5
|
import { FunctionService } from 'vhobjects-service/src/services';
|
|
6
6
|
import { Subscription } from 'rxjs';
|
|
7
|
+
import { HttpClient } from '@angular/common/http';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class AtwSendContact implements OnInit {
|
|
10
|
+
private http;
|
|
9
11
|
private vhQueryAutoWeb;
|
|
10
12
|
functionService: FunctionService;
|
|
11
13
|
private vhEventMediator;
|
|
@@ -31,7 +33,7 @@ export declare class AtwSendContact implements OnInit {
|
|
|
31
33
|
languageChangedSubscription: any;
|
|
32
34
|
observer: IntersectionObserver;
|
|
33
35
|
subscription: Subscription;
|
|
34
|
-
constructor(vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, vhEventMediator: VhEventMediator, languageService: LanguageService, matDialog: MatDialog, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
36
|
+
constructor(http: HttpClient, vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, vhEventMediator: VhEventMediator, languageService: LanguageService, matDialog: MatDialog, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
35
37
|
platformId: Object);
|
|
36
38
|
ngOnInit(): void;
|
|
37
39
|
ngAfterViewInit(): void;
|
|
@@ -50,6 +52,16 @@ export declare class AtwSendContact implements OnInit {
|
|
|
50
52
|
formatDate(date: string, type: string | 'dd/mm/yyyy' | 'mm/dd/yyyy' | 'yyyy/mm/dd'): string;
|
|
51
53
|
formatNumber(date: string): string;
|
|
52
54
|
handleClick(): void;
|
|
55
|
+
private checkParentIsFrameDetail;
|
|
56
|
+
/**
|
|
57
|
+
* Send new-contact notification to Zalo
|
|
58
|
+
*/
|
|
59
|
+
private sendZaloContactNotification;
|
|
60
|
+
private encryptToken;
|
|
61
|
+
/**
|
|
62
|
+
* Build message sent to Zalo
|
|
63
|
+
*/
|
|
64
|
+
private buildZaloContactMessage;
|
|
53
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwSendContact, never>;
|
|
54
66
|
static ɵcmp: i0.ɵɵComponentDeclaration<AtwSendContact, "atw-app-send-contact", never, { "product": "product"; "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
|
|
55
67
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { BookingFlowStyleMap } from '../booking-flow.models';
|
|
3
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AtwBookingFlowAddOns implements OnChanges {
|
|
6
|
+
functionService: FunctionService;
|
|
7
|
+
selectedRooms: any[];
|
|
8
|
+
addOns: any[];
|
|
9
|
+
data: any;
|
|
10
|
+
device: any;
|
|
11
|
+
formatCurrency: (value: number) => string;
|
|
12
|
+
back: EventEmitter<void>;
|
|
13
|
+
selectedAddOnsByRoom: {
|
|
14
|
+
[roomIndex: number]: string[];
|
|
15
|
+
};
|
|
16
|
+
selectedAddOnOptionsByRoom: {
|
|
17
|
+
[roomIndex: number]: {
|
|
18
|
+
[addOnId: string]: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
activeRoomIndex: number;
|
|
22
|
+
addOnToggled: EventEmitter<{
|
|
23
|
+
roomIndex: number;
|
|
24
|
+
addOnId: string;
|
|
25
|
+
selectedOption?: string;
|
|
26
|
+
}>;
|
|
27
|
+
addOnOptionSelected: EventEmitter<{
|
|
28
|
+
roomIndex: number;
|
|
29
|
+
addOnId: string;
|
|
30
|
+
optionId: string;
|
|
31
|
+
}>;
|
|
32
|
+
roomChanged: EventEmitter<number>;
|
|
33
|
+
class: BookingFlowStyleMap;
|
|
34
|
+
expandedRooms: Set<number>;
|
|
35
|
+
staticdata: any;
|
|
36
|
+
constructor(functionService: FunctionService);
|
|
37
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
38
|
+
expandAllRooms(): void;
|
|
39
|
+
toggleRoom(index: number): void;
|
|
40
|
+
isExpanded(index: number): boolean;
|
|
41
|
+
getRoomLabel(index: number): string;
|
|
42
|
+
getRoomInfo(room: any): string;
|
|
43
|
+
getAddOnImage(addOn: any): string;
|
|
44
|
+
getAddOnPrice(addOn: any): number;
|
|
45
|
+
getSelectedAddOnPrice(addOn: any, roomIndex: number): number;
|
|
46
|
+
toggleAddOn(addOn: any, roomIndex: number): void;
|
|
47
|
+
isAddOnSelected(addOn: any, roomIndex: number): boolean;
|
|
48
|
+
getAddOnsForRoom(room: any): any[];
|
|
49
|
+
hasAdvancedOptions(addOn: any): boolean;
|
|
50
|
+
getSelectedOption(addOn: any, roomIndex: number): string | null;
|
|
51
|
+
selectOption(addOn: any, roomIndex: number, optionId: string): void;
|
|
52
|
+
goBack(): void;
|
|
53
|
+
getAddOnCardStyle(isSelected: boolean): import("../booking-flow.models").BookingFlowStyleBucket;
|
|
54
|
+
trackByAddOnId(_: number, addOn: any): any;
|
|
55
|
+
trackByRoom(_: number, room: any): any;
|
|
56
|
+
private loadStyles;
|
|
57
|
+
getLocalizedText(obj: any, field?: string): string;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingFlowAddOns, never>;
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingFlowAddOns, "atw-booking-flow-add-ons", never, { "selectedRooms": "selectedRooms"; "addOns": "addOns"; "data": "data"; "device": "device"; "formatCurrency": "formatCurrency"; "selectedAddOnsByRoom": "selectedAddOnsByRoom"; "selectedAddOnOptionsByRoom": "selectedAddOnOptionsByRoom"; "activeRoomIndex": "activeRoomIndex"; }, { "back": "back"; "addOnToggled": "addOnToggled"; "addOnOptionSelected": "addOnOptionSelected"; "roomChanged": "roomChanged"; }, never, never>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Menu entries for the "expand config" side panel */
|
|
2
|
+
export declare const STYLES_FIELD: any[];
|
|
3
|
+
/** Translatable text fields for each step of the booking flow, grouped by section */
|
|
4
|
+
export declare const CONTENT_SECTIONS: any[];
|
|
5
|
+
export declare const BOOKING_FLOW_LINK_SLOTS: any[];
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export declare const BOOKING_FLOW_SAMPLE_DATA: {
|
|
2
|
+
hotelId: string;
|
|
3
|
+
arrivalDate: string;
|
|
4
|
+
lengthOfStay: number;
|
|
5
|
+
roomOccupancy: {
|
|
6
|
+
adults: number;
|
|
7
|
+
children: number;
|
|
8
|
+
}[];
|
|
9
|
+
hotelName: string;
|
|
10
|
+
rooms: {
|
|
11
|
+
_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
name_en: string;
|
|
14
|
+
hotelName: string;
|
|
15
|
+
description: string;
|
|
16
|
+
description_en: string;
|
|
17
|
+
webapp_description: string;
|
|
18
|
+
webapp_description_en: string;
|
|
19
|
+
imgs: string[];
|
|
20
|
+
max_guests: number;
|
|
21
|
+
area: string;
|
|
22
|
+
features: any[];
|
|
23
|
+
additional_facilities: string[];
|
|
24
|
+
service_rooms: {
|
|
25
|
+
service_id: string;
|
|
26
|
+
auto_add: boolean;
|
|
27
|
+
}[];
|
|
28
|
+
price: number;
|
|
29
|
+
price_tax_excl: number;
|
|
30
|
+
price_tax_incl: number;
|
|
31
|
+
room_unit_price: number;
|
|
32
|
+
room_total_tax_excl: number;
|
|
33
|
+
room_total_tax_incl: number;
|
|
34
|
+
room_total_tax: number;
|
|
35
|
+
total_convenience_fee: number;
|
|
36
|
+
total_convenience_fee_te: number;
|
|
37
|
+
total_convenience_fee_ti: number;
|
|
38
|
+
total_price: number;
|
|
39
|
+
total_price_tax_excl: number;
|
|
40
|
+
total_price_tax_incl: number;
|
|
41
|
+
total_price_tax: number;
|
|
42
|
+
availableCount: number;
|
|
43
|
+
availableRooms: {
|
|
44
|
+
_id: string;
|
|
45
|
+
room_number: string;
|
|
46
|
+
floor: number;
|
|
47
|
+
}[];
|
|
48
|
+
nightly_prices: {
|
|
49
|
+
room_total_tax_excl: number;
|
|
50
|
+
room_total_tax_incl: number;
|
|
51
|
+
total_tax_excl: number;
|
|
52
|
+
total_tax_incl: number;
|
|
53
|
+
applied_services: {
|
|
54
|
+
type: string;
|
|
55
|
+
service_id: string;
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
name_en: string;
|
|
59
|
+
price_tax_excl: number;
|
|
60
|
+
price_tax_incl: number;
|
|
61
|
+
price_display: string;
|
|
62
|
+
}[];
|
|
63
|
+
}[];
|
|
64
|
+
pricing_breakdown: {
|
|
65
|
+
room_total_tax_excl: number;
|
|
66
|
+
room_total_tax_incl: number;
|
|
67
|
+
room_total_tax: number;
|
|
68
|
+
extra_service_total_tax_excl: number;
|
|
69
|
+
extra_service_total_tax_incl: number;
|
|
70
|
+
extra_service_total_tax: number;
|
|
71
|
+
services_total_tax_excl: number;
|
|
72
|
+
services_total_tax_incl: number;
|
|
73
|
+
convenience_fee_total_tax_excl: number;
|
|
74
|
+
convenience_fee_total_tax_incl: number;
|
|
75
|
+
total_tax_excl: number;
|
|
76
|
+
total_tax_incl: number;
|
|
77
|
+
total_tax: number;
|
|
78
|
+
};
|
|
79
|
+
room_pricing_total_tax_excl: number;
|
|
80
|
+
room_pricing_total_tax_incl: number;
|
|
81
|
+
}[];
|
|
82
|
+
addOns: ({
|
|
83
|
+
_id: string;
|
|
84
|
+
id: string;
|
|
85
|
+
type: string;
|
|
86
|
+
name: string;
|
|
87
|
+
name_en: string;
|
|
88
|
+
imgs: string[];
|
|
89
|
+
image: string;
|
|
90
|
+
price: number;
|
|
91
|
+
active_adv_option: boolean;
|
|
92
|
+
adv_option: {
|
|
93
|
+
id_option: string;
|
|
94
|
+
name: string;
|
|
95
|
+
name_en: string;
|
|
96
|
+
price: number;
|
|
97
|
+
}[];
|
|
98
|
+
img?: undefined;
|
|
99
|
+
auto_add?: undefined;
|
|
100
|
+
} | {
|
|
101
|
+
_id: string;
|
|
102
|
+
id: string;
|
|
103
|
+
type: string;
|
|
104
|
+
name: string;
|
|
105
|
+
name_en: string;
|
|
106
|
+
img: string;
|
|
107
|
+
image: string;
|
|
108
|
+
price: number;
|
|
109
|
+
imgs?: undefined;
|
|
110
|
+
active_adv_option?: undefined;
|
|
111
|
+
adv_option?: undefined;
|
|
112
|
+
auto_add?: undefined;
|
|
113
|
+
} | {
|
|
114
|
+
_id: string;
|
|
115
|
+
id: string;
|
|
116
|
+
type: string;
|
|
117
|
+
name: string;
|
|
118
|
+
name_en: string;
|
|
119
|
+
img: string;
|
|
120
|
+
image: string;
|
|
121
|
+
price: number;
|
|
122
|
+
auto_add: boolean;
|
|
123
|
+
imgs?: undefined;
|
|
124
|
+
active_adv_option?: undefined;
|
|
125
|
+
adv_option?: undefined;
|
|
126
|
+
})[];
|
|
127
|
+
};
|
|
128
|
+
export declare function getSampleDepartureDate(arrival: string, nights: number): string;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { BookingStep } from './booking-flow.models';
|
|
4
|
+
import { NzMessageService } from 'ng-zorro-antd/message';
|
|
5
|
+
import { LanguageService } from 'vhobjects-service';
|
|
6
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
7
|
+
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
8
|
+
import { BookingFlowService } from './booking-flow.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare const BOOKING_TYPE: {
|
|
11
|
+
readonly ALLOTMENT_AUTO: 1;
|
|
12
|
+
readonly ALLOTMENT_MANUAL: 2;
|
|
13
|
+
};
|
|
14
|
+
export declare class AtwBookingFlow {
|
|
15
|
+
private bookingFlowService;
|
|
16
|
+
private nzMessageService;
|
|
17
|
+
private route;
|
|
18
|
+
private functionService;
|
|
19
|
+
private nzModalService;
|
|
20
|
+
private languageService;
|
|
21
|
+
private router;
|
|
22
|
+
data: any;
|
|
23
|
+
type: any;
|
|
24
|
+
device: any;
|
|
25
|
+
id_subproject: string;
|
|
26
|
+
hanldleProcessResizeOffset: EventEmitter<any>;
|
|
27
|
+
isComponentExist: ElementRef<HTMLDivElement>;
|
|
28
|
+
class: any;
|
|
29
|
+
cutWebMan: boolean;
|
|
30
|
+
config: any;
|
|
31
|
+
staticdata: any;
|
|
32
|
+
currentStep: BookingStep;
|
|
33
|
+
private static previewStepState;
|
|
34
|
+
arrivalDate: string;
|
|
35
|
+
departureDate: string;
|
|
36
|
+
lengthOfStay: number;
|
|
37
|
+
hotelId: string;
|
|
38
|
+
roomOccupancy: Array<{
|
|
39
|
+
adults: number;
|
|
40
|
+
children: number;
|
|
41
|
+
}>;
|
|
42
|
+
numberOfRoomsNeeded: number;
|
|
43
|
+
tripInfo: any;
|
|
44
|
+
rooms: any[];
|
|
45
|
+
addOns: any[];
|
|
46
|
+
paymentMethods: any[];
|
|
47
|
+
hasWalletAvailable: boolean;
|
|
48
|
+
selectedRooms: any[];
|
|
49
|
+
addOnTotal: number;
|
|
50
|
+
grandTotal: number;
|
|
51
|
+
selectedRoomIds: string[];
|
|
52
|
+
selectedAddOnsMap: {
|
|
53
|
+
[roomIndex: number]: string[];
|
|
54
|
+
};
|
|
55
|
+
selectedAddOnOptionsMap: {
|
|
56
|
+
[roomIndex: number]: {
|
|
57
|
+
[addOnId: string]: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
selectedPaymentMethodId: string;
|
|
61
|
+
guestInfo: any;
|
|
62
|
+
userCurrent: any;
|
|
63
|
+
currentEditingRoomIndex: number | null;
|
|
64
|
+
private lastParamsKey;
|
|
65
|
+
prevHeight: number | undefined;
|
|
66
|
+
get isPreviewMode(): boolean;
|
|
67
|
+
get isResizeMode(): boolean;
|
|
68
|
+
get sampleDataMode(): 'has_data' | 'no_data';
|
|
69
|
+
creatingOrder: boolean;
|
|
70
|
+
private resizeObserver;
|
|
71
|
+
private lastObservedSize;
|
|
72
|
+
private linkSlotIsDetailProduct;
|
|
73
|
+
private cachedHotelLink;
|
|
74
|
+
discountAmount: number;
|
|
75
|
+
appliedVoucherCode: string | null;
|
|
76
|
+
voucherError: string | null;
|
|
77
|
+
applyingVoucher: boolean;
|
|
78
|
+
appliedVoucherId: string | null;
|
|
79
|
+
constructor(bookingFlowService: BookingFlowService, nzMessageService: NzMessageService, route: ActivatedRoute, functionService: FunctionService, nzModalService: NzModalService, languageService: LanguageService, router: Router);
|
|
80
|
+
ngOnInit(): void;
|
|
81
|
+
ngAfterViewInit(): void;
|
|
82
|
+
ngOnDestroy(): void;
|
|
83
|
+
private loadWalletAvailability;
|
|
84
|
+
private loadSampleData;
|
|
85
|
+
private preselectSampleRoom;
|
|
86
|
+
parseQueryParams(params: any): Promise<void>;
|
|
87
|
+
updateTripInfo(): Promise<void>;
|
|
88
|
+
private getActiveRoomIndex;
|
|
89
|
+
private getActiveOccupancy;
|
|
90
|
+
loadAvailableRooms(): Promise<void>;
|
|
91
|
+
loadAddOns(): Promise<void>;
|
|
92
|
+
loadUserInfo(): void;
|
|
93
|
+
getHotelName(hotelId: string): Promise<string>;
|
|
94
|
+
getDetailObject(): void;
|
|
95
|
+
setStep(step: BookingStep): void;
|
|
96
|
+
nextStep(): void;
|
|
97
|
+
previousStep(): void;
|
|
98
|
+
private hasServiceStep;
|
|
99
|
+
addSelectedRoom(roomTypeId: string): Promise<void>;
|
|
100
|
+
removeSelectedRoom(index: number): Promise<void>;
|
|
101
|
+
toggleAddOn(event: {
|
|
102
|
+
roomIndex: number;
|
|
103
|
+
addOnId: string;
|
|
104
|
+
selectedOption?: string;
|
|
105
|
+
}): Promise<void>;
|
|
106
|
+
selectAddOnOption(event: {
|
|
107
|
+
roomIndex: number;
|
|
108
|
+
addOnId: string;
|
|
109
|
+
optionId: string;
|
|
110
|
+
}): Promise<void>;
|
|
111
|
+
selectPaymentMethod(methodId: string): void;
|
|
112
|
+
formatCurrency(value: number): string;
|
|
113
|
+
normalizeDateInput(value: any): string;
|
|
114
|
+
recalculateTotals(): Promise<void>;
|
|
115
|
+
getRemainingRooms(): number;
|
|
116
|
+
isAllRoomsSelected(): boolean;
|
|
117
|
+
editSelectedRoom(index: number): void;
|
|
118
|
+
getSelectedAddOnsByRoom(): {
|
|
119
|
+
[roomIndex: number]: any[];
|
|
120
|
+
};
|
|
121
|
+
getAddOnsForRoom(room: any): any[];
|
|
122
|
+
getSelectedAddOnOption(roomIndex: number, addOnId: string): string | null;
|
|
123
|
+
createOrderFromBookingFlow(): void;
|
|
124
|
+
private createPaymentForOrder;
|
|
125
|
+
private openBankTransferQr;
|
|
126
|
+
private getFacilityDisplayPrice;
|
|
127
|
+
private calculateRoomExtraServices;
|
|
128
|
+
private getSelectedFacilitiesForRoom;
|
|
129
|
+
private getSelectedServicesForRoom;
|
|
130
|
+
private buildSpecialRequests;
|
|
131
|
+
private formatDateKey;
|
|
132
|
+
private sanitizeSelectedAddOnsForRoom;
|
|
133
|
+
private reindexRoomMap;
|
|
134
|
+
private reindexOptionsMap;
|
|
135
|
+
private reindexRoomMapAfterRemove;
|
|
136
|
+
private reindexOptionsMapAfterRemove;
|
|
137
|
+
private resetBookingFlow;
|
|
138
|
+
private formatDateLocal;
|
|
139
|
+
private resolveLinkUrl;
|
|
140
|
+
private buildResumeQueryParams;
|
|
141
|
+
private preloadNavigationLinkData;
|
|
142
|
+
private getHotelLink;
|
|
143
|
+
/**
|
|
144
|
+
* After an order is created successfully, try to navigate to the page
|
|
145
|
+
* configured in the `link_after_create_order` slot. If no link is
|
|
146
|
+
* configured, fall back to the original behavior (reset + reload).
|
|
147
|
+
*/
|
|
148
|
+
private handlePostOrderNavigation;
|
|
149
|
+
/**
|
|
150
|
+
* Resolves the `link_after_create_order` slot and navigates to it.
|
|
151
|
+
* Passes the new orderId as a query param when available.
|
|
152
|
+
* Returns false if no link is configured (so caller can fallback).
|
|
153
|
+
*/
|
|
154
|
+
private navigateAfterOrder;
|
|
155
|
+
private navigateViaLink;
|
|
156
|
+
onApplyVoucher(code: string): Promise<void>;
|
|
157
|
+
onRemoveVoucher(): void;
|
|
158
|
+
private setupResizeObserver;
|
|
159
|
+
private handleResize;
|
|
160
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingFlow, never>;
|
|
161
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingFlow, "atw-booking-flow", never, { "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
|
|
162
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare type BookingStep = 'choose-room' | 'select-service-add-on' | 'payment';
|
|
2
|
+
export declare type BookingFlowStyleBucket = Record<string, string>;
|
|
3
|
+
export declare type BookingFlowStyleMap = Record<string, BookingFlowStyleBucket>;
|
|
4
|
+
export declare function getBookingFlowDeviceClass(data: any, device: string): BookingFlowStyleMap;
|
|
5
|
+
export declare function pickBookingFlowStyles(data: any, device: string, keys: string[]): BookingFlowStyleMap;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./booking-flow.component";
|
|
3
|
+
import * as i2 from "./choose-room/booking-flow-choose-room.component";
|
|
4
|
+
import * as i3 from "./add-ons/booking-flow-add-ons.component";
|
|
5
|
+
import * as i4 from "./payment/booking-flow-payment.component";
|
|
6
|
+
import * as i5 from "./summary/booking-flow-summary.component";
|
|
7
|
+
import * as i6 from "@angular/common";
|
|
8
|
+
import * as i7 from "vhobjects-service";
|
|
9
|
+
import * as i8 from "@angular/router";
|
|
10
|
+
import * as i9 from "@angular/forms";
|
|
11
|
+
import * as i10 from "@ngx-translate/core";
|
|
12
|
+
export declare class BookingFlowModule {
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BookingFlowModule, never>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BookingFlowModule, [typeof i1.AtwBookingFlow, typeof i2.AtwBookingFlowChooseRoom, typeof i3.AtwBookingFlowAddOns, typeof i4.AtwBookingFlowPayment, typeof i5.AtwBookingFlowSummary], [typeof i6.CommonModule, typeof i7.MaterialModule, typeof i7.NgZorroAntModule, typeof i8.RouterModule, typeof i9.FormsModule, typeof i9.ReactiveFormsModule, typeof i10.TranslateModule, typeof i7.VhLanguagePipeModule], never>;
|
|
15
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BookingFlowModule>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { VhQueryAutoWeb } from 'vhautowebdb';
|
|
3
|
+
import { FunctionService, LanguageService } from 'vhobjects-service/src/services';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class BookingFlowService {
|
|
6
|
+
private vhQueryAutoWeb;
|
|
7
|
+
private languageService;
|
|
8
|
+
private functionService;
|
|
9
|
+
private paymentMethods;
|
|
10
|
+
constructor(vhQueryAutoWeb: VhQueryAutoWeb, languageService: LanguageService, functionService: FunctionService);
|
|
11
|
+
admin_getWallets_byFields_byPages(fields?: any, options?: any, pages?: any): Promise<any>;
|
|
12
|
+
getlocalEndUser(): any;
|
|
13
|
+
getPage_byLink(url: string): Promise<any>;
|
|
14
|
+
updateBill(id: string, updates: any): Promise<any>;
|
|
15
|
+
localStorageGET(key: string): any;
|
|
16
|
+
getHotel(hotelId: string): Promise<any>;
|
|
17
|
+
formatDate(date: string | Date): string;
|
|
18
|
+
getAvailableRooms(hotelId: string, roomTypeId: string, dateFrom: string, dateTo: string, adults?: number, children?: number): Observable<any[]>;
|
|
19
|
+
createOrder(formData: any): Observable<any>;
|
|
20
|
+
private applyVoucherToOrderObject;
|
|
21
|
+
addOrderHistory(idBill: string, stateId: number, metadata?: {
|
|
22
|
+
title?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
}): Observable<any>;
|
|
25
|
+
getCartRuleByCode(code: string): Promise<any | null>;
|
|
26
|
+
calculateDiscountAmount(rule: any, baseAmount: number): number;
|
|
27
|
+
determineDiscountType(rule: Pick<any, 'rule_type' | 'discount_value'>): 'PERCENTAGE' | 'FIXED';
|
|
28
|
+
addPayment(idBill: string, paymentData: Partial<any>): Observable<any>;
|
|
29
|
+
getPaymentMethodLabel(paymentMethodId: string): string;
|
|
30
|
+
getRoomTypesArray(): Promise<any[]>;
|
|
31
|
+
getServiceRoomsArray(): Promise<any[]>;
|
|
32
|
+
getAdditionalFacilitiesArray(): Promise<any[]>;
|
|
33
|
+
calculateRoomPricing(roomType: any, dateFrom: string, dateTo: string, customerGroups?: string[], pricingContext?: any): Promise<any>;
|
|
34
|
+
calculateUnitPrice(pricing: any | null | undefined): number;
|
|
35
|
+
private createEmptyPricing;
|
|
36
|
+
getRoomsArray(): Promise<any[]>;
|
|
37
|
+
private getBookingDetailsArray;
|
|
38
|
+
private getBillDetailsByFields;
|
|
39
|
+
private isBookingRemovedFromOrderTotals;
|
|
40
|
+
private buildCartItems;
|
|
41
|
+
getRoomById(id: string): Promise<any | null>;
|
|
42
|
+
private calculateConvenienceFee;
|
|
43
|
+
getRoomTypeById(id: string): Promise<any | null>;
|
|
44
|
+
private buildBookingDetails;
|
|
45
|
+
private calculateCartItemTotal;
|
|
46
|
+
isRoomAvailable(roomId: string, dateFrom: string, dateTo: string, excludeBookingId?: string): Promise<boolean>;
|
|
47
|
+
private applyBookingSummary;
|
|
48
|
+
private getOrderBaseAmount;
|
|
49
|
+
getCartRuleById(ruleId: string): Promise<any | null>;
|
|
50
|
+
incrementUsage(ruleId: string): Promise<void>;
|
|
51
|
+
private addTax;
|
|
52
|
+
private removeTax;
|
|
53
|
+
private roundPrice;
|
|
54
|
+
private calculateSpecificPrice;
|
|
55
|
+
private findBestSpecificPrice;
|
|
56
|
+
private dateWeight;
|
|
57
|
+
private getSpecificScore;
|
|
58
|
+
private isLeaveBasePrice;
|
|
59
|
+
private isPercentageReduction;
|
|
60
|
+
private isPercentageImpact;
|
|
61
|
+
private applyFeatureImpact;
|
|
62
|
+
private normalizedPercentage;
|
|
63
|
+
private matchesDate;
|
|
64
|
+
private matchesScope;
|
|
65
|
+
private matchesScopedValue;
|
|
66
|
+
getBestFeatureRuleForDate(roomTypeId: string, date: Date, customerGroups?: string[], context?: {
|
|
67
|
+
id_cart?: string | number;
|
|
68
|
+
id_guest?: string | number;
|
|
69
|
+
id_room?: string | number;
|
|
70
|
+
}): Promise<any | null>;
|
|
71
|
+
private getActiveRulesByRoomType;
|
|
72
|
+
private getFeatureRuleKind;
|
|
73
|
+
private matchesFeatureRuleScope;
|
|
74
|
+
private matchesFeatureRuleGroups;
|
|
75
|
+
private matchesRuleField;
|
|
76
|
+
private isRuleApplicableForDate;
|
|
77
|
+
private isRestrictionApplicableForDate;
|
|
78
|
+
private getDayOfWeek;
|
|
79
|
+
calculateExtraServicesPricing(selectedFacilities: any[], selectedServices: any[], dateFrom: string, dateTo: string): Promise<any>;
|
|
80
|
+
calculateServiceRoomTotals(serviceLinks: any[], dateFrom: string, dateTo: string): Promise<{
|
|
81
|
+
room_service_total_tax_excl: number;
|
|
82
|
+
room_service_total_tax_incl: number;
|
|
83
|
+
convenience_fee_total_tax_excl: number;
|
|
84
|
+
convenience_fee_total_tax_incl: number;
|
|
85
|
+
applied_services: any[];
|
|
86
|
+
nightly_breakdown: Array<{
|
|
87
|
+
date: string;
|
|
88
|
+
room_service_tax_excl: number;
|
|
89
|
+
room_service_tax_incl: number;
|
|
90
|
+
convenience_fee_tax_excl: number;
|
|
91
|
+
convenience_fee_tax_incl: number;
|
|
92
|
+
applied_services: any[];
|
|
93
|
+
}>;
|
|
94
|
+
}>;
|
|
95
|
+
private findApplicableServiceSpecialPrice;
|
|
96
|
+
private applyServiceSpecialPrice;
|
|
97
|
+
getServiceById(id: string): Promise<any | null>;
|
|
98
|
+
calculateServicePrice(service: any, date: Date | string): {
|
|
99
|
+
price_excl: number;
|
|
100
|
+
tax: number;
|
|
101
|
+
price_incl: number;
|
|
102
|
+
applied_special?: any;
|
|
103
|
+
};
|
|
104
|
+
calculateNights(dateFrom: string | Date, dateTo: string | Date): number;
|
|
105
|
+
getLocalizedText(obj: any, field?: string): string;
|
|
106
|
+
getStayDates(dateFrom: string | Date, dateTo: string | Date): string[];
|
|
107
|
+
formatDateKey(date: Date): string;
|
|
108
|
+
toDateOnly(value: string | Date | undefined | null): string;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BookingFlowService, never>;
|
|
110
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BookingFlowService>;
|
|
111
|
+
}
|