|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
|
|
|
|
|
|
import { BasicInterceptor } from '@growi/core';
|
|
import { BasicInterceptor } from '@growi/core';
|
|
|
import ReactDOM from 'react-dom';
|
|
import ReactDOM from 'react-dom';
|
|
|
-import { Provider } from 'unstated';
|
|
|
|
|
|
|
|
|
|
import Drawio from '~/components/Drawio';
|
|
import Drawio from '~/components/Drawio';
|
|
|
|
|
|
|
@@ -14,11 +13,10 @@ import Drawio from '~/components/Drawio';
|
|
|
*/
|
|
*/
|
|
|
export class DrawioInterceptor extends BasicInterceptor {
|
|
export class DrawioInterceptor extends BasicInterceptor {
|
|
|
|
|
|
|
|
- constructor(appContainer) {
|
|
|
|
|
|
|
+ constructor() {
|
|
|
super();
|
|
super();
|
|
|
|
|
|
|
|
this.previousPreviewContext = null;
|
|
this.previousPreviewContext = null;
|
|
|
- this.appContainer = appContainer;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -125,13 +123,11 @@ export class DrawioInterceptor extends BasicInterceptor {
|
|
|
renderReactDOM(drawioMapEntry, elem, isPreview) {
|
|
renderReactDOM(drawioMapEntry, elem, isPreview) {
|
|
|
ReactDOM.render(
|
|
ReactDOM.render(
|
|
|
// eslint-disable-next-line react/jsx-filename-extension
|
|
// eslint-disable-next-line react/jsx-filename-extension
|
|
|
- <Provider inject={[this.appContainer]}>
|
|
|
|
|
- <Drawio
|
|
|
|
|
- drawioContent={drawioMapEntry.contentHtml}
|
|
|
|
|
- isPreview={isPreview}
|
|
|
|
|
- rangeLineNumberOfMarkdown={drawioMapEntry.rangeLineNumberOfMarkdown}
|
|
|
|
|
- />
|
|
|
|
|
- </Provider>,
|
|
|
|
|
|
|
+ <Drawio
|
|
|
|
|
+ drawioContent={drawioMapEntry.contentHtml}
|
|
|
|
|
+ isPreview={isPreview}
|
|
|
|
|
+ rangeLineNumberOfMarkdown={drawioMapEntry.rangeLineNumberOfMarkdown}
|
|
|
|
|
+ />,
|
|
|
elem,
|
|
elem,
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|