diff --git a/changelog.md b/changelog.md index b4ec99a..1eb05d2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## 2025-12-29 - 3.8.0 - feat(dees-appui-base) +add interactive demo controls to manipulate appui via view activation context + +- Store IViewActivationContext on the demo element (this.ctx) during onActivate +- Add a new "Context Actions" UI section with buttons that call ctx.appui methods (toggle main/secondary menus, content tabs, collapse/expand main menu, set breadcrumbs, navigate to views, add activity entry, set/clear menu badges) +- Include styles for ctx-actions and button variants (success, danger, hover states) +- Change is limited to the demo file (dees-appui-base.demo.ts) and is non-breaking + ## 2025-12-29 - 3.7.1 - fix(dees-appui-maincontent) migrate main content layout to CSS Grid and enable topbar collapse transitions diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index b3deea1..490d99e 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@design.estate/dees-catalog', - version: '3.7.1', + version: '3.8.0', description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.' } diff --git a/ts_web/elements/00group-appui/dees-appui-base/dees-appui-base.demo.ts b/ts_web/elements/00group-appui/dees-appui-base/dees-appui-base.demo.ts index 3ab9edb..900ded7 100644 --- a/ts_web/elements/00group-appui/dees-appui-base/dees-appui-base.demo.ts +++ b/ts_web/elements/00group-appui/dees-appui-base/dees-appui-base.demo.ts @@ -9,7 +9,10 @@ class DemoDashboardView extends DeesElement { @state() accessor activated: boolean = false; + private ctx: IViewActivationContext; + onActivate(context: IViewActivationContext) { + this.ctx = context; this.activated = true; console.log('Dashboard activated with context:', context); @@ -75,6 +78,52 @@ class DemoDashboardView extends DeesElement { .metric { font-size: 32px; font-weight: 700; color: #fafafa; } .status { display: inline-block; padding: 2px 8px; border-radius: 9px; font-size: 12px; } .status.active { background: #14532d; color: #4ade80; } + + .ctx-actions { + margin-top: 32px; + padding: 24px; + background: rgba(255,255,255,0.02); + border: 1px solid rgba(255,255,255,0.08); + border-radius: 8px; + } + .ctx-actions h2 { color: #fafafa; font-size: 16px; font-weight: 600; margin-bottom: 16px; } + .button-grid { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + .ctx-btn { + background: rgba(59, 130, 246, 0.1); + border: 1px solid rgba(59, 130, 246, 0.3); + color: #60a5fa; + padding: 8px 16px; + border-radius: 6px; + cursor: pointer; + font-size: 13px; + transition: all 0.15s ease; + } + .ctx-btn:hover { + background: rgba(59, 130, 246, 0.2); + border-color: rgba(59, 130, 246, 0.5); + } + .ctx-btn.danger { + background: rgba(239, 68, 68, 0.1); + border-color: rgba(239, 68, 68, 0.3); + color: #f87171; + } + .ctx-btn.danger:hover { + background: rgba(239, 68, 68, 0.2); + border-color: rgba(239, 68, 68, 0.5); + } + .ctx-btn.success { + background: rgba(34, 197, 94, 0.1); + border-color: rgba(34, 197, 94, 0.3); + color: #4ade80; + } + .ctx-btn.success:hover { + background: rgba(34, 197, 94, 0.2); + border-color: rgba(34, 197, 94, 0.5); + }

Dashboard

Welcome back! Here's an overview of your system.

@@ -95,6 +144,26 @@ class DemoDashboardView extends DeesElement {

All systems operational

+ +
+

Context Actions (ctx.appui)

+
+ + + + + + + + + + + + + + +
+
`; } }