From 4574b7f03ccc85c4bebdbfd9475788456086704f Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 8 Aug 2024 12:27:40 -0400
Subject: many changes to add typing in place of 'any's etc

---
 src/client/views/Main.tsx | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

(limited to 'src/client/views/Main.tsx')

diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 43b9a6b39..044162e4e 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -50,6 +50,7 @@ import { ScreenshotBox } from './nodes/ScreenshotBox';
 import { ScriptingBox } from './nodes/ScriptingBox';
 import { VideoBox } from './nodes/VideoBox';
 import { WebBox } from './nodes/WebBox';
+import { CalendarBox } from './nodes/calendarBox/CalendarBox';
 import { DashDocCommentView } from './nodes/formattedText/DashDocCommentView';
 import { DashDocView } from './nodes/formattedText/DashDocView';
 import { DashFieldView } from './nodes/formattedText/DashFieldView';
@@ -60,6 +61,8 @@ import { SummaryView } from './nodes/formattedText/SummaryView';
 import { ImportElementBox } from './nodes/importBox/ImportElementBox';
 import { PresBox, PresElementBox } from './nodes/trails';
 import { SearchBox } from './search/SearchBox';
+import { Node } from 'prosemirror-model';
+import { EditorView } from 'prosemirror-view';
 
 dotenv.config();
 
@@ -83,7 +86,7 @@ FieldLoader.ServerLoadStatus = { requested: 0, retrieved: 0, message: 'cache' };
     setTimeout(() => {
         // prevent zooming browser
         document.getElementById('root')!.addEventListener('wheel', event => event.ctrlKey && event.preventDefault(), true);
-        const startload = (document as any).startLoad;
+        const startload = (document as unknown as { startLoad: number }).startLoad; // see index.html in deploy/
         const loading = Date.now() - (startload ? Number(startload) : Date.now() - 3000);
         console.log('Loading Time = ' + loading);
         const d = new Date();
@@ -99,12 +102,12 @@ FieldLoader.ServerLoadStatus = { requested: 0, retrieved: 0, message: 'cache' };
         // initialize plugins and classes that require plugins
         CollectionDockingView.Init(TabDocView);
         FormattedTextBox.Init((tbox: FormattedTextBox) => ({
-            dashComment(node: any, view: any, getPos: any) { return new DashDocCommentView(node, view, getPos); }, // prettier-ignore
-            dashDoc(node: any, view: any, getPos: any)     { return new DashDocView(node, view, getPos, tbox); }, // prettier-ignore
-            dashField(node: any, view: any, getPos: any)   { return new DashFieldView(node, view, getPos, tbox); }, // prettier-ignore
-            equation(node: any, view: any, getPos: any)    { return new EquationView(node, view, getPos, tbox); }, // prettier-ignore
-            summary(node: any, view: any, getPos: any)     { return new SummaryView(node, view, getPos); }, // prettier-ignore
-            footnote(node: any, view: any, getPos: any)    { return new FootnoteView(node, view, getPos); }, // prettier-ignore
+            dashComment(node: Node, view: EditorView, getPos: () => number | undefined) { return new DashDocCommentView(node, view, getPos); }, // prettier-ignore
+            dashDoc(node: Node, view: EditorView, getPos: () => number | undefined)     { return new DashDocView(node, view, getPos, tbox); }, // prettier-ignore
+            dashField(node: Node, view: EditorView, getPos: () => number | undefined)   { return new DashFieldView(node, view, getPos, tbox); }, // prettier-ignore
+            equation(node: Node, view: EditorView, getPos: () => number | undefined)    { return new EquationView(node, view, getPos, tbox); }, // prettier-ignore
+            summary(node: Node, view: EditorView, getPos: () => number | undefined)     { return new SummaryView(node, view, getPos); }, // prettier-ignore
+            footnote(node: Node, view: EditorView, getPos: () => number | undefined)    { return new FootnoteView(node, view, getPos); }, // prettier-ignore
         }));
         CollectionFreeFormInfoUI.Init();
         LinkFollower.Init();
@@ -141,6 +144,7 @@ FieldLoader.ServerLoadStatus = { requested: 0, retrieved: 0, message: 'cache' };
             ChatBox,
             DiagramBox,
             HTMLtag,
+            CalendarBox,
             ComparisonBox,
             LoadingBox,
             PhysicsSimulationBox,
-- 
cgit v1.2.3-70-g09d2

