@platform-x/hcltechx-mfe-wrapper 2.0.11 → 2.0.12
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-DDlpAvkj.mjs → ArticleVodListComponent-DF2fUARb.mjs} +2 -2
- package/{ChallengeDetailComponent-Cp5WgZyn.mjs → ChallengeDetailComponent-Bk6J5D1N.mjs} +51 -50
- package/{ChallengeSliderComponent-sHMLVTzY.mjs → ChallengeSliderComponent-Cl3JzeUT.mjs} +3 -3
- package/{CommonContentComponent-B3AlVAyo.mjs → CommonContentComponent-TFMxZU7l.mjs} +4 -4
- package/{DailyMotion-Ctf9dZNz.mjs → DailyMotion-hnuvt9Up.mjs} +2 -2
- package/{EngagementHomeComponent-BzULVQ1b.mjs → EngagementHomeComponent-Pfxvw5Qm.mjs} +3 -3
- package/{EventDetailComponent-BFrpAcbd.mjs → EventDetailComponent-QCU0QBKk.mjs} +3 -3
- package/{EventListComponent-DA8m-zwp.mjs → EventListComponent-Cojz0QjQ.mjs} +3 -3
- package/{ExperienceZone-CCpk3wfA.mjs → ExperienceZone-DaFgwuAg.mjs} +11 -11
- package/{ExperienceZoneComponent-seQ8N-61.mjs → ExperienceZoneComponent-CtNZcqUk.mjs} +3 -3
- package/{Facebook-E9V-xmdL.mjs → Facebook-9-9UWZlO.mjs} +11 -11
- package/{FilePlayer-D873kxxw.mjs → FilePlayer-BVNQab1w.mjs} +2 -2
- package/IndividualChallengeComponent-OgdIaKOB.mjs +203 -0
- package/{Kaltura-DzDUIYV-.mjs → Kaltura-wSM-2IO5.mjs} +2 -2
- package/{Mapping-jqmNMEpL.mjs → Mapping-B5imuw10.mjs} +2 -1
- package/{Mixcloud-eK72UFK5.mjs → Mixcloud-BDTnWB7c.mjs} +2 -2
- package/{Mux-B1dJXqDK.mjs → Mux-CMsNR-Ed.mjs} +2 -2
- package/{PageComponent-CBbQ6FHA.mjs → PageComponent-COY6EaoM.mjs} +3 -3
- package/{Preview-BICB0ygt.mjs → Preview-c4OWKSh6.mjs} +1 -1
- package/{RecentCarousel-DOGZKmRG.mjs → RecentCarousel-DfDvRjDs.mjs} +2 -2
- package/{Share-LWrVflIo.mjs → Share-CaJc5ajl.mjs} +431 -632
- package/{SoundCloud-BU2sORCw.mjs → SoundCloud-CoOTT-mw.mjs} +10 -10
- package/{Streamable-BJP2lWrh.mjs → Streamable-yzjY8yT0.mjs} +2 -2
- package/ToggleButton-CZ1_YTkH.mjs +61983 -0
- package/{Twitch-CxK8NZDy.mjs → Twitch-C07y3R_-.mjs} +2 -2
- package/{Vidyard-DPLjttlh.mjs → Vidyard-zr3dpYOa.mjs} +2 -2
- package/{Vimeo-BSPddzKy.mjs → Vimeo-BeNaVtI9.mjs} +2 -2
- package/{Wistia-Dm7XoZWT.mjs → Wistia-CXGFwlBf.mjs} +2 -2
- package/{YouTube-BdUQm9tW.mjs → YouTube-CZU4W6TC.mjs} +2 -2
- package/{index-CXn1_dw9.mjs → index-BkV6Jknw.mjs} +5246 -3263
- package/index-DD-zhzlc.mjs +700 -0
- package/index.mjs +1 -1
- package/lib/services/ApiConfig.d.ts +1 -1
- package/lib/services/fetchQueries.d.ts +1 -1
- package/lib/utils/Mapping.d.ts +1 -0
- package/lib/utils/helper.d.ts +1 -0
- package/{mutateApi-Cy-kWAqz.mjs → mutateApi-BcwOxJGQ.mjs} +1 -1
- package/package.json +1 -1
- package/IndividualChallengeComponent-DgecMDj1.mjs +0 -200
- package/ToggleButton-5x8XNrp0.mjs +0 -242965
- package/index-Ctb_unxf.mjs +0 -64
package/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const apiConfig: (host: any, lang: any, query: any, variables: any) => Promise<any>;
|
|
1
|
+
export declare const apiConfig: (host: any, lang: any, query: any, variables: any, queryName?: string) => Promise<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const FETCH_CONTENT_SCHEMA_DETAIL = "\n query FETCH_CONTENT_SCHEMA_DETAIL($contentType: String!, $pagePath: String!) {\n publish_fetchSchemaContent(contentType: $contentType, pagePath: $pagePath)\n }\n";
|
|
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
|
-
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";
|
|
4
|
+
export declare const GET_CHALLENGE_DETAILS = "query GET_CHALLENGE_DETAILS($challenge_id: String!, $user_id: String, $derived_challenge_id: String) {\n community_challengesDetail(challenge_id: $challenge_id, user_id: $user_id, derived_challenge_id: $derived_challenge_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
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";
|
package/lib/utils/Mapping.d.ts
CHANGED
package/lib/utils/helper.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { jsx as ne } from "react/jsx-runtime";
|
|
2
|
-
import { I as oe } from "./ToggleButton-5x8XNrp0.mjs";
|
|
3
|
-
import { useState as u, useEffect as le } from "react";
|
|
4
|
-
import { C as ie, f as L, s as d, a as T } from "./index-CXn1_dw9.mjs";
|
|
5
|
-
import { m as w } from "./mutateApi-Cy-kWAqz.mjs";
|
|
6
|
-
import "react-dom";
|
|
7
|
-
const he = (G) => {
|
|
8
|
-
const {
|
|
9
|
-
pageData: l = {},
|
|
10
|
-
secondaryArgs: P,
|
|
11
|
-
prelemAnalyticsProp: B,
|
|
12
|
-
prelemAuthoringHelper: j,
|
|
13
|
-
userId: C,
|
|
14
|
-
cugId: D,
|
|
15
|
-
filters: U
|
|
16
|
-
} = G || {}, {
|
|
17
|
-
prelemBaseEndpoint: { site_host: f, language: h }
|
|
18
|
-
} = P, m = localStorage.getItem("userId") || C, [k, g] = u(!1), [b, A] = u(!1), [x, H] = u(0), [J, N] = u(0), [O, z] = u([]), [F, v] = u([]), [K, M] = u([]), [Q, S] = u({}), [V, W] = u({}), [X, Y] = u([]), [Z, _] = u(!1), [$, p] = u({}), R = async (a) => {
|
|
19
|
-
var i, c, o, n, t, e;
|
|
20
|
-
try {
|
|
21
|
-
g(!0);
|
|
22
|
-
const s = {
|
|
23
|
-
input: {
|
|
24
|
-
...a,
|
|
25
|
-
userId: m
|
|
26
|
-
}
|
|
27
|
-
}, r = await w.joinChallenge(s, h, f);
|
|
28
|
-
((i = r == null ? void 0 : r.errors) == null ? void 0 : i.length) > 0 ? d((c = r == null ? void 0 : r.errors[0]) == null ? void 0 : c.message) : (n = (o = r == null ? void 0 : r.data) == null ? void 0 : o.community_joinChallenge) != null && n.id ? (T((e = (t = r == null ? void 0 : r.data) == null ? void 0 : t.community_joinChallenge) == null ? void 0 : e.message), A(!0), I()) : console.error("Join Challenge API failed");
|
|
29
|
-
} catch (s) {
|
|
30
|
-
console.error("Error in Join Challenge API:", s);
|
|
31
|
-
} finally {
|
|
32
|
-
g(!1);
|
|
33
|
-
}
|
|
34
|
-
}, I = async () => {
|
|
35
|
-
var a, i, c, o;
|
|
36
|
-
try {
|
|
37
|
-
g(!0), _(!0);
|
|
38
|
-
const n = {
|
|
39
|
-
challenge_id: l == null ? void 0 : l.page,
|
|
40
|
-
user_id: m,
|
|
41
|
-
challenge_type: "individual"
|
|
42
|
-
}, t = await L.getChallengeDetails(n, h, f);
|
|
43
|
-
if (((a = t == null ? void 0 : t.errors) == null ? void 0 : a.length) > 0)
|
|
44
|
-
d((i = t == null ? void 0 : t.errors[0]) == null ? void 0 : i.message);
|
|
45
|
-
else if ((c = t == null ? void 0 : t.data) != null && c.community_challengesDetail) {
|
|
46
|
-
const {
|
|
47
|
-
total_participant: e,
|
|
48
|
-
is_joined: s,
|
|
49
|
-
user_steps: r = 0,
|
|
50
|
-
derivedChallenges: y
|
|
51
|
-
} = (o = t == null ? void 0 : t.data) == null ? void 0 : o.community_challengesDetail;
|
|
52
|
-
A(s), H(e), N(r), Y(y);
|
|
53
|
-
} else
|
|
54
|
-
console.error("GetChallengeDetails API failed");
|
|
55
|
-
} catch (n) {
|
|
56
|
-
console.error("Error in GetChallengeDetails API:", n), _(!1);
|
|
57
|
-
} finally {
|
|
58
|
-
g(!1), _(!1);
|
|
59
|
-
}
|
|
60
|
-
}, q = async (a = "") => {
|
|
61
|
-
var i, c, o, n;
|
|
62
|
-
try {
|
|
63
|
-
g(!0);
|
|
64
|
-
const t = {
|
|
65
|
-
date: a,
|
|
66
|
-
user_id: m
|
|
67
|
-
}, e = await L.fetchPersonalTracker(t, h, f);
|
|
68
|
-
if (((i = e == null ? void 0 : e.errors) == null ? void 0 : i.length) > 0)
|
|
69
|
-
d((c = e == null ? void 0 : e.errors[0]) == null ? void 0 : c.message);
|
|
70
|
-
else if ((o = e == null ? void 0 : e.data) != null && o.community_fetchPersonalTracker) {
|
|
71
|
-
const { steps: s, device_info: r, individual_challenge_info: y } = (n = e == null ? void 0 : e.data) == null ? void 0 : n.community_fetchPersonalTracker;
|
|
72
|
-
S(s), W(r), p(y);
|
|
73
|
-
} else
|
|
74
|
-
console.error("GetPersonalData API failed"), d("GetPersonalData API failed");
|
|
75
|
-
} catch (t) {
|
|
76
|
-
console.error("Error in GetPersonalData API:", t), d("Error in GetPersonalData API"), S({});
|
|
77
|
-
} finally {
|
|
78
|
-
g(!1);
|
|
79
|
-
}
|
|
80
|
-
}, ee = async (a) => {
|
|
81
|
-
var i, c, o, n, t;
|
|
82
|
-
try {
|
|
83
|
-
g(!0);
|
|
84
|
-
const e = {
|
|
85
|
-
challenge_id: l == null ? void 0 : l.page,
|
|
86
|
-
user_id: m,
|
|
87
|
-
challenge_type: "individual",
|
|
88
|
-
derived_challenge_id: a || ""
|
|
89
|
-
}, s = await L.getLeaderBoardList(e, h, f);
|
|
90
|
-
if (((i = s == null ? void 0 : s.errors) == null ? void 0 : i.length) > 0)
|
|
91
|
-
d((c = s == null ? void 0 : s.errors[0]) == null ? void 0 : c.message);
|
|
92
|
-
else if ((n = (o = s == null ? void 0 : s.data) == null ? void 0 : o.community_getLeaderBoardList) != null && n.records) {
|
|
93
|
-
const { records: r } = (t = s == null ? void 0 : s.data) == null ? void 0 : t.community_getLeaderBoardList;
|
|
94
|
-
z(r);
|
|
95
|
-
} else
|
|
96
|
-
console.error("GetLeaderBoardList API failed");
|
|
97
|
-
} catch (e) {
|
|
98
|
-
console.error("Error in GetLeaderBoardList API:", e);
|
|
99
|
-
} finally {
|
|
100
|
-
g(!1);
|
|
101
|
-
}
|
|
102
|
-
}, re = async (a) => {
|
|
103
|
-
var i, c;
|
|
104
|
-
try {
|
|
105
|
-
const o = {
|
|
106
|
-
input: a
|
|
107
|
-
}, n = await w.setUpChallenge(o, h, f);
|
|
108
|
-
((c = (i = n == null ? void 0 : n.data) == null ? void 0 : i.community_setupChallenge) == null ? void 0 : c.message) === "challenge has been setUp successfully" ? (T("Challenge has been setup successfully!"), I()) : console.error("Something went wrong !");
|
|
109
|
-
} catch (o) {
|
|
110
|
-
console.error("Error in update goal API:", o), d("Something went wrong, please try after sometime !");
|
|
111
|
-
}
|
|
112
|
-
}, te = async (a = "", i = !1) => {
|
|
113
|
-
var c, o, n, t, e;
|
|
114
|
-
try {
|
|
115
|
-
g(!0);
|
|
116
|
-
let s = {};
|
|
117
|
-
a !== "" ? s = {
|
|
118
|
-
challenge_id: l == null ? void 0 : l.page,
|
|
119
|
-
user_id: m,
|
|
120
|
-
derived_challenge_id: a,
|
|
121
|
-
viewParticipants: i
|
|
122
|
-
} : s = {
|
|
123
|
-
challenge_id: l == null ? void 0 : l.page,
|
|
124
|
-
user_id: m,
|
|
125
|
-
viewParticipants: i
|
|
126
|
-
};
|
|
127
|
-
const r = await L.getSentRequestList(s, h, f);
|
|
128
|
-
if (((c = r == null ? void 0 : r.errors) == null ? void 0 : c.length) > 0)
|
|
129
|
-
d((o = r == null ? void 0 : r.errors[0]) == null ? void 0 : o.message);
|
|
130
|
-
else if ((t = (n = r == null ? void 0 : r.data) == null ? void 0 : n.community_sentRequests) != null && t.records) {
|
|
131
|
-
const { records: y } = (e = r == null ? void 0 : r.data) == null ? void 0 : e.community_sentRequests;
|
|
132
|
-
v(y);
|
|
133
|
-
} else
|
|
134
|
-
console.error("GetSentRequestList API failed");
|
|
135
|
-
} catch (s) {
|
|
136
|
-
console.error("Error in GetSentRequestList API:", s), v([]);
|
|
137
|
-
} finally {
|
|
138
|
-
g(!1);
|
|
139
|
-
}
|
|
140
|
-
}, E = async () => {
|
|
141
|
-
var a, i, c, o, n;
|
|
142
|
-
try {
|
|
143
|
-
g(!0);
|
|
144
|
-
const t = {
|
|
145
|
-
challenge_id: l == null ? void 0 : l.page,
|
|
146
|
-
user_id: m
|
|
147
|
-
}, e = await L.getReceivedRequestList(t, h, f);
|
|
148
|
-
if (((a = e == null ? void 0 : e.errors) == null ? void 0 : a.length) > 0)
|
|
149
|
-
d((i = e == null ? void 0 : e.errors[0]) == null ? void 0 : i.message);
|
|
150
|
-
else if ((o = (c = e == null ? void 0 : e.data) == null ? void 0 : c.community_receivedRequests) != null && o.records) {
|
|
151
|
-
const { records: s } = (n = e == null ? void 0 : e.data) == null ? void 0 : n.community_receivedRequests;
|
|
152
|
-
M(s);
|
|
153
|
-
} else
|
|
154
|
-
console.error("GetReceivedRequestList API failed");
|
|
155
|
-
} catch (t) {
|
|
156
|
-
console.error("Error in GetReceivedRequestList API:", t);
|
|
157
|
-
} finally {
|
|
158
|
-
g(!1);
|
|
159
|
-
}
|
|
160
|
-
}, se = {
|
|
161
|
-
joinChallenge: R,
|
|
162
|
-
loading: k,
|
|
163
|
-
isEnrolled: b,
|
|
164
|
-
enrolledParticipants: x,
|
|
165
|
-
userAchieved: J,
|
|
166
|
-
leaderBoardList: O,
|
|
167
|
-
stepsData: Q,
|
|
168
|
-
setUpChallenge: re,
|
|
169
|
-
sentRequestList: F,
|
|
170
|
-
receivedRequestList: K,
|
|
171
|
-
getSentRequestList: te,
|
|
172
|
-
getReceivedRequestList: E,
|
|
173
|
-
getChallengeDetails: I,
|
|
174
|
-
derivedChallenge: X,
|
|
175
|
-
deviceInfo: V,
|
|
176
|
-
pageLoader: Z,
|
|
177
|
-
fetchPersonalData: q,
|
|
178
|
-
individualChallengeInfo: $,
|
|
179
|
-
getLeaderBoardList: ee
|
|
180
|
-
};
|
|
181
|
-
return le(() => {
|
|
182
|
-
l != null && l.page && (I(), q(), E());
|
|
183
|
-
}, [l]), /* @__PURE__ */ ne(
|
|
184
|
-
oe,
|
|
185
|
-
{
|
|
186
|
-
content: l,
|
|
187
|
-
analytics: B,
|
|
188
|
-
authoringHelper: j,
|
|
189
|
-
secondaryArgs: P,
|
|
190
|
-
challengeDetails: se,
|
|
191
|
-
userId: C,
|
|
192
|
-
cugId: D,
|
|
193
|
-
filters: U,
|
|
194
|
-
constants: ie
|
|
195
|
-
}
|
|
196
|
-
);
|
|
197
|
-
};
|
|
198
|
-
export {
|
|
199
|
-
he as default
|
|
200
|
-
};
|