@ilo-org/react 0.10.6 → 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 (185) hide show
  1. package/CHANGELOG.md +14 -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 +1 -1
  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 +6 -6
  73. package/lib/cjs/components/Navigation/index.js +1 -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 +3 -3
  89. package/lib/cjs/components/SearchField/index.js +1 -1
  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/NumberPicker/NumberPicker.js +3 -3
  121. package/lib/esm/components/Radio/Radio.js +3 -3
  122. package/lib/esm/components/Tabs/Tabs.args.js +154 -0
  123. package/lib/esm/components/Tabs/Tabs.js +22 -0
  124. package/lib/esm/components/Tabs/index.js +9 -0
  125. package/lib/esm/components/TextInput/TextInput.js +3 -3
  126. package/lib/esm/components/Textarea/Textarea.js +3 -3
  127. package/lib/esm/components/Video/Video.js +10 -11
  128. package/lib/esm/components/Video/VideoPlayer.js +57 -11
  129. package/lib/esm/components/Video/index.js +5 -7
  130. package/lib/esm/components/index.js +4 -4
  131. package/lib/esm/index.js +4 -4
  132. package/lib/types/react/src/components/Tabs/Tabs.args.d.ts +10 -0
  133. package/lib/types/react/src/components/Tabs/Tabs.d.ts +4 -0
  134. package/lib/types/react/src/components/Tabs/Tabs.props.d.ts +12 -0
  135. package/lib/types/react/src/components/Tabs/index.d.ts +1 -0
  136. package/lib/types/react/src/components/Video/Video.d.ts +2 -2
  137. package/lib/types/react/src/components/Video/Video.props.d.ts +5 -43
  138. package/lib/types/react/src/components/Video/VideoPlayer.d.ts +3 -3
  139. package/lib/types/react/src/components/Video/VideoPlayer.props.d.ts +6 -31
  140. package/lib/types/react/src/components/index.d.ts +1 -0
  141. package/package.json +9 -7
  142. package/src/components/Tabs/Tabs.args.tsx +201 -0
  143. package/src/components/Tabs/Tabs.props.ts +13 -0
  144. package/src/components/Tabs/Tabs.tsx +60 -0
  145. package/src/components/Tabs/index.ts +1 -0
  146. package/src/components/Video/Video.args.ts +18 -24
  147. package/src/components/Video/Video.props.ts +5 -47
  148. package/src/components/Video/Video.tsx +24 -19
  149. package/src/components/Video/VideoPlayer.props.ts +7 -38
  150. package/src/components/Video/VideoPlayer.tsx +67 -322
  151. package/src/components/index.ts +1 -0
  152. package/src/declarations.d.ts +22 -0
  153. package/lib/cjs/AccordionCtx-fe08ff45.js +0 -9
  154. package/lib/cjs/DailyMotion-17b56ecb.js +0 -259
  155. package/lib/cjs/Facebook-0c8d86ee.js +0 -239
  156. package/lib/cjs/FilePlayer-01d6dc08.js +0 -596
  157. package/lib/cjs/Kaltura-40e8e581.js +0 -235
  158. package/lib/cjs/ListCtx-7db7fe04.js +0 -9
  159. package/lib/cjs/Mixcloud-e23f49d6.js +0 -222
  160. package/lib/cjs/Preview-8e490f54.js +0 -227
  161. package/lib/cjs/SoundCloud-2500b6cb.js +0 -249
  162. package/lib/cjs/Streamable-00723065.js +0 -234
  163. package/lib/cjs/TagCtx-929c7753.js +0 -7
  164. package/lib/cjs/Twitch-2c5c5733.js +0 -244
  165. package/lib/cjs/VideoPlayer-5f0a64c6.js +0 -2067
  166. package/lib/cjs/Vidyard-d36d6c45.js +0 -237
  167. package/lib/cjs/Vimeo-d311e3b8.js +0 -285
  168. package/lib/cjs/Wistia-318b4e43.js +0 -288
  169. package/lib/cjs/YouTube-a3796a55.js +0 -377
  170. package/lib/cjs/index-0af02e81.js +0 -1154
  171. package/lib/esm/DailyMotion-989c2db3.js +0 -257
  172. package/lib/esm/Facebook-04e9cc59.js +0 -237
  173. package/lib/esm/FilePlayer-0789336d.js +0 -594
  174. package/lib/esm/Kaltura-a9ed37a9.js +0 -233
  175. package/lib/esm/Mixcloud-5a3b4353.js +0 -220
  176. package/lib/esm/Preview-7ca1835e.js +0 -225
  177. package/lib/esm/SoundCloud-47bccd79.js +0 -247
  178. package/lib/esm/Streamable-ee762126.js +0 -232
  179. package/lib/esm/Twitch-3cd4b54b.js +0 -242
  180. package/lib/esm/VideoPlayer-96c2b20c.js +0 -2062
  181. package/lib/esm/Vidyard-258ab0ef.js +0 -235
  182. package/lib/esm/Vimeo-4b29b580.js +0 -283
  183. package/lib/esm/Wistia-3cbce669.js +0 -286
  184. package/lib/esm/YouTube-db52da1c.js +0 -375
  185. package/lib/esm/index-623ce3f5.js +0 -1152
