@odynn/awayz-core 0.10.5 → 0.10.6

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,7 +1,7 @@
1
1
  import { useQuery as U } from "@tanstack/react-query";
2
2
  import "../arrayExtensions-DlcBOj5a.js";
3
3
  import { E as r, t as F } from "../noRetryInstance-C4bqpBc7.js";
4
- import "react";
4
+ import { useMemo as e } from "react";
5
5
  import { FeatureService as N } from "../services/features/featureService.js";
6
6
  const L = [
7
7
  "DEFAULT_CURRENCY_FEATURE",
@@ -54,31 +54,34 @@ const L = [
54
54
  "FLIGHT_FILTERS_FEATURES",
55
55
  "WALLET_FEATURES"
56
56
  ];
57
- var e = /* @__PURE__ */ ((E) => (E.DEFAULT = "default", E.FULL_VCC_PARTIAL_ENABLED = "Full VCC - Partial Enabled", E.FULL_VCC_PARTIAL_DISABLED = "Full VCC - Partial Disabled", E))(e || {}), H = /* @__PURE__ */ ((E) => (E.LIGHT = "light", E.DARK = "dark", E.USER = "user", E))(H || {}), t = /* @__PURE__ */ ((E) => (E.CASH_ONLY = "Cash Only", E.CASH_AND_TRAVEL_PARTNER_POINTS = "Cash And Travel Partner Points", E.CASH_AND_CLIENT_POINTS = "Cash And Client Points", E))(t || {}), s = /* @__PURE__ */ ((E) => (E.RESULT = "result", E.SHEET = "sheet", E))(s || {});
58
- const l = () => {
57
+ var H = /* @__PURE__ */ ((E) => (E.DEFAULT = "default", E.FULL_VCC_PARTIAL_ENABLED = "Full VCC - Partial Enabled", E.FULL_VCC_PARTIAL_DISABLED = "Full VCC - Partial Disabled", E))(H || {}), t = /* @__PURE__ */ ((E) => (E.LIGHT = "light", E.DARK = "dark", E.USER = "user", E))(t || {}), s = /* @__PURE__ */ ((E) => (E.CASH_ONLY = "Cash Only", E.CASH_AND_TRAVEL_PARTNER_POINTS = "Cash And Travel Partner Points", E.CASH_AND_CLIENT_POINTS = "Cash And Client Points", E))(s || {}), a = /* @__PURE__ */ ((E) => (E.RESULT = "result", E.SHEET = "sheet", E))(a || {});
58
+ const i = () => {
59
59
  const { data: E, isSuccess: R } = U({
60
60
  queryKey: [r.FEATURES, "new"],
61
61
  queryFn: N.getFeatureFlags,
62
62
  staleTime: 1 / 0
63
- }), O = R && E ? (() => {
64
- const T = {};
65
- return L.forEach((_) => {
66
- const A = F(
67
- _.toLowerCase()
68
- );
69
- E[_] !== void 0 && (T[A] = E[_]);
70
- }), S.forEach((_) => {
71
- const A = F(
72
- _.toLowerCase()
73
- );
74
- E[_] !== void 0 && (T[A] = E[_]);
75
- }), I.forEach((_) => {
76
- const A = F(
77
- _.toLowerCase()
78
- );
79
- E[_] !== void 0 && (T[A] = E[_]);
80
- }), T;
81
- })() : null;
63
+ }), O = e(
64
+ () => R && E ? (() => {
65
+ const T = {};
66
+ return L.forEach((_) => {
67
+ const A = F(
68
+ _.toLowerCase()
69
+ );
70
+ E[_] !== void 0 && (T[A] = E[_]);
71
+ }), S.forEach((_) => {
72
+ const A = F(
73
+ _.toLowerCase()
74
+ );
75
+ E[_] !== void 0 && (T[A] = E[_]);
76
+ }), I.forEach((_) => {
77
+ const A = F(
78
+ _.toLowerCase()
79
+ );
80
+ E[_] !== void 0 && (T[A] = E[_]);
81
+ }), T;
82
+ })() : {},
83
+ [R, E]
84
+ );
82
85
  if (R && E) {
83
86
  const _ = [
84
87
  ...L,
@@ -88,14 +91,14 @@ const l = () => {
88
91
  _.length > 0 && console.error("Missing feature flags:", _);
89
92
  }
90
93
  return {
91
- featureFlags: O ?? {},
94
+ featureFlags: O,
92
95
  loaded: R
93
96
  };
94
97
  };
95
98
  export {
96
- t as EAmountsDisplayFeature,
97
- e as EBookingPaymentMethod,
98
- s as EFlightBookingOptionsDisplayFeature,
99
- H as EThemeFeatureFlag,
100
- l as useFeatureFlags
99
+ s as EAmountsDisplayFeature,
100
+ H as EBookingPaymentMethod,
101
+ a as EFlightBookingOptionsDisplayFeature,
102
+ t as EThemeFeatureFlag,
103
+ i as useFeatureFlags
101
104
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odynn/awayz-core",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"