suada-components 1.8.0 → 1.9.1

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 (89) hide show
  1. package/dist/{components/DailyMotion-SZKPSpD1.js → DailyMotion-B-Q4fBEb.js} +1 -1
  2. package/dist/{components/DailyMotion-jrl4eEA1.esm.js → DailyMotion-BAvo3Toe.esm.js} +1 -1
  3. package/dist/{components/Facebook-Ha24RKIX.esm.js → Facebook-C8GOujDt.esm.js} +1 -1
  4. package/dist/{components/Facebook-DS0ye_bL.js → Facebook-CASik-P5.js} +1 -1
  5. package/dist/{components/FilePlayer-D-n083nK.esm.js → FilePlayer-BOZIvaDy.esm.js} +1 -1
  6. package/dist/{components/FilePlayer-B4_DDZXQ.js → FilePlayer-CQ80KWY2.js} +1 -1
  7. package/dist/{components/Kaltura-BlDrsjbp.esm.js → Kaltura-B12Xdl6X.esm.js} +1 -1
  8. package/dist/{components/Kaltura-DAMolg_c.js → Kaltura-nYc5k7UB.js} +1 -1
  9. package/dist/{components/Mixcloud-C1z9BVJ8.js → Mixcloud-DGQnlDAK.js} +1 -1
  10. package/dist/{components/Mixcloud-B5AIgf8e.esm.js → Mixcloud-JfeQIOki.esm.js} +1 -1
  11. package/dist/{components/Mux-f77ctQXE.esm.js → Mux-BHWzpAR-.esm.js} +1 -1
  12. package/dist/{components/Mux-Bgsc5vvM.js → Mux-CiKZc8gj.js} +1 -1
  13. package/dist/{components/Preview-DhMMn7e2.esm.js → Preview-DSovY9gr.esm.js} +1 -1
  14. package/dist/{components/Preview-CKXk6Axz.js → Preview-DvZKrgm5.js} +1 -1
  15. package/dist/{components/SoundCloud-DHLHmaaB.js → SoundCloud-Di7z3nmP.js} +1 -1
  16. package/dist/{components/SoundCloud-DyYFhGe5.esm.js → SoundCloud-j_R0lK8D.esm.js} +1 -1
  17. package/dist/{components/Streamable-BBygdIqb.esm.js → Streamable-CRhXZIKP.esm.js} +1 -1
  18. package/dist/{components/Streamable-BDhbB3m3.js → Streamable-CV1mgzRv.js} +1 -1
  19. package/dist/{components/Twitch-CAbFCb5f.esm.js → Twitch-6icfp-ZE.esm.js} +1 -1
  20. package/dist/{components/Twitch-ZG7WuoXD.js → Twitch-Dj66vkCD.js} +1 -1
  21. package/dist/{components/Vidyard-BsU5Ayr6.esm.js → Vidyard--KX47pZ0.esm.js} +1 -1
  22. package/dist/{components/Vidyard-CkSCnLg5.js → Vidyard-B-qmApe9.js} +1 -1
  23. package/dist/{components/Vimeo-4uslT7bX.esm.js → Vimeo-Ba9C6utC.esm.js} +1 -1
  24. package/dist/{components/Vimeo-DKpnTiZ8.js → Vimeo-DePzl7Sn.js} +1 -1
  25. package/dist/{components/Wistia-DKdMEz2a.js → Wistia-CXYB3Yus.js} +1 -1
  26. package/dist/{components/Wistia-BxvIPVO7.esm.js → Wistia-DWJcdcY2.esm.js} +1 -1
  27. package/dist/{components/YouTube-Cd4b1iuA.esm.js → YouTube-DdBVPxzz.esm.js} +1 -1
  28. package/dist/{components/YouTube-JSWV2_hs.js → YouTube-vwMoW93C.js} +1 -1
  29. package/dist/components/CourseCard/CourseCard.styles.d.ts +1 -1
  30. package/dist/components/DailyMotion-Cr_8IZRR.js +180 -0
  31. package/dist/components/DailyMotion-D2n1NDDi.esm.js +178 -0
  32. package/dist/components/Facebook-CDrTA2_L.esm.js +179 -0
  33. package/dist/components/Facebook-YxZce26V.js +181 -0
  34. package/dist/components/FilePlayer-BzkVMbQ8.esm.js +408 -0
  35. package/dist/components/FilePlayer-DqqTufgX.js +410 -0
  36. package/dist/components/Kaltura-B0UZLr6g.esm.js +176 -0
  37. package/dist/components/Kaltura-krSxvIBr.js +178 -0
  38. package/dist/components/Mixcloud-BCT5e47d.js +166 -0
  39. package/dist/components/Mixcloud-D9qk3D6i.esm.js +164 -0
  40. package/dist/components/Mux-BZleoaJh.esm.js +264 -0
  41. package/dist/components/Mux-D_si09u2.js +266 -0
  42. package/dist/components/Preview-CmduMeEZ.js +175 -0
  43. package/dist/components/Preview-DQLbQ8_C.esm.js +173 -0
  44. package/dist/components/SoundCloud-BHgTfaW7.js +183 -0
  45. package/dist/components/SoundCloud-BgnX8kOF.esm.js +181 -0
  46. package/dist/components/Streamable-DTAzjVwd.js +176 -0
  47. package/dist/components/Streamable-DbRbUflP.esm.js +174 -0
  48. package/dist/components/Twitch-CXOhay4a.esm.js +168 -0
  49. package/dist/components/Twitch-CnEk-l9R.js +170 -0
  50. package/dist/components/VideoPlayer/PiPContext.d.ts +8 -0
  51. package/dist/components/VideoPlayer/PiPContext.js +149 -0
  52. package/dist/components/VideoPlayer/PiPContext.js.map +1 -0
  53. package/dist/components/VideoPlayer/PiPContext.types.d.ts +16 -0
  54. package/dist/components/VideoPlayer/PiPContext.types.js +2 -0
  55. package/dist/components/VideoPlayer/PiPContext.types.js.map +1 -0
  56. package/dist/components/VideoPlayer/usePiP.d.ts +2 -0
  57. package/dist/components/VideoPlayer/usePiP.js +10 -0
  58. package/dist/components/VideoPlayer/usePiP.js.map +1 -0
  59. package/dist/components/Vidyard-Cn_LcGwi.js +174 -0
  60. package/dist/components/Vidyard-YcZH6kkW.esm.js +172 -0
  61. package/dist/components/Vimeo-BUVxWt7t.js +215 -0
  62. package/dist/components/Vimeo-Cv0qx3aR.esm.js +213 -0
  63. package/dist/components/Wistia-COWrV8QC.js +190 -0
  64. package/dist/components/Wistia-PneZ48dn.esm.js +188 -0
  65. package/dist/components/YouTube-BUyvzJQw.esm.js +258 -0
  66. package/dist/components/YouTube-DeQdfkWm.js +260 -0
  67. package/dist/components/components/CourseCard/CourseCard.styles.d.ts +1 -1
  68. package/dist/components/components/VideoPlayer/PiPContext.d.ts +8 -0
  69. package/dist/components/components/VideoPlayer/PiPContext.types.d.ts +16 -0
  70. package/dist/components/components/VideoPlayer/usePiP.d.ts +2 -0
  71. package/dist/components/components/index.d.ts +2 -0
  72. package/dist/components/{index-XiB9Yp2-.js → index-Bs-XxxV4.js} +141 -14
  73. package/dist/components/{index-BTR541gv.esm.js → index-C4Mk2H3N.esm.js} +140 -15
  74. package/dist/components/index.d.ts +2 -0
  75. package/dist/components/index.esm.js +1 -1
  76. package/dist/components/index.js +2 -0
  77. package/dist/components/index.js.map +1 -1
  78. package/dist/icons/components/CourseCard/CourseCard.styles.d.ts +1 -1
  79. package/dist/icons/components/VideoPlayer/PiPContext.d.ts +8 -0
  80. package/dist/icons/components/VideoPlayer/PiPContext.types.d.ts +16 -0
  81. package/dist/icons/components/VideoPlayer/usePiP.d.ts +2 -0
  82. package/dist/icons/components/index.d.ts +2 -0
  83. package/dist/index-Bp-idbg5.esm.js +94907 -0
  84. package/dist/index-CSj9NYxJ.js +95129 -0
  85. package/dist/index.d.ts +2 -0
  86. package/dist/index.esm.js +3 -3
  87. package/dist/index.js +3 -0
  88. package/dist/index.js.map +1 -1
  89. package/package.json +1 -1
