@almatar/smart-booking-dashboard 0.0.1 → 0.0.2-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/action-card/action-card.component.mjs +3 -3
- package/esm2022/lib/components/add-note-dialog/add-note-dialog.component.mjs +3 -3
- package/esm2022/lib/components/almatar-aside/aside-back-button.service.mjs +24 -0
- package/esm2022/lib/components/almatar-aside/aside.component.mjs +122 -0
- package/esm2022/lib/components/booking-input/booking-input.component.mjs +4 -3
- package/esm2022/lib/components/cancel-dialog/cancel-dialog.component.mjs +53 -4
- package/esm2022/lib/components/data-search/data-search.component.mjs +3 -3
- package/esm2022/lib/components/hotel-cancel/almatar-hotel-auto-cancellation.component.mjs +544 -0
- package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-method/almatar-hotel-auto-cancellation-refund-method.component.mjs +43 -0
- package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-summary/almatar-hotel-auto-cancellation-refund-summary.component.mjs +296 -0
- package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/almatar-hotel-auto-cancellation-select-rooms.component.mjs +88 -0
- package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/components/almatar-hotel-auto-cancellation-non-refundable-room/almatar-hotel-auto-cancellation-non-refundable-room.component.mjs +242 -0
- package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/components/almatar-hotel-auto-cancellation-refundable-room/almatar-hotel-auto-cancellation-refundable-room.component.mjs +48 -0
- package/esm2022/lib/components/hotel-cancel/components/hotel-content/hotel-content.component.mjs +129 -0
- package/esm2022/lib/components/hotel-cancel/components/hotel-refund-method-selector/hotel-refund-method-selector.component.mjs +321 -0
- package/esm2022/lib/components/hotel-cancel/components/result-overlay/result-overlay.component.mjs +52 -0
- package/esm2022/lib/components/hotel-cancel/enums/almatar-hotel-auto-cancellation-endpoints.enum.mjs +9 -0
- package/esm2022/lib/components/hotel-cancel/enums/almatar-hotel-auto-cancellation-step.enum.mjs +7 -0
- package/esm2022/lib/components/hotel-cancel/interfaces/i-almatar-hotel-auto-cancellation.interface.mjs +2 -0
- package/esm2022/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation-endpoints.service.mjs +457 -0
- package/esm2022/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation.service.mjs +55 -0
- package/esm2022/lib/components/hotel-itinerary-card/hotel-itinerary-card.component.mjs +48 -0
- package/esm2022/lib/components/reissue-dialog/reissue-dialog.component.mjs +135 -0
- package/esm2022/lib/components/reissue-dialog/reissue-upgrade.store.mjs +305 -0
- package/esm2022/lib/components/reissue-dialog/reissue.store.mjs +349 -0
- package/esm2022/lib/components/reissue-dialog/steps/reissue-date-step/reissue-date-step.component.mjs +45 -0
- package/esm2022/lib/components/reissue-dialog/steps/reissue-legs-step/reissue-legs-step.component.mjs +140 -0
- package/esm2022/lib/components/reissue-dialog/steps/reissue-notice/reissue-notice.component.mjs +16 -0
- package/esm2022/lib/components/reissue-dialog/steps/reissue-route-step/reissue-route-step.component.mjs +104 -0
- package/esm2022/lib/components/reissue-dialog/steps/reissue-service-step/reissue-service-step.component.mjs +44 -0
- package/esm2022/lib/components/reissue-dialog/steps/reissue-upgrade-confirm-step/reissue-upgrade-confirm-step.component.mjs +193 -0
- package/esm2022/lib/components/reissue-dialog/steps/reissue-upgrade-step/reissue-upgrade-step.component.mjs +88 -0
- package/esm2022/lib/components/result-panel/result-panel.component.mjs +3 -3
- package/esm2022/lib/components/shared/components/confirm-modal/confirm-modal.component.mjs +75 -0
- package/esm2022/lib/components/shared/components/manage-booking-failed-modal/manage-booking-failed-modal.component.mjs +46 -0
- package/esm2022/lib/components/shared/enums/hotel-manage-booking-aside-tab.enum.mjs +9 -0
- package/esm2022/lib/components/shared/interfaces/i-flight-refund-details.mjs +86 -0
- package/esm2022/lib/components/shared/models/cancel-hotel-booking.model.mjs +7 -0
- package/esm2022/lib/components/shared/services/hotel-manage-booking/hotel-manage-booking.service.mjs +27 -0
- package/esm2022/lib/components/shared/services/hotel-manage-booking-endpoints/hotel-manage-booking-endpoints.service.mjs +17 -0
- package/esm2022/lib/components/workflow-actions/workflow-actions.component.mjs +5 -3
- package/esm2022/lib/config/dashboard.config.mjs +3 -1
- package/esm2022/lib/config/hotel-actions.config.mjs +21 -1
- package/esm2022/lib/models/booking.types.mjs +73 -2
- package/esm2022/lib/models/reissue.types.mjs +2 -0
- package/esm2022/lib/pages/smart-booking-dashboard/smart-booking-dashboard.component.mjs +31 -7
- package/esm2022/lib/services/booking.service.mjs +6 -2
- package/esm2022/lib/services/reissue.service.mjs +142 -0
- package/esm2022/lib/services/toast.service.mjs +15 -7
- package/esm2022/lib/shared/components/currency-code-icon/currency-code-icon.component.mjs +35 -0
- package/esm2022/lib/shared/enums/brand-enums.enum.mjs +7 -0
- package/esm2022/lib/shared/environments/environment.mjs +10 -0
- package/esm2022/lib/shared/models/index.mjs +6 -0
- package/esm2022/lib/shared/modules/almatar-icon/almatar-icon.module.mjs +36 -0
- package/esm2022/lib/shared/modules/loader/loader.module.mjs +43 -0
- package/esm2022/lib/shared/pipes/exchange.pipe.mjs +49 -0
- package/esm2022/lib/shared/services/api.service.mjs +42 -0
- package/esm2022/lib/shared/services/shared.service.mjs +34 -0
- package/esm2022/lib/shared/services/translation.service.mjs +61 -0
- package/esm2022/lib/shared/services/webengage-tracking.service.mjs +28 -0
- package/esm2022/lib/shared/store/selectors/currency.selectors.mjs +9 -0
- package/esm2022/lib/utils/reissue-format.mjs +64 -0
- package/esm2022/lib/utils/reissue-url.builder.mjs +314 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/almatar-smart-booking-dashboard.mjs +5387 -395
- package/fesm2022/almatar-smart-booking-dashboard.mjs.map +1 -1
- package/lib/components/action-dialog/action-dialog.component.d.ts +1 -1
- package/lib/components/almatar-aside/aside-back-button.service.d.ts +11 -0
- package/lib/components/almatar-aside/aside.component.d.ts +46 -0
- package/lib/components/cancel-dialog/cancel-dialog.component.d.ts +7 -0
- package/lib/components/hotel-cancel/almatar-hotel-auto-cancellation.component.d.ts +97 -0
- package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-method/almatar-hotel-auto-cancellation-refund-method.component.d.ts +25 -0
- package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-summary/almatar-hotel-auto-cancellation-refund-summary.component.d.ts +91 -0
- package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/almatar-hotel-auto-cancellation-select-rooms.component.d.ts +39 -0
- package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/components/almatar-hotel-auto-cancellation-non-refundable-room/almatar-hotel-auto-cancellation-non-refundable-room.component.d.ts +44 -0
- package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/components/almatar-hotel-auto-cancellation-refundable-room/almatar-hotel-auto-cancellation-refundable-room.component.d.ts +19 -0
- package/lib/components/hotel-cancel/components/hotel-content/hotel-content.component.d.ts +38 -0
- package/lib/components/hotel-cancel/components/hotel-refund-method-selector/hotel-refund-method-selector.component.d.ts +142 -0
- package/lib/components/hotel-cancel/components/result-overlay/result-overlay.component.d.ts +23 -0
- package/lib/components/hotel-cancel/enums/almatar-hotel-auto-cancellation-endpoints.enum.d.ts +7 -0
- package/lib/components/hotel-cancel/enums/almatar-hotel-auto-cancellation-step.enum.d.ts +5 -0
- package/lib/components/hotel-cancel/interfaces/i-almatar-hotel-auto-cancellation.interface.d.ts +252 -0
- package/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation-endpoints.service.d.ts +88 -0
- package/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation.service.d.ts +21 -0
- package/lib/components/hotel-itinerary-card/hotel-itinerary-card.component.d.ts +16 -0
- package/lib/components/reissue-dialog/reissue-dialog.component.d.ts +34 -0
- package/lib/components/reissue-dialog/reissue-upgrade.store.d.ts +96 -0
- package/lib/components/reissue-dialog/reissue.store.d.ts +124 -0
- package/lib/components/reissue-dialog/steps/reissue-date-step/reissue-date-step.component.d.ts +11 -0
- package/lib/components/reissue-dialog/steps/reissue-legs-step/reissue-legs-step.component.d.ts +16 -0
- package/lib/components/reissue-dialog/steps/reissue-notice/reissue-notice.component.d.ts +8 -0
- package/lib/components/reissue-dialog/steps/reissue-route-step/reissue-route-step.component.d.ts +21 -0
- package/lib/components/reissue-dialog/steps/reissue-service-step/reissue-service-step.component.d.ts +17 -0
- package/lib/components/reissue-dialog/steps/reissue-upgrade-confirm-step/reissue-upgrade-confirm-step.component.d.ts +28 -0
- package/lib/components/reissue-dialog/steps/reissue-upgrade-step/reissue-upgrade-step.component.d.ts +13 -0
- package/lib/components/result-panel/result-panel.component.d.ts +1 -1
- package/lib/components/shared/components/confirm-modal/confirm-modal.component.d.ts +17 -0
- package/lib/components/shared/components/manage-booking-failed-modal/manage-booking-failed-modal.component.d.ts +10 -0
- package/lib/components/shared/enums/hotel-manage-booking-aside-tab.enum.d.ts +7 -0
- package/lib/components/shared/interfaces/i-flight-refund-details.d.ts +73 -0
- package/lib/components/shared/models/cancel-hotel-booking.model.d.ts +6 -0
- package/lib/components/shared/services/hotel-manage-booking/hotel-manage-booking.service.d.ts +11 -0
- package/lib/components/shared/services/hotel-manage-booking-endpoints/hotel-manage-booking-endpoints.service.d.ts +7 -0
- package/lib/components/workflow-actions/workflow-actions.component.d.ts +3 -1
- package/lib/config/dashboard.config.d.ts +29 -0
- package/lib/models/booking.types.d.ts +28 -0
- package/lib/models/reissue.types.d.ts +147 -0
- package/lib/pages/smart-booking-dashboard/smart-booking-dashboard.component.d.ts +5 -1
- package/lib/services/reissue.service.d.ts +45 -0
- package/lib/services/toast.service.d.ts +14 -1
- package/lib/shared/components/currency-code-icon/currency-code-icon.component.d.ts +13 -0
- package/lib/shared/enums/brand-enums.enum.d.ts +5 -0
- package/lib/shared/environments/environment.d.ts +7 -0
- package/lib/shared/models/index.d.ts +11 -0
- package/lib/shared/modules/almatar-icon/almatar-icon.module.d.ts +13 -0
- package/lib/shared/modules/loader/loader.module.d.ts +13 -0
- package/lib/shared/pipes/exchange.pipe.d.ts +17 -0
- package/lib/shared/services/api.service.d.ts +43 -0
- package/lib/shared/services/shared.service.d.ts +12 -0
- package/lib/shared/services/translation.service.d.ts +17 -0
- package/lib/shared/services/webengage-tracking.service.d.ts +8 -0
- package/lib/shared/store/selectors/currency.selectors.d.ts +2 -0
- package/lib/utils/reissue-format.d.ts +28 -0
- package/lib/utils/reissue-url.builder.d.ts +24 -0
- package/package.json +9 -24
- package/public-api.d.ts +5 -1
- package/LICENSE +0 -21
- package/README.md +0 -132
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
export declare class AlmatarIconComponent {
|
|
4
|
+
name: string;
|
|
5
|
+
size: number;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlmatarIconComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AlmatarIconComponent, "almatar-icon", never, { "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
9
|
+
export declare class AlmatarIconModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlmatarIconModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AlmatarIconModule, never, [typeof i1.CommonModule, typeof AlmatarIconComponent], [typeof AlmatarIconComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AlmatarIconModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
export declare class LoaderComponent {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
message: string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoaderComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoaderComponent, "app-loader", never, { "loading": { "alias": "loading"; "required": false; }; "message": { "alias": "message"; "required": false; }; }, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
9
|
+
export declare class LoaderModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoaderModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LoaderModule, never, [typeof i1.CommonModule, typeof LoaderComponent], [typeof LoaderComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LoaderModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ExchangePipe implements PipeTransform {
|
|
4
|
+
transform(value: number, currency?: string, rate?: number): number;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExchangePipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ExchangePipe, "exchange", true>;
|
|
7
|
+
}
|
|
8
|
+
export declare class ExchangeRoundPipe implements PipeTransform {
|
|
9
|
+
transform(value: number, currency?: string, rate?: number): number;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExchangeRoundPipe, never>;
|
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ExchangeRoundPipe, "exchange_round", true>;
|
|
12
|
+
}
|
|
13
|
+
export declare class ExchangePipeModule {
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExchangePipeModule, never>;
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ExchangePipeModule, never, [typeof ExchangePipe, typeof ExchangeRoundPipe], [typeof ExchangePipe, typeof ExchangeRoundPipe]>;
|
|
16
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ExchangePipeModule>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { HttpContext } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
type HttpOptions = {
|
|
5
|
+
headers?: any;
|
|
6
|
+
context?: HttpContext;
|
|
7
|
+
observe?: 'body';
|
|
8
|
+
params?: any;
|
|
9
|
+
reportProgress?: boolean;
|
|
10
|
+
responseType?: 'json';
|
|
11
|
+
withCredentials?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare class ApiService {
|
|
14
|
+
private http;
|
|
15
|
+
get<T>(url: string | {
|
|
16
|
+
url?: string;
|
|
17
|
+
endpoint?: string;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}, options?: HttpOptions): Observable<T>;
|
|
20
|
+
post<T>(url: string | {
|
|
21
|
+
url?: string;
|
|
22
|
+
endpoint?: string;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}, body?: any, options?: HttpOptions): Observable<T>;
|
|
25
|
+
put<T>(url: string | {
|
|
26
|
+
url?: string;
|
|
27
|
+
endpoint?: string;
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}, body?: any, options?: HttpOptions): Observable<T>;
|
|
30
|
+
delete<T>(url: string | {
|
|
31
|
+
url?: string;
|
|
32
|
+
endpoint?: string;
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}, options?: HttpOptions): Observable<T>;
|
|
35
|
+
patch<T>(url: string | {
|
|
36
|
+
url?: string;
|
|
37
|
+
endpoint?: string;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}, body?: any, options?: HttpOptions): Observable<T>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
|
|
41
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ICurrency } from '../models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SharedService {
|
|
5
|
+
getAppLanguage(): string;
|
|
6
|
+
getCurrentLanguage(): string;
|
|
7
|
+
getDirection(): 'ltr' | 'rtl';
|
|
8
|
+
getBaseCurrency(): Observable<ICurrency>;
|
|
9
|
+
getInAppView(): boolean;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SharedService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SharedService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Simple translation service that provides English translations
|
|
4
|
+
* without requiring ngx-translate
|
|
5
|
+
*/
|
|
6
|
+
export declare class TranslationService {
|
|
7
|
+
private currentLanguage;
|
|
8
|
+
private translations;
|
|
9
|
+
getCurrentLanguage(): string;
|
|
10
|
+
setLanguage(lang: string): void;
|
|
11
|
+
instant(key: string, params?: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
}): string;
|
|
14
|
+
get currentLang(): string;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TranslationService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class WebengageTrackingService {
|
|
3
|
+
addEvent(eventName: string | Record<string, unknown>, eventData?: any): void;
|
|
4
|
+
setUserAttribute(attributeName: string, attributeValue: any): void;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebengageTrackingService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WebengageTrackingService>;
|
|
7
|
+
}
|
|
8
|
+
export declare function resolveMyTripsViewedEntrySourceFromQueryParams(params: any): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReissueAirport, ReissueLeg } from '../models/reissue.types';
|
|
2
|
+
/** Today as `YYYY-MM-DD` in the agent's timezone (what `<input type="date">` compares against). */
|
|
3
|
+
export declare function todayIso(): string;
|
|
4
|
+
export declare function formatReissueDate(value: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Expiry of the payment link as epoch ms. The backend sends `YYYY-MM-DD HH:mm:ss` with no timezone, read as UTC (to
|
|
7
|
+
* be confirmed with the backend); a value that carries `Z` or an offset is read as it is. `null` when missing/invalid.
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseLinkExpiry(value?: string | null): number | null;
|
|
10
|
+
/** `mm:ss` (or `h:mm:ss` from one hour up) for a countdown. */
|
|
11
|
+
export declare function formatCountdown(ms: number): string;
|
|
12
|
+
export declare function legTitle(leg: ReissueLeg): string;
|
|
13
|
+
export declare function airportOf(id: string, name: string, city: string, country: string): ReissueAirport;
|
|
14
|
+
export declare const originAirport: (l: ReissueLeg) => ReissueAirport;
|
|
15
|
+
export declare const destinationAirport: (l: ReissueLeg) => ReissueAirport;
|
|
16
|
+
export declare const compareAirports: (a: ReissueAirport, b: ReissueAirport) => boolean;
|
|
17
|
+
export declare function formatMoney(amount: number, currency: string): string;
|
|
18
|
+
/** `21 Oct` — same short date the cancel dialog shows on a leg card. */
|
|
19
|
+
export declare function formatShortDate(value: string): string;
|
|
20
|
+
/** `01:55` straight from the `YYYY-MM-DDTHH:mm:ss` string (no timezone conversion). */
|
|
21
|
+
export declare function formatTime(value: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* The leg already departed. The booking gives no timezone for `LegDepartureDateTime` (airport local time), so this
|
|
24
|
+
* compares with the agent's clock: it can be off by a few hours on the day of the flight, never by a day.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isLegFlown(leg: {
|
|
27
|
+
departure: string;
|
|
28
|
+
}): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReissueBookingContext, ReissueSelection } from '../models/reissue.types';
|
|
2
|
+
/**
|
|
3
|
+
* Port of the web's `FlightManageBookingService.navigateToOnlineBooking()`
|
|
4
|
+
* (almatar-consumer-apps) — builds the query params of
|
|
5
|
+
* `/flights/manage-booking/list`, where the web continues the reissue
|
|
6
|
+
* (search -> view-price -> choose-flight -> payment).
|
|
7
|
+
* Keep the param names/values identical to the web.
|
|
8
|
+
*/
|
|
9
|
+
export declare const REISSUE_WEB_PATH = "/flights/manage-booking/list/";
|
|
10
|
+
type Raw = any;
|
|
11
|
+
/**
|
|
12
|
+
* Normalizes the dashboard's `booking_info` (from `/v1/fcr/booking/information`)
|
|
13
|
+
* into what the URL builder needs. Reads defensively: any field missing in the
|
|
14
|
+
* BO response falls back to an empty value.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildReissueBookingContext(bookingData: Raw, bookingId: string): ReissueBookingContext | null;
|
|
17
|
+
export declare function buildReissueSearchParams(rawCtx: ReissueBookingContext, selection: ReissueSelection, postBookingId: string): Record<string, string>;
|
|
18
|
+
export declare function buildReissueSearchUrl(webBaseUrl: string, ctx: ReissueBookingContext, selection: ReissueSelection, postBookingId: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Adds the host's auth parameters (for example its token) to the web link: in the query string, or in the `#fragment`
|
|
21
|
+
* (which browsers do not send to servers or in the Referer). Empty values are skipped.
|
|
22
|
+
*/
|
|
23
|
+
export declare function appendAuthParams(url: string, params: Record<string, string>, where?: 'query' | 'hash'): string;
|
|
24
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,33 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almatar/smart-booking-dashboard",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-alpha.3",
|
|
4
4
|
"description": "Almatar Smart Booking Dashboard (Angular library)",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "Almatar",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"angular",
|
|
9
|
-
"almatar",
|
|
10
|
-
"booking",
|
|
11
|
-
"dashboard",
|
|
12
|
-
"backoffice"
|
|
13
|
-
],
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "https://git.general.mtcloud.zone/frontend/smart-booking-dashboard.git"
|
|
17
|
-
},
|
|
18
|
-
"homepage": "https://git.general.mtcloud.zone/frontend/smart-booking-dashboard",
|
|
19
|
-
"publishConfig": {
|
|
20
|
-
"access": "restricted"
|
|
21
|
-
},
|
|
22
5
|
"peerDependencies": {
|
|
23
|
-
"@angular/animations": "^18.0.0",
|
|
24
|
-
"@angular/common": "^18.0.0",
|
|
25
|
-
"@angular/core": "^18.0.0",
|
|
26
|
-
"@angular/forms": "^18.0.0",
|
|
27
|
-
"@angular/router": "^18.0.0",
|
|
6
|
+
"@angular/animations": "^18.0.0 || ^21.0.0",
|
|
7
|
+
"@angular/common": "^18.0.0 || ^21.0.0",
|
|
8
|
+
"@angular/core": "^18.0.0 || ^21.0.0",
|
|
9
|
+
"@angular/forms": "^18.0.0 || ^21.0.0",
|
|
10
|
+
"@angular/router": "^18.0.0 || ^21.0.0",
|
|
28
11
|
"@ng-select/ng-select": "^13.7.0",
|
|
12
|
+
"@ngrx/store": "^18.0.0 || ^21.0.0",
|
|
13
|
+
"moment": "^2.29.0",
|
|
29
14
|
"ngx-toastr": "^17.0.2",
|
|
30
|
-
"
|
|
15
|
+
"primeng": "^14.1.2 || ^21.0.0",
|
|
31
16
|
"rxjs": "^7.8.0"
|
|
32
17
|
},
|
|
33
18
|
"dependencies": {
|
package/public-api.d.ts
CHANGED
|
@@ -2,4 +2,8 @@ export { SmartBookingDashboardComponent } from './lib/pages/smart-booking-dashbo
|
|
|
2
2
|
export { smartBookingDashboardRoutes } from './lib/smart-booking-dashboard.routes';
|
|
3
3
|
export { SmartBookingDashboardModule } from './lib/smart-booking-dashboard.module';
|
|
4
4
|
export { SBD_CONFIG, SBD_DEFAULT_CONFIG, provideSmartBookingDashboard } from './lib/config/dashboard.config';
|
|
5
|
-
export type { SbdConfig } from './lib/config/dashboard.config';
|
|
5
|
+
export type { SbdConfig, SbdRedirectAuthParams } from './lib/config/dashboard.config';
|
|
6
|
+
export { buildReissueSearchUrl, buildReissueSearchParams, buildReissueBookingContext, appendAuthParams } from './lib/utils/reissue-url.builder';
|
|
7
|
+
export type * from './lib/models/reissue.types';
|
|
8
|
+
export { SBD_TOAST_HANDLER } from './lib/services/toast.service';
|
|
9
|
+
export type { SbdToastHandler } from './lib/services/toast.service';
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Almatar
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# @almatar/smart-booking-dashboard
|
|
2
|
-
|
|
3
|
-
Angular 18 library that ships the Almatar Smart Booking Dashboard (flight booking lookup, FCR workflow actions, notes, cancellations and refunds) as a drop-in routed feature for backoffice apps.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
The package is published privately to npmjs.org under the `@almatar` organisation. Any machine that installs it must be authenticated with an npm account that is a member of the org:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm login
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For CI, create an automation token in the org and put it in the project `.npmrc` via an environment variable, never as plain text in git:
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Then:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install @almatar/smart-booking-dashboard
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Peer dependencies the host app must already have:
|
|
26
|
-
|
|
27
|
-
| Package | Version |
|
|
28
|
-
| --- | --- |
|
|
29
|
-
| `@angular/*` (core, common, forms, router, animations) | ^18.0.0 |
|
|
30
|
-
| `@ng-select/ng-select` | ^13.7.0 |
|
|
31
|
-
| `ngx-toastr` | ^17.0.2 |
|
|
32
|
-
| `primeicons` | ^4.0.0 |
|
|
33
|
-
| `rxjs` | ^7.8.0 |
|
|
34
|
-
|
|
35
|
-
## Host app setup
|
|
36
|
-
|
|
37
|
-
### 1. Global styles
|
|
38
|
-
|
|
39
|
-
The library uses ng-select, ngx-toastr and PrimeIcons classes but does not bundle their CSS. Add them to the `styles` array of your `angular.json`:
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
"styles": [
|
|
43
|
-
"node_modules/@ng-select/ng-select/themes/default.theme.css",
|
|
44
|
-
"node_modules/primeicons/primeicons.css",
|
|
45
|
-
"node_modules/ngx-toastr/toastr.css",
|
|
46
|
-
"src/styles.scss"
|
|
47
|
-
]
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 2. Providers
|
|
51
|
-
|
|
52
|
-
The dashboard needs `HttpClient`, browser animations and Toastr at the root. Your own auth interceptor should attach the `Authorization` header; the library only adds `platform` and `Accept-Language`.
|
|
53
|
-
|
|
54
|
-
```ts
|
|
55
|
-
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
56
|
-
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
57
|
-
import { provideToastr } from 'ngx-toastr';
|
|
58
|
-
import { provideSmartBookingDashboard } from '@almatar/smart-booking-dashboard';
|
|
59
|
-
|
|
60
|
-
export const appConfig = {
|
|
61
|
-
providers: [
|
|
62
|
-
provideHttpClient(withInterceptorsFromDi()),
|
|
63
|
-
provideAnimations(),
|
|
64
|
-
provideToastr(),
|
|
65
|
-
provideSmartBookingDashboard({
|
|
66
|
-
apiBase: '/api', // default '/api'
|
|
67
|
-
platform: 'BO', // default 'BO'
|
|
68
|
-
}),
|
|
69
|
-
],
|
|
70
|
-
};
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
NgModule-based apps: import `BrowserAnimationsModule` and `ToastrModule.forRoot()` and add the same `provideHttpClient(...)` and `provideSmartBookingDashboard(...)` calls to `providers`.
|
|
74
|
-
|
|
75
|
-
### 3. Routing
|
|
76
|
-
|
|
77
|
-
Lazy-load the feature under whatever path you want:
|
|
78
|
-
|
|
79
|
-
```ts
|
|
80
|
-
const routes: Routes = [
|
|
81
|
-
{
|
|
82
|
-
path: 'smart-booking',
|
|
83
|
-
canActivate: [AuthGuard],
|
|
84
|
-
loadChildren: () =>
|
|
85
|
-
import('@almatar/smart-booking-dashboard').then(m => m.SmartBookingDashboardModule),
|
|
86
|
-
},
|
|
87
|
-
];
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Or, for standalone routing, spread `smartBookingDashboardRoutes` as children of your route.
|
|
91
|
-
|
|
92
|
-
## Public API
|
|
93
|
-
|
|
94
|
-
| Export | Purpose |
|
|
95
|
-
| --- | --- |
|
|
96
|
-
| `SmartBookingDashboardModule` | Routed NgModule for `loadChildren` |
|
|
97
|
-
| `smartBookingDashboardRoutes` | The same routes for standalone `loadChildren` / children |
|
|
98
|
-
| `SmartBookingDashboardComponent` | The page component, if you prefer to route to it directly |
|
|
99
|
-
| `provideSmartBookingDashboard(config?)` | Environment providers that override the defaults |
|
|
100
|
-
| `SBD_CONFIG`, `SBD_DEFAULT_CONFIG`, `SbdConfig` | Injection token, defaults and type for the config |
|
|
101
|
-
|
|
102
|
-
### `SbdConfig`
|
|
103
|
-
|
|
104
|
-
| Field | Default | Description |
|
|
105
|
-
| --- | --- | --- |
|
|
106
|
-
| `apiBase` | `'/api'` | Base URL of the backend API |
|
|
107
|
-
| `platform` | `'BO'` | Value of the `platform` header sent with FCR requests |
|
|
108
|
-
|
|
109
|
-
## Development
|
|
110
|
-
|
|
111
|
-
From the repository root:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
npm install
|
|
115
|
-
npm start # demo app on http://localhost:4300 (proxies /api)
|
|
116
|
-
npm run lib:build # builds to dist/smart-booking-dashboard
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Publishing
|
|
120
|
-
|
|
121
|
-
1. Bump `version` in `projects/smart-booking-dashboard/package.json`.
|
|
122
|
-
2. Make sure you are logged in to npm with an account that is an owner or admin of the `almatar` org (`npm whoami`).
|
|
123
|
-
3. Run from the repository root:
|
|
124
|
-
```bash
|
|
125
|
-
npm run lib:publish
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
`lib:publish` builds the library and publishes the `./dist/smart-booking-dashboard` folder with `access: restricted`, so the package stays private to the org. Never publish from the repository root; the root package is marked private on purpose.
|
|
129
|
-
|
|
130
|
-
## License
|
|
131
|
-
|
|
132
|
-
MIT
|