@@ -1,257 +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 DailyMotion$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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
45
-
46
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
47
-
48
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
49
-
50
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
51
-
52
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
53
-
54
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
55
-
56
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
57
-
58
- 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); } }
59
-
60
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
61
-
62
- 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); }
63
-
64
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
65
-
66
- 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); }; }
67
-
68
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
69
-
70
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
71
-
72
- 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; } }
73
-
74
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
75
-
76
- 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; }
77
-
78
- var SDK_URL = 'https://api.dmcdn.net/all.js';
79
- var SDK_GLOBAL = 'DM';
80
- var SDK_GLOBAL_READY = 'dmAsyncInit';
81
-
82
- var DailyMotion = /*#__PURE__*/function (_Component) {
83
- _inherits(DailyMotion, _Component);
84
-
85
- var _super = _createSuper(DailyMotion);
86
-
87
- function DailyMotion() {
88
- var _this;
89
-
90
- _classCallCheck(this, DailyMotion);
91
-
92
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
93
- args[_key] = arguments[_key];
94
- }
95
-
96
- _this = _super.call.apply(_super, [this].concat(args));
97
-
98
- _defineProperty(_assertThisInitialized(_this), "callPlayer", _utils.callPlayer);
99
-
100
- _defineProperty(_assertThisInitialized(_this), "onDurationChange", function () {
101
- var duration = _this.getDuration();
102
-
103
- _this.props.onDuration(duration);
104
- });
105
-
106
- _defineProperty(_assertThisInitialized(_this), "mute", function () {
107
- _this.callPlayer('setMuted', true);
108
- });
109
-
110
- _defineProperty(_assertThisInitialized(_this), "unmute", function () {
111
- _this.callPlayer('setMuted', false);
112
- });
113
-
114
- _defineProperty(_assertThisInitialized(_this), "ref", function (container) {
115
- _this.container = container;
116
- });
117
-
118
- return _this;
119
- }
120
-
121
- _createClass(DailyMotion, [{
122
- key: "componentDidMount",
123
- value: function componentDidMount() {
124
- this.props.onMount && this.props.onMount(this);
125
- }
126
- }, {
127
- key: "load",
128
- value: function load(url) {
129
- var _this2 = this;
130
-
131
- var _this$props = this.props,
132
- controls = _this$props.controls,
133
- config = _this$props.config,
134
- onError = _this$props.onError,
135
- playing = _this$props.playing;
136
-
137
- var _url$match = url.match(_patterns.MATCH_URL_DAILYMOTION),
138
- _url$match2 = _slicedToArray(_url$match, 2),
139
- id = _url$match2[1];
140
-
141
- if (this.player) {
142
- this.player.load(id, {
143
- start: (0, _utils.parseStartTime)(url),
144
- autoplay: playing
145
- });
146
- return;
147
- }
148
-
149
- (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, function (DM) {
150
- return DM.player;
151
- }).then(function (DM) {
152
- if (!_this2.container) return;
153
- var Player = DM.player;
154
- _this2.player = new Player(_this2.container, {
155
- width: '100%',
156
- height: '100%',
157
- video: id,
158
- params: _objectSpread({
159
- controls: controls,
160
- autoplay: _this2.props.playing,
161
- mute: _this2.props.muted,
162
- start: (0, _utils.parseStartTime)(url),
163
- origin: window.location.origin
164
- }, config.params),
165
- events: {
166
- apiready: _this2.props.onReady,
167
- seeked: function seeked() {
168
- return _this2.props.onSeek(_this2.player.currentTime);
169
- },
170
- video_end: _this2.props.onEnded,
171
- durationchange: _this2.onDurationChange,
172
- pause: _this2.props.onPause,
173
- playing: _this2.props.onPlay,
174
- waiting: _this2.props.onBuffer,
175
- error: function error(event) {
176
- return onError(event);
177
- }
178
- }
179
- });
180
- }, onError);
181
- }
182
- }, {
183
- key: "play",
184
- value: function play() {
185
- this.callPlayer('play');
186
- }
187
- }, {
188
- key: "pause",
189
- value: function pause() {
190
- this.callPlayer('pause');
191
- }
192
- }, {
193
- key: "stop",
194
- value: function stop() {// Nothing to do
195
- }
196
- }, {
197
- key: "seekTo",
198
- value: function seekTo(seconds) {
199
- this.callPlayer('seek', seconds);
200
- }
201
- }, {
202
- key: "setVolume",
203
- value: function setVolume(fraction) {
204
- this.callPlayer('setVolume', fraction);
205
- }
206
- }, {
207
- key: "getDuration",
208
- value: function getDuration() {
209
- return this.player.duration || null;
210
- }
211
- }, {
212
- key: "getCurrentTime",
213
- value: function getCurrentTime() {
214
- return this.player.currentTime;
215
- }
216
- }, {
217
- key: "getSecondsLoaded",
218
- value: function getSecondsLoaded() {
219
- return this.player.bufferedTime;
220
- }
221
- }, {
222
- key: "render",
223
- value: function render() {
224
- var display = this.props.display;
225
- var style = {
226
- width: '100%',
227
- height: '100%',
228
- display: display
229
- };
230
- return /*#__PURE__*/_react["default"].createElement("div", {
231
- style: style
232
- }, /*#__PURE__*/_react["default"].createElement("div", {
233
- ref: this.ref
234
- }));
235
- }
236
- }]);
237
-
238
- return DailyMotion;
239
- }(_react.Component);
240
-
241
- exports["default"] = DailyMotion;
242
-
243
- _defineProperty(DailyMotion, "displayName", 'DailyMotion');
244
-
245
- _defineProperty(DailyMotion, "canPlay", _patterns.canPlay.dailymotion);
246
-
247
- _defineProperty(DailyMotion, "loopOnEnded", true);
248
- } (DailyMotion$2));
249
-
250
- var DailyMotion = /*@__PURE__*/getDefaultExportFromCjs(DailyMotion$2);
251
-
252
- var DailyMotion$1 = /*#__PURE__*/_mergeNamespaces({
253
- __proto__: null,
254
- default: DailyMotion
255
- }, [DailyMotion$2]);
256
-
257
- export { DailyMotion$1 as D };
@@ -1,237 +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 Facebook$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 _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
41
-
42
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
43
-
44
- 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); } }
45
-
46
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
47
-
48
- 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); }
49
-
50
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
51
-
52
- 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); }; }
53
-
54
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
55
-
56
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
57
-
58
- 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; } }
59
-
60
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
61
-
62
- 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; }
63
-
64
- var SDK_URL = 'https://connect.facebook.net/en_US/sdk.js';
65
- var SDK_GLOBAL = 'FB';
66
- var SDK_GLOBAL_READY = 'fbAsyncInit';
67
- var PLAYER_ID_PREFIX = 'facebook-player-';
68
-
69
- var Facebook = /*#__PURE__*/function (_Component) {
70
- _inherits(Facebook, _Component);
71
-
72
- var _super = _createSuper(Facebook);
73
-
74
- function Facebook() {
75
- var _this;
76
-
77
- _classCallCheck(this, Facebook);
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), "playerID", _this.props.config.playerId || "".concat(PLAYER_ID_PREFIX).concat((0, _utils.randomString)()));
88
-
89
- _defineProperty(_assertThisInitialized(_this), "mute", function () {
90
- _this.callPlayer('mute');
91
- });
92
-
93
- _defineProperty(_assertThisInitialized(_this), "unmute", function () {
94
- _this.callPlayer('unmute');
95
- });
96
-
97
- return _this;
98
- }
99
-
100
- _createClass(Facebook, [{
101
- key: "componentDidMount",
102
- value: function componentDidMount() {
103
- this.props.onMount && this.props.onMount(this);
104
- }
105
- }, {
106
- key: "load",
107
- value: function load(url, isReady) {
108
- var _this2 = this;
109
-
110
- if (isReady) {
111
- (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then(function (FB) {
112
- return FB.XFBML.parse();
113
- });
114
- return;
115
- }
116
-
117
- (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then(function (FB) {
118
- FB.init({
119
- appId: _this2.props.config.appId,
120
- xfbml: true,
121
- version: _this2.props.config.version
122
- });
123
- FB.Event.subscribe('xfbml.render', function (msg) {
124
- // Here we know the SDK has loaded, even if onReady/onPlay
125
- // is not called due to a video that cannot be embedded
126
- _this2.props.onLoaded();
127
- });
128
- FB.Event.subscribe('xfbml.ready', function (msg) {
129
- if (msg.type === 'video' && msg.id === _this2.playerID) {
130
- _this2.player = msg.instance;
131
-
132
- _this2.player.subscribe('startedPlaying', _this2.props.onPlay);
133
-
134
- _this2.player.subscribe('paused', _this2.props.onPause);
135
-
136
- _this2.player.subscribe('finishedPlaying', _this2.props.onEnded);
137
-
138
- _this2.player.subscribe('startedBuffering', _this2.props.onBuffer);
139
-
140
- _this2.player.subscribe('finishedBuffering', _this2.props.onBufferEnd);
141
-
142
- _this2.player.subscribe('error', _this2.props.onError);
143
-
144
- if (_this2.props.muted) {
145
- _this2.callPlayer('mute');
146
- } else {
147
- _this2.callPlayer('unmute');
148
- }
149
-
150
- _this2.props.onReady(); // For some reason Facebook have added `visibility: hidden`
151
- // to the iframe when autoplay fails, so here we set it back
152
-
153
-
154
- document.getElementById(_this2.playerID).querySelector('iframe').style.visibility = 'visible';
155
- }
156
- });
157
- });
158
- }
159
- }, {
160
- key: "play",
161
- value: function play() {
162
- this.callPlayer('play');
163
- }
164
- }, {
165
- key: "pause",
166
- value: function pause() {
167
- this.callPlayer('pause');
168
- }
169
- }, {
170
- key: "stop",
171
- value: function stop() {// Nothing to do
172
- }
173
- }, {
174
- key: "seekTo",
175
- value: function seekTo(seconds) {
176
- this.callPlayer('seek', seconds);
177
- }
178
- }, {
179
- key: "setVolume",
180
- value: function setVolume(fraction) {
181
- this.callPlayer('setVolume', fraction);
182
- }
183
- }, {
184
- key: "getDuration",
185
- value: function getDuration() {
186
- return this.callPlayer('getDuration');
187
- }
188
- }, {
189
- key: "getCurrentTime",
190
- value: function getCurrentTime() {
191
- return this.callPlayer('getCurrentPosition');
192
- }
193
- }, {
194
- key: "getSecondsLoaded",
195
- value: function getSecondsLoaded() {
196
- return null;
197
- }
198
- }, {
199
- key: "render",
200
- value: function render() {
201
- var attributes = this.props.config.attributes;
202
- var style = {
203
- width: '100%',
204
- height: '100%'
205
- };
206
- return /*#__PURE__*/_react["default"].createElement("div", _extends({
207
- style: style,
208
- id: this.playerID,
209
- className: "fb-video",
210
- "data-href": this.props.url,
211
- "data-autoplay": this.props.playing ? 'true' : 'false',
212
- "data-allowfullscreen": "true",
213
- "data-controls": this.props.controls ? 'true' : 'false'
214
- }, attributes));
215
- }
216
- }]);
217
-
218
- return Facebook;
219
- }(_react.Component);
220
-
221
- exports["default"] = Facebook;
222
-
223
- _defineProperty(Facebook, "displayName", 'Facebook');
224
-
225
- _defineProperty(Facebook, "canPlay", _patterns.canPlay.facebook);
226
-
227
- _defineProperty(Facebook, "loopOnEnded", true);
228
- } (Facebook$2));
229
-
230
- var Facebook = /*@__PURE__*/getDefaultExportFromCjs(Facebook$2);
231
-
232
- var Facebook$1 = /*#__PURE__*/_mergeNamespaces({
233
- __proto__: null,
234
- default: Facebook
235
- }, [Facebook$2]);
236
-
237
- export { Facebook$1 as F };