@odynn/awayz-core 0.3.10 → 0.3.12
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/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 -0
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +2 -2
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +2 -2
- package/dist/components/CashValue/CashValue.js +7 -5
- package/dist/components/CashValue/CashValue.stories.js +14 -13
- package/dist/components/Menu/Menu.js +11 -10
- package/dist/components/Wallet/Card/Card.js +35 -0
- package/dist/components/Wallet/Card/Card.stories.js +62 -0
- package/dist/components/index.js +6 -4
- package/dist/configs/endpoints.js +2 -2
- package/dist/hooks/useBookingManagement/useBookingManagement.js +57 -48
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +40 -39
- package/dist/hooks/useTripManagement/useTripManagement.js +4 -3
- package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -1
- package/dist/hooks/useWallet/useWallet.js +52 -33
- package/dist/hooks/useWallet/useWallet.test.js +85 -15
- package/dist/hooks/useWallet/useWallet.types.js +1 -0
- package/dist/index-BC-KTkxU.js +1571 -0
- package/dist/index-CDh8vAM_.js +132 -0
- package/dist/lib/components/Wallet/Card/Card.d.ts +6 -0
- package/dist/lib/components/Wallet/Card/Card.stories.d.ts +14 -0
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/configs/endpoints.d.ts +2 -0
- package/dist/lib/hooks/useBookingManagement/mocks/HotelBooking200.json.d.ts +608 -67
- package/dist/lib/hooks/useBookingManagement/useBookingManagement.types.d.ts +8 -0
- package/dist/lib/hooks/useWallet/mocks/AllCardsResponse200.json.d.ts +177 -0
- package/dist/lib/hooks/useWallet/mocks/GetAllProgramsReponse200.json.d.ts +705 -0
- package/dist/lib/hooks/useWallet/mocks/UserCardsResponse200.json.d.ts +139 -0
- package/dist/lib/hooks/useWallet/useWallet.d.ts +2 -16
- package/dist/lib/hooks/useWallet/useWallet.types.d.ts +50 -0
- package/dist/lib/services/bookings/BookingService.types.d.ts +14 -17
- package/dist/lib/services/trips/TripService.types.d.ts +2 -2
- package/dist/lib/services/wallet/WalletService.d.ts +2 -0
- package/dist/lib/services/wallet/WalletService.types.d.ts +2 -5
- package/dist/main.js +20 -18
- package/dist/providers/AwayzProvider.js +4 -3
- package/dist/services/bookings/BookingService.js +74 -43
- package/dist/services/currency/CurrencyService.js +4 -3
- package/dist/services/trips/TripService.types.js +1 -1
- package/dist/services/wallet/WalletService.js +43 -63
- package/package.json +1 -1
- package/dist/index-COgXcb6p.js +0 -1696
- package/dist/lib/hooks/useWallet/mocks/CardsResponse.json.d.ts +0 -34
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import a from "react";
|
|
2
|
+
var d = {
|
|
3
|
+
color: void 0,
|
|
4
|
+
size: void 0,
|
|
5
|
+
className: void 0,
|
|
6
|
+
style: void 0,
|
|
7
|
+
attr: void 0
|
|
8
|
+
}, m = a.createContext && /* @__PURE__ */ a.createContext(d), g = ["attr", "size", "title"];
|
|
9
|
+
function b(t, e) {
|
|
10
|
+
if (t == null) return {};
|
|
11
|
+
var r = O(t, e), n, i;
|
|
12
|
+
if (Object.getOwnPropertySymbols) {
|
|
13
|
+
var c = Object.getOwnPropertySymbols(t);
|
|
14
|
+
for (i = 0; i < c.length; i++)
|
|
15
|
+
n = c[i], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(t, n) && (r[n] = t[n]);
|
|
16
|
+
}
|
|
17
|
+
return r;
|
|
18
|
+
}
|
|
19
|
+
function O(t, e) {
|
|
20
|
+
if (t == null) return {};
|
|
21
|
+
var r = {};
|
|
22
|
+
for (var n in t)
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(t, n)) {
|
|
24
|
+
if (e.indexOf(n) >= 0) continue;
|
|
25
|
+
r[n] = t[n];
|
|
26
|
+
}
|
|
27
|
+
return r;
|
|
28
|
+
}
|
|
29
|
+
function u() {
|
|
30
|
+
return u = Object.assign ? Object.assign.bind() : function(t) {
|
|
31
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
32
|
+
var r = arguments[e];
|
|
33
|
+
for (var n in r)
|
|
34
|
+
Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
}, u.apply(this, arguments);
|
|
38
|
+
}
|
|
39
|
+
function h(t, e) {
|
|
40
|
+
var r = Object.keys(t);
|
|
41
|
+
if (Object.getOwnPropertySymbols) {
|
|
42
|
+
var n = Object.getOwnPropertySymbols(t);
|
|
43
|
+
e && (n = n.filter(function(i) {
|
|
44
|
+
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
45
|
+
})), r.push.apply(r, n);
|
|
46
|
+
}
|
|
47
|
+
return r;
|
|
48
|
+
}
|
|
49
|
+
function s(t) {
|
|
50
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
51
|
+
var r = arguments[e] != null ? arguments[e] : {};
|
|
52
|
+
e % 2 ? h(Object(r), !0).forEach(function(n) {
|
|
53
|
+
y(t, n, r[n]);
|
|
54
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : h(Object(r)).forEach(function(n) {
|
|
55
|
+
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
}
|
|
60
|
+
function y(t, e, r) {
|
|
61
|
+
return e = w(e), e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
62
|
+
}
|
|
63
|
+
function w(t) {
|
|
64
|
+
var e = P(t, "string");
|
|
65
|
+
return typeof e == "symbol" ? e : e + "";
|
|
66
|
+
}
|
|
67
|
+
function P(t, e) {
|
|
68
|
+
if (typeof t != "object" || !t) return t;
|
|
69
|
+
var r = t[Symbol.toPrimitive];
|
|
70
|
+
if (r !== void 0) {
|
|
71
|
+
var n = r.call(t, e);
|
|
72
|
+
if (typeof n != "object") return n;
|
|
73
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
74
|
+
}
|
|
75
|
+
return (e === "string" ? String : Number)(t);
|
|
76
|
+
}
|
|
77
|
+
function v(t) {
|
|
78
|
+
return t && t.map((e, r) => /* @__PURE__ */ a.createElement(e.tag, s({
|
|
79
|
+
key: r
|
|
80
|
+
}, e.attr), v(e.child)));
|
|
81
|
+
}
|
|
82
|
+
function o(t) {
|
|
83
|
+
return (e) => /* @__PURE__ */ a.createElement(j, u({
|
|
84
|
+
attr: s({}, t.attr)
|
|
85
|
+
}, e), v(t.child));
|
|
86
|
+
}
|
|
87
|
+
function j(t) {
|
|
88
|
+
var e = (r) => {
|
|
89
|
+
var {
|
|
90
|
+
attr: n,
|
|
91
|
+
size: i,
|
|
92
|
+
title: c
|
|
93
|
+
} = t, p = b(t, g), f = i || r.size || "1em", l;
|
|
94
|
+
return r.className && (l = r.className), t.className && (l = (l ? l + " " : "") + t.className), /* @__PURE__ */ a.createElement("svg", u({
|
|
95
|
+
stroke: "currentColor",
|
|
96
|
+
fill: "currentColor",
|
|
97
|
+
strokeWidth: "0"
|
|
98
|
+
}, r.attr, n, p, {
|
|
99
|
+
className: l,
|
|
100
|
+
style: s(s({
|
|
101
|
+
color: t.color || r.color
|
|
102
|
+
}, r.style), t.style),
|
|
103
|
+
height: f,
|
|
104
|
+
width: f,
|
|
105
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
106
|
+
}), c && /* @__PURE__ */ a.createElement("title", null, c), t.children);
|
|
107
|
+
};
|
|
108
|
+
return m !== void 0 ? /* @__PURE__ */ a.createElement(m.Consumer, null, (r) => e(r)) : e(d);
|
|
109
|
+
}
|
|
110
|
+
function L(t) {
|
|
111
|
+
return o({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" }, child: [] }] })(t);
|
|
112
|
+
}
|
|
113
|
+
function z(t) {
|
|
114
|
+
return o({ attr: { viewBox: "0 0 192 512" }, child: [{ tag: "path", attr: { d: "M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z" }, child: [] }] })(t);
|
|
115
|
+
}
|
|
116
|
+
function C(t) {
|
|
117
|
+
return o({ 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: [] }] })(t);
|
|
118
|
+
}
|
|
119
|
+
function E(t) {
|
|
120
|
+
return o({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M480 192H365.71L260.61 8.06A16.014 16.014 0 0 0 246.71 0h-65.5c-10.63 0-18.3 10.17-15.38 20.39L214.86 192H112l-43.2-57.6c-3.02-4.03-7.77-6.4-12.8-6.4H16.01C5.6 128-2.04 137.78.49 147.88L32 256 .49 364.12C-2.04 374.22 5.6 384 16.01 384H56c5.04 0 9.78-2.37 12.8-6.4L112 320h102.86l-49.03 171.6c-2.92 10.22 4.75 20.4 15.38 20.4h65.5c5.74 0 11.04-3.08 13.89-8.06L365.71 320H480c35.35 0 96-28.65 96-64s-60.65-64-96-64z" }, child: [] }] })(t);
|
|
121
|
+
}
|
|
122
|
+
function _(t) {
|
|
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
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
E as F,
|
|
127
|
+
o as G,
|
|
128
|
+
_ as a,
|
|
129
|
+
C as b,
|
|
130
|
+
z as c,
|
|
131
|
+
L as d
|
|
132
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { CashValue } from './CashValue/CashValue';
|
|
2
2
|
export { EToolTipPosition } from './CashValue/CashValueTypes';
|
|
3
|
+
export { Card } from './Wallet/Card/Card';
|
|
3
4
|
export * from './CashValue/CashValueTypes';
|
|
4
5
|
export { FlightBooking } from './Bookings/FlightBooking/FlightBooking';
|
|
5
6
|
export { HotelBooking } from './Bookings/HotelBooking/HotelBooking';
|
|
@@ -28,6 +28,8 @@ export declare enum ECurrencyEndpoints {
|
|
|
28
28
|
export declare enum EWalletEndpoints {
|
|
29
29
|
USER_AWARDS = "user/rewards",
|
|
30
30
|
USER_CARDS = "user/cards",
|
|
31
|
+
ADD_USER_CARDS = "user/cards/add",
|
|
32
|
+
REMOVE_USER_CARDS = "user/cards/remove",
|
|
31
33
|
BANKS = "banks",
|
|
32
34
|
CARDS = "cards"
|
|
33
35
|
}
|