@finos/legend-application-studio
Version:
Legend Studio application core
48 lines • 2.55 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createRoot } from 'react-dom/client';
import { LegendStudioWebApplication } from '../components/LegendStudioWebApplication.js';
import { LegendStudioPluginManager } from './LegendStudioPluginManager.js';
import { ApplicationStoreProvider, LegendApplication, Core_LegendApplicationPlugin, getApplicationRootElement, } from '@finos/legend-application';
import { Core_GraphManagerPreset } from '@finos/legend-graph';
import { LegendStudioApplicationConfig, } from './LegendStudioApplicationConfig.js';
import { Core_LegendStudioApplicationPlugin } from '../components/extensions/Core_LegendStudioApplicationPlugin.js';
import { QueryBuilder_GraphManagerPreset, QueryBuilder_LegendApplicationPlugin, } from '@finos/legend-query-builder';
import { DSL_ExternalFormat_LegendStudioApplicationPlugin } from '../components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js';
export class LegendStudio extends LegendApplication {
static create() {
const application = new LegendStudio(LegendStudioPluginManager.create());
application.withBasePresets([
new Core_GraphManagerPreset(),
new QueryBuilder_GraphManagerPreset(),
]);
application.withBasePlugins([
new Core_LegendApplicationPlugin(),
new Core_LegendStudioApplicationPlugin(),
new QueryBuilder_LegendApplicationPlugin(),
new DSL_ExternalFormat_LegendStudioApplicationPlugin(),
]);
return application;
}
async configureApplication(input) {
return new LegendStudioApplicationConfig(input);
}
async loadApplication(applicationStore) {
createRoot(getApplicationRootElement()).render(_jsx(ApplicationStoreProvider, { store: applicationStore, children: _jsx(LegendStudioWebApplication, { baseUrl: this.baseAddress }) }));
}
}
//# sourceMappingURL=LegendStudio.js.map