UNPKG

@finos/legend-data-cube

Version:
36 lines 2.7 kB
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { observer } from 'mobx-react-lite'; import { DataCubeTitleBar } from './DataCubeTitleBar.js'; import { DataCubeStatusBar } from './DataCubeStatusBar.js'; import { DataCubeLayout } from './core/DataCubeLayout.js'; import { DataCubeIcon } from '@finos/legend-art'; import { LEGEND_DATACUBE_TEST_ID } from '../__lib__/DataCubeTesting.js'; import { INTERNAL__MonacoEditorWidgetsRoot } from './core/DataCubePureCodeEditorUtils.js'; export const DataCubePlaceholderErrorDisplay = (props) => { const { message, prompt } = props; return (_jsxs("div", { className: "flex h-full w-full overflow-auto p-5", children: [_jsx("div", { className: "mr-3", children: _jsx(DataCubeIcon.AlertError, { className: "flex-shrink-0 stroke-[0.5px] text-[40px] text-red-500" }) }), _jsxs("div", { children: [_jsx("div", { className: "whitespace-break-spaces text-lg", children: message }), _jsx("div", { className: "mt-1 whitespace-break-spaces text-neutral-500", children: prompt })] })] })); }; export const DataCubeViewPlaceholder = observer((props) => { const { children, taskManager } = props; return (_jsxs(_Fragment, { children: [_jsx("div", { className: "h-[calc(100%_-_48px)] w-full border border-x-0 border-neutral-200 bg-neutral-50", children: children ?? null }), _jsx(DataCubeStatusBar, { taskManager: taskManager })] })); }); export const DataCubePlaceholder = observer((props) => { const { children, title, menuItems, headerContent, layoutManager, taskManager, } = props; return (_jsxs("div", { className: "data-cube relative flex h-full w-full flex-col bg-white", "data-testid": LEGEND_DATACUBE_TEST_ID.PLACEHOLDER, children: [_jsx(DataCubeTitleBar, { title: title, menuItems: menuItems, children: headerContent ?? null }), _jsx(DataCubeViewPlaceholder, { taskManager: taskManager, children: children }), layoutManager ? _jsx(DataCubeLayout, { layout: layoutManager }) : null, _jsx(INTERNAL__MonacoEditorWidgetsRoot, {})] })); }); //# sourceMappingURL=DataCubePlaceholder.js.map