@odynn/awayz-core 0.10.32 → 0.10.35
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/{TripsService-BwBvXdDC.js → TripsService-C6HJZJwL.js} +6 -6
- package/dist/assets/_styles5.css +1 -1
- package/dist/assets/_styles6.css +1 -1
- package/dist/assets/noRetryInstance.css +1 -0
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +1 -1
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +1 -1
- package/dist/components/CashValue/CashValue.js +13 -15
- package/dist/components/CashValue/CashValue.stories.js +15 -15
- package/dist/components/ClientPointsValue/ClientPointsValue.js +18 -20
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +14 -15
- package/dist/configs/awayzUrl.js +12 -0
- package/dist/context/AwayzContext.js +1 -0
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +102 -108
- package/dist/hooks/useBookingManagement/useBookingManagement.js +4 -6
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +2 -4
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +5 -7
- package/dist/hooks/useTripManagement/useTripManagement.test.js +3 -5
- package/dist/hooks/useWallet/useWallet.js +29 -31
- package/dist/hooks/useWallet/useWallet.test.js +2 -4
- package/dist/keys-C7jV6nZg.js +5 -0
- package/dist/lib/configs/awayzConfig.d.ts +3 -2
- package/dist/lib/configs/awayzUrl.d.ts +4 -0
- package/dist/lib/context/AwayzContext.d.ts +1 -0
- package/dist/lib/hooks/useAwayzAuth/useAwayzAuth.d.ts +1 -0
- package/dist/lib/main.d.ts +1 -1
- package/dist/lib/services/account/AccountService.d.ts +2 -1
- package/dist/lib/services/bookings/BookingService.types.d.ts +16 -0
- package/dist/main.js +27 -28
- package/dist/{AccountService-B582vLTc.js → noRetryInstance-C0lN2R80.js} +734 -710
- package/dist/providers/AwayzProvider.js +14 -17
- package/dist/services/account/AccountService.js +2 -2
- package/dist/services/bookings/BookingService.js +70 -62
- package/dist/services/currency/CurrencyService.js +14 -16
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +12 -13
- package/dist/services/instance.js +3 -3
- package/dist/services/instanceConfig.js +21 -11
- package/dist/services/noRetryInstance.js +2 -9
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/dist/utils/clientPoints.js +4 -6
- package/package.json +1 -1
- package/dist/assets/_styles7.css +0 -1
- package/dist/configs/baseUrl.js +0 -11
- package/dist/configs/gatewayBaseUrl.js +0 -8
- package/dist/keys-BcBfU51M.js +0 -5
- package/dist/lib/configs/baseUrl.d.ts +0 -3
- package/dist/lib/configs/gatewayBaseUrl.d.ts +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var v = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var n = (s, e, a) =>
|
|
2
|
+
var f = (s, e, a) => e in s ? v(s, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : s[e] = a;
|
|
3
|
+
var n = (s, e, a) => f(s, typeof e != "symbol" ? e + "" : e, a);
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "./arrayExtensions-DlcBOj5a.js";
|
|
6
|
-
import { c as i,
|
|
6
|
+
import { c as i, f as u, b as d, r as D } from "./noRetryInstance-C0lN2R80.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import { DEFAULT_LOGO as
|
|
8
|
+
import { DEFAULT_LOGO as S } from "./configs/defaultAwayzConfig.js";
|
|
9
9
|
import { EMyTripsEndpoints as o } from "./configs/endpoints.js";
|
|
10
10
|
import { EBookingType as y } from "./services/trips/TripService.types.js";
|
|
11
11
|
const I = "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/";
|
|
@@ -41,7 +41,7 @@ class O {
|
|
|
41
41
|
n(this, "updateTrip", async (e, a) => {
|
|
42
42
|
const { data: t } = await i.put(
|
|
43
43
|
`${o.TRIPS}/${e}`,
|
|
44
|
-
|
|
44
|
+
D(u(a))
|
|
45
45
|
);
|
|
46
46
|
return t != null && t.success ? {
|
|
47
47
|
success: !0,
|
|
@@ -103,7 +103,7 @@ const T = (s) => s.map((e) => {
|
|
|
103
103
|
airlines: e.slices.map((p) => {
|
|
104
104
|
var g;
|
|
105
105
|
return {
|
|
106
|
-
logo: (g = p.carriers.operating_iata_codes) != null && g.length ? `${I}${p.carriers.operating_iata_codes[0]}.svg` :
|
|
106
|
+
logo: (g = p.carriers.operating_iata_codes) != null && g.length ? `${I}${p.carriers.operating_iata_codes[0]}.svg` : S,
|
|
107
107
|
name: p.carriers.operating[0]
|
|
108
108
|
};
|
|
109
109
|
}),
|
package/dist/assets/_styles5.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";*{font-family:Inter,sans-serif!important;margin:0;padding:0;box-sizing:border-box}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";*{font-family:Inter,sans-serif!important;margin:0;padding:0;box-sizing:border-box}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tooltip-content{border-radius:.5rem;border:1px solid var(--border, #e7eef3);padding:1rem;line-height:1;background-color:var(--foreground, #fff);animation-duration:.4s;animation-timing-function:cubic-bezier(.16,1,.3,1);animation-fill-mode:both;will-change:transform,opacity;z-index:500}.tooltip-arrow{fill:var(--foreground, #fff)}.tooltip-content[data-state=delayed-open][data-side=top]{animation-name:tooltip-down}.tooltip-content[data-state=delayed-open][data-side=right]{animation-name:tooltip-right}.tooltip-content[data-state=delayed-open][data-side=bottom]{animation-name:tooltip-up}.tooltip-content[data-state=delayed-open][data-side=left]{animation-name:tooltip-left}@keyframes tooltip-up{0%{opacity:0;transform:translate3d(0,4px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes tooltip-down{0%{opacity:0;transform:translate3d(0,-4px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes tooltip-left{0%{opacity:0;transform:translate3d(4px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes tooltip-right{0%{opacity:0;transform:translate3d(-4px,0,0)}to{opacity:1;transform:translateZ(0)}}
|
package/dist/assets/_styles6.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";*{font-family:Inter,sans-serif!important;margin:0;padding:0;box-sizing:border-box}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";*{font-family:Inter,sans-serif!important;margin:0;padding:0;box-sizing:border-box}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.modal-backdrop{position:fixed;top:60px;left:0;bottom:0;right:0;z-index:400;background-color:var(--opaque-background, rgba(249, 253, 255, .5843137255));transition:all .2s ease-in-out;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center}.modal-backdrop.hidden{background-color:transparent;pointer-events:none;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}.modal-backdrop.hidden .modal-content{scale:.8;opacity:0}.modal-backdrop .modal-content{transition:all .2s ease-in-out;background-color:var(--foreground, #fff);border-radius:.5rem;border:1px solid var(--border, #e7eef3);position:relative}.modal-backdrop .modal-content .divider{width:100%;border:1px solid var(--border, #e7eef3);transform:scaleY(.5);margin:0}.modal-backdrop .modal-content .close-btn{height:30px;width:30px;border-radius:.5rem;border:1px solid var(--border, #e7eef3);display:flex;align-items:center;justify-content:center;position:absolute;top:1rem;right:1rem;transition:all .3s ease-in-out;cursor:pointer}.modal-backdrop .modal-content .close-btn:hover{background-color:var(--border, #e7eef3)}@media screen and (max-width: 768px){.modal-backdrop .modal-content{width:100%;max-height:80dvh;height:fit-content;position:absolute;bottom:0;overflow-y:auto;border-radius:1rem 1rem 0 0}}.modal-backdrop.padding .modal-content{padding:1rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";*{font-family:Inter,sans-serif!important;margin:0;padding:0;box-sizing:border-box}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.currency-conversion{max-width:fit-content}.currency-conversion sub{vertical-align:text-bottom}.currency-conversion svg{fill:var(--primary, #1495f2);transform:scaleX(.75)}.currency-conversion.loading{background-color:var(--border, #e7eef3);background-size:300%;background-position:100% 0;animation:shimmer 2s infinite;color:transparent;padding:0 .5rem;border-radius:.5rem}.currency-conversion-container{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:1rem}.currency-conversion-container>p{font-weight:600}.currency-conversion-container .currency-conversion-amounts{position:relative;display:flex;align-items:center;width:100vw;max-width:300px;border:1px solid var(--border, #e7eef3);border-radius:.5rem}.currency-conversion-container .currency-conversion-amounts div{flex:1;width:50%;padding:1rem;font-weight:600}.currency-conversion-container .currency-conversion-amounts div:first-of-type{border-right:1px solid var(--border, #e7eef3)}.currency-conversion-container .currency-conversion-amounts .conversion-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;background-color:var(--foreground, #fff);color:var(--primary, #1495f2);height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border:1px solid var(--border, #e7eef3)}.currency-conversion-container .currency-conversion-amounts .conversion-icon svg{fill:var(--primary, #1495f2);width:1rem;height:1rem;transform:scaleX(.75)}.currency-conversion-container .currency-conversion-rate{padding:.5rem 1rem;border-radius:.5rem;background-color:var(--border, #e7eef3);font-size:.8rem}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i, Fragment as I } from "react/jsx-runtime";
|
|
2
2
|
import { h as t } from "../../../arrayExtensions-DlcBOj5a.js";
|
|
3
3
|
import { E as d } from "../../../DateFormats-DZD30Nea.js";
|
|
4
|
-
import { E as r } from "../../../keys-
|
|
4
|
+
import { E as r } from "../../../keys-C7jV6nZg.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { useTranslation as _ } from "react-i18next";
|
|
7
7
|
import { F as v } from "../../../index-C8p5kinH.js";
|
|
@@ -2,7 +2,7 @@ import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { G as f, c as u } from "../../../index-C8p5kinH.js";
|
|
3
3
|
import { h as $ } from "../../../arrayExtensions-DlcBOj5a.js";
|
|
4
4
|
import { E } from "../../../DateFormats-DZD30Nea.js";
|
|
5
|
-
import { E as D } from "../../../keys-
|
|
5
|
+
import { E as D } from "../../../keys-C7jV6nZg.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { useTranslation as I } from "react-i18next";
|
|
8
8
|
import '../../../assets/_styles2.css';/* empty css */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery as _ } from "@tanstack/react-query";
|
|
3
|
-
import { g as
|
|
3
|
+
import { g as u, a as S, b as f } from "../../cashUtils-DyxlHnod.js";
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { E as T } from "../../
|
|
5
|
+
import { E as T } from "../../noRetryInstance-C0lN2R80.js";
|
|
6
6
|
import { useMemo as I } from "react";
|
|
7
7
|
import { a as v } from "../../index-C8p5kinH.js";
|
|
8
8
|
import "react-i18next";
|
|
9
|
-
import '../../assets/
|
|
9
|
+
import '../../assets/_styles4.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles3.css';/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { EInvalidAmountDisplayOption as t, EToolTipPosition as M } from "./CashValueTypes.js";
|
|
@@ -15,10 +15,8 @@ import "../../configs/awayzClient.js";
|
|
|
15
15
|
/* empty css */
|
|
16
16
|
import "../../context/AwayzContext.js";
|
|
17
17
|
import { CurrencyService as x } from "../../services/currency/CurrencyService.js";
|
|
18
|
-
import "../../services/noRetryInstance.js";
|
|
19
18
|
import { Tooltip as D } from "../Tooltip/Tooltip.js";
|
|
20
|
-
|
|
21
|
-
const Y = 1e3 * 60 * 60, P = ({
|
|
19
|
+
const Y = 1e3 * 60 * 60, J = ({
|
|
22
20
|
amount: i,
|
|
23
21
|
currency: e,
|
|
24
22
|
position: A = M.RIGHT,
|
|
@@ -30,7 +28,7 @@ const Y = 1e3 * 60 * 60, P = ({
|
|
|
30
28
|
showOriginal: R = !0
|
|
31
29
|
}) => {
|
|
32
30
|
var C, N;
|
|
33
|
-
const { user: o } = O(), n = ((C = o == null ? void 0 : o.preferences) == null ? void 0 : C.currency) ?? ((N = o == null ? void 0 : o.userRegion) == null ? void 0 : N.currency), c = n !== e, { data: a, isPending:
|
|
31
|
+
const { user: o } = O(), n = ((C = o == null ? void 0 : o.preferences) == null ? void 0 : C.currency) ?? ((N = o == null ? void 0 : o.userRegion) == null ? void 0 : N.currency), c = n !== e, { data: a, isPending: m } = _({
|
|
34
32
|
queryKey: [T.CONVERT_CURRENCY, e, n],
|
|
35
33
|
queryFn: () => x.convertCurrency({
|
|
36
34
|
baseCurrency: e,
|
|
@@ -43,19 +41,19 @@ const Y = 1e3 * 60 * 60, P = ({
|
|
|
43
41
|
return null;
|
|
44
42
|
let h = typeof i == "string" ? parseFloat(i) : i;
|
|
45
43
|
if (c) {
|
|
46
|
-
if (
|
|
44
|
+
if (m || !a) return null;
|
|
47
45
|
h = h * a;
|
|
48
46
|
}
|
|
49
47
|
return h;
|
|
50
|
-
}, [i, o,
|
|
48
|
+
}, [i, o, m, c, a]);
|
|
51
49
|
if (R)
|
|
52
|
-
return /* @__PURE__ */ r("span", { className: "currency-conversion", children:
|
|
50
|
+
return /* @__PURE__ */ r("span", { className: "currency-conversion", children: u(
|
|
53
51
|
i,
|
|
54
52
|
e,
|
|
55
53
|
s,
|
|
56
54
|
d
|
|
57
55
|
) });
|
|
58
|
-
if (
|
|
56
|
+
if (m && c)
|
|
59
57
|
return /* @__PURE__ */ r("span", { className: "currency-conversion loading", children: i });
|
|
60
58
|
if (!n || !p || p < 0)
|
|
61
59
|
switch (y) {
|
|
@@ -75,7 +73,7 @@ const Y = 1e3 * 60 * 60, P = ({
|
|
|
75
73
|
return /* @__PURE__ */ r("span", { children: "N/A" });
|
|
76
74
|
}
|
|
77
75
|
return /* @__PURE__ */ l("span", { className: "currency-conversion", children: [
|
|
78
|
-
|
|
76
|
+
u(
|
|
79
77
|
p,
|
|
80
78
|
n,
|
|
81
79
|
s,
|
|
@@ -94,13 +92,13 @@ const Y = 1e3 * 60 * 60, P = ({
|
|
|
94
92
|
n
|
|
95
93
|
] }),
|
|
96
94
|
/* @__PURE__ */ l("div", { className: "currency-conversion-amounts", children: [
|
|
97
|
-
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children:
|
|
95
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: u(
|
|
98
96
|
i,
|
|
99
97
|
e,
|
|
100
98
|
s,
|
|
101
99
|
d
|
|
102
100
|
) }) }),
|
|
103
|
-
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children:
|
|
101
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: u(
|
|
104
102
|
p,
|
|
105
103
|
n,
|
|
106
104
|
s,
|
|
@@ -127,6 +125,6 @@ const Y = 1e3 * 60 * 60, P = ({
|
|
|
127
125
|
] });
|
|
128
126
|
};
|
|
129
127
|
export {
|
|
130
|
-
|
|
128
|
+
J as CashValue,
|
|
131
129
|
Y as CurrencyCallStaleTimeMs
|
|
132
130
|
};
|
|
@@ -9,13 +9,12 @@ import { CashValue as n } from "./CashValue.js";
|
|
|
9
9
|
import { EToolTipPosition as t, EInvalidAmountDisplayOption as o } from "./CashValueTypes.js";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
11
|
import "../../context/AwayzContext.js";
|
|
12
|
-
import "../../
|
|
12
|
+
import "../../noRetryInstance-C0lN2R80.js";
|
|
13
13
|
import "../../configs/awayzClient.js";
|
|
14
14
|
import { EAuthFlow as a } from "../../types/EAuthFlow.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
import { AwayzProvider as i } from "../../providers/AwayzProvider.js";
|
|
17
|
-
|
|
18
|
-
const h = {
|
|
17
|
+
const Z = {
|
|
19
18
|
title: "Core/Cash Value",
|
|
20
19
|
component: n,
|
|
21
20
|
parameters: {
|
|
@@ -47,7 +46,8 @@ const h = {
|
|
|
47
46
|
i,
|
|
48
47
|
{
|
|
49
48
|
config: {
|
|
50
|
-
gatewayBaseUrl: "
|
|
49
|
+
gatewayBaseUrl: "https://appdev.odynn.com",
|
|
50
|
+
baseUrl: "https://appdev.odynn.com",
|
|
51
51
|
authFlow: a.STANDARD,
|
|
52
52
|
clientId: void 0,
|
|
53
53
|
trustedOrigins: ["*"],
|
|
@@ -58,13 +58,13 @@ const h = {
|
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
]
|
|
61
|
-
},
|
|
61
|
+
}, v = {
|
|
62
62
|
name: "Euro to Dollar Cash Value",
|
|
63
63
|
args: {
|
|
64
64
|
amount: 100,
|
|
65
65
|
currency: "EUR"
|
|
66
66
|
}
|
|
67
|
-
},
|
|
67
|
+
}, f = {
|
|
68
68
|
name: "Invalid Amount",
|
|
69
69
|
args: {
|
|
70
70
|
amount: "invalid",
|
|
@@ -77,7 +77,7 @@ const h = {
|
|
|
77
77
|
zeroDisplayOption: o.DISPLAY_AS_ZERO,
|
|
78
78
|
currency: "EUR"
|
|
79
79
|
}
|
|
80
|
-
},
|
|
80
|
+
}, _ = {
|
|
81
81
|
name: "Zero Amount with Display as Zero With Currency",
|
|
82
82
|
args: {
|
|
83
83
|
amount: 0,
|
|
@@ -91,13 +91,13 @@ const h = {
|
|
|
91
91
|
zeroDisplayOption: o.DISPLAY_AS_ZERO_WITH_CURRENCY_NO_DECIMAL,
|
|
92
92
|
currency: "EUR"
|
|
93
93
|
}
|
|
94
|
-
},
|
|
94
|
+
}, I = {
|
|
95
95
|
name: "Negative Amount",
|
|
96
96
|
args: {
|
|
97
97
|
amount: -100,
|
|
98
98
|
currency: "EUR"
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, N = {
|
|
101
101
|
name: "Custom Zero Amount",
|
|
102
102
|
args: {
|
|
103
103
|
amount: 0,
|
|
@@ -107,12 +107,12 @@ const h = {
|
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
export {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
N as CustomZeroAmount,
|
|
111
|
+
v as Default,
|
|
112
|
+
f as InvalidAmount,
|
|
113
|
+
I as NegativeAmount,
|
|
114
114
|
U as ZeroAmount,
|
|
115
|
-
|
|
115
|
+
_ as ZeroCurrencyAmount,
|
|
116
116
|
b as ZeroCurrencyNoDecimalAmount,
|
|
117
|
-
|
|
117
|
+
Z as default
|
|
118
118
|
};
|
|
@@ -1,48 +1,46 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useQuery as
|
|
1
|
+
import { jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as c } from "@tanstack/react-query";
|
|
3
3
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
4
|
-
import { c } from "../../numberUtils-B4wd-SGR.js";
|
|
5
|
-
import { E as f } from "../../
|
|
4
|
+
import { c as p } from "../../numberUtils-B4wd-SGR.js";
|
|
5
|
+
import { E as f } from "../../noRetryInstance-C0lN2R80.js";
|
|
6
6
|
import { useMemo as C } from "react";
|
|
7
7
|
import { useAwayzContext as l } from "../../hooks/useAwayzContext.js";
|
|
8
8
|
import "react-i18next";
|
|
9
|
-
import '../../assets/_styles4.css';import '../../assets/
|
|
9
|
+
import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '../../assets/_styles5.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles3.css';/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
import { CurrencyService as y } from "../../services/currency/CurrencyService.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
15
|
import "../../index-Cv-wvFlM.js";
|
|
16
|
-
/* empty css */
|
|
17
16
|
/* empty css */
|
|
18
17
|
import "../../configs/awayzClient.js";
|
|
19
18
|
import "../../context/AwayzContext.js";
|
|
20
|
-
import "../../services/noRetryInstance.js";
|
|
21
19
|
import { getCurrency as d } from "../../utils/currency.js";
|
|
22
20
|
import { useFeatureFlags as v } from "../../hooks/useFeatureFlags.js";
|
|
23
21
|
import { useWallet as R } from "../../hooks/useWallet/useWallet.js";
|
|
24
|
-
const
|
|
22
|
+
const Y = ({
|
|
25
23
|
cashAmount: m,
|
|
26
|
-
currency:
|
|
24
|
+
currency: e
|
|
27
25
|
}) => {
|
|
28
|
-
const { pointsAsCash:
|
|
29
|
-
() => d(
|
|
26
|
+
const { pointsAsCash: r } = R(), { user: t } = l(), { featureFlags: n } = v(), o = C(
|
|
27
|
+
() => d(n.defaultCurrencyFeature, t),
|
|
30
28
|
[t]
|
|
31
|
-
), { data:
|
|
32
|
-
queryKey: [f.CONVERT_CURRENCY,
|
|
29
|
+
), { data: s } = c({
|
|
30
|
+
queryKey: [f.CONVERT_CURRENCY, e, r.currency],
|
|
33
31
|
queryFn: () => y.convertCurrency({
|
|
34
|
-
baseCurrency:
|
|
35
|
-
targetCurrency:
|
|
32
|
+
baseCurrency: e,
|
|
33
|
+
targetCurrency: r.currency
|
|
36
34
|
}),
|
|
37
35
|
staleTime: 1e3 * 60 * 60,
|
|
38
36
|
// 1 hour
|
|
39
|
-
enabled: !!
|
|
40
|
-
}),
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
37
|
+
enabled: !!e && !!o && e !== o && r.currency !== e && !!r.currency
|
|
38
|
+
}), i = m * (s ?? 1), a = Math.round(i / r.valuePerPoint);
|
|
39
|
+
return /* @__PURE__ */ u("p", { className: "client-points-amount", children: [
|
|
40
|
+
p(a),
|
|
43
41
|
" pts."
|
|
44
42
|
] });
|
|
45
43
|
};
|
|
46
44
|
export {
|
|
47
|
-
|
|
45
|
+
Y as ClientPointsValue
|
|
48
46
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/
|
|
2
|
+
import '../../assets/_styles6.css';/* empty css */
|
|
3
3
|
import { r as i } from "../../index-Cv-wvFlM.js";
|
|
4
4
|
const s = ({ show: t, onClose: o, children: r, padding: d = !0 }) => {
|
|
5
5
|
const e = () => {
|
|
@@ -3,7 +3,7 @@ import * as s from "react";
|
|
|
3
3
|
import { useState as ce, useEffect as et } from "react";
|
|
4
4
|
import { u as D, a as tt, c as R, b as z, d as fe, e as rt, f as nt, g as Y, o as ot, s as st, h as it, i as at, j as lt, k as ct, l as dt, m as ut, n as pt, p as ft, P as he } from "../../index-DUTpB-ZJ.js";
|
|
5
5
|
import { r as ht, R as vt } from "../../index-Cv-wvFlM.js";
|
|
6
|
-
import '../../assets/
|
|
6
|
+
import '../../assets/_styles5.css';/* empty css */
|
|
7
7
|
import yt from "../Modal/Modal.js";
|
|
8
8
|
// @__NO_SIDE_EFFECTS__
|
|
9
9
|
function mt(e) {
|
|
@@ -2,24 +2,22 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../../arrayExtensions-DlcBOj5a.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-i18next";
|
|
5
|
-
import '../../../assets/
|
|
5
|
+
import '../../../assets/_styles6.css';import '../../../assets/_styles5.css';import '../../../assets/_styles2.css';import '../../../assets/_styles.css';import '../../../assets/_styles3.css';/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../configs/awayzClient.js";
|
|
10
|
-
import { EAuthFlow as
|
|
11
|
-
import "../../../
|
|
10
|
+
import { EAuthFlow as a } from "../../../types/EAuthFlow.js";
|
|
11
|
+
import "../../../noRetryInstance-C0lN2R80.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
import "../../../index-Cv-wvFlM.js";
|
|
15
|
-
/* empty css */
|
|
16
15
|
import "../../../context/AwayzContext.js";
|
|
17
|
-
import { Card as
|
|
16
|
+
import { Card as r } from "./Card.js";
|
|
18
17
|
import { AwayzProvider as e } from "../../../providers/AwayzProvider.js";
|
|
19
|
-
|
|
20
|
-
const b = {
|
|
18
|
+
const z = {
|
|
21
19
|
title: "Wallet/Card",
|
|
22
|
-
component:
|
|
20
|
+
component: r,
|
|
23
21
|
parameters: {
|
|
24
22
|
layout: "centered"
|
|
25
23
|
},
|
|
@@ -29,9 +27,10 @@ const b = {
|
|
|
29
27
|
e,
|
|
30
28
|
{
|
|
31
29
|
config: {
|
|
30
|
+
gatewayBaseUrl: "https://appdev.odynn.com",
|
|
31
|
+
baseUrl: "https://appdev.odynn.com",
|
|
32
32
|
testMode: !0,
|
|
33
|
-
authFlow:
|
|
34
|
-
gatewayBaseUrl: "TODO:",
|
|
33
|
+
authFlow: a.STANDARD,
|
|
35
34
|
trustedOrigins: ["*"],
|
|
36
35
|
clientId: "6790e7c295a102749a33795e"
|
|
37
36
|
},
|
|
@@ -39,7 +38,7 @@ const b = {
|
|
|
39
38
|
}
|
|
40
39
|
)
|
|
41
40
|
]
|
|
42
|
-
},
|
|
41
|
+
}, b = {
|
|
43
42
|
args: {
|
|
44
43
|
details: {
|
|
45
44
|
id: "12345",
|
|
@@ -51,7 +50,7 @@ const b = {
|
|
|
51
50
|
console.log("Card deleted:", o);
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
},
|
|
53
|
+
}, D = {
|
|
55
54
|
args: {
|
|
56
55
|
details: {
|
|
57
56
|
name: "IHG Rewards Club Premier",
|
|
@@ -61,7 +60,7 @@ const b = {
|
|
|
61
60
|
}
|
|
62
61
|
};
|
|
63
62
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
b as DarkCard,
|
|
64
|
+
D as LightCard,
|
|
65
|
+
z as default
|
|
67
66
|
};
|