Merged PR 194: Added option to disable any API call

Added option to disable any API call
Fix http.js and node-http.js
Fix MainContainer not using IAvailableContainer from MainContainer
Fix generate_dts.py script
More docs
Fix MainContainer default style. Extend config will now be taken into account. But Main container can still have its own type.
This commit is contained in:
Eric Nguyen 2022-09-23 15:59:42 +00:00
parent 8ba19cc96b
commit 3ecff4cf01
10 changed files with 648 additions and 570 deletions

View file

@ -3,12 +3,17 @@ import { IConfiguration } from '../../../Interfaces/IConfiguration';
import { FetchConfiguration } from '../../API/api';
import { IEditorState } from '../../../Interfaces/IEditorState';
import { LoadState } from './Load';
import { GetDefaultEditorState } from '../../../utils/default';
import { DISABLE_API, GetDefaultEditorState } from '../../../utils/default';
export function NewEditor(
setEditorState: Dispatch<SetStateAction<IEditorState>>,
setLoaded: Dispatch<SetStateAction<boolean>>
): void {
if (DISABLE_API) {
setLoaded(true);
return;
}
// Fetch the configuration from the API
FetchConfiguration()
.then((configuration: IConfiguration) => {