@odynn/awayz-core 0.2.0 → 0.2.1
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/components/CashValue/CashValue.js +6 -5
- package/dist/components/index.js +4 -0
- package/dist/lib/components/CashValue/CashValue.d.ts +1 -2
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/main.d.ts +1 -0
- package/dist/main.js +8 -6
- package/dist/providers/AwayzProvider.js +7 -6
- package/dist/services/currency/CurrencyService.js +4 -3
- package/package.json +1 -1
- /package/dist/assets/{CashValue.css → _styles.css} +0 -0
|
@@ -4,10 +4,11 @@ import Jl, { useLayoutEffect as XO, useEffect as qO, useMemo as KO } from "react
|
|
|
4
4
|
import { g as ZO, b as JO } from "../../AccountService-BjwUydb_.js";
|
|
5
5
|
import { useQuery as e_ } from "@tanstack/react-query";
|
|
6
6
|
import { CurrencyService as t_ } from "../../services/currency/CurrencyService.js";
|
|
7
|
+
import '../../assets/_styles.css';/* empty css */
|
|
7
8
|
import "../../context/AwayzContext.js";
|
|
8
9
|
import "../../configs/awayzClient.js";
|
|
9
10
|
import { useAwayzContext as n_ } from "../../hooks/useAwayzContext.js";
|
|
10
|
-
|
|
11
|
+
const X0 = (d, m) => {
|
|
11
12
|
var h = new Intl.NumberFormat("en-US", {
|
|
12
13
|
style: "currency",
|
|
13
14
|
currency: m ?? "USD"
|
|
@@ -21089,7 +21090,7 @@ var $L = "VisuallyHidden", qT = Q.forwardRef(
|
|
|
21089
21090
|
)
|
|
21090
21091
|
);
|
|
21091
21092
|
qT.displayName = $L;
|
|
21092
|
-
var YL = qT, [gy,
|
|
21093
|
+
var YL = qT, [gy, AM] = ET("Tooltip", [
|
|
21093
21094
|
jT
|
|
21094
21095
|
]), Sy = jT(), KT = "TooltipProvider", IL = 700, iC = "tooltip.open", [QL, gC] = gy(KT), ZT = (d) => {
|
|
21095
21096
|
const {
|
|
@@ -21509,7 +21510,7 @@ function gM(d) {
|
|
|
21509
21510
|
function ST(d) {
|
|
21510
21511
|
return yM({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z" }, child: [] }] })(d);
|
|
21511
21512
|
}
|
|
21512
|
-
const SM = 1e3 * 60 * 60,
|
|
21513
|
+
const SM = 1e3 * 60 * 60, zM = ({
|
|
21513
21514
|
amount: d,
|
|
21514
21515
|
currency: m,
|
|
21515
21516
|
position: h = "right"
|
|
@@ -21584,7 +21585,7 @@ const EM = ({ children: d, trigger: m, position: h }) => /* @__PURE__ */ Fe(iM,
|
|
|
21584
21585
|
) })
|
|
21585
21586
|
] }) });
|
|
21586
21587
|
export {
|
|
21588
|
+
zM as CashValue,
|
|
21587
21589
|
SM as CurrencyCallStaleTimeMs,
|
|
21588
|
-
CM as EToolTipPosition
|
|
21589
|
-
AM as default
|
|
21590
|
+
CM as EToolTipPosition
|
|
21590
21591
|
};
|
|
@@ -4,8 +4,7 @@ export interface ICashValueProps {
|
|
|
4
4
|
position?: EToolTipPosition;
|
|
5
5
|
}
|
|
6
6
|
export declare const CurrencyCallStaleTimeMs: number;
|
|
7
|
-
declare const CashValue: ({ amount, currency, position }: ICashValueProps) => import("react/jsx-runtime").JSX.Element | "Loading...";
|
|
8
|
-
export default CashValue;
|
|
7
|
+
export declare const CashValue: ({ amount, currency, position }: ICashValueProps) => import("react/jsx-runtime").JSX.Element | "Loading...";
|
|
9
8
|
export declare enum EToolTipPosition {
|
|
10
9
|
TOP = "top",
|
|
11
10
|
BOTTOM = "bottom",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CashValue } from './CashValue/CashValue';
|
package/dist/lib/main.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { AwayzProvider as r } from "./providers/AwayzProvider.js";
|
|
2
2
|
import { useAwayzContext as a } from "./hooks/useAwayzContext.js";
|
|
3
|
-
import { EAuthFlow as
|
|
4
|
-
import { c as
|
|
3
|
+
import { EAuthFlow as f } from "./types/EAuthFlow.js";
|
|
4
|
+
import { c as n, i as p } from "./AccountService-BjwUydb_.js";
|
|
5
5
|
import { awayzClient as i } from "./configs/awayzClient.js";
|
|
6
|
-
import {
|
|
6
|
+
import { CashValue as c } from "./components/CashValue/CashValue.js";
|
|
7
|
+
import { getBaseUrl as u } from "./configs/baseUrl.js";
|
|
7
8
|
export {
|
|
8
9
|
r as AwayzProvider,
|
|
9
|
-
|
|
10
|
+
c as CashValue,
|
|
11
|
+
f as EAuthFlow,
|
|
10
12
|
i as awayzClient,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
n as clientInstance,
|
|
14
|
+
u as getBaseUrl,
|
|
13
15
|
p as instance,
|
|
14
16
|
a as useAwayzContext
|
|
15
17
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as i } from "react";
|
|
3
|
-
import { AwayzContext as
|
|
4
|
-
import { E as
|
|
3
|
+
import { AwayzContext as m } from "../context/AwayzContext.js";
|
|
4
|
+
import { E as a } from "../AccountService-BjwUydb_.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";
|
|
8
8
|
import { awayzClient as d } from "../configs/awayzClient.js";
|
|
9
|
+
import '../assets/_styles.css';/* empty css */
|
|
9
10
|
import { defaultAwayzConfig as n } from "../configs/defaultAwayzConfig.js";
|
|
10
|
-
const
|
|
11
|
+
const C = ({ children: e, config: r }) => {
|
|
11
12
|
const o = s({
|
|
12
13
|
authFlow: r.authFlow,
|
|
13
14
|
onSuccess: () => {
|
|
@@ -19,9 +20,9 @@ const I = ({ children: e, config: r }) => {
|
|
|
19
20
|
console.error("You need to provide a client ID to the AwayzProvider");
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
|
-
localStorage.setItem(
|
|
23
|
+
localStorage.setItem(a.CLIENT_ID, r.clientId), l(r.testMode ?? !1);
|
|
23
24
|
}, [r]), /* @__PURE__ */ t(u, { client: d, children: /* @__PURE__ */ t(
|
|
24
|
-
|
|
25
|
+
m.Provider,
|
|
25
26
|
{
|
|
26
27
|
value: {
|
|
27
28
|
...o,
|
|
@@ -35,5 +36,5 @@ const I = ({ children: e, config: r }) => {
|
|
|
35
36
|
) });
|
|
36
37
|
};
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
C as AwayzProvider
|
|
39
40
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var s = Object.defineProperty;
|
|
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
4
|
import { a as u, b as y, c as p } from "../../AccountService-BjwUydb_.js";
|
|
@@ -8,6 +8,7 @@ import "react/jsx-runtime";
|
|
|
8
8
|
import "../../context/AwayzContext.js";
|
|
9
9
|
import { awayzClient as C } from "../../configs/awayzClient.js";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
|
+
/* empty css */
|
|
11
12
|
class E {
|
|
12
13
|
constructor() {
|
|
13
14
|
c(this, "convertCurrency", async ({
|
|
@@ -33,7 +34,7 @@ class E {
|
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
const
|
|
37
|
+
const K = new E();
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
K as CurrencyService
|
|
39
40
|
};
|
package/package.json
CHANGED
|
File without changes
|