@odynn/awayz-core 0.9.33 → 0.10.0
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-CJxjOcrR.js → TripsService-fNtCUyxa.js} +1 -1
- package/dist/assets/_styles.css +1 -1
- package/dist/assets/_styles2.css +1 -1
- package/dist/assets/_styles3.css +1 -1
- package/dist/assets/_styles4.css +1 -1
- package/dist/assets/_styles5.css +1 -1
- package/dist/assets/_styles6.css +1 -1
- package/dist/{cashUtils-DB_r0g-F.js → cashUtils-DnCt66eB.js} +8 -9
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +4 -3
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +30 -22
- package/dist/components/CashValue/CashValue.js +4 -4
- package/dist/components/CashValue/CashValue.stories.js +3 -3
- package/dist/components/ClientPointsValue/ClientPointsValue.js +3 -3
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Wallet/Card/Card.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +3 -3
- package/dist/configs/endpoints.js +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +11 -10
- package/dist/hooks/useBookingManagement/useBookingManagement.js +100 -87
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +17 -16
- package/dist/hooks/useBookingManagement/useBookingManagement.types.js +4 -1
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +4 -4
- package/dist/hooks/useTripManagement/useTripManagement.test.js +4 -4
- package/dist/hooks/useWallet/useWallet.js +3 -3
- package/dist/hooks/useWallet/useWallet.test.js +3 -3
- package/dist/keys-BcBfU51M.js +5 -0
- package/dist/lib/configs/endpoints.d.ts +2 -1
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/useBookingManagement/useBookingManagement.types.d.ts +29 -8
- package/dist/lib/services/account/AccountService.d.ts +2 -1
- package/dist/lib/services/account/AccountServices.types.d.ts +22 -0
- package/dist/lib/services/bookings/BookingService.types.d.ts +16 -0
- package/dist/main.js +28 -26
- package/dist/{noRetryInstance-DKhe8ju0.js → noRetryInstance-C4bqpBc7.js} +136 -131
- package/dist/providers/AwayzProvider.js +6 -5
- package/dist/services/account/AccountService.js +2 -2
- package/dist/services/bookings/BookingService.js +69 -60
- package/dist/services/currency/CurrencyService.js +35 -32
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +2 -2
- package/dist/services/instanceConfig.js +11 -10
- package/dist/services/noRetryInstance.js +1 -1
- 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 +3 -3
- package/package.json +3 -2
- package/dist/_styles.flight-booking-CaUgKcMC.js +0 -5
- package/dist/index-BlYZu1Ej.js +0 -5
- package/dist/lib/components/CashValue/CashValue.stories.d.ts +0 -38
- package/dist/lib/components/Wallet/Card/Card.stories.d.ts +0 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { QueryClientProvider as l } from "@tanstack/react-query";
|
|
3
3
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
4
|
-
import { a as r } from "../
|
|
4
|
+
import { a as r } from "../keys-BcBfU51M.js";
|
|
5
5
|
import { useEffect as i } from "react";
|
|
6
6
|
import { setCustomBaseUrl as u, setBaseUrl as d } from "../configs/baseUrl.js";
|
|
7
7
|
import { defaultAwayzConfig as p } from "../configs/defaultAwayzConfig.js";
|
|
@@ -9,16 +9,17 @@ import { setGatewayBaseUrl as h } from "../configs/gatewayBaseUrl.js";
|
|
|
9
9
|
import { AwayzContext as w } from "../context/AwayzContext.js";
|
|
10
10
|
import { useAwayzAuth as n } from "../hooks/useAwayzAuth/useAwayzAuth.js";
|
|
11
11
|
import "react-i18next";
|
|
12
|
-
import '../assets/
|
|
12
|
+
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 */
|
|
13
|
+
/* empty css */
|
|
13
14
|
/* empty css */
|
|
14
15
|
import { awayzClient as y } from "../configs/awayzClient.js";
|
|
15
|
-
import "../noRetryInstance-
|
|
16
|
+
import "../noRetryInstance-C4bqpBc7.js";
|
|
16
17
|
/* empty css */
|
|
17
18
|
/* empty css */
|
|
18
19
|
import "../index-Cv-wvFlM.js";
|
|
19
20
|
/* empty css */
|
|
20
21
|
import { useFeatureFlags as A } from "../hooks/useFeatureFlags.js";
|
|
21
|
-
const
|
|
22
|
+
const _ = ({ children: t, config: e }) => /* @__PURE__ */ o(l, { client: y, children: /* @__PURE__ */ o(F, { config: e, children: t }) }), F = ({ children: t, config: e }) => {
|
|
22
23
|
const a = n({
|
|
23
24
|
authFlow: e.authFlow,
|
|
24
25
|
onSuccess: e.onAuthSuccess,
|
|
@@ -49,5 +50,5 @@ const N = ({ children: t, config: e }) => /* @__PURE__ */ o(l, { client: y, chil
|
|
|
49
50
|
);
|
|
50
51
|
};
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
_ as AwayzProvider
|
|
53
54
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
2
|
-
import { A as e } from "../../noRetryInstance-
|
|
3
|
-
import "../../
|
|
2
|
+
import { A as e } from "../../noRetryInstance-C4bqpBc7.js";
|
|
3
|
+
import "../../keys-BcBfU51M.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../configs/awayzClient.js";
|
|
6
6
|
import "../../configs/endpoints.js";
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
2
|
+
var f = (c, t, a) => t in c ? g(c, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : c[t] = a;
|
|
3
|
+
var r = (c, t, a) => f(c, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as l, b as _, g as p } from "../../noRetryInstance-C4bqpBc7.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { EBookingEndpoints as i } from "../../configs/endpoints.js";
|
|
8
|
-
const
|
|
9
|
-
const t = /P((\d+)D)?T((\d+)H)?((\d+)M)?/, a =
|
|
8
|
+
const y = (c) => {
|
|
9
|
+
const t = /P((\d+)D)?T((\d+)H)?((\d+)M)?/, a = c.match(t);
|
|
10
10
|
if (a) {
|
|
11
|
-
const
|
|
12
|
-
return `${
|
|
11
|
+
const n = a[2] ? `${a[2]}d ` : "", d = a[4] ? `${a[4]}h ` : "", s = a[6] ? `${a[6]}m` : "";
|
|
12
|
+
return `${n}${d}${s}`.trim();
|
|
13
13
|
} else
|
|
14
|
-
return
|
|
14
|
+
return c;
|
|
15
15
|
};
|
|
16
16
|
class h {
|
|
17
17
|
constructor() {
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
const { data: a } = await
|
|
18
|
+
r(this, "getHotelBooking", async (t) => {
|
|
19
|
+
var s, e;
|
|
20
|
+
const { data: a } = await l.get(
|
|
21
21
|
`${i.USER_HOTEL_BOOKINGS}/${t}`
|
|
22
|
-
),
|
|
22
|
+
), n = a.data.accommodation.rooms[0].rates[0];
|
|
23
23
|
return {
|
|
24
24
|
id: a.data._id,
|
|
25
25
|
rateId: a.data.rate_id,
|
|
26
26
|
quoteId: a.data.quote_id,
|
|
27
27
|
bookingId: a.data.id,
|
|
28
|
-
totalAmount: parseFloat(
|
|
29
|
-
feeAmount: parseFloat(
|
|
30
|
-
taxAmount: parseFloat(
|
|
31
|
-
baseAmount: parseFloat(
|
|
28
|
+
totalAmount: parseFloat(n.total_amount),
|
|
29
|
+
feeAmount: parseFloat(n.fee_amount),
|
|
30
|
+
taxAmount: parseFloat(n.tax_amount),
|
|
31
|
+
baseAmount: parseFloat(n.base_amount),
|
|
32
32
|
cancelledAt: a.data.cancelled_at,
|
|
33
|
-
totalCurrency:
|
|
34
|
-
baseCurrency:
|
|
35
|
-
feeCurrency:
|
|
36
|
-
taxCurrency:
|
|
33
|
+
totalCurrency: n.total_currency,
|
|
34
|
+
baseCurrency: n.base_currency,
|
|
35
|
+
feeCurrency: n.fee_currency,
|
|
36
|
+
taxCurrency: n.tax_currency,
|
|
37
37
|
status: a.data.status,
|
|
38
38
|
description: a.data.accommodation.description,
|
|
39
39
|
name: a.data.accommodation.name,
|
|
@@ -53,39 +53,40 @@ class h {
|
|
|
53
53
|
latitude: a.data.accommodation.location.geographic_coordinates.latitude,
|
|
54
54
|
longitude: a.data.accommodation.location.geographic_coordinates.longitude
|
|
55
55
|
},
|
|
56
|
-
images: a.data.accommodation.photos.map((
|
|
57
|
-
guests: a.data.guests.map((
|
|
58
|
-
var
|
|
56
|
+
images: a.data.accommodation.photos.map((o) => o.url),
|
|
57
|
+
guests: a.data.guests.map((o, m) => {
|
|
58
|
+
var u;
|
|
59
59
|
return {
|
|
60
|
-
familyName:
|
|
61
|
-
givenName:
|
|
62
|
-
type: (
|
|
60
|
+
familyName: o.family_name,
|
|
61
|
+
givenName: o.given_name,
|
|
62
|
+
type: (u = a.data.guest_types[m]) == null ? void 0 : u.type
|
|
63
63
|
};
|
|
64
64
|
}),
|
|
65
|
-
numberOfRooms: (
|
|
66
|
-
cancellationTimeline:
|
|
67
|
-
(
|
|
68
|
-
refundAmount: parseFloat(
|
|
69
|
-
currency:
|
|
70
|
-
before:
|
|
65
|
+
numberOfRooms: (s = a.data.rooms) == null ? void 0 : s.length,
|
|
66
|
+
cancellationTimeline: n.cancellation_timeline.map(
|
|
67
|
+
(o) => ({
|
|
68
|
+
refundAmount: parseFloat(o.refund_amount),
|
|
69
|
+
currency: o.currency,
|
|
70
|
+
before: o.before
|
|
71
71
|
})
|
|
72
72
|
),
|
|
73
|
-
rooms: (
|
|
73
|
+
rooms: (e = a.data.rooms) == null ? void 0 : e.map((o) => {
|
|
74
74
|
var m;
|
|
75
75
|
return {
|
|
76
|
-
beds: (m =
|
|
77
|
-
type:
|
|
78
|
-
count:
|
|
76
|
+
beds: (m = o.beds) == null ? void 0 : m.map((u) => ({
|
|
77
|
+
type: u.type,
|
|
78
|
+
count: u.count
|
|
79
79
|
})),
|
|
80
|
-
totalAmount: parseFloat(
|
|
81
|
-
name:
|
|
80
|
+
totalAmount: parseFloat(o.total_amount),
|
|
81
|
+
name: o.name
|
|
82
82
|
};
|
|
83
83
|
}),
|
|
84
84
|
createdAt: a.data.created_at
|
|
85
85
|
};
|
|
86
86
|
});
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
r(this, "getFlightBooking", async (t) => {
|
|
88
|
+
var d, s;
|
|
89
|
+
const { data: a } = await l.get(
|
|
89
90
|
`${i.USER_FLIGHT_BOOKINGS}/${t}`
|
|
90
91
|
);
|
|
91
92
|
return {
|
|
@@ -112,11 +113,11 @@ class h {
|
|
|
112
113
|
penaltyCurrency: a.data.conditions.refund_before_departure.penalty_currency
|
|
113
114
|
}
|
|
114
115
|
},
|
|
115
|
-
class: a.data.slices[0].fare_brand_name,
|
|
116
|
+
class: (d = a.data.slices[0]) == null ? void 0 : d.fare_brand_name,
|
|
116
117
|
flightOfferId: a.data.offer_id,
|
|
117
118
|
orderId: a.data.order_id,
|
|
118
119
|
cancelledAt: a.data.cancelled_at,
|
|
119
|
-
airlines: a.data.slices[0].segments.map((e) => ({
|
|
120
|
+
airlines: (((s = a.data.slices[0]) == null ? void 0 : s.segments) ?? []).map((e) => ({
|
|
120
121
|
name: e.operating_carrier.name,
|
|
121
122
|
code: e.operating_carrier.iata_code,
|
|
122
123
|
logo: e.operating_carrier.logo_symbol_url
|
|
@@ -136,49 +137,57 @@ class h {
|
|
|
136
137
|
arrivingAt: e.segments.getLast().arriving_at,
|
|
137
138
|
numberOfStops: e.segments.length - 1,
|
|
138
139
|
reference: a.data.booking_reference,
|
|
139
|
-
durationInMinutes:
|
|
140
|
-
origin:
|
|
141
|
-
destination:
|
|
142
|
-
segments:
|
|
140
|
+
durationInMinutes: y(e.duration),
|
|
141
|
+
origin: _(e.origin),
|
|
142
|
+
destination: _(e.destination),
|
|
143
|
+
segments: _(e.segments)
|
|
143
144
|
})),
|
|
144
145
|
availableActions: a.data.available_actions,
|
|
145
|
-
airlineInitiatedChanges:
|
|
146
|
+
airlineInitiatedChanges: _(a.data.airline_initiated_changes) || [],
|
|
147
|
+
cancellationDetails: a.data.cancellation_details ? {
|
|
148
|
+
refundAmount: parseFloat(
|
|
149
|
+
a.data.cancellation_details.refund_amount
|
|
150
|
+
),
|
|
151
|
+
refundCurrency: a.data.cancellation_details.refund_currency,
|
|
152
|
+
refundTo: a.data.cancellation_details.refund_to,
|
|
153
|
+
confirmedAt: a.data.cancellation_details.confirmed_at
|
|
154
|
+
} : void 0
|
|
146
155
|
};
|
|
147
156
|
});
|
|
148
|
-
|
|
149
|
-
const { data: a } = await
|
|
157
|
+
r(this, "initiateCancelFlightBooking", async (t) => {
|
|
158
|
+
const { data: a } = await l.put(
|
|
150
159
|
`${i.INITIATE_FLIGHT_CANCEL}/${t}`
|
|
151
160
|
);
|
|
152
161
|
return a.success;
|
|
153
162
|
});
|
|
154
|
-
|
|
155
|
-
const { data: a } = await
|
|
163
|
+
r(this, "confirmCancelFlightBooking", async (t) => {
|
|
164
|
+
const { data: a } = await l.put(
|
|
156
165
|
`${i.CONFIRM_FLIGHT_CANCEL}/${t}`
|
|
157
166
|
);
|
|
158
167
|
return a.success;
|
|
159
168
|
});
|
|
160
|
-
|
|
161
|
-
const { data: a } = await
|
|
169
|
+
r(this, "cancelHotelBooking", async (t) => {
|
|
170
|
+
const { data: a } = await l.post(
|
|
162
171
|
`${i.CANCEL_HOTEL_BOOKING}/${t}`
|
|
163
172
|
);
|
|
164
173
|
return a.success;
|
|
165
174
|
});
|
|
166
|
-
|
|
175
|
+
r(this, "actionAirlineChanges", async ({
|
|
167
176
|
bookingId: t,
|
|
168
177
|
acceptChanges: a,
|
|
169
|
-
aicId:
|
|
178
|
+
aicId: n
|
|
170
179
|
}) => {
|
|
171
|
-
const { data:
|
|
180
|
+
const { data: d } = await l.post(
|
|
172
181
|
i.ACTION_AIRLINE_CHANGES,
|
|
173
182
|
{
|
|
174
183
|
booking_id: t,
|
|
175
184
|
action_taken: a ? "accepted" : "cancelled",
|
|
176
|
-
aic_id:
|
|
185
|
+
aic_id: n
|
|
177
186
|
}
|
|
178
187
|
);
|
|
179
|
-
return
|
|
188
|
+
return d.success;
|
|
180
189
|
});
|
|
181
|
-
|
|
190
|
+
r(this, "cancelPointsBooking", async (t) => {
|
|
182
191
|
const { data: a } = await p.post(
|
|
183
192
|
`${i.REFUND_POINTS_BOOKING}`,
|
|
184
193
|
{
|
|
@@ -187,7 +196,7 @@ class h {
|
|
|
187
196
|
);
|
|
188
197
|
return a.success;
|
|
189
198
|
});
|
|
190
|
-
|
|
199
|
+
r(this, "getPointsAsCash", async (t) => {
|
|
191
200
|
const { data: a } = await p.get(
|
|
192
201
|
`${i.BOOKING_POINTS_AS_CASH}/${t}`
|
|
193
202
|
);
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import '../../assets/
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '../../assets/_styles5.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles3.css';var f = Object.defineProperty;
|
|
2
|
+
var l = (c, r, t) => r in c ? f(c, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[r] = t;
|
|
3
|
+
var o = (c, r, t) => l(c, typeof r != "symbol" ? r + "" : r, t);
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { E } from "../../
|
|
6
|
-
import { A as C, E as _, c as s } from "../../noRetryInstance-DKhe8ju0.js";
|
|
5
|
+
import { A as i, E as u, c as y } from "../../noRetryInstance-C4bqpBc7.js";
|
|
7
6
|
import "react";
|
|
8
|
-
import { ECurrencyEndpoints as
|
|
7
|
+
import { ECurrencyEndpoints as p } from "../../configs/endpoints.js";
|
|
9
8
|
import "react/jsx-runtime";
|
|
10
9
|
import "react-i18next";
|
|
11
10
|
/* empty css */
|
|
12
|
-
|
|
11
|
+
/* empty css */
|
|
13
12
|
/* empty css */
|
|
14
13
|
import "@tanstack/react-query";
|
|
15
14
|
/* empty css */
|
|
@@ -17,28 +16,32 @@ import "@tanstack/react-query";
|
|
|
17
16
|
import "../../index-Cv-wvFlM.js";
|
|
18
17
|
import "../../context/AwayzContext.js";
|
|
19
18
|
/* empty css */
|
|
20
|
-
import { awayzClient as
|
|
19
|
+
import { awayzClient as m } from "../../configs/awayzClient.js";
|
|
21
20
|
class d {
|
|
22
21
|
constructor() {
|
|
23
|
-
|
|
22
|
+
o(this, "convertCurrency", async ({
|
|
24
23
|
baseCurrency: r,
|
|
25
|
-
targetCurrency:
|
|
24
|
+
targetCurrency: t
|
|
26
25
|
}) => {
|
|
26
|
+
var n;
|
|
27
27
|
try {
|
|
28
|
-
const { success:
|
|
29
|
-
queryKey: [
|
|
30
|
-
queryFn:
|
|
28
|
+
const { success: e, data: C } = await m.ensureQueryData({
|
|
29
|
+
queryKey: [u.CHECK_USER],
|
|
30
|
+
queryFn: i.checkUser
|
|
31
|
+
}), a = await m.ensureQueryData({
|
|
32
|
+
queryKey: [u.CLIENT_DETAILS],
|
|
33
|
+
queryFn: i.getClientDetails
|
|
31
34
|
});
|
|
32
|
-
if (!
|
|
35
|
+
if (!e || !a)
|
|
33
36
|
throw new Error("Failed to fetch user data");
|
|
34
|
-
const { userRegion:
|
|
35
|
-
target_currency:
|
|
37
|
+
const { userRegion: E, preferences: _ } = C, { data: s } = await y.post(p.CURRENCY_CONVERSION, {
|
|
38
|
+
target_currency: t ?? _.currency ?? E.currency,
|
|
36
39
|
base_currency: r
|
|
37
40
|
});
|
|
38
|
-
if (
|
|
39
|
-
return
|
|
40
|
-
} catch (
|
|
41
|
-
console.error(
|
|
41
|
+
if (e && s.data)
|
|
42
|
+
return s.data.conversion_rate * (1 + (((n = a.pointsAsCash) == null ? void 0 : n.exchangeRateBuffer) ?? 0));
|
|
43
|
+
} catch (e) {
|
|
44
|
+
console.error(e);
|
|
42
45
|
}
|
|
43
46
|
return 0;
|
|
44
47
|
});
|
|
@@ -50,27 +53,27 @@ class d {
|
|
|
50
53
|
* @parm amount the amount to be converted from the base to the target currency
|
|
51
54
|
* @returns the converted amount
|
|
52
55
|
*/
|
|
53
|
-
|
|
56
|
+
o(this, "convertToCurrency", async ({
|
|
54
57
|
baseCurrency: r,
|
|
55
|
-
targetCurrency:
|
|
56
|
-
amount:
|
|
58
|
+
targetCurrency: t,
|
|
59
|
+
amount: n
|
|
57
60
|
}) => {
|
|
58
61
|
try {
|
|
59
|
-
const { data:
|
|
60
|
-
target_currency:
|
|
62
|
+
const { data: e } = await y.post(p.CURRENCY_CONVERSION, {
|
|
63
|
+
target_currency: t,
|
|
61
64
|
base_currency: r,
|
|
62
|
-
amount:
|
|
65
|
+
amount: n
|
|
63
66
|
});
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
66
|
-
} catch (
|
|
67
|
-
console.error(
|
|
67
|
+
if (e.success)
|
|
68
|
+
return e.data.conversion_result;
|
|
69
|
+
} catch (e) {
|
|
70
|
+
console.error(e);
|
|
68
71
|
}
|
|
69
72
|
return 0;
|
|
70
73
|
});
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
|
-
const
|
|
76
|
+
const b = new d();
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
b as CurrencyService
|
|
76
79
|
};
|
package/dist/services/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CurrencyService as a } from "./currency/CurrencyService.js";
|
|
2
|
-
import { c as t, a as o, g as c, i as s } from "../noRetryInstance-
|
|
2
|
+
import { c as t, a as o, g as c, i as s } from "../noRetryInstance-C4bqpBc7.js";
|
|
3
3
|
import { RewardsService as p } from "./rewards/RewardsService.js";
|
|
4
4
|
import { EBookingType as m } from "./trips/TripService.types.js";
|
|
5
5
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
2
|
-
import "../
|
|
2
|
+
import "../keys-BcBfU51M.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { c as r, g as s, i as c } from "../noRetryInstance-
|
|
4
|
+
import { c as r, g as s, i as c } from "../noRetryInstance-C4bqpBc7.js";
|
|
5
5
|
import "../configs/baseUrl.js";
|
|
6
6
|
export {
|
|
7
7
|
r as clientInstance,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
2
|
-
import "../
|
|
2
|
+
import "../keys-BcBfU51M.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { m as
|
|
4
|
+
import { m as j, k, l as q, h as w, j as A, n as D, p as E } from "../noRetryInstance-C4bqpBc7.js";
|
|
5
5
|
import "../configs/baseUrl.js";
|
|
6
6
|
import "../configs/endpoints.js";
|
|
7
7
|
import "../configs/gatewayBaseUrl.js";
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "react/jsx-runtime";
|
|
10
10
|
import "react-i18next";
|
|
11
|
-
import '../assets/
|
|
11
|
+
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 */
|
|
12
|
+
/* empty css */
|
|
12
13
|
/* empty css */
|
|
13
14
|
/* empty css */
|
|
14
15
|
/* empty css */
|
|
@@ -18,11 +19,11 @@ import "../context/AwayzContext.js";
|
|
|
18
19
|
import "../configs/awayzClient.js";
|
|
19
20
|
import "../types/EAuthFlow.js";
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
j as authFailurePostMessage,
|
|
23
|
+
k as delay,
|
|
24
|
+
q as executeWithDelay,
|
|
25
|
+
w as getClientConfig,
|
|
26
|
+
A as getGatewayConfig,
|
|
27
|
+
D as handleAxiosError,
|
|
28
|
+
E as processFailedRequests
|
|
28
29
|
};
|
|
@@ -2,7 +2,7 @@ var a = Object.defineProperty;
|
|
|
2
2
|
var o = (s, e, r) => e in s ? a(s, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[e] = r;
|
|
3
3
|
var n = (s, e, r) => o(s, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import { EPreferencesEndpoints as u } from "../../configs/endpoints.js";
|
|
5
|
-
import { c as i } from "../../noRetryInstance-
|
|
5
|
+
import { c as i } from "../../noRetryInstance-C4bqpBc7.js";
|
|
6
6
|
class E {
|
|
7
7
|
constructor() {
|
|
8
8
|
n(this, "setCurrency", async (e) => {
|
|
@@ -2,7 +2,7 @@ var s = Object.defineProperty;
|
|
|
2
2
|
var n = (t, e, a) => e in t ? s(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
|
3
3
|
var r = (t, e, a) => n(t, typeof e != "symbol" ? e + "" : e, a);
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { c as o, b as c } from "../../noRetryInstance-
|
|
5
|
+
import { c as o, b as c } from "../../noRetryInstance-C4bqpBc7.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { ERewardsEndpoints as i } from "../../configs/endpoints.js";
|
|
8
8
|
class m {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
2
|
-
import "../../noRetryInstance-
|
|
3
|
-
import { T } from "../../TripsService-
|
|
2
|
+
import "../../noRetryInstance-C4bqpBc7.js";
|
|
3
|
+
import { T } from "../../TripsService-fNtCUyxa.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../configs/defaultAwayzConfig.js";
|
|
6
6
|
import "../../configs/endpoints.js";
|
|
@@ -2,7 +2,7 @@ var o = Object.defineProperty;
|
|
|
2
2
|
var i = (d, a, t) => a in d ? o(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
|
|
3
3
|
var r = (d, a, t) => i(d, typeof a != "symbol" ? a + "" : a, t);
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { c as e, b as c, g as A } from "../../noRetryInstance-
|
|
5
|
+
import { c as e, b as c, g as A } from "../../noRetryInstance-C4bqpBc7.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { EWalletEndpoints as s } from "../../configs/endpoints.js";
|
|
8
8
|
class u {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
2
|
-
import { E as m } from "../noRetryInstance-
|
|
2
|
+
import { E as m } from "../noRetryInstance-C4bqpBc7.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react-i18next";
|
|
6
|
-
import '../assets/
|
|
7
|
-
|
|
6
|
+
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 */
|
|
7
|
+
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
import "@tanstack/react-query";
|
|
10
10
|
import { CurrencyService as n } from "../services/currency/CurrencyService.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odynn/awayz-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"build": "tsc -b && vite build",
|
|
13
13
|
"patch": "npm run build && npm version patch && npm publish --access public",
|
|
14
14
|
"minor": "npm run build && npm version minor && npm publish --access public",
|
|
15
|
-
"major": "npm run build && npm version major && npm publish --access public"
|
|
15
|
+
"major": "npm run build && npm version major && npm publish --access public",
|
|
16
|
+
"yalc-publish": "yalc publish --push"
|
|
16
17
|
},
|
|
17
18
|
"peerDependencies": {
|
|
18
19
|
"@tanstack/react-query": "^5.66.9",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './assets/_styles6.css';var T = /* @__PURE__ */ ((_) => (_.TOKEN = "token", _.REFRESH_TOKEN = "refreshToken", _.CLIENT_ID = "clientId", _.AUTH_FLOW = "authFlow", _.OVERRIDE_TOKEN_EXCHANGE_ENDPOINT = "overrideExchangeTokenEndpoint", _))(T || {}), d = /* @__PURE__ */ ((_) => (_.ISO = "dates:iso", _.DISPLAY_SHORT = "dates:displayShort", _.DISPLAY_MEDIUM = "dates:displayMedium", _.DISPLAY_LONG = "dates:displayLong", _.DISPLAY_FULL = "dates:displayFull", _.DISPLAY_SHORT_WITH_YEAR = "dates:displayShortWithYear", _.DISPLAY_MEDIUM_WITH_YEAR = "dates:displayMediumWithYear", _.DISPLAY_LONG_WITH_YEAR = "dates:displayLongWithYear", _.DISPLAY_FULL_WITH_YEAR = "dates:displayFullWithYear", _.DATE_TIME_SHORT = "dates:dateTimeShort", _.DATE_TIME_MEDIUM = "dates:dateTimeMedium", _.DATE_TIME_LONG = "dates:dateTimeLong", _.DATE_TIME_FULL = "dates:dateTimeFull", _.DATE_TIME_SHORT_WITH_YEAR = "dates:dateTimeShortWithYear", _.DATE_TIME_MEDIUM_WITH_YEAR = "dates:dateTimeMediumWithYear", _.DATE_TIME_LONG_WITH_YEAR = "dates:dateTimeLongWithYear", _.DATE_TIME_FULL_WITH_YEAR = "dates:dateTimeFullWithYear", _.TIME_ONLY = "dates:timeOnly", _.TIME_WITH_SECONDS = "dates:timeWithSeconds", _))(d || {});
|
|
2
|
-
export {
|
|
3
|
-
d as E,
|
|
4
|
-
T as a
|
|
5
|
-
};
|
package/dist/index-BlYZu1Ej.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { EInvalidAmountDisplayOption, EToolTipPosition } from './CashValueTypes';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: ({ amount, currency, position, zeroDisplayOption, customDisplay, decimalPlaces, showConversion, showOriginal }: import('./CashValue').ICashValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
argTypes: {
|
|
10
|
-
zeroDisplayOption: {
|
|
11
|
-
options: EInvalidAmountDisplayOption[];
|
|
12
|
-
mapping: EInvalidAmountDisplayOption[];
|
|
13
|
-
control: {
|
|
14
|
-
type: "select";
|
|
15
|
-
labels: string[];
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
position: {
|
|
19
|
-
options: EToolTipPosition[];
|
|
20
|
-
mapping: EToolTipPosition[];
|
|
21
|
-
control: {
|
|
22
|
-
type: "select";
|
|
23
|
-
labels: string[];
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
tags: string[];
|
|
28
|
-
decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
29
|
-
};
|
|
30
|
-
export default meta;
|
|
31
|
-
type Story = StoryObj<typeof meta>;
|
|
32
|
-
export declare const Default: Story;
|
|
33
|
-
export declare const InvalidAmount: Story;
|
|
34
|
-
export declare const ZeroAmount: Story;
|
|
35
|
-
export declare const ZeroCurrencyAmount: Story;
|
|
36
|
-
export declare const ZeroCurrencyNoDecimalAmount: Story;
|
|
37
|
-
export declare const NegativeAmount: Story;
|
|
38
|
-
export declare const CustomZeroAmount: Story;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ details, onCardDelete }: import('./Card').ICardProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: string;
|
|
7
|
-
};
|
|
8
|
-
tags: string[];
|
|
9
|
-
decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const DarkCard: Story;
|
|
14
|
-
export declare const LightCard: Story;
|