feat(appui): add dees-appui-bottombar component with config, programmatic API, demo and docs
This commit is contained in:
112
readme.hints.md
112
readme.hints.md
@@ -800,4 +800,114 @@ html`
|
||||
- **External Router Support**: Integrate with Angular Router or other frameworks
|
||||
- **State Persistence**: Save/restore collapsed menus, selections, and current view
|
||||
- **View-specific Menus**: Each view can define its own secondary menu and tabs
|
||||
- **Full Backward Compatibility**: Existing code continues to work
|
||||
- **Full Backward Compatibility**: Existing code continues to work
|
||||
|
||||
## AppUI Bottom Bar (2026-01-03)
|
||||
|
||||
Added a new `dees-appui-bottombar` component similar to `dees-workspace-bottombar`, providing a 24px fixed-height status bar at the bottom of the app shell.
|
||||
|
||||
### Features:
|
||||
- **Generic status widgets**: Configurable widgets with icon, label, status colors, loading spinner
|
||||
- **App-specific actions**: Quick action buttons with icons and tooltips
|
||||
- **Always visible**: Fixed 24px height at the bottom of the app
|
||||
- **Status colors**: idle, active (blue), success (green), warning (yellow), error (red)
|
||||
- **Context menus**: Widgets can have right-click context menus
|
||||
|
||||
### New Interfaces (in `interfaces/appconfig.ts`):
|
||||
|
||||
```typescript
|
||||
interface IBottomBarWidget {
|
||||
id: string;
|
||||
iconName?: string;
|
||||
label?: string;
|
||||
status?: 'idle' | 'active' | 'success' | 'warning' | 'error';
|
||||
tooltip?: string;
|
||||
loading?: boolean;
|
||||
onClick?: () => void;
|
||||
contextMenuItems?: IBottomBarContextMenuItem[];
|
||||
position?: 'left' | 'right';
|
||||
order?: number;
|
||||
}
|
||||
|
||||
interface IBottomBarAction {
|
||||
id: string;
|
||||
iconName: string;
|
||||
tooltip?: string;
|
||||
onClick: () => void | Promise<void>;
|
||||
disabled?: boolean;
|
||||
position?: 'left' | 'right';
|
||||
}
|
||||
|
||||
interface IBottomBarConfig {
|
||||
visible?: boolean;
|
||||
widgets?: IBottomBarWidget[];
|
||||
actions?: IBottomBarAction[];
|
||||
}
|
||||
```
|
||||
|
||||
### Usage via configure():
|
||||
|
||||
```typescript
|
||||
const config: IAppConfig = {
|
||||
// ... other config
|
||||
bottomBar: {
|
||||
visible: true,
|
||||
widgets: [
|
||||
{
|
||||
id: 'status',
|
||||
iconName: 'lucide:activity',
|
||||
label: 'System Online',
|
||||
status: 'success',
|
||||
tooltip: 'All systems operational',
|
||||
onClick: () => console.log('Status clicked'),
|
||||
},
|
||||
{
|
||||
id: 'notifications',
|
||||
iconName: 'lucide:bell',
|
||||
label: '3 notifications',
|
||||
status: 'warning',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
id: 'version',
|
||||
iconName: 'lucide:gitBranch',
|
||||
label: 'v1.2.3',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
id: 'terminal',
|
||||
iconName: 'lucide:terminal',
|
||||
tooltip: 'Open Terminal',
|
||||
position: 'right',
|
||||
onClick: () => console.log('Terminal clicked'),
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### Programmatic API:
|
||||
|
||||
```typescript
|
||||
// Add/update/remove widgets
|
||||
appui.bottomBar.addWidget({ id: 'status', ... });
|
||||
appui.bottomBar.updateWidget('status', { status: 'error', label: 'Error!' });
|
||||
appui.bottomBar.removeWidget('status');
|
||||
appui.bottomBar.clearWidgets();
|
||||
|
||||
// Add/remove actions
|
||||
appui.bottomBar.addAction({ id: 'refresh', iconName: 'lucide:refreshCw', ... });
|
||||
appui.bottomBar.removeAction('refresh');
|
||||
appui.bottomBar.clearActions();
|
||||
|
||||
// Visibility control
|
||||
appui.setBottomBarVisible(false);
|
||||
appui.getBottomBarVisible();
|
||||
```
|
||||
|
||||
### Files:
|
||||
- `ts_web/elements/00group-appui/dees-appui-bottombar/dees-appui-bottombar.ts` - Main component
|
||||
- `ts_web/elements/00group-appui/dees-appui-bottombar/dees-appui-bottombar.demo.ts` - Demo
|
||||
- `ts_web/elements/interfaces/appconfig.ts` - New interfaces added
|
||||
Reference in New Issue
Block a user