@odynn/awayz-flights 0.10.7 → 0.10.9
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/dist/{FlightItinerary-BvAVMr_3.js → FlightItinerary-Bn345w_C.js} +0 -1
- package/dist/FlightsService-BgXzj6SR.js +155 -0
- package/dist/assets/_styles.css +1 -1
- package/dist/components/BookingOption/BookingOption.js +193 -11
- package/dist/components/Dialog/Dialog.js +8 -9
- package/dist/components/FlightItinerary/FlightItinerary.js +1 -1
- package/dist/components/FlightItineraryDropdown/FlightItineraryDropdown.js +9 -13
- package/dist/components/HorizontalScroller/HorizontalScroller.js +2 -2
- package/dist/components/MiniFlightItinerary/MiniFlightItinerary.js +7 -7
- package/dist/components/index.js +7 -9
- package/dist/hooks/useAirportSearch/useAirportSearch.js +9 -8
- package/dist/hooks/useFlightSearch/useFlightSearch.js +560 -560
- package/dist/index-B9NLqDyM.js +39 -0
- package/dist/lib/components/index.d.ts +0 -1
- package/dist/lib/services/wallet/WalletService.mappers.d.ts +21 -0
- package/dist/main.js +29 -31
- package/dist/numberUtils-DxNMfbMM.js +8 -0
- package/dist/services/flights/FlightsService.js +5 -145
- package/dist/services/wallet/WalletService.js +26 -29
- package/dist/services/wallet/WalletService.mappers.js +74 -0
- package/dist/utils/flightUtils.js +13 -12
- package/package.json +1 -1
- package/dist/BookingOption-D566Ie2y.js +0 -205
- package/dist/assets/_styles2.css +0 -1
- package/dist/components/FlightResult/FlightResult.js +0 -416
- package/dist/enums-DPFgYLjY.js +0 -4
- package/dist/index-9LVJi5JO.js +0 -55
- package/dist/lib/components/FlightResult/FlightResult.d.ts +0 -40
- package/dist/objectUtils-3IeCVocm.js +0 -7
- /package/dist/assets/{_styles4.css → BookingOption.css} +0 -0
- /package/dist/assets/{_styles3.css → Dialog.css} +0 -0
package/dist/index-9LVJi5JO.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { G as t } from "./iconBase-DSKTHwal.js";
|
|
2
|
-
function l(c) {
|
|
3
|
-
return t({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }, child: [] }] })(c);
|
|
4
|
-
}
|
|
5
|
-
function r(c) {
|
|
6
|
-
return t({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" }, child: [] }] })(c);
|
|
7
|
-
}
|
|
8
|
-
function i(c) {
|
|
9
|
-
return t({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" }, child: [] }] })(c);
|
|
10
|
-
}
|
|
11
|
-
function n(c) {
|
|
12
|
-
return t({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" }, child: [] }] })(c);
|
|
13
|
-
}
|
|
14
|
-
function h(c) {
|
|
15
|
-
return t({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z" }, child: [] }] })(c);
|
|
16
|
-
}
|
|
17
|
-
function e(c) {
|
|
18
|
-
return t({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z" }, child: [] }] })(c);
|
|
19
|
-
}
|
|
20
|
-
function d(c) {
|
|
21
|
-
return t({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z" }, child: [] }] })(c);
|
|
22
|
-
}
|
|
23
|
-
function o(c) {
|
|
24
|
-
return t({ attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M.3 166.9L0 68C0 57.7 9.5 50.1 19.5 52.3l35.6 7.9c10.6 2.3 19.2 9.9 23 20L96 128l127.3 37.6L181.8 20.4C178.9 10.2 186.6 0 197.2 0l40.1 0c11.6 0 22.2 6.2 27.9 16.3l109 193.8 107.2 31.7c15.9 4.7 30.8 12.5 43.7 22.8l34.4 27.6c24 19.2 18.1 57.3-10.7 68.2c-41.2 15.6-86.2 18.1-128.8 7L121.7 289.8c-11.1-2.9-21.2-8.7-29.3-16.9L9.5 189.4c-5.9-6-9.3-14.1-9.3-22.5zM32 448l576 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32zm96-80a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm128-16a32 32 0 1 1 0 64 32 32 0 1 1 0-64z" }, child: [] }] })(c);
|
|
25
|
-
}
|
|
26
|
-
function s(c) {
|
|
27
|
-
return t({ attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M381 114.9L186.1 41.8c-16.7-6.2-35.2-5.3-51.1 2.7L89.1 67.4C78 73 77.2 88.5 87.6 95.2l146.9 94.5L136 240 77.8 214.1c-8.7-3.9-18.8-3.7-27.3 .6L18.3 230.8c-9.3 4.7-11.8 16.8-5 24.7l73.1 85.3c6.1 7.1 15 11.2 24.3 11.2l137.7 0c5 0 9.9-1.2 14.3-3.4L535.6 212.2c46.5-23.3 82.5-63.3 100.8-112C645.9 75 627.2 48 600.2 48l-57.4 0c-20.2 0-40.2 4.8-58.2 14L381 114.9zM0 480c0 17.7 14.3 32 32 32l576 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 448c-17.7 0-32 14.3-32 32z" }, child: [] }] })(c);
|
|
28
|
-
}
|
|
29
|
-
function L(c) {
|
|
30
|
-
return t({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M482.3 192c34.2 0 93.7 29 93.7 64c0 36-59.5 64-93.7 64l-116.6 0L265.2 495.9c-5.7 10-16.3 16.1-27.8 16.1l-56.2 0c-10.6 0-18.3-10.2-15.4-20.4l49-171.6L112 320 68.8 377.6c-3 4-7.8 6.4-12.8 6.4l-42 0c-7.8 0-14-6.3-14-14c0-1.3 .2-2.6 .5-3.9L32 256 .5 145.9c-.4-1.3-.5-2.6-.5-3.9c0-7.8 6.3-14 14-14l42 0c5 0 9.8 2.4 12.8 6.4L112 192l102.9 0-49-171.6C162.9 10.2 170.6 0 181.2 0l56.2 0c11.5 0 22.1 6.2 27.8 16.1L365.7 192l116.6 0z" }, child: [] }] })(c);
|
|
31
|
-
}
|
|
32
|
-
function u(c) {
|
|
33
|
-
return t({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M176 56l0 40 160 0 0-40c0-4.4-3.6-8-8-8L184 48c-4.4 0-8 3.6-8 8zM128 96l0-40c0-30.9 25.1-56 56-56L328 0c30.9 0 56 25.1 56 56l0 40 0 32 0 352-256 0 0-352 0-32zM64 96l32 0 0 384-32 0c-35.3 0-64-28.7-64-64L0 160c0-35.3 28.7-64 64-64zM448 480l-32 0 0-384 32 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64z" }, child: [] }] })(c);
|
|
34
|
-
}
|
|
35
|
-
function z(c) {
|
|
36
|
-
return t({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z" }, child: [] }] })(c);
|
|
37
|
-
}
|
|
38
|
-
function M(c) {
|
|
39
|
-
return t({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z" }, child: [] }] })(c);
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
i as F,
|
|
43
|
-
n as a,
|
|
44
|
-
M as b,
|
|
45
|
-
s as c,
|
|
46
|
-
L as d,
|
|
47
|
-
o as e,
|
|
48
|
-
e as f,
|
|
49
|
-
d as g,
|
|
50
|
-
u as h,
|
|
51
|
-
l as i,
|
|
52
|
-
h as j,
|
|
53
|
-
r as k,
|
|
54
|
-
z as l
|
|
55
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { EPaymentType } from '../../enums';
|
|
3
|
-
import { IFlightPaymentOption, IFlightResult } from '../../hooks/useFlightSearch/useFlightSearch.types';
|
|
4
|
-
export interface IFlightResultProps {
|
|
5
|
-
/**
|
|
6
|
-
* The flight details to be displayed in the component.
|
|
7
|
-
*/
|
|
8
|
-
details: IFlightResult;
|
|
9
|
-
/**
|
|
10
|
-
* Callback function to handle click events on the flight result.
|
|
11
|
-
* @param flightDetails - The details of the flight that was clicked.
|
|
12
|
-
* @param paymentType - The type of payment selected (cash or points).
|
|
13
|
-
*/
|
|
14
|
-
onClick: (flightDetails: IFlightResult, paymentType?: EPaymentType) => void;
|
|
15
|
-
/**
|
|
16
|
-
* Flag to determine if the best value calculation should be shown.
|
|
17
|
-
* If `true`, the component will display the best value calculation.
|
|
18
|
-
*/
|
|
19
|
-
showBestValue?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Callback function to handle showing the best value calculation.
|
|
22
|
-
* This function will be called when the user clicks on the best value flag.
|
|
23
|
-
*/
|
|
24
|
-
onShowBestValueCalculation?: (details: IFlightResult) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Flag to determine if custom styling should be used. If `false`, the component will use the default Awayz Style.
|
|
27
|
-
*/
|
|
28
|
-
customStyling?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Optional custom component to display cash value
|
|
31
|
-
*/
|
|
32
|
-
customCashComponent?: React.ReactNode;
|
|
33
|
-
/**
|
|
34
|
-
* Optional custom component to display points value
|
|
35
|
-
*/
|
|
36
|
-
customPointsComponent?: React.ReactNode;
|
|
37
|
-
onBookWithCash?: (flightDetails: IFlightPaymentOption, flightResult?: IFlightResult) => void;
|
|
38
|
-
onBookWithPoints?: (flightDetails: IFlightPaymentOption) => void;
|
|
39
|
-
}
|
|
40
|
-
export declare const FlightResult: ({ details, onClick, showBestValue, onShowBestValueCalculation, customStyling, customCashComponent, customPointsComponent, onBookWithCash, onBookWithPoints }: IFlightResultProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const t = (e) => Array.isArray(e) ? e.map((r) => t(r)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((r, a) => {
|
|
2
|
-
const n = s(a);
|
|
3
|
-
return r[n] = t(e[a]), r;
|
|
4
|
-
}, {}) : e, s = (e) => (e = e.replace(/^_+/, ""), e.replace(/_([a-z])/gi, (r, a) => a.toUpperCase()));
|
|
5
|
-
export {
|
|
6
|
-
t as c
|
|
7
|
-
};
|
|
File without changes
|
|
File without changes
|