@odynn/awayz-core 0.4.10 → 0.5.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/{AccountService-DdcBI9BS.js → AccountService-CtMwRIoL.js} +92 -92
- package/dist/{TripsService-CLvs14Rq.js → TripsService-B9VUFRE1.js} +1 -1
- package/dist/assets/_styles3.css +1 -1
- package/dist/assets/_styles4.css +1 -1
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +208 -60
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +1 -1
- package/dist/components/CashValue/CashValue.js +3 -3
- package/dist/components/CashValue/CashValue.stories.js +2 -2
- package/dist/components/Menu/Menu.js +2 -2
- package/dist/components/Wallet/Card/Card.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +2 -2
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +4 -3
- package/dist/hooks/useBookingManagement/useBookingManagement.js +2 -2
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +2 -2
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +3 -3
- package/dist/hooks/useTripManagement/useTripManagement.test.js +3 -3
- package/dist/hooks/useWallet/useWallet.js +2 -2
- package/dist/hooks/useWallet/useWallet.test.js +2 -2
- package/dist/{index-CDh8vAM_.js → index-agnspg2e.js} +2 -2
- package/dist/keys-DcSEucOc.js +5 -0
- package/dist/main.js +1 -1
- package/dist/providers/AwayzProvider.js +9 -8
- package/dist/services/account/AccountService.js +3 -2
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +2 -2
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +4 -3
- package/dist/services/instanceConfig.js +8 -7
- 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/package.json +6 -2
|
@@ -123,9 +123,9 @@ function _(t) {
|
|
|
123
123
|
return o({ attr: { viewBox: "0 0 352 512" }, child: [{ tag: "path", attr: { d: "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" }, child: [] }] })(t);
|
|
124
124
|
}
|
|
125
125
|
export {
|
|
126
|
-
|
|
126
|
+
_ as F,
|
|
127
127
|
o as G,
|
|
128
|
-
|
|
128
|
+
E as a,
|
|
129
129
|
C as b,
|
|
130
130
|
z as c,
|
|
131
131
|
L as d
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var T = /* @__PURE__ */ ((_) => (_.TOKEN = "token", _.REFRESH_TOKEN = "refreshToken", _.CLIENT_ID = "clientId", _.AUTH_FLOW = "authFlow", _))(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
|
+
T as E,
|
|
4
|
+
d as a
|
|
5
|
+
};
|
package/dist/main.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useTripManagement as f, validateUpdateTripArgs as s } from "./hooks/use
|
|
|
6
6
|
import { useBookingManagement as c } from "./hooks/useBookingManagement/useBookingManagement.js";
|
|
7
7
|
import { EAuthFlow as y } from "./types/EAuthFlow.js";
|
|
8
8
|
import { EHotelCurrencyOption as d, currencySymbols as C } from "./types/ECurrency.js";
|
|
9
|
-
import { c as w, i as A } from "./AccountService-
|
|
9
|
+
import { c as w, i as A } from "./AccountService-CtMwRIoL.js";
|
|
10
10
|
import { clientNoRetryInstance as E } from "./services/noRetryInstance.js";
|
|
11
11
|
import { CurrencyService as h } from "./services/currency/CurrencyService.js";
|
|
12
12
|
import { EBookingType as S } from "./services/trips/TripService.types.js";
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { AwayzContext as
|
|
2
|
+
import { useEffect as m } from "react";
|
|
3
|
+
import { AwayzContext as a } from "../context/AwayzContext.js";
|
|
4
4
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import {
|
|
5
|
+
import { E as r } from "../keys-DcSEucOc.js";
|
|
6
6
|
import { useAwayzAuth as l } from "../hooks/useAwayzAuth/useAwayzAuth.js";
|
|
7
7
|
import { setCustomBaseUrl as i, setBaseUrl as u } from "../configs/baseUrl.js";
|
|
8
8
|
import { QueryClientProvider as d } from "@tanstack/react-query";
|
|
9
|
+
import "../AccountService-CtMwRIoL.js";
|
|
9
10
|
import { awayzClient as p } from "../configs/awayzClient.js";
|
|
10
11
|
import "../services/noRetryInstance.js";
|
|
11
12
|
import '../assets/_styles5.css';import '../assets/_styles4.css';import '../assets/_styles3.css';import '../assets/_styles2.css';import '../assets/_styles.css';/* empty css */
|
|
12
13
|
/* empty css */
|
|
13
|
-
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
|
+
/* empty css */
|
|
15
16
|
/* empty css */
|
|
16
17
|
import { defaultAwayzConfig as h } from "../configs/defaultAwayzConfig.js";
|
|
17
|
-
const
|
|
18
|
+
const P = ({ children: o, config: e }) => {
|
|
18
19
|
const s = l({
|
|
19
20
|
authFlow: e.authFlow,
|
|
20
21
|
onSuccess: e.onAuthSuccess,
|
|
21
22
|
onError: e.onAuthFailure,
|
|
22
23
|
trustedOrigins: e.trustedOrigins
|
|
23
24
|
});
|
|
24
|
-
return
|
|
25
|
+
return m(() => {
|
|
25
26
|
if (!e.clientId) {
|
|
26
27
|
console.error("You need to provide a client ID to the AwayzProvider");
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
30
|
localStorage.setItem(r.CLIENT_ID, e.clientId), localStorage.setItem(r.AUTH_FLOW, e.authFlow), e.debugRefreshToken && e.testMode && (localStorage.setItem(r.REFRESH_TOKEN, e.debugRefreshToken), localStorage.setItem(r.TOKEN, e.debugRefreshToken)), e.overrideBaseUrl ? i(e.overrideBaseUrl) : u(e.testMode ?? !1);
|
|
30
31
|
}, [e]), /* @__PURE__ */ t(d, { client: p, children: /* @__PURE__ */ t(
|
|
31
|
-
|
|
32
|
+
a.Provider,
|
|
32
33
|
{
|
|
33
34
|
value: {
|
|
34
35
|
...s,
|
|
@@ -42,5 +43,5 @@ const B = ({ children: o, config: e }) => {
|
|
|
42
43
|
) });
|
|
43
44
|
};
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
P as AwayzProvider
|
|
46
47
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as e } from "../../AccountService-CtMwRIoL.js";
|
|
3
|
+
import "../../keys-DcSEucOc.js";
|
|
3
4
|
import "react";
|
|
4
5
|
import "../../configs/endpoints.js";
|
|
5
6
|
import "../../configs/awayzClient.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
e as AccountService
|
|
8
9
|
};
|
|
@@ -2,7 +2,7 @@ var l = Object.defineProperty;
|
|
|
2
2
|
var u = (r, e, a) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[e] = a;
|
|
3
3
|
var c = (r, e, a) => u(r, typeof e != "symbol" ? e + "" : e, a);
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { c as i, b as s } from "../../AccountService-
|
|
5
|
+
import { c as i, b as s } from "../../AccountService-CtMwRIoL.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { EBookingEndpoints as d } from "../../configs/endpoints.js";
|
|
8
8
|
const _ = (r) => {
|
|
@@ -2,7 +2,7 @@ import '../../assets/_styles5.css';import '../../assets/_styles4.css';import '..
|
|
|
2
2
|
var m = (t, r, e) => r in t ? p(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
3
3
|
var n = (t, r, e) => m(t, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { A as C, E, c as s } from "../../AccountService-
|
|
5
|
+
import { A as C, E, c as s } from "../../AccountService-CtMwRIoL.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { ECurrencyEndpoints as a } from "../../configs/endpoints.js";
|
|
8
8
|
import "react/jsx-runtime";
|
|
@@ -12,8 +12,8 @@ import "@tanstack/react-query";
|
|
|
12
12
|
import "../noRetryInstance.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
|
-
/* empty css */
|
|
16
15
|
/* empty css */
|
|
16
|
+
/* empty css */
|
|
17
17
|
/* empty css */
|
|
18
18
|
class d {
|
|
19
19
|
constructor() {
|
package/dist/services/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as o, i as t } from "../AccountService-
|
|
1
|
+
import { c as o, i as t } from "../AccountService-CtMwRIoL.js";
|
|
2
2
|
import { clientNoRetryInstance as c } from "./noRetryInstance.js";
|
|
3
3
|
import { CurrencyService as a } from "./currency/CurrencyService.js";
|
|
4
4
|
import { EBookingType as s } from "./trips/TripService.types.js";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
2
|
-
import
|
|
2
|
+
import "../keys-DcSEucOc.js";
|
|
3
3
|
import "react";
|
|
4
|
+
import { c as p, i as a } from "../AccountService-CtMwRIoL.js";
|
|
4
5
|
import "../configs/baseUrl.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
p as clientInstance,
|
|
8
|
+
a as instance
|
|
8
9
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l, j as m, k as g, g as h, h as u, p as d } from "../AccountService-CtMwRIoL.js";
|
|
2
2
|
import "../configs/baseUrl.js";
|
|
3
3
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
4
|
+
import "../keys-DcSEucOc.js";
|
|
4
5
|
import "react";
|
|
5
6
|
import "../configs/endpoints.js";
|
|
6
7
|
import "../types/EAuthFlow.js";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
l as authFailurePostMessage,
|
|
10
|
+
m as delay,
|
|
11
|
+
g as executeWithDelay,
|
|
12
|
+
h as getClientConfig,
|
|
13
|
+
u as handleAxiosError,
|
|
14
|
+
d as processFailedRequests
|
|
14
15
|
};
|
|
@@ -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 "../../AccountService-
|
|
5
|
+
import { c as i } from "../../AccountService-CtMwRIoL.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 { ERewardsEndpoints as c } from "../../configs/endpoints.js";
|
|
5
|
-
import { c as o } from "../../AccountService-
|
|
5
|
+
import { c as o } from "../../AccountService-CtMwRIoL.js";
|
|
6
6
|
class i {
|
|
7
7
|
constructor() {
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../AccountService-
|
|
1
|
+
import "../../AccountService-CtMwRIoL.js";
|
|
2
2
|
import "./TripService.types.js";
|
|
3
3
|
import "../../configs/endpoints.js";
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { T as s } from "../../TripsService-
|
|
5
|
+
import { T as s } from "../../TripsService-B9VUFRE1.js";
|
|
6
6
|
import "react";
|
|
7
7
|
export {
|
|
8
8
|
s as TripsService
|
|
@@ -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 s, b as c } from "../../AccountService-
|
|
5
|
+
import { c as s, b as c } from "../../AccountService-CtMwRIoL.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { EWalletEndpoints as e } from "../../configs/endpoints.js";
|
|
8
8
|
class A {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odynn/awayz-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -17,7 +17,11 @@
|
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@tanstack/react-query": "^5.66.9",
|
|
19
19
|
"react": "^18.3.1",
|
|
20
|
-
"react-dom": "^18.3.1"
|
|
20
|
+
"react-dom": "^18.3.1",
|
|
21
|
+
"react-i18next": "^15.6.0"
|
|
22
|
+
},
|
|
23
|
+
"optionalDependencies": {
|
|
24
|
+
"react-i18next": "^15.6.0"
|
|
21
25
|
},
|
|
22
26
|
"devDependencies": {
|
|
23
27
|
"@eslint/js": "^9.17.0",
|