@odynn/awayz-core 0.2.15 → 0.2.16
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-Dt2-k7CN.js → AccountService--d4c37gO.js} +4 -4
- package/dist/components/CashValue/CashValue.js +1 -1
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +9 -9
- package/dist/hooks/useSearchLimit.js +13 -10
- package/dist/lib/hooks/useSearchLimit.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/providers/AwayzProvider.js +1 -1
- package/dist/services/account/AccountService.js +1 -1
- package/dist/services/currency/CurrencyService.js +1 -1
- package/dist/services/instance.js +1 -1
- package/package.json +1 -1
|
@@ -7710,12 +7710,12 @@ class bA {
|
|
|
7710
7710
|
}
|
|
7711
7711
|
const gM = new bA();
|
|
7712
7712
|
export {
|
|
7713
|
-
|
|
7713
|
+
Zo as A,
|
|
7714
7714
|
f0 as E,
|
|
7715
|
-
|
|
7716
|
-
|
|
7715
|
+
gM as a,
|
|
7716
|
+
e1 as b,
|
|
7717
7717
|
Z as c,
|
|
7718
|
-
|
|
7718
|
+
E0 as d,
|
|
7719
7719
|
nA as g,
|
|
7720
7720
|
$o as i
|
|
7721
7721
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as Fe, Fragment as GO, jsxs as Jo } from "react/jsx-runtime";
|
|
2
2
|
import * as Q from "react";
|
|
3
3
|
import Jl, { useLayoutEffect as XO, useEffect as qO, useMemo as KO } from "react";
|
|
4
|
-
import { g as ZO,
|
|
4
|
+
import { g as ZO, b as JO } from "../../AccountService--d4c37gO.js";
|
|
5
5
|
import { useQuery as e_ } from "@tanstack/react-query";
|
|
6
6
|
import { CurrencyService as t_ } from "../../services/currency/CurrencyService.js";
|
|
7
7
|
import '../../assets/_styles.css';/* empty css */
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as _, E as r, a as o, b as U } from "../../AccountService--d4c37gO.js";
|
|
2
2
|
import { useState as E, useCallback as R, useEffect as y } from "react";
|
|
3
3
|
import { EAuthFlow as S } from "../../types/EAuthFlow.js";
|
|
4
4
|
import { awayzClient as H } from "../../configs/awayzClient.js";
|
|
5
5
|
const M = (s, t) => {
|
|
6
|
-
var f,
|
|
7
|
-
let c = "",
|
|
8
|
-
typeof t == "string" ? c = t : t instanceof _ ? (c = t.message,
|
|
6
|
+
var f, d;
|
|
7
|
+
let c = "", m = t;
|
|
8
|
+
typeof t == "string" ? c = t : t instanceof _ ? (c = t.message, m = {
|
|
9
9
|
message: t.message,
|
|
10
10
|
cause: t.cause,
|
|
11
11
|
status: t.status,
|
|
12
12
|
data: (f = t == null ? void 0 : t.response) == null ? void 0 : f.data
|
|
13
|
-
}) : c = t.message, (
|
|
13
|
+
}) : c = t.message, (d = window.parent) == null || d.postMessage(
|
|
14
14
|
{
|
|
15
15
|
type: "auth_error",
|
|
16
|
-
details: { message: c, action: s, info:
|
|
16
|
+
details: { message: c, action: s, info: m }
|
|
17
17
|
},
|
|
18
18
|
"*"
|
|
19
19
|
);
|
|
20
20
|
}, V = (s) => {
|
|
21
|
-
const [t, c] = E(!0), [
|
|
21
|
+
const [t, c] = E(!0), [m, f] = E(!1), [d, T] = E(), [A, k] = E(), [O, I] = E([]), w = R(
|
|
22
22
|
async (a) => {
|
|
23
23
|
s != null && s.onSuccess && (s == null || s.onSuccess(a)), s != null && s.onSuccessAsync && await (s == null ? void 0 : s.onSuccessAsync(a)), c(!1), f(!0), T(a.token), k(a.user);
|
|
24
24
|
},
|
|
@@ -135,8 +135,8 @@ const M = (s, t) => {
|
|
|
135
135
|
};
|
|
136
136
|
}, []), {
|
|
137
137
|
isAuthenticating: t,
|
|
138
|
-
isAuthenticated:
|
|
139
|
-
token:
|
|
138
|
+
isAuthenticated: m,
|
|
139
|
+
token: d,
|
|
140
140
|
user: A,
|
|
141
141
|
supportedRegions: O,
|
|
142
142
|
signIn: async (a) => {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useQuery as
|
|
1
|
+
import { b as o, a as s, d as i } from "../AccountService--d4c37gO.js";
|
|
2
|
+
import { useQuery as n } from "@tanstack/react-query";
|
|
3
3
|
import "react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
var a = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.FLIGHT = "Flight", e))(a || {});
|
|
5
|
+
const d = () => {
|
|
6
|
+
const { data: e } = n({
|
|
7
|
+
queryKey: [o.SEARCH_LIMIT],
|
|
7
8
|
queryFn: async () => {
|
|
8
|
-
const { data: t, ...
|
|
9
|
-
if (!
|
|
10
|
-
console.error({ reqLimitError:
|
|
9
|
+
const { data: t, ...r } = await s.getRequestLimit();
|
|
10
|
+
if (!r.success) {
|
|
11
|
+
console.error({ reqLimitError: r });
|
|
11
12
|
return;
|
|
12
13
|
}
|
|
13
14
|
return i(t);
|
|
@@ -15,8 +16,10 @@ const n = () => {
|
|
|
15
16
|
staleTime: 3e5
|
|
16
17
|
// 5 minutes
|
|
17
18
|
});
|
|
18
|
-
return
|
|
19
|
+
return e ? [a.FLIGHT, a.HOTEL].map(
|
|
20
|
+
(t) => e.find((r) => r.searchType === t)
|
|
21
|
+
) : [void 0, void 0];
|
|
19
22
|
};
|
|
20
23
|
export {
|
|
21
|
-
|
|
24
|
+
d as useSearchLimit
|
|
22
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ISearchLimit } from '../services/account/AccountServices.types';
|
|
2
|
-
export declare const useSearchLimit: () => ISearchLimit
|
|
2
|
+
export declare const useSearchLimit: () => [ISearchLimit, ISearchLimit] | [undefined, undefined];
|
|
3
3
|
/**
|
|
4
4
|
* "data": [
|
|
5
5
|
{
|
package/dist/main.js
CHANGED
|
@@ -2,7 +2,7 @@ import { AwayzProvider as r } from "./providers/AwayzProvider.js";
|
|
|
2
2
|
import { useAwayzContext as a } from "./hooks/useAwayzContext.js";
|
|
3
3
|
import { useSearchLimit as m } from "./hooks/useSearchLimit.js";
|
|
4
4
|
import { EAuthFlow as s } from "./types/EAuthFlow.js";
|
|
5
|
-
import { c as f, i as n } from "./AccountService
|
|
5
|
+
import { c as f, i as n } from "./AccountService--d4c37gO.js";
|
|
6
6
|
import { awayzClient as c } from "./configs/awayzClient.js";
|
|
7
7
|
import { CashValue as w, EToolTipPosition as h } from "./components/CashValue/CashValue.js";
|
|
8
8
|
import { getBaseUrl as z } from "./configs/baseUrl.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as i } from "react";
|
|
3
3
|
import { AwayzContext as m } from "../context/AwayzContext.js";
|
|
4
|
-
import { E as e } from "../AccountService
|
|
4
|
+
import { E as e } from "../AccountService--d4c37gO.js";
|
|
5
5
|
import { useAwayzAuth as s } from "../hooks/useAwayzAuth/useAwayzAuth.js";
|
|
6
6
|
import { setBaseUrl as l } from "../configs/baseUrl.js";
|
|
7
7
|
import { QueryClientProvider as u } from "@tanstack/react-query";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../assets/_styles.css';var s = Object.defineProperty;
|
|
2
2
|
var i = (t, r, e) => r in t ? s(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
3
3
|
var c = (t, r, e) => i(t, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
-
import {
|
|
4
|
+
import { a as u, b as y, c as p } from "../../AccountService--d4c37gO.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { ECurrencyEndpoints as m } from "../../configs/endpoints.js";
|
|
7
7
|
import "react/jsx-runtime";
|