@almatar/smart-booking-dashboard 0.0.2-alpha.7 → 0.0.2-alpha.8
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/booking-input/booking-input.component.mjs +16 -4
- package/esm2022/lib/components/flight-itinerary-card/flight-itinerary-card.component.mjs +3 -3
- 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 +4 -3
- package/esm2022/lib/components/reissue-dialog/reissue-dialog.component.mjs +3 -3
- package/esm2022/lib/components/reissue-dialog/steps/reissue-date-step/reissue-date-step.component.mjs +2 -2
- package/esm2022/lib/components/reissue-dialog/steps/reissue-legs-step/reissue-legs-step.component.mjs +3 -3
- package/esm2022/lib/components/reissue-dialog/steps/reissue-notice/reissue-notice.component.mjs +2 -2
- package/esm2022/lib/components/reissue-dialog/steps/reissue-route-step/reissue-route-step.component.mjs +3 -3
- package/esm2022/lib/components/reissue-dialog/steps/reissue-service-step/reissue-service-step.component.mjs +2 -2
- package/esm2022/lib/components/reissue-dialog/steps/reissue-upgrade-confirm-step/reissue-upgrade-confirm-step.component.mjs +3 -3
- package/esm2022/lib/components/reissue-dialog/steps/reissue-upgrade-step/reissue-upgrade-step.component.mjs +3 -5
- package/esm2022/lib/config/dashboard.config.mjs +6 -1
- package/esm2022/lib/pages/smart-booking-dashboard/smart-booking-dashboard.component.mjs +8 -3
- package/esm2022/lib/services/booking.service.mjs +3 -3
- package/esm2022/lib/services/brand.service.mjs +29 -0
- package/esm2022/lib/services/reissue.service.mjs +3 -3
- package/esm2022/lib/shared/services/api.service.mjs +3 -3
- package/esm2022/lib/shared/services/sbd-http.mjs +27 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/almatar-smart-booking-dashboard.mjs +100 -31
- 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/booking-input/booking-input.component.d.ts +7 -1
- package/lib/components/cancel-dialog/cancel-dialog.component.d.ts +4 -4
- package/lib/components/hotel-cancel/components/hotel-content/hotel-content.component.d.ts +1 -1
- package/lib/components/reissue-dialog/steps/reissue-notice/reissue-notice.component.d.ts +1 -1
- package/lib/components/result-panel/result-panel.component.d.ts +1 -1
- package/lib/config/dashboard.config.d.ts +12 -0
- package/lib/pages/smart-booking-dashboard/smart-booking-dashboard.component.d.ts +3 -1
- package/lib/services/brand.service.d.ts +14 -0
- package/lib/shared/services/sbd-http.d.ts +8 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
|
@@ -12,7 +12,7 @@ export declare class SbdActionDialogComponent {
|
|
|
12
12
|
preloadedData: import("@angular/core").InputSignal<any>;
|
|
13
13
|
closed: import("@angular/core").OutputEmitterRef<void>;
|
|
14
14
|
selectedAction: import("@angular/core").WritableSignal<ActionConfig>;
|
|
15
|
-
actionStatus: import("@angular/core").WritableSignal<"
|
|
15
|
+
actionStatus: import("@angular/core").WritableSignal<"idle" | "loading" | "success" | "error">;
|
|
16
16
|
actionData: import("@angular/core").WritableSignal<unknown>;
|
|
17
17
|
elapsedMs: import("@angular/core").WritableSignal<number>;
|
|
18
18
|
copying: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -10,6 +10,12 @@ export declare class SbdBookingInputComponent {
|
|
|
10
10
|
product: import("@angular/core").ModelSignal<ProductType>;
|
|
11
11
|
bookingId: import("@angular/core").ModelSignal<string>;
|
|
12
12
|
lookup: import("@angular/core").OutputEmitterRef<void>;
|
|
13
|
+
/** The agent picked another brand: the booking on screen belongs to the previous one. */
|
|
14
|
+
brandChanged: import("@angular/core").OutputEmitterRef<string>;
|
|
15
|
+
private readonly brandService;
|
|
16
|
+
readonly brands: readonly import("@almatar/smart-booking-dashboard").SbdBrandOption[];
|
|
17
|
+
readonly brand: import("@angular/core").WritableSignal<string>;
|
|
18
|
+
onBrand(value: string): void;
|
|
13
19
|
readonly productOptions: ProductOption[];
|
|
14
20
|
readonly demoIds: {
|
|
15
21
|
label: string;
|
|
@@ -18,6 +24,6 @@ export declare class SbdBookingInputComponent {
|
|
|
18
24
|
fillDemo(id: string): void;
|
|
19
25
|
onKeydown(event: KeyboardEvent): void;
|
|
20
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<SbdBookingInputComponent, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SbdBookingInputComponent, "app-sbd-booking-input", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "product": { "alias": "product"; "required": false; "isSignal": true; }; "bookingId": { "alias": "bookingId"; "required": false; "isSignal": true; }; }, { "product": "productChange"; "bookingId": "bookingIdChange"; "lookup": "lookup"; }, never, never, true, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SbdBookingInputComponent, "app-sbd-booking-input", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "product": { "alias": "product"; "required": false; "isSignal": true; }; "bookingId": { "alias": "bookingId"; "required": false; "isSignal": true; }; }, { "product": "productChange"; "bookingId": "bookingIdChange"; "lookup": "lookup"; "brandChanged": "brandChanged"; }, never, never, true, never>;
|
|
22
28
|
}
|
|
23
29
|
export {};
|
|
@@ -36,7 +36,7 @@ export declare class SbdCancelDialogComponent {
|
|
|
36
36
|
* bookings the backend hasn't already restricted to a single leg — mirrors
|
|
37
37
|
* almatar-b2c's select-leg screen. Skipped straight to 'details' otherwise.
|
|
38
38
|
*/
|
|
39
|
-
step: import("@angular/core").WritableSignal<"loading" | "
|
|
39
|
+
step: import("@angular/core").WritableSignal<"loading" | "details" | "select-leg">;
|
|
40
40
|
/** Per-leg inclusion (checkbox) and expand/collapse state — round-trip only. */
|
|
41
41
|
onwardChecked: import("@angular/core").WritableSignal<boolean>;
|
|
42
42
|
returnChecked: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -45,7 +45,7 @@ export declare class SbdCancelDialogComponent {
|
|
|
45
45
|
selectedSource: import("@angular/core").WritableSignal<string>;
|
|
46
46
|
cancelHint: import("@angular/core").WritableSignal<string>;
|
|
47
47
|
paidSummaryExpanded: import("@angular/core").WritableSignal<boolean>;
|
|
48
|
-
preferredRefundMethod: import("@angular/core").WritableSignal<"
|
|
48
|
+
preferredRefundMethod: import("@angular/core").WritableSignal<"originalPaymentMethod" | "split" | "wallet">;
|
|
49
49
|
private readonly CANCEL_HINTS;
|
|
50
50
|
private hintTimer;
|
|
51
51
|
hasOnward: import("@angular/core").Signal<boolean>;
|
|
@@ -308,9 +308,9 @@ export declare class SbdCancelDialogComponent {
|
|
|
308
308
|
* Card-refund settlement-timeline badge — Tabby and Tamara each have their
|
|
309
309
|
* own processing window, distinct from a plain card's generic bank policy.
|
|
310
310
|
*/
|
|
311
|
-
cardBadgeText: import("@angular/core").Signal<"
|
|
311
|
+
cardBadgeText: import("@angular/core").Signal<"From 5-7 business days" | "Up to 10 business days" | "Loyalty Program Policy" | "Up to 15 business days, bank policy">;
|
|
312
312
|
/** Same as `cardBadgeText`, scoped to the confirmed cancellation result. */
|
|
313
|
-
confirmCardBadgeText: import("@angular/core").Signal<"
|
|
313
|
+
confirmCardBadgeText: import("@angular/core").Signal<"From 5-7 business days" | "Up to 10 business days" | "Loyalty Program Policy" | "Up to 15 business days, bank policy">;
|
|
314
314
|
/**
|
|
315
315
|
* Per-method breakdown of the "Total paid" amount. The backend doesn't
|
|
316
316
|
* (yet) expose a dedicated original-payment breakdown, so the known
|
|
@@ -2,7 +2,7 @@ import { IHotelBookingData } from '../../../../models/booking.types';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SbdHotelContentComponent {
|
|
4
4
|
bookingData: import("@angular/core").InputSignal<IHotelBookingData>;
|
|
5
|
-
bookingStatus: import("@angular/core").InputSignal<"
|
|
5
|
+
bookingStatus: import("@angular/core").InputSignal<"idle" | "loading" | "success" | "error">;
|
|
6
6
|
bookingId: import("@angular/core").InputSignal<string>;
|
|
7
7
|
dataVerified: import("@angular/core").InputSignal<boolean>;
|
|
8
8
|
bookingNotes: import("@angular/core").InputSignal<any[]>;
|
|
@@ -2,7 +2,7 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
/** Icon + message box used for the info callout, loading / error states and the validation hint. */
|
|
3
3
|
export declare class SbdReissueNoticeComponent {
|
|
4
4
|
icon: import("@angular/core").InputSignal<string>;
|
|
5
|
-
tone: import("@angular/core").InputSignal<"
|
|
5
|
+
tone: import("@angular/core").InputSignal<"success" | "error" | "info" | "warn" | "muted">;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueNoticeComponent, never>;
|
|
7
7
|
static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueNoticeComponent, "app-sbd-reissue-notice", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[action]"], true, never>;
|
|
8
8
|
}
|
|
@@ -4,7 +4,7 @@ export declare class SbdResultPanelComponent {
|
|
|
4
4
|
private toast;
|
|
5
5
|
actionLabel: import("@angular/core").InputSignal<string>;
|
|
6
6
|
elapsedMs: import("@angular/core").InputSignal<number>;
|
|
7
|
-
status: import("@angular/core").InputSignal<"
|
|
7
|
+
status: import("@angular/core").InputSignal<"idle" | "loading" | "success" | "error">;
|
|
8
8
|
result: import("@angular/core").InputSignal<ResultContent>;
|
|
9
9
|
feedbackGiven: import("@angular/core").OutputEmitterRef<"up" | "down">;
|
|
10
10
|
get elapsedSeconds(): string;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
2
2
|
import type { Observable } from 'rxjs';
|
|
3
|
+
/** A brand the agent can work on. `value` is what goes in the `x-brand` header. */
|
|
4
|
+
export interface SbdBrandOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
3
8
|
/** Query/hash parameters (name -> value) the host adds to the link that opens the consumer web, e.g. its auth token. */
|
|
4
9
|
export type SbdRedirectAuthParams = Record<string, string>;
|
|
5
10
|
/**
|
|
@@ -37,6 +42,13 @@ export interface SbdConfig {
|
|
|
37
42
|
* backend serves the Reissue APIs; the host turns it on when they are ready.
|
|
38
43
|
*/
|
|
39
44
|
reissueEnabled: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The brands in the dropdown on top of the dashboard. The selected one goes in the `x-brand` header of every request
|
|
47
|
+
* the dashboard makes. Default: Almatar and Nusuk.
|
|
48
|
+
*/
|
|
49
|
+
brands: SbdBrandOption[];
|
|
50
|
+
/** The brand selected when the dashboard opens (its `value`). Default: 'almatar'. */
|
|
51
|
+
defaultBrand: string;
|
|
40
52
|
}
|
|
41
53
|
export declare const SBD_DEFAULT_CONFIG: SbdConfig;
|
|
42
54
|
export declare const SBD_CONFIG: InjectionToken<SbdConfig>;
|
|
@@ -7,7 +7,7 @@ export declare class SmartBookingDashboardComponent {
|
|
|
7
7
|
protected readonly reissueEnabled: boolean;
|
|
8
8
|
product: import("@angular/core").WritableSignal<ProductType>;
|
|
9
9
|
bookingId: import("@angular/core").WritableSignal<string>;
|
|
10
|
-
bookingStatus: import("@angular/core").WritableSignal<"
|
|
10
|
+
bookingStatus: import("@angular/core").WritableSignal<"idle" | "loading" | "success" | "error">;
|
|
11
11
|
bookingData: import("@angular/core").WritableSignal<any>;
|
|
12
12
|
cancelDialogOpen: import("@angular/core").WritableSignal<boolean>;
|
|
13
13
|
hotelAutoCancelDialogOpen: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -41,6 +41,8 @@ export declare class SmartBookingDashboardComponent {
|
|
|
41
41
|
fmtDate(dt: string): string;
|
|
42
42
|
openAction(key: string): void;
|
|
43
43
|
onKeydown(event: KeyboardEvent): void;
|
|
44
|
+
/** The booking on screen was found under the previous brand: clear it, the agent looks it up again on the new one. */
|
|
45
|
+
onBrandChanged(): void;
|
|
44
46
|
lookupBooking(): void;
|
|
45
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartBookingDashboardComponent, never>;
|
|
46
48
|
static ɵcmp: i0.ɵɵComponentDeclaration<SmartBookingDashboardComponent, "app-smart-booking-dashboard", never, {}, {}, never, never, true, never>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SbdBrandOption } from '../config/dashboard.config';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** The brand the agent is working on. It is sent as the `x-brand` header of every request of the dashboard. */
|
|
4
|
+
export declare class SbdBrandService {
|
|
5
|
+
private readonly config;
|
|
6
|
+
readonly brands: readonly SbdBrandOption[];
|
|
7
|
+
/** The `value` of the selected brand. Starts on the default of the config (Almatar). */
|
|
8
|
+
readonly brand: import("@angular/core").WritableSignal<string>;
|
|
9
|
+
/** Ignores a value that is not one of the brands, so a wrong header can never be sent. */
|
|
10
|
+
setBrand(value: string): void;
|
|
11
|
+
private start;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SbdBrandService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SbdBrandService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
/**
|
|
4
|
+
* The HttpClient of the package. The services of the package are provided in root, so they use the host's HttpClient
|
|
5
|
+
* and an interceptor registered inside the package would never see their requests. Every call of the package goes
|
|
6
|
+
* through this client instead, which adds `x-brand` without any change in the host app.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SBD_HTTP: InjectionToken<HttpClient>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -2,7 +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, SbdRedirectAuthParams } from './lib/config/dashboard.config';
|
|
5
|
+
export type { SbdConfig, SbdRedirectAuthParams, SbdBrandOption } from './lib/config/dashboard.config';
|
|
6
|
+
export { SbdBrandService } from './lib/services/brand.service';
|
|
6
7
|
export { buildReissueSearchUrl, buildReissueSearchParams, buildReissueBookingContext, appendAuthParams } from './lib/utils/reissue-url.builder';
|
|
7
8
|
export type * from './lib/models/reissue.types';
|
|
8
9
|
export { SBD_TOAST_HANDLER } from './lib/services/toast.service';
|