| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  | import { html, css } from '@design.estate/dees-element'; | 
					
						
							|  |  |  | import type { DeesAppuiBase } from './dees-appui-base.js'; | 
					
						
							|  |  |  | import type { IAppBarMenuItem } from './interfaces/appbarmenuitem.js'; | 
					
						
							|  |  |  | import type { ITab } from './interfaces/tab.js'; | 
					
						
							|  |  |  | import type { ISelectionOption } from './interfaces/selectionoption.js'; | 
					
						
							| 
									
										
										
										
											2025-06-17 09:55:28 +00:00
										 |  |  | import * as plugins from './00plugins.js'; | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  | import '@design.estate/dees-wcctools/demotools'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const demoFunc = () => { | 
					
						
							|  |  |  |   // Menu items for the appbar
 | 
					
						
							|  |  |  |   const menuItems: IAppBarMenuItem[] = [ | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       name: 'File', | 
					
						
							|  |  |  |       action: async () => {}, | 
					
						
							|  |  |  |       submenu: [ | 
					
						
							|  |  |  |         { name: 'New Project', shortcut: 'Cmd+N', iconName: 'filePlus', action: async () => console.log('New project') }, | 
					
						
							|  |  |  |         { name: 'Open Project...', shortcut: 'Cmd+O', iconName: 'folderOpen', action: async () => console.log('Open project') }, | 
					
						
							|  |  |  |         { name: 'Recent Projects', action: async () => {}, submenu: [ | 
					
						
							|  |  |  |           { name: 'my-app', action: async () => console.log('Open my-app') }, | 
					
						
							|  |  |  |           { name: 'component-lib', action: async () => console.log('Open component-lib') }, | 
					
						
							|  |  |  |           { name: 'api-server', action: async () => console.log('Open api-server') }, | 
					
						
							|  |  |  |         ]}, | 
					
						
							|  |  |  |         { divider: true }, | 
					
						
							|  |  |  |         { name: 'Save All', shortcut: 'Cmd+Shift+S', iconName: 'save', action: async () => console.log('Save all') }, | 
					
						
							|  |  |  |         { divider: true }, | 
					
						
							|  |  |  |         { name: 'Close Project', action: async () => console.log('Close project') }, | 
					
						
							|  |  |  |       ] | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       name: 'Edit', | 
					
						
							|  |  |  |       action: async () => {}, | 
					
						
							|  |  |  |       submenu: [ | 
					
						
							|  |  |  |         { name: 'Undo', shortcut: 'Cmd+Z', iconName: 'undo', action: async () => console.log('Undo') }, | 
					
						
							|  |  |  |         { name: 'Redo', shortcut: 'Cmd+Shift+Z', iconName: 'redo', action: async () => console.log('Redo') }, | 
					
						
							|  |  |  |         { divider: true }, | 
					
						
							|  |  |  |         { name: 'Cut', shortcut: 'Cmd+X', iconName: 'scissors', action: async () => console.log('Cut') }, | 
					
						
							|  |  |  |         { name: 'Copy', shortcut: 'Cmd+C', iconName: 'copy', action: async () => console.log('Copy') }, | 
					
						
							|  |  |  |         { name: 'Paste', shortcut: 'Cmd+V', iconName: 'clipboard', action: async () => console.log('Paste') }, | 
					
						
							|  |  |  |       ] | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       name: 'View', | 
					
						
							|  |  |  |       action: async () => {}, | 
					
						
							|  |  |  |       submenu: [ | 
					
						
							|  |  |  |         { name: 'Toggle Sidebar', shortcut: 'Cmd+B', action: async () => console.log('Toggle sidebar') }, | 
					
						
							|  |  |  |         { name: 'Toggle Terminal', shortcut: 'Cmd+J', iconName: 'terminal', action: async () => console.log('Toggle terminal') }, | 
					
						
							|  |  |  |         { divider: true }, | 
					
						
							|  |  |  |         { name: 'Zoom In', shortcut: 'Cmd++', iconName: 'zoomIn', action: async () => console.log('Zoom in') }, | 
					
						
							|  |  |  |         { name: 'Zoom Out', shortcut: 'Cmd+-', iconName: 'zoomOut', action: async () => console.log('Zoom out') }, | 
					
						
							|  |  |  |         { name: 'Reset Zoom', shortcut: 'Cmd+0', action: async () => console.log('Reset zoom') }, | 
					
						
							|  |  |  |       ] | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       name: 'Help', | 
					
						
							|  |  |  |       action: async () => {}, | 
					
						
							|  |  |  |       submenu: [ | 
					
						
							|  |  |  |         { name: 'Documentation', iconName: 'book', action: async () => console.log('Documentation') }, | 
					
						
							|  |  |  |         { name: 'Release Notes', iconName: 'fileText', action: async () => console.log('Release notes') }, | 
					
						
							|  |  |  |         { divider: true }, | 
					
						
							|  |  |  |         { name: 'Report Issue', iconName: 'bug', action: async () => console.log('Report issue') }, | 
					
						
							|  |  |  |         { name: 'About', iconName: 'info', action: async () => console.log('About') }, | 
					
						
							|  |  |  |       ] | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // Main menu tabs (left sidebar)
 | 
					
						
							|  |  |  |   const mainMenuTabs: ITab[] = [ | 
					
						
							| 
									
										
										
										
											2025-06-27 22:55:20 +00:00
										 |  |  |     { key: 'dashboard', iconName: 'lucide:home', action: () => console.log('Dashboard selected') }, | 
					
						
							|  |  |  |     { key: 'projects', iconName: 'lucide:folder', action: () => console.log('Projects selected') }, | 
					
						
							|  |  |  |     { key: 'analytics', iconName: 'lucide:lineChart', action: () => console.log('Analytics selected') }, | 
					
						
							|  |  |  |     { key: 'settings', iconName: 'lucide:settings', action: () => console.log('Settings selected') }, | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |   ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // Selector options (second sidebar)
 | 
					
						
							| 
									
										
										
										
											2025-06-17 10:00:50 +00:00
										 |  |  |   const selectorOptions: (ISelectionOption | { divider: true })[] = [ | 
					
						
							|  |  |  |     { key: 'Overview', iconName: 'home', action: () => console.log('Overview selected') }, | 
					
						
							|  |  |  |     { key: 'Components', iconName: 'package', action: () => console.log('Components selected') }, | 
					
						
							|  |  |  |     { key: 'Services', iconName: 'server', action: () => console.log('Services selected') }, | 
					
						
							|  |  |  |     { divider: true }, | 
					
						
							|  |  |  |     { key: 'Database', iconName: 'database', action: () => console.log('Database selected') }, | 
					
						
							|  |  |  |     { key: 'Settings', iconName: 'settings', action: () => console.log('Settings selected') }, | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |   ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // Main content tabs
 | 
					
						
							|  |  |  |   const mainContentTabs: ITab[] = [ | 
					
						
							| 
									
										
										
										
											2025-06-27 22:55:20 +00:00
										 |  |  |     { key: 'Details', iconName: 'lucide:file', action: () => console.log('Details tab') }, | 
					
						
							|  |  |  |     { key: 'Logs', iconName: 'lucide:list', action: () => console.log('Logs tab') }, | 
					
						
							|  |  |  |     { key: 'Metrics', iconName: 'lucide:lineChart', action: () => console.log('Metrics tab') }, | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |   ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-17 09:55:28 +00:00
										 |  |  |   // Profile menu items
 | 
					
						
							|  |  |  |   const profileMenuItems: (plugins.tsclass.website.IMenuItem & { shortcut?: string } | { divider: true })[] = [ | 
					
						
							|  |  |  |     { name: 'Profile Settings', iconName: 'user', action: async () => console.log('Profile settings') }, | 
					
						
							|  |  |  |     { name: 'Account', iconName: 'settings', action: async () => console.log('Account settings') }, | 
					
						
							|  |  |  |     { divider: true }, | 
					
						
							|  |  |  |     { name: 'Help & Support', iconName: 'helpCircle', action: async () => console.log('Help') }, | 
					
						
							|  |  |  |     { name: 'Keyboard Shortcuts', iconName: 'keyboard', shortcut: 'Cmd+K', action: async () => console.log('Shortcuts') }, | 
					
						
							|  |  |  |     { divider: true }, | 
					
						
							|  |  |  |     { name: 'Sign Out', iconName: 'logOut', action: async () => console.log('Sign out') } | 
					
						
							|  |  |  |   ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |   return html`
 | 
					
						
							| 
									
										
										
										
											2025-06-17 08:58:47 +00:00
										 |  |  |     <dees-demowrapper> | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |       <style> | 
					
						
							|  |  |  |         ${css`
 | 
					
						
							|  |  |  |         .demo-container { | 
					
						
							| 
									
										
										
										
											2025-06-17 11:45:25 +00:00
										 |  |  |           position: absolute; | 
					
						
							|  |  |  |           top: 0; | 
					
						
							|  |  |  |           left: 0; | 
					
						
							|  |  |  |           height: 100%; | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |           width: 100%; | 
					
						
							|  |  |  |           overflow: hidden; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |       `}
 | 
					
						
							|  |  |  |       </style> | 
					
						
							|  |  |  |        | 
					
						
							|  |  |  |       <div class="demo-container"> | 
					
						
							|  |  |  |         <dees-appui-base | 
					
						
							|  |  |  |           .appbarMenuItems=${menuItems} | 
					
						
							|  |  |  |           .appbarBreadcrumbs=${'Dashboard'} | 
					
						
							|  |  |  |           .appbarUser=${{ | 
					
						
							|  |  |  |             name: 'Jane Smith', | 
					
						
							| 
									
										
										
										
											2025-06-17 09:55:28 +00:00
										 |  |  |             email: 'jane.smith@example.com', | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |             status: 'online' as 'online' | 'offline' | 'busy' | 'away' | 
					
						
							|  |  |  |           }} | 
					
						
							| 
									
										
										
										
											2025-06-17 09:55:28 +00:00
										 |  |  |           .appbarProfileMenuItems=${profileMenuItems} | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |           .appbarShowWindowControls=${true} | 
					
						
							|  |  |  |           .appbarShowSearch=${true} | 
					
						
							|  |  |  |           .mainmenuTabs=${mainMenuTabs} | 
					
						
							|  |  |  |           .mainselectorOptions=${selectorOptions} | 
					
						
							|  |  |  |           .maincontentTabs=${mainContentTabs} | 
					
						
							|  |  |  |           @appbar-menu-select=${(e: CustomEvent) => console.log('Menu selected:', e.detail)} | 
					
						
							|  |  |  |           @appbar-breadcrumb-navigate=${(e: CustomEvent) => console.log('Breadcrumb:', e.detail)} | 
					
						
							|  |  |  |           @appbar-search-click=${() => console.log('Search clicked')} | 
					
						
							|  |  |  |           @appbar-user-menu-open=${() => console.log('User menu opened')} | 
					
						
							| 
									
										
										
										
											2025-06-17 09:55:28 +00:00
										 |  |  |           @appbar-profile-menu-select=${(e: CustomEvent) => console.log('Profile menu selected:', e.detail)} | 
					
						
							| 
									
										
										
										
											2025-06-17 08:41:36 +00:00
										 |  |  |           @mainmenu-tab-select=${(e: CustomEvent) => console.log('Tab selected:', e.detail)} | 
					
						
							|  |  |  |           @mainselector-option-select=${(e: CustomEvent) => console.log('Option selected:', e.detail)} | 
					
						
							|  |  |  |         > | 
					
						
							|  |  |  |           <div slot="maincontent" style="padding: 40px; color: #ccc;"> | 
					
						
							|  |  |  |             <h1>Application Content</h1> | 
					
						
							|  |  |  |             <p>This is the main content area where your application's primary interface would be displayed.</p> | 
					
						
							|  |  |  |             <p>The layout includes:</p> | 
					
						
							|  |  |  |             <ul> | 
					
						
							|  |  |  |               <li>App bar with menus, breadcrumbs, and user account</li> | 
					
						
							|  |  |  |               <li>Main menu (left sidebar) for primary navigation</li> | 
					
						
							|  |  |  |               <li>Selector menu (second sidebar) for sub-navigation</li> | 
					
						
							|  |  |  |               <li>Main content area (this section)</li> | 
					
						
							|  |  |  |               <li>Activity log (right sidebar)</li> | 
					
						
							|  |  |  |             </ul> | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |         </dees-appui-base> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </dees-demowrapper> | 
					
						
							|  |  |  |   `;
 | 
					
						
							|  |  |  | }; |