vhobjects-user 1.0.4 → 1.0.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.
- package/fesm2015/vhobjects-user.js +1 -1
- package/fesm2015/vhobjects-user.js.map +1 -1
- package/lib/frames/frame-blank/user/frame-blank/frame-blank.component.d.ts +14 -6
- package/lib/frames/frame-repeat/user/frame-repeat/frame-repeat.component.d.ts +7 -1
- package/lib/objects/basic/media-list/user/media-list/media-list.component.d.ts +94 -0
- package/lib/objects/basic/text/user/text/text.component.d.ts +4 -2
- package/lib/objects/cart/button-confirm-order/user/button-confirm-order/button-confirm-order.component.d.ts +1 -1
- package/lib/objects/cart/noti-order-success/user/noti-order-success/noti-order-success.component.d.ts +66 -0
- 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/payment-method/user/payment-method.component.d.ts +42 -0
- package/lib/objects/review/user/review/review.component.d.ts +55 -6
- package/lib/vhautoweb-objects.module.d.ts +35 -28
- package/package.json +1 -1
- package/public-api.d.ts +7 -0
- package/services/cart.service.d.ts +12 -1
|
@@ -6,12 +6,13 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export declare class AtwFrameBlank {
|
|
7
7
|
private vhQueryAutoWeb;
|
|
8
8
|
pipeFrameService: PipeFrameService;
|
|
9
|
-
|
|
9
|
+
functionService: FunctionService;
|
|
10
10
|
private element;
|
|
11
11
|
private renderer;
|
|
12
12
|
private changeDetectorRef;
|
|
13
13
|
private platformId;
|
|
14
14
|
private doc;
|
|
15
|
+
private elementRef;
|
|
15
16
|
keySearch: any;
|
|
16
17
|
product?: any;
|
|
17
18
|
category?: any;
|
|
@@ -67,13 +68,16 @@ export declare class AtwFrameBlank {
|
|
|
67
68
|
private unlisten;
|
|
68
69
|
marginData: any;
|
|
69
70
|
blocks_array: Array<any>;
|
|
70
|
-
private deltaHeightForChangeProduct;
|
|
71
71
|
private updateUISubs;
|
|
72
|
-
private
|
|
73
|
-
private
|
|
74
|
-
private
|
|
72
|
+
private touchListenersMap;
|
|
73
|
+
private activeTouchItem;
|
|
74
|
+
private touchStartX;
|
|
75
|
+
private touchStartY;
|
|
76
|
+
private readonly MOVE_THRESHOLD;
|
|
77
|
+
private docTouchEndHandler;
|
|
78
|
+
private docTouchCancelHandler;
|
|
75
79
|
constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
76
|
-
renderer: Renderer2, changeDetectorRef: ChangeDetectorRef, platformId: Object, doc: Document);
|
|
80
|
+
renderer: Renderer2, changeDetectorRef: ChangeDetectorRef, platformId: Object, doc: Document, elementRef: ElementRef<HTMLElement>);
|
|
77
81
|
outputs: {
|
|
78
82
|
showToolBarObject: (event: any) => void;
|
|
79
83
|
hanldleProcessResizeOffset: (event: any) => void;
|
|
@@ -128,6 +132,10 @@ export declare class AtwFrameBlank {
|
|
|
128
132
|
* - Tối ưu LCP trong SEO
|
|
129
133
|
*/
|
|
130
134
|
private addPreload;
|
|
135
|
+
private isTouchDevice;
|
|
136
|
+
private clearActiveTouch;
|
|
137
|
+
private initTouchEffect;
|
|
138
|
+
private removeTouchEffect;
|
|
131
139
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameBlank, never>;
|
|
132
140
|
static ɵcmp: i0.ɵɵComponentDeclaration<AtwFrameBlank, "atw-frame-blank", never, { "keySearch": "keySearch"; "product": "product"; "category": "category"; "itemActiveSpecialFrame": "itemActiveSpecialFrame"; "resolution": "resolution"; "data": "data"; "id_subproject": "id_subproject"; "isCalculateDeltaHeight": "isCalculateDeltaHeight"; "type": "type"; "objectChoosing": "objectChoosing"; "device": "device"; "blockChoosing": "blockChoosing"; "frameChoosing": "frameChoosing"; "independentDesign": "independentDesign"; "isPressingShift": "isPressingShift"; "isClone": "isClone"; "array_object_selected": "array_object_selected"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; "showToolBarObject": "showToolBarObject"; }, never, never>;
|
|
133
141
|
}
|
|
@@ -84,6 +84,8 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
84
84
|
hanldleProcessResizeOffset: EventEmitter<any>;
|
|
85
85
|
isComponentExist: ElementRef<HTMLDivElement>;
|
|
86
86
|
isItemVisible: boolean;
|
|
87
|
+
searchValue: string;
|
|
88
|
+
private searchDebounce;
|
|
87
89
|
constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
88
90
|
vhEventMediator: VhEventMediator, vhAlgorithm: VhAlgorithm, platformId: Object, router: Router, languageService: LanguageService);
|
|
89
91
|
ngOnInit(): void;
|
|
@@ -91,7 +93,8 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
91
93
|
showToolBarObject: (event: any) => void;
|
|
92
94
|
};
|
|
93
95
|
ngOnChange(): void;
|
|
94
|
-
getDetailObject(): void
|
|
96
|
+
getDetailObject(): Promise<void>;
|
|
97
|
+
private fetchDataList;
|
|
95
98
|
private setHeight;
|
|
96
99
|
private checkResizeOffset;
|
|
97
100
|
/** Hàm này trả về một chuỗi để chia layout cho grid
|
|
@@ -109,6 +112,8 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
109
112
|
private get getWidthItem();
|
|
110
113
|
private get getHeightItem();
|
|
111
114
|
processData(products?: any[]): void;
|
|
115
|
+
onSearchChange(value: string): void;
|
|
116
|
+
private applySearch;
|
|
112
117
|
handleGetDataToSlide(): void;
|
|
113
118
|
handleNext(): void;
|
|
114
119
|
handlePrev(): void;
|
|
@@ -168,6 +173,7 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
168
173
|
* 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
|
|
169
174
|
*/
|
|
170
175
|
pageUrl(page: number): string;
|
|
176
|
+
private migrateStaticDataToBasics;
|
|
171
177
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameRepeat, never>;
|
|
172
178
|
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>;
|
|
173
179
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
|
+
import { NzImageService } from 'ng-zorro-antd/image';
|
|
4
|
+
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
5
|
+
import { VhEventMediator } from 'vhautowebdb';
|
|
6
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class AtwMediaList implements OnInit {
|
|
9
|
+
functionService: FunctionService;
|
|
10
|
+
private platformId;
|
|
11
|
+
private nzImageService;
|
|
12
|
+
private nzModalService;
|
|
13
|
+
private sanitizer;
|
|
14
|
+
private vhEventMediator;
|
|
15
|
+
data: any;
|
|
16
|
+
type: any;
|
|
17
|
+
device: any;
|
|
18
|
+
id_subproject: any;
|
|
19
|
+
hanldleProcessResizeOffset: EventEmitter<any>;
|
|
20
|
+
isComponentExist: ElementRef<HTMLDivElement>;
|
|
21
|
+
videoModalTpl: TemplateRef<any>;
|
|
22
|
+
prevHeight: any;
|
|
23
|
+
staticdata: any;
|
|
24
|
+
cutWebMan: boolean;
|
|
25
|
+
class: any;
|
|
26
|
+
config: any;
|
|
27
|
+
/** Subscription để theo dõi sự kiện */
|
|
28
|
+
private subscription;
|
|
29
|
+
/** Danh sách hình ảnh/video youtube */
|
|
30
|
+
mediaList: {
|
|
31
|
+
src: string;
|
|
32
|
+
alt?: string;
|
|
33
|
+
video_id?: string;
|
|
34
|
+
}[];
|
|
35
|
+
/** Trang hiện tại */
|
|
36
|
+
currentPage: number;
|
|
37
|
+
/** State cho modal video */
|
|
38
|
+
private videoModalRef;
|
|
39
|
+
/** video đang được chọn */
|
|
40
|
+
currentVideoIndex: number;
|
|
41
|
+
safeVideoUrl: SafeResourceUrl | null;
|
|
42
|
+
/** Danh sách đã cắt sẵn theo từng trang: medias2D[0] = trang 1, medias2D[1] = trang 2... */
|
|
43
|
+
medias2D: {
|
|
44
|
+
src: string;
|
|
45
|
+
alt?: string;
|
|
46
|
+
video_id?: string;
|
|
47
|
+
}[][];
|
|
48
|
+
constructor(functionService: FunctionService, platformId: Object, nzImageService: NzImageService, nzModalService: NzModalService, sanitizer: DomSanitizer, vhEventMediator: VhEventMediator);
|
|
49
|
+
ngOnInit(): void;
|
|
50
|
+
ngAfterViewInit(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Khởi tạo và gán giá trị cho các đối tượng dữ liệu, cấu hình và giỏ hàng
|
|
53
|
+
* dựa trên trạng thái thiết bị, cờ cutWebMan và loại component hiện tại.
|
|
54
|
+
*/
|
|
55
|
+
getDetailObject(): void;
|
|
56
|
+
private progressData;
|
|
57
|
+
private buildMedias2D;
|
|
58
|
+
get pageSize(): number;
|
|
59
|
+
get totalPages(): number;
|
|
60
|
+
get pages(): number[];
|
|
61
|
+
get pagedList(): {
|
|
62
|
+
src: string;
|
|
63
|
+
alt?: string;
|
|
64
|
+
video_id?: string;
|
|
65
|
+
}[];
|
|
66
|
+
goToPage(page: number): void;
|
|
67
|
+
handleClickItem(event: any, index: any): void;
|
|
68
|
+
private previewImage;
|
|
69
|
+
private downloadCurrentImage;
|
|
70
|
+
private previewVideo;
|
|
71
|
+
private updateSafeVideoUrl;
|
|
72
|
+
/**
|
|
73
|
+
* Ưu tiên dùng thẳng video_id do admin đã xử lý sẵn.
|
|
74
|
+
* Fallback: nếu lỡ vẫn còn nguyên URL (data cũ / nhập tay), tự bóc ID ra.
|
|
75
|
+
*/
|
|
76
|
+
private resolveYoutubeId;
|
|
77
|
+
hasPrevVideo(): boolean;
|
|
78
|
+
hasNextVideo(): boolean;
|
|
79
|
+
prevVideo(): void;
|
|
80
|
+
nextVideo(): void;
|
|
81
|
+
closeVideoModal(): void;
|
|
82
|
+
getVideoThumbnail(item: {
|
|
83
|
+
src: string;
|
|
84
|
+
video_id?: string;
|
|
85
|
+
}): string;
|
|
86
|
+
/**
|
|
87
|
+
* Hàm trackBy giúp Angular tối ưu hóa việc render danh sách,
|
|
88
|
+
* định danh item dựa vào thuộc tính `field` hoặc `_id`.
|
|
89
|
+
*/
|
|
90
|
+
trackByMediaItem(index: number, item: any): any;
|
|
91
|
+
ngOnDestroy(): void;
|
|
92
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwMediaList, never>;
|
|
93
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwMediaList, "atw-media-list", never, { "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
|
|
94
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
3
|
import { VhQueryAutoWeb, VhEventMediator, VhAlgorithm } from 'vhautowebdb';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
4
5
|
import { FunctionService } from 'vhobjects-service/src/services';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class AtwText implements OnInit {
|
|
@@ -45,11 +46,12 @@ export declare class AtwText implements OnInit {
|
|
|
45
46
|
}[];
|
|
46
47
|
currentAnimateChangeTextIndex: number;
|
|
47
48
|
animateChangeTextInterval: any;
|
|
49
|
+
isParentHover$: Observable<boolean>;
|
|
48
50
|
constructor(router: Router, vhQueryAutoWeb: VhQueryAutoWeb, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
49
51
|
vhAlgorithm: VhAlgorithm, functionService: FunctionService, vhEventMediator: VhEventMediator, platformId: Object);
|
|
50
52
|
ngOnInit(): void;
|
|
51
53
|
private getDetailObject;
|
|
52
|
-
ngOnChanges(): void;
|
|
54
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
53
55
|
ngOnDestroy(): void;
|
|
54
56
|
ngAfterViewInit(): void;
|
|
55
57
|
ngAfterViewChecked(): void;
|
|
@@ -46,7 +46,7 @@ export declare class AtwButtonConfirmOrder implements OnInit {
|
|
|
46
46
|
/**
|
|
47
47
|
* Điều hướng tới link hoặc hyper_link khi có.
|
|
48
48
|
*/
|
|
49
|
-
navigate(
|
|
49
|
+
navigate(): void;
|
|
50
50
|
/**
|
|
51
51
|
* Hàm chờ khối xuất hiện và cuộn đến
|
|
52
52
|
*/
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { VhEventMediator, VhQueryAutoWeb } from 'vhautowebdb';
|
|
3
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AtwNotiOrderSuccess implements OnInit {
|
|
6
|
+
functionService: FunctionService;
|
|
7
|
+
private platformId;
|
|
8
|
+
private vhEventMediator;
|
|
9
|
+
private vhQueryAutoWeb;
|
|
10
|
+
data: any;
|
|
11
|
+
type: any;
|
|
12
|
+
device: any;
|
|
13
|
+
id_subproject: any;
|
|
14
|
+
hanldleProcessResizeOffset: EventEmitter<any>;
|
|
15
|
+
isComponentExist: ElementRef<HTMLDivElement>;
|
|
16
|
+
prevHeight: any;
|
|
17
|
+
staticdata: any;
|
|
18
|
+
cutWebMan: boolean;
|
|
19
|
+
class: any;
|
|
20
|
+
config: any;
|
|
21
|
+
/** Subscription để theo dõi sự kiện */
|
|
22
|
+
private subscription;
|
|
23
|
+
/** Getter tự động map object thành mảng để hiển thị */
|
|
24
|
+
orderInfoList: {
|
|
25
|
+
defaultLabel: string;
|
|
26
|
+
field: string;
|
|
27
|
+
defaultValue: string;
|
|
28
|
+
}[];
|
|
29
|
+
cart: any;
|
|
30
|
+
constructor(functionService: FunctionService, platformId: Object, vhEventMediator: VhEventMediator, vhQueryAutoWeb: VhQueryAutoWeb);
|
|
31
|
+
ngOnInit(): void;
|
|
32
|
+
ngAfterViewInit(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Khởi tạo và gán giá trị cho các đối tượng dữ liệu, cấu hình và giỏ hàng
|
|
35
|
+
* dựa trên trạng thái thiết bị, cờ cutWebMan và loại component hiện tại.
|
|
36
|
+
*/
|
|
37
|
+
getDetailObject(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Định dạng một số thành chuỗi có dấu chấm phân cách hàng nghìn.
|
|
40
|
+
* @param price - Giá tiền dạng số cần định dạng
|
|
41
|
+
* @returns Chuỗi giá tiền đã được format (VD: '2.275.000') hoặc '0' nếu không hợp lệ
|
|
42
|
+
*/
|
|
43
|
+
formatNumber(price: number): string;
|
|
44
|
+
/**
|
|
45
|
+
* Chuyển đổi chuỗi ngày tháng thành định dạng chuẩn `HH:mm | DD.MM.YYYY`.
|
|
46
|
+
* @param input - Đối tượng chứa chuỗi ngày tháng đầu vào
|
|
47
|
+
* @returns Chuỗi thời gian đã định dạng
|
|
48
|
+
*/
|
|
49
|
+
private formatDateTime;
|
|
50
|
+
/**
|
|
51
|
+
* Xử lý dữ liệu hóa đơn và danh sách chi tiết để ánh xạ vào cấu trúc giỏ hàng (`this.cart`),
|
|
52
|
+
* bao gồm thông tin chung của đơn hàng và danh sách sản phẩm theo đa ngôn ngữ.
|
|
53
|
+
* @param bill - Đối tượng thông tin hóa đơn/đơn hàng
|
|
54
|
+
* @param details - Mảng chứa danh sách sản phẩm chi tiết của đơn hàng
|
|
55
|
+
*/
|
|
56
|
+
private progressData;
|
|
57
|
+
/**
|
|
58
|
+
* Hàm trackBy giúp Angular tối ưu hóa việc render danh sách,
|
|
59
|
+
* định danh item dựa vào thuộc tính `field` hoặc `_id`.
|
|
60
|
+
*/
|
|
61
|
+
trackByOrderInfoList(index: number, item: any): any;
|
|
62
|
+
trackByProductItem(index: number, item: any): any;
|
|
63
|
+
ngOnDestroy(): void;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwNotiOrderSuccess, never>;
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwNotiOrderSuccess, "atw-noti-order-success", never, { "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
|
|
66
|
+
}
|
|
@@ -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
|
+
}
|