@platform-x/hcltechx-mfe-wrapper 2.0.8 → 2.0.11
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-BQ4-5d3R.mjs → ArticleVodListComponent-DDlpAvkj.mjs} +2 -2
- package/ChallengeDetailComponent-Cp5WgZyn.mjs +143 -0
- package/{ChallengeSliderComponent-DRzdfWL_.mjs → ChallengeSliderComponent-sHMLVTzY.mjs} +3 -3
- package/{CommonContentComponent-qzrpY_Vl.mjs → CommonContentComponent-B3AlVAyo.mjs} +3 -3
- package/{DailyMotion-BDmqmiKF.mjs → DailyMotion-Ctf9dZNz.mjs} +2 -2
- package/{EngagementHomeComponent-Hf5EMhJ1.mjs → EngagementHomeComponent-BzULVQ1b.mjs} +3 -3
- package/{EventDetailComponent-BfT5aKKB.mjs → EventDetailComponent-BFrpAcbd.mjs} +3 -3
- package/EventListComponent-DA8m-zwp.mjs +84 -0
- package/{ExperienceZone-COEKoTj9.mjs → ExperienceZone-CCpk3wfA.mjs} +1 -1
- package/{ExperienceZoneComponent-BrZl4X18.mjs → ExperienceZoneComponent-seQ8N-61.mjs} +3 -3
- package/{Facebook-DRF8IVWw.mjs → Facebook-E9V-xmdL.mjs} +2 -2
- package/{FilePlayer-DedKJqpZ.mjs → FilePlayer-D873kxxw.mjs} +2 -2
- package/{IndividualChallengeComponent-CzqfmdCA.mjs → IndividualChallengeComponent-DgecMDj1.mjs} +3 -3
- package/{Kaltura-CUa0xc8s.mjs → Kaltura-DzDUIYV-.mjs} +2 -2
- package/{Mixcloud-BO4WgOhx.mjs → Mixcloud-eK72UFK5.mjs} +2 -2
- package/{Mux-Be-6AdI1.mjs → Mux-B1dJXqDK.mjs} +2 -2
- package/{PageComponent-rK6ftzt8.mjs → PageComponent-CBbQ6FHA.mjs} +2 -2
- package/{Preview-BJZBw-YS.mjs → Preview-BICB0ygt.mjs} +1 -1
- package/{RecentCarousel-w1peJJAT.mjs → RecentCarousel-DOGZKmRG.mjs} +2 -2
- package/{Share-DqJha0Vc.mjs → Share-LWrVflIo.mjs} +2 -2
- package/{SoundCloud-mDC2s7Xj.mjs → SoundCloud-BU2sORCw.mjs} +2 -2
- package/{Streamable-DVPU_HtM.mjs → Streamable-BJP2lWrh.mjs} +2 -2
- package/{ToggleButton-DvmoKbv2.mjs → ToggleButton-5x8XNrp0.mjs} +45723 -45575
- package/{Twitch-Buvx8KeC.mjs → Twitch-CxK8NZDy.mjs} +2 -2
- package/{Vidyard-Bx7R1SQT.mjs → Vidyard-DPLjttlh.mjs} +2 -2
- package/{Vimeo-CxQ3mkDw.mjs → Vimeo-BSPddzKy.mjs} +2 -2
- package/{Wistia-Cu6BKPvJ.mjs → Wistia-Dm7XoZWT.mjs} +2 -2
- package/{YouTube--yt0ZoOn.mjs → YouTube-BdUQm9tW.mjs} +2 -2
- package/{index-Bp0KqIgF.mjs → index-CXn1_dw9.mjs} +14 -14
- package/{index-Cx8EFUCS.mjs → index-Ctb_unxf.mjs} +3 -3
- package/index.mjs +1 -1
- package/lib/services/fetchQueries.d.ts +1 -1
- package/{mutateApi-C-HI_T5u.mjs → mutateApi-Cy-kWAqz.mjs} +1 -1
- package/package.json +1 -1
- package/ChallengeDetailComponent-Cvbs4ESm.mjs +0 -141
- package/EventListComponent-Bv7_IUOu.mjs +0 -83
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as w } from "./index-
|
|
1
|
+
import { n as w } from "./index-CXn1_dw9.mjs";
|
|
2
2
|
import D from "react";
|
|
3
|
-
import { z as C, F as N } from "./ToggleButton-
|
|
3
|
+
import { z as C, F as N } from "./ToggleButton-5x8XNrp0.mjs";
|
|
4
4
|
function I(t, e) {
|
|
5
5
|
for (var r = 0; r < e.length; r++) {
|
|
6
6
|
const s = e[r];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as g } from "./index-
|
|
1
|
+
import { n as g } from "./index-CXn1_dw9.mjs";
|
|
2
2
|
import v from "react";
|
|
3
|
-
import { z as b, F as O } from "./ToggleButton-
|
|
3
|
+
import { z as b, F as O } from "./ToggleButton-5x8XNrp0.mjs";
|
|
4
4
|
function V(t, e) {
|
|
5
5
|
for (var r = 0; r < e.length; r++) {
|
|
6
6
|
const o = e[r];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as d } from "./index-
|
|
1
|
+
import { n as d } from "./index-CXn1_dw9.mjs";
|
|
2
2
|
import f from "react";
|
|
3
|
-
import { z as m, F as _ } from "./ToggleButton-
|
|
3
|
+
import { z as m, F as _ } from "./ToggleButton-5x8XNrp0.mjs";
|
|
4
4
|
function P(t, e) {
|
|
5
5
|
for (var r = 0; r < e.length; r++) {
|
|
6
6
|
const a = e[r];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as m } from "./index-
|
|
1
|
+
import { n as m } from "./index-CXn1_dw9.mjs";
|
|
2
2
|
import g from "react";
|
|
3
|
-
import { z as v, F as w } from "./ToggleButton-
|
|
3
|
+
import { z as v, F as w } from "./ToggleButton-5x8XNrp0.mjs";
|
|
4
4
|
function O(t, e) {
|
|
5
5
|
for (var a = 0; a < e.length; a++) {
|
|
6
6
|
const s = e[a];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as U } from "./index-
|
|
1
|
+
import { n as U } from "./index-CXn1_dw9.mjs";
|
|
2
2
|
import I from "react";
|
|
3
|
-
import { z as L, F as M } from "./ToggleButton-
|
|
3
|
+
import { z as L, F as M } from "./ToggleButton-5x8XNrp0.mjs";
|
|
4
4
|
function Y(a, e) {
|
|
5
5
|
for (var t = 0; t < e.length; t++) {
|
|
6
6
|
const o = e[t];
|
|
@@ -5476,11 +5476,11 @@ const _r = async (r, i, e, o) => {
|
|
|
5476
5476
|
}
|
|
5477
5477
|
}
|
|
5478
5478
|
`, mc = `
|
|
5479
|
-
query GET_LEADER_BOARD_LIST($challenge_id: String!, $user_id: String
|
|
5479
|
+
query GET_LEADER_BOARD_LIST($challenge_id: String!, $user_id: String, $pagination: community_Paginate!, $challenge_type:String,$derived_challenge_id: String, $target_type: String) {
|
|
5480
5480
|
community_getLeaderBoardList(
|
|
5481
5481
|
challenge_id: $challenge_id
|
|
5482
5482
|
user_id: $user_id
|
|
5483
|
-
pagination:
|
|
5483
|
+
pagination: $pagination
|
|
5484
5484
|
challenge_type: $challenge_type
|
|
5485
5485
|
derived_challenge_id: $derived_challenge_id
|
|
5486
5486
|
target_type: $target_type
|
|
@@ -5564,23 +5564,23 @@ const _r = async (r, i, e, o) => {
|
|
|
5564
5564
|
getSentRequestList: async (r, i, e) => await _r(e, i, $c, r),
|
|
5565
5565
|
getReceivedRequestList: async (r, i, e) => await _r(e, i, hc, r)
|
|
5566
5566
|
}, Wc = Pr.lazy(
|
|
5567
|
-
() => import("./EventListComponent-
|
|
5567
|
+
() => import("./EventListComponent-DA8m-zwp.mjs")
|
|
5568
5568
|
), kc = Pr.lazy(
|
|
5569
|
-
() => import("./ChallengeSliderComponent-
|
|
5569
|
+
() => import("./ChallengeSliderComponent-sHMLVTzY.mjs")
|
|
5570
5570
|
), zc = Pr.lazy(
|
|
5571
|
-
() => import("./EngagementHomeComponent-
|
|
5571
|
+
() => import("./EngagementHomeComponent-BzULVQ1b.mjs")
|
|
5572
5572
|
), Vc = Pr.lazy(
|
|
5573
|
-
() => import("./ChallengeDetailComponent-
|
|
5573
|
+
() => import("./ChallengeDetailComponent-Cp5WgZyn.mjs")
|
|
5574
5574
|
), Zc = Pr.lazy(
|
|
5575
|
-
() => import("./EventDetailComponent-
|
|
5575
|
+
() => import("./EventDetailComponent-BFrpAcbd.mjs")
|
|
5576
5576
|
), Hi = Pr.lazy(
|
|
5577
|
-
() => import("./CommonContentComponent-
|
|
5577
|
+
() => import("./CommonContentComponent-B3AlVAyo.mjs")
|
|
5578
5578
|
), Kc = Pr.lazy(
|
|
5579
|
-
() => import("./ArticleVodListComponent-
|
|
5579
|
+
() => import("./ArticleVodListComponent-DDlpAvkj.mjs")
|
|
5580
5580
|
), jc = Pr.lazy(
|
|
5581
|
-
() => import("./IndividualChallengeComponent-
|
|
5582
|
-
), Xc = Pr.lazy(() => import("./PageComponent-
|
|
5583
|
-
() => import("./ExperienceZoneComponent-
|
|
5581
|
+
() => import("./IndividualChallengeComponent-DgecMDj1.mjs")
|
|
5582
|
+
), Xc = Pr.lazy(() => import("./PageComponent-CBbQ6FHA.mjs")), qc = Pr.lazy(
|
|
5583
|
+
() => import("./ExperienceZoneComponent-seQ8N-61.mjs")
|
|
5584
5584
|
), ri = {
|
|
5585
5585
|
//prelems
|
|
5586
5586
|
eventList: Wc,
|
|
@@ -10555,8 +10555,8 @@ export {
|
|
|
10555
10555
|
Rn as a1,
|
|
10556
10556
|
St as a2,
|
|
10557
10557
|
nd as a3,
|
|
10558
|
-
|
|
10559
|
-
|
|
10558
|
+
wt as a4,
|
|
10559
|
+
Ed as a5,
|
|
10560
10560
|
nn as a6,
|
|
10561
10561
|
tr as a7,
|
|
10562
10562
|
qr as a8,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { K as t, G as o, A as n, L as c, M as d, N as P, b as _, C as S, O as g, R as u, S as v, a as C, c as h, E as p, U as y, W as V, X as W, Y as A, I as B, Z as E, H as x, _ as D, $ as F, Q as T, a0 as L, a1 as f, a2 as H, a3 as I, a4 as U, a5 as q, a6 as w, J as M } from "./ToggleButton-
|
|
2
|
-
import { E as Z } from "./ExperienceZone-
|
|
1
|
+
import { K as t, G as o, A as n, L as c, M as d, N as P, b as _, C as S, O as g, R as u, S as v, a as C, c as h, E as p, U as y, W as V, X as W, Y as A, I as B, Z as E, H as x, _ as D, $ as F, Q as T, a0 as L, a1 as f, a2 as H, a3 as I, a4 as U, a5 as q, a6 as w, J as M } from "./ToggleButton-5x8XNrp0.mjs";
|
|
2
|
+
import { E as Z } from "./ExperienceZone-CCpk3wfA.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-CXn1_dw9.mjs";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
const l = {
|
|
8
8
|
Prelem_025: "Banner3",
|
package/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ export declare const FETCH_CONTENT_SCHEMA_DETAIL = "\n query FETCH_CONTENT_SCHE
|
|
|
2
2
|
export declare const GET_CONTENT_SCHEMA_LIST = "query GET_CONTENT_SCHEMA_LIST($searchTerm: String!, $filter: String!, $contentTypes: [String],\n $tags: [String], $exclude: [String], $conditionString: String) {\n publish_getContents( searchTerm: $searchTerm\n tags: $tags\n filter: $filter\n contentTypes: $contentTypes\n isSuggestive: false\n exclude: $exclude\n conditionString: $conditionString)\n }\n";
|
|
3
3
|
export declare const GET_PERSONAL_TRACKER = "query GET_PERSONAL_TRACKER($date: String!, $user_id: String) {\n community_fetchPersonalTracker(date: $date, user_id: $user_id)\n}";
|
|
4
4
|
export declare const GET_CHALLENGE_DETAILS = "query GET_CHALLENGE_DETAILS($challenge_id: String!, $user_id: String) {\n community_challengesDetail(challenge_id: $challenge_id, user_id: $user_id){\n total_participant\n is_joined\n user_steps\n duration\n total_distance_covered\n is_device_synced\n derivedChallenges\n\n }\n }\n";
|
|
5
|
-
export declare const GET_LEADER_BOARD_LIST = "\n query GET_LEADER_BOARD_LIST($challenge_id: String!, $user_id: String
|
|
5
|
+
export declare const GET_LEADER_BOARD_LIST = "\n query GET_LEADER_BOARD_LIST($challenge_id: String!, $user_id: String, $pagination: community_Paginate!, $challenge_type:String,$derived_challenge_id: String, $target_type: String) {\n community_getLeaderBoardList(\n challenge_id: $challenge_id\n user_id: $user_id\n pagination: $pagination\n challenge_type: $challenge_type\n derived_challenge_id: $derived_challenge_id\n target_type: $target_type\n )\n }\n";
|
|
6
6
|
export declare const GET_EVENT_DETAILS = "query GET_EVENT_DETAILS(\n $event_id: String!\n $user_id: String\n $type: community_event_type\n $start_date: String\n $end_date: String\n ) {\n community_eventDetails(\n event_id: $event_id\n user_id: $user_id\n type: $type\n start_date: $start_date\n end_date: $end_date\n )\n }\n";
|
|
7
7
|
export declare const FETCH_CONTENT_DETAIL = "\n query FETCH_CONTENT_DETAIL($pagePath: String!, $contentType: publish_ContentTypes!) {\n publish_contentDetail(pagePath: $pagePath, contentType: $contentType)\n }\n";
|
|
8
8
|
export declare const FETCH_POLL = "\n query FETCH_POLL($title: String!) {\n users_fetchContent(title: $title) {\n title\n document_path\n options\n status\n total_vote\n start_date\n end_date\n created_by\n updated_by\n createdAt\n updatedAt\n }\n }\n";
|
package/package.json
CHANGED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { jsx as V } from "react/jsx-runtime";
|
|
2
|
-
import { b as W } from "./ToggleButton-DvmoKbv2.mjs";
|
|
3
|
-
import { useState as a, useEffect as X } from "react";
|
|
4
|
-
import { s as f, f as _ } from "./index-Bp0KqIgF.mjs";
|
|
5
|
-
import { m as Y } from "./mutateApi-C-HI_T5u.mjs";
|
|
6
|
-
import "react-dom";
|
|
7
|
-
const oe = (C) => {
|
|
8
|
-
var E;
|
|
9
|
-
const {
|
|
10
|
-
pageData: o = {},
|
|
11
|
-
secondaryArgs: P,
|
|
12
|
-
prelemAnalyticsProp: S,
|
|
13
|
-
prelemAuthoringHelper: w,
|
|
14
|
-
userId: u,
|
|
15
|
-
filters: B
|
|
16
|
-
} = C || {}, {
|
|
17
|
-
prelemBaseEndpoint: { language: g, site_host: h }
|
|
18
|
-
} = P, [T, c] = a(!1), [G, I] = a(!1), [j, D] = a(0), [b, U] = a(0), [k, J] = a([]), [x, A] = a(!1), [H, K] = a({}), [N, O] = a("0"), y = o != null && o.target_type && (o == null ? void 0 : o.target_type) !== "" ? (E = JSON.parse(o == null ? void 0 : o.target_type)[0]) == null ? void 0 : E.label : "steps", d = localStorage.getItem("userId") || u, q = async (i) => {
|
|
19
|
-
var s, n, l, t;
|
|
20
|
-
if (!d) {
|
|
21
|
-
f("User ID is not available. Please log in.");
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
c(!0);
|
|
26
|
-
const r = {
|
|
27
|
-
input: {
|
|
28
|
-
...i,
|
|
29
|
-
userId: d
|
|
30
|
-
}
|
|
31
|
-
}, e = await Y.joinChallenge(r, g, h);
|
|
32
|
-
((s = e == null ? void 0 : e.errors) == null ? void 0 : s.length) > 0 ? f((n = e == null ? void 0 : e.errors[0]) == null ? void 0 : n.message) : (t = (l = e == null ? void 0 : e.data) == null ? void 0 : l.community_joinChallenge) != null && t.id ? (I(!0), await L(), await v(), A(!0)) : console.error("Join Challenge API failed");
|
|
33
|
-
} catch (r) {
|
|
34
|
-
console.error("Error in Join Challenge API:", r);
|
|
35
|
-
} finally {
|
|
36
|
-
c(!1);
|
|
37
|
-
}
|
|
38
|
-
}, L = async () => {
|
|
39
|
-
var i, s, n, l;
|
|
40
|
-
if (!d) {
|
|
41
|
-
f("User ID is not available. Please log in.");
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
try {
|
|
45
|
-
c(!0);
|
|
46
|
-
let t = {};
|
|
47
|
-
y === "Km" || y === "miles" ? t = {
|
|
48
|
-
challenge_id: o == null ? void 0 : o.page,
|
|
49
|
-
user_id: localStorage.getItem("userId") || u,
|
|
50
|
-
target_type: y
|
|
51
|
-
} : t = {
|
|
52
|
-
challenge_id: o == null ? void 0 : o.page,
|
|
53
|
-
user_id: localStorage.getItem("userId") || u
|
|
54
|
-
};
|
|
55
|
-
const r = await _.getChallengeDetails(t, g, h);
|
|
56
|
-
if (((i = r == null ? void 0 : r.errors) == null ? void 0 : i.length) > 0)
|
|
57
|
-
f((s = r == null ? void 0 : r.errors[0]) == null ? void 0 : s.message);
|
|
58
|
-
else if ((n = r == null ? void 0 : r.data) != null && n.community_challengesDetail) {
|
|
59
|
-
const {
|
|
60
|
-
total_participant: e,
|
|
61
|
-
is_joined: m,
|
|
62
|
-
user_steps: M = 0,
|
|
63
|
-
total_distance_covered: Q = "0"
|
|
64
|
-
} = (l = r == null ? void 0 : r.data) == null ? void 0 : l.community_challengesDetail;
|
|
65
|
-
I(m), D(e), U(M), O(Q);
|
|
66
|
-
} else
|
|
67
|
-
console.error("GetEventDetails API failed");
|
|
68
|
-
} catch (t) {
|
|
69
|
-
console.error("Error in GetEventDetails API:", t);
|
|
70
|
-
} finally {
|
|
71
|
-
c(!1);
|
|
72
|
-
}
|
|
73
|
-
}, v = async () => {
|
|
74
|
-
var i, s, n, l, t;
|
|
75
|
-
try {
|
|
76
|
-
c(!0);
|
|
77
|
-
const r = {
|
|
78
|
-
challenge_id: o == null ? void 0 : o.page,
|
|
79
|
-
user_id: d
|
|
80
|
-
}, e = await _.getLeaderBoardList(r, g, h);
|
|
81
|
-
if (((i = e == null ? void 0 : e.errors) == null ? void 0 : i.length) > 0)
|
|
82
|
-
f((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message);
|
|
83
|
-
else if ((l = (n = e == null ? void 0 : e.data) == null ? void 0 : n.community_getLeaderBoardList) != null && l.records) {
|
|
84
|
-
const { records: m } = (t = e == null ? void 0 : e.data) == null ? void 0 : t.community_getLeaderBoardList;
|
|
85
|
-
J(m);
|
|
86
|
-
} else
|
|
87
|
-
console.error("GetLeaderBoardList API failed");
|
|
88
|
-
} catch (r) {
|
|
89
|
-
console.error("Error in GetLeaderBoardList API:", r);
|
|
90
|
-
} finally {
|
|
91
|
-
c(!1);
|
|
92
|
-
}
|
|
93
|
-
}, z = async (i = "") => {
|
|
94
|
-
var s, n, l, t;
|
|
95
|
-
try {
|
|
96
|
-
c(!0);
|
|
97
|
-
const r = {
|
|
98
|
-
date: i,
|
|
99
|
-
user_id: d
|
|
100
|
-
}, e = await _.fetchPersonalTracker(r, g, h);
|
|
101
|
-
if (((s = e == null ? void 0 : e.errors) == null ? void 0 : s.length) > 0)
|
|
102
|
-
f((n = e == null ? void 0 : e.errors[0]) == null ? void 0 : n.message);
|
|
103
|
-
else if ((l = e == null ? void 0 : e.data) != null && l.community_fetchPersonalTracker) {
|
|
104
|
-
const { device_info: m } = (t = e == null ? void 0 : e.data) == null ? void 0 : t.community_fetchPersonalTracker;
|
|
105
|
-
K(m);
|
|
106
|
-
} else
|
|
107
|
-
console.error("GetPersonalData API failed"), f("GetPersonalData API failed");
|
|
108
|
-
} catch (r) {
|
|
109
|
-
console.error("Error in GetPersonalData API:", r);
|
|
110
|
-
} finally {
|
|
111
|
-
c(!1);
|
|
112
|
-
}
|
|
113
|
-
}, F = {
|
|
114
|
-
joinChallenge: q,
|
|
115
|
-
loading: T,
|
|
116
|
-
isEnrolled: G,
|
|
117
|
-
enrolledParticipants: j,
|
|
118
|
-
userAchieved: b,
|
|
119
|
-
leaderBoardList: k,
|
|
120
|
-
showPopup: x,
|
|
121
|
-
setShowPopup: A,
|
|
122
|
-
deviceInfo: H,
|
|
123
|
-
userAchievedDistance: N
|
|
124
|
-
};
|
|
125
|
-
return X(() => {
|
|
126
|
-
o != null && o.page && (L(), v(), z());
|
|
127
|
-
}, [o]), /* @__PURE__ */ V(
|
|
128
|
-
W,
|
|
129
|
-
{
|
|
130
|
-
content: o,
|
|
131
|
-
analytics: S,
|
|
132
|
-
authoringHelper: w,
|
|
133
|
-
secondaryArgs: P,
|
|
134
|
-
challengeDetails: F,
|
|
135
|
-
filters: B
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
};
|
|
139
|
-
export {
|
|
140
|
-
oe as default
|
|
141
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
-
import { E as M, f as N } from "./ToggleButton-DvmoKbv2.mjs";
|
|
3
|
-
import { useState as c, useEffect as U } from "react";
|
|
4
|
-
import { C as j, s as n, f as B, a as H } from "./index-Bp0KqIgF.mjs";
|
|
5
|
-
import { m as O } from "./mutateApi-C-HI_T5u.mjs";
|
|
6
|
-
import "react-dom";
|
|
7
|
-
const V = ({
|
|
8
|
-
data: h,
|
|
9
|
-
prelemAnalyticsProp: y,
|
|
10
|
-
prelemAuthoringHelper: P,
|
|
11
|
-
secondaryArgs: f,
|
|
12
|
-
userId: m,
|
|
13
|
-
filters: S,
|
|
14
|
-
relativePath: p
|
|
15
|
-
}) => {
|
|
16
|
-
const [w, I] = c({}), [D, T] = c({}), [E, v] = c({}), [C, u] = c(!1), {
|
|
17
|
-
prelemBaseEndpoint: { language: g, site_host: d }
|
|
18
|
-
} = f, r = localStorage.getItem("userId") || m, _ = async (l, t, i) => {
|
|
19
|
-
var a, o;
|
|
20
|
-
if (!r) {
|
|
21
|
-
n("User ID is not available. Please log in.");
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
const e = {
|
|
26
|
-
input: { activity_type: i, target: l.toString(), action: t },
|
|
27
|
-
user_id: r
|
|
28
|
-
}, s = await O.setPersonalGoal(e, g, d);
|
|
29
|
-
((o = (a = s == null ? void 0 : s.data) == null ? void 0 : a.community_setPersonalGoal) == null ? void 0 : o.message) === "Created Successfully!!!" && t === "goal" ? H("Goal updated successfully!") : t !== "entry" && console.error("Something went wrong !");
|
|
30
|
-
} catch (e) {
|
|
31
|
-
console.error("Error in update goal API:", e), n("Something went wrong, please try after sometime !");
|
|
32
|
-
}
|
|
33
|
-
}, G = async () => {
|
|
34
|
-
var l, t, i, a;
|
|
35
|
-
if (!r) {
|
|
36
|
-
n("User ID is not available. Please log in.");
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
try {
|
|
40
|
-
u(!0);
|
|
41
|
-
const o = {
|
|
42
|
-
date: N(/* @__PURE__ */ new Date(), "yyyy-MM-dd"),
|
|
43
|
-
user_id: r
|
|
44
|
-
}, e = await B.fetchPersonalTracker(o, g, d);
|
|
45
|
-
if (((l = e == null ? void 0 : e.errors) == null ? void 0 : l.length) > 0)
|
|
46
|
-
n((t = e == null ? void 0 : e.errors[0]) == null ? void 0 : t.message);
|
|
47
|
-
else if ((i = e == null ? void 0 : e.data) != null && i.community_fetchPersonalTracker) {
|
|
48
|
-
const { steps: s, calories: k, distance: L, individual_challenge_info: b } = (a = e == null ? void 0 : e.data) == null ? void 0 : a.community_fetchPersonalTracker;
|
|
49
|
-
v(s), I(b), T({ calories: k, distance: L });
|
|
50
|
-
} else
|
|
51
|
-
console.error("GetPersonalData API failed");
|
|
52
|
-
} catch (o) {
|
|
53
|
-
n("Something went wrong !"), console.error("Error in GetPersonalData API:", o);
|
|
54
|
-
} finally {
|
|
55
|
-
u(!1);
|
|
56
|
-
}
|
|
57
|
-
}, A = {
|
|
58
|
-
stepsData: E,
|
|
59
|
-
loading: C,
|
|
60
|
-
updateGoals: _
|
|
61
|
-
};
|
|
62
|
-
return U(() => {
|
|
63
|
-
G();
|
|
64
|
-
}, []), /* @__PURE__ */ x(
|
|
65
|
-
M,
|
|
66
|
-
{
|
|
67
|
-
content: h,
|
|
68
|
-
analytics: y,
|
|
69
|
-
authoringHelper: P,
|
|
70
|
-
secondaryArgs: f,
|
|
71
|
-
stepsDetails: A,
|
|
72
|
-
filters: S,
|
|
73
|
-
relativePath: p,
|
|
74
|
-
individualChallengeInfo: w,
|
|
75
|
-
commonInfo: D,
|
|
76
|
-
userId: m,
|
|
77
|
-
constants: j
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
V as default
|
|
83
|
-
};
|