|
@@ -1,6 +1,5 @@
|
1
|
|
-/* global interfaceConfig */
|
|
1
|
+// @flow
|
2
|
2
|
|
3
|
|
-import PropTypes from 'prop-types';
|
4
|
3
|
import React, { Component } from 'react';
|
5
|
4
|
import { connect } from 'react-redux';
|
6
|
5
|
|
|
@@ -14,6 +13,8 @@ import UserMediaPermissionsFilmstripOnlyOverlay
|
14
|
13
|
from './UserMediaPermissionsFilmstripOnlyOverlay';
|
15
|
14
|
import UserMediaPermissionsOverlay from './UserMediaPermissionsOverlay';
|
16
|
15
|
|
|
16
|
+declare var interfaceConfig: Object;
|
|
17
|
+
|
17
|
18
|
/**
|
18
|
19
|
* The lazily-initialized list of overlay React {@link Component} types used The
|
19
|
20
|
* user interface is filmstrip-only.
|
|
@@ -39,22 +40,23 @@ let _filmstripOnlyOverlays;
|
39
|
40
|
let _nonFilmstripOnlyOverlays;
|
40
|
41
|
|
41
|
42
|
/**
|
42
|
|
- * Implements a React {@link Component} that will display the correct overlay
|
43
|
|
- * when needed.
|
|
43
|
+ * OverlayContainer component's property types.
|
44
|
44
|
*/
|
45
|
|
-class OverlayContainer extends Component {
|
|
45
|
+type Props = {
|
|
46
|
+
|
46
|
47
|
/**
|
47
|
|
- * OverlayContainer component's property types.
|
48
|
|
- *
|
49
|
|
- * @static
|
|
48
|
+ * Type of overlay that should be rendered.
|
|
49
|
+ * XXX: We are using 'any' here because overlays are usually wrapped in
|
|
50
|
+ * functions, so a 'Node' won't do.
|
50
|
51
|
*/
|
51
|
|
- static propTypes = {
|
52
|
|
- /**
|
53
|
|
- * Type of overlay that should be rendered.
|
54
|
|
- */
|
55
|
|
- overlay: PropTypes.element
|
56
|
|
- };
|
|
52
|
+ overlay: any
|
|
53
|
+}
|
57
|
54
|
|
|
55
|
+/**
|
|
56
|
+ * Implements a React {@link Component} that will display the correct overlay
|
|
57
|
+ * when needed.
|
|
58
|
+ */
|
|
59
|
+class OverlayContainer extends Component<Props> {
|
58
|
60
|
/**
|
59
|
61
|
* Implements React's {@link Component#render()}.
|
60
|
62
|
*
|