@odynn/awayz-core 0.6.30 → 0.6.32
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { useQuery as L } from "@tanstack/react-query";
|
|
2
1
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import {
|
|
4
|
-
import "react";
|
|
5
|
-
import { FeatureService as
|
|
6
|
-
const
|
|
2
|
+
import { t as F } from "../AccountService-CysoI2i-.js";
|
|
3
|
+
import { useState as e, useEffect as S } from "react";
|
|
4
|
+
import { FeatureService as U } from "../services/features/featureService.js";
|
|
5
|
+
const a = [
|
|
7
6
|
"DEFAULT_CURRENCY_FEATURE",
|
|
8
7
|
"TOTAL_DISPLAY_FEATURE",
|
|
9
8
|
"HOTEL_DETAILS_LAYOUT_FEATURE",
|
|
@@ -17,7 +16,7 @@ const U = [
|
|
|
17
16
|
"HOTEL_DETAILS_FEATURES",
|
|
18
17
|
"SEARCH_RADIUS_POSITION_FEATURE",
|
|
19
18
|
"NAVIGATION_FEATURE"
|
|
20
|
-
],
|
|
19
|
+
], r = [
|
|
21
20
|
"CURRENCY_FILTER_FEATURE",
|
|
22
21
|
"FREE_HOTEL_NIGHTS_FEATURE",
|
|
23
22
|
"SHOW_BOOKABLE_FEATURE",
|
|
@@ -44,29 +43,36 @@ const U = [
|
|
|
44
43
|
"HOTEL_FILTERS_FEATURES",
|
|
45
44
|
"FLIGHT_FILTERS_FEATURES",
|
|
46
45
|
"WALLET_FEATURES"
|
|
47
|
-
],
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
], n = () => {
|
|
47
|
+
const [A, L] = e({}), [R, t] = e(!1), I = async () => {
|
|
48
|
+
try {
|
|
49
|
+
const T = await U.getFeatureFlags();
|
|
50
|
+
L(T);
|
|
51
|
+
} catch (T) {
|
|
52
|
+
console.error("Error fetching feature flags:", T);
|
|
53
|
+
} finally {
|
|
54
|
+
t(!0);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return S(() => {
|
|
58
|
+
I();
|
|
59
|
+
}, []), {
|
|
60
|
+
featureFlags: (R && A ? (() => {
|
|
61
|
+
const T = {};
|
|
62
|
+
return a.forEach((E) => {
|
|
63
|
+
const _ = F(E);
|
|
64
|
+
A[E] !== void 0 && (T[_] = A[E]);
|
|
65
|
+
}), r.forEach((E) => {
|
|
66
|
+
const _ = F(E);
|
|
67
|
+
A[E] !== void 0 && (T[_] = A[E]);
|
|
62
68
|
}), O.forEach((E) => {
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
}),
|
|
69
|
+
const _ = F(E);
|
|
70
|
+
A[E] !== void 0 && (T[_] = A[E]);
|
|
71
|
+
}), T;
|
|
66
72
|
})() : void 0) ?? {},
|
|
67
|
-
loaded:
|
|
73
|
+
loaded: R
|
|
68
74
|
};
|
|
69
75
|
};
|
|
70
76
|
export {
|
|
71
|
-
|
|
77
|
+
n as default
|
|
72
78
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
interface IFeatures {
|
|
1
|
+
export interface IFeatures {
|
|
2
2
|
[key: string]: string | number | boolean | string[] | undefined;
|
|
3
3
|
}
|
|
4
4
|
export declare class FeatureService {
|
|
5
5
|
static getFeatures(): Promise<IFeatures>;
|
|
6
6
|
static getFeatureFlags(): Promise<IFeatures>;
|
|
7
7
|
}
|
|
8
|
-
export {};
|