/** * CyberSim OS - Document & Spreadsheet Viewer */ export class DocViewerApp { constructor({ windowManager, eventBus }) { this.wm = windowManager; this.eventBus = eventBus; } getIconSvg() { return ``; } openDocument(file) { const win = this.wm.createWindow({ id: `doc_${file.id}`, title: `${file.name} - Document Viewer`, iconSvg: this.getIconSvg(), width: 820, height: 600, bodyContent: this.renderDocument(file) }); this.eventBus.emit('DOC_VIEWED', { target: file.name, details: { fileId: file.id, type: file.type } }); } renderDocument(file) { if (file.type === 'spreadsheet' && file.content) { return `
Confidential — Internal Use Only — Prepared for NexaCore Leadership
| ${h} | `).join('')}
|---|
| ${cell} | `).join('')}
${s.text}
`).join('') : ''} ${file.content.table ? `| ${h} | `).join('')}
|---|
| ${c} | `).join('')}
Archive file "${file.name}" contents cannot be executed directly within simulated document viewer.