diff --git a/packages/web/public/global.css b/packages/web/public/global.css index 05ac2642..2b0fd843 100644 --- a/packages/web/public/global.css +++ b/packages/web/public/global.css @@ -34,6 +34,12 @@ body { .flex { display: flex; } +.nowrap { + white-space: nowrap; +} +.bold { + font-weight: bold; +} .col-9 { flex-basis: 75%; diff --git a/packages/web/src/datagrid/ColumnManager.svelte b/packages/web/src/datagrid/ColumnManager.svelte index 199ab3e5..745491dc 100644 --- a/packages/web/src/datagrid/ColumnManager.svelte +++ b/packages/web/src/datagrid/ColumnManager.svelte @@ -11,18 +11,18 @@ export let managerSize; export let display: GridDisplay; - let columnFilter; + let filter; - + display.hideAllColumns()}>Hide display.showAllColumns()}>Show {#each display - .getColumns(columnFilter) - .filter(column => filterName(columnFilter, column.columnName)) as column (column.uniqueName)} + .getColumns(filter) + .filter(column => filterName(filter, column.columnName)) as column (column.uniqueName)} {/each} diff --git a/packages/web/src/datagrid/DataGrid.svelte b/packages/web/src/datagrid/DataGrid.svelte index 1a80af33..d0194289 100644 --- a/packages/web/src/datagrid/DataGrid.svelte +++ b/packages/web/src/datagrid/DataGrid.svelte @@ -3,9 +3,12 @@ import WidgetColumnBar from '../widgets/WidgetColumnBar.svelte'; import WidgetColumnBarItem from '../widgets/WidgetColumnBarItem.svelte'; import ColumnManager from './ColumnManager.svelte'; + import ReferenceManager from './ReferenceManager.svelte'; export let config; export let gridCoreComponent; + + export let isDetailView = false; export let showReferences = true; let managerSize; @@ -14,8 +17,13 @@
- - + + + + + + +
diff --git a/packages/web/src/datagrid/ReferenceManager.svelte b/packages/web/src/datagrid/ReferenceManager.svelte new file mode 100644 index 00000000..d54bbc0b --- /dev/null +++ b/packages/web/src/datagrid/ReferenceManager.svelte @@ -0,0 +1,88 @@ + + + + + + + {#if foreignKeys.length > 0} +
References tables ({foreignKeys.length})
+ {#each foreignKeys.filter(fk => filterName(filter, fk.refTableName)) as fk} + + {/each} + {/if} + + {#if dependencies.length > 0} +
References tables ({dependencies.length})
+ {#each dependencies.filter(fk => filterName(filter, fk.pureName)) as fk} + + {/each} + {/if} +
+ + diff --git a/packages/web/src/widgets/WidgetColumnBarItem.svelte b/packages/web/src/widgets/WidgetColumnBarItem.svelte index a6db5873..ed543c7f 100644 --- a/packages/web/src/widgets/WidgetColumnBarItem.svelte +++ b/packages/web/src/widgets/WidgetColumnBarItem.svelte @@ -2,7 +2,9 @@ export let title; export let name; export let height = null; - export let visible = true; + export let collapsed = null; + + let visible = !collapsed;
(visible = !visible)}>{title}