@platform-x/hcltechx-mfe-wrapper 1.0.0 → 1.0.1
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-labwXONw.mjs +39 -0
- package/ChallengeDetailComponent-B0mhcUHW.mjs +118 -0
- package/CommonContentComponent-XIY0Eqyp.mjs +86 -0
- package/{DailyMotion-Pq0OS_nv.mjs → DailyMotion-Bh6b_1ls.mjs} +2 -2
- package/EngagementHomeComponent-DUWRp7Rk.mjs +99 -0
- package/EventDetailComponent-DZHIR5sb.mjs +103 -0
- package/EventList-CrFIwonY.mjs +32151 -0
- package/{EventListComponent-SpgarpPb.mjs → EventListComponent-D8VOmErB.mjs} +42 -34
- package/{Facebook-DVoDyq2n.mjs → Facebook-r_ieGEWi.mjs} +2 -2
- package/{FilePlayer-TBmUK03G.mjs → FilePlayer-DPtnkI4h.mjs} +2 -2
- package/{Kaltura-CLaSL9Gw.mjs → Kaltura-Clw99-2t.mjs} +2 -2
- package/{Mixcloud-BIUEG_vf.mjs → Mixcloud-BQqSy7W9.mjs} +2 -2
- package/{Mux-D2H0Zcnl.mjs → Mux-C9Horywf.mjs} +2 -2
- package/{Preview-CqNeXEJq.mjs → Preview-BJ-Gf50H.mjs} +1 -1
- package/RecentCarousel-DXczqGTg.mjs +345 -0
- package/Share-841HxAfy.mjs +2603 -0
- package/{SoundCloud-CL3-ElQD.mjs → SoundCloud-UekA8rWW.mjs} +2 -2
- package/{Streamable-B6PCkCf3.mjs → Streamable-DlIJ8RtX.mjs} +2 -2
- package/{Twitch-T-goXjKL.mjs → Twitch-CvJR_NQ9.mjs} +2 -2
- package/{Vidyard-D8-XmjAR.mjs → Vidyard-Lj1xUYwG.mjs} +2 -2
- package/{Vimeo-jej0FY4O.mjs → Vimeo-CwmHUqrS.mjs} +2 -2
- package/{Wistia-CPzm8ZXT.mjs → Wistia-DdGRHB57.mjs} +2 -2
- package/{YouTube-VNohNZKu.mjs → YouTube-gou2t6Mz.mjs} +2 -2
- package/index-BgFUpOs6.mjs +21 -0
- package/{index-Dluh6sv-.mjs → index-DmoNrWks.mjs} +2359 -1510
- package/index.mjs +2 -2
- package/lib/login.d.ts +0 -0
- package/lib/prelems/Components/ArticleVodListComponent.d.ts +10 -0
- package/lib/services/fetchApi.d.ts +4 -3
- package/lib/services/fetchQueries.d.ts +3 -2
- package/lib/ssoLogin.d.ts +9 -0
- package/lib/utils/componentMapping.d.ts +5 -4
- package/{mutateApi-DOEWbC_3.mjs → mutateApi-Cl3UXuv1.mjs} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/BrightcovePlayer-B2Rrij5a.mjs +0 -177
- package/ChallengeDetailComponent-QSflL_pe.mjs +0 -89
- package/CommonContentComponent-D8PuLEle.mjs +0 -78
- package/EngagementHomeComponent-CO2rSsxl.mjs +0 -91
- package/EventDetailComponent-DMKfvnfx.mjs +0 -84
- package/EventList-BM7sWeX5.mjs +0 -22503
- package/RecentCarousel-DsRr-cur.mjs +0 -243
- package/Share-BTinEfR4.mjs +0 -2243
- package/index-BTIxC-e5.mjs +0 -20
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { j as n } from "./index-DmoNrWks.mjs";
|
|
2
|
+
import { b as p } from "./EventList-CrFIwonY.mjs";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import "@mui/material";
|
|
6
|
+
import "@mui/system";
|
|
7
|
+
import "react/jsx-runtime";
|
|
8
|
+
import "@mui/styles";
|
|
9
|
+
const h = ({
|
|
10
|
+
data: o,
|
|
11
|
+
prelemAnalyticsProp: r,
|
|
12
|
+
prelemAuthoringHelper: t,
|
|
13
|
+
secondaryArgs: e,
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
+
userId: s,
|
|
16
|
+
filters: i,
|
|
17
|
+
relativePath: m
|
|
18
|
+
}) => /* @__PURE__ */ n.jsxDEV(
|
|
19
|
+
p,
|
|
20
|
+
{
|
|
21
|
+
content: o,
|
|
22
|
+
analytics: r,
|
|
23
|
+
authoringHelper: t,
|
|
24
|
+
secondaryArgs: e,
|
|
25
|
+
filters: i,
|
|
26
|
+
relativePath: m
|
|
27
|
+
},
|
|
28
|
+
void 0,
|
|
29
|
+
!1,
|
|
30
|
+
{
|
|
31
|
+
fileName: "/home/sohail_quazi/actions-runner/_work/platformx-mono-repo-nx/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/prelems/Components/ArticleVodListComponent.tsx",
|
|
32
|
+
lineNumber: 14,
|
|
33
|
+
columnNumber: 5
|
|
34
|
+
},
|
|
35
|
+
void 0
|
|
36
|
+
);
|
|
37
|
+
export {
|
|
38
|
+
h as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { j as N, s as g, f as I, a as U } from "./index-DmoNrWks.mjs";
|
|
2
|
+
import { C as H } from "./EventList-CrFIwonY.mjs";
|
|
3
|
+
import { useState as u, useEffect as J } from "react";
|
|
4
|
+
import { m as k } from "./mutateApi-Cl3UXuv1.mjs";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "@mui/material";
|
|
7
|
+
import "@mui/system";
|
|
8
|
+
import "react/jsx-runtime";
|
|
9
|
+
import "@mui/styles";
|
|
10
|
+
const X = (p) => {
|
|
11
|
+
const {
|
|
12
|
+
pageData: t = {},
|
|
13
|
+
secondaryArgs: y,
|
|
14
|
+
prelemAnalyticsProp: A,
|
|
15
|
+
prelemAuthoringHelper: E,
|
|
16
|
+
userId: _
|
|
17
|
+
} = p || {}, {
|
|
18
|
+
prelemBaseEndpoint: { language: d, site_host: f }
|
|
19
|
+
} = y, [P, m] = u(!1), [x, L] = u(!1), [B, D] = u(0), [j, v] = u(0), [w, S] = u([]), h = localStorage.getItem("userId") || _, b = async (a) => {
|
|
20
|
+
var s, l, i, n, e, r;
|
|
21
|
+
if (!h) {
|
|
22
|
+
g("User ID is not available. Please log in.");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
m(!0);
|
|
27
|
+
const c = {
|
|
28
|
+
input: {
|
|
29
|
+
...a,
|
|
30
|
+
userId: h
|
|
31
|
+
}
|
|
32
|
+
}, o = await k.joinChallenge(c, d, f);
|
|
33
|
+
((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) : (n = (i = o == null ? void 0 : o.data) == null ? void 0 : i.community_joinChallenge) != null && n.id ? (U((r = (e = o == null ? void 0 : o.data) == null ? void 0 : e.community_joinChallenge) == null ? void 0 : r.message), L(!0), C()) : console.error("Join Challenge API failed");
|
|
34
|
+
} catch (c) {
|
|
35
|
+
console.error("Error in Join Challenge API:", c);
|
|
36
|
+
} finally {
|
|
37
|
+
m(!1);
|
|
38
|
+
}
|
|
39
|
+
}, C = async () => {
|
|
40
|
+
var a, s, l, i;
|
|
41
|
+
if (!h) {
|
|
42
|
+
g("User ID is not available. Please log in.");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
m(!0);
|
|
47
|
+
const n = {
|
|
48
|
+
challenge_id: t == null ? void 0 : t.page,
|
|
49
|
+
user_id: _
|
|
50
|
+
}, e = await I.getChallengeDetails(n, d, f);
|
|
51
|
+
if (((a = e == null ? void 0 : e.errors) == null ? void 0 : a.length) > 0)
|
|
52
|
+
g((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message);
|
|
53
|
+
else if ((l = e == null ? void 0 : e.data) != null && l.community_challengesDetail) {
|
|
54
|
+
const {
|
|
55
|
+
total_participant: r,
|
|
56
|
+
is_joined: c,
|
|
57
|
+
user_steps: o = 0
|
|
58
|
+
} = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_challengesDetail;
|
|
59
|
+
L(c), D(r), v(o);
|
|
60
|
+
} else
|
|
61
|
+
console.error("GetEventDetails API failed");
|
|
62
|
+
} catch (n) {
|
|
63
|
+
console.error("Error in GetEventDetails API:", n);
|
|
64
|
+
} finally {
|
|
65
|
+
m(!1);
|
|
66
|
+
}
|
|
67
|
+
}, T = async () => {
|
|
68
|
+
var a, s, l, i, n;
|
|
69
|
+
try {
|
|
70
|
+
m(!0);
|
|
71
|
+
const e = {
|
|
72
|
+
challenge_id: t == null ? void 0 : t.page,
|
|
73
|
+
user_id: localStorage.getItem("userId")
|
|
74
|
+
}, r = await I.getLeaderBoardList(e, d, f);
|
|
75
|
+
if (((a = r == null ? void 0 : r.errors) == null ? void 0 : a.length) > 0)
|
|
76
|
+
g((s = r == null ? void 0 : r.errors[0]) == null ? void 0 : s.message);
|
|
77
|
+
else if ((i = (l = r == null ? void 0 : r.data) == null ? void 0 : l.community_getLeaderBoardList) != null && i.records) {
|
|
78
|
+
const { records: c } = (n = r == null ? void 0 : r.data) == null ? void 0 : n.community_getLeaderBoardList;
|
|
79
|
+
S(c);
|
|
80
|
+
} else
|
|
81
|
+
console.error("GetLeaderBoardList API failed");
|
|
82
|
+
} catch (e) {
|
|
83
|
+
console.error("Error in GetLeaderBoardList API:", e);
|
|
84
|
+
} finally {
|
|
85
|
+
m(!1);
|
|
86
|
+
}
|
|
87
|
+
}, G = {
|
|
88
|
+
joinChallenge: b,
|
|
89
|
+
loading: P,
|
|
90
|
+
isEnrolled: x,
|
|
91
|
+
enrolledParticipants: B,
|
|
92
|
+
userAchieved: j,
|
|
93
|
+
leaderBoardList: w
|
|
94
|
+
};
|
|
95
|
+
return J(() => {
|
|
96
|
+
t != null && t.page && (C(), T());
|
|
97
|
+
}, [t]), /* @__PURE__ */ N.jsxDEV(
|
|
98
|
+
H,
|
|
99
|
+
{
|
|
100
|
+
content: t,
|
|
101
|
+
analytics: A,
|
|
102
|
+
authoringHelper: E,
|
|
103
|
+
secondaryArgs: y,
|
|
104
|
+
challengeDetails: G
|
|
105
|
+
},
|
|
106
|
+
void 0,
|
|
107
|
+
!1,
|
|
108
|
+
{
|
|
109
|
+
fileName: "/home/sohail_quazi/actions-runner/_work/platformx-mono-repo-nx/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/contentTypes/Components/ChallengeDetailComponent.tsx",
|
|
110
|
+
lineNumber: 131,
|
|
111
|
+
columnNumber: 5
|
|
112
|
+
},
|
|
113
|
+
void 0
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
X as default
|
|
118
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { F as I, j as k, f as N, s as b } from "./index-DmoNrWks.mjs";
|
|
2
|
+
import j, { memo as L, useState as w, useEffect as z } from "react";
|
|
3
|
+
import { m as O } from "./mutateApi-Cl3UXuv1.mjs";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import "@mui/material";
|
|
6
|
+
import "@mui/system";
|
|
7
|
+
import "react/jsx-runtime";
|
|
8
|
+
const x = {
|
|
9
|
+
Article: "Article",
|
|
10
|
+
Quiz: "Quiz",
|
|
11
|
+
Poll: "Poll",
|
|
12
|
+
Event: "Event",
|
|
13
|
+
Vod: "Vod"
|
|
14
|
+
}, c = {};
|
|
15
|
+
Object.keys(x).forEach((l) => (c[l] = j.lazy(
|
|
16
|
+
() => import("./index-BgFUpOs6.mjs").then((o) => ({
|
|
17
|
+
default: o[x[l]]
|
|
18
|
+
}))
|
|
19
|
+
), c));
|
|
20
|
+
const J = (l) => {
|
|
21
|
+
var a, y, h, C, _, S;
|
|
22
|
+
const { pageData: o = {}, secondaryArgs: m = {} } = l || {}, E = c[(o == null ? void 0 : o.content_type) || (o == null ? void 0 : o.tag_name)] || I, g = {
|
|
23
|
+
pageId: o == null ? void 0 : o.page,
|
|
24
|
+
pageTitle: o == null ? void 0 : o.title,
|
|
25
|
+
pageDesc: o == null ? void 0 : o.description,
|
|
26
|
+
pageTags: (y = (a = o == null ? void 0 : o.settings) == null ? void 0 : a.keywords) == null ? void 0 : y.join(", "),
|
|
27
|
+
isAuthoring: !1,
|
|
28
|
+
isSeoEnabled: (h = o == null ? void 0 : o.settings) == null ? void 0 : h.seo_blockIndexing,
|
|
29
|
+
isAnalyticsEnabled: o == null ? void 0 : o.analytics_enable
|
|
30
|
+
}, v = {
|
|
31
|
+
isModalShow: !0
|
|
32
|
+
}, [p, n] = w(!1), [A, T] = w([]), {
|
|
33
|
+
prelemBaseEndpoint: { site_host: u, language: d }
|
|
34
|
+
} = m, f = async () => {
|
|
35
|
+
var t, s;
|
|
36
|
+
try {
|
|
37
|
+
p || n(!0);
|
|
38
|
+
const e = await N.fetchPoll({ title: o.document_path }, d, u);
|
|
39
|
+
T((s = (t = e.data) == null ? void 0 : t.users_fetchContent) == null ? void 0 : s.options), n(!1);
|
|
40
|
+
} catch (e) {
|
|
41
|
+
n(!1), b(`${e}`);
|
|
42
|
+
}
|
|
43
|
+
}, P = async (t) => {
|
|
44
|
+
var s;
|
|
45
|
+
try {
|
|
46
|
+
n(!0);
|
|
47
|
+
const e = {
|
|
48
|
+
input: {
|
|
49
|
+
pollInfo: { ...t, start_date: "" }
|
|
50
|
+
}
|
|
51
|
+
}, i = await O.savePoll(e, d, u);
|
|
52
|
+
if (n(!1), (s = i == null ? void 0 : i.data) != null && s.users_saveContent) {
|
|
53
|
+
const r = JSON.parse(localStorage.getItem("TakenPoles") || "[]");
|
|
54
|
+
r != null && r.includes(o.page) || localStorage.setItem("TakenPoles", JSON.stringify([...r, o.page])), f();
|
|
55
|
+
}
|
|
56
|
+
} catch (e) {
|
|
57
|
+
n(!1), b(`${e}`);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return z(() => {
|
|
61
|
+
const t = JSON.parse(localStorage.getItem("TakenPoles") || "[]");
|
|
62
|
+
t != null && t.includes(o == null ? void 0 : o.page) && f();
|
|
63
|
+
}, []), /* @__PURE__ */ k.jsxDEV(
|
|
64
|
+
E,
|
|
65
|
+
{
|
|
66
|
+
content: o,
|
|
67
|
+
analytics: g,
|
|
68
|
+
authoringHelper: v,
|
|
69
|
+
secondaryArgs: m,
|
|
70
|
+
results: ((C = o == null ? void 0 : o.content_type) == null ? void 0 : C.toLowerCase()) === "poll" ? A : void 0,
|
|
71
|
+
onSubmit: ((_ = o == null ? void 0 : o.content_type) == null ? void 0 : _.toLowerCase()) === "poll" ? (t) => P(t) : void 0,
|
|
72
|
+
showLoading: ((S = o == null ? void 0 : o.content_type) == null ? void 0 : S.toLowerCase()) === "poll" ? p : void 0
|
|
73
|
+
},
|
|
74
|
+
void 0,
|
|
75
|
+
!1,
|
|
76
|
+
{
|
|
77
|
+
fileName: "/home/sohail_quazi/actions-runner/_work/platformx-mono-repo-nx/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 = L(J);
|
|
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-DmoNrWks.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-CrFIwonY.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,99 @@
|
|
|
1
|
+
import { j, f as k, s as a, a as N } from "./index-DmoNrWks.mjs";
|
|
2
|
+
import { f as M, c as U } from "./EventList-CrFIwonY.mjs";
|
|
3
|
+
import { useState as g, useEffect as q } from "react";
|
|
4
|
+
import { m as z } from "./mutateApi-Cl3UXuv1.mjs";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "@mui/material";
|
|
7
|
+
import "@mui/system";
|
|
8
|
+
import "react/jsx-runtime";
|
|
9
|
+
import "@mui/styles";
|
|
10
|
+
const B = async (h, p, w, y = "", o = "wellnessevent") => {
|
|
11
|
+
var r, c, i, u;
|
|
12
|
+
const t = await k.getContentSchemaList(
|
|
13
|
+
{
|
|
14
|
+
searchTerm: y,
|
|
15
|
+
filter: (o == null ? void 0 : o.toLocaleLowerCase()) === "events" ? "wellnessevent" : o == null ? void 0 : o.toLocaleLowerCase()
|
|
16
|
+
},
|
|
17
|
+
h || "en",
|
|
18
|
+
p
|
|
19
|
+
);
|
|
20
|
+
(c = (r = t == null ? void 0 : t.data) == null ? void 0 : r.publish_getContents) != null && c.records ? w((u = (i = t == null ? void 0 : t.data) == null ? void 0 : i.publish_getContents) == null ? void 0 : u.records) : a("Something went wrong !");
|
|
21
|
+
}, $ = (h) => {
|
|
22
|
+
const { secondaryArgs: p, prelemAnalyticsProp: w, prelemAuthoringHelper: y, userId: o } = h || {}, {
|
|
23
|
+
prelemBaseEndpoint: { language: t, site_host: r }
|
|
24
|
+
} = p, [c, i] = g(!1), [u, D] = g({}), [E, S] = g({}), [_, A] = g(0), f = localStorage.getItem("userId") || o, [x, b] = g([]), I = async (P, n, d) => {
|
|
25
|
+
var l, m;
|
|
26
|
+
if (!f) {
|
|
27
|
+
a("User ID is not available. Please log in.");
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
const s = {
|
|
32
|
+
input: { activity_type: d, target: P.toString(), action: n },
|
|
33
|
+
user_id: f
|
|
34
|
+
}, e = await z.setPersonalGoal(s, t, r);
|
|
35
|
+
((m = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_setPersonalGoal) == null ? void 0 : m.message) === "Created Successfully!!!" && n === "goal" ? N("Goal updated successfully!") : n !== "entry" && a("Something went wrong, please try after sometime !");
|
|
36
|
+
} catch (s) {
|
|
37
|
+
console.error("Error in update goal API:", s), a("Something went wrong, please try after sometime !");
|
|
38
|
+
}
|
|
39
|
+
}, C = async (P = "") => {
|
|
40
|
+
var n, d, l, m;
|
|
41
|
+
if (!f) {
|
|
42
|
+
a("User ID is not available. Please log in.");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
i(!0);
|
|
47
|
+
const s = {
|
|
48
|
+
date: P,
|
|
49
|
+
user_id: f
|
|
50
|
+
}, e = await k.fetchPersonalTracker(s, t, r);
|
|
51
|
+
if (((n = e == null ? void 0 : e.errors) == null ? void 0 : n.length) > 0)
|
|
52
|
+
a((d = e == null ? void 0 : e.errors[0]) == null ? void 0 : d.message);
|
|
53
|
+
else if ((l = e == null ? void 0 : e.data) != null && l.community_fetchPersonalTracker) {
|
|
54
|
+
const { water_intake: v, steps: L, streak_count: H } = (m = e == null ? void 0 : e.data) == null ? void 0 : m.community_fetchPersonalTracker;
|
|
55
|
+
D(v), S(L), A(H);
|
|
56
|
+
} else
|
|
57
|
+
console.error("GetPersonalData API failed"), a("GetPersonalData API failed");
|
|
58
|
+
} catch (s) {
|
|
59
|
+
console.error("Error in GetPersonalData API:", s), a("Error in GetPersonalData API"), D({}), S({});
|
|
60
|
+
} finally {
|
|
61
|
+
i(!1);
|
|
62
|
+
}
|
|
63
|
+
}, G = {
|
|
64
|
+
waterIntakeData: u,
|
|
65
|
+
loading: c,
|
|
66
|
+
fetchPersonalData: C,
|
|
67
|
+
updateGoals: I
|
|
68
|
+
}, T = {
|
|
69
|
+
stepsData: E,
|
|
70
|
+
loading: c,
|
|
71
|
+
updateGoals: I
|
|
72
|
+
};
|
|
73
|
+
return q(() => {
|
|
74
|
+
C(M(/* @__PURE__ */ new Date(), "yyyy-MM-dd")), B(t, r, b, "", "challenges");
|
|
75
|
+
}, []), /* @__PURE__ */ j.jsxDEV(
|
|
76
|
+
U,
|
|
77
|
+
{
|
|
78
|
+
analytics: w,
|
|
79
|
+
authoringHelper: y,
|
|
80
|
+
secondaryArgs: p,
|
|
81
|
+
waterIntakeDetails: G,
|
|
82
|
+
stepsDetails: T,
|
|
83
|
+
streaksCount: _,
|
|
84
|
+
data: x
|
|
85
|
+
},
|
|
86
|
+
void 0,
|
|
87
|
+
!1,
|
|
88
|
+
{
|
|
89
|
+
fileName: "/home/sohail_quazi/actions-runner/_work/platformx-mono-repo-nx/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/prelems/Components/EngagementHomeComponent.tsx",
|
|
90
|
+
lineNumber: 129,
|
|
91
|
+
columnNumber: 5
|
|
92
|
+
},
|
|
93
|
+
void 0
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
$ as EngagementHomeComponent,
|
|
98
|
+
$ as default
|
|
99
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { j as J, f as O, s as d, a as I } from "./index-DmoNrWks.mjs";
|
|
2
|
+
import { E as V } from "./EventList-CrFIwonY.mjs";
|
|
3
|
+
import { useState as m, useEffect as q } from "react";
|
|
4
|
+
import { m as z } from "./mutateApi-Cl3UXuv1.mjs";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "@mui/material";
|
|
7
|
+
import "@mui/system";
|
|
8
|
+
import "react/jsx-runtime";
|
|
9
|
+
import "@mui/styles";
|
|
10
|
+
const $ = (h) => {
|
|
11
|
+
const {
|
|
12
|
+
pageData: t = {},
|
|
13
|
+
secondaryArgs: v,
|
|
14
|
+
prelemAnalyticsProp: p,
|
|
15
|
+
prelemAuthoringHelper: S,
|
|
16
|
+
userId: A
|
|
17
|
+
} = h || {}, {
|
|
18
|
+
prelemBaseEndpoint: { language: _, site_host: g }
|
|
19
|
+
} = v, [w, a] = m(!1), [x, E] = m(!1), [P, j] = m(0), u = localStorage.getItem("userId") || A, [b, D] = m(""), [T, k] = m(!1), C = {
|
|
20
|
+
joinEvent: async (f) => {
|
|
21
|
+
var r, o, i, s, l, c;
|
|
22
|
+
if (!u) {
|
|
23
|
+
d("User ID is not available. Please log in.");
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
a(!0);
|
|
28
|
+
const n = {
|
|
29
|
+
input: {
|
|
30
|
+
...f,
|
|
31
|
+
userId: u
|
|
32
|
+
}
|
|
33
|
+
}, e = await z.joinEvent(n, _, g);
|
|
34
|
+
((r = e == null ? void 0 : e.errors) == null ? void 0 : r.length) > 0 ? d((o = e == null ? void 0 : e.errors[0]) == null ? void 0 : o.message) : (s = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_userRegistration) != null && s.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");
|
|
35
|
+
} catch (n) {
|
|
36
|
+
console.error("Error in Join Event API:", n);
|
|
37
|
+
} finally {
|
|
38
|
+
a(!1);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
loading: w,
|
|
42
|
+
isRegistered: x,
|
|
43
|
+
registeredParticipants: P,
|
|
44
|
+
meetingLink: b,
|
|
45
|
+
isStarted: T
|
|
46
|
+
}, y = async () => {
|
|
47
|
+
var f, r, o, i, s, l, c;
|
|
48
|
+
try {
|
|
49
|
+
a(!0);
|
|
50
|
+
const n = (f = t == null ? void 0 : t.event_type) != null && f.includes("Virtual") ? {
|
|
51
|
+
event_id: t == null ? void 0 : t.page,
|
|
52
|
+
user_id: u,
|
|
53
|
+
type: "webinar",
|
|
54
|
+
start_date: new Date(t == null ? void 0 : t.start_date_time).toISOString(),
|
|
55
|
+
end_date: new Date(t == null ? void 0 : t.end_date_time).toISOString()
|
|
56
|
+
// start_date: pageData?.start_date_time, //format(new Date(pageData?.start_date_time), "YYY-MM-dd"),
|
|
57
|
+
// end_date: pageData?.end_date_time, //format(new Date(pageData?.end_date_time), "YYY-MM-dd"),
|
|
58
|
+
} : {
|
|
59
|
+
event_id: t == null ? void 0 : t.page,
|
|
60
|
+
user_id: u
|
|
61
|
+
}, e = await O.getEventDetails(n, _, g);
|
|
62
|
+
if (((r = e == null ? void 0 : e.errors) == null ? void 0 : r.length) > 0)
|
|
63
|
+
d((o = e == null ? void 0 : e.errors[0]) == null ? void 0 : o.message);
|
|
64
|
+
else if ((i = e == null ? void 0 : e.data) != null && i.community_eventDetails) {
|
|
65
|
+
const {
|
|
66
|
+
total_participant: L,
|
|
67
|
+
is_joined: N,
|
|
68
|
+
meeting_link: G = "",
|
|
69
|
+
is_started: H = !1
|
|
70
|
+
} = (s = e == null ? void 0 : e.data) == null ? void 0 : s.community_eventDetails;
|
|
71
|
+
I((c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_eventDetails) == null ? void 0 : c.message), E(N), j(L), D(G), k(H);
|
|
72
|
+
} else
|
|
73
|
+
console.error("GetEventDetails API failed");
|
|
74
|
+
} catch (n) {
|
|
75
|
+
console.error("Error in GetEventDetails API:", n);
|
|
76
|
+
} finally {
|
|
77
|
+
a(!1);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
return q(() => {
|
|
81
|
+
t != null && t.page && y();
|
|
82
|
+
}, [t]), /* @__PURE__ */ J.jsxDEV(
|
|
83
|
+
V,
|
|
84
|
+
{
|
|
85
|
+
content: t,
|
|
86
|
+
analytics: p,
|
|
87
|
+
authoringHelper: S,
|
|
88
|
+
secondaryArgs: v,
|
|
89
|
+
eventDetails: C
|
|
90
|
+
},
|
|
91
|
+
void 0,
|
|
92
|
+
!1,
|
|
93
|
+
{
|
|
94
|
+
fileName: "/home/sohail_quazi/actions-runner/_work/platformx-mono-repo-nx/platformx-mono-repo-nx/libs/hc-wrapper/src/lib/contentTypes/Components/EventDetailComponent.tsx",
|
|
95
|
+
lineNumber: 116,
|
|
96
|
+
columnNumber: 5
|
|
97
|
+
},
|
|
98
|
+
void 0
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
export {
|
|
102
|
+
$ as default
|
|
103
|
+
};
|