@platform-x/hcltechx-mfe-wrapper 1.0.14 → 1.0.16
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-DKUN3thC.mjs +28 -0
- package/ChallengeDetailComponent-C6lsSLpA.mjs +107 -0
- package/ChallengeSliderComponent-CeD1p3L6.mjs +85 -0
- package/CommonContentComponent-DPPrx3bD.mjs +78 -0
- package/{DailyMotion-BVL2PnO4.mjs → DailyMotion-fLexJPDN.mjs} +2 -2
- package/EngagementHomeComponent-BNU8QZsQ.mjs +100 -0
- package/{EventDetailComponent-Cvlqw2tH.mjs → EventDetailComponent-Dbdse5St.mjs} +44 -52
- package/{EventList-CbAUuRYM.mjs → EventList-BYF03nEh.mjs} +75060 -81693
- package/{EventListComponent-BI2rzsKd.mjs → EventListComponent-BJ3sTQ_I.mjs} +34 -42
- package/{Facebook-CIgIth_K.mjs → Facebook-B5dHT-pV.mjs} +2 -2
- package/{FilePlayer-B-uogb5D.mjs → FilePlayer-DvM19mlx.mjs} +2 -2
- package/{IndividualChallengeComponent-Brw0d-4R.mjs → IndividualChallengeComponent-CS58zTFF.mjs} +59 -67
- package/{Kaltura-BOsL7fO-.mjs → Kaltura-D6RVtBip.mjs} +2 -2
- package/{Mixcloud-DHUTbpw0.mjs → Mixcloud-CAXby0Wn.mjs} +2 -2
- package/{Mux-DK0X2BTT.mjs → Mux-mczERHRU.mjs} +2 -2
- package/{Preview-CIJ3xp_6.mjs → Preview-DovVCnK6.mjs} +1 -1
- package/RecentCarousel-C_fm1uG1.mjs +245 -0
- package/Share-CuYAlNkA.mjs +1905 -0
- package/{SoundCloud-4PeOIDGR.mjs → SoundCloud-YLqZjHKm.mjs} +2 -2
- package/{Streamable-Ce9q7xrY.mjs → Streamable-BGnFDdbJ.mjs} +2 -2
- package/{Twitch-BQxxLIOM.mjs → Twitch-FDSz8d9g.mjs} +2 -2
- package/{Vidyard-smgMZHrX.mjs → Vidyard-DoM-iNK7.mjs} +2 -2
- package/{Vimeo-Cq5Swu9L.mjs → Vimeo-BAZx0mgo.mjs} +2 -2
- package/{Wistia-BlOpWmsf.mjs → Wistia-D0CtAbcg.mjs} +2 -2
- package/{YouTube-CHNRVTxo.mjs → YouTube-AKeQPHRd.mjs} +2 -2
- package/{index-kJrH8shi.mjs → index-B0kXOAse.mjs} +3 -3
- package/{index-CKbXg2l_.mjs → index-BW7MAuY_.mjs} +3208 -4488
- package/index.mjs +2 -2
- package/{mutateApi-D6lDkc9e.mjs → mutateApi-UtIkY8_8.mjs} +1 -1
- package/package.json +1 -1
- package/ArticleVodListComponent-BKXBg22Y.mjs +0 -36
- package/ChallengeDetailComponent-Dv_LudnS.mjs +0 -115
- package/ChallengeSliderComponent-yvfp3ehJ.mjs +0 -93
- package/CommonContentComponent-CEHufGoM.mjs +0 -86
- package/EngagementHomeComponent-CsvCgXwx.mjs +0 -108
- package/RecentCarousel-BrE1qBvp.mjs +0 -340
- package/Share-DEEl5DxK.mjs +0 -2265
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { b as p } from "./EventList-BYF03nEh.mjs";
|
|
3
|
+
import "react";
|
|
4
|
+
import "./index-BW7MAuY_.mjs";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
const f = ({
|
|
7
|
+
data: t,
|
|
8
|
+
prelemAnalyticsProp: o,
|
|
9
|
+
prelemAuthoringHelper: r,
|
|
10
|
+
secondaryArgs: i,
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
+
userId: s,
|
|
13
|
+
filters: e,
|
|
14
|
+
relativePath: m
|
|
15
|
+
}) => /* @__PURE__ */ n(
|
|
16
|
+
p,
|
|
17
|
+
{
|
|
18
|
+
content: t,
|
|
19
|
+
analytics: o,
|
|
20
|
+
authoringHelper: r,
|
|
21
|
+
secondaryArgs: i,
|
|
22
|
+
filters: e,
|
|
23
|
+
relativePath: m
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
export {
|
|
27
|
+
f as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as H } from "react/jsx-runtime";
|
|
2
|
+
import { C as J } from "./EventList-BYF03nEh.mjs";
|
|
3
|
+
import { useState as m, useEffect as k } from "react";
|
|
4
|
+
import { s as d, f as A, a as p } from "./index-BW7MAuY_.mjs";
|
|
5
|
+
import { m as q } from "./mutateApi-UtIkY8_8.mjs";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
const Q = (C) => {
|
|
8
|
+
const {
|
|
9
|
+
pageData: t = {},
|
|
10
|
+
secondaryArgs: y,
|
|
11
|
+
prelemAnalyticsProp: E,
|
|
12
|
+
prelemAuthoringHelper: P,
|
|
13
|
+
userId: L
|
|
14
|
+
} = C || {}, {
|
|
15
|
+
prelemBaseEndpoint: { language: u, site_host: f }
|
|
16
|
+
} = y, [B, g] = m(!1), [S, I] = m(!1), [j, v] = m(0), [D, w] = m(0), [T, G] = m([]), h = localStorage.getItem("userId") || L, U = async (a) => {
|
|
17
|
+
var n, l, i, s, e, r;
|
|
18
|
+
if (!h) {
|
|
19
|
+
d("User ID is not available. Please log in.");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
g(!0);
|
|
24
|
+
const c = {
|
|
25
|
+
input: {
|
|
26
|
+
...a,
|
|
27
|
+
userId: h
|
|
28
|
+
}
|
|
29
|
+
}, o = await q.joinChallenge(c, u, f);
|
|
30
|
+
((n = o == null ? void 0 : o.errors) == null ? void 0 : n.length) > 0 ? d((l = o == null ? void 0 : o.errors[0]) == null ? void 0 : l.message) : (s = (i = o == null ? void 0 : o.data) == null ? void 0 : i.community_joinChallenge) != null && s.id ? (p((r = (e = o == null ? void 0 : o.data) == null ? void 0 : e.community_joinChallenge) == null ? void 0 : r.message), I(!0), _()) : console.error("Join Challenge API failed");
|
|
31
|
+
} catch (c) {
|
|
32
|
+
console.error("Error in Join Challenge API:", c);
|
|
33
|
+
} finally {
|
|
34
|
+
g(!1);
|
|
35
|
+
}
|
|
36
|
+
}, _ = async () => {
|
|
37
|
+
var a, n, l, i;
|
|
38
|
+
if (!h) {
|
|
39
|
+
d("User ID is not available. Please log in.");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
g(!0);
|
|
44
|
+
const s = {
|
|
45
|
+
challenge_id: t == null ? void 0 : t.page,
|
|
46
|
+
user_id: L
|
|
47
|
+
}, e = await A.getChallengeDetails(s, u, f);
|
|
48
|
+
if (((a = e == null ? void 0 : e.errors) == null ? void 0 : a.length) > 0)
|
|
49
|
+
d((n = e == null ? void 0 : e.errors[0]) == null ? void 0 : n.message);
|
|
50
|
+
else if ((l = e == null ? void 0 : e.data) != null && l.community_challengesDetail) {
|
|
51
|
+
const {
|
|
52
|
+
total_participant: r,
|
|
53
|
+
is_joined: c,
|
|
54
|
+
user_steps: o = 0
|
|
55
|
+
} = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_challengesDetail;
|
|
56
|
+
I(c), v(r), w(o);
|
|
57
|
+
} else
|
|
58
|
+
console.error("GetEventDetails API failed");
|
|
59
|
+
} catch (s) {
|
|
60
|
+
console.error("Error in GetEventDetails API:", s);
|
|
61
|
+
} finally {
|
|
62
|
+
g(!1);
|
|
63
|
+
}
|
|
64
|
+
}, b = async () => {
|
|
65
|
+
var a, n, l, i, s;
|
|
66
|
+
try {
|
|
67
|
+
g(!0);
|
|
68
|
+
const e = {
|
|
69
|
+
challenge_id: t == null ? void 0 : t.page,
|
|
70
|
+
user_id: localStorage.getItem("userId")
|
|
71
|
+
}, r = await A.getLeaderBoardList(e, u, f);
|
|
72
|
+
if (((a = r == null ? void 0 : r.errors) == null ? void 0 : a.length) > 0)
|
|
73
|
+
d((n = r == null ? void 0 : r.errors[0]) == null ? void 0 : n.message);
|
|
74
|
+
else if ((i = (l = r == null ? void 0 : r.data) == null ? void 0 : l.community_getLeaderBoardList) != null && i.records) {
|
|
75
|
+
const { records: c } = (s = r == null ? void 0 : r.data) == null ? void 0 : s.community_getLeaderBoardList;
|
|
76
|
+
G(c);
|
|
77
|
+
} else
|
|
78
|
+
console.error("GetLeaderBoardList API failed");
|
|
79
|
+
} catch (e) {
|
|
80
|
+
console.error("Error in GetLeaderBoardList API:", e);
|
|
81
|
+
} finally {
|
|
82
|
+
g(!1);
|
|
83
|
+
}
|
|
84
|
+
}, x = {
|
|
85
|
+
joinChallenge: U,
|
|
86
|
+
loading: B,
|
|
87
|
+
isEnrolled: S,
|
|
88
|
+
enrolledParticipants: j,
|
|
89
|
+
userAchieved: D,
|
|
90
|
+
leaderBoardList: T
|
|
91
|
+
};
|
|
92
|
+
return k(() => {
|
|
93
|
+
t != null && t.page && (_(), b());
|
|
94
|
+
}, [t]), /* @__PURE__ */ H(
|
|
95
|
+
J,
|
|
96
|
+
{
|
|
97
|
+
content: t,
|
|
98
|
+
analytics: E,
|
|
99
|
+
authoringHelper: P,
|
|
100
|
+
secondaryArgs: y,
|
|
101
|
+
challengeDetails: x
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
Q as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as z } from "react/jsx-runtime";
|
|
2
|
+
import { f as D, c as F } from "./EventList-BYF03nEh.mjs";
|
|
3
|
+
import { useState as d, useEffect as J } from "react";
|
|
4
|
+
import { f as p, s as a, a as K } from "./index-BW7MAuY_.mjs";
|
|
5
|
+
import { m as N } from "./mutateApi-UtIkY8_8.mjs";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
const Z = (I) => {
|
|
8
|
+
var S, P, A;
|
|
9
|
+
const { pageData: s = {}, secondaryArgs: f, userId: T, filters: _ } = I || {}, [k, u] = d(!1), [E, y] = d({}), [G, b] = d(0), [L, v] = d([]), w = localStorage.getItem("userId") || T, {
|
|
10
|
+
prelemBaseEndpoint: { site_host: g, language: h }
|
|
11
|
+
} = f, x = {
|
|
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 = (S = s == null ? void 0 : s.settings) == null ? void 0 : S.keywords) == null ? void 0 : P.join(", "),
|
|
16
|
+
isAuthoring: !1,
|
|
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
|
+
}, j = {
|
|
20
|
+
isAuthoring: !1
|
|
21
|
+
}, H = async (l, r, c, n = "", o = "wellnessevent") => {
|
|
22
|
+
var e, i, m, C;
|
|
23
|
+
const t = await p.getContentSchemaList(
|
|
24
|
+
{
|
|
25
|
+
searchTerm: n,
|
|
26
|
+
filter: (o == null ? void 0 : o.toLocaleLowerCase()) === "events" ? "wellnessevent" : o == null ? void 0 : o.toLocaleLowerCase()
|
|
27
|
+
},
|
|
28
|
+
l || "en",
|
|
29
|
+
r
|
|
30
|
+
);
|
|
31
|
+
(i = (e = t == null ? void 0 : t.data) == null ? void 0 : e.publish_getContents) != null && i.records ? c((C = (m = t == null ? void 0 : t.data) == null ? void 0 : m.publish_getContents) == null ? void 0 : C.records) : a("Something went wrong !");
|
|
32
|
+
}, M = async (l, r, c) => {
|
|
33
|
+
var n, o;
|
|
34
|
+
try {
|
|
35
|
+
const t = {
|
|
36
|
+
input: { activity_type: c, target: l.toString(), action: r },
|
|
37
|
+
user_id: w
|
|
38
|
+
}, e = await N.setPersonalGoal(t, h, g);
|
|
39
|
+
((o = (n = e == null ? void 0 : e.data) == null ? void 0 : n.community_setPersonalGoal) == null ? void 0 : o.message) === "Created Successfully!!!" && r === "goal" ? K("Goal updated successfully!") : r !== "entry" && a("Something went wrong, please try after sometime !");
|
|
40
|
+
} catch (t) {
|
|
41
|
+
console.error("Error in update goal API:", t), a("Something went wrong, please try after sometime !");
|
|
42
|
+
}
|
|
43
|
+
}, B = async (l = "") => {
|
|
44
|
+
var r, c, n, o;
|
|
45
|
+
try {
|
|
46
|
+
u(!0);
|
|
47
|
+
const t = {
|
|
48
|
+
date: l,
|
|
49
|
+
user_id: w
|
|
50
|
+
}, e = await p.fetchPersonalTracker(t, h, g);
|
|
51
|
+
if (((r = e == null ? void 0 : e.errors) == null ? void 0 : r.length) > 0)
|
|
52
|
+
a((c = e == null ? void 0 : e.errors[0]) == null ? void 0 : c.message);
|
|
53
|
+
else if ((n = e == null ? void 0 : e.data) != null && n.community_fetchPersonalTracker) {
|
|
54
|
+
const { steps: i, streak_count: m } = (o = e == null ? void 0 : e.data) == null ? void 0 : o.community_fetchPersonalTracker;
|
|
55
|
+
y(i), b(m);
|
|
56
|
+
} else
|
|
57
|
+
console.error("GetPersonalData API failed"), a("GetPersonalData API failed");
|
|
58
|
+
} catch (t) {
|
|
59
|
+
a("Something went wrong !"), console.error("Error in GetPersonalData API:", t), a("Error in GetPersonalData API"), y({});
|
|
60
|
+
} finally {
|
|
61
|
+
u(!1);
|
|
62
|
+
}
|
|
63
|
+
}, q = {
|
|
64
|
+
stepsData: E,
|
|
65
|
+
loading: k,
|
|
66
|
+
updateGoals: M
|
|
67
|
+
};
|
|
68
|
+
return J(() => {
|
|
69
|
+
B(D(/* @__PURE__ */ new Date(), "yyyy-MM-dd")), H(h, g, v, "", "challenges");
|
|
70
|
+
}, []), /* @__PURE__ */ z(
|
|
71
|
+
F,
|
|
72
|
+
{
|
|
73
|
+
analytics: x,
|
|
74
|
+
authoringHelper: j,
|
|
75
|
+
secondaryArgs: f,
|
|
76
|
+
stepsDetails: q,
|
|
77
|
+
streaksCount: G,
|
|
78
|
+
data: L,
|
|
79
|
+
filters: _
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
Z as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as O } from "react/jsx-runtime";
|
|
2
|
+
import j, { memo as x, useState as g, useEffect as z } from "react";
|
|
3
|
+
import { F as J, f as N, s as w } from "./index-BW7MAuY_.mjs";
|
|
4
|
+
import { m as $ } from "./mutateApi-UtIkY8_8.mjs";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
const A = {
|
|
7
|
+
Article: "Article",
|
|
8
|
+
Quiz: "Quiz",
|
|
9
|
+
Poll: "Poll",
|
|
10
|
+
Event: "Event",
|
|
11
|
+
Vod: "Vod"
|
|
12
|
+
}, c = {};
|
|
13
|
+
Object.keys(A).forEach((l) => (c[l] = j.lazy(
|
|
14
|
+
() => import("./index-B0kXOAse.mjs").then((t) => ({
|
|
15
|
+
default: t[A[l]]
|
|
16
|
+
}))
|
|
17
|
+
), c));
|
|
18
|
+
const B = (l) => {
|
|
19
|
+
var y, a, h, _, C, S;
|
|
20
|
+
const { pageData: t = {}, secondaryArgs: m = {}, filters: P, relativePath: v = "" } = l || {}, E = c[(t == null ? void 0 : t.content_type) || (t == null ? void 0 : t.tag_name)] || J, T = {
|
|
21
|
+
pageId: t == null ? void 0 : t.page,
|
|
22
|
+
pageTitle: t == null ? void 0 : t.title,
|
|
23
|
+
pageDesc: t == null ? void 0 : t.description,
|
|
24
|
+
pageTags: (a = (y = t == null ? void 0 : t.settings) == null ? void 0 : y.keywords) == null ? void 0 : a.join(", "),
|
|
25
|
+
isAuthoring: !1,
|
|
26
|
+
isSeoEnabled: (h = t == null ? void 0 : t.settings) == null ? void 0 : h.seo_blockIndexing,
|
|
27
|
+
isAnalyticsEnabled: t == null ? void 0 : t.analytics_enable
|
|
28
|
+
}, b = {
|
|
29
|
+
isModalShow: !0
|
|
30
|
+
}, [u, n] = g(!1), [I, k] = g([]), {
|
|
31
|
+
prelemBaseEndpoint: { site_host: d, language: f }
|
|
32
|
+
} = m, p = async () => {
|
|
33
|
+
var o, s;
|
|
34
|
+
try {
|
|
35
|
+
u || n(!0);
|
|
36
|
+
const e = await N.fetchPoll({ title: t.document_path }, f, d);
|
|
37
|
+
k((s = (o = e.data) == null ? void 0 : o.users_fetchContent) == null ? void 0 : s.options), n(!1);
|
|
38
|
+
} catch (e) {
|
|
39
|
+
n(!1), w(`${e}`);
|
|
40
|
+
}
|
|
41
|
+
}, L = async (o) => {
|
|
42
|
+
var s;
|
|
43
|
+
try {
|
|
44
|
+
n(!0);
|
|
45
|
+
const e = {
|
|
46
|
+
input: {
|
|
47
|
+
pollInfo: { ...o, start_date: "" }
|
|
48
|
+
}
|
|
49
|
+
}, i = await $.savePoll(e, f, d);
|
|
50
|
+
if (n(!1), (s = i == null ? void 0 : i.data) != null && s.users_saveContent) {
|
|
51
|
+
const r = JSON.parse(localStorage.getItem("TakenPoles") || "[]");
|
|
52
|
+
r != null && r.includes(t.page) || localStorage.setItem("TakenPoles", JSON.stringify([...r, t.page])), p();
|
|
53
|
+
}
|
|
54
|
+
} catch (e) {
|
|
55
|
+
n(!1), w(`${e}`);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return z(() => {
|
|
59
|
+
const o = JSON.parse(localStorage.getItem("TakenPoles") || "[]");
|
|
60
|
+
o != null && o.includes(t == null ? void 0 : t.page) && p();
|
|
61
|
+
}, []), /* @__PURE__ */ O(
|
|
62
|
+
E,
|
|
63
|
+
{
|
|
64
|
+
content: t,
|
|
65
|
+
analytics: T,
|
|
66
|
+
authoringHelper: b,
|
|
67
|
+
secondaryArgs: m,
|
|
68
|
+
results: ((_ = t == null ? void 0 : t.content_type) == null ? void 0 : _.toLowerCase()) === "poll" ? I : void 0,
|
|
69
|
+
onSubmit: ((C = t == null ? void 0 : t.content_type) == null ? void 0 : C.toLowerCase()) === "poll" ? (o) => L(o) : void 0,
|
|
70
|
+
showLoading: ((S = t == null ? void 0 : t.content_type) == null ? void 0 : S.toLowerCase()) === "poll" ? u : void 0,
|
|
71
|
+
filters: P,
|
|
72
|
+
relativePath: v
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}, R = x(B);
|
|
76
|
+
export {
|
|
77
|
+
R as default
|
|
78
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as P } from "./index-
|
|
1
|
+
import { g as P } from "./index-BW7MAuY_.mjs";
|
|
2
2
|
import v from "react";
|
|
3
|
-
import { u as D, p as O } from "./EventList-
|
|
3
|
+
import { u as D, p as O } from "./EventList-BYF03nEh.mjs";
|
|
4
4
|
function b(t, e) {
|
|
5
5
|
for (var r = 0; r < e.length; r++) {
|
|
6
6
|
const o = e[r];
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as z } from "react/jsx-runtime";
|
|
2
|
+
import { f as F, d as J } from "./EventList-BYF03nEh.mjs";
|
|
3
|
+
import { useState as l, useEffect as K } from "react";
|
|
4
|
+
import { f as E, s, a as N } from "./index-BW7MAuY_.mjs";
|
|
5
|
+
import { m as O } from "./mutateApi-UtIkY8_8.mjs";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
const v = async (w, g, y, D = "", t = "wellnessevent") => {
|
|
8
|
+
var f, d, o, r;
|
|
9
|
+
const a = await E.getContentSchemaList(
|
|
10
|
+
{
|
|
11
|
+
searchTerm: D,
|
|
12
|
+
filter: (t == null ? void 0 : t.toLocaleLowerCase()) === "events" ? "wellnessevent" : t == null ? void 0 : t.toLocaleLowerCase()
|
|
13
|
+
},
|
|
14
|
+
w || "en",
|
|
15
|
+
g
|
|
16
|
+
);
|
|
17
|
+
(d = (f = a == null ? void 0 : a.data) == null ? void 0 : f.publish_getContents) != null && d.records ? y((r = (o = a == null ? void 0 : a.data) == null ? void 0 : o.publish_getContents) == null ? void 0 : r.records) : s("Something went wrong !");
|
|
18
|
+
}, R = (w) => {
|
|
19
|
+
const {
|
|
20
|
+
secondaryArgs: g,
|
|
21
|
+
prelemAnalyticsProp: y,
|
|
22
|
+
prelemAuthoringHelper: D,
|
|
23
|
+
userId: t,
|
|
24
|
+
filters: a,
|
|
25
|
+
relativePath: f = "",
|
|
26
|
+
articleData: d
|
|
27
|
+
} = w || {}, {
|
|
28
|
+
prelemBaseEndpoint: { language: o, site_host: r }
|
|
29
|
+
} = g, [p, S] = l(!1), [_, I] = l({}), [G, k] = l({}), [T, L] = l(0), h = localStorage.getItem("userId") || t, [b, H] = l([]), [x, M] = l([]), A = async (P, c, u) => {
|
|
30
|
+
var i, m;
|
|
31
|
+
if (!h) {
|
|
32
|
+
s("User ID is not available. Please log in.");
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const n = {
|
|
37
|
+
input: { activity_type: u, target: P.toString(), action: c },
|
|
38
|
+
user_id: h
|
|
39
|
+
}, e = await O.setPersonalGoal(n, o, r);
|
|
40
|
+
((m = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_setPersonalGoal) == null ? void 0 : m.message) === "Created Successfully!!!" && c === "goal" ? N("Goal updated successfully!") : c !== "entry" && s("Something went wrong, please try after sometime !");
|
|
41
|
+
} catch (n) {
|
|
42
|
+
console.error("Error in update goal API:", n), s("Something went wrong, please try after sometime !");
|
|
43
|
+
}
|
|
44
|
+
}, C = async (P = "") => {
|
|
45
|
+
var c, u, i, m;
|
|
46
|
+
if (!h) {
|
|
47
|
+
s("User ID is not available. Please log in.");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
S(!0);
|
|
52
|
+
const n = {
|
|
53
|
+
date: P,
|
|
54
|
+
user_id: h
|
|
55
|
+
}, e = await E.fetchPersonalTracker(n, o, r);
|
|
56
|
+
if (((c = e == null ? void 0 : e.errors) == null ? void 0 : c.length) > 0)
|
|
57
|
+
s((u = e == null ? void 0 : e.errors[0]) == null ? void 0 : u.message);
|
|
58
|
+
else if ((i = e == null ? void 0 : e.data) != null && i.community_fetchPersonalTracker) {
|
|
59
|
+
const { water_intake: B, steps: W, streak_count: q } = (m = e == null ? void 0 : e.data) == null ? void 0 : m.community_fetchPersonalTracker;
|
|
60
|
+
I(B), k(W), L(q);
|
|
61
|
+
} else
|
|
62
|
+
console.error("GetPersonalData API failed"), s("GetPersonalData API failed");
|
|
63
|
+
} catch (n) {
|
|
64
|
+
console.error("Error in GetPersonalData API:", n), s("Error in GetPersonalData API"), I({}), k({});
|
|
65
|
+
} finally {
|
|
66
|
+
S(!1);
|
|
67
|
+
}
|
|
68
|
+
}, U = {
|
|
69
|
+
waterIntakeData: _,
|
|
70
|
+
loading: p,
|
|
71
|
+
fetchPersonalData: C,
|
|
72
|
+
updateGoals: A
|
|
73
|
+
}, j = {
|
|
74
|
+
stepsData: G,
|
|
75
|
+
loading: p,
|
|
76
|
+
updateGoals: A
|
|
77
|
+
};
|
|
78
|
+
return K(() => {
|
|
79
|
+
C(F(/* @__PURE__ */ new Date(), "yyyy-MM-dd")), v(o, r, H, "", "challenges"), v(o, r, M, "", "wellnessevent");
|
|
80
|
+
}, []), /* @__PURE__ */ z(
|
|
81
|
+
J,
|
|
82
|
+
{
|
|
83
|
+
analytics: y,
|
|
84
|
+
authoringHelper: D,
|
|
85
|
+
secondaryArgs: g,
|
|
86
|
+
waterIntakeDetails: U,
|
|
87
|
+
stepsDetails: j,
|
|
88
|
+
streaksCount: T,
|
|
89
|
+
data: b,
|
|
90
|
+
eventData: x,
|
|
91
|
+
articleVodData: d,
|
|
92
|
+
filters: a,
|
|
93
|
+
relativePath: f
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
R as EngagementHomeComponent,
|
|
99
|
+
R as default
|
|
100
|
+
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as
|
|
3
|
-
import { useState as a, useEffect as
|
|
4
|
-
import {
|
|
1
|
+
import { jsx as U } from "react/jsx-runtime";
|
|
2
|
+
import { E as V } from "./EventList-BYF03nEh.mjs";
|
|
3
|
+
import { useState as a, useEffect as p } from "react";
|
|
4
|
+
import { f as q, s as d, a as I } from "./index-BW7MAuY_.mjs";
|
|
5
|
+
import { m as z } from "./mutateApi-UtIkY8_8.mjs";
|
|
5
6
|
import "react-dom";
|
|
6
|
-
import "react/jsx-runtime";
|
|
7
7
|
const Z = (h) => {
|
|
8
8
|
const {
|
|
9
9
|
pageData: t = {},
|
|
10
|
-
secondaryArgs:
|
|
11
|
-
prelemAnalyticsProp:
|
|
12
|
-
prelemAuthoringHelper:
|
|
13
|
-
userId:
|
|
14
|
-
filters:
|
|
15
|
-
relativePath:
|
|
10
|
+
secondaryArgs: g,
|
|
11
|
+
prelemAnalyticsProp: S,
|
|
12
|
+
prelemAuthoringHelper: A,
|
|
13
|
+
userId: P,
|
|
14
|
+
filters: w,
|
|
15
|
+
relativePath: j = ""
|
|
16
16
|
} = h || {}, {
|
|
17
|
-
prelemBaseEndpoint: { language:
|
|
18
|
-
} =
|
|
19
|
-
joinEvent: async (
|
|
17
|
+
prelemBaseEndpoint: { language: v, site_host: _ }
|
|
18
|
+
} = g, [T, m] = a(!1), [k, E] = a(!1), [L, b] = a(0), f = localStorage.getItem("userId") || P, [x, D] = a(""), [G, H] = a(!1), J = {
|
|
19
|
+
joinEvent: async (u) => {
|
|
20
20
|
var r, s, i, o, l, c;
|
|
21
|
-
if (!
|
|
21
|
+
if (!f) {
|
|
22
22
|
d("User ID is not available. Please log in.");
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
@@ -26,29 +26,29 @@ const Z = (h) => {
|
|
|
26
26
|
m(!0);
|
|
27
27
|
const n = {
|
|
28
28
|
input: {
|
|
29
|
-
...
|
|
30
|
-
userId:
|
|
29
|
+
...u,
|
|
30
|
+
userId: f
|
|
31
31
|
}
|
|
32
|
-
}, e = await
|
|
33
|
-
((r = e == null ? void 0 : e.errors) == null ? void 0 : r.length) > 0 ? d((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message) : (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_userRegistration) != null && o.id ? (I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_userRegistration) == null ? void 0 : c.message),
|
|
32
|
+
}, e = await z.joinEvent(n, v, _);
|
|
33
|
+
((r = e == null ? void 0 : e.errors) == null ? void 0 : r.length) > 0 ? d((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message) : (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_userRegistration) != null && o.id ? (I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_userRegistration) == null ? void 0 : c.message), E(!0), y()) : console.error("Join Event API failed");
|
|
34
34
|
} catch (n) {
|
|
35
35
|
console.error("Error in Join Event API:", n);
|
|
36
36
|
} finally {
|
|
37
37
|
m(!1);
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
loading:
|
|
41
|
-
isRegistered:
|
|
42
|
-
registeredParticipants:
|
|
43
|
-
meetingLink:
|
|
44
|
-
isStarted:
|
|
40
|
+
loading: T,
|
|
41
|
+
isRegistered: k,
|
|
42
|
+
registeredParticipants: L,
|
|
43
|
+
meetingLink: x,
|
|
44
|
+
isStarted: G
|
|
45
45
|
}, y = async () => {
|
|
46
|
-
var
|
|
46
|
+
var u, r, s, i, o, l, c;
|
|
47
47
|
try {
|
|
48
48
|
m(!0);
|
|
49
|
-
const n = (
|
|
49
|
+
const n = (u = t == null ? void 0 : t.event_type) != null && u.includes("Virtual") ? {
|
|
50
50
|
event_id: t == null ? void 0 : t.page,
|
|
51
|
-
user_id:
|
|
51
|
+
user_id: f,
|
|
52
52
|
type: "webinar",
|
|
53
53
|
start_date: new Date(t == null ? void 0 : t.start_date_time).toISOString(),
|
|
54
54
|
end_date: new Date(t == null ? void 0 : t.end_date_time).toISOString()
|
|
@@ -56,18 +56,18 @@ const Z = (h) => {
|
|
|
56
56
|
// end_date: pageData?.end_date_time, //format(new Date(pageData?.end_date_time), "YYY-MM-dd"),
|
|
57
57
|
} : {
|
|
58
58
|
event_id: t == null ? void 0 : t.page,
|
|
59
|
-
user_id:
|
|
60
|
-
}, e = await
|
|
59
|
+
user_id: f
|
|
60
|
+
}, e = await q.getEventDetails(n, v, _);
|
|
61
61
|
if (((r = e == null ? void 0 : e.errors) == null ? void 0 : r.length) > 0)
|
|
62
62
|
d((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message);
|
|
63
63
|
else if ((i = e == null ? void 0 : e.data) != null && i.community_eventDetails) {
|
|
64
64
|
const {
|
|
65
|
-
total_participant:
|
|
66
|
-
is_joined:
|
|
67
|
-
meeting_link:
|
|
68
|
-
is_started:
|
|
65
|
+
total_participant: O,
|
|
66
|
+
is_joined: B,
|
|
67
|
+
meeting_link: C = "",
|
|
68
|
+
is_started: M = !1
|
|
69
69
|
} = (o = e == null ? void 0 : e.data) == null ? void 0 : o.community_eventDetails;
|
|
70
|
-
I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_eventDetails) == null ? void 0 : c.message),
|
|
70
|
+
I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_eventDetails) == null ? void 0 : c.message), E(B), b(O), D(C), H(M);
|
|
71
71
|
} else
|
|
72
72
|
console.error("GetEventDetails API failed");
|
|
73
73
|
} catch (n) {
|
|
@@ -76,27 +76,19 @@ const Z = (h) => {
|
|
|
76
76
|
m(!1);
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
return
|
|
79
|
+
return p(() => {
|
|
80
80
|
t != null && t.page && y();
|
|
81
|
-
}, [t]), /* @__PURE__ */ U
|
|
82
|
-
|
|
81
|
+
}, [t]), /* @__PURE__ */ U(
|
|
82
|
+
V,
|
|
83
83
|
{
|
|
84
84
|
content: t,
|
|
85
|
-
analytics:
|
|
86
|
-
authoringHelper:
|
|
87
|
-
secondaryArgs:
|
|
88
|
-
eventDetails:
|
|
89
|
-
filters:
|
|
90
|
-
relativePath:
|
|
91
|
-
}
|
|
92
|
-
void 0,
|
|
93
|
-
!1,
|
|
94
|
-
{
|
|
95
|
-
fileName: "/Users/manikandan.kanna/Desktop/PlatformX/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/contentTypes/Components/EventDetailComponent.tsx",
|
|
96
|
-
lineNumber: 119,
|
|
97
|
-
columnNumber: 5
|
|
98
|
-
},
|
|
99
|
-
void 0
|
|
85
|
+
analytics: S,
|
|
86
|
+
authoringHelper: A,
|
|
87
|
+
secondaryArgs: g,
|
|
88
|
+
eventDetails: J,
|
|
89
|
+
filters: w,
|
|
90
|
+
relativePath: j
|
|
91
|
+
}
|
|
100
92
|
);
|
|
101
93
|
};
|
|
102
94
|
export {
|