fix(ts_web): resolve TypeScript nullability and event typing issues across web components

This commit is contained in:
2026-04-01 05:00:21 +00:00
parent b1c8a7446e
commit af1f660486
78 changed files with 429 additions and 399 deletions

View File

@@ -447,7 +447,7 @@ export class DeesWorkspaceFiletree extends DeesElement {
e.preventDefault();
e.stopPropagation();
const menuItems = [];
const menuItems: Array<{ name?: string; iconName?: string; action?: () => Promise<void>; divider?: boolean }> = [];
if (node.type === 'directory') {
// Directory-specific options
@@ -503,7 +503,7 @@ export class DeesWorkspaceFiletree extends DeesElement {
}
);
await DeesContextmenu.openContextMenuWithOptions(e, menuItems);
await DeesContextmenu.openContextMenuWithOptions(e, menuItems as any);
}
private async handleEmptySpaceContextMenu(e: MouseEvent) {
@@ -561,14 +561,14 @@ export class DeesWorkspaceFiletree extends DeesElement {
menuOptions: [
{
name: 'Cancel',
action: async (modalRef) => {
action: async (modalRef: any) => {
await modalRef.destroy();
resolve(null);
},
},
{
name: options.buttonName || 'Create',
action: async (modalRef) => {
action: async (modalRef: any) => {
// Query the input element directly and read its value
const contentEl = modalRef.shadowRoot?.querySelector('.modal .content');
const inputElement = contentEl?.querySelector('dees-input-text') as DeesInputText | null;