@almatar/smart-booking-dashboard 0.0.1 → 0.0.2-alpha.2

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 (90) hide show
  1. package/esm2022/lib/components/action-card/action-card.component.mjs +3 -3
  2. package/esm2022/lib/components/add-note-dialog/add-note-dialog.component.mjs +3 -3
  3. package/esm2022/lib/components/almatar-aside/aside-back-button.service.mjs +24 -0
  4. package/esm2022/lib/components/almatar-aside/aside.component.mjs +123 -0
  5. package/esm2022/lib/components/booking-input/booking-input.component.mjs +4 -3
  6. package/esm2022/lib/components/cancel-dialog/cancel-dialog.component.mjs +53 -4
  7. package/esm2022/lib/components/data-search/data-search.component.mjs +3 -3
  8. package/esm2022/lib/components/hotel-cancel/almatar-hotel-auto-cancellation.component.mjs +544 -0
  9. package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-method/almatar-hotel-auto-cancellation-refund-method.component.mjs +43 -0
  10. package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-summary/almatar-hotel-auto-cancellation-refund-summary.component.mjs +296 -0
  11. package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/almatar-hotel-auto-cancellation-select-rooms.component.mjs +88 -0
  12. 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
  13. 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
  14. package/esm2022/lib/components/hotel-cancel/components/hotel-content/hotel-content.component.mjs +129 -0
  15. package/esm2022/lib/components/hotel-cancel/components/hotel-refund-method-selector/hotel-refund-method-selector.component.mjs +321 -0
  16. package/esm2022/lib/components/hotel-cancel/components/result-overlay/result-overlay.component.mjs +52 -0
  17. package/esm2022/lib/components/hotel-cancel/enums/almatar-hotel-auto-cancellation-endpoints.enum.mjs +9 -0
  18. package/esm2022/lib/components/hotel-cancel/enums/almatar-hotel-auto-cancellation-step.enum.mjs +7 -0
  19. package/esm2022/lib/components/hotel-cancel/interfaces/i-almatar-hotel-auto-cancellation.interface.mjs +2 -0
  20. package/esm2022/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation-endpoints.service.mjs +448 -0
  21. package/esm2022/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation.service.mjs +55 -0
  22. package/esm2022/lib/components/hotel-itinerary-card/hotel-itinerary-card.component.mjs +48 -0
  23. package/esm2022/lib/components/result-panel/result-panel.component.mjs +3 -3
  24. package/esm2022/lib/components/shared/components/confirm-modal/confirm-modal.component.mjs +75 -0
  25. package/esm2022/lib/components/shared/components/manage-booking-failed-modal/manage-booking-failed-modal.component.mjs +46 -0
  26. package/esm2022/lib/components/shared/enums/hotel-manage-booking-aside-tab.enum.mjs +9 -0
  27. package/esm2022/lib/components/shared/interfaces/i-flight-refund-details.mjs +86 -0
  28. package/esm2022/lib/components/shared/models/cancel-hotel-booking.model.mjs +7 -0
  29. package/esm2022/lib/components/shared/services/hotel-manage-booking/hotel-manage-booking.service.mjs +27 -0
  30. package/esm2022/lib/components/shared/services/hotel-manage-booking-endpoints/hotel-manage-booking-endpoints.service.mjs +17 -0
  31. package/esm2022/lib/config/hotel-actions.config.mjs +21 -1
  32. package/esm2022/lib/models/booking.types.mjs +73 -2
  33. package/esm2022/lib/pages/smart-booking-dashboard/smart-booking-dashboard.component.mjs +25 -7
  34. package/esm2022/lib/services/booking.service.mjs +6 -2
  35. package/esm2022/lib/shared/components/currency-code-icon/currency-code-icon.component.mjs +35 -0
  36. package/esm2022/lib/shared/enums/brand-enums.enum.mjs +7 -0
  37. package/esm2022/lib/shared/environments/environment.mjs +10 -0
  38. package/esm2022/lib/shared/models/index.mjs +6 -0
  39. package/esm2022/lib/shared/modules/almatar-icon/almatar-icon.module.mjs +36 -0
  40. package/esm2022/lib/shared/modules/loader/loader.module.mjs +43 -0
  41. package/esm2022/lib/shared/pipes/exchange.pipe.mjs +49 -0
  42. package/esm2022/lib/shared/services/api.service.mjs +42 -0
  43. package/esm2022/lib/shared/services/shared.service.mjs +34 -0
  44. package/esm2022/lib/shared/services/translation.service.mjs +61 -0
  45. package/esm2022/lib/shared/services/webengage-tracking.service.mjs +28 -0
  46. package/esm2022/lib/shared/store/selectors/currency.selectors.mjs +9 -0
  47. package/fesm2022/almatar-smart-booking-dashboard.mjs +3278 -180
  48. package/fesm2022/almatar-smart-booking-dashboard.mjs.map +1 -1
  49. package/lib/components/almatar-aside/aside-back-button.service.d.ts +11 -0
  50. package/lib/components/almatar-aside/aside.component.d.ts +47 -0
  51. package/lib/components/cancel-dialog/cancel-dialog.component.d.ts +7 -0
  52. package/lib/components/hotel-cancel/almatar-hotel-auto-cancellation.component.d.ts +97 -0
  53. package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-method/almatar-hotel-auto-cancellation-refund-method.component.d.ts +25 -0
  54. package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-summary/almatar-hotel-auto-cancellation-refund-summary.component.d.ts +91 -0
  55. package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/almatar-hotel-auto-cancellation-select-rooms.component.d.ts +39 -0
  56. 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
  57. 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
  58. package/lib/components/hotel-cancel/components/hotel-content/hotel-content.component.d.ts +38 -0
  59. package/lib/components/hotel-cancel/components/hotel-refund-method-selector/hotel-refund-method-selector.component.d.ts +142 -0
  60. package/lib/components/hotel-cancel/components/result-overlay/result-overlay.component.d.ts +23 -0
  61. package/lib/components/hotel-cancel/enums/almatar-hotel-auto-cancellation-endpoints.enum.d.ts +7 -0
  62. package/lib/components/hotel-cancel/enums/almatar-hotel-auto-cancellation-step.enum.d.ts +5 -0
  63. package/lib/components/hotel-cancel/interfaces/i-almatar-hotel-auto-cancellation.interface.d.ts +252 -0
  64. package/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation-endpoints.service.d.ts +82 -0
  65. package/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation.service.d.ts +21 -0
  66. package/lib/components/hotel-itinerary-card/hotel-itinerary-card.component.d.ts +16 -0
  67. package/lib/components/shared/components/confirm-modal/confirm-modal.component.d.ts +17 -0
  68. package/lib/components/shared/components/manage-booking-failed-modal/manage-booking-failed-modal.component.d.ts +10 -0
  69. package/lib/components/shared/enums/hotel-manage-booking-aside-tab.enum.d.ts +7 -0
  70. package/lib/components/shared/interfaces/i-flight-refund-details.d.ts +73 -0
  71. package/lib/components/shared/models/cancel-hotel-booking.model.d.ts +6 -0
  72. package/lib/components/shared/services/hotel-manage-booking/hotel-manage-booking.service.d.ts +11 -0
  73. package/lib/components/shared/services/hotel-manage-booking-endpoints/hotel-manage-booking-endpoints.service.d.ts +7 -0
  74. package/lib/models/booking.types.d.ts +28 -0
  75. package/lib/pages/smart-booking-dashboard/smart-booking-dashboard.component.d.ts +1 -0
  76. package/lib/shared/components/currency-code-icon/currency-code-icon.component.d.ts +13 -0
  77. package/lib/shared/enums/brand-enums.enum.d.ts +5 -0
  78. package/lib/shared/environments/environment.d.ts +7 -0
  79. package/lib/shared/models/index.d.ts +11 -0
  80. package/lib/shared/modules/almatar-icon/almatar-icon.module.d.ts +13 -0
  81. package/lib/shared/modules/loader/loader.module.d.ts +13 -0
  82. package/lib/shared/pipes/exchange.pipe.d.ts +17 -0
  83. package/lib/shared/services/api.service.d.ts +43 -0
  84. package/lib/shared/services/shared.service.d.ts +12 -0
  85. package/lib/shared/services/translation.service.d.ts +17 -0
  86. package/lib/shared/services/webengage-tracking.service.d.ts +8 -0
  87. package/lib/shared/store/selectors/currency.selectors.d.ts +2 -0
  88. package/package.json +2 -19
  89. package/LICENSE +0 -21
  90. package/README.md +0 -132
@@ -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,2 @@
1
+ import { ICurrency } from '../../models';
2
+ export declare const getCurrentCurrency: import("@ngrx/store").MemoizedSelector<unknown, ICurrency, (s1: {}) => ICurrency>;
package/package.json CHANGED
@@ -1,24 +1,7 @@
1
1
  {
2
2
  "name": "@almatar/smart-booking-dashboard",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-alpha.2",
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
6
  "@angular/animations": "^18.0.0",
24
7
  "@angular/common": "^18.0.0",
@@ -27,7 +10,7 @@
27
10
  "@angular/router": "^18.0.0",
28
11
  "@ng-select/ng-select": "^13.7.0",
29
12
  "ngx-toastr": "^17.0.2",
30
- "primeicons": "^4.0.0",
13
+ "primeng": "^14.1.2",
31
14
  "rxjs": "^7.8.0"
32
15
  },
33
16
  "dependencies": {
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