@platform-x/hcltechx-mfe-wrapper 1.0.13 → 1.0.15
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-Bso55pbj.mjs +36 -0
- package/ChallengeDetailComponent-B8QVladY.mjs +115 -0
- package/ChallengeSliderComponent-BvlWqch7.mjs +93 -0
- package/CommonContentComponent-sLmvojvf.mjs +86 -0
- package/{DailyMotion-C2VlhH9Y.mjs → DailyMotion-D2e1_6Lo.mjs} +2 -2
- package/EngagementHomeComponent-vw9OkASk.mjs +108 -0
- package/{EventDetailComponent-C0l-6HlH.mjs → EventDetailComponent-DyWKS8qq.mjs} +52 -44
- package/{EventList-DgI0_QJW.mjs → EventList-C5eFcxcn.mjs} +103011 -95987
- package/{EventListComponent-DwjVwU3I.mjs → EventListComponent-BVHDmTUj.mjs} +42 -34
- package/{Facebook-DmTKxbCK.mjs → Facebook-DeTNvyzj.mjs} +2 -2
- package/{FilePlayer-DiY6_vT0.mjs → FilePlayer-DJ3jIz04.mjs} +2 -2
- package/{IndividualChallengeComponent-C-lVfSZv.mjs → IndividualChallengeComponent-B_LH6kGS.mjs} +67 -59
- package/{Kaltura-Bag_Zlwc.mjs → Kaltura-D29Vxa3f.mjs} +2 -2
- package/{Mixcloud-WiZy2FyG.mjs → Mixcloud-DQ2Lv8M7.mjs} +2 -2
- package/{Mux-DrcS2l-1.mjs → Mux-Hzci7MQW.mjs} +2 -2
- package/{Preview-CoFi5EhX.mjs → Preview-Q5clyNSx.mjs} +1 -1
- package/RecentCarousel-C1ArLhM5.mjs +340 -0
- package/Share-848qnxye.mjs +2265 -0
- package/{SoundCloud-ByJ8oSnI.mjs → SoundCloud-BSArANPY.mjs} +2 -2
- package/{Streamable-C8pAdR5o.mjs → Streamable-CNuoty2V.mjs} +2 -2
- package/{Twitch-PMc-awAS.mjs → Twitch-D8ak9PNz.mjs} +2 -2
- package/{Vidyard-0pshrd1n.mjs → Vidyard-BzcUofyS.mjs} +2 -2
- package/{Vimeo-AzJ5YTLV.mjs → Vimeo-BpmjKKvG.mjs} +2 -2
- package/{Wistia-BuULozMf.mjs → Wistia-BtUevsst.mjs} +2 -2
- package/{YouTube-D54qTfpx.mjs → YouTube-DJ_h2tam.mjs} +2 -2
- package/{index-Bt-juHPR.mjs → index-6dvcnXVE.mjs} +3 -3
- package/{index-C5YsWuUC.mjs → index-BHdH4CGi.mjs} +4518 -3224
- package/index.mjs +2 -2
- package/lib/utils/constants.d.ts +1 -0
- package/lib/utils/iframeKeycloak.d.ts +1 -2
- package/{mutateApi-D1KlLkuZ.mjs → mutateApi-D_cBrIKP.mjs} +1 -1
- package/package.json +1 -1
- package/ArticleVodListComponent-7KilfZC7.mjs +0 -28
- package/ChallengeDetailComponent-D0NyHxQj.mjs +0 -107
- package/ChallengeSliderComponent-B0aMw9x2.mjs +0 -85
- package/CommonContentComponent-V9GHupDi.mjs +0 -78
- package/EngagementHomeComponent-JYwLV-F5.mjs +0 -100
- package/RecentCarousel-DhbpnjP_.mjs +0 -245
- package/Share-C2mjVquE.mjs +0 -1905
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { j as s } from "./index-BHdH4CGi.mjs";
|
|
2
|
+
import { b as m } from "./EventList-C5eFcxcn.mjs";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
const f = ({
|
|
7
|
+
data: e,
|
|
8
|
+
prelemAnalyticsProp: o,
|
|
9
|
+
prelemAuthoringHelper: t,
|
|
10
|
+
secondaryArgs: r,
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
+
userId: a,
|
|
13
|
+
filters: n,
|
|
14
|
+
relativePath: i
|
|
15
|
+
}) => /* @__PURE__ */ s.jsxDEV(
|
|
16
|
+
m,
|
|
17
|
+
{
|
|
18
|
+
content: e,
|
|
19
|
+
analytics: o,
|
|
20
|
+
authoringHelper: t,
|
|
21
|
+
secondaryArgs: r,
|
|
22
|
+
filters: n,
|
|
23
|
+
relativePath: i
|
|
24
|
+
},
|
|
25
|
+
void 0,
|
|
26
|
+
!1,
|
|
27
|
+
{
|
|
28
|
+
fileName: "/Users/manikandan.kanna/Desktop/PlatformX/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/prelems/Components/ArticleVodListComponent.tsx",
|
|
29
|
+
lineNumber: 14,
|
|
30
|
+
columnNumber: 5
|
|
31
|
+
},
|
|
32
|
+
void 0
|
|
33
|
+
);
|
|
34
|
+
export {
|
|
35
|
+
f as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { j as U, s as g, f as _, a as k } from "./index-BHdH4CGi.mjs";
|
|
2
|
+
import { C as N } from "./EventList-C5eFcxcn.mjs";
|
|
3
|
+
import { useState as d, useEffect as H } from "react";
|
|
4
|
+
import { m as J } from "./mutateApi-D_cBrIKP.mjs";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
const M = (A) => {
|
|
8
|
+
const {
|
|
9
|
+
pageData: n = {},
|
|
10
|
+
secondaryArgs: y,
|
|
11
|
+
prelemAnalyticsProp: E,
|
|
12
|
+
prelemAuthoringHelper: P,
|
|
13
|
+
userId: L
|
|
14
|
+
} = A || {}, {
|
|
15
|
+
prelemBaseEndpoint: { language: u, site_host: f }
|
|
16
|
+
} = y, [D, m] = d(!1), [p, C] = d(!1), [B, j] = d(0), [v, x] = d(0), [S, b] = d([]), h = localStorage.getItem("userId") || L, w = async (a) => {
|
|
17
|
+
var s, l, i, t, e, r;
|
|
18
|
+
if (!h) {
|
|
19
|
+
g("User ID is not available. Please log in.");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
m(!0);
|
|
24
|
+
const c = {
|
|
25
|
+
input: {
|
|
26
|
+
...a,
|
|
27
|
+
userId: h
|
|
28
|
+
}
|
|
29
|
+
}, o = await J.joinChallenge(c, u, f);
|
|
30
|
+
((s = o == null ? void 0 : o.errors) == null ? void 0 : s.length) > 0 ? g((l = o == null ? void 0 : o.errors[0]) == null ? void 0 : l.message) : (t = (i = o == null ? void 0 : o.data) == null ? void 0 : i.community_joinChallenge) != null && t.id ? (k((r = (e = o == null ? void 0 : o.data) == null ? void 0 : e.community_joinChallenge) == null ? void 0 : r.message), C(!0), I()) : console.error("Join Challenge API failed");
|
|
31
|
+
} catch (c) {
|
|
32
|
+
console.error("Error in Join Challenge API:", c);
|
|
33
|
+
} finally {
|
|
34
|
+
m(!1);
|
|
35
|
+
}
|
|
36
|
+
}, I = async () => {
|
|
37
|
+
var a, s, l, i;
|
|
38
|
+
if (!h) {
|
|
39
|
+
g("User ID is not available. Please log in.");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
m(!0);
|
|
44
|
+
const t = {
|
|
45
|
+
challenge_id: n == null ? void 0 : n.page,
|
|
46
|
+
user_id: L
|
|
47
|
+
}, e = await _.getChallengeDetails(t, u, f);
|
|
48
|
+
if (((a = e == null ? void 0 : e.errors) == null ? void 0 : a.length) > 0)
|
|
49
|
+
g((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.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
|
+
C(c), j(r), x(o);
|
|
57
|
+
} else
|
|
58
|
+
console.error("GetEventDetails API failed");
|
|
59
|
+
} catch (t) {
|
|
60
|
+
console.error("Error in GetEventDetails API:", t);
|
|
61
|
+
} finally {
|
|
62
|
+
m(!1);
|
|
63
|
+
}
|
|
64
|
+
}, T = async () => {
|
|
65
|
+
var a, s, l, i, t;
|
|
66
|
+
try {
|
|
67
|
+
m(!0);
|
|
68
|
+
const e = {
|
|
69
|
+
challenge_id: n == null ? void 0 : n.page,
|
|
70
|
+
user_id: localStorage.getItem("userId")
|
|
71
|
+
}, r = await _.getLeaderBoardList(e, u, f);
|
|
72
|
+
if (((a = r == null ? void 0 : r.errors) == null ? void 0 : a.length) > 0)
|
|
73
|
+
g((s = r == null ? void 0 : r.errors[0]) == null ? void 0 : s.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 } = (t = r == null ? void 0 : r.data) == null ? void 0 : t.community_getLeaderBoardList;
|
|
76
|
+
b(c);
|
|
77
|
+
} else
|
|
78
|
+
console.error("GetLeaderBoardList API failed");
|
|
79
|
+
} catch (e) {
|
|
80
|
+
console.error("Error in GetLeaderBoardList API:", e);
|
|
81
|
+
} finally {
|
|
82
|
+
m(!1);
|
|
83
|
+
}
|
|
84
|
+
}, G = {
|
|
85
|
+
joinChallenge: w,
|
|
86
|
+
loading: D,
|
|
87
|
+
isEnrolled: p,
|
|
88
|
+
enrolledParticipants: B,
|
|
89
|
+
userAchieved: v,
|
|
90
|
+
leaderBoardList: S
|
|
91
|
+
};
|
|
92
|
+
return H(() => {
|
|
93
|
+
n != null && n.page && (I(), T());
|
|
94
|
+
}, [n]), /* @__PURE__ */ U.jsxDEV(
|
|
95
|
+
N,
|
|
96
|
+
{
|
|
97
|
+
content: n,
|
|
98
|
+
analytics: E,
|
|
99
|
+
authoringHelper: P,
|
|
100
|
+
secondaryArgs: y,
|
|
101
|
+
challengeDetails: G
|
|
102
|
+
},
|
|
103
|
+
void 0,
|
|
104
|
+
!1,
|
|
105
|
+
{
|
|
106
|
+
fileName: "/Users/manikandan.kanna/Desktop/PlatformX/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/contentTypes/Components/ChallengeDetailComponent.tsx",
|
|
107
|
+
lineNumber: 131,
|
|
108
|
+
columnNumber: 5
|
|
109
|
+
},
|
|
110
|
+
void 0
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
export {
|
|
114
|
+
M as default
|
|
115
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { j as B, f as A, s as a, a as U } from "./index-BHdH4CGi.mjs";
|
|
2
|
+
import { f as X, c as q } from "./EventList-C5eFcxcn.mjs";
|
|
3
|
+
import { useState as d, useEffect as z } from "react";
|
|
4
|
+
import { m as F } from "./mutateApi-D_cBrIKP.mjs";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
const Z = (k) => {
|
|
8
|
+
var w, S, P;
|
|
9
|
+
const { pageData: s = {}, secondaryArgs: h, userId: b, filters: E } = k || {}, [I, u] = d(!1), [T, y] = d({}), [_, x] = d(0), [G, L] = d([]), p = localStorage.getItem("userId") || b, {
|
|
10
|
+
prelemBaseEndpoint: { site_host: g, language: f }
|
|
11
|
+
} = h, v = {
|
|
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: (S = (w = s == null ? void 0 : s.settings) == null ? void 0 : w.keywords) == null ? void 0 : S.join(", "),
|
|
16
|
+
isAuthoring: !1,
|
|
17
|
+
isSeoEnabled: (P = s == null ? void 0 : s.settings) == null ? void 0 : P.seo_blockIndexing,
|
|
18
|
+
isAnalyticsEnabled: s == null ? void 0 : s.analytics_enable
|
|
19
|
+
}, j = {
|
|
20
|
+
isAuthoring: !1
|
|
21
|
+
}, D = async (c, n, l, r = "", o = "wellnessevent") => {
|
|
22
|
+
var e, i, m, C;
|
|
23
|
+
const t = await A.getContentSchemaList(
|
|
24
|
+
{
|
|
25
|
+
searchTerm: r,
|
|
26
|
+
filter: (o == null ? void 0 : o.toLocaleLowerCase()) === "events" ? "wellnessevent" : o == null ? void 0 : o.toLocaleLowerCase()
|
|
27
|
+
},
|
|
28
|
+
c || "en",
|
|
29
|
+
n
|
|
30
|
+
);
|
|
31
|
+
(i = (e = t == null ? void 0 : t.data) == null ? void 0 : e.publish_getContents) != null && i.records ? l((C = (m = t == null ? void 0 : t.data) == null ? void 0 : m.publish_getContents) == null ? void 0 : C.records) : a("Something went wrong !");
|
|
32
|
+
}, N = async (c, n, l) => {
|
|
33
|
+
var r, o;
|
|
34
|
+
try {
|
|
35
|
+
const t = {
|
|
36
|
+
input: { activity_type: l, target: c.toString(), action: n },
|
|
37
|
+
user_id: p
|
|
38
|
+
}, e = await F.setPersonalGoal(t, f, g);
|
|
39
|
+
((o = (r = e == null ? void 0 : e.data) == null ? void 0 : r.community_setPersonalGoal) == null ? void 0 : o.message) === "Created Successfully!!!" && n === "goal" ? U("Goal updated successfully!") : n !== "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
|
+
}, H = async (c = "") => {
|
|
44
|
+
var n, l, r, o;
|
|
45
|
+
try {
|
|
46
|
+
u(!0);
|
|
47
|
+
const t = {
|
|
48
|
+
date: c,
|
|
49
|
+
user_id: p
|
|
50
|
+
}, e = await A.fetchPersonalTracker(t, f, g);
|
|
51
|
+
if (((n = e == null ? void 0 : e.errors) == null ? void 0 : n.length) > 0)
|
|
52
|
+
a((l = e == null ? void 0 : e.errors[0]) == null ? void 0 : l.message);
|
|
53
|
+
else if ((r = e == null ? void 0 : e.data) != null && r.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), x(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
|
+
}, M = {
|
|
64
|
+
stepsData: T,
|
|
65
|
+
loading: I,
|
|
66
|
+
updateGoals: N
|
|
67
|
+
};
|
|
68
|
+
return z(() => {
|
|
69
|
+
H(X(/* @__PURE__ */ new Date(), "yyyy-MM-dd")), D(f, g, L, "", "challenges");
|
|
70
|
+
}, []), /* @__PURE__ */ B.jsxDEV(
|
|
71
|
+
q,
|
|
72
|
+
{
|
|
73
|
+
analytics: v,
|
|
74
|
+
authoringHelper: j,
|
|
75
|
+
secondaryArgs: h,
|
|
76
|
+
stepsDetails: M,
|
|
77
|
+
streaksCount: _,
|
|
78
|
+
data: G,
|
|
79
|
+
filters: E
|
|
80
|
+
},
|
|
81
|
+
void 0,
|
|
82
|
+
!1,
|
|
83
|
+
{
|
|
84
|
+
fileName: "/Users/manikandan.kanna/Desktop/PlatformX/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/prelems/Components/ChallengeSliderComponent.tsx",
|
|
85
|
+
lineNumber: 126,
|
|
86
|
+
columnNumber: 5
|
|
87
|
+
},
|
|
88
|
+
void 0
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
Z as default
|
|
93
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { F as N, j, f as L, s as b } from "./index-BHdH4CGi.mjs";
|
|
2
|
+
import O, { memo as z, useState as v, useEffect as J } from "react";
|
|
3
|
+
import { m as V } from "./mutateApi-D_cBrIKP.mjs";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
const w = {
|
|
7
|
+
Article: "Article",
|
|
8
|
+
Quiz: "Quiz",
|
|
9
|
+
Poll: "Poll",
|
|
10
|
+
Event: "Event",
|
|
11
|
+
Vod: "Vod"
|
|
12
|
+
}, c = {};
|
|
13
|
+
Object.keys(w).forEach((l) => (c[l] = O.lazy(
|
|
14
|
+
() => import("./index-6dvcnXVE.mjs").then((o) => ({
|
|
15
|
+
default: o[w[l]]
|
|
16
|
+
}))
|
|
17
|
+
), c));
|
|
18
|
+
const $ = (l) => {
|
|
19
|
+
var a, y, h, C, _, S;
|
|
20
|
+
const { pageData: o = {}, secondaryArgs: m = {}, filters: E, relativePath: P = "" } = l || {}, g = c[(o == null ? void 0 : o.content_type) || (o == null ? void 0 : o.tag_name)] || N, A = {
|
|
21
|
+
pageId: o == null ? void 0 : o.page,
|
|
22
|
+
pageTitle: o == null ? void 0 : o.title,
|
|
23
|
+
pageDesc: o == null ? void 0 : o.description,
|
|
24
|
+
pageTags: (y = (a = o == null ? void 0 : o.settings) == null ? void 0 : a.keywords) == null ? void 0 : y.join(", "),
|
|
25
|
+
isAuthoring: !1,
|
|
26
|
+
isSeoEnabled: (h = o == null ? void 0 : o.settings) == null ? void 0 : h.seo_blockIndexing,
|
|
27
|
+
isAnalyticsEnabled: o == null ? void 0 : o.analytics_enable
|
|
28
|
+
}, T = {
|
|
29
|
+
isModalShow: !0
|
|
30
|
+
}, [u, n] = v(!1), [k, x] = v([]), {
|
|
31
|
+
prelemBaseEndpoint: { site_host: p, language: d }
|
|
32
|
+
} = m, f = async () => {
|
|
33
|
+
var e, s;
|
|
34
|
+
try {
|
|
35
|
+
u || n(!0);
|
|
36
|
+
const t = await L.fetchPoll({ title: o.document_path }, d, p);
|
|
37
|
+
x((s = (e = t.data) == null ? void 0 : e.users_fetchContent) == null ? void 0 : s.options), n(!1);
|
|
38
|
+
} catch (t) {
|
|
39
|
+
n(!1), b(`${t}`);
|
|
40
|
+
}
|
|
41
|
+
}, I = async (e) => {
|
|
42
|
+
var s;
|
|
43
|
+
try {
|
|
44
|
+
n(!0);
|
|
45
|
+
const t = {
|
|
46
|
+
input: {
|
|
47
|
+
pollInfo: { ...e, start_date: "" }
|
|
48
|
+
}
|
|
49
|
+
}, i = await V.savePoll(t, d, p);
|
|
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(o.page) || localStorage.setItem("TakenPoles", JSON.stringify([...r, o.page])), f();
|
|
53
|
+
}
|
|
54
|
+
} catch (t) {
|
|
55
|
+
n(!1), b(`${t}`);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return J(() => {
|
|
59
|
+
const e = JSON.parse(localStorage.getItem("TakenPoles") || "[]");
|
|
60
|
+
e != null && e.includes(o == null ? void 0 : o.page) && f();
|
|
61
|
+
}, []), /* @__PURE__ */ j.jsxDEV(
|
|
62
|
+
g,
|
|
63
|
+
{
|
|
64
|
+
content: o,
|
|
65
|
+
analytics: A,
|
|
66
|
+
authoringHelper: T,
|
|
67
|
+
secondaryArgs: m,
|
|
68
|
+
results: ((C = o == null ? void 0 : o.content_type) == null ? void 0 : C.toLowerCase()) === "poll" ? k : void 0,
|
|
69
|
+
onSubmit: ((_ = o == null ? void 0 : o.content_type) == null ? void 0 : _.toLowerCase()) === "poll" ? (e) => I(e) : void 0,
|
|
70
|
+
showLoading: ((S = o == null ? void 0 : o.content_type) == null ? void 0 : S.toLowerCase()) === "poll" ? u : void 0,
|
|
71
|
+
filters: E,
|
|
72
|
+
relativePath: P
|
|
73
|
+
},
|
|
74
|
+
void 0,
|
|
75
|
+
!1,
|
|
76
|
+
{
|
|
77
|
+
fileName: "/Users/manikandan.kanna/Desktop/PlatformX/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/contentTypes/Components/CommonContentComponent.tsx",
|
|
78
|
+
lineNumber: 89,
|
|
79
|
+
columnNumber: 5
|
|
80
|
+
},
|
|
81
|
+
void 0
|
|
82
|
+
);
|
|
83
|
+
}, R = z($);
|
|
84
|
+
export {
|
|
85
|
+
R as default
|
|
86
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as P } from "./index-
|
|
1
|
+
import { g as P } from "./index-BHdH4CGi.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-C5eFcxcn.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,108 @@
|
|
|
1
|
+
import { j as X, f as A, s, a as q } from "./index-BHdH4CGi.mjs";
|
|
2
|
+
import { f as z, d as F } from "./EventList-C5eFcxcn.mjs";
|
|
3
|
+
import { useState as l, useEffect as J } from "react";
|
|
4
|
+
import { m as K } from "./mutateApi-D_cBrIKP.mjs";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
const v = async (h, g, D, w = "", t = "wellnessevent") => {
|
|
8
|
+
var f, d, o, n;
|
|
9
|
+
const a = await A.getContentSchemaList(
|
|
10
|
+
{
|
|
11
|
+
searchTerm: w,
|
|
12
|
+
filter: (t == null ? void 0 : t.toLocaleLowerCase()) === "events" ? "wellnessevent" : t == null ? void 0 : t.toLocaleLowerCase()
|
|
13
|
+
},
|
|
14
|
+
h || "en",
|
|
15
|
+
g
|
|
16
|
+
);
|
|
17
|
+
(d = (f = a == null ? void 0 : a.data) == null ? void 0 : f.publish_getContents) != null && d.records ? D((n = (o = a == null ? void 0 : a.data) == null ? void 0 : o.publish_getContents) == null ? void 0 : n.records) : s("Something went wrong !");
|
|
18
|
+
}, R = (h) => {
|
|
19
|
+
const {
|
|
20
|
+
secondaryArgs: g,
|
|
21
|
+
prelemAnalyticsProp: D,
|
|
22
|
+
prelemAuthoringHelper: w,
|
|
23
|
+
userId: t,
|
|
24
|
+
filters: a,
|
|
25
|
+
relativePath: f = "",
|
|
26
|
+
articleData: d
|
|
27
|
+
} = h || {}, {
|
|
28
|
+
prelemBaseEndpoint: { language: o, site_host: n }
|
|
29
|
+
} = g, [y, S] = l(!1), [_, k] = l({}), [b, I] = l({}), [G, T] = l(0), u = localStorage.getItem("userId") || t, [x, L] = l([]), [H, j] = l([]), C = async (P, c, p) => {
|
|
30
|
+
var i, m;
|
|
31
|
+
if (!u) {
|
|
32
|
+
s("User ID is not available. Please log in.");
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const r = {
|
|
37
|
+
input: { activity_type: p, target: P.toString(), action: c },
|
|
38
|
+
user_id: u
|
|
39
|
+
}, e = await K.setPersonalGoal(r, o, n);
|
|
40
|
+
((m = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_setPersonalGoal) == null ? void 0 : m.message) === "Created Successfully!!!" && c === "goal" ? q("Goal updated successfully!") : c !== "entry" && s("Something went wrong, please try after sometime !");
|
|
41
|
+
} catch (r) {
|
|
42
|
+
console.error("Error in update goal API:", r), s("Something went wrong, please try after sometime !");
|
|
43
|
+
}
|
|
44
|
+
}, E = async (P = "") => {
|
|
45
|
+
var c, p, i, m;
|
|
46
|
+
if (!u) {
|
|
47
|
+
s("User ID is not available. Please log in.");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
S(!0);
|
|
52
|
+
const r = {
|
|
53
|
+
date: P,
|
|
54
|
+
user_id: u
|
|
55
|
+
}, e = await A.fetchPersonalTracker(r, o, n);
|
|
56
|
+
if (((c = e == null ? void 0 : e.errors) == null ? void 0 : c.length) > 0)
|
|
57
|
+
s((p = e == null ? void 0 : e.errors[0]) == null ? void 0 : p.message);
|
|
58
|
+
else if ((i = e == null ? void 0 : e.data) != null && i.community_fetchPersonalTracker) {
|
|
59
|
+
const { water_intake: M, steps: B, streak_count: W } = (m = e == null ? void 0 : e.data) == null ? void 0 : m.community_fetchPersonalTracker;
|
|
60
|
+
k(M), I(B), T(W);
|
|
61
|
+
} else
|
|
62
|
+
console.error("GetPersonalData API failed"), s("GetPersonalData API failed");
|
|
63
|
+
} catch (r) {
|
|
64
|
+
console.error("Error in GetPersonalData API:", r), s("Error in GetPersonalData API"), k({}), I({});
|
|
65
|
+
} finally {
|
|
66
|
+
S(!1);
|
|
67
|
+
}
|
|
68
|
+
}, N = {
|
|
69
|
+
waterIntakeData: _,
|
|
70
|
+
loading: y,
|
|
71
|
+
fetchPersonalData: E,
|
|
72
|
+
updateGoals: C
|
|
73
|
+
}, U = {
|
|
74
|
+
stepsData: b,
|
|
75
|
+
loading: y,
|
|
76
|
+
updateGoals: C
|
|
77
|
+
};
|
|
78
|
+
return J(() => {
|
|
79
|
+
E(z(/* @__PURE__ */ new Date(), "yyyy-MM-dd")), v(o, n, L, "", "challenges"), v(o, n, j, "", "wellnessevent");
|
|
80
|
+
}, []), /* @__PURE__ */ X.jsxDEV(
|
|
81
|
+
F,
|
|
82
|
+
{
|
|
83
|
+
analytics: D,
|
|
84
|
+
authoringHelper: w,
|
|
85
|
+
secondaryArgs: g,
|
|
86
|
+
waterIntakeDetails: N,
|
|
87
|
+
stepsDetails: U,
|
|
88
|
+
streaksCount: G,
|
|
89
|
+
data: x,
|
|
90
|
+
eventData: H,
|
|
91
|
+
articleVodData: d,
|
|
92
|
+
filters: a,
|
|
93
|
+
relativePath: f
|
|
94
|
+
},
|
|
95
|
+
void 0,
|
|
96
|
+
!1,
|
|
97
|
+
{
|
|
98
|
+
fileName: "/Users/manikandan.kanna/Desktop/PlatformX/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/prelems/Components/EngagementHomeComponent.tsx",
|
|
99
|
+
lineNumber: 139,
|
|
100
|
+
columnNumber: 5
|
|
101
|
+
},
|
|
102
|
+
void 0
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
R as EngagementHomeComponent,
|
|
107
|
+
R as default
|
|
108
|
+
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as
|
|
3
|
-
import { useState as a, useEffect as
|
|
4
|
-
import {
|
|
5
|
-
import { m as z } from "./mutateApi-D1KlLkuZ.mjs";
|
|
1
|
+
import { j as U, f as V, s as d, a as I } from "./index-BHdH4CGi.mjs";
|
|
2
|
+
import { E as B } from "./EventList-C5eFcxcn.mjs";
|
|
3
|
+
import { useState as a, useEffect as M } from "react";
|
|
4
|
+
import { m as X } from "./mutateApi-D_cBrIKP.mjs";
|
|
6
5
|
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: v,
|
|
11
|
+
prelemAnalyticsProp: P,
|
|
12
|
+
prelemAuthoringHelper: S,
|
|
13
|
+
userId: A,
|
|
14
|
+
filters: p,
|
|
15
|
+
relativePath: w = ""
|
|
16
16
|
} = h || {}, {
|
|
17
|
-
prelemBaseEndpoint: { language:
|
|
18
|
-
} =
|
|
19
|
-
joinEvent: async (
|
|
17
|
+
prelemBaseEndpoint: { language: g, site_host: E }
|
|
18
|
+
} = v, [j, m] = a(!1), [x, _] = a(!1), [b, k] = a(0), u = localStorage.getItem("userId") || A, [D, T] = a(""), [C, L] = a(!1), N = {
|
|
19
|
+
joinEvent: async (f) => {
|
|
20
20
|
var r, s, i, o, l, c;
|
|
21
|
-
if (!
|
|
21
|
+
if (!u) {
|
|
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
|
+
...f,
|
|
30
|
+
userId: u
|
|
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 X.joinEvent(n, g, E);
|
|
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), _(!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: j,
|
|
41
|
+
isRegistered: x,
|
|
42
|
+
registeredParticipants: b,
|
|
43
|
+
meetingLink: D,
|
|
44
|
+
isStarted: C
|
|
45
45
|
}, y = async () => {
|
|
46
|
-
var
|
|
46
|
+
var f, r, s, i, o, l, c;
|
|
47
47
|
try {
|
|
48
48
|
m(!0);
|
|
49
|
-
const n = (
|
|
49
|
+
const n = (f = t == null ? void 0 : t.event_type) != null && f.includes("Virtual") ? {
|
|
50
50
|
event_id: t == null ? void 0 : t.page,
|
|
51
|
-
user_id:
|
|
51
|
+
user_id: u,
|
|
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: u
|
|
60
|
+
}, e = await V.getEventDetails(n, g, E);
|
|
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: G,
|
|
66
|
+
is_joined: H,
|
|
67
|
+
meeting_link: J = "",
|
|
68
|
+
is_started: O = !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), _(H), k(G), T(J), L(O);
|
|
71
71
|
} else
|
|
72
72
|
console.error("GetEventDetails API failed");
|
|
73
73
|
} catch (n) {
|
|
@@ -76,19 +76,27 @@ const Z = (h) => {
|
|
|
76
76
|
m(!1);
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
return
|
|
79
|
+
return M(() => {
|
|
80
80
|
t != null && t.page && y();
|
|
81
|
-
}, [t]), /* @__PURE__ */ U(
|
|
82
|
-
|
|
81
|
+
}, [t]), /* @__PURE__ */ U.jsxDEV(
|
|
82
|
+
B,
|
|
83
83
|
{
|
|
84
84
|
content: t,
|
|
85
|
-
analytics:
|
|
86
|
-
authoringHelper:
|
|
87
|
-
secondaryArgs:
|
|
88
|
-
eventDetails:
|
|
89
|
-
filters:
|
|
90
|
-
relativePath:
|
|
91
|
-
}
|
|
85
|
+
analytics: P,
|
|
86
|
+
authoringHelper: S,
|
|
87
|
+
secondaryArgs: v,
|
|
88
|
+
eventDetails: N,
|
|
89
|
+
filters: p,
|
|
90
|
+
relativePath: w
|
|
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
|
|
92
100
|
);
|
|
93
101
|
};
|
|
94
102
|
export {
|