@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
package/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a7 as t, a8 as m } from "./index-BW7MAuY_.mjs";
|
|
2
|
+
import "react/jsx-runtime";
|
|
2
3
|
import "react";
|
|
3
4
|
import "react-dom";
|
|
4
|
-
import "react/jsx-runtime";
|
|
5
5
|
export {
|
|
6
6
|
t as ContentTypeWrapper,
|
|
7
7
|
m as PrelemsWrapper
|
package/package.json
CHANGED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./index-CKbXg2l_.mjs";
|
|
2
|
-
import { b as m } from "./EventList-CbAUuRYM.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
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { j as U, s as g, f as _, a as k } from "./index-CKbXg2l_.mjs";
|
|
2
|
-
import { C as N } from "./EventList-CbAUuRYM.mjs";
|
|
3
|
-
import { useState as d, useEffect as H } from "react";
|
|
4
|
-
import { m as J } from "./mutateApi-D6lDkc9e.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
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { j as B, f as A, s as a, a as U } from "./index-CKbXg2l_.mjs";
|
|
2
|
-
import { f as X, c as q } from "./EventList-CbAUuRYM.mjs";
|
|
3
|
-
import { useState as d, useEffect as z } from "react";
|
|
4
|
-
import { m as F } from "./mutateApi-D6lDkc9e.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
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { F as N, j, f as L, s as b } from "./index-CKbXg2l_.mjs";
|
|
2
|
-
import O, { memo as z, useState as v, useEffect as J } from "react";
|
|
3
|
-
import { m as V } from "./mutateApi-D6lDkc9e.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-kJrH8shi.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,108 +0,0 @@
|
|
|
1
|
-
import { j as X, f as A, s, a as q } from "./index-CKbXg2l_.mjs";
|
|
2
|
-
import { f as z, d as F } from "./EventList-CbAUuRYM.mjs";
|
|
3
|
-
import { useState as l, useEffect as J } from "react";
|
|
4
|
-
import { m as K } from "./mutateApi-D6lDkc9e.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
|
-
};
|