@@ -0,0 +1,179 @@
1
+ import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-C4Mk2H3N.esm.js';
2
+ import React__default from 'react';
3
+
4
+ function _mergeNamespaces(n, m) {
5
+ m.forEach(function (e) {
6
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
7
+ if (k !== 'default' && !(k in n)) {
8
+ var d = Object.getOwnPropertyDescriptor(e, k);
9
+ Object.defineProperty(n, k, d.get ? d : {
10
+ enumerable: true,
11
+ get: function () { return e[k]; }
12
+ });
13
+ }
14
+ });
15
+ });
16
+ return Object.freeze(n);
17
+ }
18
+
19
+ var Facebook_1;
20
+ var hasRequiredFacebook;
21
+
22
+ function requireFacebook () {
23
+ if (hasRequiredFacebook) return Facebook_1;
24
+ hasRequiredFacebook = 1;
25
+ var __create = Object.create;
26
+ var __defProp = Object.defineProperty;
27
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
28
+ var __getOwnPropNames = Object.getOwnPropertyNames;
29
+ var __getProtoOf = Object.getPrototypeOf;
30
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
31
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32
+ var __export = (target, all) => {
33
+ for (var name in all)
34
+ __defProp(target, name, { get: all[name], enumerable: true });
35
+ };
36
+ var __copyProps = (to, from, except, desc) => {
37
+ if (from && typeof from === "object" || typeof from === "function") {
38
+ for (let key of __getOwnPropNames(from))
39
+ if (!__hasOwnProp.call(to, key) && key !== except)
40
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
41
+ }
42
+ return to;
43
+ };
44
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
45
+ // If the importer is in node compatibility mode or this is not an ESM
46
+ // file that has been converted to a CommonJS file using a Babel-
47
+ // compatible transform (i.e. "__esModule" has not been set), then set
48
+ // "default" to the CommonJS "module.exports" for node compatibility.
49
+ !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
50
+ mod
51
+ ));
52
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
53
+ var __publicField = (obj, key, value) => {
54
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
55
+ return value;
56
+ };
57
+ var Facebook_exports = {};
58
+ __export(Facebook_exports, {
59
+ default: () => Facebook
60
+ });
61
+ Facebook_1 = __toCommonJS(Facebook_exports);
62
+ var import_react = __toESM(React__default);
63
+ var import_utils = /*@__PURE__*/ requireUtils();
64
+ var import_patterns = /*@__PURE__*/ requirePatterns();
65
+ const SDK_URL = "https://connect.facebook.net/en_US/sdk.js";
66
+ const SDK_GLOBAL = "FB";
67
+ const SDK_GLOBAL_READY = "fbAsyncInit";
68
+ const PLAYER_ID_PREFIX = "facebook-player-";
69
+ class Facebook extends import_react.Component {
70
+ constructor() {
71
+ super(...arguments);
72
+ __publicField(this, "callPlayer", import_utils.callPlayer);
73
+ __publicField(this, "playerID", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);
74
+ __publicField(this, "mute", () => {
75
+ this.callPlayer("mute");
76
+ });
77
+ __publicField(this, "unmute", () => {
78
+ this.callPlayer("unmute");
79
+ });
80
+ }
81
+ componentDidMount() {
82
+ this.props.onMount && this.props.onMount(this);
83
+ }
84
+ load(url, isReady) {
85
+ if (isReady) {
86
+ (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => FB.XFBML.parse());
87
+ return;
88
+ }
89
+ (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => {
90
+ FB.init({
91
+ appId: this.props.config.appId,
92
+ xfbml: true,
93
+ version: this.props.config.version
94
+ });
95
+ FB.Event.subscribe("xfbml.render", (msg) => {
96
+ this.props.onLoaded();
97
+ });
98
+ FB.Event.subscribe("xfbml.ready", (msg) => {
99
+ if (msg.type === "video" && msg.id === this.playerID) {
100
+ this.player = msg.instance;
101
+ this.player.subscribe("startedPlaying", this.props.onPlay);
102
+ this.player.subscribe("paused", this.props.onPause);
103
+ this.player.subscribe("finishedPlaying", this.props.onEnded);
104
+ this.player.subscribe("startedBuffering", this.props.onBuffer);
105
+ this.player.subscribe("finishedBuffering", this.props.onBufferEnd);
106
+ this.player.subscribe("error", this.props.onError);
107
+ if (this.props.muted) {
108
+ this.callPlayer("mute");
109
+ } else {
110
+ this.callPlayer("unmute");
111
+ }
112
+ this.props.onReady();
113
+ document.getElementById(this.playerID).querySelector("iframe").style.visibility = "visible";
114
+ }
115
+ });
116
+ });
117
+ }
118
+ play() {
119
+ this.callPlayer("play");
120
+ }
121
+ pause() {
122
+ this.callPlayer("pause");
123
+ }
124
+ stop() {
125
+ }
126
+ seekTo(seconds, keepPlaying = true) {
127
+ this.callPlayer("seek", seconds);
128
+ if (!keepPlaying) {
129
+ this.pause();
130
+ }
131
+ }
132
+ setVolume(fraction) {
133
+ this.callPlayer("setVolume", fraction);
134
+ }
135
+ getDuration() {
136
+ return this.callPlayer("getDuration");
137
+ }
138
+ getCurrentTime() {
139
+ return this.callPlayer("getCurrentPosition");
140
+ }
141
+ getSecondsLoaded() {
142
+ return null;
143
+ }
144
+ render() {
145
+ const { attributes } = this.props.config;
146
+ const style = {
147
+ width: "100%",
148
+ height: "100%"
149
+ };
150
+ return /* @__PURE__ */ import_react.default.createElement(
151
+ "div",
152
+ {
153
+ style,
154
+ id: this.playerID,
155
+ className: "fb-video",
156
+ "data-href": this.props.url,
157
+ "data-autoplay": this.props.playing ? "true" : "false",
158
+ "data-allowfullscreen": "true",
159
+ "data-controls": this.props.controls ? "true" : "false",
160
+ ...attributes
161
+ }
162
+ );
163
+ }
164
+ }
165
+ __publicField(Facebook, "displayName", "Facebook");
166
+ __publicField(Facebook, "canPlay", import_patterns.canPlay.facebook);
167
+ __publicField(Facebook, "loopOnEnded", true);
168
+ return Facebook_1;
169
+ }
170
+
171
+ var FacebookExports = /*@__PURE__*/ requireFacebook();
172
+ var Facebook = /*@__PURE__*/getDefaultExportFromCjs(FacebookExports);
173
+
174
+ var Facebook$1 = /*#__PURE__*/_mergeNamespaces({
175
+ __proto__: null,
176
+ default: Facebook
177
+ }, [FacebookExports]);
178
+
179
+ export { Facebook$1 as F };
@@ -0,0 +1,181 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-Bs-XxxV4.js');
4
+ var React = require('react');
5
+
6
+ function _mergeNamespaces(n, m) {
7
+ m.forEach(function (e) {
8
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default' && !(k in n)) {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ });
18
+ return Object.freeze(n);
19
+ }
20
+
21
+ var Facebook_1;
22
+ var hasRequiredFacebook;
23
+
24
+ function requireFacebook () {
25
+ if (hasRequiredFacebook) return Facebook_1;
26
+ hasRequiredFacebook = 1;
27
+ var __create = Object.create;
28
+ var __defProp = Object.defineProperty;
29
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
30
+ var __getOwnPropNames = Object.getOwnPropertyNames;
31
+ var __getProtoOf = Object.getPrototypeOf;
32
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
33
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34
+ var __export = (target, all) => {
35
+ for (var name in all)
36
+ __defProp(target, name, { get: all[name], enumerable: true });
37
+ };
38
+ var __copyProps = (to, from, except, desc) => {
39
+ if (from && typeof from === "object" || typeof from === "function") {
40
+ for (let key of __getOwnPropNames(from))
41
+ if (!__hasOwnProp.call(to, key) && key !== except)
42
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
+ }
44
+ return to;
45
+ };
46
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
47
+ // If the importer is in node compatibility mode or this is not an ESM
48
+ // file that has been converted to a CommonJS file using a Babel-
49
+ // compatible transform (i.e. "__esModule" has not been set), then set
50
+ // "default" to the CommonJS "module.exports" for node compatibility.
51
+ !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
52
+ mod
53
+ ));
54
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
55
+ var __publicField = (obj, key, value) => {
56
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
57
+ return value;
58
+ };
59
+ var Facebook_exports = {};
60
+ __export(Facebook_exports, {
61
+ default: () => Facebook
62
+ });
63
+ Facebook_1 = __toCommonJS(Facebook_exports);
64
+ var import_react = __toESM(React);
65
+ var import_utils = /*@__PURE__*/ index.requireUtils();
66
+ var import_patterns = /*@__PURE__*/ index.requirePatterns();
67
+ const SDK_URL = "https://connect.facebook.net/en_US/sdk.js";
68
+ const SDK_GLOBAL = "FB";
69
+ const SDK_GLOBAL_READY = "fbAsyncInit";
70
+ const PLAYER_ID_PREFIX = "facebook-player-";
71
+ class Facebook extends import_react.Component {
72
+ constructor() {
73
+ super(...arguments);
74
+ __publicField(this, "callPlayer", import_utils.callPlayer);
75
+ __publicField(this, "playerID", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);
76
+ __publicField(this, "mute", () => {
77
+ this.callPlayer("mute");
78
+ });
79
+ __publicField(this, "unmute", () => {
80
+ this.callPlayer("unmute");
81
+ });
82
+ }
83
+ componentDidMount() {
84
+ this.props.onMount && this.props.onMount(this);
85
+ }
86
+ load(url, isReady) {
87
+ if (isReady) {
88
+ (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => FB.XFBML.parse());
89
+ return;
90
+ }
91
+ (0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => {
92
+ FB.init({
93
+ appId: this.props.config.appId,
94
+ xfbml: true,
95
+ version: this.props.config.version
96
+ });
97
+ FB.Event.subscribe("xfbml.render", (msg) => {
98
+ this.props.onLoaded();
99
+ });
100
+ FB.Event.subscribe("xfbml.ready", (msg) => {
101
+ if (msg.type === "video" && msg.id === this.playerID) {
102
+ this.player = msg.instance;
103
+ this.player.subscribe("startedPlaying", this.props.onPlay);
104
+ this.player.subscribe("paused", this.props.onPause);
105
+ this.player.subscribe("finishedPlaying", this.props.onEnded);
106
+ this.player.subscribe("startedBuffering", this.props.onBuffer);
107
+ this.player.subscribe("finishedBuffering", this.props.onBufferEnd);
108
+ this.player.subscribe("error", this.props.onError);
109
+ if (this.props.muted) {
110
+ this.callPlayer("mute");
111
+ } else {
112
+ this.callPlayer("unmute");
113
+ }
114
+ this.props.onReady();
115
+ document.getElementById(this.playerID).querySelector("iframe").style.visibility = "visible";
116
+ }
117
+ });
118
+ });
119
+ }
120
+ play() {
121
+ this.callPlayer("play");
122
+ }
123
+ pause() {
124
+ this.callPlayer("pause");
125
+ }
126
+ stop() {
127
+ }
128
+ seekTo(seconds, keepPlaying = true) {
129
+ this.callPlayer("seek", seconds);
130
+ if (!keepPlaying) {
131
+ this.pause();
132
+ }
133
+ }
134
+ setVolume(fraction) {
135
+ this.callPlayer("setVolume", fraction);
136
+ }
137
+ getDuration() {
138
+ return this.callPlayer("getDuration");
139
+ }
140
+ getCurrentTime() {
141
+ return this.callPlayer("getCurrentPosition");
142
+ }
143
+ getSecondsLoaded() {
144
+ return null;
145
+ }
146
+ render() {
147
+ const { attributes } = this.props.config;
148
+ const style = {
149
+ width: "100%",
150
+ height: "100%"
151
+ };
152
+ return /* @__PURE__ */ import_react.default.createElement(
153
+ "div",
154
+ {
155
+ style,
156
+ id: this.playerID,
157
+ className: "fb-video",
158
+ "data-href": this.props.url,
159
+ "data-autoplay": this.props.playing ? "true" : "false",
160
+ "data-allowfullscreen": "true",
161
+ "data-controls": this.props.controls ? "true" : "false",
162
+ ...attributes
163
+ }
164
+ );
165
+ }
166
+ }
167
+ __publicField(Facebook, "displayName", "Facebook");
168
+ __publicField(Facebook, "canPlay", import_patterns.canPlay.facebook);
169
+ __publicField(Facebook, "loopOnEnded", true);
170
+ return Facebook_1;
171
+ }
172
+
173
+ var FacebookExports = /*@__PURE__*/ requireFacebook();
174
+ var Facebook = /*@__PURE__*/index.getDefaultExportFromCjs(FacebookExports);
175
+
176
+ var Facebook$1 = /*#__PURE__*/_mergeNamespaces({
177
+ __proto__: null,
178
+ default: Facebook
179
+ }, [FacebookExports]);
180
+
181
+ exports.Facebook = Facebook$1;