@ilo-org/react 0.10.5 → 0.11.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.
Files changed (195) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/cjs/AccordionCtx-be704051.js +9 -0
  3. package/lib/cjs/{GlobalCtx-97e4b433.js → GlobalCtx-10114bdd.js} +2 -2
  4. package/lib/cjs/ListCtx-14aa546f.js +9 -0
  5. package/lib/cjs/TagCtx-690a1d54.js +7 -0
  6. package/lib/cjs/components/Accordion/Accordion.js +6 -6
  7. package/lib/cjs/components/Accordion/AccordionButton.js +5 -5
  8. package/lib/cjs/components/Accordion/AccordionItem.js +2 -2
  9. package/lib/cjs/components/Accordion/AccordionPanel.js +8 -8
  10. package/lib/cjs/components/Accordion/index.js +2 -2
  11. package/lib/cjs/components/Breadcrumb/Breadcrumb.js +5 -5
  12. package/lib/cjs/components/Breadcrumb/index.js +1 -1
  13. package/lib/cjs/components/Button/Button.js +1 -1
  14. package/lib/cjs/components/Button/index.js +1 -1
  15. package/lib/cjs/components/Callout/Callout.js +4 -4
  16. package/lib/cjs/components/Callout/index.js +1 -1
  17. package/lib/cjs/components/Card/Card.js +2 -2
  18. package/lib/cjs/components/Card/CardGroup.js +2 -2
  19. package/lib/cjs/components/Card/index.js +2 -2
  20. package/lib/cjs/components/Checkbox/Checkbox.js +5 -5
  21. package/lib/cjs/components/Checkbox/index.js +1 -1
  22. package/lib/cjs/components/Collapse/Collapse.js +1194 -44
  23. package/lib/cjs/components/Collapse/index.js +0 -1
  24. package/lib/cjs/components/ContextMenu/ContextMenu.js +1 -1
  25. package/lib/cjs/components/ContextMenu/index.js +1 -1
  26. package/lib/cjs/components/Credit/Credit.js +3 -3
  27. package/lib/cjs/components/Credit/index.js +1 -1
  28. package/lib/cjs/components/DatePicker/DatePicker.js +4 -4
  29. package/lib/cjs/components/DatePicker/index.js +1 -1
  30. package/lib/cjs/components/Dropdown/Dropdown.js +5 -5
  31. package/lib/cjs/components/Dropdown/index.js +1 -1
  32. package/lib/cjs/components/Empty/Empty.js +1 -1
  33. package/lib/cjs/components/Empty/index.js +1 -1
  34. package/lib/cjs/components/Fieldset/Fieldset.js +5 -5
  35. package/lib/cjs/components/Fieldset/index.js +1 -1
  36. package/lib/cjs/components/FileUpload/FileUpload.js +5 -5
  37. package/lib/cjs/components/FileUpload/index.js +1 -1
  38. package/lib/cjs/components/Footer/Footer.js +1 -1
  39. package/lib/cjs/components/Footer/index.js +1 -1
  40. package/lib/cjs/components/Form/Form.js +3 -3
  41. package/lib/cjs/components/Form/index.js +1 -1
  42. package/lib/cjs/components/FormControl/FormControl.js +7 -7
  43. package/lib/cjs/components/FormControl/index.js +1 -1
  44. package/lib/cjs/components/GlobalProvider/GlobalProvider.js +1 -1
  45. package/lib/cjs/components/GlobalProvider/index.js +1 -1
  46. package/lib/cjs/components/Heading/Heading.js +1 -1
  47. package/lib/cjs/components/Heading/index.js +1 -1
  48. package/lib/cjs/components/Hero/Hero.js +1 -1
  49. package/lib/cjs/components/Hero/HeroCard.js +1 -1
  50. package/lib/cjs/components/Hero/index.js +1 -1
  51. package/lib/cjs/components/Icon/Icon.js +3 -3
  52. package/lib/cjs/components/Icon/index.js +1 -1
  53. package/lib/cjs/components/Image/Image.js +1 -1
  54. package/lib/cjs/components/Image/index.js +1 -1
  55. package/lib/cjs/components/Input/Input.js +3 -3
  56. package/lib/cjs/components/Input/index.js +1 -1
  57. package/lib/cjs/components/Link/Link.js +1 -1
  58. package/lib/cjs/components/Link/index.js +1 -1
  59. package/lib/cjs/components/LinkList/LinkList.js +1 -1
  60. package/lib/cjs/components/LinkList/index.js +1 -1
  61. package/lib/cjs/components/List/List.js +4 -4
  62. package/lib/cjs/components/List/ListItem.js +2 -2
  63. package/lib/cjs/components/List/index.js +2 -2
  64. package/lib/cjs/components/Loading/Loading.js +1 -1
  65. package/lib/cjs/components/Loading/index.js +1 -1
  66. package/lib/cjs/components/LocalNav/LocalNav.js +4 -4
  67. package/lib/cjs/components/LocalNav/index.js +1 -1
  68. package/lib/cjs/components/Logo/Logo.js +15 -15
  69. package/lib/cjs/components/Logo/index.js +1 -1
  70. package/lib/cjs/components/LogoGrid/LogoGrid.js +1 -1
  71. package/lib/cjs/components/LogoGrid/index.js +1 -1
  72. package/lib/cjs/components/Navigation/Navigation.js +8 -6
  73. package/lib/cjs/components/Navigation/index.js +3 -1
  74. package/lib/cjs/components/Notification/Notification.js +3 -3
  75. package/lib/cjs/components/Notification/index.js +1 -1
  76. package/lib/cjs/components/NumberPicker/NumberPicker.js +4 -4
  77. package/lib/cjs/components/NumberPicker/index.js +1 -1
  78. package/lib/cjs/components/Pagination/Pagination.js +1 -1
  79. package/lib/cjs/components/Pagination/index.js +1 -1
  80. package/lib/cjs/components/Profile/Profile.js +1 -1
  81. package/lib/cjs/components/Profile/index.js +1 -1
  82. package/lib/cjs/components/Radio/Radio.js +5 -5
  83. package/lib/cjs/components/Radio/index.js +1 -1
  84. package/lib/cjs/components/ReadMore/ReadMore.js +4 -4
  85. package/lib/cjs/components/ReadMore/index.js +1 -1
  86. package/lib/cjs/components/RichText/RichText.js +1 -1
  87. package/lib/cjs/components/RichText/index.js +1 -1
  88. package/lib/cjs/components/SearchField/SearchField.js +16 -6
  89. package/lib/cjs/components/SearchField/index.js +4 -2
  90. package/lib/cjs/components/SocialMedia/SocialMedia.js +1 -1
  91. package/lib/cjs/components/SocialMedia/index.js +1 -1
  92. package/lib/cjs/components/TableOfContents/TableOfContents.js +1 -1
  93. package/lib/cjs/components/TableOfContents/index.js +1 -1
  94. package/lib/cjs/components/Tabs/Tabs.args.js +156 -0
  95. package/lib/cjs/components/Tabs/Tabs.js +24 -0
  96. package/lib/cjs/components/Tabs/index.js +15 -0
  97. package/lib/cjs/components/Tag/Tag.js +4 -4
  98. package/lib/cjs/components/Tag/TagSet.js +6 -6
  99. package/lib/cjs/components/Tag/index.js +2 -2
  100. package/lib/cjs/components/TextInput/TextInput.js +4 -4
  101. package/lib/cjs/components/TextInput/index.js +1 -1
  102. package/lib/cjs/components/Textarea/Textarea.js +4 -4
  103. package/lib/cjs/components/Textarea/index.js +1 -1
  104. package/lib/cjs/components/Toggle/Toggle.js +4 -4
  105. package/lib/cjs/components/Toggle/index.js +1 -1
  106. package/lib/cjs/components/Tooltip/Tooltip.js +5 -5
  107. package/lib/cjs/components/Tooltip/index.js +1 -1
  108. package/lib/cjs/components/Video/Video.js +11 -12
  109. package/lib/cjs/components/Video/VideoPlayer.js +55 -13
  110. package/lib/cjs/components/Video/index.js +6 -8
  111. package/lib/cjs/components/index.js +9 -8
  112. package/lib/cjs/hooks/index.js +1 -1
  113. package/lib/cjs/hooks/useGlobalSettings.js +3 -3
  114. package/lib/cjs/hooks/usePrevious.js +3 -3
  115. package/lib/cjs/hooks/useVideoPlayer.js +7 -7
  116. package/lib/cjs/index.js +9 -8
  117. package/lib/esm/components/Collapse/Collapse.js +1156 -6
  118. package/lib/esm/components/Collapse/index.js +0 -1
  119. package/lib/esm/components/FileUpload/FileUpload.js +3 -3
  120. package/lib/esm/components/Input/Input.js +2 -2
  121. package/lib/esm/components/Navigation/Navigation.js +2 -0
  122. package/lib/esm/components/Navigation/index.js +2 -0
  123. package/lib/esm/components/NumberPicker/NumberPicker.js +3 -3
  124. package/lib/esm/components/Radio/Radio.js +3 -3
  125. package/lib/esm/components/SearchField/SearchField.js +15 -5
  126. package/lib/esm/components/SearchField/index.js +3 -1
  127. package/lib/esm/components/Tabs/Tabs.args.js +154 -0
  128. package/lib/esm/components/Tabs/Tabs.js +22 -0
  129. package/lib/esm/components/Tabs/index.js +9 -0
  130. package/lib/esm/components/TextInput/TextInput.js +3 -3
  131. package/lib/esm/components/Textarea/Textarea.js +3 -3
  132. package/lib/esm/components/Video/Video.js +10 -11
  133. package/lib/esm/components/Video/VideoPlayer.js +57 -11
  134. package/lib/esm/components/Video/index.js +5 -7
  135. package/lib/esm/components/index.js +4 -4
  136. package/lib/esm/index.js +4 -4
  137. package/lib/types/react/src/components/Input/Input.props.d.ts +1 -0
  138. package/lib/types/react/src/components/Tabs/Tabs.args.d.ts +10 -0
  139. package/lib/types/react/src/components/Tabs/Tabs.d.ts +4 -0
  140. package/lib/types/react/src/components/Tabs/Tabs.props.d.ts +12 -0
  141. package/lib/types/react/src/components/Tabs/index.d.ts +1 -0
  142. package/lib/types/react/src/components/Video/Video.d.ts +2 -2
  143. package/lib/types/react/src/components/Video/Video.props.d.ts +5 -43
  144. package/lib/types/react/src/components/Video/VideoPlayer.d.ts +3 -3
  145. package/lib/types/react/src/components/Video/VideoPlayer.props.d.ts +6 -31
  146. package/lib/types/react/src/components/index.d.ts +1 -0
  147. package/package.json +6 -4
  148. package/src/components/Input/Input.props.ts +2 -0
  149. package/src/components/Input/Input.tsx +2 -0
  150. package/src/components/SearchField/SearchField.args.ts +5 -0
  151. package/src/components/SearchField/SearchField.tsx +38 -16
  152. package/src/components/Tabs/Tabs.args.tsx +201 -0
  153. package/src/components/Tabs/Tabs.props.ts +13 -0
  154. package/src/components/Tabs/Tabs.tsx +60 -0
  155. package/src/components/Tabs/index.ts +1 -0
  156. package/src/components/Video/Video.args.ts +18 -24
  157. package/src/components/Video/Video.props.ts +5 -47
  158. package/src/components/Video/Video.tsx +24 -19
  159. package/src/components/Video/VideoPlayer.props.ts +7 -38
  160. package/src/components/Video/VideoPlayer.tsx +67 -322
  161. package/src/components/index.ts +1 -0
  162. package/src/declarations.d.ts +22 -0
  163. package/lib/cjs/AccordionCtx-fe08ff45.js +0 -9
  164. package/lib/cjs/DailyMotion-17b56ecb.js +0 -259
  165. package/lib/cjs/Facebook-0c8d86ee.js +0 -239
  166. package/lib/cjs/FilePlayer-01d6dc08.js +0 -596
  167. package/lib/cjs/Kaltura-40e8e581.js +0 -235
  168. package/lib/cjs/ListCtx-7db7fe04.js +0 -9
  169. package/lib/cjs/Mixcloud-e23f49d6.js +0 -222
  170. package/lib/cjs/Preview-8e490f54.js +0 -227
  171. package/lib/cjs/SoundCloud-2500b6cb.js +0 -249
  172. package/lib/cjs/Streamable-00723065.js +0 -234
  173. package/lib/cjs/TagCtx-929c7753.js +0 -7
  174. package/lib/cjs/Twitch-2c5c5733.js +0 -244
  175. package/lib/cjs/VideoPlayer-5f0a64c6.js +0 -2067
  176. package/lib/cjs/Vidyard-d36d6c45.js +0 -237
  177. package/lib/cjs/Vimeo-d311e3b8.js +0 -285
  178. package/lib/cjs/Wistia-318b4e43.js +0 -288
  179. package/lib/cjs/YouTube-a3796a55.js +0 -377
  180. package/lib/cjs/index-0af02e81.js +0 -1154
  181. package/lib/esm/DailyMotion-989c2db3.js +0 -257
  182. package/lib/esm/Facebook-04e9cc59.js +0 -237
  183. package/lib/esm/FilePlayer-0789336d.js +0 -594
  184. package/lib/esm/Kaltura-a9ed37a9.js +0 -233
  185. package/lib/esm/Mixcloud-5a3b4353.js +0 -220
  186. package/lib/esm/Preview-7ca1835e.js +0 -225
  187. package/lib/esm/SoundCloud-47bccd79.js +0 -247
  188. package/lib/esm/Streamable-ee762126.js +0 -232
  189. package/lib/esm/Twitch-3cd4b54b.js +0 -242
  190. package/lib/esm/VideoPlayer-96c2b20c.js +0 -2062
  191. package/lib/esm/Vidyard-258ab0ef.js +0 -235
  192. package/lib/esm/Vimeo-4b29b580.js +0 -283
  193. package/lib/esm/Wistia-3cbce669.js +0 -286
  194. package/lib/esm/YouTube-db52da1c.js +0 -375
  195. package/lib/esm/index-623ce3f5.js +0 -1152
