/* eslint-disable react/no-multi-comp */ import React from 'react'; import {appConfig} from 'appConfig'; import hc from 'highcharts'; import {IAnalyticsConfig} from '../interfaces'; import {superdeskApi} from '../superdeskApi'; interface IProps { closeModal(): void } class HighchartsLicenseModal extends React.PureComponent { render() { const { Modal, ModalBody, ModalFooter, } = superdeskApi.components; const gettext = superdeskApi.localization.gettext; const config: IAnalyticsConfig = appConfig as IAnalyticsConfig; const highchartsVersionLink = `https://www.highcharts.com/blog/changelog/#highcharts-v${hc.version}`; const license = config.highcharts?.license ?? {}; const licenseType = license.type ?? gettext('OEM'); return (

{gettext('Highcharts {{licenseType}} License', {licenseType})}

{gettext('The use of Highcharts is provided under a license with the following details:')}

{license.licensee && ( )} {license.contact && ( )} {license.id && ( )} {license.customer_id && ( )} {license.expiry && ( )}
{gettext('License Type')}: {licenseType}
{gettext('Licensee:')} {license.licensee}
{gettext('Licensee Contact:')} {license.contact}
{gettext('License ID:')} {license.id}
{gettext('Customer Installation No.:')} {license.customer_id}
{gettext('Expiry Date:')} {license.expiry}
{gettext('Installed Version:')} v{hc.version}
); } } function showHighchartsModal(): void { superdeskApi.ui.showModal(HighchartsLicenseModal); } export class HighchartsLicense extends React.PureComponent { render() { return ( ); } }