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