@platform-x/hcltechx-mfe-wrapper 1.0.0
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/BrightcovePlayer-B2Rrij5a.mjs +177 -0
- package/ChallengeDetailComponent-QSflL_pe.mjs +89 -0
- package/CommonContentComponent-D8PuLEle.mjs +78 -0
- package/DailyMotion-Pq0OS_nv.mjs +136 -0
- package/EngagementHomeComponent-CO2rSsxl.mjs +91 -0
- package/EventDetailComponent-DMKfvnfx.mjs +84 -0
- package/EventList-BM7sWeX5.mjs +22503 -0
- package/EventListComponent-SpgarpPb.mjs +82 -0
- package/Facebook-DVoDyq2n.mjs +121 -0
- package/FilePlayer-TBmUK03G.mjs +202 -0
- package/Kaltura-CLaSL9Gw.mjs +121 -0
- package/Mixcloud-BIUEG_vf.mjs +113 -0
- package/Mux-D2H0Zcnl.mjs +165 -0
- package/Preview-CqNeXEJq.mjs +127 -0
- package/RecentCarousel-DsRr-cur.mjs +243 -0
- package/Share-BTinEfR4.mjs +2243 -0
- package/SoundCloud-CL3-ElQD.mjs +123 -0
- package/Streamable-B6PCkCf3.mjs +115 -0
- package/Twitch-T-goXjKL.mjs +117 -0
- package/Vidyard-D8-XmjAR.mjs +113 -0
- package/Vimeo-jej0FY4O.mjs +146 -0
- package/Wistia-CPzm8ZXT.mjs +124 -0
- package/YouTube-VNohNZKu.mjs +176 -0
- package/index-BTIxC-e5.mjs +20 -0
- package/index-Dluh6sv-.mjs +7333 -0
- package/index.d.ts +2 -0
- package/index.mjs +10 -0
- package/lib/Components/EventDetails/EventDetailComponent.d.ts +1 -0
- package/lib/Components/EventDetails/index.d.ts +2 -0
- package/lib/Components/EventList/EventListComponent.d.ts +2 -0
- package/lib/Components/EventList/index.d.ts +2 -0
- package/lib/Components/FallBackPage/FallBackPage.d.ts +2 -0
- package/lib/Components/Loader/Loader.d.ts +2 -0
- package/lib/contentType-wrapper.d.ts +12 -0
- package/lib/contentTypes/Components/ChallengeDetailComponent.d.ts +2 -0
- package/lib/contentTypes/Components/CommonContentComponent.d.ts +4 -0
- package/lib/contentTypes/Components/EventDetailComponent.d.ts +2 -0
- package/lib/contentTypes/index.d.ts +2 -0
- package/lib/prelems/Components/EngagementHomeComponent.d.ts +2 -0
- package/lib/prelems/Components/EventListComponent.d.ts +10 -0
- package/lib/prelems/index.d.ts +2 -0
- package/lib/prelems-wrapper.d.ts +9 -0
- package/lib/services/ApiConfig.d.ts +1 -0
- package/lib/services/fetchApi.d.ts +11 -0
- package/lib/services/fetchQueries.d.ts +7 -0
- package/lib/services/mutateApi.d.ts +7 -0
- package/lib/services/mutateQueries.d.ts +4 -0
- package/lib/utils/Mapping.d.ts +7 -0
- package/lib/utils/componentMapping.d.ts +11 -0
- package/lib/utils/constants.d.ts +10 -0
- package/lib/utils/types.d.ts +32 -0
- package/mutateApi-DOEWbC_3.mjs +37 -0
- package/package.json +25 -0
- package/style.css +1 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { g as m } from "./index-Dluh6sv-.mjs";
|
|
2
|
+
import g from "react";
|
|
3
|
+
import { u as v, p as w } from "./EventList-BM7sWeX5.mjs";
|
|
4
|
+
function O(t, e) {
|
|
5
|
+
for (var a = 0; a < e.length; a++) {
|
|
6
|
+
const s = e[a];
|
|
7
|
+
if (typeof s != "string" && !Array.isArray(s)) {
|
|
8
|
+
for (const r in s)
|
|
9
|
+
if (r !== "default" && !(r in t)) {
|
|
10
|
+
const o = Object.getOwnPropertyDescriptor(s, r);
|
|
11
|
+
o && Object.defineProperty(t, r, o.get ? o : {
|
|
12
|
+
enumerable: !0,
|
|
13
|
+
get: () => s[r]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
+
}
|
|
20
|
+
var C = Object.create, i = Object.defineProperty, k = Object.getOwnPropertyDescriptor, D = Object.getOwnPropertyNames, R = Object.getPrototypeOf, S = Object.prototype.hasOwnProperty, E = (t, e, a) => e in t ? i(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a, j = (t, e) => {
|
|
21
|
+
for (var a in e)
|
|
22
|
+
i(t, a, { get: e[a], enumerable: !0 });
|
|
23
|
+
}, h = (t, e, a, s) => {
|
|
24
|
+
if (e && typeof e == "object" || typeof e == "function")
|
|
25
|
+
for (let r of D(e))
|
|
26
|
+
!S.call(t, r) && r !== a && i(t, r, { get: () => e[r], enumerable: !(s = k(e, r)) || s.enumerable });
|
|
27
|
+
return t;
|
|
28
|
+
}, I = (t, e, a) => (a = t != null ? C(R(t)) : {}, h(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
!t || !t.__esModule ? i(a, "default", { value: t, enumerable: !0 }) : a,
|
|
34
|
+
t
|
|
35
|
+
)), M = (t) => h(i({}, "__esModule", { value: !0 }), t), n = (t, e, a) => (E(t, typeof e != "symbol" ? e + "" : e, a), a), d = {};
|
|
36
|
+
j(d, {
|
|
37
|
+
default: () => l
|
|
38
|
+
});
|
|
39
|
+
var _ = M(d), y = I(g), c = v, P = w;
|
|
40
|
+
const W = "https://fast.wistia.com/assets/external/E-v1.js", A = "Wistia", L = "wistia-player-";
|
|
41
|
+
class l extends y.Component {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments), n(this, "callPlayer", c.callPlayer), n(this, "playerID", this.props.config.playerId || `${L}${(0, c.randomString)()}`), n(this, "onPlay", (...e) => this.props.onPlay(...e)), n(this, "onPause", (...e) => this.props.onPause(...e)), n(this, "onSeek", (...e) => this.props.onSeek(...e)), n(this, "onEnded", (...e) => this.props.onEnded(...e)), n(this, "onPlaybackRateChange", (...e) => this.props.onPlaybackRateChange(...e)), n(this, "mute", () => {
|
|
44
|
+
this.callPlayer("mute");
|
|
45
|
+
}), n(this, "unmute", () => {
|
|
46
|
+
this.callPlayer("unmute");
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
componentDidMount() {
|
|
50
|
+
this.props.onMount && this.props.onMount(this);
|
|
51
|
+
}
|
|
52
|
+
load(e) {
|
|
53
|
+
const { playing: a, muted: s, controls: r, onReady: o, config: p, onError: b } = this.props;
|
|
54
|
+
(0, c.getSDK)(W, A).then((f) => {
|
|
55
|
+
p.customControls && p.customControls.forEach((u) => f.defineControl(u)), window._wq = window._wq || [], window._wq.push({
|
|
56
|
+
id: this.playerID,
|
|
57
|
+
options: {
|
|
58
|
+
autoPlay: a,
|
|
59
|
+
silentAutoPlay: "allow",
|
|
60
|
+
muted: s,
|
|
61
|
+
controlsVisibleOnLoad: r,
|
|
62
|
+
fullscreenButton: r,
|
|
63
|
+
playbar: r,
|
|
64
|
+
playbackRateControl: r,
|
|
65
|
+
qualityControl: r,
|
|
66
|
+
volumeControl: r,
|
|
67
|
+
settingsControl: r,
|
|
68
|
+
smallPlayButton: r,
|
|
69
|
+
...p.options
|
|
70
|
+
},
|
|
71
|
+
onReady: (u) => {
|
|
72
|
+
this.player = u, this.unbind(), this.player.bind("play", this.onPlay), this.player.bind("pause", this.onPause), this.player.bind("seek", this.onSeek), this.player.bind("end", this.onEnded), this.player.bind("playbackratechange", this.onPlaybackRateChange), o();
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}, b);
|
|
76
|
+
}
|
|
77
|
+
unbind() {
|
|
78
|
+
this.player.unbind("play", this.onPlay), this.player.unbind("pause", this.onPause), this.player.unbind("seek", this.onSeek), this.player.unbind("end", this.onEnded), this.player.unbind("playbackratechange", this.onPlaybackRateChange);
|
|
79
|
+
}
|
|
80
|
+
play() {
|
|
81
|
+
this.callPlayer("play");
|
|
82
|
+
}
|
|
83
|
+
pause() {
|
|
84
|
+
this.callPlayer("pause");
|
|
85
|
+
}
|
|
86
|
+
stop() {
|
|
87
|
+
this.unbind(), this.callPlayer("remove");
|
|
88
|
+
}
|
|
89
|
+
seekTo(e, a = !0) {
|
|
90
|
+
this.callPlayer("time", e), a || this.pause();
|
|
91
|
+
}
|
|
92
|
+
setVolume(e) {
|
|
93
|
+
this.callPlayer("volume", e);
|
|
94
|
+
}
|
|
95
|
+
setPlaybackRate(e) {
|
|
96
|
+
this.callPlayer("playbackRate", e);
|
|
97
|
+
}
|
|
98
|
+
getDuration() {
|
|
99
|
+
return this.callPlayer("duration");
|
|
100
|
+
}
|
|
101
|
+
getCurrentTime() {
|
|
102
|
+
return this.callPlayer("time");
|
|
103
|
+
}
|
|
104
|
+
getSecondsLoaded() {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
render() {
|
|
108
|
+
const { url: e } = this.props, a = e && e.match(P.MATCH_URL_WISTIA)[1], s = `wistia_embed wistia_async_${a}`, r = {
|
|
109
|
+
width: "100%",
|
|
110
|
+
height: "100%"
|
|
111
|
+
};
|
|
112
|
+
return /* @__PURE__ */ y.default.createElement("div", { id: this.playerID, key: a, className: s, style: r });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
n(l, "displayName", "Wistia");
|
|
116
|
+
n(l, "canPlay", P.canPlay.wistia);
|
|
117
|
+
n(l, "loopOnEnded", !0);
|
|
118
|
+
const N = /* @__PURE__ */ m(_), q = /* @__PURE__ */ O({
|
|
119
|
+
__proto__: null,
|
|
120
|
+
default: N
|
|
121
|
+
}, [_]);
|
|
122
|
+
export {
|
|
123
|
+
q as W
|
|
124
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { g as U } from "./index-Dluh6sv-.mjs";
|
|
2
|
+
import I from "react";
|
|
3
|
+
import { u as L, p as M } from "./EventList-BM7sWeX5.mjs";
|
|
4
|
+
function Y(a, e) {
|
|
5
|
+
for (var t = 0; t < e.length; t++) {
|
|
6
|
+
const o = e[t];
|
|
7
|
+
if (typeof o != "string" && !Array.isArray(o)) {
|
|
8
|
+
for (const r in o)
|
|
9
|
+
if (r !== "default" && !(r in a)) {
|
|
10
|
+
const n = Object.getOwnPropertyDescriptor(o, r);
|
|
11
|
+
n && Object.defineProperty(a, r, n.get ? n : {
|
|
12
|
+
enumerable: !0,
|
|
13
|
+
get: () => o[r]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return Object.freeze(Object.defineProperty(a, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
+
}
|
|
20
|
+
var k = Object.create, u = Object.defineProperty, N = Object.getOwnPropertyDescriptor, j = Object.getOwnPropertyNames, V = Object.getPrototypeOf, B = Object.prototype.hasOwnProperty, K = (a, e, t) => e in a ? u(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, x = (a, e) => {
|
|
21
|
+
for (var t in e)
|
|
22
|
+
u(a, t, { get: e[t], enumerable: !0 });
|
|
23
|
+
}, v = (a, e, t, o) => {
|
|
24
|
+
if (e && typeof e == "object" || typeof e == "function")
|
|
25
|
+
for (let r of j(e))
|
|
26
|
+
!B.call(a, r) && r !== t && u(a, r, { get: () => e[r], enumerable: !(o = N(e, r)) || o.enumerable });
|
|
27
|
+
return a;
|
|
28
|
+
}, F = (a, e, t) => (t = a != null ? k(V(a)) : {}, v(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
!a || !a.__esModule ? u(t, "default", { value: a, enumerable: !0 }) : t,
|
|
34
|
+
a
|
|
35
|
+
)), H = (a) => v(u({}, "__esModule", { value: !0 }), a), s = (a, e, t) => (K(a, typeof e != "symbol" ? e + "" : e, t), t), w = {};
|
|
36
|
+
x(w, {
|
|
37
|
+
default: () => O
|
|
38
|
+
});
|
|
39
|
+
var S = H(w), m = F(I), p = L, D = M;
|
|
40
|
+
const G = "https://www.youtube.com/iframe_api", T = "YT", z = "onYouTubeIframeAPIReady", f = /[?&](?:list|channel)=([a-zA-Z0-9_-]+)/, b = /user\/([a-zA-Z0-9_-]+)\/?/, Q = /youtube-nocookie\.com/, Z = "https://www.youtube-nocookie.com";
|
|
41
|
+
class O extends m.Component {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments), s(this, "callPlayer", p.callPlayer), s(this, "parsePlaylist", (e) => {
|
|
44
|
+
if (e instanceof Array)
|
|
45
|
+
return {
|
|
46
|
+
listType: "playlist",
|
|
47
|
+
playlist: e.map(this.getID).join(",")
|
|
48
|
+
};
|
|
49
|
+
if (f.test(e)) {
|
|
50
|
+
const [, t] = e.match(f);
|
|
51
|
+
return {
|
|
52
|
+
listType: "playlist",
|
|
53
|
+
list: t.replace(/^UC/, "UU")
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (b.test(e)) {
|
|
57
|
+
const [, t] = e.match(b);
|
|
58
|
+
return {
|
|
59
|
+
listType: "user_uploads",
|
|
60
|
+
list: t
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return {};
|
|
64
|
+
}), s(this, "onStateChange", (e) => {
|
|
65
|
+
const { data: t } = e, { onPlay: o, onPause: r, onBuffer: n, onBufferEnd: P, onEnded: _, onReady: g, loop: y, config: { playerVars: l, onUnstarted: d } } = this.props, { UNSTARTED: h, PLAYING: c, PAUSED: i, BUFFERING: E, ENDED: A, CUED: C } = window[T].PlayerState;
|
|
66
|
+
if (t === h && d(), t === c && (o(), P()), t === i && r(), t === E && n(), t === A) {
|
|
67
|
+
const R = !!this.callPlayer("getPlaylist");
|
|
68
|
+
y && !R && (l.start ? this.seekTo(l.start) : this.play()), _();
|
|
69
|
+
}
|
|
70
|
+
t === C && g();
|
|
71
|
+
}), s(this, "mute", () => {
|
|
72
|
+
this.callPlayer("mute");
|
|
73
|
+
}), s(this, "unmute", () => {
|
|
74
|
+
this.callPlayer("unMute");
|
|
75
|
+
}), s(this, "ref", (e) => {
|
|
76
|
+
this.container = e;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
componentDidMount() {
|
|
80
|
+
this.props.onMount && this.props.onMount(this);
|
|
81
|
+
}
|
|
82
|
+
getID(e) {
|
|
83
|
+
return !e || e instanceof Array || f.test(e) ? null : e.match(D.MATCH_URL_YOUTUBE)[1];
|
|
84
|
+
}
|
|
85
|
+
load(e, t) {
|
|
86
|
+
const { playing: o, muted: r, playsinline: n, controls: P, loop: _, config: g, onError: y } = this.props, { playerVars: l, embedOptions: d } = g, h = this.getID(e);
|
|
87
|
+
if (t) {
|
|
88
|
+
if (f.test(e) || b.test(e) || e instanceof Array) {
|
|
89
|
+
this.player.loadPlaylist(this.parsePlaylist(e));
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.player.cueVideoById({
|
|
93
|
+
videoId: h,
|
|
94
|
+
startSeconds: (0, p.parseStartTime)(e) || l.start,
|
|
95
|
+
endSeconds: (0, p.parseEndTime)(e) || l.end
|
|
96
|
+
});
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
(0, p.getSDK)(G, T, z, (c) => c.loaded).then((c) => {
|
|
100
|
+
this.container && (this.player = new c.Player(this.container, {
|
|
101
|
+
width: "100%",
|
|
102
|
+
height: "100%",
|
|
103
|
+
videoId: h,
|
|
104
|
+
playerVars: {
|
|
105
|
+
autoplay: o ? 1 : 0,
|
|
106
|
+
mute: r ? 1 : 0,
|
|
107
|
+
controls: P ? 1 : 0,
|
|
108
|
+
start: (0, p.parseStartTime)(e),
|
|
109
|
+
end: (0, p.parseEndTime)(e),
|
|
110
|
+
origin: window.location.origin,
|
|
111
|
+
playsinline: n ? 1 : 0,
|
|
112
|
+
...this.parsePlaylist(e),
|
|
113
|
+
...l
|
|
114
|
+
},
|
|
115
|
+
events: {
|
|
116
|
+
onReady: () => {
|
|
117
|
+
_ && this.player.setLoop(!0), this.props.onReady();
|
|
118
|
+
},
|
|
119
|
+
onPlaybackRateChange: (i) => this.props.onPlaybackRateChange(i.data),
|
|
120
|
+
onPlaybackQualityChange: (i) => this.props.onPlaybackQualityChange(i),
|
|
121
|
+
onStateChange: this.onStateChange,
|
|
122
|
+
onError: (i) => y(i.data)
|
|
123
|
+
},
|
|
124
|
+
host: Q.test(e) ? Z : void 0,
|
|
125
|
+
...d
|
|
126
|
+
}));
|
|
127
|
+
}, y), d.events && console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause");
|
|
128
|
+
}
|
|
129
|
+
play() {
|
|
130
|
+
this.callPlayer("playVideo");
|
|
131
|
+
}
|
|
132
|
+
pause() {
|
|
133
|
+
this.callPlayer("pauseVideo");
|
|
134
|
+
}
|
|
135
|
+
stop() {
|
|
136
|
+
document.body.contains(this.callPlayer("getIframe")) && this.callPlayer("stopVideo");
|
|
137
|
+
}
|
|
138
|
+
seekTo(e, t = !1) {
|
|
139
|
+
this.callPlayer("seekTo", e), !t && !this.props.playing && this.pause();
|
|
140
|
+
}
|
|
141
|
+
setVolume(e) {
|
|
142
|
+
this.callPlayer("setVolume", e * 100);
|
|
143
|
+
}
|
|
144
|
+
setPlaybackRate(e) {
|
|
145
|
+
this.callPlayer("setPlaybackRate", e);
|
|
146
|
+
}
|
|
147
|
+
setLoop(e) {
|
|
148
|
+
this.callPlayer("setLoop", e);
|
|
149
|
+
}
|
|
150
|
+
getDuration() {
|
|
151
|
+
return this.callPlayer("getDuration");
|
|
152
|
+
}
|
|
153
|
+
getCurrentTime() {
|
|
154
|
+
return this.callPlayer("getCurrentTime");
|
|
155
|
+
}
|
|
156
|
+
getSecondsLoaded() {
|
|
157
|
+
return this.callPlayer("getVideoLoadedFraction") * this.getDuration();
|
|
158
|
+
}
|
|
159
|
+
render() {
|
|
160
|
+
const { display: e } = this.props, t = {
|
|
161
|
+
width: "100%",
|
|
162
|
+
height: "100%",
|
|
163
|
+
display: e
|
|
164
|
+
};
|
|
165
|
+
return /* @__PURE__ */ m.default.createElement("div", { style: t }, /* @__PURE__ */ m.default.createElement("div", { ref: this.ref }));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
s(O, "displayName", "YouTube");
|
|
169
|
+
s(O, "canPlay", D.canPlay.youtube);
|
|
170
|
+
const $ = /* @__PURE__ */ U(S), X = /* @__PURE__ */ Y({
|
|
171
|
+
__proto__: null,
|
|
172
|
+
default: $
|
|
173
|
+
}, [S]);
|
|
174
|
+
export {
|
|
175
|
+
X as Y
|
|
176
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { b as p, A as n, a as E, C as A, c, E as d, d as g, P as v, Q as V, V as C } from "./EventList-BM7sWeX5.mjs";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "@mui/material";
|
|
4
|
+
import "react";
|
|
5
|
+
import "@mui/styles";
|
|
6
|
+
import "./index-Dluh6sv-.mjs";
|
|
7
|
+
import "react-dom";
|
|
8
|
+
import "@mui/system";
|
|
9
|
+
export {
|
|
10
|
+
p as AllEvent,
|
|
11
|
+
n as Article,
|
|
12
|
+
E as ArticleVodList,
|
|
13
|
+
A as ChallengeDetail,
|
|
14
|
+
c as EngagementHome,
|
|
15
|
+
d as EventDetail,
|
|
16
|
+
g as EventList,
|
|
17
|
+
v as Poll,
|
|
18
|
+
V as Quiz,
|
|
19
|
+
C as Vod
|
|
20
|
+
};
|