Compiles.

This commit is contained in:
Paulo Gustavo Veiga 2022-02-25 12:29:17 -08:00
parent 61c4fd9889
commit 7a182418a7

View File

@ -13,6 +13,7 @@ import {
} from '@wisemapping/mindplot';
import './global-styled.css';
import I18nMsg from './classes/i18n-msg';
import Messages from '@wisemapping/mindplot/src/components/Messages';
declare global {
// used in mindplot
@ -75,6 +76,9 @@ const Editor = ({
}
}, [options.enableKeyboardEvents]);
useEffect(() => {
Messages.init(options.locale);
}, [options.locale]);
const onLoadDesigner = (mapId: string, options: EditorOptions, persistenceManager: PersistenceManager): Designer => {
const buildOptions = DesignerOptionsBuilder.buildOptions({
@ -94,12 +98,14 @@ const Editor = ({
const msg = I18nMsg.loadLocaleData(locale);
return (
<IntlProvider locale={locale} messages={msg}>
<Toolbar
isTryMode={options.mode === 'showcase'}
onAction={onAction}
/>
{(options.mode !== 'viewonly') &&
<Toolbar
editorMode={options.mode}
onAction={onAction}
/>
}
<div id="mindplot"></div>
<Footer showTryPanel={options.mode === 'showcase'} />
<Footer editorMode={options.mode} />
</IntlProvider>
);
}