@finos/legend-application-studio 28.20.0 → 28.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__lib__/LegendStudioUserDataHelper.d.ts +4 -1
- package/lib/__lib__/LegendStudioUserDataHelper.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioUserDataHelper.js +18 -0
- package/lib/__lib__/LegendStudioUserDataHelper.js.map +1 -1
- package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
- package/lib/components/editor/editor-group/EditorGroup.js +5 -0
- package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +13 -44
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js.map +1 -1
- package/lib/components/editor/editor-group/database-editor/DatabaseAnnotationDisplay.d.ts +26 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseAnnotationDisplay.d.ts.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseAnnotationDisplay.js +101 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseAnnotationDisplay.js.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseDiagramCanvas.d.ts +23 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseDiagramCanvas.d.ts.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseDiagramCanvas.js +434 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseDiagramCanvas.js.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseDiagramHelper.d.ts +242 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseDiagramHelper.d.ts.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseDiagramHelper.js +371 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseDiagramHelper.js.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseEditor.d.ts +29 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseEditor.js +78 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseEditor.js.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseSchemaTree.d.ts +30 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseSchemaTree.d.ts.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseSchemaTree.js +331 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseSchemaTree.js.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseTableNode.d.ts +104 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseTableNode.d.ts.map +1 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseTableNode.js +151 -0
- package/lib/components/editor/editor-group/database-editor/DatabaseTableNode.js.map +1 -0
- package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.js +3 -78
- package/lib/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +4 -1
- package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.js +5 -3
- package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/DatabaseEditorState.d.ts +252 -0
- package/lib/stores/editor/editor-state/element-editor-state/DatabaseEditorState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/DatabaseEditorState.js +755 -0
- package/lib/stores/editor/editor-state/element-editor-state/DatabaseEditorState.js.map +1 -0
- package/package.json +12 -9
- package/src/__lib__/LegendStudioUserDataHelper.ts +30 -0
- package/src/components/editor/editor-group/EditorGroup.tsx +4 -0
- package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +0 -52
- package/src/components/editor/editor-group/database-editor/DatabaseAnnotationDisplay.tsx +200 -0
- package/src/components/editor/editor-group/database-editor/DatabaseDiagramCanvas.tsx +701 -0
- package/src/components/editor/editor-group/database-editor/DatabaseDiagramHelper.ts +555 -0
- package/src/components/editor/editor-group/database-editor/DatabaseEditor.tsx +246 -0
- package/src/components/editor/editor-group/database-editor/DatabaseSchemaTree.tsx +1053 -0
- package/src/components/editor/editor-group/database-editor/DatabaseTableNode.tsx +465 -0
- package/src/components/editor/editor-group/ingest-editor/IngestDefinitionEditor.tsx +2 -242
- package/src/stores/editor/EditorTabManagerState.ts +4 -5
- package/src/stores/editor/editor-state/element-editor-state/DatabaseEditorState.ts +938 -0
- package/tsconfig.json +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/database-editor/DatabaseEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkCH;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;CA2LzB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { ChevronLeftIcon, ChevronRightIcon, InfoCircleIcon, LockIcon, MoonIcon, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, ResizablePanelSplitterLine, SunIcon, clsx, getCollapsiblePanelGroupProps, } from '@finos/legend-art';
|
|
19
|
+
import { prettyCONSTName } from '@finos/legend-shared';
|
|
20
|
+
import { CODE_EDITOR_LANGUAGE } from '@finos/legend-code-editor';
|
|
21
|
+
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
|
22
|
+
import { INTERNAL__LakehouseGeneratedDatabase } from '@finos/legend-graph';
|
|
23
|
+
import { useEditorStore } from '../../EditorStoreProvider.js';
|
|
24
|
+
import { DATABASE_EDITOR_TAB, DatabaseEditorState, } from '../../../../stores/editor/editor-state/element-editor-state/DatabaseEditorState.js';
|
|
25
|
+
import { DatabaseDiagramCanvas } from './DatabaseDiagramCanvas.js';
|
|
26
|
+
import { DatabaseSchemaTree } from './DatabaseSchemaTree.js';
|
|
27
|
+
const TABS = [
|
|
28
|
+
DATABASE_EDITOR_TAB.VIEW,
|
|
29
|
+
DATABASE_EDITOR_TAB.GRAMMAR,
|
|
30
|
+
];
|
|
31
|
+
/**
|
|
32
|
+
* Top-level editor for `Database` elements in form mode. Has two tabs:
|
|
33
|
+
* - VIEW (default): Schema → Table → Column tree (left) + React-Flow ERD
|
|
34
|
+
* canvas (right). The interactive form mode.
|
|
35
|
+
* - GRAMMAR: read-only Pure DSL preview, regenerated on tab switch by
|
|
36
|
+
* `setSelectedTab` so it always reflects the current metamodel state.
|
|
37
|
+
* Mirrors what global Text Mode would render for this element — included
|
|
38
|
+
* here for users who want to peek at the grammar without leaving form
|
|
39
|
+
* mode.
|
|
40
|
+
*/
|
|
41
|
+
export const DatabaseEditor = observer(() => {
|
|
42
|
+
const editorStore = useEditorStore();
|
|
43
|
+
const editorState = editorStore.tabManagerState.getCurrentEditorState(DatabaseEditorState);
|
|
44
|
+
const { selectedTab, database } = editorState;
|
|
45
|
+
// Resizable left panel: dragging the splitter all the way left snaps the
|
|
46
|
+
// panel to flex=0 (collapsed). The toggle button in the panel header (and
|
|
47
|
+
// the expand-rail rendered when collapsed) drives the same flag, so both
|
|
48
|
+
// controls stay in sync via `editorState.isSidePanelCollapsed`.
|
|
49
|
+
const sidePanelCollapseProps = getCollapsiblePanelGroupProps(editorState.isSidePanelCollapsed, {
|
|
50
|
+
// Default width when first opened (in pixels). React-reflex owns the
|
|
51
|
+
// exact width after the first user-drag.
|
|
52
|
+
size: 320,
|
|
53
|
+
onStopResize: (handleProps) => {
|
|
54
|
+
// If the user drags the splitter to (or near) zero, persist it as
|
|
55
|
+
// collapsed so the toggle button and rail stay in sync. Mirrors
|
|
56
|
+
// what `getCollapsiblePanelGroupProps` does internally for the
|
|
57
|
+
// styling class but lifts that signal back up to MobX.
|
|
58
|
+
const flexGrow = Number(handleProps.domElement.style.flexGrow);
|
|
59
|
+
if (flexGrow <= 0.01) {
|
|
60
|
+
editorState.setSidePanelCollapsed(true);
|
|
61
|
+
}
|
|
62
|
+
else if (editorState.isSidePanelCollapsed) {
|
|
63
|
+
editorState.setSidePanelCollapsed(false);
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
return (_jsxs("div", { className: clsx('database-editor', {
|
|
68
|
+
// Local light-theme opt-in. Scoped to this editor only — the rest
|
|
69
|
+
// of Studio remains in its configured theme. SCSS overrides hang
|
|
70
|
+
// off this modifier class.
|
|
71
|
+
'database-editor--light': editorState.theme === 'light',
|
|
72
|
+
}), children: [_jsxs("div", { className: "database-editor__tabs__header", children: [_jsx("div", { className: "database-editor__tabs", children: TABS.map((tab) => (_jsx("button", { type: "button", onClick: () => editorState.setSelectedTab(tab), className: clsx('database-editor__tab', {
|
|
73
|
+
'database-editor__tab--active': tab === selectedTab,
|
|
74
|
+
}), children: prettyCONSTName(tab) }, tab))) }), _jsxs("div", { className: "database-editor__read-only-badge", title: "This editor is read-only", children: [_jsx(LockIcon, {}), _jsx("span", { className: "database-editor__read-only-badge__label", children: "READ ONLY" })] }), _jsx("button", { type: "button", className: "database-editor__theme-toggle", onClick: () => editorState.toggleTheme(), title: editorState.theme === 'dark'
|
|
75
|
+
? 'Switch to light theme (this editor only)'
|
|
76
|
+
: 'Switch to dark theme', children: editorState.theme === 'dark' ? _jsx(SunIcon, {}) : _jsx(MoonIcon, {}) })] }), _jsxs("div", { className: "database-editor__content", children: [database instanceof INTERNAL__LakehouseGeneratedDatabase && (_jsxs("div", { className: "database-editor__generated-banner", title: `Generated from ${database.generatorElement.path}\nOwned by ${database.OWNER.path}`, children: [_jsx(InfoCircleIcon, {}), _jsxs("span", { className: "database-editor__generated-banner__text", children: ["This database is generated by", ' ', _jsx("span", { className: "database-editor__generated-banner__path", children: database.generatorElement.path }), ' — owned by ', _jsx("span", { className: "database-editor__generated-banner__path", children: database.OWNER.path }), "."] })] })), _jsxs("div", { className: "database-editor__content__body", children: [selectedTab === DATABASE_EDITOR_TAB.VIEW && (_jsx("div", { className: "database-diagram", children: _jsxs(ResizablePanelGroup, { orientation: "vertical", children: [_jsx(ResizablePanel, { ...sidePanelCollapseProps.collapsiblePanel, direction: 1, minSize: 0, children: _jsxs("div", { className: "database-diagram__side-panel-wrapper", children: [_jsxs("div", { className: "database-diagram__side-panel-wrapper__header", children: [_jsx("span", { className: "database-diagram__side-panel-wrapper__header__title", children: "Database" }), _jsx("button", { type: "button", className: "database-diagram__side-panel-wrapper__header__action", onClick: () => editorState.toggleSidePanelCollapsed(), title: "Collapse panel", children: _jsx(ChevronLeftIcon, {}) })] }), _jsx("div", { className: "database-diagram__side-panel-wrapper__body", children: _jsx(DatabaseSchemaTree, { editorState: editorState }) })] }) }), _jsx(ResizablePanelSplitter, { children: _jsx(ResizablePanelSplitterLine, { color: "var(--color-dark-grey-200)" }) }), _jsx(ResizablePanel, { ...sidePanelCollapseProps.remainingPanel, minSize: 200, children: _jsxs("div", { className: "database-diagram__canvas-area", children: [editorState.isSidePanelCollapsed && (_jsx("button", { type: "button", className: "database-diagram__expand-rail", onClick: () => editorState.toggleSidePanelCollapsed(), title: "Expand panel", children: _jsx(ChevronRightIcon, {}) })), _jsx("div", { className: "database-diagram__canvas-container", children: _jsx(DatabaseDiagramCanvas, { editorState: editorState }) })] }) })] }) })), selectedTab === DATABASE_EDITOR_TAB.GRAMMAR && (_jsx("div", { className: "database-editor__grammar", children: _jsx(CodeEditor, { inputValue: editorState.textContent, isReadOnly: true, language: CODE_EDITOR_LANGUAGE.PURE }) }))] })] })] }));
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=DatabaseEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseEditor.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/database-editor/DatabaseEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,OAAO,EACP,IAAI,EACJ,6BAA6B,GAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,oCAAoC,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,oFAAoF,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,IAAI,GAA0B;I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,WAAW,CAAC,WAAW,EACnC,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,oBAAoB,CAAC,IAAI,GACnC,GACE,CACP,IACG,IACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { type DatabaseEditorState } from '../../../../stores/editor/editor-state/element-editor-state/DatabaseEditorState.js';
|
|
17
|
+
/**
|
|
18
|
+
* The full side-panel tree. Renders schemas → (tables, views) → columns plus
|
|
19
|
+
* a flat "Joins" section at the bottom (joins are cross-relation
|
|
20
|
+
* relationships and don't naturally fit in the tree hierarchy).
|
|
21
|
+
*
|
|
22
|
+
* State (selection, expansion) lives entirely in `DatabaseEditorState` so it
|
|
23
|
+
* survives reprocessing and so other components (the canvas) can react to it.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DatabaseSchemaTree: ((props: {
|
|
26
|
+
editorState: DatabaseEditorState;
|
|
27
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=DatabaseSchemaTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseSchemaTree.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/database-editor/DatabaseSchemaTree.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiCH,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,oFAAoF,CAAC;AA2pB5F;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,WACrB;IAAE,WAAW,EAAE,mBAAmB,CAAA;CAAE;;CAqU7C,CAAC"}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { useState } from 'react';
|
|
19
|
+
import { ChevronDownIcon, ChevronRightIcon, CompressIcon, CopyIcon, ExpandAllIcon, ExternalLinkIcon, EyeIcon, FilterIcon, KeyIcon, PURE_DatabaseIcon, PURE_DatabaseSchemaIcon, PURE_DatabaseTableIcon, PURE_DatabaseTableJoinIcon, PURE_DataProductIcon, SearchIcon, TimesIcon, clsx, } from '@finos/legend-art';
|
|
20
|
+
import {} from '@finos/legend-graph';
|
|
21
|
+
import { DatabaseAnnotationDisplay } from './DatabaseAnnotationDisplay.js';
|
|
22
|
+
import { getRelationNodeId, getSchemaNodeId, } from '../../../../stores/editor/editor-state/element-editor-state/DatabaseEditorState.js';
|
|
23
|
+
import { getColumnTypeLabel, getTableColumns, isCrossDatabaseJoin, isPrimaryKey, isSelfJoin, matchesSearch, resolveFilterFormula, resolveJoinFormula, resolveViewColumnFormula, resolveViewGroupByFormula, summarizeMilestoning, } from './DatabaseDiagramHelper.js';
|
|
24
|
+
/**
|
|
25
|
+
* Small inline copy-to-clipboard button rendered next to rendered Pure code
|
|
26
|
+
* (filter/join/view-column/groupBy formulas). Two-state visual: shows the
|
|
27
|
+
* default copy icon, briefly flips to a "Copied!" label after a successful
|
|
28
|
+
* write, then resets. Click stops propagation so the surrounding row's
|
|
29
|
+
* click handler (which usually selects/focuses the row) doesn't fire.
|
|
30
|
+
*/
|
|
31
|
+
const CopyFormulaButton = ({ value, label = 'Copy', }) => {
|
|
32
|
+
const [copied, setCopied] = useState(false);
|
|
33
|
+
return (_jsx("button", { type: "button", className: clsx('database-diagram__copy-btn', {
|
|
34
|
+
'database-diagram__copy-btn--copied': copied,
|
|
35
|
+
}), title: copied ? 'Copied!' : label, onClick: (event) => {
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
// `navigator.clipboard` may be unavailable in test/insecure contexts;
|
|
38
|
+
// fall through silently in that case rather than throwing.
|
|
39
|
+
navigator.clipboard
|
|
40
|
+
.writeText(value)
|
|
41
|
+
.then(() => {
|
|
42
|
+
setCopied(true);
|
|
43
|
+
window.setTimeout(() => setCopied(false), 1200);
|
|
44
|
+
})
|
|
45
|
+
.catch(() => {
|
|
46
|
+
/* no-op \u2014 copy failures are non-fatal */
|
|
47
|
+
});
|
|
48
|
+
}, children: _jsx(CopyIcon, {}) }));
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Pure-CSS shimmer placeholder shown in place of formula text while the
|
|
52
|
+
* batched engine call is still in flight. We swap from skeleton to text
|
|
53
|
+
* once the corresponding `is...Loading` flag flips false on the editor
|
|
54
|
+
* state. Compact one-line bar so layout doesn't shift on resolve.
|
|
55
|
+
*/
|
|
56
|
+
const FormulaSkeleton = () => (_jsx("span", { className: "database-diagram__skeleton", "aria-label": "Loading formula", "aria-busy": true }));
|
|
57
|
+
/**
|
|
58
|
+
* Empty-state row shown when a side-panel section has zero rows of its
|
|
59
|
+
* primary kind (e.g. a database with no joins). Lighter than rendering
|
|
60
|
+
* nothing because users sometimes wonder if the panel is broken when a
|
|
61
|
+
* section is silently absent.
|
|
62
|
+
*/
|
|
63
|
+
const EmptySectionRow = ({ message }) => (_jsx("div", { className: "database-diagram__side-panel__empty", children: message }));
|
|
64
|
+
/**
|
|
65
|
+
* Predicates that determine whether a tree node should be rendered under
|
|
66
|
+
* the current search filter. A node is shown when it OR any descendant
|
|
67
|
+
* matches the (already lowercased) query. Empty query short-circuits so
|
|
68
|
+
* everything is shown, which keeps the no-filter render path cheap.
|
|
69
|
+
*/
|
|
70
|
+
const relationMatchesSearch = (rel, query) => {
|
|
71
|
+
if (!query) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
if (matchesSearch(rel.name, query)) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
// For tables walk Column.name; for views walk ColumnMapping.columnName.
|
|
78
|
+
// Either way the comparison is a flat substring on visible identifiers.
|
|
79
|
+
if ('columnMappings' in rel) {
|
|
80
|
+
return rel.columnMappings.some((m) => matchesSearch(m.columnName, query));
|
|
81
|
+
}
|
|
82
|
+
return getTableColumns(rel).some((c) => matchesSearch(c.name, query));
|
|
83
|
+
};
|
|
84
|
+
const schemaMatchesSearch = (schema, query) => {
|
|
85
|
+
if (!query) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
if (matchesSearch(schema.name, query)) {
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
return (schema.tables.some((t) => relationMatchesSearch(t, query)) ||
|
|
92
|
+
schema.views.some((v) => relationMatchesSearch(v, query)));
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Renders one column under an expanded Table. Clicking focuses the column,
|
|
96
|
+
* which (per `DatabaseEditorState.focusOnColumn`) selects the parent table,
|
|
97
|
+
* marks the specific column, and requests a canvas pan.
|
|
98
|
+
*
|
|
99
|
+
* Columns aren't expandable — they're leaves of the tree.
|
|
100
|
+
*/
|
|
101
|
+
const DatabaseTreeTableColumnRow = observer((props) => {
|
|
102
|
+
const { editorState, table, column } = props;
|
|
103
|
+
const isSelected = editorState.selectedColumn === column;
|
|
104
|
+
const isPK = isPrimaryKey(table, column.name);
|
|
105
|
+
return (_jsxs("button", { type: "button", className: clsx('database-diagram__tree__column', {
|
|
106
|
+
'database-diagram__tree__column--selected': isSelected,
|
|
107
|
+
'database-diagram__tree__column--pk': isPK,
|
|
108
|
+
}), onClick: () => editorState.focusOnColumn(table, column), title: `${table.schema.name}.${table.name}.${column.name}: ${getColumnTypeLabel(column)}`, children: [_jsx("span", { className: "database-diagram__tree__column__icon", children: isPK ? (_jsx(KeyIcon, {})) : (_jsx("span", { className: "database-diagram__tree__column__bullet", children: "\u2022" })) }), _jsxs("span", { className: "database-diagram__tree__column__name", children: [column.name, column.nullable === true && (_jsx("span", { className: "database-diagram__tree__column__nullable", title: "Nullable", children: "?" }))] }), _jsx("span", { className: "database-diagram__tree__column__type", children: getColumnTypeLabel(column) }), _jsx(DatabaseAnnotationDisplay, { stereotypes: column.stereotypes, taggedValues: column.taggedValues, layout: "compact" })] }));
|
|
109
|
+
});
|
|
110
|
+
/**
|
|
111
|
+
* Renders one column-mapping under an expanded View. Visually similar to a
|
|
112
|
+
* table-column row but the secondary text is the formula placeholder rather
|
|
113
|
+
* than a SQL type. Not selectable individually in the MVP — clicking just
|
|
114
|
+
* focuses the parent view.
|
|
115
|
+
*/
|
|
116
|
+
const DatabaseTreeViewColumnRow = observer((props) => {
|
|
117
|
+
const { editorState, view, columnMapping } = props;
|
|
118
|
+
const isPK = isPrimaryKey(view, columnMapping.columnName);
|
|
119
|
+
const isSelected = editorState.selectedRelation === view &&
|
|
120
|
+
editorState.selectedViewColumnName === columnMapping.columnName;
|
|
121
|
+
// Pull the live formula from the editor state. Re-renders when the
|
|
122
|
+
// batched engine call resolves and updates `viewColumnFormulas`.
|
|
123
|
+
const formula = resolveViewColumnFormula(editorState.viewColumnFormulas, view.schema.name, view.name, columnMapping.columnName);
|
|
124
|
+
const isLoading = editorState.isLoadingViewColumnFormulas &&
|
|
125
|
+
!editorState.viewColumnFormulas.has(`${view.schema.name}.${view.name}.${columnMapping.columnName}`);
|
|
126
|
+
return (_jsxs("button", { type: "button", className: clsx('database-diagram__tree__column', 'database-diagram__tree__column--view', {
|
|
127
|
+
'database-diagram__tree__column--pk': isPK,
|
|
128
|
+
'database-diagram__tree__column--selected': isSelected,
|
|
129
|
+
}), onClick: () => editorState.focusOnViewColumn(view, columnMapping.columnName), title: `${view.schema.name}.${view.name}.${columnMapping.columnName}: ${formula}`, children: [_jsx("span", { className: "database-diagram__tree__column__icon", children: isPK ? (_jsx(KeyIcon, {})) : (_jsx("span", { className: "database-diagram__tree__column__bullet", children: "\u2022" })) }), _jsx("span", { className: "database-diagram__tree__column__name", children: columnMapping.columnName }), _jsx("span", { className: "database-diagram__tree__column__type", children: isLoading ? _jsx(FormulaSkeleton, {}) : formula }), !isLoading && (_jsx(CopyFormulaButton, { value: formula, label: "Copy formula" }))] }));
|
|
130
|
+
});
|
|
131
|
+
/**
|
|
132
|
+
* Renders one Table row plus (when expanded) its Column children. Clicking
|
|
133
|
+
* the row both *selects the table on the canvas* (with a pan-to) AND toggles
|
|
134
|
+
* expansion. Bundling these is intentional — when a user navigates to a
|
|
135
|
+
* relation, they almost always want to see its columns too.
|
|
136
|
+
*/
|
|
137
|
+
const DatabaseTreeTableRow = observer((props) => {
|
|
138
|
+
const { editorState, table } = props;
|
|
139
|
+
const query = editorState.searchText.trim().toLowerCase();
|
|
140
|
+
if (!relationMatchesSearch(table, query)) {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
const id = getRelationNodeId(table.schema.name, table.name);
|
|
144
|
+
// When a filter is active force-expand the row so matches deeper in
|
|
145
|
+
// the tree are immediately visible without an extra click.
|
|
146
|
+
const isExpanded = query !== '' || editorState.expandedRelationIds.has(id);
|
|
147
|
+
const isSelected = editorState.selectedRelation === table;
|
|
148
|
+
const columns = getTableColumns(table);
|
|
149
|
+
// When filtering, only show columns that match the query (or all
|
|
150
|
+
// columns if the table itself matched by name).
|
|
151
|
+
const tableNameMatches = matchesSearch(table.name, query);
|
|
152
|
+
const visibleColumns = query === '' || tableNameMatches
|
|
153
|
+
? columns
|
|
154
|
+
: columns.filter((c) => matchesSearch(c.name, query));
|
|
155
|
+
return (_jsxs("div", { className: "database-diagram__tree__table", children: [_jsxs("button", { type: "button", className: clsx('database-diagram__tree__table__row', {
|
|
156
|
+
'database-diagram__tree__table__row--selected': isSelected,
|
|
157
|
+
}), onClick: () => {
|
|
158
|
+
editorState.focusOnRelation(table);
|
|
159
|
+
editorState.toggleRelationExpanded(id);
|
|
160
|
+
}, title: `${table.schema.name}.${table.name}`, children: [_jsx("span", { className: "database-diagram__tree__caret", children: isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), _jsx(PURE_DatabaseTableIcon, {}), _jsx("span", { className: "database-diagram__tree__table__name", children: table.name }), _jsx("span", { className: "database-diagram__tree__table__count", children: columns.length }), _jsx(DatabaseAnnotationDisplay, { stereotypes: table.stereotypes, taggedValues: table.taggedValues, layout: "compact" })] }), isExpanded && (_jsxs("div", { className: "database-diagram__tree__table__children", children: [table.milestoning.map((milestoning) => {
|
|
161
|
+
const summary = summarizeMilestoning(milestoning);
|
|
162
|
+
return (_jsxs("div", { className: clsx('database-diagram__tree__table__meta-row', `database-diagram__tree__table__meta-row--milestoning-${summary.kind}`), title: summary.description, children: [_jsx("span", { className: "database-diagram__tree__table__meta-row__label", children: "milestoning" }), _jsx("span", { className: "database-diagram__tree__table__meta-row__value", children: summary.label })] }, summary.label));
|
|
163
|
+
}), visibleColumns.map((column) => (_jsx(DatabaseTreeTableColumnRow, { editorState: editorState, table: table, column: column }, column.name)))] }))] }));
|
|
164
|
+
});
|
|
165
|
+
/**
|
|
166
|
+
* Renders the View → Filter mapping reference under an expanded view. Shows
|
|
167
|
+
* `<owning-database>.<filterName>`. When the referenced filter belongs to
|
|
168
|
+
* the database currently being edited, clicking navigates to it via
|
|
169
|
+
* `focusOnFilter`; cross-database references are non-interactive (filters
|
|
170
|
+
* from other databases aren't reachable from this editor).
|
|
171
|
+
*/
|
|
172
|
+
const DatabaseTreeViewFilterRow = observer((props) => {
|
|
173
|
+
const { editorState, view, filterMapping } = props;
|
|
174
|
+
const ownerPath = filterMapping.filter.ownerReference.valueForSerialization ?? '';
|
|
175
|
+
const filterValue = filterMapping.filter.value;
|
|
176
|
+
// Filters live on a Database; if the owning DB matches the one we're
|
|
177
|
+
// editing we can navigate. Otherwise the row is informational.
|
|
178
|
+
const isLocal = filterValue.owner === editorState.database;
|
|
179
|
+
const display = `${ownerPath}.${filterMapping.filterName}`;
|
|
180
|
+
const formula = isLocal
|
|
181
|
+
? resolveFilterFormula(editorState.filterFormulas, filterValue.name)
|
|
182
|
+
: undefined;
|
|
183
|
+
return (_jsxs("button", { type: "button", className: clsx('database-diagram__tree__column', 'database-diagram__tree__column--view', 'database-diagram__tree__column--view-meta'), onClick: () => {
|
|
184
|
+
if (isLocal) {
|
|
185
|
+
editorState.focusOnFilter(filterValue);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
editorState.focusOnRelation(view);
|
|
189
|
+
}
|
|
190
|
+
}, disabled: !isLocal, title: formula
|
|
191
|
+
? `${display}: ${formula}`
|
|
192
|
+
: `${display}${isLocal ? '' : ' (external)'}`, children: [_jsx("span", { className: "database-diagram__tree__column__icon", children: _jsx(FilterIcon, {}) }), _jsx("span", { className: "database-diagram__tree__column__name", children: "filter" }), _jsx("span", { className: "database-diagram__tree__column__type", children: display })] }));
|
|
193
|
+
});
|
|
194
|
+
/**
|
|
195
|
+
* Renders one row per `View.groupBy.columns[i]` Pure expression. Each row
|
|
196
|
+
* lazily reads its rendered formula from `viewGroupByFormulas` — until the
|
|
197
|
+
* batched engine call resolves it falls back to a static placeholder.
|
|
198
|
+
*
|
|
199
|
+
* Rows aren't clickable: the underlying RelationalOperationElement isn't a
|
|
200
|
+
* navigable graph node and the parent view is already focused via the
|
|
201
|
+
* surrounding tree row.
|
|
202
|
+
*/
|
|
203
|
+
const DatabaseTreeViewGroupByRow = observer((props) => {
|
|
204
|
+
const { editorState, view, index } = props;
|
|
205
|
+
const formula = resolveViewGroupByFormula(editorState.viewGroupByFormulas, view.schema.name, view.name, index);
|
|
206
|
+
const isLoading = editorState.isLoadingViewGroupByFormulas &&
|
|
207
|
+
!editorState.viewGroupByFormulas.has(`${view.schema.name}.${view.name}.groupBy[${index}]`);
|
|
208
|
+
return (_jsxs("div", { className: clsx('database-diagram__tree__column', 'database-diagram__tree__column--view', 'database-diagram__tree__column--view-meta', 'database-diagram__tree__column--readonly'), title: `group by [${index}]: ${formula}`, children: [_jsx("span", { className: "database-diagram__tree__column__icon", children: _jsx("span", { className: "database-diagram__tree__column__bullet", children: "\u00B7" }) }), _jsx("span", { className: "database-diagram__tree__column__name", children: `[${index}]` }), _jsx("span", { className: "database-diagram__tree__column__type", children: isLoading ? _jsx(FormulaSkeleton, {}) : formula }), !isLoading && (_jsx(CopyFormulaButton, { value: formula, label: "Copy expression" }))] }));
|
|
209
|
+
});
|
|
210
|
+
/**
|
|
211
|
+
* Renders one View row plus (when expanded) its column-mapping children.
|
|
212
|
+
* Visually distinct from the table row via the eye icon. Same click semantics
|
|
213
|
+
* as tables (select + expand).
|
|
214
|
+
*/
|
|
215
|
+
const DatabaseTreeViewRow = observer((props) => {
|
|
216
|
+
const { editorState, view } = props;
|
|
217
|
+
const query = editorState.searchText.trim().toLowerCase();
|
|
218
|
+
if (!relationMatchesSearch(view, query)) {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
const id = getRelationNodeId(view.schema.name, view.name);
|
|
222
|
+
// Same auto-expand-on-filter behavior as tables.
|
|
223
|
+
const isExpanded = query !== '' || editorState.expandedRelationIds.has(id);
|
|
224
|
+
const isSelected = editorState.selectedRelation === view;
|
|
225
|
+
const groupBy = view.groupBy;
|
|
226
|
+
const groupByCount = groupBy?.columns.length ?? 0;
|
|
227
|
+
const viewNameMatches = matchesSearch(view.name, query);
|
|
228
|
+
const visibleMappings = query === '' || viewNameMatches
|
|
229
|
+
? view.columnMappings
|
|
230
|
+
: view.columnMappings.filter((m) => matchesSearch(m.columnName, query));
|
|
231
|
+
return (_jsxs("div", { className: "database-diagram__tree__table database-diagram__tree__table--view", children: [_jsxs("button", { type: "button", className: clsx('database-diagram__tree__table__row', {
|
|
232
|
+
'database-diagram__tree__table__row--selected': isSelected,
|
|
233
|
+
}), onClick: () => {
|
|
234
|
+
editorState.focusOnRelation(view);
|
|
235
|
+
editorState.toggleRelationExpanded(id);
|
|
236
|
+
}, title: `${view.schema.name}.${view.name} (view)`, children: [_jsx("span", { className: "database-diagram__tree__caret", children: isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), _jsx(EyeIcon, {}), _jsx("span", { className: "database-diagram__tree__table__name", children: view.name }), _jsx("span", { className: "database-diagram__tree__table__count", children: view.columnMappings.length }), view.distinct === true && (_jsx("span", { className: "database-diagram__tree__table__view-tag database-diagram__tree__table__view-tag--distinct", title: "View applies DISTINCT", children: "DISTINCT" })), view.filter && (_jsx("span", { className: "database-diagram__tree__table__view-tag database-diagram__tree__table__view-tag--filtered", title: `Filtered by ${view.filter.filter.ownerReference.valueForSerialization ?? ''}.${view.filter.filterName}`, children: "FILTERED" })), groupByCount > 0 && (_jsx("span", { className: "database-diagram__tree__table__view-tag database-diagram__tree__table__view-tag--grouped", title: `GROUP BY ${groupByCount} expression${groupByCount === 1 ? '' : 's'}`, children: `GROUP BY (${groupByCount})` })), _jsx(DatabaseAnnotationDisplay, { stereotypes: view.stereotypes, taggedValues: view.taggedValues, layout: "compact" })] }), isExpanded && (_jsxs("div", { className: "database-diagram__tree__table__children", children: [visibleMappings.map((mapping) => (_jsx(DatabaseTreeViewColumnRow, { editorState: editorState, view: view, columnMapping: mapping }, mapping.columnName))), query === '' && view.filter && (_jsx(DatabaseTreeViewFilterRow, { editorState: editorState, view: view, filterMapping: view.filter })), query === '' &&
|
|
237
|
+
groupBy?.columns.map((_, index) => (_jsx(DatabaseTreeViewGroupByRow
|
|
238
|
+
// Ordering is the only identity for groupBy columns.
|
|
239
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
240
|
+
, { editorState: editorState, view: view, index: index }, `groupBy:${index}`)))] }))] }));
|
|
241
|
+
});
|
|
242
|
+
/**
|
|
243
|
+
* Renders one Schema header plus (when expanded) its Table and View children.
|
|
244
|
+
* Tables come before views within each schema — both kinds are siblings in
|
|
245
|
+
* the tree, distinguished only by icon and the column-row content.
|
|
246
|
+
*
|
|
247
|
+
* Schemas don't have a "selected" state — they only toggle.
|
|
248
|
+
*/
|
|
249
|
+
const DatabaseTreeSchemaRow = observer((props) => {
|
|
250
|
+
const { editorState, schema } = props;
|
|
251
|
+
const query = editorState.searchText.trim().toLowerCase();
|
|
252
|
+
if (!schemaMatchesSearch(schema, query)) {
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
const schemaId = getSchemaNodeId(schema.name);
|
|
256
|
+
// Force-expand under search so matches are immediately visible.
|
|
257
|
+
const isExpanded = query !== '' || editorState.expandedSchemaIds.has(schemaId);
|
|
258
|
+
const totalChildren = schema.tables.length + schema.views.length;
|
|
259
|
+
return (_jsxs("div", { className: "database-diagram__tree__schema", children: [_jsxs("button", { type: "button", className: "database-diagram__tree__schema__row", onClick: () => editorState.toggleSchemaExpanded(schemaId), children: [_jsx("span", { className: "database-diagram__tree__caret", children: isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), _jsx(PURE_DatabaseSchemaIcon, {}), _jsx("span", { className: "database-diagram__tree__schema__name", children: schema.name }), _jsx("span", { className: "database-diagram__tree__schema__count", children: totalChildren }), _jsx(DatabaseAnnotationDisplay, { stereotypes: schema.stereotypes, taggedValues: schema.taggedValues, layout: "compact" })] }), isExpanded && (_jsxs("div", { className: "database-diagram__tree__schema__children", children: [schema.tables.map((table) => (_jsx(DatabaseTreeTableRow, { editorState: editorState, table: table }, `table:${table.name}`))), schema.views.map((view) => (_jsx(DatabaseTreeViewRow, { editorState: editorState, view: view }, `view:${view.name}`)))] }))] }));
|
|
260
|
+
});
|
|
261
|
+
/**
|
|
262
|
+
* Renders one Lakehouse `IncludeStore` reference: an `ExternalLinkIcon`-
|
|
263
|
+
* suffixed button whose body shows the generator element path and a small
|
|
264
|
+
* `storeType` badge to differentiate the kinds of generator (DataProduct vs
|
|
265
|
+
* IngestDefinition vs whatever future types appear). Clicking opens the
|
|
266
|
+
* generator element in a new tab — same affordance as the classic
|
|
267
|
+
* "Included Stores" rows above. Kept as a named sub-component (not an
|
|
268
|
+
* inline IIFE) so the JSX in `DatabaseSchemaTree` stays readable.
|
|
269
|
+
*/
|
|
270
|
+
const LakehouseStoreRow = observer((props) => {
|
|
271
|
+
const { editorState, spec } = props;
|
|
272
|
+
const path = spec.packageableElementPointer.valueForSerialization ??
|
|
273
|
+
spec.packageableElementPointer.value.path;
|
|
274
|
+
return (_jsxs("button", { type: "button", className: "database-diagram__side-panel__included-store", title: `${path}\n(generator: ${spec.storeType})\n\n(click to open)`, onClick: () => editorState.editorStore.graphEditorMode.openElement(spec.packageableElementPointer.value), children: [_jsx(PURE_DataProductIcon, {}), _jsx("span", { className: "database-diagram__side-panel__included-store__path", children: path }), _jsx("span", { className: "database-diagram__side-panel__included-store__type", children: spec.storeType }), _jsx("span", { className: "database-diagram__side-panel__included-store__open", children: _jsx(ExternalLinkIcon, {}) })] }));
|
|
275
|
+
});
|
|
276
|
+
/**
|
|
277
|
+
* The full side-panel tree. Renders schemas → (tables, views) → columns plus
|
|
278
|
+
* a flat "Joins" section at the bottom (joins are cross-relation
|
|
279
|
+
* relationships and don't naturally fit in the tree hierarchy).
|
|
280
|
+
*
|
|
281
|
+
* State (selection, expansion) lives entirely in `DatabaseEditorState` so it
|
|
282
|
+
* survives reprocessing and so other components (the canvas) can react to it.
|
|
283
|
+
*/
|
|
284
|
+
export const DatabaseSchemaTree = observer((props) => {
|
|
285
|
+
const { editorState } = props;
|
|
286
|
+
const { database } = editorState;
|
|
287
|
+
const query = editorState.searchText.trim().toLowerCase();
|
|
288
|
+
// Pre-compute filtered counts so each section header surfaces "showing
|
|
289
|
+
// N of M" feedback when the user is filtering. Cheap walks on the
|
|
290
|
+
// already-typed query \u2014 we don't memoize because the per-render cost
|
|
291
|
+
// is dominated by row JSX, not these filters.
|
|
292
|
+
const visibleSchemas = query === ''
|
|
293
|
+
? database.schemas
|
|
294
|
+
: database.schemas.filter((s) => schemaMatchesSearch(s, query));
|
|
295
|
+
const visibleJoins = query === ''
|
|
296
|
+
? database.joins
|
|
297
|
+
: database.joins.filter((j) => matchesSearch(j.name, query));
|
|
298
|
+
const visibleFilters = query === ''
|
|
299
|
+
? database.filters
|
|
300
|
+
: database.filters.filter((f) => matchesSearch(f.name, query));
|
|
301
|
+
return (_jsxs("div", { className: "database-diagram__side-panel", children: [_jsxs("div", { className: "database-diagram__side-panel__toolbar", children: [_jsxs("div", { className: "database-diagram__side-panel__search", children: [_jsx(SearchIcon, {}), _jsx("input", { type: "text", className: "database-diagram__side-panel__search__input", placeholder: "Filter schemas, tables, columns...", value: editorState.searchText, onChange: (e) => editorState.setSearchText(e.target.value), spellCheck: false }), editorState.searchText !== '' && (_jsx("button", { type: "button", className: "database-diagram__side-panel__search__clear", title: "Clear filter", onClick: () => editorState.setSearchText(''), children: _jsx(TimesIcon, {}) }))] }), _jsx("button", { type: "button", className: "database-diagram__side-panel__toolbar__btn", title: "Expand all schemas", onClick: () => editorState.expandAllSchemas(), children: _jsx(ExpandAllIcon, {}) }), _jsx("button", { type: "button", className: "database-diagram__side-panel__toolbar__btn", title: "Collapse all", onClick: () => editorState.collapseAll(), children: _jsx(CompressIcon, {}) })] }), (database.stereotypes.length > 0 ||
|
|
302
|
+
database.taggedValues.length > 0) && (_jsxs("div", { className: "database-diagram__side-panel__section", children: [_jsx("div", { className: "database-diagram__side-panel__section__header", children: "Annotations" }), _jsx("div", { className: "database-diagram__side-panel__annotations", children: _jsx(DatabaseAnnotationDisplay, { stereotypes: database.stereotypes, taggedValues: database.taggedValues, layout: "block" }) })] })), _jsxs("div", { className: "database-diagram__side-panel__section", children: [_jsxs("div", { className: "database-diagram__side-panel__section__header", children: ["Schemas", ' ', _jsx("span", { className: "database-diagram__side-panel__section__count", children: query === ''
|
|
303
|
+
? `(${database.schemas.length})`
|
|
304
|
+
: `(${visibleSchemas.length}/${database.schemas.length})` })] }), database.schemas.length === 0 ? (_jsx(EmptySectionRow, { message: "No schemas defined." })) : visibleSchemas.length === 0 ? (_jsx(EmptySectionRow, { message: "No schemas match the current filter." })) : (database.schemas.map((schema) => (_jsx(DatabaseTreeSchemaRow, { editorState: editorState, schema: schema }, schema.name))))] }), _jsxs("div", { className: "database-diagram__side-panel__section", children: [_jsxs("div", { className: "database-diagram__side-panel__section__header", children: ["Joins", ' ', _jsx("span", { className: "database-diagram__side-panel__section__count", children: query === ''
|
|
305
|
+
? `(${database.joins.length})`
|
|
306
|
+
: `(${visibleJoins.length}/${database.joins.length})` })] }), database.joins.length === 0 ? (_jsx(EmptySectionRow, { message: "No joins defined." })) : visibleJoins.length === 0 ? (_jsx(EmptySectionRow, { message: "No joins match the current filter." })) : (visibleJoins.map((join) => {
|
|
307
|
+
const isSelected = editorState.selectedJoin === join;
|
|
308
|
+
const formula = resolveJoinFormula(editorState.joinFormulas, join.name);
|
|
309
|
+
const isLoading = editorState.isLoadingJoinFormulas &&
|
|
310
|
+
!editorState.joinFormulas.has(join.name);
|
|
311
|
+
const selfJoin = isSelfJoin(join);
|
|
312
|
+
const crossDb = !selfJoin && isCrossDatabaseJoin(join, database);
|
|
313
|
+
return (_jsxs("button", { type: "button", className: clsx('database-diagram__side-panel__join', {
|
|
314
|
+
'database-diagram__side-panel__join--selected': isSelected,
|
|
315
|
+
}), onClick: () => editorState.focusOnJoin(join), title: `${join.name}: ${formula}`, children: [_jsx("span", { className: "database-diagram__side-panel__join__icon", children: _jsx(PURE_DatabaseTableJoinIcon, {}) }), _jsxs("span", { className: "database-diagram__side-panel__join__body", children: [_jsxs("span", { className: "database-diagram__side-panel__join__name", children: [join.name, selfJoin && (_jsx("span", { className: "database-diagram__side-panel__join__marker database-diagram__side-panel__join__marker--self", title: "Self-join (source and target are the same relation)", children: "SELF" })), crossDb && (_jsx("span", { className: "database-diagram__side-panel__join__marker database-diagram__side-panel__join__marker--cross-db", title: "Cross-database join (one or both endpoints live in an included store)", children: "CROSS-DB" }))] }), _jsx("span", { className: "database-diagram__side-panel__join__formula", children: isLoading ? _jsx(FormulaSkeleton, {}) : formula })] }), !isLoading && (_jsx(CopyFormulaButton, { value: formula, label: "Copy join formula" }))] }, join.name));
|
|
316
|
+
}))] }), _jsxs("div", { className: "database-diagram__side-panel__section", children: [_jsxs("div", { className: "database-diagram__side-panel__section__header", children: ["Filters", ' ', _jsx("span", { className: "database-diagram__side-panel__section__count", children: query === ''
|
|
317
|
+
? `(${database.filters.length})`
|
|
318
|
+
: `(${visibleFilters.length}/${database.filters.length})` })] }), database.filters.length === 0 ? (_jsx(EmptySectionRow, { message: "No filters defined." })) : visibleFilters.length === 0 ? (_jsx(EmptySectionRow, { message: "No filters match the current filter." })) : (visibleFilters.map((filter) => {
|
|
319
|
+
const isSelected = editorState.selectedFilter === filter;
|
|
320
|
+
const formula = resolveFilterFormula(editorState.filterFormulas, filter.name);
|
|
321
|
+
const isLoading = editorState.isLoadingFilterFormulas &&
|
|
322
|
+
!editorState.filterFormulas.has(filter.name);
|
|
323
|
+
return (_jsxs("button", { type: "button", className: clsx('database-diagram__side-panel__filter', {
|
|
324
|
+
'database-diagram__side-panel__filter--selected': isSelected,
|
|
325
|
+
}), onClick: () => editorState.focusOnFilter(filter), title: `${filter.name}: ${formula}`, children: [_jsx("span", { className: "database-diagram__side-panel__filter__icon", children: _jsx(FilterIcon, {}) }), _jsxs("span", { className: "database-diagram__side-panel__filter__body", children: [_jsx("span", { className: "database-diagram__side-panel__filter__name", children: filter.name }), _jsx("span", { className: "database-diagram__side-panel__filter__formula", children: isLoading ? _jsx(FormulaSkeleton, {}) : formula })] }), !isLoading && (_jsx(CopyFormulaButton, { value: formula, label: "Copy filter formula" }))] }, filter.name));
|
|
326
|
+
}))] }), database.includes.length > 0 && (_jsxs("div", { className: "database-diagram__side-panel__section", children: [_jsxs("div", { className: "database-diagram__side-panel__section__header", children: ["Included Stores", ' ', _jsxs("span", { className: "database-diagram__side-panel__section__count", children: ["(", database.includes.length, ")"] })] }), database.includes.map((ref) => {
|
|
327
|
+
const path = ref.valueForSerialization ?? ref.value.path;
|
|
328
|
+
return (_jsxs("button", { type: "button", className: "database-diagram__side-panel__included-store", title: `${path}\n\n(click to open)`, onClick: () => editorState.editorStore.graphEditorMode.openElement(ref.value), children: [_jsx(PURE_DatabaseIcon, {}), _jsx("span", { className: "database-diagram__side-panel__included-store__path", children: path }), _jsx("span", { className: "database-diagram__side-panel__included-store__open", children: _jsx(ExternalLinkIcon, {}) })] }, path));
|
|
329
|
+
})] })), database.includedStoreSpecifications.length > 0 && (_jsxs("div", { className: "database-diagram__side-panel__section", children: [_jsxs("div", { className: "database-diagram__side-panel__section__header", children: ["Lakehouse Stores", ' ', _jsxs("span", { className: "database-diagram__side-panel__section__count", children: ["(", database.includedStoreSpecifications.length, ")"] })] }), database.includedStoreSpecifications.map((spec) => (_jsx(LakehouseStoreRow, { editorState: editorState, spec: spec }, `${spec.storeType}:${spec.packageableElementPointer.value.path}`)))] }))] }));
|
|
330
|
+
});
|
|
331
|
+
//# sourceMappingURL=DatabaseSchemaTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabaseSchemaTree.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/database-editor/DatabaseSchemaTree.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,EACpB,UAAU,EACV,SAAS,EACT,IAAI,GACL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAQN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAEL,iBAAiB,EACjB,eAAe,GAChB,MAAM,oFAAoF,CAAC;AAC5F,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAOpC;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAgD,CAAC,EACtE,KAAK,EACL,KAAK,GAAG,MAAM,GACf,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,4BAA4B,EAAE;YAC5C,oCAAoC,EAAE,MAAM;SAC7C,CAAC,EACF,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EACjC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;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