feat(dees-appui): add visibility toggles for main/secondary menus and ability to show/hide content tabs; expose corresponding setters and appconfig entries

This commit is contained in:
2025-12-29 02:55:03 +00:00
parent 76748a81c9
commit 1f37474d3f
5 changed files with 101 additions and 20 deletions

View File

@@ -43,6 +43,9 @@ export class DeesAppuiMaincontent extends DeesElement {
@property({ type: Object })
accessor selectedTab: interfaces.IMenuItem | null = null;
@property({ type: Boolean })
accessor showTabs: boolean = true;
public static styles = [
themeDefaultStyles,
cssManager.defaultStyles,
@@ -78,6 +81,14 @@ export class DeesAppuiMaincontent extends DeesElement {
bottom: 0;
overflow: auto;
}
:host([notabs]) .topbar {
display: none;
}
:host([notabs]) .content-area {
top: 0;
}
`,
];
@@ -112,8 +123,23 @@ export class DeesAppuiMaincontent extends DeesElement {
}));
}
updated(changedProperties: Map<string | number | symbol, unknown>) {
super.updated(changedProperties);
if (changedProperties.has('showTabs')) {
if (this.showTabs) {
this.removeAttribute('notabs');
} else {
this.setAttribute('notabs', '');
}
}
}
async firstUpdated(_changedProperties: Map<string | number | symbol, unknown>) {
await super.firstUpdated(_changedProperties);
// Apply initial notabs state
if (!this.showTabs) {
this.setAttribute('notabs', '');
}
// Tab selection is now handled by the dees-appui-tabs component
// But we need to ensure the tabs component is ready
const tabsComponent = this.shadowRoot.querySelector('dees-appui-tabs') as DeesAppuiTabs;