{
/**
* Initializes a new {@code ConferenceInfo} instance.
*
* @param {Props} props - The read-only React {@code Component} props with
* which the new instance is to be initialized.
*/
constructor(props: Props) {
super(props);
this._renderAutoHide = this._renderAutoHide.bind(this);
this._renderAlwaysVisible = this._renderAlwaysVisible.bind(this);
}
_renderAutoHide: () => void;
/**
* Renders auto-hidden info header labels.
*
* @returns {void}
*/
_renderAutoHide() {
const { autoHide } = this.props._conferenceInfo;
if (!autoHide || !autoHide.length) {
return null;
}
return (
{
COMPONENTS
.filter(comp => autoHide.includes(comp.id))
.map(c =>
)
}
);
}
_renderAlwaysVisible: () => void;
/**
* Renders the always visible info header labels.
*
* @returns {void}
*/
_renderAlwaysVisible() {
const { alwaysVisible } = this.props._conferenceInfo;
if (!alwaysVisible || !alwaysVisible.length) {
return null;
}
return (
{
COMPONENTS
.filter(comp => alwaysVisible.includes(comp.id))
.map(c =>
)
}
);
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
return (
{ this._renderAlwaysVisible() }
{ this._renderAutoHide() }
);
}
}
/**
* Maps (parts of) the Redux state to the associated
* {@code Subject}'s props.
*
* @param {Object} state - The Redux state.
* @private
* @returns {{
* _visible: boolean,
* _conferenceInfo: Object
* }}
*/
function _mapStateToProps(state) {
return {
_visible: isToolboxVisible(state),
_conferenceInfo: getConferenceInfo(state)
};
}
export default connect(_mapStateToProps)(ConferenceInfo);