onCreateEntity()
}
hasEntity={hasEntity}
disableLinks={disableLinks}
createEntityTitle={createEntityTitle}
/>
);
}
return null;
};
override render() {
const {
// @ts-expect-error TS(2339): Property 'className' does not exist on type 'Reado... Remove this comment to see the full error message
className,
// @ts-expect-error TS(2339): Property 'type' does not exist on type 'Readonly<{... Remove this comment to see the full error message
type,
// @ts-expect-error TS(2339): Property 'currentLocale' does not exist on type 'R... Remove this comment to see the full error message
currentLocale,
// @ts-expect-error TS(2339): Property 'onLog' does not exist on type 'Readonly<... Remove this comment to see the full error message
onLog,
// @ts-expect-error TS(2339): Property 'isLogged' does not exist on type 'Readon... Remove this comment to see the full error message
isLogged,
// @ts-expect-error TS(2339): Property 'isLogging' does not exist on type 'Reado... Remove this comment to see the full error message
isLogging,
// @ts-expect-error TS(2339): Property 'createEntityTypes' does not exist on typ... Remove this comment to see the full error message
createEntityTypes,
// @ts-expect-error TS(2339): Property 'hasEntity' does not exist on type 'Reado... Remove this comment to see the full error message
hasEntity,
// @ts-expect-error TS(2339): Property 'onClickToDial' does not exist on type 'R... Remove this comment to see the full error message
onClickToDial,
// @ts-expect-error TS(2339): Property 'onClickToSms' does not exist on type 'Re... Remove this comment to see the full error message
onClickToSms,
// @ts-expect-error TS(2339): Property 'phoneNumber' does not exist on type 'Rea... Remove this comment to see the full error message
phoneNumber,
// @ts-expect-error TS(2339): Property 'disableLinks' does not exist on type 'Re... Remove this comment to see the full error message
disableLinks,
// @ts-expect-error TS(2339): Property 'disableCallButton' does not exist on typ... Remove this comment to see the full error message
disableCallButton,
// @ts-expect-error TS(2339): Property 'disableClickToDial' does not exist on ty... Remove this comment to see the full error message
disableClickToDial,
// @ts-expect-error TS(2339): Property 'addLogTitle' does not exist on type 'Rea... Remove this comment to see the full error message
addLogTitle,
// @ts-expect-error TS(2339): Property 'editLogTitle' does not exist on type 'Re... Remove this comment to see the full error message
editLogTitle,
// @ts-expect-error TS(2339): Property 'callTitle' does not exist on type 'Reado... Remove this comment to see the full error message
callTitle,
// @ts-expect-error TS(2339): Property 'textTitle' does not exist on type 'Reado... Remove this comment to see the full error message
textTitle,
// @ts-expect-error TS(2339): Property 'onDelete' does not exist on type 'Readon... Remove this comment to see the full error message
onDelete,
// @ts-expect-error TS(2339): Property 'deleteTitle' does not exist on type 'Rea... Remove this comment to see the full error message
deleteTitle,
// @ts-expect-error TS(2339): Property 'onMark' does not exist on type 'Readonly... Remove this comment to see the full error message
onMark,
// @ts-expect-error TS(2339): Property 'marked' does not exist on type 'Readonly... Remove this comment to see the full error message
marked,
// @ts-expect-error TS(2339): Property 'markTitle' does not exist on type 'Reado... Remove this comment to see the full error message
markTitle,
// @ts-expect-error TS(2339): Property 'unmarkTitle' does not exist on type 'Rea... Remove this comment to see the full error message
unmarkTitle,
// @ts-expect-error TS(2339): Property 'previewTitle' does not exist on type 'Re... Remove this comment to see the full error message
previewTitle,
// @ts-expect-error TS(2339): Property 'downloadTitle' does not exist on type 'R... Remove this comment to see the full error message
downloadTitle,
// @ts-expect-error TS(2339): Property 'onPreview' does not exist on type 'Reado... Remove this comment to see the full error message
onPreview,
// @ts-expect-error TS(2339): Property 'faxAttachment' does not exist on type 'R... Remove this comment to see the full error message
faxAttachment,
// @ts-expect-error TS(2339): Property 'disableClickToSms' does not exist on typ... Remove this comment to see the full error message
disableClickToSms,
// @ts-expect-error TS(2339): Property 'externalHasEntity' does not exist on typ... Remove this comment to see the full error message
externalHasEntity,
// @ts-expect-error TS(2339): Property 'externalViewEntity' does not exist on ty... Remove this comment to see the full error message
externalViewEntity,
// @ts-expect-error TS(2339): Property 'externalViewEntity' does not exist on ty... Remove this comment to see the full error message
extraButton,
} = this.props;
// @ts-expect-error TS(2339): Property 'deleteModalVisible' does not exist on ty... Remove this comment to see the full error message
const { deleteModalVisible, disableDelete, entityModalVisible } =
this.state;
const logButton = onLog ? (
) : null;
const entityButton = this.getEntityButton();
const isMatched = externalViewEntity ? externalHasEntity : hasEntity;
const entityModal =
!isMatched && phoneNumber ? (
) : null;
const clickToDialButton = onClickToDial ? (
) : null;
const clickToSmsButton = onClickToSms ? (
) : null;
const deleteButton = onDelete ? (
) : null;
const confirmDeleteModal = onDelete ? (
) : null;
const markButton = onMark ? (
) : null;
const previewButton =
onPreview && faxAttachment && faxAttachment.uri ? (
) : null;
const downloadButton =
faxAttachment && faxAttachment.uri ? (
) : null;
return (
{clickToDialButton}
{clickToSmsButton}
{previewButton}
{downloadButton}
{entityButton}
{logButton}
{markButton}
{deleteButton}
{entityModal}
{confirmDeleteModal}
{extraButton}
);
}
}
// @ts-expect-error TS(2339): Property 'propTypes' does not exist on type 'typeo... Remove this comment to see the full error message
ActionMenuList.propTypes = {
className: PropTypes.string,
type: PropTypes.string,
currentLocale: PropTypes.string.isRequired,
onLog: PropTypes.func,
isLogged: PropTypes.bool,
isLogging: PropTypes.bool,
onViewEntity: PropTypes.func,
onCreateEntity: PropTypes.func,
createEntityTypes: PropTypes.array,
hasEntity: PropTypes.bool,
onClickToDial: PropTypes.func,
onClickToSms: PropTypes.func,
phoneNumber: PropTypes.string,
disableLinks: PropTypes.bool,
disableCallButton: PropTypes.bool,
disableClickToDial: PropTypes.bool,
addLogTitle: PropTypes.string,
editLogTitle: PropTypes.string,
textTitle: PropTypes.string,
callTitle: PropTypes.string,
createEntityTitle: PropTypes.string,
viewEntityTitle: PropTypes.string,
onDelete: PropTypes.func,
deleteTitle: PropTypes.string,
onMark: PropTypes.func,
onUnmark: PropTypes.func,
marked: PropTypes.bool,
markTitle: PropTypes.string,
unmarkTitle: PropTypes.string,
previewTitle: PropTypes.string,
downloadTitle: PropTypes.string,
onPreview: PropTypes.func,
faxAttachment: PropTypes.shape({
uri: PropTypes.string,
}),
externalViewEntity: PropTypes.func,
externalHasEntity: PropTypes.bool,
disableClickToSms: PropTypes.bool,
onFaxDownload: PropTypes.func,
selectedMatchContactType: PropTypes.string,
showChooseEntityModal: PropTypes.bool,
shouldHideEntityButton: PropTypes.func,
extraButton: PropTypes.element,
};
// @ts-expect-error TS(2339): Property 'defaultProps' does not exist on type 'ty... Remove this comment to see the full error message
ActionMenuList.defaultProps = {
className: undefined,
type: undefined,
onLog: undefined,
isLogged: false,
isLogging: false,
onViewEntity: undefined,
onCreateEntity: undefined,
createEntityTypes: undefined,
hasEntity: false,
onClickToDial: undefined,
onClickToSms: undefined,
phoneNumber: undefined,
disableLinks: false,
disableCallButton: false,
disableClickToDial: false,
addLogTitle: undefined,
editLogTitle: undefined,
textTitle: undefined,
callTitle: undefined,
createEntityTitle: undefined,
viewEntityTitle: undefined,
deleteTitle: undefined,
onDelete: undefined,
onMark: undefined,
onUnmark: undefined,
marked: false,
markTitle: undefined,
unmarkTitle: undefined,
previewTitle: undefined,
downloadTitle: undefined,
onPreview: undefined,
faxAttachment: undefined,
externalViewEntity: undefined,
externalHasEntity: undefined,
disableClickToSms: false,
onFaxDownload: undefined,
selectedMatchContactType: '',
showChooseEntityModal: true,
shouldHideEntityButton: () => false,
extraButton: undefined,
};
export default ActionMenuList;