@odynn/awayz-flights 0.3.5 → 0.3.7
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.
|
@@ -103,13 +103,13 @@ function ae(e) {
|
|
|
103
103
|
attr: i,
|
|
104
104
|
size: o,
|
|
105
105
|
title: s
|
|
106
|
-
} = e, f = ee(e, R), u = o || r.size || "1em",
|
|
107
|
-
return r.className && (
|
|
106
|
+
} = e, f = ee(e, R), u = o || r.size || "1em", m;
|
|
107
|
+
return r.className && (m = r.className), e.className && (m = (m ? m + " " : "") + e.className), /* @__PURE__ */ h.createElement("svg", Z({
|
|
108
108
|
stroke: "currentColor",
|
|
109
109
|
fill: "currentColor",
|
|
110
110
|
strokeWidth: "0"
|
|
111
111
|
}, r.attr, i, f, {
|
|
112
|
-
className:
|
|
112
|
+
className: m,
|
|
113
113
|
style: F(F({
|
|
114
114
|
color: e.color || r.color
|
|
115
115
|
}, r.style), e.style),
|
|
@@ -136,7 +136,7 @@ const pe = ({
|
|
|
136
136
|
onDisableRenderItinerary: i,
|
|
137
137
|
isMultiDayFlight: o
|
|
138
138
|
}) => {
|
|
139
|
-
var u,
|
|
139
|
+
var u, m, v, y, w, A;
|
|
140
140
|
const s = () => {
|
|
141
141
|
var d, g;
|
|
142
142
|
const n = (g = (d = e[0]) == null ? void 0 : d.passengers) == null ? void 0 : g[0];
|
|
@@ -145,8 +145,8 @@ const pe = ({
|
|
|
145
145
|
var d, g, b, C, O, T, M, D, N, _, L;
|
|
146
146
|
const n = [];
|
|
147
147
|
for (let j = 0; j < e.length; j++) {
|
|
148
|
-
const p = e[j],
|
|
149
|
-
if (!
|
|
148
|
+
const p = e[j], l = e[j + 1];
|
|
149
|
+
if (!l)
|
|
150
150
|
break;
|
|
151
151
|
const H = {
|
|
152
152
|
arrival: {
|
|
@@ -157,23 +157,23 @@ const pe = ({
|
|
|
157
157
|
arrivalTimeZone: p.destination.timeZone
|
|
158
158
|
},
|
|
159
159
|
departure: {
|
|
160
|
-
airport: (T =
|
|
161
|
-
city: ((M =
|
|
160
|
+
airport: (T = l.origin) == null ? void 0 : T.name,
|
|
161
|
+
city: ((M = l.origin) == null ? void 0 : M.cityName) ?? ((N = (D = l.origin) == null ? void 0 : D.city) == null ? void 0 : N.name),
|
|
162
162
|
country: S((_ = p.destination) == null ? void 0 : _.iataCountryCode),
|
|
163
|
-
time:
|
|
164
|
-
airline:
|
|
165
|
-
airlineCode:
|
|
166
|
-
aircraft: (L =
|
|
167
|
-
flightNumber:
|
|
168
|
-
cabin:
|
|
169
|
-
departureTimeZone:
|
|
163
|
+
time: l.departingAt,
|
|
164
|
+
airline: l.operatingCarrier.name,
|
|
165
|
+
airlineCode: l.operatingCarrier.iataCode,
|
|
166
|
+
aircraft: (L = l.aircraft) == null ? void 0 : L.name,
|
|
167
|
+
flightNumber: l.operatingCarrierFlightNumber,
|
|
168
|
+
cabin: l.passengers[0].cabinClassMarketingName ?? l.passengers[0].cabinClass ?? s(),
|
|
169
|
+
departureTimeZone: l.origin.timeZone
|
|
170
170
|
},
|
|
171
171
|
layoverTime: $({
|
|
172
172
|
// we need to swap around the departure and arrival times
|
|
173
173
|
departureAt: p.arrivingAt,
|
|
174
174
|
departureTimeZone: p.destination.timeZone,
|
|
175
|
-
arrivalAt:
|
|
176
|
-
arrivalTimeZone:
|
|
175
|
+
arrivalAt: l.departingAt,
|
|
176
|
+
arrivalTimeZone: l.origin.timeZone
|
|
177
177
|
})
|
|
178
178
|
};
|
|
179
179
|
H.layoverTime <= 0 && (i == null || i()), n.push(H);
|
|
@@ -239,7 +239,7 @@ const pe = ({
|
|
|
239
239
|
/* @__PURE__ */ c(
|
|
240
240
|
W,
|
|
241
241
|
{
|
|
242
|
-
airport: (v = (
|
|
242
|
+
airport: (v = (m = e.getLast()) == null ? void 0 : m.destination) == null ? void 0 : v.name,
|
|
243
243
|
city: r.city,
|
|
244
244
|
country: S(r.country),
|
|
245
245
|
time: (y = e.getLast()) == null ? void 0 : y.arrivingAt,
|
|
@@ -260,25 +260,25 @@ const pe = ({
|
|
|
260
260
|
flightNumber: s,
|
|
261
261
|
aircraft: f,
|
|
262
262
|
cabin: u,
|
|
263
|
-
departureAt:
|
|
263
|
+
departureAt: m,
|
|
264
264
|
departureTimeZone: v,
|
|
265
265
|
arrivalAt: y,
|
|
266
266
|
arrivalTimeZone: w,
|
|
267
267
|
isMultiDayFlight: A
|
|
268
268
|
}) => {
|
|
269
269
|
const n = $({
|
|
270
|
-
departureAt:
|
|
270
|
+
departureAt: m,
|
|
271
271
|
departureTimeZone: v,
|
|
272
272
|
arrivalAt: y,
|
|
273
273
|
arrivalTimeZone: w
|
|
274
274
|
});
|
|
275
275
|
return /* @__PURE__ */ a("div", { className: "departure", children: [
|
|
276
276
|
/* @__PURE__ */ a("p", { children: [
|
|
277
|
-
P(
|
|
277
|
+
P(m).format(Y.FlightTime),
|
|
278
278
|
" ",
|
|
279
279
|
/* @__PURE__ */ a("span", { className: "time-zone", children: [
|
|
280
280
|
"(",
|
|
281
|
-
z(v,
|
|
281
|
+
z(v, m),
|
|
282
282
|
")"
|
|
283
283
|
] }),
|
|
284
284
|
/* @__PURE__ */ c("br", {}),
|
|
@@ -288,7 +288,7 @@ const pe = ({
|
|
|
288
288
|
" ",
|
|
289
289
|
"Departure:",
|
|
290
290
|
" ",
|
|
291
|
-
P(
|
|
291
|
+
P(m).format(Y.StringDateFormat)
|
|
292
292
|
] })
|
|
293
293
|
] }) : /* @__PURE__ */ c(E, {}),
|
|
294
294
|
/* @__PURE__ */ a("div", { className: "travel-time", children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../moment-BGjjqtLQ.js";
|
|
4
|
-
import { a as e } from "../../FlightItinerary-
|
|
4
|
+
import { a as e } from "../../FlightItinerary-B_uX-d7I.js";
|
|
5
5
|
import "../../index-D0Heof44.js";
|
|
6
6
|
import "../../arrayExtensions-DFLvtO8l.js";
|
|
7
7
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as H } from "react/jsx-runtime";
|
|
2
2
|
import U, { useState as T, useMemo as _ } from "react";
|
|
3
|
-
import { g as k, E as c, F as z, a as G } from "../../FlightItinerary-
|
|
3
|
+
import { g as k, E as c, F as z, a as G } from "../../FlightItinerary-B_uX-d7I.js";
|
|
4
4
|
import { DEFAULT_AIRLINE_PROGRAM as V, getFlightNumber as q, getLogoPath as J, getAirlineProgram as K } from "../../utils/flightUtils.js";
|
|
5
5
|
import { h } from "../../moment-BGjjqtLQ.js";
|
|
6
6
|
import { g as Q } from "../../index-D0Heof44.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odynn/awayz-flights",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@microsoft/fetch-event-source": "^2.0.1",
|
|
67
|
-
"@odynn/awayz-core": "^0.3.
|
|
67
|
+
"@odynn/awayz-core": "^0.3.21",
|
|
68
68
|
"@tanstack/react-query": "^5.67.1",
|
|
69
69
|
"country-code-lookup": "^0.1.3"
|
|
70
70
|
}
|