@@ -1,235 +0,0 @@
1
- import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-96c2b20c.js';
2
- import require$$0 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 Vidyard$2 = {};
20
-
21
- (function (exports) {
22
-
23
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
24
-
25
- Object.defineProperty(exports, "__esModule", {
26
- value: true
27
- });
28
- exports["default"] = void 0;
29
-
30
- var _react = _interopRequireWildcard(require$$0);
31
-
32
- var _utils = utils;
33
-
34
- var _patterns = patterns;
35
-
36
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
37
-
38
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
-
40
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
41
-
42
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
43
-
44
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
45
-
46
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
47
-
48
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
49
-
50
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
51
-
52
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
53
-
54
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
55
-
56
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
57
-
58
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
59
-
60
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
61
-
62
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
63
-
64
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
65
-
66
- var SDK_URL = 'https://play.vidyard.com/embed/v4.js';
67
- var SDK_GLOBAL = 'VidyardV4';
68
- var SDK_GLOBAL_READY = 'onVidyardAPI';
69
-
70
- var Vidyard = /*#__PURE__*/function (_Component) {
71
- _inherits(Vidyard, _Component);
72
-
73
- var _super = _createSuper(Vidyard);
74
-
75
- function Vidyard() {
76
- var _this;
77
-
78
- _classCallCheck(this, Vidyard);
79
-
80
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
81
- args[_key] = arguments[_key];
82
- }
83
-
84
- _this = _super.call.apply(_super, [this].concat(args));
85
-
86
- _defineProperty(_assertThisInitialized(_this), "callPlayer", _utils.callPlayer);
87
-
88
- _defineProperty(_assertThisInitialized(_this), "mute", function () {
89
- _this.setVolume(0);
90
- });
91
-
92
- _defineProperty(_assertThisInitialized(_this), "unmute", function () {
93
- if (_this.props.volume !== null) {
94
- _this.setVolume(_this.props.volume);
95
- }
96
- });
97
-
98
- _defineProperty(_assertThisInitialized(_this), "ref", function (container) {
99
- _this.container = container;
100
- });
101
-
102
- return _this;
103
- }
104
-
105
- _createClass(Vidyard, [{
106
- key: "componentDidMount",
107
- value: function componentDidMount() {
108
- this.props.onMount && this.props.onMount(this);
109
- }
110
- }, {
111
- key: "load",
112
- value: function load(url) {
113
- var _this2 = this;
114
-
115
- var _this$props = this.props,
116
- playing = _this$props.playing,
117
- config = _this$props.config,
118
- onError = _this$props.onError,
119
- onDuration = _this$props.onDuration;
120
- var id = url && url.match(_patterns.MATCH_URL_VIDYARD)[1];
121
-
122
- if (this.player) {
123
- this.stop();
124
- }
125
-
126
- (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then(function (Vidyard) {
127
- if (!_this2.container) return;
128
- Vidyard.api.addReadyListener(function (data, player) {
129
- if (_this2.player) {
130
- return;
131
- }
132
-
133
- _this2.player = player;
134
-
135
- _this2.player.on('ready', _this2.props.onReady);
136
-
137
- _this2.player.on('play', _this2.props.onPlay);
138
-
139
- _this2.player.on('pause', _this2.props.onPause);
140
-
141
- _this2.player.on('seek', _this2.props.onSeek);
142
-
143
- _this2.player.on('playerComplete', _this2.props.onEnded);
144
- }, id);
145
- Vidyard.api.renderPlayer(_objectSpread({
146
- uuid: id,
147
- container: _this2.container,
148
- autoplay: playing ? 1 : 0
149
- }, config.options));
150
- Vidyard.api.getPlayerMetadata(id).then(function (meta) {
151
- _this2.duration = meta.length_in_seconds;
152
- onDuration(meta.length_in_seconds);
153
- });
154
- }, onError);
155
- }
156
- }, {
157
- key: "play",
158
- value: function play() {
159
- this.callPlayer('play');
160
- }
161
- }, {
162
- key: "pause",
163
- value: function pause() {
164
- this.callPlayer('pause');
165
- }
166
- }, {
167
- key: "stop",
168
- value: function stop() {
169
- window.VidyardV4.api.destroyPlayer(this.player);
170
- }
171
- }, {
172
- key: "seekTo",
173
- value: function seekTo(amount) {
174
- this.callPlayer('seek', amount);
175
- }
176
- }, {
177
- key: "setVolume",
178
- value: function setVolume(fraction) {
179
- this.callPlayer('setVolume', fraction);
180
- }
181
- }, {
182
- key: "setPlaybackRate",
183
- value: function setPlaybackRate(rate) {
184
- this.callPlayer('setPlaybackSpeed', rate);
185
- }
186
- }, {
187
- key: "getDuration",
188
- value: function getDuration() {
189
- return this.duration;
190
- }
191
- }, {
192
- key: "getCurrentTime",
193
- value: function getCurrentTime() {
194
- return this.callPlayer('currentTime');
195
- }
196
- }, {
197
- key: "getSecondsLoaded",
198
- value: function getSecondsLoaded() {
199
- return null;
200
- }
201
- }, {
202
- key: "render",
203
- value: function render() {
204
- var display = this.props.display;
205
- var style = {
206
- width: '100%',
207
- height: '100%',
208
- display: display
209
- };
210
- return /*#__PURE__*/_react["default"].createElement("div", {
211
- style: style
212
- }, /*#__PURE__*/_react["default"].createElement("div", {
213
- ref: this.ref
214
- }));
215
- }
216
- }]);
217
-
218
- return Vidyard;
219
- }(_react.Component);
220
-
221
- exports["default"] = Vidyard;
222
-
223
- _defineProperty(Vidyard, "displayName", 'Vidyard');
224
-
225
- _defineProperty(Vidyard, "canPlay", _patterns.canPlay.vidyard);
226
- } (Vidyard$2));
227
-
228
- var Vidyard = /*@__PURE__*/getDefaultExportFromCjs(Vidyard$2);
229
-
230
- var Vidyard$1 = /*#__PURE__*/_mergeNamespaces({
231
- __proto__: null,
232
- default: Vidyard
233
- }, [Vidyard$2]);
234
-
235
- export { Vidyard$1 as V };
@@ -1,283 +0,0 @@
1
- import { g as getDefaultExportFromCjs, p as patterns, u as utils } from './VideoPlayer-96c2b20c.js';
2
- import require$$0 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 Vimeo$2 = {};
20
-
21
- (function (exports) {
22
-
23
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
24
-
25
- Object.defineProperty(exports, "__esModule", {
26
- value: true
27
- });
28
- exports["default"] = void 0;
29
-
30
- var _react = _interopRequireWildcard(require$$0);
31
-
32
- var _utils = utils;
33
-
34
- var _patterns = patterns;
35
-
36
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
37
-
38
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
-
40
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
41
-
42
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
43
-
44
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
45
-
46
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
47
-
48
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
49
-
50
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
51
-
52
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
53
-
54
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
55
-
56
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
57
-
58
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
59
-
60
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
61
-
62
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
63
-
64
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
65
-
66
- var SDK_URL = 'https://player.vimeo.com/api/player.js';
67
- var SDK_GLOBAL = 'Vimeo';
68
-
69
- var Vimeo = /*#__PURE__*/function (_Component) {
70
- _inherits(Vimeo, _Component);
71
-
72
- var _super = _createSuper(Vimeo);
73
-
74
- function Vimeo() {
75
- var _this;
76
-
77
- _classCallCheck(this, Vimeo);
78
-
79
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
80
- args[_key] = arguments[_key];
81
- }
82
-
83
- _this = _super.call.apply(_super, [this].concat(args));
84
-
85
- _defineProperty(_assertThisInitialized(_this), "callPlayer", _utils.callPlayer);
86
-
87
- _defineProperty(_assertThisInitialized(_this), "duration", null);
88
-
89
- _defineProperty(_assertThisInitialized(_this), "currentTime", null);
90
-
91
- _defineProperty(_assertThisInitialized(_this), "secondsLoaded", null);
92
-
93
- _defineProperty(_assertThisInitialized(_this), "mute", function () {
94
- _this.setVolume(0);
95
- });
96
-
97
- _defineProperty(_assertThisInitialized(_this), "unmute", function () {
98
- if (_this.props.volume !== null) {
99
- _this.setVolume(_this.props.volume);
100
- }
101
- });
102
-
103
- _defineProperty(_assertThisInitialized(_this), "ref", function (container) {
104
- _this.container = container;
105
- });
106
-
107
- return _this;
108
- }
109
-
110
- _createClass(Vimeo, [{
111
- key: "componentDidMount",
112
- value: function componentDidMount() {
113
- this.props.onMount && this.props.onMount(this);
114
- }
115
- }, {
116
- key: "load",
117
- value: function load(url) {
118
- var _this2 = this;
119
-
120
- this.duration = null;
121
- (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function (Vimeo) {
122
- if (!_this2.container) return;
123
- var _this2$props$config = _this2.props.config,
124
- playerOptions = _this2$props$config.playerOptions,
125
- title = _this2$props$config.title;
126
- _this2.player = new Vimeo.Player(_this2.container, _objectSpread({
127
- url: url,
128
- autoplay: _this2.props.playing,
129
- muted: _this2.props.muted,
130
- loop: _this2.props.loop,
131
- playsinline: _this2.props.playsinline,
132
- controls: _this2.props.controls
133
- }, playerOptions));
134
-
135
- _this2.player.ready().then(function () {
136
- var iframe = _this2.container.querySelector('iframe');
137
-
138
- iframe.style.width = '100%';
139
- iframe.style.height = '100%';
140
-
141
- if (title) {
142
- iframe.title = title;
143
- }
144
- })["catch"](_this2.props.onError);
145
-
146
- _this2.player.on('loaded', function () {
147
- _this2.props.onReady();
148
-
149
- _this2.refreshDuration();
150
- });
151
-
152
- _this2.player.on('play', function () {
153
- _this2.props.onPlay();
154
-
155
- _this2.refreshDuration();
156
- });
157
-
158
- _this2.player.on('pause', _this2.props.onPause);
159
-
160
- _this2.player.on('seeked', function (e) {
161
- return _this2.props.onSeek(e.seconds);
162
- });
163
-
164
- _this2.player.on('ended', _this2.props.onEnded);
165
-
166
- _this2.player.on('error', _this2.props.onError);
167
-
168
- _this2.player.on('timeupdate', function (_ref) {
169
- var seconds = _ref.seconds;
170
- _this2.currentTime = seconds;
171
- });
172
-
173
- _this2.player.on('progress', function (_ref2) {
174
- var seconds = _ref2.seconds;
175
- _this2.secondsLoaded = seconds;
176
- });
177
-
178
- _this2.player.on('bufferstart', _this2.props.onBuffer);
179
-
180
- _this2.player.on('bufferend', _this2.props.onBufferEnd);
181
- }, this.props.onError);
182
- }
183
- }, {
184
- key: "refreshDuration",
185
- value: function refreshDuration() {
186
- var _this3 = this;
187
-
188
- this.player.getDuration().then(function (duration) {
189
- _this3.duration = duration;
190
- });
191
- }
192
- }, {
193
- key: "play",
194
- value: function play() {
195
- var promise = this.callPlayer('play');
196
-
197
- if (promise) {
198
- promise["catch"](this.props.onError);
199
- }
200
- }
201
- }, {
202
- key: "pause",
203
- value: function pause() {
204
- this.callPlayer('pause');
205
- }
206
- }, {
207
- key: "stop",
208
- value: function stop() {
209
- this.callPlayer('unload');
210
- }
211
- }, {
212
- key: "seekTo",
213
- value: function seekTo(seconds) {
214
- this.callPlayer('setCurrentTime', seconds);
215
- }
216
- }, {
217
- key: "setVolume",
218
- value: function setVolume(fraction) {
219
- this.callPlayer('setVolume', fraction);
220
- }
221
- }, {
222
- key: "setLoop",
223
- value: function setLoop(loop) {
224
- this.callPlayer('setLoop', loop);
225
- }
226
- }, {
227
- key: "setPlaybackRate",
228
- value: function setPlaybackRate(rate) {
229
- this.callPlayer('setPlaybackRate', rate);
230
- }
231
- }, {
232
- key: "getDuration",
233
- value: function getDuration() {
234
- return this.duration;
235
- }
236
- }, {
237
- key: "getCurrentTime",
238
- value: function getCurrentTime() {
239
- return this.currentTime;
240
- }
241
- }, {
242
- key: "getSecondsLoaded",
243
- value: function getSecondsLoaded() {
244
- return this.secondsLoaded;
245
- }
246
- }, {
247
- key: "render",
248
- value: function render() {
249
- var display = this.props.display;
250
- var style = {
251
- width: '100%',
252
- height: '100%',
253
- overflow: 'hidden',
254
- display: display
255
- };
256
- return /*#__PURE__*/_react["default"].createElement("div", {
257
- key: this.props.url,
258
- ref: this.ref,
259
- style: style
260
- });
261
- }
262
- }]);
263
-
264
- return Vimeo;
265
- }(_react.Component);
266
-
267
- exports["default"] = Vimeo;
268
-
269
- _defineProperty(Vimeo, "displayName", 'Vimeo');
270
-
271
- _defineProperty(Vimeo, "canPlay", _patterns.canPlay.vimeo);
272
-
273
- _defineProperty(Vimeo, "forceLoad", true);
274
- } (Vimeo$2));
275
-
276
- var Vimeo = /*@__PURE__*/getDefaultExportFromCjs(Vimeo$2);
277
-
278
- var Vimeo$1 = /*#__PURE__*/_mergeNamespaces({
279
- __proto__: null,
280
- default: Vimeo
281
- }, [Vimeo$2]);
282
-
283
- export { Vimeo$1 as V };