vhobjects-user 1.0.4 → 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.
Files changed (28) hide show
  1. package/fesm2015/vhobjects-user.js +1 -1
  2. package/fesm2015/vhobjects-user.js.map +1 -1
  3. package/lib/frames/frame-repeat/user/frame-repeat/frame-repeat.component.d.ts +2 -1
  4. package/lib/objects/form/button-send-contact/user/send-contact/send-contact.component.d.ts +13 -1
  5. package/lib/objects/hotel/booking-flow/user/add-ons/booking-flow-add-ons.component.d.ts +60 -0
  6. package/lib/objects/hotel/booking-flow/user/booking-flow-content.constants.d.ts +5 -0
  7. package/lib/objects/hotel/booking-flow/user/booking-flow-sample-data.d.ts +128 -0
  8. package/lib/objects/hotel/booking-flow/user/booking-flow.component.d.ts +162 -0
  9. package/lib/objects/hotel/booking-flow/user/booking-flow.models.d.ts +5 -0
  10. package/lib/objects/hotel/booking-flow/user/booking-flow.module.d.ts +16 -0
  11. package/lib/objects/hotel/booking-flow/user/booking-flow.service.d.ts +111 -0
  12. package/lib/objects/hotel/booking-flow/user/choose-room/booking-flow-choose-room.component.d.ts +87 -0
  13. package/lib/objects/hotel/booking-flow/user/payment/booking-flow-payment.component.d.ts +42 -0
  14. package/lib/objects/hotel/booking-flow/user/summary/booking-flow-summary.component.d.ts +76 -0
  15. package/lib/objects/hotel/booking-hotel-manage/user/booking-detail/booking-hotel-manage-booking-detail.component.d.ts +65 -0
  16. package/lib/objects/hotel/booking-hotel-manage/user/booking-hotel-manage.component.d.ts +66 -0
  17. package/lib/objects/hotel/booking-hotel-manage/user/booking-hotel-manage.module.d.ts +17 -0
  18. package/lib/objects/hotel/booking-hotel-manage/user/bookings/booking-hotel-manage-bookings.component.d.ts +39 -0
  19. package/lib/objects/hotel/booking-hotel-manage/user/personal/booking-hotel-manage-personal.component.d.ts +44 -0
  20. package/lib/objects/hotel/booking-hotel-manage/user/refund-detail/booking-hotel-manage-refund-detail.component.d.ts +16 -0
  21. package/lib/objects/hotel/booking-hotel-manage/user/refund-requests/booking-hotel-manage-refund-requests.component.d.ts +17 -0
  22. package/lib/objects/hotel/booking-selector/user/booking-selector.component.d.ts +80 -0
  23. package/lib/objects/hotel/btn-booking/user/btn-booking.component.d.ts +78 -0
  24. package/lib/objects/review/user/review/review.component.d.ts +55 -6
  25. package/lib/vhautoweb-objects.module.d.ts +32 -28
  26. package/package.json +1 -1
  27. package/public-api.d.ts +4 -0
  28. package/services/cart.service.d.ts +12 -1
