From 168b2a7596f9f1d419b88c761f48a4e56db424bd Mon Sep 17 00:00:00 2001 From: marlon-erler Date: Tue, 22 Sep 2026 21:57:22 +0200 Subject: [PATCH] fix imports to copied react.ts --- src/View/ChatPages/boardKanbanPage.tsx | 2 +- src/View/ChatPages/boardPage.tsx | 2 +- src/View/ChatPages/boardStatusGridPage.tsx | 2 +- src/View/ChatPages/calendarPage.tsx | 2 +- src/View/ChatPages/messagePage.tsx | 2 +- src/View/ChatPages/settingsPage.tsx | 2 +- src/View/ChatPages/taskPage.tsx | 2 +- src/View/Components/boardEntry.tsx | 2 +- src/View/Components/boardViewToggleButton.tsx | 2 +- src/View/Components/chatEntry.tsx | 2 +- src/View/Components/chatMessage.tsx | 2 +- src/View/Components/chatViewToggleButton.tsx | 2 +- src/View/Components/colorPicker.tsx | 2 +- src/View/Components/dangerousActionButton.tsx | 2 +- src/View/Components/deletableListItem.tsx | 2 +- src/View/Components/directoryItemList.tsx | 2 +- src/View/Components/filteredList.tsx | 2 +- src/View/Components/homePageButton.tsx | 2 +- src/View/Components/infoTile.tsx | 2 +- src/View/Components/inlineReply.tsx | 2 +- src/View/Components/messageReactionButton.tsx | 2 +- .../Components/messageReactionButtonRow.tsx | 2 +- src/View/Components/messageReactionEntry.tsx | 2 +- .../messageReactionFilterButton.tsx | 2 +- src/View/Components/monthGrid.tsx | 2 +- src/View/Components/navigationButton.tsx | 2 +- src/View/Components/option.tsx | 2 +- src/View/Components/optionButton.tsx | 2 +- src/View/Components/optionButtonList.tsx | 2 +- src/View/Components/placeholderView.tsx | 2 +- src/View/Components/propertyValueList.tsx | 2 +- src/View/Components/replyPreview.tsx | 2 +- src/View/Components/ribbonButton.tsx | 2 +- src/View/Components/taskEntry.tsx | 2 +- src/View/Components/textSpan.tsx | 2 +- src/View/Modals/boardSettingsModal.tsx | 2 +- src/View/Modals/chatMessageInfoModal.tsx | 2 +- src/View/Modals/connectionModal.tsx | 2 +- src/View/Modals/dataTransferModal.tsx | 2 +- src/View/Modals/messageFilterModal.tsx | 2 +- src/View/Modals/searchModal.tsx | 8 +- src/View/Modals/settingsModal.tsx | 2 +- src/View/Modals/splitModal.tsx | 2 +- src/View/Modals/storageModal.tsx | 2 +- src/View/Modals/taskSettingsModal.tsx | 6 +- src/View/chatPage.tsx | 2 +- src/View/chatPageWrapper.tsx | 2 +- src/View/homePage.tsx | 2 +- src/View/mainPage.tsx | 2 +- src/View/viewController.ts | 2 +- src/ViewModel/Chat/chatListViewModel.ts | 2 +- src/ViewModel/Chat/chatMessageViewModel.ts | 2 +- src/ViewModel/Chat/chatViewModel.ts | 2 +- src/ViewModel/Global/connectionViewModel.ts | 2 +- src/ViewModel/Global/coreViewModel.ts | 4 +- src/ViewModel/Global/fileTransferViewModel.ts | 2 +- src/ViewModel/Global/notificationViewModel.ts | 2 +- src/ViewModel/Global/settingsViewModel.ts | 4 +- src/ViewModel/Global/storageViewModel.ts | 2 +- src/ViewModel/Pages/boardViewModel.ts | 4 +- src/ViewModel/Pages/calendarPageViewModel.ts | 2 +- src/ViewModel/Pages/messagePageViewModel.ts | 2 +- src/ViewModel/Pages/settingsPageViewModel.ts | 2 +- .../Pages/taskContainingPageViewModel.ts | 4 +- src/ViewModel/Pages/taskPageViewModel.ts | 2 +- src/ViewModel/Pages/taskViewModel.ts | 2 +- src/ViewModel/Utility/searchViewModel.ts | 2 +- .../taskPropertyBulkChangeViewModel.ts | 2 +- src/index.tsx | 2 +- src/react.ts | 154 +++++++++--------- 70 files changed, 156 insertions(+), 154 deletions(-) diff --git a/src/View/ChatPages/boardKanbanPage.tsx b/src/View/ChatPages/boardKanbanPage.tsx index bbf8f994..a1b3c5e3 100644 --- a/src/View/ChatPages/boardKanbanPage.tsx +++ b/src/View/ChatPages/boardKanbanPage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ViewController } from "../viewController"; import { TaskViewModelToEntry } from "../Components/taskEntry"; import { diff --git a/src/View/ChatPages/boardPage.tsx b/src/View/ChatPages/boardPage.tsx index e05481ca..ee4668ab 100644 --- a/src/View/ChatPages/boardPage.tsx +++ b/src/View/ChatPages/boardPage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { BoardStatusGridPage } from "./boardStatusGridPage"; import { BoardKanbanPage } from "./boardKanbanPage"; import { ViewController } from "../viewController"; diff --git a/src/View/ChatPages/boardStatusGridPage.tsx b/src/View/ChatPages/boardStatusGridPage.tsx index 264af3c6..54f69925 100644 --- a/src/View/ChatPages/boardStatusGridPage.tsx +++ b/src/View/ChatPages/boardStatusGridPage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ViewController } from "../viewController"; import { TaskViewModelToEntry } from "../Components/taskEntry"; import { diff --git a/src/View/ChatPages/calendarPage.tsx b/src/View/ChatPages/calendarPage.tsx index d1b10f76..28eb900a 100644 --- a/src/View/ChatPages/calendarPage.tsx +++ b/src/View/ChatPages/calendarPage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import "./calendarPage.css"; import { ViewController } from "../viewController"; import { TaskSettingsModal } from "../Modals/taskSettingsModal"; diff --git a/src/View/ChatPages/messagePage.tsx b/src/View/ChatPages/messagePage.tsx index 5285d3c1..b84904bb 100644 --- a/src/View/ChatPages/messagePage.tsx +++ b/src/View/ChatPages/messagePage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import "./messagePage.css"; import { ViewController } from "../viewController"; import { MessageFilterModal } from "../Modals/messageFilterModal"; diff --git a/src/View/ChatPages/settingsPage.tsx b/src/View/ChatPages/settingsPage.tsx index 0b171a31..d47ec888 100644 --- a/src/View/ChatPages/settingsPage.tsx +++ b/src/View/ChatPages/settingsPage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { DeletableListItem } from "../Components/deletableListItem"; import { DangerousActionButton } from "../Components/dangerousActionButton"; import { ColorPicker } from "../Components/colorPicker"; diff --git a/src/View/ChatPages/taskPage.tsx b/src/View/ChatPages/taskPage.tsx index fc0e1d93..690b89ba 100644 --- a/src/View/ChatPages/taskPage.tsx +++ b/src/View/ChatPages/taskPage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import "./taskPage.css"; import { BoardPage } from "./boardPage"; import { ViewController } from "../viewController"; diff --git a/src/View/Components/boardEntry.tsx b/src/View/Components/boardEntry.tsx index 558a67b8..0d5835f4 100644 --- a/src/View/Components/boardEntry.tsx +++ b/src/View/Components/boardEntry.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ViewController } from "../viewController"; import BoardViewModel from "../../ViewModel/Pages/boardViewModel"; diff --git a/src/View/Components/boardViewToggleButton.tsx b/src/View/Components/boardViewToggleButton.tsx index e9661b96..67a4d9b1 100644 --- a/src/View/Components/boardViewToggleButton.tsx +++ b/src/View/Components/boardViewToggleButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { RibbonButton } from "./ribbonButton"; import BoardViewModel, { BoardPageTypes, diff --git a/src/View/Components/chatEntry.tsx b/src/View/Components/chatEntry.tsx index 9102d683..96e58608 100644 --- a/src/View/Components/chatEntry.tsx +++ b/src/View/Components/chatEntry.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import ChatViewModel from "../../ViewModel/Chat/chatViewModel"; export function ChatEntry(chatViewModel: ChatViewModel) { diff --git a/src/View/Components/chatMessage.tsx b/src/View/Components/chatMessage.tsx index 96091d23..43d21d6c 100644 --- a/src/View/Components/chatMessage.tsx +++ b/src/View/Components/chatMessage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { MessageReactionButtonRow } from "./messageReactionButtonRow"; import { InlineReply } from "./inlineReply"; import { ChatMessageInfoModal } from "../Modals/chatMessageInfoModal"; diff --git a/src/View/Components/chatViewToggleButton.tsx b/src/View/Components/chatViewToggleButton.tsx index b3c7c02d..e7869f9e 100644 --- a/src/View/Components/chatViewToggleButton.tsx +++ b/src/View/Components/chatViewToggleButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { RibbonButton } from "./ribbonButton"; import ChatViewModel, { ChatPageTypes, diff --git a/src/View/Components/colorPicker.tsx b/src/View/Components/colorPicker.tsx index 27939f6c..da39f6b3 100644 --- a/src/View/Components/colorPicker.tsx +++ b/src/View/Components/colorPicker.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { Colors } from "../../colors"; export function ColorPicker(selectedColor: React.State) { diff --git a/src/View/Components/dangerousActionButton.tsx b/src/View/Components/dangerousActionButton.tsx index 72176687..f5bf530e 100644 --- a/src/View/Components/dangerousActionButton.tsx +++ b/src/View/Components/dangerousActionButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel from "../../ViewModel/Global/coreViewModel"; export function DangerousActionButton( diff --git a/src/View/Components/deletableListItem.tsx b/src/View/Components/deletableListItem.tsx index e8758e6f..20529cec 100644 --- a/src/View/Components/deletableListItem.tsx +++ b/src/View/Components/deletableListItem.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel from "../../ViewModel/Global/coreViewModel"; export function DeletableListItem( diff --git a/src/View/Components/directoryItemList.tsx b/src/View/Components/directoryItemList.tsx index b5d29aca..d8737627 100644 --- a/src/View/Components/directoryItemList.tsx +++ b/src/View/Components/directoryItemList.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import StorageViewModel from "../../ViewModel/Global/storageViewModel"; import StorageModel, { PATH_COMPONENT_SEPARATOR, diff --git a/src/View/Components/filteredList.tsx b/src/View/Components/filteredList.tsx index 0dc92913..e8b2d273 100644 --- a/src/View/Components/filteredList.tsx +++ b/src/View/Components/filteredList.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { StringEntryObject, checkDoesObjectMatchReference, diff --git a/src/View/Components/homePageButton.tsx b/src/View/Components/homePageButton.tsx index 740923a8..c6ce134b 100644 --- a/src/View/Components/homePageButton.tsx +++ b/src/View/Components/homePageButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; export function HomePageButton( action: () => void, diff --git a/src/View/Components/infoTile.tsx b/src/View/Components/infoTile.tsx index 856dc58f..1484d3ab 100644 --- a/src/View/Components/infoTile.tsx +++ b/src/View/Components/infoTile.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; export function InfoTile( icon: string, diff --git a/src/View/Components/inlineReply.tsx b/src/View/Components/inlineReply.tsx index 82c726d8..925e9c53 100644 --- a/src/View/Components/inlineReply.tsx +++ b/src/View/Components/inlineReply.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ViewController } from "../viewController"; import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel"; diff --git a/src/View/Components/messageReactionButton.tsx b/src/View/Components/messageReactionButton.tsx index 15ef9217..9b559a98 100644 --- a/src/View/Components/messageReactionButton.tsx +++ b/src/View/Components/messageReactionButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel from "../../ViewModel/Global/coreViewModel"; import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel"; import { ReactionSymbols } from "../../Model/Chat/chatModel"; diff --git a/src/View/Components/messageReactionButtonRow.tsx b/src/View/Components/messageReactionButtonRow.tsx index 923f8bcc..e4aaa06f 100644 --- a/src/View/Components/messageReactionButtonRow.tsx +++ b/src/View/Components/messageReactionButtonRow.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { MessageReactionButton } from "./messageReactionButton"; import CoreViewModel from "../../ViewModel/Global/coreViewModel"; import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel"; diff --git a/src/View/Components/messageReactionEntry.tsx b/src/View/Components/messageReactionEntry.tsx index 49a5fb04..9922a4f4 100644 --- a/src/View/Components/messageReactionEntry.tsx +++ b/src/View/Components/messageReactionEntry.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ChatMessageReaction } from "../../Model/Chat/chatModel"; export function MessageReactionEntry(reaction: ChatMessageReaction) { diff --git a/src/View/Components/messageReactionFilterButton.tsx b/src/View/Components/messageReactionFilterButton.tsx index 88bcdd76..ac03889d 100644 --- a/src/View/Components/messageReactionFilterButton.tsx +++ b/src/View/Components/messageReactionFilterButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import MessagePageViewModel from "../../ViewModel/Pages/messagePageViewModel"; import { ReactionSymbols } from "../../Model/Chat/chatModel"; diff --git a/src/View/Components/monthGrid.tsx b/src/View/Components/monthGrid.tsx index 58727139..06f59f61 100644 --- a/src/View/Components/monthGrid.tsx +++ b/src/View/Components/monthGrid.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import "./monthGrid.css"; import { ViewController } from "../viewController"; import TaskViewModel from "../../ViewModel/Pages/taskViewModel"; diff --git a/src/View/Components/navigationButton.tsx b/src/View/Components/navigationButton.tsx index 28a88a3f..21a0a7c9 100644 --- a/src/View/Components/navigationButton.tsx +++ b/src/View/Components/navigationButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel from "../../ViewModel/Global/coreViewModel"; export function NavigationButton( diff --git a/src/View/Components/option.tsx b/src/View/Components/option.tsx index 16a00cbd..09c93158 100644 --- a/src/View/Components/option.tsx +++ b/src/View/Components/option.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; export function Option(text: string, value: string, selectedOnCreate: boolean) { return ( diff --git a/src/View/Components/optionButton.tsx b/src/View/Components/optionButton.tsx index ba20bf92..b008c161 100644 --- a/src/View/Components/optionButton.tsx +++ b/src/View/Components/optionButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; export function OptionButton( text: string, diff --git a/src/View/Components/optionButtonList.tsx b/src/View/Components/optionButtonList.tsx index 8c3c0056..3b84f228 100644 --- a/src/View/Components/optionButtonList.tsx +++ b/src/View/Components/optionButtonList.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { OptionButton } from "./optionButton"; export function OptionButtonList( diff --git a/src/View/Components/placeholderView.tsx b/src/View/Components/placeholderView.tsx index ae7962e5..fe889801 100644 --- a/src/View/Components/placeholderView.tsx +++ b/src/View/Components/placeholderView.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; export function PlaceholderView(text: string) { return ( diff --git a/src/View/Components/propertyValueList.tsx b/src/View/Components/propertyValueList.tsx index 63a4cdce..97d8269f 100644 --- a/src/View/Components/propertyValueList.tsx +++ b/src/View/Components/propertyValueList.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { StringEntryObject, collectObjectValuesForKey, diff --git a/src/View/Components/replyPreview.tsx b/src/View/Components/replyPreview.tsx index 4064caa4..b694a041 100644 --- a/src/View/Components/replyPreview.tsx +++ b/src/View/Components/replyPreview.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel from "../../ViewModel/Global/coreViewModel"; import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel"; diff --git a/src/View/Components/ribbonButton.tsx b/src/View/Components/ribbonButton.tsx index 66d735fa..6712367e 100644 --- a/src/View/Components/ribbonButton.tsx +++ b/src/View/Components/ribbonButton.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; export function RibbonButton( label: string, diff --git a/src/View/Components/taskEntry.tsx b/src/View/Components/taskEntry.tsx index 407d78fd..87104119 100644 --- a/src/View/Components/taskEntry.tsx +++ b/src/View/Components/taskEntry.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import TaskViewModel from "../../ViewModel/Pages/taskViewModel"; export function TaskEntry(taskViewModel: TaskViewModel) { diff --git a/src/View/Components/textSpan.tsx b/src/View/Components/textSpan.tsx index e7d88ca0..9566feb6 100644 --- a/src/View/Components/textSpan.tsx +++ b/src/View/Components/textSpan.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; export const StringToTextSpan: React.StateItemConverter = ( string: string, diff --git a/src/View/Modals/boardSettingsModal.tsx b/src/View/Modals/boardSettingsModal.tsx index 07fd6716..e7e32262 100644 --- a/src/View/Modals/boardSettingsModal.tsx +++ b/src/View/Modals/boardSettingsModal.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ViewController } from "../viewController"; import { DangerousActionButton } from "../Components/dangerousActionButton"; import { ColorPicker } from "../Components/colorPicker"; diff --git a/src/View/Modals/chatMessageInfoModal.tsx b/src/View/Modals/chatMessageInfoModal.tsx index 1dc46521..b592c119 100644 --- a/src/View/Modals/chatMessageInfoModal.tsx +++ b/src/View/Modals/chatMessageInfoModal.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { MessageReactionEntry } from "../Components/messageReactionEntry"; import { MessageReactionButtonRow } from "../Components/messageReactionButtonRow"; import { InfoTile } from "../Components/infoTile"; diff --git a/src/View/Modals/connectionModal.tsx b/src/View/Modals/connectionModal.tsx index e49d1cd5..fc220fb1 100644 --- a/src/View/Modals/connectionModal.tsx +++ b/src/View/Modals/connectionModal.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { DeletableListItem } from "../Components/deletableListItem"; import CoreViewModel from "../../ViewModel/Global/coreViewModel"; import ConnectionViewModel from "../../ViewModel/Global/connectionViewModel"; diff --git a/src/View/Modals/dataTransferModal.tsx b/src/View/Modals/dataTransferModal.tsx index 823e587d..cc3d8eec 100644 --- a/src/View/Modals/dataTransferModal.tsx +++ b/src/View/Modals/dataTransferModal.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ViewController } from "../viewController"; import { StringToTextSpan } from "../Components/textSpan"; import FileTransferViewModel, { diff --git a/src/View/Modals/messageFilterModal.tsx b/src/View/Modals/messageFilterModal.tsx index 42c23098..81d5fc37 100644 --- a/src/View/Modals/messageFilterModal.tsx +++ b/src/View/Modals/messageFilterModal.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ViewController } from "../viewController"; import { MessageReactionFilterButton } from "../Components/messageReactionFilterButton"; import MessagePageViewModel from "../../ViewModel/Pages/messagePageViewModel"; diff --git a/src/View/Modals/searchModal.tsx b/src/View/Modals/searchModal.tsx index 37fa1eb7..94da4ec8 100644 --- a/src/View/Modals/searchModal.tsx +++ b/src/View/Modals/searchModal.tsx @@ -1,5 +1,5 @@ import { v4 } from "uuid"; -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ViewController } from "../viewController"; import { StringToOption } from "../Components/option"; import SearchViewModel from "../../ViewModel/Utility/searchViewModel"; @@ -70,7 +70,7 @@ export function SearchModal( -

{coreViewModel.translations.general.searchSuggestionsLabel}

@@ -105,14 +105,14 @@ function SuggestionView(suggestion: string, searchViewModel: SearchViewModel< return
{suggestion} - -
-
diff --git a/src/View/chatPage.tsx b/src/View/chatPage.tsx index 3970f8d2..67da4e33 100644 --- a/src/View/chatPage.tsx +++ b/src/View/chatPage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../react"; import { ViewController } from "./viewController"; import "./homePage.css"; import { ChatViewToggleButton } from "./Components/chatViewToggleButton"; diff --git a/src/View/chatPageWrapper.tsx b/src/View/chatPageWrapper.tsx index 14ad9dcf..b2189ff2 100644 --- a/src/View/chatPageWrapper.tsx +++ b/src/View/chatPageWrapper.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../react"; import "./chatPage.css"; import { ChatPage } from "./chatPage"; import CoreViewModel from "../ViewModel/Global/coreViewModel"; diff --git a/src/View/homePage.tsx b/src/View/homePage.tsx index c45d69f3..a45143eb 100644 --- a/src/View/homePage.tsx +++ b/src/View/homePage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../react"; import "./homePage.css"; import { StringToOption } from "./Components/option"; import { HomePageButton } from "./Components/homePageButton"; diff --git a/src/View/mainPage.tsx b/src/View/mainPage.tsx index fc517871..dbbeff09 100644 --- a/src/View/mainPage.tsx +++ b/src/View/mainPage.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../react"; import CoreViewModel from "../ViewModel/Global/coreViewModel"; export function MainPage(coreViewModel: CoreViewModel) { diff --git a/src/View/viewController.ts b/src/View/viewController.ts index 9a6fb706..6c8f1f56 100644 --- a/src/View/viewController.ts +++ b/src/View/viewController.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../react"; class Tracker { state: React.State | undefined; diff --git a/src/ViewModel/Chat/chatListViewModel.ts b/src/ViewModel/Chat/chatListViewModel.ts index 0c1ebcbc..358c05c9 100644 --- a/src/ViewModel/Chat/chatListViewModel.ts +++ b/src/ViewModel/Chat/chatListViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import ChatViewModel from "./chatViewModel"; import SettingsViewModel from "../Global/settingsViewModel"; import NotificationViewModel from "../Global/notificationViewModel"; diff --git a/src/ViewModel/Chat/chatMessageViewModel.ts b/src/ViewModel/Chat/chatMessageViewModel.ts index a34598f1..de499e5a 100644 --- a/src/ViewModel/Chat/chatMessageViewModel.ts +++ b/src/ViewModel/Chat/chatMessageViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import MessagePageViewModel from "../Pages/messagePageViewModel"; import CoreViewModel from "../Global/coreViewModel"; import { diff --git a/src/ViewModel/Chat/chatViewModel.ts b/src/ViewModel/Chat/chatViewModel.ts index 0725672c..a960fa49 100644 --- a/src/ViewModel/Chat/chatViewModel.ts +++ b/src/ViewModel/Chat/chatViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import ChatListViewModel from "./chatListViewModel"; import TaskPageViewModel from "../Pages/taskPageViewModel"; import SettingsPageViewModel from "../Pages/settingsPageViewModel"; diff --git a/src/ViewModel/Global/connectionViewModel.ts b/src/ViewModel/Global/connectionViewModel.ts index 2c93c84f..b3814e26 100644 --- a/src/ViewModel/Global/connectionViewModel.ts +++ b/src/ViewModel/Global/connectionViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel from "./coreViewModel"; export default class ConnectionViewModel { diff --git a/src/ViewModel/Global/coreViewModel.ts b/src/ViewModel/Global/coreViewModel.ts index 8244e61a..47eb68cf 100644 --- a/src/ViewModel/Global/coreViewModel.ts +++ b/src/ViewModel/Global/coreViewModel.ts @@ -1,5 +1,5 @@ import { v4 } from "uuid"; -import * as React from "bloatless-react"; +import * as React from "../../react"; import { allTranslations, Translations } from "../../View/translations"; import { HandlerManager } from "../../Model/Utility/utility"; import StorageModel from "../../Model/Global/storageModel"; @@ -177,7 +177,7 @@ export class ContextHost extends Context { this.coreViewModel.context = selectedContext; this.currentContext.value = selectedContext; }; - + constructor(contextDebugDescription: string, public coreViewModel: CoreViewModel) { super(contextDebugDescription); } diff --git a/src/ViewModel/Global/fileTransferViewModel.ts b/src/ViewModel/Global/fileTransferViewModel.ts index 77256a6c..37cc3809 100644 --- a/src/ViewModel/Global/fileTransferViewModel.ts +++ b/src/ViewModel/Global/fileTransferViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel, { Context } from "./coreViewModel"; import { CommonKeys } from "../../View/keystrokes"; import StorageModel, { diff --git a/src/ViewModel/Global/notificationViewModel.ts b/src/ViewModel/Global/notificationViewModel.ts index 78a8cfc0..75ba0c33 100644 --- a/src/ViewModel/Global/notificationViewModel.ts +++ b/src/ViewModel/Global/notificationViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { ChatPageTypes } from "../Chat/chatViewModel"; import ChatListViewModel from "../Chat/chatListViewModel"; import ChatModel, { ChatMessage } from "../../Model/Chat/chatModel"; diff --git a/src/ViewModel/Global/settingsViewModel.ts b/src/ViewModel/Global/settingsViewModel.ts index aa8b1b41..7836effa 100644 --- a/src/ViewModel/Global/settingsViewModel.ts +++ b/src/ViewModel/Global/settingsViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel, { Context } from "./coreViewModel"; import { CommonKeys } from "../../View/keystrokes"; import { Languages, ThemeSettings } from "../../Model/Global/settingsModel"; @@ -83,7 +83,7 @@ export default class SettingsViewModel extends Context { return DynamicSceneDay; } else if (hour < 17) { return DynamicSceneAfternoon - } else if (hour < 21) { + } else { return DynamicSceneSunset } } diff --git a/src/ViewModel/Global/storageViewModel.ts b/src/ViewModel/Global/storageViewModel.ts index 98b2375b..8600e1de 100644 --- a/src/ViewModel/Global/storageViewModel.ts +++ b/src/ViewModel/Global/storageViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel, { Context } from "./coreViewModel"; import { CommonKeys } from "../../View/keystrokes"; import StorageModel, { diff --git a/src/ViewModel/Pages/boardViewModel.ts b/src/ViewModel/Pages/boardViewModel.ts index 805adf0c..c4a0a7f1 100644 --- a/src/ViewModel/Pages/boardViewModel.ts +++ b/src/ViewModel/Pages/boardViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import TaskViewModel from "./taskViewModel"; import TaskPageViewModel from "./taskPageViewModel"; import TaskContainingPageViewModel from "./taskContainingPageViewModel"; @@ -32,7 +32,7 @@ export default class BoardViewModel extends TaskContainingPageViewModel { filteredTaskViewModels: React.ListState = new React.ListState(); isFilterActive: React.State; - + // paths getBasePath = (): string[] => { return [ diff --git a/src/ViewModel/Pages/calendarPageViewModel.ts b/src/ViewModel/Pages/calendarPageViewModel.ts index 56d15136..d3d80a04 100644 --- a/src/ViewModel/Pages/calendarPageViewModel.ts +++ b/src/ViewModel/Pages/calendarPageViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import TaskViewModel from "./taskViewModel"; import TaskContainingPageViewModel from "./taskContainingPageViewModel"; import CoreViewModel from "../Global/coreViewModel"; diff --git a/src/ViewModel/Pages/messagePageViewModel.ts b/src/ViewModel/Pages/messagePageViewModel.ts index 8599b24a..e27a8f7c 100644 --- a/src/ViewModel/Pages/messagePageViewModel.ts +++ b/src/ViewModel/Pages/messagePageViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import SearchViewModel from "../Utility/searchViewModel"; import CoreViewModel, { Context } from "../Global/coreViewModel"; import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel"; diff --git a/src/ViewModel/Pages/settingsPageViewModel.ts b/src/ViewModel/Pages/settingsPageViewModel.ts index d95abab2..4d114f0a 100644 --- a/src/ViewModel/Pages/settingsPageViewModel.ts +++ b/src/ViewModel/Pages/settingsPageViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import CoreViewModel, { Context } from "../Global/coreViewModel"; import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel"; import { Colors } from "../../colors"; diff --git a/src/ViewModel/Pages/taskContainingPageViewModel.ts b/src/ViewModel/Pages/taskContainingPageViewModel.ts index 8aec3d63..70a61bec 100644 --- a/src/ViewModel/Pages/taskContainingPageViewModel.ts +++ b/src/ViewModel/Pages/taskContainingPageViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import TaskViewModel from "./taskViewModel"; import CoreViewModel, { Context } from "../Global/coreViewModel"; import ChatViewModel from "../Chat/chatViewModel"; @@ -17,7 +17,7 @@ export default class TaskContainingPageViewModel extends Context { new React.State(undefined); taskViewModels: React.MapState = new React.MapState(); - + taskCategorySuggestions: React.ListState = new React.ListState(); taskStatusSuggestions: React.ListState = new React.ListState(); diff --git a/src/ViewModel/Pages/taskPageViewModel.ts b/src/ViewModel/Pages/taskPageViewModel.ts index 9362a0c4..fbdfa896 100644 --- a/src/ViewModel/Pages/taskPageViewModel.ts +++ b/src/ViewModel/Pages/taskPageViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import BoardViewModel from "./boardViewModel"; import CoreViewModel, { ContextHost } from "../Global/coreViewModel"; import ChatViewModel, { ChatPageTypes } from "../Chat/chatViewModel"; diff --git a/src/ViewModel/Pages/taskViewModel.ts b/src/ViewModel/Pages/taskViewModel.ts index 61714cba..1f9cf22f 100644 --- a/src/ViewModel/Pages/taskViewModel.ts +++ b/src/ViewModel/Pages/taskViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import TaskContainingPageViewModel from "./taskContainingPageViewModel"; import CoreViewModel, { Context } from "../Global/coreViewModel"; import ChatViewModel from "../Chat/chatViewModel"; diff --git a/src/ViewModel/Utility/searchViewModel.ts b/src/ViewModel/Utility/searchViewModel.ts index d8ac9592..9f67825f 100644 --- a/src/ViewModel/Utility/searchViewModel.ts +++ b/src/ViewModel/Utility/searchViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import { checkDoesObjectMatchSearch } from "../../Model/Utility/utility"; export default class SearchViewModel { diff --git a/src/ViewModel/Utility/taskPropertyBulkChangeViewModel.ts b/src/ViewModel/Utility/taskPropertyBulkChangeViewModel.ts index ffd60ca2..7a31faf9 100644 --- a/src/ViewModel/Utility/taskPropertyBulkChangeViewModel.ts +++ b/src/ViewModel/Utility/taskPropertyBulkChangeViewModel.ts @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "../../react"; import TaskViewModel from "../Pages/taskViewModel"; export default class TaskPropertyBulkChangeViewModel { diff --git a/src/index.tsx b/src/index.tsx index 7efc731f..209b1110 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,4 +1,4 @@ -import * as React from "bloatless-react"; +import * as React from "./react"; import "./colors.css"; import "./coloredTile.css"; import "./base.css"; diff --git a/src/react.ts b/src/react.ts index e49bfeb0..3530a499 100755 --- a/src/react.ts +++ b/src/react.ts @@ -108,7 +108,7 @@ export class ListState extends State> { this.removalHandlers.set(item, new Set()); this.removalHandlers.get(item)!.add(handler); } - + handleRemovals(handler: RemovalSubscription): void { this.genericRemovalHandlers.add(handler); } @@ -279,103 +279,105 @@ export function createElement( case "on": { switch (directiveValue) { case "enter": { - element.addEventListener("keydown", (e: KeyboardEvent) => { - if (e.key != "Enter") return; - value(e); - }); - break; + element.addEventListener("keydown", (e: Event) => { + if (!(e instanceof KeyboardEvent)) return; + if (e.key != "Enter") return; + value(e); + }); + break; } default: { - element.addEventListener(directiveValue, value); + element.addEventListener(directiveValue, value); } } break; } case "keystroke": { - element.addEventListener("keydown", (e: KeyboardEvent) => { - if (e.metaKey == false && e.ctrlKey == false) return; - if (e.key != directiveValue) return; - value(e); - }) - break; + element.addEventListener("keydown", (e: Event) => { + if (!(e instanceof KeyboardEvent)) return; + if (e.metaKey == false && e.ctrlKey == false) return; + if (e.key != directiveValue) return; + value(e); + }) + break; } case "subscribe": { - const state = value as State; - state.subscribe( - (newValue) => (element[directiveValue] = newValue) - ); + const state = value as State; + state.subscribe( + (newValue) => (element[directiveValue] = newValue) + ); - break; + break; } case "bind": { - const state = value as State; - state.subscribe( - (newValue) => (element[directiveValue] = newValue) - ); - element.addEventListener( - "input", - () => (state.value = (element as any)[directiveValue]) - ); - break; + const state = value as State; + state.subscribe( + (newValue) => (element[directiveValue] = newValue) + ); + element.addEventListener( + "input", + () => (state.value = (element as any)[directiveValue]) + ); + break; } case "toggle": { - if (value.subscribe) { - const state = value as State; - state.subscribe((newValue) => - element.toggleAttribute(directiveValue, newValue) - ); - } else { - element.toggleAttribute(directiveValue, value); - } - break; + if (value.subscribe) { + const state = value as State; + state.subscribe((newValue) => + element.toggleAttribute(directiveValue, newValue) + ); + } else { + element.toggleAttribute(directiveValue, value); + } + break; } case "set": { - const state = value as State; - state.subscribe((newValue) => - element.setAttribute(directiveValue, newValue) - ); - break; + const state = value as State; + state.subscribe((newValue) => + element.setAttribute(directiveValue, newValue) + ); + break; } case "children": { - switch (directiveValue) { - case "set": { - const state = value as State; - state.subscribe((newValue) => { - element.innerHTML = ""; - element.append(...[newValue].flat()); - }); - break; - } - case "append": - case "prepend": { - try { - const [listState, toElement] = value as [ - listState: ListState, - StateItemConverter - ]; + switch (directiveValue) { + case "set": { + const state = value as State; + state.subscribe((newValue) => { + element.innerHTML = ""; + element.append(...[newValue].flat()); + }); + break; + } + case "append": + case "prepend": { + try { + const [listState, toElement] = value as [ + listState: ListState, + StateItemConverter + ]; - listState.handleAddition((newItem) => { - const child = toElement(newItem); - listState.handleRemoval(newItem, () => - child.remove() - ); + listState.handleAddition((newItem) => { + const child = toElement(newItem); + listState.handleRemoval(newItem, () => + child.remove() + ); - if (directiveValue == "append") { - element.append(child); - } else if (directiveValue == "prepend") { - element.prepend(child); - } - }); - } catch (error) { - console.error(error); - throw `error: cannot process subscribe:children directive. \n Usage: "children:append={[list, converter]}"; you can find a more detailed example in the documentation.`; - } - } - } - break; + if (directiveValue == "append") { + element.append(child); + } else if (directiveValue == "prepend") { + element.prepend(child); + } + }); + } catch (error) { + console.error(error); + throw `error: cannot process subscribe:children directive. \n Usage: "children:append={[list, converter]}"; you can find a more detailed example in the documentation.`; + } + } + } + break; } default: - element.setAttribute(attributename, value); + element.setAttribute(attributename, value); } });