@platform-x/hcltechx-mfe-wrapper 1.0.36 → 2.0.2
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/{ArticleVodListComponent-B_mz4pFP.mjs → ArticleVodListComponent-DTJZ1twV.mjs} +2 -2
- package/{ChallengeDetailComponent-m_-rAkRe.mjs → ChallengeDetailComponent-B6zfesB6.mjs} +3 -3
- package/{ChallengeSliderComponent-C8MKL2L5.mjs → ChallengeSliderComponent-Dv5X72Wz.mjs} +44 -43
- package/{CommonContentComponent-gvsZ0zd5.mjs → CommonContentComponent-Bb-0xLBb.mjs} +3 -3
- package/{DailyMotion-CBq2xTz9.mjs → DailyMotion-B5uG41Dx.mjs} +2 -2
- package/{EngagementHomeComponent-CabF_yP8.mjs → EngagementHomeComponent-Dm7Tb0hD.mjs} +35 -34
- package/{EventDetailComponent-CZWh2ZjM.mjs → EventDetailComponent-D6Wa6bj1.mjs} +3 -3
- package/{EventListComponent-BJI5TWNJ.mjs → EventListComponent-CYMjEYgk.mjs} +35 -34
- package/{ExperienceZone-Cmj1-VI0.mjs → ExperienceZone-C1qQPWZj.mjs} +1 -1
- package/{ExperienceZoneComponent-CzMEwhqx.mjs → ExperienceZoneComponent-jZ-RdeYn.mjs} +3 -3
- package/{Facebook-BYf_gxps.mjs → Facebook-DORJWMjJ.mjs} +2 -2
- package/{FilePlayer-ian6BGpD.mjs → FilePlayer-D3fGCFm5.mjs} +2 -2
- package/{IndividualChallengeComponent-C4TFxQ0N.mjs → IndividualChallengeComponent-1hW3enO4.mjs} +21 -20
- package/{Kaltura-DUO1W7a0.mjs → Kaltura-0Abi5Oj2.mjs} +2 -2
- package/{Mixcloud-uakOrNLg.mjs → Mixcloud-CiquPQVh.mjs} +2 -2
- package/{Mux-UJtQyFbr.mjs → Mux-C5GLQ9AU.mjs} +2 -2
- package/{PageComponent-zzYDMVvX.mjs → PageComponent-HTKOKXEn.mjs} +2 -2
- package/{Preview-DTmDYR1D.mjs → Preview-B9nuTTGP.mjs} +1 -1
- package/{RecentCarousel-DJm62vfr.mjs → RecentCarousel-D4HQ_in_.mjs} +2 -2
- package/{Share-DromTIhS.mjs → Share-D8noRo-f.mjs} +2 -2
- package/{SoundCloud-BTkz3vz5.mjs → SoundCloud-BqrBQo-Z.mjs} +2 -2
- package/{Streamable-oTp2FGh_.mjs → Streamable-BapEWYTh.mjs} +2 -2
- package/{ToggleButton-DS7KY5UV.mjs → ToggleButton-Dbd4xJQ3.mjs} +53566 -55379
- package/{Twitch-DLBOe4Uj.mjs → Twitch-B7bR_cuo.mjs} +2 -2
- package/{Vidyard-C652HdPw.mjs → Vidyard-DGbHsUJ2.mjs} +2 -2
- package/{Vimeo-nICIqXzH.mjs → Vimeo-Wzq_37I-.mjs} +2 -2
- package/{Wistia-qVaR9Yqj.mjs → Wistia-BoOvAyyS.mjs} +2 -2
- package/{YouTube-DFpxmU3O.mjs → YouTube-BzkbB9zT.mjs} +2 -2
- package/{index-Cl3U6HlV.mjs → index-DhDn8P6v.mjs} +1777 -1752
- package/{index-CoFaefgY.mjs → index-DyvHP7a1.mjs} +3 -3
- package/index.mjs +1 -1
- package/lib/utils/constants.d.ts +6 -1
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/types.d.ts +2 -0
- package/{mutateApi-Bl4Pr0CW.mjs → mutateApi-O4JSHG7E.mjs} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { A as p } from "./ToggleButton-
|
|
2
|
+
import { A as p } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
3
|
import "react";
|
|
4
|
-
import "./index-
|
|
4
|
+
import "./index-DhDn8P6v.mjs";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
const f = ({
|
|
7
7
|
data: t,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as K } from "react/jsx-runtime";
|
|
2
|
-
import { b as M } from "./ToggleButton-
|
|
2
|
+
import { b as M } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
3
|
import { useState as c, useEffect as N } from "react";
|
|
4
|
-
import { s as f, f as u } from "./index-
|
|
5
|
-
import { m as O } from "./mutateApi-
|
|
4
|
+
import { s as f, f as u } from "./index-DhDn8P6v.mjs";
|
|
5
|
+
import { m as O } from "./mutateApi-O4JSHG7E.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
const $ = (E) => {
|
|
8
8
|
const {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as W } from "react/jsx-runtime";
|
|
2
|
-
import { f as X, C as Y } from "./ToggleButton-
|
|
2
|
+
import { f as X, C as Y } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
3
|
import { useState as a, useEffect as Z } from "react";
|
|
4
|
-
import { f as
|
|
5
|
-
import { m as
|
|
4
|
+
import { C as $, f as _, s as c, a as V } from "./index-DhDn8P6v.mjs";
|
|
5
|
+
import { m as R } from "./mutateApi-O4JSHG7E.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
const
|
|
8
|
-
var I, P,
|
|
9
|
-
const { pageData:
|
|
7
|
+
const ae = (T) => {
|
|
8
|
+
var I, P, A;
|
|
9
|
+
const { pageData: s = {}, secondaryArgs: u, userId: y, filters: p } = T || {}, [v, C] = a(!1), [k, S] = a({}), [E, G] = a(0), [b, L] = a([]), [x, j] = a({}), [D, H] = a({}), [M, N] = a({}), w = localStorage.getItem("userId") || y, {
|
|
10
10
|
prelemBaseEndpoint: { site_host: h, language: f }
|
|
11
|
-
} = u,
|
|
12
|
-
pageId:
|
|
13
|
-
pageTitle:
|
|
14
|
-
pageDesc:
|
|
15
|
-
pageTags: (P = (I =
|
|
11
|
+
} = u, B = {
|
|
12
|
+
pageId: s == null ? void 0 : s.page,
|
|
13
|
+
pageTitle: s == null ? void 0 : s.title,
|
|
14
|
+
pageDesc: s == null ? void 0 : s.description,
|
|
15
|
+
pageTags: (P = (I = s == null ? void 0 : s.settings) == null ? void 0 : I.keywords) == null ? void 0 : P.join(", "),
|
|
16
16
|
isAuthoring: !1,
|
|
17
|
-
isSeoEnabled: (
|
|
18
|
-
isAnalyticsEnabled:
|
|
19
|
-
},
|
|
17
|
+
isSeoEnabled: (A = s == null ? void 0 : s.settings) == null ? void 0 : A.seo_blockIndexing,
|
|
18
|
+
isAnalyticsEnabled: s == null ? void 0 : s.analytics_enable
|
|
19
|
+
}, O = {
|
|
20
20
|
isAuthoring: !1
|
|
21
|
-
},
|
|
21
|
+
}, q = async (i, n, l, r = "", t = "wellnessevent") => {
|
|
22
22
|
var e, d, m, g;
|
|
23
|
-
const
|
|
23
|
+
const o = await _.getContentSchemaList(
|
|
24
24
|
{
|
|
25
25
|
searchTerm: r,
|
|
26
26
|
filter: (t == null ? void 0 : t.toLocaleLowerCase()) === "events" ? "wellnessevent" : t == null ? void 0 : t.toLocaleLowerCase()
|
|
@@ -28,26 +28,26 @@ const re = (p) => {
|
|
|
28
28
|
i || "en",
|
|
29
29
|
n
|
|
30
30
|
);
|
|
31
|
-
(d = (e =
|
|
32
|
-
},
|
|
31
|
+
(d = (e = o == null ? void 0 : o.data) == null ? void 0 : e.publish_getContents) != null && d.records ? l((g = (m = o == null ? void 0 : o.data) == null ? void 0 : m.publish_getContents) == null ? void 0 : g.records) : console.error("Something went wrong !");
|
|
32
|
+
}, z = async (i, n, l) => {
|
|
33
33
|
var r, t;
|
|
34
34
|
try {
|
|
35
|
-
const
|
|
35
|
+
const o = {
|
|
36
36
|
input: { activity_type: l, target: i.toString(), action: n },
|
|
37
|
-
user_id:
|
|
38
|
-
}, e = await
|
|
39
|
-
((t = (r = e == null ? void 0 : e.data) == null ? void 0 : r.community_setPersonalGoal) == null ? void 0 : t.message) === "Created Successfully!!!" && n === "goal" ?
|
|
40
|
-
} catch (
|
|
41
|
-
console.error("Error in update goal API:",
|
|
37
|
+
user_id: w
|
|
38
|
+
}, e = await R.setPersonalGoal(o, f, h);
|
|
39
|
+
((t = (r = e == null ? void 0 : e.data) == null ? void 0 : r.community_setPersonalGoal) == null ? void 0 : t.message) === "Created Successfully!!!" && n === "goal" ? V("Goal updated successfully!") : n !== "entry" && console.error("Something went wrong !");
|
|
40
|
+
} catch (o) {
|
|
41
|
+
console.error("Error in update goal API:", o), c("Something went wrong, please try after sometime !");
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, F = async (i = "") => {
|
|
44
44
|
var n, l, r, t;
|
|
45
45
|
try {
|
|
46
|
-
|
|
47
|
-
const
|
|
46
|
+
C(!0);
|
|
47
|
+
const o = {
|
|
48
48
|
date: i,
|
|
49
|
-
user_id:
|
|
50
|
-
}, e = await
|
|
49
|
+
user_id: w
|
|
50
|
+
}, e = await _.fetchPersonalTracker(o, f, h);
|
|
51
51
|
if (((n = e == null ? void 0 : e.errors) == null ? void 0 : n.length) > 0)
|
|
52
52
|
c((l = e == null ? void 0 : e.errors[0]) == null ? void 0 : l.message);
|
|
53
53
|
else if ((r = e == null ? void 0 : e.data) != null && r.community_fetchPersonalTracker) {
|
|
@@ -55,42 +55,43 @@ const re = (p) => {
|
|
|
55
55
|
steps: d,
|
|
56
56
|
streak_count: m,
|
|
57
57
|
calories: g,
|
|
58
|
-
distance:
|
|
58
|
+
distance: K,
|
|
59
59
|
individual_challenge_detail: Q,
|
|
60
60
|
individual_challenge_info: U
|
|
61
61
|
} = (t = e == null ? void 0 : e.data) == null ? void 0 : t.community_fetchPersonalTracker;
|
|
62
|
-
|
|
62
|
+
S(d), G(m), j({ calories: g, distance: K }), H(Q), N(U);
|
|
63
63
|
} else
|
|
64
64
|
console.error("GetPersonalData API failed"), c("GetPersonalData API failed");
|
|
65
|
-
} catch (
|
|
66
|
-
c("Something went wrong !"), console.error("Error in GetPersonalData API:",
|
|
65
|
+
} catch (o) {
|
|
66
|
+
c("Something went wrong !"), console.error("Error in GetPersonalData API:", o), c("Error in GetPersonalData API"), S({});
|
|
67
67
|
} finally {
|
|
68
|
-
|
|
68
|
+
C(!1);
|
|
69
69
|
}
|
|
70
|
-
},
|
|
70
|
+
}, J = {
|
|
71
71
|
stepsData: k,
|
|
72
72
|
loading: v,
|
|
73
|
-
updateGoals:
|
|
73
|
+
updateGoals: z
|
|
74
74
|
};
|
|
75
75
|
return Z(() => {
|
|
76
|
-
|
|
76
|
+
F(X(/* @__PURE__ */ new Date(), "yyyy-MM-dd")), q(f, h, L, "", "challenges");
|
|
77
77
|
}, []), /* @__PURE__ */ W(
|
|
78
78
|
Y,
|
|
79
79
|
{
|
|
80
|
-
analytics:
|
|
81
|
-
authoringHelper:
|
|
80
|
+
analytics: B,
|
|
81
|
+
authoringHelper: O,
|
|
82
82
|
secondaryArgs: u,
|
|
83
|
-
stepsDetails:
|
|
83
|
+
stepsDetails: J,
|
|
84
84
|
streaksCount: E,
|
|
85
85
|
data: b,
|
|
86
|
-
filters:
|
|
86
|
+
filters: p,
|
|
87
87
|
commonInfo: x,
|
|
88
88
|
individualChallengeDetail: D,
|
|
89
89
|
individualChallengeInfo: M,
|
|
90
|
-
userId: y
|
|
90
|
+
userId: y,
|
|
91
|
+
constants: $
|
|
91
92
|
}
|
|
92
93
|
);
|
|
93
94
|
};
|
|
94
95
|
export {
|
|
95
|
-
|
|
96
|
+
ae as default
|
|
96
97
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as O } from "react/jsx-runtime";
|
|
2
2
|
import j, { memo as x, useState as g, useEffect as J } from "react";
|
|
3
|
-
import { F as M, f as N, s as w } from "./index-
|
|
4
|
-
import { m as $ } from "./mutateApi-
|
|
3
|
+
import { F as M, f as N, s as w } from "./index-DhDn8P6v.mjs";
|
|
4
|
+
import { m as $ } from "./mutateApi-O4JSHG7E.mjs";
|
|
5
5
|
import { M as T } from "./Mapping-jqmNMEpL.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
const c = {};
|
|
8
8
|
Object.keys(T).forEach((l) => (c[l] = j.lazy(
|
|
9
|
-
() => import("./index-
|
|
9
|
+
() => import("./index-DyvHP7a1.mjs").then((t) => ({
|
|
10
10
|
default: t[T[l]]
|
|
11
11
|
}))
|
|
12
12
|
), c));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as P } from "./index-
|
|
1
|
+
import { n as P } from "./index-DhDn8P6v.mjs";
|
|
2
2
|
import v from "react";
|
|
3
|
-
import { z as D, F as O } from "./ToggleButton-
|
|
3
|
+
import { z as D, F as O } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
4
4
|
function b(t, e) {
|
|
5
5
|
for (var r = 0; r < e.length; r++) {
|
|
6
6
|
const o = e[r];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as ee } from "react/jsx-runtime";
|
|
2
|
-
import { f as te, a as oe } from "./ToggleButton-
|
|
2
|
+
import { f as te, a as oe } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
3
|
import { useState as o, useEffect as ae } from "react";
|
|
4
|
-
import { f as
|
|
5
|
-
import { m as
|
|
4
|
+
import { C as ne, f as k, s as i, a as se } from "./index-DhDn8P6v.mjs";
|
|
5
|
+
import { m as re } from "./mutateApi-O4JSHG7E.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
const
|
|
7
|
+
const A = async (D, d, I, u = "", t = "wellnessevent") => {
|
|
8
8
|
var g, h, n, s;
|
|
9
|
-
const a = await
|
|
9
|
+
const a = await k.getContentSchemaList(
|
|
10
10
|
{
|
|
11
11
|
searchTerm: u,
|
|
12
12
|
filter: (t == null ? void 0 : t.toLocaleLowerCase()) === "events" ? "wellnessevent" : t == null ? void 0 : t.toLocaleLowerCase(),
|
|
@@ -16,7 +16,7 @@ const k = async (D, d, I, u = "", t = "wellnessevent") => {
|
|
|
16
16
|
d
|
|
17
17
|
);
|
|
18
18
|
(h = (g = a == null ? void 0 : a.data) == null ? void 0 : g.publish_getContents) != null && h.records ? I((s = (n = a == null ? void 0 : a.data) == null ? void 0 : n.publish_getContents) == null ? void 0 : s.records) : console.error("Something went wrong !");
|
|
19
|
-
},
|
|
19
|
+
}, he = (D) => {
|
|
20
20
|
const {
|
|
21
21
|
secondaryArgs: d,
|
|
22
22
|
prelemAnalyticsProp: I,
|
|
@@ -27,7 +27,7 @@ const k = async (D, d, I, u = "", t = "wellnessevent") => {
|
|
|
27
27
|
articleData: h
|
|
28
28
|
} = D || {}, {
|
|
29
29
|
prelemBaseEndpoint: { language: n, site_host: s }
|
|
30
|
-
} = d, [
|
|
30
|
+
} = d, [C, P] = o(!1), [L, y] = o({}), [T, p] = o({}), [E, G] = o(0), f = localStorage.getItem("userId") || t, [b, H] = o([]), [x, M] = o([]), [N, U] = o({}), [j, B] = o({}), [O, W] = o({}), [q, z] = o({}), S = async (v, c, w) => {
|
|
31
31
|
var l, m;
|
|
32
32
|
if (!f) {
|
|
33
33
|
i("User ID is not available. Please log in.");
|
|
@@ -37,28 +37,28 @@ const k = async (D, d, I, u = "", t = "wellnessevent") => {
|
|
|
37
37
|
const r = {
|
|
38
38
|
input: { activity_type: w, target: v.toString(), action: c },
|
|
39
39
|
user_id: f
|
|
40
|
-
}, e = await
|
|
41
|
-
((m = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_setPersonalGoal) == null ? void 0 : m.message) === "Created Successfully!!!" && c === "goal" ?
|
|
40
|
+
}, e = await re.setPersonalGoal(r, n, s);
|
|
41
|
+
((m = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_setPersonalGoal) == null ? void 0 : m.message) === "Created Successfully!!!" && c === "goal" ? se("Goal updated successfully!") : c !== "entry" && console.error("Something went wrong !");
|
|
42
42
|
} catch (r) {
|
|
43
43
|
console.error("Error in update goal API:", r), i("Something went wrong, please try after sometime !");
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, _ = async (v = "") => {
|
|
46
46
|
var c, w, l, m;
|
|
47
47
|
if (!f) {
|
|
48
48
|
i("User ID is not available. Please log in.");
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
try {
|
|
52
|
-
|
|
52
|
+
P(!0);
|
|
53
53
|
const r = {
|
|
54
54
|
date: v,
|
|
55
55
|
user_id: f
|
|
56
|
-
}, e = await
|
|
56
|
+
}, e = await k.fetchPersonalTracker(r, n, s);
|
|
57
57
|
if (((c = e == null ? void 0 : e.errors) == null ? void 0 : c.length) > 0)
|
|
58
58
|
i((w = e == null ? void 0 : e.errors[0]) == null ? void 0 : w.message);
|
|
59
59
|
else if ((l = e == null ? void 0 : e.data) != null && l.community_fetchPersonalTracker) {
|
|
60
60
|
const {
|
|
61
|
-
water_intake:
|
|
61
|
+
water_intake: K,
|
|
62
62
|
steps: Q,
|
|
63
63
|
streak_count: X,
|
|
64
64
|
individual_challenge_info: Y,
|
|
@@ -67,49 +67,50 @@ const k = async (D, d, I, u = "", t = "wellnessevent") => {
|
|
|
67
67
|
device_info: R,
|
|
68
68
|
individual_challenge_detail: V
|
|
69
69
|
} = (m = e == null ? void 0 : e.data) == null ? void 0 : m.community_fetchPersonalTracker;
|
|
70
|
-
|
|
70
|
+
y(K), p(Q), G(X), U(Y), B({ calories: Z, distance: $ }), W(R), z(V);
|
|
71
71
|
} else
|
|
72
72
|
console.error("GetPersonalData API failed"), i("GetPersonalData API failed");
|
|
73
73
|
} catch (r) {
|
|
74
|
-
console.error("Error in GetPersonalData API:", r), i("Error in GetPersonalData API"),
|
|
74
|
+
console.error("Error in GetPersonalData API:", r), i("Error in GetPersonalData API"), y({}), p({});
|
|
75
75
|
} finally {
|
|
76
|
-
|
|
76
|
+
P(!1);
|
|
77
77
|
}
|
|
78
|
-
},
|
|
78
|
+
}, F = {
|
|
79
79
|
waterIntakeData: L,
|
|
80
|
-
loading:
|
|
81
|
-
fetchPersonalData:
|
|
82
|
-
updateGoals:
|
|
83
|
-
},
|
|
84
|
-
stepsData:
|
|
85
|
-
loading:
|
|
86
|
-
updateGoals:
|
|
80
|
+
loading: C,
|
|
81
|
+
fetchPersonalData: _,
|
|
82
|
+
updateGoals: S
|
|
83
|
+
}, J = {
|
|
84
|
+
stepsData: T,
|
|
85
|
+
loading: C,
|
|
86
|
+
updateGoals: S
|
|
87
87
|
};
|
|
88
88
|
return ae(() => {
|
|
89
|
-
|
|
89
|
+
_(te(/* @__PURE__ */ new Date(), "yyyy-MM-dd")), A(n, s, H, "", "challenges"), A(n, s, M, "", "wellnessevent");
|
|
90
90
|
}, []), /* @__PURE__ */ ee(
|
|
91
91
|
oe,
|
|
92
92
|
{
|
|
93
93
|
analytics: I,
|
|
94
94
|
authoringHelper: u,
|
|
95
95
|
secondaryArgs: d,
|
|
96
|
-
waterIntakeDetails:
|
|
97
|
-
stepsDetails:
|
|
98
|
-
streaksCount:
|
|
96
|
+
waterIntakeDetails: F,
|
|
97
|
+
stepsDetails: J,
|
|
98
|
+
streaksCount: E,
|
|
99
99
|
data: b,
|
|
100
100
|
eventData: x,
|
|
101
101
|
articleVodData: h,
|
|
102
102
|
filters: a,
|
|
103
103
|
relativePath: g,
|
|
104
104
|
userId: t,
|
|
105
|
-
deviceInfo:
|
|
106
|
-
individualChallengeInfo:
|
|
107
|
-
commonInfo:
|
|
108
|
-
individualChallengeDetail:
|
|
105
|
+
deviceInfo: O,
|
|
106
|
+
individualChallengeInfo: N,
|
|
107
|
+
commonInfo: j,
|
|
108
|
+
individualChallengeDetail: q,
|
|
109
|
+
constants: ne
|
|
109
110
|
}
|
|
110
111
|
);
|
|
111
112
|
};
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
he as EngagementHomeComponent,
|
|
115
|
+
he as default
|
|
115
116
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as U } from "react/jsx-runtime";
|
|
2
|
-
import { c as V } from "./ToggleButton-
|
|
2
|
+
import { c as V } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
3
|
import { useState as a, useEffect as p } from "react";
|
|
4
|
-
import { f as q, s as d, a as I } from "./index-
|
|
5
|
-
import { m as z } from "./mutateApi-
|
|
4
|
+
import { f as q, s as d, a as I } from "./index-DhDn8P6v.mjs";
|
|
5
|
+
import { m as z } from "./mutateApi-O4JSHG7E.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
const Z = (h) => {
|
|
8
8
|
const {
|
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
-
import { E as M, f as
|
|
3
|
-
import { useState as c, useEffect as
|
|
4
|
-
import { s as
|
|
5
|
-
import { m as
|
|
2
|
+
import { E as M, f as N } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
|
+
import { useState as c, useEffect as U } from "react";
|
|
4
|
+
import { C as j, s as n, f as B, a as H } from "./index-DhDn8P6v.mjs";
|
|
5
|
+
import { m as O } from "./mutateApi-O4JSHG7E.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
const
|
|
7
|
+
const V = ({
|
|
8
8
|
data: h,
|
|
9
9
|
prelemAnalyticsProp: y,
|
|
10
10
|
prelemAuthoringHelper: P,
|
|
11
11
|
secondaryArgs: f,
|
|
12
12
|
userId: m,
|
|
13
|
-
filters:
|
|
14
|
-
relativePath:
|
|
13
|
+
filters: S,
|
|
14
|
+
relativePath: p
|
|
15
15
|
}) => {
|
|
16
|
-
const [
|
|
16
|
+
const [w, I] = c({}), [D, T] = c({}), [E, v] = c({}), [C, u] = c(!1), {
|
|
17
17
|
prelemBaseEndpoint: { language: g, site_host: d }
|
|
18
|
-
} = f,
|
|
18
|
+
} = f, r = localStorage.getItem("userId") || m, _ = async (l, t, i) => {
|
|
19
19
|
var a, o;
|
|
20
|
-
if (!
|
|
21
|
-
|
|
20
|
+
if (!r) {
|
|
21
|
+
n("User ID is not available. Please log in.");
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
try {
|
|
25
25
|
const e = {
|
|
26
26
|
input: { activity_type: i, target: l.toString(), action: t },
|
|
27
|
-
user_id:
|
|
28
|
-
},
|
|
29
|
-
((o = (a =
|
|
27
|
+
user_id: r
|
|
28
|
+
}, s = await O.setPersonalGoal(e, g, d);
|
|
29
|
+
((o = (a = s == null ? void 0 : s.data) == null ? void 0 : a.community_setPersonalGoal) == null ? void 0 : o.message) === "Created Successfully!!!" && t === "goal" ? H("Goal updated successfully!") : t !== "entry" && console.error("Something went wrong !");
|
|
30
30
|
} catch (e) {
|
|
31
|
-
console.error("Error in update goal API:", e),
|
|
31
|
+
console.error("Error in update goal API:", e), n("Something went wrong, please try after sometime !");
|
|
32
32
|
}
|
|
33
|
-
},
|
|
33
|
+
}, G = async () => {
|
|
34
34
|
var l, t, i, a;
|
|
35
|
-
if (!
|
|
36
|
-
|
|
35
|
+
if (!r) {
|
|
36
|
+
n("User ID is not available. Please log in.");
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
try {
|
|
40
40
|
u(!0);
|
|
41
41
|
const o = {
|
|
42
|
-
date:
|
|
43
|
-
user_id:
|
|
42
|
+
date: N(/* @__PURE__ */ new Date(), "yyyy-MM-dd"),
|
|
43
|
+
user_id: r
|
|
44
44
|
}, e = await B.fetchPersonalTracker(o, g, d);
|
|
45
45
|
if (((l = e == null ? void 0 : e.errors) == null ? void 0 : l.length) > 0)
|
|
46
|
-
|
|
46
|
+
n((t = e == null ? void 0 : e.errors[0]) == null ? void 0 : t.message);
|
|
47
47
|
else if ((i = e == null ? void 0 : e.data) != null && i.community_fetchPersonalTracker) {
|
|
48
|
-
const { steps:
|
|
49
|
-
|
|
48
|
+
const { steps: s, calories: k, distance: L, individual_challenge_info: b } = (a = e == null ? void 0 : e.data) == null ? void 0 : a.community_fetchPersonalTracker;
|
|
49
|
+
v(s), I(b), T({ calories: k, distance: L });
|
|
50
50
|
} else
|
|
51
51
|
console.error("GetPersonalData API failed");
|
|
52
52
|
} catch (o) {
|
|
53
|
-
|
|
53
|
+
n("Something went wrong !"), console.error("Error in GetPersonalData API:", o);
|
|
54
54
|
} finally {
|
|
55
55
|
u(!1);
|
|
56
56
|
}
|
|
57
57
|
}, A = {
|
|
58
|
-
stepsData:
|
|
59
|
-
loading:
|
|
60
|
-
updateGoals:
|
|
58
|
+
stepsData: E,
|
|
59
|
+
loading: C,
|
|
60
|
+
updateGoals: _
|
|
61
61
|
};
|
|
62
|
-
return
|
|
63
|
-
|
|
62
|
+
return U(() => {
|
|
63
|
+
G();
|
|
64
64
|
}, []), /* @__PURE__ */ x(
|
|
65
65
|
M,
|
|
66
66
|
{
|
|
@@ -69,14 +69,15 @@ const Q = ({
|
|
|
69
69
|
authoringHelper: P,
|
|
70
70
|
secondaryArgs: f,
|
|
71
71
|
stepsDetails: A,
|
|
72
|
-
filters:
|
|
73
|
-
relativePath:
|
|
74
|
-
individualChallengeInfo:
|
|
72
|
+
filters: S,
|
|
73
|
+
relativePath: p,
|
|
74
|
+
individualChallengeInfo: w,
|
|
75
75
|
commonInfo: D,
|
|
76
|
-
userId: m
|
|
76
|
+
userId: m,
|
|
77
|
+
constants: j
|
|
77
78
|
}
|
|
78
79
|
);
|
|
79
80
|
};
|
|
80
81
|
export {
|
|
81
|
-
|
|
82
|
+
V as default
|
|
82
83
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { a7 as h, a8 as m, a9 as C, B as l, T as f, k as T, aa as k, ab as v, ac as x, v as b, ad as B } from "./ToggleButton-
|
|
2
|
+
import { a7 as h, a8 as m, a9 as C, B as l, T as f, k as T, aa as k, ab as v, ac as x, v as b, ad as B } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
3
|
const X = ({
|
|
4
4
|
content: r,
|
|
5
5
|
analytics: c,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
-
import "./ToggleButton-
|
|
3
|
-
import { E as l } from "./ExperienceZone-
|
|
2
|
+
import "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
|
+
import { E as l } from "./ExperienceZone-C1qQPWZj.mjs";
|
|
4
4
|
import { useState as T, useEffect as j } from "react";
|
|
5
|
-
import { f as k } from "./index-
|
|
5
|
+
import { f as k } from "./index-DhDn8P6v.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
const z = (h) => {
|
|
8
8
|
var t, c, r;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as _ } from "./index-
|
|
1
|
+
import { n as _ } from "./index-DhDn8P6v.mjs";
|
|
2
2
|
import P from "react";
|
|
3
|
-
import { z as g, F as m } from "./ToggleButton-
|
|
3
|
+
import { z as g, F as m } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
4
4
|
function v(t, e) {
|
|
5
5
|
for (var r = 0; r < e.length; r++) {
|
|
6
6
|
const o = e[r];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as b } from "./index-
|
|
1
|
+
import { n as b } from "./index-DhDn8P6v.mjs";
|
|
2
2
|
import _ from "react";
|
|
3
|
-
import { z as O, F as A } from "./ToggleButton-
|
|
3
|
+
import { z as O, F as A } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
4
4
|
function R(s, e) {
|
|
5
5
|
for (var t = 0; t < e.length; t++) {
|
|
6
6
|
const i = e[t];
|
package/{IndividualChallengeComponent-C4TFxQ0N.mjs → IndividualChallengeComponent-1hW3enO4.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as ne } from "react/jsx-runtime";
|
|
2
|
-
import { I as oe } from "./ToggleButton-
|
|
2
|
+
import { I as oe } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
3
3
|
import { useState as u, useEffect as le } from "react";
|
|
4
|
-
import { f as L, s as d, a as
|
|
5
|
-
import { m as
|
|
4
|
+
import { C as ie, f as L, s as d, a as T } from "./index-DhDn8P6v.mjs";
|
|
5
|
+
import { m as w } from "./mutateApi-O4JSHG7E.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
const
|
|
7
|
+
const he = (G) => {
|
|
8
8
|
const {
|
|
9
9
|
pageData: l = {},
|
|
10
10
|
secondaryArgs: _,
|
|
@@ -13,9 +13,9 @@ const fe = (T) => {
|
|
|
13
13
|
userId: P,
|
|
14
14
|
cugId: D,
|
|
15
15
|
filters: U
|
|
16
|
-
} =
|
|
16
|
+
} = G || {}, {
|
|
17
17
|
prelemBaseEndpoint: { site_host: f, language: h }
|
|
18
|
-
} = _, m = localStorage.getItem("userId") || P, [k, g] = u(!1), [b,
|
|
18
|
+
} = _, m = localStorage.getItem("userId") || P, [k, g] = u(!1), [b, C] = u(!1), [x, H] = u(0), [J, N] = u(0), [O, z] = u([]), [F, A] = u([]), [K, M] = u([]), [Q, v] = u({}), [V, W] = u({}), [X, Y] = u([]), [Z, I] = u(!1), [$, p] = u({}), R = async (a) => {
|
|
19
19
|
var i, c, o, n, t, e;
|
|
20
20
|
try {
|
|
21
21
|
g(!0);
|
|
@@ -24,8 +24,8 @@ const fe = (T) => {
|
|
|
24
24
|
...a,
|
|
25
25
|
userId: m
|
|
26
26
|
}
|
|
27
|
-
}, r = await
|
|
28
|
-
((i = r == null ? void 0 : r.errors) == null ? void 0 : i.length) > 0 ? d((c = r == null ? void 0 : r.errors[0]) == null ? void 0 : c.message) : (n = (o = r == null ? void 0 : r.data) == null ? void 0 : o.community_joinChallenge) != null && n.id ? (
|
|
27
|
+
}, r = await w.joinChallenge(s, h, f);
|
|
28
|
+
((i = r == null ? void 0 : r.errors) == null ? void 0 : i.length) > 0 ? d((c = r == null ? void 0 : r.errors[0]) == null ? void 0 : c.message) : (n = (o = r == null ? void 0 : r.data) == null ? void 0 : o.community_joinChallenge) != null && n.id ? (T((e = (t = r == null ? void 0 : r.data) == null ? void 0 : t.community_joinChallenge) == null ? void 0 : e.message), C(!0), S()) : console.error("Join Challenge API failed");
|
|
29
29
|
} catch (s) {
|
|
30
30
|
console.error("Error in Join Challenge API:", s);
|
|
31
31
|
} finally {
|
|
@@ -49,7 +49,7 @@ const fe = (T) => {
|
|
|
49
49
|
user_steps: r = 0,
|
|
50
50
|
derivedChallenges: y
|
|
51
51
|
} = (o = t == null ? void 0 : t.data) == null ? void 0 : o.community_challengesDetail;
|
|
52
|
-
|
|
52
|
+
C(s), H(e), N(r), Y(y);
|
|
53
53
|
} else
|
|
54
54
|
console.error("GetChallengeDetails API failed");
|
|
55
55
|
} catch (n) {
|
|
@@ -69,11 +69,11 @@ const fe = (T) => {
|
|
|
69
69
|
d((c = e == null ? void 0 : e.errors[0]) == null ? void 0 : c.message);
|
|
70
70
|
else if ((o = e == null ? void 0 : e.data) != null && o.community_fetchPersonalTracker) {
|
|
71
71
|
const { steps: s, device_info: r, individual_challenge_info: y } = (n = e == null ? void 0 : e.data) == null ? void 0 : n.community_fetchPersonalTracker;
|
|
72
|
-
|
|
72
|
+
v(s), W(r), p(y);
|
|
73
73
|
} else
|
|
74
74
|
console.error("GetPersonalData API failed"), d("GetPersonalData API failed");
|
|
75
75
|
} catch (t) {
|
|
76
|
-
console.error("Error in GetPersonalData API:", t), d("Error in GetPersonalData API"),
|
|
76
|
+
console.error("Error in GetPersonalData API:", t), d("Error in GetPersonalData API"), v({});
|
|
77
77
|
} finally {
|
|
78
78
|
g(!1);
|
|
79
79
|
}
|
|
@@ -91,7 +91,7 @@ const fe = (T) => {
|
|
|
91
91
|
d((c = s == null ? void 0 : s.errors[0]) == null ? void 0 : c.message);
|
|
92
92
|
else if ((n = (o = s == null ? void 0 : s.data) == null ? void 0 : o.community_getLeaderBoardList) != null && n.records) {
|
|
93
93
|
const { records: r } = (t = s == null ? void 0 : s.data) == null ? void 0 : t.community_getLeaderBoardList;
|
|
94
|
-
|
|
94
|
+
z(r);
|
|
95
95
|
} else
|
|
96
96
|
console.error("GetLeaderBoardList API failed");
|
|
97
97
|
} catch (e) {
|
|
@@ -104,8 +104,8 @@ const fe = (T) => {
|
|
|
104
104
|
try {
|
|
105
105
|
const o = {
|
|
106
106
|
input: a
|
|
107
|
-
}, n = await
|
|
108
|
-
((c = (i = n == null ? void 0 : n.data) == null ? void 0 : i.community_setupChallenge) == null ? void 0 : c.message) === "challenge has been setUp successfully" ?
|
|
107
|
+
}, n = await w.setUpChallenge(o, h, f);
|
|
108
|
+
((c = (i = n == null ? void 0 : n.data) == null ? void 0 : i.community_setupChallenge) == null ? void 0 : c.message) === "challenge has been setUp successfully" ? T("Challenge has been setup successfully!") : console.error("Something went wrong !");
|
|
109
109
|
} catch (o) {
|
|
110
110
|
console.error("Error in update goal API:", o), d("Something went wrong, please try after sometime !");
|
|
111
111
|
}
|
|
@@ -149,7 +149,7 @@ const fe = (T) => {
|
|
|
149
149
|
d((i = e == null ? void 0 : e.errors[0]) == null ? void 0 : i.message);
|
|
150
150
|
else if ((o = (c = e == null ? void 0 : e.data) == null ? void 0 : c.community_receivedRequests) != null && o.records) {
|
|
151
151
|
const { records: s } = (n = e == null ? void 0 : e.data) == null ? void 0 : n.community_receivedRequests;
|
|
152
|
-
|
|
152
|
+
M(s);
|
|
153
153
|
} else
|
|
154
154
|
console.error("GetReceivedRequestList API failed");
|
|
155
155
|
} catch (t) {
|
|
@@ -163,11 +163,11 @@ const fe = (T) => {
|
|
|
163
163
|
isEnrolled: b,
|
|
164
164
|
enrolledParticipants: x,
|
|
165
165
|
userAchieved: J,
|
|
166
|
-
leaderBoardList:
|
|
166
|
+
leaderBoardList: O,
|
|
167
167
|
stepsData: Q,
|
|
168
168
|
setUpChallenge: re,
|
|
169
|
-
sentRequestList:
|
|
170
|
-
receivedRequestList:
|
|
169
|
+
sentRequestList: F,
|
|
170
|
+
receivedRequestList: K,
|
|
171
171
|
getSentRequestList: te,
|
|
172
172
|
getReceivedRequestList: E,
|
|
173
173
|
derivedChallenge: X,
|
|
@@ -189,10 +189,11 @@ const fe = (T) => {
|
|
|
189
189
|
challengeDetails: se,
|
|
190
190
|
userId: P,
|
|
191
191
|
cugId: D,
|
|
192
|
-
filters: U
|
|
192
|
+
filters: U,
|
|
193
|
+
constants: ie
|
|
193
194
|
}
|
|
194
195
|
);
|
|
195
196
|
};
|
|
196
197
|
export {
|
|
197
|
-
|
|
198
|
+
he as default
|
|
198
199
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as f } from "./index-
|
|
1
|
+
import { n as f } from "./index-DhDn8P6v.mjs";
|
|
2
2
|
import y from "react";
|
|
3
|
-
import { z as _, F as m } from "./ToggleButton-
|
|
3
|
+
import { z as _, F as m } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
4
4
|
function P(r, e) {
|
|
5
5
|
for (var t = 0; t < e.length; t++) {
|
|
6
6
|
const o = e[t];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as f } from "./index-
|
|
1
|
+
import { n as f } from "./index-DhDn8P6v.mjs";
|
|
2
2
|
import y from "react";
|
|
3
|
-
import { z as m, F as g } from "./ToggleButton-
|
|
3
|
+
import { z as m, F as g } from "./ToggleButton-Dbd4xJQ3.mjs";
|
|
4
4
|
function v(t, e) {
|
|
5
5
|
for (var r = 0; r < e.length; r++) {
|
|
6
6
|
const s = e[r];
|