@@ -0,0 +1,76 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { BookingFlowStyleMap, BookingStep } from '../booking-flow.models';
3
+ import { FunctionService } from 'vhobjects-service/src/services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AtwBookingFlowSummary implements OnChanges {
6
+ functionService: FunctionService;
7
+ currentStep: BookingStep;
8
+ tripInfo: any;
9
+ data: any;
10
+ device: any;
11
+ selectedRooms: any[];
12
+ selectedAddOnsMap: {
13
+ [roomIndex: number]: string[];
14
+ };
15
+ selectedAddOnOptionsByRoom: {
16
+ [roomIndex: number]: {
17
+ [addOnId: string]: string;
18
+ };
19
+ };
20
+ addOns: any[];
21
+ grandTotal: number;
22
+ formatCurrency: (value: number) => string;
23
+ discountAmount: number;
24
+ appliedVoucherCode: string | null;
25
+ voucherError: string | null;
26
+ applyingVoucher: boolean;
27
+ applyVoucher: EventEmitter<string>;
28
+ removeVoucher: EventEmitter<void>;
29
+ stepChange: EventEmitter<BookingStep>;
30
+ next: EventEmitter<void>;
31
+ editRoom: EventEmitter<any>;
32
+ class: BookingFlowStyleMap;
33
+ staticdata: any;
34
+ constructor(functionService: FunctionService);
35
+ ngOnInit(): void;
36
+ ngOnChanges(_: SimpleChanges): void;
37
+ trackByAddOnId(_: number, addOn: any): string;
38
+ trackBySelectedRoom(_: number, room: any): string;
39
+ getRoomsTotalPrice(): number;
40
+ getAddOnPrice(addOn: any): number;
41
+ getAddOnPriceTaxExcl(addOn: any): number;
42
+ getAutoServicePrice(service: any): number;
43
+ getAutoServicePriceTaxExcl(service: any): number;
44
+ getRoomLabel(index: number): string;
45
+ getRoomTypeName(room: any): string;
46
+ getAddOnsByRoom(roomIndex: number): any[];
47
+ getRoomAddOnTotal(roomIndex: number): number;
48
+ getRoomBaseTotal(room: any): number;
49
+ getRoomBaseTotalTaxExcl(room: any): number;
50
+ getRoomBaseTax(room: any): number;
51
+ getRoomTotal(room: any): number;
52
+ getRoomTotalTaxExcl(room: any): number;
53
+ getRoomTotalTax(room: any): number;
54
+ getGrandTotalTaxExcl(): number;
55
+ getGrandTotalTax(): number;
56
+ getGrandTotalTaxIncl(): number;
57
+ getAddOnDisplayName(addOn: any): string;
58
+ getAutoServiceDisplayName(service: any): string;
59
+ getAutoServicesByRoom(room: any): any[];
60
+ hasRoomPriceDetails(room: any, roomIndex: number): boolean;
61
+ getOccupancyText(room: any): string;
62
+ private withSelectedOptionLabel;
63
+ private getFallbackAddOnPrice;
64
+ private getRoomAddOnsTaxExcl;
65
+ private getRoomAddOnsTaxIncl;
66
+ private roundPrice;
67
+ private firstPositivePrice;
68
+ private parsePrice;
69
+ private loadStyles;
70
+ private getLocalizedText;
71
+ voucherInputValue: string;
72
+ onApplyVoucher(): void;
73
+ onRemoveVoucher(): void;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingFlowSummary, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingFlowSummary, "atw-booking-flow-summary", never, { "currentStep": "currentStep"; "tripInfo": "tripInfo"; "data": "data"; "device": "device"; "selectedRooms": "selectedRooms"; "selectedAddOnsMap": "selectedAddOnsMap"; "selectedAddOnOptionsByRoom": "selectedAddOnOptionsByRoom"; "addOns": "addOns"; "grandTotal": "grandTotal"; "formatCurrency": "formatCurrency"; "discountAmount": "discountAmount"; "appliedVoucherCode": "appliedVoucherCode"; "voucherError": "voucherError"; "applyingVoucher": "applyingVoucher"; }, { "applyVoucher": "applyVoucher"; "removeVoucher": "removeVoucher"; "stepChange": "stepChange"; "next": "next"; "editRoom": "editRoom"; }, never, never>;
76
+ }
@@ -0,0 +1,65 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { VhQueryAutoWeb } from 'vhautowebdb';
3
+ import { LanguageService } from 'vhobjects-service/src/services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AtwBookingHotelManageBookingDetail implements OnInit {
6
+ private vhQueryAutoWeb;
7
+ private languageService;
8
+ selectedBooking: any;
9
+ staticdata: any;
10
+ functionService: any;
11
+ data: any;
12
+ classStyles: any;
13
+ type: any;
14
+ back: EventEmitter<void>;
15
+ cancellationSubmitted: EventEmitter<any>;
16
+ currentHotel: any;
17
+ hotelLoading: boolean;
18
+ hotelError: string | null;
19
+ showCancelRequest: boolean;
20
+ cancelReason: string;
21
+ selectedRoomIds: string[];
22
+ cancelSubmitting: boolean;
23
+ cancelError: string | null;
24
+ cancelSuccess: string | null;
25
+ private orderStatuses;
26
+ roomStatuses: {
27
+ id: string;
28
+ name: string;
29
+ label: string;
30
+ }[];
31
+ private paymentMethods;
32
+ constructor(vhQueryAutoWeb: VhQueryAutoWeb, languageService: LanguageService);
33
+ ngOnInit(): void;
34
+ loadHotel(): void;
35
+ private getSampleHotel;
36
+ getHotelName(): string;
37
+ formatPrice(price: number): string;
38
+ getStatusClass(status: any): string;
39
+ goBack(): void;
40
+ toggleCancelRequest(): void;
41
+ toggleRoomSelection(roomId: string, checked: boolean): void;
42
+ canCancelRoom(item: any): boolean;
43
+ isRoomSelected(roomId: string): boolean;
44
+ hasCancelableRooms(): boolean;
45
+ getBookingStatusClass(booking: any): number;
46
+ submitCancelRequest(): void;
47
+ private cancelOrder;
48
+ /**
49
+ * Creates the refund-request record and its per-booking detail rows directly
50
+ * via vhQueryAutoWeb, mirroring the RefundRequest / RefundDetail shapes used
51
+ * elsewhere in the codebase (see refund-modal.component.ts). Verify the
52
+ * collection names below against your actual schema.
53
+ */
54
+ private createRefundRequestRecord;
55
+ private isBookingRemovedFromOrderTotals;
56
+ private markSelectedRoomsAsCancelRequested;
57
+ getPaymentStatusName(): string;
58
+ getPaymentStatusColor(): string;
59
+ getHotel(hotelId: string): Promise<any>;
60
+ getStatusById(id: number): any | undefined;
61
+ getPaymentMethodLabel(): string;
62
+ getBookingStatusLabel(booking: any): string;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingHotelManageBookingDetail, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingHotelManageBookingDetail, "atw-booking-hotel-manage-booking-detail", never, { "selectedBooking": "selectedBooking"; "staticdata": "staticdata"; "functionService": "functionService"; "data": "data"; "classStyles": "classStyles"; "type": "type"; }, { "back": "back"; "cancellationSubmitted": "cancellationSubmitted"; }, never, never>;
65
+ }
@@ -0,0 +1,66 @@
1
+ import { ElementRef, OnInit, OnDestroy, EventEmitter } from '@angular/core';
2
+ import { VhEventMediator, VhQueryAutoWeb } from 'vhautowebdb';
3
+ import { FunctionService } from 'vhobjects-service/src/services';
4
+ import { Observable } from 'rxjs';
5
+ import * as i0 from "@angular/core";
6
+ declare type ActiveSection = 'personal' | 'bookings' | 'bookingDetail' | 'refund' | 'refundDetail';
7
+ export declare class AtwBookingHotelManage implements OnInit, OnDestroy {
8
+ private vhQueryAutoWeb;
9
+ private vhEventMediator;
10
+ functionService: FunctionService;
11
+ data: any;
12
+ type: any;
13
+ device: any;
14
+ id_subproject: string;
15
+ isComponentExist: ElementRef<HTMLDivElement>;
16
+ hanldleProcessResizeOffset: EventEmitter<any>;
17
+ prevHeight: number | undefined;
18
+ class: any;
19
+ cutWebMan: boolean;
20
+ config: any;
21
+ staticdata: any;
22
+ activeSection: ActiveSection;
23
+ selectedBooking: any;
24
+ selectedRefund: any;
25
+ bookings: any[];
26
+ refundRequests: any[];
27
+ listOrder: any[];
28
+ listRefundRequest: any[];
29
+ bookingsLoading: boolean;
30
+ refundsLoading: boolean;
31
+ bookingsError: string | null;
32
+ refundsError: string | null;
33
+ private destroy$;
34
+ isLoggedIn: boolean;
35
+ loginLogoutStateChangedSubscription: any;
36
+ private resizeObserver;
37
+ private lastObservedSize;
38
+ currentCustomerId: string | null;
39
+ get isPreviewMode(): boolean;
40
+ get isResizeMode(): boolean;
41
+ constructor(vhQueryAutoWeb: VhQueryAutoWeb, vhEventMediator: VhEventMediator, functionService: FunctionService);
42
+ ngOnInit(): void;
43
+ ngAfterViewInit(): void;
44
+ ngOnDestroy(): void;
45
+ getDetailObject(): void;
46
+ checkLoginStatus(): void;
47
+ setSection(section: ActiveSection): void;
48
+ openBookingDetail(booking: any): void;
49
+ handleBookingCancellationSubmitted(): void;
50
+ openRefundDetail(refund: any): void;
51
+ savePersonalInformation(): void;
52
+ sendBookingMessage(): void;
53
+ loadBookings(): void;
54
+ loadRefundRequests(): void;
55
+ private getSampleBookings;
56
+ private getSampleRefundRequests;
57
+ private setupResizeObserver;
58
+ private handleResize;
59
+ getOrderByIdCustomer(customerId: string): Observable<any[]>;
60
+ getBookingsByIdBill(idBill: string): Observable<any[]>;
61
+ getRefundRequests(): Observable<any[]>;
62
+ getRefundDetails(requestId: string): Promise<any[]>;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingHotelManage, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingHotelManage, "atw-booking-hotel-manage", never, { "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
65
+ }
66
+ export {};
@@ -0,0 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./booking-hotel-manage.component";
3
+ import * as i2 from "./personal/booking-hotel-manage-personal.component";
4
+ import * as i3 from "./bookings/booking-hotel-manage-bookings.component";
5
+ import * as i4 from "./booking-detail/booking-hotel-manage-booking-detail.component";
6
+ import * as i5 from "./refund-requests/booking-hotel-manage-refund-requests.component";
7
+ import * as i6 from "./refund-detail/booking-hotel-manage-refund-detail.component";
8
+ import * as i7 from "@angular/common";
9
+ import * as i8 from "vhobjects-service";
10
+ import * as i9 from "@angular/router";
11
+ import * as i10 from "@angular/forms";
12
+ import * as i11 from "@ngx-translate/core";
13
+ export declare class BookingHotelManageModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<BookingHotelManageModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BookingHotelManageModule, [typeof i1.AtwBookingHotelManage, typeof i2.AtwBookingHotelManagePersonal, typeof i3.AtwBookingHotelManageBookings, typeof i4.AtwBookingHotelManageBookingDetail, typeof i5.AtwBookingHotelManageRefundRequests, typeof i6.AtwBookingHotelManageRefundDetail], [typeof i7.CommonModule, typeof i8.MaterialModule, typeof i8.NgZorroAntModule, typeof i9.RouterModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.TranslateModule, typeof i8.VhLanguagePipeModule], never>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<BookingHotelManageModule>;
17
+ }
@@ -0,0 +1,39 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AtwBookingHotelManageBookings {
4
+ bookings: any[];
5
+ staticdata: any;
6
+ functionService: any;
7
+ data: any;
8
+ classStyles: any;
9
+ loading: boolean;
10
+ error: string | null;
11
+ viewDetail: EventEmitter<any>;
12
+ private orderStatuses;
13
+ constructor();
14
+ formatPrice(price: number): string;
15
+ getStatusById(id: number): any | undefined;
16
+ /**
17
+ * Single source of truth for status color — pulled directly from
18
+ * OrderStatusService instead of guessing from a translated string.
19
+ */
20
+ getStatusColor(statusId: number): string;
21
+ /**
22
+ * Translated label for the status, keyed off OrderStatusService's
23
+ * canonical `name` (e.g. 'cho_thanh_toan'), following the same
24
+ * staticdata + vhLanguage pattern used for every other label in
25
+ * this component. Falls back to the raw name if no translation
26
+ * exists yet.
27
+ */
28
+ getStatusLabel(statusId: number): string;
29
+ /**
30
+ * Light background tint derived from the status color, so the
31
+ * badge keeps the "pill" look without needing a hardcoded class
32
+ * per status.
33
+ */
34
+ getStatusBackground(statusId: number): string;
35
+ private hexToRgba;
36
+ onViewDetail(booking: any): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingHotelManageBookings, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingHotelManageBookings, "atw-booking-hotel-manage-bookings", never, { "bookings": "bookings"; "staticdata": "staticdata"; "functionService": "functionService"; "data": "data"; "classStyles": "classStyles"; "loading": "loading"; "error": "error"; }, { "viewDetail": "viewDetail"; }, never, never>;
39
+ }
@@ -0,0 +1,44 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { NzModalService } from 'ng-zorro-antd/modal';
4
+ import { VhEventMediator, VhQueryAutoWeb } from 'vhautowebdb';
5
+ import { Router } from '@angular/router';
6
+ import * as i0 from "@angular/core";
7
+ export declare class AtwBookingHotelManagePersonal implements OnInit {
8
+ private vhQueryAutoWeb;
9
+ private modalService;
10
+ private vhEventMediator;
11
+ private router;
12
+ staticdata: any;
13
+ functionService: any;
14
+ data: any;
15
+ classStyles: any;
16
+ type: any;
17
+ id_subproject: string;
18
+ save: EventEmitter<void>;
19
+ infoUserForm: FormGroup;
20
+ passwordForm: FormGroup;
21
+ submittedInfo: boolean;
22
+ currentPassowdVisible: boolean;
23
+ newPassowdVisible: boolean;
24
+ confirmPassowdVisible: boolean;
25
+ userCurrent: any;
26
+ constructor(vhQueryAutoWeb: VhQueryAutoWeb, modalService: NzModalService, vhEventMediator: VhEventMediator, router: Router);
27
+ ngOnInit(): void;
28
+ getCurrentUser(): void;
29
+ initInfoForm(): void;
30
+ get controlFormInfoUser(): {
31
+ [key: string]: import("@angular/forms").AbstractControl;
32
+ };
33
+ submitInfoForm(): void;
34
+ showConfirmUpdateInfo(): void;
35
+ private updatePersonalInformation;
36
+ initPasswordForm(): void;
37
+ get controlFormChangePass(): {
38
+ [key: string]: import("@angular/forms").AbstractControl;
39
+ };
40
+ mustMatch(controlName: string, matchingControlName: string): (formGroup: FormGroup) => any;
41
+ submitPasswordForm(): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingHotelManagePersonal, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingHotelManagePersonal, "atw-booking-hotel-manage-personal", never, { "staticdata": "staticdata"; "functionService": "functionService"; "data": "data"; "classStyles": "classStyles"; "type": "type"; "id_subproject": "id_subproject"; }, { "save": "save"; }, never, never>;
44
+ }
@@ -0,0 +1,16 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AtwBookingHotelManageRefundDetail {
4
+ selectedRefund: any;
5
+ staticdata: any;
6
+ functionService: any;
7
+ data: any;
8
+ classStyles: any;
9
+ back: EventEmitter<void>;
10
+ ngOnInit(): void;
11
+ formatPrice(price: number): string;
12
+ getStatusClass(status: any): string;
13
+ goBack(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingHotelManageRefundDetail, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingHotelManageRefundDetail, "atw-booking-hotel-manage-refund-detail", never, { "selectedRefund": "selectedRefund"; "staticdata": "staticdata"; "functionService": "functionService"; "data": "data"; "classStyles": "classStyles"; }, { "back": "back"; }, never, never>;
16
+ }
@@ -0,0 +1,17 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AtwBookingHotelManageRefundRequests {
4
+ refundRequests: any[];
5
+ staticdata: any;
6
+ functionService: any;
7
+ data: any;
8
+ classStyles: any;
9
+ loading: boolean;
10
+ error: string | null;
11
+ viewDetail: EventEmitter<any>;
12
+ formatPrice(price: number): string;
13
+ getStatusClass(status: any): string;
14
+ onViewDetail(refund: any): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingHotelManageRefundRequests, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingHotelManageRefundRequests, "atw-booking-hotel-manage-refund-requests", never, { "refundRequests": "refundRequests"; "staticdata": "staticdata"; "functionService": "functionService"; "data": "data"; "classStyles": "classStyles"; "loading": "loading"; "error": "error"; }, { "viewDetail": "viewDetail"; }, never, never>;
17
+ }
@@ -0,0 +1,80 @@
1
+ import { ElementRef, OnInit } from '@angular/core';
2
+ import { FunctionService } from 'vhobjects-service/src/services';
3
+ import { ActivatedRoute, Router } from '@angular/router';
4
+ import { NzMessageService } from 'ng-zorro-antd/message';
5
+ import { VhQueryAutoWeb } from 'vhautowebdb';
6
+ import { Observable } from 'rxjs';
7
+ import * as i0 from "@angular/core";
8
+ export declare class AtwBookingSelector implements OnInit {
9
+ functionService: FunctionService;
10
+ private router;
11
+ private route;
12
+ private nzMessageService;
13
+ private vhQueryAutoWeb;
14
+ private platformId;
15
+ data: any;
16
+ type: any;
17
+ device: any;
18
+ id_subproject: string;
19
+ isComponentExist: ElementRef<HTMLDivElement>;
20
+ class: any;
21
+ cutWebMan: boolean;
22
+ config: any;
23
+ staticdata: any;
24
+ rangePickerCssVars: any;
25
+ hotels: any[];
26
+ selectedHotel: any;
27
+ dateRange: Date[];
28
+ private selectingStartDate;
29
+ hotelPopoverVisible: boolean;
30
+ link_object: string;
31
+ resolvePageTypePromise: Promise<void> | null;
32
+ hotelId: string;
33
+ constructor(functionService: FunctionService, router: Router, route: ActivatedRoute, nzMessageService: NzMessageService, vhQueryAutoWeb: VhQueryAutoWeb, platformId: Object);
34
+ ngOnInit(): void;
35
+ resolvePageType(): Promise<void>;
36
+ getListHotel(): void;
37
+ getHotelByRouteParam(): void;
38
+ fetchAndSelectHotel(link: string): Promise<void>;
39
+ fetchAndSelectHotelById(id: string): Promise<void>;
40
+ getDetailObject(): void;
41
+ selectHotel(hotel: any): void;
42
+ onCalendarChange(dates: Date[]): void;
43
+ disabledDate: (current: Date) => boolean;
44
+ onDatePopoverOpenChange(open: boolean): void;
45
+ formatDate(date: Date): string;
46
+ formatRange(range: Date[]): string;
47
+ rooms: {
48
+ adults: number;
49
+ children: number;
50
+ }[];
51
+ get totalRooms(): number;
52
+ get totalAdults(): number;
53
+ get totalChildren(): number;
54
+ changeRooms(delta: number): void;
55
+ update(room: any, key: string, delta: number): void;
56
+ buildQueryParams(): {
57
+ hotelId: any;
58
+ arrivalDate: string;
59
+ dateAdd: number;
60
+ numberOfRoom: number;
61
+ lengthOfStay: number;
62
+ roomOccupancy: string;
63
+ source: string;
64
+ deviceType: string;
65
+ sourceRefId: string;
66
+ channel: string;
67
+ promotionCode: string;
68
+ link_object: any;
69
+ };
70
+ formatDateForApi(date: Date): string;
71
+ getLengthOfStay(): number;
72
+ buildRoomOccupancy(): string;
73
+ onSearch(): Promise<void>;
74
+ scrollToBlockWhenAvailable(blockId: string, offset?: number): void;
75
+ private parseApiDate;
76
+ private parseRoomOccupancy;
77
+ getHotels(): Observable<any[]>;
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBookingSelector, never>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBookingSelector, "atw-booking-selector", never, { "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; }, {}, never, never>;
80
+ }
@@ -0,0 +1,78 @@
1
+ import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import { MatDialog } from '@angular/material/dialog';
4
+ import { Subscription } from 'rxjs';
5
+ import { VhQueryAutoWeb, VhEventMediator } from 'vhautowebdb';
6
+ import { FunctionService } from 'vhobjects-service/src/services';
7
+ import { PipeBlockPopupHoverService } from '../../../../../services/pipe-block-popup-hover.service';
8
+ import { DrawerService } from '../../../../../services/drawer.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class AtwBtnBooking implements OnInit {
11
+ private matDialog;
12
+ private router;
13
+ private route;
14
+ private vhQueryAutoWeb;
15
+ functionService: FunctionService;
16
+ private vhEventMediator;
17
+ pipeBlockPopupHoverService: PipeBlockPopupHoverService;
18
+ private drawerService;
19
+ private element;
20
+ private platformId;
21
+ data: any;
22
+ type: any;
23
+ device: any;
24
+ id_subproject: any;
25
+ objectChoosing: any;
26
+ product: any;
27
+ hanldleProcessResizeOffset: EventEmitter<any>;
28
+ isComponentExist: ElementRef<HTMLDivElement>;
29
+ btnModal: ElementRef;
30
+ btnModalPopup: ElementRef;
31
+ prevHeight: any;
32
+ deviceWidth: number;
33
+ deviceHeight: number;
34
+ devicePosition: {
35
+ top: number;
36
+ left: number;
37
+ right: number;
38
+ bottom: number;
39
+ };
40
+ isOpen: boolean;
41
+ deviceDefaultWithSideBar: number;
42
+ config: any;
43
+ cutWebMan: boolean;
44
+ detailblock: any;
45
+ resolution: any;
46
+ clientSize: any;
47
+ class: any;
48
+ staticdata: any;
49
+ animation: any;
50
+ hotelLink: string;
51
+ subscription: Subscription;
52
+ routerSubscription: Subscription;
53
+ languageChangedSubscription: Subscription;
54
+ private clickListener;
55
+ private previousUrl;
56
+ get actionType(): 'link' | 'drawer';
57
+ constructor(matDialog: MatDialog, router: Router, route: ActivatedRoute, vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, vhEventMediator: VhEventMediator, pipeBlockPopupHoverService: PipeBlockPopupHoverService, drawerService: DrawerService, element: ElementRef, platformId: Object);
58
+ ngOnInit(): void;
59
+ ngAfterViewInit(): void;
60
+ ngOnDestroy(): void;
61
+ private preFetchHotelLink;
62
+ getNavigationLink(): string;
63
+ getDetailObject(): void;
64
+ handleSetDetailBlock(): void;
65
+ private applyDetailBlockSize;
66
+ getDeviceData(): void;
67
+ /** Điểm vào duy nhất khi click — rẽ nhánh theo actionType */
68
+ handleClick(e?: Event): void;
69
+ handleShowDialog(isOpen: boolean, isClickMask?: boolean): void;
70
+ onClickOutside(event: Event): void;
71
+ private buildQueryParams;
72
+ /** Điều hướng tới link hoặc hyper_link dựa hoàn toàn vào staticdata config */
73
+ navigate(e?: Event): void;
74
+ showRoute(): any;
75
+ setProductViewed(product: any): void;
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwBtnBooking, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwBtnBooking, "atw-btn-booking", never, { "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; "objectChoosing": "objectChoosing"; "product": "product"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
78
+ }
@@ -1,11 +1,25 @@
1
1
  import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
2
  import { DomSanitizer } from '@angular/platform-browser';
3
3
  import { ActivatedRoute, Router } from '@angular/router';
4
+ import { NzModalService } from 'ng-zorro-antd/modal';
4
5
  import { Subscription } from 'rxjs';
5
6
  import { FunctionService } from 'vhobjects-service/src/services';
6
7
  import { VhImage, VhQueryAutoWeb } from 'vhautowebdb';
7
8
  import { LanguageService } from 'vhobjects-service/src/services';
8
9
  import * as i0 from "@angular/core";
10
+ export interface ReviewComment {
11
+ _id: string;
12
+ id_parent?: string | null;
13
+ id_user?: string;
14
+ username: string;
15
+ isAdmin?: boolean;
16
+ content: string;
17
+ createdAt?: string;
18
+ replies?: ReviewComment[];
19
+ __replyDraft?: string;
20
+ __showReplyInput?: boolean;
21
+ __replyToUsername?: string;
22
+ }
9
23
  interface Review {
10
24
  id: string;
11
25
  username: string;
@@ -13,9 +27,13 @@ interface Review {
13
27
  variant: string;
14
28
  content: string;
15
29
  images: string[];
16
- sellerResponse?: string;
30
+ comments?: ReviewComment[];
31
+ __commentTree?: ReviewComment[];
32
+ __commentDraft?: string;
33
+ __showAllComments?: boolean;
17
34
  likes: number;
18
35
  }
36
+ declare type ReviewParentType = 'product' | 'food' | 'news';
19
37
  export declare class AtwReview implements OnInit {
20
38
  functionService: FunctionService;
21
39
  private router;
@@ -24,9 +42,9 @@ export declare class AtwReview implements OnInit {
24
42
  private route;
25
43
  private vhImage;
26
44
  private languageService;
45
+ private nzModalService;
27
46
  data: any;
28
47
  device: string;
29
- addObjectDuplicate: EventEmitter<any>;
30
48
  hanldleProcessResizeOffset: EventEmitter<any>;
31
49
  type: any;
32
50
  componentChoosing: any;
@@ -46,7 +64,8 @@ export declare class AtwReview implements OnInit {
46
64
  totalReviews: number;
47
65
  newReview: any;
48
66
  selectedFiles: File[];
49
- previewUrls: any;
67
+ previewUrls: any[];
68
+ private previewObjectUrls;
50
69
  ratingBreakdown: {
51
70
  stars: number;
52
71
  count: number;
@@ -61,24 +80,49 @@ export declare class AtwReview implements OnInit {
61
80
  private animation;
62
81
  queryParamsSubscription: Subscription;
63
82
  routerSubscription: Subscription;
64
- constructor(functionService: FunctionService, router: Router, sanitizer: DomSanitizer, vhQueryAutoWeb: VhQueryAutoWeb, route: ActivatedRoute, vhImage: VhImage, languageService: LanguageService);
83
+ private resizeObserver;
84
+ private lastObservedSize;
85
+ parentType: ReviewParentType | null;
86
+ parentFrameId: string | null;
87
+ parentFrameType: string | null;
88
+ parentInfo: any;
89
+ hasPurchased: boolean;
90
+ constructor(functionService: FunctionService, router: Router, sanitizer: DomSanitizer, vhQueryAutoWeb: VhQueryAutoWeb, route: ActivatedRoute, vhImage: VhImage, languageService: LanguageService, nzModalService: NzModalService);
65
91
  ngOnInit(): void;
66
92
  ngAfterViewInit(): void;
93
+ ngOnDestroy(): void;
67
94
  getObject(): void;
68
95
  getReviews(): Promise<void>;
96
+ private buildCommentTree;
97
+ private isDescendantOf;
98
+ private generateId;
69
99
  getAllRatingStats(): void;
70
100
  calculateRatingBreakdownFromAll(allReviews: any[]): void;
71
101
  calculateAverageRating(): void;
72
102
  getStarArray(rating: number): boolean[];
73
103
  filterReviews(filter: string): void;
74
104
  likeReview(reviewId: string): void;
75
- getFilteredReviews(): Review[];
105
+ getFilteredReviews(): any[];
76
106
  isVideoUrl(url: string): boolean;
77
107
  canShowReviewForm(): boolean;
108
+ needsPurchase(): boolean;
78
109
  canSubmit(): boolean;
79
110
  redirectToLogin(): void;
111
+ canDeleteReview(review: any): boolean;
112
+ confirmDeleteReview(review: any): void;
113
+ private deleteReview;
80
114
  removeImage(i: number): void;
81
115
  resetForm(): void;
116
+ /** ----------------- COMMENTS (nested replies, Facebook-style) --------------------- */
117
+ toggleReplyInput(target: ReviewComment): void;
118
+ toggleShowAllComments(review: Review): void;
119
+ visibleComments(review: Review): ReviewComment[];
120
+ hiddenCommentCount(review: Review): number;
121
+ canDeleteComment(comment: ReviewComment): boolean;
122
+ postReviewComment(review: Review): Promise<void>;
123
+ postCommentReply(review: Review, parent: ReviewComment): Promise<void>;
124
+ private persistComment;
125
+ deleteComment(review: any, comment: ReviewComment): Promise<void>;
82
126
  /** ----------------- PAGINATION --------------------- */
83
127
  /** Chuyển trang -----------------
84
128
  *
@@ -96,7 +140,12 @@ export declare class AtwReview implements OnInit {
96
140
  onFileChange(evt: Event): void;
97
141
  submitReview(): Promise<void>;
98
142
  private uploadSelectedImages;
143
+ private setupResizeObserver;
144
+ private handleResize;
145
+ private resolveParentContext;
146
+ private loadParentInfo;
147
+ private checkHasPurchased;
99
148
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwReview, never>;
100
- static ɵcmp: i0.ɵɵComponentDeclaration<AtwReview, "app-review", never, { "data": "data"; "device": "device"; "type": "type"; "componentChoosing": "componentChoosing"; "resolution": "resolution"; "id_subproject": "id_subproject"; "blockChoosing": "blockChoosing"; "product": "product"; }, { "addObjectDuplicate": "addObjectDuplicate"; "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
149
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwReview, "app-review", never, { "data": "data"; "device": "device"; "type": "type"; "componentChoosing": "componentChoosing"; "resolution": "resolution"; "id_subproject": "id_subproject"; "blockChoosing": "blockChoosing"; "product": "product"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
101
150
  }
102
151
  export {};