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