2020-04-01 07:47:51 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import InlineMessage from '@atlaskit/inline-message';
|
|
|
|
import React from 'react';
|
|
|
|
import type { Dispatch } from 'redux';
|
|
|
|
|
|
|
|
import { Avatar } from '../../../../base/avatar';
|
2022-08-16 12:53:53 +00:00
|
|
|
import { translate } from '../../../../base/i18n';
|
2022-11-08 10:24:32 +00:00
|
|
|
import { Icon, IconPhoneRinging } from '../../../../base/icons';
|
2020-04-01 07:47:51 +00:00
|
|
|
import { MultiSelectAutocomplete } from '../../../../base/react';
|
|
|
|
import { connect } from '../../../../base/redux';
|
2021-07-20 08:58:42 +00:00
|
|
|
import { isVpaasMeeting } from '../../../../jaas/functions';
|
2020-06-24 12:12:23 +00:00
|
|
|
import { hideAddPeopleDialog } from '../../../actions';
|
2021-05-11 08:51:02 +00:00
|
|
|
import { INVITE_TYPES } from '../../../constants';
|
2020-04-01 07:47:51 +00:00
|
|
|
import AbstractAddPeopleDialog, {
|
|
|
|
type Props as AbstractProps,
|
|
|
|
type State,
|
|
|
|
_mapStateToProps as _abstractMapStateToProps
|
|
|
|
} from '../AbstractAddPeopleDialog';
|
|
|
|
|
|
|
|
declare var interfaceConfig: Object;
|
|
|
|
|
|
|
|
type Props = AbstractProps & {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The {@link JitsiMeetConference} which will be used to invite "room" participants.
|
|
|
|
*/
|
|
|
|
_conference: Object,
|
|
|
|
|
2021-03-17 09:53:05 +00:00
|
|
|
/**
|
2021-11-04 21:10:43 +00:00
|
|
|
* Whether the meeting belongs to JaaS user.
|
2021-03-17 09:53:05 +00:00
|
|
|
*/
|
|
|
|
_isVpaas: boolean,
|
|
|
|
|
2020-04-01 07:47:51 +00:00
|
|
|
/**
|
|
|
|
* The redux {@code dispatch} function.
|
|
|
|
*/
|
|
|
|
dispatch: Dispatch<any>,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoked to obtain translated strings.
|
|
|
|
*/
|
|
|
|
t: Function,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Form that enables inviting others to the call.
|
|
|
|
*/
|
|
|
|
class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {
|
|
|
|
_multiselect = null;
|
|
|
|
|
|
|
|
_resourceClient: Object;
|
|
|
|
|
2021-05-12 13:21:22 +00:00
|
|
|
_translations: Object;
|
|
|
|
|
2020-04-01 07:47:51 +00:00
|
|
|
state = {
|
|
|
|
addToCallError: false,
|
|
|
|
addToCallInProgress: false,
|
|
|
|
inviteItems: []
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes a new {@code AddPeopleDialog} instance.
|
|
|
|
*
|
|
|
|
* @param {Object} props - The read-only properties with which the new
|
|
|
|
* instance is to be initialized.
|
|
|
|
*/
|
|
|
|
constructor(props: Props) {
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
// Bind event handlers so they are only bound once per instance.
|
|
|
|
this._onClearItems = this._onClearItems.bind(this);
|
2021-06-10 12:48:44 +00:00
|
|
|
this._onClearItemsKeyPress = this._onClearItemsKeyPress.bind(this);
|
2020-04-01 07:47:51 +00:00
|
|
|
this._onItemSelected = this._onItemSelected.bind(this);
|
|
|
|
this._onSelectionChange = this._onSelectionChange.bind(this);
|
|
|
|
this._onSubmit = this._onSubmit.bind(this);
|
2021-06-10 12:48:44 +00:00
|
|
|
this._onSubmitKeyPress = this._onSubmitKeyPress.bind(this);
|
2020-04-01 07:47:51 +00:00
|
|
|
this._parseQueryResults = this._parseQueryResults.bind(this);
|
|
|
|
this._setMultiSelectElement = this._setMultiSelectElement.bind(this);
|
2020-06-24 12:12:23 +00:00
|
|
|
this._onKeyDown = this._onKeyDown.bind(this);
|
2020-04-01 07:47:51 +00:00
|
|
|
|
|
|
|
this._resourceClient = {
|
|
|
|
makeQuery: this._query,
|
|
|
|
parseResults: this._parseQueryResults
|
|
|
|
};
|
2021-05-12 13:21:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
const { t } = props;
|
|
|
|
|
|
|
|
this._translations = {
|
|
|
|
_dialOutEnabled: t('addPeople.phoneNumbers'),
|
|
|
|
_addPeopleEnabled: t('addPeople.contacts'),
|
|
|
|
_sipInviteEnabled: t('addPeople.sipAddresses')
|
|
|
|
};
|
|
|
|
|
2020-04-01 07:47:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* React Component method that executes once component is updated.
|
|
|
|
*
|
|
|
|
* @param {Object} prevProps - The state object before the update.
|
|
|
|
* @param {Object} prevState - The state object before the update.
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
componentDidUpdate(prevProps, prevState) {
|
|
|
|
/**
|
|
|
|
* Clears selected items from the multi select component on successful
|
|
|
|
* invite.
|
|
|
|
*/
|
|
|
|
if (prevState.addToCallError
|
|
|
|
&& !this.state.addToCallInProgress
|
|
|
|
&& !this.state.addToCallError
|
|
|
|
&& this._multiselect) {
|
|
|
|
this._multiselect.setSelectedItems([]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Renders the content of this component.
|
|
|
|
*
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
const {
|
|
|
|
_addPeopleEnabled,
|
|
|
|
_dialOutEnabled,
|
2021-03-17 09:53:05 +00:00
|
|
|
_isVpaas,
|
2021-05-12 13:21:22 +00:00
|
|
|
_sipInviteEnabled,
|
2020-04-01 07:47:51 +00:00
|
|
|
t
|
|
|
|
} = this.props;
|
|
|
|
let isMultiSelectDisabled = this.state.addToCallInProgress;
|
2021-05-12 13:21:22 +00:00
|
|
|
const loadingMessage = 'addPeople.searching';
|
|
|
|
const noMatches = 'addPeople.noResults';
|
|
|
|
|
|
|
|
const features = {
|
|
|
|
_dialOutEnabled,
|
|
|
|
_addPeopleEnabled,
|
|
|
|
_sipInviteEnabled
|
|
|
|
};
|
|
|
|
|
|
|
|
const computedPlaceholder = Object.keys(features)
|
|
|
|
.filter(v => Boolean(features[v]))
|
|
|
|
.map(v => this._translations[v])
|
|
|
|
.join(', ');
|
|
|
|
|
|
|
|
const placeholder = computedPlaceholder ? `${t('dialog.add')} ${computedPlaceholder}` : t('addPeople.disabled');
|
|
|
|
|
|
|
|
if (!computedPlaceholder) {
|
2020-04-01 07:47:51 +00:00
|
|
|
isMultiSelectDisabled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2020-06-24 12:12:23 +00:00
|
|
|
<div
|
|
|
|
className = 'add-people-form-wrap'
|
|
|
|
onKeyDown = { this._onKeyDown }>
|
2020-04-01 07:47:51 +00:00
|
|
|
{ this._renderErrorMessage() }
|
|
|
|
<MultiSelectAutocomplete
|
|
|
|
isDisabled = { isMultiSelectDisabled }
|
|
|
|
loadingMessage = { t(loadingMessage) }
|
|
|
|
noMatchesFound = { t(noMatches) }
|
|
|
|
onItemSelected = { this._onItemSelected }
|
|
|
|
onSelectionChange = { this._onSelectionChange }
|
2021-05-12 13:21:22 +00:00
|
|
|
placeholder = { placeholder }
|
2020-04-01 07:47:51 +00:00
|
|
|
ref = { this._setMultiSelectElement }
|
|
|
|
resourceClient = { this._resourceClient }
|
|
|
|
shouldFitContainer = { true }
|
2021-03-17 09:53:05 +00:00
|
|
|
shouldFocus = { true }
|
|
|
|
showSupportLink = { !_isVpaas } />
|
2020-04-01 07:47:51 +00:00
|
|
|
{ this._renderFormActions() }
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-11-04 21:10:43 +00:00
|
|
|
_invite: Array<Object> => Promise<*>;
|
2020-04-01 07:47:51 +00:00
|
|
|
|
|
|
|
_isAddDisabled: () => boolean;
|
|
|
|
|
|
|
|
_onItemSelected: (Object) => Object;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked when a selection has been made but before it has been
|
|
|
|
* set as selected.
|
|
|
|
*
|
|
|
|
* @param {Object} item - The item that has just been selected.
|
|
|
|
* @private
|
|
|
|
* @returns {Object} The item to display as selected in the input.
|
|
|
|
*/
|
|
|
|
_onItemSelected(item) {
|
2021-05-11 08:51:02 +00:00
|
|
|
if (item.item.type === INVITE_TYPES.PHONE) {
|
2020-04-01 07:47:51 +00:00
|
|
|
item.content = item.item.number;
|
|
|
|
}
|
|
|
|
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
|
|
|
_onSelectionChange: (Map<*, *>) => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles a selection change.
|
|
|
|
*
|
|
|
|
* @param {Array} selectedItems - The list of selected items.
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_onSelectionChange(selectedItems) {
|
|
|
|
this.setState({
|
|
|
|
inviteItems: selectedItems
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
_onSubmit: () => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Submits the selection for inviting.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_onSubmit() {
|
|
|
|
const { inviteItems } = this.state;
|
|
|
|
const invitees = inviteItems.map(({ item }) => item);
|
|
|
|
|
|
|
|
this._invite(invitees)
|
|
|
|
.then(invitesLeftToSend => {
|
|
|
|
if (invitesLeftToSend.length) {
|
|
|
|
const unsentInviteIDs
|
|
|
|
= invitesLeftToSend.map(invitee =>
|
|
|
|
invitee.id || invitee.user_id || invitee.number);
|
|
|
|
const itemsToSelect
|
|
|
|
= inviteItems.filter(({ item }) =>
|
|
|
|
unsentInviteIDs.includes(item.id || item.user_id || item.number));
|
|
|
|
|
|
|
|
if (this._multiselect) {
|
|
|
|
this._multiselect.setSelectedItems(itemsToSelect);
|
|
|
|
}
|
|
|
|
} else {
|
2020-06-24 12:12:23 +00:00
|
|
|
this.props.dispatch(hideAddPeopleDialog());
|
2020-04-01 07:47:51 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-06-10 12:48:44 +00:00
|
|
|
_onSubmitKeyPress: (Object) => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* KeyPress handler for accessibility.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_onSubmitKeyPress(e) {
|
|
|
|
if (e.key === ' ' || e.key === 'Enter') {
|
|
|
|
e.preventDefault();
|
|
|
|
this._onSubmit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-24 12:12:23 +00:00
|
|
|
_onKeyDown: (Object) => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles 'Enter' key in the form to trigger the invite.
|
|
|
|
*
|
|
|
|
* @param {Object} event - The key event.
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_onKeyDown(event) {
|
|
|
|
const { inviteItems } = this.state;
|
|
|
|
|
|
|
|
if (event.key === 'Enter') {
|
|
|
|
event.preventDefault();
|
|
|
|
if (!this._isAddDisabled() && inviteItems.length) {
|
|
|
|
this._onSubmit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-01 07:47:51 +00:00
|
|
|
_parseQueryResults: (?Array<Object>) => Array<Object>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the avatar component for a user.
|
|
|
|
*
|
|
|
|
* @param {Object} user - The user.
|
|
|
|
* @param {string} className - The CSS class for the avatar component.
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_getAvatar(user, className = 'avatar-small') {
|
|
|
|
return (
|
|
|
|
<Avatar
|
|
|
|
className = { className }
|
|
|
|
status = { user.status }
|
|
|
|
url = { user.avatar } />
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Processes results from requesting available numbers and people by munging
|
|
|
|
* each result into a format {@code MultiSelectAutocomplete} can use for
|
|
|
|
* display.
|
|
|
|
*
|
|
|
|
* @param {Array} response - The response object from the server for the
|
|
|
|
* query.
|
|
|
|
* @private
|
|
|
|
* @returns {Object[]} Configuration objects for items to display in the
|
|
|
|
* search autocomplete.
|
|
|
|
*/
|
|
|
|
_parseQueryResults(response = []) {
|
|
|
|
const { t, _dialOutEnabled } = this.props;
|
2021-09-28 12:31:50 +00:00
|
|
|
|
|
|
|
const userTypes = [ INVITE_TYPES.USER, INVITE_TYPES.VIDEO_ROOM, INVITE_TYPES.ROOM ];
|
|
|
|
const users = response.filter(item => userTypes.includes(item.type));
|
2020-04-01 07:47:51 +00:00
|
|
|
const userDisplayItems = [];
|
|
|
|
|
|
|
|
for (const user of users) {
|
|
|
|
const { name, phone } = user;
|
|
|
|
const tagAvatar = this._getAvatar(user, 'avatar-xsmall');
|
|
|
|
const elemAvatar = this._getAvatar(user);
|
|
|
|
|
|
|
|
userDisplayItems.push({
|
|
|
|
content: name,
|
|
|
|
elemBefore: elemAvatar,
|
|
|
|
item: user,
|
|
|
|
tag: {
|
|
|
|
elemBefore: tagAvatar
|
|
|
|
},
|
|
|
|
value: user.id || user.user_id
|
|
|
|
});
|
|
|
|
|
|
|
|
if (phone && _dialOutEnabled) {
|
|
|
|
userDisplayItems.push({
|
|
|
|
filterValues: [ name, phone ],
|
|
|
|
content: `${phone} (${name})`,
|
|
|
|
elemBefore: elemAvatar,
|
|
|
|
item: {
|
2021-05-11 08:51:02 +00:00
|
|
|
type: INVITE_TYPES.PHONE,
|
2020-04-01 07:47:51 +00:00
|
|
|
number: phone
|
|
|
|
},
|
|
|
|
tag: {
|
|
|
|
elemBefore: tagAvatar
|
|
|
|
},
|
|
|
|
value: phone
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-11 08:51:02 +00:00
|
|
|
const numbers = response.filter(item => item.type === INVITE_TYPES.PHONE);
|
2020-04-01 07:47:51 +00:00
|
|
|
const telephoneIcon = this._renderTelephoneIcon();
|
|
|
|
|
|
|
|
const numberDisplayItems = numbers.map(number => {
|
|
|
|
const numberNotAllowedMessage
|
|
|
|
= number.allowed ? '' : t('addPeople.countryNotSupported');
|
|
|
|
const countryCodeReminder = number.showCountryCodeReminder
|
|
|
|
? t('addPeople.countryReminder') : '';
|
|
|
|
const description
|
|
|
|
= `${numberNotAllowedMessage} ${countryCodeReminder}`.trim();
|
|
|
|
|
|
|
|
return {
|
|
|
|
filterValues: [
|
|
|
|
number.originalEntry,
|
|
|
|
number.number
|
|
|
|
],
|
|
|
|
content: t('addPeople.telephone', { number: number.number }),
|
|
|
|
description,
|
|
|
|
isDisabled: !number.allowed,
|
|
|
|
elemBefore: telephoneIcon,
|
|
|
|
item: number,
|
|
|
|
tag: {
|
|
|
|
elemBefore: telephoneIcon
|
|
|
|
},
|
|
|
|
value: number.number
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2021-03-18 13:32:14 +00:00
|
|
|
|
2021-05-11 08:51:02 +00:00
|
|
|
const sipAddresses = response.filter(item => item.type === INVITE_TYPES.SIP);
|
2021-03-18 13:32:14 +00:00
|
|
|
|
|
|
|
const sipDisplayItems = sipAddresses.map(sip => {
|
|
|
|
return {
|
|
|
|
filterValues: [
|
|
|
|
sip.address
|
|
|
|
],
|
2021-04-20 13:05:49 +00:00
|
|
|
content: sip.address,
|
2021-03-18 13:32:14 +00:00
|
|
|
description: '',
|
|
|
|
item: sip,
|
|
|
|
value: sip.address
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2020-04-01 07:47:51 +00:00
|
|
|
return [
|
|
|
|
...userDisplayItems,
|
2021-03-18 13:32:14 +00:00
|
|
|
...numberDisplayItems,
|
|
|
|
...sipDisplayItems
|
2020-04-01 07:47:51 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
_query: (string) => Promise<Array<Object>>;
|
|
|
|
|
|
|
|
_onClearItems: () => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Clears the selected items from state and form.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_onClearItems() {
|
|
|
|
if (this._multiselect) {
|
|
|
|
this._multiselect.setSelectedItems([]);
|
|
|
|
}
|
|
|
|
this.setState({ inviteItems: [] });
|
|
|
|
}
|
|
|
|
|
2021-06-10 12:48:44 +00:00
|
|
|
_onClearItemsKeyPress: () => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Clears the selected items from state and form.
|
|
|
|
*
|
|
|
|
* @param {Object} e - The key event to handle.
|
|
|
|
*
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_onClearItemsKeyPress(e) {
|
|
|
|
if (e.key === ' ' || e.key === 'Enter') {
|
|
|
|
e.preventDefault();
|
|
|
|
this._onClearItems();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-01 07:47:51 +00:00
|
|
|
/**
|
|
|
|
* Renders the add/cancel actions for the form.
|
|
|
|
*
|
|
|
|
* @returns {ReactElement|null}
|
|
|
|
*/
|
|
|
|
_renderFormActions() {
|
|
|
|
const { inviteItems } = this.state;
|
|
|
|
const { t } = this.props;
|
|
|
|
|
|
|
|
if (!inviteItems.length) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2020-06-24 12:12:23 +00:00
|
|
|
<div className = { `invite-more-dialog invite-buttons${this._isAddDisabled() ? ' disabled' : ''}` }>
|
2020-04-01 07:47:51 +00:00
|
|
|
<a
|
2021-06-10 12:48:44 +00:00
|
|
|
aria-label = { t('dialog.Cancel') }
|
2020-04-01 07:47:51 +00:00
|
|
|
className = 'invite-more-dialog invite-buttons-cancel'
|
2021-06-10 12:48:44 +00:00
|
|
|
onClick = { this._onClearItems }
|
|
|
|
onKeyPress = { this._onClearItemsKeyPress }
|
|
|
|
role = 'button'
|
|
|
|
tabIndex = { 0 }>
|
2020-04-01 07:47:51 +00:00
|
|
|
{t('dialog.Cancel')}
|
|
|
|
</a>
|
|
|
|
<a
|
2021-06-10 12:48:44 +00:00
|
|
|
aria-label = { t('addPeople.add') }
|
2020-04-01 07:47:51 +00:00
|
|
|
className = 'invite-more-dialog invite-buttons-add'
|
2021-06-10 12:48:44 +00:00
|
|
|
onClick = { this._onSubmit }
|
|
|
|
onKeyPress = { this._onSubmitKeyPress }
|
|
|
|
role = 'button'
|
|
|
|
tabIndex = { 0 }>
|
2020-04-01 07:47:51 +00:00
|
|
|
{t('addPeople.add')}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Renders the error message if the add doesn't succeed.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement|null}
|
|
|
|
*/
|
|
|
|
_renderErrorMessage() {
|
|
|
|
if (!this.state.addToCallError) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
const { t } = this.props;
|
|
|
|
const supportString = t('inlineDialogFailure.supportMsg');
|
|
|
|
const supportLink = interfaceConfig.SUPPORT_URL;
|
|
|
|
|
2021-07-16 11:00:11 +00:00
|
|
|
const supportLinkContent = supportLink ? (
|
2020-04-01 07:47:51 +00:00
|
|
|
<span>
|
|
|
|
<span>
|
|
|
|
{ supportString.padEnd(supportString.length + 1) }
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
<a
|
2021-06-10 12:48:44 +00:00
|
|
|
aria-label = { supportLink }
|
2020-04-01 07:47:51 +00:00
|
|
|
href = { supportLink }
|
2021-07-16 11:00:11 +00:00
|
|
|
rel = 'noopener noreferrer'
|
|
|
|
target = '_blank'>
|
2020-04-01 07:47:51 +00:00
|
|
|
{ t('inlineDialogFailure.support') }
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
<span>.</span>
|
|
|
|
</span>
|
2021-07-16 11:00:11 +00:00
|
|
|
) : null;
|
2020-04-01 07:47:51 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className = 'modal-dialog-form-error'>
|
|
|
|
<InlineMessage
|
|
|
|
title = { t('addPeople.failedToAdd') }
|
|
|
|
type = 'error'>
|
|
|
|
{ supportLinkContent }
|
|
|
|
</InlineMessage>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Renders a telephone icon.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
_renderTelephoneIcon() {
|
|
|
|
return (
|
|
|
|
<span className = 'add-telephone-icon'>
|
2022-11-08 10:24:32 +00:00
|
|
|
<Icon src = { IconPhoneRinging } />
|
2020-04-01 07:47:51 +00:00
|
|
|
</span>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
_setMultiSelectElement: (React$ElementRef<*> | null) => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the instance variable for the multi select component
|
|
|
|
* element so it can be accessed directly.
|
|
|
|
*
|
|
|
|
* @param {Object} element - The DOM element for the component's dialog.
|
|
|
|
* @private
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
_setMultiSelectElement(element) {
|
|
|
|
this._multiselect = element;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps (parts of) the Redux state to the associated
|
|
|
|
* {@code AddPeopleDialog}'s props.
|
|
|
|
*
|
|
|
|
* @param {Object} state - The Redux state.
|
|
|
|
* @private
|
|
|
|
* @returns {Props}
|
|
|
|
*/
|
|
|
|
function _mapStateToProps(state) {
|
|
|
|
return {
|
|
|
|
..._abstractMapStateToProps(state),
|
2021-07-16 12:14:37 +00:00
|
|
|
_isVpaas: isVpaasMeeting(state)
|
2020-04-01 07:47:51 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(connect(_mapStateToProps)(InviteContactsForm));
|